diff options
author | Noel Power <noel.power@novell.com> | 2010-10-15 12:46:47 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2010-10-15 12:46:47 +0100 |
commit | 7d4ffef8b74cd9ac2959006bac8d5c582b313e61 (patch) | |
tree | 03dfa24e8d395c1147d9608a38eaad103a0fe028 | |
parent | a60cb510612032c5e421e1f3b74db38daba72d85 (diff) |
fix fdo#30856 remove VBAForm property and associated geometry hack
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 8 | ||||
-rw-r--r-- | basctl/source/dlged/dlgedobj.cxx | 38 |
2 files changed, 9 insertions, 37 deletions
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index c2fc07e054b2..244440823169 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -114,14 +114,6 @@ DialogWindow::DialogWindow( Window* pParent, const ScriptDocument& rDocument, St pEditor = new DlgEditor( rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() ); pEditor->SetWindow( this ); - // set vba mode on DialogModel ( allows it to work in 100thmm instead of MAP_APPFONT ) - if ( rDocument.isDocument() && rDocument.getDocument().is() ) - { - uno::Reference< script::vba::XVBACompatibility > xDocVBAMode( rDocument.getLibraryContainer( E_SCRIPTS ), uno::UNO_QUERY ); - uno::Reference< script::vba::XVBACompatibility > xDialogModelVBAMode( xDialogModel, uno::UNO_QUERY ); - if ( xDocVBAMode.is() && xDialogModelVBAMode.is() ) - xDialogModelVBAMode->setVBACompatibilityMode( xDocVBAMode->getVBACompatibilityMode() ); - } pEditor->SetDialog( xDialogModel ); // Undo einrichten diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index 738fb5f54449..769290fe0690 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -73,22 +73,6 @@ TYPEINIT1(DlgEdObj, SdrUnoObj); DBG_NAME(DlgEdObj); //---------------------------------------------------------------------------- -MapMode lcl_getMapModeForForm( DlgEdForm* pForm ) -{ - MapMode aMode( MAP_APPFONT ); //Default - try - { - uno::Reference< beans::XPropertySet > xProps( pForm ? pForm->GetUnoControlModel() : NULL, uno::UNO_QUERY_THROW ); - sal_Bool bVBAForm = sal_False; - xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("VBAForm") ) ) >>= bVBAForm; - if ( bVBAForm ) - aMode = MapMode( MAP_100TH_MM ); - } - catch ( Exception& ) - { - } - return aMode; -} DlgEdObj::DlgEdObj() :SdrUnoObj(String(), sal_False) @@ -209,9 +193,8 @@ bool DlgEdObj::TransformSdrToControlCoordinates( } // convert pixel to logic units - MapMode aConvMode = lcl_getMapModeForForm( pForm ); - aPos = pDevice->PixelToLogic( aPos, aConvMode ); - aSize = pDevice->PixelToLogic( aSize, aConvMode ); + aPos = pDevice->PixelToLogic( aPos, MAP_APPFONT ); + aSize = pDevice->PixelToLogic( aSize, MAP_APPFONT ); // set out parameters nXOut = aPos.Width(); @@ -258,10 +241,9 @@ bool DlgEdObj::TransformSdrToFormCoordinates( aSize.Width() -= aDeviceInfo.LeftInset + aDeviceInfo.RightInset; aSize.Height() -= aDeviceInfo.TopInset + aDeviceInfo.BottomInset; } - MapMode aConvMode = lcl_getMapModeForForm( pForm ); // convert pixel to logic units - aPos = pDevice->PixelToLogic( aPos, aConvMode ); - aSize = pDevice->PixelToLogic( aSize, aConvMode ); + aPos = pDevice->PixelToLogic( aPos, MAP_APPFONT ); + aSize = pDevice->PixelToLogic( aSize, MAP_APPFONT ); // set out parameters nXOut = aPos.Width(); @@ -303,10 +285,9 @@ bool DlgEdObj::TransformControlToSdrCoordinates( DBG_ASSERT( pDevice, "DlgEdObj::TransformControlToSdrCoordinates: missing default device!" ); if ( !pDevice ) return false; - MapMode aConvMode = lcl_getMapModeForForm( pForm ); - aPos = pDevice->LogicToPixel( aPos, aConvMode ); - aSize = pDevice->LogicToPixel( aSize, aConvMode ); - aFormPos = pDevice->LogicToPixel( aFormPos, aConvMode ); + aPos = pDevice->LogicToPixel( aPos, MAP_APPFONT ); + aSize = pDevice->LogicToPixel( aSize, MAP_APPFONT ); + aFormPos = pDevice->LogicToPixel( aFormPos, MAP_APPFONT ); // add form position aPos.Width() += aFormPos.Width(); @@ -356,9 +337,8 @@ bool DlgEdObj::TransformFormToSdrCoordinates( if ( !lcl_getDlgEdForm( this, pForm ) ) return false; - MapMode aConvMode = lcl_getMapModeForForm( pForm ); - aPos = pDevice->LogicToPixel( aPos, aConvMode ); - aSize = pDevice->LogicToPixel( aSize, aConvMode ); + aPos = pDevice->LogicToPixel( aPos, MAP_APPFONT ); + aSize = pDevice->LogicToPixel( aSize, MAP_APPFONT ); // take window borders into account Reference< beans::XPropertySet > xPSetForm( pForm->GetUnoControlModel(), UNO_QUERY ); |