summaryrefslogtreecommitdiff
path: root/vcl/quartz/ctlayout.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/quartz/ctlayout.cxx')
-rw-r--r--vcl/quartz/ctlayout.cxx11
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 );