Commit Graph

1187 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
da77897d19 nDrehWink -> nRotationAngle
Change-Id: I33ca88f38210140931b12a05e426d1373243156e
2014-10-15 09:01: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
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
fb6d3b883b disambiguate uniform_int_distribution
Change-Id: Ifa0c1b1983d1cc7f22d55b15dee88b7f709dbcf8
2014-10-07 14:21:16 +01: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
ede0abe6b1 Bin EE_CNTRL_URLSFXEXECUTE which was only set, never tested
Change-Id: I18a9355bb902b19f0eeecb26d33eba4fb25db8cb
2014-10-02 21:09:52 +03:00
37f62f86af coverity#1242496 Resource leak
Change-Id: I419b217df306d41ed99e603bae9381f54c633598
2014-10-02 14:49:04 +01:00
ef6a120af6 coverity#1242497 Resource leak
Change-Id: I2c4295c7d308257290aaf04181805d7dc71d6553
2014-10-02 14:49:03 +01: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
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
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
39e91c585d Replace uses of old SFX_ITEM_AVAILABLE alias with SFX_ITEM_DEFAULT
Change-Id: I88eeac06413fc3935cbbdb357ff8bf9acaa383a8
2014-09-10 16:37:20 +02:00
3669242804 crashtest: sep should be curSep
Change-Id: Ic83165ee4af86d0ed0bc77505aae8f50cfc1471a
2014-09-09 15:34:04 +01: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
a784c33fd4 fdo#82681: return IsUserDefined w/o negation
when the predicate is called StyleSheetIsUserDefinedPredicate

Returning negation thereof somewhere, somehow, corrupts one of
SfxItem pools. Thus, invalid read happens and crashes Impress
and Draw.

Now the loop in SdStyleSheetPool::UpdateStdNames does nothing
(it iterates through user-defined styles, but its body does
something for non-user-defined styles), so more investigation
here is needed.

This is partial revert of commit 3440766f0ad43454287a874b5fd34b6f2af6bdf1

Change-Id: I06f0da320c49674dac2adf43b7c374babbdadb57
2014-09-05 17:43:03 +02:00
5b63c12ace n#708518: sd: check that master page matches when setting parent style
In ODF import it happened that the parent style of "outline2" etc.
was always set to the "outline1" style of the first master page in
the document, but it should be the "outline1" style of the same master
page as the "outline2".

(regression from e955433c3574cb602dedba96bc645898f97858bf)

Change-Id: Ie563d5ee5c2040aeb6ca5c8bb25b195e15ea964e
2014-08-29 19:18:42 +02:00
7e2b9fa213 Remove some useless tools/debug.hxx includes
Also remove the tools/solar.h included from tools/debug.hxx. The include of solar.h
header was necessary in some cases because of a macro or a typedef that was needed.

Change-Id: Ia6e15d5c2571c58c9e9138b0d0a7f08ae88053c9
Reviewed-on: https://gerrit.libreoffice.org/11075
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Tested-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2014-08-22 16:33:18 -05:00
f47baab6d3 Resolves: fdo#82355 crash on loading ppt
regression probably triggered by...

commit 2e3c45afc6c5ea74f1f8b4a7dce806e537870546
Date:   Fri Mar 4 07:38:16 2011 -0800
Remove usage of deprecated List container.

but that just stopped at the first NULL by chance

Change-Id: I767e3bc3130d99cedceb4172857d1741c677b19b
2014-08-19 20:49:17 +01:00
759f5d24b0 Consistency around XColorItem in svx/sdshcitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."

Change-Id: I7ecf827a0713efaecb4b0eb49f9f8c06f8c59091
2014-08-18 18:18:08 +02:00
08edafa656 Consistency around SdrOnOffItem in svx/sdtcfitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."

Change-Id: Ib461b5d3702e00a9d7cef3229c44e3328c776e1d
2014-08-18 14:56:55 +02:00
a107bdfdfc ErrorBox->MessageDialog
Change-Id: I57d4e43460e40d3aff54873280eddbb18c12446b
2014-08-18 10:57:21 +01:00
a51c423743 Consistency around SdrMetricItem in svx/sdsxyitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."

Change-Id: I3734cb14b6ed8f556af85b234968682a55ac8a4c
2014-08-18 10:55:36 +02:00
47e2fd0dc8 Consistently use size_t and SAL_MAX_SIZE
Change-Id: Ibab89984ec94556ec368653b6db50c6c2e380dec
2014-08-16 21:52:32 +02:00
6ec885c9ff warning C4245 signed/unsigned mismatch
Turns out that mnVisiblePageCount is actually never read.

Change-Id: I6bded733bb551525a6143976ad4c4447a5a56773
2014-08-13 23:12:48 +02:00
5ecec388bb Consistency around SdrYesNoItem in svx/sxmsuitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."

Change-Id: I25002e5b6043baa8c93b180a03f475bea5906e4f
2014-08-07 11:27:26 +02:00
7627008b06 Clear() an SdPage while it is still an SdPage
... because when Clear() is later called in the SdrObjList sub-object dtor,
freed SdrObject dtors may call back via SdrObject::SendUserCall into this
virtual SdPage::Changed, but then this is only an SdrObjList, causing undef
behavior.

Change-Id: I09a2d1445a51a70e8f795ff869027899ad0f528b
2014-08-05 14:17:22 +02:00
8d023edc18 Consistency around SdrOnOffItem in svx/sdshitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."

