diff --git a/mozilla/content/base/src/nsDocumentEncoder.cpp b/mozilla/content/base/src/nsDocumentEncoder.cpp index bdfe4eb9659..b8c9a470ee0 100644 --- a/mozilla/content/base/src/nsDocumentEncoder.cpp +++ b/mozilla/content/base/src/nsDocumentEncoder.cpp @@ -74,6 +74,7 @@ #include "nsIScriptContext.h" #include "nsIScriptGlobalObject.h" #include "nsIScriptSecurityManager.h" +#include "nsUnicharUtils.h" static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID); @@ -1553,7 +1554,7 @@ nsHTMLCopyEncoder::IsMozBR(nsIDOMNode* aNode) nsAutoString typeAttrName(NS_LITERAL_STRING("type")); nsAutoString typeAttrVal; nsresult rv = elem->GetAttribute(typeAttrName, typeAttrVal); - typeAttrVal.ToLowerCase(); + ToLowerCase(typeAttrVal); if (NS_SUCCEEDED(rv) && (typeAttrVal.Equals(NS_LITERAL_STRING("_moz")))) return PR_TRUE; } diff --git a/mozilla/content/base/src/nsXMLContentSerializer.cpp b/mozilla/content/base/src/nsXMLContentSerializer.cpp index 057c3242412..c56233e9162 100644 --- a/mozilla/content/base/src/nsXMLContentSerializer.cpp +++ b/mozilla/content/base/src/nsXMLContentSerializer.cpp @@ -51,6 +51,7 @@ #include "nsTextFragment.h" #include "nsString.h" #include "prprf.h" +#include "nsUnicharUtils.h" typedef struct { nsString mPrefix; @@ -420,7 +421,7 @@ nsXMLContentSerializer::AppendElementStart(nsIDOMElement *aElement, PRInt32 namespaceID, elementNamespaceID; content->GetNameSpaceID(elementNamespaceID); if (elementNamespaceID == kNameSpaceID_HTML) - tagLocalName.ToLowerCase(); // XXX We shouldn't need this hack + ToLowerCase(tagLocalName); // XXX We shouldn't need this hack PRInt32 index, count; nsAutoString nameStr, prefixStr, uriStr, valueStr; @@ -558,7 +559,7 @@ nsXMLContentSerializer::AppendElementEnd(nsIDOMElement *aElement, PRInt32 namespaceID; content->GetNameSpaceID(namespaceID); if (namespaceID == kNameSpaceID_HTML) - tagLocalName.ToLowerCase(); // XXX We shouldn't need this hack + ToLowerCase(tagLocalName); // XXX We shouldn't need this hack ConfirmPrefix(tagPrefix, tagNamespaceURI); diff --git a/mozilla/content/events/src/Makefile.in b/mozilla/content/events/src/Makefile.in index f4c4ae35129..36d5f0fa222 100644 --- a/mozilla/content/events/src/Makefile.in +++ b/mozilla/content/events/src/Makefile.in @@ -44,6 +44,7 @@ REQUIRES = xpcom \ htmlparser \ view \ necko \ + unicharutil \ $(NULL) CPPSRCS = \ diff --git a/mozilla/content/events/src/makefile.win b/mozilla/content/events/src/makefile.win index 4a53bda2b7b..18ce650b97f 100644 --- a/mozilla/content/events/src/makefile.win +++ b/mozilla/content/events/src/makefile.win @@ -42,6 +42,7 @@ REQUIRES = xpcom \ layout \ layout_xul \ necko \ + unicharutil \ $(NULL) include <$(DEPTH)\config\config.mak> diff --git a/mozilla/content/events/src/nsEventStateManager.cpp b/mozilla/content/events/src/nsEventStateManager.cpp index c3f35863e12..f641ac44447 100644 --- a/mozilla/content/events/src/nsEventStateManager.cpp +++ b/mozilla/content/events/src/nsEventStateManager.cpp @@ -110,6 +110,7 @@ #include "nsIFrameTraversal.h" #include "nsLayoutCID.h" #include "nsIInterfaceRequestorUtils.h" +#include "nsUnicharUtils.h" #if defined(DEBUG_rods) || defined(DEBUG_bryner) //#define DEBUG_DOCSHELL_FOCUS @@ -747,7 +748,7 @@ nsEventStateManager::PreHandleEvent(nsIPresContext* aPresContext, if (mAccessKeys) { //Someone registered an accesskey. Find and activate it. nsAutoString accKey((char)keyEvent->charCode); - accKey.ToLowerCase(); + ToLowerCase(accKey); nsVoidKey key((void*)accKey.First()); if (mAccessKeys->Exists(&key)) { @@ -3726,7 +3727,7 @@ nsEventStateManager::RegisterAccessKey(nsIFrame * aFrame, nsIContent* aContent, if (content) { nsAutoString accKey((char)aKey); - accKey.ToLowerCase(); + ToLowerCase(accKey); nsVoidKey key((void*)accKey.First()); @@ -3752,7 +3753,7 @@ nsEventStateManager::UnregisterAccessKey(nsIFrame * aFrame, nsIContent* aContent } if (content) { nsAutoString accKey((char)aKey); - accKey.ToLowerCase(); + ToLowerCase(accKey); nsVoidKey key((void*)accKey.First()); diff --git a/mozilla/content/html/content/src/nsGenericHTMLElement.cpp b/mozilla/content/html/content/src/nsGenericHTMLElement.cpp index c870b840831..c95fad8a149 100644 --- a/mozilla/content/html/content/src/nsGenericHTMLElement.cpp +++ b/mozilla/content/html/content/src/nsGenericHTMLElement.cpp @@ -408,7 +408,7 @@ nsGenericHTMLElement::GetElementsByTagName(const nsAReadableString& aTagname, // Only lowercase the name if this element has no namespace (i.e. // it's a HTML element, not an XHTML element). if (mNodeInfo && mNodeInfo->NamespaceEquals(kNameSpaceID_None)) - tagName.ToLowerCase(); + ToLowerCase(tagName); return nsGenericElement::GetElementsByTagName(tagName, aReturn); } @@ -1497,7 +1497,7 @@ nsGenericHTMLElement::NormalizeAttrString(const nsAReadableString& aStr, { // XXX need to validate/strip namespace prefix nsAutoString lower(aStr); - lower.ToLowerCase(); + ToLowerCase(lower); nsCOMPtr nimgr; mNodeInfo->GetNodeInfoManager(*getter_AddRefs(nimgr)); diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index 19d0f01c034..d106d862ef9 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -38,6 +38,8 @@ * * ***** END LICENSE BLOCK ***** */ #include "nsCOMPtr.h" +#include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "nsXPIDLString.h" #include "nsIHTMLContentSink.h" #include "nsIInterfaceRequestor.h" @@ -757,7 +759,7 @@ HTMLContentSink::AddAttributes(const nsIParserNode& aNode, // Get upper-cased key const nsAReadableString& key = aNode.GetKeyAt(i); k.Assign(key); - k.ToLowerCase(); + ToLowerCase(k); nsCOMPtr keyAtom(dont_AddRef(NS_NewAtom(k))); nsHTMLValue value; @@ -824,7 +826,7 @@ HTMLContentSink::CreateContentObject(const nsIParserNode& aNode, if (aNodeType == eHTMLTag_userdefined) { nsAutoString tmp; tmp.Append(aNode.GetText()); - tmp.ToLowerCase(); + ToLowerCase(tmp); rv = mNodeInfoManager->GetNodeInfo(tmp, nsnull, kNameSpaceID_None, *getter_AddRefs(nodeInfo)); @@ -4347,7 +4349,7 @@ HTMLContentSink::ProcessLink(nsIHTMLContent* aElement, const nsAReadableString& else if (attr.EqualsIgnoreCase("media")) { if (0 == media.Length()) { media = value; - media.ToLowerCase(); // HTML4.0 spec is inconsistent, make it case INSENSITIVE + ToLowerCase(media); // HTML4.0 spec is inconsistent, make it case INSENSITIVE } } } @@ -4615,7 +4617,7 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode) nsAutoString result; it->GetAttr(kNameSpaceID_HTML, nsHTMLAtoms::content, result); if (result.Length() > 0) { - header.ToLowerCase(); + ToLowerCase(header); nsCOMPtr fieldAtom(dont_AddRef(NS_NewAtom(header))); rv=ProcessHeaderData(fieldAtom,result,it); }//if (result.Length() > 0) @@ -5196,7 +5198,7 @@ HTMLContentSink::ProcessSTYLETag(const nsIParserNode& aNode) element->GetAttr(kNameSpaceID_HTML, nsHTMLAtoms::type, type); element->GetAttr(kNameSpaceID_HTML, nsHTMLAtoms::media, media); - media.ToLowerCase(); // HTML4.0 spec is inconsistent, make it case INSENSITIVE + ToLowerCase(media); // HTML4.0 spec is inconsistent, make it case INSENSITIVE nsAutoString mimeType; nsAutoString params; diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp index 9beb2de5dce..f3a73adc3aa 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp @@ -44,6 +44,7 @@ #include "nsIFileChannel.h" #include "nsXPIDLString.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "nsHTMLDocument.h" #include "nsIParser.h" #include "nsIParserFilter.h" @@ -1360,7 +1361,7 @@ nsHTMLDocument::CreateElement(const nsAReadableString& aTagName, nsCOMPtr nodeInfo; nsAutoString tmp(aTagName); - tmp.ToLowerCase(); + ToLowerCase(tmp); mNodeInfoManager->GetNodeInfo(tmp, nsnull, kNameSpaceID_None, *getter_AddRefs(nodeInfo)); @@ -1451,7 +1452,7 @@ NS_IMETHODIMP nsHTMLDocument::GetElementsByTagName(const nsAReadableString& aTagname, nsIDOMNodeList** aReturn) { nsAutoString tmp(aTagname); - tmp.ToLowerCase(); // HTML elements are lower case internally. + ToLowerCase(tmp); // HTML elements are lower case internally. return nsDocument::GetElementsByTagName(tmp, aReturn); } @@ -2565,7 +2566,7 @@ nsHTMLDocument::GetElementsByTagNameNS(const nsAReadableString& aNamespaceURI, nsIDOMNodeList** aReturn) { nsAutoString tmp(aLocalName); - tmp.ToLowerCase(); // HTML elements are lower case internally. + ToLowerCase(tmp); // HTML elements are lower case internally. return nsDocument::GetElementsByTagNameNS(aNamespaceURI, tmp, aReturn); } diff --git a/mozilla/content/html/document/src/nsHTMLFragmentContentSink.cpp b/mozilla/content/html/document/src/nsHTMLFragmentContentSink.cpp index b65ef8bec85..363a313d7c5 100644 --- a/mozilla/content/html/document/src/nsHTMLFragmentContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLFragmentContentSink.cpp @@ -58,6 +58,7 @@ #include "nsINodeInfo.h" #include "prmem.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "nsContentUtils.h" // @@ -908,7 +909,7 @@ nsHTMLFragmentContentSink::AddAttributes(const nsIParserNode& aNode, // Get upper-cased key const nsAReadableString& key = aNode.GetKeyAt(i); k.Assign(key); - k.ToLowerCase(); + ToLowerCase(k); nsIAtom* keyAtom = NS_NewAtom(k); diff --git a/mozilla/content/html/document/src/nsImageDocument.cpp b/mozilla/content/html/document/src/nsImageDocument.cpp index 78f4a097c12..6315187ba05 100644 --- a/mozilla/content/html/document/src/nsImageDocument.cpp +++ b/mozilla/content/html/document/src/nsImageDocument.cpp @@ -473,7 +473,7 @@ nsresult nsImageDocument::UpdateTitle( void ) pURL->GetFileExtension(&pExtension); if(pExtension){ nsString strExt; strExt.AssignWithConversion(pExtension); - strExt.ToUpperCase(); + ToUpperCase(strExt); titleStr.Append(strExt); nsCRT::free(pExtension); pExtension=nsnull; diff --git a/mozilla/content/html/style/src/nsCSSParser.cpp b/mozilla/content/html/style/src/nsCSSParser.cpp index 17d17e6e5e2..244ee9b90d5 100644 --- a/mozilla/content/html/style/src/nsCSSParser.cpp +++ b/mozilla/content/html/style/src/nsCSSParser.cpp @@ -57,6 +57,7 @@ #include "nsNetUtil.h" #include "nsCOMPtr.h" #include "nsString.h" +#include "nsReadableUtils.h" #include "nsUnicharUtils.h" #include "nsIAtom.h" #include "nsVoidArray.h" diff --git a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp index 2a8dfca3dd6..aa1465654c6 100644 --- a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp +++ b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp @@ -175,7 +175,7 @@ PRUint32 AtomKey_base::HashCode(void) const #endif nsAutoString myStr; mAtom->ToString(myStr); - myStr.ToUpperCase(); + ToUpperCase(myStr); return nsCRT::HashCode(myStr.get()); } } diff --git a/mozilla/content/shared/src/nsCSSKeywords.cpp b/mozilla/content/shared/src/nsCSSKeywords.cpp index 04f51759080..9e0ddae780a 100644 --- a/mozilla/content/shared/src/nsCSSKeywords.cpp +++ b/mozilla/content/shared/src/nsCSSKeywords.cpp @@ -39,6 +39,7 @@ #include "nsCSSKeywords.h" #include "nsString.h" #include "nsStaticNameTable.h" +#include "nsReadableUtils.h" // define an array of all CSS keywords #define CSS_KEY(_name,_id) #_name, @@ -63,7 +64,7 @@ nsCSSKeywords::AddRefTable(void) for (PRInt32 index = 0; index < eCSSKeyword_COUNT; ++index) { nsCAutoString temp1(kCSSRawKeywords[index]); nsCAutoString temp2(kCSSRawKeywords[index]); - temp1.ToLowerCase(); + ToLowerCase(temp1); NS_ASSERTION(temp1.Equals(temp2), "upper case char in table"); NS_ASSERTION(-1 == temp1.FindChar('_'), "underscore char in table"); } diff --git a/mozilla/content/shared/src/nsCSSProps.cpp b/mozilla/content/shared/src/nsCSSProps.cpp index af6ab4a7043..5c179578b4a 100644 --- a/mozilla/content/shared/src/nsCSSProps.cpp +++ b/mozilla/content/shared/src/nsCSSProps.cpp @@ -43,6 +43,7 @@ #include "nsILookAndFeel.h" // for system colors #include "nsString.h" +#include "nsReadableUtils.h" #include "nsStaticNameTable.h" // define an array of all CSS properties @@ -69,7 +70,7 @@ nsCSSProps::AddRefTable(void) for (PRInt32 index = 0; index < eCSSProperty_COUNT; ++index) { nsCAutoString temp1(kCSSRawProperties[index]); nsCAutoString temp2(kCSSRawProperties[index]); - temp1.ToLowerCase(); + ToLowerCase(temp1); NS_ASSERTION(temp1.Equals(temp2), "upper case char in table"); NS_ASSERTION(-1 == temp1.FindChar('_'), "underscore char in table"); } diff --git a/mozilla/content/xbl/src/nsXBLPrototypeHandler.cpp b/mozilla/content/xbl/src/nsXBLPrototypeHandler.cpp index 531939c8c9f..aafb5ffbd71 100644 --- a/mozilla/content/xbl/src/nsXBLPrototypeHandler.cpp +++ b/mozilla/content/xbl/src/nsXBLPrototypeHandler.cpp @@ -1031,9 +1031,9 @@ nsXBLPrototypeHandler::ConstructPrototype(nsIContent* aKeyElement, if (!(*aCharCode).IsEmpty()) { nsAutoString charCode(*aCharCode); if ((mKeyMask & cShift) != 0) - charCode.ToUpperCase(); + ToUpperCase(charCode); else - charCode.ToLowerCase(); + ToLowerCase(charCode); // We have a charcode. mMisc = 1; diff --git a/mozilla/content/xml/document/src/Makefile.in b/mozilla/content/xml/document/src/Makefile.in index 4a8d9d34a8c..2954813f55c 100644 --- a/mozilla/content/xml/document/src/Makefile.in +++ b/mozilla/content/xml/document/src/Makefile.in @@ -49,6 +49,7 @@ REQUIRES = xpcom \ lwbrk \ exthandler \ mimetype \ + unicharutil \ $(NULL) CPPSRCS = \ diff --git a/mozilla/content/xml/document/src/makefile.win b/mozilla/content/xml/document/src/makefile.win index 0edb5144054..8510158fc15 100644 --- a/mozilla/content/xml/document/src/makefile.win +++ b/mozilla/content/xml/document/src/makefile.win @@ -44,6 +44,7 @@ REQUIRES = xpcom \ mimetype \ gfx \ layout \ + unicharutil \ $(NULL) DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN diff --git a/mozilla/content/xml/document/src/nsXMLContentSink.cpp b/mozilla/content/xml/document/src/nsXMLContentSink.cpp index a7a3bc70471..cd3319cf5c1 100644 --- a/mozilla/content/xml/document/src/nsXMLContentSink.cpp +++ b/mozilla/content/xml/document/src/nsXMLContentSink.cpp @@ -98,6 +98,8 @@ #include "nsEscape.h" #include "nsICharsetConverterManager.h" #include "nsICharsetConverterManager2.h" +#include "nsReadableUtils.h" +#include "nsUnicharUtils.h" // XXX misnamed header file, but oh well #include "nsHTMLTokens.h" @@ -1179,7 +1181,7 @@ nsXMLContentSink::ProcessSTYLETag(const nsIParserNode& aNode) type.StripWhitespace(); mStyleElement->GetAttr(kNameSpaceID_None, nsHTMLAtoms::media, media); - media.ToLowerCase(); + ToLowerCase(media); nsAutoString mimeType; nsAutoString params; @@ -1290,7 +1292,7 @@ nsXMLContentSink::ProcessMETATag() nsAutoString result; mMetaElement->GetAttr(kNameSpaceID_HTML, nsHTMLAtoms::content, result); if (result.Length() > 0) { - header.ToLowerCase(); + ToLowerCase(header); nsCOMPtr fieldAtom(dont_AddRef(NS_NewAtom(header))); rv=ProcessHeaderData(fieldAtom,result,mMetaElement); }//if (result.Length() > 0) @@ -1349,7 +1351,7 @@ nsXMLContentSink::AddProcessingInstruction(const nsIParserNode& aNode) title.CompressWhitespace(); nsParserUtils::GetQuotedAttributeValue(text, NS_LITERAL_STRING("media"), media); - media.ToLowerCase(); + ToLowerCase(media); nsParserUtils::GetQuotedAttributeValue(text, NS_LITERAL_STRING("alternate"), alternate); diff --git a/mozilla/content/xul/content/src/Makefile.in b/mozilla/content/xul/content/src/Makefile.in index 7717ebdec20..2acafccf0b7 100644 --- a/mozilla/content/xul/content/src/Makefile.in +++ b/mozilla/content/xul/content/src/Makefile.in @@ -43,7 +43,6 @@ REQUIRES = xpcom \ xpconnect \ locale \ lwbrk \ - pref \ xuldoc \ xultmpl \ webshell \ diff --git a/mozilla/content/xul/document/src/Makefile.in b/mozilla/content/xul/document/src/Makefile.in index acbfeb4a843..8e4a0dd4aac 100644 --- a/mozilla/content/xul/document/src/Makefile.in +++ b/mozilla/content/xul/document/src/Makefile.in @@ -53,6 +53,7 @@ REQUIRES = xpcom \ xul \ xultmpl \ webshell \ + unicharutil \ $(NULL) CPPSRCS = \ diff --git a/mozilla/content/xul/document/src/makefile.win b/mozilla/content/xul/document/src/makefile.win index f8d84a8327e..bc7c4e17f00 100644 --- a/mozilla/content/xul/document/src/makefile.win +++ b/mozilla/content/xul/document/src/makefile.win @@ -47,6 +47,7 @@ REQUIRES = xpcom \ layout_xul \ content \ webshell \ + unicharutil \ $(NULL) DEFINES=-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN diff --git a/mozilla/content/xul/document/src/nsXULContentSink.cpp b/mozilla/content/xul/document/src/nsXULContentSink.cpp index b5c8acc927b..110ab876554 100644 --- a/mozilla/content/xul/document/src/nsXULContentSink.cpp +++ b/mozilla/content/xul/document/src/nsXULContentSink.cpp @@ -96,6 +96,7 @@ #include "nsWeakPtr.h" #include "nsXPIDLString.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "nsXULElement.h" #include "prlog.h" #include "prmem.h" @@ -960,7 +961,7 @@ XULContentSinkImpl::AddProcessingInstruction(const nsIParserNode& aNode) nsAutoString media; nsParserUtils::GetQuotedAttributeValue(text, NS_LITERAL_STRING("media"), media); - media.ToLowerCase(); + ToLowerCase(media); nsAutoString alternate; nsParserUtils::GetQuotedAttributeValue(text, NS_LITERAL_STRING("alternate"), alternate); diff --git a/mozilla/editor/composer/src/Makefile.in b/mozilla/editor/composer/src/Makefile.in index 4454154e8ad..c9d524d8270 100644 --- a/mozilla/editor/composer/src/Makefile.in +++ b/mozilla/editor/composer/src/Makefile.in @@ -56,6 +56,7 @@ REQUIRES = xpcom \ mimetype \ imglib2 \ gfx2 \ + unicharutil \ $(NULL) CPPSRCS = \ diff --git a/mozilla/editor/composer/src/makefile.win b/mozilla/editor/composer/src/makefile.win index fb5483723f5..a750ebb5ea3 100644 --- a/mozilla/editor/composer/src/makefile.win +++ b/mozilla/editor/composer/src/makefile.win @@ -62,6 +62,7 @@ REQUIRES = xpcom \ content_xul \ imglib2 \ gfx2 \ + unicharutil \ $(NULL) include <$(DEPTH)/config/config.mak> @@ -74,6 +75,7 @@ LCFLAGS = \ # These are the libraries we need to link with to create the dll LLIBS = \ $(LIBNSPR) \ + $(DIST)\lib\unicharutil_s.lib \ $(DIST)\lib\xpcom.lib \ $(NULL) diff --git a/mozilla/editor/composer/src/nsEditorShell.cpp b/mozilla/editor/composer/src/nsEditorShell.cpp index bb9c3ef5aaf..9e3a5e84bd6 100644 --- a/mozilla/editor/composer/src/nsEditorShell.cpp +++ b/mozilla/editor/composer/src/nsEditorShell.cpp @@ -67,6 +67,7 @@ #include "nsIURL.h" #include "nsXPIDLString.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "nsIDocumentViewer.h" #include "nsIPresShell.h" @@ -857,7 +858,7 @@ nsEditorShell::SetEditorType(const PRUnichar *editorType) return NS_ERROR_ALREADY_INITIALIZED; nsAutoString theType(editorType); - theType.ToLowerCase(); + ToLowerCase(theType); PRBool textMail = theType.Equals(NS_LITERAL_STRING("textmail")); mMailCompose = textMail || theType.Equals(NS_LITERAL_STRING("htmlmail")); @@ -1179,7 +1180,7 @@ nsEditorShell::RemoveTextProperty(const PRUnichar *prop, const PRUnichar *attr) nsAutoString allStr(prop); nsAutoString aAttr(attr); - allStr.ToLowerCase(); + ToLowerCase(allStr); PRBool doingAll = (allStr.Equals(NS_LITERAL_STRING("all"))); nsresult err = NS_OK; @@ -4907,7 +4908,7 @@ nsEditorShell::HandleMouseClickOnElement(nsIDOMElement *aElement, PRInt32 aClick #if DEBUG_cmanske nsAutoString TagName; aElement->GetTagName(TagName); - TagName.ToLowerCase(); + ToLowerCase(TagName); printf("***** Element clicked on: %s, x=%d, y=%d\n", NS_LossyConvertUCS2toASCII(TagName).get(), x, y); #endif diff --git a/mozilla/editor/composer/src/nsEditorShellMouseListener.cpp b/mozilla/editor/composer/src/nsEditorShellMouseListener.cpp index a0d1c94b97c..fd17d71b0ed 100644 --- a/mozilla/editor/composer/src/nsEditorShellMouseListener.cpp +++ b/mozilla/editor/composer/src/nsEditorShellMouseListener.cpp @@ -38,6 +38,7 @@ #include "nsEditorShellMouseListener.h" #include "nsEditorShell.h" #include "nsString.h" +#include "nsUnicharUtils.h" #include "nsIDOMEvent.h" #include "nsIDOMDocument.h" @@ -183,7 +184,7 @@ PRBool ElementIsType(nsIDOMElement *aElement, const nsAReadableString& aTag) { nsAutoString tag; atom->ToString(tag); - tag.ToLowerCase(); + ToLowerCase(tag); if (tag.Equals(aTag)) return PR_TRUE; } diff --git a/mozilla/editor/libeditor/build/Makefile.in b/mozilla/editor/libeditor/build/Makefile.in index 2acfab2c6f4..3144691df9d 100644 --- a/mozilla/editor/libeditor/build/Makefile.in +++ b/mozilla/editor/libeditor/build/Makefile.in @@ -40,17 +40,16 @@ EXTRA_DSO_LDOPTS = \ $(MOZ_COMPONENT_LIBS) \ $(MOZ_JS_LIBS) \ $(NULL) -REQUIRES = xpcom \ - string \ - dom \ - layout \ - content \ - txmgr \ - htmlparser \ - necko \ - appshell \ - xuldoc \ - $(NULL) +REQUIRES = xpcom \ + string \ + dom \ + layout \ + content \ + txmgr \ + htmlparser \ + appshell \ + xuldoc \ + $(NULL) ifdef MOZ_PLAINTEXT_EDITOR_ONLY # We're only building the Core PlainText Editor Source so just include diff --git a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp index b356d3238ca..4c6aea53d94 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp @@ -737,7 +737,7 @@ nsHTMLEditRules::GetAlignment(PRBool *aMixed, nsIHTMLEditor::EAlignment *aAlign) nsAutoString typeAttrName(NS_LITERAL_STRING("align")); nsAutoString typeAttrVal; res = elem->GetAttribute(typeAttrName, typeAttrVal); - typeAttrVal.ToLowerCase(); + ToLowerCase(typeAttrVal); if (NS_SUCCEEDED(res) && typeAttrVal.Length()) { if (typeAttrVal.Equals(NS_LITERAL_STRING("center"))) @@ -922,7 +922,7 @@ nsHTMLEditRules::GetParagraphState(PRBool *aMixed, nsAWritableString &outFormat) { nsAutoString tag; nsEditor::GetTagString(block,tag); - tag.ToLowerCase(); + ToLowerCase(tag); format = tag; } else @@ -939,7 +939,7 @@ nsHTMLEditRules::GetParagraphState(PRBool *aMixed, nsAWritableString &outFormat) { nsAutoString tag; nsEditor::GetTagString(curNode,tag); - tag.ToLowerCase(); + ToLowerCase(tag); format = tag; } else if (nsIEditProperty::p == atom.get() || @@ -2274,7 +2274,7 @@ nsHTMLEditRules::MoveNodeSmart(nsIDOMNode *aSource, nsIDOMNode *aDest, PRInt32 * nsresult res; res = mHTMLEditor->GetTagString(aSource, tag); if (NS_FAILED(res)) return res; - tag.ToLowerCase(); + ToLowerCase(tag); // check if this node can go into the destination node if (mHTMLEditor->CanContainTag(aDest, tag)) { @@ -2502,7 +2502,7 @@ nsHTMLEditRules::WillMakeList(nsISelection *aSelection, { nsAutoString existingListStr; res = mHTMLEditor->GetTagString(curNode, existingListStr); - existingListStr.ToLowerCase(); + ToLowerCase(existingListStr); // do we have a curList already? if (curList && !nsHTMLEditUtils::IsDescendantOf(curNode, curList)) { @@ -2533,7 +2533,7 @@ nsHTMLEditRules::WillMakeList(nsISelection *aSelection, { nsAutoString existingListStr; res = mHTMLEditor->GetTagString(curParent, existingListStr); - existingListStr.ToLowerCase(); + ToLowerCase(existingListStr); if ( existingListStr != *aListType ) { // list item is in wrong type of list. @@ -2778,7 +2778,7 @@ nsHTMLEditRules::WillMakeBasicBlock(nsISelection *aSelection, curBlock->GetParentNode(getter_AddRefs(curBlockPar)); nsAutoString curBlockTag; nsEditor::GetTagString(curBlock, curBlockTag); - curBlockTag.ToLowerCase(); + ToLowerCase(curBlockTag); if ((curBlockTag.Equals(NS_LITERAL_STRING("pre"))) || (curBlockTag.Equals(NS_LITERAL_STRING("p"))) || (curBlockTag.Equals(NS_LITERAL_STRING("h1"))) || @@ -3006,7 +3006,7 @@ nsHTMLEditRules::WillIndent(nsISelection *aSelection, PRBool *aCancel, PRBool * { nsAutoString listTag; nsEditor::GetTagString(curParent,listTag); - listTag.ToLowerCase(); + ToLowerCase(listTag); // create a new nested list of correct type res = SplitAsNeeded(&listTag, address_of(curParent), &offset); if (NS_FAILED(res)) return res; @@ -3047,7 +3047,7 @@ nsHTMLEditRules::WillIndent(nsISelection *aSelection, PRBool *aCancel, PRBool * { nsAutoString listTag; nsEditor::GetTagString(curParent,listTag); - listTag.ToLowerCase(); + ToLowerCase(listTag); // create a new nested list of correct type res = SplitAsNeeded(&listTag, address_of(curParent), &offset); if (NS_FAILED(res)) return res; @@ -5613,7 +5613,7 @@ nsHTMLEditRules::RemoveBlockStyle(nsISupportsArray *arrayOfNodes) if (NS_FAILED(res)) return res; nsAutoString curNodeTag, curBlockTag; nsEditor::GetTagString(curNode, curNodeTag); - curNodeTag.ToLowerCase(); + ToLowerCase(curNodeTag); // if curNode is a address, p, header, address, or pre, remove it if ((curNodeTag.Equals(NS_LITERAL_STRING("pre"))) || @@ -5685,7 +5685,7 @@ nsHTMLEditRules::RemoveBlockStyle(nsISupportsArray *arrayOfNodes) } curBlock = mHTMLEditor->GetBlockNodeParent(curNode); nsEditor::GetTagString(curBlock, curBlockTag); - curBlockTag.ToLowerCase(); + ToLowerCase(curBlockTag); if ((curBlockTag.Equals(NS_LITERAL_STRING("pre"))) || (curBlockTag.Equals(NS_LITERAL_STRING("p"))) || (curBlockTag.Equals(NS_LITERAL_STRING("h1"))) || @@ -5755,7 +5755,7 @@ nsHTMLEditRules::ApplyBlockStyle(nsISupportsArray *arrayOfNodes, const nsAReadab if (NS_FAILED(res)) return res; nsAutoString curNodeTag; nsEditor::GetTagString(curNode, curNodeTag); - curNodeTag.ToLowerCase(); + ToLowerCase(curNodeTag); // is it already the right kind of block? if (curNodeTag == *aBlockTag) diff --git a/mozilla/editor/libeditor/html/nsHTMLEditUtils.cpp b/mozilla/editor/libeditor/html/nsHTMLEditUtils.cpp index b31c9e81b1b..fff9fb9b814 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditUtils.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditUtils.cpp @@ -40,6 +40,7 @@ #include "nsTextEditUtils.h" #include "nsString.h" +#include "nsUnicharUtils.h" #include "nsEditor.h" #include "nsIDOMNode.h" #include "nsIContent.h" @@ -77,7 +78,7 @@ nsHTMLEditUtils::IsHeader(nsIDOMNode *node) NS_PRECONDITION(node, "null parent passed to nsHTMLEditUtils::IsHeader"); nsAutoString tag; nsEditor::GetTagString(node,tag); - tag.ToLowerCase(); + ToLowerCase(tag); if ( (tag.Equals(NS_LITERAL_STRING("h1"))) || (tag.Equals(NS_LITERAL_STRING("h2"))) || (tag.Equals(NS_LITERAL_STRING("h3"))) || @@ -120,7 +121,7 @@ nsHTMLEditUtils::IsListItem(nsIDOMNode *node) NS_PRECONDITION(node, "null parent passed to nsHTMLEditUtils::IsListItem"); nsAutoString tag; nsEditor::GetTagString(node,tag); - tag.ToLowerCase(); + ToLowerCase(tag); if (tag.Equals(NS_LITERAL_STRING("li")) || tag.Equals(NS_LITERAL_STRING("dd")) || tag.Equals(NS_LITERAL_STRING("dt"))) @@ -179,7 +180,7 @@ nsHTMLEditUtils::IsTableCell(nsIDOMNode *node) NS_PRECONDITION(node, "null parent passed to nsHTMLEditUtils::IsTableCell"); nsAutoString tag; nsEditor::GetTagString(node,tag); - tag.ToLowerCase(); + ToLowerCase(tag); if (tag.Equals(NS_LITERAL_STRING("td")) || tag.Equals(NS_LITERAL_STRING("th"))) { return PR_TRUE; @@ -197,7 +198,7 @@ nsHTMLEditUtils::IsTableCellOrCaption(nsIDOMNode *node) NS_PRECONDITION(node, "null parent passed to nsHTMLEditUtils::IsTableCell"); nsAutoString tag; nsEditor::GetTagString(node,tag); - tag.ToLowerCase(); + ToLowerCase(tag); if (tag.Equals(NS_LITERAL_STRING("td")) || tag.Equals(NS_LITERAL_STRING("th")) || tag.Equals(NS_LITERAL_STRING("caption")) ) @@ -217,7 +218,7 @@ nsHTMLEditUtils::IsList(nsIDOMNode *node) NS_PRECONDITION(node, "null parent passed to nsHTMLEditUtils::IsList"); nsAutoString tag; nsEditor::GetTagString(node,tag); - tag.ToLowerCase(); + ToLowerCase(tag); if ( (tag.Equals(NS_LITERAL_STRING("dl"))) || (tag.Equals(NS_LITERAL_STRING("ol"))) || (tag.Equals(NS_LITERAL_STRING("ul"))) ) @@ -383,7 +384,7 @@ nsHTMLEditUtils::IsMailCite(nsIDOMNode *node) // don't ask me why, but our html mailcites are id'd by "type=cite"... nsAutoString attrVal; nsresult res = elem->GetAttribute(attrName, attrVal); - attrVal.ToLowerCase(); + ToLowerCase(attrVal); if (NS_SUCCEEDED(res)) { if (attrVal.Equals(NS_LITERAL_STRING("cite"))) @@ -395,7 +396,7 @@ nsHTMLEditUtils::IsMailCite(nsIDOMNode *node) res = elem->GetAttribute(attrName, attrVal); if (NS_SUCCEEDED(res)) { - attrVal.ToLowerCase(); + ToLowerCase(attrVal); if (attrVal.Equals(NS_LITERAL_STRING("true"))) return PR_TRUE; } @@ -433,7 +434,7 @@ nsHTMLEditUtils::IsFormWidget(nsIDOMNode *node) NS_PRECONDITION(node, "null node passed to nsHTMLEditUtils::IsFormWidget"); nsAutoString tag; nsEditor::GetTagString(node,tag); - tag.ToLowerCase(); + ToLowerCase(tag); if (tag.Equals(NS_LITERAL_STRING("textarea")) || tag.Equals(NS_LITERAL_STRING("select")) || tag.Equals(NS_LITERAL_STRING("button")) || @@ -492,7 +493,7 @@ nsHTMLEditUtils::SupportsAlignAttr(nsIDOMNode * aNode) NS_PRECONDITION(aNode, "null node passed to nsHTMLEditUtils::SupportsAlignAttr"); nsAutoString tag; nsEditor::GetTagString(aNode, tag); - tag.ToLowerCase(); + ToLowerCase(tag); if (tag.Equals(NS_LITERAL_STRING("hr")) || tag.Equals(NS_LITERAL_STRING("table")) || tag.Equals(NS_LITERAL_STRING("tbody")) || diff --git a/mozilla/editor/libeditor/html/nsHTMLEditor.cpp b/mozilla/editor/libeditor/html/nsHTMLEditor.cpp index c48e424076c..f49a5736b29 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditor.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditor.cpp @@ -480,7 +480,7 @@ nsHTMLEditor::NodeIsBlockStatic(nsIDOMNode *aNode, PRBool *aIsBlock) rv = element->GetTagName(tagName); if (NS_FAILED(rv)) return rv; - tagName.ToLowerCase(); + ToLowerCase(tagName); nsCOMPtr tagAtom = getter_AddRefs(NS_NewAtom(tagName)); if (!tagAtom) return NS_ERROR_NULL_POINTER; @@ -566,7 +566,7 @@ nsHTMLEditor::NodeIsBlockStatic(nsIDOMNode *aNode, PRBool *aIsBlock) result = element->GetTagName(tagName); if (NS_SUCCEEDED(result)) { - tagName.ToLowerCase(); + ToLowerCase(tagName); nsIAtom *tagAtom = NS_NewAtom(tagName); if (!tagAtom) { return NS_ERROR_NULL_POINTER; } @@ -1858,7 +1858,7 @@ nsHTMLEditor::InsertNodeAtPoint(nsIDOMNode *aNode, nsresult res = NS_OK; nsAutoString tagName; aNode->GetNodeName(tagName); - tagName.ToLowerCase(); + ToLowerCase(tagName); nsCOMPtr parent = *ioParent; nsCOMPtr topChild = *ioParent; nsCOMPtr tmp; @@ -1968,7 +1968,7 @@ NS_IMETHODIMP nsHTMLEditor::SetParagraphFormat(const nsAReadableString& aParagraphFormat) { nsAutoString tag; tag.Assign(aParagraphFormat); - tag.ToLowerCase(); + ToLowerCase(tag); if (tag.Equals(NS_LITERAL_STRING("dd")) || tag.Equals(NS_LITERAL_STRING("dt"))) return MakeDefinitionItem(tag); else @@ -2558,7 +2558,7 @@ nsHTMLEditor::GetElementOrParentByTagName(const nsAReadableString& aTagName, nsI } nsAutoString TagName(aTagName); - TagName.ToLowerCase(); + ToLowerCase(TagName); PRBool getLink = IsLinkTag(TagName); PRBool getNamedAnchor = IsNamedAnchorTag(TagName); if ( getLink || getNamedAnchor) @@ -2663,7 +2663,7 @@ nsHTMLEditor::GetSelectedElement(const nsAReadableString& aTagName, nsIDOMElemen nsAutoString domTagName; nsAutoString TagName(aTagName); - TagName.ToLowerCase(); + ToLowerCase(TagName); // Empty string indicates we should match any element tag PRBool anyTag = (TagName.IsEmpty()); PRBool isLinkTag = IsLinkTag(TagName); @@ -2695,7 +2695,7 @@ nsHTMLEditor::GetSelectedElement(const nsAReadableString& aTagName, nsIDOMElemen if (selectedNode) { selectedNode->GetNodeName(domTagName); - domTagName.ToLowerCase(); + ToLowerCase(domTagName); // Test for appropriate node type requested if (anyTag || (TagName == domTagName) || @@ -2831,13 +2831,13 @@ nsHTMLEditor::GetSelectedElement(const nsAReadableString& aTagName, nsIDOMElemen } selectedElement->GetNodeName(domTagName); - domTagName.ToLowerCase(); + ToLowerCase(domTagName); if (anyTag) { // Get name of first selected element selectedElement->GetTagName(TagName); - TagName.ToLowerCase(); + ToLowerCase(TagName); anyTag = PR_FALSE; } @@ -2897,7 +2897,7 @@ nsHTMLEditor::CreateElementWithDefaults(const nsAReadableString& aTagName, nsIDO return NS_ERROR_NULL_POINTER; nsAutoString TagName(aTagName); - TagName.ToLowerCase(); + ToLowerCase(TagName); nsAutoString realTagName; if (IsLinkTag(TagName) || IsNamedAnchorTag(TagName)) @@ -3389,7 +3389,7 @@ nsHTMLEditor::GetEmbeddedObjects(nsISupportsArray** aNodeList) { nsAutoString tagName; node->GetNodeName(tagName); - tagName.ToLowerCase(); + ToLowerCase(tagName); // See if it's an image or an embed if (tagName.Equals(NS_LITERAL_STRING("img")) || tagName.Equals(NS_LITERAL_STRING("embed"))) diff --git a/mozilla/editor/libeditor/html/nsHTMLEditorStyle.cpp b/mozilla/editor/libeditor/html/nsHTMLEditorStyle.cpp index 9a4d41fdfb7..a8532912923 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditorStyle.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditorStyle.cpp @@ -376,7 +376,7 @@ nsHTMLEditor::SetInlinePropertyOnNode( nsIDOMNode *aNode, nsCOMPtr tmp; nsAutoString tag; aProperty->ToString(tag); - tag.ToLowerCase(); + ToLowerCase(tag); // dont need to do anything if property already set on node PRBool bHasProp; diff --git a/mozilla/editor/libeditor/text/Makefile.in b/mozilla/editor/libeditor/text/Makefile.in index 92a881fe944..6ee57181828 100644 --- a/mozilla/editor/libeditor/text/Makefile.in +++ b/mozilla/editor/libeditor/text/Makefile.in @@ -44,6 +44,7 @@ REQUIRES = xpcom \ lwbrk \ gfx \ widget \ + unicharutil \ $(NULL) CPPSRCS = \ diff --git a/mozilla/editor/libeditor/text/makefile.win b/mozilla/editor/libeditor/text/makefile.win index 5e499bff291..8b98f24990c 100644 --- a/mozilla/editor/libeditor/text/makefile.win +++ b/mozilla/editor/libeditor/text/makefile.win @@ -37,6 +37,7 @@ REQUIRES = xpcom \ lwbrk \ gfx \ widget \ + unicharutil \ $(NULL) CPP_OBJS = \ diff --git a/mozilla/editor/libeditor/text/nsTextEditRules.cpp b/mozilla/editor/libeditor/text/nsTextEditRules.cpp index 624f5e262c2..f5f2db9c3fc 100644 --- a/mozilla/editor/libeditor/text/nsTextEditRules.cpp +++ b/mozilla/editor/libeditor/text/nsTextEditRules.cpp @@ -59,6 +59,7 @@ #include "EditTxn.h" #include "nsIPref.h" #include "nsISupportsArray.h" +#include "nsUnicharUtils.h" // for IBMBIDI #include "nsIPresShell.h" @@ -1064,7 +1065,7 @@ nsTextEditRules::WillOutputText(nsISelection *aSelection, *aHandled = PR_FALSE; nsAutoString outputFormat(*aOutputFormat); - outputFormat.ToLowerCase(); + ToLowerCase(outputFormat); if (outputFormat.Equals(NS_LITERAL_STRING("text/plain"))) { // only use these rules for plain text output if (mFlags & nsIPlaintextEditor::eEditorPasswordMask) diff --git a/mozilla/editor/libeditor/text/nsTextEditUtils.cpp b/mozilla/editor/libeditor/text/nsTextEditUtils.cpp index 170d79e235f..7c72d562bcc 100644 --- a/mozilla/editor/libeditor/text/nsTextEditUtils.cpp +++ b/mozilla/editor/libeditor/text/nsTextEditUtils.cpp @@ -42,6 +42,7 @@ #include "nsPlaintextEditor.h" #include "nsString.h" +#include "nsUnicharUtils.h" /******************************************************** * helper methods from nsTextEditRules @@ -55,7 +56,7 @@ nsTextEditUtils::NodeIsType(nsIDOMNode *aNode, const nsAReadableString& aTag) { nsAutoString tag; nsEditor::GetTagString(aNode,tag); - tag.ToLowerCase(); + ToLowerCase(tag); if (tag.Equals(aTag)) return PR_TRUE; } @@ -113,7 +114,7 @@ nsTextEditUtils::HasMozAttr(nsIDOMNode *node) nsAutoString typeAttrName(NS_LITERAL_STRING("type")); nsAutoString typeAttrVal; nsresult res = elem->GetAttribute(typeAttrName, typeAttrVal); - typeAttrVal.ToLowerCase(); + ToLowerCase(typeAttrVal); if (NS_SUCCEEDED(res) && (typeAttrVal.Equals(NS_LITERAL_STRING("_moz")))) return PR_TRUE; } diff --git a/mozilla/editor/macbuild/composer.xml b/mozilla/editor/macbuild/composer.xml index 669ab27f212..44825c369e7 100644 --- a/mozilla/editor/macbuild/composer.xml +++ b/mozilla/editor/macbuild/composer.xml @@ -95,6 +95,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path:::intl:unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -1018,6 +1028,13 @@ Text Debug + + Name + UnicharUtilsStaticDebug.o + MacOS + Library + Debug + @@ -1050,6 +1067,11 @@ NSStdLibDebug.shlb MacOS + + Name + UnicharUtilsStaticDebug.o + MacOS + Name nsEditorShell.cpp @@ -1134,6 +1156,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path:::intl:unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -2057,6 +2089,13 @@ Text Debug + + Name + UnicharUtilsStatic.o + MacOS + Library + Debug + @@ -2089,6 +2128,11 @@ NSStdLib.shlb MacOS + + Name + UnicharUtilsStatic.o + MacOS + Name nsEditorShell.cpp @@ -2183,6 +2227,20 @@ MacOS + Static Libs + + Composer.shlb + Name + UnicharUtilsStatic.o + MacOS + + + ComposerDebug.shlb + Name + UnicharUtilsStaticDebug.o + MacOS + + NS Libraries Optimized diff --git a/mozilla/editor/txtsvc/macbuild/txtsvc.xml b/mozilla/editor/txtsvc/macbuild/txtsvc.xml index 4e7bc61b38a..4843dc0c37f 100644 --- a/mozilla/editor/txtsvc/macbuild/txtsvc.xml +++ b/mozilla/editor/txtsvc/macbuild/txtsvc.xml @@ -85,6 +85,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path::::intl:unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -1020,6 +1030,13 @@ Text Debug + + Name + UnicharUtilsStatic.o + MacOS + Library + Debug + @@ -1027,6 +1044,11 @@ NSComponentStartup.o MacOS + + Name + UnicharUtilsStatic.o + MacOS + Name InterfacesStubs @@ -1106,6 +1128,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path::::intl:unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -2041,6 +2073,13 @@ Text Debug + + Name + UnicharUtilsStaticDebug.o + MacOS + Library + Debug + @@ -2048,6 +2087,11 @@ NSComponentStartup.o MacOS + + Name + UnicharUtilsStaticDebug.o + MacOS + Name InterfacesStubs @@ -2129,6 +2173,20 @@ MacOS + Static Libs + + TextServices.shlb + Name + UnicharUtilsStatic.o + MacOS + + + TextServicesDebug.shlb + Name + UnicharUtilsStaticDebug.o + MacOS + + NS Libraries Optimized diff --git a/mozilla/editor/txtsvc/src/Makefile.in b/mozilla/editor/txtsvc/src/Makefile.in index 88ae2c4c48e..68c6d77c2db 100644 --- a/mozilla/editor/txtsvc/src/Makefile.in +++ b/mozilla/editor/txtsvc/src/Makefile.in @@ -39,6 +39,7 @@ REQUIRES = xpcom \ content \ dom \ widget \ + unicharutil \ $(NULL) CPPSRCS = \ diff --git a/mozilla/editor/txtsvc/src/makefile.win b/mozilla/editor/txtsvc/src/makefile.win index e95a0a7a904..17ada19bc9f 100644 --- a/mozilla/editor/txtsvc/src/makefile.win +++ b/mozilla/editor/txtsvc/src/makefile.win @@ -30,6 +30,7 @@ REQUIRES = xpcom \ dom \ widget \ gfx \ + unicharutil \ $(NULL) LIBRARY_NAME=txtsvc MODULE_NAME=nsTextServicesModule @@ -43,7 +44,9 @@ CPP_OBJS = \ LLIBS= \ - $(DIST)\lib\xpcom.lib + $(DIST)\lib\unicharutil_s.lib \ + $(DIST)\lib\xpcom.lib \ + $(NULL) LCFLAGS = \ $(LCFLAGS) \ diff --git a/mozilla/editor/txtsvc/src/nsFindAndReplace.cpp b/mozilla/editor/txtsvc/src/nsFindAndReplace.cpp index 9e0faa74a20..184fbe6df87 100644 --- a/mozilla/editor/txtsvc/src/nsFindAndReplace.cpp +++ b/mozilla/editor/txtsvc/src/nsFindAndReplace.cpp @@ -38,6 +38,7 @@ #include "nsFindAndReplace.h" #include "nsString.h" +#include "nsUnicharUtils.h" NS_IMPL_ISUPPORTS1(nsFindAndReplace, nsIFindAndReplace) @@ -184,7 +185,7 @@ NS_IMETHODIMP nsFindAndReplace::Find(const PRUnichar *aFindText, PRBool *aDidFin nsAutoString findStr(aFindText); if (!mCaseSensitive) - findStr.ToLowerCase(); + ToLowerCase(findStr); nsresult result = SetupDocForFind(mTsDoc, &mStartSelOffset); if (NS_FAILED(result)) @@ -232,7 +233,7 @@ nsFindAndReplace::Replace(const PRUnichar *aFindText, const PRUnichar *aReplaceT nsAutoString findStr(aFindText); PRUint32 findStrLength = findStr.Length(); if (!mCaseSensitive) - findStr.ToLowerCase(); + ToLowerCase(findStr); nsresult result = SetupDocForReplace(mTsDoc, findStr, &mStartSelOffset); if (NS_FAILED(result)) @@ -705,7 +706,7 @@ nsFindAndReplace::DoFind(nsITextServicesDocument *aTxtDoc, const nsString &aFind return rv; if (!mCaseSensitive) - str.ToLowerCase(); + ToLowerCase(str); if (mWrapFind && mWrappedOnce && mCurrentBlockIndex == mStartBlockIndex && mCurrentSelOffset != -1) diff --git a/mozilla/embedding/browser/powerplant/source/CFindComponent.cpp b/mozilla/embedding/browser/powerplant/source/CFindComponent.cpp index b07a8b558dd..eeed653be24 100644 --- a/mozilla/embedding/browser/powerplant/source/CFindComponent.cpp +++ b/mozilla/embedding/browser/powerplant/source/CFindComponent.cpp @@ -82,7 +82,7 @@ CFindComponent::Find(const nsString& searchString, nsAutoString matchString(searchString); if (!caseSensitive) - matchString.ToLowerCase(); + ToLowerCase(matchString); didFind = FALSE; nsresult rv = NS_OK; @@ -140,7 +140,7 @@ CFindComponent::Find(const nsString& searchString, return rv; if (!caseSensitive) - str.ToLowerCase(); + ToLowerCase(str); PRInt32 foundOffset = FindInString(str, matchString, selOffset, searchBackwards, wordBreaker); selOffset = -1; // reset for next block diff --git a/mozilla/extensions/transformiix/build/Makefile.in b/mozilla/extensions/transformiix/build/Makefile.in index ec594bf24c6..6a1f9d5324f 100644 --- a/mozilla/extensions/transformiix/build/Makefile.in +++ b/mozilla/extensions/transformiix/build/Makefile.in @@ -43,6 +43,7 @@ REQUIRES = xpcom \ xpconnect \ caps \ locale \ + unicharutil \ $(NULL) IS_COMPONENT = 1 MODULE_NAME = TransformiixModule diff --git a/mozilla/extensions/transformiix/build/makefile.win b/mozilla/extensions/transformiix/build/makefile.win index 42519438c52..e5299529df5 100644 --- a/mozilla/extensions/transformiix/build/makefile.win +++ b/mozilla/extensions/transformiix/build/makefile.win @@ -139,6 +139,7 @@ LINCS= -I$(PUBLIC)\xpcom -I..\source\xslt\functions \ # These are the libraries we need to link with to create the dll LLIBS=$(LLIBS) $(LIBNSPR) \ + $(DIST)\lib\unicharutil_s.lib \ $(DIST)\lib\xpcom.lib \ $(DIST)\lib\js3250.lib \ $(DIST)\lib\expat.lib diff --git a/mozilla/extensions/transformiix/macbuild/transformiix.xml b/mozilla/extensions/transformiix/macbuild/transformiix.xml index cf29a236d32..eb69f8dffbf 100644 --- a/mozilla/extensions/transformiix/macbuild/transformiix.xml +++ b/mozilla/extensions/transformiix/macbuild/transformiix.xml @@ -105,6 +105,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path::::intl:unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -1636,6 +1646,13 @@ Text + + Name + UnicharUtilsStaticDebug.o + MacOS + Library + Debug + @@ -1668,6 +1685,11 @@ NSRuntimeDebug.shlb MacOS + + Name + UnicharUtilsStaticDebug.o + MacOS + Name List.cpp @@ -2177,6 +2199,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path::::intl:unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -3708,6 +3740,13 @@ Text + + Name + UnicharUtilsStatic.o + MacOS + Library + Debug + @@ -3720,6 +3759,11 @@ InterfacesStubs MacOS + + Name + UnicharUtilsStatic.o + MacOS + Name List.cpp @@ -4767,6 +4811,20 @@ MacOS + Static Libs + + transformiix.shlb + Name + UnicharUtilsStatic.o + MacOS + + + transformiixDebug.shlb + Name + UnicharUtilsStaticDebug.o + MacOS + + NS Libraries Optimized diff --git a/mozilla/extensions/transformiix/source/base/Makefile.in b/mozilla/extensions/transformiix/source/base/Makefile.in index 48873a1fde1..3421126a179 100644 --- a/mozilla/extensions/transformiix/source/base/Makefile.in +++ b/mozilla/extensions/transformiix/source/base/Makefile.in @@ -30,6 +30,7 @@ ifndef TX_EXE MODULE = transformiix REQUIRES = string \ xpcom \ + unicharutil \ $(NULL) endif diff --git a/mozilla/extensions/transformiix/source/base/MozillaString.cpp b/mozilla/extensions/transformiix/source/base/MozillaString.cpp index dd7e56565a8..3f246e55b73 100644 --- a/mozilla/extensions/transformiix/source/base/MozillaString.cpp +++ b/mozilla/extensions/transformiix/source/base/MozillaString.cpp @@ -35,6 +35,7 @@ #include #include #include "TxString.h" +#include "nsUnicharUtils.h" #ifdef TX_EXE #include #endif @@ -714,7 +715,7 @@ const UNICODE_CHAR* String::toUnicode() const // void String::toLowerCase() { - ptrNSString->ToLowerCase(); + ToLowerCase(*ptrNSString); } // @@ -722,7 +723,7 @@ void String::toLowerCase() // void String::toUpperCase() { - ptrNSString->ToUpperCase(); + ToUpperCase(*ptrNSString); } // diff --git a/mozilla/extensions/transformiix/source/base/makefile.win b/mozilla/extensions/transformiix/source/base/makefile.win index 345ff327e4a..fbd1d79b143 100644 --- a/mozilla/extensions/transformiix/source/base/makefile.win +++ b/mozilla/extensions/transformiix/source/base/makefile.win @@ -22,6 +22,7 @@ DEPTH=..\..\..\.. REQUIRES = string \ xpcom \ + unicharutil \ $(NULL) include <$(DEPTH)/config/config.mak> diff --git a/mozilla/extensions/wallet/src/wallet.cpp b/mozilla/extensions/wallet/src/wallet.cpp index bf475a5ae23..545267c3cc8 100644 --- a/mozilla/extensions/wallet/src/wallet.cpp +++ b/mozilla/extensions/wallet/src/wallet.cpp @@ -947,7 +947,7 @@ wallet_WriteToList( return PR_FALSE; } - item1.ToLowerCase(); + ToLowerCase(item1); if (obscure) { nsAutoString crypt; if (NS_FAILED(Wallet_Encrypt(item2, crypt))) { @@ -1045,7 +1045,7 @@ wallet_ReadFromList( /* find item1 in the list */ wallet_MapElement * mapElementPtr; - item1.ToLowerCase(); + ToLowerCase(item1); PRInt32 count = LIST_COUNT(list); for (PRInt32 i=index; iElementAt(i)); @@ -1859,9 +1859,9 @@ wallet_GetSelectIndex( optionElement->GetValue(optionValue); optionElement->GetText(optionText); nsAutoString valueLC( value ); - valueLC.ToLowerCase(); - optionValue.ToLowerCase(); - optionText.ToLowerCase(); + ToLowerCase(valueLC); + ToLowerCase(optionValue); + ToLowerCase(optionText); optionText.Trim(" \n\t\r"); if (valueLC==optionValue || valueLC==optionText) { index = optionX; diff --git a/mozilla/extensions/xmlextras/build/src/Makefile.in b/mozilla/extensions/xmlextras/build/src/Makefile.in index ceb43d4eaec..01c3c4dfeae 100644 --- a/mozilla/extensions/xmlextras/build/src/Makefile.in +++ b/mozilla/extensions/xmlextras/build/src/Makefile.in @@ -42,7 +42,6 @@ REQUIRES = xpcom \ necko \ webbrwsr \ embedcomponents \ - xpconnect \ $(NULL) CPPSRCS = nsXMLExtrasModule.cpp diff --git a/mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp b/mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp index fa4f3425fce..7aaf57265f8 100644 --- a/mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp +++ b/mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp @@ -432,7 +432,7 @@ nsFontMetricsBeOS::FamilyExists(const nsString& aName) nsCAutoString name; name.AssignWithConversion(aName.get()); - name.ToLowerCase(); + ToLowerCase(name); PRBool isthere = PR_FALSE; char* cStr = ToNewCString(name); diff --git a/mozilla/gfx/src/gtk/nsFontMetricsGTK.cpp b/mozilla/gfx/src/gtk/nsFontMetricsGTK.cpp index 032a436fe73..a3c27bc698c 100644 --- a/mozilla/gfx/src/gtk/nsFontMetricsGTK.cpp +++ b/mozilla/gfx/src/gtk/nsFontMetricsGTK.cpp @@ -1125,7 +1125,7 @@ FontEnumCallback(const nsString& aFamily, PRBool aGeneric, void *aData) nsCAutoString name; name.AssignWithConversion(aFamily.get()); - name.ToLowerCase(); + ToLowerCase(name); nsFontMetricsGTK* metrics = (nsFontMetricsGTK*) aData; metrics->mFonts.AppendCString(name); metrics->mFontIsGeneric.AppendElement((void*) aGeneric); @@ -3747,7 +3747,7 @@ nsFontMetricsGTK::FamilyExists(const nsString& aName) nsCAutoString name; name.AssignWithConversion(aName.get()); - name.ToLowerCase(); + ToLowerCase(name); nsFontFamily* family = FindFamily(&name); if (family && family->mNodes.Count()) { return NS_OK; diff --git a/mozilla/gfx/src/nsColorNames.cpp b/mozilla/gfx/src/nsColorNames.cpp index c08c299052e..9f5c0216c79 100644 --- a/mozilla/gfx/src/nsColorNames.cpp +++ b/mozilla/gfx/src/nsColorNames.cpp @@ -39,7 +39,7 @@ #include "nsColorNames.h" #include "nsString.h" #include "nsStaticNameTable.h" - +#include "nsReadableUtils.h" // define an array of all color names #define GFX_COLOR(_name, _value) #_name, @@ -71,7 +71,7 @@ nsColorNames::AddRefTable(void) for (PRInt32 index = 0; index < eColorName_COUNT; ++index) { nsCAutoString temp1(kColorNames[index]); nsCAutoString temp2(kColorNames[index]); - temp1.ToLowerCase(); + ToLowerCase(temp1); NS_ASSERTION(temp1.Equals(temp2), "upper case char in table"); } } diff --git a/mozilla/gfx/src/os2/nsFontMetricsOS2.cpp b/mozilla/gfx/src/os2/nsFontMetricsOS2.cpp index 7c5ce00cd91..8c2f97b84e9 100644 --- a/mozilla/gfx/src/os2/nsFontMetricsOS2.cpp +++ b/mozilla/gfx/src/os2/nsFontMetricsOS2.cpp @@ -918,7 +918,7 @@ nsFontMetricsOS2::FindLocalFont( HPS aPS ) } nsString* name = mFonts.StringAt(mFontsIndex++); nsAutoString low(*name); - low.ToLowerCase(); + ToLowerCase(low); nsString* winName = (nsString*) PL_HashTableLookup(gFamilyNames, &low); if (!winName) { winName = name; @@ -1073,7 +1073,7 @@ FontEnumCallback(const nsString& aFamily, PRBool aGeneric, void *aData) metrics->mFontIsGeneric.AppendElement((void*) aGeneric); if (aGeneric) { metrics->mGeneric.Assign(aFamily); - metrics->mGeneric.ToLowerCase(); + ToLowerCase(metrics->mGeneric); return PR_FALSE; // stop } diff --git a/mozilla/gfx/src/qt/nsFontMetricsQT.cpp b/mozilla/gfx/src/qt/nsFontMetricsQT.cpp index 52e82bfd734..5e0d1662635 100644 --- a/mozilla/gfx/src/qt/nsFontMetricsQT.cpp +++ b/mozilla/gfx/src/qt/nsFontMetricsQT.cpp @@ -734,7 +734,7 @@ FontEnumCallback(const nsString &aFamily,PRBool aGeneric,void *aData) nsFontMetricsQT *metrics = (nsFontMetricsQT*)aData; name.AssignWithConversion(aFamily.get()); - name.ToLowerCase(); + ToLowerCase(name); metrics->mFonts.AppendCString(name); metrics->mFontIsGeneric.AppendElement((void*)aGeneric); if (aGeneric) { diff --git a/mozilla/gfx/src/windows/makefile.win b/mozilla/gfx/src/windows/makefile.win index 33532ad095b..ddfc42ea30c 100644 --- a/mozilla/gfx/src/windows/makefile.win +++ b/mozilla/gfx/src/windows/makefile.win @@ -82,6 +82,7 @@ LLIBS = \ $(DIST)\lib\gkgfx.lib \ $(DIST)\lib\xpcom.lib \ $(DIST)\lib\util.lib \ + $(DIST)\lib\unicharutil_s.lib \ !if defined(NGLAYOUT_DDRAW) $(NGLAYOUT_DDRAW)\lib\ddraw.lib \ !endif diff --git a/mozilla/gfx/src/windows/nsFontMetricsWin.cpp b/mozilla/gfx/src/windows/nsFontMetricsWin.cpp index 4040314fbb6..1f208a2e7c0 100644 --- a/mozilla/gfx/src/windows/nsFontMetricsWin.cpp +++ b/mozilla/gfx/src/windows/nsFontMetricsWin.cpp @@ -58,6 +58,7 @@ #include "plhash.h" #include "prprf.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #define NOT_SETUP 0x33 static PRBool gIsWIN95OR98 = NOT_SETUP; @@ -1101,7 +1102,7 @@ GetEncoding(const char* aFontName, nsString& aValue) name.AppendWithConversion(aFontName); name.Append(NS_LITERAL_STRING(".ttf")); name.StripWhitespace(); - name.ToLowerCase(); + ToLowerCase(name); // if we have not init the property yet, init it right now. if (! gFontEncodingProperties) @@ -2640,7 +2641,7 @@ nsFontMetricsWin::LookForFontWeightTable(HDC aDC, nsString* aName) // keeping multiple font weights entries when the font name varies // only by case. nsAutoString low(*aName); - low.ToLowerCase(); + ToLowerCase(low); // See if the font weight has already been computed. nsFontWeightEntry searchEntry; @@ -2794,7 +2795,7 @@ nsFontMetricsWin::FindLocalFont(HDC aDC, PRUnichar aChar) nsString* name = mFonts.StringAt(mFontsIndex++); nsAutoString low(*name); - low.ToLowerCase(); + ToLowerCase(low); nsString* winName = (nsString*) PL_HashTableLookup(gFamilyNames, &low); if (!winName) { winName = name; @@ -2978,7 +2979,7 @@ FontEnumCallback(const nsString& aFamily, PRBool aGeneric, void *aData) metrics->mFonts.AppendString(aFamily); if (aGeneric) { metrics->mGeneric.Assign(aFamily); - metrics->mGeneric.ToLowerCase(); + ToLowerCase(metrics->mGeneric); return PR_FALSE; // stop } ++metrics->mGenericIndex; @@ -4518,7 +4519,7 @@ nsFontMetricsWinA::FindLocalFont(HDC aDC, PRUnichar aChar) } nsString* name = mFonts.StringAt(mFontsIndex++); nsAutoString low(*name); - low.ToLowerCase(); + ToLowerCase(low); nsString* winName = (nsString*)PL_HashTableLookup(gFamilyNames, &low); if (!winName) { winName = name; diff --git a/mozilla/gfx/src/xlib/nsFontMetricsXlib.cpp b/mozilla/gfx/src/xlib/nsFontMetricsXlib.cpp index b24bc842830..3df8489bafa 100644 --- a/mozilla/gfx/src/xlib/nsFontMetricsXlib.cpp +++ b/mozilla/gfx/src/xlib/nsFontMetricsXlib.cpp @@ -1036,7 +1036,7 @@ FontEnumCallback(const nsString& aFamily, PRBool aGeneric, void *aData) nsCAutoString name; name.AssignWithConversion(aFamily.get()); - name.ToLowerCase(); + ToLowerCase(name); nsFontMetricsXlib* metrics = (nsFontMetricsXlib*) aData; metrics->mFonts.AppendCString(name); @@ -3558,7 +3558,7 @@ nsFontMetricsXlib::FamilyExists(nsIDeviceContext *aDevice, const nsString& aName nsCAutoString name; name.AssignWithConversion(aName.get()); - name.ToLowerCase(); + ToLowerCase(name); nsFontFamilyXlib* family = FindFamily(&name); if (family && family->mNodes.Count()) diff --git a/mozilla/htmlparser/robot/Makefile.in b/mozilla/htmlparser/robot/Makefile.in index da3b551b6b1..7b16e463740 100644 --- a/mozilla/htmlparser/robot/Makefile.in +++ b/mozilla/htmlparser/robot/Makefile.in @@ -34,6 +34,7 @@ REQUIRES = xpcom \ necko \ docshell \ uriloader \ + unicharutil \ $(NULL) CPPSRCS = nsDebugRobot.cpp nsRobotSink.cpp diff --git a/mozilla/htmlparser/robot/makefile.win b/mozilla/htmlparser/robot/makefile.win index 77814d232b6..80c71f054eb 100644 --- a/mozilla/htmlparser/robot/makefile.win +++ b/mozilla/htmlparser/robot/makefile.win @@ -33,11 +33,13 @@ REQUIRES = xpcom \ necko \ docshell \ uriloader \ + unicharutil \ $(NULL) include <$(DEPTH)\config\config.mak> LLIBS= \ + $(DIST)\lib\unicharutil_s.lib \ $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ !ifndef NECKO diff --git a/mozilla/htmlparser/robot/nsRobotSink.cpp b/mozilla/htmlparser/robot/nsRobotSink.cpp index 23ee14c83b3..4df7dba9148 100644 --- a/mozilla/htmlparser/robot/nsRobotSink.cpp +++ b/mozilla/htmlparser/robot/nsRobotSink.cpp @@ -42,6 +42,7 @@ #include "nsIParser.h" #include "nsString.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "nsIURL.h" #include "nsIURL.h" #include "nsIServiceManager.h" @@ -243,7 +244,7 @@ NS_IMETHODIMP RobotSink::CloseFrameset(const nsIParserNode& aNode) NS_IMETHODIMP RobotSink::OpenContainer(const nsIParserNode& aNode) { nsAutoString tmp; tmp.Assign(aNode.GetText()); - tmp.ToLowerCase(); + ToLowerCase(tmp); if (tmp.Equals(NS_LITERAL_STRING("a"))) { nsAutoString k, v; PRInt32 ac = aNode.GetAttributeCount(); @@ -251,7 +252,7 @@ NS_IMETHODIMP RobotSink::OpenContainer(const nsIParserNode& aNode) // Get upper-cased key const nsAReadableString& key = aNode.GetKeyAt(i); k.Assign(key); - k.ToLowerCase(); + ToLowerCase(k); if (k.Equals(NS_LITERAL_STRING("href"))) { // Get value and remove mandatory quotes v.Truncate(); diff --git a/mozilla/htmlparser/robot/test/Makefile.in b/mozilla/htmlparser/robot/test/Makefile.in index e0aa456aab5..b59dab3ce41 100644 --- a/mozilla/htmlparser/robot/test/Makefile.in +++ b/mozilla/htmlparser/robot/test/Makefile.in @@ -43,6 +43,7 @@ endif LIBS = \ $(EXTRA_DSO_LIBS) \ + $(MOZ_UNICHARUTIL_LIBS) \ $(MOZ_COMPONENT_LIBS) \ $(NULL) diff --git a/mozilla/htmlparser/robot/test/makefile.win b/mozilla/htmlparser/robot/test/makefile.win index 2b49ae7c594..5fc4cfb1791 100644 --- a/mozilla/htmlparser/robot/test/makefile.win +++ b/mozilla/htmlparser/robot/test/makefile.win @@ -31,6 +31,7 @@ PROGRAM = .\$(OBJDIR)\htmlrobot.exe LLIBS= \ $(DIST)\lib\DebugRobot.lib \ + $(DIST)\lib\unicharutil_s.lib \ $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(NULL) diff --git a/mozilla/htmlparser/src/nsHTMLContentSinkStream.cpp b/mozilla/htmlparser/src/nsHTMLContentSinkStream.cpp index d645cb58e89..46768dec5fc 100644 --- a/mozilla/htmlparser/src/nsHTMLContentSinkStream.cpp +++ b/mozilla/htmlparser/src/nsHTMLContentSinkStream.cpp @@ -442,9 +442,9 @@ void nsHTMLContentSinkStream::WriteAttributes(const nsIParserNode& aNode) continue; if (mLowerCaseTags == PR_TRUE) - key.ToLowerCase(); + ToLowerCase(key); else - key.ToUpperCase(); + ToUpperCase(key); EnsureBufferSize(key.Length() + 1); key.ToCString(mBuffer,mBufferSize); @@ -661,9 +661,9 @@ void nsHTMLContentSinkStream::AddStartTag(const nsIParserNode& aNode) } if (mLowerCaseTags == PR_TRUE) - tagName.ToLowerCase(); + ToLowerCase(tagName); else - tagName.ToUpperCase(); + ToUpperCase(tagName); #ifdef DEBUG_prettyprint if (isDirty) @@ -777,9 +777,9 @@ void nsHTMLContentSinkStream::AddEndTag(const nsIParserNode& aNode) tagName.AssignWithConversion(nsHTMLTags::GetStringValue(tag)); } if (mLowerCaseTags == PR_TRUE) - tagName.ToLowerCase(); + ToLowerCase(tagName); // else -// tagName.ToUpperCase(); +// ToUpperCase(tagName); if (IndentChildren(tag)) mIndent--; diff --git a/mozilla/htmlparser/src/nsHTMLTags.cpp b/mozilla/htmlparser/src/nsHTMLTags.cpp index c21b7ed31a7..643eeede7b5 100644 --- a/mozilla/htmlparser/src/nsHTMLTags.cpp +++ b/mozilla/htmlparser/src/nsHTMLTags.cpp @@ -352,7 +352,7 @@ nsHTMLTags::AddRefTable(void) for (i = 0; i < NS_HTML_TAG_MAX; ++i) { nsCAutoString temp1(kTagASCIIDebugTable[i]); nsCAutoString temp2(kTagASCIIDebugTable[i]); - temp1.ToLowerCase(); + ToLowerCase(temp1); NS_ASSERTION(temp1.Equals(temp2), "upper case char in table"); } diff --git a/mozilla/htmlparser/src/nsHTMLTokenizer.cpp b/mozilla/htmlparser/src/nsHTMLTokenizer.cpp index 616cc5f9478..504ebb81278 100644 --- a/mozilla/htmlparser/src/nsHTMLTokenizer.cpp +++ b/mozilla/htmlparser/src/nsHTMLTokenizer.cpp @@ -49,6 +49,7 @@ #include "nsHTMLEntities.h" #include "CParserContext.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" /************************************************************************ And now for the main class -- nsHTMLTokenizer... @@ -974,7 +975,7 @@ nsresult nsHTMLTokenizer::ConsumeSpecialMarkup(PRUnichar aChar,CToken*& aToken,n nsresult result=NS_OK; nsAutoString theBufCopy; aScanner.Peek(theBufCopy, 20); - theBufCopy.ToUpperCase(); + ToUpperCase(theBufCopy); PRInt32 theIndex=theBufCopy.Find("DOCTYPE"); nsTokenAllocator* theAllocator=this->GetTokenAllocator(); diff --git a/mozilla/htmlparser/src/nsParser.cpp b/mozilla/htmlparser/src/nsParser.cpp index 5fc0af70bfe..597fa58ec5d 100644 --- a/mozilla/htmlparser/src/nsParser.cpp +++ b/mozilla/htmlparser/src/nsParser.cpp @@ -980,7 +980,7 @@ static void VerifyPublicIDs() } for (i = 0; i < ELEMENTS_OF(kPublicIDs); ++i) { nsCAutoString lcPubID(kPublicIDs[i].name); - lcPubID.ToLowerCase(); + ToLowerCase(lcPubID); if (nsCRT::strcmp(kPublicIDs[i].name, lcPubID.get()) != 0) { NS_NOTREACHED("doctype not lower case"); printf("Doctype %s not lower case.\n", kPublicIDs[i].name); @@ -1029,7 +1029,7 @@ static void DetermineHTMLParseMode(nsString& aBuffer, // See comment above definition of kPublicIDs about case // sensitivity. - publicID.ToLowerCase(); + ToLowerCase(publicID); // binary search to see if we can find the correct public ID // These must be signed since maximum can go below zero and we'll diff --git a/mozilla/intl/locale/macbuild/locale.xml b/mozilla/intl/locale/macbuild/locale.xml index da6179bff8a..61a5d620ea2 100644 --- a/mozilla/intl/locale/macbuild/locale.xml +++ b/mozilla/intl/locale/macbuild/locale.xml @@ -95,6 +95,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path:::unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -1053,6 +1063,13 @@ Text Debug + + Name + UnicharUtilsStatic.o + MacOS + Library + Debug + @@ -1085,6 +1102,11 @@ xpcom.shlb MacOS + + Name + UnicharUtilsStatic.o + MacOS + Name nsCollationMac.cpp @@ -1189,6 +1211,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path:::unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -2147,6 +2179,13 @@ Text Debug + + Name + UnicharUtilsStaticDebug.o + MacOS + Library + Debug + @@ -2179,6 +2218,11 @@ xpcomDebug.shlb MacOS + + Name + UnicharUtilsStaticDebug.o + MacOS + Name nsCollationMac.cpp @@ -2325,6 +2369,20 @@ MacOS + Static Libs + + nslocaleDebug.shlb + Name + UnicharUtilsStaticDebug.o + MacOS + + + nslocale.shlb + Name + UnicharUtilsStatic.o + MacOS + + NS Libraries Optimized diff --git a/mozilla/intl/locale/src/nsLanguageAtomService.cpp b/mozilla/intl/locale/src/nsLanguageAtomService.cpp index e2b9f27dea9..936e6c4ae91 100644 --- a/mozilla/intl/locale/src/nsLanguageAtomService.cpp +++ b/mozilla/intl/locale/src/nsLanguageAtomService.cpp @@ -43,6 +43,7 @@ #include "nsICharsetConverterManager.h" #include "nsILocaleService.h" #include "nsXPIDLString.h" +#include "nsUnicharUtils.h" class nsLanguageAtom : public nsILanguageAtom { @@ -166,7 +167,7 @@ nsLanguageAtomService::LookupLanguage(const PRUnichar* aLanguage, NS_ENSURE_SUCCESS(InitLangTable(), NS_ERROR_OUT_OF_MEMORY); } nsAutoString lowered(aLanguage); - lowered.ToLowerCase(); + ToLowerCase(lowered); nsCOMPtr lang; PRUint32 n; NS_ENSURE_SUCCESS(mLangs->Count(&n), NS_ERROR_FAILURE); diff --git a/mozilla/intl/locale/src/windows/makefile.win b/mozilla/intl/locale/src/windows/makefile.win index e41d08f9858..fbb6168570d 100644 --- a/mozilla/intl/locale/src/windows/makefile.win +++ b/mozilla/intl/locale/src/windows/makefile.win @@ -52,6 +52,7 @@ LCFLAGS = \ SUB_LIBRARIES = $(DIST)\lib\nslocale_s.lib LLIBS= \ + $(DIST)\lib\unicharutil_s.lib \ $(DIST)\lib\xpcom.lib \ $(LIBNSPR) diff --git a/mozilla/intl/strres/src/nsAcceptLang.cpp b/mozilla/intl/strres/src/nsAcceptLang.cpp index 9bcf60ced14..2ae65efecab 100644 --- a/mozilla/intl/strres/src/nsAcceptLang.cpp +++ b/mozilla/intl/strres/src/nsAcceptLang.cpp @@ -45,6 +45,7 @@ #include "nsID.h" #include "nsString.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "nsIStringBundle.h" #include "nsAcceptLang.h" @@ -102,7 +103,7 @@ nsAcceptLang::GetAcceptLangFromLocale(const PRUnichar *aLocale, PRUnichar **_ret NS_NAMED_LITERAL_STRING(sAccept, ".accept"); NS_NAMED_LITERAL_STRING(sTrue, "true"); - lc_tmp.ToLowerCase(); + ToLowerCase(lc_tmp); lc_tmp.Append(sAccept); if (NS_OK == (res = bundle->GetStringFromName(lc_tmp.get(), &ptrv))) { if (sTrue.Equals(ptrv)) { diff --git a/mozilla/intl/uconv/src/nsCharsetConverterManager.cpp b/mozilla/intl/uconv/src/nsCharsetConverterManager.cpp index f63075bb60b..e9b08a31d69 100644 --- a/mozilla/intl/uconv/src/nsCharsetConverterManager.cpp +++ b/mozilla/intl/uconv/src/nsCharsetConverterManager.cpp @@ -42,6 +42,7 @@ #include "nsCOMPtr.h" #include "nsString.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "nsICharsetAlias.h" #include "nsIRegistry.h" #include "nsIServiceManager.h" @@ -173,7 +174,7 @@ nsresult nsCharsetConverterManager::GetBundleValue(nsIStringBundle * aBundle, res = ((nsIAtom *) aName)->ToString(key); if (NS_FAILED(res)) return res; - key.ToLowerCase(); // we lowercase the main comparison key + ToLowerCase(key); // we lowercase the main comparison key if (!aProp.IsEmpty()) key.Append(aProp.get()); // yes, this param may be NULL res = aBundle->GetStringFromName(key.get(), aResult); diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index d550e11b257..3d162197baa 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -78,6 +78,7 @@ #include "nsHTMLAtoms.h" #include "nsCOMPtr.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "nsWeakReference.h" #include "nsIPageSequenceFrame.h" #include "nsICaret.h" @@ -3869,7 +3870,7 @@ PresShell::GoToAnchor(const nsString& aAnchorName) nsCOMPtr element = do_QueryInterface(node); nsAutoString tagName; if (element && NS_SUCCEEDED(element->GetTagName(tagName))) { - tagName.ToLowerCase(); + ToLowerCase(tagName); if (tagName.Equals(NS_LITERAL_STRING("a"))) { content = do_QueryInterface(element); break; diff --git a/mozilla/layout/forms/nsListControlFrame.cpp b/mozilla/layout/forms/nsListControlFrame.cpp index fe0331486ea..5d0a814095c 100644 --- a/mozilla/layout/forms/nsListControlFrame.cpp +++ b/mozilla/layout/forms/nsListControlFrame.cpp @@ -3219,7 +3219,7 @@ nsListControlFrame::KeyPress(nsIDOMEvent* aKeyEvent) if (optionElement) { nsAutoString text; if (NS_OK == optionElement->GetText(text)) { - text.ToLowerCase(); + ToLowerCase(text); PRUnichar firstChar = text.CharAt(0); if (firstChar == (PRUnichar)code) { PerformSelection(selectedIndex, PR_FALSE, PR_FALSE); diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index d550e11b257..3d162197baa 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -78,6 +78,7 @@ #include "nsHTMLAtoms.h" #include "nsCOMPtr.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "nsWeakReference.h" #include "nsIPageSequenceFrame.h" #include "nsICaret.h" @@ -3869,7 +3870,7 @@ PresShell::GoToAnchor(const nsString& aAnchorName) nsCOMPtr element = do_QueryInterface(node); nsAutoString tagName; if (element && NS_SUCCEEDED(element->GetTagName(tagName))) { - tagName.ToLowerCase(); + ToLowerCase(tagName); if (tagName.Equals(NS_LITERAL_STRING("a"))) { content = do_QueryInterface(element); break; diff --git a/mozilla/layout/html/forms/src/nsListControlFrame.cpp b/mozilla/layout/html/forms/src/nsListControlFrame.cpp index fe0331486ea..5d0a814095c 100644 --- a/mozilla/layout/html/forms/src/nsListControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsListControlFrame.cpp @@ -3219,7 +3219,7 @@ nsListControlFrame::KeyPress(nsIDOMEvent* aKeyEvent) if (optionElement) { nsAutoString text; if (NS_OK == optionElement->GetText(text)) { - text.ToLowerCase(); + ToLowerCase(text); PRUnichar firstChar = text.CharAt(0); if (firstChar == (PRUnichar)code) { PerformSelection(selectedIndex, PR_FALSE, PR_FALSE); diff --git a/mozilla/layout/style/nsCSSKeywords.cpp b/mozilla/layout/style/nsCSSKeywords.cpp index 04f51759080..9e0ddae780a 100644 --- a/mozilla/layout/style/nsCSSKeywords.cpp +++ b/mozilla/layout/style/nsCSSKeywords.cpp @@ -39,6 +39,7 @@ #include "nsCSSKeywords.h" #include "nsString.h" #include "nsStaticNameTable.h" +#include "nsReadableUtils.h" // define an array of all CSS keywords #define CSS_KEY(_name,_id) #_name, @@ -63,7 +64,7 @@ nsCSSKeywords::AddRefTable(void) for (PRInt32 index = 0; index < eCSSKeyword_COUNT; ++index) { nsCAutoString temp1(kCSSRawKeywords[index]); nsCAutoString temp2(kCSSRawKeywords[index]); - temp1.ToLowerCase(); + ToLowerCase(temp1); NS_ASSERTION(temp1.Equals(temp2), "upper case char in table"); NS_ASSERTION(-1 == temp1.FindChar('_'), "underscore char in table"); } diff --git a/mozilla/layout/style/nsCSSParser.cpp b/mozilla/layout/style/nsCSSParser.cpp index 17d17e6e5e2..244ee9b90d5 100644 --- a/mozilla/layout/style/nsCSSParser.cpp +++ b/mozilla/layout/style/nsCSSParser.cpp @@ -57,6 +57,7 @@ #include "nsNetUtil.h" #include "nsCOMPtr.h" #include "nsString.h" +#include "nsReadableUtils.h" #include "nsUnicharUtils.h" #include "nsIAtom.h" #include "nsVoidArray.h" diff --git a/mozilla/layout/style/nsCSSProps.cpp b/mozilla/layout/style/nsCSSProps.cpp index af6ab4a7043..5c179578b4a 100644 --- a/mozilla/layout/style/nsCSSProps.cpp +++ b/mozilla/layout/style/nsCSSProps.cpp @@ -43,6 +43,7 @@ #include "nsILookAndFeel.h" // for system colors #include "nsString.h" +#include "nsReadableUtils.h" #include "nsStaticNameTable.h" // define an array of all CSS properties @@ -69,7 +70,7 @@ nsCSSProps::AddRefTable(void) for (PRInt32 index = 0; index < eCSSProperty_COUNT; ++index) { nsCAutoString temp1(kCSSRawProperties[index]); nsCAutoString temp2(kCSSRawProperties[index]); - temp1.ToLowerCase(); + ToLowerCase(temp1); NS_ASSERTION(temp1.Equals(temp2), "upper case char in table"); NS_ASSERTION(-1 == temp1.FindChar('_'), "underscore char in table"); } diff --git a/mozilla/layout/style/nsCSSStyleSheet.cpp b/mozilla/layout/style/nsCSSStyleSheet.cpp index 2a8dfca3dd6..aa1465654c6 100644 --- a/mozilla/layout/style/nsCSSStyleSheet.cpp +++ b/mozilla/layout/style/nsCSSStyleSheet.cpp @@ -175,7 +175,7 @@ PRUint32 AtomKey_base::HashCode(void) const #endif nsAutoString myStr; mAtom->ToString(myStr); - myStr.ToUpperCase(); + ToUpperCase(myStr); return nsCRT::HashCode(myStr.get()); } } diff --git a/mozilla/layout/xul/base/src/nsMenuFrame.cpp b/mozilla/layout/xul/base/src/nsMenuFrame.cpp index c27868f8776..67b703162c3 100644 --- a/mozilla/layout/xul/base/src/nsMenuFrame.cpp +++ b/mozilla/layout/xul/base/src/nsMenuFrame.cpp @@ -81,6 +81,7 @@ #include "nsIScrollableView.h" #include "nsXPIDLString.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "nsIStringBundle.h" #include "nsGUIEvent.h" #include "nsIEventListenerManager.h" @@ -1451,11 +1452,11 @@ nsMenuFrame::BuildAcceleratorText() keyElement->GetAttr(kNameSpaceID_None, nsXULAtoms::key, accelString); if (!accelString.IsEmpty()) { - accelString.ToUpperCase(); + ToUpperCase(accelString); } else { nsAutoString keyCode; keyElement->GetAttr(kNameSpaceID_None, nsXULAtoms::keycode, keyCode); - keyCode.ToUpperCase(); + ToUpperCase(keyCode); nsresult rv; nsCOMPtr bundleService(do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv)); diff --git a/mozilla/layout/xul/base/src/nsTextBoxFrame.cpp b/mozilla/layout/xul/base/src/nsTextBoxFrame.cpp index 948051c7f60..6b505709a02 100644 --- a/mozilla/layout/xul/base/src/nsTextBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsTextBoxFrame.cpp @@ -60,6 +60,7 @@ #include "nsIPref.h" #include "nsXPIDLString.h" #include "nsIServiceManager.h" +#include "nsUnicharUtils.h" #ifdef IBMBIDI #include "nsIUBidiUtils.h" @@ -688,7 +689,7 @@ nsTextBoxFrame::UpdateAccessTitle() { nsAutoString tmpstring(NS_LITERAL_STRING("(")); tmpstring += mAccessKey; - tmpstring.ToUpperCase(); + ToUpperCase(tmpstring); tmpstring.Append(NS_LITERAL_STRING(")")); PRInt32 offset = mTitle.RFind("..."); if (offset != kNotFound) diff --git a/mozilla/layout/xul/base/src/nsXULTreeGroupFrame.cpp b/mozilla/layout/xul/base/src/nsXULTreeGroupFrame.cpp index 512163a6681..699ba1f8443 100644 --- a/mozilla/layout/xul/base/src/nsXULTreeGroupFrame.cpp +++ b/mozilla/layout/xul/base/src/nsXULTreeGroupFrame.cpp @@ -53,6 +53,7 @@ #include "nsXULTreeOuterGroupFrame.h" #include "nsIDocument.h" #include "nsIBindingManager.h" +#include "nsUnicharUtils.h" // @@ -762,7 +763,7 @@ nsXULTreeGroupFrame::AttributeChanged(nsIPresContext* aPresContext, nsIContent* else if ( aAttribute == nsXULAtoms::ddDropOn ) { nsAutoString attribute; aChild->GetAttr ( kNameSpaceID_None, aAttribute, attribute ); - attribute.ToLowerCase(); + ToLowerCase(attribute); mDropOnContainer = attribute.Equals(NS_LITERAL_STRING("true")); } else diff --git a/mozilla/mailnews/addrbook/src/nsAddbookUrl.cpp b/mozilla/mailnews/addrbook/src/nsAddbookUrl.cpp index f82181d2bea..ec30d62d1bc 100644 --- a/mozilla/mailnews/addrbook/src/nsAddbookUrl.cpp +++ b/mozilla/mailnews/addrbook/src/nsAddbookUrl.cpp @@ -237,7 +237,7 @@ nsresult nsAddbookUrl::ParseUrl() nsUnescape(NS_CONST_CAST(char*, mOperationPart.get())); } - mOperationPart.ToLowerCase(); + ToLowerCase(mOperationPart); // Now, figure out what we are supposed to be doing? if (!nsCRT::strcmp(mOperationPart.get(), "printone")) { diff --git a/mozilla/mailnews/addrbook/src/nsAddrDatabase.cpp b/mozilla/mailnews/addrbook/src/nsAddrDatabase.cpp index a428647135b..17db8863211 100644 --- a/mozilla/mailnews/addrbook/src/nsAddrDatabase.cpp +++ b/mozilla/mailnews/addrbook/src/nsAddrDatabase.cpp @@ -43,6 +43,7 @@ #include "nsFileStream.h" #include "nsString.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "nsAbBaseCID.h" #include "nsIAbCard.h" #include "nsIAbMDBCard.h" @@ -1113,7 +1114,7 @@ nsresult nsAddrDatabase::AddUnicodeToColumn(nsIMdbRow * row, mdb_token colToken, nsresult err = NS_OK; nsAutoString displayString(pUnicodeStr); NS_ConvertUCS2toUTF8 displayUTF8Str(displayString); - displayString.ToLowerCase(); + ToLowerCase(displayString); NS_ConvertUCS2toUTF8 UTF8Str(displayString); if (colToken == m_PriEmailColumnToken) { @@ -3043,7 +3044,7 @@ nsresult nsAddrDatabase::AddLowercaseColumn if (unicodeStr) { nsAutoString newUnicodeString(unicodeStr); - newUnicodeString.ToLowerCase(); + ToLowerCase(newUnicodeString); char * utf8Str = ToNewUTF8String(newUnicodeString); if (utf8Str) { @@ -3900,7 +3901,7 @@ nsresult nsAddrDatabase::GetRowForEmailAddress(const char *emailAddress, nsIMdbR if (unicodeStr) { nsAutoString newUnicodeString(unicodeStr); - newUnicodeString.ToLowerCase(); + ToLowerCase(newUnicodeString); char * pUTF8Str = ToNewUTF8String(newUnicodeString); if (pUTF8Str) { @@ -4046,7 +4047,7 @@ NS_IMETHODIMP nsAddrDatabase::FindMailListbyUnicodeName(const PRUnichar *listNam { nsresult rv = NS_ERROR_FAILURE; nsAutoString unicodeString(listName); - unicodeString.ToLowerCase(); + ToLowerCase(unicodeString); char* pUTF8Str = ToNewUTF8String(unicodeString); if (pUTF8Str) { @@ -4112,7 +4113,7 @@ nsresult nsAddrDatabase::GetRowForCharColumn { nsresult rv = NS_ERROR_FAILURE; nsAutoString unicodeString(unicodeStr); - unicodeString.ToLowerCase(); + ToLowerCase(unicodeString); char* pUTF8Str = ToNewUTF8String(unicodeString); if (pUTF8Str) { diff --git a/mozilla/mailnews/addrbook/src/nsAddressBook.cpp b/mozilla/mailnews/addrbook/src/nsAddressBook.cpp index e854f075002..ca07ba98620 100644 --- a/mozilla/mailnews/addrbook/src/nsAddressBook.cpp +++ b/mozilla/mailnews/addrbook/src/nsAddressBook.cpp @@ -1458,7 +1458,7 @@ void AddressBookParser::AddLdifColToDatabase(nsIMdbRow* newRow, char* typeSlot, else if ( -1 != colType.Find("xmozillausehtmlmail") ) { - column.ToLowerCase(); + ToLowerCase(column); if (-1 != column.Find("true")) mDatabase->AddPreferMailFormat(newRow, nsIAbPreferMailFormat::html); else diff --git a/mozilla/mailnews/import/eudora/src/nsEudoraWin32.cpp b/mozilla/mailnews/import/eudora/src/nsEudoraWin32.cpp index 2c7c89a667a..b60324f569b 100644 --- a/mozilla/mailnews/import/eudora/src/nsEudoraWin32.cpp +++ b/mozilla/mailnews/import/eudora/src/nsEudoraWin32.cpp @@ -275,7 +275,7 @@ nsresult nsEudoraWin32::IterateMailDir( nsIFileSpec *pFolder, nsISupportsArray * ext.Truncate(); name = fName; } - ext.ToLowerCase(); + ToLowerCase(ext); if (ext.Equals(NS_LITERAL_CSTRING(".fol"))) { isFolder = PR_FALSE; entry->IsDirectory( &isFolder); @@ -981,7 +981,7 @@ PRBool nsEudoraWin32::FindMimeIniFile( nsIFileSpec *pSpec) ext.Truncate(); name = fName; } - ext.ToLowerCase(); + ToLowerCase(ext); if (ext.Equals(NS_LITERAL_CSTRING(".ini"))) { isFile = PR_FALSE; entry->IsFile( &isFile); @@ -1340,7 +1340,7 @@ nsresult nsEudoraWin32::ScanAddressDir( nsIFileSpec *pDir, nsISupportsArray *pAr ext.Truncate(); name = fName; } - ext.ToLowerCase(); + ToLowerCase(ext); if (ext.Equals(NS_LITERAL_CSTRING(".txt"))) { isFile = PR_FALSE; entry->IsFile( &isFile); diff --git a/mozilla/mailnews/import/src/nsImportService.cpp b/mozilla/mailnews/import/src/nsImportService.cpp index b56d2f6a3ea..8086def9e17 100644 --- a/mozilla/mailnews/import/src/nsImportService.cpp +++ b/mozilla/mailnews/import/src/nsImportService.cpp @@ -734,14 +734,14 @@ PRBool ImportModuleDesc::SupportsThings( const char *pThings) while ((idx = thing.FindChar( ',')) != -1) { thing.Left( item, idx); item.Trim( kWhitespace); - item.ToLowerCase(); + ToLowerCase(item); if (item.Length() && (m_supports.Find( item) == -1)) return( PR_FALSE); thing.Right( item, thing.Length() - idx - 1); thing = item; } thing.Trim( kWhitespace); - thing.ToLowerCase(); + ToLowerCase(thing); if (thing.Length() && (m_supports.Find( thing) == -1)) return( PR_FALSE); diff --git a/mozilla/mailnews/import/text/src/nsTextAddress.cpp b/mozilla/mailnews/import/text/src/nsTextAddress.cpp index c0941796b74..7d4c812bebc 100644 --- a/mozilla/mailnews/import/text/src/nsTextAddress.cpp +++ b/mozilla/mailnews/import/text/src/nsTextAddress.cpp @@ -1304,7 +1304,7 @@ void nsTextAddress::AddLdifColToDatabase(nsIMdbRow* newRow, char* typeSlot, char } else if ( -1 != colType.Find("xmozillausehtmlmail") ) { - column.ToLowerCase(); + ToLowerCase(column); if (-1 != column.Find("true")) m_database->AddPreferMailFormat(newRow, nsIAbPreferMailFormat::html); else diff --git a/mozilla/mailnews/mime/emitters/build/makefile.win b/mozilla/mailnews/mime/emitters/build/makefile.win index 0907d90aca2..1cc8035ac34 100644 --- a/mozilla/mailnews/mime/emitters/build/makefile.win +++ b/mozilla/mailnews/mime/emitters/build/makefile.win @@ -63,6 +63,7 @@ SUB_LIBRARIES= \ LLIBS= \ $(LLIBS) \ $(LIBNSPR) \ + $(DIST)\lib\unicharutil_s.lib \ $(DIST)\lib\xpcom.lib \ $(NULL) diff --git a/mozilla/mailnews/mime/emitters/macbuild/mimeEmitter.xml b/mozilla/mailnews/mime/emitters/macbuild/mimeEmitter.xml index 16a0fb2c251..c3b686103ec 100644 --- a/mozilla/mailnews/mime/emitters/macbuild/mimeEmitter.xml +++ b/mozilla/mailnews/mime/emitters/macbuild/mimeEmitter.xml @@ -105,6 +105,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path:::::intl:unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -1028,6 +1038,13 @@ Library Debug + + Name + UnicharUtilsStaticDebug.o + MacOS + Library + Debug + @@ -1060,6 +1077,11 @@ InterfacesStubs MacOS + + Name + UnicharUtilsStaticDebug.o + MacOS + Name nsEmitterUtils.cpp @@ -1154,6 +1176,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path:::::intl:unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -2077,6 +2109,13 @@ Library Debug + + Name + UnicharUtilsStatic.o + MacOS + Library + Debug + @@ -2109,6 +2148,11 @@ InterfacesStubs MacOS + + Name + UnicharUtilsStatic.o + MacOS + Name nsEmitterUtils.cpp @@ -2211,6 +2255,20 @@ MacOS + Static Libs + + mimeEmitter.shlb + Name + UnicharUtilsStatic.o + MacOS + + + mimeEmitterDebug.shlb + Name + UnicharUtilsStaticDebug.o + MacOS + + NS Libraries Optimized diff --git a/mozilla/mailnews/mime/emitters/src/Makefile.in b/mozilla/mailnews/mime/emitters/src/Makefile.in index 00c8660e13d..fd4fa46e3c5 100644 --- a/mozilla/mailnews/mime/emitters/src/Makefile.in +++ b/mozilla/mailnews/mime/emitters/src/Makefile.in @@ -43,6 +43,7 @@ REQUIRES = xpcom \ addrbook \ mimetype \ msgnews \ + unicharutil \ $(NULL) EXPORTS = \ diff --git a/mozilla/mailnews/mime/emitters/src/makefile.win b/mozilla/mailnews/mime/emitters/src/makefile.win index 3bded1d99eb..736657b2e70 100644 --- a/mozilla/mailnews/mime/emitters/src/makefile.win +++ b/mozilla/mailnews/mime/emitters/src/makefile.win @@ -35,6 +35,7 @@ REQUIRES = xpcom \ addrbook \ mimetype \ msgnews \ + unicharutil \ $(NULL) include <$(DEPTH)\config\config.mak> diff --git a/mozilla/mailnews/mime/emitters/src/nsMimeBaseEmitter.cpp b/mozilla/mailnews/mime/emitters/src/nsMimeBaseEmitter.cpp index 5160b2fa606..5e2e0d25946 100644 --- a/mozilla/mailnews/mime/emitters/src/nsMimeBaseEmitter.cpp +++ b/mozilla/mailnews/mime/emitters/src/nsMimeBaseEmitter.cpp @@ -682,7 +682,7 @@ nsMimeBaseEmitter::WriteHeaderFieldHTML(const char *field, const char *value) // nsCAutoString newTagName(field); newTagName.CompressWhitespace(PR_TRUE, PR_TRUE); - newTagName.ToUpperCase(); + ToUpperCase(newTagName); char *l10nTagName = LocalizeHeaderName(newTagName.get(), field); if ( (!l10nTagName) || (!*l10nTagName) ) diff --git a/mozilla/mailnews/mime/emitters/src/nsMimeXULEmitter.cpp b/mozilla/mailnews/mime/emitters/src/nsMimeXULEmitter.cpp index e036471cf59..750278a5139 100644 --- a/mozilla/mailnews/mime/emitters/src/nsMimeXULEmitter.cpp +++ b/mozilla/mailnews/mime/emitters/src/nsMimeXULEmitter.cpp @@ -692,7 +692,7 @@ nsMimeXULEmitter::WriteXULTagPrefix(const char *tagName, const char *value) nsCAutoString newTagName(tagName); newTagName.CompressWhitespace(PR_TRUE, PR_TRUE); - newTagName.ToUpperCase(); + ToUpperCase(newTagName); UtilityWrite("
LLIBS= \ + $(DIST)\lib\unicharutil_s.lib \ $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ !ifndef NECKO diff --git a/mozilla/parser/htmlparser/robot/nsRobotSink.cpp b/mozilla/parser/htmlparser/robot/nsRobotSink.cpp index 23ee14c83b3..4df7dba9148 100644 --- a/mozilla/parser/htmlparser/robot/nsRobotSink.cpp +++ b/mozilla/parser/htmlparser/robot/nsRobotSink.cpp @@ -42,6 +42,7 @@ #include "nsIParser.h" #include "nsString.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "nsIURL.h" #include "nsIURL.h" #include "nsIServiceManager.h" @@ -243,7 +244,7 @@ NS_IMETHODIMP RobotSink::CloseFrameset(const nsIParserNode& aNode) NS_IMETHODIMP RobotSink::OpenContainer(const nsIParserNode& aNode) { nsAutoString tmp; tmp.Assign(aNode.GetText()); - tmp.ToLowerCase(); + ToLowerCase(tmp); if (tmp.Equals(NS_LITERAL_STRING("a"))) { nsAutoString k, v; PRInt32 ac = aNode.GetAttributeCount(); @@ -251,7 +252,7 @@ NS_IMETHODIMP RobotSink::OpenContainer(const nsIParserNode& aNode) // Get upper-cased key const nsAReadableString& key = aNode.GetKeyAt(i); k.Assign(key); - k.ToLowerCase(); + ToLowerCase(k); if (k.Equals(NS_LITERAL_STRING("href"))) { // Get value and remove mandatory quotes v.Truncate(); diff --git a/mozilla/parser/htmlparser/robot/test/Makefile.in b/mozilla/parser/htmlparser/robot/test/Makefile.in index e0aa456aab5..b59dab3ce41 100644 --- a/mozilla/parser/htmlparser/robot/test/Makefile.in +++ b/mozilla/parser/htmlparser/robot/test/Makefile.in @@ -43,6 +43,7 @@ endif LIBS = \ $(EXTRA_DSO_LIBS) \ + $(MOZ_UNICHARUTIL_LIBS) \ $(MOZ_COMPONENT_LIBS) \ $(NULL) diff --git a/mozilla/parser/htmlparser/robot/test/makefile.win b/mozilla/parser/htmlparser/robot/test/makefile.win index 2b49ae7c594..5fc4cfb1791 100644 --- a/mozilla/parser/htmlparser/robot/test/makefile.win +++ b/mozilla/parser/htmlparser/robot/test/makefile.win @@ -31,6 +31,7 @@ PROGRAM = .\$(OBJDIR)\htmlrobot.exe LLIBS= \ $(DIST)\lib\DebugRobot.lib \ + $(DIST)\lib\unicharutil_s.lib \ $(DIST)\lib\xpcom.lib \ $(LIBNSPR) \ $(NULL) diff --git a/mozilla/parser/htmlparser/src/nsHTMLContentSinkStream.cpp b/mozilla/parser/htmlparser/src/nsHTMLContentSinkStream.cpp index d645cb58e89..46768dec5fc 100644 --- a/mozilla/parser/htmlparser/src/nsHTMLContentSinkStream.cpp +++ b/mozilla/parser/htmlparser/src/nsHTMLContentSinkStream.cpp @@ -442,9 +442,9 @@ void nsHTMLContentSinkStream::WriteAttributes(const nsIParserNode& aNode) continue; if (mLowerCaseTags == PR_TRUE) - key.ToLowerCase(); + ToLowerCase(key); else - key.ToUpperCase(); + ToUpperCase(key); EnsureBufferSize(key.Length() + 1); key.ToCString(mBuffer,mBufferSize); @@ -661,9 +661,9 @@ void nsHTMLContentSinkStream::AddStartTag(const nsIParserNode& aNode) } if (mLowerCaseTags == PR_TRUE) - tagName.ToLowerCase(); + ToLowerCase(tagName); else - tagName.ToUpperCase(); + ToUpperCase(tagName); #ifdef DEBUG_prettyprint if (isDirty) @@ -777,9 +777,9 @@ void nsHTMLContentSinkStream::AddEndTag(const nsIParserNode& aNode) tagName.AssignWithConversion(nsHTMLTags::GetStringValue(tag)); } if (mLowerCaseTags == PR_TRUE) - tagName.ToLowerCase(); + ToLowerCase(tagName); // else -// tagName.ToUpperCase(); +// ToUpperCase(tagName); if (IndentChildren(tag)) mIndent--; diff --git a/mozilla/parser/htmlparser/src/nsHTMLTags.cpp b/mozilla/parser/htmlparser/src/nsHTMLTags.cpp index c21b7ed31a7..643eeede7b5 100644 --- a/mozilla/parser/htmlparser/src/nsHTMLTags.cpp +++ b/mozilla/parser/htmlparser/src/nsHTMLTags.cpp @@ -352,7 +352,7 @@ nsHTMLTags::AddRefTable(void) for (i = 0; i < NS_HTML_TAG_MAX; ++i) { nsCAutoString temp1(kTagASCIIDebugTable[i]); nsCAutoString temp2(kTagASCIIDebugTable[i]); - temp1.ToLowerCase(); + ToLowerCase(temp1); NS_ASSERTION(temp1.Equals(temp2), "upper case char in table"); } diff --git a/mozilla/parser/htmlparser/src/nsHTMLTokenizer.cpp b/mozilla/parser/htmlparser/src/nsHTMLTokenizer.cpp index 616cc5f9478..504ebb81278 100644 --- a/mozilla/parser/htmlparser/src/nsHTMLTokenizer.cpp +++ b/mozilla/parser/htmlparser/src/nsHTMLTokenizer.cpp @@ -49,6 +49,7 @@ #include "nsHTMLEntities.h" #include "CParserContext.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" /************************************************************************ And now for the main class -- nsHTMLTokenizer... @@ -974,7 +975,7 @@ nsresult nsHTMLTokenizer::ConsumeSpecialMarkup(PRUnichar aChar,CToken*& aToken,n nsresult result=NS_OK; nsAutoString theBufCopy; aScanner.Peek(theBufCopy, 20); - theBufCopy.ToUpperCase(); + ToUpperCase(theBufCopy); PRInt32 theIndex=theBufCopy.Find("DOCTYPE"); nsTokenAllocator* theAllocator=this->GetTokenAllocator(); diff --git a/mozilla/parser/htmlparser/src/nsParser.cpp b/mozilla/parser/htmlparser/src/nsParser.cpp index 5fc0af70bfe..597fa58ec5d 100644 --- a/mozilla/parser/htmlparser/src/nsParser.cpp +++ b/mozilla/parser/htmlparser/src/nsParser.cpp @@ -980,7 +980,7 @@ static void VerifyPublicIDs() } for (i = 0; i < ELEMENTS_OF(kPublicIDs); ++i) { nsCAutoString lcPubID(kPublicIDs[i].name); - lcPubID.ToLowerCase(); + ToLowerCase(lcPubID); if (nsCRT::strcmp(kPublicIDs[i].name, lcPubID.get()) != 0) { NS_NOTREACHED("doctype not lower case"); printf("Doctype %s not lower case.\n", kPublicIDs[i].name); @@ -1029,7 +1029,7 @@ static void DetermineHTMLParseMode(nsString& aBuffer, // See comment above definition of kPublicIDs about case // sensitivity. - publicID.ToLowerCase(); + ToLowerCase(publicID); // binary search to see if we can find the correct public ID // These must be signed since maximum can go below zero and we'll diff --git a/mozilla/security/manager/boot/src/Makefile.in b/mozilla/security/manager/boot/src/Makefile.in index be85dc6eae1..8c4d84b85fd 100644 --- a/mozilla/security/manager/boot/src/Makefile.in +++ b/mozilla/security/manager/boot/src/Makefile.in @@ -65,23 +65,18 @@ REQUIRES = nspr \ string \ necko \ uriloader \ - pref \ caps \ dom \ intl \ - locale \ profile \ - windowwatcher \ js \ docshell \ widget \ layout \ content \ - pippki \ xpconnect \ - jar \ unicharutil \ - pipnss \ + pipnss \ $(NULL) include $(topsrcdir)/config/rules.mk diff --git a/mozilla/security/manager/ssl/src/Makefile.in b/mozilla/security/manager/ssl/src/Makefile.in index 769698e42cc..bc3d493ffd2 100644 --- a/mozilla/security/manager/ssl/src/Makefile.in +++ b/mozilla/security/manager/ssl/src/Makefile.in @@ -86,7 +86,6 @@ REQUIRES = nspr \ profile \ windowwatcher \ js \ - docshell \ widget \ layout \ content \ @@ -94,7 +93,7 @@ REQUIRES = nspr \ xpconnect \ jar \ unicharutil \ - pipboot \ + pipboot \ $(NULL) EXTRA_LIBS = $(NSS_LIBS) diff --git a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp index ad34bd27dc1..13a62c3bd84 100644 --- a/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -1403,7 +1403,7 @@ NS_IMETHODIMP nsExternalHelperAppService::GetFromExtension(const char *aFileExt, nsCAutoString fileExt(aFileExt); if (fileExt.IsEmpty()) return NS_ERROR_FAILURE; - fileExt.ToLowerCase(); + ToLowerCase(fileExt); // if the file extension contains a '.', our hash key doesn't include the '.' // so skip over it... if (fileExt.First() == '.') @@ -1432,7 +1432,7 @@ NS_IMETHODIMP nsExternalHelperAppService::GetFromMIMEType(const char *aMIMEType, { nsresult rv = NS_OK; nsCAutoString MIMEType(aMIMEType); - MIMEType.ToLowerCase(); + ToLowerCase(MIMEType); nsCStringKey key(MIMEType.get()); @@ -1604,7 +1604,7 @@ nsresult nsExternalHelperAppService::GetMIMEInfoForMimeTypeFromExtras(const char // Look for default entry with matching mime type. nsCAutoString MIMEType(aContentType); - MIMEType.ToLowerCase(); + ToLowerCase(MIMEType); PRInt32 numEntries = sizeof(extraMimeEntries) / sizeof(extraMimeEntries[0]); for (PRInt32 index = 0; !*aMIMEInfo && index < numEntries; index++) { diff --git a/mozilla/webshell/tests/viewer/makefile.win b/mozilla/webshell/tests/viewer/makefile.win index a2aa38672fd..793607c0aae 100644 --- a/mozilla/webshell/tests/viewer/makefile.win +++ b/mozilla/webshell/tests/viewer/makefile.win @@ -93,6 +93,7 @@ LLIBS= \ $(DIST)\lib\raptorwidget_s.lib \ # $(DIST)\lib\widgetsupport_s.lib \ $(DIST)\lib\DebugRobot.lib \ + $(DIST)\lib\unicharutil_s.lib \ $(DIST)\lib\xpcom.lib \ $(DIST)\lib\js32$(VERSION_NUMBER).lib \ $(LIBNSPR) \ diff --git a/mozilla/widget/macbuild/widget.xml b/mozilla/widget/macbuild/widget.xml index 88ad4766a86..a15ac1d7fb0 100644 --- a/mozilla/widget/macbuild/widget.xml +++ b/mozilla/widget/macbuild/widget.xml @@ -125,6 +125,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path:::intl:unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -1280,6 +1290,13 @@ Library Debug + + Name + UnicharUtilsStaticDebug.o + MacOS + Library + Debug + @@ -1287,6 +1304,11 @@ NSLibraryStartup.o MacOS + + Name + UnicharUtilsStaticDebug.o + MacOS + Name nsWindow.cpp @@ -1606,6 +1628,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path:::intl:unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -2761,6 +2793,13 @@ Library Debug + + Name + UnicharUtilsStatic.o + MacOS + Library + Debug + @@ -2768,6 +2807,11 @@ NSLibraryStartup.o MacOS + + Name + UnicharUtilsStatic.o + MacOS + Name nsWindow.cpp @@ -3087,6 +3131,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path:::intl:unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -4228,6 +4282,13 @@ Library Debug + + Name + UnicharUtilsStaticDebug.o + MacOS + Library + Debug + @@ -4235,6 +4296,11 @@ NSLibraryStartup.o MacOS + + Name + UnicharUtilsStaticDebug.o + MacOS + Name nsWindow.cpp @@ -4544,6 +4610,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path:::intl:unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -5685,6 +5761,13 @@ Library Debug + + Name + UnicharUtilsStatic.o + MacOS + Library + Debug + @@ -5692,6 +5775,11 @@ NSLibraryStartup.o MacOS + + Name + UnicharUtilsStatic.o + MacOS + Name nsWindow.cpp @@ -6233,40 +6321,50 @@ + Static Libs + + + + widgetDebug.shlb + Name + UnicharUtilsStaticDebug.o + MacOS + + NS Libraries Optimized - widgetCarbon.shlb + widget.shlb Name gfx.shlb MacOS - widgetCarbon.shlb + widget.shlb Name NSPR20.shlb MacOS - widgetCarbon.shlb + widget.shlb Name NSRuntime.shlb MacOS - widgetCarbon.shlb + widget.shlb Name NSStdLib.shlb MacOS - widgetCarbon.shlb + widget.shlb Name WidgetSupport.shlb MacOS - widgetCarbon.shlb + widget.shlb Name xpcom.shlb MacOS @@ -6274,25 +6372,25 @@ Debug - widgetDebug.shlb + widgetCarbonDebug.shlb Name gfxDebug.shlb MacOS - widgetDebug.shlb + widgetCarbonDebug.shlb Name NSPR20Debug.shlb MacOS - widgetDebug.shlb + widgetCarbonDebug.shlb Name NSRuntimeDebug.shlb MacOS - widgetDebug.shlb + widgetCarbonDebug.shlb Name NSStdLibDebug.shlb MacOS @@ -6304,7 +6402,7 @@ MacOS - widgetDebug.shlb + widgetCarbonDebug.shlb Name xpcomDebug.shlb MacOS diff --git a/mozilla/widget/src/cocoa/nsMenuX.cpp b/mozilla/widget/src/cocoa/nsMenuX.cpp index 4fe955da559..807d4a54b9b 100644 --- a/mozilla/widget/src/cocoa/nsMenuX.cpp +++ b/mozilla/widget/src/cocoa/nsMenuX.cpp @@ -267,7 +267,7 @@ NS_METHOD nsMenuX::AddMenuItem(nsIMenuItem * aMenuItem) nsAutoString keyEquivalent(NS_LITERAL_STRING(" ")); aMenuItem->GetShortcutChar(keyEquivalent); if (keyEquivalent != NS_LITERAL_STRING(" ")) { - keyEquivalent.ToUpperCase(); + ToUpperCase(keyEquivalent); char keyStr[2]; keyEquivalent.ToCString(keyStr, sizeof(keyStr)); short inKey = keyStr[0]; diff --git a/mozilla/widget/src/mac/nsMenu.cpp b/mozilla/widget/src/mac/nsMenu.cpp index 66208046c65..93990b50acd 100644 --- a/mozilla/widget/src/mac/nsMenu.cpp +++ b/mozilla/widget/src/mac/nsMenu.cpp @@ -55,6 +55,7 @@ #include "nsString.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "nsINameSpaceManager.h" #include "nsWidgetAtoms.h" @@ -347,7 +348,7 @@ NS_METHOD nsMenu::AddMenuItem(nsIMenuItem * aMenuItem) nsAutoString keyEquivalent(NS_LITERAL_STRING(" ")); aMenuItem->GetShortcutChar(keyEquivalent); if(keyEquivalent != NS_LITERAL_STRING(" ")) { - keyEquivalent.ToUpperCase(); + ToUpperCase(keyEquivalent); char keyStr[2]; keyEquivalent.ToCString(keyStr, sizeof(keyStr)); short inKey = keyStr[0]; diff --git a/mozilla/widget/src/mac/nsMenuX.cpp b/mozilla/widget/src/mac/nsMenuX.cpp index f989895e993..db83612889e 100644 --- a/mozilla/widget/src/mac/nsMenuX.cpp +++ b/mozilla/widget/src/mac/nsMenuX.cpp @@ -269,7 +269,7 @@ NS_METHOD nsMenuX::AddMenuItem(nsIMenuItem * aMenuItem) nsAutoString keyEquivalent(NS_LITERAL_STRING(" ")); aMenuItem->GetShortcutChar(keyEquivalent); if (keyEquivalent != NS_LITERAL_STRING(" ")) { - keyEquivalent.ToUpperCase(); + ToUpperCase(keyEquivalent); char keyStr[2]; keyEquivalent.ToCString(keyStr, sizeof(keyStr)); short inKey = keyStr[0]; diff --git a/mozilla/xpcom/ds/nsStaticNameTable.cpp b/mozilla/xpcom/ds/nsStaticNameTable.cpp index d49915f2666..3bd82bb1fde 100644 --- a/mozilla/xpcom/ds/nsStaticNameTable.cpp +++ b/mozilla/xpcom/ds/nsStaticNameTable.cpp @@ -80,7 +80,7 @@ nsStaticCaseInsensitiveNameTable::Init(const char* Names[], PRInt32 Count) // verify invarients of contents nsCAutoString temp1(raw); nsDependentCString temp2(raw); - temp1.ToLowerCase(); + ToLowerCase(temp1); NS_ASSERTION(temp1.Equals(temp2), "upper case char in table"); } #endif diff --git a/mozilla/xpcom/tests/Makefile.in b/mozilla/xpcom/tests/Makefile.in index fc694b50a79..a44315f516a 100644 --- a/mozilla/xpcom/tests/Makefile.in +++ b/mozilla/xpcom/tests/Makefile.in @@ -34,7 +34,7 @@ endif REQUIRES = necko \ string \ - uconv \ + unicharutil \ $(NULL) CPPSRCS = \ @@ -74,6 +74,7 @@ CPPSRCS += \ endif LIBS += \ + $(MOZ_UNICHARUTIL_LIBS) \ $(XPCOM_LIBS) \ $(NSPR_LIBS) \ $(NULL) diff --git a/mozilla/xpcom/tests/TestAtoms.cpp b/mozilla/xpcom/tests/TestAtoms.cpp index ce3090296d8..d0a4c59fde8 100644 --- a/mozilla/xpcom/tests/TestAtoms.cpp +++ b/mozilla/xpcom/tests/TestAtoms.cpp @@ -37,6 +37,7 @@ #include "nsIAtom.h" #include "nsString.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "prprf.h" #include "prtime.h" #include @@ -66,7 +67,7 @@ int main(int argc, char** argv) nsAutoString sb; sb.AssignWithConversion(buf); strings[count++] = ToNewUnicode(sb); - sb.ToUpperCase(); + ToUpperCase(sb); strings[count++] = ToNewUnicode(sb); } PRTime end0 = PR_Now(); diff --git a/mozilla/xpcom/tests/makefile.win b/mozilla/xpcom/tests/makefile.win index d2f824a71a1..492d3d5cc02 100644 --- a/mozilla/xpcom/tests/makefile.win +++ b/mozilla/xpcom/tests/makefile.win @@ -23,6 +23,7 @@ DEPTH=..\.. REQUIRES = xpcom \ string \ necko \ + unicharutil \ $(NULL) include <$(DEPTH)/config/config.mak> @@ -87,6 +88,7 @@ LINCS= \ $(NULL) LLIBS= \ + $(DIST)\lib\unicharutil_s.lib \ $(DIST)\lib\xpcom.lib \ $(LIBNSPR) diff --git a/mozilla/xpcom/tests/windows/nsStringTest.h b/mozilla/xpcom/tests/windows/nsStringTest.h index b5ac0f65296..6632cec878e 100644 --- a/mozilla/xpcom/tests/windows/nsStringTest.h +++ b/mozilla/xpcom/tests/windows/nsStringTest.h @@ -593,7 +593,7 @@ int CStringTester::TestLogical(){ NS_ASSERTION(temp8.Equals(aaaa),kEqualsError); stringtype temp10(temp8); - temp10.ToUpperCase(); + ToUpperCase(temp10); NS_ASSERTION(temp8.Equals(temp10,PR_TRUE),kEqualsError); NS_ASSERTION(temp8.Equals("AAAA",PR_TRUE),kEqualsError); @@ -1290,8 +1290,8 @@ int CStringTester::TestLexomorphic(){ //and hey, why not do a few lexo-morphic tests... nsString s0(pbuf); - s0.ToUpperCase(); - s0.ToLowerCase(); + ToUpperCase(s0); + ToLowerCase(s0); s0.StripChars("l"); s0.StripChars("\n"); s0.StripChar(250); @@ -1343,14 +1343,14 @@ int CStringTester::TestLexomorphic(){ NS_ASSERTION(s0=="heobick abc 123 xyz","ReplaceChar error"); s0=pbuf; - s0.ToUpperCase(); - s0.ToLowerCase(); + ToUpperCase(s0); + ToLowerCase(s0); s0.Append("\n\n\n \r \r \r \t \t \t"); s0.StripWhitespace(); nsCAutoString s1("\n\r hello \n\n\n\r\r\r\t rick \t\t "); - s1.ToUpperCase(); - s1.ToLowerCase(); + ToUpperCase(s1); + ToLowerCase(s1); s1.StripChars("o"); s1.Trim(" ",PR_TRUE,PR_TRUE); s1.CompressWhitespace(); @@ -1359,10 +1359,10 @@ int CStringTester::TestLexomorphic(){ s1.ReplaceChar('h','w'); NS_ASSERTION(s1=="well rick","Compress Error"); - s1.ToUpperCase(); + ToUpperCase(s1); NS_ASSERTION(s1=="WELL RICK","Compress Error"); - s1.ToLowerCase(); + ToLowerCase(s1); s1.Append("\n\n\n \r \r \r \t \t \t"); s1.StripWhitespace(); NS_ASSERTION(s1=="wellrick","Compress Error"); diff --git a/mozilla/xpfe/appshell/macbuild/AppShell.xml b/mozilla/xpfe/appshell/macbuild/AppShell.xml index 20b60e4cf15..97e81955f92 100644 --- a/mozilla/xpfe/appshell/macbuild/AppShell.xml +++ b/mozilla/xpfe/appshell/macbuild/AppShell.xml @@ -125,6 +125,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path::::intl:unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -1118,6 +1128,13 @@ Text Debug + + Name + UnicharUtilsStaticDebug.o + MacOS + Library + Debug + @@ -1150,6 +1167,11 @@ NSRuntimeDebug.shlb MacOS + + Name + UnicharUtilsStaticDebug.o + MacOS + Name nsAppShellFactory.cpp @@ -1309,6 +1331,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path::::intl:unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -2302,6 +2334,13 @@ Text Debug + + Name + UnicharUtilsStatic.o + MacOS + Library + Debug + @@ -2334,6 +2373,11 @@ xpcom.shlb MacOS + + Name + UnicharUtilsStatic.o + MacOS + Name nsWebShellWindow.cpp @@ -2493,6 +2537,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path::::intl:unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -3605,6 +3659,16 @@ FrameworkPathfalse HostFlagsAll + + SearchPath + Path::::intl:unicharutil:macbuild: + PathFormatMacOS + PathRootProject + + Recursivetrue + FrameworkPathfalse + HostFlagsAll + SystemSearchPaths @@ -4735,6 +4799,20 @@ MacOS + Static Libs + + AppShell.shlb + Name + UnicharUtilsStatic.o + MacOS + + + AppShellDebug.shlb + Name + UnicharUtilsStaticDebug.o + MacOS + + NS Libraries Debug diff --git a/mozilla/xpfe/appshell/src/Makefile.in b/mozilla/xpfe/appshell/src/Makefile.in index b6ee01a4a53..d5eed4c4686 100644 --- a/mozilla/xpfe/appshell/src/Makefile.in +++ b/mozilla/xpfe/appshell/src/Makefile.in @@ -55,6 +55,7 @@ REQUIRES = xpcom \ browser \ caps \ profile \ + unicharutil \ $(NULL) CPPSRCS = \ diff --git a/mozilla/xpfe/appshell/src/makefile.win b/mozilla/xpfe/appshell/src/makefile.win index c8abb8b0030..059748eec36 100644 --- a/mozilla/xpfe/appshell/src/makefile.win +++ b/mozilla/xpfe/appshell/src/makefile.win @@ -45,6 +45,7 @@ REQUIRES = xpcom \ content_xul \ mozbrwsr \ content \ + unicharutil \ $(NULL) include <$(DEPTH)/config/config.mak> @@ -78,6 +79,7 @@ LCFLAGS = \ # These are the libraries we need to link with to create the DLL LLIBS= \ + $(DIST)\lib\unicharutil_s.lib \ $(DIST)\lib\xpcom.lib \ $(DIST)\lib\gkgfx.lib \ $(DIST)\lib\js3250.lib \ diff --git a/mozilla/xpfe/appshell/src/nsWindowMediator.cpp b/mozilla/xpfe/appshell/src/nsWindowMediator.cpp index 2980af83e75..a5a67e24298 100644 --- a/mozilla/xpfe/appshell/src/nsWindowMediator.cpp +++ b/mozilla/xpfe/appshell/src/nsWindowMediator.cpp @@ -40,6 +40,7 @@ #include "nsAutoLock.h" #include "nsString.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "nsVoidArray.h" #include "rdf.h" #include "nsIBaseWindow.h" @@ -509,7 +510,7 @@ NS_IMETHODIMP nsWindowMediator::UpdateWindowTitle( nsIXULWindow* inWindow, cons PRBool display = PR_TRUE; nsAutoString displayString; GetAttribute( inWindow, NS_LITERAL_STRING("intaskslist"), displayString ); - displayString.ToLowerCase(); + ToLowerCase(displayString); if ( displayString.Equals(NS_LITERAL_STRING("false")) ) display=PR_FALSE; diff --git a/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp b/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp index cd1de298880..e21d164688f 100644 --- a/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp +++ b/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp @@ -1365,7 +1365,7 @@ BookmarkParser::ParseLiteral(nsIRDFResource *arc, nsString& aValue, nsIRDFNode** if (arc == kNC_ShortcutURL) { // lowercase the shortcut URL before storing internally - aValue.ToLowerCase(); + ToLowerCase(aValue); } else if (arc == kWEB_LastCharset) { @@ -2927,7 +2927,7 @@ nsBookmarksService::FindShortcut(const PRUnichar *aUserInput, char **aShortcutUR // shortcuts are always lowercased internally nsAutoString shortcut(aUserInput); - shortcut.ToLowerCase(); + ToLowerCase(shortcut); nsCOMPtr literalTarget; rv = gRDF->GetLiteral(shortcut.get(), getter_AddRefs(literalTarget)); diff --git a/mozilla/xpfe/components/history/src/Makefile.in b/mozilla/xpfe/components/history/src/Makefile.in index 3e167a94e59..7d1fb746318 100644 --- a/mozilla/xpfe/components/history/src/Makefile.in +++ b/mozilla/xpfe/components/history/src/Makefile.in @@ -35,6 +35,7 @@ REQUIRES = xpcom \ pref \ necko \ intl \ + unicharutil \ $(NULL) CPPSRCS = nsGlobalHistory.cpp \ diff --git a/mozilla/xpfe/components/history/src/makefile.win b/mozilla/xpfe/components/history/src/makefile.win index cd6b8d6058c..c1d1c274d06 100644 --- a/mozilla/xpfe/components/history/src/makefile.win +++ b/mozilla/xpfe/components/history/src/makefile.win @@ -29,6 +29,7 @@ REQUIRES = xpcom \ necko \ intl \ appcomps \ + unicharutil \ $(NULL) CPP_OBJS= \ diff --git a/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp b/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp index 4a0fec01c18..48da84ee46f 100644 --- a/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp +++ b/mozilla/xpfe/components/history/src/nsGlobalHistory.cpp @@ -61,6 +61,7 @@ #include "nsAppDirectoryServiceDefs.h" #include "nsString.h" #include "nsReadableUtils.h" +#include "nsUnicharUtils.h" #include "nsXPIDLString.h" #include "plhash.h" #include "plstr.h" @@ -3961,12 +3962,12 @@ nsGlobalHistory::AutoCompletePrefilter(const nsAReadableString& aSearchString) // then convert the host to lowercase nsAutoString host; url.Left(host, slash); - host.ToLowerCase(); + ToLowerCase(host); url.Assign(host + Substring(url, slash, url.Length()-slash)); } else { // otherwise, assume the user could still be typing the host, and // convert everything to lowercase - url.ToLowerCase(); + ToLowerCase(url); } return nsSharableString(url); diff --git a/mozilla/xpfe/components/winhooks/nsWindowsHooksUtil.cpp b/mozilla/xpfe/components/winhooks/nsWindowsHooksUtil.cpp index 70dcad18fda..0054b721b86 100644 --- a/mozilla/xpfe/components/winhooks/nsWindowsHooksUtil.cpp +++ b/mozilla/xpfe/components/winhooks/nsWindowsHooksUtil.cpp @@ -57,7 +57,7 @@ static nsCString thisApplication() { len = ::GetShortPathName( buffer, buffer, sizeof buffer ); result = buffer; - result.ToUpperCase(); + ToUpperCase(result); } return result; diff --git a/mozilla/xpfe/components/xremote/src/XRemoteService.cpp b/mozilla/xpfe/components/xremote/src/XRemoteService.cpp index 66c5d8208b8..62b66256cd0 100644 --- a/mozilla/xpfe/components/xremote/src/XRemoteService.cpp +++ b/mozilla/xpfe/components/xremote/src/XRemoteService.cpp @@ -137,7 +137,7 @@ XRemoteService::ParseCommand(nsIWidget *aWidget, nsCString action; action.Append(tempString); action.Trim(" ", PR_TRUE, PR_TRUE); - action.ToLowerCase(); + ToLowerCase(action); // pull off the noraise argument if it's there. PRUint32 index = 0;