[Libreoffice-commits] core.git: compilerplugins/clang xmloff/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Nov 24 06:06:51 UTC 2018


 compilerplugins/clang/unusedenumconstants.readonly.results |    2 --
 xmloff/source/forms/propertyexport.cxx                     |    4 ++--
 xmloff/source/forms/propertyexport.hxx                     |    1 -
 3 files changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 82cc30a832dde298832d9f029e0ead94a9d2d14b
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Nov 22 12:43:59 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Nov 24 07:06:31 2018 +0100

    BoolAttrFlags::DefaultMask is unnecessary
    
    Change-Id: Iaae876e180cef95cb45e4c0df63e146aaf5320be
    Reviewed-on: https://gerrit.libreoffice.org/63909
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results b/compilerplugins/clang/unusedenumconstants.readonly.results
index cae51737565f..f92ea5feb9c0 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1542,5 +1542,3 @@ writerfilter/source/ooxml/OOXMLFactory.hxx:57
     enum writerfilter::ooxml::ResourceType HpsMeasure
 writerfilter/source/ooxml/OOXMLFactory.hxx:58
     enum writerfilter::ooxml::ResourceType MeasurementOrPercent
-xmloff/source/forms/propertyexport.hxx:38
-    enum BoolAttrFlags DefaultMask
diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx
index 73b49f19400c..7ebe2fe1d896 100644
--- a/xmloff/source/forms/propertyexport.cxx
+++ b/xmloff/source/forms/propertyexport.cxx
@@ -267,8 +267,8 @@ namespace xmloff
         // no check of the property value type: this method is allowed to be called with any integer properties
         // (e.g. sal_Int32, sal_uInt16 etc)
 
-        bool bDefault = (BoolAttrFlags::DefaultTrue == (BoolAttrFlags::DefaultMask & _nBooleanAttributeFlags));
-        bool bDefaultVoid = (BoolAttrFlags::DefaultVoid == (BoolAttrFlags::DefaultMask & _nBooleanAttributeFlags));
+        bool bDefault(BoolAttrFlags::DefaultTrue & _nBooleanAttributeFlags);
+        bool bDefaultVoid(BoolAttrFlags::DefaultVoid & _nBooleanAttributeFlags);
 
         // get the value
         bool bCurrentValue = bDefault;
diff --git a/xmloff/source/forms/propertyexport.hxx b/xmloff/source/forms/propertyexport.hxx
index 2d940bf392df..6cd35a2ba4e4 100644
--- a/xmloff/source/forms/propertyexport.hxx
+++ b/xmloff/source/forms/propertyexport.hxx
@@ -35,7 +35,6 @@ enum class BoolAttrFlags {
     DefaultFalse          = 0x00,
     DefaultTrue           = 0x01,
     DefaultVoid           = 0x02,
-    DefaultMask           = 0x03,
     InverseSemantics      = 0x04,
 };
 namespace o3tl {


More information about the Libreoffice-commits mailing list