Commit Graph

10315 Commits

Author SHA1 Message Date
Noel Grandin
fc8f32adc2 loplugin:unnnecessaryvirtual in vcl
Change-Id: Ifa8bfafb2e527ce5976f3bd310d107cb2840a5f6
Reviewed-on: https://gerrit.libreoffice.org/30531
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-04 07:16:25 +00:00
Noel Grandin
5f77e6e930 update loplugin:unnnecessaryvirtual to handler destructors
and update modules writerfilter..xmloff with the resulting changes

Change-Id: I54d19c22ddb0ff579b32e4934d266c925b19305c
Reviewed-on: https://gerrit.libreoffice.org/30530
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-04 07:15:03 +00:00
Noel Grandin
7abd369964 loplugin:unusedmethods
Change-Id: Ie1f840c3ec9a2d5888f95cf05e531a8a9464bf2e
Reviewed-on: https://gerrit.libreoffice.org/30524
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-04 07:13:58 +00:00
Jan Holesovsky
84400eae86 tdf#88821: Implement support for <meta charset="..."> for HTML import.
The editengine HTML import was not handling it at all, and consequently not
setting the right encoding when importing HTML in Calc.

Change-Id: I3ca3dd20f36cfb579fb7ae4cd3da63a69d97601e
2016-11-03 22:55:34 +01:00
Samuel Mehrbrodt
291d8d4f94 SafeMode: Add indicator to window title when in Safe Mode
Change-Id: I1d8350315768093b4c4af1cd8b732602c5217edb
Reviewed-on: https://gerrit.libreoffice.org/30518
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-11-03 12:20:11 +00:00
Samuel Mehrbrodt
e509c22863 SafeModeDialog: Allow to create zip file from profile
Change-Id: I4296d1cf5058be359ffed46745673cf26eba3375
Reviewed-on: https://gerrit.libreoffice.org/30479
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-11-03 12:19:16 +00:00
Noel Grandin
b01c5ae956 loplugin:unusedmethods unused return types
Change-Id: I88204bca60dd1e299b040c52bc87e500cbfaa930
Reviewed-on: https://gerrit.libreoffice.org/30519
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-03 11:37:31 +00:00
Samuel Mehrbrodt
b3a229ad0d Add helper for creating zip files
Change-Id: I8b49b74622bf4d671d640e4cd06dc2da348ee222
Reviewed-on: https://gerrit.libreoffice.org/30478
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-11-03 11:25:16 +00:00
Caolán McNamara
11a1b70da2 coverity#1371313 Missing move assignment operator
Change-Id: I07a9d7fe837c18e66b4a2a57186f1f9b0d44daee
2016-11-03 11:23:35 +00:00
Noel Grandin
880bcf9ed8 loplugin:unnecessaryvirtual
Change-Id: I572b83949c7e643536b7d62567760546509e4d9f
Reviewed-on: https://gerrit.libreoffice.org/30514
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-03 09:06:45 +00:00
Noel Grandin
8de24d1652 Revert "remove unnecessary casts"
This reverts commit fa80dae9a7.

because current Clang master complains with

/home/noel/libo3/svl/source/items/itemset.cxx:189:26: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs]
        va_start( pArgs, nNull );
                         ^
/home/noel/libo3/svl/source/items/itemset.cxx:176:89: note: parameter of type 'sal_uInt16' (aka 'unsigned short') is declared here
SfxItemSet::SfxItemSet(SfxItemPool& rPool, sal_uInt16 nWh1, sal_uInt16 nWh2, sal_uInt16 nNull, ...)
2016-11-03 08:47:47 +02:00
Jochen Nitschke
fa80dae9a7 remove unnecessary casts
Which IDs are always sal_uInt16 and likely passed from defines

Change-Id: I134358289ccd338ef1ff6ba963e25a524e790f4e
Reviewed-on: https://gerrit.libreoffice.org/30498
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-03 06:34:22 +00:00
Jochen Nitschke
1bbf7f653b bin nranges.*, move remaining functions into itemset.cxx
Change-Id: I1b88d98e00415e9c32a48486912d577a00fbfbda
Reviewed-on: https://gerrit.libreoffice.org/30486
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-03 06:33:34 +00:00
Noel Grandin
2b3de550ef remove pParentFrame from SfxFrame
Found by the singlevalfields loplugin.

Dead as least as far back as
  commit 93a7b55858
  Author: Frank Schoenheit [fs] <frank.schoenheit@sun.com>
  Date:   Fri Nov 27 21:16:24 2009 +0100
  [CWS autorecovery] merged SfxTopFrame into SfxFrame
  SfxTopFrame was the only class deriving from the abstract class SfxFrame, so both
  can effectively be treated as one class.

Arguably when that commit was done, SfxFrame should also have been renamed
to SfxTopFrame, since that it was it now seems to be.

