Issue 5550 - auto-fill can't increment last octet of ip addresses.
Summary: auto-fill can't increment last octet of ip addresses.
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 1.0.0
Hardware: All All
: P4 Trivial with 8 votes (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sc
URL:
Keywords:
: 6028 22435 88511 92292 108540 (view as issue list)
Depends on:
Blocks:
 
Reported: 2002-06-04 17:44 UTC by Unknown
Modified: 2013-08-07 15:14 UTC (History)
7 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
here is my take. (2.97 KB, patch)
2008-08-22 05:06 UTC, kyoshida
no flags Details | Diff
revised patch to fix one regression (3.01 KB, patch)
2008-11-17 21:30 UTC, kyoshida
no flags Details | Diff
revised patch to fix "1 foo" while preserving "1foo1" behavior (3.11 KB, patch)
2009-02-23 20:54 UTC, kyoshida
no flags Details | Diff
TestCaseSpecification (7.77 KB, text/html)
2009-05-11 10:12 UTC, oc
no flags Details
Testdocument for Test Case Specification (9.64 KB, application/vnd.oasis.opendocument.spreadsheet)
2009-05-11 10:13 UTC, oc
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown 2002-06-04 17:44:17 UTC
When specifying auto fill, I would like to be able to auto-fill the series
10.0.0.1 to 10.0.0.255.  When I try this just dragging the cell corner, the 10
starts incrementing.  When I try the dialog box, I get the error "invalid value"
Comment 1 peter.junge 2002-06-10 15:24:12 UTC
Hi Falko,
I like this idea very much because I filed something similar myself a
while ago. And we need a number format for IP support.
Best regards, Peter
Comment 2 falko.tesch 2003-10-01 12:24:30 UTC
For the moment we increase automatically the number of a cell when
using AutoFill (drag with mouse).
In combination with STRG we do not alter the cell contents.
This could change:
- Increase automatically the first number when using the mouse _plus_ STRG
- Increase the last(!) number of a comma or dot separated number
string by just using the mouse.
Comment 3 falko.tesch 2003-10-01 14:37:09 UTC
started
Comment 4 falko.tesch 2003-10-06 12:52:42 UTC
*** Issue 6028 has been marked as a duplicate of this issue. ***
Comment 5 frank 2003-11-14 09:37:01 UTC
*** Issue 22435 has been marked as a duplicate of this issue. ***
Comment 6 bettina.haberer 2003-12-05 17:56:30 UTC
Hello Niklas, please give approval for this evaluated OO.o 2.0 flagged
issue. 
If you confirm with the target OO.o 2.0, then please keep it on your
owner (or the owner of the concerning developer) for implementation.
In case you want this issue for 'OOo Later', then please reset the
target milestone. If you decline the issue finally, please set the
resolution to 'Wontfix' (but do not close). In case of 'OOo Later' or
'Wontfix' please reset it on Bettina's owner. Thank you.
Comment 7 Martin Hollmichel 2004-05-28 15:00:58 UTC
according to the announcement on releases
(http://www.openoffice.org/servlets/ReadMsg?list=releases&msgNo=7503) this issue
will be re-targeted to OOo Later.
Comment 8 reibrand 2004-06-28 11:37:18 UTC
That feature would indeed very good to get working properly. I find that when to 
try and drag the cells to perform the autocomplete, the app crashes. I sent in 
the report generated from the crash earlier this morning.

R
Comment 9 kpalagin 2008-04-21 12:57:53 UTC
*** Issue 88511 has been marked as a duplicate of this issue. ***
Comment 10 kyoshida 2008-08-21 18:04:46 UTC
Just so that we have it on the record....,

The code to look into is
sc/source/core/data/table4.cxx, ScTable::Fill(), FillSeries(), FillAnalyse(),
and particularly lcl_DecompValueString() which is the function used to determine
what part of a text should be incremented.  Thanks er for providing the hint on IRC.
Comment 11 kyoshida 2008-08-22 05:06:19 UTC
Created attachment 55925 [details]
here is my take.
Comment 12 kyoshida 2008-08-22 05:12:43 UTC
Ok, I've modified it quite a bit.  It does what Excel does (unless I overlooked
something), and something extra that only Calc does, such as the handling of
negative numbers, leading zeros etc.  My test looks pretty good, but more tests
are welcome.
Comment 13 ooo 2008-09-17 13:35:01 UTC
*** Issue 92292 has been marked as a duplicate of this issue. ***
Comment 14 discoleo 2008-09-17 22:16:58 UTC
discoleo->kohei

I would appreciate a short description of the feature the patch brings in. ;)

How are the following situation handled:
'12.34   '12.34   '12.34   '12.34.45   '12abc34
'12.35   '13.34   '13.44   '12.34.46   '12abc44

Maybe others.
Comment 15 Stefan Weigel 2008-09-17 22:32:12 UTC
Hi,

while working on AutoFill, may I draw your attention also to issue #70015, issue
#74662 and issue #74733.
Comment 16 kyoshida 2008-11-17 21:30:04 UTC
Created attachment 58065 [details]
revised patch to fix one regression
Comment 17 kyoshida 2008-11-17 21:30:47 UTC
See https://bugzilla.novell.com/show_bug.cgi?id=439441 for the regression I just
fixed.
Comment 18 niklas.nebel 2009-02-10 07:48:52 UTC
target 3.2
Comment 19 niklas.nebel 2009-02-23 18:57:24 UTC
The second patch breaks the simple case of "1 foo".

Anyway, I just changed the old code to prefer a number at the end over one at
the beginning, unless the one at the beginning is followed by a space.

This means:
1 foo 1 -> 2 foo 1 (unchanged, because of the space)
1foo1   -> 1foo2   (by the same logic as the IP example)

The second case is different from older versions, but I hope nobody's relying on
the old behavior of that. The change is in CWS "calc49".
Comment 20 kyoshida 2009-02-23 20:54:20 UTC
Created attachment 60410 [details]
revised patch to fix "1 foo" while preserving "1foo1" behavior
Comment 21 kyoshida 2009-02-23 20:56:20 UTC
Hmm, I'd rather not revert to the old code especially when fixing that "1 foo"
case was rather easy.  The latest patch also preserves the "1foo1" case.
Comment 22 niklas.nebel 2009-02-25 10:41:30 UTC
Why "rather not revert to the old code"?
It works, and making a bigger modification is certainly no goal on its own.
Comment 23 kyoshida 2009-02-26 13:46:38 UTC
It's just one local function ~20 lines of code.  What's the big deal here?  If
you want to control every single line of my contributed patches, then I take
offense with that.  That's too much micro-management, and is not something a
good project lead should be doing.

I care as much about the code quality of Calc as perhaps you do, but that's
probably how you see my contributions.

Anyway, do whatever you please.  You got the power.  I don't.
Comment 24 niklas.nebel 2009-04-03 09:00:04 UTC
reassigning to QA for verification
Comment 25 oc 2009-05-11 10:12:58 UTC
Created attachment 62159 [details]
TestCaseSpecification
Comment 26 oc 2009-05-11 10:13:51 UTC
Created attachment 62160 [details]
Testdocument for Test Case Specification
Comment 27 oc 2009-05-11 10:15:01 UTC
verified in internal build cws_calc49
Comment 28 amy2008 2009-06-01 04:31:29 UTC
Verified in DEV300m49 on WinXP.
Closing
Comment 29 Stefan Weigel 2010-01-23 17:56:36 UTC
*** Issue 108540 has been marked as a duplicate of this issue. ***