[Libreoffice-commits] core.git: Branch 'feature/vclref' - include/svx svx/inc svx/source svx/workben

Noel Grandin noel at peralex.com
Wed Jan 14 01:12:37 PST 2015


 include/svx/colrctrl.hxx                                               |    4 
 include/svx/fillctrl.hxx                                               |    1 
 include/svx/float3d.hxx                                                |  196 
 include/svx/itemwin.hxx                                                |    4 
 include/svx/linectrl.hxx                                               |    3 
 include/svx/numvset.hxx                                                |   26 
 include/svx/sidebar/PanelLayout.hxx                                    |    1 
 include/svx/sidebar/PopupContainer.hxx                                 |    1 
 include/svx/sidebar/PopupControl.hxx                                   |    1 
 include/svx/sidebar/SidebarDialControl.hxx                             |    1 
 include/svx/sidebar/ValueSetWithTextControl.hxx                        |    2 
 include/svx/swframeexample.hxx                                         |    1 
 include/svx/txencbox.hxx                                               |    1 
 svx/inc/tbunosearchcontrollers.hxx                                     |    1 
 svx/source/dialog/svxbmpnumvalueset.cxx                                |   12 
 svx/source/dialog/swframeexample.cxx                                   |    4 
 svx/source/dialog/txencbox.cxx                                         |    6 
 svx/source/engine3d/float3d.cxx                                        | 2200 +++++-----
 svx/source/form/filtnav.cxx                                            |   12 
 svx/source/form/fmPropBrw.cxx                                          |    6 
 svx/source/form/tabwin.cxx                                             |   11 
 svx/source/inc/filtnav.hxx                                             |    2 
 svx/source/inc/fmPropBrw.hxx                                           |    1 
 svx/source/inc/tabwin.hxx                                              |    2 
 svx/source/sidebar/EmptyPanel.cxx                                      |   18 
 svx/source/sidebar/EmptyPanel.hxx                                      |    7 
 svx/source/sidebar/PanelLayout.cxx                                     |    6 
 svx/source/sidebar/area/AreaPropertyPanel.cxx                          |    6 
 svx/source/sidebar/area/AreaPropertyPanel.hxx                          |    1 
 svx/source/sidebar/area/AreaTransparencyGradientControl.cxx            |  274 -
 svx/source/sidebar/area/AreaTransparencyGradientControl.hxx            |   31 
 svx/source/sidebar/graphic/GraphicPropertyPanel.cxx                    |    6 
 svx/source/sidebar/graphic/GraphicPropertyPanel.hxx                    |    1 
 svx/source/sidebar/insert/InsertPropertyPanel.cxx                      |    8 
 svx/source/sidebar/insert/InsertPropertyPanel.hxx                      |    3 
 svx/source/sidebar/line/LinePropertyPanel.cxx                          |    6 
 svx/source/sidebar/line/LinePropertyPanel.hxx                          |    1 
 svx/source/sidebar/line/LineWidthControl.cxx                           |  152 
 svx/source/sidebar/line/LineWidthControl.hxx                           |   13 
 svx/source/sidebar/line/LineWidthValueSet.cxx                          |    8 
 svx/source/sidebar/line/LineWidthValueSet.hxx                          |    3 
 svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx                |    4 
 svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx                |    1 
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx                     |    4 
 svx/source/sidebar/paragraph/ParaPropertyPanel.hxx                     |    1 
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx                    |    4 
 svx/source/sidebar/possize/PosSizePropertyPanel.hxx                    |    1 
 svx/source/sidebar/possize/SidebarDialControl.cxx                      |    4 
 svx/source/sidebar/text/TextCharacterSpacingControl.cxx                |  235 -
 svx/source/sidebar/text/TextCharacterSpacingControl.hxx                |   13 
 svx/source/sidebar/text/TextPropertyPanel.cxx                          |    4 
 svx/source/sidebar/text/TextPropertyPanel.hxx                          |    1 
 svx/source/sidebar/text/TextUnderlineControl.cxx                       |  166 
 svx/source/sidebar/text/TextUnderlineControl.hxx                       |    4 
 svx/source/sidebar/tools/PopupContainer.cxx                            |    7 
 svx/source/sidebar/tools/PopupControl.cxx                              |    7 
 svx/source/sidebar/tools/ValueSetWithTextControl.cxx                   |    5 
 svx/source/tbxctrls/colrctrl.cxx                                       |   63 
 svx/source/tbxctrls/fillctrl.cxx                                       |    6 
 svx/source/tbxctrls/grafctrl.cxx                                       |   51 
 svx/source/tbxctrls/itemwin.cxx                                        |   24 
 svx/source/tbxctrls/layctrl.cxx                                        |   20 
 svx/source/tbxctrls/linectrl.cxx                                       |   57 
 svx/source/tbxctrls/tbunosearchcontrollers.cxx                         |    4 
 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx  |    6 
 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx  |    1 
 svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx |    6 
 svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx |    1 
 svx/workben/pixelctl.cxx                                               |   17 
 69 files changed, 1956 insertions(+), 1804 deletions(-)

New commits:
commit cb263a816160d9aa52c8433aace8a06b59ce5f3e
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Jan 14 11:11:33 2015 +0200

    vcl: VclPtr conversion in svx (part2)
    
    Change-Id: Idc65ec543bf19d163734682c06eac93a9d2737b2

diff --git a/include/svx/colrctrl.hxx b/include/svx/colrctrl.hxx
index 7de406d..8b0de98 100644
--- a/include/svx/colrctrl.hxx
+++ b/include/svx/colrctrl.hxx
@@ -26,6 +26,7 @@
 #include <svl/lstner.hxx>
 #include <svx/svxdllapi.h>
 #include <svx/xtable.hxx>
+#include <vcl/vclptr.hxx>
 
 class SvData;
 
@@ -75,7 +76,7 @@ class SvxColorDockingWindow : public SfxDockingWindow, public SfxListener
 
 private:
     XColorListRef       pColorList;
-    SvxColorValueSet_docking aColorSet;
+    VclPtr<SvxColorValueSet_docking> aColorSet;
     sal_uInt16          nLeftSlot;
     sal_uInt16          nRightSlot;
     sal_uInt16          nCols;
@@ -103,6 +104,7 @@ public:
                           SfxChildWindow *pCW,
                           vcl::Window* pParent);
     virtual ~SvxColorDockingWindow();
+    virtual void    dispose() SAL_OVERRIDE;
 
     virtual void    Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
 
diff --git a/include/svx/fillctrl.hxx b/include/svx/fillctrl.hxx
index c8878d9..1c164cd 100644
--- a/include/svx/fillctrl.hxx
+++ b/include/svx/fillctrl.hxx
@@ -101,6 +101,7 @@ private:
 public:
     FillControl(vcl::Window* pParent, WinBits nStyle = 0);
     virtual ~FillControl();
+    virtual void dispose() SAL_OVERRIDE;
 
     virtual void Resize() SAL_OVERRIDE;
 };
diff --git a/include/svx/float3d.hxx b/include/svx/float3d.hxx
index 398fd69..f7912c7 100644
--- a/include/svx/float3d.hxx
+++ b/include/svx/float3d.hxx
@@ -69,118 +69,118 @@ private:
     VclPtr<ImageButton>         aBtnAssign;
 
 // 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;
+    VclPtr<FixedLine>           aFLGeometrie;
+    VclPtr<FixedText>           aFtPercentDiagonal;
+    VclPtr<MetricField>         aMtrPercentDiagonal;
+    VclPtr<FixedText>           aFtBackscale;
+    VclPtr<MetricField>         aMtrBackscale;
+    VclPtr<FixedText>           aFtEndAngle;
+    VclPtr<MetricField>         aMtrEndAngle;
+    VclPtr<FixedText>           aFtDepth;
+    VclPtr<MetricField>         aMtrDepth;
+    VclPtr<FixedLine>           aFLSegments;
+
+    VclPtr<FixedText>           aFtHorizontal;
+    VclPtr<NumericField>        aNumHorizontal;
+    VclPtr<FixedText>           aFtVertical;
+    VclPtr<NumericField>        aNumVertical;
+    VclPtr<FixedLine>           aFLNormals;
+
+    VclPtr<ImageButton>         aBtnNormalsObj;
+    VclPtr<ImageButton>         aBtnNormalsFlat;
+    VclPtr<ImageButton>         aBtnNormalsSphere;
+    VclPtr<ImageButton>         aBtnNormalsInvert;
+    VclPtr<ImageButton>         aBtnTwoSidedLighting;
+
+    VclPtr<ImageButton>         aBtnDoubleSided;
+    VclPtr<FixedLine>           aFLRepresentation;
 // 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;
+    VclPtr<FixedText>           aFtShademode;
+    VclPtr<ListBox>             aLbShademode;
+    VclPtr<FixedLine>           aFLShadow;
+    VclPtr<ImageButton>         aBtnShadow3d;
+    VclPtr<FixedText>           aFtSlant;
+    VclPtr<MetricField>         aMtrSlant;
+    VclPtr<FixedText>           aFtDistance;
+    VclPtr<MetricField>         aMtrDistance;
+    VclPtr<FixedText>           aFtFocalLeng;
+    VclPtr<MetricField>         aMtrFocalLength;
+    VclPtr<FixedLine>           aFLCamera;
+    VclPtr<FixedLine>           aFLLight;
 
 // 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;
+    VclPtr<ImageButton>         aBtnLight1;
+    VclPtr<ImageButton>         aBtnLight2;
+    VclPtr<ImageButton>         aBtnLight3;
+    VclPtr<ImageButton>         aBtnLight4;
+    VclPtr<ImageButton>         aBtnLight5;
+    VclPtr<ImageButton>         aBtnLight6;
+    VclPtr<ImageButton>         aBtnLight7;
+    VclPtr<ImageButton>         aBtnLight8;
+    VclPtr<FixedText>           aFTLightsource;
+    VclPtr<ColorLB>             aLbLight1;
+    VclPtr<ColorLB>             aLbLight2;
+    VclPtr<ColorLB>             aLbLight3;
+    VclPtr<ColorLB>             aLbLight4;
+    VclPtr<ColorLB>             aLbLight5;
+    VclPtr<ColorLB>             aLbLight6;
+    VclPtr<ColorLB>             aLbLight7;
+    VclPtr<ColorLB>             aLbLight8;
+
+    VclPtr<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
+    VclPtr<FixedText>           aFTAmbientlight;    // Text label
+    VclPtr<ColorLB>             aLbAmbientlight;    // ListBox
+    VclPtr<ImageButton>         aBtnAmbientColor;   // color button
 
