Commit Graph

2738 Commits

Author SHA1 Message Date
David Tardon
582ef22d3e fdo#84854 it seems long is not enough on 32 bit
Fraction used BigInt internally for computations, rational does nothing
like that.

Change-Id: I3e9b25074f979bc291208f7c6362c3c40eb77ff5
2014-10-16 17:44:44 +02:00
Noel Grandin
af5ebbf783 create a macro library for implementing bit-flags types
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>,
changed from a macro- to a template-based solution.  (Unfortunately MSVC 2012
does not support explicit conversion operators.  Worked around that with
explicit #ifs rather than some HAVE_EXPLICIT_CONVERSION_OPERATORS and
SAL_EXPLICIT_CONVERSION_OPERATOR ainticipating we hopefully soon move to a
baseline that requires unconditional support for them.)

Change-Id: I4a89643b218d247e8e4a861faba458ec6dfe1396
2014-10-13 17:45:57 +02:00
Noel Grandin
cb7ede2d99 convert vcl StateChangedType to enum class
Change-Id: Ifa46523619ae7fb8d112525b8df594836e51bb8f
Reviewed-on: https://gerrit.libreoffice.org/11843
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-11 15:14:32 +00:00
Juan Picca
47a2d7642d fdo#81356: convert Fraction to boost::rational<long> - wip
* Added rational util functions used by Fraction class not
  available in the boost::rational class.
* Replaced usage of Fraction by boost::rational<long>
* Removed code that relies on:
  1. fraction.IsValid() -- rational only allow valid values, ie
     denominator() != 0
  2. rational.denominator() == 0 -- always false
  3. rational.denominator() < 0 -- always false but implementation
     detail: http://www.boost.org/doc/libs/release/libs/rational/rational.html#Internal%20representation
* Simplified code that relies on:
  1. rational.denominator() != 0 -- always true
* BUGS EXIST because Fraction allows the creation of invalid values but
  boost::rational throws the exception boost::bad_rational

Change-Id: I84970a4956afb3f91ac0c8f726547466319420f9
Reviewed-on: https://gerrit.libreoffice.org/11551
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-10-09 11:33:33 +00:00
Eike Rathke
04a810cee4 back out more wrong and confusing tools::Time comment changes
Apparently fc04f76336 used some sed script
to change all ...

Change-Id: Ie609bd02a2c5d70109fc6185cf4440480f29d8f5
2014-10-08 14:24:21 +02:00
Philipp Weissenbacher
0658889bcd fdo#39468 Make forms/ German comments clean
Change-Id: Iec24928324bec1caee65ca37cbf0fb5b66e6975e
Reviewed-on: https://gerrit.libreoffice.org/11760
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-02 11:38:29 +00:00
Noel Grandin
fc04f76336 fdo#82577: Handle Time
Put the TOOLS Time class in the tools namespace. Avoids clash with the X11
Time typedef.

Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866
Reviewed-on: https://gerrit.libreoffice.org/11684
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-01 07:34:23 +00:00
Stephan Bergmann
3b206d4818 forms: std::auto_ptr -> std::unique_ptr
Change-Id: Ia8f045715a508de77c8ce86cf224a3038162faac
2014-09-30 12:28:52 +02:00
Philipp Weissenbacher
0f8ed32913 fdo#39468 Translate German comments, clean some ws
Conflicts:
	forms/source/component/FormComponent.cxx
	forms/source/component/FormattedField.cxx

