399050 Commits

Author SHA1 Message Date
Michael Stahl
9fd3a83e47 sw: DocumentListsManager: no need for cryptographic randomness here
... or in SwDoc::GetUniqueNumRuleName()

Change-Id: Ifd6df902f7feae9db77f38654d7eb246dfb3510a
2016-10-31 10:22:46 +01:00
Noel Grandin
927df8bff2 return dialog pointers using VclPtr<>
or their ref-count could drop to zero before they actually get used

Change-Id: I5af7a0cc8650e3d779c870144c23b6de19c8cc45
2016-10-31 10:09:15 +02:00
Julien Nabet
85101d2a4d This needs to be VclPtr too
Avoid this segfault:
Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault.
0x00002aaad2a20e4e in VclReferenceBase::acquire (this=0x9999eeeef579c129) at /home/julien/lo/libreoffice/include/vcl/vclreferencebase.hxx:38
38	        assert(mnRefCnt>0);
(gdb) bt
0  0x00002aaad2a20e4e in VclReferenceBase::acquire (this=0x9999eeeef579c129) at /home/julien/lo/libreoffice/include/vcl/vclreferencebase.hxx:38
1  0x00002aaad37325ae in rtl::Reference<AbstractScImportAsciiDlg>::Reference (this=0x7ffffffef7c0, pBody=0x55555be02790) at /home/julien/lo/libreoffice/include/rtl/ref.hxx:63
2  0x00002aaad37321b5 in VclPtr<AbstractScImportAsciiDlg>::VclPtr (this=0x7ffffffef7c0, pBody=0x55555be02790) at /home/julien/lo/libreoffice/include/vcl/vclptr.hxx:89
3  0x00002aaad3731e25 in ScopedVclPtr<AbstractScImportAsciiDlg>::ScopedVclPtr (this=0x7ffffffef7c0, pBody=0x55555be02790)
    at /home/julien/lo/libreoffice/include/vcl/vclptr.hxx:305
4  0x00002aaad373055e in ScFilterOptionsObj::execute (this=0x555558d8d450) at /home/julien/lo/libreoffice/sc/source/ui/unoobj/filtuno.cxx:179
5  0x00002aaad1c03f50 in (anonymous namespace)::handleFilterOptionsRequest_ (xContext=uno::Reference to (cppu::ComponentContext *) 0x5555559ec960, rRequest=...,
   rContinuations=uno::Sequence of length 2 = {...}) at /home/julien/lo/libreoffice/uui/source/iahndl-filter.cxx:259
6  0x00002aaad1c044f4 in UUIInteractionHelper::handleFilterOptionsRequest (this=0x555558c1b400, rRequest=uno::Reference to (RequestFilterOptions *) 0x555558d5edf8)
    at /home/julien/lo/libreoffice/uui/source/iahndl-filter.cxx:315

Change-Id: I50f9f5c4c63328a0aaa3ecb2d83a902de6a38add
Reviewed-on: https://gerrit.libreoffice.org/30410
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-31 06:08:01 +00:00
Noel Grandin
ee33745ced tdf#103334 - EDITING: Undo on bullet point style
I have checked the normal model and the editing model after UNDO, and
all seems to be well, this is purely a rendering/lack-of-invalidation
issue.

The extra invalidation I add here is restricted to the UNDO case to
prevent tripping up a LOK unit test
(SdTiledRenderingTest::testCursorViews).

I confess to not having followed the invalidation logic all the way to
see why exactly it makes the bug go away.

Change-Id: I34f7d84526462665b1ec09aba966c98cd4e8795f
Reviewed-on: https://gerrit.libreoffice.org/30225
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-31 06:04:58 +00:00
Justin Luth
49909dca58 fix logic error - still set zero padding if no border set
caused by commit 52b29c60801cf75364fd8275a22e812797cb184d

originally, if there were no visible lines (bFirstLine), then any
line distance was reset to zero, but with AllowPaddingWithoutBorders
that should not be done.

However, the case were there is no boxItem at all was missed - padding
should still be initialized to zero in that case.

