[Libreoffice-commits] core.git: Branch 'feature/vclptr' - 2 commits - include/toolkit include/vcl svtools/source toolkit/source vcl/source vcl/unx vcl/workben

Michael Meeks michael.meeks at collabora.com
Fri Apr 10 06:28:22 PDT 2015


 include/toolkit/awt/vclxprinter.hxx   |    2 +-
 include/vcl/field.hxx                 |    2 --
 svtools/source/contnr/imivctl1.cxx    |    4 ++--
 svtools/source/control/valueset.cxx   |    2 +-
 toolkit/source/awt/vclxprinter.cxx    |    2 +-
 toolkit/source/awt/vclxwindows.cxx    |    8 ++------
 vcl/source/app/dbggui.cxx             |    2 +-
 vcl/unx/gtk3/gdi/cairo_gtk3_cairo.hxx |    2 +-
 vcl/workben/vcldemo.cxx               |    8 ++++----
 9 files changed, 13 insertions(+), 19 deletions(-)

New commits:
commit 14168dfb75d5846ded49e15ab394b9934d9033df
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Apr 10 14:33:27 2015 +0100

    vcl cleanup post re-base.
    
    Change-Id: I2500a2079cd029505f404f34c9b3d9ec1961afbd

diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index 65baa30..cdc80d9 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -628,7 +628,6 @@ protected:
 
 public:
     explicit                DateField( vcl::Window* pParent, WinBits nWinStyle );
-    virtual                 ~DateField();
 
     virtual bool            PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
     virtual bool            Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
@@ -662,7 +661,6 @@ protected:
 
 public:
     explicit                TimeField( vcl::Window* pParent, WinBits nWinStyle );
-    virtual                 ~TimeField();
 
     virtual bool            PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
     virtual bool            Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 2216348..2ed5bf7 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -2084,8 +2084,8 @@ long SvxIconChoiceCtrl_Impl::CalcBoundingHeight( SvxIconChoiceCtrlEntry* pEntry
     if( nHeight > nMaxBoundHeight )
     {
         const_cast<SvxIconChoiceCtrl_Impl*>(this)->nMaxBoundHeight = nHeight;
-        const_cast<SvxIconChoiceCtrl_Impl*>(this)->aHorSBar.SetLineSize( GetScrollBarLineSize() );
-        const_cast<SvxIconChoiceCtrl_Impl*>(this)->aVerSBar.SetLineSize( GetScrollBarLineSize() );
+        const_cast<SvxIconChoiceCtrl_Impl*>(this)->aHorSBar->SetLineSize( GetScrollBarLineSize() );
+        const_cast<SvxIconChoiceCtrl_Impl*>(this)->aVerSBar->SetLineSize( GetScrollBarLineSize() );
     }
     return nHeight;
 }
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 98a0b95..844585b 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -135,7 +135,7 @@ void ValueSet::dispose()
         xComponent->dispose();
 
     ImplDeleteItems();
