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
7b91c6d1
Kaydet (Commit)
7b91c6d1
authored
Şub 17, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add test for ScCellRangeObj::setDataArray and getDataArray
üst
4e1e72dc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
sccellrangeobj.cxx
sc/qa/extras/sccellrangeobj.cxx
+26
-2
xcellrangesquery.ods
sc/qa/extras/testdocuments/xcellrangesquery.ods
+0
-0
No files found.
sc/qa/extras/sccellrangeobj.cxx
Dosyayı görüntüle @
7b91c6d1
...
...
@@ -31,6 +31,7 @@
#include <test/sheet/cellproperties.hxx>
#include <test/util/xreplaceable.hxx>
#include <test/util/xsearchable.hxx>
#include <test/sheet/xcellrangedata.hxx>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
...
...
@@ -38,10 +39,10 @@
namespace
sc_apitest
{
#define NUMBER_OF_TESTS 1
2
#define NUMBER_OF_TESTS 1
4
class
ScCellRangeObj
:
public
UnoApiTest
,
apitest
::
XCellRangesQuery
,
apitest
::
CellProperties
,
apitest
::
XSearchable
,
apitest
::
XReplaceable
apitest
::
XSearchable
,
apitest
::
XReplaceable
,
apitest
::
XCellRangeData
{
public
:
ScCellRangeObj
();
...
...
@@ -49,6 +50,7 @@ public:
virtual
void
setUp
();
virtual
void
tearDown
();
virtual
uno
::
Reference
<
uno
::
XInterface
>
init
();
virtual
uno
::
Reference
<
uno
::
XInterface
>
getXCellRangeData
();
CPPUNIT_TEST_SUITE
(
ScCellRangeObj
);
CPPUNIT_TEST
(
testQueryColumnDifference
);
...
...
@@ -64,6 +66,8 @@ public:
CPPUNIT_TEST
(
testFindFirst
);
CPPUNIT_TEST
(
testReplaceAll
);
CPPUNIT_TEST
(
testCreateReplaceDescriptor
);
CPPUNIT_TEST
(
testGetDataArray
);
CPPUNIT_TEST
(
testSetDataArray
);
CPPUNIT_TEST_SUITE_END
();
private
:
...
...
@@ -101,6 +105,26 @@ uno::Reference< uno::XInterface > ScCellRangeObj::init()
return
xReturn
;
}
uno
::
Reference
<
uno
::
XInterface
>
ScCellRangeObj
::
getXCellRangeData
()
{
rtl
::
OUString
aFileURL
;
const
rtl
::
OUString
aFileBase
(
RTL_CONSTASCII_USTRINGPARAM
(
"xcellrangesquery.ods"
));
createFileURL
(
aFileBase
,
aFileURL
);
std
::
cout
<<
rtl
::
OUStringToOString
(
aFileURL
,
RTL_TEXTENCODING_UTF8
).
getStr
()
<<
std
::
endl
;
if
(
!
mxComponent
.
is
())
mxComponent
=
loadFromDesktop
(
aFileURL
);
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
(
1
),
UNO_QUERY_THROW
);
CPPUNIT_ASSERT_MESSAGE
(
"Could not create interface of type XSpreadsheet"
,
xSheet
.
is
());
uno
::
Reference
<
table
::
XCellRange
>
xReturn
(
xSheet
->
getCellRangeByPosition
(
0
,
0
,
3
,
3
),
UNO_QUERY_THROW
);
CPPUNIT_ASSERT_MESSAGE
(
"Could not create object of type XCellRangesQuery"
,
xReturn
.
is
());
return
xReturn
;
}
void
ScCellRangeObj
::
setUp
()
{
nTest
++
;
...
...
sc/qa/extras/testdocuments/xcellrangesquery.ods
Dosyayı görüntüle @
7b91c6d1
No preview for this file type
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