1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_STRUCTURETAGPRIMITIVE2D_HXX 25 #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_STRUCTURETAGPRIMITIVE2D_HXX 26 27 #include <drawinglayer/drawinglayerdllapi.h> 28 #include <drawinglayer/primitive2d/groupprimitive2d.hxx> 29 #include <vcl/pdfwriter.hxx> 30 31 ////////////////////////////////////////////////////////////////////////////// 32 33 namespace drawinglayer 34 { 35 namespace primitive2d 36 { 37 /** StructureTagPrimitive2D class 38 39 This class is used to provode simple support for adding grouped 40 pdf writer structured element information like used in sd from 41 unomodel.cxx where a ViewObjectContactRedirector is used to add 42 such information for diverse objects. 43 This primitive encapsulates these and the VCLPdfRenderer uses it 44 to apply the needed infos directly to the pdf export in a compatible 45 way. 46 If a renderer ignores this, it just decomposes to it's child 47 content. 48 */ 49 class DRAWINGLAYER_DLLPUBLIC StructureTagPrimitive2D : public GroupPrimitive2D 50 { 51 private: 52 /// the PDF structure element this grouping represents 53 vcl::PDFWriter::StructElement maStructureElement; 54 55 public: 56 /// constructor 57 StructureTagPrimitive2D( 58 const vcl::PDFWriter::StructElement& rStructureElement, 59 const Primitive2DSequence& rChildren); 60 61 /// data read access getStructureElement() const62 const vcl::PDFWriter::StructElement& getStructureElement() const { return maStructureElement; } 63 64 /// provide unique ID 65 DeclPrimitrive2DIDBlock() 66 }; 67 } // end of namespace primitive2d 68 } // end of namespace drawinglayer 69 70 ////////////////////////////////////////////////////////////////////////////// 71 72 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_STRUCTURETAGPRIMITIVE2D_HXX 73 74 ////////////////////////////////////////////////////////////////////////////// 75 // eof 76