Kaydet (Commit) 53fe4237 authored tarafından Joren De Cuyper's avatar Joren De Cuyper Kaydeden (comit) Caolán McNamara

tdf#76941 : docx export image greyscale

Change-Id: I104d6db7834b4235248736a9498a0e2a20cc7a43
Reviewed-on: https://gerrit.libreoffice.org/15722Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 844b7287
...@@ -3224,22 +3224,22 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t ...@@ -3224,22 +3224,22 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
uno::Sequence<beans::PropertyValue> aTablePosition = aGrabBagElement->second.get<uno::Sequence<beans::PropertyValue> >(); uno::Sequence<beans::PropertyValue> aTablePosition = aGrabBagElement->second.get<uno::Sequence<beans::PropertyValue> >();
for (sal_Int32 i = 0; i < aTablePosition.getLength(); ++i) for (sal_Int32 i = 0; i < aTablePosition.getLength(); ++i)
{ {
if (aTablePosition[i].Name == "vertAnchor" && !aTablePosition[i].Value.get<OUString>().isEmpty()) if (aTablePosition[i].Name == "vertAnchor")
{ {
OString strTemp = OUStringToOString(aTablePosition[i].Value.get<OUString>(), RTL_TEXTENCODING_UTF8); OString strTemp = OUStringToOString(aTablePosition[i].Value.get<OUString>(), RTL_TEXTENCODING_UTF8);
attrListTablePos->add( FSNS( XML_w, XML_vertAnchor ), strTemp.getStr() ); attrListTablePos->add( FSNS( XML_w, XML_vertAnchor ), strTemp.getStr() );
} }
else if (aTablePosition[i].Name == "tblpYSpec" && !aTablePosition[i].Value.get<OUString>().isEmpty()) else if (aTablePosition[i].Name == "tblpYSpec")
{ {
OString strTemp = OUStringToOString(aTablePosition[i].Value.get<OUString>(), RTL_TEXTENCODING_UTF8); OString strTemp = OUStringToOString(aTablePosition[i].Value.get<OUString>(), RTL_TEXTENCODING_UTF8);
attrListTablePos->add( FSNS( XML_w, XML_tblpYSpec ), strTemp.getStr() ); attrListTablePos->add( FSNS( XML_w, XML_tblpYSpec ), strTemp.getStr() );
} }
else if (aTablePosition[i].Name == "horzAnchor" && !aTablePosition[i].Value.get<OUString>().isEmpty()) else if (aTablePosition[i].Name == "horzAnchor")
{ {
OString strTemp = OUStringToOString(aTablePosition[i].Value.get<OUString>(), RTL_TEXTENCODING_UTF8); OString strTemp = OUStringToOString(aTablePosition[i].Value.get<OUString>(), RTL_TEXTENCODING_UTF8);
attrListTablePos->add( FSNS( XML_w, XML_horzAnchor ), strTemp.getStr() ); attrListTablePos->add( FSNS( XML_w, XML_horzAnchor ), strTemp.getStr() );
} }
else if (aTablePosition[i].Name == "tblpXSpec" && !aTablePosition[i].Value.get<OUString>().isEmpty()) else if (aTablePosition[i].Name == "tblpXSpec")
{ {
OString strTemp = OUStringToOString(aTablePosition[i].Value.get<OUString>(), RTL_TEXTENCODING_UTF8); OString strTemp = OUStringToOString(aTablePosition[i].Value.get<OUString>(), RTL_TEXTENCODING_UTF8);
attrListTablePos->add( FSNS( XML_w, XML_tblpXSpec ), strTemp.getStr() ); attrListTablePos->add( FSNS( XML_w, XML_tblpXSpec ), strTemp.getStr() );
...@@ -4193,6 +4193,14 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size ...@@ -4193,6 +4193,14 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
FSNS( XML_r, nImageType ), aRelId.getStr(), FSNS( XML_r, nImageType ), aRelId.getStr(),
FSEND ); FSEND );
const SfxPoolItem* pItemm;
if (SfxItemState::SET == pOLENode->GetSwAttrSet().GetItemState(RES_GRFATR_DRAWMODE, true, &pItemm))
{
const SfxEnumItem* nMode = static_cast<const SfxEnumItem*>(pItemm);
if (nMode && nMode->GetValue() == GRAPHICDRAWMODE_GREYS )
m_pSerializer->singleElementNS (XML_a, XML_grayscl, FSEND);
}
if (pSdrObj){ if (pSdrObj){
WriteSrcRect(pSdrObj); WriteSrcRect(pSdrObj);
} }
......
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