sw/source/filter/html/htmlform.cxx | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit 2ce95e838260ed1e7e64ac8f5662aa2e2234ab9e Author: Michael Stahl <mst...@redhat.com> Date: Tue May 3 14:35:32 2016 +0200 sw: HTML filter: avoid turning on Undo with ridiculous hacks SwHTMLParser::SetControlSize() loads a "hidden document" into the same model (!) that is currently being imported (!), just so it can get a awt::XControl from the ViewShell; unfortunately creating the ViewShell happens to enable Undo too, so turn that off again. This avoids triggering the assert in SwRegHistory::InsertItems() on kde122884-1.html Change-Id: I3d8fcd5c43bcb8e7ed8775710acbc2d40f2ffdd0 diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 2672ac2..f66a469 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -62,6 +62,7 @@ #include <com/sun/star/form/XForm.hpp> #include <doc.hxx> #include <IDocumentLayoutAccess.hxx> +#include <IDocumentUndoRedo.hxx> #include <pam.hxx> #include <swtable.hxx> #include <fmtanchr.hxx> @@ -664,6 +665,8 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha m_pTempViewFrame = SfxViewFrame::LoadHiddenDocument( *pDocSh, 0 ); CallStartAction(); pVSh = m_pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); + // this ridiculous hack also enables Undo, so turn it off again + m_pDoc->GetIDocumentUndoRedo().DoUndo(false); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits