Commit Graph

828 Commits

Author SHA1 Message Date
710f41b7ae Clean String and sal_Bool in tools
Change-Id: I6a92196f33d7a5278c7dcc426112e9c56d582655
Reviewed-on: https://gerrit.libreoffice.org/4627
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-06-30 04:58:49 +00:00
b9337e22ce execute move of global headers
see https://gerrit.libreoffice.org/#/c/3367/
and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details

Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a
2013-04-23 22:20:31 +02:00
62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01:00
609cb4b332 we want the int. overloads of abs() here
Change-Id: Ie82c51f65a2a0e13d6d30c85a23286574fd50b90
2013-04-20 16:27:19 +02:00
699a22fd49 Include <cmath> for std::abs()
Change-Id: Id94260d41e821386e2c0aef67075658bee7fd49f
2013-04-20 16:09:14 +03:00
0f200cc30e fdo#63154: Change Min/Max/Abs for std::min/max/abs
Now all these usages were removed from LO.

Change-Id: I8a7233db20abdcdbb18428ad4004c78cc516a0e6
Reviewed-on: https://gerrit.libreoffice.org/3326
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-04-20 11:09:54 +00:00
5df981a2a2 tools ::Time: change constructor to fixed-length integers
Change-Id: I20180cda1a28f898f487aff605796077d3418be3
2013-04-19 17:27:10 +02:00
ec49915442 Wrap large values in SAL_CONST_UINT64
Change-Id: I865808911043a61de5c4209fa889dbff7c8baf28
2013-04-19 17:05:55 +02:00
6e7cec47f0 Presumably "call clock" should be "wall clock"
Change-Id: I7bcdfccc17de7057cc47720bd6ce78345f2d6d7c
2013-04-19 11:09:26 +03:00
9830fd36db date/time IDL datatypes incompatible change
- nanosecond precision
 - signed (allowed negative) year

Also: assorted improvements / bugfixes in date/time handling code.
Some factorisation of copy/pasted code.

Change-Id: I761a1b0b8731c82f19a0c37acbcf43d3c06d6cd6
2013-04-18 21:34:46 +02:00
70b45b2f55 Move {pre,post}x.h to where {pre,post}mac.h and {pre,post}win.h are
Change-Id: I561aa6cc1de7ed6128d25c82cd493d5d5718e052
2013-04-16 23:12:49 +03:00
1264480bc3 fdo#60724 correct spelling
Change-Id: I3d978cb657647b4a4e9709258c6a6a4ac1d339a9
2013-04-15 05:39:31 +02:00
c32b6be06b fdo#60724 correct spelling
Change-Id: Ieb653adbd0cb4371ec5db57e70bcc551872f647f
2013-04-15 05:32:37 +02:00
c3d8b06f00 Get rid of SHL_SBC
GetAppData(SHL_SBC) was used only locally in the sb library so no need for
it. Just use a static pointer field.

Change-Id: I37c8429b6c9e521a00c52bb622f78bdc4afe345c
2013-04-12 23:04:11 +03:00
8dba30fcf6 Get rid of GetAppData(SHL_IDE)
It seems to be used only locally in basctl so there is really no reason for
it.

Change-Id: I9ad0a67621e190257e028fd3689f692e639eaf56
2013-04-12 22:42:08 +03:00
8034992e22 Bin a local X11 wrapper header, vcl/inc/unx/salstd.hxx
We already have <tools/prex.h> and <tools/postx.h>, so make those be
sufficient instead. Bin another local vcl header vcl/inc/unx/svunx.h that just
included those prex.h and postx.h. Adapt includers accordingly.

Change-Id: I6638b3260fd3da45478fcc216b41f8c8a539f0d7
2013-04-10 19:26:05 +03:00
4976dd85fa Introduce characters utilities in rtl/character.hxx
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, with slight modifications
to sal/inc/rtl/character.hxx:
* Replaced "#pragma once" with explicit include guard for now.
* Missing includes.
* Cosmetic clean-up.

Change-Id: I94d01cd4e766f92c70f941839a67101fa2c97654
2013-04-10 10:43:38 +02:00
ba044b1e96 remove needless forward rtl::OUString declarations
Change-Id: I97d91a758dd82d64768d75c1d2ddd279de5f6034
2013-04-07 14:23:12 +02:00
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
5b08c6e7a2 Typo in comment in resmgr.hxx
Change-Id: I6378c79f77ab897bf5a4e39c00944037beeef328
Reviewed-on: https://gerrit.libreoffice.org/3220
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2013-04-07 09:15:29 +00:00
876c619b94 new module i18nlangtag
Moved portions from module i18npool, all of former i18nisolang1 library
that now is i18nlangtag. Included are languagetag, isolang and mslangid.

This i18nlangtag code is now even used by module comphelper, so
disentangling i18npool and making this an own module was needed to not
create circular module dependencies.

Change-Id: Ib887c3d6dde667403fd22d382310ba5f1a9b0015
2013-04-05 19:10:48 +02:00
75e014c307 fdo#61514 clean obsolete tools/ filesystem abstraction
Change-Id: I7d1d5eca43d0b0f9a013e31383abc574a7b15f93
2013-04-04 21:40:57 +02:00
c8f8f36027 fdo#44994 write out tools' FileCopier class
Change-Id: Ie3d04f0b2ed35099d5682d165e17c10a6d736f99
2013-04-04 19:31:20 +02:00
d19a51d787 delete unused header file
Change-Id: I96a620475f9618b55fc0b3a294037ca5968b683c
2013-04-04 18:38:01 +02:00
5be14df244 ResMgr with LanguageTag
Change-Id: Ie5ce9157a7ea59db7b0509fbaec61d07f8f9edf0
2013-03-29 14:09:01 +01:00
f222e81cb8 Change how Rectangles are printed, special case for EMPTY
Change-Id: I0fe230875e785b811ae09e04399790a53b354dd6
2013-03-26 19:01:38 +02:00
f9af9abe62 debug: remove binfilter debug macro
Change-Id: I419c37860a21ae5ab416a2c8ec3c742fbaf6a980
2013-03-21 19:12:16 +01:00
9bd80d67de The private SvFileStream::GetFileHandle() was used only on UNX
Drop the Windows implementation which wasn't x64-clean anyway.

Change-Id: I1622196dc4c3b940cc8d629016985cf97480a059
2013-03-21 13:07:43 +02:00
37d2588844 Remove RTL_CONSTASCII_(U)STRINGPARAM in tools
Change-Id: Id97070321ad6b20f349896d3b4e1ae51cc82ece7
Reviewed-on: https://gerrit.libreoffice.org/2769
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-03-16 17:12:27 +00:00
a548924aec tempfile: Creating tempfiles in a given folder is not used
It's always the case, that the default temp folder is used. aName and
aRet are always empty, pParent is no longer used. So the pParent
argument makes no sense anymore.

bDirectory makes no sense without pParent and is apparently unused
(always sal_False by default).

The include of tools/tempfile.hxx in unotools/tempfile.cxx in not
necessary.

Conflicts:
	tools/source/fsys/tempfile.cxx

Change-Id: I9c53b263a640e53140a8ae8795181b1c5e43f26d
2013-03-12 16:20:15 +01:00
7d1f4cdec3 fdo#38838: Converting String/UniString to OUString
Change-Id: If64db96005fcd8a42e4fa24041867b99183965f9
Reviewed-on: https://gerrit.libreoffice.org/2586
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-03-11 15:50:44 +00:00
77e21bb36a Change definition of "dark" colour for fdo#61993
- Increase the threshold for "dark" colours from Luminosity<=38 to
  Luminosity<=60.

  This makes LibreOffice align more closely with MS Word when
  considering whether "automatic" font colour should be black or white,
  a decision that is based on whether the background colour is "dark".

  Beware that this also affects other areas.

- Fix the coefficients for GetLuminosity which appeared to be off
  by one according to the "Rec 601" coefficients for Luma quoted at
  http://en.wikipedia.org/wiki/Luma_%28video%29

Change-Id: I0af1f77909713e3db5ea8ee98456146569679594
Reviewed-on: https://gerrit.libreoffice.org/2601
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-03-11 14:54:57 +00:00
8c801204f9 SHL_SHL1 now unused, too
Change-Id: If73c578cf698b11b14b0f97b5f0deb0febac9b2f
2013-03-04 13:58:41 +01:00
5b04c9063c remove unused and commented out code
This code gets never called.

Change-Id: I59228cba1444b7b09f74eb5cf8da9b755c7c32f7
2013-03-04 11:34:07 +00:00
66f426b8fa The macro FEAT_FSYS_DOUBLESPEED has been removed and the related #if / #endif have been removed too.
Bug: 61516
Change-Id: Id347e87a8789ddbe550dde7d7281d9c1cad0c199
2013-03-04 10:33:40 +00:00
32943a5b7e binfilter: remove some traces
Change-Id: I5b03dcb5d1f8c73c7a308e7ae209cc7872f18c61
2013-03-03 20:30:44 +01:00
875c997c7d fdo#39446 - Bloat Removal. Removing uncallable code with callcatcher
Removed several unused methods.

