20#include <config_features.h>
21#include <config_fuzzers.h>
29#include <osl/diagnose.h>
45#include <com/sun/star/beans/XPropertySet.hpp>
46#include <com/sun/star/document/XDocumentProperties.hpp>
47#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
48#include <com/sun/star/frame/XModel.hpp>
55 , m_bDataBaseMode(false)
74 ::comphelper::getProcessComponentContext(),
75 "/org.openoffice.Office.DataAccess/Policies/Features/Writer",
79#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
80 bool bDatabaseFields =
true;
82 OUString(
"DatabaseFields")) >>= bDatabaseFields;
118 SfxCallMode::SYNCHRON|SfxCallMode::RECORD);
131 if (aWinState.isEmpty())
139 if (rID ==
"docinfo" && pDocSh)
141 mxInputItemSet = std::make_unique<SfxItemSetFixed<FN_FIELD_DIALOG_DOC_PROPS, FN_FIELD_DIALOG_DOC_PROPS>>( pDocSh->
GetPool() );
143 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
144 pDocSh->
GetModel(), uno::UNO_QUERY_THROW);
145 uno::Reference<document::XDocumentProperties> xDocProps
146 = xDPS->getDocumentProperties();
147 uno::Reference< beans::XPropertySet > xUDProps(
148 xDocProps->getUserDefinedProperties(),
149 uno::UNO_QUERY_THROW);
160 if (GetOKButton().get_sensitive())
162 SfxTabPage* pPage = GetTabPage(GetCurPageId());
166 GetOKButton().grab_focus();
267#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
273 static_cast<SwFieldDBPage*
>(pDBPage)->ActivateMailMergeAddress();
291#if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
292 if (rId !=
"database")
300 while(pViewShell && &pViewShell->
GetViewFrame() != pViewFrame)
Reference< XExecutableDialog > m_xDialog
SfxDispatcher * GetDispatcher() const
virtual void EndDialog(int nResponse)
SfxViewFrame * GetFrame() const
css::uno::Reference< css::frame::XModel3 > GetModel() const
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
SfxItemPool & GetPool() const
SfxDispatcher * GetDispatcher() const
SfxTabPage * GetTabPage(std::u16string_view rPageId) const
void AddTabPage(const OUString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
weld::Button & GetCancelButton() const
void RemoveTabPage(const OUString &rName)
virtual weld::Button & GetOKButton() const override
void ShowPage(const OUString &rName)
virtual bool FillItemSet(SfxItemSet *)
static SAL_WARN_UNUSED_RESULT SfxViewFrame * Current()
SfxViewFrame & GetViewFrame() const
static SAL_WARN_UNUSED_RESULT SfxViewShell * GetNext(const SfxViewShell &rPrev, bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
static SAL_WARN_UNUSED_RESULT SfxViewShell * GetFirst(bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
void SetOldDocShell(SwDocShell *pDcSh)
bool IsReadOnlyAvailable() const
SwCursor * GetCursor(bool bMakeTableCursor=true) const
Return pointer to the current shell cursor.
static bool PosInsideInputField(const SwPosition &rPos)
bool HasReadonlySel(bool isReplace=false) const
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
virtual void Close() override
void EnableInsert(bool bEnable)
void ActivateDatabasePage()
SwFieldDlg(SfxBindings *pB, SwChildWinWrapper *pCW, weld::Window *pParent)
std::unique_ptr< SfxItemSet > mxInputItemSet
virtual void PageCreated(const OUString &rId, SfxTabPage &rPage) override
virtual ~SwFieldDlg() override
SfxBindings * m_pBindings
virtual void EndDialog(int nResponse) override
virtual SfxItemSet * CreateInputItemSet(const OUString &rId) override
void ReInitTabPage(std::u16string_view rPageId, bool bOnlyActivate=false)
void Initialize(SfxChildWinInfo const *pInfo)
virtual void Activate() override
SwChildWinWrapper * m_pChildWin
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)
void EditNewField(bool bOnlyActivate=false)
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)
const SwPosition * GetPoint() const
SwWrtShell & GetWrtShell() const
Used by the UI to modify the document model.
css::uno::Any getNodeValue(const OUString &_rPath) const noexcept
static OConfigurationTreeRoot createWithComponentContext(const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const OUString &_rPath, sal_Int32 _nDepth=-1, CREATION_MODE _eMode=CM_UPDATABLE)
#define FN_FIELD_DIALOG_DOC_PROPS
#define FN_INSERT_FIELD_DATA_ONLY
IMPL_LINK_NOARG(SwFieldDlg, OKHdl, weld::Button &, void)
#define LINK(Instance, Class, Member)
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)