Commit Graph

274 Commits

Author SHA1 Message Date
cf01aff002 remove operator>> and operator<< methods
in favour of ReadXXX/WriteXXX methods

Change-Id: I39dfeee92e5b01fdf43db3bbee0f2fc471017653
2014-12-11 14:57:34 +02:00
c2a93a21a5 long is 32 bit on Windows x86_64 platform
So that this is always wrong (on this platform) to write:

reinterpret_cast<foo>(reinterpret_cast<long>(bar))

it should be:
renterpret_cast<foo>(reinterpret_cast<sal_uIntPtr>(bar))

Change-Id: Ia286246ee1616988f755c2d2054b26efacc51af0
Reviewed-on: https://gerrit.libreoffice.org/13366
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-12-10 21:35:43 +00:00
827430c8c0 Fold URE: Windows
...assuming the delayLoadHook in cli_ure/source/native/native_bootstrap.cxx is
no longer necessary and loading of cppuhelper from the program dir cannot fail
regardless in whatever scenario the cli_cppuhelper library itself is loaded.

Change-Id: I13f32b327bca4cce9780864f5e57cdad3860afe5
2014-12-03 15:19:55 +01:00
34411dc2f0 Mark Color::AsRGBHexString() as const
Change-Id: Idf00e228c480afe2bbbb64682ed01f2c778b6d9d
2014-11-19 22:50:14 +01:00
764600bc61 Apply pimpl to ResStringArray, to hide its internals.
Change-Id: I23969735f35e221a1aad39081ee63d02066d856f
2014-11-18 21:47:10 -05:00
6d7282fa8a Apply pimpl to Fraction.
Change-Id: I60eb597a6374b807b2264af6d5841a42e9b1c0f3
2014-11-17 16:37:47 -05:00
0348341f5e Make these methods non-inline.
Change-Id: I0b24e34dec6c452659b224b45a6849dafe708c3b
2014-11-17 16:37:33 -05:00
da40cac540 Fix common typos. No automatic tools. Handmade…
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959
Reviewed-on: https://gerrit.libreoffice.org/12164
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-12 11:04:11 +00:00
06bde51ced tools & vcl: move OutputDevice::ImplRotatePos() to Point::RotateAbout()
OutputDevice has a private function that rotates a point around another
point. However, there is no real reason why OutputDevice should be
responsible for this - it's really the responsibility of the Point
class in the tools module. Therefore, I've moved this functionality out
of OutputDevice and into Point, but I've renamed it from the rather
confusing name "ImplRotatePos" to "RotateAround", which is what it
actually does.

Change-Id: If12fb40a7b476653224d4edfc01887bc91a80c7d
Reviewed-on: https://gerrit.libreoffice.org/12171
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2014-11-01 22:18:00 +00:00
0c0e3e7539 Fixed typos. No automatic tools (sed, and so on).
Change-Id: Ia43976d84eede6f699381bc4f3daf89b95e4cb4f
Reviewed-on: https://gerrit.libreoffice.org/12150
Reviewed-by: Bryan Quigley <gquigs@gmail.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-10-30 17:16:02 +00:00
31ca7f6d71 tools: remove DBG_ERRORFILE and replace all callers
Change-Id: Ic76ccc49b9291fe82c56974eb6237cd3b85d91c8
2014-10-29 11:37:47 +01:00
2ce0aedede fdo#81356: use boost::rational internally in Fraction
Change-Id: I6f40eafee7652209395bd471e3508fe3a3d19d73
Reviewed-on: https://gerrit.libreoffice.org/12085
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-10-28 17:15:10 +00:00
0a82645c36 loplugin: cstylecast
Change-Id: Ia0f5f0d0efbe4693aba347bff32cd694117251fe
2014-10-24 08:58:05 +02: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
968cadb825 allow construction of BigInt from sal_Int64 on 32 bit
Change-Id: Ib68920fc9bd693d2f2679b4fc27d9956dc42fc86
2014-10-17 13:17:21 +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
aef6ab2098 Strip svidl down to what is still used
...the generated .ilb, .lst, and .sid outputs requested by SdiTarget were
apparently unused.

Change-Id: I1abb2abc7945070451fce4a98a11d955515e3f63
2014-10-16 08:13:33 +02:00
4e3772b1b4 fdo#75757: remove inheritance to std::map
from UniqueIndexImpl.

Change-Id: Iaa9040dff117ed5b05955c9f6eef31878dccf3b0
Reviewed-on: https://gerrit.libreoffice.org/11951
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-10-14 16:31:16 +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
a0a919d2b5 remove SvRefBase::QueryDelete
Move it's functionality into the only place that needs it, in the dbase
driver.
Removes an extra virtual call from a widely used class.
The dbase driver seems to be using to perform some kind of whacky object
recycling, so it's not like we want this functionality to be used
somewhere else.

Change-Id: I41018f71e0b0a79fdd3d527536f0ac95c788e614
Reviewed-on: https://gerrit.libreoffice.org/11786
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-09 08:18:24 +00:00
c625525ddc rename SvRef::AddRef to AddFirstRef
to make it's intended purpose clearly distinguishable from AddNextRef

