summaryrefslogtreecommitdiffstats
path: root/basic
Commit message (Collapse)AuthorAgeFilesLines
* gbuild: add gb_Library_use_restargetMichael Stahl2013-09-221-2/+1
| | | | Change-Id: Ic0a2fd3c1adeb55ec27f6a2eb4709be598120fba
* convert BASIC from String to OUStringNoel Grandin2013-09-175-23/+23
| | | | Change-Id: I4b046e4c460305acad29862341092af948639215
* gbuild: remove gb_Rdb__get_final_targetMichael Stahl2013-09-121-0/+2
| | | | | | | | ... 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
* CID#736166 unlikely out of boundsCaolán McNamara2013-09-122-2/+6
| | | | Change-Id: I8a0f97be1723766df9f8fe287417365febf54966
* CID#707499 check for 0 nDimsCaolán McNamara2013-09-121-1/+1
| | | | Change-Id: I828339695db1b1880d7e884f8bf26911d04b8508
* Easier conversion between Basic Date and UNO Date/TimeLionel Elie Mamane2013-09-119-27/+235
| | | | | | | | | | | | | | | | | | | | | 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>
* janitorial: c++-style castLionel Elie Mamane2013-09-101-1/+1
| | | | Change-Id: I746eff36778e30e36b975e24c70712301c3c71cb
* s/wiki.services.openoffice.org/wiki.openoffice.org/gAndras Timar2013-09-071-1/+1
| | | | Change-Id: I059fbee385a109069c70f3869021c8e2ee48fee1
* WaE: use number() instead of valueOf()Tor Lillqvist2013-09-042-2/+2
| | | | Change-Id: Ic45dc030f76531d202a12e227130d11d3d1de805
* WaE: C4101: 'ex' : unreferenced local variableTor Lillqvist2013-09-031-1/+1
| | | | Change-Id: If56eaa48c176138cd1b74da2f7f0aa71e3845894
* GSOC work, small fixes afterGergo Mocsi2013-09-021-2/+2
| | | | | | Fixed some errors after the merge. Change-Id: I8c0360d7fd04425a00dacb37f673d10efffa0ebe
* GSOC work, multiple fixesGergo Mocsi2013-09-022-3/+4
| | | | | | | | 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
* GSOC work, autocorrect procedures+variablesGergo Mocsi2013-09-022-26/+9
| | | | | | | Fixed some small issue with the right arrow key in the ListBox. Autocorrection now correct all variable types and procedure names. Change-Id: Iff1abaf10c621aef04772837faa272bb6f987e37
* GSOC work, renaming + options fixGergo Mocsi2013-09-021-5/+5
| | | | | | | 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
* GSOC work, behavior fixesGergo Mocsi2013-09-025-2/+28
| | | | | | | | | | | | 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
* GSOC work, Extended types correctionGergo Mocsi2013-09-021-4/+1
| | | | | | | | 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
* GSOC work, renaming for consistencyGergo Mocsi2013-09-021-12/+8
| | | | | | | | | | 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
* GSOC work, ListBox appearance fix (at the borders) + code fixesGergo Mocsi2013-09-023-2/+19
| | | | | | | | | | | | | 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
* GSOC work, "autocomplete procedures" fix + new featureGergo Mocsi2013-09-022-27/+36
| | | | | | | | | 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
* GSOC work, listbox appearance fixGergo Mocsi2013-09-021-1/+1
| | | | | | | | 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
* GSOC work, nested reflection fix - againGergo Mocsi2013-09-021-4/+9
| | | | | | Fixed the issue when an invalid method was typed, listbox showed tha methods of the base variable. Change-Id: I88576645b373e76112103055d547f713af1fc153
* GSOC work, implement "Autoclose parenthesis" functionGergo Mocsi2013-09-021-1/+12
| | | | | | | 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
* GSOC work, implemented "Autoclose Double Quotes" optionGergo Mocsi2013-09-021-1/+12
| | | | | | | | 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
* GSOC work, procedure autoclose implementationGergo Mocsi2013-09-022-11/+20
| | | | | | | | | | 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
* GSOC work, disable QuickSelectionEngine+ListBox navigation modificationGergo Mocsi2013-09-021-5/+2
| | | | | | | | 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
* fix runtime error when using extended typesNoel Power2013-09-022-10/+20
| | | | | | | | 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
* GSOC work, cache implementation fix, code fixesGergo Mocsi2013-09-022-33/+76
| | | | | | | | 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
* GSOC work, ModalDialog instead of menu entryGergo Mocsi2013-09-022-8/+16
| | | | | | | | 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
* GSOC work, code complete option, menu entry fixesGergo Mocsi2013-09-024-4/+46
| | | | | | | | 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
* fix compile error, cerr not definedNoel Power2013-09-021-0/+1
| | | | Change-Id: Id33342491dd9bad0ee2f1a7bc648ed669a2b92b9
* GSOC work menu entry + code fixGergo Mocsi2013-09-022-3/+6
| | | | | | | Fixed the definition of GLOB_KEY, NOT_FOUND from const to static const. Added a new menu entry for code completition under View->Enable Code Completition. Change-Id: If8ac25ee43a7ba780ccdee2e5e909777115a1f27
* GSOC work, some code fixesGergo Mocsi2013-09-022-30/+32
| | | | | | | | | Fixed the link error: declared CodeCompleteDataCache as BASIC_DLLPUBLIC and it worked fine. Fixed sergmentation fault error in CodeCompleteWindow. The new cache implementation is fully functional. CodeCompleteWindow is now being used as boost::scoped_ptr. Change-Id: I76a0fc7407d589e7f94280fc4d50cea51b9639db
* GSOC work, code fixes + cache implementationGergo Mocsi2013-09-023-10/+85
| | | | | | | | | WARNING: cache implementation gives a link error to it's methods. Created the cache called CodeCompleteDataCache in file include/basic/codecompletecache.hxx This class should replace the std::vector< CodeCompleteData > int file baside2b.cxx When issuing command "make basic", it compiles fine, but, when "make basctl", it gives a link error (ld returned status 1) to CodeCompleteDataCache's methods. Change-Id: If78c6533b7fb5653cc459d22b80c98d097b886eb
* GSOC work Window appearance fix 2 + code fixesGergo Mocsi2013-09-022-8/+7
| | | | | | | | 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
* GSOC work week 5, some recent fixesGergo Mocsi2013-09-025-4/+39
| | | | | | 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
* GSOC work week 2, getting infromation from variables and print on terminalGergo Mocsi2013-09-025-1/+52
| | | | | | | | | | | 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
* GSOC work week 0-1, allowing BASIC to recognize UNO interfacesGergo Mocsi2013-09-022-2/+39
| | | | | | | | 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
* XubString->OUStringCaolán McNamara2013-09-021-2/+3
| | | | Change-Id: I5424a148c7173409e6e56f9483fcc769696707bc
* finish deprecation of O(U)String::valueOf()Luboš Luňák2013-08-218-18/+18
| | | | | | | Compiler plugin to replace with matching number(), boolean() or OUString ctor, ran it, few manual tweaks, mark as really deprecated. Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
* fix for fdo#62323 fix duplicated and wrong testsNoel Power2013-08-202-4/+4
| | | | Change-Id: I73dc238f7de59367a0a9d00e5421ea6675b4f556
* fix for fdo#62323 bad conversion of Hex strings for certain valuesNoel Power2013-08-205-1/+75
| | | | | | | | | 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
* Simplify iteration over SequenceStephan Bergmann2013-08-191-6/+3
| | | | Change-Id: I84b79c6cc11a5cd506e22caf294423a3c0b953f0
* Use subfolder names from <config_folders.h>Tor Lillqvist2013-08-181-1/+2
| | | | | | | | 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
* tweak comment translationsMichael Stahl2013-08-084-68/+65
| | | | | | ede5f05c fb3a1bb9 5e04331f fd6089b9 66a1d406 Change-Id: I5077ce5f6182f9193cebaaf63190450d375679dd
* do *not* silently ignore errors when saving librariesLionel Elie Mamane2013-08-021-9/+6
| | | | | | In case of error, it leads to *data* *loss*. Change-Id: I80d806ef10a3364174eced3095ebf1ea217d75b4
* fdo#67685 open xSourceLibrariesStor only when neededLionel Elie Mamane2013-08-021-15/+15
| | | | | | | | else it keeps loadLibrary from completing, because the latter cannot open the storage because it is already open in read/write mode. Change-Id: Icd0aabfff6e67af2c38a8f9185f8485b46ab1516
* Mark as constTakeshi Abe2013-08-014-10/+10
| | | | Change-Id: Idd1d0641d5b7d8594f354c7d2e2a9093ecc6b2f7
* Basic: make sure a messagebox has solarmutexLionel Elie Mamane2013-07-291-0/+3
| | | | Change-Id: Icc5f05456e4031ffbc88d6128689465f08eb5f0d
* Remove effectively unused INetURLObject OString overloadsStephan Bergmann2013-07-291-7/+4
| | | | Change-Id: Icbbe27b229d5454d27be646e00e8b362a77359b3
* targetted clean of redundant header piece from 62badf3828Michael Meeks2013-07-261-3/+0
| | | | Change-Id: Ic1240114d667fb7797afae4847427cc889f3cb48