LibreOffice Module xmloff (master)  1
XMLImageMapContext.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 <XMLImageMapContext.hxx>
21 #include <rtl/ustrbuf.hxx>
22 #include <com/sun/star/uno/Reference.h>
23 #include <com/sun/star/beans/XPropertySet.hpp>
24 #include <com/sun/star/beans/XPropertySetInfo.hpp>
25 #include <com/sun/star/frame/XModel.hpp>
26 #include <com/sun/star/xml/sax/XAttributeList.hpp>
27 #include <com/sun/star/container/XIndexContainer.hpp>
28 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
29 #include <com/sun/star/document/XEventsSupplier.hpp>
30 #include <com/sun/star/awt/Rectangle.hpp>
31 #include <xmloff/xmltoken.hxx>
32 #include <xmloff/xmlimp.hxx>
33 #include <xmloff/xmltkmap.hxx>
34 #include <xmloff/xmlnamespace.hxx>
35 #include <xmloff/namespacemap.hxx>
36 #include <xmloff/xmluconv.hxx>
37 #include <xexptran.hxx>
38 #include <xmloff/xmlerror.hxx>
41 #include <tools/debug.hxx>
44 
45 using namespace ::com::sun::star;
46 using namespace ::xmloff::token;
47 
48 using ::com::sun::star::beans::XPropertySet;
49 using ::com::sun::star::beans::XPropertySetInfo;
50 using ::com::sun::star::container::XIndexContainer;
51 using ::com::sun::star::lang::XMultiServiceFactory;
52 using ::com::sun::star::uno::Reference;
53 using ::com::sun::star::uno::UNO_QUERY;
54 using ::com::sun::star::xml::sax::XAttributeList;
55 using ::com::sun::star::uno::XInterface;
56 using ::com::sun::star::uno::Any;
57 using ::com::sun::star::document::XEventsSupplier;
58 
59 namespace {
60 
62 {
63  XML_TOK_IMAP_URL,
64  XML_TOK_IMAP_X,
65  XML_TOK_IMAP_Y,
66  XML_TOK_IMAP_CENTER_X,
67  XML_TOK_IMAP_CENTER_Y,
68  XML_TOK_IMAP_WIDTH,
69  XML_TOK_IMAP_HEIGHT,
70  XML_TOK_IMAP_POINTS,
71  XML_TOK_IMAP_VIEWBOX,
72  XML_TOK_IMAP_NOHREF,
73  XML_TOK_IMAP_NAME,
74  XML_TOK_IMAP_RADIUS,
75  XML_TOK_IMAP_TARGET
76 };
77 
78 }
79 
81 {
82  { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_IMAP_URL },
83  { XML_NAMESPACE_OFFICE, XML_NAME, XML_TOK_IMAP_NAME },
84  { XML_NAMESPACE_DRAW, XML_NOHREF, XML_TOK_IMAP_NOHREF },
85  { XML_NAMESPACE_SVG, XML_X, XML_TOK_IMAP_X },
86  { XML_NAMESPACE_SVG, XML_Y, XML_TOK_IMAP_Y },
87  { XML_NAMESPACE_SVG, XML_CX, XML_TOK_IMAP_CENTER_X },
88  { XML_NAMESPACE_SVG, XML_CY, XML_TOK_IMAP_CENTER_Y },
89  { XML_NAMESPACE_SVG, XML_WIDTH, XML_TOK_IMAP_WIDTH },
90  { XML_NAMESPACE_SVG, XML_HEIGHT, XML_TOK_IMAP_HEIGHT },
91  { XML_NAMESPACE_SVG, XML_R, XML_TOK_IMAP_RADIUS },
92  { XML_NAMESPACE_SVG, XML_VIEWBOX, XML_TOK_IMAP_VIEWBOX },
93  { XML_NAMESPACE_DRAW, XML_POINTS, XML_TOK_IMAP_POINTS },
94  { XML_NAMESPACE_OFFICE, XML_TARGET_FRAME_NAME, XML_TOK_IMAP_TARGET },
96 };
97 
98 namespace {
99 
100 class XMLImageMapObjectContext : public SvXMLImportContext
101 {
102 
103 protected:
104 
105  Reference<XIndexContainer> xImageMap;
106  Reference<XPropertySet> xMapEntry;
107 
108  OUString sUrl;
109  OUString sTargt;
110  OUStringBuffer sDescriptionBuffer;
111  OUStringBuffer sTitleBuffer;
112  OUString sNam;
113  bool bIsActive;
114 
115  bool bValid;
116 
117 public:
118 
119  XMLImageMapObjectContext(
120  SvXMLImport& rImport,
121  sal_uInt16 nPrefix,
122  const OUString& rLocalName,
123  css::uno::Reference<css::container::XIndexContainer> const & xMap,
124  const char* pServiceName);
125 
126  void StartElement(
127  const css::uno::Reference<css::xml::sax::XAttributeList >& xAttrList ) override;
128 
129  void EndElement() override;
130 
132  sal_uInt16 nPrefix,
133  const OUString& rLocalName,
134  const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override;
135 
136 protected:
137 
138  virtual void ProcessAttribute(
140  const OUString& rValue);
141 
142  virtual void Prepare(
143  css::uno::Reference<css::beans::XPropertySet> & rPropertySet);
144 };
145 
146 }
147 
148 XMLImageMapObjectContext::XMLImageMapObjectContext(
149  SvXMLImport& rImport,
150  sal_uInt16 nPrefix,
151  const OUString& rLocalName,
152  Reference<XIndexContainer> const & xMap,
153  const char* pServiceName) :
154  SvXMLImportContext(rImport, nPrefix, rLocalName),
155  xImageMap(xMap),
156  bIsActive(true),
157  bValid(false)
158 {
159  DBG_ASSERT(nullptr != pServiceName,
160  "Please supply the image map object service name");
161 
162  Reference<XMultiServiceFactory> xFactory(GetImport().GetModel(),UNO_QUERY);
163  if( !xFactory.is() )
164  return;
165 
166  Reference<XInterface> xIfc = xFactory->createInstance(
167  OUString::createFromAscii(pServiceName));
168  DBG_ASSERT(xIfc.is(), "can't create image map object!");
169  if( xIfc.is() )
170  {
171  Reference<XPropertySet> xPropertySet( xIfc, UNO_QUERY );
172 
173  xMapEntry = xPropertySet;
174  }
175  // else: can't create service -> ignore
176  // else: can't even get factory -> ignore
177 }
178 
179 void XMLImageMapObjectContext::StartElement(
180  const Reference<XAttributeList >& xAttrList )
181 {
182  static const SvXMLTokenMap aMap(aImageMapObjectTokenMap);
183 
184  sal_Int16 nLength = xAttrList->getLength();
185  for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++)
186  {
187  OUString sLocalName;
188  sal_uInt16 nPrefix = GetImport().GetNamespaceMap().
189  GetKeyByAttrName( xAttrList->getNameByIndex(nAttr),
190  &sLocalName );
191  OUString sValue = xAttrList->getValueByIndex(nAttr);
192 
193  ProcessAttribute(
194  static_cast<enum XMLImageMapToken>(aMap.Get(nPrefix, sLocalName)), sValue);
195  }
196 }
197 
198 void XMLImageMapObjectContext::EndElement()
199 {
200  // only create and insert image map object if validity flag is set
201  // (and we actually have an image map)
202  if ( bValid && xImageMap.is() && xMapEntry.is() )
203  {
204  // set values
205  Prepare( xMapEntry );
206 
207  // insert into image map
208  xImageMap->insertByIndex( xImageMap->getCount(), Any(xMapEntry) );
209  }
210  // else: not valid -> don't create and insert
211 }
212 
213 SvXMLImportContextRef XMLImageMapObjectContext::CreateChildContext(
214  sal_uInt16 nPrefix,
215  const OUString& rLocalName,
216  const Reference<XAttributeList> & /*xAttrList*/ )
217 {
218  if ( (XML_NAMESPACE_OFFICE == nPrefix) &&
219  IsXMLToken(rLocalName, XML_EVENT_LISTENERS) )
220  {
221  Reference<XEventsSupplier> xEvents( xMapEntry, UNO_QUERY );
222  return new XMLEventsImportContext(
223  GetImport(), nPrefix, rLocalName, xEvents);
224  }
225  else if ( (XML_NAMESPACE_SVG == nPrefix) &&
226  IsXMLToken(rLocalName, XML_TITLE) )
227  {
228  return new XMLStringBufferImportContext(
229  GetImport(), nPrefix, rLocalName, sTitleBuffer);
230  }
231  else if ( (XML_NAMESPACE_SVG == nPrefix) &&
232  IsXMLToken(rLocalName, XML_DESC) )
233  {
234  return new XMLStringBufferImportContext(
235  GetImport(), nPrefix, rLocalName, sDescriptionBuffer);
236  }
237  return nullptr;
238 }
239 
240 void XMLImageMapObjectContext::ProcessAttribute(
242  const OUString& rValue)
243 {
244  switch (eToken)
245  {
246  case XML_TOK_IMAP_URL:
247  sUrl = GetImport().GetAbsoluteReference(rValue);
248  break;
249 
250  case XML_TOK_IMAP_TARGET:
251  sTargt = rValue;
252  break;
253 
254  case XML_TOK_IMAP_NOHREF:
255  bIsActive = ! IsXMLToken(rValue, XML_NOHREF);
256  break;
257 
258  case XML_TOK_IMAP_NAME:
259  sNam = rValue;
260  break;
261  default:
262  // do nothing
263  break;
264  }
265 }
266 
267 void XMLImageMapObjectContext::Prepare(
268  Reference<XPropertySet> & rPropertySet)
269 {
270  rPropertySet->setPropertyValue( "URL", Any( sUrl ) );
271  rPropertySet->setPropertyValue( "Title", Any( sTitleBuffer.makeStringAndClear() ) );
272  rPropertySet->setPropertyValue( "Description", Any( sDescriptionBuffer.makeStringAndClear() ) );
273  rPropertySet->setPropertyValue( "Target", Any( sTargt ) );
274  rPropertySet->setPropertyValue( "IsActive", Any( bIsActive ) );
275  rPropertySet->setPropertyValue( "Name", Any( sNam ) );
276 }
277 
278 namespace {
279 
280 class XMLImageMapRectangleContext : public XMLImageMapObjectContext
281 {
282  awt::Rectangle aRectangle;
283 
284  bool bXOK;
285  bool bYOK;
286  bool bWidthOK;
287  bool bHeightOK;
288 
289 public:
290 
291  XMLImageMapRectangleContext(
292  SvXMLImport& rImport,
293  sal_uInt16 nPrefix,
294  const OUString& rLocalName,
295  css::uno::Reference<css::container::XIndexContainer> const & xMap);
296 
297 protected:
298  virtual void ProcessAttribute(
299  enum XMLImageMapToken eToken,
300  const OUString& rValue) override;
301 
302  virtual void Prepare(
303  css::uno::Reference<css::beans::XPropertySet> & rPropertySet) override;
304 };
305 
306 }
307 
308 XMLImageMapRectangleContext::XMLImageMapRectangleContext(
309  SvXMLImport& rImport,
310  sal_uInt16 nPrefix,
311  const OUString& rLocalName,
312  Reference<XIndexContainer> const & xMap) :
313  XMLImageMapObjectContext(rImport, nPrefix, rLocalName, xMap,
314  "com.sun.star.image.ImageMapRectangleObject"),
315  bXOK(false),
316  bYOK(false),
317  bWidthOK(false),
318  bHeightOK(false)
319 {
320 }
321 
322 void XMLImageMapRectangleContext::ProcessAttribute(
323  enum XMLImageMapToken eToken,
324  const OUString& rValue)
325 {
326  sal_Int32 nTmp;
327  switch (eToken)
328  {
329  case XML_TOK_IMAP_X:
330  if (GetImport().GetMM100UnitConverter().convertMeasureToCore(nTmp,
331  rValue))
332  {
333  aRectangle.X = nTmp;
334  bXOK = true;
335  }
336  break;
337  case XML_TOK_IMAP_Y:
338  if (GetImport().GetMM100UnitConverter().convertMeasureToCore(nTmp,
339  rValue))
340  {
341  aRectangle.Y = nTmp;
342  bYOK = true;
343  }
344  break;
345  case XML_TOK_IMAP_WIDTH:
346  if (GetImport().GetMM100UnitConverter().convertMeasureToCore(nTmp,
347  rValue))
348  {
349  aRectangle.Width = nTmp;
350  bWidthOK = true;
351  }
352  break;
353  case XML_TOK_IMAP_HEIGHT:
354  if (GetImport().GetMM100UnitConverter().convertMeasureToCore(nTmp,
355  rValue))
356  {
357  aRectangle.Height = nTmp;
358  bHeightOK = true;
359  }
360  break;
361  default:
362  XMLImageMapObjectContext::ProcessAttribute(eToken, rValue);
363  }
364 
365  bValid = bHeightOK && bXOK && bYOK && bWidthOK;
366 }
367 
368 void XMLImageMapRectangleContext::Prepare(
369  Reference<XPropertySet> & rPropertySet)
370 {
371  rPropertySet->setPropertyValue( "Boundary", uno::Any(aRectangle) );
372 
373  // common properties handled by super class
374  XMLImageMapObjectContext::Prepare(rPropertySet);
375 }
376 
377 namespace {
378 
379 class XMLImageMapPolygonContext : public XMLImageMapObjectContext
380 {
381  OUString sViewBoxString;
382  OUString sPointsString;
383 
384  bool bViewBoxOK;
385  bool bPointsOK;
386 
387 public:
388 
389  XMLImageMapPolygonContext(
390  SvXMLImport& rImport,
391  sal_uInt16 nPrefix,
392  const OUString& rLocalName,
393  css::uno::Reference<css::container::XIndexContainer> const & xMap);
394 
395 protected:
396  virtual void ProcessAttribute(
397  enum XMLImageMapToken eToken,
398  const OUString& rValue) override;
399 
400  virtual void Prepare(
401  css::uno::Reference<css::beans::XPropertySet> & rPropertySet) override;
402 };
403 
404 }
405 
406 XMLImageMapPolygonContext::XMLImageMapPolygonContext(
407  SvXMLImport& rImport,
408  sal_uInt16 nPrefix,
409  const OUString& rLocalName,
410  Reference<XIndexContainer> const & xMap) :
411  XMLImageMapObjectContext(rImport, nPrefix, rLocalName, xMap,
412  "com.sun.star.image.ImageMapPolygonObject"),
413  bViewBoxOK(false),
414  bPointsOK(false)
415 {
416 }
417 
418 void XMLImageMapPolygonContext::ProcessAttribute(
419  enum XMLImageMapToken eToken,
420  const OUString& rValue)
421 {
422  switch (eToken)
423  {
424  case XML_TOK_IMAP_POINTS:
425  sPointsString = rValue;
426  bPointsOK = true;
427  break;
428  case XML_TOK_IMAP_VIEWBOX:
429  sViewBoxString = rValue;
430  bViewBoxOK = true;
431  break;
432  default:
433  XMLImageMapObjectContext::ProcessAttribute(eToken, rValue);
434  break;
435  }
436 
437  bValid = bViewBoxOK && bPointsOK;
438 }
439 
440 void XMLImageMapPolygonContext::Prepare(Reference<XPropertySet> & rPropertySet)
441 {
442  // process view box
443  SdXMLImExViewBox aViewBox(sViewBoxString, GetImport().GetMM100UnitConverter());
444 
445  // get polygon sequence
446  basegfx::B2DPolygon aPolygon;
447 
448  if(basegfx::utils::importFromSvgPoints(aPolygon, sPointsString))
449  {
450  if(aPolygon.count())
451  {
452  css::drawing::PointSequence aPointSequence;
453  basegfx::utils::B2DPolygonToUnoPointSequence(aPolygon, aPointSequence);
454  rPropertySet->setPropertyValue("Polygon", Any(aPointSequence));
455  }
456  }
457 
458  // parent properties
459  XMLImageMapObjectContext::Prepare(rPropertySet);
460 }
461 
462 namespace {
463 
464 class XMLImageMapCircleContext : public XMLImageMapObjectContext
465 {
466  awt::Point aCenter;
467  sal_Int32 nRadius;
468 
469  bool bXOK;
470  bool bYOK;
471  bool bRadiusOK;
472 
473 public:
474 
475  XMLImageMapCircleContext(
476  SvXMLImport& rImport,
477  sal_uInt16 nPrefix,
478  const OUString& rLocalName,
479  css::uno::Reference<css::container::XIndexContainer> const & xMap);
480 
481 protected:
482  virtual void ProcessAttribute(
483  enum XMLImageMapToken eToken,
484  const OUString& rValue) override;
485 
486  virtual void Prepare(
487  css::uno::Reference<css::beans::XPropertySet> & rPropertySet) override;
488 };
489 
490 }
491 
492 XMLImageMapCircleContext::XMLImageMapCircleContext(
493  SvXMLImport& rImport,
494  sal_uInt16 nPrefix,
495  const OUString& rLocalName,
496  Reference<XIndexContainer> const & xMap)
497  : XMLImageMapObjectContext(rImport, nPrefix, rLocalName, xMap,
498  "com.sun.star.image.ImageMapCircleObject")
499  , nRadius(0)
500  , bXOK(false)
501  , bYOK(false)
502  , bRadiusOK(false)
503 {
504 }
505 
506 void XMLImageMapCircleContext::ProcessAttribute(
507  enum XMLImageMapToken eToken,
508  const OUString& rValue)
509 {
510  sal_Int32 nTmp;
511  switch (eToken)
512  {
513  case XML_TOK_IMAP_CENTER_X:
514  if (GetImport().GetMM100UnitConverter().convertMeasureToCore(nTmp,
515  rValue))
516  {
517  aCenter.X = nTmp;
518  bXOK = true;
519  }
520  break;
521  case XML_TOK_IMAP_CENTER_Y:
522  if (GetImport().GetMM100UnitConverter().convertMeasureToCore(nTmp,
523  rValue))
524  {
525  aCenter.Y = nTmp;
526  bYOK = true;
527  }
528  break;
529  case XML_TOK_IMAP_RADIUS:
530  if (GetImport().GetMM100UnitConverter().convertMeasureToCore(nTmp,
531  rValue))
532  {
533  nRadius = nTmp;
534  bRadiusOK = true;
535  }
536  break;
537  default:
538  XMLImageMapObjectContext::ProcessAttribute(eToken, rValue);
539  }
540 
541  bValid = bRadiusOK && bXOK && bYOK;
542 }
543 
544 void XMLImageMapCircleContext::Prepare(
545  Reference<XPropertySet> & rPropertySet)
546 {
547  // center (x,y)
548  rPropertySet->setPropertyValue( "Center", uno::Any(aCenter) );
549  // radius
550  rPropertySet->setPropertyValue( "Radius", uno::Any(nRadius) );
551 
552  // common properties handled by super class
553  XMLImageMapObjectContext::Prepare(rPropertySet);
554 }
555 
556 
557 constexpr OUStringLiteral gsImageMap(u"ImageMap");
558 
560  SvXMLImport& rImport,
561  sal_uInt16 nPrefix,
562  const OUString& rLocalName,
563  Reference<XPropertySet> const & rPropertySet) :
564  SvXMLImportContext(rImport, nPrefix, rLocalName),
565  xPropertySet(rPropertySet)
566 {
567  try
568  {
569  Reference < XPropertySetInfo > xInfo =
570  xPropertySet->getPropertySetInfo();
571  if( xInfo.is() && xInfo->hasPropertyByName( gsImageMap ) )
572  xPropertySet->getPropertyValue(gsImageMap) >>= xImageMap;
573  }
574  catch(const css::uno::Exception& e)
575  {
576  uno::Sequence<OUString> aSeq(0);
577  rImport.SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, aSeq, e.Message, nullptr );
578  }
579 }
580 
582 {
583 }
584 
586  sal_uInt16 nPrefix,
587  const OUString& rLocalName,
588  const Reference<XAttributeList> & /*xAttrList*/ )
589 {
590  SvXMLImportContextRef xContext;
591 
592  if ( XML_NAMESPACE_DRAW == nPrefix )
593  {
594  if ( IsXMLToken(rLocalName, XML_AREA_RECTANGLE) )
595  {
596  xContext = new XMLImageMapRectangleContext(
597  GetImport(), nPrefix, rLocalName, xImageMap);
598  }
599  else if ( IsXMLToken(rLocalName, XML_AREA_POLYGON) )
600  {
601  xContext = new XMLImageMapPolygonContext(
602  GetImport(), nPrefix, rLocalName, xImageMap);
603  }
604  else if ( IsXMLToken(rLocalName, XML_AREA_CIRCLE) )
605  {
606  xContext = new XMLImageMapCircleContext(
607  GetImport(), nPrefix, rLocalName, xImageMap);
608  }
609  }
610 
611  return xContext;
612 }
613 
615 {
616  Reference < XPropertySetInfo > xInfo =
617  xPropertySet->getPropertySetInfo();
618  if( xInfo.is() && xInfo->hasPropertyByName( gsImageMap ) )
619  xPropertySet->setPropertyValue(gsImageMap, uno::makeAny( xImageMap ) );
620 }
621 
622 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool importFromSvgPoints(B2DPolygon &o_rPoly, const OUString &rSvgPointsAttribute)
bool IsXMLToken(const OUString &rString, enum XMLTokenEnum eToken)
compare eToken to the string
Definition: xmltoken.cxx:3434
void B2DPolygonToUnoPointSequence(const B2DPolygon &rPolygon, css::drawing::PointSequence &rPointSequenceRetval)
constexpr sal_uInt16 XML_NAMESPACE_OFFICE
virtual void EndElement()
EndElement is called before a context will be destructed, but after an elements context has been pars...
Definition: xmlictxt.cxx:62
virtual void EndElement() override
EndElement is called before a context will be destructed, but after an elements context has been pars...
#define XML_TOK_UNKNOWN
Definition: xmltkmap.hxx:32
SvXMLImport & GetImport()
Definition: xmlictxt.hxx:62
constexpr sal_uInt16 XML_NAMESPACE_XLINK
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
StartElement is called after a context has been constructed and before an elements context is parsed...
Definition: xmlictxt.cxx:58
#define XMLERROR_API
Definition: xmlerror.hxx:71
#define XML_TOKEN_MAP_END
Definition: xmltkmap.hxx:33
HashMap_OWString_Interface aMap
css::uno::Any const & rValue
Definition: ImageStyle.hxx:38
css::uno::Reference< css::container::XIndexContainer > xImageMap
the image map to be imported
const SvXMLTokenMapEntry aImageMapObjectTokenMap[]
constexpr sal_uInt16 XML_NAMESPACE_DRAW
#define XMLERROR_FLAG_WARNING
Definition: xmlerror.hxx:35
constexpr sal_uInt16 XML_NAMESPACE_SVG
#define DBG_ASSERT(sCon, aError)
virtual ~XMLImageMapContext() override
Import all text into a string buffer.
virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
Create a children element context.
This class deliberately does not support XWeak, to improve performance when loading large documents...
Definition: xmlictxt.hxx:44
Handling of tokens in XML:
void SetError(sal_Int32 nId, const css::uno::Sequence< OUString > &rMsgParams, const OUString &rExceptionMessage, const css::uno::Reference< css::xml::sax::XLocator > &rLocator)
Record an error condition that occurred during import.
Sequence< sal_Int8 > aSeq
virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
Create a children element context.
Definition: xmlictxt.cxx:51
XMLImageMapToken
Reference< XSingleServiceFactory > xFactory
css::uno::Reference< css::beans::XPropertySet > xPropertySet
the property set from which to get and where eventually to set the image map
XMLImageMapContext(SvXMLImport &rImport, sal_uInt16 nPrefix, const OUString &rLocalName, css::uno::Reference< css::beans::XPropertySet > const &rPropertySet)
sal_Int32 nLength
Definition: xmltoken.cxx:36
XMLTokenEnum eToken
Definition: xmltoken.cxx:40
sal_uInt32 count() const
constexpr OUStringLiteral gsImageMap(u"ImageMap")