CFMutableStringRef cfMutableString = CFStringCreateMutableCopy(NULL, 0, cfString);
CFRelease( cfString );
CFStringNormalize(cfMutableString,kCFStringNormalizationFormC);
- return wxMacCFStringHolder(cfMutableString).AsString();
+ return wxCFStringRef(cfMutableString).AsString();
}
OSStatus wxMacPathToFSRef( const wxString&path , FSRef *fsRef )
{
OSStatus err = noErr ;
- CFMutableStringRef cfMutableString = CFStringCreateMutableCopy(NULL, 0, wxMacCFStringHolder(path));
+ CFMutableStringRef cfMutableString = CFStringCreateMutableCopy(NULL, 0, wxCFStringRef(path));
CFStringNormalize(cfMutableString,kCFStringNormalizationFormD);
CFURLRef url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, cfMutableString , kDefaultPathStyle, false);
CFRelease( cfMutableString );
CFMutableStringRef cfMutableString = CFStringCreateMutableCopy(NULL, 0, cfname);
CFRelease( cfname );
CFStringNormalize(cfMutableString,kCFStringNormalizationFormC);
- return wxMacCFStringHolder(cfMutableString).AsString() ;
+ return wxCFStringRef(cfMutableString).AsString() ;
}
#ifndef __LP64__
// first get the string identifying the language from the environment
wxString langFull;
#ifdef __WXMAC__
- // as at the C-runtime level many OS X versions only have a "C" locale, therefore we use the CFLocale (ICU based)
wxCFRef<CFLocaleRef> userLocaleRef(CFLocaleCopyCurrent());
// because the locale identifier (kCFLocaleIdentifier) is formatted a little bit differently, eg
// az_Cyrl_AZ@calendar=buddhist;currency=JPY we just recreate the base info as expected by wx here
- wxMacCFStringHolder str(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleLanguageCode)));
+ wxCFStringRef str(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleLanguageCode)));
langFull = str.AsString()+"_";
- str.Assign(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode)));
+ str.reset(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode)));
langFull += str.AsString();
#else
if (!wxGetEnv(wxT("LC_ALL"), &langFull) &&
wxFAIL_MSG( "Unknown locale info" );
}
- wxMacCFStringHolder
+ wxCFStringRef
str(CFStringCreateCopy(NULL, static_cast<CFStringRef>(cfstr)));
return str.AsString();
}
{
// we have to emulate the behaviour under OS X
wxCFRef<CFLocaleRef> userLocaleRef(CFLocaleCopyCurrent());
- wxMacCFStringHolder str(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleLanguageCode)));
+ wxCFStringRef str(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleLanguageCode)));
wxString langFull = str.AsString()+"_";
- str.Assign(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode)));
+ str.reset(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode)));
langFull += str.AsString();
rv = setlocale(category, langFull.c_str());
}