LibreOffice Module xmloff (master)  1
XMLNumberStyles.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 
22 #include <xmloff/xmlnamespace.hxx>
23 #include <xmloff/xmlimp.hxx>
24 #include <xmloff/namespacemap.hxx>
25 #include <xmloff/xmltoken.hxx>
26 
27 #include <sal/log.hxx>
28 
29 #include "sdxmlexp_impl.hxx"
30 #include "sdxmlimp_impl.hxx"
31 
32 using namespace ::xmloff::token;
33 
34 namespace {
35 
36 struct SdXMLDataStyleNumber
37 {
38  enum XMLTokenEnum meNumberStyle;
39  bool mbLong;
40  bool mbTextual;
41  bool mbDecimal02;
42  const char* mpText;
43 };
44 
45 }
46 
47 SdXMLDataStyleNumber const aSdXMLDataStyleNumbers[] =
48 {
49  { XML_DAY, false, false, false, nullptr },
50  { XML_DAY, true, false, false, nullptr },
51  { XML_MONTH, true, false, false, nullptr },
52  { XML_MONTH, false, true, false, nullptr },
53  { XML_MONTH, true, true, false, nullptr },
54  { XML_YEAR, false, false, false, nullptr },
55  { XML_YEAR, true, false, false, nullptr },
56  { XML_DAY_OF_WEEK, false, false, false, nullptr },
57  { XML_DAY_OF_WEEK, true, false, false, nullptr },
58  { XML_TEXT, false, false, false, "." },
59  { XML_TEXT, false, false, false, " " },
60  { XML_TEXT, false, false, false, ", " },
61  { XML_TEXT, false, false, false, ". " },
62  { XML_HOURS, false, false, false, nullptr },
63  { XML_MINUTES, false, false, false, nullptr },
64  { XML_TEXT, false, false, false, ":" },
65  { XML_AM_PM, false, false, false, nullptr },
66  { XML_SECONDS, false, false, false, nullptr },
67  { XML_SECONDS, false, false, true, nullptr },
68  { XML_TOKEN_INVALID, false, false, false, nullptr }
69 };
70 
71 // date
73 {
74  NONE = 0,
75  Day = 1, // <number:day/>
76  DayLong = 2, // <number:day number:style="long"/>
77  MonthLong = 3, // <number:month number:style="long"/>
78  MonthText = 4, // <number:month number:textual="true"/>
79  MonthLongText = 5, // <number:month number:style="long" number:textual="true"/>
80  Year = 6, // <number:year/>
81  YearLong = 7, // <number:year number:style="long"/>
82  DayOfWeek = 8, // <number:day-of-week/>
83  DayOfWeekLong = 9, // <number:day-of-week number:style="long"/>
84  TextPoint = 10, // <number:text>.</number:text>
85  TextSpace = 11, // <number:text> </number:text>
86  TextCommaSpace = 12, // <number:text>, </number:text>
87  TextPointSpace = 13, // <number:text>. </number:text>
88  Hours = 14, // <number:hours/>
89  Minutes = 15, // <number:minutes/>
90  TextColon = 16, // <number:text>:</number:text>
91  AmPm = 17, // <number:am-pm/>
92  Seconds = 18, // <number:seconds/>
93  Seconds_02 = 19, // <number:seconds number:/>
94 };
95 
97 {
98  const char* mpName;
102 };
103 
105 {
106  "D1", true, true,
107  {
113  DataStyleNumber::NONE, DataStyleNumber::NONE, DataStyleNumber::NONE
114  }
115 };
116 
118 {
119  "D2", true, true,
120  {
129  }
130 };
131 
133 {
134  "D3", false, true,
135  {
141  DataStyleNumber::NONE, DataStyleNumber::NONE, DataStyleNumber::NONE
142  }
143 };
144 
146 {
147  "D4", false, true,
148  {
154  DataStyleNumber::NONE, DataStyleNumber::NONE, DataStyleNumber::NONE
155  }
156 };
157 
159 {
160  "D5", false, true,
161  {
167  DataStyleNumber::NONE, DataStyleNumber::NONE, DataStyleNumber::NONE
168  }
169 };
170 
172 {
173  "D6", false, true,
174  {
180  DataStyleNumber::NONE, DataStyleNumber::NONE, DataStyleNumber::NONE
181  }
182 };
183 
185 {
186  "D7", false, true,
187  {
196  }
197 };
198 
200 {
201  "D8", false, true,
202  {
211  }
212 };
213 
215 { "T1", true, false,
216  {
223  DataStyleNumber::NONE, DataStyleNumber::NONE
224  }
225 };
226 
228 { "T2", false, false,
229  {
234  }
235 };
236 
238 { "T3", false, false,
239  {
245  DataStyleNumber::NONE, DataStyleNumber::NONE, DataStyleNumber::NONE
246  }
247 };
248 
250 { "T4", false, false,
251  {
257  DataStyleNumber::NONE, DataStyleNumber::NONE, DataStyleNumber::NONE
258  }
259 };
260 
262 { "T5", false, false,
263  {
269  }
270 };
271 
273 { "T6", false, false,
274  {
281  DataStyleNumber::NONE, DataStyleNumber::NONE
282  }
283 };
284 
286 { "T7", false, false,
287  {
294  DataStyleNumber::NONE, DataStyleNumber::NONE
295  }
296 };
297 
299 {
308 };
309 
311 {
318  &aSdXML_TimeStyle_7
319 };
320 
321 // export
322 
323 static void SdXMLExportDataStyleNumber( SdXMLExport& rExport, SdXMLDataStyleNumber const & rElement )
324 {
325  if( rElement.mbDecimal02 )
326  {
328  }
329 
330  if( rElement.mbLong )
331  {
333  }
334 
335  if( rElement.mbTextual )
336  {
338  }
339 
340  SvXMLElementExport aNumberStyle( rExport, XML_NAMESPACE_NUMBER, rElement.meNumberStyle, true, false );
341  if( rElement.mpText )
342  {
343  OUString sAttrValue( OUString::createFromAscii( rElement.mpText ) );
344  rExport.GetDocHandler()->characters( sAttrValue );
345  }
346 }
347 
348 static void SdXMLExportStyle( SdXMLExport& rExport, const SdXMLFixedDataStyle* pStyle, const SdXMLFixedDataStyle* pStyle2 = nullptr )
349 {
350  // name
351  OUString sAttrValue = OUString::createFromAscii( pStyle->mpName );
352  if( pStyle2 )
353  sAttrValue += OUString::createFromAscii( pStyle2->mpName );
354 
355  rExport.AddAttribute( XML_NAMESPACE_STYLE, XML_NAME, sAttrValue );
356 
357  if( pStyle->mbAutomatic )
358  {
360  }
361 
362  SvXMLElementExport aElement( rExport, XML_NAMESPACE_NUMBER, pStyle->mbDateStyle ? XML_DATE_STYLE : XML_TIME_STYLE, true, true );
363 
364  do
365  {
366 
367  const DataStyleNumber* pElements = &pStyle->mpFormat[0];
368 
369  while( *pElements != DataStyleNumber::NONE )
370  {
371  SdXMLDataStyleNumber const & rElement = aSdXMLDataStyleNumbers[ static_cast<int>(*pElements++) - 1 ];
372  SdXMLExportDataStyleNumber( rExport, rElement );
373  }
374 
375  if( pStyle2 )
376  {
377  SdXMLDataStyleNumber const & rElement = aSdXMLDataStyleNumbers[ static_cast<int>(DataStyleNumber::TextSpace) - 1 ];
378  SdXMLExportDataStyleNumber( rExport, rElement );
379  }
380 
381  pStyle = pStyle2;
382  pStyle2 = nullptr;
383  }
384  while( pStyle );
385 }
386 
388 {
389  SAL_WARN_IF( (nStyle < 0) || (nStyle >= SdXMLTimeFormatCount), "xmloff", "Unknown time style!" );
390  if( (nStyle >= 0) && (nStyle < SdXMLTimeFormatCount) )
391  SdXMLExportStyle( rExport, aSdXMLFixedTimeFormats[ nStyle ] );
392 }
393 
395 {
396  if( nStyle > 0x0f )
397  {
398  int nDateStyle = nStyle & 0x0f;
399  bool bHasDate = nDateStyle != 0;
400 
401  if( nDateStyle > 1 )
402  nDateStyle -= 2;
403 
404  SAL_WARN_IF(nDateStyle >= SdXMLDateFormatCount, "xmloff", "unknown date style!");
405 
406  int nTimeStyle = (nStyle >> 4) & 0x0f;
407  bool bHasTime = nTimeStyle != 0;
408 
409  if( nTimeStyle > 1 )
410  nTimeStyle -= 2;
411 
412  SAL_WARN_IF(nTimeStyle >= SdXMLTimeFormatCount, "xmloff", "Unknown time style!");
413 
414  if ((nDateStyle < SdXMLDateFormatCount) && (nTimeStyle < SdXMLTimeFormatCount))
415  {
416  if( bHasDate )
417  {
418  if( bHasTime )
419  {
420  SdXMLExportStyle( rExport, aSdXMLFixedDateFormats[ nDateStyle ], aSdXMLFixedTimeFormats[ nTimeStyle ] );
421  }
422  else
423  {
424  SdXMLExportStyle( rExport, aSdXMLFixedDateFormats[ nDateStyle ] );
425  }
426  }
427  else if( bHasTime )
428  {
429  SdXMLExportStyle( rExport, aSdXMLFixedTimeFormats[ nTimeStyle ] );
430  }
431  }
432  }
433  else
434  {
435  SAL_WARN_IF( (nStyle < 0) || (nStyle >= SdXMLDateFormatCount), "xmloff", "unknown date style!" );
436  if( (nStyle >= 0) && (nStyle < SdXMLDateFormatCount) )
437  SdXMLExportStyle( rExport, aSdXMLFixedDateFormats[ nStyle ] );
438  }
439 }
440 
441 OUString SdXMLNumberStylesExporter::getTimeStyleName(const sal_Int32 nTimeFormat )
442 {
443  sal_Int32 nFormat = nTimeFormat;
444  if( nFormat > 1 )
445  nFormat -= 2;
446 
447  if( (nFormat >= 0) && (nFormat < SdXMLTimeFormatCount) )
448  {
449  return OUString::createFromAscii(aSdXMLFixedTimeFormats[nFormat]->mpName );
450  }
451  else
452  {
453  return OUString();
454  }
455 }
456 
457 OUString SdXMLNumberStylesExporter::getDateStyleName(const sal_Int32 nDateFormat )
458 {
459  sal_Int32 nFormat = nDateFormat;
460 
461  if( nFormat > 0x0f )
462  {
463  OUString aStr;
464  if( nFormat & 0x0f )
465  aStr = getDateStyleName( nFormat & 0x0f );
466  aStr += getTimeStyleName( (nFormat >> 4) & 0x0f );
467  return aStr;
468  }
469 
470  if( nFormat > 1 )
471  nFormat -= 2;
472 
473  if( (nFormat >= 0) && (nFormat < SdXMLDateFormatCount) )
474  {
475  return OUString::createFromAscii(aSdXMLFixedDateFormats[nFormat]->mpName );
476  }
477  else
478  {
479  return OUString();
480  }
481 }
482 
483 // import
484 
486 {
487 private:
489 
490  OUString maNumberStyle;
491  bool mbLong;
492  bool mbTextual;
494  OUString maText;
495  css::uno::Reference< css::xml::sax::XFastContextHandler > mxSlaveContext;
496 
497 public:
498 
500  sal_Int32 nElement,
501  const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
503  const css::uno::Reference< css::xml::sax::XFastContextHandler >& rSlaveContext );
504 
505  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
506  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
507 
508  virtual void SAL_CALL startFastElement( sal_Int32 nElement,
509  const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) override;
510 
511  virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
512 
513  virtual void SAL_CALL characters( const OUString& rChars ) override;
514 };
515 
516 
518  SvXMLImport& rImport,
519  sal_Int32 nElement,
520  const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
522  const css::uno::Reference< css::xml::sax::XFastContextHandler >& rSlaveContext )
523 : SvXMLImportContext(rImport),
524  mpParent( pParent ),
525  maNumberStyle( SvXMLImport::getNameFromToken(nElement) ),
526  mxSlaveContext( rSlaveContext )
527 {
528  mbLong = false;
529  mbTextual = false;
530  mbDecimal02 = false;
531 
532  for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
533  {
534  OUString sValue = aIter.toString();
535 
536  switch (aIter.getToken())
537  {
539  mbDecimal02 = IsXMLToken( sValue, XML_2 );
540  break;
542  mbLong = IsXMLToken( sValue, XML_LONG );
543  break;
545  mbTextual = IsXMLToken( sValue, XML_TRUE );
546  break;
547  default:
548  SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << sValue);
549  }
550  }
551 
552 }
553 
554 css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLNumberFormatMemberImportContext::createFastChildContext(
555  sal_Int32 nElement,
556  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
557 {
558  return mxSlaveContext->createFastChildContext( nElement, xAttrList );
559 }
560 
562  sal_Int32 nElement,
563  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
564 {
565  mxSlaveContext->startFastElement( nElement, xAttrList );
566 }
567 
569 {
570  mxSlaveContext->endFastElement(nElement);
571 
572  if( mpParent )
574 }
575 
577 {
578  mxSlaveContext->characters( rChars );
579  maText += rChars;
580 }
581 
582 
583 SdXMLNumberFormatImportContext::SdXMLNumberFormatImportContext( SdXMLImport& rImport, sal_Int32 nElement, SvXMLNumImpData* pNewData, SvXMLStylesTokens nNewType, const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList, SvXMLStylesContext& rStyles)
584 : SvXMLNumFormatContext(rImport, nElement, pNewData, nNewType, xAttrList, rStyles),
585  mbAutomatic( false ),
586  mnElements{},
587  mnIndex(0),
588  mnKey( -1 )
589 {
590  mbTimeStyle = (nElement & TOKEN_MASK) == XML_TIME_STYLE;
591 
592  for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
593  {
594  OUString sValue = aIter.toString();
595  if( aIter.getToken() == XML_ELEMENT(NUMBER, XML_AUTOMATIC_ORDER) )
596  mbAutomatic = IsXMLToken( sValue, XML_TRUE );
597  else
598  SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << aIter.toString());
599  }
600 }
601 
603 {
604 }
605 
606 void SdXMLNumberFormatImportContext::add( OUString const & rNumberStyle, bool bLong, bool bTextual, bool bDecimal02, OUString const & rText )
607 {
608  if (mnIndex == 16)
609  return;
610 
611  const SdXMLDataStyleNumber* pStyleMember = aSdXMLDataStyleNumbers;
612  for( sal_uInt8 nIndex = 0; pStyleMember->meNumberStyle != XML_TOKEN_INVALID; nIndex++, pStyleMember++ )
613  {
614  if( IsXMLToken(rNumberStyle, pStyleMember->meNumberStyle) &&
615  (pStyleMember->mbLong == bLong) &&
616  (pStyleMember->mbTextual == bTextual) &&
617  (pStyleMember->mbDecimal02 == bDecimal02) &&
618  ( ( (pStyleMember->mpText == nullptr) && (rText.isEmpty()) ) ||
619  ( pStyleMember->mpText && (rText.equalsAscii( pStyleMember->mpText ) ) ) ) )
620  {
621  mnElements[mnIndex++] = static_cast<DataStyleNumber>(nIndex + 1);
622  return;
623  }
624  }
625 }
626 
627 bool SdXMLNumberFormatImportContext::compareStyle( const SdXMLFixedDataStyle* pStyle, sal_Int16& nIndex ) const
628 {
629  if( (pStyle->mbAutomatic != mbAutomatic) && (nIndex == 0))
630  return false;
631 
632  sal_Int16 nCompareIndex;
633  for( nCompareIndex = 0; nCompareIndex < 8; nIndex++, nCompareIndex++ )
634  {
635  if( pStyle->mpFormat[nCompareIndex] != mnElements[nIndex] )
636  return false;
637  }
638 
639  return true;
640 }
641 
643 {
645 
646  for( ; mnIndex < 16; mnIndex++ )
647  {
649  }
650 
651  if( mbTimeStyle )
652  {
653  // compare import with all time styles
654  for( sal_Int16 nFormat = 0; nFormat < SdXMLTimeFormatCount; nFormat++ )
655  {
656  sal_Int16 nIndex = 0;
657  if( compareStyle( aSdXMLFixedTimeFormats[nFormat], nIndex ) )
658  {
659  mnKey = nFormat + 2;
660  break;
661  }
662  }
663  }
664  else
665  {
666  // compare import with all date styles
667  for( sal_Int16 nFormat = 0; nFormat < SdXMLDateFormatCount; nFormat++ )
668  {
669  sal_Int16 nIndex = 0;
670  if( compareStyle( aSdXMLFixedDateFormats[nFormat], nIndex ) )
671  {
672  mnKey = nFormat + 2;
673  break;
674  }
675  else if( mnElements[nIndex] == DataStyleNumber::TextSpace )
676  {
677  // if it's a valid date ending with a space, see if a time style follows
678  for( sal_Int16 nTimeFormat = 0; nTimeFormat < SdXMLTimeFormatCount; nTimeFormat++ )
679  {
680  sal_Int16 nIndex2 = nIndex + 1;
681  if( compareStyle( aSdXMLFixedTimeFormats[nTimeFormat], nIndex2 ) )
682  {
683  mnKey = (nFormat + 2) | ((nTimeFormat + 2) << 4);
684  break;
685  }
686  }
687  }
688  }
689 
690  // no date style found? maybe it's an extended time style
691  if( mnKey == -1 )
692  {
693  // compare import with all time styles
694  for( sal_Int16 nFormat = 0; nFormat < SdXMLTimeFormatCount; nFormat++ )
695  {
696  sal_Int16 nIndex = 0;
697  if( compareStyle( aSdXMLFixedTimeFormats[nFormat], nIndex ) )
698  {
699  mnKey = (nFormat + 2) << 4;
700  break;
701  }
702  }
703  }
704  }
705 }
706 
707 css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLNumberFormatImportContext::createFastChildContext(
708  sal_Int32 nElement,
709  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
710 {
711  return new SdXMLNumberFormatMemberImportContext( GetImport(), nElement, xAttrList,
712  this, SvXMLNumFormatContext::createFastChildContext( nElement, xAttrList ) );
713 }
714 
715 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool IsXMLToken(const OUString &rString, enum XMLTokenEnum eToken)
compare eToken to the string
Definition: xmltoken.cxx:3434
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
sal_Int32 nIndex
const SdXMLFixedDataStyle aSdXML_TimeStyle_5
virtual void EndElement()
EndElement is called before a context will be destructed, but after an elements context has been pars...
Definition: xmlictxt.cxx:62
static void SdXMLExportStyle(SdXMLExport &rExport, const SdXMLFixedDataStyle *pStyle, const SdXMLFixedDataStyle *pStyle2=nullptr)
SdXMLDataStyleNumber const aSdXMLDataStyleNumbers[]
const SdXMLFixedDataStyle *const aSdXMLFixedDateFormats[SdXMLDateFormatCount]
const sal_Int16 SdXMLTimeFormatCount
const SdXMLFixedDataStyle aSdXML_TimeStyle_6
const SdXMLFixedDataStyle aSdXML_Standard_Short
SvXMLImport & GetImport()
Definition: xmlictxt.hxx:62
const SdXMLFixedDataStyle aSdXML_Standard_Long
static void SdXMLExportDataStyleNumber(SdXMLExport &rExport, SdXMLDataStyleNumber const &rElement)
DataStyleNumber mpFormat[8]
static void exportDateStyle(SdXMLExport &rExport, sal_Int32 nStyle)
const SdXMLFixedDataStyle aSdXML_TimeStyle_1
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
const css::uno::Reference< css::xml::sax::XDocumentHandler > & GetDocHandler() const
Definition: xmlexp.hxx:385
constexpr sal_uInt16 XML_NAMESPACE_NUMBER
const SdXMLFixedDataStyle aSdXML_DateStyle_4
static OUString getTimeStyleName(const sal_Int32 nTimeFormat)
const SdXMLFixedDataStyle *const aSdXMLFixedTimeFormats[SdXMLTimeFormatCount]
void AddAttribute(sal_uInt16 nPrefix, const char *pName, const OUString &rValue)
Definition: xmlexp.cxx:909
static OUString getPrefixAndNameFromToken(sal_Int32 nToken)
Definition: xmlimp.cxx:2025
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
XMLTokenEnum
The enumeration of all XML tokens.
Definition: xmltoken.hxx:49
const SdXMLFixedDataStyle aSdXML_TimeStyle_4
const SdXMLFixedDataStyle aSdXML_DateStyle_1
static OUString getDateStyleName(const sal_Int32 nDateFormat)
const SdXMLFixedDataStyle aSdXML_TimeStyle_2
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
Definition: xmlnumfi.cxx:1294
const SdXMLFixedDataStyle aSdXML_DateStyle_2
const SdXMLFixedDataStyle aSdXML_TimeStyle_3
void add(OUString const &rNumberStyle, bool bLong, bool bTextual, bool bDecimal02, OUString const &rText)
NUMBER
const SdXMLFixedDataStyle aSdXML_DateStyle_3
virtual void SAL_CALL characters(const OUString &rChars) override
css::uno::Reference< css::xml::sax::XFastContextHandler > mxSlaveContext
SvXMLStylesTokens
Definition: xmlnumfi.hxx:38
virtual ~SdXMLNumberFormatImportContext() override
SdXMLNumberFormatImportContext * mpParent
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &) override
bool compareStyle(const SdXMLFixedDataStyle *pStyle, sal_Int16 &nIndex) const
This class deliberately does not support XWeak, to improve performance when loading large documents...
Definition: xmlictxt.hxx:44
RegionData_Impl * mpParent
static void exportTimeStyle(SdXMLExport &rExport, sal_Int32 nStyle)
SdXMLNumberFormatImportContext(SdXMLImport &rImport, sal_Int32 nElement, SvXMLNumImpData *pNewData, SvXMLStylesTokens nNewType, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, SvXMLStylesContext &rStyles)
#define SAL_WARN_IF(condition, area, stream)
unsigned char sal_uInt8
DayOfWeek
Handling of tokens in XML:
const sal_Int16 SdXMLDateFormatCount
const SdXMLFixedDataStyle aSdXML_DateStyle_6
#define XML_ELEMENT(prefix, name)
Definition: xmlimp.hxx:94
const SdXMLFixedDataStyle aSdXML_TimeStyle_7
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
#define SAL_WARN(area, stream)
constexpr sal_Int32 TOKEN_MASK
Definition: xmlimp.hxx:91
int mnIndex
const SdXMLFixedDataStyle aSdXML_DateStyle_5
css::uno::Any const SvXMLExport & rExport
Definition: ImageStyle.hxx:38
DataStyleNumber
aStr
SdXMLNumberFormatMemberImportContext(SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, SdXMLNumberFormatImportContext *pParent, const css::uno::Reference< css::xml::sax::XFastContextHandler > &rSlaveContext)
constexpr sal_uInt16 XML_NAMESPACE_STYLE