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
845fb7bf
Kaydet (Commit)
845fb7bf
authored
Eyl 05, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
abi#10039 RTF export: support page-anchored frames
Change-Id: I71c961799f76446cdf24faeba86f881ae02ffe3b
üst
645bccf7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
7 deletions
+21
-7
abi10039.odt
sw/qa/extras/rtfexport/data/abi10039.odt
+0
-0
rtfexport.cxx
sw/qa/extras/rtfexport/rtfexport.cxx
+6
-0
rtfattributeoutput.cxx
sw/source/filter/ww8/rtfattributeoutput.cxx
+15
-7
No files found.
sw/qa/extras/rtfexport/data/abi10039.odt
0 → 100644
Dosyayı görüntüle @
845fb7bf
File added
sw/qa/extras/rtfexport/rtfexport.cxx
Dosyayı görüntüle @
845fb7bf
...
...
@@ -680,6 +680,12 @@ DECLARE_RTFEXPORT_TEST(testPictureWrapPolygon, "picture-wrap-polygon.rtf")
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
convertTwipToMm100
(
-
67
)),
getProperty
<
sal_Int32
>
(
getShape
(
1
),
"VertOrientPosition"
));
}
DECLARE_RTFEXPORT_TEST
(
testAbi10039
,
"abi10039.odt"
)
{
// Make sure we don't just crash on export, and additionally the shape should not be inline (as it's at-page anchored originally).
CPPUNIT_ASSERT
(
text
::
TextContentAnchorType_AS_CHARACTER
!=
getProperty
<
text
::
TextContentAnchorType
>
(
getShape
(
1
),
"AnchorType"
));
}
#endif
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
sw/source/filter/ww8/rtfattributeoutput.cxx
Dosyayı görüntüle @
845fb7bf
...
...
@@ -3696,8 +3696,16 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw
aRendered
.
Height
()
=
rS
.
GetHeight
();
}
const
SwPosition
*
pAnchor
=
pFlyFrmFmt
->
GetAnchor
().
GetCntntAnchor
();
sw
::
Frame
aFrame
(
*
pFlyFrmFmt
,
*
pAnchor
);
sw
::
Frame
*
pFrame
=
0
;
for
(
sw
::
FrameIter
it
=
m_rExport
.
maFrames
.
begin
();
it
!=
m_rExport
.
maFrames
.
end
();
++
it
)
{
if
(
pFlyFrmFmt
==
&
it
->
GetFrmFmt
())
{
pFrame
=
&
(
*
it
);
break
;
}
}
assert
(
pFrame
);
/*
If the graphic is not of type WMF then we will have to store two
...
...
@@ -3706,7 +3714,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw
a wmf already then we don't need any such wrapping
*/
bool
bIsWMF
=
pBLIPType
&&
std
::
strcmp
(
pBLIPType
,
OOO_STRING_SVTOOLS_RTF_WMETAFILE
)
==
0
;
if
(
aFrame
.
IsInline
())
if
(
pFrame
->
IsInline
())
{
if
(
!
bIsWMF
)
m_rExport
.
Strm
().
WriteCharPtr
(
"{"
OOO_STRING_SVTOOLS_RTF_IGNORE
OOO_STRING_SVTOOLS_RTF_SHPPICT
);
...
...
@@ -3715,9 +3723,9 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw
{
m_rExport
.
Strm
().
WriteCharPtr
(
"{"
OOO_STRING_SVTOOLS_RTF_SHP
"{"
OOO_STRING_SVTOOLS_RTF_IGNORE
OOO_STRING_SVTOOLS_RTF_SHPINST
);
m_pFlyFrameSize
=
&
aRendered
;
m_rExport
.
mpParentFrame
=
&
a
Frame
;
m_rExport
.
mpParentFrame
=
p
Frame
;
m_rExport
.
bOutFlyFrmAttrs
=
m_rExport
.
bRTFFlySyntax
=
true
;
m_rExport
.
OutputFormat
(
aFrame
.
GetFrmFmt
(),
false
,
false
,
true
);
m_rExport
.
OutputFormat
(
pFrame
->
GetFrmFmt
(),
false
,
false
,
true
);
m_rExport
.
bOutFlyFrmAttrs
=
m_rExport
.
bRTFFlySyntax
=
false
;
m_rExport
.
mpParentFrame
=
NULL
;
m_pFlyFrameSize
=
0
;
...
...
@@ -3760,7 +3768,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw
m_rExport
.
Strm
().
WriteCharPtr
(
"{"
OOO_STRING_SVTOOLS_RTF_SP
"{"
OOO_STRING_SVTOOLS_RTF_SN
" pib"
"}{"
OOO_STRING_SVTOOLS_RTF_SV
" "
);
}
bool
bWritePicProp
=
aFrame
.
IsInline
();
bool
bWritePicProp
=
pFrame
->
IsInline
();
if
(
pBLIPType
)
ExportPICT
(
pFlyFrmFmt
,
aSize
,
aRendered
,
aMapped
,
rCr
,
pBLIPType
,
pGraphicAry
,
nSize
,
m_rExport
,
&
m_rExport
.
Strm
(),
bWritePicProp
);
else
...
...
@@ -3775,7 +3783,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw
ExportPICT
(
pFlyFrmFmt
,
aSize
,
aRendered
,
aMapped
,
rCr
,
pBLIPType
,
pGraphicAry
,
nSize
,
m_rExport
,
&
m_rExport
.
Strm
(),
bWritePicProp
);
}
if
(
aFrame
.
IsInline
())
if
(
pFrame
->
IsInline
())
{
if
(
!
bIsWMF
)
{
...
...
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