1*b1cdbd2cSJim Jagielski /************************************************************** 2*b1cdbd2cSJim Jagielski * 3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one 4*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file 5*b1cdbd2cSJim Jagielski * distributed with this work for additional information 6*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file 7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the 8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance 9*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at 10*b1cdbd2cSJim Jagielski * 11*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0 12*b1cdbd2cSJim Jagielski * 13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing, 14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an 15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the 17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations 18*b1cdbd2cSJim Jagielski * under the License. 19*b1cdbd2cSJim Jagielski * 20*b1cdbd2cSJim Jagielski *************************************************************/ 21*b1cdbd2cSJim Jagielski 22*b1cdbd2cSJim Jagielski #ifndef _XIMPSHAPE_HXX 23*b1cdbd2cSJim Jagielski #define _XIMPSHAPE_HXX 24*b1cdbd2cSJim Jagielski 25*b1cdbd2cSJim Jagielski #include <com/sun/star/io/XOutputStream.hpp> 26*b1cdbd2cSJim Jagielski #include <com/sun/star/document/XActionLockable.hpp> 27*b1cdbd2cSJim Jagielski #include <com/sun/star/container/XIdentifierContainer.hpp> 28*b1cdbd2cSJim Jagielski #include <xmloff/xmlictxt.hxx> 29*b1cdbd2cSJim Jagielski #include "sdxmlimp_impl.hxx" 30*b1cdbd2cSJim Jagielski #include <xmloff/nmspmap.hxx> 31*b1cdbd2cSJim Jagielski #include <com/sun/star/drawing/XShapes.hpp> 32*b1cdbd2cSJim Jagielski #include <com/sun/star/text/XTextCursor.hpp> 33*b1cdbd2cSJim Jagielski #include <com/sun/star/awt/Point.hpp> 34*b1cdbd2cSJim Jagielski #include <tools/rtti.hxx> 35*b1cdbd2cSJim Jagielski #include "xexptran.hxx" 36*b1cdbd2cSJim Jagielski #include <vector> 37*b1cdbd2cSJim Jagielski #include <xmloff/shapeimport.hxx> 38*b1cdbd2cSJim Jagielski #include <xmloff/xmlmultiimagehelper.hxx> 39*b1cdbd2cSJim Jagielski #include <basegfx/matrix/b2dhommatrix.hxx> 40*b1cdbd2cSJim Jagielski 41*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 42*b1cdbd2cSJim Jagielski // common shape context 43*b1cdbd2cSJim Jagielski 44*b1cdbd2cSJim Jagielski class SdXMLShapeContext : public SvXMLShapeContext 45*b1cdbd2cSJim Jagielski { 46*b1cdbd2cSJim Jagielski protected: 47*b1cdbd2cSJim Jagielski // the shape group this object should be created inside 48*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > mxShapes; 49*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::text::XTextCursor > mxCursor; 50*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::text::XTextCursor > mxOldCursor; 51*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList> mxAttrList; 52*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::container::XIdentifierContainer > mxGluePoints; 53*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::document::XActionLockable > mxLockable; 54*b1cdbd2cSJim Jagielski 55*b1cdbd2cSJim Jagielski rtl::OUString maDrawStyleName; 56*b1cdbd2cSJim Jagielski rtl::OUString maTextStyleName; 57*b1cdbd2cSJim Jagielski rtl::OUString maPresentationClass; 58*b1cdbd2cSJim Jagielski rtl::OUString maShapeName; 59*b1cdbd2cSJim Jagielski rtl::OUString maThumbnailURL; 60*b1cdbd2cSJim Jagielski 61*b1cdbd2cSJim Jagielski /// whether to restore list context (#91964#) 62*b1cdbd2cSJim Jagielski bool mbListContextPushed; 63*b1cdbd2cSJim Jagielski 64*b1cdbd2cSJim Jagielski sal_uInt16 mnStyleFamily; 65*b1cdbd2cSJim Jagielski sal_uInt16 mnClass; 66*b1cdbd2cSJim Jagielski sal_Bool mbIsPlaceholder; 67*b1cdbd2cSJim Jagielski bool mbClearDefaultAttributes; 68*b1cdbd2cSJim Jagielski sal_Bool mbIsUserTransformed; 69*b1cdbd2cSJim Jagielski sal_Int32 mnZOrder; 70*b1cdbd2cSJim Jagielski rtl::OUString maShapeId; 71*b1cdbd2cSJim Jagielski rtl::OUString maLayerName; 72*b1cdbd2cSJim Jagielski 73*b1cdbd2cSJim Jagielski // #i68101# 74*b1cdbd2cSJim Jagielski rtl::OUString maShapeTitle; 75*b1cdbd2cSJim Jagielski rtl::OUString maShapeDescription; 76*b1cdbd2cSJim Jagielski 77*b1cdbd2cSJim Jagielski SdXMLImExTransform2D mnTransform; 78*b1cdbd2cSJim Jagielski com::sun::star::awt::Size maSize; 79*b1cdbd2cSJim Jagielski com::sun::star::awt::Point maPosition; 80*b1cdbd2cSJim Jagielski basegfx::B2DHomMatrix maUsedTransformation; 81*b1cdbd2cSJim Jagielski 82*b1cdbd2cSJim Jagielski bool mbVisible; 83*b1cdbd2cSJim Jagielski bool mbPrintable; 84*b1cdbd2cSJim Jagielski 85*b1cdbd2cSJim Jagielski /** if bSupportsStyle is false, auto styles will be set but not a style */ 86*b1cdbd2cSJim Jagielski void SetStyle( bool bSupportsStyle = true ); 87*b1cdbd2cSJim Jagielski void SetLayer(); 88*b1cdbd2cSJim Jagielski void SetThumbnail(); 89*b1cdbd2cSJim Jagielski 90*b1cdbd2cSJim Jagielski void AddShape(com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape); 91*b1cdbd2cSJim Jagielski void AddShape(const char* pServiceName ); 92*b1cdbd2cSJim Jagielski void SetTransformation(); 93*b1cdbd2cSJim Jagielski GetImport()94*b1cdbd2cSJim Jagielski SvXMLImport& GetImport() { return SvXMLImportContext::GetImport(); } GetImport() const95*b1cdbd2cSJim Jagielski const SvXMLImport& GetImport() const { return SvXMLImportContext::GetImport(); } 96*b1cdbd2cSJim Jagielski 97*b1cdbd2cSJim Jagielski void addGluePoint( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); 98*b1cdbd2cSJim Jagielski 99*b1cdbd2cSJim Jagielski sal_Bool isPresentationShape() const; 100*b1cdbd2cSJim Jagielski 101*b1cdbd2cSJim Jagielski public: 102*b1cdbd2cSJim Jagielski TYPEINFO(); 103*b1cdbd2cSJim Jagielski 104*b1cdbd2cSJim Jagielski SdXMLShapeContext( SvXMLImport& rImport, 105*b1cdbd2cSJim Jagielski sal_uInt16 nPrfx, 106*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 107*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 108*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 109*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 110*b1cdbd2cSJim Jagielski virtual ~SdXMLShapeContext(); 111*b1cdbd2cSJim Jagielski 112*b1cdbd2cSJim Jagielski virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); 113*b1cdbd2cSJim Jagielski virtual void EndElement(); 114*b1cdbd2cSJim Jagielski 115*b1cdbd2cSJim Jagielski virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, 116*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); 117*b1cdbd2cSJim Jagielski 118*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 119*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 120*b1cdbd2cSJim Jagielski 121*b1cdbd2cSJim Jagielski /// access to ShapeId for evtl. late adding getShapeId() const122*b1cdbd2cSJim Jagielski const rtl::OUString& getShapeId() const { return maShapeId; } 123*b1cdbd2cSJim Jagielski 124*b1cdbd2cSJim Jagielski // allow to copy evtl. useful data from another temporary import context, e.g. used to 125*b1cdbd2cSJim Jagielski // support multiple images 126*b1cdbd2cSJim Jagielski virtual void onDemandRescueUsefulDataFromTemporary( const SvXMLImportContext& rCandidate ); 127*b1cdbd2cSJim Jagielski }; 128*b1cdbd2cSJim Jagielski 129*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 130*b1cdbd2cSJim Jagielski // draw:rect context 131*b1cdbd2cSJim Jagielski 132*b1cdbd2cSJim Jagielski class SdXMLRectShapeContext : public SdXMLShapeContext 133*b1cdbd2cSJim Jagielski { 134*b1cdbd2cSJim Jagielski sal_Int32 mnRadius; 135*b1cdbd2cSJim Jagielski 136*b1cdbd2cSJim Jagielski public: 137*b1cdbd2cSJim Jagielski TYPEINFO(); 138*b1cdbd2cSJim Jagielski 139*b1cdbd2cSJim Jagielski SdXMLRectShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 140*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 141*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 142*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 143*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 144*b1cdbd2cSJim Jagielski virtual ~SdXMLRectShapeContext(); 145*b1cdbd2cSJim Jagielski virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); 146*b1cdbd2cSJim Jagielski 147*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 148*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 149*b1cdbd2cSJim Jagielski }; 150*b1cdbd2cSJim Jagielski 151*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 152*b1cdbd2cSJim Jagielski // draw:line context 153*b1cdbd2cSJim Jagielski 154*b1cdbd2cSJim Jagielski class SdXMLLineShapeContext : public SdXMLShapeContext 155*b1cdbd2cSJim Jagielski { 156*b1cdbd2cSJim Jagielski sal_Int32 mnX1; 157*b1cdbd2cSJim Jagielski sal_Int32 mnY1; 158*b1cdbd2cSJim Jagielski sal_Int32 mnX2; 159*b1cdbd2cSJim Jagielski sal_Int32 mnY2; 160*b1cdbd2cSJim Jagielski 161*b1cdbd2cSJim Jagielski public: 162*b1cdbd2cSJim Jagielski TYPEINFO(); 163*b1cdbd2cSJim Jagielski 164*b1cdbd2cSJim Jagielski SdXMLLineShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 165*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 166*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 167*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 168*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 169*b1cdbd2cSJim Jagielski virtual ~SdXMLLineShapeContext(); 170*b1cdbd2cSJim Jagielski virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); 171*b1cdbd2cSJim Jagielski 172*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 173*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 174*b1cdbd2cSJim Jagielski }; 175*b1cdbd2cSJim Jagielski 176*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 177*b1cdbd2cSJim Jagielski // draw:ellipse and draw:circle context 178*b1cdbd2cSJim Jagielski 179*b1cdbd2cSJim Jagielski class SdXMLEllipseShapeContext : public SdXMLShapeContext 180*b1cdbd2cSJim Jagielski { 181*b1cdbd2cSJim Jagielski sal_Int32 mnCX; 182*b1cdbd2cSJim Jagielski sal_Int32 mnCY; 183*b1cdbd2cSJim Jagielski sal_Int32 mnRX; 184*b1cdbd2cSJim Jagielski sal_Int32 mnRY; 185*b1cdbd2cSJim Jagielski 186*b1cdbd2cSJim Jagielski sal_uInt16 meKind; 187*b1cdbd2cSJim Jagielski sal_Int32 mnStartAngle; 188*b1cdbd2cSJim Jagielski sal_Int32 mnEndAngle; 189*b1cdbd2cSJim Jagielski public: 190*b1cdbd2cSJim Jagielski TYPEINFO(); 191*b1cdbd2cSJim Jagielski 192*b1cdbd2cSJim Jagielski SdXMLEllipseShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 193*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 194*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 195*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 196*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 197*b1cdbd2cSJim Jagielski virtual ~SdXMLEllipseShapeContext(); 198*b1cdbd2cSJim Jagielski virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); 199*b1cdbd2cSJim Jagielski 200*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 201*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 202*b1cdbd2cSJim Jagielski }; 203*b1cdbd2cSJim Jagielski 204*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 205*b1cdbd2cSJim Jagielski // draw:polyline and draw:polygon context 206*b1cdbd2cSJim Jagielski 207*b1cdbd2cSJim Jagielski class SdXMLPolygonShapeContext : public SdXMLShapeContext 208*b1cdbd2cSJim Jagielski { 209*b1cdbd2cSJim Jagielski rtl::OUString maPoints; 210*b1cdbd2cSJim Jagielski rtl::OUString maViewBox; 211*b1cdbd2cSJim Jagielski sal_Bool mbClosed; 212*b1cdbd2cSJim Jagielski 213*b1cdbd2cSJim Jagielski public: 214*b1cdbd2cSJim Jagielski TYPEINFO(); 215*b1cdbd2cSJim Jagielski 216*b1cdbd2cSJim Jagielski SdXMLPolygonShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 217*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 218*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 219*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, sal_Bool bClosed, sal_Bool bTemporaryShape); 220*b1cdbd2cSJim Jagielski virtual ~SdXMLPolygonShapeContext(); 221*b1cdbd2cSJim Jagielski virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); 222*b1cdbd2cSJim Jagielski 223*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 224*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 225*b1cdbd2cSJim Jagielski }; 226*b1cdbd2cSJim Jagielski 227*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 228*b1cdbd2cSJim Jagielski // draw:path context 229*b1cdbd2cSJim Jagielski 230*b1cdbd2cSJim Jagielski class SdXMLPathShapeContext : public SdXMLShapeContext 231*b1cdbd2cSJim Jagielski { 232*b1cdbd2cSJim Jagielski rtl::OUString maD; 233*b1cdbd2cSJim Jagielski rtl::OUString maViewBox; 234*b1cdbd2cSJim Jagielski sal_Bool mbClosed; 235*b1cdbd2cSJim Jagielski 236*b1cdbd2cSJim Jagielski public: 237*b1cdbd2cSJim Jagielski TYPEINFO(); 238*b1cdbd2cSJim Jagielski 239*b1cdbd2cSJim Jagielski SdXMLPathShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 240*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 241*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 242*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 243*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 244*b1cdbd2cSJim Jagielski virtual ~SdXMLPathShapeContext(); 245*b1cdbd2cSJim Jagielski virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); 246*b1cdbd2cSJim Jagielski 247*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 248*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 249*b1cdbd2cSJim Jagielski }; 250*b1cdbd2cSJim Jagielski 251*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 252*b1cdbd2cSJim Jagielski // draw:text-box context 253*b1cdbd2cSJim Jagielski 254*b1cdbd2cSJim Jagielski class SdXMLTextBoxShapeContext : public SdXMLShapeContext 255*b1cdbd2cSJim Jagielski { 256*b1cdbd2cSJim Jagielski sal_Int32 mnRadius; 257*b1cdbd2cSJim Jagielski 258*b1cdbd2cSJim Jagielski public: 259*b1cdbd2cSJim Jagielski TYPEINFO(); 260*b1cdbd2cSJim Jagielski 261*b1cdbd2cSJim Jagielski SdXMLTextBoxShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 262*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 263*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 264*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 265*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 266*b1cdbd2cSJim Jagielski virtual ~SdXMLTextBoxShapeContext(); 267*b1cdbd2cSJim Jagielski virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); 268*b1cdbd2cSJim Jagielski 269*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 270*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 271*b1cdbd2cSJim Jagielski }; 272*b1cdbd2cSJim Jagielski 273*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 274*b1cdbd2cSJim Jagielski // draw:control context 275*b1cdbd2cSJim Jagielski 276*b1cdbd2cSJim Jagielski class SdXMLControlShapeContext : public SdXMLShapeContext 277*b1cdbd2cSJim Jagielski { 278*b1cdbd2cSJim Jagielski private: 279*b1cdbd2cSJim Jagielski rtl::OUString maFormId; 280*b1cdbd2cSJim Jagielski 281*b1cdbd2cSJim Jagielski public: 282*b1cdbd2cSJim Jagielski TYPEINFO(); 283*b1cdbd2cSJim Jagielski 284*b1cdbd2cSJim Jagielski SdXMLControlShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 285*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 286*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 287*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 288*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 289*b1cdbd2cSJim Jagielski virtual ~SdXMLControlShapeContext(); 290*b1cdbd2cSJim Jagielski virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); 291*b1cdbd2cSJim Jagielski 292*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 293*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 294*b1cdbd2cSJim Jagielski }; 295*b1cdbd2cSJim Jagielski 296*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 297*b1cdbd2cSJim Jagielski // draw:connector context 298*b1cdbd2cSJim Jagielski 299*b1cdbd2cSJim Jagielski class SdXMLConnectorShapeContext : public SdXMLShapeContext 300*b1cdbd2cSJim Jagielski { 301*b1cdbd2cSJim Jagielski private: 302*b1cdbd2cSJim Jagielski ::com::sun::star::awt::Point maStart; 303*b1cdbd2cSJim Jagielski ::com::sun::star::awt::Point maEnd; 304*b1cdbd2cSJim Jagielski 305*b1cdbd2cSJim Jagielski sal_uInt16 mnType; 306*b1cdbd2cSJim Jagielski 307*b1cdbd2cSJim Jagielski rtl::OUString maStartShapeId; 308*b1cdbd2cSJim Jagielski sal_Int32 mnStartGlueId; 309*b1cdbd2cSJim Jagielski rtl::OUString maEndShapeId; 310*b1cdbd2cSJim Jagielski sal_Int32 mnEndGlueId; 311*b1cdbd2cSJim Jagielski 312*b1cdbd2cSJim Jagielski sal_Int32 mnDelta1; 313*b1cdbd2cSJim Jagielski sal_Int32 mnDelta2; 314*b1cdbd2cSJim Jagielski sal_Int32 mnDelta3; 315*b1cdbd2cSJim Jagielski 316*b1cdbd2cSJim Jagielski com::sun::star::uno::Any maPath; 317*b1cdbd2cSJim Jagielski 318*b1cdbd2cSJim Jagielski public: 319*b1cdbd2cSJim Jagielski TYPEINFO(); 320*b1cdbd2cSJim Jagielski 321*b1cdbd2cSJim Jagielski SdXMLConnectorShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 322*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 323*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 324*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 325*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 326*b1cdbd2cSJim Jagielski virtual ~SdXMLConnectorShapeContext(); 327*b1cdbd2cSJim Jagielski virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); 328*b1cdbd2cSJim Jagielski 329*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 330*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 331*b1cdbd2cSJim Jagielski }; 332*b1cdbd2cSJim Jagielski 333*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 334*b1cdbd2cSJim Jagielski // draw:measure context 335*b1cdbd2cSJim Jagielski 336*b1cdbd2cSJim Jagielski class SdXMLMeasureShapeContext : public SdXMLShapeContext 337*b1cdbd2cSJim Jagielski { 338*b1cdbd2cSJim Jagielski private: 339*b1cdbd2cSJim Jagielski ::com::sun::star::awt::Point maStart; 340*b1cdbd2cSJim Jagielski ::com::sun::star::awt::Point maEnd; 341*b1cdbd2cSJim Jagielski 342*b1cdbd2cSJim Jagielski public: 343*b1cdbd2cSJim Jagielski TYPEINFO(); 344*b1cdbd2cSJim Jagielski 345*b1cdbd2cSJim Jagielski SdXMLMeasureShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 346*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 347*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 348*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 349*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 350*b1cdbd2cSJim Jagielski virtual ~SdXMLMeasureShapeContext(); 351*b1cdbd2cSJim Jagielski virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); 352*b1cdbd2cSJim Jagielski virtual void EndElement(); 353*b1cdbd2cSJim Jagielski 354*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 355*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 356*b1cdbd2cSJim Jagielski }; 357*b1cdbd2cSJim Jagielski 358*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 359*b1cdbd2cSJim Jagielski // draw:page context 360*b1cdbd2cSJim Jagielski 361*b1cdbd2cSJim Jagielski class SdXMLPageShapeContext : public SdXMLShapeContext 362*b1cdbd2cSJim Jagielski { 363*b1cdbd2cSJim Jagielski private: 364*b1cdbd2cSJim Jagielski sal_Int32 mnPageNumber; 365*b1cdbd2cSJim Jagielski public: 366*b1cdbd2cSJim Jagielski TYPEINFO(); 367*b1cdbd2cSJim Jagielski 368*b1cdbd2cSJim Jagielski SdXMLPageShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 369*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 370*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 371*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 372*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 373*b1cdbd2cSJim Jagielski virtual ~SdXMLPageShapeContext(); 374*b1cdbd2cSJim Jagielski virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); 375*b1cdbd2cSJim Jagielski 376*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 377*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 378*b1cdbd2cSJim Jagielski }; 379*b1cdbd2cSJim Jagielski 380*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 381*b1cdbd2cSJim Jagielski // draw:caption context 382*b1cdbd2cSJim Jagielski 383*b1cdbd2cSJim Jagielski class SdXMLCaptionShapeContext : public SdXMLShapeContext 384*b1cdbd2cSJim Jagielski { 385*b1cdbd2cSJim Jagielski private: 386*b1cdbd2cSJim Jagielski com::sun::star::awt::Point maCaptionPoint; 387*b1cdbd2cSJim Jagielski sal_Int32 mnRadius; 388*b1cdbd2cSJim Jagielski 389*b1cdbd2cSJim Jagielski public: 390*b1cdbd2cSJim Jagielski TYPEINFO(); 391*b1cdbd2cSJim Jagielski 392*b1cdbd2cSJim Jagielski SdXMLCaptionShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 393*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 394*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 395*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 396*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 397*b1cdbd2cSJim Jagielski virtual ~SdXMLCaptionShapeContext(); 398*b1cdbd2cSJim Jagielski virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList); 399*b1cdbd2cSJim Jagielski 400*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 401*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 402*b1cdbd2cSJim Jagielski }; 403*b1cdbd2cSJim Jagielski 404*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 405*b1cdbd2cSJim Jagielski // office:image context 406*b1cdbd2cSJim Jagielski 407*b1cdbd2cSJim Jagielski class SdXMLGraphicObjectShapeContext : public SdXMLShapeContext 408*b1cdbd2cSJim Jagielski { 409*b1cdbd2cSJim Jagielski private: 410*b1cdbd2cSJim Jagielski ::rtl::OUString maURL; 411*b1cdbd2cSJim Jagielski ::com::sun::star::uno::Reference < ::com::sun::star::io::XOutputStream > mxBase64Stream; 412*b1cdbd2cSJim Jagielski 413*b1cdbd2cSJim Jagielski /// bitfield 414*b1cdbd2cSJim Jagielski bool mbLateAddToIdentifierMapper : 1; 415*b1cdbd2cSJim Jagielski 416*b1cdbd2cSJim Jagielski public: 417*b1cdbd2cSJim Jagielski TYPEINFO(); 418*b1cdbd2cSJim Jagielski 419*b1cdbd2cSJim Jagielski SdXMLGraphicObjectShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 420*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 421*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 422*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 423*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 424*b1cdbd2cSJim Jagielski virtual ~SdXMLGraphicObjectShapeContext(); 425*b1cdbd2cSJim Jagielski 426*b1cdbd2cSJim Jagielski virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); 427*b1cdbd2cSJim Jagielski virtual void EndElement(); 428*b1cdbd2cSJim Jagielski virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, 429*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); 430*b1cdbd2cSJim Jagielski 431*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 432*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 433*b1cdbd2cSJim Jagielski 434*b1cdbd2cSJim Jagielski /// support for LateAddToIdentifierMapper getLateAddToIdentifierMapper() const435*b1cdbd2cSJim Jagielski bool getLateAddToIdentifierMapper() const { return mbLateAddToIdentifierMapper; } setLateAddToIdentifierMapper(bool bNew)436*b1cdbd2cSJim Jagielski void setLateAddToIdentifierMapper(bool bNew) { mbLateAddToIdentifierMapper = bNew; } 437*b1cdbd2cSJim Jagielski }; 438*b1cdbd2cSJim Jagielski 439*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 440*b1cdbd2cSJim Jagielski // chart:chart context 441*b1cdbd2cSJim Jagielski 442*b1cdbd2cSJim Jagielski class SdXMLChartShapeContext : public SdXMLShapeContext 443*b1cdbd2cSJim Jagielski { 444*b1cdbd2cSJim Jagielski SvXMLImportContext* mpChartContext; 445*b1cdbd2cSJim Jagielski 446*b1cdbd2cSJim Jagielski public: 447*b1cdbd2cSJim Jagielski TYPEINFO(); 448*b1cdbd2cSJim Jagielski 449*b1cdbd2cSJim Jagielski SdXMLChartShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 450*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 451*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 452*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 453*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 454*b1cdbd2cSJim Jagielski virtual ~SdXMLChartShapeContext(); 455*b1cdbd2cSJim Jagielski 456*b1cdbd2cSJim Jagielski virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); 457*b1cdbd2cSJim Jagielski virtual void EndElement(); 458*b1cdbd2cSJim Jagielski virtual void Characters( const ::rtl::OUString& rChars ); 459*b1cdbd2cSJim Jagielski virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, 460*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); 461*b1cdbd2cSJim Jagielski }; 462*b1cdbd2cSJim Jagielski 463*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 464*b1cdbd2cSJim Jagielski // draw:object and draw:object_ole context 465*b1cdbd2cSJim Jagielski 466*b1cdbd2cSJim Jagielski class SdXMLObjectShapeContext : public SdXMLShapeContext 467*b1cdbd2cSJim Jagielski { 468*b1cdbd2cSJim Jagielski private: 469*b1cdbd2cSJim Jagielski rtl::OUString maCLSID; 470*b1cdbd2cSJim Jagielski rtl::OUString maHref; 471*b1cdbd2cSJim Jagielski 472*b1cdbd2cSJim Jagielski // #100592# 473*b1cdbd2cSJim Jagielski ::com::sun::star::uno::Reference < ::com::sun::star::io::XOutputStream > mxBase64Stream; 474*b1cdbd2cSJim Jagielski 475*b1cdbd2cSJim Jagielski public: 476*b1cdbd2cSJim Jagielski TYPEINFO(); 477*b1cdbd2cSJim Jagielski 478*b1cdbd2cSJim Jagielski SdXMLObjectShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 479*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 480*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 481*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 482*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 483*b1cdbd2cSJim Jagielski virtual ~SdXMLObjectShapeContext(); 484*b1cdbd2cSJim Jagielski 485*b1cdbd2cSJim Jagielski virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); 486*b1cdbd2cSJim Jagielski virtual void EndElement(); 487*b1cdbd2cSJim Jagielski 488*b1cdbd2cSJim Jagielski // #100592# 489*b1cdbd2cSJim Jagielski virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, 490*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); 491*b1cdbd2cSJim Jagielski 492*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 493*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 494*b1cdbd2cSJim Jagielski }; 495*b1cdbd2cSJim Jagielski 496*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 497*b1cdbd2cSJim Jagielski // draw:applet 498*b1cdbd2cSJim Jagielski 499*b1cdbd2cSJim Jagielski class SdXMLAppletShapeContext : public SdXMLShapeContext 500*b1cdbd2cSJim Jagielski { 501*b1cdbd2cSJim Jagielski private: 502*b1cdbd2cSJim Jagielski rtl::OUString maAppletName; 503*b1cdbd2cSJim Jagielski rtl::OUString maAppletCode; 504*b1cdbd2cSJim Jagielski rtl::OUString maHref; 505*b1cdbd2cSJim Jagielski sal_Bool mbIsScript; 506*b1cdbd2cSJim Jagielski 507*b1cdbd2cSJim Jagielski com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > maParams; 508*b1cdbd2cSJim Jagielski 509*b1cdbd2cSJim Jagielski public: 510*b1cdbd2cSJim Jagielski TYPEINFO(); 511*b1cdbd2cSJim Jagielski 512*b1cdbd2cSJim Jagielski SdXMLAppletShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 513*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 514*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 515*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 516*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 517*b1cdbd2cSJim Jagielski virtual ~SdXMLAppletShapeContext(); 518*b1cdbd2cSJim Jagielski 519*b1cdbd2cSJim Jagielski virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); 520*b1cdbd2cSJim Jagielski virtual void EndElement(); 521*b1cdbd2cSJim Jagielski 522*b1cdbd2cSJim Jagielski virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, 523*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); 524*b1cdbd2cSJim Jagielski 525*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 526*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 527*b1cdbd2cSJim Jagielski }; 528*b1cdbd2cSJim Jagielski 529*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 530*b1cdbd2cSJim Jagielski // draw:plugin 531*b1cdbd2cSJim Jagielski 532*b1cdbd2cSJim Jagielski class SdXMLPluginShapeContext : public SdXMLShapeContext 533*b1cdbd2cSJim Jagielski { 534*b1cdbd2cSJim Jagielski private: 535*b1cdbd2cSJim Jagielski rtl::OUString maMimeType; 536*b1cdbd2cSJim Jagielski rtl::OUString maHref; 537*b1cdbd2cSJim Jagielski bool mbMedia; 538*b1cdbd2cSJim Jagielski 539*b1cdbd2cSJim Jagielski com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > maParams; 540*b1cdbd2cSJim Jagielski 541*b1cdbd2cSJim Jagielski public: 542*b1cdbd2cSJim Jagielski TYPEINFO(); 543*b1cdbd2cSJim Jagielski 544*b1cdbd2cSJim Jagielski SdXMLPluginShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 545*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 546*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 547*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 548*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 549*b1cdbd2cSJim Jagielski virtual ~SdXMLPluginShapeContext(); 550*b1cdbd2cSJim Jagielski 551*b1cdbd2cSJim Jagielski virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); 552*b1cdbd2cSJim Jagielski virtual void EndElement(); 553*b1cdbd2cSJim Jagielski 554*b1cdbd2cSJim Jagielski virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, 555*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); 556*b1cdbd2cSJim Jagielski 557*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 558*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 559*b1cdbd2cSJim Jagielski }; 560*b1cdbd2cSJim Jagielski 561*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 562*b1cdbd2cSJim Jagielski // draw:floating-frame 563*b1cdbd2cSJim Jagielski 564*b1cdbd2cSJim Jagielski class SdXMLFloatingFrameShapeContext : public SdXMLShapeContext 565*b1cdbd2cSJim Jagielski { 566*b1cdbd2cSJim Jagielski private: 567*b1cdbd2cSJim Jagielski rtl::OUString maFrameName; 568*b1cdbd2cSJim Jagielski rtl::OUString maHref; 569*b1cdbd2cSJim Jagielski 570*b1cdbd2cSJim Jagielski public: 571*b1cdbd2cSJim Jagielski TYPEINFO(); 572*b1cdbd2cSJim Jagielski 573*b1cdbd2cSJim Jagielski SdXMLFloatingFrameShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 574*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 575*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 576*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 577*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 578*b1cdbd2cSJim Jagielski virtual ~SdXMLFloatingFrameShapeContext(); 579*b1cdbd2cSJim Jagielski 580*b1cdbd2cSJim Jagielski virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); 581*b1cdbd2cSJim Jagielski virtual void EndElement(); 582*b1cdbd2cSJim Jagielski 583*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 584*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 585*b1cdbd2cSJim Jagielski }; 586*b1cdbd2cSJim Jagielski 587*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 588*b1cdbd2cSJim Jagielski // draw:-frame 589*b1cdbd2cSJim Jagielski 590*b1cdbd2cSJim Jagielski class SdXMLFrameShapeContext : public SdXMLShapeContext, public multiImageImportHelper 591*b1cdbd2cSJim Jagielski { 592*b1cdbd2cSJim Jagielski private: 593*b1cdbd2cSJim Jagielski sal_Bool mbSupportsReplacement; 594*b1cdbd2cSJim Jagielski SvXMLImportContextRef mxImplContext; 595*b1cdbd2cSJim Jagielski SvXMLImportContextRef mxReplImplContext; 596*b1cdbd2cSJim Jagielski 597*b1cdbd2cSJim Jagielski protected: 598*b1cdbd2cSJim Jagielski /// helper to get the created xShape instance, needs to be overloaded 599*b1cdbd2cSJim Jagielski virtual rtl::OUString getGraphicURLFromImportContext(const SvXMLImportContext& rContext) const; 600*b1cdbd2cSJim Jagielski virtual void removeGraphicFromImportContext(const SvXMLImportContext& rContext) const; 601*b1cdbd2cSJim Jagielski 602*b1cdbd2cSJim Jagielski public: 603*b1cdbd2cSJim Jagielski TYPEINFO(); 604*b1cdbd2cSJim Jagielski 605*b1cdbd2cSJim Jagielski SdXMLFrameShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 606*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 607*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 608*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 609*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 610*b1cdbd2cSJim Jagielski virtual ~SdXMLFrameShapeContext(); 611*b1cdbd2cSJim Jagielski 612*b1cdbd2cSJim Jagielski virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, 613*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); 614*b1cdbd2cSJim Jagielski 615*b1cdbd2cSJim Jagielski virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); 616*b1cdbd2cSJim Jagielski virtual void EndElement(); 617*b1cdbd2cSJim Jagielski 618*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 619*b1cdbd2cSJim Jagielski }; 620*b1cdbd2cSJim Jagielski 621*b1cdbd2cSJim Jagielski class SdXMLCustomShapeContext : public SdXMLShapeContext 622*b1cdbd2cSJim Jagielski { 623*b1cdbd2cSJim Jagielski 624*b1cdbd2cSJim Jagielski protected : 625*b1cdbd2cSJim Jagielski 626*b1cdbd2cSJim Jagielski rtl::OUString maCustomShapeEngine; 627*b1cdbd2cSJim Jagielski rtl::OUString maCustomShapeData; 628*b1cdbd2cSJim Jagielski 629*b1cdbd2cSJim Jagielski std::vector< com::sun::star::beans::PropertyValue > maCustomShapeGeometry; 630*b1cdbd2cSJim Jagielski 631*b1cdbd2cSJim Jagielski public: 632*b1cdbd2cSJim Jagielski 633*b1cdbd2cSJim Jagielski TYPEINFO(); 634*b1cdbd2cSJim Jagielski 635*b1cdbd2cSJim Jagielski SdXMLCustomShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const rtl::OUString& rLocalName, 636*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 637*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes, 638*b1cdbd2cSJim Jagielski sal_Bool bTemporaryShape); 639*b1cdbd2cSJim Jagielski virtual ~SdXMLCustomShapeContext(); 640*b1cdbd2cSJim Jagielski 641*b1cdbd2cSJim Jagielski virtual void StartElement( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); 642*b1cdbd2cSJim Jagielski virtual void EndElement(); 643*b1cdbd2cSJim Jagielski 644*b1cdbd2cSJim Jagielski virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, 645*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); 646*b1cdbd2cSJim Jagielski 647*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 648*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 649*b1cdbd2cSJim Jagielski }; 650*b1cdbd2cSJim Jagielski 651*b1cdbd2cSJim Jagielski ////////////////////////////////////////////////////////////////////////////// 652*b1cdbd2cSJim Jagielski // draw:table 653*b1cdbd2cSJim Jagielski 654*b1cdbd2cSJim Jagielski class SdXMLTableShapeContext : public SdXMLShapeContext 655*b1cdbd2cSJim Jagielski { 656*b1cdbd2cSJim Jagielski public: 657*b1cdbd2cSJim Jagielski TYPEINFO(); 658*b1cdbd2cSJim Jagielski 659*b1cdbd2cSJim Jagielski SdXMLTableShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, 660*b1cdbd2cSJim Jagielski const rtl::OUString& rLocalName, 661*b1cdbd2cSJim Jagielski const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, 662*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes ); 663*b1cdbd2cSJim Jagielski virtual ~SdXMLTableShapeContext(); 664*b1cdbd2cSJim Jagielski 665*b1cdbd2cSJim Jagielski virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); 666*b1cdbd2cSJim Jagielski virtual void EndElement(); 667*b1cdbd2cSJim Jagielski 668*b1cdbd2cSJim Jagielski virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ); 669*b1cdbd2cSJim Jagielski 670*b1cdbd2cSJim Jagielski // this is called from the parent group for each unparsed attribute in the attribute list 671*b1cdbd2cSJim Jagielski virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); 672*b1cdbd2cSJim Jagielski 673*b1cdbd2cSJim Jagielski private: 674*b1cdbd2cSJim Jagielski SvXMLImportContextRef mxTableImportContext; 675*b1cdbd2cSJim Jagielski rtl::OUString msTemplateStyleName; 676*b1cdbd2cSJim Jagielski sal_Bool maTemplateStylesUsed[6]; 677*b1cdbd2cSJim Jagielski }; 678*b1cdbd2cSJim Jagielski 679*b1cdbd2cSJim Jagielski #endif // _XIMPSHAPE_HXX 680