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 mpThemePtr = std::make_shared<Theme>();
271 // Get Target for Type = "officeDocument" from _rels/.rels file
272 // aOfficeDocumentFragmentPath is pointing to "word/document.xml" for docx & to "ppt/presentation.xml" for pptx
273 FragmentHandlerRef rFragmentHandlerRef(new ShapeFragmentHandler(*mxShapeFilterBase, "/"));
274 OUString aOfficeDocumentFragmentPath = rFragmentHandlerRef->getFragmentPathFromFirstTypeFromOfficeDoc( u"officeDocument" );
275
276 // Get the theme DO NOT use msRelationFragmentPath for getting theme as for a document there is a single theme in document.xml.rels
277 // and the same is used by header and footer as well.
278 FragmentHandlerRef rFragmentHandler(new ShapeFragmentHandler(*mxShapeFilterBase, aOfficeDocumentFragmentPath));
279 OUString aThemeFragmentPath = rFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"theme" );
280
281 if(!aThemeFragmentPath.isEmpty())
282 {
283 uno::Reference<xml::sax::XFastSAXSerializable> xDoc(mxShapeFilterBase->importFragment(aThemeFragmentPath), uno::UNO_QUERY_THROW);
284 mxShapeFilterBase->importFragment(new ThemeFragmentHandler(*mxShapeFilterBase, aThemeFragmentPath, *mpThemePtr ), xDoc);
285 mxShapeFilterBase->setCurrentTheme(mpThemePtr);
286 }
287 }
288 else if (mpThemePtr && !mxShapeFilterBase->getCurrentTheme())
289 {
290 mxShapeFilterBase->setCurrentTheme(mpThemePtr);
291 }
292
293 createFastChildContext(Element, Attribs);
294 }
295
296 // Entering VML block (startFastElement() is called for the outermost tag),
297 // handle possible recursion.
299 mpDrawing->getShapes().pushMark();
300
301 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
302
303 if (xContextHandler.is())
304 xContextHandler->startFastElement(Element, Attribs);
305}
306
308(const OUString & Namespace, const OUString & Name,
309 const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
310{
312 mpDrawing->getShapes().pushMark();
313
314 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
315
316 if (xContextHandler.is())
317 xContextHandler->startUnknownElement(Namespace, Name, Attribs);
318}
319
320void SAL_CALL ShapeContextHandler::endFastElement(::sal_Int32 Element)
321{
322 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
323
324 if (xContextHandler.is())
325 xContextHandler->endFastElement(Element);
326 // In case a textbox is sent, and later we get additional properties for
327 // the textbox, then the wps context is not cleared, so do that here.
328 if (Element != (NMSP_wps | XML_wsp))
329 return;
330
331 uno::Reference<lang::XServiceInfo> xServiceInfo(mxSavedShape, uno::UNO_QUERY);
332 bool bTextFrame = xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.text.TextFrame");
333 bool bTextBox = false;
334 if (!bTextFrame)
335 {
336 uno::Reference<beans::XPropertySet> xPropertySet(mxSavedShape, uno::UNO_QUERY);
337 if (xPropertySet.is())
338 xPropertySet->getPropertyValue("TextBox") >>= bTextBox;
339 }
340 if (bTextFrame || bTextBox)
341 mxWpsContext.clear();
342 mxSavedShape.clear();
343}
344
346(const OUString & Namespace,
347 const OUString & Name)
348{
349 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
350
351 if (xContextHandler.is())
352 xContextHandler->endUnknownElement(Namespace, Name);
353}
354
355uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
357(::sal_Int32 Element,
358 const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
359{
360 uno::Reference< xml::sax::XFastContextHandler > xResult;
361 uno::Reference< xml::sax::XFastContextHandler > xContextHandler(getContextHandler(Element));
362
363 if (xContextHandler.is())
364 xResult.set(xContextHandler->createFastChildContext
365 (Element, Attribs));
366
367 return xResult;
368}
369
370uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
372(const OUString & Namespace,
373 const OUString & Name,
374 const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
375{
376 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
377
378 if (xContextHandler.is())
379 return xContextHandler->createUnknownChildContext
380 (Namespace, Name, Attribs);
381
382 return uno::Reference< xml::sax::XFastContextHandler >();
383}
384
385void SAL_CALL ShapeContextHandler::characters(const OUString & aChars)
386{
387 uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
388
389 if (xContextHandler.is())
390 xContextHandler->characters(aChars);
391}
392
393uno::Reference< drawing::XShape >
395{
396 uno::Reference< drawing::XShape > xResult;
397 uno::Reference< drawing::XShapes > xShapes = mxDrawPage;
398
399 if (mxShapeFilterBase && xShapes.is())
400 {
402 {
403 mpDrawing->finalizeFragmentImport();
404 if( std::shared_ptr< vml::ShapeBase > pShape = mpDrawing->getShapes().takeLastShape() )
405 xResult = pShape->convertAndInsert( xShapes );
406 // Only now remove the recursion mark, because getShape() is called in writerfilter
407 // after endFastElement().
408 mpDrawing->getShapes().popMark();
409 }
410 else if (mxDiagramShapeContext.is())
411 {
412 basegfx::B2DHomMatrix aMatrix;
413 if (mpShape->getExtDrawings().empty())
414 {
415 mpShape->addShape( *mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, mpShape->getFillProperties() );
416 xResult = mpShape->getXShape();
417 }
418 else
419 {
420 // Prerendered diagram output is available, then use that, and throw away the original result.
421 for (auto const& extDrawing : mpShape->getExtDrawings())
422 {
423 OUString aFragmentPath(mxDiagramShapeContext->getFragmentPathFromRelId(extDrawing));
424 oox::drawingml::ShapePtr pShapePtr = std::make_shared<Shape>( "com.sun.star.drawing.GroupShape" );
425 pShapePtr->setDiagramType();
426 mxShapeFilterBase->importFragment(new ShapeDrawingFragmentHandler(*mxShapeFilterBase, aFragmentPath, pShapePtr));
427 pShapePtr->setDiagramDoms(mpShape->getDiagramDoms());
428 pShapePtr->keepDiagramDrawing(*mxShapeFilterBase, aFragmentPath);
429
430 if (mpShape->getFontRefColorForNodes().isUsed())
431 applyFontRefColor(pShapePtr, mpShape->getFontRefColorForNodes());
432
433 // migrate IDiagramHelper to new oox::Shape (from mpShape which was loaded
434 // to pShapePtr where the geometry is now constructed)
435 mpShape->migrateDiagramHelperToNewShape(pShapePtr);
436
437 if (!mpShape->getChildren().empty())
438 {
439 // first child is diagram background - we want to keep it, as drawingML fallback doesn't contain it
440 auto& aChildren = pShapePtr->getChildren();
441 ShapePtr pBackground = mpShape->getChildren().front();
442 aChildren.insert(aChildren.begin(), pBackground);
443 }
444
445 pShapePtr->addShape( *mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShapePtr->getFillProperties() );
446 xResult = pShapePtr->getXShape();
447 }
448 mpShape.reset();
449 }
450 mxDiagramShapeContext.clear();
451 }
452 else if (mxLockedCanvasContext.is())
453 {
454 ShapePtr pShape = mxLockedCanvasContext->getShape();
455 if (pShape)
456 {
457 basegfx::B2DHomMatrix aMatrix;
458 pShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShape->getFillProperties());
459 xResult = pShape->getXShape();
460 mxLockedCanvasContext.clear();
461 }
462 }
463 //NMSP_dmlChart == getNamespace( mnStartToken ) check is introduced to make sure that
464 //mnStartToken is set as NMSP_dmlChart in setStartToken.
465 //Only in case it is set then only the below block of code for ChartShapeContext should be executed.
466 else if (mxChartShapeContext.is() && (NMSP_dmlChart == getNamespace( getStartToken() )))
467 {
468 basegfx::B2DHomMatrix aMatrix;
469 oox::drawingml::ShapePtr xShapePtr( mxChartShapeContext->getShape());
470 // See SwXTextDocument::createInstance(), ODF import uses the same hack.
471 xShapePtr->setServiceName("com.sun.star.drawing.temporaryForXMLImportOLE2Shape");
472 xShapePtr->addShape( *mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, xShapePtr->getFillProperties() );
473 xResult = xShapePtr->getXShape();
474 mxChartShapeContext.clear();
475 }
476 else if (mxWpsContext.is())
477 {
478 ShapePtr pShape = mxWpsContext->getShape();
479 if (pShape)
480 {
481 basegfx::B2DHomMatrix aMatrix;
482 pShape->setPosition(maPosition);
483 pShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShape->getFillProperties());
484 xResult = pShape->getXShape();
485 mxSavedShape = xResult;
486 mxWpsContext.clear();
487 }
488 }
489 else if (mxWpgContext.is())
490 {
491 ShapePtr pShape = mxWpgContext->getShape();
492 if (pShape)
493 {
494 basegfx::B2DHomMatrix aMatrix;
495 pShape->setPosition(maPosition);
496 pShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShape->getFillProperties());
497 xResult = pShape->getXShape();
498 mxSavedShape = xResult;
499 mxWpgContext.clear();
500 }
501 }
502 else if (mpShape)
503 {
504 basegfx::B2DHomMatrix aTransformation;
505
506 if (maPosition.X != 0 || maPosition.Y != 0)
507 {
508 // We got a position from writerfilter/, store that in the shape, otherwise the
509 // position won't be set.
510 mpShape->setWps(true);
511 mpShape->setPosition(maPosition);
512 }
513
514 mpShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aTransformation, mpShape->getFillProperties() );
515 xResult.set(mpShape->getXShape());
516 mxGraphicShapeContext.clear( );
517 }
518 }
519
520 if (xResult)
522 return xResult;
523}
524
525void ShapeContextHandler::setDrawPage(const css::uno::Reference< css::drawing::XDrawPage > & the_value)
526{
527 mxDrawPage = the_value;
528}
529
530void ShapeContextHandler::setModel(const css::uno::Reference< css::frame::XModel > & the_value)
531{
532 if( !mxShapeFilterBase.is() )
533 throw uno::RuntimeException();
534 uno::Reference<lang::XComponent> xComp(the_value, uno::UNO_QUERY_THROW);
535 mxShapeFilterBase->setTargetDocument(xComp);
536}
537
538void ShapeContextHandler::setRelationFragmentPath(const OUString & the_value)
539{
540 msRelationFragmentPath = the_value;
541}
542
544{
545 assert(mnStartTokenStack.size() && "This stack must not be empty!");
546 return mnStartTokenStack.top();
547}
548
550{
551 if (mnStartTokenStack.size() > 1)
552 mnStartTokenStack.pop();
553}
554
555void ShapeContextHandler::pushStartToken( sal_Int32 _starttoken )
556{
557 mnStartTokenStack.push(_starttoken);
558}
559
560void ShapeContextHandler::setPosition(const awt::Point& rPosition)
561{
562 maPosition = rPosition;
563}
564
565void ShapeContextHandler::setSize(const awt::Size& rSize)
566{
567 maSize = rSize;
568}
569
570void ShapeContextHandler::setDocumentProperties(const uno::Reference<document::XDocumentProperties>& xDocProps)
571{
572 mxDocumentProperties = xDocProps;
573 mxShapeFilterBase->checkDocumentProperties(mxDocumentProperties);
574}
575
576void ShapeContextHandler::setMediaDescriptor(const uno::Sequence<beans::PropertyValue>& rMediaDescriptor)
577{
578 maMediaDescriptor = rMediaDescriptor;
579}
580
581void ShapeContextHandler::setGraphicMapper(css::uno::Reference<css::graphic::XGraphicMapper> const & rxGraphicMapper)
582{
583 mxShapeFilterBase->setGraphicMapper(rxGraphicMapper);
584}
585
587 const oox::drawingml::Color& rFontRefColor)
588{
589 pShape->getShapeStyleRefs()[XML_fontRef].maPhClr = rFontRefColor;
590 std::vector<oox::drawingml::ShapePtr>& vChildren = pShape->getChildren();
591 for (auto const& child : vChildren)
592 {
593 applyFontRefColor(child, rFontRefColor);
594 }
595}
596}
597
598/* 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