merge the formfield patch from ooo-build
[ooovba.git] / xmloff / source / draw / ximpshap.hxx
blob65616bfdf286e8e022b6b34cfaad6f8b325a575d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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"
46 #include <vector>
47 #include <xmloff/shapeimport.hxx>
49 //////////////////////////////////////////////////////////////////////////////
50 // common shape context
52 class SdXMLShapeContext : public SvXMLShapeContext
54 protected:
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;
73 sal_uInt16 mnClass;
74 sal_Bool mbIsPlaceholder;
75 bool mbClearDefaultAttributes;
76 sal_Bool mbIsUserTransformed;
77 sal_Int32 mnZOrder;
78 rtl::OUString maShapeId;
79 rtl::OUString maLayerName;
81 // #i68101#
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 );
91 void SetLayer();
92 void SetThumbnail();
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;
105 public:
106 TYPEINFO();
108 SdXMLShapeContext( SvXMLImport& rImport,
109 sal_uInt16 nPrfx,
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 //////////////////////////////////////////////////////////////////////////////
127 // draw:rect context
129 class SdXMLRectShapeContext : public SdXMLShapeContext
131 sal_Int32 mnRadius;
133 public:
134 TYPEINFO();
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 //////////////////////////////////////////////////////////////////////////////
149 // draw:line context
151 class SdXMLLineShapeContext : public SdXMLShapeContext
153 sal_Int32 mnX1;
154 sal_Int32 mnY1;
155 sal_Int32 mnX2;
156 sal_Int32 mnY2;
158 public:
159 TYPEINFO();
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
178 sal_Int32 mnCX;
179 sal_Int32 mnCY;
180 sal_Int32 mnRX;
181 sal_Int32 mnRY;
183 USHORT meKind;
184 sal_Int32 mnStartAngle;
185 sal_Int32 mnEndAngle;
186 public:
187 TYPEINFO();
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;
208 sal_Bool mbClosed;
210 public:
211 TYPEINFO();
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 //////////////////////////////////////////////////////////////////////////////
225 // draw:path context
227 class SdXMLPathShapeContext : public SdXMLShapeContext
229 rtl::OUString maD;
230 rtl::OUString maViewBox;
231 sal_Bool mbClosed;
233 public:
234 TYPEINFO();
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
253 sal_Int32 mnRadius;
255 public:
256 TYPEINFO();
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
275 private:
276 rtl::OUString maFormId;
278 public:
279 TYPEINFO();
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
298 private:
299 ::com::sun::star::awt::Point maStart;
300 ::com::sun::star::awt::Point maEnd;
302 USHORT mnType;
304 rtl::OUString maStartShapeId;
305 sal_Int32 mnStartGlueId;
306 rtl::OUString maEndShapeId;
307 sal_Int32 mnEndGlueId;
309 sal_Int32 mnDelta1;
310 sal_Int32 mnDelta2;
311 sal_Int32 mnDelta3;
313 com::sun::star::uno::Any maPath;
315 public:
316 TYPEINFO();
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
335 private:
336 ::com::sun::star::awt::Point maStart;
337 ::com::sun::star::awt::Point maEnd;
339 public:
340 TYPEINFO();
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 //////////////////////////////////////////////////////////////////////////////
356 // draw:page context
358 class SdXMLPageShapeContext : public SdXMLShapeContext
360 private:
361 sal_Int32 mnPageNumber;
362 public:
363 TYPEINFO();
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
382 private:
383 com::sun::star::awt::Point maCaptionPoint;
384 sal_Int32 mnRadius;
386 public:
387 TYPEINFO();
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
406 private:
407 ::rtl::OUString maURL;
408 ::com::sun::star::uno::Reference < ::com::sun::star::io::XOutputStream > mxBase64Stream;
410 public:
411 TYPEINFO();
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;
436 public:
437 TYPEINFO();
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
458 private:
459 rtl::OUString maCLSID;
460 rtl::OUString maHref;
462 // #100592#
463 ::com::sun::star::uno::Reference < ::com::sun::star::io::XOutputStream > mxBase64Stream;
465 public:
466 TYPEINFO();
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();
478 // #100592#
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 //////////////////////////////////////////////////////////////////////////////
487 // draw:applet
489 class SdXMLAppletShapeContext : public SdXMLShapeContext
491 private:
492 rtl::OUString maAppletName;
493 rtl::OUString maAppletCode;
494 rtl::OUString maHref;
495 sal_Bool mbIsScript;
497 com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > maParams;
499 public:
500 TYPEINFO();
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 //////////////////////////////////////////////////////////////////////////////
520 // draw:plugin
522 class SdXMLPluginShapeContext : public SdXMLShapeContext
524 private:
525 rtl::OUString maMimeType;
526 rtl::OUString maHref;
527 bool mbMedia;
529 com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > maParams;
531 public:
532 TYPEINFO();
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
556 private:
557 rtl::OUString maFrameName;
558 rtl::OUString maHref;
560 public:
561 TYPEINFO();
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 //////////////////////////////////////////////////////////////////////////////
578 // draw:-frame
580 class SdXMLFrameShapeContext : public SdXMLShapeContext
582 private:
583 sal_Bool mbSupportsReplacement;
584 SvXMLImportContextRef mxImplContext;
585 SvXMLImportContextRef mxReplImplContext;
587 public:
588 TYPEINFO();
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
609 protected :
611 rtl::OUString maCustomShapeEngine;
612 rtl::OUString maCustomShapeData;
614 std::vector< com::sun::star::beans::PropertyValue > maCustomShapeGeometry;
616 public:
618 TYPEINFO();
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 //////////////////////////////////////////////////////////////////////////////
637 // draw:table
639 class SdXMLTableShapeContext : public SdXMLShapeContext
641 public:
642 TYPEINFO();
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 );
658 private:
659 SvXMLImportContextRef mxTableImportContext;
660 rtl::OUString msTemplateStyleName;
661 sal_Bool maTemplateStylesUsed[6];
664 #endif // _XIMPSHAPE_HXX