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

Caolán McNamara caolanm at redhat.com
Sat Apr 1 16:46:16 UTC 2017


 writerfilter/source/dmapper/PropertyMap.cxx    |    4 ++--
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |    2 +-
 writerfilter/source/rtftok/rtfsdrimport.cxx    |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit b993942622897fc64a1f7462189fa0463eb30e1c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Apr 1 16:43:04 2017 +0100

    ubsan: use WrapTextMode_MAKE_FIXED_SIZE instead of -1 as unset flag
    
    Change-Id: I0d460c5a0c14d078623fb1669a529a411002cad0
    Reviewed-on: https://gerrit.libreoffice.org/36009
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 9add77dea8a7..2597f092cb62 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1557,7 +1557,7 @@ ParagraphProperties::ParagraphProperties() :
     m_nLines(0),
     m_w(-1),
     m_h(-1),
-    m_nWrap((text::WrapTextMode)-1),
+    m_nWrap(text::WrapTextMode_MAKE_FIXED_SIZE),
     m_hAnchor(-1),
     m_vAnchor(-1),
     m_x(-1),
@@ -1637,7 +1637,7 @@ void ParagraphProperties::ResetFrameProperties()
     m_nLines = 0;
     m_w = -1;
     m_h = -1;
-    m_nWrap = (text::WrapTextMode)-1;
+    m_nWrap = text::WrapTextMode_MAKE_FIXED_SIZE;
     m_hAnchor = -1;
     m_vAnchor = -1;
     m_x = -1;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 598175806400..bafdd3484ab0 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3272,7 +3272,7 @@ RTFShape::RTFShape()
       nVertOrientRelation(0),
       nHoriOrientRelationToken(0),
       nVertOrientRelationToken(0),
-      nWrap((text::WrapTextMode)-1),
+      nWrap(text::WrapTextMode_MAKE_FIXED_SIZE),
       bInBackground(false)
 {
 }
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 28ef52f8bfa3..18263f32106a 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -958,7 +958,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
             xPropertySet->setPropertyValue("HoriOrientRelation", uno::makeAny(rShape.nHoriOrientRelation));
         if (rShape.nVertOrientRelation != 0)
             xPropertySet->setPropertyValue("VertOrientRelation", uno::makeAny(rShape.nVertOrientRelation));
-        if (rShape.nWrap != (text::WrapTextMode)-1)
+        if (rShape.nWrap != text::WrapTextMode_MAKE_FIXED_SIZE)
             xPropertySet->setPropertyValue("Surround", uno::makeAny(text::WrapTextMode(rShape.nWrap)));
         oox::ModelObjectHelper aModelObjectHelper(m_rImport.getModelFactory());
         if (aFillModel.moType.has())


More information about the Libreoffice-commits mailing list