Commit Graph

14450 Commits

Author SHA1 Message Date
fd0be5e94f sd: lool search all - 2nd search did not work - fixed
TODO: now table are skipped because current implementation is not
able to iterate through table cells and when a match occurs on the first
cell the text object iterator stops working;

Change-Id: I36ca4dabe88b0eb8fd89d3fe3dcc6951e5c03d0e
Reviewed-on: https://gerrit.libreoffice.org/21166
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-01-07 10:59:21 +01:00
66b8b09d0a set reasonable default size for new draw/impress tables
The width was decent, except that on small paper (A6) it was
wider than the paper size.

The height was terrible - the minimum size possible. It was too small
for even a single line of text. That made it hard to grab the table edge
(instead grabbing a row edge) when trying to resize.

Now the height and width are limited to the page/view size,
and based on the number of rows created.  One possible enhancement
would be to use the border width instead of the page width.

Change-Id: I4e106a7bc34f65886e3c80d308499242c0fdd7d8
Reviewed-on: https://gerrit.libreoffice.org/21171
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-01-07 09:11:10 +00:00
fd6263e376 Make E3dScene3D::GetCamera return non-reference
I stumbled over this when Valgrind'ing CppunitTest_sd_filters_test somewhat
erroneously reported

  Source and destination overlap in memcpy(0x2fde4af8, 0x2fde4af8, 96)

for

  aCamera = rNewCamera;

in E3dScene::SetCamera (svx/source/engine3d/scene3d.cxx), where the compiler
chose to use memcpy in the implicit definition of the Viewport3D (being a base
class of Camera3D) copy assignment operator, and the call pattern of
Get/SetCamera in EnhancedCustomShape3d::Create3DObject
(svx/source/customshapes/EnhancedCustomShape3d.cxx) causes that assignment to be
a self-assignment.

Upon closer inspection, some calls of GetCamera already create a copy from the
returned reference, while others modified the returned reference, but then would
also always call SetCamera on it.  An alternative to the given change would have
been to instead change SetCamera(Camera3D&) to UpdateCamera() and require all
call sites of GetCamera/UpdateCamera to modify the reference returned from
GetCamera, but it looks safer overall to go this way.

Change-Id: I578e72db57630dca1b09124a3b11d177005b797d
2016-01-06 13:22:26 +01:00
5b22663e37 Make SotFactory private to sot/ and clean a bit
Change-Id: Ia683280a3e95eee995e036db6bde5d28852f92ff
2016-01-05 20:41:11 +01:00
d75b9fd582 tdf#94205: Use o3tl::make_unique insted of new+std::move.
Change-Id: I9ff14760479d2ac882546e2e5b74ab750ba2fa4b
Reviewed-on: https://gerrit.libreoffice.org/20984
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-01-05 11:47:50 +00:00
9d0b06e9f7 new loplugin rangedforcopy - use reference in range based for
Inspired by 6e6ae9803796b120e95f6e89575e03c5fd0ed3c2

Change-Id: Ia0f264d3a6bbf076aa5080e3398683e50bc6ef01
Reviewed-on: https://gerrit.libreoffice.org/20190
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-01-05 11:06:52 +00:00
3b4059dc53 tdf#96708: don't modify document while copying to clipboard
I.e., don't try to create auto-layout for clipboard pages which
don't contain one; don't resize objects to text.

Also, don't invalidate items that are equal to defaults,
because explicitly set items are not the same as absent items:
pasting an object without an item makes the property to inherit
new target's default, while when the item is present, the default
doesn't apply.

Also, don't consider selected state of the page while stringifying
- this makes selected page string to differ from not-selected
clipboard page.

