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>
35 
36 #include <swmodule.hxx>
37 #include <wrtsh.hxx>
38 #include <cfgitems.hxx>
39 #include <poolfmt.hxx>
40 #include <uiitems.hxx>
41 #include <printdata.hxx>
42 #include <modcfg.hxx>
43 #include <crstate.hxx>
44 #include <viewopt.hxx>
45 #include <globals.hrc>
46 #include <strings.hrc>
47 #include <swwrtshitem.hxx>
48 
49 #include <editeng/fhgtitem.hxx>
50 #include <editeng/fontitem.hxx>
51 #include <editeng/langitem.hxx>
52 #include <editeng/svxenum.hxx>
53 #include <sal/macros.h>
54 #include <sfx2/dialoghelper.hxx>
55 #include <sfx2/dispatch.hxx>
56 #include <sfx2/printer.hxx>
57 #include <sfx2/bindings.hxx>
58 #include <sfx2/viewfrm.hxx>
59 #include <svl/ctloptions.hxx>
60 #include <svl/eitem.hxx>
61 #include <svl/cjkoptions.hxx>
62 #include <svtools/ctrltool.hxx>
63 #include <svtools/unitconv.hxx>
64 #include <sfx2/htmlmode.hxx>
65 
66 #include <vcl/settings.hxx>
67 #include <vcl/svapp.hxx>
68 
69 #include <optload.hxx>
70 
71 #include <svtools/miscopt.hxx>
72 
73 using namespace ::com::sun::star;
74 
75 namespace {
76 
77 void drawRect(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect, const Color &rFillColor, const Color &rLineColor)
78 {
79  rRenderContext.SetFillColor(rFillColor);
80  rRenderContext.SetLineColor(rLineColor);
81  rRenderContext.DrawRect(rRect);
82 }
83 
84 }
85 
86 // Tools->Options->Writer->View
87 // Tools->Options->Writer/Web->View
89  : SfxTabPage(pPage, pController, "modules/swriter/ui/viewoptionspage.ui", "ViewOptionsPage", &rCoreSet)
90  , m_xCrossCB(m_xBuilder->weld_check_button("helplines"))
91  , m_xHMetric(m_xBuilder->weld_combo_box("hrulercombobox"))
92  , m_xVRulerCBox(m_xBuilder->weld_check_button("vruler"))
93  , m_xVRulerRightCBox(m_xBuilder->weld_check_button("vrulerright"))
94  , m_xVMetric(m_xBuilder->weld_combo_box("vrulercombobox"))
95  , m_xSmoothCBox(m_xBuilder->weld_check_button("smoothscroll"))
96  , m_xGrfCB(m_xBuilder->weld_check_button("graphics"))
97  , m_xTableCB(m_xBuilder->weld_check_button("tables"))
98  , m_xDrwCB(m_xBuilder->weld_check_button("drawings"))
99  , m_xPostItCB(m_xBuilder->weld_check_button("comments"))
100  , m_xSettingsFrame(m_xBuilder->weld_frame("settingsframe"))
101  , m_xSettingsLabel(m_xBuilder->weld_label("settingslabel"))
102  , m_xMetricLabel(m_xBuilder->weld_label("measureunitlabel"))
103  , m_xMetricLB(m_xBuilder->weld_combo_box("measureunit"))
104  , m_xShowInlineTooltips(m_xBuilder->weld_check_button("changestooltip"))
105  , m_xShowOutlineContentVisibilityButton(m_xBuilder->weld_check_button("outlinecontentvisibilitybutton"))
106  , m_xFieldHiddenCB(m_xBuilder->weld_check_button("hiddentextfield"))
107  , m_xFieldHiddenParaCB(m_xBuilder->weld_check_button("hiddenparafield"))
108 {
109  SvtMiscOptions aMiscOptions;
110  if (!aMiscOptions.IsExperimentalMode())
112 
113  /* This part is visible only with Writer/Web->View dialogue. */
114  const SfxPoolItem* pItem;
115  if (! (SfxItemState::SET == rCoreSet.GetItemState(SID_HTML_MODE, false, &pItem )
116  && static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON))
117  {
118  m_xSettingsFrame->hide();
119  m_xSettingsLabel->hide();
120  m_xMetricLabel->hide();
121  m_xMetricLB->hide();
122  }
123 
124  SvtCJKOptions aCJKOptions;
125  if(!aCJKOptions.IsVerticalTextEnabled() )
126  m_xVRulerRightCBox->hide();
127  m_xVRulerCBox->connect_toggled(LINK(this, SwContentOptPage, VertRulerHdl ));
128 
129  for (size_t i = 0; i < SwFieldUnitTable::Count(); ++i)
130  {
131  const OUString sMetric = SwFieldUnitTable::GetString(i);
133 
134  switch ( eFUnit )
135  {
136  case FieldUnit::MM:
137  case FieldUnit::CM:
138  case FieldUnit::POINT:
139  case FieldUnit::PICA:
140  case FieldUnit::INCH:
141  case FieldUnit::CHAR: // add two units , 'character' and 'line' , their ticks are not fixed
142  case FieldUnit::LINE:
143  {
144  // only use these metrics
145  // a horizontal ruler has not the 'line' unit
146  // there isn't 'line' unit in HTML format
147  if (eFUnit != FieldUnit::LINE)
148  {
149  m_xMetricLB->append(OUString::number(static_cast<sal_uInt32>(eFUnit)), sMetric);
150  m_xHMetric->append(OUString::number(static_cast<sal_uInt32>(eFUnit)), sMetric);
151  }
152  // a vertical ruler has not the 'character' unit
153  if (eFUnit != FieldUnit::CHAR)
154  {
155  m_xVMetric->append(OUString::number(static_cast<sal_uInt32>(eFUnit)), sMetric);
156  }
157  break;
158  }
159  default:;//prevent warning
160  }
161  }
162 }
163 
165 {
166 }
167 
168 std::unique_ptr<SfxTabPage> SwContentOptPage::Create( weld::Container* pPage, weld::DialogController* pController,
169  const SfxItemSet* rAttrSet)
170 {
171  return std::make_unique<SwContentOptPage>(pPage, pController, *rAttrSet);
172 }
173 
174 static void lcl_SelectMetricLB(weld::ComboBox& rMetric, sal_uInt16 nSID, const SfxItemSet& rSet)
175 {
176  const SfxPoolItem* pItem;
177  if( rSet.GetItemState( nSID, false, &pItem ) >= SfxItemState::DEFAULT )
178  {
179  FieldUnit eFieldUnit = static_cast<FieldUnit>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
180  for (sal_Int32 i = 0, nEntryCount = rMetric.get_count(); i < nEntryCount; ++i)
181  {
182  if (rMetric.get_id(i).toUInt32() == static_cast<sal_uInt32>(eFieldUnit))
183  {
184  rMetric.set_active(i);
185  break;
186  }
187  }
188  }
189  rMetric.save_value();
190 }
191 
193 {
194  const SwElemItem* pElemAttr = nullptr;
195 
196  rSet->GetItemState( FN_PARAM_ELEM , false,
197  reinterpret_cast<const SfxPoolItem**>(&pElemAttr) );
198  if(pElemAttr)
199  {
200  m_xTableCB->set_active(pElemAttr->m_bTable);
201  m_xGrfCB->set_active(pElemAttr->m_bGraphic);
202  m_xDrwCB->set_active(pElemAttr->m_bDrawing);
203  m_xPostItCB->set_active(pElemAttr->m_bNotes);
204  m_xCrossCB->set_active(pElemAttr->m_bCrosshair);
205  m_xVRulerCBox->set_active(pElemAttr->m_bVertRuler);
206  m_xVRulerRightCBox->set_active(pElemAttr->m_bVertRulerRight);
207  m_xSmoothCBox->set_active(pElemAttr->m_bSmoothScroll);
208  m_xShowInlineTooltips->set_active(pElemAttr->m_bShowInlineTooltips);
210  m_xFieldHiddenCB->set_active( pElemAttr->m_bFieldHiddenText );
211  m_xFieldHiddenParaCB->set_active( pElemAttr->m_bShowHiddenPara );
212  if (GetActiveWrtShell()->GetViewOptions()->IsShowOutlineContentVisibilityButton() != pElemAttr->m_bShowOutlineContentVisibilityButton)
214  }
215  m_xMetricLB->set_active(-1);
216  lcl_SelectMetricLB(*m_xMetricLB, SID_ATTR_METRIC, *rSet);
219 }
220 
222 {
223  const SwElemItem* pOldAttr = static_cast<const SwElemItem*>(
225 
226  SwElemItem aElem;
227  aElem.m_bTable = m_xTableCB->get_active();
228  aElem.m_bGraphic = m_xGrfCB->get_active();
229  aElem.m_bDrawing = m_xDrwCB->get_active();
230  aElem.m_bNotes = m_xPostItCB->get_active();
231  aElem.m_bCrosshair = m_xCrossCB->get_active();
232  aElem.m_bVertRuler = m_xVRulerCBox->get_active();
233  aElem.m_bVertRulerRight = m_xVRulerRightCBox->get_active();
234  aElem.m_bSmoothScroll = m_xSmoothCBox->get_active();
235  aElem.m_bShowInlineTooltips = m_xShowInlineTooltips->get_active();
237  aElem.m_bFieldHiddenText = m_xFieldHiddenCB->get_active();
238  aElem.m_bShowHiddenPara = m_xFieldHiddenParaCB->get_active();
239 
240  if (GetActiveWrtShell()->GetViewOptions()->IsShowOutlineContentVisibilityButton() != aElem.m_bShowOutlineContentVisibilityButton)
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 FontSizeBox(m_xBuilder->weld_combo_box("standardheight")))
516  , m_xTitleBox(m_xBuilder->weld_combo_box("titlebox"))
517  , m_xTitleHeightLB(new FontSizeBox(m_xBuilder->weld_combo_box("titleheight")))
518  , m_xListBox(m_xBuilder->weld_combo_box("listbox"))
519  , m_xListHeightLB(new FontSizeBox(m_xBuilder->weld_combo_box("listheight")))
520  , m_xLabelBox(m_xBuilder->weld_combo_box("labelbox"))
521  , m_xLabelHeightLB(new FontSizeBox(m_xBuilder->weld_combo_box("labelheight")))
522  , m_xIdxBox(m_xBuilder->weld_combo_box("idxbox"))
523  , m_xIndexHeightLB(new FontSizeBox(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_NUMBER_BULLET_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  FontSizeBox* 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 
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_xTabLabel(m_xBuilder->weld_label("tabs_label"))
1208  , m_xBreakCB(m_xBuilder->weld_check_button("break"))
1209  , m_xCharHiddenCB(m_xBuilder->weld_check_button("hiddentext"))
1210  , m_xBookmarkCB(m_xBuilder->weld_check_button("bookmarks"))
1211  , m_xBookmarkLabel(m_xBuilder->weld_label("bookmarks_label"))
1212  , m_xDirectCursorFrame(m_xBuilder->weld_frame("directcrsrframe"))
1213  , m_xOnOffCB(m_xBuilder->weld_check_button("cursoronoff"))
1214  , m_xDirectCursorFillMode(m_xBuilder->weld_combo_box("cxDirectCursorFillMode"))
1215  , m_xCursorProtFrame(m_xBuilder->weld_frame("crsrprotframe"))
1216  , m_xCursorInProtCB(m_xBuilder->weld_check_button("cursorinprot"))
1217  , m_xMathBaselineAlignmentCB(m_xBuilder->weld_check_button("mathbaseline"))
1218 {
1219  const SfxPoolItem* pItem = nullptr;
1221  bool bIsOn = false;
1222 
1223  if( SfxItemState::SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem ))
1224  {
1225  auto& aOpt = *static_cast<const SwShadowCursorItem*>(pItem);
1226  eMode = aOpt.GetMode();
1227  bIsOn = aOpt.IsOn();
1228  }
1229  m_xOnOffCB->set_active( bIsOn );
1230 
1231  m_xDirectCursorFillMode->set_active( static_cast<int>(eMode) );
1232  if(SfxItemState::SET != rSet.GetItemState(SID_HTML_MODE, false, &pItem )
1233  || !(static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON))
1234  return;
1235 
1236  m_xTabCB->hide();
1237  m_xTabLabel->hide();
1238  m_xCharHiddenCB->hide();
1239  m_xBookmarkCB->hide();
1240  m_xBookmarkLabel->hide();
1241 
1242  m_xDirectCursorFrame->hide();
1243  m_xOnOffCB->hide();
1244  m_xDirectCursorFillMode->hide();
1245  m_xCursorProtFrame->hide();
1246  m_xCursorInProtCB->hide();
1247 }
1248 
1250 {
1251 }
1252 
1253 std::unique_ptr<SfxTabPage> SwShdwCursorOptionsTabPage::Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet )
1254 {
1255  return std::make_unique<SwShdwCursorOptionsTabPage>(pPage, pController, *rSet);
1256 }
1257 
1259 {
1260  const SwWrtShellItem* pWrtSh = aSet.GetItem<SwWrtShellItem>(SID_WRT_SHELL, false);
1261  if (pWrtSh)
1262  m_pWrtShell = pWrtSh->GetValue();
1263 }
1264 
1266 {
1267  SwShadowCursorItem aOpt;
1268  aOpt.SetOn( m_xOnOffCB->get_active() );
1269 
1270  SwFillMode eMode = static_cast<SwFillMode>(m_xDirectCursorFillMode->get_active());
1271  aOpt.SetMode( eMode );
1272 
1273  bool bRet = false;
1274  const SfxPoolItem* pItem = nullptr;
1275  if( SfxItemState::SET != rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem )
1276  || static_cast<const SwShadowCursorItem&>(*pItem) != aOpt )
1277  {
1278  rSet->Put( aOpt );
1279  bRet = true;
1280  }
1281 
1282  if (m_pWrtShell) {
1284  m_xMathBaselineAlignmentCB->get_active() );
1285  bRet |= m_xMathBaselineAlignmentCB->get_state_changed_from_saved();
1286  }
1287 
1288  if( m_xCursorInProtCB->get_state_changed_from_saved())
1289  {
1291  bRet = true;
1292  }
1293 
1294  const SwDocDisplayItem* pOldAttr = static_cast<const SwDocDisplayItem*>(
1296 
1297  SwDocDisplayItem aDisp;
1298 
1299  aDisp.m_bParagraphEnd = m_xParaCB->get_active();
1300  aDisp.m_bTab = m_xTabCB->get_active();
1301  aDisp.m_bSpace = m_xSpacesCB->get_active();
1302  aDisp.m_bNonbreakingSpace = m_xHSpacesCB->get_active();
1303  aDisp.m_bSoftHyphen = m_xSHyphCB->get_active();
1304  aDisp.m_bCharHiddenText = m_xCharHiddenCB->get_active();
1305  aDisp.m_bBookmarks = m_xBookmarkCB->get_active();
1306  aDisp.m_bManualBreak = m_xBreakCB->get_active();
1307 
1308  bRet |= (!pOldAttr || aDisp != *pOldAttr);
1309  if(bRet)
1310  bRet = nullptr != rSet->Put(aDisp);
1311 
1312  return bRet;
1313 }
1314 
1316 {
1317  const SfxPoolItem* pItem = nullptr;
1319  bool bIsOn = false;
1320 
1321  if( SfxItemState::SET == rSet->GetItemState( FN_PARAM_SHADOWCURSOR, false, &pItem ))
1322  {
1323  auto& aOpt = *static_cast<const SwShadowCursorItem*>(pItem);
1324  eMode = aOpt.GetMode();
1325  bIsOn = aOpt.IsOn();
1326  }
1327  m_xOnOffCB->set_active( bIsOn );
1328 
1329  m_xDirectCursorFillMode->set_active( static_cast<int>(eMode) );
1330  if (m_pWrtShell) {
1332  m_xMathBaselineAlignmentCB->save_state();
1333  } else {
1335  }
1336 
1337  if( SfxItemState::SET == rSet->GetItemState( FN_PARAM_CRSR_IN_PROTECTED, false, &pItem ))
1338  m_xCursorInProtCB->set_active(static_cast<const SfxBoolItem*>(pItem)->GetValue());
1339  m_xCursorInProtCB->save_state();
1340 
1341  const SwDocDisplayItem* pDocDisplayAttr = nullptr;
1342 
1343  rSet->GetItemState( FN_PARAM_DOCDISP, false,
1344  reinterpret_cast<const SfxPoolItem**>(&pDocDisplayAttr) );
1345  if(pDocDisplayAttr)
1346  {
1347  m_xParaCB->set_active( pDocDisplayAttr->m_bParagraphEnd );
1348  m_xTabCB->set_active( pDocDisplayAttr->m_bTab );
1349  m_xSpacesCB->set_active( pDocDisplayAttr->m_bSpace );
1350  m_xHSpacesCB->set_active( pDocDisplayAttr->m_bNonbreakingSpace );
1351  m_xSHyphCB->set_active( pDocDisplayAttr->m_bSoftHyphen );
1352  m_xCharHiddenCB->set_active( pDocDisplayAttr->m_bCharHiddenText );
1353  m_xBookmarkCB->set_active(pDocDisplayAttr->m_bBookmarks);
1354  m_xBreakCB->set_active( pDocDisplayAttr->m_bManualBreak );
1355  }
1356 }
1357 
1358 namespace {
1359 
1360 // TabPage for Redlining
1361 struct CharAttr
1362 {
1363  sal_uInt16 nItemId;
1364  sal_uInt16 nAttr;
1365 };
1366 
1367 }
1368 
1369 // Edit corresponds to Paste-attributes
1370 CharAttr const aRedlineAttr[] =
1371 {
1372  { SID_ATTR_CHAR_CASEMAP, sal_uInt16(SvxCaseMap::NotMapped) },
1373  { SID_ATTR_CHAR_WEIGHT, WEIGHT_BOLD },
1374  { SID_ATTR_CHAR_POSTURE, ITALIC_NORMAL },
1375  { SID_ATTR_CHAR_UNDERLINE, LINESTYLE_SINGLE },
1376  { SID_ATTR_CHAR_UNDERLINE, LINESTYLE_DOUBLE },
1377  { SID_ATTR_CHAR_STRIKEOUT, STRIKEOUT_SINGLE },
1378  { SID_ATTR_CHAR_CASEMAP, sal_uInt16(SvxCaseMap::Uppercase) },
1379  { SID_ATTR_CHAR_CASEMAP, sal_uInt16(SvxCaseMap::Lowercase) },
1380  { SID_ATTR_CHAR_CASEMAP, sal_uInt16(SvxCaseMap::SmallCaps) },
1381  { SID_ATTR_CHAR_CASEMAP, sal_uInt16(SvxCaseMap::Capitalize) },
1382  { SID_ATTR_BRUSH, 0 }
1383 };
1384 // Items from aRedlineAttr relevant for InsertAttr: strikethrough is
1385 // not used
1386 static sal_uInt16 aInsertAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
1387 
1388 // Items from aRedlineAttr relevant for DeleteAttr: underline and
1389 // double underline is not used
1390 static sal_uInt16 aDeletedAttrMap[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10 };
1391 
1392 // Items from aRedlineAttr relevant for ChangeAttr: strikethrough is
1393 // not used
1394 static sal_uInt16 aChangedAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
1395 
1396 // Preview of selection
1398  : m_aTransCol(COL_TRANSPARENT)
1399  , m_aMarkCol(COL_LIGHTRED)
1400  , nMarkPos(0)
1401 
1402 {
1403  InitColors();
1404 }
1405 
1407 {
1408 }
1409 
1411 {
1412  // m_aTransCol and m_aMarkCol are _not_ changed because they are set from outside!
1413 
1415  m_aBgCol = rSettings.GetWindowColor();
1416 
1417  bool bHC = rSettings.GetHighContrastMode();
1419  m_aShadowCol = bHC? m_aBgCol : rSettings.GetShadowColor();
1422 }
1423 
1424 void SwMarkPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &/*rRect*/)
1425 {
1426  const Size aSz(GetOutputSizePixel());
1427 
1428  // Page
1429  aPage.SetSize(Size(aSz.Width() - 3, aSz.Height() - 3));
1430 
1431  const long nOutWPix = aPage.GetWidth();
1432  const long nOutHPix = aPage.GetHeight();
1433 
1434  // PrintArea
1435  const long nLBorder = 8;
1436  const long nRBorder = 8;
1437  const long nTBorder = 4;
1438  const long nBBorder = 4;
1439 
1440  aLeftPagePrtArea = tools::Rectangle(Point(nLBorder, nTBorder), Point((nOutWPix - 1) - nRBorder, (nOutHPix - 1) - nBBorder));
1441  const long nWidth = aLeftPagePrtArea.GetWidth();
1442  const long nCorr = (nWidth & 1) != 0 ? 0 : 1;
1443  aLeftPagePrtArea.SetSize(Size(nWidth / 2 - (nLBorder + nRBorder) / 2 + nCorr, aLeftPagePrtArea.GetHeight()));
1444 
1446  aRightPagePrtArea.Move(aLeftPagePrtArea.GetWidth() + nLBorder + nRBorder + 1, 0);
1447 
1448  // draw shadow
1449  tools::Rectangle aShadow(aPage);
1450  aShadow += Point(3, 3);
1451  drawRect(rRenderContext, aShadow, m_aShadowCol, m_aTransCol);
1452 
1453  // draw page
1454  drawRect(rRenderContext, aPage, m_aBgCol, m_aLineCol);
1455 
1456  // draw separator
1457  tools::Rectangle aPageSeparator(aPage);
1458  aPageSeparator.SetSize(Size(2, aPageSeparator.GetHeight()));
1459  aPageSeparator.Move(aPage.GetWidth() / 2 - 1, 0);
1460  drawRect(rRenderContext, aPageSeparator, m_aLineCol, m_aTransCol);
1461 
1462  PaintPage(rRenderContext, aLeftPagePrtArea);
1463  PaintPage(rRenderContext, aRightPagePrtArea);
1464 
1465  tools::Rectangle aLeftMark(Point(aPage.Left() + 2, aLeftPagePrtArea.Top() + 4), Size(aLeftPagePrtArea.Left() - 4, 2));
1467 
1468  switch (nMarkPos)
1469  {
1470  case 1: // left
1471  aRightMark.SetPos(Point(aRightPagePrtArea.Left() - 2 - aRightMark.GetWidth(), aRightMark.Top()));
1472  break;
1473 
1474  case 2: // right
1475  aLeftMark.SetPos(Point(aLeftPagePrtArea.Right() + 2, aLeftMark.Top()));
1476  break;
1477 
1478  case 3: // outside
1479  break;
1480 
1481  case 4: // inside
1482  aLeftMark.SetPos(Point(aLeftPagePrtArea.Right() + 2, aLeftMark.Top()));
1483  aRightMark.SetPos(Point(aRightPagePrtArea.Left() - 2 - aRightMark.GetWidth(), aRightMark.Top()));
1484  break;
1485 
1486  case 0: // none
1487  default:
1488  return;
1489  }
1490  drawRect(rRenderContext, aLeftMark, m_aMarkCol, m_aTransCol);
1491  drawRect(rRenderContext, aRightMark, m_aMarkCol, m_aTransCol);
1492 }
1493 
1495 {
1496  // draw PrintArea
1497  drawRect(rRenderContext, rRect, m_aTransCol, m_aPrintAreaCol);
1498 
1499  // draw Testparagraph
1500 
1501  tools::Rectangle aTextLine = rRect;
1502  aTextLine.SetSize(Size(aTextLine.GetWidth(), 2));
1503  aTextLine.AdjustLeft(4 );
1504  aTextLine.AdjustRight( -4 );
1505  aTextLine.Move(0, 4);
1506 
1507  const long nStep = aTextLine.GetHeight() + 2;
1508  const long nLines = rRect.GetHeight() / (aTextLine.GetHeight() + 2) - 1;
1509 
1510  // simulate text
1511  for (long i = 0; i < nLines; ++i)
1512  {
1513  if (i == (nLines - 1))
1514  aTextLine.SetSize(Size(aTextLine.GetWidth() / 2, aTextLine.GetHeight()));
1515 
1516  if (aPage.IsInside(aTextLine))
1517  drawRect(rRenderContext, aTextLine, m_aTextCol, m_aTransCol);
1518 
1519  aTextLine.Move(0, nStep);
1520  }
1521  aTextLine.Move(0, -nStep);
1522 }
1523 
1525 {
1526  Size aInitialSize = getPreviewOptionsSize(pDrawingArea->get_ref_device());
1527  pDrawingArea->set_size_request(aInitialSize.Width(), aInitialSize.Height());
1529  SetOutputSizePixel(aInitialSize);
1530 }
1531 
1532 namespace
1533 {
1534  void lcl_FillRedlineAttrListBox(
1535  weld::ComboBox& rLB, const AuthorCharAttr& rAttrToSelect,
1536  const sal_uInt16* pAttrMap, const size_t nAttrMapSize)
1537  {
1538  for (size_t i = 0; i != nAttrMapSize; ++i)
1539  {
1540  CharAttr const & rAttr(aRedlineAttr[pAttrMap[i]]);
1541  rLB.set_id(i, OUString::number(reinterpret_cast<sal_Int64>(&rAttr)));
1542  if (rAttr.nItemId == rAttrToSelect.m_nItemId &&
1543  rAttr.nAttr == rAttrToSelect.m_nAttr)
1544  rLB.set_active(i);
1545  }
1546  }
1547 }
1548 
1550  const SfxItemSet& rSet)
1551  : SfxTabPage(pPage, pController, "modules/swriter/ui/optredlinepage.ui", "OptRedLinePage", &rSet)
1552  , m_xInsertLB(m_xBuilder->weld_combo_box("insert"))
1553  , m_xInsertColorLB(new ColorListBox(m_xBuilder->weld_menu_button("insertcolor"), pController->getDialog()))
1554  , m_xInsertedPreviewWN(new SvxFontPrevWindow)
1555  , m_xInsertedPreview(new weld::CustomWeld(*m_xBuilder, "insertedpreview", *m_xInsertedPreviewWN))
1556  , m_xDeletedLB(m_xBuilder->weld_combo_box("deleted"))
1557  , m_xDeletedColorLB(new ColorListBox(m_xBuilder->weld_menu_button("deletedcolor"), pController->getDialog()))
1558  , m_xDeletedPreviewWN(new SvxFontPrevWindow)
1559  , m_xDeletedPreview(new weld::CustomWeld(*m_xBuilder, "deletedpreview", *m_xDeletedPreviewWN))
1560  , m_xChangedLB(m_xBuilder->weld_combo_box("changed"))
1561  , m_xChangedColorLB(new ColorListBox(m_xBuilder->weld_menu_button("changedcolor"), pController->getDialog()))
1562  , m_xChangedPreviewWN(new SvxFontPrevWindow)
1563  , m_xChangedPreview(new weld::CustomWeld(*m_xBuilder, "changedpreview", *m_xChangedPreviewWN))
1564  , m_xMarkPosLB(m_xBuilder->weld_combo_box("markpos"))
1565  , m_xMarkColorLB(new ColorListBox(m_xBuilder->weld_menu_button("markcolor"), pController->getDialog()))
1566  , m_xMarkPreviewWN(new SwMarkPreview)
1567  , m_xMarkPreview(new weld::CustomWeld(*m_xBuilder, "markpreview", *m_xMarkPreviewWN))
1568 {
1569  Size aPreviewSize(getPreviewOptionsSize(m_xMarkPreviewWN->GetDrawingArea()->get_ref_device()));
1570 
1571  m_xInsertColorLB->SetSlotId(SID_AUTHOR_COLOR, true);
1572  m_xDeletedColorLB->SetSlotId(SID_AUTHOR_COLOR, true);
1573  m_xChangedColorLB->SetSlotId(SID_AUTHOR_COLOR, true);
1574 
1575  m_xInsertedPreviewWN->set_size_request(aPreviewSize.Width(), aPreviewSize.Height());
1576  m_xDeletedPreviewWN->set_size_request(aPreviewSize.Width(), aPreviewSize.Height());
1577  m_xChangedPreviewWN->set_size_request(aPreviewSize.Width(), aPreviewSize.Height());
1578  m_xMarkPreviewWN->set_size_request(aPreviewSize.Width(), aPreviewSize.Height());
1579 
1580  for (sal_Int32 i = 0, nEntryCount = m_xInsertLB->get_count(); i < nEntryCount; ++i)
1581  {
1582  const OUString sEntry(m_xInsertLB->get_text(i));
1583  m_xDeletedLB->append_text(sEntry);
1584  m_xChangedLB->append_text(sEntry);
1585  };
1586 
1587  // remove strikethrough from insert and change and underline + double
1588  // underline from delete
1589  m_xInsertLB->remove(5);
1590  m_xChangedLB->remove(5);
1591  m_xDeletedLB->remove(4);
1592  m_xDeletedLB->remove(3);
1593 
1595  m_xInsertLB->connect_changed( aLk );
1596  m_xDeletedLB->connect_changed( aLk );
1597  m_xChangedLB->connect_changed( aLk );
1598 
1599  Link<ColorListBox&,void> aLk2 = LINK(this, SwRedlineOptionsTabPage, ColorHdl);
1600  m_xInsertColorLB->SetSelectHdl( aLk2 );
1601  m_xDeletedColorLB->SetSelectHdl( aLk2 );
1602  m_xChangedColorLB->SetSelectHdl( aLk2 );
1603 
1604  m_xMarkPosLB->connect_changed(LINK(this, SwRedlineOptionsTabPage, ChangedMaskPrevHdl));
1605  m_xMarkColorLB->SetSelectHdl(LINK(this, SwRedlineOptionsTabPage, ChangedMaskColorPrevHdl));
1606 }
1607 
1609 {
1610  m_xInsertColorLB.reset();
1611  m_xInsertedPreview.reset();
1612  m_xInsertedPreviewWN.reset();
1613  m_xDeletedColorLB.reset();
1614  m_xDeletedPreview.reset();
1615  m_xDeletedPreviewWN.reset();
1616  m_xChangedColorLB.reset();
1617  m_xChangedPreview.reset();
1618  m_xChangedPreviewWN.reset();
1619  m_xMarkColorLB.reset();
1620  m_xMarkPreview.reset();
1621  m_xMarkPreviewWN.reset();
1622 }
1623 
1624 std::unique_ptr<SfxTabPage> SwRedlineOptionsTabPage::Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet)
1625 {
1626  return std::make_unique<SwRedlineOptionsTabPage>(pPage, pController, *rSet);
1627 }
1628 
1630 {
1631  CharAttr *pAttr;
1632  SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig();
1633 
1634  AuthorCharAttr aInsertedAttr;
1635  AuthorCharAttr aDeletedAttr;
1636  AuthorCharAttr aChangedAttr;
1637 
1638  AuthorCharAttr aOldInsertAttr(pOpt->GetInsertAuthorAttr());
1639  AuthorCharAttr aOldDeletedAttr(pOpt->GetDeletedAuthorAttr());
1640  AuthorCharAttr aOldChangedAttr(pOpt->GetFormatAuthorAttr());
1641 
1642  Color nOldMarkColor = pOpt->GetMarkAlignColor();
1643  sal_uInt16 nOldMarkMode = pOpt->GetMarkAlignMode();
1644 
1645  sal_Int32 nPos = m_xInsertLB->get_active();
1646  if (nPos != -1)
1647  {
1648  pAttr = reinterpret_cast<CharAttr*>(m_xInsertLB->get_id(nPos).toInt64());
1649  aInsertedAttr.m_nItemId = pAttr->nItemId;
1650  aInsertedAttr.m_nAttr = pAttr->nAttr;
1651  aInsertedAttr.m_nColor = m_xInsertColorLB->GetSelectEntryColor();
1652  pOpt->SetInsertAuthorAttr(aInsertedAttr);
1653  }
1654 
1655  nPos = m_xDeletedLB->get_active();
1656  if (nPos != -1)
1657  {
1658  pAttr = reinterpret_cast<CharAttr*>(m_xDeletedLB->get_id(nPos).toInt64());
1659  aDeletedAttr.m_nItemId = pAttr->nItemId;
1660  aDeletedAttr.m_nAttr = pAttr->nAttr;
1661  aDeletedAttr.m_nColor = m_xDeletedColorLB->GetSelectEntryColor();
1662  pOpt->SetDeletedAuthorAttr(aDeletedAttr);
1663  }
1664 
1665  nPos = m_xChangedLB->get_active();
1666  if (nPos != -1)
1667  {
1668  pAttr = reinterpret_cast<CharAttr*>(m_xChangedLB->get_id(nPos).toInt64());
1669  aChangedAttr.m_nItemId = pAttr->nItemId;
1670  aChangedAttr.m_nAttr = pAttr->nAttr;
1671  aChangedAttr.m_nColor = m_xChangedColorLB->GetSelectEntryColor();
1672  pOpt->SetFormatAuthorAttr(aChangedAttr);
1673  }
1674 
1675  nPos = 0;
1676  switch (m_xMarkPosLB->get_active())
1677  {
1678  case 0: nPos = text::HoriOrientation::NONE; break;
1679  case 1: nPos = text::HoriOrientation::LEFT; break;
1680  case 2: nPos = text::HoriOrientation::RIGHT; break;
1681  case 3: nPos = text::HoriOrientation::OUTSIDE; break;
1682  case 4: nPos = text::HoriOrientation::INSIDE; break;
1683  }
1684  pOpt->SetMarkAlignMode(nPos);
1685  pOpt->SetMarkAlignColor(m_xMarkColorLB->GetSelectEntryColor());
1686 
1687  if (!(aInsertedAttr == aOldInsertAttr) ||
1688  !(aDeletedAttr == aOldDeletedAttr) ||
1689  !(aChangedAttr == aOldChangedAttr) ||
1690  nOldMarkColor != pOpt->GetMarkAlignColor() ||
1691  nOldMarkMode != pOpt->GetMarkAlignMode() )
1692  {
1693  // update all documents
1694  SwDocShell* pDocShell = static_cast<SwDocShell*>(SfxObjectShell::GetFirst(checkSfxObjectShell<SwDocShell>));
1695 
1696  while( pDocShell )
1697  {
1698  pDocShell->GetWrtShell()->UpdateRedlineAttr();
1699  pDocShell = static_cast<SwDocShell*>(SfxObjectShell::GetNext(*pDocShell, checkSfxObjectShell<SwDocShell>));
1700  }
1701  }
1702 
1703  return false;
1704 }
1705 
1707 {
1708  const SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig();
1709 
1710  const AuthorCharAttr &rInsertAttr = pOpt->GetInsertAuthorAttr();
1711  const AuthorCharAttr &rDeletedAttr = pOpt->GetDeletedAuthorAttr();
1712  const AuthorCharAttr &rChangedAttr = pOpt->GetFormatAuthorAttr();
1713 
1714  // initialise preview
1715  InitFontStyle(*m_xInsertedPreviewWN, SwResId(STR_OPT_PREVIEW_INSERTED));
1716  InitFontStyle(*m_xDeletedPreviewWN, SwResId(STR_OPT_PREVIEW_DELETED));
1717  InitFontStyle(*m_xChangedPreviewWN, SwResId(STR_OPT_PREVIEW_CHANGED));
1718 
1719  Color nColor = rInsertAttr.m_nColor;
1720  m_xInsertColorLB->SelectEntry(nColor);
1721 
1722  nColor = rDeletedAttr.m_nColor;
1723  m_xDeletedColorLB->SelectEntry(nColor);
1724 
1725  nColor = rChangedAttr.m_nColor;
1726  m_xChangedColorLB->SelectEntry(nColor);
1727 
1728  m_xMarkColorLB->SelectEntry(pOpt->GetMarkAlignColor());
1729 
1730  m_xInsertLB->set_active(0);
1731  m_xDeletedLB->set_active(0);
1732  m_xChangedLB->set_active(0);
1733 
1734  lcl_FillRedlineAttrListBox(*m_xInsertLB, rInsertAttr, aInsertAttrMap, SAL_N_ELEMENTS(aInsertAttrMap));
1735  lcl_FillRedlineAttrListBox(*m_xDeletedLB, rDeletedAttr, aDeletedAttrMap, SAL_N_ELEMENTS(aDeletedAttrMap));
1736  lcl_FillRedlineAttrListBox(*m_xChangedLB, rChangedAttr, aChangedAttrMap, SAL_N_ELEMENTS(aChangedAttrMap));
1737 
1738  sal_Int32 nPos = 0;
1739  switch (pOpt->GetMarkAlignMode())
1740  {
1741  case text::HoriOrientation::NONE: nPos = 0; break;
1742  case text::HoriOrientation::LEFT: nPos = 1; break;
1743  case text::HoriOrientation::RIGHT: nPos = 2; break;
1744  case text::HoriOrientation::OUTSIDE: nPos = 3; break;
1745  case text::HoriOrientation::INSIDE: nPos = 4; break;
1746  }
1747  m_xMarkPosLB->set_active(nPos);
1748 
1749  // show settings in preview
1750  AttribHdl(*m_xInsertLB);
1751  ColorHdl(*m_xInsertColorLB);
1752  AttribHdl(*m_xDeletedLB);
1753  ColorHdl(*m_xInsertColorLB);
1754  AttribHdl(*m_xChangedLB);
1755  ColorHdl(*m_xChangedColorLB);
1756 
1757  ChangedMaskPrev();
1758 }
1759 
1761 {
1762  SvxFontPrevWindow *pPrev = nullptr;
1763  ColorListBox *pColorLB;
1764 
1765  if (&rLB == m_xInsertLB.get())
1766  {
1767  pColorLB = m_xInsertColorLB.get();
1768  pPrev = m_xInsertedPreviewWN.get();
1769  }
1770  else if (&rLB == m_xDeletedLB.get())
1771  {
1772  pColorLB = m_xDeletedColorLB.get();
1773  pPrev = m_xDeletedPreviewWN.get();
1774  }
1775  else
1776  {
1777  pColorLB = m_xChangedColorLB.get();
1778  pPrev = m_xChangedPreviewWN.get();
1779  }
1780 
1781  SvxFont& rFont = pPrev->GetFont();
1782  SvxFont& rCJKFont = pPrev->GetCJKFont();
1783 
1784  rFont.SetWeight(WEIGHT_NORMAL);
1785  rCJKFont.SetWeight(WEIGHT_NORMAL);
1786  rFont.SetItalic(ITALIC_NONE);
1787  rCJKFont.SetItalic(ITALIC_NONE);
1788  rFont.SetUnderline(LINESTYLE_NONE);
1789  rCJKFont.SetUnderline(LINESTYLE_NONE);
1790  rFont.SetStrikeout(STRIKEOUT_NONE);
1791  rCJKFont.SetStrikeout(STRIKEOUT_NONE);
1792  rFont.SetCaseMap(SvxCaseMap::NotMapped);
1793  rCJKFont.SetCaseMap(SvxCaseMap::NotMapped);
1794 
1795  Color aColor = pColorLB->GetSelectEntryColor();
1796 
1797  if (aColor == COL_NONE_COLOR)
1798  {
1799  rFont.SetColor( COL_BLACK );
1800  rCJKFont.SetColor( COL_BLACK );
1801  }
1802  else if (aColor == COL_TRANSPARENT)
1803  {
1804  rFont.SetColor( COL_RED );
1805  rCJKFont.SetColor( COL_RED );
1806  }
1807  else
1808  {
1809  rFont.SetColor(aColor);
1810  rCJKFont.SetColor(aColor);
1811  }
1812 
1813  sal_Int32 nPos = rLB.get_active();
1814  if( nPos == -1)
1815  nPos = 0;
1816 
1817  CharAttr* pAttr = reinterpret_cast<CharAttr*>(rLB.get_id(nPos).toInt64());
1818  //switch off preview background color
1819  pPrev->ResetColor();
1820  switch (pAttr->nItemId)
1821  {
1822  case SID_ATTR_CHAR_WEIGHT:
1823  rFont.SetWeight( static_cast<FontWeight>(pAttr->nAttr) );
1824  rCJKFont.SetWeight( static_cast<FontWeight>(pAttr->nAttr) );
1825  break;
1826 
1827  case SID_ATTR_CHAR_POSTURE:
1828  rFont.SetItalic( static_cast<FontItalic>(pAttr->nAttr) );
1829  rCJKFont.SetItalic( static_cast<FontItalic>(pAttr->nAttr) );
1830  break;
1831 
1832  case SID_ATTR_CHAR_UNDERLINE:
1833  rFont.SetUnderline( static_cast<FontLineStyle>(pAttr->nAttr) );
1834  rCJKFont.SetUnderline( static_cast<FontLineStyle>(pAttr->nAttr) );
1835  break;
1836 
1837  case SID_ATTR_CHAR_STRIKEOUT:
1838  rFont.SetStrikeout( static_cast<FontStrikeout>(pAttr->nAttr) );
1839  rCJKFont.SetStrikeout( static_cast<FontStrikeout>(pAttr->nAttr) );
1840  break;
1841 
1842  case SID_ATTR_CHAR_CASEMAP:
1843  rFont.SetCaseMap( static_cast<SvxCaseMap>(pAttr->nAttr) );
1844  rCJKFont.SetCaseMap( static_cast<SvxCaseMap>(pAttr->nAttr) );
1845  break;
1846 
1847  case SID_ATTR_BRUSH:
1848  {
1849  Color aBgColor = pColorLB->GetSelectEntryColor();
1850  if (aBgColor != COL_NONE_COLOR)
1851  pPrev->SetColor(aBgColor);
1852  else
1853  pPrev->SetColor(COL_LIGHTGRAY);
1854  rFont.SetColor( COL_BLACK );
1855  rCJKFont.SetColor( COL_BLACK );
1856  }
1857  break;
1858  }
1859 
1860  pPrev->Invalidate();
1861 }
1862 
1863 IMPL_LINK(SwRedlineOptionsTabPage, ColorHdl, ColorListBox&, rListBox, void)
1864 {
1865  ColorListBox* pColorLB = &rListBox;
1866  SvxFontPrevWindow *pPrev = nullptr;
1867  weld::ComboBox* pLB;
1868 
1869  if (pColorLB == m_xInsertColorLB.get())
1870  {
1871  pLB = m_xInsertLB.get();
1872  pPrev = m_xInsertedPreviewWN.get();
1873  }
1874  else if (pColorLB == m_xDeletedColorLB.get())
1875  {
1876  pLB = m_xDeletedLB.get();
1877  pPrev = m_xDeletedPreviewWN.get();
1878  }
1879  else
1880  {
1881  pLB = m_xChangedLB.get();
1882  pPrev = m_xChangedPreviewWN.get();
1883  }
1884 
1885  SvxFont& rFont = pPrev->GetFont();
1886  SvxFont& rCJKFont = pPrev->GetCJKFont();
1887  sal_Int32 nPos = pLB->get_active();
1888  if( nPos == -1)
1889  nPos = 0;
1890 
1891  CharAttr* pAttr = reinterpret_cast<CharAttr*>(pLB->get_id(nPos).toInt64());
1892 
1893  if( pAttr->nItemId == SID_ATTR_BRUSH )
1894  {
1895  rFont.SetColor( COL_BLACK );
1896  rCJKFont.SetColor( COL_BLACK );
1897 
1898  Color aBgColor = pColorLB->GetSelectEntryColor();
1899  if (aBgColor != COL_NONE_COLOR)
1900  pPrev->SetColor(aBgColor);
1901  else
1902  pPrev->SetColor(COL_LIGHTGRAY);
1903  }
1904  else
1905  {
1906  Color aColor = pColorLB->GetSelectEntryColor();
1907 
1908  if (aColor == COL_NONE_COLOR)
1909  {
1910  rFont.SetColor( COL_BLACK );
1911  rCJKFont.SetColor( COL_BLACK );
1912  }
1913  else if (aColor == COL_TRANSPARENT)
1914  {
1915  rFont.SetColor( COL_RED );
1916  rCJKFont.SetColor( COL_RED );
1917  }
1918  else
1919  {
1920  rFont.SetColor(aColor);
1921  rCJKFont.SetColor(aColor);
1922  }
1923  }
1924 
1925  pPrev->Invalidate();
1926 }
1927 
1929 {
1930  m_xMarkPreviewWN->SetMarkPos(m_xMarkPosLB->get_active());
1931  m_xMarkPreviewWN->SetColor(m_xMarkColorLB->GetSelectEntryColor());
1932 
1933  m_xMarkPreviewWN->Invalidate();
1934 }
1935 
1937 {
1938  ChangedMaskPrev();
1939 }
1940 
1941 IMPL_LINK_NOARG(SwRedlineOptionsTabPage, ChangedMaskColorPrevHdl, ColorListBox&, void)
1942 {
1943  ChangedMaskPrev();
1944 }
1945 
1946 void SwRedlineOptionsTabPage::InitFontStyle(SvxFontPrevWindow& rExampleWin, const OUString& rText)
1947 {
1948  const AllSettings& rAllSettings = Application::GetSettings();
1949  LanguageType eLangType = rAllSettings.GetUILanguageTag().getLanguageType();
1950  Color aBackCol( rAllSettings.GetStyleSettings().GetWindowColor() );
1951  SvxFont& rFont = rExampleWin.GetFont();
1952  SvxFont& rCJKFont = rExampleWin.GetCJKFont();
1953  SvxFont& rCTLFont = rExampleWin.GetCTLFont();
1954 
1955  OutputDevice& rDevice = rExampleWin.GetDrawingArea()->get_ref_device();
1956 
1957  vcl::Font aFont( OutputDevice::GetDefaultFont( DefaultFontType::SERIF, eLangType,
1958  GetDefaultFontFlags::OnlyOne, &rDevice ) );
1959  vcl::Font aCJKFont( OutputDevice::GetDefaultFont( DefaultFontType::CJK_TEXT, eLangType,
1960  GetDefaultFontFlags::OnlyOne, &rDevice ) );
1961  vcl::Font aCTLFont( OutputDevice::GetDefaultFont( DefaultFontType::CTL_TEXT, eLangType,
1962  GetDefaultFontFlags::OnlyOne, &rDevice ) );
1963  const Size aDefSize( 0, 12 );
1964  aFont.SetFontSize( aDefSize );
1965  aCJKFont.SetFontSize( aDefSize );
1966  aCTLFont.SetFontSize( aDefSize );
1967 
1968  aFont.SetFillColor( aBackCol );
1969  aCJKFont.SetFillColor( aBackCol );
1970  aCTLFont.SetFillColor( aBackCol );
1971 
1972  aFont.SetWeight( WEIGHT_NORMAL );
1973  aCJKFont.SetWeight( WEIGHT_NORMAL );
1974  aCTLFont.SetWeight( WEIGHT_NORMAL );
1975 
1976  rFont = aFont;
1977  rCJKFont = aCJKFont;
1978  rCTLFont = aCTLFont;
1979 
1980  const Size aNewSize( 0, rExampleWin.GetOutputSizePixel().Height() * 2 / 3 );
1981  rFont.SetFontSize( aNewSize );
1982  rCJKFont.SetFontSize( aNewSize );
1983 
1984  rExampleWin.SetFont( rFont, rCJKFont,rCTLFont );
1985  rExampleWin.SetPreviewText(rText);
1986 
1987  rExampleWin.SetBackColor(aBackCol);
1988 }
1989 
1991  : SfxTabPage(pPage, pController, "modules/swriter/ui/optcomparison.ui", "OptComparison", &rSet)
1992  , m_xAutoRB(m_xBuilder->weld_radio_button("auto"))
1993  , m_xWordRB(m_xBuilder->weld_radio_button("byword"))
1994  , m_xCharRB(m_xBuilder->weld_radio_button("bycharacter"))
1995  , m_xRsidCB(m_xBuilder->weld_check_button("useRSID"))
1996  , m_xIgnoreCB(m_xBuilder->weld_check_button("ignore"))
1997  , m_xLenNF(m_xBuilder->weld_spin_button("ignorelen"))
1998  , m_xStoreRsidCB(m_xBuilder->weld_check_button("storeRSID"))
1999 {
2000  Link<weld::Button&,void> aLnk( LINK( this, SwCompareOptionsTabPage, ComparisonHdl ) );
2001  m_xAutoRB->connect_clicked( aLnk );
2002  m_xWordRB->connect_clicked( aLnk );
2003  m_xCharRB->connect_clicked( aLnk );
2004 
2005  m_xIgnoreCB->connect_clicked( LINK( this, SwCompareOptionsTabPage, IgnoreHdl) );
2006 }
2007 
2009 {
2010 }
2011 
2012 std::unique_ptr<SfxTabPage> SwCompareOptionsTabPage::Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet )
2013 {
2014  return std::make_unique<SwCompareOptionsTabPage>(pPage, pController, *rAttrSet);
2015 }
2016 
2018 {
2019  bool bRet = false;
2020  SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig();
2021 
2022  if( m_xAutoRB->get_state_changed_from_saved() ||
2023  m_xWordRB->get_state_changed_from_saved() ||
2024  m_xCharRB->get_state_changed_from_saved() )
2025  {
2027 
2028  if ( m_xAutoRB->get_active() ) eCmpMode = SwCompareMode::Auto;
2029  if ( m_xWordRB->get_active() ) eCmpMode = SwCompareMode::ByWord;
2030  if ( m_xCharRB->get_active() ) eCmpMode = SwCompareMode::ByChar;
2031 
2032  pOpt->SetCompareMode( eCmpMode );
2033  bRet = true;
2034  }
2035 
2036  if( m_xRsidCB->get_state_changed_from_saved() )
2037  {
2038  pOpt->SetUseRsid( m_xRsidCB->get_active() );
2039  bRet = true;
2040  }
2041 
2042  if( m_xIgnoreCB->get_state_changed_from_saved() )
2043  {
2044  pOpt->SetIgnorePieces( m_xIgnoreCB->get_active() );
2045  bRet = true;
2046  }
2047 
2048  if( m_xLenNF->get_value_changed_from_saved() )
2049  {
2050  pOpt->SetPieceLen( m_xLenNF->get_value() );
2051  bRet = true;
2052  }
2053 
2054  if (m_xStoreRsidCB->get_state_changed_from_saved())
2055  {
2056  pOpt->SetStoreRsid(m_xStoreRsidCB->get_active());
2057  bRet = true;
2058  }
2059 
2060  return bRet;
2061 }
2062 
2064 {
2065  SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig();
2066 
2067  SwCompareMode eCmpMode = pOpt->GetCompareMode();
2068  if( eCmpMode == SwCompareMode::Auto )
2069  {
2070  m_xAutoRB->set_active(true);
2071  m_xRsidCB->set_sensitive(false);
2072  m_xIgnoreCB->set_sensitive(false);
2073  m_xLenNF->set_sensitive(false);
2074  }
2075  else if( eCmpMode == SwCompareMode::ByWord )
2076  {
2077  m_xWordRB->set_active(true);
2078  m_xRsidCB->set_sensitive(true);
2079  m_xIgnoreCB->set_sensitive(true);
2080  m_xLenNF->set_sensitive(true);
2081  }
2082  else if( eCmpMode == SwCompareMode::ByChar)
2083  {
2084  m_xCharRB->set_active(true);
2085  m_xRsidCB->set_sensitive(true);
2086  m_xIgnoreCB->set_sensitive(true);
2087  m_xLenNF->set_sensitive(true);
2088  }
2089  m_xAutoRB->save_state();
2090  m_xWordRB->save_state();
2091  m_xCharRB->save_state();
2092 
2093  m_xRsidCB->set_active( pOpt->IsUseRsid() );
2094  m_xRsidCB->save_state();
2095 
2096  m_xIgnoreCB->set_active( pOpt->IsIgnorePieces() );
2097  m_xIgnoreCB->save_state();
2098 
2099  m_xLenNF->set_sensitive( m_xIgnoreCB->get_active() && eCmpMode != SwCompareMode::Auto );
2100 
2101  m_xLenNF->set_value( pOpt->GetPieceLen() );
2102  m_xLenNF->save_value();
2103 
2104  m_xStoreRsidCB->set_active(pOpt->IsStoreRsid());
2105  m_xStoreRsidCB->save_state();
2106 }
2107 
2109 {
2110  bool bChecked = !m_xAutoRB->get_active();
2111  m_xRsidCB->set_sensitive( bChecked );
2112  m_xIgnoreCB->set_sensitive( bChecked );
2113  m_xLenNF->set_sensitive( bChecked && m_xIgnoreCB->get_active() );
2114 }
2115 
2117 {
2118  m_xLenNF->set_sensitive(m_xIgnoreCB->get_active());
2119 }
2120 
2121 #ifdef DBG_UTIL
2122 
2124  : SfxTabPage(pPage, pController, "modules/swriter/ui/opttestpage.ui", "OptTestPage", &rCoreSet)
2125  , bAttrModified( false )
2126  , m_xTest1CBox(m_xBuilder->weld_check_button("unused"))
2127  , m_xTest2CBox(m_xBuilder->weld_check_button("dynamic"))
2128  , m_xTest3CBox(m_xBuilder->weld_check_button("nocalm"))
2129  , m_xTest4CBox(m_xBuilder->weld_check_button("wysiwygdbg"))
2130  , m_xTest5CBox(m_xBuilder->weld_check_button("noidle"))
2131  , m_xTest6CBox(m_xBuilder->weld_check_button("noscreenadj"))
2132  , m_xTest7CBox(m_xBuilder->weld_check_button("winformat"))
2133  , m_xTest8CBox(m_xBuilder->weld_check_button("noscroll"))
2134  , m_xTest9CBox(m_xBuilder->weld_check_button("DrawingLayerNotLoading"))
2135  , m_xTest10CBox(m_xBuilder->weld_check_button("AutoFormatByInput"))
2136 {
2137  Init();
2138 }
2139 
2141 {
2142 }
2143 
2144 std::unique_ptr<SfxTabPage> SwTestTabPage::Create( weld::Container* pPage, weld::DialogController* pController,
2145  const SfxItemSet* rAttrSet )
2146 {
2147  return std::make_unique<SwTestTabPage>(pPage, pController, *rAttrSet);
2148 }
2149 
2151 {
2152 
2153  if ( bAttrModified )
2154  {
2155  SwTestItem aTestItem;
2156  aTestItem.m_bTest1=m_xTest1CBox->get_active();
2157  aTestItem.m_bTest2=m_xTest2CBox->get_active();
2158  aTestItem.m_bTest3=m_xTest3CBox->get_active();
2159  aTestItem.m_bTest4=m_xTest4CBox->get_active();
2160  aTestItem.m_bTest5=m_xTest5CBox->get_active();
2161  aTestItem.m_bTest6=m_xTest6CBox->get_active();
2162  aTestItem.m_bTest7=m_xTest7CBox->get_active();
2163  aTestItem.m_bTest8=m_xTest8CBox->get_active();
2164  aTestItem.m_bTest9=m_xTest9CBox->get_active();
2165  aTestItem.m_bTest10=m_xTest10CBox->get_active();
2166  rCoreSet->Put(aTestItem);
2167  }
2168  return bAttrModified;
2169 }
2170 
2172 {
2173  const SfxItemSet& rSet = GetItemSet();
2174  const SwTestItem* pTestAttr = nullptr;
2175 
2176  if( SfxItemState::SET != rSet.GetItemState( FN_PARAM_SWTEST , false,
2177  reinterpret_cast<const SfxPoolItem**>(&pTestAttr) ))
2178  return;
2179 
2180  m_xTest1CBox->set_active(pTestAttr->m_bTest1);
2181  m_xTest2CBox->set_active(pTestAttr->m_bTest2);
2182  m_xTest3CBox->set_active(pTestAttr->m_bTest3);
2183  m_xTest4CBox->set_active(pTestAttr->m_bTest4);
2184  m_xTest5CBox->set_active(pTestAttr->m_bTest5);
2185  m_xTest6CBox->set_active(pTestAttr->m_bTest6);
2186  m_xTest7CBox->set_active(pTestAttr->m_bTest7);
2187  m_xTest8CBox->set_active(pTestAttr->m_bTest8);
2188  m_xTest9CBox->set_active(pTestAttr->m_bTest9);
2189  m_xTest10CBox->set_active(pTestAttr->m_bTest10);
2190 }
2191 
2193 {
2194  // handler
2195  Link<weld::Button&,void> aLk = LINK( this, SwTestTabPage, AutoClickHdl );
2196  m_xTest1CBox->connect_clicked( aLk );
2197  m_xTest2CBox->connect_clicked( aLk );
2198  m_xTest3CBox->connect_clicked( aLk );
2199  m_xTest4CBox->connect_clicked( aLk );
2200  m_xTest5CBox->connect_clicked( aLk );
2201  m_xTest6CBox->connect_clicked( aLk );
2202  m_xTest7CBox->connect_clicked( aLk );
2203  m_xTest8CBox->connect_clicked( aLk );
2204  m_xTest9CBox->connect_clicked( aLk );
2205  m_xTest10CBox->connect_clicked( aLk );
2206 }
2207 
2209 {
2210  bAttrModified = true;
2211 }
2212 
2213 #endif
2214 
2215 /* 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
bool IsExperimentalMode() const
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
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:384
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:292
SvxFont & GetCTLFont()
void UpdateRedlineAttr()
Redline attributes have been changed. Updated views.
Definition: edredln.cxx:126
sal_uInt16 GetTableVMove() const
Definition: modcfg.hxx:233
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:144
#define FONT_STANDARD
Definition: fontcfg.hxx:27
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
const OUString & GetFamilyName() const
std::unique_ptr< ColorListBox > m_xInsertColorLB
Definition: optpage.hxx:290
#define FONT_OUTLINE
Definition: fontcfg.hxx:28
Color m_aMarkCol
Definition: optpage.hxx:261
bool m_bDrawing
Definition: cfgitems.hxx:77
bool m_bTest7
Definition: cfgitems.hxx:147
std::unique_ptr< weld::CheckButton > m_xNumAlignmentCB
Definition: optpage.hxx:191
virtual void Reset(const SfxItemSet *rSet) override
Definition: optpage.cxx:1315
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:1549
void InitColors()
Definition: optpage.cxx:1410
std::unique_ptr< weld::CheckButton > m_xPostItCB
Definition: optpage.hxx:48
#define FN_SHOW_OUTLINECONTENTVISIBILITYBUTTON
Definition: cmdid.h:189
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:762
void SetFontCaption(const OUString &rSet, sal_uInt8 nFontGroup)
Definition: fontcfg.hxx:97
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optpage.cxx:2017
std::unique_ptr< weld::CheckButton > m_xTest3CBox
Definition: optpage.hxx:347
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:2123
std::unique_ptr< weld::CheckButton > m_xTest4CBox
Definition: optpage.hxx:348
long AdjustLeft(long nHorzMoveDelta)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optpage.cxx:1624
SwWrtShell * m_pWrtShell
Definition: optpage.hxx:221
CharAttr const aRedlineAttr[]
Definition: optpage.cxx:1370
void disposeAndClear()
void SetFontList(const OUString &rSet, sal_uInt8 nFontGroup)
Definition: fontcfg.hxx:95
bool IsIgnorePieces() const
Definition: modcfg.hxx:388
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
SwStdFontConfig * m_pFontConfig
Definition: optpage.hxx:128
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
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:2012
SvxFont & GetCJKFont()
SwInsertTableFlags mnInsMode
Definition: itabenum.hxx:40
OUString m_sShellLabel
Definition: optpage.hxx:123
const SvxFontItem & GetFont(bool=true) const
Definition: charatr.hxx:123
SwWrtShell * GetActiveWrtShell()
Definition: swmodul1.cxx:108
std::unique_ptr< weld::CheckButton > m_xTest1CBox
Definition: optpage.hxx:345
sal_uInt16 GetValue() const
bool m_bNotes
Definition: cfgitems.hxx:78
bool m_bPrintSingleJobs
Definition: printdata.hxx:58
void SetWeight(FontWeight)
std::unique_ptr< weld::CheckButton > m_xLeftPageCB
Definition: optpage.hxx:86
std::unique_ptr< weld::CheckButton > m_xShowOutlineContentVisibilityButton
Definition: optpage.hxx:56
#define FONT_LIST
Definition: fontcfg.hxx:29
std::unique_ptr< weld::Frame > m_xSettingsFrame
Definition: optpage.hxx:50
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:369
sal_uInt16 GetTableHMove() const
Definition: modcfg.hxx:229
void SetOn(bool bFlag)
Definition: cfgitems.hxx:130
bool m_bCharHiddenText
Definition: cfgitems.hxx:51
#define FN_HSCROLL_METRIC
Definition: cmdid.h:178
constexpr::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
bool m_bDisposePrinter
Definition: optpage.hxx:139
#define FN_PARAM_SHADOWCURSOR
Definition: cmdid.h:800
void SetModified()
Definition: edws.cxx:70
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:1424
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:264
#define FN_PARAM_ADDPRINTER
Definition: cmdid.h:760
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:299
std::unique_ptr< SvxFontPrevWindow > m_xChangedPreviewWN
Definition: optpage.hxx:301
const AuthorCharAttr & GetInsertAuthorAttr() const
Definition: modcfg.hxx:245
void SetInsTableFormatNum(bool bHTML, bool b)
Definition: modcfg.hxx:284
std::unique_ptr< weld::CheckButton > m_xDontSplitCB
Definition: optpage.hxx:186
std::unique_ptr< weld::Label > m_xBookmarkLabel
Definition: optpage.hxx:233
void EndAllAction()
Definition: edws.cxx:97
virtual ~SwRedlineOptionsTabPage() override
Definition: optpage.cxx:1608
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:238
sal_uInt16 m_nAttr
Definition: authratr.hxx:30
sal_uInt16 mnRowsToRepeat
Definition: itabenum.hxx:41
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
const SvxFontItem & GetCJKFont(bool=true) const
Definition: charatr.hxx:125
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:343
Size const & GetOutputSizePixel() const
FontFamily GetFamilyType()
bool IsInsTableAlignNum(bool bHTML) const
Definition: modcfg.hxx:296
bool m_bSetIdxDefault
Definition: optpage.hxx:138
SwInsertTableFlags
Definition: itabenum.hxx:25
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optpage.cxx:2150
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:242
std::unique_ptr< weld::ComboBox > m_xDeletedLB
Definition: optpage.hxx:294
void Move(long nHorzMoveDelta, long nVertMoveDelta)
const Color & GetMarkAlignColor() const
Definition: modcfg.hxx:261
#define FN_VSCROLL_METRIC
Definition: cmdid.h:179
#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:306
#define FN_PARAM_DOCDISP
Definition: cmdid.h:761
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
long Right() const
tools::Rectangle aRightPagePrtArea
Definition: optpage.hxx:269
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:289
static sal_uInt16 aDeletedAttrMap[]
Definition: optpage.cxx:1390
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:221
std::unique_ptr< SvxFontPrevWindow > m_xDeletedPreviewWN
Definition: optpage.hxx:296
Item for settings dialog, ShadowCursorPage.
Definition: cfgitems.hxx:113
Color m_aShadowCol
Definition: optpage.hxx:263
std::unique_ptr< weld::CheckButton > m_xBookmarkCB
Definition: optpage.hxx:232
void SetFont(const SvxFont &rNormalFont, const SvxFont &rCJKFont, const SvxFont &rCTLFont)
void SetDeletedAuthorAttr(AuthorCharAttr const &rAttr)
Definition: modcfg.hxx:250
bool m_bPrintProspect
Definition: printdata.hxx:58
void SetPieceLen(sal_uInt16 nLen)
Definition: modcfg.hxx:393
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:271
#define FONT_PER_GROUP
Definition: fontcfg.hxx:44
bool m_bShowHiddenPara
Definition: cfgitems.hxx:82
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optpage.cxx:359
std::unique_ptr< weld::CustomWeld > m_xChangedPreview
Definition: optpage.hxx:302
Mode eMode
SwFillMode
Definition: crstate.hxx:28
SwDoc * GetDoc() const
Definition: viewsh.hxx:282
long Top() const
Size getPreviewOptionsSize(const OutputDevice &rReference)
static OUString GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang)
Definition: fontcfg.cxx:216
SvxFont & GetFont()
void SetInsTableAlignNum(bool bHTML, bool b)
Definition: modcfg.hxx:298
virtual OutputDevice & get_ref_device()=0
void SetFormatAuthorAttr(AuthorCharAttr const &rAttr)
Definition: modcfg.hxx:254
std::unique_ptr< FontSizeBox > m_xListHeightLB
Definition: optpage.hxx:157
#define FN_PARAM_PRINTER
Definition: cmdid.h:788
std::unique_ptr< weld::CheckButton > m_xCursorInProtCB
Definition: optpage.hxx:240
STRIKEOUT_SINGLE
const AuthorCharAttr & GetFormatAuthorAttr() const
Definition: modcfg.hxx:253
bool m_bPrintPageBackground
Definition: printdata.hxx:58
virtual void Reset(const SfxItemSet *rSet) override
Definition: optpage.cxx:1706
#define FN_PARAM_CRSR_IN_PROTECTED
Definition: cmdid.h:804
void SetCompareMode(SwCompareMode eMode)
Definition: modcfg.hxx:381
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:71
SwCompareOptionsTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optpage.cxx:1990
void SetFax(const std::vector< OUString > &)
Definition: optpage.cxx:458
bool m_bTest8
Definition: cfgitems.hxx:148
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:2585
std::unique_ptr< weld::CheckButton > m_xTest7CBox
Definition: optpage.hxx:351
void SetLineColor()
bool m_bTable
Definition: cfgitems.hxx:75
std::unique_ptr< weld::ComboBox > m_xMarkPosLB
Definition: optpage.hxx:304
void clear()
SwFillMode GetMode() const
Definition: cfgitems.hxx:126
std::unique_ptr< weld::MetricSpinButton > m_xRowInsertMF
Definition: optpage.hxx:196
tools::Rectangle aLeftPagePrtArea
Definition: optpage.hxx:268
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: optpage.cxx:473
#define SW_MOD()
Definition: swmodule.hxx:255
bool m_bVertRuler
Definition: cfgitems.hxx:69
#define COL_NONE_COLOR
std::unique_ptr< weld::CheckButton > m_xShowInlineTooltips
Definition: optpage.hxx:55
FontPitch GetPitch()
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
void SetIgnorePieces(bool b)
Definition: modcfg.hxx:389
std::unique_ptr< weld::CheckButton > m_xTabCB
Definition: optpage.hxx:228
SfxDispatcher * GetDispatcher() const
bool IsInsTableFormatNum(bool bHTML) const
Definition: modcfg.hxx:282
bool m_bPrintLeftPages
Definition: printdata.hxx:58
int i
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:146
bool IsStoreRsid() const
Definition: modcfg.hxx:396
std::unique_ptr< weld::RadioButton > m_xEndRB
Definition: optpage.hxx:94
OUString m_sScriptAsian
Definition: optpage.hxx:148
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:791
std::unique_ptr< weld::CheckButton > m_xPrintEmptyPagesCB
Definition: optpage.hxx:98
void SetInsTableFlags(bool bHTML, const SwInsertTableOptions &rOpts)
Definition: modcfg.hxx:305
HTMLMODE_ON
std::unique_ptr< weld::RadioButton > m_xInMarginsRB
Definition: optpage.hxx:96
std::unique_ptr< weld::ComboBox > m_xDirectCursorFillMode
Definition: optpage.hxx:238
bool m_bPrintDraw
Definition: printdata.hxx:58
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optpage.cxx:1265
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:363
long Bottom() const
#define FN_PARAM_STDFONTS
Definition: cmdid.h:789
Color m_aLineCol
Definition: optpage.hxx:262
bool m_bSetLabelDefault
Definition: optpage.hxx:136
bool m_bTest9
Definition: cfgitems.hxx:149
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:300
SwWrtShell * GetWrtShell()
Access to the SwWrtShell belonging to SwView.
Definition: docsh.hxx:224
sal_uInt16 GetTableVInsert() const
Definition: modcfg.hxx:241
std::unique_ptr< weld::CustomWeld > m_xDeletedPreview
Definition: optpage.hxx:297
void SetStoreRsid(bool bStoreRsid)
Definition: modcfg.hxx:400
#define FONT_INDEX
Definition: fontcfg.hxx:31
bool IsInside(const Point &rPOINT) const
bool m_bPrintControl
Definition: printdata.hxx:58
std::unique_ptr< weld::Label > m_xTabLabel
Definition: optpage.hxx:229
sal_uInt16 m_nItemId
Definition: authratr.hxx:29
std::unique_ptr< FontSizeBox > m_xLabelHeightLB
Definition: optpage.hxx:159
LanguageType m_eLanguage
Definition: optpage.hxx:130
virtual void set_active(int pos)=0
void SetMarkAlignColor(const Color &rColor)
Definition: modcfg.hxx:262
OUString SwResId(const char *pId)
Definition: swmodule.cxx:165
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:267
virtual ~SwCompareOptionsTabPage() override
Definition: optpage.cxx:2008
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:346
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:192
virtual ~SwShdwCursorOptionsTabPage() override
Definition: optpage.cxx:1249
SwDocShell * GetDocShell()
Definition: view.cxx:1108
OUString m_sShellIndex
Definition: optpage.hxx:124
std::unique_ptr< weld::CheckButton > m_xIgnoreCB
Definition: optpage.hxx:367
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:364
void SetMarkAlignMode(sal_uInt16 nMode)
Definition: modcfg.hxx:258
#define FN_TABLE_MODE_FIX_PROP
Definition: cmdid.h:425
TableChgMode GetTableMode() const
Definition: modcfg.hxx:225
std::unique_ptr< weld::ComboBox > m_xVMetric
Definition: optpage.hxx:42
std::unique_ptr< weld::CheckButton > m_xTest10CBox
Definition: optpage.hxx:354
SwWrtShell * GetValue() const
Definition: swwrtshitem.hxx:36
std::unique_ptr< weld::Widget > m_xCommentsFrame
Definition: optpage.hxx:91
bool m_bGraphic
Definition: cfgitems.hxx:76
SwContentOptPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optpage.cxx:88
bool m_bTest5
Definition: cfgitems.hxx:145
std::unique_ptr< weld::CustomWeld > m_xMarkPreview
Definition: optpage.hxx:307
void PaintPage(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
Definition: optpage.cxx:1494
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:242
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
OUString m_sScriptWestern
Definition: optpage.hxx:147
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
default, fill with tabs
std::unique_ptr< weld::CheckButton > m_xTest8CBox
Definition: optpage.hxx:352
std::unique_ptr< weld::CheckButton > m_xCharHiddenCB
Definition: optpage.hxx:231
long CalcToUnit(float nIn, MapUnit eUnit)
bool m_bSmoothScroll
Definition: cfgitems.hxx:71
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:2140
std::unique_ptr< weld::Label > m_xSettingsLabel
Definition: optpage.hxx:51
bool m_bFieldHiddenText
Definition: cfgitems.hxx:81
std::unique_ptr< weld::ComboBox > m_xHMetric
Definition: optpage.hxx:39
std::unique_ptr< weld::CheckButton > m_xOnOffCB
Definition: optpage.hxx:236
OUString m_sShellTitle
Definition: optpage.hxx:121
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
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:291
ITALIC_NORMAL
void SetTableMode(TableChgMode eSet)
Definition: modcfg.hxx:226
static SfxObjectShell * GetFirst(const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
unsigned char sal_uInt8
Item for settings dialog - document view.
Definition: cfgitems.hxx:41
std::unique_ptr< weld::ComboBox > m_xFaxLB
Definition: optpage.hxx:100
void SetTableVMove(sal_uInt16 nSet)
Definition: modcfg.hxx:234
bool m_bPrintHiddenText
Definition: printdata.hxx:58
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
Definition: optpage.cxx:1524
std::unique_ptr< weld::RadioButton > m_xCharRB
Definition: optpage.hxx:365
std::unique_ptr< weld::Frame > m_xCursorProtFrame
Definition: optpage.hxx:239
Color m_aTransCol
Definition: optpage.hxx:260
bool m_bTest3
Definition: cfgitems.hxx:143
std::unique_ptr< weld::CheckButton > m_xTest6CBox
Definition: optpage.hxx:350
void SetInsertAuthorAttr(AuthorCharAttr const &rAttr)
Definition: modcfg.hxx:246
void SetFontHeight(sal_Int32 nHeight, sal_uInt8 nFont, sal_uInt8 nScriptType)
Definition: fontcfg.hxx:102
static Color & GetFontColor()
Definition: viewopt.cxx:425
std::unique_ptr< weld::MetricSpinButton > m_xColInsertMF
Definition: optpage.hxx:197
bool m_bTest10
Definition: cfgitems.hxx:150
LanguageType GetAppLanguage()
Definition: init.cxx:728
IDocumentSettingAccess const & getIDocumentSettingAccess() const
Definition: doc.cxx:175
std::unique_ptr< FontSizeBox > m_xIndexHeightLB
Definition: optpage.hxx:161
static OUString GetString(sal_uInt32 i)
Definition: optload.cxx:64
SwCompareMode GetCompareMode() const
Definition: modcfg.hxx:380
void SetColor(const Color &rColor)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
sal_uInt16 GetPieceLen() const
Definition: modcfg.hxx:392
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optpage.cxx:1253
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:385
void SetTableHMove(sal_uInt16 nSet)
Definition: modcfg.hxx:230
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:237
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:127
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:366
std::unique_ptr< FontSizeBox > m_xTitleHeightLB
Definition: optpage.hxx:155
long CalcToPoint(long nIn, MapUnit eUnit, sal_uInt16 nFactor)
static void InitFontStyle(SvxFontPrevWindow &rExampleWin, const OUString &rText)
Definition: optpage.cxx:1946
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
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:349
bool m_bTest2
Definition: cfgitems.hxx:142
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: optpage.cxx:1192
std::unique_ptr< weld::CheckButton > m_xBreakCB
Definition: optpage.hxx:230
std::unique_ptr< ColorListBox > m_xMarkColorLB
Definition: optpage.hxx:305
void SetMode(SwFillMode eM)
Definition: cfgitems.hxx:129
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:763
bool m_bParagraphEnd
Definition: cfgitems.hxx:46
std::unique_ptr< weld::CheckButton > m_xProspectCB_RTL
Definition: optpage.hxx:89
static sal_uInt32 Count()
Definition: optload.cxx:59
void SetFontOutline(const OUString &rSet, sal_uInt8 nFontGroup)
Definition: fontcfg.hxx:93
std::unique_ptr< FontSizeBox > m_xStandardHeightLB
Definition: optpage.hxx:153
std::unique_ptr< weld::SpinButton > m_xLenNF
Definition: optpage.hxx:368
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:1394
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:426
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optpage.cxx:168
TableChgMode
Definition: tblenum.hxx:46
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
if(!pCandidateA->getEnd().equal(pCandidateB->getStart()))
std::unique_ptr< weld::Frame > m_xDirectCursorFrame
Definition: optpage.hxx:235
std::unique_ptr< weld::Label > m_xMetricLabel
Definition: optpage.hxx:52
#define FN_TABLE_MODE_FIX
Definition: cmdid.h:424
LINESTYLE_DOUBLE
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:303
bool m_bShowOutlineContentVisibilityButton
Definition: cfgitems.hxx:80
std::unique_ptr< weld::ComboBox > m_xMetricLB
Definition: optpage.hxx:53
std::unique_ptr< weld::CheckButton > m_xGrfCB
Definition: optpage.hxx:45
bool m_bCrosshair
Definition: cfgitems.hxx:73
static void lcl_SelectMetricLB(weld::ComboBox &rMetric, sal_uInt16 nSID, const SfxItemSet &rSet)
Definition: optpage.cxx:174
SelectionType GetSelectionType() const
Definition: wrtsh1.cxx:1398
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optpage.cxx:2144
virtual void set_size_request(int nWidth, int nHeight)=0
static sal_uInt16 aInsertAttrMap[]
Definition: optpage.cxx:1386
void StartAllAction()
For all views of this document.
Definition: edws.cxx:86
static sal_Int32 GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang)
Definition: fontcfg.cxx:249
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optpage.cxx:1629
sal_uInt16 GetMarkAlignMode() const
Definition: modcfg.hxx:257
std::unique_ptr< weld::CheckButton > m_xPrintTextPlaceholderCB
Definition: optpage.hxx:83
virtual void PageCreated(const SfxAllItemSet &aSet) override
Definition: optpage.cxx:1258
std::unique_ptr< weld::ComboBox > m_xInsertLB
Definition: optpage.hxx:289
const AuthorCharAttr & GetDeletedAuthorAttr() const
Definition: modcfg.hxx:249
void Fill(const FontMetric *pFontMetric, const FontList *pList)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
SwWrtShell * m_pWrtShell
Definition: optpage.hxx:181
virtual ~SwMarkPreview() override
Definition: optpage.cxx:1406
virtual void Reset(const SfxItemSet *rSet) override
Definition: optpage.cxx:2171
bool m_bVertRulerRight
Definition: cfgitems.hxx:70
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:259
std::unique_ptr< ColorListBox > m_xDeletedColorLB
Definition: optpage.hxx:295
virtual void Reset(const SfxItemSet *rSet) override
Definition: optpage.cxx:2063
Color m_aPrintAreaCol
Definition: optpage.hxx:265
SwPostItMode m_nPrintPostIts
Definition: printdata.hxx:68
bool m_bNonbreakingSpace
Definition: cfgitems.hxx:49
virtual void Reset(const SfxItemSet *rSet) override
Definition: optpage.cxx:400
virtual ~SwContentOptPage() override
Definition: optpage.cxx:164
IMPL_LINK(SwContentOptPage, VertRulerHdl, weld::ToggleButton &, rBox, void)
Definition: optpage.cxx:274
const char sNone[]
bool m_bLabelDefault
Definition: optpage.hxx:135
rtl_TextEncoding GetCharSet() const
sal_uInt16 nPos
std::unique_ptr< weld::ComboBox > m_xChangedLB
Definition: optpage.hxx:299
std::unique_ptr< weld::MetricSpinButton > m_xColMoveMF
Definition: optpage.hxx:194
bool m_bTest1
Definition: cfgitems.hxx:141
virtual OUString get_active_text() const =0
void SetInsTableChangeNumFormat(bool bHTML, bool b)
Definition: modcfg.hxx:291
std::unique_ptr< weld::CheckButton > m_xBackgroundCB
Definition: optpage.hxx:80
std::unique_ptr< weld::CheckButton > m_xTest9CBox
Definition: optpage.hxx:353
OUString m_sScriptComplex
Definition: optpage.hxx:149
bool IsVerticalTextEnabled() const
std::unique_ptr< weld::CheckButton > m_xNumFormatFormattingCB
Definition: optpage.hxx:190