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