Title: [114347] trunk/Source
Revision
114347
Author
[email protected]
Date
2012-04-16 22:57:20 -0700 (Mon, 16 Apr 2012)

Log Message

Rename LocalizedNumberICU.h to ICULocale.h
https://bugs.webkit.org/show_bug.cgi?id=84119

Reviewed by Kentaro Hara.

Source/WebCore:

LocalizedNumberICU.h contains only ICULocale class. It should be
named as ICULocale.h. We're going to move some functions in
LocalizedDateICU.cpp and LocalizedCalendarICU.cpp to ICULocale,
and add unit tests for them.

* WebCore.gypi: Rename LocalizedNumberICU.h to ICULocale.h
* platform/text/ICULocale.h:
Renamed from Source/WebCore/platform/text/LocalizedNumberICU.h.
* platform/text/LocalizedNumberICU.cpp:
Rename LocalizedNumberICU.h to ICULocale.h

Source/WebKit/chromium:

* tests/LocalizedNumberICUTest.cpp: Rename LocalizedNumberICU.h to ICULocale.h

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (114346 => 114347)


--- trunk/Source/WebCore/ChangeLog	2012-04-17 05:49:08 UTC (rev 114346)
+++ trunk/Source/WebCore/ChangeLog	2012-04-17 05:57:20 UTC (rev 114347)
@@ -1,3 +1,21 @@
+2012-04-16  Kent Tamura  <[email protected]>
+
+        Rename LocalizedNumberICU.h to ICULocale.h
+        https://bugs.webkit.org/show_bug.cgi?id=84119
+
+        Reviewed by Kentaro Hara.
+
+        LocalizedNumberICU.h contains only ICULocale class. It should be
+        named as ICULocale.h. We're going to move some functions in
+        LocalizedDateICU.cpp and LocalizedCalendarICU.cpp to ICULocale,
+        and add unit tests for them.
+
+        * WebCore.gypi: Rename LocalizedNumberICU.h to ICULocale.h
+        * platform/text/ICULocale.h:
+        Renamed from Source/WebCore/platform/text/LocalizedNumberICU.h.
+        * platform/text/LocalizedNumberICU.cpp:
+        Rename LocalizedNumberICU.h to ICULocale.h
+
 2012-04-16  James Robinson  <[email protected]>
 
         [chromium] Move paintRenderedResultsToCanvas code into DrawingBuffer

Modified: trunk/Source/WebCore/WebCore.gypi (114346 => 114347)


--- trunk/Source/WebCore/WebCore.gypi	2012-04-17 05:49:08 UTC (rev 114346)
+++ trunk/Source/WebCore/WebCore.gypi	2012-04-17 05:57:20 UTC (rev 114347)
@@ -4449,6 +4449,7 @@
             'platform/text/BidiContext.cpp',
             'platform/text/Hyphenation.cpp',
             'platform/text/Hyphenation.h',
+            'platform/text/ICULocale.h',
             'platform/text/LineEnding.cpp',
             'platform/text/LocaleToScriptMapping.h',
             'platform/text/LocaleToScriptMappingDefault.cpp',
@@ -4460,7 +4461,6 @@
             'platform/text/LocalizedDateNone.cpp',
             'platform/text/LocalizedNumber.h',
             'platform/text/LocalizedNumberICU.cpp',
-            'platform/text/LocalizedNumberICU.h',
             'platform/text/LocalizedNumberNone.cpp',
             'platform/text/ParserUtilities.h',
             'platform/text/QuotedPrintable.h',

Copied: trunk/Source/WebCore/platform/text/ICULocale.h (from rev 114344, trunk/Source/WebCore/platform/text/LocalizedNumberICU.h) (0 => 114347)


--- trunk/Source/WebCore/platform/text/ICULocale.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/text/ICULocale.h	2012-04-17 05:57:20 UTC (rev 114347)
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ICULocale_h
+#define ICULocale_h
+
+#include <unicode/unum.h>
+#include <wtf/Forward.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/text/CString.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+// We should use this class only for LocalizedNumberICU.cpp and LocalizedNumberICUTest.cpp.
+class ICULocale {
+public:
+    static PassOwnPtr<ICULocale> create(const char* localeString);
+    static PassOwnPtr<ICULocale> createForCurrentLocale();
+    ~ICULocale();
+    String convertToLocalizedNumber(const String&);
+    String convertFromLocalizedNumber(const String&);
+
+private:
+    explicit ICULocale(const char*);
+    void setDecimalSymbol(unsigned index, UNumberFormatSymbol);
+    void setDecimalTextAttribute(String&, UNumberFormatTextAttribute);
+    void initializeDecimalFormat();
+
+    bool detectSignAndGetDigitRange(const String& input, bool& isNegative, unsigned& startIndex, unsigned& endIndex);
+    unsigned matchedDecimalSymbolIndex(const String& input, unsigned& position);
+
+    CString m_locale;
+    UNumberFormat* m_numberFormat;
+    enum {
+        // 0-9 for digits.
+        DecimalSeparatorIndex = 10,
+        GroupSeparatorIndex = 11,
+        DecimalSymbolsSize
+    };
+    String m_decimalSymbols[DecimalSymbolsSize];
+    String m_positivePrefix;
+    String m_positiveSuffix;
+    String m_negativePrefix;
+    String m_negativeSuffix;
+    bool m_didCreateDecimalFormat;
+};
+
+}
+#endif

Modified: trunk/Source/WebCore/platform/text/LocalizedNumberICU.cpp (114346 => 114347)


--- trunk/Source/WebCore/platform/text/LocalizedNumberICU.cpp	2012-04-17 05:49:08 UTC (rev 114346)
+++ trunk/Source/WebCore/platform/text/LocalizedNumberICU.cpp	2012-04-17 05:57:20 UTC (rev 114347)
@@ -29,8 +29,8 @@
  */
 
 #include "config.h"
-#include "LocalizedNumberICU.h"
 
+#include "ICULocale.h"
 #include "LocalizedNumber.h"
 #include <wtf/PassOwnPtr.h>
 #include <wtf/text/StringBuilder.h>

Deleted: trunk/Source/WebCore/platform/text/LocalizedNumberICU.h (114346 => 114347)


--- trunk/Source/WebCore/platform/text/LocalizedNumberICU.h	2012-04-17 05:49:08 UTC (rev 114346)
+++ trunk/Source/WebCore/platform/text/LocalizedNumberICU.h	2012-04-17 05:57:20 UTC (rev 114347)
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef LocalizedNumberICU_h
-#define LocalizedNumberICU_h
-
-#include <unicode/unum.h>
-#include <wtf/Forward.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/text/CString.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-// We should use this class only for LocalizedNumberICU.cpp and LocalizedNumberICUTest.cpp.
-class ICULocale {
-public:
-    static PassOwnPtr<ICULocale> create(const char* localeString);
-    static PassOwnPtr<ICULocale> createForCurrentLocale();
-    ~ICULocale();
-    String convertToLocalizedNumber(const String&);
-    String convertFromLocalizedNumber(const String&);
-
-private:
-    explicit ICULocale(const char*);
-    void setDecimalSymbol(unsigned index, UNumberFormatSymbol);
-    void setDecimalTextAttribute(String&, UNumberFormatTextAttribute);
-    void initializeDecimalFormat();
-
-    bool detectSignAndGetDigitRange(const String& input, bool& isNegative, unsigned& startIndex, unsigned& endIndex);
-    unsigned matchedDecimalSymbolIndex(const String& input, unsigned& position);
-
-    CString m_locale;
-    UNumberFormat* m_numberFormat;
-    enum {
-        // 0-9 for digits.
-        DecimalSeparatorIndex = 10,
-        GroupSeparatorIndex = 11,
-        DecimalSymbolsSize
-    };
-    String m_decimalSymbols[DecimalSymbolsSize];
-    String m_positivePrefix;
-    String m_positiveSuffix;
-    String m_negativePrefix;
-    String m_negativeSuffix;
-    bool m_didCreateDecimalFormat;
-};
-
-}
-#endif

Modified: trunk/Source/WebKit/chromium/ChangeLog (114346 => 114347)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-04-17 05:49:08 UTC (rev 114346)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-04-17 05:57:20 UTC (rev 114347)
@@ -1,3 +1,12 @@
+2012-04-16  Kent Tamura  <[email protected]>
+
+        Rename LocalizedNumberICU.h to ICULocale.h
+        https://bugs.webkit.org/show_bug.cgi?id=84119
+
+        Reviewed by Kentaro Hara.
+
+        * tests/LocalizedNumberICUTest.cpp: Rename LocalizedNumberICU.h to ICULocale.h
+
 2012-04-16  Dana Jansens  <[email protected]>
 
         [chromium] Expose compositor filters to Aura through WebLayer

Modified: trunk/Source/WebKit/chromium/tests/LocalizedNumberICUTest.cpp (114346 => 114347)


--- trunk/Source/WebKit/chromium/tests/LocalizedNumberICUTest.cpp	2012-04-17 05:49:08 UTC (rev 114346)
+++ trunk/Source/WebKit/chromium/tests/LocalizedNumberICUTest.cpp	2012-04-17 05:57:20 UTC (rev 114347)
@@ -29,8 +29,8 @@
  */
 
 #include "config.h"
-#include "LocalizedNumberICU.h"
 
+#include "ICULocale.h"
 #include <gtest/gtest.h>
 #include <wtf/PassOwnPtr.h>
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to