Change-Id: I5da780b48b19fd873667b648031bc394113f953b
Reviewed-on: https://gerrit.libreoffice.org/11763
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-03 05:25:41 +00:00
173234f394 coverity#708208 Uninitialized scalar field
Change-Id: I5f1e889746067bad478d8fa3acd8c41c893b135a
2014-10-02 09:14:49 +01: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
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
ea2d767d44 tools: change INetURLObject::getData to return std::unique_ptr
Life-cycle becomes a lot more obvious this way.

Change-Id: I1ca99607f609a2223011c40447ad1cd9ca5ccaa5
2014-09-26 16:38:34 +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
ed085a6d20 cleanup GUID/ClsId/CLSID types
- rename GUID to SvGUID so we don't need an #ifdef WIN32
- drop ClsId struct, since it is used interchangeably with GUID and has
the same structure

Change-Id: Idf5c14c82a6861ef585fb57896a9b12cfe40374c
2014-09-26 13:13:42 +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
ed75aa2719 create clang plugin to warn about C-style casts
We don't like C-style casts in our nice C++ code

Change-Id: I94e7ec90de9275cd6e20c4146d4f3a74bed93c9d
Reviewed-on: https://gerrit.libreoffice.org/10367
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-09-07 02:42:30 -05:00
0a8bf4b534 FloatingWindows are no longer loaded from resource files
Change-Id: I2705bbb4db52779e0065400f09604384fd9cf151
2014-09-06 07:02:42 +01:00
4cf5acef7d CancelButtons no longer loaded from resource files
Change-Id: If95ae86708660007e6a0f4df27b3c364a9653dae
2014-08-27 10:18:32 +01:00
54806224e3 OKButtons no longer loaded from resource files
Change-Id: Ice1d71e730519697c891d66909550876c9d23ebb
2014-08-27 10:18:32 +01:00
6802dc06de Dialogs no longer loaded from resource files
Change-Id: I55295009f474dbac15be792049fa5c6c95c1ec07
2014-08-26 17:00:21 +01:00
ca68971f0a ModalDialogs no longer loaded from resource files
Change-Id: I2d208c7cc5ff9bf26bff5ab2aa40e0bf57373342
2014-08-26 17:00:21 +01:00
07244947b5 MessBox not loaded from resource files anymore
Change-Id: I12378a1c80e1070763cd2bd0539d74f4cc270a30
2014-08-25 16:45:32 +01:00
bddd6d823d WarningBox are no longer loaded from resource files
Change-Id: Ib05a9876c0b1d3425dd1629f8a0fe3d16a57cc30
2014-08-25 16:45:31 +01:00
fd345ccfaf queryboxes cannot be loaded from resource files anymore
Change-Id: I2ee03b2f8f34d9ecf8a762e7845410fd9a31590f
2014-08-25 16:45:28 +01: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
50fffcaa05 Infoboxen are no longer loaded from resource files
Change-Id: If387291e9e145ee36338b1e560f18889c3b62674
2014-08-20 20:22:24 +01:00
d4a615bf62 ErrorBoxen are no longer loaded from resource files
Change-Id: I099258e449d0155154d60a839f9495236cb48cbb
2014-08-20 20:22:24 +01:00
afa5d63e2a TabPages are no longer loaded from resource files
Change-Id: I009e0f388cfe1861cef89d2148a02380dd47c1ff
2014-08-20 16:35:09 +01:00
e97997f1e5 SvMemoryStream.remainingSize ret. size to end of data not buffer
SvMemoryStream remainingSize returned the size from current
position to internal buffer size instead to end of data. This
was not consistent with what remainingSize description says on
SvStream (and other SvStream implementations work) and what the
user expects.

Change-Id: I7ff391754a386c5f067a4bd4eed2ee7f2d7fd77e
2014-08-16 20:49:19 +02:00
1c13f9c2b6 RSC_TRISTATEBOX is no longer used
Change-Id: Ib3f43db131cf5562ad011538873c2ee51839665c
2014-08-16 18:36:24 +01:00
b0da096c61 RSC_MULTILINEEDIT no longer used
Change-Id: If56233b5226cec9516d5e2f8992e1b0beae733bf
2014-08-16 18:33:04 +01:00
e09e956a0c RSC_TABCONTROLITEM* no longer used
Change-Id: Ic496662d623c4732db41476109b3731cf1fd71a0
2014-08-16 18:31:05 +01:00
07048650e2 RSCMENUBUTTON_MENU is not longer used
Change-Id: I2e12d923a07385fc6a036863070a10666542d39d
2014-08-16 18:31:04 +01:00
924dda90a9 RSC_MENUBUTTON is not in use anymore
Change-Id: I853b6b1cfcd4847603d9920a47298d1b9105b46f
2014-08-16 18:31:04 +01:00
748ed65ffb drop TabControl resource loader
Change-Id: Idb909c205dfadaadeb8b98ce08fe2f4286cfce26
2014-08-15 17:02:59 +01:00