LibreOffice Module oox (master) 1
ShapeContextHandler.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#include <com/sun/star/beans/XPropertySet.hpp>
21#include <com/sun/star/xml/dom/XDocument.hpp>
22#include <com/sun/star/xml/sax/XFastSAXSerializable.hpp>
23
27#include "WpsContext.hxx"
28#include "WpgContext.hxx"
31#include <oox/vml/vmlshape.hxx>
34#include <oox/token/namespaces.hxx>
35#include <oox/token/tokens.hxx>
38#include <memory>
39#include <utility>
40
41using namespace ::com::sun::star;
42
43namespace oox::shape {
44using namespace core;
45using namespace drawingml;
46
48 m_bFullWPGSUpport(false),
49 mxShapeFilterBase(std::move(xFilterBase))
50
51{
52}
53
55{
56}
57
58uno::Reference<xml::sax::XFastContextHandler> const & ShapeContextHandler::getLockedCanvasContext(sal_Int32 nElement)
59{
60 if (!mxLockedCanvasContext.is())
61 {
63
64 switch (nElement & 0xffff)
65 {
66 case XML_lockedCanvas:
67 mxLockedCanvasContext.set(static_cast<oox::core::ContextHandler*>(new LockedCanvasContext(*rFragmentHandler)));
68 break;
69 default:
70 break;
71 }
72 }
73
75}
76
77/*
78 * This method creates new ChartGraphicDataContext Object.
79 */
80uno::Reference<xml::sax::XFastContextHandler> const & ShapeContextHandler::getChartShapeContext(sal_Int32 nElement)
81{
82 if (!mxChartShapeContext.is())
83 {
84 switch (nElement & 0xffff)
85 {
86 case XML_chart:
87 {
88 std::unique_ptr<ContextHandler2Helper> pFragmentHandler(
90 mpShape = std::make_shared<Shape>("com.sun.star.drawing.OLE2Shape" );
91 mxChartShapeContext.set(new ChartGraphicDataContext(*pFragmentHandler, mpShape, true));
92 break;
93 }
94 default:
95 break;
96 }
97 }
98
100}
101
102uno::Reference<xml::sax::XFastContextHandler> const & ShapeContextHandler::getWpsContext(sal_Int32 nStartElement, sal_Int32 nElement)
103{
104 if (!mxWpsContext.is())
105 {
107 ShapePtr pMasterShape;
108
109 uno::Reference<drawing::XShape> xShape;
110 // No element happens in case of pretty-printed XML, bodyPr is the case when we are called again after <wps:txbx>.
111 if (!nElement || nElement == WPS_TOKEN(bodyPr))
112 // Assume that this is just a continuation of the previous shape.
113 xShape = mxSavedShape;
114
115 switch (getBaseToken(nStartElement))
116 {
117 case XML_wsp:
118 mxWpsContext.set(new WpsContext(
119 *rFragmentHandler,
120 xShape,
121 pMasterShape,
122 std::make_shared<oox::drawingml::Shape>(
123 "com.sun.star.drawing.CustomShape")));
124 break;
125 default:
126 break;
127 }
128 }
129
130 return mxWpsContext;
131}
132
133uno::Reference<xml::sax::XFastContextHandler> const & ShapeContextHandler::getWpgContext(sal_Int32 nElement)
134{
135 if (!mxWpgContext.is())
136 {
138
139 switch (getBaseToken(nElement))
140 {
141 case XML_wgp:
142 {
143 rtl::Reference<WpgContext> rContext = new WpgContext(*rFragmentHandler, oox::drawingml::ShapePtr());
144 rContext->setFullWPGSupport(m_bFullWPGSUpport);
145 mxWpgContext.set(static_cast<oox::core::ContextHandler*>(rContext.get()));
146 break;
147 }
148 default:
149 break;
150 }
151 }
152
153 return mxWpgContext;
154}
155
156uno::Reference<xml::sax::XFastContextHandler> const &
158{
159 if (! mxGraphicShapeContext.is())
160 {
161 auto pFragmentHandler = std::make_shared<ShapeFragmentHandler>(*mxShapeFilterBase, msRelationFragmentPath);
162 ShapePtr pMasterShape;
163
164 switch (Element & 0xffff)
165 {
166 case XML_graphic:
167 mpShape = std::make_shared<Shape>("com.sun.star.drawing.GraphicObjectShape" );
169 (new GraphicalObjectFrameContext(*pFragmentHandler, pMasterShape, mpShape, true));
170 break;
171 case XML_pic:
172 mpShape = std::make_shared<Shape>("com.sun.star.drawing.GraphicObjectShape" );
174 (new GraphicShapeContext(*pFragmentHandler, pMasterShape, mpShape));
175 break;
176 default:
177 break;
178 }
179 }
180
182}
183
184uno::Reference<xml::sax::XFastContextHandler> const &
186{
187 if (!mxDrawingFragmentHandler.is())
188 {
189 mpDrawing = std::make_shared<oox::vml::Drawing>( *mxShapeFilterBase, mxDrawPage, oox::vml::VMLDRAWING_WORD );
191 (static_cast<ContextHandler *>
194 }
195 else
196 {
197 // Reset the handler if fragment path has changed
198 OUString sHandlerFragmentPath = dynamic_cast<ContextHandler&>(*mxDrawingFragmentHandler).getFragmentPath();
199 if ( msRelationFragmentPath != sHandlerFragmentPath )
200 {
203 (static_cast<ContextHandler *>
206 }
207 }
209}
210
211uno::Reference<xml::sax::XFastContextHandler> const &
213{
214 if (!mxDiagramShapeContext.is())
215 {
216 auto pFragmentHandler = std::make_shared<ShapeFragmentHandler>(*mxShapeFilterBase, msRelationFragmentPath);
217 mpShape = std::make_shared<Shape>();
218 mxDiagramShapeContext.set(new DiagramGraphicDataContext(*pFragmentHandler, mpShape));
219 }
220
222}
223
224uno::Reference<xml::sax::XFastContextHandler>
226{
227 uno::Reference<xml::sax::XFastContextHandler> xResult;
228 const sal_uInt32 nStartToken = getStartToken();
229
230 switch (getNamespace( nStartToken ))
231 {
232 case NMSP_doc:
233 case NMSP_vml:
234 xResult.set(getDrawingShapeContext());
235 break;
236 case NMSP_dmlDiagram:
237 xResult.set(getDiagramShapeContext());
238 break;
239 case NMSP_dmlLockedCanvas:
240 xResult.set(getLockedCanvasContext(nStartToken));
241 break;
242 case NMSP_dmlChart:
243 xResult.set(getChartShapeContext(nStartToken));
244 break;
245 case NMSP_wps:
246 xResult.set(getWpsContext(nStartToken, nElement));
247 break;
248 case NMSP_wpg:
249 xResult.set(getWpgContext(nStartToken));
250 break;
251 default:
252 xResult.set(getGraphicShapeContext(nStartToken));
253 break;
254 }
255
256 return xResult;
257}
258
259// css::xml::sax::XFastContextHandler:
261(::sal_Int32 Element,
262 const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
263{
265
266 if (Element == DGM_TOKEN(relIds) || Element == LC_TOKEN(lockedCanvas) || Element == C_TOKEN(chart) ||
267 Element == WPS_TOKEN(wsp) || Element == WPG_TOKEN(wgp) || Element == OOX_TOKEN(dmlPicture, pic))
268 {
269 // Parse the theme relation, if available; the diagram won't have colors without it.
270 if (!mpThemePtr && !msRelationFragmentPath.isEmpty())
271 {
272 mpThemePtr = std::make_shared<Theme>();
273 // Get Target for Type = "officeDocument" from _rels/.rels file
274 // aOfficeDocumentFragmentPath is pointing to "word/document.xml" for docx & to "ppt/presentation.xml" for pptx
275 FragmentHandlerRef rFragmentHandlerRef(new ShapeFragmentHandler(*mxShapeFilterBase, "/"));
276 OUString aOfficeDocumentFragmentPath = rFragmentHandlerRef->getFragmentPathFromFirstTypeFromOfficeDoc( u"officeDocument" );
277
278 // Get the theme DO NOT use msRelationFragmentPath for getting theme as for a document there is a single theme in document.xml.rels
279 // and the same is used by header and footer as well.
280 FragmentHandlerRef rFragmentHandler(new ShapeFragmentHandler(*mxShapeFilterBase, aOfficeDocumentFragmentPath));
281 OUString aThemeFragmentPath = rFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"theme" );
282
283 if(!aThemeFragmentPath.isEmpty())
284 {
285 uno::Reference<xml::sax::XFastSAXSerializable> xDoc(mxShapeFilterBase->importFragment(aThemeFragmentPath), uno::UNO_QUERY_THROW);
286 mxShapeFilterBase->importFragment(new ThemeFragmentHandler(*mxShapeFilterBase, aThemeFragmentPath, *mpThemePtr ), xDoc);
287 mxShapeFilterBase->setCurrentTheme(mpThemePtr);
288 }
289 }
290
291 createFastChildContext(Element, Attribs);
292 }
293
294 // Entering VML block (startFastElement() is called for the outermost tag),
295 // handle possible recursion.
297 mpDrawing->getShapes().pushMark();
298
299 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
300
301 if (xContextHandler.is())
302 xContextHandler->startFastElement(Element, Attribs);
303}
304
306(const OUString & Namespace, const OUString & Name,
307 const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
308{
310 mpDrawing->getShapes().pushMark();
311
312 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
313
314 if (xContextHandler.is())
315 xContextHandler->startUnknownElement(Namespace, Name, Attribs);
316}
317
318void SAL_CALL ShapeContextHandler::endFastElement(::sal_Int32 Element)
319{
320 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
321
322 if (xContextHandler.is())
323 xContextHandler->endFastElement(Element);
324 // In case a textbox is sent, and later we get additional properties for
325 // the textbox, then the wps context is not cleared, so do that here.
326 if (Element != (NMSP_wps | XML_wsp))
327 return;
328
329 uno::Reference<lang::XServiceInfo> xServiceInfo(mxSavedShape, uno::UNO_QUERY);
330 bool bTextFrame = xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.text.TextFrame");
331 bool bTextBox = false;
332 if (!bTextFrame)
333 {
334 uno::Reference<beans::XPropertySet> xPropertySet(mxSavedShape, uno::UNO_QUERY);
335 if (xPropertySet.is())
336 xPropertySet->getPropertyValue("TextBox") >>= bTextBox;
337 }
338 if (bTextFrame || bTextBox)
339 mxWpsContext.clear();
340 mxSavedShape.clear();
341}
342
344(const OUString & Namespace,
345 const OUString & Name)
346{
347 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
348
349 if (xContextHandler.is())
350 xContextHandler->endUnknownElement(Namespace, Name);
351}
352
353uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
355(::sal_Int32 Element,
356 const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
357{
358 uno::Reference< xml::sax::XFastContextHandler > xResult;
359 uno::Reference< xml::sax::XFastContextHandler > xContextHandler(getContextHandler(Element));
360
361 if (xContextHandler.is())
362 xResult.set(xContextHandler->createFastChildContext
363 (Element, Attribs));
364
365 return xResult;
366}
367
368uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
370(const OUString & Namespace,
371 const OUString & Name,
372 const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
373{
374 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
375
376 if (xContextHandler.is())
377 return xContextHandler->createUnknownChildContext
378 (Namespace, Name, Attribs);
379
380 return uno::Reference< xml::sax::XFastContextHandler >();
381}
382
383void SAL_CALL ShapeContextHandler::characters(const OUString & aChars)
384{
385 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
386
387 if (xContextHandler.is())
388 xContextHandler->characters(aChars);
389}
390
391uno::Reference< drawing::XShape >
393{
394 uno::Reference< drawing::XShape > xResult;
395 uno::Reference< drawing::XShapes > xShapes = mxDrawPage;
396
397 if (mxShapeFilterBase && xShapes.is())
398 {
400 {
401 mpDrawing->finalizeFragmentImport();
402 if( std::shared_ptr< vml::ShapeBase > pShape = mpDrawing->getShapes().takeLastShape() )
403 xResult = pShape->convertAndInsert( xShapes );
404 // Only now remove the recursion mark, because getShape() is called in writerfilter
405 // after endFastElement().
406 mpDrawing->getShapes().popMark();
407 }
408 else if (mxDiagramShapeContext.is())
409 {
410 basegfx::B2DHomMatrix aMatrix;
411 if (mpShape->getExtDrawings().empty())
412 {
413 mpShape->addShape( *mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, mpShape->getFillProperties() );
414 xResult = mpShape->getXShape();
415 }
416 else
417 {
418 // Prerendered diagram output is available, then use that, and throw away the original result.
419 for (auto const& extDrawing : mpShape->getExtDrawings())
420 {
421 DiagramGraphicDataContext* pDiagramGraphicDataContext = dynamic_cast<DiagramGraphicDataContext*>(mxDiagramShapeContext.get());
422 if (!pDiagramGraphicDataContext)
423 break;
424 OUString aFragmentPath(pDiagramGraphicDataContext->getFragmentPathFromRelId(extDrawing));
425 oox::drawingml::ShapePtr pShapePtr = std::make_shared<Shape>( "com.sun.star.drawing.GroupShape" );
426 pShapePtr->setDiagramType();
427 mxShapeFilterBase->importFragment(new ShapeDrawingFragmentHandler(*mxShapeFilterBase, aFragmentPath, pShapePtr));
428 pShapePtr->setDiagramDoms(mpShape->getDiagramDoms());
429 pShapePtr->keepDiagramDrawing(*mxShapeFilterBase, aFragmentPath);
430
431 // migrate IDiagramHelper to new oox::Shape (from mpShape which was loaded
432 // to pShapePtr where the geometry is now constructed)
433 mpShape->migrateDiagramHelperToNewShape(pShapePtr);
434
435 if (!mpShape->getChildren().empty())
436 {
437 // first child is diagram background - we want to keep it, as drawingML fallback doesn't contain it
438 auto& aChildren = pShapePtr->getChildren();
439 ShapePtr pBackground = mpShape->getChildren().front();
440 aChildren.insert(aChildren.begin(), pBackground);
441 }
442
443 pShapePtr->addShape( *mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShapePtr->getFillProperties() );
444 xResult = pShapePtr->getXShape();
445 }
446 mpShape.reset();
447 }
448 mxDiagramShapeContext.clear();
449 }
450 else if (mxLockedCanvasContext.is())
451 {
452 ShapePtr pShape = dynamic_cast<LockedCanvasContext&>(*mxLockedCanvasContext).getShape();
453 if (pShape)
454 {
455 basegfx::B2DHomMatrix aMatrix;
456 pShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShape->getFillProperties());
457 xResult = pShape->getXShape();
458 mxLockedCanvasContext.clear();
459 }
460 }
461 //NMSP_dmlChart == getNamespace( mnStartToken ) check is introduced to make sure that
462 //mnStartToken is set as NMSP_dmlChart in setStartToken.
463 //Only in case it is set then only the below block of code for ChartShapeContext should be executed.
464 else if (mxChartShapeContext.is() && (NMSP_dmlChart == getNamespace( getStartToken() )))
465 {
466 ChartGraphicDataContext* pChartGraphicDataContext = dynamic_cast<ChartGraphicDataContext*>(mxChartShapeContext.get());
467 if (pChartGraphicDataContext)
468 {
469 basegfx::B2DHomMatrix aMatrix;
470 oox::drawingml::ShapePtr xShapePtr( pChartGraphicDataContext->getShape());
471 // See SwXTextDocument::createInstance(), ODF import uses the same hack.
472 xShapePtr->setServiceName("com.sun.star.drawing.temporaryForXMLImportOLE2Shape");
473 xShapePtr->addShape( *mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, xShapePtr->getFillProperties() );
474 xResult = xShapePtr->getXShape();
475 }
476 mxChartShapeContext.clear();
477 }
478 else if (mxWpsContext.is())
479 {
480 ShapePtr pShape = dynamic_cast<WpsContext&>(*mxWpsContext).getShape();
481 if (pShape)
482 {
483 basegfx::B2DHomMatrix aMatrix;
484 pShape->setPosition(maPosition);
485 pShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShape->getFillProperties());
486 xResult = pShape->getXShape();
487 mxSavedShape = xResult;
488 mxWpsContext.clear();
489 }
490 }
491 else if (mxWpgContext.is())
492 {
493 ShapePtr pShape = dynamic_cast<WpgContext&>(*mxWpgContext).getShape();
494 if (pShape)
495 {
496 basegfx::B2DHomMatrix aMatrix;
497 pShape->setPosition(maPosition);
498 pShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShape->getFillProperties());
499 xResult = pShape->getXShape();
500 mxSavedShape = xResult;
501 mxWpgContext.clear();
502 }
503 }
504 else if (mpShape)
505 {
506 basegfx::B2DHomMatrix aTransformation;
507
508 if (maPosition.X != 0 || maPosition.Y != 0)
509 {
510 // We got a position from writerfilter/, store that in the shape, otherwise the
511 // position won't be set.
512 mpShape->setWps(true);
513 mpShape->setPosition(maPosition);
514 }
515
516 mpShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aTransformation, mpShape->getFillProperties() );
517 xResult.set(mpShape->getXShape());
518 mxGraphicShapeContext.clear( );
519 }
520 }
521
522 if (xResult)
524 return xResult;
525}
526
527void ShapeContextHandler::setDrawPage(const css::uno::Reference< css::drawing::XDrawPage > & the_value)
528{
529 mxDrawPage = the_value;
530}
531
532void ShapeContextHandler::setModel(const css::uno::Reference< css::frame::XModel > & the_value)
533{
534 if( !mxShapeFilterBase.is() )
535 throw uno::RuntimeException();
536 uno::Reference<lang::XComponent> xComp(the_value, uno::UNO_QUERY_THROW);
537 mxShapeFilterBase->setTargetDocument(xComp);
538}
539
540void ShapeContextHandler::setRelationFragmentPath(const OUString & the_value)
541{
542 msRelationFragmentPath = the_value;
543}
544
546{
547 assert(mnStartTokenStack.size() && "This stack must not be empty!");
548 return mnStartTokenStack.top();
549}
550
552{
553 if (mnStartTokenStack.size() > 1)
554 mnStartTokenStack.pop();
555}
556
557void ShapeContextHandler::pushStartToken( sal_Int32 _starttoken )
558{
559 mnStartTokenStack.push(_starttoken);
560}
561
562void ShapeContextHandler::setPosition(const awt::Point& rPosition)
563{
564 maPosition = rPosition;
565}
566
567void ShapeContextHandler::setDocumentProperties(const uno::Reference<document::XDocumentProperties>& xDocProps)
568{
569 mxDocumentProperties = xDocProps;
570 mxShapeFilterBase->checkDocumentProperties(mxDocumentProperties);
571}
572
573void ShapeContextHandler::setMediaDescriptor(const uno::Sequence<beans::PropertyValue>& rMediaDescriptor)
574{
575 maMediaDescriptor = rMediaDescriptor;
576}
577
578void ShapeContextHandler::setGraphicMapper(css::uno::Reference<css::graphic::XGraphicMapper> const & rxGraphicMapper)
579{
580 mxShapeFilterBase->setGraphicMapper(rxGraphicMapper);
581}
582
583}
584
585/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const OUString & getFragmentPath() const
Returns the full path of the current fragment.
OUString getFragmentPathFromRelId(const OUString &rRelId) const
Returns the full fragment path for the passed relation identifier.
const ShapePtr & getShape() const
Locked canvas is kind of a container for drawingml shapes: it can even contain group shapes.
const oox::drawingml::ShapePtr & getShape() const
virtual void SAL_CALL endFastElement(::sal_Int32 Element) override
void setPosition(const css::awt::Point &rPosition)
void setDrawPage(const css::uno::Reference< css::drawing::XDrawPage > &the_value)
css::uno::Reference< XFastContextHandler > const & getLockedCanvasContext(sal_Int32 nElement)
virtual void SAL_CALL startUnknownElement(const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
css::uno::Sequence< css::beans::PropertyValue > maMediaDescriptor
css::uno::Reference< XFastContextHandler > mxGraphicShapeContext
css::uno::Reference< XFastContextHandler > const & getWpgContext(sal_Int32 nElement)
css::uno::Reference< XFastContextHandler > mxChartShapeContext
css::uno::Reference< css::document::XDocumentProperties > mxDocumentProperties
::rtl::Reference< ShapeFilterBase > mxShapeFilterBase
css::uno::Reference< XFastContextHandler > const & getDiagramShapeContext()
css::uno::Reference< XFastContextHandler > const & getDrawingShapeContext()
std::shared_ptr< vml::Drawing > mpDrawing
css::uno::Reference< XFastContextHandler > const & getWpsContext(sal_Int32 nStartElement, sal_Int32 nElement)
void setModel(const css::uno::Reference< css::frame::XModel > &the_value)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createUnknownChildContext(const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
css::uno::Reference< XFastContextHandler > mxDiagramShapeContext
css::uno::Reference< css::drawing::XShape > mxSavedShape
css::uno::Reference< XFastContextHandler > getContextHandler(sal_Int32 nElement=0)
css::uno::Reference< css::drawing::XShape > getShape()
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(::sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
css::uno::Reference< css::drawing::XDrawPage > mxDrawPage
std::stack< sal_uInt32 > mnStartTokenStack
css::uno::Reference< XFastContextHandler > const & getGraphicShapeContext(::sal_Int32 Element)
virtual void SAL_CALL endUnknownElement(const OUString &Namespace, const OUString &Name) override
ShapeContextHandler(rtl::Reference< ShapeFilterBase > xFilterBase)
css::uno::Reference< XFastContextHandler > const & getChartShapeContext(::sal_Int32 Element)
css::uno::Reference< XFastContextHandler > mxWpsContext
css::uno::Reference< XFastContextHandler > mxWpgContext
css::uno::Reference< XFastContextHandler > mxLockedCanvasContext
virtual void SAL_CALL characters(const OUString &aChars) override
void pushStartToken(sal_Int32 _starttoken)
void setDocumentProperties(const css::uno::Reference< css::document::XDocumentProperties > &xDocProps)
virtual void SAL_CALL startFastElement(::sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
void setMediaDescriptor(const css::uno::Sequence< css::beans::PropertyValue > &rMediaDescriptor)
void setRelationFragmentPath(const OUString &the_value)
css::uno::Reference< XFastContextHandler > mxDrawingFragmentHandler
void setGraphicMapper(css::uno::Reference< css::graphic::XGraphicMapper > const &rGraphicMapper)
Generic (i.e. not specific to PPTX) handler for the prerendered diagram parsing.
Wpg is the drawingML equivalent of v:group.
Definition: WpgContext.hxx:20
const oox::drawingml::ShapePtr & getShape() const
Definition: WpgContext.hxx:29
Wps is the drawingML equivalent of v:shape.
Definition: WpsContext.hxx:26
float u
std::shared_ptr< Shape > ShapePtr
@ VMLDRAWING_WORD
Word: One shape per drawing.
Definition: vmldrawing.hxx:55
OUString Name