Commit Graph

1736 Commits

Author SHA1 Message Date
f338acb77c coverity#735305 Unchecked return value
Change-Id: I0f03b67a5df3427e78f70f2b86aba26024ea575f
2014-10-28 15:06:34 +00:00
96725576e5 cid#1209201 Logically dead code
Change-Id: I8a7a9e23ad33f0c62813ae4ebd84cece3fe75283
2014-10-27 15:50:43 +02:00
7ef698355a fdo#84938: replace KEYTYPE_ constants with enum
Change-Id: I563cf96f8ca815d6c8ad9f5fe365fc7ce7a2a328
Reviewed-on: https://gerrit.libreoffice.org/12104
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-27 08:09:35 +00:00
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
0c0c77af06 coverity#1247635 Uncaught exception
Change-Id: Ic346a5820102a922f54c971e01587601991bd484
2014-10-17 15:19:47 +01: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
6832d9f0f0 coverity#735333 flush out pointless calls to IsRemote and IsOpen
etc.

Change-Id: I588d4486071b1e31897d4e6468a2c634d6856832
2014-10-15 16:56:57 +01:00
0141e9cac8 convert PORTION_KIND constants to enum
Change-Id: I32d65cfd7a67cd7ebca0f99061293a9ac3398133
Reviewed-on: https://gerrit.libreoffice.org/11970
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-15 05:46:01 +00: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
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
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
76b50b7b0d Resolves: fdo#84698 crash in autoreplacement
Change-Id: I44d5dacb21870f77ca993b24f3a31433edb17c6d
2014-10-06 14:42:06 +01:00
2f2f22f91b coverity#1242896 Unused value
Change-Id: Ia2690d92cfcd68f567f71a1483d13be0e7575675
2014-10-02 14:48:52 +01:00
4f1cf73b4d coverity#1242436 Identical code for different branches
Change-Id: Ia2988cdde8be62a9fb3d2895c70148a01dedf594
2014-10-01 20:29:00 +01:00
4923ac72aa loplugin: cstylecast
Change-Id: I58582059495f7c50880038e2174ea2de026aa1c9
2014-10-01 13:08:42 +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
0904650474 actually the LineStyle property is *write-only*
... which is highly suspect in any case, but whatever.

Change-Id: Ibeff36a7d30750fc33e9729b067f86b3901d1c76
2014-09-30 21:49:22 +02:00
9bcd96a36e clean up some weird type-casting in SvxRTFParser
...it was casting between a std::vector and a struct.
Just store the struct.

Change-Id: I37afa2ea27aa45d0849e01b45837129719eaf138
Reviewed-on: https://gerrit.libreoffice.org/11705
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-09-30 16:38:53 +00:00
c9d4a2887c fdo#82577: Handle PolyPolygon
Put the TOOLS PolyPolygon class in the tools namespace. Avoids clash with the Windows
PolyPolygon typedef.

Change-Id: I811ecbb3d55ba4ce66e4555a8586f60fcd57fb66
2014-09-30 11:47:41 +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
9755653991 MSVC 2012 apparently isn't ready yet for std::vector<std::unique_ptr<T>>
...producing error messages about trying to access private undefined unique_ptr
copy ctor etc.

Partial revert of 014e7933af751bfe0a03867373b82efa806f3a3d "svtools:
std::auto_ptr -> std::unique_ptr: ...changing HTMLOptions to
std::vector<std::unique_ptr<...>> because boost::ptr_vector<...>::push_back only
supports auto_ptr, not unique_ptr," going the awkward

  std::unique_ptr x(...);
  push_back(x.get());
  x.release();

route instead (which could be simplified if boost::ptr_vector::push_back ever
started to support unique_ptr).

Change-Id: I15693030a0bbfdedbfdfbe76ede5d0c74f4e5b41
2014-09-29 15:27:46 +02:00
014e7933af svtools: std::auto_ptr -> std::unique_ptr
...changing HTMLOptions to std::vector<std::unique_ptr<...>> because
boost::ptr_vector<...>::push_back only supports auto_ptr, not unique_ptr.

