Commit Graph

1769 Commits

Author SHA1 Message Date
Stephan Bergmann
f70d864e42 loplugin:includeform: fpicker (macOS)
Change-Id: If52eeafcf6dab4825138c3f123d201dacd45ad28
2017-10-24 11:55:06 +02:00
Stephan Bergmann
3f9e9940a5 loplugin:includeform: fpicker
Change-Id: Icf2531ca9dea11bf25a8bbe5815e5b37b933553d
2017-10-23 22:46:07 +02:00
Mike Kaganski
1944e3ddc0 Rename and move SAL_U/W to o3tl::toU/W
Previosly (since commit 9ac98e6e34)
it was expected to gradually remove SAL_U/W usage in Windows code
by replacing with reinterpret_cast or changing to some bettertypes.
But as it's useful to make use of fact that LibreOffice and Windows
use compatible representation of strings, this commit puts these
functions to a better-suited o3tl, and recommends that the functions
be consistently used throughout Windows-specific code to reflect the
compatibility and keep the casts safe.

Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6
Reviewed-on: https://gerrit.libreoffice.org/43150
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-05 16:02:52 +02:00
Julien Nabet
7413ee067f Fix leak in resolveAlias (fpicker/aqua)
Change-Id: I9b154337769763139ee5571d4ec8df9cfb6208f9
Reviewed-on: https://gerrit.libreoffice.org/43104
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-04 08:56:32 +02:00
Mike Kaganski
532a4dcba6 Replace more reinterpret_cast with SAL_W/SAL_U
Change-Id: Ia632e4083222ad9e7f17c2ad0d0825f189c700cc
Reviewed-on: https://gerrit.libreoffice.org/43071
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-03 16:30:36 +02:00
Julien Nabet
22e748e68a Prefer prefix operator
Change-Id: I82f3f66bfc675dbc4a5d5b57d8715c3de01d9620
Reviewed-on: https://gerrit.libreoffice.org/42994
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-01 14:53:10 +02:00
Mike Kaganski
c3609f107b Use SAL_W/SAL_U instead of reinterpret_cast btwn wchar_t* and sal_Unicode*
This is type-safe, and allows to catch cases where a source type
is changed for some reason, but reinterpret_cast masks that

Change-Id: Ib64b6fa2e22d94a6bba890f0ccc3e20325c6f0a1
Reviewed-on: https://gerrit.libreoffice.org/42961
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-30 19:08:28 +02:00
Mike Kaganski
362a21d3a1 Use explicit function names for fooA/fooW WinAPI; prefer fooW
We should only use generic foo function name when it takes params
that are also dependent on UNICODE define, like
LoadCursor( nullptr, IDC_ARROW )
where IDC_ARROW is defined in MSVC headers synchronised with
LoadCursor definition.

We should always use Unicode API for any file paths operations,
because otherwise we will get "?" for any character in path that
is not in current non-unicode codepage, which will result in failed
file operations.

Change-Id: I3a7f453ca0f893002d8a9764318919709fd8b633
Reviewed-on: https://gerrit.libreoffice.org/42935
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-30 11:23:41 +02:00
Mike Kaganski
0dd2e602e5 Drop check for Windows versions we don't support
Since we dropped support of Vista and below in master toward 6.0,
those checks are needless. Removing the code that only worked in
older versions, and streamlining the resulting code.

Also, use kernel32.dll version for Windows version, instead of
deprecated GetVersionEx, and inconvenient VersionHelpers. Since both
GetVersion(Ex) and VersionHelpers (based on VerifyVersionInfo) are
subject to manifest-based behavior since Windows 8.1, this move will
hopefully result in more reliable OS version detection.

Change-Id: I3edd8fc1843e64b6a65bd3a126be6a085511f13c
Reviewed-on: https://gerrit.libreoffice.org/42905
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-29 14:55:11 +02:00
Stephan Bergmann
302843bb6d Silence macOS 10.13 -Werror,-Wdeprecated-declarations
Change-Id: Idde11cd740dd67b5df06945557e5580c7d16b1e3
2017-09-26 10:11:10 +02:00
Samuel Mehrbrodt
b9a8ac48d7 Rename GetSelectEntryData -> GetSelectedEntryData
Change-Id: Ia6402f6d2c978cbd5557052a43e9728ca9e11173
Reviewed-on: https://gerrit.libreoffice.org/42285
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-25 10:54:53 +02:00
Samuel Mehrbrodt
83de03e077 Rename GetSelectEntryCount -> GetSelectedEntryCount
Change-Id: I405b347b404ed0acb3b6a0204e0b914a7698ce25
Reviewed-on: https://gerrit.libreoffice.org/42284
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-25 10:00:46 +02:00
Samuel Mehrbrodt
d99b65c864 Rename GetSelectEntryPos -> GetSelectedEntryPos
Change-Id: I0bd4cb463575af843c72d9c8aaf91742203532a4
Reviewed-on: https://gerrit.libreoffice.org/42283
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21 12:45:38 +02:00
Samuel Mehrbrodt
b649e5bf1d Rename GetSelectEntry -> GetSelectedEntry
Change-Id: Ibb7d8c59c0e61b0e87455bd78f241d8691dd9dce
Reviewed-on: https://gerrit.libreoffice.org/42282
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21 12:44:00 +02:00
Mike Kaganski
aaa26a58ba Some more WIN32_LEAN_AND_MEAN
Change-Id: Iadb0ebb66809c192fb817b8c7cf2f8cdb4d0b874
Reviewed-on: https://gerrit.libreoffice.org/42419
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-18 19:24:31 +02:00
Noel Grandin
9c5c905680 clang-tidy modernize-use-emplace in editeng..framework
Change-Id: I7739c4f77c856d34f8484754244df13d8fef840e
Reviewed-on: https://gerrit.libreoffice.org/42151
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-11 09:42:55 +02:00
Jan-Marek Glogowski
3fa8ff7734 tdf#112289 OSX fpicker: don't default to true
When LO requests a value for the currently unimplemented
GPG encryption checkbox, the Aqua file picker defaults to
a "uno::Any <<= true", which triggers the GPG key dialog.

This simply returns an empty uno::Any for values of unknown
controls, which is handled fine.

If something else relies on the current default value, it
must to be properly implemented.

Change-Id: I3637ca833d59e19416e25f3096bc90a756aa8840
2017-09-09 00:40:13 +02:00
Katarina Behrens
4e825d97a8 gpg4libre: Encrypt with GPG checkbox in SaveAs file dialog, 1st stab
LibO's own file dialog only so far

Change-Id: Ic5f6c180afb5d4e0fc151ad57d769b99ad7fbdf3
Reviewed-on: https://gerrit.libreoffice.org/41292
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-08-30 13:16:49 +02:00
Markus Mohrhard
893298e777 avoid out of bounds access
Change-Id: I4c7ddf2fcabc231b7250306b4a9255fab1a9ef7c
2017-08-21 03:46:36 +02:00
Jochen Nitschke
08566ea519 drop unused CntContentTypeItem
unused since commit cdae06a664
Date:   Fri Apr 6 11:17:10 2001 +0000
    #78400# Template scanning reimplemented using UCB

Change-Id: I3e742be5a7c5467628dbe5a19171c4dfcef07c58
Reviewed-on: https://gerrit.libreoffice.org/41274
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-18 12:34:56 +02:00
Andrea Gelmini
64a3124d92 Fix typos
Change-Id: Iaa9c0aea3ea1a239e378bd714ba335f91bb1faf3
Reviewed-on: https://gerrit.libreoffice.org/41194
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-08-17 21:53:28 +02:00
Stephan Bergmann
10c80e560e loplugin:oncevar
Change-Id: I1bb87b9c1a34326694d8096f67bb32adb17af1e6
2017-08-07 08:06:25 +02:00
Stephan Bergmann
293ddf0b7f loplugin:staticmethods
Change-Id: Iaf9b6afa7c2d3d8044d50e0bfac898319fff8f22
2017-08-07 08:05:51 +02:00
Noel Grandin
3dcf6dfcee remove unnecessary use of 'this->'
Change-Id: I5c115389af7d24c18ddaf5fbec8c00f35017a5b4
Reviewed-on: https://gerrit.libreoffice.org/40671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02 13:45:36 +02:00
Caolán McNamara
13fac4894f normalize resource locale ctor construction mechanisms
make them all the same and share std::locales more

various OModuleClient, etc, classes go away

Change-Id: I7e3ff01a69332eeacd22e3078f66a60318de62d5
Reviewed-on: https://gerrit.libreoffice.org/40634
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-08-02 10:36:07 +02:00
Caolán McNamara
b1d829e52e move resmgr to unotools
and the vast majority of translations is to the ui language so default
ctor with that arg

and now drop OModuleResourceClient

Change-Id: I3b85a560ffdfe5f019c2271ac56a5fe4a361522b
2017-08-01 13:42:21 +01:00
Markus Mohrhard
20ecb4b7b8 use empty instead of size() == 0
Change-Id: I08b1e73323a15dd977daba98946e7deec3967503
Reviewed-on: https://gerrit.libreoffice.org/40575
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-07-31 04:29:30 +02:00
Caolán McNamara
182a74d937 de-hrc various things
e.g.  helpid[s].hrc -> helpids.h
and insert include guards where missing

move "ordinary" defines into .hxx files

remove .hrc entries that are used as arguments to dialog factory
when a dedicated method can be added instead

Change-Id: I792fb8eb0adfaa63cf354e6e57401fc943e9196e
2017-07-21 08:20:51 +01:00
Caolán McNamara
00657aef09 migrate to boost::gettext
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl
* all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string")
* ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching
  MODULE .mo files
* UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui
  goes from l10n target to normal one, so the res/lang.zips of UI files go away
* translation via Translation::get(hrc-define-key, imbued-std::locale)
* python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there
  to keep finding the .hrc file uniform) so magic numbers can go away there
* java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation
  mechanism
* en-US res files go away, their strings are now the .hrc keys in the source code
* remaining .res files are replaced by .mo files
* in .res/.ui-lang-zip files, the old scheme missing translations of strings
  results in inserting the english original so something can be found, now the
  standard fallback of using the english original from the source key is used, so
  partial translations shrink dramatically in size
* extract .hrc strings with hrcex which backs onto
   xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap
* extract .ui strings with uiex which backs onto
   xgettext --add-comments --no-wrap
* qtz for gettext translations is generated at runtime as ascii-ified crc32 of
   content + "|" + msgid
* [API CHANGE] remove deprecated binary .res resouce loader related uno apis
      com::sun::resource::OfficeResourceLoader
      com::sun::resource::XResourceBundleLoader
      com::sun::resource::XResourceBundle
    when translating strings via uno apis
      com.sun.star.resource.StringResourceWithLocation
    can continue to be used

Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-21 08:20:50 +01:00
Noel Grandin
3cb3a80923 loplugin:constparams in fpicker
Change-Id: I1ef422ccd902a3bc5e4fce5ea373cfef24f8edef
Reviewed-on: https://gerrit.libreoffice.org/40204
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20 09:19:10 +02:00
Noel Grandin
ab9b38a406 use more begin()/end() for Sequence
Change-Id: I399be6b6ef7a6ce01e883569a177c0969bc29c69
2017-07-06 08:35:23 +02:00
Stephan Bergmann
065a8ea524 loplugin:oncevar (clang-cl): fpicker
Change-Id: I13e11f07a8022b315ffa80282575472bcb0c3acc
2017-07-03 14:04:00 +02:00
Jochen Nitschke
c4ddf6cd6d C++11 remove std::unary_function bases from functors
std::unary_function is deprecated since C++11 and removed in C++17

90% done with regexp magic.
removed obsolete <functional> includes.

The std::unary_function base class was used in 3 places:
* chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole
   is used in a std::not1 function helper who uses the members
   return_type and argument_type.
   - replace deprecated std::not1 with a lambda
* chart2/source/tools/ModifyListenerHelper.cxx:
   lcl_weakReferenceToSame used the argument_type member in the
   operator() parameter.
   - inline the parameter type.
* xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement
   used result_type and argument_type in operator().
   - inline the types

