Kaydet (Commit) 29072b50 authored tarafından Steve Yin's avatar Steve Yin

Issue 119044 - Highlighter from DOCX file not imported correctly

üst 63f53dbd
......@@ -44,7 +44,7 @@ LoggedProperties(dmapper_logger, "CellColorHandler"),
m_nShadowType( 0 ),
m_nColor( 0xffffffff ),
m_nFillColor( 0xffffffff ),
m_bParagraph( false )
m_eType( Others )
{
}
/*-- 24.04.2007 09:06:35---------------------------------------------------
......@@ -225,8 +225,22 @@ TablePropertyMapPtr CellColorHandler::getProperties()
nApplyColor = ( (nRed/1000) << 0x10 ) + ((nGreen/1000) << 8) + nBlue/1000;
}
pPropertyMap->Insert( m_bParagraph ? PROP_PARA_BACK_COLOR : PROP_BACK_COLOR, false,
uno::makeAny( nApplyColor ));
sal_Int32 objType = PROP_CHAR_BACK_COLOR;
switch(m_eType)
{
case P:
pPropertyMap->Insert( PROP_PARA_BACK_COLOR, false, uno::makeAny( nApplyColor ));
break;
case C:
pPropertyMap->Insert( PROP_CHAR_BACK_COLOR, false, uno::makeAny( nApplyColor ));
break;
case Others:
default:
pPropertyMap->Insert( PROP_BACK_COLOR, false, uno::makeAny( nApplyColor ));
break;
}
return pPropertyMap;
}
} //namespace dmapper
......
......@@ -39,7 +39,8 @@ public:
sal_Int32 m_nShadowType;
sal_Int32 m_nColor;
sal_Int32 m_nFillColor;
bool m_bParagraph;
enum Type {P, C, Others};
Type m_eType;
private:
// Properties
......@@ -52,7 +53,7 @@ public:
::boost::shared_ptr<TablePropertyMap> getProperties();
void setParagraph() { m_bParagraph = true; }
void setType(Type type) { m_eType = type; }
};
typedef boost::shared_ptr< CellColorHandler > CellColorHandlerPtr;
}}
......
......@@ -2617,7 +2617,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
if( pProperties.get())
{
CellColorHandlerPtr pCellColorHandler( new CellColorHandler );
pCellColorHandler->setParagraph();
pCellColorHandler->setType(CellColorHandler::P);
pProperties->resolve(*pCellColorHandler);
rContext->insert( pCellColorHandler->getProperties(), true );
}
......@@ -3186,6 +3186,16 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
break; // sprmCBrc
case NS_sprm::LN_CShd:
/* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */
{
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
{
CellColorHandlerPtr pCellColorHandler( new CellColorHandler );
pCellColorHandler->setType(CellColorHandler::C);
pProperties->resolve(*pCellColorHandler);
rContext->insert( pCellColorHandler->getProperties(), true );
}
}
break; // sprmCShd
case NS_sprm::LN_CIdslRMarkDel:
/* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */
......
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