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