Commit Graph

1765 Commits

Author SHA1 Message Date
Andras Timar
ac6e8ac7e4 typo fixes in comments
Change-Id: Idd49478d59cd062118fbf8e99d1c8bc5250013fc
2014-02-06 23:22:30 +01:00
Alexandre Vicenzi
93ef9a43a5 fdo#54938 Convert bridges, editeng and others to cppu::supportsService
Change-Id: I7ff5189473c3e0831c2f1e95264d1a04f3b716a9
Reviewed-on: https://gerrit.libreoffice.org/7761
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Marcos Souza <marcos.souza.org@gmail.com>
Tested-by: Marcos Souza <marcos.souza.org@gmail.com>
2014-02-02 17:38:09 +00:00
Stephan Bergmann
dbac5ccaf8 bool improvements
Change-Id: I0ef2adc0bd4a4764c38094b2b7d27c3453ecc117
2014-01-28 20:26:23 +01:00
Stephan Bergmann
e3133ae237 Let C++ inline functions return bool instead of sal_Bool
...to improve diagnosing misuses of boolean expressions in client code (cf.
compilerplugins/clang/implicitboolconversion.cxx).  This change should be
transparent to client code.

Missing overloads of insert() for bool have been added to OStringBuffer and
OUStringBuffer (which required dropping one !VALID_CONVERSION check that would
now pick that overload, but would be flagged by
compilerplugins/clang/pointertobool.cxx).

Change-Id: I2d64cd923b8f47bfaa31e753def6515c29a3f8c9
2014-01-23 18:43:53 +01:00
Stephan Bergmann
9e1ec4df0b bool improvements
Change-Id: I75c137c1ed0c6089c5dfa8131ffde76cadda0134
2014-01-22 08:22:33 +01:00
Noel Grandin
82625bb98e remove unnecessary sal_Unicode casts in OUStringBuffer::append calls
Convert code like:
    buf.append( static_cast<sal_Unicode>('!') );
to:
    buf.append( '!' );

Change-Id: Iacb03a61de65a895540940953b49620677b3d051
2014-01-07 09:43:37 +02:00
Tor Lillqvist
be053c9a80 Spelling correction: s/retrive/retrieve/
Change-Id: I96845d358765e2d2507763a9b15a30388b32bc6b
2013-12-20 23:26:58 +02:00
Andras Timar
b55259eeb5 typo fixes
Change-Id: Ia5f104bfd707bcf4e159c78ca2764c861fb0b6d9
2013-12-20 15:55:00 +01:00
Stephan Bergmann
9ed364774c Adapt all (non-extension, SharedLibrary) .components to environment="..."
Change-Id: I56f38bd786f3a026cb2908f28540dc9c4003af83
2013-12-17 11:06:00 +01:00
Noel Grandin
8548abbac5 Remove unnecessary use of OUString constructor in OUStringBuffer::append calls
Convert code like
  aStrBuffer.append(OUString(" AS "));
to
  aStrBuffer.append(" AS ");

Change-Id: I8c1884b5a875f40f0b5e511b6ef38c6c8eeee656
2013-12-17 11:49:04 +02:00
Stephan Bergmann
87bc985bab Remove unnecessary macros
Change-Id: I3a975ad9975c569b10f77aeee4105dec5c4f8c5e
2013-12-12 15:10:35 +01:00
Noel Grandin
73342dbb82 remove unnecessary RTL_CONSTASCII_STRINGPARAM
A final pass through the code, converting code to use the new
OUString and OString methods that can detect string literals.

Change-Id: Ifa6382335e5650a1c67e52006b26354e0692c710
2013-11-22 08:07:19 +02: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
fcd1637d51 convert OUString compareToAscii == 0 to equalsAscii
Convert code like
   aStr.compareToAscii("XXX") == 0
to
  aStr.equalsAscii("XXX")
which is both easier to read and faster.

Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
2013-11-11 12:58:13 +02:00
Noel Grandin
e52779d2f8 remove unnecessary use of OUString constructor
Change-Id: Ifb220af71857ddacd64e8204fb6d3e4aad8eef71
2013-11-11 11:21:26 +02:00
Noel Grandin
2ac50736e4 remove unnecessary use of OUString constructor in SCRIPTING module
Change-Id: I87dd775949d1d3cc2c191e84e57b49cd66ecc750
2013-11-11 08:36:06 +02:00
Takeshi Abe
9c2ab71230 Drop unnecessary #includes
Change-Id: I9659279233067a8946a9e54be2f22439854a961e
2013-11-06 17:08:58 +09:00
Noel Grandin
aeb41c9b9b remove redundant calls to OUString constructor
Change code like this:
  aStr = OUString("xxxx");
into this:
  aStr = "xxxx";