Also fix compile error with gcc about finding std::for_each.

Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f
Reviewed-on: https://gerrit.libreoffice.org/39358
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-03 12:21:03 +02:00
Stephan Bergmann
c1845e4970 loplugin:oncevar
Change-Id: If1f4f8136368349777c6fb616328cfa89efd9e0f
2017-06-30 09:17:06 +02:00
Noel Grandin
d116894b26 loplugin:oncevar in formula..framework
Change-Id: I96d6af49c1994ebd7d6dcc41469127e3151b4350
Reviewed-on: https://gerrit.libreoffice.org/39186
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25 17:19:22 +02:00
Noel Grandin
6bbda13286 loplugin:unusedfields in forms..idlc
Change-Id: If250ff47c1f375fe24c61b5bf271da9a9c330822
Reviewed-on: https://gerrit.libreoffice.org/39133
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23 08:59:56 +02:00
Jochen Nitschke
a5dba7dbec remove unused osl/mutex.hxx includes
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb
Reviewed-on: https://gerrit.libreoffice.org/38905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-18 13:38:25 +02:00
Andrea Gelmini
1d857ca26f Fix typos
Change-Id: I3cd50e374c45bc1c400b24c8fffd6d8f5cd1de56
Reviewed-on: https://gerrit.libreoffice.org/38208
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-01 10:51:01 +02:00
Michael Stahl
e687c1e3e3 fpicker: global default _WIN32_WINNT is sufficient now
Remove local overrides.

Change-Id: I588b6543848f962d7533c49b138bc6d836fe5c47
2017-05-30 20:19:21 +02:00
Michael Stahl
ffbfe477b1 fpicker: remove ifdef __IFileDialogCustomize_INTERFACE_DEFINED__
No idea what SDK problem this once worked around but surely it's
obsolete now.

Change-Id: I5cfa37710ea8cecee8acc9c8f5a6a08fae4babbd
2017-05-29 15:46:21 +02:00
Michael Stahl
1493eef137 fpicker: remove some Win32 helper code that is now unused
Change-Id: I5414df94487fc9918ca28b694d6f94eeeac20b70
2017-05-29 15:46:20 +02:00
Michael Stahl
99643e0d69 fpicker: remove PreviewCtrl.[ch]xx
These were apparently never used; the Windows 7 file picker can preview
images nicely without this anyway.

Change-Id: I0e4a1bb94506cbeae10675400a471b2211659d6e
2017-05-29 15:46:20 +02:00
Michael Stahl
200f02d55c fpicker: remove legacy XP FilePicker implementation
Long live VistaFilePicker.

Change-Id: I362a582a1922abad66ecfd1f5c4ce1a5a25fcd11
2017-05-29 15:46:20 +02:00
Noel Grandin
ef513fd4b0 remove unnecessary use of OString::getStr
Change-Id: I0490efedf459190521f4339854b3394d57765fdb
Reviewed-on: https://gerrit.libreoffice.org/38058
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-28 19:44:08 +02:00
Johnny_M
fd48f39a7e Translate German comments and debug strings (leftovers in f... dirs)
Translates all (leftovers) found using a custom regex, in directories not
shown by /bin/find-german-comments and beginning with "f".

Additionally:
- Fixed translation in formula/source/ui/dlg/funcutl.cxx (translated in
https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=5e04331fc0a6434c61d3d18843cb4f80a44e5989 ),
because clearing an event is quite the opposite of its triggering.

Change-Id: I0fd62193a29883796cd05e5a80ce8a2900636b6c
Reviewed-on: https://gerrit.libreoffice.org/37839
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-05-20 13:43:17 +02:00
Stephan Bergmann
b02848767a loplugin:stringcopy: fpicker
Change-Id: Iec08e4ed6241faba9b858e42cb6b55abdcdab3ee
2017-05-19 17:17:48 +02:00
Caolán McNamara
a633ffc88c gives names to mysterious 500 and 501
Change-Id: Ie2b02f10ab100ce11330d1a0808e60a02394e230
Reviewed-on: https://gerrit.libreoffice.org/37750
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-18 15:13:16 +02:00
Caolán McNamara
2fec2ab3ad SVT_RESSTR can go now
Change-Id: I641fbea510d56cabb440f894aae938430ce30ce0
2017-05-18 10:14:30 +01:00
Stephan Bergmann
6d3a43fa80 Clean up uses of SAL_U/SAL_W: fpicker
Change-Id: I9fe1a639bee624eea3ab91d5f29a86ef8ac3d97c
2017-05-12 13:25:26 +02:00
Noel Grandin
389da66dfc remove unused uno::Reference vars
found by temporarily marking Reference as SAL_WARN_UNUSED.

Change-Id: I18809b62654467f890016adcc92576980ced393b
Reviewed-on: https://gerrit.libreoffice.org/37511
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-12 09:56:01 +02:00