tdf#123936 Formatting files in module comphelper with clang-format
Change-Id: I01cf258f8fedb4d98f64d2a18735764463f1b2af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105653 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
This commit is contained in:
committed by
Christian Lohmaier
parent
79368f8102
commit
d66683f86a
@@ -30,12 +30,11 @@
|
|||||||
|
|
||||||
using namespace css;
|
using namespace css;
|
||||||
|
|
||||||
namespace {
|
namespace
|
||||||
|
{
|
||||||
class Base64Test : public CppUnit::TestFixture
|
class Base64Test : public CppUnit::TestFixture
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void testBase64Encode();
|
void testBase64Encode();
|
||||||
void testBase64Decode();
|
void testBase64Decode();
|
||||||
void testBase64EncodeForOStringBuffer();
|
void testBase64EncodeForOStringBuffer();
|
||||||
@@ -73,15 +72,18 @@ void Base64Test::testBase64Decode()
|
|||||||
|
|
||||||
uno::Sequence<sal_Int8> expectedSequence = { 0, 0, 0, 0, 0, 1, 2, 3 };
|
uno::Sequence<sal_Int8> expectedSequence = { 0, 0, 0, 0, 0, 1, 2, 3 };
|
||||||
comphelper::Base64::decode(decodedSequence, "AAAAAAABAgM=");
|
comphelper::Base64::decode(decodedSequence, "AAAAAAABAgM=");
|
||||||
CPPUNIT_ASSERT(std::equal(expectedSequence.begin(), expectedSequence.end(), decodedSequence.begin()));
|
CPPUNIT_ASSERT(
|
||||||
|
std::equal(expectedSequence.begin(), expectedSequence.end(), decodedSequence.begin()));
|
||||||
|
|
||||||
expectedSequence = { 5, 2, 3, 0, 0, 1, 2, 3 };
|
expectedSequence = { 5, 2, 3, 0, 0, 1, 2, 3 };
|
||||||
comphelper::Base64::decode(decodedSequence, "BQIDAAABAgM=");
|
comphelper::Base64::decode(decodedSequence, "BQIDAAABAgM=");
|
||||||
CPPUNIT_ASSERT(std::equal(expectedSequence.begin(), expectedSequence.end(), decodedSequence.begin()));
|
CPPUNIT_ASSERT(
|
||||||
|
std::equal(expectedSequence.begin(), expectedSequence.end(), decodedSequence.begin()));
|
||||||
|
|
||||||
expectedSequence = { sal_Int8(sal_uInt8(200)), 31, 77, 111, 0, 1, 2, 3 };
|
expectedSequence = { sal_Int8(sal_uInt8(200)), 31, 77, 111, 0, 1, 2, 3 };
|
||||||
comphelper::Base64::decode(decodedSequence, "yB9NbwABAgM=");
|
comphelper::Base64::decode(decodedSequence, "yB9NbwABAgM=");
|
||||||
CPPUNIT_ASSERT(std::equal(expectedSequence.begin(), expectedSequence.end(), decodedSequence.begin()));
|
CPPUNIT_ASSERT(
|
||||||
|
std::equal(expectedSequence.begin(), expectedSequence.end(), decodedSequence.begin()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Base64Test::testBase64EncodeForOStringBuffer()
|
void Base64Test::testBase64EncodeForOStringBuffer()
|
||||||
@@ -105,7 +107,6 @@ void Base64Test::testBase64EncodeForOStringBuffer()
|
|||||||
}
|
}
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE_REGISTRATION(Base64Test);
|
CPPUNIT_TEST_SUITE_REGISTRATION(Base64Test);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -26,11 +26,13 @@
|
|||||||
#include <cppunit/extensions/HelperMacros.h>
|
#include <cppunit/extensions/HelperMacros.h>
|
||||||
#include <cppunit/plugin/TestPlugIn.h>
|
#include <cppunit/plugin/TestPlugIn.h>
|
||||||
|
|
||||||
namespace {
|
namespace
|
||||||
|
{
|
||||||
class Test: public CppUnit::TestFixture {
|
class Test : public CppUnit::TestFixture
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
void test() {
|
void test()
|
||||||
|
{
|
||||||
css::uno::Reference<css::uno::XInterface> ref1(new cppu::OWeakObject);
|
css::uno::Reference<css::uno::XInterface> ref1(new cppu::OWeakObject);
|
||||||
css::uno::Reference<css::uno::XInterface> ref2(new cppu::OWeakObject);
|
css::uno::Reference<css::uno::XInterface> ref2(new cppu::OWeakObject);
|
||||||
css::uno::Reference<css::uno::XInterface> ref3(new cppu::OWeakObject);
|
css::uno::Reference<css::uno::XInterface> ref3(new cppu::OWeakObject);
|
||||||
@@ -54,7 +56,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
|
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -22,8 +22,6 @@
|
|||||||
#include <comphelper/fileurl.hxx>
|
#include <comphelper/fileurl.hxx>
|
||||||
#include <rtl/ustring.hxx>
|
#include <rtl/ustring.hxx>
|
||||||
|
|
||||||
bool comphelper::isFileUrl(OUString const & url) {
|
bool comphelper::isFileUrl(OUString const& url) { return url.startsWithIgnoreAsciiCase("file:"); }
|
||||||
return url.startsWithIgnoreAsciiCase("file:");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -27,7 +27,6 @@
|
|||||||
|
|
||||||
namespace comphelper::rng
|
namespace comphelper::rng
|
||||||
{
|
{
|
||||||
|
|
||||||
// underlying random number generator
|
// underlying random number generator
|
||||||
// std::mt19937 implements the Mersenne twister algorithm which
|
// std::mt19937 implements the Mersenne twister algorithm which
|
||||||
// is fast and has good statistical properties, it produces integers
|
// is fast and has good statistical properties, it produces integers
|
||||||
@@ -36,8 +35,8 @@ namespace comphelper::rng
|
|||||||
// http://en.wikipedia.org/wiki/Mersenne_twister
|
// http://en.wikipedia.org/wiki/Mersenne_twister
|
||||||
#define STD_RNG_ALGO std::mt19937
|
#define STD_RNG_ALGO std::mt19937
|
||||||
|
|
||||||
namespace {
|
namespace
|
||||||
|
{
|
||||||
struct RandomNumberGenerator
|
struct RandomNumberGenerator
|
||||||
{
|
{
|
||||||
std::mutex mutex;
|
std::mutex mutex;
|
||||||
@@ -75,8 +74,9 @@ struct RandomNumberGenerator
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class theRandomNumberGenerator : public rtl::Static<RandomNumberGenerator, theRandomNumberGenerator> {};
|
class theRandomNumberGenerator : public rtl::Static<RandomNumberGenerator, theRandomNumberGenerator>
|
||||||
|
{
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// uniform ints [a,b] distribution
|
// uniform ints [a,b] distribution
|
||||||
|
@@ -16,8 +16,8 @@
|
|||||||
#include <com/sun/star/ucb/InteractiveNetworkException.hpp>
|
#include <com/sun/star/ucb/InteractiveNetworkException.hpp>
|
||||||
#include <com/sun/star/ucb/UnsupportedDataSinkException.hpp>
|
#include <com/sun/star/ucb/UnsupportedDataSinkException.hpp>
|
||||||
|
|
||||||
namespace comphelper {
|
namespace comphelper
|
||||||
|
{
|
||||||
/// Will handle com::sun::star::ucb::InteractiveIOException and derived classes
|
/// Will handle com::sun::star::ucb::InteractiveIOException and derived classes
|
||||||
const sal_Int32 HANDLE_INTERACTIVEIOEXCEPTION = 0;
|
const sal_Int32 HANDLE_INTERACTIVEIOEXCEPTION = 0;
|
||||||
/// Will handle com::sun::star::ucb::UnsupportedDataSinkException
|
/// Will handle com::sun::star::ucb::UnsupportedDataSinkException
|
||||||
@@ -69,9 +69,7 @@ SimpleFileAccessInteraction::SimpleFileAccessInteraction(
|
|||||||
setInterceptions(lInterceptions);
|
setInterceptions(lInterceptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleFileAccessInteraction::~SimpleFileAccessInteraction()
|
SimpleFileAccessInteraction::~SimpleFileAccessInteraction() {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ucbhelper::InterceptedInteraction::EInterceptionState SimpleFileAccessInteraction::intercepted(
|
ucbhelper::InterceptedInteraction::EInterceptionState SimpleFileAccessInteraction::intercepted(
|
||||||
const ::ucbhelper::InterceptedInteraction::InterceptedRequest& aRequest,
|
const ::ucbhelper::InterceptedInteraction::InterceptedRequest& aRequest,
|
||||||
@@ -119,10 +117,9 @@ ucbhelper::InterceptedInteraction::EInterceptionState SimpleFileAccessInteractio
|
|||||||
// any selection...
|
// any selection...
|
||||||
if (bAbort)
|
if (bAbort)
|
||||||
{
|
{
|
||||||
css::uno::Reference< css::task::XInteractionContinuation > xAbort =
|
css::uno::Reference<css::task::XInteractionContinuation> xAbort
|
||||||
::ucbhelper::InterceptedInteraction::extractContinuation(
|
= ::ucbhelper::InterceptedInteraction::extractContinuation(
|
||||||
xRequest->getContinuations(),
|
xRequest->getContinuations(), cppu::UnoType<css::task::XInteractionAbort>::get());
|
||||||
cppu::UnoType<css::task::XInteractionAbort>::get() );
|
|
||||||
if (!xAbort.is())
|
if (!xAbort.is())
|
||||||
return ::ucbhelper::InterceptedInteraction::E_NO_CONTINUATION_FOUND;
|
return ::ucbhelper::InterceptedInteraction::E_NO_CONTINUATION_FOUND;
|
||||||
return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED;
|
return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED;
|
||||||
|
@@ -27,11 +27,8 @@
|
|||||||
#include <typelib/typedescription.hxx>
|
#include <typelib/typedescription.hxx>
|
||||||
#include <sal/log.hxx>
|
#include <sal/log.hxx>
|
||||||
|
|
||||||
|
|
||||||
namespace comphelper
|
namespace comphelper
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
using namespace ::com::sun::star::uno;
|
using namespace ::com::sun::star::uno;
|
||||||
using namespace ::com::sun::star::awt;
|
using namespace ::com::sun::star::awt;
|
||||||
using namespace ::com::sun::star::lang;
|
using namespace ::com::sun::star::lang;
|
||||||
@@ -44,7 +41,6 @@ sal_Int64 getINT64(const Any& _rAny)
|
|||||||
return nReturn;
|
return nReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sal_Int32 getINT32(const Any& _rAny)
|
sal_Int32 getINT32(const Any& _rAny)
|
||||||
{
|
{
|
||||||
sal_Int32 nReturn = 0;
|
sal_Int32 nReturn = 0;
|
||||||
@@ -53,7 +49,6 @@ sal_Int32 getINT32(const Any& _rAny)
|
|||||||
return nReturn;
|
return nReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sal_Int16 getINT16(const Any& _rAny)
|
sal_Int16 getINT16(const Any& _rAny)
|
||||||
{
|
{
|
||||||
sal_Int16 nReturn = 0;
|
sal_Int16 nReturn = 0;
|
||||||
@@ -62,7 +57,6 @@ sal_Int16 getINT16(const Any& _rAny)
|
|||||||
return nReturn;
|
return nReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double getDouble(const Any& _rAny)
|
double getDouble(const Any& _rAny)
|
||||||
{
|
{
|
||||||
double nReturn = 0.0;
|
double nReturn = 0.0;
|
||||||
@@ -71,7 +65,6 @@ double getDouble(const Any& _rAny)
|
|||||||
return nReturn;
|
return nReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
float getFloat(const Any& _rAny)
|
float getFloat(const Any& _rAny)
|
||||||
{
|
{
|
||||||
float nReturn = 0.0;
|
float nReturn = 0.0;
|
||||||
@@ -80,7 +73,6 @@ float getFloat(const Any& _rAny)
|
|||||||
return nReturn;
|
return nReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
OUString getString(const Any& _rAny)
|
OUString getString(const Any& _rAny)
|
||||||
{
|
{
|
||||||
OUString nReturn;
|
OUString nReturn;
|
||||||
@@ -89,7 +81,6 @@ OUString getString(const Any& _rAny)
|
|||||||
return nReturn;
|
return nReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool getBOOL(const Any& _rAny)
|
bool getBOOL(const Any& _rAny)
|
||||||
{
|
{
|
||||||
bool bReturn = false;
|
bool bReturn = false;
|
||||||
@@ -100,7 +91,6 @@ bool getBOOL(const Any& _rAny)
|
|||||||
return bReturn;
|
return bReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sal_Int32 getEnumAsINT32(const Any& _rAny)
|
sal_Int32 getEnumAsINT32(const Any& _rAny)
|
||||||
{
|
{
|
||||||
sal_Int32 nReturn = 0;
|
sal_Int32 nReturn = 0;
|
||||||
@@ -109,7 +99,6 @@ sal_Int32 getEnumAsINT32(const Any& _rAny)
|
|||||||
return nReturn;
|
return nReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FontDescriptor getDefaultFont()
|
FontDescriptor getDefaultFont()
|
||||||
{
|
{
|
||||||
FontDescriptor aReturn;
|
FontDescriptor aReturn;
|
||||||
@@ -119,7 +108,6 @@ FontDescriptor getDefaultFont()
|
|||||||
return aReturn;
|
return aReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool isAssignableFrom(const Type& _rAssignable, const Type& _rFrom)
|
bool isAssignableFrom(const Type& _rAssignable, const Type& _rFrom)
|
||||||
{
|
{
|
||||||
// get the type lib descriptions
|
// get the type lib descriptions
|
||||||
@@ -142,8 +130,8 @@ Type getSequenceElementType(const Type& _rSequenceType)
|
|||||||
return Type();
|
return Type();
|
||||||
|
|
||||||
TypeDescription aTD(_rSequenceType);
|
TypeDescription aTD(_rSequenceType);
|
||||||
typelib_IndirectTypeDescription* pSequenceTD =
|
typelib_IndirectTypeDescription* pSequenceTD
|
||||||
reinterpret_cast< typelib_IndirectTypeDescription* >(aTD.get());
|
= reinterpret_cast<typelib_IndirectTypeDescription*>(aTD.get());
|
||||||
|
|
||||||
OSL_ASSERT(pSequenceTD && pSequenceTD->pType);
|
OSL_ASSERT(pSequenceTD && pSequenceTD->pType);
|
||||||
if (pSequenceTD && pSequenceTD->pType)
|
if (pSequenceTD && pSequenceTD->pType)
|
||||||
@@ -154,5 +142,4 @@ Type getSequenceElementType(const Type& _rSequenceType)
|
|||||||
|
|
||||||
} // namespace comphelper
|
} // namespace comphelper
|
||||||
|
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -1460,11 +1460,9 @@ codemaker/source/javamaker/javatype.hxx
|
|||||||
comphelper/qa/container/comphelper_ifcontainer.cxx
|
comphelper/qa/container/comphelper_ifcontainer.cxx
|
||||||
comphelper/qa/container/testifcontainer.cxx
|
comphelper/qa/container/testifcontainer.cxx
|
||||||
comphelper/qa/string/test_string.cxx
|
comphelper/qa/string/test_string.cxx
|
||||||
comphelper/qa/unit/base64_test.cxx
|
|
||||||
comphelper/qa/unit/syntaxhighlighttest.cxx
|
comphelper/qa/unit/syntaxhighlighttest.cxx
|
||||||
comphelper/qa/unit/test_hash.cxx
|
comphelper/qa/unit/test_hash.cxx
|
||||||
comphelper/qa/unit/variadictemplates.cxx
|
comphelper/qa/unit/variadictemplates.cxx
|
||||||
comphelper/qa/weakbag/test_weakbag.cxx
|
|
||||||
comphelper/source/compare/AnyCompareFactory.cxx
|
comphelper/source/compare/AnyCompareFactory.cxx
|
||||||
comphelper/source/container/IndexedPropertyValuesContainer.cxx
|
comphelper/source/container/IndexedPropertyValuesContainer.cxx
|
||||||
comphelper/source/container/NamedPropertyValuesContainer.cxx
|
comphelper/source/container/NamedPropertyValuesContainer.cxx
|
||||||
@@ -1499,7 +1497,6 @@ comphelper/source/misc/docpasswordrequest.cxx
|
|||||||
comphelper/source/misc/documentinfo.cxx
|
comphelper/source/misc/documentinfo.cxx
|
||||||
comphelper/source/misc/evtlistenerhlp.cxx
|
comphelper/source/misc/evtlistenerhlp.cxx
|
||||||
comphelper/source/misc/evtmethodhelper.cxx
|
comphelper/source/misc/evtmethodhelper.cxx
|
||||||
comphelper/source/misc/fileurl.cxx
|
|
||||||
comphelper/source/misc/getexpandeduri.cxx
|
comphelper/source/misc/getexpandeduri.cxx
|
||||||
comphelper/source/misc/hash.cxx
|
comphelper/source/misc/hash.cxx
|
||||||
comphelper/source/misc/instancelocker.cxx
|
comphelper/source/misc/instancelocker.cxx
|
||||||
@@ -1516,11 +1513,9 @@ comphelper/source/misc/officerestartmanager.cxx
|
|||||||
comphelper/source/misc/officerestartmanager.hxx
|
comphelper/source/misc/officerestartmanager.hxx
|
||||||
comphelper/source/misc/profilezone.cxx
|
comphelper/source/misc/profilezone.cxx
|
||||||
comphelper/source/misc/proxyaggregation.cxx
|
comphelper/source/misc/proxyaggregation.cxx
|
||||||
comphelper/source/misc/random.cxx
|
|
||||||
comphelper/source/misc/sequenceashashmap.cxx
|
comphelper/source/misc/sequenceashashmap.cxx
|
||||||
comphelper/source/misc/servicedecl.cxx
|
comphelper/source/misc/servicedecl.cxx
|
||||||
comphelper/source/misc/sharedmutex.cxx
|
comphelper/source/misc/sharedmutex.cxx
|
||||||
comphelper/source/misc/simplefileaccessinteraction.cxx
|
|
||||||
comphelper/source/misc/solarmutex.cxx
|
comphelper/source/misc/solarmutex.cxx
|
||||||
comphelper/source/misc/stillreadwriteinteraction.cxx
|
comphelper/source/misc/stillreadwriteinteraction.cxx
|
||||||
comphelper/source/misc/storagehelper.cxx
|
comphelper/source/misc/storagehelper.cxx
|
||||||
@@ -1528,7 +1523,6 @@ comphelper/source/misc/string.cxx
|
|||||||
comphelper/source/misc/synchronousdispatch.cxx
|
comphelper/source/misc/synchronousdispatch.cxx
|
||||||
comphelper/source/misc/syntaxhighlight.cxx
|
comphelper/source/misc/syntaxhighlight.cxx
|
||||||
comphelper/source/misc/threadpool.cxx
|
comphelper/source/misc/threadpool.cxx
|
||||||
comphelper/source/misc/types.cxx
|
|
||||||
comphelper/source/misc/weak.cxx
|
comphelper/source/misc/weak.cxx
|
||||||
comphelper/source/misc/weakeventlistener.cxx
|
comphelper/source/misc/weakeventlistener.cxx
|
||||||
comphelper/source/misc/xmlsechelper.cxx
|
comphelper/source/misc/xmlsechelper.cxx
|
||||||
|
Reference in New Issue
Block a user