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
e841dd17
Kaydet (Commit)
e841dd17
authored
Kas 29, 2014
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add test case for fdo#86253
Change-Id: I943351a9050f78ea3495807570c51e0c7782ead3
üst
1e4fc94c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
ucalc.cxx
sc/qa/unit/ucalc.cxx
+42
-0
ucalc.hxx
sc/qa/unit/ucalc.hxx
+2
-0
No files found.
sc/qa/unit/ucalc.cxx
Dosyayı görüntüle @
e841dd17
...
...
@@ -5635,6 +5635,48 @@ void Test::testCondCopyPasteSingleCell()
m_pDoc
->
DeleteTab
(
0
);
}
void
Test
::
testCondCopyPasteSingleCellToRange
()
{
m_pDoc
->
InsertTab
(
0
,
"Test"
);
ScConditionalFormat
*
pFormat
=
new
ScConditionalFormat
(
1
,
m_pDoc
);
ScRange
aCondFormatRange
(
0
,
0
,
0
,
3
,
3
,
0
);
ScRangeList
aRangeList
(
aCondFormatRange
);
pFormat
->
AddRange
(
aRangeList
);
ScCondFormatEntry
*
pEntry
=
new
ScCondFormatEntry
(
SC_COND_DIRECT
,
"=B2"
,
""
,
m_pDoc
,
ScAddress
(
0
,
0
,
0
),
ScGlobal
::
GetRscString
(
STR_STYLENAME_RESULT
));
pFormat
->
AddEntry
(
pEntry
);
sal_uLong
nIndex
=
m_pDoc
->
AddCondFormat
(
pFormat
,
0
);
ScDocument
aClipDoc
(
SCDOCMODE_CLIP
);
copyToClip
(
m_pDoc
,
ScRange
(
0
,
0
,
0
,
0
,
0
,
0
),
&
aClipDoc
);
ScRange
aTargetRange
(
4
,
4
,
0
,
4
,
8
,
0
);
pasteFromClip
(
m_pDoc
,
aTargetRange
,
&
aClipDoc
);
std
::
set
<
sal_uLong
>
aCondFormatIndices
;
for
(
SCROW
nRow
=
4
;
nRow
<=
8
;
++
nRow
)
{
ScConditionalFormat
*
pPastedFormat
=
m_pDoc
->
GetCondFormat
(
4
,
nRow
,
0
);
CPPUNIT_ASSERT
(
pPastedFormat
);
CPPUNIT_ASSERT_EQUAL
(
ScRangeList
(
ScRange
(
4
,
nRow
,
0
)),
pPastedFormat
->
GetRange
());
sal_uLong
nPastedKey
=
pPastedFormat
->
GetKey
();
CPPUNIT_ASSERT
(
nIndex
!=
nPastedKey
);
const
SfxPoolItem
*
pItem
=
m_pDoc
->
GetAttr
(
4
,
nRow
,
0
,
ATTR_CONDITIONAL
);
const
ScCondFormatItem
*
pCondFormatItem
=
static_cast
<
const
ScCondFormatItem
*>
(
pItem
);
CPPUNIT_ASSERT
(
pCondFormatItem
);
CPPUNIT_ASSERT_EQUAL
(
size_t
(
1
),
pCondFormatItem
->
GetCondFormatData
().
size
());
CPPUNIT_ASSERT
(
nIndex
!=
pCondFormatItem
->
GetCondFormatData
().
at
(
0
)
);
auto
itr
=
aCondFormatIndices
.
find
(
nPastedKey
);
CPPUNIT_ASSERT
(
itr
==
aCondFormatIndices
.
end
());
aCondFormatIndices
.
insert
(
nPastedKey
);
}
m_pDoc
->
DeleteTab
(
0
);
}
void
Test
::
testCondCopyPasteSheetBetweenDoc
()
{
m_pDoc
->
InsertTab
(
0
,
"Test"
);
...
...
sc/qa/unit/ucalc.hxx
Dosyayı görüntüle @
e841dd17
...
...
@@ -410,6 +410,7 @@ public:
void
testCondFormatInsertDeleteSheets
();
void
testCondCopyPaste
();
void
testCondCopyPasteSingleCell
();
//e.g. fdo#82503
void
testCondCopyPasteSingleCellToRange
();
//e.g. fdo#82503
void
testCondCopyPasteSheetBetweenDoc
();
void
testCondCopyPasteSheet
();
void
testIconSet
();
...
...
@@ -606,6 +607,7 @@ public:
CPPUNIT_TEST
(
testCondFormatInsertDeleteSheets
);
CPPUNIT_TEST
(
testCondCopyPaste
);
CPPUNIT_TEST
(
testCondCopyPasteSingleCell
);
CPPUNIT_TEST
(
testCondCopyPasteSingleCellToRange
);
CPPUNIT_TEST
(
testCondCopyPasteSheetBetweenDoc
);
CPPUNIT_TEST
(
testCondCopyPasteSheet
);
CPPUNIT_TEST
(
testIconSet
);
...
...
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