Change-Id: I76dacfff3aa6f5680a1e81c97281c4f744ec1ceb
Reviewed-on: https://gerrit.libreoffice.org/11622
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-09-25 08:49:03 +00:00
Tobias Madl
0e55cc95df fdo#39468 Translated German to English
Change-Id: I7405b8251b977f8e5c1b95c37fbab6ae6cb120e7
Reviewed-on: https://gerrit.libreoffice.org/11461
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2014-09-24 18:02:12 +00:00
Noel Grandin
827c46e7d7 fdo#82577: Handle Window
Put the VCL Window class in the vcl namespace. Avoids clash with the X11
Window typedef.

Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-09-23 14:11:39 +03:00
Philipp Weissenbacher
778dcbc53e fdo#39468 Translate German comments, clean some ws
Change-Id: I4a9b3b3e0d0fefb18808b0b045ffcf3531f4ea28
Reviewed-on: https://gerrit.libreoffice.org/11524
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-09-19 06:35:35 +00:00
Noel Grandin
60e78fbb80 fdo#82577: Handle Font
Put the VCL Font class in the vcl namespace. Avoids clash with the X11
Font typedef.

Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537
2014-09-18 08:54:37 +02:00
Stephan Bergmann
7cd65eef14 Simplify expression to fix bool/sal_Bool ambiguity
Change-Id: I249262779519934c3dacc9df76028a994187e3d6
2014-09-15 15:52:30 +02:00
Stephan Bergmann
f5e617a6e4 forms: sal_Bool -> bool
Change-Id: If69785c37c6c9cd175e149f10bd5497de26a120c
2014-09-15 15:06:45 +02:00
Stephan Bergmann
8270808946 Mark template member fns that are supposed to override as SAL_OVERRIDE
Change-Id: If940dcf7f7d2144576b4ae55578b8b7bd113295b
2014-09-15 14:58:57 +02:00
Jennifer Liebel
86aed3ca6a fdo#39468: Translated German to English
Change-Id: Ica935c641d3858ae875410efc7fe531835feadf8
Reviewed-on: https://gerrit.libreoffice.org/11373
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-09-12 12:09:24 +00:00
Stephan Bergmann
ea733ab5b6 Turn SfxItemState into a C++11 scoped enumeration
...to gain further confidence in the claim "that none of the existing
code tries to uses combinations of these enum values"
(d92602c5b1 "more fixes for SfxItemState")

Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13
Reviewed-on: https://gerrit.libreoffice.org/11384
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2014-09-12 06:08:32 +00:00
Stephan Bergmann
ce65d21ddb Replace uses of old SFX_ITEM_ON alias with SFX_ITEM_SET
Change-Id: I64be7ca711dcd3ea7c4d5840a30f2f701d055e1b
2014-09-10 16:37:20 +02:00
Michael Stahl
57a4337e25 set names on a bunch more threads...
Change-Id: I4c2f2f0bcce52839033876ec991529721e06a3c8
2014-08-25 13:21:59 +02:00
Stephan Bergmann
26e9e22268 Avoid incomplete type in fn sig to keep ubsan's RTTI-based checks happy
Change-Id: I79422149fd25b1531673a517e2a340dbeab43b1a
2014-08-25 13:03:08 +02:00
Stephan Bergmann
2d43261c60 Fix *_component_getFactory function type
Change-Id: I10414cbc61b5540f1b9f39b19699673868e9c3eb
2014-08-25 12:52:50 +02:00
Tor Lillqvist
30ae83c268 fdo#82577: Handle KeyCode
Put the VCL KeyCode class in the vcl namespace. Avoids clash with the X11
KeyCode typedef.

Change-Id: I624c9d937f7c5f5986d313b6c5f060bd8bb7e028
2014-08-23 22:33:30 +03:00
Marcos Paulo de Souza
f7a65a1096 Remove useless include tools/debug.hxx from forms and extensions
Change-Id: Idc8ecbb65c7c4c63950d8b249e0d0d91788d6d3b
Reviewed-on: https://gerrit.libreoffice.org/11012
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2014-08-21 07:09:21 -05:00
Thomas Arnhold
339d967dbf forms: CSS -> css
Change-Id: Ib2fb1f4f4b64a67cebdebb6ebfb36dbe6878bef6
2014-08-21 09:03:25 +02:00
Thomas Arnhold
150df3c020 star* -> css::*
Change-Id: I156d40badb1a11727d1320600a9d3af2b8b24e4a
2014-08-21 09:03:22 +02:00
Thomas Arnhold
892f4c2ad8 stario -> css::io
Change-Id: I4e82694399e72ce17172ac3d3c3cd9f9bcd30ba5
2014-08-21 09:03:17 +02:00
Thomas Arnhold
9d17726dcd staruno -> css::uno
Change-Id: Ic82bbe5797d4f3c16096598cd566b917ee335a10
2014-08-21 09:03:16 +02:00
Caolán McNamara
8ec047030f coverity#706541 Uncaught exception
and

coverity#706537 Uncaught exception

Change-Id: I403d83bb7aa4cf82edf1b6c608f9daac31576208
2014-07-26 15:39:28 +01:00
Noel Grandin
dac4ca5f68 new loplugin: externalandnotdefined
Find "missing headers," where a function is declared directly in the
.cxx (as extern) and not defined, and should arguably instead be declared
in an include file.

