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 
36 SwFieldDBPage::SwFieldDBPage(TabPageParent pParent, const SfxItemSet *const pCoreSet)
37  : SwFieldPage(pParent, "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 SwNumFormatListBox(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 = LogicToPixel(Size(FIELD_COLUMN_WIDTH, 0), MapMode(MapUnit::MapAppFont)).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  disposeOnce();
74 }
75 
77 {
78  SwWrtShell* pSh = GetWrtShell();
79  if (!pSh)
80  pSh = ::GetActiveWrtShell();
81  // This would cleanup in the case of cancelled dialog
82  SwDBManager* pDbManager = pSh->GetDoc()->GetDBManager();
83  if (pDbManager)
84  pDbManager->RevokeLastRegistrations();
85 
87 }
88 
89 // initialise TabPage
91 {
92  Init(); // general initialization
93 
94  const sal_Int32 nOldPos = m_xTypeLB->get_selected_index();
95  m_xTypeLB->freeze();
97 
98  m_xTypeLB->clear();
99 
100  if (!IsFieldEdit())
101  {
102  // initialise TypeListBox
104 
105  for(sal_uInt16 i = rRg.nStart; i < rRg.nEnd; ++i)
106  {
107  const sal_uInt16 nTypeId = SwFieldMgr::GetTypeId(i);
108  m_xTypeLB->append(OUString::number(nTypeId), SwFieldMgr::GetTypeStr(i));
109  }
110  }
111  else
112  {
113  const sal_uInt16 nTypeId = GetCurField()->GetTypeId();
114  m_xTypeLB->append(OUString::number(nTypeId),
116  }
117 
118  m_xTypeLB->thaw();
119 
120  // select old Pos
121  if (GetTypeSel() != -1)
122  m_xTypeLB->select(GetTypeSel());
123 
124  m_xFormatLB->clear();
125 
126  const sal_uInt16 nSize = GetFieldMgr().GetFormatCount(TYP_DBSETNUMBERFLD, IsFieldDlgHtmlMode());
127  for( sal_uInt16 i = 0; i < nSize; ++i )
128  {
129  const sal_uInt16 nFormatId = GetFieldMgr().GetFormatId( TYP_DBSETNUMBERFLD, i );
130  OUString sId(OUString::number(nFormatId));
131  m_xFormatLB->append(sId, GetFieldMgr().GetFormatStr(TYP_DBSETNUMBERFLD, i));
132  if (SVX_NUM_ARABIC == nFormatId)
133  m_xFormatLB->set_active_id(sId);
134  }
135 
136  if (!IsFieldEdit())
137  {
138  if (nOldPos != -1)
139  m_xTypeLB->select(nOldPos);
140 
141  if (!m_sOldDBName.isEmpty())
142  {
144  }
145  else
146  {
147  SwWrtShell *pSh = GetWrtShell();
148  if(!pSh)
149  pSh = ::GetActiveWrtShell();
150  if(pSh)
151  {
152  SwDBData aTmp(pSh->GetDBData());
153  m_xDatabaseTLB->Select(aTmp.sDataSource, aTmp.sCommand, OUString());
154  }
155  }
156  }
157 
158  if( !IsRefresh() )
159  {
160  const OUString sUserData = GetUserData();
161  sal_Int32 nIdx{ 0 };
162  if (sUserData.getToken(0, ';', nIdx).equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
163  {
164  const sal_uInt16 nVal = static_cast<sal_uInt16>(sUserData.getToken(0, ';', nIdx).toInt32());
165  if (nVal != USHRT_MAX)
166  {
167  for (sal_Int32 i = 0, nEntryCount = m_xTypeLB->n_children(); i < nEntryCount; ++i)
168  {
169  if (nVal == m_xTypeLB->get_id(i).toUInt32())
170  {
171  m_xTypeLB->select(i);
172  break;
173  }
174  }
175  }
176  }
177  }
178  TypeHdl(nullptr);
179 
180  m_xTypeLB->connect_changed(LINK(this, SwFieldDBPage, TypeListBoxHdl));
181  m_xTypeLB->connect_row_activated(LINK(this, SwFieldDBPage, TreeViewInsertHdl));
182 
183  if (IsFieldEdit())
184  {
185  m_xConditionED->save_value();
186  m_xValueED->save_value();
190  }
191 }
192 
194 {
195  OUString sTableName;
196  OUString sColumnName;
197  SwDBData aData;
198  sal_Bool bIsTable;
199  aData.sDataSource = m_xDatabaseTLB->GetDBName(sTableName, sColumnName, &bIsTable);
200  aData.sCommand = sTableName;
201  aData.nCommandType = bIsTable ? 0 : 1;
202  SwWrtShell *pSh = GetWrtShell();
203  if(!pSh)
204  pSh = ::GetActiveWrtShell();
205 
206  SwDBManager* pDbManager = pSh->GetDoc()->GetDBManager();
207  if (pDbManager)
208  pDbManager->CommitLastRegistrations();
209 
210  if (aData.sDataSource.isEmpty())
211  aData = pSh->GetDBData();
212 
213  if(!aData.sDataSource.isEmpty()) // without database no new field command
214  {
215  const sal_uInt16 nTypeId = m_xTypeLB->get_id(GetTypeSel()).toUInt32();
216  sal_uLong nFormat = 0;
217  sal_uInt16 nSubType = 0;
218 
219  OUString sDBName = aData.sDataSource
220  + OUStringLiteral1(DB_DELIM)
221  + aData.sCommand
222  + OUStringLiteral1(DB_DELIM)
223  + OUString::number(aData.nCommandType)
224  + OUStringLiteral1(DB_DELIM);
225  if (!sColumnName.isEmpty())
226  {
227  sDBName += sColumnName + OUStringLiteral1(DB_DELIM);
228  }
229  OUString aName = sDBName + m_xConditionED->get_text();
230 
231  switch (nTypeId)
232  {
233  case TYP_DBFLD:
234  nFormat = m_xNumFormatLB->GetFormat();
235  if (m_xNewFormatRB->get_sensitive() && m_xNewFormatRB->get_active())
237  aName = sDBName;
238  break;
239 
240  case TYP_DBSETNUMBERFLD:
241  nFormat = m_xFormatLB->get_active_id().toUInt32();
242  break;
243  }
244 
245  const OUString aVal(m_xValueED->get_text());
246  OUString sTempTableName;
247  OUString sTempColumnName;
248  OUString sTempDBName = m_xDatabaseTLB->GetDBName(sTempTableName, sTempColumnName);
249  bool bDBListBoxChanged = m_sOldDBName != sTempDBName ||
250  m_sOldTableName != sTempTableName || m_sOldColumnName != sTempColumnName;
251  if (!IsFieldEdit() ||
252  m_xConditionED->get_value_changed_from_saved() ||
253  m_xValueED->get_saved_value() != aVal ||
254  bDBListBoxChanged ||
255  m_nOldFormat != nFormat || m_nOldSubType != nSubType)
256  {
257  InsertField( nTypeId, nSubType, aName, aVal, nFormat);
258  }
259  }
260 
261  return false;
262 }
263 
265  const SfxItemSet *const pAttrSet )
266 {
267  return VclPtr<SwFieldDBPage>::Create( pParent, pAttrSet );
268 }
269 
271 {
272  return GRP_DB;
273 }
274 
275 IMPL_LINK( SwFieldDBPage, TypeListBoxHdl, weld::TreeView&, rBox, void )
276 {
277  TypeHdl(&rBox);
278 }
279 
281 {
282  // save old ListBoxPos
283  const sal_Int32 nOld = GetTypeSel();
284 
285  // current ListBoxPos
286  SetTypeSel(m_xTypeLB->get_selected_index());
287 
288  if (GetTypeSel() == -1)
289  {
290  SetTypeSel(0);
291  m_xTypeLB->select(0);
292  }
293 
294  if (nOld == GetTypeSel())
295  return;
296 
297  SwWrtShell *pSh = GetWrtShell();
298  if(!pSh)
299  pSh = ::GetActiveWrtShell();
300  bool bCond = false, bSetNo = false, bFormat = false, bDBFormat = false;
301  const sal_uInt16 nTypeId = m_xTypeLB->get_id(GetTypeSel()).toUInt32();
302 
303  m_xDatabaseTLB->ShowColumns(nTypeId == TYP_DBFLD);
304 
305  if (IsFieldEdit())
306  {
307  SwDBData aData;
308  OUString sColumnName;
309  if (nTypeId == TYP_DBFLD)
310  {
311  aData = static_cast<SwDBField*>(GetCurField())->GetDBData();
312  sColumnName = static_cast<SwDBFieldType*>(GetCurField()->GetTyp())->GetColumnName();
313  }
314  else
315  {
316  aData = static_cast<SwDBNameInfField*>(GetCurField())->GetDBData(pSh->GetDoc());
317  }
318  m_xDatabaseTLB->Select(aData.sDataSource, aData.sCommand, sColumnName);
319  }
320 
321  switch (nTypeId)
322  {
323  case TYP_DBFLD:
324  {
325  bFormat = true;
326  bDBFormat = true;
327  m_xNumFormatLB->show();
328  m_xFormatLB->hide();
329 
330  weld::Widget& rWidget = m_xNumFormatLB->get_widget();
331  m_xNewFormatRB->set_accessible_relation_label_for(&rWidget);
333  m_xFormatLB->set_accessible_relation_label_for(nullptr);
334 
335  if (pBox) // type was changed by user
336  m_xDBFormatRB->set_active(true);
337 
338  if (IsFieldEdit())
339  {
340  if (GetCurField()->GetFormat() != 0 && GetCurField()->GetFormat() != SAL_MAX_UINT32)
341  m_xNumFormatLB->SetDefFormat(GetCurField()->GetFormat());
342 
343  if (GetCurField()->GetSubType() & nsSwExtendedSubType::SUB_OWN_FMT)
344  m_xNewFormatRB->set_active(true);
345  else
346  m_xDBFormatRB->set_active(true);
347  }
348  break;
349  }
350  case TYP_DBNUMSETFLD:
351  bSetNo = true;
352  [[fallthrough]];
353  case TYP_DBNEXTSETFLD:
354  bCond = true;
355  if (IsFieldEdit())
356  {
357  m_xConditionED->set_text(GetCurField()->GetPar1());
358  m_xValueED->set_text(GetCurField()->GetPar2());
359  }
360  break;
361 
362  case TYP_DBNAMEFLD:
363  break;
364 
365  case TYP_DBSETNUMBERFLD:
366  {
367  bFormat = true;
368  m_xNewFormatRB->set_active(true);
369  m_xNumFormatLB->hide();
370  m_xFormatLB->show();
371 
372  m_xNewFormatRB->set_accessible_relation_label_for(m_xFormatLB.get());
373  m_xFormatLB->set_accessible_relation_labeled_by(m_xNewFormatRB.get());
374  weld::Widget& rWidget = m_xNumFormatLB->get_widget();
375  rWidget.set_accessible_relation_label_for(nullptr);
376 
377  if( IsFieldEdit() )
378  {
379  for (sal_Int32 nI = m_xFormatLB->get_count(); nI;)
380  {
381  if (GetCurField()->GetFormat() == m_xFormatLB->get_id(--nI).toUInt32())
382  {
383  m_xFormatLB->set_active( nI );
384  break;
385  }
386  }
387  }
388  break;
389  }
390  }
391 
392  m_xCondition->set_sensitive(bCond);
393  m_xValue->set_sensitive(bSetNo);
394  if (nTypeId != TYP_DBFLD)
395  {
396  m_xDBFormatRB->set_sensitive(bDBFormat);
397  m_xNewFormatRB->set_sensitive(bDBFormat || bFormat);
398  m_xNumFormatLB->set_sensitive(bDBFormat);
399  m_xFormatLB->set_sensitive(bFormat);
400  }
401  m_xFormat->set_sensitive(bDBFormat || bFormat);
402 
403  if (!IsFieldEdit())
404  {
405  m_xValueED->set_text(OUString());
406  if (bCond)
407  m_xConditionED->set_text("TRUE");
408  else
409  m_xConditionED->set_text(OUString());
410  }
411 
412  CheckInsert();
413 }
414 
416 {
417  m_xNewFormatRB->set_active(true);
418  m_xNumFormatLB->CallSelectHdl();
419 }
420 
422 {
423  bool bInsert = true;
424  const sal_uInt16 nTypeId = m_xTypeLB->get_id(GetTypeSel()).toUInt32();
425 
426  std::unique_ptr<weld::TreeIter> xIter(m_xDatabaseTLB->make_iterator());
427  if (m_xDatabaseTLB->get_selected(xIter.get()))
428  {
429  bool bEntry = m_xDatabaseTLB->iter_parent(*xIter);
430 
431  if (nTypeId == TYP_DBFLD && bEntry)
432  bEntry = m_xDatabaseTLB->iter_parent(*xIter);
433 
434  bInsert &= bEntry;
435  }
436  else
437  bInsert = false;
438 
439  if (nTypeId == TYP_DBNUMSETFLD)
440  {
441  bool bHasValue = !m_xValueED->get_text().isEmpty();
442 
443  bInsert &= bHasValue;
444  }
445 
446  EnableInsert(bInsert);
447 }
448 
449 IMPL_LINK(SwFieldDBPage, TreeSelectHdl, weld::TreeView&, rBox, void)
450 {
451  std::unique_ptr<weld::TreeIter> xIter(rBox.make_iterator());
452  if (rBox.get_selected(xIter.get()))
453  {
454  const sal_uInt16 nTypeId = m_xTypeLB->get_id(GetTypeSel()).toUInt32();
455 
456  bool bEntry = m_xDatabaseTLB->iter_parent(*xIter);
457 
458  if (nTypeId == TYP_DBFLD && bEntry)
459  bEntry = m_xDatabaseTLB->iter_parent(*xIter);
460 
461  CheckInsert();
462 
463  if (nTypeId == TYP_DBFLD)
464  {
465  bool bNumFormat = false;
466 
467  if (bEntry)
468  {
469  OUString sTableName;
470  OUString sColumnName;
471  sal_Bool bIsTable;
472  OUString sDBName = m_xDatabaseTLB->GetDBName(sTableName, sColumnName, &bIsTable);
473  bNumFormat = GetFieldMgr().IsDBNumeric(sDBName,
474  sTableName,
475  bIsTable,
476  sColumnName);
477  if (!IsFieldEdit())
478  m_xDBFormatRB->set_active(true);
479  }
480 
481  m_xDBFormatRB->set_sensitive(bNumFormat);
482  m_xNewFormatRB->set_sensitive(bNumFormat);
483  m_xNumFormatLB->set_sensitive(bNumFormat);
484  m_xFormat->set_sensitive(bNumFormat);
485  }
486  }
487 }
488 
490 {
491  SwWrtShell* pSh = GetWrtShell();
492  if (!pSh)
493  pSh = ::GetActiveWrtShell();
494 
495  OUString sNewDB
496  = SwDBManager::LoadAndRegisterDataSource(GetDialogFrameWeld(), pSh->GetDoc()->GetDocShell());
497  if(!sNewDB.isEmpty())
498  {
499  m_xDatabaseTLB->AddDataSource(sNewDB);
500  }
501 }
502 
503 // Modify
505 {
506  CheckInsert();
507 }
508 
510 {
511  const sal_Int32 nEntryPos = m_xTypeLB->get_selected_index();
512  const sal_uInt16 nTypeSel = ( -1 == nEntryPos )
513  ? USHRT_MAX : m_xTypeLB->get_id(nEntryPos).toUInt32();
514  SetUserData(USER_DATA_VERSION ";" + OUString::number( nTypeSel ));
515 }
516 
518 {
519  m_xTypeLB->select_id(OUString::number(TYP_DBFLD));
520  TypeListBoxHdl(*m_xTypeLB);
521  const SwDBData& rData = SW_MOD()->GetDBConfig()->GetAddressSource();
522  m_xDatabaseTLB->Select(rData.sDataSource, rData.sCommand, OUString());
523 }
524 
526 {
527  m_xDatabaseTLB->SetWrtShell(rSh);
528 }
529 
530 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
IMPL_LINK(SwFieldDBPage, TypeListBoxHdl, weld::TreeView &, rBox, void)
Definition: flddb.cxx:275
sal_uInt16 const nStart
Definition: fldmgr.hxx:63
void RevokeLastRegistrations()
Revoke not committed registrations in case of mail merge cancel.
Definition: dbmgr.cxx:3335
sal_Int32 nCommandType
Definition: swdbdata.hxx:32
std::unique_ptr< weld::TreeView > m_xTypeLB
Definition: flddb.hxx:40
void SetUserData(const OUString &rString)
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: flddb.cxx:193
SwDocShell * GetDocShell()
Definition: doc.hxx:1340
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
Definition: fldbas.hxx:387
virtual void set_accessible_relation_label_for(weld::Widget *pLabeled)=0
std::unique_ptr< weld::Entry > m_xValueED
Definition: flddb.hxx:46
SwFieldDBPage(TabPageParent pParent, const SfxItemSet *rSet)
Definition: flddb.cxx:36
sal_uInt16 GetFormatId(sal_uInt16 nTypeId, sal_uInt32 nFormatId) const
Definition: fldmgr.cxx:783
sal_uIntPtr sal_uLong
OUString sDataSource
Definition: swdbdata.hxx:30
std::unique_ptr< weld::Widget > m_xCondition
Definition: flddb.hxx:43
SwWrtShell * GetActiveWrtShell()
Definition: swmodul1.cxx:115
sal_uInt16 GetTypeId() const
Definition: fldbas.cxx:209
virtual void Reset(const SfxItemSet *rSet) override
Definition: flddb.cxx:90
std::unique_ptr< weld::ComboBox > m_xFormatLB
Definition: flddb.hxx:50
std::unique_ptr< weld::Widget > m_xValue
Definition: flddb.hxx:45
virtual void set_accessible_relation_labeled_by(weld::Widget *pLabel)=0
Used by the UI to modify the document model.
Definition: wrtsh.hxx:86
#define SAL_MAX_UINT32
static sal_uInt16 GetTypeId(sal_uInt16 nPos)
Definition: fldmgr.cxx:528
SwFieldMgr & GetFieldMgr()
Definition: fldpage.hxx:83
IMPL_LINK_NOARG(SwFieldDBPage, NumSelectHdl, weld::ComboBox &, void)
Definition: flddb.cxx:415
void SetWrtShell(SwWrtShell &rSh)
Definition: flddb.cxx:525
#define USER_DATA_VERSION
Definition: flddb.cxx:34
sal_uInt16 GetFormatCount(sal_uInt16 nTypeId, bool bHtmlMode) const
Definition: fldmgr.cxx:677
SVX_NUM_ARABIC
std::unique_ptr< SwNumFormatListBox > m_xNumFormatLB
Definition: flddb.hxx:49
std::unique_ptr< SwDBTreeList > m_xDatabaseTLB
Definition: flddb.hxx:41
void CommitLastRegistrations()
Accept not committed registrations.
Definition: dbmgr.cxx:3363
SwDoc * GetDoc() const
Definition: viewsh.hxx:284
bool IsFieldDlgHtmlMode() const
Definition: fldpage.hxx:49
OUString m_sOldDBName
Definition: flddb.hxx:34
virtual void dispose() override
void CheckInsert()
Definition: flddb.cxx:421
void ActivateMailMergeAddress()
Definition: flddb.cxx:517
void EnableInsert(bool bEnable)
Definition: fldpage.cxx:327
#define SW_MOD()
Definition: swmodule.hxx:255
sal_uLong m_nOldFormat
Definition: flddb.hxx:37
std::unique_ptr< weld::RadioButton > m_xNewFormatRB
Definition: flddb.hxx:48
int i
void Init()
Definition: fldpage.cxx:67
bool IsRefresh() const
Definition: fldpage.hxx:50
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rAttrSet)
Definition: flddb.cxx:264
unsigned char sal_Bool
SwDBData const & GetDBData() const
Database information.
Definition: edfld.cxx:298
sal_Int32 GetTypeSel() const
Definition: fldpage.hxx:45
SwField * GetCurField()
Definition: fldpage.hxx:51
GUIDCNamePair const aData
std::unique_ptr< weld::RadioButton > m_xDBFormatRB
Definition: flddb.hxx:47
#define DB_DELIM
Definition: swtypes.hxx:141
virtual sal_uInt16 GetSubType() const
Definition: fldbas.cxx:292
#define FIELD_COLUMN_WIDTH
Definition: fldpage.hxx:25
void InsertField(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUString &rPar1, const OUString &rPar2, sal_uInt32 nFormatId, sal_Unicode cDelim= ' ', bool bIsAutomaticLanguage=true)
Definition: fldpage.cxx:121
sal_uInt16 const nEnd
Definition: fldmgr.hxx:64
SwFieldType * GetTyp() const
Definition: fldbas.hxx:382
SwWrtShell * GetWrtShell()
Definition: fldpage.hxx:52
virtual ~SwFieldDBPage() override
Definition: flddb.cxx:71
virtual void dispose() override
Definition: flddb.cxx:76
const OUString & GetUserData()
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:259
static VclPtr< reference_type > Create(Arg &&...arg)
const SwExtendedSubType SUB_OWN_FMT
SwDBField: Don't accept formatting from database.
Definition: fldbas.hxx:206
void TypeHdl(const weld::TreeView *)
Definition: flddb.cxx:280
sal_uInt16 m_nOldSubType
Definition: flddb.hxx:38
#define USER_DATA_VERSION_1
Definition: flddb.cxx:33
OString const aName
static OUString GetTypeStr(sal_uInt16 nPos)
Definition: fldmgr.cxx:534
virtual void FillUserData() override
Definition: flddb.cxx:509
bool IsFieldEdit() const
Definition: fldpage.hxx:62
static sal_uInt16 GetPos(sal_uInt16 nTypeId)
Definition: fldmgr.cxx:556
static OUString LoadAndRegisterDataSource(weld::Window *pParent, SwDocShell *pDocShell=nullptr)
Loads a data source from file and registers it.
Definition: dbmgr.cxx:2885
OUString m_sOldColumnName
Definition: flddb.hxx:36
virtual sal_uInt16 GetGroup() override
Definition: flddb.cxx:270
static const SwFieldGroupRgn & GetGroupRange(bool bHtmlMode, sal_uInt16 nGrpId)
Definition: fldmgr.cxx:472
std::unique_ptr< ConditionEdit > m_xConditionED
Definition: flddb.hxx:44
OUString sCommand
Definition: swdbdata.hxx:31
std::unique_ptr< weld::Button > m_xAddDBPB
Definition: flddb.hxx:42
SwDBManager * GetDBManager() const
Definition: doc.hxx:664
void SetTypeSel(sal_Int32 nSet)
Definition: fldpage.hxx:46
std::unique_ptr< weld::Widget > m_xFormat
Definition: flddb.hxx:51
OUString m_sOldTableName
Definition: flddb.hxx:35
OUString sId