include/sfx2/dockwin.hxx | 2 include/svtools/toolbarmenu.hxx | 18 +- include/svx/dialogs.hrc | 36 ++++- include/vcl/dockwin.hxx | 6 sfx2/source/dialog/dockwin.cxx | 2 svtools/source/control/toolbarmenu.cxx | 15 +- svx/inc/helpid.hrc | 3 svx/source/tbxctrls/extrusioncontrols.cxx | 88 ++++---------- svx/source/tbxctrls/extrusioncontrols.hrc | 12 - svx/source/tbxctrls/extrusioncontrols.hxx | 5 svx/source/tbxctrls/extrusioncontrols.src | 184 ++++++++++++------------------ svx/source/tbxctrls/fontworkgallery.cxx | 32 ++--- svx/source/tbxctrls/fontworkgallery.src | 68 ++++------- vcl/source/window/dockwin.cxx | 11 - 14 files changed, 208 insertions(+), 274 deletions(-)
New commits: commit bccfe2cbc3166f8f15c43417a958701328cfe64b Author: Caolán McNamara <[email protected]> Date: Fri Dec 19 17:19:48 2014 +0000 convert RID_SVXFLOAT_FONTWORK_CHARSPACING to simple strings Change-Id: I54a1a714cb80f2d41a922416a0b9d94f1e329b57 diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index ae8b7aa..46170da 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -899,11 +899,9 @@ #define RID_SVXSTR_DEPTH_4_INCH (RID_SVX_START + 1001) #define RID_SVXFLOAT_FONTWORK_ALIGNMENT (RID_SVX_START + 1002) -#define RID_SVXFLOAT_FONTWORK_CHARSPACING (RID_SVX_START + 1003) -/* #i35426# DR 2004-10-19: (RID_SVX_START+1002) and (RID_SVX_START+1003) are - already used for RID_SVXFLOAT_FONTWORK_ALIGNMENT and - RID_SVXFLOAT_FONTWORK_CHARSPACING above. But these IDs describe floating +/* #i35426# DR 2004-10-19: (RID_SVX_START+1002) is + already used for RID_SVXFLOAT_FONTWORK_ALIGNMENT above. But these IDs describe floating windows, and the following IDs are for strings, so this is no conflict. */ #define RID_SVXSTR_PAGES (RID_SVX_START + 1002) @@ -1068,9 +1066,16 @@ #define RID_SVXSTR_MATTE (RID_SVX_START + 1298) #define RID_SVXSTR_PLASTIC (RID_SVX_START + 1299) #define RID_SVXSTR_METAL (RID_SVX_START + 1300) +#define RID_SVXSTR_CHARS_SPACING_VERY_TIGHT (RID_SVX_START + 1301) +#define RID_SVXSTR_CHARS_SPACING_TIGHT (RID_SVX_START + 1302) +#define RID_SVXSTR_CHARS_SPACING_NORMAL (RID_SVX_START + 1303) +#define RID_SVXSTR_CHARS_SPACING_LOOSE (RID_SVX_START + 1304) +#define RID_SVXSTR_CHARS_SPACING_VERY_LOOSE (RID_SVX_START + 1305) +#define RID_SVXSTR_CHARS_SPACING_CUSTOM (RID_SVX_START + 1306) +#define RID_SVXSTR_CHARS_SPACING_KERN_PAIRS (RID_SVX_START + 1307) // !!! IMPORTANT: consider and update RID_SVXSTR_NEXTFREE when introducing new RIDs for Strings !!! -#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1301) +#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1308) // if we have _a_lot_ time, we should group the resource ids by type, instead // of grouping them by semantics. The reason is that resource ids have to be diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc index 20802cc..c5e565d 100644 --- a/svx/inc/helpid.hrc +++ b/svx/inc/helpid.hrc @@ -86,7 +86,6 @@ #define HID_POPUP_COLOR "SVX_HID_POPUP_COLOR" #define HID_POPUP_COLOR_CTRL "SVX_HID_POPUP_COLOR_CTRL" #define HID_POPUP_FONTWORK_ALIGN "SVX_HID_POPUP_FONTWORK_ALIGN" -#define HID_POPUP_FONTWORK_CHARSPACE "SVX_HID_POPUP_FONTWORK_CHARSPACE" #define HID_POPUP_FRAME "SVX_HID_POPUP_FRAME" #define HID_POPUP_LINE "SVX_HID_POPUP_LINE" #define HID_POPUP_LINEEND "SVX_HID_POPUP_LINEEND" diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 9debe62..973809b 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -514,36 +514,30 @@ private: }; - - -FontworkCharacterSpacingWindow::FontworkCharacterSpacingWindow( svt::ToolboxController& rController, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow ) -: ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_FONTWORK_CHARSPACING )) -, mrController( rController ) -, msFontworkCharacterSpacing( ".uno:FontworkCharacterSpacing" ) -, msFontworkKernCharacterPairs( ".uno:FontworkKernCharacterPairs" ) +FontworkCharacterSpacingWindow::FontworkCharacterSpacingWindow(svt::ToolboxController& rController, + const Reference< XFrame >& rFrame, vcl::Window* pParentWindow) + : ToolbarMenu(rFrame, pParentWindow, WB_MOVEABLE|WB_CLOSEABLE|WB_HIDE|WB_3DLOOK) + , mrController(rController) + , msFontworkCharacterSpacing(".uno:FontworkCharacterSpacing") + , msFontworkKernCharacterPairs(".uno:FontworkKernCharacterPairs") { - SetHelpId( HID_POPUP_FONTWORK_CHARSPACE ); SetSelectHdl( LINK( this, FontworkCharacterSpacingWindow, SelectHdl ) ); - appendEntry( 0, SVX_RESSTR( STR_CHARS_SPACING_VERY_TIGHT ), MenuItemBits::RADIOCHECK ); - appendEntry( 1, SVX_RESSTR( STR_CHARS_SPACING_TIGHT ), MenuItemBits::RADIOCHECK ); - appendEntry( 2, SVX_RESSTR( STR_CHARS_SPACING_NORMAL ), MenuItemBits::RADIOCHECK ); - appendEntry( 3, SVX_RESSTR( STR_CHARS_SPACING_LOOSE ), MenuItemBits::RADIOCHECK ); - appendEntry( 4, SVX_RESSTR( STR_CHARS_SPACING_VERY_LOOSE ), MenuItemBits::RADIOCHECK ); - appendEntry( 5, SVX_RESSTR( STR_CHARS_SPACING_CUSTOM ), MenuItemBits::RADIOCHECK ); + appendEntry(0, SVX_RESSTR(RID_SVXSTR_CHARS_SPACING_VERY_TIGHT), MenuItemBits::RADIOCHECK); + appendEntry(1, SVX_RESSTR(RID_SVXSTR_CHARS_SPACING_TIGHT), MenuItemBits::RADIOCHECK); + appendEntry(2, SVX_RESSTR(RID_SVXSTR_CHARS_SPACING_NORMAL), MenuItemBits::RADIOCHECK); + appendEntry(3, SVX_RESSTR(RID_SVXSTR_CHARS_SPACING_LOOSE), MenuItemBits::RADIOCHECK); + appendEntry(4, SVX_RESSTR(RID_SVXSTR_CHARS_SPACING_VERY_LOOSE), MenuItemBits::RADIOCHECK); + appendEntry(5, SVX_RESSTR(RID_SVXSTR_CHARS_SPACING_CUSTOM), MenuItemBits::RADIOCHECK); appendSeparator(); - appendEntry( 6, SVX_RESSTR( STR_CHARS_SPACING_KERN_PAIRS ), MenuItemBits::CHECKABLE ); + appendEntry(6, SVX_RESSTR(RID_SVXSTR_CHARS_SPACING_KERN_PAIRS), MenuItemBits::CHECKABLE); SetOutputSizePixel( getMenuSize() ); - FreeResource(); - AddStatusListener( msFontworkCharacterSpacing ); AddStatusListener( msFontworkKernCharacterPairs ); } - - void FontworkCharacterSpacingWindow::implSetCharacterSpacing( sal_Int32 nCharacterSpacing, bool bEnabled ) { sal_Int32 i; diff --git a/svx/source/tbxctrls/fontworkgallery.src b/svx/source/tbxctrls/fontworkgallery.src index dbefa60..6bb56b1 100644 --- a/svx/source/tbxctrls/fontworkgallery.src +++ b/svx/source/tbxctrls/fontworkgallery.src @@ -110,47 +110,39 @@ DockingWindow RID_SVXFLOAT_FONTWORK_ALIGNMENT }; }; -DockingWindow RID_SVXFLOAT_FONTWORK_CHARSPACING +String RID_SVXSTR_CHARS_SPACING_VERY_TIGHT { - HelpID = "svx:DockingWindow:RID_SVXFLOAT_FONTWORK_CHARSPACING"; - Border = FALSE ; - Hide = TRUE ; - SVLook = TRUE ; - Sizeable = FALSE ; - Moveable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; + Text [ en-US ] = "~Very Tight"; +}; - Text [ en-US ] = "Fontwork Character Spacing" ; +String RID_SVXSTR_CHARS_SPACING_TIGHT +{ + Text [ en-US ] = "~Tight"; +}; - String STR_CHARS_SPACING_VERY_TIGHT - { - Text [ en-US ] = "~Very Tight"; - }; - String STR_CHARS_SPACING_TIGHT - { - Text [ en-US ] = "~Tight"; - }; - String STR_CHARS_SPACING_NORMAL - { - Text [ en-US ] = "~Normal"; - }; - String STR_CHARS_SPACING_LOOSE - { - Text [ en-US ] = "~Loose"; - }; - String STR_CHARS_SPACING_VERY_LOOSE - { - Text [ en-US ] = "Very ~Loose"; - }; - String STR_CHARS_SPACING_CUSTOM - { - Text [ en-US ] = "~Custom..."; - }; - String STR_CHARS_SPACING_KERN_PAIRS - { - Text [ en-US ] = "~Kern Character Pairs"; - }; +String RID_SVXSTR_CHARS_SPACING_NORMAL +{ + Text [ en-US ] = "~Normal"; +}; + +String RID_SVXSTR_CHARS_SPACING_LOOSE +{ + Text [ en-US ] = "~Loose"; +}; + +String RID_SVXSTR_CHARS_SPACING_VERY_LOOSE +{ + Text [ en-US ] = "Very ~Loose"; +}; + +String RID_SVXSTR_CHARS_SPACING_CUSTOM +{ + Text [ en-US ] = "~Custom..."; +}; + +String RID_SVXSTR_CHARS_SPACING_KERN_PAIRS +{ + Text [ en-US ] = "~Kern Character Pairs"; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 2764201eda020d07f7c2fe34c5042c92c9ec7006 Author: Caolán McNamara <[email protected]> Date: Fri Dec 19 16:41:59 2014 +0000 convert RID_SVXFLOAT_EXTRUSION_SURFACE resource to just strings and images Change-Id: I3cbd554daa74d2c0d9371cb6f07718edea7b24a0 diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index 2ac9596..ae8b7aa 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -381,6 +381,11 @@ #define RID_SVXSTR_BACKGROUND (RID_SVX_START + 531) +#define RID_SVXIMG_WIRE_FRAME (RID_SVX_START + 532) +#define RID_SVXIMG_MATTE (RID_SVX_START + 533) +#define RID_SVXIMG_PLASTIC (RID_SVX_START + 534) +#define RID_SVXIMG_METAL (RID_SVX_START + 535) + // BM: some additional standard colors #define RID_SVXSTR_COLOR_VIOLET (RID_SVX_START + 540) #define RID_SVXSTR_COLOR_BORDEAUX (RID_SVX_START + 541) @@ -878,7 +883,7 @@ #define RID_SVX_FONTWORK_BAR (RID_SVX_START + 987) #define RID_SVXFLOAT_EXTRUSION_LIGHTING (RID_SVX_START + 989) -#define RID_SVXFLOAT_EXTRUSION_SURFACE (RID_SVX_START + 990) + #define RID_SVXSTR_EXTRUSION_COLOR (RID_SVX_START + 991) #define RID_SVXSTR_DEPTH_0 (RID_SVX_START + 992) @@ -1059,9 +1064,13 @@ #define RID_SVXSTR_ZOOM_OUT (RID_SVX_START + 1294) #define RID_SVXSTR_CUSTOM (RID_SVX_START + 1295) #define RID_SVXSTR_INFINITY (RID_SVX_START + 1296) +#define RID_SVXSTR_WIREFRAME (RID_SVX_START + 1297) +#define RID_SVXSTR_MATTE (RID_SVX_START + 1298) +#define RID_SVXSTR_PLASTIC (RID_SVX_START + 1299) +#define RID_SVXSTR_METAL (RID_SVX_START + 1300) // !!! IMPORTANT: consider and update RID_SVXSTR_NEXTFREE when introducing new RIDs for Strings !!! -#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1297) +#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1301) // if we have _a_lot_ time, we should group the resource ids by type, instead // of grouping them by semantics. The reason is that resource ids have to be diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc index 59200f9..20802cc 100644 --- a/svx/inc/helpid.hrc +++ b/svx/inc/helpid.hrc @@ -67,7 +67,6 @@ #define HID_GALLERY_WINDOW "SVX_HID_GALLERY_WINDOW" #define HID_MENU_EXTRUSION_DIRECTION "SVX_HID_MENU_EXTRUSION_DIRECTION" #define HID_MENU_EXTRUSION_LIGHTING "SVX_HID_MENU_EXTRUSION_LIGHTING" -#define HID_MENU_EXTRUSION_SURFACE "SVX_HID_MENU_EXTRUSION_SURFACE" #define HID_MNU_FUNC_AVG "SVX_HID_MNU_FUNC_AVG" #define HID_MNU_FUNC_COUNT "SVX_HID_MNU_FUNC_COUNT" #define HID_MNU_FUNC_COUNT2 "SVX_HID_MNU_FUNC_COUNT2" diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index 1d87466..155afdc 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -800,44 +800,36 @@ Sequence< OUString > SAL_CALL ExtrusionLightingControl::getSupportedServiceNames ExtrusionSurfaceWindow::ExtrusionSurfaceWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - vcl::Window* pParentWindow -) : ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_EXTRUSION_SURFACE ) ) - , mrController( rController ) - , maImgSurface1( SVX_RES( IMG_WIRE_FRAME ) ) - , maImgSurface2( SVX_RES( IMG_MATTE ) ) - , maImgSurface3( SVX_RES( IMG_PLASTIC ) ) - , maImgSurface4( SVX_RES( IMG_METAL ) ) - , msExtrusionSurface( ".uno:ExtrusionSurface" ) + vcl::Window* pParentWindow) + : ToolbarMenu(rFrame, pParentWindow, WB_MOVEABLE|WB_CLOSEABLE|WB_HIDE|WB_3DLOOK) + , mrController(rController) + , maImgSurface1(SVX_RES(RID_SVXIMG_WIRE_FRAME)) + , maImgSurface2(SVX_RES(RID_SVXIMG_MATTE)) + , maImgSurface3(SVX_RES(RID_SVXIMG_PLASTIC)) + , maImgSurface4(SVX_RES(RID_SVXIMG_METAL)) + , msExtrusionSurface(".uno:ExtrusionSurface") { - SetHelpId( HID_MENU_EXTRUSION_SURFACE ); SetSelectHdl( LINK( this, ExtrusionSurfaceWindow, SelectHdl ) ); - appendEntry( 0, SVX_RESSTR( STR_WIREFRAME ), maImgSurface1 ); - appendEntry( 1, SVX_RESSTR( STR_MATTE ), maImgSurface2 ); - appendEntry( 2, SVX_RESSTR( STR_PLASTIC ), maImgSurface3 ); - appendEntry( 3, SVX_RESSTR( STR_METAL ), maImgSurface4 ); + appendEntry(0, SVX_RESSTR(RID_SVXSTR_WIREFRAME), maImgSurface1); + appendEntry(1, SVX_RESSTR(RID_SVXSTR_MATTE), maImgSurface2); + appendEntry(2, SVX_RESSTR(RID_SVXSTR_PLASTIC), maImgSurface3); + appendEntry(3, SVX_RESSTR(RID_SVXSTR_METAL), maImgSurface4); SetOutputSizePixel( getMenuSize() ); - FreeResource(); - AddStatusListener( msExtrusionSurface ); } - - void ExtrusionSurfaceWindow::implSetSurface( int nSurface, bool bEnabled ) { - int i; - for( i = 0; i < 4; i++ ) + for(int i = 0; i < 4; ++i) { checkEntry( i, (i == nSurface) && bEnabled ); enableEntry( i, bEnabled ); } } - - void ExtrusionSurfaceWindow::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) diff --git a/svx/source/tbxctrls/extrusioncontrols.hrc b/svx/source/tbxctrls/extrusioncontrols.hrc index 04b3aa6..f895609 100644 --- a/svx/source/tbxctrls/extrusioncontrols.hrc +++ b/svx/source/tbxctrls/extrusioncontrols.hrc @@ -60,11 +60,6 @@ #define IMG_PERSPECTIVE 31 #define IMG_PARALLEL 33 -#define IMG_WIRE_FRAME 35 -#define IMG_MATTE 36 -#define IMG_PLASTIC 37 -#define IMG_METAL 38 - #define IMG_LIGHT_OFF 50 // needs 10 resource ids #define IMG_LIGHT_ON 60 // needs 10 resource ids #define IMG_LIGHT_PREVIEW 70 // needs 10 resource ids diff --git a/svx/source/tbxctrls/extrusioncontrols.src b/svx/source/tbxctrls/extrusioncontrols.src index b298114..bb6de2d 100644 --- a/svx/source/tbxctrls/extrusioncontrols.src +++ b/svx/source/tbxctrls/extrusioncontrols.src @@ -311,62 +311,84 @@ DockingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING }; }; -DockingWindow RID_SVXFLOAT_EXTRUSION_SURFACE +String RID_SVXSTR_WIREFRAME { - HelpID = "svx:DockingWindow:RID_SVXFLOAT_EXTRUSION_SURFACE"; - Border = FALSE ; - Hide = TRUE ; - SVLook = TRUE ; - Sizeable = FALSE ; - Moveable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; + Text [ en-US ] = "~Wire Frame"; +}; - Text [ en-US ] = "Extrusion Surface" ; +String RID_SVXSTR_MATTE +{ + Text [ en-US ] = "~Matt"; +}; - String STR_WIREFRAME - { - Text [ en-US ] = "~Wire Frame"; - }; +String RID_SVXSTR_PLASTIC +{ + Text [ en-US ] = "~Plastic"; +}; - String STR_MATTE - { - Text [ en-US ] = "~Matt"; - }; +String RID_SVXSTR_METAL +{ + Text [ en-US ] = "Me~tal"; +}; - String STR_PLASTIC - { - Text [ en-US ] = "~Plastic"; - }; +Image RID_SVXIMG_WIRE_FRAME +{ + ImageBitmap = Bitmap { File = "wireframe_16.bmp"; }; + MASKCOLOR +}; - String STR_METAL - { - Text [ en-US ] = "Me~tal"; - }; +Image RID_SVXIMG_MATTE +{ + ImageBitmap = Bitmap { File = "matte_16.bmp"; }; + MASKCOLOR +}; - Image IMG_WIRE_FRAME - { - ImageBitmap = Bitmap { File = "wireframe_16.bmp"; }; - MASKCOLOR - }; +Image RID_SVXIMG_PLASTIC +{ + ImageBitmap = Bitmap { File = "plastic_16.bmp"; }; + MASKCOLOR +}; - Image IMG_MATTE - { - ImageBitmap = Bitmap { File = "matte_16.bmp"; }; - MASKCOLOR - }; +Image RID_SVXIMG_METAL +{ + ImageBitmap = Bitmap { File = "metal_16.bmp"; }; + MASKCOLOR +}; - Image IMG_PLASTIC - { - ImageBitmap = Bitmap { File = "plastic_16.bmp"; }; - MASKCOLOR - }; +Image RID_SVXIMG_DEPTH_0 +{ + ImageBitmap = Bitmap { File = "extrusion0inch_16.bmp"; }; + MASKCOLOR +}; - Image IMG_METAL - { - ImageBitmap = Bitmap { File = "metal_16.bmp"; }; - MASKCOLOR - }; +Image RID_SVXIMG_DEPTH_1 +{ + ImageBitmap = Bitmap { File = "extrusion05inch_16.bmp"; }; + MASKCOLOR +}; + +Image RID_SVXIMG_DEPTH_2 +{ + ImageBitmap = Bitmap { File = "extrusion1inch_16.bmp"; }; + MASKCOLOR +}; + +Image RID_SVXIMG_DEPTH_3 +{ + ImageBitmap = Bitmap { File = "extrusion2inch_16.bmp"; }; + MASKCOLOR +}; + +Image RID_SVXIMG_DEPTH_4 +{ + ImageBitmap = Bitmap { File = "extrusion4inch_16.bmp"; }; + MASKCOLOR +}; + +Image RID_SVXIMG_DEPTH_INFINITY +{ + ImageBitmap = Bitmap { File = "extrusioninfinity_16.bmp"; }; + MASKCOLOR }; String RID_SVXSTR_EXTRUSION_COLOR commit af6bce2e048a6e82754b8a73294ecd0c2780ef35 Author: Caolán McNamara <[email protected]> Date: Fri Dec 19 16:29:44 2014 +0000 put back the images, they were visible in some configurations I forgot that images in menus are automatically shown/hidden depending on platform. So put these back again Change-Id: I617fae15dbb9bd8cdfb04e2ae45fb83b4a7666fb diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index 5797ae9..2ac9596 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -344,6 +344,13 @@ #define RID_SVX_RELOAD_NORMAL (RID_SVX_START + 480) #define RID_SVX_RELOAD_SPECIAL (RID_SVX_START + 481) +#define RID_SVXIMG_DEPTH_INFINITY (RID_SVX_START + 482) +#define RID_SVXIMG_DEPTH_0 (RID_SVX_START + 483) +#define RID_SVXIMG_DEPTH_1 (RID_SVX_START + 484) +#define RID_SVXIMG_DEPTH_2 (RID_SVX_START + 485) +#define RID_SVXIMG_DEPTH_3 (RID_SVX_START + 486) +#define RID_SVXIMG_DEPTH_4 (RID_SVX_START + 487) + // Defines for the 3D engine #define RID_SVX_3D_UNDO_EXCHANGE_PASTE (RID_SVX_START + 489) #define RID_SVX_3D_CREATE_LATHE (RID_SVX_START + 490) diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index 4e781c6..1d87466 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -317,6 +317,12 @@ ExtrusionDepthWindow::ExtrusionDepthWindow( vcl::Window* pParentWindow ) : ToolbarMenu( rFrame, pParentWindow, WB_MOVEABLE|WB_CLOSEABLE|WB_HIDE|WB_3DLOOK) , mrController( rController ) + , maImgDepth0(SVX_RES(RID_SVXIMG_DEPTH_0)) + , maImgDepth1(SVX_RES(RID_SVXIMG_DEPTH_1)) + , maImgDepth2(SVX_RES(RID_SVXIMG_DEPTH_2)) + , maImgDepth3(SVX_RES(RID_SVXIMG_DEPTH_3)) + , maImgDepth4(SVX_RES(RID_SVXIMG_DEPTH_4)) + , maImgDepthInfinity(SVX_RES(RID_SVXIMG_DEPTH_INFINITY)) , meUnit(FUNIT_NONE) , mfDepth( -1.0 ) , msExtrusionDepth( ".uno:ExtrusionDepth" ) @@ -325,12 +331,12 @@ ExtrusionDepthWindow::ExtrusionDepthWindow( SetSelectHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) ); OUString aEmpty; - appendEntry(0, aEmpty); - appendEntry(1, aEmpty); - appendEntry(2, aEmpty); - appendEntry(3, aEmpty); - appendEntry(4, aEmpty); - appendEntry(5, SVX_RESSTR(RID_SVXSTR_INFINITY)); + appendEntry(0, aEmpty, maImgDepth0); + appendEntry(1, aEmpty, maImgDepth1); + appendEntry(2, aEmpty, maImgDepth2); + appendEntry(3, aEmpty, maImgDepth3); + appendEntry(4, aEmpty, maImgDepth4); + appendEntry(5, SVX_RESSTR(RID_SVXSTR_INFINITY), maImgDepthInfinity); appendEntry(6, SVX_RESSTR(RID_SVXSTR_CUSTOM)); SetOutputSizePixel( getMenuSize() ); diff --git a/svx/source/tbxctrls/extrusioncontrols.hxx b/svx/source/tbxctrls/extrusioncontrols.hxx index 60ef7ef..4371153 100644 --- a/svx/source/tbxctrls/extrusioncontrols.hxx +++ b/svx/source/tbxctrls/extrusioncontrols.hxx @@ -89,6 +89,13 @@ class ExtrusionDepthWindow : public svtools::ToolbarMenu private: svt::ToolboxController& mrController; + Image maImgDepth0; + Image maImgDepth1; + Image maImgDepth2; + Image maImgDepth3; + Image maImgDepth4; + Image maImgDepthInfinity; + FieldUnit meUnit; double mfDepth; commit 9b214cacce55fa25d11942f7079e91c17775b290 Author: Caolán McNamara <[email protected]> Date: Fri Dec 19 16:15:13 2014 +0000 Extrusion depth is just a simple menu where 6 of the strings are already just string resources, doing a full docking window res to .ui conversion for the two remaining strings seems overkill Change-Id: I6d3224f8bb84edcdb784901aa93351c042684a3e diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index 206443e..5797ae9 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -870,7 +870,6 @@ #define RID_SVX_EXTRUSION_BAR (RID_SVX_START + 986) #define RID_SVX_FONTWORK_BAR (RID_SVX_START + 987) -#define RID_SVXFLOAT_EXTRUSION_DEPTH (RID_SVX_START + 988) #define RID_SVXFLOAT_EXTRUSION_LIGHTING (RID_SVX_START + 989) #define RID_SVXFLOAT_EXTRUSION_SURFACE (RID_SVX_START + 990) #define RID_SVXSTR_EXTRUSION_COLOR (RID_SVX_START + 991) @@ -1051,9 +1050,11 @@ #define RID_SVXSTR_ZOOM (RID_SVX_START + 1292) #define RID_SVXSTR_ZOOM_IN (RID_SVX_START + 1293) #define RID_SVXSTR_ZOOM_OUT (RID_SVX_START + 1294) +#define RID_SVXSTR_CUSTOM (RID_SVX_START + 1295) +#define RID_SVXSTR_INFINITY (RID_SVX_START + 1296) // !!! IMPORTANT: consider and update RID_SVXSTR_NEXTFREE when introducing new RIDs for Strings !!! -#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1295) +#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1297) // if we have _a_lot_ time, we should group the resource ids by type, instead // of grouping them by semantics. The reason is that resource ids have to be diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc index 151dd7a..59200f9 100644 --- a/svx/inc/helpid.hrc +++ b/svx/inc/helpid.hrc @@ -65,7 +65,6 @@ #define HID_GALLERY_RENAME "SVX_HID_GALLERY_RENAME" #define HID_GALLERY_THEMELIST "SVX_HID_GALLERY_THEMELIST" #define HID_GALLERY_WINDOW "SVX_HID_GALLERY_WINDOW" -#define HID_MENU_EXTRUSION_DEPTH "SVX_HID_MENU_EXTRUSION_DEPTH" #define HID_MENU_EXTRUSION_DIRECTION "SVX_HID_MENU_EXTRUSION_DIRECTION" #define HID_MENU_EXTRUSION_LIGHTING "SVX_HID_MENU_EXTRUSION_LIGHTING" #define HID_MENU_EXTRUSION_SURFACE "SVX_HID_MENU_EXTRUSION_SURFACE" diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index 4a8497f..4e781c6 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -315,36 +315,30 @@ ExtrusionDepthWindow::ExtrusionDepthWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, vcl::Window* pParentWindow -) : ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_EXTRUSION_DEPTH )) +) : ToolbarMenu( rFrame, pParentWindow, WB_MOVEABLE|WB_CLOSEABLE|WB_HIDE|WB_3DLOOK) , mrController( rController ) , meUnit(FUNIT_NONE) , mfDepth( -1.0 ) , msExtrusionDepth( ".uno:ExtrusionDepth" ) , msMetricUnit( ".uno:MetricUnit" ) { - SetHelpId( HID_MENU_EXTRUSION_DEPTH ); - SetSelectHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) ); OUString aEmpty; - appendEntry( 0, aEmpty ); - appendEntry( 1, aEmpty ); - appendEntry( 2, aEmpty ); - appendEntry( 3, aEmpty ); - appendEntry( 4, aEmpty ); - appendEntry( 5, SVX_RESSTR( STR_INFINITY ) ); - appendEntry( 6, SVX_RESSTR( STR_CUSTOM ) ); + appendEntry(0, aEmpty); + appendEntry(1, aEmpty); + appendEntry(2, aEmpty); + appendEntry(3, aEmpty); + appendEntry(4, aEmpty); + appendEntry(5, SVX_RESSTR(RID_SVXSTR_INFINITY)); + appendEntry(6, SVX_RESSTR(RID_SVXSTR_CUSTOM)); SetOutputSizePixel( getMenuSize() ); - FreeResource(); - AddStatusListener( msExtrusionDepth ); AddStatusListener( msMetricUnit ); } - - void ExtrusionDepthWindow::implSetDepth( double fDepth ) { mfDepth = fDepth; diff --git a/svx/source/tbxctrls/extrusioncontrols.src b/svx/source/tbxctrls/extrusioncontrols.src index 87e666f..b298114 100644 --- a/svx/source/tbxctrls/extrusioncontrols.src +++ b/svx/source/tbxctrls/extrusioncontrols.src @@ -138,30 +138,6 @@ DockingWindow RID_SVXFLOAT_EXTRUSION_DIRECTION }; }; -DockingWindow RID_SVXFLOAT_EXTRUSION_DEPTH -{ - HelpID = "svx:DockingWindow:RID_SVXFLOAT_EXTRUSION_DEPTH"; - Border = FALSE ; - Hide = TRUE ; - SVLook = TRUE ; - Sizeable = FALSE ; - Moveable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; - - Text [ en-US ] = "Extrusion Depth" ; - - String STR_CUSTOM - { - Text [ en-US ] = "~Custom..."; - }; - - String STR_INFINITY - { - Text [ en-US ] = "~Infinity"; - }; -}; - DockingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING { HelpID = "svx:DockingWindow:RID_SVXFLOAT_EXTRUSION_LIGHTING"; @@ -448,4 +424,14 @@ String RID_SVXSTR_DEPTH_4_INCH Text [ en-US ] = "~4 inch"; }; +String RID_SVXSTR_CUSTOM +{ + Text [ en-US ] = "~Custom..."; +}; + +String RID_SVXSTR_INFINITY +{ + Text [ en-US ] = "~Infinity"; +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 974a70ccb78e36f4aecd641dfb84bcc3dd77a48d Author: Caolán McNamara <[email protected]> Date: Fri Dec 19 16:05:03 2014 +0000 these images never appear in the extrusion depth menu, drop them Change-Id: If038dcd198bd9ef8c7057a549b6bf4776c28843d diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index 6e50dda..4a8497f 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -317,12 +317,6 @@ ExtrusionDepthWindow::ExtrusionDepthWindow( vcl::Window* pParentWindow ) : ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_EXTRUSION_DEPTH )) , mrController( rController ) - , maImgDepth0( SVX_RES( IMG_DEPTH_0 ) ) - , maImgDepth1( SVX_RES( IMG_DEPTH_1 ) ) - , maImgDepth2( SVX_RES( IMG_DEPTH_2 ) ) - , maImgDepth3( SVX_RES( IMG_DEPTH_3 ) ) - , maImgDepth4( SVX_RES( IMG_DEPTH_4 ) ) - , maImgDepthInfinity( SVX_RES( IMG_DEPTH_INFINITY ) ) , meUnit(FUNIT_NONE) , mfDepth( -1.0 ) , msExtrusionDepth( ".uno:ExtrusionDepth" ) @@ -333,12 +327,12 @@ ExtrusionDepthWindow::ExtrusionDepthWindow( SetSelectHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) ); OUString aEmpty; - appendEntry( 0, aEmpty, maImgDepth0 ); - appendEntry( 1, aEmpty, maImgDepth1 ); - appendEntry( 2, aEmpty, maImgDepth2 ); - appendEntry( 3, aEmpty, maImgDepth3 ); - appendEntry( 4, aEmpty, maImgDepth4 ); - appendEntry( 5, SVX_RESSTR( STR_INFINITY ), maImgDepthInfinity ); + appendEntry( 0, aEmpty ); + appendEntry( 1, aEmpty ); + appendEntry( 2, aEmpty ); + appendEntry( 3, aEmpty ); + appendEntry( 4, aEmpty ); + appendEntry( 5, SVX_RESSTR( STR_INFINITY ) ); appendEntry( 6, SVX_RESSTR( STR_CUSTOM ) ); SetOutputSizePixel( getMenuSize() ); @@ -416,26 +410,6 @@ void ExtrusionDepthWindow::statusChanged( } } - - -void ExtrusionDepthWindow::DataChanged( const DataChangedEvent& rDCEvt ) -{ - ToolbarMenu::DataChanged( rDCEvt ); - - if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) - { - setEntryImage( 0, maImgDepth0 ); - setEntryImage( 1, maImgDepth1 ); - setEntryImage( 2, maImgDepth2 ); - setEntryImage( 3, maImgDepth3 ); - setEntryImage( 4, maImgDepth4 ); - setEntryImage( 5, maImgDepthInfinity ); - } -} - - - - IMPL_LINK_NOARG(ExtrusionDepthWindow, SelectHdl) { int nSelected = getSelectedEntryId(); diff --git a/svx/source/tbxctrls/extrusioncontrols.hrc b/svx/source/tbxctrls/extrusioncontrols.hrc index 96bf7e6..04b3aa6 100644 --- a/svx/source/tbxctrls/extrusioncontrols.hrc +++ b/svx/source/tbxctrls/extrusioncontrols.hrc @@ -57,13 +57,6 @@ #define IMG_DIRECTION 1 // needs 10 resource ids -#define IMG_DEPTH_0 19 -#define IMG_DEPTH_1 20 -#define IMG_DEPTH_2 21 -#define IMG_DEPTH_3 22 -#define IMG_DEPTH_4 23 -#define IMG_DEPTH_INFINITY 24 - #define IMG_PERSPECTIVE 31 #define IMG_PARALLEL 33 diff --git a/svx/source/tbxctrls/extrusioncontrols.hxx b/svx/source/tbxctrls/extrusioncontrols.hxx index e3b4bfa..60ef7ef 100644 --- a/svx/source/tbxctrls/extrusioncontrols.hxx +++ b/svx/source/tbxctrls/extrusioncontrols.hxx @@ -84,20 +84,11 @@ public: using svt::PopupWindowController::createPopupWindow; }; - - class ExtrusionDepthWindow : public svtools::ToolbarMenu { private: svt::ToolboxController& mrController; - Image maImgDepth0; - Image maImgDepth1; - Image maImgDepth2; - Image maImgDepth3; - Image maImgDepth4; - Image maImgDepthInfinity; - FieldUnit meUnit; double mfDepth; @@ -113,11 +104,8 @@ public: ExtrusionDepthWindow( svt::ToolboxController& rController, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, vcl::Window* pParentWindow ); virtual void statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ) SAL_OVERRIDE; - virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; }; - - class ExtrusionDepthController : public svt::PopupWindowController { public: diff --git a/svx/source/tbxctrls/extrusioncontrols.src b/svx/source/tbxctrls/extrusioncontrols.src index cb7afff..87e666f 100644 --- a/svx/source/tbxctrls/extrusioncontrols.src +++ b/svx/source/tbxctrls/extrusioncontrols.src @@ -160,42 +160,6 @@ DockingWindow RID_SVXFLOAT_EXTRUSION_DEPTH { Text [ en-US ] = "~Infinity"; }; - - Image IMG_DEPTH_0 - { - ImageBitmap = Bitmap { File = "extrusion0inch_16.bmp"; }; - MASKCOLOR - }; - - Image IMG_DEPTH_1 - { - ImageBitmap = Bitmap { File = "extrusion05inch_16.bmp"; }; - MASKCOLOR - }; - - Image IMG_DEPTH_2 - { - ImageBitmap = Bitmap { File = "extrusion1inch_16.bmp"; }; - MASKCOLOR - }; - - Image IMG_DEPTH_3 - { - ImageBitmap = Bitmap { File = "extrusion2inch_16.bmp"; }; - MASKCOLOR - }; - - Image IMG_DEPTH_4 - { - ImageBitmap = Bitmap { File = "extrusion4inch_16.bmp"; }; - MASKCOLOR - }; - - Image IMG_DEPTH_INFINITY - { - ImageBitmap = Bitmap { File = "extrusioninfinity_16.bmp"; }; - MASKCOLOR - }; }; DockingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING commit d32f7a6e57d42fa03965f22513848bf7b100ac34 Author: Caolán McNamara <[email protected]> Date: Fri Dec 19 15:29:07 2014 +0000 provide a route to load ToolbarMenu things via .ui Change-Id: Ic2175faf247d7c05717d397b8afdb9d90087f1d3 diff --git a/include/sfx2/dockwin.hxx b/include/sfx2/dockwin.hxx index 1d50cc4..729513a 100644 --- a/include/sfx2/dockwin.hxx +++ b/include/sfx2/dockwin.hxx @@ -82,7 +82,7 @@ public: SfxDockingWindow( SfxBindings *pBindings, SfxChildWindow *pCW, vcl::Window* pParent, - const OUString& rID, const OUString& rUIXMLDescription ); + const OString& rID, const OUString& rUIXMLDescription ); virtual ~SfxDockingWindow(); void Initialize (SfxChildWinInfo* pInfo); diff --git a/include/svtools/toolbarmenu.hxx b/include/svtools/toolbarmenu.hxx index 5719949..230c33d 100644 --- a/include/svtools/toolbarmenu.hxx +++ b/include/svtools/toolbarmenu.hxx @@ -46,15 +46,19 @@ class SVT_DLLPUBLIC ToolbarMenu : public DockingWindow friend class ToolbarMenuStatusListener; friend struct ToolbarMenu_Impl; public: - ToolbarMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - vcl::Window* pParentWindow, - WinBits nBits ); + ToolbarMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + vcl::Window* pParentWindow, + WinBits nBits ); - ToolbarMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - vcl::Window* pParentWindow, - const ResId& rResId ); + ToolbarMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + vcl::Window* pParentWindow, + const ResId& rResId ); - virtual ~ToolbarMenu(); + ToolbarMenu(vcl::Window* pParentWindow, + const OString& rID, const OUString& rUIXMLDescription, + const css::uno::Reference<css::frame::XFrame>& rFrame); + + virtual ~ToolbarMenu(); virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx index fea01a0..6dfad81 100644 --- a/include/vcl/dockwin.hxx +++ b/include/vcl/dockwin.hxx @@ -281,7 +281,8 @@ protected: SAL_DLLPRIVATE void DoInitialLayout(); - void loadUI(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription); + void loadUI(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription, + const css::uno::Reference<css::frame::XFrame> &rFrame); public: bool isLayoutEnabled() const; @@ -297,7 +298,8 @@ protected: public: DockingWindow(vcl::Window* pParent, WinBits nStyle = WB_STDDOCKWIN); DockingWindow(vcl::Window* pParent, const ResId& rResId); - DockingWindow(vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription); + DockingWindow(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription, + const css::uno::Reference<css::frame::XFrame> &rFrame = css::uno::Reference<css::frame::XFrame>()); virtual ~DockingWindow(); virtual void StartDocking(); diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index d711762..6218e0c 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -944,7 +944,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW, } SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW, - vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription) + vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription) : DockingWindow(pParent, rID, rUIXMLDescription) , pBindings(pBindinx) , pMgr(pCW) diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index d5cb6fb..e8af87f 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -435,23 +435,24 @@ IMPL_LINK( ToolbarMenu, HighlightHdl, Control *, pControl ) return 0; } - - ToolbarMenu::ToolbarMenu( const Reference< XFrame >& rFrame, vcl::Window* pParentWindow, WinBits nBits ) -: DockingWindow(pParentWindow, nBits) + : DockingWindow(pParentWindow, nBits) { implInit(rFrame); } - - ToolbarMenu::ToolbarMenu( const Reference< XFrame >& rFrame, vcl::Window* pParentWindow, const ResId& rResId ) -: DockingWindow(pParentWindow, rResId) + : DockingWindow(pParentWindow, rResId) { implInit(rFrame); } - +ToolbarMenu::ToolbarMenu(vcl::Window* pParentWindow, const OString& rID, + const OUString& rUIXMLDescription, const Reference< XFrame >& rFrame) + : DockingWindow(pParentWindow, rID, rUIXMLDescription, rFrame) +{ + implInit(rFrame); +} void ToolbarMenu::implInit(const Reference< XFrame >& rFrame) { diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index cc3902b..95dd54b 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -440,20 +440,21 @@ void DockingWindow::doDeferredInit(WinBits nBits) mbIsDefferedInit = false; } -void DockingWindow::loadUI(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription) +void DockingWindow::loadUI(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription, + const css::uno::Reference<css::frame::XFrame> &rFrame) { mbIsDefferedInit = true; mpDialogParent = pParent; //should be unset in doDeferredInit - m_pUIBuilder = new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID); + m_pUIBuilder = new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID, rFrame); } -DockingWindow::DockingWindow(vcl::Window* pParent, const OUString& rID, - const OUString& rUIXMLDescription) +DockingWindow::DockingWindow(vcl::Window* pParent, const OString& rID, + const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame) : Window(WINDOW_DOCKINGWINDOW) { ImplInitDockingWindowData(); - loadUI(pParent, OUStringToOString(rID, RTL_TEXTENCODING_UTF8), rUIXMLDescription); + loadUI(pParent, rID, rUIXMLDescription, rFrame); } DockingWindow::~DockingWindow()
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
