Commit Graph

2496 Commits

Author SHA1 Message Date
49a454225e fdo#66324 fix locking in webdav_ucp::Content::getResourceType()
Crash in there while accessing an evidently deleted DAVResourceAccess
instance with about 4 other threads also in various webdav_ucp::Content
methods.

The problem is apparently that the "outer" getResourceType() passes the
m_xResAccess to the "inner" getResourceType(), which accesses it
without locking the mutex, while another thread resets m_xResAccess
and thereby deletes the current instance.

(regression from 0c3500115c4fd86284a027fc32be704afcf77061)

Change-Id: I1c67021c536e303d766c7ff93fb71e40f991f3af
2013-07-01 12:20:45 +02:00
ba0a57702c remove OUString wrap for string literals
For some functions and all kinds of Exceptions.

CannotConvertException
CloseVetoException
DisposedException
EmptyUndoStackException
ErrorCodeIOException
Exception
GridInvalidDataException
GridInvalidModelException
IOException
IllegalAccessException
IllegalArgumentException
IllegalTypeException
IndexOutOfBoundsException
NoMasterException
NoSuchElementException
NoSupportException
PropertyVetoException
RuntimeException
SAXException
ScannerException
StorageWrappedTargetException
UnsupportedFlavorException
VetoException
WrappedTargetException
ZipIOException
throwGenericSQLException
throwIllegallArgumentException

createInstance
createInstanceWithContext
forName
getByName
getPackageManager
getPropertyValue
getUnpackedValueOrDefault
getValueByName
hasPropertyByName
openKey
setName
setPropertyValue
supportsService

bash command:

for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx'
	| cut -d ':' -f1 | sort -u
	| xargs sed -i
		-e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g"
		-e "s/\($i.*\)\"+ /\1\" + /g";
done

Change-Id: Iaf8e641b0abf28c082906014f87a183517630535
Reviewed-on: https://gerrit.libreoffice.org/4624
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-06-29 21:52:54 +00:00
318f2b64cc remove some createFromAscii usage
there are a lot more of them:

git grep 'createFromAscii[^)]*"'

Change-Id: Ibc2e9cae208d8b9c91667bb3b177c6bd6d3a9424
2013-06-29 16:23:23 +02:00
e67c21ee06 Search for char instead of 1 char long string, when possible.
follow-up of a7674482254ee996b1c4fee60f3064778be369aa

Change-Id: I25f40c601454c092078307d931333af1bc1447ac
2013-06-29 09:53:41 +02:00
51daa4de4f fdo#43460 sd,rsc,ucb,sdext: use isEmpty()
Change-Id: I7a7a77c26b74078f7fc160fbaa1c8d4e912b844e
Reviewed-on: https://gerrit.libreoffice.org/4442
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2013-06-24 21:44:24 +00:00
ae57695241 Resolves: #i121947# Default User-Agent
(cherry picked from commit 339d75d9c99462d63234845031f24a42e7ffdd27)

Conflicts:
	ucb/source/ucp/webdav/DAVResourceAccess.cxx
	ucb/source/ucp/webdav/makefile.mk

Change-Id: Ie74275cfa9953fdc4fa0801224909efbcecab3a9
2013-06-23 22:48:18 +01:00
9618c76270 Fix build breaker
(cherry picked from commit 6746e3ace000264274e9f587f7223906a864c27c)

Change-Id: I66697ce020ffbd00d667556e9684bfe62ce1f38f
2013-06-16 20:01:56 +01:00
8eddae9bf7 Resolves: #i121942# Explicitly set "ContentType" for non-DAV content
(cherry picked from commit 69f5a7496ce1d06ac312a753fa7b21f45db8fd78)

