1680 Commits

Author SHA1 Message Date
Michael Stahl
4e3cf9cd8e MSVC helpfully provides warning C4310: cast truncates constant value
Change-Id: I985216d7bade6cbb3a037b07fe44438543d63ba0
2014-03-30 23:08:54 +02:00
Michael Stahl
b3e52299c9 tools, sc: fix GCC -Werror=type-limits (comparison is always true)
... on 32 bit platforms.  These asserts appear to be impossible anyway.

Change-Id: I6bd332ca49e9992740315e0f6c58e98ac337817c
2014-03-30 22:41:48 +02:00
Michael Stahl
ba46f32c80 deploy some asserts to detect truncated STREAM_SEEK_TO_END
Since STREAM_SEEK_TO_END is now 64 bits it could happen that some
existing code uses it in some indirect manner and it gets truncated to
32 bits somewhere (on 32 bit platforms); try to detect that with asserts.

Of course the checked value is now a valid stream position, so
perhaps the checks should eventually be removed.

Change-Id: I4248c00d758220bdc3ee94c7aa7a7bd4c86c57f0
2014-03-30 22:41:48 +02:00
Michael Stahl
bb20d37025 tools: try to fix std::min ambiguity for MSVC
Change-Id: Id81ad8702d513c5bb3f4f8de2f9d7c75c7852d4d
2014-03-29 02:09:34 +01:00
Michael Stahl
15006df5bd tools: remove unused SvStream::IsA() and associated ID_*STREAM macros
Change-Id: I6ed0991fb5bd1d5085ee1b93323b57b1afc69860
2014-03-29 02:03:07 +01:00
Michael Stahl
1258b576ae tools: support 64-bit file positions in SvStream
Bump stream positions to 64 bits on:

SvLockBytes::SetSize()
SvStream::SeekPos()
SvStream::SetSize()
SvStream::SetStreamSize()
SvStream::Seek()
SvStream::SeekRel()
SvStream::Tell()
SvStream::remainingSize()
SvStream::nActPos
SvStream::nBufFilePos

Change-Id: I0521fd60d31d1a33e5634cbf51dd42edc46ad919
TODO: adapt callers of Seek()/SeekRel()/Tell()/remainingSize()
2014-03-29 02:03:07 +01:00
Michael Stahl
19bbfc0b39 tools: allow 64-bit positions on SvLockBytes
Bump stream positions to 64 bits on:

SvLockBytes::ReadAt()
SvLockBytes::WriteAt()
SvAsyncLockBytes::m_nSize
SvOpenLockBytes::Seek()
SvOpenLockBytes::Tell()
SvOutputStreamOpenLockBytes::m_nPosition
OInputStreamHelper::m_nActPos

Change-Id: Ica3b674e0ab23a756260a51475e97a5396ecdddb
2014-03-29 02:03:07 +01:00
Stephan Bergmann
f26b981aa2 Remove now unused DBG_CTOR etc. feature
Change-Id: Id5e3191ea1a505bd7d46af355edb99e184b5fcb1
2014-03-28 17:26:09 +01:00
Stephan Bergmann
6ef2df7b9b Remove remaining DBG_NAME* uses
...that had been used for DBG_CTOR, DBG_PROF, etc.

Change-Id: I8eac38e24b7110511feb7813aaf5a20ab82bdbe0
2014-03-28 17:26:09 +01:00
Jürgen Schmidt
a9582c05f8 Resolves: #i124453# check if the resulting polygon...
has already exceeded the number of points (2^16) that can be handled by a tools
polygon

(cherry picked from commit 804e547d70552fd64e1344d538427f8898824b43)

Change-Id: I437a84493e264f7b650561599170e831da20c9aa
2014-03-28 16:25:14 +00:00
Stephan Bergmann
c62d31f791 Simplify #if blocks a little
Change-Id: I2867917e02ef808e4f74175bc146fcbb9bcba7be
2014-03-27 18:51:52 +01:00
Stephan Bergmann
70cc2b191b First batch of adding SAL_OVERRRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-26 16:39:26 +01:00
Stephan Bergmann
cdb473b00a Remove now unused tools/debug.hxx profiling functionality
Change-Id: I13adca8c2f929c8a9226b26ef57b26363dfdf0b3
2014-03-25 18:49:18 +01:00
Stephan Bergmann
2ab3bae2cf Reduce some functions to local
Change-Id: Ia2d7eaaa1381fe46839b0d52a91bdc3a439fa418
2014-03-25 18:49:17 +01:00
Stephan Bergmann
86088dda6e osl_setDetailedDebugMessageFunc is effectively doing nothing
...since the osl/diagnose.h macros got rebased onto sal/log.hxx, so remove the
corresponding tools/debug.h functionality.

