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