summaryrefslogtreecommitdiff
path: root/embeddedobj/source/commonembedding/miscobj.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'embeddedobj/source/commonembedding/miscobj.cxx')
-rwxr-xr-x[-rw-r--r--]embeddedobj/source/commonembedding/miscobj.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx
index 1e9282a4b2e6..2ca46ed1227e 100644..100755
--- a/embeddedobj/source/commonembedding/miscobj.cxx
+++ b/embeddedobj/source/commonembedding/miscobj.cxx
@@ -40,6 +40,7 @@
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/interfacecontainer.h>
+#include <comphelper/mimeconfighelper.hxx>
#include "closepreventer.hxx"
#include "intercept.hxx"
@@ -241,6 +242,14 @@ void OCommonEmbeddedObject::LinkInit_Impl(
OSL_ENSURE( m_aLinkURL.getLength() && m_aLinkFilterName.getLength(), "Filter and URL must be provided!\n" );
+ m_bReadOnly = sal_True;
+ if ( m_aLinkFilterName.getLength() )
+ {
+ ::comphelper::MimeConfigurationHelper aHelper( m_xFactory );
+ ::rtl::OUString aExportFilterName = aHelper.GetExportFilterFromImportFilter( m_aLinkFilterName );
+ m_bReadOnly = !( aExportFilterName.equals( m_aLinkFilterName ) );
+ }
+
m_aDocMediaDescriptor = GetValuableArgs_Impl( aMediaDescr, sal_False );
uno::Reference< frame::XDispatchProviderInterceptor > xDispatchInterceptor;
@@ -334,7 +343,7 @@ void OCommonEmbeddedObject::PostEvent_Impl( const ::rtl::OUString& aEventName,
aEvent.Source = uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) );
// For now all the events are sent as object events
// aEvent.Source = ( xSource.is() ? xSource
- // : uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ) );
+ // : uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ) );
::cppu::OInterfaceIteratorHelper aIt( *pIC );
while( aIt.hasMoreElements() )
{
@@ -468,9 +477,8 @@ uno::Sequence< sal_Int8 > SAL_CALL OCommonEmbeddedObject::getImplementationId()
uno::Sequence< sal_Int8 > SAL_CALL OCommonEmbeddedObject::getClassID()
throw ( uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
- throw lang::DisposedException(); // TODO
+ throw lang::DisposedException();
return m_aClassID;
}
@@ -479,9 +487,8 @@ uno::Sequence< sal_Int8 > SAL_CALL OCommonEmbeddedObject::getClassID()
::rtl::OUString SAL_CALL OCommonEmbeddedObject::getClassName()
throw ( uno::RuntimeException )
{
- ::osl::MutexGuard aGuard( m_aMutex );
if ( m_bDisposed )
- throw lang::DisposedException(); // TODO
+ throw lang::DisposedException();
return m_aClassName;
}