Change-Id: Ife4b5b1a2608230d0dbfc3fa8852243c89ed292f
2014-03-25 16:17:09 +01:00
Stephan Bergmann
ff1a592a1f Remove unused DBG_FUNC_* slots
Change-Id: Ief6661ed4bb57546014deef5b10d20fc3a4894fe
2014-03-25 16:17:09 +01:00
Stephan Bergmann
0e36a13a80 MI_DEBUG is never defined
Change-Id: I6f5d74e892d9bdca5a39caa76feb4e3d05b95ba9
2014-03-25 16:17:08 +01:00
Stephan Bergmann
3afc276001 DBG_OUT_WARNING is unused
...and thus DgbData::nWarningOut is unused, too.

Change-Id: I388d2be7dafbfdc173a731dc7daf1c8b5efcd61d
2014-03-25 16:17:06 +01:00
Caolán McNamara
a547f865e0 drop spadmin
Change-Id: Ie10ee80f1d35b40c0baf9d7ba5c1181b52405b5f
2014-03-21 08:56:45 +00:00
Caolán McNamara
133fa638c1 coverity#705325 Missing break in switch
Change-Id: I575292a649ebdf8e16613f07d0c98a68c603a087
2014-03-15 20:47:40 +00:00
Caolán McNamara
1eeb20f395 CurrencyFields cannot be loaded from .src anymore
Change-Id: I3ccdb71e39a13dc8c697d3a52dc693cff10c614d
2014-03-13 11:18:37 +00:00
Caolán McNamara
feff54d8ce MetricBoxes cannot be loaded from .src anymore
Change-Id: Id7b44402975ed75171f4475aa64ebd2a3d6bd687
2014-03-13 11:18:37 +00:00
Caolán McNamara
1de7c36a94 CurrencyBoxes cannot be loaded from .src anymore
Change-Id: I662aab01ecf5f78c4406838118ccea3988060521
2014-03-13 11:18:37 +00:00
Caolán McNamara
4737ed363a DateBoxes cannot be loaded from .src anymore
Change-Id: Ic9d3c73cf67e855dc5931e96bc03014998cce9e0
2014-03-13 11:18:37 +00:00
Caolán McNamara
24cfa40779 TimeBoxes cannot be loaded from .src anymore
Change-Id: I1fa101656538c40c402fc8608f33961f293bd58d
2014-03-13 11:18:36 +00:00
Caolán McNamara
d40971a478 MoreButtons cannot be loaded from .src anymore
Change-Id: Ib831895b33323dd478cc125b3bf93c43826ef59d
2014-03-13 11:18:36 +00:00
Caolán McNamara
7350da1d48 coverity#708556 Uninitialized scalar field
Change-Id: Idf3cf19c9b95e2a1b21efbebd291d7bcd298dad4
2014-03-10 14:43:28 +00:00
Caolán McNamara
7e5f4575ed coverity#708553 Uninitialized scalar field
Change-Id: I73b6127a7e1791392218731a9b9af0795e69222a
2014-03-10 14:43:28 +00:00
Caolán McNamara
3f9d796c41 coverity#708551 Uninitialized scalar field
Change-Id: I04c727bd48a6b2cad9ae545a05fcdd53472bf667
2014-03-10 14:43:28 +00:00
Caolán McNamara
69f106cc35 coverity#708548 Uninitialized pointer field
Change-Id: I7c4326bee7a781cf512c112b78ddf420a834ca15
2014-03-10 14:43:27 +00:00
Caolán McNamara
e7235afeb3 coverity#708547 Uninitialized scalar field
Change-Id: Ib74b633355cc35d02a2a3847d2c98f2d52ca4a70
2014-03-10 14:43:27 +00:00
Caolán McNamara
1e7891c103 drop the SimpleErrorHandler
Change-Id: I968300664c386e6cf33461c5858833832e452e28
2014-03-10 11:36:23 +00:00
Jacobo Aragunde Pérez
b238583071 ooxml: export date controls properly
Export date controls as ooxml Standard Document Tags (SDT) instead
of replacing them with plain text.

SDT date controls contain the date in ISO format as an attribute of
<date> tag, a custom date format that can be specified by the user
in the <dateFormat> tag and the date formatted in that custom format
in the <w:sdtContent> tag.

The unit test testFormControl from ooxmlexport suite was removed,
it only checked if the date control was exported as text and it
obviously fails now. A new test that checks the values of the
exported control was written instead.

A pair of date format functions were added to datetimeutils.hxx.

TODO: to avoid supporting all the posible custom formats that can be
specified in the <dateFormat> tag, it is forced to dd/mm/yyyy on
export.

