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

#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
 
virtual SfxPrintergetPrinter (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 VirtualDevicegetVirtualDevice (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 OutputDevicegetReferenceDevice (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 JobSetupgetJobsetup () const =0
 Returns the Jobsetup. More...
 
virtual void setJobsetup (const JobSetup &rJobSetup)=0
 Sets the Jobsetup. More...
 
virtual const SwPrintDatagetPrintData () const =0
 Returns the PrintData. More...
 
virtual void setPrintData (const SwPrintData &rPrtData)=0
 Sets the PrintData. More...
 

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

◆ DocumentDeviceManager() [1/2]

sw::DocumentDeviceManager::DocumentDeviceManager ( SwDoc i_rSwdoc)

Definition at line 54 of file DocumentDeviceManager.cxx.

References mpVirDev.

◆ ~DocumentDeviceManager()

sw::DocumentDeviceManager::~DocumentDeviceManager ( )
overridevirtual

◆ DocumentDeviceManager() [2/2]

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

Member Function Documentation

◆ CreatePrinter_()

SfxPrinter & sw::DocumentDeviceManager::CreatePrinter_ ( ) const
private

◆ CreateVirtualDevice_()

VirtualDevice & sw::DocumentDeviceManager::CreateVirtualDevice_ ( ) const
private

◆ getJobsetup()

const JobSetup * sw::DocumentDeviceManager::getJobsetup ( ) const
overridevirtual

Returns the Jobsetup.

Returns
the current Jobsetup

Implements IDocumentDeviceAccess.

Definition at line 181 of file DocumentDeviceManager.cxx.

References mpPrt.

◆ getPrintData()

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.

Referenced by CreatePrinter_().

◆ getPrinter()

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

References CreatePrinter_(), and mpPrt.

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

◆ getReferenceDevice()

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 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().

◆ getVirtualDevice()

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

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

Referenced by getReferenceDevice(), and setReferenceDeviceType().

◆ operator=()

DocumentDeviceManager & sw::DocumentDeviceManager::operator= ( DocumentDeviceManager const &  )
privatedelete

◆ PrtDataChanged()

void sw::DocumentDeviceManager::PrtDataChanged ( )
private

◆ setJobsetup()

void sw::DocumentDeviceManager::setJobsetup ( const JobSetup rJobSetup)
overridevirtual

◆ setPrintData()

void sw::DocumentDeviceManager::setPrintData ( const SwPrintData rPrtData)
overridevirtual

Sets the PrintData.

Parameters
rPrtData[in] the new PrintData.

Implements IDocumentDeviceAccess.

Definition at line 246 of file DocumentDeviceManager.cxx.

References mpPrtData.

◆ setPrinter()

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 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().

◆ setReferenceDeviceType()

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

◆ setVirtualDevice()

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

Member Data Documentation

◆ m_rDoc

SwDoc& sw::DocumentDeviceManager::m_rDoc
private

◆ mpPrt

VclPtr<SfxPrinter> sw::DocumentDeviceManager::mpPrt
private

◆ mpPrtData

std::unique_ptr<SwPrintData> sw::DocumentDeviceManager::mpPrtData
private

Definition at line 76 of file DocumentDeviceManager.hxx.

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

◆ mpVirDev

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

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