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 #include <osl/diagnose.h>
38 
39 #include <com/sun/star/beans/PropertyValue.hpp>
40 
41 using namespace ::com::sun::star::beans;
42 using namespace ::com::sun::star::document;
43 using namespace ::com::sun::star::uno;
44 using namespace ::std;
45 
47 {
48  std::vector< SvtCompatibilityEntry > m_aList;
49 };
50 
52  : SfxTabPage(pPage, pController, "modules/swriter/ui/optcompatpage.ui", "OptCompatPage", &rSet)
53  , m_pWrtShell(nullptr)
55  , m_nSavedOptions(0)
56  , m_bSavedMSFormsMenuOption(false)
57  , m_xMain(m_xBuilder->weld_frame("compatframe"))
58  , m_xGlobalOptionsFrame(m_xBuilder->weld_frame("globalcompatframe"))
59  , m_xFormattingLB(m_xBuilder->weld_combo_box("format"))
60  , m_xGlobalOptionsLB(m_xBuilder->weld_combo_box("globaloptions"))
61  , m_xOptionsLB(m_xBuilder->weld_tree_view("options"))
62  , m_xGlobalOptionsCLB(m_xBuilder->weld_tree_view("globaloptioncheckbox"))
63  , m_xDefaultPB(m_xBuilder->weld_button("default"))
64 {
65  m_xOptionsLB->enable_toggle_buttons(weld::ColumnToggleType::Check);
66  m_xGlobalOptionsCLB->enable_toggle_buttons(weld::ColumnToggleType::Check);
67 
68  int nPos = 0;
69  for (int i = static_cast<int>(SvtCompatibilityEntry::Index::Module) + 1;
70  i < static_cast<int>(SvtCompatibilityEntry::Index::INVALID) - 1; // omit AddTableLineSpacing
71  ++i)
72  {
73  int nCoptIdx = i - 2; /* Do not consider "Name" & "Module" indexes */
74 
75  const OUString sEntry = m_xFormattingLB->get_text(nCoptIdx);
76  m_xOptionsLB->append();
77  m_xOptionsLB->set_toggle(nPos, TRISTATE_FALSE);
78  m_xOptionsLB->set_text(nPos, sEntry, 0);
79  ++nPos;
80  }
81 
82  m_sUserEntry = m_xFormattingLB->get_text(m_xFormattingLB->get_count() - 1);
83 
84  m_xFormattingLB->clear();
85 
86  // Set MSOCompatibleFormsMenu entry attributes
87  const bool bReadOnly = officecfg::Office::Compatibility::View::MSCompatibleFormsMenu::isReadOnly();
88  m_xGlobalOptionsCLB->set_sensitive(!bReadOnly);
89 
90  m_xGlobalOptionsCLB->append();
92  m_xGlobalOptionsCLB->set_toggle(0, bChecked ? TRISTATE_TRUE : TRISTATE_FALSE);
93  m_xGlobalOptionsCLB->set_text(0, m_xGlobalOptionsLB->get_text(0), 0);
94 
95  m_xGlobalOptionsLB->clear();
96 
97  // tdf#125799, we let only the doc options grow/shrink but give this one more than its bare
98  // min request height because there's only one row in it and that looks somewhat abrupt
99  m_xGlobalOptionsCLB->set_size_request(-1, m_xGlobalOptionsCLB->get_preferred_size().Height() * 2);
100 
101  InitControls( rSet );
102 
103  // set handler
104  m_xFormattingLB->connect_changed( LINK( this, SwCompatibilityOptPage, SelectHdl ) );
105  m_xDefaultPB->connect_clicked( LINK( this, SwCompatibilityOptPage, UseAsDefaultHdl ) );
106 }
107 
109 {
110 }
111 
112 static sal_uInt32 convertBools2Ulong_Impl
113 (
114  bool _bUsePrtMetrics,
115  bool _bAddSpacing,
116  bool _bAddSpacingAtPages,
117  bool _bUseOurTabStops,
118  bool _bNoExtLeading,
119  bool _bUseLineSpacing,
120  bool _bAddTableSpacing,
121  bool _bAddTableLineSpacing,
122  bool _bUseObjPos,
123  bool _bUseOurTextWrapping,
124  bool _bConsiderWrappingStyle,
125  bool _bExpandWordSpace,
126  bool _bProtectForm,
127  bool _bMsWordCompTrailingBlanks,
128  bool bSubtractFlysAnchoredAtFlys,
129  bool bEmptyDbFieldHidesPara
130 )
131 {
132  sal_uInt32 nRet = 0;
133  sal_uInt32 nSetBit = 1;
134 
135  if ( _bUsePrtMetrics )
136  nRet |= nSetBit;
137  nSetBit = nSetBit << 1;
138  if ( _bAddSpacing )
139  nRet |= nSetBit;
140  nSetBit = nSetBit << 1;
141  if ( _bAddSpacingAtPages )
142  nRet |= nSetBit;
143  nSetBit = nSetBit << 1;
144  if ( _bUseOurTabStops )
145  nRet |= nSetBit;
146  nSetBit = nSetBit << 1;
147  if ( _bNoExtLeading )
148  nRet |= nSetBit;
149  nSetBit = nSetBit << 1;
150  if ( _bUseLineSpacing )
151  nRet |= nSetBit;
152  nSetBit = nSetBit << 1;
153  if ( _bAddTableSpacing )
154  nRet |= nSetBit;
155  nSetBit = nSetBit << 1;
156  if (_bAddTableLineSpacing)
157  nRet |= nSetBit;
158  nSetBit = nSetBit << 1;
159  if ( _bUseObjPos )
160  nRet |= nSetBit;
161  nSetBit = nSetBit << 1;
162  if ( _bUseOurTextWrapping )
163  nRet |= nSetBit;
164  nSetBit = nSetBit << 1;
165  if ( _bConsiderWrappingStyle )
166  nRet |= nSetBit;
167  nSetBit = nSetBit << 1;
168  if ( _bExpandWordSpace )
169  nRet |= nSetBit;
170  nSetBit = nSetBit << 1;
171  if ( _bProtectForm )
172  nRet |= nSetBit;
173  nSetBit = nSetBit << 1;
174  if ( _bMsWordCompTrailingBlanks )
175  nRet |= nSetBit;
176  nSetBit = nSetBit << 1;
177  if (bSubtractFlysAnchoredAtFlys)
178  nRet |= nSetBit;
179  nSetBit = nSetBit << 1;
180  if (bEmptyDbFieldHidesPara)
181  nRet |= nSetBit;
182 
183  return nRet;
184 }
185 
187 {
188  // init objectshell and detect document name
189  OUString sDocTitle;
190  const SfxPoolItem* pItem = nullptr;
191  SfxObjectShell* pObjShell = nullptr;
192  if ( SfxItemState::SET == rSet.GetItemState( FN_PARAM_WRTSHELL, false, &pItem ) )
193  m_pWrtShell = static_cast<SwWrtShell*>(static_cast<const SwPtrItem*>(pItem)->GetValue());
194  if ( m_pWrtShell )
195  {
196  pObjShell = m_pWrtShell->GetView().GetDocShell();
197  if ( pObjShell )
198  sDocTitle = pObjShell->GetTitle();
199  }
200  else
201  {
202  m_xMain->set_sensitive(false);
203  m_xGlobalOptionsFrame->set_sensitive(false);
204  }
205  const OUString& rText = m_xMain->get_label();
206  m_xMain->set_label(rText.replaceAll("%DOCNAME", sDocTitle));
207 
208  // loading file formats
209  const std::vector< SvtCompatibilityEntry > aList = m_aConfigItem.GetList();
210 
211  for ( const SvtCompatibilityEntry& rEntry : aList )
212  {
213  const OUString sEntryName = rEntry.getValue<OUString>( SvtCompatibilityEntry::Index::Name );
214  const bool bIsUserEntry = ( sEntryName == SvtCompatibilityEntry::USER_ENTRY_NAME );
215 
216  m_pImpl->m_aList.push_back( rEntry );
217 
218  if ( rEntry.isDefaultEntry() )
219  continue;
220 
221  OUString sNewEntry;
222  if ( bIsUserEntry )
223  sNewEntry = m_sUserEntry;
224 
225  else if ( pObjShell && !sEntryName.isEmpty() )
226  {
227  SfxFilterContainer* pFacCont = pObjShell->GetFactory().GetFilterContainer();
228  std::shared_ptr<const SfxFilter> pFilter = pFacCont->GetFilter4FilterName( sEntryName );
229  if ( pFilter )
230  sNewEntry = pFilter->GetUIName();
231  }
232 
233  if ( sNewEntry.isEmpty() )
234  sNewEntry = sEntryName;
235 
236  sal_uInt32 nOptions = convertBools2Ulong_Impl(
237  rEntry.getValue<bool>( SvtCompatibilityEntry::Index::UsePrtMetrics ),
238  rEntry.getValue<bool>( SvtCompatibilityEntry::Index::AddSpacing ),
239  rEntry.getValue<bool>( SvtCompatibilityEntry::Index::AddSpacingAtPages ),
240  rEntry.getValue<bool>( SvtCompatibilityEntry::Index::UseOurTabStops ),
241  rEntry.getValue<bool>( SvtCompatibilityEntry::Index::NoExtLeading ),
242  rEntry.getValue<bool>( SvtCompatibilityEntry::Index::UseLineSpacing ),
243  rEntry.getValue<bool>( SvtCompatibilityEntry::Index::AddTableSpacing ),
246  rEntry.getValue<bool>( SvtCompatibilityEntry::Index::UseOurTextWrapping ),
248  rEntry.getValue<bool>( SvtCompatibilityEntry::Index::ExpandWordSpace ),
249  rEntry.getValue<bool>( SvtCompatibilityEntry::Index::ProtectForm ),
252  rEntry.getValue<bool>( SvtCompatibilityEntry::Index::EmptyDbFieldHidesPara ) );
253  m_xFormattingLB->append(OUString::number(nOptions), sNewEntry);
254  }
255 }
256 
258 {
259  sal_uInt32 nOptions = m_xFormattingLB->get_active_id().toUInt32();
260  SetCurrentOptions(nOptions);
261 }
262 
264 {
265  std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "modules/swriter/ui/querydefaultcompatdialog.ui"));
266  std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("QueryDefaultCompatDialog"));
267  if (xQueryBox->run() != RET_YES)
268  return;
269 
270  auto pItem = std::find_if(m_pImpl->m_aList.begin(), m_pImpl->m_aList.end(),
271  [](const SvtCompatibilityEntry& rItem) { return rItem.isDefaultEntry(); });
272  if (pItem != m_pImpl->m_aList.end())
273  {
274  const sal_Int32 nCount = m_xOptionsLB->n_children();
275  for ( sal_Int32 i = 0; i < nCount; ++i )
276  {
277  bool bChecked = m_xOptionsLB->get_toggle(i);
278 
279  int nCoptIdx = i + 2; /* Consider "Name" & "Module" indexes */
280  pItem->setValue<bool>( SvtCompatibilityEntry::Index(nCoptIdx), bChecked );
282  {
283  bool const isLineSpacing = m_xOptionsLB->get_toggle(i) == TRISTATE_TRUE;
284  pItem->setValue<bool>(SvtCompatibilityEntry::Index::AddTableLineSpacing, isLineSpacing);
285  }
286  else
287  {
288  assert(m_xOptionsLB->get_toggle(i) != TRISTATE_INDET);
289  }
290  }
291  }
292 
293  WriteOptions();
294 }
295 
296 void SwCompatibilityOptPage::SetCurrentOptions( sal_uInt32 nOptions )
297 {
298  const int nCount = m_xOptionsLB->n_children();
299  OSL_ENSURE( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
300  for (int i = 0; i < nCount; ++i)
301  {
302  bool bChecked = ( ( nOptions & 0x00000001 ) == 0x00000001 );
305  { // hack: map 2 bools to 1 tristate
306  nOptions = nOptions >> 1;
307  if (value == TRISTATE_TRUE
308  && (nOptions & 0x00000001) != 0x00000001) // ADD_PARA_LINE_SPACING_TO_TABLE_CELLS
309  {
310  value = TRISTATE_INDET; // 3 values possible here
311  }
312  }
313  m_xOptionsLB->set_toggle(i, value);
314  nOptions = nOptions >> 1;
315  }
316 }
317 
319 {
320  sal_uInt32 nRet = 0;
321  if ( m_pWrtShell )
322  {
323  const IDocumentSettingAccess& rIDocumentSettingAccess = m_pWrtShell->getIDocumentSettingAccess();
325  !rIDocumentSettingAccess.get( DocumentSettingId::USE_VIRTUAL_DEVICE ),
326  rIDocumentSettingAccess.get( DocumentSettingId::PARA_SPACE_MAX ),
327  rIDocumentSettingAccess.get( DocumentSettingId::PARA_SPACE_MAX_AT_PAGES ),
328  !rIDocumentSettingAccess.get( DocumentSettingId::TAB_COMPAT ),
329  !rIDocumentSettingAccess.get( DocumentSettingId::ADD_EXT_LEADING ),
330  rIDocumentSettingAccess.get( DocumentSettingId::OLD_LINE_SPACING ),
331  rIDocumentSettingAccess.get( DocumentSettingId::ADD_PARA_SPACING_TO_TABLE_CELLS ),
333  rIDocumentSettingAccess.get( DocumentSettingId::USE_FORMER_OBJECT_POS ),
334  rIDocumentSettingAccess.get( DocumentSettingId::USE_FORMER_TEXT_WRAPPING ),
335  rIDocumentSettingAccess.get( DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION ),
337  rIDocumentSettingAccess.get( DocumentSettingId::PROTECT_FORM ),
338  rIDocumentSettingAccess.get( DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS ),
339  rIDocumentSettingAccess.get( DocumentSettingId::SUBTRACT_FLYS ),
340  rIDocumentSettingAccess.get( DocumentSettingId::EMPTY_DB_FIELD_HIDES_PARA ) );
341  }
342  return nRet;
343 }
344 
346 {
348  for ( const auto& rItem : m_pImpl->m_aList )
349  m_aConfigItem.AppendItem(rItem);
350 }
351 
352 std::unique_ptr<SfxTabPage> SwCompatibilityOptPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet)
353 {
354  return std::make_unique<SwCompatibilityOptPage>(pPage, pController, *rAttrSet);
355 }
356 
358 {
359  bool bModified = false;
360  if ( m_pWrtShell )
361  {
362  sal_uInt32 nSavedOptions = m_nSavedOptions;
363  const int nCount = m_xOptionsLB->n_children();
364  OSL_ENSURE( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
365 
366  for (int i = 0; i < nCount; ++i)
367  {
368  TriState const current = m_xOptionsLB->get_toggle(i);
369  TriState saved = ((nSavedOptions & 0x00000001) == 0x00000001) ? TRISTATE_TRUE : TRISTATE_FALSE;
371  { // hack: map 2 bools to 1 tristate
372  nSavedOptions = nSavedOptions >> 1;
373  if (saved == TRISTATE_TRUE
374  && ((nSavedOptions & 0x00000001) != 0x00000001))
375  {
376  saved = TRISTATE_INDET;
377  }
378  }
379  if (current != saved)
380  {
381  bool const bChecked(current != TRISTATE_FALSE);
382  assert(current != TRISTATE_INDET); // can't *change* it to that
383  int nCoptIdx = i + 2; /* Consider "Name" & "Module" indexes */
384  switch ( SvtCompatibilityEntry::Index(nCoptIdx) )
385  {
387  m_pWrtShell->SetUseVirDev( !bChecked );
388  break;
389 
391  m_pWrtShell->SetParaSpaceMax( bChecked );
392  break;
393 
395  m_pWrtShell->SetParaSpaceMaxAtPages( bChecked );
396  break;
397 
399  m_pWrtShell->SetTabCompat( !bChecked );
400  break;
401 
403  m_pWrtShell->SetAddExtLeading( !bChecked );
404  break;
405 
408  break;
409 
412  break;
413 
416  break;
417 
420  break;
421 
424  break;
425 
428  break;
429 
431  m_pWrtShell->SetProtectForm( bChecked );
432  break;
433 
436  break;
437 
440  break;
441 
444  break;
445 
446  default:
447  break;
448  }
449  bModified = true;
450  }
451 
452  nSavedOptions = nSavedOptions >> 1;
453  }
454  }
455 
456  if ( bModified )
457  WriteOptions();
458 
459  bool bNewMSFormsMenuOption = m_xGlobalOptionsCLB->get_toggle(0);
460  if (m_bSavedMSFormsMenuOption != bNewMSFormsMenuOption)
461  {
462  std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
463  officecfg::Office::Compatibility::View::MSCompatibleFormsMenu::set(bNewMSFormsMenuOption, batch);
464  batch->commit();
465 
466  m_bSavedMSFormsMenuOption = bNewMSFormsMenuOption;
467  bModified = true;
468 
469  // Show a message about that the option needs a restart to be applied
470  {
471  SolarMutexGuard aGuard;
474  {
475  GetDialogController()->response(RET_OK);
476  }
477  }
478  }
479 
480  return bModified;
481 }
482 
484 {
485  m_xOptionsLB->select(0);
486 
487  sal_uInt32 nOptions = GetDocumentOptions();
488  SetCurrentOptions( nOptions );
489  m_nSavedOptions = nOptions;
490 
493 }
494 
495 /* 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:801
virtual SfxObjectFactory & GetFactory() const =0
void SetMsWordCompTrailingBlanks(bool _bMsWordCompTrailingBlanks)
Definition: viewsh.cxx:923
static weld::Builder * CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
SvtCompatibilityOptions m_aConfigItem
Definition: optcomp.hxx:34
OUString GetTitle(sal_uInt16 nMaxLen=0) const
void SetDoNotJustifyLinesWithManualBreak(bool _bDoNotJustifyLinesWithManualBreak)
Definition: viewsh.cxx:905
void SetParaSpaceMaxAtPages(bool bNew)
Definition: viewsh.cxx:777
void SetAddParaSpacingToTableCells(bool _bAddParaSpacingToTableCells)
Sets if paragraph and table spacing is added at bottom of table cells.
Definition: viewsh.cxx:832
std::unique_ptr< weld::ComboBox > m_xGlobalOptionsLB
Definition: optcomp.hxx:49
const IDocumentSettingAccess & getIDocumentSettingAccess() const
Provides access to the document setting interface.
Definition: viewsh.cxx:2668
IMPL_LINK_NOARG(SwCompatibilityOptPage, SelectHdl, weld::ComboBox &, void)
Definition: optcomp.cxx:257
bool bReadOnly
TRISTATE_TRUE
std::unique_ptr< weld::TreeView > m_xGlobalOptionsCLB
Definition: optcomp.hxx:51
static constexpr OUStringLiteral USER_ENTRY_NAME
virtual ~SwCompatibilityOptPage() override
Definition: optcomp.cxx:108
virtual void Reset(const SfxItemSet *rSet) override
Definition: optcomp.cxx:483
void SetUseFormerTextWrapping(bool _bUseFormerTextWrapping)
Definition: viewsh.cxx:892
void SetCurrentOptions(sal_uInt32 nOptions)
Definition: optcomp.cxx:296
const SwView & GetView() const
Definition: wrtsh.hxx:431
RET_YES
std::vector< SvtCompatibilityEntry > GetList() const
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:113
std::unique_ptr< weld::Frame > m_xGlobalOptionsFrame
Definition: optcomp.hxx:47
int nCount
void SetEmptyDbFieldHidesPara(bool bEmptyDbFieldHidesPara)
Definition: viewsh.cxx:941
static std::shared_ptr< ConfigurationChanges > create(css::uno::Reference< css::uno::XComponentContext > const &context=comphelper::getProcessComponentContext())
std::vector< SvtCompatibilityEntry > m_aList
Definition: optcomp.cxx:48
TRISTATE_INDET
std::unique_ptr< weld::Button > m_xDefaultPB
Definition: optcomp.hxx:52
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Definition: dialoghelp.cxx:19
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:51
#define FN_PARAM_WRTSHELL
Definition: cmdid.h:796
TRISTATE_FALSE
std::unique_ptr< weld::Frame > m_xMain
Definition: optcomp.hxx:46
Provides access to settings of a document.
bool m_bSavedMSFormsMenuOption
Definition: optcomp.hxx:43
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:186
void AppendItem(const SvtCompatibilityEntry &aItem)
SwDocShell * GetDocShell()
Definition: view.cxx:1127
sal_uInt32 m_nSavedOptions
Definition: optcomp.hxx:42
void SetConsiderWrapOnObjPos(bool _bConsiderWrapOnObjPos)
Definition: viewsh.cxx:881
weld::Window * GetFrameWeld() const
void SetUseFormerLineSpacing(bool _bUseFormerLineSpacing)
Sets if former formatting of text lines with proportional line spacing should used.
Definition: viewsh.cxx:852
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:869
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:816
SfxOkDialogController * GetDialogController() const
void SetParaSpaceMax(bool bNew)
Definition: viewsh.cxx:765
Any value
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
sal_uInt32 GetDocumentOptions() const
Definition: optcomp.cxx:318
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optcomp.cxx:352
std::unique_ptr< weld::TreeView > m_xOptionsLB
Definition: optcomp.hxx:50
void SetSubtractFlysAnchoredAtFlys(bool bSubtractFlysAnchoredAtFlys)
Definition: viewsh.cxx:935
RESTART_REASON_MSCOMPATIBLE_FORMS_MENU
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optcomp.cxx:357
::std::unique_ptr< XmlIdRegistry_Impl > m_pImpl
SfxFilterContainer * GetFilterContainer() const
void SetProtectForm(bool _bProtectForm)
Definition: viewsh.cxx:917
TriState
void SetTabCompat(bool bNew)
Definition: viewsh.cxx:789
sal_uInt16 nPos