diff options
author | Zolnai Tamás <zolnaitamas2000@gmail.com> | 2012-08-29 09:51:44 +0200 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-08-29 08:00:08 +0000 |
commit | 0319a1c8d1df4a86b847f5d6178966a29e7c24cb (patch) | |
tree | bc05844144542c588369b538992f19833b49652d /l10ntools/inc/po.hxx | |
parent | 437ae002185a81802cb31b00fa777a7b5d8f9847 (diff) |
Some improvement in po classes
Raise general po functionalities from PoEntry to the
GenPoEntry class. Thus PoEntry contains only the specific
things with which LibreOffice localization tool works.
Improve escaping text.
Change-Id: I98894e7c218d37c226f48b30a1f8b59a5ff1a0bf
Reviewed-on: https://gerrit.libreoffice.org/507
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
Diffstat (limited to 'l10ntools/inc/po.hxx')
-rw-r--r-- | l10ntools/inc/po.hxx | 58 |
1 files changed, 41 insertions, 17 deletions
diff --git a/l10ntools/inc/po.hxx b/l10ntools/inc/po.hxx index de01053ba217..ffdb0d2af36c 100644 --- a/l10ntools/inc/po.hxx +++ b/l10ntools/inc/po.hxx @@ -32,7 +32,7 @@ #include <fstream> #include <rtl/string.hxx> -class PoEntry +class GenPoEntry { private: @@ -44,31 +44,55 @@ private: OString m_sUnTransStr; OString m_sTransStr; - OString m_sKeyId; - -protected: - void setExtractCom(const OString& rExtCom) - { m_sExtractCom = rExtCom; } - public: - PoEntry(); - PoEntry(const OString& i_rSDFLine, - const sal_uInt16 eType = TEXT); - virtual ~PoEntry(); - - virtual void writeToFile(std::ofstream& io_rOFStream); - - void setTransStr(const OString& rTransStr); + GenPoEntry(); + virtual ~GenPoEntry(); + + virtual void setWhiteSpace(const OString& rWhiteSpace) + { m_sWhiteSpace = rWhiteSpace; } + virtual void setExtractCom(const OString& rExtractCom) + { m_sExtractCom = rExtractCom; } + virtual void setReference(const OString& rReference) + { m_sReference = rReference; } + virtual void setContext(const OString& rContext) + { m_sContext = rContext; } + virtual void setUnTransStr(const OString& rUnTransStr) + { m_sUnTransStr = rUnTransStr; } + virtual void setTransStr(const OString& rTransStr) + { m_sTransStr = rTransStr; } + + virtual void writeToFile(std::ofstream& io_rOFStream); +}; +class PoEntry: public GenPoEntry +{ +public: enum SDFPARTS { PROJECT, SOURCEFILE, DUMMY, RESOURCETYPE, GROUPID, LOCALID, HELPID, PLATFORM, WIDTH, LANGUAGEID, TEXT, HELPTEXT, QUICKHELPTEXT, TITLE, TIMESTAMP }; -}; + enum TYPE { TTEXT=TEXT, TQUICKHELPTEXT=QUICKHELPTEXT, TTITLE=TITLE }; +private: + + OString m_sSourceFile; + OString m_sGroupId; + OString m_sLocalId; + OString m_sResourceType; + TYPE m_eType; + OString m_sHelpText; + OString m_sKeyId; +public: + + PoEntry(const OString& i_rSDFLine, + const TYPE eType = TTEXT); + virtual ~PoEntry(); + virtual void setUnTransStr(const OString& rUnTransStr); + virtual void setTransStr(const OString& rTransStr); +}; -class PoHeader: public PoEntry +class PoHeader: public GenPoEntry { private: |