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 = 0xff00;
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 
292  void SetHiddenFlag( bool bSetHidden );
293  bool GetHiddenFlag() const { return m_bHidden; }
294 };
295 
297 {
298  OUString m_aTRUEText;
299  OUString m_aFALSEText;
300  OUString m_aContent;
301 
302  OUString m_aCond;
304 
305  bool m_bCanToggle : 1;
306  bool m_bIsHidden : 1;
307  bool m_bValid : 1;
308 
309  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
310  virtual std::unique_ptr<SwField> Copy() const override;
311 
312 public:
314  bool bConditional,
315  const OUString& rCond,
316  const OUString& rText,
317  bool bHidden,
319 
321  const OUString& rCond,
322  const OUString& rTrue,
323  const OUString& rFalse,
325 
326  virtual OUString GetFieldName() const override;
327 
328  void Evaluate(SwDoc& rDoc);
329 
330  void SetValue(bool bHidden) { m_bIsHidden = bHidden; }
331  static OUString GetColumnName(const OUString& rName);
332  static OUString GetDBName(const OUString& rName, SwDoc& rDoc);
333 
335  virtual void SetPar1(const OUString& rStr) override;
336  virtual OUString GetPar1() const override;
337 
339  virtual void SetPar2(const OUString& rStr) override;
340  virtual OUString GetPar2() const override;
341 
342  virtual sal_uInt16 GetSubType() const override;
343 
344  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
345  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
346 
347  static void ParseIfFieldDefinition(const OUString& aFieldDefinition,
348  OUString& rCondition,
349  OUString& rTrue,
350  OUString& rFalse);
351 };
352 
353 // Field that expands to an empty line (without height).
354 class SwHiddenParaFieldType final : public SwFieldType
355 {
356 public:
358 
359  virtual std::unique_ptr<SwFieldType> Copy() const override;
360 };
361 
362 class SwHiddenParaField final : public SwField
363 {
364  OUString m_aCond;
366 public:
368  SwHiddenParaField(SwHiddenParaFieldType*, const OUString& rCond);
369 
370  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
371  virtual std::unique_ptr<SwField> Copy() const override;
372 
373  void SetHidden(bool bHidden) { m_bIsHidden = bHidden; }
374  bool IsHidden() const { return m_bIsHidden; }
375 
377  virtual OUString GetPar1() const override;
378  virtual void SetPar1(const OUString& rStr) override;
379  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
380  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
381 };
382 
383 class SAL_DLLPUBLIC_RTTI SwMacroFieldType final : public SwFieldType
384 {
386 
387 public:
389 
390  virtual std::unique_ptr<SwFieldType> Copy() const override;
391 };
392 
393 class SW_DLLPUBLIC SwMacroField final : public SwField
394 {
395  OUString m_aMacro;
396  OUString m_aText;
398 
399  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
400  virtual std::unique_ptr<SwField> Copy() const override;
401 
402 public:
404  SwMacroField( SwMacroFieldType*, const OUString& rLibAndName,
405  const OUString& rText);
406 
407  const OUString& GetMacro() const { return m_aMacro; }
408  OUString GetLibName() const;
409  OUString GetMacroName() const;
410  SvxMacro GetSvxMacro() const;
411 
412  virtual OUString GetFieldName() const override;
413 
415  virtual OUString GetPar1() const override;
416  virtual void SetPar1(const OUString& rStr) override;
417 
419  virtual OUString GetPar2() const override;
420  virtual void SetPar2(const OUString& rStr) override;
421  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
422  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
423 
424  static void CreateMacroString( OUString& rMacro,
425  std::u16string_view rMacroName,
426  const OUString& rLibraryName );
427 
428  static bool isScriptURL( const OUString& str );
429 };
430 
431 class SAL_DLLPUBLIC_RTTI SwPostItFieldType final : public SwFieldType
432 {
433 private:
435 public:
436  SwPostItFieldType(SwDoc& rDoc);
437 
438  virtual std::unique_ptr<SwFieldType> Copy() const override;
439 
440  SwDoc& GetDoc() const
441  {
442  return mrDoc;
443  };
444 };
445 
446 class SW_DLLPUBLIC SwPostItField final : public SwField
447 {
448  OUString m_sText;
449  OUString m_sAuthor;
450  OUString m_sInitials;
451  OUString m_sName;
456  sal_uInt32 m_nPostItId;
457 
458 public:
459  static sal_uInt32 s_nLastPostItId;
460 
462  const OUString& rAuthor,
463  const OUString& rText,
464  const OUString& rInitials,
465  const OUString& rName,
466  const DateTime& rDate,
467  const bool bResolved = false,
468  const sal_uInt32 nPostItId = 0);
469 
470  SwPostItField(const SwPostItField&) = delete;
471  SwPostItField* operator=(const SwPostItField&) = delete;
472 
473  virtual ~SwPostItField() override;
474 
475  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
476  virtual std::unique_ptr<SwField> Copy() const override;
477 
478  const DateTime& GetDateTime() const { return m_aDateTime; }
479  Date GetDate() const { return Date(m_aDateTime.GetDate()); }
480  tools::Time GetTime() const { return tools::Time(m_aDateTime.GetTime()); }
481  sal_uInt32 GetPostItId() const { return m_nPostItId; }
482 
484  virtual OUString GetPar1() const override;
485  virtual void SetPar1(const OUString& rStr) override;
486 
488  virtual OUString GetPar2() const override;
489  virtual void SetPar2(const OUString& rStr) override;
490  const OUString& GetText() const { return m_sText; }
491  const OUString& GetInitials() const { return m_sInitials;}
492  void SetName(const OUString& rStr);
493  const OUString& GetName() const { return m_sName;}
494 
495  const OutlinerParaObject* GetTextObject() const { return mpText ? &*mpText : nullptr;}
496  void SetTextObject( std::optional<OutlinerParaObject> pText );
497 
498  void SetResolved(bool bNewState);
499  void ToggleResolved();
500  bool GetResolved() const;
501 
502  sal_Int32 GetNumberOfParagraphs() const;
503 
504  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
505  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
506  virtual OUString GetDescription() const override;
507  virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
508 };
509 
510 class SAL_DLLPUBLIC_RTTI SwDocInfoFieldType final : public SwValueFieldType
511 {
512 public:
514 
515  OUString Expand(sal_uInt16 nSubType, sal_uInt32 nFormat, LanguageType nLang, const OUString& rName) const;
516  virtual std::unique_ptr<SwFieldType> Copy() const override;
517 };
518 
520 {
521  sal_uInt16 m_nSubType;
522  OUString m_aContent;
523  OUString m_aName;
524 
525  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
526  virtual std::unique_ptr<SwField> Copy() const override;
527 
528 public:
529  SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const OUString& rName, sal_uInt32 nFormat=0);
530  SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const OUString& rName, const OUString& rValue, sal_uInt32 nFormat=0);
531 
532  virtual void SetSubType(sal_uInt16) override;
533  virtual sal_uInt16 GetSubType() const override;
534  virtual void SetLanguage(LanguageType nLng) override;
535  virtual OUString GetFieldName() const override;
536  const OUString& GetName() const { return m_aName; }
537  void SetName( const OUString& rName ) { m_aName = rName; }
538  void SetExpansion(const OUString& rStr) { m_aContent = rStr; }
539  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
540  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
541 };
542 
543 // Extended User settings.
544 class SwExtUserFieldType final : public SwFieldType
545 {
546 public:
548 
549  static OUString Expand(sal_uInt16 nSubType);
550  virtual std::unique_ptr<SwFieldType> Copy() const override;
551 };
552 
553 class SwExtUserField final : public SwField
554 {
555  OUString m_aContent;
556  sal_uInt16 m_nType;
557 
558 public:
559  SwExtUserField(SwExtUserFieldType*, sal_uInt16 nSub, sal_uInt32 nFormat);
560 
561  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
562  virtual std::unique_ptr<SwField> Copy() const override;
563 
564  virtual sal_uInt16 GetSubType() const override;
565  virtual void SetSubType(sal_uInt16 nSub) override;
566 
567  void SetExpansion(const OUString& rStr) { m_aContent = rStr; }
568 
569  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
570  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
571 };
572 
573 // Relative page numbers - field.
574 class SwRefPageSetFieldType final : public SwFieldType
575 {
576 public:
578 
579  virtual std::unique_ptr<SwFieldType> Copy() const override;
580 
581 private:
583  virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
584 };
585 
586 // Relative page numbering.
587 class SAL_DLLPUBLIC_RTTI SwRefPageSetField final : public SwField
588 {
589  short m_nOffset;
590  bool m_bOn;
591 
592 public:
593  SwRefPageSetField( SwRefPageSetFieldType*, short nOff, bool bOn );
594 
595  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
596  virtual std::unique_ptr<SwField> Copy() const override;
597 
598  virtual OUString GetPar2() const override;
599  virtual void SetPar2(const OUString& rStr) override;
600 
601  bool IsOn() const { return m_bOn; }
602 
603  short GetOffset() const { return m_nOffset; }
604  void SetOffset( short nOff ) { m_nOffset = nOff; }
605  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
606  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
607 };
608 
609 // Relative page numbers - query field.
610 class SwRefPageGetFieldType final : public SwFieldType
611 {
613  sal_Int16 m_nNumberingType;
614 
615  void UpdateField(SwTextField const * pTextField,
616  SetGetExpFields const & rSetList, SwRootFrame const* pLayout);
617 
619  virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
620 public:
621  SwRefPageGetFieldType( SwDoc& rDoc );
622  virtual std::unique_ptr<SwFieldType> Copy() const override;
623  bool MakeSetList(SetGetExpFields& rTmpLst, SwRootFrame const* pLayout);
624  SwDoc& GetDoc() const { return m_rDoc; }
625 };
626 
627 // Query relative page numbering.
628 class SwRefPageGetField final : public SwField
629 {
630  OUString m_sText;
631  OUString m_sTextRLHidden;
632 
633 public:
634  SwRefPageGetField( SwRefPageGetFieldType*, sal_uInt32 nFormat );
635 
636  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
637  virtual std::unique_ptr<SwField> Copy() const override;
638 
639  void SetText(const OUString& rText, SwRootFrame const* pLayout);
640 
641  void ChangeExpansion(const SwFrame& rFrame, const SwTextField* pField);
642  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
643  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
644 };
645 
646 // Field to jump to and edit.
647 class SwJumpEditFieldType final : public SwFieldType
648 {
651 
652 public:
653  SwJumpEditFieldType( SwDoc& rDoc );
654  virtual std::unique_ptr<SwFieldType> Copy() const override;
655 
657 };
658 
659 class SwJumpEditField final : public SwField
660 {
661  OUString m_sText;
662  OUString m_sHelp;
663 public:
664  SwJumpEditField( SwJumpEditFieldType*, sal_uInt32 nFormat,
665  const OUString& sText, const OUString& sHelp );
666 
667  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
668  virtual std::unique_ptr<SwField> Copy() const override;
669 
671  virtual OUString GetPar1() const override;
672  virtual void SetPar1(const OUString& rStr) override;
673 
675  virtual OUString GetPar2() const override;
676  virtual void SetPar2(const OUString& rStr) override;
677 
679  { return static_cast<SwJumpEditFieldType*>(GetTyp())->GetCharFormat(); }
680  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
681  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
682 };
683 
684 class SwScriptFieldType final : public SwFieldType
685 {
687 public:
688  SwScriptFieldType( SwDoc& rDoc );
689 
690  virtual std::unique_ptr<SwFieldType> Copy() const override;
691 };
692 
693 class SW_DLLPUBLIC SwScriptField final : public SwField
694 {
695  OUString m_sType;
696  OUString m_sCode;
699  bool m_bCodeURL;
700 
701 public:
702  SwScriptField( SwScriptFieldType*, const OUString& rType,
703  const OUString& rCode, bool bURL );
704 
705  virtual OUString GetDescription() const override;
706 
707  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
708  virtual std::unique_ptr<SwField> Copy() const override;
709 
711  virtual OUString GetPar1() const override;
712  virtual void SetPar1(const OUString& rStr) override;
714  virtual OUString GetPar2() const override;
715  virtual void SetPar2(const OUString& rStr) override;
716 
717  bool IsCodeURL() const { return m_bCodeURL; }
718  void SetCodeURL( bool bURL ) { m_bCodeURL = bURL; }
719  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
720  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
721 };
722 
723 // Combined Character Fieldtype
724 class SAL_DLLPUBLIC_RTTI SwCombinedCharFieldType final : public SwFieldType
725 {
726 public:
728 
729  virtual std::unique_ptr<SwFieldType> Copy() const override;
730 };
731 
732 // ScriptField
733 #define MAX_COMBINED_CHARACTERS 6
734 
736 {
737  OUString m_sCharacters;
738 
739 public:
740  SwCombinedCharField( SwCombinedCharFieldType*, const OUString& rChars );
741 
742  virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
743  virtual std::unique_ptr<SwField> Copy() const override;
744 
746  virtual OUString GetPar1() const override;
747  virtual void SetPar1(const OUString& rStr) override;
748 
749  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
750  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
751 };
752 
753 #endif // INCLUDED_SW_INC_DOCUFLD_HXX
754 
755 /* 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:479
virtual void SetPar1(const OUString &rStr) override
set place holder text
Definition: docufld.cxx:2495
SwDoc & GetDoc() const
Definition: docufld.hxx:440
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:459
const SwDocInfoSubType DI_SUB_TIME
Definition: docufld.hxx:84
void SetValue(bool bHidden)
Definition: docufld.hxx:330
const OUString & GetUserString() const
Definition: docufld.hxx:175
Base class of the Writer layout elements.
Definition: frame.hxx:315
SwDoc & GetDoc() const
Definition: docufld.hxx:624
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
Definition: fldbas.cxx:834
OUString m_aMacro
Definition: docufld.hxx:395
sal_uInt16 m_nPageNumber
Definition: docufld.hxx:153
SwField & operator=(SwField const &)=default
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:2459
const SwDocInfoSubType DI_SUBTYPE_END
Definition: docufld.hxx:81
DateTime m_aDateTime
Definition: docufld.hxx:452
SwExtUserSubType
Definition: docufld.hxx:101
virtual sal_uInt16 GetSubType() const override
Definition: docufld.cxx:2019
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
noop, there is nothing to update!
Definition: docufld.cxx:2092
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:322
bool GetHiddenFlag() const
Definition: docufld.hxx:293
virtual std::unique_ptr< SwFieldType > Copy() const =0
bool IsCodeURL() const
Definition: docufld.hxx:717
void ChangeExpansion(const SwFrame &rFrame, const SwTextField *pField)
Definition: docufld.cxx:2353
OUString m_sUserStr
Definition: docufld.hxx:149
sal_uIntPtr sal_uLong
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:2011
Base class of all fields.
Definition: fldbas.hxx:290
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:1665
Definition: doc.hxx:188
tools::Time GetTime() const
Definition: docufld.hxx:480
OUString m_aTRUEText
Text if condition true.
Definition: docufld.hxx:298
const SwDocInfoSubType DI_COMMENT
Definition: docufld.hxx:74
SwDoc & m_rDoc
Definition: docufld.hxx:385
sal_Int16 m_nNumberingType
Definition: docufld.hxx:613
OUString m_aCond
Condition.
Definition: docufld.hxx:302
SwRefPageGetField(SwRefPageGetFieldType *, sal_uInt32 nFormat)
Definition: docufld.cxx:2320
const OUString & GetName() const
Definition: docufld.hxx:536
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:2482
SwJumpEditField(SwJumpEditFieldType *, sal_uInt32 nFormat, const OUString &sText, const OUString &sHelp)
Definition: docufld.cxx:2471
OUString m_aContent
Definition: docufld.hxx:190
The root element of a Writer document layout.
Definition: rootfrm.hxx:82
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:2029
const SwDocInfoSubType DI_EDIT
Definition: docufld.hxx:79
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:342
SvxNumType
static LanguageType nLang
Definition: srtdlg.cxx:51
virtual OUString GetPar1() const
Definition: fldbas.cxx:316
rtl::Reference< SwTextAPIObject > m_xTextObject
Definition: docufld.hxx:455
OUString m_sCharacters
combine these characters
Definition: docufld.hxx:737
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const =0
OUString m_sCode
Code as text.
Definition: docufld.hxx:696
virtual void SetPar2(const OUString &rStr)
Definition: fldbas.cxx:334
OUString m_aContent
Definition: docufld.hxx:555
bool m_bResolved
Definition: docufld.hxx:453
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhichId)
Definition: fldbas.cxx:359
const OUString & GetText() const
Definition: docufld.hxx:490
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:2163
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:2507
virtual void SetLanguage(LanguageType nLng) override
set language of the format
Definition: fldbas.cxx:684
void SetExpansion(const OUString &rStr)
Definition: docufld.hxx:198
virtual OUString GetPar1() const override
Placeholder-Text.
Definition: docufld.cxx:2489
OUString m_sText
Definition: docufld.hxx:630
sal_Int32 GetDate() const
SwHiddenParaField(SwHiddenParaFieldType *, const OUString &rCond)
Direct input, delete old value.
Definition: docufld.cxx:1647
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:2086
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:1682
void SetExpansion(const OUString &rStr)
Definition: docufld.hxx:538
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:2052
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhichId) const
Definition: fldbas.cxx:346
bool IsHidden() const
Definition: docufld.hxx:374
virtual OUString GetPar1() const override
Query, set condition.
Definition: docufld.cxx:1705
OUString m_sType
Type of Code (Java/VBScript/...)
Definition: docufld.hxx:695
OUString m_sText
Definition: docufld.hxx:448
const SwDocInfoSubType DI_CUSTOM
Definition: docufld.hxx:80
virtual OUString GetDescription() const
Definition: fldbas.cxx:812
OUString m_aName
Definition: docufld.hxx:523
struct _xmlTextWriter * xmlTextWriterPtr
sal_uInt32 GetPostItId() const
Definition: docufld.hxx:481
const SwDocInfoSubType DI_PRINT
Definition: docufld.hxx:77
virtual void SetPar1(const OUString &rStr)
Definition: fldbas.cxx:331
const DateTime & GetDateTime() const
Definition: docufld.hxx:478
OUString m_aCond
Definition: docufld.hxx:364
SwAuthorField(SwAuthorFieldType *, sal_uInt32 nFormat)
Definition: docufld.cxx:327
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:2414
OUString m_sAuthor
Definition: docufld.hxx:449
SwRefPageGetFieldType(SwDoc &rDoc)
Definition: docufld.cxx:2158
SwCharFormat * GetCharFormat()
Definition: docufld.cxx:2464
const SwDocInfoSubType DI_KEYS
Definition: docufld.hxx:73
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:2003
sal_uInt16 m_nSubType
Definition: docufld.hxx:267
sal_uInt16 m_nSubType
Definition: docufld.hxx:521
OUString m_aFALSEText
If condition false.
Definition: docufld.hxx:299
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:2501
sw::WriterMultiListener m_aDep
Definition: docufld.hxx:650
const SwDocInfoSubType DI_SUB_MASK
Definition: docufld.hxx:87
OUString m_aContent
Definition: docufld.hxx:216
bool IsOn() const
Definition: docufld.hxx:601
sal_uInt16 m_nMaxPage
Definition: docufld.hxx:154
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:2339
const SwDocInfoSubType DI_SUB_DATE
Definition: docufld.hxx:85
sal_uInt16 m_nSubType
Definition: docufld.hxx:150
virtual OUString GetPar2() const
Definition: fldbas.cxx:321
#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:337
const OUString & GetName() const
Definition: docufld.hxx:493
short GetOffset() const
Definition: docufld.hxx:603
SwFieldType * GetTyp() const
Definition: fldbas.hxx:393
void SetText(const OUString &rText, SwRootFrame const *pLayout)
Definition: docufld.cxx:2326
const SwDocInfoSubType DI_SUB_AUTHOR
Definition: docufld.hxx:83
Fields containing values that have to be formatted via number formatter.
Definition: fldbas.hxx:409
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:350
OUString m_sHelp
Definition: docufld.hxx:662
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:1658
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:1957
const OutlinerParaObject * GetTextObject() const
Definition: docufld.hxx:495
std::optional< OutlinerParaObject > mpText
Definition: docufld.hxx:454
OUString m_aContent
Definition: docufld.hxx:522
OUString m_sInitials
Initials of the author.
Definition: docufld.hxx:450
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:678
SwPageNumSubType
Definition: docufld.hxx:90
const SwDocInfoSubType DI_DOCNO
Definition: docufld.hxx:78
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:1640
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:2344
static OUString Expand(sal_uInt16 nSubType)
Definition: docufld.cxx:1962
sal_uInt32 m_nPostItId
Definition: docufld.hxx:456
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
overwritten to update all RefPageGet fields
Definition: docufld.cxx:2170
static OUString Expand(sal_uLong)
Definition: docufld.cxx:313
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:2512
OUString m_aText
Definition: docufld.hxx:396
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:2543
SwJumpEditFieldType(SwDoc &rDoc)
Definition: docufld.cxx:2454
sal_Int64 GetTime() const
virtual OUString GetFieldName() const
get name or content
Definition: fldbas.cxx:300
bool m_bCodeURL
Code contains URL of a script.
Definition: docufld.hxx:699
void SetExpansion(const OUString &rStr)
Definition: docufld.hxx:567
sal_uInt16 m_nType
Definition: docufld.hxx:556
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:2430
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:333
OUString m_sTextRLHidden
hidden redlines
Definition: docufld.hxx:631
void SetOffset(short nOff)
Definition: docufld.hxx:604
void SetName(const OUString &rName)
Definition: docufld.hxx:537
OUString m_sName
Name of the comment.
Definition: docufld.hxx:451
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:372
bool m_bIsScriptURL
Definition: docufld.hxx:397
void SetNumFormat(SvxNumType eFormat)
Definition: docufld.hxx:262
SwFieldTypesEnum m_nSubType
Definition: docufld.hxx:303
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:1653
OUString m_aContent
Evaluated DB-text.
Definition: docufld.hxx:300
const SwDocInfoSubType DI_SUB_FIXED
Definition: docufld.hxx:86
const SwDocInfoSubType DI_CHANGE
Definition: docufld.hxx:76
const OUString & GetInitials() const
Definition: docufld.hxx:491
virtual void SetSubType(sal_uInt16)
Definition: fldbas.cxx:342
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:2215
virtual void SetSubType(sal_uInt16 nSub) override
Definition: docufld.cxx:2024
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:2477
void SetHidden(bool bHidden)
Definition: docufld.hxx:373
SwJumpEditFormat
Definition: docufld.hxx:122
void SetCodeURL(bool bURL)
Definition: docufld.hxx:718
const OUString & GetMacro() const
Definition: docufld.hxx:407
void UpdateField(SwTextField const *pTextField, SetGetExpFields const &rSetList, SwRootFrame const *pLayout)
Definition: docufld.cxx:2263
SwScriptFieldType(SwDoc &rDoc)
Definition: scrptfld.cxx:28
SwExtUserField(SwExtUserFieldType *, sal_uInt16 nSub, sal_uInt32 nFormat)
Definition: docufld.cxx:1997
SwAuthorFormat
Definition: docufld.hxx:42
OUString m_sText
Definition: docufld.hxx:661
void SetUserString(const OUString &rS)
Definition: docufld.hxx:176
virtual void SetPar1(const OUString &rStr) override
set condition
Definition: docufld.cxx:1700