LibreOffice Module xmloff (master)  1
StyleOOoTContext.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/xml/sax/SAXException.hpp>
21 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
22 #include <com/sun/star/xml/sax/XAttributeList.hpp>
23 
24 #include <sax/tools/converter.hxx>
25 
26 #include <xmloff/namespacemap.hxx>
27 #include <xmloff/xmltoken.hxx>
28 #include <xmloff/xmlnamespace.hxx>
29 #include "PropType.hxx"
30 #include "DeepTContext.hxx"
31 #include "RenameElemTContext.hxx"
32 #include "ActionMapTypesOOo.hxx"
33 #include "MutableAttrList.hxx"
34 #include "TransformerActions.hxx"
35 #include "PropertyActionsOOo.hxx"
36 #include "TransformerBase.hxx"
37 
38 #include "StyleOOoTContext.hxx"
39 #include <xmloff/xmluconv.hxx>
40 #include <rtl/math.hxx>
41 #include <rtl/ustrbuf.hxx>
42 #include <osl/diagnose.h>
43 #include <sal/log.hxx>
44 #include <array>
45 
46 using namespace ::xmloff::token;
47 using namespace ::com::sun::star::uno;
48 using namespace ::com::sun::star::xml::sax;
49 
50 const sal_uInt16 MAX_PROP_TYPES = 4;
51 #define ENTRY4(a,b,c,d) \
52  { XML_PROP_TYPE_##a, XML_PROP_TYPE_##b, \
53  XML_PROP_TYPE_##c, XML_PROP_TYPE_##d }
54 #define ENTRY3(a,b,c) \
55  { XML_PROP_TYPE_##a, XML_PROP_TYPE_##b, \
56  XML_PROP_TYPE_##c, XML_PROP_TYPE_END }
57 #define ENTRY2(a,b) \
58  { XML_PROP_TYPE_##a, XML_PROP_TYPE_##b, \
59  XML_PROP_TYPE_END, XML_PROP_TYPE_END }
60 #define ENTRY1(a) \
61  { XML_PROP_TYPE_##a, XML_PROP_TYPE_##END, \
62  XML_PROP_TYPE_END, XML_PROP_TYPE_END }
63 
64 const std::array<XMLPropType,MAX_PROP_TYPES> aPropTypes[XML_FAMILY_TYPE_END] =
65 {
66  ENTRY3( GRAPHIC, PARAGRAPH, TEXT ), // XML_FAMILY_TYPE_GRAPHIC,
67  ENTRY3( GRAPHIC, PARAGRAPH, TEXT ), // XML_FAMILY_TYPE_PRESENTATION,
68  ENTRY1( DRAWING_PAGE ), // XML_FAMILY_TYPE_DRAWING_PAGE,
69  ENTRY1( END ), // XML_FAMILY_TYPE_MASTER_PAGE
70  ENTRY1( PAGE_LAYOUT ), // XML_FAMILY_TYPE_PAGE_LAYOUT,
71  ENTRY1( HEADER_FOOTER ), // XML_FAMILY_TYPE_HEADER_FOOTER
72  ENTRY1( TEXT ), // XML_FAMILY_TYPE_TEXT,
73  ENTRY2( PARAGRAPH, TEXT ), // XML_FAMILY_TYPE_PARAGRAPH,
74  ENTRY1( RUBY ), //XML_FAMILY_TYPE_RUBY,
75  ENTRY1( SECTION ), // XML_FAMILY_TYPE_SECTION,
76  ENTRY1( TABLE ), // XML_FAMILY_TYPE_TABLE,
77  ENTRY1( TABLE_COLUMN ), // XML_FAMILY_TYPE_TABLE_COLUMN,
78  ENTRY1( TABLE_ROW ), // XML_FAMILY_TYPE_TABLE_ROW,
79  ENTRY3( TABLE_CELL, PARAGRAPH, TEXT ), // XML_FAMILY_TYPE_TABLE_CELL,
80  ENTRY1( LIST_LEVEL ), // XML_FAMILY_TYPE_LIST,
81  ENTRY4( CHART, GRAPHIC, PARAGRAPH, TEXT ), // XML_FAMILY_TYPE_CHART,
82  ENTRY1( TEXT ), // XML_FAMILY_TYPE_DATA,
83  ENTRY1( END ), // XML_FAMILY_TYPE_GRADIENT,
84  ENTRY1( END ), // XML_FAMILY_TYPE_HATCH,
85  ENTRY1( END ), // XML_FAMILY_TYPE_FILL_IMAGE,
86  ENTRY1( END ), // XML_FAMILY_TYPE_STROKE_DASH,
87  ENTRY1( END ), // XML_FAMILY_TYPE_MARKER,
88 };
89 
91 {
106 };
107 
109 {
111  PROP_OOO_DRAWING_PAGE_ATTR_ACTIONS, // DRAWING_PAGE
116  MAX_OOO_PROP_ACTIONS, // RUBY
124 };
125 
127 {
142 };
143 
144 namespace {
145 
146 class XMLTypedPropertiesOOoTContext_Impl : public XMLPersElemContentTContext
147 {
148  css::uno::Reference< css::xml::sax::XAttributeList > m_xAttrList;
149 
150 public:
151  XMLTypedPropertiesOOoTContext_Impl( XMLTransformerBase& rTransformer,
152  const OUString& rQName );
153 
155  void AddAttribute( const OUString &sName ,
156  const OUString &sValue );
157  void AddAttribute( sal_uInt16 nPrefix, XMLTokenEnum eToken,
158  const OUString &sValue );
159 
160  virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& rAttrList ) override;
161 
162  virtual void Export() override;
163 };
164 
165 }
166 
167 XMLTypedPropertiesOOoTContext_Impl::XMLTypedPropertiesOOoTContext_Impl(
168  XMLTransformerBase& rImp,
169  const OUString& rQName ) :
170  XMLPersElemContentTContext( rImp, rQName ),
171  m_xAttrList( new XMLMutableAttributeList() )
172 {
173 }
174 
175 void XMLTypedPropertiesOOoTContext_Impl::AddAttribute(
176  const OUString &sName ,
177  const OUString &sValue )
178 {
179  static_cast< XMLMutableAttributeList * >( m_xAttrList.get() )
180  ->AddAttribute( sName, sValue );
181 }
182 
183 void XMLTypedPropertiesOOoTContext_Impl::AddAttribute(
184  sal_uInt16 nPrefix, XMLTokenEnum eToken,
185  const OUString &sValue )
186 {
187  OUString sName(
188  GetTransformer().GetNamespaceMap().GetQNameByKey(
189  nPrefix, ::xmloff::token::GetXMLToken( eToken ) ) );
190  static_cast< XMLMutableAttributeList * >( m_xAttrList.get() )
191  ->AddAttribute( sName, sValue );
192 }
193 
194 void XMLTypedPropertiesOOoTContext_Impl::StartElement(
195  const Reference< XAttributeList >& )
196 {
197  // empty, ignore even the attribute list
198 }
199 
200 void XMLTypedPropertiesOOoTContext_Impl::Export()
201 {
202  if( m_xAttrList->getLength() || HasElementContent() )
203  {
204  GetTransformer().GetDocHandler()->startElement( GetQName(), m_xAttrList );
205  ExportContent();
206  GetTransformer().GetDocHandler()->endElement( GetQName() );
207  }
208 }
209 
210 namespace {
211 
212 class XMLPropertiesOOoTContext_Impl : public XMLTransformerContext
213 {
215  m_aPropContexts[MAX_PROP_TYPES];
216 
217  using XMLPropTypes = std::array<XMLPropType, MAX_PROP_TYPES>;
218 
219  XMLPropTypes const & m_rPropTypes;
220 
221  bool const m_bPersistent;
222 
223  XMLTypedPropertiesOOoTContext_Impl *GetPropContextAndAction(
224  TransformerAction_Impl& rAction,
225  sal_uInt16 nPrefix, const OUString& rLocalName,
226  bool bElem );
227 
228  XMLTypedPropertiesOOoTContext_Impl *GetPropContext(
229  XMLPropType eType );
230 
231 public:
232  XMLPropertiesOOoTContext_Impl( XMLTransformerBase& rTransformer,
233  const OUString& rQName,
234  const XMLPropTypes& rTypes,
235  bool bPersistent );
236 
238  sal_uInt16 nPrefix,
239  const OUString& rLocalName,
240  const OUString& rQName,
241  const Reference< XAttributeList >& rAttrList ) override;
242 
243  virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& rAttrList ) override;
244 
245  virtual void EndElement() override;
246 
247  virtual void Characters( const OUString& rChars ) override;
248 
249  virtual void Export() override;
250 
251  virtual bool IsPersistent() const override;
252 };
253 
254 }
255 
256 XMLTypedPropertiesOOoTContext_Impl
257  *XMLPropertiesOOoTContext_Impl::GetPropContext(
258  XMLPropType eType )
259 {
260  sal_uInt16 nIndex = MAX_PROP_TYPES;
261  for( sal_uInt16 i=0; i< MAX_PROP_TYPES; i++ )
262  {
263  if( m_rPropTypes[i] == eType )
264  {
265  nIndex = i;
266  break;
267  }
268  }
269  if( MAX_PROP_TYPES == nIndex )
270  return nullptr;
271 
272  if( !m_aPropContexts[nIndex].is() )
273  {
274  m_aPropContexts[nIndex] =
275  new XMLTypedPropertiesOOoTContext_Impl(
276  GetTransformer(),
277  GetTransformer().GetNamespaceMap().GetQNameByKey(
280  aPropTokens[m_rPropTypes[nIndex]] ) ));
281  }
282 
283  return m_aPropContexts[nIndex].get();
284 }
285 
286 XMLTypedPropertiesOOoTContext_Impl
287  *XMLPropertiesOOoTContext_Impl::GetPropContextAndAction(
288  TransformerAction_Impl& rAction,
289  sal_uInt16 nPrefix, const OUString& rLocalName,
290  bool bElem )
291 {
293  sal_uInt16 nIndex = 0;
294 
295  XMLTransformerActions::key_type aKey( nPrefix, rLocalName );
296  sal_uInt16 i=0;
297  while( i < MAX_PROP_TYPES && XML_PROP_TYPE_END!=m_rPropTypes[i])
298  {
299  sal_uInt16 nActionMap =
300  (bElem ? aElemActionMaps : aAttrActionMaps)[m_rPropTypes[i]];
301  if( nActionMap < MAX_OOO_PROP_ACTIONS )
302  {
303  XMLTransformerActions *pActions =
304  GetTransformer().GetUserDefinedActions( nActionMap );
305  OSL_ENSURE( pActions, "go no actions" );
306  if( pActions )
307  {
308  XMLTransformerActions::const_iterator aIter =
309  pActions->find( aKey );
310 
311  if( aIter != pActions->end() )
312  {
313  rAction = (*aIter).second;
314  nIndex = i;
315  break;
316  }
317  }
318  }
319  ++i;
320  }
321 
322 #ifdef DBG_UTIL
323  if( !( XML_NAMESPACE_NONE == nPrefix ||
324  (XML_NAMESPACE_UNKNOWN_FLAG & nPrefix) ||
325  XML_PROP_TYPE_END==m_rPropTypes[1] ||
326  (i<MAX_PROP_TYPES && XML_PROP_TYPE_END!=m_rPropTypes[i]) ) )
327  {
328  SAL_WARN("xmloff", "Didn't find property: "
329  << GetTransformer().GetNamespaceMap().GetPrefixByKey( nPrefix )
330  << ":"
331  << rLocalName
332  << ", assuming <style:"
333  << ::xmloff::token::GetXMLToken( aPropTokens[m_rPropTypes[0]] )
334  << ">" );
335  }
336 #endif
337 
338  if( !m_aPropContexts[nIndex].is() )
339  {
340  m_aPropContexts[nIndex] =
341  new XMLTypedPropertiesOOoTContext_Impl(
342  GetTransformer(),
343  GetTransformer().GetNamespaceMap().GetQNameByKey(
346  aPropTokens[m_rPropTypes[nIndex]] ) ));
347  }
348 
349  return m_aPropContexts[nIndex].get();
350 }
351 
352 XMLPropertiesOOoTContext_Impl::XMLPropertiesOOoTContext_Impl(
353  XMLTransformerBase& rImp,
354  const OUString& rQName,
355  const XMLPropTypes& rTypes,
356  bool bPersistent ) :
357  XMLTransformerContext( rImp, rQName ),
358  // remember the types that belong to the attribute and element lists
359  m_rPropTypes(rTypes),
360  m_bPersistent( bPersistent )
361 {
362 }
363 
364 rtl::Reference<XMLTransformerContext> XMLPropertiesOOoTContext_Impl::CreateChildContext(
365  sal_uInt16 nPrefix,
366  const OUString& rLocalName,
367  const OUString& rQName,
368  const Reference< XAttributeList >& rAttrList )
369 {
370  TransformerAction_Impl aAction;
371  return GetPropContextAndAction( aAction, nPrefix, rLocalName, true )
372  ->CreateChildContext( nPrefix, rLocalName, rQName, rAttrList );
373 }
374 
375 void XMLPropertiesOOoTContext_Impl::StartElement(
376  const Reference< XAttributeList >& rAttrList )
377 {
378  XMLTypedPropertiesOOoTContext_Impl * pIntervalMinorDivisorContext = nullptr;
379  double fIntervalMajor = 0.0;
380  double fIntervalMinor = 0.0;
381  bool bMoveProtect = false;
382  bool bSizeProtect = false;
383  OUString aProtectAttrValue;
384  XMLTypedPropertiesOOoTContext_Impl * pProtectContext = nullptr;
385 
386  /* Attribute <style:mirror> has to be priority over attribute <style:draw>.
387  The filter from OpenDocument file format to OpenOffice.org file format
388  produces styles with both attributes. (#i49139#)
389  */
390  bool bExistStyleMirror( false );
391  OUStringBuffer aStyleMirrorAttrValue;
392  bool bExistDrawMirror( false );
393  OUString aDrawMirrorAttrValue;
394  XMLTypedPropertiesOOoTContext_Impl* pMirrorContext( nullptr );
395 
396  sal_Int16 nAttrCount = rAttrList.is() ? rAttrList->getLength() : 0;
397  for( sal_Int16 i=0; i < nAttrCount; i++ )
398  {
399  const OUString sAttrName = rAttrList->getNameByIndex( i );
400  const OUString sAttrValue = rAttrList->getValueByIndex( i );
401  OUString aLocalName;
402  sal_uInt16 nPrefix =
403  GetTransformer().GetNamespaceMap().GetKeyByAttrName( sAttrName,
404  &aLocalName );
405  TransformerAction_Impl aAction;
406  XMLTypedPropertiesOOoTContext_Impl *pContext =
407  GetPropContextAndAction( aAction, nPrefix, aLocalName, false );
408  switch( aAction.m_nActionType )
409  {
410  case XML_ATACTION_REMOVE:
411  break;
412  case XML_ATACTION_COPY:
413  pContext->AddAttribute( sAttrName, sAttrValue );
414  break;
416  {
417  pContext->AddAttribute( sAttrName, sAttrValue );
418  XMLTypedPropertiesOOoTContext_Impl *pContext2 =
419  GetPropContext( static_cast<XMLPropType>(aAction.m_nParam1) );
420  if( pContext2 )
421  pContext2->AddAttribute( sAttrName, sAttrValue );
422  }
423  break;
424  case XML_ATACTION_RENAME:
425  {
426  pContext->AddAttribute( aAction.GetQNamePrefixFromParam1(),
427  aAction.GetQNameTokenFromParam1(),
428  sAttrValue );
429  }
430  break;
432  {
433  OUString aAttrValue( sAttrValue );
434  GetTransformer().EncodeStyleName(aAttrValue);
435  pContext->AddAttribute( sAttrName, aAttrValue );
436  }
437  break;
439  {
440  OUString aAttrValue( sAttrValue );
441  GetTransformer().EncodeStyleName(aAttrValue);
442  pContext->AddAttribute( aAction.GetQNamePrefixFromParam1(),
443  aAction.GetQNameTokenFromParam1(),
444  aAttrValue );
445  }
446  break;
448  {
449  OUString aAttrValue( sAttrValue );
450  XMLTransformerBase::NegPercent(aAttrValue);
451  pContext->AddAttribute( sAttrName, aAttrValue );
452  }
453  break;
455  {
456  OUString aAttrValue( sAttrValue );
457  XMLTransformerBase::NegPercent(aAttrValue);
458  pContext->AddAttribute( aAction.GetQNamePrefixFromParam1(),
459  aAction.GetQNameTokenFromParam1(),
460  aAttrValue );
461  }
462  break;
464  {
465  OUString aAttrValue( sAttrValue );
467  pContext->AddAttribute( sAttrName, aAttrValue );
468  }
469  break;
471  {
472  OUString aAttrValue( sAttrValue );
474  pContext->AddAttribute( sAttrName, aAttrValue );
475  XMLTypedPropertiesOOoTContext_Impl *pContext2 =
476  GetPropContext( static_cast<XMLPropType>(aAction.m_nParam1) );
477  if( pContext2 )
478  pContext2->AddAttribute( sAttrName, aAttrValue );
479  }
480  break;
482  {
483  OUString aAttrValue( sAttrValue );
485  pContext->AddAttribute( sAttrName, aAttrValue );
486  }
487  break;
489  {
490  const OUString& aAttrValue( GetXMLToken(
491  IsXMLToken( sAttrValue, XML_TRUE )
494  OUString aAttrQName(
495  GetTransformer().GetNamespaceMap().GetQNameByKey(
498  pContext->AddAttribute( aAttrQName, aAttrValue );
499 
500  aAttrQName =
501  GetTransformer().GetNamespaceMap().GetQNameByKey(
504  pContext->AddAttribute( aAttrQName, aAttrValue );
505  }
506  break;
508  {
509  const OUString& aAttrValue( GetXMLToken(
510  IsXMLToken( sAttrValue, XML_TRUE )
511  ? XML_ALWAYS
512  : XML_AUTO) );
513  pContext->AddAttribute( sAttrName, aAttrValue );
514  }
515  break;
517  {
518  XMLTokenEnum eToken = GetTransformer().GetToken( sAttrValue );
519  bool bBold = false, bDouble = false;
520  switch( eToken )
521  {
522  case XML_SINGLE:
523  eToken = XML_SOLID;
524  break;
525  case XML_DOUBLE:
526  eToken = XML_SOLID;
527  bDouble = true;
528  break;
529  case XML_BOLD:
530  eToken = XML_SOLID;
531  bBold = true;
532  break;
533  case XML_BOLD_DOTTED:
534  eToken = XML_DOTTED;
535  bBold = true;
536  break;
537  case XML_BOLD_DASH:
538  eToken = XML_DASH;
539  bBold = true;
540  break;
541  case XML_BOLD_LONG_DASH:
542  eToken = XML_LONG_DASH;
543  bBold = true;
544  break;
545  case XML_BOLD_DOT_DASH:
546  eToken = XML_DOT_DASH;
547  bBold = true;
548  break;
550  eToken = XML_DOT_DOT_DASH;
551  bBold = true;
552  break;
553  case XML_BOLD_WAVE:
554  eToken = XML_WAVE;
555  bBold = true;
556  break;
557  case XML_DOUBLE_WAVE:
558  eToken = XML_WAVE;
559  bDouble = true;
560  break;
561  case XML_NONE:
562  eToken = XML_NONE;
563  bDouble = false;
564  break;
565  default:
566  OSL_FAIL( "xmloff::XMLPropertiesOOoTContext_Impl::StartElement(), unknown underline token!" );
567  break;
568  }
569  pContext->AddAttribute(
570  GetTransformer().GetNamespaceMap().GetQNameByKey(
573  eToken != XML_TOKEN_END ? GetXMLToken( eToken )
574  : sAttrValue );
575  if( bDouble )
576  pContext->AddAttribute(
577  GetTransformer().GetNamespaceMap().GetQNameByKey(
580  GetXMLToken( XML_DOUBLE ) );
581  if( bBold )
582  pContext->AddAttribute(
583  GetTransformer().GetNamespaceMap().GetQNameByKey(
586  GetXMLToken( XML_BOLD ) );
587  }
588  break;
590  {
591  XMLTokenEnum eToken = GetTransformer().GetToken( sAttrValue );
592  bool bBold = false, bDouble = false;
593  sal_Unicode c = 0;
594  switch( eToken )
595  {
596  case XML_SINGLE_LINE:
597  eToken = XML_SOLID;
598  break;
599  case XML_DOUBLE_LINE:
600  eToken = XML_SOLID;
601  bDouble = true;
602  break;
603  case XML_THICK_LINE:
604  eToken = XML_SOLID;
605  bBold = true;
606  break;
607  case XML_SLASH:
608  eToken = XML_SOLID;
609  c = '/';
610  break;
611  case XML_uX:
612  eToken = XML_SOLID;
613  c = 'X';
614  break;
615  default:
616  break;
617  }
618  pContext->AddAttribute(
619  GetTransformer().GetNamespaceMap().GetQNameByKey(
622  eToken != XML_TOKEN_END ? GetXMLToken( eToken )
623  : sAttrValue );
624  if( bDouble )
625  pContext->AddAttribute(
626  GetTransformer().GetNamespaceMap().GetQNameByKey(
629  GetXMLToken( XML_DOUBLE ) );
630  if( bBold )
631  pContext->AddAttribute(
632  GetTransformer().GetNamespaceMap().GetQNameByKey(
635  GetXMLToken( XML_BOLD ) );
636  if( c )
637  pContext->AddAttribute(
638  GetTransformer().GetNamespaceMap().GetQNameByKey(
641  OUString( c ) );
642  }
643  break;
645  {
646  sal_Int32 nSplineType = sAttrValue.toInt32();
647  OUString aNewAttrName = GetTransformer().GetNamespaceMap().GetQNameByKey(
649 
650  switch( nSplineType )
651  {
652  // straight lines
653  case 0:
654  pContext->AddAttribute(
655  aNewAttrName, GetXMLToken( XML_NONE ));
656  break;
657  // cubic spline
658  case 1:
659  pContext->AddAttribute(
660  aNewAttrName, GetXMLToken( XML_CUBIC_SPLINE ));
661  break;
662  // B-spline
663  case 2:
664  pContext->AddAttribute(
665  aNewAttrName, GetXMLToken( XML_B_SPLINE ));
666  break;
667 
668  default:
669  OSL_FAIL( "invalid spline type" );
670  pContext->AddAttribute(
671  aNewAttrName, GetXMLToken( XML_NONE ));
672  break;
673  }
674  }
675  break;
677  pContext->AddAttribute( sAttrName, sAttrValue );
678  ::sax::Converter::convertDouble( fIntervalMajor, sAttrValue );
679  break;
681  ::sax::Converter::convertDouble( fIntervalMinor, sAttrValue );
682  pIntervalMinorDivisorContext = pContext;
683  break;
684  case XML_PTACTION_SYMBOL:
685  {
686  sal_Int32 nSymbolType = sAttrValue.toInt32();
687  OUString aNewAttrName = GetTransformer().GetNamespaceMap().GetQNameByKey(
689 
690  if( nSymbolType >= 0 )
691  {
692  pContext->AddAttribute( aNewAttrName, GetXMLToken( XML_NAMED_SYMBOL ));
693  enum XMLTokenEnum eToken = XML_TOKEN_INVALID;
694  switch( nSymbolType )
695  {
696  // SYMBOL0
697  case 0:
698  // "square" has an awkward token name
699  eToken = XML_GRADIENTSTYLE_SQUARE;
700  break;
701  // SYMBOL1
702  case 1:
703  eToken = XML_DIAMOND;
704  break;
705  // SYMBOL2
706  case 2:
707  eToken = XML_ARROW_DOWN;
708  break;
709  // SYMBOL3
710  case 3:
711  eToken = XML_ARROW_UP;
712  break;
713  // SYMBOL4
714  case 4:
715  eToken = XML_ARROW_RIGHT;
716  break;
717  // SYMBOL5
718  case 5:
719  eToken = XML_ARROW_LEFT;
720  break;
721  // SYMBOL6
722  case 6:
723  eToken = XML_BOW_TIE;
724  break;
725  // SYMBOL7
726  case 7:
727  eToken = XML_HOURGLASS;
728  break;
729  case 8:
730  eToken = XML_CIRCLE;
731  break;
732  case 9:
733  eToken = XML_STAR;
734  break;
735  case 10:
736  eToken = XML_X;
737  break;
738  case 11:
739  eToken = XML_PLUS;
740  break;
741  case 12:
742  eToken = XML_ASTERISK;
743  break;
744  case 13:
745  eToken = XML_HORIZONTAL_BAR;
746  break;
747  case 14:
748  eToken = XML_VERTICAL_BAR;
749  break;
750  default:
751  OSL_FAIL( "invalid named symbol" );
752  break;
753  }
754 
755  if( eToken != XML_TOKEN_INVALID )
756  {
757  pContext->AddAttribute( GetTransformer().GetNamespaceMap().GetQNameByKey(
759  GetXMLToken( eToken ));
760  }
761  }
762  else
763  {
764  switch( nSymbolType )
765  {
766  // NONE
767  case -3:
768  pContext->AddAttribute(
769  aNewAttrName, GetXMLToken( XML_NONE ));
770  break;
771  // AUTO
772  case -2:
773  pContext->AddAttribute(
774  aNewAttrName, GetXMLToken( XML_AUTOMATIC ));
775  break;
776  // BITMAPURL
777  case -1:
778  pContext->AddAttribute(
779  aNewAttrName, GetXMLToken( XML_IMAGE ));
780  break;
781  default:
782  OSL_FAIL( "invalid symbol type" );
783  pContext->AddAttribute(
784  aNewAttrName, GetXMLToken( XML_NONE ));
785  break;
786  }
787  }
788  }
789  break;
791  {
792  // create an xlink:href element for URI attribute
793  XMLPersAttrListTContext *pSymbolImageContext = new XMLPersAttrListTContext(
794  GetTransformer(), GetTransformer().GetNamespaceMap().GetQNameByKey(
796  rtl::Reference<XMLTransformerContext> xSymbolImageContext(pSymbolImageContext);
797 
798  OUString aAttrValue( sAttrValue );
799  if( GetTransformer().ConvertURIToOASIS( aAttrValue, true ))
800  {
801  pSymbolImageContext->AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aAttrValue );
802  pContext->AddContent(xSymbolImageContext);
803  }
804  }
805  break;
806 
807  // #i25616#
809  {
810  OUString aAttrValue( sAttrValue );
811  XMLTransformerBase::NegPercent(aAttrValue);
812  pContext->AddAttribute( XML_NAMESPACE_DRAW,
813  XML_OPACITY,
814  aAttrValue );
815  pContext->AddAttribute( XML_NAMESPACE_DRAW,
817  aAttrValue );
818  }
819  break;
820 
822  {
823  pContext->AddAttribute(
825  GetXMLToken(
826  IsXMLToken( sAttrValue, XML_COLUMNSPLIT_AVOID )
827  ? XML_ALWAYS
828  : XML_AUTO ) );
829  }
830  break;
832  {
833  OUString aAttrValue( sAttrValue );
834  if( aAttrValue.indexOf( '%' ) != -1 )
835  {
836  sal_Int32 nValue = 0;
837  ::sax::Converter::convertPercent( nValue, sAttrValue );
838  if( nValue )
839  {
840  nValue /= 100;
841  OUStringBuffer aOut;
842  ::sax::Converter::convertPercent( aOut, nValue );
843  aAttrValue = aOut.makeStringAndClear();
844  }
845  }
846  else
847  {
849  }
850 
851  pContext->AddAttribute( sAttrName, aAttrValue );
852  }
853  break;
855  bMoveProtect = IsXMLToken( sAttrValue, XML_TRUE );
856  pProtectContext = pContext;
857  break;
859  bSizeProtect = IsXMLToken( sAttrValue, XML_TRUE );
860  pProtectContext = pContext;
861  break;
863  aProtectAttrValue = sAttrValue;
864  pProtectContext = pContext;
865  break;
866  case XML_ATACTION_DRAW_MIRROR_OOO: // renames draw:mirror to style:mirror and adapts values
867  {
868  // OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#)
869  aDrawMirrorAttrValue =
870  GetXMLToken( IsXMLToken( sAttrValue, XML_TRUE )
871  ? XML_HORIZONTAL : XML_NONE );
872  bExistDrawMirror = true;
873  pMirrorContext = pContext;
874  }
875  break;
876  // OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#)
877  case XML_ATACTION_STYLE_MIRROR_OOO: // adapts style:mirror values
878  {
879  SvXMLTokenEnumerator aTokenEnum( sAttrValue );
880  OUString aToken;
881  while( aTokenEnum.getNextToken( aToken ) )
882  {
883  if ( !aStyleMirrorAttrValue.isEmpty() )
884  {
885  aStyleMirrorAttrValue.append(" ");
886  }
887 
888  if ( IsXMLToken( aToken, XML_HORIZONTAL_ON_LEFT_PAGES ) )
889  {
890  aStyleMirrorAttrValue.append(GetXMLToken( XML_HORIZONTAL_ON_EVEN ));
891  }
892  else if ( IsXMLToken( aToken, XML_HORIZONTAL_ON_RIGHT_PAGES ) )
893  {
894  aStyleMirrorAttrValue.append(GetXMLToken( XML_HORIZONTAL_ON_ODD ));
895  }
896  else
897  {
898  aStyleMirrorAttrValue.append(aToken);
899  }
900  }
901  bExistStyleMirror = true;
902  pMirrorContext = pContext;
903  }
904  break;
905  case XML_ATACTION_GAMMA_OOO: // converts double value to percentage
906  {
907  double fValue = sAttrValue.toDouble();
908  sal_Int32 nValue = static_cast<sal_Int32>((fValue * 100.0) + ( fValue > 0 ? 0.5 : - 0.5 ) );
909 
910  OUStringBuffer aOut;
911  ::sax::Converter::convertPercent( aOut, nValue );
912  OUString aAttrValue( aOut.makeStringAndClear() );
913  pContext->AddAttribute( sAttrName, aAttrValue );
914  }
915  break;
917  {
918  sal_Int32 nValue;
919  if( sAttrValue.indexOf( '%' ) != -1 )
920  {
921  ::sax::Converter::convertPercent( nValue, sAttrValue );
922  }
923  else
924  {
925  nValue = sal_Int32( sAttrValue.toDouble() * 100.0 );
926  }
927  nValue = 100 - nValue;
928 
929  OUStringBuffer aOut;
930  ::sax::Converter::convertPercent( aOut, nValue );
931  pContext->AddAttribute( sAttrName, aOut.makeStringAndClear() );
932  }
933  break;
934  default:
935  OSL_ENSURE( false, "unknown action" );
936  break;
937  }
938  }
939 
940  // OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#)
941  if ( bExistStyleMirror )
942  {
943  pMirrorContext->AddAttribute(
944  GetTransformer().GetNamespaceMap().GetQNameByKey(
946  aStyleMirrorAttrValue.makeStringAndClear());
947  }
948  else if ( bExistDrawMirror )
949  {
950  pMirrorContext->AddAttribute(
951  GetTransformer().GetNamespaceMap().GetQNameByKey(
953  aDrawMirrorAttrValue);
954  }
955 
956  if (bMoveProtect || bSizeProtect || !aProtectAttrValue.isEmpty())
957  {
958  if( (bMoveProtect ||bSizeProtect) && IsXMLToken( aProtectAttrValue, XML_NONE ) )
959  aProtectAttrValue.clear();
960 
961  const OUString& rPosition = GetXMLToken( XML_POSITION );
962  if( bMoveProtect && -1 == aProtectAttrValue.indexOf( rPosition ) )
963  {
964  if( !aProtectAttrValue.isEmpty() )
965  aProtectAttrValue += " ";
966  aProtectAttrValue += rPosition;
967  }
968 
969  const OUString& rSize = GetXMLToken( XML_SIZE );
970  if( bSizeProtect && -1 == aProtectAttrValue.indexOf( rSize ) )
971  {
972  if( !aProtectAttrValue.isEmpty() )
973  aProtectAttrValue += " ";
974  aProtectAttrValue += rSize;
975  }
976 
977  assert(pProtectContext && "coverity[var_deref_model] - pProtectContext should be assigned in a superset of the enclosing if condition entry logic");
978  pProtectContext->AddAttribute( GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_STYLE, GetXMLToken( XML_PROTECT ) ), aProtectAttrValue );
979  }
980 
981  if( !pIntervalMinorDivisorContext )
982  return;
983 
984  if( fIntervalMinor != 0.0 )
985  {
986  sal_Int32 nIntervalMinorDivisor = static_cast< sal_Int32 >(
987  ::rtl::math::round( fIntervalMajor / fIntervalMinor ));
988 
989  pIntervalMinorDivisorContext->AddAttribute(
990  GetTransformer().GetNamespaceMap().GetQNameByKey(
993  OUString::number( nIntervalMinorDivisor ));
994  }
995 }
996 
997 void XMLPropertiesOOoTContext_Impl::EndElement()
998 {
999  if( !m_bPersistent )
1000  Export();
1001 }
1002 
1003 void XMLPropertiesOOoTContext_Impl::Characters( const OUString& )
1004 {
1005  // ignore them
1006 }
1007 
1008 void XMLPropertiesOOoTContext_Impl::Export()
1009 {
1010 
1011  for(rtl::Reference<XMLTypedPropertiesOOoTContext_Impl> & rPropContext : m_aPropContexts)
1012  {
1013  if( rPropContext.is() )
1014  rPropContext->Export();
1015  }
1016 }
1017 
1018 bool XMLPropertiesOOoTContext_Impl::IsPersistent() const
1019 {
1020  return m_bPersistent;
1021 }
1022 
1024  const OUString& rQName,
1025  XMLFamilyType eT,
1026  bool bPersistent ) :
1027  XMLPersElemContentTContext( rImp, rQName ),
1028  m_eFamily( eT ),
1029  m_bPersistent( bPersistent )
1030 {
1031 }
1032 
1034  XMLTransformerBase& rImp,
1035  const OUString& rQName,
1036  XMLFamilyType eT,
1037  sal_uInt16 nPrefix,
1038  ::xmloff::token::XMLTokenEnum eToken,
1039  bool bPersistent ) :
1040  XMLPersElemContentTContext( rImp, rQName, nPrefix, eToken ),
1041  m_eFamily( eT ),
1042  m_bPersistent( bPersistent )
1043 {
1044 }
1045 
1047 {
1048 }
1049 
1051  sal_uInt16 nPrefix,
1052  const OUString& rLocalName,
1053  const OUString& rQName,
1054  const Reference< XAttributeList >& rAttrList )
1055 {
1057 
1058  if( XML_NAMESPACE_STYLE == nPrefix &&
1059  IsXMLToken( rLocalName, XML_PROPERTIES ) )
1060  {
1062  {
1063  OSL_ENSURE( false, "unexpected properties element" );
1064  pContext = m_bPersistent
1066  nPrefix, rLocalName, rQName, rAttrList )
1068  nPrefix, rLocalName, rQName, rAttrList );
1069  }
1070  else if( aPropTypes[m_eFamily][1] == XML_PROP_TYPE_END )
1071  {
1072  sal_uInt16 nActionMap =
1074  if( nActionMap < MAX_OOO_PROP_ACTIONS )
1075  {
1076  pContext.set(new XMLPropertiesOOoTContext_Impl(
1077  GetTransformer(), rQName,
1078  aPropTypes[m_eFamily], m_bPersistent ));
1079  }
1080  else
1081  {
1082  if( m_bPersistent )
1083  pContext.set(new XMLPersElemContentTContext(
1084  GetTransformer(), rQName,
1086  aPropTokens[aPropTypes[m_eFamily][0]] ));
1087  else
1088  pContext.set(new XMLRenameElemTransformerContext(
1089  GetTransformer(), rQName,
1091  aPropTokens[aPropTypes[m_eFamily][0]] ));
1092  }
1093  }
1094  else
1095  {
1096  pContext.set(new XMLPropertiesOOoTContext_Impl(
1097  GetTransformer(), rQName,
1099  }
1100 
1101  if( m_bPersistent )
1102  AddContent( pContext );
1103  }
1104  else
1105  {
1106  pContext = m_bPersistent
1108  nPrefix, rLocalName, rQName, rAttrList )
1110  nPrefix, rLocalName, rQName, rAttrList );
1111  }
1112 
1113  return pContext;
1114 }
1115 
1117  const Reference< XAttributeList >& rAttrList )
1118 {
1119  XMLTransformerActions *pActions =
1121  OSL_ENSURE( pActions, "go no actions" );
1122 
1123  Reference< XAttributeList > xAttrList( rAttrList );
1124  XMLMutableAttributeList *pMutableAttrList = nullptr;
1125  sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
1126  for( sal_Int16 i=0; i < nAttrCount; i++ )
1127  {
1128  const OUString sAttrName = xAttrList->getNameByIndex( i );
1129  OUString aLocalName;
1130  sal_uInt16 nPrefix =
1132  &aLocalName );
1133  XMLTransformerActions::key_type aKey( nPrefix, aLocalName );
1134  XMLTransformerActions::const_iterator aIter =
1135  pActions->find( aKey );
1136  if( aIter != pActions->end() )
1137  {
1138  if( !pMutableAttrList )
1139  {
1140  pMutableAttrList =
1141  new XMLMutableAttributeList( xAttrList );
1142  xAttrList = pMutableAttrList;
1143  }
1144  const OUString sAttrValue = xAttrList->getValueByIndex( i );
1145  switch( (*aIter).second.m_nActionType )
1146  {
1148  {
1149  bool bControl = false;
1151  {
1152  if( IsXMLToken( sAttrValue, XML_GRAPHICS ) )
1154  else if( IsXMLToken( sAttrValue, XML_PRESENTATION ) )
1156  else if( IsXMLToken( sAttrValue, XML_DRAWING_PAGE ) )
1158  else if( IsXMLToken( sAttrValue, XML_TEXT) )
1160  else if( IsXMLToken( sAttrValue, XML_PARAGRAPH) )
1162  else if( IsXMLToken( sAttrValue, XML_RUBY) )
1164  else if( IsXMLToken( sAttrValue, XML_SECTION) )
1166  else if( IsXMLToken( sAttrValue, XML_TABLE) )
1168  else if( IsXMLToken( sAttrValue, XML_TABLE_COLUMN) )
1170  else if( IsXMLToken( sAttrValue, XML_TABLE_ROW) )
1172  else if( IsXMLToken( sAttrValue, XML_TABLE_CELL) )
1174  else if( IsXMLToken( sAttrValue, XML_CHART) )
1176  else if( IsXMLToken( sAttrValue, XML_CONTROL) )
1177  {
1179  bControl = true;
1180  }
1181  }
1183  {
1184  pMutableAttrList->SetValueByIndex( i,
1185  GetXMLToken( XML_GRAPHIC ) );
1186  }
1187  else if( bControl )
1188  {
1189  pMutableAttrList->SetValueByIndex( i,
1191  }
1192  }
1193  break;
1194  case XML_ATACTION_INCH2IN:
1195  {
1196  OUString aAttrValue( sAttrValue );
1198  aAttrValue ) )
1199  pMutableAttrList->SetValueByIndex( i, aAttrValue );
1200  }
1201  break;
1203  {
1204  OUString aAttrValue( sAttrValue );
1205  if( GetTransformer().EncodeStyleName(aAttrValue) )
1206  {
1207  pMutableAttrList->SetValueByIndex( i, aAttrValue );
1208  OUString aNewAttrQName(
1209  GetTransformer().GetNamespaceMap().
1210  GetQNameByKey(
1211  nPrefix, ::xmloff::token::GetXMLToken(
1212  XML_DISPLAY_NAME ) ) );
1213  pMutableAttrList->AddAttribute( aNewAttrQName,
1214  sAttrValue );
1215  }
1216  }
1217  break;
1219  {
1220  OUString aAttrValue( sAttrValue );
1221  if( GetTransformer().EncodeStyleName(aAttrValue) )
1222  pMutableAttrList->SetValueByIndex( i, aAttrValue );
1223  }
1224  break;
1226  {
1227  OUString aAttrValue( sAttrValue );
1228  if( XMLTransformerBase::NegPercent(aAttrValue) )
1229  pMutableAttrList->SetValueByIndex( i, aAttrValue );
1230  }
1231  break;
1232  case XML_ATACTION_URI_OOO:
1233  {
1234  OUString aAttrValue( sAttrValue );
1235  if( GetTransformer().ConvertURIToOASIS( aAttrValue,
1236  static_cast< bool >((*aIter).second.m_nParam1)))
1237  pMutableAttrList->SetValueByIndex( i, aAttrValue );
1238  }
1239  break;
1240  default:
1241  OSL_ENSURE( false, "unknown action" );
1242  break;
1243  }
1244  }
1245  }
1248  if( m_bPersistent )
1250  else
1251  GetTransformer().GetDocHandler()->startElement( GetExportQName(), xAttrList );
1252 }
1253 
1255 {
1256  if( m_bPersistent )
1258  else
1259  GetTransformer().GetDocHandler()->endElement( GetExportQName() );
1260 }
1261 
1262 void XMLStyleOOoTContext::Characters( const OUString& )
1263 {
1264  // element content only:
1265 }
1266 
1268 {
1269  return m_bPersistent;
1270 }
1271 
1273  sal_uInt16 nType )
1274 {
1275  XMLTransformerActionInit const *pInit = nullptr;
1276 
1277  switch( nType )
1278  {
1281  break;
1284  break;
1287  break;
1290  break;
1293  break;
1296  break;
1299  break;
1302  break;
1305  break;
1308  break;
1311  break;
1314  break;
1317  break;
1320  break;
1323  break;
1326  break;
1329  break;
1332  break;
1333  }
1334 
1335  XMLTransformerActions *pActions = nullptr;
1336  if( pInit )
1337  pActions = new XMLTransformerActions( pInit );
1338 
1339  return pActions;
1340 }
1341 
1342 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool IsXMLToken(const OUString &rString, enum XMLTokenEnum eToken)
compare eToken to the string
Definition: xmltoken.cxx:3461
#define ENTRY4(a, b, c, d)
const sal_uInt16 aAttrActionMaps[XML_PROP_TYPE_END]
sal_Int32 nIndex
XMLPropType
Definition: PropType.hxx:23
constexpr sal_uInt16 XML_NAMESPACE_CHART
static bool ReplaceInchWithIn(OUString &rValue)
XMLTransformerActionInit const aTableColumnPropertyOOoAttrActionTable[]
XMLTransformerActionInit const aListLevelPropertyOOoAttrActionTable[]
XMLTransformerActionInit const aGraphicPropertyOOoAttrActionTable[]
XMLTransformerActionInit const aHeaderFooterPropertyOOoAttrActionTable[]
XMLTransformerActionInit const aPageLayoutPropertyOOoAttrActionTable[]
XMLTransformerActionInit const aDrawingPagePropertyOOoAttrActionTable[]
XMLTransformerActionInit const aChartPropertyOOoElemActionTable[]
constexpr sal_uInt16 XML_NAMESPACE_XLINK
XMLStyleOOoTContext(XMLTransformerBase &rTransformer, const OUString &rQName, XMLFamilyType eType, bool bPersistent)
XMLTransformerActionInit const aParagraphPropertyOOoAttrActionTable[]
virtual ~XMLStyleOOoTContext() override
sal_uInt16 GetKeyByAttrName(const OUString &rAttrName, OUString *pPrefix, OUString *pLocalName, OUString *pNamespace) const
#define ENTRY3(a, b, c)
XMLTransformerActionInit const aTableRowPropertyOOoAttrActionTable[]
static XMLTransformerActions * CreateTransformerActions(sal_uInt16 nType)
static void convertDouble(OUStringBuffer &rBuffer, double fNumber, bool bWriteUnits, sal_Int16 nSourceUnit, sal_Int16 nTargetUnit)
sal_uInt16 sal_Unicode
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
virtual rtl::Reference< XMLTransformerContext > CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const OUString &rQName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
css::uno::Reference< css::xml::sax::XAttributeList > m_xAttrList
#define ENTRY2(a, b)
SvXMLNamespaceMap & GetNamespaceMap()
virtual sal_Int16 SAL_CALL getLength() override
const XMLTokenEnum aPropTokens[XML_PROP_TYPE_END]
constexpr sal_uInt16 XML_NAMESPACE_DRAW
XMLTokenEnum
The enumeration of all XML tokens.
Definition: xmltoken.hxx:49
XMLTransformerActionInit const aSectionPropertyOOoAttrActionTable[]
virtual void EndElement() override
END
#define ENTRY1(a)
constexpr sal_uInt16 XML_NAMESPACE_FO
XMLTransformerActionInit const aTablePropertyOOoAttrActionTable[]
int i
void SetValueByIndex(sal_Int16 i, const OUString &rValue)
virtual void Export() override
XMLFamilyType
Definition: FamilyType.hxx:23
const sal_uInt16 XML_NAMESPACE_UNKNOWN_FLAG
XMLTransformerActionInit const aParagraphPropertyOOoElemActionTable[]
void AddAttribute(const OUString &sName, const OUString &sValue)
const sal_uInt16 MAX_PROP_TYPES
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
const sal_uInt16 XML_NAMESPACE_NONE
virtual void Characters(const OUString &rChars)
XMLTransformerActionInit const aChartPropertyOOoAttrActionTable[]
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
const css::uno::Reference< css::xml::sax::XDocumentHandler > & GetDocHandler() const
void AddContent(rtl::Reference< XMLTransformerContext > const &pContent)
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
const OUString & GetExportQName() const
virtual rtl::Reference< XMLTransformerContext > CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const OUString &rQName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
sal_uInt16 GetQNamePrefixFromParam1() const
virtual XMLTransformerActions * GetUserDefinedActions(sal_uInt16 n)
XMLTransformerActionInit const aTextPropertyOOoElemActionTable[]
XMLTransformerBase & GetTransformer()
static bool ReplaceSingleInchWithIn(OUString &rValue)
static bool NegPercent(OUString &rValue)
DRAWING_PAGE
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
Definition: xmltoken.cxx:3405
Handling of tokens in XML:
void AddAttribute(sal_uInt16 nAPrefix,::xmloff::token::XMLTokenEnum eAToken,::xmloff::token::XMLTokenEnum eVToken)
virtual void Characters(const OUString &rChars) override
XMLTransformerActionInit const aGraphicPropertyOOoElemActionTable[]
virtual bool IsPersistent() const
virtual bool IsPersistent() const override
XMLTransformerActionInit const aTextPropertyOOoAttrActionTable[]
TABLE
XMLTransformerActionInit const aTableCellPropertyOOoAttrActionTable[]
#define SAL_WARN(area, stream)
const std::array< XMLPropType, MAX_PROP_TYPES > aPropTypes[XML_FAMILY_TYPE_END]
XMLTokenEnum eToken
Definition: xmltoken.cxx:40
virtual OUString SAL_CALL getValueByIndex(sal_Int16 i) override
virtual void EndElement() override
XMLPersElemContentTContext(XMLTransformerBase &rTransformer, const OUString &rQName)
::xmloff::token::XMLTokenEnum GetQNameTokenFromParam1() const
TEXT
constexpr sal_uInt16 XML_NAMESPACE_STYLE
const sal_uInt16 aElemActionMaps[XML_PROP_TYPE_END]
virtual rtl::Reference< XMLTransformerContext > CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const OUString &rQName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
XMLTransformerActionInit const aTableCellPropertyOOoElemActionTable[]
sal_Int16 nValue
static bool convertPercent(sal_Int32 &rValue, const OUString &rString)