LibreOffice Module sw (master) 1
|
Fieldmark representing a date form field. More...
#include <bookmark.hxx>
Public Member Functions | |
DateFieldmark (const SwPaM &rPaM) | |
~DateFieldmark () override | |
void | InitDoc (SwDoc &io_rDoc, sw::mark::InsertMode eMode, SwPosition const *pSepPos) override |
void | ReleaseDoc (SwDoc &rDoc) override |
void | ShowButton (SwEditWin *pEditWin) override |
void | SetPortionPaintAreaStart (const SwRect &rPortionPaintArea) |
void | SetPortionPaintAreaEnd (const SwRect &rPortionPaintArea) |
OUString | GetContent () const override |
void | ReplaceContent (const OUString &sNewContent) override |
std::pair< bool, double > | GetCurrentDate () const override |
void | SetCurrentDate (double fDate) override |
OUString | GetDateInStandardDateFormat (double fDate) const override |
virtual OUString | GetContent () const override=0 |
virtual void | ReplaceContent (const OUString &sNewContent) override=0 |
virtual std::pair< bool, double > | GetCurrentDate () const =0 |
virtual void | SetCurrentDate (double fDate)=0 |
virtual OUString | GetDateInStandardDateFormat (double fDate) const =0 |
Public Member Functions inherited from sw::mark::FieldmarkWithDropDownButton | |
FieldmarkWithDropDownButton (const SwPaM &rPaM) | |
~FieldmarkWithDropDownButton () override | |
virtual void | ShowButton (SwEditWin *pEditWin)=0 |
virtual void | RemoveButton () |
void | LaunchPopup () |
Public Member Functions inherited from sw::mark::NonTextFieldmark | |
NonTextFieldmark (const SwPaM &rPaM) | |
void | InitDoc (SwDoc &io_rDoc, sw::mark::InsertMode eMode, SwPosition const *pSepPos) override |
void | ReleaseDoc (SwDoc &rDoc) override |
Public Member Functions inherited from sw::mark::Fieldmark | |
Fieldmark (const SwPaM &rPaM) | |
OUString | GetFieldname () const override |
OUString | GetFieldHelptext () const override |
IFieldmark::parameter_map_t * | GetParameters () override |
const IFieldmark::parameter_map_t * | GetParameters () const override |
void | SetFieldname (const OUString &aFieldname) override |
void | SetFieldHelptext (const OUString &aFieldHelptext) override |
virtual void | ReleaseDoc (SwDoc &)=0 |
void | SetMarkStartPos (const SwPosition &rNewStartPos) |
void | Invalidate () override |
OUString | ToString () const override |
void | dumpAsXml (xmlTextWriterPtr pWriter) const override |
Public Member Functions inherited from sw::mark::MarkBase | |
SwPosition & | GetMarkPos () const override |
const OUString & | GetName () const override |
SwPosition & | GetOtherMarkPos () const override |
SwPosition & | GetMarkStart () const override |
SwPosition & | GetMarkEnd () const override |
bool | IsCoveringPosition (const SwPosition &rPos) const override |
bool | IsExpanded () const override |
void | SetName (const OUString &rName) |
virtual void | SetMarkPos (const SwPosition &rNewPos) |
virtual void | SetOtherMarkPos (const SwPosition &rNewPos) |
virtual void | ClearOtherMarkPos () |
virtual auto | InvalidateFrames () -> void |
OUString | ToString () const override |
void | dumpAsXml (xmlTextWriterPtr pWriter) const override |
void | Swap () |
virtual void | InitDoc (SwDoc &, sw::mark::InsertMode, SwPosition const *) |
~MarkBase () override | |
const unotools::WeakReference< SwXBookmark > & | GetXBookmark () const |
void | SetXBookmark (rtl::Reference< SwXBookmark > const &xBkmk) |
virtual const SwPosition & | GetMarkPos () const =0 |
virtual const SwPosition & | GetOtherMarkPos () const =0 |
virtual const SwPosition & | GetMarkStart () const =0 |
virtual const SwPosition & | GetMarkEnd () const =0 |
virtual const OUString & | GetName () const =0 |
virtual bool | IsExpanded () const =0 |
virtual bool | IsCoveringPosition (const SwPosition &rPos) const =0 |
virtual OUString | ToString () const =0 |
virtual void | dumpAsXml (xmlTextWriterPtr pWriter) const =0 |
Private Member Functions | |
OUString | GetDateInCurrentDateFormat (double fDate) const |
std::pair< bool, double > | ParseCurrentDateParam () const |
void | InvalidateCurrentDateParam () |
Private Attributes | |
SvNumberFormatter * | m_pNumberFormatter |
sw::DocumentContentOperationsManager * | m_pDocumentContentOperationsManager |
SwRect | m_aPaintAreaStart |
SwRect | m_aPaintAreaEnd |
Additional Inherited Members | |
Protected Member Functions inherited from sw::mark::IDateFieldmark | |
IDateFieldmark ()=default | |
Protected Member Functions inherited from sw::mark::MarkBase | |
void | SwClientNotify (const SwModify &, const SfxHint &) override |
MarkBase (const SwPaM &rPaM, OUString aName) | |
Protected Member Functions inherited from sw::mark::IMark | |
IMark ()=default | |
Static Protected Member Functions inherited from sw::mark::MarkBase | |
static OUString | GenerateNewName (std::u16string_view rPrefix) |
Protected Attributes inherited from sw::mark::FieldmarkWithDropDownButton | |
VclPtr< FormFieldButton > | m_pButton |
Protected Attributes inherited from sw::mark::MarkBase | |
std::optional< SwPosition > | m_oPos1 |
std::optional< SwPosition > | m_oPos2 |
OUString | m_aName |
unotools::WeakReference< SwXBookmark > | m_wXBookmark |
Fieldmark representing a date form field.
TODO: this was an SDT in DOCX, which is modelled suboptimally here as a fieldmark; as it cannot contain paragraph breaks, must be well-formed XML element, and does not have field separator, it should be a nesting text attribute similar to SwTextMeta.
Definition at line 326 of file core/inc/bookmark.hxx.
sw::mark::DateFieldmark::DateFieldmark | ( | const SwPaM & | rPaM | ) |
Definition at line 1036 of file core/crsr/bookmark.cxx.
|
override |
Definition at line 1043 of file core/crsr/bookmark.cxx.
|
overridevirtual |
Implements sw::mark::IDateFieldmark.
Definition at line 1118 of file core/crsr/bookmark.cxx.
References sw::mark::FindFieldSep(), SwPosition::GetContentIndex(), getLength(), sw::mark::MarkBase::GetMarkEnd(), SwPosition::GetNode(), SwTextNode::GetText(), and SwNode::GetTextNode().
Referenced by GetCurrentDate(), and InvalidateCurrentDateParam().
|
overridevirtual |
Implements sw::mark::IDateFieldmark.
Definition at line 1157 of file core/crsr/bookmark.cxx.
References GetContent(), SvNumberFormatter::GetEntryKey(), sw::mark::Fieldmark::GetParameters(), SvNumberFormatter::IsNumberFormat(), m_pNumberFormatter, nType, NUMBERFORMAT_ENTRY_NOT_FOUND, ODF_FORMDATE_DATEFORMAT, ODF_FORMDATE_DATEFORMAT_LANGUAGE, ParseCurrentDateParam(), and SvNumberFormatter::PutEntry().
Referenced by DateFormFieldButton::LaunchPopup().
|
private |
Definition at line 1273 of file core/crsr/bookmark.cxx.
References SvNumberFormatter::GetEntryKey(), SvNumberFormatter::GetOutputString(), sw::mark::Fieldmark::GetParameters(), m_pNumberFormatter, nType, NUMBERFORMAT_ENTRY_NOT_FOUND, ODF_FORMDATE_DATEFORMAT, ODF_FORMDATE_DATEFORMAT_LANGUAGE, and SvNumberFormatter::PutEntry().
Referenced by InvalidateCurrentDateParam(), and SetCurrentDate().
|
overridevirtual |
Implements sw::mark::IDateFieldmark.
Definition at line 1213 of file core/crsr/bookmark.cxx.
References SvNumberFormatter::GetEntryKey(), SvNumberFormatter::GetOutputString(), m_pNumberFormatter, nType, NUMBERFORMAT_ENTRY_NOT_FOUND, ODF_FORMDATE_CURRENTDATE_FORMAT, ODF_FORMDATE_CURRENTDATE_LANGUAGE, and SvNumberFormatter::PutEntry().
Referenced by SetCurrentDate().
|
overridevirtual |
Reimplemented from sw::mark::NonTextFieldmark.
Definition at line 1047 of file core/crsr/bookmark.cxx.
References CH_TXT_ATR_FIELDEND, CH_TXT_ATR_FIELDSTART, eMode, SwDoc::GetDocumentContentOperationsManager(), SwDoc::GetNumberFormatter(), m_pDocumentContentOperationsManager, m_pNumberFormatter, and sw::mark::New.
|
private |
Definition at line 1314 of file core/crsr/bookmark.cxx.
References GetContent(), GetDateInCurrentDateFormat(), sw::mark::Fieldmark::GetParameters(), ODF_FORMDATE_CURRENTDATE, and ParseCurrentDateParam().
Referenced by SetPortionPaintAreaEnd(), and SetPortionPaintAreaStart().
|
private |
Definition at line 1237 of file core/crsr/bookmark.cxx.
References SvNumberFormatter::GetEntryKey(), sw::mark::Fieldmark::GetParameters(), SvNumberFormatter::IsNumberFormat(), m_pNumberFormatter, nType, NUMBERFORMAT_ENTRY_NOT_FOUND, ODF_FORMDATE_CURRENTDATE, ODF_FORMDATE_CURRENTDATE_FORMAT, ODF_FORMDATE_CURRENTDATE_LANGUAGE, and SvNumberFormatter::PutEntry().
Referenced by GetCurrentDate(), and InvalidateCurrentDateParam().
|
overridevirtual |
Reimplemented from sw::mark::NonTextFieldmark.
Definition at line 1062 of file core/crsr/bookmark.cxx.
References CH_TXT_ATR_FIELDEND, CH_TXT_ATR_FIELDSTART, SwDoc::GetIDocumentUndoRedo(), sw::mark::MarkBase::GetMarkPos(), sw::mark::MarkBase::GetOtherMarkPos(), and sw::UpdateFramesForRemoveDeleteRedline().
|
overridevirtual |
Implements sw::mark::IDateFieldmark.
Definition at line 1132 of file core/crsr/bookmark.cxx.
References sw::mark::FindFieldSep(), SwPosition::GetContentIndex(), getLength(), sw::mark::MarkBase::GetMarkEnd(), sw::mark::MarkBase::GetMarkStart(), SwPosition::GetNode(), GetNode(), SwTextNode::GetText(), SwNode::GetTextNode(), sw::DocumentContentOperationsManager::InsertString(), m_pDocumentContentOperationsManager, and sw::DocumentContentOperationsManager::ReplaceRange().
Referenced by SetCurrentDate().
|
overridevirtual |
Implements sw::mark::IDateFieldmark.
Definition at line 1203 of file core/crsr/bookmark.cxx.
References GetDateInCurrentDateFormat(), GetDateInStandardDateFormat(), sw::mark::Fieldmark::GetParameters(), ODF_FORMDATE_CURRENTDATE, and ReplaceContent().
void sw::mark::DateFieldmark::SetPortionPaintAreaEnd | ( | const SwRect & | rPortionPaintArea | ) |
Definition at line 1098 of file core/crsr/bookmark.cxx.
References SwRect::BottomRight(), InvalidateCurrentDateParam(), SwRect::IsEmpty(), m_aPaintAreaEnd, m_aPaintAreaStart, sw::mark::FieldmarkWithDropDownButton::m_pButton, and SwRect::TopLeft().
Referenced by SwFieldFormDatePortion::Paint().
void sw::mark::DateFieldmark::SetPortionPaintAreaStart | ( | const SwRect & | rPortionPaintArea | ) |
Definition at line 1089 of file core/crsr/bookmark.cxx.
References InvalidateCurrentDateParam(), SwRect::IsEmpty(), and m_aPaintAreaStart.
Referenced by SwFieldFormDatePortion::Paint().
|
overridevirtual |
Implements sw::mark::FieldmarkWithDropDownButton.
Definition at line 1077 of file core/crsr/bookmark.cxx.
References SwRect::BottomRight(), VclPtr< class reference_type >::Create(), m_aPaintAreaEnd, m_aPaintAreaStart, sw::mark::FieldmarkWithDropDownButton::m_pButton, m_pNumberFormatter, and SwRect::TopLeft().
|
private |
Definition at line 357 of file core/inc/bookmark.hxx.
Referenced by SetPortionPaintAreaEnd(), and ShowButton().
|
private |
Definition at line 356 of file core/inc/bookmark.hxx.
Referenced by SetPortionPaintAreaEnd(), SetPortionPaintAreaStart(), and ShowButton().
|
private |
Definition at line 355 of file core/inc/bookmark.hxx.
Referenced by InitDoc(), and ReplaceContent().
|
private |
Definition at line 354 of file core/inc/bookmark.hxx.
Referenced by GetCurrentDate(), GetDateInCurrentDateFormat(), GetDateInStandardDateFormat(), InitDoc(), ParseCurrentDateParam(), and ShowButton().