[Libreoffice-commits] .: Branch 'feature/killsdf' - l10ntools/inc l10ntools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Oct 10 10:07:39 PDT 2012
l10ntools/inc/po.hxx | 3 ---
l10ntools/source/po.cxx | 15 +++------------
2 files changed, 3 insertions(+), 15 deletions(-)
New commits:
commit a76c979c1771566e806db67e44f387bb68b862cc
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Wed Oct 10 15:08:46 2012 +0200
Delete WhiteSpace member of GenPoEntry
This member allows us to use more
kind of whitespace between po entries but
we use one end line everywhere so this variable
is unneeded.
Change-Id: I4e3c9040ca73580fd01484bb91325a9df04cb4e4
diff --git a/l10ntools/inc/po.hxx b/l10ntools/inc/po.hxx
index d1112e1..fa43b51 100644
--- a/l10ntools/inc/po.hxx
+++ b/l10ntools/inc/po.hxx
@@ -21,7 +21,6 @@ class GenPoEntry
{
private:
- OString m_sWhiteSpace;
OString m_sExtractCom;
OString m_sReference;
OString m_sContext;
@@ -36,7 +35,6 @@ public:
virtual ~GenPoEntry();
//Default copy constructor and copy operator work well
- virtual OString getWhiteSpace() const { return m_sWhiteSpace; }
virtual OString getExtractCom() const { return m_sExtractCom; }
virtual OString getReference() const { return m_sReference; }
virtual OString getContext() const { return m_sContext; }
@@ -45,7 +43,6 @@ public:
virtual bool getFuzzy() const { return m_bFuzzy; }
virtual bool isNull() const { return m_bNull; }
- virtual void setWhiteSpace(const OString& rWhiteSpace);
virtual void setExtractCom(const OString& rExtractCom);
virtual void setReference(const OString& rReference);
virtual void setContext(const OString& rContext);
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 0416ad0..e1c978d 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -100,8 +100,7 @@ namespace
//Default constructor
GenPoEntry::GenPoEntry()
- : m_sWhiteSpace( OString() )
- , m_sExtractCom( OString() )
+ : m_sExtractCom( OString() )
, m_sReference( OString() )
, m_sContext( OString() )
, m_sUnTransStr( OString() )
@@ -117,11 +116,6 @@ GenPoEntry::~GenPoEntry()
}
//Set class members
-void GenPoEntry::setWhiteSpace(const OString& rWhiteSpace)
-{
- m_sWhiteSpace = rWhiteSpace;
-}
-
void GenPoEntry::setExtractCom(const OString& rExtractCom)
{
m_sExtractCom = rExtractCom;
@@ -155,8 +149,8 @@ void GenPoEntry::setFuzzy(const bool bFuzzy)
//Write to file
void GenPoEntry::writeToFile(std::ofstream& rOFStream) const
{
- if ( !m_sWhiteSpace.isEmpty() )
- rOFStream << m_sWhiteSpace.getStr();
+ if ( rOFStream.tellp() != 0 )
+ rOFStream << std::endl;
if ( !m_sExtractCom.isEmpty() )
rOFStream
<< "#. "
@@ -183,7 +177,6 @@ void GenPoEntry::readFromFile(std::ifstream& rIFStream)
m_bNull = true;
return;
}
- m_sWhiteSpace = "\n";
OString* pLastMsg = 0;
std::string sTemp;
getline(rIFStream,sTemp);
@@ -414,7 +407,6 @@ PoEntry::PoEntry(const OString& rSDFLine, const TYPE eType)
{
throw INVALIDSDFLINE;
}
- m_aGenPo.setWhiteSpace("\n");
m_aGenPo.setReference(vParts[SOURCEFILE].
copy(vParts[SOURCEFILE].lastIndexOf("\\")+1));
@@ -629,7 +621,6 @@ PoHeader::PoHeader( std::ifstream& rOldPo )
assert( rOldPo.is_open() );
m_aGenPo.readFromFile( rOldPo );
- m_aGenPo.setWhiteSpace( OString() );
const OString sExtractCom = m_aGenPo.getExtractCom();
m_aGenPo.setExtractCom(
sExtractCom.copy( 0, sExtractCom.getLength() - 3 ) );
More information about the Libreoffice-commits
mailing list