393699 Commits

Author SHA1 Message Date
Aleksas Pantechovskis
aaed6fe55a integrate libzmf
Change-Id: I0c7ea5b56ea4ed4839ff38798c0b915aaca81774
Reviewed-on: https://gerrit.libreoffice.org/26574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2016-06-23 15:39:52 +00:00
Miklos Vajna
878a860dff vcl: add initial PDF import-as-graphic filter
This allows Insert -> Image e.g. in Writer to read a PDF file, and
insert the metafile equivalent of the first page into the document.

Currently the original PDF document is lost on import (unlike when
inserting an SVG file).

Change-Id: Ib0472c5d9bd9a1da054353fa3a3a638a1052721e
Reviewed-on: https://gerrit.libreoffice.org/26586
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-23 15:25:07 +00:00
Justin Luth
2721111437 tdf#76349 writer: treat single-column break as page break
Writerfilter imports docx-defined column breaks that exist without
being in a column.  Word treats these as if they were a page break.
Writer basically just preserved and ignored them.

I limited the fix to only consider SVX_BREAK_COLUMN_BEFORE since
writerfilter is only given “column break” and treats it as column_before.

Change-Id: I0d974441d53243c4426048dd7cb60b3897b803f6
Reviewed-on: https://gerrit.libreoffice.org/26181
Tested-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-06-23 15:07:29 +00:00
Stephan Bergmann
4809fedd7c Clean up uses of Any::getValue() in svl
Change-Id: I2005ce59d6211181ed039eaff60ffd31084e1d40
2016-06-23 16:48:15 +02:00
Tor Lillqvist
c7c27b9b19 tdf#100222: Inform user that a restart is needed after toggling OpenCL use
Change-Id: Ic33cb02440276bc0601c86f2c9eab7d74a6b9874
2016-06-23 17:46:35 +03:00
Caolán McNamara
83f977c7f4 Resolves: tdf#100460 queryContentCells doesn't count annotations...
since

commit c06dbbe7594c2a0b5a5b19f8e183d9c421e6e094
Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
Date:   Thu Feb 23 23:36:49 2012 +0100

    remove mpNote from ScBaseCell

Change-Id: I281a207e26aec8886b1f46b9279e1135b61586da
2016-06-23 15:42:23 +01:00
Tor Lillqvist
7000e1a064 Improve OpenCL logging and warnings
Explicitly catch and report the 'Unhandled' and 'OpenCLError'
exceptions, too, in DynamicKernel::create, instead of relying on a
catch(...).

(Actually not sure why we need three separate classes of OpenCL
handling exceptions.)

We have the code to show the file and line where something exceptional
(or actually not so exceptional) happens with OpenCL, so make use of
that then.

