summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2018-05-11 15:58:09 +0200
committerJulien Nabet <serval2412@yahoo.fr>2018-05-12 13:43:11 +0200
commitaa0cd609d3f7eee02a5f05a93cba060bb82184d5 (patch)
tree61ede7fce441d2020b8e1da855c84a9b7d8be610 /sc/source/ui/undo
parent2bc1758239dc3e76ef604fccf9d1c58eeba967e5 (diff)
Replace ScGlobal::GetRscString with simple ScResId calls
After the gettext migration there is no point to have two APIs for reading the same .mo file. This patch is for sc/source/ui/[m-u]* for easier review. Change-Id: I326902a89b8c65e32a42c3ebb55bea3609d32db6 Reviewed-on: https://gerrit.libreoffice.org/54136 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sc/source/ui/undo')
-rw-r--r--sc/source/ui/undo/undoblk.cxx39
-rw-r--r--sc/source/ui/undo/undoblk2.cxx9
-rw-r--r--sc/source/ui/undo/undoblk3.cxx35
-rw-r--r--sc/source/ui/undo/undocell.cxx29
-rw-r--r--sc/source/ui/undo/undocell2.cxx3
-rw-r--r--sc/source/ui/undo/undoconvert.cxx3
-rw-r--r--sc/source/ui/undo/undodat.cxx39
-rw-r--r--sc/source/ui/undo/undorangename.cxx5
-rw-r--r--sc/source/ui/undo/undosort.cxx3
-rw-r--r--sc/source/ui/undo/undostyl.cxx6
-rw-r--r--sc/source/ui/undo/undotab.cxx40
11 files changed, 110 insertions, 101 deletions
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index dbdfbbe35805..20632b5abd77 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -38,6 +38,7 @@
#include <stlpool.hxx>
#include <stlsheet.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <global.hxx>
#include <target.hxx>
#include <docpool.hxx>
@@ -100,7 +101,7 @@ ScUndoInsertCells::~ScUndoInsertCells()
OUString ScUndoInsertCells::GetComment() const
{
- return ScGlobal::GetRscString( pPasteUndo ? STR_UNDO_PASTE : STR_UNDO_INSERTCELLS );
+ return ScResId( pPasteUndo ? STR_UNDO_PASTE : STR_UNDO_INSERTCELLS );
}
bool ScUndoInsertCells::Merge( SfxUndoAction* pNextAction )
@@ -366,7 +367,7 @@ ScUndoDeleteCells::~ScUndoDeleteCells()
OUString ScUndoDeleteCells::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_DELETECELLS ); // "Delete"
+ return ScResId( STR_UNDO_DELETECELLS ); // "Delete"
}
void ScUndoDeleteCells::SetChangeTrack()
@@ -617,7 +618,7 @@ ScUndoDeleteMulti::~ScUndoDeleteMulti()
OUString ScUndoDeleteMulti::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_DELETECELLS ); // like DeleteCells
+ return ScResId( STR_UNDO_DELETECELLS ); // like DeleteCells
}
void ScUndoDeleteMulti::DoChange() const
@@ -792,7 +793,7 @@ ScUndoCut::~ScUndoCut()
OUString ScUndoCut::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_CUT ); // "cut"
+ return ScResId( STR_UNDO_CUT ); // "cut"
}
void ScUndoCut::SetChangeTrack()
@@ -909,7 +910,7 @@ ScUndoPaste::~ScUndoPaste()
OUString ScUndoPaste::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_PASTE ); // "paste"
+ return ScResId( STR_UNDO_PASTE ); // "paste"
}
void ScUndoPaste::SetChangeTrack()
@@ -1186,8 +1187,8 @@ ScUndoDragDrop::~ScUndoDragDrop()
OUString ScUndoDragDrop::GetComment() const
{ // "Move" : "Copy"
return bCut ?
- ScGlobal::GetRscString( STR_UNDO_MOVE ) :
- ScGlobal::GetRscString( STR_UNDO_COPY );
+ ScResId( STR_UNDO_MOVE ) :
+ ScResId( STR_UNDO_COPY );
}
void ScUndoDragDrop::SetChangeTrack()
@@ -1493,7 +1494,7 @@ ScUndoListNames::ScUndoListNames(ScDocShell* pNewDocShell, const ScRange& rRange
OUString ScUndoListNames::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_LISTNAMES );
+ return ScResId( STR_UNDO_LISTNAMES );
}
void ScUndoListNames::DoChange( ScDocument* pSrcDoc ) const
@@ -1549,7 +1550,7 @@ ScUndoConditionalFormat::~ScUndoConditionalFormat()
OUString ScUndoConditionalFormat::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_CONDFORMAT );
+ return ScResId( STR_UNDO_CONDFORMAT );
}
void ScUndoConditionalFormat::Undo()
@@ -1599,7 +1600,7 @@ ScUndoConditionalFormatList::~ScUndoConditionalFormatList()
OUString ScUndoConditionalFormatList::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_CONDFORMAT_LIST );
+ return ScResId( STR_UNDO_CONDFORMAT_LIST );
}
void ScUndoConditionalFormatList::Undo()
@@ -1668,7 +1669,7 @@ ScUndoUseScenario::~ScUndoUseScenario()
OUString ScUndoUseScenario::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_USESCENARIO );
+ return ScResId( STR_UNDO_USESCENARIO );
}
void ScUndoUseScenario::Undo()
@@ -1783,7 +1784,7 @@ ScUndoSelectionStyle::~ScUndoSelectionStyle()
OUString ScUndoSelectionStyle::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_APPLYCELLSTYLE );
+ return ScResId( STR_UNDO_APPLYCELLSTYLE );
}
void ScUndoSelectionStyle::DoChange( const bool bUndo )
@@ -1882,7 +1883,7 @@ ScUndoEnterMatrix::~ScUndoEnterMatrix()
OUString ScUndoEnterMatrix::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_ENTERMATRIX );
+ return ScResId( STR_UNDO_ENTERMATRIX );
}
void ScUndoEnterMatrix::SetChangeTrack()
@@ -1976,7 +1977,7 @@ ScUndoIndent::~ScUndoIndent()
OUString ScUndoIndent::GetComment() const
{
const char* pId = bIsIncrement ? STR_UNDO_INC_INDENT : STR_UNDO_DEC_INDENT;
- return ScGlobal::GetRscString(pId);
+ return ScResId(pId);
}
void ScUndoIndent::Undo()
@@ -2031,7 +2032,7 @@ ScUndoTransliterate::~ScUndoTransliterate()
OUString ScUndoTransliterate::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_TRANSLITERATE );
+ return ScResId( STR_UNDO_TRANSLITERATE );
}
void ScUndoTransliterate::Undo()
@@ -2094,7 +2095,7 @@ ScUndoClearItems::~ScUndoClearItems()
OUString ScUndoClearItems::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_DELETECONTENTS );
+ return ScResId( STR_UNDO_DELETECONTENTS );
}
void ScUndoClearItems::Undo()
@@ -2148,7 +2149,7 @@ ScUndoRemoveBreaks::~ScUndoRemoveBreaks()
OUString ScUndoRemoveBreaks::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_REMOVEBREAKS );
+ return ScResId( STR_UNDO_REMOVEBREAKS );
}
void ScUndoRemoveBreaks::Undo()
@@ -2217,7 +2218,7 @@ ScUndoRemoveMerge::~ScUndoRemoveMerge()
OUString ScUndoRemoveMerge::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_REMERGE ); // "remove merge"
+ return ScResId( STR_UNDO_REMERGE ); // "remove merge"
}
ScDocument* ScUndoRemoveMerge::GetUndoDoc()
@@ -2367,7 +2368,7 @@ ScUndoBorder::ScUndoBorder(ScDocShell* pNewDocShell,
OUString ScUndoBorder::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_SELATTRLINES ); //! own string?
+ return ScResId( STR_UNDO_SELATTRLINES ); //! own string?
}
void ScUndoBorder::Undo()
diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx
index 3b1c99a7d66e..f66cd92ac76d 100644
--- a/sc/source/ui/undo/undoblk2.cxx
+++ b/sc/source/ui/undo/undoblk2.cxx
@@ -25,6 +25,7 @@
#include <tabvwsh.hxx>
#include <olinetab.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <global.hxx>
#include <target.hxx>
@@ -69,12 +70,12 @@ OUString ScUndoWidthOrHeight::GetComment() const
// [ "optimal " ] "Column width" | "row height"
return ( bWidth ?
( ( eMode == SC_SIZE_OPTIMAL )?
- ScGlobal::GetRscString( STR_UNDO_OPTCOLWIDTH ) :
- ScGlobal::GetRscString( STR_UNDO_COLWIDTH )
+ ScResId( STR_UNDO_OPTCOLWIDTH ) :
+ ScResId( STR_UNDO_COLWIDTH )
) :
( ( eMode == SC_SIZE_OPTIMAL )?
- ScGlobal::GetRscString( STR_UNDO_OPTROWHEIGHT ) :
- ScGlobal::GetRscString( STR_UNDO_ROWHEIGHT )
+ ScResId( STR_UNDO_OPTROWHEIGHT ) :
+ ScResId( STR_UNDO_ROWHEIGHT )
) );
}
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 99973bd4d7e7..6d362573220f 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -35,6 +35,7 @@
#include <undoblk.hxx>
#include <sc.hrc>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <global.hxx>
#include <rangenam.hxx>
#include <arealink.hxx>
@@ -91,7 +92,7 @@ ScUndoDeleteContents::~ScUndoDeleteContents()
OUString ScUndoDeleteContents::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_DELETECONTENTS ); // "Delete"
+ return ScResId( STR_UNDO_DELETECONTENTS ); // "Delete"
}
void ScUndoDeleteContents::SetDataSpans( const std::shared_ptr<DataSpansType>& pSpans )
@@ -233,7 +234,7 @@ ScUndoFillTable::~ScUndoFillTable()
OUString ScUndoFillTable::GetComment() const
{
- return ScGlobal::GetRscString( STR_FILL_TAB );
+ return ScResId( STR_FILL_TAB );
}
void ScUndoFillTable::SetChangeTrack()
@@ -376,7 +377,7 @@ ScUndoSelectionAttr::~ScUndoSelectionAttr()
OUString ScUndoSelectionAttr::GetComment() const
{
//"Attribute" "/Lines"
- return ScGlobal::GetRscString( pLineOuter ? STR_UNDO_SELATTRLINES : STR_UNDO_SELATTR );
+ return ScResId( pLineOuter ? STR_UNDO_SELATTRLINES : STR_UNDO_SELATTR );
}
ScEditDataArray* ScUndoSelectionAttr::GetDataArray()
@@ -506,7 +507,7 @@ ScUndoAutoFill::~ScUndoAutoFill()
OUString ScUndoAutoFill::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_AUTOFILL ); //"Fill"
+ return ScResId( STR_UNDO_AUTOFILL ); //"Fill"
}
void ScUndoAutoFill::SetChangeTrack()
@@ -597,7 +598,7 @@ void ScUndoAutoFill::Redo()
nProgCount = aSource.aEnd.Row() - aSource.aStart.Row() + 1;
nProgCount *= nCount;
ScProgress aProgress( rDoc.GetDocumentShell(),
- ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount, true );
+ ScResId(STR_FILL_SERIES_PROGRESS), nProgCount, true );
rDoc.Fill( aSource.aStart.Col(), aSource.aStart.Row(),
aSource.aEnd.Col(), aSource.aEnd.Row(), &aProgress,
@@ -651,7 +652,7 @@ ScUndoMerge::~ScUndoMerge()
OUString ScUndoMerge::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_MERGE );
+ return ScResId( STR_UNDO_MERGE );
}
void ScUndoMerge::DoChange( bool bUndo ) const
@@ -783,7 +784,7 @@ ScUndoAutoFormat::~ScUndoAutoFormat()
OUString ScUndoAutoFormat::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_AUTOFORMAT ); //"Auto-Format"
+ return ScResId( STR_UNDO_AUTOFORMAT ); //"Auto-Format"
}
void ScUndoAutoFormat::Undo()
@@ -967,7 +968,7 @@ void ScUndoReplace::SetChangeTrack()
OUString ScUndoReplace::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_REPLACE ); // "Replace"
+ return ScResId( STR_UNDO_REPLACE ); // "Replace"
}
void ScUndoReplace::Undo()
@@ -1121,7 +1122,7 @@ ScUndoTabOp::~ScUndoTabOp()
OUString ScUndoTabOp::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_TABOP ); // "Multiple operation"
+ return ScResId( STR_UNDO_TABOP ); // "Multiple operation"
}
void ScUndoTabOp::Undo()
@@ -1215,9 +1216,9 @@ OUString ScUndoConversion::GetComment() const
OUString aText;
switch( maConvParam.GetType() )
{
- case SC_CONVERSION_SPELLCHECK: aText = ScGlobal::GetRscString( STR_UNDO_SPELLING ); break;
- case SC_CONVERSION_HANGULHANJA: aText = ScGlobal::GetRscString( STR_UNDO_HANGULHANJA ); break;
- case SC_CONVERSION_CHINESE_TRANSL: aText = ScGlobal::GetRscString( STR_UNDO_CHINESE_TRANSLATION ); break;
+ case SC_CONVERSION_SPELLCHECK: aText = ScResId( STR_UNDO_SPELLING ); break;
+ case SC_CONVERSION_HANGULHANJA: aText = ScResId( STR_UNDO_HANGULHANJA ); break;
+ case SC_CONVERSION_CHINESE_TRANSL: aText = ScResId( STR_UNDO_CHINESE_TRANSLATION ); break;
default: OSL_FAIL( "ScUndoConversion::GetComment - unknown conversion type" );
}
return aText;
@@ -1297,7 +1298,7 @@ ScUndoRefConversion::~ScUndoRefConversion()
OUString ScUndoRefConversion::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_ENTERDATA ); // "Input"
+ return ScResId( STR_UNDO_ENTERDATA ); // "Input"
}
void ScUndoRefConversion::SetChangeTrack()
@@ -1370,7 +1371,7 @@ ScUndoRefreshLink::ScUndoRefreshLink(ScDocShell* pNewDocShell,
OUString ScUndoRefreshLink::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_UPDATELINK );
+ return ScResId( STR_UNDO_UPDATELINK );
}
void ScUndoRefreshLink::Undo()
@@ -1501,7 +1502,7 @@ ScUndoInsertAreaLink::~ScUndoInsertAreaLink()
OUString ScUndoInsertAreaLink::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_INSERTAREALINK );
+ return ScResId( STR_UNDO_INSERTAREALINK );
}
void ScUndoInsertAreaLink::Undo()
@@ -1563,7 +1564,7 @@ ScUndoRemoveAreaLink::~ScUndoRemoveAreaLink()
OUString ScUndoRemoveAreaLink::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_REMOVELINK ); //! own text ??
+ return ScResId( STR_UNDO_REMOVELINK ); //! own text ??
}
void ScUndoRemoveAreaLink::Undo()
@@ -1633,7 +1634,7 @@ ScUndoUpdateAreaLink::ScUndoUpdateAreaLink( ScDocShell* pShell,
OUString ScUndoUpdateAreaLink::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_UPDATELINK ); //! own text ??
+ return ScResId( STR_UNDO_UPDATELINK ); //! own text ??
}
void ScUndoUpdateAreaLink::DoChange( const bool bUndo ) const
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index 16e022bfaea9..fc9015daff20 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -34,6 +34,7 @@
#include <docsh.hxx>
#include <tabvwsh.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <global.hxx>
#include <formulacell.hxx>
#include <target.hxx>
@@ -97,7 +98,7 @@ ScUndoCursorAttr::~ScUndoCursorAttr()
OUString ScUndoCursorAttr::GetComment() const
{
//! own text for automatic attribution
- return ScGlobal::GetRscString( STR_UNDO_CURSORATTR ); // "Attribute"
+ return ScResId( STR_UNDO_CURSORATTR ); // "Attribute"
}
void ScUndoCursorAttr::SetEditData( std::unique_ptr<EditTextObject> pOld, std::unique_ptr<EditTextObject> pNew )
@@ -179,7 +180,7 @@ ScUndoEnterData::ScUndoEnterData(
OUString ScUndoEnterData::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_ENTERDATA ); // "Input"
+ return ScResId( STR_UNDO_ENTERDATA ); // "Input"
}
void ScUndoEnterData::DoChange() const
@@ -316,7 +317,7 @@ ScUndoEnterValue::~ScUndoEnterValue()
OUString ScUndoEnterValue::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_ENTERDATA ); // "Input"
+ return ScResId( STR_UNDO_ENTERDATA ); // "Input"
}
void ScUndoEnterValue::SetChangeTrack()
@@ -420,7 +421,7 @@ bool ScUndoSetCell::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const
OUString ScUndoSetCell::GetComment() const
{
- return ScGlobal::GetRscString(STR_UNDO_ENTERDATA); // "Input"
+ return ScResId(STR_UNDO_ENTERDATA); // "Input"
}
void ScUndoSetCell::SetChangeTrack()
@@ -504,12 +505,12 @@ OUString ScUndoPageBreak::GetComment() const
//"Column break" | "Row break" "insert" | "delete"
return bColumn ?
( bInsert ?
- ScGlobal::GetRscString( STR_UNDO_INSCOLBREAK ) :
- ScGlobal::GetRscString( STR_UNDO_DELCOLBREAK )
+ ScResId( STR_UNDO_INSCOLBREAK ) :
+ ScResId( STR_UNDO_DELCOLBREAK )
) :
( bInsert ?
- ScGlobal::GetRscString( STR_UNDO_INSROWBREAK ) :
- ScGlobal::GetRscString( STR_UNDO_DELROWBREAK )
+ ScResId( STR_UNDO_INSROWBREAK ) :
+ ScResId( STR_UNDO_DELROWBREAK )
);
}
@@ -580,7 +581,7 @@ ScUndoPrintZoom::~ScUndoPrintZoom()
OUString ScUndoPrintZoom::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_PRINTSCALE );
+ return ScResId( STR_UNDO_PRINTSCALE );
}
void ScUndoPrintZoom::DoChange( bool bUndo )
@@ -650,7 +651,7 @@ ScUndoThesaurus::~ScUndoThesaurus() {}
OUString ScUndoThesaurus::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_THESAURUS ); // "Thesaurus"
+ return ScResId( STR_UNDO_THESAURUS ); // "Thesaurus"
}
void ScUndoThesaurus::SetChangeTrack( const ScCellValue& rOldCell )
@@ -789,7 +790,7 @@ bool ScUndoReplaceNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const
OUString ScUndoReplaceNote::GetComment() const
{
- return ScGlobal::GetRscString( maNewData.mxCaption ?
+ return ScResId( maNewData.mxCaption ?
(maOldData.mxCaption ? STR_UNDO_EDITNOTE : STR_UNDO_INSERTNOTE) : STR_UNDO_DELETENOTE );
}
@@ -861,7 +862,7 @@ bool ScUndoShowHideNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const
OUString ScUndoShowHideNote::GetComment() const
{
- return ScGlobal::GetRscString( mbShown ? STR_UNDO_SHOWNOTE : STR_UNDO_HIDENOTE );
+ return ScResId( mbShown ? STR_UNDO_SHOWNOTE : STR_UNDO_HIDENOTE );
}
ScUndoDetective::ScUndoDetective( ScDocShell* pNewDocShell,
@@ -899,7 +900,7 @@ OUString ScUndoDetective::GetComment() const
case SCDETOP_ADDERROR: pId = STR_UNDO_DETADDERROR; break;
}
- return ScGlobal::GetRscString(pId);
+ return ScResId(pId);
}
void ScUndoDetective::Undo()
@@ -986,7 +987,7 @@ ScUndoRangeNames::~ScUndoRangeNames()
OUString ScUndoRangeNames::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_RANGENAMES );
+ return ScResId( STR_UNDO_RANGENAMES );
}
void ScUndoRangeNames::DoChange( bool bUndo )
diff --git a/sc/source/ui/undo/undocell2.cxx b/sc/source/ui/undo/undocell2.cxx
index 125b9a767f38..da7c2ddaa0f1 100644
--- a/sc/source/ui/undo/undocell2.cxx
+++ b/sc/source/ui/undo/undocell2.cxx
@@ -9,6 +9,7 @@
#include <undocell.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <cellvalues.hxx>
namespace sc {
@@ -51,7 +52,7 @@ bool UndoSetCells::CanRepeat( SfxRepeatTarget& ) const
OUString UndoSetCells::GetComment() const
{
// "Input"
- return ScGlobal::GetRscString(STR_UNDO_ENTERDATA);
+ return ScResId(STR_UNDO_ENTERDATA);
}
void UndoSetCells::SetNewValues( const std::vector<double>& rVals )
diff --git a/sc/source/ui/undo/undoconvert.cxx b/sc/source/ui/undo/undoconvert.cxx
index 7778b2b745d5..ea9facfc22eb 100644
--- a/sc/source/ui/undo/undoconvert.cxx
+++ b/sc/source/ui/undo/undoconvert.cxx
@@ -9,6 +9,7 @@
#include <undoconvert.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <undoutil.hxx>
namespace sc {
@@ -21,7 +22,7 @@ UndoFormulaToValue::UndoFormulaToValue( ScDocShell* pDocSh, TableValues& rUndoVa
OUString UndoFormulaToValue::GetComment() const
{
- return ScGlobal::GetRscString(STR_UNDO_FORMULA_TO_VALUE);
+ return ScResId(STR_UNDO_FORMULA_TO_VALUE);
}
void UndoFormulaToValue::Undo()
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index f7ee7e4779b7..dddb262199ae 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -30,6 +30,7 @@
#include <rangenam.hxx>
#include <pivot.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <global.hxx>
#include <globalnames.hxx>
#include <target.hxx>
@@ -72,8 +73,8 @@ ScUndoDoOutline::~ScUndoDoOutline()
OUString ScUndoDoOutline::GetComment() const
{ // Show outline" "Hide outline"
return bShow ?
- ScGlobal::GetRscString( STR_UNDO_DOOUTLINE ) :
- ScGlobal::GetRscString( STR_UNDO_REDOOUTLINE );
+ ScResId( STR_UNDO_DOOUTLINE ) :
+ ScResId( STR_UNDO_REDOOUTLINE );
}
void ScUndoDoOutline::Undo()
@@ -160,8 +161,8 @@ ScUndoMakeOutline::~ScUndoMakeOutline()
OUString ScUndoMakeOutline::GetComment() const
{ // "Grouping" "Undo grouping"
return bMake ?
- ScGlobal::GetRscString( STR_UNDO_MAKEOUTLINE ) :
- ScGlobal::GetRscString( STR_UNDO_REMAKEOUTLINE );
+ ScResId( STR_UNDO_MAKEOUTLINE ) :
+ ScResId( STR_UNDO_REMAKEOUTLINE );
}
void ScUndoMakeOutline::Undo()
@@ -240,7 +241,7 @@ ScUndoOutlineLevel::ScUndoOutlineLevel( ScDocShell* pNewDocShell,
OUString ScUndoOutlineLevel::GetComment() const
{ // "Select outline level"
- return ScGlobal::GetRscString( STR_UNDO_OUTLINELEVEL );
+ return ScResId( STR_UNDO_OUTLINELEVEL );
}
void ScUndoOutlineLevel::Undo()
@@ -320,8 +321,8 @@ ScUndoOutlineBlock::ScUndoOutlineBlock( ScDocShell* pNewDocShell,
OUString ScUndoOutlineBlock::GetComment() const
{ // "Show outline" "Hide outline"
return bShow ?
- ScGlobal::GetRscString( STR_UNDO_DOOUTLINEBLK ) :
- ScGlobal::GetRscString( STR_UNDO_REDOOUTLINEBLK );
+ ScResId( STR_UNDO_DOOUTLINEBLK ) :
+ ScResId( STR_UNDO_REDOOUTLINEBLK );
}
void ScUndoOutlineBlock::Undo()
@@ -418,7 +419,7 @@ ScUndoRemoveAllOutlines::ScUndoRemoveAllOutlines(ScDocShell* pNewDocShell,
OUString ScUndoRemoveAllOutlines::GetComment() const
{ // "Remove outlines"
- return ScGlobal::GetRscString( STR_UNDO_REMOVEALLOTLNS );
+ return ScResId( STR_UNDO_REMOVEALLOTLNS );
}
void ScUndoRemoveAllOutlines::Undo()
@@ -499,7 +500,7 @@ ScUndoAutoOutline::ScUndoAutoOutline(ScDocShell* pNewDocShell,
OUString ScUndoAutoOutline::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_AUTOOUTLINE );
+ return ScResId( STR_UNDO_AUTOOUTLINE );
}
void ScUndoAutoOutline::Undo()
@@ -600,7 +601,7 @@ ScUndoSubTotals::ScUndoSubTotals(ScDocShell* pNewDocShell, SCTAB nNewTab,
OUString ScUndoSubTotals::GetComment() const
{ // "Subtotals"
- return ScGlobal::GetRscString( STR_UNDO_SUBTOTALS );
+ return ScResId( STR_UNDO_SUBTOTALS );
}
void ScUndoSubTotals::Undo()
@@ -731,7 +732,7 @@ ScUndoQuery::~ScUndoQuery()
OUString ScUndoQuery::GetComment() const
{ // "Filter";
- return ScGlobal::GetRscString( STR_UNDO_QUERY );
+ return ScResId( STR_UNDO_QUERY );
}
void ScUndoQuery::Undo()
@@ -888,7 +889,7 @@ ScUndoAutoFilter::~ScUndoAutoFilter()
OUString ScUndoAutoFilter::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_QUERY ); // same as ScUndoQuery
+ return ScResId( STR_UNDO_QUERY ); // same as ScUndoQuery
}
void ScUndoAutoFilter::DoChange( bool bUndo )
@@ -968,7 +969,7 @@ ScUndoDBData::~ScUndoDBData()
OUString ScUndoDBData::GetComment() const
{ // "Change database range";
- return ScGlobal::GetRscString( STR_UNDO_DBDATA );
+ return ScResId( STR_UNDO_DBDATA );
}
void ScUndoDBData::Undo()
@@ -1038,7 +1039,7 @@ ScUndoImportData::ScUndoImportData( ScDocShell* pNewDocShell, SCTAB nNewTab,
OUString ScUndoImportData::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_IMPORTDATA );
+ return ScResId( STR_UNDO_IMPORTDATA );
}
void ScUndoImportData::Undo()
@@ -1247,7 +1248,7 @@ ScUndoRepeatDB::ScUndoRepeatDB( ScDocShell* pNewDocShell, SCTAB nNewTab,
OUString ScUndoRepeatDB::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_REPEATDB );
+ return ScResId( STR_UNDO_REPEATDB );
}
void ScUndoRepeatDB::Undo()
@@ -1402,7 +1403,7 @@ OUString ScUndoDataPilot::GetComment() const
else
pResId = STR_UNDO_PIVOT_DELETE;
- return ScGlobal::GetRscString(pResId);
+ return ScResId(pResId);
}
void ScUndoDataPilot::Undo()
@@ -1543,7 +1544,7 @@ ScUndoConsolidate::ScUndoConsolidate( ScDocShell* pNewDocShell, const ScArea& rA
OUString ScUndoConsolidate::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_CONSOLIDATE );
+ return ScResId( STR_UNDO_CONSOLIDATE );
}
void ScUndoConsolidate::Undo()
@@ -1700,7 +1701,7 @@ ScUndoChartData::~ScUndoChartData()
OUString ScUndoChartData::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_CHARTDATA );
+ return ScResId( STR_UNDO_CHARTDATA );
}
void ScUndoChartData::Undo()
@@ -1758,7 +1759,7 @@ ScUndoDataForm::ScUndoDataForm( ScDocShell* pNewDocShell,
OUString ScUndoDataForm::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_PASTE );
+ return ScResId( STR_UNDO_PASTE );
}
void ScUndoDataForm::Undo()
diff --git a/sc/source/ui/undo/undorangename.cxx b/sc/source/ui/undo/undorangename.cxx
index 151b6586899a..eb195e466b2e 100644
--- a/sc/source/ui/undo/undorangename.cxx
+++ b/sc/source/ui/undo/undorangename.cxx
@@ -9,6 +9,7 @@
#include <undorangename.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <global.hxx>
#include <docfunc.hxx>
#include <sc.hrc>
@@ -63,7 +64,7 @@ bool ScUndoAllRangeNames::CanRepeat(SfxRepeatTarget& /*rTarget*/) const
OUString ScUndoAllRangeNames::GetComment() const
{
- return ScGlobal::GetRscString(STR_UNDO_RANGENAMES);
+ return ScResId(STR_UNDO_RANGENAMES);
}
void ScUndoAllRangeNames::DoChange(const std::map<OUString, std::unique_ptr<ScRangeName>>& rNames)
@@ -133,7 +134,7 @@ bool ScUndoAddRangeData::CanRepeat(SfxRepeatTarget& /*rTarget*/) const
OUString ScUndoAddRangeData::GetComment() const
{
- return ScGlobal::GetRscString(STR_UNDO_RANGENAMES);
+ return ScResId(STR_UNDO_RANGENAMES);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/undosort.cxx b/sc/source/ui/undo/undosort.cxx
index 4b1ec6bab60b..e881c09ea7d3 100644
--- a/sc/source/ui/undo/undosort.cxx
+++ b/sc/source/ui/undo/undosort.cxx
@@ -9,6 +9,7 @@
#include <undosort.hxx>
#include <globstr.hrc>
+#include <scresid.hxx>
#include <global.hxx>
#include <undoutil.hxx>
@@ -19,7 +20,7 @@ UndoSort::UndoSort( ScDocShell* pDocSh, const ReorderParam& rParam ) :
OUString UndoSort::GetComment() const
{
- return ScGlobal::GetRscString(STR_UNDO_SORT);
+ return ScResId(STR_UNDO_SORT);
}
void UndoSort::Undo()
diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx
index 4235136fadb7..9d1363faba60 100644
--- a/sc/source/ui/undo/undostyl.cxx
+++ b/sc/source/ui/undo/undostyl.cxx
@@ -28,7 +28,7 @@
#include <scmod.hxx>
#include <inputhdl.hxx>
#include <globstr.hrc>
-
+#include <scresid.hxx>
// modify style (cell or page style)
@@ -83,7 +83,7 @@ OUString ScUndoModifyStyle::GetComment() const
const char* pId = (eFamily == SfxStyleFamily::Para) ?
STR_UNDO_EDITCELLSTYLE :
STR_UNDO_EDITPAGESTYLE;
- return ScGlobal::GetRscString(pId);
+ return ScResId(pId);
}
static void lcl_DocStyleChanged( ScDocument* pDoc, const SfxStyleSheetBase* pStyle, bool bRemoved )
@@ -232,7 +232,7 @@ void ScUndoApplyPageStyle::AddSheetAction( SCTAB nTab, const OUString& rOldStyle
OUString ScUndoApplyPageStyle::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_APPLYPAGESTYLE );
+ return ScResId( STR_UNDO_APPLYPAGESTYLE );
}
void ScUndoApplyPageStyle::Undo()
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index a92a2270e59d..8b27f5b317ed 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -80,9 +80,9 @@ ScUndoInsertTab::~ScUndoInsertTab()
OUString ScUndoInsertTab::GetComment() const
{
if (bAppend)
- return ScGlobal::GetRscString( STR_UNDO_APPEND_TAB );
+ return ScResId( STR_UNDO_APPEND_TAB );
else
- return ScGlobal::GetRscString( STR_UNDO_INSERT_TAB );
+ return ScResId( STR_UNDO_INSERT_TAB );
}
void ScUndoInsertTab::SetChangeTrack()
@@ -172,7 +172,7 @@ ScUndoInsertTables::~ScUndoInsertTables()
OUString ScUndoInsertTables::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_INSERT_TAB );
+ return ScResId( STR_UNDO_INSERT_TAB );
}
void ScUndoInsertTables::SetChangeTrack()
@@ -261,7 +261,7 @@ ScUndoDeleteTab::~ScUndoDeleteTab()
OUString ScUndoDeleteTab::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_DELETE_TAB );
+ return ScResId( STR_UNDO_DELETE_TAB );
}
void ScUndoDeleteTab::SetChangeTrack()
@@ -422,7 +422,7 @@ ScUndoRenameTab::~ScUndoRenameTab()
OUString ScUndoRenameTab::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_RENAME_TAB );
+ return ScResId( STR_UNDO_RENAME_TAB );
}
void ScUndoRenameTab::DoChange( SCTAB nTabP, const OUString& rName ) const
@@ -484,7 +484,7 @@ ScUndoMoveTab::~ScUndoMoveTab()
OUString ScUndoMoveTab::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_MOVE_TAB );
+ return ScResId( STR_UNDO_MOVE_TAB );
}
void ScUndoMoveTab::DoChange( bool bUndo ) const
@@ -495,7 +495,7 @@ void ScUndoMoveTab::DoChange( bool bUndo ) const
if (bUndo) // UnDo
{
size_t i = mpNewTabs->size();
- std::unique_ptr<ScProgress> pProgress(new ScProgress(pDocShell , ScGlobal::GetRscString(STR_UNDO_MOVE_TAB),
+ std::unique_ptr<ScProgress> pProgress(new ScProgress(pDocShell , ScResId(STR_UNDO_MOVE_TAB),
i * rDoc.GetCodeCount(), true));
for (; i > 0; --i)
{
@@ -517,7 +517,7 @@ void ScUndoMoveTab::DoChange( bool bUndo ) const
else
{
size_t n = mpNewTabs->size();
- std::unique_ptr<ScProgress> pProgress(new ScProgress(pDocShell , ScGlobal::GetRscString(STR_UNDO_MOVE_TAB),
+ std::unique_ptr<ScProgress> pProgress(new ScProgress(pDocShell , ScResId(STR_UNDO_MOVE_TAB),
n * rDoc.GetCodeCount(), true));
for (size_t i = 0; i < n; ++i)
{
@@ -589,7 +589,7 @@ ScUndoCopyTab::~ScUndoCopyTab()
OUString ScUndoCopyTab::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_COPY_TAB );
+ return ScResId( STR_UNDO_COPY_TAB );
}
void ScUndoCopyTab::DoChange() const
@@ -730,8 +730,8 @@ ScUndoTabColor::~ScUndoTabColor()
OUString ScUndoTabColor::GetComment() const
{
if (aTabColorList.size() > 1)
- return ScGlobal::GetRscString(STR_UNDO_SET_MULTI_TAB_BG_COLOR);
- return ScGlobal::GetRscString(STR_UNDO_SET_TAB_BG_COLOR);
+ return ScResId(STR_UNDO_SET_MULTI_TAB_BG_COLOR);
+ return ScResId(STR_UNDO_SET_TAB_BG_COLOR);
}
void ScUndoTabColor::DoChange(bool bUndoType) const
@@ -796,7 +796,7 @@ ScUndoMakeScenario::~ScUndoMakeScenario()
OUString ScUndoMakeScenario::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_MAKESCENARIO );
+ return ScResId( STR_UNDO_MAKESCENARIO );
}
void ScUndoMakeScenario::Undo()
@@ -875,7 +875,7 @@ ScUndoImportTab::~ScUndoImportTab()
OUString ScUndoImportTab::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_INSERT_TAB );
+ return ScResId( STR_UNDO_INSERT_TAB );
}
void ScUndoImportTab::DoChange() const
@@ -1056,7 +1056,7 @@ ScUndoRemoveLink::~ScUndoRemoveLink()
OUString ScUndoRemoveLink::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_REMOVELINK );
+ return ScResId( STR_UNDO_REMOVELINK );
}
void ScUndoRemoveLink::DoChange( bool bLink ) const
@@ -1155,7 +1155,7 @@ OUString ScUndoShowHideTab::GetComment() const
pId = bShow ? STR_UNDO_SHOWTAB : STR_UNDO_HIDETAB;
}
- return ScGlobal::GetRscString(pId);
+ return ScResId(pId);
}
ScUndoDocProtect::ScUndoDocProtect(ScDocShell* pShell, unique_ptr<ScDocProtection> && pProtectSettings) :
@@ -1222,7 +1222,7 @@ bool ScUndoDocProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const
OUString ScUndoDocProtect::GetComment() const
{
const char* pId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_DOC : STR_UNDO_UNPROTECT_DOC;
- return ScGlobal::GetRscString(pId);
+ return ScResId(pId);
}
ScUndoTabProtect::ScUndoTabProtect(ScDocShell* pShell, SCTAB nTab, unique_ptr<ScTableProtection> && pProtectSettings) :
@@ -1290,7 +1290,7 @@ bool ScUndoTabProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const
OUString ScUndoTabProtect::GetComment() const
{
const char* pId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_TAB : STR_UNDO_UNPROTECT_TAB;
- return ScGlobal::GetRscString(pId);
+ return ScResId(pId);
}
ScUndoPrintRange::ScUndoPrintRange( ScDocShell* pShell, SCTAB nNewTab,
@@ -1351,7 +1351,7 @@ bool ScUndoPrintRange::CanRepeat(SfxRepeatTarget& /* rTarget */) const
OUString ScUndoPrintRange::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_PRINTRANGES );
+ return ScResId( STR_UNDO_PRINTRANGES );
}
ScUndoScenarioFlags::ScUndoScenarioFlags(ScDocShell* pNewDocShell, SCTAB nT,
@@ -1376,7 +1376,7 @@ ScUndoScenarioFlags::~ScUndoScenarioFlags()
OUString ScUndoScenarioFlags::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_EDITSCENARIO );
+ return ScResId( STR_UNDO_EDITSCENARIO );
}
void ScUndoScenarioFlags::Undo()
@@ -1551,7 +1551,7 @@ bool ScUndoLayoutRTL::CanRepeat(SfxRepeatTarget& rTarget) const
OUString ScUndoLayoutRTL::GetComment() const
{
- return ScGlobal::GetRscString( STR_UNDO_TAB_RTL );
+ return ScResId( STR_UNDO_TAB_RTL );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */