sw/source/core/edit/edredln.cxx      |    3 +--
 sw/source/uibase/uiview/viewstat.cxx |    3 +--
 sw/source/uibase/uno/unotxdoc.cxx    |    3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

New commits:
commit bbe19c1312500c63748583eb2e64f5cd1190942c
Author: Justin Luth <justin_l...@sil.org>
Date:   Sat Nov 19 15:25:03 2016 +0300

    tdf#104023 - fix wrong boolean logic for RedlineFlags
    
    commit 847e004e65ec3c35acff607588d15cd75a84f121
       convert nsRedlineMode_t to typed_flags
    
    ...introduced some logical equivalency errors. A few static
    redline functions utilize the correct logic, so use them to
    simplify the code readability.
    
    Change-Id: I4f5715b71dd4c8f2a6cea0c816637b1784892c0d
    Reviewed-on: https://gerrit.libreoffice.org/30974
    Reviewed-by: Justin Luth <justin_l...@sil.org>
    Tested-by: Justin Luth <justin_l...@sil.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/core/edit/edredln.cxx b/sw/source/core/edit/edredln.cxx
index 8df2d5f..d63f3ac 100644
--- a/sw/source/core/edit/edredln.cxx
+++ b/sw/source/core/edit/edredln.cxx
@@ -125,8 +125,7 @@ const SwRangeRedline* SwEditShell::GetCurrRedline() const
 
 void SwEditShell::UpdateRedlineAttr()
 {
-    if( ( RedlineFlags::ShowInsert | RedlineFlags::ShowDelete ) ==
-        ( RedlineFlags::ShowMask & 
GetDoc()->getIDocumentRedlineAccess().GetRedlineFlags() ))
+    if( 
IDocumentRedlineAccess::IsShowChanges(GetDoc()->getIDocumentRedlineAccess().GetRedlineFlags())
 )
     {
         SET_CURR_SHELL( this );
         StartAllAction();
diff --git a/sw/source/uibase/uiview/viewstat.cxx 
b/sw/source/uibase/uiview/viewstat.cxx
index 3f01b80..95b1688 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -267,8 +267,7 @@ void SwView::GetState(SfxItemSet &rSet)
             break;
             case FN_REDLINE_SHOW:
             {
-                RedlineFlags nMask = RedlineFlags::ShowInsert | 
RedlineFlags::ShowDelete;
-                rSet.Put( SfxBoolItem( nWhich, 
bool(m_pWrtShell->GetRedlineFlags() & nMask) ));
+                rSet.Put( SfxBoolItem( nWhich, 
IDocumentRedlineAccess::IsShowChanges(m_pWrtShell->GetRedlineFlags()) ));
             }
             break;
             case SID_AVMEDIA_PLAYER :
diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index 8513b0a..8ea5fdf 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2031,8 +2031,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& 
rPropertyName)
             bool bSet = false;
             if(WID_DOC_CHANGES_SHOW == pEntry->nWID)
             {
-                const RedlineFlags nMask = RedlineFlags::ShowInsert | 
RedlineFlags::ShowDelete;
-                bSet = bool(eMode & nMask);
+                bSet = IDocumentRedlineAccess::IsShowChanges(eMode);
             }
             else if(WID_DOC_CHANGES_RECORD == pEntry->nWID)
             {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to