diff options
author | Justin Luth <justin_luth@sil.org> | 2016-11-19 15:25:03 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-21 06:17:57 +0000 |
commit | bbe19c1312500c63748583eb2e64f5cd1190942c (patch) | |
tree | 8c9e6ad653740d5d1ed5feae63cb4262f47c34fc | |
parent | 9be04c6cc69b423727038e95a43afd3ad03c22d5 (diff) |
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_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/core/edit/edredln.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewstat.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 3 |
3 files changed, 3 insertions, 6 deletions
diff --git a/sw/source/core/edit/edredln.cxx b/sw/source/core/edit/edredln.cxx index 8df2d5f17e1f..d63f3ac26f96 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 3f01b803d667..95b1688b209d 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 8513b0a3fed0..8ea5fdffd545 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) { |