Change-Id: I0a95ee1de6781089196a1ba40d2c0365d15926e2
Reviewed-on: https://gerrit.libreoffice.org/30412
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
2016-10-31 05:52:27 +00:00
Takeshi Abe
b589c4cd87 Omit comparator which is the same as default std::less<key_type>
Change-Id: I72a0b618577caececaaf3eb4df53d4cb192251da
Reviewed-on: https://gerrit.libreoffice.org/30369
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-10-31 03:48:49 +00:00
Khaled Hosny
3d83c42008 tdf#103403: Wrong glyph advances with Graphite
Patch sent upstream:
https://github.com/behdad/harfbuzz/pull/357

Change-Id: I245509d386e83970e4b08bd2a4b20a590303025a
2016-10-31 05:18:43 +02:00
Khaled Hosny
4b4abb73fc Avoid excessive text clipping on Windows
Use a better rounding strategy so that when the bounding box involves
part of a pixel we include the full pixel, so floor for -ve values and
ceil for +ve ones.  Without this I see lots of cut text on Windows.

Change-Id: I258f63eb37911574cd3f6f08da22349756c0775c
2016-10-31 04:54:04 +02:00
Khaled Hosny
ebe3fd5291 Reduce number of arguments
The font is already a member of the class, and the EM height is unused.

Change-Id: Ice2eb2bb3e4b491bcb93123e1c3a08170cdaa50b
2016-10-31 04:53:52 +02:00
Jochen Nitschke
1011f99ed6 cppcheck unreadVariable: diff
since initial commit 27a1e85b656bad222f113f650b03397aa3bc59d3

Change-Id: I46a973fdd6b565117030a3ae218928807e9bac41
Reviewed-on: https://gerrit.libreoffice.org/30406
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-30 23:07:41 +00:00
Jochen Nitschke
e1efc55ab4 cppcheck unreadVariable: nRemoveSelect
since introduction in commit 60f11adb950e4f9645cc9ecb0f5af8235cc97366

Change-Id: I9e735ec9f39502b90cec40af4397abac0165df83
Reviewed-on: https://gerrit.libreoffice.org/30407
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-30 23:07:28 +00:00
Jochen Nitschke
18658fff26 cppcheck unreadVariable: nCount
unused since commit debafc2c17b957ff2edc8821bf0f615816645e94

Change-Id: Ida1da503739454a1fb67b4d0df3067060c2738e5
Reviewed-on: https://gerrit.libreoffice.org/30409
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-30 23:06:42 +00:00
Jochen Nitschke
cd252e2f01 cppcheck unreadVariable: n
since initial commit d02f75a8c36705924ddd6a5921fe3012fafce812

Change-Id: I51d56485f4b6224a1b7ce16b0788e7e884d57b37
Reviewed-on: https://gerrit.libreoffice.org/30408
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-30 23:06:36 +00:00
Tomaž Vajngerl
f891267b03 toolbox: don't need "ItemImageOriginal" anymore
Change-Id: I7037b7a8c70150f9946cca0c48607bd887779c82
Reviewed-on: https://gerrit.libreoffice.org/30405
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-30 20:53:36 +00:00
Khaled Hosny
641b9cb1d0 tdf#103588: Draw with the right font on Windows
Apparently without implementing InitFont(), we might end up drawing with
the wrong font, thanks to the arcane ways GDI API.

Change-Id: I224de138446d4a536e13992efa98b0f04609576a
2016-10-30 22:10:51 +02:00
Stephan Bergmann
ffed74ee54 -Werror,-Wunused-private-field
Change-Id: I695b3709c2b53f62773dc390b89966061c7b0ae9
2016-10-30 21:07:52 +01:00
Maxim Monastirsky
93a6af8750 Updated core
Project: help  4f39d66542067430093d3887a83bde67d838e20b

Update after recent dbaccess HID removal

