diff options
author | Noel Power <noel.power@novell.com> | 2010-10-15 13:00:25 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2010-10-15 13:01:52 +0100 |
commit | c678b690a2c663739d8d364de1ddbf68928c5c83 (patch) | |
tree | 9922784cc00ffcc28e45bd5b9005ac2f8c6d6aec /toolkit/source/controls | |
parent | 8e399664b116ed8a9f953f018ace7e73d9733cc5 (diff) |
fix fdo#30856 remove VBAForm property and associated geometry hack
Diffstat (limited to 'toolkit/source/controls')
-rw-r--r-- | toolkit/source/controls/dialogcontrol.cxx | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 4e59d9b6e9a3..61081966be5b 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -290,8 +290,6 @@ UnoControlDialogModel::UnoControlDialogModel() aBool <<= (sal_Bool) sal_True; ImplRegisterProperty( BASEPROPERTY_MOVEABLE, aBool ); ImplRegisterProperty( BASEPROPERTY_CLOSEABLE, aBool ); - aBool <<= (sal_Bool) sal_False; - ImplRegisterProperty( BASEPROPERTY_VBAFORM, aBool ); } UnoControlDialogModel::UnoControlDialogModel( const UnoControlDialogModel& rModel ) @@ -1486,32 +1484,17 @@ void UnoDialogControl::ImplSetPosSize( Reference< XControl >& rxCtrl ) xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ) ) ) >>= nWidth; xP->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Height" ) ) ) >>= nHeight; - // Currentley we are simply using MAP_APPFONT ( for normal Dialogs ) - // and MAP_100TH_MM for imported Userforms - MapMode aMode( MAP_APPFONT ); - sal_Bool bVBAForm = sal_False; - Reference< XPropertySet > xDlgModelProps( getModel(), UNO_QUERY ); - if ( xDlgModelProps.is() ) - { - try - { - xDlgModelProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VBAForm" ) ) ) >>= bVBAForm; - } - catch( Exception& ) - { - } - } - if ( bVBAForm ) - aMode = MapMode( MAP_100TH_MM ); + // Currentley we are simply using MAP_APPFONT OutputDevice*pOutDev = Application::GetDefaultDevice(); + DBG_ASSERT( pOutDev, "Missing Default Device!" ); if ( pOutDev ) { ::Size aTmp( nX, nY ); - aTmp = pOutDev->LogicToPixel( aTmp, aMode ); + aTmp = pOutDev->LogicToPixel( aTmp, MAP_APPFONT ); nX = aTmp.Width(); nY = aTmp.Height(); aTmp = ::Size( nWidth, nHeight ); - aTmp = pOutDev->LogicToPixel( aTmp, aMode ); + aTmp = pOutDev->LogicToPixel( aTmp, MAP_APPFONT ); nWidth = aTmp.Width(); nHeight = aTmp.Height(); } |