summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-12-19 16:41:59 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-12-19 19:06:36 +0000
commit2764201eda020d07f7c2fe34c5042c92c9ec7006 (patch)
tree6eb0143076fc8f71a416006a905c0aff5a9a8323
parentaf6bce2e048a6e82754b8a73294ecd0c2780ef35 (diff)
convert RID_SVXFLOAT_EXTRUSION_SURFACE resource to just strings and images
Change-Id: I3cbd554daa74d2c0d9371cb6f07718edea7b24a0
-rw-r--r--include/svx/dialogs.hrc13
-rw-r--r--svx/inc/helpid.hrc1
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx34
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.hrc5
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.src114
5 files changed, 92 insertions, 75 deletions
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index 2ac959666423..ae8b7aa6bca3 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 59200f9edf28..20802cc9c5d8 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 1d87466f2028..155afdcff83c 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 04b3aa6d5180..f8956097deef 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 b298114138a3..bb6de2d57d8e 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