summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-04 16:18:01 +0200
committerNoel Grandin <noel@peralex.com>2013-10-08 10:03:09 +0200
commit1d2f7047f2646394395749bbcfccf14f3753d55f (patch)
tree721ad7a4acf94ff66639129be204e620a3b93269 /sc
parente12ae54991b70027bbff21bb948c4923898d32eb (diff)
convert sc/source/ui/vba/*.cxx from String to OUString
Change-Id: If696cdf2293464dc2a21cab4bdc4f77223cf26c9
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/vba/excelvbahelper.cxx8
-rw-r--r--sc/source/ui/vba/vbacharacters.cxx4
-rw-r--r--sc/source/ui/vba/vbahelper.cxx4
-rw-r--r--sc/source/ui/vba/vbanames.cxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx2
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx13
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx2
7 files changed, 17 insertions, 18 deletions
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index 0d6d94e99f51..fd4994b8580f 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -303,7 +303,7 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >&
ScDocShell* pShell = excel::getDocShell( xModel );
if ( pShell )
{
- String aPrjName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
+ OUString aPrjName( "Standard" );
pShell->GetBasicManager()->SetName( aPrjName );
/* Set library container to VBA compatibility mode. This will create
@@ -328,10 +328,10 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >&
// set up the module info for the workbook and sheets in the nealy created
// spreadsheet
ScDocument* pDoc = pShell->GetDocument();
- String sCodeName = pDoc->GetCodeName();
- if ( sCodeName.Len() == 0 )
+ OUString sCodeName = pDoc->GetCodeName();
+ if ( sCodeName.isEmpty() )
{
- sCodeName = String( RTL_CONSTASCII_USTRINGPARAM("ThisWorkbook") );
+ sCodeName = "ThisWorkbook";
pDoc->SetCodeName( sCodeName );
}
diff --git a/sc/source/ui/vba/vbacharacters.cxx b/sc/source/ui/vba/vbacharacters.cxx
index 6d398cdfdddc..ca9d9ce3315b 100644
--- a/sc/source/ui/vba/vbacharacters.cxx
+++ b/sc/source/ui/vba/vbacharacters.cxx
@@ -93,9 +93,9 @@ ScVbaCharacters::setFont( const uno::Reference< excel::XFont >& /*_font*/ ) thro
// Methods
void SAL_CALL
-ScVbaCharacters::Insert( const OUString& String ) throw (css::uno::RuntimeException)
+ScVbaCharacters::Insert( const OUString& rString ) throw (css::uno::RuntimeException)
{
- m_xSimpleText->insertString( m_xTextRange, String, bReplace );
+ m_xSimpleText->insertString( m_xTextRange, rString, bReplace );
}
void SAL_CALL
diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx
index b9d0bf9f5c00..cc94e5aae872 100644
--- a/sc/source/ui/vba/vbahelper.cxx
+++ b/sc/source/ui/vba/vbahelper.cxx
@@ -574,8 +574,8 @@ ContainerUtilities::FieldInList( const uno::Sequence< OUString >& SearchList, co
}
bool NeedEsc(sal_Unicode cCode)
{
- String sEsc(".^$+\\|{}()");
- return (STRING_NOTFOUND != sEsc.Search(cCode));
+ OUString sEsc(".^$+\\|{}()");
+ return (-1 != sEsc.indexOf(cCode));
}
OUString VBAToRegexp(const OUString &rIn, bool bForLike )
diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx
index c0a9615eb2bd..eb1c4ab39662 100644
--- a/sc/source/ui/vba/vbanames.cxx
+++ b/sc/source/ui/vba/vbanames.cxx
@@ -217,7 +217,7 @@ ScVbaNames::Add( const css::uno::Any& Name ,
{
xArea.set( xRange->Areas( uno::makeAny( nArea ) ), uno::UNO_QUERY_THROW );
- String sRangeAdd = xArea->Address( xAny2, xAny2 , xAny2 , xAny2, xAny2 );
+ OUString sRangeAdd = xArea->Address( xAny2, xAny2 , xAny2 , xAny2, xAny2 );
if ( nArea > 1 )
sTmp += ",";
sTmp = sTmp + "'" + xRange->getWorksheet()->getName() + "'." + sRangeAdd;
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 30b92c3d6486..e09e96be8a24 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -3789,7 +3789,7 @@ double getDefaultCharWidth( ScDocShell* pDocShell )
::Font aDefFont;
pAttr->GetFont( aDefFont, SC_AUTOCOL_BLACK, pRefDevice );
pRefDevice->SetFont( aDefFont );
- long nCharWidth = pRefDevice->GetTextWidth( String( '0' ) ); // 1/100th mm
+ long nCharWidth = pRefDevice->GetTextWidth( OUString( '0' ) ); // 1/100th mm
return lcl_hmmToPoints( nCharWidth );
}
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index 690859d90976..b6750c7eb3e7 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -67,7 +67,7 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >&
ScDocShell* pShell = excel::getDocShell( xModel );
if ( pShell )
{
- String aPrjName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
+ OUString aPrjName( "Standard" );
pShell->GetBasicManager()->SetName( aPrjName );
/* Set library container to VBA compatibility mode. This will create
@@ -92,10 +92,10 @@ void setUpDocumentModules( const uno::Reference< sheet::XSpreadsheetDocument >&
// set up the module info for the workbook and sheets in the nealy created
// spreadsheet
ScDocument* pDoc = pShell->GetDocument();
- String sCodeName = pDoc->GetCodeName();
- if ( sCodeName.Len() == 0 )
+ OUString sCodeName = pDoc->GetCodeName();
+ if ( sCodeName.isEmpty() )
{
- sCodeName = String( RTL_CONSTASCII_USTRINGPARAM("ThisWorkbook") );
+ sCodeName = "ThisWorkbook";
pDoc->SetCodeName( sCodeName );
}
@@ -333,9 +333,8 @@ ScVbaWorkbooks::Open( const OUString& rFileName, const uno::Any& /*UpdateLinks*/
throw uno::RuntimeException("Expected value for Delimiter", uno::Reference< uno::XInterface >() );
OUString sStr;
Delimiter >>= sStr;
- String aUniStr( sStr );
- if ( aUniStr.Len() )
- nDelim = aUniStr.GetChar(0);
+ if ( !sStr.isEmpty() )
+ nDelim = sStr[0];
else
throw uno::RuntimeException("Incorrect value for Delimiter", uno::Reference< uno::XInterface >() );
}
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index bc04f26df62e..4a3545c2b286 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -269,7 +269,7 @@ ScVbaWorksheets::Add( const uno::Any& Before, const uno::Any& After,
nSheetIndex++;
SCTAB nSheetName = nCount + 1L;
- String aStringBase( RTL_CONSTASCII_USTRINGPARAM("Sheet") );
+ OUString aStringBase( "Sheet" );
uno::Any result;
for (SCTAB i=0; i < nNewSheets; i++, nSheetName++)
{