Commit Graph

403714 Commits

Author SHA1 Message Date
Michael Stahl
68f7be01a7 sw: revert ToX hyperlinks to LO 4.3 behaviour
Commit 94b296d541 changed this to
potentially insert multiple overlapping hyperlink items.

Unfortunately Writer can only have one RES_TXTATR_INETFMT on any given
position in the paragraph, so the hyperlink hints inevitably overwrite
each other.

Revert this to do it the same way as the old code in LO 4.3 did: match
the last unmatched link-start with the first link-end, and ignore all
the link-start before the matching one, as well as the link-end after
the matching one.

This should prevent surprising formatting changes on index update,
including entries spontaneously turning green, and there is no reason
why the result of the new way is objectively better than the old one.

Change-Id: I55be9c212c473908428fa8bd6487d136343fe852
2017-01-25 17:58:55 +01:00
Michael Stahl
4a43ffcef9 sw: stop swapping start and end position of links in ToX
This causes:

sw/source/core/txtnode/thints.cxx:3198: +SwpHints::Insert: invalid hint, end < start

Change-Id: I933c790127ab1469bb57c4d288dbb49be16ace19
2017-01-25 17:58:55 +01:00
Stephan Bergmann
700470577f Remove junk
left over from 232c0fb700 "#115784# idlc: fixed
commandline option processing."

Change-Id: I41f81b1223cf72c0fcf8e84cdc7016e3aebf0c9d
2017-01-25 17:59:34 +01:00
Caolán McNamara
e9c17354d3 move Image ctor variant with mask color to callers
Change-Id: I81a52aeb855edca823881360831b26e252780053
2017-01-25 16:56:08 +00:00
Stephan Bergmann
499370e598 Remove unused macros
Change-Id: Ib3f8f6cde75b6a605052a3d941380ab27db0f326
2017-01-25 17:53:10 +01:00
Stephan Bergmann
03c0a7fe18 Fall back on o3tl::make_unique for now
Change-Id: I58f688004804aed8b749b72caaa53afc06387ec7
2017-01-25 16:38:32 +01:00
Stephan Bergmann
337dc62535 Missing include
Change-Id: I60177c2b10b973e9c8f09ea7c71d44df08e50cc4
2017-01-25 16:34:57 +01:00
Stephan Bergmann
d97bdf10d2 Avoid calling log10(0)
...to avoid UBSan reporting during CppunitTest_sc_addin_functions_test:

[...]
> Testing file:///data/sbergman/lo-san/core/sc/qa/unit/data/functions/addin/fods/imabs.fods:
> warn:xmloff.style:14186:1:xmloff/source/style/xmlstyle.cxx:300: Here is a duplicate Style
> scaddins/source/analysis/analysishelper.cxx:949:37: runtime error: value -inf is outside the range of representable values of type 'int'
>     #0 0x7f77717d11d6 in sca::analysis::ParseDouble(char16_t const*&, double&) scaddins/source/analysis/analysishelper.cxx:949:37
>     #1 0x7f77717e39e5 in sca::analysis::Complex::ParseString(rtl::OUString const&, sca::analysis::Complex&) scaddins/source/analysis/analysishelper.cxx:1690:10
>     #2 0x7f77717e317f in sca::analysis::Complex::Complex(rtl::OUString const&) scaddins/source/analysis/analysishelper.cxx:1664:10
>     #3 0x7f777167fa79 in AnalysisAddIn::getImabs(rtl::OUString const&) scaddins/source/analysis/analysis.cxx:912:19
>     #4 0x7f78148bd16a in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5
>     #5 0x7f78148b6b70 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233:13
>     #6 0x7f78148b3894 in bridges::cpp_uno::shared::unoInterfaceProxyDispatch(_uno_Interface*, _typelib_TypeDescription const*, void*, void**, _uno_Any**) bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:420:13
>     #7 0x7f7772bdd096 in stoc_corefl::IdlInterfaceMethodImpl::invoke(com::sun::uno::Any const&, com::sun::uno::Sequence<com::sun::uno::Any>&) stoc/source/corereflection/criface.cxx:697:9
>     #8 0x7f7772bdf45a in non-virtual thunk to stoc_corefl::IdlInterfaceMethodImpl::invoke(com::sun::uno::Any const&, com::sun::uno::Sequence<com::sun::uno::Any>&) stoc/source/corereflection/criface.cxx
>     #9 0x7f77d3c63f17 in ScUnoAddInCall::ExecuteCallWithArgs(com::sun::uno::Sequence<com::sun::uno::Any>&) sc/source/core/tool/addincol.cxx:1466:31
>     #10 0x7f77d3c631da in ScUnoAddInCall::ExecuteCall() sc/source/core/tool/addincol.cxx:1444:9
>     #11 0x7f77d484504f in ScInterpreter::ScExternal() sc/source/core/tool/interpr4.cxx:2999:19
[...]

Change-Id: Ie31d6374bdac3ae11784d925011c5a67802cdf56
2017-01-25 16:15:58 +01:00
Stephan Bergmann
16bf916eee Pass gb_VISIBILITY_FLAGS into external/breakpad
...to avoid UBSan (on Linux) reporting a ODR violation between
google_breakpad::MinidumpDescriptor::kMicrodumpOnConsole (workdir/
UnpackedTarball/breakpad/src/client/linux/handler/minidump_descriptor.cc)
defined in both the crashreport and sofficeapp dynamic libs.

Change-Id: I686a6e2041c70f0aa17a774d705dc71d95d20183
2017-01-25 16:15:58 +01:00
Caolán McNamara
1337932c03 fix index widget control positions on first view
Change-Id: Ic70006d65100b0ed8b337d43ff81577fb4579192
2017-01-25 15:06:25 +00:00
Caolán McNamara
f08d33f877 use a std::unique_ptr
Change-Id: I1ab99995e35714d6ef3358400b0805723c44678c
2017-01-25 15:06:21 +00:00
Caolán McNamara
160e11fed1 valgrind: fix leak
since...

commit e94d5233dd
Date:   Fri Mar 11 06:43:06 2016 +0100

    work on sane lifecylce for SfxFilter

which removed "delete pFilter" though it was
pMediumFilter which was in question in this method

Change-Id: I598dd44a8498ebd6b3e63d1c89147bee5ab3bb55
2017-01-25 15:06:17 +00:00
Miklos Vajna
cbc84a6599 tdf#105502 sd increase font size: handle table selection
In part of a table shape is selected, then only operate on the selected
cells, not on all of them.

Change-Id: I3a9ba2b99bcaa2e355b6fcdafdd142d4a809bce6
Reviewed-on: https://gerrit.libreoffice.org/33524
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-01-25 14:38:53 +00:00
aleksandar-stefanovic
6310fa8a70 Replaced empty spinner with the document title
Replaced empty spinner with the document title in the Main (viewer)
activity. Had to edit the themes to not disable title, and edit the
manifest to make the desired activities use that theme. If the theme
is set in the "application" tag, it will apply the theme globablly.
Also cleaned up and tightened the ToolbarController.

Change-Id: I5099860787b5f84d01c98c5e53ade519c2f89cc4
Reviewed-on: https://gerrit.libreoffice.org/33306
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com>
2017-01-25 12:56:26 +00:00
Caolán McNamara
39ced315aa return early
Change-Id: Ia8504fdbc952b1e116bdca135a063d4d98be92be
Reviewed-on: https://gerrit.libreoffice.org/33531
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-25 12:45:22 +00:00
Caolán McNamara
13a9b20457 appears to be a missing break here
Change-Id: Ifb04133b1946303879bf860003749996512bec91
Reviewed-on: https://gerrit.libreoffice.org/33530
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-25 12:44:58 +00:00
Eike Rathke
0367acdcc5 Resolves: tdf#105351 pass matching index key to conditional format dialog
Change-Id: I9d872140755c4ec0ae67349530b00f339057a356
2017-01-25 13:35:53 +01:00
Mike Kaganski
ff4f48892a tdf#105511: Unit test
Change-Id: I1b988ca629bc93ff7d29c396d463f2967ed99b54
Reviewed-on: https://gerrit.libreoffice.org/33512
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-01-25 11:58:37 +00:00
Noel Grandin
d5cd223c48 loplugin: unnecessary destructor svx
Change-Id: I7feed30eea4f7367943fa2d6e0d75be5ca209068
Reviewed-on: https://gerrit.libreoffice.org/33516
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-25 11:55:19 +00:00
Michael Stahl
3e6042c2ce sw: config item "OutlineLevelYieldsNumbering" has no effect
... since CWS swqbf90 in 2005, so remove it, except for the
entry in the property set.

Change-Id: I5f82d1957a15bf5141108ac9821b813dd36f1995
2017-01-25 12:47:43 +01:00
Michael Stahl
efb7aab306 sw: UseOldPrinterMetrics setting is dead
Change-Id: Ib988c5a842b8eb1c3d1d24261e8f30a5d042ffd8
2017-01-25 12:47:43 +01:00
Noel Grandin
8a87bf1b69 use rtl::Reference in SdLayer
instead of storing both a raw pointer and an uno::Reference

Change-Id: Id608c50cb4cb3a7cf7ad972303a3c5f9fc8e79b0
2017-01-25 13:38:46 +02:00
Noel Grandin
58868eb9ed loplugin: unnecessary destructor svl..svtools
Change-Id: Ie96dda7194c83ba88693f8c91899c732d704a4bd
Reviewed-on: https://gerrit.libreoffice.org/33515
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-25 11:29:08 +00:00
Justin Luth
0e726874b4 uiwriter: unit test for tabOverMargin
related to tdf#35021 and n#793998 to test
the tab_over_margin compatibility setting
for doc and docx.

