LibreOffice Module sw (master) 1
|
#include <DocumentDeviceManager.hxx>
Public Member Functions | |
DocumentDeviceManager (SwDoc &i_rSwdoc) | |
SfxPrinter * | getPrinter (bool bCreate) const override |
Return the printer set at the document. More... | |
void | setPrinter (SfxPrinter *pP, bool bDeleteOld, bool bCallPrtDataChanged) override |
Set the printer at the document. More... | |
VirtualDevice * | getVirtualDevice (bool bCreate) const override |
Return the virtual device set at the document. More... | |
void | setVirtualDevice (VirtualDevice *pVd) override |
Sets the current virtual device. More... | |
OutputDevice * | getReferenceDevice (bool bCreate) const override |
Returns the current reference device. More... | |
void | setReferenceDeviceType (bool bNewVirtual, bool bNewHiRes) override |
Sets the type of the reference device used for formatting the document. More... | |
const JobSetup * | getJobsetup () const override |
Returns the Jobsetup. More... | |
void | setJobsetup (const JobSetup &rJobSetup) override |
Sets the Jobsetup. More... | |
const SwPrintData & | getPrintData () const override |
Returns the PrintData. More... | |
void | setPrintData (const SwPrintData &rPrtData) override |
Sets the PrintData. More... | |
virtual | ~DocumentDeviceManager () override |
virtual SfxPrinter * | getPrinter (bool bCreate) const =0 |
Return the printer set at the document. More... | |
virtual void | setPrinter (SfxPrinter *pP, bool bDeleteOld, bool bCallPrtDataChanged)=0 |
Set the printer at the document. More... | |
virtual VirtualDevice * | getVirtualDevice (bool bCreate) const =0 |
Return the virtual device set at the document. More... | |
virtual void | setVirtualDevice (VirtualDevice *pVd)=0 |
Sets the current virtual device. More... | |
virtual OutputDevice * | getReferenceDevice (bool bCreate) const =0 |
Returns the current reference device. More... | |
virtual void | setReferenceDeviceType (bool bNewVirtual, bool bNewHiRes)=0 |
Sets the type of the reference device used for formatting the document. More... | |
virtual const JobSetup * | getJobsetup () const =0 |
Returns the Jobsetup. More... | |
virtual void | setJobsetup (const JobSetup &rJobSetup)=0 |
Sets the Jobsetup. More... | |
virtual const SwPrintData & | getPrintData () const =0 |
Returns the PrintData. More... | |
virtual void | setPrintData (const SwPrintData &rPrtData)=0 |
Sets the PrintData. More... | |
Private Member Functions | |
DocumentDeviceManager (DocumentDeviceManager const &)=delete | |
DocumentDeviceManager & | operator= (DocumentDeviceManager const &)=delete |
VirtualDevice & | CreateVirtualDevice_ () const |
SfxPrinter & | CreatePrinter_ () const |
void | PrtDataChanged () |
Printer or JobSetup altered. More... | |
Private Attributes | |
SwDoc & | m_rDoc |
VclPtr< SfxPrinter > | mpPrt |
VclPtr< VirtualDevice > | mpVirDev |
std::unique_ptr< SwPrintData > | mpPrtData |
Additional Inherited Members | |
Protected Member Functions inherited from IDocumentDeviceAccess | |
virtual | ~IDocumentDeviceAccess () |
Definition at line 35 of file DocumentDeviceManager.hxx.
sw::DocumentDeviceManager::DocumentDeviceManager | ( | SwDoc & | i_rSwdoc | ) |
Definition at line 54 of file DocumentDeviceManager.cxx.
References mpVirDev.
|
overridevirtual |
Definition at line 253 of file DocumentDeviceManager.cxx.
References VclPtr< class reference_type >::disposeAndClear(), mpPrt, mpPrtData, and mpVirDev.
|
privatedelete |
|
private |
Definition at line 282 of file DocumentDeviceManager.cxx.
References VclPtr< class reference_type >::Create(), FN_PARAM_ADDPRINTER, SwDoc::GetAttrPool(), getPrintData(), m_rDoc, mpPrt, SfxItemSet::Put(), and setPrinter().
Referenced by getPrinter().
|
private |
Definition at line 260 of file DocumentDeviceManager.cxx.
References VclPtr< class reference_type >::Create(), sw::DocumentSettingManager::get(), SwDoc::GetDocumentSettingManager(), m_rDoc, mpVirDev, VirtualDevice::MSO1, MapMode::SetMapUnit(), setVirtualDevice(), and UNIX_FORCE_ZERO_EXT_LEADING.
Referenced by getVirtualDevice().
|
overridevirtual |
Returns the Jobsetup.
Implements IDocumentDeviceAccess.
Definition at line 181 of file DocumentDeviceManager.cxx.
References mpPrt.
|
overridevirtual |
Returns the PrintData.
Implements IDocumentDeviceAccess.
Definition at line 226 of file DocumentDeviceManager.cxx.
References SwDoc::GetDocShell(), m_rDoc, and mpPrtData.
Referenced by CreatePrinter_().
|
overridevirtual |
Return the printer set at the document.
bCreate | [in] if set, a printer will be created if not already done. |
Implements IDocumentDeviceAccess.
Definition at line 56 of file DocumentDeviceManager.cxx.
References CreatePrinter_(), and mpPrt.
Referenced by getReferenceDevice(), PrtDataChanged(), and setReferenceDeviceType().
|
overridevirtual |
Returns the current reference device.
bCreate | [in] if set, the reference device will be created if not already done. |
Implements IDocumentDeviceAccess.
Definition at line 123 of file DocumentDeviceManager.cxx.
References sw::DocumentSettingManager::get(), SwDoc::GetDocumentSettingManager(), getPrinter(), getVirtualDevice(), VclReferenceBase::isDisposed(), m_rDoc, mpPrt, and USE_VIRTUAL_DEVICE.
Referenced by PrtDataChanged().
|
overridevirtual |
Return the virtual device set at the document.
bCreate | [in] if set, a virtual device will be created if not already done. |
Implements IDocumentDeviceAccess.
Definition at line 96 of file DocumentDeviceManager.cxx.
References CreateVirtualDevice_(), VclReferenceBase::isDisposed(), and mpVirDev.
Referenced by getReferenceDevice(), and setReferenceDeviceType().
|
privatedelete |
|
private |
Care has to be taken of the necessary invalidations and notifications.
Definition at line 307 of file DocumentDeviceManager.cxx.
References ADD_EXT_LEADING, SwRootFrame::EndAllAction(), SwFntCache::Flush(), IDocumentSettingAccess::get(), sw::DocumentSettingManager::get(), SwDoc::GetAllLayouts(), SwViewOption::getBrowseMode(), IDocumentLayoutAccess::GetCurrentLayout(), IDocumentLayoutAccess::GetCurrentViewShell(), SwDoc::GetDocShell(), SwDoc::GetDocumentSettingManager(), IDocumentDrawModelAccess::GetDrawModel(), SwDoc::getIDocumentDrawModelAccess(), SwDoc::getIDocumentLayoutAccess(), SwDoc::getIDocumentSettingAccess(), getPrinter(), SdrModel::GetRefDevice(), getReferenceDevice(), sw::Ring< value_type >::GetRingContainer(), SwViewShell::GetViewOptions(), SdrModel::IsAddExtLeading(), SwViewOption::IsPrtFormat(), m_rDoc, pFntCache, SwDoc::PrtOLENotify(), SdrModel::SetAddExtLeading(), SdrModel::SetRefDevice(), Size, SwRootFrame::StartAllAction(), SwDocShell::UpdateFontList(), and USE_VIRTUAL_DEVICE.
Referenced by setJobsetup(), setPrinter(), and setReferenceDeviceType().
|
overridevirtual |
Sets the Jobsetup.
rJobSetup | [in] the new Jobsetup. |
Implements IDocumentDeviceAccess.
Definition at line 186 of file DocumentDeviceManager.cxx.
References VclPtr< class reference_type >::Create(), VclPtr< class reference_type >::disposeAndClear(), FN_PARAM_ADDPRINTER, sw::DocumentSettingManager::get(), SwDoc::GetAttrPool(), SwDoc::GetDocumentSettingManager(), JobSetup::GetPrinterName(), m_rDoc, mpPrt, p, PrtDataChanged(), setPrinter(), and USE_VIRTUAL_DEVICE.
|
overridevirtual |
Sets the PrintData.
rPrtData | [in] the new PrintData. |
Implements IDocumentDeviceAccess.
Definition at line 246 of file DocumentDeviceManager.cxx.
References mpPrtData.
|
overridevirtual |
Set the printer at the document.
pP | [in] the new printer or 0. |
bDeleteOld | [in] if set, the old printer will be deleted. |
bCallPrtDataChanged | [in] if set, triggers all necessary invalidations. |
Implements IDocumentDeviceAccess.
Definition at line 67 of file DocumentDeviceManager.cxx.
References VclPtr< class reference_type >::disposeAndClear(), sw::DocumentSettingManager::get(), SwDoc::GetDocumentSettingManager(), IDocumentDrawModelAccess::GetDrawModel(), SwDoc::getIDocumentDrawModelAccess(), m_rDoc, mpPrt, PrtDataChanged(), MapMode::SetMapUnit(), SdrModel::SetRefDevice(), and USE_VIRTUAL_DEVICE.
Referenced by CreatePrinter_(), and setJobsetup().
|
overridevirtual |
Sets the type of the reference device used for formatting the document.
bNewVirtual | [in] if set, the reference device will be a virtual device, otherwise the printer is used for formatting the document |
bNewHiRes | [in] if set, the virtual device will be the HiRes virtual device |
Implements IDocumentDeviceAccess.
Definition at line 145 of file DocumentDeviceManager.cxx.
References VirtualDevice::Dpi600, sw::DocumentSettingManager::get(), SwDoc::GetDocumentSettingManager(), IDocumentDrawModelAccess::GetDrawModel(), SwDoc::getIDocumentDrawModelAccess(), SwDoc::getIDocumentState(), getPrinter(), getVirtualDevice(), m_rDoc, VirtualDevice::MSO1, PrtDataChanged(), sw::DocumentSettingManager::set(), IDocumentState::SetModified(), SdrModel::SetRefDevice(), VirtualDevice::SetReferenceDevice(), USE_HIRES_VIRTUAL_DEVICE, and USE_VIRTUAL_DEVICE.
|
overridevirtual |
Sets the current virtual device.
pVd | [in] the new virtual device. |
The old virtual device will be deleted. Triggers all necessary invalidations.
Implements IDocumentDeviceAccess.
Definition at line 109 of file DocumentDeviceManager.cxx.
References VclPtr< class reference_type >::disposeAndClear(), VclPtr< class reference_type >::get(), sw::DocumentSettingManager::get(), SwDoc::GetDocumentSettingManager(), IDocumentDrawModelAccess::GetDrawModel(), SwDoc::getIDocumentDrawModelAccess(), VclReferenceBase::isDisposed(), m_rDoc, mpVirDev, SdrModel::SetRefDevice(), and USE_VIRTUAL_DEVICE.
Referenced by CreateVirtualDevice_().
|
private |
Definition at line 73 of file DocumentDeviceManager.hxx.
Referenced by CreatePrinter_(), CreateVirtualDevice_(), getPrintData(), getReferenceDevice(), PrtDataChanged(), setJobsetup(), setPrinter(), setReferenceDeviceType(), and setVirtualDevice().
|
private |
Definition at line 74 of file DocumentDeviceManager.hxx.
Referenced by CreatePrinter_(), getJobsetup(), getPrinter(), getReferenceDevice(), setJobsetup(), setPrinter(), and ~DocumentDeviceManager().
|
private |
Definition at line 76 of file DocumentDeviceManager.hxx.
Referenced by getPrintData(), setPrintData(), and ~DocumentDeviceManager().
|
private |
Definition at line 75 of file DocumentDeviceManager.hxx.
Referenced by CreateVirtualDevice_(), getVirtualDevice(), setVirtualDevice(), and ~DocumentDeviceManager().