sw/source/filter/ww8/rtfattributeoutput.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 0e2ab91c06eb42f6583989bd37a7537b9114b02f
Author:     Justin Luth <justin_l...@sil.org>
AuthorDate: Tue Nov 26 21:23:13 2019 +0300
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Dec 3 17:54:35 2019 +0100

    partial revert tdf#127316 for rtfexport: restore ++nProp
    
    Because the nProp is multiplied by 100, adding +1 can have
    special meaning, as also noted in editeng/impedit4.cxx.
    
    This is an interesting hack, where _nProp_ is used
    to determine if _nEsc_ should be automatic.
    
    It was dumb of me to even consider getting rid of it just
    because I didn't understand it.
    So revert that part of the change.
    
    Change-Id: Ibae5a84c369474f00702614ac5eecdc533aea914
    Reviewed-on: https://gerrit.libreoffice.org/83846
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Reviewed-by: Justin Luth <justin_l...@sil.org>
    (cherry picked from commit 2fcc04722d72dbadf8d3decd7a5014ec39b93d27)
    Reviewed-on: https://gerrit.libreoffice.org/83867
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index a16424b01e2e..6044dfcc463a 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -2325,6 +2325,7 @@ void RtfAttributeOutput::CharCrossedOut(const 
SvxCrossedOutItem& rCrossedOut)
 void RtfAttributeOutput::CharEscapement(const SvxEscapementItem& rEscapement)
 {
     short nEsc = rEscapement.GetEsc(), nProp = 
rEscapement.GetProportionalHeight();
+    sal_Int32 nProp100 = nProp * 100;
     if (DFLT_ESC_PROP == nProp || nProp < 1 || nProp > 100)
     {
         if (DFLT_ESC_SUB == nEsc || DFLT_ESC_AUTO_SUB == nEsc)
@@ -2336,10 +2337,12 @@ void RtfAttributeOutput::CharEscapement(const 
SvxEscapementItem& rEscapement)
     else if (DFLT_ESC_AUTO_SUPER == nEsc)
     {
         nEsc = .8 * (100 - nProp);
+        ++nProp100; // A 1 afterwards means 'automatic' according to 
editeng/rtf/rtfitem.cxx
     }
     else if (DFLT_ESC_AUTO_SUB == nEsc)
     {
         nEsc = .2 * -(100 - nProp);
+        ++nProp100;
     }
 
     const char* pUpDn;
@@ -2359,7 +2362,7 @@ void RtfAttributeOutput::CharEscapement(const 
SvxEscapementItem& rEscapement)
     m_aStyles.append('{');
     m_aStyles.append(OOO_STRING_SVTOOLS_RTF_IGNORE);
     m_aStyles.append(OOO_STRING_SVTOOLS_RTF_UPDNPROP);
-    m_aStyles.append(static_cast<sal_Int32>(nProp * 100));
+    m_aStyles.append(nProp100);
     m_aStyles.append('}');
     m_aStyles.append(pUpDn);
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to