summaryrefslogtreecommitdiff
path: root/xmloff/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-12 15:51:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-13 12:56:39 +0200
commit0302c9b192c3b7ba10daabed61d6864c24c14070 (patch)
tree4c17a2ff761e0513620704bd3ecceff4107d17cc /xmloff/source
parentecf987682881258774f4ec1644474beae3366abe (diff)
loplugin:constfields in xmloff
Change-Id: I9623e6b483b28f5b50a2c76016bcc319b375a35a Reviewed-on: https://gerrit.libreoffice.org/60394 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source')
-rw-r--r--xmloff/source/chart/ColorPropertySet.cxx24
-rw-r--r--xmloff/source/chart/ColorPropertySet.hxx4
-rw-r--r--xmloff/source/chart/SchXMLAxisContext.hxx6
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx2
-rw-r--r--xmloff/source/chart/SchXMLChartContext.hxx12
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx13
-rw-r--r--xmloff/source/chart/SchXMLImport.cxx2
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.hxx14
-rw-r--r--xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx4
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx2
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.hxx6
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx2
-rw-r--r--xmloff/source/chart/XMLAxisPositionPropertyHdl.hxx2
-rw-r--r--xmloff/source/chart/XMLErrorIndicatorPropertyHdl.hxx2
-rw-r--r--xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx4
-rw-r--r--xmloff/source/chart/XMLSymbolTypePropertyHdl.hxx2
-rw-r--r--xmloff/source/chart/transporttypes.hxx2
-rw-r--r--xmloff/source/core/DocumentSettingsContext.cxx4
-rw-r--r--xmloff/source/core/RDFaImportHelper.cxx8
-rw-r--r--xmloff/source/core/xmlerror.cxx14
-rw-r--r--xmloff/source/core/xmlexp.cxx6
-rw-r--r--xmloff/source/core/xmlimp.cxx2
-rw-r--r--xmloff/source/core/xmltoken.cxx4
-rw-r--r--xmloff/source/draw/EnhancedCustomShapeToken.cxx2
-rw-r--r--xmloff/source/draw/XMLNumberStyles.cxx14
-rw-r--r--xmloff/source/draw/animexp.cxx90
-rw-r--r--xmloff/source/draw/animimp.cxx77
-rw-r--r--xmloff/source/draw/sdpropls.hxx4
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx4
-rw-r--r--xmloff/source/draw/sdxmlexp_impl.hxx2
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx17
-rw-r--r--xmloff/source/draw/sdxmlimp_impl.hxx4
-rw-r--r--xmloff/source/draw/xexptran.cxx28
-rw-r--r--xmloff/source/draw/ximpshap.hxx2
-rw-r--r--xmloff/source/draw/ximpstyl.hxx2
-rw-r--r--xmloff/source/forms/elementexport.hxx6
-rw-r--r--xmloff/source/forms/gridcolumnproptranslator.cxx4
-rw-r--r--xmloff/source/forms/propertyimport.hxx2
-rw-r--r--xmloff/source/script/xmlscripti.cxx2
-rw-r--r--xmloff/source/style/PageHeaderFooterContext.hxx4
-rw-r--r--xmloff/source/style/PageMasterPropHdl.hxx2
-rw-r--r--xmloff/source/style/XMLFontAutoStylePool.cxx12
-rw-r--r--xmloff/source/style/XMLFontStylesContext_impl.hxx2
-rw-r--r--xmloff/source/style/XMLFootnoteSeparatorImport.hxx2
-rw-r--r--xmloff/source/style/impastpl.cxx4
-rw-r--r--xmloff/source/style/impastpl.hxx14
-rw-r--r--xmloff/source/style/prstylecond.cxx4
-rw-r--r--xmloff/source/style/weighhdl.cxx4
-rw-r--r--xmloff/source/style/xmlbahdl.hxx18
-rw-r--r--xmloff/source/style/xmlexppr.cxx4
-rw-r--r--xmloff/source/style/xmlnumfe.cxx6
-rw-r--r--xmloff/source/style/xmlnumfi.cxx24
-rw-r--r--xmloff/source/style/xmlprmap.cxx2
-rw-r--r--xmloff/source/style/xmlstyle.cxx6
-rw-r--r--xmloff/source/table/XMLTableImport.cxx8
-rw-r--r--xmloff/source/table/table.hxx2
-rw-r--r--xmloff/source/text/XMLChangeElementImportContext.hxx2
-rw-r--r--xmloff/source/text/XMLChangeImportContext.hxx4
-rw-r--r--xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx2
-rw-r--r--xmloff/source/text/XMLIndexChapterInfoEntryContext.hxx2
-rw-r--r--xmloff/source/text/XMLIndexMarkExport.cxx58
-rw-r--r--xmloff/source/text/XMLIndexMarkExport.hxx25
-rw-r--r--xmloff/source/text/XMLIndexSourceBaseContext.hxx2
-rw-r--r--xmloff/source/text/XMLIndexTemplateContext.hxx4
-rw-r--r--xmloff/source/text/XMLPropertyBackpatcher.hxx2
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx10
-rw-r--r--xmloff/source/text/XMLTextFrameHyperlinkContext.hxx2
-rw-r--r--xmloff/source/text/XMLTextListAutoStylePool.cxx2
-rw-r--r--xmloff/source/text/txtimp.cxx10
-rw-r--r--xmloff/source/text/txtparai.hxx2
-rw-r--r--xmloff/source/text/txtparaimphint.hxx10
-rw-r--r--xmloff/source/text/txtprhdl.cxx2
-rw-r--r--xmloff/source/transform/NotesTContext.hxx2
-rw-r--r--xmloff/source/xforms/xformsexport.cxx2
74 files changed, 339 insertions, 323 deletions
diff --git a/xmloff/source/chart/ColorPropertySet.cxx b/xmloff/source/chart/ColorPropertySet.cxx
index c0f0011ceb6d..86a03ec34a29 100644
--- a/xmloff/source/chart/ColorPropertySet.cxx
+++ b/xmloff/source/chart/ColorPropertySet.cxx
@@ -45,13 +45,16 @@ protected:
virtual sal_Bool SAL_CALL hasPropertyByName( const OUString& Name ) override;
private:
- OUString m_aColorPropName;
+ static constexpr OUStringLiteral g_aColorPropName = "FillColor";
Property m_aColorProp;
};
+#if !HAVE_CPP_INLINE_VARIABLES
+constexpr OUStringLiteral lcl_ColorPropertySetInfo::g_aColorPropName;
+#endif
+
lcl_ColorPropertySetInfo::lcl_ColorPropertySetInfo() :
- m_aColorPropName( "FillColor" ),
- m_aColorProp( m_aColorPropName, -1,
+ m_aColorProp( g_aColorPropName, -1,
cppu::UnoType<sal_Int32>::get(), 0)
{}
@@ -63,14 +66,14 @@ Sequence< Property > SAL_CALL lcl_ColorPropertySetInfo::getProperties()
Property SAL_CALL lcl_ColorPropertySetInfo::getPropertyByName( const OUString& aName )
{
- if( aName == m_aColorPropName )
+ if( aName == g_aColorPropName )
return m_aColorProp;
- throw UnknownPropertyException( m_aColorPropName, static_cast< uno::XWeak * >( this ));
+ throw UnknownPropertyException( g_aColorPropName, static_cast< uno::XWeak * >( this ));
}
sal_Bool SAL_CALL lcl_ColorPropertySetInfo::hasPropertyByName( const OUString& Name )
{
- return Name == m_aColorPropName;
+ return Name == g_aColorPropName;
}
} // anonymous namespace
@@ -80,8 +83,11 @@ namespace xmloff
namespace chart
{
+#if !HAVE_CPP_INLINE_VARIABLES
+constexpr OUStringLiteral ColorPropertySet::g_aColorPropName;
+#endif
+
ColorPropertySet::ColorPropertySet( sal_Int32 nColor ) :
- m_aColorPropName( "FillColor" ),
m_nColor( nColor ),
m_nDefaultColor( 0x0099ccff ) // blue 8
{}
@@ -144,13 +150,13 @@ Sequence< PropertyState > SAL_CALL ColorPropertySet::getPropertyStates( const Se
void SAL_CALL ColorPropertySet::setPropertyToDefault( const OUString& PropertyName )
{
- if( PropertyName == m_aColorPropName )
+ if( PropertyName == g_aColorPropName )
m_nColor = m_nDefaultColor;
}
uno::Any SAL_CALL ColorPropertySet::getPropertyDefault( const OUString& aPropertyName )
{
- if( aPropertyName == m_aColorPropName )
+ if( aPropertyName == g_aColorPropName )
return uno::makeAny( m_nDefaultColor );
return uno::Any();
}
diff --git a/xmloff/source/chart/ColorPropertySet.hxx b/xmloff/source/chart/ColorPropertySet.hxx
index 772aa002ef46..739ed50315bf 100644
--- a/xmloff/source/chart/ColorPropertySet.hxx
+++ b/xmloff/source/chart/ColorPropertySet.hxx
@@ -71,9 +71,9 @@ protected:
private:
css::uno::Reference< css::beans::XPropertySetInfo > m_xInfo;
- OUString m_aColorPropName;
+ static constexpr OUStringLiteral g_aColorPropName = "FillColor";
Color m_nColor;
- Color m_nDefaultColor;
+ Color const m_nDefaultColor;
};
} // namespace chart
diff --git a/xmloff/source/chart/SchXMLAxisContext.hxx b/xmloff/source/chart/SchXMLAxisContext.hxx
index 8a97b413210d..7ece3f353f79 100644
--- a/xmloff/source/chart/SchXMLAxisContext.hxx
+++ b/xmloff/source/chart/SchXMLAxisContext.hxx
@@ -59,9 +59,9 @@ private:
sal_Int32 m_nAxisType;//css::chart::ChartAxisType
bool m_bAxisTypeImported;
bool m_bDateScaleImported;
- bool m_bAddMissingXAxisForNetCharts; //to correct errors from older versions
- bool m_bAdaptWrongPercentScaleValues; //to correct errors from older versions
- bool m_bAdaptXAxisOrientationForOld2DBarCharts; //to correct different behaviour from older versions
+ bool const m_bAddMissingXAxisForNetCharts; //to correct errors from older versions
+ bool const m_bAdaptWrongPercentScaleValues; //to correct errors from older versions
+ bool const m_bAdaptXAxisOrientationForOld2DBarCharts; //to correct different behaviour from older versions
bool& m_rbAxisPositionAttributeImported;
css::uno::Reference< css::drawing::XShape > getTitleShape();
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 3766ffc25e91..3864308f40dc 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -445,7 +445,7 @@ namespace
struct NewDonutSeries
{
css::uno::Reference< css::chart2::XDataSeries > m_xSeries;
- OUString msStyleName;
+ OUString const msStyleName;
sal_Int32 mnAttachedAxis;
::std::vector< OUString > m_aSeriesStyles;
diff --git a/xmloff/source/chart/SchXMLChartContext.hxx b/xmloff/source/chart/SchXMLChartContext.hxx
index bde9b787831b..c1d872eeeee3 100644
--- a/xmloff/source/chart/SchXMLChartContext.hxx
+++ b/xmloff/source/chart/SchXMLChartContext.hxx
@@ -51,12 +51,12 @@ struct SeriesDefaultsAndStyles
css::uno::Any maSymbolTypeDefault;
css::uno::Any maDataCaptionDefault;
- css::uno::Any maErrorIndicatorDefault;
- css::uno::Any maErrorCategoryDefault;
- css::uno::Any maConstantErrorLowDefault;
- css::uno::Any maConstantErrorHighDefault;
- css::uno::Any maPercentageErrorDefault;
- css::uno::Any maErrorMarginDefault;
+ css::uno::Any const maErrorIndicatorDefault;
+ css::uno::Any const maErrorCategoryDefault;
+ css::uno::Any const maConstantErrorLowDefault;
+ css::uno::Any const maConstantErrorHighDefault;
+ css::uno::Any const maPercentageErrorDefault;
+ css::uno::Any const maErrorMarginDefault;
css::uno::Any maMeanValueDefault;
css::uno::Any maRegressionCurvesDefault;
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 94e1fea31043..49a18503c2ab 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -249,7 +249,7 @@ public:
rtl::Reference< XMLPropertySetMapper > mxPropertySetMapper;
rtl::Reference< XMLChartExportPropertyMapper > mxExpPropMapper;
- OUString msTableName;
+ static constexpr OUStringLiteral gsTableName = "local-table";
OUStringBuffer msStringBuffer;
OUString msString;
@@ -260,7 +260,7 @@ public:
OUString msTableNumberList;
css::uno::Sequence< sal_Int32 > maSequenceMapping;
- OUString msCLSID;
+ OUString const msCLSID;
OUString maSrcShellID;
OUString maDestShellID;
@@ -271,6 +271,10 @@ public:
OUString maCategoriesRange;
};
+#if !HAVE_CPP_INLINE_VARIABLES
+constexpr OUStringLiteral SchXMLExportHelper_Impl::gsTableName;
+#endif
+
namespace
{
@@ -294,7 +298,7 @@ public:
}
private:
- OUString m_aRole;
+ OUString const m_aRole;
};
template< typename T >
@@ -1019,7 +1023,6 @@ SchXMLExportHelper_Impl::SchXMLExportHelper_Impl(
mrAutoStylePool( rASPool ),
mxPropertySetMapper( new XMLChartPropertySetMapper( true ) ),
mxExpPropMapper( new XMLChartExportPropertyMapper( mxPropertySetMapper, rExport ) ),
- msTableName("local-table"),
mbHasCategoryLabels( false ),
mbRowSourceColumns( true ),
msCLSID( SvGlobalName( SO3_SCH_CLASSID ).GetHexName() )
@@ -1530,7 +1533,7 @@ static void lcl_exportComplexLabel( const Sequence< uno::Any >& rComplexLabel, S
void SchXMLExportHelper_Impl::exportTable()
{
// table element
- mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_NAME, msTableName );
+ mrExport.AddAttribute( XML_NAMESPACE_TABLE, XML_NAME, gsTableName );
try
{
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
index f79b88d99877..766c5983beab 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -76,7 +76,7 @@ public:
}
private:
- OUString m_aChartTypeName;
+ OUString const m_aChartTypeName;
};
} // anonymous namespace
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx
index 63c841a3c9f7..a35723150403 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx
@@ -128,12 +128,12 @@ private:
bool & mrColHasLabels;
bool & mrRowHasLabels;
css::chart::ChartDataRowSource & mrDataRowSource;
- OUString maChartTypeServiceName;
+ OUString const maChartTypeServiceName;
tSchXMLLSequencesPerIndex & mrLSequencesPerIndex;
bool mbGlobalChartTypeUsedBySeries;
- css::awt::Size maChartSize;
+ css::awt::Size const maChartSize;
};
class SchXMLDataPointContext : public SvXMLImportContext
@@ -142,7 +142,7 @@ private:
::std::vector< DataRowPointStyle >& mrStyleVector;
css::uno::Reference< css::chart2::XDataSeries > m_xSeries;
sal_Int32& mrIndex;
- bool mbSymbolSizeForSeriesIsMissingInFile;
+ bool const mbSymbolSizeForSeriesIsMissingInFile;
public:
SchXMLDataPointContext( SvXMLImport& rImport, const OUString& rLocalName,
@@ -182,7 +182,7 @@ public:
private:
SchXMLImportHelper& mrImportHelper;
css::uno::Reference< css::chart::X3DDisplay > mxWallFloorSupplier;
- ContextType meContextType;
+ ContextType const meContextType;
public:
SchXMLWallFloorContext( SchXMLImportHelper& rImportHelper,
@@ -208,7 +208,7 @@ public:
private:
SchXMLImportHelper& mrImportHelper;
css::uno::Reference< css::chart::XStatisticDisplay > mxStockPropProvider;
- ContextType meContextType;
+ ContextType const meContextType;
public:
SchXMLStockContext( SchXMLImportHelper& rImportHelper,
@@ -249,8 +249,8 @@ private:
SchXMLImportHelper & mrImportHelper;
::std::vector< DataRowPointStyle > & mrStyleVector;
css::uno::Reference< css::chart2::XDataSeries > m_xSeries;
- ContextType meContextType;
- OUString maSeriesStyleName;
+ ContextType const meContextType;
+ OUString const maSeriesStyleName;
tSchXMLLSequencesPerIndex& mrLSequencesPerIndex;
};
diff --git a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx
index e19fa83d8f40..1b41fcda951a 100644
--- a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx
+++ b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx
@@ -51,7 +51,7 @@ private:
SchXMLImportHelper& mrImportHelper;
css::uno::Reference<css::chart2::XDataSeries > mxSeries;
- css::awt::Size maChartSize;
+ css::awt::Size const maChartSize;
std::vector< RegressionStyle >& mrRegressionStyleVector;
};
@@ -73,7 +73,7 @@ public:
private:
SchXMLImportHelper& mrImportHelper;
RegressionStyle& mrRegressionStyle;
- css::awt::Size maChartSize;
+ css::awt::Size const maChartSize;
};
#endif // INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLREGRESSIONCURVEOBJECTCONTEXT_HXX
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index 4b934377d085..c1c3c46a4b56 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -503,7 +503,7 @@ struct DomainInfo
: aRole(rRole), aRange(rRange), nIndexForLocalData(nIndex)
{}
- OUString aRole;
+ OUString const aRole;
OUString aRange;
sal_Int32 nIndexForLocalData;
};
diff --git a/xmloff/source/chart/SchXMLSeries2Context.hxx b/xmloff/source/chart/SchXMLSeries2Context.hxx
index 880b8313e172..d7ce56f4ec38 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.hxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.hxx
@@ -49,9 +49,9 @@ private:
::std::vector< RegressionStyle >& mrRegressionStyleVector;
css::uno::Reference< css::chart2::XDataSeries > m_xSeries;
- sal_Int32 mnSeriesIndex;
+ sal_Int32 const mnSeriesIndex;
sal_Int32 mnDataPointIndex;
- bool m_bStockHasVolume;
+ bool const m_bStockHasVolume;
GlobalSeriesImportInfo& m_rGlobalSeriesImportInfo;
@@ -67,7 +67,7 @@ private:
tSchXMLLSequencesPerIndex maPostponedSequences;
bool& mrGlobalChartTypeUsedBySeries;
bool mbSymbolSizeIsMissingInFile;
- css::awt::Size maChartSize;
+ css::awt::Size const maChartSize;
public:
SchXMLSeries2Context( SchXMLImportHelper& rImpHelper,
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index 721ac1cf3801..ad38d26f9081 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -95,7 +95,7 @@ struct lcl_ApplyCellToData
private:
Sequence< double > & m_rData;
sal_Int32 m_nIndex;
- sal_Int32 m_nSize;
+ sal_Int32 const m_nSize;
double m_fNaN;
};
diff --git a/xmloff/source/chart/XMLAxisPositionPropertyHdl.hxx b/xmloff/source/chart/XMLAxisPositionPropertyHdl.hxx
index 485b7a89c379..4610c3a0fc55 100644
--- a/xmloff/source/chart/XMLAxisPositionPropertyHdl.hxx
+++ b/xmloff/source/chart/XMLAxisPositionPropertyHdl.hxx
@@ -31,7 +31,7 @@ public:
virtual bool exportXML( OUString& rStrExpValue, const css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const override;
private:
- bool m_bCrossingValue;
+ bool const m_bCrossingValue;
};
#endif // INCLUDED_XMLOFF_SOURCE_CHART_XMLAXISPOSITIONPROPERTYHDL_HXX
diff --git a/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.hxx b/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.hxx
index 6e4de8706283..d44dc928bd1b 100644
--- a/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.hxx
+++ b/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.hxx
@@ -24,7 +24,7 @@
class XMLErrorIndicatorPropertyHdl : public XMLPropertyHandler
{
private:
- bool mbUpperIndicator;
+ bool const mbUpperIndicator;
public:
explicit XMLErrorIndicatorPropertyHdl( bool bUpper ) : mbUpperIndicator( bUpper )
diff --git a/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx b/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx
index ff956bc59f2f..b69c36536def 100644
--- a/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx
+++ b/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx
@@ -28,8 +28,8 @@ namespace
{
struct SvXMLSignedEnumMapEntry
{
- ::xmloff::token::XMLTokenEnum eToken;
- sal_Int32 nValue;
+ ::xmloff::token::XMLTokenEnum const eToken;
+ sal_Int32 const nValue;
};
const SvXMLSignedEnumMapEntry aXMLChartSymbolTypeEnumMap[] =
diff --git a/xmloff/source/chart/XMLSymbolTypePropertyHdl.hxx b/xmloff/source/chart/XMLSymbolTypePropertyHdl.hxx
index 475463a5943b..fde168ce58a3 100644
--- a/xmloff/source/chart/XMLSymbolTypePropertyHdl.hxx
+++ b/xmloff/source/chart/XMLSymbolTypePropertyHdl.hxx
@@ -31,7 +31,7 @@ public:
virtual bool exportXML( OUString& rStrExpValue, const css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const override;
private:
- bool m_bIsNamedSymbol;
+ bool const m_bIsNamedSymbol;
};
#endif // INCLUDED_XMLOFF_SOURCE_CHART_XMLSYMBOLTYPEPROPERTYHDL_HXX
diff --git a/xmloff/source/chart/transporttypes.hxx b/xmloff/source/chart/transporttypes.hxx
index 16985db9022e..44d3bc3a7b22 100644
--- a/xmloff/source/chart/transporttypes.hxx
+++ b/xmloff/source/chart/transporttypes.hxx
@@ -135,7 +135,7 @@ struct RegressionStyle
css::uno::Reference<
css::beans::XPropertySet > m_xEquationProperties;
- OUString msStyleName;
+ OUString const msStyleName;
RegressionStyle(const css::uno::Reference<
css::chart2::XDataSeries >& xSeries,
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx
index 8179c5ace523..19f755fb6f29 100644
--- a/xmloff/source/core/DocumentSettingsContext.cxx
+++ b/xmloff/source/core/DocumentSettingsContext.cxx
@@ -189,7 +189,7 @@ public:
class XMLConfigItemMapIndexedContext : public XMLConfigBaseContext
{
private:
- OUString maConfigItemName;
+ OUString const maConfigItemName;
public:
XMLConfigItemMapIndexedContext(SvXMLImport& rImport, sal_uInt16 nPrfx,
@@ -253,7 +253,7 @@ namespace
{
struct SettingsGroup
{
- OUString sGroupName;
+ OUString const sGroupName;
uno::Any aSettings;
SettingsGroup( const OUString& _rGroupName, const uno::Any& _rSettings )
diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx
index 4cb9f729b46d..e4651faa0f1d 100644
--- a/xmloff/source/core/RDFaImportHelper.cxx
+++ b/xmloff/source/core/RDFaImportHelper.cxx
@@ -108,10 +108,10 @@ public:
/** store parsed RDFa attributes */
struct ParsedRDFaAttributes
{
- OUString m_About;
- ::std::vector< OUString > m_Properties;
- OUString m_Content;
- OUString m_Datatype;
+ OUString const m_About;
+ ::std::vector< OUString > const m_Properties;
+ OUString const m_Content;
+ OUString const m_Datatype;
ParsedRDFaAttributes(
OUString const & i_rAbout,
diff --git a/xmloff/source/core/xmlerror.cxx b/xmloff/source/core/xmlerror.cxx
index d7dba21a6870..a19a6ae23df8 100644
--- a/xmloff/source/core/xmlerror.cxx
+++ b/xmloff/source/core/xmlerror.cxx
@@ -51,18 +51,18 @@ public:
const OUString& rPublicId,
const OUString& rSystemId);
- sal_Int32 nId; /// error ID
+ sal_Int32 const nId; /// error ID
- OUString sExceptionMessage;/// message of original exception (if available)
+ OUString const sExceptionMessage;/// message of original exception (if available)
// XLocator information:
- sal_Int32 nRow; /// row number where error occurred (or -1 for unknown)
- sal_Int32 nColumn; /// column number where error occurred (or -1)
- OUString sPublicId; /// public identifier
- OUString sSystemId; /// public identifier
+ sal_Int32 const nRow; /// row number where error occurred (or -1 for unknown)
+ sal_Int32 const nColumn; /// column number where error occurred (or -1)
+ OUString const sPublicId; /// public identifier
+ OUString const sSystemId; /// public identifier
/// message Parameters
- Sequence<OUString> aParams;
+ Sequence<OUString> const aParams;
};
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 86dc9404bed7..fc30db7b8bb2 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -127,9 +127,9 @@ namespace {
struct XMLServiceMapEntry_Impl
{
const sal_Char *sModelService;
- sal_Int32 nModelServiceLen;
+ sal_Int32 const nModelServiceLen;
const sal_Char *sFilterService;
- sal_Int32 nFilterServiceLen;
+ sal_Int32 const nFilterServiceLen;
};
}
@@ -255,7 +255,7 @@ public:
uno::Reference< embed::XStorage > mxTargetStorage;
- SvtSaveOptions maSaveOptions;
+ SvtSaveOptions const maSaveOptions;
/// name of stream in package, e.g., "content.xml"
OUString mStreamName;
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 5f31846b9aa2..841487b296cf 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -275,7 +275,7 @@ public:
bool mbTextDocInOOoFileFormat;
const uno::Reference< uno::XComponentContext > mxComponentContext;
- OUString implementationName;
+ OUString const implementationName;
uno::Reference< embed::XStorage > mxSourceStorage;
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index cd3fcddf4587..8a40bdc11fc9 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -29,11 +29,11 @@ namespace xmloff { namespace token {
{
struct XMLTokenEntry
{
- sal_Int32 nLength;
+ sal_Int32 const nLength;
const sal_Char* pChar;
OUString* pOUString;
#if OSL_DEBUG_LEVEL > 0
- XMLTokenEnum eToken;
+ XMLTokenEnum const eToken;
#endif
};
}
diff --git a/xmloff/source/draw/EnhancedCustomShapeToken.cxx b/xmloff/source/draw/EnhancedCustomShapeToken.cxx
index 179899619b23..8746974b2dac 100644
--- a/xmloff/source/draw/EnhancedCustomShapeToken.cxx
+++ b/xmloff/source/draw/EnhancedCustomShapeToken.cxx
@@ -36,7 +36,7 @@ static ::osl::Mutex& getHashMapMutex()
struct TokenTable
{
const char* pS;
- EnhancedCustomShapeTokenEnum pE;
+ EnhancedCustomShapeTokenEnum const pE;
};
static const TokenTable pTokenTableArray[] =
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx
index cde5c2c29583..191bf5f75270 100644
--- a/xmloff/source/draw/XMLNumberStyles.cxx
+++ b/xmloff/source/draw/XMLNumberStyles.cxx
@@ -33,10 +33,10 @@ using namespace ::xmloff::token;
struct SdXMLDataStyleNumber
{
- enum XMLTokenEnum meNumberStyle;
- bool mbLong;
- bool mbTextual;
- bool mbDecimal02;
+ enum XMLTokenEnum const meNumberStyle;
+ bool const mbLong;
+ bool const mbTextual;
+ bool const mbDecimal02;
const char* mpText;
}
const aSdXMLDataStyleNumbers[] =
@@ -88,8 +88,8 @@ const aSdXMLDataStyleNumbers[] =
struct SdXMLFixedDataStyle
{
const char* mpName;
- bool mbAutomatic;
- bool mbDateStyle;
+ bool const mbAutomatic;
+ bool const mbDateStyle;
sal_uInt8 mpFormat[8];
};
@@ -481,7 +481,7 @@ class SdXMLNumberFormatMemberImportContext : public SvXMLImportContext
private:
SdXMLNumberFormatImportContext* mpParent;
- OUString maNumberStyle;
+ OUString const maNumberStyle;
bool mbLong;
bool mbTextual;
bool mbDecimal02;
diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx
index 49c436ae536b..dc17b1776102 100644
--- a/xmloff/source/draw/animexp.cxx
+++ b/xmloff/source/draw/animexp.cxx
@@ -50,10 +50,10 @@ using namespace ::xmloff::token;
const struct Effect
{
- XMLEffect meKind;
- XMLEffectDirection meDirection;
- sal_Int16 mnStartScale;
- bool mbIn;
+ XMLEffect const meKind;
+ XMLEffectDirection const meDirection;
+ sal_Int16 const mnStartScale;
+ bool const mbIn;
}
AnimationEffectMap[] =
{
@@ -227,35 +227,35 @@ public:
list<XMLEffectHint> maEffects;
rtl::Reference< XMLShapeExport > mxShapeExp;
- OUString msDimColor;
- OUString msDimHide;
- OUString msDimPrev;
- OUString msEffect;
- OUString msPlayFull;
- OUString msPresOrder;
- OUString msSound;
- OUString msSoundOn;
- OUString msSpeed;
- OUString msTextEffect;
- OUString msIsAnimation;
- OUString msAnimPath;
-
- AnimExpImpl()
- : msDimColor( "DimColor" ),
- msDimHide( "DimHide" ),
- msDimPrev( "DimPrevious" ),
- msEffect( "Effect" ),
- msPlayFull( "PlayFull" ),
- msPresOrder( "PresentationOrder" ),
- msSound( "Sound" ),
- msSoundOn( "SoundOn" ),
- msSpeed( "Speed" ),
- msTextEffect( "TextEffect" ),
- msIsAnimation( "IsAnimation" ),
- msAnimPath( "AnimationPath" )
- {}
+ static constexpr OUStringLiteral gsDimColor = "DimColor";
+ static constexpr OUStringLiteral gsDimHide = "DimHide";
+ static constexpr OUStringLiteral gsDimPrev = "DimPrevious";
+ static constexpr OUStringLiteral gsEffect = "Effect";
+ static constexpr OUStringLiteral gsPlayFull = "PlayFull";
+ static constexpr OUStringLiteral gsPresOrder = "PresentationOrder";
+ static constexpr OUStringLiteral gsSound = "Sound";
+ static constexpr OUStringLiteral gsSoundOn = "SoundOn";
+ static constexpr OUStringLiteral gsSpeed = "Speed";
+ static constexpr OUStringLiteral gsTextEffect = "TextEffect";
+ static constexpr OUStringLiteral gsIsAnimation = "IsAnimation";
+ static constexpr OUStringLiteral gsAnimPath = "AnimationPath";
};
+#if !HAVE_CPP_INLINE_VARIABLES
+constexpr OUStringLiteral AnimExpImpl::gsDimColor;
+constexpr OUStringLiteral AnimExpImpl::gsDimHide;
+constexpr OUStringLiteral AnimExpImpl::gsDimPrev;
+constexpr OUStringLiteral AnimExpImpl::gsEffect;
+constexpr OUStringLiteral AnimExpImpl::gsPlayFull;
+constexpr OUStringLiteral AnimExpImpl::gsPresOrder;
+constexpr OUStringLiteral AnimExpImpl::gsSound;
+constexpr OUStringLiteral AnimExpImpl::gsSoundOn;
+constexpr OUStringLiteral AnimExpImpl::gsSpeed;
+constexpr OUStringLiteral AnimExpImpl::gsTextEffect;
+constexpr OUStringLiteral AnimExpImpl::gsIsAnimation;
+constexpr OUStringLiteral AnimExpImpl::gsAnimPath;
+#endif
+
XMLAnimationsExporter::XMLAnimationsExporter( XMLShapeExport* pShapeExp )
: mpImpl( new AnimExpImpl )
{
@@ -281,11 +281,11 @@ void XMLAnimationsExporter::prepare( const Reference< XShape >& xShape )
if( xProps.is() )
{
AnimationEffect eEffect;
- xProps->getPropertyValue( mpImpl->msEffect ) >>= eEffect;
+ xProps->getPropertyValue( AnimExpImpl::gsEffect ) >>= eEffect;
if( eEffect == AnimationEffect_PATH )
{
Reference< XShape > xPath;
- xProps->getPropertyValue( mpImpl->msAnimPath ) >>= xPath;
+ xProps->getPropertyValue( AnimExpImpl::gsAnimPath ) >>= xPath;
}
}
}
@@ -312,18 +312,18 @@ void XMLAnimationsExporter::collect( const Reference< XShape >& xShape, SvXMLExp
AnimationEffect eEffect;
XMLEffectHint aEffect;
- if( any2bool( xProps->getPropertyValue( mpImpl->msSoundOn ) ) )
+ if( any2bool( xProps->getPropertyValue( AnimExpImpl::gsSoundOn ) ) )
{
- xProps->getPropertyValue( mpImpl->msSound ) >>= aEffect.maSoundURL;
- xProps->getPropertyValue( mpImpl->msPlayFull ) >>= aEffect.mbPlayFull;
+ xProps->getPropertyValue( AnimExpImpl::gsSound ) >>= aEffect.maSoundURL;
+ xProps->getPropertyValue( AnimExpImpl::gsPlayFull ) >>= aEffect.mbPlayFull;
}
- xProps->getPropertyValue( mpImpl->msPresOrder ) >>= aEffect.mnPresId;
- xProps->getPropertyValue( mpImpl->msSpeed ) >>= aEffect.meSpeed;
+ xProps->getPropertyValue( AnimExpImpl::gsPresOrder ) >>= aEffect.mnPresId;
+ xProps->getPropertyValue( AnimExpImpl::gsSpeed ) >>= aEffect.meSpeed;
bool bIsAnimation = false;
- xProps->getPropertyValue( mpImpl->msIsAnimation ) >>= bIsAnimation;
+ xProps->getPropertyValue( AnimExpImpl::gsIsAnimation ) >>= bIsAnimation;
if( bIsAnimation )
{
aEffect.meKind = XMLE_PLAY;
@@ -339,7 +339,7 @@ void XMLAnimationsExporter::collect( const Reference< XShape >& xShape, SvXMLExp
{
- xProps->getPropertyValue( mpImpl->msEffect ) >>= eEffect;
+ xProps->getPropertyValue( AnimExpImpl::gsEffect ) >>= eEffect;
if( eEffect != AnimationEffect_NONE )
{
bool bIn = true;
@@ -356,7 +356,7 @@ void XMLAnimationsExporter::collect( const Reference< XShape >& xShape, SvXMLExp
if( eEffect == AnimationEffect_PATH )
{
Reference< XShape > xPath;
- xProps->getPropertyValue( mpImpl->msAnimPath ) >>= xPath;
+ xProps->getPropertyValue( AnimExpImpl::gsAnimPath ) >>= xPath;
if( xPath.is() )
{
// strip mpImpl->mxShapeExp->createShapeId( xPath );
@@ -369,7 +369,7 @@ void XMLAnimationsExporter::collect( const Reference< XShape >& xShape, SvXMLExp
aEffect.maSoundURL.clear();
}
- xProps->getPropertyValue( mpImpl->msTextEffect ) >>= eEffect;
+ xProps->getPropertyValue( AnimExpImpl::gsTextEffect ) >>= eEffect;
if( eEffect != AnimationEffect_NONE )
{
bool bIn = true;
@@ -390,8 +390,8 @@ void XMLAnimationsExporter::collect( const Reference< XShape >& xShape, SvXMLExp
bool bDimPrev = false;
bool bDimHide = false;
- xProps->getPropertyValue( mpImpl->msDimPrev ) >>= bDimPrev;
- xProps->getPropertyValue( mpImpl->msDimHide ) >>= bDimHide;
+ xProps->getPropertyValue( AnimExpImpl::gsDimPrev ) >>= bDimPrev;
+ xProps->getPropertyValue( AnimExpImpl::gsDimHide ) >>= bDimHide;
if( bDimPrev || bDimHide )
{
aEffect.meKind = bDimPrev ? XMLE_DIM : XMLE_HIDE;
@@ -400,7 +400,7 @@ void XMLAnimationsExporter::collect( const Reference< XShape >& xShape, SvXMLExp
aEffect.meSpeed = AnimationSpeed_MEDIUM;
if( bDimPrev )
{
- xProps->getPropertyValue( mpImpl->msDimColor )
+ xProps->getPropertyValue( AnimExpImpl::gsDimColor )
>>= aEffect.maDimColor;
}
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index 00c723b283d2..c92c832ee3d5 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -321,35 +321,35 @@ public:
Reference< XPropertySet > mxLastShape;
OUString maLastShapeId;
- OUString msDimColor;
- OUString msDimHide;
- OUString msDimPrev;
- OUString msEffect;
- OUString msPlayFull;
- OUString msSound;
- OUString msSoundOn;
- OUString msSpeed;
- OUString msTextEffect;
- OUString msPresShapeService;
- OUString msAnimPath;
- OUString msIsAnimation;
-
- AnimImpImpl()
- : msDimColor( "DimColor" ),
- msDimHide( "DimHide" ),
- msDimPrev( "DimPrevious" ),
- msEffect( "Effect" ),
- msPlayFull( "PlayFull" ),
- msSound( "Sound" ),
- msSoundOn( "SoundOn" ),
- msSpeed( "Speed" ),
- msTextEffect( "TextEffect" ),
- msPresShapeService( "com.sun.star.presentation.Shape" ),
- msAnimPath( "AnimationPath" ),
- msIsAnimation( "IsAnimation" )
- {}
+ static constexpr OUStringLiteral gsDimColor = "DimColor";
+ static constexpr OUStringLiteral gsDimHide = "DimHide";
+ static constexpr OUStringLiteral gsDimPrev = "DimPrevious";
+ static constexpr OUStringLiteral gsEffect = "Effect";
+ static constexpr OUStringLiteral gsPlayFull = "PlayFull";
+ static constexpr OUStringLiteral gsSound = "Sound";
+ static constexpr OUStringLiteral gsSoundOn = "SoundOn";
+ static constexpr OUStringLiteral gsSpeed = "Speed";
+ static constexpr OUStringLiteral gsTextEffect = "TextEffect";
+ static constexpr OUStringLiteral gsPresShapeService = "com.sun.star.presentation.Shape";
+ static constexpr OUStringLiteral gsAnimPath = "AnimationPath";
+ static constexpr OUStringLiteral gsIsAnimation = "IsAnimation";
};
+#if !HAVE_CPP_INLINE_VARIABLES
+constexpr OUStringLiteral AnimImpImpl::gsDimColor;
+constexpr OUStringLiteral AnimImpImpl::gsDimHide;
+constexpr OUStringLiteral AnimImpImpl::gsDimPrev;
+constexpr OUStringLiteral AnimImpImpl::gsEffect;
+constexpr OUStringLiteral AnimImpImpl::gsPlayFull;
+constexpr OUStringLiteral AnimImpImpl::gsSound;
+constexpr OUStringLiteral AnimImpImpl::gsSoundOn;
+constexpr OUStringLiteral AnimImpImpl::gsSpeed;
+constexpr OUStringLiteral AnimImpImpl::gsTextEffect;
+constexpr OUStringLiteral AnimImpImpl::gsPresShapeService;
+constexpr OUStringLiteral AnimImpImpl::gsAnimPath;
+constexpr OUStringLiteral AnimImpImpl::gsIsAnimation;
+#endif
+
enum XMLActionKind
{
XMLE_SHOW,
@@ -543,7 +543,7 @@ void XMLAnimationsEffectContext::EndElement()
// check for presentation shape service
{
Reference< XServiceInfo > xServiceInfo( xSet, UNO_QUERY );
- if( !xServiceInfo.is() || !xServiceInfo->supportsService( mpImpl->msPresShapeService ) )
+ if( !xServiceInfo.is() || !xServiceInfo->supportsService( AnimImpImpl::gsPresShapeService ) )
return;
}
@@ -560,13 +560,13 @@ void XMLAnimationsEffectContext::EndElement()
{
if( meKind == XMLE_DIM )
{
- xSet->setPropertyValue( mpImpl->msDimPrev, Any(true) );
+ xSet->setPropertyValue( AnimImpImpl::gsDimPrev, Any(true) );
- xSet->setPropertyValue( mpImpl->msDimColor, Any(maDimColor) );
+ xSet->setPropertyValue( AnimImpImpl::gsDimColor, Any(maDimColor) );
}
else if( meKind == XMLE_PLAY )
{
- xSet->setPropertyValue( mpImpl->msIsAnimation, Any(true) );
+ xSet->setPropertyValue( AnimImpImpl::gsIsAnimation, Any(true) );
// #i42894# speed is not supported for the old group animation fallback, so no need to set it
// aAny <<= meSpeed;
@@ -576,20 +576,21 @@ void XMLAnimationsEffectContext::EndElement()
{
if( meKind == XMLE_HIDE && !mbTextEffect && meEffect == EK_none )
{
- xSet->setPropertyValue( mpImpl->msDimHide, Any(true) );
+ xSet->setPropertyValue( AnimImpImpl::gsDimHide, Any(true) );
}
else
{
const AnimationEffect eEffect = ImplSdXMLgetEffect( meEffect, meDirection, mnStartScale, meKind == XMLE_SHOW );
- xSet->setPropertyValue( mbTextEffect ? mpImpl->msTextEffect : mpImpl->msEffect, makeAny( eEffect ) );
- xSet->setPropertyValue( mpImpl->msSpeed, makeAny( meSpeed ) );
+ OUString s = mbTextEffect ? AnimImpImpl::gsTextEffect : AnimImpImpl::gsEffect;
+ xSet->setPropertyValue( s, makeAny( eEffect ) );
+ xSet->setPropertyValue( AnimImpImpl::gsSpeed, makeAny( meSpeed ) );
if( eEffect == AnimationEffect_PATH && !maPathShapeId.isEmpty() )
{
Reference< XShape > xPath( GetImport().getInterfaceToIdentifierMapper().getReference( maPathShapeId ), UNO_QUERY );
if( xPath.is() )
- xSet->setPropertyValue( mpImpl->msAnimPath, makeAny( xPath ) );
+ xSet->setPropertyValue( AnimImpImpl::gsAnimPath, makeAny( xPath ) );
}
}
}
@@ -598,9 +599,9 @@ void XMLAnimationsEffectContext::EndElement()
{
if( xSet.is() )
{
- xSet->setPropertyValue( mpImpl->msSound, Any(maSoundURL) );
- xSet->setPropertyValue( mpImpl->msPlayFull, Any(mbPlayFull) );
- xSet->setPropertyValue( mpImpl->msSoundOn, Any(true) );
+ xSet->setPropertyValue( AnimImpImpl::gsSound, Any(maSoundURL) );
+ xSet->setPropertyValue( AnimImpImpl::gsPlayFull, Any(mbPlayFull) );
+ xSet->setPropertyValue( AnimImpImpl::gsSoundOn, Any(true) );
}
else
{
diff --git a/xmloff/source/draw/sdpropls.hxx b/xmloff/source/draw/sdpropls.hxx
index 75c6c0d90096..cbbcd024b11c 100644
--- a/xmloff/source/draw/sdpropls.hxx
+++ b/xmloff/source/draw/sdpropls.hxx
@@ -58,8 +58,8 @@ class XMLSdPropHdlFactory : public XMLPropertyHandlerFactory
{
private:
css::uno::Reference< css::frame::XModel > mxModel;
- SvXMLExport* mpExport;
- SvXMLImport* mpImport;
+ SvXMLExport* const mpExport;
+ SvXMLImport* const mpImport;
public:
XMLSdPropHdlFactory( css::uno::Reference< css::frame::XModel > const & xModel, SvXMLExport& rExport );
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index daca0eb241db..ab352d8298d1 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -193,8 +193,8 @@ void ImpXMLEXPPageMasterInfo::SetName(const OUString& rStr)
class ImpXMLAutoLayoutInfo
{
- sal_uInt16 mnType;
- ImpXMLEXPPageMasterInfo* mpPageMasterInfo;
+ sal_uInt16 const mnType;
+ ImpXMLEXPPageMasterInfo* const mpPageMasterInfo;
OUString msLayoutName;
tools::Rectangle maTitleRect;
tools::Rectangle maPresRect;
diff --git a/xmloff/source/draw/sdxmlexp_impl.hxx b/xmloff/source/draw/sdxmlexp_impl.hxx
index 5e964d137dbb..79d728d47ed8 100644
--- a/xmloff/source/draw/sdxmlexp_impl.hxx
+++ b/xmloff/source/draw/sdxmlexp_impl.hxx
@@ -109,7 +109,7 @@ class SdXMLExport : public SvXMLExport
SdXMLFormatMap maUsedDateStyles; // this is a vector with the used formattings for date fields
SdXMLFormatMap maUsedTimeStyles; // this is a vector with the used formattings for time fields
- bool mbIsDraw;
+ bool const mbIsDraw;
virtual void ExportStyles_(bool bUsed) override;
virtual void ExportAutoStyles_() override;
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index 8049ad7e5783..fc836d42cc09 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -288,6 +288,11 @@ SERVICE( XMLDrawMetaImportOasis, "com.sun.star.comp.Draw.XMLOasisMetaImporter",
SERVICE( XMLImpressSettingsImportOasis, "com.sun.star.comp.Impress.XMLOasisSettingsImporter", "XMLImpressSettingsImportOasis", false, SvXMLImportFlags::SETTINGS )
SERVICE( XMLDrawSettingsImportOasis, "com.sun.star.comp.Draw.XMLOasisSettingsImporter", "XMLImpressSettingsImportOasis", true, SvXMLImportFlags::SETTINGS )
+#if !HAVE_CPP_INLINE_VARIABLES
+constexpr OUStringLiteral SdXMLImport::gsPageLayouts;
+constexpr OUStringLiteral SdXMLImport::gsPreview;
+#endif
+
SdXMLImport::SdXMLImport(
const css::uno::Reference< css::uno::XComponentContext >& xContext,
OUString const & implementationName,
@@ -297,9 +302,7 @@ SdXMLImport::SdXMLImport(
mnNewMasterPageCount(0),
mbIsDraw(bIsDraw),
mbLoadDoc(true),
- mbPreview(false),
- msPageLayouts( "PageLayouts" ),
- msPreview( "Preview" )
+ mbPreview(false)
{
// add namespaces
GetNamespaceMap().Add(
@@ -386,11 +389,11 @@ void SAL_CALL SdXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen
{
uno::Reference< beans::XPropertySetInfo > xInfoSetInfo( xInfoSet->getPropertySetInfo() );
- if( xInfoSetInfo->hasPropertyByName( msPageLayouts ) )
- xInfoSet->getPropertyValue( msPageLayouts ) >>= mxPageLayouts;
+ if( xInfoSetInfo->hasPropertyByName( gsPageLayouts ) )
+ xInfoSet->getPropertyValue( gsPageLayouts ) >>= mxPageLayouts;
- if( xInfoSetInfo->hasPropertyByName( msPreview ) )
- xInfoSet->getPropertyValue( msPreview ) >>= mbPreview;
+ if( xInfoSetInfo->hasPropertyByName( gsPreview ) )
+ xInfoSet->getPropertyValue( gsPreview ) >>= mbPreview;
OUString const sOrganizerMode(
"OrganizerMode");
diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx
index 7b029895c766..40010440c597 100644
--- a/xmloff/source/draw/sdxmlimp_impl.hxx
+++ b/xmloff/source/draw/sdxmlimp_impl.hxx
@@ -167,8 +167,8 @@ class SdXMLImport: public SvXMLImport
bool mbLoadDoc;
bool mbPreview;
- OUString msPageLayouts;
- OUString msPreview;
+ static constexpr OUStringLiteral gsPageLayouts = "PageLayouts";
+ static constexpr OUStringLiteral gsPreview = "Preview";
HeaderFooterDeclMap maHeaderDeclsMap;
HeaderFooterDeclMap maFooterDeclsMap;
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
index 03e849d79873..9aece77e02a2 100644
--- a/xmloff/source/draw/xexptran.cxx
+++ b/xmloff/source/draw/xexptran.cxx
@@ -167,7 +167,7 @@ void Imp_PutDoubleChar(OUStringBuffer& rStr, const SvXMLUnitConverter& rConv, do
struct ImpSdXMLExpTransObj2DBase
{
- sal_uInt16 mnType;
+ sal_uInt16 const mnType;
explicit ImpSdXMLExpTransObj2DBase(sal_uInt16 nType)
: mnType(nType) {}
};
@@ -185,37 +185,37 @@ struct ImpSdXMLExpTransObj2DBase
struct ImpSdXMLExpTransObj2DRotate : public ImpSdXMLExpTransObj2DBase
{
- double mfRotate;
+ double const mfRotate;
explicit ImpSdXMLExpTransObj2DRotate(double fVal)
: ImpSdXMLExpTransObj2DBase(IMP_SDXMLEXP_TRANSOBJ2D_ROTATE), mfRotate(fVal) {}
};
struct ImpSdXMLExpTransObj2DScale : public ImpSdXMLExpTransObj2DBase
{
- ::basegfx::B2DTuple maScale;
+ ::basegfx::B2DTuple const maScale;
explicit ImpSdXMLExpTransObj2DScale(const ::basegfx::B2DTuple& rNew)
: ImpSdXMLExpTransObj2DBase(IMP_SDXMLEXP_TRANSOBJ2D_SCALE), maScale(rNew) {}
};
struct ImpSdXMLExpTransObj2DTranslate : public ImpSdXMLExpTransObj2DBase
{
- ::basegfx::B2DTuple maTranslate;
+ ::basegfx::B2DTuple const maTranslate;
explicit ImpSdXMLExpTransObj2DTranslate(const ::basegfx::B2DTuple& rNew)
: ImpSdXMLExpTransObj2DBase(IMP_SDXMLEXP_TRANSOBJ2D_TRANSLATE), maTranslate(rNew) {}
};
struct ImpSdXMLExpTransObj2DSkewX : public ImpSdXMLExpTransObj2DBase
{
- double mfSkewX;
+ double const mfSkewX;
explicit ImpSdXMLExpTransObj2DSkewX(double fVal)
: ImpSdXMLExpTransObj2DBase(IMP_SDXMLEXP_TRANSOBJ2D_SKEWX), mfSkewX(fVal) {}
};
struct ImpSdXMLExpTransObj2DSkewY : public ImpSdXMLExpTransObj2DBase
{
- double mfSkewY;
+ double const mfSkewY;
explicit ImpSdXMLExpTransObj2DSkewY(double fVal)
: ImpSdXMLExpTransObj2DBase(IMP_SDXMLEXP_TRANSOBJ2D_SKEWY), mfSkewY(fVal) {}
};
struct ImpSdXMLExpTransObj2DMatrix : public ImpSdXMLExpTransObj2DBase
{
- ::basegfx::B2DHomMatrix maMatrix;
+ ::basegfx::B2DHomMatrix const maMatrix;
explicit ImpSdXMLExpTransObj2DMatrix(const ::basegfx::B2DHomMatrix& rNew)
: ImpSdXMLExpTransObj2DBase(IMP_SDXMLEXP_TRANSOBJ2D_MATRIX), maMatrix(rNew) {}
};
@@ -537,7 +537,7 @@ void SdXMLImExTransform2D::GetFullTransform(::basegfx::B2DHomMatrix& rFullTrans)
struct ImpSdXMLExpTransObj3DBase
{
- sal_uInt16 mnType;
+ sal_uInt16 const mnType;
explicit ImpSdXMLExpTransObj3DBase(sal_uInt16 nType)
: mnType(nType) {}
};
@@ -555,37 +555,37 @@ struct ImpSdXMLExpTransObj3DBase
struct ImpSdXMLExpTransObj3DRotateX : public ImpSdXMLExpTransObj3DBase
{
- double mfRotateX;
+ double const mfRotateX;
explicit ImpSdXMLExpTransObj3DRotateX(double fVal)
: ImpSdXMLExpTransObj3DBase(IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_X), mfRotateX(fVal) {}
};
struct ImpSdXMLExpTransObj3DRotateY : public ImpSdXMLExpTransObj3DBase
{
- double mfRotateY;
+ double const mfRotateY;
explicit ImpSdXMLExpTransObj3DRotateY(double fVal)
: ImpSdXMLExpTransObj3DBase(IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_Y), mfRotateY(fVal) {}
};
struct ImpSdXMLExpTransObj3DRotateZ : public ImpSdXMLExpTransObj3DBase
{
- double mfRotateZ;
+ double const mfRotateZ;
explicit ImpSdXMLExpTransObj3DRotateZ(double fVal)
: ImpSdXMLExpTransObj3DBase(IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_Z), mfRotateZ(fVal) {}
};
struct ImpSdXMLExpTransObj3DScale : public ImpSdXMLExpTransObj3DBase
{
- ::basegfx::B3DTuple maScale;
+ ::basegfx::B3DTuple const maScale;
explicit ImpSdXMLExpTransObj3DScale(const ::basegfx::B3DTuple& rNew)
: ImpSdXMLExpTransObj3DBase(IMP_SDXMLEXP_TRANSOBJ3D_SCALE), maScale(rNew) {}
};
struct ImpSdXMLExpTransObj3DTranslate : public ImpSdXMLExpTransObj3DBase
{
- ::basegfx::B3DTuple maTranslate;
+ ::basegfx::B3DTuple const maTranslate;
explicit ImpSdXMLExpTransObj3DTranslate(const ::basegfx::B3DTuple& rNew)
: ImpSdXMLExpTransObj3DBase(IMP_SDXMLEXP_TRANSOBJ3D_TRANSLATE), maTranslate(rNew) {}
};
struct ImpSdXMLExpTransObj3DMatrix : public ImpSdXMLExpTransObj3DBase
{
- ::basegfx::B3DHomMatrix maMatrix;
+ ::basegfx::B3DHomMatrix const maMatrix;
explicit ImpSdXMLExpTransObj3DMatrix(const ::basegfx::B3DHomMatrix& rNew)
: ImpSdXMLExpTransObj3DBase(IMP_SDXMLEXP_TRANSOBJ3D_MATRIX), maMatrix(rNew) {}
};
diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx
index 30f5b149ad9f..6066a72f7889 100644
--- a/xmloff/source/draw/ximpshap.hxx
+++ b/xmloff/source/draw/ximpshap.hxx
@@ -200,7 +200,7 @@ class SdXMLPolygonShapeContext : public SdXMLShapeContext
{
OUString maPoints;
OUString maViewBox;
- bool mbClosed;
+ bool const mbClosed;
public:
diff --git a/xmloff/source/draw/ximpstyl.hxx b/xmloff/source/draw/ximpstyl.hxx
index a2b4d363673b..5b9a73e2b7de 100644
--- a/xmloff/source/draw/ximpstyl.hxx
+++ b/xmloff/source/draw/ximpstyl.hxx
@@ -169,7 +169,7 @@ public:
class SdXMLStylesContext : public SvXMLStylesContext
{
rtl::Reference< SvXMLImportPropertyMapper > xPresImpPropMapper;
- bool mbIsAutoStyle;
+ bool const mbIsAutoStyle;
std::unique_ptr<SvXMLNumFmtHelper> mpNumFmtHelper;
std::unique_ptr<SvNumberFormatter> mpNumFormatter;
diff --git a/xmloff/source/forms/elementexport.hxx b/xmloff/source/forms/elementexport.hxx
index c59ab7530d90..18717f29c273 100644
--- a/xmloff/source/forms/elementexport.hxx
+++ b/xmloff/source/forms/elementexport.hxx
@@ -41,7 +41,7 @@ namespace xmloff
class OElementExport : public OPropertyExport
{
protected:
- css::uno::Sequence< css::script::ScriptEventDescriptor >
+ css::uno::Sequence< css::script::ScriptEventDescriptor > const
m_aEvents;
std::unique_ptr<SvXMLElementExport> m_pXMLElement; // XML element doing the concrete startElement etc.
@@ -91,8 +91,8 @@ namespace xmloff
typedef std::set<sal_Int16> Int16Set;
// used below
- OUString m_sControlId; // the control id to use when exporting
- OUString m_sReferringControls; // list of referring controls (i.e. their id's)
+ OUString const m_sControlId; // the control id to use when exporting
+ OUString const m_sReferringControls; // list of referring controls (i.e. their id's)
sal_Int16 m_nClassId; // class id of the control we're representing
ElementType m_eType; // (XML) type of the control we're representing
CCAFlags m_nIncludeCommon; // common control attributes to include
diff --git a/xmloff/source/forms/gridcolumnproptranslator.cxx b/xmloff/source/forms/gridcolumnproptranslator.cxx
index e980a6967f05..d794d955b8d5 100644
--- a/xmloff/source/forms/gridcolumnproptranslator.cxx
+++ b/xmloff/source/forms/gridcolumnproptranslator.cxx
@@ -59,8 +59,8 @@ namespace xmloff
struct AlignmentTranslationEntry
{
- ParagraphAdjust nParagraphValue;
- sal_Int16 nControlValue;
+ ParagraphAdjust const nParagraphValue;
+ sal_Int16 const nControlValue;
}
AlignmentTranslations[] =
{
diff --git a/xmloff/source/forms/propertyimport.hxx b/xmloff/source/forms/propertyimport.hxx
index 47b9312f7e1b..f5c67fb4e179 100644
--- a/xmloff/source/forms/propertyimport.hxx
+++ b/xmloff/source/forms/propertyimport.hxx
@@ -156,7 +156,7 @@ namespace xmloff
*/
class OPropertyElementsContext : public SvXMLImportContext
{
- OPropertyImportRef m_xPropertyImporter; // to add the properties
+ OPropertyImportRef const m_xPropertyImporter; // to add the properties
public:
OPropertyElementsContext(SvXMLImport& _rImport, sal_uInt16 _nPrefix, const OUString& _rName,
diff --git a/xmloff/source/script/xmlscripti.cxx b/xmloff/source/script/xmlscripti.cxx
index 4844fcb04da4..033a99006394 100644
--- a/xmloff/source/script/xmlscripti.cxx
+++ b/xmloff/source/script/xmlscripti.cxx
@@ -43,7 +43,7 @@ class XMLScriptChildContext : public SvXMLImportContext
private:
css::uno::Reference< css::frame::XModel > m_xModel;
css::uno::Reference< css::document::XEmbeddedScripts > m_xDocumentScripts;
- OUString m_aLanguage;
+ OUString const m_aLanguage;
public:
XMLScriptChildContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName,
diff --git a/xmloff/source/style/PageHeaderFooterContext.hxx b/xmloff/source/style/PageHeaderFooterContext.hxx
index fb3e034a6416..7d8c75380f02 100644
--- a/xmloff/source/style/PageHeaderFooterContext.hxx
+++ b/xmloff/source/style/PageHeaderFooterContext.hxx
@@ -24,8 +24,8 @@
class PageHeaderFooterContext : public SvXMLImportContext
{
::std::vector< XMLPropertyState > & rProperties;
- sal_Int32 nStartIndex;
- sal_Int32 nEndIndex;
+ sal_Int32 const nStartIndex;
+ sal_Int32 const nEndIndex;
bool bHeader;
const rtl::Reference < SvXMLImportPropertyMapper > rMap;
diff --git a/xmloff/source/style/PageMasterPropHdl.hxx b/xmloff/source/style/PageMasterPropHdl.hxx
index 603154d4e9c9..912b19536aa7 100644
--- a/xmloff/source/style/PageMasterPropHdl.hxx
+++ b/xmloff/source/style/PageMasterPropHdl.hxx
@@ -104,7 +104,7 @@ public:
class XMLPMPropHdl_Print : public XMLPropertyHandler
{
- OUString sAttrValue;
+ OUString const sAttrValue;
public:
explicit XMLPMPropHdl_Print( enum ::xmloff::token::XMLTokenEnum eValue );
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index 454293c49df7..24926aa8c5ad 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -47,12 +47,12 @@ using namespace ::xmloff::token;
class XMLFontAutoStylePoolEntry_Impl
{
- OUString sName;
- OUString sFamilyName;
- OUString sStyleName;
- FontFamily nFamily;
- FontPitch nPitch;
- rtl_TextEncoding eEnc;
+ OUString const sName;
+ OUString const sFamilyName;
+ OUString const sStyleName;
+ FontFamily const nFamily;
+ FontPitch const nPitch;
+ rtl_TextEncoding const eEnc;
public:
diff --git a/xmloff/source/style/XMLFontStylesContext_impl.hxx b/xmloff/source/style/XMLFontStylesContext_impl.hxx
index e1baa2dd1ed0..97c4d397b98e 100644
--- a/xmloff/source/style/XMLFontStylesContext_impl.hxx
+++ b/xmloff/source/style/XMLFontStylesContext_impl.hxx
@@ -35,7 +35,7 @@ class XMLFontStyleContextFontFace : public SvXMLStyleContext
css::uno::Any aPitch;
css::uno::Any aEnc;
- SvXMLImportContextRef xStyles;
+ SvXMLImportContextRef const xStyles;
XMLFontStylesContext *GetStyles()
{
diff --git a/xmloff/source/style/XMLFootnoteSeparatorImport.hxx b/xmloff/source/style/XMLFootnoteSeparatorImport.hxx
index 375b90826c27..de916f5bc972 100644
--- a/xmloff/source/style/XMLFootnoteSeparatorImport.hxx
+++ b/xmloff/source/style/XMLFootnoteSeparatorImport.hxx
@@ -41,7 +41,7 @@ class XMLFootnoteSeparatorImport : public SvXMLImportContext
{
::std::vector<XMLPropertyState> & rProperties;
rtl::Reference<XMLPropertySetMapper> rMapper;
- sal_Int32 nPropIndex;
+ sal_Int32 const nPropIndex;
public:
diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx
index 6110ab1a9269..69f84263ca0a 100644
--- a/xmloff/source/style/impastpl.cxx
+++ b/xmloff/source/style/impastpl.cxx
@@ -187,7 +187,7 @@ XMLAutoStylePoolProperties::XMLAutoStylePoolProperties( XMLAutoStyleFamily& rFam
}
// Create a name based on the properties used
- for(XMLPropertyState & rState : maProperties)
+ for(XMLPropertyState const & rState : maProperties)
{
if (rState.mnIndex == -1)
continue;
@@ -247,7 +247,7 @@ XMLAutoStylePoolProperties::XMLAutoStylePoolProperties( XMLAutoStyleFamily& rFam
#if OSL_DEBUG_LEVEL > 0
std::set<sal_Int32> DebugProperties;
- for (XMLPropertyState & rPropState : maProperties)
+ for (XMLPropertyState const & rPropState : maProperties)
{
sal_Int32 const property(rPropState.mnIndex);
// serious bug: will cause duplicate attributes to be exported
diff --git a/xmloff/source/style/impastpl.hxx b/xmloff/source/style/impastpl.hxx
index 49a93fc2a742..8ee00a30dc81 100644
--- a/xmloff/source/style/impastpl.hxx
+++ b/xmloff/source/style/impastpl.hxx
@@ -46,8 +46,8 @@ class SvXMLExport;
class XMLAutoStylePoolProperties
{
OUString msName;
- ::std::vector< XMLPropertyState > maProperties;
- sal_uInt32 mnPos;
+ ::std::vector< XMLPropertyState > const maProperties;
+ sal_uInt32 const mnPos;
public:
@@ -67,7 +67,7 @@ public:
typedef std::vector<std::unique_ptr<XMLAutoStylePoolProperties>> PropertiesListType;
private:
- OUString msParent;
+ OUString const msParent;
PropertiesListType m_PropertiesList;
public:
@@ -102,8 +102,8 @@ struct XMLAutoStyleFamily
typedef std::set<std::unique_ptr<XMLAutoStylePoolParent>,
comphelper::UniquePtrValueLess<XMLAutoStylePoolParent>> ParentSetType;
- sal_uInt32 mnFamily;
- OUString maStrFamilyName;
+ sal_uInt32 const mnFamily;
+ OUString const maStrFamilyName;
rtl::Reference<SvXMLExportPropertyMapper> mxMapper;
ParentSetType m_ParentSet;
@@ -111,8 +111,8 @@ struct XMLAutoStyleFamily
std::set<OUString> maReservedNameSet;
sal_uInt32 mnCount;
sal_uInt32 mnName;
- OUString maStrPrefix;
- bool mbAsFamily;
+ OUString const maStrPrefix;
+ bool const mbAsFamily;
XMLAutoStyleFamily( sal_Int32 nFamily, const OUString& rStrName,
const rtl::Reference<SvXMLExportPropertyMapper>& rMapper,
diff --git a/xmloff/source/style/prstylecond.cxx b/xmloff/source/style/prstylecond.cxx
index 787f27eca97d..569ebce6c919 100644
--- a/xmloff/source/style/prstylecond.cxx
+++ b/xmloff/source/style/prstylecond.cxx
@@ -28,8 +28,8 @@ using namespace ::xmloff::token;
static const struct ConditionMap
{
char const* aInternal;
- XMLTokenEnum nExternal;
- int aValue;
+ XMLTokenEnum const nExternal;
+ int const aValue;
} g_ConditionMap[] =
{
{ "TableHeader", XML_TABLE_HEADER, -1 },
diff --git a/xmloff/source/style/weighhdl.cxx b/xmloff/source/style/weighhdl.cxx
index e6ea37a7e4ba..e3590e0e66df 100644
--- a/xmloff/source/style/weighhdl.cxx
+++ b/xmloff/source/style/weighhdl.cxx
@@ -36,8 +36,8 @@ using namespace ::xmloff::token;
struct FontWeightMapper
{
- float fWeight;
- sal_uInt16 nValue;
+ float const fWeight;
+ sal_uInt16 const nValue;
};
FontWeightMapper const aFontWeightMap[] =
diff --git a/xmloff/source/style/xmlbahdl.hxx b/xmloff/source/style/xmlbahdl.hxx
index a0e3aa751d28..02efce218be3 100644
--- a/xmloff/source/style/xmlbahdl.hxx
+++ b/xmloff/source/style/xmlbahdl.hxx
@@ -30,7 +30,7 @@
*/
class XMLNumberPropHdl : public XMLPropertyHandler
{
- sal_Int8 nBytes;
+ sal_Int8 const nBytes;
public:
explicit XMLNumberPropHdl( sal_Int8 nB ) : nBytes( nB ) {}
@@ -45,8 +45,8 @@ public:
*/
class XMLNumberNonePropHdl : public XMLPropertyHandler
{
- OUString sZeroStr;
- sal_Int8 nBytes;
+ OUString const sZeroStr;
+ sal_Int8 const nBytes;
public:
explicit XMLNumberNonePropHdl( sal_Int8 nB = 4 );
XMLNumberNonePropHdl( enum ::xmloff::token::XMLTokenEnum eZeroString, sal_Int8 nB );
@@ -61,7 +61,7 @@ public:
*/
class XMLMeasurePropHdl : public XMLPropertyHandler
{
- sal_Int8 nBytes;
+ sal_Int8 const nBytes;
public:
explicit XMLMeasurePropHdl( sal_Int8 nB ) : nBytes( nB ) {}
virtual ~XMLMeasurePropHdl() override;
@@ -75,7 +75,7 @@ public:
*/
class XMLPercentPropHdl : public XMLPropertyHandler
{
- sal_Int8 nBytes;
+ sal_Int8 const nBytes;
public:
explicit XMLPercentPropHdl( sal_Int8 nB ) : nBytes( nB ) {}
virtual ~XMLPercentPropHdl() override;
@@ -99,7 +99,7 @@ class XMLDoublePercentPropHdl : public XMLPropertyHandler
*/
class XMLNegPercentPropHdl : public XMLPropertyHandler
{
- sal_Int8 nBytes;
+ sal_Int8 const nBytes;
public:
explicit XMLNegPercentPropHdl( sal_Int8 nB ) : nBytes( nB ) {}
virtual ~XMLNegPercentPropHdl() override;
@@ -113,7 +113,7 @@ public:
*/
class XMLMeasurePxPropHdl : public XMLPropertyHandler
{
- sal_Int8 nBytes;
+ sal_Int8 const nBytes;
public:
explicit XMLMeasurePxPropHdl( sal_Int8 nB ) : nBytes( nB ) {}
virtual ~XMLMeasurePxPropHdl() override;
@@ -237,7 +237,7 @@ public:
class XMLIsTransparentPropHdl : public XMLPropertyHandler
{
const OUString sTransparent;
- bool bTransPropValue;
+ bool const bTransPropValue;
public:
XMLIsTransparentPropHdl( enum ::xmloff::token::XMLTokenEnum eTransparent = xmloff::token::XML_TOKEN_INVALID,
@@ -295,7 +295,7 @@ public:
*/
class XMLNumberWithoutZeroPropHdl : public XMLPropertyHandler
{
- sal_Int8 nBytes;
+ sal_Int8 const nBytes;
public:
explicit XMLNumberWithoutZeroPropHdl( sal_Int8 nB );
virtual ~XMLNumberWithoutZeroPropHdl() override;
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index c264376b863e..471cf629335c 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -54,8 +54,8 @@ namespace {
struct XMLPropTokens_Impl
{
- sal_uInt16 nType;
- XMLTokenEnum eToken;
+ sal_uInt16 const nType;
+ XMLTokenEnum const eToken;
};
const sal_uInt16 MAX_PROP_TYPES =
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 69ca3fdc6532..6e40bc92dccd 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -58,9 +58,9 @@ typedef std::set< sal_uInt32 > SvXMLuInt32Set;
struct SvXMLEmbeddedTextEntry
{
- sal_uInt16 nSourcePos; // position in NumberFormat (to skip later)
- sal_Int32 nFormatPos; // resulting position in embedded-text element
- OUString aText;
+ sal_uInt16 const nSourcePos; // position in NumberFormat (to skip later)
+ sal_Int32 const nFormatPos; // resulting position in embedded-text element
+ OUString const aText;
SvXMLEmbeddedTextEntry( sal_uInt16 nSP, sal_Int32 nFP, const OUString& rT ) :
nSourcePos(nSP), nFormatPos(nFP), aText(rT) {}
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 17a86b0ebfaf..7afd4391e4a7 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -53,8 +53,8 @@ using namespace ::xmloff::token;
struct SvXMLNumFmtEntry
{
- OUString aName;
- sal_uInt32 nKey;
+ OUString const aName;
+ sal_uInt32 const nKey;
bool bRemoveAfterUse;
SvXMLNumFmtEntry( const OUString& rN, sal_uInt32 nK, bool bR ) :
@@ -116,7 +116,7 @@ struct SvXMLNumberInfo
class SvXMLNumFmtElementContext : public SvXMLImportContext
{
SvXMLNumFormatContext& rParent;
- sal_uInt16 nType;
+ sal_uInt16 const nType;
OUStringBuffer aContent;
SvXMLNumberInfo aNumInfo;
LanguageType nElementLang;
@@ -310,15 +310,15 @@ static const SvXMLEnumMapEntry<bool> aFormatSourceMap[] =
struct SvXMLDefaultDateFormat
{
- NfIndexTableOffset eFormat;
- SvXMLDateElementAttributes eDOW;
- SvXMLDateElementAttributes eDay;
- SvXMLDateElementAttributes eMonth;
- SvXMLDateElementAttributes eYear;
- SvXMLDateElementAttributes eHours;
- SvXMLDateElementAttributes eMins;
- SvXMLDateElementAttributes eSecs;
- bool bSystem;
+ NfIndexTableOffset const eFormat;
+ SvXMLDateElementAttributes const eDOW;
+ SvXMLDateElementAttributes const eDay;
+ SvXMLDateElementAttributes const eMonth;
+ SvXMLDateElementAttributes const eYear;
+ SvXMLDateElementAttributes const eHours;
+ SvXMLDateElementAttributes const eMins;
+ SvXMLDateElementAttributes const eSecs;
+ bool const bSystem;
};
static const SvXMLDefaultDateFormat aDefaultDateFormats[] =
diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx
index a1e4d566576b..6ac9c37993b0 100644
--- a/xmloff/source/style/xmlprmap.cxx
+++ b/xmloff/source/style/xmlprmap.cxx
@@ -106,7 +106,7 @@ struct XMLPropertySetMapper::Impl
std::vector<XMLPropertySetMapperEntry_Impl> maMapEntries;
std::vector<rtl::Reference <XMLPropertyHandlerFactory> > maHdlFactories;
- bool mbOnlyExportMappings;
+ bool const mbOnlyExportMappings;
explicit Impl( bool bForExport ) : mbOnlyExportMappings(bForExport) {}
};
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index 642f1830c429..13d497381559 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -196,8 +196,8 @@ bool SvXMLStyleContext::IsTransient() const
class SvXMLStyleIndex_Impl
{
- OUString sName;
- sal_uInt16 nFamily;
+ OUString const sName;
+ sal_uInt16 const nFamily;
const rtl::Reference<SvXMLStyleContext> mxStyle;
public:
@@ -243,7 +243,7 @@ class SvXMLStylesContext_Impl
std::vector<rtl::Reference<SvXMLStyleContext>> aStyles;
mutable std::unique_ptr<IndicesType> pIndices;
- bool bAutomaticStyle;
+ bool const bAutomaticStyle;
#if OSL_DEBUG_LEVEL > 0
mutable sal_uInt32 m_nIndexCreated;
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index 3bb1b4b35660..b3c20b5bc7b3 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -79,10 +79,10 @@ private:
struct MergeInfo
{
- sal_Int32 mnStartColumn;
- sal_Int32 mnStartRow;
- sal_Int32 mnEndColumn;
- sal_Int32 mnEndRow;
+ sal_Int32 const mnStartColumn;
+ sal_Int32 const mnStartRow;
+ sal_Int32 const mnEndColumn;
+ sal_Int32 const mnEndRow;
MergeInfo( sal_Int32 nStartColumn, sal_Int32 nStartRow, sal_Int32 nColumnSpan, sal_Int32 nRowSpan )
: mnStartColumn( nStartColumn ), mnStartRow( nStartRow ), mnEndColumn( nStartColumn + nColumnSpan - 1 ), mnEndRow( nStartRow + nRowSpan - 1 ) {};
diff --git a/xmloff/source/table/table.hxx b/xmloff/source/table/table.hxx
index 2eddd38d5b83..79a4779e56ba 100644
--- a/xmloff/source/table/table.hxx
+++ b/xmloff/source/table/table.hxx
@@ -26,7 +26,7 @@ struct XMLPropertyMapEntry;
struct TableStyleElement
{
- ::xmloff::token::XMLTokenEnum meElement;
+ ::xmloff::token::XMLTokenEnum const meElement;
OUString msStyleName;
};
diff --git a/xmloff/source/text/XMLChangeElementImportContext.hxx b/xmloff/source/text/XMLChangeElementImportContext.hxx
index f1fe47ef2e99..395ea94dc2c2 100644
--- a/xmloff/source/text/XMLChangeElementImportContext.hxx
+++ b/xmloff/source/text/XMLChangeElementImportContext.hxx
@@ -51,7 +51,7 @@ class XMLChangeElementImportContext : public SvXMLImportContext
*
* So if bAcceptContent is true, we are importing a <text:deletion> element
*/
- bool bAcceptContent;
+ bool const bAcceptContent;
/// context of enclosing <text:changed-region> element
XMLChangedRegionImportContext& rChangedRegion;
diff --git a/xmloff/source/text/XMLChangeImportContext.hxx b/xmloff/source/text/XMLChangeImportContext.hxx
index a2e88e809ae7..7dddeacc36fa 100644
--- a/xmloff/source/text/XMLChangeImportContext.hxx
+++ b/xmloff/source/text/XMLChangeImportContext.hxx
@@ -62,8 +62,8 @@ public:
const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList) override;
private:
- Element m_Element;
- bool m_bIsOutsideOfParagraph;
+ Element const m_Element;
+ bool const m_bIsOutsideOfParagraph;
};
#endif
diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
index 169bf130955e..215d2a196533 100644
--- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
@@ -58,7 +58,7 @@ class XMLFootnoteConfigHelper : public SvXMLImportContext
{
OUStringBuffer sBuffer;
XMLFootnoteConfigurationImportContext& rConfig;
- bool bIsBegin;
+ bool const bIsBegin;
public:
diff --git a/xmloff/source/text/XMLIndexChapterInfoEntryContext.hxx b/xmloff/source/text/XMLIndexChapterInfoEntryContext.hxx
index 3d05aa2dc568..a1771c77d837 100644
--- a/xmloff/source/text/XMLIndexChapterInfoEntryContext.hxx
+++ b/xmloff/source/text/XMLIndexChapterInfoEntryContext.hxx
@@ -39,7 +39,7 @@ class XMLIndexChapterInfoEntryContext : public XMLIndexSimpleEntryContext
// chapter format
sal_Int16 nChapterInfo;
bool bChapterInfoOK;
- bool bTOC;
+ bool const bTOC;
sal_Int16 nOutlineLevel;
bool bOutlineLevelOK;
diff --git a/xmloff/source/text/XMLIndexMarkExport.cxx b/xmloff/source/text/XMLIndexMarkExport.cxx
index 70c2327491e8..bfeb4a845d9f 100644
--- a/xmloff/source/text/XMLIndexMarkExport.cxx
+++ b/xmloff/source/text/XMLIndexMarkExport.cxx
@@ -38,21 +38,25 @@ using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
+#if !HAVE_CPP_INLINE_VARIABLES
+constexpr OUStringLiteral XMLIndexMarkExport::gsLevel;
+constexpr OUStringLiteral XMLIndexMarkExport::gsUserIndexName;
+constexpr OUStringLiteral XMLIndexMarkExport::gsPrimaryKey;
+constexpr OUStringLiteral XMLIndexMarkExport::gsSecondaryKey;
+constexpr OUStringLiteral XMLIndexMarkExport::gsDocumentIndexMark;
+constexpr OUStringLiteral XMLIndexMarkExport::gsIsStart;
+constexpr OUStringLiteral XMLIndexMarkExport::gsIsCollapsed;
+constexpr OUStringLiteral XMLIndexMarkExport::gsAlternativeText;
+constexpr OUStringLiteral XMLIndexMarkExport::gsTextReading;
+constexpr OUStringLiteral XMLIndexMarkExport::gsPrimaryKeyReading;
+constexpr OUStringLiteral XMLIndexMarkExport::gsSecondaryKeyReading;
+constexpr OUStringLiteral XMLIndexMarkExport::gsMainEntry;
+#endif
+
+
XMLIndexMarkExport::XMLIndexMarkExport(
SvXMLExport& rExp)
-: sLevel("Level")
-, sUserIndexName("UserIndexName")
-, sPrimaryKey("PrimaryKey")
-, sSecondaryKey("SecondaryKey")
-, sDocumentIndexMark("DocumentIndexMark")
-, sIsStart("IsStart")
-, sIsCollapsed("IsCollapsed")
-, sAlternativeText("AlternativeText")
-, sTextReading("TextReading")
-, sPrimaryKeyReading("PrimaryKeyReading")
-, sSecondaryKeyReading("SecondaryKeyReading")
-, sMainEntry("IsMainEntry")
-, rExport(rExp)
+: rExport(rExp)
{
}
@@ -84,7 +88,7 @@ void XMLIndexMarkExport::ExportIndexMark(
// get index mark
Any aAny;
- aAny = rPropSet->getPropertyValue(sDocumentIndexMark);
+ aAny = rPropSet->getPropertyValue(gsDocumentIndexMark);
Reference<XPropertySet> xIndexMarkPropSet;
aAny >>= xIndexMarkPropSet;
@@ -92,13 +96,13 @@ void XMLIndexMarkExport::ExportIndexMark(
// alternative text
// collapsed/alternative text entry?
- aAny = rPropSet->getPropertyValue(sIsCollapsed);
+ aAny = rPropSet->getPropertyValue(gsIsCollapsed);
if (*o3tl::doAccess<bool>(aAny))
{
// collapsed entry: needs alternative text
nElementNo = 0;
- aAny = xIndexMarkPropSet->getPropertyValue(sAlternativeText);
+ aAny = xIndexMarkPropSet->getPropertyValue(gsAlternativeText);
OUString sTmp;
aAny >>= sTmp;
DBG_ASSERT(!sTmp.isEmpty(),
@@ -108,7 +112,7 @@ void XMLIndexMarkExport::ExportIndexMark(
else
{
// start and end entries: has ID
- aAny = rPropSet->getPropertyValue(sIsStart);
+ aAny = rPropSet->getPropertyValue(gsIsStart);
nElementNo = *o3tl::doAccess<bool>(aAny) ? 1 : 2;
// generate ID
@@ -124,7 +128,7 @@ void XMLIndexMarkExport::ExportIndexMark(
// but not for -mark-end
Reference<XPropertySetInfo> xPropertySetInfo =
xIndexMarkPropSet->getPropertySetInfo();
- if (xPropertySetInfo->hasPropertyByName(sUserIndexName))
+ if (xPropertySetInfo->hasPropertyByName(gsUserIndexName))
{
// user index mark
pElements = lcl_pUserIndexMarkName;
@@ -133,7 +137,7 @@ void XMLIndexMarkExport::ExportIndexMark(
ExportUserIndexMarkAttributes(xIndexMarkPropSet);
}
}
- else if (xPropertySetInfo->hasPropertyByName(sPrimaryKey))
+ else if (xPropertySetInfo->hasPropertyByName(gsPrimaryKey))
{
// alphabetical index mark
pElements = lcl_pAlphaIndexMarkName;
@@ -172,7 +176,7 @@ void XMLIndexMarkExport::ExportTOCMarkAttributes(
{
// outline level
sal_Int16 nLevel = 0;
- Any aAny = rPropSet->getPropertyValue(sLevel);
+ Any aAny = rPropSet->getPropertyValue(gsLevel);
aAny >>= nLevel;
rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL,
OUString::number(nLevel + 1));
@@ -220,7 +224,7 @@ void XMLIndexMarkExport::ExportUserIndexMarkAttributes(
// name of user index
// (unless it's the default index; then it has no name)
Any aAny;
- lcl_ExportPropertyString( rExport, rPropSet, sUserIndexName, XML_INDEX_NAME, aAny );
+ lcl_ExportPropertyString( rExport, rPropSet, gsUserIndexName, XML_INDEX_NAME, aAny );
// additionally export outline level; just reuse ExportTOCMarkAttributes
ExportTOCMarkAttributes( rPropSet );
@@ -231,12 +235,12 @@ void XMLIndexMarkExport::ExportAlphabeticalIndexMarkAttributes(
{
// primary and secondary keys (if available)
Any aAny;
- lcl_ExportPropertyString( rExport, rPropSet, sTextReading, XML_STRING_VALUE_PHONETIC, aAny );
- lcl_ExportPropertyString( rExport, rPropSet, sPrimaryKey, XML_KEY1, aAny );
- lcl_ExportPropertyString( rExport, rPropSet, sPrimaryKeyReading, XML_KEY1_PHONETIC, aAny );
- lcl_ExportPropertyString( rExport, rPropSet, sSecondaryKey, XML_KEY2, aAny );
- lcl_ExportPropertyString( rExport, rPropSet, sSecondaryKeyReading, XML_KEY2_PHONETIC, aAny );
- lcl_ExportPropertyBool( rExport, rPropSet, sMainEntry, XML_MAIN_ENTRY, aAny );
+ lcl_ExportPropertyString( rExport, rPropSet, gsTextReading, XML_STRING_VALUE_PHONETIC, aAny );
+ lcl_ExportPropertyString( rExport, rPropSet, gsPrimaryKey, XML_KEY1, aAny );
+ lcl_ExportPropertyString( rExport, rPropSet, gsPrimaryKeyReading, XML_KEY1_PHONETIC, aAny );
+ lcl_ExportPropertyString( rExport, rPropSet, gsSecondaryKey, XML_KEY2, aAny );
+ lcl_ExportPropertyString( rExport, rPropSet, gsSecondaryKeyReading, XML_KEY2_PHONETIC, aAny );
+ lcl_ExportPropertyBool( rExport, rPropSet, gsMainEntry, XML_MAIN_ENTRY, aAny );
}
void XMLIndexMarkExport::GetID(
diff --git a/xmloff/source/text/XMLIndexMarkExport.hxx b/xmloff/source/text/XMLIndexMarkExport.hxx
index afce35c158b2..158aa00498c4 100644
--- a/xmloff/source/text/XMLIndexMarkExport.hxx
+++ b/xmloff/source/text/XMLIndexMarkExport.hxx
@@ -38,19 +38,18 @@ namespace com { namespace sun { namespace star {
*/
class XMLIndexMarkExport
{
- OUString sLevel;
- OUString sUserIndexName;
- OUString sPrimaryKey;
- OUString sSecondaryKey;
- OUString sDocumentIndexMark;
- OUString sIsStart;
- OUString sIsCollapsed;
- OUString sAlternativeText;
- OUString sTextReading;
- OUString sPrimaryKeyReading;
- OUString sSecondaryKeyReading;
- OUString sMainEntry;
-
+ static constexpr OUStringLiteral gsLevel = "Level";
+ static constexpr OUStringLiteral gsUserIndexName = "UserIndexName";
+ static constexpr OUStringLiteral gsPrimaryKey = "PrimaryKey";
+ static constexpr OUStringLiteral gsSecondaryKey = "SecondaryKey";
+ static constexpr OUStringLiteral gsDocumentIndexMark = "DocumentIndexMark";
+ static constexpr OUStringLiteral gsIsStart = "IsStart";
+ static constexpr OUStringLiteral gsIsCollapsed = "IsCollapsed";
+ static constexpr OUStringLiteral gsAlternativeText = "AlternativeText";
+ static constexpr OUStringLiteral gsTextReading = "TextReading";
+ static constexpr OUStringLiteral gsPrimaryKeyReading = "PrimaryKeyReading";
+ static constexpr OUStringLiteral gsSecondaryKeyReading = "SecondaryKeyReading";
+ static constexpr OUStringLiteral gsMainEntry = "IsMainEntry";
SvXMLExport& rExport;
diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.hxx b/xmloff/source/text/XMLIndexSourceBaseContext.hxx
index 09973439c805..8d9f4894611a 100644
--- a/xmloff/source/text/XMLIndexSourceBaseContext.hxx
+++ b/xmloff/source/text/XMLIndexSourceBaseContext.hxx
@@ -75,7 +75,7 @@ enum IndexSourceParamEnum
*/
class XMLIndexSourceBaseContext : public SvXMLImportContext
{
- bool bUseLevelFormats;
+ bool const bUseLevelFormats;
bool bChapterIndex; /// chapter-wise or document index?
bool bRelativeTabs; /// tab stops relative to margin or indent?
diff --git a/xmloff/source/text/XMLIndexTemplateContext.hxx b/xmloff/source/text/XMLIndexTemplateContext.hxx
index 03562ee91541..c319aac9480c 100644
--- a/xmloff/source/text/XMLIndexTemplateContext.hxx
+++ b/xmloff/source/text/XMLIndexTemplateContext.hxx
@@ -70,14 +70,14 @@ class XMLIndexTemplateContext : public SvXMLImportContext
OUString sStyleName;
const SvXMLEnumMapEntry<sal_uInt16>* pOutlineLevelNameMap;
- enum ::xmloff::token::XMLTokenEnum eOutlineLevelAttrName;
+ enum ::xmloff::token::XMLTokenEnum const eOutlineLevelAttrName;
const sal_Char** pOutlineLevelStylePropMap;
const bool* pAllowedTokenTypesMap;
sal_Int32 nOutlineLevel;
bool bStyleNameOK;
bool bOutlineLevelOK;
- bool bTOC;
+ bool const bTOC;
// PropertySet of current index
css::uno::Reference<css::beans::XPropertySet> & rPropertySet;
diff --git a/xmloff/source/text/XMLPropertyBackpatcher.hxx b/xmloff/source/text/XMLPropertyBackpatcher.hxx
index 7533261e99f0..8747b8aad00b 100644
--- a/xmloff/source/text/XMLPropertyBackpatcher.hxx
+++ b/xmloff/source/text/XMLPropertyBackpatcher.hxx
@@ -59,7 +59,7 @@ class XMLPropertyBackpatcher
{
/// name of property that gets set or backpatched
- OUString sPropertyName;
+ OUString const sPropertyName;
/// backpatch list type
typedef ::std::vector<
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index a0a071bbde80..4a554125c796 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -84,10 +84,10 @@ typedef ::std::map < const OUString, OUString > ParamMap;
class XMLTextFrameContextHyperlink_Impl
{
- OUString sHRef;
- OUString sName;
- OUString sTargetFrameName;
- bool bMap;
+ OUString const sHRef;
+ OUString const sName;
+ OUString const sTargetFrameName;
+ bool const bMap;
public:
@@ -359,7 +359,7 @@ class XMLTextFrameContext_Impl : public SvXMLImportContext
sal_Int16 nRelWidth;
sal_Int16 nRelHeight;
- sal_uInt16 nType;
+ sal_uInt16 const nType;
css::text::TextContentAnchorType eAnchorType;
bool bMayScript : 1;
diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx
index 4efa170f8653..aefa263098c2 100644
--- a/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx
+++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx
@@ -34,7 +34,7 @@ class XMLTextFrameHyperlinkContext : public SvXMLImportContext
OUString sHRef;
OUString sName;
OUString sTargetFrameName;
- css::text::TextContentAnchorType eDefaultAnchorType;
+ css::text::TextContentAnchorType const eDefaultAnchorType;
SvXMLImportContextRef xFrameContext;
bool bMap;
diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx
index bf2e900f332b..a2bd595bd969 100644
--- a/xmloff/source/text/XMLTextListAutoStylePool.cxx
+++ b/xmloff/source/text/XMLTextListAutoStylePool.cxx
@@ -43,7 +43,7 @@ class XMLTextListAutoStylePoolEntry_Impl
OUString sName;
OUString sInternalName;
Reference < XIndexReplace > xNumRules;
- sal_uInt32 nPos;
+ sal_uInt32 const nPos;
bool bIsNamed;
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index e193a8c6f670..fddfca65f0d9 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -568,11 +568,11 @@ struct XMLTextImportHelper::Impl
SvXMLImport & m_rSvXMLImport;
- bool m_bInsertMode : 1;
- bool m_bStylesOnlyMode : 1;
- bool m_bBlockMode : 1;
- bool m_bProgress : 1;
- bool m_bOrganizerMode : 1;
+ bool const m_bInsertMode : 1;
+ bool const m_bStylesOnlyMode : 1;
+ bool const m_bBlockMode : 1;
+ bool const m_bProgress : 1;
+ bool const m_bOrganizerMode : 1;
bool m_bBodyContentStarted : 1;
/// Are we inside a <text:deletion> element (deleted redline section)
diff --git a/xmloff/source/text/txtparai.hxx b/xmloff/source/text/txtparai.hxx
index 24bf5dc4271a..095eb688fc1b 100644
--- a/xmloff/source/text/txtparai.hxx
+++ b/xmloff/source/text/txtparai.hxx
@@ -48,7 +48,7 @@ class XMLParaContext : public SvXMLImportContext
// Lost outline numbering in master document (#i73509#)
bool mbOutlineLevelAttrFound;
bool bIgnoreLeadingSpace;
- bool bHeading;
+ bool const bHeading;
bool bIsListHeader;
bool bIsRestart;
sal_Int16 nStartValue;
diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx
index 2214fea36b3f..84d4c30eb3ed 100644
--- a/xmloff/source/text/txtparaimphint.hxx
+++ b/xmloff/source/text/txtparaimphint.hxx
@@ -38,7 +38,7 @@ class XMLHint_Impl
css::uno::Reference < css::text::XTextRange > xStart;
css::uno::Reference < css::text::XTextRange > xEnd;
- sal_uInt8 nType;
+ sal_uInt8 const nType;
public:
@@ -66,7 +66,7 @@ public:
class XMLStyleHint_Impl : public XMLHint_Impl
{
- OUString sStyleName;
+ OUString const sStyleName;
public:
@@ -82,7 +82,7 @@ public:
class XMLReferenceHint_Impl : public XMLHint_Impl
{
- OUString sRefName;
+ OUString const sRefName;
public:
@@ -165,7 +165,7 @@ public:
class XMLTextFrameHint_Impl : public XMLHint_Impl
{
// OD 2004-04-20 #i26791#
- SvXMLImportContextRef xContext;
+ SvXMLImportContextRef const xContext;
public:
@@ -218,7 +218,7 @@ public:
// Core impl. of the unification of drawing objects and Writer fly frames (#i26791#)
class XMLDrawHint_Impl : public XMLHint_Impl
{
- SvXMLImportContextRef xContext;
+ SvXMLImportContextRef const xContext;
public:
diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx
index 47af8e27a42f..ecdb6df09332 100644
--- a/xmloff/source/text/txtprhdl.cxx
+++ b/xmloff/source/text/txtprhdl.cxx
@@ -718,7 +718,7 @@ bool XMLHoriMirrorPropHdl_Impl::exportXML(
class XMLGrfMirrorPropHdl_Impl : public XMLPropertyHandler
{
const OUString sVal;
- bool bHori;
+ bool const bHori;
public:
XMLGrfMirrorPropHdl_Impl( enum XMLTokenEnum eVal, bool bH ) :
diff --git a/xmloff/source/transform/NotesTContext.hxx b/xmloff/source/transform/NotesTContext.hxx
index dcc88b468802..de115a5c7555 100644
--- a/xmloff/source/transform/NotesTContext.hxx
+++ b/xmloff/source/transform/NotesTContext.hxx
@@ -26,7 +26,7 @@ class XMLNotesTransformerContext : public XMLPersElemContentTContext
{
bool m_bEndNote;
bool const m_bPersistent;
- ::xmloff::token::XMLTokenEnum m_eTypeToken;
+ ::xmloff::token::XMLTokenEnum const m_eTypeToken;
public:
XMLNotesTransformerContext( XMLTransformerBase& rTransformer,
diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx
index d31ddcc9a1a2..98291990581a 100644
--- a/xmloff/source/xforms/xformsexport.cxx
+++ b/xmloff/source/xforms/xformsexport.cxx
@@ -112,7 +112,7 @@ typedef struct
{
const sal_Char* pPropertyName;
sal_uInt16 const nNamespace;
- sal_uInt16 nToken;
+ sal_uInt16 const nToken;
convert_t const aConverter;
} ExportTable;
static void lcl_export( const Reference<XPropertySet>& rPropertySet,