diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-09-19 23:33:09 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-09-19 23:33:09 +0200 |
commit | e1945ba903faa567d90addaf13a0eb8a2f688d15 (patch) | |
tree | b0c90468cc0951d4b5eab025067b64d2dfa0bd2c /sw/inc/index.hxx | |
parent | Call macosx-change-install-names on executables in gbuild, too. (diff) | |
download | core-e1945ba903faa567d90addaf13a0eb8a2f688d15.tar.gz core-e1945ba903faa567d90addaf13a0eb8a2f688d15.zip |
Do not delete SwIndexReg::pEmptyIndexArray while SwXTextCursor instances can still reference it.
Found during termination of sw/qa/unoapi soffice.bin run under Valgrind/memcheck.
Diffstat (limited to 'sw/inc/index.hxx')
-rw-r--r-- | sw/inc/index.hxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx index 551e31df3af8..2a3a79231712 100644 --- a/sw/inc/index.hxx +++ b/sw/inc/index.hxx @@ -29,6 +29,8 @@ #define _INDEX_HXX #include <limits.h> + +#include "rtl/instance.hxx" #include <tools/solar.h> #include <tools/rtti.hxx> // for RTTI of SwIndexReg #include <tools/string.hxx> // for xub_StrLen @@ -117,12 +119,6 @@ class SwIndexReg const SwIndex *pFirst, *pLast, *pMiddle; - // A global array for holding indices that need to be "swapped" temporarily - // or do not know a valid array (SwPaM/SwPosition!). - friend void _InitCore(); - friend void _FinitCore(); - static SwIndexReg* pEmptyIndexArray; - protected: virtual void Update( SwIndex const & rPos, const xub_StrLen nChangeLen, const bool bNegative = false, const bool bDelete = false ); @@ -142,6 +138,10 @@ public: void MoveTo( SwIndexReg& rArr ); }; +// A global array for holding indices that need to be "swapped" temporarily or +// do not know a valid array (SwPaM/SwPosition!): +struct EmptyIndexArray: rtl::Static< SwIndexReg, EmptyIndexArray > {}; + #if !defined(OSL_DEBUG_LEVEL) || OSL_DEBUG_LEVEL < 2 inline xub_StrLen SwIndex::operator++() |