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
35class SetGetExpFields;
36class SwTextField;
37class SwFrame;
39class SwTextAPIObject;
40class SwCharFormat;
41
43{
47 AF_FIXED = 0x8000
48};
49
50// Subtype of document statistics.
52{
61};
62
63typedef sal_uInt16 SwDocInfoSubType;
65{
82
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{
121
123{
130
131class SAL_DLLPUBLIC_RTTI SwPageNumberFieldType final : public SwFieldType
132{
135
136public:
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;
152 // fdo#58074 store page number in SwField, not SwFieldType
153 sal_uInt16 m_nPageNumber;
154 sal_uInt16 m_nMaxPage;
155
156public:
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
179class SwAuthorFieldType final : public SwFieldType
180{
181public:
183
184 static OUString Expand(sal_uLong);
185 virtual std::unique_ptr<SwFieldType> Copy() const override;
186};
187
188class SwAuthorField final : public SwField
189{
190 OUString m_aContent;
191
192public:
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
204class SAL_DLLPUBLIC_RTTI SwFileNameFieldType final : public SwFieldType
205{
207public:
209
210 OUString Expand(sal_uLong) const;
211 virtual std::unique_ptr<SwFieldType> Copy() const override;
212};
213
215{
216 OUString m_aContent;
217
218public:
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
230class SAL_DLLPUBLIC_RTTI SwTemplNameFieldType final : public SwFieldType
231{
233public:
235
236 OUString Expand(sal_uLong) const;
237 virtual std::unique_ptr<SwFieldType> Copy() const override;
238};
239
241{
242public:
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
252class SAL_DLLPUBLIC_RTTI SwDocStatFieldType final : public SwFieldType
253{
256
257public:
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
266{
267 sal_uInt16 m_nSubType;
268
269public:
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
284class SAL_DLLPUBLIC_RTTI SwHiddenTextFieldType final : public SwFieldType
285{
287public:
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
313public:
315 bool bConditional,
316 OUString aCond,
317 const OUString& rText,
318 bool bHidden,
320
322 OUString aCond,
323 OUString aTrue,
324 OUString aFalse,
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).
356{
357public:
359
360 virtual std::unique_ptr<SwFieldType> Copy() const override;
361 virtual void UpdateFields() override {};
362};
363
364class SwHiddenParaField final : public SwField
365{
366 OUString m_aCond;
368public:
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
385class SAL_DLLPUBLIC_RTTI SwMacroFieldType final : public SwFieldType
386{
388
389public:
391
392 virtual std::unique_ptr<SwFieldType> Copy() const override;
393};
394
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
404public:
406 SwMacroField( SwMacroFieldType*, OUString aLibAndName,
407 OUString aText);
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
433class SAL_DLLPUBLIC_RTTI SwPostItFieldType final : public SwFieldType
434{
435private:
437public:
439
440 virtual std::unique_ptr<SwFieldType> Copy() const override;
441
442 SwDoc& GetDoc() const
443 {
444 return mrDoc;
445 };
446};
447
449{
450 OUString m_sText;
451 OUString m_sAuthor;
452 OUString m_sInitials;
453 OUString m_sName;
458 sal_uInt32 m_nPostItId;
459
460public:
461 static sal_uInt32 s_nLastPostItId;
462
464 OUString aAuthor,
465 OUString aText,
466 OUString aInitials,
467 OUString aName,
468 const DateTime& rDate,
469 const bool bResolved = false,
470 const sal_uInt32 nPostItId = 0);
471
472 SwPostItField(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 void SetPostItId(const sal_uInt32 nPostItId = 0);
485
487 virtual OUString GetPar1() const override;
488 virtual void SetPar1(const OUString& rStr) override;
489
491 virtual OUString GetPar2() const override;
492 virtual void SetPar2(const OUString& rStr) override;
493 const OUString& GetText() const { return m_sText; }
494 const OUString& GetInitials() const { return m_sInitials;}
495 void SetName(const OUString& rStr);
496 const OUString& GetName() const { return m_sName;}
497
498 const OutlinerParaObject* GetTextObject() const { return mpText ? &*mpText : nullptr;}
499 void SetTextObject( std::optional<OutlinerParaObject> pText );
500
501 void SetResolved(bool bNewState);
502 void ToggleResolved();
503 bool GetResolved() const;
504
505 sal_Int32 GetNumberOfParagraphs() const;
506
507 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
508 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
509 virtual OUString GetDescription() const override;
510 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
511};
512
513class SAL_DLLPUBLIC_RTTI SwDocInfoFieldType final : public SwValueFieldType
514{
515public:
517
518 OUString Expand(sal_uInt16 nSubType, sal_uInt32 nFormat, LanguageType nLang, const OUString& rName) const;
519 virtual std::unique_ptr<SwFieldType> Copy() const override;
520};
521
523{
524 sal_uInt16 m_nSubType;
525 OUString m_aContent;
526 OUString m_aName;
527
528 virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
529 virtual std::unique_ptr<SwField> Copy() const override;
530
531public:
532 SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const OUString& rName, sal_uInt32 nFormat=0);
533 SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const OUString& rName, const OUString& rValue, sal_uInt32 nFormat=0);
534
535 virtual void SetSubType(sal_uInt16) override;
536 virtual sal_uInt16 GetSubType() const override;
537 virtual void SetLanguage(LanguageType nLng) override;
538 virtual OUString GetFieldName() const override;
539 const OUString& GetName() const { return m_aName; }
540 void SetName( const OUString& rName ) { m_aName = rName; }
541 void SetExpansion(const OUString& rStr) { m_aContent = rStr; }
542 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
543 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
544};
545
546// Extended User settings.
547class SwExtUserFieldType final : public SwFieldType
548{
549public:
551
552 static OUString Expand(sal_uInt16 nSubType);
553 virtual std::unique_ptr<SwFieldType> Copy() const override;
554};
555
556class SwExtUserField final : public SwField
557{
558 OUString m_aContent;
559 sal_uInt16 m_nType;
560
561public:
562 SwExtUserField(SwExtUserFieldType*, sal_uInt16 nSub, sal_uInt32 nFormat);
563
564 virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
565 virtual std::unique_ptr<SwField> Copy() const override;
566
567 virtual sal_uInt16 GetSubType() const override;
568 virtual void SetSubType(sal_uInt16 nSub) override;
569
570 void SetExpansion(const OUString& rStr) { m_aContent = rStr; }
571
572 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
573 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
574};
575
576// Relative page numbers - field.
578{
579public:
581
582 virtual std::unique_ptr<SwFieldType> Copy() const override;
583 virtual void UpdateFields() override {};
584
585private:
587 virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
588};
589
590// Relative page numbering.
591class SAL_DLLPUBLIC_RTTI SwRefPageSetField final : public SwField
592{
594 bool m_bOn;
595
596public:
597 SwRefPageSetField( SwRefPageSetFieldType*, short nOff, bool bOn );
598
599 virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
600 virtual std::unique_ptr<SwField> Copy() const override;
601
602 virtual OUString GetPar2() const override;
603 virtual void SetPar2(const OUString& rStr) override;
604
605 bool IsOn() const { return m_bOn; }
606
607 short GetOffset() const { return m_nOffset; }
608 void SetOffset( short nOff ) { m_nOffset = nOff; }
609 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
610 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
611};
612
613// Relative page numbers - query field.
615{
618
619 void UpdateField(SwTextField const * pTextField,
620 SetGetExpFields const & rSetList, SwRootFrame const* pLayout);
621
623 virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
624public:
626 virtual std::unique_ptr<SwFieldType> Copy() const override;
627 bool MakeSetList(SetGetExpFields& rTmpLst, SwRootFrame const* pLayout);
628 SwDoc& GetDoc() const { return m_rDoc; }
629};
630
631// Query relative page numbering.
632class SwRefPageGetField final : public SwField
633{
634 OUString m_sText;
636
637public:
638 SwRefPageGetField( SwRefPageGetFieldType*, sal_uInt32 nFormat );
639
640 virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
641 virtual std::unique_ptr<SwField> Copy() const override;
642
643 void SetText(const OUString& rText, SwRootFrame const* pLayout);
644
645 void ChangeExpansion(const SwFrame& rFrame, const SwTextField* pField);
646 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
647 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
648};
649
650// Field to jump to and edit.
652{
655
656public:
657 SwJumpEditFieldType( SwDoc& rDoc );
658 virtual std::unique_ptr<SwFieldType> Copy() const override;
659 virtual void UpdateFields() override {};
660
662};
663
664class SwJumpEditField final : public SwField
665{
666 OUString m_sText;
667 OUString m_sHelp;
668public:
669 SwJumpEditField( SwJumpEditFieldType*, sal_uInt32 nFormat,
670 OUString sText, OUString sHelp );
671
672 virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
673 virtual std::unique_ptr<SwField> Copy() const override;
674
676 virtual OUString GetPar1() const override;
677 virtual void SetPar1(const OUString& rStr) override;
678
680 virtual OUString GetPar2() const override;
681 virtual void SetPar2(const OUString& rStr) override;
682
684 { return static_cast<SwJumpEditFieldType*>(GetTyp())->GetCharFormat(); }
685 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
686 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
687};
688
689class SwScriptFieldType final : public SwFieldType
690{
692public:
693 SwScriptFieldType( SwDoc& rDoc );
694
695 virtual std::unique_ptr<SwFieldType> Copy() const override;
696};
697
699{
700 OUString m_sType;
701 OUString m_sCode;
705
706public:
707 SwScriptField( SwScriptFieldType*, OUString aType,
708 OUString aCode, bool bURL );
709
710 virtual OUString GetDescription() const override;
711
712 virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
713 virtual std::unique_ptr<SwField> Copy() const override;
714
716 virtual OUString GetPar1() const override;
717 virtual void SetPar1(const OUString& rStr) override;
719 virtual OUString GetPar2() const override;
720 virtual void SetPar2(const OUString& rStr) override;
721
722 bool IsCodeURL() const { return m_bCodeURL; }
723 void SetCodeURL( bool bURL ) { m_bCodeURL = bURL; }
724 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
725 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
726};
727
728// Combined Character Fieldtype
729class SAL_DLLPUBLIC_RTTI SwCombinedCharFieldType final : public SwFieldType
730{
731public:
733
734 virtual std::unique_ptr<SwFieldType> Copy() const override;
735};
736
737// ScriptField
738#define MAX_COMBINED_CHARACTERS 6
739
741{
742 OUString m_sCharacters;
743
744public:
745 SwCombinedCharField( SwCombinedCharFieldType*, const OUString& rChars );
746
747 virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
748 virtual std::unique_ptr<SwField> Copy() const override;
749
751 virtual OUString GetPar1() const override;
752 virtual void SetPar1(const OUString& rStr) override;
753
754 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
755 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
756};
757
758#endif // INCLUDED_SW_INC_DOCUFLD_HXX
759
760/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _xmlTextWriter * xmlTextWriterPtr
sal_Int32 GetDate() const
static OUString Expand(sal_uLong)
Definition: docufld.cxx:313
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:322
OUString m_aContent
Definition: docufld.hxx:190
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:333
void SetExpansion(const OUString &rStr)
Definition: docufld.hxx:198
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:342
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:350
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:375
SwAuthorField(SwAuthorFieldType *, sal_uInt32 nFormat)
Definition: docufld.cxx:327
Represents the style of a text portion.
Definition: charfmt.hxx:27
OUString m_sCharacters
combine these characters
Definition: docufld.hxx:742
void SetExpansion(const OUString &rStr)
Definition: docufld.hxx:541
void SetName(const OUString &rName)
Definition: docufld.hxx:540
const OUString & GetName() const
Definition: docufld.hxx:539
OUString m_aName
Definition: docufld.hxx:526
OUString m_aContent
Definition: docufld.hxx:525
sal_uInt16 m_nSubType
Definition: docufld.hxx:524
void SetNumFormat(SvxNumType eFormat)
Definition: docufld.hxx:262
SvxNumType m_nNumberingType
Definition: docufld.hxx:255
sal_uInt16 m_nSubType
Definition: docufld.hxx:267
Definition: doc.hxx:192
static OUString Expand(sal_uInt16 nSubType)
Definition: docufld.cxx:1973
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:1968
virtual sal_uInt16 GetSubType() const override
Definition: docufld.cxx:2030
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:2014
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:2022
SwExtUserField(SwExtUserFieldType *, sal_uInt16 nSub, sal_uInt32 nFormat)
Definition: docufld.cxx:2008
OUString m_aContent
Definition: docufld.hxx:558
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:2063
sal_uInt16 m_nType
Definition: docufld.hxx:559
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:2040
void SetExpansion(const OUString &rStr)
Definition: docufld.hxx:570
virtual void SetSubType(sal_uInt16 nSub) override
Definition: docufld.cxx:2035
Instances of SwFields and those derived from it occur 0 to n times.
Definition: fldbas.hxx:242
virtual void QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const
Definition: fldbas.cxx:142
virtual void PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich)
Definition: fldbas.cxx:145
virtual std::unique_ptr< SwFieldType > Copy() const =0
Base class of all fields.
Definition: fldbas.hxx:292
virtual void SetLanguage(LanguageType nLng)
Definition: fldbas.cxx:442
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
Definition: fldbas.cxx:853
virtual OUString GetPar1() const
Definition: fldbas.cxx:321
virtual void SetPar1(const OUString &rStr)
Definition: fldbas.cxx:336
virtual void SetPar2(const OUString &rStr)
Definition: fldbas.cxx:339
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const =0
virtual sal_uInt16 GetSubType() const
Definition: fldbas.cxx:342
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhichId) const
Definition: fldbas.cxx:351
virtual OUString GetFieldName() const
get name or content
Definition: fldbas.cxx:305
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhichId)
Definition: fldbas.cxx:369
virtual OUString GetDescription() const
Definition: fldbas.cxx:831
SwFieldType * GetTyp() const
Definition: fldbas.hxx:398
virtual std::unique_ptr< SwField > Copy() const =0
virtual OUString GetPar2() const
Definition: fldbas.cxx:326
virtual void SetSubType(sal_uInt16)
Definition: fldbas.cxx:347
void SetExpansion(const OUString &rStr)
Definition: docufld.hxx:224
OUString m_aContent
Definition: docufld.hxx:216
Base class of the Writer layout elements.
Definition: frame.hxx:315
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:1646
virtual void UpdateFields() override
Definition: docufld.hxx:361
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:1664
bool IsHidden() const
Definition: docufld.hxx:376
SwHiddenParaField(SwHiddenParaFieldType *, OUString aCond)
Direct input, delete old value.
Definition: docufld.cxx:1653
virtual void SetPar1(const OUString &rStr) override
set condition
Definition: docufld.cxx:1706
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:1671
void SetHidden(bool bHidden)
Definition: docufld.hxx:375
OUString m_aCond
Definition: docufld.hxx:366
virtual OUString GetPar1() const override
Query, set condition.
Definition: docufld.cxx:1711
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:1659
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:1688
virtual void UpdateFields() override
Definition: docufld.hxx:291
bool GetHiddenFlag() const
Definition: docufld.hxx:294
OUString m_aContent
Evaluated DB-text.
Definition: docufld.hxx:301
bool m_bValid
Is DB-field evaluated?
Definition: docufld.hxx:308
OUString m_aTRUEText
Text if condition true.
Definition: docufld.hxx:299
OUString m_aFALSEText
If condition false.
Definition: docufld.hxx:300
SwFieldTypesEnum m_nSubType
Definition: docufld.hxx:304
bool m_bIsHidden
Is it not visible?
Definition: docufld.hxx:307
bool m_bCanToggle
Can field be toggled alone?
Definition: docufld.hxx:306
OUString m_aCond
Condition.
Definition: docufld.hxx:303
void SetValue(bool bHidden)
Definition: docufld.hxx:331
virtual void UpdateFields() override
Definition: docufld.hxx:659
SwCharFormat * GetCharFormat()
Definition: docufld.cxx:2472
sw::WriterMultiListener m_aDep
Definition: docufld.hxx:654
SwJumpEditFieldType(SwDoc &rDoc)
Definition: docufld.cxx:2462
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:2467
OUString m_sText
Definition: docufld.hxx:666
virtual void SetPar2(const OUString &rStr) override
set hint text
Definition: docufld.cxx:2515
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:2490
virtual OUString GetPar1() const override
Placeholder-Text.
Definition: docufld.cxx:2497
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:2485
SwJumpEditField(SwJumpEditFieldType *, sal_uInt32 nFormat, OUString sText, OUString sHelp)
Definition: docufld.cxx:2479
virtual void SetPar1(const OUString &rStr) override
set place holder text
Definition: docufld.cxx:2503
OUString m_sHelp
Definition: docufld.hxx:667
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:2551
virtual OUString GetPar2() const override
Hint-Text.
Definition: docufld.cxx:2509
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:2520
SwCharFormat * GetCharFormat() const
Definition: docufld.hxx:683
SwDoc & m_rDoc
Definition: docufld.hxx:387
const OUString & GetMacro() const
Definition: docufld.hxx:409
OUString m_aText
Definition: docufld.hxx:398
bool m_bIsScriptURL
Definition: docufld.hxx:399
OUString m_aMacro
Definition: docufld.hxx:397
SvxNumType m_nNumberingType
Definition: docufld.hxx:133
sal_uInt16 m_nMaxPage
Definition: docufld.hxx:154
void SetUserString(const OUString &rS)
Definition: docufld.hxx:176
const OUString & GetUserString() const
Definition: docufld.hxx:175
OUString m_sUserStr
Definition: docufld.hxx:149
sal_uInt16 m_nSubType
Definition: docufld.hxx:150
sal_uInt16 m_nPageNumber
Definition: docufld.hxx:153
SwDoc & GetDoc() const
Definition: docufld.hxx:442
sal_uInt32 GetPostItId() const
Definition: docufld.hxx:483
const OUString & GetInitials() const
Definition: docufld.hxx:494
const OUString & GetText() const
Definition: docufld.hxx:493
const OUString & GetName() const
Definition: docufld.hxx:496
OUString m_sAuthor
Definition: docufld.hxx:451
rtl::Reference< SwTextAPIObject > m_xTextObject
Definition: docufld.hxx:457
const DateTime & GetDateTime() const
Definition: docufld.hxx:480
OUString m_sInitials
Initials of the author.
Definition: docufld.hxx:452
OUString m_sText
Definition: docufld.hxx:450
const OutlinerParaObject * GetTextObject() const
Definition: docufld.hxx:498
SwPostItField(const SwPostItField &)=delete
bool m_bResolved
Definition: docufld.hxx:455
static sal_uInt32 s_nLastPostItId
Definition: docufld.hxx:461
Date GetDate() const
Definition: docufld.hxx:481
sal_uInt32 m_nPostItId
Definition: docufld.hxx:458
DateTime m_aDateTime
Definition: docufld.hxx:454
SwPostItField * operator=(const SwPostItField &)=delete
tools::Time GetTime() const
Definition: docufld.hxx:482
std::optional< OutlinerParaObject > mpText
Definition: docufld.hxx:456
OUString m_sName
Name of the comment.
Definition: docufld.hxx:453
SwDoc & GetDoc() const
Definition: docufld.hxx:628
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:2174
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
overwritten to update all RefPageGet fields
Definition: docufld.cxx:2181
sal_Int16 m_nNumberingType
Definition: docufld.hxx:617
SwRefPageGetFieldType(SwDoc &rDoc)
Definition: docufld.cxx:2169
bool MakeSetList(SetGetExpFields &rTmpLst, SwRootFrame const *pLayout)
Definition: docufld.cxx:2226
void UpdateField(SwTextField const *pTextField, SetGetExpFields const &rSetList, SwRootFrame const *pLayout)
Definition: docufld.cxx:2272
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:2422
void ChangeExpansion(const SwFrame &rFrame, const SwTextField *pField)
Definition: docufld.cxx:2361
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:2438
OUString m_sText
Definition: docufld.hxx:634
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:2352
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:2347
void SetText(const OUString &rText, SwRootFrame const *pLayout)
Definition: docufld.cxx:2334
OUString m_sTextRLHidden
hidden redlines
Definition: docufld.hxx:635
SwRefPageGetField(SwRefPageGetFieldType *, sal_uInt32 nFormat)
Definition: docufld.cxx:2328
virtual void UpdateFields() override
Definition: docufld.hxx:583
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
noop, there is nothing to update!
Definition: docufld.cxx:2103
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:2097
void SetOffset(short nOff)
Definition: docufld.hxx:608
bool IsOn() const
Definition: docufld.hxx:605
short GetOffset() const
Definition: docufld.hxx:607
The root element of a Writer document layout.
Definition: rootfrm.hxx:82
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: scrptfld.cxx:33
SwScriptFieldType(SwDoc &rDoc)
Definition: scrptfld.cxx:29
bool IsCodeURL() const
Definition: docufld.hxx:722
bool m_bCodeURL
Code contains URL of a script.
Definition: docufld.hxx:704
void SetCodeURL(bool bURL)
Definition: docufld.hxx:723
OUString m_sCode
Code as text.
Definition: docufld.hxx:701
OUString m_sType
Type of Code (Java/VBScript/...)
Definition: docufld.hxx:700
Fields containing values that have to be formatted via number formatter.
Definition: fldbas.hxx:415
sal_Int64 GetTime() const
SwExtUserSubType
Definition: docufld.hxx:102
@ EU_APARTMENT
Definition: docufld.hxx:119
@ EU_PHONE_PRIVATE
Definition: docufld.hxx:113
@ EU_TITLE
Definition: docufld.hxx:111
@ EU_PHONE_COMPANY
Definition: docufld.hxx:114
@ EU_FIRSTNAME
Definition: docufld.hxx:104
@ EU_FAX
Definition: docufld.hxx:115
@ EU_NAME
Definition: docufld.hxx:105
@ EU_EMAIL
Definition: docufld.hxx:116
@ EU_STREET
Definition: docufld.hxx:107
@ EU_COMPANY
Definition: docufld.hxx:103
@ EU_FATHERSNAME
Definition: docufld.hxx:118
@ EU_POSITION
Definition: docufld.hxx:112
@ EU_ZIP
Definition: docufld.hxx:109
@ EU_SHORTCUT
Definition: docufld.hxx:106
@ EU_CITY
Definition: docufld.hxx:110
@ EU_COUNTRY
Definition: docufld.hxx:108
@ EU_STATE
Definition: docufld.hxx:117
SwJumpEditFormat
Definition: docufld.hxx:123
@ JE_FMT_TEXT
Definition: docufld.hxx:124
@ JE_FMT_GRAPHIC
Definition: docufld.hxx:127
@ JE_FMT_TABLE
Definition: docufld.hxx:125
@ JE_FMT_OLE
Definition: docufld.hxx:128
@ JE_FMT_FRAME
Definition: docufld.hxx:126
SwPageNumSubType
Definition: docufld.hxx:91
@ PG_NEXT
Definition: docufld.hxx:93
@ PG_RANDOM
Definition: docufld.hxx:92
@ PG_PREV
Definition: docufld.hxx:94
SwDocStatSubType
Definition: docufld.hxx:52
@ DS_CHAR
Definition: docufld.hxx:57
@ DS_GRF
Definition: docufld.hxx:59
@ DS_TBL
Definition: docufld.hxx:58
@ DS_OLE
Definition: docufld.hxx:60
@ DS_BEGIN
Definition: docufld.hxx:53
@ DS_PAGE
Definition: docufld.hxx:54
@ DS_WORD
Definition: docufld.hxx:56
@ DS_PARA
Definition: docufld.hxx:55
SwAuthorFormat
Definition: docufld.hxx:43
@ AF_SHORTCUT
Definition: docufld.hxx:46
@ AF_BEGIN
Definition: docufld.hxx:44
@ AF_NAME
Definition: docufld.hxx:45
@ AF_FIXED
Definition: docufld.hxx:47
sal_uInt16 SwDocInfoSubType
Definition: docufld.hxx:63
OUString m_sName
SwFieldTypesEnum
List of FieldTypes at UI.
Definition: fldbas.hxx:94
const SwDocInfoSubType DI_SUB_MASK
Definition: docufld.hxx:87
const SwDocInfoSubType DI_DOCNO
Definition: docufld.hxx:78
const SwDocInfoSubType DI_SUB_AUTHOR
Definition: docufld.hxx:83
const SwDocInfoSubType DI_CUSTOM
Definition: docufld.hxx:80
const SwDocInfoSubType DI_CHANGE
Definition: docufld.hxx:76
const SwDocInfoSubType DI_COMMENT
Definition: docufld.hxx:74
const SwDocInfoSubType DI_SUBTYPE_BEGIN
NB: these must denote consecutive integers! NB2: these are extended by 4 DI_INFO values for backward ...
Definition: docufld.hxx:70
const SwDocInfoSubType DI_SUBTYPE_END
Definition: docufld.hxx:81
const SwDocInfoSubType DI_SUB_FIXED
Definition: docufld.hxx:86
const SwDocInfoSubType DI_PRINT
Definition: docufld.hxx:77
const SwDocInfoSubType DI_SUB_DATE
Definition: docufld.hxx:85
const SwDocInfoSubType DI_KEYS
Definition: docufld.hxx:73
const SwDocInfoSubType DI_EDIT
Definition: docufld.hxx:79
const SwDocInfoSubType DI_SUBJECT
Definition: docufld.hxx:72
const SwDocInfoSubType DI_TITLE
Definition: docufld.hxx:71
const SwDocInfoSubType DI_SUB_TIME
Definition: docufld.hxx:84
const SwDocInfoSubType DI_CREATE
Definition: docufld.hxx:75
OUString m_aName
sal_uIntPtr sal_uLong
static LanguageType nLang
Definition: srtdlg.cxx:51
SvxNumType
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
::ucbhelper::Content m_aContent