summaryrefslogtreecommitdiffstats
path: root/include/comphelper/SetFlagContextHelper.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/comphelper/SetFlagContextHelper.hxx')
-rw-r--r--include/comphelper/SetFlagContextHelper.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/comphelper/SetFlagContextHelper.hxx b/include/comphelper/SetFlagContextHelper.hxx
index d209e398aeab..1f1e2743cea9 100644
--- a/include/comphelper/SetFlagContextHelper.hxx
+++ b/include/comphelper/SetFlagContextHelper.hxx
@@ -56,6 +56,14 @@ inline css::uno::Reference<css::uno::XCurrentContext> NoEnableJavaInteractionCon
return NewFlagContext("DontEnableJava");
}
+inline bool IsContextFlagActive(const OUString& sName)
+{
+ bool bFlag = false;
+ if (const auto xContext = css::uno::getCurrentContext())
+ xContext->getValueByName(sName) >>= bFlag;
+ return bFlag;
+}
+
} // namespace comphelper
#endif // INCLUDED_COMPHELPER_SETFLAGCONTEXTHELPER_HXX