[Libreoffice-commits] .: Branch 'libreoffice-4-0' - sw/source writerfilter/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 11 08:27:22 PST 2012


 sw/source/filter/ww8/docxattributeoutput.cxx          |    8 ++++++++
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |    4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit b44bf22ae9c1602d8ff38d90068f6e553dfdc7c5
Author: Lennard <Wasserthal at nefkom.net>
Date:   Sun Dec 9 16:29:47 2012 +0100

    docx import/export non-breaking hyphen and soft hyphen
    
    God made non-breaking hyphen
    and saw that it was gone
    he told us to fix it as soon as hell
    we promised that we would
    
    Change-Id: I1d2bb8f7542f5ffec36fafdbdb07ace1cb62fb4a
    Signed-off-by: Lennard <Wasserthal at nefkom.net>
    Reviewed-on: https://gerrit.libreoffice.org/1279
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 1b0d9fa747c4a7fcdcd1c057bc2b31345f4bfe76)
    
    Signed-off-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index b4dbee9..3cdc325 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1062,6 +1062,14 @@ void DocxAttributeOutput::RunText( const String& rText, rtl_TextEncoding /*eChar
                 impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt );
                 m_pSerializer->singleElementNS( XML_w, XML_br, FSEND );
                 break;
+            case 0x1E: //non-breaking hyphen
+                impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt );
+                m_pSerializer->singleElementNS( XML_w, XML_noBreakHyphen, FSEND );
+                break;
+            case 0x1F: //soft (on demand) hyphen
+                impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt );
+                m_pSerializer->singleElementNS( XML_w, XML_softHyphen, FSEND );
+                break;
             default:
                 if ( *pIt < 0x0020 ) // filter out the control codes
                 {
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index c6f03bb..37c3336 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -44,8 +44,8 @@ static const sal_Unicode uFtnEdnRef = 0x2;
 static const sal_Unicode uFtnEdnSep = 0x3;
 static const sal_Unicode uTab = 0x9;
 static const sal_Unicode uPgNum = 0x0;
-static const sal_Unicode uNoBreakHyphen = 0x1e;
-static const sal_Unicode uSoftHyphen = 0x1f;
+static const sal_Unicode uNoBreakHyphen = 0x2011;
+static const sal_Unicode uSoftHyphen = 0xAD;
 
 static const sal_uInt8 cFtnEdnCont = 0x4;
 static const sal_uInt8 cFieldStart = 0x13;


More information about the Libreoffice-commits mailing list