Commit Graph

11503 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
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
d49eabcc56 ensure UserData dtors are done while SolarMutex is locked
otherwise I can't even reorder two slides in the slide pane with
dbgutil enabled without a SolarMutex assert in RemoveListener

(and we have two SolarMutexes here for some reason, one should be enough)

Change-Id: If224568f1b90d62c17bde65a896534aa10f8a661
2014-10-16 11:16:41 +01:00
165059674d Restore my pretty slide highlighting
and which got horribly destroyed by merge-conflict resolution of

78f6407978aa48c3cbb116bc281940dbf1f2dcbc

Change-Id: Ie560416f4aa435e80c57a4449ee499fc5af20022
2014-10-15 17:38:19 +01: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
72cb37b685 fdo#84236 Remove view modes from sd context menu
Change-Id: I7146ee946c7f882decae2c8d93c63002d00dd511
2014-10-14 16:34:00 +02:00
2fff4927c4 coverity#1242426 Dereference after null check
Change-Id: I59c96846aa5bf4780e4c5bfb0b71242e3b928976
2014-10-14 13:42:19 +01:00
1175b25bf2 fdo#84213 Add show/hide ruler to sd context menu
Change-Id: Iee42ab31a82ed4459f956706cef513afcf70ef94
2014-10-13 21:21:25 +02:00
1c8695ecf6 boost::rational throws if 0 is passed as denominator
Change-Id: I312fd6b964555b3b4aa4e22cec6054c9a83b2c52
2014-10-13 10:02:26 +02:00
4d7806f73b Wording: 'Audio/Video' -> 'Audio or Video'
Change-Id: I9572d4c7fb5f50b869e69436302ac8c20e500392
2014-10-12 15:30:16 +02:00
475df8db91 fdo#84916 Fix string: Insert Audio/Video
Change-Id: I76cd8502f9cb2af379dd732d2081feb094599aca
2014-10-11 17:37:16 +02: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
8a2da50632 coverity#704776 Dereference after null check
Change-Id: Ifbad1fc30665ff6b9238b5fb4728fc302b0458fa
2014-10-10 12:50:23 +01:00
86b0762bbb coverity#708132 Uninitialized scalar field
Change-Id: I830210b44459cf94eabb983b99bfcc104f865492
2014-10-10 12:50:20 +01:00
cb3b90751b coverity#1244953 Uncaught exception
Change-Id: I3c4aeb3318af7cdb964128dd78f7d2cfba48000e
2014-10-10 12:50:16 +01:00
fb365e63ab cid#1244955 Uncaught exception
Change-Id: Iedf06cc78cda022112699be3db650d11c7249adc
2014-10-10 10:14:18 +02:00
1958ca235b German comment translation.
Change-Id: I479da454235a7cfc084ae1517ab9ffa07580ab0c
2014-10-09 17:44:58 +01:00
c78d5fae81 German comment translation.
Change-Id: I98526bfd6f69d95d5c309e67c397bc85fb8817ab
2014-10-09 17:44:58 +01: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
04a810cee4 back out more wrong and confusing tools::Time comment changes
Apparently fc04f76336fdf8c96e35382cdeb497e2f939705c used some sed script
to change all ...

Change-Id: Ie609bd02a2c5d70109fc6185cf4440480f29d8f5
2014-10-08 14:24:21 +02:00
62aa0f83fa fix build after PathKind enum commit
after my hasty commit
bc00203  "convert PathKind enum in SD to enum class"

Change-Id: I97263e907bf7363121dc1b437eaf564efdb66ad2
2014-10-08 12:42:24 +02:00
bc0020344c convert PathKind enum in SD to enum class
to get the NONE constant out of the global namespace

Change-Id: Iecbe39126c1ec08aa852fcb903cee1a6e6f4594b
2014-10-08 12:22:55 +02:00
4b7b013491 Resolves: fdo#44998 crash when opening context menu of a field
If you right click on a field in an inactive text box, then a mouse down,
context command, mouse up sequence is sent. The mouse up is supposed to be
captured by the context menu here. But it doesn't because the mouse down in
draw sends an artificial mouse down to the editengine which eventually sets up
a MouseCapture window so the context menu doesn't get considered (because it
occurs before the capture window is released) so the mouse up gets send to sd
while the context menu is up and that causes all sorts of havoc.

Change-Id: If3b7c501586f8561be484d0828c630d84644f770
2014-10-07 16:55:08 +01:00
6ced5dbd1a Disable sdremote by default, and improve flow control.
It was intended to disable sdremote by default when it exited
experimental mode.

This reverts commit 576943b9bf7506829de97d2194c4bee35a485436.

Change-Id: I2c1b5443e334021bd9574316167f48b1af6200e5
2014-10-07 10:31:06 +01:00
60a67da70f ~SdUnoPageBackground() gets a SolarMutexGuard
Change-Id: I76582bb6a1a8dee56611f1463d3e63246eefb310
2014-10-07 00:27:18 +02:00
54e86f708c Missing include
Change-Id: I47ddb95018109e5e771324b699dfdc10f529dfc4
2014-10-06 16:49:26 +02: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
a836afe471 fdo#73151 Always open Styles&Formatting dialog in the sidebar
Change-Id: I05b63dc00023945d92fd837bd64042135d3f9aed
Reviewed-on: https://gerrit.libreoffice.org/11648
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2014-10-06 08:15:42 +00:00
beadebc0f7 coverity#1242802 coverity gold(?) Structurally dead code, loop doesn't loop
Change-Id: I2be3e6d88472ba8b69f012aaf975a91f0ab4f693
2014-10-03 16:30:28 +01:00
f3259873e1 coverity#1242533 silence Arguments in wrong order
Change-Id: I7031e7408f5bcd9ae85fc50952253e14d2fb2edf
2014-10-03 09:07:53 +01:00
2a28668260 fdo#84617: Guard the destructor with SolarMutex.
The same pattern as introduced elsewhere recently.

