[Libreoffice-commits] .: Branch 'feature/killsdf' - l10ntools/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Oct 10 10:15:10 PDT 2012


 l10ntools/source/lngmerge.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 06175e8b19625cb5a43b1ae5ae63e419cee7e053
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date:   Wed Oct 10 15:30:40 2012 +0200

    Correct lngmerge not to work with eof
    
    Change-Id: Ibf80a31ea2c03ff2882e71a45acb71d9c9a16482

diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index b0282f5..efc6c81 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -50,10 +50,10 @@ LngParser::LngParser(const rtl::OString &rLngFile,
     if (aStream.is_open())
     {
         bool bFirstLine = true;
+        std::string s;
+        std::getline(aStream, s);
         while (!aStream.eof())
         {
-            std::string s;
-            std::getline(aStream, s);
             rtl::OString sLine(s.data(), s.length());
 
             if( bFirstLine )
@@ -64,6 +64,7 @@ LngParser::LngParser(const rtl::OString &rLngFile,
             }
 
             pLines->push_back( new rtl::OString(sLine) );
+            std::getline(aStream, s);
         }
     }
     else


More information about the Libreoffice-commits mailing list