LibreOffice Module sw (master)  1
optpage.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 <sal/config.h>
21 
22 #include <utility>
23 
24 #include <optpage.hxx>
25 #include <doc.hxx>
26 #include <hintids.hxx>
27 #include <cmdid.h>
28 #include <fmtcol.hxx>
29 #include <charatr.hxx>
30 #include <swtypes.hxx>
31 #include <view.hxx>
32 #include <docsh.hxx>
36 
37 #include <swmodule.hxx>
38 #include <wrtsh.hxx>
39 #include <uitool.hxx>
40 #include <cfgitems.hxx>
41 #include <poolfmt.hxx>
42 #include <uiitems.hxx>
43 #include <initui.hxx>
44 #include <printdata.hxx>
45 #include <modcfg.hxx>
46 #include <srcview.hxx>
47 #include <crstate.hxx>
48 #include <viewopt.hxx>
49 #include <globals.hrc>
50 #include <strings.hrc>
51 #include <swwrtshitem.hxx>
52 #include <unomid.h>
53 
54 #include <editeng/fhgtitem.hxx>
55 #include <editeng/fontitem.hxx>
56 #include <editeng/langitem.hxx>
57 #include <editeng/svxenum.hxx>
58 #include <sal/macros.h>
59 #include <sfx2/dialoghelper.hxx>
60 #include <sfx2/request.hxx>
61 #include <sfx2/printer.hxx>
62 #include <sfx2/bindings.hxx>
63 #include <sfx2/viewfrm.hxx>
64 #include <svl/slstitm.hxx>
65 #include <svl/ctloptions.hxx>
66 #include <svl/eitem.hxx>
67 #include <svl/cjkoptions.hxx>
68 #include <svtools/ctrltool.hxx>
69 #include <svtools/unitconv.hxx>
70 #include <sfx2/htmlmode.hxx>
71 #include <svx/xtable.hxx>
72 #include <svx/dlgutil.hxx>
73 #include <svx/strarray.hxx>
74 #include <svx/svxids.hrc>
75 
76 #include <vcl/event.hxx>
77 #include <vcl/settings.hxx>
78 #include <vcl/svapp.hxx>
79 
80 #include <optload.hxx>
81 
82 using namespace ::com::sun::star;
83 
84 namespace {
85 
86 void drawRect(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, const Color &rFillColor, const Color &rLineColor)
87 {
88  rRenderContext.SetFillColor(rFillColor);
89  rRenderContext.SetLineColor(rLineColor);
90  rRenderContext.DrawRect(rRect);
91 }
92 
93 }
94 
95 // Tools->Options->Writer->View
96 // Tools->Options->Writer/Web->View
98  : SfxTabPage(pPage, pController, "modules/swriter/ui/viewoptionspage.ui", "ViewOptionsPage", &rCoreSet)
99  , m_xCrossCB(m_xBuilder->weld_check_button("helplines"))
100  , m_xHMetric(m_xBuilder->weld_combo_box("hrulercombobox"))
101  , m_xVRulerCBox(m_xBuilder->weld_check_button("vruler"))
102  , m_xVRulerRightCBox(m_xBuilder->weld_check_button("vrulerright"))
103  , m_xVMetric(m_xBuilder->weld_combo_box("vrulercombobox"))
104  , m_xSmoothCBox(m_xBuilder->weld_check_button("smoothscroll"))
105  , m_xGrfCB(m_xBuilder->weld_check_button("graphics"))
106  , m_xTableCB(m_xBuilder->weld_check_button("tables"))
107  , m_xDrwCB(m_xBuilder->weld_check_button("drawings"))
108  , m_xFieldNameCB(m_xBuilder->weld_check_button("fieldcodes"))
109  , m_xPostItCB(m_xBuilder->weld_check_button("comments"))
110  , m_xSettingsFrame(m_xBuilder->weld_frame("settingsframe"))
111  , m_xSettingsLabel(m_xBuilder->weld_label("settingslabel"))
112  , m_xMetricLabel(m_xBuilder->weld_label("measureunitlabel"))
113  , m_xMetricLB(m_xBuilder->weld_combo_box("measureunit"))
114  , m_xShowInlineTooltips(m_xBuilder->weld_check_button("changestooltip"))
115  , m_xFieldHiddenCB(m_xBuilder->weld_check_button("hiddentextfield"))
116  , m_xFieldHiddenParaCB(m_xBuilder->weld_check_button("hiddenparafield"))
117 {
118  /* This part is visible only with Writer/Web->View dialogue. */
119  const SfxPoolItem* pItem;
120  if (! (SfxItemState::SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem )
121  && static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON))
122  {
123  m_xSettingsFrame->hide();
124  m_xSettingsLabel->hide();
125  m_xMetricLabel->hide();
126  m_xMetricLB->hide();
127  }
128 
129  SvtCJKOptions aCJKOptions;
130  if(!aCJKOptions.IsVerticalTextEnabled() )
131  m_xVRulerRightCBox->hide();
132  m_xVRulerCBox->connect_toggled(LINK(this, SwContentOptPage, VertRulerHdl ));
133 
134  for (size_t i = 0; i < SwFieldUnitTable::Count(); ++i)
135  {
136  const OUString sMetric = SwFieldUnitTable::GetString(i);
138 
139  switch ( eFUnit )
140  {
141  case FieldUnit::MM:
142  case FieldUnit::CM:
143  case FieldUnit::POINT:
144  case FieldUnit::PICA:
145  case FieldUnit::INCH:
146  case FieldUnit::CHAR: // add two units , 'character' and 'line' , their ticks are not fixed
147  case FieldUnit::LINE:
148  {
149  // only use these metrics
150  // a horizontal ruler has not the 'line' unit
151  // there isn't 'line' unit in HTML format
152  if (eFUnit != FieldUnit::LINE)
153  {
154  m_xMetricLB->append(OUString::number(static_cast<sal_uInt32>(eFUnit)), sMetric);
155  m_xHMetric->append(OUString::number(static_cast<sal_uInt32>(eFUnit)), sMetric);
156  }
157  // a vertical ruler has not the 'character' unit
158  if (eFUnit != FieldUnit::CHAR)
159  {
160  m_xVMetric->append(OUString::number(static_cast<sal_uInt32>(eFUnit)), sMetric);
161  }
162  break;
163  }
164  default:;//prevent warning
165  }
166  }
167 }
168 
170 {
171 }
172 
173 std::unique_ptr<SfxTabPage> SwContentOptPage::Create( weld::Container* pPage, weld::DialogController* pController,
174  const SfxItemSet* rAttrSet)
175 {
176  return std::make_unique<SwContentOptPage>(pPage, pController, *rAttrSet);
177 }
178 
179 static void lcl_SelectMetricLB(weld::ComboBox& rMetric, sal_uInt16 nSID, const SfxItemSet& rSet)
180 {
181  const SfxPoolItem* pItem;
182  if( rSet.GetItemState( nSID, false, &pItem ) >= SfxItemState::DEFAULT )
183  {
184  FieldUnit eFieldUnit = static_cast<FieldUnit>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
185  for (sal_Int32 i = 0, nEntryCount = rMetric.get_count(); i < nEntryCount; ++i)
186  {
187  if (rMetric.get_id(i).toUInt32() == static_cast<sal_uInt32>(eFieldUnit))
188  {
189  rMetric.set_active(i);
190  break;
191  }
192  }
193  }
194  rMetric.save_value();
195 }
196 
198 {
199  const SwElemItem* pElemAttr = nullptr;
200 
201  rSet->GetItemState( FN_PARAM_ELEM , false,
202  reinterpret_cast<const SfxPoolItem**>(&pElemAttr) );
203  if(pElemAttr)
204  {
205  m_xTableCB->set_active(pElemAttr->m_bTable);
206  m_xGrfCB->set_active(pElemAttr->m_bGraphic);
207  m_xDrwCB->set_active(pElemAttr->m_bDrawing);
208  m_xFieldNameCB->set_active(pElemAttr->m_bFieldName);
209  m_xPostItCB->set_active(pElemAttr->m_bNotes);
210  m_xCrossCB->set_active(pElemAttr->m_bCrosshair);
211  m_xVRulerCBox->set_active(pElemAttr->m_bVertRuler);
212  m_xVRulerRightCBox->set_active(pElemAttr->m_bVertRulerRight);
213  m_xSmoothCBox->set_active(pElemAttr->m_bSmoothScroll);
214  m_xShowInlineTooltips->set_active(pElemAttr->m_bShowInlineTooltips);
215  m_xFieldHiddenCB->set_active( pElemAttr->m_bFieldHiddenText );
216  m_xFieldHiddenParaCB->set_active( pElemAttr->m_bShowHiddenPara );
217  }
218  m_xMetricLB->set_active(-1);
219  lcl_SelectMetricLB(*m_xMetricLB, SID_ATTR_METRIC, *rSet);
222 }
223 
225 {
226  const SwElemItem* pOldAttr = static_cast<const SwElemItem*>(
228 
229  SwElemItem aElem;
230  aElem.m_bTable = m_xTableCB->get_active();
231  aElem.m_bGraphic = m_xGrfCB->get_active();
232  aElem.m_bDrawing = m_xDrwCB->get_active();
233  aElem.m_bFieldName = m_xFieldNameCB->get_active();
234  aElem.m_bNotes = m_xPostItCB->get_active();
235  aElem.m_bCrosshair = m_xCrossCB->get_active();
236  aElem.m_bVertRuler = m_xVRulerCBox->get_active();
237  aElem.m_bVertRulerRight = m_xVRulerRightCBox->get_active();
238  aElem.m_bSmoothScroll = m_xSmoothCBox->get_active();
239  aElem.m_bShowInlineTooltips = m_xShowInlineTooltips->get_active();
240  aElem.m_bFieldHiddenText = m_xFieldHiddenCB->get_active();
241  aElem.m_bShowHiddenPara = m_xFieldHiddenParaCB->get_active();
242 
243  bool bRet = !pOldAttr || aElem != *pOldAttr;
244  if(bRet)
245  bRet = nullptr != rSet->Put(aElem);
246 
247  sal_Int32 nMPos = m_xMetricLB->get_active();
248  sal_Int32 nGlobalMetricPos = nMPos;
249  if ( m_xMetricLB->get_value_changed_from_saved() )
250  {
251  const sal_uInt16 nFieldUnit = m_xMetricLB->get_id(nMPos).toUInt32();
252  rSet->Put( SfxUInt16Item( SID_ATTR_METRIC, nFieldUnit ) );
253  bRet = true;
254  }
255 
256  nMPos = m_xHMetric->get_active();
257  if ( m_xHMetric->get_value_changed_from_saved() || nMPos != nGlobalMetricPos )
258  {
259  const sal_uInt16 nFieldUnit = m_xHMetric->get_id(nMPos).toUInt32();
260  rSet->Put( SfxUInt16Item( FN_HSCROLL_METRIC, nFieldUnit ) );
261  bRet = true;
262  }
263  nMPos = m_xVMetric->get_active();
264  if ( m_xVMetric->get_value_changed_from_saved() || nMPos != nGlobalMetricPos )
265  {
266  const sal_uInt16 nFieldUnit = m_xVMetric->get_id(nMPos).toUInt32();
267  rSet->Put( SfxUInt16Item( FN_VSCROLL_METRIC, nFieldUnit ) );
268  bRet = true;
269  }
270 
271  return bRet;
272 }
273 
274 IMPL_LINK(SwContentOptPage, VertRulerHdl, weld::ToggleButton&, rBox, void)
275 {
276  m_xVRulerRightCBox->set_sensitive(rBox.get_sensitive() && rBox.get_active());
277 }
278 
279 // TabPage Printer additional settings
281  const SfxItemSet& rCoreSet)
282  : SfxTabPage(pPage, pController, "modules/swriter/ui/printoptionspage.ui", "PrintOptionsPage", &rCoreSet)
283  , sNone(SwResId(SW_STR_NONE))
284  , bAttrModified(false)
285  , bPreview(false)
286  , m_xGrfCB(m_xBuilder->weld_check_button("graphics"))
287  , m_xCtrlFieldCB(m_xBuilder->weld_check_button("formcontrols"))
288  , m_xBackgroundCB(m_xBuilder->weld_check_button("background"))
289  , m_xBlackFontCB(m_xBuilder->weld_check_button("inblack"))
290  , m_xPrintHiddenTextCB(m_xBuilder->weld_check_button("hiddentext"))
291  , m_xPrintTextPlaceholderCB(m_xBuilder->weld_check_button("textplaceholder"))
292  , m_xPagesFrame(m_xBuilder->weld_widget("pagesframe"))
293  , m_xLeftPageCB(m_xBuilder->weld_check_button("leftpages"))
294  , m_xRightPageCB(m_xBuilder->weld_check_button("rightpages"))
295  , m_xProspectCB(m_xBuilder->weld_check_button("brochure"))
296  , m_xProspectCB_RTL(m_xBuilder->weld_check_button("rtl"))
297  , m_xCommentsFrame(m_xBuilder->weld_widget("commentsframe"))
298  , m_xNoRB(m_xBuilder->weld_radio_button("none"))
299  , m_xOnlyRB(m_xBuilder->weld_radio_button("only"))
300  , m_xEndRB(m_xBuilder->weld_radio_button("end"))
301  , m_xEndPageRB(m_xBuilder->weld_radio_button("endpage"))
302  , m_xInMarginsRB(m_xBuilder->weld_radio_button("inmargins"))
303  , m_xPrintEmptyPagesCB(m_xBuilder->weld_check_button("blankpages"))
304  , m_xPaperFromSetupCB(m_xBuilder->weld_check_button("papertray"))
305  , m_xFaxLB(m_xBuilder->weld_combo_box("fax"))
306 {
307  Link<weld::ToggleButton&,void> aLk = LINK( this, SwAddPrinterTabPage, AutoClickHdl);
308  m_xGrfCB->connect_toggled( aLk );
309  m_xRightPageCB->connect_toggled( aLk );
310  m_xLeftPageCB->connect_toggled( aLk );
311  m_xCtrlFieldCB->connect_toggled( aLk );
312  m_xBackgroundCB->connect_toggled( aLk );
313  m_xBlackFontCB->connect_toggled( aLk );
314  m_xPrintHiddenTextCB->connect_toggled( aLk );
315  m_xPrintTextPlaceholderCB->connect_toggled( aLk );
316  m_xProspectCB->connect_toggled( aLk );
317  m_xProspectCB_RTL->connect_toggled( aLk );
318  m_xPaperFromSetupCB->connect_toggled( aLk );
319  m_xPrintEmptyPagesCB->connect_toggled( aLk );
320  m_xEndPageRB->connect_toggled( aLk );
321  m_xInMarginsRB->connect_toggled( aLk );
322  m_xEndRB->connect_toggled( aLk );
323  m_xOnlyRB->connect_toggled( aLk );
324  m_xNoRB->connect_toggled( aLk );
325  m_xFaxLB->connect_changed( LINK( this, SwAddPrinterTabPage, SelectHdl ) );
326 
327  const SfxPoolItem* pItem;
328  if(SfxItemState::SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem )
329  && static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON)
330  {
331  m_xLeftPageCB->hide();
332  m_xRightPageCB->hide();
333  m_xPrintHiddenTextCB->hide();
335  m_xPrintEmptyPagesCB->hide();
336  }
337  m_xProspectCB_RTL->set_sensitive(false);
338  SvtCTLOptions aCTLOptions;
339  m_xProspectCB_RTL->set_visible(aCTLOptions.IsCTLFontEnabled());
340 }
341 
343 {
344 }
345 
347 {
348  bPreview = bPrev;
349  m_xCommentsFrame->set_sensitive(!bPreview);
350  m_xPagesFrame->set_sensitive(!bPreview);
351 }
352 
353 std::unique_ptr<SfxTabPage> SwAddPrinterTabPage::Create( weld::Container* pPage, weld::DialogController* pController,
354  const SfxItemSet* rAttrSet )
355 {
356  return std::make_unique<SwAddPrinterTabPage>(pPage, pController, *rAttrSet);
357 }
358 
360 {
361  if ( bAttrModified )
362  {
363  SwAddPrinterItem aAddPrinterAttr;
364  aAddPrinterAttr.m_bPrintGraphic = m_xGrfCB->get_active();
365  aAddPrinterAttr.m_bPrintTable = true; // always enabled since CWS printerpullgpages /*m_xTabCB->get_active();*/
366  aAddPrinterAttr.m_bPrintDraw = m_xGrfCB->get_active(); // UI merged with m_xGrfCB in CWS printerpullgpages
367  aAddPrinterAttr.m_bPrintControl = m_xCtrlFieldCB->get_active();
368  aAddPrinterAttr.m_bPrintPageBackground = m_xBackgroundCB->get_active();
369  aAddPrinterAttr.m_bPrintBlackFont = m_xBlackFontCB->get_active();
370  aAddPrinterAttr.m_bPrintHiddenText = m_xPrintHiddenTextCB->get_active();
371  aAddPrinterAttr.m_bPrintTextPlaceholder = m_xPrintTextPlaceholderCB->get_active();
372 
373  aAddPrinterAttr.m_bPrintLeftPages = m_xLeftPageCB->get_active();
374  aAddPrinterAttr.m_bPrintRightPages = m_xRightPageCB->get_active();
375  aAddPrinterAttr.m_bPrintReverse = false; // handled by vcl itself since CWS printerpullpages /*m_xReverseCB->get_active()*/;
376  aAddPrinterAttr.m_bPrintProspect = m_xProspectCB->get_active();
377  aAddPrinterAttr.m_bPrintProspectRTL = m_xProspectCB_RTL->get_active();
378  aAddPrinterAttr.m_bPaperFromSetup = m_xPaperFromSetupCB->get_active();
379  aAddPrinterAttr.m_bPrintEmptyPages = m_xPrintEmptyPagesCB->get_active();
380  aAddPrinterAttr.m_bPrintSingleJobs = true; // handled by vcl in new print dialog since CWS printerpullpages /*m_xSingleJobsCB->get_active()*/;
381 
382  if (m_xNoRB->get_active()) aAddPrinterAttr.m_nPrintPostIts =
384  if (m_xOnlyRB->get_active()) aAddPrinterAttr.m_nPrintPostIts =
386  if (m_xEndRB->get_active()) aAddPrinterAttr.m_nPrintPostIts =
388  if (m_xEndPageRB->get_active()) aAddPrinterAttr.m_nPrintPostIts =
390  if (m_xInMarginsRB->get_active()) aAddPrinterAttr.m_nPrintPostIts =
392 
393  const OUString sFax = m_xFaxLB->get_active_text();
394  aAddPrinterAttr.m_sFaxName = sNone == sFax ? OUString() : sFax;
395  rCoreSet->Put(aAddPrinterAttr);
396  }
397  return bAttrModified;
398 }
399 
401 {
402  const SfxItemSet& rSet = GetItemSet();
403  const SwAddPrinterItem* pAddPrinterAttr = nullptr;
404 
405  if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , false,
406  reinterpret_cast<const SfxPoolItem**>(&pAddPrinterAttr) ))
407  {
408  m_xGrfCB->set_active(pAddPrinterAttr->m_bPrintGraphic || pAddPrinterAttr->m_bPrintDraw);
409  m_xCtrlFieldCB->set_active( pAddPrinterAttr->m_bPrintControl);
410  m_xBackgroundCB->set_active( pAddPrinterAttr->m_bPrintPageBackground);
411  m_xBlackFontCB->set_active( pAddPrinterAttr->m_bPrintBlackFont);
412  m_xPrintHiddenTextCB->set_active( pAddPrinterAttr->m_bPrintHiddenText);
413  m_xPrintTextPlaceholderCB->set_active(pAddPrinterAttr->m_bPrintTextPlaceholder);
414  m_xLeftPageCB->set_active( pAddPrinterAttr->m_bPrintLeftPages);
415  m_xRightPageCB->set_active( pAddPrinterAttr->m_bPrintRightPages);
416  m_xPaperFromSetupCB->set_active(pAddPrinterAttr->m_bPaperFromSetup);
417  m_xPrintEmptyPagesCB->set_active(pAddPrinterAttr->m_bPrintEmptyPages);
418  m_xProspectCB->set_active( pAddPrinterAttr->m_bPrintProspect);
419  m_xProspectCB_RTL->set_active( pAddPrinterAttr->m_bPrintProspectRTL);
420 
421  m_xNoRB->set_active(pAddPrinterAttr->m_nPrintPostIts== SwPostItMode::NONE ) ;
422  m_xOnlyRB->set_active(pAddPrinterAttr->m_nPrintPostIts== SwPostItMode::Only ) ;
423  m_xEndRB->set_active(pAddPrinterAttr->m_nPrintPostIts== SwPostItMode::EndDoc ) ;
424  m_xEndPageRB->set_active(pAddPrinterAttr->m_nPrintPostIts== SwPostItMode::EndPage ) ;
425  m_xInMarginsRB->set_active(pAddPrinterAttr->m_nPrintPostIts== SwPostItMode::InMargins ) ;
426  auto nFound = m_xFaxLB->find_text(pAddPrinterAttr->m_sFaxName);
427  if (nFound != -1)
428  m_xFaxLB->set_active(nFound);
429  else
430  m_xFaxLB->set_active(0);
431  }
432  if (m_xProspectCB->get_active())
433  {
434  m_xProspectCB_RTL->set_sensitive(true);
435  m_xNoRB->set_sensitive( false );
436  m_xOnlyRB->set_sensitive( false );
437  m_xEndRB->set_sensitive( false );
438  m_xEndPageRB->set_sensitive( false );
439  }
440  else
441  m_xProspectCB_RTL->set_sensitive( false );
442 }
443 
445 {
446  bAttrModified = true;
447  bool bIsProspect = m_xProspectCB->get_active();
448  if (!bIsProspect)
449  m_xProspectCB_RTL->set_active( false );
450  m_xProspectCB_RTL->set_sensitive( bIsProspect );
451  m_xNoRB->set_sensitive( !bIsProspect );
452  m_xOnlyRB->set_sensitive( !bIsProspect );
453  m_xEndRB->set_sensitive( !bIsProspect );
454  m_xEndPageRB->set_sensitive( !bIsProspect );
455  m_xInMarginsRB->set_sensitive( !bIsProspect );
456 }
457 
458 void SwAddPrinterTabPage::SetFax( const std::vector<OUString>& rFaxLst )
459 {
460  m_xFaxLB->append_text(sNone);
461  for(const auto & i : rFaxLst)
462  {
463  m_xFaxLB->append_text(i);
464  }
465  m_xFaxLB->set_active(0);
466 }
467 
469 {
470  bAttrModified=true;
471 }
472 
474 {
475  const SfxBoolItem* pListItem = aSet.GetItem<SfxBoolItem>(SID_FAX_LIST, false);
476  const SfxBoolItem* pPreviewItem = aSet.GetItem<SfxBoolItem>(SID_PREVIEWFLAG_TYPE, false);
477  if (pPreviewItem)
478  {
479  SetPreview(pPreviewItem->GetValue());
480  Reset(&aSet);
481  }
482  if (pListItem && pListItem->GetValue())
483  {
484  std::vector<OUString> aFaxList;
485  const std::vector<OUString>& rPrinters = Printer::GetPrinterQueues();
486  for (const auto & rPrinter : rPrinters)
487  aFaxList.insert(aFaxList.begin(), rPrinter);
488  SetFax( aFaxList );
489  }
490 }
491 
492 // Tabpage Standardfonts
494  : SfxTabPage(pPage, pController, "modules/swriter/ui/optfonttabpage.ui", "OptFontTabPage", &rSet)
495  , m_pPrt(nullptr)
496  , m_pFontConfig(nullptr)
497  , m_pWrtShell(nullptr)
498  , m_eLanguage( GetAppLanguage() )
499  , m_bListDefault(false)
500  , m_bSetListDefault(true)
501  , m_bLabelDefault(false)
502  , m_bSetLabelDefault(true)
503  , m_bIdxDefault(false)
504  , m_bSetIdxDefault(true)
505  , m_bDisposePrinter(false)
506  , m_bListHeightDefault(false)
507  , m_bLabelHeightDefault(false)
508  , m_bIndexHeightDefault(false)
509  , m_nFontGroup(FONT_GROUP_DEFAULT)
510  , m_sScriptWestern(SwResId(ST_SCRIPT_WESTERN))
511  , m_sScriptAsian(SwResId(ST_SCRIPT_ASIAN))
512  , m_sScriptComplex(SwResId(ST_SCRIPT_CTL))
513  , m_xLabelFT(m_xBuilder->weld_label("label1"))
514  , m_xStandardBox(m_xBuilder->weld_combo_box("standardbox"))
515  , m_xStandardHeightLB(new SvtFontSizeBox(m_xBuilder->weld_combo_box("standardheight")))
516  , m_xTitleBox(m_xBuilder->weld_combo_box("titlebox"))
517  , m_xTitleHeightLB(new SvtFontSizeBox(m_xBuilder->weld_combo_box("titleheight")))
518  , m_xListBox(m_xBuilder->weld_combo_box("listbox"))
519  , m_xListHeightLB(new SvtFontSizeBox(m_xBuilder->weld_combo_box("listheight")))
520  , m_xLabelBox(m_xBuilder->weld_combo_box("labelbox"))
521  , m_xLabelHeightLB(new SvtFontSizeBox(m_xBuilder->weld_combo_box("labelheight")))
522  , m_xIdxBox(m_xBuilder->weld_combo_box("idxbox"))
523  , m_xIndexHeightLB(new SvtFontSizeBox(m_xBuilder->weld_combo_box("indexheight")))
524  , m_xStandardPB(m_xBuilder->weld_button("standard"))
525 {
526  m_xStandardBox->make_sorted();
527  m_xTitleBox->make_sorted();
528  m_xListBox->make_sorted();
529  m_xLabelBox->make_sorted();
530  m_xIdxBox->make_sorted();
531 
532  m_xStandardPB->connect_clicked(LINK(this, SwStdFontTabPage, StandardHdl));
533  m_xStandardBox->connect_changed( LINK(this, SwStdFontTabPage, ModifyHdl));
534  m_xListBox->connect_changed( LINK(this, SwStdFontTabPage, ModifyHdl));
535  m_xLabelBox->connect_changed( LINK(this, SwStdFontTabPage, ModifyHdl));
536  m_xIdxBox->connect_changed( LINK(this, SwStdFontTabPage, ModifyHdl));
537  Link<weld::Widget&,void> aFocusLink = LINK( this, SwStdFontTabPage, LoseFocusHdl);
538  m_xStandardBox->connect_focus_out( aFocusLink );
539  m_xTitleBox->connect_focus_out( aFocusLink );
540  m_xListBox->connect_focus_out( aFocusLink );
541  m_xLabelBox->connect_focus_out( aFocusLink );
542  m_xIdxBox->connect_focus_out( aFocusLink );
543 }
544 
546 {
547  m_xIndexHeightLB.reset();
548  m_xLabelHeightLB.reset();
549  m_xListHeightLB.reset();
550  m_xTitleHeightLB.reset();
551  m_xStandardHeightLB.reset();
552  m_pFontList.reset();
553  if (m_bDisposePrinter)
555  else
556  m_pPrt.clear();
557 }
558 
559 std::unique_ptr<SfxTabPage> SwStdFontTabPage::Create( weld::Container* pPage, weld::DialogController* pController,
560  const SfxItemSet* rAttrSet )
561 {
562  return std::make_unique<SwStdFontTabPage>(pPage, pController, *rAttrSet);
563 }
564 
565 static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
566  SfxPrinter const * pPrt, const OUString& rStyle,
567  sal_uInt16 nFontWhich)
568 {
569  vcl::Font aFont( rStyle, Size( 0, 10 ) );
570  if( pPrt )
571  aFont = pPrt->GetFontMetric( aFont );
572  SwTextFormatColl *pColl = pWrtShell->GetTextCollFromPool(nType);
573  pColl->SetFormatAttr(SvxFontItem(aFont.GetFamilyType(), aFont.GetFamilyName(),
574  OUString(), aFont.GetPitch(), aFont.GetCharSet(), nFontWhich));
575 }
576 
577 static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType,
578  sal_Int32 nHeight, sal_uInt16 nFontHeightWhich)
579 {
580  float fSize = static_cast<float>(nHeight) / 10;
581  nHeight = CalcToUnit( fSize, MapUnit::MapTwip );
582  SwTextFormatColl *pColl = pWrtShell->GetTextCollFromPool(nType);
583  pColl->SetFormatAttr(SvxFontHeightItem(nHeight, 100, nFontHeightWhich));
584 }
585 
587 {
588  SW_MOD()->GetModuleConfig()->SetDefaultFontInCurrDocOnly(false);
589 
590  const OUString sStandard = m_xStandardBox->get_active_text();
591  const OUString sTitle = m_xTitleBox->get_active_text();
592  const OUString sList = m_xListBox->get_active_text();
593  const OUString sLabel = m_xLabelBox->get_active_text();
594  const OUString sIdx = m_xIdxBox->get_active_text();
595 
596  bool bStandardHeightChanged = m_xStandardHeightLB->get_value_changed_from_saved();
597  bool bTitleHeightChanged = m_xTitleHeightLB->get_value_changed_from_saved();
598  bool bListHeightChanged = m_xListHeightLB->get_value_changed_from_saved() && !m_bListHeightDefault;
599  bool bLabelHeightChanged = m_xLabelHeightLB->get_value_changed_from_saved() && !m_bLabelHeightDefault;
600  bool bIndexHeightChanged = m_xIndexHeightLB->get_value_changed_from_saved() && !m_bIndexHeightDefault;
601 
607  if(bStandardHeightChanged)
608  {
609  float fSize = static_cast<float>(m_xStandardHeightLB->get_value()) / 10;
610  m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MapUnit::MapTwip ), FONT_STANDARD, m_nFontGroup );
611  }
612  if(bTitleHeightChanged)
613  {
614  float fSize = static_cast<float>(m_xTitleHeightLB->get_value()) / 10;
615  m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MapUnit::MapTwip ), FONT_OUTLINE, m_nFontGroup );
616  }
617  if(bListHeightChanged)
618  {
619  float fSize = static_cast<float>(m_xListHeightLB->get_value()) / 10;
620  m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MapUnit::MapTwip ), FONT_LIST, m_nFontGroup );
621  }
622  if(bLabelHeightChanged)
623  {
624  float fSize = static_cast<float>(m_xLabelHeightLB->get_value()) / 10;
625  m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MapUnit::MapTwip ), FONT_CAPTION, m_nFontGroup );
626  }
627  if(bIndexHeightChanged)
628  {
629  float fSize = static_cast<float>(m_xIndexHeightLB->get_value()) / 10;
630  m_pFontConfig->SetFontHeight( CalcToUnit( fSize, MapUnit::MapTwip ), FONT_INDEX, m_nFontGroup );
631  }
632 
633  if(m_pWrtShell)
634  {
637  bool bMod = false;
638  const sal_uInt16 nFontWhich =
641  const sal_uInt16 nFontHeightWhich =
644  if(sStandard != m_sShellStd)
645  {
646  vcl::Font aFont( sStandard, Size( 0, 10 ) );
647  if( pPrinter )
648  aFont = pPrinter->GetFontMetric( aFont );
650  OUString(), aFont.GetPitch(), aFont.GetCharSet(), nFontWhich));
652  pColl->ResetFormatAttr(nFontWhich);
653  bMod = true;
654  }
655  if(bStandardHeightChanged)
656  {
657  float fSize = static_cast<float>(m_xStandardHeightLB->get_value()) / 10;
658  m_pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, MapUnit::MapTwip ), 100, nFontHeightWhich ) );
660  pColl->ResetFormatAttr(nFontHeightWhich);
661  bMod = true;
662  }
663 
664  if(sTitle != m_sShellTitle )
665  {
666  lcl_SetColl(m_pWrtShell, RES_POOLCOLL_HEADLINE_BASE, pPrinter, sTitle, nFontWhich);
667  bMod = true;
668  }
669  if(bTitleHeightChanged)
670  {
672  sal::static_int_cast< sal_uInt16, sal_Int64 >(m_xTitleHeightLB->get_value()), nFontHeightWhich);
673  bMod = true;
674  }
675  if(sList != m_sShellList && (!m_bListDefault || !m_bSetListDefault ))
676  {
677  lcl_SetColl(m_pWrtShell, RES_POOLCOLL_NUMBUL_BASE, pPrinter, sList, nFontWhich);
678  bMod = true;
679  }
680  if(bListHeightChanged)
681  {
683  sal::static_int_cast< sal_uInt16, sal_Int64 >(m_xListHeightLB->get_value()), nFontHeightWhich);
684  bMod = true;
685  }
686  if(sLabel != m_sShellLabel && (!m_bLabelDefault || !m_bSetLabelDefault))
687  {
688  lcl_SetColl(m_pWrtShell, RES_POOLCOLL_LABEL, pPrinter, sLabel, nFontWhich);
689  bMod = true;
690  }
691  if(bLabelHeightChanged)
692  {
694  sal::static_int_cast< sal_uInt16, sal_Int64 >(m_xLabelHeightLB->get_value()), nFontHeightWhich);
695  bMod = true;
696  }
697  if(sIdx != m_sShellIndex && (!m_bIdxDefault || !m_bSetIdxDefault))
698  {
699  lcl_SetColl(m_pWrtShell, RES_POOLCOLL_REGISTER_BASE, pPrinter, sIdx, nFontWhich);
700  bMod = true;
701  }
702  if(bIndexHeightChanged)
703  {
705  sal::static_int_cast< sal_uInt16, sal_Int64 >(m_xIndexHeightLB->get_value()), nFontHeightWhich);
706  bMod = true;
707  }
708  if ( bMod )
711  }
712  return false;
713 }
714 
716 {
717  const SfxPoolItem* pLang;
718  const sal_uInt16 nLangSlot = m_nFontGroup == FONT_GROUP_DEFAULT ? SID_ATTR_LANGUAGE :
719  FONT_GROUP_CJK == m_nFontGroup ? SID_ATTR_CHAR_CJK_LANGUAGE : SID_ATTR_CHAR_CTL_LANGUAGE;
720 
721  if( SfxItemState::SET == rSet->GetItemState(nLangSlot, false, &pLang))
722  m_eLanguage = static_cast<const SvxLanguageItem*>(pLang)->GetValue();
723 
724  OUString sToReplace = m_sScriptWestern;
726  sToReplace = m_sScriptAsian;
727  else if(FONT_GROUP_CTL == m_nFontGroup )
728  sToReplace = m_sScriptComplex;
729  m_xLabelFT->set_label(m_xLabelFT->get_label().replaceFirst("%1", sToReplace));
730 
731  const SfxPoolItem* pItem;
732 
733  if (m_bDisposePrinter)
734  {
736  m_bDisposePrinter = false;
737  }
738 
739  if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_PRINTER, false, &pItem))
740  {
741  m_pPrt = static_cast<SfxPrinter*>(static_cast<const SwPtrItem*>(pItem)->GetValue());
742  }
743  else
744  {
745  auto pPrinterSet = std::make_unique<SfxItemSet>( *rSet->GetPool(),
746  svl::Items<SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
747  SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC>{} );
748  m_pPrt = VclPtr<SfxPrinter>::Create(std::move(pPrinterSet));
749  m_bDisposePrinter = true;
750  }
751  m_pFontList.reset(new FontList( m_pPrt ));
752  // #i94536# prevent duplication of font entries when 'reset' button is pressed
753  if( !m_xStandardBox->get_count() )
754  {
755  // get the set of distinct available family names
756  std::set< OUString > aFontNames;
757  int nFontNames = m_pPrt->GetDevFontCount();
758  for( int i = 0; i < nFontNames; i++ )
759  {
760  FontMetric aFontMetric( m_pPrt->GetDevFont( i ) );
761  aFontNames.insert( aFontMetric.GetFamilyName() );
762  }
763 
764  // insert to listboxes
765  for( const auto& rFontName : aFontNames )
766  {
767  m_xStandardBox->append_text( rFontName );
768  m_xTitleBox->append_text( rFontName );
769  m_xListBox->append_text( rFontName );
770  m_xLabelBox->append_text( rFontName );
771  m_xIdxBox->append_text( rFontName );
772  }
773  }
774  if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_STDFONTS, false, &pItem))
775  {
776  m_pFontConfig = static_cast<SwStdFontConfig*>(static_cast<const SwPtrItem*>(pItem)->GetValue());
777  }
778 
779  if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_WRTSHELL, false, &pItem))
780  {
781  m_pWrtShell = static_cast<SwWrtShell*>(static_cast<const SwPtrItem*>(pItem)->GetValue());
782  }
783  OUString sStdBackup;
784  OUString sOutBackup;
785  OUString sListBackup;
786  OUString sCapBackup;
787  OUString sIdxBackup;
788  sal_Int32 nStandardHeight = -1;
789  sal_Int32 nTitleHeight = -1;
790  sal_Int32 nListHeight = -1;
791  sal_Int32 nLabelHeight = -1;
792  sal_Int32 nIndexHeight = -1;
793 
794  if(!m_pWrtShell)
795  {
798  sListBackup= m_pFontConfig->GetFontList(m_nFontGroup);
800  sIdxBackup = m_pFontConfig->GetFontIndex(m_nFontGroup);
806  if( nStandardHeight <= 0)
808  if( nTitleHeight <= 0)
809  nTitleHeight = SwStdFontConfig::GetDefaultHeightFor( FONT_OUTLINE + m_nFontGroup * FONT_PER_GROUP, m_eLanguage);
810  if( nListHeight <= 0)
811  nListHeight = SwStdFontConfig::GetDefaultHeightFor( FONT_LIST + m_nFontGroup * FONT_PER_GROUP, m_eLanguage);
812  if( nLabelHeight <= 0)
813  nLabelHeight = SwStdFontConfig::GetDefaultHeightFor( FONT_CAPTION + m_nFontGroup * FONT_PER_GROUP, m_eLanguage);
814  if( nIndexHeight <= 0)
815  nIndexHeight = SwStdFontConfig::GetDefaultHeightFor( FONT_INDEX + m_nFontGroup * FONT_PER_GROUP, m_eLanguage);
816  }
817  else
818  {
820  const SvxFontItem& rFont = !m_nFontGroup ? pColl->GetFont() :
821  FONT_GROUP_CJK == m_nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
822  m_sShellStd = sStdBackup = rFont.GetFamilyName();
823 
824  const sal_uInt16 nFontHeightWhich =
827  const SvxFontHeightItem& rFontHeightStandard = static_cast<const SvxFontHeightItem& >(pColl->GetFormatAttr(nFontHeightWhich));
828  nStandardHeight = static_cast<sal_Int32>(rFontHeightStandard.GetHeight());
829 
831  const SvxFontItem& rFontHL = !m_nFontGroup ? pColl->GetFont() :
832  FONT_GROUP_CJK == m_nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
833  m_sShellTitle = sOutBackup = rFontHL.GetFamilyName();
834 
835  const SvxFontHeightItem& rFontHeightTitle = static_cast<const SvxFontHeightItem&>(pColl->GetFormatAttr( nFontHeightWhich ));
836  nTitleHeight = static_cast<sal_Int32>(rFontHeightTitle.GetHeight());
837 
838  const sal_uInt16 nFontWhich =
842  const SvxFontItem& rFontLS = !m_nFontGroup ? pColl->GetFont() :
843  FONT_GROUP_CJK == m_nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
844  m_bListDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false);
845  m_sShellList = sListBackup = rFontLS.GetFamilyName();
846 
847  const SvxFontHeightItem& rFontHeightList = static_cast<const SvxFontHeightItem&>(pColl->GetFormatAttr(nFontHeightWhich));
848  nListHeight = static_cast<sal_Int32>(rFontHeightList.GetHeight());
849  m_bListHeightDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false);
850 
852  m_bLabelDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false);
853  const SvxFontItem& rFontCP = !m_nFontGroup ? pColl->GetFont() :
854  FONT_GROUP_CJK == m_nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
855  m_sShellLabel = sCapBackup = rFontCP.GetFamilyName();
856  const SvxFontHeightItem& rFontHeightLabel = static_cast<const SvxFontHeightItem&>(pColl->GetFormatAttr(nFontHeightWhich));
857  nLabelHeight = static_cast<sal_Int32>(rFontHeightLabel.GetHeight());
858  m_bLabelHeightDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false);
859 
861  m_bIdxDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false);
862  const SvxFontItem& rFontIDX = !m_nFontGroup ? pColl->GetFont() :
863  FONT_GROUP_CJK == m_nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
864  m_sShellIndex = sIdxBackup = rFontIDX.GetFamilyName();
865  const SvxFontHeightItem& rFontHeightIndex = static_cast<const SvxFontHeightItem&>(pColl->GetFormatAttr(nFontHeightWhich));
866  nIndexHeight = static_cast<sal_Int32>(rFontHeightIndex.GetHeight());
867  m_bIndexHeightDefault = SfxItemState::DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, false);
868  }
869  m_xStandardBox->set_entry_text(sStdBackup );
870  m_xTitleBox->set_entry_text(sOutBackup );
871  m_xListBox->set_entry_text(sListBackup);
872  m_xLabelBox->set_entry_text(sCapBackup );
873  m_xIdxBox->set_entry_text(sIdxBackup );
874 
875  FontMetric aFontMetric( m_pFontList->Get(sStdBackup, sStdBackup) );
876  m_xStandardHeightLB->Fill( &aFontMetric, m_pFontList.get() );
877  aFontMetric = m_pFontList->Get(sOutBackup, sOutBackup );
878  m_xTitleHeightLB->Fill( &aFontMetric, m_pFontList.get() );
879  aFontMetric = m_pFontList->Get(sListBackup,sListBackup);
880  m_xListHeightLB->Fill( &aFontMetric, m_pFontList.get() );
881  aFontMetric = m_pFontList->Get(sCapBackup, sCapBackup );
882  m_xLabelHeightLB->Fill( &aFontMetric, m_pFontList.get() );
883  aFontMetric = m_pFontList->Get(sIdxBackup, sIdxBackup );
884  m_xIndexHeightLB->Fill( &aFontMetric, m_pFontList.get() );
885 
886  m_xStandardHeightLB->set_value( CalcToPoint( nStandardHeight, MapUnit::MapTwip, 10 ) );
887  m_xTitleHeightLB->set_value( CalcToPoint( nTitleHeight , MapUnit::MapTwip, 10 ) );
888  m_xListHeightLB->set_value( CalcToPoint( nListHeight , MapUnit::MapTwip, 10 ) );
889  m_xLabelHeightLB->set_value( CalcToPoint( nLabelHeight , MapUnit::MapTwip, 10 ));
890  m_xIndexHeightLB->set_value( CalcToPoint( nIndexHeight , MapUnit::MapTwip, 10 ));
891 
892  m_xStandardBox->save_value();
893  m_xTitleBox->save_value();
894  m_xListBox->save_value();
895  m_xLabelBox->save_value();
896  m_xIdxBox->save_value();
897 
898  m_xStandardHeightLB->save_value();
899  m_xTitleHeightLB->save_value();
900  m_xListHeightLB->save_value();
901  m_xLabelHeightLB->save_value();
902  m_xIndexHeightLB->save_value();
903 }
904 
906 {
907  sal_uInt8 nFontOffset = m_nFontGroup * FONT_PER_GROUP;
908  m_xStandardBox->set_entry_text(SwStdFontConfig::GetDefaultFor(FONT_STANDARD + nFontOffset, m_eLanguage));
909  m_xTitleBox->set_entry_text(SwStdFontConfig::GetDefaultFor(FONT_OUTLINE + nFontOffset, m_eLanguage));
910  m_xListBox->set_entry_text(SwStdFontConfig::GetDefaultFor(FONT_LIST + nFontOffset, m_eLanguage));
911  m_xLabelBox->set_entry_text(SwStdFontConfig::GetDefaultFor(FONT_CAPTION + nFontOffset, m_eLanguage));
912  m_xIdxBox->set_entry_text(SwStdFontConfig::GetDefaultFor(FONT_INDEX + nFontOffset, m_eLanguage));
913 
914  m_xStandardBox->save_value();
915  m_xTitleBox->save_value();
916  m_xListBox->save_value();
917  m_xLabelBox->save_value();
918  m_xIdxBox->save_value();
919 
920  m_xStandardHeightLB->set_value( CalcToPoint(
921  SwStdFontConfig::GetDefaultHeightFor(FONT_STANDARD + nFontOffset, m_eLanguage),
922  MapUnit::MapTwip, 10 ));
923  m_xTitleHeightLB->set_value(CalcToPoint(
925  nFontOffset, m_eLanguage), MapUnit::MapTwip, 10 ));
926  m_xListHeightLB->set_value(CalcToPoint(
927  SwStdFontConfig::GetDefaultHeightFor(FONT_LIST + nFontOffset, m_eLanguage),
928  MapUnit::MapTwip, 10 ));
929  m_xLabelHeightLB->set_value(CalcToPoint(
930  SwStdFontConfig::GetDefaultHeightFor(FONT_CAPTION + nFontOffset, m_eLanguage),
931  MapUnit::MapTwip, 10 ));
932  m_xIndexHeightLB->set_value(CalcToPoint(
933  SwStdFontConfig::GetDefaultHeightFor(FONT_INDEX + nFontOffset, m_eLanguage),
934  MapUnit::MapTwip, 10 ));
935 }
936 
937 IMPL_LINK( SwStdFontTabPage, ModifyHdl, weld::ComboBox&, rBox, void )
938 {
939  if (&rBox == m_xStandardBox.get())
940  {
941  const OUString sEntry = rBox.get_active_text();
942  if(m_bSetListDefault && m_bListDefault)
943  m_xListBox->set_entry_text(sEntry);
944  if(m_bSetLabelDefault && m_bLabelDefault)
945  m_xLabelBox->set_entry_text(sEntry);
946  if(m_bSetIdxDefault && m_bIdxDefault)
947  m_xIdxBox->set_entry_text(sEntry);
948  }
949  else if (&rBox == m_xListBox.get())
950  {
951  m_bSetListDefault = false;
952  }
953  else if (&rBox == m_xLabelBox.get())
954  {
955  m_bSetLabelDefault = false;
956  }
957  else if (&rBox == m_xIdxBox.get())
958  {
959  m_bSetIdxDefault = false;
960  }
961 }
962 
963 IMPL_LINK( SwStdFontTabPage, LoseFocusHdl, weld::Widget&, rControl, void )
964 {
965  weld::ComboBox& rBox = dynamic_cast<weld::ComboBox&>(rControl);
966  SvtFontSizeBox* pHeightLB = nullptr;
967  const OUString sEntry = rBox.get_active_text();
968  if (&rBox == m_xStandardBox.get())
969  {
970  pHeightLB = m_xStandardHeightLB.get();
971  }
972  else if (&rBox == m_xTitleBox.get())
973  {
974  pHeightLB = m_xTitleHeightLB.get();
975  }
976  else if (&rBox == m_xListBox.get())
977  {
978  pHeightLB = m_xListHeightLB.get();
979  }
980  else if (&rBox == m_xLabelBox.get())
981  {
982  pHeightLB = m_xLabelHeightLB.get();
983  }
984  else /*if (&rBox == m_xIndexHeightLB.get())*/
985  {
986  pHeightLB = m_xIndexHeightLB.get();
987  }
988  FontMetric aFontMetric( m_pFontList->Get(sEntry, sEntry) );
989  pHeightLB->Fill( &aFontMetric, m_pFontList.get() );
990 }
991 
993 {
994  const SfxUInt16Item* pFlagItem = aSet.GetItem<SfxUInt16Item>(SID_FONTMODE_TYPE, false);
995  if (pFlagItem)
996  m_nFontGroup = sal::static_int_cast< sal_uInt8, sal_uInt16>( pFlagItem->GetValue() );
997 }
998 
1000  : SfxTabPage(pPage, pController, "modules/swriter/ui/opttablepage.ui", "OptTablePage", &rSet)
1001  , m_pWrtShell(nullptr)
1002  , m_bHTMLMode(false)
1003  , m_xHeaderCB(m_xBuilder->weld_check_button("header"))
1004  , m_xRepeatHeaderCB(m_xBuilder->weld_check_button("repeatheader"))
1005  , m_xDontSplitCB(m_xBuilder->weld_check_button("dontsplit"))
1006  , m_xBorderCB(m_xBuilder->weld_check_button("border"))
1007  , m_xNumFormattingCB(m_xBuilder->weld_check_button("numformatting"))
1008  , m_xNumFormatFormattingCB(m_xBuilder->weld_check_button("numfmtformatting"))
1009  , m_xNumAlignmentCB(m_xBuilder->weld_check_button("numalignment"))
1010  , m_xRowMoveMF(m_xBuilder->weld_metric_spin_button("rowmove", FieldUnit::CM))
1011  , m_xColMoveMF(m_xBuilder->weld_metric_spin_button("colmove", FieldUnit::CM))
1012  , m_xRowInsertMF(m_xBuilder->weld_metric_spin_button("rowinsert", FieldUnit::CM))
1013  , m_xColInsertMF(m_xBuilder->weld_metric_spin_button("colinsert", FieldUnit::CM))
1014  , m_xFixRB(m_xBuilder->weld_radio_button("fix"))
1015  , m_xFixPropRB(m_xBuilder->weld_radio_button("fixprop"))
1016  , m_xVarRB(m_xBuilder->weld_radio_button("var"))
1017 {
1018  Link<weld::Button&,void> aLnk(LINK(this, SwTableOptionsTabPage, CheckBoxHdl));
1019  m_xNumFormattingCB->connect_clicked(aLnk);
1020  m_xNumFormatFormattingCB->connect_clicked(aLnk);
1021  m_xHeaderCB->connect_clicked(aLnk);
1022 }
1023 
1025 {
1026 }
1027 
1028 std::unique_ptr<SfxTabPage> SwTableOptionsTabPage::Create( weld::Container* pPage, weld::DialogController* pController,
1029  const SfxItemSet* rAttrSet )
1030 {
1031  return std::make_unique<SwTableOptionsTabPage>(pPage, pController, *rAttrSet);
1032 }
1033 
1035 {
1036  bool bRet = false;
1037  SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
1038 
1039  if (m_xRowMoveMF->get_value_changed_from_saved())
1040  pModOpt->SetTableHMove( static_cast<sal_uInt16>(m_xRowMoveMF->denormalize( m_xRowMoveMF->get_value(FieldUnit::TWIP))));
1041 
1042  if (m_xColMoveMF->get_value_changed_from_saved())
1043  pModOpt->SetTableVMove( static_cast<sal_uInt16>(m_xColMoveMF->denormalize( m_xColMoveMF->get_value(FieldUnit::TWIP))));
1044 
1045  if (m_xRowInsertMF->get_value_changed_from_saved())
1046  pModOpt->SetTableHInsert(static_cast<sal_uInt16>(m_xRowInsertMF->denormalize( m_xRowInsertMF->get_value(FieldUnit::TWIP))));
1047 
1048  if (m_xColInsertMF->get_value_changed_from_saved())
1049  pModOpt->SetTableVInsert(static_cast<sal_uInt16>(m_xColInsertMF->denormalize( m_xColInsertMF->get_value(FieldUnit::TWIP))));
1050 
1051  TableChgMode eMode;
1052  if (m_xFixRB->get_active())
1054  else if(m_xFixPropRB->get_active())
1056  else
1058  if(eMode != pModOpt->GetTableMode())
1059  {
1060  pModOpt->SetTableMode(eMode);
1061  // the table-keyboard-mode has changed, now the current
1062  // table should know about that too.
1064  {
1065  m_pWrtShell->SetTableChgMode(eMode);
1066  static sal_uInt16 aInva[] =
1070  0
1071  };
1073  }
1074 
1075  bRet = true;
1076  }
1077 
1079 
1080  if (m_xHeaderCB->get_active())
1082 
1083  if (m_xRepeatHeaderCB->get_sensitive())
1084  aInsOpts.mnRowsToRepeat = m_xRepeatHeaderCB->get_active() ? 1 : 0;
1085 
1086  if (!m_xDontSplitCB->get_active())
1088 
1089  if (m_xBorderCB->get_active())
1091 
1092  if (m_xHeaderCB->get_state_changed_from_saved() ||
1093  m_xRepeatHeaderCB->get_state_changed_from_saved() ||
1094  m_xDontSplitCB->get_state_changed_from_saved() ||
1095  m_xBorderCB->get_state_changed_from_saved())
1096  {
1097  pModOpt->SetInsTableFlags(m_bHTMLMode, aInsOpts);
1098  }
1099 
1100  if (m_xNumFormattingCB->get_state_changed_from_saved())
1101  {
1102  pModOpt->SetInsTableFormatNum(m_bHTMLMode, m_xNumFormattingCB->get_active());
1103  bRet = true;
1104  }
1105 
1106  if (m_xNumFormatFormattingCB->get_state_changed_from_saved())
1107  {
1109  bRet = true;
1110  }
1111 
1112  if (m_xNumAlignmentCB->get_state_changed_from_saved())
1113  {
1114  pModOpt->SetInsTableAlignNum(m_bHTMLMode, m_xNumAlignmentCB->get_active());
1115  bRet = true;
1116  }
1117 
1118  return bRet;
1119 }
1120 
1122 {
1123  const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
1124  if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SfxItemState::DEFAULT )
1125  {
1126  const SfxUInt16Item& rItem = rSet->Get( SID_ATTR_METRIC );
1127  FieldUnit eFieldUnit = static_cast<FieldUnit>(rItem.GetValue());
1128  ::SetFieldUnit( *m_xRowMoveMF, eFieldUnit );
1129  ::SetFieldUnit( *m_xColMoveMF, eFieldUnit );
1130  ::SetFieldUnit( *m_xRowInsertMF, eFieldUnit );
1131  ::SetFieldUnit( *m_xColInsertMF, eFieldUnit );
1132  }
1133 
1134  m_xRowMoveMF->set_value(m_xRowMoveMF->normalize(pModOpt->GetTableHMove()), FieldUnit::TWIP);
1135  m_xColMoveMF->set_value(m_xColMoveMF->normalize(pModOpt->GetTableVMove()), FieldUnit::TWIP);
1136  m_xRowInsertMF->set_value(m_xRowInsertMF->normalize(pModOpt->GetTableHInsert()), FieldUnit::TWIP);
1137  m_xColInsertMF->set_value(m_xColInsertMF->normalize(pModOpt->GetTableVInsert()), FieldUnit::TWIP);
1138 
1139  switch(pModOpt->GetTableMode())
1140  {
1141  case TableChgMode::FixedWidthChangeAbs: m_xFixRB->set_active(true); break;
1142  case TableChgMode::FixedWidthChangeProp: m_xFixPropRB->set_active(true); break;
1143  case TableChgMode::VarWidthChangeAbs: m_xVarRB->set_active(true); break;
1144  }
1145  const SfxPoolItem* pItem;
1146  if(SfxItemState::SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem))
1147  {
1148  m_bHTMLMode = 0 != (static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON);
1149  }
1150 
1151  // hide certain controls for html
1152  if (m_bHTMLMode)
1153  {
1154  m_xRepeatHeaderCB->hide();
1155  m_xDontSplitCB->hide();
1156  }
1157 
1158  SwInsertTableOptions aInsOpts = pModOpt->GetInsTableFlags(m_bHTMLMode);
1159  const SwInsertTableFlags nInsTableFlags = aInsOpts.mnInsMode;
1160 
1161  m_xHeaderCB->set_active(bool(nInsTableFlags & SwInsertTableFlags::Headline));
1162  m_xRepeatHeaderCB->set_active((!m_bHTMLMode) && (aInsOpts.mnRowsToRepeat > 0));
1163  m_xDontSplitCB->set_active(!(nInsTableFlags & SwInsertTableFlags::SplitLayout));
1164  m_xBorderCB->set_active(bool(nInsTableFlags & SwInsertTableFlags::DefaultBorder));
1165 
1166  m_xNumFormattingCB->set_active(pModOpt->IsInsTableFormatNum(m_bHTMLMode));
1168  m_xNumAlignmentCB->set_active(pModOpt->IsInsTableAlignNum(m_bHTMLMode));
1169 
1170  m_xHeaderCB->save_state();
1171  m_xRepeatHeaderCB->save_state();
1172  m_xDontSplitCB->save_state();
1173  m_xBorderCB->save_state();
1174  m_xNumFormattingCB->save_state();
1175  m_xNumFormatFormattingCB->save_state();
1176  m_xNumAlignmentCB->save_state();
1177  m_xRowMoveMF->save_value();
1178  m_xColMoveMF->save_value();
1179  m_xRowInsertMF->save_value();
1180  m_xColInsertMF->save_value();
1181 
1182  CheckBoxHdl(*m_xHeaderCB);
1183 }
1184 
1186 {
1187  m_xNumFormatFormattingCB->set_sensitive(m_xNumFormattingCB->get_active());
1188  m_xNumAlignmentCB->set_sensitive(m_xNumFormattingCB->get_active());
1189  m_xRepeatHeaderCB->set_sensitive(m_xHeaderCB->get_active());
1190 }
1191 
1193 {
1194  const SwWrtShellItem* pWrtSh = aSet.GetItem<SwWrtShellItem>(SID_WRT_SHELL, false);
1195  if (pWrtSh)
1196  m_pWrtShell = pWrtSh->GetValue();
1197 }
1198 
1200  : SfxTabPage(pPage, pController, "modules/swriter/ui/optformataidspage.ui", "OptFormatAidsPage", &rSet)
1201  , m_pWrtShell(nullptr)
1202  , m_xParaCB(m_xBuilder->weld_check_button("paragraph"))
1203  , m_xSHyphCB(m_xBuilder->weld_check_button("hyphens"))
1204  , m_xSpacesCB(m_xBuilder->weld_check_button("spaces"))
1205  , m_xHSpacesCB(m_xBuilder->weld_check_button("nonbreak"))
1206  , m_xTabCB(m_xBuilder->weld_check_button("tabs"))
1207  , m_xBreakCB(m_xBuilder->weld_check_button("break"))
1208  , m_xCharHiddenCB(m_xBuilder->weld_check_button("hiddentext"))
1209  , m_xDirectCursorFrame(m_xBuilder->weld_frame("directcrsrframe"))
1210  , m_xOnOffCB(m_xBuilder->weld_check_button("cursoronoff"))
1211  , m_xFillMarginRB(m_xBuilder->weld_radio_button("fillmargin"))
1212  , m_xFillIndentRB(m_xBuilder->weld_radio_button("fillindent"))
1213  , m_xFillTabRB(m_xBuilder->weld_radio_button("filltab"))
1214  , m_xFillTabAndSpaceRB(m_xBuilder->weld_radio_button("filltabandspace"))
1215  , m_xFillSpaceRB(m_xBuilder->weld_radio_button("fillspace"))
1216  , m_xCursorProtFrame(m_xBuilder->weld_frame("crsrprotframe"))
1217  , m_xCursorInProtCB(m_xBuilder->weld_check_button("cursorinprot"))
1218  , m_xMathBaselineAlignmentCB(m_xBuilder->weld_check_button("mathbaseline"))
1219 {
1220  const SfxPoolItem* pItem = nullptr;
1222  bool bIsOn = false;
1223 
1224  if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem ))
1225  {
1226  auto& aOpt = *static_cast<const SwShadowCursorItem*>(pItem);
1227  eMode = aOpt.GetMode();
1228  bIsOn = aOpt.IsOn();
1229  }
1230  m_xOnOffCB->set_active( bIsOn );
1231 
1232  m_xFillIndentRB->set_active( FILL_INDENT == eMode );
1233  m_xFillMarginRB->set_active( FILL_MARGIN == eMode );
1234  m_xFillTabRB->set_active( FILL_TAB == eMode );
1235  m_xFillSpaceRB->set_active( FILL_SPACE == eMode );
1236  m_xFillTabAndSpaceRB->set_active( FILL_TAB_SPACE == eMode );
1237 
1238  if(SfxItemState::SET != rSet.GetItemState(SID_HTML_MODE, false, &pItem )
1239  || !(static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON))
1240  return;
1241 
1242  m_xTabCB->hide();
1243  m_xCharHiddenCB->hide();
1244 
1245  m_xDirectCursorFrame->hide();
1246  m_xOnOffCB->hide();
1247  m_xFillMarginRB->hide();
1248  m_xFillIndentRB->hide();
1249  m_xFillTabRB->hide();
1250  m_xFillSpaceRB->hide();
1251  m_xFillTabAndSpaceRB->hide();
1252 
1253  m_xCursorProtFrame->hide();
1254  m_xCursorInProtCB->hide();
1255 }
1256 
1258 {
1259 }
1260 
1261 std::unique_ptr<SfxTabPage> SwShdwCursorOptionsTabPage::Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet )
1262 {
1263  return std::make_unique<SwShdwCursorOptionsTabPage>(pPage, pController, *rSet);
1264 }
1265 
1267 {
1268  const SwWrtShellItem* pWrtSh = aSet.GetItem<SwWrtShellItem>(SID_WRT_SHELL, false);
1269  if (pWrtSh)
1270  m_pWrtShell = pWrtSh->GetValue();
1271 }
1272 
1274 {
1275  SwShadowCursorItem aOpt;
1276  aOpt.SetOn( m_xOnOffCB->get_active() );
1277 
1278  sal_uInt8 eMode;
1279  if( m_xFillIndentRB->get_active() )
1280  eMode= FILL_INDENT;
1281  else if( m_xFillMarginRB->get_active() )
1282  eMode = FILL_MARGIN;
1283  else if( m_xFillTabRB->get_active() )
1284  eMode = FILL_TAB;
1285  else if ( m_xFillTabAndSpaceRB->get_active() )
1286  eMode = FILL_TAB_SPACE;
1287  else
1288  eMode = FILL_SPACE;
1289  aOpt.SetMode( eMode );
1290 
1291  bool bRet = false;
1292  const SfxPoolItem* pItem = nullptr;
1293  if( SfxItemState::SET != rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )
1294  || static_cast<const SwShadowCursorItem&>(*pItem) != aOpt )
1295  {
1296  rSet->Put( aOpt );
1297  bRet = true;
1298  }
1299 
1300  if (m_pWrtShell) {
1302  m_xMathBaselineAlignmentCB->get_active() );
1303  bRet |= m_xMathBaselineAlignmentCB->get_state_changed_from_saved();
1304  }
1305 
1306  if( m_xCursorInProtCB->get_state_changed_from_saved())
1307  {
1309  bRet = true;
1310  }
1311 
1312  const SwDocDisplayItem* pOldAttr = static_cast<const SwDocDisplayItem*>(
1314 
1315  SwDocDisplayItem aDisp;
1316 
1317  aDisp.bParagraphEnd = m_xParaCB->get_active();
1318  aDisp.bTab = m_xTabCB->get_active();
1319  aDisp.bSpace = m_xSpacesCB->get_active();
1320  aDisp.bNonbreakingSpace = m_xHSpacesCB->get_active();
1321  aDisp.bSoftHyphen = m_xSHyphCB->get_active();
1322  aDisp.bCharHiddenText = m_xCharHiddenCB->get_active();
1323  aDisp.bManualBreak = m_xBreakCB->get_active();
1324 
1325  bRet |= (!pOldAttr || aDisp != *pOldAttr);
1326  if(bRet)
1327  bRet = nullptr != rSet->Put(aDisp);
1328 
1329  return bRet;
1330 }
1331 
1333 {
1334  const SfxPoolItem* pItem = nullptr;
1336  bool bIsOn = false;
1337 
1338  if( SfxItemState::SET == rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem ))
1339  {
1340  auto& aOpt = *static_cast<const SwShadowCursorItem*>(pItem);
1341  eMode = aOpt.GetMode();
1342  bIsOn = aOpt.IsOn();
1343  }
1344  m_xOnOffCB->set_active( bIsOn );
1345 
1346  m_xFillIndentRB->set_active( FILL_INDENT == eMode );
1347  m_xFillMarginRB->set_active( FILL_MARGIN == eMode );
1348  m_xFillTabRB->set_active( FILL_TAB == eMode );
1349  m_xFillSpaceRB->set_active( FILL_SPACE == eMode );
1350  m_xFillTabAndSpaceRB->set_active( FILL_TAB_SPACE == eMode );
1351 
1352  if (m_pWrtShell) {
1354  m_xMathBaselineAlignmentCB->save_state();
1355  } else {
1357  }
1358 
1359  if( SfxItemState::SET == rSet->GetItemState( FN_PARAM_CRSR_IN_PROTECTED, false, &pItem ))
1360  m_xCursorInProtCB->set_active(static_cast<const SfxBoolItem*>(pItem)->GetValue());
1361  m_xCursorInProtCB->save_state();
1362 
1363  const SwDocDisplayItem* pDocDisplayAttr = nullptr;
1364 
1365  rSet->GetItemState( FN_PARAM_DOCDISP, false,
1366  reinterpret_cast<const SfxPoolItem**>(&pDocDisplayAttr) );
1367  if(pDocDisplayAttr)
1368  {
1369  m_xParaCB->set_active( pDocDisplayAttr->bParagraphEnd );
1370  m_xTabCB->set_active( pDocDisplayAttr->bTab );
1371  m_xSpacesCB->set_active( pDocDisplayAttr->bSpace );
1372  m_xHSpacesCB->set_active( pDocDisplayAttr->bNonbreakingSpace );
1373  m_xSHyphCB->set_active( pDocDisplayAttr->bSoftHyphen );
1374  m_xCharHiddenCB->set_active( pDocDisplayAttr->bCharHiddenText );
1375  m_xBreakCB->set_active( pDocDisplayAttr->bManualBreak );
1376  }
1377 }
1378 
1379 // TabPage for Redlining
1380 struct CharAttr
1381 {
1382  sal_uInt16 const nItemId;
1383  sal_uInt16 const nAttr;
1384 };
1385 
1386 // Edit corresponds to Paste-attributes
1387 static CharAttr const aRedlineAttr[] =
1388 {
1389  { SID_ATTR_CHAR_CASEMAP, sal_uInt16(SvxCaseMap::NotMapped) },
1390  { SID_ATTR_CHAR_WEIGHT, WEIGHT_BOLD },
1391  { SID_ATTR_CHAR_POSTURE, ITALIC_NORMAL },
1392  { SID_ATTR_CHAR_UNDERLINE, LINESTYLE_SINGLE },
1393  { SID_ATTR_CHAR_UNDERLINE, LINESTYLE_DOUBLE },
1394  { SID_ATTR_CHAR_STRIKEOUT, STRIKEOUT_SINGLE },
1395  { SID_ATTR_CHAR_CASEMAP, sal_uInt16(SvxCaseMap::Uppercase) },
1396  { SID_ATTR_CHAR_CASEMAP, sal_uInt16(SvxCaseMap::Lowercase) },
1397  { SID_ATTR_CHAR_CASEMAP, sal_uInt16(SvxCaseMap::SmallCaps) },
1398  { SID_ATTR_CHAR_CASEMAP, sal_uInt16(SvxCaseMap::Capitalize) },
1399  { SID_ATTR_BRUSH, 0 }
1400 };
1401 // Items from aRedlineAttr relevant for InsertAttr: strikethrough is
1402 // not used
1403 static sal_uInt16 aInsertAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
1404 
1405 // Items from aRedlineAttr relevant for DeleteAttr: underline and
1406 // double underline is not used
1407 static sal_uInt16 aDeletedAttrMap[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10 };
1408 
1409 // Items from aRedlineAttr relevant for ChangeAttr: strikethrough is
1410 // not used
1411 static sal_uInt16 aChangedAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
1412 
1413 // Preview of selection
1415  : m_aTransCol(COL_TRANSPARENT)
1416  , m_aMarkCol(COL_LIGHTRED)
1417  , nMarkPos(0)
1418 
1419 {
1420  InitColors();
1421 }
1422 
1424 {
1425 }
1426 
1428 {
1429  // m_aTransCol and m_aMarkCol are _not_ changed because they are set from outside!
1430 
1432  m_aBgCol = rSettings.GetWindowColor();
1433 
1434  bool bHC = rSettings.GetHighContrastMode();
1436  m_aShadowCol = bHC? m_aBgCol : rSettings.GetShadowColor();
1439 }
1440 
1441 void SwMarkPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &/*rRect*/)
1442 {
1443  const Size aSz(GetOutputSizePixel());
1444 
1445  // Page
1446  aPage.SetSize(Size(aSz.Width() - 3, aSz.Height() - 3));
1447 
1448  const long nOutWPix = aPage.GetWidth();
1449  const long nOutHPix = aPage.GetHeight();
1450 
1451  // PrintArea
1452  const long nLBorder = 8;
1453  const long nRBorder = 8;
1454  const long nTBorder = 4;
1455  const long nBBorder = 4;
1456 
1457  aLeftPagePrtArea = tools::Rectangle(Point(nLBorder, nTBorder), Point((nOutWPix - 1) - nRBorder, (nOutHPix - 1) - nBBorder));
1458  const long nWidth = aLeftPagePrtArea.GetWidth();
1459  const long nCorr = (nWidth & 1) != 0 ? 0 : 1;
1460  aLeftPagePrtArea.SetSize(Size(nWidth / 2 - (nLBorder + nRBorder) / 2 + nCorr, aLeftPagePrtArea.GetHeight()));
1461 
1463  aRightPagePrtArea.Move(aLeftPagePrtArea.GetWidth() + nLBorder + nRBorder + 1, 0);
1464 
1465  // draw shadow
1466  tools::Rectangle aShadow(aPage);
1467  aShadow += Point(3, 3);
1468  drawRect(rRenderContext, aShadow, m_aShadowCol, m_aTransCol);
1469 
1470  // draw page
1471  drawRect(rRenderContext, aPage, m_aBgCol, m_aLineCol);
1472 
1473  // draw separator
1474  tools::Rectangle aPageSeparator(aPage);
1475  aPageSeparator.SetSize(Size(2, aPageSeparator.GetHeight()));
1476  aPageSeparator.Move(aPage.GetWidth() / 2 - 1, 0);
1477  drawRect(rRenderContext, aPageSeparator, m_aLineCol, m_aTransCol);
1478 
1479  PaintPage(rRenderContext, aLeftPagePrtArea);
1480  PaintPage(rRenderContext, aRightPagePrtArea);
1481 
1482  tools::Rectangle aLeftMark(Point(aPage.Left() + 2, aLeftPagePrtArea.Top() + 4), Size(aLeftPagePrtArea.Left() - 4, 2));
1484 
1485  switch (nMarkPos)
1486  {
1487  case 1: // left
1488  aRightMark.SetPos(Point(aRightPagePrtArea.Left() - 2 - aRightMark.GetWidth(), aRightMark.Top()));
1489  break;
1490 
1491  case 2: // right
1492  aLeftMark.SetPos(Point(aLeftPagePrtArea.Right() + 2, aLeftMark.Top()));
1493  break;
1494 
1495  case 3: // outside
1496  break;
1497 
1498  case 4: // inside
1499  aLeftMark.SetPos(Point(aLeftPagePrtArea.Right() + 2, aLeftMark.Top()));
1500  aRightMark.SetPos(Point(aRightPagePrtArea.Left() - 2 - aRightMark.GetWidth(), aRightMark.Top()));
1501  break;
1502 
1503  case 0: // none
1504  default:
1505  return;
1506  }
1507  drawRect(rRenderContext, aLeftMark, m_aMarkCol, m_aTransCol);
1508  drawRect(rRenderContext, aRightMark, m_aMarkCol, m_aTransCol);
1509 }
1510 
1512 {
1513  // draw PrintArea
1514  drawRect(rRenderContext, rRect, m_aTransCol, m_aPrintAreaCol);
1515 
1516  // draw Testparagraph
1517 
1518  tools::Rectangle aTextLine = rRect;
1519  aTextLine.SetSize(Size(aTextLine.GetWidth(), 2));
1520  aTextLine.AdjustLeft(4 );
1521  aTextLine.AdjustRight( -4 );
1522  aTextLine.Move(0, 4);
1523 
1524  const long nStep = aTextLine.GetHeight() + 2;
1525  const long nLines = rRect.GetHeight() / (aTextLine.GetHeight() + 2) - 1;
1526 
1527  // simulate text
1528  for (long i = 0; i < nLines; ++i)
1529  {
1530  if (i == (nLines - 1))
1531  aTextLine.SetSize(Size(aTextLine.GetWidth() / 2, aTextLine.GetHeight()));
1532 
1533  if (aPage.IsInside(aTextLine))
1534  drawRect(rRenderContext, aTextLine, m_aTextCol, m_aTransCol);
1535 
1536  aTextLine.Move(0, nStep);
1537  }
1538  aTextLine.Move(0, -nStep);
1539 }
1540 
1542 {
1543  Size aInitialSize = getPreviewOptionsSize(pDrawingArea->get_ref_device());
1544  pDrawingArea->set_size_request(aInitialSize.Width(), aInitialSize.Height());
1546  SetOutputSizePixel(aInitialSize);
1547 }
1548 
1549 namespace
1550 {
1551  void lcl_FillRedlineAttrListBox(
1552  weld::ComboBox& rLB, const AuthorCharAttr& rAttrToSelect,
1553  const sal_uInt16* pAttrMap, const size_t nAttrMapSize)
1554  {
1555  for (size_t i = 0; i != nAttrMapSize; ++i)
1556  {
1557  CharAttr const & rAttr(aRedlineAttr[pAttrMap[i]]);
1558  rLB.set_id(i, OUString::number(reinterpret_cast<sal_Int64>(&rAttr)));
1559  if (rAttr.nItemId == rAttrToSelect.m_nItemId &&
1560  rAttr.nAttr == rAttrToSelect.m_nAttr)
1561  rLB.set_active(i);
1562  }
1563  }
1564 }
1565 
1567  const SfxItemSet& rSet)
1568  : SfxTabPage(pPage, pController, "modules/swriter/ui/optredlinepage.ui", "OptRedLinePage", &rSet)
1569  , m_xInsertLB(m_xBuilder->weld_combo_box("insert"))
1570  , m_xInsertColorLB(new ColorListBox(m_xBuilder->weld_menu_button("insertcolor"), pController->getDialog()))
1571  , m_xInsertedPreviewWN(new SvxFontPrevWindow)
1572  , m_xInsertedPreview(new weld::CustomWeld(*m_xBuilder, "insertedpreview", *m_xInsertedPreviewWN))
1573  , m_xDeletedLB(m_xBuilder->weld_combo_box("deleted"))
1574  , m_xDeletedColorLB(new ColorListBox(m_xBuilder->weld_menu_button("deletedcolor"), pController->getDialog()))
1575  , m_xDeletedPreviewWN(new SvxFontPrevWindow)
1576  , m_xDeletedPreview(new weld::CustomWeld(*m_xBuilder, "deletedpreview", *m_xDeletedPreviewWN))
1577  , m_xChangedLB(m_xBuilder->weld_combo_box("changed"))
1578  , m_xChangedColorLB(new ColorListBox(m_xBuilder->weld_menu_button("changedcolor"), pController->getDialog()))
1579  , m_xChangedPreviewWN(new SvxFontPrevWindow)
1580  , m_xChangedPreview(new weld::CustomWeld(*m_xBuilder, "changedpreview", *m_xChangedPreviewWN))
1581  , m_xMarkPosLB(m_xBuilder->weld_combo_box("markpos"))
1582  , m_xMarkColorLB(new ColorListBox(m_xBuilder->weld_menu_button("markcolor"), pController->getDialog()))
1583  , m_xMarkPreviewWN(new SwMarkPreview)
1584  , m_xMarkPreview(new weld::CustomWeld(*m_xBuilder, "markpreview", *m_xMarkPreviewWN))
1585 {
1586  Size aPreviewSize(getPreviewOptionsSize(m_xMarkPreviewWN->GetDrawingArea()->get_ref_device()));
1587 
1588  m_xInsertColorLB->SetSlotId(SID_AUTHOR_COLOR, true);
1589  m_xDeletedColorLB->SetSlotId(SID_AUTHOR_COLOR, true);
1590  m_xChangedColorLB->SetSlotId(SID_AUTHOR_COLOR, true);
1591 
1592  m_xInsertedPreviewWN->set_size_request(aPreviewSize.Width(), aPreviewSize.Height());
1593  m_xDeletedPreviewWN->set_size_request(aPreviewSize.Width(), aPreviewSize.Height());
1594  m_xChangedPreviewWN->set_size_request(aPreviewSize.Width(), aPreviewSize.Height());
1595  m_xMarkPreviewWN->set_size_request(aPreviewSize.Width(), aPreviewSize.Height());
1596 
1597  for (sal_Int32 i = 0, nEntryCount = m_xInsertLB->get_count(); i < nEntryCount; ++i)
1598  {
1599  const OUString sEntry(m_xInsertLB->get_text(i));
1600  m_xDeletedLB->append_text(sEntry);
1601  m_xChangedLB->append_text(sEntry);
1602  };
1603 
1604  // remove strikethrough from insert and change and underline + double
1605  // underline from delete
1606  m_xInsertLB->remove(5);
1607  m_xChangedLB->remove(5);
1608  m_xDeletedLB->remove(4);
1609  m_xDeletedLB->remove(3);
1610 
1612  m_xInsertLB->connect_changed( aLk );
1613  m_xDeletedLB->connect_changed( aLk );
1614  m_xChangedLB->connect_changed( aLk );
1615 
1616  Link<ColorListBox&,void> aLk2 = LINK(this, SwRedlineOptionsTabPage, ColorHdl);
1617  m_xInsertColorLB->SetSelectHdl( aLk2 );
1618  m_xDeletedColorLB->SetSelectHdl( aLk2 );
1619  m_xChangedColorLB->SetSelectHdl( aLk2 );
1620 
1621  m_xMarkPosLB->connect_changed(LINK(this, SwRedlineOptionsTabPage, ChangedMaskPrevHdl));
1622  m_xMarkColorLB->SetSelectHdl(LINK(this, SwRedlineOptionsTabPage, ChangedMaskColorPrevHdl));
1623 }
1624 
1626 {
1627  m_xInsertColorLB.reset();
1628  m_xInsertedPreview.reset();
1629  m_xInsertedPreviewWN.reset();
1630  m_xDeletedColorLB.reset();
1631  m_xDeletedPreview.reset();
1632  m_xDeletedPreviewWN.reset();
1633  m_xChangedColorLB.reset();
1634  m_xChangedPreview.reset();
1635  m_xChangedPreviewWN.reset();
1636  m_xMarkColorLB.reset();
1637  m_xMarkPreview.reset();
1638  m_xMarkPreviewWN.reset();
1639 }
1640 
1641 std::unique_ptr<SfxTabPage> SwRedlineOptionsTabPage::Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet)
1642 {
1643  return std::make_unique<SwRedlineOptionsTabPage>(pPage, pController, *rSet);
1644 }
1645 
1647 {
1648  CharAttr *pAttr;
1649  SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig();
1650 
1651  AuthorCharAttr aInsertedAttr;
1652  AuthorCharAttr aDeletedAttr;
1653  AuthorCharAttr aChangedAttr;
1654 
1655  AuthorCharAttr aOldInsertAttr(pOpt->GetInsertAuthorAttr());
1656  AuthorCharAttr aOldDeletedAttr(pOpt->GetDeletedAuthorAttr());
1657  AuthorCharAttr aOldChangedAttr(pOpt->GetFormatAuthorAttr());
1658 
1659  Color nOldMarkColor = pOpt->GetMarkAlignColor();
1660  sal_uInt16 nOldMarkMode = pOpt->GetMarkAlignMode();
1661 
1662  sal_Int32 nPos = m_xInsertLB->get_active();
1663  if (nPos != -1)
1664  {
1665  pAttr = reinterpret_cast<CharAttr*>(m_xInsertLB->get_id(nPos).toInt64());
1666  aInsertedAttr.m_nItemId = pAttr->nItemId;
1667  aInsertedAttr.m_nAttr = pAttr->nAttr;
1668  aInsertedAttr.m_nColor = m_xInsertColorLB->GetSelectEntryColor();
1669  pOpt->SetInsertAuthorAttr(aInsertedAttr);
1670  }
1671 
1672  nPos = m_xDeletedLB->get_active();
1673  if (nPos != -1)
1674  {
1675  pAttr = reinterpret_cast<CharAttr*>(m_xDeletedLB->get_id(nPos).toInt64());
1676  aDeletedAttr.m_nItemId = pAttr->nItemId;
1677  aDeletedAttr.m_nAttr = pAttr->nAttr;
1678  aDeletedAttr.m_nColor = m_xDeletedColorLB->GetSelectEntryColor();
1679  pOpt->SetDeletedAuthorAttr(aDeletedAttr);
1680  }
1681 
1682  nPos = m_xChangedLB->get_active();
1683  if (nPos != -1)
1684  {
1685  pAttr = reinterpret_cast<CharAttr*>(m_xChangedLB->get_id(nPos).toInt64());
1686  aChangedAttr.m_nItemId = pAttr->nItemId;
1687  aChangedAttr.m_nAttr = pAttr->nAttr;
1688  aChangedAttr.m_nColor = m_xChangedColorLB->GetSelectEntryColor();
1689  pOpt->SetFormatAuthorAttr(aChangedAttr);
1690  }
1691 
1692  nPos = 0;
1693  switch (m_xMarkPosLB->get_active())
1694  {
1695  case 0: nPos = text::HoriOrientation::NONE; break;
1696  case 1: nPos = text::HoriOrientation::LEFT; break;
1697  case 2: nPos = text::HoriOrientation::RIGHT; break;
1698  case 3: nPos = text::HoriOrientation::OUTSIDE; break;
1699  case 4: nPos = text::HoriOrientation::INSIDE; break;
1700  }
1701  pOpt->SetMarkAlignMode(nPos);
1702  pOpt->SetMarkAlignColor(m_xMarkColorLB->GetSelectEntryColor());
1703 
1704  if (!(aInsertedAttr == aOldInsertAttr) ||
1705  !(aDeletedAttr == aOldDeletedAttr) ||
1706  !(aChangedAttr == aOldChangedAttr) ||
1707  nOldMarkColor != pOpt->GetMarkAlignColor() ||
1708  nOldMarkMode != pOpt->GetMarkAlignMode() )
1709  {
1710  // update all documents
1711  SwDocShell* pDocShell = static_cast<SwDocShell*>(SfxObjectShell::GetFirst(checkSfxObjectShell<SwDocShell>));
1712 
1713  while( pDocShell )
1714  {
1715  pDocShell->GetWrtShell()->UpdateRedlineAttr();
1716  pDocShell = static_cast<SwDocShell*>(SfxObjectShell::GetNext(*pDocShell, checkSfxObjectShell<SwDocShell>));
1717  }
1718  }
1719 
1720  return false;
1721 }
1722 
1724 {
1725  const SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig();
1726 
1727  const AuthorCharAttr &rInsertAttr = pOpt->GetInsertAuthorAttr();
1728  const AuthorCharAttr &rDeletedAttr = pOpt->GetDeletedAuthorAttr();
1729  const AuthorCharAttr &rChangedAttr = pOpt->GetFormatAuthorAttr();
1730 
1731  // initialise preview
1732  InitFontStyle(*m_xInsertedPreviewWN, SwResId(STR_OPT_PREVIEW_INSERTED));
1733  InitFontStyle(*m_xDeletedPreviewWN, SwResId(STR_OPT_PREVIEW_DELETED));
1734  InitFontStyle(*m_xChangedPreviewWN, SwResId(STR_OPT_PREVIEW_CHANGED));
1735 
1736  Color nColor = rInsertAttr.m_nColor;
1737  m_xInsertColorLB->SelectEntry(nColor);
1738 
1739  nColor = rDeletedAttr.m_nColor;
1740  m_xDeletedColorLB->SelectEntry(nColor);
1741 
1742  nColor = rChangedAttr.m_nColor;
1743  m_xChangedColorLB->SelectEntry(nColor);
1744 
1745  m_xMarkColorLB->SelectEntry(pOpt->GetMarkAlignColor());
1746 
1747  m_xInsertLB->set_active(0);
1748  m_xDeletedLB->set_active(0);
1749  m_xChangedLB->set_active(0);
1750 
1751  lcl_FillRedlineAttrListBox(*m_xInsertLB, rInsertAttr, aInsertAttrMap, SAL_N_ELEMENTS(aInsertAttrMap));
1752  lcl_FillRedlineAttrListBox(*m_xDeletedLB, rDeletedAttr, aDeletedAttrMap, SAL_N_ELEMENTS(aDeletedAttrMap));
1753  lcl_FillRedlineAttrListBox(*m_xChangedLB, rChangedAttr, aChangedAttrMap, SAL_N_ELEMENTS(aChangedAttrMap));
1754 
1755  sal_Int32 nPos = 0;
1756  switch (pOpt->GetMarkAlignMode())
1757  {
1758  case text::HoriOrientation::NONE: nPos = 0; break;
1759  case text::HoriOrientation::LEFT: nPos = 1; break;
1760  case text::HoriOrientation::RIGHT: nPos = 2; break;
1761  case text::HoriOrientation::OUTSIDE: nPos = 3; break;
1762  case text::HoriOrientation::INSIDE: nPos = 4; break;
1763  }
1764  m_xMarkPosLB->set_active(nPos);
1765 
1766  // show settings in preview
1767  AttribHdl(*m_xInsertLB);
1768  ColorHdl(*m_xInsertColorLB);
1769  AttribHdl(*m_xDeletedLB);
1770  ColorHdl(*m_xInsertColorLB);
1771  AttribHdl(*m_xChangedLB);
1772  ColorHdl(*m_xChangedColorLB);
1773 
1774  ChangedMaskPrev();
1775 }
1776 
1778 {
1779  SvxFontPrevWindow *pPrev = nullptr;
1780  ColorListBox *pColorLB;
1781 
1782  if (&rLB == m_xInsertLB.get())
1783  {
1784  pColorLB = m_xInsertColorLB.get();
1785  pPrev = m_xInsertedPreviewWN.get();
1786  }
1787  else if (&rLB == m_xDeletedLB.get())
1788  {
1789  pColorLB = m_xDeletedColorLB.get();
1790  pPrev = m_xDeletedPreviewWN.get();
1791  }
1792  else
1793  {
1794  pColorLB = m_xChangedColorLB.get();
1795  pPrev = m_xChangedPreviewWN.get();
1796  }
1797 
1798  SvxFont& rFont = pPrev->GetFont();
1799  SvxFont& rCJKFont = pPrev->GetCJKFont();
1800 
1801  rFont.SetWeight(WEIGHT_NORMAL);
1802  rCJKFont.SetWeight(WEIGHT_NORMAL);
1803  rFont.SetItalic(ITALIC_NONE);
1804  rCJKFont.SetItalic(ITALIC_NONE);
1805  rFont.SetUnderline(LINESTYLE_NONE);
1806  rCJKFont.SetUnderline(LINESTYLE_NONE);
1807  rFont.SetStrikeout(STRIKEOUT_NONE);
1808  rCJKFont.SetStrikeout(STRIKEOUT_NONE);
1809  rFont.SetCaseMap(SvxCaseMap::NotMapped);
1810  rCJKFont.SetCaseMap(SvxCaseMap::NotMapped);
1811 
1812  Color aColor = pColorLB->GetSelectEntryColor();
1813 
1814  if (aColor == COL_NONE_COLOR)
1815  {
1816  rFont.SetColor( COL_BLACK );
1817  rCJKFont.SetColor( COL_BLACK );
1818  }
1819  else if (aColor == COL_TRANSPARENT)
1820  {
1821  rFont.SetColor( COL_RED );
1822  rCJKFont.SetColor( COL_RED );
1823  }
1824  else
1825  {
1826  rFont.SetColor(aColor);
1827  rCJKFont.SetColor(aColor);
1828  }
1829 
1830  sal_Int32 nPos = rLB.get_active();
1831  if( nPos == -1)
1832  nPos = 0;
1833 
1834  CharAttr* pAttr = reinterpret_cast<CharAttr*>(rLB.get_id(nPos).toInt64());
1835  //switch off preview background color
1836  pPrev->ResetColor();
1837  switch (pAttr->nItemId)
1838  {
1839  case SID_ATTR_CHAR_WEIGHT:
1840  rFont.SetWeight( static_cast<FontWeight>(pAttr->nAttr) );
1841  rCJKFont.SetWeight( static_cast<FontWeight>(pAttr->nAttr) );
1842  break;
1843 
1844  case SID_ATTR_CHAR_POSTURE:
1845  rFont.SetItalic( static_cast<FontItalic>(pAttr->nAttr) );
1846  rCJKFont.SetItalic( static_cast<FontItalic>(pAttr->nAttr) );
1847  break;
1848 
1849  case SID_ATTR_CHAR_UNDERLINE:
1850  rFont.SetUnderline( static_cast<FontLineStyle>(pAttr->nAttr) );
1851  rCJKFont.SetUnderline( static_cast<FontLineStyle>(pAttr->nAttr) );
1852  break;
1853 
1854  case SID_ATTR_CHAR_STRIKEOUT:
1855  rFont.SetStrikeout( static_cast<FontStrikeout>(pAttr->nAttr) );
1856  rCJKFont.SetStrikeout( static_cast<FontStrikeout>(pAttr->nAttr) );
1857  break;
1858 
1859  case SID_ATTR_CHAR_CASEMAP:
1860  rFont.SetCaseMap( static_cast<SvxCaseMap>(pAttr->nAttr) );
1861  rCJKFont.SetCaseMap( static_cast<SvxCaseMap>(pAttr->nAttr) );
1862  break;
1863 
1864  case SID_ATTR_BRUSH:
1865  {
1866  Color aBgColor = pColorLB->GetSelectEntryColor();
1867  if (aBgColor != COL_NONE_COLOR)
1868  pPrev->SetColor(aBgColor);
1869  else
1870  pPrev->SetColor(COL_LIGHTGRAY);
1871  rFont.SetColor( COL_BLACK );
1872  rCJKFont.SetColor( COL_BLACK );
1873  }
1874  break;
1875  }
1876 
1877  pPrev->Invalidate();
1878 }
1879 
1880 IMPL_LINK(SwRedlineOptionsTabPage, ColorHdl, ColorListBox&, rListBox, void)
1881 {
1882  ColorListBox* pColorLB = &rListBox;
1883  SvxFontPrevWindow *pPrev = nullptr;
1884  weld::ComboBox* pLB;
1885 
1886  if (pColorLB == m_xInsertColorLB.get())
1887  {
1888  pLB = m_xInsertLB.get();
1889  pPrev = m_xInsertedPreviewWN.get();
1890  }
1891  else if (pColorLB == m_xDeletedColorLB.get())
1892  {
1893  pLB = m_xDeletedLB.get();
1894  pPrev = m_xDeletedPreviewWN.get();
1895  }
1896  else
1897  {
1898  pLB = m_xChangedLB.get();
1899  pPrev = m_xChangedPreviewWN.get();
1900  }
1901 
1902  SvxFont& rFont = pPrev->GetFont();
1903  SvxFont& rCJKFont = pPrev->GetCJKFont();
1904  sal_Int32 nPos = pLB->get_active();
1905  if( nPos == -1)
1906  nPos = 0;
1907 
1908  CharAttr* pAttr = reinterpret_cast<CharAttr*>(pLB->get_id(nPos).toInt64());
1909 
1910  if( pAttr->nItemId == SID_ATTR_BRUSH )
1911  {
1912  rFont.SetColor( COL_BLACK );
1913  rCJKFont.SetColor( COL_BLACK );
1914 
1915  Color aBgColor = pColorLB->GetSelectEntryColor();
1916  if (aBgColor != COL_NONE_COLOR)
1917  pPrev->SetColor(aBgColor);
1918  else
1919  pPrev->SetColor(COL_LIGHTGRAY);
1920  }
1921  else
1922  {
1923  Color aColor = pColorLB->GetSelectEntryColor();
1924 
1925  if (aColor == COL_NONE_COLOR)
1926  {
1927  rFont.SetColor( COL_BLACK );
1928  rCJKFont.SetColor( COL_BLACK );
1929  }
1930  else if (aColor == COL_TRANSPARENT)
1931  {
1932  rFont.SetColor( COL_RED );
1933  rCJKFont.SetColor( COL_RED );
1934  }
1935  else
1936  {
1937  rFont.SetColor(aColor);
1938  rCJKFont.SetColor(aColor);
1939  }
1940  }
1941 
1942  pPrev->Invalidate();
1943 }
1944 
1946 {
1947  m_xMarkPreviewWN->SetMarkPos(m_xMarkPosLB->get_active());
1948  m_xMarkPreviewWN->SetColor(m_xMarkColorLB->GetSelectEntryColor());
1949 
1950  m_xMarkPreviewWN->Invalidate();
1951 }
1952 
1954 {
1955  ChangedMaskPrev();
1956 }
1957 
1958 IMPL_LINK_NOARG(SwRedlineOptionsTabPage, ChangedMaskColorPrevHdl, ColorListBox&, void)
1959 {
1960  ChangedMaskPrev();
1961 }
1962 
1963 void SwRedlineOptionsTabPage::InitFontStyle(SvxFontPrevWindow& rExampleWin, const OUString& rText)
1964 {
1965  const AllSettings& rAllSettings = Application::GetSettings();
1966  LanguageType eLangType = rAllSettings.GetUILanguageTag().getLanguageType();
1967  Color aBackCol( rAllSettings.GetStyleSettings().GetWindowColor() );
1968  SvxFont& rFont = rExampleWin.GetFont();
1969  SvxFont& rCJKFont = rExampleWin.GetCJKFont();
1970  SvxFont& rCTLFont = rExampleWin.GetCTLFont();
1971 
1972  OutputDevice& rDevice = rExampleWin.GetDrawingArea()->get_ref_device();
1973 
1974  vcl::Font aFont( OutputDevice::GetDefaultFont( DefaultFontType::SERIF, eLangType,
1975  GetDefaultFontFlags::OnlyOne, &rDevice ) );
1976  vcl::Font aCJKFont( OutputDevice::GetDefaultFont( DefaultFontType::CJK_TEXT, eLangType,
1977  GetDefaultFontFlags::OnlyOne, &rDevice ) );
1978  vcl::Font aCTLFont( OutputDevice::GetDefaultFont( DefaultFontType::CTL_TEXT, eLangType,
1979  GetDefaultFontFlags::OnlyOne, &rDevice ) );
1980  const Size aDefSize( 0, 12 );
1981  aFont.SetFontSize( aDefSize );
1982  aCJKFont.SetFontSize( aDefSize );
1983  aCTLFont.SetFontSize( aDefSize );
1984 
1985  aFont.SetFillColor( aBackCol );
1986  aCJKFont.SetFillColor( aBackCol );
1987  aCTLFont.SetFillColor( aBackCol );
1988 
1989  aFont.SetWeight( WEIGHT_NORMAL );
1990  aCJKFont.SetWeight( WEIGHT_NORMAL );
1991  aCTLFont.SetWeight( WEIGHT_NORMAL );
1992 
1993  rFont = aFont;
1994  rCJKFont = aCJKFont;
1995  rCTLFont = aCTLFont;
1996 
1997  const Size aNewSize( 0, rExampleWin.GetOutputSizePixel().Height() * 2 / 3 );
1998  rFont.SetFontSize( aNewSize );
1999  rCJKFont.SetFontSize( aNewSize );
2000 
2001  rExampleWin.SetFont( rFont, rCJKFont,rCTLFont );
2002  rExampleWin.SetPreviewText(rText);
2003 
2004  rExampleWin.SetBackColor(aBackCol);
2005 }
2006 
2008  : SfxTabPage(pPage, pController, "modules/swriter/ui/optcomparison.ui", "OptComparison", &rSet)
2009  , m_xAutoRB(m_xBuilder->weld_radio_button("auto"))
2010  , m_xWordRB(m_xBuilder->weld_radio_button("byword"))
2011  , m_xCharRB(m_xBuilder->weld_radio_button("bycharacter"))
2012  , m_xRsidCB(m_xBuilder->weld_check_button("useRSID"))
2013  , m_xIgnoreCB(m_xBuilder->weld_check_button("ignore"))
2014  , m_xLenNF(m_xBuilder->weld_spin_button("ignorelen"))
2015  , m_xStoreRsidCB(m_xBuilder->weld_check_button("storeRSID"))
2016 {
2017  Link<weld::Button&,void> aLnk( LINK( this, SwCompareOptionsTabPage, ComparisonHdl ) );
2018  m_xAutoRB->connect_clicked( aLnk );
2019  m_xWordRB->connect_clicked( aLnk );
2020  m_xCharRB->connect_clicked( aLnk );
2021 
2022  m_xIgnoreCB->connect_clicked( LINK( this, SwCompareOptionsTabPage, IgnoreHdl) );
2023 }
2024 
2026 {
2027 }
2028 
2029 std::unique_ptr<SfxTabPage> SwCompareOptionsTabPage::Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet )
2030 {
2031  return std::make_unique<SwCompareOptionsTabPage>(pPage, pController, *rAttrSet);
2032 }
2033 
2035 {
2036  bool bRet = false;
2037  SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig();
2038 
2039  if( m_xAutoRB->get_state_changed_from_saved() ||
2040  m_xWordRB->get_state_changed_from_saved() ||
2041  m_xCharRB->get_state_changed_from_saved() )
2042  {
2044 
2045  if ( m_xAutoRB->get_active() ) eCmpMode = SwCompareMode::Auto;
2046  if ( m_xWordRB->get_active() ) eCmpMode = SwCompareMode::ByWord;
2047  if ( m_xCharRB->get_active() ) eCmpMode = SwCompareMode::ByChar;
2048 
2049  pOpt->SetCompareMode( eCmpMode );
2050  bRet = true;
2051  }
2052 
2053  if( m_xRsidCB->get_state_changed_from_saved() )
2054  {
2055  pOpt->SetUseRsid( m_xRsidCB->get_active() );
2056  bRet = true;
2057  }
2058 
2059  if( m_xIgnoreCB->get_state_changed_from_saved() )
2060  {
2061  pOpt->SetIgnorePieces( m_xIgnoreCB->get_active() );
2062  bRet = true;
2063  }
2064 
2065  if( m_xLenNF->get_value_changed_from_saved() )
2066  {
2067  pOpt->SetPieceLen( m_xLenNF->get_value() );
2068  bRet = true;
2069  }
2070 
2071  if (m_xStoreRsidCB->get_state_changed_from_saved())
2072  {
2073  pOpt->SetStoreRsid(m_xStoreRsidCB->get_active());
2074  bRet = true;
2075  }
2076 
2077  return bRet;
2078 }
2079 
2081 {
2082  SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig();
2083 
2084  SwCompareMode eCmpMode = pOpt->GetCompareMode();
2085  if( eCmpMode == SwCompareMode::Auto )
2086  {
2087  m_xAutoRB->set_active(true);
2088  m_xRsidCB->set_sensitive(false);
2089  m_xIgnoreCB->set_sensitive(false);
2090  m_xLenNF->set_sensitive(false);
2091  }
2092  else if( eCmpMode == SwCompareMode::ByWord )
2093  {
2094  m_xWordRB->set_active(true);
2095  m_xRsidCB->set_sensitive(true);
2096  m_xIgnoreCB->set_sensitive(true);
2097  m_xLenNF->set_sensitive(true);
2098  }
2099  else if( eCmpMode == SwCompareMode::ByChar)
2100  {
2101  m_xCharRB->set_active(true);
2102  m_xRsidCB->set_sensitive(true);
2103  m_xIgnoreCB->set_sensitive(true);
2104  m_xLenNF->set_sensitive(true);
2105  }
2106  m_xAutoRB->save_state();
2107  m_xWordRB->save_state();
2108  m_xCharRB->save_state();
2109 
2110  m_xRsidCB->set_active( pOpt->IsUseRsid() );
2111  m_xRsidCB->save_state();
2112 
2113  m_xIgnoreCB->set_active( pOpt->IsIgnorePieces() );
2114  m_xIgnoreCB->save_state();
2115 
2116  m_xLenNF->set_sensitive( m_xIgnoreCB->get_active() && eCmpMode != SwCompareMode::Auto );
2117 
2118  m_xLenNF->set_value( pOpt->GetPieceLen() );
2119  m_xLenNF->save_value();
2120 
2121  m_xStoreRsidCB->set_active(pOpt->IsStoreRsid());
2122  m_xStoreRsidCB->save_state();
2123 }
2124 
2126 {
2127  bool bChecked = !m_xAutoRB->get_active();
2128  m_xRsidCB->set_sensitive( bChecked );
2129  m_xIgnoreCB->set_sensitive( bChecked );
2130  m_xLenNF->set_sensitive( bChecked && m_xIgnoreCB->get_active() );
2131 }
2132 
2134 {
2135  m_xLenNF->set_sensitive(m_xIgnoreCB->get_active());
2136 }
2137 
2138 #ifdef DBG_UTIL
2139 
2141  : SfxTabPage(pPage, pController, "modules/swriter/ui/opttestpage.ui", "OptTestPage", &rCoreSet)
2142  , bAttrModified( false )
2143  , m_xTest1CBox(m_xBuilder->weld_check_button("unused"))
2144  , m_xTest2CBox(m_xBuilder->weld_check_button("dynamic"))
2145  , m_xTest3CBox(m_xBuilder->weld_check_button("nocalm"))
2146  , m_xTest4CBox(m_xBuilder->weld_check_button("wysiwygdbg"))
2147  , m_xTest5CBox(m_xBuilder->weld_check_button("noidle"))
2148  , m_xTest6CBox(m_xBuilder->weld_check_button("noscreenadj"))
2149  , m_xTest7CBox(m_xBuilder->weld_check_button("winformat"))
2150  , m_xTest8CBox(m_xBuilder->weld_check_button("noscroll"))
2151  , m_xTest9CBox(m_xBuilder->weld_check_button("DrawingLayerNotLoading"))
2152  , m_xTest10CBox(m_xBuilder->weld_check_button("AutoFormatByInput"))
2153 {
2154  Init();
2155 }
2156 
2158 {
2159 }
2160 
2161 std::unique_ptr<SfxTabPage> SwTestTabPage::Create( weld::Container* pPage, weld::DialogController* pController,
2162  const SfxItemSet* rAttrSet )
2163 {
2164  return std::make_unique<SwTestTabPage>(pPage, pController, *rAttrSet);
2165 }
2166 
2168 {
2169 
2170  if ( bAttrModified )
2171  {
2172  SwTestItem aTestItem;
2173  aTestItem.m_bTest1=m_xTest1CBox->get_active();
2174  aTestItem.m_bTest2=m_xTest2CBox->get_active();
2175  aTestItem.m_bTest3=m_xTest3CBox->get_active();
2176  aTestItem.m_bTest4=m_xTest4CBox->get_active();
2177  aTestItem.m_bTest5=m_xTest5CBox->get_active();
2178  aTestItem.m_bTest6=m_xTest6CBox->get_active();
2179  aTestItem.m_bTest7=m_xTest7CBox->get_active();
2180  aTestItem.m_bTest8=m_xTest8CBox->get_active();
2181  aTestItem.m_bTest9=m_xTest9CBox->get_active();
2182  aTestItem.m_bTest10=m_xTest10CBox->get_active();
2183  rCoreSet->Put(aTestItem);
2184  }
2185  return bAttrModified;
2186 }
2187 
2189 {
2190  const SfxItemSet& rSet = GetItemSet();
2191  const SwTestItem* pTestAttr = nullptr;
2192 
2193  if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_SWTEST , false,
2194  reinterpret_cast<const SfxPoolItem**>(&pTestAttr) ))
2195  {
2196  m_xTest1CBox->set_active(pTestAttr->m_bTest1);
2197  m_xTest2CBox->set_active(pTestAttr->m_bTest2);
2198  m_xTest3CBox->set_active(pTestAttr->m_bTest3);
2199  m_xTest4CBox->set_active(pTestAttr->m_bTest4);
2200  m_xTest5CBox->set_active(pTestAttr->m_bTest5);
2201  m_xTest6CBox->set_active(pTestAttr->m_bTest6);
2202  m_xTest7CBox->set_active(pTestAttr->m_bTest7);
2203  m_xTest8CBox->set_active(pTestAttr->m_bTest8);
2204  m_xTest9CBox->set_active(pTestAttr->m_bTest9);
2205  m_xTest10CBox->set_active(pTestAttr->m_bTest10);
2206  }
2207 }
2208 
2210 {
2211  // handler
2212  Link<weld::Button&,void> aLk = LINK( this, SwTestTabPage, AutoClickHdl );
2213  m_xTest1CBox->connect_clicked( aLk );
2214  m_xTest2CBox->connect_clicked( aLk );
2215  m_xTest3CBox->connect_clicked( aLk );
2216  m_xTest4CBox->connect_clicked( aLk );
2217  m_xTest5CBox->connect_clicked( aLk );
2218  m_xTest6CBox->connect_clicked( aLk );
2219  m_xTest7CBox->connect_clicked( aLk );
2220  m_xTest8CBox->connect_clicked( aLk );
2221  m_xTest9CBox->connect_clicked( aLk );
2222  m_xTest10CBox->connect_clicked( aLk );
2223 }
2224 
2226 {
2227  bAttrModified = true;
2228 }
2229 
2230 #endif
2231 
2232 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetDefault(const SfxPoolItem &)
Set attribute as new default attribute in document.
Definition: edatmisc.cxx:84
std::unique_ptr< weld::ComboBox > m_xTitleBox
Definition: optpage.hxx:154
SfxViewFrame * GetViewFrame() const
bool GetValue() const
long Width() const
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optpage.cxx:559
void SetPos(const Point &rPoint)
const Color & GetShadowColor() const
sal_uInt16 const nItemId
Definition: optpage.cxx:1382
std::unique_ptr< weld::CheckButton > m_xTableCB
Definition: optpage.hxx:46
Subgroup labels.
Definition: poolfmt.hxx:345
#define FONT_GROUP_CTL
Definition: fontcfg.hxx:48
void SetFillColor(const Color &)
long GetWidth() const
static vcl::Font GetDefaultFont(DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice *pOutDev=nullptr)
bool IsUseRsid() const
Definition: modcfg.hxx:371
FieldUnit
void SetBackColor(const Color &rColor)
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optpage.cxx:1034
std::unique_ptr< weld::CustomWeld > m_xInsertedPreview
Definition: optpage.hxx:294
SvxFont & GetCTLFont()
void UpdateRedlineAttr()
Redline attributes have been changed. Updated views.
Definition: edredln.cxx:126
sal_uInt16 GetTableVMove() const
Definition: modcfg.hxx:231
void SetFontSize(const Size &)
void SetFontStandard(const OUString &rSet, sal_uInt8 nFontGroup)
Definition: fontcfg.hxx:90
std::unique_ptr< weld::ComboBox > m_xIdxBox
Definition: optpage.hxx:160
Represents the style of a paragraph.
Definition: fmtcol.hxx:55
long GetHeight() const
constexpr::Color COL_BLACK(0x00, 0x00, 0x00)
SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId)
Definition: edfmt.cxx:123
bool m_bTest4
Definition: cfgitems.hxx:147
#define FONT_STANDARD
Definition: fontcfg.hxx:27
const OUString & GetFamilyName() const
std::unique_ptr< ColorListBox > m_xInsertColorLB
Definition: optpage.hxx:292
#define FONT_OUTLINE
Definition: fontcfg.hxx:28
Color m_aMarkCol
Definition: optpage.hxx:263
bool m_bDrawing
Definition: cfgitems.hxx:76
bool m_bTest7
Definition: cfgitems.hxx:150
#define RES_CHRATR_FONTSIZE
Definition: hintids.hxx:77
std::unique_ptr< weld::CheckButton > m_xNumAlignmentCB
Definition: optpage.hxx:191
virtual void Reset(const SfxItemSet *rSet) override
Definition: optpage.cxx:1332
by left paragraph indention
Definition: crstate.hxx:34
virtual void Reset(const SfxItemSet *rSet) override
Definition: optpage.cxx:1121
OUString m_sFaxName
Definition: printdata.hxx:69
std::unique_ptr< weld::CheckButton > m_xRepeatHeaderCB
Definition: optpage.hxx:185
SwRedlineOptionsTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optpage.cxx:1566
void InitColors()
Definition: optpage.cxx:1427
std::unique_ptr< weld::CheckButton > m_xPostItCB
Definition: optpage.hxx:49
fill with spaces and tabs
Definition: crstate.hxx:31
const LanguageTag & GetUILanguageTag() const
std::string GetValue
std::unique_ptr< weld::ComboBox > m_xListBox
Definition: optpage.hxx:156
#define FN_PARAM_ELEM
Definition: cmdid.h:744
void SetFontCaption(const OUString &rSet, sal_uInt8 nFontGroup)
Definition: fontcfg.hxx:97
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optpage.cxx:2034
std::unique_ptr< weld::CheckButton > m_xTest3CBox
Definition: optpage.hxx:349
long Height() const
std::unique_ptr< weld::CheckButton > m_xProspectCB
Definition: optpage.hxx:88
LanguageType getLanguageType(bool bResolveSystem=true) const
std::unique_ptr< weld::CheckButton > m_xCtrlFieldCB
Definition: optpage.hxx:79
constexpr::Color COL_RED(0x80, 0x00, 0x00)
SwTestTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optpage.cxx:2140
std::unique_ptr< weld::CheckButton > m_xTest4CBox
Definition: optpage.hxx:350
long AdjustLeft(long nHorzMoveDelta)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optpage.cxx:1641
sal_uInt8 GetMode() const
Definition: cfgitems.hxx:129
SwWrtShell * m_pWrtShell
Definition: optpage.hxx:221
static CharAttr const aRedlineAttr[]
Definition: optpage.cxx:1387
void disposeAndClear()
void SetFontList(const OUString &rSet, sal_uInt8 nFontGroup)
Definition: fontcfg.hxx:95
bool IsIgnorePieces() const
Definition: modcfg.hxx:375
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
SwStdFontConfig * m_pFontConfig
Definition: optpage.hxx:128
bool m_bListHeightDefault
Definition: optpage.hxx:141
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optpage.cxx:2029
SvxFont & GetCJKFont()
SwInsertTableFlags mnInsMode
Definition: itabenum.hxx:40
OUString m_sShellLabel
Definition: optpage.hxx:123
const SvxFontItem & GetFont(bool=true) const
Definition: charatr.hxx:125
std::unique_ptr< weld::CheckButton > m_xFieldNameCB
Definition: optpage.hxx:48
std::unique_ptr< weld::CheckButton > m_xTest1CBox
Definition: optpage.hxx:347
sal_uInt16 GetValue() const
bool m_bNotes
Definition: cfgitems.hxx:78
sal_uInt16 const nAttr
Definition: optpage.cxx:1383
bool m_bPrintSingleJobs
Definition: printdata.hxx:58
void SetWeight(FontWeight)
std::unique_ptr< weld::CheckButton > m_xLeftPageCB
Definition: optpage.hxx:86
#define FONT_LIST
Definition: fontcfg.hxx:29
std::unique_ptr< weld::RadioButton > m_xFillTabRB
Definition: optpage.hxx:237
std::unique_ptr< weld::Frame > m_xSettingsFrame
Definition: optpage.hxx:51
#define RES_CHRATR_FONT
Definition: hintids.hxx:76
constexpr::Color COL_GRAY(0x80, 0x80, 0x80)
bool m_bPrintRightPages
Definition: printdata.hxx:58
constexpr::Color COL_LIGHTRED(0xFF, 0x00, 0x00)
std::unique_ptr< weld::CheckButton > m_xDrwCB
Definition: optpage.hxx:47
std::unique_ptr< weld::CheckButton > m_xStoreRsidCB
Definition: optpage.hxx:371
sal_uInt16 GetTableHMove() const
Definition: modcfg.hxx:227
void SetOn(bool bFlag)
Definition: cfgitems.hxx:133
#define RES_CHRATR_CJK_FONT
Definition: hintids.hxx:91
#define FN_HSCROLL_METRIC
Definition: cmdid.h:177
constexpr::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
bool m_bDisposePrinter
Definition: optpage.hxx:139
#define FN_PARAM_SHADOWCURSOR
Definition: cmdid.h:782
#define RES_CHRATR_CJK_FONTSIZE
Definition: hintids.hxx:92
void SetModified()
Definition: edws.cxx:69
const OUString & GetFontList(sal_uInt8 nFontGroup) const
Definition: fontcfg.hxx:83
bool m_bPrintReverse
Definition: printdata.hxx:58
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &) override
Definition: optpage.cxx:1441
void Invalidate(sal_uInt16 nId)
std::unique_ptr< weld::ComboBox > m_xStandardBox
Definition: optpage.hxx:152
bool IsCTLFontEnabled() const
virtual bool SetFormatAttr(const SfxPoolItem &rAttr) override
Override to recognize changes on the and register/unregister the paragragh style at t...
Definition: fmtcol.cxx:329
Color m_aTextCol
Definition: optpage.hxx:266
#define FN_PARAM_ADDPRINTER
Definition: cmdid.h:742
bool m_bIndexHeightDefault
Definition: optpage.hxx:143
virtual int get_active() const =0
sal_Int32 GetFontHeight(sal_uInt8 nFont, sal_uInt8 nScriptType, LanguageType eLang)
Definition: fontcfg.cxx:301
std::unique_ptr< SvxFontPrevWindow > m_xChangedPreviewWN
Definition: optpage.hxx:303
const AuthorCharAttr & GetInsertAuthorAttr() const
Definition: modcfg.hxx:243
void SetInsTableFormatNum(bool bHTML, bool b)
Definition: modcfg.hxx:282
std::unique_ptr< SvtFontSizeBox > m_xStandardHeightLB
Definition: optpage.hxx:153
std::unique_ptr< weld::CheckButton > m_xDontSplitCB
Definition: optpage.hxx:186
void EndAllAction()
Definition: edws.cxx:96
virtual ~SwRedlineOptionsTabPage() override
Definition: optpage.cxx:1625
bool m_bLabelHeightDefault
Definition: optpage.hxx:142
const OUString & GetFontCaption(sal_uInt8 nFontGroup) const
Definition: fontcfg.hxx:84
void SetTableHInsert(sal_uInt16 nSet)
Definition: modcfg.hxx:236
sal_uInt16 m_nAttr
Definition: authratr.hxx:30
sal_uInt16 mnRowsToRepeat
Definition: itabenum.hxx:41
OUString const m_sScriptWestern
Definition: optpage.hxx:147
const SvxFontItem & GetCJKFont(bool=true) const
Definition: charatr.hxx:127
bool m_bSetListDefault
Definition: optpage.hxx:134
virtual ~SwTableOptionsTabPage() override
Definition: optpage.cxx:1024
#define FONT_CAPTION
Definition: fontcfg.hxx:30
virtual int get_count() const =0
bool bAttrModified
Definition: optpage.hxx:345
Size const & GetOutputSizePixel() const
FontFamily GetFamilyType()
bool IsInsTableAlignNum(bool bHTML) const
Definition: modcfg.hxx:294
bool m_bSetIdxDefault
Definition: optpage.hxx:138
OUString const m_sScriptComplex
Definition: optpage.hxx:149
SwInsertTableFlags
Definition: itabenum.hxx:25
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optpage.cxx:2167
std::unique_ptr< weld::CheckButton > m_xGrfCB
Definition: optpage.hxx:78
VclPtr< SfxPrinter > m_pPrt
Definition: optpage.hxx:126
std::unique_ptr< weld::CheckButton > m_xVRulerRightCBox
Definition: optpage.hxx:41
std::unique_ptr< weld::CheckButton > m_xParaCB
Definition: optpage.hxx:224
std::unique_ptr< weld::CheckButton > m_xMathBaselineAlignmentCB
Definition: optpage.hxx:244
std::unique_ptr< weld::ComboBox > m_xDeletedLB
Definition: optpage.hxx:296
void Move(long nHorzMoveDelta, long nVertMoveDelta)
const Color & GetMarkAlignColor() const
Definition: modcfg.hxx:259
#define FN_VSCROLL_METRIC
Definition: cmdid.h:178
#define FONT_GROUP_DEFAULT
Definition: fontcfg.hxx:46
WEIGHT_BOLD
Used by the UI to modify the document model.
Definition: wrtsh.hxx:90
std::unique_ptr< weld::CheckButton > m_xFieldHiddenParaCB
Definition: optpage.hxx:58
std::unique_ptr< SwMarkPreview > m_xMarkPreviewWN
Definition: optpage.hxx:308
#define FN_PARAM_DOCDISP
Definition: cmdid.h:743
virtual void set(DocumentSettingId id, bool value)=0
Set the specified document setting.
constexpr::Color COL_TRANSPARENT(0xFF, 0xFF, 0xFF, 0xFF)
std::unique_ptr< weld::ComboBox > m_xLabelBox
Definition: optpage.hxx:158
bool m_bPrintProspectRTL
Definition: printdata.hxx:58
OUString const sNone
Definition: optpage.hxx:74
std::unique_ptr< weld::RadioButton > m_xFillTabAndSpaceRB
Definition: optpage.hxx:238
long Right() const
tools::Rectangle aRightPagePrtArea
Definition: optpage.hxx:271
const SwView & GetView() const
Definition: wrtsh.hxx:428
bool m_bPrintGraphic
Definition: printdata.hxx:58
LINESTYLE_NONE
bool IsInsTableChangeNumFormat(bool bHTML) const
Definition: modcfg.hxx:287
#define RES_CHRATR_CTL_FONTSIZE
Definition: hintids.hxx:97
static sal_uInt16 aDeletedAttrMap[]
Definition: optpage.cxx:1407
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: optpage.cxx:992
std::unique_ptr< weld::Button > m_xStandardPB
Definition: optpage.hxx:162
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optpage.cxx:224
std::unique_ptr< SvxFontPrevWindow > m_xDeletedPreviewWN
Definition: optpage.hxx:298
Color m_aShadowCol
Definition: optpage.hxx:265
void SetFont(const SvxFont &rNormalFont, const SvxFont &rCJKFont, const SvxFont &rCTLFont)
void SetDeletedAuthorAttr(AuthorCharAttr const &rAttr)
Definition: modcfg.hxx:248
default, fill with tabs
Definition: crstate.hxx:30
bool m_bPrintProspect
Definition: printdata.hxx:58
void SetPieceLen(sal_uInt16 nLen)
Definition: modcfg.hxx:380
virtual void Reset(const SfxItemSet *rSet) override
Definition: optpage.cxx:715
bool GetHighContrastMode() const
virtual void set_id(int row, const OUString &rId)=0
sal_uInt16 nMarkPos
Definition: optpage.hxx:273
#define FONT_PER_GROUP
Definition: fontcfg.hxx:44
bool m_bShowHiddenPara
Definition: cfgitems.hxx:81
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optpage.cxx:359
std::unique_ptr< weld::CustomWeld > m_xChangedPreview
Definition: optpage.hxx:304
SwDoc * GetDoc() const
Definition: viewsh.hxx:284
long Top() const
Size getPreviewOptionsSize(const OutputDevice &rReference)
static OUString GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang)
Definition: fontcfg.cxx:218
SvxFont & GetFont()
void SetInsTableAlignNum(bool bHTML, bool b)
Definition: modcfg.hxx:296
virtual OutputDevice & get_ref_device()=0
void SetFormatAuthorAttr(AuthorCharAttr const &rAttr)
Definition: modcfg.hxx:252
#define FN_PARAM_PRINTER
Definition: cmdid.h:770
std::unique_ptr< weld::CheckButton > m_xCursorInProtCB
Definition: optpage.hxx:242
STRIKEOUT_SINGLE
if(nullptr==pCandidateA||nullptr==pCandidateB)
const AuthorCharAttr & GetFormatAuthorAttr() const
Definition: modcfg.hxx:251
bool m_bPrintPageBackground
Definition: printdata.hxx:58
virtual void Reset(const SfxItemSet *rSet) override
Definition: optpage.cxx:1723
#define FN_PARAM_CRSR_IN_PROTECTED
Definition: cmdid.h:786
void SetCompareMode(SwCompareMode eMode)
Definition: modcfg.hxx:368
void DrawRect(const tools::Rectangle &rRect)
bool m_bPrintTextPlaceholder
Definition: printdata.hxx:58
const SfxItemSet & GetItemSet() const
std::unique_ptr< weld::CheckButton > m_xVRulerCBox
Definition: optpage.hxx:40
SwCompareMode
Definition: modcfg.hxx:87
#define SAL_N_ELEMENTS(arr)
static FieldUnit GetValue(sal_uInt32 i)
Definition: optload.cxx:77
SwCompareOptionsTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optpage.cxx:2007
void SetFax(const std::vector< OUString > &)
Definition: optpage.cxx:458
void Fill(const FontMetric *pFontMetric, const FontList *pList)
bool m_bTest8
Definition: cfgitems.hxx:151
void SetTableChgMode(TableChgMode eMode)
Definition: edtab.cxx:287
std::unique_ptr< weld::RadioButton > m_xVarRB
Definition: optpage.hxx:201
const SfxPoolItem * GetOldItem(const SfxItemSet &rSet, sal_uInt16 nSlot, bool bDeep=true)
void SetFontIndex(const OUString &rSet, sal_uInt8 nFontGroup)
Definition: fontcfg.hxx:99
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
Definition: viewsh.cxx:2593
std::unique_ptr< weld::CheckButton > m_xTest7CBox
Definition: optpage.hxx:353
void SetLineColor()
bool m_bTable
Definition: cfgitems.hxx:74
std::unique_ptr< weld::ComboBox > m_xMarkPosLB
Definition: optpage.hxx:306
void clear()
std::unique_ptr< weld::MetricSpinButton > m_xRowInsertMF
Definition: optpage.hxx:196
std::unique_ptr< SvtFontSizeBox > m_xIndexHeightLB
Definition: optpage.hxx:161
tools::Rectangle aLeftPagePrtArea
Definition: optpage.hxx:270
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: optpage.cxx:473
#define SW_MOD()
Definition: swmodule.hxx:256
bool m_bVertRuler
Definition: cfgitems.hxx:68
#define COL_NONE_COLOR
std::unique_ptr< weld::CheckButton > m_xShowInlineTooltips
Definition: optpage.hxx:56
FontPitch GetPitch()
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
void SetIgnorePieces(bool b)
Definition: modcfg.hxx:376
std::unique_ptr< weld::CheckButton > m_xTabCB
Definition: optpage.hxx:228
bool IsInsTableFormatNum(bool bHTML) const
Definition: modcfg.hxx:280
bool m_bPrintLeftPages
Definition: printdata.hxx:58
#define RES_CHRATR_CTL_FONT
Definition: hintids.hxx:96
std::unique_ptr< weld::RadioButton > m_xFillMarginRB
Definition: optpage.hxx:235
const OUString & GetFontIndex(sal_uInt8 nFontGroup) const
Definition: fontcfg.hxx:85
std::unique_ptr< weld::CheckButton > m_xSmoothCBox
Definition: optpage.hxx:43
Subgroup headings.
Definition: poolfmt.hxx:261
bool m_bTest6
Definition: cfgitems.hxx:149
bool IsStoreRsid() const
Definition: modcfg.hxx:383
std::unique_ptr< weld::RadioButton > m_xEndRB
Definition: optpage.hxx:94
SwAddPrinterTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optpage.cxx:280
std::unique_ptr< weld::RadioButton > m_xFixRB
Definition: optpage.hxx:199
std::unique_ptr< weld::CheckButton > m_xSHyphCB
Definition: optpage.hxx:225
OUString m_sShellList
Definition: optpage.hxx:122
void SetSize(const Size &rSize)
SfxBindings & GetBindings()
#define FN_PARAM_WRTSHELL
Definition: cmdid.h:773
int i
std::unique_ptr< weld::CheckButton > m_xPrintEmptyPagesCB
Definition: optpage.hxx:98
void SetInsTableFlags(bool bHTML, const SwInsertTableOptions &rOpts)
Definition: modcfg.hxx:303
HTMLMODE_ON
std::unique_ptr< weld::RadioButton > m_xInMarginsRB
Definition: optpage.hxx:96
bool m_bPrintDraw
Definition: printdata.hxx:58
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optpage.cxx:1273
void SetFillColor()
WEIGHT_NORMAL
std::unique_ptr< weld::RadioButton > m_xEndPageRB
Definition: optpage.hxx:95
virtual ~SwAddPrinterTabPage() override
Definition: optpage.cxx:342
bool m_bPrintTable
Definition: printdata.hxx:58
LINESTYLE_SINGLE
std::unique_ptr< weld::RadioButton > m_xAutoRB
Definition: optpage.hxx:365
long Bottom() const
#define FN_PARAM_STDFONTS
Definition: cmdid.h:771
Color m_aLineCol
Definition: optpage.hxx:264
bool m_bSetLabelDefault
Definition: optpage.hxx:136
bool m_bTest9
Definition: cfgitems.hxx:152
static void lcl_SetColl(SwWrtShell *pWrtShell, sal_uInt16 nType, SfxPrinter const *pPrt, const OUString &rStyle, sal_uInt16 nFontWhich)
Definition: optpage.cxx:565
std::unique_ptr< ColorListBox > m_xChangedColorLB
Definition: optpage.hxx:302
SwWrtShell * GetWrtShell()
Access to the SwWrtShell belonging to SwView.
Definition: docsh.hxx:224
sal_uInt16 GetTableVInsert() const
Definition: modcfg.hxx:239
std::unique_ptr< weld::CustomWeld > m_xDeletedPreview
Definition: optpage.hxx:299
void SetStoreRsid(bool bStoreRsid)
Definition: modcfg.hxx:387
#define FONT_INDEX
Definition: fontcfg.hxx:31
bool IsInside(const Point &rPOINT) const
bool m_bPrintControl
Definition: printdata.hxx:58
sal_uInt16 m_nItemId
Definition: authratr.hxx:29
LanguageType m_eLanguage
Definition: optpage.hxx:130
virtual void set_active(int pos)=0
void SetMarkAlignColor(const Color &rColor)
Definition: modcfg.hxx:260
OUString SwResId(const char *pId)
Definition: swmodule.cxx:190
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optpage.cxx:586
ITALIC_NONE
virtual ~SwStdFontTabPage() override
Definition: optpage.cxx:545
tools::Rectangle aPage
Definition: optpage.hxx:269
virtual ~SwCompareOptionsTabPage() override
Definition: optpage.cxx:2025
bool m_bShowInlineTooltips
Definition: cfgitems.hxx:79
const OUString & GetFontOutline(sal_uInt8 nFontGroup) const
Definition: fontcfg.hxx:82
std::unique_ptr< weld::CheckButton > m_xTest2CBox
Definition: optpage.hxx:348
virtual SfxPrinter * getPrinter(bool bCreate) const =0
Return the printer set at the document.
SfxItemPool * GetPool() const
std::unique_ptr< weld::CheckButton > m_xPaperFromSetupCB
Definition: optpage.hxx:99
void SetOutputSizePixel(const Size &rSize)
#define FONT_GROUP_CJK
Definition: fontcfg.hxx:47
virtual void Reset(const SfxItemSet *rSet) override
Definition: optpage.cxx:197
virtual ~SwShdwCursorOptionsTabPage() override
Definition: optpage.cxx:1257
OUString m_sShellIndex
Definition: optpage.hxx:124
std::unique_ptr< weld::CheckButton > m_xIgnoreCB
Definition: optpage.hxx:369
bool m_bPrintBlackFont
Definition: printdata.hxx:58
Color m_nColor
Definition: authratr.hxx:31
static const std::vector< OUString > & GetPrinterQueues()
std::unique_ptr< weld::RadioButton > m_xWordRB
Definition: optpage.hxx:366
void SetMarkAlignMode(sal_uInt16 nMode)
Definition: modcfg.hxx:256
#define FN_TABLE_MODE_FIX_PROP
Definition: cmdid.h:410
TableChgMode GetTableMode() const
Definition: modcfg.hxx:223
std::unique_ptr< weld::ComboBox > m_xVMetric
Definition: optpage.hxx:42
std::unique_ptr< weld::CheckButton > m_xTest10CBox
Definition: optpage.hxx:356
SwWrtShell * GetValue() const
Definition: swwrtshitem.hxx:36
std::unique_ptr< weld::Widget > m_xCommentsFrame
Definition: optpage.hxx:91
bool m_bGraphic
Definition: cfgitems.hxx:75
SwContentOptPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optpage.cxx:97
bool m_bTest5
Definition: cfgitems.hxx:148
std::unique_ptr< weld::CustomWeld > m_xMarkPreview
Definition: optpage.hxx:309
void PaintPage(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
Definition: optpage.cxx:1511
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optpage.cxx:1028
const OUString & GetFamilyName() const
void SetTableVInsert(sal_uInt16 nSet)
Definition: modcfg.hxx:240
std::unique_ptr< FontList > m_pFontList
Definition: optpage.hxx:127
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void SetCaseMap(const SvxCaseMap eNew)
SwStdFontTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optpage.cxx:493
sal_uInt32 GetHeight() const
Color const & GetSelectEntryColor() const
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optpage.cxx:353
std::unique_ptr< weld::CheckButton > m_xTest8CBox
Definition: optpage.hxx:354
std::unique_ptr< weld::CheckButton > m_xCharHiddenCB
Definition: optpage.hxx:230
long CalcToUnit(float nIn, MapUnit eUnit)
bool m_bSmoothScroll
Definition: cfgitems.hxx:70
long AdjustRight(long nHorzMoveDelta)
const OUString & GetFontStandard(sal_uInt8 nFontGroup) const
Definition: fontcfg.hxx:81
bool m_bPaperFromSetup
Definition: printdata.hxx:58
virtual ~SwTestTabPage() override
Definition: optpage.cxx:2157
std::unique_ptr< weld::Label > m_xSettingsLabel
Definition: optpage.hxx:52
bool m_bFieldHiddenText
Definition: cfgitems.hxx:80
std::unique_ptr< weld::ComboBox > m_xHMetric
Definition: optpage.hxx:39
std::unique_ptr< weld::CheckButton > m_xOnOffCB
Definition: optpage.hxx:233
OUString m_sShellTitle
Definition: optpage.hxx:121
bool bCharHiddenText
Definition: cfgitems.hxx:51
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
Color const m_aTransCol
Definition: optpage.hxx:262
std::unique_ptr< weld::Label > m_xLabelFT
Definition: optpage.hxx:151
SwTableOptionsTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optpage.cxx:999
std::unique_ptr< SvxFontPrevWindow > m_xInsertedPreviewWN
Definition: optpage.hxx:293
ITALIC_NORMAL
void SetTableMode(TableChgMode eSet)
Definition: modcfg.hxx:224
static SfxObjectShell * GetFirst(const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
unsigned char sal_uInt8
std::unique_ptr< weld::ComboBox > m_xFaxLB
Definition: optpage.hxx:100
void SetTableVMove(sal_uInt16 nSet)
Definition: modcfg.hxx:232
bool m_bPrintHiddenText
Definition: printdata.hxx:58
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
Definition: optpage.cxx:1541
std::unique_ptr< weld::RadioButton > m_xCharRB
Definition: optpage.hxx:367
OUString const m_sScriptAsian
Definition: optpage.hxx:148
std::unique_ptr< weld::Frame > m_xCursorProtFrame
Definition: optpage.hxx:241
bool m_bTest3
Definition: cfgitems.hxx:146
std::unique_ptr< weld::CheckButton > m_xTest6CBox
Definition: optpage.hxx:352
void SetInsertAuthorAttr(AuthorCharAttr const &rAttr)
Definition: modcfg.hxx:244
void SetFontHeight(sal_Int32 nHeight, sal_uInt8 nFont, sal_uInt8 nScriptType)
Definition: fontcfg.hxx:102
bool m_bFieldName
Definition: cfgitems.hxx:77
std::unique_ptr< SvtFontSizeBox > m_xTitleHeightLB
Definition: optpage.hxx:155
std::unique_ptr< weld::RadioButton > m_xFillIndentRB
Definition: optpage.hxx:236
static Color & GetFontColor()
Definition: viewopt.cxx:428
std::unique_ptr< weld::MetricSpinButton > m_xColInsertMF
Definition: optpage.hxx:197
bool m_bTest10
Definition: cfgitems.hxx:153
LanguageType GetAppLanguage()
Definition: init.cxx:729
IDocumentSettingAccess const & getIDocumentSettingAccess() const
Definition: doc.cxx:175
static OUString GetString(sal_uInt32 i)
Definition: optload.cxx:70
SwCompareMode GetCompareMode() const
Definition: modcfg.hxx:367
void SetColor(const Color &rColor)
sal_uInt16 GetPieceLen() const
Definition: modcfg.hxx:379
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optpage.cxx:1261
static VclPtr< reference_type > Create(Arg &&...arg)
std::unique_ptr< weld::Widget > m_xPagesFrame
Definition: optpage.hxx:85
void SetUseRsid(bool b)
Definition: modcfg.hxx:372
void SetTableHMove(sal_uInt16 nSet)
Definition: modcfg.hxx:228
void SetPreview(bool bPrev)
Definition: optpage.cxx:346
std::unique_ptr< weld::CheckButton > m_xHeaderCB
Definition: optpage.hxx:184
sal_uInt16 GetTableHInsert() const
Definition: modcfg.hxx:235
std::unique_ptr< weld::RadioButton > m_xFixPropRB
Definition: optpage.hxx:200
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea)
bool m_bPrintEmptyPages
Print empty pages.
Definition: printdata.hxx:58
const SfxPoolItem & GetFormatAttr(sal_uInt16 nWhich, bool bInParents=true) const
If bInParents is FALSE, search only in this format for attribute.
Definition: format.cxx:377
const SvxFontItem & GetCTLFont(bool=true) const
Definition: charatr.hxx:129
const Color & GetWindowColor() const
std::unique_ptr< weld::CheckButton > m_xCrossCB
Definition: optpage.hxx:37
std::unique_ptr< weld::CheckButton > m_xRsidCB
Definition: optpage.hxx:368
long CalcToPoint(long nIn, MapUnit eUnit, sal_uInt16 nFactor)
static void InitFontStyle(SvxFontPrevWindow &rExampleWin, const OUString &rText)
Definition: optpage.cxx:1963
virtual OUString get_id(int pos) const =0
std::unique_ptr< weld::CheckButton > m_xSpacesCB
Definition: optpage.hxx:226
long Left() const
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
std::unique_ptr< weld::RadioButton > m_xNoRB
Definition: optpage.hxx:92
bool bNonbreakingSpace
Definition: cfgitems.hxx:49
OUString m_sShellStd
Definition: optpage.hxx:120
virtual bool ResetFormatAttr(sal_uInt16 nWhich1, sal_uInt16 nWhich2=0) override
Definition: fmtcol.cxx:366
std::unique_ptr< weld::CheckButton > m_xTest5CBox
Definition: optpage.hxx:351
bool m_bTest2
Definition: cfgitems.hxx:145
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: optpage.cxx:1192
std::unique_ptr< weld::CheckButton > m_xBreakCB
Definition: optpage.hxx:229
std::unique_ptr< ColorListBox > m_xMarkColorLB
Definition: optpage.hxx:307
std::unique_ptr< weld::CheckButton > m_xRightPageCB
Definition: optpage.hxx:87
SwShdwCursorOptionsTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optpage.cxx:1199
IMPL_LINK_NOARG(SwAddPrinterTabPage, AutoClickHdl, weld::ToggleButton &, void)
Definition: optpage.cxx:444
std::unique_ptr< weld::RadioButton > m_xOnlyRB
Definition: optpage.hxx:93
#define FN_PARAM_SWTEST
Definition: cmdid.h:745
std::unique_ptr< weld::CheckButton > m_xProspectCB_RTL
Definition: optpage.hxx:89
static sal_uInt32 Count()
Definition: optload.cxx:65
void SetFontOutline(const OUString &rSet, sal_uInt8 nFontGroup)
Definition: fontcfg.hxx:93
std::unique_ptr< weld::SpinButton > m_xLenNF
Definition: optpage.hxx:370
std::unique_ptr< weld::CheckButton > m_xNumFormattingCB
Definition: optpage.hxx:189
std::unique_ptr< weld::CheckButton > m_xHSpacesCB
Definition: optpage.hxx:227
static sal_uInt16 aChangedAttrMap[]
Definition: optpage.cxx:1411
static SfxObjectShell * GetNext(const SfxObjectShell &rPrev, const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
std::unique_ptr< weld::CheckButton > m_xPrintHiddenTextCB
Definition: optpage.hxx:82
#define FN_TABLE_MODE_VARIABLE
Definition: cmdid.h:411
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optpage.cxx:173
TableChgMode
Definition: tblenum.hxx:46
std::unique_ptr< weld::Frame > m_xDirectCursorFrame
Definition: optpage.hxx:232
std::unique_ptr< weld::Label > m_xMetricLabel
Definition: optpage.hxx:53
#define FN_TABLE_MODE_FIX
Definition: cmdid.h:409
LINESTYLE_DOUBLE
fill with spaces
Definition: crstate.hxx:32
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:116
STRIKEOUT_NONE
SwWrtShell * m_pWrtShell
Definition: optpage.hxx:129
std::unique_ptr< weld::CheckButton > m_xFieldHiddenCB
Definition: optpage.hxx:57
std::unique_ptr< weld::CheckButton > m_xBorderCB
Definition: optpage.hxx:187
sal_uInt8 m_nFontGroup
Definition: optpage.hxx:145
const SwInsertTableOptions & GetInsTableFlags(bool bHTML) const
Definition: modcfg.hxx:301
std::unique_ptr< weld::ComboBox > m_xMetricLB
Definition: optpage.hxx:54
std::unique_ptr< weld::CheckButton > m_xGrfCB
Definition: optpage.hxx:45
bool m_bCrosshair
Definition: cfgitems.hxx:72
std::unique_ptr< SvtFontSizeBox > m_xListHeightLB
Definition: optpage.hxx:157
static void lcl_SelectMetricLB(weld::ComboBox &rMetric, sal_uInt16 nSID, const SfxItemSet &rSet)
Definition: optpage.cxx:179
SelectionType GetSelectionType() const
Definition: wrtsh1.cxx:1406
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optpage.cxx:2161
virtual void set_size_request(int nWidth, int nHeight)=0
static sal_uInt16 aInsertAttrMap[]
Definition: optpage.cxx:1403
void StartAllAction()
For all views of this document.
Definition: edws.cxx:85
static sal_Int32 GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang)
Definition: fontcfg.cxx:251
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optpage.cxx:1646
sal_uInt16 GetMarkAlignMode() const
Definition: modcfg.hxx:255
sal_Int32 nPos
std::unique_ptr< weld::CheckButton > m_xPrintTextPlaceholderCB
Definition: optpage.hxx:83
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: optpage.cxx:1266
std::unique_ptr< weld::ComboBox > m_xInsertLB
Definition: optpage.hxx:291
std::unique_ptr< SvtFontSizeBox > m_xLabelHeightLB
Definition: optpage.hxx:159
const AuthorCharAttr & GetDeletedAuthorAttr() const
Definition: modcfg.hxx:247
SwWrtShell * m_pWrtShell
Definition: optpage.hxx:181
only align left, center, right
Definition: crstate.hxx:33
virtual ~SwMarkPreview() override
Definition: optpage.cxx:1423
virtual void Reset(const SfxItemSet *rSet) override
Definition: optpage.cxx:2188
std::unique_ptr< weld::RadioButton > m_xFillSpaceRB
Definition: optpage.hxx:239
bool m_bVertRulerRight
Definition: cfgitems.hxx:69
std::unique_ptr< weld::MetricSpinButton > m_xRowMoveMF
Definition: optpage.hxx:193
std::unique_ptr< weld::CheckButton > m_xBlackFontCB
Definition: optpage.hxx:81
void SetPreviewText(const OUString &rString)
Color m_aBgCol
Definition: optpage.hxx:261
std::unique_ptr< ColorListBox > m_xDeletedColorLB
Definition: optpage.hxx:297
virtual void Reset(const SfxItemSet *rSet) override
Definition: optpage.cxx:2080
void SetMode(sal_uInt8 eM)
Definition: cfgitems.hxx:132
Color m_aPrintAreaCol
Definition: optpage.hxx:267
SwPostItMode m_nPrintPostIts
Definition: printdata.hxx:68
virtual void Reset(const SfxItemSet *rSet) override
Definition: optpage.cxx:400
virtual ~SwContentOptPage() override
Definition: optpage.cxx:169
IMPL_LINK(SwContentOptPage, VertRulerHdl, weld::ToggleButton &, rBox, void)
Definition: optpage.cxx:274
bool m_bLabelDefault
Definition: optpage.hxx:135
rtl_TextEncoding GetCharSet() const
std::unique_ptr< weld::ComboBox > m_xChangedLB
Definition: optpage.hxx:301
std::unique_ptr< weld::MetricSpinButton > m_xColMoveMF
Definition: optpage.hxx:194
bool m_bTest1
Definition: cfgitems.hxx:144
virtual OUString get_active_text() const =0
void SetInsTableChangeNumFormat(bool bHTML, bool b)
Definition: modcfg.hxx:289
std::unique_ptr< weld::CheckButton > m_xBackgroundCB
Definition: optpage.hxx:80
std::unique_ptr< weld::CheckButton > m_xTest9CBox
Definition: optpage.hxx:355
bool IsVerticalTextEnabled() const
std::unique_ptr< weld::CheckButton > m_xNumFormatFormattingCB
Definition: optpage.hxx:190