summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/sdi/sfx.sdi2
-rw-r--r--sfx2/source/doc/guisaveas.cxx3
-rw-r--r--sfx2/source/doc/objstor.cxx4
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx3
4 files changed, 10 insertions, 2 deletions
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 0ddf3653c3c0..74d780bd63bd 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3520,7 +3520,7 @@ SfxVoidItem SaveSimple SID_SAVESIMPLE
]
SfxStringItem Save SID_SAVEDOC
-(SfxStringItem VersionComment SID_DOCINFO_COMMENTS,SfxStringItem Author SID_DOCINFO_AUTHOR,SfxBoolItem DontTerminateEdit FN_PARAM_1)
+(SfxStringItem VersionComment SID_DOCINFO_COMMENTS,SfxStringItem Author SID_DOCINFO_AUTHOR,SfxBoolItem DontTerminateEdit FN_PARAM_1,SfxBoolItem NoFileSync SID_NO_FILE_SYNC)
[
AutoUpdate = FALSE,
FastCall = FALSE,
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 9faeef85804e..4240f62f16e2 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -699,6 +699,7 @@ sal_Int8 ModelData_Impl::CheckStateForSave()
const OUString aInteractionHandlerString("InteractionHandler");
const OUString aStatusIndicatorString("StatusIndicator");
const OUString aFailOnWarningString("FailOnWarning");
+ const OUString aNoFileSync("NoFileSync");
if ( GetMediaDescr().find( aVersionCommentString ) != GetMediaDescr().end() )
aAcceptedArgs[ aVersionCommentString ] = GetMediaDescr()[ aVersionCommentString ];
@@ -712,6 +713,8 @@ sal_Int8 ModelData_Impl::CheckStateForSave()
aAcceptedArgs[ aStatusIndicatorString ] = GetMediaDescr()[ aStatusIndicatorString ];
if ( GetMediaDescr().find( aFailOnWarningString ) != GetMediaDescr().end() )
aAcceptedArgs[ aFailOnWarningString ] = GetMediaDescr()[ aFailOnWarningString ];
+ if (GetMediaDescr().find(aNoFileSync) != GetMediaDescr().end())
+ aAcceptedArgs[aNoFileSync] = GetMediaDescr()[aNoFileSync];
// remove unacceptable entry if there is any
DBG_ASSERT( GetMediaDescr().size() == aAcceptedArgs.size(),
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 3bac7ae20b97..a9692634b662 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2481,6 +2481,10 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs )
if ( pxInteractionItem && ( pxInteractionItem->GetValue() >>= xInteract ) && xInteract.is() )
pMediumTmp->GetItemSet()->Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, makeAny( xInteract ) ) );
+ const SfxBoolItem* pNoFileSync = pArgs->GetItem<SfxBoolItem>(SID_NO_FILE_SYNC, false);
+ if (pNoFileSync && pNoFileSync->GetValue())
+ pMediumTmp->DisableFileSync(true);
+
bool bSaved = false;
if( !GetError() && SaveTo_Impl( *pMediumTmp, pArgs ) )
{
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index a383427ae0c5..69ba0a93c0a0 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1476,7 +1476,8 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue >
&& aSeqArgs[nInd].Name != "InteractionHandler" && aSeqArgs[nInd].Name != "StatusIndicator"
&& aSeqArgs[nInd].Name != "VersionMajor"
&& aSeqArgs[nInd].Name != "FailOnWarning"
- && aSeqArgs[nInd].Name != "CheckIn" )
+ && aSeqArgs[nInd].Name != "CheckIn"
+ && aSeqArgs[nInd].Name != "NoFileSync" )
{
const OUString aMessage( "Unexpected MediaDescriptor parameter: " + aSeqArgs[nInd].Name );
throw lang::IllegalArgumentException( aMessage, Reference< XInterface >(), 1 );