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)
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();
243 OSL_ENSURE(pView,
"no view found");
259 #if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
265 static_cast<SwFieldDBPage*
>(pDBPage)->ActivateMailMergeAddress();
283 #if HAVE_FEATURE_DBCONNECTIVITY && !ENABLE_FUZZERS
284 if (rId !=
"database")
292 while(pViewShell && pViewShell->
GetViewFrame() != pViewFrame)
297 static_cast<SwFieldDBPage&
>(rPage).SetWrtShell(static_cast<SwView*>(pViewShell)->GetWrtShell());
SfxViewFrame * GetViewFrame() const
#define LINK(Instance, Class, Member)
virtual SfxItemSet * CreateInputItemSet(const OString &rId) override
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
SwChildWinWrapper * m_pChildWin
virtual void Close() override
SfxDispatcher * GetDispatcher()
weld::Button & GetCancelButton() const
css::uno::Reference< css::frame::XModel3 > GetModel() const
void RemoveTabPage(const OString &rName)
static SfxObjectShell * Current()
SwWrtShell & GetWrtShell() const
Used by the UI to modify the document model.
virtual bool FillItemSet(SfxItemSet *)
static OConfigurationTreeRoot createWithComponentContext(const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const OUString &_rPath, sal_Int32 _nDepth=-1, CREATION_MODE _eMode=CM_UPDATABLE)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
static SfxViewShell * GetNext(const SfxViewShell &rPrev, bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
virtual void EndDialog(int nResponse) override
SfxItemPool & GetPool() const
#define FN_INSERT_FIELD_DATA_ONLY
void EnableInsert(bool bEnable)
SfxBindings * m_pBindings
IMPL_LINK_NOARG(SwFieldDlg, OKHdl, weld::Button &, void)
void ShowPage(const OString &rName)
css::uno::Any getNodeValue(const OUString &_rPath) const noexcept
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
bool HasReadonlySel() const
static SfxViewShell * GetFirst(bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
void SetOldDocShell(SwDocShell *pDcSh)
void EditNewField(bool bOnlyActivate=false)
bool IsReadOnlyAvailable() const
void Initialize(SfxChildWinInfo const *pInfo)
static SfxViewFrame * Current()
std::unique_ptr< SfxItemSet > mxInputItemSet
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
SfxViewFrame * GetFrame() const
void AddTabPage(const OString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
Reference< XExecutableDialog > m_xDialog
virtual void EndDialog(int nResponse)
Reference< XComponentContext > getProcessComponentContext()
SwFieldDlg(SfxBindings *pB, SwChildWinWrapper *pCW, weld::Window *pParent)
virtual weld::Button & GetOKButton() const override
void ReInitTabPage(std::string_view rPageId, bool bOnlyActivate=false)
SfxDispatcher * GetDispatcher() const
virtual ~SwFieldDlg() override
SfxTabPage * GetTabPage(std::string_view rPageId) const
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
virtual void PageCreated(const OString &rId, SfxTabPage &rPage) override
void ActivateDatabasePage()
virtual void Activate() override
bool m_bDetectedRangeSegmentation false
#define FN_FIELD_DIALOG_DOC_PROPS