summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-10 14:31:15 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 14:34:15 +0100
commit4804ed902a00cf72f86caa75cb6b6a04ffd72493 (patch)
treef31e606cc0add559506d4380364c1de808a5febf /toolkit
parentee33b094f6e02f8fcde2743c8d2ce400cfef64df (diff)
Fixup toolkit's printer code.
Change-Id: I1d9b0cee1c04e853d38135b84c5c8db24538176e
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;