Merge "[Base-utils][Measure Format][ACR-986] Missing functions added" into tizen
authorMyoungJune Park <mj2004.park@samsung.com>
Thu, 22 Jun 2017 05:54:34 +0000 (05:54 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Thu, 22 Jun 2017 05:54:34 +0000 (05:54 +0000)
1  2 
src/include/utils_i18n.h
src/utils_i18n_measure_format.cpp

Simple merge
  #include <utils_i18n_private.h>
  
  #include <malloc.h>
+ #include <vector>
  #include <unicode/measfmt.h>
  #include <unicode/measure.h>
 +#include <unicode/ustring.h>
  
- int i18n_measure_format_create(const char *language, const char *country, i18n_umeasure_format_width_e width, i18n_measure_format_h *measure_format)
+ int i18n_measure_format_create(const char *language,
+                                                          const char *country,
+                                                          i18n_umeasure_format_width_e width,
+                                                          i18n_measure_format_h *measure_format)
  {
-     retv_if(measure_format == NULL, I18N_ERROR_INVALID_PARAMETER);
-     retv_if(width < I18N_UMEASFMT_WIDTH_WIDE, I18N_ERROR_INVALID_PARAMETER);
-     retv_if(width > I18N_UMEASFMT_WIDTH_COUNT, I18N_ERROR_INVALID_PARAMETER);
-     UErrorCode status = U_ZERO_ERROR;
-     Locale locale(language, country, 0, 0);
-     UMeasureFormatWidth icu_width = (UMeasureFormatWidth) width;
+       retv_if(measure_format == NULL, I18N_ERROR_INVALID_PARAMETER);
+       UErrorCode status = U_ZERO_ERROR;
+       Locale locale(language, country, 0, 0);
+       UMeasureFormatWidth icu_width = (UMeasureFormatWidth) width;
  
-     *measure_format = new MeasureFormat(locale, icu_width, status);
-     retv_if(*measure_format == NULL, I18N_ERROR_OUT_OF_MEMORY);
+       *measure_format = new MeasureFormat(locale, icu_width, status);
+       retv_if(*measure_format == NULL, I18N_ERROR_OUT_OF_MEMORY);
  
-     return _i18n_error_mapping(status);
+       return _i18n_error_mapping(status);
  }
  
  int i18n_measure_format_destroy(i18n_measure_format_h measure_format)