[Libreoffice-commits] core.git: compilerplugins/clang include/oox oox/inc oox/qa oox/source opencl/inc

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Oct 15 05:56:45 UTC 2018


 compilerplugins/clang/staticconstfield.cxx              |    2 
 include/oox/core/contexthandler2.hxx                    |    2 
 include/oox/core/filterdetect.hxx                       |    2 
 include/oox/core/fragmenthandler.hxx                    |    2 
 include/oox/core/relations.hxx                          |    2 
 include/oox/crypto/AgileEngine.hxx                      |   18 +++---
 include/oox/crypto/CryptTools.hxx                       |    2 
 include/oox/crypto/DocumentEncryption.hxx               |    2 
 include/oox/drawingml/graphicshapecontext.hxx           |    4 -
 include/oox/drawingml/shape.hxx                         |    2 
 include/oox/drawingml/shapepropertymap.hxx              |   10 +--
 include/oox/dump/dumperbase.hxx                         |    8 +--
 include/oox/dump/oledumper.hxx                          |   22 ++++----
 include/oox/export/chartexport.hxx                      |    8 +--
 include/oox/export/drawingml.hxx                        |    2 
 include/oox/helper/binaryinputstream.hxx                |    2 
 include/oox/helper/modelobjecthelper.hxx                |    2 
 include/oox/helper/storagebase.hxx                      |    8 +--
 include/oox/ole/axbinaryreader.hxx                      |    6 +-
 include/oox/ole/axbinarywriter.hxx                      |    8 +--
 include/oox/ole/axcontrol.hxx                           |   14 ++---
 include/oox/ole/olehelper.hxx                           |    4 -
 include/oox/ole/vbacontrol.hxx                          |    2 
 include/oox/ole/vbaexport.hxx                           |    4 -
 include/oox/ole/vbamodule.hxx                           |    4 -
 include/oox/ole/vbaproject.hxx                          |    2 
 include/oox/ppt/pptfilterhelpers.hxx                    |   10 +--
 include/oox/ppt/pptshapegroupcontext.hxx                |    4 -
 include/oox/ppt/slidefragmenthandler.hxx                |    2 
 include/oox/ppt/slidemastertextstylescontext.hxx        |    2 
 include/oox/ppt/slidepersist.hxx                        |   16 +++---
 include/oox/ppt/timenodelistcontext.hxx                 |    2 
 include/oox/vml/vmltextbox.hxx                          |    4 -
 include/oox/vml/vmltextboxcontext.hxx                   |    4 -
 oox/inc/drawingml/chart/axismodel.hxx                   |    2 
 oox/inc/drawingml/chart/chartdrawingfragment.hxx        |    4 -
 oox/inc/drawingml/chart/titlemodel.hxx                  |    2 
 oox/inc/drawingml/chart/typegroupmodel.hxx              |    2 
 oox/inc/drawingml/clrschemecontext.hxx                  |    2 
 oox/inc/drawingml/transform2dcontext.hxx                |    2 
 oox/qa/token/tokenmap-test.cxx                          |    2 
 oox/qa/unit/vba_compression.cxx                         |    2 
 oox/source/core/fastparser.cxx                          |    2 
 oox/source/core/recordparser.cxx                        |    2 
 oox/source/drawingml/chart/converterbase.cxx            |    2 
 oox/source/drawingml/chart/objectformatter.cxx          |   42 ++++++++--------
 oox/source/drawingml/clrscheme.cxx                      |    2 
 oox/source/drawingml/customshapegeometry.cxx            |    2 
 oox/source/drawingml/diagram/diagramfragmenthandler.hxx |    4 -
 oox/source/drawingml/diagram/diagramlayoutatoms.hxx     |    4 -
 oox/source/dump/dffdumper.cxx                           |    8 +--
 oox/source/export/ColorPropertySet.cxx                  |    2 
 oox/source/export/ColorPropertySet.hxx                  |    6 +-
 oox/source/export/chartexport.cxx                       |    2 
 oox/source/helper/progressbar.cxx                       |    4 -
 oox/source/ole/axcontrol.cxx                            |   15 +----
 oox/source/ole/olehelper.cxx                            |    2 
 oox/source/ole/olestorage.cxx                           |    2 
 oox/source/ppt/animvariantcontext.hxx                   |    2 
 oox/source/ppt/extdrawingfragmenthandler.hxx            |    2 
 oox/source/ppt/timenodelistcontext.cxx                  |    4 -
 oox/source/shape/ShapeDrawingFragmentHandler.hxx        |    2 
 opencl/inc/opencl_device_selection.h                    |    2 
 63 files changed, 157 insertions(+), 162 deletions(-)

New commits:
commit a84e3df74eecc8778e3d5be5dd80ad4ddb511edf
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Oct 12 17:12:39 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Oct 15 07:56:21 2018 +0200

    loplugin:constfields in oox
    
    Change-Id: I1e110d193ebfa30ab1ab0d85bfb6dc409e341439
    Reviewed-on: https://gerrit.libreoffice.org/61728
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/staticconstfield.cxx b/compilerplugins/clang/staticconstfield.cxx
index 79fda38531e9..cde2f80babc5 100644
--- a/compilerplugins/clang/staticconstfield.cxx
+++ b/compilerplugins/clang/staticconstfield.cxx
@@ -93,6 +93,8 @@ bool StaticConstField::TraverseConstructorInitializer(CXXCtorInitializer* init)
     // unusual case where a user constructor sets a field to one value, and a copy constructor sets it to a different value
     if (fn == SRCDIR "/sw/source/core/attr/hints.cxx")
         return true;
+    if (fn == SRCDIR "/oox/source/core/contexthandler2.cxx")
+        return true;
 
     report(DiagnosticsEngine::Warning, "field can be static const", init->getSourceLocation())
         << init->getSourceRange();
diff --git a/include/oox/core/contexthandler2.hxx b/include/oox/core/contexthandler2.hxx
index 27185d732066..cc479e88b93e 100644
--- a/include/oox/core/contexthandler2.hxx
+++ b/include/oox/core/contexthandler2.hxx
@@ -217,7 +217,7 @@ private:
     typedef std::shared_ptr< ContextStack > ContextStackRef;
 
     ContextStackRef     mxContextStack;     ///< Stack of all processed elements.
-    size_t              mnRootStackSize;    ///< Stack size on construction time.
+    size_t const        mnRootStackSize;    ///< Stack size on construction time.
 
 protected:
     bool                mbEnableTrimSpace;  ///< True = trim whitespace in characters().
diff --git a/include/oox/core/filterdetect.hxx b/include/oox/core/filterdetect.hxx
index 44f0363187c9..1df0d5c6b335 100644
--- a/include/oox/core/filterdetect.hxx
+++ b/include/oox/core/filterdetect.hxx
@@ -90,7 +90,7 @@ private:
     typedef ::std::vector< sal_Int32 > ContextVector;
 
     OUString&           mrFilterName;
-    OUString            maFileName;
+    OUString const      maFileName;
     ContextVector       maContextStack;
     OUString            maTargetPath;
     css::uno::Reference< css::uno::XComponentContext > mxContext;
diff --git a/include/oox/core/fragmenthandler.hxx b/include/oox/core/fragmenthandler.hxx
index 0a4e9a09ffb7..6501c0761682 100644
--- a/include/oox/core/fragmenthandler.hxx
+++ b/include/oox/core/fragmenthandler.hxx
@@ -59,7 +59,7 @@ struct FragmentBaseData
     const OUString      maFragmentPath;
     css::uno::Reference< css::xml::sax::XLocator >
                         mxLocator;
-    RelationsRef        mxRelations;
+    RelationsRef const  mxRelations;
 
     explicit            FragmentBaseData(
                             XmlFilterBase& rFilter,
diff --git a/include/oox/core/relations.hxx b/include/oox/core/relations.hxx
index d556d9c8cf93..514ef9ac3cf9 100644
--- a/include/oox/core/relations.hxx
+++ b/include/oox/core/relations.hxx
@@ -109,7 +109,7 @@ public:
 
 private:
     ::std::map< OUString, Relation > maMap;
-    OUString     maFragmentPath;
+    OUString const maFragmentPath;
 };
 
 
diff --git a/include/oox/crypto/AgileEngine.hxx b/include/oox/crypto/AgileEngine.hxx
index 40f9d7f6e3eb..0395d42d357e 100644
--- a/include/oox/crypto/AgileEngine.hxx
+++ b/include/oox/crypto/AgileEngine.hxx
@@ -57,15 +57,15 @@ struct OOX_DLLPUBLIC AgileEncryptionInfo
 
 struct OOX_DLLPUBLIC AgileEncryptionParameters
 {
-    sal_Int32 spinCount;
-    sal_Int32 saltSize;
-    sal_Int32 keyBits;
-    sal_Int32 hashSize;
-    sal_Int32 blockSize;
-
-    OUString cipherAlgorithm;
-    OUString cipherChaining;
-    OUString hashAlgorithm;
+    sal_Int32 const spinCount;
+    sal_Int32 const saltSize;
+    sal_Int32 const keyBits;
+    sal_Int32 const hashSize;
+    sal_Int32 const blockSize;
+
+    OUString const cipherAlgorithm;
+    OUString const cipherChaining;
+    OUString const hashAlgorithm;
 };
 
 enum class AgileEncryptionPreset
diff --git a/include/oox/crypto/CryptTools.hxx b/include/oox/crypto/CryptTools.hxx
index 90c60b2a6313..80d52cbeed74 100644
--- a/include/oox/crypto/CryptTools.hxx
+++ b/include/oox/crypto/CryptTools.hxx
@@ -107,7 +107,7 @@ public:
 
 class OOX_DLLPUBLIC CryptoHash : public Crypto
 {
-    sal_Int32 mnHashSize;
+    sal_Int32 const mnHashSize;
 public:
     CryptoHash(std::vector<sal_uInt8>& rKey, CryptoHashType eType);
     bool update(std::vector<sal_uInt8>& rInput, sal_uInt32 nInputLength = 0);
diff --git a/include/oox/crypto/DocumentEncryption.hxx b/include/oox/crypto/DocumentEncryption.hxx
index f3ae37ea099b..a59f1b118304 100644
--- a/include/oox/crypto/DocumentEncryption.hxx
+++ b/include/oox/crypto/DocumentEncryption.hxx
@@ -32,7 +32,7 @@ class OOX_DLLPUBLIC DocumentEncryption
 private:
     css::uno::Reference< css::io::XStream > mxDocumentStream;
     oox::ole::OleStorage& mrOleStorage;
-    OUString maPassword;
+    OUString const maPassword;
 
     Standard2007Engine mEngine;
 
diff --git a/include/oox/drawingml/graphicshapecontext.hxx b/include/oox/drawingml/graphicshapecontext.hxx
index 5b520e468089..21790636e678 100644
--- a/include/oox/drawingml/graphicshapecontext.hxx
+++ b/include/oox/drawingml/graphicshapecontext.hxx
@@ -51,8 +51,8 @@ public:
     virtual void onEndElement() override;
 
 private:
-    bool                mbEmbedShapesInChart;
-    ::oox::core::ContextHandler2Helper* mpParent;
+    bool const          mbEmbedShapesInChart;
+    ::oox::core::ContextHandler2Helper* const mpParent;
 };
 
 
diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx
index 6028a11c2bc0..0311b705fce6 100644
--- a/include/oox/drawingml/shape.hxx
+++ b/include/oox/drawingml/shape.hxx
@@ -81,7 +81,7 @@ typedef ::std::map< sal_Int32, ShapeStyleRef > ShapeStyleRefMap;
 struct ChartShapeInfo
 {
     OUString     maFragmentPath;     ///< Path to related XML stream, e.g. for charts.
-    bool                mbEmbedShapes;      ///< True = load chart shapes into chart, false = load into parent drawpage.
+    bool const   mbEmbedShapes;      ///< True = load chart shapes into chart, false = load into parent drawpage.
 
     explicit     ChartShapeInfo( bool bEmbedShapes ) : mbEmbedShapes( bEmbedShapes ) {}
 };
diff --git a/include/oox/drawingml/shapepropertymap.hxx b/include/oox/drawingml/shapepropertymap.hxx
index 2fb237cd496f..973a5ff2baa9 100644
--- a/include/oox/drawingml/shapepropertymap.hxx
+++ b/include/oox/drawingml/shapepropertymap.hxx
@@ -83,10 +83,10 @@ typedef o3tl::enumarray<ShapeProperty, sal_Int32> ShapePropertyIds;
 struct OOX_DLLPUBLIC ShapePropertyInfo
 {
     const ShapePropertyIds& mrPropertyIds;
-    bool mbNamedLineMarker;      /// True = use named line marker instead of explicit line marker.
-    bool mbNamedLineDash;        /// True = use named line dash instead of explicit line dash.
-    bool mbNamedFillGradient;    /// True = use named fill gradient instead of explicit fill gradient.
-    bool mbNamedFillBitmap;      /// True = use named fill bitmap instead of explicit fill bitmap.
+    bool const mbNamedLineMarker;      /// True = use named line marker instead of explicit line marker.
+    bool const mbNamedLineDash;        /// True = use named line dash instead of explicit line dash.
+    bool const mbNamedFillGradient;    /// True = use named fill gradient instead of explicit fill gradient.
+    bool const mbNamedFillBitmap;      /// True = use named fill bitmap instead of explicit fill bitmap.
 
     static ShapePropertyInfo DEFAULT;           /// Default property info (used as default parameter of other methods).
 
@@ -154,7 +154,7 @@ private:
 
 private:
     ModelObjectHelper&  mrModelObjHelper;
-    ShapePropertyInfo   maShapePropInfo;
+    ShapePropertyInfo const maShapePropInfo;
 };
 
 
diff --git a/include/oox/dump/dumperbase.hxx b/include/oox/dump/dumperbase.hxx
index 03369e2d8d03..7367bfd6cec7 100644
--- a/include/oox/dump/dumperbase.hxx
+++ b/include/oox/dump/dumperbase.hxx
@@ -800,8 +800,8 @@ private:
     typedef ::std::map< OUString, NameListRef >      NameListMap;
 
     css::uno::Reference< css::uno::XComponentContext > mxContext;
-    StorageRef          mxRootStrg;
-    OUString            maSysFileName;
+    StorageRef const    mxRootStrg;
+    OUString const      maSysFileName;
     ConfigFileSet       maConfigFiles;
     ConfigDataMap       maConfigData;
     NameListMap         maNameLists;
@@ -1184,8 +1184,8 @@ private:
 private:
     struct PreferredItem
     {
-        OUString     maName;
-        bool                mbStorage;
+        OUString const maName;
+        bool const          mbStorage;
 
         explicit     PreferredItem( const OUString& rName, bool bStorage ) :
                                 maName( rName ), mbStorage( bStorage ) {}
diff --git a/include/oox/dump/oledumper.hxx b/include/oox/dump/oledumper.hxx
index ef18258da217..a5349252c39c 100644
--- a/include/oox/dump/oledumper.hxx
+++ b/include/oox/dump/oledumper.hxx
@@ -174,11 +174,11 @@ private:
     bool                dumpComCtlComplex();
 
 protected:
-    sal_uInt32          mnDataId5;
-    sal_uInt32          mnDataId6;
-    sal_uInt16          mnVersion;
-    bool                mbCommonPart;
-    bool                mbComplexPart;
+    sal_uInt32 const    mnDataId5;
+    sal_uInt32 const    mnDataId6;
+    sal_uInt16 const    mnVersion;
+    bool const          mbCommonPart;
+    bool const          mbComplexPart;
 };
 
 
