diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-05-05 10:25:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-05-05 10:27:47 +0100 |
commit | 567c1db25bd705faac44203e4a3d01d0f5e1385c (patch) | |
tree | 58a5f6246a8414e4f41eb2b94281409e8ac4353e /sw/inc/swtable.hxx | |
parent | 4da69155054a661af5a405b3473affa2d44e6c90 (diff) |
Resolves: fdo#49342 crash merging cells, revert conversion to std::map
3af0c948254751eade9bff772b849720747c5494
868bd3b778b6c7b970c67d1dacc469967f69e551
b2e84f9a40fda7821d4e658f9102bcbc783a1ba3
7264d2767095150944ff1e6999c71be1dbdc6f83
858b5b4f36a357fe7192e7c2ed9cc3cdfc81fd8f
The problem is that a paragraph gets added to the document after the TableBox
selection is created, which changes the node ids of the following paragraphs in
the TableBox but the map has used cached SttNd value as its key, so it can't
recognize nodes using the new index.
This worked in the old implementation because that was effectively a
sorted-vector, so probably the best conversion to stl is a sorted vector
Change-Id: I1143d843b872eee15b016f82b68ecc020969f1b5
Diffstat (limited to 'sw/inc/swtable.hxx')
-rw-r--r-- | sw/inc/swtable.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index f6de56e9d5c8..ba67780a1762 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -34,7 +34,6 @@ #include <swtypes.hxx> #include <calbck.hxx> #include <swrect.hxx> -#include <frmfmt.hxx> #include <memory> #include <boost/noncopyable.hpp> @@ -42,6 +41,7 @@ class SwStartNode; class SwFmt; class Color; +class SwFrmFmt; class SwTableFmt; class SwTableLineFmt; class SwTableBoxFmt; @@ -404,7 +404,8 @@ public: const SwTableLine *GetUpper() const { return pUpper; } void SetUpper( SwTableLine *pNew ) { pUpper = pNew; } - SwFrmFmt* GetFrmFmt() const { return const_cast<SwFrmFmt*>(static_cast<const SwFrmFmt*>(GetRegisteredIn())); } + SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)GetRegisteredIn(); } + SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } // Creates its own FrmFmt if more boxes depend on it. SwFrmFmt* ClaimFrmFmt(); |