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
bb9fce28
Kaydet (Commit)
bb9fce28
authored
Nis 15, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: RTF export of TextFrame border/shadow testcase
Change-Id: I85b85afb6d1b170d71633f93d56f7ce4fffdf0a3
üst
d74ba0c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
0 deletions
+70
-0
textframe-borders.rtf
sw/qa/extras/rtfexport/data/textframe-borders.rtf
+49
-0
rtfexport.cxx
sw/qa/extras/rtfexport/rtfexport.cxx
+21
-0
No files found.
sw/qa/extras/rtfexport/data/textframe-borders.rtf
0 → 100644
Dosyayı görüntüle @
bb9fce28
{\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 fFitShapeToText}
{\sv 1}
}
{\sp
{\sn fillColor}
{\sv 9737689}
}
{\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}
}
{\shptxt aaa
}
}
}
\par
}
sw/qa/extras/rtfexport/rtfexport.cxx
Dosyayı görüntüle @
bb9fce28
...
...
@@ -28,6 +28,8 @@
#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/table/BorderLine2.hpp>
#include <com/sun/star/table/ShadowFormat.hpp>
#include <com/sun/star/text/XFootnotesSupplier.hpp>
#include <com/sun/star/text/XPageCursor.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
...
...
@@ -77,6 +79,7 @@ public:
void
testI120928
();
void
testBookmark
();
void
testHyperlink
();
void
testTextFrameBorders
();
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
...
...
@@ -128,6 +131,7 @@ void Test::run()
{
"i120928.rtf"
,
&
Test
::
testI120928
},
{
"bookmark.rtf"
,
&
Test
::
testBookmark
},
{
"hyperlink.rtf"
,
&
Test
::
testHyperlink
},
{
"textframe-borders.rtf"
,
&
Test
::
testTextFrameBorders
},
};
// Don't test the first import of these, for some reason those tests fail
const
char
*
aBlacklist
[]
=
{
...
...
@@ -557,6 +561,23 @@ void Test::testHyperlink()
CPPUNIT_ASSERT_EQUAL
(
OUString
(
""
),
getProperty
<
OUString
>
(
getRun
(
getParagraph
(
1
),
3
,
"!"
),
"HyperLinkURL"
));
}
void
Test
::
testTextFrameBorders
()
{
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
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0xD99594
),
getProperty
<
sal_Int32
>
(
xFrame
,
"BackColor"
));
table
::
BorderLine2
aBorder
=
getProperty
<
table
::
BorderLine2
>
(
xFrame
,
"TopBorder"
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0xC0504D
),
aBorder
.
Color
);
CPPUNIT_ASSERT_EQUAL
(
sal_uInt32
(
35
),
aBorder
.
LineWidth
);
table
::
ShadowFormat
aShadowFormat
=
getProperty
<
table
::
ShadowFormat
>
(
xFrame
,
"ShadowFormat"
);
CPPUNIT_ASSERT_EQUAL
(
table
::
ShadowLocation_BOTTOM_RIGHT
,
aShadowFormat
.
Location
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int16
(
48
),
aShadowFormat
.
ShadowWidth
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
0x622423
),
aShadowFormat
.
Color
);
}
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