Hello,
Il 11/02/2012 17:13, julien2412 ha scritto:
Hi Ivan,
So it would be this :
diff --git a/linguistic/source/spelldsp.hxx b/linguistic/source/spelldsp.hxx
index 9ae9cd4..e2186f9 100644
--- a/linguistic/source/spelldsp.hxx
+++ b/linguistic/source/spelldsp.hxx
@@ -73,7 +73,7 @@ class SpellCheckerDispatcher :
::com::sun::star::linguistic2::XSearchableDictionaryList>
xDicList;
LngSvcMgr&rMgr;
- linguistic::SpellCache *pCache; // Spell Cache (holds known words)
+ mutable linguistic::SpellCache *pCache; // Spell Cache (holds
known words)
// disallow copy-constructor and assignment-operator for now
SpellCheckerDispatcher(const SpellCheckerDispatcher&);
@@ -134,7 +134,7 @@ public:
inline linguistic::SpellCache& SpellCheckerDispatcher::GetCache() const
{
if (!pCache)
- ((SpellCheckerDispatcher *) this)->pCache = new
linguistic::SpellCache();
+ pCache = new linguistic::SpellCache();
return *pCache;
}
What about the Riccardo's suggestion ?
I don't know which solution would be the most appropriate and why ?
This looks more like C++ than mine :) Then it makes the code easier to
read which is always good.
cheers
--
Riccardo Magliocchetti
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.