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 .
22 #include <com/sun/star/drawing/XShapes.hpp>
23 #include <com/sun/star/drawing/HomogenMatrix.hpp>
24 #include "ximpshap.hxx"
26 // common shape context
28 class SdXML3DObjectContext
: public SdXMLShapeContext
30 // the shape group this object should be created inside
32 css::drawing::HomogenMatrix mxHomMat
;
37 SdXML3DObjectContext( SvXMLImport
& rImport
,
38 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
,
39 css::uno::Reference
< css::drawing::XShapes
> const & rShapes
);
40 virtual ~SdXML3DObjectContext() override
;
42 virtual void SAL_CALL
startFastElement(
44 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
47 // dr3d:3dcube context
49 class SdXML3DCubeObjectShapeContext
: public SdXML3DObjectContext
51 ::basegfx::B3DVector maMinEdge
;
52 ::basegfx::B3DVector maMaxEdge
;
56 SdXML3DCubeObjectShapeContext( SvXMLImport
& rImport
,
57 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
,
58 css::uno::Reference
< css::drawing::XShapes
> const & rShapes
);
59 virtual ~SdXML3DCubeObjectShapeContext() override
;
61 virtual void SAL_CALL
startFastElement(
63 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
66 // dr3d:3dsphere context
68 class SdXML3DSphereObjectShapeContext
: public SdXML3DObjectContext
70 ::basegfx::B3DVector maCenter
;
71 ::basegfx::B3DVector maSphereSize
;
75 SdXML3DSphereObjectShapeContext( SvXMLImport
& rImport
,
76 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
,
77 css::uno::Reference
< css::drawing::XShapes
> const & rShapes
);
78 virtual ~SdXML3DSphereObjectShapeContext() override
;
80 virtual void SAL_CALL
startFastElement(
82 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
85 // polygonbased context
87 class SdXML3DPolygonBasedShapeContext
: public SdXML3DObjectContext
94 SdXML3DPolygonBasedShapeContext( SvXMLImport
& rImport
,
95 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
,
96 css::uno::Reference
< css::drawing::XShapes
> const & rShapes
);
97 virtual ~SdXML3DPolygonBasedShapeContext() override
;
99 virtual void SAL_CALL
startFastElement(
101 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
104 // dr3d:3dlathe context
106 class SdXML3DLatheObjectShapeContext
: public SdXML3DPolygonBasedShapeContext
110 SdXML3DLatheObjectShapeContext( SvXMLImport
& rImport
,
111 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
,
112 css::uno::Reference
< css::drawing::XShapes
> const & rShapes
);
113 virtual ~SdXML3DLatheObjectShapeContext() override
;
115 virtual void SAL_CALL
startFastElement(
117 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
120 // dr3d:3dextrude context
122 class SdXML3DExtrudeObjectShapeContext
: public SdXML3DPolygonBasedShapeContext
126 SdXML3DExtrudeObjectShapeContext( SvXMLImport
& rImport
,
127 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
,
128 css::uno::Reference
< css::drawing::XShapes
> const & rShapes
);
129 virtual ~SdXML3DExtrudeObjectShapeContext() override
;
131 virtual void SAL_CALL
startFastElement(
133 const css::uno::Reference
< css::xml::sax::XFastAttributeList
>& xAttrList
) override
;
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */