diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-01-11 17:11:06 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-01-18 13:37:37 +0100 |
commit | d16bfbda418da5ce43133b93c833ff118bd3b04f (patch) | |
tree | fee10945d91d2b14f2bf9d9cadee6203b3b4f73c /sfx2 | |
parent | 643d257868247df19674fdf99aa8751d7413eaf3 (diff) |
ODT export: handle NoFileSync store option
SfxMedium already had a m_bDisableFileSync member; if the medium has a
storage, then forward this flag to it, so at the end
SwitchablePersistenceStream::waitForCompletion() (and the called
fileaccess::XStream_impl::waitForCompletion()) does not call
osl_syncFile(), either.
Times for 100 hello world inputs: 12594 -> 5281 ms is spent in XHTML-load + ODT
export + close (42% of original).
(cherry picked from commit 16a522361698ea53ab253d67e31cb51802210d71)
Conflicts:
package/inc/ZipPackage.hxx
package/source/xstor/xstorage.cxx
Change-Id: I2aab6c9e6baf133b211620004dcea66bd41ffc6f
Reviewed-on: https://gerrit.libreoffice.org/47979
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 100241c7c8b5..68f85eff772c 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -121,6 +121,7 @@ #include <sfx2/sfxresid.hxx> #include "sfxacldetect.hxx" #include <officecfg/Office/Common.hxx> +#include <comphelper/propertysequence.hxx> #include <memory> @@ -1371,6 +1372,14 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( bool bCreateTempIfNo ) aArgs[0] <<= pImpl->xStream; aArgs[1] <<= embed::ElementModes::READWRITE; pImpl->bStorageBasedOnInStream = true; + if (pImpl->m_bDisableFileSync) + { + // Forward NoFileSync to the storage factory. + aArgs.realloc(3); + uno::Sequence<beans::PropertyValue> aProperties( + comphelper::InitPropertySequence({ { "NoFileSync", uno::makeAny(true) } })); + aArgs[2] <<= aProperties; + } } else if ( pImpl->xInputStream.is() ) { |