Commit Graph

254 Commits

Author SHA1 Message Date
Andras Timar
b55259eeb5 typo fixes
Change-Id: Ia5f104bfd707bcf4e159c78ca2764c861fb0b6d9
2013-12-20 15:55:00 +01:00
Stephan Bergmann
83e191e25d Do not use C++-UNO internal static_type functions in client code
...use cppu::UnoType instead.

Change-Id: I507914b30ef8acda910ee4ecc0589fd328eb6f31
2013-12-12 11:10:10 +01:00
Noel Grandin
610b2b94b3 remove unnecessary use of OUString constructor when assigning
change code like
   aStr = OUString("xxxx");
to
   aStr = "xxxx";

Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
2013-11-19 10:29:31 +02:00
Stephan Bergmann
24cad6a649 Move MediaDescriptor from comphelper to unotools
...so it will be able to use SvtSecurityOptions internally.

Change-Id: Id7433247e8fc53651935578510bedbcca5aa2ac9
2013-11-14 11:13:24 +01:00
Noel Grandin
d366c9b20e remove unnecessary sal_Unicode casts in various places
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
2013-11-14 08:17:32 +02:00
Michael Meeks
7e2677c029 Accelerate checking for VBA macros that are not there. 2013-11-11 16:17:30 -05:00
Noel Grandin
e2451bd729 Convert indexOf->startsWith and lastIndexOf->endsWith
This is both an optimisation and a cleanup.

This converts code like
   aStr.indexOf("XX") == 0
to
  aStr.startsWith("XX")
and converts code like
  aStr.lastIndexOf("XXX") == aStr.getLength() - 3
to
  aStr.endsWith("XXX")

Note that in general
  aStr.lastIndexOf("X") == aStr.getLength() - 1
converts to
  aStr.isEmpty() || aStr.endsWith("X")
so I used the surrounding context to determine if aStr could be empty
when modifying the code.

Change-Id: I22cb8ca7c2a4d0288b001f72adb27fd63af87669
2013-10-31 08:34:21 +02:00
Thomas Arnhold
7484da43e5 fixincludeguards.sh: vbahelper
Change-Id: Ib744fe11590c3c03b55606fa9746cd7ed522ab2f
2013-10-23 23:22:32 +02:00
Tor Lillqvist
a7724966ab Bin comments that claim to say why some header is included
They are practically always useless, often misleading or obsolete.

Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-22 16:56:28 +03:00
Caolán McNamara
faa63bb99c CID#708571 uninitialized members
Change-Id: I786b81d0982e814a9f9f8d88cb724042de7cfd81
2013-10-07 09:16:22 +01:00
Tor Lillqvist
e036d4b706 Spell "indices" correctly
Change-Id: I63b1de195bf2f3f8bfd185181f48b1520cdd849f
2013-10-02 21:57:42 +03:00
Tor Lillqvist
17f7b2798d WaE: unused variable
Change-Id: I1d7fdcdeed30288e7fff37c8a68cfe93137b5948
2013-10-02 21:17:32 +03:00
Noel Grandin
9f4c18e64c convert remains of String to vbahelper module to OUString
Change-Id: Ibbecdd1c28ba078e1031ec6185beaff05b6d8b6e
2013-10-01 10:08:44 +02:00
Andras Timar
7f436c1fd3 typo fixes in comments
Change-Id: Iaadec33715f8e0e0c6595c5e684606905274fdab
2013-09-26 11:47:45 +02:00
Luboš Luňák
64b993e046 finish deprecation of O(U)String::valueOf()
Compiler plugin to replace with matching number(), boolean() or OUString ctor,
ran it, few manual tweaks, mark as really deprecated.

Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-21 15:10:35 +02:00
Thomas Arnhold
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
Noel Power
b2d1526203 Parse workbook name correctly, don't fall over spaces etc.
Change-Id: I26213e4202ea2f2d15014ca722ab7878aa09cbf1
2013-05-09 14:11:20 +01:00
Noel Power
4d1e0ea98b support UserForm.Visible attribute
Change-Id: I6e5a9d3e7908349a76a73a79b3b1319b44e1e3aa
2013-05-09 14:11:19 +01:00
Noel Power
a7cc0faeff support Shape.Alternative
Change-Id: I6d822ef0d06e222f454c1279be16e33bcaae0037
2013-05-09 14:11:19 +01:00
Noel Power
13ee256265 tweak combox to selectively fire change or click event
we need to fire a click event if just the item in the dropdown changed and
a change event if the item we changed is really part of the list

