LibreOffice Module sw (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sw::DocumentDeviceManager Class Reference

#include <DocumentDeviceManager.hxx>

Inheritance diagram for sw::DocumentDeviceManager:
[legend]
Collaboration diagram for sw::DocumentDeviceManager:
[legend]

Public Member Functions

 DocumentDeviceManager (SwDoc &i_rSwdoc)
 
SfxPrintergetPrinter (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...
 
VirtualDevicegetVirtualDevice (bool bCreate) const override
 Return the virtual device set at the document. More...
 
void setVirtualDevice (VirtualDevice *pVd) override
 Sets the current virtual device. More...
 
OutputDevicegetReferenceDevice (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 JobSetupgetJobsetup () const override
 Returns the Jobsetup. More...
 
void setJobsetup (const JobSetup &rJobSetup) override
 Sets the Jobsetup. More...
 
const SwPrintDatagetPrintData () const override
 Returns the PrintData. More...
 
void setPrintData (const SwPrintData &rPrtData) override
 Sets the PrintData. More...
 
virtual ~DocumentDeviceManager () override
 

Private Member Functions

 DocumentDeviceManager (DocumentDeviceManager const &)=delete
 
DocumentDeviceManageroperator= (DocumentDeviceManager const &)=delete
 
VirtualDeviceCreateVirtualDevice_ () const
 
SfxPrinterCreatePrinter_ () const
 
void PrtDataChanged ()
 Printer or JobSetup altered. More...
 

Private Attributes

SwDocm_rDoc
 
VclPtr< SfxPrintermpPrt
 
VclPtr< VirtualDevicempVirDev
 
std::unique_ptr< SwPrintDatampPrtData
 

Additional Inherited Members

- Protected Member Functions inherited from IDocumentDeviceAccess
virtual ~IDocumentDeviceAccess ()
 

Detailed Description

Definition at line 35 of file DocumentDeviceManager.hxx.

Constructor & Destructor Documentation

sw::DocumentDeviceManager::DocumentDeviceManager ( SwDoc i_rSwdoc)

Definition at line 52 of file DocumentDeviceManager.cxx.

sw::DocumentDeviceManager::~DocumentDeviceManager ( )
overridevirtual
sw::DocumentDeviceManager::DocumentDeviceManager ( DocumentDeviceManager const &  )
privatedelete

Member Function Documentation

SfxPrinter & sw::DocumentDeviceManager::CreatePrinter_ ( ) const
private
VirtualDevice & sw::DocumentDeviceManager::CreateVirtualDevice_ ( ) const
private
const JobSetup * sw::DocumentDeviceManager::getJobsetup ( ) const
overridevirtual

Returns the Jobsetup.

Returns
the current Jobsetup

Implements IDocumentDeviceAccess.

Definition at line 179 of file DocumentDeviceManager.cxx.

References mpPrt.

const SwPrintData & sw::DocumentDeviceManager::getPrintData ( ) const
overridevirtual

Returns the PrintData.

Returns
the current PrintData

Implements IDocumentDeviceAccess.

Definition at line 226 of file DocumentDeviceManager.cxx.

References SwDoc::GetDocShell(), m_rDoc, and mpPrtData.

SfxPrinter * sw::DocumentDeviceManager::getPrinter ( bool  bCreate) const
overridevirtual

Return the printer set at the document.

Parameters
bCreate[in] if set, a printer will be created if not already done.
Returns
the printer set at the document.

Implements IDocumentDeviceAccess.

Definition at line 54 of file DocumentDeviceManager.cxx.

References CreatePrinter_(), and mpPrt.

Referenced by getReferenceDevice(), PrtDataChanged(), and setReferenceDeviceType().

OutputDevice * sw::DocumentDeviceManager::getReferenceDevice ( bool  bCreate) const
overridevirtual

Returns the current reference device.

Parameters
bCreate[in] if set, the reference device will be created if not already done.
Returns
the current reference device

Implements IDocumentDeviceAccess.

Definition at line 121 of file DocumentDeviceManager.cxx.

References sw::DocumentSettingManager::get(), SwDoc::GetDocumentSettingManager(), getPrinter(), getVirtualDevice(), VclReferenceBase::isDisposed(), m_rDoc, mpPrt, and USE_VIRTUAL_DEVICE.

Referenced by PrtDataChanged().

VirtualDevice * sw::DocumentDeviceManager::getVirtualDevice ( bool  bCreate) const
overridevirtual

Return the virtual device set at the document.

Parameters
bCreate[in] if set, a virtual device will be created if not already done.
Returns
the virtual device set at the document.

Implements IDocumentDeviceAccess.

Definition at line 94 of file DocumentDeviceManager.cxx.

References CreateVirtualDevice_(), VclReferenceBase::isDisposed(), and mpVirDev.

Referenced by getReferenceDevice(), and setReferenceDeviceType().

DocumentDeviceManager& sw::DocumentDeviceManager::operator= ( DocumentDeviceManager const &  )
privatedelete
void sw::DocumentDeviceManager::PrtDataChanged ( )
private
void sw::DocumentDeviceManager::setJobsetup ( const JobSetup rJobSetup)
overridevirtual
void sw::DocumentDeviceManager::setPrintData ( const SwPrintData rPrtData)
overridevirtual

Sets the PrintData.

Parameters
rPrtData[in] the new PrintData.

Implements IDocumentDeviceAccess.

Definition at line 245 of file DocumentDeviceManager.cxx.

References mpPrtData.

void sw::DocumentDeviceManager::setPrinter ( SfxPrinter pP,
bool  bDeleteOld,
bool  bCallPrtDataChanged 
)
overridevirtual

Set the printer at the document.

Parameters
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 65 of file DocumentDeviceManager.cxx.

References VclPtr< reference_type >::disposeAndClear(), sw::DocumentSettingManager::get(), SwDoc::GetDocumentSettingManager(), IDocumentDrawModelAccess::GetDrawModel(), SwDoc::getIDocumentDrawModelAccess(), m_rDoc, mpPrt, PrtDataChanged(), SdrModel::SetRefDevice(), and USE_VIRTUAL_DEVICE.

Referenced by CreatePrinter_(), and setJobsetup().

void sw::DocumentDeviceManager::setReferenceDeviceType ( bool  bNewVirtual,
bool  bNewHiRes 
)
overridevirtual

Sets the type of the reference device used for formatting the document.

Parameters
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 143 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.

void sw::DocumentDeviceManager::setVirtualDevice ( VirtualDevice pVd)
overridevirtual

Sets the current virtual device.

Parameters
pVd[in] the new virtual device.

The old virtual device will be deleted. Triggers all necessary invalidations.

Implements IDocumentDeviceAccess.

Definition at line 107 of file DocumentDeviceManager.cxx.

References VclPtr< VirtualDevice >::disposeAndClear(), VclPtr< VirtualDevice >::get(), sw::DocumentSettingManager::get(), SwDoc::GetDocumentSettingManager(), IDocumentDrawModelAccess::GetDrawModel(), SwDoc::getIDocumentDrawModelAccess(), VclReferenceBase::isDisposed(), m_rDoc, mpVirDev, SdrModel::SetRefDevice(), and USE_VIRTUAL_DEVICE.

Referenced by CreateVirtualDevice_().

Member Data Documentation

SwDoc& sw::DocumentDeviceManager::m_rDoc
private
VclPtr<SfxPrinter> sw::DocumentDeviceManager::mpPrt
private
std::unique_ptr<SwPrintData> sw::DocumentDeviceManager::mpPrtData
private

Definition at line 78 of file DocumentDeviceManager.hxx.

Referenced by getPrintData(), setPrintData(), and ~DocumentDeviceManager().

VclPtr<VirtualDevice> sw::DocumentDeviceManager::mpVirDev
private

The documentation for this class was generated from the following files: