diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-19 13:18:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-05 09:39:11 +0200 |
commit | 14cfff500e93f0d6cbf8412065feea85c01ea81d (patch) | |
tree | 76e3fb8fbf2b0d8a12c8406d8cf994ea6a37aaff /sc/source/ui/undo | |
parent | d924ce30e0ca260682bd2aed192b8b1b2ca3e7c0 (diff) |
Pass context and resource string down to boost::locale separately
because this is often on a hot path, and we can avoid the splitting and
joining of strings like this.
Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/undo')
-rw-r--r-- | sc/source/ui/undo/undoblk.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/undo/undocell.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/undo/undodat.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/undo/undostyl.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/undo/undotab.cxx | 6 |
5 files changed, 7 insertions, 7 deletions
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 6706b19adc0b..438cacb4884d 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -1986,7 +1986,7 @@ ScUndoIndent::~ScUndoIndent() OUString ScUndoIndent::GetComment() const { - const char* pId = bIsIncrement ? STR_UNDO_INC_INDENT : STR_UNDO_DEC_INDENT; + TranslateId pId = bIsIncrement ? STR_UNDO_INC_INDENT : STR_UNDO_DEC_INDENT; return ScResId(pId); } diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx index 583e2dd4e832..8323cd824612 100644 --- a/sc/source/ui/undo/undocell.cxx +++ b/sc/source/ui/undo/undocell.cxx @@ -893,7 +893,7 @@ ScUndoDetective::~ScUndoDetective() OUString ScUndoDetective::GetComment() const { - const char* pId = STR_UNDO_DETDELALL; + TranslateId pId = STR_UNDO_DETDELALL; if ( !bIsDelete ) switch ( static_cast<ScDetOpType>(nAction) ) { diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx index cd92934d1b6c..5f6578f71ff1 100644 --- a/sc/source/ui/undo/undodat.cxx +++ b/sc/source/ui/undo/undodat.cxx @@ -1419,7 +1419,7 @@ ScUndoDataPilot::ScUndoDataPilot( ScDocShell* pNewDocShell, OUString ScUndoDataPilot::GetComment() const { - const char* pResId; + TranslateId pResId; if (xOldUndoDoc && xNewUndoDoc) pResId = STR_UNDO_PIVOT_MODIFY; else if (xNewUndoDoc) diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx index 9596edb07a01..f110d0190051 100644 --- a/sc/source/ui/undo/undostyl.cxx +++ b/sc/source/ui/undo/undostyl.cxx @@ -83,7 +83,7 @@ ScUndoModifyStyle::~ScUndoModifyStyle() OUString ScUndoModifyStyle::GetComment() const { - const char* pId = (eFamily == SfxStyleFamily::Para) ? + TranslateId pId = (eFamily == SfxStyleFamily::Para) ? STR_UNDO_EDITCELLSTYLE : STR_UNDO_EDITPAGESTYLE; return ScResId(pId); diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index e0def882cea6..28f8188b34b0 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -1138,7 +1138,7 @@ bool ScUndoShowHideTab::CanRepeat(SfxRepeatTarget& rTarget) const OUString ScUndoShowHideTab::GetComment() const { - const char* pId; + TranslateId pId; if (undoTabs.size() > 1) { pId = bShow ? STR_UNDO_SHOWTABS : STR_UNDO_HIDETABS; @@ -1214,7 +1214,7 @@ bool ScUndoDocProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const OUString ScUndoDocProtect::GetComment() const { - const char* pId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_DOC : STR_UNDO_UNPROTECT_DOC; + TranslateId pId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_DOC : STR_UNDO_UNPROTECT_DOC; return ScResId(pId); } @@ -1284,7 +1284,7 @@ bool ScUndoTabProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const OUString ScUndoTabProtect::GetComment() const { - const char* pId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_TAB : STR_UNDO_UNPROTECT_TAB; + TranslateId pId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_TAB : STR_UNDO_UNPROTECT_TAB; return ScResId(pId); } |