summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxprinter.cxx2
-rw-r--r--toolkit/source/awt/vclxwindows.cxx8
2 files changed, 3 insertions, 7 deletions
diff --git a/toolkit/source/awt/vclxprinter.cxx b/toolkit/source/awt/vclxprinter.cxx
index 5cef0d0c70b7..b5fbf456b876 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 ca4400e14526..e2814d23af30 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;