Commit Graph

679 Commits

Author SHA1 Message Date
Stephan Bergmann
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Alexander Wilms
6a38eace8c Remove visual noise from basic
Change-Id: I10865b94f67de39e9dbcbe71ede42aa94d81db61
Reviewed-on: https://gerrit.libreoffice.org/8234
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-25 21:09:17 +00: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
Alexander Wilms
0ce0c369aa Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23 03:38:49 +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
Stephan Bergmann
12f1faf7bf svl: sal_Bool -> bool
Change-Id: Ic31455a1f5ffffa35d4fdde901dd70734207b6f4
2014-02-20 08:17:00 +01: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
Stephan Bergmann
bd20500cf3 Simplify access to theCoreReflection singleton
Change-Id: I9901991a320b87895230a92095c9c7d3109380a6
2014-02-07 12:03:03 +01:00
Andras Timar
ac6e8ac7e4 typo fixes in comments
Change-Id: Idd49478d59cd062118fbf8e99d1c8bc5250013fc
2014-02-06 23:22:30 +01:00
Caolán McNamara
7593b006df coverity#736909 Allocation too small for type
Change-Id: I330ebdfd94d0c30b40e180e307d7543c09fd334b
2014-01-24 15:27:57 +00:00
Caolán McNamara
28793abda5 coverity#736908 Allocation too small for type
Change-Id: Ic41c5071957f5e95322971f8ec3ef864edecdb20
2014-01-24 15:26:47 +00:00
Markus Mohrhard
5f893db57d how should I fix this memory leak?? 2014-01-19 18:28:39 +01:00
Markus Mohrhard
d3b60aa648 CID#706118: possibly invalid cast 2014-01-19 18:15:49 +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
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
Tor Lillqvist
0a33e24d11 sbobjmod.hxx is private to basic
Change-Id: I4ad28b049de5f7268ee1ca2e8992e2f29ed05380
2013-12-11 10:39:57 +02:00
Tor Lillqvist
dde119c8f2 basic/global.hxx is private to basic
Change-Id: I90a28e34eb45819e240931cd751ac0a546ea6be8
2013-12-11 10:36:58 +02:00
Takeshi Abe
526a60086c Drop duplicate #include
Change-Id: I05569ef98293445916e8f48e7f06abd795fe9bb5
2013-12-08 17:20:40 +09:00
Noel Grandin
d366c9b20e remove unnecessary sal_Unicode casts in various places
Change-Id: Ibf04062ca86ed866202d748c3b62a210d30ed6ec
2013-11-14 08:17:32 +02:00
Norbert Thiebaud
8b308d510e basic: include <> for external includes
Change-Id: I4715bbe853d60ef15f20a4d2441c688003ca568e
2013-11-11 22:37:24 -06: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
e9c4ee996d remove unnecessary use of OUString constructor in BASIC module
Change-Id: Iee86ce9200285647d5031cb2f89266a52704dd44
2013-11-11 11:21:25 +02:00
Caolán McNamara
609f0b8bff add limits.h for rhel-6 build
Change-Id: I9d355be54eb4072044ad660296375fca8d0fa831
2013-11-01 08:54:20 +00: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
Tor Lillqvist
9097611359 We already have SAL_CALL that means __cdecl on Windows
Not that there should be any need to use it here; it is the default anyway.

Also the extern "C" is bogus here as far as I know; that affects only the
external name of the function, and that a function is passed to bsearch()
doesn't set any requirements on the external name of it. It could be a static
function with no global symbol name. But oh well.

Change-Id: Ia264bf2f952fd6f38aa36a25a084383d4d3f1bdc
2013-10-12 09:45:27 +03:00
Tor Lillqvist
7329fbd9c4 Bin two unused functions
Change-Id: I8362bfa0152f84a425ea3d461653d45c07816b92
2013-10-12 09:42:24 +03:00
Caolán McNamara
1ce668649b CID#738564 uninitialized member
Change-Id: I35a4d3d412b1848fe3ef8aed600471fc1c8a61d2
2013-10-07 09:16:26 +01:00
Caolán McNamara
dbd73b7097 CID#707638 uninitialized members
Change-Id: Ic0757e544e42f7ca07cddec379d2d647822d9923
2013-10-07 09:16:26 +01:00
Caolán McNamara
12b3dc2390 CID#707636 uninitialized members
Change-Id: I7eba8ac0f676a2a16dc12ed423356539aec7148b
2013-10-07 09:16:24 +01:00
Takeshi Abe
d57010faf1 sal_Bool to bool
Change-Id: Ie8e35c4342db6e2dc35fca33cee7b4d71cfcb732
2013-10-07 17:08:18 +09:00
Takeshi Abe
ea1e3b77d4 sal_Bool to bool
Change-Id: I16ddbcf100e21d6c05fccbe24faca2932a605902
2013-10-02 10:00:44 +09: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
Gergo Mocsi
755a74906e GSOC work, multiple fixes
Code completion: parser recognizes extended types ony when the checkbox is checked.
Fixed a crash caused by a misspelled uno type.
Fixed function CodeCompleteDataCache::Clear() to clear both internal variables.

