openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject svn commit: r1580779 - /openoffice/trunk/main/vcl/aqua/source/gdi/ctlayout.cxx
Date Mon, 24 Mar 2014 07:48:45 GMT
Author: hdu
Date: Mon Mar 24 07:48:44 2014
New Revision: 1580779

URL: http://svn.apache.org/r1580779
Log:
#i124375# force soft-hyphen visibility for CoreText to meet Writer+EEng expectations

Modified:
    openoffice/trunk/main/vcl/aqua/source/gdi/ctlayout.cxx

Modified: openoffice/trunk/main/vcl/aqua/source/gdi/ctlayout.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/gdi/ctlayout.cxx?rev=1580779&r1=1580778&r2=1580779&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/gdi/ctlayout.cxx (original)
+++ openoffice/trunk/main/vcl/aqua/source/gdi/ctlayout.cxx Mon Mar 24 07:48:44 2014
@@ -121,8 +121,16 @@ bool CTLayout::LayoutText( ImplLayoutArg
 	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
 	mpAttrString = CFAttributedStringCreate( NULL, aCFText, mpTextStyle->GetStyleDict() );
 	mpCTLine = CTLineCreateWithAttributedString( mpAttrString );
 	CFRelease( aCFText);



Mime
View raw message