diff options
author | Andre Fischer <af@apache.org> | 2012-06-13 06:57:37 +0000 |
---|---|---|
committer | Xisco Fauli <anistenis@gmail.com> | 2013-04-07 23:37:42 +0200 |
commit | ed6d89dd55cff5ca91ecbfc8716a4e6c584be165 (patch) | |
tree | 797f8e0a6e4e5d65dba086830a191365e58d8db5 | |
parent | b86cf0421b432ebbf964960f0fcd2e6a5360f979 (diff) |
Fix #i119532# Fixed export of bullet color.
Patch by: SunYing
Review and minor changes by: Andre Fischer
Conflicts:
filter/source/msfilter/svdfppt.cxx
Change-Id: I2841e041b571ed5cfa848ad1029c57fc547a621a
-rw-r--r-- | filter/inc/filter/msfilter/svdfppt.hxx | 8 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 28 |
2 files changed, 34 insertions, 2 deletions
diff --git a/filter/inc/filter/msfilter/svdfppt.hxx b/filter/inc/filter/msfilter/svdfppt.hxx index fffcc86bc22f..2fbf096aec58 100644 --- a/filter/inc/filter/msfilter/svdfppt.hxx +++ b/filter/inc/filter/msfilter/svdfppt.hxx @@ -914,6 +914,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; diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 430129904b46..93aaeaf8cb22 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -4384,11 +4384,17 @@ PPTCharPropSet::PPTCharPropSet( sal_uInt32 nParagraph ) : mpFieldItem ( NULL ), pCharSet ( new ImplPPTCharPropSet ) { + mnHylinkOrigColor = 0; + mbIsHyperlink = sal_False; + mbHardHylinkOrigColor = sal_False; mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = 0; } PPTCharPropSet::PPTCharPropSet( const PPTCharPropSet& rCharPropSet ) { + mnHylinkOrigColor = rCharPropSet.mnHylinkOrigColor; + mbIsHyperlink = rCharPropSet.mbIsHyperlink; + mbHardHylinkOrigColor = rCharPropSet.mbHardHylinkOrigColor; pCharSet = rCharPropSet.pCharSet; pCharSet->mnRefCount++; @@ -4406,6 +4412,10 @@ PPTCharPropSet::PPTCharPropSet( const PPTCharPropSet& rCharPropSet, sal_uInt32 n pCharSet = rCharPropSet.pCharSet; pCharSet->mnRefCount++; + mnHylinkOrigColor = rCharPropSet.mnHylinkOrigColor; + mbIsHyperlink = rCharPropSet.mbIsHyperlink; + mbHardHylinkOrigColor = rCharPropSet.mbHardHylinkOrigColor; + mnParagraph = nParagraph; mnOriginalTextPos = rCharPropSet.mnOriginalTextPos; maString = rCharPropSet.maString; @@ -5952,8 +5962,18 @@ sal_Bool PPTParagraphObj::GetAttrib( sal_uInt32 nAttr, sal_uInt32& nRetValue, sa if (!m_PortionList.empty()) { PPTPortionObj const& rPortion = m_PortionList.front(); - bIsHardAttribute = rPortion.GetAttrib( - PPT_CharAttr_FontColor, nRetValue, nDestinationInstance); + if (rPortion.mbIsHyperlink ) + { + if( rPortion.mbHardHylinkOrigColor ) + nRetValue = rPortion.mnHylinkOrigColor; + else + nRetValue = mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ pParaSet->mnDepth ].mnFontColor; + bIsHardAttribute = sal_True; + } + else + { + bIsHardAttribute = rPortion.GetAttrib( PPT_CharAttr_FontColor, nRetValue, nDestinationInstance ); + } } else { @@ -6892,6 +6912,10 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport const SvxURLField* pField = (const SvxURLField*)(*FE)->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 ); |