Change-Id: Ie7b4fd1ec26d417f63bee26dd336dfc54f4847dc
2014-10-03 08:20:23 +02:00
ede0abe6b1 Bin EE_CNTRL_URLSFXEXECUTE which was only set, never tested
Change-Id: I18a9355bb902b19f0eeecb26d33eba4fb25db8cb
2014-10-02 21:09:52 +03:00
96d210bf9c bnc#657899: Paragraph vertical spacing differs from PowerPoint
We need to set the "paragraph summation" flag also for .pptx import. (As is
already done for .ppt import.)

This is what in the Options (Preferences) UI is called "Add spacing between
paragraphs and tables (in current document)", on the LibreOffice
Impress:General page. This is a setting that when set becomes local to the
document. I actually don't really understand why this needs to be a
user-visible option, wouldn't it be enough for it to be an internal flag that
is set for documents imported from .ppt and .pptx, and is clear otherwise?

Change-Id: I525178957276e7d587b6ac4be8ae7919fc245a27
2014-10-02 21:09:52 +03:00
1eb35713bc Remove leftover SAL_WNODEPRECATED_DECLARATIONS_PUSH/POP
...from times when code used std::auto_ptr.

Change-Id: Ia4eca8b0b95a8846886884404009e895daba8a22
2014-10-01 18:48:14 +02:00
4281abdfa8 sd: std::auto_ptr -> std::unique_ptr
ToolBarManager::Implementation::Update in sd/source/ui/view/ToolBarManager.cxx
is dubious.  It takes its parameter by value (so in UnlockUpdate() the passed-in
mpSynchronousLayouterLock is reset upon passing it in), but the comment that it
"is [...] released at its end" together with the redundant
pLocalLayouterLock.reset() at the end of Update() make it look as though the
intention was to pass by reference.  However, resetting
mpSynchronousLayouterLock even in the case where pass-by-ref would fail to reset
it is apparently important, as otherwise e.g. JunitTest_svx_unoapi would run
into the OSL_ASSERT(mpSynchronousLayouterLock.get()==NULL) in LockUpdate() with
a call stack of ... -> Update -> SetValid -> UpdateLockImplementation ->
LockUpdate.

Change-Id: I7d2717d5e1f8aa69c79a626c100d7fefb0cfb120
2014-10-01 17:35:08 +02: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
0569e10d01 sd: SdUnoForbiddenCharsTable gets a SolarMutexGuard too
Change-Id: Ie742b7e38e60f6a77f6b7c3e56ac415d8cb836e1
2014-09-30 17:34:26 +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
1a57c512c0 fdo#70998 Termchange: Picture->Image
Change-Id: I4113d35e2a4778c9833e659b1e4ff4fbb1ab9734
2014-09-28 23:09:49 +02:00
1253b909a7 Term change: Sound/Movie -> Audio/Video
Change-Id: I389a3db5ca23718035413cbd0252f62eb8c870c3
2014-09-27 19:39:56 +02:00
ef58e10844 fdo#83808 Scale images proportionally by default in Impress/Draw
Change-Id: I16cacb90150aef3aa2ad4607e05298f0bc47c1ae
2014-09-26 18:46:15 +02:00
5501c8d222 remove unnecessary casts in calls to SvStream.WriteUInt16
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: I482ca7abb84613971e7e8f839f7aa67a65cd71ff
2014-09-26 15:26:48 +02:00
2e7f83e879 fdo#84235 Remove Navigator from Context menu
Change-Id: Ie84fe35db0dfca08e2b270636f06bef90c1455ab
2014-09-25 23:40:48 +02:00
a924606810 editeng: std::auto_ptr -> std::unique_ptr
Change-Id: I25e3599a37d720cbcf70ea13ab30234e54637d53
2014-09-25 17:35:05 +02:00
a895a27c6b fdo#63483: support for modify passwd in Impress and Draw
iow, allow opening Impress and Draw ODF documents read-only

Change-Id: I379b9f92b9bfb20e99998177d9a5fae80069d98f
Reviewed-on: https://gerrit.libreoffice.org/11495
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2014-09-25 13:17:07 +00:00
c35db5ca9d Stop using unnecessary std::auto_ptr
No need to allocate mpMasterPages dynamically.
Thanks David Tardon for pointing it out.

Change-Id: Id91ce50b190c7807f4c59d211110c28409c244ca
Reviewed-on: https://gerrit.libreoffice.org/11484
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-09-25 09:45:32 +00:00
89ecdc47e1 Revert "fdo#73151 Always open Styles&Formatting dialog in the sidebar"
This reverts commit 473ed449a4b6f550dc1af47a07c6e0ef243a98b2, which made
JunitTest_toolkit_unoapi fail, as
AccessibleDropDownListBox.createTestEnvironment
(qadevOOo/tests/java/mod/_toolkit/AccessibleDropDownListBox.java) was no longer
able to find its AccessilbeRole.COMBO_BOX AccessibleDropDownListBox, which it
apparently expected to find in a docked stylist (cf. DesktopTools.dockStylist
in AccessibleDropDownListBox.initialize).
2014-09-25 11:01:52 +02:00