diff options
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 2 |
4 files changed, 16 insertions, 6 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 8b217620c1ad..7c20ba58d3c9 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -3057,6 +3057,11 @@ SfxMedium::SfxMedium( const uno::Sequence<beans::PropertyValue>& aArgs ) : Init_Impl(); } +void SfxMedium::SetArgs(const uno::Sequence<beans::PropertyValue>& rArgs) +{ + pImpl->m_aArgs = rArgs; +} + uno::Sequence<beans::PropertyValue> SfxMedium::GetArgs() const { return pImpl->m_aArgs; } SfxMedium::SfxMedium( const uno::Reference < embed::XStorage >& rStor, const OUString& rBaseURL, const SfxItemSet* p ) : diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 16265c2510d5..78f2c1ba0f38 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -259,7 +259,8 @@ void SfxObjectShell::PrintState_Impl(SfxItemSet &rSet) rSet.Put( SfxBoolItem( SID_PRINTOUT, bPrinting ) ); } -bool SfxObjectShell::APISaveAs_Impl(const OUString& aFileName, SfxItemSet& rItemSet) +bool SfxObjectShell::APISaveAs_Impl(const OUString& aFileName, SfxItemSet& rItemSet, + const css::uno::Sequence<css::beans::PropertyValue>& rArgs) { bool bOk = false; @@ -304,7 +305,7 @@ bool SfxObjectShell::APISaveAs_Impl(const OUString& aFileName, SfxItemSet& rItem if ( pDocTitleItem ) getDocProperties()->setTitle( pDocTitleItem->GetValue() ); - bOk = CommonSaveAs_Impl(INetURLObject(aFileName), aFilterName, rItemSet); + bOk = CommonSaveAs_Impl(INetURLObject(aFileName), aFilterName, rItemSet, rArgs); } } diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 0397b0614054..4a05347d3d0c 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2577,7 +2577,9 @@ bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet ) return bSaved; } -bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString& aFilterName, SfxItemSet& rItemSet) +bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString& aFilterName, + SfxItemSet& rItemSet, + const uno::Sequence<beans::PropertyValue>& rArgs) { if( aURL.HasError() ) { @@ -2652,7 +2654,8 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString if ( IsDocShared() ) aTempFileURL = pMedium->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ); - if (PreDoSaveAs_Impl(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), aFilterName, rItemSet)) + if (PreDoSaveAs_Impl(aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE), aFilterName, + rItemSet, rArgs)) { // Update Data on media SfxItemSet *pSet = GetMedium()->GetItemSet(); @@ -2716,7 +2719,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString return false; } -bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString& aFilterName, SfxItemSet& rItemSet) +bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString& aFilterName, SfxItemSet& rItemSet, const uno::Sequence<beans::PropertyValue>& rArgs) { // copy all items stored in the itemset of the current medium SfxAllItemSet* pMergedParams = new SfxAllItemSet( *pMedium->GetItemSet() ); @@ -2752,6 +2755,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString& // create a medium for the target URL SfxMedium *pNewFile = new SfxMedium( rFileName, StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC, nullptr, pMergedParams ); + pNewFile->SetArgs(rArgs); const SfxBoolItem* pNoFileSync = pMergedParams->GetItem<SfxBoolItem>(SID_NO_FILE_SYNC, false); if (pNoFileSync && pNoFileSync->GetValue()) diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index b4b9b52593c5..601ca323262e 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -3008,7 +3008,7 @@ void SfxBaseModel::impl_store( const OUString& sURL m_pData->m_xDocumentProperties = xNewDocProps; } - bool bRet = m_pData->m_pObjectShell->APISaveAs_Impl(sURL, *pItemSet); + bool bRet = m_pData->m_pObjectShell->APISaveAs_Impl(sURL, *pItemSet, seqArguments); if ( bCopyTo ) { |