summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/carbon/org
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2002-10-25 16:02:34 +0000
committerVeronika Irvine <veronika>2002-10-25 16:02:34 +0000
commit0bcce8701fee7076e5f1dd2db6410f49b6638dae (patch)
treeaa01c9b0354b8ecd8970a48685d01eabc252f721 /bundles/org.eclipse.swt/Eclipse SWT/carbon/org
parentc49f89f619b0335e38f9cf353e1c8746ff3df38e (diff)
downloadeclipse.platform.swt-0bcce8701fee7076e5f1dd2db6410f49b6638dae.tar.gz
eclipse.platform.swt-0bcce8701fee7076e5f1dd2db6410f49b6638dae.tar.xz
eclipse.platform.swt-0bcce8701fee7076e5f1dd2db6410f49b6638dae.zip
Inlining CFStringCreateWithCharacters
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/carbon/org')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Label.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Label.java
index 0f1711e10a..316332d691 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Label.java
@@ -108,7 +108,10 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
wrap= true;
bounds[1]= (short) wHint; // If we are wrapping text, calculate the height based on wHint.
}
- int sHandle= OS.CFStringCreateWithCharacters(MacUtil.removeMnemonics(text));
+ String string= MacUtil.removeMnemonics(text);
+ char [] chars= new char [string.length()];
+ string.getChars(0, chars.length, chars, 0);
+ int sHandle= OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, chars, chars.length);
GC gc= new GC(this);
gc.carbon_installFont();