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