LibreOffice Module sw (master)  1
optload.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 <officecfg/Office/Writer.hxx>
21 #include <comphelper/string.hxx>
22 #include <swtypes.hxx>
23 #include <uiitems.hxx>
24 #include <modcfg.hxx>
25 #include <swmodule.hxx>
26 #include <usrpref.hxx>
27 #include <wrtsh.hxx>
28 #include <linkenum.hxx>
29 #include <uitool.hxx>
30 #include <view.hxx>
31 
32 #include <strings.hrc>
33 #include <optload.hrc>
34 #include <cmdid.h>
35 
36 #include <optload.hxx>
37 #include <sfx2/htmlmode.hxx>
38 #include <fldmgr.hxx>
39 #include <poolfmt.hxx>
40 #include <expfld.hxx>
41 
42 #include <svtools/insdlg.hxx>
43 #include <svtools/unitconv.hxx>
44 #include <tools/resary.hxx>
45 #include <vcl/settings.hxx>
46 
47 #include <comphelper/classids.hxx>
48 #include <unotools/configmgr.hxx>
49 #include <SwStyleNameMapper.hxx>
50 #include <numrule.hxx>
51 
52 #include <doc.hxx>
53 #include <svl/cjkoptions.hxx>
54 
55 using namespace ::com::sun::star;
56 
57 #include <svl/eitem.hxx>
58 
60 {
61  return SAL_N_ELEMENTS(STR_ARR_METRIC);
62 }
63 
64 OUString SwFieldUnitTable::GetString(sal_uInt32 nPos)
65 {
66  if (RESARRAY_INDEX_NOTFOUND != nPos && nPos < Count())
67  return SwResId(STR_ARR_METRIC[nPos].first);
68  return OUString();
69 }
70 
72 {
73  if (RESARRAY_INDEX_NOTFOUND != nPos && nPos < Count())
74  return STR_ARR_METRIC[nPos].second;
75  return FieldUnit::NONE;
76 }
77 
79  : SfxTabPage(pPage, pController, "modules/swriter/ui/optgeneralpage.ui", "OptGeneralPage", &rSet)
80  , m_pWrtShell(nullptr)
81  , m_nLastTab(0)
82  , m_nOldLinkMode(MANUAL)
83  , m_xAlwaysRB(m_xBuilder->weld_radio_button("always"))
84  , m_xRequestRB(m_xBuilder->weld_radio_button("onrequest"))
85  , m_xNeverRB(m_xBuilder->weld_radio_button("never"))
86  , m_xAutoUpdateFields(m_xBuilder->weld_check_button("updatefields"))
87  , m_xAutoUpdateCharts(m_xBuilder->weld_check_button("updatecharts"))
88  , m_xMetricLB(m_xBuilder->weld_combo_box("metric"))
89  , m_xTabFT(m_xBuilder->weld_label("tablabel"))
90  , m_xTabMF(m_xBuilder->weld_metric_spin_button("tab", FieldUnit::CM))
91  , m_xUseSquaredPageMode(m_xBuilder->weld_check_button("squaremode"))
92  , m_xUseCharUnit(m_xBuilder->weld_check_button("usecharunit"))
93  , m_xWordCountED(m_xBuilder->weld_entry("wordcount"))
94  , m_xShowStandardizedPageCount(m_xBuilder->weld_check_button("standardizedpageshow"))
95  , m_xStandardizedPageSizeNF(m_xBuilder->weld_spin_button("standardpagesize"))
96 {
97  for (sal_uInt32 i = 0; i < SwFieldUnitTable::Count(); ++i)
98  {
99  const OUString sMetric = SwFieldUnitTable::GetString(i);
101 
102  switch ( eFUnit )
103  {
104  case FieldUnit::MM:
105  case FieldUnit::CM:
106  case FieldUnit::POINT:
107  case FieldUnit::PICA:
108  case FieldUnit::INCH:
109  {
110  // use only these metrics
111  m_xMetricLB->append(OUString::number(static_cast<sal_uInt32>(eFUnit)), sMetric);
112  break;
113  }
114  default:; //prevent warning
115  }
116  }
117  m_xMetricLB->connect_changed(LINK(this, SwLoadOptPage, MetricHdl));
118 
119  const SfxPoolItem* pItem;
120  if (SfxItemState::SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem)
121  && static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON)
122  {
123  m_xTabFT->hide();
124  m_xTabMF->hide();
125  }
126 
128  {
129  m_xUseSquaredPageMode->hide();
130  m_xUseCharUnit->hide();
131  }
132 
133  m_xShowStandardizedPageCount->connect_toggled(LINK(this, SwLoadOptPage, StandardizedPageCountCheckHdl));
134 }
135 
137 {
138 }
139 
140 std::unique_ptr<SfxTabPage> SwLoadOptPage::Create( weld::Container* pPage, weld::DialogController* pController,
141  const SfxItemSet* rAttrSet )
142 {
143  return std::make_unique<SwLoadOptPage>(pPage, pController, *rAttrSet );
144 }
145 
146 IMPL_LINK_NOARG(SwLoadOptPage, StandardizedPageCountCheckHdl, weld::Toggleable&, void)
147 {
148  m_xStandardizedPageSizeNF->set_sensitive(m_xShowStandardizedPageCount->get_active());
149 }
150 
152 {
153  bool bRet = false;
154  SwModule* pMod = SW_MOD();
155 
156  sal_Int32 nNewLinkMode = AUTOMATIC;
157  if (m_xNeverRB->get_active())
158  nNewLinkMode = NEVER;
159  else if (m_xRequestRB->get_active())
160  nNewLinkMode = MANUAL;
161 
162  SwFieldUpdateFlags eFieldFlags = m_xAutoUpdateFields->get_active() ?
164 
165  if (m_xAutoUpdateFields->get_state_changed_from_saved() ||
166  m_xAutoUpdateCharts->get_state_changed_from_saved())
167  {
168  pMod->ApplyFieldUpdateFlags(eFieldFlags);
169  if(m_pWrtShell)
170  {
171  m_pWrtShell->SetFieldUpdateFlags(eFieldFlags);
173  }
174  }
175 
176  if (nNewLinkMode != m_nOldLinkMode)
177  {
178  pMod->ApplyLinkMode(nNewLinkMode);
179  if (m_pWrtShell)
180  {
181  m_pWrtShell->SetLinkUpdMode( nNewLinkMode );
183  }
184 
185  bRet = true;
186  }
187 
188  const sal_Int32 nMPos = m_xMetricLB->get_active();
189  if (m_xMetricLB->get_value_changed_from_saved())
190  {
191  // Double-Cast for VA3.0
192  const sal_uInt16 nFieldUnit = m_xMetricLB->get_id(nMPos).toUInt32();
193  rSet->Put( SfxUInt16Item( SID_ATTR_METRIC, nFieldUnit ) );
194  bRet = true;
195  }
196 
197  if (m_xTabMF->get_visible() && m_xTabMF->get_value_changed_from_saved())
198  {
199  rSet->Put(SfxUInt16Item(SID_ATTR_DEFTABSTOP,
200  o3tl::narrowing<sal_uInt16>(m_xTabMF->denormalize(m_xTabMF->get_value(FieldUnit::TWIP)))));
201  bRet = true;
202  }
203 
204  bool bIsUseCharUnitFlag = m_xUseCharUnit->get_active();
205  bIsUseCharUnitFlag = bIsUseCharUnitFlag && SvtCJKOptions::IsAsianTypographyEnabled();
206  if( (bIsUseCharUnitFlag ? 1 : 0) != m_xUseCharUnit->get_saved_state())
207  {
208  rSet->Put(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, bIsUseCharUnitFlag ));
209  bRet = true;
210  }
211 
212  if (m_xWordCountED->get_value_changed_from_saved())
213  {
214  std::shared_ptr< comphelper::ConfigurationChanges > batch(
216  officecfg::Office::Writer::WordCount::AdditionalSeparators::set(m_xWordCountED->get_text(), batch);
217  batch->commit();
218  bRet = true;
219  }
220 
221  if (m_xShowStandardizedPageCount->get_state_changed_from_saved())
222  {
223  std::shared_ptr< comphelper::ConfigurationChanges > batch(
225  officecfg::Office::Writer::WordCount::ShowStandardizedPageCount::set(
226  m_xShowStandardizedPageCount->get_active(),
227  batch);
228  batch->commit();
229  bRet = true;
230  }
231 
232  if (m_xStandardizedPageSizeNF->get_value_changed_from_saved())
233  {
234  std::shared_ptr< comphelper::ConfigurationChanges > batch(
236  officecfg::Office::Writer::WordCount::StandardizedPageSize::set(
237  m_xStandardizedPageSizeNF->get_value(),
238  batch);
239  batch->commit();
240  bRet = true;
241  }
242 
243  if (m_xUseSquaredPageMode->get_state_changed_from_saved())
244  {
245  bool bIsSquaredPageModeFlag = m_xUseSquaredPageMode->get_active();
246  pMod->ApplyDefaultPageMode( bIsSquaredPageModeFlag );
247  if ( m_pWrtShell )
248  {
249  SwDoc* pDoc = m_pWrtShell->GetDoc();
250  pDoc->SetDefaultPageMode( bIsSquaredPageModeFlag );
252  }
253  bRet = true;
254  }
255 
256  return bRet;
257 }
258 
260 {
261  const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(false);
262  const SfxPoolItem* pItem;
263 
264  if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_WRTSHELL, false, &pItem))
265  m_pWrtShell = static_cast<SwWrtShell*>(static_cast<const SwPtrItem*>(pItem)->GetValue());
266 
269  if (m_pWrtShell)
270  {
271  eFieldFlags = m_pWrtShell->GetFieldUpdateFlags();
273  }
275  m_nOldLinkMode = pUsrPref->GetUpdateLinkMode();
276  if(AUTOUPD_GLOBALSETTING == eFieldFlags)
277  eFieldFlags = pUsrPref->GetFieldUpdateFlags();
278 
279  m_xAutoUpdateFields->set_active(eFieldFlags != AUTOUPD_OFF);
280  m_xAutoUpdateCharts->set_active(eFieldFlags == AUTOUPD_FIELD_AND_CHARTS);
281 
282  switch (m_nOldLinkMode)
283  {
284  case NEVER: m_xNeverRB->set_active(true); break;
285  case MANUAL: m_xRequestRB->set_active(true); break;
286  case AUTOMATIC: m_xAlwaysRB->set_active(true); break;
287  }
288 
289  m_xAutoUpdateFields->save_state();
290  m_xAutoUpdateCharts->save_state();
291  m_xMetricLB->set_active(-1);
292  if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SfxItemState::DEFAULT )
293  {
294  const SfxUInt16Item& rItem = rSet->Get( SID_ATTR_METRIC );
295  FieldUnit eFieldUnit = static_cast<FieldUnit>(rItem.GetValue());
296 
297  for (sal_Int32 i = 0, nEntryCount = m_xMetricLB->get_count(); i < nEntryCount; ++i)
298  {
299  if (m_xMetricLB->get_id(i).toUInt32() == static_cast<sal_uInt32>(eFieldUnit))
300  {
301  m_xMetricLB->set_active(i);
302  break;
303  }
304  }
305  ::SetFieldUnit(*m_xTabMF, eFieldUnit);
306  }
307  m_xMetricLB->save_value();
308  if(SfxItemState::SET == rSet->GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem))
309  {
310  m_nLastTab = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
311  m_xTabMF->set_value(m_xTabMF->normalize(m_nLastTab), FieldUnit::TWIP);
312  }
313  m_xTabMF->save_value();
314 
315  //default page mode loading
316  if(m_pWrtShell)
317  {
318  bool bSquaredPageMode = m_pWrtShell->GetDoc()->IsSquaredPageMode();
319  m_xUseSquaredPageMode->set_active( bSquaredPageMode );
320  m_xUseSquaredPageMode->save_state();
321  }
322 
323  if(SfxItemState::SET == rSet->GetItemState(SID_ATTR_APPLYCHARUNIT, false, &pItem))
324  {
325  bool bUseCharUnit = static_cast<const SfxBoolItem*>(pItem)->GetValue();
326  m_xUseCharUnit->set_active(bUseCharUnit);
327  }
328  else
329  {
330  m_xUseCharUnit->set_active(pUsrPref->IsApplyCharUnit());
331  }
332  m_xUseCharUnit->save_state();
333 
335  m_xWordCountED->set_sensitive(!officecfg::Office::Writer::WordCount::AdditionalSeparators::isReadOnly());
336  m_xWordCountED->save_value();
338  m_xShowStandardizedPageCount->set_sensitive(!officecfg::Office::Writer::WordCount::ShowStandardizedPageCount::isReadOnly());
339  m_xShowStandardizedPageCount->save_state();
341  m_xStandardizedPageSizeNF->set_sensitive(!officecfg::Office::Writer::WordCount::StandardizedPageSize::isReadOnly());
342  m_xStandardizedPageSizeNF->save_value();
343  m_xStandardizedPageSizeNF->set_sensitive(m_xShowStandardizedPageCount->get_active());
344 }
345 
347 {
348  const sal_Int32 nMPos = m_xMetricLB->get_active();
349  if(nMPos == -1)
350  return;
351 
352  // Double-Cast for VA3.0
353  FieldUnit eFieldUnit = static_cast<FieldUnit>(m_xMetricLB->get_id(nMPos).toUInt32());
354  bool bModified = m_xTabMF->get_value_changed_from_saved();
355  tools::Long nVal = bModified ?
356  sal::static_int_cast<sal_Int32, sal_Int64 >( m_xTabMF->denormalize( m_xTabMF->get_value( FieldUnit::TWIP ) )) :
357  m_nLastTab;
358  ::SetFieldUnit( *m_xTabMF, eFieldUnit );
359  m_xTabMF->set_value( m_xTabMF->normalize( nVal ), FieldUnit::TWIP );
360  if (!bModified)
361  m_xTabMF->save_value();
362 }
363 
365  : SfxSingleTabDialogController(pParent, &rSet, "modules/swriter/ui/captiondialog.ui",
366  "CaptionDialog")
367 {
368  // create TabPage
370 }
371 
373  : mbFontInitialized(false)
374 {
375 }
376 
378 {
379  Wallpaper aBack(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor());
380  rRenderContext.SetBackground(aBack);
381  rRenderContext.SetFillColor(aBack.GetColor());
382  rRenderContext.SetLineColor(aBack.GetColor());
383 
384  if (!mbFontInitialized)
385  {
386  maFont = rRenderContext.GetFont();
387  maFont.SetFontHeight(maFont.GetFontHeight() * 120 / 100);
388  mbFontInitialized = true;
389  }
390  rRenderContext.SetFont(maFont);
391 }
392 
393 void SwCaptionPreview::SetPreviewText(const OUString& rText)
394 {
395  if (rText != maText)
396  {
397  maText = rText;
398  Invalidate();
399  }
400 }
401 
403 {
404  CustomWidgetController::SetDrawingArea(pDrawingArea);
405  Size aSize(pDrawingArea->get_ref_device().LogicToPixel(Size(106 , 20), MapMode(MapUnit::MapAppFont)));
406  pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
407 }
408 
410 {
411  ApplySettings(rRenderContext);
412 
413  rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), GetOutputSizePixel()));
414  rRenderContext.DrawText(Point(4, 6), maText);
415 }
416 
417 IMPL_LINK(SwCaptionOptPage, TextFilterHdl, OUString&, rTest, bool)
418 {
419  rTest = m_aTextFilter.filter(rTest);
420  return true;
421 }
422 
424  : SfxTabPage(pPage, pController, "modules/swriter/ui/optcaptionpage.ui", "OptCaptionPage", &rSet)
425  , m_sSWTable(SwResId(STR_CAPTION_TABLE))
426  , m_sSWFrame(SwResId(STR_CAPTION_FRAME))
427  , m_sSWGraphic(SwResId(STR_CAPTION_GRAPHIC))
428  , m_sOLE(SwResId(STR_CAPTION_OLE))
429  , m_sBegin(SwResId(STR_CAPTION_BEGINNING))
430  , m_sEnd(SwResId(STR_CAPTION_END))
431  , m_sAbove(SwResId(STR_CAPTION_ABOVE))
432  , m_sBelow(SwResId(STR_CAPTION_BELOW))
433  , m_sNone(SwResId(SW_STR_NONE))
434  , m_nPrevSelectedEntry(-1)
435  , pMgr(new SwFieldMgr)
436  , bHTMLMode(false)
437  , m_aTextFilter(m_sNone)
438  , m_xCheckLB(m_xBuilder->weld_tree_view("objects"))
439  , m_xLbCaptionOrder(m_xBuilder->weld_combo_box("captionorder"))
440  , m_xSettingsGroup(m_xBuilder->weld_widget("settings"))
441  , m_xCategoryBox(m_xBuilder->weld_combo_box("category"))
442  , m_xFormatText(m_xBuilder->weld_label("numberingft"))
443  , m_xFormatBox(m_xBuilder->weld_combo_box("numbering"))
444  , m_xNumberingSeparatorFT(m_xBuilder->weld_label("numseparatorft"))
445  , m_xNumberingSeparatorED(m_xBuilder->weld_entry("numseparator"))
446  , m_xTextText(m_xBuilder->weld_label("separatorft"))
447  , m_xTextEdit(m_xBuilder->weld_entry("separator"))
448  , m_xPosBox(m_xBuilder->weld_combo_box("position"))
449  , m_xNumCapt(m_xBuilder->weld_widget("numcaption"))
450  , m_xLbLevel(m_xBuilder->weld_combo_box("level"))
451  , m_xEdDelim(m_xBuilder->weld_entry("chapseparator"))
452  , m_xCategory(m_xBuilder->weld_widget("categoryformat"))
453  , m_xCharStyleLB(m_xBuilder->weld_combo_box("charstyle"))
454  , m_xApplyBorderCB(m_xBuilder->weld_check_button("applyborder"))
455  , m_xPreview(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreview))
456 {
457  m_xCategoryBox->connect_entry_insert_text(LINK(this, SwCaptionOptPage, TextFilterHdl));
458 
459  m_xCheckLB->enable_toggle_buttons(weld::ColumnToggleType::Check);
460 
465 
467 
468  // m_xFormatBox
469  sal_uInt16 nSelFormat = SVX_NUM_ARABIC;
470  if (pSh)
471  {
472  for ( auto i = pMgr->GetFieldTypeCount(); i; )
473  {
474  SwFieldType* pFieldType = pMgr->GetFieldType(SwFieldIds::Unknown, --i);
475  if (!pFieldType->GetName().isEmpty()
476  && pFieldType->GetName() == m_xCategoryBox->get_active_text())
477  {
478  nSelFormat = o3tl::narrowing<sal_uInt16>(static_cast<SwSetExpFieldType*>(pFieldType)->GetSeqFormat());
479  break;
480  }
481  }
482 
483  ::FillCharStyleListBox( *m_xCharStyleLB, pSh->GetView().GetDocShell(), true, true );
484  }
485 
486  const sal_uInt16 nCount = pMgr->GetFormatCount(SwFieldTypesEnum::Sequence, false);
487  for ( sal_uInt16 i = 0; i < nCount; ++i )
488  {
489  const sal_uInt16 nFormatId = pMgr->GetFormatId(SwFieldTypesEnum::Sequence, i);
490  m_xFormatBox->append(OUString::number(nFormatId), pMgr->GetFormatStr(SwFieldTypesEnum::Sequence, i));
491  if (nFormatId == nSelFormat)
492  m_xFormatBox->set_active(i);
493  }
494 
495  for (int i = 0; i < MAXLEVEL; ++i)
496  m_xLbLevel->append_text(OUString::number(i + 1));
497 
498  sal_Unicode nLvl = MAXLEVEL;
499  OUString sDelim(": ");
500 
501  if (pSh)
502  {
503  SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>(pMgr->GetFieldType(
504  SwFieldIds::SetExp, m_xCategoryBox->get_active_text() ));
505  if( pFieldType )
506  {
507  sDelim = pFieldType->GetDelimiter();
508  nLvl = pFieldType->GetOutlineLvl();
509  }
510  }
511 
512  m_xLbLevel->set_active(nLvl < MAXLEVEL ? nLvl + 1 : 0);
513  m_xEdDelim->set_text(sDelim);
514 
515  m_xCategoryBox->connect_changed(LINK(this, SwCaptionOptPage, ModifyComboHdl));
516  Link<weld::Entry&,void> aLk = LINK(this, SwCaptionOptPage, ModifyEntryHdl);
517  m_xNumberingSeparatorED->connect_changed(aLk);
518  m_xTextEdit->connect_changed(aLk);
519 
520  m_xCategoryBox->connect_changed(LINK(this, SwCaptionOptPage, SelectHdl));
521  m_xFormatBox->connect_changed(LINK(this, SwCaptionOptPage, SelectListBoxHdl));
522 
523  m_xLbCaptionOrder->connect_changed(LINK(this, SwCaptionOptPage, OrderHdl));
524 
525  m_xCheckLB->connect_changed(LINK(this, SwCaptionOptPage, ShowEntryHdl));
526  m_xCheckLB->connect_toggled(LINK(this, SwCaptionOptPage, ToggleEntryHdl));
527 }
528 
530 {
531  DelUserData();
532  pMgr.reset();
533  m_xPreview.reset();
534 }
535 
536 std::unique_ptr<SfxTabPage> SwCaptionOptPage::Create(weld::Container* pPage, weld::DialogController* pController,
537  const SfxItemSet* rAttrSet)
538 {
539  return std::make_unique<SwCaptionOptPage>(pPage, pController, *rAttrSet);
540 }
541 
543 {
544  bool bRet = false;
545  SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
546 
547  SaveEntry(m_xCheckLB->get_selected_index()); // apply current entry
548 
549  int nCheckCount = 0;
550  for (int i = 0, nCount = m_xCheckLB->n_children(); i < nCount; ++i)
551  {
552  if (m_xCheckLB->get_toggle(i) == TRISTATE_TRUE)
553  ++nCheckCount;
554  InsCaptionOpt* pData = reinterpret_cast<InsCaptionOpt*>(m_xCheckLB->get_id(i).toInt64());
555  bRet |= pModOpt->SetCapOption(bHTMLMode, pData);
556  }
557 
558  pModOpt->SetInsWithCaption(bHTMLMode, nCheckCount > 0);
559 
560  int nPos = m_xLbCaptionOrder->get_active();
561  pModOpt->SetCaptionOrderNumberingFirst(nPos == 1);
562 
563  return bRet;
564 }
565 
567 {
568  const SfxPoolItem* pItem;
569  if(SfxItemState::SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem))
570  {
571  bHTMLMode = 0 != (static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON);
572  }
573 
574  DelUserData();
575  m_xCheckLB->clear(); // remove all entries
576 
577  // Writer objects
578  int nPos = 0;
579  m_xCheckLB->append();
580  m_xCheckLB->set_toggle(nPos, TRISTATE_FALSE);
581  m_xCheckLB->set_text(nPos, m_sSWTable, 0);
582  SetOptions(nPos++, TABLE_CAP);
583  m_xCheckLB->append();
584  m_xCheckLB->set_toggle(nPos, TRISTATE_FALSE);
585  m_xCheckLB->set_text(nPos, m_sSWFrame, 0);
586  SetOptions(nPos++, FRAME_CAP);
587  m_xCheckLB->append();
588  m_xCheckLB->set_toggle(nPos, TRISTATE_FALSE);
589  m_xCheckLB->set_text(nPos, m_sSWGraphic, 0);
590  SetOptions(nPos++, GRAPHIC_CAP);
591 
592  // get Productname and -version
593  const OUString sWithoutVersion( utl::ConfigManager::getProductName() );
594  const OUString sComplete(
595  sWithoutVersion + " " +
597 
598  SvObjectServerList aObjS;
599  aObjS.FillInsertObjects();
600  aObjS.Remove( SvGlobalName( SO3_SW_CLASSID ) ); // remove Writer-ID
601 
602  for ( sal_uLong i = 0; i < aObjS.Count(); ++i )
603  {
604  const SvGlobalName &rOleId = aObjS[i].GetClassName();
605  OUString sClass;
606  if (rOleId == SvGlobalName(SO3_OUT_CLASSID))
607  sClass = m_sOLE;
608  else
609  sClass = aObjS[i].GetHumanName();
610  // don't show product version
611  sClass = sClass.replaceFirst( sComplete, sWithoutVersion );
612  m_xCheckLB->append();
613  m_xCheckLB->set_toggle(nPos, TRISTATE_FALSE);
614  m_xCheckLB->set_text(nPos, sClass, 0);
615  SetOptions( nPos++, OLE_CAP, &rOleId );
616  }
617  m_xLbCaptionOrder->set_active(
618  SW_MOD()->GetModuleConfig()->IsCaptionOrderNumberingFirst() ? 1 : 0);
619  m_xCheckLB->select(0);
620  ShowEntryHdl(*m_xCheckLB);
621 }
622 
624  const SwCapObjType eObjType, const SvGlobalName *pOleId)
625 {
626  SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
627  const InsCaptionOpt* pOpt = pModOpt->GetCapOption(bHTMLMode, eObjType, pOleId);
628 
629  if (pOpt)
630  {
631  InsCaptionOpt* pIns = new InsCaptionOpt(*pOpt);
632  m_xCheckLB->set_id(nPos, OUString::number(reinterpret_cast<sal_Int64>(pIns)));
633  m_xCheckLB->set_toggle(nPos, pOpt->UseCaption() ? TRISTATE_TRUE : TRISTATE_FALSE);
634  }
635  else
636  {
637  InsCaptionOpt* pIns = new InsCaptionOpt(eObjType, pOleId);
638  m_xCheckLB->set_id(nPos, OUString::number(reinterpret_cast<sal_Int64>(pIns)));
639  }
640 }
641 
643 {
644  for (int i = 0, nCount = m_xCheckLB->n_children(); i < nCount; ++i)
645  {
646  delete reinterpret_cast<InsCaptionOpt*>(m_xCheckLB->get_id(i).toInt64());
647  m_xCheckLB->set_id(i, "0");
648  }
649 }
650 
651 void SwCaptionOptPage::UpdateEntry(int nSelEntry)
652 {
653  if (nSelEntry != -1)
654  {
655  bool bChecked = m_xCheckLB->get_toggle(nSelEntry) == TRISTATE_TRUE;
656 
657  m_xSettingsGroup->set_sensitive(bChecked);
658  bool bNumSep = bChecked && m_xLbCaptionOrder->get_active() == 1;
659  m_xNumberingSeparatorED->set_sensitive( bNumSep );
660  m_xNumberingSeparatorFT->set_sensitive( bNumSep );
661 
662  m_xNumCapt->set_sensitive(bChecked);
663  m_xCategory->set_sensitive(bChecked);
664  m_xPreview->set_sensitive(bChecked);
665 
667 
668  InsCaptionOpt* pOpt = reinterpret_cast<InsCaptionOpt*>(m_xCheckLB->get_id(nSelEntry).toInt64());
669 
670  m_xCategoryBox->clear();
671  m_xCategoryBox->append_text(m_sNone);
672  if (pSh)
673  {
674  const size_t nCount = pMgr->GetFieldTypeCount();
675 
676  for (size_t i = 0; i < nCount; ++i)
677  {
678  SwFieldType *pType = pMgr->GetFieldType( SwFieldIds::Unknown, i );
679  if( pType->Which() == SwFieldIds::SetExp &&
680  static_cast<SwSetExpFieldType *>( pType)->GetType() & nsSwGetSetExpType::GSE_SEQ )
681  {
682  m_xCategoryBox->append_text(pType->GetName());
683  }
684  }
685  }
686  else
687  {
688  m_xCategoryBox->append_text(m_sIllustration);
689  m_xCategoryBox->append_text(m_sTable);
690  m_xCategoryBox->append_text(m_sText);
691  m_xCategoryBox->append_text(m_sDrawing);
692  }
693 
694  if (!pOpt->GetCategory().isEmpty())
695  {
696  if (m_xCategoryBox->find_text(pOpt->GetCategory()) == -1)
697  m_xCategoryBox->insert_text(0, pOpt->GetCategory());
698  m_xCategoryBox->set_active_text(pOpt->GetCategory());
699  }
700  else
701  m_xCategoryBox->set_active_text(m_sNone);
702 
703  if (m_xCategoryBox->get_active_text().isEmpty())
704  {
705  sal_Int32 nPos = 0;
706  switch(pOpt->GetObjType())
707  {
708  case OLE_CAP:
709  case GRAPHIC_CAP: nPos = 1; break;
710  case TABLE_CAP: nPos = 2; break;
711  case FRAME_CAP: nPos = 3; break;
712  }
713  m_xCategoryBox->set_active(nPos);
714  }
715 
716  for (sal_Int32 i = 0; i < m_xFormatBox->get_count(); i++)
717  {
718  if (pOpt->GetNumType() == m_xFormatBox->get_id(i).toUInt32())
719  {
720  m_xFormatBox->set_active(i);
721  break;
722  }
723  }
724  m_xTextEdit->set_text(pOpt->GetCaption());
725 
726  m_xPosBox->clear();
727  switch (pOpt->GetObjType())
728  {
729  case GRAPHIC_CAP:
730  case TABLE_CAP:
731  case OLE_CAP:
732  m_xPosBox->append_text(m_sAbove);
733  m_xPosBox->append_text(m_sBelow);
734  break;
735  case FRAME_CAP:
736  m_xPosBox->append_text(m_sBegin);
737  m_xPosBox->append_text(m_sEnd);
738  break;
739  }
740  m_xPosBox->set_active(pOpt->GetPos());
741 
742  sal_Int32 nLevelPos = ( pOpt->GetLevel() < MAXLEVEL ) ? pOpt->GetLevel() + 1 : 0;
743  m_xLbLevel->set_active(nLevelPos);
744  m_xEdDelim->set_text(pOpt->GetSeparator());
745  m_xNumberingSeparatorED->set_text(pOpt->GetNumSeparator());
746  if (!pOpt->GetCharacterStyle().isEmpty())
747  m_xCharStyleLB->set_active_text(pOpt->GetCharacterStyle());
748  else
749  m_xCharStyleLB->set_active(0);
750  m_xApplyBorderCB->set_sensitive(m_xCategoryBox->get_sensitive() &&
751  pOpt->GetObjType() != TABLE_CAP && pOpt->GetObjType() != FRAME_CAP );
752  m_xApplyBorderCB->set_active(pOpt->CopyAttributes());
753  }
754 
755  ModifyHdl();
756 }
757 
759 {
760  if (m_nPrevSelectedEntry != -1)
761  SaveEntry(m_nPrevSelectedEntry);
762  UpdateEntry(m_xCheckLB->get_selected_index());
763  m_nPrevSelectedEntry = m_xCheckLB->get_selected_index();
764 }
765 
766 IMPL_LINK(SwCaptionOptPage, ToggleEntryHdl, const weld::TreeView::iter_col&, rRowCol, void)
767 {
768  UpdateEntry(m_xCheckLB->get_iter_index_in_parent(rRowCol.first));
769 }
770 
772 {
773  if (nEntry == -1)
774  return;
775 
776  InsCaptionOpt* pOpt = reinterpret_cast<InsCaptionOpt*>(m_xCheckLB->get_id(nEntry).toInt64());
777 
778  pOpt->UseCaption() = m_xCheckLB->get_toggle(nEntry) == TRISTATE_TRUE;
779  const OUString aName(m_xCategoryBox->get_active_text());
780  if (aName == m_sNone)
781  pOpt->SetCategory("");
782  else
784  pOpt->SetNumType(m_xFormatBox->get_active_id().toUInt32());
785  pOpt->SetCaption(m_xTextEdit->get_sensitive() ? m_xTextEdit->get_text() : OUString() );
786  pOpt->SetPos(m_xPosBox->get_active());
787  int nPos = m_xLbLevel->get_active();
788  sal_Int32 nLevel = (nPos > 0) ? nPos - 1 : MAXLEVEL;
789  pOpt->SetLevel(nLevel);
790  pOpt->SetSeparator(m_xEdDelim->get_text());
791  pOpt->SetNumSeparator(m_xNumberingSeparatorED->get_text());
792  if (m_xCharStyleLB->get_active() == -1)
793  pOpt->SetCharacterStyle("");
794  else
795  pOpt->SetCharacterStyle(m_xCharStyleLB->get_active_text());
796  pOpt->CopyAttributes() = m_xApplyBorderCB->get_active();
797 }
798 
800 {
801  const OUString sFieldTypeName = m_xCategoryBox->get_active_text();
802 
803  if (SfxSingleTabDialogController* pDlg = dynamic_cast<SfxSingleTabDialogController*>(GetDialogController()))
804  pDlg->GetOKButton().set_sensitive(!sFieldTypeName.isEmpty());
805  bool bEnable = m_xCategoryBox->get_sensitive() && sFieldTypeName != m_sNone;
806 
807  m_xFormatText->set_sensitive(bEnable);
808  m_xFormatBox->set_sensitive(bEnable);
809  m_xTextText->set_sensitive(bEnable);
810  m_xTextEdit->set_sensitive(bEnable);
811 
813 }
814 
816 {
817  ModifyHdl();
818 }
819 
821 {
822  ModifyHdl();
823 }
824 
826 {
827  InvalidatePreview();
828 }
829 
831 {
832  InvalidatePreview();
833 }
834 
835 IMPL_LINK(SwCaptionOptPage, OrderHdl, weld::ComboBox&, rBox, void)
836 {
837  InvalidatePreview();
838 
839  int nSelEntry = m_xCheckLB->get_selected_index();
840  bool bChecked = false;
841  if (nSelEntry != -1)
842  {
843  bChecked = m_xCheckLB->get_toggle(nSelEntry) == TRISTATE_TRUE;
844  }
845 
846  int nPos = rBox.get_active();
847  m_xNumberingSeparatorFT->set_sensitive(bChecked && nPos == 1);
848  m_xNumberingSeparatorED->set_sensitive(bChecked && nPos == 1);
849 }
850 
852 {
853  OUString aStr;
854 
855  if (m_xCategoryBox->get_active_text() != m_sNone)
856  {
857  //#i61007# order of captions
858  bool bOrderNumberingFirst = m_xLbCaptionOrder->get_active() == 1;
859  // number
860  const sal_uInt16 nNumFormat = m_xFormatBox->get_active_id().toUInt32();
861  if (SVX_NUM_NUMBER_NONE != nNumFormat)
862  {
863  //#i61007# order of captions
864  if( !bOrderNumberingFirst )
865  {
866  // category
867  aStr += m_xCategoryBox->get_active_text() + " ";
868  }
869 
871  if (pSh)
872  {
873  SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>(pMgr->GetFieldType(
874  SwFieldIds::SetExp, m_xCategoryBox->get_active_text() ));
875  if( pFieldType && pFieldType->GetOutlineLvl() < MAXLEVEL )
876  {
877  sal_uInt8 nLvl = pFieldType->GetOutlineLvl();
878  SwNumberTree::tNumberVector aNumVector;
879  for( sal_uInt8 i = 0; i <= nLvl; ++i )
880  aNumVector.push_back(1);
881 
882  const OUString sNumber( pSh->GetOutlineNumRule()->MakeNumString(
883  aNumVector, false ));
884  if( !sNumber.isEmpty() )
885  aStr += sNumber + pFieldType->GetDelimiter();
886  }
887  }
888 
889  switch( nNumFormat )
890  {
891  case SVX_NUM_CHARS_UPPER_LETTER: aStr += "A"; break;
892  case SVX_NUM_CHARS_UPPER_LETTER_N: aStr += "A"; break;
893  case SVX_NUM_CHARS_LOWER_LETTER: aStr += "a"; break;
894  case SVX_NUM_CHARS_LOWER_LETTER_N: aStr += "a"; break;
895  case SVX_NUM_ROMAN_UPPER: aStr += "I"; break;
896  case SVX_NUM_ROMAN_LOWER: aStr += "i"; break;
897  //case ARABIC:
898  default: aStr += "1"; break;
899  }
900  }
901  //#i61007# order of captions
902  if( bOrderNumberingFirst )
903  {
904  aStr += m_xNumberingSeparatorED->get_text() + m_xCategoryBox->get_active_text();
905  }
906  aStr += m_xTextEdit->get_text();
907  }
909 }
910 
911 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
Instances of SwFields and those derived from it occur 0 to n times.
Definition: fldbas.hxx:240
void SetNumSeparator(const OUString &rSet)
Definition: caption.hxx:62
std::unique_ptr< weld::Widget > m_xSettingsGroup
Definition: optload.hxx:146
SVX_NUM_CHARS_UPPER_LETTER_N
const OUString & GetCategory() const
Definition: caption.hxx:55
FieldUnit
std::unique_ptr< weld::Label > m_xTextText
Definition: optload.hxx:153
const OUString & GetCharacterStyle() const
Definition: caption.hxx:76
const OUString & GetNumSeparator() const
Definition: caption.hxx:61
SwFieldUpdateFlags
Definition: fldupde.hxx:22
std::unique_ptr< weld::RadioButton > m_xAlwaysRB
Definition: optload.hxx:63
std::unique_ptr< weld::ComboBox > m_xMetricLB
Definition: optload.hxx:70
OUString MakeNumString(const SwNodeNum &, bool bInclStrings=true) const
Definition: number.cxx:628
std::unique_ptr< ContentProperties > pData
std::string GetValue
SW_DLLPUBLIC void FillCharStyleListBox(weld::ComboBox &rToFill, SwDocShell *pDocSh, bool bSorted=false, bool bWithDefault=false)
Definition: uitool.cxx:791
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
void SetInsWithCaption(bool bHTML, bool b)
Definition: modcfg.hxx:267
void SetSeparator(const OUString &rSep)
Definition: caption.hxx:74
OUString m_sOLE
Definition: optload.hxx:121
OString strip(std::string_view rIn, char c)
void Remove(const SvGlobalName &)
SVX_NUM_NUMBER_NONE
SwLoadOptPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optload.cxx:78
sal_uIntPtr sal_uLong
long Long
const StyleSettings & GetStyleSettings() const
OUString m_sEnd
Definition: optload.hxx:129
SVX_NUM_CHARS_UPPER_LETTER
bool & CopyAttributes()
Definition: caption.hxx:83
SwWrtShell * GetActiveWrtShell()
Definition: swmodul1.cxx:108
std::unique_ptr< weld::ComboBox > m_xLbLevel
Definition: optload.hxx:158
Definition: doc.hxx:188
bool IsApplyCharUnit() const
Definition: usrpref.hxx:232
sal_uInt16 GetValue() const
constexpr sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:93
std::unique_ptr< weld::Entry > m_xNumberingSeparatorED
Definition: optload.hxx:152
#define SO3_SW_CLASSID
weld::Container * get_content_area()
void SetPos(const sal_uInt16 nP)
Definition: caption.hxx:68
void SetModified()
Definition: edws.cxx:70
void SetCaptionOrderNumberingFirst(bool bSet)
Definition: modcfg.hxx:273
std::unique_ptr< weld::SpinButton > m_xStandardizedPageSizeNF
Definition: optload.hxx:77
void ModifyHdl()
Definition: optload.cxx:799
TRISTATE_TRUE
#define RESARRAY_INDEX_NOTFOUND
SwWrtShell * m_pWrtShell
Definition: optload.hxx:59
OUString m_sText
Definition: optload.hxx:125
std::unique_ptr< weld::Label > m_xNumberingSeparatorFT
Definition: optload.hxx:151
IMPL_LINK(SwCaptionOptPage, TextFilterHdl, OUString &, rTest, bool)
Definition: optload.cxx:417
Size const & GetOutputSizePixel() const
void ApplyDefaultPageMode(bool bIsSquaredPageMode)
Definition: swmodul1.cxx:653
tools::Long GetFontHeight() const
OUString m_sDrawing
Definition: optload.hxx:126
OUString m_sSWGraphic
Definition: optload.hxx:120
SwFieldUpdateFlags GetFieldUpdateFlags() const
Definition: edfld.cxx:362
const InsCaptionOpt * GetCapOption(bool bHTML, const SwCapObjType eType, const SvGlobalName *pOleId)
Definition: modcfg.cxx:60
Used by the UI to modify the document model.
Definition: wrtsh.hxx:93
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:165
std::unique_ptr< weld::Label > m_xTabFT
Definition: optload.hxx:71
sal_uInt16 sal_Unicode
void SetBackground()
std::unique_ptr< weld::ComboBox > m_xCharStyleLB
Definition: optload.hxx:162
const SwView & GetView() const
Definition: wrtsh.hxx:431
std::unique_ptr< weld::Entry > m_xEdDelim
Definition: optload.hxx:159
std::unique_ptr< weld::RadioButton > m_xRequestRB
Definition: optload.hxx:64
OUString m_sBelow
Definition: optload.hxx:131
const OUString & GetCaption() const
Definition: caption.hxx:64
std::unique_ptr< weld::CheckButton > m_xApplyBorderCB
Definition: optload.hxx:163
std::unique_ptr< weld::ComboBox > m_xCategoryBox
Definition: optload.hxx:147
std::unique_ptr< weld::ComboBox > m_xLbCaptionOrder
Definition: optload.hxx:144
void ApplyLinkMode(sal_Int32 nNewLinkMode)
Definition: swmodul1.cxx:623
const vcl::Font & GetFont() const
SwCaptionPreview m_aPreview
Definition: optload.hxx:142
std::pair< const TreeIter &, int > iter_col
int nCount
std::unique_ptr< weld::Widget > m_xNumCapt
Definition: optload.hxx:157
SVX_NUM_ARABIC
SVX_NUM_ROMAN_UPPER
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optload.cxx:536
virtual void Reset(const SfxItemSet *rSet) override
Definition: optload.cxx:259
SVX_NUM_ROMAN_LOWER
static std::shared_ptr< ConfigurationChanges > create(css::uno::Reference< css::uno::XComponentContext > const &context=comphelper::getProcessComponentContext())
OUString m_sSWFrame
Definition: optload.hxx:119
#define SO3_OUT_CLASSID
SwDoc * GetDoc() const
Definition: viewsh.hxx:281
virtual OutputDevice & get_ref_device()=0
void SetLinkUpdMode(sal_uInt16 nMode)
Definition: editsh.cxx:937
static OUString getProductVersion()
std::unique_ptr< weld::MetricSpinButton > m_xTabMF
Definition: optload.hxx:72
void DrawRect(const tools::Rectangle &rRect)
OUString maText
Definition: optload.hxx:102
#define SAL_N_ELEMENTS(arr)
static FieldUnit GetValue(sal_uInt32 i)
Definition: optload.cxx:71
SwCaptionOptDlg(weld::Window *pParent, const SfxItemSet &rSet)
Definition: optload.cxx:364
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optload.cxx:151
SwCapObjType GetObjType() const
Definition: caption.hxx:51
void SetLineColor()
void InvalidatePreview()
Definition: optload.cxx:851
void SaveEntry(int nEntry)
Definition: optload.cxx:771
SVX_NUM_CHARS_LOWER_LETTER
#define SW_MOD()
Definition: swmodule.hxx:256
std::unique_ptr< weld::RadioButton > m_xNeverRB
Definition: optload.hxx:65
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
int i
static OUString getProductName()
sal_Int32 GetUpdateLinkMode() const
Definition: usrpref.hxx:173
std::unique_ptr< weld::ComboBox > m_xFormatBox
Definition: optload.hxx:149
sal_uInt16 GetLevel() const
Definition: caption.hxx:70
std::unique_ptr< weld::CustomWeld > m_xPreview
Definition: optload.hxx:164
bool SetCapOption(bool bHTML, const InsCaptionOpt *pOpt)
Definition: modcfg.cxx:82
OUString m_sIllustration
Definition: optload.hxx:123
SwCaptionOptPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optload.cxx:423
OUString m_sAbove
Definition: optload.hxx:130
#define FN_PARAM_WRTSHELL
Definition: cmdid.h:797
TRISTATE_FALSE
vcl::Font maFont
Definition: optload.hxx:104
HTMLMODE_ON
std::unique_ptr< weld::TreeView > m_xCheckLB
Definition: optload.hxx:143
void SetFillColor()
void SetNumType(const sal_uInt16 nNT)
Definition: caption.hxx:59
void SetOptions(const sal_uLong nPos, const SwCapObjType eType, const SvGlobalName *pOleId=nullptr)
Definition: optload.cxx:623
bool IsAsianTypographyEnabled()
void SetTabPage(std::unique_ptr< SfxTabPage > xTabPage)
Label drawing objects.
Definition: poolfmt.hxx:358
const AllSettings & GetSettings() const
sal_uInt16 m_nLastTab
Definition: optload.hxx:60
std::unique_ptr< weld::ComboBox > m_xPosBox
Definition: optload.hxx:155
std::unique_ptr< weld::Widget > m_xCategory
Definition: optload.hxx:161
void DelUserData()
Definition: optload.cxx:642
sal_uInt16 GetPos() const
Definition: caption.hxx:67
const SwNumRule * GetOutlineNumRule() const
Definition: ednumber.cxx:122
sal_uInt8 GetOutlineLvl() const
Definition: expfld.hxx:179
void SetDefaultPageMode(bool bSquaredPageMode)
Definition: docdesc.cxx:1007
SVX_NUM_CHARS_LOWER_LETTER_N
std::unique_ptr< SwFieldMgr > pMgr
Definition: optload.hxx:137
SwDocShell * GetDocShell()
Definition: view.cxx:1127
std::vector< tSwNumTreeNumber > tNumberVector
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
void UpdateEntry(int nRow)
Definition: optload.cxx:651
std::unique_ptr< weld::CheckButton > m_xUseCharUnit
Definition: optload.hxx:74
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optload.cxx:542
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optload.cxx:140
const SwGetSetExpType GSE_SEQ
Sequence.
Definition: fldbas.hxx:204
std::unique_ptr< weld::CheckButton > m_xAutoUpdateFields
Definition: optload.hxx:67
AUTOMATIC
size_t Count() const
SwFieldUpdateFlags GetFieldUpdateFlags() const
Definition: usrpref.hxx:188
bool IsSquaredPageMode() const
Definition: docdesc.cxx:1032
OUString m_sBegin
Definition: optload.hxx:128
virtual OUString GetName() const
Only in derived classes.
Definition: fldbas.cxx:137
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
unsigned char sal_uInt8
bool mbFontInitialized
Definition: optload.hxx:103
void SetCharacterStyle(const OUString &rStyle)
Definition: caption.hxx:77
std::unique_ptr< weld::Entry > m_xTextEdit
Definition: optload.hxx:154
void SetFont(const vcl::Font &rNewFont)
void SetLevel(const sal_uInt16 nLvl)
Definition: caption.hxx:71
std::unique_ptr< weld::CheckButton > m_xShowStandardizedPageCount
Definition: optload.hxx:76
OUString aName
virtual void Reset(const SfxItemSet *rSet) override
Definition: optload.cxx:566
static OUString GetString(sal_uInt32 i)
Definition: optload.cxx:64
std::unique_ptr< weld::CheckButton > m_xUseSquaredPageMode
Definition: optload.hxx:73
Label illustration.
Definition: poolfmt.hxx:346
SfxOkDialogController * GetDialogController() const
std::unique_ptr< weld::Entry > m_xWordCountED
Definition: optload.hxx:75
const Color & GetWindowColor() const
std::unique_ptr< weld::Label > m_xFormatText
Definition: optload.hxx:148
virtual ~SwLoadOptPage() override
Definition: optload.cxx:136
void SetFieldUpdateFlags(SwFieldUpdateFlags eFlags)
Definition: edfld.cxx:357
OUString m_sNone
Definition: optload.hxx:133
virtual ~SwCaptionOptPage() override
Definition: optload.cxx:529
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: optload.cxx:409
OUString m_sTable
Definition: optload.hxx:124
void SetFontHeight(tools::Long nHeight)
std::unique_ptr< weld::ComboBox > m_xCategory
static sal_uInt32 Count()
Definition: optload.cxx:59
void SetCaption(const OUString &rCap)
Definition: caption.hxx:65
sal_uInt16 GetLinkUpdMode() const
Embeds all local links (ranges/graphics).
Definition: editsh.cxx:932
void SetPreviewText(const OUString &rText)
Definition: optload.cxx:393
void ApplySettings(vcl::RenderContext &rRenderContext)
Definition: optload.cxx:377
void ApplyFieldUpdateFlags(SwFieldUpdateFlags eFieldFlags)
Definition: swmodul1.cxx:616
sal_uInt16 GetNumType() const
Definition: caption.hxx:58
OUString m_sSWTable
Definition: optload.hxx:118
const OUString & GetDelimiter() const
Number sequence fields chapterwise if required.
Definition: expfld.hxx:177
SwCapObjType
const OUString & GetSeparator() const
Definition: caption.hxx:73
virtual void set_size_request(int nWidth, int nHeight)=0
constexpr OUStringLiteral first
sal_Int32 m_nOldLinkMode
Definition: optload.hxx:61
bool & UseCaption()
Definition: caption.hxx:48
void SetCategory(const OUString &rCat)
Definition: caption.hxx:56
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
std::unique_ptr< weld::CheckButton > m_xAutoUpdateCharts
Definition: optload.hxx:68
SwFieldIds Which() const
Definition: fldbas.hxx:272
aStr
sal_uInt16 nPos
IMPL_LINK_NOARG(SwLoadOptPage, StandardizedPageCountCheckHdl, weld::Toggleable &, void)
Definition: optload.cxx:146
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
Definition: optload.cxx:402