Change-Id: I172e03e1a8c428e5fcae3a116cc9ad8de79f1a87
Reviewed-on: https://gerrit.libreoffice.org/20871
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-01-05 07:18:17 +00:00
5fe01e8b69 tdf#89540 Completed show draw functions button for impress and draw.
v2: failed commit.
v3: Solved slot defination and dimmed button problem.
v4: Tried to find slot execution method.
v5: Added a control for draw toolbar name in impress and draw
v6: Toolbar name control is changed for checking request only impress and draw.
v7: Overrided initialize method of base class.
v8: Control provided with module name.
v9: Cleaned unnecessary included headers
v10: Removed m_sModuleName defination and reused base class' m_sModuleName variable.
Added white space before header files. Moved control into the initialize method.
Control is changed as only controls impress or draw.

Change-Id: I781783a72954af1f16212b981356db472ed48739
Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
2015-12-30 22:58:10 +02:00
41dde8319c Kill remaining plugin bits
Change-Id: Icd99757b48626ef43313e8de42c4e5462f85a958
Reviewed-on: https://gerrit.libreoffice.org/21008
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-12-30 09:31:22 +00:00
bea8a7ad63 cppcheck: noExplicitConstructor
Change-Id: Ib43e53d5b6c9c130adb765ac9b769f58060ac640
2015-12-29 19:46:23 +00:00
6b9fdc5860 Bail out early (so to avoid unuseful dynamic_casts)
Change-Id: Ie1940e2178585c56cecdbbcff9c9e57aa8b05459
2015-12-27 16:51:29 +01:00
9a383588ad tdf#84846 Merge identical GotoTreeBookmark into GetObjectIsMarked
Removed some duplicate code.
All current behavior should stay the same.

Merged GotoTreeBookmark into the almost identical GetObjectIsMarked:
> Added a bool parameter to control the behavior of GetObjectIsMarked
> There was only 1 call to GotoTreeBookmark in the whole code.
   Replaced it with a call to GetObjectIsMarked

Change-Id: I3594512d0ff425ab2bd5636845d0e703dee85d52
Reviewed-on: https://gerrit.libreoffice.org/17505
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2015-12-24 11:31:49 +00:00
76a98f9d13 sd: fix not necessary to pass default argument
Change-Id: I4f4277bdf6b513bfce58d96000c485fbdc82a1b1
2015-12-23 23:40:01 -04:00
30f1fa9993 sd tiled rendering: enable map mode to center images
In the tiled rendering case the map mode is disabled,
and conversion pixel to logical is not computed.

Change-Id: I0d54aaa897f0fe0df6e8b55334053dc66b6ea925
Reviewed-on: https://gerrit.libreoffice.org/20912
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2015-12-23 19:39:47 +00:00
22328a224d New saving behavior
Changes in this commit:

- AlwaysAllowSave config is gone. Saving is always permitted, unless in
  a read only document. Also changed the behavior in dbaccess to match
  sfx2.

- The toolbar save button is always enabled, to always give access to
  the dropdown. That's the case even in a read only document, except
  that it changes to DROPDOWNONLY, and the save as command icon+tooltip.
  In table/query designers we still disable the button in read only state.

- When the document is modified, the toolbar button gets a special icon
  to indicate that.

TODO:

- Icons for the document modified state are still missing. I added some
  fake links to Tango's links.txt in order to test the new behavior.
  These links shouldn't stay as-is in a production version!

Change-Id: I56c169bf48b78faaf53c2989ce8624f8297ffb6e
Reviewed-on: https://gerrit.libreoffice.org/20839
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-12-23 09:38:25 +00:00
0f02bc189b crashtesting: CreateShellID returns the mediums base url...
when it works the way we want it to work, so presumably we can cut out the
middle man and use getDocumentBaseURL directly which does the same thing.

This has the advantage of being in the IEmbeddedHelper api so assignFrom can be
tweaked to pull the src and dest ids arguments to CopyAndGetEmbeddedObject from
the src and dest IEmbeddedHelpers always available there. So we ensure we
have some ids to present to CopyAndGetEmbeddedObject, avoiding the assert
on converting documents such as ooo89433-1.ppt to pdf

