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