Bump version to 6.4-15
[LibreOffice.git] / include / svl / msodocumentlockfile.hxx
blob904411cb01acc51512c93c4f4e3cdb98a88288cf
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #ifndef INCLUDED_SVL_MSODOCUMENTLOCKFILE_HXX
11 #define INCLUDED_SVL_MSODOCUMENTLOCKFILE_HXX
13 #include <svl/svldllapi.h>
14 #include <svl/documentlockfile.hxx>
16 #define MSO_WORD_LOCKFILE_SIZE 162
17 #define MSO_EXCEL_AND_POWERPOINT_LOCKFILE_SIZE 165
18 #define MSO_USERNAME_MAX_LENGTH 52
20 namespace svt
22 /// Class implementing reading and writing MSO lockfiles.
23 class SVL_DLLPUBLIC MSODocumentLockFile final : public GenDocumentLockFile
25 private:
26 enum class AppType
28 Word,
29 Excel,
30 PowerPoint
32 static AppType getAppType(const OUString& sOrigURL);
33 AppType m_eAppType;
35 virtual void
36 WriteEntryToStream(const LockFileEntry& aEntry,
37 const css::uno::Reference<css::io::XOutputStream>& xStream) override;
39 virtual css::uno::Reference<css::io::XInputStream> OpenStream() override;
41 public:
42 MSODocumentLockFile(const OUString& aOrigURL);
43 virtual ~MSODocumentLockFile() override;
45 virtual LockFileEntry GetLockData() override;
47 virtual void RemoveFile() override;
49 static bool IsMSOSupportedFileFormat(const OUString& aURL);
53 #endif
55 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */