LibreOffice Module sw (master)  1
DocumentDeviceManager.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #ifndef INCLUDED_SW_SOURCE_CORE_INC_DOCUMENTDEVICEMANAGER_HXX
20 #define INCLUDED_SW_SOURCE_CORE_INC_DOCUMENTDEVICEMANAGER_HXX
21 
23 #include <vcl/vclptr.hxx>
24 #include <memory>
25 
26 class SwDoc;
27 class SfxPrinter;
28 class VirtualDevice;
29 class OutputDevice;
30 class JobSetup;
31 class SwPrintData;
32 
33 namespace sw {
34 
36 {
37 
38 public:
39 
40  DocumentDeviceManager( SwDoc& i_rSwdoc );
41 
42  SfxPrinter* getPrinter(/*[in]*/ bool bCreate ) const override;
43 
44  void setPrinter(/*[in]*/ SfxPrinter *pP,/*[in]*/ bool bDeleteOld,/*[in]*/ bool bCallPrtDataChanged ) override;
45 
46  VirtualDevice* getVirtualDevice(/*[in]*/ bool bCreate ) const override;
47 
48  void setVirtualDevice(/*[in]*/ VirtualDevice* pVd ) override;
49 
50  OutputDevice* getReferenceDevice(/*[in]*/ bool bCreate ) const override;
51 
52  void setReferenceDeviceType(/*[in]*/ bool bNewVirtual, /*[in]*/ bool bNewHiRes ) override;
53 
54  const JobSetup* getJobsetup() const override;
55 
56  void setJobsetup(/*[in]*/ const JobSetup &rJobSetup ) override;
57 
58  const SwPrintData & getPrintData() const override;
59 
60  void setPrintData(/*[in]*/ const SwPrintData& rPrtData ) override;
61 
62  virtual ~DocumentDeviceManager() override;
63 
64 private:
65 
68 
70  SfxPrinter& CreatePrinter_() const;
71  void PrtDataChanged();
78  std::unique_ptr<SwPrintData> mpPrtData;
79 };
80 
81 }
82 #endif
83 
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxPrinter * getPrinter(bool bCreate) const override
Return the printer set at the document.
void setPrinter(SfxPrinter *pP, bool bDeleteOld, bool bCallPrtDataChanged) override
Set the printer at the document.
void setPrintData(const SwPrintData &rPrtData) override
Sets the PrintData.
VirtualDevice * getVirtualDevice(bool bCreate) const override
Return the virtual device set at the document.
virtual ~DocumentDeviceManager() override
Definition: doc.hxx:185
const JobSetup * getJobsetup() const override
Returns the Jobsetup.
void setReferenceDeviceType(bool bNewVirtual, bool bNewHiRes) override
Sets the type of the reference device used for formatting the document.
Dialog to specify the properties of date form field.
void setVirtualDevice(VirtualDevice *pVd) override
Sets the current virtual device.
VirtualDevice & CreateVirtualDevice_() const
const SwPrintData & getPrintData() const override
Returns the PrintData.
SfxPrinter & CreatePrinter_() const
OutputDevice * getReferenceDevice(bool bCreate) const override
Returns the current reference device.
void PrtDataChanged()
Printer or JobSetup altered.
VclPtr< VirtualDevice > mpVirDev
Provides access to the formatting devices of a document.
std::unique_ptr< SwPrintData > mpPrtData
void setJobsetup(const JobSetup &rJobSetup) override
Sets the Jobsetup.
DocumentDeviceManager & operator=(DocumentDeviceManager const &)=delete