Author: alg
Date: Wed Jan 11 11:44:13 2012
New Revision: 1229961
URL: http://svn.apache.org/viewvc?rev=1229961&view=rev
Log:
#118728# changed indentifying definitions for Svg file detection
Modified:
incubator/ooo/trunk/main/svtools/source/filter/filter.cxx
Modified: incubator/ooo/trunk/main/svtools/source/filter/filter.cxx
URL:
http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svtools/source/filter/filter.cxx?rev=1229961&r1=1229960&r2=1229961&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svtools/source/filter/filter.cxx (original)
+++ incubator/ooo/trunk/main/svtools/source/filter/filter.cxx Wed Jan 11
11:44:13 2012
@@ -678,8 +678,10 @@ static sal_Bool ImpPeekGraphicFormat( Sv
//--------------------------- SVG ------------------------------------
if( !bTest )
{
- if( ImplSearchEntry( sFirstBytes, (sal_uInt8*)"DOCTYPE", 256, 7
)
- && ImplSearchEntry( sFirstBytes, (sal_uInt8*)"svg", 256, 3 ) )
+ if( ImplSearchEntry( sFirstBytes, (sal_uInt8*)"<?xml", 256, 5 ) // is
it xml
+ && ImplSearchEntry( sFirstBytes, (sal_uInt8*)"version", 256, 7 )
// does it have a version (required for xml)
+ && ImplSearchEntry( sFirstBytes, (sal_uInt8*)"www.w3.org", 256, 10
) // does it have to do with w3 (part of namespace definition)
+ && ImplSearchEntry( sFirstBytes, (sal_uInt8*)"<svg", 256, 4 ) ) //
does it have svg nodes
{
rFormatExtension = UniString::CreateFromAscii( "SVG", 3
);
return sal_True;