diff options
author | Olivier Hallot <olivier.hallot@edx.srv.br> | 2013-08-02 08:28:46 -0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-08-02 19:14:16 +0000 |
commit | 241c670f06047a2298b6f2b0d80f898f530a6a33 (patch) | |
tree | 7560d24e645916311777bc37c889adf32cfa2812 /cui | |
parent | f3d2b533122f918929f3ef5a77af4972582a5960 (diff) |
Convert line tab page to widget UI
Change-Id: I26ee6e0b5b6d17dfb9a65d16aaee0db1b64f5e05
Reviewed-on: https://gerrit.libreoffice.org/5244
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/UIConfig_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/inc/cuitabline.hxx | 61 | ||||
-rw-r--r-- | cui/source/inc/helpid.hrc | 2 | ||||
-rw-r--r-- | cui/source/tabpages/tabline.hrc | 56 | ||||
-rw-r--r-- | cui/source/tabpages/tabline.src | 402 | ||||
-rw-r--r-- | cui/source/tabpages/tpline.cxx | 772 | ||||
-rw-r--r-- | cui/uiconfig/ui/linetabpage.ui | 826 |
7 files changed, 1199 insertions, 921 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 99424f81952e..8ab2bcc6d3b8 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -38,6 +38,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/insertoleobject \ cui/uiconfig/ui/insertplugin \ cui/uiconfig/ui/insertrowcolumn \ + cui/uiconfig/ui/linetabpage \ cui/uiconfig/ui/macroselectordialog \ cui/uiconfig/ui/messbox \ cui/uiconfig/ui/namedialog \ diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx index 5207b7a04611..58329cd9b601 100644 --- a/cui/source/inc/cuitabline.hxx +++ b/cui/source/inc/cuitabline.hxx @@ -87,36 +87,32 @@ class SvxLineTabPage : public SvxTabPage using TabPage::ActivatePage; using TabPage::DeactivatePage; private: - FixedLine aFlLine; - FixedText aFtLineStyle; - LineLB aLbLineStyle; - FixedText aFtColor; - ColorLB aLbColor; - FixedText aFtLineWidth; - MetricField aMtrLineWidth; - FixedText aFtTransparent; - MetricField aMtrTransparent; - FixedLine aFlLineEnds; - LineEndLB aLbStartStyle; - MetricField aMtrStartWidth; - TriStateBox aTsbCenterStart; - FixedText aFtLineEndsStyle; - LineEndLB aLbEndStyle; - FixedText aFtLineEndsWidth; - MetricField aMtrEndWidth; - TriStateBox aTsbCenterEnd; - CheckBox aCbxSynchronize; - FixedLine aFLSeparator; - SvxXLinePreview aCtlPreview; + VclBox* m_pBoxStyle; + LineLB* m_pLbLineStyle; + ColorLB* m_pLbColor; + MetricField* m_pMtrLineWidth; + MetricField* m_pMtrTransparent; + + VclFrame* m_pFlLineEnds; + VclBox* m_pBoxArrowStyles; + LineEndLB* m_pLbStartStyle; + VclBox* m_pBoxStart; + MetricField* m_pMtrStartWidth; + TriStateBox* m_pTsbCenterStart; + VclBox* m_pBoxEnd; + LineEndLB* m_pLbEndStyle; + MetricField* m_pMtrEndWidth; + TriStateBox* m_pTsbCenterEnd; + CheckBox* m_pCbxSynchronize; + SvxXLinePreview* m_pCtlPreview; // #116827# - FixedLine maFLEdgeStyle; - FixedText maFTEdgeStyle; - LineEndLB maLBEdgeStyle; + VclFrame* m_pFLEdgeStyle; + VclGrid* m_pGridEdgeCaps; + ListBox* m_pLBEdgeStyle; // LineCaps - FixedText maFTCapStyle; - LineEndLB maLBCapStyle; + ListBox* m_pLBCapStyle; //#58425# symbols on a line (e. g. StarChart) -> /** a list of symbols to be shown in menu. Symbol at position SID_ATTR_SYMBOLTYPE is to be shown in preview. @@ -129,13 +125,12 @@ private: long nSymbolType; /// attributes for the shown symbols; only necessary if not equal to line properties SfxItemSet* pSymbolAttr; - FixedLine aFlSymbol; - MenuButton aSymbolMB; - FixedText aSymbolWidthFT; - MetricField aSymbolWidthMF; - FixedText aSymbolHeightFT; - MetricField aSymbolHeightMF; - CheckBox aSymbolRatioCB; + VclFrame* m_pFlSymbol; + VclGrid* m_pGridIconSize; + MenuButton* m_pSymbolMB; + MetricField* m_pSymbolWidthMF; + MetricField* m_pSymbolHeightMF; + CheckBox* m_pSymbolRatioCB; std::vector<OUString> aGrfNames; SvxBmpItemInfoList aGrfBrushItems; sal_Bool bLastWidthModified; diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc index b6ffdaa0dd41..d11061d014af 100644 --- a/cui/source/inc/helpid.hrc +++ b/cui/source/inc/helpid.hrc @@ -246,7 +246,7 @@ #define HID_TPSHADOW_CTRL "CUI_HID_TPSHADOW_CTRL" #define HID_LINE_ENDDEF "CUI_HID_LINE_ENDDEF" -#define HID_LINE_LINE "CUI_HID_LINE_LINE" + #define HID_LINE_DEF "CUI_HID_LINE_DEF" #define HID_SPELLDLG_SETWORD "CUI_HID_SPELLDLG_SETWORD" #define HID_PAGE_TEXTATTR "CUI_HID_PAGE_TEXTATTR" diff --git a/cui/source/tabpages/tabline.hrc b/cui/source/tabpages/tabline.hrc index 8fab6b60a6d4..9492a14a4c32 100644 --- a/cui/source/tabpages/tabline.hrc +++ b/cui/source/tabpages/tabline.hrc @@ -18,27 +18,6 @@ */ #define TAB_CONTROL 1 -#define LB_COLOR 1 -#define FT_COLOR 1 -#define LB_LINE_STYLE 2 -#define FT_LINE_STYLE 3 -#define FT_LINE_WIDTH 2 -#define MTR_FLD_LINE_WIDTH 1 -#define TSB_INVISIBLE 1 -#define FL_LINE 1 -#define FL_LINE_ENDS 2 -#define FT_LINE_ENDS_STYLE 5 -#define FT_LINE_ENDS_WIDTH 6 -#define LB_START_STYLE 3 -#define LB_END_STYLE 4 - -#define STR_STYLE (LB_END_STYLE+1) -#define STR_LB_START_STYLE 30 -#define STR_LB_END_STYLE 31 -#define STR_MTR_FLD_START_WIDTH 32 -#define STR_MTR_FLD_END_WIDTH 33 -#define STR_CENTER_START 34 -#define STR_CENTER_END 35 #define STR_START_TYPE 36 #define STR_END_TYPE 37 #define STR_START_NUM 38 @@ -46,8 +25,6 @@ #define STR_START_LENGTH 40 #define STR_END_LENGTH 41 -#define MTR_FLD_START_WIDTH 3 -#define MTR_FLD_END_WIDTH 2 #define CBX_SYNCHRONIZE 1 #define CTL_POSITION 2 #define FT_POSITION 9 @@ -75,40 +52,7 @@ #define LB_LINEENDS 1 #define FL_TIP 1 #define FI_TIP 10 -#define TSB_CENTER_START 4 -#define TSB_CENTER_END 5 -#define FT_TRANSPARENT 10 -#define MTR_LINE_TRANSPARENT 5 -#define FL_SEPARATOR 4 #define FT_LINE_END_STYLE 11 #define FT_TITLE 12 -// #116827# -#define FL_EDGE_STYLE 5 -#define FT_EDGE_STYLE 13 -#define LB_EDGE_STYLE 5 - -// since LO3.6 -#define FT_CAP_STYLE 14 -#define LB_CAP_STYLE 6 -// not sure about IAccessibility2, add it nevertheless -#define STR_LB_CAP_STYLE 42 - -//Symbole (fuer StarChart) -#define FT_SYMBOL_WIDTH 20 -#define FT_SYMBOL_HEIGHT 21 -#define MF_SYMBOL_WIDTH 22 -#define MF_SYMBOL_HEIGHT 23 -#define CB_SYMBOL_RATIO 24 -#define FL_SYMBOL_FORMAT 25 -#define MB_SYMBOL_BITMAP 26 - - -#define MN_GRAPHIC_DLG 1 -#define MN_GALLERY 2 -#define MN_SYMBOLS 3 -#define MN_SYMBOLS_NONE 4 -#define MN_SYMBOLS_AUTO 5 -#define MN_GALLERY_ENTRY 100 - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/tabpages/tabline.src b/cui/source/tabpages/tabline.src index 52256849f18b..258e595219a7 100644 --- a/cui/source/tabpages/tabline.src +++ b/cui/source/tabpages/tabline.src @@ -26,408 +26,6 @@ #define MASKCOLOR MaskColor = Color{ Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }; - -TabPage RID_SVXPAGE_LINE -{ - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ); - HelpId = HID_LINE_LINE ; - Hide = TRUE ; - Text [ en-US ] = "Lines" ; - FixedLine FL_LINE - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 112 , 8 ) ; - Text [ en-US ] = "Line properties" ; - }; - FixedText FT_LINE_STYLE - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 100 , 8 ) ; - Text [ en-US ] = "~Style" ; - }; - ListBox LB_LINE_STYLE - { - HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_LINE_STYLE"; - Border = TRUE ; - Pos = MAP_APPFONT ( 12 , 25 ) ; - Size = MAP_APPFONT ( 100 , 100 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - DDExtraWidth = TRUE ; - }; - FixedText FT_COLOR - { - Pos = MAP_APPFONT ( 12 , 41 ) ; - Size = MAP_APPFONT ( 100 , 8 ) ; - Text [ en-US ] = "Colo~r" ; - }; - ListBox LB_COLOR - { - HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_COLOR"; - Border = TRUE ; - Pos = MAP_APPFONT ( 12 , 52 ) ; - Size = MAP_APPFONT ( 100 , 100 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - DDExtraWidth = TRUE ; - }; - FixedText FT_LINE_WIDTH - { - Pos = MAP_APPFONT ( 12 , 68 ) ; - Size = MAP_APPFONT ( 100 , 8 ) ; - Text [ en-US ] = "~Width" ; - }; - MetricField MTR_FLD_LINE_WIDTH - { - HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MTR_FLD_LINE_WIDTH"; - Border = TRUE ; - Pos = MAP_APPFONT ( 12 , 79 ) ; - Size = MAP_APPFONT ( 50 , 12 ) ; - TabStop = TRUE ; - Right = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Maximum = 5000 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Value = 1 ; - Unit = FUNIT_MM ; - Last = 5000 ; - SpinSize = 10 ; - }; - FixedText FT_TRANSPARENT - { - Pos = MAP_APPFONT ( 12 , 95 ) ; - Size = MAP_APPFONT ( 100 , 8 ) ; - Text [ en-US ] = "~Transparency" ; - }; - MetricField MTR_LINE_TRANSPARENT - { - HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MTR_LINE_TRANSPARENT"; - Border = TRUE ; - Pos = MAP_APPFONT ( 12 , 106 ) ; - Size = MAP_APPFONT ( 50 , 12 ) ; - TabStop = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Maximum = 100 ; - StrictFormat = TRUE ; - Unit = FUNIT_CUSTOM ; - CustomUnitText = "%" ; - Last = 100 ; - SpinSize = 5 ; - }; - FixedLine FL_SEPARATOR - { - Pos = MAP_APPFONT ( 118 , 14 ) ; - Size = MAP_APPFONT ( 6 , 111 ) ; - Vert = TRUE; - }; - FixedLine FL_LINE_ENDS - { - Pos = MAP_APPFONT ( 124 , 3 ) ; - Size = MAP_APPFONT ( 130 , 8 ) ; - Text [ en-US ] = "Arrow styles" ; - }; - FixedText FT_LINE_ENDS_STYLE - { - Pos = MAP_APPFONT ( 130 , 14 ) ; - Size = MAP_APPFONT ( 118 , 8 ) ; - Text [ en-US ] = "St~yle" ; - }; - ListBox LB_START_STYLE - { - HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_START_STYLE"; - Border = TRUE ; - Pos = MAP_APPFONT ( 130 , 25 ) ; - Size = MAP_APPFONT ( 57 , 99 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - DDExtraWidth = TRUE ; - }; - ListBox LB_END_STYLE - { - HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_END_STYLE"; - Border = TRUE ; - Pos = MAP_APPFONT ( 191 , 25 ) ; - Size = MAP_APPFONT ( 57 , 100 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - DDExtraWidth = TRUE ; - }; - FixedText FT_LINE_ENDS_WIDTH - { - Pos = MAP_APPFONT ( 130 , 41 ) ; - Size = MAP_APPFONT ( 118 , 8 ) ; - Text [ en-US ] = "Wi~dth" ; - }; - MetricField MTR_FLD_START_WIDTH - { - HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MTR_FLD_START_WIDTH"; - Border = TRUE ; - Pos = MAP_APPFONT ( 130 , 52 ) ; - Size = MAP_APPFONT ( 45 , 12 ) ; - TabStop = TRUE ; - Right = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Maximum = 5000 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Value = 1 ; - Unit = FUNIT_MM ; - Last = 5000 ; - SpinSize = 10 ; - }; - MetricField MTR_FLD_END_WIDTH - { - HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MTR_FLD_END_WIDTH"; - Border = TRUE ; - Pos = MAP_APPFONT ( 191 , 52 ) ; - Size = MAP_APPFONT ( 45 , 12 ) ; - TabStop = TRUE ; - Right = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Maximum = 5000 ; - StrictFormat = TRUE ; - DecimalDigits = 2 ; - Value = 1 ; - Unit = FUNIT_MM ; - Last = 5000 ; - SpinSize = 10 ; - }; - TriStateBox TSB_CENTER_START - { - HelpID = "cui:TriStateBox:RID_SVXPAGE_LINE:TSB_CENTER_START"; - Pos = MAP_APPFONT ( 130 , 68 ) ; - Size = MAP_APPFONT ( 57 , 10 ) ; - Text [ en-US ] = "Ce~nter" ; - TabStop = TRUE ; - }; - TriStateBox TSB_CENTER_END - { - HelpID = "cui:TriStateBox:RID_SVXPAGE_LINE:TSB_CENTER_END"; - Pos = MAP_APPFONT ( 191 , 68 ) ; - Size = MAP_APPFONT ( 57 , 10 ) ; - Text [ en-US ] = "C~enter" ; - TabStop = TRUE ; - }; - CheckBox CBX_SYNCHRONIZE - { - HelpID = "cui:CheckBox:RID_SVXPAGE_LINE:CBX_SYNCHRONIZE"; - // #116827# - // Pos = MAP_APPFONT ( 130 , 107 ) ; - Pos = MAP_APPFONT ( 130 , 68 + (16 - 4) ) ; - Size = MAP_APPFONT ( 118 , 10 ) ; - Text [ en-US ] = "Synchroni~ze ends" ; - TabStop = TRUE ; - }; - - ////////////////////////////////////////////////////////////////////////////// - // #116827# - - FixedLine FL_EDGE_STYLE - { - Pos = MAP_APPFONT ( 124 , 3 + (16 * 6) - 4 ) ; - Size = MAP_APPFONT ( 130 , 8 ) ; - Text [ en-US ] = "Corner and cap styles" ; - }; - FixedText FT_EDGE_STYLE - { - Pos = MAP_APPFONT ( 130 , 14 + (16 * 6) - 4 ) ; - Size = MAP_APPFONT ( 118 , 8 ) ; - Text [ en-US ] = "~Corner style" ; - }; - ListBox LB_EDGE_STYLE - { - HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_EDGE_STYLE"; - Border = TRUE ; - Pos = MAP_APPFONT ( 130 , 25 + (16 * 6) - 4 ) ; - Size = MAP_APPFONT ( 57 , 99 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - StringList [ en-US ] = - { - < "Rounded" ; Default ; > ; - < "- none -" ; > ; - < "Mitered" ; > ; - < "Beveled" ; > ; - }; - }; - FixedText FT_CAP_STYLE - { - Pos = MAP_APPFONT ( 191 , 14 + (16 * 6) - 4 ) ; - Size = MAP_APPFONT ( 118 , 8 ) ; - Text [ en-US ] = "Ca~p style" ; - }; - ListBox LB_CAP_STYLE - { - HelpID = "cui:ListBox:RID_SVXPAGE_LINE:LB_CAP_STYLE"; - Border = TRUE ; - Pos = MAP_APPFONT ( 191 , 25 + (16 * 6) - 4 ) ; - Size = MAP_APPFONT ( 57 , 99 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - StringList [ en-US ] = - { - < "Flat" ; Default ; > ; // Same string as in Excel - < "Round" ; > ; - < "Square" ; > ; - }; - }; - - ////////////////////////////////////////////////////////////////////////////// - - Control CTL_PREVIEW - { - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 135 ) ; - Size = MAP_APPFONT ( 248 , 40 ) ; - }; - - //#58425# Symbole auf einer Linie (z.B. StarChart) -> - FixedLine FL_SYMBOL_FORMAT - { - Hide = TRUE ; - - Pos = MAP_APPFONT ( 124 , 3 ) ; - Size = MAP_APPFONT ( 130 , 8 ) ; - Text [ en-US ] = "Icon"; - }; - - MenuButton MB_SYMBOL_BITMAP - { - HelpID = "cui:MenuButton:RID_SVXPAGE_LINE:MB_SYMBOL_BITMAP"; - Hide = TRUE ; - Pos = MAP_APPFONT ( 130 , 14 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - ButtonMenu = Menu - { - ItemList = - { - MenuItem - { - Identifier = MN_SYMBOLS_NONE; - Text [ en-US ] = "No Symbol"; - }; - MenuItem - { - Identifier = MN_SYMBOLS_AUTO; - Text [ en-US ] = "Automatic"; - }; - MenuItem - { - Identifier = MN_GRAPHIC_DLG ; - Text [ en-US ] = "From file..." ; - }; - MenuItem - { - Identifier = MN_GALLERY ; - Text [ en-US ] = "Gallery"; - }; - MenuItem - { - Identifier = MN_SYMBOLS; - Text [ en-US ] = "Symbols"; - }; - }; - }; - Text [ en-US ] = "Select..." ; - }; - FixedText FT_SYMBOL_WIDTH - { - Hide = TRUE ; - Pos = MAP_APPFONT ( 130 , 32 ) ; - Size = MAP_APPFONT ( 57 , 8 ) ; - Text [ en-US ] = "Width" ; - }; - MetricField MF_SYMBOL_WIDTH - { - HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MF_SYMBOL_WIDTH"; - Pos = MAP_APPFONT ( 191 , 30 ); - Size = MAP_APPFONT ( 57 , 12 ) ; - Border = TRUE ; - TabStop = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 0 ; - Maximum = 1999 ; - DecimalDigits = 2 ; - Value = 0 ; - Unit = FUNIT_CM ; - First = 0 ; - Last = 1999 ; - SpinSize = 5 ; - Hide = TRUE ; - }; - FixedText FT_SYMBOL_HEIGHT - { - Hide = TRUE ; - Pos = MAP_APPFONT ( 130 , 48 ) ; - Size = MAP_APPFONT ( 57 , 8 ) ; - Text [ en-US ] = "Height" ; - }; - MetricField MF_SYMBOL_HEIGHT - { - HelpID = "cui:MetricField:RID_SVXPAGE_LINE:MF_SYMBOL_HEIGHT"; - Pos = MAP_APPFONT ( 191 , 46 ); - Size = MAP_APPFONT ( 57 , 12 ) ; - Border = TRUE ; - TabStop = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 0 ; - Maximum = 1999 ; - DecimalDigits = 2 ; - Value = 0 ; - Unit = FUNIT_CM ; - First = 0 ; - Last = 1999 ; - SpinSize = 5 ; - Hide = TRUE ; - }; - CheckBox CB_SYMBOL_RATIO - { - HelpID = "cui:CheckBox:RID_SVXPAGE_LINE:CB_SYMBOL_RATIO"; - Hide = TRUE ; - Pos = MAP_APPFONT ( 130 , 62 ); - Size = MAP_APPFONT ( 118 , 10 ) ; - Text [ en-US ] = "Keep ratio" ; - }; - String STR_STYLE - { - Text [ en-US ] = "Style" ; - }; - String STR_LB_START_STYLE - { - Text [ en-US ] = "Start style" ; - }; - String STR_LB_END_STYLE - { - Text [ en-US ] = "End style" ; - }; - String STR_MTR_FLD_START_WIDTH - { - Text [ en-US ] = "Start width" ; - }; - String STR_MTR_FLD_END_WIDTH - { - Text [ en-US ] = "End width" ; - }; - String STR_CENTER_START - { - Text [ en-US ] = "Start with center" ; - }; - String STR_CENTER_END - { - Text [ en-US ] = "End with center" ; - }; -}; - // Defining LineStyles -------------------- TabPage RID_SVXPAGE_LINE_DEF diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index 465924cb9a79..4aa9f57ba6fa 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -35,6 +35,7 @@ #include "svx/dlgutil.hxx" #include "svx/svxgrahicitem.hxx" #include <sfx2/request.hxx> +#include <sfx2/dialoghelper.hxx> #include "svx/ofaitem.hxx" #include <svx/svdobj.hxx> #include <svx/svdview.hxx> @@ -55,6 +56,13 @@ #define MAX_BMP_WIDTH 16 #define MAX_BMP_HEIGHT 16 +#define MN_GALLERY 4 +#define MN_SYMBOLS 5 +#define MN_SYMBOLS_NONE 1 +#define MN_SYMBOLS_AUTO 2 +#define MN_GALLERY_ENTRY 100 + + // static ---------------------------------------------------------------- static sal_uInt16 pLineRanges[] = @@ -71,51 +79,16 @@ SvxLineTabPage::SvxLineTabPage Window* pParent, const SfxItemSet& rInAttrs ) : - SvxTabPage ( pParent, CUI_RES( RID_SVXPAGE_LINE ), rInAttrs ), - aFlLine ( this, CUI_RES( FL_LINE ) ), - aFtLineStyle ( this, CUI_RES( FT_LINE_STYLE ) ), - aLbLineStyle ( this, CUI_RES( LB_LINE_STYLE ) ), - aFtColor ( this, CUI_RES( FT_COLOR ) ), - aLbColor ( this, CUI_RES( LB_COLOR ) ), - aFtLineWidth ( this, CUI_RES( FT_LINE_WIDTH ) ), - aMtrLineWidth ( this, CUI_RES( MTR_FLD_LINE_WIDTH ) ), - aFtTransparent ( this, CUI_RES( FT_TRANSPARENT ) ), - aMtrTransparent ( this, CUI_RES( MTR_LINE_TRANSPARENT ) ), - aFlLineEnds ( this, CUI_RES( FL_LINE_ENDS ) ), - aLbStartStyle ( this, CUI_RES( LB_START_STYLE ) ), - aMtrStartWidth ( this, CUI_RES( MTR_FLD_START_WIDTH ) ), - aTsbCenterStart ( this, CUI_RES( TSB_CENTER_START ) ), - aFtLineEndsStyle ( this, CUI_RES( FT_LINE_ENDS_STYLE ) ), - aLbEndStyle ( this, CUI_RES( LB_END_STYLE ) ), - aFtLineEndsWidth ( this, CUI_RES( FT_LINE_ENDS_WIDTH ) ), - aMtrEndWidth ( this, CUI_RES( MTR_FLD_END_WIDTH ) ), - aTsbCenterEnd ( this, CUI_RES( TSB_CENTER_END ) ), - aCbxSynchronize ( this, CUI_RES( CBX_SYNCHRONIZE ) ), - aFLSeparator ( this, CUI_RES( FL_SEPARATOR ) ), - aCtlPreview ( this, CUI_RES( CTL_PREVIEW ) ), - - // #116827# - maFLEdgeStyle ( this, CUI_RES( FL_EDGE_STYLE ) ), - maFTEdgeStyle ( this, CUI_RES( FT_EDGE_STYLE ) ), - maLBEdgeStyle ( this, CUI_RES( LB_EDGE_STYLE ) ), - - // LineCaps - maFTCapStyle ( this, CUI_RES( FT_CAP_STYLE ) ), - maLBCapStyle ( this, CUI_RES( LB_CAP_STYLE ) ), + SvxTabPage ( pParent + ,"LineTabPage" + ,"cui/ui/linetabpage.ui" + , rInAttrs ), pSymbolList(NULL), bNewSize(false), nNumMenuGalleryItems(0), nSymbolType(SVX_SYMBOLTYPE_UNKNOWN), // unknown respectively unchanged pSymbolAttr(NULL), - //#58425# Symbols on a line (e.g. StarChart) - aFlSymbol ( this, CUI_RES(FL_SYMBOL_FORMAT)), - aSymbolMB ( this, CUI_RES(MB_SYMBOL_BITMAP)), - aSymbolWidthFT ( this, CUI_RES(FT_SYMBOL_WIDTH)), - aSymbolWidthMF ( this, CUI_RES(MF_SYMBOL_WIDTH)), - aSymbolHeightFT ( this, CUI_RES(FT_SYMBOL_HEIGHT)), - aSymbolHeightMF ( this, CUI_RES(MF_SYMBOL_HEIGHT)), - aSymbolRatioCB ( this, CUI_RES(CB_SYMBOL_RATIO)), bLastWidthModified(sal_False), aSymbolLastSize(Size(0,0)), @@ -136,17 +109,38 @@ SvxLineTabPage::SvxLineTabPage pnColorListState( 0 ), nPageType ( 0 ) { - aLbEndStyle.SetAccessibleName(OUString(CUI_RES(STR_STYLE))); - aLbStartStyle.SetAccessibleName(OUString(CUI_RES( STR_LB_START_STYLE ) ) ); - aMtrStartWidth.SetAccessibleName(OUString(CUI_RES( STR_MTR_FLD_START_WIDTH ) ) ); - aLbEndStyle.SetAccessibleName(OUString(CUI_RES( STR_LB_END_STYLE ) ) ); - aMtrEndWidth.SetAccessibleName(OUString(CUI_RES( STR_MTR_FLD_END_WIDTH ) ) ); - aTsbCenterStart.SetAccessibleName(OUString(CUI_RES( STR_CENTER_START ) ) ); - aTsbCenterEnd.SetAccessibleName(OUString(CUI_RES( STR_CENTER_END ) ) ); - - FreeResource(); + get(m_pLbLineStyle,"LB_LINE_STYLE"); + get(m_pLbColor,"LB_COLOR"); + get(m_pBoxStyle,"boxSTYLE_ATTR"); + get(m_pMtrLineWidth,"MTR_FLD_LINE_WIDTH"); + get(m_pMtrTransparent,"MTR_LINE_TRANSPARENT"); + + get(m_pFlLineEnds,"FL_LINE_ENDS"); + get(m_pBoxArrowStyles,"boxARROW_STYLES"); + get(m_pLbStartStyle,"LB_START_STYLE"); + get(m_pBoxStart,"boxSTART"); + get(m_pMtrStartWidth,"MTR_FLD_START_WIDTH"); + get(m_pTsbCenterStart,"TSB_CENTER_START"); + get(m_pBoxEnd,"boxEND"); + get(m_pLbEndStyle,"LB_END_STYLE"); + get(m_pMtrEndWidth,"MTR_FLD_END_WIDTH"); + get(m_pTsbCenterEnd,"TSB_CENTER_END"); + get(m_pCbxSynchronize,"CBX_SYNCHRONIZE"); + get(m_pCtlPreview,"CTL_PREVIEW"); + + get(m_pGridEdgeCaps,"gridEDGE_CAPS"); + get(m_pFLEdgeStyle,"FL_EDGE_STYLE"); + get(m_pLBEdgeStyle,"LB_EDGE_STYLE"); + // LineCaps + get(m_pLBCapStyle,"LB_CAP_STYLE"); - aCtlPreview.SetAccessibleName(OUString(CUI_RES(STR_EXAMPLE))); + //#58425# Symbols on a line (e.g. StarChart) + get(m_pFlSymbol,"FL_SYMBOL_FORMAT"); + get(m_pGridIconSize,"gridICON_SIZE"); + get(m_pSymbolMB,"MB_SYMBOL_BITMAP"); + get(m_pSymbolWidthMF,"MF_SYMBOL_WIDTH"); + get(m_pSymbolHeightMF,"MF_SYMBOL_HEIGHT"); + get(m_pSymbolRatioCB,"CB_SYMBOL_RATIO"); // This Page requires ExchangeSupport SetExchangeSupport(); @@ -161,61 +155,57 @@ SvxLineTabPage::SvxLineTabPage eFUnit = FUNIT_MM; // no break -> we now have mm case FUNIT_MM: - aMtrLineWidth.SetSpinSize( 50 ); - aMtrStartWidth.SetSpinSize( 50 ); - aMtrEndWidth.SetSpinSize( 50 ); + m_pMtrLineWidth->SetSpinSize( 50 ); + m_pMtrStartWidth->SetSpinSize( 50 ); + m_pMtrEndWidth->SetSpinSize( 50 ); break; case FUNIT_INCH: - aMtrLineWidth.SetSpinSize( 2 ); - aMtrStartWidth.SetSpinSize( 2 ); - aMtrEndWidth.SetSpinSize( 2 ); + m_pMtrLineWidth->SetSpinSize( 2 ); + m_pMtrStartWidth->SetSpinSize( 2 ); + m_pMtrEndWidth->SetSpinSize( 2 ); break; default: ;// prevent warning } - SetFieldUnit( aMtrLineWidth, eFUnit ); - SetFieldUnit( aMtrStartWidth, eFUnit ); - SetFieldUnit( aMtrEndWidth, eFUnit ); + SetFieldUnit( *m_pMtrLineWidth, eFUnit ); + SetFieldUnit( *m_pMtrStartWidth, eFUnit ); + SetFieldUnit( *m_pMtrEndWidth, eFUnit ); // determine PoolUnit SfxItemPool* pPool = rOutAttrs.GetPool(); DBG_ASSERT( pPool, "Where is the pool?" ); ePoolUnit = pPool->GetMetric( SID_ATTR_LINE_WIDTH ); - aLbLineStyle.SetSelectHdl( - LINK( this, SvxLineTabPage, ClickInvisibleHdl_Impl ) ); - aLbColor.SetSelectHdl( - LINK( this, SvxLineTabPage, ChangePreviewHdl_Impl ) ); - aMtrLineWidth.SetModifyHdl( - LINK( this, SvxLineTabPage, ChangePreviewHdl_Impl ) ); - aMtrTransparent.SetModifyHdl( - LINK( this, SvxLineTabPage, ChangeTransparentHdl_Impl ) ); + m_pLbLineStyle->SetSelectHdl( LINK( this, SvxLineTabPage, ClickInvisibleHdl_Impl ) ); + m_pLbColor->SetSelectHdl( LINK( this, SvxLineTabPage, ChangePreviewHdl_Impl ) ); + m_pMtrLineWidth->SetModifyHdl( LINK( this, SvxLineTabPage, ChangePreviewHdl_Impl ) ); + m_pMtrTransparent->SetModifyHdl( LINK( this, SvxLineTabPage, ChangeTransparentHdl_Impl ) ); Link aStart = LINK( this, SvxLineTabPage, ChangeStartHdl_Impl ); Link aEnd = LINK( this, SvxLineTabPage, ChangeEndHdl_Impl ); - aLbStartStyle.SetSelectHdl( aStart ); - aLbEndStyle.SetSelectHdl( aEnd ); - aMtrStartWidth.SetModifyHdl( aStart ); - aMtrEndWidth.SetModifyHdl( aEnd ); - aTsbCenterStart.SetClickHdl( aStart ); - aTsbCenterEnd.SetClickHdl( aEnd ); + m_pLbStartStyle->SetSelectHdl( aStart ); + m_pLbEndStyle->SetSelectHdl( aEnd ); + m_pMtrStartWidth->SetModifyHdl( aStart ); + m_pMtrEndWidth->SetModifyHdl( aEnd ); + m_pTsbCenterStart->SetClickHdl( aStart ); + m_pTsbCenterEnd->SetClickHdl( aEnd ); // #116827# Link aEdgeStyle = LINK( this, SvxLineTabPage, ChangeEdgeStyleHdl_Impl ); - maLBEdgeStyle.SetSelectHdl( aEdgeStyle ); + m_pLBEdgeStyle->SetSelectHdl( aEdgeStyle ); // LineCaps Link aCapStyle = LINK( this, SvxLineTabPage, ChangeCapStyleHdl_Impl ); - maLBCapStyle.SetSelectHdl( aCapStyle ); + m_pLBCapStyle->SetSelectHdl( aCapStyle ); // Symbols on a line (eg star charts), MB-handler set - aSymbolMB.SetSelectHdl(LINK(this, SvxLineTabPage, GraphicHdl_Impl)); - aSymbolMB.SetActivateHdl(LINK(this, SvxLineTabPage, MenuCreateHdl_Impl)); - aSymbolWidthMF.SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl)); - aSymbolHeightMF.SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl)); - aSymbolRatioCB.SetClickHdl(LINK(this, SvxLineTabPage, RatioHdl_Impl)); + m_pSymbolMB->SetSelectHdl(LINK(this, SvxLineTabPage, GraphicHdl_Impl)); + m_pSymbolMB->SetActivateHdl(LINK(this, SvxLineTabPage, MenuCreateHdl_Impl)); + m_pSymbolWidthMF->SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl)); + m_pSymbolHeightMF->SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl)); + m_pSymbolRatioCB->SetClickHdl(LINK(this, SvxLineTabPage, RatioHdl_Impl)); - aSymbolRatioCB.Check(sal_True); + m_pSymbolRatioCB->Check(sal_True); ShowSymbolControls(sal_False); nActLineWidth = -1; @@ -226,24 +216,18 @@ void SvxLineTabPage::ShowSymbolControls(sal_Bool bOn) // Symbols on a line (e.g. StarCharts), symbol-enable controls bSymbols=bOn; - aSymbolWidthFT.Show(bOn); - aSymbolWidthMF.Show(bOn); - aSymbolHeightFT.Show(bOn); - aSymbolHeightMF.Show(bOn); - aFlSymbol.Show(bOn); - aSymbolRatioCB.Show(bOn); - aSymbolMB.Show(bOn); - aCtlPreview.ShowSymbol(bOn); + m_pFlSymbol->Show(bOn); + m_pCtlPreview->ShowSymbol(bOn); } SvxLineTabPage::~SvxLineTabPage() { // Symbols on a line (e.g. StarCharts), dtor new! - delete aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY ); + delete m_pSymbolMB->GetPopupMenu()->GetPopupMenu( MN_GALLERY ); if(pSymbolList) - delete aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_SYMBOLS ); + delete m_pSymbolMB->GetPopupMenu()->GetPopupMenu( MN_SYMBOLS ); for ( size_t i = 0, n = aGrfBrushItems.size(); i < n; ++i ) { @@ -255,7 +239,7 @@ SvxLineTabPage::~SvxLineTabPage() void SvxLineTabPage::Construct() { // Color chart - aLbColor.Fill( pColorList ); + m_pLbColor->Fill( pColorList ); FillListboxes(); } @@ -289,9 +273,11 @@ void SvxLineTabPage::InitSymbols(MenuButton* pButton) SvxBmpItemInfo* pInfo = new SvxBmpItemInfo(); pInfo->pBrushItem = pBrushItem; pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i); - if ( i < aGrfBrushItems.size() ) { + if ( i < aGrfBrushItems.size() ) + { aGrfBrushItems.insert( aGrfBrushItems.begin() + i, pInfo ); - } else { + } else + { aGrfBrushItems.push_back( pInfo ); } const Graphic* pGraphic = pBrushItem->GetGraphic(); @@ -300,8 +286,7 @@ void SvxLineTabPage::InitSymbols(MenuButton* pButton) { Bitmap aBitmap(pGraphic->GetBitmap()); Size aSize(aBitmap.GetSizePixel()); - if(aSize.Width() > MAX_BMP_WIDTH || - aSize.Height() > MAX_BMP_HEIGHT) + if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT) { sal_Bool bWidth = aSize.Width() > aSize.Height(); double nScale = bWidth ? @@ -319,10 +304,10 @@ void SvxLineTabPage::InitSymbols(MenuButton* pButton) pPopup->InsertItem(pInfo->nItemId, *pUIName, aImage ); } } - aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_GALLERY, pPopup ); + m_pSymbolMB->GetPopupMenu()->SetPopupMenu( MN_GALLERY, pPopup ); if(aGrfNames.empty()) - aSymbolMB.GetPopupMenu()->EnableItem(MN_GALLERY, sal_False); + m_pSymbolMB->GetPopupMenu()->EnableItem(MN_GALLERY, sal_False); } if(!pButton->GetPopupMenu()->GetPopupMenu( MN_SYMBOLS ) && pSymbolList) @@ -401,10 +386,10 @@ void SvxLineTabPage::InitSymbols(MenuButton* pButton) pInvisibleSquare=pPage->RemoveObject(0); SdrObject::Free(pInvisibleSquare); - aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup ); + m_pSymbolMB->GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup ); if(aGrfNames.empty()) - aSymbolMB.GetPopupMenu()->EnableItem(MN_SYMBOLS, sal_False); + m_pSymbolMB->GetPopupMenu()->EnableItem(MN_SYMBOLS, sal_False); delete pView; delete pModel; @@ -490,45 +475,42 @@ void SvxLineTabPage::SymbolSelected(MenuButton* pButton) aSymbolSize = aSize; } } - aCtlPreview.SetSymbol(&aSymbolGraphic,aSymbolSize); + m_pCtlPreview->SetSymbol(&aSymbolGraphic,aSymbolSize); } else { aSymbolGraphic=Graphic(); - aCtlPreview.SetSymbol(NULL,aSymbolSize); + m_pCtlPreview->SetSymbol(NULL,aSymbolSize); bEnable = false; } aSymbolLastSize=aSymbolSize; - SetMetricValue(aSymbolWidthMF, aSymbolSize.Width(), ePoolUnit); - SetMetricValue(aSymbolHeightMF, aSymbolSize.Height(), ePoolUnit); - aSymbolRatioCB.Enable(bEnable); - aSymbolHeightFT.Enable(bEnable); - aSymbolWidthFT.Enable(bEnable); - aSymbolWidthMF.Enable(bEnable); - aSymbolHeightMF.Enable(bEnable); - aCtlPreview.Invalidate(); + SetMetricValue(*m_pSymbolWidthMF, aSymbolSize.Width(), ePoolUnit); + SetMetricValue(*m_pSymbolHeightMF, aSymbolSize.Height(), ePoolUnit); + + m_pGridIconSize->Enable(bEnable); + m_pCtlPreview->Invalidate(); } void SvxLineTabPage::FillListboxes() { // Line styles - sal_uInt16 nOldSelect = aLbLineStyle.GetSelectEntryPos(); + sal_uInt16 nOldSelect = m_pLbLineStyle->GetSelectEntryPos(); // aLbLineStyle.FillStyles(); - aLbLineStyle.Fill( pDashList ); - aLbLineStyle.SelectEntryPos( nOldSelect ); + m_pLbLineStyle->Fill( pDashList ); + m_pLbLineStyle->SelectEntryPos( nOldSelect ); // Line end style OUString sNone( SVX_RES( RID_SVXSTR_NONE ) ); - nOldSelect = aLbStartStyle.GetSelectEntryPos(); - aLbStartStyle.Clear(); - aLbStartStyle.InsertEntry( sNone ); - aLbStartStyle.Fill( pLineEndList ); - aLbStartStyle.SelectEntryPos( nOldSelect ); - nOldSelect = aLbEndStyle.GetSelectEntryPos(); - aLbEndStyle.Clear(); - aLbEndStyle.InsertEntry( sNone ); - aLbEndStyle.Fill( pLineEndList, sal_False ); - aLbEndStyle.SelectEntryPos( nOldSelect ); + nOldSelect = m_pLbStartStyle->GetSelectEntryPos(); + m_pLbStartStyle->Clear(); + m_pLbStartStyle->InsertEntry( sNone ); + m_pLbStartStyle->Fill( pLineEndList ); + m_pLbStartStyle->SelectEntryPos( nOldSelect ); + nOldSelect = m_pLbEndStyle->GetSelectEntryPos(); + m_pLbEndStyle->Clear(); + m_pLbEndStyle->InsertEntry( sNone ); + m_pLbEndStyle->Fill( pLineEndList, sal_False ); + m_pLbEndStyle->SelectEntryPos( nOldSelect ); } // ----------------------------------------------------------------------- @@ -548,27 +530,25 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) ( *pnDashListState & CT_CHANGED ) ) { if( *pnDashListState & CT_CHANGED ) - pDashList = ( (SvxLineTabDialog*) GetParentDialog() )-> - GetNewDashList(); + pDashList = ( (SvxLineTabDialog*) GetParentDialog() )->GetNewDashList(); + *pnDashListState = CT_NONE; // Style list - nPos = aLbLineStyle.GetSelectEntryPos(); + nPos = m_pLbLineStyle->GetSelectEntryPos(); - aLbLineStyle.Clear(); - aLbLineStyle.InsertEntry( - SVX_RESSTR( RID_SVXSTR_INVISIBLE ) ); - aLbLineStyle.InsertEntry( - SVX_RESSTR( RID_SVXSTR_SOLID ) ); - aLbLineStyle.Fill( pDashList ); - nCount = aLbLineStyle.GetEntryCount(); + m_pLbLineStyle->Clear(); + m_pLbLineStyle->InsertEntry( SVX_RESSTR( RID_SVXSTR_INVISIBLE ) ); + m_pLbLineStyle->InsertEntry( SVX_RESSTR( RID_SVXSTR_SOLID ) ); + m_pLbLineStyle->Fill( pDashList ); + nCount = m_pLbLineStyle->GetEntryCount(); if ( nCount == 0 ) ; // This case should never occur else if( nCount <= nPos ) - aLbLineStyle.SelectEntryPos( 0 ); + m_pLbLineStyle->SelectEntryPos( 0 ); else - aLbLineStyle.SelectEntryPos( nPos ); + m_pLbLineStyle->SelectEntryPos( nPos ); // SelectStyleHdl_Impl( this ); } @@ -577,57 +557,56 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) aDashURL.Append( pDashList->GetName() ); DBG_ASSERT( aDashURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); // LineEnd list - if( ( *pnLineEndListState & CT_MODIFIED ) || - ( *pnLineEndListState & CT_CHANGED ) ) + if( ( *pnLineEndListState & CT_MODIFIED ) || ( *pnLineEndListState & CT_CHANGED ) ) { if( *pnLineEndListState & CT_CHANGED ) - pLineEndList = ( (SvxLineTabDialog*) GetParentDialog() )-> - GetNewLineEndList(); + pLineEndList = ( (SvxLineTabDialog*) GetParentDialog() )->GetNewLineEndList(); + *pnLineEndListState = CT_NONE; - nPos = aLbLineStyle.GetSelectEntryPos(); + nPos = m_pLbLineStyle->GetSelectEntryPos(); OUString sNone( SVX_RES( RID_SVXSTR_NONE ) ); - aLbStartStyle.Clear(); - aLbStartStyle.InsertEntry( sNone ); + m_pLbStartStyle->Clear(); + m_pLbStartStyle->InsertEntry( sNone ); - aLbStartStyle.Fill( pLineEndList ); - nCount = aLbStartStyle.GetEntryCount(); + m_pLbStartStyle->Fill( pLineEndList ); + nCount = m_pLbStartStyle->GetEntryCount(); if( nCount == 0 ) ; // This case should never occur else if( nCount <= nPos ) - aLbStartStyle.SelectEntryPos( 0 ); + m_pLbStartStyle->SelectEntryPos( 0 ); else - aLbStartStyle.SelectEntryPos( nPos ); + m_pLbStartStyle->SelectEntryPos( nPos ); - aLbEndStyle.Clear(); - aLbEndStyle.InsertEntry( sNone ); + m_pLbEndStyle->Clear(); + m_pLbEndStyle->InsertEntry( sNone ); - aLbEndStyle.Fill( pLineEndList, sal_False ); - nCount = aLbEndStyle.GetEntryCount(); + m_pLbEndStyle->Fill( pLineEndList, sal_False ); + nCount = m_pLbEndStyle->GetEntryCount(); if( nCount == 0 ) ; // This case should never occur else if( nCount <= nPos ) - aLbEndStyle.SelectEntryPos( 0 ); + m_pLbEndStyle->SelectEntryPos( 0 ); else - aLbEndStyle.SelectEntryPos( nPos ); + m_pLbEndStyle->SelectEntryPos( nPos ); } INetURLObject aLineURL( pLineEndList->GetPath() ); aLineURL.Append( pLineEndList->GetName() ); DBG_ASSERT( aLineURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); // Evaluate if another TabPage set another fill type - if( aLbLineStyle.GetSelectEntryPos() != 0 ) + if( m_pLbLineStyle->GetSelectEntryPos() != 0 ) { if( nPageType == 2 ) // 1 { - aLbLineStyle.SelectEntryPos( *pPosDashLb + 2 ); // +2 due to SOLID and INVLISIBLE + m_pLbLineStyle->SelectEntryPos( *pPosDashLb + 2 ); // +2 due to SOLID and INVLISIBLE ChangePreviewHdl_Impl( this ); } if( nPageType == 3 ) { - aLbStartStyle.SelectEntryPos( *pPosLineEndLb + 1 );// +1 due to SOLID - aLbEndStyle.SelectEntryPos( *pPosLineEndLb + 1 );// +1 due to SOLID + m_pLbStartStyle->SelectEntryPos( *pPosLineEndLb + 1 );// +1 due to SOLID + m_pLbEndStyle->SelectEntryPos( *pPosLineEndLb + 1 );// +1 due to SOLID ChangePreviewHdl_Impl( this ); } } @@ -638,16 +617,16 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) if( *pnColorListState & CT_CHANGED ) pColorList = ( (SvxLineTabDialog*) GetParentDialog() )->GetNewColorList(); // aLbColor - sal_uInt16 nColorPos = aLbColor.GetSelectEntryPos(); - aLbColor.Clear(); - aLbColor.Fill( pColorList ); - nCount = aLbColor.GetEntryCount(); + sal_uInt16 nColorPos = m_pLbColor->GetSelectEntryPos(); + m_pLbColor->Clear(); + m_pLbColor->Fill( pColorList ); + nCount = m_pLbColor->GetEntryCount(); if( nCount == 0 ) ; // This case should never occur else if( nCount <= nColorPos ) - aLbColor.SelectEntryPos( 0 ); + m_pLbColor->SelectEntryPos( 0 ); else - aLbColor.SelectEntryPos( nColorPos ); + m_pLbColor->SelectEntryPos( nColorPos ); ChangePreviewHdl_Impl( this ); } @@ -659,25 +638,9 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) else if ( nDlgType == 1100 || nDlgType == 1101 ) { - aFtLineEndsStyle.Hide(); - aFtLineEndsWidth.Hide(); - aLbStartStyle.Hide(); - aMtrStartWidth.Hide(); - aTsbCenterStart.Hide(); - aLbEndStyle.Hide(); - aMtrEndWidth.Hide(); - aTsbCenterEnd.Hide(); - aCbxSynchronize.Hide(); - aFlLineEnds.Hide(); - + m_pFlLineEnds->Hide(); // #116827# - maFLEdgeStyle.Hide(); - maFTEdgeStyle.Hide(); - maLBEdgeStyle.Hide(); - - // LineCaps - maFTCapStyle.Hide(); - maLBCapStyle.Hide(); + m_pFLEdgeStyle->Hide(); } } @@ -688,8 +651,8 @@ int SvxLineTabPage::DeactivatePage( SfxItemSet* _pSet ) if( nDlgType == 0 ) // Line dialog { nPageType = 1; // possibly for extensions - *pPosDashLb = aLbLineStyle.GetSelectEntryPos() - 2;// First entry SOLID!!! - sal_uInt16 nPos = aLbStartStyle.GetSelectEntryPos(); + *pPosDashLb = m_pLbLineStyle->GetSelectEntryPos() - 2;// First entry SOLID!!! + sal_uInt16 nPos = m_pLbStartStyle->GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) nPos--; *pPosLineEndLb = nPos; @@ -712,9 +675,9 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) // To prevent modifications to the list, we do not set other page's items. if( nDlgType != 0 || nPageType != 2 ) { - nPos = aLbLineStyle.GetSelectEntryPos(); + nPos = m_pLbLineStyle->GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND && - nPos != aLbLineStyle.GetSavedValue() ) + nPos != m_pLbLineStyle->GetSavedValue() ) { XLineStyleItem* pStyleItem = NULL; @@ -729,7 +692,7 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) // For added security if( pDashList->Count() > (long) ( nPos - 2 ) ) { - XLineDashItem aDashItem( aLbLineStyle.GetSelectEntry(), + XLineDashItem aDashItem( m_pLbLineStyle->GetSelectEntry(), pDashList->GetDash( nPos - 2 )->GetDash() ); pOld = GetOldItem( rAttrs, XATTR_LINEDASH ); if ( !pOld || !( *(const XLineDashItem*)pOld == aDashItem ) ) @@ -750,9 +713,9 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) } // Line width // GetSavedValue() returns OUString! - if( aMtrLineWidth.GetText() != aMtrLineWidth.GetSavedValue() ) + if( m_pMtrLineWidth->GetText() != m_pMtrLineWidth->GetSavedValue() ) { - XLineWidthItem aItem( GetCoreValue( aMtrLineWidth, ePoolUnit ) ); + XLineWidthItem aItem( GetCoreValue( *m_pMtrLineWidth, ePoolUnit ) ); pOld = GetOldItem( rAttrs, XATTR_LINEWIDTH ); if ( !pOld || !( *(const XLineWidthItem*)pOld == aItem ) ) { @@ -761,9 +724,9 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) } } // Width line start - if( aMtrStartWidth.GetText() != aMtrStartWidth.GetSavedValue() ) + if( m_pMtrStartWidth->GetText() != m_pMtrStartWidth->GetSavedValue() ) { - XLineStartWidthItem aItem( GetCoreValue( aMtrStartWidth, ePoolUnit ) ); + XLineStartWidthItem aItem( GetCoreValue( *m_pMtrStartWidth, ePoolUnit ) ); pOld = GetOldItem( rAttrs, XATTR_LINESTARTWIDTH ); if ( !pOld || !( *(const XLineStartWidthItem*)pOld == aItem ) ) { @@ -772,9 +735,9 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) } } // Width line end - if( aMtrEndWidth.GetText() != aMtrEndWidth.GetSavedValue() ) + if( m_pMtrEndWidth->GetText() != m_pMtrEndWidth->GetSavedValue() ) { - XLineEndWidthItem aItem( GetCoreValue( aMtrEndWidth, ePoolUnit ) ); + XLineEndWidthItem aItem( GetCoreValue( *m_pMtrEndWidth, ePoolUnit ) ); pOld = GetOldItem( rAttrs, XATTR_LINEENDWIDTH ); if ( !pOld || !( *(const XLineEndWidthItem*)pOld == aItem ) ) { @@ -784,10 +747,9 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) } // Line color - if( aLbColor.GetSelectEntryPos() != aLbColor.GetSavedValue() ) + if( m_pLbColor->GetSelectEntryPos() != m_pLbColor->GetSavedValue() ) { - XLineColorItem aItem( aLbColor.GetSelectEntry(), - aLbColor.GetSelectEntryColor() ); + XLineColorItem aItem( m_pLbColor->GetSelectEntry(), m_pLbColor->GetSelectEntryColor() ); pOld = GetOldItem( rAttrs, XATTR_LINECOLOR ); if ( !pOld || !( *(const XLineColorItem*)pOld == aItem ) ) { @@ -799,19 +761,16 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) if( nDlgType != 0 || nPageType != 3 ) { // Line start - nPos = aLbStartStyle.GetSelectEntryPos(); - if( nPos != LISTBOX_ENTRY_NOTFOUND && - nPos != aLbStartStyle.GetSavedValue() ) + nPos = m_pLbStartStyle->GetSelectEntryPos(); + if( nPos != LISTBOX_ENTRY_NOTFOUND && nPos != m_pLbStartStyle->GetSavedValue() ) { XLineStartItem* pItem = NULL; if( nPos == 0 ) pItem = new XLineStartItem(); else if( pLineEndList->Count() > (long) ( nPos - 1 ) ) - pItem = new XLineStartItem( aLbStartStyle.GetSelectEntry(), - pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ); + pItem = new XLineStartItem( m_pLbStartStyle->GetSelectEntry(), pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ); pOld = GetOldItem( rAttrs, XATTR_LINESTART ); - if( pItem && - ( !pOld || !( *(const XLineEndItem*)pOld == *pItem ) ) ) + if( pItem && ( !pOld || !( *(const XLineEndItem*)pOld == *pItem ) ) ) { rAttrs.Put( *pItem ); bModified = sal_True; @@ -819,16 +778,14 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) delete pItem; } // Line end - nPos = aLbEndStyle.GetSelectEntryPos(); - if( nPos != LISTBOX_ENTRY_NOTFOUND && - nPos != aLbEndStyle.GetSavedValue() ) + nPos = m_pLbEndStyle->GetSelectEntryPos(); + if( nPos != LISTBOX_ENTRY_NOTFOUND && nPos != m_pLbEndStyle->GetSavedValue() ) { XLineEndItem* pItem = NULL; if( nPos == 0 ) pItem = new XLineEndItem(); else if( pLineEndList->Count() > (long) ( nPos - 1 ) ) - pItem = new XLineEndItem( aLbEndStyle.GetSelectEntry(), - pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ); + pItem = new XLineEndItem( m_pLbEndStyle->GetSelectEntry(), pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ); pOld = GetOldItem( rAttrs, XATTR_LINEEND ); if( pItem && ( !pOld || !( *(const XLineEndItem*)pOld == *pItem ) ) ) @@ -841,8 +798,8 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) } // Centered line end - TriState eState = aTsbCenterStart.GetState(); - if( eState != aTsbCenterStart.GetSavedValue() ) + TriState eState = m_pTsbCenterStart->GetState(); + if( eState != m_pTsbCenterStart->GetSavedValue() ) { XLineStartCenterItem aItem( sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, XATTR_LINESTARTCENTER ); @@ -852,8 +809,8 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) bModified = sal_True; } } - eState = aTsbCenterEnd.GetState(); - if( eState != aTsbCenterEnd.GetSavedValue() ) + eState = m_pTsbCenterEnd->GetState(); + if( eState != m_pTsbCenterEnd->GetSavedValue() ) { XLineEndCenterItem aItem( sal::static_int_cast< sal_Bool >( eState ) ); pOld = GetOldItem( rAttrs, XATTR_LINEENDCENTER ); @@ -865,8 +822,8 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) } // Transparency - sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); - if( nVal != (sal_uInt16)aMtrTransparent.GetSavedValue().toInt32() ) + sal_uInt16 nVal = (sal_uInt16)m_pMtrTransparent->GetValue(); + if( nVal != (sal_uInt16)m_pMtrTransparent->GetSavedValue().toInt32() ) { XLineTransparenceItem aItem( nVal ); pOld = GetOldItem( rAttrs, XATTR_LINETRANSPARENCE ); @@ -878,8 +835,8 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) } // #116827# - nPos = maLBEdgeStyle.GetSelectEntryPos(); - if( LISTBOX_ENTRY_NOTFOUND != nPos && nPos != maLBEdgeStyle.GetSavedValue() ) + nPos = m_pLBEdgeStyle->GetSelectEntryPos(); + if( LISTBOX_ENTRY_NOTFOUND != nPos && nPos != m_pLBEdgeStyle->GetSavedValue() ) { XLineJointItem* pNew = 0L; @@ -922,8 +879,8 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) } // LineCaps - nPos = maLBCapStyle.GetSelectEntryPos(); - if( LISTBOX_ENTRY_NOTFOUND != nPos && nPos != maLBCapStyle.GetSavedValue() ) + nPos = m_pLBCapStyle->GetSelectEntryPos(); + if( LISTBOX_ENTRY_NOTFOUND != nPos && nPos != m_pLBCapStyle->GetSavedValue() ) { XLineCapItem* pNew = 0L; @@ -1006,47 +963,47 @@ sal_Bool SvxLineTabPage::FillXLSet_Impl() { sal_uInt16 nPos; - if( aLbLineStyle.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND ) + if( m_pLbLineStyle->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND ) { rXLSet.Put( XLineStyleItem( XLINE_NONE ) ); } - else if( aLbLineStyle.IsEntryPosSelected( 0 ) ) + else if( m_pLbLineStyle->IsEntryPosSelected( 0 ) ) rXLSet.Put( XLineStyleItem( XLINE_NONE ) ); - else if( aLbLineStyle.IsEntryPosSelected( 1 ) ) + else if( m_pLbLineStyle->IsEntryPosSelected( 1 ) ) rXLSet.Put( XLineStyleItem( XLINE_SOLID ) ); else { rXLSet.Put( XLineStyleItem( XLINE_DASH ) ); - nPos = aLbLineStyle.GetSelectEntryPos(); + nPos = m_pLbLineStyle->GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - rXLSet.Put( XLineDashItem( aLbLineStyle.GetSelectEntry(), + rXLSet.Put( XLineDashItem( m_pLbLineStyle->GetSelectEntry(), pDashList->GetDash( nPos - 2 )->GetDash() ) ); } } - nPos = aLbStartStyle.GetSelectEntryPos(); + nPos = m_pLbStartStyle->GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { if( nPos == 0 ) rXLSet.Put( XLineStartItem() ); else - rXLSet.Put( XLineStartItem( aLbStartStyle.GetSelectEntry(), + rXLSet.Put( XLineStartItem( m_pLbStartStyle->GetSelectEntry(), pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ) ); } - nPos = aLbEndStyle.GetSelectEntryPos(); + nPos = m_pLbEndStyle->GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { if( nPos == 0 ) rXLSet.Put( XLineEndItem() ); else - rXLSet.Put( XLineEndItem( aLbEndStyle.GetSelectEntry(), + rXLSet.Put( XLineEndItem( m_pLbEndStyle->GetSelectEntry(), pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ) ); } // #116827# - nPos = maLBEdgeStyle.GetSelectEntryPos(); + nPos = m_pLBEdgeStyle->GetSelectEntryPos(); if(LISTBOX_ENTRY_NOTFOUND != nPos) { switch(nPos) @@ -1075,7 +1032,7 @@ sal_Bool SvxLineTabPage::FillXLSet_Impl() } // LineCaps - nPos = maLBCapStyle.GetSelectEntryPos(); + nPos = m_pLBCapStyle->GetSelectEntryPos(); if(LISTBOX_ENTRY_NOTFOUND != nPos) { switch(nPos) @@ -1098,30 +1055,29 @@ sal_Bool SvxLineTabPage::FillXLSet_Impl() } } - rXLSet.Put( XLineStartWidthItem( GetCoreValue( aMtrStartWidth, ePoolUnit ) ) ); - rXLSet.Put( XLineEndWidthItem( GetCoreValue( aMtrEndWidth, ePoolUnit ) ) ); + rXLSet.Put( XLineStartWidthItem( GetCoreValue( *m_pMtrStartWidth, ePoolUnit ) ) ); + rXLSet.Put( XLineEndWidthItem( GetCoreValue( *m_pMtrEndWidth, ePoolUnit ) ) ); - rXLSet.Put( XLineWidthItem( GetCoreValue( aMtrLineWidth, ePoolUnit ) ) ); - rXLSet.Put( XLineColorItem( aLbColor.GetSelectEntry(), - aLbColor.GetSelectEntryColor() ) ); + rXLSet.Put( XLineWidthItem( GetCoreValue( *m_pMtrLineWidth, ePoolUnit ) ) ); + rXLSet.Put( XLineColorItem( m_pLbColor->GetSelectEntry(), m_pLbColor->GetSelectEntryColor() ) ); // Centered line end - if( aTsbCenterStart.GetState() == STATE_CHECK ) + if( m_pTsbCenterStart->GetState() == STATE_CHECK ) rXLSet.Put( XLineStartCenterItem( sal_True ) ); - else if( aTsbCenterStart.GetState() == STATE_NOCHECK ) + else if( m_pTsbCenterStart->GetState() == STATE_NOCHECK ) rXLSet.Put( XLineStartCenterItem( sal_False ) ); - if( aTsbCenterEnd.GetState() == STATE_CHECK ) + if( m_pTsbCenterEnd->GetState() == STATE_CHECK ) rXLSet.Put( XLineEndCenterItem( sal_True ) ); - else if( aTsbCenterEnd.GetState() == STATE_NOCHECK ) + else if( m_pTsbCenterEnd->GetState() == STATE_NOCHECK ) rXLSet.Put( XLineEndCenterItem( sal_False ) ); // Transparency - sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); + sal_uInt16 nVal = (sal_uInt16)m_pMtrTransparent->GetValue(); rXLSet.Put( XLineTransparenceItem( nVal ) ); // #116827# - aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet()); + m_pCtlPreview->SetLineAttributes(aXLineAttr.GetItemSet()); return( sal_True ); } @@ -1245,16 +1201,13 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) aSymbolSize = ((const SvxSizeItem *)pPoolItem)->GetSize(); } - aSymbolRatioCB.Enable(bEnable); - aSymbolHeightFT.Enable(bEnable); - aSymbolWidthFT.Enable(bEnable); - aSymbolWidthMF.Enable(bEnable); - aSymbolHeightMF.Enable(bEnable); + m_pGridIconSize->Enable(bEnable); + if(bPrevSym) { - SetMetricValue(aSymbolWidthMF, aSymbolSize.Width(), ePoolUnit); - SetMetricValue(aSymbolHeightMF, aSymbolSize.Height(),ePoolUnit); - aCtlPreview.SetSymbol(&aSymbolGraphic,aSymbolSize); + SetMetricValue(*m_pSymbolWidthMF, aSymbolSize.Width(), ePoolUnit); + SetMetricValue(*m_pSymbolHeightMF, aSymbolSize.Height(),ePoolUnit); + m_pCtlPreview->SetSymbol(&aSymbolGraphic,aSymbolSize); aSymbolLastSize=aSymbolSize; } @@ -1265,16 +1218,15 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) switch( eXLS ) { case XLINE_NONE: - aLbLineStyle.SelectEntryPos( 0 ); + m_pLbLineStyle->SelectEntryPos( 0 ); break; case XLINE_SOLID: - aLbLineStyle.SelectEntryPos( 1 ); + m_pLbLineStyle->SelectEntryPos( 1 ); break; case XLINE_DASH: - aLbLineStyle.SetNoSelection(); - aLbLineStyle.SelectEntry( ( ( const XLineDashItem& ) rAttrs. - Get( XATTR_LINEDASH ) ).GetName() ); + m_pLbLineStyle->SetNoSelection(); + m_pLbLineStyle->SelectEntry( ( ( const XLineDashItem& ) rAttrs.Get( XATTR_LINEDASH ) ).GetName() ); break; default: @@ -1283,37 +1235,35 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) } else { - aLbLineStyle.SetNoSelection(); + m_pLbLineStyle->SetNoSelection(); } // Line strength if( rAttrs.GetItemState( XATTR_LINEWIDTH ) != SFX_ITEM_DONTCARE ) { - SetMetricValue( aMtrLineWidth, ( ( const XLineWidthItem& ) rAttrs. - Get( XATTR_LINEWIDTH ) ).GetValue(), ePoolUnit ); + SetMetricValue( *m_pMtrLineWidth, ( ( const XLineWidthItem& ) rAttrs.Get( XATTR_LINEWIDTH ) ).GetValue(), ePoolUnit ); } else - aMtrLineWidth.SetText( OUString() ); + m_pMtrLineWidth->SetText( "" ); // Line color - aLbColor.SetNoSelection(); + m_pLbColor->SetNoSelection(); if ( rAttrs.GetItemState( XATTR_LINECOLOR ) != SFX_ITEM_DONTCARE ) { Color aCol = ( ( const XLineColorItem& ) rAttrs.Get( XATTR_LINECOLOR ) ).GetColorValue(); - aLbColor.SelectEntry( aCol ); - if( aLbColor.GetSelectEntryCount() == 0 ) + m_pLbColor->SelectEntry( aCol ); + if( m_pLbColor->GetSelectEntryCount() == 0 ) { - aLbColor.InsertEntry( aCol, OUString() ); - aLbColor.SelectEntry( aCol ); + m_pLbColor->InsertEntry( aCol, OUString() ); + m_pLbColor->SelectEntry( aCol ); } } // Line start - if( bObjSelected && - rAttrs.GetItemState( XATTR_LINESTART ) == SFX_ITEM_DEFAULT ) + if( bObjSelected && rAttrs.GetItemState( XATTR_LINESTART ) == SFX_ITEM_DEFAULT ) { - aLbStartStyle.Disable(); + m_pLbStartStyle->Disable(); } else if( rAttrs.GetItemState( XATTR_LINESTART ) != SFX_ITEM_DONTCARE ) { @@ -1329,24 +1279,23 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) if(rItemPolygon == rEntryPolygon) { // select this entry - aLbStartStyle.SelectEntryPos((sal_uInt16)a + 1); + m_pLbStartStyle->SelectEntryPos((sal_uInt16)a + 1); bSelected = sal_True; } } if(!bSelected) - aLbStartStyle.SelectEntryPos( 0 ); + m_pLbStartStyle->SelectEntryPos( 0 ); } else { - aLbStartStyle.SetNoSelection(); + m_pLbStartStyle->SetNoSelection(); } // Line end - if( bObjSelected && - rAttrs.GetItemState( XATTR_LINEEND ) == SFX_ITEM_DEFAULT ) + if( bObjSelected && rAttrs.GetItemState( XATTR_LINEEND ) == SFX_ITEM_DEFAULT ) { - aLbEndStyle.Disable(); + m_pLbEndStyle->Disable(); } else if( rAttrs.GetItemState( XATTR_LINEEND ) != SFX_ITEM_DONTCARE ) { @@ -1362,121 +1311,116 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) if(rItemPolygon == rEntryPolygon) { // select this entry - aLbEndStyle.SelectEntryPos((sal_uInt16)a + 1); + m_pLbEndStyle->SelectEntryPos((sal_uInt16)a + 1); bSelected = sal_True; } } if(!bSelected) - aLbEndStyle.SelectEntryPos( 0 ); + m_pLbEndStyle->SelectEntryPos( 0 ); } else { - aLbEndStyle.SetNoSelection(); + m_pLbEndStyle->SetNoSelection(); } // Line start strength - if( bObjSelected && - rAttrs.GetItemState( XATTR_LINESTARTWIDTH ) == SFX_ITEM_DEFAULT ) + if( bObjSelected && rAttrs.GetItemState( XATTR_LINESTARTWIDTH ) == SFX_ITEM_DEFAULT ) { - aMtrStartWidth.Disable(); + m_pMtrStartWidth->Disable(); } else if( rAttrs.GetItemState( XATTR_LINESTARTWIDTH ) != SFX_ITEM_DONTCARE ) { - SetMetricValue( aMtrStartWidth, ( ( const XLineStartWidthItem& ) rAttrs. - Get( XATTR_LINESTARTWIDTH ) ).GetValue(), ePoolUnit ); + SetMetricValue( *m_pMtrStartWidth, + ( ( const XLineStartWidthItem& ) rAttrs.Get( XATTR_LINESTARTWIDTH ) ).GetValue(), + ePoolUnit ); } else - aMtrStartWidth.SetText( OUString() ); + m_pMtrStartWidth->SetText( "" ); // Line end strength - if( bObjSelected && - rAttrs.GetItemState( XATTR_LINEENDWIDTH ) == SFX_ITEM_DEFAULT ) + if( bObjSelected && rAttrs.GetItemState( XATTR_LINEENDWIDTH ) == SFX_ITEM_DEFAULT ) { - aMtrEndWidth.Disable(); + m_pMtrEndWidth->Disable(); } else if( rAttrs.GetItemState( XATTR_LINEENDWIDTH ) != SFX_ITEM_DONTCARE ) { - SetMetricValue( aMtrEndWidth, ( ( const XLineEndWidthItem& ) rAttrs. - Get( XATTR_LINEENDWIDTH ) ).GetValue(), ePoolUnit ); + SetMetricValue( *m_pMtrEndWidth, + ( ( const XLineEndWidthItem& ) rAttrs.Get( XATTR_LINEENDWIDTH ) ).GetValue(), + ePoolUnit ); } else - aMtrEndWidth.SetText( OUString() ); + m_pMtrEndWidth->SetText( "" ); // Centered line end (start) - if( bObjSelected && - rAttrs.GetItemState( XATTR_LINESTARTCENTER ) == SFX_ITEM_DEFAULT ) + if( bObjSelected && rAttrs.GetItemState( XATTR_LINESTARTCENTER ) == SFX_ITEM_DEFAULT ) { - aTsbCenterStart.Disable(); + m_pTsbCenterStart->Disable(); } else if( rAttrs.GetItemState( XATTR_LINESTARTCENTER ) != SFX_ITEM_DONTCARE ) { - aTsbCenterStart.EnableTriState( sal_False ); + m_pTsbCenterStart->EnableTriState( sal_False ); if( ( ( const XLineStartCenterItem& ) rAttrs.Get( XATTR_LINESTARTCENTER ) ).GetValue() ) - aTsbCenterStart.SetState( STATE_CHECK ); + m_pTsbCenterStart->SetState( STATE_CHECK ); else - aTsbCenterStart.SetState( STATE_NOCHECK ); + m_pTsbCenterStart->SetState( STATE_NOCHECK ); } else { - aTsbCenterStart.SetState( STATE_DONTKNOW ); + m_pTsbCenterStart->SetState( STATE_DONTKNOW ); } // Centered line end (end) - if( bObjSelected && - rAttrs.GetItemState( XATTR_LINEENDCENTER ) == SFX_ITEM_DEFAULT ) + if( bObjSelected && rAttrs.GetItemState( XATTR_LINEENDCENTER ) == SFX_ITEM_DEFAULT ) { - aTsbCenterEnd.Disable(); + m_pTsbCenterEnd->Disable(); } else if( rAttrs.GetItemState( XATTR_LINEENDCENTER ) != SFX_ITEM_DONTCARE ) { - aTsbCenterEnd.EnableTriState( sal_False ); + m_pTsbCenterEnd->EnableTriState( sal_False ); if( ( ( const XLineEndCenterItem& ) rAttrs.Get( XATTR_LINEENDCENTER ) ).GetValue() ) - aTsbCenterEnd.SetState( STATE_CHECK ); + m_pTsbCenterEnd->SetState( STATE_CHECK ); else - aTsbCenterEnd.SetState( STATE_NOCHECK ); + m_pTsbCenterEnd->SetState( STATE_NOCHECK ); } else { - aTsbCenterEnd.SetState( STATE_DONTKNOW ); + m_pTsbCenterEnd->SetState( STATE_DONTKNOW ); } // Transparency if( rAttrs.GetItemState( XATTR_LINETRANSPARENCE ) != SFX_ITEM_DONTCARE ) { - sal_uInt16 nTransp = ( ( const XLineTransparenceItem& ) rAttrs. - Get( XATTR_LINETRANSPARENCE ) ).GetValue(); - aMtrTransparent.SetValue( nTransp ); + sal_uInt16 nTransp = ( ( const XLineTransparenceItem& ) rAttrs.Get( XATTR_LINETRANSPARENCE ) ).GetValue(); + m_pMtrTransparent->SetValue( nTransp ); ChangeTransparentHdl_Impl( NULL ); } else - aMtrTransparent.SetText( OUString() ); + m_pMtrTransparent->SetText( "" ); - if( !aLbStartStyle.IsEnabled() && - !aLbEndStyle.IsEnabled() && - !aMtrStartWidth.IsEnabled() && - !aMtrEndWidth.IsEnabled() && - !aTsbCenterStart.IsEnabled()&& - !aTsbCenterEnd.IsEnabled() ) + if( !m_pLbStartStyle->IsEnabled() && + !m_pLbEndStyle->IsEnabled() && + !m_pMtrStartWidth->IsEnabled() && + !m_pMtrEndWidth->IsEnabled() && + !m_pTsbCenterStart->IsEnabled()&& + !m_pTsbCenterEnd->IsEnabled() ) { - aCbxSynchronize.Disable(); - aFtLineEndsStyle.Disable(); - aFtLineEndsWidth.Disable(); - aFlLineEnds.Disable(); + m_pCbxSynchronize->Disable(); + m_pFlLineEnds->Disable(); } // Synchronize // We get the value from the INI file now OUString aStr = GetUserData(); - aCbxSynchronize.Check( (sal_Bool)aStr.toInt32() ); + m_pCbxSynchronize->Check( (sal_Bool)aStr.toInt32() ); // #116827# if(bObjSelected && SFX_ITEM_DEFAULT == rAttrs.GetItemState(XATTR_LINEJOINT)) { - maFTEdgeStyle.Disable(); - maLBEdgeStyle.Disable(); +// maFTEdgeStyle.Disable(); + m_pLBEdgeStyle->Disable(); } else if(SFX_ITEM_DONTCARE != rAttrs.GetItemState(XATTR_LINEJOINT)) { @@ -1486,22 +1430,22 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) { case com::sun::star::drawing::LineJoint_MAKE_FIXED_SIZE: // fallback to round, unused value case com::sun::star::drawing::LineJoint_MIDDLE : // fallback to round, unused value - case com::sun::star::drawing::LineJoint_ROUND : maLBEdgeStyle.SelectEntryPos(0); break; - case com::sun::star::drawing::LineJoint_NONE : maLBEdgeStyle.SelectEntryPos(1); break; - case com::sun::star::drawing::LineJoint_MITER : maLBEdgeStyle.SelectEntryPos(2); break; - case com::sun::star::drawing::LineJoint_BEVEL : maLBEdgeStyle.SelectEntryPos(3); break; + case com::sun::star::drawing::LineJoint_ROUND : m_pLBEdgeStyle->SelectEntryPos(0); break; + case com::sun::star::drawing::LineJoint_NONE : m_pLBEdgeStyle->SelectEntryPos(1); break; + case com::sun::star::drawing::LineJoint_MITER : m_pLBEdgeStyle->SelectEntryPos(2); break; + case com::sun::star::drawing::LineJoint_BEVEL : m_pLBEdgeStyle->SelectEntryPos(3); break; } } else { - maLBEdgeStyle.SetNoSelection(); + m_pLBEdgeStyle->SetNoSelection(); } // fdo#43209 if(bObjSelected && SFX_ITEM_DEFAULT == rAttrs.GetItemState(XATTR_LINECAP)) { - maFTCapStyle.Disable(); - maLBCapStyle.Disable(); +// maFTCapStyle.Disable(); + m_pLBCapStyle->Disable(); } else if(SFX_ITEM_DONTCARE != rAttrs.GetItemState(XATTR_LINECAP)) { @@ -1509,33 +1453,33 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) switch(eLineCap) { - case com::sun::star::drawing::LineCap_ROUND: maLBCapStyle.SelectEntryPos(1); break; - case com::sun::star::drawing::LineCap_SQUARE : maLBCapStyle.SelectEntryPos(2); break; - default /*com::sun::star::drawing::LineCap_BUTT*/: maLBCapStyle.SelectEntryPos(0); break; + case com::sun::star::drawing::LineCap_ROUND: m_pLBCapStyle->SelectEntryPos(1); break; + case com::sun::star::drawing::LineCap_SQUARE : m_pLBCapStyle->SelectEntryPos(2); break; + default /*com::sun::star::drawing::LineCap_BUTT*/: m_pLBCapStyle->SelectEntryPos(0); break; } } else { - maLBCapStyle.SetNoSelection(); + m_pLBCapStyle->SetNoSelection(); } // Save values - aLbLineStyle.SaveValue(); - aMtrLineWidth.SaveValue(); - aLbColor.SaveValue(); - aLbStartStyle.SaveValue(); - aLbEndStyle.SaveValue(); - aMtrStartWidth.SaveValue(); - aMtrEndWidth.SaveValue(); - aTsbCenterStart.SaveValue(); - aTsbCenterEnd.SaveValue(); - aMtrTransparent.SaveValue(); + m_pLbLineStyle->SaveValue(); + m_pMtrLineWidth->SaveValue(); + m_pLbColor->SaveValue(); + m_pLbStartStyle->SaveValue(); + m_pLbEndStyle->SaveValue(); + m_pMtrStartWidth->SaveValue(); + m_pMtrEndWidth->SaveValue(); + m_pTsbCenterStart->SaveValue(); + m_pTsbCenterEnd->SaveValue(); + m_pMtrTransparent->SaveValue(); // #116827# - maLBEdgeStyle.SaveValue(); + m_pLBEdgeStyle->SaveValue(); // LineCaps - maLBCapStyle.SaveValue(); + m_pLBCapStyle->SaveValue(); ClickInvisibleHdl_Impl( this ); @@ -1561,10 +1505,10 @@ sal_uInt16* SvxLineTabPage::GetRanges() IMPL_LINK( SvxLineTabPage, ChangePreviewHdl_Impl, void *, pCntrl ) { - if(pCntrl == &aMtrLineWidth) + if(pCntrl == m_pMtrLineWidth) { // Line width and start end width - sal_Int32 nNewLineWidth = GetCoreValue( aMtrLineWidth, ePoolUnit ); + sal_Int32 nNewLineWidth = GetCoreValue( *m_pMtrLineWidth, ePoolUnit ); if(nActLineWidth == -1) { // Don't initialize yet, get the start value @@ -1578,17 +1522,17 @@ IMPL_LINK( SvxLineTabPage, ChangePreviewHdl_Impl, void *, pCntrl ) if(nActLineWidth != nNewLineWidth) { // Adapt start/end width - sal_Int32 nValAct = GetCoreValue( aMtrStartWidth, ePoolUnit ); + sal_Int32 nValAct = GetCoreValue( *m_pMtrStartWidth, ePoolUnit ); sal_Int32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10); if(nValNew < 0) nValNew = 0; - SetMetricValue( aMtrStartWidth, nValNew, ePoolUnit ); + SetMetricValue( *m_pMtrStartWidth, nValNew, ePoolUnit ); - nValAct = GetCoreValue( aMtrEndWidth, ePoolUnit ); + nValAct = GetCoreValue( *m_pMtrEndWidth, ePoolUnit ); nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10); if(nValNew < 0) nValNew = 0; - SetMetricValue( aMtrEndWidth, nValNew, ePoolUnit ); + SetMetricValue( *m_pMtrEndWidth, nValNew, ePoolUnit ); } // Remember current value @@ -1596,28 +1540,28 @@ IMPL_LINK( SvxLineTabPage, ChangePreviewHdl_Impl, void *, pCntrl ) } FillXLSet_Impl(); - aCtlPreview.Invalidate(); + m_pCtlPreview->Invalidate(); // Make transparency accessible accordingly - if( aLbLineStyle.GetSelectEntryPos() == 0 ) // invisible + if( m_pLbLineStyle->GetSelectEntryPos() == 0 ) // invisible { - aFtTransparent.Disable(); - aMtrTransparent.Disable(); +// aFtTransparent.Disable(); + m_pMtrTransparent->Disable(); } else { - aFtTransparent.Enable(); - aMtrTransparent.Enable(); +// aFtTransparent.Enable(); + m_pMtrTransparent->Enable(); } - const bool bHasLineStart = aLbStartStyle.GetSelectEntryPos() != 0; - const bool bHasLineEnd = aLbEndStyle.GetSelectEntryPos() != 0; + const bool bHasLineStyle = m_pLbLineStyle->GetSelectEntryPos() !=0; + const bool bHasLineStart = m_pLbStartStyle->GetSelectEntryPos() != 0; - aFtLineEndsWidth.Enable( bHasLineStart || bHasLineEnd ); - aMtrStartWidth.Enable( bHasLineStart ); - aTsbCenterStart.Enable( bHasLineStart ); - aMtrEndWidth.Enable( bHasLineEnd ); - aTsbCenterEnd.Enable( bHasLineEnd ); + m_pBoxStart->Enable(bHasLineStart && bHasLineStyle); + + const bool bHasLineEnd = m_pLbEndStyle->GetSelectEntryPos() != 0; + + m_pBoxEnd->Enable(bHasLineEnd && bHasLineStyle); return( 0L ); } @@ -1626,14 +1570,14 @@ IMPL_LINK( SvxLineTabPage, ChangePreviewHdl_Impl, void *, pCntrl ) IMPL_LINK( SvxLineTabPage, ChangeStartHdl_Impl, void *, p ) { - if( aCbxSynchronize.IsChecked() ) + if( m_pCbxSynchronize->IsChecked() ) { - if( p == &aMtrStartWidth ) - aMtrEndWidth.SetValue( aMtrStartWidth.GetValue() ); - if( p == &aLbStartStyle ) - aLbEndStyle.SelectEntryPos( aLbStartStyle.GetSelectEntryPos() ); - if( p == &aTsbCenterStart ) - aTsbCenterEnd.SetState( aTsbCenterStart.GetState() ); + if( p == m_pMtrStartWidth ) + m_pMtrEndWidth->SetValue( m_pMtrStartWidth->GetValue() ); + if( p == m_pLbStartStyle ) + m_pLbEndStyle->SelectEntryPos( m_pLbStartStyle->GetSelectEntryPos() ); + if( p == m_pTsbCenterStart ) + m_pTsbCenterEnd->SetState( m_pTsbCenterStart->GetState() ); } ChangePreviewHdl_Impl( this ); @@ -1664,61 +1608,32 @@ IMPL_LINK( SvxLineTabPage, ChangeCapStyleHdl_Impl, void *, EMPTYARG ) IMPL_LINK_NOARG(SvxLineTabPage, ClickInvisibleHdl_Impl) { - if( aLbLineStyle.GetSelectEntryPos() == 0 ) // invisible + if( m_pLbLineStyle->GetSelectEntryPos() == 0 ) // invisible { - aFtColor.Disable(); if(!bSymbols) - aLbColor.Disable(); - aFtLineWidth.Disable(); - aMtrLineWidth.Disable(); + m_pLbColor->Disable(); - if( aFlLineEnds.IsEnabled() ) + m_pBoxStyle->Disable(); + + if( m_pFlLineEnds->IsEnabled() ) { - aFtLineEndsStyle.Disable(); - aFtLineEndsWidth.Disable(); - aLbStartStyle.Disable(); - aMtrStartWidth.Disable(); - aTsbCenterStart.Disable(); - aLbEndStyle.Disable(); - aMtrEndWidth.Disable(); - aTsbCenterEnd.Disable(); - aCbxSynchronize.Disable(); + m_pBoxStart->Disable(); + m_pBoxArrowStyles->Disable(); - // #116827# - maFTEdgeStyle.Disable(); - maLBEdgeStyle.Disable(); - // LineCaps - maFTCapStyle.Disable(); - maLBCapStyle.Disable(); + // #116827# + m_pGridEdgeCaps->Disable(); } } else { - aFtColor.Enable(); - aLbColor.Enable(); - aFtLineWidth.Enable(); - aMtrLineWidth.Enable(); + m_pBoxStyle->Enable(); - if( aFlLineEnds.IsEnabled() ) + if( m_pFlLineEnds->IsEnabled() ) { - aFtLineEndsStyle.Enable(); - aFtLineEndsWidth.Enable(); - aLbStartStyle.Enable(); - aMtrStartWidth.Enable(); - aTsbCenterStart.Enable(); - aLbEndStyle.Enable(); - aMtrEndWidth.Enable(); - aTsbCenterEnd.Enable(); - aCbxSynchronize.Enable(); - + m_pBoxArrowStyles->Enable(); // #116827# - maFTEdgeStyle.Enable(); - maLBEdgeStyle.Enable(); - - // LineCaps - maFTCapStyle.Enable(); - maLBCapStyle.Enable(); + m_pGridEdgeCaps->Enable(); } } ChangePreviewHdl_Impl( NULL ); @@ -1730,14 +1645,14 @@ IMPL_LINK_NOARG(SvxLineTabPage, ClickInvisibleHdl_Impl) IMPL_LINK( SvxLineTabPage, ChangeEndHdl_Impl, void *, p ) { - if( aCbxSynchronize.IsChecked() ) + if( m_pCbxSynchronize->IsChecked() ) { - if( p == &aMtrEndWidth ) - aMtrStartWidth.SetValue( aMtrEndWidth.GetValue() ); - if( p == &aLbEndStyle ) - aLbStartStyle.SelectEntryPos( aLbEndStyle.GetSelectEntryPos() ); - if( p == &aTsbCenterEnd ) - aTsbCenterStart.SetState( aTsbCenterEnd.GetState() ); + if( p == m_pMtrEndWidth ) + m_pMtrStartWidth->SetValue( m_pMtrEndWidth->GetValue() ); + if( p == m_pLbEndStyle ) + m_pLbStartStyle->SelectEntryPos( m_pLbEndStyle->GetSelectEntryPos() ); + if( p == m_pTsbCenterEnd ) + m_pTsbCenterStart->SetState( m_pTsbCenterEnd->GetState() ); } ChangePreviewHdl_Impl( this ); @@ -1749,7 +1664,7 @@ IMPL_LINK( SvxLineTabPage, ChangeEndHdl_Impl, void *, p ) IMPL_LINK_NOARG(SvxLineTabPage, ChangeTransparentHdl_Impl) { - sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); + sal_uInt16 nVal = (sal_uInt16)m_pMtrTransparent->GetValue(); XLineTransparenceItem aItem( nVal ); rXLSet.Put( XLineTransparenceItem( aItem ) ); @@ -1757,7 +1672,7 @@ IMPL_LINK_NOARG(SvxLineTabPage, ChangeTransparentHdl_Impl) // #116827# FillXLSet_Impl(); - aCtlPreview.Invalidate(); + m_pCtlPreview->Invalidate(); return( 0L ); } @@ -1774,7 +1689,8 @@ void SvxLineTabPage::PointChanged( Window*, RECT_POINT eRcPt ) void SvxLineTabPage::FillUserData() { // Write the synched value to the INI file - OUString aStrUserData = OUString::valueOf( (sal_Int32) aCbxSynchronize.IsChecked() ); +// OUString aStrUserData = OUString::valueOf( (sal_Int32) m_pCbxSynchronize->IsChecked() ); + OUString aStrUserData = OUString::boolean(m_pCbxSynchronize->IsChecked()); SetUserData( aStrUserData ); } @@ -1792,7 +1708,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) // The following link originates from SvxNumOptionsTabPage IMPL_STATIC_LINK(SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem) { - PopupMenu* pPopup = pThis->aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY ); + PopupMenu* pPopup = pThis->m_pSymbolMB->GetPopupMenu()->GetPopupMenu( MN_GALLERY ); SvxBmpItemInfo* pBmpInfo = 0; for ( size_t i = 0; i < pThis->aGrfBrushItems.size(); i++ ) @@ -1809,8 +1725,7 @@ IMPL_STATIC_LINK(SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem) { Bitmap aBitmap(pItem->GetGraphic()->GetBitmap()); Size aSize(aBitmap.GetSizePixel()); - if(aSize.Width() > MAX_BMP_WIDTH || - aSize.Height() > MAX_BMP_HEIGHT) + if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT) { sal_Bool bWidth = aSize.Width() > aSize.Height(); double nScale = bWidth ? @@ -1836,11 +1751,11 @@ IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, MetricField *, pField) { bNewSize=true; - sal_Bool bWidth = (sal_Bool)(pField == &aSymbolWidthMF); + sal_Bool bWidth = (sal_Bool)(pField == m_pSymbolWidthMF); bLastWidthModified = bWidth; - sal_Bool bRatio = aSymbolRatioCB.IsChecked(); - long nWidthVal = static_cast<long>(aSymbolWidthMF.Denormalize(aSymbolWidthMF.GetValue(FUNIT_100TH_MM))); - long nHeightVal= static_cast<long>(aSymbolHeightMF.Denormalize(aSymbolHeightMF.GetValue(FUNIT_100TH_MM))); + sal_Bool bRatio = m_pSymbolRatioCB->IsChecked(); + long nWidthVal = static_cast<long>(m_pSymbolWidthMF->Denormalize(m_pSymbolWidthMF->GetValue(FUNIT_100TH_MM))); + long nHeightVal= static_cast<long>(m_pSymbolHeightMF->Denormalize(m_pSymbolHeightMF->GetValue(FUNIT_100TH_MM))); nWidthVal = OutputDevice::LogicToLogic(nWidthVal,MAP_100TH_MM,(MapUnit)ePoolUnit ); nHeightVal = OutputDevice::LogicToLogic(nHeightVal,MAP_100TH_MM,(MapUnit)ePoolUnit); aSymbolSize=Size(nWidthVal,nHeightVal); @@ -1862,7 +1777,7 @@ IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, MetricField *, pField) { aSymbolSize.Height() = aSymbolLastSize.Height() + (long)((double)nDelta / fSizeRatio); aSymbolSize.Height() = OutputDevice::LogicToLogic( aSymbolSize.Height(),(MapUnit)ePoolUnit, MAP_100TH_MM ); - aSymbolHeightMF.SetUserValue(aSymbolHeightMF.Normalize(aSymbolSize.Height()), FUNIT_100TH_MM); + m_pSymbolHeightMF->SetUserValue(m_pSymbolHeightMF->Normalize(aSymbolSize.Height()), FUNIT_100TH_MM); } } else @@ -1872,12 +1787,11 @@ IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, MetricField *, pField) if (bRatio) { aSymbolSize.Width() = aSymbolLastSize.Width() + (long)((double)nDelta * fSizeRatio); - aSymbolSize.Width() = OutputDevice::LogicToLogic( aSymbolSize.Width(), - (MapUnit)ePoolUnit, MAP_100TH_MM ); - aSymbolWidthMF.SetUserValue(aSymbolWidthMF.Normalize(aSymbolSize.Width()), FUNIT_100TH_MM); + aSymbolSize.Width() = OutputDevice::LogicToLogic( aSymbolSize.Width(), (MapUnit)ePoolUnit, MAP_100TH_MM ); + m_pSymbolWidthMF->SetUserValue(m_pSymbolWidthMF->Normalize(aSymbolSize.Width()), FUNIT_100TH_MM); } } - aCtlPreview.ResizeSymbol(aSymbolSize); + m_pCtlPreview->ResizeSymbol(aSymbolSize); aSymbolLastSize=aSymbolSize; return 0; } @@ -1886,9 +1800,9 @@ IMPL_LINK( SvxLineTabPage, RatioHdl_Impl, CheckBox *, pBox ) if (pBox->IsChecked()) { if (bLastWidthModified) - SizeHdl_Impl(&aSymbolWidthMF); + SizeHdl_Impl(m_pSymbolWidthMF); else - SizeHdl_Impl(&aSymbolHeightMF); + SizeHdl_Impl(m_pSymbolHeightMF); } return 0; } diff --git a/cui/uiconfig/ui/linetabpage.ui b/cui/uiconfig/ui/linetabpage.ui new file mode 100644 index 000000000000..fd5841e0d78e --- /dev/null +++ b/cui/uiconfig/ui/linetabpage.ui @@ -0,0 +1,826 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <!-- interface-requires LibreOffice 1.0 --> + <object class="GtkBox" id="LineTabPage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkBox" id="box2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">12</property> + <property name="margin_top">6</property> + <property name="spacing">12</property> + <child> + <object class="GtkFrame" id="FL_LINE"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkBox" id="box5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkLabel" id="FT_LINE_STYLE"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Style:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">LB_LINE_STYLE</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="svxlo-LineLB" id="LB_LINE_STYLE"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</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> + </packing> + </child> + <child> + <object class="GtkBox" id="boxSTYLE_ATTR"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkLabel" id="FT_COLOR"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Colo_r:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">LB_COLOR</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="svxlo-ColorLB" id="LB_COLOR"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="FT_LINE_WIDTH"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Width:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">MTR_FLD_LINE_WIDTH:0cm</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="MTR_FLD_LINE_WIDTH:0cm"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="invisible_char">•</property> + <property name="adjustment">adjustmentWIDTH</property> + <property name="digits">2</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="FT_TRANSPARENT"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Transparency:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">MTR_LINE_TRANSPARENT:0%</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="MTR_LINE_TRANSPARENT:0%"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="invisible_char">•</property> + <property name="adjustment">adjustmentPERCENT</property> + </object> + <packing> + <property name="expand">False</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">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Line properties</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkFrame" id="FL_LINE_ENDS"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="boxARROW_STYLES"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel" id="FT_LINE_ENDS_STYLE"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Start st_yle:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">LB_START_STYLE</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svxlo-LineEndLB" id="LB_START_STYLE"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svxlo-LineEndLB" id="LB_END_STYLE"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">End sty_le:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">LB_END_STYLE</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="boxSTART"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkLabel" id="FT_LINE_START_WIDTH"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Wi_dth:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">MTR_FLD_START_WIDTH:0cm</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="MTR_FLD_START_WIDTH:0cm"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="invisible_char">•</property> + <property name="invisible_char_set">True</property> + <property name="adjustment">adjustmentWIDTH</property> + <property name="digits">2</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="TSB_CENTER_START"> + <property name="label" translatable="yes">Ce_nter</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="inconsistent">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkBox" id="boxEND"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkLabel" id="FT_LINE_END_WIDTH"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">W_idth:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">MTR_FLD_END_WIDTH:0cm</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="MTR_FLD_END_WIDTH:0cm"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="invisible_char">•</property> + <property name="invisible_char_set">True</property> + <property name="adjustment">adjustmentWIDTH</property> + <property name="digits">2</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="TSB_CENTER_END"> + <property name="label" translatable="yes">C_enter</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="inconsistent">True</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="CBX_SYNCHRONIZE"> + <property name="label" translatable="yes">Synchroni_ze ends</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Arrow styles</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="FL_EDGE_STYLE"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="gridEDGE_CAPS"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel" id="FT_EDGE_STYLE"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Corner style:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">LB_EDGE_STYLE</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="FT_CAP_STYLE"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Ca_p style:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">LB_CAP_STYLE</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="LB_EDGE_STYLE"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststoreEDGE_STYLE</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="LB_CAP_STYLE"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststoreCAP_STYLE</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Corner and cap styles</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="FL_SYMBOL_FORMAT"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkButton" id="MB_SYMBOL_BITMAP:menuSELECT"> + <property name="label" translatable="yes">Select...</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="receives_default">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="gridICON_SIZE"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel" id="FT_SYMBOL_WIDTH"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Widt_h:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">MF_SYMBOL_WIDTH:0cm</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="MF_SYMBOL_WIDTH:0cm"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="invisible_char">•</property> + <property name="adjustment">adjustmentWIDTH_SYMBOL</property> + <property name="digits">2</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="CB_SYMBOL_RATIO"> + <property name="label" translatable="yes">_Keep ratio</property> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="FT_SYMBOL_HEIGHT"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Hei_ght:</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <object class="GtkSpinButton" id="MF_SYMBOL_HEIGHT:0cm"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="invisible_char">•</property> + <property name="invisible_char_set">True</property> + <property name="adjustment">adjustmentWIDTH_SYMBOL</property> + <property name="digits">2</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Icon</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</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> + </packing> + </child> + <child> + <object class="svxlo-SvxXLinePreview" id="CTL_PREVIEW"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child internal-child="accessible"> + <object class="AtkObject" id="CTL_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">1</property> + </packing> + </child> + </object> + <object class="GtkAdjustment" id="adjustmentPERCENT"> + <property name="upper">100</property> + <property name="step_increment">5</property> + <property name="page_increment">10</property> + </object> + <object class="GtkAdjustment" id="adjustmentWIDTH"> + <property name="upper">50</property> + <property name="step_increment">0.050000000000000003</property> + <property name="page_increment">10</property> + </object> + <object class="GtkAdjustment" id="adjustmentWIDTH_SYMBOL"> + <property name="upper">1999</property> + <property name="step_increment">0.050000000000000003</property> + <property name="page_increment">10</property> + </object> + <object class="GtkListStore" id="liststoreCAP_STYLE"> + <columns> + <!-- column-name gchararray1 --> + <column type="gchararray"/> + <!-- column-name guint1 --> + <column type="guint"/> + </columns> + <data> + <row> + <col id="0" translatable="yes">Flat</col> + <col id="1">0</col> + </row> + <row> + <col id="0" translatable="yes">Round</col> + <col id="1">1</col> + </row> + <row> + <col id="0" translatable="yes">Square</col> + <col id="1">2</col> + </row> + </data> + </object> + <object class="GtkListStore" id="liststoreEDGE_STYLE"> + <columns> + <!-- column-name gchararray1 --> + <column type="gchararray"/> + <!-- column-name guint1 --> + <column type="guint"/> + </columns> + <data> + <row> + <col id="0" translatable="yes">Rounded</col> + <col id="1">0</col> + </row> + <row> + <col id="0" translatable="yes">- none -</col> + <col id="1">1</col> + </row> + <row> + <col id="0" translatable="yes">Mitered</col> + <col id="1">2</col> + </row> + <row> + <col id="0" translatable="yes">Beveled</col> + <col id="1">3</col> + </row> + </data> + </object> + <object class="GtkMenu" id="menuSELECT"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkMenuItem" id="menuitem1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_No Symbol</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="menuitem2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_Automatic</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="menuitem3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_From file...</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="menuitem4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_Gallery</property> + <property name="use_underline">True</property> + </object> + </child> + <child> + <object class="GtkMenuItem" id="menuitem5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_Symbols</property> + <property name="use_underline">True</property> + </object> + </child> + </object> +</interface> |