Commit Graph

10168 Commits

Author SHA1 Message Date
710f41b7ae Clean String and sal_Bool in tools
Change-Id: I6a92196f33d7a5278c7dcc426112e9c56d582655
Reviewed-on: https://gerrit.libreoffice.org/4627
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-06-30 04:58:49 +00: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
4296394d5c remove pointless external guards for standard headers
Change-Id: I509984a6029b6a86fd1ee3f947394af9cdf71c6a
2013-06-28 18:10:16 +02:00
5cb2e3104b remove toolkit/unohlp.hxx hack
Change-Id: Idb9971d848870f4d00dbf77e80e48bf7dfde8913
Reviewed-on: https://gerrit.libreoffice.org/4601
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-06-28 11:49:28 +00:00
7a61efe422 add missing VclBuilder::stringmap argument to some builder functions
Change-Id: I57e13920b4707ebe5b6a7149dbdbfc45593c0d9d
2013-06-27 16:45:11 +01:00
53ef9fa167 Remove dbaui::OStatusbarController
It actually does not override any method in svt::StatusbarController, so there
is no point in keeping it

(cherry picked from commit 83bf5a7b85a0e3430cc807415e081a10a1775f9f)

Conflicts:
	dbaccess/source/ui/control/makefile.mk
	dbaccess/source/ui/control/statusbarontroller.cxx
	dbaccess/source/ui/inc/statusbarontroller.hxx

Change-Id: Id6adc11c3a54f642ebdec9c6016996134908da71
2013-06-24 11:25:34 +01:00
9a95669e50 fdo#43460 dbaccess: use isEmpty()
Change-Id: Ie27a81f4e59c48ef5aa03fb82ab38e920c0646a1
Reviewed-on: https://gerrit.libreoffice.org/4321
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-17 19:45:38 +00:00
00eafaa949 fix limit bug: selecting "All" has no effect to sql
LimitBox set its value to -1 if the current
text is "All" but just when it loses its focus
so dispatching its value to the controller
 must be after this setting.
(see limitboxcontroller.cxx)

Plus some clean up in LimitBox.cxx

Change-Id: Ic1d314a5a67c2b261b2e9c50973f51de2bfb8db8
2013-06-14 09:45:38 +02:00
90e1606659 mingw64: long -> sal_IntPtr in dbaccess
Change-Id: Ic9e049b6b79a8ae3777d8b2a6e918289445c21da
2013-06-10 14:03:37 +02:00
dd9dba52f3 typos
Change-Id: I3ebe1c03be3b7e84666ca6a19442c376f21a5491
2013-06-07 20:30:40 +02:00
a5b8cc67c4 cppcheck: reduce scope
Change-Id: Ia83fb8615dbe937b4b4478fd7bf128780f8c5289
2013-06-07 00:15:16 +02:00
c5b4e516df cppcheck: reduce scope
Change-Id: Ie1eab551a2d5dce21b55226b17d62d9a78c1ffdd
2013-06-07 00:13:27 +02:00
f62cb42d06 cppcheck: fix reassign
Change-Id: Ic1f02c6734cbb0ac4846f0003f70091d5d5b4315
2013-06-07 00:05:58 +02:00
e6edfb6324 cppcheck: unread variable
Change-Id: I809cdbeb71bf4cf014e6d578f35c8a646a5c937e
2013-06-06 23:53:52 +02:00
a4c3dc5595 Fix previous fix
Change-Id: I2d7ea38b743d78327fd19886019c1106bc1316d6
2013-06-06 17:26:26 +02:00
fb835e0e8a -Werror=sign-compare
(ListBox::GetSelectEntryPos returns sal_uInt16)

