summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-18 09:43:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-18 16:02:25 +0200
commit65ae6af9f460b1a28f3e07480347ff7f90adae38 (patch)
tree49bfeb1e25724d3b5539b7b5843d38b7531cf65f /sc
parentc7d1bb119d88faaafb53d65ad8907ede97d89c8c (diff)
loplugin:unusedvarsglobal
tackle some read-only vars. Mark some of them const to make it obvious they are not really used, and to make the constantparam plugin see more data. Change-Id: Ia25927745866746aa1aa9d5affd5857ad9f9ee24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100895 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/stlpool.cxx2
-rw-r--r--sc/source/filter/oox/querytablebuffer.cxx7
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx4
-rw-r--r--sc/source/ui/app/inputhdl.cxx5
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx7
5 files changed, 11 insertions, 14 deletions
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 8395315883f8..f2f337e56bad 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -212,7 +212,7 @@ void ScStyleSheetPool::CreateStandardStyles()
Color aColBlack ( COL_BLACK );
OUString aStr;
sal_Int32 nStrLen;
- OUString aHelpFile;//which text???
+ const OUString aHelpFile;//which text???
SfxItemSet* pSet = nullptr;
SfxItemSet* pHFSet = nullptr;
SvxSetItem* pHFSetItem = nullptr;
diff --git a/sc/source/filter/oox/querytablebuffer.cxx b/sc/source/filter/oox/querytablebuffer.cxx
index 8d5ec052d139..883e0cd90041 100644
--- a/sc/source/filter/oox/querytablebuffer.cxx
+++ b/sc/source/filter/oox/querytablebuffer.cxx
@@ -246,14 +246,13 @@ void QueryTable::finalizeImport()
PropertySet aDocProps( getDocument() );
Reference< XAreaLinks > xAreaLinks( aDocProps.getAnyProperty( PROP_AreaLinks ), UNO_QUERY_THROW );
CellAddress aDestPos( aDestRange.aStart.Tab(), aDestRange.aStart.Col(), aDestRange.aStart.Row() );
- OUString aFilterName = "calc_HTML_WebQuery";
- OUString aFilterOptions;
- xAreaLinks->insertAtPosition( aDestPos, aFileUrl, aTables, aFilterName, aFilterOptions );
+ const OUString aFilterName = "calc_HTML_WebQuery";
+ xAreaLinks->insertAtPosition( aDestPos, aFileUrl, aTables, aFilterName, /*aFilterOptions*/"" );
// set refresh interval (convert minutes to seconds)
sal_Int32 nRefreshPeriod = xConnection->getModel().mnInterval * 60;
if( nRefreshPeriod > 0 )
{
- PropertySet aPropSet( lclFindAreaLink( xAreaLinks, aDestRange.aStart, aFileUrl, aTables, aFilterName, aFilterOptions ) );
+ PropertySet aPropSet( lclFindAreaLink( xAreaLinks, aDestRange.aStart, aFileUrl, aTables, aFilterName, /*aFilterOptions*/"" ) );
aPropSet.setProperty( PROP_RefreshPeriod, nRefreshPeriod );
}
}
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 1c35e014a6c8..d2f7250f8a95 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -2142,7 +2142,7 @@ void ScXMLExport::AddStyleFromColumn(const uno::Reference<beans::XPropertySet>&
aItr->maValue >>= rIsVisible;
}
- OUString sParent;
+ const OUString sParent;
if (pOldName)
{
if (GetAutoStylePool()->AddNamed(*pOldName, XmlStyleFamily::TABLE_COLUMN, sParent, aPropStates))
@@ -2171,7 +2171,7 @@ void ScXMLExport::AddStyleFromRow(const uno::Reference<beans::XPropertySet>& xRo
if(aPropStates.empty())
return;
- OUString sParent;
+ const OUString sParent;
if (pOldName)
{
if (GetAutoStylePool()->AddNamed(*pOldName, XmlStyleFamily::TABLE_ROW, sParent, aPropStates))
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 1eda36788038..5ffe1d83d205 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3887,15 +3887,14 @@ void ScInputHandler::InputCommand( const CommandEvent& rCEvt )
if (eMode==SC_INPUT_NONE)
if (pTableView || pTopView)
{
- OUString aStrLoP;
if (pTableView)
{
- pTableView->GetEditEngine()->SetText( aStrLoP );
+ pTableView->GetEditEngine()->SetText( "" );
pTableView->SetSelection( ESelection(0,0, 0,0) );
}
if (pTopView)
{
- pTopView->GetEditEngine()->SetText( aStrLoP );
+ pTopView->GetEditEngine()->SetText( "" );
pTopView->SetSelection( ESelection(0,0, 0,0) );
}
}
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index c9221ac68b78..9726b70c4316 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -450,10 +450,9 @@ IMPL_LINK(ScPrintAreasDlg, Impl_BtnHdl, weld::Button&, rBtn, void)
{
if ( Impl_CheckRefStrings() )
{
- OUString aStr;
- SfxStringItem aPrintArea( SID_CHANGE_PRINTAREA, aStr );
- SfxStringItem aRepeatRow( FN_PARAM_2, aStr );
- SfxStringItem aRepeatCol( FN_PARAM_3, aStr );
+ SfxStringItem aPrintArea( SID_CHANGE_PRINTAREA, "" );
+ SfxStringItem aRepeatRow( FN_PARAM_2, "" );
+ SfxStringItem aRepeatCol( FN_PARAM_3, "" );
// Printing area changed?