extras/source/glade/libreoffice-catalog.xml.in | 3 include/svx/dialogs.hrc | 3 include/svx/dlgctl3d.hxx | 15 include/svx/float3d.hxx | 204 +- include/vcl/dockwin.hxx | 6 svx/UIConfig_svx.mk | 1 svx/source/dialog/dlgctl3d.cxx | 36 svx/source/engine3d/float3d.cxx | 2059 ++++++++++--------------- svx/source/engine3d/float3d.src | 1119 ------------- svx/uiconfig/ui/docking3deffects.ui | 2048 ++++++++++++++++++++++++ vcl/source/window/dockwin.cxx | 32 11 files changed, 3053 insertions(+), 2473 deletions(-)
New commits: commit a73475cecdac393b40c34770be65be40bf05e011 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Dec 30 15:54:34 2014 +0000 DockingWindow will need a timer after all to update layout after initial show when contents change Change-Id: I8edbe84fa366cdb04dbfe5e479dc01cbf04dbf4c diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx index 6dfad81..6914781 100644 --- a/include/vcl/dockwin.hxx +++ b/include/vcl/dockwin.hxx @@ -247,6 +247,7 @@ private: sal_Int32 mnDockRight; sal_Int32 mnDockBottom; WinBits mnFloatBits; + Idle maLayoutIdle; bool mbDockCanceled:1, mbDockPrevented:1, mbFloatPrevented:1, @@ -268,6 +269,7 @@ private: SAL_DLLPRIVATE void ImplInitDockingWindowData(); SAL_DLLPRIVATE void setPosSizeOnContainee(Size aSize, Window &rBox); + DECL_DLLPRIVATE_LINK( ImplHandleLayoutTimerHdl, void* ); // Copy assignment is forbidden and not implemented. SAL_DLLPRIVATE DockingWindow (const DockingWindow &); @@ -291,6 +293,7 @@ public: SAL_DLLPRIVATE bool ImplStartDocking( const Point& rPos ); SAL_DLLPRIVATE bool isDeferredInit() const { return mbIsDefferedInit; } + SAL_DLLPRIVATE bool hasPendingLayout() const { return maLayoutIdle.IsActive(); } void doDeferredInit(WinBits nBits); protected: DockingWindow( WindowType nType ); @@ -361,9 +364,10 @@ public: void SetOutputSizePixel( const Size& rNewSize ) SAL_OVERRIDE; Size GetOutputSizePixel() const; - virtual void SetText( const OUString& rStr ) SAL_OVERRIDE; + virtual void SetText( const OUString& rStr ) SAL_OVERRIDE; virtual OUString GetText() const SAL_OVERRIDE; virtual Size GetOptimalSize() const SAL_OVERRIDE; + virtual void queue_resize(StateChangedType eReason = StateChangedType::LAYOUT) SAL_OVERRIDE; }; inline void DockingWindow::SetPin( bool bPin ) diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 95dd54b..6d9186e 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -329,6 +329,10 @@ void DockingWindow::ImplInitDockingWindowData() mbIsCalculatingInitialLayoutSize = false; mbInitialLayoutDone = false; mpDialogParent = NULL; + + //To-Do, reuse maResizeTimer + maLayoutIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE); + maLayoutIdle.SetIdleHdl( LINK( this, DockingWindow, ImplHandleLayoutTimerHdl ) ); } void DockingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle ) @@ -1078,6 +1082,8 @@ bool DockingWindow::isLayoutEnabled() const void DockingWindow::setOptimalLayoutSize() { + maLayoutIdle.Stop(); + //resize DockingWindow to fit requisition on initial show Window *pBox = GetWindow(WINDOW_FIRSTCHILD); @@ -1121,4 +1127,30 @@ Size DockingWindow::GetOptimalSize() const return Window::CalcWindowSize(aSize); } +void DockingWindow::queue_resize(StateChangedType /*eReason*/) +{ + if (hasPendingLayout() || isCalculatingInitialLayoutSize()) + return; + if (!isLayoutEnabled()) + return; + WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl; + pWindowImpl->mnOptimalWidthCache = -1; + pWindowImpl->mnOptimalHeightCache = -1; + maLayoutIdle.Start(); +} + +IMPL_LINK(DockingWindow, ImplHandleLayoutTimerHdl, void*, EMPTYARG) +{ + if (!isLayoutEnabled()) + { + SAL_WARN("vcl.layout", "DockingWindow has become non-layout because extra children have been added directly to it."); + return 0; + } + + Window *pBox = GetWindow(WINDOW_FIRSTCHILD); + assert(pBox); + setPosSizeOnContainee(GetSizePixel(), *pBox); + return 0; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 11d0c28601dc89c48e67a7b39ba82dd52e660334 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Dec 28 16:30:18 2014 +0000 convert RID_SVXFLOAT_3D docking window to .ui This is an epic dialog with lots of moving parts Change-Id: I4e53580ac5b01f4a717d2fe594a18c8e83b45a6f diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in index fff2991..d2f5aca 100644 --- a/extras/source/glade/libreoffice-catalog.xml.in +++ b/extras/source/glade/libreoffice-catalog.xml.in @@ -337,6 +337,9 @@ <glade-widget-class title="Svx 3D Light Control" name="svxlo-SvxLightCtl3D" generic-name="3D Light Control" parent="GtkDrawingArea" icon-name="widget-gtk-drawingarea"/> + <glade-widget-class title="Svx 3D Preview Control" name="svxlo-Svx3DPreviewControl" + generic-name="3D Preview Control" parent="GtkDrawingArea" + icon-name="widget-gtk-drawingarea"/> <glade-widget-class title="Frame Selector" name="svxlo-SvxFrameSelector" generic-name="Frame Border Preview Window" parent="GtkDrawingArea" icon-name="widget-gtk-drawingarea"/> diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index fefec1a5..0c02465 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -140,13 +140,10 @@ #define RID_SVXIL_FRAME (RID_SVX_START + 65) #define RID_SVXIL_DATANAVI (RID_SVX_START + 66) -#define RID_SVXFLOAT_3D (RID_SVX_START + 209) - #define RID_SVXIMAGE_LIGHT_ON (RID_SVX_START + 210) #define RID_SVXIMAGE_LIGHT_OFF (RID_SVX_START + 211) #define RID_SVXIMAGE_COLORDLG (RID_SVX_START + 214) -#define RID_SVXFLOAT3D_COLOR_LIGHT_PRE (RID_SVX_START + 72) #define RID_SVXFLOAT3D_FAVORITE (RID_SVX_START + 73) #define RID_SVXFLOAT3D_FIX_X (RID_SVX_START + 74) #define RID_SVXFLOAT3D_FIX_Y (RID_SVX_START + 75) diff --git a/include/svx/dlgctl3d.hxx b/include/svx/dlgctl3d.hxx index 8d3901b..31796a2 100644 --- a/include/svx/dlgctl3d.hxx +++ b/include/svx/dlgctl3d.hxx @@ -27,21 +27,15 @@ #include <svx/svxdllapi.h> #include <basegfx/vector/b3dvector.hxx> - - class FmFormModel; class FmFormPage; class E3dView; class E3dPolyScene; class E3dObject; - - #define PREVIEW_OBJECTTYPE_SPHERE 0x0000 #define PREVIEW_OBJECTTYPE_CUBE 0x0001 - - class SVX_DLLPUBLIC Svx3DPreviewControl : public Control { protected: @@ -55,13 +49,13 @@ protected: void Construct(); public: - Svx3DPreviewControl(vcl::Window* pParent, const ResId& rResId); Svx3DPreviewControl(vcl::Window* pParent, WinBits nStyle = 0); virtual ~Svx3DPreviewControl(); virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; + virtual Size GetOptimalSize() const SAL_OVERRIDE; void Reset(); virtual void SetObjectType(sal_uInt16 nType); @@ -70,8 +64,6 @@ public: virtual void Set3DAttributes(const SfxItemSet& rAttr); }; - - class SVX_DLLPUBLIC Svx3DLightControl : public Svx3DPreviewControl { // Callback for interactive changes @@ -149,8 +141,6 @@ public: basegfx::B3DVector GetLightDirection(sal_uInt32 nNum) const; }; - - class SVX_DLLPUBLIC SvxLightCtl3D : public Control { private: @@ -165,8 +155,7 @@ private: Link maUserSelectionChangeCallback; public: - SvxLightCtl3D( vcl::Window* pParent, const ResId& rResId); - SvxLightCtl3D( vcl::Window* pParent); + SvxLightCtl3D(vcl::Window* pParent); virtual ~SvxLightCtl3D(); // react to size changes diff --git a/include/svx/float3d.hxx b/include/svx/float3d.hxx index 610ec06..fcc6dce 100644 --- a/include/svx/float3d.hxx +++ b/include/svx/float3d.hxx @@ -60,134 +60,114 @@ class SVX_DLLPUBLIC Svx3DWin : public SfxDockingWindow using Window::Update; private: - ImageButton aBtnGeo; - ImageButton aBtnRepresentation; - ImageButton aBtnLight; - ImageButton aBtnTexture; - ImageButton aBtnMaterial; - ImageButton aBtnUpdate; - ImageButton aBtnAssign; + PushButton* m_pBtnGeo; + PushButton* m_pBtnRepresentation; + PushButton* m_pBtnLight; + PushButton* m_pBtnTexture; + PushButton* m_pBtnMaterial; + PushButton* m_pBtnUpdate; + PushButton* m_pBtnAssign; // geometry - FixedLine aFLGeometrie; - FixedText aFtPercentDiagonal; - MetricField aMtrPercentDiagonal; - FixedText aFtBackscale; - MetricField aMtrBackscale; - FixedText aFtEndAngle; - MetricField aMtrEndAngle; - FixedText aFtDepth; - MetricField aMtrDepth; - FixedLine aFLSegments; - - FixedText aFtHorizontal; - NumericField aNumHorizontal; - FixedText aFtVertical; - NumericField aNumVertical; - FixedLine aFLNormals; - - ImageButton aBtnNormalsObj; - ImageButton aBtnNormalsFlat; - ImageButton aBtnNormalsSphere; - ImageButton aBtnNormalsInvert; - ImageButton aBtnTwoSidedLighting; - - ImageButton aBtnDoubleSided; - FixedLine aFLRepresentation; + VclContainer* m_pFLGeometrie; + FixedText* m_pFtPercentDiagonal; + MetricField* m_pMtrPercentDiagonal; + FixedText* m_pFtBackscale; + MetricField* m_pMtrBackscale; + FixedText* m_pFtEndAngle; + MetricField* m_pMtrEndAngle; + FixedText* m_pFtDepth; + MetricField* m_pMtrDepth; + + VclContainer* m_pFLSegments; + NumericField* m_pNumHorizontal; + NumericField* m_pNumVertical; + + VclContainer* m_pFLNormals; + PushButton* m_pBtnNormalsObj; + PushButton* m_pBtnNormalsFlat; + PushButton* m_pBtnNormalsSphere; + PushButton* m_pBtnNormalsInvert; + PushButton* m_pBtnTwoSidedLighting; + PushButton* m_pBtnDoubleSided; + // presentation - FixedText aFtShademode; - ListBox aLbShademode; - FixedLine aFLShadow; - ImageButton aBtnShadow3d; - FixedText aFtSlant; - MetricField aMtrSlant; - FixedText aFtDistance; - MetricField aMtrDistance; - FixedText aFtFocalLeng; - MetricField aMtrFocalLength; - FixedLine aFLCamera; - FixedLine aFLLight; + VclContainer* m_pFLRepresentation; + ListBox* m_pLbShademode; + + VclContainer* m_pFLShadow; + PushButton* m_pBtnShadow3d; + FixedText* m_pFtSlant; + MetricField* m_pMtrSlant; + + VclContainer* m_pFLCamera; + MetricField* m_pMtrDistance; + MetricField* m_pMtrFocalLength; // lighting - ImageButton aBtnLight1; - ImageButton aBtnLight2; - ImageButton aBtnLight3; - ImageButton aBtnLight4; - ImageButton aBtnLight5; - ImageButton aBtnLight6; - ImageButton aBtnLight7; - ImageButton aBtnLight8; - FixedText aFTLightsource; - ColorLB aLbLight1; - ColorLB aLbLight2; - ColorLB aLbLight3; - ColorLB aLbLight4; - ColorLB aLbLight5; - ColorLB aLbLight6; - ColorLB aLbLight7; - ColorLB aLbLight8; - - ImageButton aBtnLightColor; - - // #99694# Keyboard shortcuts activate the next control, so the - // order needed to be changed here - FixedText aFTAmbientlight; // Text label - ColorLB aLbAmbientlight; // ListBox - ImageButton aBtnAmbientColor; // color button - - FixedLine aFLTexture; + VclContainer* m_pFLLight; + PushButton* m_pBtnLight1; + PushButton* m_pBtnLight2; + PushButton* m_pBtnLight3; + PushButton* m_pBtnLight4; + PushButton* m_pBtnLight5; + PushButton* m_pBtnLight6; + PushButton* m_pBtnLight7; + PushButton* m_pBtnLight8; + ColorLB* m_pLbLight1; + ColorLB* m_pLbLight2; + ColorLB* m_pLbLight3; + ColorLB* m_pLbLight4; + ColorLB* m_pLbLight5; + ColorLB* m_pLbLight6; + ColorLB* m_pLbLight7; + ColorLB* m_pLbLight8; + PushButton* m_pBtnLightColor; + ColorLB* m_pLbAmbientlight; // ListBox + PushButton* m_pBtnAmbientColor; // color button // Textures - FixedText aFtTexKind; - ImageButton aBtnTexLuminance; - ImageButton aBtnTexColor; - FixedText aFtTexMode; - ImageButton aBtnTexReplace; - ImageButton aBtnTexModulate; - ImageButton aBtnTexBlend; - FixedText aFtTexProjectionX; - ImageButton aBtnTexObjectX; - ImageButton aBtnTexParallelX; - ImageButton aBtnTexCircleX; - FixedText aFtTexProjectionY; - ImageButton aBtnTexObjectY; - ImageButton aBtnTexParallelY; - ImageButton aBtnTexCircleY; - FixedText aFtTexFilter; - ImageButton aBtnTexFilter; + VclContainer* m_pFLTexture; + PushButton* m_pBtnTexLuminance; + PushButton* m_pBtnTexColor; + PushButton* m_pBtnTexReplace; + PushButton* m_pBtnTexModulate; + PushButton* m_pBtnTexBlend; + PushButton* m_pBtnTexObjectX; + PushButton* m_pBtnTexParallelX; + PushButton* m_pBtnTexCircleX; + PushButton* m_pBtnTexObjectY; + PushButton* m_pBtnTexParallelY; + PushButton* m_pBtnTexCircleY; + PushButton* m_pBtnTexFilter; // material // material editor - FixedLine aFLMaterial; - FixedText aFtMatFavorites; - ListBox aLbMatFavorites; - FixedText aFtMatColor; - ColorLB aLbMatColor; - ImageButton aBtnMatColor; - FixedText aFtMatEmission; - ColorLB aLbMatEmission; - ImageButton aBtnEmissionColor; - FixedLine aFLMatSpecular; - FixedText aFtMatSpecular; - ColorLB aLbMatSpecular; - ImageButton aBtnSpecularColor; - FixedText aFtMatSpecularIntensity; - MetricField aMtrMatSpecularIntensity; - - Svx3DPreviewControl aCtlPreview; - SvxLightCtl3D aCtlLightPreview; + VclContainer* m_pFLMaterial; + ListBox* m_pLbMatFavorites; + ColorLB* m_pLbMatColor; + PushButton* m_pBtnMatColor; + ColorLB* m_pLbMatEmission; + PushButton* m_pBtnEmissionColor; + + VclContainer* m_pFLMatSpecular; + ColorLB* m_pLbMatSpecular; + PushButton* m_pBtnSpecularColor; + MetricField* m_pMtrMatSpecularIntensity; + + Svx3DPreviewControl* m_pCtlPreview; + SvxLightCtl3D* m_pCtlLightPreview; // bottom part - ImageButton aBtnConvertTo3D; - ImageButton aBtnLatheObject; - ImageButton aBtnPerspective; + PushButton* m_pBtnConvertTo3D; + PushButton* m_pBtnLatheObject; + PushButton* m_pBtnPerspective; // the rest ... Image aImgLightOn; Image aImgLightOff; bool bUpdate; ViewType3D eViewType; - Size aSize; // Model, Page, View etc. for favourites FmFormModel* pModel; @@ -230,8 +210,8 @@ private: SVX_DLLPRIVATE sal_uInt16 GetLightSource( const PushButton* pBtn = NULL ); SVX_DLLPRIVATE ColorLB* GetLbByButton( const PushButton* pBtn = NULL ); - SVX_DLLPRIVATE bool GetUILightState( const ImageButton& rBtn ) const; - SVX_DLLPRIVATE void SetUILightState( ImageButton& aBtn, bool bState ); + SVX_DLLPRIVATE bool GetUILightState( const PushButton& rBtn ) const; + SVX_DLLPRIVATE void SetUILightState( PushButton& aBtn, bool bState ); protected: virtual void Resize() SAL_OVERRIDE; diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk index da79eb8..1cd6d85 100644 --- a/svx/UIConfig_svx.mk +++ b/svx/UIConfig_svx.mk @@ -25,6 +25,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\ svx/uiconfig/ui/datanavigator \ svx/uiconfig/ui/deleteheaderdialog \ svx/uiconfig/ui/deletefooterdialog \ + svx/uiconfig/ui/docking3deffects \ svx/uiconfig/ui/dockingcolorreplace \ svx/uiconfig/ui/docrecoverybrokendialog \ svx/uiconfig/ui/docrecoveryprogressdialog \ diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index 4711b30..ce43581 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -41,8 +41,8 @@ using namespace com::sun::star; -Svx3DPreviewControl::Svx3DPreviewControl(vcl::Window* pParent, const ResId& rResId) -: Control(pParent, rResId), +Svx3DPreviewControl::Svx3DPreviewControl(vcl::Window* pParent, WinBits nStyle) +: Control(pParent, nStyle), mpModel(0), mpFmPage(0), mp3DView(0), @@ -57,20 +57,14 @@ Svx3DPreviewControl::Svx3DPreviewControl(vcl::Window* pParent, const ResId& rRes SetBackground(); } -Svx3DPreviewControl::Svx3DPreviewControl(vcl::Window* pParent, WinBits nStyle) -: Control(pParent, nStyle), - mpModel(0), - mpFmPage(0), - mp3DView(0), - mpScene(0), - mp3DObj(0), - mnObjectType(PREVIEW_OBJECTTYPE_SPHERE) +Size Svx3DPreviewControl::GetOptimalSize() const { - Construct(); + return LogicToPixel(Size(80, 100), MAP_APPFONT); +} - // do not paint background self, DrawingLayer paints this buffered and as page - SetControlBackground(); - SetBackground(); +extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvx3DPreviewControl(vcl::Window *pParent, VclBuilder::stringmap &) +{ + return new Svx3DPreviewControl(pParent); } Svx3DPreviewControl::~Svx3DPreviewControl() @@ -952,19 +946,6 @@ basegfx::B3DVector Svx3DLightControl::GetLightDirection(sal_uInt32 nNum) const return basegfx::B3DVector(); } - - -SvxLightCtl3D::SvxLightCtl3D( vcl::Window* pParent, const ResId& rResId) -: Control(pParent, rResId), - maLightControl(this, 0), - maHorScroller(this, WB_HORZ | WB_DRAG), - maVerScroller(this, WB_VERT | WB_DRAG), - maSwitcher(this, 0) -{ - // init members - Init(); -} - SvxLightCtl3D::SvxLightCtl3D( vcl::Window* pParent) : Control(pParent, WB_BORDER | WB_TABSTOP), maLightControl(this, 0), @@ -986,7 +967,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxLightCtl3D(vcl::Win return new SvxLightCtl3D(pParent); } - void SvxLightCtl3D::Init() { // #i58240# set HelpIDs for scrollbars and switcher diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index b584e5d..e8fa22d 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -83,252 +83,223 @@ namespace { } } -Svx3DWin::Svx3DWin( SfxBindings* pInBindings, - SfxChildWindow *pCW, vcl::Window* pParent ) : - SfxDockingWindow ( pInBindings, pCW, pParent, - SVX_RES( RID_SVXFLOAT_3D ) ), - aBtnGeo ( this, SVX_RES( BTN_GEO ) ), - aBtnRepresentation ( this, SVX_RES( BTN_REPRESENTATION ) ), - aBtnLight ( this, SVX_RES( BTN_LIGHT ) ), - aBtnTexture ( this, SVX_RES( BTN_TEXTURE ) ), - aBtnMaterial ( this, SVX_RES( BTN_MATERIAL ) ), - aBtnUpdate ( this, SVX_RES( BTN_UPDATE ) ), - aBtnAssign ( this, SVX_RES( BTN_ASSIGN ) ), - aFLGeometrie ( this, SVX_RES( FL_GEOMETRIE ) ), - - // Geometry - aFtPercentDiagonal ( this, SVX_RES( FT_PERCENT_DIAGONAL ) ), - aMtrPercentDiagonal ( this, SVX_RES( MTR_PERCENT_DIAGONAL ) ), - aFtBackscale ( this, SVX_RES( FT_BACKSCALE ) ), - aMtrBackscale ( this, SVX_RES( MTR_BACKSCALE ) ), - aFtEndAngle ( this, SVX_RES( FT_END_ANGLE ) ), - aMtrEndAngle ( this, SVX_RES( MTR_END_ANGLE ) ), - aFtDepth ( this, SVX_RES( FT_DEPTH ) ), - aMtrDepth ( this, SVX_RES( MTR_DEPTH ) ), - aFLSegments ( this, SVX_RES( FL_SEGMENTS ) ), - - aFtHorizontal ( this, SVX_RES( FT_HORIZONTAL ) ), - aNumHorizontal ( this, SVX_RES( NUM_HORIZONTAL ) ), - aFtVertical ( this, SVX_RES( FT_VERTICAL ) ), - aNumVertical ( this, SVX_RES( NUM_VERTICAL ) ), - - aFLNormals ( this, SVX_RES( FL_NORMALS ) ), - aBtnNormalsObj ( this, SVX_RES( BTN_NORMALS_OBJ ) ), - aBtnNormalsFlat ( this, SVX_RES( BTN_NORMALS_FLAT ) ), - aBtnNormalsSphere ( this, SVX_RES( BTN_NORMALS_SPHERE ) ), - aBtnNormalsInvert ( this, SVX_RES( BTN_NORMALS_INVERT ) ), - aBtnTwoSidedLighting( this, SVX_RES( BTN_TWO_SIDED_LIGHTING ) ), - - aBtnDoubleSided ( this, SVX_RES( BTN_DOUBLE_SIDED ) ), - - // Representation - aFLRepresentation ( this, SVX_RES( FL_REPRESENTATION ) ), - aFtShademode ( this, SVX_RES( FT_SHADEMODE ) ), - aLbShademode ( this, SVX_RES( LB_SHADEMODE ) ), - aFLShadow ( this, SVX_RES( FL_SHADOW ) ), - aBtnShadow3d ( this, SVX_RES( BTN_SHADOW_3D ) ), - aFtSlant ( this, SVX_RES( FT_SLANT ) ), - aMtrSlant ( this, SVX_RES( MTR_SLANT ) ), - aFtDistance ( this, SVX_RES( FT_DISTANCE ) ), - aMtrDistance ( this, SVX_RES( MTR_DISTANCE ) ), - aFtFocalLeng ( this, SVX_RES( FT_FOCAL_LENGTH ) ), - aMtrFocalLength ( this, SVX_RES( MTR_FOCAL_LENGTH ) ), - aFLCamera ( this, SVX_RES( FL_CAMERA ) ), - aFLLight ( this, SVX_RES( FL_LIGHT ) ), - - // Lighting - aBtnLight1 ( this, SVX_RES( BTN_LIGHT_1 ) ), - aBtnLight2 ( this, SVX_RES( BTN_LIGHT_2 ) ), - aBtnLight3 ( this, SVX_RES( BTN_LIGHT_3 ) ), - aBtnLight4 ( this, SVX_RES( BTN_LIGHT_4 ) ), - aBtnLight5 ( this, SVX_RES( BTN_LIGHT_5 ) ), - aBtnLight6 ( this, SVX_RES( BTN_LIGHT_6 ) ), - aBtnLight7 ( this, SVX_RES( BTN_LIGHT_7 ) ), - aBtnLight8 ( this, SVX_RES( BTN_LIGHT_8 ) ), - aFTLightsource ( this, SVX_RES( FT_LIGHTSOURCE ) ), - aLbLight1 ( this, SVX_RES( LB_LIGHT_1 ) ), - aLbLight2 ( this, SVX_RES( LB_LIGHT_2 ) ), - aLbLight3 ( this, SVX_RES( LB_LIGHT_3 ) ), - aLbLight4 ( this, SVX_RES( LB_LIGHT_4 ) ), - aLbLight5 ( this, SVX_RES( LB_LIGHT_5 ) ), - aLbLight6 ( this, SVX_RES( LB_LIGHT_6 ) ), - aLbLight7 ( this, SVX_RES( LB_LIGHT_7 ) ), - aLbLight8 ( this, SVX_RES( LB_LIGHT_8 ) ), - - aBtnLightColor ( this, SVX_RES( BTN_LIGHT_COLOR ) ), - - // Keyboard shortcuts activate the next control, so the - // order needed to be changed here - aFTAmbientlight ( this, SVX_RES( FT_AMBIENTLIGHT ) ), // Text label - aLbAmbientlight ( this, SVX_RES( LB_AMBIENTLIGHT ) ), // ListBox - aBtnAmbientColor ( this, SVX_RES( BTN_AMBIENT_COLOR ) ), // color button - aFLTexture ( this, SVX_RES( FL_TEXTURE ) ), - - // Textures - aFtTexKind ( this, SVX_RES( FT_TEX_KIND ) ), - aBtnTexLuminance ( this, SVX_RES( BTN_TEX_LUMINANCE ) ), - aBtnTexColor ( this, SVX_RES( BTN_TEX_COLOR ) ), - aFtTexMode ( this, SVX_RES( FT_TEX_MODE ) ), - aBtnTexReplace ( this, SVX_RES( BTN_TEX_REPLACE ) ), - aBtnTexModulate ( this, SVX_RES( BTN_TEX_MODULATE ) ), - aBtnTexBlend ( this, SVX_RES( BTN_TEX_BLEND ) ), - aFtTexProjectionX ( this, SVX_RES( FT_TEX_PROJECTION_X ) ), - aBtnTexObjectX ( this, SVX_RES( BTN_TEX_OBJECT_X ) ), - aBtnTexParallelX ( this, SVX_RES( BTN_TEX_PARALLEL_X ) ), - aBtnTexCircleX ( this, SVX_RES( BTN_TEX_CIRCLE_X ) ), - aFtTexProjectionY ( this, SVX_RES( FT_TEX_PROJECTION_Y ) ), - aBtnTexObjectY ( this, SVX_RES( BTN_TEX_OBJECT_Y ) ), - aBtnTexParallelY ( this, SVX_RES( BTN_TEX_PARALLEL_Y ) ), - aBtnTexCircleY ( this, SVX_RES( BTN_TEX_CIRCLE_Y ) ), - aFtTexFilter ( this, SVX_RES( FT_TEX_FILTER ) ), - aBtnTexFilter ( this, SVX_RES( BTN_TEX_FILTER ) ), - aFLMaterial ( this, SVX_RES( FL_MATERIAL ) ), - - // Material - aFtMatFavorites ( this, SVX_RES( FT_MAT_FAVORITES ) ), - aLbMatFavorites ( this, SVX_RES( LB_MAT_FAVORITES ) ), - aFtMatColor ( this, SVX_RES( FT_MAT_COLOR ) ), - aLbMatColor ( this, SVX_RES( LB_MAT_COLOR ) ), - aBtnMatColor ( this, SVX_RES( BTN_MAT_COLOR ) ), - aFtMatEmission ( this, SVX_RES( FT_MAT_EMISSION ) ), - aLbMatEmission ( this, SVX_RES( LB_MAT_EMISSION ) ), - aBtnEmissionColor ( this, SVX_RES( BTN_EMISSION_COLOR ) ), - aFLMatSpecular ( this, SVX_RES( FL_MAT_SPECULAR ) ), - aFtMatSpecular ( this, SVX_RES( FT_MAT_SPECULAR ) ), - aLbMatSpecular ( this, SVX_RES( LB_MAT_SPECULAR ) ), - aBtnSpecularColor ( this, SVX_RES( BTN_SPECULAR_COLOR ) ), - aFtMatSpecularIntensity( this, SVX_RES( FT_MAT_SPECULAR_INTENSITY ) ), - aMtrMatSpecularIntensity( this, SVX_RES( MTR_MAT_SPECULAR_INTENSITY ) ), - aCtlPreview ( this, SVX_RES( CTL_PREVIEW ) ), - aCtlLightPreview ( this, SVX_RES( CTL_LIGHT_PREVIEW ) ), - - // Lower Range - aBtnConvertTo3D ( this, SVX_RES( BTN_CHANGE_TO_3D ) ), - aBtnLatheObject ( this, SVX_RES( BTN_LATHE_OBJ ) ), - aBtnPerspective ( this, SVX_RES( BTN_PERSPECTIVE ) ), - - aImgLightOn ( SVX_RES( RID_SVXIMAGE_LIGHT_ON ) ), - aImgLightOff ( SVX_RES( RID_SVXIMAGE_LIGHT_OFF ) ), - - bUpdate ( false ), - eViewType ( VIEWTYPE_GEO ), - - pModel ( NULL ), - pVDev ( NULL ), - p3DView ( NULL ), - - pBindings ( pInBindings ), - pControllerItem(0L), - pConvertTo3DItem(0L), - pConvertTo3DLatheItem(0L), - mpImpl ( new Svx3DWinImpl() ), - mpRemember2DAttributes(NULL), - bOnly3DChanged ( false ) +Svx3DWin::Svx3DWin(SfxBindings* pInBindings, SfxChildWindow *pCW, vcl::Window* pParent) + : SfxDockingWindow (pInBindings, pCW, pParent, + "Docking3DEffects", "svx/ui/docking3deffects.ui") + , aImgLightOn(SVX_RES(RID_SVXIMAGE_LIGHT_ON)) + , aImgLightOff(SVX_RES(RID_SVXIMAGE_LIGHT_OFF)) + , bUpdate(false) + , eViewType(VIEWTYPE_GEO) + , pModel(NULL) + , pVDev(NULL) + , p3DView(NULL) + , pBindings(pInBindings) + , pControllerItem(0) + , pConvertTo3DItem(0) + , pConvertTo3DLatheItem(0) + , mpImpl(new Svx3DWinImpl()) + , mpRemember2DAttributes(NULL) + , bOnly3DChanged(false) { - OUString accname(SVX_RESSTR(RID_SVXFLOAT3D_COLOR_LIGHT_PRE)); - aCtlLightPreview.SetAccessibleName(accname); - aCtlPreview.SetAccessibleName(accname); - aLbAmbientlight.SetAccessibleName(aFTAmbientlight.GetDisplayText()); + get(m_pBtnGeo, "geometry"); + get(m_pBtnRepresentation, "representation"); + get(m_pBtnLight, "light"); + get(m_pBtnTexture, "texture"); + get(m_pBtnMaterial, "material"); + get(m_pBtnUpdate, "update"); + get(m_pBtnAssign, "assign"); + + get(m_pFLGeometrie, "geoframe"); + get(m_pFtPercentDiagonal, "diagonalft"); + get(m_pMtrPercentDiagonal, "diagonal"); + get(m_pFtBackscale, "scaleddepthft"); + get(m_pMtrBackscale, "scaleddepth"); + get(m_pFtEndAngle, "angleft"); + get(m_pMtrEndAngle, "angle"); + get(m_pFtDepth, "depthft"); + get(m_pMtrDepth, "depth"); + + get(m_pFLSegments, "segmentsframe"); + get(m_pNumHorizontal, "hori"); + get(m_pNumVertical, "veri"); + + get(m_pFLNormals, "normals"); + get(m_pBtnNormalsObj, "objspecific"); + get(m_pBtnNormalsFlat, "flat"); + get(m_pBtnNormalsSphere, "spherical"); + get(m_pBtnNormalsInvert, "invertnormals"); + get(m_pBtnTwoSidedLighting, "doublesidedillum"); + get(m_pBtnDoubleSided, "doublesided"); + + get(m_pFLRepresentation, "shadingframe"); + get(m_pLbShademode, "mode"); + + get(m_pFLShadow, "shadowframe"); + get(m_pBtnShadow3d, "shadow"); + get(m_pFtSlant, "slantft"); + get(m_pMtrSlant, "slant"); + + get(m_pFLCamera, "cameraframe"); + get(m_pMtrDistance, "distance"); + get(m_pMtrFocalLength, "focal"); + + get(m_pFLLight, "illumframe"); + get(m_pBtnLight1, "light1"); + get(m_pBtnLight2, "light2"); + get(m_pBtnLight3, "light3"); + get(m_pBtnLight4, "light4"); + get(m_pBtnLight5, "light5"); + get(m_pBtnLight6, "light6"); + get(m_pBtnLight7, "light7"); + get(m_pBtnLight8, "light8"); + get(m_pLbLight1, "lightcolor1"); + get(m_pLbLight2, "lightcolor2"); + get(m_pLbLight3, "lightcolor3"); + get(m_pLbLight4, "lightcolor4"); + get(m_pLbLight5, "lightcolor5"); + get(m_pLbLight6, "lightcolor6"); + get(m_pLbLight7, "lightcolor7"); + get(m_pLbLight8, "lightcolor8"); + get(m_pBtnLightColor, "colorbutton1"); + get(m_pLbAmbientlight, "ambientcolor"); + get(m_pBtnAmbientColor, "colorbutton2"); + + get(m_pFLTexture, "textureframe"); + get(m_pBtnTexLuminance, "textype"); + get(m_pBtnTexColor, "texcolor"); + get(m_pBtnTexReplace, "texreplace"); + get(m_pBtnTexModulate, "texmodulate"); + get(m_pBtnTexBlend, "texblend"); + get(m_pBtnTexObjectX, "texobjx"); + get(m_pBtnTexParallelX, "texparallelx"); + get(m_pBtnTexCircleX, "texcirclex"); + get(m_pBtnTexObjectY, "texobjy"); + get(m_pBtnTexParallelY, "texparallely"); + get(m_pBtnTexCircleY, "texcircley"); + get(m_pBtnTexFilter, "texfilter"); + + get(m_pFLMaterial, "materialframe"); + get(m_pLbMatFavorites, "favorites"); + get(m_pLbMatColor, "objcolor"); + get(m_pBtnMatColor, "colorbutton3"); + get(m_pLbMatEmission, "illumcolor"); + get(m_pBtnEmissionColor, "colorbutton4"); + + get(m_pFLMatSpecular, "specframe"); + get(m_pLbMatSpecular, "speccolor"); + get(m_pBtnSpecularColor, "colorbutton5"); + get(m_pMtrMatSpecularIntensity, "intensity"); + + get(m_pCtlPreview, "preview"); + get(m_pCtlLightPreview, "lightpreview"); + Size aSize(LogicToPixel(Size(83, 76), MAP_APPFONT)); + m_pCtlPreview->set_width_request(aSize.Width()); + m_pCtlLightPreview->set_width_request(aSize.Width()); + m_pCtlPreview->set_height_request(aSize.Height()); + m_pCtlLightPreview->set_height_request(aSize.Height()); + + get(m_pBtnConvertTo3D, "to3d"); + get(m_pBtnLatheObject, "tolathe"); + get(m_pBtnPerspective, "perspective"); mpImpl->pPool = NULL; - FreeResource(); // Set Metric eFUnit = pInBindings->GetDispatcher()->GetModule()->GetFieldUnit(); - aMtrDepth.SetUnit( eFUnit ); - aMtrDistance.SetUnit( eFUnit ); - aMtrFocalLength.SetUnit( eFUnit ); + m_pMtrDepth->SetUnit( eFUnit ); + m_pMtrDistance->SetUnit( eFUnit ); + m_pMtrFocalLength->SetUnit( eFUnit ); pControllerItem = new Svx3DCtrlItem(SID_3D_STATE, pBindings); pConvertTo3DItem = new SvxConvertTo3DItem(SID_CONVERT_TO_3D, pBindings); pConvertTo3DLatheItem = new SvxConvertTo3DItem(SID_CONVERT_TO_3D_LATHE_FAST, pBindings); - aBtnAssign.SetClickHdl( LINK( this, Svx3DWin, ClickAssignHdl ) ); - aBtnUpdate.SetClickHdl( LINK( this, Svx3DWin, ClickUpdateHdl ) ); + m_pBtnAssign->SetClickHdl( LINK( this, Svx3DWin, ClickAssignHdl ) ); + m_pBtnUpdate->SetClickHdl( LINK( this, Svx3DWin, ClickUpdateHdl ) ); Link aLink( LINK( this, Svx3DWin, ClickViewTypeHdl ) ); - aBtnGeo.SetClickHdl( aLink ); - aBtnRepresentation.SetClickHdl( aLink ); - aBtnLight.SetClickHdl( aLink ); - aBtnTexture.SetClickHdl( aLink ); - aBtnMaterial.SetClickHdl( aLink ); + m_pBtnGeo->SetClickHdl( aLink ); + m_pBtnRepresentation->SetClickHdl( aLink ); + m_pBtnLight->SetClickHdl( aLink ); + m_pBtnTexture->SetClickHdl( aLink ); + m_pBtnMaterial->SetClickHdl( aLink ); aLink = LINK( this, Svx3DWin, ClickHdl ); - aBtnPerspective.SetClickHdl( aLink ); - aBtnConvertTo3D.SetClickHdl( aLink ); - aBtnLatheObject.SetClickHdl( aLink ); + m_pBtnPerspective->SetClickHdl( aLink ); + m_pBtnConvertTo3D->SetClickHdl( aLink ); + m_pBtnLatheObject->SetClickHdl( aLink ); // Geometry - aBtnNormalsObj.SetClickHdl( aLink ); - aBtnNormalsFlat.SetClickHdl( aLink ); - aBtnNormalsSphere.SetClickHdl( aLink ); - aBtnTwoSidedLighting.SetClickHdl( aLink ); - aBtnNormalsInvert.SetClickHdl( aLink ); - aBtnDoubleSided.SetClickHdl( aLink ); + m_pBtnNormalsObj->SetClickHdl( aLink ); + m_pBtnNormalsFlat->SetClickHdl( aLink ); + m_pBtnNormalsSphere->SetClickHdl( aLink ); + m_pBtnTwoSidedLighting->SetClickHdl( aLink ); + m_pBtnNormalsInvert->SetClickHdl( aLink ); + m_pBtnDoubleSided->SetClickHdl( aLink ); // Representation - aBtnShadow3d.SetClickHdl( aLink ); + m_pBtnShadow3d->SetClickHdl( aLink ); // Lighting - aBtnLight1.SetClickHdl( aLink ); - aBtnLight2.SetClickHdl( aLink ); - aBtnLight3.SetClickHdl( aLink ); - aBtnLight4.SetClickHdl( aLink ); - aBtnLight5.SetClickHdl( aLink ); - aBtnLight6.SetClickHdl( aLink ); - aBtnLight7.SetClickHdl( aLink ); - aBtnLight8.SetClickHdl( aLink ); + m_pBtnLight1->SetClickHdl( aLink ); + m_pBtnLight2->SetClickHdl( aLink ); + m_pBtnLight3->SetClickHdl( aLink ); + m_pBtnLight4->SetClickHdl( aLink ); + m_pBtnLight5->SetClickHdl( aLink ); + m_pBtnLight6->SetClickHdl( aLink ); + m_pBtnLight7->SetClickHdl( aLink ); + m_pBtnLight8->SetClickHdl( aLink ); // Textures - aBtnTexLuminance.SetClickHdl( aLink ); - aBtnTexColor.SetClickHdl( aLink ); - aBtnTexReplace.SetClickHdl( aLink ); - aBtnTexModulate.SetClickHdl( aLink ); - aBtnTexParallelX.SetClickHdl( aLink ); - aBtnTexCircleX.SetClickHdl( aLink ); - aBtnTexObjectX.SetClickHdl( aLink ); - aBtnTexParallelY.SetClickHdl( aLink ); - aBtnTexCircleY.SetClickHdl( aLink ); - aBtnTexObjectY.SetClickHdl( aLink ); - aBtnTexFilter.SetClickHdl( aLink ); + m_pBtnTexLuminance->SetClickHdl( aLink ); + m_pBtnTexColor->SetClickHdl( aLink ); + m_pBtnTexReplace->SetClickHdl( aLink ); + m_pBtnTexModulate->SetClickHdl( aLink ); + m_pBtnTexParallelX->SetClickHdl( aLink ); + m_pBtnTexCircleX->SetClickHdl( aLink ); + m_pBtnTexObjectX->SetClickHdl( aLink ); + m_pBtnTexParallelY->SetClickHdl( aLink ); + m_pBtnTexCircleY->SetClickHdl( aLink ); + m_pBtnTexObjectY->SetClickHdl( aLink ); + m_pBtnTexFilter->SetClickHdl( aLink ); // Material aLink = LINK( this, Svx3DWin, ClickColorHdl ); - aBtnLightColor.SetClickHdl( aLink ); - aBtnAmbientColor.SetClickHdl( aLink ); - aBtnMatColor.SetClickHdl( aLink ); - aBtnEmissionColor.SetClickHdl( aLink ); - aBtnSpecularColor.SetClickHdl( aLink ); + m_pBtnLightColor->SetClickHdl( aLink ); + m_pBtnAmbientColor->SetClickHdl( aLink ); + m_pBtnMatColor->SetClickHdl( aLink ); + m_pBtnEmissionColor->SetClickHdl( aLink ); + m_pBtnSpecularColor->SetClickHdl( aLink ); aLink = LINK( this, Svx3DWin, SelectHdl ); - aLbMatFavorites.SetSelectHdl( aLink ); - aLbMatColor.SetSelectHdl( aLink ); - aLbMatEmission.SetSelectHdl( aLink ); - aLbMatSpecular.SetSelectHdl( aLink ); - aLbLight1.SetSelectHdl( aLink ); - aLbLight2.SetSelectHdl( aLink ); - aLbLight3.SetSelectHdl( aLink ); - aLbLight4.SetSelectHdl( aLink ); - aLbLight5.SetSelectHdl( aLink ); - aLbLight6.SetSelectHdl( aLink ); - aLbLight7.SetSelectHdl( aLink ); - aLbLight8.SetSelectHdl( aLink ); - aLbAmbientlight.SetSelectHdl( aLink ); - aLbShademode.SetSelectHdl( aLink ); + m_pLbMatFavorites->SetSelectHdl( aLink ); + m_pLbMatColor->SetSelectHdl( aLink ); + m_pLbMatEmission->SetSelectHdl( aLink ); + m_pLbMatSpecular->SetSelectHdl( aLink ); + m_pLbLight1->SetSelectHdl( aLink ); + m_pLbLight2->SetSelectHdl( aLink ); + m_pLbLight3->SetSelectHdl( aLink ); + m_pLbLight4->SetSelectHdl( aLink ); + m_pLbLight5->SetSelectHdl( aLink ); + m_pLbLight6->SetSelectHdl( aLink ); + m_pLbLight7->SetSelectHdl( aLink ); + m_pLbLight8->SetSelectHdl( aLink ); + m_pLbAmbientlight->SetSelectHdl( aLink ); + m_pLbShademode->SetSelectHdl( aLink ); aLink = LINK( this, Svx3DWin, ModifyHdl ); - aMtrMatSpecularIntensity.SetModifyHdl( aLink ); - aNumHorizontal.SetModifyHdl( aLink ); - aNumVertical.SetModifyHdl( aLink ); - aMtrSlant.SetModifyHdl( aLink ); + m_pMtrMatSpecularIntensity->SetModifyHdl( aLink ); + m_pNumHorizontal->SetModifyHdl( aLink ); + m_pNumVertical->SetModifyHdl( aLink ); + m_pMtrSlant->SetModifyHdl( aLink ); // Preview callback aLink = LINK( this, Svx3DWin, ChangeLightCallbackHdl ); - aCtlLightPreview.SetUserInteractiveChangeCallback(aLink); + m_pCtlLightPreview->SetUserInteractiveChangeCallback(aLink); aLink = LINK( this, Svx3DWin, ChangeSelectionCallbackHdl ); - aCtlLightPreview.SetUserSelectionChangeCallback(aLink); + m_pCtlLightPreview->SetUserSelectionChangeCallback(aLink); aSize = GetOutputSizePixel(); SetMinOutputSizePixel( aSize ); @@ -346,88 +317,12 @@ Svx3DWin::Svx3DWin( SfxBindings* pInBindings, Reset(); - aBtnNormalsObj.SetAccessibleRelationMemberOf( &aFLNormals ); - aBtnNormalsFlat.SetAccessibleRelationMemberOf( &aFLNormals ); - aBtnNormalsSphere.SetAccessibleRelationMemberOf( &aFLNormals ); - aBtnNormalsInvert.SetAccessibleRelationMemberOf( &aFLNormals ); - aBtnTwoSidedLighting.SetAccessibleRelationMemberOf( &aFLNormals ); - aBtnDoubleSided.SetAccessibleRelationMemberOf( &aFLNormals ); - - aBtnLight1.SetAccessibleRelationMemberOf( &aFLLight ); - aBtnLight2.SetAccessibleRelationMemberOf( &aFLLight ); - aBtnLight3.SetAccessibleRelationMemberOf( &aFLLight ); - aBtnLight4.SetAccessibleRelationMemberOf( &aFLLight ); - aBtnLight5.SetAccessibleRelationMemberOf( &aFLLight ); - aBtnLight6.SetAccessibleRelationMemberOf( &aFLLight ); - aBtnLight7.SetAccessibleRelationMemberOf( &aFLLight ); - aBtnLight8.SetAccessibleRelationMemberOf( &aFLLight ); - - aBtnLight1.SetAccessibleRelationLabeledBy( &aFTLightsource ); - aBtnLight2.SetAccessibleRelationLabeledBy( &aFTLightsource ); - aBtnLight3.SetAccessibleRelationLabeledBy( &aFTLightsource ); - aBtnLight4.SetAccessibleRelationLabeledBy( &aFTLightsource ); - aBtnLight5.SetAccessibleRelationLabeledBy( &aFTLightsource ); - aBtnLight6.SetAccessibleRelationLabeledBy( &aFTLightsource ); - aBtnLight7.SetAccessibleRelationLabeledBy( &aFTLightsource ); - aBtnLight8.SetAccessibleRelationLabeledBy( &aFTLightsource ); - aBtnLightColor.SetAccessibleRelationMemberOf( &aFLLight ); - aBtnLightColor.SetAccessibleRelationLabeledBy( &aFTLightsource ); - aBtnAmbientColor.SetAccessibleRelationMemberOf( &aFLLight ); - aBtnAmbientColor.SetAccessibleRelationLabeledBy( &aFTAmbientlight ); - - aBtnSpecularColor.SetAccessibleRelationLabeledBy( &aFtMatSpecular ); - aBtnMatColor.SetAccessibleRelationLabeledBy( &aFtMatColor ); - aBtnEmissionColor.SetAccessibleRelationLabeledBy( &aFtMatEmission ); - aBtnTexLuminance.SetAccessibleRelationLabeledBy( &aFtTexKind ); - aBtnTexColor.SetAccessibleRelationLabeledBy( &aFtTexKind ); - aBtnTexReplace.SetAccessibleRelationLabeledBy( &aFtTexMode ); - aBtnTexModulate.SetAccessibleRelationLabeledBy( &aFtTexMode ); - aBtnTexBlend.SetAccessibleRelationLabeledBy( &aFtTexMode ); - aBtnTexObjectX.SetAccessibleRelationLabeledBy( &aFtTexProjectionX ); - aBtnTexParallelX.SetAccessibleRelationLabeledBy( &aFtTexProjectionX ); - aBtnTexCircleX.SetAccessibleRelationLabeledBy( &aFtTexProjectionX ); - aBtnTexObjectY.SetAccessibleRelationLabeledBy( &aFtTexProjectionY ); - aBtnTexParallelY.SetAccessibleRelationLabeledBy( &aFtTexProjectionY ); - aBtnTexCircleY.SetAccessibleRelationLabeledBy( &aFtTexProjectionY ); - aBtnTexFilter.SetAccessibleRelationLabeledBy( &aFtTexFilter ); - aCtlLightPreview.SetAccessibleRelationLabeledBy( &aCtlLightPreview ); - aBtnNormalsObj.SetAccessibleRelationMemberOf(&aFLNormals); - aBtnNormalsFlat.SetAccessibleRelationMemberOf(&aFLNormals); - aBtnNormalsSphere.SetAccessibleRelationMemberOf(&aFLNormals); - aBtnNormalsInvert.SetAccessibleRelationMemberOf(&aFLNormals); - aBtnTwoSidedLighting.SetAccessibleRelationMemberOf(&aFLNormals); - - aBtnShadow3d.SetAccessibleRelationMemberOf(&aFLShadow); - - aBtnLight1.SetAccessibleRelationMemberOf(&aFLLight); - aBtnLight2.SetAccessibleRelationMemberOf(&aFLLight); - aBtnLight3.SetAccessibleRelationMemberOf(&aFLLight); - aBtnLight4.SetAccessibleRelationMemberOf(&aFLLight); - aBtnLight5.SetAccessibleRelationMemberOf(&aFLLight); - aBtnLight6.SetAccessibleRelationMemberOf(&aFLLight); - aBtnLight7.SetAccessibleRelationMemberOf(&aFLLight); - aBtnLight8.SetAccessibleRelationMemberOf(&aFLLight); - - aBtnTexLuminance.SetAccessibleRelationMemberOf(&aFLTexture); - aBtnTexColor.SetAccessibleRelationMemberOf(&aFLTexture); - aBtnTexReplace.SetAccessibleRelationMemberOf(&aFLTexture); - aBtnTexModulate.SetAccessibleRelationMemberOf(&aFLTexture); - aBtnTexBlend.SetAccessibleRelationMemberOf(&aFLTexture); - aBtnTexObjectX.SetAccessibleRelationMemberOf(&aFLTexture); - aBtnTexParallelX.SetAccessibleRelationMemberOf(&aFLTexture); - aBtnTexCircleX.SetAccessibleRelationMemberOf(&aFLTexture); - aBtnTexObjectY.SetAccessibleRelationMemberOf(&aFLTexture); - aBtnTexParallelY.SetAccessibleRelationMemberOf(&aFLTexture); - aBtnTexCircleY.SetAccessibleRelationMemberOf(&aFLTexture); - aBtnTexFilter.SetAccessibleRelationMemberOf(&aFLTexture); - - aBtnMatColor.SetAccessibleRelationMemberOf(&aFLMaterial); - aBtnEmissionColor.SetAccessibleRelationMemberOf(&aFLMaterial); - - aBtnSpecularColor.SetAccessibleRelationMemberOf(&aFLMatSpecular); + //lock down the size of the initial largest default mode as the permanent size + aSize = get_preferred_size(); + set_width_request(aSize.Width()); + set_height_request(aSize.Height()); } - Svx3DWin::~Svx3DWin() { delete p3DView; @@ -446,38 +341,37 @@ Svx3DWin::~Svx3DWin() void Svx3DWin::Construct() { - aBtnGeo.Check(); + m_pBtnGeo->Check(); Link aLink( LINK( this, Svx3DWin, ClickViewTypeHdl ) ); - aLink.Call( &aBtnGeo ); - aCtlLightPreview.Hide(); + aLink.Call(m_pBtnGeo); + m_pCtlLightPreview->Hide(); } void Svx3DWin::Reset() { // Various initializations, default is AllAttributes - aLbShademode.SelectEntryPos( 0 ); - aMtrMatSpecularIntensity.SetValue( 50 ); + m_pLbShademode->SelectEntryPos( 0 ); + m_pMtrMatSpecularIntensity->SetValue( 50 ); - aBtnLight1.Check(); + m_pBtnLight1->Check(); ClickUpdateHdl( NULL ); // Select nothing, to avoid errors when selecting the first - aCtlLightPreview.GetSvx3DLightControl().SelectLight(0); - aCtlLightPreview.CheckSelection(); + m_pCtlLightPreview->GetSvx3DLightControl().SelectLight(0); + m_pCtlLightPreview->CheckSelection(); } -bool Svx3DWin::GetUILightState( const ImageButton& rBtn ) const +bool Svx3DWin::GetUILightState(const PushButton& rBtn) const { return (rBtn.GetModeImage() == aImgLightOn); } -void Svx3DWin::SetUILightState( ImageButton& aBtn, bool bState ) +void Svx3DWin::SetUILightState(PushButton& rBtn, bool bState) { - aBtn.SetModeImage( bState ? aImgLightOn : aImgLightOff ); + rBtn.SetModeImage( bState ? aImgLightOn : aImgLightOff ); } - void Svx3DWin::Update( SfxItemSet& rAttrs ) { // remember 2d attributes @@ -530,70 +424,55 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( !bChart ) { // For cube objects are no segments set - aFtHorizontal.Enable( !bCube ); - aNumHorizontal.Enable( !bCube ); - aFtVertical.Enable( !bCube ); - aNumVertical.Enable( !bCube ); - aFLSegments.Enable( !bCube ); - - aFtPercentDiagonal.Enable( !bCube && !bSphere ); - aMtrPercentDiagonal.Enable( !bCube && !bSphere ); - aFtBackscale.Enable( !bCube && !bSphere ); - aMtrBackscale.Enable( !bCube && !bSphere ); - aFtDepth.Enable( !bCube && !bSphere ); - aMtrDepth.Enable( !bCube && !bSphere ); + m_pFLSegments->Enable(!bCube); + + m_pFtPercentDiagonal->Enable( !bCube && !bSphere ); + m_pMtrPercentDiagonal->Enable( !bCube && !bSphere ); + m_pFtBackscale->Enable( !bCube && !bSphere ); + m_pMtrBackscale->Enable( !bCube && !bSphere ); + m_pFtDepth->Enable( !bCube && !bSphere ); + m_pMtrDepth->Enable( !bCube && !bSphere ); if( bCube ) { - aNumHorizontal.SetEmptyFieldValue(); - aNumVertical.SetEmptyFieldValue(); + m_pNumHorizontal->SetEmptyFieldValue(); + m_pNumVertical->SetEmptyFieldValue(); } if( bCube || bSphere ) { - aMtrPercentDiagonal.SetEmptyFieldValue(); - aMtrBackscale.SetEmptyFieldValue(); - aMtrDepth.SetEmptyFieldValue(); + m_pMtrPercentDiagonal->SetEmptyFieldValue(); + m_pMtrBackscale->SetEmptyFieldValue(); + m_pMtrDepth->SetEmptyFieldValue(); } // There is a final angle only for Lathe objects. - aFtEndAngle.Enable( !bExtrude && !bCube && !bSphere ); - aMtrEndAngle.Enable( !bExtrude && !bCube && !bSphere ); + m_pFtEndAngle->Enable( !bExtrude && !bCube && !bSphere ); + m_pMtrEndAngle->Enable( !bExtrude && !bCube && !bSphere ); if( bExtrude || bCube || bSphere ) - aMtrEndAngle.SetEmptyFieldValue(); + m_pMtrEndAngle->SetEmptyFieldValue(); } else { // Geometry - aFtHorizontal.Enable( false ); - aNumHorizontal.Enable( false ); - aNumHorizontal.SetEmptyFieldValue(); - aFtVertical.Enable( false ); - aNumVertical.Enable( false ); - aNumVertical.SetEmptyFieldValue(); - aFLSegments.Enable( false ); - aFtEndAngle.Enable( false ); - aMtrEndAngle.Enable( false ); - aMtrEndAngle.SetEmptyFieldValue(); - aFtDepth.Enable( false ); - aMtrDepth.Enable( false ); - aMtrDepth.SetEmptyFieldValue(); + m_pNumHorizontal->SetEmptyFieldValue(); + m_pNumVertical->SetEmptyFieldValue(); + m_pFLSegments->Enable( false ); + m_pFtEndAngle->Enable( false ); + m_pMtrEndAngle->Enable( false ); + m_pMtrEndAngle->SetEmptyFieldValue(); + m_pFtDepth->Enable( false ); + m_pMtrDepth->Enable( false ); + m_pMtrDepth->SetEmptyFieldValue(); // Representation - aBtnShadow3d.Enable( false ); - aFtSlant.Enable( false ); - aMtrSlant.Enable( false ); - aFLShadow.Enable( false ); - - aFtDistance.Enable( false ); - aMtrDistance.Enable( false ); - aMtrDistance.SetEmptyFieldValue(); - aFtFocalLeng.Enable( false ); - aMtrFocalLength.Enable( false ); - aMtrFocalLength.SetEmptyFieldValue(); - aFLCamera.Enable( false ); + m_pFLShadow->Enable(false); + + m_pMtrDistance->SetEmptyFieldValue(); + m_pMtrFocalLength->SetEmptyFieldValue(); + m_pFLCamera->Enable( false ); //Lower Range - aBtnConvertTo3D.Enable( false ); - aBtnLatheObject.Enable( false ); + m_pBtnConvertTo3D->Enable( false ); + m_pBtnLatheObject->Enable( false ); } } // Bitmap fill ? -> Status @@ -605,101 +484,83 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) bBitmap = (eXFS == drawing::FillStyle_BITMAP || eXFS == drawing::FillStyle_GRADIENT || eXFS == drawing::FillStyle_HATCH); } - aFtTexKind.Enable( bBitmap ); - aBtnTexLuminance.Enable( bBitmap ); - aBtnTexColor.Enable( bBitmap ); - aFtTexMode.Enable( bBitmap ); - aBtnTexReplace.Enable( bBitmap ); - aBtnTexModulate.Enable( bBitmap ); - aBtnTexBlend.Enable( bBitmap ); - aFtTexProjectionX.Enable( bBitmap ); - aBtnTexParallelX.Enable( bBitmap ); - aBtnTexCircleX.Enable( bBitmap ); - aBtnTexObjectX.Enable( bBitmap ); - aFtTexProjectionY.Enable( bBitmap ); - aBtnTexParallelY.Enable( bBitmap ); - aBtnTexCircleY.Enable( bBitmap ); - aBtnTexObjectY.Enable( bBitmap ); - aFtTexFilter.Enable( bBitmap ); - aBtnTexFilter.Enable( bBitmap ); - aFLTexture.Enable( bBitmap ); - + m_pFLTexture->Enable(bBitmap); // Geometry // Number of segments (horizontal) - if( aNumHorizontal.IsEnabled() ) + if( m_pNumHorizontal->IsEnabled() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_HORZ_SEGS); if(eState != SfxItemState::DONTCARE) { sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DOBJ_HORZ_SEGS)).GetValue(); - if(nValue != (sal_uInt32 )aNumHorizontal.GetValue()) + if(nValue != (sal_uInt32 )m_pNumHorizontal->GetValue()) { - aNumHorizontal.SetValue( nValue ); + m_pNumHorizontal->SetValue( nValue ); bUpdate = true; } - else if( aNumHorizontal.IsEmptyFieldValue() ) - aNumHorizontal.SetValue( nValue ); + else if( m_pNumHorizontal->IsEmptyFieldValue() ) + m_pNumHorizontal->SetValue( nValue ); } else { - if( !aNumHorizontal.IsEmptyFieldValue() ) + if( !m_pNumHorizontal->IsEmptyFieldValue() ) { - aNumHorizontal.SetEmptyFieldValue(); + m_pNumHorizontal->SetEmptyFieldValue(); bUpdate = true; } } } //Number of segments (vertical) - if( aNumVertical.IsEnabled() ) + if( m_pNumVertical->IsEnabled() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_VERT_SEGS); if( eState != SfxItemState::DONTCARE ) { sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DOBJ_VERT_SEGS)).GetValue(); - if( nValue != (sal_uInt32) aNumVertical.GetValue() ) + if( nValue != (sal_uInt32) m_pNumVertical->GetValue() ) { - aNumVertical.SetValue( nValue ); + m_pNumVertical->SetValue( nValue ); bUpdate = true; } - else if( aNumVertical.IsEmptyFieldValue() ) - aNumVertical.SetValue( nValue ); + else if( m_pNumVertical->IsEmptyFieldValue() ) + m_pNumVertical->SetValue( nValue ); } else { - if( !aNumVertical.IsEmptyFieldValue() ) + if( !m_pNumVertical->IsEmptyFieldValue() ) { - aNumVertical.SetEmptyFieldValue(); + m_pNumVertical->SetEmptyFieldValue(); bUpdate = true; } } } // Depth - if( aMtrDepth.IsEnabled() ) + if( m_pMtrDepth->IsEnabled() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DEPTH); if( eState != SfxItemState::DONTCARE ) { sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DOBJ_DEPTH)).GetValue(); - sal_uInt32 nValue2 = GetCoreValue( aMtrDepth, ePoolUnit ); + sal_uInt32 nValue2 = GetCoreValue(*m_pMtrDepth, ePoolUnit); if( nValue != nValue2 ) { - if( eFUnit != aMtrDepth.GetUnit() ) - SetFieldUnit( aMtrDepth, eFUnit ); + if( eFUnit != m_pMtrDepth->GetUnit() ) + SetFieldUnit(*m_pMtrDepth, eFUnit); - SetMetricValue( aMtrDepth, nValue, ePoolUnit ); + SetMetricValue(*m_pMtrDepth, nValue, ePoolUnit); bUpdate = true; } - else if( aMtrDepth.IsEmptyFieldValue() ) - aMtrDepth.SetValue( aMtrDepth.GetValue() ); + else if( m_pMtrDepth->IsEmptyFieldValue() ) + m_pMtrDepth->SetValue( m_pMtrDepth->GetValue() ); } else { - if( !aMtrDepth.IsEmptyFieldValue() ) + if( !m_pMtrDepth->IsEmptyFieldValue() ) { - aMtrDepth.SetEmptyFieldValue(); + m_pMtrDepth->SetEmptyFieldValue(); bUpdate = true; } } @@ -710,91 +571,91 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue(); - if( bValue != aBtnDoubleSided.IsChecked() ) + if( bValue != m_pBtnDoubleSided->IsChecked() ) { - aBtnDoubleSided.Check( bValue ); + m_pBtnDoubleSided->Check( bValue ); bUpdate = true; } - else if( aBtnDoubleSided.GetState() == TRISTATE_INDET ) - aBtnDoubleSided.Check( bValue ); + else if( m_pBtnDoubleSided->GetState() == TRISTATE_INDET ) + m_pBtnDoubleSided->Check( bValue ); } else { - if( aBtnDoubleSided.GetState() != TRISTATE_INDET ) + if( m_pBtnDoubleSided->GetState() != TRISTATE_INDET ) { - aBtnDoubleSided.SetState( TRISTATE_INDET ); + m_pBtnDoubleSided->SetState( TRISTATE_INDET ); bUpdate = true; } } // Edge rounding - if( aMtrPercentDiagonal.IsEnabled() ) + if( m_pMtrPercentDiagonal->IsEnabled() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_PERCENT_DIAGONAL); if( eState != SfxItemState::DONTCARE ) { sal_uInt16 nValue = static_cast<const SfxUInt16Item&>(rAttrs.Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL)).GetValue(); - if( nValue != aMtrPercentDiagonal.GetValue() ) + if( nValue != m_pMtrPercentDiagonal->GetValue() ) { - aMtrPercentDiagonal.SetValue( nValue ); + m_pMtrPercentDiagonal->SetValue( nValue ); bUpdate = true; } - else if( aMtrPercentDiagonal.IsEmptyFieldValue() ) - aMtrPercentDiagonal.SetValue( nValue ); + else if( m_pMtrPercentDiagonal->IsEmptyFieldValue() ) + m_pMtrPercentDiagonal->SetValue( nValue ); } else { - if( !aMtrPercentDiagonal.IsEmptyFieldValue() ) + if( !m_pMtrPercentDiagonal->IsEmptyFieldValue() ) { - aMtrPercentDiagonal.SetEmptyFieldValue(); + m_pMtrPercentDiagonal->SetEmptyFieldValue(); bUpdate = true; } } } // Depth scaling - if( aMtrBackscale.IsEnabled() ) + if( m_pMtrBackscale->IsEnabled() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_BACKSCALE); if( eState != SfxItemState::DONTCARE ) { sal_uInt16 nValue = static_cast<const SfxUInt16Item&>(rAttrs.Get(SDRATTR_3DOBJ_BACKSCALE)).GetValue(); - if( nValue != aMtrBackscale.GetValue() ) + if( nValue != m_pMtrBackscale->GetValue() ) { - aMtrBackscale.SetValue( nValue ); + m_pMtrBackscale->SetValue( nValue ); bUpdate = true; } - else if( aMtrBackscale.IsEmptyFieldValue() ) - aMtrBackscale.SetValue( nValue ); + else if( m_pMtrBackscale->IsEmptyFieldValue() ) + m_pMtrBackscale->SetValue( nValue ); } else { - if( !aMtrBackscale.IsEmptyFieldValue() ) + if( !m_pMtrBackscale->IsEmptyFieldValue() ) { - aMtrBackscale.SetEmptyFieldValue(); + m_pMtrBackscale->SetEmptyFieldValue(); bUpdate = true; } } } // End angle - if( aMtrEndAngle.IsEnabled() ) + if( m_pMtrEndAngle->IsEnabled() ) { eState = rAttrs.GetItemState(SDRATTR_3DOBJ_END_ANGLE); if( eState != SfxItemState::DONTCARE ) { sal_Int32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DOBJ_END_ANGLE)).GetValue(); - if( nValue != aMtrEndAngle.GetValue() ) + if( nValue != m_pMtrEndAngle->GetValue() ) { - aMtrEndAngle.SetValue( nValue ); + m_pMtrEndAngle->SetValue( nValue ); bUpdate = true; } } else { - if( !aMtrEndAngle.IsEmptyFieldValue() ) + if( !m_pMtrEndAngle->IsEmptyFieldValue() ) { - aMtrEndAngle.SetEmptyFieldValue(); + m_pMtrEndAngle->SetEmptyFieldValue(); bUpdate = true; } } @@ -806,25 +667,25 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) { sal_uInt16 nValue = static_cast<const Svx3DNormalsKindItem&>(rAttrs.Get(SDRATTR_3DOBJ_NORMALS_KIND)).GetValue(); - if( ( !aBtnNormalsObj.IsChecked() && nValue == 0 ) || - ( !aBtnNormalsFlat.IsChecked() && nValue == 1 ) || - ( !aBtnNormalsSphere.IsChecked() && nValue == 2 ) ) + if( ( !m_pBtnNormalsObj->IsChecked() && nValue == 0 ) || + ( !m_pBtnNormalsFlat->IsChecked() && nValue == 1 ) || + ( !m_pBtnNormalsSphere->IsChecked() && nValue == 2 ) ) { - aBtnNormalsObj.Check( nValue == 0 ); - aBtnNormalsFlat.Check( nValue == 1 ); - aBtnNormalsSphere.Check( nValue == 2 ); + m_pBtnNormalsObj->Check( nValue == 0 ); + m_pBtnNormalsFlat->Check( nValue == 1 ); + m_pBtnNormalsSphere->Check( nValue == 2 ); bUpdate = true; } } else { - if( aBtnNormalsObj.IsChecked() || - aBtnNormalsFlat.IsChecked() || - aBtnNormalsSphere.IsChecked() ) + if( m_pBtnNormalsObj->IsChecked() || + m_pBtnNormalsFlat->IsChecked() || + m_pBtnNormalsSphere->IsChecked() ) { - aBtnNormalsObj.Check( false ); - aBtnNormalsFlat.Check( false ); - aBtnNormalsSphere.Check( false ); + m_pBtnNormalsObj->Check( false ); + m_pBtnNormalsFlat->Check( false ); + m_pBtnNormalsSphere->Check( false ); bUpdate = true; } } @@ -834,19 +695,19 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue(); - if( bValue != aBtnNormalsInvert.IsChecked() ) + if( bValue != m_pBtnNormalsInvert->IsChecked() ) { - aBtnNormalsInvert.Check( bValue ); + m_pBtnNormalsInvert->Check( bValue ); bUpdate = true; } - else if( aBtnNormalsInvert.GetState() == TRISTATE_INDET ) - aBtnNormalsInvert.Check( bValue ); + else if( m_pBtnNormalsInvert->GetState() == TRISTATE_INDET ) + m_pBtnNormalsInvert->Check( bValue ); } else { - if( aBtnNormalsInvert.GetState() != TRISTATE_INDET ) + if( m_pBtnNormalsInvert->GetState() != TRISTATE_INDET ) { - aBtnNormalsInvert.SetState( TRISTATE_INDET ); + m_pBtnNormalsInvert->SetState( TRISTATE_INDET ); bUpdate = true; } } @@ -856,19 +717,19 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue(); - if( bValue != aBtnTwoSidedLighting.IsChecked() ) + if( bValue != m_pBtnTwoSidedLighting->IsChecked() ) { - aBtnTwoSidedLighting.Check( bValue ); + m_pBtnTwoSidedLighting->Check( bValue ); bUpdate = true; } - else if( aBtnTwoSidedLighting.GetState() == TRISTATE_INDET ) - aBtnTwoSidedLighting.Check( bValue ); + else if( m_pBtnTwoSidedLighting->GetState() == TRISTATE_INDET ) + m_pBtnTwoSidedLighting->Check( bValue ); } else { - if( aBtnTwoSidedLighting.GetState() != TRISTATE_INDET ) + if( m_pBtnTwoSidedLighting->GetState() != TRISTATE_INDET ) { - aBtnTwoSidedLighting.SetState( TRISTATE_INDET ); + m_pBtnTwoSidedLighting->SetState( TRISTATE_INDET ); bUpdate = true; } } @@ -879,17 +740,17 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { sal_uInt16 nValue = static_cast<const Svx3DShadeModeItem&>(rAttrs.Get(SDRATTR_3DSCENE_SHADE_MODE)).GetValue(); - if( nValue != aLbShademode.GetSelectEntryPos() ) + if( nValue != m_pLbShademode->GetSelectEntryPos() ) { - aLbShademode.SelectEntryPos( nValue ); + m_pLbShademode->SelectEntryPos( nValue ); bUpdate = true; } } else { - if( aLbShademode.GetSelectEntryCount() != 0 ) + if( m_pLbShademode->GetSelectEntryCount() != 0 ) { - aLbShademode.SetNoSelection(); + m_pLbShademode->SetNoSelection(); bUpdate = true; } } @@ -899,21 +760,21 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue(); - if( bValue != aBtnShadow3d.IsChecked() ) + if( bValue != m_pBtnShadow3d->IsChecked() ) { - aBtnShadow3d.Check( bValue ); - aFtSlant.Enable( bValue ); - aMtrSlant.Enable( bValue ); + m_pBtnShadow3d->Check( bValue ); + m_pFtSlant->Enable( bValue ); + m_pMtrSlant->Enable( bValue ); bUpdate = true; } - else if( aBtnShadow3d.GetState() == TRISTATE_INDET ) - aBtnShadow3d.Check( bValue ); + else if( m_pBtnShadow3d->GetState() == TRISTATE_INDET ) + m_pBtnShadow3d->Check( bValue ); } else { - if( aBtnShadow3d.GetState() != TRISTATE_INDET ) + if( m_pBtnShadow3d->GetState() != TRISTATE_INDET ) { - aBtnShadow3d.SetState( TRISTATE_INDET ); + m_pBtnShadow3d->SetState( TRISTATE_INDET ); bUpdate = true; } } @@ -923,17 +784,17 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { sal_uInt16 nValue = static_cast<const SfxUInt16Item&>(rAttrs.Get(SDRATTR_3DSCENE_SHADOW_SLANT)).GetValue(); - if( nValue != aMtrSlant.GetValue() ) + if( nValue != m_pMtrSlant->GetValue() ) { - aMtrSlant.SetValue( nValue ); + m_pMtrSlant->SetValue( nValue ); bUpdate = true; } } else { - if( !aMtrSlant.IsEmptyFieldValue() ) + if( !m_pMtrSlant->IsEmptyFieldValue() ) { - aMtrSlant.SetEmptyFieldValue(); + m_pMtrSlant->SetEmptyFieldValue(); bUpdate = true; } } @@ -943,21 +804,21 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DSCENE_DISTANCE)).GetValue(); - sal_uInt32 nValue2 = GetCoreValue( aMtrDistance, ePoolUnit ); + sal_uInt32 nValue2 = GetCoreValue(*m_pMtrDistance, ePoolUnit); if( nValue != nValue2 ) { - if( eFUnit != aMtrDistance.GetUnit() ) - SetFieldUnit( aMtrDistance, eFUnit ); + if( eFUnit != m_pMtrDistance->GetUnit() ) + SetFieldUnit(*m_pMtrDistance, eFUnit); - SetMetricValue( aMtrDistance, nValue, ePoolUnit ); + SetMetricValue(*m_pMtrDistance, nValue, ePoolUnit); bUpdate = true; } } else { - if( !aMtrDepth.IsEmptyFieldValue() ) + if( !m_pMtrDepth->IsEmptyFieldValue() ) { - aMtrDepth.SetEmptyFieldValue(); + m_pMtrDepth->SetEmptyFieldValue(); bUpdate = true; } } @@ -967,21 +828,21 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { sal_uInt32 nValue = static_cast<const SfxUInt32Item&>(rAttrs.Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue(); - sal_uInt32 nValue2 = GetCoreValue( aMtrFocalLength, ePoolUnit ); + sal_uInt32 nValue2 = GetCoreValue(*m_pMtrFocalLength, ePoolUnit); if( nValue != nValue2 ) { - if( eFUnit != aMtrFocalLength.GetUnit() ) - SetFieldUnit( aMtrFocalLength, eFUnit ); + if( eFUnit != m_pMtrFocalLength->GetUnit() ) + SetFieldUnit(*m_pMtrFocalLength, eFUnit); - SetMetricValue( aMtrFocalLength, nValue, ePoolUnit ); + SetMetricValue(*m_pMtrFocalLength, nValue, ePoolUnit); bUpdate = true; } } else { - if( !aMtrFocalLength.IsEmptyFieldValue() ) + if( !m_pMtrFocalLength->IsEmptyFieldValue() ) { - aMtrFocalLength.SetEmptyFieldValue(); + m_pMtrFocalLength->SetEmptyFieldValue(); bUpdate = true; } } @@ -994,7 +855,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1)).GetValue(); - ColorLB* pLb = &aLbLight1; + ColorLB* pLb = m_pLbLight1; if( aColor != pLb->GetSelectEntryColor() ) { LBSelectColor( pLb, aColor ); @@ -1003,9 +864,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } else { - if( aLbLight1.GetSelectEntryCount() != 0 ) + if( m_pLbLight1->GetSelectEntryCount() != 0 ) { - aLbLight1.SetNoSelection(); + m_pLbLight1->SetNoSelection(); bUpdate = true; } } @@ -1014,20 +875,20 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_1)).GetValue(); - if( ( bOn && !GetUILightState( aBtnLight1 )) || - ( !bOn && GetUILightState( aBtnLight1 )) ) + if( ( bOn && !GetUILightState(*m_pBtnLight1)) || + ( !bOn && GetUILightState(*m_pBtnLight1)) ) { - SetUILightState( aBtnLight1, bOn ); + SetUILightState(*m_pBtnLight1, bOn); bUpdate = true; } - if( aBtnLight1.GetState() == TRISTATE_INDET ) - aBtnLight1.Check( aBtnLight1.IsChecked() ); + if( m_pBtnLight1->GetState() == TRISTATE_INDET ) + m_pBtnLight1->Check( m_pBtnLight1->IsChecked() ); } else { - if( aBtnLight1.GetState() != TRISTATE_INDET ) + if( m_pBtnLight1->GetState() != TRISTATE_INDET ) { - aBtnLight1.SetState( TRISTATE_INDET ); + m_pBtnLight1->SetState( TRISTATE_INDET ); bUpdate = true; } } @@ -1043,7 +904,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2)).GetValue(); - ColorLB* pLb = &aLbLight2; + ColorLB* pLb = m_pLbLight2; if( aColor != pLb->GetSelectEntryColor() ) { LBSelectColor( pLb, aColor ); @@ -1052,9 +913,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } else { - if( aLbLight2.GetSelectEntryCount() != 0 ) + if( m_pLbLight2->GetSelectEntryCount() != 0 ) { - aLbLight2.SetNoSelection(); + m_pLbLight2->SetNoSelection(); bUpdate = true; } } @@ -1063,20 +924,20 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_2)).GetValue(); - if( ( bOn && !GetUILightState( aBtnLight2 )) || - ( !bOn && GetUILightState( aBtnLight2 )) ) + if( ( bOn && !GetUILightState(*m_pBtnLight2)) || + ( !bOn && GetUILightState(*m_pBtnLight2)) ) { - SetUILightState( aBtnLight2, bOn ); + SetUILightState(*m_pBtnLight2, bOn); bUpdate = true; } - if( aBtnLight2.GetState() == TRISTATE_INDET ) - aBtnLight2.Check( aBtnLight2.IsChecked() ); + if( m_pBtnLight2->GetState() == TRISTATE_INDET ) + m_pBtnLight2->Check( m_pBtnLight2->IsChecked() ); } else { - if( aBtnLight2.GetState() != TRISTATE_INDET ) + if( m_pBtnLight2->GetState() != TRISTATE_INDET ) { - aBtnLight2.SetState( TRISTATE_INDET ); + m_pBtnLight2->SetState( TRISTATE_INDET ); bUpdate = true; } } @@ -1092,7 +953,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3)).GetValue(); - ColorLB* pLb = &aLbLight3; + ColorLB* pLb = m_pLbLight3; if( aColor != pLb->GetSelectEntryColor() ) { LBSelectColor( pLb, aColor ); @@ -1101,9 +962,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } else { - if( aLbLight3.GetSelectEntryCount() != 0 ) + if( m_pLbLight3->GetSelectEntryCount() != 0 ) { - aLbLight3.SetNoSelection(); + m_pLbLight3->SetNoSelection(); bUpdate = true; } } @@ -1112,20 +973,20 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_3)).GetValue(); - if( ( bOn && !GetUILightState( aBtnLight3)) || - ( !bOn && GetUILightState( aBtnLight3)) ) + if( ( bOn && !GetUILightState(*m_pBtnLight3)) || + ( !bOn && GetUILightState(*m_pBtnLight3)) ) { - SetUILightState( aBtnLight3, bOn ); + SetUILightState(*m_pBtnLight3, bOn); bUpdate = true; } - if( aBtnLight3.GetState() == TRISTATE_INDET ) - aBtnLight3.Check( aBtnLight3.IsChecked() ); + if( m_pBtnLight3->GetState() == TRISTATE_INDET ) + m_pBtnLight3->Check( m_pBtnLight3->IsChecked() ); } else { - if( aBtnLight3.GetState() != TRISTATE_INDET ) + if( m_pBtnLight3->GetState() != TRISTATE_INDET ) { - aBtnLight3.SetState( TRISTATE_INDET ); + m_pBtnLight3->SetState( TRISTATE_INDET ); bUpdate = true; } } @@ -1141,7 +1002,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4)).GetValue(); - ColorLB* pLb = &aLbLight4; + ColorLB* pLb = m_pLbLight4; if( aColor != pLb->GetSelectEntryColor() ) { LBSelectColor( pLb, aColor ); @@ -1150,9 +1011,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } else { - if( aLbLight4.GetSelectEntryCount() != 0 ) + if( m_pLbLight4->GetSelectEntryCount() != 0 ) { - aLbLight4.SetNoSelection(); + m_pLbLight4->SetNoSelection(); bUpdate = true; } } @@ -1161,20 +1022,20 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_4)).GetValue(); - if( ( bOn && !GetUILightState( aBtnLight4 )) || - ( !bOn && GetUILightState( aBtnLight4 )) ) + if( ( bOn && !GetUILightState(*m_pBtnLight4)) || + ( !bOn && GetUILightState(*m_pBtnLight4)) ) { - SetUILightState( aBtnLight4, bOn ); + SetUILightState(*m_pBtnLight4, bOn); bUpdate = true; } - if( aBtnLight4.GetState() == TRISTATE_INDET ) - aBtnLight4.Check( aBtnLight4.IsChecked() ); + if( m_pBtnLight4->GetState() == TRISTATE_INDET ) + m_pBtnLight4->Check( m_pBtnLight4->IsChecked() ); } else { - if( aBtnLight4.GetState() != TRISTATE_INDET ) + if( m_pBtnLight4->GetState() != TRISTATE_INDET ) { - aBtnLight4.SetState( TRISTATE_INDET ); + m_pBtnLight4->SetState( TRISTATE_INDET ); bUpdate = true; } } @@ -1190,7 +1051,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5)).GetValue(); - ColorLB* pLb = &aLbLight5; + ColorLB* pLb = m_pLbLight5; if( aColor != pLb->GetSelectEntryColor() ) { LBSelectColor( pLb, aColor ); @@ -1199,9 +1060,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } else { - if( aLbLight5.GetSelectEntryCount() != 0 ) + if( m_pLbLight5->GetSelectEntryCount() != 0 ) { - aLbLight5.SetNoSelection(); + m_pLbLight5->SetNoSelection(); bUpdate = true; } } @@ -1210,20 +1071,20 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_5)).GetValue(); - if( ( bOn && !GetUILightState( aBtnLight5 )) || - ( !bOn && GetUILightState( aBtnLight5 )) ) + if( ( bOn && !GetUILightState(*m_pBtnLight5)) || + ( !bOn && GetUILightState(*m_pBtnLight5)) ) { - SetUILightState( aBtnLight5, bOn ); + SetUILightState(*m_pBtnLight5, bOn); bUpdate = true; } - if( aBtnLight5.GetState() == TRISTATE_INDET ) - aBtnLight5.Check( aBtnLight5.IsChecked() ); + if( m_pBtnLight5->GetState() == TRISTATE_INDET ) + m_pBtnLight5->Check( m_pBtnLight5->IsChecked() ); } else { - if( aBtnLight5.GetState() != TRISTATE_INDET ) + if( m_pBtnLight5->GetState() != TRISTATE_INDET ) { - aBtnLight5.SetState( TRISTATE_INDET ); + m_pBtnLight5->SetState( TRISTATE_INDET ); bUpdate = true; } } @@ -1239,7 +1100,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6)).GetValue(); - ColorLB* pLb = &aLbLight6; + ColorLB* pLb = m_pLbLight6; if( aColor != pLb->GetSelectEntryColor() ) { LBSelectColor( pLb, aColor ); @@ -1248,9 +1109,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } else { - if( aLbLight6.GetSelectEntryCount() != 0 ) + if( m_pLbLight6->GetSelectEntryCount() != 0 ) { - aLbLight6.SetNoSelection(); + m_pLbLight6->SetNoSelection(); bUpdate = true; } } @@ -1259,20 +1120,20 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_6)).GetValue(); - if( ( bOn && !GetUILightState( aBtnLight6 )) || - ( !bOn && GetUILightState( aBtnLight6 )) ) + if( ( bOn && !GetUILightState(*m_pBtnLight6)) || + ( !bOn && GetUILightState(*m_pBtnLight6)) ) { - SetUILightState( aBtnLight6, bOn ); + SetUILightState(*m_pBtnLight6, bOn); bUpdate = true; } - if( aBtnLight6.GetState() == TRISTATE_INDET ) - aBtnLight6.Check( aBtnLight6.IsChecked() ); + if( m_pBtnLight6->GetState() == TRISTATE_INDET ) + m_pBtnLight6->Check( m_pBtnLight6->IsChecked() ); } else { - if( aBtnLight6.GetState() != TRISTATE_INDET ) + if( m_pBtnLight6->GetState() != TRISTATE_INDET ) { - aBtnLight6.SetState( TRISTATE_INDET ); + m_pBtnLight6->SetState( TRISTATE_INDET ); bUpdate = true; } } @@ -1288,7 +1149,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7)).GetValue(); - ColorLB* pLb = &aLbLight7; + ColorLB* pLb = m_pLbLight7; if( aColor != pLb->GetSelectEntryColor() ) { LBSelectColor( pLb, aColor ); @@ -1297,9 +1158,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } else { - if( aLbLight7.GetSelectEntryCount() != 0 ) + if( m_pLbLight7->GetSelectEntryCount() != 0 ) { - aLbLight7.SetNoSelection(); + m_pLbLight7->SetNoSelection(); bUpdate = true; } } @@ -1308,20 +1169,20 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_7)).GetValue(); - if( ( bOn && !GetUILightState( aBtnLight7 )) || - ( !bOn && GetUILightState( aBtnLight7 )) ) + if( ( bOn && !GetUILightState(*m_pBtnLight7)) || + ( !bOn && GetUILightState(*m_pBtnLight7)) ) { - SetUILightState( aBtnLight7 , bOn ); + SetUILightState(*m_pBtnLight7 , bOn); bUpdate = true; } - if( aBtnLight7.GetState() == TRISTATE_INDET ) - aBtnLight7.Check( aBtnLight7.IsChecked() ); + if( m_pBtnLight7->GetState() == TRISTATE_INDET ) + m_pBtnLight7->Check( m_pBtnLight7->IsChecked() ); } else { - if( aBtnLight7.GetState() != TRISTATE_INDET ) + if( m_pBtnLight7->GetState() != TRISTATE_INDET ) { - aBtnLight7.SetState( TRISTATE_INDET ); + m_pBtnLight7->SetState( TRISTATE_INDET ); bUpdate = true; } } @@ -1337,7 +1198,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8)).GetValue(); - ColorLB* pLb = &aLbLight8; + ColorLB* pLb = m_pLbLight8; if( aColor != pLb->GetSelectEntryColor() ) { LBSelectColor( pLb, aColor ); @@ -1346,9 +1207,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } else { - if( aLbLight8.GetSelectEntryCount() != 0 ) + if( m_pLbLight8->GetSelectEntryCount() != 0 ) { - aLbLight8.SetNoSelection(); + m_pLbLight8->SetNoSelection(); bUpdate = true; } } @@ -1357,20 +1218,20 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { bool bOn = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_8)).GetValue(); - if( ( bOn && !GetUILightState( aBtnLight8 )) || - ( !bOn && GetUILightState( aBtnLight8 )) ) + if( ( bOn && !GetUILightState(*m_pBtnLight8)) || + ( !bOn && GetUILightState(*m_pBtnLight8)) ) { - SetUILightState( aBtnLight8, bOn ); + SetUILightState(*m_pBtnLight8, bOn); bUpdate = true; } - if( aBtnLight8.GetState() == TRISTATE_INDET ) - aBtnLight8.Check( aBtnLight8.IsChecked() ); + if( m_pBtnLight8->GetState() == TRISTATE_INDET ) + m_pBtnLight8->Check( m_pBtnLight8->IsChecked() ); } else { - if( aBtnLight8.GetState() != TRISTATE_INDET ) + if( m_pBtnLight8->GetState() != TRISTATE_INDET ) { - aBtnLight8.SetState( TRISTATE_INDET ); + m_pBtnLight8->SetState( TRISTATE_INDET ); bUpdate = true; } } @@ -1386,7 +1247,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DSCENE_AMBIENTCOLOR)).GetValue(); - ColorLB* pLb = &aLbAmbientlight; + ColorLB* pLb = m_pLbAmbientlight; if( aColor != pLb->GetSelectEntryColor() ) { LBSelectColor( pLb, aColor ); @@ -1395,9 +1256,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } else { - if( aLbAmbientlight.GetSelectEntryCount() != 0 ) + if( m_pLbAmbientlight->GetSelectEntryCount() != 0 ) { - aLbAmbientlight.SetNoSelection(); + m_pLbAmbientlight->SetNoSelection(); bUpdate = true; } } @@ -1412,21 +1273,21 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) { sal_uInt16 nValue = static_cast<const Svx3DTextureKindItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_KIND)).GetValue(); - if( ( !aBtnTexLuminance.IsChecked() && nValue == 1 ) || - ( !aBtnTexColor.IsChecked() && nValue == 3 ) ) + if( ( !m_pBtnTexLuminance->IsChecked() && nValue == 1 ) || + ( !m_pBtnTexColor->IsChecked() && nValue == 3 ) ) { - aBtnTexLuminance.Check( nValue == 1 ); - aBtnTexColor.Check( nValue == 3 ); + m_pBtnTexLuminance->Check( nValue == 1 ); + m_pBtnTexColor->Check( nValue == 3 ); bUpdate = true; } } else { - if( aBtnTexLuminance.IsChecked() || - aBtnTexColor.IsChecked() ) + if( m_pBtnTexLuminance->IsChecked() || + m_pBtnTexColor->IsChecked() ) { - aBtnTexLuminance.Check( false ); - aBtnTexColor.Check( false ); + m_pBtnTexLuminance->Check( false ); + m_pBtnTexColor->Check( false ); bUpdate = true; } } @@ -1437,21 +1298,21 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) { sal_uInt16 nValue = static_cast<const Svx3DTextureModeItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_MODE)).GetValue(); - if( ( !aBtnTexReplace.IsChecked() && nValue == 1 ) || - ( !aBtnTexModulate.IsChecked() && nValue == 2 ) ) + if( ( !m_pBtnTexReplace->IsChecked() && nValue == 1 ) || + ( !m_pBtnTexModulate->IsChecked() && nValue == 2 ) ) { - aBtnTexReplace.Check( nValue == 1 ); - aBtnTexModulate.Check( nValue == 2 ); + m_pBtnTexReplace->Check( nValue == 1 ); + m_pBtnTexModulate->Check( nValue == 2 ); bUpdate = true; } } else { - if( aBtnTexReplace.IsChecked() || - aBtnTexModulate.IsChecked() ) + if( m_pBtnTexReplace->IsChecked() || + m_pBtnTexModulate->IsChecked() ) { - aBtnTexReplace.Check( false ); - aBtnTexModulate.Check( false ); + m_pBtnTexReplace->Check( false ); + m_pBtnTexModulate->Check( false ); bUpdate = true; } } @@ -1462,25 +1323,25 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) { sal_uInt16 nValue = static_cast<const Svx3DTextureProjectionXItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X)).GetValue(); - if( ( !aBtnTexObjectX.IsChecked() && nValue == 0 ) || - ( !aBtnTexParallelX.IsChecked() && nValue == 1 ) || - ( !aBtnTexCircleX.IsChecked() && nValue == 2 ) ) + if( ( !m_pBtnTexObjectX->IsChecked() && nValue == 0 ) || + ( !m_pBtnTexParallelX->IsChecked() && nValue == 1 ) || + ( !m_pBtnTexCircleX->IsChecked() && nValue == 2 ) ) { - aBtnTexObjectX.Check( nValue == 0 ); - aBtnTexParallelX.Check( nValue == 1 ); - aBtnTexCircleX.Check( nValue == 2 ); + m_pBtnTexObjectX->Check( nValue == 0 ); + m_pBtnTexParallelX->Check( nValue == 1 ); + m_pBtnTexCircleX->Check( nValue == 2 ); bUpdate = true; } } else { - if( aBtnTexObjectX.IsChecked() || - aBtnTexParallelX.IsChecked() || - aBtnTexCircleX.IsChecked() ) + if( m_pBtnTexObjectX->IsChecked() || + m_pBtnTexParallelX->IsChecked() || + m_pBtnTexCircleX->IsChecked() ) { - aBtnTexObjectX.Check( false ); - aBtnTexParallelX.Check( false ); - aBtnTexCircleX.Check( false ); + m_pBtnTexObjectX->Check( false ); + m_pBtnTexParallelX->Check( false ); + m_pBtnTexCircleX->Check( false ); bUpdate = true; } } @@ -1491,25 +1352,25 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) { sal_uInt16 nValue = static_cast<const Svx3DTextureProjectionYItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y)).GetValue(); - if( ( !aBtnTexObjectY.IsChecked() && nValue == 0 ) || - ( !aBtnTexParallelY.IsChecked() && nValue == 1 ) || - ( !aBtnTexCircleY.IsChecked() && nValue == 2 ) ) + if( ( !m_pBtnTexObjectY->IsChecked() && nValue == 0 ) || + ( !m_pBtnTexParallelY->IsChecked() && nValue == 1 ) || + ( !m_pBtnTexCircleY->IsChecked() && nValue == 2 ) ) { - aBtnTexObjectY.Check( nValue == 0 ); - aBtnTexParallelY.Check( nValue == 1 ); - aBtnTexCircleY.Check( nValue == 2 ); + m_pBtnTexObjectY->Check( nValue == 0 ); + m_pBtnTexParallelY->Check( nValue == 1 ); + m_pBtnTexCircleY->Check( nValue == 2 ); bUpdate = true; } } else { - if( aBtnTexObjectY.IsChecked() || - aBtnTexParallelY.IsChecked() || - aBtnTexCircleY.IsChecked() ) + if( m_pBtnTexObjectY->IsChecked() || + m_pBtnTexParallelY->IsChecked() || + m_pBtnTexCircleY->IsChecked() ) { - aBtnTexObjectY.Check( false ); - aBtnTexParallelY.Check( false ); - aBtnTexCircleY.Check( false ); + m_pBtnTexObjectY->Check( false ); + m_pBtnTexParallelY->Check( false ); + m_pBtnTexCircleY->Check( false ); bUpdate = true; } } @@ -1519,19 +1380,19 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { bool bValue = static_cast<const SfxBoolItem&>(rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue(); - if( bValue != aBtnTexFilter.IsChecked() ) + if( bValue != m_pBtnTexFilter->IsChecked() ) { - aBtnTexFilter.Check( bValue ); + m_pBtnTexFilter->Check( bValue ); bUpdate = true; } - if( aBtnTexFilter.GetState() == TRISTATE_INDET ) - aBtnTexFilter.Check( bValue ); + if( m_pBtnTexFilter->GetState() == TRISTATE_INDET ) + m_pBtnTexFilter->Check( bValue ); } else { - if( aBtnTexFilter.GetState() != TRISTATE_INDET ) + if( m_pBtnTexFilter->GetState() != TRISTATE_INDET ) { - aBtnTexFilter.SetState( TRISTATE_INDET ); + m_pBtnTexFilter->SetState( TRISTATE_INDET ); bUpdate = true; } } @@ -1539,14 +1400,14 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // Material Favorites - aLbMatFavorites.SelectEntryPos( 0 ); + m_pLbMatFavorites->SelectEntryPos( 0 ); // Object color eState = rAttrs.GetItemState(XATTR_FILLCOLOR); if( eState != SfxItemState::DONTCARE ) { aColor = static_cast<const XFillColorItem&>(rAttrs.Get(XATTR_FILLCOLOR)).GetColorValue(); - ColorLB* pLb = &aLbMatColor; + ColorLB* pLb = m_pLbMatColor; if( aColor != pLb->GetSelectEntryColor() ) { LBSelectColor( pLb, aColor ); @@ -1555,9 +1416,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } else { - if( aLbMatColor.GetSelectEntryCount() != 0 ) + if( m_pLbMatColor->GetSelectEntryCount() != 0 ) { - aLbMatColor.SetNoSelection(); + m_pLbMatColor->SetNoSelection(); bUpdate = true; } } @@ -1567,7 +1428,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DOBJ_MAT_EMISSION)).GetValue(); - ColorLB* pLb = &aLbMatEmission; + ColorLB* pLb = m_pLbMatEmission; if( aColor != pLb->GetSelectEntryColor() ) { LBSelectColor( pLb, aColor ); @@ -1576,9 +1437,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } else { - if( aLbMatEmission.GetSelectEntryCount() != 0 ) + if( m_pLbMatEmission->GetSelectEntryCount() != 0 ) { - aLbMatEmission.SetNoSelection(); + m_pLbMatEmission->SetNoSelection(); bUpdate = true; } } @@ -1588,7 +1449,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { aColor = static_cast<const SvxColorItem&>(rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR)).GetValue(); - ColorLB* pLb = &aLbMatSpecular; + ColorLB* pLb = m_pLbMatSpecular; if( aColor != pLb->GetSelectEntryColor() ) { LBSelectColor( pLb, aColor ); @@ -1597,9 +1458,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } else { - if( aLbMatSpecular.GetSelectEntryCount() != 0 ) + if( m_pLbMatSpecular->GetSelectEntryCount() != 0 ) { - aLbMatSpecular.SetNoSelection(); + m_pLbMatSpecular->SetNoSelection(); bUpdate = true; } } @@ -1609,17 +1470,17 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { sal_uInt16 nValue = static_cast<const SfxUInt16Item&>(rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY)).GetValue(); - if( nValue != aMtrMatSpecularIntensity.GetValue() ) + if( nValue != m_pMtrMatSpecularIntensity->GetValue() ) { - aMtrMatSpecularIntensity.SetValue( nValue ); + m_pMtrMatSpecularIntensity->SetValue( nValue ); bUpdate = true; } } else { - if( !aMtrMatSpecularIntensity.IsEmptyFieldValue() ) + if( !m_pMtrMatSpecularIntensity->IsEmptyFieldValue() ) { - aMtrMatSpecularIntensity.SetEmptyFieldValue(); + m_pMtrMatSpecularIntensity->SetEmptyFieldValue(); bUpdate = true; } } @@ -1631,20 +1492,20 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( eState != SfxItemState::DONTCARE ) { ProjectionType ePT = (ProjectionType)static_cast<const Svx3DPerspectiveItem&>(rAttrs.Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue(); - if( ( !aBtnPerspective.IsChecked() && ePT == PR_PERSPECTIVE ) || - ( aBtnPerspective.IsChecked() && ePT == PR_PARALLEL ) ) + if( ( !m_pBtnPerspective->IsChecked() && ePT == PR_PERSPECTIVE ) || + ( m_pBtnPerspective->IsChecked() && ePT == PR_PARALLEL ) ) { - aBtnPerspective.Check( ePT == PR_PERSPECTIVE ); + m_pBtnPerspective->Check( ePT == PR_PERSPECTIVE ); bUpdate = true; } - if( aBtnPerspective.GetState() == TRISTATE_INDET ) - aBtnPerspective.Check( ePT == PR_PERSPECTIVE ); + if( m_pBtnPerspective->GetState() == TRISTATE_INDET ) + m_pBtnPerspective->Check( ePT == PR_PERSPECTIVE ); } else { - if( aBtnPerspective.GetState() != TRISTATE_INDET ) + if( m_pBtnPerspective->GetState() != TRISTATE_INDET ) { - aBtnPerspective.SetState( TRISTATE_INDET ); + m_pBtnPerspective->SetState( TRISTATE_INDET ); bUpdate = true; } } @@ -1671,38 +1532,38 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if(SfxItemState::DONTCARE == aSet.GetItemState(XATTR_FILLCOLOR, false)) aSet.Put(XFillColorItem(OUString(), Color(COL_WHITE))); - aCtlPreview.Set3DAttributes(aSet); - aCtlLightPreview.GetSvx3DLightControl().Set3DAttributes(aSet); + m_pCtlPreview->Set3DAttributes(aSet); + m_pCtlLightPreview->GetSvx3DLightControl().Set3DAttributes(aSet); // try to select light corresponding to active button sal_uInt32 nNumber(0xffffffff); - if(aBtnLight1.IsChecked()) + if(m_pBtnLight1->IsChecked()) nNumber = 0; - else if(aBtnLight2.IsChecked()) + else if(m_pBtnLight2->IsChecked()) nNumber = 1; - else if(aBtnLight3.IsChecked()) + else if(m_pBtnLight3->IsChecked()) nNumber = 2; - else if(aBtnLight4.IsChecked()) + else if(m_pBtnLight4->IsChecked()) nNumber = 3; - else if(aBtnLight5.IsChecked()) + else if(m_pBtnLight5->IsChecked()) nNumber = 4; - else if(aBtnLight6.IsChecked()) + else if(m_pBtnLight6->IsChecked()) nNumber = 5; - else if(aBtnLight7.IsChecked()) + else if(m_pBtnLight7->IsChecked()) nNumber = 6; - else if(aBtnLight8.IsChecked()) + else if(m_pBtnLight8->IsChecked()) nNumber = 7; if(nNumber != 0xffffffff) { - aCtlLightPreview.GetSvx3DLightControl().SelectLight(nNumber); + m_pCtlLightPreview->GetSvx3DLightControl().SelectLight(nNumber); } } // handle state of converts possible - aBtnConvertTo3D.Enable(pConvertTo3DItem->GetState()); - aBtnLatheObject.Enable(pConvertTo3DLatheItem->GetState()); + m_pBtnConvertTo3D->Enable(pConvertTo3DItem->GetState()); + m_pBtnLatheObject->Enable(pConvertTo3DLatheItem->GetState()); } @@ -1728,10 +1589,10 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) //Others must stand as the front on all sides // Perspective - if( aBtnPerspective.GetState() != TRISTATE_INDET ) + if( m_pBtnPerspective->GetState() != TRISTATE_INDET ) { sal_uInt16 nValue; - if( aBtnPerspective.IsChecked() ) + if( m_pBtnPerspective->IsChecked() ) nValue = PR_PERSPECTIVE; else nValue = PR_PARALLEL; @@ -1753,34 +1614,34 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) } // Number of segments (horizontal) - if( !aNumHorizontal.IsEmptyFieldValue() ) + if( !m_pNumHorizontal->IsEmptyFieldValue() ) { - sal_uInt32 nValue = static_cast<sal_uInt32>(aNumHorizontal.GetValue()); + sal_uInt32 nValue = static_cast<sal_uInt32>(m_pNumHorizontal->GetValue()); rAttrs.Put(makeSvx3DHorizontalSegmentsItem(nValue)); } else rAttrs.InvalidateItem(SDRATTR_3DOBJ_HORZ_SEGS); // Number of segments (vertical) - if( !aNumVertical.IsEmptyFieldValue() ) + if( !m_pNumVertical->IsEmptyFieldValue() ) { - sal_uInt32 nValue = static_cast<sal_uInt32>(aNumVertical.GetValue()); + sal_uInt32 nValue = static_cast<sal_uInt32>(m_pNumVertical->GetValue()); rAttrs.Put(makeSvx3DVerticalSegmentsItem(nValue)); } else rAttrs.InvalidateItem(SDRATTR_3DOBJ_VERT_SEGS); // Depth - if( !aMtrDepth.IsEmptyFieldValue() ) + if( !m_pMtrDepth->IsEmptyFieldValue() ) { - sal_uInt32 nValue = GetCoreValue( aMtrDepth, ePoolUnit ); + sal_uInt32 nValue = GetCoreValue(*m_pMtrDepth, ePoolUnit); rAttrs.Put(makeSvx3DDepthItem(nValue)); } else rAttrs.InvalidateItem(SDRATTR_3DOBJ_DEPTH); // Double-sided - TriState eState = aBtnDoubleSided.GetState(); + TriState eState = m_pBtnDoubleSided->GetState(); if( eState != TRISTATE_INDET ) { bool bValue = TRISTATE_TRUE == eState; @@ -1790,27 +1651,27 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) rAttrs.InvalidateItem(SDRATTR_3DOBJ_DOUBLE_SIDED); // Edge rounding - if( !aMtrPercentDiagonal.IsEmptyFieldValue() ) + if( !m_pMtrPercentDiagonal->IsEmptyFieldValue() ) { - sal_uInt16 nValue = (sal_uInt16) aMtrPercentDiagonal.GetValue(); + sal_uInt16 nValue = (sal_uInt16) m_pMtrPercentDiagonal->GetValue(); rAttrs.Put(makeSvx3DPercentDiagonalItem(nValue)); } else rAttrs.InvalidateItem(SDRATTR_3DOBJ_PERCENT_DIAGONAL); // Depth scale - if( !aMtrBackscale.IsEmptyFieldValue() ) + if( !m_pMtrBackscale->IsEmptyFieldValue() ) { - sal_uInt16 nValue = (sal_uInt16)aMtrBackscale.GetValue(); + sal_uInt16 nValue = (sal_uInt16)m_pMtrBackscale->GetValue(); rAttrs.Put(makeSvx3DBackscaleItem(nValue)); } else rAttrs.InvalidateItem(SDRATTR_3DOBJ_BACKSCALE); // End angle - if( !aMtrEndAngle.IsEmptyFieldValue() ) + if( !m_pMtrEndAngle->IsEmptyFieldValue() ) { - sal_uInt16 nValue = (sal_uInt16)aMtrEndAngle.GetValue(); + sal_uInt16 nValue = (sal_uInt16)m_pMtrEndAngle->GetValue(); rAttrs.Put(makeSvx3DEndAngleItem(nValue)); } else ... etc. - the rest is truncated
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits