Commit Graph

55 Commits

Author SHA1 Message Date
michael
bf3e437dd6 * Fix bug #33475, add AddPair for Delphi compatibility, modified patch by Silvio Clecio
git-svn-id: trunk@38587 -
2018-03-21 10:30:02 +00:00
michael
cbc50c5fe6 * Restore signature of loadfromstream/loadfromfile, make default delphi compatible
git-svn-id: trunk@37965 -
2018-01-14 10:11:56 +00:00
michael
5c1df42fa4 * Fix bug #32871
git-svn-id: trunk@37962 -
2018-01-13 18:21:44 +00:00
michael
f0a8355b84 * AlwaysQuote added (bug ID 31126)
git-svn-id: trunk@35333 -
2017-01-25 22:37:33 +00:00
michael
32ec90dccf * Fix wrong index check for insert, border is different
git-svn-id: trunk@34834 -
2016-11-07 13:39:56 +00:00
michael
9926d37dda * Fix bug #30869, introduce CheckIndex in TStringList
git-svn-id: trunk@34817 -
2016-11-06 17:04:37 +00:00
michael
8318ba30d4 * Patch from Ondrej Pokorny to implement specifying encoding when saving/loading from stream
git-svn-id: trunk@34475 -
2016-09-10 10:59:48 +00:00
michael
10bbfce412 * Allow Find to work with user-sorted stringlists.
git-svn-id: trunk@33328 -
2016-03-26 09:13:27 +00:00
michael
ae3b0eab2a * Fix stringlist addstrings so virtual method is preserved (bug id 0029630)
git-svn-id: trunk@33099 -
2016-02-16 18:59:01 +00:00
michael
db19d73ec0 * Add ClearFirst parameter to AddStrings (bug ID 29630)
git-svn-id: trunk@33092 -
2016-02-13 11:03:51 +00:00
michael
4f82d103af * Added SkipLastLineBreak to TStrings (bug ID 28213)
git-svn-id: trunk@32792 -
2015-12-29 18:48:58 +00:00
michael
0042e1d3b8 * Fix bug #29150
git-svn-id: trunk@32765 -
2015-12-27 17:07:31 +00:00
marco
5dcf5a95c5 * move beginupdate before try 3x , Mantis #29164
git-svn-id: trunk@32630 -
2015-12-10 19:21:16 +00:00
marco
aa33a9509f * added try..finally to beginupdate/endupdate, mantis #29165
git-svn-id: trunk@32629 -
2015-12-10 19:19:25 +00:00
michael
7d2c723a54 * Re-instated initialization of memory when adding item
git-svn-id: trunk@32332 -
2015-11-15 18:24:12 +00:00
michael
d00d64021b * Clear memory correctly when setting capacity (bug id 28928)
git-svn-id: trunk@32327 -
2015-11-15 11:15:25 +00:00
michael
aa3a7b7eb8 * Exit find if not sorted (bug id 28774)
git-svn-id: trunk@31941 -
2015-10-04 08:07:51 +00:00
yury
e1a0b1204a * Removed unused vars in RTL.
git-svn-id: trunk@31750 -
2015-09-17 16:48:53 +00:00
michael
e5fba07668 * Fix bug #0028486
git-svn-id: trunk@31299 -
2015-08-07 12:00:40 +00:00
michael
0304b5f1e9 * Copy LineBreak during TStrings.Assign
git-svn-id: trunk@30302 -
2015-03-24 08:47:49 +00:00
michael
063d7f1ce2 * Overloaded version of TStrings.Add that accepts Fmt,Args
git-svn-id: trunk@30301 -
2015-03-24 08:47:14 +00:00
michael
e3111faa2e * Implemented LineBreak property for TStrings
git-svn-id: trunk@30300 -
2015-03-24 08:38:52 +00:00
michael
beafc9fe8c * Fix bug #26717
git-svn-id: trunk@28659 -
2014-09-14 15:06:34 +00:00
michael
1d9ac3aa9e * Fixed bug #26053
git-svn-id: trunk@27770 -
2014-05-11 13:28:00 +00:00
michael
098769d1b3 * Added TStringList.CompareStrings (Delphi compatibility), patch by Stephano, bug ID #24981
git-svn-id: trunk@25582 -
2013-09-26 18:09:12 +00:00
nickysn
e54c87dab1 * changed a method address typecast to CodePointer instead of Pointer in TStringList.QuickSort for compatibility with the i8086 medium and compact memory models
git-svn-id: trunk@25486 -
2013-09-14 13:52:41 +00:00
svenbarth
08543ddeba Fix for Mantis #23899 . Allow to overwrite TStringList.ExchangeItems if necessary.
rtl/objpas/classes/classesh.inc, TStringList:
  * rename the private ExchangeItems to ExchangeItemsInt and allow inlining
  + add a protected virtual ExchangeItems
rtl/objpas/classes/stringl.inc, TStringList:
  * Exchange: call ExchangeItemsInt
  + let default implementation of ExchangeItems simply call ExchangeItemsInt
  * QuickSort: call ExchangeItemsInt directly if there is no override otherwise call ExchangeItems

+ added test

git-svn-id: trunk@25480 -
2013-09-13 14:17:01 +00:00
michael
3c7881ef04 * Fixed AV when setting capacity to something smaller than count but larger than 0 (bug ID 24943)
git-svn-id: trunk@25403 -
2013-09-03 07:10:53 +00:00
michael
4afefd6cbe * Added AddText as suggested in bug ID #24764
git-svn-id: trunk@25129 -
2013-07-19 07:16:06 +00:00
marco
eebfeca41d * removed all ver2_* defines older than 2_4. 2_4 can probably also get removed from trunk, but better in a separate commit.
git-svn-id: trunk@24971 -
2013-06-25 12:46:30 +00:00
marco
912d8f1c52 * set namevalueseparator to =, mantis #24116
git-svn-id: trunk@24451 -
2013-05-05 14:04:15 +00:00
michael
37ba6f9b27 * Fixed 23805
git-svn-id: trunk@23899 -
2013-03-17 17:00:39 +00:00
florian
b00ff8a4e0 * patch by Bart Broersma, simplify TStringList.InsertItem, resolves #23860
git-svn-id: trunk@23638 -
2013-02-20 21:36:02 +00:00
michael
11a531ab62 * Fixed bug #23477
git-svn-id: trunk@23135 -
2012-12-12 15:21:28 +00:00
michael
4ecfde31e1 * Prevent Move from freeing an associated object if OwnsObjects=True (reported on sourceforge)
git-svn-id: trunk@22992 -
2012-11-16 11:04:44 +00:00
florian
39aef35bdc * pass not only exception address but also frame to raise:
if an address is passed the compiler cannot know a good 
  value for the frame so it passed nil and no stack trace is printed, resolves #12528

git-svn-id: trunk@22932 -
2012-11-04 20:40:21 +00:00
marco
a48aba60fb * fix for Delphi incompatible DelimitedText, Mantis #19610, big patch from Reinier Olislagers.
git-svn-id: trunk@22549 -
2012-10-05 16:56:09 +00:00
michael
441e059f32 * Changed ooChanged to ooChange, to be more consistent with tense in other values
git-svn-id: trunk@22262 -
2012-08-28 12:32:15 +00:00
michael
43be53351e * Added observer support
git-svn-id: trunk@22257 -
2012-08-27 19:28:14 +00:00
michael
ab0a7d096c * Overloaded AddStrings
git-svn-id: trunk@20691 -
2012-04-02 11:22:02 +00:00
michael
d1b209025f * Applied patch from Luiz Amerigo to have Delphi compatible behaviour when freeing a stringlist (bug 21529)
git-svn-id: trunk@20570 -
2012-03-22 12:10:06 +00:00
michael
723482c814 * Correctly free objects when destroying stringlist instance
git-svn-id: trunk@20265 -
2012-02-05 19:55:21 +00:00
michael
a1d8ad7a27 * Changed var to out in TStringList.Find
git-svn-id: trunk@16395 -
2010-11-21 18:20:44 +00:00
sekelsenmat
8b6e8079ec Fixes a potential crash in TStrings.SaveToStream
git-svn-id: trunk@16187 -
2010-10-19 15:50:13 +00:00
marco
6ebda8f2cc * D2009 compat: TStringList.OwnsObjects
git-svn-id: trunk@16058 -
2010-09-28 14:52:44 +00:00
michael
bc735a639f * Call specialchars in TStringList constructor
git-svn-id: trunk@15116 -
2010-04-08 06:51:26 +00:00
joost
8f90db3e98 * Fixed mem-leaks
git-svn-id: trunk@14891 -
2010-02-12 15:44:56 +00:00
paul
8292fcc49e rtl: override TObject.Equals for TBits and TStrings classes
git-svn-id: trunk@14013 -
2009-11-03 02:01:06 +00:00
paul
aa5a5e79ce merge revisions: 13909,13923,13924,13934,13935,13942,13943,13944,13946,13948,13950,13951,13952,13983,13994:
rtl: add enumerators to the basic classes
tests: add enumerators test which compiles and work both by fpc and dcc
compiler: 
  + start for-in loop implementation: implement for-in loop for types (enumerations and ranges), strings, arrays and sets. todo: perform type checking, optimize array and string loops - use temp for expression, implement for-in loop for classes
test:
  + add a simple test for the 'for-in' loop
compiler: fix string for-in loop. now it uses a temp variable to store string expression result
complier: fix for-in array loop. use a temp variable for the loop expression only if loop is not an open array loop
complier: continue enumerator implementation:
  + add operator enumerator which give an ability to add enumerator for an existent type (for example to override builtin string enumerator)
  + add class enumerator support via delphi compatible GetEnumerator method + enumerator class/object template (function MoveNext: Boolean; property Current)
  + tests
compiler: fix for-in loop for arrays. delphi does not copy arrays to a temp variable and it is possible to change array during loop. + test
compiler: add reference for the enumerator operator when it is used + another test for operator enumerator for a class
compiler: add reference for the enumerator operator when it is used + another test for operator enumerator for a class
compiler: enumerator directive support:
  + allow to mark methods and properties by 'enumerator MoveNext' and 'enumerator Current' modifiers. Parser checks return types and duplicates.
  + prefer *marked* by enumerator directive methods and properties than GetEnumerator and Current builtin symbols
  + increase ppu version
  + test
rtl: add IEnumerator and IEnumerable interfaces declarations
tests: for-in loop tests:
  + add small comment at the top of test program
compiler: allow 'enumerator MoveNext' for the interface function declaration + test
compiler: move all for-in loop helpers to the nflw unit
compiler: don't allow the compiler to choose the non-valid enumerator operator for the for-in loop

git-svn-id: trunk@14008 -
2009-11-02 03:24:48 +00:00
marco
1e7ee7aef4 * Patch from Paul Ishenin, load stringlists with fmdenywrite. (improves sharing behaviour)
git-svn-id: trunk@13803 -
2009-10-04 13:36:43 +00:00