This compiler doesn't exist any more and was probably unsupported even in 2.8,
let alone 2.9, so remove all the __MWERKS__ tests to simplify things.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method can be used to recover the pointer in char* buffer containing
multi-byte string representation corresponding to the given iterator which is
useful for implementing backwards-compatible functions that must be able to
return such pointers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The length here is the size of the buffer in bytes and is not necessarily the
string length in code points (notably not for non-ASCII strings in UTF-8
build).
Closes#14130.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The length of the string here is specified in bytes and is not the same as the
string length for non-ASCII UTF-8 strings, so don't cache it as the string
length.
Just invalidate the cached length instead as we simply don't know what the
real length of the string is going to be.
See #14130.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
A length greater than that of the source string could be passed to this ctor.
This worked correctly, i.e. created a string which was a copy of the source
one but cached a wrong length for it.
Avoid this by explicitly checking the length before caching it in
wxString::assign(str, len).
See #14130.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This change prepares the way for using wxGTK under Windows as this would
still define __WINDOWS__ but use __WXGTK__ instead of __WXMSW__.
Closes#14064.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The platform targeted by this port doesn't exist any more and the port never
achieved really working state so remove the code to avoid having to maintain
it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Previously, wxUSE_STL enabled both implicit conversion of wxString to
std::[w]string and use of standard containers for the implementation of their
wx equivalents. Split up the two roles now by allowing to enable the use of
the standard containers independently of (backwards incompatible) implicit
conversion in wxString and actually enable wxUSE_STD_CONTAINERS by default.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Optionally support fixed precision in wxString::FromDouble() and FromCDouble()
methods. This is mostly useful for the latter to be able to format numbers in
portable way (using dot as decimal separator) without loss of precision but
also do it for the former for consistency.
Closes#12973.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Instead of writing a rather unreadable "defined(wxLongLong_t) &&
!defined(wxLongLongIsLong)" expression every time we need to decide if a
function needs to be overloaded for both long and long long, add a new symbol
which can be tested directly.
No real changes in the code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Construct wxScopedWCharBuffer using CreateNonOwned() in
wxString::ToStdWstring() in this case, creating it directly from wc_str()
doesn't work (intentionally, as this doesn't tell if the buffer owns the
string or not).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to search the string just once, in BeforeXXX(), when both the
parts of the string before and after some character are needed instead of
having to do it twice in both BeforeXXX() and AfterXXX().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix compilation in !wxUSE_UNICODE_UTF8 case after r65857.
Modify the second declaration of wxString::iterator class which was not
updated by the previous commit in the same way, i.e. add declaration of
comparison operators taking const_iterator to iterator class.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Only comparisons between const_iterator and iterator worked before (because of
implicit conversion from the latter to the former), implement the ones in the
other direction explicitly now.
Closes#12594.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxString::FromCDouble() is needed inside wxWidgets itself to format numbers
independently of the current locale. FromDouble() was added for symmetry with
ToDouble/ToCDouble() functions.
Use std::locale for the implementation if available and manual wxLocale-based
fallback otherwise.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We use these methods inside wxWidgets itself and so want to always have them,
even when wxUSE_XLOCALE==0. Provide replacement manual implementations for
this case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These trivial helper functions are available in all builds (provided that
wxUSE_STD_STRING is not explicitly set to non-default 0 value) unlike implicit
conversions to std::[w]string which are only available when wxUSE_STL==1.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes warnings with IRIX mipsPro and not only mingw32 and probably
doesn't do any harm with the other compilers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As with other ANSI/Unicode unification changes, we choose to preserve
compatibility with the existing code using wxLongLongFmtSpec in ANSI build
and require people using it in Unicode build to change their code.
Closes#11372.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is huge but there are no non-white-space changes in it.
Some files containing third-party sources (src/msw/wince/time.cpp,
src/x11/pango*.cpp) were left unchanged.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775