Commit Graph

2760 Commits

Author SHA1 Message Date
Caolán McNamara
bc56c5f881 coverity#707502 Uninitialized scalar variable
Change-Id: I38db032b2e9331170da9e8d84eaa85c894f9d8fb
2013-02-17 09:10:53 +00:00
Caolán McNamara
9a55875ef4 coverity#707496 Uninitialized scalar variable
also...
 coverity#707497 Uninitialized scalar variable

Change-Id: Ie3ac361685a52b23e088b78404ea4e013407fe2a
2013-02-17 09:10:52 +00:00
Andras Timar
c16e9f4ed9 Move SyntaxHighlighter class from svtools to comphelper
We use this class in helpcompiler, and it is not desirable to
compile svtools (thus half of LibreOffice) for a build tool
in cross-compiling environment.

Change-Id: I5e6bc3e576af41eb03c1420dd347c542306f69fa
2013-02-16 12:55:03 +01:00
Julien Nabet
2ce2fafa1b Some cppcheck cleaning
Change-Id: Idb380dbb7470dbdb371778ba0c486392cc55380e
2013-02-12 14:48:04 +01:00
Julien Nabet
fc27fec054 Fix Variable 'TimeBuffer' is not assigned a value
See http://nabble.documentfoundation.org/Cppcheck-TimeBuffer-is-not-assigned-a-value-in-basic-module-td4036591.html

Change-Id: I2d67cecf3530301d49c43bbe397c5e975b2816b0
2013-02-12 11:54:08 +01:00
Noel Power
6865445a5e fix basic access to nested uno structures fdo#60117
Although basic might appear to correctly change nested struct elements
fdo#60117 shows that basic can be fooled ( and even the watch(ed) variable
in the debugger shows the expected values ). The problem stems from the
fact that the uno object held by basic isn't infact modified when changed
via the introspection uno service.

Additionally pimp the existing tests to check the actual uno struct to see
if the changes made are *really* reflected in the object

Change-Id: Iff007e17df87148ea81e69d3567c8cf9857fdcaa
2013-02-11 12:23:38 +00:00
Noel Grandin
591ef78440 fdo#46808, Use singleton util::theMacroExpander new-style constructor
And deprecate the old-style service util::MacroExpander

