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
1db251e1
Kaydet (Commit)
1db251e1
authored
Eki 12, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tdf#77014 create a test for this bug
Change-Id: Iebe72287f62da7382f12e7645b48fa666610a8c5
üst
959ac511
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
3 deletions
+53
-3
CppunitTest_sw_uiwriter.mk
sw/CppunitTest_sw_uiwriter.mk
+3
-3
tdf77014.odt
sw/qa/extras/uiwriter/data/tdf77014.odt
+0
-0
uiwriter.cxx
sw/qa/extras/uiwriter/uiwriter.cxx
+50
-0
No files found.
sw/CppunitTest_sw_uiwriter.mk
Dosyayı görüntüle @
1db251e1
...
...
@@ -22,18 +22,18 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_uiwriter, \
cppu \
cppuhelper \
editeng \
msword \
msword \
sal \
sfx \
svl \
svt \
svxcore \
svxcore \
sw \
test \
unotest \
vcl \
tl \
utl \
utl \
$(gb_UWINAPI) \
))
...
...
sw/qa/extras/uiwriter/data/tdf77014.odt
0 → 100644
Dosyayı görüntüle @
1db251e1
File added
sw/qa/extras/uiwriter/uiwriter.cxx
Dosyayı görüntüle @
1db251e1
...
...
@@ -166,6 +166,7 @@ public:
void
testTdf89720
();
void
testTdf88986
();
void
testTdf87922
();
void
testTdf77014
();
CPPUNIT_TEST_SUITE
(
SwUiWriterTest
);
CPPUNIT_TEST
(
testReplaceForward
);
...
...
@@ -241,6 +242,7 @@ public:
CPPUNIT_TEST
(
testTdf89720
);
CPPUNIT_TEST
(
testTdf88986
);
CPPUNIT_TEST
(
testTdf87922
);
CPPUNIT_TEST
(
testTdf77014
);
CPPUNIT_TEST_SUITE_END
();
private
:
...
...
@@ -2696,6 +2698,54 @@ void SwUiWriterTest::testTdf87922()
CPPUNIT_ASSERT_EQUAL
(
COL_WHITE
,
aFont
.
GetColor
().
GetColor
());
}
void
SwUiWriterTest
::
testTdf77014
()
{
// The problem described in the bug tdf#77014 is that the input
// field text ("ThisIsAllOneWord") is broken up on linebreak, but
// it should be in one piece (like normal text).
// This test checks that the input field is in one piece.
load
(
DATA_DIRECTORY
,
"tdf77014.odt"
);
// First paragraph
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"POR_TXT"
),
parseDump
(
"/root/page/body/txt[4]/Text[1]"
,
"nType"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"91"
),
parseDump
(
"/root/page/body/txt[4]/Text[1]"
,
"nLength"
));
// The "Unknown" is the input field:
// which is 16 chars + 2 hidden chars (start & end input field) = 18 chars
// If this is correct then the input field is in one piece
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Unknown"
),
parseDump
(
"/root/page/body/txt[4]/Text[2]"
,
"nType"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"18"
),
parseDump
(
"/root/page/body/txt[4]/Text[2]"
,
"nLength"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"POR_TXT"
),
parseDump
(
"/root/page/body/txt[4]/Text[3]"
,
"nType"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"1"
),
parseDump
(
"/root/page/body/txt[4]/Text[3]"
,
"nLength"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"POR_TXT"
),
parseDump
(
"/root/page/body/txt[4]/Text[1]"
,
"nType"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"91"
),
parseDump
(
"/root/page/body/txt[4]/Text[1]"
,
"nLength"
));
// Second paragraph
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"POR_TXT"
),
parseDump
(
"/root/page/body/txt[5]/Text[1]"
,
"nType"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"91"
),
parseDump
(
"/root/page/body/txt[5]/Text[1]"
,
"nLength"
));
// The input field here has more words ("One Two Three Four Five")
// and it should break after "Two".
// "One Two" = 7 chars + 1 start input field hidden character = 8 chars
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Unknown"
),
parseDump
(
"/root/page/body/txt[5]/Text[2]"
,
"nType"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"8"
),
parseDump
(
"/root/page/body/txt[5]/Text[2]"
,
"nLength"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"POR_HOLE"
),
parseDump
(
"/root/page/body/txt[5]/Text[3]"
,
"nType"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"1"
),
parseDump
(
"/root/page/body/txt[5]/Text[3]"
,
"nLength"
));
// In new line..
// "Three Four Five" = 16 chars + 1 end input field hidden character = 16 chars
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Unknown"
),
parseDump
(
"/root/page/body/txt[5]/Text[4]"
,
"nType"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"16"
),
parseDump
(
"/root/page/body/txt[5]/Text[4]"
,
"nLength"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"POR_TXT"
),
parseDump
(
"/root/page/body/txt[5]/Text[5]"
,
"nType"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"1"
),
parseDump
(
"/root/page/body/txt[5]/Text[5]"
,
"nLength"
));
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
SwUiWriterTest
);
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