diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-11-08 11:28:04 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-11-08 15:35:18 +0100 |
commit | b536e10390c171e96b6477c04d66023a1da543c4 (patch) | |
tree | 4c04275831cea51f0a343d00e382f519a08bcd90 /sc/qa/extras/sctableconditionalentryobj.cxx | |
parent | 958c09acc1058a4a0eba28ac94f2883fff64d600 (diff) |
Retrofit "KeepEmptyLinesAtTheStartOfBlocks: false" into .clang-format
...even if that can cause reformatting of already formatted code. The problem I
came across is that without this something like
> namespace {
>
> void f1();
>
> void f2();
>
> }
(which is quite a common style in the current code base) would be changed to
> namespace
> {
>
> void f1();
>
> void f2();
> }
instead of
> namespace
> {
> void f1();
>
> void f2();
> }
and I found no other clang-format style option that would result in the
presence or absence of an empty line be identical at the start and end of the
namespace block.
vmiklos asked to reformat the existing new (i.e., non-blacklisted) files at the
same time, so this commit includes that. Some of those new files had not been
formatted at all, so this commit includes their full reformatting changes.
Change-Id: I54daf0c11098d07d02c802104cf7f56372e61f7c
Reviewed-on: https://gerrit.libreoffice.org/44450
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc/qa/extras/sctableconditionalentryobj.cxx')
-rw-r--r-- | sc/qa/extras/sctableconditionalentryobj.cxx | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/sc/qa/extras/sctableconditionalentryobj.cxx b/sc/qa/extras/sctableconditionalentryobj.cxx index 4895d03dc9e1..ad39a74ef20e 100644 --- a/sc/qa/extras/sctableconditionalentryobj.cxx +++ b/sc/qa/extras/sctableconditionalentryobj.cxx @@ -33,8 +33,8 @@ using namespace css; using namespace css::uno; using namespace com::sun::star; -namespace sc_apitest { - +namespace sc_apitest +{ #define NUMBER_OF_TESTS 5 class ScTableConditionalEntryObj : public CalcUnoApiTest, @@ -44,7 +44,7 @@ class ScTableConditionalEntryObj : public CalcUnoApiTest, public: ScTableConditionalEntryObj(); - virtual uno::Reference< uno::XInterface > init() override; + virtual uno::Reference<uno::XInterface> init() override; virtual void setUp() override; virtual void tearDown() override; @@ -63,39 +63,39 @@ public: private: static sal_Int32 nTest; - static uno::Reference< lang::XComponent > mxComponent; - + static uno::Reference<lang::XComponent> mxComponent; }; sal_Int32 ScTableConditionalEntryObj::nTest = 0; -uno::Reference< lang::XComponent > ScTableConditionalEntryObj::mxComponent; +uno::Reference<lang::XComponent> ScTableConditionalEntryObj::mxComponent; ScTableConditionalEntryObj::ScTableConditionalEntryObj() : CalcUnoApiTest("/sc/qa/extras/testdocuments") { } -uno::Reference< uno::XInterface > ScTableConditionalEntryObj::init() +uno::Reference<uno::XInterface> ScTableConditionalEntryObj::init() { // create a calc document if (!mxComponent.is()) mxComponent = loadFromDesktop("private:factory/scalc"); - uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, uno::UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW); CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is()); - uno::Reference< container::XIndexAccess > xIndex(xDoc->getSheets(), uno::UNO_QUERY_THROW); - uno::Reference< sheet::XSpreadsheet > xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW); + uno::Reference<container::XIndexAccess> xIndex(xDoc->getSheets(), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheet> xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW); xSheet->getCellByPosition(5, 5)->setValue(15); xSheet->getCellByPosition(1, 4)->setValue(10); xSheet->getCellByPosition(2, 0)->setValue(-5.15); - uno::Reference< beans::XPropertySet > xPropSet(xSheet, uno::UNO_QUERY_THROW); - uno::Reference< sheet::XSheetConditionalEntries > xSheetConditionalEntries; - xSheetConditionalEntries.set(xPropSet->getPropertyValue(SC_UNONAME_CONDFMT), uno::UNO_QUERY_THROW); + uno::Reference<beans::XPropertySet> xPropSet(xSheet, uno::UNO_QUERY_THROW); + uno::Reference<sheet::XSheetConditionalEntries> xSheetConditionalEntries; + xSheetConditionalEntries.set(xPropSet->getPropertyValue(SC_UNONAME_CONDFMT), + uno::UNO_QUERY_THROW); - uno::Sequence< beans::PropertyValue > aPropValue(5); + uno::Sequence<beans::PropertyValue> aPropValue(5); aPropValue[0].Name = SC_UNONAME_STYLENAME; aPropValue[0].Value <<= OUString("Result2"); aPropValue[1].Name = SC_UNONAME_FORMULA1; @@ -108,7 +108,8 @@ uno::Reference< uno::XInterface > ScTableConditionalEntryObj::init() aPropValue[4].Value <<= table::CellAddress(0, 1, 5); xSheetConditionalEntries->addNew(aPropValue); - uno::Reference< sheet::XSheetConditionalEntry > xSheetConditionalEntry(xSheetConditionalEntries->getByIndex(0), uno::UNO_QUERY_THROW); + uno::Reference<sheet::XSheetConditionalEntry> xSheetConditionalEntry( + xSheetConditionalEntries->getByIndex(0), uno::UNO_QUERY_THROW); return xSheetConditionalEntry; } |