Change-Id: I6d83ee432b2ab0cd050aec2b27c3658d32ac02a2
2014-07-11 14:12:25 +02:00
Noel Grandin
df906cf2ac use SimpleReferenceObject in forms module
to replace hand-rolled version

Change-Id: Ic95f4dfd1ae5ab414c68c52ad58c738f4ac1d9d1
2014-07-10 11:04:11 +02:00
Caolán McNamara
4228f08d60 use assert when followed by deref
Change-Id: I8405e4d8f9fa1de3ef6ee474321b4ac2b4ce1624
2014-07-03 12:49:38 +01:00
Stephan Bergmann
e50ef195bc New loplugin:stringconcat
Change-Id: Id7c517fb37bc28797c45fc0dde83e866f2aa4aac
2014-07-01 15:45:52 +02:00
Julien Nabet
430484932e Typo: beeing->being
Change-Id: I34937e400ac8576154d33e1e11b80690222f532c
2014-06-29 13:15:51 +02:00
Noel Grandin
533c6cb6ba fixes for up-casting to Reference<XInterface>
Fix regressions introduced with
6a043e9c0a "Use the new type-checking
Reference constructor to reduce code noise"

Change-Id: I85662856f21c810a7db497fe3b0e116f075b1687
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-06-25 17:10:43 +02:00
Michael Stahl
0de1e3a015 remove spurious com::sun::chaos
Apparently some time before inital CVS import a global
search-and-replace went horribly wrong and added spurious namespace
prefixes everywhere.

Change-Id: I4009bc3ab4b1d4c80412f75ad0e4628a382f99f0
2014-06-25 15:04:46 +02:00
Caolán McNamara
4a67abb3b2 coverity#706547 Uncaught exception
Change-Id: Ib619e1ab3f091c04ec27a249b733e54ce469cf82
2014-06-24 14:28:27 +01:00
Stephan Bergmann
9489afdba6 rtl::Reference fits just fine here
Change-Id: Icb1ba7f7068f60c4bd5eda7002415214b3d885f3
2014-06-17 15:51:52 +02:00
Noel Grandin
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
Stephan Bergmann
86c89322ea loplugin:staticcall
Change-Id: I3c43c34e66772ce7e42b42be04e0591f2e78ec01
2014-06-13 17:54:27 +02:00
Noel Grandin
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
Noel Grandin
79df6cf588 forms: remove SAL_THROW macro
Change-Id: I532f29e240cf29c5e65c919c4bcaccd86c510ce9
2014-06-05 08:17:50 +02:00
Thomas Arnhold
28ac97dce1 forms: expand DECLARE_XCLONEABLE
Change-Id: I2a468e40489797e33935b79a27459ab408558124
2014-06-04 08:30:25 +02:00
Thomas Arnhold
2091d5a4d3 forms: expand DECLARE_DEFAULT_DTOR
Change-Id: I52b091402ec23f9c5eb87ae2212cc5b4986c6435
2014-06-04 08:30:24 +02:00
Jens Carl
ee0714cb95 Fixed lower case typo in header guard definition
Change-Id: Ib4f09892850bfcb72ddec0b0a924746495c5551f
Reviewed-on: https://gerrit.libreoffice.org/9579
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-06-01 16:06:36 +00:00
Jens Carl
bcd5da6cb3 fdo#68849: Add header guards to all include files
Added header guard to files in directories forms/ and fpicker/

Change-Id: I5a3a2b1f2aa81d048959cb3223e03ac985539f33
Reviewed-on: https://gerrit.libreoffice.org/9557
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-30 01:44:33 -05:00
Noel Grandin
ebc0a15515 remove more unnecesary OUString constructor use
when throwing exceptions

Change-Id: I6edfb6b6745499f802b0e3c0e096a36fb7c32aac
2014-05-29 09:01:40 +02:00
Noel Grandin
9af0abebfd remove unnecessary use of Reference constructor in throw
Convert code like this:
  throw IOException("xx",
     Reference< XInterface >(static_cast<OWeakObject*>(this)) );
to this:
  throw IOException("xx",
     static_cast<OWeakObject*>(this) );

Change-Id: Ife9f645f0f1810a8e80219126193015502c43dbb
2014-05-27 08:20:11 +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
Chris Laplante
04f31d13c5 Remove ASCII art, useless comments and whitespace from forms module
Change-Id: Ib6157a493092a137a6b0bf5b96d0e760d307f9da
Reviewed-on: https://gerrit.libreoffice.org/9472
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-05-25 14:35:17 -05:00