diff options
-rw-r--r-- | vbahelper/source/msforms/vbacontrols.cxx | 5 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbadialogbase.cxx | 3 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbapagesetupbase.cxx | 8 |
3 files changed, 7 insertions, 9 deletions
diff --git a/vbahelper/source/msforms/vbacontrols.cxx b/vbahelper/source/msforms/vbacontrols.cxx index 7c56bd2bbff4..2b7c92374fcf 100644 --- a/vbahelper/source/msforms/vbacontrols.cxx +++ b/vbahelper/source/msforms/vbacontrols.cxx @@ -424,11 +424,10 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St void SAL_CALL ScVbaControls::Remove( const uno::Any& StringKeyOrIndex ) { - OUString aControlName; - sal_Int32 nIndex = -1; - try { + OUString aControlName; + sal_Int32 nIndex = -1; if ( !mxDialog.is() ) throw uno::RuntimeException(); diff --git a/vbahelper/source/vbahelper/vbadialogbase.cxx b/vbahelper/source/vbahelper/vbadialogbase.cxx index 605a9c76f7eb..6e5ae97857b1 100644 --- a/vbahelper/source/vbahelper/vbadialogbase.cxx +++ b/vbahelper/source/vbahelper/vbadialogbase.cxx @@ -25,10 +25,9 @@ using namespace ::com::sun::star; void SAL_CALL VbaDialogBase::Show() { - OUString aURL; if ( m_xModel.is() ) { - aURL = mapIndexToName( mnIndex ); + OUString aURL = mapIndexToName( mnIndex ); if( aURL.isEmpty() ) throw uno::RuntimeException( "Unable to open the specified dialog" ); diff --git a/vbahelper/source/vbahelper/vbapagesetupbase.cxx b/vbahelper/source/vbahelper/vbapagesetupbase.cxx index c29b166c69ca..d50fe188c193 100644 --- a/vbahelper/source/vbahelper/vbapagesetupbase.cxx +++ b/vbahelper/source/vbahelper/vbapagesetupbase.cxx @@ -38,7 +38,6 @@ double SAL_CALL VbaPageSetupBase::getTopMargin() try { bool headerOn = false; - sal_Int32 headerHeight = 0; uno::Any aValue = mxPageProps->getPropertyValue( "HeaderIsOn" ); aValue >>= headerOn; @@ -48,6 +47,7 @@ double SAL_CALL VbaPageSetupBase::getTopMargin() if( headerOn ) { + sal_Int32 headerHeight = 0; aValue = mxPageProps->getPropertyValue( "HeaderHeight" ); aValue >>= headerHeight; topMargin = topMargin + headerHeight; @@ -67,13 +67,13 @@ void SAL_CALL VbaPageSetupBase::setTopMargin( double margin ) try { bool headerOn = false; - sal_Int32 headerHeight = 0; uno::Any aValue = mxPageProps->getPropertyValue( "HeaderIsOn" ); aValue >>= headerOn; if( headerOn ) { + sal_Int32 headerHeight = 0; aValue = mxPageProps->getPropertyValue( "HeaderHeight" ); aValue >>= headerHeight; topMargin -= headerHeight; @@ -93,7 +93,6 @@ double SAL_CALL VbaPageSetupBase::getBottomMargin() try { bool footerOn = false; - sal_Int32 footerHeight = 0; uno::Any aValue = mxPageProps->getPropertyValue( "FooterIsOn" ); aValue >>= footerOn; @@ -103,6 +102,7 @@ double SAL_CALL VbaPageSetupBase::getBottomMargin() if( footerOn ) { + sal_Int32 footerHeight = 0; aValue = mxPageProps->getPropertyValue( "FooterHeight" ); aValue >>= footerHeight; bottomMargin += footerHeight; @@ -122,13 +122,13 @@ void SAL_CALL VbaPageSetupBase::setBottomMargin( double margin ) try { bool footerOn = false; - sal_Int32 footerHeight = 0; uno::Any aValue = mxPageProps->getPropertyValue( "FooterIsOn" ); aValue >>= footerOn; if( footerOn ) { + sal_Int32 footerHeight = 0; aValue = mxPageProps->getPropertyValue( "FooterHeight" ); aValue >>= footerHeight; bottomMargin -= footerHeight; |