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 is similar to the previous commit and adds another missed check for the
iterator not being at the end of string.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use ChildWindowFromPointEx(CWP_SKIPINVISIBLE) to ensure that we find the
disabled children (by not using CWP_SKIPDISABLED).
Add a unit test to check for the correct behaviour in all cases and document
it.
Closes#2942.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70794 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
- use correct printf format specifiers
- don't perform operations requiring a window until the window has been created
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The built-in of /bin/sh doesn't handle "-n" option that we use (at least not
under OS X 10.6), so we were getting "-n APPL????" in the generated files.
Fix this by using /bin/echo which does support this option.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to correctly return when the two files with different names
actually refer to the same file system object.
Closes#910.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Until 2.7 glibc wrongly used periods instead of slashes as separators for the
French date format and the test accounted for this, breaking it with recent
glibc versions in which this bug was fixed.
Fix this by limiting the workaround to the old glibc versions only.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function checks for existence of anything with the given name, not
necessarily just a file or a directory.
Extend the unit test to verify that it returns true for /dev/null on Unix
systems.
Closes#953.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Merge FileExists() and DirExists() together in a single
wxFileSystemObjectExists() helper in preparation for adding a function
checking for the existence of any kind of file system object.
There should be no changes for MSW/Unix but OS/2 file detection was changed
slightly to always use DosQueryPathInfo() instead of using it only for the
directories and stat() for files. Not sure if this is the right thing to do
there but it seems like the code should work.
Also add a simple unit test for these functions.
See #953.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Define _CRT_SECURE_NO_DEPRECATE, _CRT_NON_CONFORMING_SWPRINTFS and
_SCL_SECURE_NO_WARNINGS when using makefiles to build the library too for
consistency with the project files.
These defines are only needed for VC8 and later but should do no harm for the
previous versions.
See #11009.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Rebake all the projects after the changes of r70182, even if they're only
really needed for the library itself, the other project files should
correspond to the bakefiles contents too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Handle positional parameter specifications in wxFormatConverter to ensure that
e.g. "%N$s" are correctly transformed to "%N$S" if needed. This fixes the use
of positional parameters under OS X.
Closes#10965.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The affine transform was previously multiplied by the translation matrix on
the right but this was incompatible with both the MSW version of the same
method and all the other methods of the generic version.
So multiply the transform by the translation on the left, as everywhere else.
Closes#13875.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The charset of the message catalog files changed to UTF-8 in r70411 but the
unit test still expected ISO-8859-1. Update the unit test too to make it pass
again.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As wxCharTypeBuffer ctor taking the length NUL-terminates the buffer, it may
be expected that extend() does the same but it did not. Do add the NUL at the
end for consistency, even though it's not really needed for the existing code
using extend() in wxWidgets itself.
Closes#13885.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
MS and Apple guidelines mention ellipses should generally be used when a command needs additional information from the user before the operation can execute. This is not the case for showing an about dialog so the ellipses have been removed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Changing the localisation files to be in UTF-8 allows them to be committed by the pre-commit hook script.
Also regenerated relevant .mo files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method was only available in wxUniv before and just always returned true
in the other ports. Implement it for wxMSW and wxGTK too now and document it.
Also add a unit test.
Closes#795.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Due to a typo the size was expressed in 1/10th of a point and not in points.
Fix this and add a unit test checking that GetStyle() returns the same font as
was set by SetStyle().
Closes#2120.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
"%z" specifier can now be used when printing the dates out to specify the time
zone and is also recognized when parsing dates.
Closes#1215.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Sleeping can take more time than expected when running on the build slaves,
probably because the machine is heavily loaded. Increase the tolerance to
prevent this from resulting in test failures.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix linking errors when using wxXML in sttaic monolithic build: in this case
we must link with expat but it was listed too early, before wxWidgets
libraries using it, in the bakefile-generated makefiles.
Now add it to the end of the linker command line too by including -lexpat in
EXTRALIBS_FOR_BASE which are appended to the linker arguments.
Notice that now -lexpat is linked twice because it is still added by
<wx-lib>xml</wx-lib> in bakefiles, even in monolithic build, but I don't know
how to avoid it and it is harmless anyhow.
Closes#12573.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The changes of r70111 were wrong, the unit test for wxGrid really did intend
to test the deprecated methods so restore them -- but only in
WXWIN_COMPATIBILITY_2_8 case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't use the methods defined only when building 2.8-compatible mode to let
the tests compile even with WXWIN_COMPATIBILITY_2_8 off. This only worked
before because of the wrong tests in grid.h but broke after the fixes of
r70098.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Log the original and new paths of the rename event to help debugging the extra
modification events detected during the buildbot builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The last check in this test couldn't pass under MSW as it relied on the (long)
line of text being wrapped but the style used for the control prevented this
from happening. Not sure how could it have ever worked before but in any case
removing wxTE_DONTWRAP does make the test pass.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Changing the text of the selected wxChoice (or wxComboBox, as it derives from
it in wxMSW) item made it unselected. Fix this by explicitly restoring the
selection to the item if needed.
Closes#13769.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Since r69835 the stop watch remained paused even when Start() was called. Do
resume it when restarting it both for backwards compatibility and because it
makes more sense and also document this behaviour.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775