1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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/.
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
22 /// Class implementing reading and writing MSO lockfiles.
23 class SVL_DLLPUBLIC MSODocumentLockFile final
: public GenDocumentLockFile
32 static AppType
getAppType(std::u16string_view sOrigURL
);
36 WriteEntryToStream(std::unique_lock
<std::mutex
>& rGuard
, const LockFileEntry
& aEntry
,
37 const css::uno::Reference
<css::io::XOutputStream
>& xStream
) override
;
39 virtual css::uno::Reference
<css::io::XInputStream
>
40 OpenStream(std::unique_lock
<std::mutex
>& rGuard
) override
;
42 virtual LockFileEntry
GetLockDataImpl(std::unique_lock
<std::mutex
>& rGuard
) override
;
45 MSODocumentLockFile(std::u16string_view aOrigURL
);
46 virtual ~MSODocumentLockFile() override
;
48 virtual void RemoveFile() override
;
50 static bool IsMSOSupportedFileFormat(std::u16string_view aURL
);
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */