[Libreoffice-commits] core.git: 2 commits - chart2/source extras/source include/svx solenv/bin solenv/sanitizers svx/source svx/uiconfig

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Jan 24 15:00:27 UTC 2020


 chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx |   27 
 chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx |   24 
 extras/source/glade/libreoffice-catalog.xml.in               |   11 
 include/svx/float3d.hxx                                      |  252 
 include/svx/strings.hrc                                      |    2 
 solenv/bin/native-code.py                                    |    3 
 solenv/sanitizers/ui/svx.suppr                               |    3 
 svx/source/dialog/dlgctl3d.cxx                               |    1 
 svx/source/engine3d/float3d.cxx                              | 2197 +++----
 svx/source/tbxctrls/tbcontrl.cxx                             |    3 
 svx/uiconfig/ui/docking3deffects.ui                          | 3213 +++++------
 11 files changed, 2919 insertions(+), 2817 deletions(-)

New commits:
commit 1de047e49157957015757621288545b0b816595a
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jan 23 15:44:48 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jan 24 16:00:00 2020 +0100

    SvxColorListBox, SvxLightCtl3D and Svx3DPreviewControl not used in .uis
    
    anymore
    
    Change-Id: Ib6fdd3fc00f09237d8f57cba85d86a644a6d2849
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87297
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 13c12a2e1aed..903553e985b5 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -42,11 +42,6 @@
       </properties>
     </glade-widget-class>
 
-    <glade-widget-class title="Color ListBox" name="svxcorelo-SvxColorListBox"
-                        generic-name="Color ListBox" parent="GtkComboBox"
-                        icon-name="widget-gtk-combobox">
-    </glade-widget-class>
-
     <glade-widget-class title="Font Name ListBox" name="svtlo-FontNameBox"
                         generic-name="Font name ListBox" parent="GtkComboBox"
                         icon-name="widget-gtk-combobox">
@@ -71,12 +66,6 @@
       </properties>
     </glade-widget-class>
 
-    <glade-widget-class title="Svx 3D Light Control" name="svxlo-SvxLightCtl3D"
-                        generic-name="3D Light Control" parent="GtkDrawingArea"
-                        icon-name="widget-gtk-drawingarea"/>
-    <glade-widget-class title="Svx 3D Preview Control" name="svxlo-Svx3DPreviewControl"
-                        generic-name="3D Preview Control" parent="GtkDrawingArea"
-                        icon-name="widget-gtk-drawingarea"/>
     <glade-widget-class title="SvxColorValueSet" name="svxcorelo-SvxColorValueSet"
                         generic-name="Set of Value Options" parent="GtkDrawingArea"
                         icon-name="widget-gtk-drawingarea"/>
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 692173df04d2..9f4704e82074 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -514,10 +514,7 @@ custom_widgets = [
     'SearchBox',
     'SearchResultsBox',
     'SidebarToolBox',
-    'Svx3DPreviewControl',
-    'SvxColorListBox',
     'SvxColorValueSet',
-    'SvxLightCtl3D',
     'SvxRelativeField',
     'TemplateDefaultView',
     ]
commit 278f01eadd513608e306ea6b85d52fb115a6dedf
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jan 23 15:28:08 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jan 24 15:59:50 2020 +0100

    weld Svx3DWin
    
    Change-Id: I472a4edb5ac7a8039d21128256c204e2969acc6a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87296
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index 39000a96949a..058e0a208afc 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -23,6 +23,7 @@
 #include <ControllerLockGuard.hxx>
 
 #include <svx/colorbox.hxx>
+#include <svx/float3d.hxx>
 #include <svx/strings.hrc>
 #include <svx/dialmgr.hxx>
 #include <svtools/colrdlg.hxx>
@@ -39,24 +40,6 @@ namespace chart
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
 
