summaryrefslogtreecommitdiff
path: root/include/comphelper
AgeCommit message (Collapse)AuthorFilesLines
2020-03-23make more classes private in mergedlibs modeNoel Grandin11-12/+23
Change-Id: I486922d0652f26fa7ee56f5fe308e19fe5ff137e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-20Clarify the WIP-ness of setMobilePhone() and setTablet() a bitTor Lillqvist1-0/+5
Change-Id: Iee8b773e23ebd3fbc1ba5bf2c56d644d0844cb2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90682 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90779 Tested-by: Jenkins
2020-03-20Rename isMobile to isMobilePhone and introduce a separate isTabletTor Lillqvist1-4/+10
The intended semantics of isMobile() has been to say whether the device is a mobile phone ot not. Not whether it is a mobile device in general. So make that explicit. Adjust call sites as necessary. Also, in a couple of places where it is likely that what is relevant is whether it is a mobile device in general, not just whether it is a mobile phone, check both isMobile() and isTablet(). For stable interoperability with current Online, keep accepting also the .uno:LOKSetMobile "command" (and .uno:LOKUnSetMobile, except that Online never sends that). Online will eventually be changed to use .uno:LOKSetMobilePhone or .uno:LOGSetTablet only (and never the UnSet variants). Also drop the default value for the bool parameter to setMobilePhone(). Default bool parameters can be quite confusing, and it was especially silly in this case as there is one (1) call site. This is a work in progress and will be improved. Currently there are undefined corner cases. Change-Id: I2a71c37323ee151cbc671bd8e714e1dee10f8b1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90560 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90778 Tested-by: Jenkins
2020-03-04comphelper: allow simple ad-hoc measuring with ProfileZonesMiklos Vajna1-6/+30
And then remove the manual measuring from the RTF import. Sample output: comphelper::ProfileZone: RtfFilter::filter finished in 180 ms Change-Id: I85e2e12d82ff491a2991a41e5a6f6d1410e12363 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89905 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-25Fix currency symbol selection in Calc on mobileTomaž Vajngerl1-2/+5
In LOK we use one language identifier for both - UI language and the locale used. This is a problem when we determine that we a language for UI is not available and fall-back to the default "en-US" langauge, which also changes the locale. This introduces a separate variable that stores the language tag for the locale independently to the language. Another problem is that in some cases we don't reset the staticly initialized data, when the new document is loaded, which is on the other hand used to define which currency symbol is used as SYSTEM locale. That can in some cases select the wrong currency symbol even when we changed the locale to something else. This fix introduces a reset function, which is triggered on every document load. Change-Id: I55c7f467600a832895f94346f8bf11a6ef6a1e49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89320 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89343 Tested-by: Jenkins
2020-02-21Drop o3tl::optional wrapperStephan Bergmann3-14/+14
...now that macOS builds are guaranteed to have std::optional since 358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to Xcode 11.3 and macOS 10.14.4". The change is done mostly mechanically with > for i in $(git grep -Fl optional); do > sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \ > -e 's/\<o3tl::optional\>/std::optional/g' \ > -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i" > done > for i in $(git grep -Flw o3tl::nullopt); do > sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i" > done (though that causes some of the resulting #include <optional> to appear at different places relative to other includes than if they had been added manually), plus a few manual modifications: * adapt bin/find-unneeded-includes * adapt desktop/IwyuFilter_desktop.yaml * remove include/o3tl/optional.hxx * quote resulting "<"/">" as "&lt;"/"&gt;" in officecfg/registry/cppheader.xsl * and then solenv/clang-format/reformat-formatted-files Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-17inline some acquire/release callsNoel Grandin1-2/+5
because these are all on the hot path, and in the best case, with enough inlining, the compiler can skip the call altogether and just do a locked CMPXHG instruction Change-Id: I099d6385f602e40e1767f9f1002b7514ecf436e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88775 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-08pack some data structuresNoel Grandin1-1/+1
Change-Id: I7ef990b8aa7b26c413b54186c360ed3f858d4e26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88170 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-07make isDebuggerAttached() public comphelper APILuboš Luňák1-0/+38
So that it can be used also from other places. Change-Id: Iab90350fd02872ffde180ce74f01f7ff5e4448b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88009 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-02-07merge OpenGLZone and OpenCLZone into one generic codeLuboš Luňák1-0/+72
To be used also by Skia code to detect problems with Vulkan drivers. The watchdog does not handle OpenCL because neither did the original code, but also because OpenCLZone::hardDisable() called from it would deadlock on SolarMutex for some reason. Change-Id: I483d8cb0b11a4e1e65c564f4e4c29ab68843ff71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88008 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-01-21Make TempFile destructor remove temp directory recursivelySamuel Mehrbrodt1-0/+34
Change-Id: Idcfa93ffe86112477ad81bcbf74b8e5b858423f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87080 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-01-13Revert "tdf#125662: disable parallel-zip if the memory..."Dennis Francis1-37/+0
This reverts commit 0b8ae8725083eb0526a262d434cc06fb3f3e7336. A better fix will follow this patch. Change-Id: I4ff8d71bf2401bae2e2071c369e3746b8b7c72bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86595 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-01-04tdf#125662: disable parallel-zip if the memory...Dennis Francis1-0/+37
required to carry it out will cause a breach of addressable memory limit. This can happen in 32bit OSes, where the physical memory limit is more than the process addressable memory limit. For example in Win32, a process can address only upto 2GB. More specifically, avoid using ZipOutputEntryParallel which rougly needs twice the memory compared to its counterparts. Change-Id: I4d1abbf75e928188bcf806fcf1e5872b1e51b502 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84394 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2019-12-23desktop: unit-test to check SpellDialog works in multiple viewsAshod Nakashian1-0/+2
Unfortunately, this isn't fully functional, but didn't want to lose the effort. The problem is that there is no proper config for languages in the unit-tests. So even when we set the language explicitly, it still doesn't apply to the SpellCheckerDispatcher, which is where it matters. This seems to be because the config is not properly propagated and broadcast. Below is the stacktrace as works on desktop. During the unittest the Broadcaster has no change listener for LngSvcMgr, so SpellCheckerDispatcher::SetServiceList doesn't get called. #0 0x00007f47f3fed7e6 in SpellCheckerDispatcher::SetServiceList(com::sun::star::lang::Locale const&, com::sun::star::uno::Sequence<rtl::OUString> const&) (this=0x5589de40e7a0, rLocale=..., rSvcImplNames=uno::Sequence of length 1 = {...}) at /home/ash/prj/master/linguistic/source/spelldsp.cxx:795 #1 0x00007f47f3fcc0ad in LngSvcMgr::Notify(com::sun::star::uno::Sequence<rtl::OUString> const&) (this=0x5589de43b4e0, rPropertyNames=uno::Sequence of length 4 = {...}) at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:826 #2 0x00007f47fa2d3c8d in utl::ConfigItem::CallNotify(com::sun::star::uno::Sequence<rtl::OUString> const&) (this=0x5589de43b530, rPropertyNames=uno::Sequence of length 4 = {...}) at /home/ash/prj/master/unotools/source/config/configitem.cxx:181 #3 0x00007f47fa2d3946 in utl::ConfigChangeListener_Impl::changesOccurred(com::sun::star::util::ChangesEvent const&) (this=0x5589de464b90, rEvent=...) at /home/ash/prj/master/unotools/source/config/configitem.cxx:143 #4 0x00007f47e273bb61 in configmgr::Broadcaster::send() (this=0x7ffcc604c5b0) at /home/ash/prj/master/configmgr/source/broadcaster.cxx:182 #5 0x00007f47e277f002 in configmgr::RootAccess::commitChanges() (this=0x5589dd557400) at /home/ash/prj/master/configmgr/source/rootaccess.cxx:171 #6 0x00007f47fa2d80e3 in utl::ConfigItem::ReplaceSetProperties(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x5589dd5571b0, rNode="ServiceManager/SpellCheckerList", rValues=uno::Sequence of length 4 = {...}) at /home/ash/prj/master/unotools/source/config/configitem.cxx:1025 #7 0x00007f47fa339983 in SvtLinguConfig::ReplaceSetProperties(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x7ffcc604cb40, rNode="ServiceManager/SpellCheckerList", rValues=uno::Sequence of length 4 = {...}) at /home/ash/prj/master/unotools/source/config/lingucfg.cxx:847 #8 0x00007f47f3fcb88f in LngSvcMgr::UpdateAll() (this=0x5589de43b4e0) at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:765 #9 0x00007f47f3fc9caa in LngSvcMgr::LngSvcMgr() (this=0x5589de43b4e0) at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:438 #10 0x00007f47f3fd3baf in LngSvcMgr_CreateInstance(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&) () at /home/ash/prj/master/linguistic/source/lngsvcmgr.cxx:1967 #11 0x00007f4800e9656b in cppu::OSingleFactoryHelper::createInstanceEveryTime(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x5589de3ccfc8, xContext= uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:149 #12 0x00007f4800e96790 in cppu::OSingleFactoryHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x5589de3ccfc8, xContext=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:175 #13 0x00007f4800e97107 in cppu::OFactoryComponentHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x5589de3ccf60, xContext=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/factory.cxx:374 #14 0x00007f4800eebc8f in cppuhelper::ServiceManager::Data::Implementation::createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool) (this=0x5589dbd2f030, context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630, singletonRequest=false) at /home/ash/prj/master/cppuhelper/source/servicemanager.cxx:667 #15 0x00007f4800eee587 in cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0x5589dbcbaaf0, aServiceSpecifier="com.sun.star.linguistic2.LinguServiceManager", Context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/cppuhelper/source/servicemanager.cxx:991 #16 0x00007f4800776778 in com::sun::star::linguistic2::LinguServiceManager::create(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (the_context=uno::Reference to (cppu::ComponentContext *) 0x5589dbcca630) at /home/ash/prj/master/workdir/UnoApiHeadersTarget/offapi/normal/com/sun/star/linguistic2/LinguServiceManager.hpp:38 #17 0x00007f4800772d51 in GetLngSvcMgr_Impl() () at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:66 #18 0x00007f4800773449 in SpellDummy_Impl::GetSpell_Impl() (this=0x5589dd82f420) at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:217 #19 0x00007f4800773614 in SpellDummy_Impl::isValid(rtl::OUString const&, short, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x5589dd82f420, rWord="a", nLanguage=1033, rProperties=empty uno::Sequence) at /home/ash/prj/master/editeng/source/misc/unolingu.cxx:249 #20 0x00007f48006ae4c2 in ImpEditEngine::DoOnlineSpelling(ContentNode*, bool, bool) (this=0x5589de195060, pThisNodeOnly=0x0, bSpellAtCursorPos=false, bInterruptible=true) at /home/ash/prj/master/editeng/source/editeng/impedit4.cxx:2306 #21 0x00007f480067d0d2 in ImpEditEngine::OnlineSpellHdl(Timer*) (this=0x5589de195060) at /home/ash/prj/master/editeng/source/editeng/impedit3.cxx:322 Change-Id: Iffef03502c78311427aa8883739678120cc84931 (cherry picked from commit 4f77bd94028a140133814d735c0425bbd0de4839) Reviewed-on: https://gerrit.libreoffice.org/85007 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 66c1f6bee6f463786540b2e73d52f35461063589) Reviewed-on: https://gerrit.libreoffice.org/85683 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2019-12-18sal_Char->char in comphelperNoel Grandin5-37/+37
Change-Id: I63488463f2255a013cb80a9318d22207cb0ed532 Reviewed-on: https://gerrit.libreoffice.org/85395 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-12Use std::transform instead of for loopMike Kaganski1-15/+12
This simplifies the functions, and avoids repeated non-const operator[] on sequences, which has significant overhead. Change-Id: I670c25da6f5422822c931d1f4105b07102d7a3d6 Reviewed-on: https://gerrit.libreoffice.org/85014 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-12-01Introduce o3tl::optional as an alias for std::optionalStephan Bergmann3-14/+14
...with a boost::optional fallback for Xcode < 10 (as std::optional is only available starting with Xcode 10 according to <https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite all code to use o3tl::optional instead of boost::optional. One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus -Werror=maybe-uninitialized" should no longer be necessary (and whose check happened to no longer trigger for GCC 10 trunk, even though that compiler would still emit bogus -Wmaybe-uninitialized for uses of boost::optional under --enable-optimized, which made me ponder whether this switch from boost::optional to std::optional would be a useful thing to do; I keep that configure.ac check for now, though, and will only remove it in a follow up commit). Another longer-term benefit is that the code is now already in good shape for an eventual switch to std::optional (a switch we would have done anyway once we no longer need to support Xcode < 10). Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses boost::property_tree::ptree::get_child_optional returning boost::optional, so let it keep using boost::optional for now. After a number of preceding commits have paved the way for this change, this commit is completely mechanical, done with > git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g' (before committing include/o3tl/optional.hxx, and relying on some GNU features). It excludes some files where mention of boost::optional et al should apparently not be changed (and the sub-repo directory stubs). It turned out that all uses of boost::none across the code base were in combination with boost::optional, so had all to be rewritten as o3tl::nullopt. Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b Reviewed-on: https://gerrit.libreoffice.org/84128 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-01Don't use boost::optional forward declarationsStephan Bergmann1-2/+4
...in preparation for wholesale replacement of boost::optional with o3tl::optional (which will be a using declaration for either std::optional or boost::optional, hence can't be forward-declared easily) Change-Id: I031ed1812a0c939f37253f7753e358f1ad9153a3 Reviewed-on: https://gerrit.libreoffice.org/84126 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-30Rewrite uses of boost::optionalStephan Bergmann1-1/+1
...to only use functions that are also available for std::optional (in preparation for changing from boost::optional to std::optional): * uses of get are replaced with operator * or operator -> * uses of is_initialized are replaced with operator bool * uses of reset with an argument are replace with operator = (All of the replacements are also available for boost::optional "since forever", so this change should not break builds against old --with-system-boost. An alternative replacement for is_initialized would have been has_value, but that is only available since Boost 1.68.) Change-Id: I532687b6a5ee37dab28befb8e0eb05c22cbecf0f Reviewed-on: https://gerrit.libreoffice.org/84124 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-20Remove comphelper::OUStringLiteralListStephan Bergmann1-31/+0
...that had been introduced with 51eb969cb77f8b54681033f4959b15ce32116b56 "Replace comphelper::ServiceInfoHelper::addToSequence" and obsoleted by <https://gerrit.libreoffice.org/#/c/83291/> "loplugin:redundantfcast: Don't warn about cast from braced-init-list" Change-Id: Ic5bb63cf4f528285587f46437a27bafbb05a07ac Reviewed-on: https://gerrit.libreoffice.org/83315 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-18convert AccessibilityFlowTo to scoped enumNoel Grandin1-4/+6
and drop the unused FORSPELLCHECKFLOWTO Change-Id: I128e84d386c10d001aa63f93b4b6dcb7238a1242 Reviewed-on: https://gerrit.libreoffice.org/83060 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-16Replace comphelper::ServiceInfoHelper::addToSequenceMike Kaganski2-48/+31
Change-Id: I325e16fdf9bbbc6f2ba2d06c417da5eeb0d48023 Reviewed-on: https://gerrit.libreoffice.org/82975 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-11-15make some classes module-privateNoel Grandin1-1/+1
Change-Id: I95845d7217fc5e77e3f8e205030e9cd761ad0cc5 Reviewed-on: https://gerrit.libreoffice.org/82116 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-09tdf#80731: Only check closing parenthesis when in IDEMike Kaganski2-49/+63
This reinstates the fix by Pierre Lepage, which was reverted in 351dead74b4c213b13102f81b5ae9bb47ad8ca39, and makes sure it only has effect when the compilation is started from IDE. The idea is that the IDE is used primarily for development, and that's a good opportunity to detect any error in the code. When the code is compiled from outside of the IDE (like running an extension), the error is tolerated to allow users run the legacy code having this error. Hopefully this is enough for tdf#106529. This re-uses comphelper's NoEnableJavaInteractionContext class, which is converted into general-purpose SetFlagContext class to avoid code duplication. Change-Id: Ie290019cb190b8d1d590699ec13bd63eac478d09 Reviewed-on: https://gerrit.libreoffice.org/81616 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-11-06Revert "sc lok: Implement hi-dpi and zoom for spreadsheets."Michael Meeks1-2/+2
This reverts commit 498dceb43f870bf9e380f1f87e99c6ccadf1963c. Change-Id: Iadb9da47cf8c9a57385530ab888d55169db7639a Reviewed-on: https://gerrit.libreoffice.org/82088 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-29loplugin:finalclass in comphelperNoel Grandin24-39/+39
Change-Id: Ic64151191e46dff81c0a5cb8377f89e1e4afb269 Reviewed-on: https://gerrit.libreoffice.org/81624 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-23Resolves: tdf#128313 disambiguate flow-to search resultsCaolán McNamara1-1/+2
for a11y between find/replace where our result is a single thing, and find-all/replace-all where the result is potentially many things, which allows that searching in a selected calc column will flow-to the current cell, not the entire ~infinite set of cells in the column Change-Id: Ib3e56fceb90d869f157427f090cdffe986a5a588 Reviewed-on: https://gerrit.libreoffice.org/81396 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-23put together the 'magic' flow-to constantsCaolán McNamara1-0/+33
as a side note, there's no actual use of FORSPELLCHECKFLOWTO anywhere that I can see Change-Id: I90d50d7f98dede3803fec1d22d32d5d57858c1e3 Reviewed-on: https://gerrit.libreoffice.org/81394 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-23size some stringbuffer to prevent re-allocNoel Grandin1-7/+7
Change-Id: I385587a922c555c320a45dcc6d644315b72510e9 Reviewed-on: https://gerrit.libreoffice.org/81278 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-01Implement parallel version of super-scalar-sample-sort...Dennis Francis1-0/+373
and use it for the pivot table construction routine processBuckets(). The implementation uses ideas from the non-parallel sample sort discussed in the below paper, but parallelizes the "binning"/"classification" operations and the sorting of the bins themselves. Sanders, Peter, and Sebastian Winkel. "Super scalar sample sort." European Symposium on Algorithms. Springer, Berlin, Heidelberg, 2004. which can be accessed at : http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.72.366&rep=rep1&type=pdf Change-Id: I3723b87e2feb8d7d9ee03f71f6025e26add914ce Reviewed-on: https://gerrit.libreoffice.org/79486 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-09-26loplugin:constmethod in comphelper..desktopNoel Grandin1-1/+1
Change-Id: I3dbdc72b05c9d01cce279c783c60d191900f8b7c Reviewed-on: https://gerrit.libreoffice.org/79538 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-07tdf#39593 drop comphelper::getImplementationArkadiy Illarionov1-10/+0
Replace with comphelper::getUnoTunnelImplementation. Change-Id: I96277aa9c17532ea6e2781dbc3305b2dbaa4e5c2 Reviewed-on: https://gerrit.libreoffice.org/78733 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-09-07tdf#39593 use isUnoTunnelId in connectivityArkadiy Illarionov1-1/+1
Change-Id: I458049e23e9fc1855cb4ba9519b9b940f170b024 Reviewed-on: https://gerrit.libreoffice.org/78732 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-09-06TyposAndrea Gelmini3-4/+4
Mainly fixing '....' and '..' Change-Id: Ic928701b319868671b826d757dd94c296fd5e942 Reviewed-on: https://gerrit.libreoffice.org/78668 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-03Fix typosAndrea Gelmini1-1/+1
Change-Id: I7eacff7dd5bf1e8ae70d2bca0bc852b8a45eeeec Reviewed-on: https://gerrit.libreoffice.org/78428 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-01loplugin:unusedmethodsNoel Grandin1-19/+0
Change-Id: Ifaf3860a31fc151bb7052db1b87962b8aba27c37 Reviewed-on: https://gerrit.libreoffice.org/78366 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-01Fix '..'Andrea Gelmini1-1/+1
To complete this: https://gerrit.libreoffice.org/#/c/78312/ This is a massive replace for lines ending with ".." instead of "..." It passed "make check" on Linux. Change-Id: I07fa7b2e30ba9ea17a1f9a5e21c57216ba958efe Reviewed-on: https://gerrit.libreoffice.org/78356 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2019-08-29LOK: per-view support for isMobile()Muhammet Kara1-2/+2
embeddedobj/source/commonembedding/embedobj.cxx will have a follow-up patch, which also removes the -1 case. It is left out because it has many call-sites, and inheritance/override relations. Change-Id: Iaf00530916f3772f7aec151cbd358f255b7aab24 Reviewed-on: https://gerrit.libreoffice.org/78272 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-08-29lok: Add isMobile() methodMuhammet Kara1-0/+6
[ Miklos: this allows core to e.g. serve tunelled dialogs with more or less compact layouts, depending on if the client is mobile or not. ] Change-Id: I3559bee84e6ef6f757809617e303aa090698ce5d Reviewed-on: https://gerrit.libreoffice.org/78261 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-08-26Generalize comphelper::concatSequences to accept other container typesMike Kaganski1-4/+3
... as second and following arguments. Change-Id: I1c994ec234354805bc702632878fd67a54d271d6 Reviewed-on: https://gerrit.libreoffice.org/78092 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-23loplugin:returnconstval in comphelperNoel Grandin3-5/+5
Change-Id: I6e8d45e4d5e6223ffa7ae844a8bd46eae8e1f3c8 Reviewed-on: https://gerrit.libreoffice.org/78000 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-23Mark move ctors/assignments noexceptMike Kaganski1-2/+2
This should enable using move semantics where possible e.g. in standard containers. According to https://en.cppreference.com/w/cpp/language/move_constructor: To make strong exception guarantee possible, user-defined move constructors should not throw exceptions. For example, std::vector relies on std::move_if_noexcept to choose between move and copy when the elements need to be relocated. Change-Id: I6e1e1cdd5cd430b139ffa2fa7031fb0bb625decb Reviewed-on: https://gerrit.libreoffice.org/77957 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-23tdf#39593 extract UnoTunnelId comparison to template functionArkadiy Illarionov1-4/+9
Change-Id: Ia2b5dea273c8de7b8c54e74780193a8d4cba7b45 Reviewed-on: https://gerrit.libreoffice.org/73874 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-22The AsyncQuitHandler class needs to be implemented in the comphelper DLLTor Lillqvist1-27/+7
Otherwise each file that uses it will get a separate copy of the object that the instance() function returns. I think. Silly me for trying to cut corners. Change-Id: Id9df7d60926e57491fe749dfc50cea8e1de643c3 (cherry picked from commit 6d55c969e58714382e6ccd2cedcabceb1bd43c0a) (cherry picked from commit 057cdd6eb480c19b1b8988ac2ae6de610691c593) Reviewed-on: https://gerrit.libreoffice.org/77949 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2019-08-22More hacks for quit requests from an OLE Automation clientTor Lillqvist1-1/+13
Actually I am now not so sure whether the TerminationVetoer thing is needed or not. Will have to experiment later with the customer use case what happens if I remove all that. Maybe adding it was a mistake, as misinterpretation of what was going on. Change-Id: I252e1233cae1622099bc3310814132dae58b2aed (cherry picked from commit 9c50273a9f3a15d1ff7ea4880638ca833570e0bd) Reviewed-on: https://gerrit.libreoffice.org/77948 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2019-08-22loplugin:constmethod in canvas,comphelperNoel Grandin1-1/+1
Change-Id: I8790355369159b2325d3992712b2f65e0401db86 Reviewed-on: https://gerrit.libreoffice.org/77930 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-22Use range ctor to avoid default-insertion of elements before assignmentMike Kaganski1-11/+5
Change-Id: I9d14ca33349ea92f94362e862fd24e1e468dab05 Reviewed-on: https://gerrit.libreoffice.org/77929 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-21Make comphelper::findValue inline template and drop sequence.cxxMike Kaganski1-3/+13
Change-Id: Ibee3424b9a957d5d62e66c3257a4050a2ebc207b Reviewed-on: https://gerrit.libreoffice.org/77881 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-08-20tdf#119388 speed up listener broadcastNoel Grandin1-0/+356
when deleting columns with lots of shapes. The UNO_QUERY is expensive in this case, so create a new comphelper::OInterfaceContainerHelper3 that knows what type the listener interface is. Takes the time from 47s to 41s for me. Change-Id: Id575a59af8505fbd3b0638fd5224e70fd556215f Reviewed-on: https://gerrit.libreoffice.org/77824 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-13warn on load when a document binds an event to a macroCaolán McNamara1-1/+4
a) treat shared/Scripts equivalently to document scripts This doesn't automatically warn/block running those scripts when used in a freshly loaded document on its own however because DocumentMacroMode::checkMacrosOnLoading will see at... if ( m_xData->m_rDocumentAccess.documentStorageHasMacros() || hasMacroLibrary() ) that the document contains no macros and flip the allow macros flag to true so that potentially new uses of macros added by the user during the edit are allowed to run b) so, add an additional flag to indicate existence of use of macros in a document c) for odf import, set it when a script:event-listener tag is encountered d) for html import when registerScriptEvents or SwFormatINetFormat::SetMacroTable is called e) for doc import when Read_F_Macro or StoreMacroCmds is called as well for good measure f) for xls import when registerScriptEvent or ScMacroInfo::SetMacro is called g) for oox import when VbaProject::attachMacros is called Change-Id: Ic1203d8ec7dfc217aa217135033ae9db2888e19b Reviewed-on: https://gerrit.libreoffice.org/77131 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>