summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-07-13 11:45:44 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-07-13 11:45:44 +0200
commit3c9e9a5529e0bb6cc257c272b7265072306a9cd6 (patch)
tree9751467568a8b746c3cc9e320fddc11ee846fffc /sc
parent4f2bb2516d901c8541bae8d2d63c18b2f58775ba (diff)
loplugin:oncevar: empty strings: sc
Change-Id: I8eca50560d9ce0a3be5ffe6a4a88cb0de5d5d451
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/documen2.cxx3
-rw-r--r--sc/source/core/data/document.cxx9
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx21
-rw-r--r--sc/source/filter/xml/xmlstyli.cxx3
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx3
-rw-r--r--sc/source/ui/docshell/docfunc.cxx3
-rw-r--r--sc/source/ui/docshell/docsh5.cxx3
-rw-r--r--sc/source/ui/unoobj/confuno.cxx3
-rw-r--r--sc/source/ui/vba/vbachart.cxx6
-rw-r--r--sc/source/ui/view/tabvwsh9.cxx3
-rw-r--r--sc/source/ui/view/viewdata.cxx3
11 files changed, 20 insertions, 40 deletions
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 7d089f2a3d79..3debe812dc0a 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -1094,7 +1094,6 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
{
aLibName = pSrcShell->GetBasicManager()->GetName();
}
- OUString sCodeName;
OUString sSource;
uno::Reference< script::XLibraryContainer > xLibContainer = pSrcShell->GetBasicContainer();
uno::Reference< container::XNameContainer > xLib;
@@ -1112,7 +1111,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
xLib->getByName( sSrcCodeName ) >>= sRTLSource;
sSource = sRTLSource;
}
- VBA_InsertModule( *this, nDestPos, sCodeName, sSource );
+ VBA_InsertModule( *this, nDestPos, OUString(), sSource );
}
}
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index b8c5db350e15..233422b12b13 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1957,11 +1957,10 @@ void ScDocument::InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSe
SharePooledResources(pSrcDoc);
- OUString aString;
for (SCTAB nTab = 0; nTab <= rTabSelection.GetLastSelected(); nTab++)
if ( rTabSelection.GetTableSelect( nTab ) )
{
- ScTable* pTable = new ScTable(this, nTab, aString, bColInfo, bRowInfo);
+ ScTable* pTable = new ScTable(this, nTab, OUString(), bColInfo, bRowInfo);
if (nTab < static_cast<SCTAB>(maTabs.size()))
maTabs[nTab] = pTable;
else
@@ -1998,12 +1997,11 @@ void ScDocument::InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2,
if (pSrcDoc->pShell->GetMedium())
maFileURL = pSrcDoc->pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
- OUString aString;
if ( nTab2 >= static_cast<SCTAB>(maTabs.size()))
maTabs.resize(nTab2 + 1, nullptr);
for (SCTAB nTab = nTab1; nTab <= nTab2; nTab++)
{
- ScTable* pTable = new ScTable(this, nTab, aString, bColInfo, bRowInfo);
+ ScTable* pTable = new ScTable(this, nTab, OUString(), bColInfo, bRowInfo);
maTabs[nTab] = pTable;
}
}
@@ -2016,7 +2014,6 @@ void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, bool bColInfo, bool bRowI
return;
}
- OUString aString;
if (nTab2 >= static_cast<SCTAB>(maTabs.size()))
{
maTabs.resize(nTab2+1,nullptr);
@@ -2025,7 +2022,7 @@ void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, bool bColInfo, bool bRowI
for (SCTAB nTab = nTab1; nTab <= nTab2; nTab++)
if (!maTabs[nTab])
{
- maTabs[nTab] = new ScTable(this, nTab, aString, bColInfo, bRowInfo);
+ maTabs[nTab] = new ScTable(this, nTab, OUString(), bColInfo, bRowInfo);
}
}
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index d341e582cac4..51b7c81d935c 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -2356,9 +2356,8 @@ void ScXMLExport::ExportAutoStyles_()
if (xTableProperties.is())
{
std::vector<XMLPropertyState> aPropStates(xTableStylesExportPropertySetMapper->Filter(xTableProperties));
- OUString sParent;
OUString sName( aTableIter->maName );
- GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TABLE_TABLE, sParent, aPropStates);
+ GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TABLE_TABLE, OUString(), aPropStates);
GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TABLE_TABLE, sName);
}
}
@@ -2394,18 +2393,16 @@ void ScXMLExport::ExportAutoStyles_()
if ( !aNoteIter->maStyleName.isEmpty() )
{
std::vector<XMLPropertyState> aPropStates(xShapeMapper->Filter(xShapeProperties));
- OUString sParent;
OUString sName( aNoteIter->maStyleName );
- GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_SD_GRAPHICS_ID, sParent, aPropStates);
+ GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_SD_GRAPHICS_ID, OUString(), aPropStates);
GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_SD_GRAPHICS_ID, sName);
}
if ( !aNoteIter->maTextStyle.isEmpty() )
{
std::vector<XMLPropertyState> aPropStates(
GetTextParagraphExport()->GetParagraphPropertyMapper()->Filter(xShapeProperties));
- OUString sParent;
OUString sName( aNoteIter->maTextStyle );
- GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_PARAGRAPH, sParent, aPropStates);
+ GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_PARAGRAPH, OUString(), aPropStates);
GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TEXT_PARAGRAPH, sName);
}
}
@@ -2439,9 +2436,8 @@ void ScXMLExport::ExportAutoStyles_()
if ( xParaProp.is() )
{
std::vector<XMLPropertyState> aPropStates(xParaPropMapper->Filter(xParaProp));
- OUString sParent;
OUString sName( aNoteParaIter->maName );
- GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_PARAGRAPH, sParent, aPropStates);
+ GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_PARAGRAPH, OUString(), aPropStates);
GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TEXT_PARAGRAPH, sName);
}
}
@@ -2476,9 +2472,8 @@ void ScXMLExport::ExportAutoStyles_()
pCursor->SetSelection( aNoteTextIter->maSelection );
std::vector<XMLPropertyState> aPropStates(xTextPropMapper->Filter(xCursorProp));
- OUString sParent;
OUString sName( aNoteTextIter->maName );
- GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_TEXT, sParent, aPropStates);
+ GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_TEXT, OUString(), aPropStates);
GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TEXT_TEXT, sName);
}
}
@@ -2510,9 +2505,8 @@ void ScXMLExport::ExportAutoStyles_()
pCursor->SetSelection( aTextIter->maSelection );
std::vector<XMLPropertyState> aPropStates(xTextPropMapper->Filter(xCursorProp));
- OUString sParent;
OUString sName( aTextIter->maName );
- GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_TEXT, sParent, aPropStates);
+ GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_TEXT, OUString(), aPropStates);
GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TEXT_TEXT, sName);
}
}
@@ -2544,9 +2538,8 @@ void ScXMLExport::ExportAutoStyles_()
std::vector<XMLPropertyState> aPropStates(xTableStylesExportPropertySetMapper->Filter(xTableProperties));
if(!aPropStates.empty())
{
- OUString sParent;
OUString sName;
- GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_TABLE, sParent, aPropStates);
+ GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_TABLE, OUString(), aPropStates);
aTableStyles.push_back(sName);
}
}
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index 49c00d6c9a86..305c7ad55ed8 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -404,11 +404,10 @@ ScCondFormatEntry* ScXMLMapContext::CreateConditionEntry()
}
ScConditionMode eMode = ScConditionEntry::GetModeFromApi(aParseResult.meOperator);
- OUString aNmsp1, aNmsp2;
ScDocument* pDoc = GetScImport().GetDocument();
ScCondFormatEntry* pEntry = new ScCondFormatEntry(eMode, aParseResult.maOperand1, aParseResult.maOperand2, pDoc, ScAddress(), msApplyStyle,
- aNmsp1, aNmsp2, eGrammar, eGrammar);
+ OUString(), OUString(), eGrammar, eGrammar);
pEntry->SetSrcString(msBaseCell);
return pEntry;
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index 23d9d55099f6..9369c617812b 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -607,8 +607,7 @@ ScFormatEntry* ScFormulaFrmtEntry::createFormulaEntry() const
if(aFormula.isEmpty())
return nullptr;
- OUString aExpr2;
- ScFormatEntry* pEntry = new ScCondFormatEntry(SC_COND_DIRECT, aFormula, aExpr2, mpDoc, maPos, maLbStyle->GetSelectEntry());
+ ScFormatEntry* pEntry = new ScCondFormatEntry(SC_COND_DIRECT, aFormula, OUString(), mpDoc, maPos, maLbStyle->GetSelectEntry());
return pEntry;
}
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 2872bedc1ac2..40a578e15a0f 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -3125,8 +3125,7 @@ bool ScDocFunc::InsertTable( SCTAB nTab, const OUString& rName, bool bRecord, bo
// Only insert vba modules if vba mode ( and not currently importing XML )
if( bInsertDocModule )
{
- OUString sSource, sCodeName;
- VBA_InsertModule( rDoc, nTab, sCodeName, sSource );
+ VBA_InsertModule( rDoc, nTab, OUString(), OUString() );
}
rDocShell.Broadcast( ScTablesHint( SC_TAB_INSERTED, nTab ) );
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index d247d39ab25d..5d3b3c46ac8b 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -940,7 +940,6 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec
SCTAB nTabToUse = nDestTab;
if ( nDestTab == SC_TAB_APPEND )
nTabToUse = aDocument.GetMaxTableNumber() - 1;
- OUString sCodeName;
OUString sSource;
try
{
@@ -958,7 +957,7 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec
catch ( const css::uno::Exception& )
{
}
- VBA_InsertModule( aDocument, nTabToUse, sCodeName, sSource );
+ VBA_InsertModule( aDocument, nTabToUse, OUString(), sSource );
}
}
Broadcast( ScTablesHint( SC_TAB_COPIED, nSrcTab, nDestTab ) );
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 857b9d1bac4d..1097d48b9f0b 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -151,9 +151,8 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
sal_Int64 nColor = 0;
if (aValue >>= nColor)
{
- OUString aColorName;
Color aColor(static_cast<sal_uInt32>(nColor));
- aViewOpt.SetGridColor(aColor, aColorName);
+ aViewOpt.SetGridColor(aColor, OUString());
}
}
else if ( aPropertyName == SC_UNO_SHOWPAGEBR )
diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx
index 1d48529ffb00..07fd2447b1f4 100644
--- a/sc/source/ui/vba/vbachart.cxx
+++ b/sc/source/ui/vba/vbachart.cxx
@@ -970,8 +970,7 @@ ScVbaChart::getStockUpDownValue(sal_Int32 _nUpDown, sal_Int32 _nNotUpDown)
}
catch (const uno::Exception&)
{
- OUString aTemp; // temporary needed for g++ 3.3.5
- script::BasicErrorException( aTemp, uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_BASIC_METHOD_FAILED), OUString() );
+ script::BasicErrorException( OUString(), uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_BASIC_METHOD_FAILED), OUString() );
}
return _nNotUpDown;
}
@@ -988,8 +987,7 @@ ScVbaChart::hasMarkers()
}
catch (const uno::Exception&)
{
- OUString aTemp; // temporary needed for g++ 3.3.5
- script::BasicErrorException( aTemp, uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_BASIC_METHOD_FAILED), OUString() );
+ script::BasicErrorException( OUString(), uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_BASIC_METHOD_FAILED), OUString() );
}
return bHasMarkers;
}
diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx
index 170e8be91777..bd59e6df9fa2 100644
--- a/sc/source/ui/view/tabvwsh9.cxx
+++ b/sc/source/ui/view/tabvwsh9.cxx
@@ -76,8 +76,7 @@ void ScTabViewShell::ExecGallery( SfxRequest& rReq )
Graphic aGraphic( pGalleryItem->GetGraphic() );
Point aPos = GetInsertPos();
- OUString aPath, aFilter;
- PasteGraphic( aPos, aGraphic, aPath, aFilter );
+ PasteGraphic( aPos, aGraphic, OUString(), OUString() );
}
else if ( nType == css::gallery::GalleryItemType::MEDIA )
{
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 66af78052f74..3eca76120b02 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2944,12 +2944,11 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
sal_Int64 nColor = 0;
if (rSettings[i].Value >>= nColor)
{
- OUString aColorName;
Color aColor(static_cast<sal_uInt32>(nColor));
// #i47435# set automatic grid color explicitly
if( aColor.GetColor() == COL_AUTO )
aColor.SetColor( SC_STD_GRIDCOLOR );
- pOptions->SetGridColor(aColor, aColorName);
+ pOptions->SetGridColor(aColor, OUString());
}
}
else if ( sName == SC_UNO_SHOWPAGEBR )