1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef _SDR_CONTACT_OBJECTCONTACTOFOBJLISTPAINTER_HXX
21 #define _SDR_CONTACT_OBJECTCONTACTOFOBJLISTPAINTER_HXX
23 #include <svx/sdr/contact/objectcontact.hxx>
24 #include "svx/svxdllapi.h"
25 #include <svx/svdpage.hxx>
27 //////////////////////////////////////////////////////////////////////////////
33 //////////////////////////////////////////////////////////////////////////////
39 class SVX_DLLPUBLIC ObjectContactPainter
: public ObjectContact
42 // Hierarchy access methods
43 virtual sal_uInt32
GetPaintObjectCount() const = 0;
44 virtual ViewContact
& GetPaintObjectViewContact(sal_uInt32 nIndex
) const = 0;
47 // basic constructor/destructor
48 ObjectContactPainter();
49 virtual ~ObjectContactPainter();
51 } // end of namespace contact
52 } // end of namespace sdr
54 //////////////////////////////////////////////////////////////////////////////
60 // typedef for transferring SdrObject
61 typedef ::std::vector
< SdrObject
* > SdrObjectVector
;
63 class SVX_DLLPUBLIC ObjectContactOfObjListPainter
: public ObjectContactPainter
66 // Target OutputDevice
67 OutputDevice
& mrTargetOutputDevice
;
69 // Set StartPoint for next run, also given in constructor
70 SdrObjectVector maStartObjects
;
72 // the processed page which is the base e.g. for PageNumberFields
73 const SdrPage
* mpProcessedPage
;
75 // Hierarchy access methods
76 virtual sal_uInt32
GetPaintObjectCount() const;
77 virtual ViewContact
& GetPaintObjectViewContact(sal_uInt32 nIndex
) const;
80 // basic constructor/destructor
81 ObjectContactOfObjListPainter(
82 OutputDevice
& rTargetDevice
,
83 const SdrObjectVector
& rObjects
,
84 const SdrPage
* pProcessedPage
);
85 virtual ~ObjectContactOfObjListPainter();
87 // Process the whole displaying
88 virtual void ProcessDisplay(DisplayInfo
& rDisplayInfo
);
90 // VirtualDevice? Default is false
91 virtual bool isOutputToVirtualDevice() const;
93 // recording MetaFile? Default is false
94 virtual bool isOutputToRecordingMetaFile() const;
96 // pdf export? Default is false
97 virtual bool isOutputToPDFFile() const;
99 // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed.
100 virtual OutputDevice
* TryToGetOutputDevice() const;
102 } // end of namespace contact
103 } // end of namespace sdr
105 //////////////////////////////////////////////////////////////////////////////
111 class ObjectContactOfPagePainter
: public ObjectContactPainter
114 // the original ObjectContact this painter is working on
115 ObjectContact
& mrOriginalObjectContact
;
117 // Set StartPoint for next run, also given in constructor
118 SdrPageWeakRef mxStartPage
;
120 // Hierarchy access methods
121 virtual sal_uInt32
GetPaintObjectCount() const;
122 virtual ViewContact
& GetPaintObjectViewContact(sal_uInt32 nIndex
) const;
126 ObjectContactOfPagePainter(
127 const SdrPage
* pPage
,
128 ObjectContact
& rOriginalObjectContact
);
129 virtual ~ObjectContactOfPagePainter();
132 void SetStartPage(const SdrPage
* pPage
);
133 const SdrPage
* GetStartPage() const { return mxStartPage
.get(); }
135 // access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed.
136 virtual OutputDevice
* TryToGetOutputDevice() const;
138 } // end of namespace contact
139 } // end of namespace sdr
141 //////////////////////////////////////////////////////////////////////////////
143 #endif //_SDR_CONTACT_OBJECTCONTACTOFOBJLISTPAINTER_HXX
145 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */