Branch libreoffice-6-3
[LibreOffice.git] / include / drawinglayer / primitive2d / structuretagprimitive2d.hxx
blob255dc5e64f56c6534e1b14c06783f8b82ee68879
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 INCLUDED_DRAWINGLAYER_PRIMITIVE2D_STRUCTURETAGPRIMITIVE2D_HXX
21 #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_STRUCTURETAGPRIMITIVE2D_HXX
23 #include <drawinglayer/drawinglayerdllapi.h>
25 #include <drawinglayer/primitive2d/groupprimitive2d.hxx>
26 #include <vcl/pdfwriter.hxx>
29 namespace drawinglayer
31 namespace primitive2d
33 /** StructureTagPrimitive2D class
35 This class is used to provide simple support for adding grouped
36 pdf writer structured element information like used in sd from
37 unomodel.cxx where a ViewObjectContactRedirector is used to add
38 such information for diverse objects.
39 This primitive encapsulates these and the VCLPdfRenderer uses it
40 to apply the needed infos directly to the pdf export in a compatible
41 way.
42 If a renderer ignores this, it just decomposes to its child
43 content.
45 class DRAWINGLAYER_DLLPUBLIC StructureTagPrimitive2D : public GroupPrimitive2D
47 private:
48 /// the PDF structure element this grouping represents
49 vcl::PDFWriter::StructElement maStructureElement;
51 /// flag for background object
52 bool mbBackground;
53 /// flag for image (OBJ_GRAF)
54 bool mbIsImage;
56 public:
57 /// constructor
58 StructureTagPrimitive2D(
59 const vcl::PDFWriter::StructElement& rStructureElement,
60 bool bBackground,
61 bool bIsImage,
62 const Primitive2DContainer& rChildren);
64 /// data read access
65 const vcl::PDFWriter::StructElement& getStructureElement() const { return maStructureElement; }
66 bool isBackground() const { return mbBackground; }
67 bool isImage() const { return mbIsImage; }
69 /// compare operator
70 virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
72 /// provide unique ID
73 DeclPrimitive2DIDBlock()
75 } // end of namespace primitive2d
76 } // end of namespace drawinglayer
79 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_STRUCTURETAGPRIMITIVE2D_HXX
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */