Commit Graph

4125 Commits

Author SHA1 Message Date
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
f9aa686432 Resolves: fdo#81496 crash in calc format page
Change-Id: Ic70f6f605e13a5c95b504f1bf0322e11313a21e7
2014-10-16 09:09:46 +01:00
91502a72c1 fdo#83141: also optimize ScTable::HasAttribSelection
applying same strategy than 1e721077b43de84edab2a3ed2f316ddcbec6e3ec

Change-Id: I8c226d5d66ba8371ea1baec73e72b3e50886bb4f
Reviewed-on: https://gerrit.libreoffice.org/11877
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-10-15 19:33:53 +00:00
da77897d19 nDrehWink -> nRotationAngle
Change-Id: I33ca88f38210140931b12a05e426d1373243156e
2014-10-15 09:01:16 +02:00
268d5a7e3c speed up range list generation from multi marks, fdo#75486 related
Change-Id: Id2114652948d12c92b0e7be7afa304bfffc8fbe0
2014-10-15 02:20:09 +02:00
0b29a16d1d fdo#83901: ROW() and COLUMN() to be properly recalculated on cell move.
For cases where ROW or COLUMN references another cell that has shifted.

Change-Id: Ic4bef8672dab811ceff6886d9af0388306a66485
2014-10-12 10:21:00 -04:00
8044acf2db convert SFX_CALLMODE constants to SfxCallMode enum class
and fix a couple of bugs in SC and SW where the call mode was
being passed to the hints parameter by accident

Change-Id: Ief805410b3f7035e012e229e77f92d5832430f58
Reviewed-on: https://gerrit.libreoffice.org/11916
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-11 15:14:52 +00:00
4307473975 remove warning: ‘nIndex’ may be used uninitialized
Change-Id: I317c2f4409f556ab967e4f08caa99cffcfce26cc
Reviewed-on: https://gerrit.libreoffice.org/11876
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2014-10-09 12:31:10 +00:00
2b6619c597 fdo#84810 Avoid calc crash when using Paste Special - Link
Change-Id: I52c072578ccc0b9f75a850613056e74d400eb532
Reviewed-on: https://gerrit.libreoffice.org/11867
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2014-10-09 11:38:12 +00: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
1e721077b4 fdo#83141: optimize slow performance after when using replaceall or searchall
- problem was hang after replaceall or searchall function
- fix slow performance by looping only selected cols.

Change-Id: Ic0178af33bf381e52584bd4366bff9e128891b64
Reviewed-on: https://gerrit.libreoffice.org/11829
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Matthew Francis <mjay.francis@gmail.com>
Tested-by: Matthew Francis <mjay.francis@gmail.com>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-10-08 15:56:24 +00:00
0c57f31a8b convert ParamType enum in SC to enum class
mostly to get the NONE constant out of the global namespace, so I can
convert other enums which also want to use the NONE constant

Change-Id: I988d5d7e5316dd5e4ca0be0cc8f043f69bbb900c
Reviewed-on: https://gerrit.libreoffice.org/11848
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-08 09:35:18 +00:00
8f436d3de7 use comphelper::rng::uniform_*_distribution everywhere
and automatically seed from time on first use

coverity#1242393 Don't call rand
coverity#1242404 Don't call rand
coverity#1242410 Don't call rand and additionally allow 0xFF as a value
coverity#1242409 Don't call rand
coverity#1242399 Don't call rand
coverity#1242372 Don't call rand
coverity#1242377 Don't call rand
coverity#1242378 Don't call rand
coverity#1242379 Don't call rand
coverity#1242382 Don't call rand
coverity#1242383 Don't call rand
coverity#1242402 Don't call rand
coverity#1242397 Don't call rand
coverity#1242390 Don't call rand
coverity#1242389 Don't call rand
coverity#1242388 Don't call rand
coverity#1242386 Don't call rand
coverity#1242384 Don't call rand
coverity#1242394 Don't call rand

Change-Id: I241feab9cb370e091fd6ccaba2af941eb95bc7cf
2014-10-06 14:13:27 +01:00
f3fae7d3c6 Add menu entry for the "formula to value" feature.
Not sure 100% if that's the best place for this.  Feel free to move it
to a better place.

