Commit graph

391429 commits

Author SHA1 Message Date
David Ostrovsky
e16fa715c4 Handle wchar_t as native C++11 type on windows
The option /Zc:wchar_t- prevented to use wchar_t as a built-in type
according to the C++ standard. In Visual C++ 6.0 and earlier, wchar_t
was not implemented as a built-in type, but was declared in wchar.h as
a typedef for unsigned short. Now, years later after the end of life
this outdated toolchain, there is no reason not to use native type.

The only issue could be the ABI compatibility. But on a quick look at
least, it looks like none of the mangled C++ symbols in the stable URE
interface actually depend on wchar_t.

We forgot to get rid of /Zc:wchar_t- in 5.1. Do that for LibreOffice
5.2, though.

Change-Id: I8d6b380660859efa44c83c830734978d31d756a0
Reviewed-on: https://gerrit.libreoffice.org/22589
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-05-03 19:26:06 +00:00
Eike Rathke
a2aea8bac5 IFS/SWITCH propagate error only for active paths, tdf#97831 follow-up
Change-Id: Ief07f0d582e2f283a3ede88a7d202e8cff0e14bf
2016-05-03 19:15:53 +02:00
Stephan Bergmann
bc4d465484 Clean up makeAny functions
Let the templated makeAny(v) just call Any(v), so that any special handling of
argument types needs to be only done for the Any ctor, not also for makeAny
(both the original makeAny implementation and the Any ctor implementation
internally use cppu::getTypeFavourUnsigned to determine the UNO type, so this
does not cause any difference in behavior):

* The specialization of makeAny for bool can be dropped.

* The overload of makeAny for OUStringConcat is replaced with an overloaded Any
  ctor, so that

    Any(s + "foo")

  works now, too.

Curiously, only the Any ctor had been deleted for a sal_uInt16 argument (which
can conflict with sal_Unicode), but not makeAny.  So introduce a specialization
of makeAny for sal_uInt16, so that that continues to work.  (For backwards
compatiblity in the non-LIBO_INTERNAL_ONLY case; and in the LIBO_INIERNAL_ONLY
case we're moving away from the sal_uInt16/sal_Unicode clash anyway thanks to
C++11 char16_t, so it is arguably better to allow makeAny for sal_uIn16 than to
prohibit it.)

Change-Id: I7803703769730024863bb4e5b1b3416b81bd8960
2016-05-03 18:34:17 +02:00
Winfried Donkers
29433c6496 tdf#97831 [part] Add Excel 2016 functions to Calc
Functions IFS and SWITCH.

Change-Id: Ic43d42a933bcac883e9aa2213dd4ddeddf45abf0
Reviewed-on: https://gerrit.libreoffice.org/24424
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-05-03 16:10:12 +00:00
Stephan Bergmann
04baf07416 -Werror,-Wpessimizing-move
Change-Id: Ic20ae0c0534220a2613b73a2bd2e1aa277aecce9
2016-05-03 17:14:46 +02:00
Stephan Bergmann
c4acf692e8 loplugin:passstuffbyref
Change-Id: Iaaaa0569a3e16bd79eeb7830ab9fb4be6ae57f98
2016-05-03 17:13:02 +02:00
Stephan Bergmann
6e717957b2 NULL -> nullptr
Change-Id: I7e4e36fbff89cb45c01a11dc70c4e6f17fe3bc38
2016-05-03 16:35:30 +02:00
Stephan Bergmann
69a62d4dc1 NULL -> nullptr
Change-Id: I94d0df867b6ef59cf6485e4cee7ac655155f9b87
2016-05-03 15:56:18 +02:00
Stephan Bergmann
a6960391ac NULL -> nullptr
Change-Id: I0bd2dc2e2ed1f699133e3e7753359b969fbee322
2016-05-03 15:45:13 +02:00
David Tardon
46410f7e5b use unique_ptr
Change-Id: I28615a645e6e4763bb03362a90da93a818985a78
2016-05-03 15:34:09 +02:00
David Tardon
750935fddb drop obsolete comment
Change-Id: Iad565ccd92b4518ee57f10b65ca4d8ca0730474d
2016-05-03 15:34:09 +02:00
David Tardon
390ddd3bde tdf#99353 take the footgun away from FilterCache
FilterCache::impl_saveItem changes the properties of a config. item
one-by-one. But it also listens to the configuration changes and reloads
the whole item from the configuration on change...

