summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-13 08:47:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-14 08:26:14 +0200
commit9b5dad13b56bdde7c40970351af3da3a2c3c9350 (patch)
treeabfd4b02743a0e6a93c51c026f4c53f0e21100bc /sc/source/ui
parentfa71320329999c968feb16ff65be328b5b8ff5e4 (diff)
loplugin:stringadd look for unnecessary temporaries
which defeat the *StringConcat optimisation. Also make StringConcat conversions treat a nullptr as an empty string, to match the O*String(char*) constructors. Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b Reviewed-on: https://gerrit.libreoffice.org/80724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx2
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx2
-rw-r--r--sc/source/ui/navipi/content.cxx6
-rw-r--r--sc/source/ui/view/tabview5.cxx2
4 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 8e3db03ccca0..b6f3b065df45 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -679,7 +679,7 @@ void ScImportAsciiDlg::SetSeparators()
case ' ': pCkbSpace->Check(); break;
default:
pCkbOther->Check();
- pEdOther->SetText( pEdOther->GetText() + OUString( aSep[i] ) );
+ pEdOther->SetText( pEdOther->GetText() + OUStringLiteral1(aSep[i]) );
}
}
}
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 82333e4afbb3..a30c56ef0b00 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -1607,7 +1607,7 @@ IMPL_LINK(ScAcceptChgDlg, CommandHdl, const CommandEvent&, rCEvt, bool)
int nSortedCol = rTreeView.get_sort_column();
for (sal_Int32 i = 0; i < 5; ++i)
- m_xPopup->set_active(OString("calcsort") + OString::number(i), i == nSortedCol);
+ m_xPopup->set_active("calcsort" + OString::number(i), i == nSortedCol);
m_xPopup->set_sensitive("calcedit", false);
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 5c46df802295..c26808a26ece 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -636,7 +636,7 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
else
aEntry += pParentWindow->aStrNotActive;
++i;
- aDocMenu->InsertItem(i, aEntry, MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK, OString("document") + OString::number(i));
+ aDocMenu->InsertItem(i, aEntry, MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK, "document" + OString::number(i));
if ( !bHiddenDoc && aName == aManualDoc )
nPos = i;
}
@@ -644,7 +644,7 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
}
// "active window"
++i;
- aDocMenu->InsertItem(i, pParentWindow->aStrActiveWin, MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK, OString("document") + OString::number(i));
+ aDocMenu->InsertItem(i, pParentWindow->aStrActiveWin, MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK, "document" + OString::number(i));
if (!bHiddenDoc && aManualDoc.isEmpty())
nPos = i;
// hidden document
@@ -653,7 +653,7 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
OUString aEntry = aHiddenTitle;
aEntry += pParentWindow->aStrHidden;
++i;
- aDocMenu->InsertItem(i, aEntry, MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK, OString("document") + OString::number(i));
+ aDocMenu->InsertItem(i, aEntry, MenuItemBits::AUTOCHECK | MenuItemBits::RADIOCHECK, "document" + OString::number(i));
if (bHiddenDoc)
nPos = i;
}
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index 22afcdb908cd..b075b748f0e3 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -330,7 +330,7 @@ void ScTabView::TabChanged( bool bSameTabButMoved )
// Invalidate first
tools::Rectangle aRectangle(0, 0, 1000000000, 1000000000);
- OString sPayload = aRectangle.toString() + OString(", ") + OString::number(aViewData.GetTabNo());
+ OString sPayload = aRectangle.toString() + ", " + OString::number(aViewData.GetTabNo());
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, sPayload.getStr());
ScModelObj* pModel = comphelper::getUnoTunnelImplementation<ScModelObj>(pViewShell->GetCurrentDocument());