Commit Graph

11339 Commits

Author SHA1 Message Date
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
f61d3bc92c cppcheck: noExplicitConstructor
Change-Id: Ic6407a57440fbd887f9ec9d5963e5748aa89a29e
2016-01-02 20:24:38 +00:00
23ae179392 Typo: NOTIFY_LISTERNERS_CHECK->NOTIFY_LISTENERS_CHECK
Change-Id: Ie4c7a7dee81c2a0890ddc8bd083c2e3fee584f7e
2015-12-31 11:48:22 +01:00
e3a31fcca7 loplugin:unusedfields
Change-Id: I979592adb978c3757a1e54615021ee424a2e02bf
Reviewed-on: https://gerrit.libreoffice.org/20892
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-12-24 07:28:28 +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
a008a23425 loplugin:unusedfields in dbaccess
Change-Id: I5f38bf33deaec17203e1bdcd3a61085266e42501
2015-12-23 08:13:54 +02:00
e0075eb0c0 dbaccess: module_dba not used anymore
Change-Id: I6f9222dd40c553e1d0ad63e00e5874be939a97c1
2015-12-18 16:51:14 +01:00
30289fcab7 XComponentContext not needed for DataAccessDescriptor
Change-Id: If5ede0c308930d37bff9e97afc8a76cc5b709034
2015-12-18 16:51:14 +01:00
291f55edf3 assert that no ODF import happens without a BaseURL
Change-Id: I4520a9d0350349cb083ed627a19264a3a97e090f
2015-12-16 20:37:39 +01:00
e32dcddaa5 OOneInstanceAutoRegistration is not used
Change-Id: I6928dec92655e4655af6c519405712892bf7d870
2015-12-12 19:13:14 +01:00
1ded035f85 tdf#74608 dbaccess: Constructor for singleton DataAccessDescriptorFactory
Change-Id: Id1453e3cf1c8aef22536b4e0797cca7e654316c0
2015-12-12 17:23:34 +01:00
576c7562ec Return std::unique_ptr from svt::AcceleratorExecute::createAcceleratorHelper
...to prevent errors like 5ac6e00274e732435b55c2908db9cea658fe549b "Memory leak"

Change-Id: I3e20393af628849d8a387b491b75e1aacdea982a
2015-12-11 16:15:53 +01:00
fb8a3fac5d loplugin:nullptr: More NULL -> nullptr automatic rewrite
Change-Id: Ie83819e2bcdc5fa160b39296b005ca9a5ff74b1d
2015-12-10 08:06:06 +01:00
2d4279b53a loplugin:defaultparams
Change-Id: I9015579a93e58d382866cbebe7af462735b08700
2015-12-05 17:34:52 +01:00
f229b9b04a tdf#74608 dbaccess: Constructor feature for ODatabaseDocument
Change-Id: Id524a1a717c350cb0558ef5ff11da3e6c941c203
2015-12-05 15:12:54 +01:00
970f518989 tdf#74608 dbaccess: Constructor feature for OComponentDefinition
Change-Id: I150cdaa46a0d86e1a4b6598ac580a10b2e8f071f
2015-12-05 15:12:53 +01:00
5738a6fb4a Fix Treelist shouldn't use VCLEVENT_LISTBOX_SELECT
warn:legacy.osl:21997:1:accessibility/source/extended/accessiblelistbox.cxx:103: Debug: Treelist shouldn't use VCLEVENT_LISTBOX_SELECT
To reproduce:
- Launch Base and create a brand new HsqlDb file or open an existing one
- Select Tables pane
- Click Table Design
=> the message appears in console

Change-Id: If7fa99890bbec8795a62b83dbe193247adffb733
Reviewed-on: https://gerrit.libreoffice.org/20411
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-12-05 13:02:42 +00:00
b0658929be tdf#96234: Type Formatting, Primary key checkbox may be checked
Right click on a field in Type Formatting (Base, paste a table from Calc for eg)
makes a popup which takes into account now if the field is a primary key or not.

Handles multi-fields primary key, too: the selected fields must be exactly
those in the primary key, no more, no less.

