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