Change-Id: I9e4ed1c6b013925d07f0942717fe3421f924279d
2016-05-03 15:34:09 +02:00
Stephan Bergmann
0b1e4a3067 Prevent Any::setValue from reinterpreting bool* as sal_Bool*
...which only happens ot work in environments where sizeof (bool) == 1.  The
simpler alternative is to use the operator <<= template without passing explicit
UNO type information, anyway.

The std::nullptr_t overloads are needed to disambiguate calls with a nullptr
argument.  (Which can at least be meaningful for VOID, but for other types what
it happens to do is store a default value of the given type.)  As std::nullptr_t
is only C++11, this all needs to be LIBO_INTERNAL_ONLY.

Change-Id: Iff06a6ba94250bd4ae4afc937c2a2bfa75f0888f
2016-05-03 15:26:01 +02:00
Stephan Bergmann
ab3d2e568f Prevent Any ctor from reinterpreting bool* as sal_Bool*
...which only happens to work in environments where sizeof (bool) == 1.  The
simpler alternative is to use the Any ctor template without passing explicit UNO
type information, anyway.

The std::nullptr_t overloads are needed to disambiguate calls with a nullptr
argument.  (Which can at least be meaningful for VOID, but for other types what
it happens to do is store a default value of the given type.)  As std::nullptr_t
is only C++11, this all needs to be LIBO_INTERNAL_ONLY.

Change-Id: I0f72c73a088ef96e069c3ed8c78546b16d89b50a
2016-05-03 15:25:44 +02:00
Michael Stahl
2ce95e8382 sw: HTML filter: avoid turning on Undo with ridiculous hacks
SwHTMLParser::SetControlSize() loads a "hidden document" into the same
model (!) that is currently being imported (!), just so it can get a
awt::XControl from the ViewShell; unfortunately creating the ViewShell
happens to enable Undo too, so turn that off again.

This avoids triggering the assert in SwRegHistory::InsertItems() on
kde122884-1.html

