diff options
author | Valentin Kettner <vakevk+libreoffice@gmail.com> | 2014-05-20 22:01:36 +0200 |
---|---|---|
committer | Valentin Kettner <vakevk+libreoffice@gmail.com> | 2014-06-03 19:12:00 +0200 |
commit | 95179fe9096badfeda136942a796ae9872df5713 (patch) | |
tree | 2cc3e4b5884d7c56731ec3358ae3718425e31dab /sw/source | |
parent | cf8a3e700f18763b2aaaf1df0bcc53565e59e0c0 (diff) |
Cleaning up of IDocumentDeviceAccess methods in SwDoc.
Moved all SwDoc::getJobSetup and SwDoc::setJobSetup calls to their
appropriate interface methods (SwDoc::getIDocumentDeviceAccess::").
Change-Id: I155a0341363ec42eaad3290d2e6feb8c7d73bbb1
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/doc.cxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh.cxx | 8 |
2 files changed, 4 insertions, 14 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index a018c7173b96..6892ff7415e6 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -254,16 +254,6 @@ IDocumentDeviceAccess* SwDoc::getIDocumentDeviceAccess() return m_DeviceAccess.get(); } -const JobSetup* SwDoc::getJobsetup() const -{ - return getIDocumentDeviceAccessConst()->getJobsetup(); -} - -void SwDoc::setJobsetup(/*[in]*/ const JobSetup& rJobSetup ) -{ - getIDocumentDeviceAccess()->setJobsetup( rJobSetup ); -} - const SwPrintData & SwDoc::getPrintData() const { return getIDocumentDeviceAccessConst()->getPrintData(); diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 0962badc05b9..3b236453d5cb 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->getJobsetup()); + pOrig = const_cast<JobSetup*>(pDoc->getIDocumentDeviceAccessConst()->getJobsetup()); if( pOrig ) // then we copy that pOrig = new JobSetup( *pOrig ); - pDoc->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->setJobsetup( *pOrig ); + pDoc->getIDocumentDeviceAccess()->setJobsetup( *pOrig ); delete pOrig; } if ( bResetModified ) @@ -882,7 +882,7 @@ OutputDevice* SwDocShell::GetDocumentRefDev() void SwDocShell::OnDocumentPrinterChanged( Printer * pNewPrinter ) { if ( pNewPrinter ) - GetDoc()->setJobsetup( pNewPrinter->GetJobSetup() ); + GetDoc()->getIDocumentDeviceAccess()->setJobsetup( pNewPrinter->GetJobSetup() ); else GetDoc()->getIDocumentDeviceAccess()->setPrinter( 0, true, true ); } |