92 Commits

Author SHA1 Message Date
Peter Senna Tschudin
f8018266cc Remove double assignment
The semantic match that finds this problem is follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
expression i,f;
position p1,p2;
@@
(
(<+...i++...+>) = ...;
|
(<+...++i...+>) = ...;
|
(<+...i--...+>) = ...;
|
(<+...--i...+>) = ...;
|
i = <+...f(...)...+>;
|
i@p1 = ...;
(
i = <+...i...+>;
|
i = <+...f(...)...+>;
|
i@p2 = ...;
)
)

@@
expression i;
position r.p1,r.p2;
@@

* i@p1 = ...;
i@p2 = ...;
// </smpl>

Change-Id: Ifacb878d58486f2645560592484ce24b2bc0bd6f
Reviewed-on: https://gerrit.libreoffice.org/9968
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-06-30 07:06:29 +00:00
Herbert Dürr
aeeb125c4d Related: #i122471# make the Mac lookup feature handle the correct word
(cherry picked from commit 0a4564b42de0fc61253ae4e69039860c09e53eba)

Conflicts:
	vcl/osx/a11ytextattributeswrapper.mm

Change-Id: I786815feb847a2a340d2e3d24c9a8a01bb7ace7c
2014-06-26 16:29:11 +01:00
Herbert Dürr
5232d01ee5 Resolves: #i124970# fix DocumentFocusListener::notifyEvent's...
handling of IndexOutOfBoundsException

the DocumentFocusListener::notifyEvent() throw list only allows a RuntimeException to
propagate. The methods called in notifyEvent() allow IndexOutOfBoundsException though,
so it must be handled in all cases to prevent C++ from invoking its unexpected() abort
mechanisms. Ceterum censeo, non-empty throw lists should be removed altogether...

(cherry picked from commit 4da0e442f0fd4838e93e7316c24cfeef9289207d)

Conflicts:
	vcl/osx/documentfocuslistener.cxx
	vcl/unx/gtk/a11y/atkutil.cxx

Change-Id: Ie0b783832314ee5ec376a0c3c2cd67e4a70e218b
2014-06-23 09:56:57 +01:00
Douglas Mencken
47b520024a fix 'NSWindow' may not respond to '+windowNumbersWithOptions'
conditionally reverts 1b89f986f0e7e6303c4e44cb1ca5d42a5c78c8d4

Change-Id: I13aa24286dab52c9e4af798c8b6d9bf407bb7069
Reviewed-on: https://gerrit.libreoffice.org/9760
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-18 12:40:39 +00:00
Douglas Mencken
a2ee38ef7a fix keyboard input on OS X < 10.6
Since commit e4dc93f5, LibreOffice just beeps on any key press:
it's impossible to add symbols by using keyboard. This patch
fixes that.

conditionally reverts e4dc93f5d8d0df50f1a8b4594220d0c57703e03d

Change-ID: Id30e30775c0d0224954b8a1f05fd0d8d5f39cd4e
Reviewed-on: https://gerrit.libreoffice.org/9793
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-16 12:30:38 +00:00
Tor Lillqvist
b8bee05dbf Don't use the CoreUI private framework when sandboxed (i.e., for App Store)
This conditionally reverts 0c7e6080519014f1fb345ed25e2f12c9a043b3ae.

Change-Id: I462016cd43c489fced7fb3739aa98c521d52f78e
2014-06-13 21:07:58 +03:00
Stephan Bergmann
66d40a1fcc loplugin:staticcall
Change-Id: Id5c17212031b6710f38413c833c0df2b33f42475
2014-06-13 18:41:45 +02:00
Douglas Mencken
e509b9303b fix build error "error: NSPrintJobSavingURL was not declared in this scope"
see commits:
  c5c317ed20933c6508b35c34039df31669943f1c

