View | Details | Raw Unified | Return to issue 35763
Collapse All | Expand All

(-)sw/source/filter/inc/fltshell.hxx (+1 lines)
Lines 126-131 Link Here
126
	void MarkAllAttrsOld();
126
	void MarkAllAttrsOld();
127
	void KillUnlockedAttrs(const SwPosition& pPos);
127
	void KillUnlockedAttrs(const SwPosition& pPos);
128
	SfxPoolItem* GetFmtStackAttr(sal_uInt16 nWhich, sal_uInt16 * pPos = 0);
128
	SfxPoolItem* GetFmtStackAttr(sal_uInt16 nWhich, sal_uInt16 * pPos = 0);
129
	const SfxPoolItem* GetOpenStackAttr(const SwPosition& rPos, sal_uInt16 nWhich);
129
	const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, sal_uInt16 nWhich);
130
	const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, sal_uInt16 nWhich);
130
	void Delete(const SwPaM &rPam);
131
	void Delete(const SwPaM &rPam);
131
132
(-)sw/source/filter/ww1/fltshell.cxx (+21 lines)
Lines 621-626 Link Here
621
	return 0;
621
	return 0;
622
}
622
}
623
623
624
const SfxPoolItem* SwFltControlStack::GetOpenStackAttr(const SwPosition& rPos, sal_uInt16 nWhich)
625
{
626
	SwFltStackEntry* pEntry;
627
	sal_uInt16 nSize = static_cast< sal_uInt16 >(Count());
628
	SwNodeIndex aAktNode( rPos.nNode, -1 );
629
	sal_uInt16 nAktIdx = rPos.nContent.GetIndex();
630
631
	while (nSize)
632
	{
633
		pEntry = (*this)[ --nSize ];
634
		if(    pEntry->bLocked
635
			&& (pEntry->pAttr->Which() == nWhich)
636
			&& (pEntry->nMkNode  == aAktNode)
637
			&& (pEntry->nMkCntnt == nAktIdx ))
638
		{
639
			return (SfxPoolItem*)pEntry->pAttr;
640
		}
641
	}
642
	return 0;
643
}
644
624
const SfxPoolItem* SwFltControlStack::GetFmtAttr(const SwPosition& rPos, sal_uInt16 nWhich)
645
const SfxPoolItem* SwFltControlStack::GetFmtAttr(const SwPosition& rPos, sal_uInt16 nWhich)
625
{
646
{
626
	SfxPoolItem* pHt = GetFmtStackAttr(nWhich);
647
	SfxPoolItem* pHt = GetFmtStackAttr(nWhich);
(-)sw/source/filter/ww8/ww8atr.cxx (+10 lines)
Lines 1310-1315 Link Here
1310
    }
1310
    }
1311
1311
1312
    m_rWW8Export.pO->Insert( b, m_rWW8Export.pO->Count() );
1312
    m_rWW8Export.pO->Insert( b, m_rWW8Export.pO->Count() );
1313
	Color aColor = rUnderline.GetColor();
1314
	if( aColor != COL_TRANSPARENT )
1315
	{
1316
		if( m_rWW8Export.bWrtWW8 )
1317
		{
1318
			m_rWW8Export.InsUInt16( 0x6877 );
1319
			
1320
			m_rWW8Export.InsUInt32( wwUtility::RGBToBGR( aColor.GetColor() ) );
1321
		}
1322
	}
1313
}
1323
}
1314
1324
1315
void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
1325
void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
(-)sw/source/filter/ww8/ww8par.hxx (+1 lines)
Lines 1528-1533 Link Here
1528
    void Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nLen);
1528
    void Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nLen);
1529
    static sal_uInt32 ExtractColour(const sal_uInt8* &rpData, bool bVer67);
1529
    static sal_uInt32 ExtractColour(const sal_uInt8* &rpData, bool bVer67);
1530
1530
1531
	void Read_UnderlineColor(sal_uInt16, const sal_uInt8* pData, short nLen);
1531
    long MapBookmarkVariables(const WW8FieldDesc* pF,String &rOrigName,
1532
    long MapBookmarkVariables(const WW8FieldDesc* pF,String &rOrigName,
1532
        const String &rData);
1533
        const String &rData);
1533
    String GetMappedBookmark(const String &rOrigName);
1534
    String GetMappedBookmark(const String &rOrigName);
(-)sw/source/filter/ww8/ww8par6.cxx (+48 lines)
Lines 3449-3454 Link Here
3449
    }
3449
    }
3450
}
3450
}
3451
3451
3452
void SwWW8ImplReader::Read_UnderlineColor(sal_uInt16, const sal_uInt8* pData, short nLen)
3453
{
3454
	if( nLen < 0 )
3455
	{
3456
		//because the UnderlineColor is not a standalone attribute in SW, it belongs to the underline attribute. 
3457
		//And, the .doc file stores attributes separately, this attribute ends here, the "underline"
3458
		//attribute also terminates (if the character next owns underline, that will be a new underline attribute).
3459
		//so nothing is left to be done here.
3460
        return;
3461
	}
3462
	else
3463
	{
3464
		if ( pAktColl )	//importing style
3465
		{
3466
			if( SFX_ITEM_SET == pAktColl->GetItemState( RES_CHRATR_UNDERLINE, sal_False ) )
3467
			{
3468
				const SwAttrSet& aSet = pAktColl->GetAttrSet();
3469
				SvxUnderlineItem *pUnderline 
3470
					= (SvxUnderlineItem *)(aSet.Get( RES_CHRATR_UNDERLINE, sal_False ).Clone());
3471
				if(pUnderline){
3472
					pUnderline->SetColor( Color( wwUtility::BGRToRGB(SVBT32ToUInt32(pData)) ) );
3473
					pAktColl->SetFmtAttr( *pUnderline );
3474
					delete pUnderline;
3475
				}
3476
			}
3477
		}
3478
		else if ( pAktItemSet )
3479
		{
3480
			if ( SFX_ITEM_SET == pAktItemSet->GetItemState( RES_CHRATR_UNDERLINE, sal_False ) )
3481
			{
3482
				SvxUnderlineItem *pUnderline 
3483
					= (SvxUnderlineItem *)(pAktItemSet->Get( RES_CHRATR_UNDERLINE, sal_False ) .Clone());
3484
				if(pUnderline){
3485
					pUnderline->SetColor( Color( wwUtility::BGRToRGB(SVBT32ToUInt32(pData)) ) );
3486
					pAktItemSet->Put( *pUnderline );
3487
					delete pUnderline;
3488
				}
3489
			}
3490
		}
3491
		else
3492
		{
3493
			SvxUnderlineItem* pUnderlineAttr = (SvxUnderlineItem*)pCtrlStck->GetOpenStackAttr( *pPaM->GetPoint(), RES_CHRATR_UNDERLINE );
3494
			if( pUnderlineAttr != NULL )
3495
				pUnderlineAttr->SetColor( Color( wwUtility::BGRToRGB(SVBT32ToUInt32( pData ))));
3496
		}
3497
	}
3498
}
3452
bool SwWW8ImplReader::GetFontParams( sal_uInt16 nFCode, FontFamily& reFamily,
3499
bool SwWW8ImplReader::GetFontParams( sal_uInt16 nFCode, FontFamily& reFamily,
3453
    String& rName, FontPitch& rePitch, CharSet& reCharSet )
3500
    String& rName, FontPitch& rePitch, CharSet& reCharSet )
3454
{
3501
{
Lines 6130-6135 Link Here
6130
        {0x6815, 0},                                 //undocumented
6177
        {0x6815, 0},                                 //undocumented
6131
        {0x6816, 0},                                 //undocumented
6178
        {0x6816, 0},                                 //undocumented
6132
        {0x6870, &SwWW8ImplReader::Read_TxtForeColor},
6179
        {0x6870, &SwWW8ImplReader::Read_TxtForeColor},
6180
		{0x6877, &SwWW8ImplReader::Read_UnderlineColor},
6133
        {0xC64D, &SwWW8ImplReader::Read_ParaBackColor},
6181
        {0xC64D, &SwWW8ImplReader::Read_ParaBackColor},
6134
        {0x6467, 0},                                 //undocumented
6182
        {0x6467, 0},                                 //undocumented
6135
        {0xF617, 0},                                 //undocumented
6183
        {0xF617, 0},                                 //undocumented

Return to issue 35763