@@ -350,9 +350,9 @@ private:
     {
         enum LargePropertyType { PROPTYPE_POS, PROPTYPE_SIZE, PROPTYPE_GUID, PROPTYPE_STRING, PROPTYPE_STRINGARRAY };
 
-        LargePropertyType   mePropType;
-        OUString     maItemName;
-        sal_uInt32          mnDataSize;
+        LargePropertyType const mePropType;
+        OUString const maItemName;
+        sal_uInt32 const    mnDataSize;
         OUString*    mpItemValue;
         explicit     LargeProperty( LargePropertyType ePropType, const String& rItemName, sal_uInt32 nDataSize, OUString* pItemValue = nullptr ) :
                                 mePropType( ePropType ), maItemName( rItemName ), mnDataSize( nDataSize ), mpItemValue( pItemValue ) {}
@@ -361,8 +361,8 @@ private:
 
     struct StreamProperty
     {
-        OUString     maItemName;
-        sal_uInt16          mnData;
+        OUString const maItemName;
+        sal_uInt16 const    mnData;
         explicit     StreamProperty( const String& rItemName, sal_uInt16 nData ) :
                                 maItemName( rItemName ), mnData( nData ) {}
     };
@@ -761,7 +761,7 @@ protected:
 
 private:
     VbaSharedData&      mrVbaData;
-    sal_Int32           mnStrmOffset;
+    sal_Int32 const     mnStrmOffset;
 };
 
 
diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx
index 9deb8ff95bf7..b974fc4c1ac7 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -78,9 +78,9 @@ enum AxesType
 };
 
 struct AxisIdPair{
-    AxesType nAxisType;
-    sal_Int32 nAxisId;
-    sal_Int32 nCrossAx;
+    AxesType const nAxisType;
+    sal_Int32 const nAxisId;
+    sal_Int32 const nCrossAx;
 
     AxisIdPair(AxesType nType, sal_Int32 nId, sal_Int32 nAx)
         : nAxisType(nType)
@@ -96,7 +96,7 @@ public:
     typedef ::std::vector< AxisIdPair > AxisVector;
 
 private:
-    sal_Int32           mnXmlNamespace;
+    sal_Int32 const     mnXmlNamespace;
     sal_Int32           mnSeriesCount;
     css::uno::Reference< css::frame::XModel > mxChartModel;
     css::uno::Reference< css::chart::XDiagram > mxDiagram;
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 393752f78df6..61adf25fe29b 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -126,7 +126,7 @@ private:
     static std::map<OUString, OUString> maWdpCache;
 
     /// To specify where write eg. the images to (like 'ppt', or 'word' - according to the OPC).
-    DocumentType meDocumentType;
+    DocumentType const meDocumentType;
     /// Parent exporter, used for text callback.
     DMLTextExport* mpTextExport;
 
diff --git a/include/oox/helper/binaryinputstream.hxx b/include/oox/helper/binaryinputstream.hxx
index 1b0a7e46918b..50c4c800961f 100644
--- a/include/oox/helper/binaryinputstream.hxx
+++ b/include/oox/helper/binaryinputstream.hxx
@@ -372,7 +372,7 @@ private:
 
 private:
     BinaryInputStream*  mpInStrm;
-    sal_Int64           mnStartPos;
+    sal_Int64 const     mnStartPos;
     sal_Int64           mnRelPos;
     sal_Int64           mnSize;
 };
diff --git a/include/oox/helper/modelobjecthelper.hxx b/include/oox/helper/modelobjecthelper.hxx
index 5b5dea4f4092..d618e4ab78ba 100644
--- a/include/oox/helper/modelobjecthelper.hxx
+++ b/include/oox/helper/modelobjecthelper.hxx
@@ -68,7 +68,7 @@ private:
                         mxModelFactory;         ///< Factory to create the container.
     mutable css::uno::Reference< css::container::XNameContainer >
                         mxContainer;            ///< Container for the objects.
-    OUString            maServiceName;          ///< Service name to create the container.
+    OUString const      maServiceName;          ///< Service name to create the container.
     sal_Int32           mnIndex;                ///< Index to create unique identifiers.
 };
 
diff --git a/include/oox/helper/storagebase.hxx b/include/oox/helper/storagebase.hxx
index 537517fbff73..71ee2ddf3de7 100644
--- a/include/oox/helper/storagebase.hxx
+++ b/include/oox/helper/storagebase.hxx
@@ -178,10 +178,10 @@ private:
                         mxInStream;         ///< Cached base input stream (to keep it alive).
     css::uno::Reference< css::io::XStream >
                         mxOutStream;        ///< Cached base output stream (to keep it alive).
-    OUString            maParentPath;       ///< Full path of parent storage.
-    OUString            maStorageName;      ///< Name of this storage, if it is a substorage.
-    bool                mbBaseStreamAccess; ///< True = access base streams with empty stream name.
-    bool                mbReadOnly;         ///< True = storage opened read-only (based on input stream).
+    OUString const      maParentPath;       ///< Full path of parent storage.
+    OUString const      maStorageName;      ///< Name of this storage, if it is a substorage.
+    bool const          mbBaseStreamAccess; ///< True = access base streams with empty stream name.
+    bool const          mbReadOnly;         ///< True = storage opened read-only (based on input stream).
 };
 
 
diff --git a/include/oox/ole/axbinaryreader.hxx b/include/oox/ole/axbinaryreader.hxx
index 81b10531298c..b15a7f1e4507 100644
--- a/include/oox/ole/axbinaryreader.hxx
+++ b/include/oox/ole/axbinaryreader.hxx
@@ -85,7 +85,7 @@ public:
 private:
     BinaryInputStream*  mpInStrm;           ///< The wrapped input stream.
     sal_Int64           mnStrmPos;          ///< Tracks relative position in the stream.
-    sal_Int64           mnStrmSize;         ///< Size of the wrapped stream data.
+    sal_Int64 const     mnStrmSize;         ///< Size of the wrapped stream data.
 };
 
 
@@ -182,7 +182,7 @@ private:
     struct StringProperty : public ComplexProperty
     {
         OUString&    mrValue;
-        sal_uInt32          mnSize;
+        sal_uInt32 const    mnSize;
 
         explicit            StringProperty( OUString& rValue, sal_uInt32 nSize ) :
                                 mrValue( rValue ), mnSize( nSize ) {}
@@ -193,7 +193,7 @@ private:
     struct ArrayStringProperty : public ComplexProperty
     {
         AxArrayString&      mrArray;
-        sal_uInt32          mnSize;
+        sal_uInt32 const    mnSize;
         explicit            ArrayStringProperty( AxArrayString& rArray, sal_uInt32 nSize ) :
                                 mrArray( rArray ), mnSize( nSize ) {}
         virtual bool        readProperty( AxAlignedInputStream& rInStrm ) override;
diff --git a/include/oox/ole/axbinarywriter.hxx b/include/oox/ole/axbinarywriter.hxx
index 000ca96e550e..92c33e659405 100644
--- a/include/oox/ole/axbinarywriter.hxx
+++ b/include/oox/ole/axbinarywriter.hxx
@@ -68,8 +68,8 @@ public:
 private:
     BinaryOutputStream*  mpOutStrm;           ///< The wrapped input stream.
     sal_Int64           mnStrmPos;          ///< Tracks relative position in the stream.
-    sal_Int64           mnStrmSize;         ///< Size of the wrapped stream data.
-    sal_Int64           mnWrappedBeginPos;     ///< starting pos or wrapped stream
+    sal_Int64 const     mnStrmSize;         ///< Size of the wrapped stream data.
+    sal_Int64 const     mnWrappedBeginPos;     ///< starting pos or wrapped stream
 };
 
 /** A pair of integer values as a property. */
@@ -130,7 +130,7 @@ private:
     struct StringProperty : public ComplexProperty
     {
         OUString&    mrValue;
-        sal_uInt32          mnSize;
+        sal_uInt32 const    mnSize;
 
         explicit            StringProperty( OUString& rValue, sal_uInt32 nSize ) :
                                 mrValue( rValue ), mnSize( nSize ) {}
@@ -154,7 +154,7 @@ private:
     sal_Int64           mnPropFlags;        ///< Flags specifying existing properties.
     sal_Int64           mnNextProp;         ///< Next property to read.
     bool                mbValid;            ///< True = stream still valid.
-    bool                mb64BitPropFlags;
+    bool const          mb64BitPropFlags;
 };
 
 
diff --git a/include/oox/ole/axcontrol.hxx b/include/oox/ole/axcontrol.hxx
index a932a7bcfcd2..3d67e49b23c3 100644
--- a/include/oox/ole/axcontrol.hxx
+++ b/include/oox/ole/axcontrol.hxx
@@ -339,7 +339,7 @@ private:
     const GraphicHelper& mrGraphicHelper;
     mutable PropertySet maAddressConverter;
     mutable PropertySet maRangeConverter;
-    bool                mbDefaultColorBgr;
+    bool const          mbDefaultColorBgr;
 };
 
 