Change-Id: I82fdd2e1cf749237e2e2de4a9a2fc7d07fb7eb4a
2013-09-02 18:17:01 +02:00
Gergo Mocsi
67596f4cc6 GSOC work, autocorrect procedures+variables
Fixed some small issue with the right arrow key in the ListBox.
Autocorrection now correct all variable types and procedure names.

Change-Id: Iff1abaf10c621aef04772837faa272bb6f987e37
2013-09-02 18:17:00 +02:00
Gergo Mocsi
82a4ad7a5c GSOC work, renaming + options fix
Options now work correctly: I've added the missing function.
Rename: renamed some variables and methods to kep the consistence( Autocorrect keywords -> Autocorrect).

Change-Id: I6b4914575f1a06eb3268c133b8b990364e3d24e4
2013-09-02 18:16:59 +02:00
Gergo Mocsi
9b534193a3 GSOC work, behavior fixes
Code completition: left/right arrow keys handled. Left arrow dismisses the dialog when reaches the dot. Right arrow dismissed the dialog when reaches the next line.
ListBox appearance fixed.
TAB key can insert the first matching entry.
Autocorrect:
"Autocorrect Keywords" has been renamed to "Autcorrect" (in the UI, and the config file, after this patch a make dev-install is needed). Keyword case correction is not just capitalizing the first letter ( eg. Elseif -> ElseIf ).
Autoclose procedures:
cursor is being placed inside the preocedure.

Change-Id: Ie7e9ae96b49bd94562db83f96e1c4ad63ab3f3d6
2013-09-02 18:16:58 +02:00
Gergo Mocsi
790a7aff12 GSOC work, renaming for consistency
Menu enrty was renamed to IDE Options under View.
SID_BASICIDE_CODECOMPLETE was renamed to SID_BASICIDE_IDEOPTIONS.
CodeCompleteDlg was rename to BasicIDEOptionDlg.
Ui file was renamed to basicideoptionsdialog.ui.
Checkbox for extended types is now independent from code complete one.

Change-Id: Id862df0ee56cdf2aa81e19a34099fe679ad5d311
2013-09-02 18:16:54 +02:00
Gergo Mocsi
27da1e7340 GSOC work, ListBox appearance fix (at the borders) + code fixes
ListBox appearance fixed at the borders:
a) bottom: it it placed over the current line (not under)
b) right side: listbox's right side is adjusted to the window's right side
Coed fixes:
CodeCompleteOptions now intializes itself from the configuration file BasicIDE.xcs
Added a checkbox for enabling extended types in the options dialog.
Cursor is visible when the listbox is active.
Fixed the small issue when deleting a character.

Change-Id: I68b80143de245cebfce65cdd8af37ea4694aa81b
2013-09-02 18:16:53 +02:00
Gergo Mocsi
c149c96cf4 GSOC work, "autocomplete procedures" fix + new feature
Fixed the procedure autoclose function. Now, autoclose is based on the syntax higlighter: if finds an opening token, starts searching forward to a close token.
If there is another sub/function keyword, or EOF is reached, the procedure is considered incomplete.
If the end token is found, the procedure is considered to be closed.
Added function autocorrect symbol spelling, wich corrects the ascii case of the keywords, and corrects the spelling of the extended types.

Change-Id: Ibd17f319a6d6ff5c3f91f4adb7a10dc701f0468a
2013-09-02 18:16:52 +02:00
Gergo Mocsi
92374fb966 GSOC work, listbox appearance fix
Fixed the listbox appearance even the source file is scrolled.
When scrolling, and the listbox is visible, it gets hidden.
I've set the Code Completition to defaultly true, to make testing easier.