Change-Id: I86c3b321725923c03e1f44bf9d9ece9ed57aeaca
2013-06-15 16:11:20 +01:00
f31d4ad929 Remove unused ContentProviderRegistrationInfo
Change-Id: Ic30cbc95b4baa4dabaa0f8f8e129aa5cf4ca5f2f
2013-06-14 12:22:40 +02:00
4d8bf09305 Always try to mount in gio::Content::getGFileInfo
...and not only if the caller happens to pass in non-null ppError.  Otherwise,
calling soffice with a document URL handled by the gio UCP that is not yet
gio-mounted would silently do nothing and exit with EXIT_SUCCESS, as the first
thing the type detection code does on the URL is execute "getPropertyValues" for
"IsDocument", which calls getGFileInfo with null ppError, so a void instead of a
boolean value is returned, which then derails the type detection code to
silently fail (which is another problem that needs fixing).

Change-Id: I48a84428cdee5caead02909abc2efd3ae3722052
2013-06-14 11:22:51 +02:00
8778882b87 Resolves: #i120738# need to call OWeakObject::release() explicitly
to make sure the week object is released correctly.

Found by: zhangjf
Patch by: zhangjf

(cherry picked from commit 1e51e5dab1664dadb40509c4fab593fb27040efd)

Conflicts:
	ucb/source/ucp/tdoc/tdoc_stgelems.cxx

Change-Id: I33d0b3b7cda2aa9a220056bf7d641b09036f89e9
2013-06-13 21:15:56 +01:00
1b8cc40601 Don't warn about undefined macro any more
Change-Id: I403cad8ce1953d2c8e8948a94a688519525bbbc4
2013-06-10 14:03:35 +02:00
9eb4e4dc51 Some more modules at least building with mingw64
Change-Id: I3ea039655aecb7885bb310b1f2c29d66f9f7bb4f
2013-06-06 19:49:56 +02:00
a1afcae81c fdo#46808, Convert XMultiServiceFactory in ucb module
Change-Id: I4e1cfe22ba6043521dd1237f90ade66f80b29253
2013-06-05 08:13:23 +02:00
dcbaf7c253 remove unused componentcontext.hxx includes
Change-Id: I598926b72c5540b472f9607e2f3df134a8c50048
2013-06-05 08:13:21 +02:00
2684858c79 fix build, bad merge
Change-Id: I153b5ac4c2c75aca055ef49920cbccf3bd7720d4
2013-06-04 11:27:18 +01:00
8de6167e36 Resolves: #i122273# - Avoid using tmpfile()
(cherry picked from commit c4ef17d5e2844ca8d2459a3bfa1f91d99ac297f2)

Conflicts:
	ucb/source/ucp/ftp/ftpcfunc.cxx
	ucb/source/ucp/ftp/ftpinpstr.cxx
	ucb/source/ucp/ftp/ftpinpstr.hxx
	ucb/source/ucp/ftp/ftpurl.cxx

Change-Id: I267a9191f9b922380bef8653ac74543662ebf3ef
2013-06-04 11:09:20 +01:00
d7904330fd Prefer prefix ++/-- operators for non-primitive types
Change-Id: I1310ac912aa2031b15851339fd84d435308350a9
2013-06-03 23:03:43 +02:00
13b60fd80a ucb: NeonLockStore::stopTicker(): really avoid deadlock
Follow up on 68ba2785c55eaa1ea70ce135bdad5322b0e04ed7, which missed the
sad fact that m_aMutex is locked recursively.

Avoid that by passing a ClearableMutexGuard to stopTicker() and
unlocking that.  Also lock m_aMutex in the destructor while at it.

Change-Id: I5ef7ef8f15e2b5c9810c5ffc64ed922ab9ad2807
2013-05-30 17:24:38 +02:00
68ba2785c5 ucb: NeonLockStore::stopTicker(): avoid deadlock
Tor reports that NeonLockStore::stopTicker() m_pTickerThread->join()
can deadlock with TickerThread running NeonLockStore::refreshLocks().

This can be avoided by copying m_pTickerThread to the stack, and
releasing the m_aMutex before calling join().

Change-Id: I387f83a530c5b893f79fa677b1092e0902c8af65
2013-05-29 23:52:12 +02:00
7056e8ef89 Resolves@ #i121926# fix malformed PROPFIND/PROPPATCH request body
(cherry picked from commit 3c83ceae5e4ff5afe20ea76aeaaae6303cdaec2d)

