Commit Graph

675 Commits

Author SHA1 Message Date
2deb0a2651 coverity#704564 Unchecked dynamic_cast
Change-Id: I2dfdc5e1e852011b532b484e566896133208ee86
2014-10-24 09:24:53 +01:00
31af61ea09 Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"
This reverts commit 47a2d7642d249d70b5da0c330a73f3a0032e4bba.

Conflicts:

	cui/source/tabpages/transfrm.cxx
	svx/source/svdraw/svdedtv1.cxx
	svx/source/svdraw/svdibrow.cxx
	sw/source/filter/ww1/w1filter.cxx
	tools/source/generic/rational.cxx

Change-Id: I4849916f5f277a4afef0e279b0135c76b36b9d15
2014-10-23 18:34:39 +02:00
858c2a2977 Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"
This reverts commit 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e.

Conflicts:

	svx/source/svdraw/svdedtv1.cxx
	svx/source/svdraw/svdibrow.cxx
	sw/source/filter/ww1/w1filter.cxx

Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
2014-10-23 18:34:34 +02:00
cb414252b8 loplugin: cstylecast
Change-Id: I4aafc170895d8bab47206c7b07b4f1f6105d42d3
2014-10-23 12:36:14 +02:00
67c9d05451 fdo#84938: replace TIB_ constants with enum
Change-Id: I435ce2331fb49e7ce9fe97bdfddfaef706759a84
Reviewed-on: https://gerrit.libreoffice.org/12023
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-20 07:16:46 +00:00
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
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
2fc308b941 coverity#703928 Unchecked return value
Change-Id: I26ba62448796f1d80d2b4bbaf2499d08058c3add
2014-10-04 21:45:14 -05:00
be31d107f5 chart2: std::auto_ptr -> std::unique_ptr
Change-Id: Ia92c18858c8ed7cfc2765cc2310f3bf7bfd7e8df
2014-09-30 10:33:24 +02:00
8dbde0845a fdo#82577: Handle Region
Put the VCL Region class in the vcl namespace. Avoids clash with the X11
Region typedef.