Change-Id: If571a4f1d38751b35fd43ab3c1f13daccd9dd375
2013-09-02 18:16:51 +02:00
Gergo Mocsi
59055f24cb GSOC work, nested reflection fix - again
Fixed the issue when an invalid method was typed, listbox showed tha methods of the base variable.

Change-Id: I88576645b373e76112103055d547f713af1fc153
2013-09-02 18:16:51 +02:00
Gergo Mocsi
412e91d33d GSOC work, implement "Autoclose parenthesis" function
Autoclosing parenthesis function is working. Implementation is similar to autoclosing double quotes, except that this one does not need the HighlighPortion struct to use.
Renamed the checkbox title to "Autoclose parenthesis".

Change-Id: I4311cd8020f0dc0b62a2d8707e0eccbf57e0d2c2
2013-09-02 18:16:50 +02:00
Gergo Mocsi
40433e2ca9 GSOC work, implemented "Autoclose Double Quotes" option
Feature autoclosing double quotes (strings) implemented.
When the user presses the '"' key, it's pair is also being inserted (only when the previous character is also a '"'), and the cursor is being placed inside the two quotes.
Also, if the there was a string (like: "aaa""), the second one is not inserted.

Change-Id: I3e4a5e426d2d4bdbf56899fe3e36359ae161b52a
2013-09-02 18:16:49 +02:00
Gergo Mocsi
9a7b942a0a GSOC work, procedure autoclose implementation
Now, function procedure autoclose is working.
Created a struct named IncompleteProcData to store the line number, type and name of the inclomplete procedure. Procedures are store in a vector (IncompleteProcedures), and are as a member in SbModule.
I've created a function called SbModule::GetIncompleteProcedures() to extract the data. Data extraction uses SbModule::SetSource32, beacuse that one tokenizes sthe source file, and recognizes procedures.
Closing procedures is triggered ky pressing the Enter key when typing. It checks the actual sub, and if it's incomplete, adds the correct ending( End Sub/End Function).
There is only one problem: function SbModule::SetSource32 is not too often calle, maybe extraction should be done by a timer.

Change-Id: Id88daaef329e8b5c194b765c5261d356bfb3a0c9
2013-09-02 18:16:49 +02:00
Gergo Mocsi
d5aa9c3b23 GSOC work, disable QuickSelectionEngine+ListBox navigation modification
Added a function to disable QuickSelectionEngine in ListBox, beacuse it's not needed.
ListBox navigation changed: it is not hiding/showing entries, instead of it, jumps to the longest match without filtering.
Arrow behavior remains the same.

Change-Id: I8982c280f20929c74f9630cbaa95010820d2e234
2013-09-02 18:16:49 +02:00
Noel Power
e70a436fe3 fix runtime error when using extended types
note: using VBA objects with the code completion is not possible at
the moment. Unfortunately there is some hard coded hacks for flattening
the namespace used by checkUnoObject.

Change-Id: Ic3a3149f41a6959943e71fa7ac22ff4dab7f30a1
2013-09-02 18:16:48 +02:00
Gergo Mocsi
edcec5b1be GSOC work, cache implementation fix, code fixes
The CodeCompleteDataCache got a new implementation: global variables are stored separately.
The "static const" OUString-s were removed from the class.
Data extraction is only done when pressing the dot key.

Change-Id: I3ff94c0c6eabe328761336d4c74744eb7efc6056
2013-09-02 18:16:48 +02:00
Gergo Mocsi
70ab744ccf GSOC work, ModalDialog instead of menu entry
Created a ModalDialog named CodeCompleteOptionsDlg to edit options for code completition/suggestion.
Unimplemented features in it are disabled.
The dialog window uses Glade .ui file.

Change-Id: I1b59f386a9575aa25b38c5a1d7d1f020498a69ab
2013-09-02 18:16:48 +02:00
Gergo Mocsi
61ee2598b1 GSOC work, code complete option, menu entry fixes
Menu entry is added under View->Enable Code Completition when in Experimental mode.
Fixed the call of funtion SbModule::GetCodeCompleteDataFromParse() to be called only when code completition is enabled.
Replaced the occurences of SvtMiscOptions to CodeCompleteOptions.

Change-Id: If0520123ab5f612d7d24fb98f8e9bf6881af76cb
2013-09-02 18:16:47 +02:00
Noel Power
b0b511e9b5 fix compile error, cerr not defined
Change-Id: Id33342491dd9bad0ee2f1a7bc648ed669a2b92b9
2013-09-02 18:16:47 +02:00