summaryrefslogtreecommitdiff
path: root/embeddedobj/source/commonembedding/miscobj.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'embeddedobj/source/commonembedding/miscobj.cxx')
-rw-r--r--embeddedobj/source/commonembedding/miscobj.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx
index 8a1dd801f6ea..3f4414b8118a 100644
--- a/embeddedobj/source/commonembedding/miscobj.cxx
+++ b/embeddedobj/source/commonembedding/miscobj.cxx
@@ -33,6 +33,7 @@
#include <vcl/svapp.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <comphelper/sequenceashashmap.hxx>
#include "persistence.hxx"
@@ -347,6 +348,11 @@ uno::Any SAL_CALL OCommonEmbeddedObject::queryInterface( const uno::Type& rType
void* p = static_cast<lang::XServiceInfo*>(this);
return uno::Any(&p, rType);
}
+ else if (rType == cppu::UnoType<lang::XInitialization>::get())
+ {
+ void* p = static_cast<lang::XInitialization*>(this);
+ return uno::Any(&p, rType);
+ }
else if (rType == cppu::UnoType<lang::XTypeProvider>::get())
{
void* p = static_cast<lang::XTypeProvider*>(this);
@@ -619,6 +625,7 @@ uno::Sequence<uno::Type> SAL_CALL OCommonEmbeddedObject::getTypes()
cppu::UnoType<container::XChild>::get(),
cppu::UnoType<chart2::XDefaultSizeTransmitter>::get(),
cppu::UnoType<lang::XServiceInfo>::get(),
+ cppu::UnoType<lang::XInitialization>::get(),
cppu::UnoType<lang::XTypeProvider>::get(),
};
return aTypes;
@@ -629,4 +636,19 @@ uno::Sequence<sal_Int8> SAL_CALL OCommonEmbeddedObject::getImplementationId()
return uno::Sequence<sal_Int8>();
}
+void SAL_CALL OCommonEmbeddedObject::initialize(const uno::Sequence<uno::Any>& rArguments)
+{
+ if (!rArguments.hasElements())
+ {
+ return;
+ }
+
+ comphelper::SequenceAsHashMap aMap(rArguments[0]);
+ auto it = aMap.find("ReadOnly");
+ if (it != aMap.end())
+ {
+ it->second >>= m_bReadOnly;
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */