[Libreoffice-commits] .: 2 commits - l10ntools/source sal/inc
Stephan Bergmann
sbergmann at kemper.freedesktop.org
Wed Feb 15 23:34:19 PST 2012
l10ntools/source/srclex.l | 1 +
sal/inc/rtl/string.hxx | 16 ++++++++++++++++
sal/inc/rtl/ustring.hxx | 25 +++++++++++++++++++++++++
3 files changed, 42 insertions(+)
New commits:
commit 3ac780d8a2f8d1b94e9b4776d7f556274d3197dc
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Feb 16 08:29:47 2012 +0100
Missing return statement
diff --git a/l10ntools/source/srclex.l b/l10ntools/source/srclex.l
index 40ae022..814e236 100644
--- a/l10ntools/source/srclex.l
+++ b/l10ntools/source/srclex.l
@@ -238,4 +238,5 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
yylex();
e = GetError();
Close();
+ return EXIT_SUCCESS;
}
commit acc9fb5ca0bc378ac03637cba948520a29938940
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Feb 16 08:29:16 2012 +0100
Prevent misuses of RTL_CONSTASCII_USTRINGPARAM
works only on 64 bit platforms, though.
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index 68f2aa1..0809c26 100644
--- a/sal/inc/rtl/string.hxx
+++ b/sal/inc/rtl/string.hxx
@@ -495,6 +495,14 @@ public:
str, strLength, strLength) == 0;
}
+ // This overload is left undefined, to detect calls of matchL that
+ // erroneously use RTL_CONSTASCII_USTRINGPARAM instead of
+ // RTL_CONSTASCII_STRINGPARAM (but would lead to ambiguities on 32 bit
+ // platforms):
+#if SAL_TYPES_SIZEOFLONG == 8
+ void matchL(char const *, sal_Int32, rtl_TextEncoding) const;
+#endif
+
/**
Match against a substring appearing in this string, ignoring the case of
ASCII letters.
@@ -686,6 +694,14 @@ public:
return n < 0 ? n : n + fromIndex;
}
+ // This overload is left undefined, to detect calls of indexOfL that
+ // erroneously use RTL_CONSTASCII_USTRINGPARAM instead of
+ // RTL_CONSTASCII_STRINGPARAM (but would lead to ambiguities on 32 bit
+ // platforms):
+#if SAL_TYPES_SIZEOFLONG == 8
+ void indexOfL(char const *, sal_Int32, rtl_TextEncoding) const;
+#endif
+
/**
Returns the index within this string of the last occurrence of
the specified substring, searching backward starting at the end.
diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx
index cf1ec92..2318243 100644
--- a/sal/inc/rtl/ustring.hxx
+++ b/sal/inc/rtl/ustring.hxx
@@ -681,6 +681,14 @@ public:
asciiStr, asciiStrLength ) == 0;
}
+ // This overload is left undefined, to detect calls of matchAsciiL that
+ // erroneously use RTL_CONSTASCII_USTRINGPARAM instead of
+ // RTL_CONSTASCII_STRINGPARAM (but would lead to ambiguities on 32 bit
+ // platforms):
+#if SAL_TYPES_SIZEOFLONG == 8
+ void matchAsciiL(char const *, sal_Int32, rtl_TextEncoding) const;
+#endif
+
/**
Match against a substring appearing in this string, ignoring the case of
ASCII letters.
@@ -711,6 +719,15 @@ public:
asciiStr, asciiStrLength ) == 0;
}
+ // This overload is left undefined, to detect calls of
+ // matchIgnoreAsciiCaseAsciiL that erroneously use
+ // RTL_CONSTASCII_USTRINGPARAM instead of RTL_CONSTASCII_STRINGPARAM (but
+ // would lead to ambiguities on 32 bit platforms):
+#if SAL_TYPES_SIZEOFLONG == 8
+ void matchIgnoreAsciiCaseAsciiL(char const *, sal_Int32, rtl_TextEncoding)
+ const;
+#endif
+
/**
Check whether this string ends with a given substring.
@@ -905,6 +922,14 @@ public:
return ret < 0 ? ret : ret + fromIndex;
}
+ // This overload is left undefined, to detect calls of indexOfAsciiL that
+ // erroneously use RTL_CONSTASCII_USTRINGPARAM instead of
+ // RTL_CONSTASCII_STRINGPARAM (but would lead to ambiguities on 32 bit
+ // platforms):
+#if SAL_TYPES_SIZEOFLONG == 8
+ void indexOfAsciiL(char const *, sal_Int32 len, rtl_TextEncoding) const;
+#endif
+
/**
Returns the index within this string of the last occurrence of
the specified substring, searching backward starting at the end.
More information about the Libreoffice-commits
mailing list