Kaydet (Commit) 00969d29 authored tarafından Andre Fischer's avatar Andre Fischer

#i119532# Fixed export of bullet color.

Patch by: SunYing
Review and minor changes by: Andre Fischer
üst fbd6ade4
...@@ -870,6 +870,14 @@ struct ImplPPTCharPropSet ...@@ -870,6 +870,14 @@ struct ImplPPTCharPropSet
struct PPTCharPropSet 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 mnOriginalTextPos;
sal_uInt32 mnParagraph; sal_uInt32 mnParagraph;
......
...@@ -4638,11 +4638,17 @@ PPTCharPropSet::PPTCharPropSet( sal_uInt32 nParagraph ) : ...@@ -4638,11 +4638,17 @@ PPTCharPropSet::PPTCharPropSet( sal_uInt32 nParagraph ) :
mpFieldItem ( NULL ), mpFieldItem ( NULL ),
pCharSet ( new ImplPPTCharPropSet ) pCharSet ( new ImplPPTCharPropSet )
{ {
mnHylinkOrigColor = 0;
mbIsHyperlink = sal_False;
mbHardHylinkOrigColor = sal_False;
mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = 0; mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = 0;
} }
PPTCharPropSet::PPTCharPropSet( PPTCharPropSet& rCharPropSet ) PPTCharPropSet::PPTCharPropSet( PPTCharPropSet& rCharPropSet )
{ {
mnHylinkOrigColor = rCharPropSet.mnHylinkOrigColor;
mbIsHyperlink = rCharPropSet.mbIsHyperlink;
mbHardHylinkOrigColor = rCharPropSet.mbHardHylinkOrigColor;
pCharSet = rCharPropSet.pCharSet; pCharSet = rCharPropSet.pCharSet;
pCharSet->mnRefCount++; pCharSet->mnRefCount++;
...@@ -4660,6 +4666,10 @@ PPTCharPropSet::PPTCharPropSet( PPTCharPropSet& rCharPropSet, sal_uInt32 nParagr ...@@ -4660,6 +4666,10 @@ PPTCharPropSet::PPTCharPropSet( PPTCharPropSet& rCharPropSet, sal_uInt32 nParagr
pCharSet = rCharPropSet.pCharSet; pCharSet = rCharPropSet.pCharSet;
pCharSet->mnRefCount++; pCharSet->mnRefCount++;
mnHylinkOrigColor = rCharPropSet.mnHylinkOrigColor;
mbIsHyperlink = rCharPropSet.mbIsHyperlink;
mbHardHylinkOrigColor = rCharPropSet.mbHardHylinkOrigColor;
mnParagraph = nParagraph; mnParagraph = nParagraph;
mnOriginalTextPos = rCharPropSet.mnOriginalTextPos; mnOriginalTextPos = rCharPropSet.mnOriginalTextPos;
maString = rCharPropSet.maString; maString = rCharPropSet.maString;
...@@ -6182,7 +6192,20 @@ sal_Bool PPTParagraphObj::GetAttrib( sal_uInt32 nAttr, sal_uInt32& nRetValue, sa ...@@ -6182,7 +6192,20 @@ sal_Bool PPTParagraphObj::GetAttrib( sal_uInt32 nAttr, sal_uInt32& nRetValue, sa
{ {
PPTPortionObj* pPortion = mpPortionList[ 0 ]; PPTPortionObj* pPortion = mpPortionList[ 0 ];
if ( pPortion ) 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 else
{ {
...@@ -7128,6 +7151,10 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport ...@@ -7128,6 +7151,10 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
const SvxURLField* pField = (const SvxURLField*)pFE->pField1->GetField(); 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 ) if ( pCurrent->mpFieldItem )
{ {
pCurrent->SetColor( PPT_COLSCHEME_A_UND_HYPERLINK ); pCurrent->SetColor( PPT_COLSCHEME_A_UND_HYPERLINK );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment