Commit Graph

347 Commits

Author SHA1 Message Date
31af61ea09 Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"
This reverts commit 47a2d7642d249d70b5da0c330a73f3a0032e4bba.

Conflicts:

	cui/source/tabpages/transfrm.cxx
	svx/source/svdraw/svdedtv1.cxx
	svx/source/svdraw/svdibrow.cxx
	sw/source/filter/ww1/w1filter.cxx
	tools/source/generic/rational.cxx

Change-Id: I4849916f5f277a4afef0e279b0135c76b36b9d15
2014-10-23 18:34:39 +02:00
858c2a2977 Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"
This reverts commit 582ef22d3e8e30ffd58f092d37ffda30bd07bd9e.

Conflicts:

	svx/source/svdraw/svdedtv1.cxx
	svx/source/svdraw/svdibrow.cxx
	sw/source/filter/ww1/w1filter.cxx

Change-Id: I80abc7abdeddc267eaabc9f8ab49611bb3f8ae83
2014-10-23 18:34:34 +02:00
4332787892 nShearWink -> nShearAngle
Change-Id: I122f16783db4025b9335ed82a12f051516d98d4c
2014-10-21 08:56:29 +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
da77897d19 nDrehWink -> nRotationAngle
Change-Id: I33ca88f38210140931b12a05e426d1373243156e
2014-10-15 09:01:16 +02:00
2fff4927c4 coverity#1242426 Dereference after null check
Change-Id: I59c96846aa5bf4780e4c5bfb0b71242e3b928976
2014-10-14 13:42:19 +01: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
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
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
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
23e1fc277d loplugin: cstylecast, update PTR_CAST macro to use static_cast
I introduce a template method into the PTR_CAST machinery
to maintain constness.
There is now a FIXME in sd/../docshell.cxx because I needed
to use a dynamic_cast there to work around the games it appears
to be playing with OLE in-place activation.

Signed-off-by: Stephan Bergmann <sbergman@redhat.com>,
dropping the GCC-extension, unnecessary use of typeof from tools/rtti.hxx

Change-Id: Iba5ace1aa27e02b34fcc91af1e658c43371afd03
2014-09-23 17:27:47 +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
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
47e2fd0dc8 Consistently use size_t and SAL_MAX_SIZE
Change-Id: Ibab89984ec94556ec368653b6db50c6c2e380dec
2014-08-16 21:52:32 +02:00
16b1b63f2e Avoid incomplete type in fn sig to keep ubsan's RTTI-based checks happy
Change-Id: Ib769dbbcb78e9440805aee40019ab98cd52e8477
2014-08-08 15:11:05 +02:00
15a3cd62b0 coverity#1209589: Dereference after null check
Change-Id: I75d26707a7a3c0febef11b7e1c2218b8abfb7832
2014-07-06 06:58:05 +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
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
2fc3b4173f coverity#1078582 Dereference after null check
Change-Id: I3b972510871f36a3c7877b38d3a012aa88acf4c5
2014-05-23 14:16:13 +01:00
5c2ab70cc2 cp#1000077: Set 'modified' document property more consistently.
Update document info at one place, so that it works for other formats
like .doc, .docx, ... too.

Change-Id: If71799b491d2210f0d3bdbdb05f91f26c986a260
2014-05-22 13:55:53 +02:00
018e2f629e Avoid possible memory leaks in case of exceptions
Change-Id: I61fe5f5fff157531de9962a2dd4e6e0431e8601c
2014-05-19 22:28:31 +09:00
fb4b9fe3d8 coverity#735483 Logically dead code
Change-Id: I4cb153338f1a00d9439dcfa9c43ee96235584e4a
2014-05-09 10:44:22 +01:00
9c66d0312f eliminate unnecessary temporary SvtLanguageTable instance
Change-Id: I64fba0071523af67eef72a4b92970cd7052b5c2e
2014-05-06 14:06:20 +01:00
b45a12c37d sd: sal_Bool->bool
Change-Id: I3172a42f6b6abe434ffe0475d1201ff50b6c06ea
2014-04-24 10:53:17 +02:00
0833f4046a fdo#64047: n#863021: Add set-all language menu.
Problems:
* Doesn't reset the spell error markers
* Modifies only at object level
* Currently has only setting for 'all text'
* Maybe provide a current slide only option?

Change-Id: I4695423fed3ed9422185b23803eedd12ef434bea
2014-04-23 18:36:38 +05:30
b731d71c67 sfx2: Move InitInterface_Impl() method out of SFX_IMPL_INTERFACE.
SFX_IMPL_INTERFACE previously looked like a function; where in fact it is
several methods defined at once, and only the last one has a body.

This is extremely confusing and hard to read; let's kill that nonsense.