Change-Id: I545b946bccd3fc02f4f6c3bdb99f914d181a3d40
2015-12-05 10:20:56 +01:00
f7c94c5b8a tdf#74608 dbaccess: Constructor feature for OCommandDefinition
Change-Id: Ibaa1fd8310fdba073190a7721891ebb835eb0e6e
2015-12-05 07:08:46 +01:00
58a3f56978 UBSan: Bad static_cast from dbaccess::ODatabaseSource
...which doesn't inherit from cppu::OWeakObject in the first multiple-
inheritance slot

Change-Id: I1624e5c696d5a592f86e7c48849ecf3a39e1e6fb
2015-12-04 15:30:40 +01:00
81fa534019 tdf#74608 dbaccess: Constructor feature for ODatabaseSource
Change-Id: I9ab9c0eaf463c93caf116c98e47564562af0af5d
2015-12-03 21:07:35 +01:00
7f8c4b8445 Use comphelper::containerToSequence()
Change-Id: I18d6ef04ff00f971a4c54ba259733c07501c6c1a
2015-12-03 13:57:22 +02:00
de9d0e7979 Revert "tdf#96012: Type formatting in Base shouldn't be multiselect"
This reverts commit 103cd686de34b668a838c459f3d827c02e704656.
Better fix for tdf#96012 in b2d479854a9182234a378166900240aee7e1c79b
("simple mode" for the multiselection)

Change-Id: Ia6d7e5132e3f1997906a03f67ea4d7d0cf54ce7a
2015-12-03 05:09:15 +01:00
b2d479854a tdf#96012 enable simple mode for the multilistbox
Change-Id: Ia4d4c56318bc7d32d317abbda27eda9d3413ba75
2015-12-03 05:08:32 +01:00
103cd686de tdf#96012: Type formatting in Base shouldn't be multiselect
Disable multiselect and don't manually select the entry

Change-Id: Id04e757e4d2031718f95af1d0f512b4ca2df205c
Reviewed-on: https://gerrit.libreoffice.org/20360
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-12-02 20:48:07 +00:00
d2df035740 loplugin:unusedfields
Change-Id: Ife94d488ead512abc6d137a0df74298bac67185d
2015-11-30 10:34:38 +02:00
2ba8476f65 tdf#96135 - Crash : When Field Format Window Close
regression from commit db17d3c17c40d6b0e92392cf3c6e343d1d17b771
"new loplugin: memoryvar"

Change-Id: Id37226646a561579a375110bf684140d1fa8cb92
2015-11-30 10:08:39 +02:00
9e36549c68 dbaccess: small cleanup
Change-Id: Id0a0aa66ffd5788873fa5dc99fcc1b912c0e90fa
2015-11-28 09:38:52 +01:00
02044b5d27 tdf#96059 Replace imageproducer with CommandInfoProvider
Change-Id: I9508a947e5ae6720516d9f926a59d4287cb15317
Reviewed-on: https://gerrit.libreoffice.org/20166
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-11-25 12:55:10 +00:00
1f86864e97 loplugin:unusedfields various
Change-Id: I59d9f7f73677358b4ae57efda965d43718bdf0d5
2015-11-25 13:57:29 +02:00
827811ae7e -Werror,-Wunused-private-field
Change-Id: I595f0c2b05b96fbf2055a37e335f8c700044a699
2015-11-24 11:28:56 +01:00
3aff028b8f loplugin:unusedfields in dbaccess
Change-Id: I563c3727c1719fe21acced269e5469c2de7112e8
2015-11-20 14:06:49 +02:00
fe3fd05966 add mapKeysToSequence/mapValuesToSequence methods to comphelper
and use them

