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 
26 #include "LockedCanvasContext.hxx"
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>
36 #include <oox/drawingml/theme.hxx>
39 #include <memory>
40 #include <sal/log.hxx>
41 
42 using namespace ::com::sun::star;
43 
44 namespace oox::shape {
45 using namespace core;
46 using namespace drawingml;
47 
49  mnStartToken(0),
50  mxShapeFilterBase(xFilterBase)
51 {
52 }
53 
55 {
56 }
57 
58 uno::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 
74  return mxLockedCanvasContext;
75 }
76 
77 /*
78  * This method creates new ChartGraphicDataContext Object.
79  */
80 uno::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 
99  return mxChartShapeContext;
100 }
101 
102 uno::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 
133 uno::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  mxWpgContext.set(static_cast<oox::core::ContextHandler*>(new WpgContext(*rFragmentHandler)));
143  break;
144  default:
145  break;
146  }
147  }
148 
149  return mxWpgContext;
150 }
151 
152 uno::Reference<xml::sax::XFastContextHandler> const &
154 {
155  if (! mxGraphicShapeContext.is())
156  {
157  auto pFragmentHandler = std::make_shared<ShapeFragmentHandler>(*mxShapeFilterBase, msRelationFragmentPath);
158  ShapePtr pMasterShape;
159 
160  switch (Element & 0xffff)
161  {
162  case XML_graphic:
163  mpShape = std::make_shared<Shape>("com.sun.star.drawing.GraphicObjectShape" );
165  (new GraphicalObjectFrameContext(*pFragmentHandler, pMasterShape, mpShape, true));
166  break;
167  case XML_pic:
168  mpShape = std::make_shared<Shape>("com.sun.star.drawing.GraphicObjectShape" );
170  (new GraphicShapeContext(*pFragmentHandler, pMasterShape, mpShape));
171  break;
172  default:
173  break;
174  }
175  }
176 
177  return mxGraphicShapeContext;
178 }
179 
180 uno::Reference<xml::sax::XFastContextHandler> const &
182 {
183  if (!mxDrawingFragmentHandler.is())
184  {
185  mpDrawing = std::make_shared<oox::vml::Drawing>( *mxShapeFilterBase, mxDrawPage, oox::vml::VMLDRAWING_WORD );
187  (static_cast<ContextHandler *>
189  ( *mxShapeFilterBase, msRelationFragmentPath, *mpDrawing )));
190  }
191  else
192  {
193  // Reset the handler if fragment path has changed
194  OUString sHandlerFragmentPath = dynamic_cast<ContextHandler&>(*mxDrawingFragmentHandler).getFragmentPath();
195  if ( msRelationFragmentPath != sHandlerFragmentPath )
196  {
197  mxDrawingFragmentHandler.clear();
199  (static_cast<ContextHandler *>
202  }
203  }
205 }
206 
207 uno::Reference<xml::sax::XFastContextHandler> const &
209 {
210  if (!mxDiagramShapeContext.is())
211  {
212  auto pFragmentHandler = std::make_shared<ShapeFragmentHandler>(*mxShapeFilterBase, msRelationFragmentPath);
213  mpShape = std::make_shared<Shape>();
214  mxDiagramShapeContext.set(new DiagramGraphicDataContext(*pFragmentHandler, mpShape));
215  }
216 
217  return mxDiagramShapeContext;
218 }
219 
220 uno::Reference<xml::sax::XFastContextHandler>
222 {
223  uno::Reference<xml::sax::XFastContextHandler> xResult;
224 
225  switch (getNamespace( mnStartToken ))
226  {
227  case NMSP_doc:
228  case NMSP_vml:
229  xResult.set(getDrawingShapeContext());
230  break;
231  case NMSP_dmlDiagram:
232  xResult.set(getDiagramShapeContext());
233  break;
234  case NMSP_dmlLockedCanvas:
235  xResult.set(getLockedCanvasContext(mnStartToken));
236  break;
237  case NMSP_dmlChart:
238  xResult.set(getChartShapeContext(mnStartToken));
239  break;
240  case NMSP_wps:
241  xResult.set(getWpsContext(mnStartToken, nElement));
242  break;
243  case NMSP_wpg:
244  xResult.set(getWpgContext(mnStartToken));
245  break;
246  default:
247  xResult.set(getGraphicShapeContext(mnStartToken));
248  break;
249  }
250 
251  return xResult;
252 }
253 
254 // css::xml::sax::XFastContextHandler:
256 (::sal_Int32 Element,
257  const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
258 {
259  mxShapeFilterBase->filter(maMediaDescriptor);
260 
261  if (Element == DGM_TOKEN(relIds) || Element == LC_TOKEN(lockedCanvas) || Element == C_TOKEN(chart) ||
262  Element == WPS_TOKEN(wsp) || Element == WPG_TOKEN(wgp) || Element == OOX_TOKEN(dmlPicture, pic))
263  {
264  // Parse the theme relation, if available; the diagram won't have colors without it.
265  if (!mpThemePtr && !msRelationFragmentPath.isEmpty())
266  {
267  mpThemePtr = std::make_shared<Theme>();
268  // Get Target for Type = "officeDocument" from _rels/.rels file
269  // aOfficeDocumentFragmentPath is pointing to "word/document.xml" for docx & to "ppt/presentation.xml" for pptx
270  FragmentHandlerRef rFragmentHandlerRef(new ShapeFragmentHandler(*mxShapeFilterBase, "/"));
271  OUString aOfficeDocumentFragmentPath = rFragmentHandlerRef->getFragmentPathFromFirstTypeFromOfficeDoc( u"officeDocument" );
272 
273  // Get the theme DO NOT use msRelationFragmentPath for getting theme as for a document there is a single theme in document.xml.rels
274  // and the same is used by header and footer as well.
275  FragmentHandlerRef rFragmentHandler(new ShapeFragmentHandler(*mxShapeFilterBase, aOfficeDocumentFragmentPath));
276  OUString aThemeFragmentPath = rFragmentHandler->getFragmentPathFromFirstTypeFromOfficeDoc( u"theme" );
277 
278  if(!aThemeFragmentPath.isEmpty())
279  {
280  uno::Reference<xml::sax::XFastSAXSerializable> xDoc(mxShapeFilterBase->importFragment(aThemeFragmentPath), uno::UNO_QUERY_THROW);
281  mxShapeFilterBase->importFragment(new ThemeFragmentHandler(*mxShapeFilterBase, aThemeFragmentPath, *mpThemePtr ), xDoc);
282  mxShapeFilterBase->setCurrentTheme(mpThemePtr);
283  }
284  }
285 
286  createFastChildContext(Element, Attribs);
287  }
288 
289  // Entering VML block (startFastElement() is called for the outermost tag),
290  // handle possible recursion.
291  if ( getContextHandler() == getDrawingShapeContext() )
292  mpDrawing->getShapes().pushMark();
293 
294  uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
295 
296  if (xContextHandler.is())
297  xContextHandler->startFastElement(Element, Attribs);
298 }
299 
301 (const OUString & Namespace, const OUString & Name,
302  const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
303 {
304  if ( getContextHandler() == getDrawingShapeContext() )
305  mpDrawing->getShapes().pushMark();
306 
307  uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
308 
309  if (xContextHandler.is())
310  xContextHandler->startUnknownElement(Namespace, Name, Attribs);
311 }
312 
313 void SAL_CALL ShapeContextHandler::endFastElement(::sal_Int32 Element)
314 {
315  uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
316 
317  if (xContextHandler.is())
318  xContextHandler->endFastElement(Element);
319  // In case a textbox is sent, and later we get additional properties for
320  // the textbox, then the wps context is not cleared, so do that here.
321  if (Element != (NMSP_wps | XML_wsp))
322  return;
323 
324  uno::Reference<lang::XServiceInfo> xServiceInfo(mxSavedShape, uno::UNO_QUERY);
325  bool bTextFrame = xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.text.TextFrame");
326  bool bTextBox = false;
327  if (!bTextFrame)
328  {
329  uno::Reference<beans::XPropertySet> xPropertySet(mxSavedShape, uno::UNO_QUERY);
330  if (xPropertySet.is())
331  xPropertySet->getPropertyValue("TextBox") >>= bTextBox;
332  }
333  if (bTextFrame || bTextBox)
334  mxWpsContext.clear();
335  mxSavedShape.clear();
336 }
337 
339 (const OUString & Namespace,
340  const OUString & Name)
341 {
342  uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
343 
344  if (xContextHandler.is())
345  xContextHandler->endUnknownElement(Namespace, Name);
346 }
347 
348 uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
350 (::sal_Int32 Element,
351  const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
352 {
353  uno::Reference< xml::sax::XFastContextHandler > xResult;
354  uno::Reference< xml::sax::XFastContextHandler > xContextHandler(getContextHandler(Element));
355 
356  if (xContextHandler.is())
357  xResult.set(xContextHandler->createFastChildContext
358  (Element, Attribs));
359 
360  return xResult;
361 }
362 
363 uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
365 (const OUString & Namespace,
366  const OUString & Name,
367  const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
368 {
369  uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
370 
371  if (xContextHandler.is())
372  return xContextHandler->createUnknownChildContext
373  (Namespace, Name, Attribs);
374 
375  return uno::Reference< xml::sax::XFastContextHandler >();
376 }
377 
378 void SAL_CALL ShapeContextHandler::characters(const OUString & aChars)
379 {
380  uno::Reference<XFastContextHandler> xContextHandler(getContextHandler());
381 
382  if (xContextHandler.is())
383  xContextHandler->characters(aChars);
384 }
385 
386 uno::Reference< drawing::XShape >
388 {
389  uno::Reference< drawing::XShape > xResult;
390  uno::Reference< drawing::XShapes > xShapes = mxDrawPage;
391 
392  if (mxShapeFilterBase && xShapes.is())
393  {
395  {
396  mpDrawing->finalizeFragmentImport();
397  if( std::shared_ptr< vml::ShapeBase > pShape = mpDrawing->getShapes().takeLastShape() )
398  xResult = pShape->convertAndInsert( xShapes );
399  // Only now remove the recursion mark, because getShape() is called in writerfilter
400  // after endFastElement().
401  mpDrawing->getShapes().popMark();
402  }
403  else if (mxDiagramShapeContext.is())
404  {
405  basegfx::B2DHomMatrix aMatrix;
406  if (mpShape->getExtDrawings().empty())
407  {
408  mpShape->addShape( *mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, mpShape->getFillProperties() );
409  xResult = mpShape->getXShape();
410  }
411  else
412  {
413  // Prerendered diagram output is available, then use that, and throw away the original result.
414  for (auto const& extDrawing : mpShape->getExtDrawings())
415  {
416  DiagramGraphicDataContext* pDiagramGraphicDataContext = dynamic_cast<DiagramGraphicDataContext*>(mxDiagramShapeContext.get());
417  if (!pDiagramGraphicDataContext)
418  break;
419  OUString aFragmentPath(pDiagramGraphicDataContext->getFragmentPathFromRelId(extDrawing));
420  oox::drawingml::ShapePtr pShapePtr = std::make_shared<Shape>( "com.sun.star.drawing.GroupShape" );
421  pShapePtr->setDiagramType();
422  mxShapeFilterBase->importFragment(new ShapeDrawingFragmentHandler(*mxShapeFilterBase, aFragmentPath, pShapePtr));
423  pShapePtr->setDiagramDoms(mpShape->getDiagramDoms());
424  pShapePtr->keepDiagramDrawing(*mxShapeFilterBase, aFragmentPath);
425 
426  if (!mpShape->getChildren().empty())
427  {
428  // first child is diagram background - we want to keep it, as drawingML fallback doesn't contain it
429  auto& aChildren = pShapePtr->getChildren();
430  ShapePtr pBackground = mpShape->getChildren().front();
431  aChildren.insert(aChildren.begin(), pBackground);
432  }
433 
434  pShapePtr->addShape( *mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShapePtr->getFillProperties() );
435  xResult = pShapePtr->getXShape();
436  }
437  mpShape.reset();
438  }
439  mxDiagramShapeContext.clear();
440  }
441  else if (mxLockedCanvasContext.is())
442  {
443  ShapePtr pShape = dynamic_cast<LockedCanvasContext&>(*mxLockedCanvasContext).getShape();
444  if (pShape)
445  {
446  basegfx::B2DHomMatrix aMatrix;
447  pShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShape->getFillProperties());
448  xResult = pShape->getXShape();
449  mxLockedCanvasContext.clear();
450  }
451  }
452  //NMSP_dmlChart == getNamespace( mnStartToken ) check is introduced to make sure that
453  //mnStartToken is set as NMSP_dmlChart in setStartToken.
454  //Only in case it is set then only the below block of code for ChartShapeContext should be executed.
455  else if (mxChartShapeContext.is() && (NMSP_dmlChart == getNamespace( mnStartToken )))
456  {
457  ChartGraphicDataContext* pChartGraphicDataContext = dynamic_cast<ChartGraphicDataContext*>(mxChartShapeContext.get());
458  if (pChartGraphicDataContext)
459  {
460  basegfx::B2DHomMatrix aMatrix;
461  oox::drawingml::ShapePtr xShapePtr( pChartGraphicDataContext->getShape());
462  // See SwXTextDocument::createInstance(), ODF import uses the same hack.
463  xShapePtr->setServiceName("com.sun.star.drawing.temporaryForXMLImportOLE2Shape");
464  xShapePtr->addShape( *mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, xShapePtr->getFillProperties() );
465  xResult = xShapePtr->getXShape();
466  }
467  mxChartShapeContext.clear();
468  }
469  else if (mxWpsContext.is())
470  {
471  ShapePtr pShape = dynamic_cast<WpsContext&>(*mxWpsContext).getShape();
472  if (pShape)
473  {
474  basegfx::B2DHomMatrix aMatrix;
475  pShape->setPosition(maPosition);
476  pShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShape->getFillProperties());
477  xResult = pShape->getXShape();
478  mxSavedShape = xResult;
479  mxWpsContext.clear();
480  }
481  }
482  else if (mxWpgContext.is())
483  {
484  ShapePtr pShape = dynamic_cast<WpgContext&>(*mxWpgContext).getShape();
485  if (pShape)
486  {
487  basegfx::B2DHomMatrix aMatrix;
488  pShape->setPosition(maPosition);
489  pShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShape->getFillProperties());
490  xResult = pShape->getXShape();
491  mxSavedShape = xResult;
492  mxWpgContext.clear();
493  }
494  }
495  else if (mpShape)
496  {
497  basegfx::B2DHomMatrix aTransformation;
498 
499  if (maPosition.X != 0 || maPosition.Y != 0)
500  {
501  // We got a position from writerfilter/, store that in the shape, otherwise the
502  // position won't be set.
503  mpShape->setWps(true);
504  mpShape->setPosition(maPosition);
505  }
506 
507  mpShape->addShape(*mxShapeFilterBase, mpThemePtr.get(), xShapes, aTransformation, mpShape->getFillProperties() );
508  xResult.set(mpShape->getXShape());
509  mxGraphicShapeContext.clear( );
510  }
511  }
512 
513  return xResult;
514 }
515 
516 void ShapeContextHandler::setDrawPage(const css::uno::Reference< css::drawing::XDrawPage > & the_value)
517 {
518  mxDrawPage = the_value;
519 }
520 
521 void ShapeContextHandler::setModel(const css::uno::Reference< css::frame::XModel > & the_value)
522 {
523  if( !mxShapeFilterBase.is() )
524  throw uno::RuntimeException();
525  uno::Reference<lang::XComponent> xComp(the_value, uno::UNO_QUERY_THROW);
526  mxShapeFilterBase->setTargetDocument(xComp);
527 }
528 
529 void ShapeContextHandler::setRelationFragmentPath(const OUString & the_value)
530 {
531  msRelationFragmentPath = the_value;
532 }
533 
535 {
536  return mnStartToken;
537 }
538 
539 void ShapeContextHandler::setStartToken( sal_Int32 _starttoken )
540 {
541  mnStartToken = _starttoken;
542 }
543 
544 void ShapeContextHandler::setPosition(const awt::Point& rPosition)
545 {
546  maPosition = rPosition;
547 }
548 
549 void ShapeContextHandler::setDocumentProperties(const uno::Reference<document::XDocumentProperties>& xDocProps)
550 {
551  mxDocumentProperties = xDocProps;
552  mxShapeFilterBase->checkDocumentProperties(mxDocumentProperties);
553 }
554 
555 void ShapeContextHandler::setMediaDescriptor(const uno::Sequence<beans::PropertyValue>& rMediaDescriptor)
556 {
557  maMediaDescriptor = rMediaDescriptor;
558 }
559 
560 void ShapeContextHandler::setGraphicMapper(css::uno::Reference<css::graphic::XGraphicMapper> const & rxGraphicMapper)
561 {
562  mxShapeFilterBase->setGraphicMapper(rxGraphicMapper);
563 }
564 
565 }
566 
567 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::drawing::XDrawPage > mxDrawPage
css::uno::Reference< XFastContextHandler > const & getLockedCanvasContext(sal_Int32 nElement)
css::uno::Reference< XFastContextHandler > mxDiagramShapeContext
void setPosition(const css::awt::Point &rPosition)
void setMediaDescriptor(const css::uno::Sequence< css::beans::PropertyValue > &rMediaDescriptor)
void setModel(const css::uno::Reference< css::frame::XModel > &the_value)
css::uno::Reference< XFastContextHandler > mxWpgContext
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 > const & getChartShapeContext(::sal_Int32 Element)
const OUString & getFragmentPath() const
Returns the full path of the current fragment.
void setDocumentProperties(const css::uno::Reference< css::document::XDocumentProperties > &xDocProps)
css::uno::Reference< XFastContextHandler > const & getDrawingShapeContext()
Locked canvas is kind of a container for drawingml shapes: it can even contain group shapes...
css::uno::Reference< XFastContextHandler > const & getWpsContext(sal_Int32 nStartElement, sal_Int32 nElement)
css::uno::Reference< XFastContextHandler > const & getGraphicShapeContext(::sal_Int32 Element)
Generic (i.e. not specific to PPTX) handler for the prerendered diagram parsing.
css::uno::Reference< XFastContextHandler > mxChartShapeContext
::rtl::Reference< ShapeFilterBase > mxShapeFilterBase
css::uno::Reference< XFastContextHandler > mxDrawingFragmentHandler
const oox::drawingml::ShapePtr & getShape() const
ShapeContextHandler(const rtl::Reference< ShapeFilterBase > &xFilterBase)
void setRelationFragmentPath(const OUString &the_value)
css::uno::Sequence< css::beans::PropertyValue > maMediaDescriptor
void setStartToken(sal_Int32 _starttoken)
css::uno::Reference< XFastContextHandler > getContextHandler(sal_Int32 nElement=0)
css::uno::Reference< XFastContextHandler > const & getWpgContext(sal_Int32 nElement)
const oox::drawingml::ShapePtr & getShape() const
Definition: WpgContext.hxx:28
css::uno::Reference< XFastContextHandler > mxGraphicShapeContext
void setGraphicMapper(css::uno::Reference< css::graphic::XGraphicMapper > const &rGraphicMapper)
float u
css::uno::Reference< css::drawing::XShape > mxSavedShape
OUString getFragmentPathFromRelId(const OUString &rRelId) const
Returns the full fragment path for the passed relation identifier.
css::uno::Reference< css::drawing::XShape > getShape()
Word: One shape per drawing.
Definition: vmldrawing.hxx:55
virtual void SAL_CALL characters(const OUString &aChars) override
Wps is the drawingML equivalent of v:shape.
Definition: WpsContext.hxx:25
css::uno::Reference< css::document::XDocumentProperties > mxDocumentProperties
css::uno::Reference< XFastContextHandler > mxWpsContext
void setDrawPage(const css::uno::Reference< css::drawing::XDrawPage > &the_value)
css::uno::Reference< XFastContextHandler > mxLockedCanvasContext
std::shared_ptr< vml::Drawing > mpDrawing
virtual void SAL_CALL endUnknownElement(const OUString &Namespace, const OUString &Name) override
std::shared_ptr< Shape > ShapePtr
css::uno::Reference< XFastContextHandler > const & getDiagramShapeContext()
virtual void SAL_CALL startUnknownElement(const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(::sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
Wpg is the drawingML equivalent of v:group.
Definition: WpgContext.hxx:19
virtual void SAL_CALL endFastElement(::sal_Int32 Element) override
virtual void SAL_CALL startFastElement(::sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
const ShapePtr & getShape() const