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(std::u16string_view 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 sal_uInt32 m_nParentId;
460 sal_uInt32 m_nParaId;
461
462public:
463 static sal_uInt32 s_nLastPostItId;
464
466 OUString aAuthor,
467 OUString aText,
468 OUString aInitials,
469 OUString aName,
470 const DateTime& rDate,
471 const bool bResolved = false,
472 const sal_uInt32 nPostItId = 0,
473 const sal_uInt32 nParentId = 0,
474 const sal_uInt32 nParaId = 0);
475
476 SwPostItField(const SwPostItField&) = delete;
478
479 virtual ~SwPostItField() override;
480
481 virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
482 virtual std::unique_ptr<SwField> Copy() const override;
483
484 const DateTime& GetDateTime() const { return m_aDateTime; }
485 Date GetDate() const { return Date(m_aDateTime.GetDate()); }
486 tools::Time GetTime() const { return tools::Time(m_aDateTime.GetTime()); }
487 sal_uInt32 GetPostItId() const { return m_nPostItId; }
488 void SetPostItId(const sal_uInt32 nPostItId = 0);
489 sal_uInt32 GetParentId() const { return m_nParentId; }
490 void SetParentId(const sal_uInt32 nParentId);
491 sal_uInt32 GetParaId() const { return m_nParaId; }
492 void SetParaId(const sal_uInt32 nParaId);
493
495 virtual OUString GetPar1() const override;
496 virtual void SetPar1(const OUString& rStr) override;
497
499 virtual OUString GetPar2() const override;
500 virtual void SetPar2(const OUString& rStr) override;
501 const OUString& GetText() const { return m_sText; }
502 const OUString& GetInitials() const { return m_sInitials;}
503 void SetName(const OUString& rStr);
504 const OUString& GetName() const { return m_sName;}
505
506 const OutlinerParaObject* GetTextObject() const { return mpText ? &*mpText : nullptr;}
507 void SetTextObject( std::optional<OutlinerParaObject> pText );
508
509 void SetResolved(bool bNewState);
510 void ToggleResolved();
511 bool GetResolved() const;
512
513 sal_Int32 GetNumberOfParagraphs() const;
514 void ChangeStyleSheetName(std::u16string_view rOldName, const SfxStyleSheetBase* pStyleSheet);
515
516 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
517 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
518 virtual OUString GetDescription() const override;
519 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
520};
521
522class SAL_DLLPUBLIC_RTTI SwDocInfoFieldType final : public SwValueFieldType
523{
524public:
526
527 OUString Expand(sal_uInt16 nSubType, sal_uInt32 nFormat, LanguageType nLang, const OUString& rName) const;
528 virtual std::unique_ptr<SwFieldType> Copy() const override;
529};
530
532{
533 sal_uInt16 m_nSubType;
534 OUString m_aContent;
535 OUString m_aName;
536
537 virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
538 virtual std::unique_ptr<SwField> Copy() const override;
539
540public:
541 SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const OUString& rName, sal_uInt32 nFormat=0);
542 SwDocInfoField(SwDocInfoFieldType*, sal_uInt16 nSub, const OUString& rName, const OUString& rValue, sal_uInt32 nFormat=0);
543
544 virtual void SetSubType(sal_uInt16) override;
545 virtual sal_uInt16 GetSubType() const override;
546 virtual void SetLanguage(LanguageType nLng) override;
547 virtual OUString GetFieldName() const override;
548 const OUString& GetName() const { return m_aName; }
549 void SetName( const OUString& rName ) { m_aName = rName; }
550 void SetExpansion(const OUString& rStr) { m_aContent = rStr; }
551 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
552 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
553};
554
555// Extended User settings.
556class SwExtUserFieldType final : public SwFieldType
557{
558public:
560
561 static OUString Expand(sal_uInt16 nSubType);
562 virtual std::unique_ptr<SwFieldType> Copy() const override;
563};
564
565class SwExtUserField final : public SwField
566{
567 OUString m_aContent;
568 sal_uInt16 m_nType;
569
570public:
571 SwExtUserField(SwExtUserFieldType*, sal_uInt16 nSub, sal_uInt32 nFormat);
572
573 virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
574 virtual std::unique_ptr<SwField> Copy() const override;
575
576 virtual sal_uInt16 GetSubType() const override;
577 virtual void SetSubType(sal_uInt16 nSub) override;
578
579 void SetExpansion(const OUString& rStr) { m_aContent = rStr; }
580
581 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
582 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
583};
584
585// Relative page numbers - field.
587{
588public:
590
591 virtual std::unique_ptr<SwFieldType> Copy() const override;
592 virtual void UpdateFields() override {};
593
594private:
596 virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
597};
598
599// Relative page numbering.
600class SAL_DLLPUBLIC_RTTI SwRefPageSetField final : public SwField
601{
603 bool m_bOn;
604
605public:
606 SwRefPageSetField( SwRefPageSetFieldType*, short nOff, bool bOn );
607
608 virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
609 virtual std::unique_ptr<SwField> Copy() const override;
610
611 virtual OUString GetPar2() const override;
612 virtual void SetPar2(const OUString& rStr) override;
613
614 bool IsOn() const { return m_bOn; }
615
616 short GetOffset() const { return m_nOffset; }
617 void SetOffset( short nOff ) { m_nOffset = nOff; }
618 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
619 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
620};
621
622// Relative page numbers - query field.
624{
627
628 void UpdateField(SwTextField const * pTextField,
629 SetGetExpFields const & rSetList, SwRootFrame const* pLayout);
630
632 virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
633public:
635 virtual std::unique_ptr<SwFieldType> Copy() const override;
636 bool MakeSetList(SetGetExpFields& rTmpLst, SwRootFrame const* pLayout);
637 SwDoc& GetDoc() const { return m_rDoc; }
638};
639
640// Query relative page numbering.
641class SwRefPageGetField final : public SwField
642{
643 OUString m_sText;
645
646public:
647 SwRefPageGetField( SwRefPageGetFieldType*, sal_uInt32 nFormat );
648
649 virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
650 virtual std::unique_ptr<SwField> Copy() const override;
651
652 void SetText(const OUString& rText, SwRootFrame const* pLayout);
653
654 void ChangeExpansion(const SwFrame& rFrame, const SwTextField* pField);
655 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
656 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
657};
658
659// Field to jump to and edit.
661{
664
665public:
666 SwJumpEditFieldType( SwDoc& rDoc );
667 virtual std::unique_ptr<SwFieldType> Copy() const override;
668 virtual void UpdateFields() override {};
669
671};
672
673class SwJumpEditField final : public SwField
674{
675 OUString m_sText;
676 OUString m_sHelp;
677public:
678 SwJumpEditField( SwJumpEditFieldType*, sal_uInt32 nFormat,
679 OUString sText, OUString sHelp );
680
681 virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
682 virtual std::unique_ptr<SwField> Copy() const override;
683
685 virtual OUString GetPar1() const override;
686 virtual void SetPar1(const OUString& rStr) override;
687
689 virtual OUString GetPar2() const override;
690 virtual void SetPar2(const OUString& rStr) override;
691
693 { return static_cast<SwJumpEditFieldType*>(GetTyp())->GetCharFormat(); }
694 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
695 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
696};
697
698class SwScriptFieldType final : public SwFieldType
699{
701public:
702 SwScriptFieldType( SwDoc& rDoc );
703
704 virtual std::unique_ptr<SwFieldType> Copy() const override;
705};
706
708{
709 OUString m_sType;
710 OUString m_sCode;
714
715public:
716 SwScriptField( SwScriptFieldType*, OUString aType,
717 OUString aCode, bool bURL );
718
719 virtual OUString GetDescription() const override;
720
721 virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
722 virtual std::unique_ptr<SwField> Copy() const override;
723
725 virtual OUString GetPar1() const override;
726 virtual void SetPar1(const OUString& rStr) override;
728 virtual OUString GetPar2() const override;
729 virtual void SetPar2(const OUString& rStr) override;
730
731 bool IsCodeURL() const { return m_bCodeURL; }
732 void SetCodeURL( bool bURL ) { m_bCodeURL = bURL; }
733 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
734 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
735};
736
737// Combined Character Fieldtype
738class SAL_DLLPUBLIC_RTTI SwCombinedCharFieldType final : public SwFieldType
739{
740public:
742
743 virtual std::unique_ptr<SwFieldType> Copy() const override;
744};
745
746// ScriptField
747#define MAX_COMBINED_CHARACTERS 6
748
750{
751 OUString m_sCharacters;
752
753public:
754 SwCombinedCharField( SwCombinedCharFieldType*, const OUString& rChars );
755
756 virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
757 virtual std::unique_ptr<SwField> Copy() const override;
758
760 virtual OUString GetPar1() const override;
761 virtual void SetPar1(const OUString& rStr) override;
762
763 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
764 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
765};
766
767#endif // INCLUDED_SW_INC_DOCUFLD_HXX
768
769/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int32 GetDate() const
static OUString Expand(sal_uLong)
Definition: docufld.cxx:314
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:332
OUString m_aContent
Definition: docufld.hxx:190
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:343
void SetExpansion(const OUString &rStr)
Definition: docufld.hxx:198
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:352
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:360
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:385
SwAuthorField(SwAuthorFieldType *, sal_uInt32 nFormat)
Definition: docufld.cxx:337
Represents the style of a text portion.
Definition: charfmt.hxx:27
OUString m_sCharacters
combine these characters
Definition: docufld.hxx:751
void SetExpansion(const OUString &rStr)
Definition: docufld.hxx:550
void SetName(const OUString &rName)
Definition: docufld.hxx:549
const OUString & GetName() const
Definition: docufld.hxx:548
OUString m_aName
Definition: docufld.hxx:535
OUString m_aContent
Definition: docufld.hxx:534
sal_uInt16 m_nSubType
Definition: docufld.hxx:533
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:197
static OUString Expand(sal_uInt16 nSubType)
Definition: docufld.cxx:2025
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:2020
virtual sal_uInt16 GetSubType() const override
Definition: docufld.cxx:2082
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:2066
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:2074
SwExtUserField(SwExtUserFieldType *, sal_uInt16 nSub, sal_uInt32 nFormat)
Definition: docufld.cxx:2060
OUString m_aContent
Definition: docufld.hxx:567
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:2115
sal_uInt16 m_nType
Definition: docufld.hxx:568
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:2092
void SetExpansion(const OUString &rStr)
Definition: docufld.hxx:579
virtual void SetSubType(sal_uInt16 nSub) override
Definition: docufld.cxx:2087
Instances of SwFields and those derived from it occur 0 to n times.
Definition: fldbas.hxx:247
virtual void QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const
Definition: fldbas.cxx:144
virtual void PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich)
Definition: fldbas.cxx:147
virtual std::unique_ptr< SwFieldType > Copy() const =0
Base class of all fields.
Definition: fldbas.hxx:296
virtual void SetLanguage(LanguageType nLng)
Definition: fldbas.cxx:449
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
Definition: fldbas.cxx:931
virtual OUString GetPar1() const
Definition: fldbas.cxx:334
virtual void SetPar1(const OUString &rStr)
Definition: fldbas.cxx:349
virtual void SetPar2(const OUString &rStr)
Definition: fldbas.cxx:352
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const =0
virtual sal_uInt16 GetSubType() const
Definition: fldbas.cxx:355
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhichId) const
Definition: fldbas.cxx:364
virtual OUString GetFieldName() const
get name or content
Definition: fldbas.cxx:318
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhichId)
Definition: fldbas.cxx:382
virtual OUString GetDescription() const
Definition: fldbas.cxx:909
SwFieldType * GetTyp() const
Definition: fldbas.hxx:402
virtual std::unique_ptr< SwField > Copy() const =0
virtual OUString GetPar2() const
Definition: fldbas.cxx:339
virtual void SetSubType(sal_uInt16)
Definition: fldbas.cxx:360
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:1654
virtual void UpdateFields() override
Definition: docufld.hxx:361
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:1672
bool IsHidden() const
Definition: docufld.hxx:376
SwHiddenParaField(SwHiddenParaFieldType *, OUString aCond)
Direct input, delete old value.
Definition: docufld.cxx:1661
virtual void SetPar1(const OUString &rStr) override
set condition
Definition: docufld.cxx:1714
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:1679
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:1719
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:1667
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:1696
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:668
SwCharFormat * GetCharFormat()
Definition: docufld.cxx:2524
sw::WriterMultiListener m_aDep
Definition: docufld.hxx:663
SwJumpEditFieldType(SwDoc &rDoc)
Definition: docufld.cxx:2514
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:2519
OUString m_sText
Definition: docufld.hxx:675
virtual void SetPar2(const OUString &rStr) override
set hint text
Definition: docufld.cxx:2567
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:2542
virtual OUString GetPar1() const override
Placeholder-Text.
Definition: docufld.cxx:2549
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:2537
SwJumpEditField(SwJumpEditFieldType *, sal_uInt32 nFormat, OUString sText, OUString sHelp)
Definition: docufld.cxx:2531
virtual void SetPar1(const OUString &rStr) override
set place holder text
Definition: docufld.cxx:2555
OUString m_sHelp
Definition: docufld.hxx:676
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:2603
virtual OUString GetPar2() const override
Hint-Text.
Definition: docufld.cxx:2561
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:2572
SwCharFormat * GetCharFormat() const
Definition: docufld.hxx:692
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:487
sal_uInt32 m_nParaId
Definition: docufld.hxx:460
const OUString & GetInitials() const
Definition: docufld.hxx:502
const OUString & GetText() const
Definition: docufld.hxx:501
sal_uInt32 GetParaId() const
Definition: docufld.hxx:491
const OUString & GetName() const
Definition: docufld.hxx:504
OUString m_sAuthor
Definition: docufld.hxx:451
rtl::Reference< SwTextAPIObject > m_xTextObject
Definition: docufld.hxx:457
const DateTime & GetDateTime() const
Definition: docufld.hxx:484
OUString m_sInitials
Initials of the author.
Definition: docufld.hxx:452
OUString m_sText
Definition: docufld.hxx:450
sal_uInt32 GetParentId() const
Definition: docufld.hxx:489
const OutlinerParaObject * GetTextObject() const
Definition: docufld.hxx:506
sal_uInt32 m_nParentId
Definition: docufld.hxx:459
SwPostItField(const SwPostItField &)=delete
bool m_bResolved
Definition: docufld.hxx:455
static sal_uInt32 s_nLastPostItId
Definition: docufld.hxx:463
Date GetDate() const
Definition: docufld.hxx:485
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:486
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:637
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:2226
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
overwritten to update all RefPageGet fields
Definition: docufld.cxx:2233
sal_Int16 m_nNumberingType
Definition: docufld.hxx:626
SwRefPageGetFieldType(SwDoc &rDoc)
Definition: docufld.cxx:2221
bool MakeSetList(SetGetExpFields &rTmpLst, SwRootFrame const *pLayout)
Definition: docufld.cxx:2278
void UpdateField(SwTextField const *pTextField, SetGetExpFields const &rSetList, SwRootFrame const *pLayout)
Definition: docufld.cxx:2324
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt16 nWhich) const override
Definition: docufld.cxx:2474
void ChangeExpansion(const SwFrame &rFrame, const SwTextField *pField)
Definition: docufld.cxx:2413
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt16 nWhich) override
Definition: docufld.cxx:2490
OUString m_sText
Definition: docufld.hxx:643
virtual std::unique_ptr< SwField > Copy() const override
Definition: docufld.cxx:2404
virtual OUString ExpandImpl(SwRootFrame const *pLayout) const override
Definition: docufld.cxx:2399
void SetText(const OUString &rText, SwRootFrame const *pLayout)
Definition: docufld.cxx:2386
OUString m_sTextRLHidden
hidden redlines
Definition: docufld.hxx:644
SwRefPageGetField(SwRefPageGetFieldType *, sal_uInt32 nFormat)
Definition: docufld.cxx:2380
virtual void UpdateFields() override
Definition: docufld.hxx:592
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
noop, there is nothing to update!
Definition: docufld.cxx:2155
virtual std::unique_ptr< SwFieldType > Copy() const override
Definition: docufld.cxx:2149
void SetOffset(short nOff)
Definition: docufld.hxx:617
bool IsOn() const
Definition: docufld.hxx:614
short GetOffset() const
Definition: docufld.hxx:616
The root element of a Writer document layout.
Definition: rootfrm.hxx:85
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:731
bool m_bCodeURL
Code contains URL of a script.
Definition: docufld.hxx:713
void SetCodeURL(bool bURL)
Definition: docufld.hxx:732
OUString m_sCode
Code as text.
Definition: docufld.hxx:710
OUString m_sType
Type of Code (Java/VBScript/...)
Definition: docufld.hxx:709
Fields containing values that have to be formatted via number formatter.
Definition: fldbas.hxx:419
sal_Int64 GetTime() const
struct _xmlTextWriter * xmlTextWriterPtr
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:98
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