You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ch...@apache.org on 2012/08/24 05:14:25 UTC
svn commit: r1376816 -
/incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8gr.cxx
Author: chengjh
Date: Fri Aug 24 03:14:25 2012
New Revision: 1376816
URL: http://svn.apache.org/viewvc?rev=1376816&view=rev
Log:
Fix issue #i120568: Hyperlink of Graphihc with Anchor Type "As Character" lost after save as doc format
* main/sw/source/filter/ww8/wrtww8gr.cxx
MS Word Binary compatibility
Patch by: Huaidong Qiu,<qi...@gmail.com>
Found by: Huaidong Qiu,<qi...@gmail.com>
Review by: Jian Hong Cheng,<ch...@apache.org>
Modified:
incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8gr.cxx
Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8gr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8gr.cxx?rev=1376816&r1=1376815&r2=1376816&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8gr.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8gr.cxx Fri Aug 24 03:14:25 2012
@@ -71,7 +71,10 @@
#include "wrtww8.hxx"
#include "ww8par.hxx"
#include "escher.hxx"
-
+//Added for i120568
+#include "ww8attributeoutput.hxx"
+#include "fmturl.hxx"
+//End
#include "docsh.hxx"
#include <cstdio>
@@ -364,6 +367,17 @@ void WW8Export::OutputOLENode( const SwO
void WW8Export::OutGrf(const sw::Frame &rFrame)
{
+ //Added for i120568,the hyperlink info within a graphic whose anchor type is "As character"
+ //will be exported to ensure the fidelity
+ const SwFmtURL& rURL = rFrame.GetFrmFmt().GetAttrSet().GetURL();
+ bool bURLStarted = false;
+ if( rURL.GetURL().Len() && rFrame.GetWriterType() == sw::Frame::eGraphic)
+ {
+ bURLStarted = true;
+ m_pAttrOutput->StartURL( rURL.GetURL(), rURL.GetTargetFrameName() );
+ }
+ //End
+
// GrfNode fuer spaeteres rausschreiben der Grafik merken
pGrf->Insert(rFrame);
@@ -485,6 +499,11 @@ void WW8Export::OutGrf(const sw::Frame &
OutputField( 0, ww::eINCLUDEPICTURE, String(), WRITEFIELD_CLOSE );
}
// <--
+ //Added for i120568,the hyperlink info within a graphic whose anchor type is "As character"
+ //will be exported to ensure the fidelity
+ if( bURLStarted )
+ m_pAttrOutput->EndURL();
+ //End
}
GraphicDetails& GraphicDetails::operator=(const GraphicDetails &rOther)