Change-Id: Ia6e4bf4354523f5112ee3ade1d3da6db0f9ab2c4
2013-06-06 17:21:27 +02:00
b6a91e6d30 Prevent out-of-range values coming from ListBox GetSelectEntryPos.
Change-Id: Ia787c412408ef53db3c8458f54c7843c669c81ad
Reviewed-on: https://gerrit.libreoffice.org/4174
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2013-06-06 14:58:57 +00:00
5d81b207e8 fdo#64447 when changing setup mode, trigger changed DatasourceType event
Change-Id: I961118331f534de103b83766a2c21a6bec479241
2013-06-05 10:29:27 +02:00
95c0d568fd use uno::Reference#clear() method...
...instead of assigning an empty value. Reduces code noise.

Change-Id: Ic95b081a41fb740a738c92b3407a9514ccb8b06e
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
d209e13319 fdo#46808, Convert comphelper::ComponentContext in forms module
Change-Id: I8a9913d964633381f00c0a4885cc655805fa1974
2013-06-03 10:00:03 +02:00
7eac309499 dbaccess: unused variable
Change-Id: I4bd8863bac0f5b4a5ff1936a9d6a240dbc40be72
2013-05-31 19:13:08 +02:00
51c18e8e80 dbaccess: this can happen, that's why we check for it
Change-Id: Icc85dde5cc53a6880ac83d687bad498ab984c4cf
2013-05-30 09:33:02 +02:00
73a809cba8 Bug 64984 - EDITING: Creating table with GUI - table could not be saved
This bug was introduced by my commit
002aab309055b7feeeeeb25c1835b6abe6646729
"fdo#46808, convert sdb::tools::ConnectionTools to new style"

Change-Id: Ib10f97bbe46d20db663047d2f35ec4850df839fa
2013-05-30 08:19:45 +02:00
e36f83d81c Revert "fdo#46808, Convert awt::UnoControlDialogModel to new style"
This reverts commit 6c61b20a8d4a6dcac28801cde82a211fb7e30654.  As discussed at
<http://lists.freedesktop.org/archives/libreoffice/2013-May/052449.html> "Re:
fdo#46808, Convert awt::UnoControlDialogModel to new style problem" why the odd
change in 2e2a4827ce6708f0e8677dba9cc92e1479a44086 "scripting: get
CreateUnoDialog() work again" appears to fix things again:

  The problem is that the implementation of the css.awt.UnoControlDialogModel
  involves UNO aggregation
  (IMPL_CREATE_INSTANCE_WITH_GEOMETRY(UnoControlDialogModel) in
  toolkit/soruce/helper/registerservices.cxx creating a
  OGeometryControlModel<UnoControlDialogModel> instance that aggregates a
  UnoControlDialogModel instance).  That means that queryInterface can return a
  reference to something that is technically a different object, and that's
  what's happening here, and explains why calling setPropertyValue in two
  different ways on what logically appears to be a single object can end up
  calling two different implementations (of two different physical objects).
  (UNO aggregation is known to be broken and should not be used.  Nevertheless,
  there's still code that does---code that is a horrible mess and hard to clean
  up.)

  That all this worked as intended in the past is just sheer luck, but any
  way of substantially touching it is asking for trouble.  I'm going to
  revert 6c61b20a8d4a6dcac28801cde82a211fb7e30654 again.

I wasn't able to revert without also reverting
be50ad28f5bbdaeff527f646481ce263843c2401 "fdo#46808, Convert
awt::XUnoControlDialog to new style," as the two were tightly dependant.  Also
reverts all the follow-up fixes cb4b6dde8fda2a5848e11063028bf44d72f85431
"-Werror,-Wuninitialized" (sans the const-ness fix in
UpdateHandler::insertControlModel), 697a007c61b9cabceb9767fad87cd5822b300452
"Fix exception specifications," 2ce6828bbbf6ba181bb2276adeec279e74151ef6 "fix
awt::UnoControlModelDialog crash," and 2e2a4827ce6708f0e8677dba9cc92e1479a44086
"scripting: get CreateUnoDialog() work again."

Conflicts:
	basctl/source/dlged/dlged.cxx
	filter/source/t602/t602filter.cxx
	xmlscript/test/imexp.cxx

Change-Id: I5d133468062f3ca36300db52fbd699be1ac72998
2013-05-25 11:45:47 +02:00
6cf3094075 WaE: implicit conversion of NULL constant to nullptr_t
Change-Id: I2eefbca1ef986219f04504cba4ca09a22972e8cb
2013-05-24 12:40:46 +03:00
d586255881 Resolves: #i120859# Advance the wizard when Socket edit field has text
(cherry picked from commit a9c651aa7f7a05049229c0169e439dccde3b4d51)

Change-Id: Ia027dc549e3157eeb7b1d924550ed89122ae1a23
2013-05-23 15:19:10 +01: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
13df1b95e8 allow to create new database using the wizard again (fdo#62937)
To be honest, I do not userstand the code much. Julien pointed out that
the setParentTitle and onTypeSelected were newer called. The condition
looked like an optimisation and it helped to remove it.

It would be great to put it back. It might be enough to hand the
intial values.

Change-Id: Id06cc9c63a9e578cb3c698c8526851fec71ef9da
2013-05-21 10:59:11 +02:00
6c61b20a8d fdo#46808, Convert awt::UnoControlDialogModel to new style
Change-Id: I4b912034ef3f4855b87d6d6f18ff13bd1ecc8f72
2013-05-21 08:23:58 +02:00
cd2f2e772c make OSingleSelectQueryComposer use *system* parse context
and pass it to the parser and PredicateInput constructors.
This makes the whole story consistent; before system locale settings were already manually passed to parseNodeToPredicateStr, which led to some things being parsed as en_US and others as system locale.

Change-Id: Ib9571b10d79183571e8ab3f79660b41594dc2d1c
2013-05-19 14:05:18 +02:00
cb6d67c21f Spelling "separate" (etc) correctly is hard 2013-05-15 11:14:28 +03:00
11fd73acce SolarMutex does not belong into the URE interface
...so move it from osl/mutex.hxx to its own comphelper/solarmutex.hxx.  It looks
like a newbie mistake that 59e7685d8d812ee8773f57475cbe3aa2a0bdfc81 "Create an
abstract interface to be used to implement a SolarMutex" put it here in the
first place.

I do not consider this an incompatible change really, as no external URE client
code should have used SolarMutex anyway.

(Also included some clean up, like removing unused
{Clearable,Resettable}SolarGuard, and spelling out SolarGuard in the few places
it is used.)

Change-Id: I121ffb5b7cefbc19e88b5405e5a85ffc895be852
2013-05-14 14:41:54 +02:00
3abe867790 fdo#46808, fix call to sdb::tools::ConnectionTools
In my previous conversion to new style I forgot to pass arguments
into the service constructor.

Change-Id: Ibbf750315b3e62869b1eb4c520808327002f2dcc
2013-05-14 09:12:06 +02:00
bd27671c0c Initialise the default-constructed ConnectionTools
Regression from the "convert to new style", which led to ignoring aArguments

Change-Id: I09477578f77b253b8c6435d52e1e636d2e212023
2013-05-14 08:05:13 +02:00
e13bd0cfc7 Fix possible inefficient checking for variables emptiness
Change-Id: I95a6784d5448b63b0cdde436484915692f8633be
2013-05-12 11:57:38 +02:00
2fd73a725f Potty mouth
Change-Id: I276fa2fa24b5553a748e6e628129d54419e69c9a
Reviewed-on: https://gerrit.libreoffice.org/3843
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-05-10 13:11:30 +00:00
9a7603187e dbaccess: remove Package_inc
Change-Id: I8e6748eef04f25603851a33d049cb9585fa04cc6
2013-05-07 01:41:23 +02:00
2ce25faffd fix typos (wich instead of which) 2013-05-06 20:07:23 +02:00
e2e2cc6114 remove usage of RTL_CONSTASCII_USTRINGPARAM
Mechanical removal of usage together with OUString ctor, done
by compiler plugin.

Change-Id: I554227f76df0dac620b1b46fca32516f78b462c5
2013-05-06 16:51:45 +02:00
26bda9f4a8 convert message box return types to an enum
Change-Id: I20889dc94aac1119c1ee9da873ce911887c1c335
2013-05-01 14:42:04 +01:00
1981819e81 fdo#63391 deadlock on opening .odb file that auto-connects to the database
Let foo.odb be a database file that has a macro that connects to the
Database on "Open Document" event (and needs to prompt user for
user/password).

There was a race condition between two actions:

 1) the asynchronous treatment of "OnFirstControllerConnected" in dbaui::OApplicationController,
    which tries to get dbaui::OApplicationController's mutex

 2) the StarBasic macro calling dbaui::OApplicationController::connect
    which needs to display a dialog (to get username and password),
    and thus puts that dialog in the main thread's event queue
    and waits for it ... with dbaui::OApplicationController's mutex held

