Kaydet (Commit) a4704cb0 authored tarafından Matteo Casalin's avatar Matteo Casalin

Some OUString simplifications

Change-Id: I6bdb45e5a4b84d0c851f07c4063b7d6d58d54a44
üst 7d26404c
...@@ -845,11 +845,7 @@ void SwRedlineData::SetExtraData( const SwRedlineExtraData* pData ) ...@@ -845,11 +845,7 @@ void SwRedlineData::SetExtraData( const SwRedlineExtraData* pData )
OUString SwRedlineData::GetDescr() const OUString SwRedlineData::GetDescr() const
{ {
OUString aResult; return SW_RES(STR_REDLINE_INSERT + GetType());
aResult += SW_RES(STR_REDLINE_INSERT + GetType());
return aResult;
} }
SwRangeRedline::SwRangeRedline(RedlineType_t eTyp, const SwPaM& rPam ) SwRangeRedline::SwRangeRedline(RedlineType_t eTyp, const SwPaM& rPam )
...@@ -1587,10 +1583,8 @@ const SwRedlineData & SwRangeRedline::GetRedlineData(sal_uInt16 nPos) const ...@@ -1587,10 +1583,8 @@ const SwRedlineData & SwRangeRedline::GetRedlineData(sal_uInt16 nPos) const
OUString SwRangeRedline::GetDescr(sal_uInt16 nPos) OUString SwRangeRedline::GetDescr(sal_uInt16 nPos)
{ {
OUString aResult;
// get description of redline data (e.g.: "insert $1") // get description of redline data (e.g.: "insert $1")
aResult = GetRedlineData(nPos).GetDescr(); OUString aResult = GetRedlineData(nPos).GetDescr();
SwPaM * pPaM = NULL; SwPaM * pPaM = NULL;
bool bDeletePaM = false; bool bDeletePaM = false;
...@@ -1608,11 +1602,9 @@ OUString SwRangeRedline::GetDescr(sal_uInt16 nPos) ...@@ -1608,11 +1602,9 @@ OUString SwRangeRedline::GetDescr(sal_uInt16 nPos)
} }
// replace $1 in description by description of the redlines text // replace $1 in description by description of the redlines text
OUString aTmpStr; const OUString aTmpStr = SW_RESSTR(STR_START_QUOTE)
aTmpStr += SW_RES(STR_START_QUOTE); + ShortenString(pPaM->GetTxt(), nUndoStringLength, SW_RESSTR(STR_LDOTS))
aTmpStr += ShortenString(pPaM->GetTxt(), nUndoStringLength, + SW_RESSTR(STR_END_QUOTE);
OUString(SW_RES(STR_LDOTS)));
aTmpStr += SW_RES(STR_END_QUOTE);
SwRewriter aRewriter; SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, aTmpStr); aRewriter.AddRule(UndoArg1, aTmpStr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment