Commit Graph

223 Commits

Author SHA1 Message Date
Ryan Norton
e4e3bbb447 solution to wxMBConv stuff - make a seperate XX2XX for strings of a specified length, use this in wxString instead of previous worst-case method
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-30 20:16:25 +00:00
David Elliott
c096ba5ea1 Make wxString::WorstEncodingCase take a const wxMBConv&
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-30 05:33:47 +00:00
Ryan Norton
03ff8fda8d Add wxString::WorstEncodingCase, other various cleanups
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-29 21:06:28 +00:00
Ryan Norton
bdd8f35a58 Handle bad conversions correctly. Add Bad UTF8 test.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-29 10:13:59 +00:00
Ryan Norton
930357bd25 Handle invalid conversion slightly better, ecapsulate literal chars with wxT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-29 08:55:58 +00:00
Ryan Norton
44d271da3e increase worst case to *4 for UTF8, switch a memcpy for wxMemcpy
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-28 23:01:46 +00:00
Ryan Norton
c81fc3344d Use wxStringBufferLength instead of wxXCharBuffer in constructors with conversion. Avoids both an allocation and a memory copy in normal (non-stl) wx mode with wxString
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-27 07:48:28 +00:00
Włodzimierz Skiba
7663d0d4bf Fix to wrong order of parameters. Used wxStringBase constructor has parameters in reversed order in comparison to wxString (iirc due to stl::string compatibility).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-14 17:36:04 +00:00
Ryan Norton
49dcf8bfb8 crush compiler warnings and handle out of memory errors slightly better
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-13 02:54:32 +00:00
Ryan Norton
215f9d70dd correct assignment in constructors, a little optimization, and some rare (impossible?) case sanity checks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-10 13:30:55 +00:00
Ryan Norton
19db911ad2 fix description
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-08 23:33:11 +00:00
Ryan Norton
063864481a final null-char wxString stuff, a couple of bugfixes and lots of code cleanups - fixups to changes.txt as per someone's suggestions - support for a lot more stock cursors on wxCocoa using the cursors from the carbon port
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-08 23:19:39 +00:00
Ryan Norton
265d5cce05 1.10.2 and less mbtowc and wctomb HAVE THE COOTIEScd .. (they are just stubs and return 0 - we need our own, even in ANSIcd ..!)\n2.Finalize the null character changes in wxString - change mb_str and wc_str to not stop at null characters\n3.Add unit tests for the above
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-07 22:28:57 +00:00
Robin Dunn
7c9b5f42f5 Correct compile errors in non-unicode build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-07 18:08:05 +00:00
Ryan Norton
dcb6810279 2.5.3 - cleanups, fixes, etc. etc. -
1. Various stubs for wxCocoa (and the bakefile entries for them)
2. Definitions for some wxCocoa cocoa types in defs.h
3. Hack to attempt to fix SYNC sound for mac carbon
4. Fix for wxCocoa and 10.2 (Dave - I'm already around doing some stuff anyway - I'll go ahead and save you the trouble).
5. 10.2 unicode layer
6. Strings null-char fixes (stems from chartraits patch - essentially the patch minus the chartraits part - HAHA :)) [note to self - swap the 2nd and 3rd params of wxMemchr if you use chartraits and vice versa]
	* If you have time please run the strings and stdstrings cppunit test suite
	* Also add more test suites if you want - more is always better :)
	* This does not include any fixes for mbtowc etc functions as outlined on the ml

7. An attempt to update wxArray docs a little
8. wx/process.h build fix for wxCocoa
9. Unicode fixes in app.mm for wxCocoa
10. Remove newer font panel after Stefan's suggestion


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-07 08:53:48 +00:00
Vadim Zeitlin
d85cfb3784 added wxVaCopy() and use it to fix wxVsnprintf() crash (see bug 1017651)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-02 18:32:31 +00:00
Stefan Csomor
cf6bedce0e unicode fix for CW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-26 14:07:09 +00:00
Włodzimierz Skiba
d775fa8235 Source cleaning: whitespaces, tabs, -1/wxID_ANY/wxNOT_FOUND/wxDefaultCoord, TRUE/true, FALSE/false.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-22 14:38:52 +00:00
Václav Slavík
b65ee6fd83 fixed typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-08-11 08:54:10 +00:00
Václav Slavík
597ee16421 assert if conversion ctors are used incorrectly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-08-11 08:18:37 +00:00
Vadim Zeitlin
1f020bfb92 implementation of the range insert for wxStringArray (patch 975003)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-01 11:47:52 +00:00
Václav Slavík
31444b6aa4 fixed wxString char<->wchar_t conversion constructors to not truncate strings and correctly handle nLength argument
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-08 20:11:26 +00:00
Václav Slavík
ac3c86ee7d don't call CopyBeforeWrite when returning non-const interator if the string is empty -- avoids assert and is not needed anyway since the iterator is never valid
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-31 22:05:59 +00:00
Julian Smart
655719367a Use old licence name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 20:53:33 +00:00
Julian Smart
77ffb5937e Name and version changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 14:56:36 +00:00
Dimitri Schoolwerth
bb17155103 fixed bug #947908: wxString("abcdefghij", wxConvLibc, n) returns an empty string for every n>0 and n<string length (Unicode mode only)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-07 01:59:28 +00:00
Julian Smart
6eaebb297a Applied patch [ 817734 ] fix for cvs head with wxUSE_STD_IOSTREAM=1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-12-11 08:48:01 +00:00
Julian Smart
eae4425db6 WinCE fixes from "Viktor Voroshylo" <viktor@voroshylo.com>
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-11-18 21:25:44 +00:00
Vadim Zeitlin
4cc6a9db04 compilation fix for VC++ statis MT build with wxUSE_STL==1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-11-01 12:17:29 +00:00
Vadim Zeitlin
caff62f22d fix for C99-compatible vsnprintf()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-11 20:27:39 +00:00
Mattia Barbon
78e6050be8 Fix and testcase for wxString::rfind bug I introduced.
Patch by Robert Vazan.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-04 21:59:48 +00:00
Mattia Barbon
e21011866e Corrected statements about wxString correctly handling
embedded '\0' characters.
  Fixed various wxString::*find* methods (patch by Robert Vazan),
plus added missing overloaded variants of find_first/last_(not_)of.
Added more tests in console sample.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-01 20:20:21 +00:00
Mattia Barbon
93c83507aa wxString::rfind fixed for wxUSE_STL=0 from Robert Vazan.
Added missing wxArrayString::reserve.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-28 20:32:06 +00:00
Václav Slavík
14f355c2b5 added support for gcc precompiled headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-09 12:46:53 +00:00
Vadim Zeitlin
65c75abefc don't ignore start parameter in find_last_of()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-08 11:54:26 +00:00
Václav Slavík
7892b9436c compilation fix for BC++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-27 11:16:51 +00:00
Mattia Barbon
e87b783352 Create a new wxStringBase class, providing a STL-like API, using
the current wxString implementation.
  Derive wxString from one of wxStringBase, std::string, std::wstring
depending on wxUSE_STL/wxUSE_UNICODE settings. wxString provides
full compatibility with the old wxString in both wxUSE_STL=0 and
wxUSE_STL=1 modes (except for [Un]getWriteBuffer).
  Add some configure checks for std::string features.
  Add tests for STL API in console sample.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-24 19:44:57 +00:00
Julian Smart
0be9ace27e Added RTL functions missing from WinCE to wxchar.h/cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-15 13:46:39 +00:00
Mattia Barbon
22a5055f1f Multilib linking fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-12 02:22:22 +00:00
Julian Smart
4676948b68 More WinCE mods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-11 21:50:07 +00:00
Julian Smart
b1e4e7cc96 Oops, no such function as wxIsascii
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-11 11:28:11 +00:00
Julian Smart
1c193821a9 More WinCE mods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-11 11:21:47 +00:00
Vadim Zeitlin
251a8ce858 set string length properly in wxString(p, conv, len) ctor (patch 755593)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-10 12:13:49 +00:00
Vadim Zeitlin
50dee7e0eb make string at least empty (instead of containing garbage) if malloc() failed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-10 12:07:53 +00:00
Mattia Barbon
6c44548a8f Compilation fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-08 20:25:26 +00:00
Mattia Barbon
df5168c427 Added --use-stl to cnfigure, wxUSE_STL to setup0.h
Moved wx/datetime.inl contents to wx/datetime.h and removed
inline redefinition hack.
  Implemented STL-like interface on top of wxList/wxArray, when wxUSE_STL=0.
  Implemented wxList-like and wxArray interfaces on top of std::list and
std::vector, when wxUSE_STL=1.
  Added arrstr.h, moved wxArrayString declaration there; string.h
#includes arrstr.h only if WXWIN_COMPATIBILITY_2_4 is enabled.
  Added WX_CLEAR_HASH_MAP, WX_CLEAR_HASH_TABLE, WX_CLEAR_LIST macros,
to clear a wxHashMap, wxHashTable, wxList containing pointers: deletes
pointers and makes container zero-sized.
  When wxUSE_STL=1, wxStringList works like a std::list<wxString>.
  Made wxBase compile when wxUSE_STL=1.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-08 19:52:35 +00:00
Mattia Barbon
fd3f01603a wxArrayString::Sort(bool) not deprecated (yet).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-04 09:01:46 +00:00
Mattia Barbon
ba8c160144 Moved some methods/classes inside COMPATIBILITY_2_4.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-03 21:59:55 +00:00
Václav Slavík
fd24237519 fixed to make wxBase DLL compile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-02 12:50:48 +00:00
Vadim Zeitlin
a8f1f1b23b check parmateres in Replace() (bug 752716)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-06-15 19:33:04 +00:00