Change-Id: I3a886bde11dc3620cffeb3e2e579c7b37285d9c5
Reviewed-on: https://gerrit.libreoffice.org/9759
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-13 08:54:06 +00:00
rbuj
7b832d545a 'NSNoUnderlineStyle' & ‘NSSingleUnderlineStyle’: Deprecated in OS X 10.9
Change-Id: If18df0c06a1bdec5ea54307f9c452a1edf533e15
Reviewed-on: https://gerrit.libreoffice.org/9740
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-12 13:06:49 +00:00
Noel Grandin
0e507ae031 various: remove SAL_THROW macro
Change-Id: I9464179a736b91f5bc32eb5e5e89b3b4e3da3494
2014-06-05 08:17:52 +02:00
Tor Lillqvist
2116b92f02 WaE: 'convertBaseToScreen:' is deprecated: first deprecated in OS X 10.7
Change-Id: I04cc155e69d25021d294bccc588450b1f20e1fde
2014-06-03 21:29:08 +03:00
Tor Lillqvist
74ae541c32 WaE: 'scrollerWidth' is deprecated: first deprecated in OS X 10.7
Change-Id: I2451687c10f91e7d5242b04974cb7bdd745de51c
2014-06-03 21:29:07 +03:00
Tor Lillqvist
e1d82a7e2d WaE: 'NSPrintSavePath' is deprecated: first deprecated in OS X 10.6
Change-Id: I810b42da1d62c66c2ab6fb7bb6f71d1d00115dfa
2014-06-03 21:29:07 +03:00
Tor Lillqvist
5f27a68644 WaE: comparison of two values with different enumeration types
Change-Id: I611eefd20043386d00984f76a28d111e1c0495f1
2014-06-03 21:29:06 +03:00
Tor Lillqvist
b3818f5381 WaE: 'setFlipped' is deprecated: first deprecated in OS X 10.6
Not sure if using lockFocusFlipped: has the same effect, but will
see...

Change-Id: I957874bcf59c2c521bd5b2b2ca6f44fb0400e64f
2014-06-03 21:29:05 +03:00
Tor Lillqvist
39ffccd261 WaE: case value not in enumerated type 'NSEventSubtype'
Change-Id: Iaf5de07b7f0da7294681b9cdc152575a756a73c7
2014-06-03 21:29:05 +03:00
Tor Lillqvist
e4dc93f5d8 Initial attempt at implementing NSTextInputClient instead of NSTextInput
NSTextInput was deprecated in 10.6.

Change-Id: I6bce9e91a68014a6ca28bff6a820c27817f9baaf
2014-06-03 21:29:04 +03:00
Tor Lillqvist
1b89f986f0 WaE: 'NSCountWindows' is deprecated: first deprecated in OS X 10.6
Change-Id: I7163d3821ac0dfc0d471cf31e98f72953c78d878
2014-06-03 21:29:03 +03:00
Jens Carl
6c3245fc69 fdo#68849: Add header guards to all include files
Added header guards to files in directory vcl/

Change-Id: I76ad0c34f2b107d56e92c5a6a8f4c61554c93e2f
Reviewed-on: https://gerrit.libreoffice.org/9597
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-06-01 16:15:36 +00:00
Noel Grandin
ebc0a15515 remove more unnecesary OUString constructor use
when throwing exceptions

Change-Id: I6edfb6b6745499f802b0e3c0e096a36fb7c32aac
2014-05-29 09:01:40 +02:00
Peter Senna Tschudin
3b24dcc8a8 Remove unnecessary semicolons
A simplified version of the semantic match that finds this problem is
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r1@
statement S;
position p,p1;
@@
S@p1;@p

@script:python r2@
p << r1.p;
p1 << r1.p1;
@@
if p[0].line != p1[0].line_end:
    cocci.include_match(False)
@@
position r1.p;
@@
-;@p
// </smpl>

Change-Id: Ib9708d37fbb4c6060f88d5dae3814a2d37b2091e
Reviewed-on: https://gerrit.libreoffice.org/9493
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-27 01:19:00 -05:00
Thomas Arnhold
3c84ee9cce cppcheck: unusedFunction
Change-Id: I81f2a4be65bbc9359e51accccb746f1e8ea48c4f
2014-05-25 21:55:34 +02:00
Herbert Dürr
5456a01fef Related: #i124191# small cleanup for salframeview.mm
clean up some minor warts while the behaviour remains unchanged.

