summaryrefslogtreecommitdiff
path: root/drawinglayer/inc/drawinglayer/primitive2d
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2008-03-06 03:37:06 +0000
committerArmin Weiss <aw@openoffice.org>2008-03-06 03:37:06 +0000
commit807dd3bfeafb2ec63bce04f9cc38efe481afe6ff (patch)
treeee50981768e50798e876367383e75bbcccb9cf6b /drawinglayer/inc/drawinglayer/primitive2d
parent3b78c15165be1c1f58fa36050d844e46d5331013 (diff)
added support for structured pdf tags
Diffstat (limited to 'drawinglayer/inc/drawinglayer/primitive2d')
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx5
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/structuretagprimitive2d.hxx87
2 files changed, 90 insertions, 2 deletions
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
index 3daebaec28ba..48ebd67a0831 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: drawinglayer_primitivetypes2d.hxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: aw $ $Date: 2008-03-05 08:20:14 $
+ * last change: $Author: aw $ $Date: 2008-03-06 04:36:36 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -97,6 +97,7 @@
#define PRIMITIVE2D_ID_EXECUTEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 46)
#define PRIMITIVE2D_ID_PAGEPREVIEWPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 47)
#define PRIMITIVE2D_ID_CHARTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 48)
+#define PRIMITIVE2D_ID_STRUCTURETAGRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 49)
//////////////////////////////////////////////////////////////////////////////
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/structuretagprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/structuretagprimitive2d.hxx
new file mode 100644
index 000000000000..3780d651a6ab
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive2d/structuretagprimitive2d.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: structuretagprimitive2d.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2008-03-06 04:36:36 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_STRUCTURETAGPRIMITIVE2D_HXX
+#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_STRUCTURETAGPRIMITIVE2D_HXX
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_GROUPPRIMITIVE2D_HXX
+#include <drawinglayer/primitive2d/groupprimitive2d.hxx>
+#endif
+
+#ifndef _VCL_PDFWRITER_HXX
+#include <vcl/pdfwriter.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ // This class is used to provode simple support for adding grouped
+ // pdf writer structured element information like used in sd from
+ // unomodel.cxx where a ViewObjectContactRedirector is used to add
+ // such information for diverse objects.
+ // This primitive encapsulates these and the VCLPdfRenderer uses it
+ // to apply the needed infos directly to the pdf export in a compatible
+ // way.
+ // If a renderer ignores this, it just decomposes to it's child
+ // content.
+ class StructureTagPrimitive2D : public GroupPrimitive2D
+ {
+ private:
+ // the PDF structure element this grouping represents
+ vcl::PDFWriter::StructElement maStructureElement;
+
+ public:
+ StructureTagPrimitive2D(
+ const vcl::PDFWriter::StructElement& rStructureElement,
+ const Primitive2DSequence& rChildren);
+
+ // data access
+ const vcl::PDFWriter::StructElement& getStructureElement() const { return maStructureElement; }
+
+ // provide unique ID
+ DeclPrimitrive2DIDBlock()
+ };
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_STRUCTURETAGPRIMITIVE2D_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// eof