Commit Graph

103 Commits

Author SHA1 Message Date
708fc1c187 fdo#82577, fdo#82579: Handle Cursor
Put the vcl Cursor in the vcl namespace. Avoids collision with the Xlib Cursor
typedef and some ancient Carbon (?) Cursor typedef on OS X.

Change-Id: I7af770c522b5774c87f58cc079ced9fc1bcc88b0
2014-08-23 19:20:03 +03:00
794d5ac4ac vcl: use enum for complex text layout constants
Since these constants are bitfield flags, we define some methods to make
working with them reasonably type safe.

Move the definitions to outdevstate.hxx, since we need the values there,
and that appears to be the "root most" header file.

Also dump TEXT_LAYOUT_BIDI_LTR constant, since it means the same thing
as TEXT_LAYOUT_DEFAULT (ie. 0), and leaving it in causes people to write
weird code thinking that it's a real flag.

Change-Id: Iddab86cd6c78181ceb8caa48e77e1f5a8e526343
Reviewed-on: https://gerrit.libreoffice.org/10676
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-08-20 09:01:26 -05:00
d24df3fc66 callcatcher: another round of ResId removals
Change-Id: Ia3acdb3501b7735820258cb090e731f5814bc07f
2014-08-12 09:02:03 +01:00
537cda4457 fdo#75757: remove inheritance to std::vector
... by boost::ptr_vector.
Originally TextCharAttribList::Clear() was never called with false,
so this drops the argument.

Change-Id: I0306cd787dd38de0960af38afe9c08a910195b26
Reviewed-on: https://gerrit.libreoffice.org/10549
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-07-27 08:12:18 +00:00
d4758e6f69 coverity#706084 Unintended sign extension
and

coverity#706085 Unintended sign extension

Change-Id: I4bb617cd6927542dfef6dea89c5417ec4f9ed495
2014-07-21 13:59:34 +01:00
6a873638fa Renamed brdcst.[hc]xx to SfxBroadcaster.[hc]xx
- Remove includes from files where they are not needed.
- Update pch files

Change-Id: I0188e3934ef429008c1ef495ab1d5b27f38664d5
Reviewed-on: https://gerrit.libreoffice.org/10342
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-07-17 08:47:58 +00:00
0fc759c6f0 fix higher debug level build
Change-Id: I5bfa022c3c9fe8d24726989d9068fce7273e3f2d
2014-07-14 09:21:02 +01:00
4523dd0544 Called C++ object pointer is null
Change-Id: I88efc4be6ff869ef97a2b398d43f7b7914debfc6
2014-06-30 09:46:16 +01:00
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
f7e2f18e89 avoid segfault when nBrekPos is past the end
Change-Id: Ieedc24c0443ba10d8277cd6327b3b735203e5d45
2014-05-17 19:41:52 +02:00
4f9b21248f simplify ternary conditions "xxx ? yyy : false"
Look for code like:
   xxx ? yyy : false;
Which can be simplified to:
   xxx && yyy

Change-Id: Ia33c0e452aa28af3f0658a5382895aaad0246b4d
2014-05-05 12:47:48 +02:00
213bc71f84 Clean up function declarations and some unused functions
Change-Id: I382289c7188dfdc9839ff9e6362b6e039ffc5f9e
2014-04-08 08:39:36 +02:00
50bf123ddb Kill superfluous vertical whitespace
Change-Id: I81ce8fd7022bf283db668705efdfb0666f87bde9
2014-04-02 16:54:18 +03:00
362d4f0cd4 Explicitly mark overriding destructors as "virtual"
It appears that the C++ standard allows overriding destructors to be marked
"override," but at least some MSVC versions complain about it, so at least make
sure such destructors are explicitly marked "virtual."

Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-04-01 19:22:54 +02:00
70cc2b191b First batch of adding SAL_OVERRRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-26 16:39:26 +01:00
5fb78604c1 Split TYPEINFO into plain and TYPEINFO_OVERRIDE
...where the latter contains SAL_OVERRIDE annotations

Change-Id: Id64794b388d83dfe7026440e8b20a5b5efd412d1
2014-03-26 11:54:55 +01:00
e0e2f4c988 Avoid possible resource leaks with boost::scoped_ptr
Change-Id: I835bec5c43b7b4a8638d5032b720661fc2f1397f
2014-03-07 16:35:09 +09:00
a7859d08ab Work around unfortunate libstdc++ interpretation of C++ cmath requirements
...that causes a call to std::abs with a short argument to effectively select
the double overload (via a template added with <http://gcc.gnu.org/git/
?p=gcc.git;a=commit;h=8c0edf5c2aad076cbc805299ed82845ae049f4f6>
"include/c_std/cmath (abs(_Tp)): Add"), see
<http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-toc.html#2192> "Validity and
return type of std::abs(0u) is unclear" for details.

The workaround is to use int instead of short arguments (and make sure the
integral overloads of std::abs from cstdlib are available).

Change-Id: If95363f9a54abb9cb1a57fd4828c4b91c12bc4be
2014-03-05 17:45:18 +01:00
6b27104ac5 remove unused code TextEngine::GetLeftMargin()
Change-Id: I1b702a4371154ebc10c0caa7697fdbe763337b6f
2014-03-05 09:17:46 +02:00
e9b2ee3037 remove unused code vcl/VclMultiLineEdit
VclMultiLineEdit::IsRightToLeft() const
VclMultiLineEdit::SetTextSelectable(bool)

Change-Id: I430ffd0bac59baf49bac05123f22fa004a90ec40
2014-03-05 09:17:45 +02:00
e8da8b3a1a Resolves: fdo#75229 missing object:state-changed:focused
in multiline edits, focus remains stuck on internal
TextWindow instead of being placed on container MultiLineEdit

regression from b755fb8c0f6b1282f62c12f378c0a5ecac64d490 which
removed it with no explanation

Change-Id: I9d6bd546e341651442538bf40de6c43c521868d7
2014-03-04 11:56:37 +00:00
381f8a5673 sal_Bool -> bool in mostly vcl module
Conflicts:
	include/vcl/settings.hxx
	svtools/source/table/tablecontrol_impl.cxx
	sw/source/core/frmedt/fecopy.cxx
	vcl/inc/canvasbitmap.hxx
	vcl/inc/headless/svpframe.hxx
	vcl/inc/unx/salframe.h
	vcl/inc/win/salframe.h
	vcl/inc/win/salprn.h
	vcl/inc/win/salvd.h
	vcl/osx/DragSource.cxx
	vcl/osx/DragSource.hxx
	vcl/osx/DropTarget.cxx
	vcl/osx/DropTarget.hxx
	vcl/osx/OSXTransferable.cxx
	vcl/osx/OSXTransferable.hxx
	vcl/osx/clipboard.cxx
	vcl/osx/clipboard.hxx
	vcl/osx/salprn.cxx
	vcl/qa/cppunit/canvasbitmaptest.cxx
	vcl/source/components/fontident.cxx
	vcl/source/control/edit.cxx
	vcl/source/control/spinfld.cxx
	vcl/source/gdi/gdimtf.cxx
	vcl/source/gdi/virdev.cxx
	vcl/source/helper/canvasbitmap.cxx
	vcl/source/window/dockwin.cxx
	vcl/unx/generic/dtrans/X11_selection.hxx
	vcl/unx/kde/UnxFilePicker.cxx
	vcl/unx/kde/UnxFilePicker.hxx
	vcl/unx/kde4/KDE4FilePicker.cxx
	vcl/unx/kde4/KDE4FilePicker.hxx
	vcl/unx/kde4/KDESalFrame.hxx

Change-Id: I9866d985da86dea2a56feff23f91c1467a1636b0
Reviewed-on: https://gerrit.libreoffice.org/8219
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-28 03:19:47 -06:00
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
d9f0af83b7 Remove visual noise from vcl
Conflicts:
	vcl/source/app/settings.cxx
	vcl/source/window/dockmgr.cxx
	vcl/source/window/dockwin.cxx
	vcl/source/window/floatwin.cxx
	vcl/source/window/toolbox2.cxx

Change-Id: Ie67681549a76e77064b09d4b5bf80fe4c6010341
Reviewed-on: https://gerrit.libreoffice.org/8339
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 04:56:16 -06:00
d5c59404be Replace deprecated std::auto_ptr with boost::scoped_ptr
Change-Id: I773524536c0ed7bc34eb08cd35cfc77e83f722ba
2014-02-26 17:21:20 +09:00
0ce0c369aa Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23 03:38:49 +00:00
e8f8f24c84 vcl: sal_Bool -> bool
Change-Id: I2a3e3d3e3266ea0f0fafdd91362076a4aa160f0e
2014-02-21 12:53:51 +01:00
a18a1a4545 Remove vcl/settings.hxx from vcl/svapp.hxx and vcl/outdev.hxx
Added vcl/settings.hxx to all cxx files which require it.
This helps to speed up compilation after changes to the settings.

Conflicts:
	sc/source/ui/dbgui/pvlaydlg.cxx

Change-Id: I211a0735c47f72d6879f6f15339355abfe0e3cf4
Reviewed-on: https://gerrit.libreoffice.org/7933
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-20 16:22:17 +00:00
49cecd8b41 Related: fdo#74242 hook up a selection and caret change for multiline edits
a) split the textengine selection changed broadcast into a text selection changed
and text caret change event
b) handle both in existing places that handled the text selection event
c) listen for them in VclMultiLineEdit and translate to
VCLEVENT_EDIT_SELECTIONCHANGED VCLEVENT_EDIT_CARETCHANGED events
d) profit from the VCLEVENT_EDIT_SELECTIONCHANGED and
VCLEVENT_EDIT_CARETCHANGED handling in
accessibility/source/standard/vclxaccessibleedit.cxx for VCLXAccessibleEdits

