diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-08-20 08:48:04 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-08-20 08:48:04 +0000 |
commit | 40b2667706b070559082dff2e6d998ccbe398f65 (patch) | |
tree | a1a346bec7cee486656fcf8b818786cd7c311cb7 | |
parent | db0a896cf0f25fa82b099abb535790dc6bf2f3bf (diff) |
INTEGRATION: CWS aw033 (1.132.16); FILE MERGED
2008/07/15 14:28:21 aw 1.132.16.1: #i39532# changes after resync - SW problem with XDrawPage lifetime
-rw-r--r-- | sw/source/ui/uno/unotxdoc.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 7b30e2ed7a..06faef6e48 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: unotxdoc.cxx,v $ - * $Revision: 1.133 $ + * $Revision: 1.134 $ * * This file is part of OpenOffice.org. * @@ -1446,10 +1446,15 @@ Reference< drawing::XDrawPage > SwXTextDocument::getDrawPage(void) throw( Runti throw RuntimeException(); if(!pxXDrawPage) { - ((SwXTextDocument*)this)->pxXDrawPage = new Reference< drawing::XDrawPage > ; + // simplified this creation, keeping original below as reference + // for the case that it did something by purpose ((SwXTextDocument*)this)->pDrawPage = new SwXDrawPage(pDocShell->GetDoc()); - Reference< drawing::XShapes > xTmp = pDrawPage; - *pxXDrawPage = Reference< drawing::XDrawPage>(xTmp, UNO_QUERY); + ((SwXTextDocument*)this)->pxXDrawPage = new Reference< drawing::XDrawPage >(pDrawPage); + + //((SwXTextDocument*)this)->pxXDrawPage = new Reference< drawing::XDrawPage > ; + //((SwXTextDocument*)this)->pDrawPage = new SwXDrawPage(pDocShell->GetDoc()); + //Reference< drawing::XShapes > xTmp = pDrawPage; + //*pxXDrawPage = Reference< drawing::XDrawPage>(xTmp, UNO_QUERY); } return *pxXDrawPage; } @@ -1589,7 +1594,7 @@ void SwXTextDocument::InitNewDoc() uno::Reference<lang::XComponent> xComp( *pxXDrawPage, uno::UNO_QUERY ); xComp->dispose(); // <-- - pDrawPage->Invalidate(); + pDrawPage->InvalidateSwDoc(); delete pxXDrawPage; pxXDrawPage = 0; } |