summaryrefslogtreecommitdiff
path: root/svtools/source/config/fontsubstconfig.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-06-27 11:59:30 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-06-27 11:59:30 +0200
commit11f623a32540d822d539b7f3978363892feb9fe4 (patch)
tree33138dc06ebcefea8c7df191ac8910826b7f8bf4 /svtools/source/config/fontsubstconfig.cxx
parent85ce665ee43b1f20df593fc36f935c5799418f54 (diff)
Clean up uses of Any::getValue() in svtools
Change-Id: Id11dc4724fed4e43981534ffac5ec5358f9387b2
Diffstat (limited to 'svtools/source/config/fontsubstconfig.cxx')
-rw-r--r--svtools/source/config/fontsubstconfig.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/svtools/source/config/fontsubstconfig.cxx b/svtools/source/config/fontsubstconfig.cxx
index 473c20ba08eb..6785a3ff8497 100644
--- a/svtools/source/config/fontsubstconfig.cxx
+++ b/svtools/source/config/fontsubstconfig.cxx
@@ -20,6 +20,7 @@
#include <svtools/fontsubstconfig.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/uno/Sequence.hxx>
+#include <o3tl/any.hxx>
#include <tools/debug.hxx>
#include <vcl/outdev.hxx>
@@ -55,7 +56,7 @@ SvtFontSubstConfig::SvtFontSubstConfig() :
Sequence<Any> aValues = GetProperties(aNames);
DBG_ASSERT(aValues.getConstArray()[0].hasValue(), "no value available");
if(aValues.getConstArray()[0].hasValue())
- bIsEnabled = *static_cast<sal_Bool const *>(aValues.getConstArray()[0].getValue());
+ bIsEnabled = *o3tl::doAccess<bool>(aValues.getConstArray()[0]);
OUString sPropPrefix(cFontPairs);
Sequence<OUString> aNodeNames = GetNodeNames(sPropPrefix, CONFIG_NAME_LOCAL_PATH);
@@ -81,8 +82,8 @@ SvtFontSubstConfig::SvtFontSubstConfig() :
SubstitutionStruct aInsert;
pNodeValues[nName++] >>= aInsert.sFont;
pNodeValues[nName++] >>= aInsert.sReplaceBy;
- aInsert.bReplaceAlways = *static_cast<sal_Bool const *>(pNodeValues[nName++].getValue());
- aInsert.bReplaceOnScreenOnly = *static_cast<sal_Bool const *>(pNodeValues[nName++].getValue());
+ aInsert.bReplaceAlways = *o3tl::doAccess<bool>(pNodeValues[nName++]);
+ aInsert.bReplaceOnScreenOnly = *o3tl::doAccess<bool>(pNodeValues[nName++]);
pImpl->aSubstArr.push_back(aInsert);
}
}