fix up misleading mismatching indent and add mode lines
Change-Id: Id0abfc6d2962223bd0f7f0864a53e94bb7ec5052 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147932 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
@@ -15,6 +16,7 @@
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
package com.sun.star.lib.uno.adapter;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -76,23 +78,21 @@ public final class InputStreamToXInputStreamAdapter implements XInputStream {
|
||||
com.sun.star.io.IOException
|
||||
{
|
||||
try {
|
||||
long bytesRead;
|
||||
if (len >iIn.available()) {
|
||||
bytesRead = iIn.read(b[0], 0, iIn.available());
|
||||
}
|
||||
else{
|
||||
bytesRead = iIn.read(b[0], 0, len);
|
||||
}
|
||||
long bytesRead;
|
||||
if (len >iIn.available()) {
|
||||
bytesRead = iIn.read(b[0], 0, iIn.available());
|
||||
}
|
||||
else{
|
||||
bytesRead = iIn.read(b[0], 0, len);
|
||||
}
|
||||
|
||||
// Casting bytesRead to an int is okay, since the user can
|
||||
// only pass in an integer length to read, so the bytesRead
|
||||
// must <= len.
|
||||
|
||||
if (bytesRead <= 0) {
|
||||
return 0;
|
||||
}
|
||||
return ((int)bytesRead);
|
||||
|
||||
|
||||
}
|
||||
return ((int)bytesRead);
|
||||
} catch (IOException e) {
|
||||
throw new com.sun.star.io.IOException("reader error", e);
|
||||
}
|
||||
@@ -102,23 +102,21 @@ public final class InputStreamToXInputStreamAdapter implements XInputStream {
|
||||
com.sun.star.io.IOException
|
||||
{
|
||||
try {
|
||||
long bytesRead;
|
||||
if (len >iIn.available()) {
|
||||
bytesRead = iIn.read(b[0], 0, iIn.available());
|
||||
}
|
||||
else{
|
||||
bytesRead = iIn.read(b[0], 0, len);
|
||||
}
|
||||
long bytesRead;
|
||||
if (len >iIn.available()) {
|
||||
bytesRead = iIn.read(b[0], 0, iIn.available());
|
||||
}
|
||||
else{
|
||||
bytesRead = iIn.read(b[0], 0, len);
|
||||
}
|
||||
|
||||
// Casting bytesRead to an int is okay, since the user can
|
||||
// only pass in an integer length to read, so the bytesRead
|
||||
// must <= len.
|
||||
|
||||
if (bytesRead <= 0) {
|
||||
return 0;
|
||||
}
|
||||
return ((int)bytesRead);
|
||||
|
||||
|
||||
}
|
||||
return ((int)bytesRead);
|
||||
} catch (IOException e) {
|
||||
throw new com.sun.star.io.IOException("reader error", e);
|
||||
}
|
||||
@@ -143,3 +141,4 @@ public final class InputStreamToXInputStreamAdapter implements XInputStream {
|
||||
}
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||
|
||||
Reference in New Issue
Block a user