Change-Id: I00f932957b59a7ff1a55e69f4fdfae4fc1d17163
Reviewed-on: https://gerrit.libreoffice.org/33278
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-25 11:28:46 +00:00
Mohammed Abdul Azeem
8154953add ScXMLTableRowCellContext implements fast interfaces:
Implementation of fast interfaces for contexts in path from
ScXMLImport::CreateFastContext to ScXMLTableRowCellContext.
FastParser is enabled and duplicates are avoided at all
possible places.
OOoXML filters still need those legacy paths we removed,
so I had to temporarily map them to fast elements, which
would increase their load time, but hopefully it should
help us in the long run.

Change-Id: Ie997a9a8b72787da2356abc99ea2cd57c2e5b670
Reviewed-on: https://gerrit.libreoffice.org/28648
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-01-25 11:20:48 +00:00
Eike Rathke
657eea0104 Resolves: tdf#104675 ScConditionalFormat ranges needed to start listening
Conditional format manager dialog holds a cloned list of
ScConditionalFormat and sets that at the document on OK. The ranges of a
format need to be set before ScFormatEntry/ScConditionEntry are added to
start their listeners.

Change-Id: I903553b1f6a8298838ee8753315a6ea263b29b08
2017-01-25 11:47:28 +01:00
Eike Rathke
81845445de ScFormulaListener: do not start listening to clipboard or Undo docs
Change-Id: Ic00e30eccc64cc85ee877572ef8df042899f45f5
2017-01-25 11:47:28 +01:00
Noel Grandin
2608523b69 loplugin: unnecessary destructor sfx2..store
Change-Id: Idbf2585e48cd89a43ab68c5c8819880d20461ccf
Reviewed-on: https://gerrit.libreoffice.org/33514
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-25 10:26:05 +00:00
Miklos Vajna
cb55ffa649 sw: various small cleanups
Change-Id: I1eb56649fb9913cb32397c1ef49634a0d202f1a1
2017-01-25 11:13:42 +01:00
Caolán McNamara
19663d39f4 Resolves: tdf#104598 make bright theme shadow the same as it always was
The shadow color was originally set via StyleSettings::Set3DColors taking the
background color as the input, and doing DecreaseLuminance(64) on it to make
the shadow color

So, continue to follow that mode if the "dark shadow" is darker than the
foreground, and IncreaseLuminance the equal amount the other direction for dark
themes.

This way under a dark theme the problem of impossible to see rulers of
tdf#90214 is still fixed, while the bright theme colors are the same as they
always were, which avoid the wearing-on-the-nerves "regression" problem.

Change-Id: I33133ff180ecadce3a14ee45bd33db73c56c0225
2017-01-25 10:11:30 +00:00
Noel Grandin
cd28eb89d7 use rtl::Reference in SwView_Impl
instead of storing both raw pointers and uno::Reference

Change-Id: I75fbb279c5698a1d29b989a03c7daf5d279e869e
2017-01-25 12:02:43 +02:00
Tor Lillqvist
907a9ce8b8 Bypass some lines that cause problems with Clang 3.8.1 at least
Change-Id: I05202ee6b2f083e8aacf0a2a8f8d7b8b361a5df8
2017-01-25 11:56:54 +02:00
Stephan Bergmann
da1b98197a embedserv/source/embed/xwin.cxx is gone
...since f2abfdb94e "embedserv: convert to gbuild"

Change-Id: I932da3595e0d7150ef320c2fa892ea8d5286991c
2017-01-25 10:25:00 +01:00
Caolán McNamara
f6c465bc8e ofz#463 unable to mmap
Change-Id: I509faeda019f42bbe7cdc5fc249f2ea2076bb702
Reviewed-on: https://gerrit.libreoffice.org/33519
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-25 09:24:01 +00:00
aleksandar-stefanovic
96b2aa3f82 Reduce usage of memory-leaking Context object
Huge refactoring of the methods to use the passed instance of the
Context object instead of using the static one. I couldn't completely
remove the static object, because it requires restructuring of the
workflow so that it originates from the activity, and not from some
other random place. The way it was refactored is:

1. Find a place where the static object
(LibreOfficeMainActivity.mAppContext) is used.
2. Add a LibreOfficeMainActivity object to the method signature.
3. Repeat the process with a method that calls it, and repeat until
the LibreOfficeMainActivity object isn't available, so that it can be
passed through all the methods, to the place where the static object
was used.
4. Replace that static object with the parameter of the function.

