Commit Graph

1873 Commits

Author SHA1 Message Date
32ce5ae15a Avoid possible memory leaks in case of exceptions
Change-Id: Icc073be041ae0b0c690e869a0edaff3515d1d601
2014-08-25 10:27:10 +09:00
3d34eb4612 Resolves: fdo#82747 Crash on opening wikipedia ODT Book
Test if there's indeed a subnode before testing its type

Change-Id: I1bb32652ceb82b0818a8d2cd8d71b46dd96ef2aa
Reviewed-on: https://gerrit.libreoffice.org/11050
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-08-22 23:21:03 -05: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
58e6fbe1a8 remove unused WarningBoxes
Change-Id: I07c457a49646703af5d13f83ba033340309ee655
2014-08-18 05:23:52 +02:00
24c35276a9 warning C4242: '=' : conversion from 'size_t' to 'sal_uInt16'
Change-Id: I892a0418125e9c660577d6acccf78e82c2b7f56c
2014-08-13 10:10:37 +02:00
20c0aaf75f -Werror,-Wundefined-bool-conversion
Change-Id: I44327db80a923c2ee8e762b3ba5f5de771b8610e
2014-08-12 12:19:42 +02:00
987d933c58 remove now unused tabpage.hrc
as TP_WIDTH and TP_HEIGHT are unused now

Change-Id: I06ec7af8c2b3386d76e36284eb56ea1ab6b9ec5d
2014-08-09 18:12:06 +02:00
551f76f410 Drop unnecessary SfxApplication::CreateResManager wrapper
Change-Id: I2b8662ec85b8f710aa17a2c6f59c4b35af7685f3
2014-07-29 14:27:43 +02:00
20f6cf0377 Massive 'Dialogdiet fail' and similar to 'Dialog creation failed'
Change-Id: I6ca6914e80c186699df42253de46a3690c5130f2
2014-07-26 14:25:33 +02:00
88a874fcb3 convert SfxItemState constants to a proper enum
and while we're at it
- use the enum type all over the place instead of passing around
sal_uInt16
- don't use bitwise logic on enum values
- use enum values instead of numeric constants

Change-Id: I7f24cb4d242e1c00703e7bbcf1a00c18ef1e9fd4
2014-07-23 13:26:19 +02:00
cd3d26b7ed vcl consitent use of long for corrdinate
most of length in vcl are calculated in 'long'
but array of X position tend to be in sal_Int32.
As a prep work to be able to support 'double'
as the base type of Device Coordinate, harmonize
the use of 'long' for non-float coordinate.

Change-Id: I7cb33301ff6a5e2c62247b36a4e07e168a58a323
2014-07-20 22:10:59 +02: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
4228f08d60 use assert when followed by deref
Change-Id: I8405e4d8f9fa1de3ef6ee474321b4ac2b4ce1624
2014-07-03 12:49:38 +01:00
4d22b8f7b4 coverity#1038321 Unintended sign extension
and

coverity#1038320 Unintended sign extension
coverity#1038319 Unintended sign extension
coverity#1038318 Unintended sign extension
coverity#1038317 Unintended sign extension
coverity#1038316 Unintended sign extension
coverity#1038315 Unintended sign extension
coverity#1038314 Unintended sign extension

Change-Id: Ib8015baf8ffec48e1b2d6ce1e7ce284fb36303b0
2014-07-01 16:43:07 +01:00
d92aa2f445 remove SFX_APP() macro that was a mer wrapper for SfxGetApp()
Change-Id: I480a789c767dd671775c9d70d96bf71908f21f5b
2014-06-27 17:08:04 +02:00
e2080e70fe new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
   class A {
     struct X x;
     public X* getX() { return &x; }
   }
which can be:
     public X& getX() { return x; }

Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
2014-06-24 11:34:21 +02:00
077121eb0d fdo#79973 : LO crashes while opening the document.
Description:
- If the equation ends with two dots(.) then file get crash.
- In SmParser::NextToken()
  the file get crash because string index is out of bound.

