25#include <com/sun/star/uno/Any.hxx>
26#include <com/sun/star/uno/Sequence.hxx>
27#include <com/sun/star/beans/PropertyValue.hpp>
28#include <com/sun/star/lang/Locale.hpp>
41#define PATHDELIMITER "/"
42#define SETNODE_ALLFILEFORMATS "AllFileFormats"
72 static const char* sPropertyName[] =
81 "UseOurTabStopFormat",
85 "UseObjectPositioning",
87 "ConsiderWrappingStyle",
90 "MsWordCompTrailingBlanks",
91 "SubtractFlysAnchoredAtFlys",
92 "EmptyDbFieldHidesPara",
93 "UseVariableWidthNBSP",
101 return OUString::createFromAscii( sPropertyName[
static_cast<int>(rIdx) ] );
161 Sequence< Any > lValues = GetProperties( lNames );
166 DBG_ASSERT( !( lNames.getLength()!=lValues.getLength() ),
"SvtCompatibilityOptions_Impl::SvtCompatibilityOptions_Impl()\nI miss some values of configuration keys!\n" );
170 bool bDefaultFound =
false;
171 sal_Int32 nDestStep = 0;
172 for (
const auto& rNode : std::as_const(lNodes) )
190 if ( aLocale.Language ==
"zh" || aLocale.Language ==
"ja" || aLocale.Language ==
"ko" )
194 bDefaultFound =
true;
201 assert( !IsModified() );
240 SAL_WARN(
"unotools.config",
"SvtCompatibilityOptions_Impl::Notify() Not implemented yet! I don't know how I can handle a dynamical list of unknown properties ..." );
250 auto lPropertyValuesRange = asNonConstRange(lPropertyValues);
252 for ( sal_uInt32 nItem = 0; nItem < nNewCount; ++nItem )
274 auto lPropertiesRange = asNonConstRange(lProperties);
276 sal_Int32 nDestStep = 0;
278 for (
const auto& rItem : std::as_const(rItems) )
294 std::weak_ptr<SvtCompatibilityOptions_Impl> theOptions;
305 m_pImpl = std::make_shared<SvtCompatibilityOptions_Impl>();
333 m_pImpl->SetDefault( rIdx, rValue );
339 return m_pImpl->GetDefault( rIdx );
static void holdConfigItem(EItem eItem)
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
@ AddTableLineSpacing
special entry: optcomp.cxx converts the other values to integers but not this one because it doesn't ...
@ SubtractFlysAnchoredAtFlys
static constexpr OUStringLiteral DEFAULT_ENTRY_NAME
static OUString getName(const Index rIdx)
css::uno::Any getValue(const Index rIdx) const
static size_t getElementCount()
void setValue(const Index rIdx, css::uno::Any const &rValue)
const std::vector< SvtCompatibilityEntry > & GetOptions() const
Sequence< OUString > impl_GetPropertyNames(Sequence< OUString > &rItems)
virtual void Notify(const Sequence< OUString > &lPropertyNames) override
void SetDefault(SvtCompatibilityEntry::Index rIdx, bool rValue)
std::vector< SvtCompatibilityEntry > m_aOptions
virtual ~SvtCompatibilityOptions_Impl() override
virtual void ImplCommit() override
SvtCompatibilityOptions_Impl()
SvtCompatibilityEntry m_aDefOptions
bool GetDefault(SvtCompatibilityEntry::Index rIdx) const
void AppendItem(const SvtCompatibilityEntry &aItem)
virtual ~SvtCompatibilityOptions() override
bool GetDefault(SvtCompatibilityEntry::Index rIdx) const
std::shared_ptr< SvtCompatibilityOptions_Impl > m_pImpl
SvtCompatibilityOptions()
void SetDefault(SvtCompatibilityEntry::Index rIdx, bool rValue)
std::vector< SvtCompatibilityEntry > GetList() const
void AppendItem(const SvtCompatibilityEntry &aItem)
static UNOTOOLS_DLLPRIVATE osl::Mutex & GetOwnStaticMutex()
SvtSysLocale provides a refcounted single instance of an application wide LocaleDataWrapper and <type...
const LanguageTag & GetLanguageTag() const
constexpr OUStringLiteral ROOTNODE_OPTIONS
#define SETNODE_ALLFILEFORMATS
#define DBG_ASSERT(sCon, aError)
#define SAL_WARN(area, stream)