summaryrefslogtreecommitdiff
path: root/test/source/sheet
diff options
context:
space:
mode:
authorPhilipp Hofer <philipp.hofer@protonmail.com>2020-11-12 13:22:23 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-11-18 12:04:26 +0100
commitf5e3b2e83ab463064f100a9cd93f09cadaae2292 (patch)
treeb3e543959112187befbf3e320d7563fb9d382be1 /test/source/sheet
parent831148376eed244292638d57099ab92fe4bdffbe (diff)
tdf#123936 Formatting files in module test with clang-format
Change-Id: I8b2cc4917564626432ce0219e24f253a534ce8e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105719 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'test/source/sheet')
-rw-r--r--test/source/sheet/cellproperties.cxx9
-rw-r--r--test/source/sheet/databaserange.cxx45
-rw-r--r--test/source/sheet/datapilotitem.cxx10
-rw-r--r--test/source/sheet/xcelladdressable.cxx7
-rw-r--r--test/source/sheet/xcellrangereferrer.cxx10
-rw-r--r--test/source/sheet/xdatabaserange.cxx71
-rw-r--r--test/source/sheet/xdatapilottable.cxx18
-rw-r--r--test/source/sheet/xgoalseek.cxx13
-rw-r--r--test/source/sheet/xsheetoperation.cxx15
-rw-r--r--test/source/sheet/xspreadsheetdocument.cxx13
-rw-r--r--test/source/sheet/xsubtotaldescriptor.cxx11
-rw-r--r--test/source/sheet/xviewfreezable.cxx9
-rw-r--r--test/source/sheet/xviewpane.cxx11
13 files changed, 111 insertions, 131 deletions
diff --git a/test/source/sheet/cellproperties.cxx b/test/source/sheet/cellproperties.cxx
index 8650eaa85ef9..3d7908be78b2 100644
--- a/test/source/sheet/cellproperties.cxx
+++ b/test/source/sheet/cellproperties.cxx
@@ -17,11 +17,11 @@
using namespace css;
using namespace css::uno;
-namespace apitest {
-
+namespace apitest
+{
void CellProperties::testVertJustify()
{
- uno::Reference< beans::XPropertySet > xCellRangeBase(init(),UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xCellRangeBase(init(), UNO_QUERY_THROW);
OUString aVertJustify("VertJustify");
uno::Any aOldVertJustify = xCellRangeBase->getPropertyValue(aVertJustify);
sal_Int32 aValue = 0;
@@ -39,7 +39,7 @@ void CellProperties::testVertJustify()
void CellProperties::testRotateReference()
{
- uno::Reference< beans::XPropertySet > xCellRangeBase(init(),UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xCellRangeBase(init(), UNO_QUERY_THROW);
OUString aRotateReference("RotateReference");
uno::Any aOldRotateReference = xCellRangeBase->getPropertyValue(aRotateReference);
sal_Int32 aValue = 0;
@@ -54,7 +54,6 @@ void CellProperties::testRotateReference()
std::cout << "New RotateReference value: " << aValue << std::endl;
CPPUNIT_ASSERT_EQUAL_MESSAGE("value has not been changed", sal_Int32(3), aValue);
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/sheet/databaserange.cxx b/test/source/sheet/databaserange.cxx
index 7079c8ffa311..302d88bc6b50 100644
--- a/test/source/sheet/databaserange.cxx
+++ b/test/source/sheet/databaserange.cxx
@@ -20,11 +20,11 @@
using namespace com::sun::star;
using namespace com::sun::star::uno;
-namespace apitest {
-
+namespace apitest
+{
void DatabaseRange::testMoveCells()
{
- uno::Reference< beans::XPropertySet > xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
const OUString propName("MoveCells");
@@ -41,7 +41,7 @@ void DatabaseRange::testMoveCells()
void DatabaseRange::testKeepFormats()
{
- uno::Reference< beans::XPropertySet > xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
const OUString propName("KeepFormats");
@@ -58,7 +58,7 @@ void DatabaseRange::testKeepFormats()
void DatabaseRange::testStripData()
{
- uno::Reference< beans::XPropertySet > xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
const OUString propName("StripData");
@@ -75,7 +75,7 @@ void DatabaseRange::testStripData()
void DatabaseRange::testAutoFilter()
{
- uno::Reference< beans::XPropertySet > xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
const OUString propName("AutoFilter");
@@ -92,60 +92,64 @@ void DatabaseRange::testAutoFilter()
void DatabaseRange::testUseFilterCriteriaSource()
{
- uno::Reference< beans::XPropertySet > xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
const OUString propName("UseFilterCriteriaSource");
bool bUseFilterCriteriaSource = true;
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= bUseFilterCriteriaSource);
- CPPUNIT_ASSERT_MESSAGE("Default UseFilterCriteriaSource already changed", !bUseFilterCriteriaSource);
+ CPPUNIT_ASSERT_MESSAGE("Default UseFilterCriteriaSource already changed",
+ !bUseFilterCriteriaSource);
uno::Any aNewUseFilterCriteriaSource;
aNewUseFilterCriteriaSource <<= true;
xDatabaseRange->setPropertyValue(propName, aNewUseFilterCriteriaSource);
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= bUseFilterCriteriaSource);
- CPPUNIT_ASSERT_MESSAGE("Value of UseFilterCriteriaSource wasn't changed", bUseFilterCriteriaSource);
+ CPPUNIT_ASSERT_MESSAGE("Value of UseFilterCriteriaSource wasn't changed",
+ bUseFilterCriteriaSource);
}
void DatabaseRange::testFilterCriteriaSource()
{
- uno::Reference< beans::XPropertySet > xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
const OUString propName("FilterCriteriaSource");
table::CellRangeAddress cellRangeAddress;
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= cellRangeAddress);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Default RefreshPeriod already changed",
- table::CellRangeAddress(0,0,0,0,0), cellRangeAddress);
+ table::CellRangeAddress(0, 0, 0, 0, 0), cellRangeAddress);
uno::Any aFilterCriteriaSource;
- aFilterCriteriaSource <<= table::CellRangeAddress(1,1,1,1,1);
+ aFilterCriteriaSource <<= table::CellRangeAddress(1, 1, 1, 1, 1);
xDatabaseRange->setPropertyValue(propName, aFilterCriteriaSource);
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= cellRangeAddress);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Value of FilterCriteriaSource wasn't changed",
- table::CellRangeAddress(1,1,1,1,1), cellRangeAddress);
+ table::CellRangeAddress(1, 1, 1, 1, 1), cellRangeAddress);
}
void DatabaseRange::testRefreshPeriod()
{
- uno::Reference< beans::XPropertySet > xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
const OUString propName("RefreshPeriod");
sal_Int32 aRefreshPeriod = 1;
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= aRefreshPeriod);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Default RefreshPeriod already changed", sal_Int32(0), aRefreshPeriod);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Default RefreshPeriod already changed", sal_Int32(0),
+ aRefreshPeriod);
uno::Any aNewRefreshPeriod;
aNewRefreshPeriod <<= static_cast<sal_Int32>(42);
xDatabaseRange->setPropertyValue(propName, aNewRefreshPeriod);
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= aRefreshPeriod);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Value of RefreshPeriod wasn't changed", sal_Int32(42), aRefreshPeriod);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Value of RefreshPeriod wasn't changed", sal_Int32(42),
+ aRefreshPeriod);
}
void DatabaseRange::testFromSelection()
{
- uno::Reference< beans::XPropertySet > xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
const OUString propName("FromSelection");
@@ -162,7 +166,7 @@ void DatabaseRange::testFromSelection()
void DatabaseRange::testTokenIndex()
{
- uno::Reference< beans::XPropertySet > xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
const OUString propName("TokenIndex");
@@ -179,7 +183,7 @@ void DatabaseRange::testTokenIndex()
void DatabaseRange::testTotalsRow()
{
- uno::Reference< beans::XPropertySet > xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
const OUString propName("TotalsRow");
@@ -196,7 +200,7 @@ void DatabaseRange::testTotalsRow()
void DatabaseRange::testContainsHeader()
{
- uno::Reference< beans::XPropertySet > xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xDatabaseRange(init("DataArea"), UNO_QUERY_THROW);
const OUString propName("ContainsHeader");
@@ -210,7 +214,6 @@ void DatabaseRange::testContainsHeader()
CPPUNIT_ASSERT(xDatabaseRange->getPropertyValue(propName) >>= bContainsHeader);
CPPUNIT_ASSERT_MESSAGE("Value of ContainsHeader wasn't changed", !bContainsHeader);
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/test/source/sheet/datapilotitem.cxx b/test/source/sheet/datapilotitem.cxx
index ac505afb7ff5..4b2299c0068f 100644
--- a/test/source/sheet/datapilotitem.cxx
+++ b/test/source/sheet/datapilotitem.cxx
@@ -18,12 +18,11 @@
using namespace com::sun::star;
using namespace com::sun::star::uno;
-namespace apitest {
-
+namespace apitest
+{
void DataPilotItem::testProperties()
{
- uno::Reference< beans::XPropertySet > xItem(init(), UNO_QUERY_THROW);
-
+ uno::Reference<beans::XPropertySet> xItem(init(), UNO_QUERY_THROW);
const OUString propNameIS("IsHidden");
@@ -37,7 +36,6 @@ void DataPilotItem::testProperties()
CPPUNIT_ASSERT(xItem->getPropertyValue(propNameIS) >>= bIsHidden);
CPPUNIT_ASSERT_MESSAGE("Value of IsHidden wasn't changed", !bIsHidden);
-
const OUString propNameSD("ShowDetail");
bool bShowDetail = false;
@@ -50,7 +48,6 @@ void DataPilotItem::testProperties()
CPPUNIT_ASSERT(xItem->getPropertyValue(propNameSD) >>= bShowDetail);
CPPUNIT_ASSERT_MESSAGE("Value of ShowDetail wasn't changed", bShowDetail);
-
sal_Int32 nPosition = 42;
CPPUNIT_ASSERT(xItem->getPropertyValue("Position") >>= nPosition);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Default Position already changed", sal_Int32(0), nPosition);
@@ -62,7 +59,6 @@ void DataPilotItem::testProperties()
//CPPUNIT_ASSERT(xItem->getPropertyValue(propNameP) >>= nPosition);
//CPPUNIT_ASSERT_EQUAL_MESSAGE("Value of Position wasn't changed", sal_Int32(42), nPosition);
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/test/source/sheet/xcelladdressable.cxx b/test/source/sheet/xcelladdressable.cxx
index fe70f8877724..e42809170518 100644
--- a/test/source/sheet/xcelladdressable.cxx
+++ b/test/source/sheet/xcelladdressable.cxx
@@ -18,18 +18,17 @@
using namespace com::sun::star;
using namespace com::sun::star::uno;
-namespace apitest {
-
+namespace apitest
+{
void XCellAddressable::testGetCellAddress()
{
- uno::Reference< sheet::XCellAddressable > xCellAddressable(init(), UNO_QUERY_THROW);
+ uno::Reference<sheet::XCellAddressable> xCellAddressable(init(), UNO_QUERY_THROW);
table::CellAddress xCellAddress = xCellAddressable->getCellAddress();
table::CellAddress defaultCellAddress(0, 2, 3);
CPPUNIT_ASSERT_EQUAL_MESSAGE("getCellAddress() didn't returned default cell address",
defaultCellAddress, xCellAddress);
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/sheet/xcellrangereferrer.cxx b/test/source/sheet/xcellrangereferrer.cxx
index e232c565d2b6..575bee05e648 100644
--- a/test/source/sheet/xcellrangereferrer.cxx
+++ b/test/source/sheet/xcellrangereferrer.cxx
@@ -19,14 +19,14 @@
using namespace css;
using namespace css::uno;
-namespace apitest {
-
+namespace apitest
+{
void XCellRangeReferrer::testGetReferredCells()
{
- uno::Reference< sheet::XCellRangeReferrer > xReferrer(init(), UNO_QUERY_THROW);
- uno::Reference< table::XCellRange > xReferredRange = xReferrer->getReferredCells();
+ uno::Reference<sheet::XCellRangeReferrer> xReferrer(init(), UNO_QUERY_THROW);
+ uno::Reference<table::XCellRange> xReferredRange = xReferrer->getReferredCells();
- uno::Reference< sheet::XCellRangeAddressable > xAddressable( xReferredRange, UNO_QUERY_THROW );
+ uno::Reference<sheet::XCellRangeAddressable> xAddressable(xReferredRange, UNO_QUERY_THROW);
table::CellRangeAddress aCellRange = xAddressable->getRangeAddress();
CPPUNIT_ASSERT_EQUAL(aCellRange, getCellRange());
diff --git a/test/source/sheet/xdatabaserange.cxx b/test/source/sheet/xdatabaserange.cxx
index 933425c040d6..2c45ba0fbf0a 100644
--- a/test/source/sheet/xdatabaserange.cxx
+++ b/test/source/sheet/xdatabaserange.cxx
@@ -26,14 +26,14 @@
using namespace css;
using namespace css::uno;
-namespace apitest {
-
+namespace apitest
+{
/**
* tests setDataArea and getDataArea
*/
void XDatabaseRange::testDataArea()
{
- uno::Reference< sheet::XDatabaseRange > xDBRange(init("DataArea"), UNO_QUERY_THROW);
+ uno::Reference<sheet::XDatabaseRange> xDBRange(init("DataArea"), UNO_QUERY_THROW);
table::CellRangeAddress aCellAddress;
aCellAddress.Sheet = 0;
@@ -43,24 +43,24 @@ void XDatabaseRange::testDataArea()
aCellAddress.EndRow = 5;
xDBRange->setDataArea(aCellAddress);
table::CellRangeAddress aValue = xDBRange->getDataArea();
- CPPUNIT_ASSERT_EQUAL( aCellAddress.Sheet, aValue.Sheet );
- CPPUNIT_ASSERT_EQUAL( aCellAddress.StartRow, aValue.StartRow );
- CPPUNIT_ASSERT_EQUAL( aCellAddress.EndRow, aValue.EndRow );
- CPPUNIT_ASSERT_EQUAL( aCellAddress.StartColumn, aValue.StartColumn );
- CPPUNIT_ASSERT_EQUAL( aCellAddress.EndColumn, aValue.EndColumn );
+ CPPUNIT_ASSERT_EQUAL(aCellAddress.Sheet, aValue.Sheet);
+ CPPUNIT_ASSERT_EQUAL(aCellAddress.StartRow, aValue.StartRow);
+ CPPUNIT_ASSERT_EQUAL(aCellAddress.EndRow, aValue.EndRow);
+ CPPUNIT_ASSERT_EQUAL(aCellAddress.StartColumn, aValue.StartColumn);
+ CPPUNIT_ASSERT_EQUAL(aCellAddress.EndColumn, aValue.EndColumn);
}
void XDatabaseRange::testGetSubtotalDescriptor()
{
- uno::Reference< sheet::XDatabaseRange > xDBRange(init("SubtotalDescriptor"), UNO_QUERY_THROW);
- uno::Reference< sheet::XSubTotalDescriptor> xSubtotalDescr = xDBRange->getSubTotalDescriptor();
+ uno::Reference<sheet::XDatabaseRange> xDBRange(init("SubtotalDescriptor"), UNO_QUERY_THROW);
+ uno::Reference<sheet::XSubTotalDescriptor> xSubtotalDescr = xDBRange->getSubTotalDescriptor();
CPPUNIT_ASSERT(xSubtotalDescr.is());
}
void XDatabaseRange::testGetSortDescriptor()
{
- uno::Reference< sheet::XDatabaseRange > xDBRange(init("SortDescriptor"), UNO_QUERY_THROW);
- const uno::Sequence< beans::PropertyValue > xSortDescr = xDBRange->getSortDescriptor();
+ uno::Reference<sheet::XDatabaseRange> xDBRange(init("SortDescriptor"), UNO_QUERY_THROW);
+ const uno::Sequence<beans::PropertyValue> xSortDescr = xDBRange->getSortDescriptor();
for (const beans::PropertyValue& aProp : xSortDescr)
{
//std::cout << "Prop " << i << " Name: " << OUString(aProp.Name) << std::endl;
@@ -82,11 +82,9 @@ void XDatabaseRange::testGetSortDescriptor()
sal_Int32 nMaxFieldCount = 0;
aProp.Value >>= nMaxFieldCount;
std::cout << "Value: " << nMaxFieldCount << std::endl;
-
}
else if (aProp.Name == "SortFields")
{
-
}
else if (aProp.Name == "BindFormatsToContent")
{
@@ -102,14 +100,12 @@ void XDatabaseRange::testGetSortDescriptor()
}
else if (aProp.Name == "OutputPosition")
{
-
}
else if (aProp.Name == "IsUserListEnabled")
{
- bool bIsUserListEnabled = true;
+ bool bIsUserListEnabled = true;
aProp.Value >>= bIsUserListEnabled;
CPPUNIT_ASSERT(!bIsUserListEnabled);
-
}
else if (aProp.Name == "UserListIndex")
{
@@ -122,39 +118,39 @@ void XDatabaseRange::testGetSortDescriptor()
void XDatabaseRange::testGetFilterDescriptor()
{
- uno::Reference< sheet::XDatabaseRange > xDBRange( init("FilterDescriptor"), UNO_QUERY_THROW);
- uno::Reference< uno::XInterface > xFilterDescr( xDBRange->getFilterDescriptor(), UNO_QUERY_THROW);
+ uno::Reference<sheet::XDatabaseRange> xDBRange(init("FilterDescriptor"), UNO_QUERY_THROW);
+ uno::Reference<uno::XInterface> xFilterDescr(xDBRange->getFilterDescriptor(), UNO_QUERY_THROW);
}
void XDatabaseRange::testGetImportDescriptor()
{
- uno::Reference< sheet::XDatabaseRange > xDBRange( init("ImportDescriptor"), UNO_QUERY_THROW);
- uno::Sequence< beans::PropertyValue > xImportDescr = xDBRange->getImportDescriptor();
- (void) xImportDescr;
+ uno::Reference<sheet::XDatabaseRange> xDBRange(init("ImportDescriptor"), UNO_QUERY_THROW);
+ uno::Sequence<beans::PropertyValue> xImportDescr = xDBRange->getImportDescriptor();
+ (void)xImportDescr;
}
void XDatabaseRange::testRefresh()
{
- uno::Reference< sheet::XDatabaseRange > xDBRange( init("Refresh"), UNO_QUERY_THROW);
+ uno::Reference<sheet::XDatabaseRange> xDBRange(init("Refresh"), UNO_QUERY_THROW);
const sal_Int32 nCol = 0;
OUString aHidden("IsVisible");
- uno::Reference< sheet::XCellRangeReferrer > xCellRangeReferrer(xDBRange, UNO_QUERY_THROW);
- uno::Reference< table::XCellRange > xCellRange = xCellRangeReferrer->getReferredCells();
+ uno::Reference<sheet::XCellRangeReferrer> xCellRangeReferrer(xDBRange, UNO_QUERY_THROW);
+ uno::Reference<table::XCellRange> xCellRange = xCellRangeReferrer->getReferredCells();
for (sal_Int32 i = 1; i < 5; ++i)
{
- uno::Reference< table::XCell > xCell = xCellRange->getCellByPosition(nCol, i);
+ uno::Reference<table::XCell> xCell = xCellRange->getCellByPosition(nCol, i);
xCell->setValue(0);
}
for (sal_Int32 i = 2; i < 5; ++i)
{
- uno::Reference< table::XColumnRowRange > xColRowRange(xCellRange, UNO_QUERY_THROW);
- uno::Reference< table::XTableRows > xRows = xColRowRange->getRows();
- uno::Reference< table::XCellRange > xRow(xRows->getByIndex(i), UNO_QUERY_THROW);
- uno::Reference< beans::XPropertySet > xPropRow(xRow, UNO_QUERY_THROW);
- Any aAny = xPropRow->getPropertyValue( aHidden );
+ uno::Reference<table::XColumnRowRange> xColRowRange(xCellRange, UNO_QUERY_THROW);
+ uno::Reference<table::XTableRows> xRows = xColRowRange->getRows();
+ uno::Reference<table::XCellRange> xRow(xRows->getByIndex(i), UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xPropRow(xRow, UNO_QUERY_THROW);
+ Any aAny = xPropRow->getPropertyValue(aHidden);
CPPUNIT_ASSERT(aAny.get<bool>());
}
@@ -164,18 +160,15 @@ void XDatabaseRange::testRefresh()
for (sal_Int32 i = 1; i < 5; ++i)
{
- uno::Reference< table::XColumnRowRange > xColRowRange(xCellRange, UNO_QUERY_THROW);
- uno::Reference< table::XTableRows > xRows = xColRowRange->getRows();
- uno::Reference< table::XCellRange > xRow(xRows->getByIndex(i), UNO_QUERY_THROW);
- uno::Reference< beans::XPropertySet > xPropRow(xRow, UNO_QUERY_THROW);
- Any aAny = xPropRow->getPropertyValue( aHidden );
+ uno::Reference<table::XColumnRowRange> xColRowRange(xCellRange, UNO_QUERY_THROW);
+ uno::Reference<table::XTableRows> xRows = xColRowRange->getRows();
+ uno::Reference<table::XCellRange> xRow(xRows->getByIndex(i), UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertySet> xPropRow(xRow, UNO_QUERY_THROW);
+ Any aAny = xPropRow->getPropertyValue(aHidden);
CPPUNIT_ASSERT(!aAny.get<bool>());
}
-
-
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/sheet/xdatapilottable.cxx b/test/source/sheet/xdatapilottable.cxx
index 5934532dcc85..4cfff74ed5c1 100644
--- a/test/source/sheet/xdatapilottable.cxx
+++ b/test/source/sheet/xdatapilottable.cxx
@@ -16,24 +16,23 @@ using namespace css::uno;
namespace apitest
{
-
void XDataPilotTable::testGetOutputRange()
{
- uno::Reference< sheet::XDataPilotTable > xDPTable(init(),UNO_QUERY_THROW);
+ uno::Reference<sheet::XDataPilotTable> xDPTable(init(), UNO_QUERY_THROW);
table::CellRangeAddress aRange = xDPTable->getOutputRange();
- CPPUNIT_ASSERT_EQUAL( sal_Int16(0), aRange.Sheet );
- CPPUNIT_ASSERT_EQUAL( sal_Int32(7), aRange.StartColumn );
- CPPUNIT_ASSERT_EQUAL( sal_Int32(8), aRange.StartRow );
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(0), aRange.Sheet);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(7), aRange.StartColumn);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aRange.StartRow);
}
void XDataPilotTable::testRefresh()
{
- uno::Reference< sheet::XDataPilotTable > xDPTable(init(),UNO_QUERY_THROW);
+ uno::Reference<sheet::XDataPilotTable> xDPTable(init(), UNO_QUERY_THROW);
std::cout << "xCellForChange: Old Value: " << xCellForChange->getValue() << std::endl;
std::cout << "xCellForCheck: Old Value: " << xCellForCheck->getValue() << std::endl;
double aOldData = xCellForCheck->getValue();
- xCellForChange->setValue( 5 );
+ xCellForChange->setValue(5);
xDPTable->refresh();
xDPTable->refresh();
@@ -43,10 +42,7 @@ void XDataPilotTable::testRefresh()
CPPUNIT_ASSERT_MESSAGE("value needs to change", aOldData != aNewData);
}
-XDataPilotTable::~XDataPilotTable()
-{
-}
-
+XDataPilotTable::~XDataPilotTable() {}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/sheet/xgoalseek.cxx b/test/source/sheet/xgoalseek.cxx
index 986af40561d3..b1de09d2e22b 100644
--- a/test/source/sheet/xgoalseek.cxx
+++ b/test/source/sheet/xgoalseek.cxx
@@ -17,21 +17,20 @@
using namespace css;
using namespace css::uno;
-namespace apitest {
-
+namespace apitest
+{
void XGoalSeek::testSeekGoal()
{
- uno::Reference< sheet::XGoalSeek > xGoalSeek(init(), UNO_QUERY_THROW);
+ uno::Reference<sheet::XGoalSeek> xGoalSeek(init(), UNO_QUERY_THROW);
- table::CellAddress aFormulaAddr(0,3,5);
- table::CellAddress aVariableAddr(0,3,4);
+ table::CellAddress aFormulaAddr(0, 3, 5);
+ table::CellAddress aVariableAddr(0, 3, 4);
sheet::GoalResult aResult = xGoalSeek->seekGoal(aFormulaAddr, aVariableAddr, "4");
double nDivergence = 0.01;
- CPPUNIT_ASSERT( aResult.Divergence < nDivergence );
+ CPPUNIT_ASSERT(aResult.Divergence < nDivergence);
CPPUNIT_ASSERT_DOUBLES_EQUAL(16, aResult.Result, nDivergence);
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/sheet/xsheetoperation.cxx b/test/source/sheet/xsheetoperation.cxx
index 22015a40d17d..6f8496482eac 100644
--- a/test/source/sheet/xsheetoperation.cxx
+++ b/test/source/sheet/xsheetoperation.cxx
@@ -19,26 +19,25 @@
using namespace css;
using namespace css::uno;
-namespace apitest {
-
+namespace apitest
+{
void XSheetOperation::testClearContents()
{
- uno::Reference< sheet::XSheetOperation > xSheetOperation(init(), UNO_QUERY_THROW);
+ uno::Reference<sheet::XSheetOperation> xSheetOperation(init(), UNO_QUERY_THROW);
- xSheetOperation->clearContents( sheet::CellFlags::VALUE | sheet::CellFlags::FORMULA );
+ xSheetOperation->clearContents(sheet::CellFlags::VALUE | sheet::CellFlags::FORMULA);
- double sum = xSheetOperation->computeFunction( sheet::GeneralFunction_SUM );
+ double sum = xSheetOperation->computeFunction(sheet::GeneralFunction_SUM);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to clean contents", 0.0, sum);
}
void XSheetOperation::testComputeFunction()
{
- uno::Reference< sheet::XSheetOperation > xSheetOperation(init(), UNO_QUERY_THROW);
+ uno::Reference<sheet::XSheetOperation> xSheetOperation(init(), UNO_QUERY_THROW);
- double count = xSheetOperation->computeFunction( sheet::GeneralFunction_COUNT );
+ double count = xSheetOperation->computeFunction(sheet::GeneralFunction_COUNT);
CPPUNIT_ASSERT_MESSAGE("Unable to compute function", count >= 0.0);
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/sheet/xspreadsheetdocument.cxx b/test/source/sheet/xspreadsheetdocument.cxx
index fd8f66ab54d8..d808d8b31f6d 100644
--- a/test/source/sheet/xspreadsheetdocument.cxx
+++ b/test/source/sheet/xspreadsheetdocument.cxx
@@ -16,18 +16,17 @@
using namespace css;
using namespace css::uno;
-namespace apitest {
-
+namespace apitest
+{
void XSpreadsheetDocument::testGetSheets()
{
- uno::Reference< sheet::XSpreadsheetDocument > xSpreadsheetDoc(init(), UNO_QUERY_THROW);
- uno::Reference< sheet::XSpreadsheets > xSheets = xSpreadsheetDoc->getSheets();
+ uno::Reference<sheet::XSpreadsheetDocument> xSpreadsheetDoc(init(), UNO_QUERY_THROW);
+ uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadsheetDoc->getSheets();
CPPUNIT_ASSERT(xSheets.is());
- uno::Reference< container::XIndexAccess > xIA(xSheets, UNO_QUERY_THROW);
- CPPUNIT_ASSERT_EQUAL( mnSheets, xIA->getCount() );
+ uno::Reference<container::XIndexAccess> xIA(xSheets, UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(mnSheets, xIA->getCount());
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/sheet/xsubtotaldescriptor.cxx b/test/source/sheet/xsubtotaldescriptor.cxx
index fa5aca6345b0..87c2083ef9f5 100644
--- a/test/source/sheet/xsubtotaldescriptor.cxx
+++ b/test/source/sheet/xsubtotaldescriptor.cxx
@@ -21,13 +21,13 @@
using namespace com::sun::star;
using namespace com::sun::star::uno;
-namespace apitest {
-
+namespace apitest
+{
void XSubTotalDescriptor::testAddNew()
{
- uno::Reference< sheet::XSubTotalDescriptor > xSTD(init(), uno::UNO_QUERY_THROW);
+ uno::Reference<sheet::XSubTotalDescriptor> xSTD(init(), uno::UNO_QUERY_THROW);
- uno::Sequence< sheet::SubTotalColumn > xCols;
+ uno::Sequence<sheet::SubTotalColumn> xCols;
xCols.realloc(1);
xCols[0].Column = 5;
xCols[0].Function = sheet::GeneralFunction_SUM;
@@ -37,11 +37,10 @@ void XSubTotalDescriptor::testAddNew()
void XSubTotalDescriptor::testClear()
{
- uno::Reference< sheet::XSubTotalDescriptor > xSTD(init(), UNO_QUERY_THROW);
+ uno::Reference<sheet::XSubTotalDescriptor> xSTD(init(), UNO_QUERY_THROW);
CPPUNIT_ASSERT_NO_THROW_MESSAGE("Unable to clear XSubTotalDescriptor", xSTD->clear());
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/test/source/sheet/xviewfreezable.cxx b/test/source/sheet/xviewfreezable.cxx
index 4a478f1ef149..2e13ffd294f0 100644
--- a/test/source/sheet/xviewfreezable.cxx
+++ b/test/source/sheet/xviewfreezable.cxx
@@ -16,18 +16,17 @@
using namespace com::sun::star;
using namespace com::sun::star::uno;
-namespace apitest {
-
+namespace apitest
+{
void XViewFreezable::testFreeze()
{
- uno::Reference< sheet::XViewFreezable > xViewFreezable(init(), UNO_QUERY_THROW);
+ uno::Reference<sheet::XViewFreezable> xViewFreezable(init(), UNO_QUERY_THROW);
CPPUNIT_ASSERT_MESSAGE("View has already frozen panes", !xViewFreezable->hasFrozenPanes());
- xViewFreezable->freezeAtPosition(1,1);
+ xViewFreezable->freezeAtPosition(1, 1);
CPPUNIT_ASSERT_MESSAGE("Unable to freeze pane", xViewFreezable->hasFrozenPanes());
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/test/source/sheet/xviewpane.cxx b/test/source/sheet/xviewpane.cxx
index 5ea508bf82bf..a10c59d9c0b8 100644
--- a/test/source/sheet/xviewpane.cxx
+++ b/test/source/sheet/xviewpane.cxx
@@ -16,12 +16,12 @@
using namespace css;
using namespace css::uno;
-namespace apitest {
-
+namespace apitest
+{
void XViewPane::testFirstVisibleColumn()
{
sal_Int32 nCol = 5;
- uno::Reference < sheet::XViewPane > xViewPane(init(),UNO_QUERY_THROW);
+ uno::Reference<sheet::XViewPane> xViewPane(init(), UNO_QUERY_THROW);
xViewPane->setFirstVisibleColumn(nCol);
CPPUNIT_ASSERT_EQUAL(xViewPane->getFirstVisibleColumn(), nCol);
}
@@ -29,7 +29,7 @@ void XViewPane::testFirstVisibleColumn()
void XViewPane::testFirstVisibleRow()
{
sal_Int32 nRow = 3;
- uno::Reference < sheet::XViewPane > xViewPane(init(),UNO_QUERY_THROW);
+ uno::Reference<sheet::XViewPane> xViewPane(init(), UNO_QUERY_THROW);
xViewPane->setFirstVisibleRow(nRow);
CPPUNIT_ASSERT_EQUAL(xViewPane->getFirstVisibleRow(), nRow);
}
@@ -38,7 +38,7 @@ void XViewPane::testVisibleRange()
{
constexpr sal_Int32 nCol = 5;
constexpr sal_Int32 nRow = 3;
- uno::Reference < sheet::XViewPane > xViewPane(init(),UNO_QUERY_THROW);
+ uno::Reference<sheet::XViewPane> xViewPane(init(), UNO_QUERY_THROW);
xViewPane->setFirstVisibleColumn(nCol);
xViewPane->setFirstVisibleRow(nRow);
@@ -47,7 +47,6 @@ void XViewPane::testVisibleRange()
CPPUNIT_ASSERT_EQUAL(nRow, aCellRangeAddress.StartRow);
CPPUNIT_ASSERT_EQUAL(nCol, aCellRangeAddress.StartColumn);
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */