Kaydet (Commit) 01aa02a1 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

images: Skip comments in links.txt.

Change-Id: I446dec8447fb9b0b4fa37bf6343e130539211b50
üst ed5fb459
......@@ -318,19 +318,25 @@ void ImplImageTree::parseLinkFile(boost::shared_ptr< SvStream > pStream)
{
OString aLine;
OUString aLink, aOriginal;
int nLineNo = 0;
while ( pStream->ReadLine( aLine ) )
{
sal_Int32 nIndex = 0;
++nLineNo;
if ( aLine.isEmpty() )
continue;
sal_Int32 nIndex = 0;
aLink = OStringToOUString( aLine.getToken(0, ' ', nIndex), RTL_TEXTENCODING_UTF8 );
aOriginal = OStringToOUString( aLine.getToken(0, ' ', nIndex), RTL_TEXTENCODING_UTF8 );
if ( aLink.isEmpty() || aOriginal.isEmpty() )
// skip comments, or incomplete entries
if (aLink.isEmpty() || aLink[0] == '#' || aOriginal.isEmpty())
{
SAL_INFO("vcl", "ImplImageTree::parseLinkFile: icon links.txt parse error. "
"Link is incomplete." );
if (aLink.isEmpty() || aOriginal.isEmpty())
SAL_WARN("vcl", "ImplImageTree::parseLinkFile: icon links.txt parse error, incomplete link at line " << nLineNo);
continue;
}
m_linkHash[aLink] = aOriginal;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment