LibreOffice Module sw (master)  1
htmlfld.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/document/XDocumentPropertiesSupplier.hpp>
21 #include <com/sun/star/document/XDocumentProperties.hpp>
22 
23 #include <osl/diagnose.h>
24 #include <docsh.hxx>
26 #include <svtools/htmltokn.h>
27 #include <svl/zformat.hxx>
28 #include <unotools/useroptions.hxx>
29 #include <fmtfld.hxx>
30 #include <ndtxt.hxx>
31 #include <doc.hxx>
32 #include <fldbas.hxx>
33 #include <docufld.hxx>
34 #include <flddat.hxx>
35 #include "htmlfld.hxx"
36 #include "swhtml.hxx"
37 
38 using namespace nsSwDocInfoSubType;
39 using namespace ::com::sun::star;
40 
42 {
43  const sal_Char *pName;
45 };
46 
48 {
51  { "DATE", SwFieldIds::Date },
52  { "TIME", SwFieldIds::Time },
58  { nullptr, SwFieldIds(0) }
59 };
60 
62 {
63  { "SSYS", NF_DATE_SYSTEM_SHORT },
64  { "LSYS", NF_DATE_SYSTEM_LONG },
65  { "DMY", NF_DATE_SYS_DDMMYY, },
66  { "DMYY", NF_DATE_SYS_DDMMYYYY, },
67  { "DMMY", NF_DATE_SYS_DMMMYY, },
68  { "DMMYY", NF_DATE_SYS_DMMMYYYY, },
69  { "DMMMY", NF_DATE_DIN_DMMMMYYYY },
70  { "DMMMYY", NF_DATE_DIN_DMMMMYYYY },
71  { "DDMMY", NF_DATE_SYS_NNDMMMYY },
72  { "DDMMMY", NF_DATE_SYS_NNDMMMMYYYY },
73  { "DDMMMYY", NF_DATE_SYS_NNDMMMMYYYY },
74  { "DDDMMMY", NF_DATE_SYS_NNNNDMMMMYYYY },
75  { "DDDMMMYY", NF_DATE_SYS_NNNNDMMMMYYYY },
76  { "MY", NF_DATE_SYS_MMYY },
77  { "MD", NF_DATE_DIN_MMDD },
78  { "YMD", NF_DATE_DIN_YYMMDD },
79  { "YYMD", NF_DATE_DIN_YYYYMMDD },
80  { nullptr, NF_NUMERIC_START }
81 };
82 
84 {
85  { "SYS", NF_TIME_HHMMSS },
86  { "SSMM24", NF_TIME_HHMM },
87  { "SSMM12", NF_TIME_HHMMAMPM },
88  { nullptr, NF_NUMERIC_START }
89 };
90 
92 {
103  { nullptr, SvxNumType(0) }
104 };
105 
107 {
123  { nullptr, SwExtUserSubType(0) }
124 };
125 
127 {
130  { nullptr, SwAuthorFormat(0) }
131 };
132 
134 {
138  { nullptr, SwPageNumSubType(0) }
139 };
140 
141 // UGLY: these are extensions of nsSwDocInfoSubType (in inc/docufld.hxx)
142 // these are necessary for importing document info fields written by
143 // older versions of OOo (< 3.0) which did not have DI_CUSTOM fields
148 
150 {
155  { "INFO1", DI_INFO1 },
156  { "INFO2", DI_INFO2 },
157  { "INFO3", DI_INFO3 },
158  { "INFO4", DI_INFO4 },
162  { nullptr, 0 }
163 };
164 
166 {
170  { nullptr, 0 }
171 };
172 
174 {
182  { nullptr, SwDocStatSubType(0) }
183 };
184 
186 {
191  { nullptr, SwFileNameFormat(0) }
192 };
193 
194 SvxNumType SwHTMLParser::GetNumType( const OUString& rStr, SvxNumType nDfltType )
195 {
197  while( pOptEnums->pName )
198  {
199  if( rStr.equalsIgnoreAsciiCaseAscii( pOptEnums->pName ) )
200  return pOptEnums->nValue;
201  pOptEnums++;
202  }
203  return nDfltType;
204 }
205 
207 {
208  bool bKnownType = false, bFixed = false,
209  bHasNumFormat = false, bHasNumValue = false;
211  OUString aValue, aNumFormat, aNumValue, aName;
212  const HTMLOption *pSubOption=nullptr, *pFormatOption=nullptr;
213 
214  const HTMLOptions& rHTMLOptions = GetOptions();
215  size_t i;
216 
217  for ( i = rHTMLOptions.size(); i; )
218  {
219  const HTMLOption& rOption = rHTMLOptions[--i];
220  switch( rOption.GetToken() )
221  {
222  case HtmlOptionId::TYPE:
223  bKnownType = rOption.GetEnum( nType, aHTMLFieldTypeTable );
224  break;
225  case HtmlOptionId::SUBTYPE:
226  pSubOption = &rOption;
227  break;
228  case HtmlOptionId::FORMAT:
229  pFormatOption = &rOption;
230  break;
231  case HtmlOptionId::NAME:
232  aName = rOption.GetString();
233  break;
234  case HtmlOptionId::VALUE:
235  aValue = rOption.GetString();
236  break;
237  case HtmlOptionId::SDNUM:
238  aNumFormat = rOption.GetString();
239  bHasNumFormat = true;
240  break;
241  case HtmlOptionId::SDVAL:
242  aNumValue = rOption.GetString();
243  bHasNumValue = true;
244  break;
245  case HtmlOptionId::SDFIXED:
246  bFixed = true;
247  break;
248  default: break;
249  }
250  }
251 
252  if( !bKnownType )
253  return;
254 
255  // Author and sender are only inserted as a variable field if the document
256  // was last changed by ourself or nobody changed it and it was created
257  // by ourself. Otherwise it will be a fixed field.
258  if( !bFixed &&
259  (SwFieldIds::ExtUser == nType ||
260  SwFieldIds::Author == nType) )
261  {
262  SvtUserOptions aOpt;
263  const OUString& rUser = aOpt.GetFullName();
264  SwDocShell *pDocShell(m_xDoc->GetDocShell());
265  OSL_ENSURE(pDocShell, "no SwDocShell");
266  if (pDocShell) {
267  uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
268  pDocShell->GetModel(), uno::UNO_QUERY_THROW);
269  uno::Reference<document::XDocumentProperties> xDocProps(
270  xDPS->getDocumentProperties());
271  OSL_ENSURE(xDocProps.is(), "Doc has no DocumentProperties");
272  const OUString& rChanged = xDocProps->getModifiedBy();
273  const OUString& rCreated = xDocProps->getAuthor();
274  if( rUser.isEmpty() ||
275  (!rChanged.isEmpty() ? rUser != rChanged : rUser != rCreated) )
276  bFixed = true;
277  }
278  }
279 
280  SwFieldIds nWhich = nType;
281  if( SwFieldIds::Date==nType || SwFieldIds::Time==nType )
282  nWhich = SwFieldIds::DateTime;
283 
284  SwFieldType* pType = m_xDoc->getIDocumentFieldsAccess().GetSysFieldType( nWhich );
285  std::unique_ptr<SwField> xNewField;
286  bool bInsOnEndTag = false;
287 
288  switch( nType )
289  {
290  case SwFieldIds::ExtUser:
291  if( pSubOption )
292  {
293  SwExtUserSubType nSub;
294  sal_uLong nFormat = 0;
295  if( bFixed )
296  {
297  nFormat |= AF_FIXED;
298  bInsOnEndTag = true;
299  }
300  if( pSubOption->GetEnum( nSub, aHTMLExtUsrFieldSubTable ) )
301  xNewField.reset(new SwExtUserField(static_cast<SwExtUserFieldType*>(pType), nSub, nFormat));
302  }
303  break;
304 
305  case SwFieldIds::Author:
306  {
307  SwAuthorFormat nFormat = AF_NAME;
308  if( pFormatOption )
309  pFormatOption->GetEnum( nFormat, aHTMLAuthorFieldFormatTable );
310  if( bFixed )
311  {
312  nFormat = static_cast<SwAuthorFormat>(static_cast<int>(nFormat) | AF_FIXED);
313  bInsOnEndTag = true;
314  }
315 
316  xNewField.reset(new SwAuthorField(static_cast<SwAuthorFieldType*>(pType), nFormat));
317  }
318  break;
319 
320  case SwFieldIds::Date:
321  case SwFieldIds::Time:
322  {
323  sal_uInt32 nNumFormat = 0;
324  DateTime aDateTime( DateTime::SYSTEM );
325  sal_Int64 nTime = aDateTime.GetTime();
326  sal_Int32 nDate = aDateTime.GetDate();
327  sal_uInt16 nSub = 0;
328  bool bValidFormat = false;
329  HTMLNumFormatTableEntry const * pFormatTable;
330 
331  if( SwFieldIds::Date==nType )
332  {
333  nSub = DATEFLD;
334  pFormatTable = aHTMLDateFieldFormatTable;
335  if( !aValue.isEmpty() )
336  nDate = aValue.toInt32();
337  }
338  else
339  {
340  nSub = TIMEFLD;
341  pFormatTable = aHTMLTimeFieldFormatTable;
342  if( !aValue.isEmpty() )
343  nTime = static_cast<sal_uLong>(aValue.toInt32());
344  }
345  if( !aValue.isEmpty() )
346  nSub |= FIXEDFLD;
347 
348  SvNumberFormatter *pFormatter = m_xDoc->GetNumberFormatter();
349  if( pFormatOption )
350  {
351  const OUString& rFormat = pFormatOption->GetString();
352  for( int k = 0; pFormatTable[k].pName; ++k )
353  {
354  if( rFormat.equalsIgnoreAsciiCaseAscii( pFormatTable[k].pName ) )
355  {
356  nNumFormat = pFormatter->GetFormatIndex(
357  pFormatTable[k].eFormat, LANGUAGE_SYSTEM);
358  bValidFormat = true;
359  break;
360  }
361  }
362  }
363  if( !bValidFormat )
364  nNumFormat = pFormatter->GetFormatIndex( pFormatTable[i].eFormat,
366 
367  xNewField.reset(new SwDateTimeField(static_cast<SwDateTimeFieldType *>(pType), nSub, nNumFormat));
368 
369  if (nSub & FIXEDFLD)
370  static_cast<SwDateTimeField *>(xNewField.get())->SetDateTime(DateTime(Date(nDate), tools::Time(nTime)));
371  }
372  break;
373 
375  if( bHasNumFormat )
376  {
377  sal_uInt16 nSub = 0;
378 
379  SvNumberFormatter *pFormatter = m_xDoc->GetNumberFormatter();
380  sal_uInt32 nNumFormat;
381  LanguageType eLang;
382  double dValue = GetTableDataOptionsValNum(
383  nNumFormat, eLang, aNumValue, aNumFormat,
384  *m_xDoc->GetNumberFormatter() );
385  SvNumFormatType nFormatType = pFormatter->GetType( nNumFormat );
386  switch( nFormatType )
387  {
388  case SvNumFormatType::DATE: nSub = DATEFLD; break;
389  case SvNumFormatType::TIME: nSub = TIMEFLD; break;
390  default: break;
391  }
392 
393  if( nSub )
394  {
395  if( bHasNumValue )
396  nSub |= FIXEDFLD;
397 
398  xNewField.reset(new SwDateTimeField(static_cast<SwDateTimeFieldType *>(pType), nSub, nNumFormat));
399  if (bHasNumValue)
400  static_cast<SwDateTimeField*>(xNewField.get())->SetValue(dValue);
401  }
402  }
403  break;
404 
406  if( pSubOption )
407  {
408  SwPageNumSubType nSub;
409  if( pSubOption->GetEnum( nSub, aHTMLPageNumFieldSubTable ) )
410  {
411  SvxNumType nFormat = SVX_NUM_PAGEDESC;
412  if( pFormatOption )
413  pFormatOption->GetEnum( nFormat, aHTMLPageNumFieldFormatTable );
414 
415  short nOff = 0;
416 
417  if( nFormat!=SVX_NUM_CHAR_SPECIAL && !aValue.isEmpty() )
418  nOff = static_cast<short>(aValue.toInt32());
419  else if( nSub == PG_NEXT )
420  nOff = 1;
421  else if( nSub == PG_PREV )
422  nOff = -1;
423 
424  if( nFormat==SVX_NUM_CHAR_SPECIAL &&
425  nSub==PG_RANDOM )
426  nFormat = SVX_NUM_PAGEDESC;
427 
428  xNewField.reset(new SwPageNumberField(static_cast<SwPageNumberFieldType*>(pType), nSub, nFormat, nOff));
429  if (nFormat == SVX_NUM_CHAR_SPECIAL)
430  static_cast<SwPageNumberField*>(xNewField.get())->SetUserString(aValue);
431  }
432  }
433  break;
434 
435  case SwFieldIds::DocInfo:
436  if( pSubOption )
437  {
438  sal_uInt16 nSub;
439  if( pSubOption->GetEnum( nSub, aHTMLDocInfoFieldSubTable ) )
440  {
441  sal_uInt16 nExtSub = 0;
442  if( DI_CREATE==static_cast<SwDocInfoSubType>(nSub) ||
443  DI_CHANGE==static_cast<SwDocInfoSubType>(nSub) )
444  {
445  nExtSub = DI_SUB_AUTHOR;
446  if( pFormatOption )
447  pFormatOption->GetEnum( nExtSub, aHTMLDocInfoFieldFormatTable );
448  nSub |= nExtSub;
449  }
450 
451  sal_uInt32 nNumFormat = 0;
452  double dValue = 0;
453  if( bHasNumFormat && (DI_SUB_DATE==nExtSub || DI_SUB_TIME==nExtSub) )
454  {
455  LanguageType eLang;
456  dValue = GetTableDataOptionsValNum(
457  nNumFormat, eLang, aNumValue, aNumFormat,
458  *m_xDoc->GetNumberFormatter() );
459  bFixed &= bHasNumValue;
460  }
461  else
462  bHasNumValue = false;
463 
464  if( nSub >= DI_INFO1 && nSub <= DI_INFO4 && aName.isEmpty() )
465  {
466  // backward compatibility for OOo 2:
467  // map to names stored in AddMetaUserDefined
468  aName = m_InfoNames[nSub - DI_INFO1];
469  nSub = DI_CUSTOM;
470  }
471 
472  if( bFixed )
473  {
474  nSub |= DI_SUB_FIXED;
475  bInsOnEndTag = true;
476  }
477 
478  xNewField.reset(new SwDocInfoField(static_cast<SwDocInfoFieldType *>(pType), nSub, aName, nNumFormat));
479  if (bHasNumValue)
480  static_cast<SwDocInfoField*>(xNewField.get())->SetValue(dValue);
481  }
482  }
483  break;
484 
485  case SwFieldIds::DocStat:
486  if( pSubOption )
487  {
488  SwDocStatSubType nSub;
489  if( pSubOption->GetEnum( nSub, aHTMLDocStatFieldSubTable ) )
490  {
491  SvxNumType nFormat = SVX_NUM_ARABIC;
492  if( pFormatOption )
493  pFormatOption->GetEnum( nFormat, aHTMLPageNumFieldFormatTable );
494  xNewField.reset(new SwDocStatField(static_cast<SwDocStatFieldType*>(pType), nSub, nFormat));
495  m_bUpdateDocStat |= (DS_PAGE != nSub);
496  }
497  }
498  break;
499 
501  {
502  SwFileNameFormat nFormat = FF_NAME;
503  if( pFormatOption )
504  pFormatOption->GetEnum( nFormat, aHTMLFileNameFieldFormatTable );
505  if( bFixed )
506  {
507  nFormat = static_cast<SwFileNameFormat>(static_cast<int>(nFormat) | FF_FIXED);
508  bInsOnEndTag = true;
509  }
510 
511  xNewField.reset(new SwFileNameField(static_cast<SwFileNameFieldType*>(pType), nFormat));
512  }
513  break;
514  default:
515  ;
516  }
517 
518  if (xNewField)
519  {
520  if (bInsOnEndTag)
521  {
522  m_xField = std::move(xNewField);
523  }
524  else
525  {
526  m_xDoc->getIDocumentContentOperations().InsertPoolItem(*m_pPam, SwFormatField(*xNewField));
527  xNewField.reset();
528  }
529  m_bInField = true;
530  }
531 }
532 
534 {
535  if (m_xField)
536  {
537  switch (m_xField->Which())
538  {
539  case SwFieldIds::DocInfo:
540  OSL_ENSURE( static_cast<SwDocInfoField*>(m_xField.get())->IsFixed(),
541  "Field DocInfo should not have been saved" );
542  static_cast<SwDocInfoField*>(m_xField.get())->SetExpansion( m_aContents );
543  break;
544 
545  case SwFieldIds::ExtUser:
546  OSL_ENSURE( static_cast<SwExtUserField*>(m_xField.get())->IsFixed(),
547  "Field ExtUser should not have been saved" );
548  static_cast<SwExtUserField*>(m_xField.get())->SetExpansion( m_aContents );
549  break;
550 
551  case SwFieldIds::Author:
552  OSL_ENSURE( static_cast<SwAuthorField*>(m_xField.get())->IsFixed(),
553  "Field Author should not have been saved" );
554  static_cast<SwAuthorField*>(m_xField.get())->SetExpansion( m_aContents );
555  break;
556 
558  OSL_ENSURE( static_cast<SwFileNameField*>(m_xField.get())->IsFixed(),
559  "Field FileName should not have been saved" );
560  static_cast<SwFileNameField*>(m_xField.get())->SetExpansion( m_aContents );
561  break;
562  default: break;
563  }
564 
565  m_xDoc->getIDocumentContentOperations().InsertPoolItem( *m_pPam, SwFormatField(*m_xField) );
566  m_xField.reset();
567  }
568 
569  m_bInField = false;
570  m_aContents.clear();
571 }
572 
574 {
575  if (m_xField)
576  {
577  // append the current text part to the text
578  m_aContents += aToken;
579  }
580 }
581 
583 {
584  bool bEmpty = m_aContents.isEmpty();
585  if( !bEmpty )
586  m_aContents += "\n";
587 
588  m_aContents += aToken;
589  if( bEmpty && pTag )
590  {
591  OUString aTmp( m_aContents );
592  m_aContents = "HTML: <" + OUString( *pTag ) + ">" + aTmp;
593  }
594 }
595 
596 void SwHTMLParser::InsertComment( const OUString& rComment, const sal_Char *pTag )
597 {
598  OUString aComment( rComment );
599  if( pTag )
600  {
601  aComment += "</";
602  aComment += OUString::createFromAscii(pTag);
603  aComment += ">";
604  }
605 
606  // MIB 24.06.97: If a PostIt should be insert after a space, we
607  // will insert before the space. Then there are less problems
608  // during formatting. (bug #40483#)
609  const sal_Int32 nPos = m_pPam->GetPoint()->nContent.GetIndex();
610  SwTextNode *pTextNd = m_pPam->GetNode().GetTextNode();
611  bool bMoveFwd = false;
612  if (nPos>0 && pTextNd && (' ' == pTextNd->GetText()[nPos-1]))
613  {
614  bMoveFwd = true;
615 
616  sal_uLong nNodeIdx = m_pPam->GetPoint()->nNode.GetIndex();
617  const sal_Int32 nIdx = m_pPam->GetPoint()->nContent.GetIndex();
618  for( auto i = m_aSetAttrTab.size(); i > 0; )
619  {
620  HTMLAttr *pAttr = m_aSetAttrTab[--i];
621  if( pAttr->GetSttParaIdx() != nNodeIdx ||
622  pAttr->GetSttCnt() != nIdx )
623  break;
624 
625  if( RES_TXTATR_FIELD == pAttr->m_pItem->Which() &&
626  SwFieldIds::Script == static_cast<const SwFormatField *>(pAttr->m_pItem.get())->GetField()->GetTyp()->Which() )
627  {
628  bMoveFwd = false;
629  break;
630  }
631  }
632 
633  if( bMoveFwd )
634  m_pPam->Move( fnMoveBackward );
635  }
636 
637  SwPostItField aPostItField(
638  static_cast<SwPostItFieldType*>(m_xDoc->getIDocumentFieldsAccess().GetSysFieldType( SwFieldIds::Postit )),
639  OUString(), aComment, OUString(), OUString(), DateTime(DateTime::SYSTEM));
640  InsertAttr( SwFormatField( aPostItField ), false );
641 
642  if( bMoveFwd )
643  m_pPam->Move( fnMoveForward );
644 }
645 
646 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Instances of SwFields and those derived from it occur 0 to n times.
Definition: fldbas.hxx:233
static HTMLNumFormatTableEntry const aHTMLTimeFieldFormatTable[]
Definition: htmlfld.cxx:83
const SwDocInfoSubType DI_SUB_TIME
Definition: docufld.hxx:79
#define OOO_STRING_SW_HTML_FS_title
Definition: htmlfld.hxx:39
SVX_NUM_CHARS_UPPER_LETTER_N
sal_uLong GetIndex() const
Definition: node.hxx:282
EnumT GetEnum(const HTMLOptionEnum< EnumT > *pOptEnums, EnumT nDflt=static_cast< EnumT >(0)) const
HtmlOptionId GetToken() const
static HTMLOptionEnum< SwFieldIds > const aHTMLFieldTypeTable[]
Definition: htmlfld.cxx:47
#define OOO_STRING_SW_HTML_FS_email
Definition: htmlfld.hxx:44
sal_Int32 GetSttCnt() const
Definition: swhtml.hxx:164
static HTMLNumFormatTableEntry const aHTMLDateFieldFormatTable[]
Definition: htmlfld.cxx:61
const SwDocInfoSubType DI_SUBTYPE_END
Definition: docufld.hxx:76
const OUString & GetText() const
Definition: ndtxt.hxx:211
#define OOO_STRING_SW_HTML_FT_filename
Definition: htmlfld.hxx:30
SwExtUserSubType
Definition: docufld.hxx:96
NF_DATE_DIN_YYYYMMDD
#define OOO_STRING_SW_HTML_FF_shortcut
Definition: htmlfld.hxx:63
NF_DATE_SYS_NNDMMMMYYYY
sal_uInt32 GetFormatIndex(NfIndexTableOffset, LanguageType eLnge=LANGUAGE_DONTKNOW)
static HTMLOptionEnum< SvxNumType > const aHTMLPageNumFieldFormatTable[]
Definition: htmlfld.cxx:91
#define OOO_STRING_SW_HTML_FS_firstname
Definition: htmlfld.hxx:32
SVX_NUM_NUMBER_NONE
sal_uIntPtr sal_uLong
SVX_NUM_CHARS_UPPER_LETTER
#define OOO_STRING_SW_HTML_FF_lroman
Definition: htmlfld.hxx:67
const OUString & GetString() const
const SwDocInfoSubType DI_INFO1
Definition: htmlfld.cxx:144
SvNumFormatType GetType(sal_uInt32 nFIndex) const
#define OOO_STRING_SW_HTML_FS_next
Definition: htmlfld.hxx:47
#define OOO_STRING_SW_HTML_FF_llettern
Definition: htmlfld.hxx:73
const SwDocInfoSubType DI_COMMENT
Definition: docufld.hxx:69
void InsertCommentText(const sal_Char *pTag)
Definition: htmlfld.cxx:582
#define OOO_STRING_SW_HTML_FS_page
Definition: htmlfld.hxx:55
#define OOO_STRING_SW_HTML_FS_name
Definition: htmlfld.hxx:33
NF_TIME_HHMM
void NewField()
Definition: htmlfld.cxx:206
For old documents the Field-Which IDs must be preserved !!!
#define OOO_STRING_SW_HTML_FT_author
Definition: htmlfld.hxx:24
const SwDocInfoSubType DI_INFO3
Definition: htmlfld.cxx:146
void InsertFieldText()
Definition: htmlfld.cxx:573
NF_DATE_SYS_DDMMYY
SvxNumType
#define OOO_STRING_SW_HTML_FS_city
Definition: htmlfld.hxx:38
EnumT const nValue
#define OOO_STRING_SW_HTML_FS_shortcut
Definition: htmlfld.hxx:34
#define OOO_STRING_SW_HTML_FS_char
Definition: htmlfld.hxx:58
#define OOO_STRING_SW_HTML_FS_custom
Definition: htmlfld.hxx:52
FUNC_TYPE const nType
char sal_Char
NF_DATE_DIN_YYMMDD
#define OOO_STRING_SW_HTML_FF_name
Definition: htmlfld.hxx:62
SwDocStatSubType
Definition: docufld.hxx:46
SVX_NUM_ARABIC
#define OOO_STRING_SW_HTML_FS_word
Definition: htmlfld.hxx:57
SVX_NUM_ROMAN_UPPER
NfIndexTableOffset
SVX_NUM_ROMAN_LOWER
sal_Int32 GetDate() const
NF_TIME_HHMMSS
void EndField()
Definition: htmlfld.cxx:533
const SwDocInfoSubType DI_CUSTOM
Definition: docufld.hxx:75
SVX_NUM_CHAR_SPECIAL
#define OOO_STRING_SW_HTML_FT_sender
Definition: htmlfld.hxx:25
#define OOO_STRING_SW_HTML_FS_state
Definition: htmlfld.hxx:45
#define OOO_STRING_SW_HTML_FF_arabic
Definition: htmlfld.hxx:68
SVX_NUM_CHARS_LOWER_LETTER
static HTMLOptionEnum< SwExtUserSubType > const aHTMLExtUsrFieldSubTable[]
Definition: htmlfld.cxx:106
NF_DATE_SYS_DMMMYYYY
SwFileNameFormat
Definition: fldbas.hxx:145
#define OOO_STRING_SW_HTML_FF_path
Definition: htmlfld.hxx:78
const sal_Char * pName
Definition: htmlfld.cxx:43
#define LANGUAGE_SYSTEM
const SwDocInfoSubType DI_KEYS
Definition: docufld.hxx:68
int i
const SwDocInfoSubType DI_CREATE
Definition: docufld.hxx:70
SwFieldIds
Definition: fldbas.hxx:38
#define OOO_STRING_SW_HTML_FS_cphone
Definition: htmlfld.hxx:42
#define OOO_STRING_SW_HTML_FF_page
Definition: htmlfld.hxx:71
#define OOO_STRING_SW_HTML_FT_datetime
Definition: htmlfld.hxx:26
#define OOO_STRING_SW_HTML_FF_uroman
Definition: htmlfld.hxx:66
SvNumFormatType
#define OOO_STRING_SW_HTML_FS_theme
Definition: htmlfld.hxx:49
#define OOO_STRING_SW_HTML_FT_docstat
Definition: htmlfld.hxx:29
const SwDocInfoSubType DI_SUB_DATE
Definition: docufld.hxx:80
NF_DATE_SYS_DDMMYYYY
#define OOO_STRING_SW_HTML_FS_random
Definition: htmlfld.hxx:46
sal_uInt16 SwDocInfoSubType
Definition: docufld.hxx:58
#define OOO_STRING_SW_HTML_FS_country
Definition: htmlfld.hxx:36
SVX_NUM_CHARS_LOWER_LETTER_N
#define OOO_STRING_SW_HTML_FS_keys
Definition: htmlfld.hxx:50
#define OOO_STRING_SW_HTML_FF_char
Definition: htmlfld.hxx:70
const sal_Char * pName
#define OOO_STRING_SW_HTML_FS_company
Definition: htmlfld.hxx:31
#define OOO_STRING_SW_HTML_FS_fax
Definition: htmlfld.hxx:43
#define OOO_STRING_SW_HTML_FS_comment
Definition: htmlfld.hxx:51
NF_DATE_DIN_DMMMMYYYY
#define OOO_STRING_SW_HTML_FF_ulettern
Definition: htmlfld.hxx:72
const SwDocInfoSubType DI_SUB_AUTHOR
Definition: docufld.hxx:78
#define OOO_STRING_SW_HTML_FT_docinfo
Definition: htmlfld.hxx:28
NF_TIME_HHMMAMPM
#define OOO_STRING_SW_HTML_FF_name_noext
Definition: htmlfld.hxx:79
#define OOO_STRING_SW_HTML_FF_time
Definition: htmlfld.hxx:75
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
SVX_NUM_PAGEDESC
#define RES_TXTATR_FIELD
Definition: hintids.hxx:150
#define OOO_STRING_SW_HTML_FF_uletter
Definition: htmlfld.hxx:64
static HTMLOptionEnum< SwPageNumSubType > const aHTMLPageNumFieldSubTable[]
Definition: htmlfld.cxx:133
NF_DATE_SYSTEM_LONG
SwPageNumSubType
Definition: docufld.hxx:85
void InsertComment(const OUString &rName, const sal_Char *pTag=nullptr)
Definition: htmlfld.cxx:596
static SvxNumType GetNumType(const OUString &rStr, SvxNumType eDfltType)
Definition: htmlfld.cxx:194
NF_DATE_SYS_NNNNDMMMMYYYY
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
Definition: paminit.cxx:59
#define OOO_STRING_SW_HTML_FF_author
Definition: htmlfld.hxx:74
::std::vector< HTMLOption > HTMLOptions
static HTMLOptionEnum< sal_uInt16 > const aHTMLDocInfoFieldFormatTable[]
Definition: htmlfld.cxx:165
#define OOO_STRING_SW_HTML_FS_ole
Definition: htmlfld.hxx:61
NF_DATE_SYS_DMMMYY
NF_DATE_SYSTEM_SHORT
#define OOO_STRING_SW_HTML_FF_date
Definition: htmlfld.hxx:76
NF_DATE_SYS_MMYY
static HTMLOptionEnum< sal_uInt16 > const aHTMLDocInfoFieldSubTable[]
Definition: htmlfld.cxx:149
sal_Int64 GetTime() const
NfIndexTableOffset const eFormat
Definition: htmlfld.cxx:44
#define OOO_STRING_SW_HTML_FF_pathname
Definition: htmlfld.hxx:77
static HTMLOptionEnum< SwAuthorFormat > const aHTMLAuthorFieldFormatTable[]
Definition: htmlfld.cxx:126
NF_DATE_DIN_MMDD
#define OOO_STRING_SW_HTML_FS_position
Definition: htmlfld.hxx:40
static HTMLOptionEnum< SwDocStatSubType > const aHTMLDocStatFieldSubTable[]
Definition: htmlfld.cxx:173
#define OOO_STRING_SW_HTML_FF_lletter
Definition: htmlfld.hxx:65
NF_DATE_SYS_NNDMMMYY
SwMoveFnCollection const & fnMoveBackward
Definition: paminit.cxx:58
#define OOO_STRING_SW_HTML_FS_zip
Definition: htmlfld.hxx:37
#define OOO_STRING_SW_HTML_FS_prev
Definition: htmlfld.hxx:48
OString const aName
#define OOO_STRING_SW_HTML_FS_tbl
Definition: htmlfld.hxx:59
#define OOO_STRING_SW_HTML_FT_page
Definition: htmlfld.hxx:27
OUString GetFullName() const
const SwDocInfoSubType DI_INFO4
Definition: htmlfld.cxx:147
const SwDocInfoSubType DI_SUB_FIXED
Definition: docufld.hxx:81
const SwDocInfoSubType DI_CHANGE
Definition: docufld.hxx:71
const SwDocInfoSubType DI_THEMA
Definition: docufld.hxx:67
#define OOO_STRING_SW_HTML_FS_change
Definition: htmlfld.hxx:54
const SwDocInfoSubType DI_TITLE
Definition: docufld.hxx:66
sal_Int32 nPos
NF_NUMERIC_START
#define OOO_STRING_SW_HTML_FS_pphone
Definition: htmlfld.hxx:41
#define OOO_STRING_SW_HTML_FS_para
Definition: htmlfld.hxx:56
std::unique_ptr< SfxPoolItem > m_pItem
Definition: swhtml.hxx:137
sal_uInt32 GetSttParaIdx() const
Definition: swhtml.hxx:158
sal_uInt16 Which() const
static HTMLOptionEnum< SwFileNameFormat > const aHTMLFileNameFieldFormatTable[]
Definition: htmlfld.cxx:185
SwAuthorFormat
Definition: docufld.hxx:37
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:843
#define OOO_STRING_SW_HTML_FS_create
Definition: htmlfld.hxx:53
#define OOO_STRING_SW_HTML_FS_street
Definition: htmlfld.hxx:35
#define OOO_STRING_SW_HTML_FF_none
Definition: htmlfld.hxx:69
const SwDocInfoSubType DI_INFO2
Definition: htmlfld.cxx:145
#define OOO_STRING_SW_HTML_FS_grf
Definition: htmlfld.hxx:60