diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-25 15:13:42 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-25 15:54:02 -0400 |
commit | dbf84a3574dd3524fcb8d89c3dcb91182656e1ce (patch) | |
tree | de5c8bffe059d6cb754320f83fa6d81356731a77 | |
parent | 63a94bd053ecd3079003344904c2030339b7c8a6 (diff) |
The 'mutable' keyword exists for this kind of use.
Change-Id: Ic52192f53039b7f1b4529a93c13de74c5f54e7f8
-rw-r--r-- | include/xmloff/prhdlfac.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/prhdlfac.cxx | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/include/xmloff/prhdlfac.hxx b/include/xmloff/prhdlfac.hxx index e21b5cb32415..3b045831c49a 100644 --- a/include/xmloff/prhdlfac.hxx +++ b/include/xmloff/prhdlfac.hxx @@ -95,7 +95,7 @@ private: const; typedef ::std::map< sal_Int32, XMLPropertyHandler* > CacheMap; - CacheMap maHandlerCache; + mutable CacheMap maHandlerCache; }; #endif // INCLUDED_XMLOFF_PRHDLFAC_HXX diff --git a/xmloff/source/style/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx index 002c7f43a90a..5607585264a0 100644 --- a/xmloff/source/style/prhdlfac.cxx +++ b/xmloff/source/style/prhdlfac.cxx @@ -122,9 +122,7 @@ XMLPropertyHandler* XMLPropertyHandlerFactory::GetHdlCache( sal_Int32 nType ) co void XMLPropertyHandlerFactory::PutHdlCache( sal_Int32 nType, const XMLPropertyHandler* pHdl ) const { - // Don't be wondered about the following construct. The sense is to be able to provide a const- - // method as class-interface. - ((XMLPropertyHandlerFactory*)this)->maHandlerCache[ nType ] = (XMLPropertyHandler*)pHdl; + maHandlerCache[nType] = (XMLPropertyHandler*)pHdl; } const XMLPropertyHandler* XMLPropertyHandlerFactory::GetBasicHandler( sal_Int32 nType ) const |