diff options
author | Herbert Dürr <hdu@apache.org> | 2014-03-24 07:48:44 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-24 12:12:23 +0000 |
commit | 8214c1d6156c90cbf259b15cf1c8e15ea1c70daf (patch) | |
tree | a6990f023d725cbbbbc1dfe1243570450e008834 | |
parent | 9afdc72df60811435587b85ef333ee29d1d3ce15 (diff) |
Resolves: #i124375# force soft-hyphen visibility for CoreText...
to meet Writer+EEng expectations
(cherry picked from commit c7243848547b19a3b237f18629b809d93ee821c4)
Conflicts:
vcl/aqua/source/gdi/ctlayout.cxx
Change-Id: If580bcb517695ae1c94657ac9348ad36eda37e9d
-rw-r--r-- | vcl/quartz/ctlayout.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx index b8b1b98e6ce0..e479d31853f6 100644 --- a/vcl/quartz/ctlayout.cxx +++ b/vcl/quartz/ctlayout.cxx @@ -108,11 +108,20 @@ bool CTLayout::LayoutText( ImplLayoutArgs& rArgs ) if( mnCharCount <= 0 ) return false; - // create the CoreText line layout + // prepare the string to be layouted by CoreText CFStringRef aCFText = CFStringCreateWithCharactersNoCopy( NULL, rArgs.mpStr + mnMinCharPos, mnCharCount, kCFAllocatorNull ); + + // #i124375# force soft-hyphen visibility to meet the expectations of Writer+EditEngine + if( CFStringFind( aCFText, (CFStringRef)@"\u00AD", 0).length > 0 ) + { + NSString* pDashStr = [(NSString*)aCFText stringByReplacingOccurrencesOfString: @"\u00AD" withString: @"-"]; + aCFText = CFStringCreateCopy( NULL, (CFStringRef)pDashStr ); + } + + // create the CoreText line layout using the requested text style // CFAttributedStringCreate copies the attribues parameter mpAttrString = CFAttributedStringCreate( NULL, aCFText, mpTextStyle->GetStyleDict() ); mpCTLine = CTLineCreateWithAttributedString( mpAttrString ); |