Change-Id: I19f950fca0857761d8f59a07513803f1f3ef135b
2013-05-09 14:11:18 +01:00
Noel Power
4bad1a8e31 support api initiated change_event for combox & textbox
Change-Id: Iff51a184792e9d12accb902df1772fc07589443b
2013-05-09 14:11:18 +01:00
Noel Power
8fdd62c587 fix contrast not increment to limit value between 0.0 & 1.0
Change-Id: I1a8c08fb8f704e69ae1ae75d77784f07a1d99a12
2013-05-09 14:11:17 +01:00
Noel Power
4002ce1419 Setting TEXT causes exception, don't do it
Change-Id: Idc5614a80e6e45d12f1323ffa9843c7fa7f9576e
2013-05-09 14:11:15 +01:00
Noel Power
2743241bd2 ListBox.MultiSelection takes fmMultiSelect enum not bool
Change-Id: Ic9ea60feadc551b232b393faafea9760cc3b82f0
2013-05-09 14:11:15 +01:00
Noel Power
412ae1bf1c fix TextBox value error, MaxLength is long in vba but short in libreoffice
Change-Id: I550fe6833f240d085fadf55ab8d9421947318eef
2013-05-09 14:11:15 +01:00
Noel Power
b1dc5ed569 tweak vba Control implementation to aritificially fire events from api
Previouslly there were some internal methods to allow event handlers
to be triggered. To test some functionality from the unit tests we
now expose some of that functionality via uno.

