Bug 298365 - Line number of cursor (statusbar) counts hard-returns instead of lines of text
Summary: Line number of cursor (statusbar) counts hard-returns instead of lines of text
Status: RESOLVED FIXED
Alias: None
Product: calligrawords
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: Calligra Words Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-18 16:11 UTC by J. Jordan
Modified: 2015-03-27 16:32 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description J. Jordan 2012-04-18 16:11:41 UTC
The line count located in the status bar indicates the number of hard-returns instead of the number of lines.  The line count in the Statistics Docker is accurate so the underlying functionality is implemented correctly this appears to be a UI issue.

Reproducible: Always

Steps to Reproduce:
1.enter several lines of text
2.look at line count indicator in status bar
3.
Actual Results:  
Line count in status bar indicates number of hard returns prior to the location of the cursor.

Expected Results:  
Line count in status bar indicates number of lines of text prior to location of cursor.

Line count in Statistics Docker indicates total number of lines in document.
Comment 1 Inge Wallin 2012-04-20 20:16:41 UTC
I see this too so I confirm the bug.
Comment 2 Camilla Boemann 2012-04-20 20:51:08 UTC

*** This bug has been marked as a duplicate of bug 283351 ***
Comment 3 Camilla Boemann 2012-04-21 06:34:40 UTC
Sorry if this was the bug you refered to it seems i mis closed it
Comment 4 Camilla Boemann 2015-03-27 15:32:15 UTC
No a UI issues as such - the line numbers are not available from Qt - what we do in the satistics docker is manually counting - that is way too heavy for this case

It does however seem like there is a new functionality in Qt4.5 that will allow us to do this:

 textBlock->setLineCount()

 No promises
Comment 5 Camilla Boemann 2015-03-27 16:32:54 UTC
Git commit 84f1c7e1a03651a006c4832bfba8e774fdf4c307 by C. Boemann.
Committed on 27/03/2015 at 16:30.
Pushed by boemann into branch 'calligra/2.9'.

Without som small magic the linenumber of a block was the same as the block number
Aso we need to add the linenumber relative to the block

M  +1    -0    libs/textlayout/KoTextLayoutArea.cpp
M  +3    -1    words/part/KWStatusBar.cpp

http://commits.kde.org/calligra/84f1c7e1a03651a006c4832bfba8e774fdf4c307