20#include <config_features.h>
21#include <config_fuzzers.h>
41#include <com/sun/star/beans/XPropertySet.hpp>
42#include <com/sun/star/document/XDocumentProperties.hpp>
43#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
44#include <com/sun/star/frame/XModel.hpp>
68 assert(!
"what input field is this");
87 bool bSelectionFailed = pCurField != pRealCurField;
102 "modules/swriter/ui/editfielddialog.ui",
"EditFieldDialog")
103 , m_pSh(rVw.GetWrtShellPtr())
104 , m_xPrevBT(m_xBuilder->weld_button(
"prev"))
105 , m_xNextBT(m_xBuilder->weld_button(
"next"))
106 , m_xAddressBT(m_xBuilder->weld_button(
"edit"))
150 bool bMove = rMgr.
GoNext();
176 std::unique_ptr<SfxTabPage> xTabPage;
194 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
195 pDocSh->GetModel(), uno::UNO_QUERY_THROW);
196 uno::Reference<document::XDocumentProperties> xDocProps
197 = xDPS->getDocumentProperties();
198 uno::Reference< beans::XPropertySet > xUDProps(
199 xDocProps->getUserDefinedProperties(),
200 uno::UNO_QUERY_THROW);
205#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
246 if (GetOKButton().get_sensitive())
264 bool bNext = &rButton == m_xNextBT.get();
266 m_pSh->EnterStdMode();
273 if (GetOKButton().get_sensitive())
279 pOldTyp = pCurField->
GetTyp();
292 EnsureSelection(pCurField, rMgr);
307 case EU_FIRSTNAME: nEditPos = EditPosition::FIRSTNAME;
break;
308 case EU_NAME: nEditPos = EditPosition::LASTNAME;
break;
309 case EU_SHORTCUT: nEditPos = EditPosition::SHORTNAME;
break;
310 case EU_COMPANY: nEditPos = EditPosition::COMPANY;
break;
311 case EU_STREET: nEditPos = EditPosition::STREET;
break;
312 case EU_TITLE: nEditPos = EditPosition::TITLE;
break;
313 case EU_POSITION: nEditPos = EditPosition::POSITION;
break;
316 case EU_FAX: nEditPos = EditPosition::FAX;
break;
317 case EU_EMAIL: nEditPos = EditPosition::EMAIL;
break;
318 case EU_COUNTRY: nEditPos = EditPosition::COUNTRY;
break;
319 case EU_ZIP: nEditPos = EditPosition::PLZ;
break;
320 case EU_CITY: nEditPos = EditPosition::CITY;
break;
321 case EU_STATE: nEditPos = EditPosition::STATE;
break;
323 default: nEditPos = EditPosition::UNKNOWN;
break;
326 aSet.
Put(
SfxUInt16Item(SID_FIELD_GRABFOCUS,
static_cast<sal_uInt16
>(nEditPos)));
330 if (
RET_OK == pDlg->Execute())
332 m_pSh->UpdateOneField(*pCurField);
Reference< XExecutableDialog > m_xDialog
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
void SetTabPage(std::unique_ptr< SfxTabPage > xTabPage)
virtual weld::Button & GetOKButton() const override
weld::Container * get_content_area()
SfxTabPage * GetTabPage() const
virtual bool FillItemSet(SfxItemSet *)
virtual VclPtr< SfxAbstractDialog > CreateSwAddressAbstractDlg(weld::Window *pParent, const SfxItemSet &rSet)=0
bool IsReadOnlyAvailable() const
void NormalizePam(bool bPointFirst=true)
Ensure point and mark of the current PaM are in a specific order.
bool CursorInsideInputField() const
SwPaM * CreateCursor()
delete the current cursor and make the following into the current
void EndAction(const bool bIdleEnd=false)
SwShellCursor * getShellCursor(bool bBlock)
Delivers the current shell cursor.
void DestroyCursor()
transform TableCursor to normal cursor, nullify Tablemode
bool HasReadonlySel(bool isReplace=false) const
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
virtual short run() override
virtual ~SwFieldEditDlg() override
std::unique_ptr< weld::Button > m_xPrevBT
SwFieldEditDlg(SwView const &rVw)
std::unique_ptr< weld::Button > m_xAddressBT
SfxTabPage * CreatePage(sal_uInt16 nGroup)
void EnableInsert(bool bEnable)
std::unique_ptr< weld::Button > m_xNextBT
void EnsureSelection(SwField *pCurField, SwFieldMgr &rMgr)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
bool GoNextPrev(bool bNext=true, SwFieldType *pTyp=nullptr)
static sal_uInt16 GetGroup(SwFieldTypesEnum nTypeId, sal_uInt16 nSubType)
void EditNewField(bool bOnlyActivate=false)
SwFieldMgr & GetFieldMgr()
virtual sal_uInt16 GetGroup()=0
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Instances of SwFields and those derived from it occur 0 to n times.
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Base class of all fields.
SwFieldTypesEnum GetTypeId() const
virtual sal_uInt16 GetSubType() const
SwFieldType * GetTyp() const
const SwPosition * GetPoint() const
SwFormatField * GetFormatField()
Represents the current text cursor of one opened edit window.
static void SetCareDialog(const std::shared_ptr< weld::Window > &rNew)
bool Right(SwCursorSkipMode nMode, bool bSelect, sal_uInt16 nCount, bool bBasicCall, bool bVisual=false)
bool GotoField(const SwFormatField &rField)
bool HasSelection() const
#define FN_FIELD_DIALOG_DOC_PROPS
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
IMPL_LINK(SwFieldEditDlg, NextPrevHdl, weld::Button &, rButton, void)
IMPL_LINK_NOARG(SwFieldEditDlg, OKHdl, weld::Button &, void)
std::unique_ptr< IconChoicePage >(* CreatePage)(weld::Container *pParent, SvxHpLinkDlg *pDlg, const SfxItemSet *pAttrSet)
#define LINK(Instance, Class, Member)
SwAbstractDialogFactory & GetFactory()
Marks a position in the document model.