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
97be5567
Kaydet (Commit)
97be5567
authored
Agu 15, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#53113 testcase
Change-Id: I64cb3050dcfd10253daa521b2c5fa69ed1cfa952
üst
e40f2678
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
fdo53113.odt
sw/qa/extras/rtfexport/data/fdo53113.odt
+0
-0
rtfexport.cxx
sw/qa/extras/rtfexport/rtfexport.cxx
+37
-0
No files found.
sw/qa/extras/rtfexport/data/fdo53113.odt
0 → 100644
Dosyayı görüntüle @
97be5567
File added
sw/qa/extras/rtfexport/rtfexport.cxx
Dosyayı görüntüle @
97be5567
...
...
@@ -28,6 +28,7 @@
#include "../swmodeltestbase.hxx"
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/text/XPageCursor.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
...
...
@@ -68,6 +69,7 @@ public:
void
testMathSubscripts
();
void
testMathVerticalstacks
();
void
testMathRuns
();
void
testFdo53113
();
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
...
...
@@ -99,6 +101,7 @@ public:
CPPUNIT_TEST
(
testMathVerticalstacks
);
CPPUNIT_TEST
(
testMathRuns
);
#endif
CPPUNIT_TEST
(
testFdo53113
);
#endif
CPPUNIT_TEST_SUITE_END
();
...
...
@@ -406,6 +409,40 @@ void Test::testMathRuns()
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"
\\
{ left [ right ] left ( right )
\\
}"
),
getFormula
(
getRun
(
getParagraph
(
1
),
1
)));
}
void
Test
::
testFdo53113
()
{
/*
* The problem was that a custom shape was missings its second (and all the other remaining) coordinates.
*
* oShape = ThisComponent.DrawPage(0)
* oPathPropVec = oShape.CustomShapeGeometry(1).Value
* oCoordinates = oPathPropVec(0).Value
* xray oCoordinates(1).First.Value ' 535
* xray oCoordinates(1).Second.Value ' 102
*/
roundtrip
(
"fdo53113.odt"
);
uno
::
Reference
<
drawing
::
XDrawPageSupplier
>
xDrawPageSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XIndexAccess
>
xDraws
(
xDrawPageSupplier
->
getDrawPage
(),
uno
::
UNO_QUERY
);
uno
::
Sequence
<
beans
::
PropertyValue
>
aProps
=
getProperty
<
uno
::
Sequence
<
beans
::
PropertyValue
>
>
(
xDraws
->
getByIndex
(
0
),
"CustomShapeGeometry"
);
for
(
int
i
=
0
;
i
<
aProps
.
getLength
();
++
i
)
{
const
beans
::
PropertyValue
&
rProp
=
aProps
[
i
];
if
(
rProp
.
Name
==
"Path"
)
rProp
.
Value
>>=
aProps
;
}
uno
::
Sequence
<
drawing
::
EnhancedCustomShapeParameterPair
>
aPairs
;
for
(
int
i
=
0
;
i
<
aProps
.
getLength
();
++
i
)
{
const
beans
::
PropertyValue
&
rProp
=
aProps
[
i
];
if
(
rProp
.
Name
==
"Coordinates"
)
rProp
.
Value
>>=
aPairs
;
}
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
16
),
aPairs
.
getLength
());
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
535
),
aPairs
[
1
].
First
.
Value
.
get
<
sal_Int32
>
());
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
102
),
aPairs
[
1
].
Second
.
Value
.
get
<
sal_Int32
>
());
}
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