Commit graph

28991 commits

Author SHA1 Message Date
Eike Rathke
32e8c47df8 refine current date/time hotkey handling
Nearing the "do what I mean" principle..

* key date on time cell  =>  current date + time of cell  =>  date+time formatted cell
  * unless time cell was empty or 00:00 time  =>  current date  =>  date formatted cell
* key date on date+time cell  =>  current date + 00:00 time  =>  date+time formatted cell
  * unless date was current date  =>  current date  =>  date formatted cell
* key date on other cell  =>  current date  =>  date formatted cell
* key time on date cell  =>  date of cell + current time  =>  date+time formatted cell
  * unless date cell was empty  =>  current time  =>  time formatted cell
* key time on date+time cell  =>  current time  =>  time formatted cell
  * unless cell was empty  =>  current date+time  =>  date+time formatted cell
* key time on other cell  =>  current time  =>  time formatted cell

Change-Id: I5025e0d0ea9ac83d1b9e0b130262df6db4693a56
2014-08-20 13:43:31 +02:00
Markus Mohrhard
4fe377ad6d disable the test until I understand the problem
Change-Id: I9a24ff49823a9521d412e1e761c4c1b6ece6b601
2014-08-20 11:27:48 +02:00
Noel Grandin
2922a967a1 java: Avoid naming non-fields with the prefix m_
found by PMD

Change-Id: I5955cfc9c4d777496a2e8e4b2c422a51764a8bc1
2014-08-20 10:35:53 +02:00
Tor Lillqvist
a1a480f91e Wa: C4701: potentially uninitialized local variable 'fVal' used
Change-Id: I579205c4cdc3149ef0c1b01daef32155a13d666b
2014-08-20 09:01:41 +03:00
Eike Rathke
5a05115ee2 more flexible handling of current date/time hotkeys
Let Ctrl+; current date and Shift+Ctrl+; (Ctrl+:) current time behave more
flexible, depending on the formatting (and as such the type) of the existing
cell content.

key date on time  cell => current date + time of cell => date+time formatted cell
key date on other cell => current date => date formatted cell
key time on date  cell => date of cell + current time => date+time formatted cell
key time on other cell => current time => time formatted cell

Change-Id: I2ccbfbab3c50c36a72c4db4696520e32f94caefa
2014-08-19 21:54:46 +02:00
Eike Rathke
11f145d90f a date is a date, without time
And use DateTime instead of manually concatenating Date and Time.

Change-Id: I6f9fb988beea2a9a17c976d3b98860c4f9ed063b
2014-08-19 21:54:44 +02:00
Noel Grandin
4b4bff3402 java: no need to instantiate String objects directly
Change-Id: I7610774c94bf673ed3b574ffce04c4ee6ca93c03
2014-08-19 14:57:18 +02:00
Noel Grandin
0764292c5d java: use 'Short.valueOf' instead of 'new Short'
Change-Id: Icef19ef61ee0af2dd3bda527263934006271f219
2014-08-19 14:57:18 +02:00
Noel Grandin
ff0ad0493e java: use 'Integer.valueOf' instead of 'new Integer'
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
2014-08-19 14:57:17 +02:00
Noel Grandin
be1bb7b1cc java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
2014-08-19 14:57:16 +02:00
Noel Grandin
56ef5533fc java: classes in java.lang package do not need to be fully qualified
Change-Id: I7b18f62336c3a8ca4c538b30ce04c99f202a4756
2014-08-19 14:57:16 +02:00
Markus Mohrhard
8ae264eb2f enable test after fixing the validation error
Change-Id: I99cd2c23d640eef744b292d3643baab6d42d191f
2014-08-19 12:48:53 +02:00
Kohei Yoshida
3104f95254 Let's not export sheet tab color when it's not set.
COL_AUTO is the default value which is treated as color not being set.  The
old code would export it as a white color which is not correct.

Change-Id: Ib68fccfb228333f2059edc4cfffeed90880ebc60
2014-08-18 15:18:35 -04:00
Kohei Yoshida
ead1db7d49 Write test to ensure that we export sheet tab color settings correctly.
Previously, we would incorrectly export a sheet tab without any color set
as a tab with white color.

Change-Id: I97e59a0d8e2fba6db64149f53acfe4331a5ce2ba
2014-08-18 15:18:34 -04:00
Stephan Bergmann
759f5d24b0 Consistency around XColorItem in svx/sdshcitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1 "Remove unused ctors" and
68969cc61a "Consistency around SdrMetricItem."

Change-Id: I7ecf827a0713efaecb4b0eb49f9f8c06f8c59091
2014-08-18 18:18:08 +02:00
Stephan Bergmann
08edafa656 Consistency around SdrOnOffItem in svx/sdtcfitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1 "Remove unused ctors" and
68969cc61a "Consistency around SdrMetricItem."

