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
60912747
Kaydet (Commit)
60912747
authored
Ara 07, 2014
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
test for document merge
Change-Id: Ic6d10a611d9e9351eb9403e1405ec7b17293e816
üst
9215ab03
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
merge-change1.odt
sw/qa/extras/uiwriter/data/merge-change1.odt
+0
-0
merge-change2.odt
sw/qa/extras/uiwriter/data/merge-change2.odt
+0
-0
uiwriter.cxx
sw/qa/extras/uiwriter/uiwriter.cxx
+31
-0
No files found.
sw/qa/extras/uiwriter/data/merge-change1.odt
0 → 100644
Dosyayı görüntüle @
60912747
File added
sw/qa/extras/uiwriter/data/merge-change2.odt
0 → 100644
Dosyayı görüntüle @
60912747
File added
sw/qa/extras/uiwriter/uiwriter.cxx
Dosyayı görüntüle @
60912747
...
...
@@ -62,6 +62,7 @@ public:
void
testFdo85554
();
void
testAutoCorr
();
void
testFdo87005
();
void
testMergeDoc
();
CPPUNIT_TEST_SUITE
(
SwUiWriterTest
);
CPPUNIT_TEST
(
testReplaceForward
);
...
...
@@ -87,6 +88,7 @@ public:
CPPUNIT_TEST
(
testFdo85554
);
CPPUNIT_TEST
(
testAutoCorr
);
CPPUNIT_TEST
(
testFdo87005
);
CPPUNIT_TEST
(
testMergeDoc
);
CPPUNIT_TEST_SUITE_END
();
...
...
@@ -631,6 +633,35 @@ void SwUiWriterTest::testFdo87005()
assertXPath
(
pXmlDoc
,
"//Special[@nType='POR_FLY']"
,
2
);
}
void
SwUiWriterTest
::
testMergeDoc
()
{
SwDoc
*
const
pDoc1
(
createDoc
(
"merge-change1.odt"
));
auto
xDoc2Component
(
loadFromDesktop
(
getURLFromSrc
(
DATA_DIRECTORY
)
+
OUString
(
"merge-change2.odt"
),
"com.sun.star.text.TextDocument"
));
auto
pxDoc2Document
(
dynamic_cast
<
SwXTextDocument
*>
(
xDoc2Component
.
get
()));
CPPUNIT_ASSERT
(
pxDoc2Document
);
SwDoc
*
const
pDoc2
(
pxDoc2Document
->
GetDocShell
()
->
GetDoc
());
SwEditShell
*
const
pEditShell
(
pDoc1
->
GetEditShell
());
pEditShell
->
MergeDoc
(
*
pDoc2
);
// accept all redlines
while
(
pEditShell
->
GetRedlineCount
())
pEditShell
->
AcceptRedline
(
0
);
CPPUNIT_ASSERT_EQUAL
(
7
,
getParagraphs
());
getParagraph
(
1
,
"Para One: Two Three Four Five"
);
getParagraph
(
2
,
"Para Two: One Three Four Five"
);
getParagraph
(
3
,
"Para Three: One Two Four Five"
);
getParagraph
(
4
,
"Para Four: One Two Three Four Five"
);
getParagraph
(
5
,
"Para Six: One Three Four Five"
);
getParagraph
(
6
,
""
);
getParagraph
(
7
,
""
);
}
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