@@ -422,10 +422,8 @@ protected:
     const sal_uInt16    mnVersion;          ///< Current version of the ComCtl control model.
 
 private:
-    sal_uInt32          mnDataPartId5;      ///< Identifier for version 5.0 control data.
-    sal_uInt32          mnDataPartId6;      ///< Identifier for version 6.0 control data.
-    bool                mbCommonPart;       ///< True = the COMCTL_COMMONDATA part exists.
-    bool                mbComplexPart;      ///< True = the COMCTL_COMPLEXDATA part exists.
+    sal_uInt32 const    mnDataPartId5;      ///< Identifier for version 5.0 control data.
+    sal_uInt32 const    mnDataPartId6;      ///< Identifier for version 6.0 control data.
 };
 
 
@@ -500,7 +498,7 @@ public: // direct access needed for legacy VML drawing controls
     AxFontData          maFontData;         ///< The font settings.
 
 private:
-    bool                mbSupportsAlign;    ///< True = UNO model supports Align property.
+    bool const          mbSupportsAlign;    ///< True = UNO model supports Align property.
 };
 
 
@@ -830,7 +828,7 @@ public: // direct access needed for legacy VML drawing controls
     sal_Int32           mnPicAlign;         ///< Anchor position of the picture.
     sal_Int32           mnPicSizeMode;      ///< Clip, stretch, zoom.
     bool                mbPicTiling;        ///< True = picture is repeated.
-    bool                mbFontSupport;      ///< True = control supports the font property.
+    bool const          mbFontSupport;      ///< True = control supports the font property.
 };
 
 
@@ -982,7 +980,7 @@ private:
                         createXForm();
 
 private:
-    ControlConverter                                       maControlConv;
+    ControlConverter const                                 maControlConv;
     css::uno::Reference< css::lang::XMultiServiceFactory > mxModelFactory;
     css::uno::Reference< css::form::XFormsSupplier >       mxFormsSupp;
     css::uno::Reference< css::container::XIndexContainer > mxFormIC;
diff --git a/include/oox/ole/olehelper.hxx b/include/oox/ole/olehelper.hxx
index 16e5535a3bb3..16e50630d0bf 100644
--- a/include/oox/ole/olehelper.hxx
+++ b/include/oox/ole/olehelper.hxx
@@ -138,7 +138,7 @@ class OOX_DLLPUBLIC OleFormCtrlExportHelper final
 {
     std::unique_ptr<::oox::ole::EmbeddedControl> mpControl;
     ::oox::ole::ControlModelBase* mpModel;
-    ::oox::GraphicHelper maGrfHelper;
+    ::oox::GraphicHelper const maGrfHelper;
     css::uno::Reference< css::frame::XModel > mxDocModel;
     css::uno::Reference< css::awt::XControlModel > mxControlModel;
 
@@ -175,7 +175,7 @@ class OOX_DLLPUBLIC MSConvertOCXControls : public SvxMSConvertOCXControls
 {
 protected:
     css::uno::Reference< css::uno::XComponentContext > mxCtx;
-    ::oox::GraphicHelper maGrfHelper;
+    ::oox::GraphicHelper const maGrfHelper;
 
     bool importControlFromStream( ::oox::BinaryInputStream& rInStrm,
                                   css::uno::Reference< css::form::XFormComponent > & rxFormComp,
diff --git a/include/oox/ole/vbacontrol.hxx b/include/oox/ole/vbacontrol.hxx
index 8a54c6d3ba18..b192c2d29ff8 100644
--- a/include/oox/ole/vbacontrol.hxx
+++ b/include/oox/ole/vbacontrol.hxx
@@ -204,7 +204,7 @@ public:
 private:
     css::uno::Reference< css::uno::XComponentContext > mxContext;
     css::uno::Reference< css::frame::XModel >          mxDocModel;
-    ControlConverter                                   maConverter;
+    ControlConverter const                             maConverter;
 };
 
 
diff --git a/include/oox/ole/vbaexport.hxx b/include/oox/ole/vbaexport.hxx
index 8d96c0e7a277..4951b341cd32 100644
--- a/include/oox/ole/vbaexport.hxx
+++ b/include/oox/ole/vbaexport.hxx
@@ -63,7 +63,7 @@ private:
     sal_uInt8* mpCompressedChunkStream;
 
     // same as DecompressedChunkEnd in the spec
-    std::size_t mnChunkSize;
+    std::size_t const mnChunkSize;
 
     // CompressedCurrent according to the spec
     sal_uInt64 mnCompressedCurrent;
@@ -133,7 +133,7 @@ private:
     sal_uInt8 mnUnencryptedByte1; // the last unencrypted byte read or written
     sal_uInt8 mnEncryptedByte1; // the last encrypted byte read or written
     sal_uInt8 mnEncryptedByte2; // the next-to-last encrypted byte read or written
-    sal_Unicode mnProjKey; // a project-specific encryption key
+    sal_Unicode const mnProjKey; // a project-specific encryption key
     sal_uInt8 mnIgnoredLength; // the length in bytes of IgnoredEnc
 
     sal_uInt8 mnSeed; // the seed value
diff --git a/include/oox/ole/vbamodule.hxx b/include/oox/ole/vbamodule.hxx
index cb3682839c90..dbea6bf5eb50 100644
--- a/include/oox/ole/vbamodule.hxx
+++ b/include/oox/ole/vbamodule.hxx
@@ -92,12 +92,12 @@ private:
     OUString            maName;
     OUString            maStreamName;
     OUString            maDocString;
-    rtl_TextEncoding    meTextEnc;
+    rtl_TextEncoding const meTextEnc;
     sal_Int32           mnType;
     sal_uInt32          mnOffset;
     bool                mbReadOnly;
     bool                mbPrivate;
-    bool                mbExecutable;
+    bool const          mbExecutable;
 };
 
 
diff --git a/include/oox/ole/vbaproject.hxx b/include/oox/ole/vbaproject.hxx
index 8e170324e9f4..f8fde406d06a 100644
--- a/include/oox/ole/vbaproject.hxx
+++ b/include/oox/ole/vbaproject.hxx
@@ -105,7 +105,7 @@ private:
     virtual void        attachMacro( const OUString& rScriptUrl ) = 0;
 
 private:
-    OUString     maMacroName;
+    OUString const maMacroName;
 };
 
 typedef std::shared_ptr< VbaMacroAttacherBase > VbaMacroAttacherRef;