Now, if "1)" is before "2)" in the event queue of the the main thread,
*but* "1)" is executed *after* "2)" has taken the lock, there is a deadlock.

Fix:

 1) Make OnFirstControllerConnected synchronous.
    Make sure (by taking mutex in dbaui::OApplicationController::attachFrame, its ancestor in the call graph)
    that nothing else will happen with the OApplicationController as long as it is not finished.
    ---> it does not need to take mutex itself anymore

    This avoids the "order in the asynchronous events" dependency.

 2) Change dbaui::OApplicationController::ensureConnection to do the user prompting
    WITHOUT HOLDING the mutex, and use the mutex "only" to protect actually assigning
    the connection to m_xDataSourceConnection.

    Theoretically, in some race condition, we could connect twice and then discard one connection <shrug>.
    ensureConnection will never return the discarded connection, though.

    (I think I got that right with respect to http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html)

    This keeps it from locking on another condition while holding the mutex.

Change-Id: Iab1bbec5d5df12bb89d027d43e498c78c92ffc32
Reviewed-on: https://gerrit.libreoffice.org/3310
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-04-29 12:58:23 +00:00
a0b720c9fc remove never-generated "predicate_check" entry
Change-Id: Ib3957fbadf6bfebfaabd5bef09aaf7ab21862cd6
2013-04-26 16:49:50 +02:00
1bc4a49d9b QueryDesign: in criteria, remove column_ref when table *and* column name match
As opposed to only the column name

Change-Id: I261d13f23214f950daa55a5b63cd486e59a0e127
2013-04-26 16:49:48 +02:00
fae7a3d060 String -> OUString
Change-Id: Ibf566a11a383b77a930d46967e496752c88b39e4
2013-04-26 16:49:47 +02:00
5907bb462d Fix compilation error when OSL_DEBUG_LEVEL > 0
Just use SAL_WARN, building up the message using chained << operators instead
of constructing it into a OStringBuffer (or OUStringBuffer) and then passing
that to OSL_FAIL.

Or should we have a real assert() here?

Change-Id: I2c3f64ff2b29a3d81ba444d98c2a38ef49e6d7af
2013-04-25 13:53:54 +03:00
e894e57aab dbaccess: {DECLARE,IMPLEMENT}_CONSTASCII_USTRING are no longer needed
Change-Id: Id404f8f3a5bdbf32c207ee81c6f6be9c9d328679
2013-04-25 11:02:34 +02:00
73adc9b6e2 fdo#46808, Convert form::ControlFontDialog to new style
Change-Id: I83487cddbd6b3fce1fdcdfa48623b63a0e026d90
2013-04-25 08:56:38 +02:00
da0e902ab4 fdo#46808, convert svx::DbGridControl to XComponentContext 2013-04-23 16:05:56 +02:00