Commit Graph

131 Commits

Author SHA1 Message Date
Stephan Bergmann
f8ef1fe95b loplugin:staticcall
Change-Id: I6cd46964c523c9393e9d249fdb43aaa38679fa06
2014-06-13 17:54:23 +02:00
Stephan Bergmann
cc725643fd Clean up function declarations and some unused functions
Change-Id: I63c4c61847fea4500b667a5ea9f2b32207692033
2014-04-09 10:12:02 +02:00
Noel Grandin
1eee88dd6b basic: sal_Bool->bool
Change-Id: I1c084ca86c0b1308eb2fc1451ba34d2e702c6a7f
2014-04-07 13:53:50 +02:00
Takeshi Abe
dd52330db6 Avoid possible resource leaks by boost::scoped_array
Change-Id: I14e1f7ef217eb5e8e9db9f8962af868ab0a4ab81
2014-03-25 20:08:26 +09:00
Norbert Thiebaud
295bc8703f basic: remove use of sal_uIntptr in favor of more appropriate type
Change-Id: Ie878f43c7245838519fe7477b039827b079dde63
Reviewed-on: https://gerrit.libreoffice.org/8214
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-02-25 00:26:43 +00:00
Tobias Lippert
a18a1a4545 Remove vcl/settings.hxx from vcl/svapp.hxx and vcl/outdev.hxx
Added vcl/settings.hxx to all cxx files which require it.
This helps to speed up compilation after changes to the settings.

Conflicts:
	sc/source/ui/dbgui/pvlaydlg.cxx

Change-Id: I211a0735c47f72d6879f6f15339355abfe0e3cf4
Reviewed-on: https://gerrit.libreoffice.org/7933
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-20 16:22:17 +00:00
Noel Grandin
15535e32dd convert SvStream::operator>> methods to ReadXXX methods
First, I updated the clang rewriter to do the conversion.
Then I lightly hand-tweaked the output for the few places where
the rewriter messed up, mostly when dealing with calls on "this".

Change-Id: I40a6a977959cd97415c678eafc8507de8aa3b1a9
Reviewed-on: https://gerrit.libreoffice.org/7879
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-02-12 15:31:40 +00:00
Noel Grandin
d803483f6a convert more SvStream::operator<< calls
.. to more explicit SvStream::Write* calls
This was done using another run of the clang rewriter, and then
a lot of hand tweaking to fix all the places where the rewriter
did not play nice with various macros.

Change-Id: I7bcab93851c8dfb59cde6bc76290c6484d88fb18
Reviewed-on: https://gerrit.libreoffice.org/7494
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2014-01-22 22:00:39 +00:00
Andras Timar
da67f5b162 Environment variables can contain >127 characters
Change-Id: Iaeb690429d835ab2e6c13a8890a1b27b9405796a
2014-01-16 17:00:32 +01:00
Noel Grandin
b69864f3f8 re-write SvStream operator<< to non-overloaded methods
This is the actual re-write.

Use a clang rewriter to rewrite SvStream::operator<< to methods
like WriteuInt32.
Note that the rewriter is not perfect, and I hand-tweaked the output.
In particular, I had to adjust places doing things like
  (*this) << 1;

Change-Id: I5923eda3f4ebaa8b452b6ef109e726e116235a2a
Reviewed-on: https://gerrit.libreoffice.org/7342
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-01-10 13:26:24 +00:00
Tor Lillqvist
0a33e24d11 sbobjmod.hxx is private to basic
Change-Id: I4ad28b049de5f7268ee1ca2e8992e2f29ed05380
2013-12-11 10:39:57 +02:00
Stephan Bergmann
ab5d1fbfb4 SAL_WARN_UNUSED com::sun::uno::Any
Change-Id: I9058044d13f696e07667dce706f6c311af6dbea0
2013-11-14 21:02:40 +01:00
Norbert Thiebaud
8b308d510e basic: include <> for external includes
Change-Id: I4715bbe853d60ef15f20a4d2441c688003ca568e
2013-11-11 22:37:24 -06: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
Lionel Elie Mamane
b31f33bcc1 Easier conversion between Basic Date and UNO Date/Time
Utility functions to convert between Basic Date type
and the representations of Date and Time in UNO, namely:
 - com.sun.star.util.Date
 - com.sun.star.util.Time
 - com.sun.star.util.DateTime

