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
26class SwDoc;
27class SfxPrinter;
28class VirtualDevice;
29class OutputDevice;
30class JobSetup;
31class SwPrintData;
32
33namespace sw
34{
36{
37public:
39
40 SfxPrinter* getPrinter(/*[in]*/ bool bCreate) const override;
41
42 void setPrinter(/*[in]*/ SfxPrinter* pP, /*[in]*/ bool bDeleteOld,
43 /*[in]*/ bool bCallPrtDataChanged) override;
44
45 VirtualDevice* getVirtualDevice(/*[in]*/ bool bCreate) const override;
46
47 void setVirtualDevice(/*[in]*/ VirtualDevice* pVd) override;
48
49 OutputDevice* getReferenceDevice(/*[in]*/ bool bCreate) const override;
50
51 void setReferenceDeviceType(/*[in]*/ bool bNewVirtual, /*[in]*/ bool bNewHiRes) override;
52
53 const JobSetup* getJobsetup() const override;
54
55 void setJobsetup(/*[in]*/ const JobSetup& rJobSetup) override;
56
57 const SwPrintData& getPrintData() const override;
58
59 void setPrintData(/*[in]*/ const SwPrintData& rPrtData) override;
60
61 virtual ~DocumentDeviceManager() override;
62
63private:
66
69 void PrtDataChanged();
76 std::unique_ptr<SwPrintData> mpPrtData;
77};
78}
79#endif
80
81/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Provides access to the formatting devices of a document.
Definition: doc.hxx:197
SfxPrinter * getPrinter(bool bCreate) const override
Return the printer set at the document.
VirtualDevice & CreateVirtualDevice_() const
void setReferenceDeviceType(bool bNewVirtual, bool bNewHiRes) override
Sets the type of the reference device used for formatting the document.
SfxPrinter & CreatePrinter_() const
void setVirtualDevice(VirtualDevice *pVd) override
Sets the current virtual device.
void setPrintData(const SwPrintData &rPrtData) override
Sets the PrintData.
OutputDevice * getReferenceDevice(bool bCreate) const override
Returns the current reference device.
const SwPrintData & getPrintData() const override
Returns the PrintData.
std::unique_ptr< SwPrintData > mpPrtData
DocumentDeviceManager & operator=(DocumentDeviceManager const &)=delete
VirtualDevice * getVirtualDevice(bool bCreate) const override
Return the virtual device set at the document.
VclPtr< VirtualDevice > mpVirDev
virtual ~DocumentDeviceManager() override
DocumentDeviceManager(DocumentDeviceManager const &)=delete
void setPrinter(SfxPrinter *pP, bool bDeleteOld, bool bCallPrtDataChanged) override
Set the printer at the document.
void PrtDataChanged()
Printer or JobSetup altered.
const JobSetup * getJobsetup() const override
Returns the Jobsetup.
void setJobsetup(const JobSetup &rJobSetup) override
Sets the Jobsetup.
Dialog to specify the properties of date form field.