diff options
Diffstat (limited to 'oox/source')
20 files changed, 53 insertions, 58 deletions
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; }; } } |