Change-Id: Ib461b5d3702e00a9d7cef3229c44e3328c776e1d
2014-08-18 14:56:55 +02:00
Caolán McNamara
d21d5a7261 drop unnecessary shl.hxx includes
Change-Id: Ieb984987c4a4f888a563377e0500444b12f43506
2014-08-18 12:59:49 +01:00
Caolán McNamara
a107bdfdfc ErrorBox->MessageDialog
Change-Id: I57d4e43460e40d3aff54873280eddbb18c12446b
2014-08-18 10:57:21 +01:00
Stephan Bergmann
a51c423743 Consistency around SdrMetricItem in svx/sdsxyitm.hxx
...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1 "Remove unused ctors" and
68969cc61a "Consistency around SdrMetricItem."

Change-Id: I3734cb14b6ed8f556af85b234968682a55ac8a4c
2014-08-18 10:55:36 +02:00
Thomas Arnhold
dc053144e6 pivottablelayoutdialog: define default button
Change-Id: Ica4bc2a52e7351899a5741086c6db299caa5ed16
2014-08-18 01:45:14 +02:00
Caolán McNamara
209cdaa109 coverity#737702 Uncaught exception
Change-Id: Idfc005c1c34c609b7dcaae266cdaf6a15a403e5a
2014-08-17 16:39:19 +01:00
Thomas Arnhold
e99535df4d remove executable bits
Change-Id: Iec785ae538de81325812b1e6fe33115789b39770
2014-08-17 05:50:13 +02:00
Olivier Hallot
18749c7ad3 fdo#80453 (part) Help button for insert random #
* Insert help button in dialogo
* HIG-ify dialog.

Change-Id: I839af28981e9bd980842e73e29bd6443f4154b86
Reviewed-on: https://gerrit.libreoffice.org/10944
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-08-16 22:18:27 -05:00
Thomas Arnhold
fceb7534bf fix unit test after size_t change
Change-Id: I511fd2c11fc1506c0cf7532347cca7933ed8ed5a
2014-08-17 05:15:29 +02:00
Thomas Arnhold
4f1dabfd44 warning C4800: 'int' : forcing value to bool 'true' or 'false'
Change-Id: Ic438fe098f80e96dd4679dda6e5de93a1ba9dc6a
2014-08-17 05:15:20 +02:00
Matteo Casalin
47e2fd0dc8 Consistently use size_t and SAL_MAX_SIZE
Change-Id: Ibab89984ec94556ec368653b6db50c6c2e380dec
2014-08-16 21:52:32 +02:00
Matteo Casalin
384cb5ff7b Consistently use size_t and SAL_MAX_SIZE
Instead of a mix of sal_uIntPtr, sal_uLong, int, and so on.
Also change CONTAINER_ENTRY_NOTFOUND=ULONG_MAX to SAL_MAX_SIZE as
return value in case of failure and in the related tests.

Change-Id: Ie778a849253b4be84fbcdab9557b7c4240233927
2014-08-16 21:52:28 +02:00
Markus Mohrhard
1cf19ea847 don't call ScMarkData::GetMarkedRanges in ScColumn, related fdo#79422
This drops the calls to ScMarkData::GetMarkedRanges by a factor of 1k.

Change-Id: I12b1ab3877120a1fbccaccaa7996cbb7efe948b6
2014-08-16 05:25:32 +02:00
Markus Mohrhard
17f6f60c1c add test case for fdo#82503
Change-Id: I715f8b2c09bd6af2cf1f45029f0561d79817deed
2014-08-16 03:16:28 +02:00
Markus Mohrhard
8c9014cc6e copy conditional formatting for single cells, fdo#82503
Change-Id: I22f239fbbbfa3ac562b860efb990dff10d0e0e24
2014-08-16 03:16:27 +02:00
Markus Mohrhard
08d4ea4b48 use scoped_ptr instead of shared_ptr
Change-Id: Ic814a2301aaf6e57aa8ca04b837acafb6e4f4566
2014-08-16 00:14:26 +02:00
Markus Mohrhard
0e633c51d8 add test for fdo#82128
Change-Id: I3dd0005f00c4a861103ffd1a0422b9fc9397f6fb
2014-08-16 00:14:26 +02:00
Markus Mohrhard
2cc0109c0a use correct namespace for table protection elements, fdo#82128
Change-Id: I5b9cb4a76739a0c91597c0470c737439d2b07e4f
2014-08-16 00:14:26 +02:00
Eike Rathke
1d67f3661c unit test for sort with sheet references and external references, fdo#77018
Change-Id: I4b60fe3f3594fbe13ae25ac29c8701d80870595e
2014-08-15 16:56:55 +02:00
Caolán McNamara
174e6796df Revert "another memory leak based on release().release()"
This reverts commit 1e9baadcb7.

