diff options
author | Valentin Kettner <vakevk+libreoffice@gmail.com> | 2014-05-21 17:39:52 +0200 |
---|---|---|
committer | Valentin Kettner <vakevk+libreoffice@gmail.com> | 2014-06-03 19:12:01 +0200 |
commit | dbb2e6befb9d0e970048dfb2c31c7cdc281c8ed5 (patch) | |
tree | 80f001baa32add41e9cc0027edf03e58061330b9 /sw/source/uibase/app/docsh.cxx | |
parent | 2ec2ec98bc61e1398494dcaea1b017423c57e721 (diff) |
Made SwDoc::getDocumentDeviceAccess return a reference.
Also overloaded SwDoc::getDocumentDeviceAccess with its const
version.
Change-Id: I3272be3ee067aa2e0174663ede3c98190ecf2b09
Diffstat (limited to 'sw/source/uibase/app/docsh.cxx')
-rw-r--r-- | sw/source/uibase/app/docsh.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 3b236453d5cb..e3ceb11f1044 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -804,10 +804,10 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup, JobSetup *pOrig = 0; if ( !rSetup.GetPrinterName().isEmpty() && ASPECT_THUMBNAIL != nAspect ) { - pOrig = const_cast<JobSetup*>(pDoc->getIDocumentDeviceAccessConst()->getJobsetup()); + pOrig = const_cast<JobSetup*>(pDoc->getIDocumentDeviceAccess().getJobsetup()); if( pOrig ) // then we copy that pOrig = new JobSetup( *pOrig ); - pDoc->getIDocumentDeviceAccess()->setJobsetup( rSetup ); + pDoc->getIDocumentDeviceAccess().setJobsetup( rSetup ); } Rectangle aRect( nAspect == ASPECT_THUMBNAIL ? @@ -824,7 +824,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup, if( pOrig ) { - pDoc->getIDocumentDeviceAccess()->setJobsetup( *pOrig ); + pDoc->getIDocumentDeviceAccess().setJobsetup( *pOrig ); delete pOrig; } if ( bResetModified ) @@ -871,20 +871,20 @@ Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const Printer *SwDocShell::GetDocumentPrinter() { - return pDoc->getIDocumentDeviceAccessConst()->getPrinter( false ); + return pDoc->getIDocumentDeviceAccess().getPrinter( false ); } OutputDevice* SwDocShell::GetDocumentRefDev() { - return pDoc->getIDocumentDeviceAccessConst()->getReferenceDevice( false ); + return pDoc->getIDocumentDeviceAccess().getReferenceDevice( false ); } void SwDocShell::OnDocumentPrinterChanged( Printer * pNewPrinter ) { if ( pNewPrinter ) - GetDoc()->getIDocumentDeviceAccess()->setJobsetup( pNewPrinter->GetJobSetup() ); + GetDoc()->getIDocumentDeviceAccess().setJobsetup( pNewPrinter->GetJobSetup() ); else - GetDoc()->getIDocumentDeviceAccess()->setPrinter( 0, true, true ); + GetDoc()->getIDocumentDeviceAccess().setPrinter( 0, true, true ); } sal_uLong SwDocShell::GetMiscStatus() const |