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