-    mpScrollBar.disposeAndClear();
+    mxScrollBar.disposeAndClear();
     Control::dispose();
 }
 
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index b421606..a3578fb 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -833,7 +833,7 @@ void DbgGUIStart()
 
     if ( pData )
     {
-        ScopedVclPtrInstance< DbgDialog > pDialog;
+        ScopedVclPtrInstance< DbgDialog > xDialog;
         // we switch off dialog tests for the debug dialog
         sal_uLong nOldFlags = pData->nTestFlags;
         pData->nTestFlags &= ~DBG_TEST_DIALOG;
diff --git a/vcl/unx/gtk3/gdi/cairo_gtk3_cairo.hxx b/vcl/unx/gtk3/gdi/cairo_gtk3_cairo.hxx
index dee313f..5bb12ea 100644
--- a/vcl/unx/gtk3/gdi/cairo_gtk3_cairo.hxx
+++ b/vcl/unx/gtk3/gdi/cairo_gtk3_cairo.hxx
@@ -37,7 +37,7 @@ namespace cairo {
         virtual CairoSurfaceSharedPtr getCairoSurface() const SAL_OVERRIDE { return mpSurface; }
         virtual SurfaceSharedPtr getSimilar(int nContentType, int width, int height) const SAL_OVERRIDE;
 
-        virtual boost::shared_ptr<VirtualDevice> createVirtualDevice() const SAL_OVERRIDE;
+        virtual VclPtr<VirtualDevice> createVirtualDevice() const SAL_OVERRIDE;
 
         virtual void flush() const SAL_OVERRIDE;
 
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index d2170b3..4220b7f 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1456,9 +1456,9 @@ class DemoWidgets : public WorkWindow
 public:
     DemoWidgets() :
         WorkWindow(NULL, WB_STDWORK),
-        mpBox(new VclVBox(this, false, 3)),
-        mpToolbox(new ToolBox(mpBox)),
-        mpButton(new PushButton(mpBox))
+        mpBox(VclPtrInstance<VclVBox>(this, false, 3)),
+        mpToolbox(VclPtrInstance<ToolBox>(mpBox)),
+        mpButton(VclPtrInstance<PushButton>(mpBox))
     {
         SetText("VCL widget demo");
 
@@ -1486,7 +1486,7 @@ public:
     {
         mpBox.disposeAndClear();
         mpToolbox.disposeAndClear();
-        mpPushButton.disposeAndClear();
+        mpButton.disposeAndClear();
         WorkWindow::dispose();
     }
     virtual void Paint(const Rectangle&) SAL_OVERRIDE
commit 4804ed902a00cf72f86caa75cb6b6a04ffd72493
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Apr 10 14:31:15 2015 +0100

    Fixup toolkit's printer code.
    
    Change-Id: I1d9b0cee1c04e853d38135b84c5c8db24538176e

diff --git a/include/toolkit/awt/vclxprinter.hxx b/include/toolkit/awt/vclxprinter.hxx
index 2c20ccd..a63f774 100644
--- a/include/toolkit/awt/vclxprinter.hxx
+++ b/include/toolkit/awt/vclxprinter.hxx
@@ -57,7 +57,7 @@ class VCLXPrinterPropertySet    :public VCLXPrinterPropertySet_Base
                                 ,public ::cppu::OPropertySetHelper
 {
 protected:
-    VclPtr<Printer>             mpPrinter;
+    VclPtr<Printer>             mxPrinter;
     ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice >  mxPrnDevice;
 
     sal_Int16                   mnOrientation;
diff --git a/toolkit/source/awt/vclxprinter.cxx b/toolkit/source/awt/vclxprinter.cxx
index 5cef0d0..b5fbf456 100644
--- a/toolkit/source/awt/vclxprinter.cxx
+++ b/toolkit/source/awt/vclxprinter.cxx
@@ -71,7 +71,7 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXPrinterPropertySet, VCLXPrinterPropertySet
 
 VCLXPrinterPropertySet::VCLXPrinterPropertySet( const OUString& rPrinterName )
     : OPropertySetHelper( BrdcstHelper )
-    , mxPrinter(std::make_shared<Printer>(rPrinterName))
+    , mxPrinter(VclPtrInstance< Printer >(rPrinterName))
 {
     SolarMutexGuard aSolarGuard;
 
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index ca4400e..e2814d2 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -262,10 +262,7 @@ void VCLXGraphicControl::setProperty( const OUString& PropertyName, const ::com:
             {
                 sal_Int16 nAlignment = sal_Int16();
                 if ( Value >>= nAlignment )
-                {
-                    Button* pButton = static_cast< Button* >( GetWindow() );
-                    pButton->SetImageAlign( static_cast< ImageAlign >( nAlignment ) );
-                }
+                    GetAs< Button >()->SetImageAlign( static_cast< ImageAlign >( nAlignment ) );
             }
         }
         break;
@@ -279,8 +276,7 @@ void VCLXGraphicControl::setProperty( const OUString& PropertyName, const ::com:
             {
                 sal_Int16 nImagePosition = 2;
                 OSL_VERIFY( Value >>= nImagePosition );
-                Button* pButton = static_cast< Button* >( GetWindow() );
-                pButton->SetImageAlign( ::toolkit::translateImagePosition( nImagePosition ) );
+                GetAs<Button>()->SetImageAlign( ::toolkit::translateImagePosition( nImagePosition ) );
             }
         }
         break;


More information about the Libreoffice-commits mailing list