[Libreoffice-commits] .: sw/source
Muthu Subramanian
sumuthu at kemper.freedesktop.org
Tue Apr 19 21:31:19 PDT 2011
sw/source/ui/uno/unotxdoc.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit b981d87c72a6066390ac82f179dcc8c5eb570a92
Author: Muthu Subramanian <sumuthu at novell.com>
Date: Wed Apr 20 10:03:37 2011 +0530
n#681746 - OLE crash fix.
Initialize object completely, otherwise init
would be triggered during dispose(). There could
be better ways to fix this.
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 41a2837..38df0f2 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -1354,10 +1354,13 @@ Reference< drawing::XDrawPage > SwXTextDocument::getDrawPage(void) throw( Runti
throw RuntimeException();
if(!pxXDrawPage)
{
- // simplified this creation, keeping original below as reference
- // for the case that it did something by purpose
((SwXTextDocument*)this)->pDrawPage = new SwXDrawPage(pDocShell->GetDoc());
((SwXTextDocument*)this)->pxXDrawPage = new Reference< drawing::XDrawPage >(pDrawPage);
+ // Create a Reference to trigger the complete initialization of the
+ // object. Otherwise in some corner cases it would get initialized
+ // at ::InitNewDoc -> which would get called during
+ // close() or dispose() -> n#681746
+ uno::Reference<lang::XComponent> xComp( *pxXDrawPage, uno::UNO_QUERY );
}
return *pxXDrawPage;
}
More information about the Libreoffice-commits
mailing list