Conflicts:
	ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx
	ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx

Change-Id: I13dab5fb80235e2ab968a1492c05bf579ba08d40
2013-05-27 20:25:38 +01:00
3c18e25efd Header clean-up
(cherry picked from commit 9e6159be30751d0ff3af6086de0114cb769873ee)

Change-Id: I1bd046e1aca89d3dd35780338737ca4a6f207bca
2013-05-27 20:25:37 +01:00
b42211965a Resolves; #i121201# Handle servers not supporting HEAD requests
(cherry picked from commit d7085ea6fe26d2fc2ba384da04e454e78887f1f1)

Change-Id: I4b3d50906468b998a1f4964d0ad1af3d31725332
2013-05-27 20:25:37 +01:00
a86bc34ddc Resolves: #i121922# Fix wrong condition
(cherry picked from commit 19c47c4496af7db6c8e41cc218d6c8c2fe69db0e)

Change-Id: Ic3febe262cb6723a17e3ea9078137479211fbe59
2013-05-27 20:25:37 +01:00
6b562710cb Let package_ucp::ContentProvider::createPackage throw exceptions on failure
...instead of returning a null XHierarchicalNameAccess.  Otherwise, UCB's
globalTransfer from a vnd.sun.star.package URL that denotes a file that is not a
zip file to a file URL folder (i.e., to extract the zip content) silently
succeeds but just creates an empty file in the target folder.  That, in turn,
causes "unopkg add foo.oxt", where foo.oxt is a file that is not a zip file, to
silently succeed and add an "empty" extension.

