1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ximpshap.hxx,v $
10 * $Revision: 1.48.2.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _XIMPSHAPE_HXX
32 #define _XIMPSHAPE_HXX
34 #include <com/sun/star/io/XOutputStream.hpp>
35 #include <com/sun/star/document/XActionLockable.hpp>
36 #include <com/sun/star/container/XIdentifierContainer.hpp>
37 #include <xmloff/xmlictxt.hxx>
38 #include "sdxmlimp_impl.hxx"
39 #include <xmloff/nmspmap.hxx>
40 #include <com/sun/star/drawing/XShapes.hpp>
41 #include <com/sun/star/text/XTextCursor.hpp>
42 #include <com/sun/star/awt/Point.hpp>
43 #include <tools/rtti.hxx>
44 #include "xexptran.hxx"
47 #include <xmloff/shapeimport.hxx>
49 //////////////////////////////////////////////////////////////////////////////
50 // common shape context
52 class SdXMLShapeContext
: public SvXMLShapeContext
55 // the shape group this object should be created inside
56 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
> mxShapes
;
57 com::sun::star::uno::Reference
< com::sun::star::text::XTextCursor
> mxCursor
;
58 com::sun::star::uno::Reference
< com::sun::star::text::XTextCursor
> mxOldCursor
;
59 com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
> mxAttrList
;
60 com::sun::star::uno::Reference
< com::sun::star::container::XIdentifierContainer
> mxGluePoints
;
61 com::sun::star::uno::Reference
< com::sun::star::document::XActionLockable
> mxLockable
;
63 rtl::OUString maDrawStyleName
;
64 rtl::OUString maTextStyleName
;
65 rtl::OUString maPresentationClass
;
66 rtl::OUString maShapeName
;
67 rtl::OUString maThumbnailURL
;
69 /// whether to restore list context (#91964#)
70 bool mbListContextPushed
;
72 sal_uInt16 mnStyleFamily
;
74 sal_Bool mbIsPlaceholder
;
75 bool mbClearDefaultAttributes
;
76 sal_Bool mbIsUserTransformed
;
78 rtl::OUString maShapeId
;
79 rtl::OUString maLayerName
;
82 rtl::OUString maShapeTitle
;
83 rtl::OUString maShapeDescription
;
85 SdXMLImExTransform2D mnTransform
;
86 com::sun::star::awt::Size maSize
;
87 com::sun::star::awt::Point maPosition
;
89 /** if bSupportsStyle is false, auto styles will be set but not a style */
90 void SetStyle( bool bSupportsStyle
= true );
94 void AddShape(com::sun::star::uno::Reference
< com::sun::star::drawing::XShape
>& xShape
);
95 void AddShape(const char* pServiceName
);
96 void SetTransformation();
98 SvXMLImport
& GetImport() { return SvXMLImportContext::GetImport(); }
99 const SvXMLImport
& GetImport() const { return SvXMLImportContext::GetImport(); }
101 void addGluePoint( const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
103 sal_Bool
isPresentationShape() const;
108 SdXMLShapeContext( SvXMLImport
& rImport
,
110 const rtl::OUString
& rLocalName
,
111 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
112 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
113 sal_Bool bTemporaryShape
);
114 virtual ~SdXMLShapeContext();
116 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
117 virtual void EndElement();
119 virtual SvXMLImportContext
* CreateChildContext( USHORT nPrefix
, const ::rtl::OUString
& rLocalName
,
120 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
122 // this is called from the parent group for each unparsed attribute in the attribute list
123 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
126 //////////////////////////////////////////////////////////////////////////////
129 class SdXMLRectShapeContext
: public SdXMLShapeContext
136 SdXMLRectShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
137 const rtl::OUString
& rLocalName
,
138 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
139 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
140 sal_Bool bTemporaryShape
);
141 virtual ~SdXMLRectShapeContext();
142 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
144 // this is called from the parent group for each unparsed attribute in the attribute list
145 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
148 //////////////////////////////////////////////////////////////////////////////
151 class SdXMLLineShapeContext
: public SdXMLShapeContext
161 SdXMLLineShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
162 const rtl::OUString
& rLocalName
,
163 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
164 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
165 sal_Bool bTemporaryShape
);
166 virtual ~SdXMLLineShapeContext();
167 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
169 // this is called from the parent group for each unparsed attribute in the attribute list
170 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
173 //////////////////////////////////////////////////////////////////////////////
174 // draw:ellipse and draw:circle context
176 class SdXMLEllipseShapeContext
: public SdXMLShapeContext
184 sal_Int32 mnStartAngle
;
185 sal_Int32 mnEndAngle
;
189 SdXMLEllipseShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
190 const rtl::OUString
& rLocalName
,
191 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
192 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
193 sal_Bool bTemporaryShape
);
194 virtual ~SdXMLEllipseShapeContext();
195 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
197 // this is called from the parent group for each unparsed attribute in the attribute list
198 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
201 //////////////////////////////////////////////////////////////////////////////
202 // draw:polyline and draw:polygon context
204 class SdXMLPolygonShapeContext
: public SdXMLShapeContext
206 rtl::OUString maPoints
;
207 rtl::OUString maViewBox
;
213 SdXMLPolygonShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
214 const rtl::OUString
& rLocalName
,
215 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
216 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
, sal_Bool bClosed
, sal_Bool bTemporaryShape
);
217 virtual ~SdXMLPolygonShapeContext();
218 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
220 // this is called from the parent group for each unparsed attribute in the attribute list
221 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
224 //////////////////////////////////////////////////////////////////////////////
227 class SdXMLPathShapeContext
: public SdXMLShapeContext
230 rtl::OUString maViewBox
;
236 SdXMLPathShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
237 const rtl::OUString
& rLocalName
,
238 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
239 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
240 sal_Bool bTemporaryShape
);
241 virtual ~SdXMLPathShapeContext();
242 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
244 // this is called from the parent group for each unparsed attribute in the attribute list
245 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
248 //////////////////////////////////////////////////////////////////////////////
249 // draw:text-box context
251 class SdXMLTextBoxShapeContext
: public SdXMLShapeContext
258 SdXMLTextBoxShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
259 const rtl::OUString
& rLocalName
,
260 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
261 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
262 sal_Bool bTemporaryShape
);
263 virtual ~SdXMLTextBoxShapeContext();
264 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
266 // this is called from the parent group for each unparsed attribute in the attribute list
267 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
270 //////////////////////////////////////////////////////////////////////////////
271 // draw:control context
273 class SdXMLControlShapeContext
: public SdXMLShapeContext
276 rtl::OUString maFormId
;
281 SdXMLControlShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
282 const rtl::OUString
& rLocalName
,
283 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
284 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
285 sal_Bool bTemporaryShape
);
286 virtual ~SdXMLControlShapeContext();
287 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
289 // this is called from the parent group for each unparsed attribute in the attribute list
290 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
293 //////////////////////////////////////////////////////////////////////////////
294 // draw:connector context
296 class SdXMLConnectorShapeContext
: public SdXMLShapeContext
299 ::com::sun::star::awt::Point maStart
;
300 ::com::sun::star::awt::Point maEnd
;
304 rtl::OUString maStartShapeId
;
305 sal_Int32 mnStartGlueId
;
306 rtl::OUString maEndShapeId
;
307 sal_Int32 mnEndGlueId
;
313 com::sun::star::uno::Any maPath
;
318 SdXMLConnectorShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
319 const rtl::OUString
& rLocalName
,
320 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
321 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
322 sal_Bool bTemporaryShape
);
323 virtual ~SdXMLConnectorShapeContext();
324 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
326 // this is called from the parent group for each unparsed attribute in the attribute list
327 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
330 //////////////////////////////////////////////////////////////////////////////
331 // draw:measure context
333 class SdXMLMeasureShapeContext
: public SdXMLShapeContext
336 ::com::sun::star::awt::Point maStart
;
337 ::com::sun::star::awt::Point maEnd
;
342 SdXMLMeasureShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
343 const rtl::OUString
& rLocalName
,
344 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
345 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
346 sal_Bool bTemporaryShape
);
347 virtual ~SdXMLMeasureShapeContext();
348 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
349 virtual void EndElement();
351 // this is called from the parent group for each unparsed attribute in the attribute list
352 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
355 //////////////////////////////////////////////////////////////////////////////
358 class SdXMLPageShapeContext
: public SdXMLShapeContext
361 sal_Int32 mnPageNumber
;
365 SdXMLPageShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
366 const rtl::OUString
& rLocalName
,
367 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
368 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
369 sal_Bool bTemporaryShape
);
370 virtual ~SdXMLPageShapeContext();
371 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
373 // this is called from the parent group for each unparsed attribute in the attribute list
374 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
377 //////////////////////////////////////////////////////////////////////////////
378 // draw:caption context
380 class SdXMLCaptionShapeContext
: public SdXMLShapeContext
383 com::sun::star::awt::Point maCaptionPoint
;
389 SdXMLCaptionShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
390 const rtl::OUString
& rLocalName
,
391 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
392 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
393 sal_Bool bTemporaryShape
);
394 virtual ~SdXMLCaptionShapeContext();
395 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
397 // this is called from the parent group for each unparsed attribute in the attribute list
398 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
401 //////////////////////////////////////////////////////////////////////////////
402 // office:image context
404 class SdXMLGraphicObjectShapeContext
: public SdXMLShapeContext
407 ::rtl::OUString maURL
;
408 ::com::sun::star::uno::Reference
< ::com::sun::star::io::XOutputStream
> mxBase64Stream
;
413 SdXMLGraphicObjectShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
414 const rtl::OUString
& rLocalName
,
415 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
416 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
417 sal_Bool bTemporaryShape
);
418 virtual ~SdXMLGraphicObjectShapeContext();
420 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
421 virtual void EndElement();
422 virtual SvXMLImportContext
* CreateChildContext( USHORT nPrefix
, const ::rtl::OUString
& rLocalName
,
423 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
425 // this is called from the parent group for each unparsed attribute in the attribute list
426 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
429 //////////////////////////////////////////////////////////////////////////////
430 // chart:chart context
432 class SdXMLChartShapeContext
: public SdXMLShapeContext
434 SvXMLImportContext
* mpChartContext
;
439 SdXMLChartShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
440 const rtl::OUString
& rLocalName
,
441 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
442 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
443 sal_Bool bTemporaryShape
);
444 virtual ~SdXMLChartShapeContext();
446 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
447 virtual void EndElement();
448 virtual void Characters( const ::rtl::OUString
& rChars
);
449 virtual SvXMLImportContext
* CreateChildContext( USHORT nPrefix
, const ::rtl::OUString
& rLocalName
,
450 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
453 //////////////////////////////////////////////////////////////////////////////
454 // draw:object and draw:object_ole context
456 class SdXMLObjectShapeContext
: public SdXMLShapeContext
459 rtl::OUString maCLSID
;
460 rtl::OUString maHref
;
463 ::com::sun::star::uno::Reference
< ::com::sun::star::io::XOutputStream
> mxBase64Stream
;
468 SdXMLObjectShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
469 const rtl::OUString
& rLocalName
,
470 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
471 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
472 sal_Bool bTemporaryShape
);
473 virtual ~SdXMLObjectShapeContext();
475 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
476 virtual void EndElement();
479 virtual SvXMLImportContext
* CreateChildContext( USHORT nPrefix
, const ::rtl::OUString
& rLocalName
,
480 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
482 // this is called from the parent group for each unparsed attribute in the attribute list
483 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
486 //////////////////////////////////////////////////////////////////////////////
489 class SdXMLAppletShapeContext
: public SdXMLShapeContext
492 rtl::OUString maAppletName
;
493 rtl::OUString maAppletCode
;
494 rtl::OUString maHref
;
497 com::sun::star::uno::Sequence
< com::sun::star::beans::PropertyValue
> maParams
;
502 SdXMLAppletShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
503 const rtl::OUString
& rLocalName
,
504 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
505 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
506 sal_Bool bTemporaryShape
);
507 virtual ~SdXMLAppletShapeContext();
509 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
510 virtual void EndElement();
512 virtual SvXMLImportContext
* CreateChildContext( USHORT nPrefix
, const ::rtl::OUString
& rLocalName
,
513 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
515 // this is called from the parent group for each unparsed attribute in the attribute list
516 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
519 //////////////////////////////////////////////////////////////////////////////
522 class SdXMLPluginShapeContext
: public SdXMLShapeContext
525 rtl::OUString maMimeType
;
526 rtl::OUString maHref
;
529 com::sun::star::uno::Sequence
< com::sun::star::beans::PropertyValue
> maParams
;
534 SdXMLPluginShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
535 const rtl::OUString
& rLocalName
,
536 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
537 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
538 sal_Bool bTemporaryShape
);
539 virtual ~SdXMLPluginShapeContext();
541 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
542 virtual void EndElement();
544 virtual SvXMLImportContext
* CreateChildContext( USHORT nPrefix
, const ::rtl::OUString
& rLocalName
,
545 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
547 // this is called from the parent group for each unparsed attribute in the attribute list
548 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
551 //////////////////////////////////////////////////////////////////////////////
552 // draw:floating-frame
554 class SdXMLFloatingFrameShapeContext
: public SdXMLShapeContext
557 rtl::OUString maFrameName
;
558 rtl::OUString maHref
;
563 SdXMLFloatingFrameShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
564 const rtl::OUString
& rLocalName
,
565 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
566 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
567 sal_Bool bTemporaryShape
);
568 virtual ~SdXMLFloatingFrameShapeContext();
570 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
571 virtual void EndElement();
573 // this is called from the parent group for each unparsed attribute in the attribute list
574 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
577 //////////////////////////////////////////////////////////////////////////////
580 class SdXMLFrameShapeContext
: public SdXMLShapeContext
583 sal_Bool mbSupportsReplacement
;
584 SvXMLImportContextRef mxImplContext
;
585 SvXMLImportContextRef mxReplImplContext
;
590 SdXMLFrameShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
591 const rtl::OUString
& rLocalName
,
592 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
593 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
594 sal_Bool bTemporaryShape
);
595 virtual ~SdXMLFrameShapeContext();
597 virtual SvXMLImportContext
* CreateChildContext( USHORT nPrefix
, const ::rtl::OUString
& rLocalName
,
598 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
600 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
601 virtual void EndElement();
603 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
606 class SdXMLCustomShapeContext
: public SdXMLShapeContext
611 rtl::OUString maCustomShapeEngine
;
612 rtl::OUString maCustomShapeData
;
614 std::vector
< com::sun::star::beans::PropertyValue
> maCustomShapeGeometry
;
620 SdXMLCustomShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
, const rtl::OUString
& rLocalName
,
621 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
622 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
623 sal_Bool bTemporaryShape
);
624 virtual ~SdXMLCustomShapeContext();
626 virtual void StartElement( const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
627 virtual void EndElement();
629 virtual SvXMLImportContext
* CreateChildContext( USHORT nPrefix
, const ::rtl::OUString
& rLocalName
,
630 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
632 // this is called from the parent group for each unparsed attribute in the attribute list
633 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
636 //////////////////////////////////////////////////////////////////////////////
639 class SdXMLTableShapeContext
: public SdXMLShapeContext
644 SdXMLTableShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
645 const rtl::OUString
& rLocalName
,
646 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
647 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
);
648 virtual ~SdXMLTableShapeContext();
650 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
651 virtual void EndElement();
653 virtual SvXMLImportContext
* CreateChildContext( USHORT nPrefix
, const ::rtl::OUString
& rLocalName
, const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
655 // this is called from the parent group for each unparsed attribute in the attribute list
656 virtual void processAttribute( sal_uInt16 nPrefix
, const ::rtl::OUString
& rLocalName
, const ::rtl::OUString
& rValue
);
659 SvXMLImportContextRef mxTableImportContext
;
660 rtl::OUString msTemplateStyleName
;
661 sal_Bool maTemplateStylesUsed
[6];
664 #endif // _XIMPSHAPE_HXX