LibreOffice Module cui (master)  1
optsave.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 <string_view>
23 
24 #include <svl/eitem.hxx>
25 #include <svl/intitem.hxx>
26 #include "optsave.hxx"
29 #include <unotools/saveopt.hxx>
31 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
32 #include <com/sun/star/container/XNameContainer.hpp>
33 #include <com/sun/star/container/XContainerQuery.hpp>
34 #include <com/sun/star/container/XEnumeration.hpp>
35 #include <com/sun/star/beans/PropertyValue.hpp>
36 #include <sfx2/sfxsids.hrc>
37 #include <sfx2/docfilt.hxx>
38 #include <unotools/optionsdlg.hxx>
39 #include <osl/diagnose.h>
40 #include <tools/diagnose_ex.h>
41 
42 #include <sfx2/fcontnr.hxx>
43 
44 using namespace com::sun::star::uno;
45 using namespace com::sun::star::util;
46 using namespace com::sun::star::lang;
47 using namespace com::sun::star::beans;
48 using namespace com::sun::star::container;
49 using namespace comphelper;
50 
51 #define CFG_PAGE_AND_GROUP u"General", u"LoadSave"
52 
53 
55 {
57  std::vector< OUString > aFilterArr[APP_COUNT];
58  std::vector< bool > aODFArr[APP_COUNT];
59  std::vector< OUString > aUIFilterArr[APP_COUNT];
60  OUString aDefaultArr[APP_COUNT];
61  bool aDefaultReadonlyArr[APP_COUNT];
63 
65 };
66 
68 {
69 }
70 
71 // class SvxSaveTabPage --------------------------------------------------
72 
74  : SfxTabPage( pPage, pController, "cui/ui/optsavepage.ui", "OptSavePage", &rCoreSet )
75  , pImpl(new SvxSaveTabPage_Impl)
76  , m_xLoadUserSettingsCB(m_xBuilder->weld_check_button("load_settings"))
77  , m_xLoadDocPrinterCB(m_xBuilder->weld_check_button("load_docprinter"))
78  , m_xDocInfoCB(m_xBuilder->weld_check_button("docinfo"))
79  , m_xBackupCB(m_xBuilder->weld_check_button("backup"))
80  , m_xAutoSaveCB(m_xBuilder->weld_check_button("autosave"))
81  , m_xAutoSaveEdit(m_xBuilder->weld_spin_button("autosave_spin"))
82  , m_xMinuteFT(m_xBuilder->weld_label("autosave_mins"))
83  , m_xUserAutoSaveCB(m_xBuilder->weld_check_button("userautosave"))
84  , m_xRelativeFsysCB(m_xBuilder->weld_check_button("relative_fsys"))
85  , m_xRelativeInetCB(m_xBuilder->weld_check_button("relative_inet"))
86  , m_xODFVersionLB(m_xBuilder->weld_combo_box("odfversion"))
87  , m_xWarnAlienFormatCB(m_xBuilder->weld_check_button("warnalienformat"))
88  , m_xDocTypeLB(m_xBuilder->weld_combo_box("doctype"))
89  , m_xSaveAsFT(m_xBuilder->weld_label("saveas_label"))
90  , m_xSaveAsLB(m_xBuilder->weld_combo_box("saveas"))
91  , m_xODFWarningFI(m_xBuilder->weld_widget("odfwarning_image"))
92  , m_xODFWarningFT(m_xBuilder->weld_label("odfwarning_label"))
93 {
94  m_xODFVersionLB->set_id(0, OUString::number(SvtSaveOptions::ODFVER_011)); // 1.0/1.1
95  m_xODFVersionLB->set_id(1, OUString::number(SvtSaveOptions::ODFVER_012)); // 1.2
96  m_xODFVersionLB->set_id(2, OUString::number(SvtSaveOptions::ODFVER_012_EXT_COMPAT)); // 1.2 Extended (compatibility mode)
97  m_xODFVersionLB->set_id(3, OUString::number(SvtSaveOptions::ODFVER_012_EXTENDED)); // 1.2 Extended
98  m_xODFVersionLB->set_id(4, OUString::number(SvtSaveOptions::ODFVER_013)); // 1.3
99  m_xODFVersionLB->set_id(5, OUString::number(SvtSaveOptions::ODFVER_LATEST)); // 1.3 Extended (recommended)
100 
101  m_xDocTypeLB->set_id(0, OUString::number(APP_WRITER) );
102  m_xDocTypeLB->set_id(1, OUString::number(APP_WRITER_WEB) );
103  m_xDocTypeLB->set_id(2, OUString::number(APP_WRITER_GLOBAL));
104  m_xDocTypeLB->set_id(3, OUString::number(APP_CALC) );
105  m_xDocTypeLB->set_id(4, OUString::number(APP_IMPRESS) );
106  m_xDocTypeLB->set_id(5, OUString::number(APP_DRAW) );
107  m_xDocTypeLB->set_id(6, OUString::number(APP_MATH) );
108 
109  m_xAutoSaveCB->connect_clicked( LINK( this, SvxSaveTabPage, AutoClickHdl_Impl ) );
110 
111  SvtModuleOptions aModuleOpt;
113  {
114  m_xSaveAsLB->remove_id(OUString::number(APP_MATH));
115  m_xDocTypeLB->remove_id(OUString::number(APP_MATH));
116  }
117  else
118  {
120  pImpl->aDefaultReadonlyArr[APP_MATH] = aModuleOpt.IsDefaultFilterReadonly(SvtModuleOptions::EFactory::MATH);
121  }
122 
124  {
125  m_xSaveAsLB->remove_id(OUString::number(APP_DRAW));
126  m_xDocTypeLB->remove_id(OUString::number(APP_DRAW));
127  }
128  else
129  {
131  pImpl->aDefaultReadonlyArr[APP_DRAW] = aModuleOpt.IsDefaultFilterReadonly(SvtModuleOptions::EFactory::DRAW);
132  }
133 
135  {
136  m_xSaveAsLB->remove_id(OUString::number(APP_IMPRESS));
137  m_xDocTypeLB->remove_id(OUString::number(APP_IMPRESS));
138  }
139  else
140  {
143  }
144 
146  {
147  m_xSaveAsLB->remove_id(OUString::number(APP_CALC));
148  m_xDocTypeLB->remove_id(OUString::number(APP_CALC));
149  }
150  else
151  {
153  pImpl->aDefaultReadonlyArr[APP_CALC] = aModuleOpt.IsDefaultFilterReadonly(SvtModuleOptions::EFactory::CALC);
154  }
155 
157  {
158  m_xSaveAsLB->remove_id(OUString::number(APP_WRITER));
159  m_xSaveAsLB->remove_id(OUString::number(APP_WRITER_WEB));
160  m_xSaveAsLB->remove_id(OUString::number(APP_WRITER_GLOBAL));
161  m_xDocTypeLB->remove_id(OUString::number(APP_WRITER));
162  m_xDocTypeLB->remove_id(OUString::number(APP_WRITER_WEB));
163  m_xDocTypeLB->remove_id(OUString::number(APP_WRITER_GLOBAL));
164  }
165  else
166  {
173  }
174 
175  Link<weld::ComboBox&,void> aLink = LINK( this, SvxSaveTabPage, ODFVersionHdl_Impl );
176  m_xODFVersionLB->connect_changed( aLink );
177  aLink = LINK( this, SvxSaveTabPage, FilterHdl_Impl );
178  m_xDocTypeLB->connect_changed( aLink );
179  m_xSaveAsLB->connect_changed( aLink );
180 
182 }
183 
185 {
186 }
187 
188 std::unique_ptr<SfxTabPage> SvxSaveTabPage::Create(weld::Container* pPage, weld::DialogController* pController,
189  const SfxItemSet* rAttrSet)
190 {
191  return std::make_unique<SvxSaveTabPage>(pPage, pController, *rAttrSet);
192 }
193 
195 {
196  SvtOptionsDialogOptions aOptionsDlgOpt;
197 
198  if ( aOptionsDlgOpt.IsOptionHidden( u"Backup", CFG_PAGE_AND_GROUP ) )
199  {
200  // hide controls of "Backup"
201  m_xBackupCB->hide();
202  }
203 
204  if ( aOptionsDlgOpt.IsOptionHidden( u"AutoSave", CFG_PAGE_AND_GROUP ) )
205  {
206  // hide controls of "AutoSave"
207  m_xAutoSaveCB->hide();
208  m_xAutoSaveEdit->hide();
209  m_xMinuteFT->hide();
210  }
211 
212  if ( aOptionsDlgOpt.IsOptionHidden( u"UserAutoSave", CFG_PAGE_AND_GROUP ) )
213  {
214  // hide controls of "UserAutoSave"
215  m_xUserAutoSaveCB->hide();
216  }
217 
218 }
219 
221 {
222  bool bModified = false;
223  SvtSaveOptions aSaveOpt;
224  if(m_xLoadUserSettingsCB->get_state_changed_from_saved())
225  {
226  aSaveOpt.SetLoadUserSettings(m_xLoadUserSettingsCB->get_active());
227  }
228 
229  if ( m_xLoadDocPrinterCB->get_state_changed_from_saved() )
230  aSaveOpt.SetLoadDocumentPrinter( m_xLoadDocPrinterCB->get_active() );
231 
232  if ( m_xODFVersionLB->get_value_changed_from_saved() )
233  {
234  sal_Int32 nVersion = m_xODFVersionLB->get_active_id().toInt32();
236  }
237 
238  if ( m_xDocInfoCB->get_state_changed_from_saved() )
239  {
240  rSet->Put( SfxBoolItem( GetWhich( SID_ATTR_DOCINFO ),
241  m_xDocInfoCB->get_active() ) );
242  bModified = true;
243  }
244 
245  if ( m_xBackupCB->get_sensitive() && m_xBackupCB->get_state_changed_from_saved() )
246  {
247  rSet->Put( SfxBoolItem( GetWhich( SID_ATTR_BACKUP ),
248  m_xBackupCB->get_active() ) );
249  bModified = true;
250  }
251 
252  if ( m_xAutoSaveCB->get_state_changed_from_saved() )
253  {
254  rSet->Put( SfxBoolItem( GetWhich( SID_ATTR_AUTOSAVE ),
255  m_xAutoSaveCB->get_active() ) );
256  bModified = true;
257  }
258  if ( m_xWarnAlienFormatCB->get_state_changed_from_saved() )
259  {
260  rSet->Put( SfxBoolItem( GetWhich( SID_ATTR_WARNALIENFORMAT ),
261  m_xWarnAlienFormatCB->get_active() ) );
262  bModified = true;
263  }
264 
265  if ( m_xAutoSaveEdit->get_value_changed_from_saved() )
266  {
267  rSet->Put( SfxUInt16Item( GetWhich( SID_ATTR_AUTOSAVEMINUTE ),
268  static_cast<sal_uInt16>(m_xAutoSaveEdit->get_value()) ) );
269  bModified = true;
270  }
271 
272  if ( m_xUserAutoSaveCB->get_state_changed_from_saved() )
273  {
274  rSet->Put( SfxBoolItem( GetWhich( SID_ATTR_USERAUTOSAVE ),
275  m_xUserAutoSaveCB->get_active() ) );
276  bModified = true;
277  }
278  // save relatively
279  if ( m_xRelativeFsysCB->get_state_changed_from_saved() )
280  {
281  rSet->Put( SfxBoolItem( GetWhich( SID_SAVEREL_FSYS ),
282  m_xRelativeFsysCB->get_active() ) );
283  bModified = true;
284  }
285 
286  if ( m_xRelativeInetCB->get_state_changed_from_saved() )
287  {
288  rSet->Put( SfxBoolItem( GetWhich( SID_SAVEREL_INET ),
289  m_xRelativeInetCB->get_active() ) );
290  bModified = true;
291  }
292 
293  SvtModuleOptions aModuleOpt;
294  if(!pImpl->aDefaultArr[APP_MATH].isEmpty() &&
297 
298  if( !pImpl->aDefaultArr[APP_DRAW].isEmpty() &&
301 
302  if(!pImpl->aDefaultArr[APP_IMPRESS].isEmpty() &&
305 
306  if(!pImpl->aDefaultArr[APP_CALC].isEmpty() &&
309 
310  if(!pImpl->aDefaultArr[APP_WRITER].isEmpty() &&
313 
314  if(!pImpl->aDefaultArr[APP_WRITER_WEB].isEmpty() &&
317 
318  if(!pImpl->aDefaultArr[APP_WRITER_GLOBAL].isEmpty() &&
321 
322  return bModified;
323 }
324 
325 static bool isODFFormat( const OUString& sFilter )
326 {
327  static const char* aODFFormats[] =
328  {
329  "writer8",
330  "writer8_template",
331  "writerglobal8",
332  "writerglobal8_writer",
333  "calc8",
334  "calc8_template",
335  "draw8",
336  "draw8_template",
337  "impress8",
338  "impress8_template",
339  "impress8_draw",
340  "chart8",
341  "math8",
342  nullptr
343  };
344 
345  bool bRet = false;
346  int i = 0;
347  while ( aODFFormats[i] != nullptr )
348  {
349  if ( sFilter.equalsAscii( aODFFormats[i++] ) )
350  {
351  bRet = true;
352  break;
353  }
354  }
355 
356  return bRet;
357 }
358 
360 {
361  SvtSaveOptions aSaveOpt;
362  m_xLoadUserSettingsCB->set_active(aSaveOpt.IsLoadUserSettings());
363  m_xLoadUserSettingsCB->save_state();
365  m_xLoadDocPrinterCB->set_active( aSaveOpt.IsLoadDocumentPrinter() );
366  m_xLoadDocPrinterCB->save_state();
368 
369  if ( !pImpl->bInitialized )
370  {
371  try
372  {
374  pImpl->xFact.set(xMSF->createInstance("com.sun.star.document.FilterFactory"), UNO_QUERY);
375 
376  DBG_ASSERT(pImpl->xFact.is(), "service com.sun.star.document.FilterFactory unavailable");
377  Reference< XContainerQuery > xQuery(pImpl->xFact, UNO_QUERY);
378  if(xQuery.is())
379  {
380  for (sal_Int32 n = 0, nEntryCount = m_xDocTypeLB->get_count(); n < nEntryCount; ++n)
381  {
382  unsigned int nData = m_xDocTypeLB->get_id(n).toUInt32();
383  OUString sCommand = "getSortedFilterList():module=%1:iflags=" +
384  OUString::number(static_cast<int>(SfxFilterFlags::IMPORT|SfxFilterFlags::EXPORT)) +
385  ":eflags=" +
386  OUString::number(static_cast<int>(SfxFilterFlags::NOTINFILEDLG));
387  OUString sReplace;
388  switch(nData)
389  {
390  case APP_WRITER : sReplace = "com.sun.star.text.TextDocument"; break;
391  case APP_WRITER_WEB : sReplace = "com.sun.star.text.WebDocument"; break;
392  case APP_WRITER_GLOBAL : sReplace = "com.sun.star.text.GlobalDocument"; break;
393  case APP_CALC : sReplace = "com.sun.star.sheet.SpreadsheetDocument";break;
394  case APP_IMPRESS : sReplace = "com.sun.star.presentation.PresentationDocument";break;
395  case APP_DRAW : sReplace = "com.sun.star.drawing.DrawingDocument";break;
396  case APP_MATH : sReplace = "com.sun.star.formula.FormulaProperties";break;
397  default: OSL_FAIL("illegal user data");
398  }
399  sCommand = sCommand.replaceFirst("%1", sReplace);
400  Reference< XEnumeration > xList = xQuery->createSubSetEnumerationByQuery(sCommand);
401  std::vector< OUString > lList;
402  std::vector<bool> lODFList;
403  while(xList->hasMoreElements())
404  {
405  SequenceAsHashMap aFilter(xList->nextElement());
406  OUString sFilter = aFilter.getUnpackedValueOrDefault("Name",OUString());
407  if (!sFilter.isEmpty())
408  {
409  lList.push_back(sFilter);
410  lODFList.push_back( isODFFormat( sFilter ) );
411  }
412  }
413  pImpl->aFilterArr[nData] = lList;
414  pImpl->aODFArr[nData] = lODFList;
415  }
416  }
417  m_xDocTypeLB->set_active(0);
418  FilterHdl_Impl(*m_xDocTypeLB);
419  }
420  catch(Exception const &)
421  {
422  TOOLS_WARN_EXCEPTION( "cui.options", "exception in FilterFactory access" );
423  }
424 
425  pImpl->bInitialized = true;
426  }
427 
428  m_xDocInfoCB->set_active(aSaveOpt.IsDocInfoSave());
430 
431  m_xBackupCB->set_active(aSaveOpt.IsBackup());
432  m_xBackupCB->set_sensitive(!aSaveOpt.IsReadOnly(SvtSaveOptions::EOption::Backup));
433 
434  m_xAutoSaveCB->set_active(aSaveOpt.IsAutoSave());
436 
437  m_xUserAutoSaveCB->set_active(aSaveOpt.IsUserAutoSave());
439 
440  m_xWarnAlienFormatCB->set_active(aSaveOpt.IsWarnAlienFormat());
442 
443  m_xAutoSaveEdit->set_value(aSaveOpt.GetAutoSaveTime());
445 
446  // save relatively
447  m_xRelativeFsysCB->set_active(aSaveOpt.IsSaveRelFSys());
449 
450  m_xRelativeInetCB->set_active(aSaveOpt.IsSaveRelINet());
452 
453  sal_Int32 nDefaultVersion = aSaveOpt.GetODFDefaultVersion();
454  m_xODFVersionLB->set_active_id(OUString::number(nDefaultVersion));
456 
457  AutoClickHdl_Impl(*m_xAutoSaveCB);
458  ODFVersionHdl_Impl(*m_xODFVersionLB);
459 
460  m_xDocInfoCB->save_state();
461  m_xBackupCB->save_state();
462  m_xWarnAlienFormatCB->save_state();
463  m_xAutoSaveCB->save_state();
464  m_xAutoSaveEdit->save_value();
465 
466  m_xUserAutoSaveCB->save_state();
467 
468  m_xRelativeFsysCB->save_state();
469  m_xRelativeInetCB->save_state();
470  m_xODFVersionLB->save_value();
471 }
472 
473 IMPL_LINK(SvxSaveTabPage, AutoClickHdl_Impl, weld::Button&, rBox, void)
474 {
475  if (&rBox != m_xAutoSaveCB.get())
476  return;
477 
478  if (m_xAutoSaveCB->get_active())
479  {
480  m_xAutoSaveEdit->set_sensitive(true);
481  m_xMinuteFT->set_sensitive(true);
482  m_xUserAutoSaveCB->set_sensitive(true);
483  }
484  else
485  {
486  m_xAutoSaveEdit->set_sensitive(false);
487  m_xMinuteFT->set_sensitive(false);
488  m_xUserAutoSaveCB->set_sensitive(false);
489  }
490 }
491 
492 static OUString lcl_ExtracUIName(const Sequence<PropertyValue> &rProperties, std::u16string_view rExtension)
493 {
494  OUString sName;
495  const PropertyValue* pPropVal = rProperties.getConstArray();
496  const PropertyValue* const pEnd = pPropVal + rProperties.getLength();
497  for( ; pPropVal != pEnd; pPropVal++ )
498  {
499  const OUString &rName = pPropVal->Name;
500  if (rName == "UIName")
501  {
502  OUString sUIName;
503  if ( ( pPropVal->Value >>= sUIName ) && sUIName.getLength() )
504  {
505  if (!rExtension.empty())
506  {
507  return sUIName + " (" + rExtension + ")";
508  }
509  else
510  {
511  return sUIName;
512  }
513  }
514  }
515  else if (rName == "Name")
516  {
517  pPropVal->Value >>= sName;
518  }
519  }
520 
521  OSL_ENSURE( false, "Filter without UIName!" );
522 
523  return sName;
524 }
525 
526 IMPL_LINK( SvxSaveTabPage, FilterHdl_Impl, weld::ComboBox&, rBox, void )
527 {
528  const int nCurPos = m_xDocTypeLB->get_active();
529 
530  int nData = -1;
531  if (nCurPos < APP_COUNT)
532  nData = m_xDocTypeLB->get_id(nCurPos).toInt32();
533 
534  if ( nData >= 0 && nData < APP_COUNT )
535  {
536  if(m_xDocTypeLB.get() == &rBox)
537  {
538  m_xSaveAsLB->clear();
539  auto & rFilters = pImpl->aFilterArr[nData];
540  if(pImpl->aUIFilterArr[nData].empty())
541  {
542  pImpl->aUIFilterArr[nData].resize(pImpl->aFilterArr[nData].size());
543  auto & rUIFilters = pImpl->aUIFilterArr[nData];
544  for(size_t nFilter = 0; nFilter < pImpl->aFilterArr[nData].size(); nFilter++)
545  {
546  Any aProps = pImpl->xFact->getByName(rFilters[nFilter]);
547  // get the extension of the filter
548  OUString extension;
549  SfxFilterMatcher matcher;
550  std::shared_ptr<const SfxFilter> pFilter = matcher.GetFilter4FilterName(rFilters[nFilter]);
551  if (pFilter)
552  {
553  extension = pFilter->GetWildcard().getGlob().getToken(0, ';');
554  }
556  aProps >>= aProperties;
557  rUIFilters[nFilter] = lcl_ExtracUIName(aProperties, extension);
558  }
559  }
560  auto const & rUIFilters = pImpl->aUIFilterArr[nData];
561  OUString sSelect;
562  for(size_t i = 0; i < pImpl->aUIFilterArr[nData].size(); i++)
563  {
564  OUString sId;
565  if (pImpl->aODFArr[nData][i])
566  sId = OUString::number(reinterpret_cast<sal_Int64>(pImpl.get()));
567  m_xSaveAsLB->append(sId, rUIFilters[i]);
568  if (rFilters[i] == pImpl->aDefaultArr[nData])
569  sSelect = rUIFilters[i];
570  }
571  if (!sSelect.isEmpty())
572  {
573  m_xSaveAsLB->set_active_text(sSelect);
574  }
575 
576  m_xSaveAsFT->set_sensitive(!pImpl->aDefaultReadonlyArr[nData]);
577  m_xSaveAsLB->set_sensitive(!pImpl->aDefaultReadonlyArr[nData]);
578  }
579  else
580  {
581  OUString sSelect = rBox.get_active_text();
582  auto const & rFilters = pImpl->aFilterArr[nData];
583  auto const & rUIFilters = pImpl->aUIFilterArr[nData];
584  for(size_t i = 0; i < pImpl->aUIFilterArr[nData].size(); i++)
585  if(rUIFilters[i] == sSelect)
586  {
587  sSelect = rFilters[i];
588  break;
589  }
590 
591  pImpl->aDefaultArr[nData] = sSelect;
592  }
593  }
594 
595  ODFVersionHdl_Impl( *m_xSaveAsLB );
596 }
597 
598 IMPL_LINK_NOARG(SvxSaveTabPage, ODFVersionHdl_Impl, weld::ComboBox&, void)
599 {
600  sal_Int32 nVersion = m_xODFVersionLB->get_active_id().toInt32();
602  if ( bShown )
603  {
604  bool bHasODFFormat = false;
605  const int nCount = m_xSaveAsLB->get_count();
606  for (int i = 0; i < nCount; ++i )
607  {
608  if ( m_xSaveAsLB->get_id(i).toInt64() != 0 )
609  {
610  bHasODFFormat = true;
611  break;
612  }
613  }
614 
615  bShown = !bHasODFFormat
616  || ( m_xSaveAsLB->get_active_id().toInt64() != 0);
617  }
618 
619  m_xODFWarningFI->set_visible(bShown);
620  m_xODFWarningFT->set_visible(bShown);
621 }
622 
623 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define APP_COUNT
Definition: optsave.hxx:31
static OUString lcl_ExtracUIName(const Sequence< PropertyValue > &rProperties, std::u16string_view rExtension)
Definition: optsave.cxx:492
void SetLoadDocumentPrinter(bool _bEnable)
void DetectHiddenControls()
Definition: optsave.cxx:194
bool IsSaveRelFSys() const
std::unique_ptr< weld::CheckButton > m_xBackupCB
Definition: optsave.hxx:47
#define APP_MATH
Definition: optsave.hxx:30
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optsave.cxx:188
bool IsModuleInstalled(EModule eModule) const
bool IsDefaultFilterReadonly(EFactory eFactory) const
void SetFactoryDefaultFilter(EFactory eFactory, const OUString &sFilter)
sal_Int64 n
bool IsReadOnly(EOption eOption) const
#define APP_CALC
Definition: optsave.hxx:27
std::unique_ptr< weld::ComboBox > m_xODFVersionLB
Definition: optsave.hxx:54
bool IsWarnAlienFormat() const
bool IsDocInfoSave() const
std::unique_ptr< weld::ComboBox > m_xDocTypeLB
Definition: optsave.hxx:56
bool IsLoadUserSettings() const
std::unique_ptr< weld::CheckButton > m_xRelativeInetCB
Definition: optsave.hxx:53
static bool isODFFormat(const OUString &sFilter)
Definition: optsave.cxx:325
PropertiesInfo aProperties
std::unique_ptr< weld::SpinButton > m_xAutoSaveEdit
Definition: optsave.hxx:49
int nCount
bool IsAutoSave() const
std::unique_ptr< SvxSaveTabPage_Impl > pImpl
Definition: optsave.hxx:42
std::unique_ptr< weld::CheckButton > m_xDocInfoCB
Definition: optsave.hxx:46
const char * sName
std::unique_ptr< weld::CheckButton > m_xLoadDocPrinterCB
Definition: optsave.hxx:45
std::unique_ptr< weld::Label > m_xMinuteFT
Definition: optsave.hxx:50
TValueType getUnpackedValueOrDefault(const OUString &sKey, const TValueType &aDefault) const
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_ASSERT(sCon, aError)
int i
std::unique_ptr< weld::CheckButton > m_xAutoSaveCB
Definition: optsave.hxx:48
#define APP_WRITER_GLOBAL
Definition: optsave.hxx:26
float u
void SetLoadUserSettings(bool b)
bool IsUserAutoSave() const
std::unique_ptr< weld::ComboBox > m_xSaveAsLB
Definition: optsave.hxx:58
#define APP_WRITER_WEB
Definition: optsave.hxx:25
sal_Int16 nVersion
ODFDefaultVersion GetODFDefaultVersion() const
bool IsSaveRelINet() const
IMPL_LINK_NOARG(SvxSaveTabPage, ODFVersionHdl_Impl, weld::ComboBox &, void)
Definition: optsave.cxx:598
std::unique_ptr< weld::CheckButton > m_xRelativeFsysCB
Definition: optsave.hxx:52
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
Reference< XMultiServiceFactory > getProcessServiceFactory()
bool IsOptionHidden(std::u16string_view _rOption, std::u16string_view _rPage, std::u16string_view _rGroup) const
std::shared_ptr< const SfxFilter > GetFilter4FilterName(const OUString &rName, SfxFilterFlags nMust=SfxFilterFlags::NONE, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED) const
OUString GetFactoryDefaultFilter(EFactory eFactory) const
sal_Int32 GetAutoSaveTime() const
void SetODFDefaultVersion(ODFDefaultVersion eVersion)
virtual void Reset(const SfxItemSet *rSet) override
Definition: optsave.cxx:359
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optsave.cxx:220
#define APP_DRAW
Definition: optsave.hxx:29
Reference< XNameContainer > xFact
Definition: optsave.cxx:56
OUString sId
#define APP_IMPRESS
Definition: optsave.hxx:28
IMPL_LINK(SvxSaveTabPage, AutoClickHdl_Impl, weld::Button &, rBox, void)
Definition: optsave.cxx:473
bool IsBackup() const
#define CFG_PAGE_AND_GROUP
Definition: optsave.cxx:51
std::unique_ptr< weld::CheckButton > m_xWarnAlienFormatCB
Definition: optsave.hxx:55
std::unique_ptr< weld::CheckButton > m_xLoadUserSettingsCB
Definition: optsave.hxx:44
virtual ~SvxSaveTabPage() override
Definition: optsave.cxx:184
bool IsLoadDocumentPrinter() const
SvxSaveTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optsave.cxx:73
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
#define APP_WRITER
Definition: optsave.hxx:24
std::unique_ptr< weld::CheckButton > m_xUserAutoSaveCB
Definition: optsave.hxx:51