Bugfix: Throw the correct exception if the source is not an ODF document + give explanation in command line application
git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@158 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
parent
d3bd2a10d5
commit
c639066861
4 changed files with 16 additions and 12 deletions
|
@ -16,11 +16,11 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* Copyright: 2002-2012 by Henrik Just
|
||||
* Copyright: 2002-2014 by Henrik Just
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.4 (2012-04-01)
|
||||
* Version 1.4 (2014-08-05)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -92,9 +92,9 @@ public final class MIMETypes extends writer2latex.api.MIMETypes {
|
|||
|
||||
private static final boolean isSVG(byte[] blob) {
|
||||
// Look for <svg within the first 250 bytes
|
||||
int m = Math.max(blob.length, 250);
|
||||
int m = Math.min(blob.length, 250);
|
||||
int n = SVG_SIG.length;
|
||||
for (int j=0; j<m; j++) {
|
||||
for (int j=0; j<m-n; j++) {
|
||||
boolean bFound = true;
|
||||
for (int i=0; i<n; i++) {
|
||||
if (blob[j+i]!=SVG_SIG[i]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue