1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_XMLOFF_SOURCE_DRAW_XIMPSHAP_HXX
21 #define INCLUDED_XMLOFF_SOURCE_DRAW_XIMPSHAP_HXX
23 #include <com/sun/star/io/XOutputStream.hpp>
24 #include <com/sun/star/document/XActionLockable.hpp>
25 #include <com/sun/star/container/XIdentifierContainer.hpp>
26 #include <xmloff/xmlictxt.hxx>
27 #include "sdxmlimp_impl.hxx"
28 #include <xmloff/nmspmap.hxx>
29 #include <com/sun/star/drawing/XShapes.hpp>
30 #include <com/sun/star/text/XTextCursor.hpp>
31 #include <com/sun/star/awt/Point.hpp>
32 #include <tools/rtti.hxx>
33 #include "xexptran.hxx"
35 #include <xmloff/shapeimport.hxx>
36 #include <xmloff/xmlmultiimagehelper.hxx>
37 #include <basegfx/matrix/b2dhommatrix.hxx>
39 // common shape context
41 class SdXMLShapeContext
: public SvXMLShapeContext
44 // the shape group this object should be created inside
45 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
> mxShapes
;
46 com::sun::star::uno::Reference
< com::sun::star::text::XTextCursor
> mxCursor
;
47 com::sun::star::uno::Reference
< com::sun::star::text::XTextCursor
> mxOldCursor
;
48 com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
> mxAttrList
;
49 com::sun::star::uno::Reference
< com::sun::star::container::XIdentifierContainer
> mxGluePoints
;
50 com::sun::star::uno::Reference
< com::sun::star::document::XActionLockable
> mxLockable
;
52 OUString maDrawStyleName
;
53 OUString maTextStyleName
;
54 OUString maPresentationClass
;
56 OUString maThumbnailURL
;
58 /// whether to restore list context (#91964#)
59 bool mbListContextPushed
;
61 sal_uInt16 mnStyleFamily
;
64 bool mbClearDefaultAttributes
;
65 bool mbIsUserTransformed
;
71 OUString maShapeTitle
;
72 OUString maShapeDescription
;
74 SdXMLImExTransform2D mnTransform
;
75 com::sun::star::awt::Size maSize
;
77 sal_Int16 mnRelHeight
;
78 com::sun::star::awt::Point maPosition
;
79 basegfx::B2DHomMatrix maUsedTransformation
;
84 bool mbTextBox
; ///< If the text of this shape is handled by a Writer TextFrame.
86 /** if bSupportsStyle is false, auto styles will be set but not a style */
87 void SetStyle( bool bSupportsStyle
= true );
91 void AddShape(com::sun::star::uno::Reference
< com::sun::star::drawing::XShape
>& xShape
);
92 void AddShape(OUString
const & serviceName
);
93 void SetTransformation();
95 SvXMLImport
& GetImport() { return SvXMLImportContext::GetImport(); }
96 const SvXMLImport
& GetImport() const { return SvXMLImportContext::GetImport(); }
98 void addGluePoint( const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
100 bool isPresentationShape() const;
105 SdXMLShapeContext( SvXMLImport
& rImport
,
107 const OUString
& rLocalName
,
108 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
109 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
110 bool bTemporaryShape
);
111 virtual ~SdXMLShapeContext();
113 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
114 virtual void EndElement() SAL_OVERRIDE
;
116 virtual SvXMLImportContext
* CreateChildContext( sal_uInt16 nPrefix
, const OUString
& rLocalName
,
117 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
119 // this is called from the parent group for each unparsed attribute in the attribute list
120 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
);
122 // allow to copy evtl. useful data from another temporary import context, e.g. used to
123 // support multiple images
124 virtual void onDemandRescueUsefulDataFromTemporary( const SvXMLImportContext
& rCandidate
) SAL_OVERRIDE
;
129 class SdXMLRectShapeContext
: public SdXMLShapeContext
136 SdXMLRectShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
137 const 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 bool bTemporaryShape
);
141 virtual ~SdXMLRectShapeContext();
142 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
144 // this is called from the parent group for each unparsed attribute in the attribute list
145 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
150 class SdXMLLineShapeContext
: public SdXMLShapeContext
160 SdXMLLineShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
161 const OUString
& rLocalName
,
162 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
163 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
164 bool bTemporaryShape
);
165 virtual ~SdXMLLineShapeContext();
166 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
168 // this is called from the parent group for each unparsed attribute in the attribute list
169 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
172 // draw:ellipse and draw:circle context
174 class SdXMLEllipseShapeContext
: public SdXMLShapeContext
182 sal_Int32 mnStartAngle
;
183 sal_Int32 mnEndAngle
;
187 SdXMLEllipseShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
188 const OUString
& rLocalName
,
189 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
190 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
191 bool bTemporaryShape
);
192 virtual ~SdXMLEllipseShapeContext();
193 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
195 // this is called from the parent group for each unparsed attribute in the attribute list
196 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
199 // draw:polyline and draw:polygon context
201 class SdXMLPolygonShapeContext
: public SdXMLShapeContext
210 SdXMLPolygonShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
211 const OUString
& rLocalName
,
212 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
213 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
, bool bClosed
, bool bTemporaryShape
);
214 virtual ~SdXMLPolygonShapeContext();
215 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
217 // this is called from the parent group for each unparsed attribute in the attribute list
218 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
223 class SdXMLPathShapeContext
: public SdXMLShapeContext
231 SdXMLPathShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
232 const OUString
& rLocalName
,
233 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
234 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
235 bool bTemporaryShape
);
236 virtual ~SdXMLPathShapeContext();
237 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
239 // this is called from the parent group for each unparsed attribute in the attribute list
240 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
243 // draw:text-box context
245 class SdXMLTextBoxShapeContext
: public SdXMLShapeContext
252 SdXMLTextBoxShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
253 const OUString
& rLocalName
,
254 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
255 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
256 bool bTemporaryShape
);
257 virtual ~SdXMLTextBoxShapeContext();
258 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
260 // this is called from the parent group for each unparsed attribute in the attribute list
261 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
264 // draw:control context
266 class SdXMLControlShapeContext
: public SdXMLShapeContext
274 SdXMLControlShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
275 const OUString
& rLocalName
,
276 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
277 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
278 bool bTemporaryShape
);
279 virtual ~SdXMLControlShapeContext();
280 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
282 // this is called from the parent group for each unparsed attribute in the attribute list
283 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
286 // draw:connector context
288 class SdXMLConnectorShapeContext
: public SdXMLShapeContext
291 ::com::sun::star::awt::Point maStart
;
292 ::com::sun::star::awt::Point maEnd
;
296 OUString maStartShapeId
;
297 sal_Int32 mnStartGlueId
;
298 OUString maEndShapeId
;
299 sal_Int32 mnEndGlueId
;
305 com::sun::star::uno::Any maPath
;
310 SdXMLConnectorShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
311 const OUString
& rLocalName
,
312 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
313 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
314 bool bTemporaryShape
);
315 virtual ~SdXMLConnectorShapeContext();
316 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
318 // this is called from the parent group for each unparsed attribute in the attribute list
319 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
322 // draw:measure context
324 class SdXMLMeasureShapeContext
: public SdXMLShapeContext
327 ::com::sun::star::awt::Point maStart
;
328 ::com::sun::star::awt::Point maEnd
;
333 SdXMLMeasureShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
334 const OUString
& rLocalName
,
335 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
336 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
337 bool bTemporaryShape
);
338 virtual ~SdXMLMeasureShapeContext();
339 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
340 virtual void EndElement() SAL_OVERRIDE
;
342 // this is called from the parent group for each unparsed attribute in the attribute list
343 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
348 class SdXMLPageShapeContext
: public SdXMLShapeContext
351 sal_Int32 mnPageNumber
;
355 SdXMLPageShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
356 const OUString
& rLocalName
,
357 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
358 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
359 bool bTemporaryShape
);
360 virtual ~SdXMLPageShapeContext();
361 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
363 // this is called from the parent group for each unparsed attribute in the attribute list
364 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
367 // draw:caption context
369 class SdXMLCaptionShapeContext
: public SdXMLShapeContext
372 com::sun::star::awt::Point maCaptionPoint
;
378 SdXMLCaptionShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
379 const OUString
& rLocalName
,
380 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
381 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
382 bool bTemporaryShape
);
383 virtual ~SdXMLCaptionShapeContext();
384 virtual void StartElement(const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
386 // this is called from the parent group for each unparsed attribute in the attribute list
387 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
390 // office:image context
392 class SdXMLGraphicObjectShapeContext
: public SdXMLShapeContext
396 ::com::sun::star::uno::Reference
< ::com::sun::star::io::XOutputStream
> mxBase64Stream
;
401 SdXMLGraphicObjectShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
402 const OUString
& rLocalName
,
403 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
404 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
405 bool bTemporaryShape
);
406 virtual ~SdXMLGraphicObjectShapeContext();
408 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
409 virtual void EndElement() SAL_OVERRIDE
;
410 virtual SvXMLImportContext
* CreateChildContext( sal_uInt16 nPrefix
, const OUString
& rLocalName
,
411 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
413 // this is called from the parent group for each unparsed attribute in the attribute list
414 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
417 // chart:chart context
419 class SdXMLChartShapeContext
: public SdXMLShapeContext
421 SvXMLImportContext
* mpChartContext
;
426 SdXMLChartShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
427 const OUString
& rLocalName
,
428 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
429 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
430 bool bTemporaryShape
);
431 virtual ~SdXMLChartShapeContext();
433 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
434 virtual void EndElement() SAL_OVERRIDE
;
435 virtual void Characters( const OUString
& rChars
) SAL_OVERRIDE
;
436 virtual SvXMLImportContext
* CreateChildContext( sal_uInt16 nPrefix
, const OUString
& rLocalName
,
437 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
440 // draw:object and draw:object_ole context
442 class SdXMLObjectShapeContext
: public SdXMLShapeContext
449 ::com::sun::star::uno::Reference
< ::com::sun::star::io::XOutputStream
> mxBase64Stream
;
454 SdXMLObjectShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
455 const OUString
& rLocalName
,
456 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
457 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
458 bool bTemporaryShape
);
459 virtual ~SdXMLObjectShapeContext();
461 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
462 virtual void EndElement() SAL_OVERRIDE
;
465 virtual SvXMLImportContext
* CreateChildContext( sal_uInt16 nPrefix
, const OUString
& rLocalName
,
466 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
468 // this is called from the parent group for each unparsed attribute in the attribute list
469 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
474 class SdXMLAppletShapeContext
: public SdXMLShapeContext
477 OUString maAppletName
;
478 OUString maAppletCode
;
482 com::sun::star::uno::Sequence
< com::sun::star::beans::PropertyValue
> maParams
;
487 SdXMLAppletShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
488 const OUString
& rLocalName
,
489 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
490 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
491 bool bTemporaryShape
);
492 virtual ~SdXMLAppletShapeContext();
494 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
495 virtual void EndElement() SAL_OVERRIDE
;
497 virtual SvXMLImportContext
* CreateChildContext( sal_uInt16 nPrefix
, const OUString
& rLocalName
,
498 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
500 // this is called from the parent group for each unparsed attribute in the attribute list
501 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
506 class SdXMLPluginShapeContext
: public SdXMLShapeContext
513 com::sun::star::uno::Sequence
< com::sun::star::beans::PropertyValue
> maParams
;
518 SdXMLPluginShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
519 const OUString
& rLocalName
,
520 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
521 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
522 bool bTemporaryShape
);
523 virtual ~SdXMLPluginShapeContext();
525 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
526 virtual void EndElement() SAL_OVERRIDE
;
528 virtual SvXMLImportContext
* CreateChildContext( sal_uInt16 nPrefix
, const OUString
& rLocalName
,
529 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
531 // this is called from the parent group for each unparsed attribute in the attribute list
532 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
534 const OUString
& getMimeType() const { return maMimeType
; }
537 // draw:floating-frame
539 class SdXMLFloatingFrameShapeContext
: public SdXMLShapeContext
542 OUString maFrameName
;
548 SdXMLFloatingFrameShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
549 const OUString
& rLocalName
,
550 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
551 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
552 bool bTemporaryShape
);
553 virtual ~SdXMLFloatingFrameShapeContext();
555 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
556 virtual void EndElement() SAL_OVERRIDE
;
558 // this is called from the parent group for each unparsed attribute in the attribute list
559 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
564 class SdXMLFrameShapeContext
: public SdXMLShapeContext
, public MultiImageImportHelper
567 bool mbSupportsReplacement
;
568 SvXMLImportContextRef mxImplContext
;
569 SvXMLImportContextRef mxReplImplContext
;
572 /// helper to get the created xShape instance, needs to be overridden
573 virtual OUString
getGraphicURLFromImportContext(const SvXMLImportContext
& rContext
) const SAL_OVERRIDE
;
574 virtual void removeGraphicFromImportContext(const SvXMLImportContext
& rContext
) const SAL_OVERRIDE
;
579 SdXMLFrameShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
580 const OUString
& rLocalName
,
581 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
582 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
583 bool bTemporaryShape
);
584 virtual ~SdXMLFrameShapeContext();
586 virtual SvXMLImportContext
* CreateChildContext( sal_uInt16 nPrefix
, const OUString
& rLocalName
,
587 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
589 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
590 virtual void EndElement() SAL_OVERRIDE
;
592 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
595 class SdXMLCustomShapeContext
: public SdXMLShapeContext
600 OUString maCustomShapeEngine
;
601 OUString maCustomShapeData
;
603 std::vector
< com::sun::star::beans::PropertyValue
> maCustomShapeGeometry
;
609 SdXMLCustomShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
, const OUString
& rLocalName
,
610 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
611 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
,
612 bool bTemporaryShape
);
613 virtual ~SdXMLCustomShapeContext();
615 virtual void StartElement( const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
616 virtual void EndElement() SAL_OVERRIDE
;
618 virtual SvXMLImportContext
* CreateChildContext( sal_uInt16 nPrefix
, const OUString
& rLocalName
,
619 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
621 // this is called from the parent group for each unparsed attribute in the attribute list
622 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
627 class SdXMLTableShapeContext
: public SdXMLShapeContext
632 SdXMLTableShapeContext( SvXMLImport
& rImport
, sal_uInt16 nPrfx
,
633 const OUString
& rLocalName
,
634 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
,
635 com::sun::star::uno::Reference
< com::sun::star::drawing::XShapes
>& rShapes
);
636 virtual ~SdXMLTableShapeContext();
638 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
639 virtual void EndElement() SAL_OVERRIDE
;
641 virtual SvXMLImportContext
* CreateChildContext( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
643 // this is called from the parent group for each unparsed attribute in the attribute list
644 virtual void processAttribute( sal_uInt16 nPrefix
, const OUString
& rLocalName
, const OUString
& rValue
) SAL_OVERRIDE
;
647 SvXMLImportContextRef mxTableImportContext
;
648 OUString msTemplateStyleName
;
649 sal_Bool maTemplateStylesUsed
[6];
652 #endif // INCLUDED_XMLOFF_SOURCE_DRAW_XIMPSHAP_HXX
654 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */