summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2011-01-13 02:04:21 +0100
committerMiklos Vajna <vmiklos@frugalware.org>2011-01-13 02:12:03 +0100
commitc27e4668b18248322be699fc9fc6bf01e4d6a7ea (patch)
tree4bcc7157c0e6ec8d596f23ef051701e713edffe3
parent3339512a2a4c12a66d4edf552eef8c31fb782c13 (diff)
RTF: fix height of wrapped pictures on export (partial fix for fdo#32613)
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx12
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.hxx2
2 files changed, 9 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 8ea30b82d7..82b0eaba63 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1524,7 +1524,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
}
if ( pGrfNode )
- FlyFrameGraphic( dynamic_cast<const SwFlyFrmFmt*>( &rFrame.GetFrmFmt() ), *pGrfNode, rFrame.GetLayoutSize() );
+ FlyFrameGraphic( dynamic_cast<const SwFlyFrmFmt*>( &rFrame.GetFrmFmt() ), *pGrfNode);
break;
case sw::Frame::eDrawing:
{
@@ -3359,7 +3359,7 @@ void RtfAttributeOutput::FlyFrameOLE( const SwFlyFrmFmt* pFlyFrmFmt, SwOLENode&
m_aRunText.append("}}}}");
}
-void RtfAttributeOutput::FlyFrameGraphic( const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode& rGrfNode, const Size& rSize )
+void RtfAttributeOutput::FlyFrameGraphic( const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode& rGrfNode)
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -3418,8 +3418,12 @@ void RtfAttributeOutput::FlyFrameGraphic( const SwFlyFrmFmt* pFlyFrmFmt, const S
//Get original size in twips
Size aSize(sw::util::GetSwappedInSize(rGrfNode));
Size aRendered(aSize);
- aRendered.Width() = rSize.Width();
- aRendered.Height() = rSize.Height();
+ if (pFlyFrmFmt)
+ {
+ const SwFmtFrmSize& rS = pFlyFrmFmt->GetFrmSize();
+ aRendered.Width() = rS.GetWidth();
+ aRendered.Height() = rS.GetHeight();
+ }
/*
If the graphic is not of type WMF then we will have to store two
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index 9b3923dc88..17de6060d3 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -432,7 +432,7 @@ protected:
private:
/// Output graphic fly frames.
- void FlyFrameGraphic( const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode& rGrfNode, const Size& rSize );
+ void FlyFrameGraphic( const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode& rGrfNode );
void FlyFrameOLE( const SwFlyFrmFmt* pFlyFrmFmt, SwOLENode& rOLENode, const Size& rSize );
void FlyFrameOLEData( SwOLENode& rOLENode );