21 #include <string_view>
23 #include <config_features.h>
24 #include <config_feature_opencl.h>
25 #include <config_feature_desktop.h>
26 #include <config_gpgme.h>
28 #include <officecfg/Office/Common.hxx>
30 #include <svx/dialogs.hrc>
31 #include <svx/svxids.hrc>
33 #include <treeopt.hrc>
42 #include <dialmgr.hxx>
56 #if HAVE_FEATURE_OPENCL
67 #include <com/sun/star/awt/XContainerWindowEventHandler.hpp>
68 #include <com/sun/star/awt/ContainerWindowProvider.hpp>
69 #include <com/sun/star/awt/XControl.hpp>
70 #include <com/sun/star/awt/PosSize.hpp>
71 #include <com/sun/star/frame/Desktop.hpp>
72 #include <com/sun/star/frame/ModuleManager.hpp>
73 #include <com/sun/star/frame/UnknownModuleException.hpp>
74 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
75 #include <com/sun/star/linguistic2/LinguProperties.hpp>
76 #include <com/sun/star/setup/UpdateCheck.hpp>
83 #include <officecfg/Office/OptionsDialog.hxx>
140 struct ModuleToGroupNameMap_Impl
142 std::u16string_view m_pModule;
143 OUString m_sGroupName;
144 sal_uInt16 m_nNodeId;
150 {
u"ProductName", OUString(), SID_GENERAL_OPTIONS },
151 {
u"LanguageSettings", OUString(), SID_LANGUAGE_OPTIONS },
152 {
u"Internet", OUString(), SID_INET_DLG },
153 {
u"LoadSave", OUString(), SID_FILTER_DLG },
154 {
u"Writer", OUString(), SID_SW_EDITOPTIONS },
155 {
u"WriterWeb", OUString(), SID_SW_ONLINEOPTIONS },
156 {
u"Math", OUString(), SID_SM_EDITOPTIONS },
157 {
u"Calc", OUString(), SID_SC_EDITOPTIONS },
158 {
u"Impress", OUString(), SID_SD_EDITOPTIONS },
159 {
u"Draw", OUString(), SID_SD_GRAPHIC_OPTIONS },
160 {
u"Charts", OUString(), SID_SCH_EDITOPTIONS },
161 {
u"Base", OUString(), SID_SB_STARBASEOPTIONS },
164 static void setGroupName( std::u16string_view rModule,
const OUString& rGroupName )
166 for (ModuleToGroupNameMap_Impl& rEntry : ModuleMap)
168 if ( rEntry.m_pModule == rModule )
170 rEntry.m_sGroupName = rGroupName;
176 static OUString
getGroupName( std::u16string_view rModule,
bool bForced )
179 for (
const ModuleToGroupNameMap_Impl& rEntry : ModuleMap)
181 if ( rEntry.m_pModule == rModule )
183 sGroupName = rEntry.m_sGroupName;
188 if ( sGroupName.isEmpty() && bForced )
190 if ( rModule ==
u"Writer" )
192 else if ( rModule ==
u"WriterWeb" )
193 sGroupName =
CuiResId(SID_SW_ONLINEOPTIONS_RES[0].first);
194 else if ( rModule ==
u"Calc" )
195 sGroupName =
CuiResId(SID_SC_EDITOPTIONS_RES[0].first);
196 else if ( rModule ==
u"Impress" )
197 sGroupName =
CuiResId(SID_SD_EDITOPTIONS_RES[0].first);
198 else if ( rModule ==
u"Draw" )
199 sGroupName =
CuiResId(SID_SD_GRAPHIC_OPTIONS_RES[0].first);
200 else if ( rModule ==
u"Math" )
201 sGroupName =
CuiResId(SID_SM_EDITOPTIONS_RES[0].first);
202 else if ( rModule ==
u"Base" )
203 sGroupName =
CuiResId(SID_SB_STARBASEOPTIONS_RES[0].first);
210 for (ModuleToGroupNameMap_Impl& rEntry : ModuleMap)
211 rEntry.m_sGroupName.clear();
216 sal_uInt16 nNodeId = 0xFFFF;
217 for (
const ModuleToGroupNameMap_Impl& rEntry : ModuleMap)
219 if ( rEntry.m_pModule == rModule )
221 nNodeId = rEntry.m_nNodeId;
235 bool bIsEmailSupported;
242 virtual void Notify(
const css::uno::Sequence< OUString >& _rPropertyNames)
override;
244 bool IsEmailSupported()
const {
return bIsEmailSupported;}
250 MailMergeCfg_Impl::MailMergeCfg_Impl() :
251 utl::ConfigItem(
"Office.Writer/MailMergeWizard"),
252 bIsEmailSupported(
false)
255 const Sequence< Any > aValues = GetProperties(aNames);
257 if(aValues.hasElements() && pValues[0].hasValue())
258 pValues[0] >>= bIsEmailSupported;
261 void MailMergeCfg_Impl::ImplCommit()
265 void MailMergeCfg_Impl::Notify(
const css::uno::Sequence< OUString >& )
288 #if HAVE_FEATURE_DESKTOP
302 #if HAVE_FEATURE_OPENCL
307 #if HAVE_FEATURE_SCRIPTING
312 return fnCreate ? (*fnCreate)( pPage, pController, &rSet ) :
nullptr;
317 struct OptionsMapping_Impl
319 const char* m_pGroupName;
320 const char* m_pPageName;
321 sal_uInt16 m_nPageId;
329 {
"ProductName",
nullptr, SID_GENERAL_OPTIONS },
343 {
"LanguageSettings",
nullptr, SID_LANGUAGE_OPTIONS },
349 {
"Internet",
nullptr, SID_INET_DLG },
352 {
"LoadSave",
nullptr, SID_FILTER_DLG },
354 {
"LoadSave",
"VBAProperties", SID_OPTFILTER_MSOFFICE },
357 {
"Writer",
nullptr, SID_SW_EDITOPTIONS },
358 {
"Writer",
"General", RID_SW_TP_OPTLOAD_PAGE },
359 {
"Writer",
"View", RID_SW_TP_CONTENT_OPT },
360 {
"Writer",
"FormattingAids", RID_SW_TP_OPTSHDWCRSR },
361 {
"Writer",
"Grid", RID_SVXPAGE_GRID },
362 {
"Writer",
"BasicFontsWestern", RID_SW_TP_STD_FONT },
363 {
"Writer",
"BasicFontsAsian", RID_SW_TP_STD_FONT_CJK },
364 {
"Writer",
"BasicFontsCTL", RID_SW_TP_STD_FONT_CTL },
365 {
"Writer",
"Print", RID_SW_TP_OPTPRINT_PAGE },
366 {
"Writer",
"Table", RID_SW_TP_OPTTABLE_PAGE },
367 {
"Writer",
"Changes", RID_SW_TP_REDLINE_OPT },
368 {
"Writer",
"Comparison", RID_SW_TP_COMPARISON_OPT },
369 {
"Writer",
"Compatibility", RID_SW_TP_OPTCOMPATIBILITY_PAGE },
370 {
"Writer",
"AutoCaption", RID_SW_TP_OPTCAPTION_PAGE },
371 {
"Writer",
"MailMerge", RID_SW_TP_MAILCONFIG },
372 {
"WriterWeb",
nullptr, SID_SW_ONLINEOPTIONS },
373 {
"WriterWeb",
"View", RID_SW_TP_HTML_CONTENT_OPT },
374 {
"WriterWeb",
"FormattingAids", RID_SW_TP_HTML_OPTSHDWCRSR },
375 {
"WriterWeb",
"Grid", RID_SW_TP_HTML_OPTGRID_PAGE },
376 {
"WriterWeb",
"Print", RID_SW_TP_HTML_OPTPRINT_PAGE },
377 {
"WriterWeb",
"Table", RID_SW_TP_HTML_OPTTABLE_PAGE },
378 {
"WriterWeb",
"Background", RID_SW_TP_BACKGROUND },
379 {
"Math",
nullptr, SID_SM_EDITOPTIONS },
380 {
"Math",
"Settings", SID_SM_TP_PRINTOPTIONS },
381 {
"Calc",
nullptr, SID_SC_EDITOPTIONS },
382 {
"Calc",
"General", SID_SC_TP_LAYOUT },
383 {
"Calc",
"View", SID_SC_TP_CONTENT },
384 {
"Calc",
"Calculate", SID_SC_TP_CALC },
385 {
"Calc",
"Formula", SID_SC_TP_FORMULA },
386 {
"Calc",
"SortLists", SID_SC_TP_USERLISTS },
387 {
"Calc",
"Changes", SID_SC_TP_CHANGES },
388 {
"Calc",
"Compatibility", SID_SC_TP_COMPATIBILITY },
389 {
"Calc",
"Grid", SID_SC_TP_GRID },
390 {
"Calc",
"Print", RID_SC_TP_PRINT },
391 {
"Impress",
nullptr, SID_SD_EDITOPTIONS },
392 {
"Impress",
"General", SID_SI_TP_MISC },
393 {
"Impress",
"View", SID_SI_TP_CONTENTS },
394 {
"Impress",
"Grid", SID_SI_TP_SNAP },
395 {
"Impress",
"Print", SID_SI_TP_PRINT },
396 {
"Draw",
nullptr, SID_SD_GRAPHIC_OPTIONS },
397 {
"Draw",
"General", SID_SD_TP_MISC },
398 {
"Draw",
"View", SID_SD_TP_CONTENTS },
399 {
"Draw",
"Grid", SID_SD_TP_SNAP },
400 {
"Draw",
"Print", SID_SD_TP_PRINT },
401 {
"Charts",
nullptr, SID_SCH_EDITOPTIONS },
403 {
"Base",
nullptr, SID_SB_STARBASEOPTIONS },
404 {
"Base",
"Connections", SID_SB_CONNECTIONPOOLING },
405 {
"Base",
"Databases", SID_SB_DBREGISTEROPTIONS },
406 {
nullptr,
nullptr, 0 }
414 while ( OptionsMap_Impl[nIdx].m_pGroupName !=
nullptr )
416 if ( _nPageId == OptionsMap_Impl[nIdx].m_nPageId )
419 _rGroupName = OUString::createFromAscii( OptionsMap_Impl[nIdx].m_pGroupName );
420 if ( OptionsMap_Impl[nIdx].m_pPageName !=
nullptr )
421 _rPageName = OUString::createFromAscii( OptionsMap_Impl[nIdx].m_pPageName );
432 bool bIsHidden =
false;
433 OUString sGroupName, sPageName;
436 if ( sPageName.isEmpty() )
439 bIsHidden = _rOptOptions.
IsPageHidden( sPageName, sGroupName );
465 m_pModule( pMod ), m_nDialogId( nId ) {}
469 , m_pParent ( pParent )\
470 , sTitle ( m_xDialog->get_title() )\
471 , bForgetSelection ( false )\
472 , bIsFromExtensionManager( false ) \
473 , bIsForSetDocumentLanguage( false ) \
474 , bNeedsRestart ( false ) \
475 , eRestartReason( svtools::RESTART_REASON_NONE )
479 xOkPB = m_xBuilder->weld_button(
"ok");
480 xApplyPB = m_xBuilder->weld_button(
"apply");
481 xBackPB = m_xBuilder->weld_button(
"revert");
482 xTreeLB = m_xBuilder->weld_tree_view(
"pages");
483 xTabBox = m_xBuilder->weld_container(
"box");
484 Size aSize(
xTreeLB->get_approximate_digit_width() * 82,
xTreeLB->get_height_rows(30));
485 #if HAVE_FEATURE_GPGME
489 xTabBox->set_size_request(aSize.Width(), aSize.Height());
490 xTreeLB->set_size_request(
xTreeLB->get_approximate_digit_width() * 35, aSize.Height());
503 if (bActivateLastSelection)
526 std::unique_ptr<weld::TreeIter> xEntry =
xTreeLB->make_iterator();
527 bool bEntry =
xTreeLB->get_iter_first(*xEntry);
532 if (
xTreeLB->get_iter_depth(*xEntry))
537 pPageInfo->
m_xPage->FillUserData();
538 OUString aPageData(pPageInfo->
m_xPage->GetUserData());
539 if ( !aPageData.isEmpty() )
561 bEntry =
xTreeLB->iter_next(*xEntry);
565 bEntry =
xTreeLB->get_iter_first(*xEntry);
568 if (!
xTreeLB->get_iter_depth(*xEntry))
573 bEntry =
xTreeLB->iter_next(*xEntry);
579 sal_uInt16 nId,
const OUString& rPageName, sal_uInt16 nGroup )
581 std::unique_ptr<weld::TreeIter> xParent =
xTreeLB->make_iterator();
582 if (!
xTreeLB->get_iter_first(*xParent))
584 xTreeLB->iter_nth_sibling(*xParent, nGroup);
588 xTreeLB->insert(xParent.get(), -1, &rPageName, &sId,
nullptr,
nullptr,
false,
nullptr);
596 sal_uInt16 nDialogId )
601 xTreeLB->append(sId, rGroupName);
604 std::unique_ptr<weld::TreeIter> xEntry =
xTreeLB->make_iterator();
605 bool bEntry =
xTreeLB->get_iter_first(*xEntry);
608 if (!
xTreeLB->get_iter_depth(*xEntry))
610 bEntry =
xTreeLB->iter_next(*xEntry);
629 xTreeLB->iter_parent(*xParent);
631 weld::fromId<OptionsGroupInfo*>(
xTreeLB->get_id(*xParent));
640 ResetCurrentPageFromConfig();
645 std::unique_ptr<weld::TreeIter> xEntry =
xTreeLB->make_iterator();
646 bool bEntry =
xTreeLB->get_iter_first(*xEntry);
649 if (
xTreeLB->get_iter_depth(*xEntry))
652 if ( pPageInfo->
m_xPage && !pPageInfo->
m_xPage->HasExchangeSupport() )
654 std::unique_ptr<weld::TreeIter> xParent =
xTreeLB->make_iterator(xEntry.get());
655 xTreeLB->iter_parent(*xParent);
657 weld::fromId<OptionsGroupInfo*>(
xTreeLB->get_id(*xParent));
672 bEntry =
xTreeLB->iter_next(*xEntry);
679 if (pHelp && xCurrentPageEntry && xTreeLB->get_iter_depth(*xCurrentPageEntry))
681 OptionsPageInfo* pPageInfo = weld::fromId<OptionsPageInfo*>(xTreeLB->get_id(*xCurrentPageEntry));
684 OString sHelpId(pPageInfo->
m_xPage->GetHelpId());
685 pHelp->
Start(OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8),
m_xDialog.get());
694 bool bOkPressed = &rButton == xOkPB.get();
698 if (xCurrentPageEntry && xTreeLB->get_iter_depth(*xCurrentPageEntry))
700 OptionsPageInfo* pPageInfo = weld::fromId<OptionsPageInfo*>(xTreeLB->get_id(*xCurrentPageEntry));
703 std::unique_ptr<weld::TreeIter> xParent = xTreeLB->make_iterator(xCurrentPageEntry.get());
704 xTreeLB->iter_parent(*xParent);
706 pGroupInfo = weld::fromId<OptionsGroupInfo*>(xTreeLB->get_id(*xParent));
708 && pPageInfo->
m_xPage->HasExchangeSupport() )
711 if ( nLeave == DeactivateRC::KeepPage )
714 assert(xTreeLB->is_selected(*xCurrentPageEntry));
737 auto xInItemSet = pGroupInfo->
m_pShell
746 ResetCurrentPageFromConfig();
748 xCurrentPageEntry.reset();
765 pParent, eRestartReason);
766 if (bRestart && !bOkPressed)
772 std::unique_ptr<weld::TreeIter> xEntry =
xTreeLB->make_iterator();
773 bool bEntry =
xTreeLB->get_iter_first(*xEntry);
776 if (!
xTreeLB->get_iter_depth(*xEntry))
787 bEntry =
xTreeLB->iter_next(*xEntry);
833 std::unique_ptr<weld::TreeIter> xEntry;
839 if ( sLastURL.isEmpty() )
847 std::unique_ptr<weld::TreeIter> xTemp =
xTreeLB->make_iterator();
848 bool bTemp =
xTreeLB->get_iter_first(*xTemp);
852 if (
xTreeLB->get_iter_depth(*xTemp) &&
xTreeLB->get_id(*xTemp).toInt64())
864 || ( !pPageInfo->
m_nPageId && sLastURL == sPageURL ) )
866 xEntry =
xTreeLB->make_iterator(xTemp.get());
870 bTemp =
xTreeLB->iter_next(*xTemp);
876 xEntry =
xTreeLB->make_iterator();
877 if (!
xTreeLB->get_iter_first(*xEntry) || !
xTreeLB->iter_next(*xEntry))
884 std::unique_ptr<weld::TreeIter> xParent(
xTreeLB->make_iterator(xEntry.get()));
885 xTreeLB->iter_parent(*xParent);
887 xTreeLB->scroll_to_row(*xParent);
888 xTreeLB->scroll_to_row(*xEntry);
909 std::unique_ptr<weld::TreeIter> xEntry(
xTreeLB->make_iterator());
911 if (!
xTreeLB->get_cursor(xEntry.get()))
917 std::unique_ptr<weld::TreeIter> xParent(
xTreeLB->make_iterator(xEntry.get()));
918 bool bParent =
xTreeLB->iter_parent(*xParent);
929 if (pOptPageInfo && pOptPageInfo->
m_xPage && pOptPageInfo->
m_xPage->IsVisible())
932 xTreeLB->iter_parent(*xCurParent);
939 if ( nLeave == DeactivateRC::KeepPage )
947 pOptPageInfo->
m_xPage->set_visible(
false);
949 else if ( pOptPageInfo && pOptPageInfo->
m_xExtPage )
963 if(!pPageInfo->
m_xPage && pGroupInfo->m_pModule)
964 pPageInfo->
m_xPage = pGroupInfo->m_pModule->CreateTabPage(pPageInfo->
m_nPageId,
xTabBox.get(),
this, *pGroupInfo->m_pInItemSet);
971 pPageInfo->
m_xPage->Reset( &*pGroupInfo->m_pInItemSet );
981 pPageInfo->
m_xExtPage = std::make_unique<ExtensionsTabPage>(
988 pPageInfo->
m_xPage->HasExchangeSupport())
990 pPageInfo->
m_xPage->ActivatePage(*pGroupInfo->m_pOutItemSet);
992 pPageInfo->
m_xPage->set_visible(
true);
1001 OUString sTitleText =
sTitle
1002 +
" - " +
xTreeLB->get_text(*xParent)
1003 +
" - " +
xTreeLB->get_text(*xEntry);
1023 pNewPage = pPageInfo->
m_xPage.get();
1026 OString sHelpId(pNewPage ? pNewPage->
GetHelpId() : OString());
1027 if (sHelpId.isEmpty())
1029 xTreeLB->set_help_id(sHelpId);
1035 std::optional<SfxItemSet> pRet;
1038 case SID_GENERAL_OPTIONS:
1043 SID_HTML_MODE, SID_HTML_MODE,
1044 SID_ATTR_METRIC, SID_ATTR_METRIC,
1045 SID_AUTOSPELL_CHECK, SID_AUTOSPELL_CHECK,
1046 SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER,
1047 SID_ATTR_YEAR2000, SID_ATTR_YEAR2000> );
1060 if( SfxItemState::DEFAULT <= pDispatch->QueryState( SID_ATTR_YEAR2000, pItem ) )
1063 pRet->Put(
SfxUInt16Item( SID_ATTR_YEAR2000, officecfg::Office::Common::DateFormat::TwoDigitYear::get() ) );
1066 pRet->Put(
SfxUInt16Item( SID_ATTR_YEAR2000, officecfg::Office::Common::DateFormat::TwoDigitYear::get() ) );
1070 pRet->Put(
SfxBoolItem(SID_PRINTER_NOTFOUND_WARN, officecfg::Office::Common::Print::Warning::NotFound::get()));
1072 SfxPrinterChangeFlags nFlag = officecfg::Office::Common::Print::Warning::PaperSize::get() ? SfxPrinterChangeFlags::CHG_SIZE : SfxPrinterChangeFlags::NONE;
1073 nFlag |= officecfg::Office::Common::Print::Warning::PaperOrientation::get() ? SfxPrinterChangeFlags::CHG_ORIENTATION : SfxPrinterChangeFlags::NONE;
1074 pRet->Put(
SfxFlagItem( SID_PRINTER_CHANGESTODOC, static_cast<int>(nFlag) ));
1078 case SID_LANGUAGE_OPTIONS :
1083 SID_ATTR_CHAR_CJK_LANGUAGE, SID_ATTR_CHAR_CJK_LANGUAGE,
1084 SID_ATTR_CHAR_CTL_LANGUAGE, SID_ATTR_CHAR_CTL_LANGUAGE,
1085 SID_SET_DOCUMENT_LANGUAGE, SID_SET_DOCUMENT_LANGUAGE,
1086 SID_ATTR_LANGUAGE, SID_ATTR_LANGUAGE,
1087 SID_AUTOSPELL_CHECK, SID_AUTOSPELL_CHECK,
1088 SID_OPT_LOCALE_CHANGED, SID_OPT_LOCALE_CHANGED>);
1093 sal_Int16 nMinLead = 2,
1097 nMinLead = xProp->getHyphMinLeading();
1098 nMinTrail = xProp->getHyphMinTrailing();
1108 if(SfxItemState::DEFAULT <= pDispatch->QueryState(SID_ATTR_LANGUAGE, pLangItem))
1109 pRet->Put(*pLangItem, SID_ATTR_LANGUAGE);
1110 if(SfxItemState::DEFAULT <= pDispatch->QueryState(SID_ATTR_CHAR_CJK_LANGUAGE, pLangItem))
1111 pRet->Put(*pLangItem, SID_ATTR_CHAR_CJK_LANGUAGE);
1112 if(SfxItemState::DEFAULT <= pDispatch->QueryState(SID_ATTR_CHAR_CTL_LANGUAGE, pLangItem))
1113 pRet->Put(*pLangItem, SID_ATTR_CHAR_CTL_LANGUAGE);
1117 if(SfxItemState::DEFAULT <= pDispatch->QueryState(SID_AUTOSPELL_CHECK, pItem))
1119 pRet->Put(std::unique_ptr<SfxPoolItem>(pItem->
Clone()));
1126 bVal = xProp->getIsSpellAuto();
1129 pRet->Put(
SfxBoolItem(SID_AUTOSPELL_CHECK, bVal));
1139 SID_SAVEREL_INET, SID_SAVEREL_FSYS,
1140 SID_INET_NOPROXY, SID_INET_FTP_PROXY_PORT,
1141 SID_SECURE_URL, SID_SECURE_URL> );
1144 case SID_FILTER_DLG:
1148 SID_ATTR_WARNALIENFORMAT, SID_ATTR_WARNALIENFORMAT,
1149 SID_ATTR_DOCINFO, SID_ATTR_AUTOSAVEMINUTE,
1150 SID_SAVEREL_INET, SID_SAVEREL_FSYS,
1151 SID_ATTR_PRETTYPRINTING, SID_ATTR_PRETTYPRINTING> );
1155 case SID_SB_STARBASEOPTIONS:
1157 svl::Items<SID_SB_POOLING_ENABLED, SID_SB_DB_REGISTER> );
1162 case SID_SCH_EDITOPTIONS:
1165 pRet.emplace(
SfxGetpApp()->GetPool(), svl::Items<SID_SCH_EDITOPTIONS, SID_SCH_EDITOPTIONS> );
1177 case SID_GENERAL_OPTIONS:
1189 sal_uInt16 nY2K = USHRT_MAX;
1193 if( USHRT_MAX != nY2K )
1199 SfxCallMode::ASYNCHRON, { pYearItem });
1201 officecfg::Office::Common::DateFormat::TwoDigitYear::set(nY2K, batch);
1206 officecfg::Office::Common::Print::Warning::NotFound::set(pWarnItem->GetValue(), batch);
1210 bool bPaperSizeWarning = bool(static_cast<SfxPrinterChangeFlags>(pFlag->GetValue()) & SfxPrinterChangeFlags::CHG_SIZE);
1211 officecfg::Office::Common::Print::Warning::PaperSize::set(bPaperSizeWarning, batch);
1212 bool bPaperOrientationWarning = bool(static_cast<SfxPrinterChangeFlags>(pFlag->GetValue()) & SfxPrinterChangeFlags::CHG_ORIENTATION);
1213 officecfg::Office::Common::Print::Warning::PaperOrientation::set(bPaperOrientationWarning, batch);
1217 bool bHelpTips = officecfg::Office::Common::Help::Tip::get();
1220 bool bExtendedHelp = officecfg::Office::Common::Help::ExtendedTip::get();
1227 case SID_LANGUAGE_OPTIONS :
1233 case SID_FILTER_DLG:
1237 case SID_SB_STARBASEOPTIONS:
1242 case SID_SCH_EDITOPTIONS:
1248 OSL_FAIL(
"Unhandled option in ApplyItemSet" );
1256 bool bSaveSpellCheck =
false;
1260 Reference< XLinguProperties > xProp = LinguProperties::create( xContext );
1263 xProp->setHyphMinLeading( static_cast<sal_Int16>(pHyphenItem->GetMinLead()) );
1264 xProp->setHyphMinTrailing( static_cast<sal_Int16>(pHyphenItem->GetMinTrail()) );
1265 bSaveSpellCheck =
true;
1273 if(SfxItemState::SET == rSet.
GetItemState( SID_ATTR_LANGUAGE,
false, &pItem ))
1276 bSaveSpellCheck =
true;
1278 if(SfxItemState::SET == rSet.
GetItemState( SID_ATTR_CHAR_CTL_LANGUAGE,
false, &pItem ))
1281 bSaveSpellCheck =
true;
1283 if(SfxItemState::SET == rSet.
GetItemState( SID_ATTR_CHAR_CJK_LANGUAGE,
false, &pItem ))
1286 bSaveSpellCheck =
true;
1289 if( SfxItemState::SET == rSet.
GetItemState(SID_AUTOSPELL_CHECK,
false, &pItem ))
1293 SfxCallMode::ASYNCHRON|SfxCallMode::RECORD, { pItem });
1295 xProp->setIsSpellAuto( bOnlineSpelling );
1298 if( bSaveSpellCheck )
1302 pDispatch->
Execute(SID_SPELLCHECKER_CHANGED, SfxCallMode::ASYNCHRON);
1306 if( SfxItemState::SET == rSet.
GetItemState(SID_OPT_LOCALE_CHANGED,
false, &pItem ))
1309 while ( _pViewFrame )
1312 SfxCallMode::ASYNCHRON, { pItem });
1320 OUString sIdentifier;
1323 if ( !xCurrentFrame.is() )
1326 xCurrentFrame = xDesktop->getCurrentFrame();
1329 if ( xCurrentFrame.is() )
1333 sIdentifier = xModuleManager->identify( xCurrentFrame );
1335 catch ( css::frame::UnknownModuleException& )
1337 SAL_INFO(
"cui.options",
"unknown module" );
1341 TOOLS_WARN_EXCEPTION(
"cui.options",
"getActiveModule_Impl(): exception of XModuleManager::identify()" );
1350 sal_uInt16 nGroup = 0;
1359 nGroup =
AddGroup(
CuiResId(SID_GENERAL_OPTIONS_RES[0].first),
nullptr,
nullptr, SID_GENERAL_OPTIONS );
1360 const sal_uInt16 nEnd =
static_cast<sal_uInt16
>(std::size(SID_GENERAL_OPTIONS_RES));
1362 for (sal_uInt16
i = 1;
i < nEnd; ++
i)
1364 OUString sNewTitle =
CuiResId(SID_GENERAL_OPTIONS_RES[
i].first);
1365 nPageId = SID_GENERAL_OPTIONS_RES[
i].second;
1375 if( ! xService.is() )
1378 catch ( css::uno::DeploymentException& )
1387 if( ! officecfg::Office::Common::Misc::ExperimentalMode::get() )
1399 nGroup =
AddGroup(
CuiResId(SID_FILTER_DLG_RES[0].first),
nullptr,
nullptr, SID_FILTER_DLG );
1400 for (
size_t i = 1;
i < std::size(SID_FILTER_DLG_RES); ++
i )
1402 nPageId =
static_cast<sal_uInt16
>(SID_FILTER_DLG_RES[
i].second);
1413 nGroup =
AddGroup(
CuiResId(SID_LANGUAGE_OPTIONS_RES[0].first),
nullptr,
nullptr, SID_LANGUAGE_OPTIONS );
1414 for (
size_t i = 1;
i < std::size(SID_LANGUAGE_OPTIONS_RES); ++
i)
1416 nPageId =
static_cast<sal_uInt16
>(SID_LANGUAGE_OPTIONS_RES[
i].second);
1434 if ( aFactory ==
"com.sun.star.text.TextDocument"
1435 || aFactory ==
"com.sun.star.text.WebDocument"
1436 || aFactory ==
"com.sun.star.text.GlobalDocument" )
1441 if ( aFactory ==
"com.sun.star.text.WebDocument" )
1445 nGroup =
AddGroup(
CuiResId(SID_SW_EDITOPTIONS_RES[0].first), pSwMod, pSwMod, SID_SW_EDITOPTIONS );
1446 for (
size_t i = 1;
i < std::size(SID_SW_EDITOPTIONS_RES); ++
i )
1448 nPageId =
static_cast<sal_uInt16
>(SID_SW_EDITOPTIONS_RES[
i].second);
1452 ( RID_SW_TP_STD_FONT_CTL != nPageId || aCTLLanguageOptions.
IsCTLFontEnabled() ) &&
1453 ( RID_SW_TP_MAILCONFIG != nPageId || MailMergeCfg_Impl().IsEmailSupported() ) )
1457 AddTabPage( RID_SW_TP_OPTTEST_PAGE,
"Internal Test", nGroup );
1464 nGroup =
AddGroup(
CuiResId(SID_SW_ONLINEOPTIONS_RES[0].
first), pSwMod, pSwMod, SID_SW_ONLINEOPTIONS );
1465 for(
size_t i = 1;
i < std::size(SID_SW_ONLINEOPTIONS_RES); ++
i )
1467 nPageId =
static_cast<sal_uInt16
>(SID_SW_ONLINEOPTIONS_RES[
i].second);
1472 AddTabPage( RID_SW_TP_OPTTEST_PAGE,
"Internal Test", nGroup );
1481 if ( aFactory ==
"com.sun.star.sheet.SpreadsheetDocument" )
1487 nGroup =
AddGroup(
CuiResId(SID_SC_EDITOPTIONS_RES[0].first), pScMod, pScMod, SID_SC_EDITOPTIONS );
1488 const sal_uInt16
nCount =
static_cast<sal_uInt16
>(std::size(SID_SC_EDITOPTIONS_RES));
1489 for ( sal_uInt16
i = 1;
i < nCount; ++
i )
1491 nPageId =
static_cast<sal_uInt16
>(SID_SC_EDITOPTIONS_RES[
i].second);
1505 if ( aFactory ==
"com.sun.star.presentation.PresentationDocument" )
1510 nGroup =
AddGroup(
CuiResId(SID_SD_EDITOPTIONS_RES[0].first), pSdMod, pSdMod, SID_SD_EDITOPTIONS );
1511 const sal_uInt16
nCount =
static_cast<sal_uInt16
>(std::size(SID_SD_EDITOPTIONS_RES));
1512 for ( sal_uInt16
i = 1;
i < nCount; ++
i )
1514 nPageId =
static_cast<sal_uInt16
>(SID_SD_EDITOPTIONS_RES[
i].second);
1527 if ( aFactory ==
"com.sun.star.drawing.DrawingDocument" )
1532 nGroup =
AddGroup(
CuiResId(SID_SD_GRAPHIC_OPTIONS_RES[0].first), pSdMod, pSdMod, SID_SD_GRAPHIC_OPTIONS );
1533 const sal_uInt16
nCount =
static_cast<sal_uInt16
>(std::size(SID_SD_GRAPHIC_OPTIONS_RES));
1534 for ( sal_uInt16
i = 1;
i < nCount; ++
i )
1536 nPageId =
static_cast<sal_uInt16
>(SID_SD_GRAPHIC_OPTIONS_RES[
i].second);
1549 if ( aFactory ==
"com.sun.star.formula.FormulaProperties" )
1555 nGroup =
AddGroup(
CuiResId(SID_SM_EDITOPTIONS_RES[0].first), pSmMod, pSmMod, SID_SM_EDITOPTIONS );
1556 for (
size_t i = 1;
i < std::size(SID_SM_EDITOPTIONS_RES); ++
i )
1558 nPageId =
static_cast<sal_uInt16
>(SID_SM_EDITOPTIONS_RES[
i].second);
1574 nGroup =
AddGroup(
CuiResId(SID_SB_STARBASEOPTIONS_RES[0].first),
nullptr,
nullptr, SID_SB_STARBASEOPTIONS );
1575 for (
size_t i = 1;
i < std::size(SID_SB_STARBASEOPTIONS_RES); ++
i )
1577 nPageId =
static_cast<sal_uInt16
>(SID_SB_STARBASEOPTIONS_RES[
i].second);
1587 nGroup =
AddGroup(
CuiResId(SID_SCH_EDITOPTIONS_RES[0].first),
nullptr,
nullptr, SID_SCH_EDITOPTIONS );
1588 for (
size_t i = 1;
i < std::size(SID_SCH_EDITOPTIONS_RES); ++
i )
1590 nPageId =
static_cast<sal_uInt16
>(SID_SCH_EDITOPTIONS_RES[
i].second);
1601 nGroup =
AddGroup(
CuiResId(SID_INET_DLG_RES[0].first),
nullptr,
nullptr, SID_INET_DLG );
1603 for (
size_t i = 1;
i < std::size(SID_INET_DLG_RES); ++
i )
1605 nPageId =
static_cast<sal_uInt16
>(SID_INET_DLG_RES[
i].second);
1638 if ( j->m_sId == pNode->
m_sId )
1646 std::unique_ptr<Module> pModule;
1649 if ( rExtensionId.empty() )
1663 Reference < XModuleManager2 > xModuleManager = ModuleManager::create(xContext);
1665 if ( !xCurrentFrame.is() )
1667 Reference < XDesktop2 > xDesktop = Desktop::create( xContext );
1668 xCurrentFrame = xDesktop->getCurrentFrame();
1671 if ( xCurrentFrame.is() )
1675 sModule = xModuleManager->identify( xCurrentFrame );
1677 catch ( css::frame::UnknownModuleException& )
1679 SAL_INFO(
"cui.options",
"unknown module" );
1683 TOOLS_WARN_EXCEPTION(
"cui.options",
"OfaTreeOptionsDialog::GetModuleIdentifier(): exception of XModuleManager::identify()");
1690 std::u16string_view rModuleIdentifier )
1692 std::unique_ptr<Module> pModule;
1694 officecfg::Office::OptionsDialog::Modules::get());
1697 for (
const OUString& rModule : seqNames )
1699 if ( rModuleIdentifier == rModule )
1702 pModule.reset(
new Module);
1703 pModule->m_bActive =
true;
1706 xSet->getByName( rModule ) >>= xModAccess;
1707 if ( xModAccess.is() )
1711 xModAccess->getByName(
"Nodes" ) >>= xNodeAccess;
1712 if ( xNodeAccess.is() )
1717 for (
const OUString& rNode : xTemp)
1719 xNodeAccess->getByName( rNode ) >>= xAccess;
1722 xAccess->getByName(
"Index" ) >>= nIndex;
1725 pModule->m_aNodeList.push_back(
1726 std::unique_ptr<OrderedEntry>(
new OrderedEntry(nIndex, rNode)));
1730 std::vector<OrderedEntry *>::size_type
y = 0;
1731 for ( ; y < pModule->m_aNodeList.size(); ++y )
1733 sal_Int32 nNodeIdx = pModule->m_aNodeList[y]->m_nIndex;
1734 if ( nNodeIdx < 0 || nNodeIdx > nIndex )
1738 pModule->m_aNodeList.insert(
1739 pModule->m_aNodeList.begin() + y,
1740 std::unique_ptr<OrderedEntry>(
new OrderedEntry( nIndex, rNode )) );
1753 Module* pModule, std::u16string_view rExtensionId)
1758 officecfg::Office::OptionsDialog::Nodes::get());
1762 for ( OUString
const & sGroupName : seqNames )
1765 xSet->getByName( sGroupName ) >>= xNodeAccess;
1767 if ( xNodeAccess.is() )
1769 OUString sNodeId, sLabel, sPageURL;
1770 bool bAllModules =
false;
1772 sNodeId = sGroupName;
1773 xNodeAccess->getByName(
"Label" ) >>= sLabel;
1774 xNodeAccess->getByName(
"OptionsPage" ) >>= sPageURL;
1775 xNodeAccess->getByName(
"AllModules" ) >>= bAllModules;
1777 if ( sLabel.isEmpty() )
1778 sLabel = sGroupName;
1779 OUString sTemp =
getGroupName( sLabel, !rExtensionId.empty() );
1780 if ( !sTemp.isEmpty() )
1782 std::unique_ptr<OptionsNode> pNode(
new OptionsNode(sNodeId, sLabel, bAllModules));
1784 if ( rExtensionId.empty() && !
isNodeActive( pNode.get(), pModule ) )
1790 xNodeAccess->getByName(
"Leaves" ) >>= xLeavesSet;
1791 if ( xLeavesSet.is() )
1794 for ( OUString
const & leafName : seqLeaves )
1797 xLeavesSet->getByName( leafName ) >>= xLeaveAccess;
1799 if ( xLeaveAccess.is() )
1801 OUString
sId, sLeafLabel, sEventHdl, sLeafURL, sLeafGrpId;
1802 sal_Int32 nLeafGrpIdx = 0;
1804 xLeaveAccess->getByName(
"Id" ) >>= sId;
1805 xLeaveAccess->getByName(
"Label" ) >>= sLeafLabel;
1806 xLeaveAccess->getByName(
"OptionsPage" ) >>= sLeafURL;
1807 xLeaveAccess->getByName(
"EventHandlerService" ) >>= sEventHdl;
1808 xLeaveAccess->getByName(
"GroupId" ) >>= sLeafGrpId;
1809 xLeaveAccess->getByName(
"GroupIndex" ) >>= nLeafGrpIdx;
1811 if ( rExtensionId.empty() || sId == rExtensionId )
1813 std::unique_ptr<OptionsLeaf> pLeaf(
new OptionsLeaf(
1814 sLeafLabel, sLeafURL, sEventHdl, sLeafGrpId, nLeafGrpIdx ));
1816 if ( !sLeafGrpId.isEmpty() )
1818 bool bAlreadyOpened =
false;
1819 if ( !pNode->m_aGroupedLeaves.empty() )
1821 for (
auto & rGroup : pNode->m_aGroupedLeaves)
1823 if ( !rGroup.empty() &&
1824 rGroup[0]->m_sGroupId == sLeafGrpId )
1826 std::vector<std::unique_ptr<OptionsLeaf>>::size_type l = 0;
1827 for ( ; l < rGroup.size(); ++l )
1829 if ( rGroup[l]->m_nGroupIndex >= nLeafGrpIdx )
1832 rGroup.insert( rGroup.begin() + l, std::move(pLeaf) );
1833 bAlreadyOpened =
true;
1838 if ( !bAlreadyOpened )
1840 std::vector< std::unique_ptr<OptionsLeaf> > aGroupedLeaves;
1841 aGroupedLeaves.push_back( std::move(pLeaf) );
1842 pNode->m_aGroupedLeaves.push_back( std::move(aGroupedLeaves) );
1846 pNode->m_aLeaves.push_back( std::move(pLeaf) );
1853 if ( !pNode->m_aLeaves.empty() || !pNode->m_aGroupedLeaves.empty() )
1855 pModule ? aNodeList.push_back( std::move(pNode) ) : aOutNodeList.push_back( std::move(pNode) );
1860 if ( pModule && !aNodeList.empty() )
1864 OUString sNodeId =
i->m_sId;
1865 for (
auto j = aNodeList.begin(); j != aNodeList.end(); ++j )
1867 if ( (*j)->m_sId == sNodeId )
1869 aOutNodeList.push_back( std::move(*j) );
1870 aNodeList.erase( j );
1876 for (
auto &
i: aNodeList )
1877 aOutNodeList.push_back( std::move(
i) );
1879 return aOutNodeList;
1884 sal_uInt16 nRet = 0;
1886 std::unique_ptr<weld::TreeIter> xEntry = rTreeLB.
make_iterator();
1892 OUString sTemp(rTreeLB.
get_text(*xEntry));
1893 if (sTemp == rGroupName)
1907 if ( USHRT_MAX == nGrpId )
1919 for (
auto const& node : rNodeList)
1921 if ( !node->m_aLeaves.empty() || !node->m_aGroupedLeaves.empty() )
1923 for (
auto const & j: node->m_aGroupedLeaves )
1925 for (
size_t k = 0; k < j.size(); ++k )
1931 for (
auto const & j: node->m_aLeaves )
1947 std::unique_ptr< SvxDicListChgClamp > pClamp;
1955 return SfxOkDialogController::run();
1961 OUString aEvtHdl,
const Reference< awt::XContainerWindowProvider >& rProvider )
1962 : m_pContainer(pParent)
1963 , m_sPageURL(
std::move(aPageURL))
1964 , m_sEventHdl(
std::move(aEvtHdl))
1965 , m_xWinProvider(rProvider)
2013 Reference<awt::XWindowPeer> xParent(
m_xPageParent, UNO_QUERY);
2018 Reference< awt::XControl > xPageControl(
m_xPage, UNO_QUERY );
2019 if ( xPageControl.is() )
2021 Reference< awt::XWindowPeer > xWinPeer( xPageControl->getPeer() );
2022 if ( xWinPeer.is() )
2033 TOOLS_WARN_EXCEPTION(
"cui.options",
"ExtensionsTabPage::CreateDialogWithHandler(): exception of XDialogProvider2::createDialogWithHandler()");
2048 TOOLS_WARN_EXCEPTION(
"cui.options",
"ExtensionsTabPage::DispatchAction(): exception of XDialogEventHandler::callHandlerMethod()" );
2064 xPageParent->
Show(
true, ShowFlags::NoActivate);
2086 m_xPage->setPosSize(0, 0, aWindowRect.Width, aWindowRect.Height, awt::PosSize::POSSIZE);
#define LINK(Instance, Class, Member)
void SetUserItem(const OUString &sName, const css::uno::Any &aValue)
OptionsPageInfo(sal_uInt16 nId)
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
static void DisableBalloonHelp()
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
#define RID_SVXPAGE_ONLINEUPDATE
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
std::unique_ptr< weld::TreeIter > xCurrentPageEntry
bool IsPageHidden(std::u16string_view _rPage, std::u16string_view _rGroup) const
static void storeConfigItems()
#define RID_SVXPAGE_OPENCL
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
static constexpr auto Items
static std::shared_ptr< ConfigurationChanges > create()
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
css::uno::Reference< css::awt::XWindow > m_xPageParent
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
static void GetOptions(SfxItemSet &_rFillItems)
OUString m_sLastPageURL_Tools
bool bIsFromExtensionManager
sal_uInt8 & GetMinTrail()
SfxDispatcher * GetDispatcher()
#define RID_SVXPAGE_OPTIONS_CTL
static sal_uInt16 getGroupNodeId(std::u16string_view rModule)
bool IsModuleInstalled(EModule eModule) const
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames)=0
#define RID_SVXPAGE_INET_SECURITY
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
#define RID_SVXPAGE_PERSONALIZATION
#define RID_SVXPAGE_COLORCONFIG
virtual bool Start(const OUString &rHelpId, weld::Widget *pWidget=nullptr)
sal_uInt16 GetValue() const
std::vector< std::unique_ptr< OptionsNode > > VectorOfNodes
bool SaveDictionaries(const uno::Reference< XSearchableDictionaryList > &xDicList)
OUString m_sLastPageURL_ExtMgr
OString GetHelpId() const
bool IsCTLFontEnabled() const
OptionsMapping_Impl const OptionsMap_Impl[]
void InitItemSets(OptionsGroupInfo &rGroupInfo)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
ExtensionsTabPage(weld::Container *pParent, OUString rPageURL, OUString aEvtHdl, const css::uno::Reference< css::awt::XContainerWindowProvider > &rProvider)
virtual std::unique_ptr< TreeIter > make_iterator(const TreeIter *pOrig=nullptr) const =0
SfxApplication * SfxGetpApp()
static css::uno::Reference< css::linguistic2::XLinguProperties > GetLinguPropertySet()
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
OfaTreeOptionsDialog(weld::Window *pParent, const css::uno::Reference< css::frame::XFrame > &_xFrame, bool bActivateLastSelection)
static void EnableBalloonHelp()
static void GetOptions(SfxItemSet &)
void CreateDialogWithHandler()
bool IsJapaneseFindEnabled()
static void DisableQuickHelp()
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
#define RID_SVXPAGE_JSEARCH_OPTIONS
static css::uno::Reference< css::linguistic2::XSearchableDictionaryList > GetDictionaryList()
static OUString GetViewOptUserItem(const SvtViewOptions &rOpt)
#define RID_SFXPAGE_PRINTOPTIONS
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
constexpr OStringLiteral HID_OFADLG_TREELISTBOX
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
static OUString getCurrentFactory_Impl(const Reference< XFrame > &_xFrame)
void ResetCurrentPageFromConfig()
#define RID_SVXPAGE_INET_MAIL
OptionsPageInfo * AddTabPage(sal_uInt16 nId, const OUString &rPageName, sal_uInt16 nGroup)
virtual tools::Long GetValue() const override
const SvxChartColorTable & GetDefaultColors()
OUString CuiResId(TranslateId aKey)
WinBits const WB_DIALOGCONTROL
std::map< OUString, std::shared_ptr< NoAutoUnloadModule > > ModuleMap
static OUString GetModuleIdentifier(const css::uno::Reference< css::frame::XFrame > &xFrame)
static void GetOptions(SfxItemSet &_rFillItems)
#define TOOLS_WARN_EXCEPTION(area, stream)
css::uno::Reference< css::awt::XWindow > m_xPage
#define RID_OFAPAGE_MSFILTEROPT2
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
#define DBG_ASSERT(sCon, aError)
std::unique_ptr< weld::TreeView > xTreeLB
std::unique_ptr< weld::Container > xTabBox
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
static void ApplyLanguageOptions(const SfxItemSet &rSet)
static bool IsQuickHelpEnabled()
#define RID_OFAPAGE_HTMLOPT
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
static bool lcl_isOptionHidden(sal_uInt16 _nPageId, const SvtOptionsDialogOptions &_rOptOptions)
void SetOptions(const SfxItemSet &)
std::unique_ptr< SfxItemSet > m_pOutItemSet
static SfxViewFrame * GetNext(const SfxViewFrame &rPrev, const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
WinBits const WB_CHILDDLGCTRL
static void SetOptions(const SfxItemSet &_rSourceItems)
virtual bool iter_next(TreeIter &rIter) const =0
void Initialize(const css::uno::Reference< css::frame::XFrame > &_xFrame)
bool IsGroupHidden(std::u16string_view _rGroup) const
bool IsAsianTypographyEnabled()
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
#define RID_SVX_FONT_SUBSTITUTION
virtual OUString get_text(int row, int col=-1) const =0
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
bool bIsForSetDocumentLanguage
std::unique_ptr< ExtensionsTabPage > m_xExtPage
#define RID_SVXPAGE_LANGTOOL_OPTIONS
constexpr OUStringLiteral VIEWOPT_DATANAME
#define RID_SVXPAGE_COLOR
static sal_uInt16 lcl_getGroupId(std::u16string_view rGroupName, const weld::TreeView &rTreeLB)
static void SetOptions(const SfxItemSet &_rSourceItems)
#define RID_SFXPAGE_GENERAL
void SetStyle(WinBits nStyle)
static bool IsBalloonHelpEnabled()
std::unique_ptr< weld::Button > xApplyPB
static LastPageSaver * pLastPageSaver
COMPHELPER_DLLPUBLIC OUString getExpandedUri(css::uno::Reference< css::uno::XComponentContext > const &context, OUString const &uri)
static void lcl_insertLeaf(OfaTreeOptionsDialog *pDlg, OptionsNode const *pNode, OptionsLeaf const *pLeaf, const weld::TreeView &rTreeLB)
static VectorOfNodes LoadNodes(Module *pModule, std::u16string_view rExtensionId)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
svtools::RestartReason eRestartReason
css::uno::Reference< css::awt::XContainerWindowEventHandler > m_xEventHdl
static OUString getGroupName(std::u16string_view rModule, bool bForced)
virtual css::uno::Reference< css::awt::XWindow > CreateChildFrame()=0
#define RID_SVXPAGE_ACCESSIBILITYCONFIG
std::unique_ptr< weld::Button > xOkPB
void LoadExtensionOptions(std::u16string_view rExtensionId)
const PropertyValue * pValues
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
OUString toId(const void *pValue)
virtual ~OfaTreeOptionsDialog() override
Reference< XMultiServiceFactory > getProcessServiceFactory()
static SfxViewFrame * Current()
css::uno::Reference< css::awt::XContainerWindowProvider > m_xWinProvider
#define OFA_TP_LANGUAGES_FOR_SET_DOCUMENT_LANGUAGE
void ActivateLastSelection()
bool DispatchAction(const OUString &rAction)
std::unique_ptr< SfxTabPage > m_xPage
static std::unique_ptr< Module > LoadModule(std::u16string_view rModuleIdentifier)
void SetNeedsRestart(svtools::RestartReason eReason)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
std::optional< SfxItemSet > m_pInItemSet
#define SAL_INFO(area, stream)
#define RID_SVXPAGE_ASIAN_LAYOUT
INetProtocol GetProtocol() const
css::uno::Reference< css::awt::XContainerWindowProvider > m_xContainerWinProvider
static void SetViewOptUserItem(SvtViewOptions &rOpt, const OUString &rData)
virtual bool get_iter_first(TreeIter &rIter) const =0
Reference< XExecutableDialog > m_xDialog
std::unique_ptr< SfxTabPage >(* CreateTabPage)(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
sal_uInt16 AddGroup(const OUString &rGroupName, SfxShell *pCreateShell, SfxModule *pCreateModule, sal_uInt16 nDialogId)
static void ApplyItemSet(sal_uInt16 nId, const SfxItemSet &rSet)
Reference< XComponentContext > getProcessComponentContext()
css::uno::Any GetUserItem(const OUString &sName) const
#define RID_SVXPAGE_BASICIDE_OPTIONS
static void EnableQuickHelp()
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
virtual void ApplyItemSet(sal_uInt16 nId, const SfxItemSet &rSet)
#define RID_SVXPAGE_INET_PROXY
static void deleteGroupNames()
void setHeight(tools::Long nHeight)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
IMPL_LINK_NOARG(OfaTreeOptionsDialog, ShowPageHdl_Impl, weld::TreeView &, void)
static SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
std::optional< SfxItemSet > CreateItemSet(sal_uInt16 nId)
virtual short run() override
Reference< XSingleServiceFactory > xFactory
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *_rAttrSet)
std::unique_ptr< weld::Button > xBackPB
static bool lcl_getStringFromID(sal_uInt16 _nPageId, OUString &_rGroupName, OUString &_rPageName)
void InsertNodes(const VectorOfNodes &rNodeList)
virtual void ImplCommit()=0
#define RID_SFXPAGE_LINGU
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
weld::Container * m_pContainer
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
static void setGroupName(std::u16string_view rModule, const OUString &rGroupName)
void InitTreeAndHandler()
constexpr OUStringLiteral first
static std::unique_ptr< SfxTabPage > CreateGeneralTabPage(sal_uInt16 nId, weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
#define RID_OPTPAGE_CHART_DEFCOLORS
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
virtual std::optional< SfxItemSet > CreateItemSet(sal_uInt16 nId)
static SfxModule * GetModule(SfxToolsModule nSharedLib)
int GetMinimumEditHeight()
IMPL_LINK(OfaTreeOptionsDialog, ApplyHdl_Impl, weld::Button &, rButton, void)
#define RID_SVXPAGE_OPTIONS_JAVA
OptionsGroupInfo(SfxShell *pSh, SfxModule *pMod, sal_uInt16 nId)
static bool isNodeActive(OptionsNode const *pNode, Module *pModule)
std::vector< std::unique_ptr< OrderedEntry > > m_aNodeList
virtual int get_iter_depth(const TreeIter &rIter) const =0
void ActivatePage(sal_uInt16 nResId)
bool m_bDetectedRangeSegmentation false
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)