summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-07-05 15:04:50 +0200
committerMichael Stahl <mstahl@redhat.com>2013-07-05 21:49:48 +0200
commitb3f41543851e9985c6c7ba133c32753c9bc732c1 (patch)
tree10ab93329afc455291d1819dfd14f11b70eea951 /sw
parent0ffab9363d527d55b12b9b09d7136ca1c9d171e0 (diff)
SwHTMLParser: avoid a spurious ~SwindexReg assert
The pPam that is passed to SwHTMLParser would be reinitialized by SwReader::Read anyway. Can be reproduced with bugdoc from fdo#65935. Change-Id: I3b7dcc9c83d9d2eac05ee6ec38909dea7350d245
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/html/swhtml.cxx6
-rw-r--r--sw/source/filter/html/swhtml.hxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index cf572e95a21b..76a2d17020c4 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -237,7 +237,7 @@ sal_uLong HTMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, co
-SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
+SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCrsr, SvStream& rIn,
const String& rPath,
const String& rBaseURL,
int bReadNewDoc,
@@ -305,7 +305,8 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
eScriptLang = HTML_SL_UNKNOWN;
bAnyStarBasic = sal_True;
- pPam = new SwPaM( *rCrsr.GetPoint() );
+ rCrsr.DeleteMark();
+ pPam = &rCrsr; // re-use existing cursor: avoids spurious ~SwIndexReg assert
memset( &aAttrTab, 0, sizeof( _HTMLAttrTable ));
// Die Font-Groessen 1-7 aus der INI-Datei lesen
@@ -453,7 +454,6 @@ SwHTMLParser::~SwHTMLParser()
aSetAttrTab.clear();
}
- delete pPam;
delete pCSS1Parser;
delete pNumRuleInfo;
DeleteFormImpl();
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index d3e0ab43783e..a8db7b8dd47a 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -894,7 +894,7 @@ protected:
public:
- SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
+ SwHTMLParser( SwDoc* pD, SwPaM & rCrsr, SvStream& rIn,
const String& rFileName,
const String& rBaseURL,
int bReadNewDoc = sal_True,