So the explicit args can apparently be dropped, bubbling up then means we don't
need a CloneWithShellIDs (introduced with tdf#71076 and tdf#71767) as normal
Clone should now do the right thing.

And various other arguments in various callers of these, which are typically
filled in with an unhelpful empty OUString placeholder, can go

Change-Id: I9c0be0340e72f98b10ee87ada7d2a021fcc39e23
2015-12-22 20:14:40 +00:00
7edfee8e4f Rearrangement of various context menus in Impress
Change-Id: I6674254898dc6d7351ec4450e2aa5ac3f177bdbf
Reviewed-on: https://gerrit.libreoffice.org/20640
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Yousuf Philips <philipz85@hotmail.com>
2015-12-22 08:45:02 +00:00
9570bdfcb9 loplugin:unusedfields in sd
Change-Id: I59a127dace4a1818dfb2ccd6a7b673d39a9c5c60
2015-12-22 09:53:26 +02:00
e18b08363a loplugin:unusedmethods
Change-Id: Ifafdaf6da0225f244853a0042a6458643b570623
2015-12-21 10:20:31 +02:00
1e840cc7c2 Move silly DBG macro to the only file where it is used
Change-Id: Ie0da09ffccba5ca92f629f38befa56370315feb7
2015-12-20 11:18:03 +02:00
a103c3456a Use std::unique_ptr for SdrLayerAdmin data member.
Change-Id: Ib49f52c94ae96b8bddec6718585d5d7d6e3d148d
Reviewed-on: https://gerrit.libreoffice.org/20806
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2015-12-18 23:42:45 +00:00
42645fe67c related tdf#96398 pull out more NPAPI-related code
Fixup windows PCH plus pulling out more code now unused due to NPAPI
removal. Follow-up to 4c18af27bf95b332ee2006cfc0bbf469fb1a84d4.

Change-Id: I8ad42a28139ceeab0cae1f608d55beb28c159db3
Reviewed-on: https://gerrit.libreoffice.org/20783
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-12-18 01:58:23 +00:00
06726aa39e [API CHANGE] Remove NPAPI-related UNO API
Follow-up to 4c18af27bf95b332ee2006cfc0bbf469fb1a84d4, related to
tdf#96398, removing more client code. The following published
interfaces are removed:

com::sun::mozilla::XPluginInstance
com::sun::mozilla::XPluginInstanceNotifySink
com::sun::mozilla::XPluginInstancePeer
com::sun::mozilla::XPluginInstanceSyncPeer
com::sun::mozilla::XPluginWindowPeer
com::sun::plugin::PluginDescription
com::sun::plugin::PluginException
com::sun::plugin::PluginManager
com::sun::plugin::PluginMode
com::sun::plugin::PluginVariable
com::sun::plugin::XPlugin
com::sun::plugin::XPluginContext
com::sun::plugin::XPluginManager

Change-Id: I3818a23e0f46fd01bfe9be11b57f6a551c013441
Reviewed-on: https://gerrit.libreoffice.org/20780
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-12-17 19:45:00 +00:00
348d7f6170 sd: enable insert graphic when UNO command has URL file argument
When LOOL requires to insert a graphic, it uses UNO command ".uno:InsertGraphic", 
and the corresponding URL file image argument.

However Impress, ignores URL file image argument, and by default
pop up a dialog, so no image is inserted in LOOL.

Change-Id: If1939247f5df0bb4e7daf8816a2306e34419ae2f
Reviewed-on: https://gerrit.libreoffice.org/20747
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2015-12-17 14:08:39 +00:00
3d3e95d685 impress's AnnotationWindow is the only user of WB_NEEDSFOCUS
Here it is creating a toplevel floating system window which needs special
hackery to function.

Instead convert it to a non-system window which means that it is in reality
only a vcl construct. The small downside is that it is now unable to leave the
confines of the toplevel system window in which it lives. Upside is that
all the special hackery related to it which generally doesn't work half the time
in various window managers and now in wayland can go away.

Change-Id: I7ad7c35091086f7671ff4a178c7fa04202c20e09
Reviewed-on: https://gerrit.libreoffice.org/20745
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-12-17 09:10:46 +00:00
7dd77a1271 Remove unused ToolPanel (aka TaskPane)
Superseded by the Sidebar

Change-Id: I54970d71cd9d42de4f47b223e50dd9474b40632a
Reviewed-on: https://gerrit.libreoffice.org/20724
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-12-17 08:27:55 +00:00
5b44a9733a sw, sd, sc: clean up no longer necessary isTiledRendering() member functions
Change-Id: I508a29fd261865771d780b1c241841d9abfeb6ed
2015-12-17 09:16:28 +01:00
291f55edf3 assert that no ODF import happens without a BaseURL
Change-Id: I4520a9d0350349cb083ed627a19264a3a97e090f
2015-12-16 20:37:39 +01:00
d0cf72f253 sfx2: clean up no longer needed SfxObjectShell::isTiledRendering()
Change-Id: Ia4fb0b489509364c641f8e1e695353bbdb036b59
2015-12-16 09:14:31 +01:00
6381fe554a tdf#96206: Avoid scaling objects while copying to clipboard
... to prevent duplicating masters on slide copy-paste.
Also fixed a 10-year copy-paste error (pRefPage wasn't replaced
with pNPage).
Fixed argument evaluation order issue (aStream.GetEndOfData()
depends on Flush() but doesn't call it, so will return incorrect
result if called before aStream.GetBuffer()).
Replaced compare of hashes with results of stringify(),
because it removes useless overhead (hashes are calculated from
stringify() anyway, and are not cached anywhere).
Removed Flush() called from SvMemoryStream::GetBuffer(), because
it calls GetData(), which calls Flush() itself.

Thanks to Andras Timar for unit test framework.

Change-Id: Ia46d4e9a017fc628d424949a9d229045a249a4ca
Reviewed-on: https://gerrit.libreoffice.org/20367
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-12-14 09:05:21 +00:00
e67a834c5d Resolves: tdf#93994 flush API objects at load time
When importing SdrObjCustomShape for each an Outliner and a
VirtualDevice as RefDevice are created and held. On 32bit systems this
breaks the import with many such objects (in the bugdoc around 4300). On
64bit it works, but more memory as necessary is used. To avoid this,
flush the UNO API implementations at these objects after one page is
imported.  Do not do this for each single object, that will break the
connector import which does some processing later.

Change-Id: I7296edd40f01c1a40258808d78bf39e6d4fe29bf
Reviewed-on: https://gerrit.libreoffice.org/19990
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-12-11 17:10:14 +00:00
f1df105639 Revert "Impress/Draw: Open Navigator in the Sidebar"
This breaks starting a slideshow with Navigator visible.
Also leads to problems like tdf#96286
Needs more thought & design.

This reverts commit 6f493f9e379af1e005b85606c6aab515726be993.

Change-Id: Ia796de5a8ef0be61f36517bc0aa896c66a95c1e8
2015-12-11 12:56:47 +01:00
58d8d8ac67 tdf#69977: uno::Sequence is expensive
when used as a mutable data-structure. Plain std::vector halves the time
taken to display the chart dialog

Create a class to represent the std::vector we are going to be passing
around, and move some of the utility methods into it to make the code
prettier.
Also create an optimised append(&&) method for the common case of
appending small temporaries.

Change-Id: I7f5b43fb4a8a84e40e6a52fcb7e9f974091b4485
2015-12-11 10:11:23 +02:00
fb8a3fac5d loplugin:nullptr: More NULL -> nullptr automatic rewrite
Change-Id: Ie83819e2bcdc5fa160b39296b005ca9a5ff74b1d
2015-12-10 08:06:06 +01:00
4754afddc3 Use unique_ptr out-arg to in SfxBindings::QueryState to avoid mem leaks
Change-Id: I35df02de675068478a36ef05266ffc2d3054b07f
Reviewed-on: https://gerrit.libreoffice.org/20477
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-12-09 07:16:34 +00:00
1a18c92a52 consolidate MSO format ClassID magic numbers in msfilter/classids.hxx
Change-Id: I673eeaa4168f769cb002995c43d986ee5f2030b2
2015-12-08 22:11:43 +01:00
6f9bb9bd76 Remove image color conversion menu from Impress
In impress there is (or was) a submenu "Mode" for images that
containted color transforms for images to various bitdepths and
palettes. The action is destructable - which means the original
is replaced by a new image. This also has little use today as I
don't think many people want to shrink image (byte) size this way.
The only useful transform is to 8-bit indexed for certain types
of images to save space without a bigger color degradation, but it
makes more sense to add this option to "compress image dialog".

Change-Id: I7450b2ec3507fb5d180cbd1ec879cb5560a2dd22
2015-12-04 18:23:50 +01:00
9ec0e6d9cb sd: replace embedded mDNSResponder code with proper external tarball
The diff against the 379.37 release is 2500 lines, one of which
actually does anything at runtime (missing va_end()).

Change-Id: I1824e61fd4ac6c3ce28084913a2661134a03fd51
Reviewed-on: https://gerrit.libreoffice.org/20248
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-11-30 13:11:10 +00:00
7dcbc5708a silence mouse release warning
Change-Id: Ie3c6da36f1c462080f78e8713e9e5dcd228fbacf
2015-11-30 10:34:34 +00:00
ec3f724158 loplugin:unusedfields
Change-Id: Icac4ac1a2614e72bc9ff070819533e09eeb1a864
2015-11-30 10:34:38 +02:00
c098227ca3 -Werror,-Wwritable-strings
Change-Id: I01f63a28651c05cf1bba244daa6bd066cc4c04ac
2015-11-28 14:00:07 +01:00
77838efb07 Use proper return type for DNSServiceRefSockFD
...which is e.g. unsigned long long for Windows 64-bit (and declaring the
function in dns_sd.h is not necessary, and the dnssd_sock_t typedef is not known
there)

Change-Id: Iaa0eb03a83b76200204ba905313bcc27b5007b39
2015-11-28 14:00:07 +01:00
49a32f4b2f replace a MessBox with a MessageDialog
Change-Id: Icf8cf2288f8d7000d885f8f63d39c294a0fc596b
2015-11-27 15:13:45 +00:00
a508f639a0 mark UNO structs as SAL_WARN_UNUSED, where possible
Change-Id: Ie3de518f60c9f1313c68df54dbdc1fb2804f1f0d
2015-11-26 13:26:25 +02:00
3c100a9c61 coverity#1340228 try and silence Resource leak
Change-Id: I654fc22bbab2301e74cf200577f934e56f77fb58
2015-11-25 15:45:58 +00:00
378f500bf6 coverity#1340222 Logically dead code
This is (worrying) fall-out from

commit 229fc164dc1773484b74eca016863cf68860e81b
Author: Philippe Jung <phil.jung@free.fr>
Date:   Fri Jul 10 17:02:44 2015 +0200

    Impress: Rework the way the display modes are presented.

Change-Id: I00d19b2d3cec4d505d17ba4031f6763c86395f74
2015-11-25 15:45:58 +00:00
f4ac785494 coverity#1340227 Missing break in switch
Change-Id: I30ea6cea81ae1b4f344e253c7a51cfef4d844128
2015-11-25 15:45:58 +00:00
c5bfac3f26 coverity#1340226 Missing break in switch
Change-Id: Ibd1c15ce65501d4dc6d0cea8c8e5f4e683d1b7a4
2015-11-25 15:45:58 +00:00
1f86864e97 loplugin:unusedfields various
Change-Id: I59d9f7f73677358b4ae57efda965d43718bdf0d5
2015-11-25 13:57:29 +02:00
85c758a461 loplugin:unusedfields in include/sfx2/
Change-Id: I3eb27ed10e82ee56b33866ac576c1b1f8c9756b9
2015-11-25 08:25:09 +02:00