(cherry picked from commit 8ba6a0be8a0ac9075b2faa68bf71245f4aff0d16)

Conflicts:
	vcl/osx/salframeview.mm

Change-Id: I613bf0f40429db6516f82e79438e86bffb7f71cb
2014-05-23 20:38:13 +01:00
Tor Lillqvist
0f836296ea Don't use two separate names for the same thing
Change-Id: Iad76d452d5dbaa03099c1a649d7f278b0151f340
2014-05-20 23:37:04 +03:00
Tor Lillqvist
c41ad388af We don't support the Apple Remote in sandboxed mode
Change-Id: Ie0a456647376b9d249850227d3481be5b4ee991d
2014-05-20 23:37:03 +03:00
Julien Nabet
745a094a37 Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part15
Change-Id: I38e855966598342eb2352e70e04f7a5e09e54f83
2014-05-17 23:33:02 +02:00
Thomas Arnhold
2bd7767d01 Resolves fdo#70681: fixincludeguards.pl: all that's left
Change-Id: I3e51a62710bb46c8255fd228d41d9300c90a1fb5
Reviewed-on: https://gerrit.libreoffice.org/9360
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-05-15 12:50:46 +00:00
Stephan Bergmann
9f2217fd8a loplugin:passsequencebyref
Change-Id: I3a6656117b2d2aa9d9cdcadc53a804e963f805a7
2014-05-14 20:52:42 +02:00
Julien Nabet
592b61e17c Fix previous commit (vcl/MacOsX part)
Change-Id: I65998bbbba01943eeb41fd8ee4f1ed5fe2eb91b1
2014-05-11 10:57:54 +02:00
Julien Nabet
bd59628620 Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part10
Change-Id: I67acda35fa127547dcea0cd18c9dc16db7c00294
2014-05-11 10:16:42 +02:00
Tor Lillqvist
13009b5cde Fix typo, thanks to Cor Nouws for noticing
Change-Id: Ib20fa5dbbc8bfbd399c3266c175ba1971e9a4774
2014-05-09 00:01:57 +03:00
Tor Lillqvist
f4d8fea465 Correct keycode mappings for KEY_QUOTE{LEFT,RIGHT}
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/Events.h
says that 0x27 is kVK_ANSI_Quote, which we call KEY_QUOTERIGHT,
i.e. the plain ASCII apostrophe, while 0x32 is not the ASCII tilde but
kVK_ANSI_Grave, which we call KEY_QUOTELEFT.

Makes the Command-' binding (see Kohei's
56cce6fd8151a916e1be540ac18724b46d1b15fc) work at least for the US
English keyboard. But not for the Finnish keyboard, for instance,
where the key labeled with an apostrophe (or "ASCII-style" single
quote) generates a different keycode than the single quote key on the
US English keyboard. (Which, I guess, isn't surprising as it after all
is a different physical key.)

In other words, situation normal, using keycodes is a horror as
always...

Change-Id: Ibf8f994370fec75849391e1dba30c7b7d54d237f
2014-05-05 22:05:59 +03:00
Tor Lillqvist
8b4c33facb Untabify and remove trailing spaces
Change-Id: I2acd44d54966dd227f5dc23ca4acde3c50ca8347
2014-05-05 22:02:14 +03:00
Tor Lillqvist
c5c3c3bec2 Align table entries into equal-size columns
Change-Id: I9fd2980a32bd0a3eb4849a53f29cc10b9a371f4c
2014-05-05 22:02:13 +03:00
Tor Lillqvist
09f8760e7d GetKeyName for KEY_{TILDE,BRACKET{LEFT,RIGHT},SEMICOLON,QUOTERIGHT}
Change-Id: Id320bc41fefff17035c8a30115dc94af5cbf9503
2014-05-05 22:02:13 +03:00
Tor Lillqvist
72ff5d4196 Add more unmapped VCL keycodes to the comment
Change-Id: If417d8091896c9f6c9650cf7d6036ffacbcc0884
2014-05-05 19:19:49 +03:00
Noel Grandin
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
Thomas Arnhold
6bdeee7884 typo: suiteable -> suitable 2014-04-14 12:32:26 +02:00
Thomas Arnhold
c6279cc17b OLD_TAB_STYLE never defined 2014-04-14 12:31:50 +02:00
Stephan Bergmann
11a210c25f Remove unused function
Change-Id: I150cbe9ca96f0fb9a6b1116f79a0711d78252ba5
2014-04-11 22:43:55 +02:00
Tor Lillqvist
cb10a184b9 Kill the ImplSVGDIData::mbNoXORClipping flag
Instead, act as if it was true on all platforms. Don't do XOR clipping on any
platform. Simpler code is better code, and XOR tricks are generally very much
out of fashion these days, I have been told. Didn't seem to have any visible
ill effects on Linux at least.