Name of new functions:
 - CDateToUnoDate
 - CDateFromUnoDate
 - CDateToUnoTime
 - CDateFromUnoTime
 - CDateToUnoDateTime
 - CDateFromUnoDateTime

Change-Id: I2b971df20df1c0351d071023e042169b548894f1
Reviewed-on: https://gerrit.libreoffice.org/5897
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-09-11 20:40:19 +00:00
Noel Grandin
1d1825db86 fdo#46808, Convert awt::UnoControlDialog to new style
Change-Id: I9a5256c8dbacda60167403b4e26900588943a9b2
2013-05-28 08:10:22 +02:00
Stephan Bergmann
e36f83d81c Revert "fdo#46808, Convert awt::UnoControlDialogModel to new style"
This reverts commit 6c61b20a8d.  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 2e2a4827ce "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 6c61b20a8d again.

I wasn't able to revert without also reverting
be50ad28f5 "fdo#46808, Convert
awt::XUnoControlDialog to new style," as the two were tightly dependant.  Also
reverts all the follow-up fixes cb4b6dde8f
"-Werror,-Wuninitialized" (sans the const-ness fix in
UpdateHandler::insertControlModel), 697a007c61
"Fix exception specifications," 2ce6828bbb "fix
awt::UnoControlModelDialog crash," and 2e2a4827ce
"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
Noel Grandin
be50ad28f5 fdo#46808, Convert awt::XUnoControlDialog to new style
Change-Id: I40d2e2ddd92186a2ba22ebfbdda8367391e8d355
2013-05-21 08:23:59 +02:00
Thomas Arnhold
1e83da9aed some more namespace cleanup
Change-Id: Ib1e80d717f199db8f8ac4181d4377a86d88e3244
2013-04-26 18:01:51 +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
Andras Timar
a1e22bdeb4 remove unused header: tools/fsys.hxx
Change-Id: Id6ac74e88e7e57dfbee9aa70a83909c3280a58cd
2013-03-19 18:27:53 +01:00
Krisztian Pinter
cd49ebe1aa fdo#39445 writing out tools/fsys.hxx (basic)
removed unused include from runtime.cxx and step0.cxx
changed DirEntry::GetAccessDelimiter() to SAL_PATHDELIMITER in methods1.cxx
removed unused DirEntry declaration from methods1.cxx

Change-Id: I0d8c64b6498cf5b16757edaf13e1108f279934dd
Reviewed-on: https://gerrit.libreoffice.org/2848
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2013-03-19 17:23:43 +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
Markus Maier
b05dc2e391 German comment translations
Change-Id: I0d169b7cd0f47b6986063d0cc0b6697b1d575e6a
2012-11-25 16:48:01 +00:00
Eike Rathke
9955dbebbd AllSettings with LanguageTag
Change-Id: I710ae66e51139662eb442b681fdf9cc9d158551d
2012-11-22 12:34:59 +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
Norbert Thiebaud
27239ad230 basic: String -> OUString
Change-Id: I42479b4bade5111e38d69f04c889c166f340d5ba
2012-11-07 02:14:53 -06: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
Noel Grandin
8fff6bf6bd fdo#46808, Adapt i18n::LocaleCalendar UNO service to new style
Did not need to create a new interface, because XCalendar3
already covers the whole service interface.