Change-Id: I6e008111df7cf37121fbc3eaabd44a8306338291
2014-09-30 09:58:23 +02:00
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
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
aa32583329 3D charts: Update the 3D charts when a value changes.
Change-Id: I9c4052108446959ff6f5215d704b496e7a8e6aee
2014-09-12 13:03:52 +02:00
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"
(d92602c5b13d0a60439d86c5a033d124178726ca "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
1f0a1a308b CHART_DUMMY_FACTORY should not control the OpenGL window
Change-Id: Ic6c640f7d37606b357672f2b73f95d51d1daba67
2014-08-29 17:40:32 +02:00
8e37097d52 Update chart when chart type is changed in edit mode
Regression to master.
In long term it would be better to define ChartWindow as an
OpenGL window and not creating a new window inside the chart
window, becasue otherwise all events which was handled well
by the chart window will be broken (catched by the OpenGL
window so no effect on ChartWindow (defining the behavior of
charts in general) or catched by the ChartWindow and so no
effect on the OpenGLWindow (like invalidating in this case).

Change-Id: I234f469f70914e01f030c8edae9cb5aacea112bf
2014-08-29 17:40:32 +02:00
2414270c39 Don't create an OpenGL window in case of normal charts.
Change-Id: Idb4506712d3902c12aa881a85ddf69a281edff82
2014-08-29 17:40:31 +02:00
7daba09d02 Fix OpenGL chart reinitialiation
Problem after ChartWindow was disabled and enabled
again, OpenGL content was lost.

Two things:
-After setting a new OpenGLWindow the corresponding
IRenderer must be set (x3DWindowProvider->update)
-InitOpenGL() call should not depend on DummyChart, but on
OpenGLWindow (OpenGLContext).

Change-Id: If74e1945de9973d3921ceea1ca6fef39311add7a
2014-08-29 17:40:26 +02:00
43d23a24fd opengl charts: Move the init from sc to chart2, to have the right parent.
Conflicts:
	chart2/source/view/charttypes/GL3DBarChart.cxx

Change-Id: I1e23329345e00e7d8e1f269c832e84d015824c0a
2014-08-29 17:40:25 +02:00
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
82cb89fa05 Avoid possible memory leaks in case of exceptions
Change-Id: I41392572692bc219ae18ad89d95fc8be47d6812c
2014-08-19 23:35:41 +09:00
151fbebf8c Consistency around SdrOnOffItem in svx/sdtagitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."

Change-Id: I6d8b3709d6d55bd6958d38f262141c43779dfdcc
2014-08-04 19:22:55 +02:00
f1531cdaae bnc#885825: Support borders around data labels.
Change-Id: Ib141413e523cbf73746876f727e9f80dda9f5f7c
2014-07-26 16:26:08 -04:00
cc827ab81d Revert "opengl charts: Move the init from sc to chart2 ...
This reverts commit 46cea34638b371570073c0e86f79969753c543ed.

Conflicts:
	chart2/source/view/charttypes/GL3DBarChart.cxx

Change-Id: Ia29ea6a95b8b9eb870d14538d0cadaa40472582f
2014-07-23 22:19:58 +02:00
c02e393c7d Revert "Fix OpenGL chart reinitializing"
This reverts commit cbc50c90ad63f0e59b8cf3bbfb6b5b1f61db09b9.
2014-07-23 22:19:27 +02:00
f413cb08b8 printf crept in.
Change-Id: I18303af0a2898610566233b814e317cd2fe9f6d0
2014-07-22 00:18:40 -04:00
a630bfb5a0 Perhaps it's time we put ItemConverter etc into the right namespace.
Change-Id: I8082c51ff82568b8a00f92e5ab20263c017f1265
2014-07-21 23:54:44 -04:00
06830a9abc LongAndWordyVariableNameReallyGetsToMyNerveReallyAndEvenMisspelled.
Change-Id: Ifc6f876ca9e2ca77b2ab336ea0668697f32d4066
2014-07-21 23:21:27 -04:00
a1d6f1dfd5 scoped_ptr will do just fine here.
Change-Id: I35701126963047f3e405a6560a90930de99ed3fa
2014-07-21 23:21:19 -04:00
998ab5c405 More on removing (unreasonable) use of std::auto_ptr.
Change-Id: I98f5fb22eecb7749e4c86e1ce52965b0c73641ca
2014-07-21 23:12:34 -04:00
9e970303dd Remove auto_ptr from CharacterPropertyItemConverter.
And adjust all that's necessary.

Change-Id: I121e5aa4d117da2e5e6b11e4fd85960a8b3aa727
2014-07-21 20:31:24 -04:00
b2ffa40c12 Compiler macro in lieu of literal "Label" to make it easier to track it.
Change-Id: I6bc694fcc8f97b308747c097c4fa977d20524377
2014-07-21 20:31:24 -04:00
cbc50c90ad Fix OpenGL chart reinitializing
Problem after ChartWindow was disabled and enabled
again, OpenGL content was lost.

Two things:
-After setting a new OpenGLWindow the corresponding
IRenderer must be set (x3DWindowProvider->update)
-InitOpenGL() call should not depend on DummyChart, but on
OpenGLWindow (OpenGLContext).

Change-Id: If74e1945de9973d3921ceea1ca6fef39311add7a
2014-07-20 09:54:06 +02:00
46cea34638 opengl charts: Move the init from sc to chart2, to have the right parent.
Change-Id: I1e23329345e00e7d8e1f269c832e84d015824c0a
2014-07-20 09:54:05 +02:00
22906fd347 add parenthese to fix precedence issue
Change-Id: Ifb4c750f4ddedd27593acde4e93331e74e9d37c4
2014-07-04 21:21:34 +02:00
b89311b971 coverity#735602-3 Division by zero
Change-Id: I2da9857e4d526b60b3bf50e10ab180c493fb288f
2014-07-04 20:11:46 +02:00
3575dba98d remove whitespaces
Change-Id: I05ef3c1ffd4e2179e0142a21abf8a4578718102e
2014-07-02 23:03:07 +02:00
8918dabbee coverity#705359 Mixing enum types
and

coverity#705361 Mixing enum types
coverity#705362 Mixing enum types

Change-Id: I557d7178277e5d497e3bbab12b75724c05653f57
2014-07-02 14:00:41 +01:00
483a4b546c Flush modified data to the model when pressing OK in the data table dialog.
This dialog used to have no OK / Cancel buttons, and the data would get
flushed when the dialog got dismissed.  This behavior got lost during the
dialog conversion.

Also, SaveModified() does check whether or not the data table is modified.
No need to call IsModified() before calling SaveModified().

Change-Id: I5cea88cb52127cc5c7c1be67a5a592d87df92d0c
2014-06-27 11:35:11 -04:00
c6da184295 Track all uses of ErrorBarX and ErrorBarY UNO property names.
Change-Id: I994424c98d977c3a8f9138cccc17348de813a9d7
2014-06-26 19:36:46 -04:00
fb06300b73 fix windows build
Change-Id: I0de216a8c6259ba6ec825f85f52e2f48b97510d7
2014-06-21 04:46:14 +02:00
00272efc1c I don't see a good reason for marking private methods with SAL_CALL
Change-Id: I9b73b6b6073b3249317f4e1124d840930cbe558f
2014-06-21 04:21:41 +02:00
374160d659 volatile does not make any sense here
Change-Id: I337d845e05007efb29f1c1fa39cdcc046b156281
2014-06-21 04:21:41 +02:00
7fd1fd1dea remove unneeded code for 3D charts in controller
Change-Id: I5c1f624cc05a90878f717abc8ffb0b2220ce94d5
2014-06-21 04:21:41 +02:00
1d38cb3655 fdo#71076, fdo#71767: Preserve number formats when charts are copied.
Change-Id: If5ae8852152012483237e7602e56a0c46ea8748a
2014-06-19 14:46:56 -04:00
b67f325a26 rtl::Reference fits just fine here
Change-Id: I65499ac299fb474e581245c5237a0b184f1f2b60
2014-06-18 11:26:33 +02:00
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
ad82e0d25e loplugin:staticcall
Change-Id: I3f3adebc0916c96b50e15c68b627e655166e2551
2014-06-13 17:54:23 +02:00
ef68800d96 coverity#1158100 Unchecked dynamic_cast
Change-Id: I3040703b7182d186ac9e27c33295e929b8dc9ffe
2014-06-10 16:08:08 +01:00
0ededb3430 coverity#1158114 Unchecked dynamic_cast
Change-Id: I779e1cae1039886b2d43a025930cc50d7aaac95a
2014-06-10 16:08:08 +01:00