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
31973b54
Kaydet (Commit)
31973b54
authored
Şub 02, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#74325: Write unit test for cell note export to ods.
Change-Id: Ic145781a6c2d7fefb4e80b3a84735e0fb505b0e7
üst
7d2e1c20
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
1 deletion
+32
-1
document.hxx
sc/inc/document.hxx
+1
-1
single-note.ods
sc/qa/unit/data/ods/single-note.ods
+0
-0
subsequent_export-test.cxx
sc/qa/unit/subsequent_export-test.cxx
+31
-0
No files found.
sc/inc/document.hxx
Dosyayı görüntüle @
31973b54
...
@@ -902,7 +902,7 @@ public:
...
@@ -902,7 +902,7 @@ public:
SC_DLLPUBLIC
ScPostIt
*
GetNote
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
);
SC_DLLPUBLIC
ScPostIt
*
GetNote
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
);
void
SetNote
(
const
ScAddress
&
rPos
,
ScPostIt
*
pNote
);
void
SetNote
(
const
ScAddress
&
rPos
,
ScPostIt
*
pNote
);
void
SetNote
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
,
ScPostIt
*
pNote
);
void
SetNote
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
,
ScPostIt
*
pNote
);
bool
HasNote
(
const
ScAddress
&
rPos
);
SC_DLLPUBLIC
bool
HasNote
(
const
ScAddress
&
rPos
);
bool
HasNote
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
);
bool
HasNote
(
SCCOL
nCol
,
SCROW
nRow
,
SCTAB
nTab
);
SC_DLLPUBLIC
bool
HasColNotes
(
SCCOL
nCol
,
SCTAB
nTab
);
SC_DLLPUBLIC
bool
HasColNotes
(
SCCOL
nCol
,
SCTAB
nTab
);
SC_DLLPUBLIC
bool
HasTabNotes
(
SCTAB
nTab
);
SC_DLLPUBLIC
bool
HasTabNotes
(
SCTAB
nTab
);
...
...
sc/qa/unit/data/ods/single-note.ods
0 → 100644
Dosyayı görüntüle @
31973b54
File added
sc/qa/unit/subsequent_export-test.cxx
Dosyayı görüntüle @
31973b54
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include "editutil.hxx"
#include "editutil.hxx"
#include "scopetools.hxx"
#include "scopetools.hxx"
#include "cellvalue.hxx"
#include "cellvalue.hxx"
#include <postit.hxx>
#include "svx/svdoole2.hxx"
#include "svx/svdoole2.hxx"
#include "tabprotection.hxx"
#include "tabprotection.hxx"
...
@@ -67,6 +68,7 @@ public:
...
@@ -67,6 +68,7 @@ public:
void
testRichTextExportODS
();
void
testRichTextExportODS
();
void
testCellValuesExportODS
();
void
testCellValuesExportODS
();
void
testCellNoteExportODS
();
void
testFormatExportODS
();
void
testFormatExportODS
();
void
testInlineArrayXLS
();
void
testInlineArrayXLS
();
...
@@ -87,6 +89,7 @@ public:
...
@@ -87,6 +89,7 @@ public:
CPPUNIT_TEST
(
testNamedRangeBugfdo62729
);
CPPUNIT_TEST
(
testNamedRangeBugfdo62729
);
CPPUNIT_TEST
(
testRichTextExportODS
);
CPPUNIT_TEST
(
testRichTextExportODS
);
CPPUNIT_TEST
(
testCellValuesExportODS
);
CPPUNIT_TEST
(
testCellValuesExportODS
);
CPPUNIT_TEST
(
testCellNoteExportODS
);
CPPUNIT_TEST
(
testFormatExportODS
);
CPPUNIT_TEST
(
testFormatExportODS
);
CPPUNIT_TEST
(
testInlineArrayXLS
);
CPPUNIT_TEST
(
testInlineArrayXLS
);
CPPUNIT_TEST
(
testEmbeddedChartXLS
);
CPPUNIT_TEST
(
testEmbeddedChartXLS
);
...
@@ -661,6 +664,34 @@ void ScExportTest::testCellValuesExportODS()
...
@@ -661,6 +664,34 @@ void ScExportTest::testCellValuesExportODS()
xNewDocSh
->
DoClose
();
xNewDocSh
->
DoClose
();
}
}
void
ScExportTest
::
testCellNoteExportODS
()
{
ScDocShellRef
xOrigDocSh
=
loadDoc
(
"single-note."
,
ODS
);
ScDocument
*
pDoc
=
xOrigDocSh
->
GetDocument
();
ScAddress
aPos
(
0
,
0
,
0
);
// Start with A1.
CPPUNIT_ASSERT_MESSAGE
(
"There should be a note at A1."
,
pDoc
->
HasNote
(
aPos
));
aPos
.
IncRow
();
// Move to A2.
ScPostIt
*
pNote
=
pDoc
->
GetOrCreateNote
(
aPos
);
pNote
->
SetText
(
aPos
,
"Note One"
);
pNote
->
SetAuthor
(
"Author One"
);
CPPUNIT_ASSERT_MESSAGE
(
"There should be a note at A2."
,
pDoc
->
HasNote
(
aPos
));
// save and reload
ScDocShellRef
xNewDocSh
=
saveAndReload
(
xOrigDocSh
,
ODS
);
xOrigDocSh
->
DoClose
();
CPPUNIT_ASSERT
(
xNewDocSh
.
Is
());
pDoc
=
xNewDocSh
->
GetDocument
();
aPos
.
SetRow
(
0
);
// Move back to A1.
CPPUNIT_ASSERT_MESSAGE
(
"There should be a note at A1."
,
pDoc
->
HasNote
(
aPos
));
aPos
.
IncRow
();
// Move to A2.
CPPUNIT_ASSERT_MESSAGE
(
"There should be a note at A2."
,
pDoc
->
HasNote
(
aPos
));
xNewDocSh
->
DoClose
();
}
namespace
{
namespace
{
void
checkMatrixRange
(
ScDocument
&
rDoc
,
const
ScRange
&
rRange
)
void
checkMatrixRange
(
ScDocument
&
rDoc
,
const
ScRange
&
rRange
)
...
...
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