Change-Id: Ifcefe31a8f8c68c6d44d6ec19616727eb607e1cd
2013-02-11 08:02:13 +02:00
Noel Grandin
bed621572c fdo#46808, Use service constructor for awt::DialogProvider
Change-Id: I5d0a3e66afeadafa6d53ff0a255d036b7e3d528d
2013-02-11 08:02:12 +02:00
Noel Power
6d0f1f6639 fix for fdo#60065
squash errors trying to gain object for rhs ( where no object yet exists (

Change-Id: I81548d1c6a32f0445dc18e31c84c3df85163ed45
2013-02-05 10:36:05 +00:00
Caolán McNamara
015a93d6b6 make basic XubString free
Change-Id: Iea5c01fe902b052a55c86ca3b879bcca12c80690
2013-01-30 10:49:35 +00:00
Noel Grandin
f95a7c2c6d fdo#46808, Convert SvNumberFormatter to use XComponentContext
Change-Id: If4e8312dae6bc5eb8bb7655cf250f06ab37b7e5c
2013-01-28 08:25:24 +02:00
Noel Grandin
49cf14a3ca fdo#46808, Adapt document::GraphicObjectResolver UNO service to new style
The services already existed, it just did not have an IDL file

Change-Id: I245f78c165dbfde11a981efd7033c5c282f4e8ad
2013-01-28 08:22:53 +02:00
Chr. Rossmanith
e3f11c10d8 Changed SetText() / GetText() to take/return OUString
replaced lots of Len() with isEmpty()

Change-Id: I6b82d48245ee2a0782e05a326f7934e9357227d0
Reviewed-on: https://gerrit.libreoffice.org/1795
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2013-01-21 20:48:35 +00:00
Jean-Noël Rouvignac
63bcb139b9 Replaced O[U]String::valueOf( static_cast<> ) with O[U]String::number()
Change-Id: I2f11f2f15a652a9edc3c7e5b67c854debeed20de
Reviewed-on: https://gerrit.libreoffice.org/1784
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-01-21 15:04:17 +00:00
Radu Ioan
d4bca924dd fdo#43157 - Clean up OSL_ASSERT, DBG_ASSERT
- Clean up OSL_
- Clean up DBG_
- Clean up OUString

Change-Id: I002d17ffbbd8371b0518ede34931b2eea30865a3
Reviewed-on: https://gerrit.libreoffice.org/1602
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
2013-01-14 08:47:52 +00:00
Christopher Copits
dbfc8777bf fdo#53521 Crash when running BASIC's "shell()" with a non-existent program
The problem is that the process handle is freed regardless of whether osl_executeProcess was successful or not. Therefore, a segmentation fault would result, as a random memory address would be freed. This patch checks whether osl_executeProcess was successful. If it was, then it frees the handle; if it wasn't successful, the memory is not freed.

Change-Id: Ic3af07be06e7af7730a3bcb1680c659a88b66af3
Reviewed-on: https://gerrit.libreoffice.org/1530
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2013-01-07 13:58:24 +00:00
Luboš Luňák
9c06700874 fix build
Change-Id: I2588b69280abbc510ee2fdc9845df56616db8b95
2013-01-03 19:06:15 +01:00
Marcos Paulo de Souza
d905daa0d0 fdo#57950: One more chained append in basic
Change-Id: I179b5bfd1d85152a53bb821ab9eeb78efb8a6083
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/1516
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-01-03 17:08:55 +00:00
Marcos Paulo de Souza
695f4a18e6 fdo#57950: Fix some chained appends in basic
Change-Id: Icac8ec992d993748a063aa95cc6f58c24fa87444
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/1515
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-01-03 17:07:41 +00:00
Marcos Paulo de Souza
c40cd8a4f2 Remove all occurences of RTL_* and ::rtl prefix from basic
This is a big commit, so thanks for your time reviewing this :)

Conflicts:
	basic/source/sbx/sbxscan.cxx

Change-Id: Ib9bc710b87475b5695764557321e5dcef25e5933
Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
2013-01-03 10:07:39 +01:00
Luboš Luňák
59074c09b8 remove use of #pragma optimize
All these are years old, guessing from some comments as old
as Windows 9x support. These workarounds do not seem to be needed now.

Change-Id: If67baa5cdefcec33b28696c764b1ed96143b7ccd
2013-01-01 22:39:15 +01:00
Julien Nabet
f52e8908a6 Some cppcheck cleaning in basic
Change-Id: I01ad0d95a94ede6998850937c58495920e7a4113
2012-12-28 18:00:02 +01:00
Christopher Copits
a8fdb0ba4d fdo#58222 The BASIC HEX Command now returns uppercase hexadecimal characters
Instead of returning lowercase characters with BASIC's HEX command, uppercase characters are now returned. Digits from 0-9 are not affected. This change utilizes on OUString's toAsciiUpperCase() method.

Change-Id: Id6ea93a7635c1913c8592bf5519bdd7391f4e3bc
Reviewed-on: https://gerrit.libreoffice.org/1428
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2012-12-27 20:33:43 +00:00
Tor Lillqvist
6943c7b11c Sigh, my git grep regexps missed some cases
Change-Id: I085f14f40fb83cba171b35b14cf7c0d99091fc00
2012-12-27 14:03:18 +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 Power
551cd20762 fix crash for fdo#58306 by avoiding literal assign
OUStringBuffer doesn't handler append ( if it had been previously assigned to "" literal )

Change-Id: Ief4379490a4873fbee4117db5833111943b86334
2012-12-19 17:40:02 +00:00
Stephan Bergmann
77d3777c89 Remove --with-stlport from LO 4.0
The STLport was only built for the benefit of old extensions on platforms that
once used it themselves (Linux x86, Solaris x86 and SPARC, Windows).  We
deliberately break such old extensions for LO 4.0 by no longer shipping that
backwards-compatiblity cludge.

Keeps STLport listed in readlicense_oo/ because of
o3tl/inc/o3tl/compat_functionality.hxx.

Also removes GXX_INCLUDE_PATH, as that was only used by STLport (if at all?).

Removes a spurious #define MOVEFILE_REPLACE_EXISTING 0x01 from
l10ntools/inc/helpmerge.hxx that was once added with
8548125848 "INTEGRATION: CWS extensionl10nfix01
(1.11.6); FILE MERGED: 2008/06/26 13:56:03 ihi 1.11.6.1: #i90987# windows rename
-> MoveFileEx" but now starts to cause trouble on Windows.  Also disables
warning C4005 about redefinition of WB_LEFT/RIGHT macros (defined in both
tools/wintypes.hxx and the Windows API) in a number of places that include
windows.h -- however the old STLport caused those warnings to not show.

Change-Id: Ie138a219fbbc86fb5aaa7ea0b88cf349935d9829
2012-12-17 16:34:23 +01:00
Noel Grandin
7470cc532f fdo#46808, Adapt reflection::ProxyFactory UNO service to new style
The service is deprecated, but we still have a handful of in-tree
users, and converting it lets me thread XComponentContext through
a bunch of classes.

Change-Id: Iffdfe537ada6b9e4a89f9b3c8dd82ca85f4bfaba
2012-11-28 13:06:18 +01:00
Markus Maier
b05dc2e391 German comment translations
Change-Id: I0d169b7cd0f47b6986063d0cc0b6697b1d575e6a
2012-11-25 16:48:01 +00:00
Eike Rathke
af60316514 some i18n wrappers with LanguageTag
Change-Id: I2ceaa3159e8669c2c569fa8559c1e061dcad399d
2012-11-23 23:09:16 +01:00
Eike Rathke
9955dbebbd AllSettings with LanguageTag
Change-Id: I710ae66e51139662eb442b681fdf9cc9d158551d
2012-11-22 12:34:59 +01:00
Tor Lillqvist
160cfb5e5e Bin the HACK() sillyness
Change-Id: Ieeebc4098404fa006d66bb8b656172a4348b1dc1
2012-11-19 21:23:27 +02:00
Norbert Thiebaud
cc63555fd0 PutEntry familly of functions use consistent pairing OUString/sal_Int32
Change-Id: I23ae9d3e8bf71ef9ece75ea013d18c36ab2e69d4
2012-11-18 19:57:23 -06:00
Norbert Thiebaud
e3e7dfa011 basic: fix OUString copy overrun in Mid()
Change-Id: I91cdd3a52917b89ab2a452e0eeb7a9e00dc35e8b
Reported-by: vmiklos@suse.cz
2012-11-18 02:50:14 -06:00
Noel Grandin
5837402fb1 fdo#46808, use service constructor for ucb::SimpleFileAccess
I upgraded the service to return XSimpleFileAccess3, since it
already implemented that interface, and it's backwards
compatible.

Change-Id: I40001a46048bd21a23b6a2f58a95376f06fc634b
2012-11-15 08:28:44 +01:00
Stephan Bergmann
fc5bb7d477 Clean up
Also, avoid global static data in sb lib, so that gengal.bin now also works well
on Mac OS X, cf. 12fa9ece66 "Avoid global static
data."

Change-Id: I23f2a7abc0c06a752ded1c1c64619b3aab009190
2012-11-14 13:32:28 +01:00
Stephan Bergmann
c3edb00e13 Report errors for invalid DateAdd/Diff/Part Add parameter values
...so that e.g.,

  DateAdd("x", 1, "1/31/2004")

(where "x" is not in the list of valid values for the Add parameter, "yyyy",
"q", "m", etc.) leads to a Basic runtime error rather than going into a
seemingly endless while(nNewMonth>nTargetMonth) loop at the end of
RTLFUNC(DateAdd) (basic/source/runtime/methods.cxx).

Change-Id: I15c3bdb62723ffddf36ff2396ffb294369d93ff8
2012-11-14 13:32:27 +01:00
Michael Stahl
af452fda33 fix more warning C4804 unsafe use of type bool
... from commit bbf1bcd9ad

Change-Id: Ic8e52f6848e09a274133f2d8fd1c4044cae4b039
2012-11-08 18:54:01 +01:00
Miklos Vajna
d6a21d8761 BasicScriptListener_Impl::firing_impl: actually this is the default
Change-Id: I0fdb522a1119da4a75094db86217449e9d940d19
2012-11-07 18:37:16 +01:00
Miklos Vajna
a166418b48 basic: fix String -> OUString conversion in BasicScriptListener_Impl
Regression from commit ac476e7884, the
second parameter of OUString::copy() is not the end position, but the
length. In practice this makes xray usable again.

Change-Id: I9f345648c851b61e2e3c581bc605af7df4c12c87
2012-11-07 18:25:14 +01:00
Michael Stahl
f0e797a351 basic: adapt dllmgr-x64.cxx to OUString changes
Change-Id: I9e5ff5be1f001a9f55953fd516fb5ef7fe94bf44
2012-11-07 12:18:39 +01:00
Tor Lillqvist
7aa973919d Fix String -> OUString fallout
Change-Id: I038848aed0c64c39ca93da89b4a78bd3a1f6d7d0
2012-11-07 11:43:02 +02:00
Norbert Thiebaud
27239ad230 basic: String -> OUString
Change-Id: I42479b4bade5111e38d69f04c889c166f340d5ba
2012-11-07 02:14:53 -06:00
Noel Grandin
d2c45d0460 fdo#46808, Adapt i18n::Transliteration UNO service to new style
Simply make the service implement XExtendedTransliteration, since all
of the implementatins already do that.

Change-Id: If03bf56a8d33931ad0230743a4603e2ae9b104ac
2012-11-05 16:43:15 +01:00
Julien Nabet
99ddd57693 Fix .Len -> getLength
Change-Id: Ibe3e97a6fa59098b9234e4aae04118abc4e37eea
2012-11-04 11:12:48 +01:00
Norbert Thiebaud
d92814f462 basic: preliminary cosmetic clean-up
parsing 1000s of line of code is hard enough without having to fight
with weird indentation and irregular formatting.

So as the review progress, in order to follow the code, cosmetic changes
were made...

In order to minimize the task of the reviewers and allow them to
concentrate on what matter, an effort is made to collect these
cosmetic changes into this separate commit.

Change-Id: I3c9b04a0150d0d0a048c2e976fe24de4f2b6b98a
2012-11-03 20:24:28 -05:00
Norbert Thiebaud
a884fe58a1 basic: OUStringification of ddectrl
Change-Id: I2af40d7c8117aff8ce62a8ea0eec579664f8bdeb
2012-11-03 20:24:27 -05:00
Norbert Thiebaud
c5b7d8f9d9 basic migration to OUString
Change-Id: I1f9403174b3779801d91ba20d846191ed9a09eed
2012-11-03 20:24:27 -05:00
Norbert Thiebaud
6702bc37d4 basic: convert StepPAD to OUString
Change-Id: I19d05f455767c973a47d0233b3af20af1ac3a20a
2012-11-03 20:24:27 -05:00
Norbert Thiebaud
8ce4050497 simplify and use OUString for StepLOADNC
Change-Id: I92c86f672cc79506c2c7c56bb3402b4436f71c98
2012-11-03 20:24:27 -05:00