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  // If we have no stored SwWrtShell, it means we didn't do anything useful - no need to revoke.
74  if (SwWrtShell* pSh = GetWrtShell())
75  {
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 
83 // initialise TabPage
85 {
86  Init(); // general initialization
87 
88  const sal_Int32 nOldPos = m_xTypeLB->get_selected_index();
89  m_xTypeLB->freeze();
91 
92  m_xTypeLB->clear();
93 
94  if (!IsFieldEdit())
95  {
96  // initialise TypeListBox
98 
99  for(sal_uInt16 i = rRg.nStart; i < rRg.nEnd; ++i)
100  {
101  const SwFieldTypesEnum nTypeId = SwFieldMgr::GetTypeId(i);
102  m_xTypeLB->append(OUString::number(static_cast<sal_uInt16>(nTypeId)), SwFieldMgr::GetTypeStr(i));
103  }
104  }
105  else
106  {
107  const SwFieldTypesEnum nTypeId = GetCurField()->GetTypeId();
108  m_xTypeLB->append(OUString::number(static_cast<sal_uInt16>(nTypeId)),
110  }
111 
112  m_xTypeLB->thaw();
113 
114  // select old Pos
115  if (GetTypeSel() != -1)
116  m_xTypeLB->select(GetTypeSel());
117 
118  m_xFormatLB->clear();
119 
121  for( sal_uInt16 i = 0; i < nSize; ++i )
122  {
123  const sal_uInt16 nFormatId = GetFieldMgr().GetFormatId( SwFieldTypesEnum::DatabaseSetNumber, i );
124  OUString sId(OUString::number(nFormatId));
125  m_xFormatLB->append(sId, GetFieldMgr().GetFormatStr(SwFieldTypesEnum::DatabaseSetNumber, i));
126  if (SVX_NUM_ARABIC == nFormatId)
127  m_xFormatLB->set_active_id(sId);
128  }
129 
130  if (!IsFieldEdit())
131  {
132  if (nOldPos != -1)
133  m_xTypeLB->select(nOldPos);
134 
135  if (!m_sOldDBName.isEmpty())
136  {
138  }
139  else
140  {
142  if(pSh)
143  {
144  SwDBData aTmp(pSh->GetDBData());
145  m_xDatabaseTLB->Select(aTmp.sDataSource, aTmp.sCommand, OUString());
146  }
147  }
148  }
149 
150  if( !IsRefresh() )
151  {
152  const OUString sUserData = GetUserData();
153  sal_Int32 nIdx{ 0 };
154  if (sUserData.getToken(0, ';', nIdx).equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
155  {
156  const sal_uInt16 nVal = static_cast<sal_uInt16>(sUserData.getToken(0, ';', nIdx).toInt32());
157  if (nVal != USHRT_MAX)
158  {
159  for (sal_Int32 i = 0, nEntryCount = m_xTypeLB->n_children(); i < nEntryCount; ++i)
160  {
161  if (nVal == m_xTypeLB->get_id(i).toUInt32())
162  {
163  m_xTypeLB->select(i);
164  break;
165  }
166  }
167  }
168  }
169  }
170  TypeHdl(nullptr);
171 
172  m_xTypeLB->connect_changed(LINK(this, SwFieldDBPage, TypeListBoxHdl));
173  m_xTypeLB->connect_row_activated(LINK(this, SwFieldDBPage, TreeViewInsertHdl));
174 
175  if (IsFieldEdit())
176  {
177  m_xConditionED->save_value();
178  m_xValueED->save_value();
182  }
183 }
184 
186 {
187  OUString sTableName;
188  OUString sColumnName;
189  SwDBData aData;
190  sal_Bool bIsTable;
191  aData.sDataSource = m_xDatabaseTLB->GetDBName(sTableName, sColumnName, &bIsTable);
192  aData.sCommand = sTableName;
193  aData.nCommandType = bIsTable ? 0 : 1;
195  assert(pSh);
196 
197  SwDBManager* pDbManager = pSh->GetDoc()->GetDBManager();
198  if (pDbManager)
199  pDbManager->CommitLastRegistrations();
200 
201  if (aData.sDataSource.isEmpty())
202  aData = pSh->GetDBData();
203 
204  if(!aData.sDataSource.isEmpty()) // without database no new field command
205  {
206  const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
207  sal_uLong nFormat = 0;
208  sal_uInt16 nSubType = 0;
209 
210  OUString sDBName = aData.sDataSource
211  + OUStringChar(DB_DELIM)
212  + aData.sCommand
213  + OUStringChar(DB_DELIM)
214  + OUString::number(aData.nCommandType)
215  + OUStringChar(DB_DELIM);
216  if (!sColumnName.isEmpty())
217  {
218  sDBName += sColumnName + OUStringChar(DB_DELIM);
219  }
220  OUString aName = sDBName + m_xConditionED->get_text();
221 
222  switch (nTypeId)
223  {
225  nFormat = m_xNumFormatLB->GetFormat();
226  if (m_xNewFormatRB->get_sensitive() && m_xNewFormatRB->get_active())
228  aName = sDBName;
229  break;
230 
232  nFormat = m_xFormatLB->get_active_id().toUInt32();
233  break;
234  default: break;
235  }
236 
237  const OUString aVal(m_xValueED->get_text());
238  OUString sTempTableName;
239  OUString sTempColumnName;
240  OUString sTempDBName = m_xDatabaseTLB->GetDBName(sTempTableName, sTempColumnName);
241  bool bDBListBoxChanged = m_sOldDBName != sTempDBName ||
242  m_sOldTableName != sTempTableName || m_sOldColumnName != sTempColumnName;
243  if (!IsFieldEdit() ||
244  m_xConditionED->get_value_changed_from_saved() ||
245  m_xValueED->get_saved_value() != aVal ||
246  bDBListBoxChanged ||
247  m_nOldFormat != nFormat || m_nOldSubType != nSubType)
248  {
249  InsertField( nTypeId, nSubType, aName, aVal, nFormat);
250  }
251  }
252 
253  return false;
254 }
255 
256 std::unique_ptr<SfxTabPage> SwFieldDBPage::Create( weld::Container* pPage, weld::DialogController* pController,
257  const SfxItemSet *const pAttrSet )
258 {
259  return std::make_unique<SwFieldDBPage>( pPage, pController, pAttrSet );
260 }
261 
263 {
264  return GRP_DB;
265 }
266 
267 IMPL_LINK( SwFieldDBPage, TypeListBoxHdl, weld::TreeView&, rBox, void )
268 {
269  TypeHdl(&rBox);
270 }
271 
273 {
274  // save old ListBoxPos
275  const sal_Int32 nOld = GetTypeSel();
276 
277  // current ListBoxPos
278  SetTypeSel(m_xTypeLB->get_selected_index());
279 
280  if (GetTypeSel() == -1)
281  {
282  SetTypeSel(0);
283  m_xTypeLB->select(0);
284  }
285 
286  if (nOld == GetTypeSel())
287  return;
288 
290  assert(pSh);
291  bool bCond = false, bSetNo = false, bFormat = false, bDBFormat = false;
292  const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
293 
294  m_xDatabaseTLB->ShowColumns(nTypeId == SwFieldTypesEnum::Database);
295 
296  if (IsFieldEdit())
297  {
298  SwDBData aData;
299  OUString sColumnName;
300  if (nTypeId == SwFieldTypesEnum::Database)
301  {
302  aData = static_cast<SwDBField*>(GetCurField())->GetDBData();
303  sColumnName = static_cast<SwDBFieldType*>(GetCurField()->GetTyp())->GetColumnName();
304  }
305  else
306  {
307  aData = static_cast<SwDBNameInfField*>(GetCurField())->GetDBData(pSh->GetDoc());
308  }
309  m_xDatabaseTLB->Select(aData.sDataSource, aData.sCommand, sColumnName);
310  }
311 
312  switch (nTypeId)
313  {
315  {
316  bFormat = true;
317  bDBFormat = true;
318  m_xNumFormatLB->show();
319  m_xFormatLB->hide();
320 
321  weld::Widget& rWidget = m_xNumFormatLB->get_widget();
322  m_xNewFormatRB->set_accessible_relation_label_for(&rWidget);
324  m_xFormatLB->set_accessible_relation_label_for(nullptr);
325 
326  if (pBox) // type was changed by user
327  m_xDBFormatRB->set_active(true);
328 
329  if (IsFieldEdit())
330  {
331  if (GetCurField()->GetFormat() != 0 && GetCurField()->GetFormat() != SAL_MAX_UINT32)
332  m_xNumFormatLB->SetDefFormat(GetCurField()->GetFormat());
333 
334  if (GetCurField()->GetSubType() & nsSwExtendedSubType::SUB_OWN_FMT)
335  m_xNewFormatRB->set_active(true);
336  else
337  m_xDBFormatRB->set_active(true);
338  }
339  break;
340  }
342  bSetNo = true;
343  [[fallthrough]];
345  bCond = true;
346  if (IsFieldEdit())
347  {
348  m_xConditionED->set_text(GetCurField()->GetPar1());
349  m_xValueED->set_text(GetCurField()->GetPar2());
350  }
351  break;
352 
354  break;
355 
357  {
358  bFormat = true;
359  m_xNewFormatRB->set_active(true);
360  m_xNumFormatLB->hide();
361  m_xFormatLB->show();
362 
363  m_xNewFormatRB->set_accessible_relation_label_for(m_xFormatLB.get());
364  m_xFormatLB->set_accessible_relation_labeled_by(m_xNewFormatRB.get());
365  weld::Widget& rWidget = m_xNumFormatLB->get_widget();
366  rWidget.set_accessible_relation_label_for(nullptr);
367 
368  if( IsFieldEdit() )
369  {
370  for (sal_Int32 nI = m_xFormatLB->get_count(); nI;)
371  {
372  if (GetCurField()->GetFormat() == m_xFormatLB->get_id(--nI).toUInt32())
373  {
374  m_xFormatLB->set_active( nI );
375  break;
376  }
377  }
378  }
379  break;
380  }
381  default: break;
382  }
383 
384  m_xCondition->set_sensitive(bCond);
385  m_xValue->set_sensitive(bSetNo);
386  if (nTypeId != SwFieldTypesEnum::Database)
387  {
388  m_xDBFormatRB->set_sensitive(bDBFormat);
389  m_xNewFormatRB->set_sensitive(bDBFormat || bFormat);
390  m_xNumFormatLB->set_sensitive(bDBFormat);
391  m_xFormatLB->set_sensitive(bFormat);
392  }
393  m_xFormat->set_sensitive(bDBFormat || bFormat);
394 
395  if (!IsFieldEdit())
396  {
397  m_xValueED->set_text(OUString());
398  if (bCond)
399  m_xConditionED->set_text("TRUE");
400  else
401  m_xConditionED->set_text(OUString());
402  }
403 
404  CheckInsert();
405 }
406 
408 {
409  m_xNewFormatRB->set_active(true);
410  m_xNumFormatLB->CallSelectHdl();
411 }
412 
414 {
415  bool bInsert = true;
416  const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
417 
418  std::unique_ptr<weld::TreeIter> xIter(m_xDatabaseTLB->make_iterator());
419  if (m_xDatabaseTLB->get_selected(xIter.get()))
420  {
421  bool bEntry = m_xDatabaseTLB->iter_parent(*xIter);
422 
423  if (nTypeId == SwFieldTypesEnum::Database && bEntry)
424  bEntry = m_xDatabaseTLB->iter_parent(*xIter);
425 
426  bInsert &= bEntry;
427  }
428  else
429  bInsert = false;
430 
432  {
433  bool bHasValue = !m_xValueED->get_text().isEmpty();
434 
435  bInsert &= bHasValue;
436  }
437 
438  EnableInsert(bInsert);
439 }
440 
441 IMPL_LINK(SwFieldDBPage, TreeSelectHdl, weld::TreeView&, rBox, void)
442 {
443  std::unique_ptr<weld::TreeIter> xIter(rBox.make_iterator());
444  if (rBox.get_selected(xIter.get()))
445  {
446  const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
447 
448  bool bEntry = m_xDatabaseTLB->iter_parent(*xIter);
449 
450  if (nTypeId == SwFieldTypesEnum::Database && bEntry)
451  bEntry = m_xDatabaseTLB->iter_parent(*xIter);
452 
453  CheckInsert();
454 
455  if (nTypeId == SwFieldTypesEnum::Database)
456  {
457  bool bNumFormat = false;
458 
459  if (bEntry)
460  {
461  OUString sTableName;
462  OUString sColumnName;
463  sal_Bool bIsTable;
464  OUString sDBName = m_xDatabaseTLB->GetDBName(sTableName, sColumnName, &bIsTable);
465  bNumFormat = GetFieldMgr().IsDBNumeric(sDBName,
466  sTableName,
467  bIsTable,
468  sColumnName);
469  if (!IsFieldEdit())
470  m_xDBFormatRB->set_active(true);
471  }
472 
473  m_xDBFormatRB->set_sensitive(bNumFormat);
474  m_xNewFormatRB->set_sensitive(bNumFormat);
475  m_xNumFormatLB->set_sensitive(bNumFormat);
476  m_xFormat->set_sensitive(bNumFormat);
477  }
478  }
479 }
480 
482 {
483  if (SwWrtShell* pSh = CheckAndGetWrtShell())
484  {
485  OUString sNewDB
486  = SwDBManager::LoadAndRegisterDataSource(GetFrameWeld(), pSh->GetDoc()->GetDocShell());
487  if (!sNewDB.isEmpty())
488  {
489  m_xDatabaseTLB->AddDataSource(sNewDB);
490  }
491  }
492 }
493 
494 // Modify
496 {
497  CheckInsert();
498 }
499 
501 {
502  const sal_Int32 nEntryPos = m_xTypeLB->get_selected_index();
503  const sal_uInt16 nTypeSel = ( -1 == nEntryPos )
504  ? USHRT_MAX : m_xTypeLB->get_id(nEntryPos).toUInt32();
505  SetUserData(USER_DATA_VERSION ";" + OUString::number( nTypeSel ));
506 }
507 
509 {
510  m_xTypeLB->select_id(OUString::number(static_cast<sal_uInt16>(SwFieldTypesEnum::Database)));
511  TypeListBoxHdl(*m_xTypeLB);
512  const SwDBData& rData = SW_MOD()->GetDBConfig()->GetAddressSource();
513  m_xDatabaseTLB->Select(rData.sDataSource, rData.sCommand, OUString());
514 }
515 
517 {
518  // We need to remember the shell to be able to call correct SwDBManager
520  m_xDatabaseTLB->SetWrtShell(rSh);
521 }
522 
524 {
525  SwWrtShell* pSh = GetWrtShell();
526  if (!pSh)
527  {
528  pSh = ::GetActiveWrtShell();
529  if (pSh) // this is not guaranteed: e.g., activating print preview with dialog active
530  SetWrtShell(*pSh);
531  }
532  return pSh;
533 }
534 
535 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
IMPL_LINK(SwFieldDBPage, TypeListBoxHdl, weld::TreeView &, rBox, void)
Definition: flddb.cxx:267
sal_uInt16 const nStart
Definition: fldmgr.hxx:63
void RevokeLastRegistrations()
Revoke not committed registrations in case of mail merge cancel.
Definition: dbmgr.cxx:3261
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:185
const char aData[]
Definition: ww8scan.hxx:47
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:107
virtual void Reset(const SfxItemSet *rSet) override
Definition: flddb.cxx:84
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:407
static SwFieldTypesEnum GetTypeId(sal_uInt16 nPos)
Definition: fldmgr.cxx:520
void SetWrtShell(SwWrtShell &rSh)
Definition: flddb.cxx:516
#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:670
std::unique_ptr< SwDBTreeList > m_xDatabaseTLB
Definition: flddb.hxx:37
void CommitLastRegistrations()
Accept not committed registrations.
Definition: dbmgr.cxx:3289
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:413
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:20
void ActivateMailMergeAddress()
Definition: flddb.cxx:508
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: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:117
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: flddb.cxx:256
sal_Int32 GetTypeSel() const
Definition: fldpage.hxx:45
SwField * GetCurField()
Definition: fldpage.hxx:51
SwWrtShell * CheckAndGetWrtShell()
Definition: flddb.cxx:523
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:284
#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:199
SwWrtShell * GetWrtShell()
Definition: fldpage.hxx:52
virtual ~SwFieldDBPage() override
Definition: flddb.cxx:71
void SetWrtShell(SwWrtShell *m_pWrtShell)
Definition: fldpage.cxx:348
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:207
void TypeHdl(const weld::TreeView *)
Definition: flddb.cxx:272
sal_uInt16 m_nOldSubType
Definition: flddb.hxx:34
#define USER_DATA_VERSION_1
Definition: flddb.cxx:33
static OUString GetTypeStr(sal_uInt16 nPos)
Definition: fldmgr.cxx:526
OUString sId
virtual void FillUserData() override
Definition: flddb.cxx:500
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:2817
OUString m_sOldColumnName
Definition: flddb.hxx:32
virtual sal_uInt16 GetGroup() override
Definition: flddb.cxx:262
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:664
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