You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2012/06/06 10:29:45 UTC
svn commit: r1346776 -
/incubator/ooo/branches/AOO34/main/sw/source/ui/uno/unotxvw.cxx
Author: orw
Date: Wed Jun 6 08:29:44 2012
New Revision: 1346776
URL: http://svn.apache.org/viewvc?rev=1346776&view=rev
Log:
#119189# - method <SwXTextView::NotifySelChanged()> - do not destroy temporary document, if an action is pending
Found by: sorath <to...@mail.ru>
Modified:
incubator/ooo/branches/AOO34/main/sw/source/ui/uno/unotxvw.cxx
Modified: incubator/ooo/branches/AOO34/main/sw/source/ui/uno/unotxvw.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/AOO34/main/sw/source/ui/uno/unotxvw.cxx?rev=1346776&r1=1346775&r2=1346776&view=diff
==============================================================================
--- incubator/ooo/branches/AOO34/main/sw/source/ui/uno/unotxvw.cxx (original)
+++ incubator/ooo/branches/AOO34/main/sw/source/ui/uno/unotxvw.cxx Wed Jun 6 08:29:44 2012
@@ -940,11 +940,22 @@ void SwXTextView::NotifySelChanged()
DBG_ASSERT( m_pView, "view is missing" );
// destroy temporary document with selected text that is used
- // in PDF export of (multi-)selections.
+ // in PDF export of (multi-)selections and on print of (multi-)selections
if (m_pView && m_pView->GetTmpSelectionDoc().Is())
{
- m_pView->GetTmpSelectionDoc()->DoClose();
- m_pView->GetTmpSelectionDoc() = 0;
+ // do not destroy the temporary document, if an action is pending
+ bool bActionPending = false;
+ {
+ SfxObjectShellLock& xDocSh = m_pView->GetTmpSelectionDoc();
+ SwDoc* pDoc = static_cast< SwDocShell* >(&xDocSh)->GetDoc();
+ SwView* pView = pDoc ? pDoc->GetDocShell()->GetView() : 0;
+ bActionPending = pView ? pView->GetWrtShell().ActionPend() : false;
+ }
+ if ( !bActionPending )
+ {
+ m_pView->GetTmpSelectionDoc()->DoClose();
+ m_pView->GetTmpSelectionDoc() = 0;
+ }
}
uno::Reference< uno::XInterface > xInt = (cppu::OWeakObject*)(SfxBaseController*)this;