summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-08 13:55:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-10 11:18:35 +0100
commitf68f3b98cc47868cda3a75298a211c5735c0a4e7 (patch)
tree13eed7d0b65c9e2c39f5274eed61c32d8976ae58 /svl
parentb95512e936b4eebb301c169e091bd9064c1eb2ac (diff)
loplugin:indentation in soltools..svl
Change-Id: I270a12cdb68920b8fa23b82dd933724e30334485 Reviewed-on: https://gerrit.libreoffice.org/67565 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/qa/unit/items/test_IndexedStyleSheets.cxx2
-rw-r--r--svl/source/crypto/cryptosign.cxx104
-rw-r--r--svl/source/fsstor/fsstorage.cxx16
-rw-r--r--svl/source/items/globalnameitem.cxx2
-rw-r--r--svl/source/items/srchitem.cxx2
-rw-r--r--svl/source/items/style.cxx4
6 files changed, 65 insertions, 65 deletions
diff --git a/svl/qa/unit/items/test_IndexedStyleSheets.cxx b/svl/qa/unit/items/test_IndexedStyleSheets.cxx
index b00833f418cf..5326b5b5cabc 100644
--- a/svl/qa/unit/items/test_IndexedStyleSheets.cxx
+++ b/svl/qa/unit/items/test_IndexedStyleSheets.cxx
@@ -199,7 +199,7 @@ void IndexedStyleSheetsTest::OnlyOneStyleSheetIsReturnedWhenReturnFirstIsUsed()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Only one style sheet is returned.", static_cast<size_t>(1), v.size());
std::vector<unsigned> w = iss.FindPositionsByNameAndPredicate(name, predicate);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("All style sheets are returned.", static_cast<size_t>(3), w.size());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("All style sheets are returned.", static_cast<size_t>(3), w.size());
}
CPPUNIT_TEST_SUITE_REGISTRATION(IndexedStyleSheetsTest);
diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx
index 58dafc378af4..cf0013931910 100644
--- a/svl/source/crypto/cryptosign.cxx
+++ b/svl/source/crypto/cryptosign.cxx
@@ -406,71 +406,71 @@ my_SEC_StringToOID(SECItem *to, const char *from, PRUint32 len)
if (!from || !to) {
PORT_SetError(SEC_ERROR_INVALID_ARGS);
- return SECFailure;
+ return SECFailure;
}
if (!len) {
len = PL_strlen(from);
}
if (len >= 4 && !PL_strncasecmp(from, OIDstring, 4)) {
from += 4; /* skip leading "OID." if present */
- len -= 4;
+ len -= 4;
}
if (!len) {
bad_data:
PORT_SetError(SEC_ERROR_BAD_DATA);
- return SECFailure;
+ return SECFailure;
}
do {
- PRUint32 decimal = 0;
+ PRUint32 decimal = 0;
while (len > 0 && rtl::isAsciiDigit(static_cast<unsigned char>(*from))) {
- PRUint32 addend = *from++ - '0';
- --len;
- if (decimal > max_decimal) /* overflow */
- goto bad_data;
- decimal = (decimal * 10) + addend;
- if (decimal < addend) /* overflow */
- goto bad_data;
- }
- if (len != 0 && *from != '.') {
- goto bad_data;
- }
- if (decimal_numbers == 0) {
- if (decimal > 2)
- goto bad_data;
- result[0] = decimal * 40;
- result_bytes = 1;
- } else if (decimal_numbers == 1) {
- if (decimal > 40)
- goto bad_data;
- result[0] += decimal;
- } else {
- /* encode the decimal number, */
- PRUint8 * rp;
- PRUint32 num_bytes = 0;
- PRUint32 tmp = decimal;
- while (tmp) {
- num_bytes++;
- tmp >>= 7;
+ PRUint32 addend = *from++ - '0';
+ --len;
+ if (decimal > max_decimal) /* overflow */
+ goto bad_data;
+ decimal = (decimal * 10) + addend;
+ if (decimal < addend) /* overflow */
+ goto bad_data;
}
- if (!num_bytes )
- ++num_bytes; /* use one byte for a zero value */
- if (num_bytes + result_bytes > sizeof result)
+ if (len != 0 && *from != '.') {
goto bad_data;
- tmp = num_bytes;
- rp = result + result_bytes - 1;
- rp[tmp] = static_cast<PRUint8>(decimal & 0x7f);
- decimal >>= 7;
- while (--tmp > 0) {
- rp[tmp] = static_cast<PRUint8>(decimal | 0x80);
- decimal >>= 7;
}
- result_bytes += num_bytes;
- }
- ++decimal_numbers;
- if (len > 0) { /* skip trailing '.' */
- ++from;
- --len;
- }
+ if (decimal_numbers == 0) {
+ if (decimal > 2)
+ goto bad_data;
+ result[0] = decimal * 40;
+ result_bytes = 1;
+ } else if (decimal_numbers == 1) {
+ if (decimal > 40)
+ goto bad_data;
+ result[0] += decimal;
+ } else {
+ /* encode the decimal number, */
+ PRUint8 * rp;
+ PRUint32 num_bytes = 0;
+ PRUint32 tmp = decimal;
+ while (tmp) {
+ num_bytes++;
+ tmp >>= 7;
+ }
+ if (!num_bytes )
+ ++num_bytes; /* use one byte for a zero value */
+ if (num_bytes + result_bytes > sizeof result)
+ goto bad_data;
+ tmp = num_bytes;
+ rp = result + result_bytes - 1;
+ rp[tmp] = static_cast<PRUint8>(decimal & 0x7f);
+ decimal >>= 7;
+ while (--tmp > 0) {
+ rp[tmp] = static_cast<PRUint8>(decimal | 0x80);
+ decimal >>= 7;
+ }
+ result_bytes += num_bytes;
+ }
+ ++decimal_numbers;
+ if (len > 0) { /* skip trailing '.' */
+ ++from;
+ --len;
+ }
} while (len > 0);
/* now result contains result_bytes of data */
if (to->data && to->len >= result_bytes) {
@@ -479,9 +479,9 @@ bad_data:
rv = SECSuccess;
} else {
SECItem result_item = {siBuffer, nullptr, 0 };
- result_item.data = result;
- result_item.len = result_bytes;
- rv = SECITEM_CopyItem(nullptr, to, &result_item);
+ result_item.data = result;
+ result_item.len = result_bytes;
+ rv = SECITEM_CopyItem(nullptr, to, &result_item);
}
return rv;
}
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index 1c4de783df95..f928c278500b 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -123,7 +123,7 @@ bool FSStorage::MakeFolderNoUI( const OUString& rFolder )
::ucbhelper::Content aParent;
::ucbhelper::Content aResultContent;
- if ( ::ucbhelper::Content::create( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
+ if ( ::ucbhelper::Content::create( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
uno::Reference< ucb::XCommandEnvironment >(),
comphelper::getProcessComponentContext(),
aParent ) )
@@ -319,7 +319,7 @@ void SAL_CALL FSStorage::copyToStorage( const uno::Reference< embed::XStorage >&
}
catch( uno::Exception& )
{
- uno::Any aCaught( ::cppu::getCaughtException() );
+ uno::Any aCaught( ::cppu::getCaughtException() );
throw embed::StorageWrappedTargetException("Can't copy raw stream",
uno::Reference< io::XInputStream >(),
aCaught );
@@ -412,7 +412,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement(
}
catch( uno::Exception& )
{
- uno::Any aCaught( ::cppu::getCaughtException() );
+ uno::Any aCaught( ::cppu::getCaughtException() );
throw embed::StorageWrappedTargetException("Can't copy raw stream",
uno::Reference< io::XInputStream >(),
aCaught );
@@ -502,7 +502,7 @@ uno::Reference< embed::XStorage > SAL_CALL FSStorage::openStorageElement(
}
catch( uno::Exception& )
{
- uno::Any aCaught( ::cppu::getCaughtException() );
+ uno::Any aCaught( ::cppu::getCaughtException() );
throw embed::StorageWrappedTargetException("Can't copy raw stream",
uno::Reference< io::XInputStream >(),
aCaught );
@@ -565,7 +565,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::cloneStreamElement( const OUSt
}
catch( uno::Exception& )
{
- uno::Any aCaught( ::cppu::getCaughtException() );
+ uno::Any aCaught( ::cppu::getCaughtException() );
throw embed::StorageWrappedTargetException("Can't copy raw stream",
uno::Reference< io::XInputStream >(),
aCaught );
@@ -703,7 +703,7 @@ void SAL_CALL FSStorage::renameElement( const OUString& aElementName, const OUSt
}
catch( uno::Exception& )
{
- uno::Any aCaught( ::cppu::getCaughtException() );
+ uno::Any aCaught( ::cppu::getCaughtException() );
throw embed::StorageWrappedTargetException("Can't copy raw stream",
uno::Reference< io::XInputStream >(),
aCaught );
@@ -777,7 +777,7 @@ void SAL_CALL FSStorage::copyElementTo( const OUString& aElementName,
}
catch( uno::Exception& )
{
- uno::Any aCaught( ::cppu::getCaughtException() );
+ uno::Any aCaught( ::cppu::getCaughtException() );
throw embed::StorageWrappedTargetException("Can't copy raw stream",
uno::Reference< io::XInputStream >(),
aCaught );
@@ -1199,7 +1199,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl
}
catch( uno::Exception& )
{
- uno::Any aCaught( ::cppu::getCaughtException() );
+ uno::Any aCaught( ::cppu::getCaughtException() );
throw embed::StorageWrappedTargetException("Can't copy raw stream",
uno::Reference< io::XInputStream >(),
aCaught );
diff --git a/svl/source/items/globalnameitem.cxx b/svl/source/items/globalnameitem.cxx
index 46b3972e283b..74b9e1f580cb 100644
--- a/svl/source/items/globalnameitem.cxx
+++ b/svl/source/items/globalnameitem.cxx
@@ -84,7 +84,7 @@ bool SfxGlobalNameItem::PutValue( const css::uno::Any& rVal, sal_uInt8 )
// virtual
bool SfxGlobalNameItem::QueryValue( css::uno::Any& rVal, sal_uInt8 ) const
{
- css::uno::Sequence< sal_Int8 > aSeq( 16 );
+ css::uno::Sequence< sal_Int8 > aSeq( 16 );
void const * pData = &m_aName.GetCLSID();
memcpy( aSeq.getArray(), pData, 16 );
rVal <<= aSeq;
diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx
index 945ecc1aeded..d8995e6b0a8f 100644
--- a/svl/source/items/srchitem.cxx
+++ b/svl/source/items/srchitem.cxx
@@ -648,7 +648,7 @@ bool SvxSearchItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId )
bRet = (rVal >>= nInt);
if (bRet)
m_aSearchOpt.transliterateFlags = static_cast<TransliterationFlags>(nInt);
- break;
+ break;
}
case MID_SEARCH_LOCALE:
{
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index c4c9cadef9b1..a563e5a00cbf 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -400,8 +400,8 @@ SfxStyleSheetIterator::SfxStyleSheetIterator(SfxStyleSheetBasePool *pBase,
pBasePool=pBase;
nSearchFamily=eFam;
bSearchUsed=false;
- if( (( n & SfxStyleSearchBits::AllVisible ) != SfxStyleSearchBits::AllVisible )
- && ((n & SfxStyleSearchBits::Used) == SfxStyleSearchBits::Used))
+ if( (( n & SfxStyleSearchBits::AllVisible ) != SfxStyleSearchBits::AllVisible )
+ && ((n & SfxStyleSearchBits::Used) == SfxStyleSearchBits::Used))
{
bSearchUsed = true;
n &= ~SfxStyleSearchBits::Used;