summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-23 17:06:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-24 09:34:17 +0200
commit29a8e51aea4e6956a388deaa1104fb1d81476ad3 (patch)
tree67f5c1a253e8979829d00f4201e44c0c6e96bfd7 /xmloff
parent37ce56416d67ecd6a8d1bfa762c45ec04a00e51b (diff)
loplugin:unusedfields,can-be-const in xmloff(1)
(*) When passing a part of a global static data to XMLPropertiesOOoTContext_Impl, just store a reference to it instead of copying (*) Simplify the OOo2OasisTransformer constructor and call sites to make the const-ness work Change-Id: I012d638cfd9266ed3514164e84b381d0d577f821 Reviewed-on: https://gerrit.libreoffice.org/57853 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/transform/ControlOASISTContext.hxx4
-rw-r--r--xmloff/source/transform/CreateElemTContext.hxx2
-rw-r--r--xmloff/source/transform/EventMap.hxx2
-rw-r--r--xmloff/source/transform/EventOOoTContext.hxx2
-rw-r--r--xmloff/source/transform/FormPropOASISTContext.hxx4
-rw-r--r--xmloff/source/transform/FrameOOoTContext.hxx2
-rw-r--r--xmloff/source/transform/IgnoreTContext.hxx8
-rw-r--r--xmloff/source/transform/MergeElemTContext.hxx2
-rw-r--r--xmloff/source/transform/NotesTContext.hxx2
-rw-r--r--xmloff/source/transform/OOo2Oasis.cxx25
-rw-r--r--xmloff/source/transform/OOo2Oasis.hxx8
-rw-r--r--xmloff/source/transform/Oasis2OOo.cxx2
-rw-r--r--xmloff/source/transform/PersAttrListTContext.hxx2
-rw-r--r--xmloff/source/transform/ProcAddAttrTContext.hxx4
-rw-r--r--xmloff/source/transform/ProcAttrTContext.hxx4
-rw-r--r--xmloff/source/transform/RenameElemTContext.hxx6
-rw-r--r--xmloff/source/transform/StyleOASISTContext.cxx2
-rw-r--r--xmloff/source/transform/StyleOASISTContext.hxx2
-rw-r--r--xmloff/source/transform/StyleOOoTContext.cxx32
-rw-r--r--xmloff/source/transform/StyleOOoTContext.hxx2
-rw-r--r--xmloff/source/transform/TransformerActionInit.hxx12
-rw-r--r--xmloff/source/transform/TransformerBase.hxx2
-rw-r--r--xmloff/source/transform/XMLFilterRegistration.cxx6
-rw-r--r--xmloff/source/xforms/SchemaRestrictionContext.hxx2
-rw-r--r--xmloff/source/xforms/xformsexport.cxx4
25 files changed, 68 insertions, 75 deletions
diff --git a/xmloff/source/transform/ControlOASISTContext.hxx b/xmloff/source/transform/ControlOASISTContext.hxx
index 9b223bc64ae0..0a0a167af80c 100644
--- a/xmloff/source/transform/ControlOASISTContext.hxx
+++ b/xmloff/source/transform/ControlOASISTContext.hxx
@@ -24,8 +24,8 @@
class XMLControlOASISTransformerContext : public XMLTransformerContext
{
- OUString m_aElemQName;
- bool m_bCreateControl;
+ OUString const m_aElemQName;
+ bool const m_bCreateControl;
public:
XMLControlOASISTransformerContext( XMLTransformerBase& rTransformer,
diff --git a/xmloff/source/transform/CreateElemTContext.hxx b/xmloff/source/transform/CreateElemTContext.hxx
index 2d34e562e6c5..13ad49b6ee8d 100644
--- a/xmloff/source/transform/CreateElemTContext.hxx
+++ b/xmloff/source/transform/CreateElemTContext.hxx
@@ -25,7 +25,7 @@
class XMLCreateElemTransformerContext : public XMLTransformerContext
{
- sal_uInt16 m_nActionMap;
+ sal_uInt16 const m_nActionMap;
public:
XMLCreateElemTransformerContext( XMLTransformerBase& rTransformer,
diff --git a/xmloff/source/transform/EventMap.hxx b/xmloff/source/transform/EventMap.hxx
index 410c012d98b8..ec8d1a92f406 100644
--- a/xmloff/source/transform/EventMap.hxx
+++ b/xmloff/source/transform/EventMap.hxx
@@ -24,7 +24,7 @@
struct XMLTransformerEventMapEntry
{
- sal_uInt16 m_nOASISPrefix;
+ sal_uInt16 const m_nOASISPrefix;
const sal_Char *m_pOASISName;
const sal_Char *m_pOOoName;
};
diff --git a/xmloff/source/transform/EventOOoTContext.hxx b/xmloff/source/transform/EventOOoTContext.hxx
index 23297127dff9..5254b9902f43 100644
--- a/xmloff/source/transform/EventOOoTContext.hxx
+++ b/xmloff/source/transform/EventOOoTContext.hxx
@@ -26,7 +26,7 @@ class XMLTransformerOOoEventMap_Impl;
class XMLEventOOoTransformerContext : public XMLPersElemContentTContext
{
- bool m_bPersistent;
+ bool const m_bPersistent;
public:
XMLEventOOoTransformerContext( XMLTransformerBase& rTransformer,
diff --git a/xmloff/source/transform/FormPropOASISTContext.hxx b/xmloff/source/transform/FormPropOASISTContext.hxx
index a2b50270e312..139584c7c77d 100644
--- a/xmloff/source/transform/FormPropOASISTContext.hxx
+++ b/xmloff/source/transform/FormPropOASISTContext.hxx
@@ -25,8 +25,8 @@
class XMLFormPropOASISTransformerContext :
public XMLRenameElemTransformerContext
{
- bool m_bIsList;
- bool m_bIsListValue;
+ bool const m_bIsList;
+ bool const m_bIsListValue;
static ::xmloff::token::XMLTokenEnum GetValueType( const OUString& rValue );
diff --git a/xmloff/source/transform/FrameOOoTContext.hxx b/xmloff/source/transform/FrameOOoTContext.hxx
index eb31e9305916..27f8b5494a87 100644
--- a/xmloff/source/transform/FrameOOoTContext.hxx
+++ b/xmloff/source/transform/FrameOOoTContext.hxx
@@ -24,7 +24,7 @@
class XMLFrameOOoTransformerContext : public XMLPersElemContentTContext
{
- OUString m_aElemQName;
+ OUString const m_aElemQName;
public:
XMLFrameOOoTransformerContext( XMLTransformerBase& rTransformer,
diff --git a/xmloff/source/transform/IgnoreTContext.hxx b/xmloff/source/transform/IgnoreTContext.hxx
index c61e330ab432..bc52692df426 100644
--- a/xmloff/source/transform/IgnoreTContext.hxx
+++ b/xmloff/source/transform/IgnoreTContext.hxx
@@ -25,10 +25,10 @@
class XMLIgnoreTransformerContext : public XMLTransformerContext
{
- bool m_bIgnoreCharacters;
- bool m_bIgnoreElements;
- bool m_bAllowCharactersRecursive;
- bool m_bRecursiveUse;
+ bool const m_bIgnoreCharacters;
+ bool const m_bIgnoreElements;
+ bool const m_bAllowCharactersRecursive;
+ bool const m_bRecursiveUse;
public:
// A contexts constructor does anything that is required if an element
diff --git a/xmloff/source/transform/MergeElemTContext.hxx b/xmloff/source/transform/MergeElemTContext.hxx
index dedba943a0e1..add30debc829 100644
--- a/xmloff/source/transform/MergeElemTContext.hxx
+++ b/xmloff/source/transform/MergeElemTContext.hxx
@@ -31,7 +31,7 @@ class XMLMergeElemTransformerContext : public XMLTransformerContext
{
css::uno::Reference< css::xml::sax::XAttributeList > m_xAttrList;
XMLPersTextContentTContextVector m_aChildContexts;
- sal_uInt16 m_nActionMap;
+ sal_uInt16 const m_nActionMap;
bool m_bStartElementExported;
void ExportStartElement();
diff --git a/xmloff/source/transform/NotesTContext.hxx b/xmloff/source/transform/NotesTContext.hxx
index 88c0c7c424c4..dcc88b468802 100644
--- a/xmloff/source/transform/NotesTContext.hxx
+++ b/xmloff/source/transform/NotesTContext.hxx
@@ -25,7 +25,7 @@
class XMLNotesTransformerContext : public XMLPersElemContentTContext
{
bool m_bEndNote;
- bool m_bPersistent;
+ bool const m_bPersistent;
::xmloff::token::XMLTokenEnum m_eTypeToken;
public:
diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx
index 50eee3b7fb9e..1f354a34dd5f 100644
--- a/xmloff/source/transform/OOo2Oasis.cxx
+++ b/xmloff/source/transform/OOo2Oasis.cxx
@@ -1086,7 +1086,7 @@ static XMLTokenEnum aTokenMap[] =
class XMLDocumentTransformerContext_Impl : public XMLTransformerContext
{
- OUString m_aElemQName;
+ OUString const m_aElemQName;
OUString m_aOldClass;
public:
@@ -1367,8 +1367,8 @@ void XMLTabStopOOoTContext_Impl::StartElement(
class XMLTrackedChangesOOoTContext_Impl : public XMLTransformerContext
{
- sal_uInt16 m_nPrefix;
- XMLTokenEnum m_eToken;
+ sal_uInt16 const m_nPrefix;
+ XMLTokenEnum const m_eToken;
public:
XMLTrackedChangesOOoTContext_Impl( XMLTransformerBase& rTransformer,
@@ -1432,7 +1432,7 @@ void XMLTrackedChangesOOoTContext_Impl::StartElement(
class XMLTableOOoTransformerContext_Impl : public XMLTransformerContext
{
- OUString m_aElemQName;
+ OUString const m_aElemQName;
public:
XMLTableOOoTransformerContext_Impl( XMLTransformerBase& rTransformer,
@@ -1741,19 +1741,14 @@ OUString OOo2OasisTransformer::GetEventName( const OUString& rName, bool )
return aNewName;
}
-OOo2OasisTransformer::OOo2OasisTransformer( const sal_Char *pImplName,
- const sal_Char *pSubServiceName )
+OOo2OasisTransformer::OOo2OasisTransformer( OUString const & rImplName,
+ OUString const & rSubServiceName )
throw() :
XMLTransformerBase( aActionTable, aTokenMap ),
+ m_aImplName(rImplName),
+ m_aSubServiceName(rSubServiceName),
m_pEventMap( nullptr )
{
- if( pImplName )
- m_aImplName = OUString::createFromAscii( pImplName );
- else
- m_aImplName = OOo2OasisTransformer_getImplementationName();
- if( pSubServiceName )
- m_aSubServiceName = OUString::createFromAscii( pSubServiceName );
-
GetNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE), GetXMLToken(XML_N_OFFICE_OOO), XML_NAMESPACE_OFFICE );
GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE), GetXMLToken(XML_N_OFFICE), XML_NAMESPACE_OFFICE );
@@ -2001,13 +1996,13 @@ Sequence< OUString > OOo2OasisTransformer_getSupportedServiceNames() throw()
Reference< XInterface > OOo2OasisTransformer_createInstance(
const Reference< XMultiServiceFactory > & )
{
- return static_cast<cppu::OWeakObject*>(new OOo2OasisTransformer());
+ return static_cast<cppu::OWeakObject*>(new OOo2OasisTransformer(OOo2OasisTransformer_getImplementationName(), OUString()));
}
#define OOO_IMPORTER( className, implName, subServiceName ) \
OUString className##_getImplementationName() throw() \
{ \
- return OUString( implName ); \
+ return OUString(implName); \
} \
\
Sequence< OUString > className##_getSupportedServiceNames() throw()\
diff --git a/xmloff/source/transform/OOo2Oasis.hxx b/xmloff/source/transform/OOo2Oasis.hxx
index ac1fd3f933a9..7d6244f35aff 100644
--- a/xmloff/source/transform/OOo2Oasis.hxx
+++ b/xmloff/source/transform/OOo2Oasis.hxx
@@ -32,8 +32,8 @@ class OOo2OasisTransformer :
public css::document::XImporter,
public css::document::XFilter
{
- OUString m_aImplName;
- OUString m_aSubServiceName;
+ OUString const m_aImplName;
+ OUString const m_aSubServiceName;
std::unique_ptr<XMLTransformerActions> m_aActions[MAX_OOO_ACTIONS];
XMLTransformerOOoEventMap_Impl *m_pEventMap;
@@ -47,8 +47,8 @@ protected:
virtual XMLTransformerActions *GetUserDefinedActions( sal_uInt16 n ) override;
public:
- OOo2OasisTransformer( const sal_Char *pImplName=nullptr,
- const sal_Char *pSubServiceName=nullptr ) throw();
+ OOo2OasisTransformer( OUString const & rImplName,
+ OUString const & rSubServiceName ) throw();
virtual ~OOo2OasisTransformer() throw() override;
// XInterface
diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx
index f2891789c531..92c929ce2b15 100644
--- a/xmloff/source/transform/Oasis2OOo.cxx
+++ b/xmloff/source/transform/Oasis2OOo.cxx
@@ -1510,7 +1510,7 @@ void XMLConfigItemTContext_Impl::EndElement()
class XMLTrackedChangesOASISTContext_Impl : public XMLTransformerContext
{
- OUString m_aAttrQName;
+ OUString const m_aAttrQName;
public:
diff --git a/xmloff/source/transform/PersAttrListTContext.hxx b/xmloff/source/transform/PersAttrListTContext.hxx
index 1112376503ce..eca41609783f 100644
--- a/xmloff/source/transform/PersAttrListTContext.hxx
+++ b/xmloff/source/transform/PersAttrListTContext.hxx
@@ -29,7 +29,7 @@ class XMLPersAttrListTContext : public XMLTransformerContext
css::uno::Reference< css::xml::sax::XAttributeList > m_xAttrList;
OUString m_aElemQName;
- sal_uInt16 m_nActionMap;
+ sal_uInt16 const m_nActionMap;
protected:
diff --git a/xmloff/source/transform/ProcAddAttrTContext.hxx b/xmloff/source/transform/ProcAddAttrTContext.hxx
index 78705805f054..7cfb14a8bb08 100644
--- a/xmloff/source/transform/ProcAddAttrTContext.hxx
+++ b/xmloff/source/transform/ProcAddAttrTContext.hxx
@@ -24,8 +24,8 @@
class XMLProcAddAttrTransformerContext : public XMLProcAttrTransformerContext
{
- OUString m_aAttrQName;
- OUString m_aAttrValue;
+ OUString const m_aAttrQName;
+ OUString const m_aAttrValue;
public:
XMLProcAddAttrTransformerContext( XMLTransformerBase& rTransformer,
diff --git a/xmloff/source/transform/ProcAttrTContext.hxx b/xmloff/source/transform/ProcAttrTContext.hxx
index 5bc9d2b41b5c..33e45879e3c0 100644
--- a/xmloff/source/transform/ProcAttrTContext.hxx
+++ b/xmloff/source/transform/ProcAttrTContext.hxx
@@ -25,8 +25,8 @@
class XMLProcAttrTransformerContext : public XMLTransformerContext
{
- OUString m_aElemQName;
- sal_uInt16 m_nActionMap;
+ OUString const m_aElemQName;
+ sal_uInt16 const m_nActionMap;
protected:
diff --git a/xmloff/source/transform/RenameElemTContext.hxx b/xmloff/source/transform/RenameElemTContext.hxx
index 052279d1129b..b8e4f8d13a65 100644
--- a/xmloff/source/transform/RenameElemTContext.hxx
+++ b/xmloff/source/transform/RenameElemTContext.hxx
@@ -26,9 +26,9 @@
class XMLRenameElemTransformerContext : public XMLTransformerContext
{
- OUString m_aElemQName;
- OUString m_aAttrQName;
- OUString m_aAttrValue;
+ OUString const m_aElemQName;
+ OUString const m_aAttrQName;
+ OUString const m_aAttrValue;
public:
// The following constructor renames the element names "rQName"
diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx
index 3546f0bc7377..fafd8e9ace7e 100644
--- a/xmloff/source/transform/StyleOASISTContext.cxx
+++ b/xmloff/source/transform/StyleOASISTContext.cxx
@@ -65,7 +65,7 @@ class XMLPropertiesTContext_Impl : public XMLPersElemContentTContext
css::uno::Reference< css::xml::sax::XAttributeList > m_xAttrList;
XMLPropType m_ePropType;
- bool m_bControlStyle;
+ bool const m_bControlStyle;
public:
diff --git a/xmloff/source/transform/StyleOASISTContext.hxx b/xmloff/source/transform/StyleOASISTContext.hxx
index 081bacedb436..de30f695a069 100644
--- a/xmloff/source/transform/StyleOASISTContext.hxx
+++ b/xmloff/source/transform/StyleOASISTContext.hxx
@@ -30,7 +30,7 @@ class XMLStyleOASISTContext : public XMLPersElemContentTContext
{
::rtl::Reference< XMLPropertiesTContext_Impl > m_xPropContext;
- bool m_bPersistent;
+ bool const m_bPersistent;
bool m_bControlStyle;
public:
diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx
index 60d9902280b2..6b1cceede346 100644
--- a/xmloff/source/transform/StyleOOoTContext.cxx
+++ b/xmloff/source/transform/StyleOOoTContext.cxx
@@ -43,6 +43,7 @@
#include <rtl/math.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
+#include <array>
using namespace ::xmloff::token;
using namespace ::com::sun::star::uno;
@@ -62,7 +63,7 @@ const sal_uInt16 MAX_PROP_TYPES = 4;
{ XML_PROP_TYPE_##a, XML_PROP_TYPE_##END, \
XML_PROP_TYPE_END, XML_PROP_TYPE_END }
-static const XMLPropType aPropTypes[XML_FAMILY_TYPE_END][MAX_PROP_TYPES] =
+static const std::array<XMLPropType,MAX_PROP_TYPES> aPropTypes[XML_FAMILY_TYPE_END] =
{
ENTRY3( GRAPHIC, PARAGRAPH, TEXT ), // XML_FAMILY_TYPE_GRAPHIC,
ENTRY3( GRAPHIC, PARAGRAPH, TEXT ), // XML_FAMILY_TYPE_PRESENTATION,
@@ -209,11 +210,11 @@ class XMLPropertiesOOoTContext_Impl : public XMLTransformerContext
::rtl::Reference < XMLTypedPropertiesOOoTContext_Impl >
m_aPropContexts[MAX_PROP_TYPES];
- typedef XMLPropType XMLPropTypes[MAX_PROP_TYPES];
+ using XMLPropTypes = std::array<XMLPropType, MAX_PROP_TYPES>;
- XMLPropTypes m_aPropTypes;
+ XMLPropTypes const & m_rPropTypes;
- bool m_bPersistent;
+ bool const m_bPersistent;
XMLTypedPropertiesOOoTContext_Impl *GetPropContextAndAction(
TransformerAction_Impl& rAction,
@@ -253,7 +254,7 @@ XMLTypedPropertiesOOoTContext_Impl
sal_uInt16 nIndex = MAX_PROP_TYPES;
for( sal_uInt16 i=0; i< MAX_PROP_TYPES; i++ )
{
- if( m_aPropTypes[i] == eType )
+ if( m_rPropTypes[i] == eType )
{
nIndex = i;
break;
@@ -270,7 +271,7 @@ XMLTypedPropertiesOOoTContext_Impl
GetTransformer().GetNamespaceMap().GetQNameByKey(
XML_NAMESPACE_STYLE,
::xmloff::token::GetXMLToken(
- aPropTokens[m_aPropTypes[nIndex]] ) ));
+ aPropTokens[m_rPropTypes[nIndex]] ) ));
}
return m_aPropContexts[nIndex].get();
@@ -287,10 +288,10 @@ XMLTypedPropertiesOOoTContext_Impl
XMLTransformerActions::key_type aKey( nPrefix, rLocalName );
sal_uInt16 i=0;
- while( i < MAX_PROP_TYPES && XML_PROP_TYPE_END!=m_aPropTypes[i])
+ while( i < MAX_PROP_TYPES && XML_PROP_TYPE_END!=m_rPropTypes[i])
{
sal_uInt16 nActionMap =
- (bElem ? aElemActionMaps : aAttrActionMaps)[m_aPropTypes[i]];
+ (bElem ? aElemActionMaps : aAttrActionMaps)[m_rPropTypes[i]];
if( nActionMap < MAX_OOO_PROP_ACTIONS )
{
XMLTransformerActions *pActions =
@@ -315,15 +316,15 @@ XMLTypedPropertiesOOoTContext_Impl
#ifdef DBG_UTIL
if( !( XML_NAMESPACE_NONE == nPrefix ||
(XML_NAMESPACE_UNKNOWN_FLAG & nPrefix) ||
- XML_PROP_TYPE_END==m_aPropTypes[1] ||
- (i<MAX_PROP_TYPES && XML_PROP_TYPE_END!=m_aPropTypes[i]) ) )
+ XML_PROP_TYPE_END==m_rPropTypes[1] ||
+ (i<MAX_PROP_TYPES && XML_PROP_TYPE_END!=m_rPropTypes[i]) ) )
{
SAL_WARN("xmloff", "Didn't find property: "
<< GetTransformer().GetNamespaceMap().GetPrefixByKey( nPrefix )
<< ":"
<< rLocalName
<< ", assuming <style:"
- << ::xmloff::token::GetXMLToken( aPropTokens[m_aPropTypes[0]] )
+ << ::xmloff::token::GetXMLToken( aPropTokens[m_rPropTypes[0]] )
<< ">" );
}
#endif
@@ -336,7 +337,7 @@ XMLTypedPropertiesOOoTContext_Impl
GetTransformer().GetNamespaceMap().GetQNameByKey(
XML_NAMESPACE_STYLE,
::xmloff::token::GetXMLToken(
- aPropTokens[m_aPropTypes[nIndex]] ) ));
+ aPropTokens[m_rPropTypes[nIndex]] ) ));
}
return m_aPropContexts[nIndex].get();
@@ -348,13 +349,10 @@ XMLPropertiesOOoTContext_Impl::XMLPropertiesOOoTContext_Impl(
const XMLPropTypes& rTypes,
bool bPersistent ) :
XMLTransformerContext( rImp, rQName ),
+ // remember the types that belong to the attribute and element lists
+ m_rPropTypes(rTypes),
m_bPersistent( bPersistent )
{
- for( sal_uInt16 i=0; i < MAX_PROP_TYPES; ++i )
- {
- // remember the types that belong to the attribute and element lists
- m_aPropTypes[i] = rTypes[i];
- }
}
rtl::Reference<XMLTransformerContext> XMLPropertiesOOoTContext_Impl::CreateChildContext(
diff --git a/xmloff/source/transform/StyleOOoTContext.hxx b/xmloff/source/transform/StyleOOoTContext.hxx
index 84f11e7616d9..e32c4781d6ae 100644
--- a/xmloff/source/transform/StyleOOoTContext.hxx
+++ b/xmloff/source/transform/StyleOOoTContext.hxx
@@ -31,7 +31,7 @@ class XMLStyleOOoTContext : public XMLPersElemContentTContext
{
XMLFamilyType m_eFamily;
- bool m_bPersistent;
+ bool const m_bPersistent;
public:
XMLStyleOOoTContext( XMLTransformerBase& rTransformer,
diff --git a/xmloff/source/transform/TransformerActionInit.hxx b/xmloff/source/transform/TransformerActionInit.hxx
index dc0cacc78c41..330bb85f88b0 100644
--- a/xmloff/source/transform/TransformerActionInit.hxx
+++ b/xmloff/source/transform/TransformerActionInit.hxx
@@ -25,12 +25,12 @@
struct XMLTransformerActionInit
{
- sal_uInt16 m_nPrefix;
- ::xmloff::token::XMLTokenEnum m_eLocalName;
- sal_uInt32 m_nActionType;
- sal_uInt32 m_nParam1;
- sal_uInt32 m_nParam2;
- sal_uInt32 m_nParam3;
+ sal_uInt16 const m_nPrefix;
+ ::xmloff::token::XMLTokenEnum const m_eLocalName;
+ sal_uInt32 const m_nActionType;
+ sal_uInt32 const m_nParam1;
+ sal_uInt32 const m_nParam2;
+ sal_uInt32 const m_nParam3;
static sal_uInt32 QNameParam( sal_uInt16 nPrefix,
::xmloff::token::XMLTokenEnum eLocalName )
diff --git a/xmloff/source/transform/TransformerBase.hxx b/xmloff/source/transform/TransformerBase.hxx
index bf5e3bf6354c..429d27a06fd4 100644
--- a/xmloff/source/transform/TransformerBase.hxx
+++ b/xmloff/source/transform/TransformerBase.hxx
@@ -68,7 +68,7 @@ class XMLTransformerBase : public XMLTransformer
SvXMLNamespaceMap m_vReplaceNamespaceMap;
std::vector<rtl::Reference<XMLTransformerContext>> m_vContexts;
XMLTransformerActions m_ElemActions;
- XMLTransformerTokenMap m_TokenMap;
+ XMLTransformerTokenMap const m_TokenMap;
protected:
css::uno::Reference< css::frame::XModel > mxModel;
diff --git a/xmloff/source/transform/XMLFilterRegistration.cxx b/xmloff/source/transform/XMLFilterRegistration.cxx
index 2c35501227b2..bd94183ad82a 100644
--- a/xmloff/source/transform/XMLFilterRegistration.cxx
+++ b/xmloff/source/transform/XMLFilterRegistration.cxx
@@ -38,9 +38,9 @@ namespace
struct ServiceDescriptor
{
- GetImplementationName getImplementationName;
- GetSupportedServiceNames getSupportedServiceNames;
- CreateInstance createInstance;
+ GetImplementationName const getImplementationName;
+ GetSupportedServiceNames const getSupportedServiceNames;
+ CreateInstance const createInstance;
};
const ServiceDescriptor* getServiceDescriptors()
diff --git a/xmloff/source/xforms/SchemaRestrictionContext.hxx b/xmloff/source/xforms/SchemaRestrictionContext.hxx
index 17e2af255123..29a36247a335 100644
--- a/xmloff/source/xforms/SchemaRestrictionContext.hxx
+++ b/xmloff/source/xforms/SchemaRestrictionContext.hxx
@@ -37,7 +37,7 @@ class SchemaRestrictionContext : public TokenContext
{
css::uno::Reference<css::xforms::XDataTypeRepository> mxRepository;
css::uno::Reference<css::beans::XPropertySet> mxDataType;
- OUString msTypeName;
+ OUString const msTypeName;
OUString msBaseName;
public:
diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx
index 8374caa083e3..69a8d703f117 100644
--- a/xmloff/source/xforms/xformsexport.cxx
+++ b/xmloff/source/xforms/xformsexport.cxx
@@ -111,9 +111,9 @@ typedef OUString (*convert_t)( const Any& );
typedef struct
{
const sal_Char* pPropertyName;
- sal_uInt16 nNamespace;
+ sal_uInt16 const nNamespace;
sal_uInt16 nToken;
- convert_t aConverter;
+ convert_t const aConverter;
} ExportTable;
static void lcl_export( const Reference<XPropertySet>& rPropertySet,
SvXMLExport& rExport,