Change-Id: Ifbbfaf592aca44eb2a2a83e9afef3427aef364b8
2016-10-30 19:22:19 +00:00
Jochen Nitschke
e75561bd19 bin SfxUShortRanges, inline and rewrite only usage
only use was to merge 2 range tables in SfxItemSet::MergeRange
of which one table always contained a single range.

rewrite the merge algorithm (SfxUShortRanges += operator).
sort new range into the table of ranges and merge overlapping
ranges afterwards. Not as optimal as the original code but it's
short, maintainable and works without 'goto'

inline the DBG_CHECK_RANGES macro

Change-Id: I991c050f069d44fe72b3ea374863f5f26e7099e9
Reviewed-on: https://gerrit.libreoffice.org/30299
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-30 18:59:13 +00:00
Tomaž Vajngerl
3d531da5ac vcl: use links to "large" (26px) icons also for 32px icons
This adds links to "large" icons (prefixed with "lc_") also for
32px icons automatically so that we don't need to duplicate the
links.txt files.

Change-Id: I5fc3a769aa795060b6ae2d554cadd81938e4d4ec
Reviewed-on: https://gerrit.libreoffice.org/30399
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-30 18:00:20 +00:00
Tomaž Vajngerl
b1426b5b50 tdf#95014 initial support for 32 px icons in toolbar
This adds support for 32 pixel icons - mainly to get them into
the toolbar.

Most changes made are to change the behavior of having only small
and large icons as a boolean choice, but not every code path was
converted to non-boolean choice yet.

Breeze icon theme has the 32px variants so it can be used already.

Change-Id: Iadf832a87826c16b3a83522104dd6c35d61a0f87
Reviewed-on: https://gerrit.libreoffice.org/30398
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-30 18:00:05 +00:00
Maxim Monastirsky
17b1ebbf86 Allow using xml menus in DBTreeListBox
Change-Id: I8dfab0ae5d64b416123ab5690b43cf2db77d92dc
2016-10-30 19:38:22 +02:00
Maxim Monastirsky
96febd383c Add resource name method to IContextMenuProvider
Change-Id: I218fd18101f8f7039052fe8a065096e4c9809adb
2016-10-30 19:37:03 +02:00
Maxim Monastirsky
d1dd9269f1 Convert RID_MENU_APP_EDIT to xml
Change-Id: I6868624b1726b1044e741a1fc0cdabe703f84c31
2016-10-30 19:36:11 +02:00
Zdeněk Crhonek
317bc5e27b add LEFT test case
Change-Id: I4001716ea3c6fe1993a565585cb5f90a4c639c0c
Reviewed-on: https://gerrit.libreoffice.org/30305
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-30 17:09:22 +00:00
Zdeněk Crhonek
6b96bc8005 add BETA.INV test case
Change-Id: Ie8fa5f8047136853414ab6db6a1a83daaec89758
Reviewed-on: https://gerrit.libreoffice.org/29976
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-30 17:07:51 +00:00
Khaled Hosny
4814650c50 Minor
Change-Id: I2bce822dd9f4c6b59a93e158ceced541ae52a01b
2016-10-30 18:59:32 +02:00
Khaled Hosny
f65c8b7b48 No need to call ParseFeatures in the constructor
Call it once where we will use its results.

Change-Id: I63f3ceaf47e68bea9fab29d6836745416cf8ccb8
2016-10-30 18:50:01 +02:00
Khaled Hosny
670f646ac6 Always scale HarfBuzz font before using it
We cache and reuse the HarfBuzz font, so we need to make sure it always
has the right font size before using it.

Change-Id: I332c7f51f6495effde529c63485cb4ec658b2ca5
2016-10-30 18:43:10 +02:00
Khaled Hosny
3c80eea38a Avoid potential HarfBuzz asserts
We need to update the buffer content type ourselves since we are now
using the low lever shape plan API that does not do this.

