mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 14:00:32 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@52920 954022d7-b5bf-4e40-9824-e11837661b57
47 lines
1.3 KiB
C++
47 lines
1.3 KiB
C++
#pragma once
|
|
#ifndef UTILITY_TXT_FILE_INCLUDE_H_
|
|
#define UTILITY_TXT_FILE_INCLUDE_H_
|
|
|
|
#include <string>
|
|
#include <list>
|
|
|
|
#include "..\..\..\..\Common\DocxFormat\Source\SystemUtility\SystemUtility.h"
|
|
|
|
class TxtFile
|
|
{
|
|
public:
|
|
TxtFile(const OOX::CPath& path);
|
|
|
|
public:
|
|
const std::list<std::string> readAnsi() const;
|
|
const std::list<std::wstring> readUnicode() const;
|
|
const std::list<std::wstring> readUnicodeWithOutBOM() const;
|
|
const std::list<std::wstring> readBigEndian() const;
|
|
const std::list<std::string> readUtf8() const;
|
|
const std::list<std::string> readUtf8withoutPref() const;
|
|
|
|
public:
|
|
void writeAnsi(const std::list<std::string>& content) const;
|
|
void writeUnicode(const std::list<std::wstring>& content) const;
|
|
void writeBigEndian(const std::list<std::wstring>& content) const;
|
|
void writeUtf8(const std::list<std::string>& content) const;
|
|
void writeUtf8withoutPref(const std::list<std::string>& content) const;
|
|
|
|
public:
|
|
const bool isAnsi() const;
|
|
const bool isUnicode() const;
|
|
const bool isUnicodeWithOutBOM() const;
|
|
const bool isBigEndian() const;
|
|
const bool isUtf8() const;
|
|
|
|
private:
|
|
void setAnsiStamp() const;
|
|
void setUnicodeStamp() const;
|
|
void setBigEndianStamp() const;
|
|
void setUtf8Stamp() const;
|
|
|
|
private:
|
|
OOX::CPath m_path;
|
|
};
|
|
|
|
#endif // UTILITY_TXT_FILE_INCLUDE_H_
|