https://bugs.documentfoundation.org/show_bug.cgi?id=158950

--- Comment #7 from Regina Henschel <[email protected]> ---
The wrong color comes in this way:

After the red color is set in case NS_ooxml::LN_EG_RPrBase_color in
DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext ) this
case is used again.

In this second use go into 
    pProperties->resolve(*pThemeColorHandler);
You will see that m_aAttributes and m_aSprems are empty and thus nothings
happens in "resolve" method. So the default value of 0 of mnColor is used in
    m_pImpl->GetTopContext()->Insert(PROP_CHAR_COLOR,
uno::Any(pThemeColorHandler->mnColor));
resulting in black text.

For testing I have set the default value of mnColor to -1 and have changed the
call to
    if (pThemeColorHandler->mnColor != -1)
        m_pImpl->GetTopContext()->Insert(PROP_CHAR_COLOR,
uno::Any(pThemeColorHandler->mnColor));
Then the color becomes red.

The previous version had not used Insert(PROP_CHAR_COLOR,...) at all in the
case NS_ooxml::LN_EG_RPrBase_color, but had only set the PROP_CHAR_THEME_FOO
attributes. Thus it was not visible, that the case
NS_ooxml::LN_EG_RPrBase_color is used a second time. A seeming solution would
be the above mentioned use of color value -1. But the real question is, why the
case is reached a second time with neither a value in m_aAttributes nor in
m_aSprms.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to