Commit Graph

1276 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
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
86b0762bbb coverity#708132 Uninitialized scalar field
Change-Id: I830210b44459cf94eabb983b99bfcc104f865492
2014-10-10 12:50:20 +01:00
1958ca235b German comment translation.
Change-Id: I479da454235a7cfc084ae1517ab9ffa07580ab0c
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
ef58e10844 fdo#83808 Scale images proportionally by default in Impress/Draw
Change-Id: I16cacb90150aef3aa2ad4607e05298f0bc47c1ae
2014-09-26 18:46:15 +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
dffe40bc4e Related: fdo#83572 Improve zoom mode
Make this mode permanent, and add also zoom out/pan
functionality. Hold Ctrl for zoom out, Shift for pan.

Change-Id: I5bd8adfcc4d403c35b33185e5894a2b020d604d0
2014-09-14 16:42:00 +03: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
ce65d21ddb Replace uses of old SFX_ITEM_ON alias with SFX_ITEM_SET
Change-Id: I64be7ca711dcd3ea7c4d5840a30f2f701d055e1b
2014-09-10 16:37:20 +02:00
d59e728be6 Remove (misleading) EditEngine::QuickRemoveCharAttribs
Change-Id: I7a0be4e204a239dfdd9c184b3d54a69debe8a208
2014-09-03 21:05:19 +02:00
e201506a4c Show the right tab for SID_CHAR_DLG_EFFECT
Change-Id: I3a8b7a9e973d20f06d423ec55cf689478ca98e0a
2014-09-03 18:12:22 +03:00
a13b6c3865 coverity#704756 Dereference after null check
Change-Id: I004b68ff42d2f56cb7eb1f3a0b20de841a0919c4
2014-09-03 15:58:24 +01:00
9f6018bb64 Consistency around SfxBoolItem in svx/svx3ditems.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."

Change-Id: I3253b4cc5657a7d6b960ee892584109d373eed3d
2014-09-01 14:46:50 +02:00
bebe30e917 Consistency around SfxUInt32Item in svx/svx3ditems.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."

Change-Id: I3193eab34a34c051002adeedd8b368e26f55f7a3
2014-09-01 13:37:27 +02:00
e0c2ea6bde Consistency around SdrMetricItem in svx/sderitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 "Remove unused ctors" and
68969cc61adecac481ae9656978ef952f435b310 "Consistency around SdrMetricItem."

Change-Id: I4a0715b18bc3aa032779252cad2450c905a467a4
2014-08-25 17:25:40 +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
fd63ba4574 Fix Insert 3D Model file dialog's "All supported formats" filter
It seems on some system the file dialog does not like spaces
between the formats.

Change-Id: Ifa69f4f210061209f7f0aa9223417d06b06b577a
2014-08-19 10:09:37 +02:00
a107bdfdfc ErrorBox->MessageDialog
Change-Id: I57d4e43460e40d3aff54873280eddbb18c12446b
2014-08-18 10:57:21 +01:00
47e2fd0dc8 Consistently use size_t and SAL_MAX_SIZE
Change-Id: Ibab89984ec94556ec368653b6db50c6c2e380dec
2014-08-16 21:52:32 +02:00
384cb5ff7b Consistently use size_t and SAL_MAX_SIZE
Instead of a mix of sal_uIntPtr, sal_uLong, int, and so on.
Also change CONTAINER_ENTRY_NOTFOUND=ULONG_MAX to SAL_MAX_SIZE as
return value in case of failure and in the related tests.

Change-Id: Ie778a849253b4be84fbcdab9557b7c4240233927
2014-08-16 21:52:28 +02:00
191f0944fd Handle collada libraries seperately: --disable-collada
Depends on gltf support.

Change-Id: Ief0452da3d03b0ddbca45272e5f5cd268691aeca
2014-08-07 15:42:57 +02:00
42172ea647 Let GetObjectItemPool return a reference
Change-Id: Ibbcfa3452afcf88dbb6050765e081a1be2381334
2014-08-05 23:04:07 +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
02f0102b8b prevent memory leak
Found by Lsan.

Returning this or a heap allocated object asks for trouble. Let the
caller handle it and return null instead of this.