Change-Id: I5f25814220d556d53c10d4ca33a38b4d0d451438
Reviewed-on: https://gerrit.libreoffice.org/9840
Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com>
Tested-by: Muthu Subramanian K <muthusuba@gmail.com>
2014-06-20 14:38:14 +00:00
1d38cb3655 fdo#71076, fdo#71767: Preserve number formats when charts are copied.
Change-Id: If5ae8852152012483237e7602e56a0c46ea8748a
2014-06-19 14:46:56 -04:00
bf89444ca8 coverity#707196 Uncaught exception
Change-Id: I4f42040c7e12507365f12d09f80d3641b4d5ca02
2014-06-19 10:26:51 +01:00
d3a5b4e86f coverity#706063 Unintended sign extension
Change-Id: Idaec46756ef22bcec1335c219fdc3ebf64c43fc3
2014-06-19 10:26:48 +01:00
3631f5b3ba coverity#706062 Unintended sign extension
Change-Id: I96e3054de033c550a54c8393c82d0efbe6f2e08d
2014-06-19 10:26:47 +01:00
6d0f3a8479 loplugin:staticcall
Change-Id: I7639df64242e5b30f9857363b3be33d61bf28594
2014-06-13 17:54:32 +02:00
bb761be472 Change SfxTabPage ctor SfxItemSet param from ref to pointer
...and also corresponding param of CreateTabPage function type and corresponding
Craete functions.  There were some call sites that passed undefined "null
pointer references" and SfxTabPage internally uses a pointer member pSet that is
checked for null anyway.

Change-Id: I4eb3636155eac46c9c9d26e6e6e842e85d7e95af
2014-06-11 14:39:04 +02:00
a92e973b6d Change SfxTabPage::Reset param from ref to pointer
...there was a call site that passed undefined "null pointer reference"
(apparently in a case where the passed argument was actually unused)

Change-Id: I663d4264b7a84f44ca69c732f3bc502f614b2b2a
2014-06-11 10:39:03 +02:00
4dbeadb9c1 Change SfxTabPage::FillItemSet param from ref to pointer
...there were a number of call sites that passed undefined "null pointer
references" (apparently in cases where the passed argument was actually unused)

Change-Id: I19799e90f0cd8e98367782441a5ea9df27b59830
2014-06-10 17:25:23 +02:00
c50c800f9c coverity#708822 Unused pointer value
Change-Id: I6ccd4c2ab97237806652059d6ae2cd23a6dc1625
2014-06-06 14:11:12 +01:00
f634cda2a2 avoid problems with poppler's and vcl's FontInfo during runtime
Change-Id: I1dbd256812cccae1e6ed0ad8bb34ce427e5e5be8
2014-06-04 07:49:15 +02:00
861e3a23b9 coverity#705239 Missing break in switch
Change-Id: Ic11f6640b6c60feed06ee988796823aaada76739
2014-05-30 14:19:09 +01:00
3a45897d30 starmath: remove hard-coded value
Change-Id: I58dad585c5de24ebd06ce9bcc64e49e8973850bb
2014-05-28 14:40:57 +02:00
b521c754cb Related fdo#71616: Fix scrolling
Change-Id: I9c57de1179d7db19f1fa2b104017dd379f854749
2014-05-28 14:40:57 +02:00
77594e0a23 starmath: directly create utf8 OUString
This fixes:

warn:rtl.string:14867:1:sal/rtl/strtmpl.cxx:1269: rtl_uString_newFromLiteral - Found char > 127

Change-Id: I1f868406501c83918fc3c06dd0b68eb1f6604f26
2014-05-28 14:40:56 +02:00
61328e692c starmath: no need to set those on every paint event
Change-Id: Ife149baf15d6f38a2a316e124b78bdb7e1b64967
2014-05-28 14:40:56 +02:00
1483a478ad Related fdo#71616: Set correct BaseSize
BaseSize has to be set in 100th mm, otherwise the scalable
brackets are far too thin.