Change-Id: I31cb92e21658d57bb9e14b65c179536eae8096f6
2013-11-04 10:11:07 +02:00
Noel Grandin
0e6a2601b3 Convert code that calls OUString::getStr()[] to use the [] operator
This also means that this code now gets bounds checked in debug builds.

Change-Id: Id777f85eaee6a737bbcb84625e6e110abe0e0f27
2013-11-04 08:06:10 +02: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
Michael Stahl
8df17a3409 gbuild: set Package default target to INSTDIR
Change-Id: I2bc45e4ba63f5faaee7389bcd9d7b3f563503186
2013-10-28 20:17:26 +01:00
Michael Stahl
8e602afd1e stop looking for Jar files in solver
Change-Id: I4d2a93fa7395354fbf2893df9e254ab39fa365af
2013-10-25 11:42:40 +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
Marcos Paulo de Souza
ee5661ecd3 fdo#54938: Adapt supportsService implementations..
to cppu::supportsService

Change-Id: I0b03d3910f094f2183bf9859db9d5bcaf35d1f14
Reviewed-on: https://gerrit.libreoffice.org/6370
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-22 10:28:10 +00:00
Samuel Mehrbrodt
88c7e97179 fdo#36964 Wording change: "Remove Filter" -> "Reset Filter"
As discussed in the bug report. I changed all occurrences, not only the one in the Calc menu.

Change-Id: Ia652cb10ec0123b0a79a719dda59e6d2f54f0680
Reviewed-on: https://gerrit.libreoffice.org/6123
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-10-18 12:03:08 +00:00
Noel Grandin
d08ef4d265 random OUString to String conversions
Change-Id: I9cfb8e7183b9cce7c690f3a43a64b61a2aa8c754
2013-10-18 09:59:31 +02:00
Tor Lillqvist
8c5b0d8193 WaE: unused variable
Change-Id: If37c7b6a5de8277ecc25538b06197cdf6168878c
2013-10-02 21:08:12 +03:00
Stephan Bergmann
3ef9fac503 -Werror,-Wunused-const-variable
Change-Id: I5e00ce258e2dc2b13dc0f7a38f5a92bd1235e81e
2013-10-02 16:49:37 +02:00
Andras Timar
7f436c1fd3 typo fixes in comments
Change-Id: Iaadec33715f8e0e0c6595c5e684606905274fdab
2013-09-26 11:47:45 +02:00
Tor Lillqvist
4c63fd10a5 Try to fix cross-compilation
Add more FOO_FOR_BUILD variables and some gb_Foo_for_build functions.

Get rid of gb_INSTROOT and gb_DEVINSTALLROOT, just use INSTROOT.

Change-Id: Iee531b02d14fae41edb68ad589a5dec829a60255
2013-09-23 00:54:43 +03:00
Michael Stahl
6667caef24 gbuild: remove gb_Rdb__get_final_target
... by replacing gb_Rdb_install with a separate constructor so the right
target can be registered at the module.  There is still an ugly special
case for the ure/services.

Change-Id: I81c004143f201aaf38daca99819888313ee24f49
2013-09-12 14:39:00 +02:00
Stephan Bergmann
5397b49f4d Towards a working instdir for Mac OS X
Introduced gb_INSTROOT, which is the same as $(INSTDIR) except for Mac OS X,
where it is $(INSTDIR)/LibreOffice.app/Contents.  Most stuff ends up there (so
most occurrences of $(INSTDIR) have been replaced with $(gb_INSTROOT)), but SDK-
related stuff goes to $(INSTDIR)/$(gb_Package_SDKDIRNAME).  (And
GeneratedPackage needed to be made more flexible, to allow for packages that go
into either of those two places.)

For Android and iOS, gb_INSTROOT probably still needs to be set.

The most obvious missing thing yet to make instdir work for Mac OS X is the
instdir/*/LibreOffice.app/Contents/ure/ vs.
instdir/*/LibreOffice.app/Contents/ure-link/ split.

Change-Id: I4478edd27b14c92c96d92d5169bdca3ec50d78f5
2013-09-11 00:50:54 +02:00
Matúš Kukan
d44759e3d7 gbuild: install rdb files directly in module they come from
Change-Id: I3a9cb4ce71cfb02b7378289a36aa0eb6e3a42f26
2013-09-09 22:09:10 +02:00
Norbert Thiebaud
d5d721a130 ENABLE_SCRIPTING_* Harmonize ENABLE_* variable to TRUE/<nothing>
Change-Id: I937967889da75062c792cf377ce4e13c67526162
Reviewed-on: https://gerrit.libreoffice.org/5702
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-08-30 19:59:02 +00:00
Rene Engelhard
83f4be4740 deb#719941: pythonscript.py: use open() instead of file()
Change-Id: Ib9f06b2b5629d149e932fe37312fdf5e8448c39f
2013-08-21 10:11:14 +02:00
Michael Stahl
5be1f5234b deb#719941: unbreak python script provider debug logging on Python 3
Don't mess with encoding in Logger.log, since sys.stdout.write()
accepts str (in python3) and both str/unicode (in python2) anyway.