Change-Id: I09187e76ae4eb189ee9469e388374154087faf80
2014-02-19 15:32:00 +00:00
76f5ce409f more similar handling of InputSequenceChecker as in other places
Change-Id: Ia6efc0eda03dac87c73e720d08f320ce3fc6ce4a
2014-02-11 22:34:36 +01:00
3cbfcee36d xub_StrLen and tools/string.hxx final straw
Thre is still some 0xffff limit left and possibly some
less than gracefully handled overflow/error cases

Change-Id: I00957ee3a30b02f73918ea49d7353056263dc638
Reviewed-on: https://gerrit.libreoffice.org/7787
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-02-03 07:44:28 +00:00
c1d37365c4 bool improvements
Change-Id: Iede12ed1e35581cf48d64b898f22949d0c1aa6de
2014-01-28 20:26:19 +01:00
3b4b4ed3b3 Edit::IsModified should return bool
Change-Id: I0aafdd37c73cd47b9dc68b60a32db35c8c11f455
2014-01-26 12:28:09 +01:00
5d8bd348ec coverity#440841 : Dereference after NULL check
Change-Id: Ifdbd256c3478161c16fff02e79608498175aa024
2014-01-25 03:10:54 -06:00
602c87b425 Window::PreNotify should return bool
Change-Id: Ic9903fd887f2c3fab2630ebeb20df39392177c8d
2014-01-18 00:37:49 +01:00
04683f1488 Window::Notify should return bool
Change-Id: I72081b1022582c8b6f95a611e21d9c78f7581efe
2014-01-17 16:42:29 +01:00
d610e8618e longparas: none of the callers check for the error case
so we can safely change the return of 0xFFFF to 0 without
changing any callers. Which makes this safe seeing as before
now every caller would have done something stupid with the
results

Change-Id: I10d9f12525de10661ed82f3405e6c728d38be106
2014-01-14 13:09:44 +00:00
f619315ae3 longparas: bump nLen to 32bit
Change-Id: I49621bc3887baf8fcee17559818193325b83f27d
2014-01-14 10:53:30 +00:00
09dc581359 drop unnecessary tools/string.hxx includes
Change-Id: I2439ed19b554381f80e882aacbac05167622df92
2014-01-13 13:54:51 +00:00
1b7a5c634a disentangle CalcSize
Change-Id: I42248ff611dbe7c109076da5d548717898341be3
2014-01-13 09:50:11 +00:00
89f7e4ec62 longparas: drop STRING_MAXLEN limit in TextEngine
Change-Id: Ib0f72e1fc0938ca286d0131b7bb1a00499ada7d4
2014-01-13 09:50:11 +00:00
3e749d7867 longparas: drop STRING_MAXLEN limit in TextDoc
Change-Id: Iabe74f423c2d65bad637e56e5ab44dd808d41df1
2014-01-13 09:50:11 +00:00
cea2bd4d2d longparas: unnecessary xub_StrLen cast
Change-Id: I794faf7ba0c2dd32b0c846dd1cf6d1825cf8b63c
2014-01-11 20:18:19 +00:00
3a81e90a45 longparas: lift 16bit max edit length
Change-Id: Ide74f0a48f06cbe9539f16ef6c6d04bba043dcf9
2014-01-11 20:18:19 +00:00
b4bff4a978 longparas: shouldn't need to split strings in textview anymore
Change-Id: Ide2d0ba95e4ef8bf1500f086bd03b7a1590a2848
2014-01-11 15:51:03 +00:00
02f72c32cf operator ==, != should return bool
Change-Id: I73cb672175f49535a3d0e248d9ed970bb5e3be4a
2014-01-10 17:11:51 +01:00
d83328b233 longparas: convert GetTextBreak to sal_Int32
Change-Id: I693e4c9916e1968c33ebd922829662f6efc27bfb
2013-12-03 16:09:36 +00:00
b755fb8c0f Integrate branch of IAccessible2
Change-Id: I3b5936bb92bb258f9e9e76402dd2b55f29aa686a
2013-11-25 16:52:36 +00:00
e22242fddb fixincludeguards.sh: vcl
Change-Id: I3858c2152267474afab8e5a72b9f5da0ac623012
2013-10-28 15:16:20 +01:00
a7724966ab Bin comments that claim to say why some header is included
They are practically always useless, often misleading or obsolete.

Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-22 16:56:28 +03:00