summaryrefslogtreecommitdiff
path: root/sw/source/ui/uno
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2010-06-02 10:58:04 +0200
committerMathias Bauer <mba@openoffice.org>2010-06-02 10:58:04 +0200
commit684d285e5cf92b17e493107cceb7563cc6bd3725 (patch)
tree37811eb01b052dab7fbf23b3ba483a1697e49a7a /sw/source/ui/uno
parent8d28b7d4cdbe6db1dd220abb832638a8ac4a2c02 (diff)
parent8f943e727b1158cc8c11d74ea521ac1c2f9cb974 (diff)
CWS mba33issues01: merge to m80
Diffstat (limited to 'sw/source/ui/uno')
-rw-r--r--sw/source/ui/uno/unotxvw.cxx27
1 files changed, 12 insertions, 15 deletions
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index ef73263663..84b6e86e70 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -905,12 +905,12 @@ void SAL_CALL SwXTextView::setRubyList(
-----------------------------------------------------------------------*/
SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ )
{
- SwWrtShell* pOldSh = &m_pView->GetWrtShell();
- SfxPrinter *pPrt = pOldSh->getIDocumentDeviceAccess()->getPrinter( false );
+ SwWrtShell& rOldSh = m_pView->GetWrtShell();
+ SfxPrinter *pPrt = rOldSh.getIDocumentDeviceAccess()->getPrinter( false );
SwDocShell* pDocSh;
SfxObjectShellRef xDocSh( pDocSh = new SwDocShell( /*pPrtDoc, */SFX_CREATE_MODE_STANDARD ) );
xDocSh->DoInitNew( 0 );
- pOldSh->FillPrtDoc(pDocSh->GetDoc(), pPrt);
+ rOldSh.FillPrtDoc(pDocSh->GetDoc(), pPrt);
SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
SwView* pDocView = (SwView*) pDocFrame->GetViewShell();
pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//Damit SelectShell gerufen wird.
@@ -919,22 +919,19 @@ SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/
IDocumentDeviceAccess* pIDDA = pSh->getIDocumentDeviceAccess();
SfxPrinter* pTempPrinter = pIDDA->getPrinter( true );
- if( pOldSh )
- {
- const SwPageDesc& rCurPageDesc = pOldSh->GetPageDesc(pOldSh->GetCurPageDesc());
-
- IDocumentDeviceAccess* pIDDA_old = pOldSh->getIDocumentDeviceAccess();
+ const SwPageDesc& rCurPageDesc = rOldSh.GetPageDesc(rOldSh.GetCurPageDesc());
- if( pIDDA_old->getPrinter( false ) )
- {
- pIDDA->setJobsetup( *pIDDA_old->getJobsetup() );
- //#69563# if it isn't the same printer then the pointer has been invalidated!
- pTempPrinter = pIDDA->getPrinter( true );
- }
+ IDocumentDeviceAccess* pIDDA_old = rOldSh.getIDocumentDeviceAccess();
- pTempPrinter->SetPaperBin(rCurPageDesc.GetMaster().GetPaperBin().GetValue());
+ if( pIDDA_old->getPrinter( false ) )
+ {
+ pIDDA->setJobsetup( *pIDDA_old->getJobsetup() );
+ //#69563# if it isn't the same printer then the pointer has been invalidated!
+ pTempPrinter = pIDDA->getPrinter( true );
}
+ pTempPrinter->SetPaperBin(rCurPageDesc.GetMaster().GetPaperBin().GetValue());
+
return xDocSh;
}