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
6fc868c6
Kaydet (Commit)
6fc868c6
authored
Eki 17, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix import of RTF_PARD inside RTF_SHPTXT
Change-Id: Id722b61cec9b8ae6550122e192affecadfcb1217
üst
76737b0f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
1 deletion
+33
-1
shptxt-pard.rtf
sw/qa/extras/rtfimport/data/shptxt-pard.rtf
+19
-0
rtfimport.cxx
sw/qa/extras/rtfimport/rtfimport.cxx
+12
-0
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+2
-1
No files found.
sw/qa/extras/rtfimport/data/shptxt-pard.rtf
0 → 100644
Dosyayı görüntüle @
6fc868c6
{\rtf1
first par
\par
{\shp
{\*\shpinst\shpleft1371\shptop6712\shpright2453\shpbottom6887\shpfhdr0\shpbxpage\shpbxignore\shpbypara\shpbyignore\shpwr3\shpwrk0\shpfblwtxt0\shpz0\shplid1026
{\sp
{\sn shapeType}
{\sv 1}
}
{\shptxt \ltrpar
\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe1033\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033
\rtlch\fcs1
\af0\afs16\alang1037 \ltrch\fcs0 \f0\fs16\insrsid11286377 \hich\af0\dbch\af31505\loch\f0 shape text
\par
}
}
}
second par\par
}
sw/qa/extras/rtfimport/rtfimport.cxx
Dosyayı görüntüle @
6fc868c6
...
@@ -115,6 +115,7 @@ public:
...
@@ -115,6 +115,7 @@ public:
void
testFdo52475
();
void
testFdo52475
();
void
testFdo55493
();
void
testFdo55493
();
void
testCopyPastePageStyle
();
void
testCopyPastePageStyle
();
void
testShptxtPard
();
CPPUNIT_TEST_SUITE
(
Test
);
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
#if !defined(MACOSX) && !defined(WNT)
...
@@ -169,6 +170,7 @@ public:
...
@@ -169,6 +170,7 @@ public:
CPPUNIT_TEST
(
testFdo52475
);
CPPUNIT_TEST
(
testFdo52475
);
CPPUNIT_TEST
(
testFdo55493
);
CPPUNIT_TEST
(
testFdo55493
);
CPPUNIT_TEST
(
testCopyPastePageStyle
);
CPPUNIT_TEST
(
testCopyPastePageStyle
);
CPPUNIT_TEST
(
testShptxtPard
);
#endif
#endif
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
...
@@ -893,6 +895,16 @@ void Test::testCopyPastePageStyle()
...
@@ -893,6 +895,16 @@ void Test::testCopyPastePageStyle()
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
21001
),
getProperty
<
sal_Int32
>
(
xPropertySet
,
"Width"
));
// Was letter, i.e. 21590
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
21001
),
getProperty
<
sal_Int32
>
(
xPropertySet
,
"Width"
));
// Was letter, i.e. 21590
}
}
void
Test
::
testShptxtPard
()
{
// The problem was that \pard inside \shptxt caused loss of shape text
load
(
"shptxt-pard.rtf"
);
uno
::
Reference
<
drawing
::
XDrawPageSupplier
>
xDrawPageSupplier
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XIndexAccess
>
xDraws
(
xDrawPageSupplier
->
getDrawPage
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
text
::
XText
>
xText
(
xDraws
->
getByIndex
(
0
),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"shape text"
),
xText
->
getString
());
}
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 @
6fc868c6
...
@@ -2001,7 +2001,8 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
...
@@ -2001,7 +2001,8 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
m_aStates
.
top
().
aParagraphSprms
=
m_aDefaultState
.
aParagraphSprms
;
m_aStates
.
top
().
aParagraphSprms
=
m_aDefaultState
.
aParagraphSprms
;
m_aStates
.
top
().
aParagraphAttributes
=
m_aDefaultState
.
aParagraphAttributes
;
m_aStates
.
top
().
aParagraphAttributes
=
m_aDefaultState
.
aParagraphAttributes
;
m_aStates
.
top
().
resetFrame
();
m_aStates
.
top
().
resetFrame
();
m_pCurrentBuffer
=
0
;
if
(
m_aStates
.
top
().
nDestinationState
!=
DESTINATION_SHAPETEXT
)
m_pCurrentBuffer
=
0
;
break
;
break
;
case
RTF_SECTD
:
case
RTF_SECTD
:
m_aStates
.
top
().
aSectionSprms
=
m_aDefaultState
.
aSectionSprms
;
m_aStates
.
top
().
aSectionSprms
=
m_aDefaultState
.
aSectionSprms
;
...
...
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