Change-Id: I043d15731cf206b142c3153896e194a822a70ffb
2016-10-30 18:29:30 +02:00
Zdeněk Crhonek
425c92291b add LEN test case
Change-Id: I99ee54406f446d9b97a61cbd3ec1a58115b544bf
Reviewed-on: https://gerrit.libreoffice.org/30392
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-30 16:17:04 +00:00
Zdeněk Crhonek
20dd5fbecc add FORECAST.ETS.ADD test case
Change-Id: I841115854791b329417b7ff0798e55dfccf93a9e
Reviewed-on: https://gerrit.libreoffice.org/30357
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-30 16:16:13 +00:00
Maxim Monastirsky
66b75b4ba9 tdf#103087 Border widget must not have focus initially
... unless it was opened using the keyboard.

Change-Id: I04675211ff043acf7757afed7252e7d7493eadad
2016-10-30 16:55:01 +02:00
Maxim Monastirsky
94876fe270 Let Menu dispose submenus
(I'm not sure about how good are the changes from ScopedVclPtr
to non-scoped, and disposeAndClear to clear. They aren't really
needed, because of the VclReferenceBase::mbDisposed logic. But
at least they should be safe, as long as we have disposeOnce
calls in Menu's dtor.)

See also previous commits:

4433d95b374c13a3501cdf3a6e273f68eb49873a
("MenuItemData now properly disposes the submenu")

89c23b4aaef931b5d6009efaf44ce6e6c976e8d4
("Sub menus no longer need manual disposing")

Change-Id: I9d455a94590f5eec9b097947f6984f1b3e477b52
2016-10-30 15:50:31 +02:00
Maxim Monastirsky
99da628e17 BmkMenu is dead now
Change-Id: I9b6e762fd4c231a5bd54eb546026499da2efa0e6
2016-10-30 15:40:39 +02:00
Khaled Hosny
0fd8ef082d Rename ServerFont to FreetypeFont
This is what it is actually is, we dropped support for server-side fonts
for a long time now. Renamed also a few related classes, but left
ServerFontLayout* ones as they will go away soonish.

Change-Id: I68a6dad51b6972368b7bf85a0b9c8089cc12740e
Reviewed-on: https://gerrit.libreoffice.org/30390
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Tested-by: Khaled Hosny <khaledhosny@eglug.org>
2016-10-30 12:54:00 +00:00
Khaled Hosny
be1750d866 ENABLE_GRAPHITE_DWRITE is always set to 1
We don’t have a configure option to turn it off and I don’t think anyone
tries building without it. Furthermore, we use the code guarded by this
even without Graphite.

Change-Id: I0fb434af58a51370a66b5ad7eb89b145e4c015de
Reviewed-on: https://gerrit.libreoffice.org/30389
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Tested-by: Khaled Hosny <khaledhosny@eglug.org>
2016-10-30 01:53:33 +00:00
Stanislav Horacek
0a4e0dfffd Updated core
Project: help  14ae4df6fadec87540994bb8698b65d05fae4763

update description of File - Properties - General tab

Change-Id: Ia172fb015d73dd7945918fc9a7ef9c3c89539add
Reviewed-on: https://gerrit.libreoffice.org/30383
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2016-10-30 00:15:45 +00:00
Zdeněk Crhonek
40c4cc9a6b add MAXA testcase
Change-Id: I05a15da6526449342c9f0f41960c461e67df50ec
Reviewed-on: https://gerrit.libreoffice.org/30353
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-29 23:08:55 +00:00
Khaled Hosny
7b4d921d8e tdf#103401: Fix applying DX array with font fallback
Turns out if we don’t adjust the glyph width (not only its X position)
we will apply the DX adjustment more than once when there is font
fallback.

Change-Id: I5e72e5d211adf3b378ec23c0cabe38fd0d5c9b19
2016-10-30 00:41:41 +02:00
Jochen Nitschke
b4cf309bab silence false positive warnings in non DBG_UTIL builds
Change-Id: I80428ebe570584fc7a31581207da0b27a16949af
Reviewed-on: https://gerrit.libreoffice.org/29244
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-29 21:51:01 +00:00
Tomaž Vajngerl
524dba884d icon theme name suffixing with "_svg" is unneeded
Change-Id: Ie0f9964d893c520ad02bb33a1d30821735392076
Reviewed-on: https://gerrit.libreoffice.org/30382
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29 21:48:55 +00:00
Tomaž Vajngerl
b7c2764145 convert usages of DPIScalingFactor from int to float
Change-Id: I049b3d2cde4dcb8c8c0690d75a015a43cb71b0c0
Reviewed-on: https://gerrit.libreoffice.org/30381
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29 21:48:30 +00:00
Tomaž Vajngerl
a0cf18f58f HiDPI: remove more unneeded scaling of icons
Change-Id: I521024af62ea15db80f5e851875b18dcf18556e4
Reviewed-on: https://gerrit.libreoffice.org/30380
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29 21:48:09 +00:00
Tomaž Vajngerl
69b6ab1f8d tdf#100164 change scaling unit to precentage for *.5x factors
Currently we support DPI scaling by a integer factor. This commit
changes that to percentage so we can have scaling factors like
1.5x or 1.25x. This is useful with 2.7k monitors that are in
between standard DPI and HiDPI. Thresholding was adjusted to scale
to 1.5x when DPI is between 120 and 168 DPI.

The old method GetDPIScaleFactor has been changed to return a
float value insted of int. Sometimes it is however more accurate
to use GetDPIScalePercentage which was added in this commit.

Change-Id: Iaecee793ff3d5084d00adeebbcf5d7368c580882
Reviewed-on: https://gerrit.libreoffice.org/30379
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29 21:47:41 +00:00
Tomaž Vajngerl
a86144696d surpress automatic scaling / conversion for document shadow
Change-Id: Ib020161db8d5e241e923dcd629a9a4e4bb4c23da
Reviewed-on: https://gerrit.libreoffice.org/30342
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29 21:47:12 +00:00
Zdeněk Crhonek
6d68b2bbc9 add HYPGEOMDIST test case
Change-Id: I996161ff95fb682f3a9bb62fe6444be96fd6fd3f
Reviewed-on: https://gerrit.libreoffice.org/30355
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-29 18:54:57 +00:00
Zdeněk Crhonek
4d67dca78d add LOGINV test case
Change-Id: Ie05a462418322aac43f36c069749fdae195a8585
Reviewed-on: https://gerrit.libreoffice.org/30354
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-29 18:43:27 +00:00
Tomaž Vajngerl
4a4fd38c87 vcl: add bitmap::loadFromResource with additional flags
Sometimes we want to surpress automatic scaling and converting
for dark theme. This adds a loadFromResource function with
additional flags which makes this possible.

Change-Id: I893cee82ad6942644755f0c5b772fb5f073bbf00
Reviewed-on: https://gerrit.libreoffice.org/30341
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29 18:15:04 +00:00
Tomaž Vajngerl
484390a096 HiDPI: remove unneeded image scaling when HiDPI is enabled
We don't need to scale images for HiDPI mode anymore - this is now
done automatically when the image is loaded.

Change-Id: Ie285cf4d672f4c098a468d3f7560ee2700365b92
Reviewed-on: https://gerrit.libreoffice.org/30340
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29 18:14:23 +00:00
Tomaž Vajngerl
5bb5463efe tdf#51733 support SVG icon theme, disk cache and scaling / darken
Also resolves tdf#92248

This extends icon name resolving so that is in addition tries to
find an icon with the "svg" extension and load that instead of
stated (mostly "png") extension. If the filename extension is
"svg" we load the icon with the SVG filter instead.

This also adds icon scaling and conversion for HiDPI or when a
dark theme is wanted. If the SVG icon is available, we render it
at a higher resolution instead of scaling

As loading of SVG icons can be computatunally expensive, a icon
disk cache was added. This saves the rendered SVG as a PNG image
into the "cache" folder. The same caching is also used for HiDPI
and dark theme converted icons so we don't always scale or
convert the icons.

In addition some style changes and DRY fixes were made to the
ImplImageTree source code.

Change-Id: I9e421395a342ffe8da9facea7ea06e5db2778b26
Reviewed-on: https://gerrit.libreoffice.org/30339
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-29 18:14:01 +00:00