Kaydet (Commit) fbdaa717 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Mark these members mutable to avoid casting them in const method.

Change-Id: Ib5d8ea83e37ab1e3c5a1ad4dc9870d3d5a2d8779
üst ab054346
...@@ -259,11 +259,11 @@ class SvXMLStylesContext_Impl ...@@ -259,11 +259,11 @@ class SvXMLStylesContext_Impl
typedef std::set<SvXMLStyleIndex_Impl, SvXMLStyleIndexCmp_Impl> IndicesType; typedef std::set<SvXMLStyleIndex_Impl, SvXMLStyleIndexCmp_Impl> IndicesType;
StylesType aStyles; StylesType aStyles;
IndicesType* pIndices; mutable IndicesType* pIndices;
bool bAutomaticStyle; bool bAutomaticStyle;
#ifdef DBG_UTIL #ifdef DBG_UTIL
sal_uInt32 nIndexCreated; mutable sal_uInt32 nIndexCreated;
#endif #endif
void FlushIndex() { delete pIndices; pIndices = 0; } void FlushIndex() { delete pIndices; pIndices = 0; }
...@@ -345,11 +345,10 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( sal_uIn ...@@ -345,11 +345,10 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( sal_uIn
DBG_ASSERT( 0==nIndexCreated, DBG_ASSERT( 0==nIndexCreated,
"Performance warning: sdbcx::Index created multiple times" ); "Performance warning: sdbcx::Index created multiple times" );
#endif #endif
((SvXMLStylesContext_Impl *)this)->pIndices = pIndices = new IndicesType(aStyles.begin(), aStyles.end());
new IndicesType( aStyles.begin(), aStyles.end() );
SAL_WARN_IF(pIndices->size() != aStyles.size(), "xmloff", "Here is a duplicate Style"); SAL_WARN_IF(pIndices->size() != aStyles.size(), "xmloff", "Here is a duplicate Style");
#ifdef DBG_UTIL #ifdef DBG_UTIL
((SvXMLStylesContext_Impl *)this)->nIndexCreated++; ++nIndexCreated;
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment