Kaydet (Commit) cc65e4d2 authored tarafından Matteo Casalin's avatar Matteo Casalin Kaydeden (comit) Michael Stahl

SvxRedlinTable::IsValidEntry/IsValidComment: reuse code

Change-Id: If2d54aeea160b64601c14624f2e00c5234fe4bc9
Reviewed-on: https://gerrit.libreoffice.org/5457Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 3b82a237
...@@ -305,30 +305,7 @@ void SvxRedlinTable::SetCommentParams( const utl::SearchParam* pSearchPara ) ...@@ -305,30 +305,7 @@ void SvxRedlinTable::SetCommentParams( const utl::SearchParam* pSearchPara )
sal_Bool SvxRedlinTable::IsValidEntry(const String* pAuthorStr, sal_Bool SvxRedlinTable::IsValidEntry(const String* pAuthorStr,
const DateTime *pDateTime,const String* pCommentStr) const DateTime *pDateTime,const String* pCommentStr)
{ {
bool nTheFlag=true; return IsValidEntry(pAuthorStr, pDateTime) && IsValidComment(pCommentStr);
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;
} }
sal_Bool SvxRedlinTable::IsValidEntry(const String* pAuthorStr,const DateTime *pDateTime) sal_Bool SvxRedlinTable::IsValidEntry(const String* pAuthorStr,const DateTime *pDateTime)
......
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