bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / svl / msodocumentlockfile.hxx
blob322972fefe253a8553706636f14931bcbe1e7e24
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 #include <com/sun/star/lang/XComponent.hpp>
18 #define MSO_WORD_LOCKFILE_SIZE 162
19 #define MSO_EXCEL_AND_POWERPOINT_LOCKFILE_SIZE 165
20 #define MSO_USERNAME_MAX_LENGTH 52
22 namespace svt
24 /// Class implementing reading and writing MSO lockfiles.
25 class SVL_DLLPUBLIC MSODocumentLockFile : public GenDocumentLockFile
27 private:
28 enum class AppType
30 Word,
31 Excel,
32 PowerPoint
34 static AppType getAppType(const OUString& sOrigURL);
35 AppType m_eAppType;
37 protected:
38 virtual void
39 WriteEntryToStream(const LockFileEntry& aEntry,
40 const css::uno::Reference<css::io::XOutputStream>& xStream) override;
42 virtual css::uno::Reference<css::io::XInputStream> OpenStream() override;
44 public:
45 MSODocumentLockFile(const OUString& aOrigURL);
46 virtual ~MSODocumentLockFile() override;
48 virtual LockFileEntry GetLockData() override;
50 virtual void RemoveFile() override;
52 static bool IsMSOSupportedFileFormat(const OUString& aURL);
56 #endif
58 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */