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