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
8bf22e7f
Kaydet (Commit)
8bf22e7f
authored
Mar 25, 2014
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
related fdo#74981: add a unittest for kicks
Change-Id: I817948d053640b04dab8aaee85e914757b83cfa1
üst
25b1d866
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
uiwriter.cxx
sw/qa/extras/uiwriter/uiwriter.cxx
+29
-0
No files found.
sw/qa/extras/uiwriter/uiwriter.cxx
Dosyayı görüntüle @
8bf22e7f
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
#include <wrtsh.hxx>
#include <wrtsh.hxx>
#include <crsskip.hxx>
#include <crsskip.hxx>
#include <shellio.hxx>
#include <shellio.hxx>
#include <expfld.hxx>
#include "UndoManager.hxx"
#include "UndoManager.hxx"
...
@@ -30,6 +31,7 @@ public:
...
@@ -30,6 +31,7 @@ public:
void
testExportRTF
();
void
testExportRTF
();
void
testFdo75110
();
void
testFdo75110
();
void
testFdo75898
();
void
testFdo75898
();
void
testFdo74981
();
CPPUNIT_TEST_SUITE
(
SwUiWriterTest
);
CPPUNIT_TEST_SUITE
(
SwUiWriterTest
);
CPPUNIT_TEST
(
testReplaceForward
);
CPPUNIT_TEST
(
testReplaceForward
);
...
@@ -40,6 +42,7 @@ public:
...
@@ -40,6 +42,7 @@ public:
CPPUNIT_TEST
(
testExportRTF
);
CPPUNIT_TEST
(
testExportRTF
);
CPPUNIT_TEST
(
testFdo75110
);
CPPUNIT_TEST
(
testFdo75110
);
CPPUNIT_TEST
(
testFdo75898
);
CPPUNIT_TEST
(
testFdo75898
);
CPPUNIT_TEST
(
testFdo74981
);
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
private
:
private
:
...
@@ -232,6 +235,32 @@ void SwUiWriterTest::testExportRTF()
...
@@ -232,6 +235,32 @@ void SwUiWriterTest::testExportRTF()
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
-
1
),
aData
.
indexOf
(
"ccc"
));
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
-
1
),
aData
.
indexOf
(
"ccc"
));
}
}
void
SwUiWriterTest
::
testFdo74981
()
{
// create a document with an input field
SwDoc
*
pDoc
=
createDoc
();
SwWrtShell
*
pWrtShell
=
pDoc
->
GetDocShell
()
->
GetWrtShell
();
SwInputField
aField
((
SwInputFieldType
*
)
pWrtShell
->
GetFldType
(
0
,
RES_INPUTFLD
),
OUString
(
"foo"
),
OUString
(
"bar"
),
0
,
0
);
pWrtShell
->
Insert
(
aField
);
// expect hints
SwNodeIndex
aIdx
(
pDoc
->
GetNodes
().
GetEndOfContent
(),
-
1
);
SwTxtNode
*
pTxtNode
=
aIdx
.
GetNode
().
GetTxtNode
();
CPPUNIT_ASSERT
(
pTxtNode
->
HasHints
());
// go to the begin of the paragraph and split this node
pWrtShell
->
Left
(
CRSR_SKIP_CHARS
,
false
,
100
,
false
);
pWrtShell
->
SplitNode
();
// expect only the second paragraph to have hints
aIdx
=
SwNodeIndex
(
pDoc
->
GetNodes
().
GetEndOfContent
(),
-
1
);
pTxtNode
=
aIdx
.
GetNode
().
GetTxtNode
();
CPPUNIT_ASSERT
(
pTxtNode
->
HasHints
());
aIdx
--
;
pTxtNode
=
aIdx
.
GetNode
().
GetTxtNode
();
CPPUNIT_ASSERT
(
!
pTxtNode
->
HasHints
());
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
SwUiWriterTest
);
CPPUNIT_TEST_SUITE_REGISTRATION
(
SwUiWriterTest
);
CPPUNIT_PLUGIN_IMPLEMENT
();
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