summaryrefslogtreecommitdiff
path: root/sfx2/source/doc
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r--sfx2/source/doc/docfile.cxx11
-rw-r--r--sfx2/source/doc/objmisc.cxx5
2 files changed, 15 insertions, 1 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index cfbcb87f75..c74072b901 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2765,6 +2765,17 @@ void SfxMedium::Init_Impl()
DBG_ERROR( "Unexpected Output stream parameter!\n" );
}
+ if ( aLogicName.Len() )
+ {
+ // if the logic name is set it should be set in MediaDescriptor as well
+ SFX_ITEMSET_ARG( pSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE );
+ if ( !pFileNameItem )
+ {
+ // let the ItemSet be created if necessary
+ GetItemSet()->Put( SfxStringItem( SID_FILE_NAME, INetURLObject( aLogicName ).GetMainURL( INetURLObject::NO_DECODE ) ) );
+ }
+ }
+
SetIsRemote_Impl();
}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index c3ef886929..6d843892f4 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -61,6 +61,7 @@
#include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/document/XScriptInvocationContext.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
+#include <com/sun/star/embed/XEmbedPersist.hpp>
#include <com/sun/star/util/XModifiable.hpp>
#include <com/sun/star/container/XChild.hpp>
@@ -336,9 +337,11 @@ sal_Bool SfxObjectShell::IsModified()
if ( pImp->m_bIsModified )
return sal_True;
- if ( !pImp->m_xDocStorage.is() )
+ if ( !pImp->m_xDocStorage.is() || IsReadOnly() )
{
// if the document still has no storage and is not set to be modified explicitly it is not modified
+ // a readonly document is also not modified
+
return sal_False;
}