Kaydet (Commit) 9b214cac authored tarafından Caolán McNamara's avatar Caolán McNamara

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
üst 974a70cc
...@@ -870,7 +870,6 @@ ...@@ -870,7 +870,6 @@
#define RID_SVX_EXTRUSION_BAR (RID_SVX_START + 986) #define RID_SVX_EXTRUSION_BAR (RID_SVX_START + 986)
#define RID_SVX_FONTWORK_BAR (RID_SVX_START + 987) #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_LIGHTING (RID_SVX_START + 989)
#define RID_SVXFLOAT_EXTRUSION_SURFACE (RID_SVX_START + 990) #define RID_SVXFLOAT_EXTRUSION_SURFACE (RID_SVX_START + 990)
#define RID_SVXSTR_EXTRUSION_COLOR (RID_SVX_START + 991) #define RID_SVXSTR_EXTRUSION_COLOR (RID_SVX_START + 991)
...@@ -1051,9 +1050,11 @@ ...@@ -1051,9 +1050,11 @@
#define RID_SVXSTR_ZOOM (RID_SVX_START + 1292) #define RID_SVXSTR_ZOOM (RID_SVX_START + 1292)
#define RID_SVXSTR_ZOOM_IN (RID_SVX_START + 1293) #define RID_SVXSTR_ZOOM_IN (RID_SVX_START + 1293)
#define RID_SVXSTR_ZOOM_OUT (RID_SVX_START + 1294) #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 !!! // !!! 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 // 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 // of grouping them by semantics. The reason is that resource ids have to be
......
...@@ -65,7 +65,6 @@ ...@@ -65,7 +65,6 @@
#define HID_GALLERY_RENAME "SVX_HID_GALLERY_RENAME" #define HID_GALLERY_RENAME "SVX_HID_GALLERY_RENAME"
#define HID_GALLERY_THEMELIST "SVX_HID_GALLERY_THEMELIST" #define HID_GALLERY_THEMELIST "SVX_HID_GALLERY_THEMELIST"
#define HID_GALLERY_WINDOW "SVX_HID_GALLERY_WINDOW" #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_DIRECTION "SVX_HID_MENU_EXTRUSION_DIRECTION"
#define HID_MENU_EXTRUSION_LIGHTING "SVX_HID_MENU_EXTRUSION_LIGHTING" #define HID_MENU_EXTRUSION_LIGHTING "SVX_HID_MENU_EXTRUSION_LIGHTING"
#define HID_MENU_EXTRUSION_SURFACE "SVX_HID_MENU_EXTRUSION_SURFACE" #define HID_MENU_EXTRUSION_SURFACE "SVX_HID_MENU_EXTRUSION_SURFACE"
......
...@@ -315,36 +315,30 @@ ExtrusionDepthWindow::ExtrusionDepthWindow( ...@@ -315,36 +315,30 @@ ExtrusionDepthWindow::ExtrusionDepthWindow(
svt::ToolboxController& rController, svt::ToolboxController& rController,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
vcl::Window* pParentWindow 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 ) , mrController( rController )
, meUnit(FUNIT_NONE) , meUnit(FUNIT_NONE)
, mfDepth( -1.0 ) , mfDepth( -1.0 )
, msExtrusionDepth( ".uno:ExtrusionDepth" ) , msExtrusionDepth( ".uno:ExtrusionDepth" )
, msMetricUnit( ".uno:MetricUnit" ) , msMetricUnit( ".uno:MetricUnit" )
{ {
SetHelpId( HID_MENU_EXTRUSION_DEPTH );
SetSelectHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) ); SetSelectHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) );
OUString aEmpty; OUString aEmpty;
appendEntry( 0, aEmpty ); appendEntry(0, aEmpty);
appendEntry( 1, aEmpty ); appendEntry(1, aEmpty);
appendEntry( 2, aEmpty ); appendEntry(2, aEmpty);
appendEntry( 3, aEmpty ); appendEntry(3, aEmpty);
appendEntry( 4, aEmpty ); appendEntry(4, aEmpty);
appendEntry( 5, SVX_RESSTR( STR_INFINITY ) ); appendEntry(5, SVX_RESSTR(RID_SVXSTR_INFINITY));
appendEntry( 6, SVX_RESSTR( STR_CUSTOM ) ); appendEntry(6, SVX_RESSTR(RID_SVXSTR_CUSTOM));
SetOutputSizePixel( getMenuSize() ); SetOutputSizePixel( getMenuSize() );
FreeResource();
AddStatusListener( msExtrusionDepth ); AddStatusListener( msExtrusionDepth );
AddStatusListener( msMetricUnit ); AddStatusListener( msMetricUnit );
} }
void ExtrusionDepthWindow::implSetDepth( double fDepth ) void ExtrusionDepthWindow::implSetDepth( double fDepth )
{ {
mfDepth = fDepth; mfDepth = fDepth;
......
...@@ -138,30 +138,6 @@ DockingWindow RID_SVXFLOAT_EXTRUSION_DIRECTION ...@@ -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 DockingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING
{ {
HelpID = "svx:DockingWindow:RID_SVXFLOAT_EXTRUSION_LIGHTING"; HelpID = "svx:DockingWindow:RID_SVXFLOAT_EXTRUSION_LIGHTING";
...@@ -448,4 +424,14 @@ String RID_SVXSTR_DEPTH_4_INCH ...@@ -448,4 +424,14 @@ String RID_SVXSTR_DEPTH_4_INCH
Text [ en-US ] = "~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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment