Bump version to 24.04.3.4
[LibreOffice.git] / xmloff / source / draw / ximpshap.hxx
blob9a61f4b594de1a2f334517b01a2503a0f96134fd
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #pragma once
22 #include <com/sun/star/io/XOutputStream.hpp>
23 #include <com/sun/star/document/XActionLockable.hpp>
24 #include <com/sun/star/drawing/Alignment.hpp>
25 #include <com/sun/star/drawing/CircleKind.hpp>
26 #include <com/sun/star/drawing/ConnectorType.hpp>
27 #include <com/sun/star/drawing/EscapeDirection.hpp>
28 #include <com/sun/star/container/XIdentifierContainer.hpp>
29 #include <xmloff/xmlictxt.hxx>
30 #include <com/sun/star/drawing/XShapes.hpp>
31 #include <com/sun/star/text/XTextCursor.hpp>
32 #include <com/sun/star/awt/Point.hpp>
33 #include <xexptran.hxx>
34 #include <vector>
35 #include <xmloff/shapeimport.hxx>
36 #include <xmlmultiimagehelper.hxx>
37 #include <basegfx/matrix/b2dhommatrix.hxx>
39 template<typename EnumT> struct SvXMLEnumMapEntry;
41 // common shape context
43 class SdXMLShapeContext : public SvXMLShapeContext
45 protected:
46 // the shape group this object should be created inside
47 css::uno::Reference< css::drawing::XShapes > mxShapes;
48 css::uno::Reference< css::text::XTextCursor > mxCursor;
49 css::uno::Reference< css::text::XTextCursor > mxOldCursor;
50 css::uno::Reference< css::xml::sax::XFastAttributeList> mxAttrList;
51 css::uno::Reference< css::container::XIdentifierContainer > mxGluePoints;
52 css::uno::Reference< css::document::XActionLockable > mxLockable;
54 OUString maDrawStyleName;
55 OUString maTextStyleName;
56 OUString maPresentationClass;
57 OUString maShapeName;
58 OUString maThumbnailURL;
60 /// whether to restore list context (#91964#)
61 bool mbListContextPushed;
63 XmlStyleFamily mnStyleFamily;
64 bool mbIsPlaceholder;
65 bool mbClearDefaultAttributes;
66 bool mbIsUserTransformed;
67 sal_Int32 mnZOrder;
68 OUString maShapeId;
69 OUString maLayerName;
71 SdXMLImExTransform2D mnTransform;
72 css::awt::Size maSize;
73 sal_Int16 mnRelWidth;
74 sal_Int16 mnRelHeight;
75 css::awt::Point maPosition;
76 basegfx::B2DHomMatrix maUsedTransformation;
78 bool mbVisible;
79 bool mbPrintable;
80 bool mbHaveXmlId;
81 bool mbTextBox; ///< If the text of this shape is handled by a Writer TextFrame.
83 /** if bSupportsStyle is false, auto styles will be set but not a style */
84 void SetStyle( bool bSupportsStyle = true );
85 void SetLayer();
86 void SetThumbnail();
88 void AddShape(css::uno::Reference< css::drawing::XShape >& xShape);
89 void AddShape(OUString const & serviceName);
90 void SetTransformation();
92 using SvXMLImportContext::GetImport;
94 void addGluePoint( const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList );
96 bool isPresentationShape() const;
98 public:
100 SdXMLShapeContext( SvXMLImport& rImport,
101 css::uno::Reference< css::xml::sax::XFastAttributeList> xAttrList,
102 css::uno::Reference< css::drawing::XShapes > xShapes,
103 bool bTemporaryShape);
104 virtual ~SdXMLShapeContext() override;
106 virtual void SAL_CALL startFastElement(
107 sal_Int32 nElement,
108 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
109 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
110 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
111 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
113 // this is called from the parent group for each unparsed attribute in the attribute list
114 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & );
118 // draw:rect context
120 class SdXMLRectShapeContext : public SdXMLShapeContext
122 sal_Int32 mnRadius;
124 public:
126 SdXMLRectShapeContext( SvXMLImport& rImport,
127 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
128 css::uno::Reference< css::drawing::XShapes > const & rShapes,
129 bool bTemporaryShape);
130 virtual ~SdXMLRectShapeContext() override;
131 virtual void SAL_CALL startFastElement(
132 sal_Int32 nElement,
133 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
135 // this is called from the parent group for each unparsed attribute in the attribute list
136 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
139 // draw:line context
141 class SdXMLLineShapeContext : public SdXMLShapeContext
143 sal_Int32 mnX1;
144 sal_Int32 mnY1;
145 sal_Int32 mnX2;
146 sal_Int32 mnY2;
148 public:
150 SdXMLLineShapeContext( SvXMLImport& rImport,
151 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
152 css::uno::Reference< css::drawing::XShapes > const & rShapes,
153 bool bTemporaryShape);
154 virtual ~SdXMLLineShapeContext() override;
155 virtual void SAL_CALL startFastElement(
156 sal_Int32 nElement,
157 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
159 // this is called from the parent group for each unparsed attribute in the attribute list
160 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
163 // draw:ellipse and draw:circle context
165 class SdXMLEllipseShapeContext : public SdXMLShapeContext
167 sal_Int32 mnCX;
168 sal_Int32 mnCY;
169 sal_Int32 mnRX;
170 sal_Int32 mnRY;
172 css::drawing::CircleKind meKind;
173 sal_Int32 mnStartAngle;
174 sal_Int32 mnEndAngle;
175 public:
177 SdXMLEllipseShapeContext( SvXMLImport& rImport,
178 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
179 css::uno::Reference< css::drawing::XShapes > const & rShapes,
180 bool bTemporaryShape);
181 virtual ~SdXMLEllipseShapeContext() override;
182 virtual void SAL_CALL startFastElement(
183 sal_Int32 nElement,
184 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
186 // this is called from the parent group for each unparsed attribute in the attribute list
187 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
190 // draw:polyline and draw:polygon context
192 class SdXMLPolygonShapeContext : public SdXMLShapeContext
194 OUString maPoints;
195 OUString maViewBox;
196 bool mbClosed;
198 public:
200 SdXMLPolygonShapeContext( SvXMLImport& rImport,
201 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
202 css::uno::Reference< css::drawing::XShapes > const & rShapes, bool bClosed, bool bTemporaryShape);
203 virtual ~SdXMLPolygonShapeContext() override;
204 virtual void SAL_CALL startFastElement(
205 sal_Int32 nElement,
206 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
208 // this is called from the parent group for each unparsed attribute in the attribute list
209 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
212 // draw:path context
214 class SdXMLPathShapeContext : public SdXMLShapeContext
216 OUString maD;
217 OUString maViewBox;
219 public:
221 SdXMLPathShapeContext( SvXMLImport& rImport,
222 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
223 css::uno::Reference< css::drawing::XShapes > const & rShapes,
224 bool bTemporaryShape);
225 virtual ~SdXMLPathShapeContext() override;
226 virtual void SAL_CALL startFastElement(
227 sal_Int32 nElement,
228 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
230 // this is called from the parent group for each unparsed attribute in the attribute list
231 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
234 // draw:text-box context
236 class SdXMLTextBoxShapeContext : public SdXMLShapeContext
238 sal_Int32 mnRadius;
239 OUString maChainNextName;
241 public:
243 SdXMLTextBoxShapeContext( SvXMLImport& rImport,
244 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
245 css::uno::Reference< css::drawing::XShapes > const & rShapes);
246 virtual ~SdXMLTextBoxShapeContext() override;
247 virtual void SAL_CALL startFastElement(
248 sal_Int32 nElement,
249 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
251 // this is called from the parent group for each unparsed attribute in the attribute list
252 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
255 // draw:control context
257 class SdXMLControlShapeContext : public SdXMLShapeContext
259 private:
260 OUString maFormId;
262 public:
264 SdXMLControlShapeContext( SvXMLImport& rImport,
265 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
266 css::uno::Reference< css::drawing::XShapes > const & rShapes,
267 bool bTemporaryShape);
268 virtual ~SdXMLControlShapeContext() override;
269 virtual void SAL_CALL startFastElement(
270 sal_Int32 nElement,
271 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
273 // this is called from the parent group for each unparsed attribute in the attribute list
274 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
277 // draw:connector context
279 class SdXMLConnectorShapeContext : public SdXMLShapeContext
281 private:
282 css::awt::Point maStart;
283 css::awt::Point maEnd;
285 css::drawing::ConnectorType
286 mnType;
288 OUString maStartShapeId;
289 sal_Int32 mnStartGlueId;
290 OUString maEndShapeId;
291 sal_Int32 mnEndGlueId;
293 sal_Int32 mnDelta1;
294 sal_Int32 mnDelta2;
295 sal_Int32 mnDelta3;
297 css::uno::Any maPath;
299 // Guess from the svg:d attribute whether the shape was rendered using OOXML definition. The
300 // default value is true to cover files exported to ODF by MS Office, which does not write a
301 // svg:d attribute. LibreOffice has always written a svg:d attribute.
302 bool mbLikelyOOXMLCurve;
304 public:
306 SdXMLConnectorShapeContext( SvXMLImport& rImport,
307 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
308 css::uno::Reference< css::drawing::XShapes > const & rShapes,
309 bool bTemporaryShape);
310 virtual ~SdXMLConnectorShapeContext() override;
311 virtual void SAL_CALL startFastElement(
312 sal_Int32 nElement,
313 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
315 // this is called from the parent group for each unparsed attribute in the attribute list
316 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
319 // draw:measure context
321 class SdXMLMeasureShapeContext : public SdXMLShapeContext
323 private:
324 css::awt::Point maStart;
325 css::awt::Point maEnd;
327 public:
329 SdXMLMeasureShapeContext( SvXMLImport& rImport,
330 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
331 css::uno::Reference< css::drawing::XShapes > const & rShapes,
332 bool bTemporaryShape);
333 virtual ~SdXMLMeasureShapeContext() override;
334 virtual void SAL_CALL startFastElement(
335 sal_Int32 nElement,
336 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
337 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
339 // this is called from the parent group for each unparsed attribute in the attribute list
340 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
343 // draw:page context
345 class SdXMLPageShapeContext : public SdXMLShapeContext
347 private:
348 sal_Int32 mnPageNumber;
349 public:
351 SdXMLPageShapeContext( SvXMLImport& rImport,
352 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
353 css::uno::Reference< css::drawing::XShapes > const & rShapes,
354 bool bTemporaryShape);
355 virtual ~SdXMLPageShapeContext() override;
356 virtual void SAL_CALL startFastElement(
357 sal_Int32 nElement,
358 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
360 // this is called from the parent group for each unparsed attribute in the attribute list
361 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
364 // draw:caption context
366 class SdXMLCaptionShapeContext : public SdXMLShapeContext
368 private:
369 css::awt::Point maCaptionPoint;
370 sal_Int32 mnRadius;
372 public:
374 SdXMLCaptionShapeContext( SvXMLImport& rImport,
375 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
376 css::uno::Reference< css::drawing::XShapes > const & rShapes,
377 bool bTemporaryShape);
378 virtual ~SdXMLCaptionShapeContext() override;
379 virtual void SAL_CALL startFastElement(
380 sal_Int32 nElement,
381 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
383 // this is called from the parent group for each unparsed attribute in the attribute list
384 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
387 // office:image context
389 class SdXMLGraphicObjectShapeContext : public SdXMLShapeContext
391 private:
392 OUString maURL;
393 OUString msMimeType;
394 css::uno::Reference < css::io::XOutputStream > mxBase64Stream;
396 public:
397 OUString const& getMimeType() const { return msMimeType; }
399 SdXMLGraphicObjectShapeContext( SvXMLImport& rImport,
400 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
401 css::uno::Reference< css::drawing::XShapes > const & rShapes);
402 virtual ~SdXMLGraphicObjectShapeContext() override;
404 virtual void SAL_CALL startFastElement(
405 sal_Int32 nElement,
406 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
407 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
408 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
409 sal_Int32 nElement,
410 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
412 // this is called from the parent group for each unparsed attribute in the attribute list
413 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
416 // chart:chart context
418 class SdXMLChartShapeContext : public SdXMLShapeContext
420 SvXMLImportContextRef mxChartContext;
422 public:
424 SdXMLChartShapeContext( SvXMLImport& rImport,
425 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
426 css::uno::Reference< css::drawing::XShapes > const & rShapes,
427 bool bTemporaryShape);
429 virtual void SAL_CALL startFastElement(
430 sal_Int32 nElement,
431 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
432 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
433 virtual void SAL_CALL characters( const OUString& rChars ) override;
434 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
435 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
438 // draw:object and draw:object_ole context
440 class SdXMLObjectShapeContext : public SdXMLShapeContext
442 private:
443 OUString maCLSID;
444 OUString maHref;
446 css::uno::Reference < css::io::XOutputStream > mxBase64Stream;
448 public:
450 SdXMLObjectShapeContext( SvXMLImport& rImport,
451 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
452 css::uno::Reference< css::drawing::XShapes > const & rShapes);
453 virtual ~SdXMLObjectShapeContext() override;
455 virtual void SAL_CALL startFastElement(
456 sal_Int32 nElement,
457 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
458 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
460 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
461 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
463 // this is called from the parent group for each unparsed attribute in the attribute list
464 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
467 // draw:applet
469 class SdXMLAppletShapeContext : public SdXMLShapeContext
471 private:
472 OUString maAppletName;
473 OUString maAppletCode;
474 OUString maHref;
475 bool mbIsScript;
477 css::uno::Sequence< css::beans::PropertyValue > maParams;
479 public:
481 SdXMLAppletShapeContext( SvXMLImport& rImport,
482 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
483 css::uno::Reference< css::drawing::XShapes > const & rShapes);
484 virtual ~SdXMLAppletShapeContext() override;
486 virtual void SAL_CALL startFastElement(
487 sal_Int32 nElement,
488 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
489 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
490 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
491 sal_Int32 nElement,
492 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
494 // this is called from the parent group for each unparsed attribute in the attribute list
495 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
498 // draw:plugin
500 class SdXMLPluginShapeContext : public SdXMLShapeContext
502 private:
503 OUString maMimeType;
504 OUString maHref;
505 bool mbMedia;
507 css::uno::Sequence< css::beans::PropertyValue > maParams;
509 public:
511 SdXMLPluginShapeContext( SvXMLImport& rImport,
512 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
513 css::uno::Reference< css::drawing::XShapes > const & rShapes);
514 virtual ~SdXMLPluginShapeContext() override;
516 virtual void SAL_CALL startFastElement(
517 sal_Int32 nElement,
518 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
519 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
520 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
521 sal_Int32 nElement,
522 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
524 // this is called from the parent group for each unparsed attribute in the attribute list
525 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
527 const OUString& getMimeType() const { return maMimeType; }
530 // draw:floating-frame
532 class SdXMLFloatingFrameShapeContext : public SdXMLShapeContext
534 private:
535 OUString maFrameName;
536 OUString maHref;
538 css::uno::Reference<css::drawing::XShape> CreateFloatingFrameShape() const;
540 public:
542 SdXMLFloatingFrameShapeContext( SvXMLImport& rImport,
543 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
544 css::uno::Reference< css::drawing::XShapes > const & rShapes);
545 virtual ~SdXMLFloatingFrameShapeContext() override;
547 virtual void SAL_CALL startFastElement(
548 sal_Int32 nElement,
549 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
550 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
552 // this is called from the parent group for each unparsed attribute in the attribute list
553 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
556 // draw:-frame
558 class SdXMLFrameShapeContext : public SdXMLShapeContext, public MultiImageImportHelper
560 private:
561 bool mbSupportsReplacement;
562 SvXMLImportContextRef mxImplContext;
563 SvXMLImportContextRef mxReplImplContext;
565 protected:
566 /// helper to get the created xShape instance, needs to be overridden
567 void removeGraphicFromImportContext(const SvXMLImportContext& rContext) override;
568 OUString getGraphicPackageURLFromImportContext(const SvXMLImportContext& rContext) const override;
569 OUString getMimeTypeFromImportContext(const SvXMLImportContext& rContext) const override;
570 css::uno::Reference<css::graphic::XGraphic> getGraphicFromImportContext(const SvXMLImportContext& rContext) const override;
572 public:
574 SdXMLFrameShapeContext( SvXMLImport& rImport,
575 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
576 css::uno::Reference< css::drawing::XShapes > const & rShapes,
577 bool bTemporaryShape);
578 virtual ~SdXMLFrameShapeContext() override;
580 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
581 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
583 virtual void SAL_CALL startFastElement(
584 sal_Int32 nElement,
585 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
586 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
588 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
591 class SdXMLCustomShapeContext : public SdXMLShapeContext
593 OUString maCustomShapeEngine;
594 OUString maCustomShapeData;
596 std::vector< css::beans::PropertyValue > maCustomShapeGeometry;
598 public:
601 SdXMLCustomShapeContext( SvXMLImport& rImport,
602 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
603 css::uno::Reference< css::drawing::XShapes > const & rShapes);
604 virtual ~SdXMLCustomShapeContext() override;
606 virtual void SAL_CALL startFastElement(
607 sal_Int32 nElement,
608 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
609 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
610 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
611 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
613 // this is called from the parent group for each unparsed attribute in the attribute list
614 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
617 // draw:table
619 class SdXMLTableShapeContext : public SdXMLShapeContext
621 public:
623 SdXMLTableShapeContext( SvXMLImport& rImport,
624 const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
625 css::uno::Reference< css::drawing::XShapes > const & rShapes );
626 virtual ~SdXMLTableShapeContext() override;
628 virtual void SAL_CALL startFastElement(
629 sal_Int32 nElement,
630 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
631 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
633 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
634 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
636 // this is called from the parent group for each unparsed attribute in the attribute list
637 virtual bool processAttribute( const sax_fastparser::FastAttributeList::FastAttributeIter & ) override;
639 private:
640 SvXMLImportContextRef mxTableImportContext;
641 OUString msTemplateStyleName;
642 bool maTemplateStylesUsed[6] = {};
645 extern SvXMLEnumMapEntry<css::drawing::Alignment> const aXML_GlueAlignment_EnumMap[];
646 extern SvXMLEnumMapEntry<css::drawing::EscapeDirection> const aXML_GlueEscapeDirection_EnumMap[];
648 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */