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
92009abe
Kaydet (Commit)
92009abe
authored
Şub 19, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add testRefresh to XDatabaseRange
XDatabase range test case is now finished
üst
e521ac1a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
xdatabaserange.hxx
test/inc/test/sheet/xdatabaserange.hxx
+1
-0
xdatabaserange.cxx
test/source/sheet/xdatabaserange.cxx
+47
-0
No files found.
test/inc/test/sheet/xdatabaserange.hxx
Dosyayı görüntüle @
92009abe
...
...
@@ -45,6 +45,7 @@ public:
void
testGetSubtotalDescriptor
();
void
testGetImportDescriptor
();
void
testGetFilterDescriptor
();
void
testRefresh
();
};
}
...
...
test/source/sheet/xdatabaserange.cxx
Dosyayı görüntüle @
92009abe
...
...
@@ -37,6 +37,10 @@
#include <com/sun/star/table/CellRangeAddress.hpp>
#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
#include <com/sun/star/table/XCell.hpp>
#include <com/sun/star/table/XTableRows.hpp>
#include <com/sun/star/table/XColumnRowRange.hpp>
#include <rtl/oustringostreaminserter.hxx>
#include "cppunit/extensions/HelperMacros.h"
...
...
@@ -153,6 +157,49 @@ void XDatabaseRange::testGetImportDescriptor()
uno
::
Sequence
<
beans
::
PropertyValue
>
xImportDescr
=
xDBRange
->
getImportDescriptor
();
}
void
XDatabaseRange
::
testRefresh
()
{
uno
::
Reference
<
sheet
::
XDatabaseRange
>
xDBRange
(
init
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Refresh"
))),
UNO_QUERY_THROW
);
const
sal_Int32
nCol
=
0
;
rtl
::
OUString
aHidden
(
RTL_CONSTASCII_USTRINGPARAM
(
"IsVisible"
));
uno
::
Reference
<
sheet
::
XCellRangeReferrer
>
xCellRangeReferrer
(
xDBRange
,
UNO_QUERY_THROW
);
uno
::
Reference
<
table
::
XCellRange
>
xCellRange
=
xCellRangeReferrer
->
getReferredCells
();
for
(
sal_Int32
i
=
1
;
i
<
5
;
++
i
)
{
uno
::
Reference
<
table
::
XCell
>
xCell
=
xCellRange
->
getCellByPosition
(
nCol
,
i
);
xCell
->
setValue
(
0
);
}
for
(
sal_Int32
i
=
2
;
i
<
5
;
++
i
)
{
uno
::
Reference
<
table
::
XColumnRowRange
>
xColRowRange
(
xCellRange
,
UNO_QUERY_THROW
);
uno
::
Reference
<
table
::
XTableRows
>
xRows
=
xColRowRange
->
getRows
();
uno
::
Reference
<
table
::
XCellRange
>
xRow
(
xRows
->
getByIndex
(
i
),
UNO_QUERY_THROW
);
uno
::
Reference
<
beans
::
XPropertySet
>
xPropRow
(
xRow
,
UNO_QUERY_THROW
);
Any
aAny
=
xPropRow
->
getPropertyValue
(
aHidden
);
CPPUNIT_ASSERT
(
aAny
.
get
<
sal_Bool
>
()
==
true
);
}
xDBRange
->
refresh
();
std
::
cout
<<
"after refresh"
<<
std
::
endl
;
for
(
sal_Int32
i
=
1
;
i
<
5
;
++
i
)
{
uno
::
Reference
<
table
::
XColumnRowRange
>
xColRowRange
(
xCellRange
,
UNO_QUERY_THROW
);
uno
::
Reference
<
table
::
XTableRows
>
xRows
=
xColRowRange
->
getRows
();
uno
::
Reference
<
table
::
XCellRange
>
xRow
(
xRows
->
getByIndex
(
i
),
UNO_QUERY_THROW
);
uno
::
Reference
<
beans
::
XPropertySet
>
xPropRow
(
xRow
,
UNO_QUERY_THROW
);
Any
aAny
=
xPropRow
->
getPropertyValue
(
aHidden
);
CPPUNIT_ASSERT
(
aAny
.
get
<
sal_Bool
>
()
==
false
);
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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