diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-12-22 11:21:10 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-12-22 13:55:20 +0000 |
commit | a42a6b23afb09a799dec36a293c95964216af6cd (patch) | |
tree | c553b30fda42dcb27cadc09d78fe33c08ba5d813 | |
parent | 4d4cc4d5563134939e5391daa15c14481ab4724b (diff) |
convert RID_SVXFLOAT_EXTRUSION_DIRECTION to strings and images
Change-Id: I7c619a07ab0adb4224f0f0f45b65c3d484824666
-rw-r--r-- | include/svx/dialogs.hrc | 10 | ||||
-rw-r--r-- | svx/inc/helpid.hrc | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/extrusioncontrols.cxx | 37 | ||||
-rw-r--r-- | svx/source/tbxctrls/extrusioncontrols.hrc | 17 | ||||
-rw-r--r-- | svx/source/tbxctrls/extrusioncontrols.src | 223 |
5 files changed, 137 insertions, 152 deletions
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index 46170da9d1ee..e8fd38c32955 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -877,8 +877,6 @@ #define RID_SVXSTR_EXPORT_GRAPHIC_TITLE (RID_SVX_START + 984) -#define RID_SVXFLOAT_EXTRUSION_DIRECTION (RID_SVX_START + 985) - #define RID_SVX_EXTRUSION_BAR (RID_SVX_START + 986) #define RID_SVX_FONTWORK_BAR (RID_SVX_START + 987) @@ -1073,9 +1071,15 @@ #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) +#define RID_SVXIMG_DIRECTION (RID_SVX_START + 1308) // needs 10 resource ids +#define RID_SVXIMG_PERSPECTIVE (RID_SVX_START + 1318) +#define RID_SVXIMG_PARALLEL (RID_SVX_START + 1319) +#define RID_SVXSTR_DIRECTION (RID_SVX_START + 1320) // needs 10 resource ids +#define RID_SVXSTR_PERSPECTIVE (RID_SVX_START + 1330) +#define RID_SVXSTR_PARALLEL (RID_SVX_START + 1331) // !!! IMPORTANT: consider and update RID_SVXSTR_NEXTFREE when introducing new RIDs for Strings !!! -#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1308) +#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1332) // 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 c5e565d5f17a..7a8e9bc2676d 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_DIRECTION "SVX_HID_MENU_EXTRUSION_DIRECTION" #define HID_MENU_EXTRUSION_LIGHTING "SVX_HID_MENU_EXTRUSION_LIGHTING" #define HID_MNU_FUNC_AVG "SVX_HID_MNU_FUNC_AVG" #define HID_MNU_FUNC_COUNT "SVX_HID_MNU_FUNC_COUNT" @@ -93,7 +92,6 @@ #define HID_STYLE_LISTBOX "SVX_HID_STYLE_LISTBOX" #define HID_SVX_MDLG_DOCRECOVERY_BROKEN "SVX_HID_SVX_MDLG_DOCRECOVERY_BROKEN" #define HID_SVX_TP_DOCRECOVERY_RECOVER "SVX_HID_SVX_TP_DOCRECOVERY_RECOVER" -#define HID_VALUESET_EXTRUSION_DIRECTION "SVX_HID_VALUESET_EXTRUSION_DIRECTION" #define HID_VALUESET_EXTRUSION_LIGHTING "SVX_HID_VALUESET_EXTRUSION_LIGHTING" #define HID_XMLSEC_CALL "SVX_HID_XMLSEC_CALL" diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index 155afdcff83c..bd6baeda09e9 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -65,46 +65,41 @@ ExtrusionDirectionWindow::ExtrusionDirectionWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, vcl::Window* pParentWindow ) -: ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_EXTRUSION_DIRECTION )) , - mrController( rController ) , - maImgPerspective( SVX_RES( IMG_PERSPECTIVE ) ) , - maImgParallel( SVX_RES( IMG_PARALLEL ) ) , - msExtrusionDirection( ".uno:ExtrusionDirection" ) , - msExtrusionProjection( ".uno:ExtrusionProjection" ) + : ToolbarMenu(rFrame, pParentWindow, + WB_MOVEABLE|WB_CLOSEABLE|WB_HIDE|WB_3DLOOK) + , mrController(rController) + , maImgPerspective(SVX_RES(RID_SVXIMG_PERSPECTIVE)) + , maImgParallel(SVX_RES(RID_SVXIMG_PARALLEL)) + , msExtrusionDirection(".uno:ExtrusionDirection") + , msExtrusionProjection(".uno:ExtrusionProjection") { - SetHelpId( HID_MENU_EXTRUSION_DIRECTION ); - - sal_uInt16 i; - for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ ) + for(sal_uInt16 i = DIRECTION_NW; i <= DIRECTION_SE; ++i) { - maImgDirection[i] = Image( SVX_RES( IMG_DIRECTION + i ) ); + maImgDirection[i] = Image( SVX_RES( RID_SVXIMG_DIRECTION + i ) ); } SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) ); mpDirectionSet = createEmptyValueSetControl(); - mpDirectionSet->SetHelpId( HID_VALUESET_EXTRUSION_DIRECTION ); mpDirectionSet->SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) ); mpDirectionSet->SetColCount( 3 ); mpDirectionSet->EnableFullItemMode( false ); - for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ ) + for (sal_uInt16 i = DIRECTION_NW; i <= DIRECTION_SE; ++i) { - OUString aText( SVX_RESSTR( STR_DIRECTION + i ) ); - mpDirectionSet->InsertItem( i+1, maImgDirection[ i ], aText ); + OUString aText(SVX_RESSTR(RID_SVXSTR_DIRECTION + i)); + mpDirectionSet->InsertItem(i + 1, maImgDirection[i], aText); } - mpDirectionSet->SetOutputSizePixel( Size( 72, 72 ) ); + mpDirectionSet->SetOutputSizePixel(Size(72, 72)); - appendEntry( 2, mpDirectionSet ); + appendEntry(2, mpDirectionSet ); appendSeparator(); - appendEntry( 0, SVX_RESSTR( STR_PERSPECTIVE ), maImgPerspective ); - appendEntry( 1, SVX_RESSTR( STR_PARALLEL ), maImgParallel ); + appendEntry(0, SVX_RESSTR(RID_SVXSTR_PERSPECTIVE), maImgPerspective); + appendEntry(1, SVX_RESSTR(RID_SVXSTR_PARALLEL), maImgParallel); SetOutputSizePixel( getMenuSize() ); - FreeResource(); - AddStatusListener( msExtrusionDirection ); AddStatusListener( msExtrusionProjection ); } diff --git a/svx/source/tbxctrls/extrusioncontrols.hrc b/svx/source/tbxctrls/extrusioncontrols.hrc index f8956097deef..07b9ca367496 100644 --- a/svx/source/tbxctrls/extrusioncontrols.hrc +++ b/svx/source/tbxctrls/extrusioncontrols.hrc @@ -39,27 +39,10 @@ #define DIRECTION_S 7 #define DIRECTION_SE 8 -#define STR_PERSPECTIVE 1 -#define STR_PARALLEL 2 -#define STR_CUSTOM 3 -#define STR_INFINITY 4 - #define STR_BRIGHT 15 #define STR_NORMAL 16 #define STR_DIM 17 -#define STR_WIREFRAME 18 -#define STR_MATTE 19 -#define STR_PLASTIC 20 -#define STR_METAL 21 - -#define STR_DIRECTION 30 // needs 10 resource ids - -#define IMG_DIRECTION 1 // needs 10 resource ids - -#define IMG_PERSPECTIVE 31 -#define IMG_PARALLEL 33 - #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 bb6de2d57d8e..2c74bd42f6f1 100644 --- a/svx/source/tbxctrls/extrusioncontrols.src +++ b/svx/source/tbxctrls/extrusioncontrols.src @@ -22,120 +22,125 @@ #define MASKCOLOR MaskColor = Color { Red=0xFFFF; Green=0x0000; Blue=0xFFFF; }; -DockingWindow RID_SVXFLOAT_EXTRUSION_DIRECTION +Image RID_SVXIMG_DIRECTION + DIRECTION_NW { - HelpID = "svx:DockingWindow:RID_SVXFLOAT_EXTRUSION_DIRECTION"; - Border = FALSE ; - Hide = TRUE ; - SVLook = TRUE ; - Sizeable = FALSE ; - Moveable = TRUE ; - Closeable = TRUE ; - Zoomable = TRUE ; + ImageBitmap = Bitmap { File = "directionnorthwest_22.bmp" ; }; + MASKCOLOR +}; - Text [ en-US ] = "Extrusion Direction" ; +Image RID_SVXIMG_DIRECTION + DIRECTION_N +{ + ImageBitmap = Bitmap { File = "directionnorth_22.bmp" ; }; + MASKCOLOR +}; - Image IMG_DIRECTION + DIRECTION_NW - { - ImageBitmap = Bitmap { File = "directionnorthwest_22.bmp" ; }; - MASKCOLOR - }; - Image IMG_DIRECTION + DIRECTION_N - { - ImageBitmap = Bitmap { File = "directionnorth_22.bmp" ; }; - MASKCOLOR - }; - Image IMG_DIRECTION + DIRECTION_NE - { - ImageBitmap = Bitmap { File = "directionnortheast_22.bmp"; }; - MASKCOLOR - }; - Image IMG_DIRECTION + DIRECTION_W - { - ImageBitmap = Bitmap { File = "directionwest_22.bmp"; }; - MASKCOLOR - }; - Image IMG_DIRECTION + DIRECTION_NONE - { - ImageBitmap = Bitmap { File = "directionstraight_22.bmp"; }; - MASKCOLOR - }; - Image IMG_DIRECTION + DIRECTION_E - { - ImageBitmap = Bitmap { File = "directioneast_22.bmp"; }; - MASKCOLOR - }; - Image IMG_DIRECTION + DIRECTION_SW - { - ImageBitmap = Bitmap { File = "directionsouthwest_22.bmp"; }; - MASKCOLOR - }; - Image IMG_DIRECTION + DIRECTION_S - { - ImageBitmap = Bitmap { File = "directionsouth_22.bmp"; }; - MASKCOLOR - }; - Image IMG_DIRECTION + DIRECTION_SE - { - ImageBitmap = Bitmap { File = "directionsoutheast_22.bmp"; }; - MASKCOLOR - }; - Image IMG_PERSPECTIVE - { - ImageBitmap = Bitmap { File = "perspective_16.bmp"; }; - MASKCOLOR - }; - Image IMG_PARALLEL - { - ImageBitmap = Bitmap { File = "parallel_16.bmp"; }; - MASKCOLOR - }; +Image RID_SVXIMG_DIRECTION + DIRECTION_NE +{ + ImageBitmap = Bitmap { File = "directionnortheast_22.bmp"; }; + MASKCOLOR +}; - String STR_PERSPECTIVE - { - Text [ en-US ] = "~Perspective" ; - }; +Image RID_SVXIMG_DIRECTION + DIRECTION_W +{ + ImageBitmap = Bitmap { File = "directionwest_22.bmp"; }; + MASKCOLOR +}; - String STR_PARALLEL - { - Text [ en-US ] = "P~arallel" ; - }; - String STR_DIRECTION + DIRECTION_NW - { - Text [ en-US ] = "Extrusion North-West"; - }; - String STR_DIRECTION + DIRECTION_N - { - Text [ en-US ] = "Extrusion North"; - }; - String STR_DIRECTION + DIRECTION_NE - { - Text [ en-US ] = "Extrusion North-East"; - }; - String STR_DIRECTION + DIRECTION_W - { - Text [ en-US ] = "Extrusion West"; - }; - String STR_DIRECTION + DIRECTION_NONE - { - Text [ en-US ] = "Extrusion Backwards"; - }; - String STR_DIRECTION + DIRECTION_E - { - Text [ en-US ] = "Extrusion East"; - }; - String STR_DIRECTION + DIRECTION_SW - { - Text [ en-US ] = "Extrusion South-West"; - }; - String STR_DIRECTION + DIRECTION_S - { - Text [ en-US ] = "Extrusion South"; - }; - String STR_DIRECTION + DIRECTION_SE - { - Text [ en-US ] = "Extrusion South-East"; - }; +Image RID_SVXIMG_DIRECTION + DIRECTION_NONE +{ + ImageBitmap = Bitmap { File = "directionstraight_22.bmp"; }; + MASKCOLOR +}; + +Image RID_SVXIMG_DIRECTION + DIRECTION_E +{ + ImageBitmap = Bitmap { File = "directioneast_22.bmp"; }; + MASKCOLOR +}; + +Image RID_SVXIMG_DIRECTION + DIRECTION_SW +{ + ImageBitmap = Bitmap { File = "directionsouthwest_22.bmp"; }; + MASKCOLOR +}; + +Image RID_SVXIMG_DIRECTION + DIRECTION_S +{ + ImageBitmap = Bitmap { File = "directionsouth_22.bmp"; }; + MASKCOLOR +}; + +Image RID_SVXIMG_DIRECTION + DIRECTION_SE +{ + ImageBitmap = Bitmap { File = "directionsoutheast_22.bmp"; }; + MASKCOLOR +}; + +Image RID_SVXIMG_PERSPECTIVE +{ + ImageBitmap = Bitmap { File = "perspective_16.bmp"; }; + MASKCOLOR +}; + +Image RID_SVXIMG_PARALLEL +{ + ImageBitmap = Bitmap { File = "parallel_16.bmp"; }; + MASKCOLOR +}; + +String RID_SVXSTR_PERSPECTIVE +{ + Text [ en-US ] = "~Perspective" ; +}; + +String RID_SVXSTR_PARALLEL +{ + Text [ en-US ] = "P~arallel" ; +}; + +String RID_SVXSTR_DIRECTION + DIRECTION_NW +{ + Text [ en-US ] = "Extrusion North-West"; +}; + +String RID_SVXSTR_DIRECTION + DIRECTION_N +{ + Text [ en-US ] = "Extrusion North"; +}; + +String RID_SVXSTR_DIRECTION + DIRECTION_NE +{ + Text [ en-US ] = "Extrusion North-East"; +}; + +String RID_SVXSTR_DIRECTION + DIRECTION_W +{ + Text [ en-US ] = "Extrusion West"; +}; + +String RID_SVXSTR_DIRECTION + DIRECTION_NONE +{ + Text [ en-US ] = "Extrusion Backwards"; +}; + +String RID_SVXSTR_DIRECTION + DIRECTION_E +{ + Text [ en-US ] = "Extrusion East"; +}; + +String RID_SVXSTR_DIRECTION + DIRECTION_SW +{ + Text [ en-US ] = "Extrusion South-West"; +}; + +String RID_SVXSTR_DIRECTION + DIRECTION_S +{ + Text [ en-US ] = "Extrusion South"; +}; + +String RID_SVXSTR_DIRECTION + DIRECTION_SE +{ + Text [ en-US ] = "Extrusion South-East"; }; DockingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING |