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