Change-Id: I9d1b6f840ee9e133831fdb04ad399fe31bcb2063
2014-03-08 17:50:59 +01:00
Eike Rathke
68ec95b3f8 made ListBox handle more than 64k elements, fdo#61520 related
ListBox and related now handle up to sal_Int32 elements correctly.
sal_Int32 instead of sal_Size or size_t because of UNO and a11y API.
Also disentangled some of the mess of SvTreeList and other containers
regarding sal_uInt16, sal_uLong, long, size_t, ... type mixtures.

Change-Id: Idb6e0ae689dc5bc2cf980721972b57b0261e688a
Reviewed-on: https://gerrit.libreoffice.org/8460
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2014-03-05 07:31:19 -06:00
Caolán McNamara
875129a8d4 callcatcher: update unused code
Change-Id: I429eeb3fc0dd0d0c55612eb482d99ab4ceda2f56
2014-03-01 11:00:41 +00:00
Noel Grandin
2dcc6a491a remove unused code BigInt::GetString()
Change-Id: I0e1b1e07103b7aafd0b6691e0fcf0d2c8f612ac8
2014-02-28 08:33:14 +02:00
Noel Grandin
2191ff899b debug only code Resource::TestRes()
Change-Id: I00743ded162ea2772b2fe74df8aecf1fd3a390fa
2014-02-28 08:32:00 +02:00
David Tardon
95b4015584 do not crash if allocation failed
Change-Id: I2fbc259de52a3c7f2c8c33027d74bb857d44b437
2014-02-27 23:40:28 +01:00
Alexander Wilms
2cf9fe7023 Remove visual noise from tools
Change-Id: I779bb5cf991e1fee1e2a2c0a4cd45af3c5f502bd
Reviewed-on: https://gerrit.libreoffice.org/8327
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 05:49:30 -06:00
Noel Grandin
d8f90e02a4 remove unused code SvStream::WriteUCharPtr(unsigned char const*)
Change-Id: I7f341a10d2fffb8eda45478756bc221127ab72cf
2014-02-25 15:16:58 +02:00
Norbert Thiebaud
08d1f22ebb make the implementation use the same type than the declaration
Change-Id: I860e6db6ea4a7a7194283ba4fc23ae30cb1de4f8
Reviewed-on: https://gerrit.libreoffice.org/8201
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-02-24 09:54:09 +00:00
Caolán McNamara
af8712655a coverity#708554 Uninitialized scalar field
Change-Id: Ib604b25f8c2855439171e0606838b7cc36161976
2014-02-23 03:28:24 +00:00
Michael Meeks
ae838de0a3 fdo#66507 - accelerate date calculations as used vs. empty cells.
Change-Id: I5cd642db4e0595c96e1af8adf7c7a45f589a259e
2014-02-20 21:27:38 +00:00
Stephan Bergmann
9c9e4b1942 Add SvStream::ReadCharAsBool
Change-Id: I9dc0525e04de5ae79205872b779dcd0115a9cc14
2014-02-20 19:51:43 +01:00
Jan Hubicka
3db6d2cb99 GCC 4.9, LTO: libvcl uses GZCodec but it is not linked with the implementation
This is not valid C++ and GCC now resolves the virtual calls and inlines
destructor that leads to undefined symbols.

Change-Id: I841d25bc6f994f0e73665b174994f9471597131e
2014-02-18 19:57:31 +01:00
Stephan Bergmann
95401d5898 tools: sal_Bool -> bool
Change-Id: I3aad235d92b3972b44199294c0f3de65ad57f450
2014-02-18 08:18:29 +01:00
Noel Grandin
b2878af322 more SvStream:operator>> conversion
Convert the template based read_lenPrefixed methods to regular
methods.

Change-Id: Ifd0e93aca055e55a0575e4377ec2b8e266dfb019
Reviewed-on: https://gerrit.libreoffice.org/7895
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-02-12 15:32:11 +00:00
Noel Grandin
15535e32dd convert SvStream::operator>> methods to ReadXXX methods
First, I updated the clang rewriter to do the conversion.
Then I lightly hand-tweaked the output for the few places where
the rewriter messed up, mostly when dealing with calls on "this".

Change-Id: I40a6a977959cd97415c678eafc8507de8aa3b1a9
Reviewed-on: https://gerrit.libreoffice.org/7879
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-02-12 15:31:40 +00:00
Caolán McNamara
29eac263c5 coverity#705324 Missing break in switch
Change-Id: I72c9a16c5236824424b33df353606e3e14aa4607
2014-02-11 12:11:43 +00:00
Stephan Bergmann
436c0fc9f6 Simplify InternalStreamLock instance handling
Change-Id: Id5bd445ad4f2397cbff01099ba3779736bb47e61
2014-02-07 12:32:21 +01:00