incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1349670 - in /incubator/ooo/trunk/main/filter: inc/filter/msfilter/svdfppt.hxx source/msfilter/svdfppt.cxx
Date Wed, 13 Jun 2012 07:57:37 GMT
Author: af
Date: Wed Jun 13 07:57:37 2012
New Revision: 1349670

URL: http://svn.apache.org/viewvc?rev=1349670&view=rev
Log:
#i119532# Fixed export of bullet color.

          Patch by: SunYing
          Review and minor changes by: Andre Fischer


Modified:
    incubator/ooo/trunk/main/filter/inc/filter/msfilter/svdfppt.hxx
    incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx

Modified: incubator/ooo/trunk/main/filter/inc/filter/msfilter/svdfppt.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/inc/filter/msfilter/svdfppt.hxx?rev=1349670&r1=1349669&r2=1349670&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/inc/filter/msfilter/svdfppt.hxx (original)
+++ incubator/ooo/trunk/main/filter/inc/filter/msfilter/svdfppt.hxx Wed Jun 13 07:57:37 2012
@@ -870,6 +870,14 @@ struct ImplPPTCharPropSet
 
 struct PPTCharPropSet
 {
+    //when the bullet text has more than two color,next the text following with bullet has
been set hyperlink.
+    //now,the bullet color should be set original hyperlink text's color
+    //so  "mbHardHylinkOrigColor" hold the original hyperlink text's color.
+	sal_uInt32  mnHylinkOrigColor;
+    //the bullet text weather has a hyperlink.
+	sal_Bool    mbIsHyperlink;
+    //the hyperlink text weather has a custom color.
+	sal_Bool    mbHardHylinkOrigColor;
 
 	sal_uInt32			mnOriginalTextPos;
 	sal_uInt32			mnParagraph;

Modified: incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx?rev=1349670&r1=1349669&r2=1349670&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx Wed Jun 13 07:57:37 2012
@@ -4638,11 +4638,17 @@ PPTCharPropSet::PPTCharPropSet( sal_uInt
 	mpFieldItem		( NULL ),
 	pCharSet		( new ImplPPTCharPropSet )
 {
+	mnHylinkOrigColor = 0;
+	mbIsHyperlink = sal_False;
+	mbHardHylinkOrigColor = sal_False;
 	mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = 0;
 }
 
 PPTCharPropSet::PPTCharPropSet( PPTCharPropSet& rCharPropSet )
 {
+	mnHylinkOrigColor = rCharPropSet.mnHylinkOrigColor;
+	mbIsHyperlink = rCharPropSet.mbIsHyperlink;
+	mbHardHylinkOrigColor = rCharPropSet.mbHardHylinkOrigColor;
 	pCharSet = rCharPropSet.pCharSet;
 	pCharSet->mnRefCount++;
 
@@ -4660,6 +4666,10 @@ PPTCharPropSet::PPTCharPropSet( PPTCharP
 	pCharSet = rCharPropSet.pCharSet;
 	pCharSet->mnRefCount++;
 
+	mnHylinkOrigColor = rCharPropSet.mnHylinkOrigColor;
+	mbIsHyperlink = rCharPropSet.mbIsHyperlink;
+	mbHardHylinkOrigColor = rCharPropSet.mbHardHylinkOrigColor;
+
 	mnParagraph = nParagraph;
 	mnOriginalTextPos = rCharPropSet.mnOriginalTextPos;
 	maString = rCharPropSet.maString;
@@ -6182,7 +6192,20 @@ sal_Bool PPTParagraphObj::GetAttrib( sal
 					{
 						PPTPortionObj* pPortion = mpPortionList[ 0 ];
 						if ( pPortion )
-							bIsHardAttribute = pPortion->GetAttrib( PPT_CharAttr_FontColor, nRetValue, nDestinationInstance
);
+						{
+							if (pPortion->mbIsHyperlink )
+							{
+								if( pPortion->mbHardHylinkOrigColor )
+									nRetValue = pPortion->mnHylinkOrigColor;
+								else
+									nRetValue = mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ pParaSet->mnDepth
].mnFontColor;
+								bIsHardAttribute = sal_True;
+							}
+							else
+							{
+								bIsHardAttribute = pPortion->GetAttrib( PPT_CharAttr_FontColor, nRetValue, nDestinationInstance
);
+							}
+						}
 					}
 					else
 					{
@@ -7128,6 +7151,10 @@ PPTTextObj::PPTTextObj( SvStream& rIn, S
 
 															const SvxURLField* pField = (const SvxURLField*)pFE->pField1->GetField();
 
+															pCurrent->mbIsHyperlink=sal_True;
+                                                            pCurrent->mnHylinkOrigColor=pCurrent->pCharSet->mnColor;
+															pCurrent->mbHardHylinkOrigColor= ( ( pCurrent->pCharSet->mnAttrSet
>>PPT_CharAttr_FontColor ) & 1)>0;
+
 															if ( pCurrent->mpFieldItem )
 															{
 																pCurrent->SetColor( PPT_COLSCHEME_A_UND_HYPERLINK );



Mime
View raw message