44 const OString& rID,
const SfxItemSet *pAttrSet)
45 :
SfxTabPage(pPage, pController, rUIXMLDescription, rID, pAttrSet)
46 , m_pCurField(nullptr)
47 , m_pWrtShell(nullptr)
52 , m_bFieldDlgHtmlMode(false)
54 , m_bFirstHTMLInit(true)
116 const OUString& rPar2, sal_uInt32 nFormatId,
124 SwInsertField_Data aData(nTypeId, nSubType, rPar1, rPar2, nFormatId,
nullptr, cSeparator, bIsAutomaticLanguage );
129 uno::Reference< frame::XDispatchRecorder > xRecorder =
131 if ( xRecorder.is() )
147 (FN_PARAM_1,rPar1.getToken(0,
DB_DELIM, nIdx)));
149 (FN_PARAM_3,rPar1.getToken(0,
DB_DELIM, nIdx).toInt32()));
151 (FN_PARAM_2,rPar1.getToken(0,
DB_DELIM, nIdx)));
157 (FN_PARAM_3, OUString(cSeparator)));
161 aReq.AppendItem(
SfxStringItem(FN_PARAM_FIELD_CONTENT, rPar2));
171 OUString sPar1(rPar1);
172 OUString sPar2(rPar2);
192 sPar1 = rPar1.copy(nPos);
205 OUString sColumn = rPar1.getToken(0,
DB_DELIM, nIdx);
207 auto pOldType =
static_cast<SwDBFieldType*
>(pTmpField->GetTyp());
209 if(
auto pFormatField = pOldType->FindFormatForField(
m_pCurField))
211 pFormatField->RegisterToFieldType(*pType);
212 pTmpField->ChgTyp(pType);
220 pTyp->
SetOutlineLvl( static_cast< sal_uInt8 >(nSubType & 0xff));
231 !(pTmpField->GetSubType() &
INP_TXT))
253 pTmpField->SetSubType(nSubType);
254 pTmpField->SetAutomaticLanguage(bIsAutomaticLanguage);
320 if (pDlg->GetCurTabPage() ==
this)
321 pDlg->EnableInsert(bEnable);
SwFieldType * GetFieldType(SwFieldIds nResId, size_t nField=0) const
SfxViewFrame * GetViewFrame() const
void SetDelimiter(const OUString &s)
void EvalExpFields(SwWrtShell *pSh)
void RestorePos(weld::TreeView &rLst1)
void SetUndoNoResetModified()
void SetPromptText(const OUString &rStr)
void SetOutlineLvl(sal_uInt8 n)
SwWrtShell * GetActiveWrtShell()
void UpdateCurField(sal_uInt32 nFormat, const OUString &rPar1, const OUString &rPar2, std::unique_ptr< SwField > _pField=nullptr)
void SetWrtShell(SwWrtShell *pShell)
std::unique_ptr< SwField > CopyField() const
#define FN_PARAM_FIELD_FORMAT
static SfxObjectShell * Current()
sal_Int32 m_nSelectionSel
bool InsertField(const SwInsertField_Data &rData)
void EnableInsert(bool bEnable)
Used by the UI to modify the document model.
virtual OUString get_selected_text() const =0
#define FN_PARAM_FIELD_SUBTYPE
virtual weld::Button & GetOKButton() const =0
virtual int n_children() const =0
virtual void Reset(const SfxItemSet *)
constexpr OUStringLiteral aData
const SwDocInfoSubType DI_CUSTOM
virtual ~SwFieldPage() override
void EnableInsert(bool bEnable)
SwFieldType * InsertFieldType(const SwFieldType &)
insert field type
void SavePos(const weld::TreeView &rLst1)
SfxBindings & GetBindings()
SwFieldTypesEnum
List of FieldTypes at UI.
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
void InsertField(SwFieldTypesEnum nTypeId, sal_uInt16 nSubType, const OUString &rPar1, const OUString &rPar2, sal_uInt32 nFormatId, sal_Unicode cDelim= ' ', bool bIsAutomaticLanguage=true)
#define FN_INSERT_DBFIELD
OUString m_aLstStrArr[coLBCount]
SwFieldPage(weld::Container *pPage, weld::DialogController *pController, const OUString &rUIXMLDescription, const OString &rID, const SfxItemSet *pAttrSet)
virtual int find_text(const OUString &rText) const =0
void EditNewField(bool bOnlyActivate=false)
virtual void select(int pos)=0
const SwGetSetExpType GSE_SEQ
Sequence.
const css::uno::Reference< css::frame::XDispatchRecorder > & GetRecorder() const
SwWrtShell * GetWrtShellPtr() const
IMPL_LINK(SwFieldPage, TreeViewInsertHdl, weld::TreeView &, rBox, bool)
virtual void Activate() override
void SetWrtShell(SwWrtShell *m_pWrtShell)
#define FN_PARAM_FIELD_TYPE
SfxOkDialogController * GetDialogController() const
void SetName(const OUString &rName)
IMPL_LINK_NOARG(SwFieldPage, NumFormatHdl, weld::TreeView &, bool)
void AppendItem(const SfxPoolItem &)
virtual OUString GetPar2() const override
Query formula.
void StartAllAction()
For all views of this document.
void InsertHdl(weld::Widget *)