This change is somewhat bold in that it changes createPackage from "can return
empty reference" to "never returns empty reference, but can throw
RuntimeException."  Especially, it considers "empty name" as a (silent)
violation of its contract with its caller now.  I hope this does not affect any
legitimate scenarios---at least, it does not break a "make check" here.  (In
turn, the two package_ucp::Content::getPackage overloads change to never return
a null reference, either.  And I changed the parameters of createPackage, seeing
that all call-sites pass in some PackageUri's getPackage()/getParam() pair.)

Change-Id: I0eab5f8059dfedefc7030da38da528ba21ea8d79
2013-05-27 18:15:33 +02:00
cdabc886f6 Revert "Rename Boost libraries when built internally to match conventions"
This reverts commit 3aeecc525c76797801e9e2b24c2ebff6ac81adac.
2013-05-24 14:46:28 +02:00
3aeecc525c Rename Boost libraries when built internally to match conventions
The standard Boost convention is for them to be called libboost_date_time and
libboost_system (with apropriate suffix then depending on type).

Did not touch the libboostthread library we build for Windows.

Add the ax_boost_thread.m4 file for completeness and possible use.

Document where the ax_boost*.m4 files come from.

Change-Id: Ib49bee71398d62c9760a1f8fd5c46be9f3400430
2013-05-24 15:03:45 +03:00
aac817bca6 Related rhbz#961460: Fix regression around OUString::compareTo usage
...originally introduced with 8da928423add3fdb94baee2a3f3fa053390f828e "Remove
RTL_CONSTASCII_(U)STRINGPARAM in ucb(ucp)," leading to "IsFolder" not being
properly set in the WebDAV UCP, leading to failure when saving documents.

Change-Id: Id2cc98582c9feffaa501a68069cd606fb420fd29
2013-05-23 17:46:23 +02:00
3a8cde7099 Fold regexpmap.tpt inline template definitions into regexpmap.hxx
Change-Id: I443367fc355a8fdea3156f85dde65cf43795f1bc
2013-05-23 17:46:23 +02:00
6a043e9c0a Use the new type-checking Reference constructor to reduce code noise
Also create a Clang compiler plugin to detect such cases.

Change-Id: I61ad1a1d6b1c017eeb51f226d2dde0e9bb7f1752
Reviewed-on: https://gerrit.libreoffice.org/4001
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2013-05-22 10:44:29 +00:00
6bf00f0f94 fix for linking
caused by my commit
863d38fbfa4fb4861e476828c46410602100919e "move DBG_UNHANDLED_EXCEPTION out of line"

Change-Id: Idfd84d987ba9151ba476ce0516a9e5fbdb2003ec
2013-05-21 13:53:21 +02:00
72e5d0c8fb Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-30 13:34:06 +01:00
6f17a2f66f Java cleanup, access static methods using correct syntax
Change-Id: I8443aef43d82de33ac7cb47d40cc5b544f7c9c87
2013-04-26 08:36:04 +02:00
cb33ae88e0 extend license filtering, and add fallback-checks.
Change-Id: Ia1ec3564326cf898d756c231a64a54db8698bf20
2013-04-24 16:21:40 +01:00
1cc9bbfd57 gbuild: drop empty use_packages calls
Change-Id: I8e9f70eb5d929c98b4379416c2259a74e31d587f
Reviewed-on: https://gerrit.libreoffice.org/3503
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-04-24 05:18:15 +00:00
c042cd05e9 gbuild: drop uses of removed packages
Change-Id: I400fad08c0ae7b6b34bad63693f54856867e4dac
Reviewed-on: https://gerrit.libreoffice.org/3502
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-04-24 05:18:03 +00:00
62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01:00
560e4fd02f fdo#62096 - Changed a few compareTo's to '=='
Change-Id: I0a0ba87ec517e5dd776ab45b232dd7f227451466
Reviewed-on: https://gerrit.libreoffice.org/3523
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-04-22 07:26:24 +00:00
9dd52eb86a use GLIB_CHECK_VERSION instead of GLIB_VERSION_X_XX
Michael Meeks pointed out that the latter can cause problems.

Change-Id: I68e7f8c6dcfae52305738b2a8cdee72e9c2c7f93
2013-04-19 17:46:28 +04:00
8d87758d65 Java cleanup, remove the rest of the unnecessary casts
Change-Id: Ia61d250f6b3711abc29569c5ece38a6f87e38daa
Reviewed-on: https://gerrit.libreoffice.org/3432
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-04-19 07:52:08 +00:00
9830fd36db date/time IDL datatypes incompatible change
- nanosecond precision
 - signed (allowed negative) year

Also: assorted improvements / bugfixes in date/time handling code.
Some factorisation of copy/pasted code.

Change-Id: I761a1b0b8731c82f19a0c37acbcf43d3c06d6cd6
2013-04-18 21:34:46 +02:00
025857d81d WaE: g_type_init has been deprecated since GLib 2.36
Change-Id: Ied9b2c2424d780d589cb1b07df0ec38107d49829
Reviewed-on: https://gerrit.libreoffice.org/3434
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-04-18 09:19:46 +00:00
ba044b1e96 remove needless forward rtl::OUString declarations
Change-Id: I97d91a758dd82d64768d75c1d2ddd279de5f6034
2013-04-07 14:23:12 +02:00
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
a07505865b Add comment the RTL_CONSTASCII_STRINGPARAM should be kept in regexp.cxx
Change-Id: I3cd2129d98c3d936d8ec31f89554b37f12427c1c
2013-04-06 16:50:34 +02:00
a808497dbb drop prefix from ::css
as css is already ::com::sun::star

Change-Id: I86b43843e4b74f990b6e05dee37184a002072d12
2013-04-02 09:01:37 +02:00
04008c2730 remove macros in ucb
Change-Id: I9921d79df1eeeb06c0163c1e61e0c845308c6ff9
2013-04-01 22:45:37 +02:00
2b7ee1db28 remove boilerplate comments
Change-Id: I44a476a9843816f70a7a4d84b8c35edeecd5daaf
2013-04-01 22:45:36 +02:00
5e649bc002 Remove RTL_CONSTASCII_(U)STRINGPARAM in ucb
and use append() instead of appendAscii()

Change-Id: I7c9dd0e03e24a39240a82fc245b4722d4c424842
2013-03-28 22:58:01 +01:00
97257aeef6 clear -Werror=write-strings in NeonUri.cxx
Change-Id: I7a67c1858b2954ca0522320b9008d70ed1afd64c
2013-03-27 22:05:38 +01:00