The commit looks pretty huge, but it's basically just the simple
refactoring explained above. The memory leak isn't completely gone,
but this a progress towards it. Also moved the "global" objects of
Handler and LOKitThread from an Activity to an Application, which
is the correct place for "global" variables. Can someone explain why
Handler and LOKitThread are used? They seem to mostly do nothing, but
steeply increasing the complexity of the application.

Change-Id: Ib2be77fa3adea94d6b7849d0e2afa90bf318d68b
Reviewed-on: https://gerrit.libreoffice.org/33073
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Aleksandar Stefanović <theonewithideas@gmail.com>
2017-01-25 09:16:51 +00:00
Noel Grandin
d49e497a6b use rtl::Reference in SwXTextDocument
instead of storing both a raw pointer and an uno::Reference

Change-Id: I94746e7fafcc7d2206ac0c1a6481e6006421529b
2017-01-25 10:34:20 +02:00
Noel Grandin
ef2b4342e9 loplugin: unnecessary destructor oox..sax
Change-Id: Ie12bfabc92bce04d702f3e77aa5896366e49245e
Reviewed-on: https://gerrit.libreoffice.org/33509
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-25 08:15:36 +00:00
Noel Grandin
3c6b7c8b43 loplugin: unnecessary destructor sc
Change-Id: I877bc0927aff7d175c1978fdf3db55d2e048d3b9
Reviewed-on: https://gerrit.libreoffice.org/33510
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-25 08:15:15 +00:00
Noel Grandin
4fabc2347c loplugin: unnecessary destructor scaddins..sdext
Change-Id: I6ae02ad25863ec7e0f780020dbc69c9a99488c24
Reviewed-on: https://gerrit.libreoffice.org/33511
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-25 07:31:25 +00:00
Federico Bassini
92c2c5f62d gbuild-to-ide: moduleDict targets -> all paths replaced with relative
in moduleDict[<module>][<target>] all absolute paths are replaced
with a relative path:
-include/libs relative to core(contained in json) directory
-json objects, makefile, relative to <module> directory

Change-Id: I5dd64942c2a4d6fc2f01037ee7417de91c41906a
Reviewed-on: https://gerrit.libreoffice.org/33506
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2017-01-25 07:15:23 +00:00
Noel Grandin
96def52140 move GetPosByValue from SfxEnumItemInterface to SfxAllEnumItem
which is it's only use-site

Change-Id: I35943282ad4f5fd5ad297831d63e8abee9a2ddff
2017-01-25 09:10:13 +02:00
Stephan Bergmann
857b403f78 -DOPTIMIZE appears to be unused, since forever
Change-Id: I56c91974a27cf100bc0faa1b009f4bf6358b47f5
2017-01-25 07:58:50 +01:00
Stephan Bergmann
236f69e710 Minor loplugin:stringconstant improvements
Change-Id: I0b39526c0f0854ddbb29e77ece303cf2bdd842c4
2017-01-25 07:58:10 +01:00
Jochen Nitschke
a7ecbbec9e cleanup css includes and using namespaces
Change-Id: I29c3f89c50f858ff4592d0058f15d856de465d77
Reviewed-on: https://gerrit.libreoffice.org/33490
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-25 06:47:36 +00:00
Mike Kaganski
f26bbdb386 tdf#105511: use LO language settings to set default RTF language
... when file containd ansicpg0/cpg0
This allows user to change this setting and get proper document
language. Similar technique is used currently for DXF and WMF.

Change-Id: I884a973d98384c92d45a1d2e19720ffe3e6aa20d
Reviewed-on: https://gerrit.libreoffice.org/33505
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-01-25 06:46:53 +00:00
Stephan Bergmann
999183f7fd Default -ferror-limit=20 doesn't make sense for CompilerTest
Change-Id: Ic535de878c17749cdb2e7a6eadeb27dd2194810e
2017-01-25 07:30:01 +01:00
Takeshi Abe
6d898945d5 Fix typo in comments: relativ -> relative
Change-Id: I58833e503e93b8057f92710c5828bba6cecd4e09
Reviewed-on: https://gerrit.libreoffice.org/33488
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Tested-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-01-25 06:05:54 +00:00
Noel Grandin
3cda5ffdda use tools::SvRef in ScSpellDialogChildWindow
since it is a ref-counted object

Change-Id: I14a2c666a8fe8ab0ccb55f91f7573e7d3c8caf47
2017-01-25 07:33:17 +02:00
Noel Grandin
244677ccf7 use rtl::Reference in SwChartDataSequence
instead of storing both a raw pointer and an uno::Reference

Change-Id: I828ad411c989f14a9175ab173f1a4fe75fed535f
2017-01-25 07:33:17 +02:00
Noel Grandin
b4adb0c533 loplugin: unnecessary destructor forms..idlc
Change-Id: I765e0fa61f8134a60e5ea24452c6bbcb3fa8b054
Reviewed-on: https://gerrit.libreoffice.org/33492
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-25 05:20:06 +00:00