Change-Id: Ib0339b7fd882a7654cc24c38efdaf67f519663ff
2013-08-20 17:18:48 +02:00
Tor Lillqvist
08452f1208 Rename SOLAR_JAVA to ENABLE_JAVA and HAVE_FEATURE_JAVA
Change-Id: Ib451bdb3c1c2ca42347abfde44651d5cf5eef4f3
2013-08-19 10:29:04 +03:00
Takeshi Abe
f4004429d3 Mark as const
Change-Id: Ic81dd60fadecf72f25792903985f2b387df7a7a0
2013-08-19 07:47:34 +09:00
Tor Lillqvist
058a3d1c46 Further work on the "Mac-like app structure" option
Lots of stuff still either ended up in the wrong place, or was looked up from
the wrong place, or both. Fix most cases.

Change-Id: I06ebbce207c219f3cd82b4387dd9b3fdb83420d4
2013-08-18 21:11:16 +03:00
Tor Lillqvist
c6a7300974 Use subfolder names from <config_folders.h>
Change all instances of hardcoded "program", "share" etc subfolder names to
use those from <config_folders.h> instead. In normal builds, the end result
will not change.

Change-Id: I91c95cd8e482818be67307e889ae6df887763f53
2013-08-18 21:11:16 +03:00
Eike Rathke
6b2aaa7d23 resolved fdo#67444 don't push_back() with already reserved size
Change-Id: I5660bdf07ad0adae053508bed1805369850c1134
2013-08-07 12:02:58 +02:00
Noel Power
92500896a9 fdo#67547 fix access to methods (getScript) of MasterScriptProvider from VB
access to libreoffice objects ( and methods/properties of those objects )
from VB all goes through the ole automation bridge. There has been a long
standing issue where the bridge falls over trying to access methods of the
scripting framework MasterScriptProvider object.

Change-Id: I3b9391286e1030bef2a12d6e546a5c47a4f68edb
2013-07-30 20:19:21 +01:00
Caolán McNamara
24078e3501 Related: fdo#66761 the double-encoding bug appears gone in python 3.3.2
i.e. I see the bug in our built-in python3 3.3.0 but not in my system python
3.3.2 and there's a raft of email related bug fixes in the 3.3.2/3.3.1
python Changelog

Change-Id: I257770cd0ec41fc3b2f2a638009b075b9a2f325f
2013-07-15 10:25:31 +01:00
Caolán McNamara
f460556bfa Related: fdo#66761 we want the bytes, not a str representation of them
Change-Id: I3c268b0c51f7e1ddd2fa6588f40412a33f316b52
2013-07-14 14:04:03 +01:00
Caolán McNamara
c4aa13c931 Resolves: fdo#66761 Macro controlled Python Mailmerge broken
Change-Id: Id8bbf06a5571534aa5eef8624e89565fe3715938
2013-07-13 15:59:35 +01:00
Herbert Dürr
3c57a9b8a4 Resolves: #i120083# make python loglevel and log output changeable...
through environment vars

Set the log level with the environment variable "PYSCRIPT_LOG_LEVEL"
"DEBUG" (for debugging)
"ERROR" (show errors only)
"NONE"  (or anything else) (for production) is the default
and the log output type with the enviroment variable "PYSCRIPT_LOG_STDOUT"
"0" (log output to user/Scripts/python/log.txt)
"1" (or anything else) (log output to stdout)

Patch by: Tsutomu Uchino <hanya.runo@gmail.com>
Review by: Herbert Durr <hdu@apache.org>

Note: Commit message edited by ASF infra team to work around a known issue with the
ASF svn install (not an issue with svn) and UTF-8 handling. This is a temporary
issue that we hope to resolve soon.
(cherry picked from commit 9dc7f72febe9d294304f70cc7b9cdeab1c67dc8b)

Change-Id: I099c8b3f812559c380078f63b692c83fdc811e33
2013-07-12 11:43:12 +01:00
Eike Rathke
38522416bd use LanguageTag::getMatchingFallback()
Change-Id: Ib6fd9581728bdd7c32ccec9ce538d9b4c5658b04
2013-07-11 17:48:14 +02:00
Eike Rathke
3f1a58884e added FIXME-BCP47 comments
Change-Id: I9e47a22f8a061461bfb0f21e74ae001e719f04b6
2013-07-10 21:48:15 +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