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
0e5455eb
Kaydet (Commit)
0e5455eb
authored
Şub 18, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
testcase for n#695479
üst
dac4874e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
0 deletions
+45
-0
n695479.rtf
sw/qa/extras/rtftok/data/n695479.rtf
+12
-0
rtftok.cxx
sw/qa/extras/rtftok/rtftok.cxx
+33
-0
No files found.
sw/qa/extras/rtftok/data/n695479.rtf
0 → 100644
Dosyayı görüntüle @
0e5455eb
{\rtf1
\paperw12240\paperh15840\margl360\margr360\margt360\margb302\gutter0\ltrsect
\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\pvpg\posx116\posy2167\absh-300\absw5134\overlay\faauto\rin0\lin0\itap0
\rtlch\fcs1 \af0\afs19\alang1025 \ltrch\fcs0 \fs19\lang1033\langfe1038\loch\af0\hich\af0\dbch\af31505\cgrid\langnp1033\langfenp1038
{\rtlch\fcs1 \af0\afs18 \ltrch\fcs0 \fs18\cf1\lang1038\langfe1038\langnp1038\insrsid10974703
\hich\af0\dbch\af31505\loch\f0 first
\par }
\pard \ltrpar\ql \li0\ri0\nowidctlpar\pvpg\posx5562\posy5417\absh-226\absw5946\overlay\faauto\rin0\lin0\itap0\pararsid15926738
{\rtlch\fcs1 \ab\af0 \ltrch\fcs0 \cf1\lang1038\langfe1038\langnp1038\insrsid10974703
second\par }
\pard plain\par
}
sw/qa/extras/rtftok/rtftok.cxx
Dosyayı görüntüle @
0e5455eb
...
@@ -28,8 +28,11 @@
...
@@ -28,8 +28,11 @@
#include <com/sun/star/text/XTextDocument.hpp>
#include <com/sun/star/text/XTextDocument.hpp>
#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/text/SizeType.hpp>
#include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
#include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
#include <com/sun/star/text/XTextFramesSupplier.hpp>
#include <rtl/oustringostreaminserter.hxx>
#include <test/bootstrapfixture.hxx>
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
#include <unotest/macros_test.hxx>
#include <vcl/outdev.hxx>
#include <vcl/outdev.hxx>
...
@@ -50,12 +53,14 @@ public:
...
@@ -50,12 +53,14 @@ public:
void
testFdo45553
();
void
testFdo45553
();
void
testN192129
();
void
testN192129
();
void
testFdo45543
();
void
testFdo45543
();
void
testN695479
();
CPPUNIT_TEST_SUITE
(
RtfModelTest
);
CPPUNIT_TEST_SUITE
(
RtfModelTest
);
#if !defined(MACOSX) && !defined(WNT)
#if !defined(MACOSX) && !defined(WNT)
CPPUNIT_TEST
(
testFdo45553
);
CPPUNIT_TEST
(
testFdo45553
);
CPPUNIT_TEST
(
testN192129
);
CPPUNIT_TEST
(
testN192129
);
CPPUNIT_TEST
(
testFdo45543
);
CPPUNIT_TEST
(
testFdo45543
);
CPPUNIT_TEST
(
testN695479
);
#endif
#endif
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
...
@@ -159,6 +164,34 @@ void RtfModelTest::testFdo45543()
...
@@ -159,6 +164,34 @@ void RtfModelTest::testFdo45543()
CPPUNIT_ASSERT_EQUAL
((
sal_Int32
)
5
,
aBuf
.
getLength
());
CPPUNIT_ASSERT_EQUAL
((
sal_Int32
)
5
,
aBuf
.
getLength
());
}
}
void
RtfModelTest
::
testN695479
()
{
load
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"n695479.rtf"
)));
uno
::
Reference
<
text
::
XTextFramesSupplier
>
xTextFramesSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XIndexAccess
>
xIndexAccess
(
xTextFramesSupplier
->
getTextFrames
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xPropertySet
(
xIndexAccess
->
getByIndex
(
0
),
uno
::
UNO_QUERY
);
// Negative ABSH should mean fixed size.
sal_Int16
nSizeType
=
0
;
uno
::
Any
aValue
=
xPropertySet
->
getPropertyValue
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"SizeType"
)));
aValue
>>=
nSizeType
;
CPPUNIT_ASSERT_EQUAL
(
text
::
SizeType
::
FIX
,
nSizeType
);
sal_Int32
nHeight
=
0
;
aValue
=
xPropertySet
->
getPropertyValue
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Height"
)));
aValue
>>=
nHeight
;
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
TWIP_TO_MM100
(
300
)),
nHeight
);
// Both frames should be anchored to the first paragraph.
for
(
int
i
=
0
;
i
<
2
;
++
i
)
{
uno
::
Reference
<
text
::
XTextContent
>
xTextContent
(
xIndexAccess
->
getByIndex
(
i
),
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XTextRange
>
xRange
(
xTextContent
->
getAnchor
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XText
>
xText
(
xRange
->
getText
(),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"plain"
)),
xText
->
getString
());
}
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
RtfModelTest
);
CPPUNIT_TEST_SUITE_REGISTRATION
(
RtfModelTest
);
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