Change-Id: Iaf094014c16e872d2003ca6e8e7588abd081d882
2012-10-29 17:32:57 +01:00
Luboš Luňák
f7a24eff2d 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: I231f0b367bf0b513c6c1ce4c4cfdb7c3dc8660d5
2012-10-12 13:34:47 +02:00
Jack Leigh
af4df7ac08 fdo#48257 collect function prototypes from basic/ into single header file
Change-Id: I1666e64b2b611054e1a713a76575e2f06781f80a
2012-10-04 10:35:48 +01:00
Takeshi Abe
cfa6f85242 sal_Bool to bool
Change-Id: Iebed1c159606ab695b049032da5a3509e468fb91
2012-09-05 10:40:17 +09:00
Takeshi Abe
911e412b87 sal_Bool to bool
Change-Id: I96fe31c80f952b1ac6d25c65431597d81e0fdda3
2012-08-24 12:58:56 +09:00
Michael Meeks
63c508e3e8 re-base on ALv2 code. Includes:
118568: switch to using ucpp
    Patch contributed by Juergen Schmidt
    http://svn.apache.org/viewvc?view=revision&revision=1209396
2012-07-18 09:29:19 +01:00
Caolán McNamara
bccf34c19a ditch String::CreateFromAscii
Change-Id: I2b482bd323ac510629c5ee31868010b7cd6ce691
2012-07-03 21:24:35 +01:00
Caolán McNamara
ba23ece286 probably the last uses of the one argument String::CreateFromAscii variant
Change-Id: I36aab317da2f69f12aaefc24895ad9eaa6b69a7c
2012-06-28 13:53:36 +01:00
Caolán McNamara
8f5629fd5a remove EraseLeadingChars and EraseTrailingChars
Change-Id: Ib9797fe97cd008cc6508ce8cec47dc5373416892
2012-06-11 14:46:46 +01:00
Caolán McNamara
e2cd6a77ea drop String::Reverse
Change-Id: Ie06635dc1f242241d48f9d6de4f592898e605bf2
2012-06-06 14:38:42 +01:00
Norbert Thiebaud
aca9239724 targeted string re-work
Change-Id: Ia651a93951da514105183775a5f49d031a192937
2012-06-02 17:57:17 -05:00
Takeshi Abe
2d7550d53f Removed unused macro 2012-03-08 00:06:25 +09:00
Michael Meeks
fe4bb3579a basic: add missing forward declarations for helper functions 2012-03-05 22:32:22 +00:00
Tor Lillqvist
b344c30ab4 Sprinkle more DISABLE_SCRIPTING ifdefs 2012-03-05 22:30:12 +02:00
Caolán McNamara
89dc836918 ByteString->rtl::OString 2012-01-30 13:18:34 +00:00
David Tardon
d54349233f remove useless misleading macros 2012-01-15 20:27:18 +01:00
Caolán McNamara
2d3203b2db make ReadUniOrByteString return a string 2012-01-06 09:52:42 +00:00
Caolán McNamara
5c24789ca3 disentangle Read/WriteByteString OUString variants
The ones which use a definite 8-bit encoding read/write pascal-style
strings with a 16bit length prefix.

The ones which use a definite 16-bit encoding read/write pascal-style
UTF-16 strings with a 32bit length prefix, i.e. not ByteStrings at all

The "I dunno" ones might be UTF-16 strings or 8-bit strings, depending
on the charset. Rename to ReadUniOrByteString like the other
similar horrors to flag this misery
2011-12-21 13:44:52 +00:00
Caolán McNamara
fffae28952 bah, need to tweak for pre c++0x
This reverts commit d00fc0e293.
2011-12-21 10:29:33 +00:00
Caolán McNamara
d00fc0e293 disentangle Read/WriteByteString OUString variants
The ones which use a definite 8-bit encoding read/write pascal-style
strings with a 16bit length prefix.

The ones which use a definite 16-bit encoding read/write pascal-style
UTF-16 strings with a 32bit length prefix, i.e. not ByteStrings at all

The "I dunno" ones might be UTF-16 strings or 8-bit strings, depending
on the charset. Rename to ReadUniOrByteString like the other
similar horrors to flag this misery
2011-12-21 10:10:58 +00:00
Olivier Hallot
91d4fe75ee Fix for fdo43460 Part III getLength to isEmpty
Part III
Module
basic
2011-12-10 21:13:58 +04:00