Change-Id: I3d8fcd5c43bcb8e7ed8775710acbc2d40f2ffdd0
2016-05-03 14:47:27 +02:00
Laurent Balland-Poirier
48435bfddf tdf#97835 No decimal separtor for empty decimal
If decimal part is empty (with #) decimal separator should not be added.
It was not removed if there was text after value.

Change-Id: I891cad8b6bec0f27f4cef8aea80c5dad264f062d
Reviewed-on: https://gerrit.libreoffice.org/24586
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-05-03 12:18:52 +00:00
Laurent Balland-Poirier
88a7958984 tdf#61996 Skip quoted text in number format
Quoted text should be detected and skiped
before detecting conditions

Change-Id: I1c78fed7f543fb335fbb8ec9ed50d9ab9dd10aa7
Reviewed-on: https://gerrit.libreoffice.org/24550
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-05-03 12:07:47 +00:00
Szymon Kłos
f23c32e4bf tdf#98644 : better error message when wrong password entered
Change-Id: Idf4da8000cce43cb66cb94fdfc8be8a3d6909fa6
Reviewed-on: https://gerrit.libreoffice.org/23475
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-05-03 11:59:07 +00:00
Laurent Balland-Poirier
3beb146b34 tdf#31449 Correctly test if fraction has no integer part
Test if fraction format has no integer part is modified
to take into account all cases: ??/?? or ##/##
and do not detect false positive like ? ??/??

Change-Id: Ia8677a5ad496e5df56ce6bf1290323555e46ba0a
Reviewed-on: https://gerrit.libreoffice.org/24540
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-05-03 11:54:41 +00:00
jan Iversen
bf95f4f0ce genlang .ulf uses LngText as id.
Added fixed subid for .ulf files

Change-Id: I9e882e3ab40e334c7d504d583b8e515d9dc36d6b
2016-05-03 11:27:54 +00:00
jan Iversen
6bc720cedb genlang .xcu dot handling and level func for .src
.xcu stores a '.' between keys and keys with no name count
.src has commands without name (identifier used instead)

Change-Id: I135c5f5594c429ebc1b278dbb7d5709b7b8ca119
2016-05-03 11:27:54 +00:00
jan Iversen
fc5755c062 genlang .src single line macro
Macros do not always end with \\ only those for translation
added #define exception to the lex layer.

Change-Id: I656bb8776d970288c243302cdc74a0afd975975e
2016-05-03 11:27:54 +00:00
Michael Stahl
39d719a80d tdf#99529 sw: don't pop up input field dialog before inserting field
The dialog calls SwEditShell::UpdateFields(), so if there is already
a existing field at the current cursor position it will be "updated"
before the new field is inserted.

Change-Id: I8ddbbe00534950759781a1ce8d0dca0376663462
2016-05-03 11:41:04 +02:00
Michael Stahl
20ae3d1418 tdf#98512 sw: add unit test
... and fix the SAL_WARN not to warn spuriously.

Change-Id: Ic951fc0d811e5cab39989285d34bdd2fff8f95fd
2016-05-03 11:41:04 +02:00
Maxim Monastirsky
9a2fccbc38 Better label for .uno:OpenSmartTagMenuOnCursor
Change-Id: I4aa578ecdfeaa23b7d665b59b7719f2e0258eac7
2016-05-03 12:37:39 +03:00
Matteo Casalin
eca3455190 Resolves: tdf#98940 (-1 not mapping to maximum string length anymore)
Change-Id: I58e4a63bce17b880a97c7ccfb4d42dfb930e54c5
Reviewed-on: https://gerrit.libreoffice.org/24268
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-05-03 09:28:06 +00:00
irem
2fce97c51c tdf#99211 Use the restart dialog for notifications about restart
Change-Id: I2093e99d7b377285f6b3248a90072f0dea12f732
Reviewed-on: https://gerrit.libreoffice.org/24556
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-05-03 09:22:16 +00:00
Stephan Bergmann
a05ab9ef5e Remove unnecessary setBOOL, makeBoolAny
Change-Id: Id82c3f352fcc2d4dafad877517098cb6f5d046d4
2016-05-03 11:20:51 +02:00
Bryan Quigley
4b3c211cfb Remove Edit -> Plug-in as no longer used
This functionality seems to only have been used with NPAPI plugins.
They've been previously removed.  Per the help text, if it is still
used by anything, you can use the context menu instead.

MN_READONLY_PLUGINOFF also appeared to be unused, so removed.

More code might be removable, but would affect activate on click/visible.

Change-Id: I12d5bf54edd3a2f716912179b87e798b47b3cc3d
Reviewed-on: https://gerrit.libreoffice.org/24500
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-05-03 09:17:01 +00:00
Takeshi Abe
022b466db1 starmath: Avoid C-style cast
Change-Id: If8fdb9def831ea9720c3cad1379be47aba7dec30
Reviewed-on: https://gerrit.libreoffice.org/24584
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-05-03 09:14:43 +00:00
Caolán McNamara
bc10fa6d3b cppcheck: noExplicitConstructor
Change-Id: I9c8d41faf903f2d4ec26338a19be1328a68c69db
2016-05-03 10:12:27 +01:00
Miklos Vajna
6bacfc8d95 tdf#95707 RTF import: handle device-independent bitmaps
See
<https://msdn.microsoft.com/en-us/library/dd183374%28v=vs.85%29.aspx>
for more info about the header structure that has to be prepended to the
real data to make our BMP import filter happy.

Change-Id: Iabdf4cd169b82ea951d1c1b12432d97d61b7af51
Reviewed-on: https://gerrit.libreoffice.org/24604
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-05-03 08:24:26 +00:00
Caolán McNamara
79acc3da35 bump to hunspell 1.4.1
Change-Id: I20d9abfd73586daf1ed99f0e1a2481840e61f90e
2016-05-03 09:06:23 +01:00
Stephan Bergmann
388ffd22b1 -Werror=maybe-uninitialized
Change-Id: I137814b80790b2cb4c8a2a2b78048024db0b4f86
2016-05-03 09:40:56 +02:00
Noel Grandin
82e9cfc991 use Any constructor for bool values, instead of temporary vars
mostly found with:
   git grep -n 'setValue.*cppu.*UnoType.*bool.*get'

Change-Id: Ie8e5aa6402d25dbe90b0f492031a245bb222c1a5
Reviewed-on: https://gerrit.libreoffice.org/24464
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-03 07:26:26 +00:00
Stephan Bergmann
eb7593daa4 Updated core
Project: help  b4f803adf47059a195de82e8757a3fe1856f4596

Fix bookmark element

...that was broken by previous 7baa265c995f1d27cef325bf1583a579737e11df
"tdf#99637 Don’t mention Undo settings now in Expert Configuration"

Change-Id: Idecc9cca5bdef2da8a027ae9e1ce6f76d46dcdb5
2016-05-03 07:04:40 +00:00
Mark Page
e76d458422 Change vGDIObj pointer to unique_ptr to reduce WinMtfOutput complexity
Change-Id: Ia81d3b30a874c2e722f7b836db9fab0be2d6e27b
Reviewed-on: https://gerrit.libreoffice.org/24488
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-03 06:31:52 +00:00
Adolfo Jayme Barrientos
fa6efd4511 Updated core
Project: help  7baa265c995f1d27cef325bf1583a579737e11df

tdf#99637 Don’t mention Undo settings now in Expert Configuration

Change-Id: I5a6c8a193a1f80683a79e1e1b255d67586493a6e
2016-05-02 22:40:38 +00:00
Stephan Bergmann
f88554edd4 Related tdf#98644: In login dialog, give a hint that the password was wrong
...by changing the dialog text from "Enter user name and password for..." to "Wrong
user name and password for..." when an old password is already given.

Change-Id: Ie167c5ea263e9f75e0269c528dc88b69270208f3
2016-05-02 23:20:11 +02:00
Eike Rathke
edd4370f5b check presence of token, tdf#96426 follow-up
Change-Id: I4c368dfd113b02d208013b4ba79dff606769a150
2016-05-02 20:39:45 +02:00
Eike Rathke
b79d226017 Revert "crashtesting: fix ooo123540-1.xlsx etc"
This reverts commit bfca69eddd3d94e74d6b73f91476b79c8f72cce7.

Rather let the caller check for a valid token instead of checking it
twice for other places that already do, and we usually need two valid
tokens before even one call makes sens.
2016-05-02 20:05:11 +02:00
Eike Rathke
8474c5f149 silence ScTableRefToken::GetSheet() SAL_WARN about unhandled
Change-Id: I539bad573bfc459103acc0cb0227bad7681b79aa
2016-05-02 19:56:07 +02:00
Eike Rathke
4f5c97849b unit test for tdf#99417 track formula cells for BROADCAST_BROADCASTERS
Change-Id: I82cd43774388a426b4c7dc536952dc3f9584cf9e
2016-05-02 19:23:52 +02:00
jan Iversen
6a31394938 genlang macro support for .src files
Added macro detection in .src filter
Updated gDiff and gRun scripts with enhancements

Change-Id: Idddd3ef72e8ccee65d03fe5080e27699ceebb079
2016-05-02 17:00:34 +00:00
Stephan Bergmann
b14c3a5e33 Remove unused pbOpt parameter
Change-Id: I4c566a122d600d41d7d8049779628a08e68ca277
2016-05-02 16:59:51 +02:00
Stephan Bergmann
5df086e79f sal_Bool -> bool
Change-Id: I6e86cb7ffbd8c8cbf3cccaef656cf7b7e755e24f
2016-05-02 16:40:19 +02:00
Eike Rathke
a0b9fa819c Resolves: tdf#99417 explicitly track formula cells for BROADCAST_BROADCASTERS
Change-Id: I717fc6d1d7c2bc01ed2a256f6fc08a055be24e4b
2016-05-02 16:31:58 +02:00
jan Iversen
6cc547b33b vm174 .xcu update
One project uses "." as prefix, but LO uses ".."

Change-Id: I18eaf66c54176b0c3268d9fb94a002e4b68722fe
2016-05-02 13:07:47 +00:00
jan Iversen
8aed53c104 genLang .src conversion, first version.
LO uses the .src quite differently, so a new implementation
was made.

The unused old functions are hanging in a #if 0, and will
be removed later.

Change-Id: Ic466a1b97f9f65c9f658612bd2aa325396e929c3
2016-05-02 12:15:36 +00:00
Giuseppe Castagno
3db082a752 Related tdf#98416 Libcmis: add a patch to fix Google Drive login
The new Google login sequence uses two html pages: one for user email
the other for password.

The older sequence used only one page for both user email and
user password.

Change-Id: If875ba3ec9680d7e8c700a269873e427ac037a8e
Reviewed-on: https://gerrit.libreoffice.org/24513
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2016-05-02 10:57:40 +00:00