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
ad72a47d
Kaydet (Commit)
ad72a47d
authored
Agu 13, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#47495 fix RTF import of multiple shapes inside textframes
Change-Id: Iee8541ff9e88139648d45f08968476f2b1d4e1b3
üst
462907d4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
192 additions
and
1 deletion
+192
-1
fdo47495.rtf
sw/qa/extras/rtfimport/data/fdo47495.rtf
+164
-0
rtfimport.cxx
sw/qa/extras/rtfimport/rtfimport.cxx
+9
-0
swmodeltestbase.hxx
sw/qa/extras/swmodeltestbase.hxx
+15
-0
rtfdocumentimpl.cxx
writerfilter/source/rtftok/rtfdocumentimpl.cxx
+4
-1
No files found.
sw/qa/extras/rtfimport/data/fdo47495.rtf
0 → 100644
Dosyayı görüntüle @
ad72a47d
{\rtf1\adeflang1025\ansi\ansicpg1251\uc1\adeff31507\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi31507\deflang1049\deflangfe1049\themelang1049\themelangfe0\themelangcs0
\pard \ltrpar\qc \li0\ri0\nowidctlpar\pvpg\phpg\posx632\posy2159\absh-139\absw10653\wrapdefault\faauto\rin0\lin0\itap0
{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid2168934
{\shp
{\*\shpinst\shpleft420\shptop16200\shpright11460\shpbottom16200\shpfhdr0\shpbxpage\shpbxignore\shpbypage\shpbyignore\shpwr3\shpwrk0\shpfblwtxt1\shpz0\shplid1026
{\sp
{\sn shapeType}
{\sv 20}
}
{\sp
{\sn fFlipH}
{\sv 0}
}
{\sp
{\sn fFlipV}
{\sv 0}
}
{\sp
{\sn lineWidth}
{\sv 0}
}
{\sp
{\sn fShadow}
{\sv 0}
}
{\sp
{\sn posrelh}
{\sv 1}
}
{\sp
{\sn posrelv}
{\sv 1}
}
{\sp
{\sn fLayoutInCell}
{\sv 0}
}
{\sp
{\sn fBehindDocument}
{\sv 1}
}
{\sp
{\sn fPseudoInline}
{\sv 0}
}
{\sp
{\sn fLayoutInCell}
{\sv 0}
}
}
{\shprslt
{\*\do\dobxpage\dobypage\dodhgt0\dpline\dpptx0\dppty0\dpptx11040\dppty0\dpx420\dpy16200\dpxsize11040\dpysize0\dplinew0\dplinecor0\dplinecog0\dplinecob0}
}
}
{\shp
{\*\shpinst\shpleft476\shptop4742\shpright11298\shpbottom4952\shpfhdr0\shpbxpage\shpbxignore\shpbypage\shpbyignore\shpwr3\shpwrk0\shpfblwtxt1\shpz1\shplid1027
{\sp
{\sn shapeType}
{\sv 1}
}
{\sp
{\sn fFlipH}
{\sv 0}
}
{\sp
{\sn fFlipV}
{\sv 0}
}
{\sp
{\sn fFilled}
{\sv 0}
}
{\sp
{\sn lineWidth}
{\sv 0}
}
{\sp
{\sn fShadow}
{\sv 0}
}
{\sp
{\sn posrelh}
{\sv 1}
}
{\sp
{\sn posrelv}
{\sv 1}
}
{\sp
{\sn fLayoutInCell}
{\sv 0}
}
{\sp
{\sn fBehindDocument}
{\sv 1}
}
{\sp
{\sn fPseudoInline}
{\sv 0}
}
{\sp
{\sn fLayoutInCell}
{\sv 0}
}
}
{\shprslt
{\*\do\dobxpage\dobypage\dodhgt1\dprect\dpx476\dpy4742\dpxsize10822\dpysize210
\dpfillfgcr255\dpfillfgcg255\dpfillfgcb255\dpfillbgcr255\dpfillbgcg255\dpfillbgcb255\dpfillpat0\dplinew0\dplinecor0\dplinecog0\dplinecob0}
}
}
{\shp
{\*\shpinst\shpleft8626\shptop4742\shpright8626\shpbottom4953\shpfhdr0\shpbxpage\shpbxignore\shpbypage\shpbyignore\shpwr3\shpwrk0\shpfblwtxt1\shpz2\shplid1028
{\sp
{\sn shapeType}
{\sv 20}
}
{\sp
{\sn fFlipH}
{\sv 0}
}
{\sp
{\sn fFlipV}
{\sv 0}
}
{\sp
{\sn lineWidth}
{\sv 0}
}
{\sp
{\sn fShadow}
{\sv 0}
}
{\sp
{\sn posrelh}
{\sv 1}
}
{\sp
{\sn posrelv}
{\sv 1}
}
{\sp
{\sn fLayoutInCell}
{\sv 0}
}
{\sp
{\sn fBehindDocument}
{\sv 1}
}
{\sp
{\sn fPseudoInline}
{\sv 0}
}
{\sp
{\sn fLayoutInCell}
{\sv 0}
}
}
{\shprslt
{\*\do\dobxpage\dobypage\dodhgt2\dpline\dpptx0\dppty0\dpptx0\dppty211\dpx8626\dpy4742\dpxsize0\dpysize211\dplinew0\dplinecor0\dplinecog0\dplinecob0}
}
}
}
\pard \par
}
sw/qa/extras/rtfimport/rtfimport.cxx
Dosyayı görüntüle @
ad72a47d
...
@@ -103,6 +103,7 @@ public:
...
@@ -103,6 +103,7 @@ public:
void
testFdo36089
();
void
testFdo36089
();
void
testFdo49892
();
void
testFdo49892
();
void
testFdo48446
();
void
testFdo48446
();
void
testFdo47495
();
CPPUNIT_TEST_SUITE
(
Test
);
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
#if !defined(MACOSX) && !defined(WNT)
...
@@ -148,6 +149,7 @@ public:
...
@@ -148,6 +149,7 @@ public:
CPPUNIT_TEST
(
testFdo36089
);
CPPUNIT_TEST
(
testFdo36089
);
CPPUNIT_TEST
(
testFdo49892
);
CPPUNIT_TEST
(
testFdo49892
);
CPPUNIT_TEST
(
testFdo48446
);
CPPUNIT_TEST
(
testFdo48446
);
CPPUNIT_TEST
(
testFdo47495
);
#endif
#endif
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
...
@@ -896,6 +898,13 @@ void Test::testFdo48446()
...
@@ -896,6 +898,13 @@ void Test::testFdo48446()
getParagraph
(
1
,
aExpected
);
getParagraph
(
1
,
aExpected
);
}
}
void
Test
::
testFdo47495
()
{
load
(
"fdo47495.rtf"
);
// Used to have 4 paragraphs, as a result the original bugdoc had 2 pages instead of 1.
CPPUNIT_ASSERT_EQUAL
(
2
,
getParagraphs
());
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_PLUGIN_IMPLEMENT
();
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
sw/qa/extras/swmodeltestbase.hxx
Dosyayı görüntüle @
ad72a47d
...
@@ -162,6 +162,21 @@ protected:
...
@@ -162,6 +162,21 @@ protected:
return
data
;
return
data
;
}
}
/// Get number of paragraphs of the document.
int
getParagraphs
()
{
uno
::
Reference
<
text
::
XTextDocument
>
xTextDocument
(
mxComponent
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XEnumerationAccess
>
xParaEnumAccess
(
xTextDocument
->
getText
(),
uno
::
UNO_QUERY
);
uno
::
Reference
<
container
::
XEnumeration
>
xParaEnum
=
xParaEnumAccess
->
createEnumeration
();
int
nRet
=
0
;
while
(
xParaEnum
->
hasMoreElements
())
{
xParaEnum
->
nextElement
();
nRet
++
;
}
return
nRet
;
}
// Get paragraph (counted from 1), optionally check it contains the given text.
// Get paragraph (counted from 1), optionally check it contains the given text.
uno
::
Reference
<
text
::
XTextRange
>
getParagraph
(
int
number
,
OUString
content
=
OUString
()
)
const
uno
::
Reference
<
text
::
XTextRange
>
getParagraph
(
int
number
,
OUString
content
=
OUString
()
)
const
{
{
...
...
writerfilter/source/rtftok/rtfdocumentimpl.cxx
Dosyayı görüntüle @
ad72a47d
...
@@ -3621,6 +3621,8 @@ int RTFDocumentImpl::popState()
...
@@ -3621,6 +3621,8 @@ int RTFDocumentImpl::popState()
{
{
m_aStates
.
top
().
resetFrame
();
m_aStates
.
top
().
resetFrame
();
parBreak
();
parBreak
();
// Save this state for later use, so we only reset frame status only for the first shape inside a frame.
aState
=
m_aStates
.
top
();
m_bNeedPap
=
true
;
m_bNeedPap
=
true
;
}
}
break
;
break
;
...
@@ -3863,7 +3865,8 @@ int RTFDocumentImpl::popState()
...
@@ -3863,7 +3865,8 @@ int RTFDocumentImpl::popState()
m_aStates
.
top
().
aCharacterAttributes
=
aState
.
aCharacterAttributes
;
m_aStates
.
top
().
aCharacterAttributes
=
aState
.
aCharacterAttributes
;
}
}
else
if
(
aState
.
nDestinationState
==
DESTINATION_FLYMAINCONTENT
||
else
if
(
aState
.
nDestinationState
==
DESTINATION_FLYMAINCONTENT
||
aState
.
nDestinationState
==
DESTINATION_SHPPICT
)
aState
.
nDestinationState
==
DESTINATION_SHPPICT
||
aState
.
nDestinationState
==
DESTINATION_SHAPE
)
m_aStates
.
top
().
aFrame
=
aState
.
aFrame
;
m_aStates
.
top
().
aFrame
=
aState
.
aFrame
;
if
(
m_pCurrentBuffer
==
&
m_aSuperBuffer
)
if
(
m_pCurrentBuffer
==
&
m_aSuperBuffer
)
{
{
...
...
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