LibreOffice Module sd (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sd::DocumentRenderer::Implementation Class Reference
Inheritance diagram for sd::DocumentRenderer::Implementation:
[legend]
Collaboration diagram for sd::DocumentRenderer::Implementation:
[legend]

Public Member Functions

 Implementation (ViewShellBase &rBase)
 
virtual ~Implementation () override
 
virtual void Notify (SfxBroadcaster &rBroadcaster, const SfxHint &rHint) override
 
void ProcessProperties (const css::uno::Sequence< css::beans::PropertyValue > &rOptions)
 Process the sequence of properties given to one of the XRenderable methods. More...
 
sal_Int32 GetPrintPageCount () const
 Return the number of pages that are to be printed. More...
 
css::uno::Sequence< css::beans::PropertyValue > GetProperties () const
 Return a sequence of properties that can be returned by the XRenderable::getRenderer() method. More...
 
void PrintPage (const sal_Int32 nIndex)
 Print one of the prepared pages. More...
 
- Public Member Functions inherited from SfxListener
 SfxListener ()
 
 SfxListener (const SfxListener &rCopy)
 
virtual ~SfxListener () COVERITY_NOEXCEPT_FALSE
 
void StartListening (SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
 
void EndListening (SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
 
void EndListeningAll ()
 
bool IsListening (SfxBroadcaster &rBroadcaster) const
 
sal_uInt16 GetBroadcasterCount () const
 
SfxBroadcasterGetBroadcasterJOE (sal_uInt16 nNo) const
 
virtual void Notify (SfxBroadcaster &rBC, const SfxHint &rHint)
 
void RemoveBroadcaster_Impl (SfxBroadcaster &rBC)
 
virtual bool IsSdrView () const
 
- Public Member Functions inherited from vcl::PrinterOptionsHelper
 PrinterOptionsHelper ()
 
bool processProperties (const css::uno::Sequence< css::beans::PropertyValue > &i_rNewProp)
 
void appendPrintUIOptions (css::uno::Sequence< css::beans::PropertyValue > &io_rProps) const
 
css::uno::Any getValue (const OUString &i_rPropertyName) const
 
bool getBoolValue (const OUString &i_rPropertyName, bool i_bDefault) const
 
bool getBoolValue (const char *i_pPropName, bool i_bDefault=false) const
 
sal_Int64 getIntValue (const OUString &i_rPropertyName, sal_Int64 i_nDefault) const
 
sal_Int64 getIntValue (const char *i_pPropName, sal_Int64 i_nDefault) const
 
OUString getStringValue (const OUString &i_rPropertyName) const
 
OUString getStringValue (const char *i_pPropName) const
 

Private Member Functions

sal_Int32 GetCurrentPageIndex () const
 
void SetupPaperOrientation (const PageKind ePageKind, PrintInfo &rInfo)
 Determine and set the paper orientation. More...
 
void PreparePages ()
 Top most method for preparing printer pages. More...
 
void InitHandoutTemplate ()
 Create the page objects of the handout template. More...
 
SdPageGetFilteredPage (const sal_Int32 nPageIndex, const PageKind ePageKind) const
 Detect whether the specified slide is to be printed. More...
 
void PrepareOutline (PrintInfo const &rInfo)
 Prepare the outline of the document for printing. More...
 
void PrepareHandout (PrintInfo &rInfo)
 Prepare handout pages for slides that are to be printed. More...
 
void PrepareStdOrNotes (const PageKind ePageKind, PrintInfo &rInfo)
 Prepare the notes pages or regular slides. More...
 
void PrepareRegularPages (const PageKind ePageKind, PrintInfo &rInfo)
 Prepare slides in a non-booklet way: one slide per one to many printer pages. More...
 
void PrepareBooklet (const PageKind ePageKind, const PrintInfo &rInfo)
 Put two slides on one printer page. More...
 
void PrepareTiledPage (const sal_Int32 nPageIndex, const SdPage &rPage, const PageKind ePageKind, const PrintInfo &rInfo)
 Print one slide multiple times on one printer page so that the whole printer page is covered. More...
 
void PrepareScaledPage (const sal_Int32 nPageIndex, const SdPage &rPage, const PageKind ePageKind, const PrintInfo &rInfo)
 Print one standard slide or notes page on one to many printer pages. More...
 
bool CheckForFrontBackPages (sal_Int32 nPage)
 

Private Attributes

SfxObjectShellRef mxObjectShell
 
ViewShellBasemrBase
 
bool mbIsDisposed
 
VclPtr< PrintermpPrinter
 
Size maPrinterPageSizePixel
 
std::unique_ptr< PrintOptions > mpOptions
 
std::vector< std::shared_ptr< ::sd::PrinterPage > > maPrinterPages
 
std::unique_ptr< DrawViewmpPrintView
 
bool mbHasOrientationWarningBeenShown
 
std::vector< sal_Int32 > maSlidesPerPage
 
awt::Size maPrintSize
 

Additional Inherited Members

- Static Public Member Functions inherited from vcl::PrinterOptionsHelper
static css::uno::Any setUIControlOpt (const css::uno::Sequence< OUString > &i_rIDs, const OUString &i_rTitle, const css::uno::Sequence< OUString > &i_rHelpId, const OUString &i_rType, const css::beans::PropertyValue *i_pValue=nullptr, const UIControlOptions &i_rControlOptions=UIControlOptions())
 
static css::uno::Any setGroupControlOpt (const OUString &i_rID, const OUString &i_rTitle, const OUString &i_rHelpId)
 
static css::uno::Any setSubgroupControlOpt (const OUString &i_rID, const OUString &i_rTitle, const OUString &i_rHelpId, const UIControlOptions &i_rControlOptions=UIControlOptions())
 
static css::uno::Any setBoolControlOpt (const OUString &i_rID, const OUString &i_rTitle, const OUString &i_rHelpId, const OUString &i_rProperty, bool i_bValue, const UIControlOptions &i_rControlOptions=UIControlOptions())
 
static css::uno::Any setChoiceListControlOpt (const OUString &i_rID, const OUString &i_rTitle, const css::uno::Sequence< OUString > &i_rHelpId, const OUString &i_rProperty, const css::uno::Sequence< OUString > &i_rChoices, sal_Int32 i_nValue, const css::uno::Sequence< sal_Bool > &i_rDisabledChoices=css::uno::Sequence< sal_Bool >(), const UIControlOptions &i_rControlOptions=UIControlOptions())
 
static css::uno::Any setChoiceRadiosControlOpt (const css::uno::Sequence< OUString > &i_rIDs, const OUString &i_rTitle, const css::uno::Sequence< OUString > &i_rHelpId, const OUString &i_rProperty, const css::uno::Sequence< OUString > &i_rChoices, sal_Int32 i_nValue, const css::uno::Sequence< sal_Bool > &i_rDisabledChoices=css::uno::Sequence< sal_Bool >(), const UIControlOptions &i_rControlOptions=UIControlOptions())
 
static css::uno::Any setRangeControlOpt (const OUString &i_rID, const OUString &i_rTitle, const OUString &i_rHelpId, const OUString &i_rProperty, sal_Int32 i_nValue, sal_Int32 i_nMinValue, sal_Int32 i_nMaxValue, const UIControlOptions &i_rControlOptions)
 
static css::uno::Any setEditControlOpt (const OUString &i_rID, const OUString &i_rTitle, const OUString &i_rHelpId, const OUString &i_rProperty, const OUString &i_rValue, const UIControlOptions &i_rControlOptions)
 
- Protected Attributes inherited from vcl::PrinterOptionsHelper
std::unordered_map< OUString, css::uno::Any > m_aPropertyMap
 
std::vector< css::beans::PropertyValue > m_aUIProperties
 

Detailed Description

Definition at line 1142 of file DocumentRenderer.cxx.

Constructor & Destructor Documentation

◆ Implementation()

sd::DocumentRenderer::Implementation::Implementation ( ViewShellBase rBase)
inlineexplicit

◆ ~Implementation()

virtual sd::DocumentRenderer::Implementation::~Implementation ( )
inlineoverridevirtual

Definition at line 1161 of file DocumentRenderer.cxx.

References SfxListener::EndListening(), and mrBase.

Member Function Documentation

◆ CheckForFrontBackPages()

bool sd::DocumentRenderer::Implementation::CheckForFrontBackPages ( sal_Int32  nPage)
inlineprivate

◆ GetCurrentPageIndex()

sal_Int32 sd::DocumentRenderer::Implementation::GetCurrentPageIndex ( ) const
inlineprivate

◆ GetFilteredPage()

SdPage * sd::DocumentRenderer::Implementation::GetFilteredPage ( const sal_Int32  nPageIndex,
const PageKind  ePageKind 
) const
inlineprivate

Detect whether the specified slide is to be printed.

Returns
When the slide is not to be printed then <NULL> is returned. Otherwise a pointer to the slide is returned.

Definition at line 1561 of file DocumentRenderer.cxx.

References sd::ViewShellBase::GetDocument(), SdDrawDocument::GetSdPage(), SdPage::IsExcluded(), mpOptions, and mrBase.

Referenced by PrepareBooklet(), PrepareHandout(), PrepareOutline(), and PrepareRegularPages().

◆ GetPrintPageCount()

sal_Int32 sd::DocumentRenderer::Implementation::GetPrintPageCount ( ) const
inline

Return the number of pages that are to be printed.

Definition at line 1216 of file DocumentRenderer.cxx.

References maPrinterPages, and mbIsDisposed.

◆ GetProperties()

css::uno::Sequence< css::beans::PropertyValue > sd::DocumentRenderer::Implementation::GetProperties ( ) const
inline

Return a sequence of properties that can be returned by the XRenderable::getRenderer() method.

Definition at line 1228 of file DocumentRenderer.cxx.

References aProperties, comphelper::containerToSequence(), vcl::PrinterOptionsHelper::m_aUIProperties, comphelper::makePropertyValue(), and maPrintSize.

◆ InitHandoutTemplate()

void sd::DocumentRenderer::Implementation::InitHandoutTemplate ( )
inlineprivate

◆ Notify()

virtual void sd::DocumentRenderer::Implementation::Notify ( SfxBroadcaster rBroadcaster,
const SfxHint rHint 
)
inlineoverridevirtual

Reimplemented from SfxListener.

Definition at line 1166 of file DocumentRenderer.cxx.

References SfxHint::GetId(), mbIsDisposed, and mrBase.

◆ PrepareBooklet()

void sd::DocumentRenderer::Implementation::PrepareBooklet ( const PageKind  ePageKind,
const PrintInfo &  rInfo 
)
inlineprivate

◆ PrepareHandout()

void sd::DocumentRenderer::Implementation::PrepareHandout ( PrintInfo &  rInfo)
inlineprivate

◆ PrepareOutline()

void sd::DocumentRenderer::Implementation::PrepareOutline ( PrintInfo const &  rInfo)
inlineprivate

Prepare the outline of the document for printing.

There is no fixed number of slides whose outline data is put onto one printer page. If the current printer page has enough room for the outline of the current slide then that is added. Otherwise a new printer page is started.

Definition at line 1584 of file DocumentRenderer.cxx.

References Outliner::AddText(), aMap, CheckForFrontBackPages(), Outliner::Clear(), Outliner::CreateParaObject(), DynCastSdrTextObj(), Outliner::GetAbsPos(), GetCurrentPageIndex(), Outliner::GetDepth(), sd::ViewShellBase::GetDocument(), GetFilteredPage(), tools::Rectangle::GetHeight(), SdDrawDocument::GetInternalOutliner(), SdrObjList::GetObj(), SdrObject::GetObjIdentifier(), SdrObject::GetObjInventor(), Outliner::GetOutlinerMode(), SdrTextObj::GetOutlinerParaObject(), Outliner::GetPaperSize(), Outliner::GetParagraph(), Outliner::GetParagraphCount(), SdPage::GetPresObj(), StringRangeEnumerator::getRangesFromString(), Outliner::GetRefMapMode(), SdDrawDocument::GetSdPageCount(), tools::Rectangle::GetSize(), Outliner::GetTextHeight(), tools::Rectangle::GetWidth(), Size::Height(), Outliner::Init(), Outliner::Insert(), SdrObject::IsEmptyPresObj(), Outliner::IsUpdateLayout(), maPrinterPages, maPrintSize, mpOptions, mpPrinter, mrBase, nCount, nIndex, Outliner::Remove(), Outliner::SetDepth(), Outliner::SetPaperSize(), Outliner::SetRefMapMode(), Outliner::SetUpdateLayout(), Standard, Text, Size::Width(), Point::X(), and Point::Y().

Referenced by PreparePages().

◆ PreparePages()

void sd::DocumentRenderer::Implementation::PreparePages ( )
inlineprivate

◆ PrepareRegularPages()

void sd::DocumentRenderer::Implementation::PrepareRegularPages ( const PageKind  ePageKind,
PrintInfo &  rInfo 
)
inlineprivate

◆ PrepareScaledPage()

void sd::DocumentRenderer::Implementation::PrepareScaledPage ( const sal_Int32  nPageIndex,
const SdPage rPage,
const PageKind  ePageKind,
const PrintInfo &  rInfo 
)
inlineprivate

Print one standard slide or notes page on one to many printer pages.

More than on printer page is used when the slide is larger than the printable area.

Definition at line 2115 of file DocumentRenderer.cxx.

References aMap, CheckForFrontBackPages(), SdrPage::GetLeftBorder(), SdrPage::GetLowerBorder(), SdPage::GetPaperBin(), SdrPage::GetRightBorder(), SdrPage::GetUpperBorder(), maPrinterPages, mpOptions, Point::X(), and Point::Y().

Referenced by PrepareRegularPages().

◆ PrepareStdOrNotes()

void sd::DocumentRenderer::Implementation::PrepareStdOrNotes ( const PageKind  ePageKind,
PrintInfo &  rInfo 
)
inlineprivate

◆ PrepareTiledPage()

void sd::DocumentRenderer::Implementation::PrepareTiledPage ( const sal_Int32  nPageIndex,
const SdPage rPage,
const PageKind  ePageKind,
const PrintInfo &  rInfo 
)
inlineprivate

Print one slide multiple times on one printer page so that the whole printer page is covered.

Definition at line 2084 of file DocumentRenderer.cxx.

References CheckForFrontBackPages(), SdPage::GetPaperBin(), maPrinterPages, and mpOptions.

Referenced by PrepareRegularPages().

◆ PrintPage()

void sd::DocumentRenderer::Implementation::PrintPage ( const sal_Int32  nIndex)
inline

◆ ProcessProperties()

void sd::DocumentRenderer::Implementation::ProcessProperties ( const css::uno::Sequence< css::beans::PropertyValue > &  rOptions)
inline

◆ SetupPaperOrientation()

void sd::DocumentRenderer::Implementation::SetupPaperOrientation ( const PageKind  ePageKind,
PrintInfo &  rInfo 
)
inlineprivate

Member Data Documentation

◆ maPrinterPages

std::vector< std::shared_ptr< ::sd::PrinterPage> > sd::DocumentRenderer::Implementation::maPrinterPages
private

◆ maPrinterPageSizePixel

Size sd::DocumentRenderer::Implementation::maPrinterPageSizePixel
private

Definition at line 1322 of file DocumentRenderer.cxx.

Referenced by ProcessProperties().

◆ maPrintSize

awt::Size sd::DocumentRenderer::Implementation::maPrintSize
private

◆ maSlidesPerPage

std::vector<sal_Int32> sd::DocumentRenderer::Implementation::maSlidesPerPage
private

Definition at line 1327 of file DocumentRenderer.cxx.

Referenced by Implementation(), and ProcessProperties().

◆ mbHasOrientationWarningBeenShown

bool sd::DocumentRenderer::Implementation::mbHasOrientationWarningBeenShown
private

Definition at line 1326 of file DocumentRenderer.cxx.

Referenced by PreparePages(), and PrintPage().

◆ mbIsDisposed

bool sd::DocumentRenderer::Implementation::mbIsDisposed
private

Definition at line 1320 of file DocumentRenderer.cxx.

Referenced by GetPrintPageCount(), Notify(), PrintPage(), and ProcessProperties().

◆ mpOptions

std::unique_ptr<PrintOptions> sd::DocumentRenderer::Implementation::mpOptions
private

◆ mpPrinter

VclPtr<Printer> sd::DocumentRenderer::Implementation::mpPrinter
private

Definition at line 1321 of file DocumentRenderer.cxx.

Referenced by PrepareOutline(), PreparePages(), PrintPage(), and ProcessProperties().

◆ mpPrintView

std::unique_ptr<DrawView> sd::DocumentRenderer::Implementation::mpPrintView
private

Definition at line 1325 of file DocumentRenderer.cxx.

Referenced by PreparePages(), and PrintPage().

◆ mrBase

ViewShellBase& sd::DocumentRenderer::Implementation::mrBase
private

◆ mxObjectShell

SfxObjectShellRef sd::DocumentRenderer::Implementation::mxObjectShell
private

Definition at line 1318 of file DocumentRenderer.cxx.


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