Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
82e349fd
Kaydet (Commit)
82e349fd
authored
Şub 10, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add XDataPilotTable2 test to ScDatPilotTableObj
üst
c1589dbd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
3 deletions
+39
-3
scdatapilottableobj.cxx
sc/qa/extras/scdatapilottableobj.cxx
+35
-2
xdatapilottable2.hxx
test/inc/test/sheet/xdatapilottable2.hxx
+3
-1
xdatapilottable2.cxx
test/source/sheet/xdatapilottable2.cxx
+1
-0
No files found.
sc/qa/extras/scdatapilottableobj.cxx
Dosyayı görüntüle @
82e349fd
...
...
@@ -28,6 +28,7 @@
#include <test/unoapi_test.hxx>
#include <test/sheet/xdatapilottable.hxx>
#include <test/sheet/xdatapilottable2.hxx>
#include <test/sheet/xdatapilotdescriptor.hxx>
#include <test/container/xnamed.hxx>
...
...
@@ -39,10 +40,10 @@
namespace
sc_apitest
{
#define NUMBER_OF_TESTS 1
2
#define NUMBER_OF_TESTS 1
3
class
ScDataPilotTableObj
:
public
UnoApiTest
,
apitest
::
XDataPilotDescriptor
,
apitest
::
XDataPilotTable
,
apitest
::
XNamed
apitest
::
XNamed
,
apitest
::
XDataPilotTable2
{
public
:
ScDataPilotTableObj
();
...
...
@@ -50,6 +51,7 @@ public:
virtual
void
setUp
();
virtual
void
tearDown
();
virtual
uno
::
Reference
<
uno
::
XInterface
>
init
();
virtual
uno
::
Reference
<
uno
::
XInterface
>
initDP2
();
CPPUNIT_TEST_SUITE
(
ScDataPilotTableObj
);
CPPUNIT_TEST
(
testRefresh
);
...
...
@@ -65,6 +67,7 @@ public:
CPPUNIT_TEST
(
testGetDataFields
);
CPPUNIT_TEST
(
testGetName
);
CPPUNIT_TEST
(
testSetName
);
CPPUNIT_TEST
(
testGetDrillDownData
);
CPPUNIT_TEST_SUITE_END
();
private
:
...
...
@@ -111,6 +114,36 @@ uno::Reference< uno::XInterface > ScDataPilotTableObj::init()
return
xDPTable
;
}
uno
::
Reference
<
uno
::
XInterface
>
ScDataPilotTableObj
::
initDP2
()
{
rtl
::
OUString
aFileURL
;
createFileURL
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"ScDataPilotTableObj.ods"
)),
aFileURL
);
if
(
!
mxComponent
.
is
())
mxComponent
=
loadFromDesktop
(
aFileURL
);
CPPUNIT_ASSERT
(
mxComponent
.
is
());
uno
::
Reference
<
sheet
::
XSpreadsheetDocument
>
xDoc
(
mxComponent
,
UNO_QUERY_THROW
);
uno
::
Reference
<
container
::
XIndexAccess
>
xIndex
(
xDoc
->
getSheets
(),
UNO_QUERY_THROW
);
uno
::
Reference
<
sheet
::
XSpreadsheet
>
xSheet
(
xIndex
->
getByIndex
(
0
),
UNO_QUERY_THROW
);
// set variables from xdatapilottable.[ch]xx
xCellForChange
=
xSheet
->
getCellByPosition
(
1
,
5
);
xCellForCheck
=
xSheet
->
getCellByPosition
(
7
,
11
);
CPPUNIT_ASSERT
(
xCellForCheck
.
is
());
CPPUNIT_ASSERT
(
xCellForChange
.
is
());
CPPUNIT_ASSERT_MESSAGE
(
"Could not create interface of type XSpreadsheet"
,
xSheet
.
is
());
uno
::
Reference
<
sheet
::
XDataPilotTablesSupplier
>
xDPTS
(
xSheet
,
UNO_QUERY_THROW
);
CPPUNIT_ASSERT
(
xDPTS
.
is
());
uno
::
Reference
<
sheet
::
XDataPilotTables
>
xDPT
=
xDPTS
->
getDataPilotTables
();
CPPUNIT_ASSERT
(
xDPT
.
is
());
uno
::
Reference
<
sheet
::
XDataPilotTable
>
xDPTable
(
xDPT
->
getByName
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"DataPilotTable2"
))),
UNO_QUERY_THROW
);
CPPUNIT_ASSERT
(
xDPTable
.
is
());
return
xDPTable
;
}
void
ScDataPilotTableObj
::
setUp
()
{
nTest
++
;
...
...
test/inc/test/sheet/xdatapilottable2.hxx
Dosyayı görüntüle @
82e349fd
...
...
@@ -31,6 +31,8 @@
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/sheet/XDataPilotTable2.hpp>
#include "test/testdllapi.hxx"
using
namespace
com
::
sun
::
star
;
#include <vector>
...
...
@@ -39,7 +41,7 @@ using namespace com::sun::star;
namespace
apitest
{
class
XDataPilotTable2
class
OOO_DLLPUBLIC_TEST
XDataPilotTable2
{
public
:
void
testGetPositionData
();
...
...
test/source/sheet/xdatapilottable2.cxx
Dosyayı görüntüle @
82e349fd
...
...
@@ -80,6 +80,7 @@ void XDataPilotTable2::testGetDrillDownData()
}
}
std
::
cout
<<
"Sum: "
<<
sum
<<
"; nVal: "
<<
nVal
<<
std
::
endl
;
CPPUNIT_ASSERT
(
sum
==
nVal
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment