Bug 64290 - UI: count selected rows and columns
Summary: UI: count selected rows and columns
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: Other All
: medium enhancement
Assignee: Manmeet Singh
URL:
Whiteboard: BSA target:4.3.0 NoRepro:4.3.0.0a0+:O...
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2013-05-06 20:50 UTC by zdenop
Modified: 2015-12-15 12:07 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
calc: showing count of selected rows and columns screenshot (162.94 KB, image/png)
2014-03-17 10:59 UTC, Manmeet Singh
Details
diff file for this bug : count the selected rows and columns. (8.16 KB, patch)
2014-03-17 11:04 UTC, Manmeet Singh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zdenop 2013-05-06 20:50:57 UTC
Problem description: 

When there is selection of region, show row and column count for it. E.g. if somebody select C6:I19, show information "14R:7C" in status bar (or as hint).

This is useful information when I need to copy selection to other place (to know about needed space).
Operating System: All
Version: 4.0.2.2 release
Comment 1 Jorendc 2013-05-10 11:29:24 UTC
Thanks for reporting. Looks a valid enhancement request to me.

Quite related to the "count selected cells" feature (Bug 61541) http://cgit.freedesktop.org/libreoffice/core/commit/?id=e7a5f5ef80c3e66101cfb063cbed0527c0559319

@Eike: we can convert this to an EasYHack too?

Kind regards,
Joren
Comment 2 Eike Rathke 2013-05-13 19:18:07 UTC
Probably, though I currently have no idea how to add yet another item to the status bar, nor if we really want it there. We already have the Name Box in the upper left that displays the selected cell range, I could imagine to display the CxR info also there, as a tooltip, or when hovering over the selection itself.
Comment 3 Rachit Gupta 2014-02-05 15:49:36 UTC
I wish to work on this feature. Can someone guide me on how to proceed?
Comment 4 Jorendc 2014-02-07 13:12:59 UTC
For code pointers you can have a look to bug 61541 and related patch http://cgit.freedesktop.org/libreoffice/core/commit/?id=e7a5f5ef80c3e66101cfb063cbed0527c0559319
Comment 5 Rachit Gupta 2014-02-12 16:16:54 UTC
I started looking around the code for this bug. I believe, that if it is to be implemented as a tooltip, then some new code pointers will be required. Can someone help me with that?
Comment 6 Jan Holesovsky 2014-02-26 07:16:05 UTC
This bug really misses an important code pointer, and that is how to add the information to the status bar:

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ce14342c4292628a641a72d4f63d9c048e030c6a

is what was done in Writer; so you want to do something similar in Calc.  You have to find the appropriate places in Calc to be able to do that, eg.

sc/sdi/scalc.sdi instead of sw/sdi/swriter.sdi, sc/source/ui/app/scdll.cxx instead of sw/source/ui/app/swmodule.cxx, sc/source/ui/view/cellsh.cxx instead of sw/source/ui/uiview/view2.cxx.

If you "git grep SID_STATUS_DOCPOS", that should give you some additional idea - that is the 'Sheet 1 / 1' indicator in the status bar.
Comment 7 Abhishek Bagchi 2014-02-26 16:40:23 UTC
I would want to work on this. I am new to the open source community. Could omeone please guide me on how to proceed ?
Comment 8 Rachit Gupta 2014-02-28 05:32:39 UTC
I'm sorry, i won't be able to work on this one for now. Someone else might take it up :)

@Abhishek, you should start by cloning the LibreOffice repo and building it. After that, look around the code and with the help of the code pointers provided, hack it up a bit and see what magic it does :)

Regards,
Rachit Gupta
Comment 9 Abhishek Bagchi 2014-03-02 11:42:46 UTC
(In reply to comment #8)
Thanks a lot. Will do so.
Comment 10 Sujay 2014-03-07 09:28:27 UTC
hi.. i am sujay. i ve been working on this hack for quite some time now.. sorry that i havent been updating my status, i am beginner.. i ve posted the patch to gerrit for review.
https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=78b2a288f3c6283fa2a4291e49d98363d6c05f7b
is this ok??
Comment 11 Manmeet Singh 2014-03-17 10:59:35 UTC
Created attachment 95923 [details]
calc: showing count of selected rows and columns screenshot

This attachment is a screenshot of calc, showing the number of rows and columns selected, in the statusbar.
Comment 12 Manmeet Singh 2014-03-17 11:04:35 UTC
Created attachment 95924 [details]
diff file for this bug : count the selected rows and columns.

Hi everyone,
I will be submitting this patch to gerrit for review very soon.
Please tell whether this code resolves this bug or some other enhancements are required. Please provide suggestions or improvements to be made. 

Thank you
Manmeet Singh
Comment 13 zdenop 2014-03-17 11:41:28 UTC
Hi Manmeet,

screenshot looks great. That's what I need.
Comment 14 Manmeet Singh 2014-03-18 09:50:57 UTC
Hi eveyone,
I have uploaded patch for this bug on gerrit for review. The link is https://gerrit.libreoffice.org/#/c/8640/.

Screenshot showing the working of patch is also attached.

Please suggest changes and improvements, if any, to fully meet the requirement of this easy hack (ui: count selected rows and columns).
Thank you 
Manmeet singh
Comment 15 Manmeet Singh 2014-03-18 09:51:32 UTC
Hi everyone,
I have uploaded patch for this bug on gerrit for review. The link is https://gerrit.libreoffice.org/#/c/8640/.

Screenshot showing the working of patch is also attached.

Please suggest changes and improvements, if any, to fully meet the requirement of this easy hack (ui: count selected rows and columns).
Thank you 
Manmeet singh
Comment 16 Commit Notification 2014-03-19 17:59:03 UTC
gdm.manmeet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=82b5ded699fcc03a09b0930213da204a332285e6

fdo#64290 ui:count selected rows and columns



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 17 Robinson Tryon (qubit) 2015-12-15 12:07:58 UTC
Migrating Whiteboard tags to Keywords: ( EasyHack DifficultyBeginner SkillCpp TopicCleanup )
[NinjaEdit]