Change-Id: Id712c222034ef807ea2d7bc459e78882e948aca6
2014-08-05 08:59:37 +02: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
768d32cf5b Consistency around SdrMetricItem in svx/sdtditm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."

Change-Id: Ib0234883d441be668700df5ccd0e855973dc5426
2014-08-04 11:29:51 +02:00
68969cc61a Consistency around SdrMetricItem
...where some instances of SDRATTR_TEXT_MINFRAMEHEIGHT etc. where SdrMetricItem
while others where of trivial derived classes SdrTextMinFrameHeightItem etc.,
that appear to only existed for better-named constructors.

Change-Id: If0af79fbb803275ed09fc7b950868c5de7d61615
2014-07-31 15:57:12 +02:00
798379313d fdo#76754 Speed up registration of new listeners to SfxBroadcaster
Also change behavior for the GetListenerCount() method which now
returns the count of listeners.

The previous behavior is available in method GetSizeOfVector().

Change-Id: I5b03fa55a309f4ff5aea5e8830c137786fc07e89
Reviewed-on: https://gerrit.libreoffice.org/10344
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-07-22 06:26:06 +00:00
1e6ff8f7f8 XFillStyle -> css::drawing::FillStyle
Change-Id: I6b2fabd72fd34f4ac1b3a18f386c90794bc39ce4
2014-07-19 00:30:37 +02:00
61cf536f04 fdo#80020 Fix regression for style sheet inheritance
The inheritance relationship of styles in Draw was lost when writing files.

Change-Id: I81588a031bf4c649338fad9b7342fbbe11df9aef
Reviewed-on: https://gerrit.libreoffice.org/10309
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-07-15 09:24:37 +00:00
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
22f244ae45 Background color in defaults for named presentation layout
Change-Id: I0f65476a545cdd080768e00161ab4a7682acc359
(cherry picked from commit 3ae8a7302c2c145867ae2072f3ba477ba1b3e0a4)
2014-06-30 22:54:41 +02:00
6216eee4b9 Impress Remote: allow removal of authorised remotes.
Previously authorising a device meant that it would have access
forever -- we now list previously authorised remotes in the remote
dialog, along with controls to allow removal of such remotes.

Change-Id: I4179739f3a2ba0a8fe19c2a0cd0cbbece9cb4352
2014-06-30 07:45:17 +02:00
d92aa2f445 remove SFX_APP() macro that was a mer wrapper for SfxGetApp()
Change-Id: I480a789c767dd671775c9d70d96bf71908f21f5b
2014-06-27 17:08:04 +02:00
533c6cb6ba fixes for up-casting to Reference<XInterface>
Fix regressions introduced with
6a043e9c0acff20e1618ca8ec15c21d5d0fd0d37 "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
ed6b8a100c remove whitespaces
Change-Id: I9daea42a433b5032931a722878874917cf37f4d1
2014-06-25 05:41:09 +02:00
229b8f9122 Resolves: #i125090# The values of upper and lower spacing...
for default paragraph did the complete opposite.

(cherry picked from commit 75f191b09f25e4dd357f42fdf80c2b0252d1c410)

Conflicts:
	sd/source/core/stlpool.cxx

Change-Id: Idd44f7f1e4ad6acbde2733240fd357e628ac1f28
2014-06-24 10:52:20 +01:00
1d38cb3655 fdo#71076, fdo#71767: Preserve number formats when charts are copied.
Change-Id: If5ae8852152012483237e7602e56a0c46ea8748a
2014-06-19 14:46:56 -04:00
32294e11a0 coverity#706052 Unintended sign extension
Change-Id: I5e9b8a8809f9736038f20493d1a24bbbd8846dbd
2014-06-19 10:26:47 +01:00
3e82897353 improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-17 10:55:17 +02:00
448c62835b SdStyleSheetPool::GetBulletFont can be static
...that's why the problem fixed in 0466c0dcddd3b5af02c711794e8cd4c3c6c12993 "Set
mxStyleSheetPool before using it" had never caused trouble in practice (and its
change to SdDrawDocument ctor can be reverted again)

Change-Id: I662995ab4fcaa7ae461cb9575666825d8a869735
2014-06-13 18:09:20 +02:00
8a5b397105 Resolves: fdo#78151 change style on toggling bullets on master page outliners
"do what I mean"

In master pages prior to this if we toggle bullets on and off the that changes
the *level* of the paragraph. And because the paragraph is effectively a
preview of the equivalent style level, changing the level disconnects it from
the style which is useless for us.

So instead turn the numbering off at the given outline level. In order to
toggle the numbering back split the defaults-setting into a reusable piece that
sets the numbering indent which we can call to toggle numbering back on

Also split out the broadcast style change *and explicit child* broadcast code
into a reusable method, the absence of which left me stumped for well over an
hour as to why my changes only worked on level 1

Change-Id: I311c7f35f1ca7dff1d151c6141ff5faa7f15c5a2
2014-06-13 17:06:06 +01:00
c6eb208473 loplugin:staticcall
Change-Id: I502702dfd04405748a314bd171e6298850777c0a
2014-06-13 17:54:31 +02:00
0466c0dcdd Set mxStyleSheetPool before using it
Change-Id: Id5ce3555c487aa7abcf97855a036663c91dd28b1
2014-06-13 12:08:04 +02:00
b9daf7cacd coverity#735840 Unchecked dynamic_cast
Change-Id: I3c772ec30360103f569b34e7c83f65b469eb5be8
2014-06-12 14:12:03 +01:00