summaryrefslogtreecommitdiffstats
path: root/vcl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-02-27 19:46:44 +0100
committerJan Holesovsky <kendy@collabora.com>2014-02-27 22:22:24 +0100
commit01aa02a128a9ea12a1b1d74d45f15cee26b11824 (patch)
tree0fc0b8ed0bb4fae39be0d52316c22b13eab55260 /vcl
parentIcon redux 01: Remove old dbaccess icons (diff)
downloadcore-01aa02a128a9ea12a1b1d74d45f15cee26b11824.tar.gz
core-01aa02a128a9ea12a1b1d74d45f15cee26b11824.zip
images: Skip comments in links.txt.
Change-Id: I446dec8447fb9b0b4fa37bf6343e130539211b50
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/impimagetree.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index 96aab03eeada..c996456675a2 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -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;
}
}