Commit Graph

361 Commits

Author SHA1 Message Date
Vadim Zeitlin
c302a8d1e7 Use fractional point sizes in wxRichText code
When scaling, just use the floating point result directly instead of
rounding it.
2018-09-17 15:24:42 +02:00
Paul Cornett
98cd5a6b20 Use wxString::clear() instead of assignment to wxEmptyString 2018-05-11 10:52:56 -07:00
Paul Cornett
7d039a2e0b Fix potential memory leak
See #15991
2018-05-11 10:47:21 -07:00
Jan Niklas Hasse
496da2e550 Remove trailing whitespace from several files
No real changes.

See https://github.com/wxWidgets/wxWidgets/pull/787
2018-04-18 15:45:42 +02:00
Paul Cornett
cd1c3fab0c Use static linkage for various local names 2017-09-24 09:29:26 -07:00
Ilya Ivanov
ab7c39fddb Check for variable being non-NULL before using it
The "buffer" argument can apparently be null, as there is a check for this on
the next line, but it was used without checking that this is the case.

Fix this, although it's not totally clear if "buffer" can really be null at
all and maybe the check below should have been removed instead -- but prefer
to err on the side of caution.

Thanks to PVS-Studio for finding this issue (V595 The 'buffer' pointer was
utilized before it was verified against nullptr).
2017-04-29 13:39:19 +02:00
JulianSmart
682d53fdaa Use correct selection after editing cell properties 2016-10-17 12:42:00 +01:00
JulianSmart
c7d91d28a9 When collecting common attributes, reset attributes in target that are absent in source 2016-07-07 15:27:08 +01:00
JulianSmart
511923a974 Scaled bitmap and selection click fixes 2016-06-30 20:16:43 +01:00
Tobias Taschner
63803dd8d9 Fix MSVS 2015 warnings about hiding variables in wxRichText code
These warnings were apparently harmless, but really annoying, so get rid of
them by renaming the variables instead of reusing the same name in the nested
scope.

Closes #17351.
2016-02-05 22:43:23 +01:00
JulianSmart
e27027a1dd Selected images now differentiated in wxOSX/Cocoa 2015-12-15 12:37:06 +00:00
JulianSmart
76190de960 Only use scaled content factor for bitmaps on Mac 2015-11-15 18:54:10 +00:00
JulianSmart
a797c9d956 Make wxBitmap ctors consistent wrt passing scale for conversion from wxImage; HiDPI adaptation for propgrid buffer and wxRTC images 2015-11-15 12:49:25 +00:00
JulianSmart
ec2d9a2f89 Ensure paragraph properties are preserved when inserting a fragment in wxRTC 2015-11-14 18:50:30 +00:00
JulianSmart
6993b73042 Implement freeze/thaw in Do/Undo to considerably speed up commands with a large number of actions (commit omitted part) 2015-11-14 18:47:33 +00:00
JulianSmart
f2bc1f5e1d Fixes for list style dialog and bullet drawing when no left subindent is specified 2015-11-14 18:37:12 +00:00
JulianSmart
5979facc48 Fixed bug in border drawing 2015-10-07 14:40:36 +01:00
JulianSmart
40430585d6 Removed erroneous variable declaration 2015-09-28 14:17:21 +01:00
Vadim Zeitlin
5a9ce576a2 No changes, just remove an unused variable.
Get rid of the g++ warning about it.
2015-05-24 02:00:34 +02:00
JulianSmart
4c772b4221 Fixed clipped borders on scaled-to-fit images, and fixed a floating image layout bug. 2015-05-23 15:33:54 +01:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Vadim Zeitlin
3bec79d71c Fix harmless warning about implicit double to char conversion.
Round the double value before passing it to wxColour::Set() instead of relying
on the implicit conversion which is dangerous and correctly flagged as such by
g++.
2015-03-01 02:05:28 +01:00
Julian Smart
0df45db7f6 Now uses the correct font and text effect when drawing bullet text.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-18 17:37:12 +00:00
Julian Smart
8cf3e90650 Now allows space for a bullet even if no left subindent was specified; added a MeasureBullet function to support this.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-18 12:18:27 +00:00
Vadim Zeitlin
5a8893aa7a Fix harmless unused variable warning in some build configurations.
Don't declare the variables if they are not going to be used.

Closes #16830.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-04 13:16:26 +00:00
Paul Cornett
1b14371f07 use logical operator, rather than bitwise, on bools, closes #16824
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-02 17:23:55 +00:00
Julian Smart
4a5ae79a36 Remove selection before container is deleted or it could cause a crash later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-21 14:31:28 +00:00
Julian Smart
1d1f045f11 Bullet no longer gets the attributes from the first object in the list paragraph, so we can control it via paragraph attributes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-13 17:05:14 +00:00
Julian Smart
08f8f5311f Added shadows to box attributes, and relevant controls in the Background page.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-17 16:04:03 +00:00
Julian Smart
46d4a7d01c Don't take right indent into account twice when aligning lines
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-07 17:32:07 +00:00
Julian Smart
cf72b6c111 Don't calculate refresh optimizations if we're not going to use them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-16 10:13:48 +00:00
Julian Smart
8c56462500 Corrections to HasCharacterAttributes, HasParagraphAttributes
EditProperties functions don't try to change read-only content
Page up/down behaviour now takes into account margins and scale
Transparency and y poition corrections to field labels


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-08 10:29:01 +00:00
Julian Smart
4f4258cfdc Implemented vertical image alignment.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-18 14:39:49 +00:00
Julian Smart
7269fba894 Compensate for lack of bitmap inversion on Mac when selecting content.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-28 08:31:51 +00:00
Vadim Zeitlin
33a92d117b Suppress unused variable warning in wxRichTextObject code.
Put the variable used only inside #if 0'd code inside #if 0 itself
(it would be better to get rid of this entirely, of course...).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-24 15:32:07 +00:00
Julian Smart
6eec9dda58 Layout fix for paragraphs after floating objects not centering
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-13 08:44:22 +00:00
Vadim Zeitlin
d53f93f607 Fix wxRichTextCtrl code compilation with wxUSE_XML==0.
Add missing wxUSE_XML checks.

Closes #16251.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-10 16:15:46 +00:00
Julian Smart
1a16259223 Draw an unknown field using a fallback field type, so it's not invisible.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-22 16:25:48 +00:00
Julian Smart
9b8b5b085d Object position calculation correction
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-07 16:23:05 +00:00
Paul Cornett
87bb3c9c4f fix some asserts that were clearly meant to be wxFAIL_MSG
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 15:09:15 +00:00
Julian Smart
9ab80ed818 Use style sheet when copying to the clipboard if available
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-31 16:11:08 +00:00
Vadim Zeitlin
33ad33d447 Add wxOVERRIDE and use it in common and wxOSX code.
Make overriding virtual methods more explicit and enable additional checks
provided by C++11 compilers when "override" is used.

Closes #16100.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-20 13:26:28 +00:00
Julian Smart
b4d02eafa3 Improved calculation of spanning column widths.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 09:14:42 +00:00
Julian Smart
cd3fc53163 Added on-demand image loading option to wxRTC.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-10 11:08:42 +00:00
Julian Smart
9adba53251 Paragraph and image layout fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 15:15:18 +00:00
Julian Smart
f631f732af Corrections to attribute manipulation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 10:03:53 +00:00
Julian Smart
29a83101bc Fixed floating object layout when there is only a short text string in the paragraph
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 14:54:09 +00:00
Julian Smart
4d331cea32 Compile fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-16 11:41:20 +00:00
Julian Smart
8762e50748 Sizing fix in wxRichTextImage::LoadImageCache
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-15 18:11:44 +00:00
Julian Smart
2124c5688b Optimized wxRTC insertion and deletion when floating objects are present.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-15 16:19:43 +00:00