Change-Id: Ia4ae22eb58b1260c9c827c894f5345693bad49e7
2014-04-18 22:51:06 +02:00
f4d61eca61 sfx2: Kill SFX_CHILDWINDOW_REGISTRATION macro.
Change-Id: Icd56e0cee1ce0283e8a1cbaafc81ecca25469185
2014-04-18 22:51:04 +02:00
8fbbd1bd98 fix hacked bool in SfxDispatcher::SetSlotFilter
The bEnable flag was being passed an extra value.
Make this explicit now using an enum.

Change-Id: I292aca44e8592c9f3c1497c24c41140c8c3b5452
2014-04-15 09:02:32 +02:00
1531b523bf Clean up function declarations and some unused functions
Change-Id: I7a2b5970fd0ab2059b5f5b0100a049e04ba54ee3
2014-04-14 17:55:32 +02:00
b1de52241c svtools: sal_Bool->bool
Change-Id: Iaa489318f25107e91fc8133523fbd9d724493314
2014-03-24 08:12:08 +02:00
c3e3f46657 sfx2: sal_Bool->bool
Change-Id: I375a72c34e46778385a9fdc24c9ebd0f0a3f3c9b
2014-03-18 11:27:39 +02:00
ac01de882d sfx2: sal_Bool->bool
Change-Id: I87c5a180566e9da185c2992844e6522e82c17747
2014-03-18 11:27:38 +02:00
0e5c02da6e Fix indentation
Change-Id: I768699854c4e657e2d1b67d1a9b5ca5a925a05bd
2014-03-16 09:39:13 +01:00
684baef506 sal_Bool to bool
Change-Id: Ib19ecab287396dc6d6cf4a77dcf7072c5c4c84f8
2014-03-16 09:39:12 +01:00
c2324940d3 sfx2: sal_Bool->bool
Change-Id: If960d94f867a1988ace83975cf16441c6f8866b0
2014-03-14 07:50:33 +02:00
6c97bc4717 svx: sal_Bool->bool
Change-Id: I78da39fc553b2e5040ee6665377ea51a1c4d04d7
2014-03-11 08:18:24 +02:00
12f1faf7bf svl: sal_Bool -> bool
Change-Id: Ic31455a1f5ffffa35d4fdde901dd70734207b6f4
2014-02-20 08:17:00 +01:00
608953c425 bool improvements
Change-Id: Icac34936bdb551ad517170fd497212513719d2aa
2014-01-28 20:26:23 +01:00
3e5ff1f8d4 Be explicit when using bool as integral value (as Link return value)
Change-Id: I3b345be909ed2cb93cd0d478af4b26c9909d2726
2014-01-17 18:45:14 +01:00
fb84710151 simplify - use OUString::startsWith where possible
Convert code like
   if( !aStr.isEmpty() && aStr[0] == 'x' )
to
   if( aStr.startsWith("x") )

Change-Id: Iabc3a44ed3be2d29eed876e0eeef212ccd271edf
2013-12-12 13:15:24 +02:00
c5138cad87 fdo#68724: sw: fix crash on Insert->File with Hybrid PDF
This is an unfortunate combination of 2 special cases:
- the Hybrid PDF has its own XFilter implementation to extract the
  embedded ODF document
- Writer needs to create a SwReader with SwPaM for Insert

Since the PDF XFilter uses a special service in sfx2 to implement
the import, handling this requires a new method in SfxObjectShell
that calls back into Writer to create the properly setup SwReader.

Change-Id: Ie85f3bfa322bfe883c479e1cb198a8bf0cbbac23
2013-12-05 13:00:27 +01:00
3b2f956ba6 Drop duplicate #include
Change-Id: Ife8ebbb5e46704c5d2ff46cc345b4ed926e7dc12
2013-12-02 01:02:06 +09:00
cc5518ca61 Integrate branch of IAccessible2
Change-Id: Ibf3be46e8619c2dce9636e8a90a6703f3e28ba33
2013-11-28 13:32:30 +00:00
2c35fff7ec remove most use of RTL_CONSTASCII_USTRINGPARAM macro
This is largely unnecessary when working with OUString

Change-Id: I3cf4d68357a43665d01162ef4a2d5346a45da9be
2013-11-19 10:29:30 +02:00
5084e2b313 fix some further include guard foo
Change-Id: I949533327ec101a2baef6e6f66e79677a62c3d9f
2013-11-05 09:28:55 +01:00
1d3661cf91 Unwind FunctionReference typedef
Change-Id: Iaf1b041adf2220d6b0220a86d8ac0db38b3b8ebc
2013-10-25 15:42:11 +02:00
9de3cff361 String to OUString
Change-Id: I5ff57ede2217f1464571fb2beaa62a34425064ae
Reviewed-on: https://gerrit.libreoffice.org/5826
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-09-08 03:06:32 +00:00