Bugzilla – Attachment 130694 Details for
Bug 101626
Hyphen missing in pdf export
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
.doc demo hack patch
0001-Related-tdf-101626-smush-soft-hyphens-to-hard-hyphen.patch (text/plain), 2.60 KB, created by
Caolán McNamara
on 2017-01-26 11:12:31 UTC
(
hide
)
Description:
.doc demo hack patch
Filename:
MIME Type:
Creator:
Caolán McNamara
Created:
2017-01-26 11:12:31 UTC
Size:
2.60 KB
patch
obsolete
>From 6d5f133c7621e1b5a232baa5e0dbee1d51763537 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com> >Date: Thu, 26 Jan 2017 11:07:42 +0000 >Subject: [PATCH] Related: tdf#101626 smush soft hyphens to hard hyphens on > import > >word uses 0x1f to indicate a soft hyphen, writer uses 0xad, if >word sees a 0xad it renders it, if writer sees one it doesn't, >so transform 0xad on import into 0x2010 so that we render it > >this patch probably isn't 100% as it probably needs to not >transform 0xad to 0x2010 in bullets if the font is a symbol >font > >Change-Id: I980271b7cbcaae2b48440363bfb7472add091e15 >--- > sw/source/filter/ww8/ww8par.cxx | 7 +++++-- > sw/source/filter/ww8/ww8par3.cxx | 3 +++ > 2 files changed, 8 insertions(+), 2 deletions(-) > >diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx >index 130808a..2fc1488 100644 >--- a/sw/source/filter/ww8/ww8par.cxx >+++ b/sw/source/filter/ww8/ww8par.cxx >@@ -3082,10 +3082,10 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCp > return true; > } > >- if ((32 > nUCode) || (0xa0 == nUCode)) >+ if ((32 > nUCode) || (0xa0 == nUCode) || (0xad == nUCode)) > { > m_pStrm->SeekRel( m_bIsUnicode ? -2 : -1 ); >- break; // Special character < 32, == 0xa0 found >+ break; // Special character < 32, == 0xa0, == 0xad found > } > > if (m_bIsUnicode) >@@ -3591,6 +3591,9 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) > case 0xa0: // Non-breaking spaces > m_rDoc.getIDocumentContentOperations().InsertString( *m_pPaM, OUString(CHAR_HARDBLANK) ); > break; >+ case 0xad: // word renders soft-hyphens, so transform to hard-hyphen >+ m_rDoc.getIDocumentContentOperations().InsertString( *m_pPaM, OUString(CHAR_HARDHYPHEN) ); >+ break; > case 0x1: > /* > Current thinking is that if bObj is set then we have a >diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx >index f9468c6..13b3c64 100644 >--- a/sw/source/filter/ww8/ww8par3.cxx >+++ b/sw/source/filter/ww8/ww8par3.cxx >@@ -715,6 +715,9 @@ bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, SfxItemSet*& rpItemSet, > > OUString sNumString(sanitizeString(read_uInt16_PascalString(rSt))); > >+ // tdf#101626 word renders soft-hyphens, so transform to hard-hyphen >+ sNumString = sNumString.replaceAll(OUStringLiteral1(0xad), OUStringLiteral1(CHAR_HARDHYPHEN)); >+ > // 5. gelesene Werte in Writer Syntax umwandeln > > if( 0 <= aLVL.nStartAt ) >-- >2.9.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 101626
:
126919
|
126920
|
126921
| 130694