Expanding the nullptr value off that field means that:
    SfxFrame::GetTopFrame
       always return this
    SfxFrame::IsParent
       always returns false
    SfxViewFrame::GetTopFrame
       is now the same as SfxViewFrame::GetFrame
    SfxViewFrame::GetParentViewFrame
       now returns null

Change-Id: Iac088fa485c3d7299d1553845ced2f5ced3c85f2
Reviewed-on: https://gerrit.libreoffice.org/30485
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-03 06:30:11 +00:00
Eike Rathke
3e42714c76 upgrade to ICU 58
Change-Id: I4a992447df65b337721a2a2627d974172a14cba5
Reviewed-on: https://gerrit.libreoffice.org/30487
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-11-02 18:42:47 +00:00
Caolán McNamara
4b7435e31a let menu button launch arbitrary floating windows
and not just menus, this is like how the gtk equivalent can launch popovers

Change-Id: I53ae96aab0c51d75405dba15ab8080d7315471e3
2016-11-02 17:27:56 +00:00
Tor Lillqvist
f9f1042773 Remove noise comment, add FIXME
Change-Id: I1ad8ff94744e3a4b0844a04eabb7f19a3b15bb1a
2016-11-02 17:53:52 +02:00
Caolán McNamara
2734a6ce77 getNonLayoutRealParent is unused
Change-Id: Ie003bc7ccc9985162ea52a1b0164118d9c2ce437
2016-11-02 13:58:03 +00:00
Caolán McNamara
c7b0d2f107 drop SvxColorWindow::Resize
Change-Id: I22ed6ace464cdfd4ee0c12e8269d8141efce57a6
2016-11-02 13:50:52 +00:00
Caolán McNamara
eb153b8f1a move SvxColorWindow to include/svx
Change-Id: Ie2e11c8582cbb204178c0616580f942d1ce773fb
2016-11-02 13:50:03 +00:00
Noel Grandin
b1f8cf3782 loplugin:singlevalfields
Change-Id: I65f96d9cd24572c8d0946acf4d2d45eb3db83a76
Reviewed-on: https://gerrit.libreoffice.org/30476
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-02 13:06:37 +00:00
Justin Luth
f013d4a1f4 tdf#41542 PaddingWithoutBorders: allow UI changes if...
If the compatibility option is set, allow the border dialog for frames
to be able to adjust the spacing values without enabling the border lines.
That means it is only true for .doc and .docx right now.

Change-Id: I4004a849f7369c993089d1c7b5d856cbea4f7780
Reviewed-on: https://gerrit.libreoffice.org/28602
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-11-02 09:25:01 +00:00
melikeyurtoglu
9937b8daa7 tdf#91222 VclBuilder constructor cleanup
Change-Id: I9a82ebc57c7e246841fda0262763fa9a7fbd5970
Signed-off-by: melikeyurtoglu <aysemelikeyurtoglu@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/29919
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-02 09:23:27 +00:00
Noel Grandin
3fea7ac94b loplugin:unusedfields
Change-Id: I96634c18ba6600f8f7d5d04a162dcd7e1e312923
Reviewed-on: https://gerrit.libreoffice.org/30474
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-02 07:54:20 +00:00
Samuel Mehrbrodt
69de2b4772 SafeModeDialog: Add link to user profile
Change-Id: I0096b3d7db51e28eb58c7209109c30b73b382478
Reviewed-on: https://gerrit.libreoffice.org/30448
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-11-01 14:58:25 +00:00
Samuel Mehrbrodt
1161de521e safemode: Add option to disable H/W acceleration
Change-Id: Ic6751717c14d317b5a4bc64c4fd1cf2b2f5efabf
Reviewed-on: https://gerrit.libreoffice.org/30112
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-11-01 14:54:04 +00:00
Takeshi Abe
cb90f0976d Omit the default comparator
Change-Id: Idea8ea8dab6a86d7be6394aef1cf7f25b75009e0
Reviewed-on: https://gerrit.libreoffice.org/30319
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-11-01 04:11:44 +00:00
Stephan Bergmann
40633e32f3 Revert "Revert "Prevent nonsensical comparations between OUString and nullptr_t""
This reverts commit e559c0c9cbfd819f22ef695a9823bb71f4385b58; just turn the
deleted overloads into non-friend functions (and rely on any other overloads to
be still found via ADL).

Change-Id: I2af834162cab2e71ed9e32ae6903bc9f86d77ba2
Reviewed-on: https://gerrit.libreoffice.org/30441
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-31 15:29:17 +00:00
Tomaž Vajngerl
c3043a3072 tdf#103591 icon theme name resolving, ui fixes, prioritize png
- Prefer "png" over "svg" because for Tango theme we include both
  "png" and "svg" icon, but rendering of "svg" crashes
- We save the choice of which icons to use into the profile. When
  32px icons were added the values have shifted - "auto" had value
  2 has became "32px" choice and "auto" has the new value 3. In the
  case of the default "auto", we now always showed 32px icons. This
  commit reverts the "auto" value 2 and puts "32px" choice to 3.
