summaryrefslogtreecommitdiff
path: root/dtrans
AgeCommit message (Collapse)AuthorFilesLines
2020-08-04loplugin:simplifypointertobool (clang-cl)Stephan Bergmann1-5/+5
Change-Id: I6512e6e4217ef9084c74e46e3b4f1e8defbd1bec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100108 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-04Improved loplugin:staticanonymous -> redundantstatic redux, clang-clStephan Bergmann1-1/+1
Change-Id: Ie6dc22edbcfdf05ab8d7d668cb7cc33b5b747995 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100100 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-24dtrans/dnd: create instances with uno constructorsNoel Grandin6-102/+23
See tdf#74608 for motivation. Change-Id: I39821b05dc5148870e0bd9291e21815f4868b5ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99160 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-24dtrans/generic: create instances with uno constructorsNoel Grandin7-142/+68
See tdf#74608 for motivation. Change-Id: Id5c585f28cb8696f37513bd2a2112af8d278648c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99161 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-22dtrans/ftransl: create instances with uno constructorsNoel Grandin4-95/+16
See tdf#74608 for motivation. Change-Id: I7068fd727d57258a21001d24d2f6b14fa51f9870 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99159 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-22dtrans/clipboard: create instances with uno constructorsNoel Grandin4-98/+16
See tdf#74608 for motivation. Change-Id: Iba30f1cf6892330495f57343619e234194bc5b5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99158 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-11dtrans/mcnttype: create instances with uno constructorsNoel Grandin5-98/+16
See tdf#74608 for motivation. Also drop mutex, no need to lock when we're just constructing something. Change-Id: I5e845ae2fbb03fc4f38d0ee85b2061891fa0993f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98560 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-06-04Remnant CoInitialize commentJulien Nabet1-1/+1
Change-Id: I33b328e4b2c85a6260d068ce5d9504dfdb201f89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95495 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-06-01cache foreign content in win32 clipboard code (tdf#133267)Luboš Luňák2-0/+13
The slowness in tdf#133267 on Windows is because the Calc operation repeatedly calls ScDocument::IsClipboardSource(), which calls ScModule::GetClipDoc(), which proceeds to fetch the clipboard content, which means fetching it from the system clipboard if it's not owned by LO. Other LO clipboard implementations such as gtk3 or qt5 already do caching, and it seems that it's easy to do for the win32 code. Change-Id: I4696cc7488d66803fd5dd2963d27900957decdec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95163 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2020-05-29Prefer CoInitializeEx instead of CoInitialize (2)Julien Nabet1-3/+3
As https://docs.microsoft.com/fr-fr/windows/win32/api/objbase/nf-objbase-coinitialize?redirectedfrom=MSDN advised. Moreover, it'll make concurrency model explicit Change-Id: I8eaa7c0ba4e0c5131b178596cf5310df92ff41ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95093 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-24Use MsgWaitForMultipleObjects as suggested by API documentationMike Kaganski1-1/+7
WaitForMultipleObjects documentation [1] tells: If a thread creates any windows, it must process messages. Message broadcasts are sent to all windows in the system. A thread that uses a wait function with no time-out interval may cause the system to become deadlocked. Two examples of code that indirectly creates windows are DDE and the CoInitialize function. Therefore, if you have a thread that creates windows, use MsgWaitForMultipleObjects or MsgWaitForMultipleObjectsEx, rather than WaitForMultipleObjects The code calls CoInitialize, so follow the documentation advise. [1] https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitformultipleobjects Change-Id: I458234a3c99936e30e5b84224644542e980726dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94678 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-05-22Prefer CoInitializeEx instead of CoInitializeJulien Nabet3-6/+6
As https://docs.microsoft.com/fr-fr/windows/win32/api/objbase/nf-objbase-coinitialize?redirectedfrom=MSDN advised. Moreover, it'll make concurrency model explicit Change-Id: I247a49248bf45beb64a7985a7c0d078ee48efe2d Change-Id: I6e755fd516d9fb2dd2a9df0c66d9afd6070447ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94669 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-20use for-range on Sequence in d*Noel Grandin3-6/+6
and fix bug in GenericClipboard::initialize, where it was looping through the arguments, but always reading the first one. I'm guessing it was never an issue because it is always called with only one argument Change-Id: I8f72b6bce8c77a69c7d75115e34630e2c308261e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94553 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-08compact namespace in dbaccess..dtransNoel Grandin3-9/+3
Change-Id: Ie4b619dd19cc4d12d240759abea9c3ffdedd5c7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93718 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-04loplugin:nullptr (clang-cl)Stephan Bergmann1-1/+1
Change-Id: I08dedd4f7af3eff1201d60704324997bf232bb2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87888 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-03loplugin:unsignedcompare (clang-cl)Stephan Bergmann2-3/+6
Change-Id: I69cc1b352221ca053ccd0c5b78e926480a8c9ccd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87884 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-28dtrans win32: implement support for pasting when the handle type is streamMiklos Vajna1-1/+46
Steps to reproduce the problem: select an image in Word on Windows, copy, paste into Writer -> nothing happens. A workaround is to use paste special, and select the metafile paste, not the bitmap one. The root cause was that clipboard contents on Windows can have different handle types and we only supported the memory and the metafile cases. An alternative fix would be to handle this at a higher level, e.g. TransferableDataHelper::GetBitmapEx() in vcl could fall back to EMF when the bitmap formats fail, but that would not work for other applications that only offer bitmap formats with a stream handle type. Change-Id: Iccaaf33df949ee73185acbd55b61d00a12d210ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87649 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-12-31Fix a random crash on paste from clipboard on WindowsMike Kaganski1-1/+5
Happened to me while debugging Draw; the problem was that for some reason in CDOTransferable::getTransferData clipDataStream was empty at the point of call to byteStreamToAny; thus in byteStreamToOUString, dereferencing negative index happened checking for terminating null, which asserted in Sequence::operator []. I couldn't find the reason of the empty data stream; and I couldn't repro this again, so just add the check to prevent the crash. Change-Id: Id9fde9829828482803f42d6fb106b7f674e5fce7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86050 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-12-19sal_Char->char in desktop..dtransNoel Grandin7-8/+8
Change-Id: I6ad7d6acf081c16f904eb1b2506b545a88046c48 Reviewed-on: https://gerrit.libreoffice.org/85470 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-05loplugin:external (clang-cl)Stephan Bergmann3-1/+10
...plus loplugin:consttobool and loplugin:fakebool fallout Change-Id: Ie3d8121815c080b13bea6d9deca1eb138ca56138 Reviewed-on: https://gerrit.libreoffice.org/84515 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-26loplugin:consttobool (clang-cl)Stephan Bergmann2-6/+6
Change-Id: I81fea38cd737a8be74e6ece333ca37cc434a1c33 Reviewed-on: https://gerrit.libreoffice.org/83765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-24cppcheck: performing init in init list (dbaccess/desktop/dtrans/e.)Julien Nabet1-15/+11
Change-Id: I7909df04a550a4fa843a70d20b5192231c3f175e Reviewed-on: https://gerrit.libreoffice.org/83600 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-19loplugin:fakebool (clang-cl)Stephan Bergmann2-5/+5
...plus follow-up loplugin:implicitboolconversion and loplugin:redundantcast Change-Id: I9fc9c5cb46fbb50da87ff80af64cb0dfda3e5f90 Reviewed-on: https://gerrit.libreoffice.org/83207 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-11Fix typoAndrea Gelmini1-1/+1
To complete https://gerrit.libreoffice.org/82392 Change-Id: Ieff164b11c66b55280b12940a080a186ce0fba8b Reviewed-on: https://gerrit.libreoffice.org/82408 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-10-01loplugin:stringconstant (clang-cl)Stephan Bergmann6-6/+6
Change-Id: Id1a82cea4444255fdb693e126b7571a406094624 Reviewed-on: https://gerrit.libreoffice.org/79916 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-01loplugin:simplifyconstruct (clang-cl)Stephan Bergmann1-4/+4
Change-Id: I08da288a88c2bce1d4250ec77f17bd483e6bc09c Reviewed-on: https://gerrit.libreoffice.org/79911 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-20Fix typosAndrea Gelmini4-4/+4
Change-Id: Iac38284daf0196d6a7f29aaa6e2103c1d76d7cc4 Reviewed-on: https://gerrit.libreoffice.org/77755 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-16Fix typosAndrea Gelmini2-3/+3
Change-Id: I488908096aac319daf30875aee1e46b914cc4759 Reviewed-on: https://gerrit.libreoffice.org/77608 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-16Fix typosAndrea Gelmini1-1/+1
Change-Id: I207333e9bafc5d6c38ffa53a303046e437b7a815 Reviewed-on: https://gerrit.libreoffice.org/77607 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-12Fix typoAndrea Gelmini1-1/+1
"an one" Change-Id: Ic12d139acfdb32aaf0089c60609feaa653fd686b Reviewed-on: https://gerrit.libreoffice.org/77259 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): dtransStephan Bergmann1-1/+1
Change-Id: I8894c9311e2a1dfe5c18a8ec1f0f7fe36ecc79bb Reviewed-on: https://gerrit.libreoffice.org/76683 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-30Fix typoAndrea Gelmini1-3/+3
Change-Id: Ie1d5b87b4d02faac560bf64cb11a31082189e7a5 Reviewed-on: https://gerrit.libreoffice.org/72575 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-07-29Fix typoAndrea Gelmini1-1/+1
Change-Id: Ia12484339eff532112e5de4b9c95d41a61d25574 Reviewed-on: https://gerrit.libreoffice.org/72572 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-24Fix typoAndrea Gelmini1-1/+1
Change-Id: I6632893980c8f71addda60c9bf447ceca962804d Reviewed-on: https://gerrit.libreoffice.org/72691 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-19Fix typoAndrea Gelmini1-7/+7
Change-Id: Ifdb5ca9a9f7b6ee2c1549675da28af35c695e354 Reviewed-on: https://gerrit.libreoffice.org/72574 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-06-21simplify some getSupportedServiceNamesNoel Grandin2-5/+2
Change-Id: I81195505d6006b6587f7b98c1545919083f0e588 Reviewed-on: https://gerrit.libreoffice.org/74497 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-15Fix typoAndrea Gelmini1-1/+1
Change-Id: I0ce4ed9eec22de1f96a42b4b907a753478ca9805 Reviewed-on: https://gerrit.libreoffice.org/74079 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-21Fix typoAndrea Gelmini1-1/+1
Change-Id: I282902c410ab93017b3aea46f88f60c246ca9894 Reviewed-on: https://gerrit.libreoffice.org/72629 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-21Fix typoAndrea Gelmini1-2/+2
Change-Id: I828c0529ae935ed6076f8c5f2dc93df04c38d81f Reviewed-on: https://gerrit.libreoffice.org/72630 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-21Fix typoAndrea Gelmini1-1/+1
Change-Id: If3601066764ca33fd5321e318af6fee0501199e5 Reviewed-on: https://gerrit.libreoffice.org/72631 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-21Fix typoAndrea Gelmini1-1/+1
Change-Id: If25ae724fcac4bf9475eca506194593a7a5fdeab Reviewed-on: https://gerrit.libreoffice.org/72628 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-19Fix typoAndrea Gelmini1-3/+3
Change-Id: I6addc8273cbf46d047e2df4aa27dff11a8666bce Reviewed-on: https://gerrit.libreoffice.org/72569 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-19Fix typoAndrea Gelmini1-2/+2
Change-Id: I5fce4297a8172889e4a609da1f99e5e9cba371bb Reviewed-on: https://gerrit.libreoffice.org/72573 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-19Fix typoAndrea Gelmini1-2/+2
Change-Id: Ifd8b571d2331e3b11b38ee40fd2bc39de5e8d64c Reviewed-on: https://gerrit.libreoffice.org/72576 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-19Fix typoAndrea Gelmini1-7/+7
Change-Id: Ie0d2c0cde9c1fb58a63e8ef5331bdcb5126aaf28 Reviewed-on: https://gerrit.libreoffice.org/72577 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-19Fix typoAndrea Gelmini1-1/+1
Change-Id: Idc7a1e11b2d2e0e2383d742bf144e29ad0332269 Reviewed-on: https://gerrit.libreoffice.org/72540 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-19Fix typoAndrea Gelmini1-1/+1
Change-Id: I23bd7912a38845a050ef34cbd0efd17a028ef109 Reviewed-on: https://gerrit.libreoffice.org/72538 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-19Fix typoAndrea Gelmini1-1/+1
Change-Id: I931e9aaf623a1b405054df4aebe1d2e1b591f212 Reviewed-on: https://gerrit.libreoffice.org/72537 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-19Fix typoAndrea Gelmini1-2/+2
Change-Id: I57ddee21cb31c06b47eaf30010fa7378401a2f17 Reviewed-on: https://gerrit.libreoffice.org/72541 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-07Don't use resettable/clearable guard where plain guard is enoughMike Kaganski2-23/+22
Also use scope where possible. This allows to limit guard scope at language level; visualises the scope clearly; and helps avoiding errors like fixed in commit 61e4437c857854b331fa01da6f39b2b3b58a800b. Change-Id: Ifeca96e2df8e8a0897770d9546b2536806275f41 Reviewed-on: https://gerrit.libreoffice.org/70376 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>