LibreOffice Module sw (master)  1
docufld.hxx
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 #ifndef INCLUDED_SW_INC_DOCUFLD_HXX
20 #define INCLUDED_SW_INC_DOCUFLD_HXX
21 
22 #include <sal/config.h>
23 
24 #include <string_view>
25 
26 #include <editeng/outlobj.hxx>
27 #include <tools/solar.h>
28 #include <tools/date.hxx>
29 #include <tools/datetime.hxx>
30 #include <rtl/ref.hxx>
31 #include <svl/macitem.hxx>
32 
33 #include "fldbas.hxx"
34 
35 class SetGetExpFields;
36 class SwTextField;
37 class SwFrame;
38 class OutlinerParaObject;
39 class SwTextAPIObject;
40 class SwCharFormat;
41 
43 {
47  AF_FIXED = 0x8000
48 };
49 
50 // Subtype of document statistics.
52 {
61 };
62 
63 typedef sal_uInt16 SwDocInfoSubType;
65 {
82 
84  const SwDocInfoSubType DI_SUB_TIME = 0x0200;
85  const SwDocInfoSubType DI_SUB_DATE = 0x0300;
87  const SwDocInfoSubType DI_SUB_MASK = 0x0f00;
88 }
89 
91 {
95 };
96 
97 // NOTE: Possibly the first 15 values in the below enum are required
98 // to exactly match the published constants in css::text::UserDataPart
99 // (see offapi/com/sun/star/text/UserDataPart.idl).
100 
102 {
120 };
121 
123 {
129 };
130 
131 class SAL_DLLPUBLIC_RTTI SwPageNumberFieldType final : public SwFieldType
132 {
135 
136 public:
138 
139  OUString Expand( SvxNumType nFormat, short nOff, sal_uInt16 const nPageNumber,
140  sal_uInt16 const nMaxPage, const OUString&, LanguageType = LANGUAGE_NONE ) const;
141  void ChangeExpansion( SwDoc* pDoc,
142  bool bVirtPageNum, const SvxNumType* pNumFormat );
143  virtual std::unique_ptr<SwFieldType> Copy() const override;
144 };
145 
146 // Page numbering.
148 {
149  OUString m_sUserStr;
150  sal_uInt16 m_nSubType;
151  short m_nOffset;
152  // fdo#58074 store page number in SwField, not SwFieldType
153  sal_uInt16 m_nPageNumber;
154  sal_uInt16 m_nMaxPage;
155 
156 public:
157  SwPageNumberField(SwPageNumberFieldType*, sal_uInt16 nSub,
158  sal_uInt32 nFormat, short nOff = 0,
159  sal_uInt16 const nPageNumber = 0,
160  sal_uInt16 const nMaxPage = 0);
161 
162  void ChangeExpansion(sal_uInt16 const nPageNumber,
163  sal_uInt16 const nMaxPage);
164 
165  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
166  virtual std::unique_ptr<SwField> Copy() const override;
167 
168  virtual OUString GetPar2() const override;
169  virtual void SetPar2(const OUString& rStr) override;
170 
171  virtual sal_uInt16 GetSubType() const override;
172  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
173  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
174 
175  const OUString& GetUserString() const { return m_sUserStr; }
176  void SetUserString( const OUString& rS ) { m_sUserStr = rS; }
177 };
178 
179 class SwAuthorFieldType final : public SwFieldType
180 {
181 public:
183 
184  static OUString Expand(sal_uLong);
185  virtual std::unique_ptr<SwFieldType> Copy() const override;
186 };
187 
188 class SwAuthorField final : public SwField
189 {
190  OUString m_aContent;
191 
192 public:
193  SwAuthorField(SwAuthorFieldType*, sal_uInt32 nFormat);
194 
195  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
196  virtual std::unique_ptr<SwField> Copy() const override;
197 
198  void SetExpansion(const OUString& rStr) { m_aContent = rStr; }
199 
200  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
201  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
202 };
203 
204 class SAL_DLLPUBLIC_RTTI SwFileNameFieldType final : public SwFieldType
205 {
207 public:
209 
210  OUString Expand(sal_uLong) const;
211  virtual std::unique_ptr<SwFieldType> Copy() const override;
212 };
213 
215 {
216  OUString m_aContent;
217 
218 public:
219  SwFileNameField(SwFileNameFieldType*, sal_uInt32 nFormat);
220 
221  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
222  virtual std::unique_ptr<SwField> Copy() const override;
223 
224  void SetExpansion(const OUString& rStr) { m_aContent = rStr; }
225 
226  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
227  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
228 };
229 
230 class SAL_DLLPUBLIC_RTTI SwTemplNameFieldType final : public SwFieldType
231 {
233 public:
235 
236  OUString Expand(sal_uLong) const;
237  virtual std::unique_ptr<SwFieldType> Copy() const override;
238 };
239 
241 {
242 public:
243  SwTemplNameField(SwTemplNameFieldType*, sal_uInt32 nFormat);
244 
245  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
246  virtual std::unique_ptr<SwField> Copy() const override;
247  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
248  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
249 };
250 
251 // Document statistics
252 class SAL_DLLPUBLIC_RTTI SwDocStatFieldType final : public SwFieldType
253 {
256 
257 public:
259  OUString Expand(sal_uInt16 nSubType, SvxNumType nFormat) const;
260  virtual std::unique_ptr<SwFieldType> Copy() const override;
261 
262  void SetNumFormat( SvxNumType eFormat ) { m_nNumberingType = eFormat; }
263 };
264 
265 class SW_DLLPUBLIC SwDocStatField final : public SwField
266 {
267  sal_uInt16 m_nSubType;
268 
269 public:
271  sal_uInt16 nSubType, sal_uInt32 nFormat);
272 
273  void ChangeExpansion( const SwFrame* pFrame );
274 
275  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
276  virtual std::unique_ptr<SwField> Copy() const override;
277 
278  virtual sal_uInt16 GetSubType() const override;
279  virtual void SetSubType(sal_uInt16 nSub) override;
280  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
281  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
282 };
283 
284 class SAL_DLLPUBLIC_RTTI SwHiddenTextFieldType final : public SwFieldType
285 {
286  bool m_bHidden;
287 public:
288  SwHiddenTextFieldType(bool bSetHidden = true);
289 
290  virtual std::unique_ptr<SwFieldType> Copy() const override;
291  virtual void UpdateFields() override {};
292 
293  void SetHiddenFlag( bool bSetHidden );
294  bool GetHiddenFlag() const { return m_bHidden; }
295 };
296 
298 {
299  OUString m_aTRUEText;
300  OUString m_aFALSEText;
301  OUString m_aContent;
302 
303  OUString m_aCond;
305 
306  bool m_bCanToggle : 1;
307  bool m_bIsHidden : 1;
308  bool m_bValid : 1;
309 
310  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
311  virtual std::unique_ptr<SwField> Copy() const override;
312 
313 public:
315  bool bConditional,
316  const OUString& rCond,
317  const OUString& rText,
318  bool bHidden,
320 
322  const OUString& rCond,
323  const OUString& rTrue,
324  const OUString& rFalse,
326 
327  virtual OUString GetFieldName() const override;
328 
329  void Evaluate(SwDoc& rDoc);
330 
331  void SetValue(bool bHidden) { m_bIsHidden = bHidden; }
332  static OUString GetColumnName(const OUString& rName);
333  static OUString GetDBName(std::u16string_view rName, SwDoc& rDoc);
334 
336  virtual void SetPar1(const OUString& rStr) override;
337  virtual OUString GetPar1() const override;
338 
340  virtual void SetPar2(const OUString& rStr) override;
341  virtual OUString GetPar2() const override;
342 
343  virtual sal_uInt16 GetSubType() const override;
344 
345  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
346  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
347 
348  static void ParseIfFieldDefinition(const OUString& aFieldDefinition,
349  OUString& rCondition,
350  OUString& rTrue,
351  OUString& rFalse);
352 };
353 
354 // Field that expands to an empty line (without height).
355 class SwHiddenParaFieldType final : public SwFieldType
356 {
357 public:
359 
360  virtual std::unique_ptr<SwFieldType> Copy() const override;
361  virtual void UpdateFields() override {};
362 };
363 
364 class SwHiddenParaField final : public SwField
365 {
366  OUString m_aCond;
368 public:
370  SwHiddenParaField(SwHiddenParaFieldType*, const OUString& rCond);
371 
372  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
373  virtual std::unique_ptr<SwField> Copy() const override;
374 
375  void SetHidden(bool bHidden) { m_bIsHidden = bHidden; }
376  bool IsHidden() const { return m_bIsHidden; }
377 
379  virtual OUString GetPar1() const override;
380  virtual void SetPar1(const OUString& rStr) override;
381  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
382  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
383 };
384 
385 class SAL_DLLPUBLIC_RTTI SwMacroFieldType final : public SwFieldType
386 {
388 
389 public:
391 
392  virtual std::unique_ptr<SwFieldType> Copy() const override;
393 };
394 
395 class SW_DLLPUBLIC SwMacroField final : public SwField
396 {
397  OUString m_aMacro;
398  OUString m_aText;
400 
401  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
402  virtual std::unique_ptr<SwField> Copy() const override;
403 
404 public:
406  SwMacroField( SwMacroFieldType*, const OUString& rLibAndName,
407  const OUString& rText);
408 
409  const OUString& GetMacro() const { return m_aMacro; }
410  OUString GetLibName() const;
411  OUString GetMacroName() const;
412  SvxMacro GetSvxMacro() const;
413 
414  virtual OUString GetFieldName() const override;
415 
417  virtual OUString GetPar1() const override;
418  virtual void SetPar1(const OUString& rStr) override;
419 
421  virtual OUString GetPar2() const override;
422  virtual void SetPar2(const OUString& rStr) override;
423  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
424  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
425 
426  static void CreateMacroString( OUString& rMacro,
427  std::u16string_view rMacroName,
428  const OUString& rLibraryName );
429 
430  static bool isScriptURL( const OUString& str );
431 };
432 
433 class SAL_DLLPUBLIC_RTTI SwPostItFieldType final : public SwFieldType
434 {
435 private:
437 public:
438  SwPostItFieldType(SwDoc& rDoc);
439 
440  virtual std::unique_ptr<SwFieldType> Copy() const override;
441 
442  SwDoc& GetDoc() const
443  {
444  return mrDoc;
445  };
446 };
447 
448 class SW_DLLPUBLIC SwPostItField final : public SwField
449 {
450  OUString m_sText;
451  OUString m_sAuthor;
452  OUString m_sInitials;
453  OUString m_sName;
458  sal_uInt32 m_nPostItId;
459 
460 public:
461  static sal_uInt32 s_nLastPostItId;
462 
464  const OUString& rAuthor,
465  const OUString& rText,
466  const OUString& rInitials,
467  const OUString& rName,
468  const DateTime& rDate,
469  const bool bResolved = false,
470  const sal_uInt32 nPostItId = 0);
471 
472  SwPostItField(const SwPostItField&) = delete;
473  SwPostItField* operator=(const SwPostItField&) = delete;
474 
475  virtual ~SwPostItField() override;
476 
477  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
478  virtual std::unique_ptr<SwField> Copy() const override;
479 
480  const DateTime& GetDateTime() const { return m_aDateTime; }
481  Date GetDate() const { return Date(m_aDateTime.GetDate()); }
482  tools::Time GetTime() const { return tools::Time(m_aDateTime.GetTime()); }
483  sal_uInt32 GetPostItId() const { return m_nPostItId; }
484 
486  virtual OUString GetPar1() const override;
487  virtual void SetPar1(const OUString& rStr) override;
488 
490  virtual OUString GetPar2() const override;
491  virtual void SetPar2(const OUString& rStr) override;
492  const OUString& GetText() const { return m_sText; }
493  const OUString& GetInitials() const { return m_sInitials;}
494  void SetName(const OUString& rStr);
495  const OUString& GetName() const { return m_sName;}
496 
497  const OutlinerParaObject* GetTextObject() const { return mpText ? &*mpText : nullptr;}
498  void SetTextObject( std::optional<OutlinerParaObject> pText );
499 
500  void SetResolved(bool bNewState);
501  void ToggleResolved();
502  bool GetResolved() const;
503 
504  sal_Int32 GetNumberOfParagraphs() const;
505 
506  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
507  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
508  virtual OUString GetDescription() const override;
509  virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
510 };
511 
512 class SAL_DLLPUBLIC_RTTI SwDocInfoFieldType final : public SwValueFieldType
513 {
514 public:
516 
517  OUString Expand(sal_uInt16 nSubType, sal_uInt32 nFormat, LanguageType nLang, const OUString& rName) const;
518  virtual std::unique_ptr<SwFieldType> Copy() const override;
519 };
520 
522 {
523  sal_uInt16 m_nSubType;
524  OUString m_aContent;
525  OUString m_aName;
526 
527  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
528  virtual std::unique_ptr<SwField> Copy() const override;
529 
530 public:
531  SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const OUString& rName, sal_uInt32 nFormat=0);
532  SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const OUString& rName, const OUString& rValue, sal_uInt32 nFormat=0);
533 
534  virtual void SetSubType(sal_uInt16) override;
535  virtual sal_uInt16 GetSubType() const override;
536  virtual void SetLanguage(LanguageType nLng) override;
537  virtual OUString GetFieldName() const override;
538  const OUString& GetName() const { return m_aName; }
539  void SetName( const OUString& rName ) { m_aName = rName; }
540  void SetExpansion(const OUString& rStr) { m_aContent = rStr; }
541  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
542  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
543 };
544 
545 // Extended User settings.
546 class SwExtUserFieldType final : public SwFieldType
547 {
548 public:
550 
551  static OUString Expand(sal_uInt16 nSubType);
552  virtual std::unique_ptr<SwFieldType> Copy() const override;
553 };
554 
555 class SwExtUserField final : public SwField
556 {
557  OUString m_aContent;
558  sal_uInt16 m_nType;
559 
560 public:
561  SwExtUserField(SwExtUserFieldType*, sal_uInt16 nSub, sal_uInt32 nFormat);
562 
563  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
564  virtual std::unique_ptr<SwField> Copy() const override;
565 
566  virtual sal_uInt16 GetSubType() const override;
567  virtual void SetSubType(sal_uInt16 nSub) override;
568 
569  void SetExpansion(const OUString& rStr) { m_aContent = rStr; }
570 
571  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
572  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
573 };
574 
575 // Relative page numbers - field.
576 class SwRefPageSetFieldType final : public SwFieldType
577 {
578 public:
580 
581  virtual std::unique_ptr<SwFieldType> Copy() const override;
582  virtual void UpdateFields() override {};
583 
584 private:
586  virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
587 };
588 
589 // Relative page numbering.
590 class SAL_DLLPUBLIC_RTTI SwRefPageSetField final : public SwField
591 {
592  short m_nOffset;
593  bool m_bOn;
594 
595 public:
596  SwRefPageSetField( SwRefPageSetFieldType*, short nOff, bool bOn );
597 
598  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
599  virtual std::unique_ptr<SwField> Copy() const override;
600 
601  virtual OUString GetPar2() const override;
602  virtual void SetPar2(const OUString& rStr) override;
603 
604  bool IsOn() const { return m_bOn; }
605 
606  short GetOffset() const { return m_nOffset; }
607  void SetOffset( short nOff ) { m_nOffset = nOff; }
608  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
609  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
610 };
611 
612 // Relative page numbers - query field.
613 class SwRefPageGetFieldType final : public SwFieldType
614 {
616  sal_Int16 m_nNumberingType;
617 
618  void UpdateField(SwTextField const * pTextField,
619  SetGetExpFields const & rSetList, SwRootFrame const* pLayout);
620 
622  virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
623 public:
624  SwRefPageGetFieldType( SwDoc& rDoc );
625  virtual std::unique_ptr<SwFieldType> Copy() const override;
626  bool MakeSetList(SetGetExpFields& rTmpLst, SwRootFrame const* pLayout);
627  SwDoc& GetDoc() const { return m_rDoc; }
628 };
629 
630 // Query relative page numbering.
631 class SwRefPageGetField final : public SwField
632 {
633  OUString m_sText;
634  OUString m_sTextRLHidden;
635 
636 public:
637  SwRefPageGetField( SwRefPageGetFieldType*, sal_uInt32 nFormat );
638 
639  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
640  virtual std::unique_ptr<SwField> Copy() const override;
641 
642  void SetText(const OUString& rText, SwRootFrame const* pLayout);
643 
644  void ChangeExpansion(const SwFrame& rFrame, const SwTextField* pField);
645  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
646  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
647 };
648 
649 // Field to jump to and edit.
650 class SwJumpEditFieldType final : public SwFieldType
651 {
654 
655 public:
656  SwJumpEditFieldType( SwDoc& rDoc );
657  virtual std::unique_ptr<SwFieldType> Copy() const override;
658  virtual void UpdateFields() override {};
659 
661 };
662 
663 class SwJumpEditField final : public SwField
664 {
665  OUString m_sText;
666  OUString m_sHelp;
667 public:
668  SwJumpEditField( SwJumpEditFieldType*, sal_uInt32 nFormat,
669  const OUString& sText, const OUString& sHelp );
670 
671  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
672  virtual std::unique_ptr<SwField> Copy() const override;
673 
675  virtual OUString GetPar1() const override;
676  virtual void SetPar1(const OUString& rStr) override;
677 
679  virtual OUString GetPar2() const override;
680  virtual void SetPar2(const OUString& rStr) override;
681 
683  { return static_cast<SwJumpEditFieldType*>(GetTyp())->GetCharFormat(); }
684  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
685  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
686 };
687 
688 class SwScriptFieldType final : public SwFieldType
689 {
691 public:
692  SwScriptFieldType( SwDoc& rDoc );
693 
694  virtual std::unique_ptr<SwFieldType> Copy() const override;
695 };
696 
697 class SW_DLLPUBLIC SwScriptField final : public SwField
698 {
699  OUString m_sType;
700  OUString m_sCode;
703  bool m_bCodeURL;
704 
705 public:
706  SwScriptField( SwScriptFieldType*, const OUString& rType,
707  const OUString& rCode, bool bURL );
708 
709  virtual OUString GetDescription() const override;
710 
711  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
712  virtual std::unique_ptr<SwField> Copy() const override;
713 
715  virtual OUString GetPar1() const override;
716  virtual void SetPar1(const OUString& rStr) override;
718  virtual OUString GetPar2() const override;
719  virtual void SetPar2(const OUString& rStr) override;
720 
721  bool IsCodeURL() const { return m_bCodeURL; }
722  void SetCodeURL( bool bURL ) { m_bCodeURL = bURL; }
723  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
724  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
725 };
726 
727 // Combined Character Fieldtype
728 class SAL_DLLPUBLIC_RTTI SwCombinedCharFieldType final : public SwFieldType
729 {
730 public:
732 
733  virtual std::unique_ptr<SwFieldType> Copy() const override;
734 };
735 
736 // ScriptField
737 #define MAX_COMBINED_CHARACTERS 6
738 
740 {
741  OUString m_sCharacters;
742 
743 public:
744  SwCombinedCharField( SwCombinedCharFieldType*, const OUString& rChars );
745 
746  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
747  virtual std::unique_ptr<SwField> Copy() const override;
748 
750  virtual OUString GetPar1() const override;
751  virtual void SetPar1(const OUString& rStr) override;
752 
753  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
754  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
755 };
756 
757 #endif // INCLUDED_SW_INC_DOCUFLD_HXX
758 
759 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: scrptfld.cxx:32
Date GetDate() const
Definition: docufld.hxx:481
virtual void SetPar1(const OUString &rStr) override
set place holder text
Definition: docufld.cxx:2494
SwDoc & GetDoc() const
Definition: docufld.hxx:442
Instances of SwFields and those derived from it occur 0 to n times.
Definition: fldbas.hxx:241
static sal_uInt32 s_nLastPostItId
Definition: docufld.hxx:461
const SwDocInfoSubType DI_SUB_TIME
Definition: docufld.hxx:84
void SetValue(bool bHidden)
Definition: docufld.hxx:331
const OUString & GetUserString() const
Definition: docufld.hxx:175
Base class of the Writer layout elements.
Definition: frame.hxx:314
SwDoc & GetDoc() const
Definition: docufld.hxx:627
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
Definition: fldbas.cxx:853
OUString m_aMacro
Definition: docufld.hxx:397
sal_uInt16 m_nPageNumber
Definition: docufld.hxx:153
SwField & operator=(SwField const &)=default
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:2458
const SwDocInfoSubType DI_SUBTYPE_END
Definition: docufld.hxx:81
DateTime m_aDateTime
Definition: docufld.hxx:454
SwExtUserSubType
Definition: docufld.hxx:101
virtual sal_uInt16 GetSubType() const override
Definition: docufld.cxx:2018
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
noop, there is nothing to update!
Definition: docufld.cxx:2091
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:321
bool GetHiddenFlag() const
Definition: docufld.hxx:294
virtual std::unique_ptr< SwFieldType > Copy() const =0
bool IsCodeURL() const
Definition: docufld.hxx:721
void ChangeExpansion(const SwFrame &rFrame, const SwTextField *pField)
Definition: docufld.cxx:2352
OUString m_sUserStr
Definition: docufld.hxx:149
sal_uIntPtr sal_uLong
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:2010
Base class of all fields.
Definition: fldbas.hxx:291
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:1664
Definition: doc.hxx:187
tools::Time GetTime() const
Definition: docufld.hxx:482
OUString m_aTRUEText
Text if condition true.
Definition: docufld.hxx:299
const SwDocInfoSubType DI_COMMENT
Definition: docufld.hxx:74
SwDoc & m_rDoc
Definition: docufld.hxx:387
sal_Int16 m_nNumberingType
Definition: docufld.hxx:616
OUString m_aCond
Condition.
Definition: docufld.hxx:303
SwRefPageGetField(SwRefPageGetFieldType *, sal_uInt32 nFormat)
Definition: docufld.cxx:2319
const OUString & GetName() const
Definition: docufld.hxx:538
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:2481
SwJumpEditField(SwJumpEditFieldType *, sal_uInt32 nFormat, const OUString &sText, const OUString &sHelp)
Definition: docufld.cxx:2470
OUString m_aContent
Definition: docufld.hxx:190
The root element of a Writer document layout.
Definition: rootfrm.hxx:81
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:2028
const SwDocInfoSubType DI_EDIT
Definition: docufld.hxx:79
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:341
SvxNumType
static LanguageType nLang
Definition: srtdlg.cxx:51
virtual OUString GetPar1() const
Definition: fldbas.cxx:321
virtual void UpdateFields() override
Definition: docufld.hxx:361
rtl::Reference< SwTextAPIObject > m_xTextObject
Definition: docufld.hxx:457
OUString m_sCharacters
combine these characters
Definition: docufld.hxx:741
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const =0
OUString m_sCode
Code as text.
Definition: docufld.hxx:700
virtual void SetPar2(const OUString &rStr)
Definition: fldbas.cxx:339
OUString m_aContent
Definition: docufld.hxx:557
bool m_bResolved
Definition: docufld.hxx:455
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhichId)
Definition: fldbas.cxx:369
const OUString & GetText() const
Definition: docufld.hxx:492
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:2162
SwDocStatSubType
Definition: docufld.hxx:51
const SwDocInfoSubType DI_SUBJECT
Definition: docufld.hxx:72
virtual void SetPar2(const OUString &rStr) override
set hint text
Definition: docufld.cxx:2506
virtual void SetLanguage(LanguageType nLng) override
set language of the format
Definition: fldbas.cxx:703
void SetExpansion(const OUString &rStr)
Definition: docufld.hxx:198
virtual OUString GetPar1() const override
Placeholder-Text.
Definition: docufld.cxx:2488
OUString m_sText
Definition: docufld.hxx:633
sal_Int32 GetDate() const
SwHiddenParaField(SwHiddenParaFieldType *, const OUString &rCond)
Direct input, delete old value.
Definition: docufld.cxx:1646
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:2085
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:1681
void SetExpansion(const OUString &rStr)
Definition: docufld.hxx:540
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:2051
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhichId) const
Definition: fldbas.cxx:351
bool IsHidden() const
Definition: docufld.hxx:376
virtual OUString GetPar1() const override
Query, set condition.
Definition: docufld.cxx:1704
OUString m_sType
Type of Code (Java/VBScript/...)
Definition: docufld.hxx:699
OUString m_sText
Definition: docufld.hxx:450
const SwDocInfoSubType DI_CUSTOM
Definition: docufld.hxx:80
virtual OUString GetDescription() const
Definition: fldbas.cxx:831
OUString m_aName
Definition: docufld.hxx:525
sal_uInt32 GetPostItId() const
Definition: docufld.hxx:483
const SwDocInfoSubType DI_PRINT
Definition: docufld.hxx:77
virtual void SetPar1(const OUString &rStr)
Definition: fldbas.cxx:336
const DateTime & GetDateTime() const
Definition: docufld.hxx:480
OUString m_aCond
Definition: docufld.hxx:366
SwAuthorField(SwAuthorFieldType *, sal_uInt32 nFormat)
Definition: docufld.cxx:326
void SetExpansion(const OUString &rStr)
Definition: docufld.hxx:224
virtual std::unique_ptr< SwField > Copy() const =0
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:2413
OUString m_sAuthor
Definition: docufld.hxx:451
SwRefPageGetFieldType(SwDoc &rDoc)
Definition: docufld.cxx:2157
SwCharFormat * GetCharFormat()
Definition: docufld.cxx:2463
const SwDocInfoSubType DI_KEYS
Definition: docufld.hxx:73
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:2002
sal_uInt16 m_nSubType
Definition: docufld.hxx:267
sal_uInt16 m_nSubType
Definition: docufld.hxx:523
OUString m_aFALSEText
If condition false.
Definition: docufld.hxx:300
const SwDocInfoSubType DI_CREATE
Definition: docufld.hxx:75
SwFieldTypesEnum
List of FieldTypes at UI.
Definition: fldbas.hxx:94
virtual OUString GetPar2() const override
Hint-Text.
Definition: docufld.cxx:2500
sw::WriterMultiListener m_aDep
Definition: docufld.hxx:653
const SwDocInfoSubType DI_SUB_MASK
Definition: docufld.hxx:87
OUString m_aContent
Definition: docufld.hxx:216
bool IsOn() const
Definition: docufld.hxx:604
sal_uInt16 m_nMaxPage
Definition: docufld.hxx:154
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:2338
const SwDocInfoSubType DI_SUB_DATE
Definition: docufld.hxx:85
sal_uInt16 m_nSubType
Definition: docufld.hxx:150
virtual OUString GetPar2() const
Definition: fldbas.cxx:326
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
SvxNumType m_nNumberingType
Definition: docufld.hxx:255
Represents the style of a text portion.
Definition: charfmt.hxx:26
sal_uInt16 SwDocInfoSubType
Definition: docufld.hxx:63
virtual sal_uInt16 GetSubType() const
Definition: fldbas.cxx:342
const OUString & GetName() const
Definition: docufld.hxx:495
short GetOffset() const
Definition: docufld.hxx:606
SwFieldType * GetTyp() const
Definition: fldbas.hxx:398
void SetText(const OUString &rText, SwRootFrame const *pLayout)
Definition: docufld.cxx:2325
const SwDocInfoSubType DI_SUB_AUTHOR
Definition: docufld.hxx:83
virtual void UpdateFields() override
Definition: docufld.hxx:291
Fields containing values that have to be formatted via number formatter.
Definition: fldbas.hxx:414
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:349
OUString m_sHelp
Definition: docufld.hxx:666
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:1657
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:1956
virtual void UpdateFields() override
Definition: docufld.hxx:658
const OutlinerParaObject * GetTextObject() const
Definition: docufld.hxx:497
std::optional< OutlinerParaObject > mpText
Definition: docufld.hxx:456
OUString m_aContent
Definition: docufld.hxx:524
OUString m_sInitials
Initials of the author.
Definition: docufld.hxx:452
const SwDocInfoSubType DI_SUBTYPE_BEGIN
NB: these must denote consecutive integers! NB2: these are extended by 4 DI_INFO values for backward ...
Definition: docufld.hxx:70
SwCharFormat * GetCharFormat() const
Definition: docufld.hxx:682
SwPageNumSubType
Definition: docufld.hxx:90
const SwDocInfoSubType DI_DOCNO
Definition: docufld.hxx:78
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:1639
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:2343
static OUString Expand(sal_uInt16 nSubType)
Definition: docufld.cxx:1961
sal_uInt32 m_nPostItId
Definition: docufld.hxx:458
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
overwritten to update all RefPageGet fields
Definition: docufld.cxx:2169
virtual void UpdateFields() override
Definition: docufld.hxx:582
static OUString Expand(sal_uLong)
Definition: docufld.cxx:312
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:2511
OUString m_aText
Definition: docufld.hxx:398
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:2542
SwJumpEditFieldType(SwDoc &rDoc)
Definition: docufld.cxx:2453
sal_Int64 GetTime() const
virtual OUString GetFieldName() const
get name or content
Definition: fldbas.cxx:305
bool m_bCodeURL
Code contains URL of a script.
Definition: docufld.hxx:703
void SetExpansion(const OUString &rStr)
Definition: docufld.hxx:569
sal_uInt16 m_nType
Definition: docufld.hxx:558
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:2429
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:332
OUString m_sTextRLHidden
hidden redlines
Definition: docufld.hxx:634
void SetOffset(short nOff)
Definition: docufld.hxx:607
void SetName(const OUString &rName)
Definition: docufld.hxx:539
OUString m_sName
Name of the comment.
Definition: docufld.hxx:453
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:371
bool m_bIsScriptURL
Definition: docufld.hxx:399
void SetNumFormat(SvxNumType eFormat)
Definition: docufld.hxx:262
struct _xmlTextWriter * xmlTextWriterPtr
SwFieldTypesEnum m_nSubType
Definition: docufld.hxx:304
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:1652
OUString m_aContent
Evaluated DB-text.
Definition: docufld.hxx:301
const SwDocInfoSubType DI_SUB_FIXED
Definition: docufld.hxx:86
const SwDocInfoSubType DI_CHANGE
Definition: docufld.hxx:76
const OUString & GetInitials() const
Definition: docufld.hxx:493
virtual void SetSubType(sal_uInt16)
Definition: fldbas.cxx:347
SvxNumType m_nNumberingType
Definition: docufld.hxx:133
const SwDocInfoSubType DI_TITLE
Definition: docufld.hxx:71
bool MakeSetList(SetGetExpFields &rTmpLst, SwRootFrame const *pLayout)
Definition: docufld.cxx:2214
virtual void SetSubType(sal_uInt16 nSub) override
Definition: docufld.cxx:2023
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:2476
void SetHidden(bool bHidden)
Definition: docufld.hxx:375
SwJumpEditFormat
Definition: docufld.hxx:122
void SetCodeURL(bool bURL)
Definition: docufld.hxx:722
const OUString & GetMacro() const
Definition: docufld.hxx:409
void UpdateField(SwTextField const *pTextField, SetGetExpFields const &rSetList, SwRootFrame const *pLayout)
Definition: docufld.cxx:2262
SwScriptFieldType(SwDoc &rDoc)
Definition: scrptfld.cxx:28
SwExtUserField(SwExtUserFieldType *, sal_uInt16 nSub, sal_uInt32 nFormat)
Definition: docufld.cxx:1996
SwAuthorFormat
Definition: docufld.hxx:42
OUString m_sText
Definition: docufld.hxx:665
void SetUserString(const OUString &rS)
Definition: docufld.hxx:176
virtual void SetPar1(const OUString &rStr) override
set condition
Definition: docufld.cxx:1699