Commit Graph

410 Commits

Author SHA1 Message Date
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
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
Markus Mohrhard
70b3006002 fix crash when importing unsupported macro content, related fdo#59374
Change-Id: I960c8174454074fd9ddb27fb17244d782c4cb24c
2014-02-12 01:01:35 +01:00
Stephan Bergmann
bd20500cf3 Simplify access to theCoreReflection singleton
Change-Id: I9901991a320b87895230a92095c9c7d3109380a6
2014-02-07 12:03:03 +01:00
Michael Stahl
6c820a2816 basic: _FIND_STATIC likely not an error in SbiExprNode::GenElement()
All other _FIND_* are explicitly not errors, and probably CWS npower10
forgot to adapt this assertion.

Change-Id: If721c275eb1bc31d76140898602b41e11c23d82e
Reviewed-on: https://gerrit.libreoffice.org/7863
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2014-02-05 10:16:09 +00:00
Herbert Dürr
a5090ccf75 Related: #i123862# use O*String's isEmpty() method...
to check for emptiness in modules starting with 'b'

Patch-by: j.nitschke@ok.de
Review-by: hdu@apache.org
(cherry picked from commit 87204b0f4062ef8fc8f138ad15f4378da609d4e2)

Conflicts:
	basctl/source/basicide/baside2.cxx
	basctl/source/basicide/bastype2.cxx
	basctl/source/basicide/localizationmgr.cxx
	basctl/source/dlged/dlgedobj.cxx
	basic/source/basmgr/basmgr.cxx
	basic/source/basmgr/vbahelper.cxx
	basic/source/classes/sbunoobj.cxx
	basic/source/comp/sbcomp.cxx
	basic/source/runtime/iosys.cxx
	basic/source/runtime/methods.cxx
	basic/source/runtime/methods1.cxx
	basic/source/runtime/step2.cxx
	basic/source/uno/namecont.cxx
	basic/source/uno/scriptcont.cxx
	binaryurp/source/bridge.cxx
	binaryurp/source/bridgefactory.cxx
	binaryurp/source/reader.cxx
	binaryurp/source/unmarshal.cxx
	bridges/source/cpp_uno/cc50_solaris_intel/except.cxx
	bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx
	bridges/source/cpp_uno/shared/vtablefactory.cxx
	bridges/source/jni_uno/jni_data.cxx

Change-Id: I37bd84e0a1d6426759dba81854faf32c88147fe1
2014-02-04 12:47:59 +00:00
Stephan Bergmann
f96f38f8f8 bool improvements
Change-Id: I571354540f1ab108c55d32c20786d34a799c3bed
2014-01-28 20:26:30 +01:00
Caolán McNamara
8cccfb8f8f coverity#441077 Dereference after null check
Change-Id: Ia6a04846068e0bc500942e9a2dc6ee2e72d9d527
2014-01-27 14:38:39 +00:00
Caolán McNamara
7acea5ae4c coverity#707649 Uninitialized scalar field
Change-Id: I1a95a051463860dc9c7b087bfaf17f3b70f297ee
2014-01-27 14:38:37 +00:00
Herbert Dürr
9e77ddcd19 Resolves: #i123817# prepare codebase for updating to boost 1.55
(cherry picked from commit c31988351c10e9f3fd783730d95da34efd52c153)

Conflicts:
	basic/source/comp/parser.cxx
	basic/source/comp/token.cxx
	dbaccess/source/ui/dlg/generalpage.cxx
	sc/source/ui/unoobj/chart2uno.cxx
	vcl/quartz/salbmp.cxx

Change-Id: Ic9580f2d4a44959cb3e38906eb4153b2c2a54899
2014-01-06 16:32:20 +00:00
Tor Lillqvist
0a33e24d11 sbobjmod.hxx is private to basic
Change-Id: I4ad28b049de5f7268ee1ca2e8992e2f29ed05380
2013-12-11 10:39:57 +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
Norbert Thiebaud
8b308d510e basic: include <> for external includes
Change-Id: I4715bbe853d60ef15f20a4d2441c688003ca568e
2013-11-11 22:37:24 -06:00
Noel Grandin
e9c4ee996d remove unnecessary use of OUString constructor in BASIC module
Change-Id: Iee86ce9200285647d5031cb2f89266a52704dd44
2013-11-11 11:21:25 +02:00
Thomas Arnhold
54a17dd246 windows: warning 4355 is disabled globally in com_MSC_defs.mk
So there is no need to do this locally, too.

