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