[Libreoffice-commits] core.git: svx/source
Matteo Casalin
matteo.casalin at yahoo.com
Sat Aug 17 06:17:22 PDT 2013
svx/source/dialog/ctredlin.cxx | 24 ++----------------------
1 file changed, 2 insertions(+), 22 deletions(-)
New commits:
commit 4f144701971532f6790043e00995138c74e6d3fd
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Fri Aug 16 19:31:02 2013 +0200
SvxRedlinTable::InsertEntry(s): reuse code
Change-Id: I5171d01aa3136286bfb007c71ccfdbd73cda07b9
Reviewed-on: https://gerrit.libreoffice.org/5460
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 272ec7f..85c0dfe 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -334,28 +334,8 @@ bool SvxRedlinTable::IsValidComment(const String &rCommentStr)
SvTreeListEntry* SvxRedlinTable::InsertEntry(const OUString& rStr,RedlinData *pUserData,
SvTreeListEntry* pParent,sal_uIntPtr nPos)
{
- aEntryColor=GetTextColor();
- if(pUserData!=NULL)
- {
- if(pUserData->bDisabled)
- aEntryColor=Color(COL_GRAY);
- }
-
- XubString aStr= rStr;
-
- XubString aFirstStr( aStr );
- xub_StrLen nEnd = aFirstStr.Search( sal_Unicode( '\t' ) );
- if( nEnd != STRING_NOTFOUND )
- {
- aFirstStr.Erase( nEnd );
- aCurEntry = aStr;
- aCurEntry.Erase( 0, ++nEnd );
- }
- else
- aCurEntry.Erase();
-
- return SvSimpleTable::InsertEntry( aFirstStr, pParent, sal_False, nPos, pUserData );
-
+ const Color aColor = (pUserData && pUserData->bDisabled) ? Color(COL_GRAY) : GetTextColor();
+ return InsertEntry(rStr, pUserData, aColor, pParent, nPos);
}
SvTreeListEntry* SvxRedlinTable::InsertEntry(const OUString& rStr,RedlinData *pUserData,const Color& aColor,
More information about the Libreoffice-commits
mailing list