Change-Id: I7586e103bef5a8c2727adfe214b052d6962d4467
Reviewed-on: https://gerrit.libreoffice.org/10716
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-08-04 12:49:59 +00: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
7ce763089b coverity#704759 Dereference after null check
Change-Id: I1f41d2bc43391175a4587f501f02775adc43bc8e
2014-07-26 21:25:19 +01:00
a01783051a coverity#704753 Dereference after null check
Change-Id: I4886995b925e3332e67d08a60e53a251be9f81e5
2014-07-26 21:25:18 +01:00
c8bb0b2416 coverity#704748 Dereference after null check
Change-Id: I88552b40658df85bbfbf0848e94085aa8eb649b6
2014-07-26 21:25:18 +01:00
1e6ff8f7f8 XFillStyle -> css::drawing::FillStyle
Change-Id: I6b2fabd72fd34f4ac1b3a18f386c90794bc39ce4
2014-07-19 00:30:37 +02:00
37c3cf70c7 Related cp#1000084: Make this work for other apps too and set proper default
Extend d98c817cc71e62a2beecc7142062f9ef33a7149b and fix default.

Change-Id: I79ad35bd5ad6fbd6e7d260864d4bf40fafb6b604
2014-07-14 18:11:17 +02:00
4ce9e4a68f Head cleanup - use forward declarations.
Change-Id: Icc4fa0acad77d61200eb77cc70e21866590b658e
2014-07-10 14:13:57 -04:00
59af5e5b29 coverity#735324: Unchecked return value
Change-Id: I7d6dcf0f64be944df1a94db27d1ee86f1bf2229c
2014-07-06 06:58:07 +02:00
5ace3f3b4f clang scan-build: various warnings
Change-Id: I4bdfb074b3cf6fcb49765322308dfa4b9ed67713
2014-07-01 10:56:14 +01:00
4523dd0544 Called C++ object pointer is null
Change-Id: I88efc4be6ff869ef97a2b398d43f7b7914debfc6
2014-06-30 09:46:16 +01:00
d92aa2f445 remove SFX_APP() macro that was a mer wrapper for SfxGetApp()
Change-Id: I480a789c767dd671775c9d70d96bf71908f21f5b
2014-06-27 17:08:04 +02:00
ed6b8a100c remove whitespaces
Change-Id: I9daea42a433b5032931a722878874917cf37f4d1
2014-06-25 05:41:09 +02:00
e2080e70fe new compilerplugin returnbyref
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
   class A {
     struct X x;
     public X* getX() { return &x; }
   }
which can be:
     public X& getX() { return x; }

Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
2014-06-24 11:34:21 +02:00
0766b83a2b coverity#735837 Explicit null dereferenced
Change-Id: Idaf39928e4f48f8cf823de22e2ded995046624fc
2014-06-19 10:26:50 +01:00
e9f405a0da Clean up SdrModel::MigrateItemSet
* No need to support null pNewModel argument (the one call site that did pass in
  null explicitly in sd/source/ui/func/fupate.cxx can just as well pass in
  mpDoc, and all existing call sites are guaranteed to pass in a non-null
  value).

* With that changed, SdrModel::MigrateItemSet can be static.  (At least in
  JunitTest_forms_unoapi it could happen that the call from
  svx/source/sdr/properties/attributeproperites.cxx called MigrateItemSet on a
  null GetSdrObject.GetModel(), which was undefined behavior even though it was
  harmless.)

Change-Id: Idface48da7e889c6e5768d0e49bc67c88b4c3ec4
2014-06-16 12:05:37 +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
ca3a1e1c6b 3D model insertion: display extensions in the filter selector
Change-Id: I8c7b7a311cbd38058540d3462b0497ebe3d28a9e
2014-06-12 21:43:36 +02:00
fe70101856 Introduce HAVE_FEATURE_GLTF to enable/disable gltf related code
When it is a release build then enable it only on Windows and
Linux.

Change-Id: I7c462aeb75e6ab60eeaa0fa42ca7853a6369b742
2014-06-12 21:43:35 +02:00
c5539bb585 fdo#79676: Initialize with a default chart only from the UI.
When creating an embedded chart object during import, we don't want to
create a default chart which would only mess up the chart data.

With this change, ChartModel::initNew() is a no-op.

Change-Id: Id29659c3885ec1e06bed26d2c851123fb63072cc
2014-06-10 10:02:25 -04:00
3466cbc01c fdo#77987, part 3: use signed ints consistently
everywhere where snap line coords are manipulated

Change-Id: I8de1662680bd6e5dc9d42d633fa591dacc260a9b
2014-06-10 00:23:46 +02:00