[GSoC] Move all fill style tabs inside area tab
Change-Id: I89e84b7b3c7075ad4107e7bc444ea5c07bc90795 Reviewed-on: https://gerrit.libreoffice.org/27866 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
This commit is contained in:
committed by
Katarina Behrens
parent
da01e9ec5d
commit
686349476e
@@ -51,10 +51,6 @@ void SvxFormatCellsDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
|
||||
rAreaPage.SetGradientList( mpGradientList );
|
||||
rAreaPage.SetHatchingList( mpHatchingList );
|
||||
rAreaPage.SetBitmapList( mpBitmapList );
|
||||
rAreaPage.SetPageType( PageType::Area );
|
||||
rAreaPage.SetDlgType( 1 );
|
||||
rAreaPage.SetPos( 0 );
|
||||
rAreaPage.Construct();
|
||||
rAreaPage.ActivatePage( mrOutAttrs );
|
||||
}
|
||||
else if (nId == m_nBorderPageId)
|
||||
|
||||
@@ -35,9 +35,60 @@
|
||||
#include <svx/PaletteManager.hxx>
|
||||
#include <svx/svdview.hxx>
|
||||
|
||||
#define NO_BUTTON_SELECTED -1
|
||||
|
||||
class SdrModel;
|
||||
class SvxBitmapCtl;
|
||||
|
||||
/************************************************************************/
|
||||
class ButtonBox
|
||||
{
|
||||
private:
|
||||
sal_Int32 mnCurrentButton;
|
||||
std::vector< VclPtr<PushButton> > maButtonList;
|
||||
std::map< VclPtr<PushButton>, sal_Int32 > maButtonToPos;
|
||||
void SelectButtonImpl( sal_Int32 nPos )
|
||||
{
|
||||
if(mnCurrentButton != NO_BUTTON_SELECTED)
|
||||
{
|
||||
maButtonList[mnCurrentButton]->SetPressed(false);
|
||||
}
|
||||
mnCurrentButton = nPos;
|
||||
maButtonList[mnCurrentButton]->SetPressed(true);
|
||||
};
|
||||
public:
|
||||
ButtonBox()
|
||||
{
|
||||
mnCurrentButton = NO_BUTTON_SELECTED;
|
||||
};
|
||||
~ButtonBox() {};
|
||||
void AddButton(VclPtr<PushButton> pButton)
|
||||
{
|
||||
maButtonList.push_back(pButton);
|
||||
maButtonToPos.insert( std::make_pair(pButton, maButtonList.size() - 1) );
|
||||
}
|
||||
sal_Int32 GetCurrentButtonPos() { return mnCurrentButton; }
|
||||
sal_Int32 GetButtonPos( VclPtr<PushButton> pButton )
|
||||
{
|
||||
std::map< VclPtr<PushButton>, sal_Int32 >::const_iterator aBtnPos = maButtonToPos.find(pButton);
|
||||
if(aBtnPos != maButtonToPos.end())
|
||||
return aBtnPos->second;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
void SelectButton( VclPtr<PushButton> pButton)
|
||||
{
|
||||
sal_Int32 nPos = GetButtonPos(pButton);
|
||||
if(nPos != -1)
|
||||
SelectButtonImpl(nPos);
|
||||
}
|
||||
void clear()
|
||||
{
|
||||
mnCurrentButton = NO_BUTTON_SELECTED;
|
||||
maButtonList.clear();
|
||||
};
|
||||
};
|
||||
|
||||
enum class PageType
|
||||
{
|
||||
Area,
|
||||
@@ -47,12 +98,9 @@ enum class PageType
|
||||
Color,
|
||||
Shadow,
|
||||
Transparence,
|
||||
Unknown = 0xFFFF
|
||||
Unknown = 0xFFF
|
||||
};
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
class SvxAreaTabDialog : public SfxTabDialog
|
||||
{
|
||||
sal_uInt16 m_nAreaTabPage;
|
||||
@@ -86,9 +134,7 @@ private:
|
||||
ChangeType mnGradientListState;
|
||||
ChangeType mnHatchingListState;
|
||||
|
||||
PageType mnPageType;
|
||||
sal_Int32 mnPos;
|
||||
bool mbAreaTP;
|
||||
|
||||
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override;
|
||||
|
||||
@@ -199,74 +245,57 @@ class SvxAreaTabPage : public SvxTabPage
|
||||
using TabPage::DeactivatePage;
|
||||
static const sal_uInt16 pAreaRanges[];
|
||||
private:
|
||||
VclPtr<ListBox> m_pTypeLB;
|
||||
|
||||
VclPtr<VclBox> m_pFillLB;
|
||||
VclPtr<ColorLB> m_pLbColor;
|
||||
VclPtr<GradientLB> m_pLbGradient;
|
||||
VclPtr<HatchingLB> m_pLbHatching;
|
||||
VclPtr<BitmapLB> m_pLbBitmap;
|
||||
VclPtr<SvxXRectPreview> m_pCtlBitmapPreview;
|
||||
VclPtr<SvxXRectPreview> m_pCtlXRectPreview;
|
||||
|
||||
const SfxItemSet& m_rOutAttrs;
|
||||
ScopedVclPtr<SfxTabPage> m_pFillTabPage;
|
||||
VclPtr<VclBox> m_pFillTab;
|
||||
VclPtr<PushButton> m_pBtnNone;
|
||||
VclPtr<PushButton> m_pBtnColor;
|
||||
VclPtr<PushButton> m_pBtnGradient;
|
||||
VclPtr<PushButton> m_pBtnHatch;
|
||||
VclPtr<PushButton> m_pBtnBitmap;
|
||||
VclPtr<PushButton> m_pBtnPattern;
|
||||
ButtonBox maBox;
|
||||
|
||||
SdrModel* mpDrawModel;
|
||||
XColorListRef m_pColorList;
|
||||
XGradientListRef m_pGradientList;
|
||||
XHatchListRef m_pHatchingList;
|
||||
XBitmapListRef m_pBitmapList;
|
||||
XPatternListRef m_pPatternList;
|
||||
|
||||
// Placeholders for pointer-based entries; these will be inited
|
||||
// to point to these so that the page is usable without that
|
||||
// SvxAreaTabDialog has to call the setter methods (e.g. SetColorChgd).
|
||||
// Without that the pages used in SvxAreaTabDialog are not usable
|
||||
ChangeType maFixed_ChangeType;
|
||||
bool maFixed_sal_Bool;
|
||||
|
||||
ChangeType* m_pnColorListState;
|
||||
ChangeType* m_pnBitmapListState;
|
||||
ChangeType* m_pnPatternListState;
|
||||
ChangeType* m_pnGradientListState;
|
||||
ChangeType* m_pnHatchingListState;
|
||||
|
||||
PageType m_nPageType;
|
||||
sal_uInt16 m_nDlgType;
|
||||
sal_Int32 m_nPos;
|
||||
|
||||
bool* m_pbAreaTP;
|
||||
|
||||
sal_Int32 m_nPos;
|
||||
XFillAttrSetItem m_aXFillAttr;
|
||||
SfxItemSet& m_rXFSet;
|
||||
|
||||
MapUnit m_ePoolUnit;
|
||||
|
||||
DECL_LINK(SelectDialogTypeHdl_Impl, ListBox&, void);
|
||||
DECL_LINK( ModifyColorHdl_Impl, ListBox&, void );
|
||||
DECL_LINK( ModifyGradientHdl_Impl, ListBox&, void );
|
||||
DECL_LINK( ModifyHatchingHdl_Impl, ListBox&, void );
|
||||
DECL_LINK( ModifyBitmapHdl_Impl, ListBox&, void );
|
||||
|
||||
DECL_LINK( ModifyTileHdl_Impl, Edit&, void );
|
||||
DECL_LINK( ModifyTileClickHdl_Impl, Button*, void );
|
||||
DECL_LINK( ClickScaleHdl_Impl, Button*, void );
|
||||
void ClickInvisibleHdl_Impl();
|
||||
void ClickHatchingHdl_Impl();
|
||||
void ClickGradientHdl_Impl();
|
||||
void ClickColorHdl_Impl();
|
||||
void ClickBitmapHdl_Impl();
|
||||
DECL_LINK(SelectFillTypeHdl_Impl, Button*, void);
|
||||
|
||||
template< typename TabPage >
|
||||
bool FillItemSet_Impl( SfxItemSet* );
|
||||
template< typename TabPage >
|
||||
void Reset_Impl( const SfxItemSet* );
|
||||
template< typename TabPage >
|
||||
DeactivateRC DeactivatePage_Impl( SfxItemSet* pSet );
|
||||
public:
|
||||
SvxAreaTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
|
||||
virtual ~SvxAreaTabPage() override;
|
||||
virtual void dispose() override;
|
||||
|
||||
void Construct();
|
||||
|
||||
static VclPtr<SfxTabPage> Create( vcl::Window*, const SfxItemSet* );
|
||||
static const sal_uInt16* GetRanges() { return pAreaRanges; }
|
||||
|
||||
virtual bool FillItemSet( SfxItemSet* ) override;
|
||||
virtual void Reset( const SfxItemSet * ) override;
|
||||
virtual void ChangesApplied() override;
|
||||
virtual void ActivatePage( const SfxItemSet& rSet ) override;
|
||||
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
|
||||
virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
|
||||
@@ -277,12 +306,11 @@ public:
|
||||
void SetHatchingList( XHatchListRef const & pHtchLst)
|
||||
{ m_pHatchingList = pHtchLst; }
|
||||
void SetBitmapList( XBitmapListRef const & pBmpLst) { m_pBitmapList = pBmpLst; }
|
||||
void SetPatternList( XPatternListRef const &pPtrnLst ) { m_pPatternList = pPtrnLst; }
|
||||
void SetDrawModel( SdrModel* pModel ) { mpDrawModel = pModel; }
|
||||
|
||||
void SetPageType( PageType nInType ) { m_nPageType = nInType; }
|
||||
void SetDlgType( sal_uInt16 nInType ) { m_nDlgType = nInType; }
|
||||
void SetPos( sal_uInt16 nInPos ) { m_nPos = nInPos; }
|
||||
void SetAreaTP( bool* pIn ) { m_pbAreaTP = pIn; }
|
||||
virtual void PageCreated(const SfxAllItemSet& aSet) override;
|
||||
void CreatePage(sal_Int32 nId, SfxTabPage& pTab);
|
||||
void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
|
||||
void SetGrdChgd( ChangeType* pIn ) { m_pnGradientListState = pIn; }
|
||||
void SetHtchChgd( ChangeType* pIn ) { m_pnHatchingListState = pIn; }
|
||||
@@ -379,10 +407,7 @@ private:
|
||||
|
||||
ChangeType* m_pnGradientListState;
|
||||
ChangeType* m_pnColorListState;
|
||||
PageType* m_pPageType;
|
||||
sal_uInt16 m_nDlgType;
|
||||
sal_Int32* m_pPos;
|
||||
bool* m_pbAreaTP;
|
||||
|
||||
XFillStyleItem m_aXFStyleItem;
|
||||
XFillGradientItem m_aXGradientItem;
|
||||
@@ -400,6 +425,7 @@ private:
|
||||
DECL_LINK( ChangeAutoStepHdl_Impl, CheckBox&, void );
|
||||
DECL_LINK( ModifiedSliderHdl_Impl, Slider*, void );
|
||||
void ModifiedHdl_Impl(void*);
|
||||
long CheckChanges_Impl();
|
||||
|
||||
void SetControlState_Impl( css::awt::GradientStyle eXGS );
|
||||
sal_Int32 SearchGradientList(const OUString& rGradientName);
|
||||
@@ -421,12 +447,7 @@ public:
|
||||
void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
|
||||
void SetGradientList( XGradientListRef const & pGrdLst)
|
||||
{ m_pGradientList = pGrdLst; }
|
||||
|
||||
void SetPageType( PageType* pInType ) { m_pPageType = pInType; }
|
||||
void SetDlgType( sal_uInt16 nInType ) { m_nDlgType = nInType; }
|
||||
void SetPos( sal_Int32* pInPos ) { m_pPos = pInPos; }
|
||||
void SetAreaTP( bool* pIn ) { m_pbAreaTP = pIn; }
|
||||
|
||||
void SetPos( sal_Int32* pPos ) { m_pPos = pPos; }
|
||||
void SetGrdChgd( ChangeType* pIn ) { m_pnGradientListState = pIn; }
|
||||
void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
|
||||
};
|
||||
@@ -458,10 +479,7 @@ private:
|
||||
|
||||
ChangeType* m_pnHatchingListState;
|
||||
ChangeType* m_pnColorListState;
|
||||
PageType* m_pPageType;
|
||||
sal_uInt16 m_nDlgType;
|
||||
sal_Int32* m_pPos;
|
||||
bool* m_pbAreaTP;
|
||||
|
||||
XFillStyleItem m_aXFStyleItem;
|
||||
XFillHatchItem m_aXHatchItem;
|
||||
@@ -505,11 +523,7 @@ public:
|
||||
void SetHatchingList( XHatchListRef const & pHtchLst)
|
||||
{ m_pHatchingList = pHtchLst; }
|
||||
|
||||
void SetPageType( PageType* pInType ) { m_pPageType = pInType; }
|
||||
void SetDlgType( sal_uInt16 nInType ) { m_nDlgType = nInType; }
|
||||
void SetPos( sal_Int32* pInPos ) { m_pPos = pInPos; }
|
||||
void SetAreaTP( bool* pIn ) { m_pbAreaTP = pIn; }
|
||||
|
||||
void SetPos( sal_Int32* pPos ) { m_pPos = pPos; }
|
||||
void SetHtchChgd( ChangeType* pIn ) { m_pnHatchingListState = pIn; }
|
||||
void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
|
||||
|
||||
@@ -551,16 +565,13 @@ private:
|
||||
|
||||
double m_fObjectWidth;
|
||||
double m_fObjectHeight;
|
||||
PageType* m_nPageType;
|
||||
sal_uInt16 m_nDlgType;
|
||||
sal_Int32* m_nPos;
|
||||
|
||||
bool* m_pbAreaTP;
|
||||
sal_Int32* m_pPos;
|
||||
|
||||
XFillAttrSetItem m_aXFillAttr;
|
||||
SfxItemSet& m_rXFSet;
|
||||
const SdrView* mpView;
|
||||
MapUnit mePoolUnit;
|
||||
FieldUnit meDlgUnit;
|
||||
Size rBitmapSize;
|
||||
Size rFilledSize;
|
||||
Size rZoomedSize;
|
||||
@@ -599,11 +610,7 @@ public:
|
||||
virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
|
||||
|
||||
void SetBitmapList( const XBitmapListRef& pBmpLst) { m_pBitmapList = pBmpLst; }
|
||||
|
||||
void SetPageType( PageType* pInType ) { m_nPageType = pInType; }
|
||||
void SetDlgType( sal_uInt16 nInType ) { m_nDlgType = nInType; }
|
||||
void SetPos( sal_Int32* pInPos ) { m_nPos = pInPos; }
|
||||
void SetAreaTP( bool* pIn ) { m_pbAreaTP = pIn; }
|
||||
void SetPos( sal_Int32* pPos ) { m_pPos = pPos; }
|
||||
void SetBmpChgd( ChangeType* pIn ) { m_pnBitmapListState = pIn; }
|
||||
};
|
||||
|
||||
@@ -634,10 +641,7 @@ private:
|
||||
|
||||
ChangeType* m_pnPatternListState;
|
||||
ChangeType* m_pnColorListState;
|
||||
PageType* m_pPageType;
|
||||
sal_uInt16 m_nDlgType;
|
||||
sal_Int32* m_pPos;
|
||||
bool* m_pbAreaTP;
|
||||
|
||||
bool m_bPtrnChanged;
|
||||
|
||||
@@ -653,6 +657,9 @@ private:
|
||||
DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
|
||||
DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
|
||||
|
||||
long CheckChanges_Impl();
|
||||
sal_Int32 SearchPatternList(const OUString& rPatternName);
|
||||
|
||||
public:
|
||||
SvxPatternTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
|
||||
virtual ~SvxPatternTabPage() override;
|
||||
@@ -671,12 +678,7 @@ public:
|
||||
|
||||
void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
|
||||
void SetPatternList( XPatternListRef const & pPatternList) { m_pPatternList = pPatternList; }
|
||||
|
||||
void SetPageType( PageType* pInType ) { m_pPageType = pInType; }
|
||||
void SetDlgType( sal_uInt16 nInType ) { m_nDlgType = nInType; }
|
||||
void SetPos( sal_Int32* pInPos ) { m_pPos = pInPos; }
|
||||
void SetAreaTP( bool* pIn ) { m_pbAreaTP = pIn; }
|
||||
|
||||
void SetPos( sal_Int32* pPos ) { m_pPos = pPos; }
|
||||
void SetPtrnChgd( ChangeType* pIn ) { m_pnPatternListState = pIn; }
|
||||
void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
|
||||
void ChangeColor_Impl();
|
||||
@@ -687,7 +689,7 @@ public:
|
||||
enum class ColorModel
|
||||
{
|
||||
RGB,
|
||||
CMYK // can be extend with more models, e.g. HSV
|
||||
CMYK
|
||||
};
|
||||
|
||||
class SvxColorTabPage : public SfxTabPage
|
||||
@@ -742,10 +744,7 @@ private:
|
||||
XColorListRef pColorList;
|
||||
|
||||
ChangeType* pnColorListState;
|
||||
PageType* pPageType;
|
||||
sal_uInt16 nDlgType;
|
||||
sal_Int32* pPos;
|
||||
bool* pbAreaTP;
|
||||
|
||||
XFillStyleItem aXFStyleItem;
|
||||
XFillColorItem aXFillColorItem;
|
||||
@@ -797,13 +796,11 @@ public:
|
||||
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
|
||||
|
||||
void SetPropertyList( XPropertyListType t, const XPropertyListRef &xRef );
|
||||
|
||||
void SetColorList( const XColorListRef& pColList );
|
||||
|
||||
void SetPageType( PageType* pInType ) { pPageType = pInType; }
|
||||
void SetDlgType( sal_uInt16 nInType ) { nDlgType = nInType; }
|
||||
void SetPos( sal_Int32* pInPos ) { pPos = pInPos; }
|
||||
void SetAreaTP( bool* pIn ) { pbAreaTP = pIn; }
|
||||
void SetColorList( const XColorListRef& pColList );
|
||||
void SaveToViewFrame( SfxViewFrame *pViewFrame );
|
||||
void SetupForViewFrame( SfxViewFrame *pViewFrame );
|
||||
|
||||
|
||||
void SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; }
|
||||
|
||||
|
||||
@@ -73,9 +73,7 @@ SvxAreaTabDialog::SvxAreaTabDialog
|
||||
mnPatternListState ( ChangeType::NONE ),
|
||||
mnGradientListState ( ChangeType::NONE ),
|
||||
mnHatchingListState ( ChangeType::NONE ),
|
||||
mnPageType( PageType::Area ),
|
||||
mnPos( 0 ),
|
||||
mbAreaTP( false )
|
||||
mnPos( 0 )
|
||||
{
|
||||
m_nAreaTabPage = AddTabPage( "RID_SVXPAGE_AREA", SvxAreaTabPage::Create, nullptr );
|
||||
|
||||
@@ -262,24 +260,18 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
|
||||
static_cast<SvxAreaTabPage&>(rPage).SetGradientList( mpGradientList );
|
||||
static_cast<SvxAreaTabPage&>(rPage).SetHatchingList( mpHatchingList );
|
||||
static_cast<SvxAreaTabPage&>(rPage).SetBitmapList( mpBitmapList );
|
||||
static_cast<SvxAreaTabPage&>(rPage).SetPageType( mnPageType );
|
||||
static_cast<SvxAreaTabPage&>(rPage).SetDlgType( 0 );
|
||||
static_cast<SvxAreaTabPage&>(rPage).SetPos( mnPos );
|
||||
static_cast<SvxAreaTabPage&>(rPage).SetAreaTP( &mbAreaTP );
|
||||
static_cast<SvxAreaTabPage&>(rPage).SetPatternList( mpPatternList );
|
||||
static_cast<SvxAreaTabPage&>(rPage).SetDrawModel( mpDrawModel );
|
||||
static_cast<SvxAreaTabPage&>(rPage).SetGrdChgd( &mnGradientListState );
|
||||
static_cast<SvxAreaTabPage&>(rPage).SetHtchChgd( &mnHatchingListState );
|
||||
static_cast<SvxAreaTabPage&>(rPage).SetBmpChgd( &mnBitmapListState );
|
||||
static_cast<SvxAreaTabPage&>(rPage).SetColorChgd( &mnColorListState );
|
||||
static_cast<SvxAreaTabPage&>(rPage).Construct();
|
||||
// ActivatePge() is not called the first time
|
||||
static_cast<SvxAreaTabPage&>(rPage).ActivatePage( mrOutAttrs );
|
||||
}
|
||||
else if (nId == m_nShadowTabPage)
|
||||
{
|
||||
static_cast<SvxShadowTabPage&>(rPage).SetColorList( mpColorList );
|
||||
static_cast<SvxShadowTabPage&>(rPage).SetPageType( mnPageType );
|
||||
static_cast<SvxShadowTabPage&>(rPage).SetDlgType( 0 );
|
||||
static_cast<SvxShadowTabPage&>(rPage).SetAreaTP( &mbAreaTP );
|
||||
static_cast<SvxShadowTabPage&>(rPage).SetColorChgd( &mnColorListState );
|
||||
static_cast<SvxShadowTabPage&>(rPage).Construct();
|
||||
}
|
||||
@@ -287,10 +279,7 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
|
||||
{
|
||||
static_cast<SvxGradientTabPage&>(rPage).SetColorList( mpColorList );
|
||||
static_cast<SvxGradientTabPage&>(rPage).SetGradientList( mpGradientList );
|
||||
static_cast<SvxGradientTabPage&>(rPage).SetPageType( &mnPageType );
|
||||
static_cast<SvxGradientTabPage&>(rPage).SetDlgType( 0 );
|
||||
static_cast<SvxGradientTabPage&>(rPage).SetPos( &mnPos );
|
||||
static_cast<SvxGradientTabPage&>(rPage).SetAreaTP( &mbAreaTP );
|
||||
static_cast<SvxGradientTabPage&>(rPage).SetGrdChgd( &mnGradientListState );
|
||||
static_cast<SvxGradientTabPage&>(rPage).SetColorChgd( &mnColorListState );
|
||||
static_cast<SvxGradientTabPage&>(rPage).Construct();
|
||||
@@ -299,10 +288,7 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
|
||||
{
|
||||
static_cast<SvxHatchTabPage&>(rPage).SetColorList( mpColorList );
|
||||
static_cast<SvxHatchTabPage&>(rPage).SetHatchingList( mpHatchingList );
|
||||
static_cast<SvxHatchTabPage&>(rPage).SetPageType( &mnPageType );
|
||||
static_cast<SvxHatchTabPage&>(rPage).SetDlgType( 0 );
|
||||
static_cast<SvxHatchTabPage&>(rPage).SetPos( &mnPos );
|
||||
static_cast<SvxHatchTabPage&>(rPage).SetAreaTP( &mbAreaTP );
|
||||
static_cast<SvxHatchTabPage&>(rPage).SetHtchChgd( &mnHatchingListState );
|
||||
static_cast<SvxHatchTabPage&>(rPage).SetColorChgd( &mnColorListState );
|
||||
static_cast<SvxHatchTabPage&>(rPage).Construct();
|
||||
@@ -310,10 +296,7 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
|
||||
else if (nId == m_nBitmapTabPage )
|
||||
{
|
||||
static_cast<SvxBitmapTabPage&>(rPage).SetBitmapList( mpBitmapList );
|
||||
static_cast<SvxBitmapTabPage&>(rPage).SetPageType( &mnPageType );
|
||||
static_cast<SvxBitmapTabPage&>(rPage).SetDlgType( 0 );
|
||||
static_cast<SvxBitmapTabPage&>(rPage).SetPos( &mnPos );
|
||||
static_cast<SvxBitmapTabPage&>(rPage).SetAreaTP( &mbAreaTP );
|
||||
static_cast<SvxBitmapTabPage&>(rPage).SetBmpChgd( &mnBitmapListState );
|
||||
static_cast<SvxBitmapTabPage&>(rPage).Construct();
|
||||
}
|
||||
@@ -321,10 +304,7 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
|
||||
{
|
||||
static_cast<SvxPatternTabPage&>(rPage).SetColorList( mpColorList );
|
||||
static_cast<SvxPatternTabPage&>(rPage).SetPatternList( mpPatternList );
|
||||
static_cast<SvxPatternTabPage&>(rPage).SetPageType( &mnPageType );
|
||||
static_cast<SvxPatternTabPage&>(rPage).SetDlgType( 0 );
|
||||
static_cast<SvxPatternTabPage&>(rPage).SetPos( &mnPos );
|
||||
static_cast<SvxPatternTabPage&>(rPage).SetAreaTP( &mbAreaTP );
|
||||
static_cast<SvxPatternTabPage&>(rPage).SetPtrnChgd( &mnPatternListState );
|
||||
static_cast<SvxPatternTabPage&>(rPage).SetColorChgd( &mnColorListState );
|
||||
static_cast<SvxPatternTabPage&>(rPage).Construct();
|
||||
@@ -332,18 +312,10 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
|
||||
else if (nId == m_nColorTabPage)
|
||||
{
|
||||
static_cast<SvxColorTabPage&>(rPage).SetColorList( mpColorList );
|
||||
static_cast<SvxColorTabPage&>(rPage).SetPageType( &mnPageType );
|
||||
static_cast<SvxColorTabPage&>(rPage).SetDlgType( 0 );
|
||||
static_cast<SvxColorTabPage&>(rPage).SetPos( &mnPos );
|
||||
static_cast<SvxColorTabPage&>(rPage).SetAreaTP( &mbAreaTP );
|
||||
static_cast<SvxColorTabPage&>(rPage).SetColorChgd( &mnColorListState );
|
||||
static_cast<SvxColorTabPage&>(rPage).Construct();
|
||||
}
|
||||
else if (nId == m_nTransparenceTabPage)
|
||||
{
|
||||
static_cast<SvxTransparenceTabPage&>(rPage).SetPageType( mnPageType );
|
||||
static_cast<SvxTransparenceTabPage&>(rPage).SetDlgType( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
||||
+249
-732
File diff suppressed because it is too large
Load Diff
@@ -84,15 +84,12 @@ SvxBitmapTabPage::SvxBitmapTabPage( vcl::Window* pParent, const SfxItemSet& rInA
|
||||
m_aXBitmapItem( OUString(), Graphic() ),
|
||||
m_fObjectWidth(0.0),
|
||||
m_fObjectHeight(0.0),
|
||||
m_nPageType(nullptr),
|
||||
m_nDlgType(0),
|
||||
m_nPos(nullptr),
|
||||
|
||||
m_pbAreaTP( nullptr ),
|
||||
m_pPos(nullptr),
|
||||
|
||||
m_aXFillAttr ( rInAttrs.GetPool() ),
|
||||
m_rXFSet ( m_aXFillAttr.GetItemSet() ),
|
||||
mpView(nullptr),
|
||||
meDlgUnit(GetModuleFieldUnit( GetItemSet() )),
|
||||
nFilledWidthPercent(0),
|
||||
nFilledHeightPercent(0),
|
||||
nZoomedWidthPercent(0),
|
||||
@@ -185,18 +182,12 @@ void SvxBitmapTabPage::Construct()
|
||||
|
||||
void SvxBitmapTabPage::ActivatePage( const SfxItemSet& )
|
||||
{
|
||||
if( m_nDlgType == 0 ) // area dialog
|
||||
if( *m_pPos != LISTBOX_ENTRY_NOTFOUND )
|
||||
{
|
||||
*m_pbAreaTP = false;
|
||||
|
||||
if( *m_nPageType == PageType::Bitmap && *m_nPos != LISTBOX_ENTRY_NOTFOUND )
|
||||
{
|
||||
sal_uInt16 nId = m_pBitmapLB->GetItemId( static_cast<size_t>( *m_nPos ) );
|
||||
m_pBitmapLB->SelectItem(nId);
|
||||
}
|
||||
*m_nPageType = PageType::Bitmap;
|
||||
*m_nPos = LISTBOX_ENTRY_NOTFOUND;
|
||||
sal_uInt16 nId = m_pBitmapLB->GetItemId( static_cast<size_t>( *m_pPos ) );
|
||||
m_pBitmapLB->SelectItem(nId);
|
||||
}
|
||||
*m_pPos = LISTBOX_ENTRY_NOTFOUND;
|
||||
}
|
||||
|
||||
|
||||
@@ -211,80 +202,73 @@ DeactivateRC SvxBitmapTabPage::DeactivatePage( SfxItemSet* _pSet )
|
||||
|
||||
bool SvxBitmapTabPage::FillItemSet( SfxItemSet* rAttrs )
|
||||
{
|
||||
if( m_nDlgType == 0 && !*m_pbAreaTP )
|
||||
rAttrs->Put(XFillStyleItem(drawing::FillStyle_BITMAP));
|
||||
size_t nPos = m_pBitmapLB->GetSelectItemPos();
|
||||
if(VALUESET_ITEM_NOTFOUND != nPos)
|
||||
{
|
||||
if(PageType::Bitmap == *m_nPageType)
|
||||
const XBitmapEntry* pXBitmapEntry = m_pBitmapList->GetBitmap(nPos);
|
||||
const OUString aString(m_pBitmapLB->GetItemText( m_pBitmapLB->GetSelectItemId() ));
|
||||
rAttrs->Put(XFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()));
|
||||
}
|
||||
|
||||
BitmapStyle eStylePos = (BitmapStyle)m_pBitmapStyleLB->GetSelectEntryPos(); bool bIsStretched( eStylePos == STRETCHED );
|
||||
bool bIsTiled( eStylePos == TILED );
|
||||
|
||||
rAttrs->Put( XFillBmpTileItem(bIsTiled) );
|
||||
rAttrs->Put( XFillBmpStretchItem(bIsStretched) );
|
||||
|
||||
if(!bIsStretched)
|
||||
{
|
||||
Size aSetBitmapSize;
|
||||
switch(eStylePos)
|
||||
{
|
||||
rAttrs->Put(XFillStyleItem(drawing::FillStyle_BITMAP));
|
||||
size_t nPos = m_pBitmapLB->GetSelectItemPos();
|
||||
if(VALUESET_ITEM_NOTFOUND != nPos)
|
||||
case ORIGINAL:
|
||||
aSetBitmapSize = rBitmapSize;
|
||||
break;
|
||||
case FILLED:
|
||||
aSetBitmapSize = rFilledSize;
|
||||
break;
|
||||
case ZOOMED:
|
||||
aSetBitmapSize = rZoomedSize;
|
||||
break;
|
||||
case CUSTOM:
|
||||
case TILED:
|
||||
{
|
||||
const XBitmapEntry* pXBitmapEntry = m_pBitmapList->GetBitmap(nPos);
|
||||
const OUString aString(m_pBitmapLB->GetItemText( m_pBitmapLB->GetSelectItemId() ));
|
||||
rAttrs->Put(XFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()));
|
||||
}
|
||||
|
||||
BitmapStyle eStylePos = (BitmapStyle)m_pBitmapStyleLB->GetSelectEntryPos();
|
||||
bool bIsStretched( eStylePos == STRETCHED );
|
||||
bool bIsTiled( eStylePos == TILED );
|
||||
|
||||
rAttrs->Put( XFillBmpTileItem(bIsTiled) );
|
||||
rAttrs->Put( XFillBmpStretchItem(bIsStretched) );
|
||||
|
||||
if(!bIsStretched)
|
||||
{
|
||||
Size aSetBitmapSize;
|
||||
switch(eStylePos)
|
||||
sal_Int64 nWidthPercent = m_pBitmapWidth->Denormalize(m_pBitmapWidth->GetValue());
|
||||
sal_Int64 nHeightPercent = m_pBitmapHeight->Denormalize(m_pBitmapHeight->GetValue());
|
||||
if(eStylePos == CUSTOM && m_pTsbScale->IsEnabled() && m_pTsbScale->GetState() == TRISTATE_TRUE)
|
||||
{
|
||||
case ORIGINAL:
|
||||
aSetBitmapSize = rBitmapSize;
|
||||
break;
|
||||
case FILLED:
|
||||
aSetBitmapSize = rFilledSize;
|
||||
break;
|
||||
case ZOOMED:
|
||||
aSetBitmapSize = rZoomedSize;
|
||||
break;
|
||||
case CUSTOM:
|
||||
case TILED:
|
||||
{
|
||||
sal_Int64 nWidthPercent = m_pBitmapWidth->Denormalize(m_pBitmapWidth->GetValue());
|
||||
sal_Int64 nHeightPercent = m_pBitmapHeight->Denormalize(m_pBitmapHeight->GetValue());
|
||||
if(eStylePos == CUSTOM && m_pTsbScale->IsEnabled() && m_pTsbScale->GetState() == TRISTATE_TRUE)
|
||||
{
|
||||
aSetBitmapSize.Width() = -nWidthPercent;
|
||||
aSetBitmapSize.Height() = -nHeightPercent;
|
||||
}
|
||||
else
|
||||
{
|
||||
aSetBitmapSize.Width() = static_cast<long>(nWidthPercent*rBitmapSize.Width()/100);
|
||||
aSetBitmapSize.Height() = static_cast<long>(nHeightPercent*rBitmapSize.Height()/100);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
aSetBitmapSize.Width() = -nWidthPercent;
|
||||
aSetBitmapSize.Height() = -nHeightPercent;
|
||||
}
|
||||
rAttrs->Put( XFillBmpSizeXItem( aSetBitmapSize.Width() ) );
|
||||
rAttrs->Put( XFillBmpSizeYItem( aSetBitmapSize.Height() ) );
|
||||
}
|
||||
|
||||
if(m_pPositionLB->IsEnabled())
|
||||
rAttrs->Put( XFillBmpPosItem( static_cast<RectPoint>( m_pPositionLB->GetSelectEntryPos() ) ) );
|
||||
if(m_pPositionOffX->IsEnabled())
|
||||
rAttrs->Put( XFillBmpPosOffsetXItem( m_pPositionOffX->GetValue() ) );
|
||||
if(m_pPositionOffY->IsEnabled())
|
||||
rAttrs->Put( XFillBmpPosOffsetYItem( m_pPositionOffY->GetValue() ) );
|
||||
if(m_pTileOffBox->IsEnabled())
|
||||
{
|
||||
TileOffset eValue = static_cast<TileOffset>(m_pTileOffLB->GetSelectEntryPos());
|
||||
sal_uInt16 nOffsetValue = static_cast<sal_uInt16>(m_pTileOffset->GetValue());
|
||||
sal_uInt16 nRowOff = (eValue == ROW) ? nOffsetValue : 0;
|
||||
sal_uInt16 nColOff = (eValue == COLUMN) ? nOffsetValue : 0;
|
||||
rAttrs->Put( XFillBmpTileOffsetXItem(nRowOff) );
|
||||
rAttrs->Put( XFillBmpTileOffsetYItem(nColOff) );
|
||||
else
|
||||
{
|
||||
aSetBitmapSize.Width() = static_cast<long>(nWidthPercent*rBitmapSize.Width()/100);
|
||||
aSetBitmapSize.Height() = static_cast<long>(nHeightPercent*rBitmapSize.Height()/100);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
rAttrs->Put( XFillBmpSizeXItem( aSetBitmapSize.Width() ) );
|
||||
rAttrs->Put( XFillBmpSizeYItem( aSetBitmapSize.Height() ) );
|
||||
}
|
||||
|
||||
if(m_pPositionLB->IsEnabled())
|
||||
rAttrs->Put( XFillBmpPosItem( static_cast<RectPoint>( m_pPositionLB->GetSelectEntryPos() ) ) );
|
||||
if(m_pPositionOffX->IsEnabled())
|
||||
rAttrs->Put( XFillBmpPosOffsetXItem( m_pPositionOffX->GetValue() ) );
|
||||
if(m_pPositionOffY->IsEnabled())
|
||||
rAttrs->Put( XFillBmpPosOffsetYItem( m_pPositionOffY->GetValue() ) );
|
||||
if(m_pTileOffBox->IsEnabled())
|
||||
{
|
||||
TileOffset eValue = static_cast<TileOffset>(m_pTileOffLB->GetSelectEntryPos());
|
||||
sal_uInt16 nOffsetValue = static_cast<sal_uInt16>(m_pTileOffset->GetValue());
|
||||
sal_uInt16 nRowOff = (eValue == ROW) ? nOffsetValue : 0;
|
||||
sal_uInt16 nColOff = (eValue == COLUMN) ? nOffsetValue : 0;
|
||||
rAttrs->Put( XFillBmpTileOffsetXItem(nRowOff) );
|
||||
rAttrs->Put( XFillBmpTileOffsetYItem(nColOff) );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -505,7 +489,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyBitmapHdl, ValueSet*, void)
|
||||
|
||||
if( nPos != VALUESET_ITEM_NOTFOUND )
|
||||
{
|
||||
pGraphicObject.reset(new GraphicObject(m_pBitmapList->GetBitmap(nPos)->GetGraphicObject()));
|
||||
pGraphicObject.reset(new GraphicObject(m_pBitmapList->GetBitmap( static_cast<sal_uInt16>(nPos) )->GetGraphicObject()));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -604,7 +588,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickDeleteHdl, SvxPresetListBox*, void)
|
||||
|
||||
if( aQueryBox->Execute() == RET_YES )
|
||||
{
|
||||
m_pBitmapList->Remove(nPos);
|
||||
m_pBitmapList->Remove( static_cast<sal_uInt16>(nPos) );
|
||||
m_pBitmapLB->RemoveItem( nId );
|
||||
nId = m_pBitmapLB->GetItemId(0);
|
||||
m_pBitmapLB->SelectItem( nId );
|
||||
|
||||
@@ -59,10 +59,7 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, const SfxItemSet& rInAttr
|
||||
, rOutAttrs ( rInAttrs )
|
||||
// All the horrific pointers we store and should not
|
||||
, pnColorListState( nullptr )
|
||||
, pPageType( nullptr )
|
||||
, nDlgType( 0 )
|
||||
, pPos( nullptr )
|
||||
, pbAreaTP( nullptr )
|
||||
, aXFStyleItem( drawing::FillStyle_SOLID )
|
||||
, aXFillColorItem( OUString(), Color( COL_BLACK ) )
|
||||
, aXFillAttr( static_cast<XOutdevItemPool*>( rInAttrs.GetPool() ))
|
||||
@@ -238,47 +235,40 @@ void SvxColorTabPage::Construct()
|
||||
|
||||
void SvxColorTabPage::ActivatePage( const SfxItemSet& )
|
||||
{
|
||||
if( nDlgType == 0 ) // area dialog
|
||||
if( pColorList.is() )
|
||||
{
|
||||
*pbAreaTP = false;
|
||||
|
||||
if( pColorList.is() )
|
||||
if( *pPos != LISTBOX_ENTRY_NOTFOUND )
|
||||
{
|
||||
if( *pPageType == PageType::Color && *pPos != LISTBOX_ENTRY_NOTFOUND )
|
||||
{
|
||||
m_pValSetColorList->SelectItem( m_pValSetColorList->GetItemId( static_cast<size_t>(*pPos) ) );
|
||||
const XColorEntry* pEntry = pColorList->GetColor(*pPos);
|
||||
aPreviousColor = pEntry->GetColor();
|
||||
ChangeColor(pEntry->GetColor());
|
||||
}
|
||||
else if( *pPageType == PageType::Color && *pPos == LISTBOX_ENTRY_NOTFOUND )
|
||||
{
|
||||
const SfxPoolItem* pPoolItem = nullptr;
|
||||
if( SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), true, &pPoolItem ) )
|
||||
{
|
||||
SetColorModel( ColorModel::RGB );
|
||||
ChangeColorModel();
|
||||
|
||||
aPreviousColor = static_cast<const XFillColorItem*>(pPoolItem)->GetColorValue();
|
||||
ChangeColor( aPreviousColor );
|
||||
|
||||
|
||||
m_pRcustom->SetValue( ColorToPercent_Impl( aCurrentColor.GetRed() ) );
|
||||
m_pGcustom->SetValue( ColorToPercent_Impl( aCurrentColor.GetGreen() ) );
|
||||
m_pBcustom->SetValue( ColorToPercent_Impl( aCurrentColor.GetBlue() ) );
|
||||
m_pHexcustom->SetColor( aCurrentColor.GetColor() );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
m_pCtlPreviewOld->SetAttributes( aXFillAttr.GetItemSet() );
|
||||
m_pCtlPreviewOld->Invalidate();
|
||||
|
||||
SelectValSetHdl_Impl( m_pValSetColorList );
|
||||
|
||||
*pPageType = PageType::Color;
|
||||
*pPos = LISTBOX_ENTRY_NOTFOUND;
|
||||
m_pValSetColorList->SelectItem( m_pValSetColorList->GetItemId( static_cast<size_t>(*pPos) ) );
|
||||
const XColorEntry* pEntry = pColorList->GetColor(*pPos);
|
||||
aPreviousColor = pEntry->GetColor();
|
||||
ChangeColor(pEntry->GetColor());
|
||||
}
|
||||
else if( *pPos == LISTBOX_ENTRY_NOTFOUND )
|
||||
{
|
||||
const SfxPoolItem* pPoolItem = nullptr;
|
||||
if( SfxItemState::SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLCOLOR ), true, &pPoolItem ) )
|
||||
{
|
||||
SetColorModel( ColorModel::RGB );
|
||||
ChangeColorModel();
|
||||
|
||||
aPreviousColor = static_cast<const XFillColorItem*>(pPoolItem)->GetColorValue();
|
||||
ChangeColor( aPreviousColor );
|
||||
|
||||
m_pRcustom->SetValue( ColorToPercent_Impl( aCurrentColor.GetRed() ) );
|
||||
m_pGcustom->SetValue( ColorToPercent_Impl( aCurrentColor.GetGreen() ) );
|
||||
m_pBcustom->SetValue( ColorToPercent_Impl( aCurrentColor.GetBlue() ) );
|
||||
m_pHexcustom->SetColor( aCurrentColor.GetColor() );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
m_pCtlPreviewOld->SetAttributes( aXFillAttr.GetItemSet() );
|
||||
m_pCtlPreviewOld->Invalidate();
|
||||
|
||||
SelectValSetHdl_Impl( m_pValSetColorList );
|
||||
|
||||
*pPos = LISTBOX_ENTRY_NOTFOUND;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,13 +283,9 @@ DeactivateRC SvxColorTabPage::DeactivatePage( SfxItemSet* _pSet )
|
||||
|
||||
bool SvxColorTabPage::FillItemSet( SfxItemSet* rSet )
|
||||
{
|
||||
if( ( nDlgType != 0 ) ||
|
||||
( *pPageType == PageType::Color && !*pbAreaTP ) )
|
||||
{
|
||||
maPaletteManager.AddRecentColor(aCurrentColor, "#" + aCurrentColor.AsRGBHexString().toAsciiUpperCase());
|
||||
rSet->Put( XFillColorItem( OUString(), aCurrentColor ) );
|
||||
rSet->Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
|
||||
}
|
||||
maPaletteManager.AddRecentColor( aCurrentColor, OUString() );
|
||||
rSet->Put( XFillColorItem( OUString(), aCurrentColor ) );
|
||||
rSet->Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -774,6 +760,46 @@ void SvxColorTabPage::FillUserData()
|
||||
}
|
||||
|
||||
|
||||
void SvxColorTabPage::SetupForViewFrame( SfxViewFrame *pViewFrame )
|
||||
{
|
||||
const OfaRefItem<XColorList> *pPtr = nullptr;
|
||||
if ( pViewFrame != nullptr && pViewFrame->GetDispatcher() )
|
||||
pPtr = static_cast<const OfaRefItem<XColorList> *>(pViewFrame->
|
||||
GetDispatcher()->Execute( SID_GET_COLORLIST,
|
||||
SfxCallMode::SYNCHRON ));
|
||||
pColorList = pPtr ? pPtr->GetValue() : XColorList::GetStdColorList();
|
||||
|
||||
//SetPos( &pShadow->nUnknownPos );
|
||||
//SetColorChgd( &pShadow->nChangeType );
|
||||
Construct();
|
||||
}
|
||||
|
||||
void SvxColorTabPage::SaveToViewFrame( SfxViewFrame *pViewFrame )
|
||||
{
|
||||
if( !pColorList.is() )
|
||||
return;
|
||||
|
||||
if( !pViewFrame )
|
||||
return;
|
||||
|
||||
// notify current viewframe that it uses the same color table
|
||||
if ( !pViewFrame->GetDispatcher() )
|
||||
return;
|
||||
|
||||
const OfaRefItem<XColorList> * pPtr;
|
||||
pPtr = static_cast<const OfaRefItem<XColorList>*>(pViewFrame->GetDispatcher()->Execute( SID_GET_COLORLIST, SfxCallMode::SYNCHRON ));
|
||||
if( pPtr )
|
||||
{
|
||||
XColorListRef pReference = pPtr->GetValue();
|
||||
|
||||
if( pReference.is() &&
|
||||
pReference->GetPath() == pColorList->GetPath() &&
|
||||
pReference->GetName() == pColorList->GetName() )
|
||||
SfxObjectShell::Current()->PutItem( SvxColorListItem( pColorList,
|
||||
SID_COLOR_TABLE ) );
|
||||
}
|
||||
}
|
||||
|
||||
void SvxColorTabPage::SetPropertyList( XPropertyListType t, const XPropertyListRef &xRef )
|
||||
{
|
||||
(void) t;
|
||||
|
||||
@@ -58,10 +58,7 @@ SvxGradientTabPage::SvxGradientTabPage
|
||||
|
||||
m_pnGradientListState ( nullptr ),
|
||||
m_pnColorListState ( nullptr ),
|
||||
m_pPageType ( nullptr ),
|
||||
m_nDlgType ( 0 ),
|
||||
m_pPos ( nullptr ),
|
||||
m_pbAreaTP ( nullptr ),
|
||||
|
||||
m_aXFStyleItem ( drawing::FillStyle_GRADIENT ),
|
||||
m_aXGradientItem ( OUString(), XGradient( COL_BLACK, COL_WHITE ) ),
|
||||
@@ -176,78 +173,73 @@ void SvxGradientTabPage::Construct()
|
||||
}
|
||||
|
||||
|
||||
void SvxGradientTabPage::ActivatePage( const SfxItemSet& )
|
||||
void SvxGradientTabPage::ActivatePage( const SfxItemSet& rSet )
|
||||
{
|
||||
sal_Int32 nPos;
|
||||
sal_Int32 nCount;
|
||||
|
||||
if( m_nDlgType == 0 ) // area dialog
|
||||
if( m_pColorList.is() )
|
||||
{
|
||||
*m_pbAreaTP = false;
|
||||
|
||||
if( m_pColorList.is() )
|
||||
// ColorList
|
||||
if( *m_pnColorListState & ChangeType::CHANGED ||
|
||||
*m_pnColorListState & ChangeType::MODIFIED )
|
||||
{
|
||||
// ColorList
|
||||
if( *m_pnColorListState & ChangeType::CHANGED ||
|
||||
*m_pnColorListState & ChangeType::MODIFIED )
|
||||
{
|
||||
if( *m_pnColorListState & ChangeType::CHANGED )
|
||||
m_pColorList = static_cast<SvxAreaTabDialog*>( GetParentDialog() )->GetNewColorList();
|
||||
if( *m_pnColorListState & ChangeType::CHANGED )
|
||||
m_pColorList = static_cast<SvxAreaTabDialog*>( GetParentDialog() )->GetNewColorList();
|
||||
|
||||
// LbColorFrom
|
||||
nPos = m_pLbColorFrom->GetSelectEntryPos();
|
||||
m_pLbColorFrom->Clear();
|
||||
m_pLbColorFrom->Fill( m_pColorList );
|
||||
nCount = m_pLbColorFrom->GetEntryCount();
|
||||
if( nCount == 0 )
|
||||
; // this case should not occur
|
||||
else if( nCount <= nPos )
|
||||
m_pLbColorFrom->SelectEntryPos( 0 );
|
||||
else
|
||||
m_pLbColorFrom->SelectEntryPos( nPos );
|
||||
|
||||
// LbColorTo
|
||||
nPos = m_pLbColorTo->GetSelectEntryPos();
|
||||
m_pLbColorTo->Clear();
|
||||
m_pLbColorTo->CopyEntries( *m_pLbColorFrom );
|
||||
nCount = m_pLbColorTo->GetEntryCount();
|
||||
if( nCount == 0 )
|
||||
; // this case should not occur
|
||||
else if( nCount <= nPos )
|
||||
m_pLbColorTo->SelectEntryPos( 0 );
|
||||
else
|
||||
m_pLbColorTo->SelectEntryPos( nPos );
|
||||
|
||||
ModifiedHdl_Impl( this );
|
||||
}
|
||||
|
||||
// determining (and possibly cutting) the name and
|
||||
// displaying it in the GroupBox
|
||||
OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
|
||||
aString += ": ";
|
||||
INetURLObject aURL( m_pGradientList->GetPath() );
|
||||
|
||||
aURL.Append( m_pGradientList->GetName() );
|
||||
SAL_WARN_IF( aURL.GetProtocol() == INetProtocol::NotValid, "cui.tabpages", "invalid URL" );
|
||||
|
||||
if ( aURL.getBase().getLength() > 18 )
|
||||
{
|
||||
aString += aURL.getBase().copy( 0, 15 ) + "...";
|
||||
}
|
||||
// LbColorFrom
|
||||
nPos = m_pLbColorFrom->GetSelectEntryPos();
|
||||
m_pLbColorFrom->Clear();
|
||||
m_pLbColorFrom->Fill( m_pColorList );
|
||||
nCount = m_pLbColorFrom->GetEntryCount();
|
||||
if( nCount == 0 )
|
||||
; // this case should not occur
|
||||
else if( nCount <= nPos )
|
||||
m_pLbColorFrom->SelectEntryPos( 0 );
|
||||
else
|
||||
aString += aURL.getBase();
|
||||
m_pLbColorFrom->SelectEntryPos( nPos );
|
||||
|
||||
if ( *m_pPageType == PageType::Gradient && *m_pPos != LISTBOX_ENTRY_NOTFOUND )
|
||||
{
|
||||
sal_uInt16 nId = m_pGradientLB->GetItemId( static_cast<size_t>( *m_pPos ) );
|
||||
m_pGradientLB->SelectItem( nId );
|
||||
}
|
||||
// colors could have been deleted
|
||||
ChangeGradientHdl_Impl();
|
||||
// LbColorTo
|
||||
nPos = m_pLbColorTo->GetSelectEntryPos();
|
||||
m_pLbColorTo->Clear();
|
||||
m_pLbColorTo->CopyEntries( *m_pLbColorFrom );
|
||||
nCount = m_pLbColorTo->GetEntryCount();
|
||||
if( nCount == 0 )
|
||||
; // this case should not occur
|
||||
else if( nCount <= nPos )
|
||||
m_pLbColorTo->SelectEntryPos( 0 );
|
||||
else
|
||||
m_pLbColorTo->SelectEntryPos( nPos );
|
||||
|
||||
*m_pPageType = PageType::Gradient;
|
||||
*m_pPos = LISTBOX_ENTRY_NOTFOUND;
|
||||
ModifiedHdl_Impl( this );
|
||||
}
|
||||
|
||||
// determining (and possibly cutting) the name and
|
||||
// displaying it in the GroupBox
|
||||
OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
|
||||
aString += ": ";
|
||||
INetURLObject aURL( m_pGradientList->GetPath() );
|
||||
|
||||
aURL.Append( m_pGradientList->GetName() );
|
||||
SAL_WARN_IF( aURL.GetProtocol() == INetProtocol::NotValid, "cui.tabpages", "invalid URL" );
|
||||
|
||||
if ( aURL.getBase().getLength() > 18 )
|
||||
{
|
||||
aString += aURL.getBase().copy( 0, 15 ) + "...";
|
||||
}
|
||||
else
|
||||
aString += aURL.getBase();
|
||||
|
||||
*m_pPos = SearchGradientList( ( &static_cast<const XFillGradientItem&>( rSet.Get(XATTR_FILLGRADIENT) ) )->GetName() );
|
||||
if ( *m_pPos != LISTBOX_ENTRY_NOTFOUND )
|
||||
{
|
||||
sal_uInt16 nId = m_pGradientLB->GetItemId( static_cast<size_t>( *m_pPos ) );
|
||||
m_pGradientLB->SelectItem( nId );
|
||||
}
|
||||
// colors could have been deleted
|
||||
ChangeGradientHdl_Impl();
|
||||
|
||||
*m_pPos = LISTBOX_ENTRY_NOTFOUND;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,12 +252,81 @@ DeactivateRC SvxGradientTabPage::DeactivatePage( SfxItemSet* _pSet )
|
||||
return DeactivateRC::LeavePage;
|
||||
}
|
||||
|
||||
long SvxGradientTabPage::CheckChanges_Impl()
|
||||
{
|
||||
// is used here in order to NOT lose changes
|
||||
XGradient aTmpGradient( m_pLbColorFrom->GetSelectEntryColor(),
|
||||
m_pLbColorTo->GetSelectEntryColor(),
|
||||
(css::awt::GradientStyle) m_pLbGradientType->GetSelectEntryPos(),
|
||||
static_cast<long>(m_pMtrAngle->GetValue() * 10), // should be changed in resource
|
||||
(sal_uInt16) m_pMtrCenterX->GetValue(),
|
||||
(sal_uInt16) m_pMtrCenterY->GetValue(),
|
||||
(sal_uInt16) m_pMtrBorder->GetValue(),
|
||||
(sal_uInt16) m_pMtrColorFrom->GetValue(),
|
||||
(sal_uInt16) m_pMtrColorTo->GetValue() );
|
||||
|
||||
size_t nPos = m_pGradientLB->GetSelectItemPos();
|
||||
if( nPos != VALUESET_ITEM_NOTFOUND )
|
||||
{
|
||||
XGradient aGradient = m_pGradientList->GetGradient( static_cast<sal_uInt16>(nPos) )->GetGradient();
|
||||
|
||||
if( !( aTmpGradient == aGradient ) )
|
||||
{
|
||||
ResMgr& rMgr = CUI_MGR();
|
||||
Image aWarningBoxImage = WarningBox::GetStandardImage();
|
||||
ScopedVclPtrInstance<SvxMessDialog> aMessDlg( GetParentDialog(),
|
||||
SVX_RESSTR( RID_SVXSTR_GRADIENT ),
|
||||
CUI_RESSTR( RID_SVXSTR_ASK_CHANGE_GRADIENT ),
|
||||
&aWarningBoxImage );
|
||||
assert(aMessDlg && "Dialog creation failed!");
|
||||
aMessDlg->SetButtonText( SvxMessDialogButton::N1,
|
||||
OUString( ResId( RID_SVXSTR_CHANGE, rMgr ) ) );
|
||||
aMessDlg->SetButtonText( SvxMessDialogButton::N2,
|
||||
OUString( ResId( RID_SVXSTR_ADD, rMgr ) ) );
|
||||
|
||||
short nRet = aMessDlg->Execute();
|
||||
|
||||
switch( nRet )
|
||||
{
|
||||
case RET_BTN_1:
|
||||
{
|
||||
ClickModifyHdl_Impl( nullptr );
|
||||
}
|
||||
break;
|
||||
|
||||
case RET_BTN_2:
|
||||
{
|
||||
ClickAddHdl_Impl( nullptr );
|
||||
}
|
||||
break;
|
||||
|
||||
case RET_CANCEL:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
nPos = m_pGradientLB->GetSelectItemPos();
|
||||
if( nPos != VALUESET_ITEM_NOTFOUND )
|
||||
{
|
||||
*m_pPos = static_cast<sal_Int32>(nPos);
|
||||
}
|
||||
return 0L;
|
||||
}
|
||||
|
||||
|
||||
bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
|
||||
{
|
||||
if( m_nDlgType == 0 && *m_pPageType == PageType::Gradient && !*m_pbAreaTP )
|
||||
std::unique_ptr<XGradient> pXGradient;
|
||||
OUString aString;
|
||||
size_t nPos = m_pGradientLB->GetSelectItemPos();
|
||||
if( nPos != VALUESET_ITEM_NOTFOUND )
|
||||
{
|
||||
pXGradient.reset(new XGradient( m_pGradientList->GetGradient( static_cast<sal_uInt16>(nPos) )->GetGradient() ));
|
||||
aString = m_pGradientLB->GetItemText( m_pGradientLB->GetSelectItemId() );
|
||||
}
|
||||
else
|
||||
// gradient was passed (unidentified)
|
||||
{
|
||||
std::unique_ptr<XGradient> pXGradient;
|
||||
pXGradient.reset(new XGradient( m_pLbColorFrom->GetSelectEntryColor(),
|
||||
m_pLbColorTo->GetSelectEntryColor(),
|
||||
(css::awt::GradientStyle) m_pLbGradientType->GetSelectEntryPos(),
|
||||
@@ -275,25 +336,16 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
|
||||
(sal_uInt16) m_pMtrBorder->GetValue(),
|
||||
(sal_uInt16) m_pMtrColorFrom->GetValue(),
|
||||
(sal_uInt16) m_pMtrColorTo->GetValue() ));
|
||||
|
||||
OUString aString;
|
||||
size_t nPos = m_pGradientLB->GetSelectItemPos();
|
||||
if( nPos != VALUESET_ITEM_NOTFOUND )
|
||||
{
|
||||
XGradient aTmpGradient = m_pGradientList->GetGradient( static_cast<sal_uInt16>(nPos) )->GetGradient();
|
||||
if( *pXGradient == aTmpGradient )
|
||||
aString = m_pGradientLB->GetItemText( m_pGradientLB->GetSelectItemId() );
|
||||
}
|
||||
|
||||
sal_uInt16 nValue = 0;
|
||||
if( !m_pCbIncrement->IsChecked() )
|
||||
nValue = m_pMtrIncrement->GetValue();
|
||||
|
||||
assert( pXGradient && "XGradient could not be created" );
|
||||
rSet->Put( XFillStyleItem( drawing::FillStyle_GRADIENT ) );
|
||||
rSet->Put( XFillGradientItem( aString, *pXGradient ) );
|
||||
rSet->Put( XGradientStepCountItem( nValue ) );
|
||||
}
|
||||
|
||||
sal_uInt16 nValue = 0;
|
||||
if( !m_pCbIncrement->IsChecked() )
|
||||
nValue = m_pMtrIncrement->GetValue();
|
||||
|
||||
assert( pXGradient && "XGradient could not be created" );
|
||||
rSet->Put( XFillStyleItem( drawing::FillStyle_GRADIENT ) );
|
||||
rSet->Put( XFillGradientItem( aString, *pXGradient ) );
|
||||
rSet->Put( XGradientStepCountItem( nValue ) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -473,7 +525,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickModifyHdl_Impl, Button*, void)
|
||||
|
||||
if ( nPos != VALUESET_ITEM_NOTFOUND )
|
||||
{
|
||||
OUString aName(m_pGradientList->GetGradient(nPos)->GetName());
|
||||
OUString aName( m_pGradientList->GetGradient( static_cast<sal_uInt16>(nPos) )->GetName() );
|
||||
|
||||
XGradient aXGradient( m_pLbColorFrom->GetSelectEntryColor(),
|
||||
m_pLbColorTo->GetSelectEntryColor(),
|
||||
@@ -487,7 +539,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickModifyHdl_Impl, Button*, void)
|
||||
|
||||
m_pGradientList->Replace(o3tl::make_unique<XGradientEntry>(aXGradient, aName), nPos);
|
||||
|
||||
Bitmap aBitmap = m_pGradientList->GetBitmapForPreview(nPos, m_pGradientLB->GetIconSize());
|
||||
Bitmap aBitmap = m_pGradientList->GetBitmapForPreview( static_cast<sal_uInt16>(nPos), m_pGradientLB->GetIconSize() );
|
||||
m_pGradientLB->RemoveItem( nId );
|
||||
m_pGradientLB->InsertItem( nId, Image(aBitmap), aName, static_cast<sal_uInt16>(nPos) );
|
||||
m_pGradientLB->SelectItem( nId );
|
||||
@@ -579,7 +631,7 @@ void SvxGradientTabPage::ChangeGradientHdl_Impl()
|
||||
size_t nPos = m_pGradientLB->GetSelectItemPos();
|
||||
|
||||
if( nPos != VALUESET_ITEM_NOTFOUND )
|
||||
pGradient.reset(new XGradient(m_pGradientList->GetGradient(nPos)->GetGradient()));
|
||||
pGradient.reset(new XGradient( m_pGradientList->GetGradient( static_cast<sal_uInt16>( nPos ) )->GetGradient() ));
|
||||
else
|
||||
{
|
||||
const SfxPoolItem* pPoolItem = nullptr;
|
||||
|
||||
@@ -58,10 +58,7 @@ SvxHatchTabPage::SvxHatchTabPage
|
||||
m_rOutAttrs ( rInAttrs ),
|
||||
m_pnHatchingListState ( nullptr ),
|
||||
m_pnColorListState ( nullptr ),
|
||||
m_pPageType ( nullptr ),
|
||||
m_nDlgType ( 0 ),
|
||||
m_pPos ( nullptr ),
|
||||
m_pbAreaTP ( nullptr ),
|
||||
|
||||
m_aXFStyleItem ( drawing::FillStyle_HATCH ),
|
||||
m_aXHatchItem ( OUString(), XHatch() ),
|
||||
@@ -167,61 +164,56 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
|
||||
sal_Int32 nPos;
|
||||
sal_Int32 nCount;
|
||||
|
||||
if( m_nDlgType == 0 ) // area dialog
|
||||
if( m_pColorList.is() )
|
||||
{
|
||||
*m_pbAreaTP = false;
|
||||
|
||||
if( m_pColorList.is() )
|
||||
// ColorList
|
||||
if( *m_pnColorListState & ChangeType::CHANGED ||
|
||||
*m_pnColorListState & ChangeType::MODIFIED )
|
||||
{
|
||||
// ColorList
|
||||
if( *m_pnColorListState & ChangeType::CHANGED ||
|
||||
*m_pnColorListState & ChangeType::MODIFIED )
|
||||
{
|
||||
if( *m_pnColorListState & ChangeType::CHANGED )
|
||||
m_pColorList = static_cast<SvxAreaTabDialog*>( GetParentDialog() )->GetNewColorList();
|
||||
if( *m_pnColorListState & ChangeType::CHANGED )
|
||||
m_pColorList = static_cast<SvxAreaTabDialog*>( GetParentDialog() )->GetNewColorList();
|
||||
|
||||
// LbLineColor
|
||||
nPos = m_pLbLineColor->GetSelectEntryPos();
|
||||
m_pLbLineColor->Clear();
|
||||
m_pLbLineColor->Fill( m_pColorList );
|
||||
nCount = m_pLbLineColor->GetEntryCount();
|
||||
if( nCount == 0 )
|
||||
; // this case should not occur
|
||||
else if( nCount <= nPos )
|
||||
m_pLbLineColor->SelectEntryPos( 0 );
|
||||
else
|
||||
m_pLbLineColor->SelectEntryPos( nPos );
|
||||
|
||||
ModifiedHdl_Impl( this );
|
||||
}
|
||||
|
||||
// determining (possibly cutting) the name
|
||||
// and displaying it in the GroupBox
|
||||
OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
|
||||
aString += ": ";
|
||||
INetURLObject aURL( m_pHatchingList->GetPath() );
|
||||
|
||||
aURL.Append( m_pHatchingList->GetName() );
|
||||
SAL_WARN_IF( aURL.GetProtocol() == INetProtocol::NotValid, "cui.tabpages", "invalid URL" );
|
||||
|
||||
if ( aURL.getBase().getLength() > 18 )
|
||||
{
|
||||
aString += aURL.getBase().copy( 0, 15 ) + "...";
|
||||
}
|
||||
// LbLineColor
|
||||
nPos = m_pLbLineColor->GetSelectEntryPos();
|
||||
m_pLbLineColor->Clear();
|
||||
m_pLbLineColor->Fill( m_pColorList );
|
||||
nCount = m_pLbLineColor->GetEntryCount();
|
||||
if( nCount == 0 )
|
||||
; // this case should not occur
|
||||
else if( nCount <= nPos )
|
||||
m_pLbLineColor->SelectEntryPos( 0 );
|
||||
else
|
||||
aString += aURL.getBase();
|
||||
m_pLbLineColor->SelectEntryPos( nPos );
|
||||
|
||||
if( *m_pPageType == PageType::Hatch && *m_pPos != LISTBOX_ENTRY_NOTFOUND )
|
||||
{
|
||||
sal_uInt16 nId = m_pHatchLB->GetItemId( static_cast<size_t>( *m_pPos ) );
|
||||
m_pHatchLB->SelectItem( nId );
|
||||
}
|
||||
// colors could have been deleted
|
||||
ChangeHatchHdl_Impl();
|
||||
|
||||
*m_pPageType = PageType::Hatch;
|
||||
*m_pPos = LISTBOX_ENTRY_NOTFOUND;
|
||||
ModifiedHdl_Impl( this );
|
||||
}
|
||||
|
||||
// determining (possibly cutting) the name
|
||||
// and displaying it in the GroupBox
|
||||
OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
|
||||
aString += ": ";
|
||||
INetURLObject aURL( m_pHatchingList->GetPath() );
|
||||
|
||||
aURL.Append( m_pHatchingList->GetName() );
|
||||
SAL_WARN_IF( aURL.GetProtocol() == INetProtocol::NotValid, "cui.tabpages", "invalid URL" );
|
||||
|
||||
if ( aURL.getBase().getLength() > 18 )
|
||||
{
|
||||
aString += aURL.getBase().copy( 0, 15 ) + "...";
|
||||
}
|
||||
else
|
||||
aString += aURL.getBase();
|
||||
|
||||
*m_pPos = SearchHatchList( ( &static_cast<const XFillHatchItem&>( rSet.Get(XATTR_FILLHATCH)) )->GetName() );
|
||||
if( *m_pPos != LISTBOX_ENTRY_NOTFOUND )
|
||||
{
|
||||
sal_uInt16 nId = m_pHatchLB->GetItemId( static_cast<size_t>( *m_pPos ) );
|
||||
m_pHatchLB->SelectItem( nId );
|
||||
}
|
||||
// colors could have been deleted
|
||||
ChangeHatchHdl_Impl();
|
||||
|
||||
*m_pPos = LISTBOX_ENTRY_NOTFOUND;
|
||||
}
|
||||
|
||||
XFillBackgroundItem aBckItem( static_cast<const XFillBackgroundItem&>(rSet.Get(XATTR_FILLBACKGROUND)));
|
||||
@@ -281,42 +273,35 @@ sal_Int32 SvxHatchTabPage::SearchHatchList(const OUString& rHatchName)
|
||||
|
||||
bool SvxHatchTabPage::FillItemSet( SfxItemSet* rSet )
|
||||
{
|
||||
if( m_nDlgType == 0 && !*m_pbAreaTP ) // area dialog
|
||||
std::unique_ptr<XHatch> pXHatch;
|
||||
OUString aString;
|
||||
size_t nPos = m_pHatchLB->GetSelectItemPos();
|
||||
if( nPos != VALUESET_ITEM_NOTFOUND )
|
||||
{
|
||||
if( *m_pPageType == PageType::Hatch )
|
||||
{
|
||||
std::unique_ptr<XHatch> pXHatch;
|
||||
pXHatch.reset(new XHatch( m_pLbLineColor->GetSelectEntryColor(),
|
||||
(css::drawing::HatchStyle) m_pLbLineType->GetSelectEntryPos(),
|
||||
GetCoreValue( *m_pMtrDistance, m_ePoolUnit ),
|
||||
static_cast<long>(m_pMtrAngle->GetValue() * 10) ));
|
||||
|
||||
OUString aString;
|
||||
if( !( m_pMtrDistance->IsValueChangedFromSaved() ||
|
||||
m_pMtrAngle->IsValueChangedFromSaved() ||
|
||||
m_pLbLineType->IsValueChangedFromSaved() ||
|
||||
m_pLbLineColor->IsValueChangedFromSaved() ||
|
||||
m_pHatchLB->IsValueChangedFromSaved() ) )
|
||||
{
|
||||
aString = m_pHatchLB->GetItemText( m_pHatchLB->GetSelectItemId() );;
|
||||
}
|
||||
|
||||
assert( pXHatch && "XHatch couldn't be created" );
|
||||
rSet->Put( XFillStyleItem( drawing::FillStyle_HATCH ) );
|
||||
rSet->Put( XFillHatchItem( aString, *pXHatch ) );
|
||||
|
||||
rSet->Put( XFillBackgroundItem( m_pCbBackgroundColor->IsChecked() ) );
|
||||
if(m_pCbBackgroundColor->IsChecked())
|
||||
{
|
||||
sal_uInt32 nPosBckColor = m_pLbBackgroundColor->GetSelectEntryPos();
|
||||
OUString aBckColorString;
|
||||
if( nPosBckColor != LISTBOX_ENTRY_NOTFOUND )
|
||||
aBckColorString = m_pLbBackgroundColor->GetSelectEntry();
|
||||
else
|
||||
aBckColorString = OUString();
|
||||
rSet->Put( XFillColorItem( aBckColorString, m_pLbBackgroundColor->GetSelectEntryColor() ) );
|
||||
}
|
||||
}
|
||||
pXHatch.reset(new XHatch( m_pHatchingList->GetHatch( static_cast<sal_uInt16>(nPos) )->GetHatch() ));
|
||||
aString = m_pHatchLB->GetItemText( m_pHatchLB->GetSelectItemId() );
|
||||
}
|
||||
// gradient has been (unidentifiedly) passed
|
||||
else
|
||||
{
|
||||
pXHatch.reset(new XHatch( m_pLbLineColor->GetSelectEntryColor(),
|
||||
(css::drawing::HatchStyle) m_pLbLineType->GetSelectEntryPos(),
|
||||
GetCoreValue( *m_pMtrDistance, m_ePoolUnit ),
|
||||
static_cast<long>(m_pMtrAngle->GetValue() * 10) ));
|
||||
}
|
||||
assert( pXHatch && "XHatch couldn't be created" );
|
||||
rSet->Put( XFillStyleItem( drawing::FillStyle_HATCH ) );
|
||||
rSet->Put( XFillHatchItem( aString, *pXHatch ) );
|
||||
rSet->Put( XFillBackgroundItem( m_pCbBackgroundColor->IsChecked() ) );
|
||||
if(m_pCbBackgroundColor->IsChecked())
|
||||
{
|
||||
sal_uInt32 nPosBckColor = m_pLbBackgroundColor->GetSelectEntryPos();
|
||||
OUString aBckColorString;
|
||||
if( nPosBckColor != LISTBOX_ENTRY_NOTFOUND )
|
||||
aBckColorString = m_pLbBackgroundColor->GetSelectEntry();
|
||||
else
|
||||
aBckColorString = OUString();
|
||||
rSet->Put( XFillColorItem( aBckColorString, m_pLbBackgroundColor->GetSelectEntryColor() ) );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -418,7 +403,7 @@ void SvxHatchTabPage::ChangeHatchHdl_Impl()
|
||||
size_t nPos = m_pHatchLB->GetSelectItemPos();
|
||||
|
||||
if( nPos != VALUESET_ITEM_NOTFOUND )
|
||||
pHatch.reset(new XHatch(m_pHatchingList->GetHatch(nPos)->GetHatch()));
|
||||
pHatch.reset(new XHatch( m_pHatchingList->GetHatch( static_cast<sal_uInt16>(nPos) )->GetHatch() ));
|
||||
else
|
||||
{
|
||||
const SfxPoolItem* pPoolItem = nullptr;
|
||||
@@ -547,7 +532,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickModifyHdl_Impl, Button*, void)
|
||||
|
||||
if( nPos != VALUESET_ITEM_NOTFOUND )
|
||||
{
|
||||
OUString aName(m_pHatchingList->GetHatch(nPos)->GetName());
|
||||
OUString aName( m_pHatchingList->GetHatch( static_cast<sal_uInt16>(nPos) )->GetName() );
|
||||
|
||||
XHatch aXHatch( m_pLbLineColor->GetSelectEntryColor(),
|
||||
(css::drawing::HatchStyle) m_pLbLineType->GetSelectEntryPos(),
|
||||
@@ -556,7 +541,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickModifyHdl_Impl, Button*, void)
|
||||
|
||||
m_pHatchingList->Replace(o3tl::make_unique<XHatchEntry>(aXHatch, aName), nPos);
|
||||
|
||||
Bitmap aBitmap = m_pHatchingList->GetBitmapForPreview(nPos, m_pHatchLB->GetIconSize());
|
||||
Bitmap aBitmap = m_pHatchingList->GetBitmapForPreview( static_cast<sal_uInt16>(nPos), m_pHatchLB->GetIconSize() );
|
||||
m_pHatchLB->RemoveItem( nId );
|
||||
m_pHatchLB->InsertItem( nId, Image(aBitmap), aName, static_cast<sal_uInt16>(nPos) );
|
||||
m_pHatchLB->SelectItem( nId );
|
||||
|
||||
@@ -91,11 +91,7 @@ SvxPatternTabPage::SvxPatternTabPage( vcl::Window* pParent, const SfxItemSet& r
|
||||
|
||||
m_pnPatternListState ( nullptr ),
|
||||
m_pnColorListState ( nullptr ),
|
||||
m_pPageType ( nullptr ),
|
||||
m_nDlgType ( 0 ),
|
||||
m_pPos ( nullptr ),
|
||||
m_pbAreaTP ( nullptr ),
|
||||
|
||||
m_bPtrnChanged ( false ),
|
||||
|
||||
m_aXFStyleItem ( drawing::FillStyle_BITMAP ),
|
||||
@@ -168,77 +164,72 @@ void SvxPatternTabPage::Construct()
|
||||
}
|
||||
|
||||
|
||||
void SvxPatternTabPage::ActivatePage( const SfxItemSet& )
|
||||
void SvxPatternTabPage::ActivatePage( const SfxItemSet& rSet )
|
||||
{
|
||||
sal_Int32 nPos;
|
||||
sal_Int32 nCount;
|
||||
|
||||
if( m_nDlgType == 0 ) // area dialog
|
||||
if( m_pColorList.is() )
|
||||
{
|
||||
*m_pbAreaTP = false;
|
||||
|
||||
if( m_pColorList.is() )
|
||||
// ColorList
|
||||
if( *m_pnColorListState & ChangeType::CHANGED ||
|
||||
*m_pnColorListState & ChangeType::MODIFIED )
|
||||
{
|
||||
// ColorList
|
||||
if( *m_pnColorListState & ChangeType::CHANGED ||
|
||||
*m_pnColorListState & ChangeType::MODIFIED )
|
||||
{
|
||||
if( *m_pnColorListState & ChangeType::CHANGED )
|
||||
m_pColorList = static_cast<SvxAreaTabDialog*>( GetParentDialog() )->GetNewColorList();
|
||||
if( *m_pnColorListState & ChangeType::CHANGED )
|
||||
m_pColorList = static_cast<SvxAreaTabDialog*>( GetParentDialog() )->GetNewColorList();
|
||||
|
||||
// LbColor
|
||||
nPos = m_pLbColor->GetSelectEntryPos();
|
||||
m_pLbColor->Clear();
|
||||
m_pLbColor->Fill( m_pColorList );
|
||||
nCount = m_pLbColor->GetEntryCount();
|
||||
if( nCount == 0 )
|
||||
; // this case should not occur
|
||||
else if( nCount <= nPos )
|
||||
m_pLbColor->SelectEntryPos( 0 );
|
||||
else
|
||||
m_pLbColor->SelectEntryPos( nPos );
|
||||
|
||||
// LbColorBackground
|
||||
nPos = m_pLbBackgroundColor->GetSelectEntryPos();
|
||||
m_pLbBackgroundColor->Clear();
|
||||
m_pLbBackgroundColor->CopyEntries( *m_pLbColor );
|
||||
nCount = m_pLbBackgroundColor->GetEntryCount();
|
||||
if( nCount == 0 )
|
||||
; // this case should not occur
|
||||
else if( nCount <= nPos )
|
||||
m_pLbBackgroundColor->SelectEntryPos( 0 );
|
||||
else
|
||||
m_pLbBackgroundColor->SelectEntryPos( nPos );
|
||||
ChangeColor_Impl();
|
||||
}
|
||||
|
||||
// determining (possibly cutting) the name and
|
||||
// displaying it in the GroupBox
|
||||
OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
|
||||
aString += ": ";
|
||||
INetURLObject aURL( m_pPatternList->GetPath() );
|
||||
|
||||
aURL.Append( m_pPatternList->GetName() );
|
||||
SAL_WARN_IF( aURL.GetProtocol() == INetProtocol::NotValid, "cui.tabpages", "invalid URL" );
|
||||
|
||||
if( aURL.getBase().getLength() > 18 )
|
||||
{
|
||||
aString += aURL.getBase().copy( 0, 15 ) + "...";
|
||||
}
|
||||
// LbColor
|
||||
nPos = m_pLbColor->GetSelectEntryPos();
|
||||
m_pLbColor->Clear();
|
||||
m_pLbColor->Fill( m_pColorList );
|
||||
nCount = m_pLbColor->GetEntryCount();
|
||||
if( nCount == 0 )
|
||||
; // this case should not occur
|
||||
else if( nCount <= nPos )
|
||||
m_pLbColor->SelectEntryPos( 0 );
|
||||
else
|
||||
aString += aURL.getBase();
|
||||
m_pLbColor->SelectEntryPos( nPos );
|
||||
|
||||
if( *m_pPageType == PageType::Bitmap && *m_pPos != LISTBOX_ENTRY_NOTFOUND )
|
||||
{
|
||||
sal_uInt16 nId = m_pPatternLB->GetItemId( static_cast<size_t>( *m_pPos ) );
|
||||
m_pPatternLB->SelectItem( nId );
|
||||
}
|
||||
// colors could have been deleted
|
||||
ChangePatternHdl_Impl( m_pPatternLB );
|
||||
|
||||
*m_pPageType = PageType::Bitmap;
|
||||
*m_pPos = LISTBOX_ENTRY_NOTFOUND;
|
||||
// LbColorBackground
|
||||
nPos = m_pLbBackgroundColor->GetSelectEntryPos();
|
||||
m_pLbBackgroundColor->Clear();
|
||||
m_pLbBackgroundColor->CopyEntries( *m_pLbColor );
|
||||
nCount = m_pLbBackgroundColor->GetEntryCount();
|
||||
if( nCount == 0 )
|
||||
; // this case should not occur
|
||||
else if( nCount <= nPos )
|
||||
m_pLbBackgroundColor->SelectEntryPos( 0 );
|
||||
else
|
||||
m_pLbBackgroundColor->SelectEntryPos( nPos );
|
||||
ChangeColor_Impl();
|
||||
}
|
||||
|
||||
// determining (possibly cutting) the name and
|
||||
// displaying it in the GroupBox
|
||||
OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
|
||||
aString += ": ";
|
||||
INetURLObject aURL( m_pPatternList->GetPath() );
|
||||
|
||||
aURL.Append( m_pPatternList->GetName() );
|
||||
SAL_WARN_IF( aURL.GetProtocol() == INetProtocol::NotValid, "cui.tabpages", "invalid URL" );
|
||||
|
||||
if( aURL.getBase().getLength() > 18 )
|
||||
{
|
||||
aString += aURL.getBase().copy( 0, 15 ) + "...";
|
||||
}
|
||||
else
|
||||
aString += aURL.getBase();
|
||||
|
||||
*m_pPos = SearchPatternList( ( &static_cast<const XFillBitmapItem&>( rSet.Get(XATTR_FILLBITMAP)) )->GetName() );
|
||||
if( *m_pPos != LISTBOX_ENTRY_NOTFOUND )
|
||||
{
|
||||
sal_uInt16 nId = m_pPatternLB->GetItemId( static_cast<size_t>( *m_pPos ) );
|
||||
m_pPatternLB->SelectItem( nId );
|
||||
}
|
||||
// colors could have been deleted
|
||||
ChangePatternHdl_Impl( m_pPatternLB );
|
||||
|
||||
*m_pPos = LISTBOX_ENTRY_NOTFOUND;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,28 +245,21 @@ DeactivateRC SvxPatternTabPage::DeactivatePage( SfxItemSet* _pSet)
|
||||
|
||||
bool SvxPatternTabPage::FillItemSet( SfxItemSet* _rOutAttrs )
|
||||
{
|
||||
if( m_nDlgType == 0 && !*m_pbAreaTP ) // area dialog
|
||||
_rOutAttrs->Put(XFillStyleItem(drawing::FillStyle_BITMAP));
|
||||
size_t nPos = m_pPatternLB->GetSelectItemPos();
|
||||
if(VALUESET_ITEM_NOTFOUND != nPos)
|
||||
{
|
||||
if(PageType::Bitmap == *m_pPageType)
|
||||
{
|
||||
_rOutAttrs->Put(XFillStyleItem(drawing::FillStyle_BITMAP));
|
||||
size_t nPos = m_pPatternLB->GetSelectItemPos();
|
||||
if( !m_bPtrnChanged && VALUESET_ITEM_NOTFOUND != nPos)
|
||||
{
|
||||
const XBitmapEntry* pXBitmapEntry = m_pPatternList->GetBitmap(nPos);
|
||||
const OUString aString( m_pPatternLB->GetItemText( m_pPatternLB->GetSelectItemId() ) );
|
||||
const XBitmapEntry* pXBitmapEntry = m_pPatternList->GetBitmap( static_cast<sal_uInt16>(nPos) );
|
||||
const OUString aString( m_pPatternLB->GetItemText( m_pPatternLB->GetSelectItemId() ) );
|
||||
|
||||
_rOutAttrs->Put(XFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()));
|
||||
}
|
||||
else
|
||||
{
|
||||
const BitmapEx aBitmapEx(m_pBitmapCtl->GetBitmapEx());
|
||||
|
||||
_rOutAttrs->Put(XFillBitmapItem(OUString(), Graphic(aBitmapEx)));
|
||||
}
|
||||
}
|
||||
_rOutAttrs->Put(XFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()));
|
||||
}
|
||||
else
|
||||
{
|
||||
const BitmapEx aBitmapEx(m_pBitmapCtl->GetBitmapEx());
|
||||
|
||||
_rOutAttrs->Put(XFillBitmapItem(OUString(), Graphic(aBitmapEx)));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -321,7 +305,7 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ChangePatternHdl_Impl, ValueSet*, void)
|
||||
|
||||
if(VALUESET_ITEM_NOTFOUND != nPos)
|
||||
{
|
||||
pGraphicObject.reset(new GraphicObject(m_pPatternList->GetBitmap(nPos)->GetGraphicObject()));
|
||||
pGraphicObject.reset(new GraphicObject(m_pPatternList->GetBitmap( static_cast<sal_uInt16>(nPos) )->GetGraphicObject()));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -429,16 +413,12 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickAddHdl_Impl, Button*, void)
|
||||
|
||||
long nCount = m_pPatternList->Count();
|
||||
long j = 1;
|
||||
bool bDifferent = false;
|
||||
bool bValidPatternName = false;
|
||||
|
||||
while( !bDifferent )
|
||||
while( !bValidPatternName )
|
||||
{
|
||||
aName = aNewName + " " + OUString::number( j++ );
|
||||
bDifferent = true;
|
||||
|
||||
for( long i = 0; i < nCount && bDifferent; i++ )
|
||||
if( aName == m_pPatternList->GetBitmap( i )->GetName() )
|
||||
bDifferent = false;
|
||||
aName = aNewName + " " + OUString::number( j++ );
|
||||
bValidPatternName = (SearchPatternList(aName) == LISTBOX_ENTRY_NOTFOUND);
|
||||
}
|
||||
|
||||
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
||||
@@ -452,13 +432,9 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickAddHdl_Impl, Button*, void)
|
||||
{
|
||||
pDlg->GetName( aName );
|
||||
|
||||
bDifferent = true;
|
||||
bValidPatternName = (SearchPatternList(aName) == LISTBOX_ENTRY_NOTFOUND);
|
||||
|
||||
for( long i = 0; i < nCount && bDifferent; i++ )
|
||||
if( aName == m_pPatternList->GetBitmap( i )->GetName() )
|
||||
bDifferent = false;
|
||||
|
||||
if( bDifferent ) {
|
||||
if( bValidPatternName ) {
|
||||
nError = 0;
|
||||
break;
|
||||
}
|
||||
@@ -532,14 +508,14 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickModifyHdl_Impl, Button*, void)
|
||||
|
||||
if ( nPos != VALUESET_ITEM_NOTFOUND )
|
||||
{
|
||||
OUString aName(m_pPatternList->GetBitmap(nPos)->GetName());
|
||||
OUString aName( m_pPatternList->GetBitmap( static_cast<sal_uInt16>(nPos) )->GetName() );
|
||||
|
||||
const BitmapEx aBitmapEx(m_pBitmapCtl->GetBitmapEx());
|
||||
|
||||
// #i123497# Need to replace the existing entry with a new one (old returned needs to be deleted)
|
||||
m_pPatternList->Replace(o3tl::make_unique<XBitmapEntry>(Graphic(aBitmapEx), aName), nPos);
|
||||
|
||||
Bitmap aBitmap = m_pPatternList->GetBitmapForPreview(nPos, m_pPatternLB->GetIconSize());
|
||||
Bitmap aBitmap = m_pPatternList->GetBitmapForPreview( static_cast<sal_uInt16>( nPos ), m_pPatternLB->GetIconSize() );
|
||||
m_pPatternLB->RemoveItem(nId);
|
||||
m_pPatternLB->InsertItem( nId, Image(aBitmap), aName, static_cast<sal_uInt16>(nPos) );
|
||||
m_pPatternLB->SelectItem( nId );
|
||||
@@ -561,29 +537,21 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickRenameHdl_Impl, SvxPresetListBox*, void)
|
||||
ResMgr& rMgr = CUI_MGR();
|
||||
OUString aDesc( ResId( RID_SVXSTR_DESC_NEW_PATTERN, rMgr ) );
|
||||
OUString aName( m_pPatternList->GetBitmap( nPos )->GetName() );
|
||||
OUString aOldName = aName;
|
||||
|
||||
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
||||
assert(pFact && "Dialog creation failed!");
|
||||
std::unique_ptr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ));
|
||||
assert(pDlg && "Dialog creation failed!");
|
||||
|
||||
long nCount = m_pPatternList->Count();
|
||||
bool bLoop = true;
|
||||
|
||||
while( bLoop && pDlg->Execute() == RET_OK )
|
||||
{
|
||||
pDlg->GetName( aName );
|
||||
bool bDifferent = true;
|
||||
sal_Int32 nPatternPos = SearchPatternList(aName);
|
||||
bool bValidPatternName = (nPatternPos == static_cast<sal_Int32>(nPos) ) || (nPatternPos == LISTBOX_ENTRY_NOTFOUND);
|
||||
|
||||
for( long i = 0; i < nCount && bDifferent; i++ )
|
||||
{
|
||||
if( aName == m_pPatternList->GetBitmap( i )->GetName()
|
||||
&& aName != aOldName )
|
||||
bDifferent = false;
|
||||
}
|
||||
|
||||
if( bDifferent )
|
||||
if( bValidPatternName )
|
||||
{
|
||||
bLoop = false;
|
||||
|
||||
@@ -679,4 +647,21 @@ void SvxPatternTabPage::PointChanged( vcl::Window* pWindow, RectPoint )
|
||||
}
|
||||
}
|
||||
|
||||
sal_Int32 SvxPatternTabPage::SearchPatternList(const OUString& rPatternName)
|
||||
{
|
||||
long nCount = m_pPatternList->Count();
|
||||
bool bValidPatternName = true;
|
||||
sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
|
||||
|
||||
for(long i = 0;i < nCount && bValidPatternName;i++)
|
||||
{
|
||||
if(rPatternName == m_pPatternList->GetBitmap( i )->GetName())
|
||||
{
|
||||
nPos = i;
|
||||
bValidPatternName = false;
|
||||
}
|
||||
}
|
||||
return nPos;
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
||||
+99
-184
@@ -3,216 +3,131 @@
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.0"/>
|
||||
<!-- interface-requires LibreOffice 1.0 -->
|
||||
<object class="GtkListStore" id="liststoreLB_AREA_TYPE">
|
||||
<columns>
|
||||
<!-- column-name gchararray1 -->
|
||||
<column type="gchararray"/>
|
||||
<!-- column-name guint1 -->
|
||||
<column type="guint"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">None</col>
|
||||
<col id="1">0</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Color</col>
|
||||
<col id="1">0</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Gradient</col>
|
||||
<col id="1">0</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Hatching</col>
|
||||
<col id="1">0</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Bitmap</col>
|
||||
<col id="1">0</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkBox" id="AreaTabPage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="Fill Frame">
|
||||
<object class="GtkBox" id="box1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment1">
|
||||
<object class="GtkButtonBox" id="buttonbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="left_padding">12</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="spacing">12</property>
|
||||
<property name="layout_style">center</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="box1">
|
||||
<object class="GtkButton" id="btnnone">
|
||||
<property name="label" translatable="yes">None</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="LB_AREA_TYPE">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="model">liststoreLB_AREA_TYPE</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="boxLB_FILL">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="svxlo-ColorLB" id="LB_COLOR:border">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="dropdown">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="svxlo-GradientLB" id="LB_GRADIENT:border">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="dropdown">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="svxlo-HatchingLB" id="LB_HATCHING:border">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="dropdown">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="svxlo-BitmapLB" id="LB_BITMAP:border">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="vexpand">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="svxlo-SvxXRectPreview" id="CTL_COLOR_PREVIEW">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="CTL_COLOR_PREVIEW-atkobject">
|
||||
<property name="AtkObject::accessible-name" translatable="yes">Example</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="svxlo-SvxXRectPreview" id="CTL_BITMAP_PREVIEW">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="CTL_BITMAP_PREVIEW-atkobject">
|
||||
<property name="AtkObject::accessible-name" translatable="yes">Example</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="btncolor">
|
||||
<property name="label" translatable="yes">Color</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="btngradient">
|
||||
<property name="label" translatable="yes">Gradient</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="btnhatch">
|
||||
<property name="label" translatable="yes">Hatch</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="btnbitmap">
|
||||
<property name="label" translatable="yes">Bitmap</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="btnpattern">
|
||||
<property name="label" translatable="yes">Pattern</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label1">
|
||||
<child>
|
||||
<object class="GtkBox" id="fillstylebox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Fill</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkSizeGroup" id="sizegroup1">
|
||||
<widgets>
|
||||
<widget name="LB_AREA_TYPE"/>
|
||||
<widget name="LB_COLOR:border"/>
|
||||
<widget name="LB_GRADIENT:border"/>
|
||||
<widget name="LB_HATCHING:border"/>
|
||||
<widget name="LB_BITMAP:border"/>
|
||||
<widget name="CTL_COLOR_PREVIEW"/>
|
||||
<widget name="CTL_BITMAP_PREVIEW"/>
|
||||
</widgets>
|
||||
</object>
|
||||
</interface>
|
||||
|
||||
Reference in New Issue
Block a user