2010-10-27 13:11:31 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2000-11-24 15:36:47 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 20:53:09 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-11-24 15:36:47 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-11-24 15:36:47 +00:00
|
|
|
*
|
2008-04-10 20:53:09 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-11-24 15:36:47 +00:00
|
|
|
*
|
2008-04-10 20:53:09 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-11-24 15:36:47 +00:00
|
|
|
*
|
2008-04-10 20:53:09 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-11-24 15:36:47 +00:00
|
|
|
*
|
2008-04-10 20:53:09 +00:00
|
|
|
* OpenOffice.org 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 version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-11-24 15:36:47 +00:00
|
|
|
*
|
2008-04-10 20:53:09 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-11-24 15:36:47 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _XIMP3DOBJECT_HXX
|
|
|
|
#define _XIMP3DOBJECT_HXX
|
|
|
|
|
2007-06-27 14:08:16 +00:00
|
|
|
#include <xmloff/xmlictxt.hxx>
|
2000-12-05 22:31:17 +00:00
|
|
|
#include "sdxmlimp_impl.hxx"
|
2007-06-27 14:08:16 +00:00
|
|
|
#include <xmloff/nmspmap.hxx>
|
2000-11-24 15:36:47 +00:00
|
|
|
#include <com/sun/star/drawing/XShapes.hpp>
|
|
|
|
#include <tools/rtti.hxx>
|
|
|
|
#include <com/sun/star/drawing/HomogenMatrix.hpp>
|
2000-12-01 12:14:07 +00:00
|
|
|
#include <com/sun/star/drawing/Direction3D.hpp>
|
|
|
|
#include <com/sun/star/drawing/Position3D.hpp>
|
2001-05-18 07:40:43 +00:00
|
|
|
#include "ximpshap.hxx"
|
|
|
|
|
2000-11-24 15:36:47 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// common shape context
|
|
|
|
|
2001-05-18 07:40:43 +00:00
|
|
|
class SdXML3DObjectContext : public SdXMLShapeContext
|
2000-11-24 15:36:47 +00:00
|
|
|
{
|
|
|
|
protected:
|
|
|
|
// the shape group this object should be created inside
|
|
|
|
|
|
|
|
com::sun::star::drawing::HomogenMatrix mxHomMat;
|
2010-11-10 13:50:33 +08:00
|
|
|
sal_Bool mbSetTransform;
|
2000-11-24 15:36:47 +00:00
|
|
|
|
|
|
|
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,
|
2004-10-22 06:54:04 +00:00
|
|
|
com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
|
|
|
|
sal_Bool bTemporaryShape);
|
2000-11-24 15:36:47 +00:00
|
|
|
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
|
|
|
|
{
|
2006-11-14 13:15:40 +00:00
|
|
|
::basegfx::B3DVector maMinEdge;
|
|
|
|
::basegfx::B3DVector maMaxEdge;
|
2010-11-10 13:50:33 +08:00
|
|
|
sal_Bool mbMinEdgeUsed;
|
|
|
|
sal_Bool mbMaxEdgeUsed;
|
2000-12-01 12:14:07 +00:00
|
|
|
|
2000-11-24 15:36:47 +00:00
|
|
|
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,
|
2004-10-22 06:54:04 +00:00
|
|
|
com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
|
|
|
|
sal_Bool bTemporaryShape);
|
2000-11-24 15:36:47 +00:00
|
|
|
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
|
|
|
|
{
|
2006-11-14 13:15:40 +00:00
|
|
|
::basegfx::B3DVector maCenter;
|
|
|
|
::basegfx::B3DVector maSize;
|
2010-11-10 13:50:33 +08:00
|
|
|
sal_Bool mbCenterUsed;
|
|
|
|
sal_Bool mbSizeUsed;
|
2000-12-01 12:14:07 +00:00
|
|
|
|
2000-11-24 15:36:47 +00:00
|
|
|
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,
|
2004-10-22 06:54:04 +00:00
|
|
|
com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
|
|
|
|
sal_Bool bTemporaryShape);
|
2000-11-24 15:36:47 +00:00
|
|
|
virtual ~SdXML3DSphereObjectShapeContext();
|
|
|
|
|
|
|
|
virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
|
|
|
|
virtual void EndElement();
|
|
|
|
};
|
|
|
|
|
2000-12-01 12:14:07 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// polygonbased context
|
|
|
|
|
|
|
|
class SdXML3DPolygonBasedShapeContext : public SdXML3DObjectContext
|
|
|
|
{
|
|
|
|
rtl::OUString maPoints;
|
|
|
|
rtl::OUString maViewBox;
|
|
|
|
|
|
|
|
public:
|
|
|
|
TYPEINFO();
|
|
|
|
|
|
|
|
SdXML3DPolygonBasedShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
|
|
|
|
const rtl::OUString& rLocalName,
|
|
|
|
const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
|
2004-10-22 06:54:04 +00:00
|
|
|
com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
|
|
|
|
sal_Bool bTemporaryShape);
|
2000-12-01 12:14:07 +00:00
|
|
|
virtual ~SdXML3DPolygonBasedShapeContext();
|
|
|
|
|
|
|
|
virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
|
|
|
|
virtual void EndElement();
|
|
|
|
};
|
|
|
|
|
2000-11-24 15:36:47 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// dr3d:3dlathe context
|
|
|
|
|
2000-12-01 12:14:07 +00:00
|
|
|
class SdXML3DLatheObjectShapeContext : public SdXML3DPolygonBasedShapeContext
|
2000-11-24 15:36:47 +00:00
|
|
|
{
|
|
|
|
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,
|
2004-10-22 06:54:04 +00:00
|
|
|
com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
|
|
|
|
sal_Bool bTemporaryShape);
|
2000-11-24 15:36:47 +00:00
|
|
|
virtual ~SdXML3DLatheObjectShapeContext();
|
|
|
|
|
|
|
|
virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
|
|
|
|
virtual void EndElement();
|
|
|
|
};
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// dr3d:3dextrude context
|
|
|
|
|
2000-12-01 12:14:07 +00:00
|
|
|
class SdXML3DExtrudeObjectShapeContext : public SdXML3DPolygonBasedShapeContext
|
2000-11-24 15:36:47 +00:00
|
|
|
{
|
|
|
|
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,
|
2004-10-22 06:54:04 +00:00
|
|
|
com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
|
|
|
|
sal_Bool bTemporaryShape);
|
2000-11-24 15:36:47 +00:00
|
|
|
virtual ~SdXML3DExtrudeObjectShapeContext();
|
|
|
|
|
|
|
|
virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
|
|
|
|
virtual void EndElement();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _XIMP3DOBJECT_HXX
|
2010-10-27 13:11:31 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|