ImageLists don't exist in rsc file anymore

Change-Id: I99101a7c979c9d9aa788df7dc5f49872d1089dd8
Reviewed-on: https://gerrit.libreoffice.org/32593
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2017-01-01 20:45:07 +00:00
parent d485ba9f38
commit 2cdaab42b9

View File

@@ -844,94 +844,6 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile,
aOStm.WriteLine(aLine);
}
else if (aLine.indexOf("ImageList") != -1)
{
::std::vector< ::std::pair< OString, sal_Int32 > > aEntryVector;
aOStm.WriteLine(aLine);
if (aLine.indexOf(';') == -1)
{
const sal_uInt64 nImgListStartPos = aIStm.Tell();
do
{
if( !aIStm.ReadLine(aLine) )
break;
}
while (aLine.indexOf("Prefix") == -1);
const OString aPrefix( aLine.getToken(1, '"') );
aIStm.Seek( nImgListStartPos );
do
{
if (!aIStm.ReadLine(aLine) )
break;
}
while (aLine.indexOf("IdList") == -1);
// scan all ids and collect images
while (aLine.indexOf('}') == -1)
{
if( !aIStm.ReadLine(aLine) )
break;
aLine = comphelper::string::stripStart(aLine, ' ');
aLine = comphelper::string::stripStart(aLine, '\t');
aLine = aLine.replaceAll(";", "");
if (comphelper::string::isdigitAsciiString(aLine))
{
sal_Int32 nNumber = atoi(aLine.getStr());
OStringBuffer aBuf(aPrefix);
if( nNumber < 10000 )
aBuf.append('0');
aBuf.append(aLine);
OString aBaseFileName = aBuf.makeStringAndClear();
if( GetImageFilePath( rOutputFile, rContext, aBaseFileName, aFilePath, pSysListFile ) )
aEntryVector.push_back( ::std::pair< OString, sal_Int32 >( aFilePath, nNumber ) );
else
aMissingImages.push_back( aBaseFileName );
}
}
const sal_uInt64 nImgListEndPos = aIStm.Tell();
aIStm.Seek( nImgListStartPos );
while( aIStm.Tell() < nImgListEndPos )
{
aIStm.ReadLine( aLine );
if (aLine.indexOf("IdList") != -1)
{
while (aLine.indexOf('}') == -1)
aIStm.ReadLine(aLine);
}
else
aOStm.WriteLine(aLine);
}
aOStm.WriteLine(OString("FileList = {"));
for( size_t i = 0; i < aEntryVector.size(); ++i )
{
OStringBuffer aEntryString("< \"");
aEntryString.append(aEntryVector[i].first);
aEntryString.append("\"; ");
aEntryString.append(static_cast<sal_Int32>(aEntryVector[ i ].second));
aEntryString.append("; >;");
aOStm.WriteLine(aEntryString.makeStringAndClear());
}
aOStm.WriteLine(OString("};"));
}
else
aOStm.WriteLine(aLine);
}
else
aOStm.WriteLine(aLine);
}