Change-Id: I0fa1d0cd3e077ba0985848a9d2cbb061b123e8ad
2013-10-28 01:02:13 +01:00
Noel Grandin
8396cce9b5 clean up places accessing the NULL at the of an OUString
There were only a couple of real bugs fixed, but we're a little
bit safer now.
This also fixes the assert and the comment in OUString::operator[]
about this.

Change-Id: Ibe16b5794e0ba7ecd345fa0801586d25b015974c
2013-10-23 13:12:55 +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
Eike Rathke
66a96c8274 clean up SbiScanner::NextSym() a little, fdo#70319 follow-up
Number recognition was suboptimal and didn't properly resync scan
positions after having detected an error.

Change-Id: I278fdaaf17ed40560785deaaad0e3412a249d90a
2013-10-15 12:52:15 +02:00
Tor Lillqvist
b680e35254 Test WNT instead of the vague UNX
Change-Id: Icacdae592f05bcdcf50223d607976d687e182c96
2013-10-12 09:55:48 +03:00
Thomas Arnhold
39022b8b7d little String to OUString + documentation
Change-Id: I982e44150fd2909da0571409f16051d79377d7a3
Reviewed-on: https://gerrit.libreoffice.org/6192
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-10-10 17:58:31 +00:00
Caolán McNamara
9cff818949 CID#708773 unused pointer value
Change-Id: Ib394a444882f5ffa1e0c5e833d59f4e4985479df
2013-10-07 11:46:59 +01:00
Caolán McNamara
470af978eb CID#707648 uninitialized member
Change-Id: Ib8371710dd6c856b143782ca9c18f4ee76798f0e
2013-10-07 11:46:58 +01:00
Caolán McNamara
3c2983ded9 CID#707646 uninitialized member variables
also CID#707647

Change-Id: I9962bd2417119944a243d8a92711866548248e36
2013-10-07 11:46:58 +01:00
Caolán McNamara
ef53bd8ab2 CID#707643 uninitialized members
Change-Id: I23386c780bf484652a518d907d7dc0cc3c910040
2013-10-07 11:46:58 +01:00
Jan Holesovsky
ad7b757a25 'ist' -> 'is' here and there.
Change-Id: I0a463c38214b95582db2c7b3979367255426c14e
2013-10-04 20:27:30 +02:00
Takeshi Abe
ea1e3b77d4 sal_Bool to bool
Change-Id: I16ddbcf100e21d6c05fccbe24faca2932a605902
2013-10-02 10:00:44 +09:00
Caolán McNamara
dbff5bd4cd CID#736166 unlikely out of bounds
Change-Id: I8a0f97be1723766df9f8fe287417365febf54966
2013-09-12 13:09:05 +01:00
Tor Lillqvist
17fb3ac805 WaE: C4101: 'ex' : unreferenced local variable
Change-Id: If56eaa48c176138cd1b74da2f7f0aa71e3845894
2013-09-03 13:55:18 +03:00
Gergo Mocsi
d3ff876f3c GSOC work, small fixes after
Fixed some errors after the merge.

Change-Id: I8c0360d7fd04425a00dacb37f673d10efffa0ebe
2013-09-02 18:17:03 +02: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
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
b4319d8726 GSOC work, Extended types correction
Stucts can be autocompleted when extended types disabled.
Created two functions to make the code brighter. They extract the methods/fields from an XIdlClass and return them in a std::vector<OUString>.
I had to modify file basic/source/comp/dim.cxx, to check on UNO types when code completition is on.

Change-Id: Id93a6fe896424efb7868f6102985f59fb419b17e
2013-09-02 18:16:55 +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
Gergo Mocsi
728bc0518b GSOC work Window appearance fix 2 + code fixes
Added a function to select the first entry in the ListBox by default.
Selected entry can be inserted with the ENTER key.
Fixed some code in basic code generation class (SbiCodeGen).

Change-Id: Ia6eb43ee5661a0a3ae0b738b619f19972f019eac
2013-09-02 18:16:45 +02:00
Gergo Mocsi
5beb4be54c GSOC work week 5, some recent fixes
This week I've managed to fix the ListBox appearance. Also, I've modified the code: it gets the data on insert/remove/change, and gets updated only when the dot is pressed. This makes the data to be up-to-date. Next, I wrote a Split(OUString , char) function to do the nested reflection (It works, but it will need some tweaks later). Also, code generation is disabled for code completition (just a boolean value, maybe it could be done in a more "elegant" way, like the error supression).

