diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 2 |
4 files changed, 21 insertions, 7 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 5d00d39bd837..b1ef5fa0e5f2 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -306,7 +306,6 @@ public: uno::Sequence < util::RevisionTag > aVersions; std::unique_ptr<::utl::TempFile> pTempFile; - uno::Reference<embed::XStorage> xStorage; uno::Reference<embed::XStorage> m_xZipStorage; uno::Reference<io::XInputStream> m_xInputStreamToLoadFrom; @@ -328,6 +327,8 @@ public: util::DateTime m_aDateTime; + uno::Sequence<beans::PropertyValue> m_aArgs; + explicit SfxMedium_Impl(); ~SfxMedium_Impl(); SfxMedium_Impl(const SfxMedium_Impl&) = delete; @@ -3301,6 +3302,12 @@ 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 std::shared_ptr<SfxItemSet>& p ) : pImpl(new SfxMedium_Impl) diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index b2c7d07be18f..929f26098644 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -282,7 +282,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; @@ -326,7 +327,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 8f86d559226c..41019d1bdc0f 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2621,7 +2621,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() ) { @@ -2695,7 +2697,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(); @@ -2759,7 +2762,9 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString return false; } -bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString& aFilterName, SfxItemSet const & rItemSet) +bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString& aFilterName, + SfxItemSet const& rItemSet, + const uno::Sequence<beans::PropertyValue>& rArgs) { // copy all items stored in the itemset of the current medium std::unique_ptr<SfxAllItemSet> pMergedParams(new SfxAllItemSet( *pMedium->GetItemSet() )); @@ -2796,6 +2801,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString& // create a medium for the target URL auto pMergedParamsTmp = pMergedParams.get(); SfxMedium *pNewFile = new SfxMedium( rFileName, StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC, nullptr, std::move(pMergedParams) ); + pNewFile->SetArgs(rArgs); const SfxBoolItem* pNoFileSync = pMergedParamsTmp->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 9849ac86d642..0f2a44e176e3 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -3076,7 +3076,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 ) { |