Could not remove ScVbaFormat<ooo::vba::excel::XStyle>::getAddIndent() and ScVbaFormat<ooo::vba::excel::XStyle>::setAddIndent(com::sun::uno::Any const&) because it breaks compilation (they are implementing pure virtual methods).
Should Test::test1Table1Page() really be removed? (test class)

Conflicts:
        unusedcode.easy

Change-Id: I98a761f66f28e3a82661c10a5fa1dc7e109fff2f
2013-02-27 15:40:16 +01:00
3e1dea5948 tools: move FileCopier out of public headers, and remove unused bits.
Change-Id: Iccd052ae2587bb4448ecb5bc94aeba5dd2a2291e
2013-02-27 09:09:03 +00:00
63b0ce97ba fdo#38838 searched, replaced and removed String::CreateFromInt32().
I ran the following code replace:
    s/(Uni|Xub)?String\s*::\s*CreateFromInt32/OUString::number/

And finally removed String::CreateFromInt32().

Change-Id: I53b26a59c68511ae09f0ee82cfade210d0de3fa5
Reviewed-on: https://gerrit.libreoffice.org/2279
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-02-24 12:59:02 +00:00
66e5cbc55a Fix typo "sucessfully" -> "successfully"
Change-Id: I01c85e4d3853c44fa05acc3019bc35c56c4f655e
2013-02-23 15:42:54 +01:00
9e310cc329 fdo#38838 Some removal/replacement of the String/UniString with OUString
Change-Id: I6daea312198fae3a9717bd8d4fea6371aa4cd275
Reviewed-on: https://gerrit.libreoffice.org/1962
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Tor Lillqvist <tml@iki.fi>
2013-02-08 14:57:16 +00:00
aab9c9deee Detect SvStream::operator<< calls with bool args w/o using -Wsign-promo
...as -Wsign-promo caused other problems and has been removed again with
488823a140217e393298bc83e75084041a85ed45 "Remove -Wsign-promo."  It had
originally been introduced with e8bbb76827dd7a0e30d7d1db34a812a84d85f390 "ensure
correct export size type in stream operation," apparently to detect an
SvStream::operator<< call with a bool argument that would pick the "int"
overload instead of the "unsigned char" (aka sal_Bool) one (which would have
happened to trigger the -Wsign-promo warning "by luck," given that sal_Bool is
unsigned char and not signed char, say).

Change-Id: I0bf4389753e53a535bd90ca2a98b6a5be63d179a
Reviewed-on: https://gerrit.libreoffice.org/1798
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-01-22 11:56:27 +00:00
98e9012011 make fast string concat comparisons non-ambiguous
Follow-up to https://gerrit.libreoffice.org/#/c/1803/ .

Change-Id: I9131854a579ef57e38dfef7faa539bec98fc305b
2013-01-22 12:27:09 +01:00
fea25896a8 tools/string.hxx: add operator==/!= for OUString/String
This has the disadvantage that it makes comparisons involving fast
OUString concatenation via operator+ ambiguous, as can be seen in
scriptdlg.cxx, but it allows comparing String and OUString wihout
explicit conversion, which is nice for incrementally converting code.

Change-Id: Ibfc728bdb161a01e0f8311915c97bcbba8b58c0b
Reviewed-on: https://gerrit.libreoffice.org/1803
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-01-22 11:26:39 +00:00
a4c7ded1fd Cleanup: #include <tools/gen.hxx>
Change-Id: Ic547b4a59102afc8bdbc85ec95ac312e32ef2530
Reviewed-on: https://gerrit.libreoffice.org/1484
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2013-01-07 13:14:57 +00:00
f98407403f Revert "String Cleanup and news OUString methods/constructors"
Broke a unit test and made all tinderboxes red.

This reverts commit 3179055dc3e267c961a5618c810fbc0df1858d72.
2012-12-29 12:50:32 +02:00
3179055dc3 String Cleanup and news OUString methods/constructors
Change-Id: Ia6142020330d0e12650fdc519b66f00e607eac42
Reviewed-on: https://gerrit.libreoffice.org/1491
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2012-12-28 18:16:04 +00:00
5c0e79f821 remove unused ifndef
Change-Id: I759d2c7cea6a27fe676d1c1a17586445aa013ee9
2012-12-17 23:57:22 +01:00
0d5644bbe9 UniString::Fill -> OUStringBuffer::padToLength
none of these strings starts out before "Fill" longer than the size they are
asked to be filled to so there are no trailing unfilled bits to consider

all of which means that we can get rid of UniString::Fill now

Change-Id: I8da21e9787017da9243a2c1d7118d3fbcca2a7fb
2012-12-17 09:35:24 +00:00
55b3794950 callcatcher: update unused code list
Change-Id: Ie975cd2df17461de1bb94a23d4daf081f6588fe7
2012-12-14 11:37:22 +00:00