diff --git a/include/oox/ppt/pptfilterhelpers.hxx b/include/oox/ppt/pptfilterhelpers.hxx
index 9fdd943d87b5..0d13043cc718 100644
--- a/include/oox/ppt/pptfilterhelpers.hxx
+++ b/include/oox/ppt/pptfilterhelpers.hxx
@@ -43,7 +43,7 @@ namespace oox { namespace ppt {
 
     struct ImplAttributeNameConversion
     {
-        AnimationAttributeEnum meAttribute;
+        AnimationAttributeEnum const meAttribute;
         const char* mpMSName;
         const char* mpAPIName;
     };
@@ -53,9 +53,9 @@ namespace oox { namespace ppt {
     struct OOX_DLLPUBLIC transition
     {
         const sal_Char* mpName;
-        sal_Int16 mnType;
-        sal_Int16 mnSubType;
-        bool mbDirection; // true: default geometric direction
+        sal_Int16 const mnType;
+        sal_Int16 const mnSubType;
+        bool const mbDirection; // true: default geometric direction
 
         static const transition* getList();
         static const transition* find( const OUString& rName );
@@ -63,7 +63,7 @@ namespace oox { namespace ppt {
 
     struct OOX_DLLPUBLIC convert_subtype
     {
-        sal_Int32 mnID;
+        sal_Int32 const mnID;
         const sal_Char* mpStrSubType;
 
         static const convert_subtype* getList();
diff --git a/include/oox/ppt/pptshapegroupcontext.hxx b/include/oox/ppt/pptshapegroupcontext.hxx
index de497635d34d..1043b3fa8177 100644
--- a/include/oox/ppt/pptshapegroupcontext.hxx
+++ b/include/oox/ppt/pptshapegroupcontext.hxx
@@ -36,8 +36,8 @@ namespace oox { namespace ppt {
 
 class PPTShapeGroupContext : public ::oox::drawingml::ShapeGroupContext
 {
-    SlidePersistPtr     mpSlidePersistPtr;
-    ShapeLocation       meShapeLocation;
+    SlidePersistPtr const mpSlidePersistPtr;
+    ShapeLocation const meShapeLocation;
     oox::drawingml::ShapePtr    pGraphicShape;
 
     void                applyFontRefColor(const oox::drawingml::ShapePtr& pShape, const oox::drawingml::Color& rFontRefColor);
diff --git a/include/oox/ppt/slidefragmenthandler.hxx b/include/oox/ppt/slidefragmenthandler.hxx
index 545a55bd1a56..8e5791564e77 100644
--- a/include/oox/ppt/slidefragmenthandler.hxx
+++ b/include/oox/ppt/slidefragmenthandler.hxx
@@ -48,7 +48,7 @@ public:
 
 protected:
     SlidePersistPtr     mpSlidePersistPtr;
-    ShapeLocation       meShapeLocation;
+    ShapeLocation const meShapeLocation;
 
 private:
     OUString     maSlideName;
diff --git a/include/oox/ppt/slidemastertextstylescontext.hxx b/include/oox/ppt/slidemastertextstylescontext.hxx
index 7acab9888158..9f4c3cac39d9 100644
--- a/include/oox/ppt/slidemastertextstylescontext.hxx
+++ b/include/oox/ppt/slidemastertextstylescontext.hxx
@@ -37,7 +37,7 @@ public:
     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override;
 
 private:
-    SlidePersistPtr     mpSlidePersistPtr;
+    SlidePersistPtr const mpSlidePersistPtr;
 };
 
 } }
diff --git a/include/oox/ppt/slidepersist.hxx b/include/oox/ppt/slidepersist.hxx
index a2378b82aefb..9355b7881788 100644
--- a/include/oox/ppt/slidepersist.hxx
+++ b/include/oox/ppt/slidepersist.hxx
@@ -139,14 +139,14 @@ private:
 
     oox::ppt::HeaderFooter                                                  maHeaderFooter;
     sal_Int32                                                               mnLayoutValueToken;
-    bool                                                                    mbMaster;
-    bool                                                                    mbNotes;
-
-    oox::drawingml::TextListStylePtr                                        maDefaultTextStylePtr;
-    oox::drawingml::TextListStylePtr                                        maTitleTextStylePtr;
-    oox::drawingml::TextListStylePtr                                        maBodyTextStylePtr;
-    oox::drawingml::TextListStylePtr                                        maNotesTextStylePtr;
-    oox::drawingml::TextListStylePtr                                        maOtherTextStylePtr;
+    bool const                                                              mbMaster;
+    bool const                                                              mbNotes;
+
+    oox::drawingml::TextListStylePtr const                                  maDefaultTextStylePtr;
+    oox::drawingml::TextListStylePtr const                                  maTitleTextStylePtr;
+    oox::drawingml::TextListStylePtr const                                  maBodyTextStylePtr;
+    oox::drawingml::TextListStylePtr const                                  maNotesTextStylePtr;
+    oox::drawingml::TextListStylePtr const                                  maOtherTextStylePtr;
 
     std::map< OUString, css::uno::Reference< css::animations::XAnimationNode > > maAnimNodesMap;
     std::map< OUString, ::oox::drawingml::ShapePtr >                        maShapeMap;
diff --git a/include/oox/ppt/timenodelistcontext.hxx b/include/oox/ppt/timenodelistcontext.hxx
index 02cba2936fe7..00815a40a668 100644
--- a/include/oox/ppt/timenodelistcontext.hxx
+++ b/include/oox/ppt/timenodelistcontext.hxx
@@ -45,7 +45,7 @@ namespace oox { namespace ppt {
     protected:
         TimeNodeContext( ::oox::core::FragmentHandler2 const & rParent, sal_Int32  aElement, const TimeNodePtr & pNode ) throw();
 
-        sal_Int32 mnElement;
+        sal_Int32 const mnElement;
         TimeNodePtr mpNode;
     };
 
diff --git a/include/oox/vml/vmltextbox.hxx b/include/oox/vml/vmltextbox.hxx
index 8b32713c1dae..e361d1b7040c 100644
--- a/include/oox/vml/vmltextbox.hxx
+++ b/include/oox/vml/vmltextbox.hxx
@@ -67,9 +67,9 @@ struct OOX_DLLPUBLIC TextFontModel
 /** A text portion in a textbox with the same formatting for all characters. */
 struct TextPortionModel
 {
-    TextParagraphModel  maParagraph;
+    TextParagraphModel const maParagraph;
     TextFontModel       maFont;
-    OUString     maText;
+    OUString const maText;
 
     explicit            TextPortionModel( const TextParagraphModel& rParagraph, const TextFontModel& rFont, const OUString& rText );
 };
diff --git a/include/oox/vml/vmltextboxcontext.hxx b/include/oox/vml/vmltextboxcontext.hxx
index c31ddf6c5029..f40eae2676df 100644
--- a/include/oox/vml/vmltextboxcontext.hxx
+++ b/include/oox/vml/vmltextboxcontext.hxx
@@ -54,9 +54,9 @@ public:
 
 private:
     TextBox&            mrTextBox;
-    TextParagraphModel  maParagraph;
+    TextParagraphModel const maParagraph;
     TextFontModel       maFont;
-    size_t              mnInitialPortions;
+    size_t const        mnInitialPortions;
 };
 
 
diff --git a/oox/inc/drawingml/chart/axismodel.hxx b/oox/inc/drawingml/chart/axismodel.hxx
index 9a38cb149847..11cf8dfd910e 100644
--- a/oox/inc/drawingml/chart/axismodel.hxx
+++ b/oox/inc/drawingml/chart/axismodel.hxx
@@ -82,7 +82,7 @@ struct AxisModel
     sal_Int32           mnTickLabelPos;     /// Position of tick mark labels relative to the axis.
     sal_Int32           mnTickLabelSkip;    /// Number of tick mark labels to skip.
     sal_Int32           mnTickMarkSkip;     /// Number of tick marks to skip.
-    sal_Int32           mnTypeId;           /// Type identifier of this axis.
+    sal_Int32 const     mnTypeId;           /// Type identifier of this axis.
     bool                mbAuto;             /// True = automatic selection of text/date axis type.
     bool                mbDeleted;          /// True = axis has been deleted manually.
     bool                mbNoMultiLevel;     /// True = no multi-level categories supported.
diff --git a/oox/inc/drawingml/chart/chartdrawingfragment.hxx b/oox/inc/drawingml/chart/chartdrawingfragment.hxx
index cb5204617ad3..9b49c35226d7 100644
--- a/oox/inc/drawingml/chart/chartdrawingfragment.hxx
+++ b/oox/inc/drawingml/chart/chartdrawingfragment.hxx
@@ -67,7 +67,7 @@ private:
     AnchorPosModel      maFrom;             /// Top-left position relative to chart object.
     AnchorPosModel      maTo;               /// Bottom-right position relative to chart object.
     AnchorSizeModel     maSize;             /// Shape size, if anchor has absolute size.
-    bool                mbRelSize;          /// True = relative size, false = absolute size.
+    bool const          mbRelSize;          /// True = relative size, false = absolute size.
 };
 
 /** Handler for a chart drawing fragment (c:userShapes root element).
@@ -94,7 +94,7 @@ private:
     ::oox::drawingml::ShapePtr mxShape;         /// Current top-level shape.
     std::shared_ptr< ShapeAnchor > mxAnchor;    /// Current anchor of top-level shape.
     EmuRectangle        maChartRectEmu;         /// Position and size of the chart object for embedded shapes (in EMUs).
-    bool                mbOleSupport;           /// True = allow to insert OLE objects into the drawing page.
+    bool const          mbOleSupport;           /// True = allow to insert OLE objects into the drawing page.
 };
 
 
diff --git a/oox/inc/drawingml/chart/titlemodel.hxx b/oox/inc/drawingml/chart/titlemodel.hxx
index 9e09c44a9090..dde078443869 100644
--- a/oox/inc/drawingml/chart/titlemodel.hxx
+++ b/oox/inc/drawingml/chart/titlemodel.hxx
@@ -51,7 +51,7 @@ struct TitleModel
     LayoutRef           mxLayout;           /// Layout/position of the frame.
     TextRef             mxText;             /// Text source of the title.
     bool                mbOverlay;          /// True = title may overlay other objects.
-    sal_Int32           mnDefaultRotation;
+    sal_Int32 const     mnDefaultRotation;
 
     explicit            TitleModel(sal_Int32 nDefaultRotation = 0);
                         ~TitleModel();
diff --git a/oox/inc/drawingml/chart/typegroupmodel.hxx b/oox/inc/drawingml/chart/typegroupmodel.hxx
index e790d48dabdc..031ecddf54aa 100644
--- a/oox/inc/drawingml/chart/typegroupmodel.hxx
+++ b/oox/inc/drawingml/chart/typegroupmodel.hxx
@@ -69,7 +69,7 @@ struct TypeGroupModel
     sal_Int32           mnShape;            /// 3D bar shape type.
     sal_Int32           mnSizeRepresents;   /// Bubble size represents area or width.
     sal_Int32           mnSplitType;        /// Split type in pie-to charts.
-    sal_Int32           mnTypeId;           /// Chart type identifier.
+    sal_Int32 const     mnTypeId;           /// Chart type identifier.
     bool                mbBubble3d;         /// True = show bubbles with 3D shade.
     bool                mbShowMarker;       /// True = show point markers in line charts.
     bool                mbShowNegBubbles;   /// True = show absolute value of negative bubbles.
diff --git a/oox/inc/drawingml/clrschemecontext.hxx b/oox/inc/drawingml/clrschemecontext.hxx
index 5947b3119b93..1d88f77145f6 100644
--- a/oox/inc/drawingml/clrschemecontext.hxx
+++ b/oox/inc/drawingml/clrschemecontext.hxx
@@ -42,7 +42,7 @@ public:
 
 private:
     ClrScheme&      mrClrScheme;
-    sal_Int32       mnColorToken;
+    sal_Int32 const mnColorToken;
 };
 
 class clrSchemeContext : public oox::core::ContextHandler2
diff --git a/oox/inc/drawingml/transform2dcontext.hxx b/oox/inc/drawingml/transform2dcontext.hxx
index eb772ee7419e..a4b3ac9d32b3 100644
--- a/oox/inc/drawingml/transform2dcontext.hxx
+++ b/oox/inc/drawingml/transform2dcontext.hxx
@@ -37,7 +37,7 @@ public:
 
 private:
     Shape&              mrShape;
-    bool                mbtxXfrm;
+    bool const          mbtxXfrm;
 };
 
 } // namespace drawingml
diff --git a/oox/qa/token/tokenmap-test.cxx b/oox/qa/token/tokenmap-test.cxx
index 4f617189bbf4..ce25d3f7a874 100644
--- a/oox/qa/token/tokenmap-test.cxx
+++ b/oox/qa/token/tokenmap-test.cxx
@@ -31,7 +31,7 @@ public:
     CPPUNIT_TEST_SUITE_END();
 
 private:
-    TokenMap tokenMap;
+    TokenMap const tokenMap;
 };
 
 void TokenmapTest::test_roundTrip()
diff --git a/oox/qa/unit/vba_compression.cxx b/oox/qa/unit/vba_compression.cxx
index 420d43d63318..9299a3de9eaa 100644
--- a/oox/qa/unit/vba_compression.cxx
+++ b/oox/qa/unit/vba_compression.cxx
@@ -68,7 +68,7 @@ private:
         return url.url;
     }
 
-    test::Directories m_directories;
+    test::Directories const m_directories;
 };
 
 namespace {
diff --git a/oox/source/core/fastparser.cxx b/oox/source/core/fastparser.cxx
index 6dc91243e56b..3a9918d105ee 100644
--- a/oox/source/core/fastparser.cxx
+++ b/oox/source/core/fastparser.cxx
@@ -47,7 +47,7 @@ public:
                         ~InputStreamCloseGuard();
 private:
     Reference< XInputStream > mxInStream;
-    bool                mbCloseStream;
+    bool const          mbCloseStream;
 };
 
 InputStreamCloseGuard::InputStreamCloseGuard( const Reference< XInputStream >& rxInStream, bool bCloseStream ) :
diff --git a/oox/source/core/recordparser.cxx b/oox/source/core/recordparser.cxx
index 02d070a71a9d..518ca4622440 100644
--- a/oox/source/core/recordparser.cxx
+++ b/oox/source/core/recordparser.cxx
@@ -107,7 +107,7 @@ private:
     typedef ::std::pair< RecordInfo, ContextHandlerRef >    ContextInfo;
     typedef ::std::vector< ContextInfo >                    ContextInfoVec;
 
-    FragmentHandlerRef  mxHandler;
+    FragmentHandlerRef const mxHandler;
     ContextInfoVec      maStack;
 };
 
diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx
index c5268af73a91..678c3a4ba630 100644
--- a/oox/source/drawingml/chart/converterbase.cxx
+++ b/oox/source/drawingml/chart/converterbase.cxx
@@ -146,7 +146,7 @@ struct ConverterData
     XmlFilterBase&      mrFilter;
     ChartConverter&     mrConverter;
     Reference< XChartDocument > mxDoc;
-    awt::Size                maSize;
+    awt::Size const          maSize;
 
     explicit            ConverterData(
                             XmlFilterBase& rFilter,
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index 5b5f67b39d5b..2e13a0416e6a 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -53,9 +53,9 @@ namespace {
 
 struct AutoFormatPatternEntry
 {
-    sal_Int32           mnColorToken;       /// Theme color token.
-    sal_Int32           mnModToken;         /// Color modification token.
-    sal_Int32           mnModValue;         /// Color modification value.
+    sal_Int32 const     mnColorToken;       /// Theme color token.
+    sal_Int32 const     mnModToken;         /// Color modification token.
+    sal_Int32 const     mnModValue;         /// Color modification value.
 };
 
 #define AUTOFORMAT_PATTERN_COLOR( color_token ) \
@@ -117,15 +117,15 @@ static const AutoFormatPatternEntry spAutoFormatPattern4[] =
 
 struct AutoFormatEntry
 {
-    sal_Int32           mnFirstStyleIdx;    /// First chart style index.
-    sal_Int32           mnLastStyleIdx;     /// Last chart style index.
-    sal_Int32           mnThemedIdx;        /// Themed style index.
-    sal_Int32           mnColorToken;       /// Theme color token.
-    sal_Int32           mnModToken;         /// Color modification token.
-    sal_Int32           mnModValue;         /// Color modification value.
-    sal_Int32           mnRelLineWidth;     /// Relative line width (percent).
+    sal_Int32 const     mnFirstStyleIdx;    /// First chart style index.
+    sal_Int32 const     mnLastStyleIdx;     /// Last chart style index.
+    sal_Int32 const     mnThemedIdx;        /// Themed style index.
+    sal_Int32 const     mnColorToken;       /// Theme color token.
+    sal_Int32 const     mnModToken;         /// Color modification token.
+    sal_Int32 const     mnModValue;         /// Color modification value.
+    sal_Int32 const     mnRelLineWidth;     /// Relative line width (percent).
     const AutoFormatPatternEntry* mpPattern;/// Color cycling pattern for data series.
-    bool                mbFadedColor;       /// True = Faded color for data series.
+    bool const          mbFadedColor;       /// True = Faded color for data series.
 };
 
 #define AUTOFORMAT_COLOR( first, last, themed_style, color_token ) \
@@ -394,13 +394,13 @@ const AutoFormatEntry* lclGetAutoFormatEntry( const AutoFormatEntry* pEntries, s
 
 struct AutoTextEntry
 {
-    sal_Int32           mnFirstStyleIdx;    /// First chart style index.
-    sal_Int32           mnLastStyleIdx;     /// Last chart style index.
-    sal_Int32           mnThemedFont;       /// Themed font (minor/major).
-    sal_Int32           mnColorToken;       /// Theme color token.
-    sal_Int32           mnDefFontSize;      /// Default font size (1/100 points).
-    sal_Int32           mnRelFontSize;      /// Font size relative to chart global font (percent).
-    bool                mbBold;             /// True = bold font.
+    sal_Int32 const     mnFirstStyleIdx;    /// First chart style index.
+    sal_Int32 const     mnLastStyleIdx;     /// Last chart style index.
+    sal_Int32 const     mnThemedFont;       /// Themed font (minor/major).
+    sal_Int32 const     mnColorToken;       /// Theme color token.
+    sal_Int32 const     mnDefFontSize;      /// Default font size (1/100 points).
+    sal_Int32 const     mnRelFontSize;      /// Font size relative to chart global font (percent).
+    bool const          mbBold;             /// True = bold font.
 };
 
 #define AUTOTEXT_COLOR( first, last, themed_font, color_token, def_font_size, rel_font_size, bold ) \
@@ -505,7 +505,7 @@ struct ObjectTypeFormatEntry
     const AutoFormatEntry* mpAutoLines;     /// Automatic line formatting for all chart styles.
     const AutoFormatEntry* mpAutoFills;     /// Automatic fill formatting for all chart styles.
     const AutoTextEntry* mpAutoTexts;       /// Automatic text attributes for all chart styles.
-    bool                mbIsFrame;          /// True = object is a frame, false = object is a line.
+    bool const          mbIsFrame;          /// True = object is a frame, false = object is a line.
     ObjectTypeFormatEntry(ObjectType eObjType, const ShapePropertyInfo& rPropInfo,
                                  const AutoFormatEntry* pAutoLines,
                                  const AutoFormatEntry* pAutoFills,
@@ -704,8 +704,8 @@ struct ObjectFormatterData
     ModelObjectHelper   maModelObjHelper;       /// Helper for named drawing formatting (dashes, gradients, bitmaps).
     Reference< XNumberFormats > mxNumFmts;      /// Number formats collection of container document.
     Reference< XNumberFormatTypes > mxNumTypes; /// Number format types collection of container document.
-    Locale              maEnUsLocale;           /// Locale struct containing en-US.
-    Locale              maFromLocale;           /// Empty locale struct.
+    Locale const        maEnUsLocale;           /// Locale struct containing en-US.
+    Locale const        maFromLocale;           /// Empty locale struct.
     sal_Int32           mnMaxSeriesIdx;         /// Maximum series index used for color cycling/fading.
 
     explicit            ObjectFormatterData(
diff --git a/oox/source/drawingml/clrscheme.cxx b/oox/source/drawingml/clrscheme.cxx
index 8e2272f0039b..47d9426e0646 100644
--- a/oox/source/drawingml/clrscheme.cxx
+++ b/oox/source/drawingml/clrscheme.cxx
@@ -58,7 +58,7 @@ struct find_by_token
     }
 
 private:
-    sal_Int32 m_token;
+    sal_Int32 const m_token;
 };
 
 bool ClrScheme::getColor( sal_Int32 nSchemeClrToken, ::Color& rColor ) const
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index bc4582cb7276..deeff8ee4837 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -63,7 +63,7 @@ enum FormularCommand
 struct FormularCommandNameTable
 {
     const char*     pS;
-    FormularCommand pE;
+    FormularCommand const pE;
 };
 static const FormularCommandNameTable pFormularCommandNameTable[] =
 {
diff --git a/oox/source/drawingml/diagram/diagramfragmenthandler.hxx b/oox/source/drawingml/diagram/diagramfragmenthandler.hxx
index 7783fdfd8f3c..80537f5f7eac 100644
--- a/oox/source/drawingml/diagram/diagramfragmenthandler.hxx
+++ b/oox/source/drawingml/diagram/diagramfragmenthandler.hxx
@@ -36,7 +36,7 @@ public:
 
 private:
 
-    DiagramDataPtr  mpDataPtr;
+    DiagramDataPtr const mpDataPtr;
 };
 
 class DiagramLayoutFragmentHandler : public ::oox::core::FragmentHandler2
@@ -50,7 +50,7 @@ public:
 
 private:
 
-    DiagramLayoutPtr    mpDataPtr;
+    DiagramLayoutPtr const mpDataPtr;
 };
 
 class DiagramQStylesFragmentHandler : public ::oox::core::FragmentHandler2
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
index 5ab34b042c86..606e8794becc 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
@@ -184,7 +184,7 @@ private:
     const dgm::Point* getPresNode() const;
     sal_Int32 getNodeCount() const;
 
-    bool          mIsElse;
+    bool const    mIsElse;
     IteratorAttr  maIter;
     ConditionAttr maCond;
 };
@@ -260,7 +260,7 @@ public:
         { return mpShapeTemplate; }
 
 private:
-    ShapePtr mpShapeTemplate;
+    ShapePtr const mpShapeTemplate;
 };
 
 typedef std::shared_ptr< ShapeAtom > ShapeAtomPtr;
diff --git a/oox/source/dump/dffdumper.cxx b/oox/source/dump/dffdumper.cxx
index 8cf2c9ee207d..f3d760f23a02 100644
--- a/oox/source/dump/dffdumper.cxx
+++ b/oox/source/dump/dffdumper.cxx
@@ -158,10 +158,10 @@ enum PropType { PROPTYPE_BINARY, PROPTYPE_STRING, PROPTYPE_BLIP, PROPTYPE_COLORA
 
 struct PropInfo
 {
-    OUString            maName;
-    PropType            meType;
-    sal_uInt16          mnId;
-    sal_uInt32          mnSize;
+    OUString const      maName;
+    PropType const      meType;
+    sal_uInt16 const    mnId;
+    sal_uInt32 const    mnSize;
     explicit     PropInfo( const OUString& rName, PropType eType, sal_uInt16 nId, sal_uInt32 nSize ) :
                             maName( rName ), meType( eType ), mnId( nId ), mnSize( nSize ) {}
 };
diff --git a/oox/source/export/ColorPropertySet.cxx b/oox/source/export/ColorPropertySet.cxx
index af70f58c1066..8c48022c4288 100644
--- a/oox/source/export/ColorPropertySet.cxx
+++ b/oox/source/export/ColorPropertySet.cxx
@@ -47,7 +47,7 @@ protected:
     virtual sal_Bool SAL_CALL hasPropertyByName( const OUString& Name ) override;
 
 private:
-    OUString m_aColorPropName;
+    OUString const m_aColorPropName;
     Property m_aColorProp;
 };
 
diff --git a/oox/source/export/ColorPropertySet.hxx b/oox/source/export/ColorPropertySet.hxx
index e1734422ac8c..1ac05f5cf823 100644
--- a/oox/source/export/ColorPropertySet.hxx
+++ b/oox/source/export/ColorPropertySet.hxx
@@ -75,10 +75,10 @@ protected:
 
 private:
     css::uno::Reference< css::beans::XPropertySetInfo > m_xInfo;
-    OUString         m_aColorPropName;
+    OUString const   m_aColorPropName;
     ::Color          m_nColor;
-    bool             m_bIsFillColor;
-    ::Color          m_nDefaultColor;
+    bool const       m_bIsFillColor;
+    ::Color const    m_nDefaultColor;
 };
 
 } //  namespace chart
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index ded91c2b47d1..800434923d25 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -154,7 +154,7 @@ public:
     }
 
 private:
-    OUString m_aRole;
+    OUString const m_aRole;
 };
 
 static Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Reference< chart2::XDiagram > & xDiagram )
diff --git a/oox/source/helper/progressbar.cxx b/oox/source/helper/progressbar.cxx
index 5158b3188c1f..cf74b0341736 100644
--- a/oox/source/helper/progressbar.cxx
+++ b/oox/source/helper/progressbar.cxx
@@ -85,8 +85,8 @@ public:
 
 private:
     IProgressBar&       mrParentProgress;
-    double              mfStartPos;
-    double              mfLength;
+    double const        mfStartPos;
+    double const        mfLength;
     double              mfPosition;
     double              mfFreeStart;
 };
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 563cf06e5a54..de849f9019e2 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -653,9 +653,7 @@ ComCtlModelBase::ComCtlModelBase( sal_uInt32 nDataPartId5, sal_uInt32 nDataPartI
     mnFlags( 0 ),
     mnVersion( nVersion ),
     mnDataPartId5( nDataPartId5 ),
-    mnDataPartId6( nDataPartId6 ),
-    mbCommonPart( true ),
-    mbComplexPart( true )
+    mnDataPartId6( nDataPartId6 )
 {
 }
 
@@ -665,15 +663,13 @@ bool ComCtlModelBase::importBinaryModel( BinaryInputStream& rInStrm )
     if( importSizePart( rInStrm ) && readPartHeader( rInStrm, getDataPartId(), mnVersion ) )
     {
         // if flags part exists, the first int32 of the data part contains its size
-        sal_uInt32 nCommonPartSize = 0;
-        if (mbCommonPart)
-            nCommonPartSize = rInStrm.readuInt32();
+        sal_uInt32 nCommonPartSize = rInStrm.readuInt32();
         // implementations must read the exact amount of data, stream must point to its end afterwards
         importControlData( rInStrm );
         // read following parts
         if( !rInStrm.isEof() &&
-            (!mbCommonPart || importCommonPart( rInStrm, nCommonPartSize )) &&
-            (!mbComplexPart || importComplexPart( rInStrm )) )
+            importCommonPart( rInStrm, nCommonPartSize ) &&
+            importComplexPart( rInStrm ) )
         {
             return !rInStrm.isEof();
         }
@@ -683,8 +679,7 @@ bool ComCtlModelBase::importBinaryModel( BinaryInputStream& rInStrm )
 
 void ComCtlModelBase::convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const
 {
-    if( mbCommonPart )
-        rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, COMCTL_COMMON_ENABLED ) );
+    rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, COMCTL_COMMON_ENABLED ) );
     ControlModelBase::convertProperties( rPropMap, rConv );
 }
 
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index badce2a89fc4..55d626279476 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -97,7 +97,7 @@ struct GUIDCNamePair
 struct IdCntrlData
 {
     sal_Int16 nId;
-    GUIDCNamePair aData;
+    GUIDCNamePair const aData;
 };
 
 const sal_Int16 TOGGLEBUTTON = -1;
diff --git a/oox/source/ole/olestorage.cxx b/oox/source/ole/olestorage.cxx
index 2a400ff7087c..92bdca21321a 100644
--- a/oox/source/ole/olestorage.cxx
+++ b/oox/source/ole/olestorage.cxx
@@ -80,7 +80,7 @@ private:
     Reference< XStream > mxTempFile;
     Reference< XOutputStream > mxOutStrm;
     Reference< XSeekable > mxSeekable;
-    OUString            maElementName;
+    OUString const      maElementName;
 };
 
 OleOutputStream::OleOutputStream( const Reference< XComponentContext >& rxContext,
diff --git a/oox/source/ppt/animvariantcontext.hxx b/oox/source/ppt/animvariantcontext.hxx
index 03eac37b92ba..9f02e709665a 100644
--- a/oox/source/ppt/animvariantcontext.hxx
+++ b/oox/source/ppt/animvariantcontext.hxx
@@ -38,7 +38,7 @@ namespace oox { namespace ppt {
         virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override;
 
     private:
-        ::sal_Int32                 mnElement;
+        ::sal_Int32 const           mnElement;
         css::uno::Any&              maValue;
         ::oox::drawingml::Color     maColor;
     };
diff --git a/oox/source/ppt/extdrawingfragmenthandler.hxx b/oox/source/ppt/extdrawingfragmenthandler.hxx
index 48a1f614c0c8..83dfcd216e8f 100644
--- a/oox/source/ppt/extdrawingfragmenthandler.hxx
+++ b/oox/source/ppt/extdrawingfragmenthandler.hxx
@@ -33,7 +33,7 @@ public:
 private:
         const oox::ppt::SlidePersistPtr mpSlidePersistPtr;
         const oox::ppt::ShapeLocation   meShapeLocation;
-        oox::drawingml::ShapePtr        mpGroupShapePtr;
+        oox::drawingml::ShapePtr const  mpGroupShapePtr;
         oox::drawingml::ShapePtr        mpOrgShapePtr;          // Original Shape data, if any
         oox::drawingml::ShapePtr        mpShapePtr;
 };
diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx
index ee61e3b8d137..cb95e38777e7 100644
--- a/oox/source/ppt/timenodelistcontext.cxx
+++ b/oox/source/ppt/timenodelistcontext.cxx
@@ -505,8 +505,8 @@ namespace oox { namespace ppt {
             }
 
     private:
-        sal_Int32 mnColorSpace;
-        sal_Int32 mnDir;
+        sal_Int32 const mnColorSpace;
+        sal_Int32 const mnDir;
         bool mbHasByColor;
         AnimColor m_byColor;
         oox::drawingml::Color maToClr;
diff --git a/oox/source/shape/ShapeDrawingFragmentHandler.hxx b/oox/source/shape/ShapeDrawingFragmentHandler.hxx
index b0711f8878a3..7484a4e7c7a3 100644
--- a/oox/source/shape/ShapeDrawingFragmentHandler.hxx
+++ b/oox/source/shape/ShapeDrawingFragmentHandler.hxx
@@ -25,7 +25,7 @@ public:
     virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 Element, const AttributeList& rAttribs ) override;
 
 private:
-        oox::drawingml::ShapePtr        mpGroupShapePtr;
+        oox::drawingml::ShapePtr const  mpGroupShapePtr;
 };
 
 } }
diff --git a/opencl/inc/opencl_device_selection.h b/opencl/inc/opencl_device_selection.h
index 9786dc5adfdc..982b65a5187c 100644
--- a/opencl/inc/opencl_device_selection.h
+++ b/opencl/inc/opencl_device_selection.h
@@ -89,7 +89,7 @@ struct ds_device
 struct ds_profile
 {
     std::vector<ds_device> devices;
-    OString version;
+    OString const version;
 
     ds_profile(OString const & inVersion)
         : version(inVersion)


More information about the Libreoffice-commits mailing list