Change-Id: Ie5f92bc40ce5425dc1c634b17addc2b0dd9bbda3
2014-09-29 13:57:17 +02:00
4e26b91568 remove unnecessary casts in misc calls to SvStream.Write*
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: Ib80032e8626f5476a89b958f590441994594f4e4
2014-09-26 15:27:18 +02:00
5cefde06ea remove unnecessary casts in calls to SvStream.WriteUInt32
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: I1d848f19f82783e6eabf2da37dbde78fe36ea1e0
2014-09-26 15:27:17 +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
dedfa972bc remove unnecessary casts in calls to SvStream.WriteInt16
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: Ie44bec6b988f3e46fe78d14b740818c9141f5df0
2014-09-26 15:26:48 +02:00
8ea2bb252a remove unnecessary casts in calls to SvStream.WriteSChar
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: I4f17a2fd6a68f8078b97c96e89e27a5627c57c03
2014-09-26 15:26:20 +02:00
bec72dd34f remove unnecessary casts in calls to SvStream.WriteUChar
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: I2ea4c7d97e745b3e6a3834f41ac7bfefa4883c7a
2014-09-26 15:26:19 +02:00
c476a84abd remove pointless comments
Change-Id: I8edfe830b8f6ca7f1809332870e06d1d286b90e8
2014-09-26 15:25:40 +02:00
d46b16e1e4 remove unnecessary casts's
left over from our conversion of the SvStream output operators
to more specific methods

Change-Id: I63f18be8e940098c2acbbc73ee49ede3a949fcb2
2014-09-26 15:25:40 +02:00
8f684e21de remove unnecessary static_cast's
left over from our conversion of the SvStream output operators
to more specific methods
e Please enter the commit message for your changes. Lines starting

Change-Id: Ibfe7635451ef7b8813d7a59c78c5223092a17ad5
2014-09-26 15:25:40 +02:00
ebdc36c12d SvStream - rename WriteNumber methods
to Write?Int32AsString. Since the original name was so generic as
to be meaningless.

Change-Id: Iaaaf592904af51f2b9988fa8efb344c1b2bf9b0f
2014-09-26 15:25:39 +02:00
a924606810 editeng: std::auto_ptr -> std::unique_ptr
Change-Id: I25e3599a37d720cbcf70ea13ab30234e54637d53
2014-09-25 17:35:05 +02:00
e16c8534f4 fdo#47302: Added insert->fields->page title button
Change-Id: Iebc8298a7e6a7d423d2667eec8a46a936cc4d2cd
Reviewed-on: https://gerrit.libreoffice.org/11599
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2014-09-24 19:30:05 +00:00
4e82025189 Replace some std::auto_ptr function parameters with std::unique_ptr
Change-Id: Ic66d325fd9559c6dde9556c26e5b2a7e60376c49
2014-09-24 16:06:52 +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
d41747cb42 editeng: sal_Bool -> bool
Change-Id: I27296a1a7fdf2ceb89db9e6674a45908fe7d0841
2014-09-12 11:56:43 +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
0836415ffd coverity#703951 unchecked return value
Change-Id: Id9a3c639bd778552b176c19b7574a9d9786ffebc
2014-09-12 01:45:28 +02:00
037d03b9fa Typo: (N|n)ormaly->(N|n)ormally
Change-Id: I96d081f394b0b62d99ec1034bf5e99da9aedd9d9
2014-09-10 22:35:39 +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
a8d59b7f3e Replace uses of old SFX_ITEM_OFF alias with SFX_ITEM_DEFAULT
Change-Id: Ic8751562e4dbfa5b6be903d87d369a750d305495
2014-09-10 16:37:19 +02:00
2ce8b2c37a editeng: avoid autocorrect crash
Happened for me with nFndPos = 30 and nEndPos = 20, and a rTxt that
probably contained "->" twice.

Change-Id: I534c60a5904249e25fdefe45639b4512e6f138c5
Reviewed-on: https://gerrit.libreoffice.org/11344
Reviewed-by: Németh László <nemeth@numbertext.org>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-09-09 20:30:19 +00: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
d59e728be6 Remove (misleading) EditEngine::QuickRemoveCharAttribs
Change-Id: I7a0be4e204a239dfdd9c184b3d54a69debe8a208
2014-09-03 21:05:19 +02:00
c369013edb fdo#83178 fix Chinese Conversion crash
Reviewed on:
	https://gerrit.libreoffice.org/11187

Change-Id: Ifa9c7c1a29d7076903e038d3132c635b1143e2d8
2014-09-01 10:10:42 +02:00
10176b1b6f fdo#33899 autocorrect: don't replace date parts with fractions
Change-Id: I1470d1f3e7b8613c49a4998f3ff106ca5abeff65
2014-08-31 14:53:55 +02:00
f582d9789c editeng: deploy an assert for the default items
Change-Id: Ifc85d682377bb1a3a34e6d49767cbfbe6521c388
2014-08-29 19:18:42 +02:00