LibreOffice Module sw (master) 1
|
Fieldmark representing a drop-down form field. More...
#include <bookmark.hxx>
Public Member Functions | |
DropDownFieldmark (const SwPaM &rPaM, const OUString &rName) | |
~DropDownFieldmark () override | |
void | ShowButton (SwEditWin *pEditWin) override |
void | RemoveButton () override |
OUString | GetContent (sal_Int32 *pIndex) const override |
GetContent. More... | |
OUString | GetContent () const override |
void | AddContent (const OUString &rText, sal_Int32 *pIndex=nullptr) override |
AddContent : INSERTS a new choice. More... | |
void | DelContent (sal_Int32 nDelIndex=-1) override |
Remove everything if the given index is negative, else remove the given index (if valid). More... | |
void | ReplaceContent (const OUString *pText, sal_Int32 *pIndex) override |
ReplaceContent : changes the list result index or renames the existing choices. More... | |
void | ReplaceContent (const OUString &sNewContent) override |
void | SetPortionPaintArea (const SwRect &rPortionPaintArea) |
void | SendLOKShowMessage (const SfxViewShell *pViewShell) |
virtual OUString | GetContent (sal_Int32 *pIndex) const =0 |
virtual OUString | GetContent () const override=0 |
virtual void | AddContent (const OUString &rText, sal_Int32 *pIndex=nullptr)=0 |
virtual void | DelContent (sal_Int32 nDelIndex=-1)=0 |
virtual void | ReplaceContent (const OUString *pText, sal_Int32 *pIndex)=0 |
virtual void | ReplaceContent (const OUString &sNewContent) override=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 |
Static Public Member Functions | |
static void | SendLOKHideMessage (const SfxViewShell *pViewShell) |
Private Attributes | |
SwRect | m_aPortionPaintArea |
Additional Inherited Members | |
Protected Member Functions inherited from sw::mark::IDropdownFieldmark | |
IDropdownFieldmark ()=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 drop-down form field.
Definition at line 294 of file core/inc/bookmark.hxx.
sw::mark::DropDownFieldmark::DropDownFieldmark | ( | const SwPaM & | rPaM, |
const OUString & | rName | ||
) |
Definition at line 771 of file core/crsr/bookmark.cxx.
References sw::mark::MarkBase::m_aName.
|
override |
Definition at line 778 of file core/crsr/bookmark.cxx.
|
overridevirtual |
AddContent : INSERTS a new choice.
rText | The choice to add to the list choices. |
pIndex | [optional] [in] If pIndex is null or invalid, append to the end of the list. [out] Modified to point to the position of the choice if it already exists. |
Implements sw::mark::IDropdownFieldmark.
Definition at line 840 of file core/crsr/bookmark.cxx.
References aSeq, comphelper::containerToSequence(), comphelper::findValue(), sw::mark::Fieldmark::GetParameters(), sw::mark::Fieldmark::Invalidate(), min(), ODF_FORMDROPDOWN_LISTENTRY, and ODF_FORMDROPDOWN_RESULT.
|
overridevirtual |
Remove everything if the given index is negative, else remove the given index (if valid).
If deleting the currently selected choice, reset the selection to the first choice.
Implements sw::mark::IDropdownFieldmark.
Definition at line 943 of file core/crsr/bookmark.cxx.
References aSeq, sw::mark::Fieldmark::GetParameters(), sw::mark::Fieldmark::Invalidate(), ODF_FORMDROPDOWN_LISTENTRY, ODF_FORMDROPDOWN_RESULT, and comphelper::removeElementAt().
|
overridevirtual |
Implements sw::mark::IDropdownFieldmark.
Definition at line 828 of file core/crsr/bookmark.cxx.
References GetContent().
Referenced by GetContent().
|
overridevirtual |
GetContent.
pIndex | The zero-based index to retrieve [in] if pIndex is null or negative, return the listbox's chosen result, else return the indicated entry (or last entry for invalid choice). [out] the index of the returned result or -1 if error |
Implements sw::mark::IDropdownFieldmark.
Definition at line 804 of file core/crsr/bookmark.cxx.
References aSeq, sw::mark::Fieldmark::GetParameters(), min(), nIndex, ODF_FORMDROPDOWN_LISTENTRY, and ODF_FORMDROPDOWN_RESULT.
|
overridevirtual |
Reimplemented from sw::mark::FieldmarkWithDropDownButton.
Definition at line 793 of file core/crsr/bookmark.cxx.
References sw::mark::FieldmarkWithDropDownButton::RemoveButton().
|
overridevirtual |
Implements sw::mark::IDropdownFieldmark.
Definition at line 934 of file core/crsr/bookmark.cxx.
References ReplaceContent().
|
overridevirtual |
ReplaceContent : changes the list result index or renames the existing choices.
pText | [in] If pIndex is null, change the list result index to this provided choice (but do nothing if pText is an invalid choice) else rename that entry. |
pIndex | [in] If pText is null, change the list result index to this provided Index (or the last position if it is an invalid choice) else rename this entry (doing nothing for invalid indexes). [out] If pIndex is invalid, it is modified to use the last position. |
This function allows duplicate entries - which is also allowed in MS Word.
Implements sw::mark::IDropdownFieldmark.
Definition at line 893 of file core/crsr/bookmark.cxx.
References aSeq, comphelper::containerToSequence(), comphelper::findValue(), sw::mark::Fieldmark::GetParameters(), sw::mark::Fieldmark::Invalidate(), ODF_FORMDROPDOWN_LISTENTRY, and ODF_FORMDROPDOWN_RESULT.
Referenced by ReplaceContent().
|
static |
Definition at line 1030 of file core/crsr/bookmark.cxx.
References SfxViewShell::libreOfficeKitViewCallback().
Referenced by sw::mark::MarkManager::LOKUpdateActiveField().
void sw::mark::DropDownFieldmark::SendLOKShowMessage | ( | const SfxViewShell * | pViewShell | ) |
Definition at line 985 of file core/crsr/bookmark.cxx.
References sw::mark::Fieldmark::GetParameters(), comphelper::LibreOfficeKit::isActive(), SwRect::IsEmpty(), SfxViewShell::isLOKMobilePhone(), SfxViewShell::libreOfficeKitViewCallback(), m_aPortionPaintArea, ODF_FORMDROPDOWN_LISTENTRY, ODF_FORMDROPDOWN_RESULT, OUStringToOString(), SwRect::SVRect(), SwResId(), and tools::Rectangle::toString().
void sw::mark::DropDownFieldmark::SetPortionPaintArea | ( | const SwRect & | rPortionPaintArea | ) |
Definition at line 975 of file core/crsr/bookmark.cxx.
References m_aPortionPaintArea, and sw::mark::FieldmarkWithDropDownButton::m_pButton.
Referenced by SwFieldFormDropDownPortion::Paint().
|
overridevirtual |
Implements sw::mark::FieldmarkWithDropDownButton.
Definition at line 782 of file core/crsr/bookmark.cxx.
References VclPtr< class reference_type >::Create(), m_aPortionPaintArea, and sw::mark::FieldmarkWithDropDownButton::m_pButton.
|
private |
Definition at line 318 of file core/inc/bookmark.hxx.
Referenced by SendLOKShowMessage(), SetPortionPaintArea(), and ShowButton().