LibreOffice Module sw (master)  1
optcomp.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 <optcomp.hxx>
21 
22 #include <cmdid.h>
23 #include <docsh.hxx>
24 #include <uiitems.hxx>
25 #include <view.hxx>
26 #include <wrtsh.hxx>
27 
28 #include <vcl/svapp.hxx>
29 #include <vcl/weld.hxx>
30 #include <sfx2/docfilt.hxx>
31 #include <sfx2/fcontnr.hxx>
33 #include <vector>
36 #include <officecfg/Office/Compatibility.hxx>
37 
38 #include <com/sun/star/beans/PropertyValue.hpp>
39 
40 using namespace ::com::sun::star::beans;
41 using namespace ::com::sun::star::document;
42 using namespace ::com::sun::star::uno;
43 using namespace ::std;
44 
46 {
47  std::vector< SvtCompatibilityEntry > m_aList;
48 };
49 
51  : SfxTabPage(pPage, pController, "modules/swriter/ui/optcompatpage.ui", "OptCompatPage", &rSet)
52  , m_pWrtShell(nullptr)
54  , m_nSavedOptions(0)
55  , m_bSavedMSFormsMenuOption(false)
56  , m_xMain(m_xBuilder->weld_frame("compatframe"))
57  , m_xGlobalOptionsFrame(m_xBuilder->weld_frame("globalcompatframe"))
58  , m_xFormattingLB(m_xBuilder->weld_combo_box("format"))
59  , m_xGlobalOptionsLB(m_xBuilder->weld_combo_box("globaloptions"))
60  , m_xOptionsLB(m_xBuilder->weld_tree_view("options"))
61  , m_xGlobalOptionsCLB(m_xBuilder->weld_tree_view("globaloptioncheckbox"))
62  , m_xDefaultPB(m_xBuilder->weld_button("default"))
63 {
64  m_xOptionsLB->enable_toggle_buttons(weld::ColumnToggleType::Check);
65  m_xGlobalOptionsCLB->enable_toggle_buttons(weld::ColumnToggleType::Check);
66 
67  int nPos = 0;
68  for (int i = static_cast<int>(SvtCompatibilityEntry::Index::Module) + 1;
69  i < static_cast<int>(SvtCompatibilityEntry::Index::INVALID) - 1; // omit AddTableLineSpacing
70  ++i)
71  {
72  int nCoptIdx = i - 2; /* Do not consider "Name" & "Module" indexes */
73 
74  const OUString sEntry = m_xFormattingLB->get_text(nCoptIdx);
75  m_xOptionsLB->append();
76  m_xOptionsLB->set_toggle(nPos, TRISTATE_FALSE);
77  m_xOptionsLB->set_text(nPos, sEntry, 0);
78  ++nPos;
79  }
80 
81  m_sUserEntry = m_xFormattingLB->get_text(m_xFormattingLB->get_count() - 1);
82 
83  m_xFormattingLB->clear();
84 
85  // Set MSOCompatibleFormsMenu entry attributes
86  const bool bReadOnly = officecfg::Office::Compatibility::View::MSCompatibleFormsMenu::isReadOnly();
87  m_xGlobalOptionsCLB->set_sensitive(!bReadOnly);
88 
89  m_xGlobalOptionsCLB->append();
91  m_xGlobalOptionsCLB->set_toggle(0, bChecked ? TRISTATE_TRUE : TRISTATE_FALSE);
92  m_xGlobalOptionsCLB->set_text(0, m_xGlobalOptionsLB->get_text(0), 0);
93 
94  m_xGlobalOptionsLB->clear();
95 
96  // tdf#125799, we let only the doc options grow/shrink but give this one more than its bare
97  // min request height because there's only one row in it and that looks somewhat abrupt
98  m_xGlobalOptionsCLB->set_size_request(-1, m_xGlobalOptionsCLB->get_preferred_size().Height() * 2);
99 
100  InitControls( rSet );
101 
102  // set handler
103  m_xFormattingLB->connect_changed( LINK( this, SwCompatibilityOptPage, SelectHdl ) );
104  m_xDefaultPB->connect_clicked( LINK( this, SwCompatibilityOptPage, UseAsDefaultHdl ) );
105 }
106 
108 {
109 }
110 
111 static sal_uInt32 convertBools2Ulong_Impl
112 (
113  bool _bUsePrtMetrics,
114  bool _bAddSpacing,
115  bool _bAddSpacingAtPages,
116  bool _bUseOurTabStops,
117  bool _bNoExtLeading,
118  bool _bUseLineSpacing,
119  bool _bAddTableSpacing,
120  bool _bAddTableLineSpacing,
121  bool _bUseObjPos,
122  bool _bUseOurTextWrapping,
123  bool _bConsiderWrappingStyle,
124  bool _bExpandWordSpace,
125  bool _bProtectForm,
126  bool _bMsWordCompTrailingBlanks,
127  bool bSubtractFlysAnchoredAtFlys,
128  bool bEmptyDbFieldHidesPara
129 )
130 {
131  sal_uInt32 nRet = 0;
132  sal_uInt32 nSetBit = 1;
133 
134  if ( _bUsePrtMetrics )
135  nRet |= nSetBit;
136  nSetBit = nSetBit << 1;
137  if ( _bAddSpacing )
138  nRet |= nSetBit;
139  nSetBit = nSetBit << 1;
140  if ( _bAddSpacingAtPages )
141  nRet |= nSetBit;
142  nSetBit = nSetBit << 1;
143  if ( _bUseOurTabStops )
144  nRet |= nSetBit;
145  nSetBit = nSetBit << 1;
146  if ( _bNoExtLeading )
147  nRet |= nSetBit;
148  nSetBit = nSetBit << 1;
149  if ( _bUseLineSpacing )
150  nRet |= nSetBit;
151  nSetBit = nSetBit << 1;
152  if ( _bAddTableSpacing )
153  nRet |= nSetBit;
154  nSetBit = nSetBit << 1;
155  if (_bAddTableLineSpacing)
156  nRet |= nSetBit;
157  nSetBit = nSetBit << 1;
158  if ( _bUseObjPos )
159  nRet |= nSetBit;
160  nSetBit = nSetBit << 1;
161  if ( _bUseOurTextWrapping )
162  nRet |= nSetBit;
163  nSetBit = nSetBit << 1;
164  if ( _bConsiderWrappingStyle )
165  nRet |= nSetBit;
166  nSetBit = nSetBit << 1;
167  if ( _bExpandWordSpace )
168  nRet |= nSetBit;
169  nSetBit = nSetBit << 1;
170  if ( _bProtectForm )
171  nRet |= nSetBit;
172  nSetBit = nSetBit << 1;
173  if ( _bMsWordCompTrailingBlanks )
174  nRet |= nSetBit;
175  nSetBit = nSetBit << 1;
176  if (bSubtractFlysAnchoredAtFlys)
177  nRet |= nSetBit;
178  nSetBit = nSetBit << 1;
179  if (bEmptyDbFieldHidesPara)
180  nRet |= nSetBit;
181 
182  return nRet;
183 }
184 
186 {
187  // init objectshell and detect document name
188  OUString sDocTitle;
189  const SfxPoolItem* pItem = nullptr;
190  SfxObjectShell* pObjShell = nullptr;
191  if ( SfxItemState::SET == rSet.GetItemState( FN_PARAM_WRTSHELL, false, &pItem ) )
192  m_pWrtShell = static_cast<SwWrtShell*>(static_cast<const SwPtrItem*>(pItem)->GetValue());
193  if ( m_pWrtShell )
194  {
195  pObjShell = m_pWrtShell->GetView().GetDocShell();
196  if ( pObjShell )
197  sDocTitle = pObjShell->GetTitle();
198  }
199  else
200  {
201  m_xMain->set_sensitive(false);
202  m_xGlobalOptionsFrame->set_sensitive(false);
203  }
204  const OUString& rText = m_xMain->get_label();
205  m_xMain->set_label(rText.replaceAll("%DOCNAME", sDocTitle));
206 
207  // loading file formats
208  const Sequence< Sequence< PropertyValue > > aList = m_aConfigItem.GetList();
209 
210  SvtCompatibilityEntry aEntry;
212 
213  for ( const Sequence< PropertyValue >& rEntry : aList )
214  {
215  for ( const PropertyValue& aValue : rEntry )
216  {
217  aEntry.setValue( SvtCompatibilityEntry::getIndex(aValue.Name), aValue.Value );
218  }
219 
220  const OUString sEntryName = aEntry.getValue<OUString>( SvtCompatibilityEntry::Index::Name );
221 
222  const bool bIsUserEntry = ( sEntryName == SvtCompatibilityEntry::getUserEntryName() );
223  const bool bIsDefaultEntry = ( sEntryName == SvtCompatibilityEntry::getDefaultEntryName() );
224 
225  aEntry.setDefaultEntry( bIsDefaultEntry );
226 
227  m_pImpl->m_aList.push_back( aEntry );
228 
229  if ( aEntry.isDefaultEntry() )
230  continue;
231 
232  OUString sNewEntry;
233  if ( bIsUserEntry )
234  sNewEntry = m_sUserEntry;
235 
236  else if ( pObjShell && !sEntryName.isEmpty() )
237  {
238  SfxFilterContainer* pFacCont = pObjShell->GetFactory().GetFilterContainer();
239  std::shared_ptr<const SfxFilter> pFilter = pFacCont->GetFilter4FilterName( sEntryName );
240  if ( pFilter )
241  sNewEntry = pFilter->GetUIName();
242  }
243 
244  if ( sNewEntry.isEmpty() )
245  sNewEntry = sEntryName;
246 
247  sal_uInt32 nOptions = convertBools2Ulong_Impl(
259  aEntry.getValue<bool>( SvtCompatibilityEntry::Index::ExpandWordSpace ),
264  m_xFormattingLB->append(OUString::number(nOptions), sNewEntry);
265  }
266 }
267 
269 {
270  sal_uInt32 nOptions = m_xFormattingLB->get_active_id().toUInt32();
271  SetCurrentOptions(nOptions);
272 }
273 
275 {
276  std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "modules/swriter/ui/querydefaultcompatdialog.ui"));
277  std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("QueryDefaultCompatDialog"));
278  if (xQueryBox->run() != RET_YES)
279  return;
280 
281  auto pItem = std::find_if(m_pImpl->m_aList.begin(), m_pImpl->m_aList.end(),
282  [](const SvtCompatibilityEntry& rItem) { return rItem.isDefaultEntry(); });
283  if (pItem != m_pImpl->m_aList.end())
284  {
285  const sal_Int32 nCount = m_xOptionsLB->n_children();
286  for ( sal_Int32 i = 0; i < nCount; ++i )
287  {
288  bool bChecked = m_xOptionsLB->get_toggle(i);
289 
290  int nCoptIdx = i + 2; /* Consider "Name" & "Module" indexes */
291  pItem->setValue<bool>( SvtCompatibilityEntry::Index(nCoptIdx), bChecked );
293  {
294  bool const isLineSpacing = m_xOptionsLB->get_toggle(i) == TRISTATE_TRUE;
295  pItem->setValue<bool>(SvtCompatibilityEntry::Index::AddTableLineSpacing, isLineSpacing);
296  }
297  else
298  {
299  assert(m_xOptionsLB->get_toggle(i) != TRISTATE_INDET);
300  }
301  }
302  }
303 
304  WriteOptions();
305 }
306 
307 void SwCompatibilityOptPage::SetCurrentOptions( sal_uInt32 nOptions )
308 {
309  const int nCount = m_xOptionsLB->n_children();
310  OSL_ENSURE( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
311  for (int i = 0; i < nCount; ++i)
312  {
313  bool bChecked = ( ( nOptions & 0x00000001 ) == 0x00000001 );
316  { // hack: map 2 bools to 1 tristate
317  nOptions = nOptions >> 1;
318  if (value == TRISTATE_TRUE
319  && (nOptions & 0x00000001) != 0x00000001) // ADD_PARA_LINE_SPACING_TO_TABLE_CELLS
320  {
321  value = TRISTATE_INDET; // 3 values possible here
322  }
323  }
324  m_xOptionsLB->set_toggle(i, value);
325  nOptions = nOptions >> 1;
326  }
327 }
328 
330 {
331  sal_uInt32 nRet = 0;
332  if ( m_pWrtShell )
333  {
334  const IDocumentSettingAccess& rIDocumentSettingAccess = m_pWrtShell->getIDocumentSettingAccess();
336  !rIDocumentSettingAccess.get( DocumentSettingId::USE_VIRTUAL_DEVICE ),
337  rIDocumentSettingAccess.get( DocumentSettingId::PARA_SPACE_MAX ),
338  rIDocumentSettingAccess.get( DocumentSettingId::PARA_SPACE_MAX_AT_PAGES ),
339  !rIDocumentSettingAccess.get( DocumentSettingId::TAB_COMPAT ),
340  !rIDocumentSettingAccess.get( DocumentSettingId::ADD_EXT_LEADING ),
341  rIDocumentSettingAccess.get( DocumentSettingId::OLD_LINE_SPACING ),
342  rIDocumentSettingAccess.get( DocumentSettingId::ADD_PARA_SPACING_TO_TABLE_CELLS ),
344  rIDocumentSettingAccess.get( DocumentSettingId::USE_FORMER_OBJECT_POS ),
345  rIDocumentSettingAccess.get( DocumentSettingId::USE_FORMER_TEXT_WRAPPING ),
346  rIDocumentSettingAccess.get( DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION ),
348  rIDocumentSettingAccess.get( DocumentSettingId::PROTECT_FORM ),
349  rIDocumentSettingAccess.get( DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS ),
350  rIDocumentSettingAccess.get( DocumentSettingId::SUBTRACT_FLYS ),
351  rIDocumentSettingAccess.get( DocumentSettingId::EMPTY_DB_FIELD_HIDES_PARA ) );
352  }
353  return nRet;
354 }
355 
357 {
359  for ( const auto& rItem : m_pImpl->m_aList )
360  m_aConfigItem.AppendItem(rItem);
361 }
362 
363 std::unique_ptr<SfxTabPage> SwCompatibilityOptPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet)
364 {
365  return std::make_unique<SwCompatibilityOptPage>(pPage, pController, *rAttrSet);
366 }
367 
369 {
370  bool bModified = false;
371  if ( m_pWrtShell )
372  {
373  sal_uInt32 nSavedOptions = m_nSavedOptions;
374  const int nCount = m_xOptionsLB->n_children();
375  OSL_ENSURE( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
376 
377  for (int i = 0; i < nCount; ++i)
378  {
379  TriState const current = m_xOptionsLB->get_toggle(i);
380  TriState saved = ((nSavedOptions & 0x00000001) == 0x00000001) ? TRISTATE_TRUE : TRISTATE_FALSE;
382  { // hack: map 2 bools to 1 tristate
383  nSavedOptions = nSavedOptions >> 1;
384  if (saved == TRISTATE_TRUE
385  && ((nSavedOptions & 0x00000001) != 0x00000001))
386  {
387  saved = TRISTATE_INDET;
388  }
389  }
390  if (current != saved)
391  {
392  bool const bChecked(current != TRISTATE_FALSE);
393  assert(current != TRISTATE_INDET); // can't *change* it to that
394  int nCoptIdx = i + 2; /* Consider "Name" & "Module" indexes */
395  switch ( SvtCompatibilityEntry::Index(nCoptIdx) )
396  {
398  m_pWrtShell->SetUseVirDev( !bChecked );
399  break;
400 
402  m_pWrtShell->SetParaSpaceMax( bChecked );
403  break;
404 
406  m_pWrtShell->SetParaSpaceMaxAtPages( bChecked );
407  break;
408 
410  m_pWrtShell->SetTabCompat( !bChecked );
411  break;
412 
414  m_pWrtShell->SetAddExtLeading( !bChecked );
415  break;
416 
419  break;
420 
423  break;
424 
427  break;
428 
431  break;
432 
435  break;
436 
439  break;
440 
442  m_pWrtShell->SetProtectForm( bChecked );
443  break;
444 
447  break;
448 
451  break;
452 
455  break;
456 
457  default:
458  break;
459  }
460  bModified = true;
461  }
462 
463  nSavedOptions = nSavedOptions >> 1;
464  }
465  }
466 
467  if ( bModified )
468  WriteOptions();
469 
470  bool bNewMSFormsMenuOption = m_xGlobalOptionsCLB->get_toggle(0);
471  if (m_bSavedMSFormsMenuOption != bNewMSFormsMenuOption)
472  {
473  std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
474  officecfg::Office::Compatibility::View::MSCompatibleFormsMenu::set(bNewMSFormsMenuOption, batch);
475  batch->commit();
476 
477  m_bSavedMSFormsMenuOption = bNewMSFormsMenuOption;
478  bModified = true;
479 
480  // Show a message about that the option needs a restart to be applied
481  {
482  SolarMutexGuard aGuard;
485  {
486  GetDialogController()->response(RET_OK);
487  }
488  }
489  }
490 
491  return bModified;
492 }
493 
495 {
496  m_xOptionsLB->select(0);
497 
498  sal_uInt32 nOptions = GetDocumentOptions();
499  SetCurrentOptions( nOptions );
500  m_nSavedOptions = nOptions;
501 
504 }
505 
506 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
void SetAddExtLeading(bool bNew)
Definition: viewsh.cxx:792
virtual SfxObjectFactory & GetFactory() const =0
void SetMsWordCompTrailingBlanks(bool _bMsWordCompTrailingBlanks)
Definition: viewsh.cxx:914
SvtCompatibilityOptions m_aConfigItem
Definition: optcomp.hxx:34
OUString GetTitle(sal_uInt16 nMaxLen=0) const
void SetDoNotJustifyLinesWithManualBreak(bool _bDoNotJustifyLinesWithManualBreak)
Definition: viewsh.cxx:896
void SetParaSpaceMaxAtPages(bool bNew)
Definition: viewsh.cxx:768
void SetAddParaSpacingToTableCells(bool _bAddParaSpacingToTableCells)
Sets if paragraph and table spacing is added at bottom of table cells.
Definition: viewsh.cxx:823
css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > GetList() const
std::unique_ptr< weld::ComboBox > m_xGlobalOptionsLB
Definition: optcomp.hxx:49
static weld::Builder * CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false)
static Index getIndex(const OUString &rName)
const IDocumentSettingAccess & getIDocumentSettingAccess() const
Provides access to the document setting interface.
Definition: viewsh.cxx:2663
static OUString getUserEntryName()
IMPL_LINK_NOARG(SwCompatibilityOptPage, SelectHdl, weld::ComboBox &, void)
Definition: optcomp.cxx:268
bool bReadOnly
TRISTATE_TRUE
std::unique_ptr< weld::TreeView > m_xGlobalOptionsCLB
Definition: optcomp.hxx:51
virtual ~SwCompatibilityOptPage() override
Definition: optcomp.cxx:107
virtual void Reset(const SfxItemSet *rSet) override
Definition: optcomp.cxx:494
void SetUseFormerTextWrapping(bool _bUseFormerTextWrapping)
Definition: viewsh.cxx:883
void SetCurrentOptions(sal_uInt32 nOptions)
Definition: optcomp.cxx:307
const SwView & GetView() const
Definition: wrtsh.hxx:428
RET_YES
static sal_uInt32 convertBools2Ulong_Impl(bool _bUsePrtMetrics, bool _bAddSpacing, bool _bAddSpacingAtPages, bool _bUseOurTabStops, bool _bNoExtLeading, bool _bUseLineSpacing, bool _bAddTableSpacing, bool _bAddTableLineSpacing, bool _bUseObjPos, bool _bUseOurTextWrapping, bool _bConsiderWrappingStyle, bool _bExpandWordSpace, bool _bProtectForm, bool _bMsWordCompTrailingBlanks, bool bSubtractFlysAnchoredAtFlys, bool bEmptyDbFieldHidesPara)
Definition: optcomp.cxx:112
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
std::unique_ptr< weld::Frame > m_xGlobalOptionsFrame
Definition: optcomp.hxx:47
int nCount
void SetEmptyDbFieldHidesPara(bool bEmptyDbFieldHidesPara)
Definition: viewsh.cxx:932
static std::shared_ptr< ConfigurationChanges > create(css::uno::Reference< css::uno::XComponentContext > const &context=comphelper::getProcessComponentContext())
std::vector< SvtCompatibilityEntry > m_aList
Definition: optcomp.cxx:47
TRISTATE_INDET
std::unique_ptr< weld::Button > m_xDefaultPB
Definition: optcomp.hxx:52
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:20
SVT_DLLPUBLIC bool executeRestartDialog(css::uno::Reference< css::uno::XComponentContext > const &context, weld::Window *parent, RestartReason reason)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
int i
SwCompatibilityOptPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optcomp.cxx:50
#define FN_PARAM_WRTSHELL
Definition: cmdid.h:794
TRISTATE_FALSE
bool isDefaultEntry() const
std::unique_ptr< weld::Frame > m_xMain
Definition: optcomp.hxx:46
void setValue(const Index rIdx, css::uno::Any const &rValue)
Provides access to settings of a document.
bool m_bSavedMSFormsMenuOption
Definition: optcomp.hxx:43
static OUString getDefaultEntryName()
SwWrtShell * m_pWrtShell
Definition: optcomp.hxx:38
std::unique_ptr< weld::ComboBox > m_xFormattingLB
Definition: optcomp.hxx:48
void InitControls(const SfxItemSet &rSet)
Definition: optcomp.cxx:185
void AppendItem(const SvtCompatibilityEntry &aItem)
SwDocShell * GetDocShell()
Definition: view.cxx:1109
sal_uInt32 m_nSavedOptions
Definition: optcomp.hxx:42
void SetConsiderWrapOnObjPos(bool _bConsiderWrapOnObjPos)
Definition: viewsh.cxx:872
weld::Window * GetFrameWeld() const
void SetUseFormerLineSpacing(bool _bUseFormerLineSpacing)
Sets if former formatting of text lines with proportional line spacing should used.
Definition: viewsh.cxx:843
std::unique_ptr< SwCompatibilityOptPage_Impl > m_pImpl
Definition: optcomp.hxx:40
void SetUseFormerObjectPositioning(bool _bUseFormerObjPos)
Sets IDocumentSettingAccess if former object positioning should be used.
Definition: viewsh.cxx:860
std::shared_ptr< const SfxFilter > GetFilter4FilterName(const OUString &rName, SfxFilterFlags nMust=SfxFilterFlags::NONE, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED) const
RET_OK
Reference< XComponentContext > getProcessComponentContext()
void SetUseVirDev(bool bNew)
Definition: viewsh.cxx:807
SfxOkDialogController * GetDialogController() const
void SetParaSpaceMax(bool bNew)
Definition: viewsh.cxx:756
Any value
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
sal_uInt32 GetDocumentOptions() const
Definition: optcomp.cxx:329
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optcomp.cxx:363
std::unique_ptr< weld::TreeView > m_xOptionsLB
Definition: optcomp.hxx:50
void SetSubtractFlysAnchoredAtFlys(bool bSubtractFlysAnchoredAtFlys)
Definition: viewsh.cxx:926
css::uno::Any getValue(const Index rIdx) const
RESTART_REASON_MSCOMPATIBLE_FORMS_MENU
void setDefaultEntry(bool rValue)
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optcomp.cxx:368
::std::unique_ptr< XmlIdRegistry_Impl > m_pImpl
SfxFilterContainer * GetFilterContainer() const
void SetProtectForm(bool _bProtectForm)
Definition: viewsh.cxx:908
TriState
void SetTabCompat(bool bNew)
Definition: viewsh.cxx:780
sal_uInt16 nPos