summaryrefslogtreecommitdiff
path: root/include/svl/msodocumentlockfile.hxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-03-30 15:33:41 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-03-30 17:16:42 +0100
commit49696cc78fefa6d7f1c27a722b576c8d749c20d6 (patch)
tree540858c41c9d6c02fdd9f2fbaa30c3257099e232 /include/svl/msodocumentlockfile.hxx
parent107fd82751c35818152eabd45bdf882972d3c100 (diff)
Some refactor of lockfile classes to minimize interface
Change-Id: Icc67c31d6a2351b6504429e25067c25353233f5f Reviewed-on: https://gerrit.libreoffice.org/69947 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/svl/msodocumentlockfile.hxx')
-rw-r--r--include/svl/msodocumentlockfile.hxx44
1 files changed, 8 insertions, 36 deletions
diff --git a/include/svl/msodocumentlockfile.hxx b/include/svl/msodocumentlockfile.hxx
index cd0db0ffb6d9..322972fefe25 100644
--- a/include/svl/msodocumentlockfile.hxx
+++ b/include/svl/msodocumentlockfile.hxx
@@ -11,38 +11,10 @@
#define INCLUDED_SVL_MSODOCUMENTLOCKFILE_HXX
#include <svl/svldllapi.h>
-#include <svl/lockfilecommon.hxx>
#include <svl/documentlockfile.hxx>
#include <com/sun/star/lang/XComponent.hpp>
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace io
-{
-class XInputStream;
-}
-}
-}
-}
-namespace com
-{
-namespace sun
-{
-namespace star
-{
-namespace io
-{
-class XOutputStream;
-}
-}
-}
-}
-
#define MSO_WORD_LOCKFILE_SIZE 162
#define MSO_EXCEL_AND_POWERPOINT_LOCKFILE_SIZE 165
#define MSO_USERNAME_MAX_LENGTH 52
@@ -53,11 +25,14 @@ namespace svt
class SVL_DLLPUBLIC MSODocumentLockFile : public GenDocumentLockFile
{
private:
- OUString m_sOrigURL;
-
- static bool isWordFormat(const OUString& aOrigURL);
- static bool isExcelFormat(const OUString& aOrigURL);
- static bool isPowerPointFormat(const OUString& aOrigURL);
+ enum class AppType
+ {
+ Word,
+ Excel,
+ PowerPoint
+ };
+ static AppType getAppType(const OUString& sOrigURL);
+ AppType m_eAppType;
protected:
virtual void
@@ -70,9 +45,6 @@ public:
MSODocumentLockFile(const OUString& aOrigURL);
virtual ~MSODocumentLockFile() override;
- /// Need to generate different lock file name for MSO.
- virtual OUString GenerateURL(const OUString& aOrigURL, const OUString& aPrefix) override;
-
virtual LockFileEntry GetLockData() override;
virtual void RemoveFile() override;