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(pParent, "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 
149  const SfxItemSet* rAttrSet )
150 {
151  return VclPtr<SwLoadOptPage>::Create(pParent, *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
378  TabPageParent aParent(get_content_area(), this);
379  SetTabPage(SwCaptionOptPage::Create(aParent, &rSet));
380 }
381 
383  : mbFontInitialized(false)
384 {
385 }
386 
388 {
389  Wallpaper aBack(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor());
390  rRenderContext.SetBackground(aBack);
391  rRenderContext.SetFillColor(aBack.GetColor());
392  rRenderContext.SetLineColor(aBack.GetColor());
393 
394  if (!mbFontInitialized)
395  {
396  maFont = rRenderContext.GetFont();
397  maFont.SetFontHeight(maFont.GetFontHeight() * 120 / 100);
398  mbFontInitialized = true;
399  }
400  rRenderContext.SetFont(maFont);
401 }
402 
403 void SwCaptionPreview::SetPreviewText(const OUString& rText)
404 {
405  if (rText != maText)
406  {
407  maText = rText;
408  Invalidate();
409  }
410 }
411 
413 {
414  CustomWidgetController::SetDrawingArea(pDrawingArea);
415  Size aSize(pDrawingArea->get_ref_device().LogicToPixel(Size(106 , 20), MapMode(MapUnit::MapAppFont)));
416  pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
417 }
418 
420 {
421  ApplySettings(rRenderContext);
422 
423  rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), GetOutputSizePixel()));
424  rRenderContext.DrawText(Point(4, 6), maText);
425 }
426 
427 IMPL_LINK(SwCaptionOptPage, TextFilterHdl, OUString&, rTest, bool)
428 {
429  rTest = m_aTextFilter.filter(rTest);
430  return true;
431 }
432 
434  : SfxTabPage(pParent, "modules/swriter/ui/optcaptionpage.ui", "OptCaptionPage", &rSet)
435  , m_sSWTable(SwResId(STR_CAPTION_TABLE))
436  , m_sSWFrame(SwResId(STR_CAPTION_FRAME))
437  , m_sSWGraphic(SwResId(STR_CAPTION_GRAPHIC))
438  , m_sOLE(SwResId(STR_CAPTION_OLE))
439  , m_sBegin(SwResId(STR_CAPTION_BEGINNING))
440  , m_sEnd(SwResId(STR_CAPTION_END))
441  , m_sAbove(SwResId(STR_CAPTION_ABOVE))
442  , m_sBelow(SwResId(STR_CAPTION_BELOW))
443  , m_sNone(SwResId(SW_STR_NONE))
444  , m_nPrevSelectedEntry(-1)
445  , pMgr(new SwFieldMgr)
446  , bHTMLMode(false)
447  , m_aTextFilter(m_sNone)
448  , m_xCheckLB(m_xBuilder->weld_tree_view("objects"))
449  , m_xLbCaptionOrder(m_xBuilder->weld_combo_box("captionorder"))
450  , m_xSettingsGroup(m_xBuilder->weld_widget("settings"))
451  , m_xCategoryBox(m_xBuilder->weld_combo_box("category"))
452  , m_xFormatText(m_xBuilder->weld_label("numberingft"))
453  , m_xFormatBox(m_xBuilder->weld_combo_box("numbering"))
454  , m_xNumberingSeparatorFT(m_xBuilder->weld_label("numseparatorft"))
455  , m_xNumberingSeparatorED(m_xBuilder->weld_entry("numseparator"))
456  , m_xTextText(m_xBuilder->weld_label("separatorft"))
457  , m_xTextEdit(m_xBuilder->weld_entry("separator"))
458  , m_xPosBox(m_xBuilder->weld_combo_box("position"))
459  , m_xNumCapt(m_xBuilder->weld_widget("numcaption"))
460  , m_xLbLevel(m_xBuilder->weld_combo_box("level"))
461  , m_xEdDelim(m_xBuilder->weld_entry("chapseparator"))
462  , m_xCategory(m_xBuilder->weld_widget("categoryformat"))
463  , m_xCharStyleLB(m_xBuilder->weld_combo_box("charstyle"))
464  , m_xApplyBorderCB(m_xBuilder->weld_check_button("applyborder"))
465  , m_xPreview(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreview))
466 {
467  m_xCategoryBox->connect_entry_insert_text(LINK(this, SwCaptionOptPage, TextFilterHdl));
468 
469  std::vector<int> aWidths;
470  aWidths.push_back(m_xCheckLB->get_checkbox_column_width());
471  m_xCheckLB->set_column_fixed_widths(aWidths);
472 
477 
479 
480  // m_xFormatBox
481  sal_uInt16 nSelFormat = SVX_NUM_ARABIC;
482  if (pSh)
483  {
484  for ( auto i = pMgr->GetFieldTypeCount(); i; )
485  {
486  SwFieldType* pFieldType = pMgr->GetFieldType(SwFieldIds::Unknown, --i);
487  if (!pFieldType->GetName().isEmpty()
488  && pFieldType->GetName() == m_xCategoryBox->get_active_text())
489  {
490  nSelFormat = static_cast<sal_uInt16>(static_cast<SwSetExpFieldType*>(pFieldType)->GetSeqFormat());
491  break;
492  }
493  }
494 
495  ::FillCharStyleListBox( *m_xCharStyleLB, pSh->GetView().GetDocShell(), true, true );
496  }
497 
498  const sal_uInt16 nCount = pMgr->GetFormatCount(TYP_SEQFLD, false);
499  for ( sal_uInt16 i = 0; i < nCount; ++i )
500  {
501  const sal_uInt16 nFormatId = pMgr->GetFormatId(TYP_SEQFLD, i);
502  m_xFormatBox->append(OUString::number(nFormatId), pMgr->GetFormatStr(TYP_SEQFLD, i));
503  if (nFormatId == nSelFormat)
504  m_xFormatBox->set_active(i);
505  }
506 
507  for (int i = 0; i < MAXLEVEL; ++i)
508  m_xLbLevel->append_text(OUString::number(i + 1));
509 
510  sal_Unicode nLvl = MAXLEVEL;
511  OUString sDelim(": ");
512 
513  if (pSh)
514  {
515  SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>(pMgr->GetFieldType(
516  SwFieldIds::SetExp, m_xCategoryBox->get_active_text() ));
517  if( pFieldType )
518  {
519  sDelim = pFieldType->GetDelimiter();
520  nLvl = pFieldType->GetOutlineLvl();
521  }
522  }
523 
524  m_xLbLevel->set_active(nLvl < MAXLEVEL ? nLvl + 1 : 0);
525  m_xEdDelim->set_text(sDelim);
526 
527  m_xCategoryBox->connect_changed(LINK(this, SwCaptionOptPage, ModifyComboHdl));
528  Link<weld::Entry&,void> aLk = LINK(this, SwCaptionOptPage, ModifyEntryHdl);
529  m_xNumberingSeparatorED->connect_changed(aLk);
530  m_xTextEdit->connect_changed(aLk);
531 
532  m_xCategoryBox->connect_changed(LINK(this, SwCaptionOptPage, SelectHdl));
533  m_xFormatBox->connect_changed(LINK(this, SwCaptionOptPage, SelectListBoxHdl));
534 
535  m_xLbCaptionOrder->connect_changed(LINK(this, SwCaptionOptPage, OrderHdl));
536 
537  m_xCheckLB->connect_changed(LINK(this, SwCaptionOptPage, ShowEntryHdl));
538  m_xCheckLB->connect_toggled(LINK(this, SwCaptionOptPage, ToggleEntryHdl));
539 }
540 
542 {
543  disposeOnce();
544 }
545 
547 {
548  DelUserData();
549  pMgr.reset();
550  m_xPreview.reset();
552 }
553 
555  const SfxItemSet* rAttrSet)
556 {
557  return VclPtr<SwCaptionOptPage>::Create(pParent, *rAttrSet);
558 }
559 
561 {
562  bool bRet = false;
563  SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
564 
565  SaveEntry(m_xCheckLB->get_selected_index()); // apply current entry
566 
567  int nCheckCount = 0;
568  for (int i = 0, nCount = m_xCheckLB->n_children(); i < nCount; ++i)
569  {
570  if (m_xCheckLB->get_toggle(i, 0) == TRISTATE_TRUE)
571  ++nCheckCount;
572  InsCaptionOpt* pData = reinterpret_cast<InsCaptionOpt*>(m_xCheckLB->get_id(i).toInt64());
573  bRet |= pModOpt->SetCapOption(bHTMLMode, pData);
574  }
575 
576  pModOpt->SetInsWithCaption(bHTMLMode, nCheckCount > 0);
577 
578  int nPos = m_xLbCaptionOrder->get_active();
579  pModOpt->SetCaptionOrderNumberingFirst(nPos == 1);
580 
581  return bRet;
582 }
583 
585 {
586  const SfxPoolItem* pItem;
587  if(SfxItemState::SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem))
588  {
589  bHTMLMode = 0 != (static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON);
590  }
591 
592  DelUserData();
593  m_xCheckLB->clear(); // remove all entries
594 
595  // Writer objects
596  int nPos = 0;
597  m_xCheckLB->append();
598  m_xCheckLB->set_toggle(nPos, TRISTATE_FALSE, 0);
599  m_xCheckLB->set_text(nPos, m_sSWTable, 1);
600  SetOptions(nPos++, TABLE_CAP);
601  m_xCheckLB->append();
602  m_xCheckLB->set_toggle(nPos, TRISTATE_FALSE, 0);
603  m_xCheckLB->set_text(nPos, m_sSWFrame, 1);
604  SetOptions(nPos++, FRAME_CAP);
605  m_xCheckLB->append();
606  m_xCheckLB->set_toggle(nPos, TRISTATE_FALSE, 0);
607  m_xCheckLB->set_text(nPos, m_sSWGraphic, 1);
608  SetOptions(nPos++, GRAPHIC_CAP);
609 
610  // get Productname and -version
611  const OUString sWithoutVersion( utl::ConfigManager::getProductName() );
612  const OUString sComplete(
613  sWithoutVersion + " " +
615 
616  SvObjectServerList aObjS;
617  aObjS.FillInsertObjects();
618  aObjS.Remove( SvGlobalName( SO3_SW_CLASSID ) ); // remove Writer-ID
619 
620  for ( sal_uLong i = 0; i < aObjS.Count(); ++i )
621  {
622  const SvGlobalName &rOleId = aObjS[i].GetClassName();
623  OUString sClass;
624  if (rOleId == SvGlobalName(SO3_OUT_CLASSID))
625  sClass = m_sOLE;
626  else
627  sClass = aObjS[i].GetHumanName();
628  // don't show product version
629  sClass = sClass.replaceFirst( sComplete, sWithoutVersion );
630  m_xCheckLB->append();
631  m_xCheckLB->set_toggle(nPos, TRISTATE_FALSE, 0);
632  m_xCheckLB->set_text(nPos, sClass, 1);
633  SetOptions( nPos++, OLE_CAP, &rOleId );
634  }
635  m_xLbCaptionOrder->set_active(
636  SW_MOD()->GetModuleConfig()->IsCaptionOrderNumberingFirst() ? 1 : 0);
637  m_xCheckLB->select(0);
638  ShowEntryHdl(*m_xCheckLB);
639 }
640 
642  const SwCapObjType eObjType, const SvGlobalName *pOleId)
643 {
644  SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
645  const InsCaptionOpt* pOpt = pModOpt->GetCapOption(bHTMLMode, eObjType, pOleId);
646 
647  if (pOpt)
648  {
649  InsCaptionOpt* pIns = new InsCaptionOpt(*pOpt);
650  m_xCheckLB->set_id(nPos, OUString::number(reinterpret_cast<sal_Int64>(pIns)));
651  m_xCheckLB->set_toggle(nPos, pOpt->UseCaption() ? TRISTATE_TRUE : TRISTATE_FALSE, 0);
652  }
653  else
654  {
655  InsCaptionOpt* pIns = new InsCaptionOpt(eObjType, pOleId);
656  m_xCheckLB->set_id(nPos, OUString::number(reinterpret_cast<sal_Int64>(pIns)));
657  }
658 }
659 
661 {
662  for (int i = 0, nCount = m_xCheckLB->n_children(); i < nCount; ++i)
663  {
664  delete reinterpret_cast<InsCaptionOpt*>(m_xCheckLB->get_id(i).toInt64());
665  m_xCheckLB->set_id(i, "0");
666  }
667 }
668 
669 void SwCaptionOptPage::UpdateEntry(int nSelEntry)
670 {
671  if (nSelEntry != -1)
672  {
673  bool bChecked = m_xCheckLB->get_toggle(nSelEntry, 0) == TRISTATE_TRUE;
674 
675  m_xSettingsGroup->set_sensitive(bChecked);
676  bool bNumSep = bChecked && m_xLbCaptionOrder->get_active() == 1;
677  m_xNumberingSeparatorED->set_sensitive( bNumSep );
678  m_xNumberingSeparatorFT->set_sensitive( bNumSep );
679 
680  m_xNumCapt->set_sensitive(bChecked);
681  m_xCategory->set_sensitive(bChecked);
682  m_xPreview->set_sensitive(bChecked);
683 
685 
686  InsCaptionOpt* pOpt = reinterpret_cast<InsCaptionOpt*>(m_xCheckLB->get_id(nSelEntry).toInt64());
687 
688  m_xCategoryBox->clear();
689  m_xCategoryBox->append_text(m_sNone);
690  if (pSh)
691  {
692  const size_t nCount = pMgr->GetFieldTypeCount();
693 
694  for (size_t i = 0; i < nCount; ++i)
695  {
696  SwFieldType *pType = pMgr->GetFieldType( SwFieldIds::Unknown, i );
697  if( pType->Which() == SwFieldIds::SetExp &&
698  static_cast<SwSetExpFieldType *>( pType)->GetType() & nsSwGetSetExpType::GSE_SEQ )
699  {
700  m_xCategoryBox->append_text(pType->GetName());
701  }
702  }
703  }
704  else
705  {
706  m_xCategoryBox->append_text(m_sIllustration);
707  m_xCategoryBox->append_text(m_sTable);
708  m_xCategoryBox->append_text(m_sText);
709  m_xCategoryBox->append_text(m_sDrawing);
710  }
711 
712  if (!pOpt->GetCategory().isEmpty())
713  {
714  if (m_xCategoryBox->find_text(pOpt->GetCategory()) == -1)
715  m_xCategoryBox->insert_text(0, pOpt->GetCategory());
716  m_xCategoryBox->set_active_text(pOpt->GetCategory());
717  }
718  else
719  m_xCategoryBox->set_active_text(m_sNone);
720 
721  if (m_xCategoryBox->get_active_text().isEmpty())
722  {
723  sal_Int32 nPos = 0;
724  switch(pOpt->GetObjType())
725  {
726  case OLE_CAP:
727  case GRAPHIC_CAP: nPos = 1; break;
728  case TABLE_CAP: nPos = 2; break;
729  case FRAME_CAP: nPos = 3; break;
730  }
731  m_xCategoryBox->set_active(nPos);
732  }
733 
734  for (sal_Int32 i = 0; i < m_xFormatBox->get_count(); i++)
735  {
736  if (pOpt->GetNumType() == m_xFormatBox->get_id(i).toUInt32())
737  {
738  m_xFormatBox->set_active(i);
739  break;
740  }
741  }
742  m_xTextEdit->set_text(pOpt->GetCaption());
743 
744  m_xPosBox->clear();
745  switch (pOpt->GetObjType())
746  {
747  case GRAPHIC_CAP:
748  case TABLE_CAP:
749  case OLE_CAP:
750  m_xPosBox->append_text(m_sAbove);
751  m_xPosBox->append_text(m_sBelow);
752  break;
753  case FRAME_CAP:
754  m_xPosBox->append_text(m_sBegin);
755  m_xPosBox->append_text(m_sEnd);
756  break;
757  }
758  m_xPosBox->set_active(pOpt->GetPos());
759 
760  sal_Int32 nLevelPos = ( pOpt->GetLevel() < MAXLEVEL ) ? pOpt->GetLevel() + 1 : 0;
761  m_xLbLevel->set_active(nLevelPos);
762  m_xEdDelim->set_text(pOpt->GetSeparator());
763  m_xNumberingSeparatorED->set_text(pOpt->GetNumSeparator());
764  if (!pOpt->GetCharacterStyle().isEmpty())
765  m_xCharStyleLB->set_active_text(pOpt->GetCharacterStyle());
766  else
767  m_xCharStyleLB->set_active(0);
768  m_xApplyBorderCB->set_sensitive(m_xCategoryBox->get_sensitive() &&
769  pOpt->GetObjType() != TABLE_CAP && pOpt->GetObjType() != FRAME_CAP );
770  m_xApplyBorderCB->set_active(pOpt->CopyAttributes());
771  }
772 
773  ModifyHdl();
774 }
775 
777 {
778  if (m_nPrevSelectedEntry != -1)
779  SaveEntry(m_nPrevSelectedEntry);
780  UpdateEntry(m_xCheckLB->get_selected_index());
781  m_nPrevSelectedEntry = m_xCheckLB->get_selected_index();
782 }
783 
784 IMPL_LINK(SwCaptionOptPage, ToggleEntryHdl, const row_col&, rRowCol, void)
785 {
786  UpdateEntry(rRowCol.first);
787 }
788 
790 {
791  if (nEntry == -1)
792  return;
793 
794  InsCaptionOpt* pOpt = reinterpret_cast<InsCaptionOpt*>(m_xCheckLB->get_id(nEntry).toInt64());
795 
796  pOpt->UseCaption() = m_xCheckLB->get_toggle(nEntry, 0) == TRISTATE_TRUE;
797  const OUString aName(m_xCategoryBox->get_active_text());
798  if (aName == m_sNone)
799  pOpt->SetCategory("");
800  else
802  pOpt->SetNumType(m_xFormatBox->get_active_id().toUInt32());
803  pOpt->SetCaption(m_xTextEdit->get_sensitive() ? m_xTextEdit->get_text() : OUString() );
804  pOpt->SetPos(m_xPosBox->get_active());
805  int nPos = m_xLbLevel->get_active();
806  sal_Int32 nLevel = (nPos > 0) ? nPos - 1 : MAXLEVEL;
807  pOpt->SetLevel(nLevel);
808  pOpt->SetSeparator(m_xEdDelim->get_text());
809  pOpt->SetNumSeparator(m_xNumberingSeparatorED->get_text());
810  if (m_xCharStyleLB->get_active() == -1)
811  pOpt->SetCharacterStyle("");
812  else
813  pOpt->SetCharacterStyle(m_xCharStyleLB->get_active_text());
814  pOpt->CopyAttributes() = m_xApplyBorderCB->get_active();
815 }
816 
818 {
819  const OUString sFieldTypeName = m_xCategoryBox->get_active_text();
820 
821  if (SfxSingleTabDialogController* pDlg = dynamic_cast<SfxSingleTabDialogController*>(GetDialogController()))
822  pDlg->GetOKButton().set_sensitive(!sFieldTypeName.isEmpty());
823  bool bEnable = m_xCategoryBox->get_sensitive() && sFieldTypeName != m_sNone;
824 
825  m_xFormatText->set_sensitive(bEnable);
826  m_xFormatBox->set_sensitive(bEnable);
827  m_xTextText->set_sensitive(bEnable);
828  m_xTextEdit->set_sensitive(bEnable);
829 
831 }
832 
834 {
835  ModifyHdl();
836 }
837 
839 {
840  ModifyHdl();
841 }
842 
844 {
845  InvalidatePreview();
846 }
847 
849 {
850  InvalidatePreview();
851 }
852 
853 IMPL_LINK(SwCaptionOptPage, OrderHdl, weld::ComboBox&, rBox, void)
854 {
855  InvalidatePreview();
856 
857  int nSelEntry = m_xCheckLB->get_selected_index();
858  bool bChecked = false;
859  if (nSelEntry != -1)
860  {
861  bChecked = m_xCheckLB->get_toggle(nSelEntry, 0) == TRISTATE_TRUE;
862  }
863 
864  int nPos = rBox.get_active();
865  m_xNumberingSeparatorFT->set_sensitive(bChecked && nPos == 1);
866  m_xNumberingSeparatorED->set_sensitive(bChecked && nPos == 1);
867 }
868 
870 {
871  OUString aStr;
872 
873  if (m_xCategoryBox->get_active_text() != m_sNone)
874  {
875  //#i61007# order of captions
876  bool bOrderNumberingFirst = m_xLbCaptionOrder->get_active() == 1;
877  // number
878  const sal_uInt16 nNumFormat = m_xFormatBox->get_active_id().toUInt32();
879  if (SVX_NUM_NUMBER_NONE != nNumFormat)
880  {
881  //#i61007# order of captions
882  if( !bOrderNumberingFirst )
883  {
884  // category
885  aStr += m_xCategoryBox->get_active_text() + " ";
886  }
887 
889  if (pSh)
890  {
891  SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>(pMgr->GetFieldType(
892  SwFieldIds::SetExp, m_xCategoryBox->get_active_text() ));
893  if( pFieldType && pFieldType->GetOutlineLvl() < MAXLEVEL )
894  {
895  sal_uInt8 nLvl = pFieldType->GetOutlineLvl();
896  SwNumberTree::tNumberVector aNumVector;
897  for( sal_uInt8 i = 0; i <= nLvl; ++i )
898  aNumVector.push_back(1);
899 
900  const OUString sNumber( pSh->GetOutlineNumRule()->MakeNumString(
901  aNumVector, false ));
902  if( !sNumber.isEmpty() )
903  aStr += sNumber + pFieldType->GetDelimiter();
904  }
905  }
906 
907  switch( nNumFormat )
908  {
909  case SVX_NUM_CHARS_UPPER_LETTER: aStr += "A"; break;
910  case SVX_NUM_CHARS_UPPER_LETTER_N: aStr += "A"; break;
911  case SVX_NUM_CHARS_LOWER_LETTER: aStr += "a"; break;
912  case SVX_NUM_CHARS_LOWER_LETTER_N: aStr += "a"; break;
913  case SVX_NUM_ROMAN_UPPER: aStr += "I"; break;
914  case SVX_NUM_ROMAN_LOWER: aStr += "i"; break;
915  //case ARABIC:
916  default: aStr += "1"; break;
917  }
918  }
919  //#i61007# order of captions
920  if( bOrderNumberingFirst )
921  {
922  aStr += m_xNumberingSeparatorED->get_text() + m_xCategoryBox->get_active_text();
923  }
924  aStr += m_xTextEdit->get_text();
925  }
927 }
928 
929 /* 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:233
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:617
std::string GetValue
SW_DLLPUBLIC void FillCharStyleListBox(weld::ComboBox &rToFill, SwDocShell *pDocSh, bool bSorted=false, bool bWithDefault=false)
Definition: uitool.cxx:735
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
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:817
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:427
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:88
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:426
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
void SetTabPage(SfxTabPage *pTabPage)
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
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)
virtual void dispose() override
void SetLinkUpdMode(sal_uInt16 nMode)
Definition: editsh.cxx:941
static OUString getProductVersion()
std::unique_ptr< weld::MetricSpinButton > m_xTabMF
Definition: optload.hxx:73
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rAttrSet)
Definition: optload.cxx:554
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:869
void SaveEntry(int nEntry)
Definition: optload.cxx:789
virtual void dispose() override
Definition: optload.cxx:546
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
#define FN_PARAM_WRTSHELL
Definition: cmdid.h:771
int i
TRISTATE_FALSE
vcl::Font maFont
Definition: optload.hxx:105
HTMLMODE_ON
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rAttrSet)
Definition: optload.cxx:148
std::unique_ptr< weld::TreeView > m_xCheckLB
Definition: optload.hxx:144
void SetFillColor()
void SetNumType(const sal_uInt16 nNT)
Definition: caption.hxx:59
SwCaptionOptPage(TabPageParent pParent, const SfxItemSet &rSet)
Definition: optload.cxx:433
void SetOptions(const sal_uLong nPos, const SwCapObjType eType, const SvGlobalName *pOleId=nullptr)
Definition: optload.cxx:641
Label drawing objects.
Definition: poolfmt.hxx:358
SwLoadOptPage(TabPageParent pParent, const SfxItemSet &rSet)
Definition: optload.cxx:84
const AllSettings & GetSettings() const
OUString SwResId(const char *pId)
Definition: swmodule.cxx:191
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:660
sal_uInt16 GetPos() const
Definition: caption.hxx:67
const SwNumRule * GetOutlineNumRule() const
Definition: ednumber.cxx:120
sal_uInt8 GetOutlineLvl() const
Definition: expfld.hxx:180
void SetDefaultPageMode(bool bSquaredPageMode)
Definition: docdesc.cxx:895
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:669
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:560
const SwGetSetExpType GSE_SEQ
Sequence.
Definition: fldbas.hxx:197
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:920
OUString const m_sBegin
Definition: optload.hxx:129
virtual OUString GetName() const
Only in derived classes.
Definition: fldbas.cxx:145
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:584
OUString const m_sEnd
Definition: optload.hxx:130
static OUString GetString(sal_uInt32 i)
Definition: optload.cxx:70
static VclPtr< reference_type > Create(Arg &&...arg)
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:541
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: optload.cxx:419
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:403
void ApplySettings(vcl::RenderContext &rRenderContext)
Definition: optload.cxx:387
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:178
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:265
OUString const m_sSWFrame
Definition: optload.hxx:120
aStr
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
Definition: optload.cxx:412