diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-04-02 09:34:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-04-02 14:53:49 +0100 |
commit | cf98d30de84e8ca8b45a83ac2319a09f9e70a2f7 (patch) | |
tree | 373172bfb55fba3e7c3695479b0649b13c5f7a3d /sw | |
parent | 2560e6bc6df31e97de50f857b6fd2a30f3e68bae (diff) |
refactor the Rewriter rules using enums
Diffstat (limited to 'sw')
37 files changed, 241 insertions, 223 deletions
diff --git a/sw/inc/SwRewriter.hxx b/sw/inc/SwRewriter.hxx index 36981e486a42..d1ce1e3454bb 100644 --- a/sw/inc/SwRewriter.hxx +++ b/sw/inc/SwRewriter.hxx @@ -33,11 +33,14 @@ #include <tools/string.hxx> #include <swdllapi.h> -extern SW_DLLPUBLIC String const UNDO_ARG1; -extern SW_DLLPUBLIC String const UNDO_ARG2; -extern SW_DLLPUBLIC String const UNDO_ARG3; +enum SwUndoArg +{ + UndoArg1, + UndoArg2, + UndoArg3 +}; -typedef std::pair<String, String> SwRewriteRule; +typedef std::pair<SwUndoArg, String> SwRewriteRule; class SW_DLLPUBLIC SwRewriter { @@ -48,7 +51,7 @@ public: SwRewriter(const SwRewriter & rSrc); ~SwRewriter(); - void AddRule(const String & rWhat, const String & rWith); + void AddRule(SwUndoArg eWhat, const String & rWith); String Apply(const String & rStr) const; }; diff --git a/sw/source/core/crsr/findcoll.cxx b/sw/source/core/crsr/findcoll.cxx index 2dfb63b0f2be..756e21698ba9 100644 --- a/sw/source/core/crsr/findcoll.cxx +++ b/sw/source/core/crsr/findcoll.cxx @@ -95,9 +95,9 @@ sal_uLong SwCursor::Find( const SwTxtFmtColl& rFmtColl, if (bStartUndo) { SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, rFmtColl.GetName()); - aRewriter.AddRule(UNDO_ARG2, SW_RES(STR_YIELDS)); - aRewriter.AddRule(UNDO_ARG3, pReplFmtColl->GetName()); + aRewriter.AddRule(UndoArg1, rFmtColl.GetName()); + aRewriter.AddRule(UndoArg2, SW_RES(STR_YIELDS)); + aRewriter.AddRule(UndoArg3, pReplFmtColl->GetName()); pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_UI_REPLACE_STYLE, &aRewriter ); diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index ae671ba0e066..5ca28ec3fd63 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -2076,7 +2076,7 @@ bool SwDoc::AcceptRedline( sal_uInt16 nPos, bool bCallDelete ) { SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, pTmp->GetDescr()); + aRewriter.AddRule(UndoArg1, pTmp->GetDescr()); GetIDocumentUndoRedo().StartUndo(UNDO_ACCEPT_REDLINE, &aRewriter); } @@ -2158,12 +2158,12 @@ bool SwDoc::AcceptRedline( const SwPaM& rPam, bool bCallDelete ) { SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, String::CreateFromInt32(nRet)); + aRewriter.AddRule(UndoArg1, String::CreateFromInt32(nRet)); aTmpStr = aRewriter.Apply(String(SW_RES(STR_N_REDLINES))); } SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, aTmpStr); + aRewriter.AddRule(UndoArg1, aTmpStr); GetIDocumentUndoRedo().EndUndo( UNDO_ACCEPT_REDLINE, &aRewriter ); } @@ -2186,7 +2186,7 @@ bool SwDoc::RejectRedline( sal_uInt16 nPos, bool bCallDelete ) { SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, pTmp->GetDescr()); + aRewriter.AddRule(UndoArg1, pTmp->GetDescr()); GetIDocumentUndoRedo().StartUndo(UNDO_REJECT_REDLINE, &aRewriter); } @@ -2268,12 +2268,12 @@ bool SwDoc::RejectRedline( const SwPaM& rPam, bool bCallDelete ) { SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, String::CreateFromInt32(nRet)); + aRewriter.AddRule(UndoArg1, String::CreateFromInt32(nRet)); aTmpStr = aRewriter.Apply(String(SW_RES(STR_N_REDLINES))); } SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, aTmpStr); + aRewriter.AddRule(UndoArg1, aTmpStr); GetIDocumentUndoRedo().EndUndo( UNDO_REJECT_REDLINE, &aRewriter ); } @@ -3809,7 +3809,7 @@ String SwRedline::GetDescr(sal_uInt16 nPos) aTmpStr += String(SW_RES(STR_END_QUOTE)); SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, aTmpStr); + aRewriter.AddRule(UndoArg1, aTmpStr); aResult = aRewriter.Apply(aResult); diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index 67deb434ebd3..70c7339240e4 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -126,7 +126,7 @@ long SwEditShell::Delete() if( bUndo ) // mehr als eine Selection ? { SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, String(SW_RES(STR_MULTISEL))); + aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_MULTISEL)); GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_DELETE, &aRewriter); } diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 2e5bc4daca62..8393a8034c2d 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -73,7 +73,7 @@ void SwEditShell::SetTxtFmtColl( SwTxtFmtColl *pFmt, StartAllAction(); SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, pLocal->GetName()); + aRewriter.AddRule(UndoArg1, pLocal->GetName()); GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_SETFMTCOLL, &aRewriter); FOREACHPAM_START(this) diff --git a/sw/source/core/undo/SwRewriter.cxx b/sw/source/core/undo/SwRewriter.cxx index e01aedcc77a0..9eda961f450f 100644 --- a/sw/source/core/undo/SwRewriter.cxx +++ b/sw/source/core/undo/SwRewriter.cxx @@ -50,9 +50,9 @@ SwRewriter::~SwRewriter() { } -void SwRewriter::AddRule(const String & rWhat, const String & rWith) +void SwRewriter::AddRule(SwUndoArg eWhat, const String & rWith) { - SwRewriteRule aRule(rWhat, rWith); + SwRewriteRule aRule(eWhat, rWith); vector<SwRewriteRule>::iterator aIt; @@ -64,15 +64,4 @@ void SwRewriter::AddRule(const String & rWhat, const String & rWith) mRules.push_back(aRule); } -String SwRewriter::Apply(const String & rStr) const -{ - String aResult = rStr; - vector<SwRewriteRule>::const_iterator aIt; - - for (aIt = mRules.begin(); aIt != mRules.end(); ++aIt) - aResult.SearchAndReplaceAll(aIt->first, aIt->second); - - return aResult; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/undo/SwUndoFmt.cxx b/sw/source/core/undo/SwUndoFmt.cxx index 0464950f555b..3dfb373cb3d6 100644 --- a/sw/source/core/undo/SwUndoFmt.cxx +++ b/sw/source/core/undo/SwUndoFmt.cxx @@ -102,7 +102,7 @@ SwRewriter SwUndoFmtCreate::GetRewriter() const SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, sNewName); + aRewriter.AddRule(UndoArg1, sNewName); return aRewriter; } @@ -152,7 +152,7 @@ SwRewriter SwUndoFmtDelete::GetRewriter() const { SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, sOldName); + aRewriter.AddRule(UndoArg1, sOldName); return aRewriter; } @@ -195,9 +195,9 @@ SwRewriter SwUndoRenameFmt::GetRewriter() const { SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, sOldName); - aRewriter.AddRule(UNDO_ARG2, SW_RES(STR_YIELDS)); - aRewriter.AddRule(UNDO_ARG3, sNewName); + aRewriter.AddRule(UndoArg1, sOldName); + aRewriter.AddRule(UndoArg2, SW_RES(STR_YIELDS)); + aRewriter.AddRule(UndoArg3, sNewName); return aRewriter; } @@ -398,7 +398,7 @@ SwRewriter SwUndoNumruleCreate::GetRewriter() const bInitialized = true; } - aResult.AddRule(UNDO_ARG1, aNew.GetName()); + aResult.AddRule(UndoArg1, aNew.GetName()); return aResult; } @@ -423,7 +423,7 @@ SwRewriter SwUndoNumruleDelete::GetRewriter() const { SwRewriter aResult; - aResult.AddRule(UNDO_ARG1, aOld.GetName()); + aResult.AddRule(UndoArg1, aOld.GetName()); return aResult; } @@ -450,9 +450,9 @@ SwRewriter SwUndoNumruleRename::GetRewriter() const { SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, aOldName); - aRewriter.AddRule(UNDO_ARG2, SW_RES(STR_YIELDS)); - aRewriter.AddRule(UNDO_ARG3, aNewName); + aRewriter.AddRule(UndoArg1, aOldName); + aRewriter.AddRule(UndoArg2, SW_RESSTR(STR_YIELDS)); + aRewriter.AddRule(UndoArg3, aNewName); return aRewriter; } diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx index ef85c9c1fdd1..a48414d496ad 100644 --- a/sw/source/core/undo/SwUndoPageDesc.cxx +++ b/sw/source/core/undo/SwUndoPageDesc.cxx @@ -312,9 +312,9 @@ SwRewriter SwUndoPageDesc::GetRewriter() const { SwRewriter aResult; - aResult.AddRule(UNDO_ARG1, aOld.GetName()); - aResult.AddRule(UNDO_ARG2, SW_RES(STR_YIELDS)); - aResult.AddRule(UNDO_ARG3, aNew.GetName()); + aResult.AddRule(UndoArg1, aOld.GetName()); + aResult.AddRule(UndoArg2, SW_RESSTR(STR_YIELDS)); + aResult.AddRule(UndoArg3, aNew.GetName()); return aResult; } @@ -367,9 +367,9 @@ SwRewriter SwUndoPageDescCreate::GetRewriter() const SwRewriter aResult; if (pDesc) - aResult.AddRule(UNDO_ARG1, pDesc->GetName()); + aResult.AddRule(UndoArg1, pDesc->GetName()); else - aResult.AddRule(UNDO_ARG1, aNew.GetName()); + aResult.AddRule(UndoArg1, aNew.GetName()); return aResult; @@ -412,7 +412,7 @@ SwRewriter SwUndoPageDescDelete::GetRewriter() const { SwRewriter aResult; - aResult.AddRule(UNDO_ARG1, aOld.GetName()); + aResult.AddRule(UndoArg1, aOld.GetName()); return aResult; } diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index cb3c03521abb..309fbe9726ca 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -406,7 +406,7 @@ SwRewriter SwUndoFmtAttr::GetRewriter() const if (m_pFmt) { - aRewriter.AddRule(UNDO_ARG1, m_pFmt->GetName()); + aRewriter.AddRule(UndoArg1, m_pFmt->GetName()); } return aRewriter; diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx index 6215f8f7d034..62d8ab9cafe6 100644 --- a/sw/source/core/undo/unbkmk.cxx +++ b/sw/source/core/undo/unbkmk.cxx @@ -77,7 +77,7 @@ SwRewriter SwUndoBookmark::GetRewriter() const { SwRewriter aResult; - aResult.AddRule(UNDO_ARG1, m_pHistoryBookmark->GetName()); + aResult.AddRule(UndoArg1, m_pHistoryBookmark->GetName()); return aResult; } diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index f6105b42a38e..4f88c79ba007 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -52,6 +52,7 @@ #include <fmtfld.hxx> #include <comcore.hrc> // #111827# #include <undo.hrc> +#include <vector> // DELETE @@ -532,7 +533,7 @@ static SwRewriter lcl_RewriterFromHistory(SwHistory & rHistory) if (aDescr.Len() > 0) { - aRewriter.AddRule(UNDO_ARG2, aDescr); + aRewriter.AddRule(UndoArg2, aDescr); bDone = true; break; @@ -541,12 +542,120 @@ static SwRewriter lcl_RewriterFromHistory(SwHistory & rHistory) if (! bDone) { - aRewriter.AddRule(UNDO_ARG2, SW_RES(STR_FIELD)); + aRewriter.AddRule(UndoArg2, SW_RESSTR(STR_FIELD)); } return aRewriter; } +static bool lcl_IsSpecialCharacter(sal_Unicode nChar) +{ + switch (nChar) + { + case CH_TXTATR_BREAKWORD: + case CH_TXTATR_INWORD: + case CH_TXTATR_TAB: + case CH_TXTATR_NEWLINE: + return true; + + default: + break; + } + + return false; +} + +const char UNDO_ARG1[] = "$1"; +const char UNDO_ARG2[] = "$2"; +const char UNDO_ARG3[] = "$3"; + +static String lcl_DenotedPortion(String rStr, xub_StrLen nStart, + xub_StrLen nEnd) +{ + String aResult; + + if (nEnd - nStart > 0) + { + sal_Unicode cLast = rStr.GetChar(nEnd - 1); + if (lcl_IsSpecialCharacter(cLast)) + { + switch(cLast) + { + case CH_TXTATR_TAB: + aResult = SW_RESSTR(STR_UNDO_TABS); + + break; + case CH_TXTATR_NEWLINE: + aResult = SW_RESSTR(STR_UNDO_NLS); + + break; + + case CH_TXTATR_INWORD: + case CH_TXTATR_BREAKWORD: + aResult = rtl::OUString(UNDO_ARG2); + + break; + + } + SwRewriter aRewriter; + aRewriter.AddRule(UndoArg1, + String::CreateFromInt32(nEnd - nStart)); + aResult = aRewriter.Apply(aResult); + } + else + { + aResult = SW_RESSTR(STR_START_QUOTE); + aResult += rStr.Copy(nStart, nEnd - nStart); + aResult += SW_RESSTR(STR_END_QUOTE); + } + } + + return aResult; +} + +String DenoteSpecialCharacters(const String & rStr) +{ + String aResult; + + if (rStr.Len() > 0) + { + bool bStart = false; + xub_StrLen nStart = 0; + sal_Unicode cLast = 0; + + for (xub_StrLen i = 0; i < rStr.Len(); i++) + { + if (lcl_IsSpecialCharacter(rStr.GetChar(i))) + { + if (cLast != rStr.GetChar(i)) + bStart = true; + + } + else + { + if (lcl_IsSpecialCharacter(cLast)) + bStart = true; + } + + if (bStart) + { + aResult += lcl_DenotedPortion(rStr, nStart, i); + + nStart = i; + bStart = false; + } + + cLast = rStr.GetChar(i); + } + + aResult += lcl_DenotedPortion(rStr, nStart, rStr.Len()); + } + else + aResult = rtl::OUString(UNDO_ARG2); + + return aResult; +} + SwRewriter SwUndoDelete::GetRewriter() const { SwRewriter aResult; @@ -558,15 +667,15 @@ SwRewriter SwUndoDelete::GetRewriter() const { SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_START_QUOTE)); - aRewriter.AddRule(UNDO_ARG2, sTableName); - aRewriter.AddRule(UNDO_ARG3, SW_RES(STR_END_QUOTE)); + aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_START_QUOTE)); + aRewriter.AddRule(UndoArg2, sTableName); + aRewriter.AddRule(UndoArg3, SW_RESSTR(STR_END_QUOTE)); String sTmp = aRewriter.Apply(SW_RES(STR_TABLE_NAME)); - aResult.AddRule(UNDO_ARG1, sTmp); + aResult.AddRule(UndoArg1, sTmp); } else - aResult.AddRule(UNDO_ARG1, String(SW_RES(STR_PARAGRAPHS))); + aResult.AddRule(UndoArg1, SW_RESSTR(STR_PARAGRAPHS)); } else { @@ -590,7 +699,7 @@ SwRewriter SwUndoDelete::GetRewriter() const } else { - aStr = UNDO_ARG2; + aStr = rtl::OUString(UNDO_ARG2); } } @@ -601,7 +710,7 @@ SwRewriter SwUndoDelete::GetRewriter() const aStr = aRewriter.Apply(aStr); } - aResult.AddRule(UNDO_ARG1, aStr); + aResult.AddRule(UndoArg1, aStr); } return aResult; @@ -986,4 +1095,29 @@ void SwUndoDelete::SetTableName(const String & rName) sTableName = rName; } +String SwRewriter::Apply(const String & rStr) const +{ + rtl::OUString aResult = rStr; + std::vector<SwRewriteRule>::const_iterator aIt; + + for (aIt = mRules.begin(); aIt != mRules.end(); ++aIt) + { + switch (aIt->first) + { + case UndoArg1: + default: + aResult = aResult.replaceAll(UNDO_ARG1, aIt->second); + break; + case UndoArg2: + aResult = aResult.replaceAll(UNDO_ARG2, aIt->second); + break; + case UndoArg3: + aResult = aResult.replaceAll(UNDO_ARG3, aIt->second); + break; + } + } + + return aResult; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 2671511abf5f..9b169d8b3ad5 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -1212,110 +1212,6 @@ String ShortenString(const String & rStr, xub_StrLen nLength, const String & rFi return aResult; } -static bool lcl_IsSpecialCharacter(sal_Unicode nChar) -{ - switch (nChar) - { - case CH_TXTATR_BREAKWORD: - case CH_TXTATR_INWORD: - case CH_TXTATR_TAB: - case CH_TXTATR_NEWLINE: - return true; - - default: - break; - } - - return false; -} - -static String lcl_DenotedPortion(String rStr, xub_StrLen nStart, - xub_StrLen nEnd) -{ - String aResult; - - if (nEnd - nStart > 0) - { - sal_Unicode cLast = rStr.GetChar(nEnd - 1); - if (lcl_IsSpecialCharacter(cLast)) - { - switch(cLast) - { - case CH_TXTATR_TAB: - aResult += String(SW_RES(STR_UNDO_TABS)); - - break; - case CH_TXTATR_NEWLINE: - aResult += String(SW_RES(STR_UNDO_NLS)); - - break; - - case CH_TXTATR_INWORD: - case CH_TXTATR_BREAKWORD: - aResult += UNDO_ARG2; - - break; - - } - SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, - String::CreateFromInt32(nEnd - nStart)); - aResult = aRewriter.Apply(aResult); - } - else - { - aResult = String(SW_RES(STR_START_QUOTE)); - aResult += rStr.Copy(nStart, nEnd - nStart); - aResult += String(SW_RES(STR_END_QUOTE)); - } - } - - return aResult; -} - -String DenoteSpecialCharacters(const String & rStr) -{ - String aResult; - - if (rStr.Len() > 0) - { - bool bStart = false; - xub_StrLen nStart = 0; - sal_Unicode cLast = 0; - - for (xub_StrLen i = 0; i < rStr.Len(); i++) - { - if (lcl_IsSpecialCharacter(rStr.GetChar(i))) - { - if (cLast != rStr.GetChar(i)) - bStart = true; - - } - else - { - if (lcl_IsSpecialCharacter(cLast)) - bStart = true; - } - - if (bStart) - { - aResult += lcl_DenotedPortion(rStr, nStart, i); - - nStart = i; - bStart = false; - } - - cLast = rStr.GetChar(i); - } - - aResult += lcl_DenotedPortion(rStr, nStart, rStr.Len()); - } - else - aResult = UNDO_ARG2; - - return aResult; -} - bool IsDestroyFrameAnchoredAtChar(SwPosition const & rAnchorPos, SwPosition const & rStart, SwPosition const & rEnd, DelCntntType const nDelCntntType) @@ -1332,8 +1228,4 @@ bool IsDestroyFrameAnchoredAtChar(SwPosition const & rAnchorPos, ); } -const String UNDO_ARG1("$1", RTL_TEXTENCODING_ASCII_US); -const String UNDO_ARG2("$2", RTL_TEXTENCODING_ASCII_US); -const String UNDO_ARG3("$3", RTL_TEXTENCODING_ASCII_US); - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx index 3bcaf349a1dd..429bf498dbae 100644 --- a/sw/source/core/undo/undobj1.cxx +++ b/sw/source/core/undo/undobj1.cxx @@ -438,7 +438,7 @@ SwRewriter SwUndoDelLayFmt::GetRewriter() const { SwOLENode * pOLENd = pNd->GetOLENode(); - aRewriter.AddRule(UNDO_ARG1, pOLENd->GetDescription()); + aRewriter.AddRule(UndoArg1, pOLENd->GetDescription()); } } } @@ -491,7 +491,7 @@ SwRewriter SwUndoSetFlyFmt::GetRewriter() const SwRewriter aRewriter; if (pNewFmt) - aRewriter.AddRule(UNDO_ARG1, pNewFmt->GetName()); + aRewriter.AddRule(UndoArg1, pNewFmt->GetName()); return aRewriter; } diff --git a/sw/source/core/undo/undoflystrattr.cxx b/sw/source/core/undo/undoflystrattr.cxx index 8f760b7201fe..4da68334a3f3 100644 --- a/sw/source/core/undo/undoflystrattr.cxx +++ b/sw/source/core/undo/undoflystrattr.cxx @@ -92,7 +92,7 @@ SwRewriter SwUndoFlyStrAttr::GetRewriter() const { SwRewriter aResult; - aResult.AddRule( UNDO_ARG1, mrFlyFrmFmt.GetName() ); + aResult.AddRule( UndoArg1, mrFlyFrmFmt.GetName() ); return aResult; } diff --git a/sw/source/core/undo/unfmco.cxx b/sw/source/core/undo/unfmco.cxx index 4278121a8862..e23dd973d38b 100644 --- a/sw/source/core/undo/unfmco.cxx +++ b/sw/source/core/undo/unfmco.cxx @@ -110,7 +110,7 @@ SwRewriter SwUndoFmtColl::GetRewriter() const // #i31191# Use stored format name instead of // pFmtColl->GetName(), because pFmtColl does not have to be available // anymore. - aResult.AddRule(UNDO_ARG1, aFmtName ); + aResult.AddRule(UndoArg1, aFmtName ); return aResult; } diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index f08cfa0ad176..8a451c43c9f1 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -461,14 +461,14 @@ SwRewriter SwUndoInsert::GetRewriter() const nUndoStringLength, String(SW_RES(STR_LDOTS))); - aResult.AddRule(UNDO_ARG1, aString); + aResult.AddRule(UndoArg1, aString); bDone = true; } if ( ! bDone ) { - aResult.AddRule(UNDO_ARG1, String("??", RTL_TEXTENCODING_ASCII_US)); + aResult.AddRule(UndoArg1, String("??", RTL_TEXTENCODING_ASCII_US)); } return aResult; @@ -536,15 +536,15 @@ MakeUndoReplaceRewriter(sal_uLong const occurrences, if (1 < occurrences) { - aResult.AddRule(UNDO_ARG1, String::CreateFromInt32(occurrences)); - aResult.AddRule(UNDO_ARG2, String(SW_RES(STR_OCCURRENCES_OF))); + aResult.AddRule(UndoArg1, String::CreateFromInt32(occurrences)); + aResult.AddRule(UndoArg2, String(SW_RES(STR_OCCURRENCES_OF))); String aTmpStr; aTmpStr += String(SW_RES(STR_START_QUOTE)); aTmpStr += ShortenString(sOld, nUndoStringLength, SW_RES(STR_LDOTS)); aTmpStr += String(SW_RES(STR_END_QUOTE)); - aResult.AddRule(UNDO_ARG3, aTmpStr); + aResult.AddRule(UndoArg3, aTmpStr); } else if (1 == occurrences) { @@ -556,10 +556,10 @@ MakeUndoReplaceRewriter(sal_uLong const occurrences, aTmpStr += ShortenString(sOld, nUndoStringLength, SW_RES(STR_LDOTS)); aTmpStr += String(SW_RES(STR_END_QUOTE)); - aResult.AddRule(UNDO_ARG1, aTmpStr); + aResult.AddRule(UndoArg1, aTmpStr); } - aResult.AddRule(UNDO_ARG2, String(SW_RES(STR_YIELDS))); + aResult.AddRule(UndoArg2, String(SW_RES(STR_YIELDS))); { String aTmpStr; @@ -569,7 +569,7 @@ MakeUndoReplaceRewriter(sal_uLong const occurrences, aTmpStr += ShortenString(sNew, nUndoStringLength, SW_RES(STR_LDOTS)); aTmpStr += String(SW_RES(STR_END_QUOTE)); - aResult.AddRule(UNDO_ARG3, aTmpStr); + aResult.AddRule(UndoArg3, aTmpStr); } } @@ -1037,7 +1037,7 @@ SwRewriter SwUndoInsertLabel::GetRewriter() const String(SW_RES(STR_LDOTS))); aTmpStr += String(SW_RES(STR_END_QUOTE)); - aRewriter.AddRule(UNDO_ARG1, aTmpStr); + aRewriter.AddRule(UndoArg1, aTmpStr); return aRewriter; } diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx index 4267874ef771..e9cce98ab147 100644 --- a/sw/source/core/undo/unnum.cxx +++ b/sw/source/core/undo/unnum.cxx @@ -83,7 +83,7 @@ SwRewriter SwUndoInsNum::GetRewriter() const { SwRewriter aResult; if( UNDO_INSFMTATTR == GetId() ) - aResult.AddRule(UNDO_ARG1, aNumRule.GetName()); + aResult.AddRule(UndoArg1, aNumRule.GetName()); return aResult; } diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx index 1faf9bd5251e..562ebbb902fe 100644 --- a/sw/source/core/undo/unovwr.cxx +++ b/sw/source/core/undo/unovwr.cxx @@ -337,7 +337,7 @@ SwRewriter SwUndoOverwrite::GetRewriter() const String(SW_RES(STR_LDOTS))); aString += String(SW_RES(STR_END_QUOTE)); - aResult.AddRule(UNDO_ARG1, aString); + aResult.AddRule(UndoArg1, aString); return aResult; } diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 6243bead3f5c..0f295a14b528 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -370,9 +370,9 @@ SwRewriter SwUndoInsTbl::GetRewriter() const { SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_START_QUOTE)); - aRewriter.AddRule(UNDO_ARG2, sTblNm); - aRewriter.AddRule(UNDO_ARG3, SW_RES(STR_END_QUOTE)); + aRewriter.AddRule(UndoArg1, SW_RES(STR_START_QUOTE)); + aRewriter.AddRule(UndoArg2, sTblNm); + aRewriter.AddRule(UndoArg3, SW_RES(STR_END_QUOTE)); return aRewriter; } diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx index 9b335687ceba..f54775e48d83 100644 --- a/sw/source/core/unocore/unobkm.cxx +++ b/sw/source/core/unocore/unobkm.cxx @@ -378,9 +378,9 @@ throw (uno::RuntimeException) } SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, lcl_QuoteName(getName())); - aRewriter.AddRule(UNDO_ARG2, SW_RES(STR_YIELDS)); - aRewriter.AddRule(UNDO_ARG3, lcl_QuoteName(rName)); + aRewriter.AddRule(UndoArg1, lcl_QuoteName(getName())); + aRewriter.AddRule(UndoArg2, SW_RES(STR_YIELDS)); + aRewriter.AddRule(UndoArg3, lcl_QuoteName(rName)); m_pImpl->m_pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_BOOKMARK_RENAME, &aRewriter); diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx index 74bd20eb9e09..8f90a15323ec 100644 --- a/sw/source/ui/app/docst.cxx +++ b/sw/source/ui/app/docst.cxx @@ -981,7 +981,7 @@ sal_uInt16 SwDocShell::UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWr GetWrtShell()->StartAllAction(); SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, pColl->GetName()); + aRewriter.AddRule(UndoArg1, pColl->GetName()); GetWrtShell()->StartUndo(UNDO_INSFMTATTR, &aRewriter); GetWrtShell()->FillByEx(pColl); diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx index 810021d144f5..4f6290f628a1 100644 --- a/sw/source/ui/app/docstyle.cxx +++ b/sw/source/ui/app/docstyle.cxx @@ -1112,7 +1112,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, if (rDoc.GetIDocumentUndoRedo().DoesUndo()) { SwRewriter aRewriter; - aRewriter.AddRule( UNDO_ARG1, GetName() ); + aRewriter.AddRule( UndoArg1, GetName() ); rDoc.GetIDocumentUndoRedo().StartUndo( UNDO_INSFMTATTR, &aRewriter ); } diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index 15c5d33ed7dc..3da5f50a8373 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -3217,7 +3217,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, rSrcSh.GetSelDescr()); + aRewriter.AddRule(UndoArg1, rSrcSh.GetSelDescr()); if(rSrcSh.GetDoc() != rSh.GetDoc()) rSrcSh.StartUndo( eUndoId, &aRewriter ); diff --git a/sw/source/ui/docvw/AnnotationWin.cxx b/sw/source/ui/docvw/AnnotationWin.cxx index d3d243df11b2..a4cee7ecee2c 100644 --- a/sw/source/ui/docvw/AnnotationWin.cxx +++ b/sw/source/ui/docvw/AnnotationWin.cxx @@ -204,7 +204,7 @@ MenuButton* SwAnnotationWin::CreateMenuButton() mpButtonPopup = new PopupMenu(SW_RES(MN_ANNOTATION_BUTTON)); XubString aText = mpButtonPopup->GetItemText( FN_DELETE_NOTE_AUTHOR ); SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1,GetAuthor()); + aRewriter.AddRule(UndoArg1,GetAuthor()); aText = aRewriter.Apply(aText); mpButtonPopup->SetItemText(FN_DELETE_NOTE_AUTHOR,aText); MenuButton* pMenuButton = new AnnotationMenuButton( *this ); @@ -221,7 +221,7 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText) const LocaleDataWrapper& rLocalData = aSysLocale.GetLocaleData(); String aText = String(SW_RES(STR_REPLY)); SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, pWin->GetAuthor()); + aRewriter.AddRule(UndoArg1, pWin->GetAuthor()); aText = aRewriter.Apply(aText); aText.Append(String(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" (")) + String(rLocalData.getDate( pWin->GetDate())) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(", ")) + diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 259ec8af9693..6d4256319531 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -1146,7 +1146,7 @@ void SwPostItMgr::Delete(String aAuthor) SwRewriter aRewriter; String aUndoString = SW_RES(STR_DELETE_AUTHOR_NOTES); aUndoString += aAuthor; - aRewriter.AddRule(UNDO_ARG1, aUndoString); + aRewriter.AddRule(UndoArg1, aUndoString); mpWrtShell->StartUndo( UNDO_DELETE, &aRewriter ); std::vector<SwFmtFld*> aTmp; @@ -1174,7 +1174,7 @@ void SwPostItMgr::Delete() mpWrtShell->StartAllAction(); SetActiveSidebarWin(0); SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_DELETE_ALL_NOTES) ); + aRewriter.AddRule(UndoArg1, SW_RES(STR_DELETE_ALL_NOTES) ); mpWrtShell->StartUndo( UNDO_DELETE, &aRewriter ); std::vector<SwFmtFld*> aTmp; diff --git a/sw/source/ui/docvw/SidebarTxtControl.cxx b/sw/source/ui/docvw/SidebarTxtControl.cxx index c1c99a79723c..5938a248b40b 100644 --- a/sw/source/ui/docvw/SidebarTxtControl.cxx +++ b/sw/source/ui/docvw/SidebarTxtControl.cxx @@ -342,7 +342,7 @@ void SidebarTxtControl::Command( const CommandEvent& rCEvt ) { XubString aText = ((PopupMenu*)pMgr->GetSVMenu())->GetItemText( FN_DELETE_NOTE_AUTHOR ); SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, mrSidebarWin.GetAuthor()); + aRewriter.AddRule(UndoArg1, mrSidebarWin.GetAuthor()); aText = aRewriter.Apply(aText); ((PopupMenu*)pMgr->GetSVMenu())->SetItemText(FN_DELETE_NOTE_AUTHOR,aText); } diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 9e7a604ff2fb..a3d64a47d407 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -455,12 +455,12 @@ void SwIndexMarkDlg::InsertUpdate() InsertMark(); if ( pTOXMgr->GetCurTOXMark()) - aRewriter.AddRule(UNDO_ARG1, pTOXMgr->GetCurTOXMark()->GetText()); + aRewriter.AddRule(UndoArg1, pTOXMgr->GetCurTOXMark()->GetText()); } else if( !pSh->HasReadonlySel() ) { if ( pTOXMgr->GetCurTOXMark()) - aRewriter.AddRule(UNDO_ARG1, + aRewriter.AddRule(UndoArg1, pTOXMgr->GetCurTOXMark()->GetText()); if( bDel ) diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 49f7e5e6312a..f5ddbb58fa82 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -744,13 +744,13 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) // #111827# SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, pSh->GetCrsrDescr()); - aRewriter.AddRule(UNDO_ARG2, String(SW_RES(STR_YIELDS))); + aRewriter.AddRule(UndoArg1, pSh->GetCrsrDescr()); + aRewriter.AddRule(UndoArg2, String(SW_RES(STR_YIELDS))); String aTmpStr( SW_RES(STR_START_QUOTE) ); aTmpStr += aTmp; aTmpStr += String(SW_RES(STR_END_QUOTE)); - aRewriter.AddRule(UNDO_ARG3, aTmpStr); + aRewriter.AddRule(UndoArg3, aTmpStr); pSh->StartUndo(UNDO_UI_REPLACE, &aRewriter); pSh->StartAction(); diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx index bd7c726e4fc8..cff5f3fda510 100644 --- a/sw/source/ui/misc/redlndlg.cxx +++ b/sw/source/ui/misc/redlndlg.cxx @@ -830,13 +830,13 @@ void SwRedlineAcceptDlg::CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept ) String aTmpStr; { SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, + aRewriter.AddRule(UndoArg1, String::CreateFromInt32(aRedlines.size())); aTmpStr = aRewriter.Apply(String(SW_RES(STR_N_REDLINES))); } SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, aTmpStr); + aRewriter.AddRule(UndoArg1, aTmpStr); pSh->StartUndo(bAccept? UNDO_ACCEPT_REDLINE : UNDO_REJECT_REDLINE, &aRewriter); diff --git a/sw/source/ui/ribbar/drawbase.cxx b/sw/source/ui/ribbar/drawbase.cxx index 15c57ed77c93..677e4191186a 100644 --- a/sw/source/ui/ribbar/drawbase.cxx +++ b/sw/source/ui/ribbar/drawbase.cxx @@ -322,7 +322,7 @@ sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) { SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_FRAME)); + aRewriter.AddRule(UndoArg1, SW_RES(STR_FRAME)); m_pSh->StartUndo(UNDO_INSERT, &aRewriter); } diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index e78f2a37a86e..0246d905df69 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -2669,9 +2669,9 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) if (rSh.GetTableFmt()) { - aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_START_QUOTE)); - aRewriter.AddRule(UNDO_ARG2, rSh.GetTableFmt()->GetName()); - aRewriter.AddRule(UNDO_ARG3, SW_RES(STR_END_QUOTE)); + aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_START_QUOTE)); + aRewriter.AddRule(UndoArg2, rSh.GetTableFmt()->GetName()); + aRewriter.AddRule(UndoArg3, SW_RESSTR(STR_END_QUOTE)); } rSh.EndUndo(UNDO_INSTABLE, &aRewriter); // wegen moegl. Shellwechsel diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 6e36f23a8af2..07b562214fdb 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -631,7 +631,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) { SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_FRAME)); + aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_FRAME)); rShell.EndUndo(UNDO_INSERT, &aRewriter); } @@ -1096,7 +1096,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) // Selektierten Inhalt loeschen SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_SPECIALCHAR)); + aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_SPECIALCHAR)); rSh.StartUndo( UNDO_INSERT, &aRewriter ); if ( rSh.HasSelection() ) diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 08e5cb876770..64dccd6d31d8 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -410,7 +410,7 @@ sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq ) rSh.StartAction(); SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, String(SW_RES(STR_GRAPHIC_DEFNAME))); + aRewriter.AddRule(UndoArg1, SW_RESSTR(STR_GRAPHIC_DEFNAME)); rSh.StartUndo(UNDO_INSERT, &aRewriter); diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx index 29d33c178ba1..d0f6079f917a 100644 --- a/sw/source/ui/uiview/viewsrch.cxx +++ b/sw/source/ui/uiview/viewsrch.cxx @@ -586,9 +586,9 @@ void SwView::Replace() if( pSrchItem->GetPattern() ) // Vorlagen? { SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, pSrchItem->GetSearchString()); - aRewriter.AddRule(UNDO_ARG2, SW_RES(STR_YIELDS)); - aRewriter.AddRule(UNDO_ARG3, pSrchItem->GetReplaceString()); + aRewriter.AddRule(UndoArg1, pSrchItem->GetSearchString()); + aRewriter.AddRule(UndoArg2, SW_RESSTR(STR_YIELDS)); + aRewriter.AddRule(UndoArg3, pSrchItem->GetReplaceString()); pWrtShell->StartUndo(UNDO_UI_REPLACE_STYLE, &aRewriter); diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index cde36a8df209..7458b7b4b225 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -2769,13 +2769,13 @@ void SwContentTree::EditEntry(SvLBoxEntry* pEntry, sal_uInt8 nMode) pActiveShell->StartAction(); String sTable = SW_RES(STR_TABLE_NAME); SwRewriter aRewriterTableName; - aRewriterTableName.AddRule(UNDO_ARG1, SW_RES(STR_START_QUOTE)); - aRewriterTableName.AddRule(UNDO_ARG2, pCnt->GetName()); - aRewriterTableName.AddRule(UNDO_ARG3, SW_RES(STR_END_QUOTE)); + aRewriterTableName.AddRule(UndoArg1, SW_RES(STR_START_QUOTE)); + aRewriterTableName.AddRule(UndoArg2, pCnt->GetName()); + aRewriterTableName.AddRule(UndoArg3, SW_RES(STR_END_QUOTE)); sTable = aRewriterTableName.Apply(sTable); SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, sTable); + aRewriter.AddRule(UndoArg1, sTable); pActiveShell->StartUndo(UNDO_DELETE, &aRewriter); pActiveShell->GetView().GetViewFrame()->GetDispatcher()->Execute(FN_TABLE_SELECT_ALL); pActiveShell->DeleteRow(); diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 47541dea862b..0809ed26bfa6 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -229,15 +229,15 @@ void SwWrtShell::Insert( const String &rStr ) // #111827# SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, GetCrsrDescr()); - aRewriter.AddRule(UNDO_ARG2, String(SW_RES(STR_YIELDS))); + aRewriter.AddRule(UndoArg1, GetCrsrDescr()); + aRewriter.AddRule(UndoArg2, String(SW_RES(STR_YIELDS))); { String aTmpStr; aTmpStr += String(SW_RES(STR_START_QUOTE)); aTmpStr += rStr; aTmpStr += String(SW_RES(STR_END_QUOTE)); - aRewriter.AddRule(UNDO_ARG3, rStr); + aRewriter.AddRule(UndoArg3, rStr); } StartUndo(UNDO_REPLACE, &aRewriter); @@ -272,7 +272,7 @@ void SwWrtShell::Insert( const String &rPath, const String &rFilter, StartAllAction(); SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_GRAPHIC)); + aRewriter.AddRule(UndoArg1, SW_RES(STR_GRAPHIC)); StartUndo(UNDO_INSERT, &aRewriter); @@ -586,11 +586,11 @@ sal_Bool SwWrtShell::InsertOleObject( const svt::EmbeddedObjectRef& xRef, SwFlyF SwRewriter aRewriter; if ( bStarMath ) - aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_MATH_FORMULA)); + aRewriter.AddRule(UndoArg1, SW_RES(STR_MATH_FORMULA)); else if ( SotExchange::IsChart( aCLSID ) ) - aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_CHART)); + aRewriter.AddRule(UndoArg1, SW_RES(STR_CHART)); else - aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_OLE)); + aRewriter.AddRule(UndoArg1, SW_RES(STR_OLE)); EndUndo(UNDO_INSERT, &aRewriter); diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx index 7fb33e783e5c..3d7264bfaf50 100644 --- a/sw/source/ui/wrtsh/wrtsh2.cxx +++ b/sw/source/ui/wrtsh/wrtsh2.cxx @@ -80,7 +80,7 @@ void SwWrtShell::Insert(SwField &rFld) StartAllAction(); SwRewriter aRewriter; - aRewriter.AddRule(UNDO_ARG1, rFld.GetDescription()); + aRewriter.AddRule(UndoArg1, rFld.GetDescription()); StartUndo(UNDO_INSERT, &aRewriter); |