Change-Id: If4dc9df63db37185228aeaaab2979498d61304ec
Reviewed-on: https://gerrit.libreoffice.org/20055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-20 08:14:13 +00:00
b0339005b8 loplugin:sallogareas
Change-Id: I2220ab194384fb397716bf3227d38716ba54f537
2015-11-19 16:05:35 +01:00
2554efabb6 use comphelper::containerToSequence
in chart2, we remove a local equivalent of the method

Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
2015-11-19 09:33:29 +02:00
8569c6d0ad use initialiser list for Sequence<OUString>
Change-Id: Ia5e47261d1fc6fac2d046656c05a1c5eedb07e02
Reviewed-on: https://gerrit.libreoffice.org/19978
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-16 08:35:42 +00:00
96c26b0d9d use initialiser for Sequence<OUString>
using variations of:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\)\;
\s*OUString\* pArray.*;
.*\[0\]\s*=\s*(\S+)\;/Sequence<OUString> \1 { \2 };/g"

Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3
Reviewed-on: https://gerrit.libreoffice.org/19971
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 12:20:39 +00:00
25aec383f9 use initialiser for Sequence<OUString>
replaced using:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)'
| xargs perl -0777 -pi -e
"s/Sequence<\s*OUString\s*> (\w+)\(\s*1\s*\);
.*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g"

Change-Id: I20ad0489da887a9712982531c3b127339bb8b3b9
Reviewed-on: https://gerrit.libreoffice.org/19969
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 12:18:55 +00:00
54d22957bc use initialiser for Sequence<OUString>
performed using:
git grep -lP 'Sequence.*OUString.*\(1\)'
| xargs perl -0777 -pi -e
  "s/Sequence<OUString> (\w+)\(1\);
.*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g"

Change-Id: I4da56c80fa09bfc1e8f868794001e9921431e09f
Reviewed-on: https://gerrit.libreoffice.org/19968
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 11:31:23 +00:00
8e234c5b7d use initialiser syntax for Sequence<OUString>
replaced using the script:

git grep -lP 'Sequence.*OUString.*\(1\)'
  | xargs perl -0777 -pi
    -e "s/Sequence< OUString > (\w+)\(1\);
.*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g"

Change-Id: I23688a91562051a8eed11fc2a85599545c285c34
Reviewed-on: https://gerrit.libreoffice.org/19967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 10:13:08 +00:00
fa91dd31f3 5th step to remove tools/rtti.hxx
tools/rtti.hxx removed
completed the interface of some Sdr.*  Items
and removed pseudo items

Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a
Reviewed-on: https://gerrit.libreoffice.org/19837
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-11-11 10:49:30 +00:00
db17d3c17c new loplugin: memoryvar
detect when we can convert a new/delete sequence on a local variable to
use std::unique_ptr

Change-Id: Iecae4e4197eccdfacfce2eed39aa4a69e4a660bc
Reviewed-on: https://gerrit.libreoffice.org/19884
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-11 07:16:20 +00:00
89c4edc13f loplugin:nullptr (automatic rewrite)
Change-Id: I2bba104b1bff30910864e45b5b032533099742ff
2015-11-10 10:31:22 +01:00
9d3cb71115 Prevent += called on temporary O[U]String instances
...found regression e31205f3ec1f941ab5a188bfde6329edf2acc55b
"EditUndoRemoveChars::GetStr must return a reference" and dubious code
0e23f7b0839df68d277186b4df54ba391ac3406a "Lets assume this doesn't want to
update m_pForcedPrefix->GetText() anyway" in addition to the apparent sillies
directly fixed in this commit.

Introduces HAVE_CXX11_REF_QUALIFIER.

Change-Id: I564e98254fd53c1dd9b34193d7057c59721ee24c
2015-11-09 12:22:17 +01:00
0e23f7b083 Lets assume this doesn't want to update m_pForcedPrefix->GetText() anyway
The line was like that ever since the code was introduced with
13d20309158340fca42c44e7a9a460ddbeee5126 "edit control for connection urls," and
Window::GetText() likely never in the past returned a reference to a string.

Change-Id: Ideb5c6a279ac25c2439187a9182f988696818012
2015-11-09 12:15:29 +01:00
6c80a8fe89 new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-09 08:34:40 +00:00
add39c3cc1 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I14bdbad2469d05eb25514d7ab995acb8c6ef7bd1
2015-11-06 09:35:25 +01:00
18ce0560aa loplugin:stringconstant
Change-Id: Id5a07591a1d3a7264a0a979f25e8c2c859ec0492
Reviewed-on: https://gerrit.libreoffice.org/19767
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-04 09:42:42 +00:00
be729e7721 tdf#94269: Replace "n" prefix for bool variables with "b"
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797
Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-11-02 23:40:57 +01:00