diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Collections.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Collections.cs index 9616d2b443..bbfaa03bc8 100644 --- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Collections.cs +++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Collections.cs @@ -29,7 +29,7 @@ namespace ICSharpCode.Reporting throw new ArgumentNullException("columnName"); } - return this.FirstOrDefault(x => 0 == String.Compare(x.ColumnName,columnName,true,CultureInfo.InvariantCulture)); + return this.FirstOrDefault(x => 0 == String.Compare(x.ColumnName,columnName,StringComparison.OrdinalIgnoreCase)); } @@ -54,7 +54,7 @@ namespace ICSharpCode.Reporting throw new ArgumentNullException("columnName"); } - return this.FirstOrDefault(x => 0 == String.Compare(x.ColumnName,columnName,true,CultureInfo.InvariantCulture)); + return this.FirstOrDefault(x => 0 == String.Compare(x.ColumnName,columnName,StringComparison.OrdinalIgnoreCase)); } } @@ -71,7 +71,7 @@ namespace ICSharpCode.Reporting if (String.IsNullOrEmpty(parameterName)) { throw new ArgumentNullException("parameterName"); } - return this.FirstOrDefault(x => 0 == String.Compare(x.ParameterName,parameterName,true,CultureInfo.InvariantCulture)); + return this.FirstOrDefault(x => 0 == String.Compare(x.ParameterName,parameterName,StringComparison.OrdinalIgnoreCase)); } diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/DataManager/Listhandling/CollectionDataSource.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/DataManager/Listhandling/CollectionDataSource.cs index 73ee831799..12e75b6ba6 100644 --- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/DataManager/Listhandling/CollectionDataSource.cs +++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/DataManager/Listhandling/CollectionDataSource.cs @@ -257,14 +257,14 @@ namespace ICSharpCode.Reporting.DataManager.Listhandling throw new NotImplementedException(); } - DataCollection CreateBaseList(IEnumerable source, Type elementType) + static DataCollection CreateBaseList(IEnumerable source, Type elementType) { var list = new DataCollection(elementType); list.AddRange(source); return list; } - + /* PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[] listAccessors){ if (listAccessors != null && listAccessors.Length > 0){ var t = this.elementType; @@ -277,5 +277,6 @@ namespace ICSharpCode.Reporting.DataManager.Listhandling } return ExtendedTypeDescriptor.GetProperties(elementType); } + */ } } diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Expressions/ExpressionHelper.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Expressions/ExpressionHelper.cs index 034e305af5..9fdd6294f8 100644 --- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Expressions/ExpressionHelper.cs +++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Expressions/ExpressionHelper.cs @@ -22,7 +22,7 @@ namespace ICSharpCode.Reporting.Expressions public static bool CanEvaluate (string expression) { - if ((!String.IsNullOrEmpty(expression)) && (expression.StartsWith("=",StringComparison.InvariantCultureIgnoreCase))) { + if ((!String.IsNullOrEmpty(expression)) && (expression.StartsWith("=",StringComparison.OrdinalIgnoreCase))) { return true; } return false; diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Expressions/TypeNormalizer.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Expressions/TypeNormalizer.cs index 55811f7f51..168940e396 100644 --- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Expressions/TypeNormalizer.cs +++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Expressions/TypeNormalizer.cs @@ -1,6 +1,7 @@ // Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; +using System.Globalization; namespace ICSharpCode.Reporting.Expressions { @@ -27,13 +28,13 @@ namespace ICSharpCode.Reporting.Expressions try { - right = Convert.ChangeType(right,left.GetType()); + right = Convert.ChangeType(right,left.GetType(),CultureInfo.CurrentCulture); } catch { try { - left = Convert.ChangeType(left, right.GetType()); + left = Convert.ChangeType(left, right.GetType(),CultureInfo.CurrentCulture); } catch { @@ -92,7 +93,7 @@ namespace ICSharpCode.Reporting.Expressions return value; try { - return Convert.ChangeType(value, targetType); + return Convert.ChangeType(value, targetType,CultureInfo.CurrentCulture); } catch (Exception e) { Console.WriteLine("TypeNormalizer {0} - {1}",value.ToString(),e.Message); diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Globals/StandardFormatter.cs b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Globals/StandardFormatter.cs index 81aecf805f..aff4c0d246 100644 --- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Globals/StandardFormatter.cs +++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/Src/Globals/StandardFormatter.cs @@ -51,7 +51,7 @@ namespace ICSharpCode.Reporting.Globals retValue = FormatDate(valueToFormat,format); break; case TypeCode.Boolean: - retValue = FormatBool (valueToFormat,format); + retValue = FormatBool (valueToFormat); break; case TypeCode.Decimal: retValue = FormatDecimal (valueToFormat,format); @@ -74,7 +74,7 @@ namespace ICSharpCode.Reporting.Globals } - private static string FormatBool (string toFormat, string format) + private static string FormatBool (string toFormat) { if (CheckValue(toFormat)) { bool b = bool.Parse (toFormat); @@ -142,7 +142,7 @@ namespace ICSharpCode.Reporting.Globals CultureInfo.CurrentCulture, out time); if (valid) { - return time.ToString("g"); + return time.ToString("g",DateTimeFormatInfo.CurrentInfo); } return toFormat; }