diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-03-26 16:12:49 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-03-27 21:48:27 +0100 |
commit | 59e89f7ef64ae2b40a37aa552c51a69ceea1cd42 (patch) | |
tree | ab94b7e322b1dc4377507404e92f966015553e0b /include | |
parent | 5aa23e4d6e849f1ecccb2f6f290e7b34c9df7399 (diff) |
MSO lockfiles: Deduplicate MSO lock file reading code
The removed code was extracted to MSODocumentLockFile class
so use that class here too.
Use openStreamNoLock() for reading MSO lockfiles, because otherwise
we can not read lock files written by MSO.
Change-Id: Ib31cb9f3783d0b0ce784f900821047b9d32156f2
Reviewed-on: https://gerrit.libreoffice.org/69759
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
(cherry picked from commit ad47e9b1c0d3f1720665b2786090e8c0927b5b45)
Reviewed-on: https://gerrit.libreoffice.org/69844
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/svl/documentlockfile.hxx | 2 | ||||
-rw-r--r-- | include/svl/msodocumentlockfile.hxx | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/svl/documentlockfile.hxx b/include/svl/documentlockfile.hxx index 77b1075ba6ea..7de20ea241e7 100644 --- a/include/svl/documentlockfile.hxx +++ b/include/svl/documentlockfile.hxx @@ -53,7 +53,7 @@ public: protected: virtual void WriteEntryToStream( const LockFileEntry& aEntry, const css::uno::Reference< css::io::XOutputStream >& xStream ) = 0; - css::uno::Reference< css::io::XInputStream > OpenStream(); + virtual css::uno::Reference< css::io::XInputStream > OpenStream(); }; /// Class implementing reading and writing LO lockfiles. diff --git a/include/svl/msodocumentlockfile.hxx b/include/svl/msodocumentlockfile.hxx index 2c438f0178cb..5fa6fcbf10bf 100644 --- a/include/svl/msodocumentlockfile.hxx +++ b/include/svl/msodocumentlockfile.hxx @@ -64,6 +64,8 @@ protected: WriteEntryToStream(const LockFileEntry& aEntry, const css::uno::Reference<css::io::XOutputStream>& xStream) override; + virtual css::uno::Reference<css::io::XInputStream> OpenStream() override; + public: MSODocumentLockFile(const OUString& aOrigURL); virtual ~MSODocumentLockFile() override; |