Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hello Noel,

I recently tested the copy&paste export (using RTF) on master and got a
crash. The attached patch solves the issue here.

OK to push, or you want to add a check in the called SwMSConvertControls
constructor?

Thanks.
From 9ab1204db32020ad0d70e91fb06e12b9c6a2b398 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@frugalware.org>
Date: Mon, 1 Aug 2011 19:55:42 +0200
Subject: [PATCH] MSWordExportBase::ExportDocument: check if we have a
 DocShell

This fixes a crash during RTF export invoked by copy&paste, as the
called constructor would unconditionally dereference the DocShell's
pointer since commit 183c9723dce0296baa0a38220199a1aa0e9f52ca.
---
 sw/source/filter/ww8/wrtww8.cxx |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index edad4b1..cf07bc8 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2925,7 +2925,7 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
     if ( !pOleMap)
         pOleMap = new WW8OleMaps;
 
-    if ( !pOCXExp )
+    if ( !pOCXExp && pDoc->GetDocShell() )
         pOCXExp = new SwMSConvertControls( pDoc->GetDocShell(), pCurPam );
 
     // #i81405# - Collect anchored objects before changing the redline mode.
-- 
1.7.6

Attachment: pgp1wCbXLLGw7.pgp
Description: PGP signature


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.