Change-Id: I6192006c77a4a81363ec7b3292f72d512d5e9b53
Reviewed-on: https://gerrit.libreoffice.org/8901
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-04-10 11:42:41 +00:00
Stephan Bergmann
57ecf341a4 Clean up ImplSVMainHook declaration
Change-Id: I51d7eac6160a3c3abc96733fa30fdcbb41bb5509
2014-04-07 13:41:32 +02:00
Julien Nabet
786b31696b Typo: corect->correct
Change-Id: I31267af8aae35d647b8c4b0a0c5f926ad4779919
2014-04-03 21:15:54 +02:00
Tor Lillqvist
50bf123ddb Kill superfluous vertical whitespace
Change-Id: I81ce8fd7022bf283db668705efdfb0666f87bde9
2014-04-02 16:54:18 +03:00
Stephan Bergmann
6a3b0b7cc4 Explicitly mark overriding destructors as "virtual," Mac OS X redux
Change-Id: Ib7ab02bc3cdadbdfe0e0787560d1dd562eb85be9
2014-04-01 21:30:38 +02:00
Douglas Mencken
f8f28ae91d vcl-osx fix: 'NSEvent' may not respond to '-magnification'
(error: invalid operands of types 'float' and 'objc_object*' to binary 'operator+')

Change-Id: Iade7acde31fad21d7dde1a8c20c8900d9cbbd446
Reviewed-on: https://gerrit.libreoffice.org/8792
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-03-30 14:54:13 +00:00
Niklas Johansson
44a6c8eed8 Improve Accessibility mapping of roles for Mac
Since role Heading now is exposed to A11y we need to give it a better role then
unknown, otherwise it gets inaccessible to VoiceOver. Until I get a better grip
on how to best expose AXHeading, let's map it to textAreaRole so we at least
get back to the behaviour before IA2 integration.
Header and Footer is probably best mapped to AXGroup.

Change-Id: I6353f4d25c18e6e550df289ca2e999ad1c01f2a8
Reviewed-on: https://gerrit.libreoffice.org/8682
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-03-21 11:30:11 +00:00
Stephan Bergmann
ad28ffaa37 Remove unnecessary vcl::SolarMutexObject
Change-Id: I6dfdd7d5d211b66019dfbe364101140e28a3584d
2014-03-20 18:10:51 +01:00
Stephan Bergmann
f52dcaa810 loplugin:passstringbyref
Change-Id: I3189ff08bd984b8f4fa127aeb40e8c13e5cc01c9
2014-03-19 21:53:43 +01:00
Joren De Cuyper
644dbbc9d0 Switch to -magnification instead of -deltaZ for mac osx pinch-to-zoom
Using pinch-to-zoom in LibreOffice result in following warning in terminal:
soffice[2376:507] -deltaZ is deprecated for NSEventTypeMagnify.  Please use -magnification.

Following https://groups.google.com/a/chromium.org/forum/#!topic/chromium-reviews/lMxCG03aZNs
-deltaZ is deprecated since OSX 10.6. Therefore use -magnification. The forum also
mentions the fact the steps are 500 times smaller. Lets use this factor 500 to keep the
behavior as consistent as possible

Change-Id: Ie769c518492e5b149a5301b19cae8d841047cb22
Reviewed-on: https://gerrit.libreoffice.org/8345
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-03-05 09:22:14 -06:00