Change-Id: I11022226260d3dacd82f42ce89413102ce34cc13
2013-05-09 14:11:14 +01:00
Noel Power
bb1ff23383 create togglebutton class ( for togglebutton on sheet )
Change-Id: If987eb6ed04d80e62b4b418e8f9de3a143ef68a7
2013-05-09 14:11:13 +01:00
Noel Power
89e1382ebf handle bool value for checkbox, radiobutton, togglebutton consistently
Change-Id: I1f9057e58fe3625e0b76a09d79c7c56e1838d98a
2013-05-09 14:11:13 +01:00
Bjoern Michaelsen
f789cdafff Revert "add missing include"
This reverts commit 6b08209ae4.
2013-04-16 21:12:23 +02:00
Bjoern Michaelsen
6b08209ae4 add missing include 2013-04-16 20:55:23 +02:00
Tor Lillqvist
2c4a7fa983 Add missing #include <rtl/tencinfo.h>
Change-Id: Ic00146442a679c39d0af4a287cbcf759826f35cd
2013-04-16 21:26:59 +03:00
Michael Stahl
0083dd24eb warning C4702: unreachable code
Change-Id: Id08a2e295d340095651daa1161efd7603947254a
2013-04-08 11:00:49 +02:00
Luboš Luňák
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
Noel Power
5b8377f80c fix selection change event firing
Change-Id: I64e8b684dd5462e1a742ba47b5480951b4e3a4c4
2013-04-05 17:15:01 +01:00
Noel Power
959d1dc0f3 fix 'Visible' property for XControlShape(s) Foreach support for CommandBars
Seems now we need to additionally set 'Visible' property for XControlShapes
to ensure correct visibility
Also we need allow 'For Each' syntax to with with CommandBar collection.
Note: the implementation of the CommandBar enumeration seems wrong, I
would have thought that it should match ( and share ) implementation
details with normal index access ( it doesn't )

Change-Id: Ia5306b4c976f6dc9a5f82e245ca5440f204f5bab
2013-04-05 17:15:01 +01:00
Noel Power
3ffd86188b Added and fixed various vba API
Added OLEObject.LinkedCell
Added ComboBox.LinkedCell
Added Validation.Type

Change-Id: I5ffc2212e689870d58ca99d1fbdfd7d101f8b50f
2013-04-05 17:15:01 +01:00
Radu Ioan
16d1424433 fdo#43157 - Clean up OSL_ASSERT, DBG_ASSERT
- replaced osl_trace with sal_info
 - added new log areas to log-area.dox

Change-Id: I20f539bd9fa62bef2e9a2a82b59e0b15f4efdd48
Reviewed-on: https://gerrit.libreoffice.org/3179
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-04-03 20:40:07 +00:00
Stephan Bergmann
aa753f01ba -Wunused-macros
Change-Id: Ifaa1637122d6f9cae1e29b77ac36ca5d1f220aed
2013-03-27 09:36:53 +01:00
Julien Nabet
2c77ef2c73 Assignment of function parameter has no effect outside the function
Change-Id: I5d869414a382e9b96ea403c645a9050372e5e39d
2013-03-08 07:44:45 +01:00
Chr. Rossmanith
ed383ebfba remove RTL_CONSTASCII_(U)STRINGPARAM
Change-Id: Ica4dc859229c2ba0dc052a97ff23178895c25580
Reviewed-on: https://gerrit.libreoffice.org/2368
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
2013-02-24 21:16:12 +00:00
Andras Timar
b37a07f2da typo: allways -> always
Change-Id: I48bd0161dd76c36eeaa39c45e9539584a4ef6841
2013-02-20 17:25:30 +01:00
Noel Grandin
4ce614f50b fdo#46808, convert some code to use getProcessComponentContext
these VBA services should be left alone, according to Noel Power.

Change-Id: Iee394f73fa99c18d6b70892bff9b0e2122f67d69
2013-01-28 08:23:11 +02:00
Noel Grandin
bb121c864c fdo#46808, Convert frame::Desktop to new style service.
I had to drop XEventBroadcaster from the merged interface
because it introduced method name conflicts (addEventListener).

Shouldn't be an issue since it was scheduled to be dropped anyhow,
and the service implementation still implements it, so existing clients
will be fine.

I dropped the interface XPropertySet from the combined IDL because nobody
seems to be using it, and it's primary purpose appears to be to set weird
flags.

I dropped the optional interfaces
   XStatusIndicatorFactory
   XDispatchInformationProvider
from the combined IDL because the service does not implement them, and
nobody seems to be using them. I suspect they were mistakenly copied
from XFrame.

I also did not convert the Title, UserDefinedAttributes and LayoutManager
properties to attributes, again because no-one is using them.

Change-Id: I678a00006ed2cca2d6c37c4e39465811442c33af
2012-12-21 10:57:09 +02:00
Noel Grandin
c1e42d60c5 fdo#46808, use service constructor for ui::WindowStateConfiguration
Change-Id: I0b7f773a7db47049d7df4138d07e7fc38c657a65
2012-12-13 05:20:58 +02:00
Caolán McNamara
d0b590fe19 callcatcher: remove unused rtf filter and associated methods
update and remove newly unused code, mostly original rtf filter

Change-Id: I2dd302851ee6fad62d79fbc81cb8a61a861396db
2012-12-10 09:28:16 +00:00
Michael Stahl
0990da105f clean up more sbxToUnoValue declarations
Change-Id: Ieff54baaff53031712f737dab84f840adb3bb09a
2012-12-04 19:56:52 +01:00
Michael Stahl
117fdb9898 convert users of XDocumentInfo to XDocumentProperties
Change-Id: I10f395f90d554d0ec26fe9f2654ae839e21c7ee5
2012-11-22 12:10:30 +01:00
Norbert Thiebaud
bbf1bcd9ad basic: String -> OUString in basicmanager
Change-Id: I6607bfe8b6bf4d29ffd01cd88a19af5e53d616b5
2012-11-03 20:24:26 -05:00
Noel Grandin
b30ee83058 fdo#46808, use service constructor for beans::Introspection
Change-Id: Ieb49277020d31779979d8eb508391d6f8b97bf94
2012-10-23 13:06:14 +02:00
Luboš Luňák
83154f9234 mark lcl_ functions static or rename them if they are not local at all
http://lists.freedesktop.org/archives/libreoffice/2012-October/039639.html

Change-Id: I37b2c7b7acd31437f4be74b0163f4dac2279655b
2012-10-12 13:34:48 +02:00