summaryrefslogtreecommitdiff
path: root/dbaccess
AgeCommit message (Collapse)AuthorFilesLines
2022-11-04make ValueTransfer easier to understandmimo-7.3.7.2.M1Noel Grandin1-35/+33
storing references to local variables makes it harder to figure out what the control flow is doing. Change-Id: Ifa7fedd6e4be19a0aa8180aa4f754f1811ca44a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141965 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit ca82061c2cad00aeddb17b766063776fee0ee41a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142206 Tested-by: Aron Budea <aron.budea@collabora.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2022-11-02error when copying table and the copy table wizard creates the primary keyNoel Grandin1-1/+3
then the primary key will not be IDENTITY column, and the ALTER TABLE...RESTART WITH will product an error Change-Id: If17bd0cbfe3519f9074aebb819b7d85ccea63e1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141970 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 85a5233275ab83fe0d6b943b298695387d97accd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141931 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-02Fix bug in copying table where we need to create a primary keyNoel Grandin1-0/+11
The problem seems to be that commit fa177231cd20bf3c3f4bb9b50f6646da139c6766 Author: Tamas Bunth <tamas.bunth@collabora.co.uk> Date: Fri Aug 30 14:57:31 2019 +0200 tdf#127093, tdf#127092 Fix pasting autoincremented was reverted in commit d783017c1ccb4e62e99f26b42250ac4e15780cff. But the follow-on commit commit 376cc3ea0fc2e0f209763a2a27c5852136332c86 Author: Tamas Bunth <tamas.bunth@collabora.co.uk> Date: Sat Aug 31 18:27:44 2019 +0200 dbaccess: delete old paste autoincrement logic was not reverted. This is not a straight revert of the second commit, because autoincrement has since been improved with commit 2a8e120db1c3175ff937cdbe6d0ade23dc380c01 Author: Oleksii Makhotin <alex@bitprox.com> Date: Tue Apr 6 16:03:41 2021 +0300 tdf#119962 Fix autoincrement for copied table Change-Id: Ia9657d88b3e77ba72399ad9afeece3bda3f57038 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 0325be6f3de622be6af9b2f686e3c7afae0405b1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141933 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-01tdf#151073 - enable firebird for appstore build w/o experimental modeChristian Lohmaier2-1/+5
also don't default to hsqldb as embedded database when a build is done without java support. Mainly to hide an UI bug - apparently the dialog should show a non-supported message for known embedded drivers at least that is what 04d1e80ac7091ec2bf31c8617e832d5fe15350be suggests " // this indicates it's really a type which is known in general, but not supported on the current platform // show a message saying so // eSpecialMessage = smUnsupportedType; insertDatasourceTypeEntryData( m_eCurrentSelection, sDisplayName ); // remember this type so we can show the special message again if the user selects this // type again (without changing the data source) m_eNotSupportedKnownType = m_pCollection->determineType( m_eCurrentSelection ); " but that doesn't work, at least not anymore. m_eNotSupportedKnownType was since removed, no attempts are made in showing an error/warning message returning the hsqldb driver results in an empty (no display string) entry as the default element in the dropdown in the dialog, that still allows to create a database file (but of course one that you cannot add any actual database tables to) without any error message. At the very least it is inconsistent with the rest of the dialog's code that clears the input name for stuff that shouldn't be shown. Change-Id: I8419888018be2a556c49d32e40f02c0ac1801930 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141631 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit d0a20b67ae7ee1691409b4a1665853a182c46b7b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141704 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 9eb10478a18259d3ba47d5fc74395887f7a4f9d5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141843 Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-10-10Resolves: tdf#151441 queries don't show any contentCaolán McNamara1-2/+10
Change-Id: I66ec14c7cb8816bc2181cc25f7d7f31fdc7d1604 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141068 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-10-06Resolves: tdf#149277 we don't want to search the whole tree for dupsCaolán McNamara1-1/+1
just the immediate children of the supplied parent node Change-Id: I79595fd940257615f0d012cb9a4556aea51d7db9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140964 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-02-11Resolves: tdf#147325 "Edit in SQL View" should accept tabCaolán McNamara1-0/+1
Change-Id: I286281c317c30e5c189747f2d4844a0d5dd0828f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129829 Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-01-22Related: tdf#135935 set some hints as to what widget should have starting focusCaolán McNamara1-0/+1
for wizards where the help button gets initial focus under gen Change-Id: I40b0a4620f417a4688366c028db4c9cb59eb333c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128750 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-01-10tdf#68341: trim some variables passed on Base wizardJulien Nabet1-2/+2
Here is a git grep -n fillString: dbaccess/source/ui/dlg/ConnectionPage.cxx:232: fillString(*_rSet,m_xJavaDriver.get(), DSID_JDBCDRIVERCLASS, bChangedSomething); dbaccess/source/ui/dlg/ConnectionPage.cxx:235: fillString(*_rSet,m_xConnectionURL.get(), DSID_CONNECTURL, bChangedSomething); dbaccess/source/ui/dlg/ConnectionPageSetup.cxx:134: fillString(*_rSet,m_xConnectionURL.get(), DSID_CONNECTURL, bChangedSomething); dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:144: fillString(*_rSet,m_xETBaseDN.get(),DSID_CONN_LDAP_BASEDN, bChangedSomething); dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:416: fillString(*_rSet,m_xETDriverClass.get(),DSID_JDBCDRIVERCLASS,bChangedSomething); dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:417: fillString(*_rSet,m_xETHostname.get(),DSID_CONN_HOSTNAME,bChangedSomething); dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:418: fillString(*_rSet,m_xETDatabasename.get(),DSID_DATABASENAME,bChangedSomething); dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:531: fillString(*_rSet,m_xETDriverClass.get(),DSID_JDBCDRIVERCLASS,bChangedSomething); dbaccess/source/ui/dlg/admincontrols.cxx:117: OGenericAdministrationPage::fillString( *_rSet, m_xHostName.get(), DSID_CONN_HOSTNAME, bChangedSomething ); dbaccess/source/ui/dlg/admincontrols.cxx:118: OGenericAdministrationPage::fillString( *_rSet, m_xDatabaseName.get(), DSID_DATABASENAME, bChangedSomething ); dbaccess/source/ui/dlg/admincontrols.cxx:121: OGenericAdministrationPage::fillString( *_rSet, m_xSocket.get(), DSID_CONN_SOCKET, bChangedSomething ); dbaccess/source/ui/dlg/admincontrols.cxx:123: OGenericAdministrationPage::fillString( *_rSet, m_xNamedPipe.get(), DSID_NAMED_PIPE, bChangedSomething ); dbaccess/source/ui/dlg/adminpages.cxx:219: void OGenericAdministrationPage::fillString(SfxItemSet& _rSet, const weld::Entry* pEdit, sal_uInt16 _nID, bool& _bChangedSomething) dbaccess/source/ui/dlg/adminpages.cxx:227: void OGenericAdministrationPage::fillString(SfxItemSet& _rSet, const dbaui::OConnectionURLEdit* pEdit, sal_uInt16 _nID, bool& _bChangedSomething) dbaccess/source/ui/dlg/adminpages.hxx:218: static void fillString(SfxItemSet& _rSet,const weld::Entry* pEdit,sal_uInt16 _nID, bool& _bChangedSomething); dbaccess/source/ui/dlg/adminpages.hxx:219: static void fillString(SfxItemSet& _rSet,const dbaui::OConnectionURLEdit* pEdit,sal_uInt16 _nID, bool& _bChangedSomething); dbaccess/source/ui/dlg/advancedsettings.cxx:351: fillString( *_rSet, m_xAutoIncrement.get(), DSID_AUTOINCREMENTVALUE, bChangedSomething ); dbaccess/source/ui/dlg/advancedsettings.cxx:353: fillString( *_rSet, m_xAutoRetrieving.get(), DSID_AUTORETRIEVEVALUE, bChangedSomething ); dbaccess/source/ui/dlg/detailpages.cxx:146: fillString(*_rSet,m_xOptions.get(),DSID_ADDITIONALOPTIONS,bChangedSomething); dbaccess/source/ui/dlg/detailpages.cxx:303: fillString(*_rSet,m_xEDHostname.get(),DSID_CONN_HOSTNAME,bChangedSomething); dbaccess/source/ui/dlg/detailpages.cxx:406: fillString(*_rSet,m_xEDDriverClass.get(),DSID_JDBCDRIVERCLASS,bChangedSomething); dbaccess/source/ui/dlg/detailpages.cxx:407: fillString(*_rSet,m_xEDHostname.get(),DSID_CONN_HOSTNAME,bChangedSomething); dbaccess/source/ui/dlg/detailpages.cxx:408: fillString(*_rSet,m_xEDSocket.get(),DSID_CONN_SOCKET,bChangedSomething); dbaccess/source/ui/dlg/detailpages.cxx:608: fillString(*_rSet,m_xETBaseDN.get(),DSID_CONN_LDAP_BASEDN,bChangedSomething); So I don't think that trimming these may be harmful. Now we could also add a boolean fillString to indicated if a trim is needed but does it worth it? Change-Id: I6fa841a0c062d4b81a09549cbe865fd627d070cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128029 (cherry picked from commit 470d1be4ec5a3a5a0aba8febda06600ea39852c5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127960 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-12-20tdf#146333 don't create a new XTitle just to remove a listener from itCaolán McNamara1-3/+3
seeing as the listener obviously won't be in it Change-Id: If9944c003fa51309288276f1327011dc7403b31b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127171 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-23O[U]String::replaceAt overloads that take string_viewNoel Grandin3-5/+5
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23remove ORowSetValue implicit conversion methodsNoel Grandin9-96/+95
in favour of the existing get*() methods. The get*() methods 0 or false or empty in the case of "null", which is exactly the same behaviour as the conversion methods. These implicit conversion methods cause lookup problems when combined with some upcoming OUString changes. And the code looks cleaner this way too, and has less magic when calling methods. Change-Id: Ieb4756bf693e83b996a32667fc1b955f89193496 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125690 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-17Clear also m_aDestTypeInfo in dtor like m_aTypeInfo (dbaccess/WCopyTable)Julien Nabet1-0/+1
Change-Id: Ia73503628451a3e5ee5121022545c92b50d12b23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125261 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-15add a rule to enforce always-show-image of True if an image is usedCaolán McNamara2-0/+8
If not set, then gtk3 will show the image if there is no text, but only the text if there's an image. For simplicity sake just enforce it as true if an image is referenced. Change-Id: Id4bb9140ba83e7e07e0d8ec5e3c29aece49b9087 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125200 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-12Replace some macros in dbaccess part 9Julien Nabet3-152/+457
Remove IMPLEMENT_LISTENER_MULTIPLEXER_CORE + BEGIN_DECLARE_LISTENER_MULTIPLEXER + END_DECLARE_LISTENER_MULTIPLEXER + DECLARE_MULTIPLEXER_BOOL_METHOD + DECLARE_MULTIPLEXER_VOID_METHOD + STOP_MULTIPLEXER_LISTENING + START_PROPERTY_MULTIPLEXER_LISTENING + STOP_PROPERTY_MULTIPLEXER_LISTENING + START_MULTIPLEXER_LISTENING Change-Id: I23dfa9d71b8ae84b9c4ff5e55145e8b350a1eeba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125105 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-12insert special character in sql view in dbaccess using an arbitrary fontCaolán McNamara1-1/+1
The font to use in the editengine is set with the fallback list notation "Font1;Font2;Font3" and while SvxCharacterMap::SetCharFont explicitly has... { // first get the underlying info in order to get font names // like "Times New Roman;Times" resolved vcl::Font aTmp(m_xVirDev->GetFontMetric(rFont)); } which is supposed to resolve to what the physical font is, it appears that since the ancient merge of: commit 2f382d6c2579a25c68dbd121af7f1f5dc7ec9852 Date: Thu Mar 27 16:59:30 2003 +0000 MWS_SRX644: migrate branch mws_srx644 -> HEAD a change was included of: - // Fontdaten ermitteln und setzen - aMetric.SetName( pMetric->maName ); + // set aMetric with info from font + aMetric.SetName( maFont.GetName() ); which means that font names like "Times:Times New Roman" appear in the FontMetric for the font and not the font name of the physical font that the metric describes. That doesn't look right to me, but rather than get bogged down in changing that and the undoubtedly infinite chain of knock on problems that will trigger just start with a simple font name here not the fallback list. The font is "Liberation Mono;etc;etc" so the first one is certain to be available. Change-Id: I58809be8edb515d9823867c7a0bce5931dccbd27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125100 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-12Resolves: tdf#145582 modify called too oftenCaolán McNamara1-1/+3
a problem since: commit 5b98dd53c7dc101d3a5ff693d3f0520ec1abd3d1 Date: Tue Aug 3 12:28:23 2021 +0100 tdf#143657 'execute' button doesn't get enabled when contents changed which was a fix for the problem since: commit 73c9ef661d9ef6237d3fd3c259fd040a545b44cf Date: Tue Jul 6 18:51:38 2021 +0200 tdf#132740 don't broadcast if modified status has not changed Change-Id: Ibae42251ce04229283283407bc2ab986272e945d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125090 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-12simplify construction of XMLPropertyMapEntryNoel Grandin1-37/+35
so we don't have to pass in the size of the string literal. This is mostly a preparatory change, to make an another patch of mine less noisy. Change-Id: Idafcd68586b8b465e63dc89e4a4180d2e70ac3a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125080 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-12Replace some macros in dbaccess part 8Julien Nabet3-210/+515
Remove DECLARE_PROPERTY_MULTIPLEXER + IMPLEMENT_LISTENER_MULTIPLEXER_BOOL_METHOD + IMPLEMENT_LISTENER_MULTIPLEXER_VOID_METHOD + IMPLEMENT_LISTENER_ADMINISTRATION + IMPLEMENT_PROPERTY_MULTIPLEXER + IMPLEMENT_PROPERTY_LISTENER_ADMINISTRATION Change-Id: Ib0522fc895166489c70c163b9d6c0f65cd9a3d59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125078 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-12rtl::Static to thread-safe staticNoel Grandin1-3/+0
Change-Id: I6390d1811bad59c09a074039c635710d25a660d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124886 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-11Replace some macros in dbaccess part 7Julien Nabet8-117/+155
Remove FIRST_USER_DEFINED_FEATURE and LAST_USER_DEFINED_FEATURE + GRANT_REVOKE_RIGHT + ALL_STRING + ALL_INT + NSQLAllocHandle + NSQLFreeHandle + NSQLSetEnvAttr + NSQLDataSources + LbText + LbPos + CHECK_INVARIANTS + OUT_LF + TAG_OFF_LF + TAG_ON_LF + TAG_OFF + TAG_ON Change-Id: I07261ea0eafcc9f0630f92e47bf5c2f694661933 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125065 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-11Replace some macros in dbaccess part 6Julien Nabet11-155/+177
Remove DECL_PROP_IMPL + ELEMENT_COUNT + HANDLE_SQL_ERRORS + DO_SAFE Change-Id: I2208a22329f7611a7fdc896e25bb0ef0bb378abd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125050 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-11Replace some macros in dbaccess part 5Julien Nabet24-79/+230
Remove BEGIN_PROPERTY_SEQUENCE + BEGIN_PROPERTY_HELPER + BEGIN_PROPERTY_SEQUENCE + BEGIN_PROPERTY_HELPER + END_PROPERTY_HELPER + IMPLEMENT_SERVICE_INFO_IMPLNAME + IMPLEMENT_SERVICE_INFO_SUPPORTS Change-Id: I44499ba68a162b01a9dd5192228b8190b1f40c98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125028 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-11Replace some macros in dbaccess part 4Julien Nabet8-119/+104
Remove DECL_PROP0_BOOL + DECL_PROP1_BOOL + DECL_PROP0/1/2 Change-Id: I422d3dc4c09b5f8a88c8992de187458d74dc3d50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125015 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-10Replace some macros in dbaccess part 3Julien Nabet19-70/+162
Remove IMPLEMENT_SERVICE_INFO1 + IMPLEMENT_SERVICE_INFO2 + DECLARE_PROPERTYCONTAINER_DEFAULTS + DECLARE_PROPERTYCONTAINER_DEFAULTS + IMPLEMENT_PROPERTYCONTAINER_DEFAULTS2 + DECL_PROP3 (unused) + DECL_PROP2_IFACE Change-Id: Idf18179218b9b1f2da8e4354d8e4909edc925143 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125011 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-10Replace some macros in dbaccess part 2Julien Nabet12-73/+125
Remove MAP_CONST_TEXT + MAP_CONST_ROW + IMPLEMENT_SERVICE_INFO3 + IMPLEMENT_GETTYPES3 + IMPLEMENT_GETTYPES2 Change-Id: I56e96a782eda1e570a43cb6bad3fa5e52bc08d2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124960 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-08Replace some macros in dbaccess part 1Julien Nabet5-66/+70
Remove NOTIFY_LISTENERS_CHECK + CHECK_MATRIX_POS + REGISTER_PROPERTY_BV + REGISTER_PROPERTY + MAP_END + MAP_CONST_COLUMN + MAP_CONST_CELL Change-Id: I3cd32059aef6787c0e5f8338320d7e924199830c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124892 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-05Werror=nonnull in SbaXFormAdapter::cancelNoel Grandin1-1/+1
ever since commit 38d78d3c30183b11f5b643c147667b1d30325784 Author: Ocke Janssen <oj@openoffice.org> Date: Thu Oct 26 13:46:14 2000 +0000 new datasource browser spotted by new gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0 Change-Id: If054b949f4b4f93e785d315ddeb3423b52d1f55b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124759 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-05Refer to TLS/SSL in optionsIlmari Lauhakangas2-2/+2
Change-Id: I07bddadd9421ee5584f8d978c5c43eab067414af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124745 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Sophie Gautier <sophi@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-11-04elide unnecessary UNO_QUERY_THROW callsNoel Grandin2-5/+2
Change-Id: I0d0fc57f352e9717e721416c8941cfcf48af24c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124650 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-02Drop char*-based API from NamedValueCollectionMike Kaganski8-71/+61
Change-Id: I87f339b348580e256a8d65470ad15cbdabf2c9dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124609 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-01Resolves: tdf#144793 add scrollbar to sql editviewCaolán McNamara6-7/+83
Change-Id: I23126a89c136a134590900c38ccd589fb4ea29a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124546 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-31uniformly allow focus into GtkToolbarCaolán McNamara1-1/+1
Change-Id: I110daf882d9196cf7552e43a157ba4ae73fd670b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124458 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-31gtk[3 vs 4]: remove can-focus from GtkToolButtonCaolán McNamara1-5/+0
so tab-cycling inside sidebar panel toolbars works as wanted It needs to be false for gtk3 and true for gtk4, leaving it unspecified gets a desired working default. Change-Id: I34869d5dcffc814f62ec2b717108f90c395a067b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124446 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-29simplify framework::TitleHelperNoel Grandin2-9/+2
Every callsite (bar one) calls setOwner and connectWithUntitledNumbers after construction, so just pass them in the constructor. And for that lone callsite we can just nullptr as an argument. Change-Id: If838e068bb59a407225d853a0f67983be400f2f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124426 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-29tdf#143392 fix title on Base windowNoel Grandin2-2/+14
regression from commit 857caa5fc69b92e781457a1b67a89aa051c2d70f tdf#79049 speed up OOXML workbook load Change-Id: Ia2d55386a7508dc2bbb2fa8501b45c3f30ad6a75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124423 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-29Prepare for removal of non-const operator[] from Sequence in dbaccessMike Kaganski37-237/+185
Change-Id: Iddb96d39a512ef68827ecf89f3b5650950f88096 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124357 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-22Revert "Simplify vector initialization in dbaccess"Julien Nabet1-2/+4
This reverts commit dfa8dbf98ee872d22bb9e2c63ab07ed76fb81579. since it needs 2 allocations instead of one Change-Id: I64d449ca885880f3e6e795168978ffa99a005c37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124067 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-22Optimize assignment from OUStringLiteral to OUStringStephan Bergmann1-2/+4
...by making the OUString's pData point to the OUStringLiteral, instead of copying the contained characters. This is one of the improvements that had not been done as part of e6dfaf9f44f9939abc338c83b3024108431d0f69 "Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uString": "To keep individual commits reasonably manageable, some consumers of OUStringLiteral in rtl/ustrbuf.hxx and rtl/ustring.hxx are left in a somewhat odd state for now, where they don't take advantage of OUStringLiteral's equivalence to rtl_uString, but just keep extracting its contents and copy it elsewhere. In follow-up commits, those consumers should be changed appropriately, making them treat OUStringLiteral like an rtl_uString or dropping the OUStringLiteral overload in favor of an existing (and cheap to use now) OUString overload, etc." (Simply dropping the OUStringLiteral overload was not possible in this case, though, as that would have lead to ambiguities among the various OUString and std::u16string_view overloads.) The now-deleted OUStringLiteral rvalue reference overload means that some existing assignments from ternary-operator OUStringLiteral<N> to OUString no longer compile and had to be replaced with uses of std::u16string_view. Those had not already been replaced in e6dfaf9f44f9939abc338c83b3024108431d0f69 because they happened to use OUStringLiteral instances of identical length N in both arms of the ternary operator, so did not already start to fail to compile back then. Change-Id: I328e25b8324d045774e811d20a639f40d6a9a960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124040 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-20loplugin:indentation check for indent inside blockNoel Grandin1-65/+65
look for places where the statements inside a block are not indented Change-Id: I0cbfa7e0b6fb194b2aff6fa7e070fb907d70ca2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123885 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-15Simplify vector initialization in dbaccessJulien Nabet1-4/+2
Change-Id: Iad1f84a9e81c50a007c162a5043343233fdc23a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123664 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski11-12/+12
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-14use std::vector::insert instead of push_backNoel Grandin1-5/+2
because it will pre-allocate space and often is optimised to memcpy Change-Id: I03ed7915f2762d3d27e378638052a47a28bbf096 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123588 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-14Avoid COW overhead using css::uno::SequenceMike Kaganski8-18/+24
The scenarios are: 1. Calling sequence's begin() and end() in pairs to pass to algorithms (both calls use getArray(), which does the COW checks) 2. In addition to #1, calling end() again when checking result of find algorithms, and/or begin() to calculate result's distance 3. Using non-const sequences in range-based for loops, which internally do #1 4. Assigning sequence to another sequence variable, and then modifying one of them In many cases, the sequences could be made const, or treated as const for the purposes of the algorithms (using std::as_const, std::cbegin, and std::cend). Where algorithm modifies the sequence, it was changed to only call getArray() once. For that, css::uno::toNonConstRange was introduced, which returns a struct (sublclass of std::pair) with two iterators [begin, end], that are calculated using one call to begin() and one call to getLength(). To handle #4, css::uno::Sequence::swap was introduced, that swaps the internal pointer to uno_Sequence. So when a local Sequence variable should be assigned to another variable, and the latter will be modified further, it's now possible to use swap instead, so the two sequences are kept independent. The modified places were found by temporarily removing non-const end(). Change-Id: I8fe2787f200eecb70744e8b77fbdf7a49653f628 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123542 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-12loplugin:unusedmethodsNoel Grandin2-21/+0
Change-Id: Ifd3a1ccef68ebc4cd4e7785357e6a476f6669eb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123456 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-11In O[U]StringBuffer, make string_view params replacements for OUString onesStephan Bergmann1-5/+2
...for LIBO_INTERNAL_ONLY, instead of having them as additional overloads. That way, loplugin:bufferadd and loplugin:stringviewparam found many further opportunities for simplification (all addressed here). Some notes: * There is no longer an implicit conversion from O[U]String to O[U]StringBuffer (as that goes via user-defined conversions through string_view now), which was most noticeable in copy initializations like OStringBuffer buf = someStr; that had to be changed to direct initialization, OStringBuffer buf(someStr); But then again, it wasn't too many places that were affected and I think we can live with that. * I made the O[U]StringBuffer ctors taking string_view non-explicit, mainly to get them in line with their counterparts taking O[U]String. * I added an OUStringBuffer::lastIndexOf string_view overload that was missing (relative to OUStringBuffer::indexOf). * loplugin:stringconstant needed some addition to keep the compilerplugins/clang/test/stringconstant.cxx checks related to OStringBuffer::append and OStringBuffer::insert working. * loplugin:stringviewparam no longer needs the special O[U]StringBuffer-related code that had been introduced in 1250aecd71fabde4dba990bfceb61bbe8e06b8ea "loplugin:stringviewparam extend to new.." Change-Id: Ib1bb8c4632d99b744e742605a9fef6eae959fd72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122904 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-11loplugin:moveparam in dbaccessNoel Grandin31-59/+58
Change-Id: Iff4c5069d25dddd58d61b2a09a57a112854144da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123370 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-10loplugin:moveparam in xmloffNoel Grandin1-4/+3
Change-Id: I46c1c8dc46cd2b8470b69506f6609f8bd7e42211 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123347 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-09Typo *ropertie -> *ropertyJulien Nabet2-11/+11
Change-Id: Id5ae03140ac4fd67bf4940569ac5cd2f15716749 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123306 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-04tdf#144674 no context menu in SQL QueryCaolán McNamara2-0/+76
Change-Id: I3c6e9e7896da171d089579165f466b4b6e59a1a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123030 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>