Change-Id: I43d250c0a065351950ac6424dcd88266d70bcef3
2013-09-02 18:16:44 +02:00
Gergo Mocsi
025e7ff3e1 GSOC work week 2, getting infromation from variables and print on terminal
This is an early version. I use the BASIC parser to parse the source,
then the infromation is extracted from the symbol table built by parser.
Error reporting is suppressed, beacuse it is not needed fro code completition.
I placed my function inside SbModule, and created a struct called CodeCompletitionData, which holds the object's name, it's parent, and it's type name.
This function, SbMethod::GetCodeCompleteDataFromParse() is called from Basic IDE's Notify function, which updates a cache(actually, reassigns a viariable :) ).
Later, in the EditorWindow::KeyInput function there is a check wheteher dot key is pressed. After that, the actual variable (or word) is being looked up in the vector that holds code completition data. And finally, if it is found, it's methods are printed on the terminal.

Change-Id: Idaf19baa8f720b8b117a76dc3cc2f90dd04fd155
2013-09-02 18:16:42 +02:00
Gergo Mocsi
f97d794654 GSOC work week 0-1, allowing BASIC to recognize UNO interfaces
Introduced a new function calles IsUnoInterface in SbiParser to determine, if
a variable is a type of an UNO interface. It uses reflection.CoreReflection to
do that, on success it returs true otherwise false.

Change-Id: I18895127bcbd92dc7a25feb5d82a7d1343bde851
2013-09-02 18:16:42 +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
Noel Power
4c9a08e78b fix for fdo#62323 bad conversion of Hex strings for certain values
Basic hex literals are basic Integer ( e.g. 4 byte ) types with
-2,147,483,648 through 2,147,483,647 range. Interally the scanner
was using a long to form/scan the literal, this led to bad behaviour
on 64bit linux ( where normally long -> 8 bytes )

Change-Id: I1d0fcc55ed0eda636da1445329737d1684e69f33
2013-08-20 08:59:54 +01:00
Takeshi Abe
392c5b2a70 Mark as const
Change-Id: Idd1d0641d5b7d8594f354c7d2e2a9093ecc6b2f7
2013-08-01 04:33:23 +09:00
Takeshi Abe
bddd4d4598 Mark as const
Change-Id: I2746b92b1360c3c181879a81f653c44ef609f351
2013-07-22 21:03:55 +09:00
Norbert Thiebaud
6a08067902 OUString convertion for unotools
Change-Id: Ifae7f344e3827875e32afa3cda23c771f5735707
Reviewed-on: https://gerrit.libreoffice.org/4659
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-07-02 07:31:30 +00: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
Eike Rathke
caecf6102f SbiScanner::NextSym: check status after rtl_math_uStringToDouble()
For example, 10e308 is overflow, not 0 ...

Change-Id: Ib7d622865bfb73581732bda45c76e078ee7d05d0
2013-03-21 19:32:45 +01:00
Markus Mohrhard
ead0a6038b coverity#705627: fix memory leak
Change-Id: I4f73f77b27d2ed28a9f97757105c8a6cc5521b33
2013-03-09 17:59:12 +01:00
Thomas Arnhold
f5ca04caca Related to fdo#60724: correct spelling
Using the autocorrect list of LibreOffice
extras/source/autotext/lang/en-US/acor/DocumentList.xml

Change-Id: I8b93969bc0742c2e95b8b7db3c4c37691e8d3657
Script: http://pastebin.ca/2327716
2013-03-03 17:14:16 +01:00
Markus Mohrhard
1544c17ffd coverity#705626 and coverity#705627: fix memory leak
Change-Id: I68f43d07798ccb3fc3a5ab438992ac74f4cd262a
2013-02-28 06:29:35 +01:00
Thomas Arnhold
4f4e4e40f5 loplugin: improve indentation
Change-Id: Idb847766d93dc222d6c55889616da21eeac212ee
2013-02-25 17:59:40 +01:00
Norbert Thiebaud
7f561b9d66 coverity#735398 Logically dead code
Change-Id: Iadb7fbd8a1fb1c535a3ed78d4b2f7120b29aeb75
Reviewed-on: https://gerrit.libreoffice.org/2270
Reviewed-by: Tor Lillqvist <tml@iki.fi>
Tested-by: Tor Lillqvist <tml@iki.fi>
2013-02-19 21:00:00 +00:00
Julien Nabet
2ce2fafa1b Some cppcheck cleaning
Change-Id: Idb380dbb7470dbdb371778ba0c486392cc55380e
2013-02-12 14:48:04 +01:00