LibreOffice Module sw (master)  1
flddb.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <swmodule.hxx>
21 #include <view.hxx>
22 #include <wrtsh.hxx>
23 #include <globals.hrc>
24 #include <dbfld.hxx>
25 #include <fldtdlg.hxx>
26 #include <numrule.hxx>
27 #include <doc.hxx>
28 
29 #include "flddb.hxx"
30 #include <dbconfig.hxx>
31 #include <dbmgr.hxx>
32 
33 #define USER_DATA_VERSION_1 "1"
34 #define USER_DATA_VERSION USER_DATA_VERSION_1
35 
37  : SwFieldPage(pPage, pController, "modules/swriter/ui/flddbpage.ui", "FieldDbPage", pCoreSet)
38  , m_nOldFormat(0)
39  , m_nOldSubType(0)
40  , m_xTypeLB(m_xBuilder->weld_tree_view("type"))
41  , m_xDatabaseTLB(new SwDBTreeList(m_xBuilder->weld_tree_view("select")))
42  , m_xAddDBPB(m_xBuilder->weld_button("browse"))
43  , m_xCondition(m_xBuilder->weld_widget("condgroup"))
44  , m_xConditionED(new ConditionEdit(m_xBuilder->weld_entry("condition")))
45  , m_xValue(m_xBuilder->weld_widget("recgroup"))
46  , m_xValueED(m_xBuilder->weld_entry("recnumber"))
47  , m_xDBFormatRB(m_xBuilder->weld_radio_button("fromdatabasecb"))
48  , m_xNewFormatRB(m_xBuilder->weld_radio_button("userdefinedcb"))
49  , m_xNumFormatLB(new NumFormatListBox(m_xBuilder->weld_combo_box("numformat")))
50  , m_xFormatLB(m_xBuilder->weld_combo_box("format"))
51  , m_xFormat(m_xBuilder->weld_widget("formatframe"))
52 {
53  SetTypeSel(-1); //TODO
54 
55  m_xTypeLB->make_sorted();
56  m_xFormatLB->make_sorted();
57 
58  auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH;
59  auto nHeight = m_xTypeLB->get_height_rows(14);
60  m_xTypeLB->set_size_request(nWidth, nHeight);
61  m_xDatabaseTLB->set_size_request(nWidth*2, nHeight);
62 
63  m_xNumFormatLB->connect_changed(LINK(this, SwFieldDBPage, NumSelectHdl));
64  m_xDatabaseTLB->connect_changed(LINK(this, SwFieldDBPage, TreeSelectHdl));
65  m_xDatabaseTLB->connect_row_activated(LINK(this, SwFieldDBPage, TreeViewInsertHdl));
66 
67  m_xValueED->connect_changed(LINK(this, SwFieldDBPage, ModifyHdl));
68  m_xAddDBPB->connect_clicked(LINK(this, SwFieldDBPage, AddDBHdl));
69 }
70 
72 {
73  SwWrtShell* pSh = GetWrtShell();
74  if (!pSh)
75  pSh = ::GetActiveWrtShell();
76  // This would cleanup in the case of cancelled dialog
77  SwDBManager* pDbManager = pSh->GetDoc()->GetDBManager();
78  if (pDbManager)
79  pDbManager->RevokeLastRegistrations();
80 }
81 
82 // initialise TabPage
84 {
85  Init(); // general initialization
86 
87  const sal_Int32 nOldPos = m_xTypeLB->get_selected_index();
88  m_xTypeLB->freeze();
90 
91  m_xTypeLB->clear();
92 
93  if (!IsFieldEdit())
94  {
95  // initialise TypeListBox
97 
98  for(sal_uInt16 i = rRg.nStart; i < rRg.nEnd; ++i)
99  {
100  const SwFieldTypesEnum nTypeId = SwFieldMgr::GetTypeId(i);
101  m_xTypeLB->append(OUString::number(static_cast<sal_uInt16>(nTypeId)), SwFieldMgr::GetTypeStr(i));
102  }
103  }
104  else
105  {
106  const SwFieldTypesEnum nTypeId = GetCurField()->GetTypeId();
107  m_xTypeLB->append(OUString::number(static_cast<sal_uInt16>(nTypeId)),
109  }
110 
111  m_xTypeLB->thaw();
112 
113  // select old Pos
114  if (GetTypeSel() != -1)
115  m_xTypeLB->select(GetTypeSel());
116 
117  m_xFormatLB->clear();
118 
120  for( sal_uInt16 i = 0; i < nSize; ++i )
121  {
122  const sal_uInt16 nFormatId = GetFieldMgr().GetFormatId( SwFieldTypesEnum::DatabaseSetNumber, i );
123  OUString sId(OUString::number(nFormatId));
124  m_xFormatLB->append(sId, GetFieldMgr().GetFormatStr(SwFieldTypesEnum::DatabaseSetNumber, i));
125  if (SVX_NUM_ARABIC == nFormatId)
126  m_xFormatLB->set_active_id(sId);
127  }
128 
129  if (!IsFieldEdit())
130  {
131  if (nOldPos != -1)
132  m_xTypeLB->select(nOldPos);
133 
134  if (!m_sOldDBName.isEmpty())
135  {
137  }
138  else
139  {
140  SwWrtShell *pSh = GetWrtShell();
141  if(!pSh)
142  pSh = ::GetActiveWrtShell();
143  if(pSh)
144  {
145  SwDBData aTmp(pSh->GetDBData());
146  m_xDatabaseTLB->Select(aTmp.sDataSource, aTmp.sCommand, OUString());
147  }
148  }
149  }
150 
151  if( !IsRefresh() )
152  {
153  const OUString sUserData = GetUserData();
154  sal_Int32 nIdx{ 0 };
155  if (sUserData.getToken(0, ';', nIdx).equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
156  {
157  const sal_uInt16 nVal = static_cast<sal_uInt16>(sUserData.getToken(0, ';', nIdx).toInt32());
158  if (nVal != USHRT_MAX)
159  {
160  for (sal_Int32 i = 0, nEntryCount = m_xTypeLB->n_children(); i < nEntryCount; ++i)
161  {
162  if (nVal == m_xTypeLB->get_id(i).toUInt32())
163  {
164  m_xTypeLB->select(i);
165  break;
166  }
167  }
168  }
169  }
170  }
171  TypeHdl(nullptr);
172 
173  m_xTypeLB->connect_changed(LINK(this, SwFieldDBPage, TypeListBoxHdl));
174  m_xTypeLB->connect_row_activated(LINK(this, SwFieldDBPage, TreeViewInsertHdl));
175 
176  if (IsFieldEdit())
177  {
178  m_xConditionED->save_value();
179  m_xValueED->save_value();
183  }
184 }
185 
187 {
188  OUString sTableName;
189  OUString sColumnName;
190  SwDBData aData;
191  sal_Bool bIsTable;
192  aData.sDataSource = m_xDatabaseTLB->GetDBName(sTableName, sColumnName, &bIsTable);
193  aData.sCommand = sTableName;
194  aData.nCommandType = bIsTable ? 0 : 1;
195  SwWrtShell *pSh = GetWrtShell();
196  if(!pSh)
197  pSh = ::GetActiveWrtShell();
198 
199  SwDBManager* pDbManager = pSh->GetDoc()->GetDBManager();
200  if (pDbManager)
201  pDbManager->CommitLastRegistrations();
202 
203  if (aData.sDataSource.isEmpty())
204  aData = pSh->GetDBData();
205 
206  if(!aData.sDataSource.isEmpty()) // without database no new field command
207  {
208  const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
209  sal_uLong nFormat = 0;
210  sal_uInt16 nSubType = 0;
211 
212  OUString sDBName = aData.sDataSource
213  + OUStringChar(DB_DELIM)
214  + aData.sCommand
215  + OUStringChar(DB_DELIM)
216  + OUString::number(aData.nCommandType)
217  + OUStringChar(DB_DELIM);
218  if (!sColumnName.isEmpty())
219  {
220  sDBName += sColumnName + OUStringChar(DB_DELIM);
221  }
222  OUString aName = sDBName + m_xConditionED->get_text();
223 
224  switch (nTypeId)
225  {
227  nFormat = m_xNumFormatLB->GetFormat();
228  if (m_xNewFormatRB->get_sensitive() && m_xNewFormatRB->get_active())
230  aName = sDBName;
231  break;
232 
234  nFormat = m_xFormatLB->get_active_id().toUInt32();
235  break;
236  default: break;
237  }
238 
239  const OUString aVal(m_xValueED->get_text());
240  OUString sTempTableName;
241  OUString sTempColumnName;
242  OUString sTempDBName = m_xDatabaseTLB->GetDBName(sTempTableName, sTempColumnName);
243  bool bDBListBoxChanged = m_sOldDBName != sTempDBName ||
244  m_sOldTableName != sTempTableName || m_sOldColumnName != sTempColumnName;
245  if (!IsFieldEdit() ||
246  m_xConditionED->get_value_changed_from_saved() ||
247  m_xValueED->get_saved_value() != aVal ||
248  bDBListBoxChanged ||
249  m_nOldFormat != nFormat || m_nOldSubType != nSubType)
250  {
251  InsertField( nTypeId, nSubType, aName, aVal, nFormat);
252  }
253  }
254 
255  return false;
256 }
257 
258 std::unique_ptr<SfxTabPage> SwFieldDBPage::Create( weld::Container* pPage, weld::DialogController* pController,
259  const SfxItemSet *const pAttrSet )
260 {
261  return std::make_unique<SwFieldDBPage>( pPage, pController, pAttrSet );
262 }
263 
265 {
266  return GRP_DB;
267 }
268 
269 IMPL_LINK( SwFieldDBPage, TypeListBoxHdl, weld::TreeView&, rBox, void )
270 {
271  TypeHdl(&rBox);
272 }
273 
275 {
276  // save old ListBoxPos
277  const sal_Int32 nOld = GetTypeSel();
278 
279  // current ListBoxPos
280  SetTypeSel(m_xTypeLB->get_selected_index());
281 
282  if (GetTypeSel() == -1)
283  {
284  SetTypeSel(0);
285  m_xTypeLB->select(0);
286  }
287 
288  if (nOld == GetTypeSel())
289  return;
290 
291  SwWrtShell *pSh = GetWrtShell();
292  if(!pSh)
293  pSh = ::GetActiveWrtShell();
294  bool bCond = false, bSetNo = false, bFormat = false, bDBFormat = false;
295  const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
296 
297  m_xDatabaseTLB->ShowColumns(nTypeId == SwFieldTypesEnum::Database);
298 
299  if (IsFieldEdit())
300  {
301  SwDBData aData;
302  OUString sColumnName;
303  if (nTypeId == SwFieldTypesEnum::Database)
304  {
305  aData = static_cast<SwDBField*>(GetCurField())->GetDBData();
306  sColumnName = static_cast<SwDBFieldType*>(GetCurField()->GetTyp())->GetColumnName();
307  }
308  else
309  {
310  aData = static_cast<SwDBNameInfField*>(GetCurField())->GetDBData(pSh->GetDoc());
311  }
312  m_xDatabaseTLB->Select(aData.sDataSource, aData.sCommand, sColumnName);
313  }
314 
315  switch (nTypeId)
316  {
318  {
319  bFormat = true;
320  bDBFormat = true;
321  m_xNumFormatLB->show();
322  m_xFormatLB->hide();
323 
324  weld::Widget& rWidget = m_xNumFormatLB->get_widget();
325  m_xNewFormatRB->set_accessible_relation_label_for(&rWidget);
327  m_xFormatLB->set_accessible_relation_label_for(nullptr);
328 
329  if (pBox) // type was changed by user
330  m_xDBFormatRB->set_active(true);
331 
332  if (IsFieldEdit())
333  {
334  if (GetCurField()->GetFormat() != 0 && GetCurField()->GetFormat() != SAL_MAX_UINT32)
335  m_xNumFormatLB->SetDefFormat(GetCurField()->GetFormat());
336 
337  if (GetCurField()->GetSubType() & nsSwExtendedSubType::SUB_OWN_FMT)
338  m_xNewFormatRB->set_active(true);
339  else
340  m_xDBFormatRB->set_active(true);
341  }
342  break;
343  }
345  bSetNo = true;
346  [[fallthrough]];
348  bCond = true;
349  if (IsFieldEdit())
350  {
351  m_xConditionED->set_text(GetCurField()->GetPar1());
352  m_xValueED->set_text(GetCurField()->GetPar2());
353  }
354  break;
355 
357  break;
358 
360  {
361  bFormat = true;
362  m_xNewFormatRB->set_active(true);
363  m_xNumFormatLB->hide();
364  m_xFormatLB->show();
365 
366  m_xNewFormatRB->set_accessible_relation_label_for(m_xFormatLB.get());
367  m_xFormatLB->set_accessible_relation_labeled_by(m_xNewFormatRB.get());
368  weld::Widget& rWidget = m_xNumFormatLB->get_widget();
369  rWidget.set_accessible_relation_label_for(nullptr);
370 
371  if( IsFieldEdit() )
372  {
373  for (sal_Int32 nI = m_xFormatLB->get_count(); nI;)
374  {
375  if (GetCurField()->GetFormat() == m_xFormatLB->get_id(--nI).toUInt32())
376  {
377  m_xFormatLB->set_active( nI );
378  break;
379  }
380  }
381  }
382  break;
383  }
384  default: break;
385  }
386 
387  m_xCondition->set_sensitive(bCond);
388  m_xValue->set_sensitive(bSetNo);
389  if (nTypeId != SwFieldTypesEnum::Database)
390  {
391  m_xDBFormatRB->set_sensitive(bDBFormat);
392  m_xNewFormatRB->set_sensitive(bDBFormat || bFormat);
393  m_xNumFormatLB->set_sensitive(bDBFormat);
394  m_xFormatLB->set_sensitive(bFormat);
395  }
396  m_xFormat->set_sensitive(bDBFormat || bFormat);
397 
398  if (!IsFieldEdit())
399  {
400  m_xValueED->set_text(OUString());
401  if (bCond)
402  m_xConditionED->set_text("TRUE");
403  else
404  m_xConditionED->set_text(OUString());
405  }
406 
407  CheckInsert();
408 }
409 
411 {
412  m_xNewFormatRB->set_active(true);
413  m_xNumFormatLB->CallSelectHdl();
414 }
415 
417 {
418  bool bInsert = true;
419  const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
420 
421  std::unique_ptr<weld::TreeIter> xIter(m_xDatabaseTLB->make_iterator());
422  if (m_xDatabaseTLB->get_selected(xIter.get()))
423  {
424  bool bEntry = m_xDatabaseTLB->iter_parent(*xIter);
425 
426  if (nTypeId == SwFieldTypesEnum::Database && bEntry)
427  bEntry = m_xDatabaseTLB->iter_parent(*xIter);
428 
429  bInsert &= bEntry;
430  }
431  else
432  bInsert = false;
433 
435  {
436  bool bHasValue = !m_xValueED->get_text().isEmpty();
437 
438  bInsert &= bHasValue;
439  }
440 
441  EnableInsert(bInsert);
442 }
443 
444 IMPL_LINK(SwFieldDBPage, TreeSelectHdl, weld::TreeView&, rBox, void)
445 {
446  std::unique_ptr<weld::TreeIter> xIter(rBox.make_iterator());
447  if (rBox.get_selected(xIter.get()))
448  {
449  const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
450 
451  bool bEntry = m_xDatabaseTLB->iter_parent(*xIter);
452 
453  if (nTypeId == SwFieldTypesEnum::Database && bEntry)
454  bEntry = m_xDatabaseTLB->iter_parent(*xIter);
455 
456  CheckInsert();
457 
458  if (nTypeId == SwFieldTypesEnum::Database)
459  {
460  bool bNumFormat = false;
461 
462  if (bEntry)
463  {
464  OUString sTableName;
465  OUString sColumnName;
466  sal_Bool bIsTable;
467  OUString sDBName = m_xDatabaseTLB->GetDBName(sTableName, sColumnName, &bIsTable);
468  bNumFormat = GetFieldMgr().IsDBNumeric(sDBName,
469  sTableName,
470  bIsTable,
471  sColumnName);
472  if (!IsFieldEdit())
473  m_xDBFormatRB->set_active(true);
474  }
475 
476  m_xDBFormatRB->set_sensitive(bNumFormat);
477  m_xNewFormatRB->set_sensitive(bNumFormat);
478  m_xNumFormatLB->set_sensitive(bNumFormat);
479  m_xFormat->set_sensitive(bNumFormat);
480  }
481  }
482 }
483 
485 {
486  SwWrtShell* pSh = GetWrtShell();
487  if (!pSh)
488  pSh = ::GetActiveWrtShell();
489 
490  OUString sNewDB
492  if(!sNewDB.isEmpty())
493  {
494  m_xDatabaseTLB->AddDataSource(sNewDB);
495  }
496 }
497 
498 // Modify
500 {
501  CheckInsert();
502 }
503 
505 {
506  const sal_Int32 nEntryPos = m_xTypeLB->get_selected_index();
507  const sal_uInt16 nTypeSel = ( -1 == nEntryPos )
508  ? USHRT_MAX : m_xTypeLB->get_id(nEntryPos).toUInt32();
509  SetUserData(USER_DATA_VERSION ";" + OUString::number( nTypeSel ));
510 }
511 
513 {
514  m_xTypeLB->select_id(OUString::number(static_cast<sal_uInt16>(SwFieldTypesEnum::Database)));
515  TypeListBoxHdl(*m_xTypeLB);
516  const SwDBData& rData = SW_MOD()->GetDBConfig()->GetAddressSource();
517  m_xDatabaseTLB->Select(rData.sDataSource, rData.sCommand, OUString());
518 }
519 
521 {
522  m_xDatabaseTLB->SetWrtShell(rSh);
523 }
524 
525 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
IMPL_LINK(SwFieldDBPage, TypeListBoxHdl, weld::TreeView &, rBox, void)
Definition: flddb.cxx:269
sal_uInt16 const nStart
Definition: fldmgr.hxx:63
void RevokeLastRegistrations()
Revoke not committed registrations in case of mail merge cancel.
Definition: dbmgr.cxx:3274
sal_Int32 nCommandType
Definition: swdbdata.hxx:32
std::unique_ptr< weld::TreeView > m_xTypeLB
Definition: flddb.hxx:36
void SetUserData(const OUString &rString)
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: flddb.cxx:186
SwDocShell * GetDocShell()
Definition: doc.hxx:1342
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
Definition: fldbas.hxx:388
std::unique_ptr< NumFormatListBox > m_xNumFormatLB
Definition: flddb.hxx:45
virtual void set_accessible_relation_label_for(weld::Widget *pLabeled)=0
std::unique_ptr< weld::Entry > m_xValueED
Definition: flddb.hxx:42
sal_uIntPtr sal_uLong
OUString sDataSource
Definition: swdbdata.hxx:30
std::unique_ptr< weld::Widget > m_xCondition
Definition: flddb.hxx:39
SwWrtShell * GetActiveWrtShell()
Definition: swmodul1.cxx:115
virtual void Reset(const SfxItemSet *rSet) override
Definition: flddb.cxx:83
std::unique_ptr< weld::ComboBox > m_xFormatLB
Definition: flddb.hxx:46
std::unique_ptr< weld::Widget > m_xValue
Definition: flddb.hxx:41
static sal_uInt16 GetPos(SwFieldTypesEnum nTypeId)
Definition: fldmgr.cxx:557
virtual void set_accessible_relation_labeled_by(weld::Widget *pLabel)=0
Used by the UI to modify the document model.
Definition: wrtsh.hxx:90
#define SAL_MAX_UINT32
SwFieldMgr & GetFieldMgr()
Definition: fldpage.hxx:81
IMPL_LINK_NOARG(SwFieldDBPage, NumSelectHdl, weld::ComboBox &, void)
Definition: flddb.cxx:410
static SwFieldTypesEnum GetTypeId(sal_uInt16 nPos)
Definition: fldmgr.cxx:529
void SetWrtShell(SwWrtShell &rSh)
Definition: flddb.cxx:520
#define USER_DATA_VERSION
Definition: flddb.cxx:34
SwFieldDBPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: flddb.cxx:36
SVX_NUM_ARABIC
const OUString & GetUserData() const
sal_uInt16 GetFormatCount(SwFieldTypesEnum nTypeId, bool bHtmlMode) const
Definition: fldmgr.cxx:679
std::unique_ptr< SwDBTreeList > m_xDatabaseTLB
Definition: flddb.hxx:37
void CommitLastRegistrations()
Accept not committed registrations.
Definition: dbmgr.cxx:3302
SwDoc * GetDoc() const
Definition: viewsh.hxx:284
bool IsFieldDlgHtmlMode() const
Definition: fldpage.hxx:49
OUString m_sOldDBName
Definition: flddb.hxx:30
void CheckInsert()
Definition: flddb.cxx:416
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:20
void ActivateMailMergeAddress()
Definition: flddb.cxx:512
void EnableInsert(bool bEnable)
Definition: fldpage.cxx:326
#define SW_MOD()
Definition: swmodule.hxx:256
sal_uLong m_nOldFormat
Definition: flddb.hxx:33
std::unique_ptr< weld::RadioButton > m_xNewFormatRB
Definition: flddb.hxx:44
int i
SwFieldTypesEnum
List of FieldTypes at UI.
Definition: fldbas.hxx:87
void Init()
Definition: fldpage.cxx:65
bool IsRefresh() const
Definition: fldpage.hxx:50
unsigned char sal_Bool
SwDBData const & GetDBData() const
Database information.
Definition: edfld.cxx:298
void InsertField(SwFieldTypesEnum nTypeId, sal_uInt16 nSubType, const OUString &rPar1, const OUString &rPar2, sal_uInt32 nFormatId, sal_Unicode cDelim= ' ', bool bIsAutomaticLanguage=true)
Definition: fldpage.cxx:117
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: flddb.cxx:258
sal_Int32 GetTypeSel() const
Definition: fldpage.hxx:45
SwField * GetCurField()
Definition: fldpage.hxx:51
GUIDCNamePair const aData
sal_uInt16 GetFormatId(SwFieldTypesEnum nTypeId, sal_uInt32 nFormatId) const
Definition: fldmgr.cxx:776
std::unique_ptr< weld::RadioButton > m_xDBFormatRB
Definition: flddb.hxx:43
#define DB_DELIM
Definition: swtypes.hxx:141
virtual sal_uInt16 GetSubType() const
Definition: fldbas.cxx:292
#define FIELD_COLUMN_WIDTH
Definition: fldpage.hxx:25
sal_uInt16 const nEnd
Definition: fldmgr.hxx:64
SwFieldType * GetTyp() const
Definition: fldbas.hxx:383
SwFieldTypesEnum GetTypeId() const
Definition: fldbas.cxx:207
SwWrtShell * GetWrtShell()
Definition: fldpage.hxx:52
virtual ~SwFieldDBPage() override
Definition: flddb.cxx:71
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:261
const SwExtendedSubType SUB_OWN_FMT
SwDBField: Don't accept formatting from database.
Definition: fldbas.hxx:207
void TypeHdl(const weld::TreeView *)
Definition: flddb.cxx:274
sal_uInt16 m_nOldSubType
Definition: flddb.hxx:34
#define USER_DATA_VERSION_1
Definition: flddb.cxx:33
OString const aName
static OUString GetTypeStr(sal_uInt16 nPos)
Definition: fldmgr.cxx:535
virtual void FillUserData() override
Definition: flddb.cxx:504
bool IsFieldEdit() const
Definition: fldpage.hxx:62
static OUString LoadAndRegisterDataSource(weld::Window *pParent, SwDocShell *pDocShell=nullptr)
Loads a data source from file and registers it.
Definition: dbmgr.cxx:2830
OUString m_sOldColumnName
Definition: flddb.hxx:32
virtual sal_uInt16 GetGroup() override
Definition: flddb.cxx:264
static const SwFieldGroupRgn & GetGroupRange(bool bHtmlMode, sal_uInt16 nGrpId)
Definition: fldmgr.cxx:473
std::unique_ptr< ConditionEdit > m_xConditionED
Definition: flddb.hxx:40
OUString sCommand
Definition: swdbdata.hxx:31
std::unique_ptr< weld::Button > m_xAddDBPB
Definition: flddb.hxx:38
SwDBManager * GetDBManager() const
Definition: doc.hxx:663
void SetTypeSel(sal_Int32 nSet)
Definition: fldpage.hxx:46
std::unique_ptr< weld::Widget > m_xFormat
Definition: flddb.hxx:47
OUString m_sOldTableName
Definition: flddb.hxx:31
OUString sId