diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-11-06 18:11:43 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-11-07 03:46:21 +0100 |
commit | cc59e69c6f2c95a4434623dfea9ab666de6ebe76 (patch) | |
tree | af2d28a7c336db5583c4d6a54e120c6608939305 /sc/source/ui/docshell/docfunc.cxx | |
parent | 128947050b4506bf1fd57d93fe249c476a184f61 (diff) |
String->OUString in ScDocument and follow up
Diffstat (limited to 'sc/source/ui/docshell/docfunc.cxx')
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index e8be035e8699..d2b6087057ef 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -2631,7 +2631,7 @@ script::ModuleInfo lcl_InitModuleInfo( SfxObjectShell& rDocSh, String& sModule ) return sModuleInfo; } -void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String& sSource ) +void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, const rtl::OUString& sModuleName, const rtl::OUString& sSource ) { SfxObjectShell& rDocSh = *rDoc.GetDocumentShell(); uno::Reference< script::XLibraryContainer > xLibContainer = rDocSh.GetBasicContainer(); @@ -2651,7 +2651,7 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String // if the Module with codename exists then find a new name sal_Int32 nNum = 0; String genModuleName; - if ( sModuleName.Len() ) + if ( !sModuleName.isEmpty() ) genModuleName = sModuleName; else { @@ -2663,7 +2663,7 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String uno::Any aSourceAny; rtl::OUString sTmpSource = sSource; - if ( sTmpSource.getLength() == 0 ) + if ( sTmpSource.isEmpty() ) sTmpSource = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Rem Attribute VBA_ModuleType=VBADocumentModule\nOption VBASupport 1\n" )); aSourceAny <<= sTmpSource; uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY ); @@ -2735,7 +2735,6 @@ sal_Bool ScDocFunc::InsertTable( SCTAB nTab, const String& rName, sal_Bool bReco if (pDoc->InsertTab( nTab, rName )) { - String sCodeName; if (bRecord) rDocShell.GetUndoManager()->AddUndoAction( new ScUndoInsertTab( &rDocShell, nTab, bAppend, rName)); @@ -2743,7 +2742,7 @@ sal_Bool ScDocFunc::InsertTable( SCTAB nTab, const String& rName, sal_Bool bReco // Only insert vba modules if vba mode ( and not currently importing XML ) if( bInsertDocModule ) { - String sSource; + rtl::OUString sSource, sCodeName; VBA_InsertModule( *pDoc, nTab, sCodeName, sSource ); } rDocShell.Broadcast( ScTablesHint( SC_TAB_INSERTED, nTab ) ); |