LibreOffice Module sw (master)  1
flddok.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 <flddat.hxx>
21 #include <docufld.hxx>
22 #include <strings.hrc>
23 #include <chpfld.hxx>
24 #include "flddok.hxx"
25 #include <swmodule.hxx>
26 #include <wrtsh.hxx>
27 #include <svl/numformat.hxx>
28 #include <svl/zformat.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/flddocumentpage.ui",
35  "FieldDocumentPage", pCoreSet)
36  , nOldSel(0)
37  , nOldFormat(0)
38  , m_xTypeLB(m_xBuilder->weld_tree_view("type"))
39  , m_xSelection(m_xBuilder->weld_widget("selectframe"))
40  , m_xSelectionLB(m_xBuilder->weld_tree_view("select"))
41  , m_xValueFT(m_xBuilder->weld_label("valueft"))
42  , m_xValueED(m_xBuilder->weld_entry("value"))
43  , m_xLevelFT(m_xBuilder->weld_label("levelft"))
44  , m_xLevelED(m_xBuilder->weld_spin_button("level"))
45  , m_xDateFT(m_xBuilder->weld_label("daysft"))
46  , m_xTimeFT(m_xBuilder->weld_label("minutesft"))
47  , m_xDateOffsetED(m_xBuilder->weld_spin_button("offset"))
48  , m_xFormat(m_xBuilder->weld_widget("formatframe"))
49  , m_xFormatLB(m_xBuilder->weld_tree_view("format"))
50  , m_xNumFormatLB(new SwNumFormatTreeView(m_xBuilder->weld_tree_view("numformat")))
51  , m_xFixedCB(m_xBuilder->weld_check_button("fixed"))
52 {
53  m_xTypeLB->make_sorted();
54  m_xFormatLB->make_sorted();
55 
56  auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH;
57  auto nHeight = m_xTypeLB->get_height_rows(10);
58 
59  m_xTypeLB->set_size_request(nWidth, nHeight);
60  m_xSelectionLB->set_size_request(nWidth, nHeight);
61  m_xFormatLB->set_size_request(nWidth * 2, nHeight);
62 
63  m_xSelectionLB->connect_row_activated(LINK(this, SwFieldDokPage, TreeViewInsertHdl));
64  m_xFormatLB->connect_row_activated(LINK(this, SwFieldDokPage, TreeViewInsertHdl));
65  m_xNumFormatLB->connect_row_activated(LINK(this, SwFieldDokPage, NumFormatHdl));
66 
67  m_xLevelED->set_max(MAXLEVEL);
68  m_xDateOffsetED->set_range(INT_MIN, INT_MAX);
69  //enable 'active' language selection
70  m_xNumFormatLB->SetShowLanguageControl(true);
71 }
72 
74 {
75 }
76 
78 {
80  Init(); // general initialisation
81 
82  // initialise TypeListBox
84 
85  m_xTypeLB->freeze();
86  m_xTypeLB->clear();
87 
88  if (!IsFieldEdit())
89  {
90  bool bPage = false;
91  // fill Type-Listbox
92  for(sal_uInt16 i = rRg.nStart; i < rRg.nEnd; ++i)
93  {
94  const SwFieldTypesEnum nTypeId = SwFieldMgr::GetTypeId(i);
95 
96  switch (nTypeId)
97  {
101  if (!bPage)
102  {
103  m_xTypeLB->append(OUString::number(USHRT_MAX), SwResId(FMT_REF_PAGE));
104  bPage = true;
105  }
106  break;
107 
108  default:
109  m_xTypeLB->append(OUString::number(static_cast<sal_uInt16>(nTypeId)), SwFieldMgr::GetTypeStr(i));
110  break;
111  }
112  }
113  }
114  else
115  {
116  const SwField* pCurField = GetCurField();
117  SwFieldTypesEnum nTypeId = pCurField->GetTypeId();
118  if (nTypeId == SwFieldTypesEnum::FixedDate)
119  nTypeId = SwFieldTypesEnum::Date;
120  if (nTypeId == SwFieldTypesEnum::FixedTime)
121  nTypeId = SwFieldTypesEnum::Time;
122  m_xTypeLB->append(OUString::number(static_cast<sal_uInt16>(nTypeId)), SwFieldMgr::GetTypeStr(SwFieldMgr::GetPos(nTypeId)));
123  m_xNumFormatLB->SetAutomaticLanguage(pCurField->IsAutomaticLanguage());
124  SwWrtShell *pSh = GetWrtShell();
125  if(!pSh)
126  pSh = ::GetActiveWrtShell();
127  if(pSh)
128  {
129  const SvNumberformat* pFormat = pSh->GetNumberFormatter()->GetEntry(pCurField->GetFormat());
130  if(pFormat)
131  m_xNumFormatLB->SetLanguage(pFormat->GetLanguage());
132  }
133  }
134 
135 
136  m_xTypeLB->thaw();
137 
138  // select old Pos
140 
141  m_xTypeLB->connect_row_activated(LINK(this, SwFieldDokPage, TreeViewInsertHdl));
142  m_xTypeLB->connect_changed(LINK(this, SwFieldDokPage, TypeHdl));
143  m_xFormatLB->connect_changed(LINK(this, SwFieldDokPage, FormatHdl));
144 
145  if( !IsRefresh() )
146  {
147  const OUString sUserData = GetUserData();
148  sal_Int32 nIdx{ 0 };
149  if (sUserData.getToken(0, ';', nIdx).equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
150  {
151  const sal_uInt16 nVal = static_cast< sal_uInt16 >(sUserData.getToken(0, ';', nIdx).toInt32());
152  if(nVal != USHRT_MAX)
153  {
154  for (int i = 0, nEntryCount = m_xTypeLB->n_children(); i < nEntryCount; i++)
155  {
156  if (nVal == m_xTypeLB->get_id(i).toUInt32())
157  {
158  m_xTypeLB->select(i);
159  break;
160  }
161  }
162  }
163  }
164  }
165  TypeHdl(*m_xTypeLB);
166 
167  if (IsFieldEdit())
168  {
169  nOldSel = m_xSelectionLB->get_selected_index();
171  m_xFixedCB->save_state();
172  m_xValueED->save_value();
173  m_xLevelED->save_value();
174  m_xDateOffsetED->save_value();
175  }
176 }
177 
179 {
180  // save old ListBoxPos
181  const sal_Int32 nOld = GetTypeSel();
182 
183  // current ListBoxPos
184  SetTypeSel(m_xTypeLB->get_selected_index());
185 
186  if(GetTypeSel() == -1)
187  {
188  SetTypeSel(0);
189  m_xTypeLB->select(0);
190  }
191 
192  if (nOld == GetTypeSel())
193  return;
194 
195  size_t nCount;
196 
197  m_xDateFT->hide();
198  m_xTimeFT->hide();
199 
200  SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
201 
202  // fill Selection-Listbox
203  m_xSelectionLB->clear();
204 
205  if (nTypeId != SwFieldTypesEnum::Unknown)
206  {
207  std::vector<OUString> aLst;
208  GetFieldMgr().GetSubTypes(nTypeId, aLst);
209 
210  if (nTypeId != SwFieldTypesEnum::Author)
211  nCount = aLst.size();
212  else
213  nCount = GetFieldMgr().GetFormatCount(nTypeId, IsFieldDlgHtmlMode());
214 
215  for (size_t i = 0; i < nCount; ++i)
216  {
217  if (!IsFieldEdit())
218  {
219  OUString sId(OUString::number(i));
220  if (nTypeId != SwFieldTypesEnum::Author)
221  m_xSelectionLB->append(sId, aLst[i]);
222  else
223  m_xSelectionLB->append(sId, GetFieldMgr().GetFormatStr(nTypeId, i));
224  }
225  else
226  {
227  bool bInsert = false;
228 
229  OUString sId(OUString::number(i));
230 
231  switch (nTypeId)
232  {
235  m_xSelectionLB->append(sId, aLst[i]);
236  if (static_cast<SwDateTimeField*>(GetCurField())->IsFixed() && !i)
237  m_xSelectionLB->select_id(sId);
238  if (!static_cast<SwDateTimeField*>(GetCurField())->IsFixed() && i)
239  m_xSelectionLB->select_id(sId);
240  break;
243  m_xSelectionLB->append(sId, aLst[i]);
244  if (GetCurField()->GetSubType() == i)
245  m_xSelectionLB->select_id(sId);
246  break;
247 
249  {
250  const OUString sFormat(GetFieldMgr().GetFormatStr(nTypeId, i));
251  m_xSelectionLB->append(sId, sFormat);
252  m_xSelectionLB->select_text(GetFieldMgr().GetFormatStr(nTypeId, GetCurField()->GetFormat()));
253  break;
254  }
255 
256  default:
257  if (aLst[i] == GetCurField()->GetPar1())
258  bInsert = true;
259  break;
260  }
261  if (bInsert)
262  {
263  m_xSelectionLB->append(sId, aLst[i]);
264  break;
265  }
266  }
267  }
268  m_xSelectionLB->connect_changed(Link<weld::TreeView&,void>());
269  }
270  else
271  {
272  AddSubType(SwFieldTypesEnum::PageNumber);
273  AddSubType(SwFieldTypesEnum::PreviousPage);
274  AddSubType(SwFieldTypesEnum::NextPage);
275  nTypeId = static_cast<SwFieldTypesEnum>(m_xSelectionLB->get_id(0).toUInt32());
276  nCount = 3;
277  m_xSelectionLB->connect_changed(LINK(this, SwFieldDokPage, SubTypeHdl));
278  }
279 
280  bool bEnable = nCount != 0;
281 
282  if (bEnable && m_xSelectionLB->get_selected_index() == -1)
283  m_xSelectionLB->select(0);
284 
285  m_xSelection->set_sensitive( bEnable );
286 
287  // fill Format-Listbox
288  sal_Int32 nSize = FillFormatLB(nTypeId);
289 
290  bool bValue = false, bLevel = false, bNumFormat = false, bOffset = false;
291  bool bFormat = nSize != 0;
292  bool bOneArea = false;
293  bool bFixed = false;
294  SvNumFormatType nFormatType = SvNumFormatType::ALL;
295 
296  switch (nTypeId)
297  {
299  bFormat = bNumFormat = bOneArea = bOffset = true;
300 
301  nFormatType = SvNumFormatType::DATE;
302 
303  m_xDateFT->show();
304 
305  m_xDateOffsetED->set_range(INT_MIN, INT_MAX); // no limit
306 
307  if (IsFieldEdit())
308  m_xDateOffsetED->set_value( static_cast<SwDateTimeField*>(GetCurField())->GetOffset() / 24 / 60);
309  break;
310 
312  bFormat = bNumFormat = bOneArea = bOffset = true;
313 
314  nFormatType = SvNumFormatType::TIME;
315 
316  m_xTimeFT->show();
317 
318  m_xDateOffsetED->set_range(-1440, 1440); // one day
319 
320  if (IsFieldEdit())
321  m_xDateOffsetED->set_value( static_cast<SwDateTimeField*>(GetCurField())->GetOffset() );
322  break;
323 
326  if (IsFieldEdit())
327  {
328  const sal_uInt16 nTmp = m_xFormatLB->get_selected_id().toUInt32();
329 
330  if(SVX_NUM_CHAR_SPECIAL != nTmp)
331  {
332  sal_Int32 nOff = GetCurField()->GetPar2().toInt32();
333  if( SwFieldTypesEnum::NextPage == nTypeId && 1 != nOff )
334  m_xValueED->set_text(
335  OUString::number(nOff - 1) );
336  else if( SwFieldTypesEnum::PreviousPage == nTypeId && -1 != nOff )
337  m_xValueED->set_text(
338  OUString::number(nOff + 1) );
339  else
340  m_xValueED->set_text(OUString());
341  }
342  else
343  m_xValueED->set_text(static_cast<SwPageNumberField*>(GetCurField())->GetUserString());
344  }
345  bValue = true;
346  break;
347 
349  m_xValueFT->set_label(SwResId(STR_LEVEL));
350  if (IsFieldEdit())
351  m_xLevelED->set_text(OUString::number(static_cast<SwChapterField*>(GetCurField())->GetLevel(GetWrtShell()->GetLayout()) + 1));
352  bLevel = true;
353  break;
354 
356  m_xValueFT->set_label( SwResId( STR_OFFSET ));
357  if (IsFieldEdit())
358  m_xValueED->set_text(GetCurField()->GetPar2());
359  bValue = true;
360  break;
361 
365  bFixed = true;
366  break;
367 
368  default:
369  break;
370  }
371 
372  if (bNumFormat)
373  {
374  if (IsFieldEdit())
375  {
376  m_xNumFormatLB->SetDefFormat(GetCurField()->GetFormat());
377 
378  if (m_xNumFormatLB->GetFormatType() == (SvNumFormatType::DATE|SvNumFormatType::TIME))
379  {
380  // always set Format-Type because otherwise when date/time formats are combined,
381  // both formats would be displayed at the same time
382  m_xNumFormatLB->SetFormatType(SvNumFormatType::ALL);
383  m_xNumFormatLB->SetFormatType(nFormatType);
384  // set correct format once again
385  m_xNumFormatLB->SetDefFormat(GetCurField()->GetFormat());
386  }
387  }
388  else
389  m_xNumFormatLB->SetFormatType(nFormatType);
390 
391  m_xNumFormatLB->SetOneArea(bOneArea);
392  }
393 
394  m_xFormatLB->set_visible(!bNumFormat);
395  m_xNumFormatLB->set_visible(bNumFormat);
396 
397  m_xValueFT->set_visible(bValue);
398  m_xValueED->set_visible(bValue);
399  m_xLevelFT->set_visible(bLevel);
400  m_xLevelED->set_visible(bLevel);
401  m_xDateOffsetED->set_visible(bOffset);
402  m_xFixedCB->set_visible(!bValue && !bLevel && !bOffset);
403 
404  m_xFormat->set_sensitive(bFormat);
405  m_xFixedCB->set_sensitive(bFixed);
406 
407  if (IsFieldEdit())
408  m_xFixedCB->set_active((GetCurField()->GetFormat() & AF_FIXED) != 0 && bFixed);
409 
410  if (m_xNumFormatLB->get_selected_index() == -1)
411  m_xNumFormatLB->select(0);
412  m_xValueFT->set_sensitive(bValue || bLevel || bOffset);
413  m_xValueED->set_sensitive(bValue);
414 }
415 
417 {
418  m_xSelectionLB->append(OUString::number(static_cast<sal_uInt16>(nTypeId)), SwFieldType::GetTypeStr(nTypeId));
419 }
420 
422 {
423  sal_Int32 nPos = m_xSelectionLB->get_selected_index();
424  if(nPos == -1)
425  nPos = 0;
426 
427  const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xSelectionLB->get_id(nPos).toUInt32());
428  FillFormatLB(nTypeId);
429 
430  TranslateId pTextRes;
431  switch (nTypeId)
432  {
434  pTextRes = STR_LEVEL;
435  break;
436 
439  pTextRes = SVX_NUM_CHAR_SPECIAL == m_xFormatLB->get_selected_id().toUInt32()
440  ? STR_VALUE : STR_OFFSET;
441  break;
442 
444  pTextRes = STR_OFFSET;
445  break;
446  default: break;
447  }
448 
449  if (pTextRes)
450  m_xValueFT->set_label(SwResId(pTextRes));
451 }
452 
454 {
455  // fill Format-Listbox
456  m_xFormatLB->clear();
457 
458  if (nTypeId == SwFieldTypesEnum::Author)
459  return m_xFormatLB->n_children();
460 
461  const sal_uInt16 nSize = GetFieldMgr().GetFormatCount(nTypeId, IsFieldDlgHtmlMode());
462 
463  for( sal_uInt16 i = 0; i < nSize; ++i )
464  {
465  const sal_uInt16 nFormatId = GetFieldMgr().GetFormatId( nTypeId, i );
466  OUString sId(OUString::number(nFormatId));
467  m_xFormatLB->append(sId, GetFieldMgr().GetFormatStr(nTypeId, i));
468  }
469 
470  if (IsFieldEdit())
471  {
472  m_xFormatLB->select_id(OUString::number(GetCurField()->GetFormat() & ~AF_FIXED));
473  }
474 
475  FormatHdl(*m_xFormatLB);
476 
477  return nSize;
478 }
479 
481 {
482  SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
483 
484  if (nTypeId == SwFieldTypesEnum::Unknown)
485  {
486  sal_Int32 nPos = m_xSelectionLB->get_selected_index();
487  if(nPos == -1)
488  nPos = 0;
489 
490  nTypeId = static_cast<SwFieldTypesEnum>(m_xSelectionLB->get_id(nPos).toUInt32());
491  }
492 
493  if (nTypeId != SwFieldTypesEnum::NextPage && nTypeId != SwFieldTypesEnum::PreviousPage)
494  return;
495 
496  // Prev/Next - PageNumFields special treatment:
497  sal_uInt16 nTmp = m_xFormatLB->get_selected_id().toUInt32();
498  const OUString sOldText( m_xValueFT->get_label() );
499  const OUString sNewText( SwResId( SVX_NUM_CHAR_SPECIAL == nTmp ? STR_VALUE
500  : STR_OFFSET ));
501 
502  if (sOldText != sNewText)
503  m_xValueFT->set_label(sNewText);
504 
505  if (sOldText != m_xValueFT->get_label())
506  m_xValueED->set_text(OUString());
507 }
508 
510 {
511  SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
512 
513  if (nTypeId == SwFieldTypesEnum::Unknown)
514  {
515  sal_Int32 nPos = m_xSelectionLB->get_selected_index();
516  if(nPos == -1)
517  nPos = 0;
518  nTypeId = static_cast<SwFieldTypesEnum>(m_xSelectionLB->get_id(nPos).toUInt32());
519  }
520 
521  OUString aVal(m_xValueED->get_text());
522  sal_uLong nFormat = 0;
523  sal_uInt16 nSubType = 0;
524 
525  if (m_xFormatLB->get_sensitive())
526  {
527  sal_Int32 nPos = m_xFormatLB->get_selected_index();
528  if(nPos != -1)
529  nFormat = m_xFormatLB->get_id(nPos).toUInt32();
530  }
531 
532  if (m_xSelectionLB->get_sensitive())
533  {
534  sal_Int32 nPos = m_xSelectionLB->get_selected_index();
535  if(nPos != -1)
536  nSubType = m_xSelectionLB->get_id(nPos).toUInt32();
537  }
538 
539  switch (nTypeId)
540  {
542  nFormat = nSubType;
543  nSubType = 0;
544  [[fallthrough]];
546  nFormat |= m_xFixedCB->get_active() ? AF_FIXED : 0;
547  break;
548 
550  nFormat |= m_xFixedCB->get_active() ? FF_FIXED : 0;
551  break;
552 
555  {
556  nFormat = m_xNumFormatLB->GetFormat();
557  tools::Long nVal = static_cast< tools::Long >(m_xDateOffsetED->get_value());
558  if (nTypeId == SwFieldTypesEnum::Date)
559  aVal = OUString::number(nVal * 60 * 24);
560  else
561  aVal = OUString::number(nVal);
562  break;
563  }
564 
569  {
570  if( SVX_NUM_CHAR_SPECIAL != nFormat &&
572  {
573  sal_Int32 nVal = m_xValueED->get_text().toInt32();
574  aVal = OUString::number(nVal);
575  }
576  break;
577  }
578 
580  aVal = m_xLevelED->get_text();
581  break;
582 
583  default:
584  break;
585  }
586 
587  if (!IsFieldEdit() ||
588  nOldSel != m_xSelectionLB->get_selected_index() ||
589  nOldFormat != nFormat ||
590  m_xFixedCB->get_state_changed_from_saved() ||
591  m_xValueED->get_value_changed_from_saved() ||
592  m_xLevelED->get_value_changed_from_saved() ||
593  m_xDateOffsetED->get_value_changed_from_saved())
594  {
595  InsertField(nTypeId, nSubType, OUString(), aVal, nFormat, ' ', m_xNumFormatLB->IsAutomaticLanguage());
596  }
597 
598  return false;
599 }
600 
601 std::unique_ptr<SfxTabPage> SwFieldDokPage::Create(weld::Container* pPage, weld::DialogController* pController,
602  const SfxItemSet *const pAttrSet)
603 {
604  return std::make_unique<SwFieldDokPage>(pPage, pController, pAttrSet);
605 }
606 
608 {
609  return GRP_DOC;
610 }
611 
613 {
614  const sal_Int32 nEntryPos = m_xTypeLB->get_selected_index();
615  const sal_uInt16 nTypeSel = ( -1 == nEntryPos )
616  ? USHRT_MAX : m_xTypeLB->get_id(nEntryPos).toUInt32();
617  SetUserData(USER_DATA_VERSION ";" + OUString::number( nTypeSel ));
618 }
619 
620 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_uInt16 GetGroup() override
Definition: flddok.cxx:607
IMPL_LINK_NOARG(SwFieldDokPage, TypeHdl, weld::TreeView &, void)
Definition: flddok.cxx:178
virtual void FillUserData() override
Definition: flddok.cxx:612
#define USER_DATA_VERSION
Definition: flddok.cxx:31
void RestorePos(weld::TreeView &rLst1)
Definition: fldpage.cxx:284
void SetUserData(const OUString &rString)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: flddok.cxx:601
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
Definition: fldbas.hxx:397
virtual void Reset(const SfxItemSet *rSet) override
Definition: flddok.cxx:77
sal_uIntPtr sal_uLong
long Long
Base class of all fields.
Definition: fldbas.hxx:289
std::unique_ptr< weld::CheckButton > m_xFixedCB
Definition: flddok.hxx:45
SwWrtShell * GetActiveWrtShell()
Definition: swmodul1.cxx:108
constexpr sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:93
static const OUString & GetTypeStr(sal_uInt16 nPos)
Definition: fldmgr.cxx:531
static sal_uInt16 GetPos(SwFieldTypesEnum nTypeId)
Definition: fldmgr.cxx:553
static const OUString & GetTypeStr(SwFieldTypesEnum nTypeId)
Definition: fldbas.cxx:122
virtual ~SwFieldDokPage() override
Definition: flddok.cxx:73
void AddSubType(SwFieldTypesEnum nTypeId)
Definition: flddok.cxx:416
Used by the UI to modify the document model.
Definition: wrtsh.hxx:93
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:165
SwFieldMgr & GetFieldMgr()
Definition: fldpage.hxx:81
static SwFieldTypesEnum GetTypeId(sal_uInt16 nPos)
Definition: fldmgr.cxx:525
sal_uInt16 nEnd
Definition: fldmgr.hxx:63
std::unique_ptr< SwNumFormatTreeView > m_xNumFormatLB
Definition: flddok.hxx:44
int nCount
std::unique_ptr< weld::TreeView > m_xSelectionLB
Definition: flddok.hxx:34
const OUString & GetUserData() const
sal_uInt16 GetFormatCount(SwFieldTypesEnum nTypeId, bool bHtmlMode) const
Definition: fldmgr.cxx:675
std::unique_ptr< weld::Entry > m_xValueED
Definition: flddok.hxx:36
bool IsFieldDlgHtmlMode() const
Definition: fldpage.hxx:49
std::unique_ptr< weld::SpinButton > m_xLevelED
Definition: flddok.hxx:38
SVX_NUM_CHAR_SPECIAL
int i
void SavePos(const weld::TreeView &rLst1)
Definition: fldpage.cxx:274
SwFieldTypesEnum
List of FieldTypes at UI.
Definition: fldbas.hxx:93
void Init()
Definition: fldpage.cxx:63
bool IsRefresh() const
Definition: fldpage.hxx:50
SvNumFormatType
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
sal_Int32 GetTypeSel() const
Definition: fldpage.hxx:45
SwField * GetCurField()
Definition: fldpage.hxx:51
sal_uInt16 GetFormatId(SwFieldTypesEnum nTypeId, sal_uInt32 nFormatId) const
Definition: fldmgr.cxx:772
bool IsAutomaticLanguage() const
Definition: fldbas.hxx:379
#define FIELD_COLUMN_WIDTH
Definition: fldpage.hxx:25
std::unique_ptr< weld::TreeView > m_xFormatLB
Definition: flddok.hxx:43
sal_uLong nOldFormat
Definition: flddok.hxx:30
sal_uInt16 nStart
Definition: fldmgr.hxx:62
SwFieldTypesEnum GetTypeId() const
Definition: fldbas.cxx:252
SwWrtShell * GetWrtShell()
Definition: fldpage.hxx:52
const SvNumberformat * GetEntry(sal_uInt32 nKey) const
#define USER_DATA_VERSION_1
Definition: flddok.cxx:30
std::unique_ptr< weld::TreeView > m_xTypeLB
Definition: flddok.hxx:32
bool IsFieldEdit() const
Definition: fldpage.hxx:62
SwFieldDokPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *pSet)
Definition: flddok.cxx:33
std::unique_ptr< weld::SpinButton > m_xDateOffsetED
Definition: flddok.hxx:41
static const SwFieldGroupRgn & GetGroupRange(bool bHtmlMode, sal_uInt16 nGrpId)
Definition: fldmgr.cxx:469
SvNumberFormatter * GetNumberFormatter()
Query NumberFormatter from document.
Definition: editsh.cxx:745
sal_Int32 FillFormatLB(SwFieldTypesEnum nTypeId)
Definition: flddok.cxx:453
LanguageType GetLanguage() const
sal_uInt16 nPos
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: flddok.cxx:509
OUString sId
sal_Int32 nOldSel
Definition: flddok.hxx:29