summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh5.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell/docsh5.cxx')
-rw-r--r--sc/source/ui/docshell/docsh5.cxx60
1 files changed, 30 insertions, 30 deletions
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 368a1f39edd3..1bd3bfecbd53 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -924,37 +924,37 @@ sal_Bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, sal_Bool bCopy, s
}
sal_Bool bVbaEnabled = aDocument.IsInVBAMode();
- if ( bVbaEnabled )
- {
- String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
- Reference< XLibraryContainer > xLibContainer = GetBasicContainer();
- Reference< XVBACompatibility > xVBACompat( xLibContainer, UNO_QUERY );
-
- if ( xVBACompat.is() )
- {
- aLibName = xVBACompat->getProjectName();
- }
-
- SCTAB nTabToUse = nDestTab;
- if ( nDestTab == SC_TAB_APPEND )
- nTabToUse = aDocument.GetMaxTableNumber() - 1;
- String sCodeName;
- String sSource;
- Reference< XNameContainer > xLib;
- if( xLibContainer.is() )
- {
- com::sun::star::uno::Any aLibAny = xLibContainer->getByName( aLibName );
- aLibAny >>= xLib;
- }
- if( xLib.is() )
- {
- rtl::OUString sRTLSource;
- xLib->getByName( sSrcCodeName ) >>= sRTLSource;
- sSource = sRTLSource;
- }
- VBA_InsertModule( aDocument, nTabToUse, sCodeName, sSource );
- }
+ if ( bVbaEnabled )
+ {
+ String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
+ Reference< XLibraryContainer > xLibContainer = GetBasicContainer();
+ Reference< XVBACompatibility > xVBACompat( xLibContainer, UNO_QUERY );
+
+ if ( xVBACompat.is() )
+ {
+ aLibName = xVBACompat->getProjectName();
+ }
+
+ SCTAB nTabToUse = nDestTab;
+ if ( nDestTab == SC_TAB_APPEND )
+ nTabToUse = aDocument.GetMaxTableNumber() - 1;
+ String sCodeName;
+ String sSource;
+ Reference< XNameContainer > xLib;
+ if( xLibContainer.is() )
+ {
+ com::sun::star::uno::Any aLibAny = xLibContainer->getByName( aLibName );
+ aLibAny >>= xLib;
+ }
+ if( xLib.is() )
+ {
+ rtl::OUString sRTLSource;
+ xLib->getByName( sSrcCodeName ) >>= sRTLSource;
+ sSource = sRTLSource;
}
+ VBA_InsertModule( aDocument, nTabToUse, sCodeName, sSource );
+ }
+ }
Broadcast( ScTablesHint( SC_TAB_COPIED, nSrcTab, nDestTab ) );
}
else