It is a perfectly normal thing to throw (and catch) at least the
UnhandledToken and Unhandled exceptions (when compiling a formula and
noticing that we don't want to use OpenCL for it after all), so it
does not make sense SAL_WARN about them. Just SAL_INFO is fine.

Change-Id: I56770f47622cb4bc40f2216c5e78d3da3c7c9adf
2016-06-23 17:25:33 +03:00
Caolán McNamara
84dc0157df Related: tdf#100460 GetNotesInRange doesn't count last cell in range
e.g. open document from tdf#100460 and select select A20:A21 and right click
and there is a hide comment entry. Shrink the selection to just A20 (which has
the comment in it) and the right click menu has no hide comment entry in it.

std::for_each(it, itEnd

means it < itEnd but here we want the rows indicated by

nStartRow <= nEndRow

so we need to increment itEnd by one to get the right range

Change-Id: I48e8c0748f520671e09f04b16961bf9729960317
2016-06-23 15:24:07 +01:00
Muhammet Kara
456902abb4 Improve readability of OUString concatanation in LocalizationMgr
It is more readable and more efficient as a bonus.
See: https://goo.gl/jsVAwy:

Change-Id: I56ba7aa1477361a686ffb50955525b73cce24197
Reviewed-on: https://gerrit.libreoffice.org/26585
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-23 14:01:31 +00:00
Caolán McNamara
1413c5d39a map MenuToggleButton to GtkToggleButton with a custom menu property
we don't have non-menu ToggleButtons yet, so thats not done here.

since we first started with GtkPushButton:menu_attrib to indicate
menubuttons gtk has grown menu buttons, but they don't have the
idea of a gtktogglemenu button, so this attribute still has a role
to play I guess

Change-Id: Iebfe5ccf996e22784cf9aaf2bcf367eed79ae686
2016-06-23 14:31:24 +01:00
Susobhan Ghosh
3881fffe42 tdf#83830: Page Styles Panel
Added new helper class to svx for numbering

Change-Id: Ie7db4059568024e9bed460fcf7c9215bd2ef788f
Reviewed-on: https://gerrit.libreoffice.org/26020
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-06-23 13:15:07 +00:00
Noel Grandin
2fe32490f0 loplugin singlevalfields, need to check default constructor code too
Change-Id: Idcc8de6f1d403a57c59e84774bd7a97e2f3fc224
2016-06-23 15:14:13 +02:00
Stephan Bergmann
7de0439fe2 loplugin:unusedvariablecheck
Change-Id: Ia9c5ea707990d03dd4042c2e0a791976cc1b5f74
2016-06-23 15:08:26 +02:00
Stephan Bergmann
b498cf6262 -Werror=unused-function
Change-Id: Ib579e8896a751383d31c1dbf7e6ebf5c0774a976
2016-06-23 15:03:04 +02:00
Stephan Bergmann
20f58e7904 -Werror=unused-but-set-variable
Change-Id: I0b3586bb3acca4075b26790a8dfe3f97d6921feb
2016-06-23 15:02:01 +02:00
Michael Stahl
496cba2e8b Makefile: move check-if-root earlier
Somebody who might invoke make as root might also invoke make with -j,
so don't start building in that case.

Change-Id: I0c87aba948cd78a23ad4c49f880700f65684424c
2016-06-23 14:36:59 +02:00
Noel Grandin
8d861bd702 new loplugin: singlevalfields
look for fields that only have a single constant value assigned to them

Change-Id: Iafcd37fdb8a8119bbc00f92981a1a01badf9c5a2
2016-06-23 13:13:57 +02:00
Stephan Bergmann
1f1f26bf0f loplugin:implicitboolconversion
Change-Id: I21aeb9504be38e4a6b55892730131a878234ced3
2016-06-23 13:08:11 +02:00
Noel Grandin
5bd5baff3f remove some more (void) style function definitions/declarations
found with
    git grep -nP '^\s*void\s*\)'

Change-Id: I1206031cf957cb6f957cae64ec5cae1280bda694
Reviewed-on: https://gerrit.libreoffice.org/26590
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-23 10:57:45 +00:00
Prashant
d43f4390e0 tdf#67302 Resolving tablesSupplier name clash for postgresql
Change-Id: Ic9bedc678699e136c09a51575f1d27131c5ffd29
Reviewed-on: https://gerrit.libreoffice.org/25069
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-23 10:14:55 +00:00
anwilli5
9e28b2f9ac tdf#96607 'Save as' doesn't update global auto-recovery state
The auto-recovery service maintains a list of structures (one for each open
document) containing information needed to carry out the auto-save
functionality. One such piece of information is the location of the backup
file, stored in a struct member named 'OldTempURL'.  At every auto-save
interval, this list is iterated through and a function (implts_saveOneDoc)
is called during each iteration to save the current state of the associated
document.

The algorithm works as follows:
 1. A new backup file URL is chosen so as not to conflict with any already
    existing backup files in the backup directory.  This URL is based on the
    file name and incorporates a number (starting at 0) that is incremented
    until a name is chosen that doesn't conflict.

 2. The document is saved to this new backup file URL

 3. The previous backup file (indicated by its structure's 'OldTempURL') is
    deleted

 4. The new backup file URL is stored (in its structure's 'OldTempURL') for the
    next time the file needs to be saved.

Assuming you start with a new Writer doc and then make some changes, when it is
time to auto-save, the backup file name 'untitled_0.odt' (excluding path) will
be selected, the latest state of the open file will be written to that backup
file, and the full URL for the backup file will be saved into the struct
'OldTempURL' member.

The next time changes are made and an auto-save occurs, this algorithm will
result in the name 'untitled_1.odt' being selected, the file contents saved
into this new file, 'untitled_0.odt' being deleted, and the full URL for the
new backup file being saved in 'OldTempURL'.

The third time through results in 'untitled_0.odt' being selected (since this
file doesn't exist on disk), and subsequent iterations of auto-saving cause
the backup file name to alternate between the two aforementioned.

The problem occurs during a 'Save as' operation. When this happens, the backup
file is deleted (which is fine - it was just saved, and the next auto-save will
back it up) but 'OldTempURL' is not properly reset (see below for more info.)
During the next auto-save, 'untitled_0.odt' will be selected for the new backup
file name (since no file exists by this name), and one of two things will
happen (based on how many auto-saves have occurred):

 1. 'OldTempURL' points to 'untitled_1.odt', and the algorithm above continues
    to work correctly (at least in that it continues to backup file contents.)

 2. 'OldTempURL' points to 'untitled_0.odt', the name chosen for the new backup
    file.  In this case, the document contents will be saved to this file
    (step 2) but then the file will be deleted (step 3).  'OldTempURL' will
    maintain this URL from then on out, causing this case to be hit for all
    future auto-save intervals.

So, 50% of the time (30 minutes out of every hour) auto-save will stop backing
up file contents on a 'Save as'.

The function that handles the 'Save as' case (implts_markDocumentAsSaved)
clears 'OldTempURL' and sets other relavent struct members for a local variable
copy of the global struct, but doesn't copy them back. :(  These changes are
effectively lost when the function returns.

There are several other cases where this appears to be happening as well, but
more work is needed to determine whether this is actually the case:
 - implts_prepareSessionShutdown
 - implts_saveDocs, handling the 'dangerousDocs' and in a few other places
 - implts_openDocs
 - implts_resetHandleStates

Also, there is some JUnitTest code for auto-save, but it is currently disabled
(and fails to run successfully.) It'd be great to get these working again, or
to just write python equivalents. Implementing this would like take me a while,
though, so for now I just tested manually to ensure that this fixes the issue.

When I have some more time I'd like to work more on this, but I wanted to send
this patch in for now to address bug #96607.

This may also address bug #99890, since some of the struct members that don't
make it into the global state relate to the file name.  I haven't explicitly
tested this case, though.

Change-Id: Ic702d6f78e60c7cf828a1564ccca118dd45d152b
Reviewed-on: https://gerrit.libreoffice.org/25948
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-23 10:10:55 +00:00
Zhengqiang Wang
45909a8e7e tdf#100153 modify noSmoking shape
*modify customshapeproperties.cxx
 fix compile error : make oox dbglevel=2
 The define of dumpCode() has been removed by c714b43b0137ad253f51e1c65417c9874b8509e5
*modify presetShapeDefinitions.xml
 fix noSmoking shape
*modfiy oox-drawingml-cs-presets
 this file is generated by presetShapeDefinitions.xml

Change-Id: I383d6b6961b546585035afd8c1a4398385a11914
Reviewed-on: https://gerrit.libreoffice.org/25801
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-23 10:06:29 +00:00
Gökhan Gurbetoğlu
ea5a5b1dbb tdf#99589 - tolower / toupper - dangerous to Turks ...
Change-Id: Id3b9abd557f2b8dfc942589362452cbdb0232da9
Reviewed-on: https://gerrit.libreoffice.org/26546
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-23 10:01:18 +00:00
Gökhan Gurbetoğlu
9b9e5cfd2f tdf#99589 - tolower / toupper - dangerous to Turks ...
Change-Id: I8b0fe9354232a7b60f3605fa6f90f6741f7bf683
Reviewed-on: https://gerrit.libreoffice.org/26537
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-23 09:59:49 +00:00
skswales
8ab7db320f tdf#97872 File association in Windows registry
Fix for double backslashes in paths to programs in shell/open etc.
registry entries for all non-native file types such as .doc that are
mapped by installer to use scalc.exe/swriter.exe etc.

Change-Id: Ice8033d4fee079c0fb6d8f84e00ebd784e85d135
Reviewed-on: https://gerrit.libreoffice.org/25849
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-23 09:56:15 +00:00
Michael Stahl
8d8b9b80b1 package: fix exception handling in DeflateThread (related tdf#91807)
In the bugdoc of tdf#91807 there are at least 49 corrupt zip streams
that raise exceptions in the DeflateThreads.  Because the maximum
allowed number of threads happens to be 48, this results in an infinite
loop in ZipOutputStream::reduceScheduledThreadsToGivenNumberOrLess().

(regression from 7e2ea27e5d56f5cf767a6718a0f5edc28e24af14)

In case an exception is thrown, don't re-throw it immediately, which
might cause trouble such as leaking all of the ZipOutputEntry instances
in m_aEntries.

Change-Id: Ia74ab8e46fa1349c049d05dbec3454bfbe7d61d9
2016-06-23 11:40:35 +02:00
Michael Stahl
cd292ba17c vcl: avoid vcl_filters_test crash with ASAN 32-bit
ASAN usually aborts on operator new[] allocation failure but with
allocator_may_return_null=1 in ASAN_OPTIONS it returns null instead; it
doesn't throw std::bad_alloc though.

Change-Id: I28d67a787e90604c12ad06fd97d265664bd62ef2
2016-06-23 11:39:00 +02:00
Miklos Vajna
ed2d342e97 Remove unused SfxObjectShell::libreOfficeKitCallback()
All clients have been converted to use
SfxViewShell::libreOfficeKitViewCallback() instead.

Change-Id: I793dad5194769f331037b12a1b1afba96ddea4ba
Reviewed-on: https://gerrit.libreoffice.org/26584
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-23 09:10:22 +00:00
Jan Holesovsky
4d1118e5cc Simplify dynamic_cast followed by a static_cast.
Change-Id: Ia8b1145d43828a40611e5f59651d9dc6ff7d5360
2016-06-23 10:58:32 +02:00
Jan Holesovsky
a07a69850a Introduce FillAutoStyle() method to reduce copy'n'paste.
Change-Id: Ibdb6ae15790cc117d3d8c41c57924f9b22e85cba
2016-06-23 10:58:32 +02:00
Vasily Melenchuk
535ac37c5f support for ms binary format validation in sd module export tests
Change-Id: Ie03b0485bbe8ecaa452f19fbcbfe3bf5829aff68
Reviewed-on: https://gerrit.libreoffice.org/26515
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2016-06-23 08:56:03 +00:00
Caolán McNamara
d531743ca3 VclPtr: svtools error message dialog doesn't dispose
Change-Id: I83640cc60d5e0239d228c749c32f896df5e2d9f2
2016-06-23 09:41:58 +01:00
Miklos Vajna
7ab4f31b6e compilerplugins: move oncevar into store
As suggested by Stephan and agreed by Noel -- as its warnings are not
useful in all cases.

Change-Id: I3c6034ae9d3c74aeb089a67dc48c1f91a3ea3a21
2016-06-23 09:44:19 +02:00
Miklos Vajna
bb19a820e8 Revert "desktop: fix loplugin:oncevar"
This reverts commit 8dc2873081bff3fe7107d472a91a24af8b67a87d. Instead of
working around the warning, the plugin will be disabled, as its warnings
are not useful in all cases.
2016-06-23 09:44:19 +02:00
Akshay Deep
596065ff05 GSoC tdf#87697 START CENTER: Indicate selected thumbnailview
Added new "Active" state to PushButton class
Active state used in MenuToggleButton class.

Active => Pressed + Flyover

When hovered in Active state, Active => Flyover only

Change-Id: Iece1550b6d742a7ab3c9f4c7516ec855e1a1b6ef
Reviewed-on: https://gerrit.libreoffice.org/26470
Reviewed-by: Akshay Deep <akshaydeepiitr@gmail.com>
Tested-by: Akshay Deep <akshaydeepiitr@gmail.com>
2016-06-23 07:09:13 +00:00
irem
2c1056d679 tdf#46279 Show restart message after extension installation
Change-Id: I91feab63b77055b8f73d0fb481a76586b249160c
Reviewed-on: https://gerrit.libreoffice.org/24595
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-23 06:44:23 +00:00
Noel Grandin
aa0d0536a4 tdf#97527 - vcl: reference-count Menu
some places are marked with "dodgy"- need to check those to see
what is going on, because they are leaving dangling pointers behind
in the Menu class

Change-Id: I41d5c7c0fec2f70ce9e3ffdc48cd03d26c0a869b
Reviewed-on: https://gerrit.libreoffice.org/26516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-23 06:28:00 +00:00
Markus Mohrhard
b722f3d6fc uitest: improve the message of the ui test runner
Change-Id: I5026590506b4ddf3db95fb14fe6b0890255a5a25
2016-06-23 05:34:21 +02:00
Adolfo Jayme Barrientos
65dd6547f3 Updated core
Project: help  c23a2a94aae6b2f1290145323460848eff867305

Replace ASCII approximation of trademark symbol with real character

Change-Id: I70c466baaaa8e2fbcba8c4c36fd4df6f14cda22b
2016-06-23 03:22:36 +00:00
Vasily Melenchuk
a553fa42f3 support for ms binary format validation in chart2 module export tests
Validation is done with Microsoft Office Binary File Format Validator if it
is enabled. However binary files are failing validation, so validation is
disbled in corresponding tests.

Change-Id: I9f6ff5c3dd9e3e3c0bb37ce895e60e38a0b43e9a
Reviewed-on: https://gerrit.libreoffice.org/26510
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2016-06-23 02:08:58 +00:00
Takeshi Abe
8456d83ed9 starmath: Add a test case for parsing -
Change-Id: I0fc0b7e2abbadee2f13d477c5ddd2290f37487a0
Reviewed-on: https://gerrit.libreoffice.org/26563
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-06-23 01:06:41 +00:00
Bartosz Kosiorek
228c25fd17 tdf#98106 Preserving hidden and empty rows after xlsx export
Change-Id: I1ff2bab766eadac1dd5d483453af0e760634083d
Reviewed-on: https://gerrit.libreoffice.org/26421
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-06-22 23:04:47 +00:00
Caolán McNamara
92cee94a26 crashtesting: fix bmp->odg failure...
id:000178,src:000000,op:havoc,rep:16.bmp
id:000383,src:000047,op:flip2,pos:18,+cov.bmp
id:000403,src:000047,op:arith32,pos:22,val:-33.bmp
id:000317,src:000025,op:havoc,rep:8.bmp
id:000119,src:000000,op:havoc,rep:16.bmp
id:000167,src:000000,op:havoc,rep:8.bmp

revealed since

commit 81e3ca4f60e6ac0823c1233841c22a759cfe937f
Author: Tor Lillqvist <tml@collabora.com>
Date:   Tue Jun 21 10:34:21 2016 +0300

    Use real assert() instead of DBG_ASSERT()

sanitize invalid palette entry indexes at the outer perimeter on initial load
to try and avoid having to do it in all sort of places in the interior.

we load the palette before getting here, so we should always know the palette size here

Change-Id: I8856787d28310898c3806647fc181a97cfa88514
2016-06-22 21:39:30 +01:00
Stephan Bergmann
c4077396a6 loplugin:stringconstant
Change-Id: I98c383106c8d5874bc8eb3daf05ca3f172d9f41a
2016-06-22 22:14:03 +02:00
Miklos Vajna
d1c7510e7c svtools: fix -Werror=unused-parameter
Change-Id: Ic8887571e376483e84d7c2eb270d3daaa37c63f3
2016-06-22 22:05:13 +02:00
skswales
6a17c118f3 Work towards tdf#72606 EasyHack _tstring/TCHAR elimination
fpicker module TCHAR elimination and A/W clarity

NB fpicker was already being compiled as UNICODE

Use SendMessageW() as appropriate for clarity

Use SAL_N_ELEMENTS for buffer capacity (number of WCHAR) when retrieving class name

Change-Id: Ie6d0b1df1b9a2fb18f4cdfc51e5d4c3c55c9ca17
Reviewed-on: https://gerrit.libreoffice.org/26526
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-22 19:52:27 +00:00
Markus Mohrhard
dd3e8ad79d uitest: remove debug print statements
Change-Id: I7dc68ef48a69f4878a20e6cb1dd3203dfc3097fd
2016-06-22 18:19:36 +02:00
Markus Mohrhard
e41cb96847 uitest: we also need a SolarMutex when deleting the wrapper object
The wrapper has references to vcl objects and the destructor might have
the last reference to a vcl::Window causing a delete. Avoid potential
problems (I have seen one deadlock in the chart wizard code) by taking
the SolarMutex.

Change-Id: I8afcf79842b2f8e8f822b975629d5c8e18a86163
2016-06-22 18:19:35 +02:00
Markus Mohrhard
6da7ccfc2a uitest: remove sleeps and prints from impress and writer parts
Change-Id: Ic4c4ba74701303df1ff38c5ed6ed7d521b369053
2016-06-22 18:19:35 +02:00
Markus Mohrhard
18d64ed6b4 uitest: remove sleeps from demo ui parts
Change-Id: Ib1fc73c317186ede3f41029aa40b0c6a075c085d
2016-06-22 18:19:35 +02:00