diff options
Diffstat (limited to 'sw/source/ui/uno/unotxvw.cxx')
-rw-r--r-- | sw/source/ui/uno/unotxvw.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index e6dfaf8517..b9db9649b9 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -848,14 +848,17 @@ void SAL_CALL SwXTextView::setRubyList( pDoc->SetRubyList( *rSh.GetCrsr(), aList, 0 ); } -SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ ) +SfxObjectShellLock SwXTextView::BuildTmpSelectionDoc() { SwWrtShell& rOldSh = m_pView->GetWrtShell(); SfxPrinter *pPrt = rOldSh.getIDocumentDeviceAccess()->getPrinter( false ); SwDocShell* pDocSh; - SfxObjectShellRef xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) ); + SfxObjectShellLock xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) ); xDocSh->DoInitNew( 0 ); - rOldSh.FillPrtDoc(pDocSh->GetDoc(), pPrt); + SwDoc *const pTempDoc( pDocSh->GetDoc() ); + // #i103634#, #i112425#: do not expand numbering and fields on PDF export + pTempDoc->SetClipBoard(true); + rOldSh.FillPrtDoc(pTempDoc, pPrt); SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); SwView* pDocView = (SwView*) pDocFrame->GetViewShell(); pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//Damit SelectShell gerufen wird. |