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