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 | |
parent | 8e399664b116ed8a9f953f018ace7e73d9733cc5 (diff) |
fix fdo#30856 remove VBAForm property and associated geometry hack
Diffstat (limited to 'toolkit/source')
-rw-r--r-- | toolkit/source/controls/dialogcontrol.cxx | 25 | ||||
-rw-r--r-- | toolkit/source/helper/property.cxx | 1 |
2 files changed, 4 insertions, 22 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(); } diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx index 28477c554618..9e49ed6bd316 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -286,7 +286,6 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_PROP_3 ( "SelectionModel", GRID_SELECTIONMODE, ::com::sun::star::view::SelectionType, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_2 ( "EnableVisible", ENABLEVISIBLE, sal_Bool, BOUND, MAYBEDEFAULT ), DECL_PROP_3 ( "ReferenceDevice", REFERENCE_DEVICE, Reference< XDevice >,BOUND, MAYBEDEFAULT, TRANSIENT ), - DECL_PROP_2 ( "VBAForm", VBAFORM, sal_Bool, BOUND, MAYBEDEFAULT ), DECL_PROP_3 ( "EvenRowBackgroundColor", GRID_EVEN_ROW_BACKGROUND, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_3 ( "HeaderBackgroundColor", GRID_HEADER_BACKGROUND, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_3 ( "GridLineColor", GRID_LINE_COLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), |