because JunitTest_sc_unoapi now fails
2014-08-15 15:40:06 +01:00
Eike Rathke
971e230a99 unit test for sheet and in-range range references after sort, fdo#79441
Change-Id: I09327866a92b1f53a7c0a76c38cf79856390d69a
2014-08-15 15:10:14 +02:00
Markus Mohrhard
1e9baadcb7 another memory leak based on release().release()
Thanks Michael Meeks for noticing.

Change-Id: I8c27215d3cf4624a19f4fd905758e588b342c6c9
2014-08-15 03:48:25 +02:00
Thomas Viehmann
6af3bc396e fdo#79116 make paste special easier to use
This patch adds three short cut buttons to the calc paste special
dialog: paste values only (numbers, strings, dates), paste values and
formats, and paste transposed.

Change-Id: Ie70fbaa28976b2311b1d9cf53b094a5083fb42d4
Reviewed-on: https://gerrit.libreoffice.org/10928
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2014-08-14 19:50:27 -05:00
Eike Rathke
69adec3ec0 correct references after sort, fdo#79441
5c6ee09126 introduced a different
algorithm for reference handling during sort. Unfortunately that clashed
with the SC_CLONECELL_ADJUST3DREL introduced a little earlier resulting
in relative 3D references effectively being "adjusted" twice.

Furthermore, in-sort-range range references to one row (or column) were
not adapted to the move at all if the formula within the range listened
only to ranges and not a single cell. Added collecting and adjusting
area listeners for this.

Last but not least, external (relative) references need to be treated
the same as internal 3D references, making them point to the same
location after the sort.

Change-Id: I492768b525f95f1c43d1c6e7a63a36cce093fa5a
2014-08-14 23:50:58 +02:00
Michael Stahl
26eca5a184 sc: stupid auto_ptr deprecation
Change-Id: I7ef7de18c2f03d6dc825c12f14f3607fb64008cf
2014-08-14 18:55:18 +02:00
Takeshi Abe
6a686b41ee fdo#75757: remove inheritance to std::vector
Change-Id: I07daec0ced64d0ca6ad2dd06fd19a1c7366e5c31
Reviewed-on: https://gerrit.libreoffice.org/10921
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-08-14 11:58:30 -05:00
Noel Grandin
ac5954d7c5 java: remove commented out code
Change-Id: I05c907a38b562231e968c17f14e09ef80e0a6ed1
2014-08-14 10:59:48 +02:00
Tor Lillqvist
4891de14fb WaE: C4189: 'aTests' : local variable is initialized but not referenced
Change-Id: I3526b45c374511b77086ffd81566cc1e9b813142
2014-08-14 09:36:52 +03:00
Michael Stahl
57c59b2466 warning C4245 signed/unsigned mismatch
Change-Id: Ibff6c806c287a2303cdf3b1942d5d5014a73bd30
2014-08-13 23:01:02 +02:00
Takeshi Abe
03889338f6 fdo#75757: remove inheritance to std::vector
Change-Id: I265d3a51a4eabee734e7ac15841f56bcae0807e4
Reviewed-on: https://gerrit.libreoffice.org/10916
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-08-13 12:09:56 -05:00
Szymon Kłos
5cb5c24cc6 RID_SCDLG_DAPISERVICE conversion to .ui
Change-Id: I4194af3033f6591c7a8ca219aebf2ef816edcd63
Reviewed-on: https://gerrit.libreoffice.org/10915
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2014-08-13 12:04:15 -05:00
David Tardon
a8525fe5cf fdo#82418 prefer UTF-8 over UTF-16
Change-Id: Id2c990d24dc942a6d061146ea88cf53ee29a1c3d
2014-08-13 17:00:16 +02:00
Thomas Arnhold
986b8dbf76 warning C4373: 'ScTableSheetsObj::importSheet': virtual function overrides...
...'com::sun::sheet::XSpreadsheets2::importSheet', previous versions of
the compiler did not override when parameters only differed by const/volatile
qualifiers.

XSpreadsheets2.hdl defines this as:

virtual ::sal_Int32 SAL_CALL importSheet( const ::css::uno::Reference< ::css::sheet::XSpreadsheetDocument >& srcDoc, const ::rtl::OUString& srcName, ::sal_Int32 nDestPosition )

Change-Id: I286fa542a2124a85d7b835f257865f8a05c23f96
2014-08-13 10:10:51 +02:00
Thomas Arnhold
6632987e02 warning C4245: 'initializing' : conversion from 'int' to 'sal_uInt32'...
...signed/unsigned mismatch

Change-Id: I659db5cf9e1e1e682f27b689a06f28a123a9e82b
2014-08-13 10:10:48 +02:00
Thomas Arnhold
6da4341228 warning C4242: 'initializing' : conversion from 'size_t' to 'sal_uInt16'
Change-Id: Ie5e64701a011768d861607a2e4267d75b995413e
2014-08-13 10:10:38 +02:00