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/22 07:17:49 UTC

svn commit: r1375901 - /incubator/ooo/trunk/main/sw/source/filter/ww8/ww8atr.cxx

Author: chengjh
Date: Wed Aug 22 05:17:49 2012
New Revision: 1375901

URL: http://svn.apache.org/viewvc?rev=1375901&view=rev
Log:
Fix issue #i119649: Hyperlink font size increased if saved to .doc file

* sw/source/filter/ww8/ww8atr.cxx
   MS Word Binary compatibility

Patch by: Chen Peng,<ch...@gmail.com>
Found by: Yan Ji,<ya...@gmail.com>
Review by: Jian Hong Cheng,<ch...@apache.org>           

Modified:
    incubator/ooo/trunk/main/sw/source/filter/ww8/ww8atr.cxx

Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/ww8atr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/ww8atr.cxx?rev=1375901&r1=1375900&r2=1375901&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/ww8atr.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/ww8atr.cxx Wed Aug 22 05:17:49 2012
@@ -257,6 +257,13 @@ void MSWordExportBase::ExportPoolItemsTo
         sal_uInt16 nWhich = pItem->Which();
         if ( ( isCHRATR( nWhich ) || isTXTATR( nWhich ) ) && CollapseScriptsforWordOk( nScript, nWhich ) )
         {
+			 //In the id definition, RES_TXTATR_INETFMT must precede RES_TXTATR_CHARFMT, so that link style can overwrite char style.
+			 //and in #i24291# it describes "All we want to do is ensure for now is that if a charfmt exist in the character 
+			 //properties that it rises to the top and is exported first."
+		     //In bug 119649, it is in such situation, so we need to ignore the link style when doing ms word filter exports and
+			 //add the second judgement for #i24291# definition. 
+			 if ( nWhich == RES_TXTATR_INETFMT && ( rItems.begin()->second->Which() == RES_TXTATR_CHARFMT ) )
+				 continue;
             AttrOutput().OutputItem( *pItem );
         }
     }