-LightButton::LightButton(std::unique_ptr<weld::ToggleButton> xButton)
-    : m_xButton(std::move(xButton))
-    , m_bLightOn(false)
-{
-    m_xButton->set_from_icon_name(RID_SVXBMP_LAMP_OFF);
-}
-
-void LightButton::switchLightOn(bool bOn)
-{
-    if (m_bLightOn == bOn)
-        return;
-    m_bLightOn = bOn;
-    if (m_bLightOn)
-        m_xButton->set_from_icon_name(RID_SVXBMP_LAMP_ON);
-    else
-        m_xButton->set_from_icon_name(RID_SVXBMP_LAMP_OFF);
-}
-
 namespace {
 
 struct LightSource
@@ -77,7 +60,6 @@ struct LightSource
 struct LightSourceInfo
 {
     LightButton* pButton;
-    bool bButtonActive;
     LightSource aLightSource;
 
     LightSourceInfo();
@@ -86,7 +68,6 @@ struct LightSourceInfo
 
 LightSourceInfo::LightSourceInfo()
     : pButton(nullptr)
-    , bButtonActive(false)
     , aLightSource()
 {
     aLightSource.nDiffuseColor = Color(0xffffff); // white
@@ -448,7 +429,7 @@ IMPL_LINK(ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl, weld::But
 
     assert(pInfo);
 
-    bool bIsChecked = pInfo->bButtonActive;
+    bool bIsChecked = pInfo->pButton->get_prev_active();
 
     ControllerLockGuardUNO aGuard( m_xChartModel );
     for( nL=0; nL<8; nL++)
@@ -459,12 +440,12 @@ IMPL_LINK(ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl, weld::But
             pLightButton->set_active(true);
             if (!pLightButton->get_widget()->has_focus())
                 pLightButton->get_widget()->grab_focus();
-            m_pLightSourceInfoList[nL].bButtonActive = true;
+            m_pLightSourceInfoList[nL].pButton->set_prev_active(true);
         }
         else
         {
             pLightButton->set_active(false);
-            m_pLightSourceInfoList[nL].bButtonActive = false;
+            m_pLightSourceInfoList[nL].pButton->set_prev_active(false);
         }
     }
 
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
index 81bb278e28eb..049680760fa7 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx
@@ -26,33 +26,11 @@
 namespace com { namespace sun { namespace star { namespace beans { class XPropertySet; } } } }
 
 class ColorListBox;
+class LightButton;
 
 namespace chart
 {
 
-class LightButton
-{
-public:
-    explicit LightButton(std::unique_ptr<weld::ToggleButton> xButton);
-
-    void switchLightOn(bool bOn);
-    bool isLightOn() const { return m_bLightOn;}
-
-    bool get_active() const { return m_xButton->get_active(); }
-    void set_active(bool bActive) { m_xButton->set_active(bActive); }
-
-    weld::ToggleButton* get_widget() const { return m_xButton.get(); }
-
-    void connect_clicked(const Link<weld::Button&, void>& rLink)
-    {
-        m_xButton->connect_clicked(rLink);
-    }
-
-private:
-    std::unique_ptr<weld::ToggleButton> m_xButton;
-    bool m_bLightOn;
-};
-
 struct LightSourceInfo;
 
 class ThreeD_SceneIllumination_TabPage
diff --git a/include/svx/float3d.hxx b/include/svx/float3d.hxx
index 2390633c9a18..d899b2d5e4fc 100644
--- a/include/svx/float3d.hxx
+++ b/include/svx/float3d.hxx
@@ -22,11 +22,8 @@
 
 #include <memory>
 #include <sfx2/ctrlitem.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/field.hxx>
 #include <sfx2/dockwin.hxx>
-#include <vcl/button.hxx>
-#include <vcl/layout.hxx>
+#include <vcl/weld.hxx>
 #include <svx/svxdllapi.h>
 
 #include <svx/dlgctl3d.hxx>
@@ -44,10 +41,40 @@ enum class ViewType3D
 class FmFormModel;
 class Svx3DCtrlItem;
 class SvxConvertTo3DItem;
-class SvxColorListBox;
+class ColorListBox;
 
 struct Svx3DWinImpl;
 
+class SVX_DLLPUBLIC LightButton final
+{
+public:
+    explicit LightButton(std::unique_ptr<weld::ToggleButton> xButton);
+
+    void switchLightOn(bool bOn);
+    bool isLightOn() const { return m_bLightOn;}
+
+    bool get_active() const { return m_xButton->get_active(); }
+    void set_active(bool bActive) { m_xButton->set_active(bActive); }
+
+    TriState get_state() const { return m_xButton->get_state(); }
+    void set_state(TriState eState) { m_xButton->set_state(eState); }
+
+    weld::ToggleButton* get_widget() const { return m_xButton.get(); }
+
+    void connect_clicked(const Link<weld::Button&, void>& rLink)
+    {
+        m_xButton->connect_clicked(rLink);
+    }
+
+    bool get_prev_active() const { return m_bButtonPrevActive; }
+    void set_prev_active(bool bPrevActive) { m_bButtonPrevActive = bPrevActive; }
+
+private:
+    std::unique_ptr<weld::ToggleButton> m_xButton;
+    bool m_bLightOn;
+    bool m_bButtonPrevActive;
+};
+
 class SAL_WARN_UNUSED SVX_DLLPUBLIC Svx3DWin final : public SfxDockingWindow
 {
     friend class        Svx3DChildWindow;
@@ -55,112 +82,118 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC Svx3DWin final : public SfxDockingWindow
     using Window::Update;
 
 private:
-    VclPtr<PushButton>         m_pBtnGeo;
-    VclPtr<PushButton>         m_pBtnRepresentation;
-    VclPtr<PushButton>         m_pBtnLight;
-    VclPtr<PushButton>         m_pBtnTexture;
-    VclPtr<PushButton>         m_pBtnMaterial;
-    VclPtr<PushButton>         m_pBtnUpdate;
-    VclPtr<PushButton>         m_pBtnAssign;
+    std::unique_ptr<weld::ToggleButton> m_xBtnGeo;
+    std::unique_ptr<weld::ToggleButton> m_xBtnRepresentation;
+    std::unique_ptr<weld::ToggleButton> m_xBtnLight;
+    std::unique_ptr<weld::ToggleButton> m_xBtnTexture;
+    std::unique_ptr<weld::ToggleButton> m_xBtnMaterial;
+    std::unique_ptr<weld::ToggleButton> m_xBtnUpdate;
+    std::unique_ptr<weld::Button> m_xBtnAssign;
 
 // geometry
-    VclPtr<VclContainer>       m_pFLGeometrie;
-    VclPtr<FixedText>          m_pFtPercentDiagonal;
-    VclPtr<MetricField>        m_pMtrPercentDiagonal;
-    VclPtr<FixedText>          m_pFtBackscale;
-    VclPtr<MetricField>        m_pMtrBackscale;
-    VclPtr<FixedText>          m_pFtEndAngle;
-    VclPtr<MetricField>        m_pMtrEndAngle;
-    VclPtr<FixedText>          m_pFtDepth;
-    VclPtr<MetricField>        m_pMtrDepth;
-
-    VclPtr<VclContainer>       m_pFLSegments;
-    VclPtr<NumericField>       m_pNumHorizontal;
-    VclPtr<NumericField>       m_pNumVertical;
-
-    VclPtr<VclContainer>       m_pFLNormals;
-    VclPtr<PushButton>         m_pBtnNormalsObj;
-    VclPtr<PushButton>         m_pBtnNormalsFlat;
-    VclPtr<PushButton>         m_pBtnNormalsSphere;
-    VclPtr<PushButton>         m_pBtnNormalsInvert;
-    VclPtr<PushButton>         m_pBtnTwoSidedLighting;
-    VclPtr<PushButton>         m_pBtnDoubleSided;
+    std::unique_ptr<weld::Container> m_xFLGeometrie;
+    std::unique_ptr<weld::Label> m_xFtPercentDiagonal;
+    std::unique_ptr<weld::MetricSpinButton> m_xMtrPercentDiagonal;
+    std::unique_ptr<weld::Label> m_xFtBackscale;
+    std::unique_ptr<weld::MetricSpinButton> m_xMtrBackscale;
+    std::unique_ptr<weld::Label> m_xFtEndAngle;
+    std::unique_ptr<weld::MetricSpinButton> m_xMtrEndAngle;
+    std::unique_ptr<weld::Label> m_xFtDepth;
+    std::unique_ptr<weld::MetricSpinButton> m_xMtrDepth;
+
+    std::unique_ptr<weld::Container> m_xFLSegments;
+    std::unique_ptr<weld::SpinButton> m_xNumHorizontal;
+    std::unique_ptr<weld::SpinButton> m_xNumVertical;
+
+    std::unique_ptr<weld::Container> m_xFLNormals;
+    std::unique_ptr<weld::ToggleButton> m_xBtnNormalsObj;
+    std::unique_ptr<weld::ToggleButton> m_xBtnNormalsFlat;
+    std::unique_ptr<weld::ToggleButton> m_xBtnNormalsSphere;
+    std::unique_ptr<weld::ToggleButton> m_xBtnNormalsInvert;
+    std::unique_ptr<weld::ToggleButton> m_xBtnTwoSidedLighting;
+    std::unique_ptr<weld::ToggleButton> m_xBtnDoubleSided;
 
 // presentation
-    VclPtr<VclContainer>       m_pFLRepresentation;
-    VclPtr<ListBox>            m_pLbShademode;
+    std::unique_ptr<weld::Container> m_xFLRepresentation;
+    std::unique_ptr<weld::ComboBox> m_xLbShademode;
 
-    VclPtr<VclContainer>       m_pFLShadow;
-    VclPtr<PushButton>         m_pBtnShadow3d;
-    VclPtr<FixedText>          m_pFtSlant;
-    VclPtr<MetricField>        m_pMtrSlant;
+    std::unique_ptr<weld::Container> m_xFLShadow;
+    std::unique_ptr<weld::ToggleButton> m_xBtnShadow3d;
+    std::unique_ptr<weld::Label> m_xFtSlant;
+    std::unique_ptr<weld::MetricSpinButton> m_xMtrSlant;
 
-    VclPtr<VclContainer>       m_pFLCamera;
-    VclPtr<MetricField>        m_pMtrDistance;
-    VclPtr<MetricField>        m_pMtrFocalLength;
+    std::unique_ptr<weld::Container> m_xFLCamera;
+    std::unique_ptr<weld::MetricSpinButton> m_xMtrDistance;
+    std::unique_ptr<weld::MetricSpinButton> m_xMtrFocalLength;
 
 // lighting
-    VclPtr<VclContainer>       m_pFLLight;
-    VclPtr<PushButton>         m_pBtnLight1;
-    VclPtr<PushButton>         m_pBtnLight2;
-    VclPtr<PushButton>         m_pBtnLight3;
-    VclPtr<PushButton>         m_pBtnLight4;
-    VclPtr<PushButton>         m_pBtnLight5;
-    VclPtr<PushButton>         m_pBtnLight6;
-    VclPtr<PushButton>         m_pBtnLight7;
-    VclPtr<PushButton>         m_pBtnLight8;
-    VclPtr<SvxColorListBox>    m_pLbLight1;
-    VclPtr<SvxColorListBox>    m_pLbLight2;
-    VclPtr<SvxColorListBox>    m_pLbLight3;
-    VclPtr<SvxColorListBox>    m_pLbLight4;
-    VclPtr<SvxColorListBox>    m_pLbLight5;
-    VclPtr<SvxColorListBox>    m_pLbLight6;
-    VclPtr<SvxColorListBox>    m_pLbLight7;
-    VclPtr<SvxColorListBox>    m_pLbLight8;
-    VclPtr<PushButton>         m_pBtnLightColor;
-    VclPtr<SvxColorListBox>    m_pLbAmbientlight;    // ListBox
-    VclPtr<PushButton>         m_pBtnAmbientColor;   // color button
+    std::unique_ptr<weld::Container> m_xFLLight;
+    std::unique_ptr<LightButton> m_xBtnLight1;
+    std::unique_ptr<LightButton> m_xBtnLight2;
+    std::unique_ptr<LightButton> m_xBtnLight3;
+    std::unique_ptr<LightButton> m_xBtnLight4;
+    std::unique_ptr<LightButton> m_xBtnLight5;
+    std::unique_ptr<LightButton> m_xBtnLight6;
+    std::unique_ptr<LightButton> m_xBtnLight7;
+    std::unique_ptr<LightButton> m_xBtnLight8;
+    std::unique_ptr<ColorListBox> m_xLbLight1;
+    std::unique_ptr<ColorListBox> m_xLbLight2;
+    std::unique_ptr<ColorListBox> m_xLbLight3;
+    std::unique_ptr<ColorListBox> m_xLbLight4;
+    std::unique_ptr<ColorListBox> m_xLbLight5;
+    std::unique_ptr<ColorListBox> m_xLbLight6;
+    std::unique_ptr<ColorListBox> m_xLbLight7;
+    std::unique_ptr<ColorListBox> m_xLbLight8;
+    std::unique_ptr<weld::Button> m_xBtnLightColor;
+    std::unique_ptr<ColorListBox> m_xLbAmbientlight;    // ListBox
+    std::unique_ptr<weld::Button> m_xBtnAmbientColor;   // color button
 
 // Textures
-    VclPtr<VclContainer>       m_pFLTexture;
-    VclPtr<PushButton>         m_pBtnTexLuminance;
-    VclPtr<PushButton>         m_pBtnTexColor;
-    VclPtr<PushButton>         m_pBtnTexReplace;
-    VclPtr<PushButton>         m_pBtnTexModulate;
-    VclPtr<PushButton>         m_pBtnTexBlend;
-    VclPtr<PushButton>         m_pBtnTexObjectX;
-    VclPtr<PushButton>         m_pBtnTexParallelX;
-    VclPtr<PushButton>         m_pBtnTexCircleX;
-    VclPtr<PushButton>         m_pBtnTexObjectY;
-    VclPtr<PushButton>         m_pBtnTexParallelY;
-    VclPtr<PushButton>         m_pBtnTexCircleY;
-    VclPtr<PushButton>         m_pBtnTexFilter;
+    std::unique_ptr<weld::Container> m_xFLTexture;
+    std::unique_ptr<weld::ToggleButton> m_xBtnTexLuminance;
+    std::unique_ptr<weld::ToggleButton> m_xBtnTexColor;
+    std::unique_ptr<weld::ToggleButton> m_xBtnTexReplace;
+    std::unique_ptr<weld::ToggleButton> m_xBtnTexModulate;
+    std::unique_ptr<weld::ToggleButton> m_xBtnTexBlend;
+    std::unique_ptr<weld::ToggleButton> m_xBtnTexObjectX;
+    std::unique_ptr<weld::ToggleButton> m_xBtnTexParallelX;
+    std::unique_ptr<weld::ToggleButton> m_xBtnTexCircleX;
+    std::unique_ptr<weld::ToggleButton> m_xBtnTexObjectY;
+    std::unique_ptr<weld::ToggleButton> m_xBtnTexParallelY;
+    std::unique_ptr<weld::ToggleButton> m_xBtnTexCircleY;
+    std::unique_ptr<weld::ToggleButton> m_xBtnTexFilter;
 
 // material
 // material editor
-    VclPtr<VclContainer>       m_pFLMaterial;
-    VclPtr<ListBox>            m_pLbMatFavorites;
-    VclPtr<SvxColorListBox>    m_pLbMatColor;
-    VclPtr<PushButton>         m_pBtnMatColor;
-    VclPtr<SvxColorListBox>    m_pLbMatEmission;
-    VclPtr<PushButton>         m_pBtnEmissionColor;
-
-    VclPtr<VclContainer>       m_pFLMatSpecular;
-    VclPtr<SvxColorListBox>    m_pLbMatSpecular;
-    VclPtr<PushButton>         m_pBtnSpecularColor;
-    VclPtr<MetricField>        m_pMtrMatSpecularIntensity;
-
-    VclPtr<Svx3DPreviewControl> m_pCtlPreview;
-    VclPtr<SvxLightCtl3D>      m_pCtlLightPreview;
+    std::unique_ptr<weld::Container> m_xFLMaterial;
+    std::unique_ptr<weld::ComboBox> m_xLbMatFavorites;
+    std::unique_ptr<ColorListBox> m_xLbMatColor;
+    std::unique_ptr<weld::Button> m_xBtnMatColor;
+    std::unique_ptr<ColorListBox> m_xLbMatEmission;
+    std::unique_ptr<weld::Button> m_xBtnEmissionColor;
+
+    std::unique_ptr<weld::Container> m_xFLMatSpecular;
+    std::unique_ptr<ColorListBox> m_xLbMatSpecular;
+    std::unique_ptr<weld::Button> m_xBtnSpecularColor;
+    std::unique_ptr<weld::MetricSpinButton> m_xMtrMatSpecularIntensity;
+
+    std::unique_ptr<PreviewControl3D> m_xCtlPreview;
+    std::unique_ptr<weld::CustomWeld> m_xCtlPreviewWin;
+
+    std::unique_ptr<weld::Widget> m_xLightPreviewGrid;
+    std::unique_ptr<weld::Scale> m_xHoriScale;
+    std::unique_ptr<weld::Scale> m_xVertScale;
+    std::unique_ptr<weld::Button> m_xBtn_Corner;
+    std::unique_ptr<LightControl3D> m_xLightPreview;
+    std::unique_ptr<weld::CustomWeld> m_xCtlLightPreviewWin;
+    std::unique_ptr<LightCtl3D> m_xCtlLightPreview;
 
 // bottom part
-    VclPtr<PushButton>         m_pBtnConvertTo3D;
-    VclPtr<PushButton>         m_pBtnLatheObject;
-    VclPtr<PushButton>         m_pBtnPerspective;
+    std::unique_ptr<weld::Button> m_xBtnConvertTo3D;
+    std::unique_ptr<weld::Button> m_xBtnLatheObject;
+    std::unique_ptr<weld::ToggleButton> m_xBtnPerspective;
 
 // the rest ...
-    Image const         aImgLightOn;
-    Image const         aImgLightOff;
     bool                bUpdate;
     ViewType3D          eViewType;
 
@@ -180,27 +213,26 @@ private:
     // ItemSet used to remember set 2d attributes
     std::unique_ptr<SfxItemSet> mpRemember2DAttributes;
 
-    DECL_LINK( ClickViewTypeHdl, Button*, void );
-    DECL_LINK( ClickUpdateHdl, Button*, void );
-    DECL_LINK( ClickAssignHdl, Button*, void );
-    DECL_LINK( ClickHdl, Button*, void );
-    DECL_LINK( ClickColorHdl, Button*, void );
-    DECL_LINK( SelectHdl, ListBox&, void );
-    DECL_LINK( SelectColorHdl, SvxColorListBox&, void );
-    DECL_LINK( ModifyHdl, Edit&, void );
-    void ClickLight(PushButton &rBtn);
+    DECL_LINK( ClickViewTypeHdl, weld::Button&, void );
+    DECL_LINK( ClickUpdateHdl, weld::Button&, void );
+    DECL_LINK( ClickAssignHdl, weld::Button&, void );
+    DECL_LINK( ClickHdl, weld::Button&, void );
+    DECL_LINK( ClickColorHdl, weld::Button&, void );
+    DECL_LINK( SelectHdl, weld::ComboBox&, void );
+    DECL_LINK( SelectColorHdl, ColorListBox&, void );
+    DECL_LINK( ModifyMetricHdl, weld::MetricSpinButton&, void );
+    DECL_LINK( ModifySpinHdl, weld::SpinButton&, void );
+    void ClickLight(const LightButton& rBtn);
 
-    DECL_LINK( ChangeSelectionCallbackHdl, SvxLightCtl3D*, void );
+    DECL_LINK( ChangeSelectionCallbackHdl, LightCtl3D*, void );
 
     SVX_DLLPRIVATE void         Construct();
     SVX_DLLPRIVATE void         Reset();
 
-    SVX_DLLPRIVATE static void  LBSelectColor( SvxColorListBox* pLb, const Color& rColor );
-    SVX_DLLPRIVATE sal_uInt16   GetLightSource( const PushButton* pBtn );
-    SVX_DLLPRIVATE SvxColorListBox* GetLbByButton( const PushButton* pBtn = nullptr );
-
-    SVX_DLLPRIVATE bool         GetUILightState( const PushButton& rBtn ) const;
-    SVX_DLLPRIVATE void         SetUILightState( PushButton& aBtn, bool bState );
+    SVX_DLLPRIVATE static void  LBSelectColor( ColorListBox* pLb, const Color& rColor );
+    SVX_DLLPRIVATE sal_uInt16   GetLightSource( const LightButton* pBtn );
+    SVX_DLLPRIVATE ColorListBox* GetCLbByButton( const LightButton* pBtn = nullptr );
+    SVX_DLLPRIVATE LightButton* GetLbByButton( const weld::Button* pBtn );
 
     virtual void    Resize() override;
 
diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index f3594bde95ed..dc7122a40a9a 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -1291,6 +1291,8 @@
 #define RID_SVXDLG_BMPMASK_STR_PALETTE                      NC_("RID_SVXDLG_BMPMASK_STR_PALETTE", "Color Palette")
 #define RID_SVXDLG_BMPMASK_STR_TITLE                        NC_("RID_SVXDLG_BMPMASK_STR_TITLE", "Color Replacer")
 
+#define RID_SVXDLG_FLOAT3D_STR_TITLE                        NC_("RID_SVXDLG_FLOAT3D_STR_TITLE", "3D Effects")
+
 #define RID_SVXSTR_ERR_OLD_PASSWD                           NC_("RID_SVXSTR_ERR_OLD_PASSWD", "Invalid password")
 #define RID_SVXSTR_ERR_REPEAT_PASSWD                        NC_("RID_SVXSTR_ERR_REPEAT_PASSWD", "Passwords do not match")
 
diff --git a/solenv/sanitizers/ui/svx.suppr b/solenv/sanitizers/ui/svx.suppr
index 60018f52fc85..e7085e3358f8 100644
--- a/solenv/sanitizers/ui/svx.suppr
+++ b/solenv/sanitizers/ui/svx.suppr
@@ -13,6 +13,9 @@ svx/uiconfig/ui/compressgraphicdialog.ui://GtkLabel[@id='label16'] orphan-label
 svx/uiconfig/ui/crashreportdlg.ui://GtkLabel[@id='ed_pre'] orphan-label
 svx/uiconfig/ui/crashreportdlg.ui://GtkTextView[@id='ed_post'] no-labelled-by
 svx/uiconfig/ui/crashreportdlg.ui://GtkTextView[@id='ed_bugreport'] no-labelled-by
+svx/uiconfig/ui/docking3deffects.ui://GtkButton[@id='corner'] button-no-label
+svx/uiconfig/ui/docking3deffects.ui://GtkScale[@id='horiscale'] no-labelled-by
+svx/uiconfig/ui/docking3deffects.ui://GtkScale[@id='vertscale'] no-labelled-by
 svx/uiconfig/ui/dockingcolorreplace.ui://GtkLabel[@id='label2'] orphan-label
 svx/uiconfig/ui/dockingcolorreplace.ui://GtkLabel[@id='label3'] orphan-label
 svx/uiconfig/ui/dockingcolorreplace.ui://GtkLabel[@id='label4'] orphan-label
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx
index 25b1ff7262d7..ce160c78e12d 100644
--- a/svx/source/dialog/dlgctl3d.cxx
+++ b/svx/source/dialog/dlgctl3d.cxx
@@ -434,6 +434,7 @@ void PreviewControl3D::Set3DAttributes( const SfxItemSet& rAttr )
 {
     mp3DObj->SetMergedItemSet(rAttr, true);
     Resize();
+    Invalidate();
 }
 
 #define RADIUS_LAMP_PREVIEW_SIZE    (4500.0)
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index 37d154ff22dc..2147bc152fc3 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -82,213 +82,227 @@ namespace {
 }
 
 Svx3DWin::Svx3DWin(SfxBindings* pInBindings, SfxChildWindow *pCW, vcl::Window* pParent)
-    : SfxDockingWindow (pInBindings, pCW, pParent,
-        "Docking3DEffects", "svx/ui/docking3deffects.ui")
-    , aImgLightOn(StockImage::Yes, RID_SVXBMP_LAMP_ON)
-    , aImgLightOff(StockImage::Yes, RID_SVXBMP_LAMP_OFF)
+    : SfxDockingWindow(pInBindings, pCW, pParent,
+        "Docking3DEffects", "svx/ui/docking3deffects.ui", true)
+
+    , m_xBtnGeo(m_xBuilder->weld_toggle_button("geometry"))
+    , m_xBtnRepresentation(m_xBuilder->weld_toggle_button("representation"))
+    , m_xBtnLight(m_xBuilder->weld_toggle_button("light"))
+    , m_xBtnTexture(m_xBuilder->weld_toggle_button("texture"))
+    , m_xBtnMaterial(m_xBuilder->weld_toggle_button("material"))
+    , m_xBtnUpdate(m_xBuilder->weld_toggle_button("update"))
+    , m_xBtnAssign(m_xBuilder->weld_button("assign"))
+
+    , m_xFLGeometrie(m_xBuilder->weld_container("geoframe"))
+    , m_xFtPercentDiagonal(m_xBuilder->weld_label("diagonalft"))
+    , m_xMtrPercentDiagonal(m_xBuilder->weld_metric_spin_button("diagonal", FieldUnit::PERCENT))
+    , m_xFtBackscale(m_xBuilder->weld_label("scaleddepthft"))
+    , m_xMtrBackscale(m_xBuilder->weld_metric_spin_button("scaleddepth", FieldUnit::PERCENT))
+    , m_xFtEndAngle(m_xBuilder->weld_label("angleft"))
+    , m_xMtrEndAngle(m_xBuilder->weld_metric_spin_button("angle", FieldUnit::DEGREE))
+    , m_xFtDepth(m_xBuilder->weld_label("depthft"))
+    , m_xMtrDepth(m_xBuilder->weld_metric_spin_button("depth", FieldUnit::CM))
+
+    , m_xFLSegments(m_xBuilder->weld_container("segmentsframe"))
+    , m_xNumHorizontal(m_xBuilder->weld_spin_button("hori"))
+    , m_xNumVertical(m_xBuilder->weld_spin_button("veri"))
+
+    , m_xFLNormals(m_xBuilder->weld_container("normals"))
+    , m_xBtnNormalsObj(m_xBuilder->weld_toggle_button("objspecific"))
+    , m_xBtnNormalsFlat(m_xBuilder->weld_toggle_button("flat"))
+    , m_xBtnNormalsSphere(m_xBuilder->weld_toggle_button("spherical"))
+    , m_xBtnNormalsInvert(m_xBuilder->weld_toggle_button("invertnormals"))
+    , m_xBtnTwoSidedLighting(m_xBuilder->weld_toggle_button("doublesidedillum"))
+    , m_xBtnDoubleSided(m_xBuilder->weld_toggle_button("doublesided"))
+
+    , m_xFLRepresentation(m_xBuilder->weld_container("shadingframe"))
+    , m_xLbShademode(m_xBuilder->weld_combo_box("mode"))
+
+    , m_xFLShadow(m_xBuilder->weld_container("shadowframe"))
+    , m_xBtnShadow3d(m_xBuilder->weld_toggle_button("shadow"))
+    , m_xFtSlant(m_xBuilder->weld_label("slantft"))
+    , m_xMtrSlant(m_xBuilder->weld_metric_spin_button("slant", FieldUnit::DEGREE))
+
+    , m_xFLCamera(m_xBuilder->weld_container("cameraframe"))
+    , m_xMtrDistance(m_xBuilder->weld_metric_spin_button("distance", FieldUnit::CM))
+    , m_xMtrFocalLength(m_xBuilder->weld_metric_spin_button("focal", FieldUnit::CM))
+
+    , m_xFLLight(m_xBuilder->weld_container("illumframe"))
+    , m_xBtnLight1(new LightButton(m_xBuilder->weld_toggle_button("light1")))
+    , m_xBtnLight2(new LightButton(m_xBuilder->weld_toggle_button("light2")))
+    , m_xBtnLight3(new LightButton(m_xBuilder->weld_toggle_button("light3")))
+    , m_xBtnLight4(new LightButton(m_xBuilder->weld_toggle_button("light4")))
+    , m_xBtnLight5(new LightButton(m_xBuilder->weld_toggle_button("light5")))
+    , m_xBtnLight6(new LightButton(m_xBuilder->weld_toggle_button("light6")))
+    , m_xBtnLight7(new LightButton(m_xBuilder->weld_toggle_button("light7")))
+    , m_xBtnLight8(new LightButton(m_xBuilder->weld_toggle_button("light8")))
+    , m_xLbLight1(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor1"), GetFrameWeld()))
+    , m_xLbLight2(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor2"), GetFrameWeld()))
+    , m_xLbLight3(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor3"), GetFrameWeld()))
+    , m_xLbLight4(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor4"), GetFrameWeld()))
+    , m_xLbLight5(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor5"), GetFrameWeld()))
+    , m_xLbLight6(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor6"), GetFrameWeld()))
+    , m_xLbLight7(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor7"), GetFrameWeld()))
+    , m_xLbLight8(new ColorListBox(m_xBuilder->weld_menu_button("lightcolor8"), GetFrameWeld()))
+    , m_xBtnLightColor(m_xBuilder->weld_button("colorbutton1"))
+    , m_xLbAmbientlight(new ColorListBox(m_xBuilder->weld_menu_button("ambientcolor"), GetFrameWeld()))
+    , m_xBtnAmbientColor(m_xBuilder->weld_button("colorbutton2"))
+
+    , m_xFLTexture(m_xBuilder->weld_container("textureframe"))
+    , m_xBtnTexLuminance(m_xBuilder->weld_toggle_button("textype"))
+    , m_xBtnTexColor(m_xBuilder->weld_toggle_button("texcolor"))
+    , m_xBtnTexReplace(m_xBuilder->weld_toggle_button("texreplace"))
+    , m_xBtnTexModulate(m_xBuilder->weld_toggle_button("texmodulate"))
+    , m_xBtnTexBlend(m_xBuilder->weld_toggle_button("texblend"))
+    , m_xBtnTexObjectX(m_xBuilder->weld_toggle_button("texobjx"))
+    , m_xBtnTexParallelX(m_xBuilder->weld_toggle_button("texparallelx"))
+    , m_xBtnTexCircleX(m_xBuilder->weld_toggle_button("texcirclex"))
+    , m_xBtnTexObjectY(m_xBuilder->weld_toggle_button("texobjy"))
+    , m_xBtnTexParallelY(m_xBuilder->weld_toggle_button("texparallely"))
+    , m_xBtnTexCircleY(m_xBuilder->weld_toggle_button("texcircley"))
+    , m_xBtnTexFilter(m_xBuilder->weld_toggle_button("texfilter"))
+
+    , m_xFLMaterial(m_xBuilder->weld_container("materialframe"))
+    , m_xLbMatFavorites(m_xBuilder->weld_combo_box("favorites"))
+    , m_xLbMatColor(new ColorListBox(m_xBuilder->weld_menu_button("objcolor"), GetFrameWeld()))
+    , m_xBtnMatColor(m_xBuilder->weld_button("colorbutton3"))
+    , m_xLbMatEmission(new ColorListBox(m_xBuilder->weld_menu_button("illumcolor"), GetFrameWeld()))
+    , m_xBtnEmissionColor(m_xBuilder->weld_button("colorbutton4"))
+
+    , m_xFLMatSpecular(m_xBuilder->weld_container("specframe"))
+    , m_xLbMatSpecular(new ColorListBox(m_xBuilder->weld_menu_button("speccolor"), GetFrameWeld()))
+    , m_xBtnSpecularColor(m_xBuilder->weld_button("colorbutton5"))
+    , m_xMtrMatSpecularIntensity(m_xBuilder->weld_metric_spin_button("intensity", FieldUnit::PERCENT))
+
+    , m_xCtlPreview(new PreviewControl3D)
+    , m_xCtlPreviewWin(new weld::CustomWeld(*m_xBuilder, "preview", *m_xCtlPreview))
+
+    , m_xLightPreviewGrid(m_xBuilder->weld_container("lightpreviewgrid"))
+    , m_xHoriScale(m_xBuilder->weld_scale("horiscale"))
+    , m_xVertScale(m_xBuilder->weld_scale("vertscale"))
+    , m_xBtn_Corner(m_xBuilder->weld_button("corner"))
+    , m_xLightPreview(new LightControl3D)
+    , m_xCtlLightPreviewWin(new weld::CustomWeld(*m_xBuilder, "lightpreview", *m_xLightPreview))
+    , m_xCtlLightPreview(new LightCtl3D(*m_xLightPreview, *m_xHoriScale, *m_xVertScale, *m_xBtn_Corner)) // TODO might be other body widget as arg 1
+
+    , m_xBtnConvertTo3D(m_xBuilder->weld_button("to3d"))
+    , m_xBtnLatheObject(m_xBuilder->weld_button("tolathe"))
+    , m_xBtnPerspective(m_xBuilder->weld_toggle_button("perspective"))
+
     , bUpdate(false)
     , eViewType(ViewType3D::Geo)
     , pBindings(pInBindings)
     , mpImpl(new Svx3DWinImpl)
     , ePoolUnit(MapUnit::MapMM)
 {
-    get(m_pBtnGeo, "geometry");
-    get(m_pBtnRepresentation, "representation");
-    get(m_pBtnLight, "light");
-    get(m_pBtnTexture, "texture");
-    get(m_pBtnMaterial, "material");
-    get(m_pBtnUpdate, "update");
-    get(m_pBtnAssign, "assign");
-
-    get(m_pFLGeometrie, "geoframe");
-    get(m_pFtPercentDiagonal, "diagonalft");
-    get(m_pMtrPercentDiagonal, "diagonal");
-    get(m_pFtBackscale, "scaleddepthft");
-    get(m_pMtrBackscale, "scaleddepth");
-    get(m_pFtEndAngle, "angleft");
-    get(m_pMtrEndAngle, "angle");
-    get(m_pFtDepth, "depthft");
-    get(m_pMtrDepth, "depth");
-
-    get(m_pFLSegments, "segmentsframe");
-    get(m_pNumHorizontal, "hori");
-    get(m_pNumVertical, "veri");
-
-    get(m_pFLNormals, "normals");
-    get(m_pBtnNormalsObj, "objspecific");
-    get(m_pBtnNormalsFlat, "flat");
-    get(m_pBtnNormalsSphere, "spherical");
-    get(m_pBtnNormalsInvert, "invertnormals");
-    get(m_pBtnTwoSidedLighting, "doublesidedillum");
-    get(m_pBtnDoubleSided, "doublesided");
-
-    get(m_pFLRepresentation, "shadingframe");
-    get(m_pLbShademode, "mode");
-
-    get(m_pFLShadow, "shadowframe");
-    get(m_pBtnShadow3d, "shadow");
-    get(m_pFtSlant, "slantft");
-    get(m_pMtrSlant, "slant");
-
-    get(m_pFLCamera, "cameraframe");
-    get(m_pMtrDistance, "distance");
-    get(m_pMtrFocalLength, "focal");
-
-    get(m_pFLLight, "illumframe");
-    get(m_pBtnLight1, "light1");
-    get(m_pBtnLight2, "light2");
-    get(m_pBtnLight3, "light3");
-    get(m_pBtnLight4, "light4");
-    get(m_pBtnLight5, "light5");
-    get(m_pBtnLight6, "light6");
-    get(m_pBtnLight7, "light7");
-    get(m_pBtnLight8, "light8");
-    get(m_pLbLight1, "lightcolor1");
-    get(m_pLbLight2, "lightcolor2");
-    get(m_pLbLight3, "lightcolor3");
-    get(m_pLbLight4, "lightcolor4");
-    get(m_pLbLight5, "lightcolor5");
-    get(m_pLbLight6, "lightcolor6");
-    get(m_pLbLight7, "lightcolor7");
-    get(m_pLbLight8, "lightcolor8");
-    get(m_pBtnLightColor, "colorbutton1");
-    get(m_pLbAmbientlight, "ambientcolor");
-    get(m_pBtnAmbientColor, "colorbutton2");
-
-    get(m_pFLTexture, "textureframe");
-    get(m_pBtnTexLuminance, "textype");
-    get(m_pBtnTexColor, "texcolor");
-    get(m_pBtnTexReplace, "texreplace");
-    get(m_pBtnTexModulate, "texmodulate");
-    get(m_pBtnTexBlend, "texblend");
-    get(m_pBtnTexObjectX, "texobjx");
-    get(m_pBtnTexParallelX, "texparallelx");
-    get(m_pBtnTexCircleX, "texcirclex");
-    get(m_pBtnTexObjectY, "texobjy");
-    get(m_pBtnTexParallelY, "texparallely");
-    get(m_pBtnTexCircleY, "texcircley");
-    get(m_pBtnTexFilter, "texfilter");
-
-    get(m_pFLMaterial, "materialframe");
-    get(m_pLbMatFavorites, "favorites");
-    get(m_pLbMatColor, "objcolor");
-    get(m_pBtnMatColor, "colorbutton3");
-    get(m_pLbMatEmission, "illumcolor");
-    get(m_pBtnEmissionColor, "colorbutton4");
-
-    get(m_pFLMatSpecular, "specframe");
-    get(m_pLbMatSpecular, "speccolor");
-    get(m_pBtnSpecularColor, "colorbutton5");
-    get(m_pMtrMatSpecularIntensity, "intensity");
-
-    get(m_pCtlPreview, "preview");
-    get(m_pCtlLightPreview, "lightpreview");
-    Size aSize(LogicToPixel(Size(83, 76), MapMode(MapUnit::MapAppFont)));
-    m_pCtlPreview->set_width_request(aSize.Width());
-    m_pCtlLightPreview->set_width_request(aSize.Width());
-    m_pCtlPreview->set_height_request(aSize.Height());
-    m_pCtlLightPreview->set_height_request(aSize.Height());
-
-    get(m_pBtnConvertTo3D, "to3d");
-    get(m_pBtnLatheObject, "tolathe");
-    get(m_pBtnPerspective, "perspective");
+    SetText(SvxResId(RID_SVXDLG_FLOAT3D_STR_TITLE));
+
+    weld::DrawingArea* pDrawingArea = m_xCtlPreview->GetDrawingArea();
+    Size aSize(pDrawingArea->get_ref_device().LogicToPixel(Size(83, 76), MapMode(MapUnit::MapAppFont)));
+    pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
+    m_xCtlPreview->SetOutputSizePixel(aSize);
+
+    m_xLightPreviewGrid->set_size_request(aSize.Width(), aSize.Height());
+    pDrawingArea = m_xLightPreview->GetDrawingArea();
+    pDrawingArea->set_size_request(42, 42); // small to fit to m_xLightPreviewGrid
 
     mpImpl->pPool = nullptr;
 
     // Set Metric
     eFUnit = pInBindings->GetDispatcher()->GetModule()->GetFieldUnit();
 
-    m_pMtrDepth->SetUnit( eFUnit );
-    m_pMtrDistance->SetUnit( eFUnit );
-    m_pMtrFocalLength->SetUnit( eFUnit );
+    m_xMtrDepth->set_unit( eFUnit );
+    m_xMtrDistance->set_unit( eFUnit );
+    m_xMtrFocalLength->set_unit( eFUnit );
 
     pControllerItem.reset( new Svx3DCtrlItem(SID_3D_STATE, pBindings) );
     pConvertTo3DItem.reset( new SvxConvertTo3DItem(SID_CONVERT_TO_3D, pBindings) );
     pConvertTo3DLatheItem.reset( new SvxConvertTo3DItem(SID_CONVERT_TO_3D_LATHE_FAST, pBindings) );
 
-    m_pBtnAssign->SetClickHdl( LINK( this, Svx3DWin, ClickAssignHdl ) );
-    m_pBtnUpdate->SetClickHdl( LINK( this, Svx3DWin, ClickUpdateHdl ) );
+    m_xBtnAssign->connect_clicked( LINK( this, Svx3DWin, ClickAssignHdl ) );
+    m_xBtnUpdate->connect_clicked( LINK( this, Svx3DWin, ClickUpdateHdl ) );
 
-    Link<Button*,void> aLink( LINK( this, Svx3DWin, ClickViewTypeHdl ) );
-    m_pBtnGeo->SetClickHdl( aLink );
-    m_pBtnRepresentation->SetClickHdl( aLink );
-    m_pBtnLight->SetClickHdl( aLink );
-    m_pBtnTexture->SetClickHdl( aLink );
-    m_pBtnMaterial->SetClickHdl( aLink );
+    Link<weld::Button&,void> aLink( LINK( this, Svx3DWin, ClickViewTypeHdl ) );
+    m_xBtnGeo->connect_clicked( aLink );
+    m_xBtnRepresentation->connect_clicked( aLink );
+    m_xBtnLight->connect_clicked( aLink );
+    m_xBtnTexture->connect_clicked( aLink );
+    m_xBtnMaterial->connect_clicked( aLink );
 
     aLink = LINK( this, Svx3DWin, ClickHdl );
-    m_pBtnPerspective->SetClickHdl( aLink );
-    m_pBtnConvertTo3D->SetClickHdl( aLink );
-    m_pBtnLatheObject->SetClickHdl( aLink );
+    m_xBtnPerspective->connect_clicked( aLink );
+    m_xBtnConvertTo3D->connect_clicked( aLink );
+    m_xBtnLatheObject->connect_clicked( aLink );
 
     // Geometry
-    m_pBtnNormalsObj->SetClickHdl( aLink );
-    m_pBtnNormalsFlat->SetClickHdl( aLink );
-    m_pBtnNormalsSphere->SetClickHdl( aLink );
-    m_pBtnTwoSidedLighting->SetClickHdl( aLink );
-    m_pBtnNormalsInvert->SetClickHdl( aLink );
-    m_pBtnDoubleSided->SetClickHdl( aLink );
+    m_xBtnNormalsObj->connect_clicked( aLink );
+    m_xBtnNormalsFlat->connect_clicked( aLink );
+    m_xBtnNormalsSphere->connect_clicked( aLink );
+    m_xBtnTwoSidedLighting->connect_clicked( aLink );
+    m_xBtnNormalsInvert->connect_clicked( aLink );
+    m_xBtnDoubleSided->connect_clicked( aLink );
 
     // Representation
-    m_pBtnShadow3d->SetClickHdl( aLink );
+    m_xBtnShadow3d->connect_clicked( aLink );
 
     // Lighting
-    m_pBtnLight1->SetClickHdl( aLink );
-    m_pBtnLight2->SetClickHdl( aLink );
-    m_pBtnLight3->SetClickHdl( aLink );
-    m_pBtnLight4->SetClickHdl( aLink );
-    m_pBtnLight5->SetClickHdl( aLink );
-    m_pBtnLight6->SetClickHdl( aLink );
-    m_pBtnLight7->SetClickHdl( aLink );
-    m_pBtnLight8->SetClickHdl( aLink );
+    m_xBtnLight1->connect_clicked( aLink );
+    m_xBtnLight2->connect_clicked( aLink );
+    m_xBtnLight3->connect_clicked( aLink );
+    m_xBtnLight4->connect_clicked( aLink );
+    m_xBtnLight5->connect_clicked( aLink );
+    m_xBtnLight6->connect_clicked( aLink );
+    m_xBtnLight7->connect_clicked( aLink );
+    m_xBtnLight8->connect_clicked( aLink );
 
     // Textures
-    m_pBtnTexLuminance->SetClickHdl( aLink );
-    m_pBtnTexColor->SetClickHdl( aLink );
-    m_pBtnTexReplace->SetClickHdl( aLink );
-    m_pBtnTexModulate->SetClickHdl( aLink );
-    m_pBtnTexParallelX->SetClickHdl( aLink );
-    m_pBtnTexCircleX->SetClickHdl( aLink );
-    m_pBtnTexObjectX->SetClickHdl( aLink );
-    m_pBtnTexParallelY->SetClickHdl( aLink );
-    m_pBtnTexCircleY->SetClickHdl( aLink );
-    m_pBtnTexObjectY->SetClickHdl( aLink );
-    m_pBtnTexFilter->SetClickHdl( aLink );
+    m_xBtnTexLuminance->connect_clicked( aLink );
+    m_xBtnTexColor->connect_clicked( aLink );
+    m_xBtnTexReplace->connect_clicked( aLink );
+    m_xBtnTexModulate->connect_clicked( aLink );
+    m_xBtnTexParallelX->connect_clicked( aLink );
+    m_xBtnTexCircleX->connect_clicked( aLink );
+    m_xBtnTexObjectX->connect_clicked( aLink );
+    m_xBtnTexParallelY->connect_clicked( aLink );
+    m_xBtnTexCircleY->connect_clicked( aLink );
+    m_xBtnTexObjectY->connect_clicked( aLink );
+    m_xBtnTexFilter->connect_clicked( aLink );
 
     // Material
     aLink = LINK( this, Svx3DWin, ClickColorHdl );
-    m_pBtnLightColor->SetClickHdl( aLink );
-    m_pBtnAmbientColor->SetClickHdl( aLink );
-    m_pBtnMatColor->SetClickHdl( aLink );
-    m_pBtnEmissionColor->SetClickHdl( aLink );
-    m_pBtnSpecularColor->SetClickHdl( aLink );
-
-
-    Link<ListBox&,void> aLink2 = LINK( this, Svx3DWin, SelectHdl );
-    Link<SvxColorListBox&,void> aLink4 = LINK( this, Svx3DWin, SelectColorHdl );
-    m_pLbMatFavorites->SetSelectHdl( aLink2 );
-    m_pLbMatColor->SetSelectHdl( aLink4 );
-    m_pLbMatEmission->SetSelectHdl( aLink4 );
-    m_pLbMatSpecular->SetSelectHdl( aLink4 );
-    m_pLbLight1->SetSelectHdl( aLink4 );
-    m_pLbLight2->SetSelectHdl( aLink4 );
-    m_pLbLight3->SetSelectHdl( aLink4 );
-    m_pLbLight4->SetSelectHdl( aLink4 );
-    m_pLbLight5->SetSelectHdl( aLink4 );
-    m_pLbLight6->SetSelectHdl( aLink4 );
-    m_pLbLight7->SetSelectHdl( aLink4 );
-    m_pLbLight8->SetSelectHdl( aLink4 );
-    m_pLbAmbientlight->SetSelectHdl( aLink4 );
-    m_pLbShademode->SetSelectHdl( aLink2 );
-
-    Link<Edit&,void> aLink3 = LINK( this, Svx3DWin, ModifyHdl );
-    m_pMtrMatSpecularIntensity->SetModifyHdl( aLink3 );
-    m_pNumHorizontal->SetModifyHdl( aLink3 );
-    m_pNumVertical->SetModifyHdl( aLink3 );
-    m_pMtrSlant->SetModifyHdl( aLink3 );
+    m_xBtnLightColor->connect_clicked( aLink );
+    m_xBtnAmbientColor->connect_clicked( aLink );
+    m_xBtnMatColor->connect_clicked( aLink );
+    m_xBtnEmissionColor->connect_clicked( aLink );
+    m_xBtnSpecularColor->connect_clicked( aLink );
+
+
+    Link<weld::ComboBox&,void> aLink2 = LINK( this, Svx3DWin, SelectHdl );
+    Link<ColorListBox&,void> aLink4 = LINK( this, Svx3DWin, SelectColorHdl );
+    m_xLbMatFavorites->connect_changed( aLink2 );
+    m_xLbMatColor->SetSelectHdl( aLink4 );
+    m_xLbMatEmission->SetSelectHdl( aLink4 );
+    m_xLbMatSpecular->SetSelectHdl( aLink4 );
+    m_xLbLight1->SetSelectHdl( aLink4 );
+    m_xLbLight2->SetSelectHdl( aLink4 );
+    m_xLbLight3->SetSelectHdl( aLink4 );
+    m_xLbLight4->SetSelectHdl( aLink4 );
+    m_xLbLight5->SetSelectHdl( aLink4 );
+    m_xLbLight6->SetSelectHdl( aLink4 );
+    m_xLbLight7->SetSelectHdl( aLink4 );
+    m_xLbLight8->SetSelectHdl( aLink4 );
+    m_xLbAmbientlight->SetSelectHdl( aLink4 );
+    m_xLbShademode->connect_changed( aLink2 );
+
+    Link<weld::MetricSpinButton&,void> aLink3 = LINK( this, Svx3DWin, ModifyMetricHdl );
+    Link<weld::SpinButton&,void> aLink5 = LINK( this, Svx3DWin, ModifySpinHdl );
+    m_xMtrMatSpecularIntensity->connect_value_changed( aLink3 );
+    m_xNumHorizontal->connect_value_changed( aLink5 );
+    m_xNumVertical->connect_value_changed( aLink5 );
+    m_xMtrSlant->connect_value_changed( aLink3 );
 
     // Preview callback
-    m_pCtlLightPreview->SetUserSelectionChangeCallback(LINK( this, Svx3DWin, ChangeSelectionCallbackHdl ));
+    m_xCtlLightPreview->SetUserSelectionChangeCallback(LINK( this, Svx3DWin, ChangeSelectionCallbackHdl ));
 
     aSize = GetOutputSizePixel();
     SetMinOutputSizePixel( aSize );
@@ -327,125 +341,114 @@ void Svx3DWin::dispose()
 
     mpImpl.reset();
 
-    m_pBtnGeo.clear();
-    m_pBtnRepresentation.clear();
-    m_pBtnLight.clear();
-    m_pBtnTexture.clear();
-    m_pBtnMaterial.clear();
-    m_pBtnUpdate.clear();
-    m_pBtnAssign.clear();
-    m_pFLGeometrie.clear();
-    m_pFtPercentDiagonal.clear();
-    m_pMtrPercentDiagonal.clear();
-    m_pFtBackscale.clear();
-    m_pMtrBackscale.clear();
-    m_pFtEndAngle.clear();
-    m_pMtrEndAngle.clear();
-    m_pFtDepth.clear();
-    m_pMtrDepth.clear();
-    m_pFLSegments.clear();
-    m_pNumHorizontal.clear();
-    m_pNumVertical.clear();
-    m_pFLNormals.clear();
-    m_pBtnNormalsObj.clear();
-    m_pBtnNormalsFlat.clear();
-    m_pBtnNormalsSphere.clear();
-    m_pBtnNormalsInvert.clear();
-    m_pBtnTwoSidedLighting.clear();
-    m_pBtnDoubleSided.clear();
-    m_pFLRepresentation.clear();
-    m_pLbShademode.clear();
-    m_pFLShadow.clear();
-    m_pBtnShadow3d.clear();
-    m_pFtSlant.clear();
-    m_pMtrSlant.clear();
-    m_pFLCamera.clear();
-    m_pMtrDistance.clear();
-    m_pMtrFocalLength.clear();
-    m_pFLLight.clear();
-    m_pBtnLight1.clear();
-    m_pBtnLight2.clear();
-    m_pBtnLight3.clear();
-    m_pBtnLight4.clear();
-    m_pBtnLight5.clear();
-    m_pBtnLight6.clear();
-    m_pBtnLight7.clear();
-    m_pBtnLight8.clear();
-    m_pLbLight1.clear();
-    m_pLbLight2.clear();
-    m_pLbLight3.clear();
-    m_pLbLight4.clear();
-    m_pLbLight5.clear();
-    m_pLbLight6.clear();
-    m_pLbLight7.clear();
-    m_pLbLight8.clear();
-    m_pBtnLightColor.clear();
-    m_pLbAmbientlight.clear();
-    m_pBtnAmbientColor.clear();
-    m_pFLTexture.clear();
-    m_pBtnTexLuminance.clear();
-    m_pBtnTexColor.clear();
-    m_pBtnTexReplace.clear();
-    m_pBtnTexModulate.clear();
-    m_pBtnTexBlend.clear();
-    m_pBtnTexObjectX.clear();
-    m_pBtnTexParallelX.clear();
-    m_pBtnTexCircleX.clear();
-    m_pBtnTexObjectY.clear();
-    m_pBtnTexParallelY.clear();
-    m_pBtnTexCircleY.clear();
-    m_pBtnTexFilter.clear();
-    m_pFLMaterial.clear();
-    m_pLbMatFavorites.clear();
-    m_pLbMatColor.clear();
-    m_pBtnMatColor.clear();
-    m_pLbMatEmission.clear();
-    m_pBtnEmissionColor.clear();
-    m_pFLMatSpecular.clear();
-    m_pLbMatSpecular.clear();
-    m_pBtnSpecularColor.clear();
-    m_pMtrMatSpecularIntensity.clear();
-    m_pCtlPreview.clear();
-    m_pCtlLightPreview.clear();
-    m_pBtnConvertTo3D.clear();
-    m_pBtnLatheObject.clear();
-    m_pBtnPerspective.clear();
+    m_xBtnGeo.reset();
+    m_xBtnRepresentation.reset();
+    m_xBtnLight.reset();
+    m_xBtnTexture.reset();
+    m_xBtnMaterial.reset();
+    m_xBtnUpdate.reset();
+    m_xBtnAssign.reset();
+    m_xFLGeometrie.reset();
+    m_xFtPercentDiagonal.reset();
+    m_xMtrPercentDiagonal.reset();
+    m_xFtBackscale.reset();
+    m_xMtrBackscale.reset();
+    m_xFtEndAngle.reset();
+    m_xMtrEndAngle.reset();
+    m_xFtDepth.reset();
+    m_xMtrDepth.reset();
+    m_xFLSegments.reset();
+    m_xNumHorizontal.reset();
+    m_xNumVertical.reset();
+    m_xFLNormals.reset();
+    m_xBtnNormalsObj.reset();
+    m_xBtnNormalsFlat.reset();
+    m_xBtnNormalsSphere.reset();
+    m_xBtnNormalsInvert.reset();
+    m_xBtnTwoSidedLighting.reset();
+    m_xBtnDoubleSided.reset();
+    m_xFLRepresentation.reset();
+    m_xLbShademode.reset();
+    m_xFLShadow.reset();
+    m_xBtnShadow3d.reset();
+    m_xFtSlant.reset();
+    m_xMtrSlant.reset();
+    m_xFLCamera.reset();
+    m_xMtrDistance.reset();
+    m_xMtrFocalLength.reset();
+    m_xFLLight.reset();
+    m_xBtnLight1.reset();
+    m_xBtnLight2.reset();
+    m_xBtnLight3.reset();
+    m_xBtnLight4.reset();
+    m_xBtnLight5.reset();
+    m_xBtnLight6.reset();
+    m_xBtnLight7.reset();
+    m_xBtnLight8.reset();
+    m_xLbLight1.reset();
+    m_xLbLight2.reset();
+    m_xLbLight3.reset();
+    m_xLbLight4.reset();
+    m_xLbLight5.reset();
+    m_xLbLight6.reset();
+    m_xLbLight7.reset();
+    m_xLbLight8.reset();
+    m_xBtnLightColor.reset();
+    m_xLbAmbientlight.reset();
+    m_xBtnAmbientColor.reset();
+    m_xFLTexture.reset();
+    m_xBtnTexLuminance.reset();
+    m_xBtnTexColor.reset();
+    m_xBtnTexReplace.reset();
+    m_xBtnTexModulate.reset();
+    m_xBtnTexBlend.reset();
+    m_xBtnTexObjectX.reset();
+    m_xBtnTexParallelX.reset();
+    m_xBtnTexCircleX.reset();
+    m_xBtnTexObjectY.reset();
+    m_xBtnTexParallelY.reset();
+    m_xBtnTexCircleY.reset();
+    m_xBtnTexFilter.reset();
+    m_xFLMaterial.reset();
+    m_xLbMatFavorites.reset();
+    m_xLbMatColor.reset();
+    m_xBtnMatColor.reset();
+    m_xLbMatEmission.reset();
+    m_xBtnEmissionColor.reset();
+    m_xFLMatSpecular.reset();
+    m_xLbMatSpecular.reset();
+    m_xBtnSpecularColor.reset();
+    m_xMtrMatSpecularIntensity.reset();
+    m_xCtlPreviewWin.reset();
+    m_xCtlPreview.reset();
+    m_xCtlLightPreviewWin.reset();
+    m_xCtlLightPreview.reset();
+    m_xBtnConvertTo3D.reset();
+    m_xBtnLatheObject.reset();
+    m_xBtnPerspective.reset();
 
     SfxDockingWindow::dispose();
 }
 
-
 void Svx3DWin::Construct()
 {
-    m_pBtnGeo->Check();
-    Link<Button*,void> aLink( LINK( this, Svx3DWin, ClickViewTypeHdl ) );
-    aLink.Call(m_pBtnGeo);
-    m_pCtlLightPreview->Hide();
+    m_xBtnGeo->set_active(true);
+    ClickViewTypeHdl(*m_xBtnGeo);
+    m_xLightPreviewGrid->hide();
 }
 
-
 void Svx3DWin::Reset()
 {
     // Various initializations, default is AllAttributes
-    m_pLbShademode->SelectEntryPos( 0 );
-    m_pMtrMatSpecularIntensity->SetValue( 50 );
+    m_xLbShademode->set_active( 0 );
+    m_xMtrMatSpecularIntensity->set_value( 50, FieldUnit::PERCENT );
 
-    m_pBtnLight1->Check();
-    ClickUpdateHdl( nullptr );
+    m_xBtnLight1->set_active(true);
+    ClickUpdateHdl(*m_xBtnUpdate);
 
     // Select nothing, to avoid errors when selecting the first
-    m_pCtlLightPreview->GetSvx3DLightControl().SelectLight(0);
-    m_pCtlLightPreview->CheckSelection();
-}
-
-bool Svx3DWin::GetUILightState(const PushButton& rBtn) const
-{
-    return (rBtn.GetModeImage() == aImgLightOn);
-}
-
-void Svx3DWin::SetUILightState(PushButton& rBtn, bool bState)
-{
-    rBtn.SetModeImage( bState ? aImgLightOn : aImgLightOff );
+    m_xCtlLightPreview->GetSvx3DLightControl().SelectLight(0);
+    m_xCtlLightPreview->CheckSelection();
 }
 
 void Svx3DWin::Update( SfxItemSet const & rAttrs )
@@ -499,55 +502,55 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
         if( !bChart )
         {
             // For cube objects are no segments set
-            m_pFLSegments->Enable(!bCube);
-
-            m_pFtPercentDiagonal->Enable( !bCube && !bSphere );
-            m_pMtrPercentDiagonal->Enable( !bCube && !bSphere );
-            m_pFtBackscale->Enable( !bCube && !bSphere );
-            m_pMtrBackscale->Enable( !bCube && !bSphere );
-            m_pFtDepth->Enable( !bCube && !bSphere );
-            m_pMtrDepth->Enable( !bCube && !bSphere );
+            m_xFLSegments->set_sensitive(!bCube);
+
+            m_xFtPercentDiagonal->set_sensitive( !bCube && !bSphere );
+            m_xMtrPercentDiagonal->set_sensitive( !bCube && !bSphere );
+            m_xFtBackscale->set_sensitive( !bCube && !bSphere );
+            m_xMtrBackscale->set_sensitive( !bCube && !bSphere );
+            m_xFtDepth->set_sensitive( !bCube && !bSphere );
+            m_xMtrDepth->set_sensitive( !bCube && !bSphere );
             if( bCube )
             {
-                m_pNumHorizontal->SetEmptyFieldValue();
-                m_pNumVertical->SetEmptyFieldValue();
+                m_xNumHorizontal->set_text("");
+                m_xNumVertical->set_text("");
             }
             if( bCube || bSphere )
             {
-                m_pMtrPercentDiagonal->SetEmptyFieldValue();
-                m_pMtrBackscale->SetEmptyFieldValue();
-                m_pMtrDepth->SetEmptyFieldValue();
+                m_xMtrPercentDiagonal->set_text("");
+                m_xMtrBackscale->set_text("");
+                m_xMtrDepth->set_text("");
             }
 
             // There is a final angle only for Lathe objects.
-            m_pFtEndAngle->Enable( !bExtrude && !bCube && !bSphere );
-            m_pMtrEndAngle->Enable( !bExtrude && !bCube && !bSphere );
+            m_xFtEndAngle->set_sensitive( !bExtrude && !bCube && !bSphere );
+            m_xMtrEndAngle->set_sensitive( !bExtrude && !bCube && !bSphere );
             if( bExtrude || bCube || bSphere )
-                m_pMtrEndAngle->SetEmptyFieldValue();
+                m_xMtrEndAngle->set_text("");
         }
         else
         {
             // Geometry
-            m_pNumHorizontal->SetEmptyFieldValue();
-            m_pNumVertical->SetEmptyFieldValue();
-            m_pFLSegments->Enable( false );
-            m_pFtEndAngle->Enable( false );
-            m_pMtrEndAngle->Enable( false );
-            m_pMtrEndAngle->SetEmptyFieldValue();
-            m_pFtDepth->Enable( false );
-            m_pMtrDepth->Enable( false );
-            m_pMtrDepth->SetEmptyFieldValue();
+            m_xNumHorizontal->set_text("");
+            m_xNumVertical->set_text("");
+            m_xFLSegments->set_sensitive( false );
+            m_xFtEndAngle->set_sensitive( false );
+            m_xMtrEndAngle->set_sensitive( false );
+            m_xMtrEndAngle->set_text("");
+            m_xFtDepth->set_sensitive( false );
+            m_xMtrDepth->set_sensitive( false );
+            m_xMtrDepth->set_text("");
 
             // Representation
-            m_pFLShadow->Enable(false);
+            m_xFLShadow->set_sensitive(false);
 
-            m_pMtrDistance->SetEmptyFieldValue();
-            m_pMtrFocalLength->SetEmptyFieldValue();
-            m_pFLCamera->Enable( false );
+            m_xMtrDistance->set_text("");
+            m_xMtrFocalLength->set_text("");
+            m_xFLCamera->set_sensitive( false );
 
             //Lower Range
-            m_pBtnConvertTo3D->Enable( false );
-            m_pBtnLatheObject->Enable( false );
+            m_xBtnConvertTo3D->set_sensitive( false );
+            m_xBtnLatheObject->set_sensitive( false );
         }
     }
     // Bitmap fill ? -> Status
@@ -559,83 +562,83 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
         bBitmap = (eXFS == drawing::FillStyle_BITMAP || eXFS == drawing::FillStyle_GRADIENT || eXFS == drawing::FillStyle_HATCH);
     }
 
-    m_pFLTexture->Enable(bBitmap);
+    m_xFLTexture->set_sensitive(bBitmap);
 
     // Geometry
     // Number of segments (horizontal)
-    if( m_pNumHorizontal->IsEnabled() )
+    if( m_xNumHorizontal->get_sensitive() )
     {
         eState = rAttrs.GetItemState(SDRATTR_3DOBJ_HORZ_SEGS);
         if(eState != SfxItemState::DONTCARE)
         {
             sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DOBJ_HORZ_SEGS).GetValue();
-            if(nValue != static_cast<sal_uInt32>(m_pNumHorizontal->GetValue()))
+            if (nValue != static_cast<sal_uInt32>(m_xNumHorizontal->get_value()))
             {
-                m_pNumHorizontal->SetValue( nValue );
+                m_xNumHorizontal->set_value( nValue );
                 bUpdate = true;
             }
-            else if( m_pNumHorizontal->IsEmptyFieldValue() )
-                m_pNumHorizontal->SetValue( nValue );
+            else if( m_xNumHorizontal->get_text().isEmpty() )
+                m_xNumHorizontal->set_value( nValue );
         }
         else
         {
-            if( !m_pNumHorizontal->IsEmptyFieldValue() )
+            if( !m_xNumHorizontal->get_text().isEmpty() )
             {
-                m_pNumHorizontal->SetEmptyFieldValue();
+                m_xNumHorizontal->set_text("");
                 bUpdate = true;
             }
         }
     }
 
     //Number of segments (vertical)
-    if( m_pNumVertical->IsEnabled() )
+    if( m_xNumVertical->get_sensitive() )
     {
         eState = rAttrs.GetItemState(SDRATTR_3DOBJ_VERT_SEGS);
         if( eState != SfxItemState::DONTCARE )
         {
             sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DOBJ_VERT_SEGS).GetValue();
-            if( nValue != static_cast<sal_uInt32>(m_pNumVertical->GetValue()) )
+            if( nValue != static_cast<sal_uInt32>(m_xNumVertical->get_value()) )
             {
-                m_pNumVertical->SetValue( nValue );
+                m_xNumVertical->set_value( nValue );
                 bUpdate = true;
             }
-            else if( m_pNumVertical->IsEmptyFieldValue() )
-                m_pNumVertical->SetValue( nValue );
+            else if( m_xNumVertical->get_text().isEmpty() )
+                m_xNumVertical->set_value( nValue );
         }
         else
         {
-            if( !m_pNumVertical->IsEmptyFieldValue() )
+            if( !m_xNumVertical->get_text().isEmpty() )
             {
-                m_pNumVertical->SetEmptyFieldValue();
+                m_xNumVertical->set_text("");
                 bUpdate = true;
             }
         }
     }
 
     // Depth
-    if( m_pMtrDepth->IsEnabled() )
+    if( m_xMtrDepth->get_sensitive() )
     {
         eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DEPTH);
         if( eState != SfxItemState::DONTCARE )
         {
             sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DOBJ_DEPTH).GetValue();
-            sal_uInt32 nValue2 = GetCoreValue(*m_pMtrDepth, ePoolUnit);
+            sal_uInt32 nValue2 = GetCoreValue(*m_xMtrDepth, ePoolUnit);
             if( nValue != nValue2 )
             {
-                if( eFUnit != m_pMtrDepth->GetUnit() )
-                    SetFieldUnit(*m_pMtrDepth, eFUnit);
+                if( eFUnit != m_xMtrDepth->get_unit() )
+                    SetFieldUnit(*m_xMtrDepth, eFUnit);
 
-                SetMetricValue(*m_pMtrDepth, nValue, ePoolUnit);
+                SetMetricValue(*m_xMtrDepth, nValue, ePoolUnit);
                 bUpdate = true;
             }
-            else if( m_pMtrDepth->IsEmptyFieldValue() )
-                m_pMtrDepth->SetValue( m_pMtrDepth->GetValue() );
+            else if( m_xMtrDepth->get_text().isEmpty() )
+                m_xMtrDepth->set_value(m_xMtrDepth->get_value(FieldUnit::NONE), FieldUnit::NONE);
         }
         else
         {
-            if( !m_pMtrDepth->IsEmptyFieldValue() )
+            if( !m_xMtrDepth->get_text().isEmpty() )
             {
-                m_pMtrDepth->SetEmptyFieldValue();
+                m_xMtrDepth->set_text("");
                 bUpdate = true;
             }
         }
@@ -646,91 +649,91 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         bool bValue = rAttrs.Get(SDRATTR_3DOBJ_DOUBLE_SIDED).GetValue();
-        if( bValue != m_pBtnDoubleSided->IsChecked() )
+        if( bValue != m_xBtnDoubleSided->get_active() )
         {
-            m_pBtnDoubleSided->Check( bValue );
+            m_xBtnDoubleSided->set_active( bValue );
             bUpdate = true;
         }
-        else if( m_pBtnDoubleSided->GetState() == TRISTATE_INDET )
-            m_pBtnDoubleSided->Check( bValue );
+        else if( m_xBtnDoubleSided->get_state() == TRISTATE_INDET )
+            m_xBtnDoubleSided->set_active( bValue );
     }
     else
     {
-        if( m_pBtnDoubleSided->GetState() != TRISTATE_INDET )
+        if( m_xBtnDoubleSided->get_state() != TRISTATE_INDET )
         {
-            m_pBtnDoubleSided->SetState( TRISTATE_INDET );
+            m_xBtnDoubleSided->set_state( TRISTATE_INDET );
             bUpdate = true;
         }
     }
 
     // Edge rounding
-    if( m_pMtrPercentDiagonal->IsEnabled() )
+    if( m_xMtrPercentDiagonal->get_sensitive() )
     {
         eState = rAttrs.GetItemState(SDRATTR_3DOBJ_PERCENT_DIAGONAL);
         if( eState != SfxItemState::DONTCARE )
         {
             sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_PERCENT_DIAGONAL).GetValue();
-            if( nValue != m_pMtrPercentDiagonal->GetValue() )
+            if( nValue != m_xMtrPercentDiagonal->get_value(FieldUnit::PERCENT) )
             {
-                m_pMtrPercentDiagonal->SetValue( nValue );
+                m_xMtrPercentDiagonal->set_value(nValue, FieldUnit::PERCENT);
                 bUpdate = true;
             }
-            else if( m_pMtrPercentDiagonal->IsEmptyFieldValue() )
-                m_pMtrPercentDiagonal->SetValue( nValue );
+            else if( m_xMtrPercentDiagonal->get_text().isEmpty() )
+                m_xMtrPercentDiagonal->set_value(nValue, FieldUnit::PERCENT);
         }
         else
         {
-            if( !m_pMtrPercentDiagonal->IsEmptyFieldValue() )
+            if( !m_xMtrPercentDiagonal->get_text().isEmpty() )
             {
-                m_pMtrPercentDiagonal->SetEmptyFieldValue();
+                m_xMtrPercentDiagonal->set_text("");
                 bUpdate = true;
             }
         }
     }
 
     // Depth scaling
-    if( m_pMtrBackscale->IsEnabled() )
+    if( m_xMtrBackscale->get_sensitive() )
     {
         eState = rAttrs.GetItemState(SDRATTR_3DOBJ_BACKSCALE);
         if( eState != SfxItemState::DONTCARE )
         {
             sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_BACKSCALE).GetValue();
-            if( nValue != m_pMtrBackscale->GetValue() )
+            if( nValue != m_xMtrBackscale->get_value(FieldUnit::PERCENT) )
             {
-                m_pMtrBackscale->SetValue( nValue );
+                m_xMtrBackscale->set_value(nValue, FieldUnit::PERCENT);
                 bUpdate = true;
             }
-            else if( m_pMtrBackscale->IsEmptyFieldValue() )
-                m_pMtrBackscale->SetValue( nValue );
+            else if( m_xMtrBackscale->get_text().isEmpty() )
+                m_xMtrBackscale->set_value(nValue, FieldUnit::PERCENT);
         }
         else
         {
-            if( !m_pMtrBackscale->IsEmptyFieldValue() )
+            if( !m_xMtrBackscale->get_text().isEmpty() )
             {
-                m_pMtrBackscale->SetEmptyFieldValue();
+                m_xMtrBackscale->set_text("");
                 bUpdate = true;
             }
         }
     }
 
     // End angle
-    if( m_pMtrEndAngle->IsEnabled() )
+    if( m_xMtrEndAngle->get_sensitive() )
     {
         eState = rAttrs.GetItemState(SDRATTR_3DOBJ_END_ANGLE);
         if( eState != SfxItemState::DONTCARE )
         {
             sal_Int32 nValue = rAttrs.Get(SDRATTR_3DOBJ_END_ANGLE).GetValue();
-            if( nValue != m_pMtrEndAngle->GetValue() )
+            if( nValue != m_xMtrEndAngle->get_value(FieldUnit::DEGREE) )
             {
-                m_pMtrEndAngle->SetValue( nValue );
+                m_xMtrEndAngle->set_value(nValue, FieldUnit::DEGREE);
                 bUpdate = true;
             }
         }
         else
         {
-            if( !m_pMtrEndAngle->IsEmptyFieldValue() )
+            if( !m_xMtrEndAngle->get_text().isEmpty() )
             {
-                m_pMtrEndAngle->SetEmptyFieldValue();
+                m_xMtrEndAngle->set_text("");
                 bUpdate = true;
             }
         }
@@ -742,25 +745,25 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     {
         sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_NORMALS_KIND).GetValue();
 
-        if( ( !m_pBtnNormalsObj->IsChecked() && nValue == 0 ) ||
-            ( !m_pBtnNormalsFlat->IsChecked() && nValue == 1 ) ||
-            ( !m_pBtnNormalsSphere->IsChecked() && nValue == 2 ) )
+        if( ( !m_xBtnNormalsObj->get_active() && nValue == 0 ) ||
+            ( !m_xBtnNormalsFlat->get_active() && nValue == 1 ) ||
+            ( !m_xBtnNormalsSphere->get_active() && nValue == 2 ) )
         {
-            m_pBtnNormalsObj->Check( nValue == 0 );
-            m_pBtnNormalsFlat->Check( nValue == 1 );
-            m_pBtnNormalsSphere->Check( nValue == 2 );
+            m_xBtnNormalsObj->set_active( nValue == 0 );
+            m_xBtnNormalsFlat->set_active( nValue == 1 );
+            m_xBtnNormalsSphere->set_active( nValue == 2 );
             bUpdate = true;
         }
     }
     else
     {
-        if( m_pBtnNormalsObj->IsChecked() ||
-            m_pBtnNormalsFlat->IsChecked() ||
-            m_pBtnNormalsSphere->IsChecked() )
+        if( m_xBtnNormalsObj->get_active() ||
+            m_xBtnNormalsFlat->get_active() ||
+            m_xBtnNormalsSphere->get_active() )
         {
-            m_pBtnNormalsObj->Check( false );
-            m_pBtnNormalsFlat->Check( false );
-            m_pBtnNormalsSphere->Check( false );
+            m_xBtnNormalsObj->set_active( false );
+            m_xBtnNormalsFlat->set_active( false );
+            m_xBtnNormalsSphere->set_active( false );
             bUpdate = true;
         }
     }
@@ -770,19 +773,19 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         bool bValue = rAttrs.Get(SDRATTR_3DOBJ_NORMALS_INVERT).GetValue();
-        if( bValue != m_pBtnNormalsInvert->IsChecked() )
+        if( bValue != m_xBtnNormalsInvert->get_active() )
         {
-            m_pBtnNormalsInvert->Check( bValue );
+            m_xBtnNormalsInvert->set_active( bValue );
             bUpdate = true;
         }
-        else if( m_pBtnNormalsInvert->GetState() == TRISTATE_INDET )
-            m_pBtnNormalsInvert->Check( bValue );
+        else if( m_xBtnNormalsInvert->get_state() == TRISTATE_INDET )
+            m_xBtnNormalsInvert->set_active( bValue );
     }
     else
     {
-        if( m_pBtnNormalsInvert->GetState() != TRISTATE_INDET )
+        if( m_xBtnNormalsInvert->get_state() != TRISTATE_INDET )
         {
-            m_pBtnNormalsInvert->SetState( TRISTATE_INDET );
+            m_xBtnNormalsInvert->set_state( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -792,19 +795,19 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         bool bValue = rAttrs.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING).GetValue();
-        if( bValue != m_pBtnTwoSidedLighting->IsChecked() )
+        if( bValue != m_xBtnTwoSidedLighting->get_active() )
         {
-            m_pBtnTwoSidedLighting->Check( bValue );
+            m_xBtnTwoSidedLighting->set_active( bValue );
             bUpdate = true;
         }
-        else if( m_pBtnTwoSidedLighting->GetState() == TRISTATE_INDET )
-            m_pBtnTwoSidedLighting->Check( bValue );
+        else if( m_xBtnTwoSidedLighting->get_state() == TRISTATE_INDET )
+            m_xBtnTwoSidedLighting->set_active( bValue );
     }
     else
     {
-        if( m_pBtnTwoSidedLighting->GetState() != TRISTATE_INDET )
+        if( m_xBtnTwoSidedLighting->get_state() != TRISTATE_INDET )
         {
-            m_pBtnTwoSidedLighting->SetState( TRISTATE_INDET );
+            m_xBtnTwoSidedLighting->set_state( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -815,17 +818,17 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DSCENE_SHADE_MODE).GetValue();
-        if( nValue != m_pLbShademode->GetSelectedEntryPos() )
+        if( nValue != m_xLbShademode->get_active() )
         {
-            m_pLbShademode->SelectEntryPos( nValue );
+            m_xLbShademode->set_active( nValue );
             bUpdate = true;
         }
     }
     else
     {
-        if( m_pLbShademode->GetSelectedEntryCount() != 0 )
+        if( m_xLbShademode->get_active() != 0 )
         {
-            m_pLbShademode->SetNoSelection();
+            m_xLbShademode->set_active(-1);
             bUpdate = true;
         }
     }
@@ -835,21 +838,21 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         bool bValue = rAttrs.Get(SDRATTR_3DOBJ_SHADOW_3D).GetValue();
-        if( bValue != m_pBtnShadow3d->IsChecked() )
+        if( bValue != m_xBtnShadow3d->get_active() )
         {
-            m_pBtnShadow3d->Check( bValue );
-            m_pFtSlant->Enable( bValue );
-            m_pMtrSlant->Enable( bValue );
+            m_xBtnShadow3d->set_active( bValue );
+            m_xFtSlant->set_sensitive( bValue );
+            m_xMtrSlant->set_sensitive( bValue );
             bUpdate = true;
         }
-        else if( m_pBtnShadow3d->GetState() == TRISTATE_INDET )
-            m_pBtnShadow3d->Check( bValue );
+        else if( m_xBtnShadow3d->get_state() == TRISTATE_INDET )
+            m_xBtnShadow3d->set_active( bValue );
     }
     else
     {
-        if( m_pBtnShadow3d->GetState() != TRISTATE_INDET )
+        if( m_xBtnShadow3d->get_state() != TRISTATE_INDET )
         {
-            m_pBtnShadow3d->SetState( TRISTATE_INDET );
+            m_xBtnShadow3d->set_state( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -859,17 +862,17 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DSCENE_SHADOW_SLANT).GetValue();
-        if( nValue != m_pMtrSlant->GetValue() )
+        if( nValue != m_xMtrSlant->get_value(FieldUnit::DEGREE) )
         {
-            m_pMtrSlant->SetValue( nValue );
+            m_xMtrSlant->set_value(nValue, FieldUnit::DEGREE);
             bUpdate = true;
         }
     }
     else
     {
-        if( !m_pMtrSlant->IsEmptyFieldValue() )
+        if( !m_xMtrSlant->get_text().isEmpty() )
         {
-            m_pMtrSlant->SetEmptyFieldValue();
+            m_xMtrSlant->set_text("");
             bUpdate = true;
         }
     }
@@ -879,21 +882,21 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DSCENE_DISTANCE).GetValue();
-        sal_uInt32 nValue2 = GetCoreValue(*m_pMtrDistance, ePoolUnit);
+        sal_uInt32 nValue2 = GetCoreValue(*m_xMtrDistance, ePoolUnit);
         if( nValue != nValue2 )
         {
-            if( eFUnit != m_pMtrDistance->GetUnit() )
-                SetFieldUnit(*m_pMtrDistance, eFUnit);
+            if( eFUnit != m_xMtrDistance->get_unit() )
+                SetFieldUnit(*m_xMtrDistance, eFUnit);
 
-            SetMetricValue(*m_pMtrDistance, nValue, ePoolUnit);
+            SetMetricValue(*m_xMtrDistance, nValue, ePoolUnit);
             bUpdate = true;
         }
     }
     else
     {
-        if( !m_pMtrDepth->IsEmptyFieldValue() )
+        if( !m_xMtrDepth->get_text().isEmpty() )
         {
-            m_pMtrDepth->SetEmptyFieldValue();
+            m_xMtrDepth->set_text("");
             bUpdate = true;
         }
     }
@@ -903,21 +906,21 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         sal_uInt32 nValue = rAttrs.Get(SDRATTR_3DSCENE_FOCAL_LENGTH).GetValue();
-        sal_uInt32 nValue2 = GetCoreValue(*m_pMtrFocalLength, ePoolUnit);
+        sal_uInt32 nValue2 = GetCoreValue(*m_xMtrFocalLength, ePoolUnit);
         if( nValue != nValue2 )
         {
-            if( eFUnit != m_pMtrFocalLength->GetUnit() )
-                SetFieldUnit(*m_pMtrFocalLength, eFUnit);
+            if( eFUnit != m_xMtrFocalLength->get_unit() )
+                SetFieldUnit(*m_xMtrFocalLength, eFUnit);
 
-            SetMetricValue(*m_pMtrFocalLength, nValue, ePoolUnit);
+            SetMetricValue(*m_xMtrFocalLength, nValue, ePoolUnit);
             bUpdate = true;
         }
     }
     else
     {
-        if( !m_pMtrFocalLength->IsEmptyFieldValue() )
+        if( !m_xMtrFocalLength->get_text().isEmpty() )
         {
-            m_pMtrFocalLength->SetEmptyFieldValue();
+            m_xMtrFocalLength->set_text("");
             bUpdate = true;
         }
     }
@@ -929,7 +932,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_1).GetValue();
-        SvxColorListBox* pLb = m_pLbLight1;
+        ColorListBox* pLb = m_xLbLight1.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -938,9 +941,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     }
     else
     {
-        if (!m_pLbLight1->IsNoSelection())
+        if (!m_xLbLight1->IsNoSelection())
         {
-            m_pLbLight1->SetNoSelection();
+            m_xLbLight1->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -949,19 +952,19 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_1).GetValue();
-        if (bOn != GetUILightState(*m_pBtnLight1))
+        if (bOn != m_xBtnLight1->isLightOn())
         {
-            SetUILightState(*m_pBtnLight1, bOn);
+            m_xBtnLight1->switchLightOn(bOn);
             bUpdate = true;
         }
-        if( m_pBtnLight1->GetState() == TRISTATE_INDET )
-            m_pBtnLight1->Check( m_pBtnLight1->IsChecked() );
+        if( m_xBtnLight1->get_state() == TRISTATE_INDET )
+            m_xBtnLight1->set_active( m_xBtnLight1->get_active() );
     }
     else
     {
-        if( m_pBtnLight1->GetState() != TRISTATE_INDET )
+        if( m_xBtnLight1->get_state() != TRISTATE_INDET )
         {
-            m_pBtnLight1->SetState( TRISTATE_INDET );
+            m_xBtnLight1->set_state( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -977,7 +980,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_2).GetValue();
-        SvxColorListBox* pLb = m_pLbLight2;
+        ColorListBox* pLb = m_xLbLight2.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -986,9 +989,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     }
     else
     {
-        if (!m_pLbLight2->IsNoSelection())
+        if (!m_xLbLight2->IsNoSelection())
         {
-            m_pLbLight2->SetNoSelection();
+            m_xLbLight2->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -997,19 +1000,19 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_2).GetValue();
-        if (bOn != GetUILightState(*m_pBtnLight2))
+        if (bOn != m_xBtnLight2->isLightOn())
         {
-            SetUILightState(*m_pBtnLight2, bOn);
+            m_xBtnLight2->switchLightOn(bOn);
             bUpdate = true;
         }
-        if( m_pBtnLight2->GetState() == TRISTATE_INDET )
-            m_pBtnLight2->Check( m_pBtnLight2->IsChecked() );
+        if( m_xBtnLight2->get_state() == TRISTATE_INDET )
+            m_xBtnLight2->set_active( m_xBtnLight2->get_active() );
     }
     else
     {
-        if( m_pBtnLight2->GetState() != TRISTATE_INDET )
+        if( m_xBtnLight2->get_state() != TRISTATE_INDET )
         {
-            m_pBtnLight2->SetState( TRISTATE_INDET );
+            m_xBtnLight2->set_state( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -1025,7 +1028,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_3).GetValue();
-        SvxColorListBox* pLb = m_pLbLight3;
+        ColorListBox* pLb = m_xLbLight3.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1034,9 +1037,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     }
     else
     {
-        if (!m_pLbLight3->IsNoSelection())
+        if (!m_xLbLight3->IsNoSelection())
         {
-            m_pLbLight3->SetNoSelection();
+            m_xLbLight3->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1045,19 +1048,19 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_3).GetValue();
-        if (bOn != GetUILightState(*m_pBtnLight3))
+        if (bOn != m_xBtnLight3->isLightOn())
         {
-            SetUILightState(*m_pBtnLight3, bOn);
+            m_xBtnLight3->switchLightOn(bOn);
             bUpdate = true;
         }
-        if( m_pBtnLight3->GetState() == TRISTATE_INDET )
-            m_pBtnLight3->Check( m_pBtnLight3->IsChecked() );
+        if( m_xBtnLight3->get_state() == TRISTATE_INDET )
+            m_xBtnLight3->set_active( m_xBtnLight3->get_active() );
     }
     else
     {
-        if( m_pBtnLight3->GetState() != TRISTATE_INDET )
+        if( m_xBtnLight3->get_state() != TRISTATE_INDET )
         {
-            m_pBtnLight3->SetState( TRISTATE_INDET );
+            m_xBtnLight3->set_state( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -1073,7 +1076,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_4).GetValue();
-        SvxColorListBox* pLb = m_pLbLight4;
+        ColorListBox* pLb = m_xLbLight4.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1082,9 +1085,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     }
     else
     {
-        if (!m_pLbLight4->IsNoSelection())
+        if (!m_xLbLight4->IsNoSelection())
         {
-            m_pLbLight4->SetNoSelection();
+            m_xLbLight4->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1093,19 +1096,19 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_4).GetValue();
-        if (bOn != GetUILightState(*m_pBtnLight4))
+        if (bOn != m_xBtnLight4->isLightOn())
         {
-            SetUILightState(*m_pBtnLight4, bOn);
+            m_xBtnLight4->switchLightOn(bOn);
             bUpdate = true;
         }
-        if( m_pBtnLight4->GetState() == TRISTATE_INDET )
-            m_pBtnLight4->Check( m_pBtnLight4->IsChecked() );
+        if( m_xBtnLight4->get_state() == TRISTATE_INDET )
+            m_xBtnLight4->set_active( m_xBtnLight4->get_active() );
     }
     else
     {
-        if( m_pBtnLight4->GetState() != TRISTATE_INDET )
+        if( m_xBtnLight4->get_state() != TRISTATE_INDET )
         {
-            m_pBtnLight4->SetState( TRISTATE_INDET );
+            m_xBtnLight4->set_state( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -1121,7 +1124,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_5).GetValue();
-        SvxColorListBox* pLb = m_pLbLight5;
+        ColorListBox* pLb = m_xLbLight5.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1130,9 +1133,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     }
     else
     {
-        if (!m_pLbLight5->IsNoSelection())
+        if (!m_xLbLight5->IsNoSelection())
         {
-            m_pLbLight5->SetNoSelection();
+            m_xLbLight5->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1141,19 +1144,19 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_5).GetValue();
-        if (bOn != GetUILightState(*m_pBtnLight5))
+        if (bOn != m_xBtnLight5->isLightOn())
         {
-            SetUILightState(*m_pBtnLight5, bOn);
+            m_xBtnLight5->switchLightOn(bOn);
             bUpdate = true;
         }
-        if( m_pBtnLight5->GetState() == TRISTATE_INDET )
-            m_pBtnLight5->Check( m_pBtnLight5->IsChecked() );
+        if( m_xBtnLight5->get_state() == TRISTATE_INDET )
+            m_xBtnLight5->set_active( m_xBtnLight5->get_active() );
     }
     else
     {
-        if( m_pBtnLight5->GetState() != TRISTATE_INDET )
+        if( m_xBtnLight5->get_state() != TRISTATE_INDET )
         {
-            m_pBtnLight5->SetState( TRISTATE_INDET );
+            m_xBtnLight5->set_state( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -1169,7 +1172,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_6).GetValue();
-        SvxColorListBox* pLb = m_pLbLight6;
+        ColorListBox* pLb = m_xLbLight6.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1178,9 +1181,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     }
     else
     {
-        if (!m_pLbLight6->IsNoSelection())
+        if (!m_xLbLight6->IsNoSelection())
         {
-            m_pLbLight6->SetNoSelection();
+            m_xLbLight6->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1189,19 +1192,19 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_6).GetValue();
-        if (bOn != GetUILightState(*m_pBtnLight6))
+        if (bOn != m_xBtnLight6->isLightOn())
         {
-            SetUILightState(*m_pBtnLight6, bOn);
+            m_xBtnLight6->switchLightOn(bOn);
             bUpdate = true;
         }
-        if( m_pBtnLight6->GetState() == TRISTATE_INDET )
-            m_pBtnLight6->Check( m_pBtnLight6->IsChecked() );
+        if( m_xBtnLight6->get_state() == TRISTATE_INDET )
+            m_xBtnLight6->set_active( m_xBtnLight6->get_active() );
     }
     else
     {
-        if( m_pBtnLight6->GetState() != TRISTATE_INDET )
+        if( m_xBtnLight6->get_state() != TRISTATE_INDET )
         {
-            m_pBtnLight6->SetState( TRISTATE_INDET );
+            m_xBtnLight6->set_state( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -1217,7 +1220,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_7).GetValue();
-        SvxColorListBox* pLb = m_pLbLight7;
+        ColorListBox* pLb = m_xLbLight7.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1226,9 +1229,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     }
     else
     {
-        if (!m_pLbLight7->IsNoSelection())
+        if (!m_xLbLight7->IsNoSelection())
         {
-            m_pLbLight7->SetNoSelection();
+            m_xLbLight7->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1237,19 +1240,19 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_7).GetValue();
-        if (bOn != GetUILightState(*m_pBtnLight7))
+        if (bOn != m_xBtnLight7->isLightOn())
         {
-            SetUILightState(*m_pBtnLight7 , bOn);
+            m_xBtnLight7->switchLightOn(bOn);
             bUpdate = true;
         }
-        if( m_pBtnLight7->GetState() == TRISTATE_INDET )
-            m_pBtnLight7->Check( m_pBtnLight7->IsChecked() );
+        if( m_xBtnLight7->get_state() == TRISTATE_INDET )
+            m_xBtnLight7->set_active( m_xBtnLight7->get_active() );
     }
     else
     {
-        if( m_pBtnLight7->GetState() != TRISTATE_INDET )
+        if( m_xBtnLight7->get_state() != TRISTATE_INDET )
         {
-            m_pBtnLight7->SetState( TRISTATE_INDET );
+            m_xBtnLight7->set_state( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -1265,7 +1268,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         aColor = rAttrs.Get(SDRATTR_3DSCENE_LIGHTCOLOR_8).GetValue();
-        SvxColorListBox* pLb = m_pLbLight8;
+        ColorListBox* pLb = m_xLbLight8.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1274,9 +1277,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     }
     else
     {
-        if (!m_pLbLight8->IsNoSelection())
+        if (!m_xLbLight8->IsNoSelection())
         {
-            m_pLbLight8->SetNoSelection();
+            m_xLbLight8->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1285,19 +1288,19 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         bool bOn = rAttrs.Get(SDRATTR_3DSCENE_LIGHTON_8).GetValue();
-        if (bOn != GetUILightState(*m_pBtnLight8))
+        if (bOn != m_xBtnLight8->isLightOn())
         {
-            SetUILightState(*m_pBtnLight8, bOn);
+            m_xBtnLight8->switchLightOn(bOn);
             bUpdate = true;
         }
-        if( m_pBtnLight8->GetState() == TRISTATE_INDET )
-            m_pBtnLight8->Check( m_pBtnLight8->IsChecked() );
+        if( m_xBtnLight8->get_state() == TRISTATE_INDET )
+            m_xBtnLight8->set_active( m_xBtnLight8->get_active() );
     }
     else
     {
-        if( m_pBtnLight8->GetState() != TRISTATE_INDET )
+        if( m_xBtnLight8->get_state() != TRISTATE_INDET )
         {
-            m_pBtnLight8->SetState( TRISTATE_INDET );
+            m_xBtnLight8->set_state( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -1313,7 +1316,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         aColor = rAttrs.Get(SDRATTR_3DSCENE_AMBIENTCOLOR).GetValue();
-        SvxColorListBox* pLb = m_pLbAmbientlight;
+        ColorListBox* pLb = m_xLbAmbientlight.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1322,9 +1325,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     }
     else
     {
-        if (!m_pLbAmbientlight->IsNoSelection())
+        if (!m_xLbAmbientlight->IsNoSelection())
         {
-            m_pLbAmbientlight->SetNoSelection();
+            m_xLbAmbientlight->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1339,21 +1342,21 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
         {
             sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_KIND).GetValue();
 
-            if( ( !m_pBtnTexLuminance->IsChecked() && nValue == 1 ) ||
-                ( !m_pBtnTexColor->IsChecked() && nValue == 3 ) )
+            if( ( !m_xBtnTexLuminance->get_active() && nValue == 1 ) ||
+                ( !m_xBtnTexColor->get_active() && nValue == 3 ) )
             {
-                m_pBtnTexLuminance->Check( nValue == 1 );
-                m_pBtnTexColor->Check( nValue == 3 );
+                m_xBtnTexLuminance->set_active( nValue == 1 );
+                m_xBtnTexColor->set_active( nValue == 3 );
                 bUpdate = true;
             }
         }
         else
         {
-            if( m_pBtnTexLuminance->IsChecked() ||
-                m_pBtnTexColor->IsChecked() )
+            if( m_xBtnTexLuminance->get_active() ||
+                m_xBtnTexColor->get_active() )
             {
-                m_pBtnTexLuminance->Check( false );
-                m_pBtnTexColor->Check( false );
+                m_xBtnTexLuminance->set_active( false );
+                m_xBtnTexColor->set_active( false );
                 bUpdate = true;
             }
         }
@@ -1364,21 +1367,21 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
         {
             sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_MODE).GetValue();
 
-            if( ( !m_pBtnTexReplace->IsChecked() && nValue == 1 ) ||
-                ( !m_pBtnTexModulate->IsChecked() && nValue == 2 ) )
+            if( ( !m_xBtnTexReplace->get_active() && nValue == 1 ) ||
+                ( !m_xBtnTexModulate->get_active() && nValue == 2 ) )
             {
-                m_pBtnTexReplace->Check( nValue == 1 );
-                m_pBtnTexModulate->Check( nValue == 2 );
+                m_xBtnTexReplace->set_active( nValue == 1 );
+                m_xBtnTexModulate->set_active( nValue == 2 );
                 bUpdate = true;
             }
         }
         else
         {
-            if( m_pBtnTexReplace->IsChecked() ||
-                m_pBtnTexModulate->IsChecked() )
+            if( m_xBtnTexReplace->get_active() ||
+                m_xBtnTexModulate->get_active() )
             {
-                m_pBtnTexReplace->Check( false );
-                m_pBtnTexModulate->Check( false );
+                m_xBtnTexReplace->set_active( false );
+                m_xBtnTexModulate->set_active( false );
                 bUpdate = true;
             }
         }
@@ -1389,25 +1392,25 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
         {
             sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X).GetValue();
 
-            if( ( !m_pBtnTexObjectX->IsChecked() && nValue == 0 ) ||
-                ( !m_pBtnTexParallelX->IsChecked() && nValue == 1 ) ||
-                ( !m_pBtnTexCircleX->IsChecked() && nValue == 2 ) )
+            if( ( !m_xBtnTexObjectX->get_active() && nValue == 0 ) ||
+                ( !m_xBtnTexParallelX->get_active() && nValue == 1 ) ||
+                ( !m_xBtnTexCircleX->get_active() && nValue == 2 ) )
             {
-                m_pBtnTexObjectX->Check( nValue == 0 );
-                m_pBtnTexParallelX->Check( nValue == 1 );
-                m_pBtnTexCircleX->Check( nValue == 2 );
+                m_xBtnTexObjectX->set_active( nValue == 0 );
+                m_xBtnTexParallelX->set_active( nValue == 1 );
+                m_xBtnTexCircleX->set_active( nValue == 2 );
                 bUpdate = true;
             }
         }
         else
         {
-            if( m_pBtnTexObjectX->IsChecked() ||
-                m_pBtnTexParallelX->IsChecked() ||
-                m_pBtnTexCircleX->IsChecked() )
+            if( m_xBtnTexObjectX->get_active() ||
+                m_xBtnTexParallelX->get_active() ||
+                m_xBtnTexCircleX->get_active() )
             {
-                m_pBtnTexObjectX->Check( false );
-                m_pBtnTexParallelX->Check( false );
-                m_pBtnTexCircleX->Check( false );
+                m_xBtnTexObjectX->set_active( false );
+                m_xBtnTexParallelX->set_active( false );
+                m_xBtnTexCircleX->set_active( false );
                 bUpdate = true;
             }
         }
@@ -1418,25 +1421,25 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
         {
             sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y).GetValue();
 
-            if( ( !m_pBtnTexObjectY->IsChecked() && nValue == 0 ) ||
-                ( !m_pBtnTexParallelY->IsChecked() && nValue == 1 ) ||
-                ( !m_pBtnTexCircleY->IsChecked() && nValue == 2 ) )
+            if( ( !m_xBtnTexObjectY->get_active() && nValue == 0 ) ||
+                ( !m_xBtnTexParallelY->get_active() && nValue == 1 ) ||
+                ( !m_xBtnTexCircleY->get_active() && nValue == 2 ) )
             {
-                m_pBtnTexObjectY->Check( nValue == 0 );
-                m_pBtnTexParallelY->Check( nValue == 1 );
-                m_pBtnTexCircleY->Check( nValue == 2 );
+                m_xBtnTexObjectY->set_active( nValue == 0 );
+                m_xBtnTexParallelY->set_active( nValue == 1 );
+                m_xBtnTexCircleY->set_active( nValue == 2 );
                 bUpdate = true;
             }
         }
         else
         {
-            if( m_pBtnTexObjectY->IsChecked() ||
-                m_pBtnTexParallelY->IsChecked() ||
-                m_pBtnTexCircleY->IsChecked() )
+            if( m_xBtnTexObjectY->get_active() ||
+                m_xBtnTexParallelY->get_active() ||
+                m_xBtnTexCircleY->get_active() )
             {
-                m_pBtnTexObjectY->Check( false );
-                m_pBtnTexParallelY->Check( false );
-                m_pBtnTexCircleY->Check( false );
+                m_xBtnTexObjectY->set_active( false );
+                m_xBtnTexParallelY->set_active( false );
+                m_xBtnTexCircleY->set_active( false );
                 bUpdate = true;
             }
         }
@@ -1446,19 +1449,19 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
         if( eState != SfxItemState::DONTCARE )
         {
             bool bValue = rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_FILTER).GetValue();
-            if( bValue != m_pBtnTexFilter->IsChecked() )
+            if( bValue != m_xBtnTexFilter->get_active() )
             {
-                m_pBtnTexFilter->Check( bValue );
+                m_xBtnTexFilter->set_active( bValue );
                 bUpdate = true;
             }
-            if( m_pBtnTexFilter->GetState() == TRISTATE_INDET )
-                m_pBtnTexFilter->Check( bValue );
+            if( m_xBtnTexFilter->get_state() == TRISTATE_INDET )
+                m_xBtnTexFilter->set_active( bValue );
         }
         else
         {
-            if( m_pBtnTexFilter->GetState() != TRISTATE_INDET )
+            if( m_xBtnTexFilter->get_state() != TRISTATE_INDET )
             {
-                m_pBtnTexFilter->SetState( TRISTATE_INDET );
+                m_xBtnTexFilter->set_state( TRISTATE_INDET );
                 bUpdate = true;
             }
         }
@@ -1466,14 +1469,14 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
 
 
     // Material Favorites
-    m_pLbMatFavorites->SelectEntryPos( 0 );
+    m_xLbMatFavorites->set_active( 0 );
 
     // Object color
     eState = rAttrs.GetItemState(XATTR_FILLCOLOR);
     if( eState != SfxItemState::DONTCARE )
     {
         aColor = rAttrs.Get(XATTR_FILLCOLOR).GetColorValue();
-        SvxColorListBox* pLb = m_pLbMatColor;
+        ColorListBox* pLb = m_xLbMatColor.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1482,9 +1485,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     }
     else
     {
-        if (!m_pLbMatColor->IsNoSelection())
+        if (!m_xLbMatColor->IsNoSelection())
         {
-            m_pLbMatColor->SetNoSelection();
+            m_xLbMatColor->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1494,7 +1497,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         aColor = rAttrs.Get(SDRATTR_3DOBJ_MAT_EMISSION).GetValue();
-        SvxColorListBox* pLb = m_pLbMatEmission;
+        ColorListBox* pLb = m_xLbMatEmission.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1503,9 +1506,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     }
     else
     {
-        if (!m_pLbMatEmission->IsNoSelection())
+        if (!m_xLbMatEmission->IsNoSelection())
         {
-            m_pLbMatEmission->SetNoSelection();
+            m_xLbMatEmission->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1515,7 +1518,7 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         aColor = rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR).GetValue();
-        SvxColorListBox* pLb = m_pLbMatSpecular;
+        ColorListBox* pLb = m_xLbMatSpecular.get();
         if( aColor != pLb->GetSelectEntryColor() )
         {
             LBSelectColor( pLb, aColor );
@@ -1524,9 +1527,9 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     }
     else
     {
-        if (!m_pLbMatSpecular->IsNoSelection())
+        if (!m_xLbMatSpecular->IsNoSelection())
         {
-            m_pLbMatSpecular->SetNoSelection();
+            m_xLbMatSpecular->SetNoSelection();
             bUpdate = true;
         }
     }
@@ -1536,17 +1539,17 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         sal_uInt16 nValue = rAttrs.Get(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY).GetValue();
-        if( nValue != m_pMtrMatSpecularIntensity->GetValue() )
+        if( nValue != m_xMtrMatSpecularIntensity->get_value(FieldUnit::PERCENT) )
         {
-            m_pMtrMatSpecularIntensity->SetValue( nValue );
+            m_xMtrMatSpecularIntensity->set_value(nValue, FieldUnit::PERCENT);
             bUpdate = true;
         }
     }
     else
     {
-        if( !m_pMtrMatSpecularIntensity->IsEmptyFieldValue() )
+        if( !m_xMtrMatSpecularIntensity->get_text().isEmpty() )
         {
-            m_pMtrMatSpecularIntensity->SetEmptyFieldValue();
+            m_xMtrMatSpecularIntensity->set_text("");
             bUpdate = true;
         }
     }
@@ -1558,20 +1561,20 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if( eState != SfxItemState::DONTCARE )
     {
         ProjectionType ePT = static_cast<ProjectionType>(rAttrs.Get(SDRATTR_3DSCENE_PERSPECTIVE).GetValue());
-        if( ( !m_pBtnPerspective->IsChecked() && ePT == ProjectionType::Perspective ) ||
-            ( m_pBtnPerspective->IsChecked() && ePT == ProjectionType::Parallel ) )
+        if( ( !m_xBtnPerspective->get_active() && ePT == ProjectionType::Perspective ) ||
+            ( m_xBtnPerspective->get_active() && ePT == ProjectionType::Parallel ) )
         {
-            m_pBtnPerspective->Check( ePT == ProjectionType::Perspective );
+            m_xBtnPerspective->set_active( ePT == ProjectionType::Perspective );
             bUpdate = true;
         }
-        if( m_pBtnPerspective->GetState() == TRISTATE_INDET )
-            m_pBtnPerspective->Check( ePT == ProjectionType::Perspective );
+        if( m_xBtnPerspective->get_state() == TRISTATE_INDET )
+            m_xBtnPerspective->set_active( ePT == ProjectionType::Perspective );
     }
     else
     {
-        if( m_pBtnPerspective->GetState() != TRISTATE_INDET )
+        if( m_xBtnPerspective->get_state() != TRISTATE_INDET )
         {
-            m_pBtnPerspective->SetState( TRISTATE_INDET );
+            m_xBtnPerspective->set_state( TRISTATE_INDET );
             bUpdate = true;
         }
     }
@@ -1596,37 +1599,37 @@ void Svx3DWin::Update( SfxItemSet const & rAttrs )
     if(SfxItemState::DONTCARE == aSet.GetItemState(XATTR_FILLCOLOR, false))
         aSet.Put(XFillColorItem(OUString(), COL_WHITE));
 
-    m_pCtlPreview->Set3DAttributes(aSet);
-    m_pCtlLightPreview->GetSvx3DLightControl().Set3DAttributes(aSet);
+    m_xCtlPreview->Set3DAttributes(aSet);
+    m_xCtlLightPreview->GetSvx3DLightControl().Set3DAttributes(aSet);
 
     // try to select light corresponding to active button
     sal_uInt32 nNumber(0xffffffff);
 
-    if(m_pBtnLight1->IsChecked())
+    if(m_xBtnLight1->get_active())
         nNumber = 0;
-    else if(m_pBtnLight2->IsChecked())
+    else if(m_xBtnLight2->get_active())
         nNumber = 1;
-    else if(m_pBtnLight3->IsChecked())
+    else if(m_xBtnLight3->get_active())
         nNumber = 2;
-    else if(m_pBtnLight4->IsChecked())
+    else if(m_xBtnLight4->get_active())
         nNumber = 3;
-    else if(m_pBtnLight5->IsChecked())
+    else if(m_xBtnLight5->get_active())
         nNumber = 4;
-    else if(m_pBtnLight6->IsChecked())
+    else if(m_xBtnLight6->get_active())
         nNumber = 5;
-    else if(m_pBtnLight7->IsChecked())
+    else if(m_xBtnLight7->get_active())
         nNumber = 6;
-    else if(m_pBtnLight8->IsChecked())
+    else if(m_xBtnLight8->get_active())
         nNumber = 7;
 
     if(nNumber != 0xffffffff)
     {
-        m_pCtlLightPreview->GetSvx3DLightControl().SelectLight(nNumber);
+        m_xCtlLightPreview->GetSvx3DLightControl().SelectLight(nNumber);
     }
 
     // handle state of converts possible
-    m_pBtnConvertTo3D->Enable(pConvertTo3DItem->GetState());
-    m_pBtnLatheObject->Enable(pConvertTo3DLatheItem->GetState());
+    m_xBtnConvertTo3D->set_sensitive(pConvertTo3DItem->GetState());
+    m_xBtnLatheObject->set_sensitive(pConvertTo3DLatheItem->GetState());
 }
 
 
@@ -1652,10 +1655,10 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
 
 //Others must stand as the front on all sides
     // Perspective
-    if( m_pBtnPerspective->GetState() != TRISTATE_INDET )
+    if( m_xBtnPerspective->get_state() != TRISTATE_INDET )
     {
         ProjectionType nValue;
-        if( m_pBtnPerspective->IsChecked() )
+        if( m_xBtnPerspective->get_active() )
             nValue = ProjectionType::Perspective;
         else
             nValue = ProjectionType::Parallel;
@@ -1677,34 +1680,34 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
     }
 
     // Number of segments (horizontal)
-    if( !m_pNumHorizontal->IsEmptyFieldValue() )
+    if( !m_xNumHorizontal->get_text().isEmpty() )
     {
-        sal_uInt32 nValue = static_cast<sal_uInt32>(m_pNumHorizontal->GetValue());
+        sal_uInt32 nValue = static_cast<sal_uInt32>(m_xNumHorizontal->get_value());
         rAttrs.Put(makeSvx3DHorizontalSegmentsItem(nValue));
     }
     else
         rAttrs.InvalidateItem(SDRATTR_3DOBJ_HORZ_SEGS);
 
     //  Number of segments (vertical)
-    if( !m_pNumVertical->IsEmptyFieldValue() )
+    if( !m_xNumVertical->get_text().isEmpty() )
     {
-        sal_uInt32 nValue = static_cast<sal_uInt32>(m_pNumVertical->GetValue());
+        sal_uInt32 nValue = static_cast<sal_uInt32>(m_xNumVertical->get_value());
         rAttrs.Put(makeSvx3DVerticalSegmentsItem(nValue));
     }
     else
         rAttrs.InvalidateItem(SDRATTR_3DOBJ_VERT_SEGS);
 
     // Depth
-    if( !m_pMtrDepth->IsEmptyFieldValue() )
+    if( !m_xMtrDepth->get_text().isEmpty() )
     {
-        sal_uInt32 nValue = GetCoreValue(*m_pMtrDepth, ePoolUnit);
+        sal_uInt32 nValue = GetCoreValue(*m_xMtrDepth, ePoolUnit);
         rAttrs.Put(makeSvx3DDepthItem(nValue));
     }
     else
         rAttrs.InvalidateItem(SDRATTR_3DOBJ_DEPTH);
 
     // Double-sided
-    TriState eState = m_pBtnDoubleSided->GetState();
+    TriState eState = m_xBtnDoubleSided->get_state();
     if( eState != TRISTATE_INDET )
     {
         bool bValue = TRISTATE_TRUE == eState;
@@ -1714,27 +1717,27 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs )
         rAttrs.InvalidateItem(SDRATTR_3DOBJ_DOUBLE_SIDED);
 
     // Edge rounding
-    if( !m_pMtrPercentDiagonal->IsEmptyFieldValue() )
+    if( !m_xMtrPercentDiagonal->get_text().isEmpty() )
     {
-        sal_uInt16 nValue = static_cast<sal_uInt16>(m_pMtrPercentDiagonal->GetValue());
+        sal_uInt16 nValue = static_cast<sal_uInt16>(m_xMtrPercentDiagonal->get_value(FieldUnit::PERCENT));
         rAttrs.Put(makeSvx3DPercentDiagonalItem(nValue));
     }
     else

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list