LibreOffice Module xmloff (master)  1
PropertyMaps.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 PropertyMap.hxx with this define
21 // to create the maps
22 #ifndef INCLUDED_XMLOFF_SOURCE_CHART_PROPERTYMAP_HXX
23 #define XML_SCH_CREATE_GLOBAL_MAPS
24 #include "PropertyMap.hxx"
25 #undef XML_SCH_CREATE_GLOBAL_MAPS
26 #endif
27 
28 #include <sax/tools/converter.hxx>
29 
30 #include "SchXMLTools.hxx"
37 #include <propimp0.hxx>
38 
40 #include <xmloff/attrlist.hxx>
41 #include <xmloff/namespacemap.hxx>
42 #include <xmloff/xmluconv.hxx>
43 #include <xmloff/shapeimport.hxx>
44 #include <xmloff/xmlexp.hxx>
45 #include <xmloff/xmltoken.hxx>
46 #include <xmloff/prhdlfac.hxx>
47 
48 #include <com/sun/star/awt/Size.hpp>
49 #include <com/sun/star/drawing/LineStyle.hpp>
50 #include <com/sun/star/drawing/FillStyle.hpp>
51 #include <com/sun/star/chart/ChartAxisMarks.hpp>
52 #include <com/sun/star/chart/ChartDataCaption.hpp>
53 #include <com/sun/star/chart2/XChartDocument.hpp>
54 #include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
55 #include <com/sun/star/graphic/XGraphic.hpp>
56 
57 #include <rtl/ustrbuf.hxx>
58 
59 #define SCH_XML_SETFLAG( status, flag ) (status)|= (flag)
60 #define SCH_XML_UNSETFLAG( status, flag ) (status) = ((status) | (flag)) - (flag)
61 
62 using namespace com::sun::star;
63 using namespace ::xmloff::token;
64 
65 namespace {
66 
67 SvXMLEnumMapEntry<drawing::LineStyle> const aLineStyleMap[] =
68 {
69  { XML_NONE, drawing::LineStyle_NONE },
70  { XML_SOLID, drawing::LineStyle_SOLID },
71  { XML_DASH, drawing::LineStyle_DASH },
72  { XML_TOKEN_INVALID, drawing::LineStyle(0) }
73 };
74 
75 SvXMLEnumMapEntry<drawing::FillStyle> const aFillStyleMap[] =
76 {
77  { XML_NONE, drawing::FillStyle_NONE },
78  { XML_SOLID, drawing::FillStyle_SOLID },
79  { XML_HATCH, drawing::FillStyle_HATCH }
80 };
81 
82 }
83 
84 // the following class implementations are in this file:
85 
86 // * XMLChartPropHdlFactory
87 // * XMLChartPropertySetMapper
88 // * XMLChartExportPropertyMapper
89 // * XMLChartImportPropertyMapper
90 // * SchXMLStyleExport
91 
93  : m_pExport(pExport)
94 {
95 }
96 
98 {
99 }
100 
102 {
104  if( ! pHdl )
105  {
106  switch( nType )
107  {
109  pHdl = new XMLAxisPositionPropertyHdl( false );
110  break;
112  pHdl = new XMLAxisPositionPropertyHdl( true );
113  break;
114 
116  pHdl = new XMLEnumPropertyHdl( aXMLChartAxisLabelPositionEnumMap);
117  break;
118 
120  pHdl = new XMLEnumPropertyHdl( aXMLChartAxisMarkPositionEnumMap);
121  break;
122 
124  pHdl = new XMLEnumPropertyHdl( aXMLChartAxisArrangementEnumMap);
125  break;
126 
128  // here we have a constant rather than an enum
129  pHdl = new XMLErrorBarStylePropertyHdl( aXMLChartErrorBarStyleEnumMap );
130  break;
131 
133  pHdl = new XMLErrorIndicatorPropertyHdl( false );
134  break;
136  pHdl = new XMLErrorIndicatorPropertyHdl( true );
137  break;
138 
140  // here we have a constant rather than an enum
141  pHdl = new XMLEnumPropertyHdl( aXMLChartSolidTypeEnumMap );
142  break;
144  // here we have a constant rather than an enum
145  pHdl = new XMLEnumPropertyHdl( aXMLChartDataLabelPlacementEnumMap );
146  break;
148  pHdl = new XMLEnumPropertyHdl( aXMLChartDataRowSourceTypeEnumMap);
149  break;
151  pHdl = new XMLTextOrientationHdl;
152  break;
153 
156  {
157  pHdl = new XMLEnumPropertyHdl(g_XMLChartInterpolationTypeEnumMap_ODF12);
158  }
159  else // ODF 1.3 OFFICE-3662
160  {
161  pHdl = new XMLEnumPropertyHdl(g_XMLChartInterpolationTypeEnumMap);
162  }
163  break;
165  pHdl = new XMLSymbolTypePropertyHdl( false );
166  break;
167 
169  pHdl = new XMLSymbolTypePropertyHdl( true );
170  break;
171 
173  pHdl = new XMLEnumPropertyHdl( aXMLChartMissingValueTreatmentEnumMap );
174  break;
176  pHdl = new XMLEnumPropertyHdl( aLineStyleMap );
177  break;
179  pHdl = new XMLOpacityPropertyHdl(nullptr);
180  break;
182  pHdl = new XMLEnumPropertyHdl( aFillStyleMap );
183  break;
184  default:
185  ;
186  }
187  if( pHdl )
188  PutHdlCache( nType, pHdl );
189  }
190 
191  return pHdl;
192 }
193 
195  : XMLPropertySetMapper(aXMLChartPropMap, new XMLChartPropHdlFactory(pExport), pExport != nullptr)
196 {
197 }
198 
200 {
201 }
202 
204  SvXMLExport& rExport) :
205  SvXMLExportPropertyMapper( rMapper ),
206  mrExport( rExport )
207 {
208  // chain draw properties
210 
211  // chain text properties
213 }
214 
216 {
217 }
218 
220  bool bEnableFoFontFamily,
221  std::vector< XMLPropertyState >& rProperties,
222  const uno::Reference< beans::XPropertySet >& rPropSet ) const
223 {
224  OUString aAutoPropName;
225  bool bCheckAuto = false;
226 
227  // filter properties
228  for( auto& rProperty : rProperties )
229  {
230  // find properties with context
231  // to prevent writing this property set mnIndex member to -1
232  switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ))
233  {
234  // if Auto... is set the corresponding properties mustn't be exported
235  case XML_SCH_CONTEXT_MIN:
236  bCheckAuto = true;
237  aAutoPropName = "AutoMin";
238  break;
239  case XML_SCH_CONTEXT_MAX:
240  bCheckAuto = true;
241  aAutoPropName = "AutoMax";
242  break;
244  bCheckAuto = true;
245  aAutoPropName = "AutoStepMain";
246  break;
248  bCheckAuto = true;
249  aAutoPropName = "AutoStepHelp";
250  break;
251 
253  bCheckAuto = true;
254  aAutoPropName = "AutoOrigin";
255  break;
256 
257  // the following property is deprecated
258  // element-item symbol-image is used now
260  rProperty.mnIndex = -1;
261  break;
262 
265  // note this avoids export of the properties in OASIS format,
266  // but also for the OOo XML Flat format (used by binfilter),
267  // because there, the transformation to OOo is done after the
268  // complete export of the chart in OASIS format.
270  rProperty.mnIndex = -1;
271  break;
272  }
273 
274  if( bCheckAuto )
275  {
276  if( rPropSet.is())
277  {
278  try
279  {
280  bool bAuto = false;
281  uno::Any aAny = rPropSet->getPropertyValue( aAutoPropName );
282  aAny >>= bAuto;
283  if( bAuto )
284  rProperty.mnIndex = -1;
285  }
286  catch(const beans::UnknownPropertyException&)
287  {
288  }
289  }
290  bCheckAuto = false;
291  }
292  }
293 
294  SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily, rProperties, rPropSet);
295 }
296 
299  const XMLPropertyState& rProperty, SvXmlExportFlags nFlags,
300  const ::std::vector< XMLPropertyState > *pProperties,
301  sal_uInt32 nIdx ) const
302 {
303  switch( getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex ))
304  {
306  {
307  uno::Reference<graphic::XGraphic> xGraphic;
308  rProperty.maValue >>= xGraphic;
309 
310  OUString sInternalURL;
311  // export as XLink reference into the package
312  // if embedding is off
313  if (xGraphic.is())
314  {
315  OUString aOutMimeType;
316  sInternalURL = mrExport.AddEmbeddedXGraphic(xGraphic, aOutMimeType);
317  }
318  if (!sInternalURL.isEmpty())
319  {
321  }
322 
323  {
324  sal_uInt32 nPropIndex = rProperty.mnIndex;
325  // this is the element that has to live until the next statement
327  getPropertySetMapper()->GetEntryNameSpace( nPropIndex ),
328  getPropertySetMapper()->GetEntryXMLName( nPropIndex ),
329  true, true );
330 
331  // export as Base64 embedded graphic
332  // if embedding is on
333  if (xGraphic.is())
335  }
336  }
337  break;
338 
340  {
341  OUString aSeparator;
342  rProperty.maValue >>= aSeparator;
343 
344  if( !aSeparator.isEmpty() )
345  {
346  sal_uInt32 nPropIndex = rProperty.mnIndex;
348  getPropertySetMapper()->GetEntryNameSpace( nPropIndex ),
349  getPropertySetMapper()->GetEntryXMLName( nPropIndex ),
350  true, true );
351 
352  SchXMLTools::exportText( mrExport, aSeparator, true );
353  }
354  }
355  break;
356 
357  default:
358  // call parent
360  nFlags, pProperties, nIdx );
361  break;
362  }
363 }
364 
365 namespace {
366 
367 OUString convertRange( const OUString & rRange, const uno::Reference< chart2::XChartDocument > & xDoc )
368 {
369  OUString aResult = rRange;
370  if( !xDoc.is() )
371  return aResult;
372  uno::Reference< chart2::data::XRangeXMLConversion > xConversion(
373  xDoc->getDataProvider(), uno::UNO_QUERY );
374  try
375  {
376  if( xConversion.is())
377  aResult = xConversion->convertRangeToXML( rRange );
378  }
379  catch (css::lang::IllegalArgumentException&)
380  {
381  }
382 
383  return aResult;
384 }
385 
386 }
387 
389  SvXMLAttributeList& rAttrList, const XMLPropertyState& rProperty,
390  const SvXMLUnitConverter& rUnitConverter,
391  const SvXMLNamespaceMap& rNamespaceMap,
392  const ::std::vector< XMLPropertyState > *pProperties,
393  sal_uInt32 nIdx ) const
394 {
395  bool bHandled = false;
396 
397  sal_Int32 nContextId = getPropertySetMapper()->GetEntryContextId( rProperty.mnIndex );
398 
399  if( nContextId )
400  {
401  bHandled = true;
402 
403  OUString sAttrName = getPropertySetMapper()->GetEntryXMLName( rProperty.mnIndex );
404  sal_uInt16 nNameSpace = getPropertySetMapper()->GetEntryNameSpace( rProperty.mnIndex );
405  OUStringBuffer sValueBuffer;
406 
407  sal_Int32 nValue = 0;
408  bool bValue = false;
409 
410  switch( nContextId )
411  {
414  rProperty.maValue >>= nValue;
415  bValue = (( nValue & chart::ChartAxisMarks::INNER ) == chart::ChartAxisMarks::INNER );
416  ::sax::Converter::convertBool( sValueBuffer, bValue );
417  break;
420  rProperty.maValue >>= nValue;
421  bValue = (( nValue & chart::ChartAxisMarks::OUTER ) == chart::ChartAxisMarks::OUTER );
422  ::sax::Converter::convertBool( sValueBuffer, bValue );
423  break;
425  {
426  // convert from 100th degrees to degrees (double)
427  rProperty.maValue >>= nValue;
428  double fVal = static_cast<double>(nValue) / 100.0;
429  ::sax::Converter::convertDouble( sValueBuffer, fVal );
430  }
431  break;
433  {
434  rProperty.maValue >>= nValue;
435  if( ( nValue & chart::ChartDataCaption::VALUE ) == chart::ChartDataCaption::VALUE )
436  {
437  if( ( nValue & chart::ChartDataCaption::PERCENT ) == chart::ChartDataCaption::PERCENT )
438  {
439  const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFSaneDefaultVersion() );
440  if (nCurrentVersion < SvtSaveOptions::ODFSVER_012)
441  sValueBuffer.append( GetXMLToken( XML_PERCENTAGE ));
442  else
443  sValueBuffer.append( GetXMLToken( XML_VALUE_AND_PERCENTAGE ));
444  }
445  else
446  sValueBuffer.append( GetXMLToken( XML_VALUE ));
447  }
448  else if(( nValue & chart::ChartDataCaption::PERCENT ) == chart::ChartDataCaption::PERCENT )
449  sValueBuffer.append( GetXMLToken( XML_PERCENTAGE ));
450  else
451  sValueBuffer.append( GetXMLToken( XML_NONE ));
452  }
453  break;
455  rProperty.maValue >>= nValue;
456  bValue = (( nValue & chart::ChartDataCaption::TEXT ) == chart::ChartDataCaption::TEXT );
457  ::sax::Converter::convertBool( sValueBuffer, bValue );
458  break;
460  rProperty.maValue >>= nValue;
461  bValue = (( nValue & chart::ChartDataCaption::SYMBOL ) == chart::ChartDataCaption::SYMBOL );
462  ::sax::Converter::convertBool( sValueBuffer, bValue );
463  break;
466  {
467  awt::Size aSize;
468  rProperty.maValue >>= aSize;
469  rUnitConverter.convertMeasureToXML( sValueBuffer,
471  ? aSize.Width
472  : aSize.Height );
473  }
474  break;
475 
477  {
478  // just for import
479  break;
480  }
481 
483  {
484  OUString aRangeStr;
485  rProperty.maValue >>= aRangeStr;
486  sValueBuffer.append(convertRange(aRangeStr, mxChartDoc));
487  }
488  break;
490  {
491  const SvtSaveOptions::ODFSaneDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFSaneDefaultVersion() );
492 
493  OUString aServiceName;
494  rProperty.maValue >>= aServiceName;
495  if (aServiceName == "com.sun.star.chart2.LinearRegressionCurve")
496  sValueBuffer.append( GetXMLToken( XML_LINEAR ));
497  else if (aServiceName == "com.sun.star.chart2.LogarithmicRegressionCurve")
498  sValueBuffer.append( GetXMLToken( XML_LOGARITHMIC ));
499  else if (aServiceName == "com.sun.star.chart2.ExponentialRegressionCurve")
500  sValueBuffer.append( GetXMLToken( XML_EXPONENTIAL ));
501  else if (aServiceName == "com.sun.star.chart2.PotentialRegressionCurve")
502  sValueBuffer.append( GetXMLToken( XML_POWER ));
503  else if (nCurrentVersion >= SvtSaveOptions::ODFSVER_013 && aServiceName == "com.sun.star.chart2.PolynomialRegressionCurve")
504  { // ODF 1.3 OFFICE-3958
505  sValueBuffer.append( GetXMLToken( XML_POLYNOMIAL ));
506  }
507  else if (nCurrentVersion >= SvtSaveOptions::ODFSVER_013 && aServiceName == "com.sun.star.chart2.MovingAverageRegressionCurve")
508  { // ODF 1.3 OFFICE-3959
509  sValueBuffer.append( GetXMLToken( XML_MOVING_AVERAGE ));
510  }
511  }
512  break;
513 
514  default:
515  bHandled = false;
516  break;
517  }
518 
519  if( !sValueBuffer.isEmpty())
520  {
521  OUString sValue = sValueBuffer.makeStringAndClear();
522  sAttrName = rNamespaceMap.GetQNameByKey( nNameSpace, sAttrName );
523  rAttrList.AddAttribute( sAttrName, sValue );
524  }
525  }
526 
527  if( !bHandled )
528  {
529  // call parent
530  SvXMLExportPropertyMapper::handleSpecialItem( rAttrList, rProperty, rUnitConverter, rNamespaceMap, pProperties, nIdx );
531  }
532 }
533 
534 void XMLChartExportPropertyMapper::setChartDoc( const uno::Reference< chart2::XChartDocument >& xChartDoc )
535 {
536  mxChartDoc = xChartDoc;
537 }
538 
540  const SvXMLImport& _rImport ) :
541  SvXMLImportPropertyMapper( rMapper, const_cast< SvXMLImport & >( _rImport )),
542  mrImport( const_cast< SvXMLImport & > ( _rImport ))
543 {
544  // chain shape mapper for drawing properties
545 
546  // give an empty model. It is only used for numbering rules that don't exist in chart
547  uno::Reference< frame::XModel > xEmptyModel;
549 
550  //#i14365# save and load writing-mode for chart elements
551  //The property TextWritingMode is mapped wrongly in the underlying draw mapper, but for draw it is necessary
552  //We remove that property here only for chart thus the chart can use the correct mapping from the writer paragraph settings (attribute 'writing-mode' <-> property 'WritingMode')
553  sal_Int32 nUnwantedWrongEntry = maPropMapper->FindEntryIndex( "TextWritingMode", XML_NAMESPACE_STYLE, GetXMLToken(XML_WRITING_MODE) );
554  maPropMapper->RemoveEntry(nUnwantedWrongEntry);
555 
556  // do not chain text properties: on import this is done by shape mapper
557  // to import old documents
558 }
559 
561 {
562 }
563 
565  XMLPropertyState& rProperty,
566  ::std::vector< XMLPropertyState >& rProperties,
567  const OUString& rValue,
568  const SvXMLUnitConverter& rUnitConverter,
569  const SvXMLNamespaceMap& rNamespaceMap ) const
570 {
571  sal_Int32 nContextId = maPropMapper->GetEntryContextId( rProperty.mnIndex );
572  bool bRet = (nContextId != 0);
573 
574  if( nContextId )
575  {
576  sal_Int32 nValue = 0;
577  bool bValue = false;
578 
579  switch( nContextId )
580  {
583  (void)::sax::Converter::convertBool( bValue, rValue );
584  // modify old value
585  rProperty.maValue >>= nValue;
586  if( bValue )
587  SCH_XML_SETFLAG( nValue, chart::ChartAxisMarks::INNER );
588  else
589  SCH_XML_UNSETFLAG( nValue, chart::ChartAxisMarks::INNER );
590  rProperty.maValue <<= nValue;
591  break;
594  (void)::sax::Converter::convertBool( bValue, rValue );
595  // modify old value
596  rProperty.maValue >>= nValue;
597  if( bValue )
598  SCH_XML_SETFLAG( nValue, chart::ChartAxisMarks::OUTER );
599  else
600  SCH_XML_UNSETFLAG( nValue, chart::ChartAxisMarks::OUTER );
601  rProperty.maValue <<= nValue;
602  break;
604  {
605  // convert from degrees (double) to 100th degrees (integer)
606  double fVal;
607  ::sax::Converter::convertDouble( fVal, rValue );
608  nValue = static_cast<sal_Int32>( fVal * 100.0 );
609  rProperty.maValue <<= nValue;
610  }
611  break;
613  {
614  // modify old value
615  rProperty.maValue >>= nValue;
616  if( IsXMLToken( rValue, XML_NONE ))
617  SCH_XML_UNSETFLAG( nValue, chart::ChartDataCaption::VALUE | chart::ChartDataCaption::PERCENT );
618  else if( IsXMLToken( rValue, XML_VALUE_AND_PERCENTAGE ) )
619  SCH_XML_SETFLAG( nValue, chart::ChartDataCaption::VALUE | chart::ChartDataCaption::PERCENT );
620  else if( IsXMLToken( rValue, XML_VALUE ) )
621  SCH_XML_SETFLAG( nValue, chart::ChartDataCaption::VALUE );
622  else // must be XML_PERCENTAGE
623  SCH_XML_SETFLAG( nValue, chart::ChartDataCaption::PERCENT );
624  rProperty.maValue <<= nValue;
625  }
626  break;
628  rProperty.maValue >>= nValue;
629  (void)::sax::Converter::convertBool( bValue, rValue );
630  if( bValue )
631  SCH_XML_SETFLAG( nValue, chart::ChartDataCaption::TEXT );
632  else
633  SCH_XML_UNSETFLAG( nValue, chart::ChartDataCaption::TEXT );
634  rProperty.maValue <<= nValue;
635  break;
637  rProperty.maValue >>= nValue;
638  (void)::sax::Converter::convertBool( bValue, rValue );
639  if( bValue )
640  SCH_XML_SETFLAG( nValue, chart::ChartDataCaption::SYMBOL );
641  else
642  SCH_XML_UNSETFLAG( nValue, chart::ChartDataCaption::SYMBOL );
643  rProperty.maValue <<= nValue;
644  break;
647  {
648  awt::Size aSize;
649  rProperty.maValue >>= aSize;
650  rUnitConverter.convertMeasureToCore(
652  ? aSize.Width
653  : aSize.Height,
654  rValue );
655  rProperty.maValue <<= aSize;
656  }
657  break;
658 
660  {
661  rProperty.maValue <<= rValue;
662  }
663  break;
664 
665  // deprecated from 6.0 beta on
667  rProperty.maValue <<= mrImport.loadGraphicByURL(rValue);
668  break;
669 
671  {
672  if (IsXMLToken( rValue, XML_LINEAR ))
673  rProperty.maValue <<= OUString("com.sun.star.chart2.LinearRegressionCurve");
674  else if (IsXMLToken( rValue, XML_LOGARITHMIC))
675  rProperty.maValue <<= OUString("com.sun.star.chart2.LogarithmicRegressionCurve");
676  else if (IsXMLToken( rValue, XML_EXPONENTIAL))
677  rProperty.maValue <<= OUString("com.sun.star.chart2.ExponentialRegressionCurve");
678  else if (IsXMLToken( rValue, XML_POWER))
679  rProperty.maValue <<= OUString("com.sun.star.chart2.PotentialRegressionCurve");
680  else if (IsXMLToken( rValue, XML_POLYNOMIAL))
681  rProperty.maValue <<= OUString("com.sun.star.chart2.PolynomialRegressionCurve");
682  else if (IsXMLToken( rValue, XML_MOVING_AVERAGE))
683  rProperty.maValue <<= OUString("com.sun.star.chart2.MovingAverageRegressionCurve");
684  }
685  break;
686 
687  default:
688  bRet = false;
689  break;
690  }
691  }
692 
693  // if we didn't handle it, the parent should
694  if( !bRet )
695  {
696  // call parent
697  bRet = SvXMLImportPropertyMapper::handleSpecialItem( rProperty, rProperties, rValue, rUnitConverter, rNamespaceMap );
698  }
699 
700  return bRet;
701 }
702 
703 void XMLChartImportPropertyMapper::finished( ::std::vector< XMLPropertyState >& /*rProperties*/, sal_Int32 /*nStartIndex*/, sal_Int32 /*nEndIndex*/ ) const
704 {
705 }
706 
707 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define XML_SCH_CONTEXT_SPECIAL_TICKS_MIN_OUTER
Definition: PropertyMap.hxx:72
bool IsXMLToken(const OUString &rString, enum XMLTokenEnum eToken)
compare eToken to the string
Definition: xmltoken.cxx:3434
virtual const XMLPropertyHandler * GetPropertyHandler(sal_Int32 nType) const override
This method retrieves a PropertyHandler for the given XML-type.
#define XML_SCH_TYPE_SYMBOL_TYPE
Definition: PropertyMap.hxx:46
#define XML_SCH_TYPE_ERROR_BAR_STYLE
Definition: PropertyMap.hxx:38
#define XML_SCH_CONTEXT_SPECIAL_LABEL_SEPARATOR
Definition: PropertyMap.hxx:83
virtual void handleElementItem(SvXMLExport &rExport, const XMLPropertyState &rProperty, SvXmlExportFlags nFlags, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const
this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set ...
Definition: xmlexppr.cxx:870
virtual const XMLPropertyHandler * GetPropertyHandler(sal_Int32 nType) const
This method retrieves a PropertyHandler for the given XML-type.
Definition: prhdlfac.cxx:138
static bool convertBool(bool &rBool, const OUString &rString)
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
Definition: xmluconv.hxx:77
#define XML_SCH_TYPE_AXIS_POSITION_VALUE
Definition: PropertyMap.hxx:51
#define XML_SCH_TYPE_TEXT_ORIENTATION
Definition: PropertyMap.hxx:44
#define XML_SCH_TYPE_NAMED_SYMBOL
Definition: PropertyMap.hxx:47
constexpr sal_uInt16 XML_NAMESPACE_XLINK
sal_Int32 mnIndex
Definition: maptype.hxx:124
static SvXMLExportPropertyMapper * CreateShapePropMapper(SvXMLExport &rExport)
returns the export property mapper for external chaining
XMLChartExportPropertyMapper(const rtl::Reference< XMLPropertySetMapper > &rMapper, SvXMLExport &rExport)
css::uno::Reference< css::graphic::XGraphic > loadGraphicByURL(OUString const &rURL)
Definition: xmlimp.cxx:1359
virtual void handleSpecialItem(SvXMLAttributeList &rAttrList, const XMLPropertyState &rProperty, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const
this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set ...
Definition: xmlexppr.cxx:854
#define XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_NUMBER
Definition: PropertyMap.hxx:74
#define XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_TEXT
Definition: PropertyMap.hxx:75
#define XML_SCH_TYPE_TICK_MARK_POSITION
Definition: PropertyMap.hxx:53
#define XML_SCH_CONTEXT_STEP_HELP_COUNT
Definition: PropertyMap.hxx:63
static void convertDouble(OUStringBuffer &rBuffer, double fNumber, bool bWriteUnits, sal_Int16 nSourceUnit, sal_Int16 nTargetUnit)
PropertyHandler for a generic xml enumeration type:
#define XML_SCH_CONTEXT_LINES_USED
Definition: PropertyMap.hxx:67
css::uno::Any const & rValue
Definition: ImageStyle.hxx:38
bool convertMeasureToCore(sal_Int32 &rValue, const OUString &rString, sal_Int32 nMin=SAL_MIN_INT32, sal_Int32 nMax=SAL_MAX_INT32) const
convert string to measure with meCoreMeasureUnit, using optional min and max values ...
Definition: xmluconv.cxx:171
#define XML_SCH_CONTEXT_SPECIAL_TICKS_MAJ_INNER
Definition: PropertyMap.hxx:69
#define XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE
Definition: PropertyMap.hxx:82
#define XML_SCH_TYPE_SOLID_TYPE
Definition: PropertyMap.hxx:40
virtual void ContextFilter(bool bEnableFoFontFamily,::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySet > &rPropSet) const
Application-specific filter.
Definition: xmlexppr.cxx:669
#define XML_SCH_CONTEXT_SPECIAL_TEXT_ROTATION
Definition: PropertyMap.hxx:73
#define XML_SCH_TYPE_LABEL_BORDER_OPACITY
Definition: PropertyMap.hxx:55
void AddAttribute(sal_uInt16 nPrefix, const char *pName, const OUString &rValue)
Definition: xmlexp.cxx:909
#define XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE_NAME
Definition: PropertyMap.hxx:81
virtual ~XMLChartPropHdlFactory() override
#define XML_SCH_CONTEXT_STEP_MAIN
Definition: PropertyMap.hxx:62
#define XML_SCH_CONTEXT_SPECIAL_SYMBOL_WIDTH
Definition: PropertyMap.hxx:79
OUString AddEmbeddedXGraphic(css::uno::Reference< css::graphic::XGraphic > const &rxGraphic, OUString &rOutMimeType, OUString const &rRequestedName=OUString())
Definition: xmlexp.cxx:1858
#define XML_SCH_TYPE_LABEL_PLACEMENT_TYPE
Definition: PropertyMap.hxx:48
#define XML_SCH_CONTEXT_MIN
Definition: PropertyMap.hxx:60
#define XML_SCH_TYPE_ERROR_INDICATOR_UPPER
Definition: PropertyMap.hxx:41
virtual bool handleSpecialItem(XMLPropertyState &rProperty,::std::vector< XMLPropertyState > &rProperties, const OUString &rValue, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap) const override
this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_IMPORT flag set ...
SvtSaveOptions::ODFSaneDefaultVersion getSaneDefaultVersion() const
returns the deterministic version for odf export
Definition: xmlexp.cxx:2297
#define XML_SCH_TYPE_INTERPOLATION
Definition: PropertyMap.hxx:45
virtual void handleElementItem(SvXMLExport &rExport, const XMLPropertyState &rProperty, SvXmlExportFlags nFlags, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const override
this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set ...
#define XML_SCH_CONTEXT_ORIGIN
Definition: PropertyMap.hxx:64
virtual bool handleSpecialItem(XMLPropertyState &rProperty,::std::vector< XMLPropertyState > &rProperties, const OUString &rValue, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap) const
this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_IMPORT flag set ...
Definition: xmlimppr.cxx:350
void setChartDoc(const css::uno::Reference< css::chart2::XChartDocument > &xChartDoc)
SvXMLExport const *const m_pExport
#define XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE
Definition: PropertyMap.hxx:84
virtual ~XMLChartExportPropertyMapper() override
#define XML_SCH_TYPE_LABEL_BORDER_STYLE
Definition: PropertyMap.hxx:54
#define XML_SCH_TYPE_LABEL_FILL_STYLE
Definition: PropertyMap.hxx:56
rtl::Reference< XMLPropertySetMapper > maPropMapper
Definition: xmlimppr.hxx:73
OUString GetQNameByKey(sal_uInt16 nKey, const OUString &rLocalName, bool bCache=true) const
#define XML_SCH_TYPE_AXIS_POSITION
Definition: PropertyMap.hxx:50
void exportText(SvXMLExport &rExport, const OUString &rText, bool bConvertTabsLFs)
void ChainExportMapper(const rtl::Reference< SvXMLExportPropertyMapper > &rMapper)
Definition: xmlexppr.cxx:492
#define XML_SCH_TYPE_DATAROWSOURCE
Definition: PropertyMap.hxx:43
virtual void finished(::std::vector< XMLPropertyState > &rProperties, sal_Int32 nStartIndex, sal_Int32 nEndIndex) const override
This method is called when all attributes have benn processed.
#define XML_SCH_CONTEXT_MAX
Definition: PropertyMap.hxx:61
Map an XMLTokenEnum to an enum value.
Definition: ximpshap.hxx:40
css::uno::Any maValue
Definition: maptype.hxx:125
XMLChartPropHdlFactory(SvXMLExport const *)
#define XML_SCH_CONTEXT_SPECIAL_REGRESSION_TYPE
Definition: PropertyMap.hxx:85
XMLChartPropertySetMapper(SvXMLExport const *pExport)
SvXmlExportFlags
Definition: xmlexppr.hxx:39
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
Definition: xmltoken.cxx:3378
#define SCH_XML_UNSETFLAG(status, flag)
Handling of tokens in XML:
#define XML_SCH_CONTEXT_SPECIAL_TICKS_MAJ_OUTER
Definition: PropertyMap.hxx:70
Smart struct to transport an Any with an index to the appropriate property-name.
Definition: maptype.hxx:122
virtual ~XMLChartImportPropertyMapper() override
virtual ~XMLChartPropertySetMapper() override
#define XML_SCH_CONTEXT_SPECIAL_NUMBER_FORMAT
Definition: PropertyMap.hxx:77
#define XML_SCH_CONTEXT_STOCK_WITH_VOLUME
Definition: PropertyMap.hxx:66
virtual void handleSpecialItem(SvXMLAttributeList &rAttrList, const XMLPropertyState &rProperty, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const override
this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set ...
bool AddEmbeddedXGraphicAsBase64(css::uno::Reference< css::graphic::XGraphic > const &rxGraphic)
Definition: xmlexp.cxx:1895
#define XML_SCH_CONTEXT_SPECIAL_DATA_LABEL_SYMBOL
Definition: PropertyMap.hxx:76
void AddAttribute(const OUString &sName, const OUString &sValue)
Definition: attrlist.cxx:143
static SvXMLExportPropertyMapper * CreateParaExtPropMapper(SvXMLExport &rExport)
Definition: txtparae.cxx:1334
Abstract base-class for different XML-types.
Definition: xmlprhdl.hxx:35
virtual void ContextFilter(bool bEnableFoFontFamily,::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySet > &rPropSet) const override
Application-specific filter.
#define XML_SCH_TYPE_AXIS_ARRANGEMENT
Definition: PropertyMap.hxx:37
#define XML_SCH_TYPE_AXIS_LABEL_POSITION
Definition: PropertyMap.hxx:52
#define SCH_XML_SETFLAG(status, flag)
#define XML_SCH_CONTEXT_SPECIAL_TICKS_MIN_INNER
Definition: PropertyMap.hxx:71
#define XML_SCH_CONTEXT_SPECIAL_SYMBOL_HEIGHT
Definition: PropertyMap.hxx:80
void ChainImportMapper(const rtl::Reference< SvXMLImportPropertyMapper > &rMapper)
Definition: xmlimppr.cxx:76
css::uno::Any const SvXMLExport & rExport
Definition: ImageStyle.hxx:38
#define XML_SCH_TYPE_ERROR_INDICATOR_LOWER
Definition: PropertyMap.hxx:42
SvXMLExportFlags getExportFlags() const
Definition: xmlexp.hxx:476
#define XML_SCH_TYPE_MISSING_VALUE_TREATMENT
Definition: PropertyMap.hxx:49
Reference< XGraphic > xGraphic
css::uno::Reference< css::chart2::XChartDocument > mxChartDoc
static SvXMLImportPropertyMapper * CreateShapePropMapper(const css::uno::Reference< css::frame::XModel > &rModel, SvXMLImport &rImport)
creates a property mapper for external chaining
void convertMeasureToXML(OUStringBuffer &rBuffer, sal_Int32 nMeasure) const
convert measure to string: from meCoreMeasureUnit to meXMLMeasureUnit
Definition: xmluconv.cxx:181
constexpr sal_uInt16 XML_NAMESPACE_STYLE
sal_Int16 nValue
const rtl::Reference< XMLPropertySetMapper > & getPropertySetMapper() const
Definition: xmlexppr.cxx:1113
XMLChartImportPropertyMapper(const rtl::Reference< XMLPropertySetMapper > &rMapper, const SvXMLImport &rImport)
void PutHdlCache(sal_Int32 nType, const XMLPropertyHandler *pHdl) const
Puts a PropertyHandler into the internal cache.
Definition: prhdlfac.cxx:156
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo