summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-08-26 22:59:12 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-08-27 08:00:32 +0200
commit9c8fd7d1c5553e1e50dba7c7c32ef15fcdb0b49d (patch)
tree345951559eba7aca1ead5ea9ff37450792a6833e /sc
parentClean up aEmpty (diff)
downloadcore-9c8fd7d1c5553e1e50dba7c7c32ef15fcdb0b49d.tar.gz
core-9c8fd7d1c5553e1e50dba7c7c32ef15fcdb0b49d.zip
Clean up sEmpty
Change-Id: If1b2bfe308caa2bce92e73d2c5c86ee273faed93
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/table3.cxx4
-rw-r--r--sc/source/filter/xml/XMLTableHeaderFooterContext.cxx15
-rw-r--r--sc/source/filter/xml/XMLTableHeaderFooterContext.hxx1
-rw-r--r--sc/source/filter/xml/XMLTrackedChangesContext.cxx3
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx8
-rw-r--r--sc/source/filter/xml/xmlimprt.hxx1
-rw-r--r--sc/source/filter/xml/xmlstyli.cxx6
-rw-r--r--sc/source/filter/xml/xmlstyli.hxx1
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx5
-rw-r--r--sc/source/ui/miscdlgs/solveroptions.cxx3
10 files changed, 20 insertions, 27 deletions
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 0287e66b924a..0b292e60ec22 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -106,7 +106,7 @@ bool SplitString( const OUString &sWhole,
i18n::LocaleDataItem aLocaleItem = ScGlobal::pLocaleData->getLocaleItem();
// Get prefix element
- OUString sEmpty, sUser = "-";
+ OUString sUser = "-";
ParseResult aPRPre = ScGlobal::pCharClass->parsePredefinedToken(
KParseType::IDENTNAME, sWhole, 0,
KParseTokens::ANY_LETTER, sUser, KParseTokens::ANY_LETTER, sUser );
@@ -120,7 +120,7 @@ bool SplitString( const OUString &sWhole,
sUser = aLocaleItem.decimalSeparator;
ParseResult aPRNum = ScGlobal::pCharClass->parsePredefinedToken(
KParseType::ANY_NUMBER, sWhole, aPRPre.EndPos,
- KParseTokens::ANY_NUMBER, sEmpty, KParseTokens::ANY_NUMBER, sUser );
+ KParseTokens::ANY_NUMBER, "", KParseTokens::ANY_NUMBER, sUser );
if ( aPRNum.EndPos == aPRPre.EndPos )
return false;
diff --git a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
index f88bf6e516b2..7606526ceced 100644
--- a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
+++ b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx
@@ -117,7 +117,7 @@ SvXMLImportContext *XMLTableHeaderFooterContext::CreateChildContext(
if( xHeaderFooterContent.is() )
{
uno::Reference < text::XText > xText(xHeaderFooterContent->getCenterText());
- xText->setString(sEmpty);
+ xText->setString("");
xTextCursor.set(xText->createTextCursor());
xOldTextCursor.set(GetImport().GetTextImport()->GetCursor());
GetImport().GetTextImport()->SetCursor( xTextCursor );
@@ -154,7 +154,7 @@ SvXMLImportContext *XMLTableHeaderFooterContext::CreateChildContext(
}
if (xText.is())
{
- xText->setString(sEmpty);
+ xText->setString("");
//SvXMLImport aSvXMLImport( GetImport() );
uno::Reference < text::XTextCursor > xTempTextCursor(xText->createTextCursor());
pContext = new XMLHeaderFooterRegionContext( GetImport(), nPrefix, rLocalName, xAttrList, xTempTextCursor);
@@ -176,7 +176,7 @@ void XMLTableHeaderFooterContext::EndElement()
if( GetImport().GetTextImport()->GetCursor()->goLeft( 1, true ) )
{
GetImport().GetTextImport()->GetText()->insertString(
- GetImport().GetTextImport()->GetCursorAsRange(), sEmpty,
+ GetImport().GetTextImport()->GetCursorAsRange(), "",
true );
}
GetImport().GetTextImport()->ResetCursor();
@@ -186,11 +186,11 @@ void XMLTableHeaderFooterContext::EndElement()
if (xHeaderFooterContent.is())
{
if (!bContainsLeft)
- xHeaderFooterContent->getLeftText()->setString(sEmpty);
+ xHeaderFooterContent->getLeftText()->setString("");
if (!bContainsCenter)
- xHeaderFooterContent->getCenterText()->setString(sEmpty);
+ xHeaderFooterContent->getCenterText()->setString("");
if (!bContainsRight)
- xHeaderFooterContent->getRightText()->setString(sEmpty);
+ xHeaderFooterContent->getRightText()->setString("");
xPropSet->setPropertyValue( sCont, uno::makeAny(xHeaderFooterContent) );
}
@@ -243,9 +243,8 @@ void XMLHeaderFooterRegionContext::EndElement()
//GetImport().GetTextImport()->GetCursor()->gotoEnd(sal_False);
if( GetImport().GetTextImport()->GetCursor()->goLeft( 1, true ) )
{
- OUString sEmpty;
GetImport().GetTextImport()->GetText()->insertString(
- GetImport().GetTextImport()->GetCursorAsRange(), sEmpty,
+ GetImport().GetTextImport()->GetCursorAsRange(), "",
true );
}
GetImport().GetTextImport()->ResetCursor();
diff --git a/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx b/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx
index abcc4687cecd..3f89046cf2e2 100644
--- a/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx
+++ b/sc/source/filter/xml/XMLTableHeaderFooterContext.hxx
@@ -43,7 +43,6 @@ class XMLTableHeaderFooterContext: public SvXMLImportContext
const OUString sShareContent;
const OUString sContent;
const OUString sContentLeft;
- const OUString sEmpty;
OUString sCont;
bool bDisplay;
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index 1499f34d7afc..9bed201e5277 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -1218,9 +1218,8 @@ void ScXMLChangeCellContext::EndElement()
//GetImport().GetTextImport()->GetCursor()->gotoEnd(sal_False);
if( GetImport().GetTextImport()->GetCursor()->goLeft( 1, sal_True ) )
{
- OUString sEmpty;
GetImport().GetTextImport()->GetText()->insertString(
- GetImport().GetTextImport()->GetCursorAsRange(), sEmpty,
+ GetImport().GetTextImport()->GetCursorAsRange(), "",
sal_True );
}
}
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 61953d7388c5..b92e56226288 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2899,7 +2899,7 @@ void ScXMLImport::SetStyleToRange(const ScRange& rRange, const OUString* pStyleN
if (pCurrency)
sPrevCurrency = *pCurrency;
else if (!sPrevCurrency.isEmpty())
- sPrevCurrency = sEmpty;
+ sPrevCurrency.clear();
}
else if ((nCellType != nPrevCellType) ||
((pStyleName && !pStyleName->equals(sPrevStyleName)) ||
@@ -2912,11 +2912,11 @@ void ScXMLImport::SetStyleToRange(const ScRange& rRange, const OUString* pStyleN
if (pStyleName)
sPrevStyleName = *pStyleName;
else if(!sPrevStyleName.isEmpty())
- sPrevStyleName = sEmpty;
+ sPrevStyleName.clear();
if (pCurrency)
sPrevCurrency = *pCurrency;
else if(!sPrevCurrency.isEmpty())
- sPrevCurrency = sEmpty;
+ sPrevCurrency.clear();
}
table::CellRangeAddress aCellRange;
aCellRange.StartColumn = rRange.aStart.Col();
@@ -2952,7 +2952,7 @@ ScMyStyleNumberFormats* ScXMLImport::GetStyleNumberFormats()
void ScXMLImport::SetStylesToRangesFinished()
{
SetStyleToRanges();
- sPrevStyleName = sEmpty;
+ sPrevStyleName.clear();
}
// XImporter
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index 413b78339038..ae5ffe1747f9 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -954,7 +954,6 @@ class ScXMLImport: public SvXMLImport, boost::noncopyable
com::sun::star::uno::Reference <com::sun::star::sheet::XSheetCellRangeContainer> xSheetCellRanges;
- OUString sEmpty;
OUString sPrevStyleName;
OUString sPrevCurrency;
sal_uInt32 nSolarMutexLocked;
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index 76056e1b3cec..0f9b7f26e7d5 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -1034,9 +1034,9 @@ void ScMasterPageContext::ClearContent(const OUString& rContent)
uno::Reference < sheet::XHeaderFooterContent > xHeaderFooterContent(xPropSet->getPropertyValue( rContent ), uno::UNO_QUERY);
if (xHeaderFooterContent.is())
{
- xHeaderFooterContent->getLeftText()->setString(sEmpty);
- xHeaderFooterContent->getCenterText()->setString(sEmpty);
- xHeaderFooterContent->getRightText()->setString(sEmpty);
+ xHeaderFooterContent->getLeftText()->setString("");
+ xHeaderFooterContent->getCenterText()->setString("");
+ xHeaderFooterContent->getRightText()->setString("");
xPropSet->setPropertyValue( rContent, uno::makeAny(xHeaderFooterContent) );
}
}
diff --git a/sc/source/filter/xml/xmlstyli.hxx b/sc/source/filter/xml/xmlstyli.hxx
index 10bf52a3ae6d..ca856bdd6d05 100644
--- a/sc/source/filter/xml/xmlstyli.hxx
+++ b/sc/source/filter/xml/xmlstyli.hxx
@@ -218,7 +218,6 @@ namespace com { namespace sun { namespace star {
class ScMasterPageContext : public XMLTextMasterPageContext
{
com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> xPropSet;
- const OUString sEmpty;
bool bContainsRightHeader;
bool bContainsRightFooter;
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 4f96f25bb65d..77afa8384287 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -324,7 +324,6 @@ bool ScXMLImportWrapper::Import( sal_uInt8 nMode, ErrCode& rError )
uno::Reference<xml::sax::XParser> xXMLParser = xml::sax::Parser::create(xContext);
// get filter
- OUString sEmpty;
uno::Reference<frame::XModel> xModel = mrDocShell.GetModel();
/** property map for export info set */
@@ -499,7 +498,7 @@ bool ScXMLImportWrapper::Import( sal_uInt8 nMode, ErrCode& rError )
xContext, xModel, xXMLParser, aParserInput,
bOasis ? OUString("com.sun.star.comp.Calc.XMLOasisSettingsImporter")
: OUString("com.sun.star.comp.Calc.XMLSettingsImporter"),
- "settings.xml", sEmpty, aSettingsArgs, false);
+ "settings.xml", "", aSettingsArgs, false);
SAL_INFO( "sc.filter", "settings import end" );
}
@@ -513,7 +512,7 @@ bool ScXMLImportWrapper::Import( sal_uInt8 nMode, ErrCode& rError )
bOasis ? OUString("com.sun.star.comp.Calc.XMLOasisStylesImporter")
: OUString("com.sun.star.comp.Calc.XMLStylesImporter"),
OUString("styles.xml"),
- sEmpty, aStylesArgs, true);
+ "", aStylesArgs, true);
SAL_INFO( "sc.filter", "styles import end" );
}
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index b539260f396a..5593a071a56a 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -247,7 +247,6 @@ void ScSolverOptionsDialog::FillListBox()
m_pLbSettings->SetUpdateMode(false);
m_pLbSettings->Clear();
- OUString sEmpty;
if (!mpCheckButtonData)
mpCheckButtonData = new SvLBoxButtonData(m_pLbSettings);
@@ -281,7 +280,7 @@ void ScSolverOptionsDialog::FillListBox()
// value entry
pEntry = new SvTreeListEntry;
pEntry->AddItem(std::unique_ptr<SvLBoxString>(
- new SvLBoxString(pEntry, 0, sEmpty))); // empty column
+ new SvLBoxString(pEntry, 0, ""))); // empty column
pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>(
new SvLBoxContextBmp(pEntry, 0, Image(), Image(), false)));
std::unique_ptr<ScSolverOptionsString> pItem(