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> ShapeContextHandler::getLockedCanvasContext(sal_Int32 nElement)
59{
60 if (!mxLockedCanvasContext.is())
61 {
63
64 switch (nElement & 0xffff)
65 {
66 case XML_lockedCanvas:
67 mxLockedCanvasContext.set(new LockedCanvasContext(*rFragmentHandler));
68 break;
69 default:
70 break;
71 }
72 }
73
74 return static_cast<ContextHandler *>(mxLockedCanvasContext.get());
75}
76
77/*
78 * This method creates new ChartGraphicDataContext Object.
79 */
80uno::Reference<xml::sax::XFastContextHandler> 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> 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> ShapeContextHandler::getWpgContext(sal_Int32 nElement)
134{
135 if (!mxWpgContext.is())
136 {
138
139 switch (getBaseToken(nElement))
140 {
141 case XML_wgp:
142 {
143 mxWpgContext.set(new WpgContext(*rFragmentHandler, oox::drawingml::ShapePtr()));
144 mxWpgContext->setFullWPGSupport(m_bFullWPGSUpport);
145 break;
146 }
147 default:
148 break;
149 }
150 }
151
152 return static_cast<ContextHandler *>(mxWpgContext.get());
153}
154
155uno::Reference<xml::sax::XFastContextHandler> const &
157{
158 if (! mxGraphicShapeContext.is())
159 {
160 auto pFragmentHandler = std::make_shared<ShapeFragmentHandler>(*mxShapeFilterBase, msRelationFragmentPath);
161 ShapePtr pMasterShape;
162
163 switch (Element & 0xffff)
164 {
165 case XML_graphic:
166 mpShape = std::make_shared<Shape>("com.sun.star.drawing.GraphicObjectShape" );
168 (new GraphicalObjectFrameContext(*pFragmentHandler, pMasterShape, mpShape, true));
169 break;
170 case XML_pic:
171 mpShape = std::make_shared<Shape>("com.sun.star.drawing.GraphicObjectShape" );
173 (new GraphicShapeContext(*pFragmentHandler, pMasterShape, mpShape));
174 break;
175 default:
176 break;
177 }
178 }
179
181}
182
183uno::Reference<xml::sax::XFastContextHandler>
185{
186 if (!mxDrawingFragmentHandler.is())
187 {
188 mpDrawing = std::make_shared<oox::vml::Drawing>( *mxShapeFilterBase, mxDrawPage, oox::vml::VMLDRAWING_WORD );
192 }
193 else
194 {
195 // Reset the handler if fragment path has changed
196 OUString sHandlerFragmentPath = mxDrawingFragmentHandler->getFragmentPath();
197 if ( msRelationFragmentPath != sHandlerFragmentPath )
198 {
203 }
204 }
205 return static_cast<ContextHandler *>(mxDrawingFragmentHandler.get());
206}
207
208uno::Reference<xml::sax::XFastContextHandler>
210{
211 if (!mxDiagramShapeContext.is())
212 {
213 auto pFragmentHandler = std::make_shared<ShapeFragmentHandler>(*mxShapeFilterBase, msRelationFragmentPath);
214 mpShape = std::make_shared<Shape>();
215 mpShape->setSize(maSize);
216 mxDiagramShapeContext.set(new DiagramGraphicDataContext(*pFragmentHandler, mpShape));
217 }
218
220}
221
222uno::Reference<xml::sax::XFastContextHandler>
224{
225 uno::Reference<xml::sax::XFastContextHandler> xResult;
226 const sal_uInt32 nStartToken = getStartToken();
227
228 switch (getNamespace( nStartToken ))
229 {
230 case NMSP_doc:
231 case NMSP_vml:
232 xResult.set(getDrawingShapeContext());
233 break;
234 case NMSP_dmlDiagram:
235 xResult.set(getDiagramShapeContext());
236 break;
237 case NMSP_dmlLockedCanvas:
238 xResult.set(getLockedCanvasContext(nStartToken));
239 break;
240 case NMSP_dmlChart:
241 xResult.set(getChartShapeContext(nStartToken));
242 break;
243 case NMSP_wps:
244 xResult.set(getWpsContext(nStartToken, nElement));
245 break;
246 case NMSP_wpg:
247 xResult.set(getWpgContext(nStartToken));
248 break;
249 default:
250 xResult.set(getGraphicShapeContext(nStartToken));
251 break;
252 }
253
254 return xResult;
255}
256
257// css::xml::sax::XFastContextHandler:
259(::sal_Int32 Element,
260 const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
261{
263
264 if (Element == DGM_TOKEN(relIds) || Element == LC_TOKEN(lockedCanvas) || Element == C_TOKEN(chart) ||
265 Element == WPS_TOKEN(wsp) || Element == WPG_TOKEN(wgp) || Element == OOX_TOKEN(dmlPicture, pic))
266 {
267 // Parse the theme relation, if available; the diagram won't have colors without it.
268 if (!mpThemePtr && !msRelationFragmentPath.isEmpty())
269 {
270 // Get Target for Type = "officeDocument" from _rels/.rels file
271 // aOfficeDocumentFragmentPath is pointing to "word/document.xml" for docx & to "ppt/presentation.xml" for pptx
272 FragmentHandlerRef rFragmentHandlerRef(new ShapeFragmentHandler(*mxShapeFilterBase, "/"));
273 OUString aOfficeDocumentFragmentPath = rFragmentHandlerRef->getFragmentPathFromFirstTypeFromOfficeDoc( u"officeDocument" );
274
275 // Get the theme DO NOT use msRelationFragmentPath for getting theme as for a document there is a single theme in document.xml.rels
276 // and the same is used by header and footer as well.
277 FragmentHandlerRef rFragmentHandler(new ShapeFragmentHandler(*mxShapeFilterBase, aOfficeDocumentFragmentPath));
278 OUString aThemeFragmentPath = rFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"theme" );
279
280 if (!aThemeFragmentPath.isEmpty())
281 {
282 mpThemePtr = std::make_shared<Theme>();
283 auto pTheme = std::make_shared<model::Theme>();
284 mpThemePtr->setTheme(pTheme);
285 uno::Reference<xml::sax::XFastSAXSerializable> xDoc(mxShapeFilterBase->importFragment(aThemeFragmentPath), uno::UNO_QUERY_THROW);
286 mxShapeFilterBase->importFragment(new ThemeFragmentHandler(*mxShapeFilterBase, aThemeFragmentPath, *mpThemePtr, *pTheme), xDoc);
287 mxShapeFilterBase->setCurrentTheme(mpThemePtr);
288 }
289 }
290 else if (mpThemePtr && !mxShapeFilterBase->getCurrentTheme())
291 {
292 mxShapeFilterBase->setCurrentTheme(mpThemePtr);
293 }
294
295 createFastChildContext(Element, Attribs);
296 }
297
298 // Entering VML block (startFastElement() is called for the outermost tag),
299 // handle possible recursion.
301 mpDrawing->getShapes().pushMark();
302
303 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
304
305 if (xContextHandler.is())
306 xContextHandler->startFastElement(Element, Attribs);
307}
308
310(const OUString & Namespace, const OUString & Name,
311 const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
312{
314 mpDrawing->getShapes().pushMark();
315
316 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
317
318 if (xContextHandler.is())
319 xContextHandler->startUnknownElement(Namespace, Name, Attribs);
320}
321
322void SAL_CALL ShapeContextHandler::endFastElement(::sal_Int32 Element)
323{
324 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
325
326 if (xContextHandler.is())
327 xContextHandler->endFastElement(Element);
328 // In case a textbox is sent, and later we get additional properties for
329 // the textbox, then the wps context is not cleared, so do that here.
330 if (Element != (NMSP_wps | XML_wsp))
331 return;
332
333 uno::Reference<lang::XServiceInfo> xServiceInfo(mxSavedShape, uno::UNO_QUERY);
334 bool bTextFrame = xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.text.TextFrame");
335 bool bTextBox = false;
336 if (!bTextFrame)
337 {
338 uno::Reference<beans::XPropertySet> xPropertySet(mxSavedShape, uno::UNO_QUERY);
339 if (xPropertySet.is())
340 xPropertySet->getPropertyValue("TextBox") >>= bTextBox;
341 }
342 if (bTextFrame || bTextBox)
343 mxWpsContext.clear();
344 mxSavedShape.clear();
345}
346
348(const OUString & Namespace,
349 const OUString & Name)
350{
351 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
352
353 if (xContextHandler.is())
354 xContextHandler->endUnknownElement(Namespace, Name);
355}
356
357uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
359(::sal_Int32 Element,
360 const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
361{
362 uno::Reference< xml::sax::XFastContextHandler > xResult;
363 uno::Reference< xml::sax::XFastContextHandler > xContextHandler(getContextHandler(Element));
364
365 if (xContextHandler.is())
366 xResult.set(xContextHandler->createFastChildContext
367 (Element, Attribs));
368
369 return xResult;
370}
371
372uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
374(const OUString & Namespace,
375 const OUString & Name,
376 const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
377{
378 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
379
380 if (xContextHandler.is())
381 return xContextHandler->createUnknownChildContext
382 (Namespace, Name, Attribs);
383
384 return uno::Reference< xml::sax::XFastContextHandler >();
385}
386
387void SAL_CALL ShapeContextHandler::characters(const OUString & aChars)
388{
389 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
390
391 if (xContextHandler.is())
392 xContextHandler->characters(aChars);
393}
394
395uno::Reference< drawing::XShape >
397{
398 uno::Reference< drawing::XShape > xResult;
399 uno::Reference< drawing::XShapes > xShapes = mxDrawPage;
400
401 if (mxShapeFilterBase && xShapes.is())
402 {
404 {
405 mpDrawing->finalizeFragmentImport();
406 if( std::shared_ptr< vml::ShapeBase > pShape = mpDrawing->getShapes().takeLastShape() )
407 xResult = pShape->convertAndInsert( xShapes );
408 // Only now remove the recursion mark, because getShape() is called in writerfilter
409 // after endFastElement().
410 mpDrawing->getShapes().popMark();
411 }
412 else if (mxDiagramShapeContext.is())
413 {
414 basegfx::B2DHomMatrix aMatrix;
415 if (mpShape->getExtDrawings().empty())
416 {
417 mpShape->addShape( *mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, mpShape->getFillProperties() );
418 xResult = mpShape->getXShape();
419 }
420 else
421 {
422 // Prerendered diagram output is available, then use that, and throw away the original result.
423 for (auto const& extDrawing : mpShape->getExtDrawings())
424 {
425 OUString aFragmentPath(mxDiagramShapeContext->getFragmentPathFromRelId(extDrawing));
426 oox::drawingml::ShapePtr pShapePtr = std::make_shared<Shape>( "com.sun.star.drawing.GroupShape" );
427 pShapePtr->setDiagramType();
428 mxShapeFilterBase->importFragment(new ShapeDrawingFragmentHandler(*mxShapeFilterBase, aFragmentPath, pShapePtr));
429 pShapePtr->setDiagramDoms(mpShape->getDiagramDoms());
430 pShapePtr->keepDiagramDrawing(*mxShapeFilterBase, aFragmentPath);
431
432 if (mpShape->getFontRefColorForNodes().isUsed())
433 applyFontRefColor(pShapePtr, mpShape->getFontRefColorForNodes());
434
435 // migrate IDiagramHelper to new oox::Shape (from mpShape which was loaded
436 // to pShapePtr where the geometry is now constructed)
437 mpShape->migrateDiagramHelperToNewShape(pShapePtr);
438
439 if (!mpShape->getChildren().empty())
440 {
441 // first child is diagram background - we want to keep it, as drawingML fallback doesn't contain it
442 auto& aChildren = pShapePtr->getChildren();
443 ShapePtr pBackground = mpShape->getChildren().front();
444 aChildren.insert(aChildren.begin(), pBackground);
445 }
446
447 pShapePtr->addShape( *mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShapePtr->getFillProperties() );
448 xResult = pShapePtr->getXShape();
449 }
450 mpShape.reset();
451 }
452 mxDiagramShapeContext.clear();
453 }
454 else if (mxLockedCanvasContext.is())
455 {
456 ShapePtr pShape = mxLockedCanvasContext->getShape();
457 if (pShape)
458 {
459 basegfx::B2DHomMatrix aMatrix;
460 pShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShape->getFillProperties());
461 xResult = pShape->getXShape();
462 mxLockedCanvasContext.clear();
463 }
464 }
465 //NMSP_dmlChart == getNamespace( mnStartToken ) check is introduced to make sure that
466 //mnStartToken is set as NMSP_dmlChart in setStartToken.
467 //Only in case it is set then only the below block of code for ChartShapeContext should be executed.
468 else if (mxChartShapeContext.is() && (NMSP_dmlChart == getNamespace( getStartToken() )))
469 {
470 basegfx::B2DHomMatrix aMatrix;
471 oox::drawingml::ShapePtr xShapePtr( mxChartShapeContext->getShape());
472 // See SwXTextDocument::createInstance(), ODF import uses the same hack.
473 xShapePtr->setServiceName("com.sun.star.drawing.temporaryForXMLImportOLE2Shape");
474 xShapePtr->addShape( *mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, xShapePtr->getFillProperties() );
475 xResult = xShapePtr->getXShape();
476 mxChartShapeContext.clear();
477 }
478 else if (mxWpsContext.is())
479 {
480 ShapePtr pShape = 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 = 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::setSize(const awt::Size& rSize)
568{
569 maSize = rSize;
570}
571
572void ShapeContextHandler::setDocumentProperties(const uno::Reference<document::XDocumentProperties>& xDocProps)
573{
574 mxDocumentProperties = xDocProps;
575 mxShapeFilterBase->checkDocumentProperties(mxDocumentProperties);
576}
577
578void ShapeContextHandler::setMediaDescriptor(const uno::Sequence<beans::PropertyValue>& rMediaDescriptor)
579{
580 maMediaDescriptor = rMediaDescriptor;
581}
582
583void ShapeContextHandler::setGraphicMapper(css::uno::Reference<css::graphic::XGraphicMapper> const & rxGraphicMapper)
584{
585 mxShapeFilterBase->setGraphicMapper(rxGraphicMapper);
586}
587
589 const oox::drawingml::Color& rFontRefColor)
590{
591 pShape->getShapeStyleRefs()[XML_fontRef].maPhClr = rFontRefColor;
592 std::vector<oox::drawingml::ShapePtr>& vChildren = pShape->getChildren();
593 for (auto const& child : vChildren)
594 {
595 applyFontRefColor(child, rFontRefColor);
596 }
597}
598}
599
600/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Locked canvas is kind of a container for drawingml shapes: it can even contain group shapes.
virtual void SAL_CALL endFastElement(::sal_Int32 Element) override
void setPosition(const css::awt::Point &rPosition)
css::uno::Reference< XFastContextHandler > getWpgContext(sal_Int32 nElement)
void setDrawPage(const css::uno::Reference< css::drawing::XDrawPage > &the_value)
css::uno::Reference< XFastContextHandler > getChartShapeContext(::sal_Int32 Element)
css::uno::Reference< XFastContextHandler > getDrawingShapeContext()
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
rtl::Reference< drawingml::ChartGraphicDataContext > mxChartShapeContext
css::uno::Reference< XFastContextHandler > getLockedCanvasContext(sal_Int32 nElement)
void setSize(const css::awt::Size &rSize)
css::uno::Reference< css::document::XDocumentProperties > mxDocumentProperties
::rtl::Reference< ShapeFilterBase > mxShapeFilterBase
std::shared_ptr< vml::Drawing > mpDrawing
css::uno::Reference< XFastContextHandler > getDiagramShapeContext()
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< css::drawing::XShape > mxSavedShape
css::uno::Reference< XFastContextHandler > getContextHandler(sal_Int32 nElement=0)
rtl::Reference< vml::DrawingFragment > mxDrawingFragmentHandler
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
rtl::Reference< LockedCanvasContext > mxLockedCanvasContext
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
rtl::Reference< WpsContext > mxWpsContext
css::uno::Reference< XFastContextHandler > getWpsContext(sal_Int32 nStartElement, sal_Int32 nElement)
ShapeContextHandler(rtl::Reference< ShapeFilterBase > xFilterBase)
rtl::Reference< WpgContext > mxWpgContext
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
rtl::Reference< drawingml::DiagramGraphicDataContext > mxDiagramShapeContext
void setMediaDescriptor(const css::uno::Sequence< css::beans::PropertyValue > &rMediaDescriptor)
void setRelationFragmentPath(const OUString &the_value)
void setGraphicMapper(css::uno::Reference< css::graphic::XGraphicMapper > const &rGraphicMapper)
void applyFontRefColor(const oox::drawingml::ShapePtr &pShape, const oox::drawingml::Color &rFontRefColor)
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
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