summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/ximp3dobject.hxx
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2000-11-24 15:36:47 +0000
committerArmin Weiss <aw@openoffice.org>2000-11-24 15:36:47 +0000
commit74b56b3c2572179819c646eee87f1caa1ce12652 (patch)
treeb8098ef21de0228b02b1264fc4e88bd0e2ab5632 /xmloff/source/draw/ximp3dobject.hxx
parentb666f96ef318661f37082e79bdf7c9b67baca71d (diff)
#80594# XML 3d import/eport added
Diffstat (limited to 'xmloff/source/draw/ximp3dobject.hxx')
-rw-r--r--xmloff/source/draw/ximp3dobject.hxx196
1 files changed, 196 insertions, 0 deletions
diff --git a/xmloff/source/draw/ximp3dobject.hxx b/xmloff/source/draw/ximp3dobject.hxx
new file mode 100644
index 000000000000..8e7f71f35be8
--- /dev/null
+++ b/xmloff/source/draw/ximp3dobject.hxx
@@ -0,0 +1,196 @@
+/*************************************************************************
+ *
+ * $RCSfile: ximp3dobject.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2000-11-24 16:36:47 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _XIMP3DOBJECT_HXX
+#define _XIMP3DOBJECT_HXX
+
+#ifndef _XMLOFF_XMLICTXT_HXX
+#include "xmlictxt.hxx"
+#endif
+
+#ifndef _SDXMLIMP_HXX
+#include "sdxmlimp.hxx"
+#endif
+
+#ifndef _XMLOFF_NMSPMAP_HXX
+#include "nmspmap.hxx"
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_XSHAPES_HPP_
+#include <com/sun/star/drawing/XShapes.hpp>
+#endif
+
+#ifndef _RTTI_HXX
+#include <tools/rtti.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_DRAWING_HOMOGENMATRIX_HPP_
+#include <com/sun/star/drawing/HomogenMatrix.hpp>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// common shape context
+
+class SdXML3DObjectContext : public SvXMLImportContext
+{
+protected:
+ // the shape group this object should be created inside
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > mxShapes;
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShape > mxShape;
+ com::sun::star::uno::Reference< com::sun::star::text::XTextCursor > mxCursor;
+
+ rtl::OUString maDrawStyleName;
+ rtl::OUString maPoints;
+ rtl::OUString maViewBox;
+
+ com::sun::star::drawing::HomogenMatrix mxHomMat;
+ BOOL mbSetTransform;
+
+ void SetStyle();
+ void AddShape(com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape);
+
+public:
+ TYPEINFO();
+
+ SdXML3DObjectContext( SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXML3DObjectContext();
+
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+ virtual void EndElement();
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// dr3d:3dcube context
+
+class SdXML3DCubeObjectShapeContext : public SdXML3DObjectContext
+{
+public:
+ TYPEINFO();
+
+ SdXML3DCubeObjectShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXML3DCubeObjectShapeContext();
+
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+ virtual void EndElement();
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// dr3d:3dsphere context
+
+class SdXML3DSphereObjectShapeContext : public SdXML3DObjectContext
+{
+public:
+ TYPEINFO();
+
+ SdXML3DSphereObjectShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXML3DSphereObjectShapeContext();
+
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+ virtual void EndElement();
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// dr3d:3dlathe context
+
+class SdXML3DLatheObjectShapeContext : public SdXML3DObjectContext
+{
+public:
+ TYPEINFO();
+
+ SdXML3DLatheObjectShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXML3DLatheObjectShapeContext();
+
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+ virtual void EndElement();
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// dr3d:3dextrude context
+
+class SdXML3DExtrudeObjectShapeContext : public SdXML3DObjectContext
+{
+public:
+ TYPEINFO();
+
+ SdXML3DExtrudeObjectShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+ virtual ~SdXML3DExtrudeObjectShapeContext();
+
+ virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+ virtual void EndElement();
+};
+
+#endif // _XIMP3DOBJECT_HXX