-    FixedLine           aFLTexture;
+    VclPtr<FixedLine>           aFLTexture;
 
 // 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;
+    VclPtr<FixedText>           aFtTexKind;
+    VclPtr<ImageButton>         aBtnTexLuminance;
+    VclPtr<ImageButton>         aBtnTexColor;
+    VclPtr<FixedText>           aFtTexMode;
+    VclPtr<ImageButton>         aBtnTexReplace;
+    VclPtr<ImageButton>         aBtnTexModulate;
+    VclPtr<ImageButton>         aBtnTexBlend;
+    VclPtr<FixedText>           aFtTexProjectionX;
+    VclPtr<ImageButton>         aBtnTexObjectX;
+    VclPtr<ImageButton>         aBtnTexParallelX;
+    VclPtr<ImageButton>         aBtnTexCircleX;
+    VclPtr<FixedText>           aFtTexProjectionY;
+    VclPtr<ImageButton>         aBtnTexObjectY;
+    VclPtr<ImageButton>         aBtnTexParallelY;
+    VclPtr<ImageButton>         aBtnTexCircleY;
+    VclPtr<FixedText>           aFtTexFilter;
+    VclPtr<ImageButton>         aBtnTexFilter;
 
 // 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;
+    VclPtr<FixedLine>           aFLMaterial;
+    VclPtr<FixedText>           aFtMatFavorites;
+    VclPtr<ListBox>             aLbMatFavorites;
+    VclPtr<FixedText>           aFtMatColor;
+    VclPtr<ColorLB>             aLbMatColor;
+    VclPtr<ImageButton>         aBtnMatColor;
+    VclPtr<FixedText>           aFtMatEmission;
+    VclPtr<ColorLB>             aLbMatEmission;
+    VclPtr<ImageButton>         aBtnEmissionColor;
+    VclPtr<FixedLine>           aFLMatSpecular;
+    VclPtr<FixedText>           aFtMatSpecular;
+    VclPtr<ColorLB>             aLbMatSpecular;
+    VclPtr<ImageButton>         aBtnSpecularColor;
+    VclPtr<FixedText>           aFtMatSpecularIntensity;
+    VclPtr<MetricField>         aMtrMatSpecularIntensity;
+
+    VclPtr<Svx3DPreviewControl> aCtlPreview;
+    VclPtr<SvxLightCtl3D>       aCtlLightPreview;
 
 // bottom part
-    ImageButton         aBtnConvertTo3D;
-    ImageButton         aBtnLatheObject;
-    ImageButton         aBtnPerspective;
+    VclPtr<ImageButton>         aBtnConvertTo3D;
+    VclPtr<ImageButton>         aBtnLatheObject;
+    VclPtr<ImageButton>         aBtnPerspective;
 
 // the rest ...
     Image               aImgLightOn;
diff --git a/include/svx/itemwin.hxx b/include/svx/itemwin.hxx
index 0df5118..7852285 100644
--- a/include/svx/itemwin.hxx
+++ b/include/svx/itemwin.hxx
@@ -49,7 +49,6 @@ public:
     SvxLineBox( vcl::Window* pParent,
                 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
                 WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL );
-    virtual ~SvxLineBox();
 
     void FillControl();
 
@@ -87,7 +86,6 @@ public:
     SvxMetricField( vcl::Window* pParent,
                     const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
                     WinBits nBits = WB_BORDER | WB_SPIN | WB_REPEAT );
-    virtual ~SvxMetricField();
 
     void            Update( const XLineWidthItem* pItem );
     void            SetCoreUnit( SfxMapUnit eUnit );
@@ -100,7 +98,6 @@ class SvxFillTypeBox : public FillTypeLB
 {
 public:
     SvxFillTypeBox( vcl::Window* pParent, WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL );
-    virtual ~SvxFillTypeBox();
 
     void            Selected() { bSelect = true; }
     bool            IsRelease() { return bRelease;}
@@ -123,7 +120,6 @@ class SvxFillAttrBox : public FillAttrLB
 {
 public:
     SvxFillAttrBox( vcl::Window* pParent, WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL );
-    virtual ~SvxFillAttrBox();
 
     bool            IsRelease() { return bRelease;}
 
diff --git a/include/svx/linectrl.hxx b/include/svx/linectrl.hxx
index c7c80a4..a853dd8 100644
--- a/include/svx/linectrl.hxx
+++ b/include/svx/linectrl.hxx
@@ -82,7 +82,7 @@ class SvxLineEndWindow : public SfxPopupWindow
 
 private:
     XLineEndListRef pLineEndList;
-    ValueSet        aLineEndSet;
+    VclPtr<ValueSet> aLineEndSet;
     sal_uInt16      nCols;
     sal_uInt16      nLines;
     sal_uIntPtr     nLineEndWidth;
@@ -118,6 +118,7 @@ public:
                       vcl::Window* pParentWindow,
                       const OUString& rWndTitle );
     virtual ~SvxLineEndWindow();
+    virtual void    dispose() SAL_OVERRIDE;
 
     void            StartSelection();
 
diff --git a/include/svx/numvset.hxx b/include/svx/numvset.hxx
index 4bc16cf..15161dc 100644
--- a/include/svx/numvset.hxx
+++ b/include/svx/numvset.hxx
@@ -65,27 +65,26 @@ class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet
         com::sun::star::uno::Reference<
             com::sun::star::container::XIndexAccess> > aOutlineSettings;
 
-    public:
+public:
     SvxNumValueSet(vcl::Window* pParent, WinBits nWinBits = WB_TABSTOP);
     void init(sal_uInt16 nType);
     virtual ~SvxNumValueSet();
+    virtual void dispose() SAL_OVERRIDE;
 
     virtual void    UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE;
 
     void            SetHTMLMode(bool bSet) {bHTMLMode = bSet;}
     void            SetNumberingSettings(
-        const com::sun::star::uno::Sequence<
-            com::sun::star::uno::Sequence<
-                com::sun::star::beans::PropertyValue> >& aNum,
-        com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter>& xFormatter,
-        const com::sun::star::lang::Locale& rLocale );
+        const css::uno::Sequence<
+                  css::uno::Sequence<css::beans::PropertyValue> >& aNum,
+        css::uno::Reference<css::text::XNumberingFormatter>& xFormatter,
+        const css::lang::Locale& rLocale );
 
     void            SetOutlineNumberingSettings(
-            com::sun::star::uno::Sequence<
-                com::sun::star::uno::Reference<
-                    com::sun::star::container::XIndexAccess> >& rOutline,
-            com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter>& xFormatter,
-            const com::sun::star::lang::Locale& rLocale);
+            css::uno::Sequence<
+                css::uno::Reference<css::container::XIndexAccess> >& rOutline,
+            css::uno::Reference<css::text::XNumberingFormatter>& xFormatter,
+            const css::lang::Locale& rLocale);
 };
 
 class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet
@@ -95,7 +94,7 @@ class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet
 
     void init();
 
-    protected:
+protected:
         DECL_LINK(FormatHdl_Impl, void *);
 
     void            SetGrfNotFound(bool bSet) {bGrfNotFound = bSet;}
@@ -103,9 +102,10 @@ class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet
 
     Idle&          GetFormatIdle() {return aFormatIdle;}
 
-    public:
+public:
     SvxBmpNumValueSet(vcl::Window* pParent, WinBits nWinBits = WB_TABSTOP);
     virtual ~SvxBmpNumValueSet();
+    virtual void dispose() SAL_OVERRIDE;
 
     virtual void    UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE;
 
diff --git a/include/svx/sidebar/PanelLayout.hxx b/include/svx/sidebar/PanelLayout.hxx
index c696a62..4b030ed 100644
--- a/include/svx/sidebar/PanelLayout.hxx
+++ b/include/svx/sidebar/PanelLayout.hxx
@@ -33,6 +33,7 @@ public:
     PanelLayout(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription,
             const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> &rFrame);
     virtual ~PanelLayout();
+    virtual void dispose() SAL_OVERRIDE;
 
     virtual Size GetOptimalSize() const SAL_OVERRIDE;
     virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL) SAL_OVERRIDE;
diff --git a/include/svx/sidebar/PopupContainer.hxx b/include/svx/sidebar/PopupContainer.hxx
index f8f6f52..ff3c408 100644
--- a/include/svx/sidebar/PopupContainer.hxx
+++ b/include/svx/sidebar/PopupContainer.hxx
@@ -34,7 +34,6 @@ class SVX_DLLPUBLIC PopupContainer
 {
 public:
     PopupContainer (vcl::Window* pParent);
-    virtual ~PopupContainer (void);
 
     virtual bool Notify (NotifyEvent& rNEvt) SAL_OVERRIDE;
 };
diff --git a/include/svx/sidebar/PopupControl.hxx b/include/svx/sidebar/PopupControl.hxx
index 84bed5a..626e707 100644
--- a/include/svx/sidebar/PopupControl.hxx
+++ b/include/svx/sidebar/PopupControl.hxx
@@ -38,7 +38,6 @@ public :
     PopupControl (
         vcl::Window* pParent,
         const ResId& rResId);
-    virtual ~PopupControl (void);
 
     virtual void Paint (const Rectangle& rect) SAL_OVERRIDE;
 };
diff --git a/include/svx/sidebar/SidebarDialControl.hxx b/include/svx/sidebar/SidebarDialControl.hxx
index a77d0f4..52d798e 100644
--- a/include/svx/sidebar/SidebarDialControl.hxx
+++ b/include/svx/sidebar/SidebarDialControl.hxx
@@ -29,7 +29,6 @@ class SVX_DLLPUBLIC SidebarDialControl : public svx::DialControl
 {
 public:
     SidebarDialControl (vcl::Window* pParent, WinBits nBits = 0);
-    virtual ~SidebarDialControl (void);
 
     virtual Size GetOptimalSize() const SAL_OVERRIDE;
     virtual void MouseButtonDown (const MouseEvent& rMEvt) SAL_OVERRIDE;
diff --git a/include/svx/sidebar/ValueSetWithTextControl.hxx b/include/svx/sidebar/ValueSetWithTextControl.hxx
index 33054ea..e0c941d 100644
--- a/include/svx/sidebar/ValueSetWithTextControl.hxx
+++ b/include/svx/sidebar/ValueSetWithTextControl.hxx
@@ -52,8 +52,6 @@ public:
         vcl::Window* pParent,
         const ResId& rResId);
 
-    virtual ~ValueSetWithTextControl(void);
-
     // add item for control type IMAGE_TEXT
     // if control type does not match IMAGE_TEXT no item is added.
     // @param pSelectedItemImage
diff --git a/include/svx/swframeexample.hxx b/include/svx/swframeexample.hxx
index b6f698c..3ed7c44 100644
--- a/include/svx/swframeexample.hxx
+++ b/include/svx/swframeexample.hxx
@@ -74,7 +74,6 @@ protected:
 public:
 
     SvxSwFrameExample(vcl::Window* pParent, WinBits nStyle);
-    virtual ~SvxSwFrameExample();
 
     inline void SetWrap(sal_uInt16 nW)          { nWrap     = nW; }
 
diff --git a/include/svx/txencbox.hxx b/include/svx/txencbox.hxx
index e0df5ad..43f028b 100644
--- a/include/svx/txencbox.hxx
+++ b/include/svx/txencbox.hxx
@@ -35,6 +35,7 @@ private:
 public:
     SvxTextEncodingBox( vcl::Window* pParent, WinBits nBits );
     virtual ~SvxTextEncodingBox();
+    virtual void dispose() SAL_OVERRIDE;
 
     /** Fill with all known encodings but exclude those matching one or more
         given flags as defined in rtl/tencinfo.h
diff --git a/svx/inc/tbunosearchcontrollers.hxx b/svx/inc/tbunosearchcontrollers.hxx
index 25b3f81..0f3f6c5 100644
--- a/svx/inc/tbunosearchcontrollers.hxx
+++ b/svx/inc/tbunosearchcontrollers.hxx
@@ -48,7 +48,6 @@ public:
     FindTextFieldControl( vcl::Window* pParent, WinBits nStyle,
         css::uno::Reference< css::frame::XFrame >& xFrame,
         const css::uno::Reference< css::uno::XComponentContext >& xContext );
-    virtual ~FindTextFieldControl();
 
     virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
 
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 55aebe3..25e5bbd 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -423,7 +423,13 @@ void SvxNumValueSet::init(sal_uInt16 nType)
 
 SvxNumValueSet::~SvxNumValueSet()
 {
+    dispose();
+}
+
+void SvxNumValueSet::dispose()
+{
     delete pVDev;
+    ValueSet::dispose();
 }
 
 void SvxNumValueSet::SetNumberingSettings(
@@ -487,8 +493,14 @@ void SvxBmpNumValueSet::init()
 
 SvxBmpNumValueSet::~SvxBmpNumValueSet()
 {
+    dispose();
+}
+
+void SvxBmpNumValueSet::dispose()
+{
     GalleryExplorer::EndLocking(GALLERY_THEME_BULLETS);
     aFormatIdle.Stop();
+    SvxNumValueSet::dispose();
 }
 
 void SvxBmpNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx
index bea9c10..3144af2 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -62,10 +62,6 @@ Size SvxSwFrameExample::GetOptimalSize() const
     return LogicToPixel(Size(52, 86), MapMode(MAP_APPFONT));
 }
 
-SvxSwFrameExample::~SvxSwFrameExample()
-{
-}
-
 void SvxSwFrameExample::InitColors_Impl( void )
 {
     const StyleSettings& rSettings = GetSettings().GetStyleSettings();
diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx
index 1f453d5..2eb940b 100644
--- a/svx/source/dialog/txencbox.cxx
+++ b/svx/source/dialog/txencbox.cxx
@@ -59,7 +59,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxTextEncodingBox(vcl
 
 SvxTextEncodingBox::~SvxTextEncodingBox()
 {
+    dispose();
+}
+
+void SvxTextEncodingBox::dispose()
+{
     delete m_pEncTable;
+    ListBox::dispose();
 }
 
 
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index d054e39..2a43ee0 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -94,118 +94,118 @@ Svx3DWin::Svx3DWin( SfxBindings* pInBindings,
         aBtnMaterial        ( new ImageButton(this, SVX_RES( BTN_MATERIAL ) ) ),
         aBtnUpdate          ( new ImageButton(this, SVX_RES( BTN_UPDATE ) ) ),
         aBtnAssign          ( new ImageButton(this, SVX_RES( BTN_ASSIGN ) ) ),
-        aFLGeometrie       ( this, SVX_RES( FL_GEOMETRIE ) ),
+        aFLGeometrie        ( new FixedLine(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 ) ),
+        aFtPercentDiagonal  ( new FixedText(this, SVX_RES( FT_PERCENT_DIAGONAL ) ) ),
+        aMtrPercentDiagonal ( new MetricField(this, SVX_RES( MTR_PERCENT_DIAGONAL ) ) ),
+        aFtBackscale        ( new FixedText(this, SVX_RES( FT_BACKSCALE ) ) ),
+        aMtrBackscale       ( new MetricField(this, SVX_RES( MTR_BACKSCALE ) ) ),
+        aFtEndAngle         ( new FixedText(this, SVX_RES( FT_END_ANGLE ) ) ),
+        aMtrEndAngle        ( new MetricField(this, SVX_RES( MTR_END_ANGLE ) ) ),
+        aFtDepth            ( new FixedText(this, SVX_RES( FT_DEPTH ) ) ),
+        aMtrDepth           ( new MetricField(this, SVX_RES( MTR_DEPTH ) ) ),
+        aFLSegments         ( new FixedLine(this, SVX_RES( FL_SEGMENTS ) ) ),
+
+        aFtHorizontal       ( new FixedText(this, SVX_RES( FT_HORIZONTAL ) ) ),
+        aNumHorizontal      ( new NumericField(this, SVX_RES( NUM_HORIZONTAL ) ) ),
+        aFtVertical         ( new FixedText(this, SVX_RES( FT_VERTICAL ) ) ),
+        aNumVertical        ( new NumericField(this, SVX_RES( NUM_VERTICAL ) ) ),
+
+        aFLNormals          ( new FixedLine(this, SVX_RES( FL_NORMALS ) ) ),
+        aBtnNormalsObj      ( new ImageButton(this, SVX_RES( BTN_NORMALS_OBJ ) ) ),
+        aBtnNormalsFlat     ( new ImageButton(this, SVX_RES( BTN_NORMALS_FLAT ) ) ),
+        aBtnNormalsSphere   ( new ImageButton(this, SVX_RES( BTN_NORMALS_SPHERE ) ) ),
+        aBtnNormalsInvert   ( new ImageButton(this, SVX_RES( BTN_NORMALS_INVERT ) ) ),
+        aBtnTwoSidedLighting( new ImageButton(this, SVX_RES( BTN_TWO_SIDED_LIGHTING ) ) ),
+
+        aBtnDoubleSided     ( new ImageButton(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 ) ),
+        aFLRepresentation   ( new FixedLine(this, SVX_RES( FL_REPRESENTATION ) ) ),
+        aFtShademode        ( new FixedText(this, SVX_RES( FT_SHADEMODE ) ) ),
+        aLbShademode        ( new ListBox(this, SVX_RES( LB_SHADEMODE ) ) ),
+        aFLShadow           ( new FixedLine(this, SVX_RES( FL_SHADOW ) ) ),
+        aBtnShadow3d        ( new ImageButton(this, SVX_RES( BTN_SHADOW_3D ) ) ),
+        aFtSlant            ( new FixedText(this, SVX_RES( FT_SLANT ) ) ),
+        aMtrSlant           ( new MetricField(this, SVX_RES( MTR_SLANT ) ) ),
+        aFtDistance         ( new FixedText(this, SVX_RES( FT_DISTANCE ) ) ),
+        aMtrDistance        ( new MetricField(this, SVX_RES( MTR_DISTANCE ) ) ),
+        aFtFocalLeng        ( new FixedText(this, SVX_RES( FT_FOCAL_LENGTH ) ) ),
+        aMtrFocalLength     ( new MetricField(this, SVX_RES( MTR_FOCAL_LENGTH ) ) ),
+        aFLCamera           ( new FixedLine(this, SVX_RES( FL_CAMERA ) ) ),
+        aFLLight            ( new FixedLine(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 ) ),
+        aBtnLight1          ( new ImageButton(this, SVX_RES( BTN_LIGHT_1 ) ) ),
+        aBtnLight2          ( new ImageButton(this, SVX_RES( BTN_LIGHT_2 ) ) ),
+        aBtnLight3          ( new ImageButton(this, SVX_RES( BTN_LIGHT_3 ) ) ),
+        aBtnLight4          ( new ImageButton(this, SVX_RES( BTN_LIGHT_4 ) ) ),
+        aBtnLight5          ( new ImageButton(this, SVX_RES( BTN_LIGHT_5 ) ) ),
+        aBtnLight6          ( new ImageButton(this, SVX_RES( BTN_LIGHT_6 ) ) ),
+        aBtnLight7          ( new ImageButton(this, SVX_RES( BTN_LIGHT_7 ) ) ),
+        aBtnLight8          ( new ImageButton(this, SVX_RES( BTN_LIGHT_8 ) ) ),
+        aFTLightsource      ( new FixedText(this, SVX_RES( FT_LIGHTSOURCE ) ) ),
+        aLbLight1           ( new ColorLB(this, SVX_RES( LB_LIGHT_1 ) ) ),
+        aLbLight2           ( new ColorLB(this, SVX_RES( LB_LIGHT_2 ) ) ),
+        aLbLight3           ( new ColorLB(this, SVX_RES( LB_LIGHT_3 ) ) ),
+        aLbLight4           ( new ColorLB(this, SVX_RES( LB_LIGHT_4 ) ) ),
+        aLbLight5           ( new ColorLB(this, SVX_RES( LB_LIGHT_5 ) ) ),
+        aLbLight6           ( new ColorLB(this, SVX_RES( LB_LIGHT_6 ) ) ),
+        aLbLight7           ( new ColorLB(this, SVX_RES( LB_LIGHT_7 ) ) ),
+        aLbLight8           ( new ColorLB(this, SVX_RES( LB_LIGHT_8 ) ) ),
+
+        aBtnLightColor      ( new ImageButton(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 ) ),
+        aFTAmbientlight     ( new FixedText(this, SVX_RES( FT_AMBIENTLIGHT ) ) ),   // Text label
+        aLbAmbientlight     ( new ColorLB(this, SVX_RES( LB_AMBIENTLIGHT ) ) ),   // ListBox
+        aBtnAmbientColor    ( new ImageButton(this, SVX_RES( BTN_AMBIENT_COLOR ) ) ), // color button
+        aFLTexture          ( new FixedLine(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 ) ),
+        aFtTexKind          ( new FixedText(this, SVX_RES( FT_TEX_KIND ) ) ),
+        aBtnTexLuminance    ( new ImageButton(this, SVX_RES( BTN_TEX_LUMINANCE ) ) ),
+        aBtnTexColor        ( new ImageButton(this, SVX_RES( BTN_TEX_COLOR ) ) ),
+        aFtTexMode          ( new FixedText(this, SVX_RES( FT_TEX_MODE ) ) ),
+        aBtnTexReplace      ( new ImageButton(this, SVX_RES( BTN_TEX_REPLACE ) ) ),
+        aBtnTexModulate     ( new ImageButton(this, SVX_RES( BTN_TEX_MODULATE ) ) ),
+        aBtnTexBlend        ( new ImageButton(this, SVX_RES( BTN_TEX_BLEND ) ) ),
+        aFtTexProjectionX   ( new FixedText(this, SVX_RES( FT_TEX_PROJECTION_X ) ) ),
+        aBtnTexObjectX      ( new ImageButton(this, SVX_RES( BTN_TEX_OBJECT_X ) ) ),
+        aBtnTexParallelX    ( new ImageButton(this, SVX_RES( BTN_TEX_PARALLEL_X ) ) ),
+        aBtnTexCircleX      ( new ImageButton(this, SVX_RES( BTN_TEX_CIRCLE_X ) ) ),
+        aFtTexProjectionY   ( new FixedText(this, SVX_RES( FT_TEX_PROJECTION_Y ) ) ),
+        aBtnTexObjectY      ( new ImageButton(this, SVX_RES( BTN_TEX_OBJECT_Y ) ) ),
+        aBtnTexParallelY    ( new ImageButton(this, SVX_RES( BTN_TEX_PARALLEL_Y ) ) ),
+        aBtnTexCircleY      ( new ImageButton(this, SVX_RES( BTN_TEX_CIRCLE_Y ) ) ),
+        aFtTexFilter        ( new FixedText(this, SVX_RES( FT_TEX_FILTER ) ) ),
+        aBtnTexFilter       ( new ImageButton(this, SVX_RES( BTN_TEX_FILTER ) ) ),
+        aFLMaterial         ( new FixedLine(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 ) ),
+        aFtMatFavorites     ( new FixedText(this, SVX_RES( FT_MAT_FAVORITES ) ) ),
+        aLbMatFavorites     ( new ListBox(this, SVX_RES( LB_MAT_FAVORITES ) ) ),
+        aFtMatColor         ( new FixedText(this, SVX_RES( FT_MAT_COLOR ) ) ),
+        aLbMatColor         ( new ColorLB(this, SVX_RES( LB_MAT_COLOR ) ) ),
+        aBtnMatColor        ( new ImageButton(this, SVX_RES( BTN_MAT_COLOR )  )),
+        aFtMatEmission      ( new FixedText(this, SVX_RES( FT_MAT_EMISSION ) ) ),
+        aLbMatEmission      ( new ColorLB(this, SVX_RES( LB_MAT_EMISSION ) ) ),
+        aBtnEmissionColor   ( new ImageButton(this, SVX_RES( BTN_EMISSION_COLOR ) ) ),
+        aFLMatSpecular      ( new FixedLine(this, SVX_RES( FL_MAT_SPECULAR ) ) ),
+        aFtMatSpecular      ( new FixedText(this, SVX_RES( FT_MAT_SPECULAR ) ) ),
+        aLbMatSpecular      ( new ColorLB(this, SVX_RES( LB_MAT_SPECULAR ) ) ),
+        aBtnSpecularColor   ( new ImageButton(this, SVX_RES( BTN_SPECULAR_COLOR ) ) ),
+        aFtMatSpecularIntensity( new FixedText(this, SVX_RES( FT_MAT_SPECULAR_INTENSITY ) ) ),
+        aMtrMatSpecularIntensity( new MetricField(this, SVX_RES( MTR_MAT_SPECULAR_INTENSITY ) ) ),
+        aCtlPreview         ( new Svx3DPreviewControl(this, SVX_RES( CTL_PREVIEW ) ) ),
+        aCtlLightPreview    ( new SvxLightCtl3D(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 ) ),
+        aBtnConvertTo3D     ( new ImageButton(this, SVX_RES( BTN_CHANGE_TO_3D ) ) ),
+        aBtnLatheObject     ( new ImageButton(this, SVX_RES( BTN_LATHE_OBJ ) ) ),
+        aBtnPerspective     ( new ImageButton(this, SVX_RES( BTN_PERSPECTIVE ) ) ),
 
         aImgLightOn         ( SVX_RES( RID_SVXIMAGE_LIGHT_ON ) ),
         aImgLightOff        ( SVX_RES( RID_SVXIMAGE_LIGHT_OFF ) ),
@@ -226,9 +226,9 @@ Svx3DWin::Svx3DWin( SfxBindings* pInBindings,
         bOnly3DChanged      ( false )
 {
     OUString accname(SVX_RESSTR(RID_SVXFLOAT3D_COLOR_LIGHT_PRE));
-    aCtlLightPreview.SetAccessibleName(accname);
-    aCtlPreview.SetAccessibleName(accname);
-    aLbAmbientlight.SetAccessibleName(aFTAmbientlight.GetDisplayText());
+    aCtlLightPreview->SetAccessibleName(accname);
+    aCtlPreview->SetAccessibleName(accname);
+    aLbAmbientlight->SetAccessibleName(aFTAmbientlight->GetDisplayText());
 
     mpImpl->pPool = NULL;
     FreeResource();
@@ -236,9 +236,9 @@ Svx3DWin::Svx3DWin( SfxBindings* pInBindings,
     // Set Metric
     eFUnit = pInBindings->GetDispatcher()->GetModule()->GetFieldUnit();
 
-    aMtrDepth.SetUnit( eFUnit );
-    aMtrDistance.SetUnit( eFUnit );
-    aMtrFocalLength.SetUnit( eFUnit );
+    aMtrDepth->SetUnit( eFUnit );
+    aMtrDistance->SetUnit( eFUnit );
+    aMtrFocalLength->SetUnit( eFUnit );
 
     pControllerItem = new Svx3DCtrlItem(SID_3D_STATE, pBindings);
     pConvertTo3DItem = new SvxConvertTo3DItem(SID_CONVERT_TO_3D, pBindings);
@@ -255,80 +255,80 @@ Svx3DWin::Svx3DWin( SfxBindings* pInBindings,
     aBtnMaterial->SetClickHdl( aLink );
 
     aLink = LINK( this, Svx3DWin, ClickHdl );
-    aBtnPerspective.SetClickHdl( aLink );
-    aBtnConvertTo3D.SetClickHdl( aLink );
-    aBtnLatheObject.SetClickHdl( aLink );
+    aBtnPerspective->SetClickHdl( aLink );
+    aBtnConvertTo3D->SetClickHdl( aLink );
+    aBtnLatheObject->SetClickHdl( aLink );
 
     // Geometry
-    aBtnNormalsObj.SetClickHdl( aLink );
-    aBtnNormalsFlat.SetClickHdl( aLink );
-    aBtnNormalsSphere.SetClickHdl( aLink );
-    aBtnTwoSidedLighting.SetClickHdl( aLink );
-    aBtnNormalsInvert.SetClickHdl( aLink );
-    aBtnDoubleSided.SetClickHdl( aLink );
+    aBtnNormalsObj->SetClickHdl( aLink );
+    aBtnNormalsFlat->SetClickHdl( aLink );
+    aBtnNormalsSphere->SetClickHdl( aLink );
+    aBtnTwoSidedLighting->SetClickHdl( aLink );
+    aBtnNormalsInvert->SetClickHdl( aLink );
+    aBtnDoubleSided->SetClickHdl( aLink );
 
     // Representation
-    aBtnShadow3d.SetClickHdl( aLink );
+    aBtnShadow3d->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 );
+    aBtnLight1->SetClickHdl( aLink );
+    aBtnLight2->SetClickHdl( aLink );
+    aBtnLight3->SetClickHdl( aLink );
+    aBtnLight4->SetClickHdl( aLink );
+    aBtnLight5->SetClickHdl( aLink );
+    aBtnLight6->SetClickHdl( aLink );
+    aBtnLight7->SetClickHdl( aLink );
+    aBtnLight8->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 );
+    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 );
 
     // Material
     aLink = LINK( this, Svx3DWin, ClickColorHdl );
-    aBtnLightColor.SetClickHdl( aLink );
-    aBtnAmbientColor.SetClickHdl( aLink );
-    aBtnMatColor.SetClickHdl( aLink );
-    aBtnEmissionColor.SetClickHdl( aLink );
-    aBtnSpecularColor.SetClickHdl( aLink );
+    aBtnLightColor->SetClickHdl( aLink );
+    aBtnAmbientColor->SetClickHdl( aLink );
+    aBtnMatColor->SetClickHdl( aLink );
+    aBtnEmissionColor->SetClickHdl( aLink );
+    aBtnSpecularColor->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 );
+    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 );
 
     aLink = LINK( this, Svx3DWin, ModifyHdl );
-    aMtrMatSpecularIntensity.SetModifyHdl( aLink );
-    aNumHorizontal.SetModifyHdl( aLink );
-    aNumVertical.SetModifyHdl( aLink );
-    aMtrSlant.SetModifyHdl( aLink );
+    aMtrMatSpecularIntensity->SetModifyHdl( aLink );
+    aNumHorizontal->SetModifyHdl( aLink );
+    aNumVertical->SetModifyHdl( aLink );
+    aMtrSlant->SetModifyHdl( aLink );
 
     // Preview callback
     aLink = LINK( this, Svx3DWin, ChangeLightCallbackHdl );
-    aCtlLightPreview.SetUserInteractiveChangeCallback(aLink);
+    aCtlLightPreview->SetUserInteractiveChangeCallback(aLink);
     aLink = LINK( this, Svx3DWin, ChangeSelectionCallbackHdl );
-    aCtlLightPreview.SetUserSelectionChangeCallback(aLink);
+    aCtlLightPreview->SetUserSelectionChangeCallback(aLink);
 
     aSize = GetOutputSizePixel();
     SetMinOutputSizePixel( aSize );
@@ -346,85 +346,85 @@ 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);
+    aBtnNormalsObj->SetAccessibleRelationMemberOf( aFLNormals.get() );
+    aBtnNormalsFlat->SetAccessibleRelationMemberOf( aFLNormals.get() );
+    aBtnNormalsSphere->SetAccessibleRelationMemberOf( aFLNormals.get() );
+    aBtnNormalsInvert->SetAccessibleRelationMemberOf( aFLNormals.get() );
+    aBtnTwoSidedLighting->SetAccessibleRelationMemberOf( aFLNormals.get() );
+    aBtnDoubleSided->SetAccessibleRelationMemberOf( aFLNormals.get() );
+
+    aBtnLight1->SetAccessibleRelationMemberOf( aFLLight.get() );
+    aBtnLight2->SetAccessibleRelationMemberOf( aFLLight.get() );
+    aBtnLight3->SetAccessibleRelationMemberOf( aFLLight.get() );
+    aBtnLight4->SetAccessibleRelationMemberOf( aFLLight.get() );
+    aBtnLight5->SetAccessibleRelationMemberOf( aFLLight.get() );
+    aBtnLight6->SetAccessibleRelationMemberOf( aFLLight.get() );
+    aBtnLight7->SetAccessibleRelationMemberOf( aFLLight.get() );
+    aBtnLight8->SetAccessibleRelationMemberOf( aFLLight.get() );
+
+    aBtnLight1->SetAccessibleRelationLabeledBy( aFTLightsource.get() );
+    aBtnLight2->SetAccessibleRelationLabeledBy( aFTLightsource.get() );
+    aBtnLight3->SetAccessibleRelationLabeledBy( aFTLightsource.get() );
+    aBtnLight4->SetAccessibleRelationLabeledBy( aFTLightsource.get() );
+    aBtnLight5->SetAccessibleRelationLabeledBy( aFTLightsource.get() );
+    aBtnLight6->SetAccessibleRelationLabeledBy( aFTLightsource.get() );
+    aBtnLight7->SetAccessibleRelationLabeledBy( aFTLightsource.get() );
+    aBtnLight8->SetAccessibleRelationLabeledBy( aFTLightsource.get() );
+    aBtnLightColor->SetAccessibleRelationMemberOf( aFLLight.get() );
+    aBtnLightColor->SetAccessibleRelationLabeledBy( aFTLightsource.get() );
+    aBtnAmbientColor->SetAccessibleRelationMemberOf( aFLLight.get() );
+    aBtnAmbientColor->SetAccessibleRelationLabeledBy( aFTAmbientlight.get() );
+
+    aBtnSpecularColor->SetAccessibleRelationLabeledBy( aFtMatSpecular.get() );
+    aBtnMatColor->SetAccessibleRelationLabeledBy( aFtMatColor.get() );
+    aBtnEmissionColor->SetAccessibleRelationLabeledBy( aFtMatEmission.get() );
+    aBtnTexLuminance->SetAccessibleRelationLabeledBy( aFtTexKind.get() );
+    aBtnTexColor->SetAccessibleRelationLabeledBy( aFtTexKind.get() );
+    aBtnTexReplace->SetAccessibleRelationLabeledBy( aFtTexMode.get() );
+    aBtnTexModulate->SetAccessibleRelationLabeledBy( aFtTexMode.get() );
+    aBtnTexBlend->SetAccessibleRelationLabeledBy( aFtTexMode.get() );
+    aBtnTexObjectX->SetAccessibleRelationLabeledBy( aFtTexProjectionX.get() );
+    aBtnTexParallelX->SetAccessibleRelationLabeledBy( aFtTexProjectionX.get() );
+    aBtnTexCircleX->SetAccessibleRelationLabeledBy( aFtTexProjectionX.get() );
+    aBtnTexObjectY->SetAccessibleRelationLabeledBy( aFtTexProjectionY.get() );
+    aBtnTexParallelY->SetAccessibleRelationLabeledBy( aFtTexProjectionY.get() );
+    aBtnTexCircleY->SetAccessibleRelationLabeledBy( aFtTexProjectionY.get() );
+    aBtnTexFilter->SetAccessibleRelationLabeledBy( aFtTexFilter.get() );
+    aCtlLightPreview->SetAccessibleRelationLabeledBy( aCtlLightPreview.get() );
+    aBtnNormalsObj->SetAccessibleRelationMemberOf(aFLNormals.get());
+    aBtnNormalsFlat->SetAccessibleRelationMemberOf(aFLNormals.get());
+    aBtnNormalsSphere->SetAccessibleRelationMemberOf(aFLNormals.get());
+    aBtnNormalsInvert->SetAccessibleRelationMemberOf(aFLNormals.get());
+    aBtnTwoSidedLighting->SetAccessibleRelationMemberOf(aFLNormals.get());
+
+    aBtnShadow3d->SetAccessibleRelationMemberOf(aFLShadow.get());
+
+    aBtnLight1->SetAccessibleRelationMemberOf(aFLLight.get());
+    aBtnLight2->SetAccessibleRelationMemberOf(aFLLight.get());
+    aBtnLight3->SetAccessibleRelationMemberOf(aFLLight.get());
+    aBtnLight4->SetAccessibleRelationMemberOf(aFLLight.get());
+    aBtnLight5->SetAccessibleRelationMemberOf(aFLLight.get());
+    aBtnLight6->SetAccessibleRelationMemberOf(aFLLight.get());
+    aBtnLight7->SetAccessibleRelationMemberOf(aFLLight.get());
+    aBtnLight8->SetAccessibleRelationMemberOf(aFLLight.get());
+
+    aBtnTexLuminance->SetAccessibleRelationMemberOf(aFLTexture.get());
+    aBtnTexColor->SetAccessibleRelationMemberOf(aFLTexture.get());
+    aBtnTexReplace->SetAccessibleRelationMemberOf(aFLTexture.get());
+    aBtnTexModulate->SetAccessibleRelationMemberOf(aFLTexture.get());
+    aBtnTexBlend->SetAccessibleRelationMemberOf(aFLTexture.get());
+    aBtnTexObjectX->SetAccessibleRelationMemberOf(aFLTexture.get());
+    aBtnTexParallelX->SetAccessibleRelationMemberOf(aFLTexture.get());
+    aBtnTexCircleX->SetAccessibleRelationMemberOf(aFLTexture.get());
+    aBtnTexObjectY->SetAccessibleRelationMemberOf(aFLTexture.get());
+    aBtnTexParallelY->SetAccessibleRelationMemberOf(aFLTexture.get());
+    aBtnTexCircleY->SetAccessibleRelationMemberOf(aFLTexture.get());
+    aBtnTexFilter->SetAccessibleRelationMemberOf(aFLTexture.get());
+
+    aBtnMatColor->SetAccessibleRelationMemberOf(aFLMaterial.get());
+    aBtnEmissionColor->SetAccessibleRelationMemberOf(aFLMaterial.get());
+
+    aBtnSpecularColor->SetAccessibleRelationMemberOf(aFLMatSpecular.get());
 }
 
 
@@ -454,6 +454,108 @@ void Svx3DWin::dispose()
     aBtnMaterial.disposeAndClear();
     aBtnUpdate.disposeAndClear();
     aBtnAssign.disposeAndClear();
+    aFLGeometrie.disposeAndClear();
+    aFtPercentDiagonal.disposeAndClear();
+    aMtrPercentDiagonal.disposeAndClear();
+    aFtBackscale.disposeAndClear();
+    aMtrBackscale.disposeAndClear();
+    aFtEndAngle.disposeAndClear();
+    aMtrEndAngle.disposeAndClear();
+    aFtDepth.disposeAndClear();
+    aMtrDepth.disposeAndClear();
+    aFLSegments.disposeAndClear();
+
+    aFtHorizontal.disposeAndClear();
+    aNumHorizontal.disposeAndClear();
+    aFtVertical.disposeAndClear();
+    aNumVertical.disposeAndClear();
+    aFLNormals.disposeAndClear();
+
+    aBtnNormalsObj.disposeAndClear();
+    aBtnNormalsFlat.disposeAndClear();
+    aBtnNormalsSphere.disposeAndClear();
+    aBtnNormalsInvert.disposeAndClear();
+    aBtnTwoSidedLighting.disposeAndClear();
+
+    aBtnDoubleSided.disposeAndClear();
+    aFLRepresentation.disposeAndClear();
+    aFtShademode.disposeAndClear();
+    aLbShademode.disposeAndClear();
+    aFLShadow.disposeAndClear();
+    aBtnShadow3d.disposeAndClear();
+    aFtSlant.disposeAndClear();
+    aMtrSlant.disposeAndClear();
+    aFtDistance.disposeAndClear();
+    aMtrDistance.disposeAndClear();
+    aFtFocalLeng.disposeAndClear();
+    aMtrFocalLength.disposeAndClear();
+    aFLCamera.disposeAndClear();
+    aFLLight.disposeAndClear();
+
+    aBtnLight1.disposeAndClear();
+    aBtnLight2.disposeAndClear();
+    aBtnLight3.disposeAndClear();
+    aBtnLight4.disposeAndClear();
+    aBtnLight5.disposeAndClear();
+    aBtnLight6.disposeAndClear();
+    aBtnLight7.disposeAndClear();
+    aBtnLight8.disposeAndClear();
+    aFTLightsource.disposeAndClear();
+    aLbLight1.disposeAndClear();
+    aLbLight2.disposeAndClear();
+    aLbLight3.disposeAndClear();
+    aLbLight4.disposeAndClear();
+    aLbLight5.disposeAndClear();
+    aLbLight6.disposeAndClear();
+    aLbLight7.disposeAndClear();
+    aLbLight8.disposeAndClear();
+
+    aBtnLightColor.disposeAndClear();
+    aFTAmbientlight.disposeAndClear();
+    aLbAmbientlight.disposeAndClear();
+    aBtnAmbientColor.disposeAndClear();
+    aFLTexture.disposeAndClear();
+
+    aFtTexKind.disposeAndClear();
+    aBtnTexLuminance.disposeAndClear();
+    aBtnTexColor.disposeAndClear();
+    aFtTexMode.disposeAndClear();
+    aBtnTexReplace.disposeAndClear();
+    aBtnTexModulate.disposeAndClear();
+    aBtnTexBlend.disposeAndClear();
+    aFtTexProjectionX.disposeAndClear();
+    aBtnTexObjectX.disposeAndClear();
+    aBtnTexParallelX.disposeAndClear();
+    aBtnTexCircleX.disposeAndClear();
+    aFtTexProjectionY.disposeAndClear();
+    aBtnTexObjectY.disposeAndClear();
+    aBtnTexParallelY.disposeAndClear();
+    aBtnTexCircleY.disposeAndClear();
+    aFtTexFilter.disposeAndClear();
+    aBtnTexFilter.disposeAndClear();
+
+    aFLMaterial.disposeAndClear();
+    aFtMatFavorites.disposeAndClear();
+    aLbMatFavorites.disposeAndClear();
+    aFtMatColor.disposeAndClear();
+    aLbMatColor.disposeAndClear();
+    aBtnMatColor.disposeAndClear();
+    aFtMatEmission.disposeAndClear();
+    aLbMatEmission.disposeAndClear();
+    aBtnEmissionColor.disposeAndClear();
+    aFLMatSpecular.disposeAndClear();
+    aFtMatSpecular.disposeAndClear();
+    aLbMatSpecular.disposeAndClear();
+    aBtnSpecularColor.disposeAndClear();
+    aFtMatSpecularIntensity.disposeAndClear();
+    aMtrMatSpecularIntensity.disposeAndClear();
+
+    aCtlPreview.disposeAndClear();
+    aCtlLightPreview.disposeAndClear();
+
+    aBtnConvertTo3D.disposeAndClear();
+    aBtnLatheObject.disposeAndClear();
+    aBtnPerspective.disposeAndClear();
 
     SfxDockingWindow::dispose();
 }
@@ -464,22 +566,22 @@ void Svx3DWin::Construct()
     aBtnGeo->Check();
     Link aLink( LINK( this, Svx3DWin, ClickViewTypeHdl ) );
     aLink.Call( &aBtnGeo );
-    aCtlLightPreview.Hide();
+    aCtlLightPreview->Hide();
 }
 
 
 void Svx3DWin::Reset()
 {
     // Various initializations, default is AllAttributes
-    aLbShademode.SelectEntryPos( 0 );
-    aMtrMatSpecularIntensity.SetValue( 50 );
+    aLbShademode->SelectEntryPos( 0 );
+    aMtrMatSpecularIntensity->SetValue( 50 );
 
-    aBtnLight1.Check();
+    aBtnLight1->Check();
     ClickUpdateHdl( NULL );
 
     // Select nothing, to avoid errors when selecting the first
-    aCtlLightPreview.GetSvx3DLightControl().SelectLight(0);
-    aCtlLightPreview.CheckSelection();
+    aCtlLightPreview->GetSvx3DLightControl().SelectLight(0);
+    aCtlLightPreview->CheckSelection();
 }
 
 bool Svx3DWin::GetUILightState( const ImageButton& rBtn ) const
@@ -545,70 +647,70 @@ 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 );
+            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 );
             if( bCube )
             {
-                aNumHorizontal.SetEmptyFieldValue();
-                aNumVertical.SetEmptyFieldValue();
+                aNumHorizontal->SetEmptyFieldValue();
+                aNumVertical->SetEmptyFieldValue();
             }
             if( bCube || bSphere )
             {
-                aMtrPercentDiagonal.SetEmptyFieldValue();
-                aMtrBackscale.SetEmptyFieldValue();
-                aMtrDepth.SetEmptyFieldValue();
+                aMtrPercentDiagonal->SetEmptyFieldValue();
+                aMtrBackscale->SetEmptyFieldValue();
+                aMtrDepth->SetEmptyFieldValue();
             }
 
             // There is a final angle only for Lathe objects.
-            aFtEndAngle.Enable( !bExtrude && !bCube && !bSphere );
-            aMtrEndAngle.Enable( !bExtrude && !bCube && !bSphere );
+            aFtEndAngle->Enable( !bExtrude && !bCube && !bSphere );
+            aMtrEndAngle->Enable( !bExtrude && !bCube && !bSphere );
             if( bExtrude || bCube || bSphere )
-                aMtrEndAngle.SetEmptyFieldValue();
+                aMtrEndAngle->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();
+            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();
 
             // 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 );
+            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 );
 
             //Lower Range
-            aBtnConvertTo3D.Enable( false );
-            aBtnLatheObject.Enable( false );
+            aBtnConvertTo3D->Enable( false );
+            aBtnLatheObject->Enable( false );
         }
     }
     // Bitmap fill ? -> Status
@@ -620,101 +722,101 @@ 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 );
+    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 );
 
 
     // Geometry
     // Number of segments (horizontal)
-    if( aNumHorizontal.IsEnabled() )
+    if( aNumHorizontal->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 )aNumHorizontal->GetValue())
             {
-                aNumHorizontal.SetValue( nValue );
+                aNumHorizontal->SetValue( nValue );
                 bUpdate = true;
             }
-            else if( aNumHorizontal.IsEmptyFieldValue() )
-                aNumHorizontal.SetValue( nValue );
+            else if( aNumHorizontal->IsEmptyFieldValue() )
+                aNumHorizontal->SetValue( nValue );
         }
         else
         {
-            if( !aNumHorizontal.IsEmptyFieldValue() )
+            if( !aNumHorizontal->IsEmptyFieldValue() )
             {
-                aNumHorizontal.SetEmptyFieldValue();
+                aNumHorizontal->SetEmptyFieldValue();
                 bUpdate = true;
             }
         }
     }
 
     //Number of segments (vertical)
-    if( aNumVertical.IsEnabled() )
+    if( aNumVertical->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) aNumVertical->GetValue() )
             {
-                aNumVertical.SetValue( nValue );
+                aNumVertical->SetValue( nValue );
                 bUpdate = true;
             }
-            else if( aNumVertical.IsEmptyFieldValue() )
-                aNumVertical.SetValue( nValue );
+            else if( aNumVertical->IsEmptyFieldValue() )
+                aNumVertical->SetValue( nValue );
         }
         else
         {
-            if( !aNumVertical.IsEmptyFieldValue() )
+            if( !aNumVertical->IsEmptyFieldValue() )
             {
-                aNumVertical.SetEmptyFieldValue();
+                aNumVertical->SetEmptyFieldValue();
                 bUpdate = true;
             }
         }
     }
 
     // Depth
-    if( aMtrDepth.IsEnabled() )
+    if( aMtrDepth->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( *aMtrDepth.get(), ePoolUnit );
             if( nValue != nValue2 )
             {
-                if( eFUnit != aMtrDepth.GetUnit() )
-                    SetFieldUnit( aMtrDepth, eFUnit );
+                if( eFUnit != aMtrDepth->GetUnit() )
+                    SetFieldUnit( *aMtrDepth.get(), eFUnit );
 
-                SetMetricValue( aMtrDepth, nValue, ePoolUnit );
+                SetMetricValue( *aMtrDepth.get(), nValue, ePoolUnit );
                 bUpdate = true;
             }
-            else if( aMtrDepth.IsEmptyFieldValue() )
-                aMtrDepth.SetValue( aMtrDepth.GetValue() );
+            else if( aMtrDepth->IsEmptyFieldValue() )
+                aMtrDepth->SetValue( aMtrDepth->GetValue() );
         }
         else
         {
-            if( !aMtrDepth.IsEmptyFieldValue() )
+            if( !aMtrDepth->IsEmptyFieldValue() )
             {
-                aMtrDepth.SetEmptyFieldValue();
+                aMtrDepth->SetEmptyFieldValue();
                 bUpdate = true;
             }
         }
@@ -725,91 +827,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 != aBtnDoubleSided->IsChecked() )
         {
-            aBtnDoubleSided.Check( bValue );
+            aBtnDoubleSided->Check( bValue );
             bUpdate = true;
         }
-        else if( aBtnDoubleSided.GetState() == TRISTATE_INDET )
-            aBtnDoubleSided.Check( bValue );
+        else if( aBtnDoubleSided->GetState() == TRISTATE_INDET )
+            aBtnDoubleSided->Check( bValue );
     }
     else
     {
-        if( aBtnDoubleSided.GetState() != TRISTATE_INDET )
+        if( aBtnDoubleSided->GetState() != TRISTATE_INDET )
         {
-            aBtnDoubleSided.SetState( TRISTATE_INDET );
+            aBtnDoubleSided->SetState( TRISTATE_INDET );
             bUpdate = true;
         }
     }
 
     // Edge rounding
-    if( aMtrPercentDiagonal.IsEnabled() )
+    if( aMtrPercentDiagonal->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 != aMtrPercentDiagonal->GetValue() )
             {
-                aMtrPercentDiagonal.SetValue( nValue );
+                aMtrPercentDiagonal->SetValue( nValue );
                 bUpdate = true;
             }
-            else if( aMtrPercentDiagonal.IsEmptyFieldValue() )
-                aMtrPercentDiagonal.SetValue( nValue );
+            else if( aMtrPercentDiagonal->IsEmptyFieldValue() )
+                aMtrPercentDiagonal->SetValue( nValue );
         }
         else
         {
-            if( !aMtrPercentDiagonal.IsEmptyFieldValue() )
+            if( !aMtrPercentDiagonal->IsEmptyFieldValue() )
             {
-                aMtrPercentDiagonal.SetEmptyFieldValue();
+                aMtrPercentDiagonal->SetEmptyFieldValue();
                 bUpdate = true;
             }
         }
     }
 
     // Depth scaling
-    if( aMtrBackscale.IsEnabled() )
+    if( aMtrBackscale->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 != aMtrBackscale->GetValue() )
             {
-                aMtrBackscale.SetValue( nValue );
+                aMtrBackscale->SetValue( nValue );
                 bUpdate = true;
             }
-            else if( aMtrBackscale.IsEmptyFieldValue() )
-                aMtrBackscale.SetValue( nValue );
+            else if( aMtrBackscale->IsEmptyFieldValue() )
+                aMtrBackscale->SetValue( nValue );
         }
         else
         {
-            if( !aMtrBackscale.IsEmptyFieldValue() )
+            if( !aMtrBackscale->IsEmptyFieldValue() )
             {
-                aMtrBackscale.SetEmptyFieldValue();
+                aMtrBackscale->SetEmptyFieldValue();
                 bUpdate = true;
             }
         }
     }
 
     // End angle
-    if( aMtrEndAngle.IsEnabled() )
+    if( aMtrEndAngle->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 != aMtrEndAngle->GetValue() )
             {
-                aMtrEndAngle.SetValue( nValue );
+                aMtrEndAngle->SetValue( nValue );
                 bUpdate = true;
             }
         }
         else
         {
-            if( !aMtrEndAngle.IsEmptyFieldValue() )
+            if( !aMtrEndAngle->IsEmptyFieldValue() )
             {
-                aMtrEndAngle.SetEmptyFieldValue();
+                aMtrEndAngle->SetEmptyFieldValue();
                 bUpdate = true;
             }
         }
@@ -821,25 +923,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( ( !aBtnNormalsObj->IsChecked() && nValue == 0 ) ||
+            ( !aBtnNormalsFlat->IsChecked() && nValue == 1 ) ||
+            ( !aBtnNormalsSphere->IsChecked() && nValue == 2 ) )
         {
-            aBtnNormalsObj.Check( nValue == 0 );
-            aBtnNormalsFlat.Check( nValue == 1 );
-            aBtnNormalsSphere.Check( nValue == 2 );
+            aBtnNormalsObj->Check( nValue == 0 );
+            aBtnNormalsFlat->Check( nValue == 1 );
+            aBtnNormalsSphere->Check( nValue == 2 );
             bUpdate = true;
         }
     }
     else
     {
-        if( aBtnNormalsObj.IsChecked() ||
-            aBtnNormalsFlat.IsChecked() ||
-            aBtnNormalsSphere.IsChecked() )
+        if( aBtnNormalsObj->IsChecked() ||
+            aBtnNormalsFlat->IsChecked() ||
+            aBtnNormalsSphere->IsChecked() )
         {
-            aBtnNormalsObj.Check( false );
-            aBtnNormalsFlat.Check( false );
-            aBtnNormalsSphere.Check( false );
+            aBtnNormalsObj->Check( false );
+            aBtnNormalsFlat->Check( false );
+            aBtnNormalsSphere->Check( false );
             bUpdate = true;
         }
     }
@@ -849,19 +951,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 != aBtnNormalsInvert->IsChecked() )
         {
-            aBtnNormalsInvert.Check( bValue );
+            aBtnNormalsInvert->Check( bValue );
             bUpdate = true;
         }
-        else if( aBtnNormalsInvert.GetState() == TRISTATE_INDET )
-            aBtnNormalsInvert.Check( bValue );
+        else if( aBtnNormalsInvert->GetState() == TRISTATE_INDET )
+            aBtnNormalsInvert->Check( bValue );
     }
     else
     {
-        if( aBtnNormalsInvert.GetState() != TRISTATE_INDET )
+        if( aBtnNormalsInvert->GetState() != TRISTATE_INDET )
         {
-            aBtnNormalsInvert.SetState( TRISTATE_INDET );
+            aBtnNormalsInvert->SetState( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -871,19 +973,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 != aBtnTwoSidedLighting->IsChecked() )
         {
-            aBtnTwoSidedLighting.Check( bValue );
+            aBtnTwoSidedLighting->Check( bValue );
             bUpdate = true;
         }
-        else if( aBtnTwoSidedLighting.GetState() == TRISTATE_INDET )
-            aBtnTwoSidedLighting.Check( bValue );
+        else if( aBtnTwoSidedLighting->GetState() == TRISTATE_INDET )
+            aBtnTwoSidedLighting->Check( bValue );
     }
     else
     {
-        if( aBtnTwoSidedLighting.GetState() != TRISTATE_INDET )
+        if( aBtnTwoSidedLighting->GetState() != TRISTATE_INDET )
         {
-            aBtnTwoSidedLighting.SetState( TRISTATE_INDET );
+            aBtnTwoSidedLighting->SetState( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -894,17 +996,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 != aLbShademode->GetSelectEntryPos() )
         {
-            aLbShademode.SelectEntryPos( nValue );
+            aLbShademode->SelectEntryPos( nValue );
             bUpdate = true;
         }
     }
     else
     {
-        if( aLbShademode.GetSelectEntryCount() != 0 )
+        if( aLbShademode->GetSelectEntryCount() != 0 )
         {
-            aLbShademode.SetNoSelection();
+            aLbShademode->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -914,21 +1016,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 != aBtnShadow3d->IsChecked() )
         {
-            aBtnShadow3d.Check( bValue );
-            aFtSlant.Enable( bValue );
-            aMtrSlant.Enable( bValue );
+            aBtnShadow3d->Check( bValue );
+            aFtSlant->Enable( bValue );
+            aMtrSlant->Enable( bValue );
             bUpdate = true;
         }
-        else if( aBtnShadow3d.GetState() == TRISTATE_INDET )
-            aBtnShadow3d.Check( bValue );
+        else if( aBtnShadow3d->GetState() == TRISTATE_INDET )
+            aBtnShadow3d->Check( bValue );
     }
     else
     {
-        if( aBtnShadow3d.GetState() != TRISTATE_INDET )
+        if( aBtnShadow3d->GetState() != TRISTATE_INDET )
         {
-            aBtnShadow3d.SetState( TRISTATE_INDET );
+            aBtnShadow3d->SetState( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -938,17 +1040,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 != aMtrSlant->GetValue() )
         {
-            aMtrSlant.SetValue( nValue );
+            aMtrSlant->SetValue( nValue );
             bUpdate = true;
         }
     }
     else
     {
-        if( !aMtrSlant.IsEmptyFieldValue() )
+        if( !aMtrSlant->IsEmptyFieldValue() )
         {
-            aMtrSlant.SetEmptyFieldValue();
+            aMtrSlant->SetEmptyFieldValue();
             bUpdate = true;
         }
     }
@@ -958,21 +1060,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( *aMtrDistance.get(), ePoolUnit );
         if( nValue != nValue2 )
         {
-            if( eFUnit != aMtrDistance.GetUnit() )
-                SetFieldUnit( aMtrDistance, eFUnit );
+            if( eFUnit != aMtrDistance->GetUnit() )
+                SetFieldUnit( *aMtrDistance.get(), eFUnit );
 
-            SetMetricValue( aMtrDistance, nValue, ePoolUnit );
+            SetMetricValue( *aMtrDistance.get(), nValue, ePoolUnit );
             bUpdate = true;
         }
     }
     else
     {
-        if( !aMtrDepth.IsEmptyFieldValue() )
+        if( !aMtrDepth->IsEmptyFieldValue() )
         {
-            aMtrDepth.SetEmptyFieldValue();
+            aMtrDepth->SetEmptyFieldValue();
             bUpdate = true;
         }
     }
@@ -982,21 +1084,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( *aMtrFocalLength.get(), ePoolUnit );
         if( nValue != nValue2 )
         {
-            if( eFUnit != aMtrFocalLength.GetUnit() )
-                SetFieldUnit( aMtrFocalLength, eFUnit );
+            if( eFUnit != aMtrFocalLength->GetUnit() )
+                SetFieldUnit( *aMtrFocalLength.get(), eFUnit );
 
-            SetMetricValue( aMtrFocalLength, nValue, ePoolUnit );
+            SetMetricValue( *aMtrFocalLength.get(), nValue, ePoolUnit );
             bUpdate = true;
         }
     }
     else
     {
-        if( !aMtrFocalLength.IsEmptyFieldValue() )
+        if( !aMtrFocalLength->IsEmptyFieldValue() )
         {
-            aMtrFocalLength.SetEmptyFieldValue();
+            aMtrFocalLength->SetEmptyFieldValue();
             bUpdate = true;
         }
     }
@@ -1009,7 +1111,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 = aLbLight1.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1018,9 +1120,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
     }
     else
     {
-        if( aLbLight1.GetSelectEntryCount() != 0 )
+        if( aLbLight1->GetSelectEntryCount() != 0 )
         {
-            aLbLight1.SetNoSelection();
+            aLbLight1->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1029,20 +1131,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( aBtnLight1.get() )) ||
+            ( !bOn && GetUILightState( aBtnLight1.get() )) )
         {
-            SetUILightState( aBtnLight1, bOn );
+            SetUILightState( *aBtnLight1.get(), bOn );
             bUpdate = true;
         }
-        if( aBtnLight1.GetState() == TRISTATE_INDET )
-            aBtnLight1.Check( aBtnLight1.IsChecked() );
+        if( aBtnLight1->GetState() == TRISTATE_INDET )
+            aBtnLight1->Check( aBtnLight1->IsChecked() );
     }
     else
     {
-        if( aBtnLight1.GetState() != TRISTATE_INDET )
+        if( aBtnLight1->GetState() != TRISTATE_INDET )
         {
-            aBtnLight1.SetState( TRISTATE_INDET );
+            aBtnLight1->SetState( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -1058,7 +1160,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 = aLbLight2.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1067,9 +1169,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
     }
     else
     {
-        if( aLbLight2.GetSelectEntryCount() != 0 )
+        if( aLbLight2->GetSelectEntryCount() != 0 )
         {
-            aLbLight2.SetNoSelection();
+            aLbLight2->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1078,20 +1180,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( aBtnLight2.get() )) ||
+            ( !bOn && GetUILightState( aBtnLight2.get() )) )
         {
-            SetUILightState( aBtnLight2, bOn );
+            SetUILightState( *aBtnLight2.get(), bOn );
             bUpdate = true;
         }
-        if( aBtnLight2.GetState() == TRISTATE_INDET )
-            aBtnLight2.Check( aBtnLight2.IsChecked() );
+        if( aBtnLight2->GetState() == TRISTATE_INDET )
+            aBtnLight2->Check( aBtnLight2->IsChecked() );
     }
     else
     {
-        if( aBtnLight2.GetState() != TRISTATE_INDET )
+        if( aBtnLight2->GetState() != TRISTATE_INDET )
         {
-            aBtnLight2.SetState( TRISTATE_INDET );
+            aBtnLight2->SetState( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -1107,7 +1209,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 = aLbLight3.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1116,9 +1218,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
     }
     else
     {
-        if( aLbLight3.GetSelectEntryCount() != 0 )
+        if( aLbLight3->GetSelectEntryCount() != 0 )
         {
-            aLbLight3.SetNoSelection();
+            aLbLight3->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1127,20 +1229,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( aBtnLight3.get())) ||
+            ( !bOn && GetUILightState( aBtnLight3.get())) )
         {
-            SetUILightState( aBtnLight3, bOn );
+            SetUILightState( *aBtnLight3.get(), bOn );
             bUpdate = true;
         }
-        if( aBtnLight3.GetState() == TRISTATE_INDET )
-            aBtnLight3.Check( aBtnLight3.IsChecked() );
+        if( aBtnLight3->GetState() == TRISTATE_INDET )
+            aBtnLight3->Check( aBtnLight3->IsChecked() );
     }
     else
     {
-        if( aBtnLight3.GetState() != TRISTATE_INDET )
+        if( aBtnLight3->GetState() != TRISTATE_INDET )
         {
-            aBtnLight3.SetState( TRISTATE_INDET );
+            aBtnLight3->SetState( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -1156,7 +1258,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 = aLbLight4.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1165,9 +1267,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
     }
     else
     {
-        if( aLbLight4.GetSelectEntryCount() != 0 )
+        if( aLbLight4->GetSelectEntryCount() != 0 )
         {
-            aLbLight4.SetNoSelection();
+            aLbLight4->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1176,20 +1278,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( aBtnLight4.get() )) ||
+            ( !bOn && GetUILightState( aBtnLight4.get() )) )
         {
-            SetUILightState( aBtnLight4, bOn );
+            SetUILightState( *aBtnLight4.get(), bOn );
             bUpdate = true;
         }
-        if( aBtnLight4.GetState() == TRISTATE_INDET )
-            aBtnLight4.Check( aBtnLight4.IsChecked() );
+        if( aBtnLight4->GetState() == TRISTATE_INDET )
+            aBtnLight4->Check( aBtnLight4->IsChecked() );
     }
     else
     {
-        if( aBtnLight4.GetState() != TRISTATE_INDET )
+        if( aBtnLight4->GetState() != TRISTATE_INDET )
         {
-            aBtnLight4.SetState( TRISTATE_INDET );
+            aBtnLight4->SetState( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -1205,7 +1307,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 = aLbLight5.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1214,9 +1316,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
     }
     else
     {
-        if( aLbLight5.GetSelectEntryCount() != 0 )
+        if( aLbLight5->GetSelectEntryCount() != 0 )
         {
-            aLbLight5.SetNoSelection();
+            aLbLight5->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1225,20 +1327,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( aBtnLight5.get() )) ||
+            ( !bOn && GetUILightState( aBtnLight5.get() )) )
         {
-            SetUILightState( aBtnLight5, bOn );
+            SetUILightState( *aBtnLight5.get(), bOn );
             bUpdate = true;
         }
-        if( aBtnLight5.GetState() == TRISTATE_INDET )
-            aBtnLight5.Check( aBtnLight5.IsChecked() );
+        if( aBtnLight5->GetState() == TRISTATE_INDET )
+            aBtnLight5->Check( aBtnLight5->IsChecked() );
     }
     else
     {
-        if( aBtnLight5.GetState() != TRISTATE_INDET )
+        if( aBtnLight5->GetState() != TRISTATE_INDET )
         {
-            aBtnLight5.SetState( TRISTATE_INDET );
+            aBtnLight5->SetState( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -1254,7 +1356,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 = aLbLight6.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1263,9 +1365,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
     }
     else
     {
-        if( aLbLight6.GetSelectEntryCount() != 0 )
+        if( aLbLight6->GetSelectEntryCount() != 0 )
         {
-            aLbLight6.SetNoSelection();
+            aLbLight6->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1274,20 +1376,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( aBtnLight6.get() )) ||
+            ( !bOn && GetUILightState( aBtnLight6.get() )) )
         {
-            SetUILightState( aBtnLight6, bOn );
+            SetUILightState( *aBtnLight6.get(), bOn );
             bUpdate = true;
         }
-        if( aBtnLight6.GetState() == TRISTATE_INDET )
-            aBtnLight6.Check( aBtnLight6.IsChecked() );
+        if( aBtnLight6->GetState() == TRISTATE_INDET )
+            aBtnLight6->Check( aBtnLight6->IsChecked() );
     }
     else
     {
-        if( aBtnLight6.GetState() != TRISTATE_INDET )
+        if( aBtnLight6->GetState() != TRISTATE_INDET )
         {
-            aBtnLight6.SetState( TRISTATE_INDET );
+            aBtnLight6->SetState( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -1303,7 +1405,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 = aLbLight7.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1312,9 +1414,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
     }
     else
     {
-        if( aLbLight7.GetSelectEntryCount() != 0 )
+        if( aLbLight7->GetSelectEntryCount() != 0 )
         {
-            aLbLight7.SetNoSelection();
+            aLbLight7->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1323,20 +1425,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( aBtnLight7.get() )) ||
+            ( !bOn && GetUILightState( aBtnLight7.get() )) )
         {
-            SetUILightState( aBtnLight7 , bOn );
+            SetUILightState( *aBtnLight7.get() , bOn );
             bUpdate = true;
         }
-        if( aBtnLight7.GetState() == TRISTATE_INDET )
-            aBtnLight7.Check( aBtnLight7.IsChecked() );
+        if( aBtnLight7->GetState() == TRISTATE_INDET )
+            aBtnLight7->Check( aBtnLight7->IsChecked() );
     }
     else
     {
-        if( aBtnLight7.GetState() != TRISTATE_INDET )
+        if( aBtnLight7->GetState() != TRISTATE_INDET )
         {
-            aBtnLight7.SetState( TRISTATE_INDET );
+            aBtnLight7->SetState( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -1352,7 +1454,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 = aLbLight8.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1361,9 +1463,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
     }
     else
     {
-        if( aLbLight8.GetSelectEntryCount() != 0 )
+        if( aLbLight8->GetSelectEntryCount() != 0 )
         {
-            aLbLight8.SetNoSelection();
+            aLbLight8->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1372,20 +1474,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( aBtnLight8.get() )) ||
+            ( !bOn && GetUILightState( aBtnLight8.get() )) )
         {
-            SetUILightState( aBtnLight8, bOn );
+            SetUILightState( *aBtnLight8.get(), bOn );
             bUpdate = true;
         }
-        if( aBtnLight8.GetState() == TRISTATE_INDET )
-            aBtnLight8.Check( aBtnLight8.IsChecked() );
+        if( aBtnLight8->GetState() == TRISTATE_INDET )
+            aBtnLight8->Check( aBtnLight8->IsChecked() );
     }
     else
     {
-        if( aBtnLight8.GetState() != TRISTATE_INDET )
+        if( aBtnLight8->GetState() != TRISTATE_INDET )
         {
-            aBtnLight8.SetState( TRISTATE_INDET );
+            aBtnLight8->SetState( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -1401,7 +1503,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 = aLbAmbientlight.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1410,9 +1512,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs )
     }
     else
     {
-        if( aLbAmbientlight.GetSelectEntryCount() != 0 )
+        if( aLbAmbientlight->GetSelectEntryCount() != 0 )
         {
-            aLbAmbientlight.SetNoSelection();
+            aLbAmbientlight->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1427,21 +1529,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( ( !aBtnTexLuminance->IsChecked() && nValue == 1 ) ||
+                ( !aBtnTexColor->IsChecked() && nValue == 3 ) )
             {
-                aBtnTexLuminance.Check( nValue == 1 );
-                aBtnTexColor.Check( nValue == 3 );
+                aBtnTexLuminance->Check( nValue == 1 );
+                aBtnTexColor->Check( nValue == 3 );
                 bUpdate = true;
             }
         }
         else
         {
-            if( aBtnTexLuminance.IsChecked() ||
-                aBtnTexColor.IsChecked() )
+            if( aBtnTexLuminance->IsChecked() ||
+                aBtnTexColor->IsChecked() )
             {
-                aBtnTexLuminance.Check( false );
-                aBtnTexColor.Check( false );
+                aBtnTexLuminance->Check( false );
+                aBtnTexColor->Check( false );
                 bUpdate = true;
             }
         }
@@ -1452,21 +1554,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( ( !aBtnTexReplace->IsChecked() && nValue == 1 ) ||
+                ( !aBtnTexModulate->IsChecked() && nValue == 2 ) )
             {
-                aBtnTexReplace.Check( nValue == 1 );
-                aBtnTexModulate.Check( nValue == 2 );
+                aBtnTexReplace->Check( nValue == 1 );
+                aBtnTexModulate->Check( nValue == 2 );
                 bUpdate = true;
             }
         }
         else
         {
-            if( aBtnTexReplace.IsChecked() ||
-                aBtnTexModulate.IsChecked() )
+            if( aBtnTexReplace->IsChecked() ||
+                aBtnTexModulate->IsChecked() )
             {
-                aBtnTexReplace.Check( false );
-                aBtnTexModulate.Check( false );
+                aBtnTexReplace->Check( false );
+                aBtnTexModulate->Check( false );
                 bUpdate = true;
             }
         }
@@ -1477,25 +1579,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( ( !aBtnTexObjectX->IsChecked() && nValue == 0 ) ||
+                ( !aBtnTexParallelX->IsChecked() && nValue == 1 ) ||
+                ( !aBtnTexCircleX->IsChecked() && nValue == 2 ) )
             {
-                aBtnTexObjectX.Check( nValue == 0 );
-                aBtnTexParallelX.Check( nValue == 1 );
-                aBtnTexCircleX.Check( nValue == 2 );
+                aBtnTexObjectX->Check( nValue == 0 );
+                aBtnTexParallelX->Check( nValue == 1 );
+                aBtnTexCircleX->Check( nValue == 2 );
                 bUpdate = true;
             }
         }
         else
         {
-            if( aBtnTexObjectX.IsChecked() ||
-                aBtnTexParallelX.IsChecked() ||
-                aBtnTexCircleX.IsChecked() )
+            if( aBtnTexObjectX->IsChecked() ||
+                aBtnTexParallelX->IsChecked() ||
+                aBtnTexCircleX->IsChecked() )
             {
-                aBtnTexObjectX.Check( false );
-                aBtnTexParallelX.Check( false );
-                aBtnTexCircleX.Check( false );
+                aBtnTexObjectX->Check( false );
+                aBtnTexParallelX->Check( false );
+                aBtnTexCircleX->Check( false );
                 bUpdate = true;
             }
         }

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list