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
08b4efb4
Kaydet (Commit)
08b4efb4
authored
Ara 30, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#54612 don't crash on RTF_DPPTX before RTF_DPPOLYCOUNT
Change-Id: I35bf580df157dee429d9dca193945ea95616d678
üst
f84bd3f0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
6 deletions
+55
-6
fdo54612.rtf
sw/qa/extras/rtfimport/data/fdo54612.rtf
+34
-0
rtfimport.cxx
sw/qa/extras/rtfimport/rtfimport.cxx
+10
-0
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+11
-6
No files found.
sw/qa/extras/rtfimport/data/fdo54612.rtf
0 → 100644
Dosyayı görüntüle @
08b4efb4
{\rtf
{\do\dobxpage\dobypage\dptxbx\dptxbxmar0
{\dptxbxtext\plain
\par}
\dpx720\dpy1305\dpxsize10005\dpysize2910\dplinehollow0
\dpfillpat0}
{\do\dobxpage\dobypage\dpline\dpptx0\dppty0\dpptx9870\dppty0\dpx735\dpy4830
\dpxsize9870\dpysize0\dplinesolid0\dplinecor0\dplinecog128\dplinecob128
\dplinew30}
{\do\dobxpage\dobypage\dptxbx\dptxbxmar0
{\dptxbxtext\plain\f1\fs36\b\ul
\par}
\dpx4605\dpy4935\dpxsize2640\dpysize435\dplinehollow0\dpfillpat0
}
{\do\dobxpage\dobypage\dpline\dpptx0\dppty0\dpptx9870\dppty0\dpx735\dpy5550
\dpxsize9870\dpysize0\dplinesolid0\dplinecor0\dplinecog128\dplinecob128
\dplinew30}
{\do\dobxpage\dobypage\dptxbx\dptxbxmar0
{\dptxbxtext\plain\f1\fs19\b
\par}
\dpx3555\dpy5910\dpxsize2235\dpysize240\dplinehollow0
\dpfillpat0}
{\do\dobxpage\dobypage\dptxbx\dptxbxmar0
{\dptxbxtext\plain\f1\fs19\b
\par}
\dpx3900\dpy6195\dpxsize1995\dpysize240\dplinehollow0
\dpfillpat0}
{\do\dobxpage\dobypage\dptxbx\dptxbxmar0
{\dptxbxtext\plain\f1\fs19
\par}
\dpx5835\dpy6195\dpxsize1245\dpysize240\dplinehollow0\dpfillpat0}
{\do\dobxpage\dobypage\dpline\dpptx0\dppty0\dpptx3480\dppty0\dpx6720\dpy6765
\dpxsize3480\dpysize0\dplinesolid0\dplinecor0\dplinecog0\dplinecob0\dplinew0}
}
sw/qa/extras/rtfimport/rtfimport.cxx
Dosyayı görüntüle @
08b4efb4
...
@@ -133,6 +133,7 @@ public:
...
@@ -133,6 +133,7 @@ public:
void
testFdo58076
();
void
testFdo58076
();
void
testFdo57678
();
void
testFdo57678
();
void
testFdo45183
();
void
testFdo45183
();
void
testFdo54612
();
CPPUNIT_TEST_SUITE
(
Test
);
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
#if !defined(MACOSX) && !defined(WNT)
...
@@ -216,6 +217,7 @@ void Test::run()
...
@@ -216,6 +217,7 @@ void Test::run()
{
"fdo58076.rtf"
,
&
Test
::
testFdo58076
},
{
"fdo58076.rtf"
,
&
Test
::
testFdo58076
},
{
"fdo57678.rtf"
,
&
Test
::
testFdo57678
},
{
"fdo57678.rtf"
,
&
Test
::
testFdo57678
},
{
"fdo45183.rtf"
,
&
Test
::
testFdo45183
},
{
"fdo45183.rtf"
,
&
Test
::
testFdo45183
},
{
"fdo54612.rtf"
,
&
Test
::
testFdo54612
},
};
};
header
();
header
();
for
(
unsigned
int
i
=
0
;
i
<
SAL_N_ELEMENTS
(
aMethods
);
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
SAL_N_ELEMENTS
(
aMethods
);
++
i
)
...
@@ -1005,6 +1007,14 @@ void Test::testFdo45183()
...
@@ -1005,6 +1007,14 @@ void Test::testFdo45183()
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
16237
),
getProperty
<
sal_Int32
>
(
xTables
->
getByIndex
(
0
),
"Width"
));
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
16237
),
getProperty
<
sal_Int32
>
(
xTables
->
getByIndex
(
0
),
"Width"
));
}
}
void
Test
::
testFdo54612
()
{
// \dpptx without a \dppolycount caused a crash.
uno
::
Reference
<
drawing
::
XDrawPageSupplier
>
xDrawPageSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XIndexAccess
>
xDraws
(
xDrawPageSupplier
->
getDrawPage
(),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
8
),
xDraws
->
getCount
());
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_PLUGIN_IMPLEMENT
();
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
writerfilter/source/rtftok/rtfdocumentimpl.cxx
Dosyayı görüntüle @
08b4efb4
...
@@ -3315,19 +3315,24 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
...
@@ -3315,19 +3315,24 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
case
RTF_DPPTX
:
case
RTF_DPPTX
:
{
{
RTFDrawingObject
&
rDrawingObject
=
m_aStates
.
top
().
aDrawingObject
;
RTFDrawingObject
&
rDrawingObject
=
m_aStates
.
top
().
aDrawingObject
;
if
(
!
rDrawingObject
.
aPolyLinePoints
.
hasElements
())
dispatchValue
(
RTF_DPPOLYCOUNT
,
2
);
rDrawingObject
.
aPolyLinePoints
[
rDrawingObject
.
aPolyLinePoints
.
getLength
()
-
rDrawingObject
.
nPolyLineCount
].
X
=
TWIP_TO_MM100
(
nParam
);
rDrawingObject
.
aPolyLinePoints
[
rDrawingObject
.
aPolyLinePoints
.
getLength
()
-
rDrawingObject
.
nPolyLineCount
].
X
=
TWIP_TO_MM100
(
nParam
);
}
}
break
;
break
;
case
RTF_DPPTY
:
case
RTF_DPPTY
:
{
{
RTFDrawingObject
&
rDrawingObject
=
m_aStates
.
top
().
aDrawingObject
;
RTFDrawingObject
&
rDrawingObject
=
m_aStates
.
top
().
aDrawingObject
;
rDrawingObject
.
aPolyLinePoints
[
rDrawingObject
.
aPolyLinePoints
.
getLength
()
-
rDrawingObject
.
nPolyLineCount
].
Y
=
TWIP_TO_MM100
(
nParam
);
if
(
rDrawingObject
.
aPolyLinePoints
.
hasElements
())
rDrawingObject
.
nPolyLineCount
--
;
if
(
rDrawingObject
.
nPolyLineCount
==
0
)
{
{
uno
::
Sequence
<
uno
::
Sequence
<
awt
::
Point
>
>
aPointSequenceSequence
(
1
);
rDrawingObject
.
aPolyLinePoints
[
rDrawingObject
.
aPolyLinePoints
.
getLength
()
-
rDrawingObject
.
nPolyLineCount
].
Y
=
TWIP_TO_MM100
(
nParam
);
aPointSequenceSequence
[
0
]
=
rDrawingObject
.
aPolyLinePoints
;
rDrawingObject
.
nPolyLineCount
--
;
rDrawingObject
.
xPropertySet
->
setPropertyValue
(
"PolyPolygon"
,
uno
::
Any
(
aPointSequenceSequence
));
if
(
rDrawingObject
.
nPolyLineCount
==
0
)
{
uno
::
Sequence
<
uno
::
Sequence
<
awt
::
Point
>
>
aPointSequenceSequence
(
1
);
aPointSequenceSequence
[
0
]
=
rDrawingObject
.
aPolyLinePoints
;
rDrawingObject
.
xPropertySet
->
setPropertyValue
(
"PolyPolygon"
,
uno
::
Any
(
aPointSequenceSequence
));
}
}
}
}
}
break
;
break
;
...
...
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