summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoren De Cuyper <jorendc@libreoffice.org>2015-05-12 22:19:06 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-05-14 09:23:01 +0000
commit53fe42375e31f09dccefbc43dfeabd988cc52a95 (patch)
tree4a57f4c3e7ff4205e280b784e7f3c214d56272a1
parent844b7287a4ccd8e3d5e458bb1dc6c52e71322b01 (diff)
tdf#76941 : docx export image greyscale
Change-Id: I104d6db7834b4235248736a9498a0e2a20cc7a43 Reviewed-on: https://gerrit.libreoffice.org/15722 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 701ebc7de113..62ffaed9da20 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3224,22 +3224,22 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
uno::Sequence<beans::PropertyValue> aTablePosition = aGrabBagElement->second.get<uno::Sequence<beans::PropertyValue> >();
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);
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);
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);
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);
attrListTablePos->add( FSNS( XML_w, XML_tblpXSpec ), strTemp.getStr() );
@@ -4193,6 +4193,14 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
FSNS( XML_r, nImageType ), aRelId.getStr(),
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){
WriteSrcRect(pSdrObj);
}