diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-08-16 15:47:44 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-08-17 12:56:47 +0000 |
commit | cc65e4d2fd1dd0c03cf652b5aada6870e1a939f1 (patch) | |
tree | 8d0e595d858a8344c5fb74a456e7c2ad2affc8b8 /svx | |
parent | 3b82a237ff0d31574fca5fbf9a9ce6482afa596b (diff) |
SvxRedlinTable::IsValidEntry/IsValidComment: reuse code
Change-Id: If2d54aeea160b64601c14624f2e00c5234fe4bc9
Reviewed-on: https://gerrit.libreoffice.org/5457
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/ctredlin.cxx | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index 6ccbb8f58770..62e3f7db53ca 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -305,30 +305,7 @@ void SvxRedlinTable::SetCommentParams( const utl::SearchParam* pSearchPara ) sal_Bool SvxRedlinTable::IsValidEntry(const String* pAuthorStr, const DateTime *pDateTime,const String* pCommentStr) { - bool nTheFlag=true; - if(bAuthor) - { - nTheFlag = aAuthor.CompareTo(*pAuthorStr)==COMPARE_EQUAL; - } - if(bDate && nTheFlag) - { - if(nDaTiMode!=FLT_DATE_NOTEQUAL) - { - nTheFlag=pDateTime->IsBetween(aDaTiFilterFirst,aDaTiFilterLast); - } - else - { - nTheFlag=!(pDateTime->IsBetween(aDaTiFilterFirst,aDaTiFilterLast)); - } - } - if(bComment && nTheFlag) - { - sal_Int32 nStartPos = 0; - sal_Int32 nEndPos = pCommentStr->Len(); - - nTheFlag=pCommentSearcher->SearchForward( *pCommentStr, &nStartPos, &nEndPos); - } - return nTheFlag; + return IsValidEntry(pAuthorStr, pDateTime) && IsValidComment(pCommentStr); } sal_Bool SvxRedlinTable::IsValidEntry(const String* pAuthorStr,const DateTime *pDateTime) |