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
92da8fc4
Kaydet (Commit)
92da8fc4
authored
Nis 15, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: add textframe gradient RTF roundtrip testcase
Change-Id: I8e4f6b926123c79ad1a62ddd4c5feebf5fe06cf0
üst
d3f7925c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
186 additions
and
0 deletions
+186
-0
textframe-gradient.rtf
sw/qa/extras/rtfexport/data/textframe-gradient.rtf
+161
-0
rtfexport.cxx
sw/qa/extras/rtfexport/rtfexport.cxx
+25
-0
No files found.
sw/qa/extras/rtfexport/data/textframe-gradient.rtf
0 → 100644
Dosyayı görüntüle @
92da8fc4
{\rtf1
{\shp
{\*\shpinst\shpleft-540\shptop152\shpright9900\shpbottom1592\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz0\shplid1026
{\sp
{\sn shapeType}
{\sv 1}
}
{\sp
{\sn fFlipH}
{\sv 0}
}
{\sp
{\sn fFlipV}
{\sv 0}
}
{\sp
{\sn lTxid}
{\sv 65536}
}
{\sp
{\sn hspNext}
{\sv 1026}
}
{\sp
{\sn fillType}
{\sv 7}
}
{\sp
{\sn fillColor}
{\sv 9737689}
}
{\sp
{\sn fillBackColor}
{\sv 5066944}
}
{\sp
{\sn fillFocus}
{\sv 50}
}
{\sp
{\sn lineColor}
{\sv 5066944}
}
{\sp
{\sn lineWidth}
{\sv 12700}
}
{\sp
{\sn shadowType}
{\sv 2}
}
{\sp
{\sn shadowColor}
{\sv 2303074}
}
{\sp
{\sn shadowOffsetX}
{\sv 12700}
}
{\sp
{\sn shadowSecondOffsetX}
{\sv -38100}
}
{\sp
{\sn fShadow}
{\sv 1}
}
{\sp
{\sn dhgt}
{\sv 251660288}
}
{\sp
{\sn fLayoutInCell}
{\sv 1}
}
{\shptxt foo
\par
}
}
}
\par
{\shp
{\*\shpinst\shpleft5760\shptop90\shpright9840\shpbottom1170\shpfhdr0\shpbxcolumn\shpbxignore\shpbypara\shpbyignore\shpwr2\shpwrk0\shpfblwtxt0\shpz1\shplid1027
{\sp
{\sn shapeType}
{\sv 202}
}
{\sp
{\sn fFlipH}
{\sv 0}
}
{\sp
{\sn fFlipV}
{\sv 0}
}
{\sp
{\sn lTxid}
{\sv 131072}
}
{\sp
{\sn hspNext}
{\sv 1027}
}
{\sp
{\sn fillType}
{\sv 7}
}
{\sp
{\sn fillColor}
{\sv 6710886}
}
{\sp
{\sn fillBackColor}
{\sv 0}
}
{\sp
{\sn fillFocus}
{\sv 50}
}
{\sp
{\sn lineColor}
{\sv 0}
}
{\sp
{\sn lineWidth}
{\sv 12700}
}
{\sp
{\sn shadowType}
{\sv 2}
}
{\sp
{\sn shadowColor}
{\sv 8355711}
}
{\sp
{\sn shadowOffsetX}
{\sv 12700}
}
{\sp
{\sn shadowSecondOffsetX}
{\sv -38100}
}
{\sp
{\sn fShadow}
{\sv 1}
}
{\sp
{\sn dhgt}
{\sv 251661312}
}
{\sp
{\sn fLayoutInCell}
{\sv 1}
}
{\shptxt bar
\par }
}
}
\par
}
sw/qa/extras/rtfexport/rtfexport.cxx
Dosyayı görüntüle @
92da8fc4
...
...
@@ -25,8 +25,10 @@
* instead of those above.
*/
#include <com/sun/star/awt/Gradient.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/table/ShadowFormat.hpp>
...
...
@@ -80,6 +82,7 @@ public:
void
testBookmark
();
void
testHyperlink
();
void
testTextFrameBorders
();
void
testTextframeGradient
();
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
...
...
@@ -132,6 +135,7 @@ void Test::run()
{
"bookmark.rtf"
,
&
Test
::
testBookmark
},
{
"hyperlink.rtf"
,
&
Test
::
testHyperlink
},
{
"textframe-borders.rtf"
,
&
Test
::
testTextFrameBorders
},
{
"textframe-gradient.rtf"
,
&
Test
::
testTextframeGradient
},
};
// Don't test the first import of these, for some reason those tests fail
const
char
*
aBlacklist
[]
=
{
...
...
@@ -578,6 +582,27 @@ void Test::testTextFrameBorders()
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0x622423
),
aShadowFormat
.
Color
);
}
void
Test
::
testTextframeGradient
()
{
uno
::
Reference
<
text
::
XTextFramesSupplier
>
xTextFramesSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XIndexAccess
>
xIndexAccess
(
xTextFramesSupplier
->
getTextFrames
(),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
2
),
xIndexAccess
->
getCount
());
uno
::
Reference
<
beans
::
XPropertySet
>
xFrame
(
xIndexAccess
->
getByIndex
(
0
),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
drawing
::
FillStyle_GRADIENT
,
getProperty
<
drawing
::
FillStyle
>
(
xFrame
,
"FillStyle"
));
awt
::
Gradient
aGradient
=
getProperty
<
awt
::
Gradient
>
(
xFrame
,
"FillGradient"
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0xC0504D
),
aGradient
.
StartColor
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0xD99594
),
aGradient
.
EndColor
);
CPPUNIT_ASSERT_EQUAL
(
awt
::
GradientStyle_AXIAL
,
aGradient
.
Style
);
xFrame
.
set
(
xIndexAccess
->
getByIndex
(
1
),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
drawing
::
FillStyle_GRADIENT
,
getProperty
<
drawing
::
FillStyle
>
(
xFrame
,
"FillStyle"
));
aGradient
=
getProperty
<
awt
::
Gradient
>
(
xFrame
,
"FillGradient"
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0x000000
),
aGradient
.
StartColor
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0x666666
),
aGradient
.
EndColor
);
CPPUNIT_ASSERT_EQUAL
(
awt
::
GradientStyle_AXIAL
,
aGradient
.
Style
);
}
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