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