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
8ee0e1f3
Kaydet (Commit)
8ee0e1f3
authored
Nis 23, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
n#757890 add testcase
üst
5dd8e919
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
n757890.docx
sw/qa/extras/ooxmltok/data/n757890.docx
+0
-0
ooxmltok.cxx
sw/qa/extras/ooxmltok/ooxmltok.cxx
+27
-0
No files found.
sw/qa/extras/ooxmltok/data/n757890.docx
0 → 100644
Dosyayı görüntüle @
8ee0e1f3
File added
sw/qa/extras/ooxmltok/ooxmltok.cxx
Dosyayı görüntüle @
8ee0e1f3
...
@@ -28,11 +28,14 @@
...
@@ -28,11 +28,14 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/SetVariableType.hpp>
#include <com/sun/star/text/SetVariableType.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp>
#include <com/sun/star/text/XDependentTextField.hpp>
#include <com/sun/star/text/XDependentTextField.hpp>
#include <com/sun/star/text/XPageCursor.hpp>
#include <com/sun/star/text/XPageCursor.hpp>
#include <com/sun/star/text/XTextDocument.hpp>
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
#include <com/sun/star/text/XTextFieldsSupplier.hpp>
#include <com/sun/star/text/XTextFramesSupplier.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <test/bootstrapfixture.hxx>
#include <test/bootstrapfixture.hxx>
...
@@ -53,6 +56,7 @@ public:
...
@@ -53,6 +56,7 @@ public:
void
testN751117
();
void
testN751117
();
void
testN751017
();
void
testN751017
();
void
testN750935
();
void
testN750935
();
void
testN757890
();
CPPUNIT_TEST_SUITE
(
OoxmlModelTest
);
CPPUNIT_TEST_SUITE
(
OoxmlModelTest
);
#if !defined(MACOSX) && !defined(WNT)
#if !defined(MACOSX) && !defined(WNT)
...
@@ -60,6 +64,7 @@ public:
...
@@ -60,6 +64,7 @@ public:
CPPUNIT_TEST
(
testN751117
);
CPPUNIT_TEST
(
testN751117
);
CPPUNIT_TEST
(
testN751017
);
CPPUNIT_TEST
(
testN751017
);
CPPUNIT_TEST
(
testN750935
);
CPPUNIT_TEST
(
testN750935
);
CPPUNIT_TEST
(
testN757890
);
#endif
#endif
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
...
@@ -185,6 +190,28 @@ void OoxmlModelTest::testN750935()
...
@@ -185,6 +190,28 @@ void OoxmlModelTest::testN750935()
CPPUNIT_ASSERT_EQUAL
(
sal_Int16
(
5
),
xCursor
->
getPage
());
CPPUNIT_ASSERT_EQUAL
(
sal_Int16
(
5
),
xCursor
->
getPage
());
}
}
void
OoxmlModelTest
::
testN757890
()
{
load
(
"n757890.docx"
);
// The w:pStyle token affected the text outside the textbox.
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
<
beans
::
XPropertySet
>
xPara
(
xParaEnum
->
nextElement
(),
uno
::
UNO_QUERY
);
OUString
aValue
;
xPara
->
getPropertyValue
(
"ParaStyleName"
)
>>=
aValue
;
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Heading 1"
),
aValue
);
// This wan't centered
uno
::
Reference
<
text
::
XTextFramesSupplier
>
xTextFramesSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XIndexAccess
>
xIndexAccess
(
xTextFramesSupplier
->
getTextFrames
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xFrame
(
xIndexAccess
->
getByIndex
(
0
),
uno
::
UNO_QUERY
);
sal_Int16
nValue
;
xFrame
->
getPropertyValue
(
"HoriOrient"
)
>>=
nValue
;
CPPUNIT_ASSERT_EQUAL
(
text
::
HoriOrientation
::
CENTER
,
nValue
);
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
OoxmlModelTest
);
CPPUNIT_TEST_SUITE_REGISTRATION
(
OoxmlModelTest
);
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