Change-Id: Id66a92e1184e988bd71f7d845ea370b021c02c21
2014-10-04 13:19:40 -04:00
d6c842e0e9 WaE: private fields 'mnTab' and 'mnCol' are not used
Change-Id: I449b85b00aeaf690644e17be0a6b2b9398a3cd3f
2014-10-03 11:35:38 +03:00
dd617c0bbe New feature to allow converting formula cells to static values.
You used to have to convert formula cells to static values by copying
them and pasting them as values onto the original place.  Why not just
allow converting them in place?

This is something I've always wanted to implement.
2014-10-02 21:32:24 -04:00
a23801b740 Scope reduction by early bail-out.
Change-Id: Iacbf9f46a1b5683b6de5dd93002a69078af46951
2014-10-02 15:35:10 -04:00
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
89c72084b2 sc: std::auto_ptr -> std::unique_ptr
Change-Id: I25468d578de597ff9aeba3ffc850c630fa532767
2014-09-30 17:51:30 +02:00
423142538e add a RAII class that tries to acquire the SolarMutex and releases it
Motivated by ScCompiler::IsMacro() which has an error return that does
not release the SolarMutex.

Change-Id: I064219bb3c0d68839a133101491d5f8828a26c7a
2014-09-26 23:24:32 +02:00
dedfa972bc remove unnecessary casts in calls to SvStream.WriteInt16
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: Ie44bec6b988f3e46fe78d14b740818c9141f5df0
2014-09-26 15:26:48 +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
0ef6263ed2 fdo#83764: Ensure that the row position is below MAXROW.
When attempting to split formula groups, else multi_type_vector would
try to locate a block outside its logical range.

Change-Id: I424ede112138de459b5ba3bff5e021c4407ccf3d
2014-09-18 13:38:28 -04: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
40825c4369 Typo: excatly->exactly
Change-Id: Ica1e1399bc4a9b9ca61d09cf26e8c47e2368f644
2014-09-17 20:15:27 +02:00
902564bfe5 bnc#592918: Display data description in pivot table.
When there are no column fields and exactly one data field.

Change-Id: I10d2af7e626f98a4d8a981e078e99e7da9207d1c
2014-09-17 11:29:39 -04:00
2d9cdbd9d9 Another Windows build fix - too much C++11 for MSVC 2012...
Change-Id: I2ae08bd7b850e26bd58d8cb9fad830edb0395259
2014-09-17 12:39:46 +02:00
10fee3d3bc SFX_ITEM_SET to SfxItemState::SET
Change-Id: I95dc8872d702cbe63d5fdab10a9ddd0e86d49e06
2014-09-17 10:19:59 +02:00
d5109b2fcf Make it easier to add new color attributes to GetDocColors
Change-Id: I2098892fc44c7a8bde1eb30f6db1709e58925577
2014-09-17 10:19:51 +02:00
9b37819adb Add loading document colors to Calc
Change-Id: I06783b04dbbad2aa690820af1ca2cf05a1004f20
2014-09-17 10:19:31 +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
ce65d21ddb Replace uses of old SFX_ITEM_ON alias with SFX_ITEM_SET
Change-Id: I64be7ca711dcd3ea7c4d5840a30f2f701d055e1b
2014-09-10 16:37:20 +02:00
abbeed7560 callcatcher: update unused code
Change-Id: Ie31c16318b09699e080484292d489a378e3a6dce
2014-09-10 12:46:49 +01:00
a30d5cd973 coverity#708008 Uninitialized scalar field
Change-Id: I425b1d822d98cbc28a1d99b41379b0dc5d8e6193
2014-09-08 09:17:05 +01:00
481cd6368b Related #82088: removed last css aliases in hxx
* Only unfixed header namespace alias in
  ConnectionLog.hxx:
  LogLevel = ::com::sun::logging::LogLevel

Change-Id: I48c941a4762830f2265c8241f4c1695a43ec891a
Reviewed-on: https://gerrit.libreoffice.org/11333
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-09-08 03:02:57 -05:00
4fc788312b fix copy&paste of conditional format between sheets
Change-Id: I8856bff376f0f6e366062eddbc68a9eee098be5b
2014-09-07 19:36:07 +02:00
88ba4a1162 prevent duplicated conditional formatting during copying of sheeets
Change-Id: I866c0c4c05830af0070767aec36375a846a2bf84
2014-09-07 19:36:07 +02:00
5bce329040 SfxHint: convert home-grown RTTI to normal C++ RTTI
Also note that I fixed a bug in SvxFontMenuControl::Notify
where the if statement had the check the wrong way around.

Change-Id: I611e8929c65818191e36bd80f2b985820ada4411
Reviewed-on: https://gerrit.libreoffice.org/11147
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-09-06 15:47:44 -05:00
3deacd971b How the hell did this survive 14 years? Kill it!
No need for a ugly static variable that just causes pain.

Change-Id: I751f58a5dcfdeaa7bfd61f32ccbc13eaaf827632
2014-09-06 15:44:58 +02:00
8e4dc1d760 create type-safe bitfield for sc insert/delete flags
The most important part of the change is in sc/inc/global.hxx

It creates a type-safe struct that prevents the accidental interaction
between regular integer types and the flags struct.
It also provides utility methods that make combining and testing the
flags type-safe.

Change-Id: Ibc5b20058b1655df913490682b679afd1297b36d
Reviewed-on: https://gerrit.libreoffice.org/11071
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2014-09-04 09:05:34 -05:00
8c18ffbf9b fdo#81633: Add a new configuration option to toggle ref update on sort.
The new option is in Calc -> General and is labeled

"Update references when sorting range of cells"

Change-Id: I5ac686e96742df40f7d8ba5ffec23806db2988a6
2014-09-03 21:10:10 +02:00
d59e728be6 Remove (misleading) EditEngine::QuickRemoveCharAttribs
Change-Id: I7a0be4e204a239dfdd9c184b3d54a69debe8a208
2014-09-03 21:05:19 +02:00
76ef9ecdb9 -Wmaybe-uninitialized in ScTable::CopyColFiltered
apply same initialization as in ScTable::CopyRowFiltered

Change-Id: I9e8de6eaae3b3ad9453e5c06a88cfa93766becd9
Reviewed-on: https://gerrit.libreoffice.org/11263
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2014-09-03 02:55:02 -05:00
341b436917 fdo#39468 Translate German comments in sc/source/core/data/validat.cxx
Change-Id: I38cbd03c8e0bbcc780b48b08b6129f710102783b
Reviewed-on: https://gerrit.libreoffice.org/11247
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-09-03 02:09:26 -05:00
2be9ae7218 check for empty slots' valid NULL pointer, fdo#79441
Change-Id: Ie81b8b00c1ab8776086bddeb7464bb7809914bf8
2014-09-02 18:27:38 +02:00
f5aeaa3845 bnc#822173: Initial work on exporting pivot cache and pivot table to xlsx.
Still not perfect, but it somewhat does work.

Change-Id: Ic248e20f7ab18a37f56b2034f57551dded956bab
2014-08-28 21:37:08 -04:00
902e3898d3 Make some methods non-inline, and add method descriptions.
Change-Id: Ib8d5fa666827a7f97035ad37d05e305bb920c300
2014-08-28 21:37:00 -04:00
b77bf9759a assert on first use
Change-Id: I63a513406dbd90746bcad9da88945f49d2b51cc5
2014-08-27 14:05:11 +02:00
0792aef901 fdo#83067 also volatile cells need to listen to all references
As we now broadcast also cell moves it is not sufficient anymore to add
volatile cells only to the BCA_LISTEN_ALWAYS broadcaster, add them as
listener to all referenced cells and ranges as usual.

Change-Id: I7901b73db7e0c82c4bac302ae746810cbc16ea44
2014-08-25 22:00:24 +02:00
c25ac84688 Resolves fdo#81084 fdo#81696 fdo#80874 fdo#81010 : sort causes crash
Change-Id: I8fb9ec26bc549c264bfbf30177d720b20677b319
Reviewed-on: https://gerrit.libreoffice.org/11102
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-08-25 06:58:00 -05:00