summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-02-06 20:06:34 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-02-07 00:35:38 -0500
commitfbdaa717e3dc8a59d474b1bb5503cfa6dac609e8 (patch)
treed102e396ec6a33d4c4eb49a76f866373b1e24f7b /xmloff
parentab0543469433395153874c47ce46ef73fc137203 (diff)
Mark these members mutable to avoid casting them in const method.
Change-Id: Ib5d8ea83e37ab1e3c5a1ad4dc9870d3d5a2d8779
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/xmlstyle.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index 9cf064533884..51d391dcbdb6 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -259,11 +259,11 @@ class SvXMLStylesContext_Impl
typedef std::set<SvXMLStyleIndex_Impl, SvXMLStyleIndexCmp_Impl> IndicesType;
StylesType aStyles;
- IndicesType* pIndices;
+ mutable IndicesType* pIndices;
bool bAutomaticStyle;
#ifdef DBG_UTIL
- sal_uInt32 nIndexCreated;
+ mutable sal_uInt32 nIndexCreated;
#endif
void FlushIndex() { delete pIndices; pIndices = 0; }
@@ -345,11 +345,10 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( sal_uIn
DBG_ASSERT( 0==nIndexCreated,
"Performance warning: sdbcx::Index created multiple times" );
#endif
- ((SvXMLStylesContext_Impl *)this)->pIndices =
- new IndicesType( aStyles.begin(), aStyles.end() );
+ pIndices = new IndicesType(aStyles.begin(), aStyles.end());
SAL_WARN_IF(pIndices->size() != aStyles.size(), "xmloff", "Here is a duplicate Style");
#ifdef DBG_UTIL
- ((SvXMLStylesContext_Impl *)this)->nIndexCreated++;
+ ++nIndexCreated;
#endif
}