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
b8146f51
Kaydet (Commit)
b8146f51
authored
Tem 17, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#38244 testcase
Change-Id: I6df325a20994f789e4c6acdf5a2912a57a034276
üst
0977c512
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
0 deletions
+68
-0
fdo38244.docx
sw/qa/extras/ooxmlexport/data/fdo38244.docx
+0
-0
ooxmlexport.cxx
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+68
-0
No files found.
sw/qa/extras/ooxmlexport/data/fdo38244.docx
0 → 100644
Dosyayı görüntüle @
b8146f51
File added
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Dosyayı görüntüle @
b8146f51
...
...
@@ -40,11 +40,13 @@ class Test : public SwModelTestBase
public
:
void
testZoom
();
void
defaultTabStopNotInStyles
();
void
testFdo38244
();
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
CPPUNIT_TEST
(
testZoom
);
CPPUNIT_TEST
(
defaultTabStopNotInStyles
);
CPPUNIT_TEST
(
testFdo38244
);
#endif
CPPUNIT_TEST_SUITE_END
();
...
...
@@ -91,6 +93,72 @@ void Test::defaultTabStopNotInStyles()
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
sal_Int32
>
(
0
),
stops
.
getLength
());
}
void
Test
::
testFdo38244
()
{
roundtrip
(
"fdo38244.docx"
);
/*
* Comments attached to a range was imported without the range, check for the fieldmark start/end positions.
*
* oParas = ThisComponent.Text.createEnumeration
* oPara = oParas.nextElement
* oRuns = oPara.createEnumeration
* oRun = oRuns.nextElement
* oRun = oRuns.nextElement 'TextFieldStart
* oRun = oRuns.nextElement
* oRun = oRuns.nextElement 'TextFieldEnd
* xray oRun.TextPortionType
*/
uno
::
Reference
<
text
::
XTextDocument
>
xTextDocument
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XEnumerationAccess
>
xParaEnumAccess
(
xTextDocument
->
getText
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XEnumeration
>
xParaEnum
=
xParaEnumAccess
->
createEnumeration
();
uno
::
Reference
<
container
::
XEnumerationAccess
>
xRunEnumAccess
(
xParaEnum
->
nextElement
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XEnumeration
>
xRunEnum
=
xRunEnumAccess
->
createEnumeration
();
xRunEnum
->
nextElement
();
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
xRunEnum
->
nextElement
(),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"TextFieldStart"
),
getProperty
<
OUString
>
(
xPropertySet
,
"TextPortionType"
));
xRunEnum
->
nextElement
();
xPropertySet
.
set
(
xRunEnum
->
nextElement
(),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"TextFieldEnd"
),
getProperty
<
OUString
>
(
xPropertySet
,
"TextPortionType"
));
/*
* Initials were not imported.
*
* oFields = ThisComponent.TextFields.createEnumeration
* oField = oFields.nextElement
* xray oField.Initials
*/
uno
::
Reference
<
text
::
XTextFieldsSupplier
>
xTextFieldsSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XEnumerationAccess
>
xFieldsAccess
(
xTextFieldsSupplier
->
getTextFields
());
uno
::
Reference
<
container
::
XEnumeration
>
xFields
(
xFieldsAccess
->
createEnumeration
());
xPropertySet
.
set
(
xFields
->
nextElement
(),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"M"
),
getProperty
<
OUString
>
(
xPropertySet
,
"Initials"
));
/*
* There was a fake empty paragraph at the end of the comment text.
*
* oFields = ThisComponent.TextFields.createEnumeration
* oField = oFields.nextElement
* oParas = oField.TextRange.createEnumeration
* oPara = oParas.nextElement
* oPara = oParas.nextElement
*/
xParaEnumAccess
.
set
(
getProperty
<
uno
::
Reference
<
container
::
XEnumerationAccess
>
>
(
xPropertySet
,
"TextRange"
),
uno
::
UNO_QUERY
);
xParaEnum
=
xParaEnumAccess
->
createEnumeration
();
xParaEnum
->
nextElement
();
bool
bCaught
=
false
;
try
{
xParaEnum
->
nextElement
();
}
catch
(
container
::
NoSuchElementException
&
)
{
bCaught
=
true
;
}
CPPUNIT_ASSERT_EQUAL
(
true
,
bCaught
);
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
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