test: clang-format recently added xsheet tests
Jens says he was unhappy with the 80 cols limit, so clang-format was explicitly avoided for these new files, but now that the both the config and TEMPLATE.SOURCECODE.HEADER says 100, it's fine to reformat these to enforce consistency from now on. Change-Id: Ia6f0a65920ad2c9d7b0834a0712356568c39624e
This commit is contained in:
@@ -27,13 +27,9 @@ CPPUNIT_NS_BEGIN
|
|||||||
* This specialization from @c struct @c assertion_traits<> helps to compare
|
* This specialization from @c struct @c assertion_traits<> helps to compare
|
||||||
* @see com::sun::star::table::CellAddress.
|
* @see com::sun::star::table::CellAddress.
|
||||||
*/
|
*/
|
||||||
template<>
|
template <> struct assertion_traits<table::CellAddress>
|
||||||
struct assertion_traits<table::CellAddress>
|
|
||||||
{
|
{
|
||||||
static bool equal(const table::CellAddress& x, const table::CellAddress& y)
|
static bool equal(const table::CellAddress& x, const table::CellAddress& y) { return x == y; }
|
||||||
{
|
|
||||||
return x == y;
|
|
||||||
}
|
|
||||||
|
|
||||||
static std::string toString(const table::CellAddress& x)
|
static std::string toString(const table::CellAddress& x)
|
||||||
{
|
{
|
||||||
@@ -48,8 +44,7 @@ struct assertion_traits<table::CellAddress>
|
|||||||
* This specialization from @c struct @c assertion_traits<> helps to compare
|
* This specialization from @c struct @c assertion_traits<> helps to compare
|
||||||
* @see com::sun::star::table::CellRangeAddress.
|
* @see com::sun::star::table::CellRangeAddress.
|
||||||
*/
|
*/
|
||||||
template<>
|
template <> struct assertion_traits<table::CellRangeAddress>
|
||||||
struct assertion_traits<table::CellRangeAddress>
|
|
||||||
{
|
{
|
||||||
static bool equal(const table::CellRangeAddress& x, const table::CellRangeAddress& y)
|
static bool equal(const table::CellRangeAddress& x, const table::CellRangeAddress& y)
|
||||||
{
|
{
|
||||||
@@ -59,8 +54,9 @@ struct assertion_traits<table::CellRangeAddress>
|
|||||||
static std::string toString(const table::CellRangeAddress& x)
|
static std::string toString(const table::CellRangeAddress& x)
|
||||||
{
|
{
|
||||||
OStringStream ost;
|
OStringStream ost;
|
||||||
ost << "Sheet: " << x.Sheet << " StartColumn: " << x.StartColumn << " StartRow: " << x.StartRow
|
ost << "Sheet: " << x.Sheet << " StartColumn: " << x.StartColumn
|
||||||
<< " EndColumn: " << x.EndColumn << " EndRow: " << x.EndRow;
|
<< " StartRow: " << x.StartRow << " EndColumn: " << x.EndColumn
|
||||||
|
<< " EndRow: " << x.EndRow;
|
||||||
return ost.str();
|
return ost.str();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -10,13 +10,13 @@
|
|||||||
#ifndef INCLUDED_TEST_SHEET_XSHEETCELLRANGE_HXX
|
#ifndef INCLUDED_TEST_SHEET_XSHEETCELLRANGE_HXX
|
||||||
#define INCLUDED_TEST_SHEET_XSHEETCELLRANGE_HXX
|
#define INCLUDED_TEST_SHEET_XSHEETCELLRANGE_HXX
|
||||||
|
|
||||||
|
|
||||||
#include <com/sun/star/uno/XInterface.hpp>
|
#include <com/sun/star/uno/XInterface.hpp>
|
||||||
#include <com/sun/star/uno/Reference.hxx>
|
#include <com/sun/star/uno/Reference.hxx>
|
||||||
|
|
||||||
#include <test/testdllapi.hxx>
|
#include <test/testdllapi.hxx>
|
||||||
|
|
||||||
namespace apitest {
|
namespace apitest
|
||||||
|
{
|
||||||
|
|
||||||
class OOO_DLLPUBLIC_TEST XSheetCellRange
|
class OOO_DLLPUBLIC_TEST XSheetCellRange
|
||||||
{
|
{
|
||||||
@@ -28,7 +28,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
~XSheetCellRange() {}
|
~XSheetCellRange() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // INCLUDED_TEST_SHEET_XSHEETCELLRANGE_HXX
|
#endif // INCLUDED_TEST_SHEET_XSHEETCELLRANGE_HXX
|
||||||
|
@@ -18,7 +18,8 @@
|
|||||||
|
|
||||||
#include <test/testdllapi.hxx>
|
#include <test/testdllapi.hxx>
|
||||||
|
|
||||||
namespace apitest {
|
namespace apitest
|
||||||
|
{
|
||||||
|
|
||||||
class OOO_DLLPUBLIC_TEST XSheetCellRangeContainer
|
class OOO_DLLPUBLIC_TEST XSheetCellRangeContainer
|
||||||
{
|
{
|
||||||
@@ -32,7 +33,6 @@ protected:
|
|||||||
~XSheetCellRangeContainer() {}
|
~XSheetCellRangeContainer() {}
|
||||||
css::uno::Sequence<com::sun::star::table::CellRangeAddress> createCellRangeAddresses();
|
css::uno::Sequence<com::sun::star::table::CellRangeAddress> createCellRangeAddresses();
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // INCLUDED_TEST_SHEET_XSHEETCELLRANGECONTAINER_HXX
|
#endif // INCLUDED_TEST_SHEET_XSHEETCELLRANGECONTAINER_HXX
|
||||||
|
@@ -10,13 +10,13 @@
|
|||||||
#ifndef INCLUDED_TEST_SHEET_XSHEETCELLRANGES_HXX
|
#ifndef INCLUDED_TEST_SHEET_XSHEETCELLRANGES_HXX
|
||||||
#define INCLUDED_TEST_SHEET_XSHEETCELLRANGES_HXX
|
#define INCLUDED_TEST_SHEET_XSHEETCELLRANGES_HXX
|
||||||
|
|
||||||
|
|
||||||
#include <com/sun/star/uno/XInterface.hpp>
|
#include <com/sun/star/uno/XInterface.hpp>
|
||||||
#include <com/sun/star/uno/Reference.hxx>
|
#include <com/sun/star/uno/Reference.hxx>
|
||||||
|
|
||||||
#include <test/testdllapi.hxx>
|
#include <test/testdllapi.hxx>
|
||||||
|
|
||||||
namespace apitest {
|
namespace apitest
|
||||||
|
{
|
||||||
|
|
||||||
class OOO_DLLPUBLIC_TEST XSheetCellRanges
|
class OOO_DLLPUBLIC_TEST XSheetCellRanges
|
||||||
{
|
{
|
||||||
@@ -30,7 +30,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
~XSheetCellRanges() {}
|
~XSheetCellRanges() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // INCLUDED_TEST_SHEET_XSHEETCELLRANGES_HXX
|
#endif // INCLUDED_TEST_SHEET_XSHEETCELLRANGES_HXX
|
||||||
|
@@ -10,13 +10,13 @@
|
|||||||
#ifndef INCLUDED_TEST_SHEET_XSHEETCONDITION_HXX
|
#ifndef INCLUDED_TEST_SHEET_XSHEETCONDITION_HXX
|
||||||
#define INCLUDED_TEST_SHEET_XSHEETCONDITION_HXX
|
#define INCLUDED_TEST_SHEET_XSHEETCONDITION_HXX
|
||||||
|
|
||||||
|
|
||||||
#include <com/sun/star/uno/XInterface.hpp>
|
#include <com/sun/star/uno/XInterface.hpp>
|
||||||
#include <com/sun/star/uno/Reference.hxx>
|
#include <com/sun/star/uno/Reference.hxx>
|
||||||
|
|
||||||
#include <test/testdllapi.hxx>
|
#include <test/testdllapi.hxx>
|
||||||
|
|
||||||
namespace apitest {
|
namespace apitest
|
||||||
|
{
|
||||||
|
|
||||||
class OOO_DLLPUBLIC_TEST XSheetCondition
|
class OOO_DLLPUBLIC_TEST XSheetCondition
|
||||||
{
|
{
|
||||||
@@ -31,7 +31,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
~XSheetCondition() {}
|
~XSheetCondition() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // INCLUDED_TEST_SHEET_XSHEETCONDITION_HXX
|
#endif // INCLUDED_TEST_SHEET_XSHEETCONDITION_HXX
|
||||||
|
@@ -10,7 +10,6 @@
|
|||||||
#ifndef INCLUDED_TEST_SHEET_XSHEETCONDITIONALENTRIES_HXX
|
#ifndef INCLUDED_TEST_SHEET_XSHEETCONDITIONALENTRIES_HXX
|
||||||
#define INCLUDED_TEST_SHEET_XSHEETCONDITIONALENTRIES_HXX
|
#define INCLUDED_TEST_SHEET_XSHEETCONDITIONALENTRIES_HXX
|
||||||
|
|
||||||
|
|
||||||
#include <com/sun/star/beans/PropertyValue.hpp>
|
#include <com/sun/star/beans/PropertyValue.hpp>
|
||||||
#include <com/sun/star/uno/XInterface.hpp>
|
#include <com/sun/star/uno/XInterface.hpp>
|
||||||
|
|
||||||
@@ -19,13 +18,15 @@
|
|||||||
|
|
||||||
#include <test/testdllapi.hxx>
|
#include <test/testdllapi.hxx>
|
||||||
|
|
||||||
namespace apitest {
|
namespace apitest
|
||||||
|
{
|
||||||
|
|
||||||
class OOO_DLLPUBLIC_TEST XSheetConditionalEntries
|
class OOO_DLLPUBLIC_TEST XSheetConditionalEntries
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual css::uno::Reference<css::uno::XInterface> init() = 0;
|
virtual css::uno::Reference<css::uno::XInterface> init() = 0;
|
||||||
virtual css::uno::Sequence< com::sun::star::beans::PropertyValue > createCondition(const sal_Int32 nr) =0;
|
virtual css::uno::Sequence<com::sun::star::beans::PropertyValue>
|
||||||
|
createCondition(const sal_Int32 nr) = 0;
|
||||||
|
|
||||||
void testAddNew();
|
void testAddNew();
|
||||||
void testClear();
|
void testClear();
|
||||||
@@ -34,7 +35,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
~XSheetConditionalEntries() {}
|
~XSheetConditionalEntries() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // INCLUDED_TEST_SHEET_XSHEETCONDITIONALENTRIES_HXX
|
#endif // INCLUDED_TEST_SHEET_XSHEETCONDITIONALENTRIES_HXX
|
||||||
|
@@ -10,13 +10,13 @@
|
|||||||
#ifndef INCLUDED_TEST_SHEET_XSHEETCONDITIONALENTRY_HXX
|
#ifndef INCLUDED_TEST_SHEET_XSHEETCONDITIONALENTRY_HXX
|
||||||
#define INCLUDED_TEST_SHEET_XSHEETCONDITIONALENTRY_HXX
|
#define INCLUDED_TEST_SHEET_XSHEETCONDITIONALENTRY_HXX
|
||||||
|
|
||||||
|
|
||||||
#include <com/sun/star/uno/XInterface.hpp>
|
#include <com/sun/star/uno/XInterface.hpp>
|
||||||
#include <com/sun/star/uno/Reference.hxx>
|
#include <com/sun/star/uno/Reference.hxx>
|
||||||
|
|
||||||
#include <test/testdllapi.hxx>
|
#include <test/testdllapi.hxx>
|
||||||
|
|
||||||
namespace apitest {
|
namespace apitest
|
||||||
|
{
|
||||||
|
|
||||||
class OOO_DLLPUBLIC_TEST XSheetConditionalEntry
|
class OOO_DLLPUBLIC_TEST XSheetConditionalEntry
|
||||||
{
|
{
|
||||||
@@ -28,7 +28,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
~XSheetConditionalEntry() {}
|
~XSheetConditionalEntry() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // INCLUDED_TEST_SHEET_XSHEETCONDITIONALENTRY_HXX
|
#endif // INCLUDED_TEST_SHEET_XSHEETCONDITIONALENTRY_HXX
|
||||||
|
@@ -19,7 +19,8 @@
|
|||||||
using namespace com::sun::star;
|
using namespace com::sun::star;
|
||||||
using namespace com::sun::star::uno;
|
using namespace com::sun::star::uno;
|
||||||
|
|
||||||
namespace apitest {
|
namespace apitest
|
||||||
|
{
|
||||||
|
|
||||||
void XSheetCellRange::testGetSpreadsheet()
|
void XSheetCellRange::testGetSpreadsheet()
|
||||||
{
|
{
|
||||||
@@ -28,7 +29,6 @@ void XSheetCellRange::testGetSpreadsheet()
|
|||||||
|
|
||||||
CPPUNIT_ASSERT_MESSAGE("Unable to get spreadsheet", xSheet.is());
|
CPPUNIT_ASSERT_MESSAGE("Unable to get spreadsheet", xSheet.is());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||||
|
@@ -20,7 +20,8 @@
|
|||||||
using namespace com::sun::star;
|
using namespace com::sun::star;
|
||||||
using namespace com::sun::star::uno;
|
using namespace com::sun::star::uno;
|
||||||
|
|
||||||
namespace apitest {
|
namespace apitest
|
||||||
|
{
|
||||||
|
|
||||||
void XSheetCellRangeContainer::testAddRemoveRangeAddress()
|
void XSheetCellRangeContainer::testAddRemoveRangeAddress()
|
||||||
{
|
{
|
||||||
@@ -30,23 +31,22 @@ void XSheetCellRangeContainer::testAddRemoveRangeAddress()
|
|||||||
|
|
||||||
sal_Int32 cnt = xSCRC->getCount();
|
sal_Int32 cnt = xSCRC->getCount();
|
||||||
xSCRC->addRangeAddress(aAddr[0], false);
|
xSCRC->addRangeAddress(aAddr[0], false);
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to add CellRangeAddress (count)",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to add CellRangeAddress (count)", cnt + 1,
|
||||||
cnt + 1, xSCRC->getCount());
|
xSCRC->getCount());
|
||||||
|
|
||||||
uno::Sequence<table::CellRangeAddress> aAfterAddAddr = xSCRC->getRangeAddresses();
|
uno::Sequence<table::CellRangeAddress> aAfterAddAddr = xSCRC->getRangeAddresses();
|
||||||
cnt = xSCRC->getCount();
|
cnt = xSCRC->getCount();
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to add CellRangeAddress (entry)",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to add CellRangeAddress (entry)", aAddr[0],
|
||||||
aAddr[0], aAfterAddAddr[cnt - 1]);
|
aAfterAddAddr[cnt - 1]);
|
||||||
|
|
||||||
xSCRC->removeRangeAddress(aAddr[0]);
|
xSCRC->removeRangeAddress(aAddr[0]);
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to remove CellRangeAddress (count)",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to remove CellRangeAddress (count)", cnt - 1,
|
||||||
cnt - 1, xSCRC->getCount());
|
xSCRC->getCount());
|
||||||
|
|
||||||
uno::Sequence<table::CellRangeAddress> aAfterRemoveAddr = xSCRC->getRangeAddresses();
|
uno::Sequence<table::CellRangeAddress> aAfterRemoveAddr = xSCRC->getRangeAddresses();
|
||||||
for (auto const& addr : aAfterRemoveAddr)
|
for (auto const& addr : aAfterRemoveAddr)
|
||||||
{
|
{
|
||||||
CPPUNIT_ASSERT_MESSAGE("Unable to remove CellRangeAddress (entry)",
|
CPPUNIT_ASSERT_MESSAGE("Unable to remove CellRangeAddress (entry)", aAddr[0] != addr);
|
||||||
aAddr[0] != addr);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,19 +58,19 @@ void XSheetCellRangeContainer::testAddRemoveRangeAddresses()
|
|||||||
|
|
||||||
sal_Int32 cnt = xSCRC->getCount();
|
sal_Int32 cnt = xSCRC->getCount();
|
||||||
xSCRC->addRangeAddresses(aAddr, false);
|
xSCRC->addRangeAddresses(aAddr, false);
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to add CellRangeAddress (count)",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to add CellRangeAddress (count)", cnt + 2,
|
||||||
cnt + 2, xSCRC->getCount());
|
xSCRC->getCount());
|
||||||
|
|
||||||
uno::Sequence<table::CellRangeAddress> aAfterAddAddr = xSCRC->getRangeAddresses();
|
uno::Sequence<table::CellRangeAddress> aAfterAddAddr = xSCRC->getRangeAddresses();
|
||||||
cnt = xSCRC->getCount();
|
cnt = xSCRC->getCount();
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to add CellRangeAddresses (entry: first)",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to add CellRangeAddresses (entry: first)", aAddr[0],
|
||||||
aAddr[0], aAfterAddAddr[cnt - 2]);
|
aAfterAddAddr[cnt - 2]);
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to add CellRangeAddresses (entry: second)",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to add CellRangeAddresses (entry: second)", aAddr[1],
|
||||||
aAddr[1], aAfterAddAddr[cnt - 1]);
|
aAfterAddAddr[cnt - 1]);
|
||||||
|
|
||||||
xSCRC->removeRangeAddresses(aAddr);
|
xSCRC->removeRangeAddresses(aAddr);
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to remove CellRangeAddresses (count)",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to remove CellRangeAddresses (count)", cnt - 2,
|
||||||
cnt - 2, xSCRC->getCount());
|
xSCRC->getCount());
|
||||||
|
|
||||||
uno::Sequence<table::CellRangeAddress> aAfterRemoveAddr = xSCRC->getRangeAddresses();
|
uno::Sequence<table::CellRangeAddress> aAfterRemoveAddr = xSCRC->getRangeAddresses();
|
||||||
for (auto const& addr : aAfterRemoveAddr)
|
for (auto const& addr : aAfterRemoveAddr)
|
||||||
@@ -96,7 +96,6 @@ uno::Sequence< table::CellRangeAddress > XSheetCellRangeContainer::createCellRan
|
|||||||
|
|
||||||
return aAddr;
|
return aAddr;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||||
|
@@ -22,7 +22,8 @@
|
|||||||
using namespace com::sun::star;
|
using namespace com::sun::star;
|
||||||
using namespace com::sun::star::uno;
|
using namespace com::sun::star::uno;
|
||||||
|
|
||||||
namespace apitest {
|
namespace apitest
|
||||||
|
{
|
||||||
|
|
||||||
void XSheetCellRanges::testGetCells()
|
void XSheetCellRanges::testGetCells()
|
||||||
{
|
{
|
||||||
@@ -35,9 +36,9 @@ void XSheetCellRanges::testGetCells()
|
|||||||
void XSheetCellRanges::testGetRangeAddresses()
|
void XSheetCellRanges::testGetRangeAddresses()
|
||||||
{
|
{
|
||||||
uno::Reference<sheet::XSheetCellRanges> xSheetCellRanges(init(), UNO_QUERY_THROW);
|
uno::Reference<sheet::XSheetCellRanges> xSheetCellRanges(init(), UNO_QUERY_THROW);
|
||||||
uno::Sequence< table::CellRangeAddress > aCellRangeAddress = xSheetCellRanges->getRangeAddresses();
|
uno::Sequence<table::CellRangeAddress> aCellRangeAddress
|
||||||
CPPUNIT_ASSERT_MESSAGE("Unable to get RangeAddresses",
|
= xSheetCellRanges->getRangeAddresses();
|
||||||
aCellRangeAddress.getLength() > 2);
|
CPPUNIT_ASSERT_MESSAGE("Unable to get RangeAddresses", aCellRangeAddress.getLength() > 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void XSheetCellRanges::testGetRangeAddressesAsString()
|
void XSheetCellRanges::testGetRangeAddressesAsString()
|
||||||
@@ -46,7 +47,6 @@ void XSheetCellRanges::testGetRangeAddressesAsString()
|
|||||||
CPPUNIT_ASSERT_MESSAGE("Unable to get RangeAddresses (string)",
|
CPPUNIT_ASSERT_MESSAGE("Unable to get RangeAddresses (string)",
|
||||||
xSheetCellRanges->getRangeAddressesAsString().indexOf("C1:D4") > 0);
|
xSheetCellRanges->getRangeAddressesAsString().indexOf("C1:D4") > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||||
|
@@ -20,7 +20,8 @@
|
|||||||
using namespace com::sun::star;
|
using namespace com::sun::star;
|
||||||
using namespace com::sun::star::uno;
|
using namespace com::sun::star::uno;
|
||||||
|
|
||||||
namespace apitest {
|
namespace apitest
|
||||||
|
{
|
||||||
|
|
||||||
void XSheetCondition::testGetSetFormula1()
|
void XSheetCondition::testGetSetFormula1()
|
||||||
{
|
{
|
||||||
@@ -68,7 +69,6 @@ void XSheetCondition::testGetSetSourcePosition()
|
|||||||
CPPUNIT_ASSERT_MESSAGE("Unable to set SourcePosition",
|
CPPUNIT_ASSERT_MESSAGE("Unable to set SourcePosition",
|
||||||
aSourcePosition.Row != aSourcePositionNew.Row);
|
aSourcePosition.Row != aSourcePositionNew.Row);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||||
|
@@ -21,39 +21,41 @@
|
|||||||
using namespace com::sun::star;
|
using namespace com::sun::star;
|
||||||
using namespace com::sun::star::uno;
|
using namespace com::sun::star::uno;
|
||||||
|
|
||||||
namespace apitest {
|
namespace apitest
|
||||||
|
{
|
||||||
|
|
||||||
void XSheetConditionalEntries::testAddNew()
|
void XSheetConditionalEntries::testAddNew()
|
||||||
{
|
{
|
||||||
uno::Reference< sheet::XSheetConditionalEntries > xSheetConditionalEntries(init(), UNO_QUERY_THROW);
|
uno::Reference<sheet::XSheetConditionalEntries> xSheetConditionalEntries(init(),
|
||||||
|
UNO_QUERY_THROW);
|
||||||
const sal_Int32 aCount = xSheetConditionalEntries->getCount();
|
const sal_Int32 aCount = xSheetConditionalEntries->getCount();
|
||||||
|
|
||||||
xSheetConditionalEntries->addNew(createCondition(4));
|
xSheetConditionalEntries->addNew(createCondition(4));
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to add new condition",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to add new condition", aCount + 1,
|
||||||
aCount + 1, xSheetConditionalEntries->getCount());
|
xSheetConditionalEntries->getCount());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void XSheetConditionalEntries::testClear()
|
void XSheetConditionalEntries::testClear()
|
||||||
{
|
{
|
||||||
uno::Reference< sheet::XSheetConditionalEntries > xSheetConditionalEntries(init(), UNO_QUERY_THROW);
|
uno::Reference<sheet::XSheetConditionalEntries> xSheetConditionalEntries(init(),
|
||||||
|
UNO_QUERY_THROW);
|
||||||
xSheetConditionalEntries->clear();
|
xSheetConditionalEntries->clear();
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to clear conditions",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to clear conditions", sal_Int32(0),
|
||||||
sal_Int32(0), xSheetConditionalEntries->getCount());
|
xSheetConditionalEntries->getCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
void XSheetConditionalEntries::testRemoveByIndex()
|
void XSheetConditionalEntries::testRemoveByIndex()
|
||||||
{
|
{
|
||||||
uno::Reference< sheet::XSheetConditionalEntries > xSheetConditionalEntries(init(), UNO_QUERY_THROW);
|
uno::Reference<sheet::XSheetConditionalEntries> xSheetConditionalEntries(init(),
|
||||||
|
UNO_QUERY_THROW);
|
||||||
const sal_Int32 aCount = xSheetConditionalEntries->getCount();
|
const sal_Int32 aCount = xSheetConditionalEntries->getCount();
|
||||||
|
|
||||||
xSheetConditionalEntries->removeByIndex(0);
|
xSheetConditionalEntries->removeByIndex(0);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to remove condition",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to remove condition", aCount - 1,
|
||||||
aCount - 1, xSheetConditionalEntries->getCount());
|
xSheetConditionalEntries->getCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||||
|
@@ -18,20 +18,19 @@
|
|||||||
using namespace com::sun::star;
|
using namespace com::sun::star;
|
||||||
using namespace com::sun::star::uno;
|
using namespace com::sun::star::uno;
|
||||||
|
|
||||||
namespace apitest {
|
namespace apitest
|
||||||
|
{
|
||||||
|
|
||||||
void XSheetConditionalEntry::testGetSetStyleName()
|
void XSheetConditionalEntry::testGetSetStyleName()
|
||||||
{
|
{
|
||||||
uno::Reference<sheet::XSheetConditionalEntry> xSheetConditionalEntry(init(), UNO_QUERY_THROW);
|
uno::Reference<sheet::XSheetConditionalEntry> xSheetConditionalEntry(init(), UNO_QUERY_THROW);
|
||||||
OUString aStyleName = xSheetConditionalEntry->getStyleName();
|
OUString aStyleName = xSheetConditionalEntry->getStyleName();
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get StyleName",
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unable to get StyleName", OUString("Result2"), aStyleName);
|
||||||
OUString("Result2"), aStyleName);
|
|
||||||
|
|
||||||
xSheetConditionalEntry->setStyleName("Heading");
|
xSheetConditionalEntry->setStyleName("Heading");
|
||||||
CPPUNIT_ASSERT_MESSAGE("Unable to set StyleName",
|
CPPUNIT_ASSERT_MESSAGE("Unable to set StyleName",
|
||||||
aStyleName != xSheetConditionalEntry->getStyleName());
|
aStyleName != xSheetConditionalEntry->getStyleName());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
|
||||||
|
Reference in New Issue
Block a user