24#include <com/sun/star/uno/Any.hxx>
28#include <com/sun/star/beans/Property.hpp>
29#include <com/sun/star/beans/XPropertySet.hpp>
30#include <com/sun/star/beans/PropertyAttribute.hpp>
31#include <com/sun/star/container/XNameAccess.hpp>
32#include <com/sun/star/util/XChangesListener.hpp>
33#include <com/sun/star/util/XChangesNotifier.hpp>
34#include <com/sun/star/util/ChangesEvent.hpp>
53 "facsimiletelephonenumber",
79 virtual void SAL_CALL
changesOccurred (util::ChangesEvent
const& Event)
override;
81 virtual void SAL_CALL
disposing (lang::EventObject
const& Source)
override;
103 uno::Reference<container::XNameAccess>
m_xCfg;
106 template <
typename ValueType >
108 template <
typename ValueType >
114 if (rEvent.Changes.hasElements())
122 uno::Reference<util::XChangesNotifier> xChgNot(rSource.Source, uno::UNO_QUERY_THROW);
123 xChgNot->removeChangesListener(
this);
125 catch (uno::Exception&)
138 "org.openoffice.UserProfile/Data",
145 uno::Reference<util::XChangesNotifier> xChgNot(
m_xCfg, uno::UNO_QUERY);
150 catch (uno::RuntimeException&)
154 catch (uno::Exception
const&)
161template <
typename ValueType >
168 m_xData->getPropertyValue(OUString::createFromAscii(
vOptionNames[
nToken])) >>= sToken;
170 catch (uno::Exception
const&)
177template <
typename ValueType >
186 catch (uno::Exception
const&)
194 return GetValue_Impl<OUString>(
nToken );
199 SetValue_Impl<OUString>(
nToken, sToken );
204 return GetValue_Impl<bool>(
nToken );
209 SetValue_Impl<bool>(
nToken, bNewValue );
219 if (!sFullName.isEmpty())
222 if (!sFullName.isEmpty())
231 if (!sFullName.isEmpty())
238 if (!sFullName.isEmpty())
243 sFullName = sFullName.trim();
255 uno::Reference<beans::XPropertySet> xData(m_xCfg, uno::UNO_QUERY);
256 uno::Reference<beans::XPropertySetInfo> xInfo = xData->getPropertySetInfo();
257 beans::Property aProp = xInfo->getPropertyByName(OUString::createFromAscii(
vOptionNames[
nToken]));
258 return ((aProp.Attributes & beans::PropertyAttribute::READONLY) ==
259 beans::PropertyAttribute::READONLY);
264 static std::recursive_mutex gMutex;
277 xImpl = std::make_shared<Impl>();
282 xImpl->AddListener(
this);
289 xImpl->RemoveListener(
this);
343 return xImpl->GetFullName();
static void holdConfigItem(EItem eItem)
LanguageType getLanguageType(bool bResolveSystem=true) const
static bool isFamilyNameFirst(LanguageType nLang)
SvtSysLocale provides a refcounted single instance of an application wide LocaleDataWrapper and <type...
const LanguageTag & GetUILanguageTag() const
ChangeListener(Impl &rParent)
virtual void SAL_CALL disposing(lang::EventObject const &Source) override
virtual void SAL_CALL changesOccurred(util::ChangesEvent const &Event) override
bool IsTokenReadonly(UserOptToken nToken) const
uno::Reference< util::XChangesListener > m_xChangeListener
void SetBoolValue(UserOptToken nToken, bool bNewValue)
ValueType GetValue_Impl(UserOptToken nToken) const
void SetToken(UserOptToken nToken, OUString const &rNewToken)
uno::Reference< container::XNameAccess > m_xCfg
void SetValue_Impl(UserOptToken nToken, ValueType const &rNewValue)
bool GetBoolValue(UserOptToken nToken) const
OUString GetFullName() const
uno::Reference< beans::XPropertySet > m_xData
OUString GetToken(UserOptToken nToken) const
OUString GetFirstName() const
OUString GetSigningKey() const
OUString GetFullName() const
OUString GetTelephoneHome() const
OUString GetCountry() const
bool IsTokenReadonly(UserOptToken nToken) const
bool GetEncryptToSelf() const
OUString GetEncryptionKey() const
OUString GetToken(UserOptToken nToken) const
OUString GetEmail() const
void SetBoolValue(UserOptToken nToken, bool bNewValue)
OUString GetTitle() const
virtual ~SvtUserOptions() override
OUString GetCompany() const
static std::weak_ptr< Impl > xSharedImpl
std::shared_ptr< Impl > xImpl
OUString GetPosition() const
void SetToken(UserOptToken nToken, OUString const &rNewToken)
OUString GetTelephoneWork() const
OUString GetStreet() const
OUString GetState() const
OUString GetLastName() const
static css::uno::Reference< css::uno::XInterface > openConfig(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const OUString &sPackage, EConfigurationModes eMode)
static void flush(const css::uno::Reference< css::uno::XInterface > &xCFG)
void NotifyListeners(ConfigurationHints nHint)
#define DBG_UNHANDLED_EXCEPTION(...)
std::u16string_view rNewToken
Reference< XComponentContext > getProcessComponentContext()
std::basic_string_view< charT, traits > trim(std::basic_string_view< charT, traits > str)
static std::recursive_mutex & GetInitMutex()
static o3tl::enumarray< UserOptToken, char const * > vOptionNames