[Libreoffice-commits] .: sc/source
Takeshi Abe
tabe at kemper.freedesktop.org
Wed Feb 22 10:22:35 PST 2012
sc/source/filter/xml/XMLExportDatabaseRanges.cxx | 2
sc/source/ui/docshell/dbdocfun.cxx | 4 -
sc/source/ui/docshell/docsh5.cxx | 2
sc/source/ui/namedlg/namemgrtable.cxx | 2
sc/source/ui/undo/undoutil.cxx | 2
sc/source/ui/unoobj/chart2uno.cxx | 6 +-
sc/source/ui/vba/vbaapplication.cxx | 54 +++++++++++------------
7 files changed, 36 insertions(+), 36 deletions(-)
New commits:
commit dcd7dc43376c914027b76525959a9cea71d9279e
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Thu Feb 23 03:20:53 2012 +0900
avoid temporary rtl::OUString
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index a552ee9..8aab8b5 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -111,7 +111,7 @@ ScMyEmptyDatabaseRangesContainer ScXMLExportDatabaseRanges::GetEmptyDatabaseRang
sal_Int32 nLength = aImportProperties.getLength();
sheet::DataImportMode nSourceType = sheet::DataImportMode_NONE;
for (sal_Int32 j = 0; j < nLength; ++j)
- if (aImportProperties[j].Name == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_SRCTYPE)))
+ if (aImportProperties[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SC_UNONAME_SRCTYPE)))
aImportProperties[j].Value >>= nSourceType;
if (nSourceType != sheet::DataImportMode_NONE)
{
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 0461d2b..3266abe 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -89,7 +89,7 @@ bool ScDBDocFunc::AddDBRange( const ::rtl::OUString& rName, const ScRange& rRang
bool bOk;
if ( bCompile )
pDoc->CompileDBFormula( sal_True ); // CreateFormulaString
- if (rtl::OUString(rName)==rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(STR_DB_LOCAL_NONAME)))
+ if (rName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STR_DB_LOCAL_NONAME)))
{
pDoc->SetAnonymousDBData(rRange.aStart.Tab() , pNew);
bOk = true;
@@ -209,7 +209,7 @@ bool ScDBDocFunc::ModifyDBData( const ScDBData& rNewData )
bool bUndo = pDoc->IsUndoEnabled();
ScDBData* pData = NULL;
- if (rtl::OUString(rNewData.GetName())==rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(STR_DB_LOCAL_NONAME)))
+ if (rNewData.GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STR_DB_LOCAL_NONAME)))
{
ScRange aRange;
rNewData.GetArea(aRange);
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index b965d50..bbb1e7e 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -165,7 +165,7 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
SCCOL nOldCol2;
SCROW nOldRow2;
pData->GetArea( nDummy, nOldCol1,nOldRow1, nOldCol2,nOldRow2 );
- sal_Bool bIsNoName = ( rtl::OUString(pData->GetName()) == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(STR_DB_LOCAL_NONAME)) );
+ sal_Bool bIsNoName = ( pData->GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STR_DB_LOCAL_NONAME)) );
if (!bSelected)
{
diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx
index 2bc5189..b94d8ae 100644
--- a/sc/source/ui/namedlg/namemgrtable.cxx
+++ b/sc/source/ui/namedlg/namemgrtable.cxx
@@ -133,7 +133,7 @@ void ScRangeManagerTable::Init()
{
const ScRangeName* pLocalRangeName = itr->second;
ScRangeNameLine aLine;
- if (itr->first == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(STR_GLOBAL_RANGE_NAME)))
+ if (itr->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STR_GLOBAL_RANGE_NAME)))
aLine.aScope = maGlobalString;
else
aLine.aScope = itr->first;
diff --git a/sc/source/ui/undo/undoutil.cxx b/sc/source/ui/undo/undoutil.cxx
index bf4ac68..913333f 100644
--- a/sc/source/ui/undo/undoutil.cxx
+++ b/sc/source/ui/undo/undoutil.cxx
@@ -97,7 +97,7 @@ ScDBData* ScUndoUtil::GetOldDBData( ScDBData* pUndoData, ScDocument* pDoc, SCTAB
if ( pUndoData )
{
const ::rtl::OUString& aName = pUndoData->GetName();
- if (aName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(STR_DB_LOCAL_NONAME)))
+ if (aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STR_DB_LOCAL_NONAME)))
bWasTemp = true;
}
OSL_ENSURE(bWasTemp, "Undo: didn't find database range");
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 7e42f8d..90d1b07 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -1460,7 +1460,7 @@ ScChart2DataProvider::createDataSource(
for(sal_Int32 i = 0; i < aArguments.getLength(); ++i)
{
rtl::OUString sName(aArguments[i].Name);
- if (aArguments[i].Name == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataRowSource")))
+ if (aArguments[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DataRowSource")))
{
chart::ChartDataRowSource eSource = chart::ChartDataRowSource_COLUMNS;
if( ! (aArguments[i].Value >>= eSource))
@@ -1471,11 +1471,11 @@ ScChart2DataProvider::createDataSource(
}
bOrientCol = (eSource == chart::ChartDataRowSource_COLUMNS);
}
- else if (aArguments[i].Name == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FirstCellAsLabel")))
+ else if (aArguments[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FirstCellAsLabel")))
{
bLabel = ::cppu::any2bool(aArguments[i].Value);
}
- else if (aArguments[i].Name == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasCategories")))
+ else if (aArguments[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HasCategories")))
{
bCategories = ::cppu::any2bool(aArguments[i].Value);
}
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 9f5085f..b51623c 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1717,33 +1717,33 @@ ConvertCountryCode(const OUString& language)
{
sal_Int32 nCode = 0;
- if( language == OUString(RTL_CONSTASCII_USTRINGPARAM("ar")) ) nCode = 966; // Arabic
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("cs")) ) nCode = 42; // Czech
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("da")) ) nCode = 45; // Danish
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("de")) ) nCode = 49; // German
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("en")) ) nCode = 1; // English
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("es")) ) nCode = 34; // Spanish
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("el")) ) nCode = 30; // Greek
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("fa")) ) nCode = 98; // Persian = Farsi
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("fi")) ) nCode = 358; // Finnish
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("fr")) ) nCode = 33; // French
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("he")) ) nCode = 972; // Hebrew
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("hi")) ) nCode = 91; // Indian = Hindi
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("hu")) ) nCode = 36; // Hungarian
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("it")) ) nCode = 39; // Italian
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("ja")) ) nCode = 81; // Japanese
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("ko")) ) nCode = 82; // Korean
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("nl")) ) nCode = 31; // Dutch
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("no")) ) nCode = 47; // Norwegian
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("pl")) ) nCode = 48; // Polish
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("pt")) ) nCode = 351; // Portuguese
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("ru")) ) nCode = 7; // Russian
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("sv")) ) nCode = 46; // Swedish
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("th")) ) nCode = 66; // Thai
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("tk")) ) nCode = 90; // Turkish
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("ur")) ) nCode = 92; // Urdu
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("vi")) ) nCode = 84; // Vietnamese
- else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("zh")) ) nCode = 86; // Simplified Chinese
+ if( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ar")) ) nCode = 966; // Arabic
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("cs")) ) nCode = 42; // Czech
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("da")) ) nCode = 45; // Danish
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("de")) ) nCode = 49; // German
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("en")) ) nCode = 1; // English
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("es")) ) nCode = 34; // Spanish
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("el")) ) nCode = 30; // Greek
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("fa")) ) nCode = 98; // Persian = Farsi
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("fi")) ) nCode = 358; // Finnish
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("fr")) ) nCode = 33; // French
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("he")) ) nCode = 972; // Hebrew
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hi")) ) nCode = 91; // Indian = Hindi
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("hu")) ) nCode = 36; // Hungarian
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("it")) ) nCode = 39; // Italian
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ja")) ) nCode = 81; // Japanese
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ko")) ) nCode = 82; // Korean
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("nl")) ) nCode = 31; // Dutch
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("no")) ) nCode = 47; // Norwegian
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("pl")) ) nCode = 48; // Polish
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("pt")) ) nCode = 351; // Portuguese
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ru")) ) nCode = 7; // Russian
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sv")) ) nCode = 46; // Swedish
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("th")) ) nCode = 66; // Thai
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("tk")) ) nCode = 90; // Turkish
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ur")) ) nCode = 92; // Urdu
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("vi")) ) nCode = 84; // Vietnamese
+ else if ( language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")) ) nCode = 86; // Simplified Chinese
return nCode;
}
More information about the Libreoffice-commits
mailing list