writerfilter: these are expected to be UTF-8
Change-Id: I8cd2ce341996a219ee885969de3482be422730b3
This commit is contained in:
@@ -67,7 +67,7 @@ void BorderHandler::lcl_attribute(Id rName, Value & rVal)
|
||||
break;
|
||||
case NS_ooxml::LN_CT_Border_color:
|
||||
m_nLineColor = nIntValue;
|
||||
appendGrabBag("color", OStringToOUString(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true), RTL_TEXTENCODING_UTF8));
|
||||
appendGrabBag("color", OUString::fromUtf8(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true)));
|
||||
break;
|
||||
case NS_ooxml::LN_CT_Border_space: // border distance in points
|
||||
m_nLineDistance = ConversionHelper::convertTwipToMM100( nIntValue * 20 );
|
||||
|
@@ -106,13 +106,13 @@ void CellColorHandler::lcl_attribute(Id rName, Value & rVal)
|
||||
}
|
||||
break;
|
||||
case NS_ooxml::LN_CT_Shd_fill:
|
||||
createGrabBag("fill", uno::makeAny(OStringToOUString(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true), RTL_TEXTENCODING_UTF8)));
|
||||
createGrabBag("fill", uno::makeAny(OUString::fromUtf8(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true))));
|
||||
if( nIntValue == OOXML_COLOR_AUTO )
|
||||
nIntValue = 0xffffff; //fill color auto means white
|
||||
m_nFillColor = nIntValue;
|
||||
break;
|
||||
case NS_ooxml::LN_CT_Shd_color:
|
||||
createGrabBag("color", uno::makeAny(OStringToOUString(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true), RTL_TEXTENCODING_UTF8)));
|
||||
createGrabBag("color", uno::makeAny(OUString::fromUtf8(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true))));
|
||||
if( nIntValue == OOXML_COLOR_AUTO )
|
||||
nIntValue = 0; //shading color auto means black
|
||||
//color of the shading
|
||||
|
@@ -277,7 +277,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
|
||||
case NS_ooxml::LN_CT_Color_val:
|
||||
if (m_pImpl->GetTopContext())
|
||||
m_pImpl->GetTopContext()->Insert(PROP_CHAR_COLOR, uno::makeAny( nIntValue ) );
|
||||
m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, "val", OStringToOUString(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true), RTL_TEXTENCODING_UTF8));
|
||||
m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, "val", OUString::fromUtf8(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true)));
|
||||
break;
|
||||
case NS_ooxml::LN_CT_Underline_color:
|
||||
if (m_pImpl->GetTopContext())
|
||||
|
@@ -292,7 +292,7 @@ void TDefTableHandler::lcl_attribute(Id rName, Value & rVal)
|
||||
appendGrabBag("val", TDefTableHandler::getBorderTypeString(nIntValue));
|
||||
break;
|
||||
case NS_ooxml::LN_CT_Border_color:
|
||||
appendGrabBag("color", OStringToOUString(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true), RTL_TEXTENCODING_UTF8));
|
||||
appendGrabBag("color", OUString::fromUtf8(msfilter::util::ConvertColor(nIntValue, /*bAutoColor=*/true)));
|
||||
m_nLineColor = nIntValue;
|
||||
break;
|
||||
case NS_ooxml::LN_CT_Border_space:
|
||||
|
@@ -357,11 +357,11 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
|
||||
xPropertySet->setPropertyValue("FillColor", aAny);
|
||||
|
||||
// fillType will decide, possible it'll be the start color of a gradient.
|
||||
aFillModel.moColor.set(OUString("#") + OStringToOUString(msfilter::util::ConvertColor(aAny.get<sal_Int32>()), RTL_TEXTENCODING_UTF8));
|
||||
aFillModel.moColor.set(OUString("#") + OUString::fromUtf8(msfilter::util::ConvertColor(aAny.get<sal_Int32>())));
|
||||
}
|
||||
else if (i->first == "fillBackColor")
|
||||
// fillType will decide, possible it'll be the end color of a gradient.
|
||||
aFillModel.moColor2.set(OUString("#") + OStringToOUString(msfilter::util::ConvertColor(msfilter::util::BGRToRGB(i->second.toInt32())), RTL_TEXTENCODING_UTF8));
|
||||
aFillModel.moColor2.set(OUString("#") + OUString::fromUtf8(msfilter::util::ConvertColor(msfilter::util::BGRToRGB(i->second.toInt32()))));
|
||||
else if (i->first == "lineColor")
|
||||
aLineColor <<= msfilter::util::BGRToRGB(i->second.toInt32());
|
||||
else if (i->first == "lineBackColor")
|
||||
@@ -564,7 +564,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
|
||||
aShadowModel.mbHasShadow = true;
|
||||
}
|
||||
else if (i->first == "shadowColor")
|
||||
aShadowModel.moColor.set(OUString("#") + OStringToOUString(msfilter::util::ConvertColor(msfilter::util::BGRToRGB(i->second.toInt32())), RTL_TEXTENCODING_UTF8));
|
||||
aShadowModel.moColor.set(OUString("#") + OUString::fromUtf8(msfilter::util::ConvertColor(msfilter::util::BGRToRGB(i->second.toInt32()))));
|
||||
else if (i->first == "shadowOffsetX")
|
||||
// EMUs to points
|
||||
aShadowModel.moOffset.set(OUString::number(i->second.toDouble() / 12700) + "pt");
|
||||
|
Reference in New Issue
Block a user