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#include <o3tl/string_view.hxx>
29
30#define USER_DATA_VERSION_1 "1"
31#define USER_DATA_VERSION USER_DATA_VERSION_1
32
34 : SwFieldPage(pPage, pController, "modules/swriter/ui/flddbpage.ui", "FieldDbPage", pCoreSet)
35 , m_nOldFormat(0)
36 , m_nOldSubType(0)
37 , m_xTypeLB(m_xBuilder->weld_tree_view("type"))
38 , m_xDatabaseTLB(new SwDBTreeList(m_xBuilder->weld_tree_view("select")))
39 , m_xAddDBPB(m_xBuilder->weld_button("browse"))
40 , m_xCondition(m_xBuilder->weld_widget("condgroup"))
41 , m_xConditionED(new ConditionEdit(m_xBuilder->weld_entry("condition")))
42 , m_xValue(m_xBuilder->weld_widget("recgroup"))
43 , m_xValueED(m_xBuilder->weld_entry("recnumber"))
44 , m_xDBFormatRB(m_xBuilder->weld_radio_button("fromdatabasecb"))
45 , m_xNewFormatRB(m_xBuilder->weld_radio_button("userdefinedcb"))
46 , m_xNumFormatLB(new NumFormatListBox(m_xBuilder->weld_combo_box("numformat")))
47 , m_xFormatLB(m_xBuilder->weld_combo_box("format"))
48 , m_xFormat(m_xBuilder->weld_widget("formatframe"))
49{
50 SetTypeSel(-1); //TODO
51
52 m_xTypeLB->make_sorted();
53 m_xFormatLB->make_sorted();
54
55 auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH;
56 auto nHeight = m_xTypeLB->get_height_rows(10);
57 m_xTypeLB->set_size_request(nWidth, nHeight);
58 m_xDatabaseTLB->set_size_request(nWidth*2, nHeight);
59
60 m_xNumFormatLB->connect_changed(LINK(this, SwFieldDBPage, NumSelectHdl));
61 m_xDatabaseTLB->connect_changed(LINK(this, SwFieldDBPage, TreeSelectHdl));
62 m_xDatabaseTLB->connect_row_activated(LINK(this, SwFieldDBPage, TreeViewInsertHdl));
63
64 m_xValueED->connect_changed(LINK(this, SwFieldDBPage, ModifyHdl));
65 m_xAddDBPB->connect_clicked(LINK(this, SwFieldDBPage, AddDBHdl));
66
67 // uitests
68 m_xTypeLB->set_buildable_name(m_xTypeLB->get_buildable_name() + "-db");
69 m_xNumFormatLB->set_buildable_name(m_xNumFormatLB->get_buildable_name() + "-db");
70 m_xFormatLB->set_buildable_name(m_xFormatLB->get_buildable_name() + "-db");
71}
72
74{
75 // If we have no stored SwWrtShell, it means we didn't do anything useful - no need to revoke.
77 {
78 // This would cleanup in the case of cancelled dialog
79 SwDBManager* pDbManager = pSh->GetDoc()->GetDBManager();
80 if (pDbManager)
81 pDbManager->RevokeLastRegistrations();
82 }
83}
84
85// initialise TabPage
87{
88 Init(); // general initialization
89
90 const sal_Int32 nOldPos = m_xTypeLB->get_selected_index();
91 m_xTypeLB->freeze();
93
94 m_xTypeLB->clear();
95
96 if (!IsFieldEdit())
97 {
98 // initialise TypeListBox
100
101 for(sal_uInt16 i = rRg.nStart; i < rRg.nEnd; ++i)
102 {
104 m_xTypeLB->append(OUString::number(static_cast<sal_uInt16>(nTypeId)), SwFieldMgr::GetTypeStr(i));
105 }
106 }
107 else
108 {
109 const SwFieldTypesEnum nTypeId = GetCurField()->GetTypeId();
110 m_xTypeLB->append(OUString::number(static_cast<sal_uInt16>(nTypeId)),
112 }
113
114 m_xTypeLB->thaw();
115
116 // select old Pos
117 if (GetTypeSel() != -1)
118 m_xTypeLB->select(GetTypeSel());
119
120 m_xFormatLB->clear();
121
123 for( sal_uInt16 i = 0; i < nSize; ++i )
124 {
125 const sal_uInt16 nFormatId = GetFieldMgr().GetFormatId( SwFieldTypesEnum::DatabaseSetNumber, i );
126 OUString sId(OUString::number(nFormatId));
128 if (SVX_NUM_ARABIC == nFormatId)
129 m_xFormatLB->set_active_id(sId);
130 }
131
132 if (!IsFieldEdit())
133 {
134 if (nOldPos != -1)
135 m_xTypeLB->select(nOldPos);
136
137 if (!m_sOldDBName.isEmpty())
138 {
140 }
141 else
142 {
143 if (SwWrtShell *pSh = CheckAndGetWrtShell())
144 {
145 SwDBData aTmp(pSh->GetDBData());
146 m_xDatabaseTLB->Select(aTmp.sDataSource, aTmp.sCommand, u"");
147 }
148 }
149 }
150
151 if( !IsRefresh() )
152 {
153 const OUString sUserData = GetUserData();
154 sal_Int32 nIdx{ 0 };
155 if (o3tl::equalsIgnoreAsciiCase(o3tl::getToken(sUserData, 0, ';', nIdx), u"" USER_DATA_VERSION_1))
156 {
157 const sal_uInt16 nVal = o3tl::narrowing<sal_uInt16>(o3tl::toInt32(o3tl::getToken(sUserData, 0, ';', nIdx)));
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
186// SwFieldDBPage may ask for password to select current document's data source,
187// so only do that when activating the page, not when dialog is creating all pages
189
191{
192 OUString sTableName;
193 OUString sColumnName;
195 sal_Bool bIsTable;
196 aData.sDataSource = m_xDatabaseTLB->GetDBName(sTableName, sColumnName, &bIsTable);
197 aData.sCommand = sTableName;
198 aData.nCommandType = bIsTable ? 0 : 1;
199
200 if (SwWrtShell *pSh = CheckAndGetWrtShell())
201 {
202 SwDBManager* pDbManager = pSh->GetDoc()->GetDBManager();
203 if (pDbManager)
204 pDbManager->CommitLastRegistrations();
205
206 if (aData.sDataSource.isEmpty())
207 aData = pSh->GetDBData();
208 }
209
210 if(!aData.sDataSource.isEmpty()) // without database no new field command
211 {
212 const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
213 sal_uInt32 nFormat = 0;
214 sal_uInt16 nSubType = 0;
215
216 OUString sDBName = aData.sDataSource
217 + OUStringChar(DB_DELIM)
218 + aData.sCommand
219 + OUStringChar(DB_DELIM)
220 + OUString::number(aData.nCommandType)
221 + OUStringChar(DB_DELIM);
222 if (!sColumnName.isEmpty())
223 {
224 sDBName += sColumnName + OUStringChar(DB_DELIM);
225 }
226 OUString aName = sDBName + m_xConditionED->get_text();
227
228 switch (nTypeId)
229 {
231 nFormat = m_xNumFormatLB->GetFormat();
232 if (m_xNewFormatRB->get_sensitive() && m_xNewFormatRB->get_active())
234 aName = sDBName;
235 break;
236
238 nFormat = m_xFormatLB->get_active_id().toUInt32();
239 break;
240 default: break;
241 }
242
243 const OUString aVal(m_xValueED->get_text());
244 OUString sTempTableName;
245 OUString sTempColumnName;
246 OUString sTempDBName = m_xDatabaseTLB->GetDBName(sTempTableName, sTempColumnName);
247 bool bDBListBoxChanged = m_sOldDBName != sTempDBName ||
248 m_sOldTableName != sTempTableName || m_sOldColumnName != sTempColumnName;
249 if (!IsFieldEdit() ||
250 m_xConditionED->get_value_changed_from_saved() ||
251 m_xValueED->get_saved_value() != aVal ||
252 bDBListBoxChanged ||
253 m_nOldFormat != nFormat || m_nOldSubType != nSubType)
254 {
255 InsertField( nTypeId, nSubType, aName, aVal, nFormat);
256 }
257 }
258
259 return false;
260}
261
262std::unique_ptr<SfxTabPage> SwFieldDBPage::Create( weld::Container* pPage, weld::DialogController* pController,
263 const SfxItemSet *const pAttrSet )
264{
265 return std::make_unique<SwFieldDBPage>( pPage, pController, pAttrSet );
266}
267
269{
270 return GRP_DB;
271}
272
273IMPL_LINK( SwFieldDBPage, TypeListBoxHdl, weld::TreeView&, rBox, void )
274{
275 TypeHdl(&rBox);
276}
277
279{
280 // save old ListBoxPos
281 const sal_Int32 nOld = GetTypeSel();
282
283 // current ListBoxPos
284 SetTypeSel(m_xTypeLB->get_selected_index());
285
286 if (GetTypeSel() == -1)
287 {
288 SetTypeSel(0);
289 m_xTypeLB->select(0);
290 }
291
292 if (nOld == GetTypeSel())
293 return;
294
295 bool bCond = false, bSetNo = false, bFormat = false, bDBFormat = false;
296 const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
297
298 m_xDatabaseTLB->ShowColumns(nTypeId == SwFieldTypesEnum::Database);
299
300 if (IsFieldEdit())
301 {
303 OUString sColumnName;
304 if (nTypeId == SwFieldTypesEnum::Database)
305 {
306 if (auto const*const pField = dynamic_cast<SwDBField*>(GetCurField()))
307 {
308 aData = pField->GetDBData();
309 sColumnName = static_cast<SwDBFieldType*>(GetCurField()->GetTyp())->GetColumnName();
310 }
311 }
312 else
313 {
314 if (auto *const pField = dynamic_cast<SwDBNameInfField*>(GetCurField()))
315 {
317 aData = pField->GetDBData(pSh->GetDoc());
318 }
319 }
320 m_xDatabaseTLB->Select(aData.sDataSource, aData.sCommand, sColumnName);
321 }
322
323 switch (nTypeId)
324 {
326 {
327 bFormat = true;
328 bDBFormat = true;
329 m_xNumFormatLB->show();
330 m_xFormatLB->hide();
331
332 weld::Widget& rWidget = m_xNumFormatLB->get_widget();
334
335 if (pBox) // type was changed by user
336 m_xDBFormatRB->set_active(true);
337
338 if (IsFieldEdit())
339 {
341 m_xNumFormatLB->SetDefFormat(GetCurField()->GetFormat());
342
344 m_xNewFormatRB->set_active(true);
345 else
346 m_xDBFormatRB->set_active(true);
347 }
348 break;
349 }
351 bSetNo = true;
352 [[fallthrough]];
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
363 break;
364
366 {
367 bFormat = true;
368 m_xNewFormatRB->set_active(true);
369 m_xNumFormatLB->hide();
370 m_xFormatLB->show();
371
372 m_xFormatLB->set_accessible_relation_labeled_by(m_xNewFormatRB.get());
373
374 if( IsFieldEdit() )
375 {
376 for (sal_Int32 nI = m_xFormatLB->get_count(); nI;)
377 {
378 if (GetCurField()->GetFormat() == m_xFormatLB->get_id(--nI).toUInt32())
379 {
380 m_xFormatLB->set_active( nI );
381 break;
382 }
383 }
384 }
385 break;
386 }
387 default: break;
388 }
389
390 m_xCondition->set_sensitive(bCond);
391 m_xValue->set_sensitive(bSetNo);
392 if (nTypeId != SwFieldTypesEnum::Database)
393 {
394 m_xDBFormatRB->set_sensitive(bDBFormat);
395 m_xNewFormatRB->set_sensitive(bDBFormat || bFormat);
396 m_xNumFormatLB->set_sensitive(bDBFormat);
397 m_xFormatLB->set_sensitive(bFormat);
398 }
399 m_xFormat->set_sensitive(bDBFormat || bFormat);
400
401 if (!IsFieldEdit())
402 {
403 m_xValueED->set_text(OUString());
404 if (bCond)
405 m_xConditionED->set_text("TRUE");
406 else
407 m_xConditionED->set_text(OUString());
408 }
409
410 CheckInsert();
411}
412
414{
415 m_xNewFormatRB->set_active(true);
416 m_xNumFormatLB->CallSelectHdl();
417}
418
420{
421 bool bInsert = true;
422 const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
423
424 std::unique_ptr<weld::TreeIter> xIter(m_xDatabaseTLB->make_iterator());
425 if (m_xDatabaseTLB->get_selected(xIter.get()))
426 {
427 bool bEntry = m_xDatabaseTLB->iter_parent(*xIter);
428
429 if (nTypeId == SwFieldTypesEnum::Database && bEntry)
430 bEntry = m_xDatabaseTLB->iter_parent(*xIter);
431
432 bInsert &= bEntry;
433 }
434 else
435 bInsert = false;
436
438 {
439 bool bHasValue = !m_xValueED->get_text().isEmpty();
440
441 bInsert &= bHasValue;
442 }
443
444 EnableInsert(bInsert);
445}
446
447IMPL_LINK(SwFieldDBPage, TreeSelectHdl, weld::TreeView&, rBox, void)
448{
449 std::unique_ptr<weld::TreeIter> xIter(rBox.make_iterator());
450 if (!rBox.get_selected(xIter.get()))
451 return;
452
453 const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
454
455 bool bEntry = m_xDatabaseTLB->iter_parent(*xIter);
456
457 if (nTypeId == SwFieldTypesEnum::Database && bEntry)
458 bEntry = m_xDatabaseTLB->iter_parent(*xIter);
459
460 CheckInsert();
461
462 if (nTypeId != SwFieldTypesEnum::Database)
463 return;
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
488{
489 if (SwWrtShell* pSh = CheckAndGetWrtShell())
490 {
491 OUString sNewDB
492 = SwDBManager::LoadAndRegisterDataSource(GetFrameWeld(), pSh->GetDoc()->GetDocShell());
493 if (!sNewDB.isEmpty())
494 {
495 m_xDatabaseTLB->AddDataSource(sNewDB);
496 }
497 }
498}
499
500// Modify
502{
503 CheckInsert();
504}
505
507{
508 const sal_Int32 nEntryPos = m_xTypeLB->get_selected_index();
509 const sal_uInt16 nTypeSel = ( -1 == nEntryPos )
510 ? USHRT_MAX : m_xTypeLB->get_id(nEntryPos).toUInt32();
511 SetUserData(USER_DATA_VERSION ";" + OUString::number( nTypeSel ));
512}
513
515{
516 m_xTypeLB->select_id(OUString::number(static_cast<sal_uInt16>(SwFieldTypesEnum::Database)));
517 TypeListBoxHdl(*m_xTypeLB);
518 const SwDBData& rData = SW_MOD()->GetDBConfig()->GetAddressSource();
519 m_xDatabaseTLB->Select(rData.sDataSource, rData.sCommand, u"");
520}
521
523{
524 // We need to remember the shell to be able to call correct SwDBManager
526 m_xDatabaseTLB->SetWrtShell(rSh);
527}
528
530{
531 SwWrtShell* pSh = GetWrtShell();
532 if (!pSh)
533 {
534 pSh = ::GetActiveWrtShell();
535 if (pSh) // this is not guaranteed: e.g., activating print preview with dialog active
536 SetWrtShell(*pSh);
537 }
538 return pSh;
539}
540
541/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetUserData(const OUString &rString)
const OUString & GetUserData() const
void RevokeLastRegistrations()
Revoke not committed registrations in case of mail merge cancel.
Definition: dbmgr.cxx:3239
static OUString LoadAndRegisterDataSource(weld::Window *pParent, SwDocShell *pDocShell=nullptr)
Loads a data source from file and registers it.
Definition: dbmgr.cxx:2788
void CommitLastRegistrations()
Accept not committed registrations.
Definition: dbmgr.cxx:3267
virtual void FillUserData() override
Definition: flddb.cxx:506
std::unique_ptr< weld::Entry > m_xValueED
Definition: flddb.hxx:42
SwFieldDBPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: flddb.cxx:33
void TypeHdl(const weld::TreeView *)
Definition: flddb.cxx:278
void ActivateMailMergeAddress()
Definition: flddb.cxx:514
OUString m_sOldDBName
Definition: flddb.hxx:30
virtual ~SwFieldDBPage() override
Definition: flddb.cxx:73
sal_uInt16 m_nOldSubType
Definition: flddb.hxx:34
std::unique_ptr< ConditionEdit > m_xConditionED
Definition: flddb.hxx:40
std::unique_ptr< NumFormatListBox > m_xNumFormatLB
Definition: flddb.hxx:45
void CheckInsert()
Definition: flddb.cxx:419
std::unique_ptr< weld::Widget > m_xCondition
Definition: flddb.hxx:39
OUString m_sOldColumnName
Definition: flddb.hxx:32
virtual void Reset(const SfxItemSet *rSet) override
Definition: flddb.cxx:86
std::unique_ptr< weld::RadioButton > m_xDBFormatRB
Definition: flddb.hxx:43
virtual bool DeferResetToFirstActivation() override
Definition: flddb.cxx:188
std::unique_ptr< weld::RadioButton > m_xNewFormatRB
Definition: flddb.hxx:44
virtual sal_uInt16 GetGroup() override
Definition: flddb.cxx:268
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: flddb.cxx:262
sal_uInt32 m_nOldFormat
Definition: flddb.hxx:33
std::unique_ptr< weld::Button > m_xAddDBPB
Definition: flddb.hxx:38
std::unique_ptr< weld::ComboBox > m_xFormatLB
Definition: flddb.hxx:46
OUString m_sOldTableName
Definition: flddb.hxx:31
std::unique_ptr< weld::Widget > m_xFormat
Definition: flddb.hxx:47
std::unique_ptr< weld::TreeView > m_xTypeLB
Definition: flddb.hxx:36
SwWrtShell * CheckAndGetWrtShell()
Definition: flddb.cxx:529
std::unique_ptr< SwDBTreeList > m_xDatabaseTLB
Definition: flddb.hxx:37
void SetWrtShell(SwWrtShell &rSh)
Definition: flddb.cxx:522
std::unique_ptr< weld::Widget > m_xValue
Definition: flddb.hxx:41
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: flddb.cxx:190
static const SwFieldGroupRgn & GetGroupRange(bool bHtmlMode, sal_uInt16 nGrpId)
Definition: fldmgr.cxx:470
sal_uInt16 GetFormatCount(SwFieldTypesEnum nTypeId, bool bHtmlMode) const
Definition: fldmgr.cxx:676
sal_uInt16 GetFormatId(SwFieldTypesEnum nTypeId, sal_uInt32 nFormatId) const
Definition: fldmgr.cxx:773
static const OUString & GetTypeStr(sal_uInt16 nPos)
Definition: fldmgr.cxx:532
static sal_uInt16 GetPos(SwFieldTypesEnum nTypeId)
Definition: fldmgr.cxx:554
static SwFieldTypesEnum GetTypeId(sal_uInt16 nPos)
Definition: fldmgr.cxx:526
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:116
sal_Int32 GetTypeSel() const
Definition: fldpage.hxx:45
void SetWrtShell(SwWrtShell *m_pWrtShell)
Definition: fldpage.cxx:344
void Init()
Definition: fldpage.cxx:64
void SetTypeSel(sal_Int32 nSet)
Definition: fldpage.hxx:46
SwFieldMgr & GetFieldMgr()
Definition: fldpage.hxx:81
bool IsFieldEdit() const
Definition: fldpage.hxx:62
bool IsFieldDlgHtmlMode() const
Definition: fldpage.hxx:49
void EnableInsert(bool bEnable)
Definition: fldpage.cxx:322
bool IsRefresh() const
Definition: fldpage.hxx:50
SwField * GetCurField()
Definition: fldpage.hxx:51
SwWrtShell * GetWrtShell()
Definition: fldpage.hxx:52
SwFieldTypesEnum GetTypeId() const
Definition: fldbas.cxx:270
virtual OUString GetPar1() const
Definition: fldbas.cxx:334
virtual sal_uInt16 GetSubType() const
Definition: fldbas.cxx:355
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
Definition: fldbas.hxx:407
SwFieldType * GetTyp() const
Definition: fldbas.hxx:402
virtual OUString GetPar2() const
Definition: fldbas.cxx:339
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
virtual void set_accessible_relation_labeled_by(weld::Widget *pLabel)=0
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:19
float u
SwFieldTypesEnum
List of FieldTypes at UI.
Definition: fldbas.hxx:98
#define USER_DATA_VERSION_1
Definition: flddb.cxx:30
#define USER_DATA_VERSION
Definition: flddb.cxx:31
IMPL_LINK(SwFieldDBPage, TypeListBoxHdl, weld::TreeView &, rBox, void)
Definition: flddb.cxx:273
IMPL_LINK_NOARG(SwFieldDBPage, NumSelectHdl, weld::ComboBox &, void)
Definition: flddb.cxx:413
@ GRP_DB
Definition: fldmgr.hxx:58
#define FIELD_COLUMN_WIDTH
Definition: fldpage.hxx:25
OUString aName
constexpr OUStringLiteral aData
Definition: ww8scan.hxx:48
int i
const SwExtendedSubType SUB_OWN_FMT
SwDBField: Don't accept formatting from database.
Definition: fldbas.hxx:218
bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
OUString sDataSource
Definition: swdbdata.hxx:30
OUString sCommand
Definition: swdbdata.hxx:31
sal_uInt16 nStart
Definition: fldmgr.hxx:64
sal_uInt16 nEnd
Definition: fldmgr.hxx:65
SVX_NUM_ARABIC
SwWrtShell * GetActiveWrtShell()
Definition: swmodul1.cxx:108
#define SW_MOD()
Definition: swmodule.hxx:254
#define DB_DELIM
Definition: swtypes.hxx:130
unsigned char sal_Bool
#define SAL_MAX_UINT32
OUString sId