- Name resolving now always removes the icon file extension and
  adds the ".png" and ".svg" extension before resolving. This
  makes it possible to define the name of the icon without the
  file extension.

Change-Id: I05e3913aaee0037692609ced246954b14a13828a
Reviewed-on: https://gerrit.libreoffice.org/30440
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-10-31 14:49:57 +00:00
Stephan Bergmann
e559c0c9cb Revert "Prevent nonsensical comparations between OUString and nullptr_t"
This reverts commit 2e3f5c8dd3, some GCC
have trouble with deleted friend functions; need to fix that properly.
2016-10-31 13:37:17 +01:00
Stephan Bergmann
2e3f5c8dd3 Prevent nonsensical comparations between OUString and nullptr_t
...now that

1b98f38 css.xml.sax.XAttributeList is broken by design
074defe Strange OUString null check
a24105a Nonsensical OUString null check
9799fe3 Nonsensical OUString null check
d6b9fea Nonsensical OUString null check
f2de7d0 This apparently always wanted to check that _rChars.trim() is non-empty
a8cfc97 SvxBrushItem::GetGraphicLink no longer returns a pointer

are fixed.  (OString didn't have this problem with overloaded operator ==/!=,
but had a similar issue with nullptr_t that OUString in turn didn't have,
f20162304d "Rule out OString(std::nullptr_t)".)

Change-Id: I4ca0e1f5a911448e7bc9b8c5dddff5993d61ef18
2016-10-31 13:23:34 +01: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
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
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
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
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
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
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
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
Michael Stahl
85c38f1cf4 svl: change SfxPoolItem ref-count to sal_uInt32
Fixes the inconsistency between potentially 64-bit sal_uLong and
the max-value macros that are ~2^32.

Change-Id: I895c674819cf4766cb2c7441f670bc1305362a74
2016-10-28 22:49:28 +02:00
Michael Stahl
855e69d37e svl: SfxPoolItem reference counting assertions
Change-Id: Ice2ec9a4592a1fad36913ae7d089aa8c63dfc669
2016-10-28 22:49:28 +02:00
Justin Luth
b41e7b817e tdf#63846 assign macros after VBA project fully loaded.
fixes regression caused by d4743045a0.

see the documentation for VbaMacroAttacherBase, which indicates that
the macros are to be attached after all objects are finished loading.

Made attachMacros() public so it could be called separately since so
many things are inter-dependent in the logic flow.

Change-Id: I11f7f4a1a75d6f77a97e12e3359d6ea8a995f518
Reviewed-on: https://gerrit.libreoffice.org/30337
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-10-28 16:12:27 +00:00
Tamás Zolnai
b927c1f4b3 tdf#103544: DOCX exp.: Image loss when have a frame anchored to the same para.
Regression from:
83d51e5e52

Partly revert the commit causes this regression.
I checked the related bugs (tdf#78590,tdf#80748)
intended to be fixed by this commit and reverting
this part does not bring back the corruption.
I guess something changed in frames' and text boxes'
import in the meantime, because this MergeMarks::IGNORE
is useless now.

Change-Id: If17776e8628561961c7ce2a2994e3fc609f75639
Reviewed-on: https://gerrit.libreoffice.org/30351
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2016-10-28 14:10:41 +00:00
Noel Grandin
8a22bc93e0 update unnecessaryoverride plugin to find pure forwarding methods
which can be replaced with using declarations.

Is there a more efficient way to code the search? Seems to slow the
build down a little.

Change-Id: I08cda21fa70dce6572e1acc71bf5e6df36bb951f
Reviewed-on: https://gerrit.libreoffice.org/30157
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-28 12:56:17 +00:00
Caolán McNamara
d3e33f7ba8 ImplInitMenuButtonData can be folded into ctor now
because theres no ResId loader anymore

Change-Id: Id90786d710fe75e47c162fd00ad7fd672b9cee30
2016-10-28 13:03:45 +01:00
Caolán McNamara
624ff6633c only draw menubutton separator when two sides do something different
Change-Id: If6e3b72eacef2325f9f30770bbed32c627bc035c
2016-10-28 12:37:05 +01:00
Caolán McNamara
94af3da7e1 rename and explain the MENUBUTTON_MENUMODE_TIMED stuff
Change-Id: Ifc6ddfb0cc249e537c01f28bab84b42c6b1577d9
2016-10-28 12:22:52 +01:00
Caolán McNamara
77d5d9f9af these usings are unnecessary
Change-Id: Ieeb753b700631958ad101354406b13863b3bab03
2016-10-28 10:56:20 +01:00
Caolán McNamara
807151aa13 coverity#1371275 Missing move assignment operator
Change-Id: I6c47c797d2654506bdc95c35b2558ce812f4070d
2016-10-28 10:09:32 +01:00
Caolán McNamara
5aa43c380a coverity#1371262 Missing move assignment operator
Change-Id: Ibb430a683f818add50facc23ac2893b558bff70c
2016-10-28 10:09:32 +01:00