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
c0e1ef3b
Kaydet (Commit)
c0e1ef3b
authored
Ock 17, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
terminate xcellrangesquery correctly
üst
7fb6d625
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
7 deletions
+35
-7
xcellrangesquery.cxx
sc/qa/extras/xcellrangesquery.cxx
+35
-7
No files found.
sc/qa/extras/xcellrangesquery.cxx
Dosyayı görüntüle @
c0e1ef3b
...
...
@@ -34,18 +34,21 @@
#include <com/sun/star/sheet/XSheetCellRanges.hpp>
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/sheet/CellFlags.hpp>
#include <com/sun/star/util/XCloseable.hpp>
using
namespace
com
::
sun
::
star
;
namespace
ScCellRangeBase
{
#define NUMBER_OF_TESTS 5
class
ScXCellRangesQuery
:
public
UnoApiTest
{
public
:
ScXCellRangesQuery
();
uno
::
Reference
<
sheet
::
XCellRangesQuery
>
init
();
virtual
void
setUp
();
virtual
void
tearDown
();
//Testcases
void
testQueryColumnDifference
();
...
...
@@ -66,12 +69,15 @@ public:
CPPUNIT_TEST
(
testQueryRowDifference
);
CPPUNIT_TEST_SUITE_END
();
};
private
:
uno
::
Reference
<
sheet
::
XCellRangesQuery
>
init
();
ScXCellRangesQuery
::
ScXCellRangesQuery
()
{
static
int
nTest
;
static
uno
::
Reference
<
lang
::
XComponent
>
xComponent
;
};
}
int
ScXCellRangesQuery
::
nTest
=
0
;
uno
::
Reference
<
lang
::
XComponent
>
ScXCellRangesQuery
::
xComponent
;
uno
::
Reference
<
sheet
::
XCellRangesQuery
>
ScXCellRangesQuery
::
init
()
{
...
...
@@ -79,7 +85,6 @@ uno::Reference<sheet::XCellRangesQuery> ScXCellRangesQuery::init()
const
rtl
::
OUString
aFileBase
(
RTL_CONSTASCII_USTRINGPARAM
(
"xcellrangesquery.ods"
));
createFileURL
(
aFileBase
,
aFileURL
);
std
::
cout
<<
rtl
::
OUStringToOString
(
aFileURL
,
RTL_TEXTENCODING_UTF8
).
getStr
()
<<
std
::
endl
;
static
uno
::
Reference
<
lang
::
XComponent
>
xComponent
;
if
(
!
xComponent
.
is
())
xComponent
=
loadFromDesktop
(
aFileURL
);
uno
::
Reference
<
sheet
::
XSpreadsheetDocument
>
xDoc
(
xComponent
,
UNO_QUERY_THROW
);
...
...
@@ -164,6 +169,29 @@ void ScXCellRangesQuery::testQueryVisibleCells()
CPPUNIT_ASSERT_MESSAGE
(
"testQueryFormulaCells"
,
aResult
==
aExpected
);
}
void
ScXCellRangesQuery
::
setUp
()
{
nTest
+=
1
;
UnoApiTest
::
setUp
();
}
void
ScXCellRangesQuery
::
tearDown
()
{
if
(
nTest
==
NUMBER_OF_TESTS
)
{
uno
::
Reference
<
util
::
XCloseable
>
xCloseable
(
xComponent
,
UNO_QUERY_THROW
);
xCloseable
->
close
(
false
);
}
UnoApiTest
::
tearDown
();
if
(
nTest
==
NUMBER_OF_TESTS
)
{
mxDesktop
->
terminate
();
uno
::
Reference
<
lang
::
XComponent
>
(
m_xContext
,
UNO_QUERY_THROW
)
->
dispose
();
}
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
ScXCellRangesQuery
);
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
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