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 <wrtsh.hxx>
22 #include <dbfld.hxx>
23 #include <doc.hxx>
24 
25 #include "flddb.hxx"
26 #include <dbconfig.hxx>
27 #include <dbmgr.hxx>
28 
29 #define USER_DATA_VERSION_1 "1"
30 #define USER_DATA_VERSION USER_DATA_VERSION_1
31 
33  : SwFieldPage(pPage, pController, "modules/swriter/ui/flddbpage.ui", "FieldDbPage", pCoreSet)
34  , m_nOldFormat(0)
35  , m_nOldSubType(0)
36  , m_xTypeLB(m_xBuilder->weld_tree_view("type"))
37  , m_xDatabaseTLB(new SwDBTreeList(m_xBuilder->weld_tree_view("select")))
38  , m_xAddDBPB(m_xBuilder->weld_button("browse"))
39  , m_xCondition(m_xBuilder->weld_widget("condgroup"))
40  , m_xConditionED(new ConditionEdit(m_xBuilder->weld_entry("condition")))
41  , m_xValue(m_xBuilder->weld_widget("recgroup"))
42  , m_xValueED(m_xBuilder->weld_entry("recnumber"))
43  , m_xDBFormatRB(m_xBuilder->weld_radio_button("fromdatabasecb"))
44  , m_xNewFormatRB(m_xBuilder->weld_radio_button("userdefinedcb"))
45  , m_xNumFormatLB(new NumFormatListBox(m_xBuilder->weld_combo_box("numformat")))
46  , m_xFormatLB(m_xBuilder->weld_combo_box("format"))
47  , m_xFormat(m_xBuilder->weld_widget("formatframe"))
48 {
49  SetTypeSel(-1); //TODO
50 
51  m_xTypeLB->make_sorted();
52  m_xFormatLB->make_sorted();
53 
54  auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH;
55  auto nHeight = m_xTypeLB->get_height_rows(14);
56  m_xTypeLB->set_size_request(nWidth, nHeight);
57  m_xDatabaseTLB->set_size_request(nWidth*2, nHeight);
58 
59  m_xNumFormatLB->connect_changed(LINK(this, SwFieldDBPage, NumSelectHdl));
60  m_xDatabaseTLB->connect_changed(LINK(this, SwFieldDBPage, TreeSelectHdl));
61  m_xDatabaseTLB->connect_row_activated(LINK(this, SwFieldDBPage, TreeViewInsertHdl));
62 
63  m_xValueED->connect_changed(LINK(this, SwFieldDBPage, ModifyHdl));
64  m_xAddDBPB->connect_clicked(LINK(this, SwFieldDBPage, AddDBHdl));
65 }
66 
68 {
69  // If we have no stored SwWrtShell, it means we didn't do anything useful - no need to revoke.
70  if (SwWrtShell* pSh = GetWrtShell())
71  {
72  // This would cleanup in the case of cancelled dialog
73  SwDBManager* pDbManager = pSh->GetDoc()->GetDBManager();
74  if (pDbManager)
75  pDbManager->RevokeLastRegistrations();
76  }
77 }
78 
79 // initialise TabPage
81 {
82  Init(); // general initialization
83 
84  const sal_Int32 nOldPos = m_xTypeLB->get_selected_index();
85  m_xTypeLB->freeze();
87 
88  m_xTypeLB->clear();
89 
90  if (!IsFieldEdit())
91  {
92  // initialise TypeListBox
94 
95  for(sal_uInt16 i = rRg.nStart; i < rRg.nEnd; ++i)
96  {
97  const SwFieldTypesEnum nTypeId = SwFieldMgr::GetTypeId(i);
98  m_xTypeLB->append(OUString::number(static_cast<sal_uInt16>(nTypeId)), SwFieldMgr::GetTypeStr(i));
99  }
100  }
101  else
102  {
103  const SwFieldTypesEnum nTypeId = GetCurField()->GetTypeId();
104  m_xTypeLB->append(OUString::number(static_cast<sal_uInt16>(nTypeId)),
106  }
107 
108  m_xTypeLB->thaw();
109 
110  // select old Pos
111  if (GetTypeSel() != -1)
112  m_xTypeLB->select(GetTypeSel());
113 
114  m_xFormatLB->clear();
115 
117  for( sal_uInt16 i = 0; i < nSize; ++i )
118  {
119  const sal_uInt16 nFormatId = GetFieldMgr().GetFormatId( SwFieldTypesEnum::DatabaseSetNumber, i );
120  OUString sId(OUString::number(nFormatId));
121  m_xFormatLB->append(sId, GetFieldMgr().GetFormatStr(SwFieldTypesEnum::DatabaseSetNumber, i));
122  if (SVX_NUM_ARABIC == nFormatId)
123  m_xFormatLB->set_active_id(sId);
124  }
125 
126  if (!IsFieldEdit())
127  {
128  if (nOldPos != -1)
129  m_xTypeLB->select(nOldPos);
130 
131  if (!m_sOldDBName.isEmpty())
132  {
134  }
135  else
136  {
138  if(pSh)
139  {
140  SwDBData aTmp(pSh->GetDBData());
141  m_xDatabaseTLB->Select(aTmp.sDataSource, aTmp.sCommand, OUString());
142  }
143  }
144  }
145 
146  if( !IsRefresh() )
147  {
148  const OUString sUserData = GetUserData();
149  sal_Int32 nIdx{ 0 };
150  if (sUserData.getToken(0, ';', nIdx).equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
151  {
152  const sal_uInt16 nVal = static_cast<sal_uInt16>(sUserData.getToken(0, ';', nIdx).toInt32());
153  if (nVal != USHRT_MAX)
154  {
155  for (sal_Int32 i = 0, nEntryCount = m_xTypeLB->n_children(); i < nEntryCount; ++i)
156  {
157  if (nVal == m_xTypeLB->get_id(i).toUInt32())
158  {
159  m_xTypeLB->select(i);
160  break;
161  }
162  }
163  }
164  }
165  }
166  TypeHdl(nullptr);
167 
168  m_xTypeLB->connect_changed(LINK(this, SwFieldDBPage, TypeListBoxHdl));
169  m_xTypeLB->connect_row_activated(LINK(this, SwFieldDBPage, TreeViewInsertHdl));
170 
171  if (IsFieldEdit())
172  {
173  m_xConditionED->save_value();
174  m_xValueED->save_value();
178  }
179 }
180 
182 {
183  OUString sTableName;
184  OUString sColumnName;
185  SwDBData aData;
186  sal_Bool bIsTable;
187  aData.sDataSource = m_xDatabaseTLB->GetDBName(sTableName, sColumnName, &bIsTable);
188  aData.sCommand = sTableName;
189  aData.nCommandType = bIsTable ? 0 : 1;
191  assert(pSh);
192 
193  SwDBManager* pDbManager = pSh->GetDoc()->GetDBManager();
194  if (pDbManager)
195  pDbManager->CommitLastRegistrations();
196 
197  if (aData.sDataSource.isEmpty())
198  aData = pSh->GetDBData();
199 
200  if(!aData.sDataSource.isEmpty()) // without database no new field command
201  {
202  const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
203  sal_uLong nFormat = 0;
204  sal_uInt16 nSubType = 0;
205 
206  OUString sDBName = aData.sDataSource
207  + OUStringChar(DB_DELIM)
208  + aData.sCommand
209  + OUStringChar(DB_DELIM)
210  + OUString::number(aData.nCommandType)
211  + OUStringChar(DB_DELIM);
212  if (!sColumnName.isEmpty())
213  {
214  sDBName += sColumnName + OUStringChar(DB_DELIM);
215  }
216  OUString aName = sDBName + m_xConditionED->get_text();
217 
218  switch (nTypeId)
219  {
221  nFormat = m_xNumFormatLB->GetFormat();
222  if (m_xNewFormatRB->get_sensitive() && m_xNewFormatRB->get_active())
224  aName = sDBName;
225  break;
226 
228  nFormat = m_xFormatLB->get_active_id().toUInt32();
229  break;
230  default: break;
231  }
232 
233  const OUString aVal(m_xValueED->get_text());
234  OUString sTempTableName;
235  OUString sTempColumnName;
236  OUString sTempDBName = m_xDatabaseTLB->GetDBName(sTempTableName, sTempColumnName);
237  bool bDBListBoxChanged = m_sOldDBName != sTempDBName ||
238  m_sOldTableName != sTempTableName || m_sOldColumnName != sTempColumnName;
239  if (!IsFieldEdit() ||
240  m_xConditionED->get_value_changed_from_saved() ||
241  m_xValueED->get_saved_value() != aVal ||
242  bDBListBoxChanged ||
243  m_nOldFormat != nFormat || m_nOldSubType != nSubType)
244  {
245  InsertField( nTypeId, nSubType, aName, aVal, nFormat);
246  }
247  }
248 
249  return false;
250 }
251 
252 std::unique_ptr<SfxTabPage> SwFieldDBPage::Create( weld::Container* pPage, weld::DialogController* pController,
253  const SfxItemSet *const pAttrSet )
254 {
255  return std::make_unique<SwFieldDBPage>( pPage, pController, pAttrSet );
256 }
257 
259 {
260  return GRP_DB;
261 }
262 
263 IMPL_LINK( SwFieldDBPage, TypeListBoxHdl, weld::TreeView&, rBox, void )
264 {
265  TypeHdl(&rBox);
266 }
267 
269 {
270  // save old ListBoxPos
271  const sal_Int32 nOld = GetTypeSel();
272 
273  // current ListBoxPos
274  SetTypeSel(m_xTypeLB->get_selected_index());
275 
276  if (GetTypeSel() == -1)
277  {
278  SetTypeSel(0);
279  m_xTypeLB->select(0);
280  }
281 
282  if (nOld == GetTypeSel())
283  return;
284 
286  assert(pSh);
287  bool bCond = false, bSetNo = false, bFormat = false, bDBFormat = false;
288  const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
289 
290  m_xDatabaseTLB->ShowColumns(nTypeId == SwFieldTypesEnum::Database);
291 
292  if (IsFieldEdit())
293  {
294  SwDBData aData;
295  OUString sColumnName;
296  if (nTypeId == SwFieldTypesEnum::Database)
297  {
298  aData = static_cast<SwDBField*>(GetCurField())->GetDBData();
299  sColumnName = static_cast<SwDBFieldType*>(GetCurField()->GetTyp())->GetColumnName();
300  }
301  else
302  {
303  aData = static_cast<SwDBNameInfField*>(GetCurField())->GetDBData(pSh->GetDoc());
304  }
305  m_xDatabaseTLB->Select(aData.sDataSource, aData.sCommand, sColumnName);
306  }
307 
308  switch (nTypeId)
309  {
311  {
312  bFormat = true;
313  bDBFormat = true;
314  m_xNumFormatLB->show();
315  m_xFormatLB->hide();
316 
317  weld::Widget& rWidget = m_xNumFormatLB->get_widget();
318  m_xNewFormatRB->set_accessible_relation_label_for(&rWidget);
320  m_xFormatLB->set_accessible_relation_label_for(nullptr);
321 
322  if (pBox) // type was changed by user
323  m_xDBFormatRB->set_active(true);
324 
325  if (IsFieldEdit())
326  {
327  if (GetCurField()->GetFormat() != 0 && GetCurField()->GetFormat() != SAL_MAX_UINT32)
328  m_xNumFormatLB->SetDefFormat(GetCurField()->GetFormat());
329 
330  if (GetCurField()->GetSubType() & nsSwExtendedSubType::SUB_OWN_FMT)
331  m_xNewFormatRB->set_active(true);
332  else
333  m_xDBFormatRB->set_active(true);
334  }
335  break;
336  }
338  bSetNo = true;
339  [[fallthrough]];
341  bCond = true;
342  if (IsFieldEdit())
343  {
344  m_xConditionED->set_text(GetCurField()->GetPar1());
345  m_xValueED->set_text(GetCurField()->GetPar2());
346  }
347  break;
348 
350  break;
351 
353  {
354  bFormat = true;
355  m_xNewFormatRB->set_active(true);
356  m_xNumFormatLB->hide();
357  m_xFormatLB->show();
358 
359  m_xNewFormatRB->set_accessible_relation_label_for(m_xFormatLB.get());
360  m_xFormatLB->set_accessible_relation_labeled_by(m_xNewFormatRB.get());
361  weld::Widget& rWidget = m_xNumFormatLB->get_widget();
362  rWidget.set_accessible_relation_label_for(nullptr);
363 
364  if( IsFieldEdit() )
365  {
366  for (sal_Int32 nI = m_xFormatLB->get_count(); nI;)
367  {
368  if (GetCurField()->GetFormat() == m_xFormatLB->get_id(--nI).toUInt32())
369  {
370  m_xFormatLB->set_active( nI );
371  break;
372  }
373  }
374  }
375  break;
376  }
377  default: break;
378  }
379 
380  m_xCondition->set_sensitive(bCond);
381  m_xValue->set_sensitive(bSetNo);
382  if (nTypeId != SwFieldTypesEnum::Database)
383  {
384  m_xDBFormatRB->set_sensitive(bDBFormat);
385  m_xNewFormatRB->set_sensitive(bDBFormat || bFormat);
386  m_xNumFormatLB->set_sensitive(bDBFormat);
387  m_xFormatLB->set_sensitive(bFormat);
388  }
389  m_xFormat->set_sensitive(bDBFormat || bFormat);
390 
391  if (!IsFieldEdit())
392  {
393  m_xValueED->set_text(OUString());
394  if (bCond)
395  m_xConditionED->set_text("TRUE");
396  else
397  m_xConditionED->set_text(OUString());
398  }
399 
400  CheckInsert();
401 }
402 
404 {
405  m_xNewFormatRB->set_active(true);
406  m_xNumFormatLB->CallSelectHdl();
407 }
408 
410 {
411  bool bInsert = true;
412  const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
413 
414  std::unique_ptr<weld::TreeIter> xIter(m_xDatabaseTLB->make_iterator());
415  if (m_xDatabaseTLB->get_selected(xIter.get()))
416  {
417  bool bEntry = m_xDatabaseTLB->iter_parent(*xIter);
418 
419  if (nTypeId == SwFieldTypesEnum::Database && bEntry)
420  bEntry = m_xDatabaseTLB->iter_parent(*xIter);
421 
422  bInsert &= bEntry;
423  }
424  else
425  bInsert = false;
426 
428  {
429  bool bHasValue = !m_xValueED->get_text().isEmpty();
430 
431  bInsert &= bHasValue;
432  }
433 
434  EnableInsert(bInsert);
435 }
436 
437 IMPL_LINK(SwFieldDBPage, TreeSelectHdl, weld::TreeView&, rBox, void)
438 {
439  std::unique_ptr<weld::TreeIter> xIter(rBox.make_iterator());
440  if (rBox.get_selected(xIter.get()))
441  {
442  const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
443 
444  bool bEntry = m_xDatabaseTLB->iter_parent(*xIter);
445 
446  if (nTypeId == SwFieldTypesEnum::Database && bEntry)
447  bEntry = m_xDatabaseTLB->iter_parent(*xIter);
448 
449  CheckInsert();
450 
451  if (nTypeId == SwFieldTypesEnum::Database)
452  {
453  bool bNumFormat = false;
454 
455  if (bEntry)
456  {
457  OUString sTableName;
458  OUString sColumnName;
459  sal_Bool bIsTable;
460  OUString sDBName = m_xDatabaseTLB->GetDBName(sTableName, sColumnName, &bIsTable);
461  bNumFormat = GetFieldMgr().IsDBNumeric(sDBName,
462  sTableName,
463  bIsTable,
464  sColumnName);
465  if (!IsFieldEdit())
466  m_xDBFormatRB->set_active(true);
467  }
468 
469  m_xDBFormatRB->set_sensitive(bNumFormat);
470  m_xNewFormatRB->set_sensitive(bNumFormat);
471  m_xNumFormatLB->set_sensitive(bNumFormat);
472  m_xFormat->set_sensitive(bNumFormat);
473  }
474  }
475 }
476 
478 {
479  if (SwWrtShell* pSh = CheckAndGetWrtShell())
480  {
481  OUString sNewDB
482  = SwDBManager::LoadAndRegisterDataSource(GetFrameWeld(), pSh->GetDoc()->GetDocShell());
483  if (!sNewDB.isEmpty())
484  {
485  m_xDatabaseTLB->AddDataSource(sNewDB);
486  }
487  }
488 }
489 
490 // Modify
492 {
493  CheckInsert();
494 }
495 
497 {
498  const sal_Int32 nEntryPos = m_xTypeLB->get_selected_index();
499  const sal_uInt16 nTypeSel = ( -1 == nEntryPos )
500  ? USHRT_MAX : m_xTypeLB->get_id(nEntryPos).toUInt32();
501  SetUserData(USER_DATA_VERSION ";" + OUString::number( nTypeSel ));
502 }
503 
505 {
506  m_xTypeLB->select_id(OUString::number(static_cast<sal_uInt16>(SwFieldTypesEnum::Database)));
507  TypeListBoxHdl(*m_xTypeLB);
508  const SwDBData& rData = SW_MOD()->GetDBConfig()->GetAddressSource();
509  m_xDatabaseTLB->Select(rData.sDataSource, rData.sCommand, OUString());
510 }
511 
513 {
514  // We need to remember the shell to be able to call correct SwDBManager
516  m_xDatabaseTLB->SetWrtShell(rSh);
517 }
518 
520 {
521  SwWrtShell* pSh = GetWrtShell();
522  if (!pSh)
523  {
524  pSh = ::GetActiveWrtShell();
525  if (pSh) // this is not guaranteed: e.g., activating print preview with dialog active
526  SetWrtShell(*pSh);
527  }
528  return pSh;
529 }
530 
531 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
IMPL_LINK(SwFieldDBPage, TypeListBoxHdl, weld::TreeView &, rBox, void)
Definition: flddb.cxx:263
void RevokeLastRegistrations()
Revoke not committed registrations in case of mail merge cancel.
Definition: dbmgr.cxx:3260
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:181
const char aData[]
Definition: ww8scan.hxx:47
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
Definition: fldbas.hxx:401
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:107
virtual void Reset(const SfxItemSet *rSet) override
Definition: flddb.cxx:80
const ContentProperties & rData
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:548
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:403
static SwFieldTypesEnum GetTypeId(sal_uInt16 nPos)
Definition: fldmgr.cxx:520
void SetWrtShell(SwWrtShell &rSh)
Definition: flddb.cxx:512
sal_uInt16 nEnd
Definition: fldmgr.hxx:64
#define USER_DATA_VERSION
Definition: flddb.cxx:30
SwFieldDBPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: flddb.cxx:32
SVX_NUM_ARABIC
const OUString & GetUserData() const
sal_uInt16 GetFormatCount(SwFieldTypesEnum nTypeId, bool bHtmlMode) const
Definition: fldmgr.cxx:670
std::unique_ptr< SwDBTreeList > m_xDatabaseTLB
Definition: flddb.hxx:37
void CommitLastRegistrations()
Accept not committed registrations.
Definition: dbmgr.cxx:3288
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:409
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:20
void ActivateMailMergeAddress()
Definition: flddb.cxx:504
void EnableInsert(bool bEnable)
Definition: fldpage.cxx:316
#define SW_MOD()
Definition: swmodule.hxx:256
sal_uLong m_nOldFormat
Definition: flddb.hxx:33
int i
std::unique_ptr< weld::RadioButton > m_xNewFormatRB
Definition: flddb.hxx:44
SwFieldTypesEnum
List of FieldTypes at UI.
Definition: fldbas.hxx:93
void Init()
Definition: fldpage.cxx:63
bool IsRefresh() const
Definition: fldpage.hxx:50
unsigned char sal_Bool
SwDBData const & GetDBData() const
Database information.
Definition: edfld.cxx:294
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:115
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: flddb.cxx:252
sal_Int32 GetTypeSel() const
Definition: fldpage.hxx:45
SwField * GetCurField()
Definition: fldpage.hxx:51
SwWrtShell * CheckAndGetWrtShell()
Definition: flddb.cxx:519
sal_uInt16 GetFormatId(SwFieldTypesEnum nTypeId, sal_uInt32 nFormatId) const
Definition: fldmgr.cxx:767
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:323
#define FIELD_COLUMN_WIDTH
Definition: fldpage.hxx:25
SwFieldType * GetTyp() const
Definition: fldbas.hxx:396
sal_uInt16 nStart
Definition: fldmgr.hxx:63
SwFieldTypesEnum GetTypeId() const
Definition: fldbas.cxx:238
SwWrtShell * GetWrtShell()
Definition: fldpage.hxx:52
virtual ~SwFieldDBPage() override
Definition: flddb.cxx:67
void SetWrtShell(SwWrtShell *m_pWrtShell)
Definition: fldpage.cxx:338
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:253
OUString aName
const SwExtendedSubType SUB_OWN_FMT
SwDBField: Don't accept formatting from database.
Definition: fldbas.hxx:213
void TypeHdl(const weld::TreeView *)
Definition: flddb.cxx:268
sal_uInt16 m_nOldSubType
Definition: flddb.hxx:34
#define USER_DATA_VERSION_1
Definition: flddb.cxx:29
static OUString GetTypeStr(sal_uInt16 nPos)
Definition: fldmgr.cxx:526
OUString sId
virtual void FillUserData() override
Definition: flddb.cxx:496
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:2816
OUString m_sOldColumnName
Definition: flddb.hxx:32
virtual sal_uInt16 GetGroup() override
Definition: flddb.cxx:258
static const SwFieldGroupRgn & GetGroupRange(bool bHtmlMode, sal_uInt16 nGrpId)
Definition: fldmgr.cxx:464
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:666
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