summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-10-23 15:35:12 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-11-03 20:24:26 -0500
commitbbf1bcd9ad9cc0368aef4a4de41e9538f6ad91b0 (patch)
tree8c7f10c39e826bbec818b3bb9f66a427b8207351 /sc
parentc5e5699c80cfb32a164696a2c5144b5ccb0a91a9 (diff)
basic: String -> OUString in basicmanager
Change-Id: I6607bfe8b6bf4d29ffd01cd88a19af5e53d616b5
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/documen2.cxx7
-rw-r--r--sc/source/core/tool/interpr4.cxx11
-rw-r--r--sc/source/ui/docshell/docfunc.cxx12
-rw-r--r--sc/source/ui/docshell/macromgr.cxx6
4 files changed, 23 insertions, 13 deletions
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index c0e94665a3fa..0c54df362190 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -1004,11 +1004,12 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
SfxObjectShell* pSrcShell = pSrcDoc ? pSrcDoc->GetDocumentShell() : NULL;
if ( pSrcShell )
{
- rtl::OUString aLibName(RTL_CONSTASCII_USTRINGPARAM("Standard"));
+ rtl::OUString aLibName("Standard");
const BasicManager *pBasicManager = pSrcShell->GetBasicManager();
- if (pBasicManager && pBasicManager->GetName().Len() > 0)
+ if (pBasicManager && !pBasicManager->GetName().isEmpty() > 0)
+ {
aLibName = pSrcShell->GetBasicManager()->GetName();
-
+ }
rtl::OUString sCodeName;
rtl::OUString sSource;
uno::Reference< script::XLibraryContainer > xLibContainer = pSrcShell->GetBasicContainer();
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 4eb288cbefd7..85856993ba7d 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3091,24 +3091,27 @@ static uno::Any lcl_getSheetModule( const uno::Reference<table::XCellRange>& xCe
BasicManager* pBasMgr = pDok->GetDocumentShell()->GetBasicManager();
uno::Reference< uno::XInterface > xIf;
- if ( pBasMgr && pBasMgr->GetName().Len() )
+ if ( pBasMgr && !pBasMgr->GetName().isEmpty() )
{
String sProj = String( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
- if ( pDok->GetDocumentShell()->GetBasicManager()->GetName().Len() )
+ if ( !pDok->GetDocumentShell()->GetBasicManager()->GetName().isEmpty() )
+ {
sProj = pDok->GetDocumentShell()->GetBasicManager()->GetName();
+ }
StarBASIC* pBasic = pDok->GetDocumentShell()->GetBasicManager()->GetLib( sProj );
if ( pBasic )
{
SbModule* pMod = pBasic->FindModule( sCodeName );
if ( pMod )
+ {
xIf = pMod->GetUnoModule();
+ }
}
}
return uno::makeAny( xIf );
}
-static bool
-lcl_setVBARange( ScRange& aRange, ScDocument* pDok, SbxVariable* pPar )
+static bool lcl_setVBARange( ScRange& aRange, ScDocument* pDok, SbxVariable* pPar )
{
bool bOk = false;
try
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index e77f4caafef0..2c53a44e2a8c 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2651,9 +2651,11 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, const rtl::OUString& sModul
uno::Reference< container::XNameContainer > xLib;
if( xLibContainer.is() )
{
- String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
- if ( rDocSh.GetBasicManager() && rDocSh.GetBasicManager()->GetName().Len() )
+ String aLibName( "Standard" );
+ if ( rDocSh.GetBasicManager() && !rDocSh.GetBasicManager()->GetName().isEmpty() )
+ {
aLibName = rDocSh.GetBasicManager()->GetName();
+ }
uno::Any aLibAny = xLibContainer->getByName( aLibName );
aLibAny >>= xLib;
}
@@ -2697,9 +2699,11 @@ void VBA_DeleteModule( ScDocShell& rDocSh, const rtl::OUString& sModuleName )
uno::Reference< container::XNameContainer > xLib;
if( xLibContainer.is() )
{
- String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
- if ( rDocSh.GetBasicManager() && rDocSh.GetBasicManager()->GetName().Len() )
+ String aLibName( "Standard" );
+ if ( rDocSh.GetBasicManager() && !rDocSh.GetBasicManager()->GetName().isEmpty() )
+ {
aLibName = rDocSh.GetBasicManager()->GetName();
+ }
uno::Any aLibAny = xLibContainer->getByName( aLibName );
aLibAny >>= xLib;
}
diff --git a/sc/source/ui/docshell/macromgr.cxx b/sc/source/ui/docshell/macromgr.cxx
index f873b8c26942..66890f223942 100644
--- a/sc/source/ui/docshell/macromgr.cxx
+++ b/sc/source/ui/docshell/macromgr.cxx
@@ -143,12 +143,14 @@ void ScMacroManager::InitUserFuncData()
{
// Clear boost::unordered_map
mhFuncToVolatile.clear();
- String sProjectName( RTL_CONSTASCII_USTRINGPARAM("Standard") );
+ OUString sProjectName("Standard");
Reference< container::XContainer > xModuleContainer;
SfxObjectShell* pShell = mpDoc->GetDocumentShell();
- if ( pShell && pShell->GetBasicManager()->GetName().Len() > 0 )
+ if ( pShell && ! pShell->GetBasicManager()->GetName().isEmpty() > 0 )
+ {
sProjectName = pShell->GetBasicManager()->GetName();
+ }
try
{
Reference< script::XLibraryContainer > xLibraries( pShell->GetBasicContainer(), uno::UNO_QUERY_THROW );