See starmath/source/cfgitem.cxx:

pFormat->SetBaseSize( Size(0, SmPtsTo100th_mm( nTmp16 )) );

nTmp16 is 12pt -> 422 100th mm (at least for me). Let's reuse that.

Change-Id: I69571ae002f790199ab423955b1635eda42096eb
2014-05-28 09:46:35 +02:00
d7c8b4adb3 Resolves: fdo#71616 Elements dock: Better display of scalable braces
Change-Id: I2255be738aa2230b4102030891026f1f9ad2c38f
2014-05-28 09:46:35 +02:00
a630c368f7 Resolves: fdo#65583 Elements Dock window needs scroll bar
Based on the patch on Bugzilla by
Marcos Paulo de Souza <marcos.souza.org@gmail.com>

Change-Id: I215b83894f228b1cc8908f98858b85c8d5378ddb
2014-05-28 01:38:15 +02:00
22f4843900 starmath: directly use white color
Change-Id: I3b0e4ecd5def28c6b9f4639b8df16a2a0ea0008c
2014-05-28 01:38:14 +02:00
501e5b98ad Resolves: fdo#77831 use classic token rules for user-defined char (%foo)
Change-Id: Iebae064986ad722d445c8d654e39e338e104f021
2014-05-27 11:27:41 +01:00
9fb54d62b1 cid#707198 Uncaught exception
Change-Id: Ibfe57b366207550b0f3c0e9cb7e8da1078531742
2014-05-27 10:50:03 +02:00
2d5d98e12d cid#707199 Uncaught exception
Change-Id: I4ff6cdf0f7d48318a948865784c66f992fe52e3d
2014-05-27 10:50:03 +02:00
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
014ba79eeb coverity#736052 Missing break in switch
Change-Id: I9e067659dea49683ceda9553b3d35254576079db
2014-05-26 10:18:26 +01:00
ac76cc7e60 Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part20
Change-Id: If87cdfb2c605254f6d69baa4ca5aec09091caa68
2014-05-23 22:11:52 +02:00
d58fc49073 WaE: -Wunused-variable
Change-Id: Ic39102eaa8f0f5f6ea58173103ca8c5dc5c55185
2014-05-20 01:49:55 +02:00
3db8d606d5 hrc and src files: squeeze multiple newlines
for i in `find . -name *.src -or -name *.hrc`; do FILE=$(cat -s "$i"); echo "$FILE" > "$i"; done

Change-Id: I2bac5ad3e1eb3c566e5c867ccf45893a19e1561e
2014-05-19 20:04:22 +02:00
c288b17cc5 Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part12
Change-Id: I7c514b7a1d86f52d77672b826b1f08b825fd7aa7
2014-05-14 23:18:57 +02:00
f52f42c15a starmath: remove SAL_INFO's that only mark function entry
Change-Id: Iae6dbc367f1ff9cbeb5329bd9b96489b2d4252ec
2014-05-14 16:54:25 +02:00
ed75dbb1ca coverity#736100 Improper use of negative value
Change-Id: Ia5cf36b64841f2d465c922da40008a540cc6caf7
2014-05-11 21:05:55 +01:00
70ba0a8d4e coverity#736101 Improper use of negative value
Change-Id: I6fec141e19de921128365da7cbd17e0a0bc0b9a9
2014-05-11 21:05:55 +01:00
08fad277a0 coverity#736102 Improper use of negative value
Change-Id: I3f915ff949fa00357599e8cfc59c01c6eb04e9fd
2014-05-11 21:05:54 +01:00
5ec7a589be Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part8
Change-Id: Ie16923d17541e84e0d7424fffe37caf410786abf
2014-05-10 06:19:42 +02:00