LibreOffice Module svl (master) 1
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
svt::MSODocumentLockFile Class Referencefinal

Class implementing reading and writing MSO lockfiles. More...

#include <msodocumentlockfile.hxx>

Inheritance diagram for svt::MSODocumentLockFile:
[legend]
Collaboration diagram for svt::MSODocumentLockFile:
[legend]

Public Member Functions

 MSODocumentLockFile (std::u16string_view aOrigURL)
 
virtual ~MSODocumentLockFile () override
 
virtual void RemoveFile () override
 Delete the Lockfile, if current user is the owner. More...
 
- Public Member Functions inherited from svt::GenDocumentLockFile
 GenDocumentLockFile (const OUString &aLockFileURL)
 
virtual ~GenDocumentLockFile () override
 
bool CreateOwnLockFile ()
 
bool OverwriteOwnLockFile ()
 
virtual void RemoveFile ()
 Delete the Lockfile, if current user is the owner. More...
 
void RemoveFileDirectly ()
 Only delete lockfile, disregarding ownership. More...
 
LockFileEntry GetLockData ()
 
- Public Member Functions inherited from svt::LockFileCommon
 LockFileCommon (OUString aLockFileURL)
 
virtual ~LockFileCommon ()
 
const OUString & GetURL () const
 
void SetURL (const OUString &aURL)
 

Static Public Member Functions

static bool IsMSOSupportedFileFormat (std::u16string_view aURL)
 
- Static Public Member Functions inherited from svt::LockFileCommon
static void ParseList (const css::uno::Sequence< sal_Int8 > &aBuffer, std::vector< LockFileEntry > &rOutput)
 
static LockFileEntry ParseEntry (const css::uno::Sequence< sal_Int8 > &aBuffer, sal_Int32 &o_nCurPos)
 
static OUString ParseName (const css::uno::Sequence< sal_Int8 > &aBuffer, sal_Int32 &o_nCurPos)
 
static OUString EscapeCharacters (const OUString &aSource)
 
static OUString GetOOOUserName ()
 
static OUString GetCurrentLocalTime ()
 
static LockFileEntry GenerateOwnEntry ()
 
static INetURLObject ResolveLinks (const INetURLObject &aDocURL)
 

Private Types

enum class  AppType {
  Word ,
  Excel ,
  PowerPoint
}
 

Private Member Functions

virtual void WriteEntryToStream (std::unique_lock< std::mutex > &rGuard, const LockFileEntry &aEntry, const css::uno::Reference< css::io::XOutputStream > &xStream) override
 
virtual css::uno::Reference< css::io::XInputStream > OpenStream (std::unique_lock< std::mutex > &rGuard) override
 
virtual LockFileEntry GetLockDataImpl (std::unique_lock< std::mutex > &rGuard) override
 

Static Private Member Functions

static AppType getAppType (std::u16string_view sOrigURL)
 

Private Attributes

AppType m_eAppType
 

Additional Inherited Members

virtual LockFileEntry GetLockDataImpl (std::unique_lock< std::mutex > &rGuard)=0
 
virtual void WriteEntryToStream (std::unique_lock< std::mutex > &rGuard, const LockFileEntry &aEntry, const css::uno::Reference< css::io::XOutputStream > &xStream)=0
 
virtual css::uno::Reference< css::io::XInputStream > OpenStream (std::unique_lock< std::mutex > &rGuard)
 
- Static Protected Member Functions inherited from svt::LockFileCommon
static OUString GenerateOwnLockFileURL (std::u16string_view aOrigURL, std::u16string_view aPrefix)
 This method generates the URL of the lock file based on the document URL and the specified prefix. More...
 
- Protected Attributes inherited from svt::LockFileCommon
std::mutex m_aMutex
 

Detailed Description

Class implementing reading and writing MSO lockfiles.

Definition at line 23 of file msodocumentlockfile.hxx.

Member Enumeration Documentation

◆ AppType

enum class svt::MSODocumentLockFile::AppType
strongprivate
Enumerator
Word 
Excel 
PowerPoint 

Definition at line 26 of file msodocumentlockfile.hxx.

Constructor & Destructor Documentation

◆ MSODocumentLockFile()

svt::MSODocumentLockFile::MSODocumentLockFile ( std::u16string_view  aOrigURL)

Definition at line 80 of file msodocumentlockfile.cxx.

◆ ~MSODocumentLockFile()

svt::MSODocumentLockFile::~MSODocumentLockFile ( )
overridevirtual

Definition at line 86 of file msodocumentlockfile.cxx.

Member Function Documentation

◆ getAppType()

MSODocumentLockFile::AppType svt::MSODocumentLockFile::getAppType ( std::u16string_view  sOrigURL)
staticprivate

◆ GetLockDataImpl()

LockFileEntry svt::MSODocumentLockFile::GetLockDataImpl ( std::unique_lock< std::mutex > &  rGuard)
overrideprivatevirtual

Implements svt::GenDocumentLockFile.

Definition at line 193 of file msodocumentlockfile.cxx.

References aBuf, i, OOOUSERNAME, OpenStream(), and p.

Referenced by RemoveFile().

◆ IsMSOSupportedFileFormat()

bool svt::MSODocumentLockFile::IsMSOSupportedFileFormat ( std::u16string_view  aURL)
static

◆ OpenStream()

css::uno::Reference< css::io::XInputStream > svt::MSODocumentLockFile::OpenStream ( std::unique_lock< std::mutex > &  rGuard)
overrideprivatevirtual

◆ RemoveFile()

void svt::MSODocumentLockFile::RemoveFile ( )
overridevirtual

Delete the Lockfile, if current user is the owner.

Reimplemented from svt::GenDocumentLockFile.

Definition at line 245 of file msodocumentlockfile.cxx.

References svt::LockFileCommon::GenerateOwnEntry(), GetLockDataImpl(), svt::LockFileCommon::m_aMutex, OOOUSERNAME, and svt::GenDocumentLockFile::RemoveFileDirectly().

◆ WriteEntryToStream()

void svt::MSODocumentLockFile::WriteEntryToStream ( std::unique_lock< std::mutex > &  rGuard,
const LockFileEntry aEntry,
const css::uno::Reference< css::io::XOutputStream > &  xStream 
)
overrideprivatevirtual

Member Data Documentation

◆ m_eAppType

AppType svt::MSODocumentLockFile::m_eAppType
private

Definition at line 33 of file msodocumentlockfile.hxx.

Referenced by WriteEntryToStream().


The documentation for this class was generated from the following files: