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
7fb6d625
Kaydet (Commit)
7fb6d625
authored
Ock 17, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
terminate xdatabaserange correctly
üst
27553fa0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
2 deletions
+36
-2
xdatabaserange.cxx
sc/qa/extras/xdatabaserange.cxx
+36
-2
No files found.
sc/qa/extras/xdatabaserange.cxx
Dosyayı görüntüle @
7fb6d625
...
...
@@ -34,14 +34,18 @@
#include <com/sun/star/sheet/XDatabaseRange.hpp>
#include <com/sun/star/sheet/XDatabaseRanges.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <rtl/oustringostreaminserter.hxx>
namespace
ScDatabaseRangeObj
{
#define NUMBER_OF_TESTS 3
class
ScXDatabaseRange
:
public
UnoApiTest
{
uno
::
Reference
<
sheet
::
XDatabaseRange
>
init
(
const
rtl
::
OUString
&
rName
);
virtual
void
setUp
();
virtual
void
tearDown
();
void
testDataArea
();
void
testGetSortDescriptor
();
...
...
@@ -52,8 +56,16 @@ class ScXDatabaseRange : public UnoApiTest
CPPUNIT_TEST
(
testGetSortDescriptor
);
CPPUNIT_TEST
(
testGetSubtotalDescriptor
);
CPPUNIT_TEST_SUITE_END
();
private
:
uno
::
Reference
<
sheet
::
XDatabaseRange
>
init
(
const
rtl
::
OUString
&
rName
);
static
int
nTest
;
static
uno
::
Reference
<
lang
::
XComponent
>
xComponent
;
};
int
ScXDatabaseRange
::
nTest
=
0
;
uno
::
Reference
<
lang
::
XComponent
>
ScXDatabaseRange
::
xComponent
;
/**
* tests setDataArea and getDataArea
*/
...
...
@@ -154,7 +166,6 @@ uno::Reference< sheet::XDatabaseRange > ScXDatabaseRange::init(const rtl::OUStri
const
rtl
::
OUString
aFileBase
(
RTL_CONSTASCII_USTRINGPARAM
(
"xdatabaserange.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
);
...
...
@@ -166,6 +177,29 @@ uno::Reference< sheet::XDatabaseRange > ScXDatabaseRange::init(const rtl::OUStri
return
xDBRange
;
}
void
ScXDatabaseRange
::
setUp
()
{
nTest
+=
1
;
UnoApiTest
::
setUp
();
}
void
ScXDatabaseRange
::
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
(
ScXDatabaseRange
);
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