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