[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Thu May 14 02:30:08 PDT 2015


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

New commits:
commit c31b9c556946b65cba504c165b0afb7fedf4b340
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu May 14 10:29:30 2015 +0100

    restore these safety checks
    
    Change-Id: Icf833ca052f925075447bbf6845ad61da267cc8b

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 62ffaed..d52f52d 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")
+                if (aTablePosition[i].Name == "vertAnchor" && !aTablePosition[i].Value.get<OUString>().isEmpty())
                 {
                     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")
+                else if (aTablePosition[i].Name == "tblpYSpec" && !aTablePosition[i].Value.get<OUString>().isEmpty())
                 {
                     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")
+                else if (aTablePosition[i].Name == "horzAnchor" && !aTablePosition[i].Value.get<OUString>().isEmpty())
                 {
                     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")
+                else if (aTablePosition[i].Name == "tblpXSpec" && !aTablePosition[i].Value.get<OUString>().isEmpty())
                 {
                     OString strTemp = OUStringToOString(aTablePosition[i].Value.get<OUString>(), RTL_TEXTENCODING_UTF8);
                     attrListTablePos->add( FSNS( XML_w, XML_tblpXSpec ), strTemp.getStr() );


More information about the Libreoffice-commits mailing list