Commit Graph

25491 Commits

Author SHA1 Message Date
51d86c9e62 Consistency around SdrAngleItem in svx/sxciaitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."

Change-Id: I8e76e4751e50f5952c6dfff9ee10362166bf0523
2014-10-17 15:36:13 +02:00
51b215902d fdo#73080: Fix the single cell reference cases as well.
Change-Id: Ib9a8ae04733c5bcb982ef4d337112eb8249d0ee0
2014-10-16 20:50:56 -04: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
f9aa686432 Resolves: fdo#81496 crash in calc format page
Change-Id: Ic70f6f605e13a5c95b504f1bf0322e11313a21e7
2014-10-16 09:09:46 +01:00
3e2bd1e402 fdo#73080: Correctly count blank cells in COUNTBLANK.
Especially when formula cells are involved.

Change-Id: I40950e7108778821c17d08354f01bb157b1551e6
2014-10-15 20:09:48 -04: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
ad9498f8b8 More -Werror,-Wunused-private-field
...detected with a modified trunk Clang with

> Index: lib/Sema/SemaDeclCXX.cpp
> ===================================================================
> --- lib/Sema/SemaDeclCXX.cpp	(revision 219190)
> +++ lib/Sema/SemaDeclCXX.cpp	(working copy)
> @@ -1917,9 +1917,10 @@
>    const Type *T = FD.getType()->getBaseElementTypeUnsafe();
>    // FIXME: Destruction of ObjC lifetime types has side-effects.
>    if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl())
> -    return !RD->isCompleteDefinition() ||
> -           !RD->hasTrivialDefaultConstructor() ||
> -           !RD->hasTrivialDestructor();
> +    return !RD->hasAttr<WarnUnusedAttr>() &&
> +           (!RD->isCompleteDefinition() ||
> +            !RD->hasTrivialDefaultConstructor() ||
> +            !RD->hasTrivialDestructor());
>    return false;
>  }
>
> @@ -3517,9 +3518,11 @@
>    bool addFieldInitializer(CXXCtorInitializer *Init) {
>      AllToInit.push_back(Init);
>
> +#if 0
>      // Check whether this initializer makes the field "used".
>      if (Init->getInit()->HasSideEffects(S.Context))
>        S.UnusedPrivateFields.remove(Init->getAnyMember());
> +#endif
>
>      return false;
>    }

to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about
initializations with side effects (cf.
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html>
"-Wunused-private-field distracted by side effects").

Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
2014-10-15 15:58:56 +02:00
d9fa1247be fdo#84938: replace SYMBOL_TYPE constants with enum
Change-Id: Ib3763f20d74c22e28d519a9ac47f6f3ab4e31f51
Reviewed-on: https://gerrit.libreoffice.org/11983
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-15 10:13:04 +00:00
da77897d19 nDrehWink -> nRotationAngle
Change-Id: I33ca88f38210140931b12a05e426d1373243156e
2014-10-15 09:01:16 +02:00
defa080e58 remove duplicated call to mpChildrenShapes->SelectionChanged()
Found when investigating performance bottlenecks of fdo#75486, after the
selection is completed ScTabViewObj::getSelection() is called multiple
times, each creating a ScCellRangesObj of the range list of filtered
ranges, which then is used for
ScChildrenShapes::FindSelectedShapesChanges()

The duplicated call was introduced with
b41332475783c31136673fb44cf4c411bb0148f8
but IMHO does not make any sense at all unless it has obscure side
effects, it only slows down things even more.

Change-Id: I3cee2e3e62c24ad72efb8cc2021e74d0afc70b69
2014-10-15 02:20:13 +02:00
94efc482d5 speed up simple range list joins that could be appends, fdo#75486 related
Change-Id: I734ff88bc4c0633875c9e9c19a817b8b08511c83
2014-10-15 02:20:10 +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
902a3df2da coverity#735315 Unchecked return value
Change-Id: If2e8d3cfe49a039cc27035ae9c0f037c2d60b122
2014-10-14 17:09:24 +01:00
7135247803 coverity#982180 Unchecked return value
Change-Id: Ida858f633f1e9afcc1a5a06f503f0ab06d2d3e74
2014-10-14 17:09:23 +01:00
89b256f431 coverity#1242430 Dereference after null check
Change-Id: If1c59d6d06a9e4601731f13a69b1ac2603c0014b
2014-10-14 17:09:23 +01:00
091742e86a do not forward-declare templates
Change-Id: I3b0a145f70406f0c8a12b6c4b7876c4148f76e93
2014-10-14 17:56:23 +02:00
b44b76746d Use C++11 std:🧵:hardware_concurrency()
...and hope it gets past our various tinderboxes.

Change-Id: I4dd95e77c4a74ae58e66f98753fcf5e438080146
2014-10-14 17:52:32 +02:00
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
17e68606b7 fdo#84872 give each SheetDataContext a new FormulaParser
Change-Id: I120a9d0943db38571892defe1b5d3169158e3e42
2014-10-13 12:18:03 +01:00
f6d61562d4 vcl: Make ImplFontCharMap a pImpl and move functions to FontCharMap
To do this, I've made FontCharMap a friend class for ImplFontCharMap,
and have moved the functions directly into FontCharMap. In this patch,
I am attempting to stop the direct use of ImplFontCharMap by anything
other than FontCharMap. However, FontCharMap itself requires a
refcounter, so we will use FontCharMapPtr to access the font character
map.

Change-Id: I509b990a8cbd911c5cc1572c7d24fc5348ca06d9
Reviewed-on: https://gerrit.libreoffice.org/11823
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-10-13 09:19:04 +00:00
63fa3ba80e coverity#735322 Unchecked return value
Change-Id: I12f9392813f5fdd6f2d36398ea00a5cad812cd26
2014-10-12 16:39:53 +01:00
68bb74ddab coverity#735321 Unchecked return value
Change-Id: I3733471b72e96c8d020b8b5238fdb5fc4bfcacce
2014-10-12 16:39:53 +01: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
1361c56aab fdo#39468 Translate German Comments - sc/source/filter/inc/ leftovers
Change-Id: I0fe5c0165e1c430861028175c82ff116bac969aa
Reviewed-on: https://gerrit.libreoffice.org/11926
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-11 23:52:57 +00:00
b384ee5442 Cleanup.
Change-Id: Ic39043d0453830d348ac3bc8a027b862e4bbdfd8
2014-10-11 14:22:59 -04:00
424bfaa773 fdo#80846: Broadcast changes before EndUndo().
EndUndo() calls PostDataChanged(), which renders the recalculated formula
cells.  Not broadcasting before EndUndo causes some dependent formula
cells to not get recalculated.

This one unfortunately is not currently unit-testable as this behavior
depends on the presence of ScTabViewShell....

Change-Id: I86288608b7f2627cda7c74be27a18029832775ef
2014-10-11 14:22:15 -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
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
c51f77b1c0 fdo#75757: remove inheritance to std::map
from oox::core::Relations.

Change-Id: If2e0109a2ad6598436177b7638cb6d568fb2d3d6
Reviewed-on: https://gerrit.libreoffice.org/11899
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-10-11 14:24:09 +00:00
ab58a180bd Have ScViewFunc::DeleteContents() to call ScDocFunc's.
If bSimple = true, call DeleteCell(), otherwise call DeleteContents().

Change-Id: Ic08d9501797b537430bef0b6f3d920c3b497104b
2014-10-10 20:36:36 -04:00
7168096fdf Add DeleteCell to ScDocFunc, which is a variant of DeleteContents ...
for a single cell case.  This is equivalent of ScViewFunc::DeleteConents
with bSimple = true.

Change-Id: I5eccce21843f4cb21b29f96b0360617a180aebee
2014-10-10 20:36:29 -04:00
c1a7e72110 typo: follwing -> following
Change-Id: Ia201473c84dc0923e8f4bee6329ad926cd6addd6
2014-10-10 14:55:12 +02:00
4bacf63db7 fix coverity#1242413 Logically dead code
Change-Id: Ic56eff808cd4254448f63127da9b5b1d54c733a0
2014-10-10 12:50:22 +01:00
980fd71964 InsertCurrentTime: in input mode inherit matching format if set
In case a date or time cell format was set, inherit that format for
Ctrl+; or Ctrl+: date/time insertion while editing the cell.

Change-Id: If13e680fc74ab36611f8c11d992dba4b9c91ddb4
2014-10-09 21:15:40 +02: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
0be1c2e87a typo: formual -> formula
Change-Id: I39b4c2fc4edd7d609b15fc289dd1b053c749f435
2014-10-09 13:02:50 +02:00
fcf953b8ec make streamtimeout a config variable instead of an env. var.
Change-Id: I6c82142265a0a149206d15fbc267ad61e6b9cf3b
2014-10-09 09:54:30 +01:00
9aa36a1ad3 Move this one to a common place too.
Change-Id: I7f4e007cfc861dc323b42be353c6ba11091e8fa1
2014-10-08 23:25:37 -04:00
7adef94b82 Share undo doc creation code.
Change-Id: I55f27b61637ba0284479c63c2fa48b0bd8938c0f
2014-10-08 23:24:58 -04:00
ed0e3fdcc1 Start sharing common code between DeleteContents of ScViewFunc/ScDocFunc.
The goal is to have ScViewFunc::DeleteContents() simply call
ScDocFunc::DeleteContents() while doing the view only stuff in the ScViewFunc
variant.  This is just a step toward that goal.

Change-Id: I2e574f9eb2b2be5340dbfb6f10739dfc2406faae
2014-10-08 23:24:52 -04: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
deed6dcacd Resolves: fdo#48405 GetString can call a macro which modifies the document
causing m_aDataArray to be cleared, so the rItem the result of GetString
is being assigned to is invalid

Change-Id: I1dc30d675233ddc53234bdb5349c5f374b036ca8
2014-10-08 13:36:35 +01: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
fbf3aa391b spelling: instanciated -> instantiated
Change-Id: I99f3010e30f81786b938dc11736ea1597cd5530d
2014-10-08 11:02:55 +02:00
fb6d3b883b disambiguate uniform_int_distribution
Change-Id: Ifa0c1b1983d1cc7f22d55b15dee88b7f709dbcf8
2014-10-07 14:21:16 +01:00
1b226b0247 Don't call comphelper::rng::uniform_real_distribution(a,b) with a==b
Change-Id: I95a3ac8da83e02001de13af8d31a04fe0d654dc0
2014-10-07 10:13:38 +03:00
ce5cc7afb0 avoid use of ref. to possibly deleted object
Change-Id: If5977b280fed8d8b053f59852d3984a59ce61a69
2014-10-06 20:34:14 +02:00
76d4db3181 Resolves: fdo#80101 inserting non-chart as chart -> unhandled exception
Change-Id: I4d5438292d9a5c49f1336304ebd3dc4e155dd212
2014-10-06 16:25:08 +01:00