[Libreoffice-commits] core.git: l10ntools/inc l10ntools/source

Zolnai Tamás zolnaitamas2000 at gmail.com
Sat Mar 9 03:22:02 PST 2013


 l10ntools/inc/po.hxx    |    1 -
 l10ntools/source/po.cxx |   36 ------------------------------------
 2 files changed, 37 deletions(-)

New commits:
commit de69091d34d8102c0b56194d603ed9e66699d34c
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date:   Sat Mar 9 12:18:28 2013 +0100

    Delete PoHeader constructor used by renewpo
    
    Change-Id: I360a9c96eacf9b7b8bd80214a3fc4c9faa01e631

diff --git a/l10ntools/inc/po.hxx b/l10ntools/inc/po.hxx
old mode 100644
new mode 100755
index 506558f..f2edb06
--- a/l10ntools/inc/po.hxx
+++ b/l10ntools/inc/po.hxx
@@ -90,7 +90,6 @@ public:
     friend class PoIfstream;
 
                     PoHeader( const OString& rExtSrc );
-                    PoHeader( std::ifstream& rOldPo );
                     ~PoHeader();
 };
 
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
old mode 100644
new mode 100755
index 90b7f79..99e113b
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -619,16 +619,6 @@ namespace
         strftime( pBuff, sizeof pBuff, "%Y-%m-%d %H:%M%z", pNow );
         return pBuff;
     }
-
-    static OString lcl_ReplaceAttribute(
-        const OString& rSource, const OString& rOld, const OString& rNew )
-    {
-        const sal_Int32 nFirstIndex =
-            rSource.indexOf( rOld ) + rOld.getLength()+2;
-        const sal_Int32 nCount =
-            rSource.indexOf( "\n", nFirstIndex ) - nFirstIndex;
-        return rSource.replaceFirst( rSource.copy(nFirstIndex, nCount), rNew );
-    }
 }
 
 //Template Constructor
@@ -653,32 +643,6 @@ PoHeader::PoHeader( const OString& rExtSrc )
     m_bIsInitialized = true;
 }
 
-
-//Constructor for old headers to renew po files
-PoHeader::PoHeader(  std::ifstream& rOldPo )
-    : m_pGenPo( new GenPoEntry() )
-    , m_bIsInitialized( false )
-{
-    assert( rOldPo.is_open() );
-    m_pGenPo->readFromFile( rOldPo );
-
-    const OString sExtractCom = m_pGenPo->getExtractCom();
-    m_pGenPo->setExtractCom(
-        sExtractCom.copy( 0, sExtractCom.getLength() - 3 ) );
-
-    OString sMsgStr = m_pGenPo->getMsgStr();
-    sMsgStr =
-        lcl_ReplaceAttribute( sMsgStr, "Report-Msgid-Bugs-To",
-            "https://bugs.freedesktop.org/enter_bug.cgi?product="
-            "LibreOffice&bug_status=UNCONFIRMED&component=UI" );
-    sMsgStr =
-        lcl_ReplaceAttribute( sMsgStr, "X-Generator", "LibreOffice" );
-    sMsgStr =
-        lcl_ReplaceAttribute( sMsgStr, "X-Accelerator-Marker", "~" );
-    m_pGenPo->setMsgStr( sMsgStr );
-    m_bIsInitialized = true;
-}
-
 PoHeader::~PoHeader()
 {
     delete m_pGenPo;


More information about the Libreoffice-commits mailing list