LibreOffice Module svx (master)
1
svx
inc
sdr
contact
objectcontactofobjlistpainter.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
20
#pragma once
21
22
#include <config_options.h>
23
#include <
svx/sdr/contact/objectcontact.hxx
>
24
#include <
svx/svxdllapi.h
>
25
#include <
svx/svdpage.hxx
>
26
#include <
unotools/weakref.hxx
>
27
28
class
SdrPage
;
29
class
SdrObject
;
30
31
namespace
sdr::contact
{
32
33
class
UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) ObjectContactPainter :
public
ObjectContact
34
{
35
protected
:
36
// Hierarchy access methods
37
virtual
sal_uInt32 GetPaintObjectCount()
const
= 0;
38
virtual
ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) = 0;
39
40
public
:
41
// basic constructor/destructor
42
ObjectContactPainter();
43
virtual
~ObjectContactPainter()
override
;
44
};
45
46
// typedef for transferring SdrObject
47
typedef ::std::vector< SdrObject* >
SdrObjectVector
;
48
49
class
SVXCORE_DLLPUBLIC
ObjectContactOfObjListPainter
final :
public
ObjectContactPainter
50
{
51
// Target OutputDevice
52
OutputDevice
&
mrTargetOutputDevice
;
53
54
// Set StartPoint for next run, also given in constructor
55
SdrObjectVector
maStartObjects
;
56
57
// the processed page which is the base e.g. for PageNumberFields
58
const
SdrPage
*
mpProcessedPage
;
59
60
// Hierarchy access methods
61
virtual
sal_uInt32 GetPaintObjectCount()
const override
;
62
virtual
ViewContact
& GetPaintObjectViewContact(sal_uInt32 nIndex)
override
;
63
64
public
:
65
// basic constructor/destructor
66
ObjectContactOfObjListPainter
(
67
OutputDevice
& rTargetDevice,
68
SdrObjectVector
&& rObjects,
69
const
SdrPage
* pProcessedPage);
70
virtual
~ObjectContactOfObjListPainter
()
override
;
71
72
// Process the whole displaying
73
virtual
void
ProcessDisplay(
DisplayInfo
& rDisplayInfo)
override
;
74
75
// recording MetaFile? Default is false
76
virtual
bool
isOutputToRecordingMetaFile()
const override
;
77
78
// pdf export? Default is false
79
virtual
bool
isOutputToPDFFile()
const override
;
80
virtual
bool
isExportTaggedPDF()
const override
;
81
virtual ::vcl::PDFExtOutDevData
const
* GetPDFExtOutDevData()
const override
;
82
83
virtual
OutputDevice
* TryToGetOutputDevice()
const override
;
84
};
85
86
class
ObjectContactOfPagePainter
:
public
ObjectContactPainter
87
{
88
// the original ObjectContact this painter is working on
89
ObjectContact
&
mrOriginalObjectContact
;
90
91
// Set StartPoint for next run, also given in constructor
92
unotools::WeakReference<SdrPage>
mxStartPage
;
93
94
protected
:
95
// Hierarchy access methods
96
virtual
sal_uInt32 GetPaintObjectCount()
const override
;
97
virtual
ViewContact
& GetPaintObjectViewContact(sal_uInt32 nIndex)
override
;
98
99
public
:
100
// basic constructor
101
ObjectContactOfPagePainter
(
ObjectContact
& rOriginalObjectContact);
102
virtual
~ObjectContactOfPagePainter
()
override
;
103
104
// set another page
105
void
SetStartPage(
const
SdrPage
* pPage);
106
const
SdrPage
*
GetStartPage
()
const
{
return
mxStartPage.
get
().get(); }
107
SdrPage
*
GetStartPage
() {
return
mxStartPage.
get
().get(); }
108
109
virtual
OutputDevice
* TryToGetOutputDevice()
const override
;
110
};
111
112
}
113
114
115
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SdrObject
Abstract DrawObject.
Definition:
svdobj.hxx:260
SdrPage
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition:
svdpage.hxx:379
sdr::contact::DisplayInfo
Definition:
displayinfo.hxx:31
sdr::contact::ObjectContactOfObjListPainter
Definition:
objectcontactofobjlistpainter.hxx:50
sdr::contact::ObjectContactOfObjListPainter::maStartObjects
SdrObjectVector maStartObjects
Definition:
objectcontactofobjlistpainter.hxx:55
sdr::contact::ObjectContactOfObjListPainter::mpProcessedPage
const SdrPage * mpProcessedPage
Definition:
objectcontactofobjlistpainter.hxx:58
sdr::contact::ObjectContactOfObjListPainter::mrTargetOutputDevice
OutputDevice & mrTargetOutputDevice
Definition:
objectcontactofobjlistpainter.hxx:52
sdr::contact::ObjectContactOfPagePainter
Definition:
objectcontactofobjlistpainter.hxx:87
sdr::contact::ObjectContactOfPagePainter::mrOriginalObjectContact
ObjectContact & mrOriginalObjectContact
Definition:
objectcontactofobjlistpainter.hxx:89
sdr::contact::ObjectContactOfPagePainter::mxStartPage
unotools::WeakReference< SdrPage > mxStartPage
Definition:
objectcontactofobjlistpainter.hxx:92
sdr::contact::ObjectContactOfPagePainter::GetStartPage
const SdrPage * GetStartPage() const
Definition:
objectcontactofobjlistpainter.hxx:106
sdr::contact::ObjectContactOfPagePainter::GetStartPage
SdrPage * GetStartPage()
Definition:
objectcontactofobjlistpainter.hxx:107
sdr::contact::ObjectContact
Definition:
objectcontact.hxx:49
sdr::contact::ViewContact
Definition:
viewcontact.hxx:37
unotools::WeakReference< SdrPage >
unotools::WeakReference::get
rtl::Reference< interface_type > SAL_CALL get() const
sdr::contact
sdr::contact::SdrObjectVector
class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) ObjectContactPainter typedef ::std::vector< SdrObject * > SdrObjectVector
Definition:
objectcontactofobjlistpainter.hxx:33
objectcontact.hxx
OutputDevice
svdpage.hxx
svxdllapi.h
SVXCORE_DLLPUBLIC
#define SVXCORE_DLLPUBLIC
Definition:
svxdllapi.h:35
weakref.hxx
Generated on Sun Jul 30 2023 04:27:43 for LibreOffice Module svx (master) by
1.9.3