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