/** * Windows distinguishes between System Locale (the locale OS is in), and * User Locale (the locale used for regional settings etc.). * * For DateTimePattern, we want to retrieve the User Locale. */ static void ReadUserLocale(nsCString& aRetVal) { nsAutoString locale; LCID win_lcid = GetUserDefaultLCID(); nsWin32Locale::GetXPLocale(win_lcid, locale); aRetVal.AssignWithConversion(locale); }
void CBrowserView::GetBrowserWindowTitle(nsCString& title) { nsXPIDLString idlStrTitle; if(mBaseWindow) mBaseWindow->GetTitle(getter_Copies(idlStrTitle)); title.AssignWithConversion(idlStrTitle); // Sanitize the title of all illegal characters title.CompressWhitespace(); // Remove whitespace from the ends title.StripChars("\\*|:\"><?"); // Strip illegal characters title.ReplaceChar('.', L'_'); // Dots become underscores title.ReplaceChar('/', L'-'); // Forward slashes become hyphens }