LibreOffice Module cui (master) 1
optgdlg.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 <config_features.h>
21#include <svl/numformat.hxx>
22#include <svl/zforlist.hxx>
23#include <svl/currencytable.hxx>
24#include <svtools/langhelp.hxx>
25#include <unotools/lingucfg.hxx>
26#if defined(_WIN32)
27#include <unotools/resmgr.hxx>
28#endif
29#include <sfx2/bindings.hxx>
30#include <sfx2/viewfrm.hxx>
35#include <svl/cjkoptions.hxx>
36#include <svl/ctloptions.hxx>
37#include <svtools/miscopt.hxx>
39#include <sfx2/objsh.hxx>
42#include <svtools/langtab.hxx>
43#include <editeng/unolingu.hxx>
44#include <editeng/langitem.hxx>
46#include <comphelper/string.hxx>
47#include <rtl/ustrbuf.hxx>
48#include <editeng/editids.hrc>
49#include <svx/svxids.hrc>
50#include <svl/intitem.hxx>
53#include <sal/log.hxx>
54#include <officecfg/Office/Common.hxx>
55#include <officecfg/Setup.hxx>
58#if HAVE_FEATURE_BREAKPAD
60#endif
61
62#include <com/sun/star/configuration/theDefaultProvider.hpp>
63#include <com/sun/star/container/XNameAccess.hpp>
64#include <com/sun/star/container/XNameReplace.hpp>
65#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
66#include <com/sun/star/beans/NamedValue.hpp>
67#include <com/sun/star/beans/PropertyAttribute.hpp>
68#include <com/sun/star/beans/XPropertySet.hpp>
69#include <com/sun/star/util/XChangesBatch.hpp>
70#include <com/sun/star/uno/Any.hxx>
71#include <com/sun/star/container/XContentEnumerationAccess.hpp>
72#include <com/sun/star/container/XSet.hpp>
73#include <com/sun/star/i18n/ScriptType.hpp>
74#include <com/sun/star/office/Quickstart.hpp>
75#include <com/sun/star/linguistic2/XLinguProperties.hpp>
77
78#include <vcl/vclenum.hxx>
79#include <vcl/svapp.hxx>
80#include <vcl/settings.hxx>
81#include <vcl/window.hxx>
82#include <vcl/IconThemeInfo.hxx>
84#include "optgdlg.hxx"
85#include <svtools/apearcfg.hxx>
88#include <svtools/imgdef.hxx>
89
90#if defined(_WIN32)
92#endif
93using namespace ::com::sun::star::uno;
94using namespace ::com::sun::star::lang;
95using namespace ::com::sun::star::beans;
96using namespace ::com::sun::star::container;
97using namespace ::com::sun::star::util;
98using namespace ::utl;
99
100// class OfaMiscTabPage --------------------------------------------------
101
103{
104 if ( pSet_ )
105 FillItemSet( pSet_ );
106 return DeactivateRC::LeavePage;
107}
108
109namespace
110{
111OUString impl_SystemFileOpenServiceName()
112{
113 #if defined(_WIN32)
114 return "com.sun.star.ui.dialogs.SystemFilePicker";
115 #elif defined MACOSX
116 return "com.sun.star.ui.dialogs.AquaFilePicker";
117 #else
118 return OUString();
119 #endif
120}
121
122bool lcl_HasSystemFilePicker()
123{
125 return true;
126
127 // Otherwise fall-back on querying services
128 bool bRet = false;
130
131 Reference< XContentEnumerationAccess > xEnumAccess( xFactory, UNO_QUERY );
132 Reference< XSet > xSet( xFactory, UNO_QUERY );
133
134 if ( ! xEnumAccess.is() || ! xSet.is() )
135 return bRet;
136
137 try
138 {
139 OUString aFileService = impl_SystemFileOpenServiceName();
140 Reference< XEnumeration > xEnum = xEnumAccess->createContentEnumeration( aFileService );
141 if ( xEnum.is() && xEnum->hasMoreElements() )
142 bRet = true;
143 }
144 catch (const IllegalArgumentException&)
145 {
146 }
147 catch (const ElementExistException&)
148 {
149 }
150 return bRet;
151}
152}
153
155 : SfxTabPage(pPage, pController, "cui/ui/optgeneralpage.ui", "OptGeneralPage", &rSet)
156 , m_xExtHelpCB(m_xBuilder->weld_check_button("exthelp"))
157 , m_xPopUpNoHelpCB(m_xBuilder->weld_check_button("popupnohelp"))
158 , m_xShowTipOfTheDay(m_xBuilder->weld_check_button("cbShowTipOfTheDay"))
159 , m_xFileDlgFrame(m_xBuilder->weld_widget("filedlgframe"))
160 , m_xFileDlgROImage(m_xBuilder->weld_widget("lockimage"))
161 , m_xFileDlgCB(m_xBuilder->weld_check_button("filedlg"))
162 , m_xDocStatusCB(m_xBuilder->weld_check_button("docstatus"))
163 , m_xYearFrame(m_xBuilder->weld_widget("yearframe"))
164 , m_xYearValueField(m_xBuilder->weld_spin_button("year"))
165 , m_xToYearFT(m_xBuilder->weld_label("toyear"))
166 , m_xCrashReport(m_xBuilder->weld_check_button("crashreport"))
167 , m_xQuickStarterFrame(m_xBuilder->weld_widget("quickstarter"))
168 , m_xHelpImproveLabel(m_xBuilder->weld_label("label7")) //"Help Improve"
169#if defined(UNX)
170 , m_xQuickLaunchCB(m_xBuilder->weld_check_button("systray"))
171#else
172 , m_xQuickLaunchCB(m_xBuilder->weld_check_button("quicklaunch"))
173#endif
174#if defined(_WIN32)
175 , m_xFileAssocFrame(m_xBuilder->weld_widget("fileassoc"))
176 , m_xFileAssocBtn(m_xBuilder->weld_button("assocfiles"))
177 , m_xPerformFileExtCheck(m_xBuilder->weld_check_button("cbPerformFileExtCheck"))
178#endif
179{
180 if (!lcl_HasSystemFilePicker())
181 m_xFileDlgFrame->hide();
182 else if (officecfg::Office::Common::Misc::UseSystemFileDialog::isReadOnly())
183 {
184 m_xFileDlgROImage->show();
185 m_xFileDlgCB->set_sensitive(false);
186 }
187
188 m_xQuickLaunchCB->show();
189
190 //Only available in Win or if building the gtk systray
191#if !defined(_WIN32)
192 m_xQuickStarterFrame->hide();
193 //Hide frame label in case of no content
194 m_xHelpImproveLabel->hide();
195#endif
196
197#if defined(_WIN32)
198 m_xFileAssocFrame->show();
199 m_xFileAssocBtn->connect_clicked(LINK(this, OfaMiscTabPage, FileAssocClick));
200#endif
201
202 m_aStrDateInfo = m_xToYearFT->get_label();
203 m_xYearValueField->connect_value_changed( LINK( this, OfaMiscTabPage, TwoFigureHdl ) );
204
206}
207
209{
210}
211
212std::unique_ptr<SfxTabPage> OfaMiscTabPage::Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet )
213{
214 return std::make_unique<OfaMiscTabPage>( pPage, pController, *rAttrSet );
215}
216
218{
219 bool bModified = false;
220 std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
221
222 if ( m_xPopUpNoHelpCB->get_state_changed_from_saved() )
223 officecfg::Office::Common::Help::BuiltInHelpNotInstalledPopUp::set(m_xPopUpNoHelpCB->get_active(), batch);
224
225 if ( m_xExtHelpCB->get_state_changed_from_saved() )
226 officecfg::Office::Common::Help::ExtendedTip::set(m_xExtHelpCB->get_active(), batch);
227
228 if ( m_xShowTipOfTheDay->get_state_changed_from_saved() )
229 {
230 officecfg::Office::Common::Misc::ShowTipOfTheDay::set(m_xShowTipOfTheDay->get_active(), batch);
231 bModified = true;
232 }
233
234 if ( m_xFileDlgCB->get_state_changed_from_saved() )
235 {
236 officecfg::Office::Common::Misc::UseSystemFileDialog::set( !m_xFileDlgCB->get_active(), batch );
237 bModified = true;
238 }
239
240 if (m_xDocStatusCB->get_state_changed_from_saved())
241 {
242 officecfg::Office::Common::Print::PrintingModifiesDocument::set(m_xDocStatusCB->get_active(), batch);
243 bModified = true;
244 }
245
246 const SfxUInt16Item* pUInt16Item = GetOldItem( *rSet, SID_ATTR_YEAR2000 );
247 sal_uInt16 nNum = static_cast<sal_uInt16>(m_xYearValueField->get_text().toInt32());
248 if ( pUInt16Item && pUInt16Item->GetValue() != nNum )
249 {
250 bModified = true;
251 rSet->Put( SfxUInt16Item( SID_ATTR_YEAR2000, nNum ) );
252 }
253
254#if HAVE_FEATURE_BREAKPAD
255 if (m_xCrashReport->get_state_changed_from_saved())
256 {
257 officecfg::Office::Common::Misc::CrashReport::set(m_xCrashReport->get_active(), batch);
258 bModified = true;
259 }
260#endif
261
262#if defined(_WIN32)
263 if (m_xPerformFileExtCheck->get_state_changed_from_saved())
264 {
265 officecfg::Office::Common::Misc::PerformFileExtCheck::set(
266 m_xPerformFileExtCheck->get_active(), batch);
267 bModified = true;
268 }
269#endif
270
271 batch->commit();
272
273 if( m_xQuickLaunchCB->get_state_changed_from_saved())
274 {
275 rSet->Put(SfxBoolItem(SID_ATTR_QUICKLAUNCHER, m_xQuickLaunchCB->get_active()));
276 bModified = true;
277 }
278
279 return bModified;
280}
281
283{
284 m_xExtHelpCB->set_active( officecfg::Office::Common::Help::Tip::get() &&
285 officecfg::Office::Common::Help::ExtendedTip::get() );
286 m_xExtHelpCB->save_state();
287 m_xPopUpNoHelpCB->set_active( officecfg::Office::Common::Help::BuiltInHelpNotInstalledPopUp::get() );
288 m_xPopUpNoHelpCB->save_state();
289 m_xShowTipOfTheDay->set_active( officecfg::Office::Common::Misc::ShowTipOfTheDay::get() );
290 m_xShowTipOfTheDay->save_state();
291 m_xFileDlgCB->set_active( !officecfg::Office::Common::Misc::UseSystemFileDialog::get() );
292 m_xFileDlgCB->save_state();
293
294 m_xDocStatusCB->set_active(officecfg::Office::Common::Print::PrintingModifiesDocument::get());
295 m_xDocStatusCB->save_state();
296
297 if ( const SfxUInt16Item* pYearItem = rSet->GetItemIfSet( SID_ATTR_YEAR2000, false ) )
298 {
299 m_xYearValueField->set_value( pYearItem->GetValue() );
300 TwoFigureHdl(*m_xYearValueField);
301 }
302 else
303 m_xYearFrame->set_sensitive(false);
304
305#if HAVE_FEATURE_BREAKPAD
306 m_xCrashReport->set_active(officecfg::Office::Common::Misc::CrashReport::get() && CrashReporter::IsDumpEnable());
307 m_xCrashReport->set_sensitive(!officecfg::Office::Common::Misc::CrashReport::isReadOnly() && CrashReporter::IsDumpEnable());
308 m_xCrashReport->save_state();
309#else
310 m_xCrashReport->hide();
311#endif
312
313 const SfxPoolItem* pItem = nullptr;
314 SfxItemState eState = rSet->GetItemState( SID_ATTR_QUICKLAUNCHER, false, &pItem );
315 if ( SfxItemState::SET == eState )
316 m_xQuickLaunchCB->set_active( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
317 else if ( SfxItemState::DISABLED == eState )
318 {
319 // quickstart not installed
320 m_xQuickStarterFrame->hide();
321 }
322
323 m_xQuickLaunchCB->save_state();
324
325#if defined(_WIN32)
326 m_xPerformFileExtCheck->set_active(
327 officecfg::Office::Common::Misc::PerformFileExtCheck::get());
328 m_xPerformFileExtCheck->save_state();
329 m_xPerformFileExtCheck->set_sensitive(!officecfg::Office::Common::Misc::PerformFileExtCheck::isReadOnly());
330#endif
331}
332
334{
335 OUString aOutput( m_aStrDateInfo );
336 OUString aStr( m_xYearValueField->get_text() );
337 sal_Int32 nNum = aStr.toInt32();
338 if ( aStr.getLength() != 4 || nNum < m_xYearValueField->get_min() || nNum > m_xYearValueField->get_max() )
339 aOutput += "????";
340 else
341 {
342 nNum += 99;
343 aOutput += OUString::number( nNum );
344 }
345 m_xToYearFT->set_label( aOutput );
346}
347
348#if defined(_WIN32)
350{
352}
353#endif
354
356{
357public:
359
362 bool IsHardwareAccelerationRO() const;
363 void EnabledHardwareAcceleration( bool _bEnabled ) const;
364
365private:
366 typedef std::vector< std::pair<OUString,Sequence<OUString> > > ServiceVector;
367
368 Reference<XNameAccess> mxForceFlagNameAccess;
370 mutable bool mbHWAccelAvailable;
371 mutable bool mbHWAccelChecked;
372};
373
375 mbHWAccelAvailable(false),
376 mbHWAccelChecked(false)
377{
378 try
379 {
380 Reference<XMultiServiceFactory> xConfigProvider(
381 css::configuration::theDefaultProvider::get(
383
384 Sequence<Any> aArgs1(comphelper::InitAnyPropertySequence(
385 {
386 {"nodepath", Any(OUString("/org.openoffice.Office.Canvas"))}
387 }));
389 xConfigProvider->createInstanceWithArguments(
390 "com.sun.star.configuration.ConfigurationUpdateAccess",
391 aArgs1 ),
392 UNO_QUERY_THROW );
393
394 Sequence<Any> aArgs2(comphelper::InitAnyPropertySequence(
395 {
396 {"nodepath", Any(OUString("/org.openoffice.Office.Canvas/CanvasServiceList"))}
397 }));
398 Reference<XNameAccess> xNameAccess(
399 xConfigProvider->createInstanceWithArguments(
400 "com.sun.star.configuration.ConfigurationAccess",
401 aArgs2 ), UNO_QUERY_THROW );
402 Reference<XHierarchicalNameAccess> xHierarchicalNameAccess(
403 xNameAccess, UNO_QUERY_THROW);
404
405 Sequence<OUString> serviceNames = xNameAccess->getElementNames();
406 const OUString* pCurr = serviceNames.getConstArray();
407 const OUString* const pEnd = pCurr + serviceNames.getLength();
408 while( pCurr != pEnd )
409 {
410 Reference<XNameAccess> xEntryNameAccess(
411 xHierarchicalNameAccess->getByHierarchicalName(*pCurr),
412 UNO_QUERY );
413
414 if( xEntryNameAccess.is() )
415 {
416 Sequence<OUString> preferredImplementations;
417 if( xEntryNameAccess->getByName("PreferredImplementations") >>= preferredImplementations )
418 maAvailableImplementations.emplace_back(*pCurr,preferredImplementations );
419 }
420
421 ++pCurr;
422 }
423 }
424 catch (const Exception&)
425 {
426 }
427}
428
430{
431 if( !mbHWAccelChecked )
432 {
433 mbHWAccelChecked = true;
434
436
437 // check whether any of the service lists has an
438 // implementation that presents the "HardwareAcceleration" property
439 for (auto const& availableImpl : maAvailableImplementations)
440 {
441 const OUString* pCurrImpl = availableImpl.second.getConstArray();
442 const OUString* const pEndImpl = pCurrImpl + availableImpl.second.getLength();
443
444 while( pCurrImpl != pEndImpl )
445 {
446 try
447 {
448 Reference<XPropertySet> xPropSet( xFactory->createInstance(
449 pCurrImpl->trim() ),
450 UNO_QUERY_THROW );
451 bool bHasAccel(false);
452 if( xPropSet->getPropertyValue("HardwareAcceleration") >>= bHasAccel )
453 if( bHasAccel )
454 {
455 mbHWAccelAvailable = true;
456 return mbHWAccelAvailable;
457 }
458 }
459 catch (const Exception&)
460 {
461 }
462
463 ++pCurrImpl;
464 }
465 }
466 }
467
468 return mbHWAccelAvailable;
469}
470
472{
473 bool bForceLastEntry(false);
474 if( !mxForceFlagNameAccess.is() )
475 return true;
476
477 if( !(mxForceFlagNameAccess->getByName("ForceSafeServiceImpl") >>= bForceLastEntry) )
478 return true;
479
480 return !bForceLastEntry;
481}
482
484{
486 if (!xSet.is())
487 return true;
488
489 Reference< XPropertySetInfo > xInfo = xSet->getPropertySetInfo();
490 Property aProp = xInfo->getPropertyByName("ForceSafeServiceImpl");
491 return ((aProp.Attributes & css::beans::PropertyAttribute::READONLY ) == css::beans::PropertyAttribute::READONLY);
492}
493
495{
496 Reference< XNameReplace > xNameReplace(
497 mxForceFlagNameAccess, UNO_QUERY );
498
499 if( !xNameReplace.is() )
500 return;
501
502 xNameReplace->replaceByName( "ForceSafeServiceImpl", Any(!_bEnabled) );
503
504 Reference< XChangesBatch > xChangesBatch(
505 mxForceFlagNameAccess, UNO_QUERY );
506
507 if( !xChangesBatch.is() )
508 return;
509
510 xChangesBatch->commitChanges();
511}
512
513// class OfaViewTabPage --------------------------------------------------
514
515static bool DisplayNameCompareLessThan(const vcl::IconThemeInfo& rInfo1, const vcl::IconThemeInfo& rInfo2)
516{
517 return rInfo1.GetDisplayName().compareTo(rInfo2.GetDisplayName()) < 0;
518}
519
521 : SfxTabPage(pPage, pController, "cui/ui/optviewpage.ui", "OptViewPage", &rSet)
522 , nSizeLB_InitialSelection(0)
523 , nSidebarSizeLB_InitialSelection(0)
524 , nNotebookbarSizeLB_InitialSelection(0)
525 , nStyleLB_InitialSelection(0)
526 , pAppearanceCfg(new SvtTabAppearanceCfg)
527 , pCanvasSettings(new CanvasSettings)
528 , m_xIconSizeLB(m_xBuilder->weld_combo_box("iconsize"))
529 , m_xSidebarIconSizeLB(m_xBuilder->weld_combo_box("sidebariconsize"))
530 , m_xNotebookbarIconSizeLB(m_xBuilder->weld_combo_box("notebookbariconsize"))
531 , m_xIconStyleLB(m_xBuilder->weld_combo_box("iconstyle"))
532 , m_xFontAntiAliasing(m_xBuilder->weld_check_button("aafont"))
533 , m_xAAPointLimitLabel(m_xBuilder->weld_label("aafrom"))
534 , m_xAAPointLimit(m_xBuilder->weld_metric_spin_button("aanf", FieldUnit::PIXEL))
535 , m_xMenuIconBox(m_xBuilder->weld_widget("menuiconsbox"))
536 , m_xMenuIconsLB(m_xBuilder->weld_combo_box("menuicons"))
537 , m_xContextMenuShortcutsLB(m_xBuilder->weld_combo_box("contextmenushortcuts"))
538 , m_xFontShowCB(m_xBuilder->weld_check_button("showfontpreview"))
539 , m_xUseHardwareAccell(m_xBuilder->weld_check_button("useaccel"))
540 , m_xUseAntiAliase(m_xBuilder->weld_check_button("useaa"))
541 , m_xUseSkia(m_xBuilder->weld_check_button("useskia"))
542 , m_xForceSkiaRaster(m_xBuilder->weld_check_button("forceskiaraster"))
543 , m_xSkiaStatusEnabled(m_xBuilder->weld_label("skiaenabled"))
544 , m_xSkiaStatusDisabled(m_xBuilder->weld_label("skiadisabled"))
545 , m_xMousePosLB(m_xBuilder->weld_combo_box("mousepos"))
546 , m_xMouseMiddleLB(m_xBuilder->weld_combo_box("mousemiddle"))
547 , m_xMoreIcons(m_xBuilder->weld_button("btnMoreIcons"))
548 , m_xRunGPTests(m_xBuilder->weld_button("btn_rungptest"))
549{
550 if (Application::GetToolkitName().startsWith("gtk"))
551 m_xMenuIconBox->hide();
552
553 m_xFontAntiAliasing->connect_toggled( LINK( this, OfaViewTabPage, OnAntialiasingToggled ) );
554
555 m_xUseSkia->connect_toggled(LINK(this, OfaViewTabPage, OnUseSkiaToggled));
556
557 // Set known icon themes
558 OUString sAutoStr( m_xIconStyleLB->get_text( 0 ) );
559 m_xIconStyleLB->clear();
563
564 // Start with the automatically chosen icon theme
565 OUString autoThemeId = aStyleSettings.GetAutomaticallyChosenIconTheme();
567
568 OUString entryForAuto = sAutoStr + " (" +
569 autoIconTheme.GetDisplayName() +
570 ")";
571 m_xIconStyleLB->append("auto", entryForAuto); // index 0 means choose style automatically
572
573 // separate auto and other icon themes
574 m_xIconStyleLB->append_separator("");
575
576 for (auto const& installIconTheme : mInstalledIconThemes)
577 m_xIconStyleLB->append(installIconTheme.GetThemeId(), installIconTheme.GetDisplayName());
578
579 m_xIconStyleLB->set_active(0);
580
581 m_xMoreIcons->set_from_icon_name("cmd/sc_additionsdialog.png");
582 m_xMoreIcons->connect_clicked(LINK(this, OfaViewTabPage, OnMoreIconsClick));
583 m_xRunGPTests->connect_clicked( LINK( this, OfaViewTabPage, OnRunGPTestClick));
584}
585
587{
588}
589
591{
592 GraphicsTestsDialog m_xGraphicsTestDialog(m_xContainer.get());
593 m_xGraphicsTestDialog.run();
594}
595
597{
598 css::uno::Sequence<css::beans::PropertyValue> aArgs{ comphelper::makePropertyValue(
599 "AdditionsTag", OUString("Icons")) };
600 comphelper::dispatchCommand(".uno:AdditionsDialog", aArgs);
601}
602
603IMPL_LINK_NOARG( OfaViewTabPage, OnAntialiasingToggled, weld::Toggleable&, void )
604{
605 bool bAAEnabled = m_xFontAntiAliasing->get_active();
606
607 m_xAAPointLimitLabel->set_sensitive(bAAEnabled);
608 m_xAAPointLimit->set_sensitive(bAAEnabled);
609}
610
612{
613 UpdateSkiaStatus();
614}
615
617{
618 m_xUseSkia->hide();
619 m_xForceSkiaRaster->hide();
620 m_xSkiaStatusEnabled->hide();
621 m_xSkiaStatusDisabled->hide();
622}
623
625{
626#if HAVE_FEATURE_SKIA
627 bool skiaHidden = true;
628
629 // For now Skia is used mainly on Windows, enable the controls there.
630 if (Application::GetToolkitName() == "win")
631 skiaHidden = false;
632 // It can also be used on Linux, but only with the rarely used 'gen' backend.
633 if (Application::GetToolkitName() == "x11")
634 skiaHidden = false;
635 // OSX backend has Skia support too.
636 if (Application::GetToolkitName() == "osx")
637 skiaHidden = false;
638
639 if (skiaHidden)
640 {
642 return;
643 }
644
645 // Easier than a custom translation string.
646 bool bEnabled = SkiaHelper::isVCLSkiaEnabled();
647 m_xSkiaStatusEnabled->set_visible(bEnabled);
648 m_xSkiaStatusDisabled->set_visible(!bEnabled);
649
650 // FIXME: should really add code to show a 'lock' icon here.
651 m_xUseSkia->set_sensitive(!officecfg::Office::Common::VCL::UseSkia::isReadOnly());
652 m_xForceSkiaRaster->set_sensitive(m_xUseSkia->get_active() && !officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly());
653
654 // Technically the 'use hardware acceleration' option could be used to mean !forceSkiaRaster, but the implementation
655 // of the option is so tied to the implementation of the canvas module that it's simpler to ignore it.
657#else
659#endif
660}
661
662std::unique_ptr<SfxTabPage> OfaViewTabPage::Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet )
663{
664 return std::make_unique<OfaViewTabPage>(pPage, pController, *rAttrSet);
665}
666
668{
669 bool bModified = false;
670 bool bMenuOptModified = false;
671 bool bRepaintWindows(false);
672 std::shared_ptr<comphelper::ConfigurationChanges> xChanges(comphelper::ConfigurationChanges::create());
673
674 SvtMiscOptions aMiscOptions;
675 const sal_Int32 nSizeLB_NewSelection = m_xIconSizeLB->get_active();
676 if( nSizeLB_InitialSelection != nSizeLB_NewSelection )
677 {
678 // from now on it's modified, even if via auto setting the same size was set as now selected in the LB
679 sal_Int16 eSet = SFX_SYMBOLS_SIZE_AUTO;
680 switch( nSizeLB_NewSelection )
681 {
682 case 0: eSet = SFX_SYMBOLS_SIZE_AUTO; break;
683 case 1: eSet = SFX_SYMBOLS_SIZE_SMALL; break;
684 case 2: eSet = SFX_SYMBOLS_SIZE_LARGE; break;
685 case 3: eSet = SFX_SYMBOLS_SIZE_32; break;
686 default:
687 OSL_FAIL( "OfaViewTabPage::FillItemSet(): This state of m_xIconSizeLB should not be possible!" );
688 }
689 aMiscOptions.SetSymbolsSize( eSet );
690 }
691
692 const sal_Int32 nSidebarSizeLB_NewSelection = m_xSidebarIconSizeLB->get_active();
693 if( nSidebarSizeLB_InitialSelection != nSidebarSizeLB_NewSelection )
694 {
695 // from now on it's modified, even if via auto setting the same size was set as now selected in the LB
696 ToolBoxButtonSize eSet = ToolBoxButtonSize::DontCare;
697 switch( nSidebarSizeLB_NewSelection )
698 {
699 case 0: eSet = ToolBoxButtonSize::DontCare; break;
700 case 1: eSet = ToolBoxButtonSize::Small; break;
701 case 2: eSet = ToolBoxButtonSize::Large; break;
702 default:
703 OSL_FAIL( "OfaViewTabPage::FillItemSet(): This state of m_xSidebarIconSizeLB should not be possible!" );
704 }
705 officecfg::Office::Common::Misc::SidebarIconSize::set(static_cast<sal_Int16>(eSet), xChanges);
706 }
707
708 const sal_Int32 nNotebookbarSizeLB_NewSelection = m_xNotebookbarIconSizeLB->get_active();
709 if( nNotebookbarSizeLB_InitialSelection != nNotebookbarSizeLB_NewSelection )
710 {
711 // from now on it's modified, even if via auto setting the same size was set as now selected in the LB
712 ToolBoxButtonSize eSet = ToolBoxButtonSize::DontCare;
713 switch( nNotebookbarSizeLB_NewSelection )
714 {
715 case 0: eSet = ToolBoxButtonSize::DontCare; break;
716 case 1: eSet = ToolBoxButtonSize::Small; break;
717 case 2: eSet = ToolBoxButtonSize::Large; break;
718 default:
719 OSL_FAIL( "OfaViewTabPage::FillItemSet(): This state of m_xNotebookbarIconSizeLB should not be possible!" );
720 }
721 officecfg::Office::Common::Misc::NotebookbarIconSize::set(static_cast<sal_Int16>(eSet), xChanges);
722 }
723
724 const sal_Int32 nStyleLB_NewSelection = m_xIconStyleLB->get_active();
725 if( nStyleLB_InitialSelection != nStyleLB_NewSelection )
726 {
727 aMiscOptions.SetIconTheme(m_xIconStyleLB->get_active_id());
728 nStyleLB_InitialSelection = nStyleLB_NewSelection;
729 }
730
731 bool bAppearanceChanged = false;
732
733 // Mouse Snap Mode
734 SnapType eOldSnap = pAppearanceCfg->GetSnapMode();
735 SnapType eNewSnap = static_cast<SnapType>(m_xMousePosLB->get_active());
736 if(eNewSnap > SnapType::NONE)
737 eNewSnap = SnapType::NONE;
738
739 if ( eNewSnap != eOldSnap )
740 {
741 pAppearanceCfg->SetSnapMode(eNewSnap );
742 bAppearanceChanged = true;
743 }
744
745 // Middle Mouse Button
746 MouseMiddleButtonAction eOldMiddleMouse = pAppearanceCfg->GetMiddleMouseButton();
747 short eNewMiddleMouse = m_xMouseMiddleLB->get_active();
748 if(eNewMiddleMouse > 2)
749 eNewMiddleMouse = 2;
750
751 if ( eNewMiddleMouse != static_cast<short>(eOldMiddleMouse) )
752 {
753 pAppearanceCfg->SetMiddleMouseButton( static_cast<MouseMiddleButtonAction>(eNewMiddleMouse) );
754 bAppearanceChanged = true;
755 }
756
757 if (m_xFontAntiAliasing->get_state_changed_from_saved())
758 {
759 pAppearanceCfg->SetFontAntiAliasing(m_xFontAntiAliasing->get_active());
760 bAppearanceChanged = true;
761 }
762
763 if (m_xAAPointLimit->get_value_changed_from_saved())
764 {
765 pAppearanceCfg->SetFontAntialiasingMinPixelHeight(m_xAAPointLimit->get_value(FieldUnit::PIXEL));
766 bAppearanceChanged = true;
767 }
768
769 if (m_xFontShowCB->get_state_changed_from_saved())
770 {
771 officecfg::Office::Common::Font::View::ShowFontBoxWYSIWYG::set(m_xFontShowCB->get_active(), xChanges);
772 bModified = true;
773 }
774
775 if (m_xMenuIconsLB->get_value_changed_from_saved())
776 {
777 officecfg::Office::Common::View::Menu::IsSystemIconsInMenus::set(m_xMenuIconsLB->get_active() == 0, xChanges);
778 officecfg::Office::Common::View::Menu::ShowIconsInMenues::set(m_xMenuIconsLB->get_active() == 2, xChanges);
779 bModified = true;
780 bMenuOptModified = true;
781 bAppearanceChanged = true;
782 }
783
784 if (m_xContextMenuShortcutsLB->get_value_changed_from_saved())
785 {
786 officecfg::Office::Common::View::Menu::ShortcutsInContextMenus::set(
787 m_xContextMenuShortcutsLB->get_active() == 0 ?
789 static_cast<TriState>(m_xContextMenuShortcutsLB->get_active() - 1),
790 xChanges);
791 bModified = true;
792 bMenuOptModified = true;
793 bAppearanceChanged = true;
794 }
795
796 // #i95644# if disabled, do not use value, see in ::Reset()
797 if (m_xUseHardwareAccell->get_sensitive())
798 {
799 if(m_xUseHardwareAccell->get_state_changed_from_saved())
800 {
801 pCanvasSettings->EnabledHardwareAcceleration(m_xUseHardwareAccell->get_active());
802 bModified = true;
803 }
804 }
805
806 // #i95644# if disabled, do not use value, see in ::Reset()
807 if (m_xUseAntiAliase->get_sensitive())
808 {
810 {
811 SvtOptionsDrawinglayer::SetAntiAliasing(m_xUseAntiAliase->get_active(), /*bTemporary*/false);
812 bModified = true;
813 bRepaintWindows = true;
814 }
815 }
816
817 if (m_xUseSkia->get_state_changed_from_saved() ||
818 m_xForceSkiaRaster->get_state_changed_from_saved())
819 {
820 officecfg::Office::Common::VCL::UseSkia::set(m_xUseSkia->get_active(), xChanges);
821 officecfg::Office::Common::VCL::ForceSkiaRaster::set(m_xForceSkiaRaster->get_active(), xChanges);
822 bModified = true;
823 }
824
825 xChanges->commit();
826
827 if( bMenuOptModified )
828 {
829 // Set changed settings to the application instance
830 AllSettings aAllSettings = Application::GetSettings();
831 StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
832 aAllSettings.SetStyleSettings(aStyleSettings);
833 Application::MergeSystemSettings( aAllSettings );
834 Application::SetSettings(aAllSettings);
835 }
836
837 if ( bAppearanceChanged )
838 {
839 pAppearanceCfg->Commit();
840 pAppearanceCfg->SetApplicationDefaults ( GetpApp() );
841 }
842
843 if(bRepaintWindows)
844 {
846
847 while(pAppWindow)
848 {
849 pAppWindow->Invalidate();
850 pAppWindow = Application::GetNextTopLevelWindow(pAppWindow);
851 }
852 }
853
854 if (m_xUseSkia->get_state_changed_from_saved() ||
855 m_xForceSkiaRaster->get_state_changed_from_saved())
856 {
857 SolarMutexGuard aGuard;
861 GetDialogController()->response(RET_OK);
862 }
863
864 return bModified;
865}
866
868{
869 SvtMiscOptions aMiscOptions;
870
871 if (aMiscOptions.GetSymbolsSize() != SFX_SYMBOLS_SIZE_AUTO)
872 {
874
875 if (aMiscOptions.GetSymbolsSize() == SFX_SYMBOLS_SIZE_LARGE)
877 else if (aMiscOptions.GetSymbolsSize() == SFX_SYMBOLS_SIZE_32)
879 }
881 m_xIconSizeLB->save_value();
882
883 ToolBoxButtonSize eSidebarIconSize = static_cast<ToolBoxButtonSize>(officecfg::Office::Common::Misc::SidebarIconSize::get());
884 if( eSidebarIconSize == ToolBoxButtonSize::DontCare )
885 ; // do nothing
886 else if( eSidebarIconSize == ToolBoxButtonSize::Small )
888 else if( eSidebarIconSize == ToolBoxButtonSize::Large )
891 m_xSidebarIconSizeLB->save_value();
892 ToolBoxButtonSize eNotebookbarIconSize = static_cast<ToolBoxButtonSize>(officecfg::Office::Common::Misc::NotebookbarIconSize::get());
893 if( eNotebookbarIconSize == ToolBoxButtonSize::DontCare )
894 ; // do nothing
895 else if( eNotebookbarIconSize == ToolBoxButtonSize::Small )
897 else if( eNotebookbarIconSize == ToolBoxButtonSize::Large )
900 m_xNotebookbarIconSizeLB->save_value();
901
902 if (aMiscOptions.IconThemeWasSetAutomatically()) {
904 }
905 else {
906 const OUString& selected = aMiscOptions.GetIconTheme();
907 const vcl::IconThemeInfo& selectedInfo =
909 nStyleLB_InitialSelection = m_xIconStyleLB->find_text(selectedInfo.GetDisplayName());
910 }
911
913 m_xIconStyleLB->save_value();
914
915 // Mouse Snap
916 m_xMousePosLB->set_active(static_cast<sal_Int32>(pAppearanceCfg->GetSnapMode()));
917 m_xMousePosLB->save_value();
918
919 // Mouse Snap
920 m_xMouseMiddleLB->set_active(static_cast<short>(pAppearanceCfg->GetMiddleMouseButton()));
921 m_xMouseMiddleLB->save_value();
922
923 m_xFontAntiAliasing->set_active( pAppearanceCfg->IsFontAntiAliasing() );
924 m_xAAPointLimit->set_value(pAppearanceCfg->GetFontAntialiasingMinPixelHeight(), FieldUnit::PIXEL);
925
926 // WorkingSet
927 m_xFontShowCB->set_active(officecfg::Office::Common::Font::View::ShowFontBoxWYSIWYG::get());
928 bool bSystemMenuIcons = officecfg::Office::Common::View::Menu::IsSystemIconsInMenus::get();
929 bool bMenuIcons = officecfg::Office::Common::View::Menu::ShowIconsInMenues::get();
930 m_xMenuIconsLB->set_active(bSystemMenuIcons ? 0 : (bMenuIcons ? 2 : 1));
931 m_xMenuIconsLB->save_value();
932
933 TriState eContextMenuShortcuts = static_cast<TriState>(officecfg::Office::Common::View::Menu::ShortcutsInContextMenus::get());
934 bool bContextMenuShortcutsNonDefault = eContextMenuShortcuts == TRISTATE_FALSE || eContextMenuShortcuts == TRISTATE_TRUE;
935 m_xContextMenuShortcutsLB->set_active(bContextMenuShortcutsNonDefault ? eContextMenuShortcuts + 1 : 0);
936 m_xContextMenuShortcutsLB->save_value();
937
939 m_xUseHardwareAccell->save_state();
940
941 { // #i95644# AntiAliasing
943 {
945 }
946 else
947 {
948 m_xUseAntiAliase->set_active(false);
949 m_xUseAntiAliase->set_sensitive(false);
950 }
951
952 m_xUseAntiAliase->save_state();
953 }
954
955 m_xUseSkia->set_active(officecfg::Office::Common::VCL::UseSkia::get());
956 m_xForceSkiaRaster->set_active(officecfg::Office::Common::VCL::ForceSkiaRaster::get());
957 m_xUseSkia->save_state();
958 m_xForceSkiaRaster->save_state();
959
960 m_xFontAntiAliasing->save_state();
961 m_xAAPointLimit->save_value();
962 m_xFontShowCB->save_state();
963
964 OnAntialiasingToggled(*m_xFontAntiAliasing);
966}
967
969{
970 // #i95644# HW accel (unified to disable mechanism)
971 if(pCanvasSettings->IsHardwareAccelerationAvailable())
972 {
973 m_xUseHardwareAccell->set_active(pCanvasSettings->IsHardwareAccelerationEnabled());
974 m_xUseHardwareAccell->set_sensitive(!pCanvasSettings->IsHardwareAccelerationRO());
975 }
976 else
977 {
978 m_xUseHardwareAccell->set_active(false);
979 m_xUseHardwareAccell->set_sensitive(false);
980 }
981#if HAVE_FEATURE_SKIA
982 m_xUseHardwareAccell->set_sensitive(!m_xUseSkia->get_active());
983#endif
984}
985
987{
991};
992
993static bool bLanguageCurrentDoc_Impl = false;
994
995// some things we'll need...
996constexpr OUStringLiteral sAccessSrvc = u"com.sun.star.configuration.ConfigurationAccess";
997constexpr OUStringLiteral sAccessUpdSrvc = u"com.sun.star.configuration.ConfigurationUpdateAccess";
998constexpr OUStringLiteral sInstalledLocalesPath = u"org.openoffice.Setup/Office/InstalledLocales";
999constexpr OUStringLiteral sUserLocalePath = u"org.openoffice.Office.Linguistic/General";
1000constexpr OUStringLiteral sUserLocaleKey = u"UILocale";
1002
1003static OUString lcl_getDatePatternsConfigString( const LocaleDataWrapper& rLocaleWrapper )
1004{
1005 Sequence< OUString > aDateAcceptancePatterns = rLocaleWrapper.getDateAcceptancePatterns();
1006 sal_Int32 nPatterns = aDateAcceptancePatterns.getLength();
1007 OUStringBuffer aBuf( nPatterns * 6 ); // 6 := length of Y-M-D;
1008 SAL_WARN_IF( !nPatterns, "cui.options", "No date acceptance pattern");
1009 if (nPatterns)
1010 {
1011 const OUString* pPatterns = aDateAcceptancePatterns.getConstArray();
1012 aBuf.append( pPatterns[0]);
1013 for (sal_Int32 i=1; i < nPatterns; ++i)
1014 aBuf.append(';').append( pPatterns[i]);
1015 }
1016 return aBuf.makeStringAndClear();
1017}
1018
1019namespace
1020{
1021 //what ui language will be selected by default if the user override of General::UILocale is unset ?
1022 LanguageTag GetInstalledLocaleForSystemUILanguage()
1023 {
1024 css::uno::Sequence<OUString> inst(officecfg::Setup::Office::InstalledLocales::get()->getElementNames());
1026 }
1027}
1028
1030 : SfxTabPage(pPage, pController, "cui/ui/optlanguagespage.ui", "OptLanguagesPage", &rSet)
1031 , pLangConfig(new LanguageConfig_Impl)
1032 , m_bDatePatternsValid(false)
1033 , m_xUserInterfaceLB(m_xBuilder->weld_combo_box("userinterface"))
1034 , m_xLocaleSettingFT(m_xBuilder->weld_label("localesettingFT"))
1035 , m_xLocaleSettingLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("localesetting")))
1036 , m_xDecimalSeparatorCB(m_xBuilder->weld_check_button("decimalseparator"))
1037 , m_xCurrencyFT(m_xBuilder->weld_label("defaultcurrency"))
1038 , m_xCurrencyLB(m_xBuilder->weld_combo_box("currencylb"))
1039 , m_xDatePatternsFT(m_xBuilder->weld_label("dataaccpatterns"))
1040 , m_xDatePatternsED(m_xBuilder->weld_entry("datepatterns"))
1041 , m_xWesternLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("westernlanguage")))
1042 , m_xWesternLanguageFT(m_xBuilder->weld_label("western"))
1043 , m_xAsianLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("asianlanguage")))
1044 , m_xComplexLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("complexlanguage")))
1045 , m_xCurrentDocCB(m_xBuilder->weld_check_button("currentdoc"))
1046 , m_xAsianSupportCB(m_xBuilder->weld_check_button("asiansupport"))
1047 , m_xCTLSupportCB(m_xBuilder->weld_check_button("ctlsupport"))
1048 , m_xIgnoreLanguageChangeCB(m_xBuilder->weld_check_button("ignorelanguagechange"))
1049{
1050 // tdf#125483 save original default label
1052
1053 // initialize user interface language selection
1055
1056 OUString aUILang = m_sSystemDefaultString +
1057 " - " +
1058 SvtLanguageTable::GetLanguageString(GetInstalledLocaleForSystemUILanguage().getLanguageType());
1059
1060 m_xUserInterfaceLB->append("0", aUILang);
1061 m_xUserInterfaceLB->append_separator("");
1062 try
1063 {
1064 Reference< XMultiServiceFactory > theConfigProvider(
1065 css::configuration::theDefaultProvider::get(
1067 // find out which locales are currently installed and add them to the listbox
1068 Sequence< Any > theArgs{ Any(NamedValue("nodepath", Any(OUString(sInstalledLocalesPath)))) };
1069 Reference< XNameAccess > theNameAccess(
1070 theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs ), UNO_QUERY_THROW );
1071 seqInstalledLanguages = theNameAccess->getElementNames();
1073 std::vector< std::pair<sal_Int32, OUString> > aUILanguages;
1074 for (sal_Int32 i=0; i<seqInstalledLanguages.getLength(); i++)
1075 {
1077 if (aLang != LANGUAGE_DONTKNOW)
1078 {
1079 OUString aLangStr( SvtLanguageTable::GetLanguageString( aLang ) );
1080 aUILanguages.emplace_back(i+1, aLangStr);
1081 }
1082 }
1083
1084 std::sort(aUILanguages.begin(), aUILanguages.end(), [](const auto& l1, const auto& l2) {
1085 static const auto aSorter = comphelper::string::NaturalStringSorter(
1086 comphelper::getProcessComponentContext(),
1087 Application::GetSettings().GetLanguageTag().getLocale());
1088 return aSorter.compare(l1.second, l2.second) < 0;
1089 });
1090
1091 // tdf#114694: append the sorted list after the default entry and separator.
1092 for (const auto & [ nGroupID, sGroupName ] : aUILanguages)
1093 {
1094 m_xUserInterfaceLB->append(OUString::number(nGroupID), sGroupName);
1095 }
1096
1097 m_xUserInterfaceLB->set_active(0);
1098
1099 // find out whether the user has a specific locale specified
1100 Sequence< Any > theArgs2{ Any(NamedValue("nodepath", Any(OUString(sUserLocalePath)))) };
1101 theNameAccess.set(
1102 theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs2 ), UNO_QUERY_THROW );
1103 if (theNameAccess->hasByName(sUserLocaleKey))
1104 theNameAccess->getByName(sUserLocaleKey) >>= m_sUserLocaleValue;
1105 // select the user specified locale in the listbox
1106 if (!m_sUserLocaleValue.isEmpty())
1107 {
1108 for (sal_Int32 i = 0, nEntryCount = m_xUserInterfaceLB->get_count(); i < nEntryCount; ++i)
1109 {
1110 sal_Int32 d = m_xUserInterfaceLB->get_id(i).toInt32();
1111 if ( d > 0 && seqInstalledLanguages.getLength() > d-1 && seqInstalledLanguages[d-1] == m_sUserLocaleValue)
1112 m_xUserInterfaceLB->set_active(i);
1113 }
1114 }
1115
1116 }
1117 catch (const Exception &)
1118 {
1119 // we'll just leave the box in its default setting and won't
1120 // even give it event handler...
1121 TOOLS_WARN_EXCEPTION("cui.options", "ignoring" );
1122 }
1123
1124 m_xWesternLanguageLB->SetLanguageList(
1125 SvxLanguageListFlags::WESTERN | SvxLanguageListFlags::ONLY_KNOWN, true, false, true, true,
1126 LANGUAGE_SYSTEM, css::i18n::ScriptType::LATIN);
1127
1128 m_xAsianLanguageLB->SetLanguageList(
1129 SvxLanguageListFlags::CJK | SvxLanguageListFlags::ONLY_KNOWN, true, false, true, true,
1130 LANGUAGE_SYSTEM, css::i18n::ScriptType::ASIAN);
1131
1132 m_xComplexLanguageLB->SetLanguageList(
1133 SvxLanguageListFlags::CTL | SvxLanguageListFlags::ONLY_KNOWN, true, false, true, true,
1134 LANGUAGE_SYSTEM, css::i18n::ScriptType::COMPLEX);
1135
1136 m_xLocaleSettingLB->SetLanguageList(
1137 SvxLanguageListFlags::ALL | SvxLanguageListFlags::ONLY_KNOWN, false, false, false, true,
1138 LANGUAGE_USER_SYSTEM_CONFIG, css::i18n::ScriptType::WEAK);
1139
1141 const NfCurrencyEntry& rCurr = SvNumberFormatter::GetCurrencyEntry( LANGUAGE_SYSTEM );
1142 // insert SYSTEM entry
1143 OUString aDefaultCurr = m_sSystemDefaultString + " - " + rCurr.GetBankSymbol();
1144 m_xCurrencyLB->append("default", aDefaultCurr);
1145 m_xCurrencyLB->append_separator("");
1146
1147 assert(m_xCurrencyLB->find_id("default") != -1);
1148 // all currencies
1149 OUString aTwoSpace( " " );
1150 sal_uInt16 nCurrCount = rCurrTab.size();
1151 std::vector< const NfCurrencyEntry* > aCurrencies;
1152 // first entry is SYSTEM, skip it
1153 for ( sal_uInt16 j=1; j < nCurrCount; ++j )
1154 {
1155 aCurrencies.push_back(&rCurrTab[j]);
1156 }
1157 std::sort(aCurrencies.begin(), aCurrencies.end(),
1158 [](const NfCurrencyEntry* c1, const NfCurrencyEntry* c2) {
1159 return c1->GetBankSymbol().compareTo(c2->GetBankSymbol()) < 0;
1160 });
1161
1162 for (auto &v : aCurrencies)
1163 {
1164 OUString aStr_ = v->GetBankSymbol() +
1165 aTwoSpace +
1166 v->GetSymbol();
1167 aStr_ = ApplyLreOrRleEmbedding( aStr_ ) +
1168 aTwoSpace +
1170 m_xCurrencyLB->append(weld::toId(v), aStr_);
1171 }
1172
1173 m_xCurrencyLB->set_active(0);
1174
1175 m_xLocaleSettingLB->connect_changed( LINK( this, OfaLanguagesTabPage, LocaleSettingHdl ) );
1176 m_xDatePatternsED->connect_changed( LINK( this, OfaLanguagesTabPage, DatePatternsHdl ) );
1177
1178 Link<weld::Toggleable&,void> aLink( LINK( this, OfaLanguagesTabPage, SupportHdl ) );
1179 m_xAsianSupportCB->connect_toggled( aLink );
1180 m_xCTLSupportCB->connect_toggled( aLink );
1181
1183 m_xAsianSupportCB->set_active(m_bOldAsian);
1184 m_xAsianSupportCB->save_state();
1186 m_xAsianSupportCB->set_sensitive(!bReadonly);
1187 SupportHdl(*m_xAsianSupportCB);
1188
1189 m_bOldCtl = pLangConfig->aCTLLanguageOptions.IsCTLFontEnabled();
1190 m_xCTLSupportCB->set_active(m_bOldCtl);
1191 m_xCTLSupportCB->save_state();
1192 bReadonly = pLangConfig->aCTLLanguageOptions.IsReadOnly(SvtCTLOptions::E_CTLFONT);
1193 m_xCTLSupportCB->set_sensitive(!bReadonly);
1194 SupportHdl(*m_xCTLSupportCB);
1195
1196 m_xIgnoreLanguageChangeCB->set_active( pLangConfig->aSysLocaleOptions.IsIgnoreLanguageChange() );
1197}
1198
1200{
1201}
1202
1203std::unique_ptr<SfxTabPage> OfaLanguagesTabPage::Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet )
1204{
1205 return std::make_unique<OfaLanguagesTabPage>(pPage, pController, *rAttrSet);
1206}
1207
1208static void lcl_Update(std::unique_ptr<SfxVoidItem> pInvalidItems[], std::unique_ptr<SfxBoolItem> pBoolItems[], sal_uInt16 nCount)
1209{
1210 SfxViewFrame* pCurrentFrm = SfxViewFrame::Current();
1212 while(pViewFrm)
1213 {
1214 SfxBindings& rBind = pViewFrm->GetBindings();
1215 for(sal_uInt16 i = 0; i < nCount; i++)
1216 {
1217 if(pCurrentFrm == pViewFrm)
1218 rBind.InvalidateAll(false);
1219 rBind.SetState( *pInvalidItems[i] );
1220 rBind.SetState( *pBoolItems[i] );
1221 }
1222 pViewFrm = SfxViewFrame::GetNext(*pViewFrm);
1223 }
1224}
1225
1227{
1228 // lock configuration broadcasters so that we can coordinate the notifications
1229 pLangConfig->aSysLocaleOptions.BlockBroadcasts( true );
1230 pLangConfig->aCTLLanguageOptions.BlockBroadcasts( true );
1231 pLangConfig->aLinguConfig.BlockBroadcasts( true );
1232
1233 /*
1234 * Sequence checking only matters when CTL support is enabled.
1235 *
1236 * So we only need to check for sequence checking if
1237 * a) previously it was unchecked and is now checked or
1238 * b) it was already checked but the CTL language has changed
1239 */
1240 if (
1241 m_xCTLSupportCB->get_active() &&
1242 (m_xCTLSupportCB->get_saved_state() != TRISTATE_TRUE ||
1243 m_xComplexLanguageLB->get_active_id_changed_from_saved())
1244 )
1245 {
1246 //sequence checking has to be switched on depending on the selected CTL language
1247 LanguageType eCTLLang = m_xComplexLanguageLB->get_active_id();
1248 bool bOn = MsLangId::needsSequenceChecking( eCTLLang);
1249 pLangConfig->aCTLLanguageOptions.SetCTLSequenceCheckingRestricted(bOn);
1250 pLangConfig->aCTLLanguageOptions.SetCTLSequenceChecking(bOn);
1251 pLangConfig->aCTLLanguageOptions.SetCTLSequenceCheckingTypeAndReplace(bOn);
1252 }
1253 try
1254 {
1255 // handle settings for UI Language
1256 // a change of setting needs to bring up a warning message
1257 OUString aLangString;
1258 sal_Int32 d = m_xUserInterfaceLB->get_active_id().toInt32();
1259 if( d > 0 && seqInstalledLanguages.getLength() > d-1)
1260 aLangString = seqInstalledLanguages[d-1];
1261
1262 /*
1263 if( m_xUserInterfaceLB->GetSelectedEntryPos() > 0)
1264 aLangString = ConvertLanguageToIsoString(m_xUserInterfaceLB->get_active_id());
1265 */
1266 Reference< XMultiServiceFactory > theConfigProvider(
1267 css::configuration::theDefaultProvider::get(
1269 Sequence< Any > theArgs{ Any(NamedValue("nodepath", Any(OUString(sUserLocalePath)))) };
1271 theConfigProvider->createInstanceWithArguments(sAccessUpdSrvc, theArgs ), UNO_QUERY_THROW );
1272 if ( m_sUserLocaleValue != aLangString)
1273 {
1274 // OSL_FAIL("UserInterface language was changed, restart.");
1275 // write new value
1276 xProp->setPropertyValue(sUserLocaleKey, Any(aLangString));
1277 Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges();
1278 // display info
1279 SolarMutexGuard aGuard;
1283 GetDialogController()->response(RET_OK);
1284
1285 // tell quickstarter to stop being a veto listener
1286
1287 Reference< XComponentContext > xContext(
1289 css::office::Quickstart::createAndSetVeto(xContext, false, false, false/*DisableVeto*/);
1290 }
1291 }
1292 catch (const Exception&)
1293 {
1294 // we'll just leave the box in its default setting and won't
1295 // even give it event handler...
1296 TOOLS_WARN_EXCEPTION("cui.options", "ignoring");
1297 }
1298
1299 LanguageTag aLanguageTag( pLangConfig->aSysLocaleOptions.GetLanguageTag());
1300 LanguageType eOldLocale = (aLanguageTag.isSystemLocale() ? LANGUAGE_SYSTEM :
1301 aLanguageTag.makeFallback().getLanguageType());
1302 LanguageType eNewLocale = m_xLocaleSettingLB->get_active_id();
1303
1304 // If the "Default ..." entry was selected that means SYSTEM, the actual
1305 // eNewLocale value is temporary for the dialog only, do not resolve to
1306 // what system currently is.
1307 if (eNewLocale == LANGUAGE_USER_SYSTEM_CONFIG)
1308 eNewLocale = LANGUAGE_SYSTEM;
1309
1310 if ( eOldLocale != eNewLocale )
1311 {
1312 // an empty string denotes SYSTEM locale
1313 OUString sNewLang;
1314 if ( eNewLocale != LANGUAGE_SYSTEM )
1315 sNewLang = LanguageTag::convertToBcp47( eNewLocale);
1316
1317 // locale nowadays get to AppSettings via notification
1318 // this will happen after releasing the lock on the ConfigurationBroadcaster at
1319 // the end of this method
1320 pLangConfig->aSysLocaleOptions.SetLocaleConfigString( sNewLang );
1321 rSet->Put( SfxBoolItem( SID_OPT_LOCALE_CHANGED, true ) );
1322
1324 bool bNewCJK = bool( nNewType & SvtScriptType::ASIAN );
1325 SvtCompatibilityOptions aCompatOpts;
1327 }
1328
1329 if(m_xDecimalSeparatorCB->get_state_changed_from_saved())
1330 pLangConfig->aSysLocaleOptions.SetDecimalSeparatorAsLocale(m_xDecimalSeparatorCB->get_active());
1331
1332 if(m_xIgnoreLanguageChangeCB->get_state_changed_from_saved())
1333 pLangConfig->aSysLocaleOptions.SetIgnoreLanguageChange(m_xIgnoreLanguageChangeCB->get_active());
1334
1335 // Configured currency, for example, USD-en-US or EUR-de-DE, or empty for locale default.
1336 OUString sOldCurr = pLangConfig->aSysLocaleOptions.GetCurrencyConfigString();
1337 OUString sId = m_xCurrencyLB->get_active_id();
1338 const NfCurrencyEntry* pCurr = sId == "default" ? nullptr : weld::fromId<const NfCurrencyEntry*>(sId);
1339 OUString sNewCurr;
1340 if ( pCurr )
1342 pCurr->GetBankSymbol(), pCurr->GetLanguage() );
1343 if ( sOldCurr != sNewCurr )
1344 pLangConfig->aSysLocaleOptions.SetCurrencyConfigString( sNewCurr );
1345
1346 // Configured date acceptance patterns, for example Y-M-D;M-D or empty for
1347 // locale default.
1348 if (m_bDatePatternsValid && m_xDatePatternsED->get_value_changed_from_saved())
1349 pLangConfig->aSysLocaleOptions.SetDatePatternsConfigString( m_xDatePatternsED->get_text());
1350
1351 SfxObjectShell* pCurrentDocShell = SfxObjectShell::Current();
1352 Reference< css::linguistic2::XLinguProperties > xLinguProp = LinguMgr::GetLinguPropertySet();
1353 bool bCurrentDocCBChecked = m_xCurrentDocCB->get_active();
1354 if (m_xCurrentDocCB->get_sensitive())
1355 bLanguageCurrentDoc_Impl = bCurrentDocCBChecked;
1356 bool bCurrentDocCBChanged = m_xCurrentDocCB->get_state_changed_from_saved();
1357
1358 bool bValChanged = m_xWesternLanguageLB->get_active_id_changed_from_saved();
1359 if( (bCurrentDocCBChanged && !bCurrentDocCBChecked) || bValChanged)
1360 {
1361 LanguageType eSelectLang = m_xWesternLanguageLB->get_active_id();
1362 if(!bCurrentDocCBChecked)
1363 {
1364 Any aValue;
1365 Locale aLocale = LanguageTag::convertToLocale( eSelectLang, false);
1366 aValue <<= aLocale;
1367 pLangConfig->aLinguConfig.SetProperty( u"DefaultLocale", aValue );
1368 if (xLinguProp.is())
1369 xLinguProp->setDefaultLocale( aLocale );
1370 }
1371 if(pCurrentDocShell)
1372 {
1373 rSet->Put(SvxLanguageItem(MsLangId::resolveSystemLanguageByScriptType(eSelectLang, css::i18n::ScriptType::LATIN),
1374 SID_ATTR_LANGUAGE));
1375 }
1376 }
1377 bValChanged = m_xAsianLanguageLB->get_active_id_changed_from_saved();
1378 if( (bCurrentDocCBChanged && !bCurrentDocCBChecked) || bValChanged)
1379 {
1380 LanguageType eSelectLang = m_xAsianLanguageLB->get_active_id();
1381 if(!bCurrentDocCBChecked)
1382 {
1383 Any aValue;
1384 Locale aLocale = LanguageTag::convertToLocale( eSelectLang, false);
1385 aValue <<= aLocale;
1386 pLangConfig->aLinguConfig.SetProperty( u"DefaultLocale_CJK", aValue );
1387 if (xLinguProp.is())
1388 xLinguProp->setDefaultLocale_CJK( aLocale );
1389 }
1390 if(pCurrentDocShell)
1391 {
1392 rSet->Put(SvxLanguageItem(MsLangId::resolveSystemLanguageByScriptType(eSelectLang, css::i18n::ScriptType::ASIAN),
1393 SID_ATTR_CHAR_CJK_LANGUAGE));
1394 }
1395 }
1396 bValChanged = m_xComplexLanguageLB->get_active_id_changed_from_saved();
1397 if( (bCurrentDocCBChanged && !bCurrentDocCBChecked) || bValChanged)
1398 {
1399 LanguageType eSelectLang = m_xComplexLanguageLB->get_active_id();
1400 if(!bCurrentDocCBChecked)
1401 {
1402 Any aValue;
1403 Locale aLocale = LanguageTag::convertToLocale( eSelectLang, false);
1404 aValue <<= aLocale;
1405 pLangConfig->aLinguConfig.SetProperty( u"DefaultLocale_CTL", aValue );
1406 if (xLinguProp.is())
1407 xLinguProp->setDefaultLocale_CTL( aLocale );
1408 }
1409 if(pCurrentDocShell)
1410 {
1411 rSet->Put(SvxLanguageItem(MsLangId::resolveSystemLanguageByScriptType(eSelectLang, css::i18n::ScriptType::COMPLEX),
1412 SID_ATTR_CHAR_CTL_LANGUAGE));
1413 }
1414 }
1415
1416 if(m_xAsianSupportCB->get_state_changed_from_saved() )
1417 {
1418 bool bChecked = m_xAsianSupportCB->get_active();
1419 SvtCJKOptions::SetAll(bChecked);
1420
1421 //iterate over all bindings to invalidate vertical text direction
1422 const sal_uInt16 STATE_COUNT = 2;
1423
1424 std::unique_ptr<SfxBoolItem> pBoolItems[STATE_COUNT];
1425 pBoolItems[0].reset(new SfxBoolItem(SID_VERTICALTEXT_STATE, false));
1426 pBoolItems[1].reset(new SfxBoolItem(SID_TEXT_FITTOSIZE_VERTICAL, false));
1427
1428 std::unique_ptr<SfxVoidItem> pInvalidItems[STATE_COUNT];
1429 pInvalidItems[0].reset(new SfxVoidItem(SID_VERTICALTEXT_STATE));
1430 pInvalidItems[1].reset(new SfxVoidItem(SID_TEXT_FITTOSIZE_VERTICAL));
1431
1432 lcl_Update(pInvalidItems, pBoolItems, STATE_COUNT);
1433 }
1434
1435 if ( m_xCTLSupportCB->get_state_changed_from_saved() )
1436 {
1437 SvtSearchOptions aOpt;
1438 aOpt.SetIgnoreDiacritics_CTL(true);
1439 aOpt.SetIgnoreKashida_CTL(true);
1440 aOpt.Commit();
1441 pLangConfig->aCTLLanguageOptions.SetCTLFontEnabled( m_xCTLSupportCB->get_active() );
1442
1443 const sal_uInt16 STATE_COUNT = 1;
1444 std::unique_ptr<SfxBoolItem> pBoolItems[STATE_COUNT];
1445 pBoolItems[0].reset(new SfxBoolItem(SID_CTLFONT_STATE, false));
1446 std::unique_ptr<SfxVoidItem> pInvalidItems[STATE_COUNT];
1447 pInvalidItems[0].reset(new SfxVoidItem(SID_CTLFONT_STATE));
1448 lcl_Update(pInvalidItems, pBoolItems, STATE_COUNT);
1449 }
1450
1451 if ( pLangConfig->aSysLocaleOptions.IsModified() )
1452 pLangConfig->aSysLocaleOptions.Commit();
1453
1454 // first release the lock on the ConfigurationBroadcaster for Locale changes
1455 // it seems that our code relies on the fact that before other changes like e.g. currency
1456 // are broadcasted locale changes have been done
1457 pLangConfig->aSysLocaleOptions.BlockBroadcasts( false );
1458 pLangConfig->aCTLLanguageOptions.BlockBroadcasts( false );
1459 pLangConfig->aLinguConfig.BlockBroadcasts( false );
1460
1461 return false;
1462}
1463
1465{
1466 LanguageTag aLanguageTag( pLangConfig->aSysLocaleOptions.GetLanguageTag());
1467 if ( aLanguageTag.isSystemLocale() )
1469 else
1470 m_xLocaleSettingLB->set_active_id( aLanguageTag.makeFallback().getLanguageType());
1471 bool bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::Locale);
1472 m_xLocaleSettingLB->set_sensitive(!bReadonly);
1473 m_xLocaleSettingFT->set_sensitive(!bReadonly);
1474
1475
1476 m_xDecimalSeparatorCB->set_active( pLangConfig->aSysLocaleOptions.IsDecimalSeparatorAsLocale());
1477 m_xDecimalSeparatorCB->save_state();
1478
1479 m_xIgnoreLanguageChangeCB->set_active( pLangConfig->aSysLocaleOptions.IsIgnoreLanguageChange());
1480 m_xIgnoreLanguageChangeCB->save_state();
1481
1482 // let LocaleSettingHdl enable/disable checkboxes for CJK/CTL support
1483 // #i15812# must be done *before* the configured currency is set
1484 // and update the decimal separator used for the given locale
1485 LocaleSettingHdl(*m_xLocaleSettingLB->get_widget());
1486
1487 // configured currency, for example, USD-en-US or EUR-de-DE, or empty for locale default
1488 const NfCurrencyEntry* pCurr = nullptr;
1489 OUString sCurrency = pLangConfig->aSysLocaleOptions.GetCurrencyConfigString();
1490 if ( !sCurrency.isEmpty() )
1491 {
1492 LanguageType eLang;
1493 OUString aAbbrev;
1494 SvtSysLocaleOptions::GetCurrencyAbbrevAndLanguage( aAbbrev, eLang, sCurrency );
1495 pCurr = SvNumberFormatter::GetCurrencyEntry( aAbbrev, eLang );
1496 }
1497 // if pCurr==nullptr the SYSTEM entry is selected
1498 OUString sId = !pCurr ? OUString("default") : weld::toId(pCurr);
1499 m_xCurrencyLB->set_active_id(sId);
1500 bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::Currency);
1501 m_xCurrencyLB->set_sensitive(!bReadonly);
1502 m_xCurrencyFT->set_sensitive(!bReadonly);
1503
1504 // date acceptance patterns
1505 OUString aDatePatternsString = pLangConfig->aSysLocaleOptions.GetDatePatternsConfigString();
1506 if (aDatePatternsString.isEmpty())
1507 {
1509 aDatePatternsString = lcl_getDatePatternsConfigString( rLocaleWrapper);
1510 // Let's assume patterns are valid at this point.
1511 m_bDatePatternsValid = true;
1512 }
1513 else
1514 {
1515 bool bModified = false;
1516 m_bDatePatternsValid = validateDatePatterns( bModified, aDatePatternsString);
1517 }
1518 m_xDatePatternsED->set_text(aDatePatternsString);
1519 m_xDatePatternsED->set_message_type( m_bDatePatternsValid ?
1521 bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::DatePatterns);
1522 m_xDatePatternsED->set_sensitive(!bReadonly);
1523 m_xDatePatternsFT->set_sensitive(!bReadonly);
1524 m_xDatePatternsED->save_value();
1525
1526 //western/CJK/CLK language
1527 LanguageType eCurLang = LANGUAGE_NONE;
1528 LanguageType eCurLangCJK = LANGUAGE_NONE;
1529 LanguageType eCurLangCTL = LANGUAGE_NONE;
1530 SfxObjectShell* pCurrentDocShell = SfxObjectShell::Current();
1531 //collect the configuration values first
1532 m_xCurrentDocCB->set_sensitive(false);
1533
1534 Any aWestLang;
1535 Any aCJKLang;
1536 Any aCTLLang;
1537 try
1538 {
1539 aWestLang = pLangConfig->aLinguConfig.GetProperty(u"DefaultLocale");
1540 Locale aLocale;
1541 aWestLang >>= aLocale;
1542
1543 eCurLang = LanguageTag::convertToLanguageType( aLocale, false);
1544
1545 aCJKLang = pLangConfig->aLinguConfig.GetProperty(u"DefaultLocale_CJK");
1546 aLocale = Locale();
1547 aCJKLang >>= aLocale;
1548 eCurLangCJK = LanguageTag::convertToLanguageType( aLocale, false);
1549
1550 aCTLLang = pLangConfig->aLinguConfig.GetProperty(u"DefaultLocale_CTL");
1551 aLocale = Locale();
1552 aCTLLang >>= aLocale;
1553 eCurLangCTL = LanguageTag::convertToLanguageType( aLocale, false);
1554 }
1555 catch (const Exception&)
1556 {
1557 }
1558 //overwrite them by the values provided by the DocShell
1559 if(pCurrentDocShell)
1560 {
1561 m_xCurrentDocCB->set_sensitive(true);
1563 if( const SvxLanguageItem* pLangItem = rSet->GetItemIfSet(SID_ATTR_LANGUAGE, false))
1564 {
1565 LanguageType eTempCurLang = pLangItem->GetValue();
1566 if (MsLangId::resolveSystemLanguageByScriptType(eCurLang, css::i18n::ScriptType::LATIN) != eTempCurLang)
1567 eCurLang = eTempCurLang;
1568 }
1569
1570 if( const SvxLanguageItem* pLang = rSet->GetItemIfSet(SID_ATTR_CHAR_CJK_LANGUAGE, false))
1571 {
1572 LanguageType eTempCurLang = pLang->GetValue();
1573 if (MsLangId::resolveSystemLanguageByScriptType(eCurLangCJK, css::i18n::ScriptType::ASIAN) != eTempCurLang)
1574 eCurLangCJK = eTempCurLang;
1575 }
1576
1577 if( const SvxLanguageItem* pLang = rSet->GetItemIfSet(SID_ATTR_CHAR_CTL_LANGUAGE, false))
1578 {
1579 LanguageType eTempCurLang = pLang->GetValue();
1580 if (MsLangId::resolveSystemLanguageByScriptType(eCurLangCTL, css::i18n::ScriptType::COMPLEX) != eTempCurLang)
1581 eCurLangCTL = eTempCurLang;
1582 }
1583 }
1584 if(LANGUAGE_NONE == eCurLang || LANGUAGE_DONTKNOW == eCurLang)
1585 m_xWesternLanguageLB->set_active_id(LANGUAGE_NONE);
1586 else
1587 m_xWesternLanguageLB->set_active_id(eCurLang);
1588
1589 if(LANGUAGE_NONE == eCurLangCJK || LANGUAGE_DONTKNOW == eCurLangCJK)
1590 m_xAsianLanguageLB->set_active_id(LANGUAGE_NONE);
1591 else
1592 m_xAsianLanguageLB->set_active_id(eCurLangCJK);
1593
1594 if(LANGUAGE_NONE == eCurLangCTL || LANGUAGE_DONTKNOW == eCurLangCTL)
1595 m_xComplexLanguageLB->set_active_id(LANGUAGE_NONE);
1596 else
1597 m_xComplexLanguageLB->set_active_id(eCurLangCTL);
1598
1599 m_xWesternLanguageLB->save_active_id();
1600 m_xAsianLanguageLB->save_active_id();
1601 m_xComplexLanguageLB->save_active_id();
1602 m_xIgnoreLanguageChangeCB->save_state();
1603 m_xCurrentDocCB->save_state();
1604
1605 bool bEnable = !pLangConfig->aLinguConfig.IsReadOnly( u"DefaultLocale" );
1606 m_xWesternLanguageFT->set_sensitive( bEnable );
1607 m_xWesternLanguageLB->set_sensitive( bEnable );
1608
1609 // check the box "For the current document only"
1610 // set the focus to the Western Language box
1611 const SfxBoolItem* pLang = rSet->GetItemIfSet(SID_SET_DOCUMENT_LANGUAGE, false );
1612 if ( pLang && pLang->GetValue() )
1613 {
1614 m_xWesternLanguageLB->grab_focus();
1615 m_xCurrentDocCB->set_sensitive(true);
1616 m_xCurrentDocCB->set_active(true);
1617 }
1618}
1619
1621{
1622 bool bCheck = rBox.get_active();
1623 if ( m_xAsianSupportCB.get() == &rBox )
1624 {
1625 bool bReadonly = pLangConfig->aLinguConfig.IsReadOnly(u"DefaultLocale_CJK");
1626 bCheck = ( bCheck && !bReadonly );
1627 m_xAsianLanguageLB->set_sensitive( bCheck );
1628 if (rBox.get_sensitive())
1629 m_bOldAsian = bCheck;
1630 }
1631 else if ( m_xCTLSupportCB.get() == &rBox )
1632 {
1633 bool bReadonly = pLangConfig->aLinguConfig.IsReadOnly(u"DefaultLocale_CTL");
1634 bCheck = ( bCheck && !bReadonly );
1635 m_xComplexLanguageLB->set_sensitive( bCheck );
1636 if (rBox.get_sensitive())
1637 m_bOldCtl = bCheck;
1638 }
1639 else
1640 SAL_WARN( "cui.options", "OfaLanguagesTabPage::SupportHdl(): wrong rBox" );
1641}
1642
1643namespace
1644{
1645 void lcl_checkLanguageCheckBox(weld::CheckButton& _rCB, bool _bNewValue, bool _bOldValue)
1646 {
1647 if ( _bNewValue )
1648 _rCB.set_active(true);
1649 else
1650 _rCB.set_active( _bOldValue );
1651// #i15082# do not call save_state() in running dialog...
1652// _rCB.save_state();
1653 _rCB.set_sensitive( !_bNewValue );
1654 }
1655}
1656
1658{
1659 LanguageType eLang = m_xLocaleSettingLB->get_active_id();
1661 // first check if CTL must be enabled
1662 // #103299# - if CTL font setting is not readonly
1663 if(!pLangConfig->aCTLLanguageOptions.IsReadOnly(SvtCTLOptions::E_CTLFONT))
1664 {
1665 bool bIsCTLFixed = bool(nType & SvtScriptType::COMPLEX);
1666 lcl_checkLanguageCheckBox(*m_xCTLSupportCB, bIsCTLFixed, m_bOldCtl);
1667 SupportHdl(*m_xCTLSupportCB);
1668 }
1669 // second check if CJK must be enabled
1670 // #103299# - if CJK support is not readonly
1672 {
1673 bool bIsCJKFixed = bool(nType & SvtScriptType::ASIAN);
1674 lcl_checkLanguageCheckBox(*m_xAsianSupportCB, bIsCJKFixed, m_bOldAsian);
1675 SupportHdl(*m_xAsianSupportCB);
1676 }
1677
1678 const NfCurrencyEntry& rCurr = SvNumberFormatter::GetCurrencyEntry(
1680 const OUString aDefaultID = "default";
1681 // Update the "Default ..." currency.
1682 m_xCurrencyLB->remove_id(aDefaultID);
1683 OUString aDefaultCurr = m_sSystemDefaultString + " - " + rCurr.GetBankSymbol();
1684 m_xCurrencyLB->insert(0, aDefaultCurr, &aDefaultID, nullptr, nullptr);
1685 assert(m_xCurrencyLB->find_id(aDefaultID) != -1);
1686 m_xCurrencyLB->set_active_text(aDefaultCurr);
1687
1688 // obtain corresponding locale data
1689 LocaleDataWrapper aLocaleWrapper(( LanguageTag(eLang) ));
1690
1691 // update the decimal separator key of the related CheckBox
1692 OUString sTempLabel(m_sDecimalSeparatorLabel);
1693 sTempLabel = sTempLabel.replaceFirst("%1", aLocaleWrapper.getNumDecimalSep() );
1694 m_xDecimalSeparatorCB->set_label(sTempLabel);
1695
1696 // update the date acceptance patterns
1697 OUString aDatePatternsString = lcl_getDatePatternsConfigString( aLocaleWrapper);
1698 m_bDatePatternsValid = true;
1699 m_xDatePatternsED->set_text( aDatePatternsString);
1700 m_xDatePatternsED->set_message_type(weld::EntryMessageType::Normal);
1701}
1702
1703IMPL_LINK( OfaLanguagesTabPage, DatePatternsHdl, weld::Entry&, rEd, void )
1704{
1705 OUString aPatterns(rEd.get_text());
1706 bool bModified = false;
1707 const bool bValid = validateDatePatterns( bModified, aPatterns);
1708 if (bModified)
1709 {
1710 // gtk3 keeps the cursor position on equal length set_text() but at
1711 // least the 'gen' backend does not and resets to 0.
1712 const int nCursorPos = rEd.get_position();
1713 rEd.set_text(aPatterns);
1714 rEd.set_position(nCursorPos);
1715 }
1716 if (bValid)
1717 rEd.set_message_type(weld::EntryMessageType::Normal);
1718 else
1719 rEd.set_message_type(weld::EntryMessageType::Error);
1720 m_bDatePatternsValid = bValid;
1721}
1722
1723bool OfaLanguagesTabPage::validateDatePatterns( bool& rbModified, OUString& rPatterns )
1724{
1725 bool bValid = true;
1726 if (!rPatterns.isEmpty())
1727 {
1728 OUStringBuffer aBuf( rPatterns);
1729 sal_Int32 nChar = 0;
1730 for (sal_Int32 nIndex=0; nIndex >= 0 && bValid; ++nChar)
1731 {
1732 const OUString aPat( rPatterns.getToken( 0, ';', nIndex));
1733 if (aPat.isEmpty() && nIndex < 0)
1734 {
1735 // Indicating failure when about to append a pattern is too
1736 // confusing. Empty patterns are ignored anyway when sequencing
1737 // to SvtSysLocale.
1738 continue; // for
1739 }
1740 else if (aPat.getLength() < 2)
1741 bValid = false;
1742 else
1743 {
1744 bool bY, bM, bD;
1745 bY = bM = bD = false;
1746 bool bSep = true;
1747 if (aPat.getLength() == 3)
1748 {
1749 // Disallow a pattern that would match a numeric input with
1750 // decimal separator, like M.D
1751 const LanguageType eLang = m_xLocaleSettingLB->get_active_id();
1752 const LocaleDataWrapper aLocaleWrapper(( LanguageTag(eLang)));
1753 if ( aPat[1] == aLocaleWrapper.getNumDecimalSep().toChar()
1754 || aPat[1] == aLocaleWrapper.getNumDecimalSepAlt().toChar())
1755 {
1756 bValid = false;
1757 }
1758 }
1759 for (sal_Int32 i = 0; i < aPat.getLength() && bValid; /*nop*/)
1760 {
1761 const sal_Int32 j = i;
1762 const sal_uInt32 c = aPat.iterateCodePoints( &i);
1763 // Only one Y,M,D per pattern, separated by any character(s).
1764 switch (c)
1765 {
1766 case 'y':
1767 case 'Y':
1768 if (bY || !bSep)
1769 bValid = false;
1770 else if (c == 'y')
1771 {
1772 aBuf[nChar] = 'Y';
1773 rbModified = true;
1774 }
1775 bY = true;
1776 bSep = false;
1777 break;
1778 case 'm':
1779 case 'M':
1780 if (bM || !bSep)
1781 bValid = false;
1782 else if (c == 'm')
1783 {
1784 aBuf[nChar] = 'M';
1785 rbModified = true;
1786 }
1787 bM = true;
1788 bSep = false;
1789 break;
1790 case 'd':
1791 case 'D':
1792 if (bD || !bSep)
1793 bValid = false;
1794 else if (c == 'd')
1795 {
1796 aBuf[nChar] = 'D';
1797 rbModified = true;
1798 }
1799 bD = true;
1800 bSep = false;
1801 break;
1802 default:
1803 // A pattern must not start with a separator (but
1804 // may end with).
1805 if (!(bY || bM || bD))
1806 bValid = false;
1807 bSep = true;
1808 }
1809 nChar += i-j;
1810 }
1811 // At least one of Y,M,D
1812 bValid &= (bY || bM || bD);
1813 }
1814 }
1815 if (rbModified)
1816 rPatterns = aBuf.makeStringAndClear();
1817 }
1818 return bValid;
1819}
1820
1821/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SnapType
double d
const StyleSettings & GetStyleSettings() const
void SetStyleSettings(const StyleSettings &rSet)
static void MergeSystemSettings(AllSettings &rSettings)
static OUString GetToolkitName()
static bool hasNativeFileSelection()
static vcl::Window * GetNextTopLevelWindow(vcl::Window const *pWindow)
static const AllSettings & GetSettings()
static void SetSettings(const AllSettings &rSettings)
static vcl::Window * GetFirstTopLevelWindow()
void EnabledHardwareAcceleration(bool _bEnabled) const
Definition: optgdlg.cxx:494
bool mbHWAccelAvailable
Definition: optgdlg.cxx:370
bool IsHardwareAccelerationRO() const
Definition: optgdlg.cxx:483
bool IsHardwareAccelerationAvailable() const
Definition: optgdlg.cxx:429
std::vector< std::pair< OUString, Sequence< OUString > > > ServiceVector
Definition: optgdlg.cxx:366
Reference< XNameAccess > mxForceFlagNameAccess
Definition: optgdlg.cxx:368
ServiceVector maAvailableImplementations
Definition: optgdlg.cxx:369
bool mbHWAccelChecked
Definition: optgdlg.cxx:371
bool IsHardwareAccelerationEnabled() const
Definition: optgdlg.cxx:471
sal_uInt16 GetValue() const
virtual short run() override
LanguageType getLanguageType(bool bResolveSystem=true) const
bool isSystemLocale() const
static css::lang::Locale convertToLocale(LanguageType nLangID, bool bResolveSystem=true)
LanguageTag & makeFallback()
static OUString convertToBcp47(LanguageType nLangID)
static LanguageType convertToLanguageType(const css::lang::Locale &rLocale, bool bResolveSystem=true)
static LanguageType convertToLanguageTypeWithFallback(const OUString &rBcp47)
static css::uno::Reference< css::linguistic2::XLinguProperties > GetLinguPropertySet()
const OUString & getNumDecimalSepAlt() const
const css::uno::Sequence< OUString > & getDateAcceptancePatterns() const
const OUString & getNumDecimalSep() const
static bool needsSequenceChecking(LanguageType nLang)
static LanguageType resolveSystemLanguageByScriptType(LanguageType nLang, sal_Int16 nType)
static LanguageType getConfiguredSystemLanguage()
size_t size() const
std::unique_ptr< weld::CheckButton > m_xCurrentDocCB
Definition: optgdlg.hxx:161
std::unique_ptr< weld::ComboBox > m_xUserInterfaceLB
Definition: optgdlg.hxx:148
std::unique_ptr< weld::CheckButton > m_xDecimalSeparatorCB
Definition: optgdlg.hxx:151
OUString m_sSystemDefaultString
Definition: optgdlg.hxx:143
std::unique_ptr< weld::Label > m_xLocaleSettingFT
Definition: optgdlg.hxx:149
std::unique_ptr< SvxLanguageBox > m_xLocaleSettingLB
Definition: optgdlg.hxx:150
OUString m_sDecimalSeparatorLabel
Definition: optgdlg.hxx:144
std::unique_ptr< SvxLanguageBox > m_xAsianLanguageLB
Definition: optgdlg.hxx:159
std::unique_ptr< weld::CheckButton > m_xCTLSupportCB
Definition: optgdlg.hxx:163
std::unique_ptr< weld::CheckButton > m_xAsianSupportCB
Definition: optgdlg.hxx:162
std::unique_ptr< weld::Label > m_xDatePatternsFT
Definition: optgdlg.hxx:154
std::unique_ptr< weld::Label > m_xWesternLanguageFT
Definition: optgdlg.hxx:158
std::unique_ptr< weld::Entry > m_xDatePatternsED
Definition: optgdlg.hxx:155
OUString m_sUserLocaleValue
Definition: optgdlg.hxx:142
std::unique_ptr< weld::CheckButton > m_xIgnoreLanguageChangeCB
Definition: optgdlg.hxx:164
bool validateDatePatterns(bool &rbModified, OUString &rPatterns)
Definition: optgdlg.cxx:1723
std::unique_ptr< LanguageConfig_Impl > pLangConfig
Definition: optgdlg.hxx:140
virtual ~OfaLanguagesTabPage() override
Definition: optgdlg.cxx:1199
std::unique_ptr< SvxLanguageBox > m_xComplexLanguageLB
Definition: optgdlg.hxx:160
std::unique_ptr< weld::Label > m_xCurrencyFT
Definition: optgdlg.hxx:152
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optgdlg.cxx:1203
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optgdlg.cxx:1226
std::unique_ptr< SvxLanguageBox > m_xWesternLanguageLB
Definition: optgdlg.hxx:157
OfaLanguagesTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optgdlg.cxx:1029
std::unique_ptr< weld::ComboBox > m_xCurrencyLB
Definition: optgdlg.hxx:153
virtual void Reset(const SfxItemSet *rSet) override
Definition: optgdlg.cxx:1464
std::unique_ptr< weld::Widget > m_xQuickStarterFrame
Definition: optgdlg.hxx:46
std::unique_ptr< weld::CheckButton > m_xFileDlgCB
Definition: optgdlg.hxx:40
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optgdlg.cxx:212
OUString m_aStrDateInfo
Definition: optgdlg.hxx:33
std::unique_ptr< weld::CheckButton > m_xExtHelpCB
Definition: optgdlg.hxx:35
std::unique_ptr< weld::CheckButton > m_xDocStatusCB
Definition: optgdlg.hxx:41
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: optgdlg.cxx:102
std::unique_ptr< weld::CheckButton > m_xQuickLaunchCB
Definition: optgdlg.hxx:48
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optgdlg.cxx:217
std::unique_ptr< weld::Widget > m_xYearFrame
Definition: optgdlg.hxx:42
std::unique_ptr< weld::Widget > m_xFileDlgFrame
Definition: optgdlg.hxx:38
std::unique_ptr< weld::CheckButton > m_xPopUpNoHelpCB
Definition: optgdlg.hxx:36
std::unique_ptr< weld::SpinButton > m_xYearValueField
Definition: optgdlg.hxx:43
std::unique_ptr< weld::Label > m_xHelpImproveLabel
Definition: optgdlg.hxx:47
virtual ~OfaMiscTabPage() override
Definition: optgdlg.cxx:208
std::unique_ptr< weld::CheckButton > m_xCrashReport
Definition: optgdlg.hxx:45
std::unique_ptr< weld::CheckButton > m_xShowTipOfTheDay
Definition: optgdlg.hxx:37
OfaMiscTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optgdlg.cxx:154
std::unique_ptr< weld::Widget > m_xFileDlgROImage
Definition: optgdlg.hxx:39
virtual void Reset(const SfxItemSet *rSet) override
Definition: optgdlg.cxx:282
std::unique_ptr< weld::Label > m_xToYearFT
Definition: optgdlg.hxx:44
std::unique_ptr< weld::CheckButton > m_xForceSkiaRaster
Definition: optgdlg.hxx:106
std::unique_ptr< weld::ComboBox > m_xSidebarIconSizeLB
Definition: optgdlg.hxx:88
sal_Int32 nStyleLB_InitialSelection
Definition: optgdlg.hxx:80
void UpdateHardwareAccelStatus()
Definition: optgdlg.cxx:968
std::unique_ptr< weld::MetricSpinButton > m_xAAPointLimit
Definition: optgdlg.hxx:94
std::unique_ptr< SvtTabAppearanceCfg > pAppearanceCfg
Definition: optgdlg.hxx:82
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optgdlg.cxx:662
std::unique_ptr< weld::ComboBox > m_xIconStyleLB
Definition: optgdlg.hxx:90
void HideSkiaWidgets()
Definition: optgdlg.cxx:616
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optgdlg.cxx:667
void UpdateSkiaStatus()
Definition: optgdlg.cxx:624
std::unique_ptr< weld::ComboBox > m_xNotebookbarIconSizeLB
Definition: optgdlg.hxx:89
std::unique_ptr< weld::Label > m_xSkiaStatusDisabled
Definition: optgdlg.hxx:109
std::unique_ptr< weld::Widget > m_xMenuIconBox
Definition: optgdlg.hxx:96
std::unique_ptr< weld::ComboBox > m_xMousePosLB
Definition: optgdlg.hxx:111
std::unique_ptr< weld::ComboBox > m_xMenuIconsLB
Definition: optgdlg.hxx:97
std::unique_ptr< weld::CheckButton > m_xUseAntiAliase
Definition: optgdlg.hxx:104
std::unique_ptr< weld::Label > m_xSkiaStatusEnabled
Definition: optgdlg.hxx:108
std::unique_ptr< weld::CheckButton > m_xFontShowCB
Definition: optgdlg.hxx:101
std::unique_ptr< weld::Button > m_xRunGPTests
Definition: optgdlg.hxx:114
std::unique_ptr< weld::ComboBox > m_xContextMenuShortcutsLB
Definition: optgdlg.hxx:99
sal_Int32 nNotebookbarSizeLB_InitialSelection
Definition: optgdlg.hxx:79
std::unique_ptr< CanvasSettings > pCanvasSettings
Definition: optgdlg.hxx:83
OfaViewTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optgdlg.cxx:520
std::unique_ptr< weld::CheckButton > m_xUseSkia
Definition: optgdlg.hxx:105
std::unique_ptr< weld::ComboBox > m_xIconSizeLB
Definition: optgdlg.hxx:87
virtual void Reset(const SfxItemSet *rSet) override
Definition: optgdlg.cxx:867
std::unique_ptr< weld::CheckButton > m_xUseHardwareAccell
Definition: optgdlg.hxx:103
std::unique_ptr< weld::Button > m_xMoreIcons
Definition: optgdlg.hxx:113
std::unique_ptr< weld::CheckButton > m_xFontAntiAliasing
Definition: optgdlg.hxx:92
sal_Int32 nSidebarSizeLB_InitialSelection
Definition: optgdlg.hxx:78
std::unique_ptr< weld::ComboBox > m_xMouseMiddleLB
Definition: optgdlg.hxx:112
std::vector< vcl::IconThemeInfo > mInstalledIconThemes
Definition: optgdlg.hxx:85
sal_Int32 nSizeLB_InitialSelection
Definition: optgdlg.hxx:77
virtual ~OfaViewTabPage() override
Definition: optgdlg.cxx:586
void SetState(const SfxItemSet &rSet)
void InvalidateAll(bool bWithMsg)
bool GetValue() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
SfxOkDialogController * GetDialogController() const
void SetExchangeSupport()
const SfxPoolItem * GetOldItem(const SfxItemSet &rSet, sal_uInt16 nSlot, bool bDeep=true)
weld::Window * GetFrameWeld() const
static SAL_WARN_UNUSED_RESULT SfxViewFrame * Current()
SfxBindings & GetBindings()
static SAL_WARN_UNUSED_RESULT SfxViewFrame * GetNext(const SfxViewFrame &rPrev, const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
static SAL_WARN_UNUSED_RESULT SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
std::vector< vcl::IconThemeInfo > const & GetInstalledIconThemes() const
OUString GetAutomaticallyChosenIconTheme() const
static const NfCurrencyTable & GetTheCurrencyTable()
static const NfCurrencyEntry & GetCurrencyEntry(LanguageType)
void SetDefault(SvtCompatibilityEntry::Index rIdx, bool rValue)
static OUString GetLanguageString(const LanguageType eType)
bool IconThemeWasSetAutomatically() const
sal_Int16 GetSymbolsSize() const
void SetIconTheme(const OUString &)
OUString GetIconTheme() const
void SetSymbolsSize(sal_Int16 eSet)
void SetIgnoreKashida_CTL(bool bVal)
void SetIgnoreDiacritics_CTL(bool bVal)
void GetCurrencyAbbrevAndLanguage(OUString &rAbbrev, LanguageType &eLang) const
static OUString CreateCurrencyConfigString(const OUString &rAbbrev, LanguageType eLang)
static std::shared_ptr< ConfigurationChanges > create()
static const vcl::IconThemeInfo & FindIconThemeById(const std::vector< vcl::IconThemeInfo > &themes, const OUString &themeId)
const OUString & GetDisplayName() const
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
virtual void set_active(bool active)=0
virtual void set_sensitive(bool sensitive)=0
int nCount
#define TOOLS_WARN_EXCEPTION(area, stream)
virtual tools::Long GetValue() const override
float v
float u
Reference< XSingleServiceFactory > xFactory
FieldUnit
TriState
TRISTATE_FALSE
TRISTATE_INDET
TRISTATE_TRUE
SFX_SYMBOLS_SIZE_SMALL
SFX_SYMBOLS_SIZE_32
SFX_SYMBOLS_SIZE_LARGE
SFX_SYMBOLS_SIZE_AUTO
sal_Int32 nIndex
#define LANGUAGE_SYSTEM
#define LANGUAGE_NONE
#define LANGUAGE_USER_SYSTEM_CONFIG
#define LANGUAGE_DONTKNOW
OUString SVT_DLLPUBLIC getInstalledLocaleForSystemUILanguage(css::uno::Sequence< OUString > const &installed, bool bRequestInstallIfMissing, const OUString &rPreferredLocale=OUString())
SVT_DLLPUBLIC OUString ApplyLreOrRleEmbedding(const OUString &rText)
SvtScriptType
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
if(aStr !=aBuf) UpdateName_Impl(m_xFollowLb.get()
aStr
aBuf
VCL_DLLPUBLIC bool isVCLSkiaEnabled()
bool IsReadOnly(EOption eOption)
void SetAll(bool bSet)
bool IsAnyEnabled()
SvtScriptType GetScriptTypeOfLanguage(LanguageType nLang)
void SetAntiAliasing(bool bOn, bool bTemporary)
@ Exception
css::uno::Sequence< css::uno::Any > InitAnyPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
bool dispatchCommand(const OUString &rCommand, const uno::Reference< css::frame::XFrame > &rFrame, const css::uno::Sequence< css::beans::PropertyValue > &rArguments, const uno::Reference< css::frame::XDispatchResultListener > &rListener)
Reference< XMultiServiceFactory > getProcessServiceFactory()
Reference< XComponentContext > getProcessComponentContext()
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
int i
const LocaleDataWrapper & GetLocaleDataWrapper(LanguageType nLang)
RESTART_REASON_LANGUAGE_CHANGE
RESTART_REASON_SKIA
SVT_DLLPUBLIC bool executeRestartDialog(css::uno::Reference< css::uno::XComponentContext > const &context, weld::Window *parent, RestartReason reason)
VCL_DLLPUBLIC void LaunchRegistrationUI()
OUString toId(const void *pValue)
Reference< XNameAccess > m_xContainer
IMPL_LINK_NOARG(OfaMiscTabPage, TwoFigureHdl, weld::SpinButton &, void)
Definition: optgdlg.cxx:333
constexpr OUStringLiteral sAccessUpdSrvc
Definition: optgdlg.cxx:997
constexpr OUStringLiteral sUserLocalePath
Definition: optgdlg.cxx:999
IMPL_LINK(OfaLanguagesTabPage, SupportHdl, weld::Toggleable &, rBox, void)
Definition: optgdlg.cxx:1620
static OUString lcl_getDatePatternsConfigString(const LocaleDataWrapper &rLocaleWrapper)
Definition: optgdlg.cxx:1003
static bool DisplayNameCompareLessThan(const vcl::IconThemeInfo &rInfo1, const vcl::IconThemeInfo &rInfo2)
Definition: optgdlg.cxx:515
static void lcl_Update(std::unique_ptr< SfxVoidItem > pInvalidItems[], std::unique_ptr< SfxBoolItem > pBoolItems[], sal_uInt16 nCount)
Definition: optgdlg.cxx:1208
constexpr OUStringLiteral sInstalledLocalesPath
Definition: optgdlg.cxx:998
constexpr OUStringLiteral sUserLocaleKey
Definition: optgdlg.cxx:1000
static Sequence< OUString > seqInstalledLanguages
Definition: optgdlg.cxx:1001
IMPL_STATIC_LINK_NOARG(OfaViewTabPage, OnMoreIconsClick, weld::Button &, void)
Definition: optgdlg.cxx:596
static bool bLanguageCurrentDoc_Impl
Definition: optgdlg.cxx:993
constexpr OUStringLiteral sAccessSrvc
Definition: optgdlg.cxx:996
SfxItemState
QPRO_FUNC_TYPE nType
MouseMiddleButtonAction
static SfxItemSet & rSet
SvtCTLOptions aCTLLanguageOptions
Definition: optgdlg.cxx:988
SvtLinguConfig aLinguConfig
Definition: optgdlg.cxx:990
SvtSysLocaleOptions aSysLocaleOptions
Definition: optgdlg.cxx:989
VCL_DLLPUBLIC Application * GetpApp()
DeactivateRC
OUString sId
ToolBoxButtonSize
RET_OK