sw/source/filter/ww8/docxattributeoutput.cxx |   16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

New commits:
commit 53fe42375e31f09dccefbc43dfeabd988cc52a95
Author: Joren De Cuyper <jore...@libreoffice.org>
Date:   Tue May 12 22:19:06 2015 +0200

    tdf#76941 : docx export image greyscale
    
    Change-Id: I104d6db7834b4235248736a9498a0e2a20cc7a43
    Reviewed-on: https://gerrit.libreoffice.org/15722
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 701ebc7..62ffaed 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);
     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to