This is very Basically Function to View numbers of selected cells, NOT sum, Count Of cells.
Steps to reproduce:
1. Count Cells
2. view in status bar
3. this is very simple :(
Operating System: All
Version: 18.104.22.168.alpha0+ Master
Thanks for reporting.
I mark this as an enhancement request and NEW because I can't find any duplicates for this request.
Shouldn't be so hard to implement; the existing pop-up combo box in the status bar that changes 'Sum=0' to something else, could easily have a 'Selection' entry.
// Choice of functions on the SvxPosSizeStatusBarControl for Calc
has the relevant code to render that string which comes into there via the SID_TABLE_CELL property I think cf.
sc/source/ui/view/tabvwsha.cxx:sal_Bool ScTabViewShell::GetFunction( String& rFuncStr, sal_uInt16 nErrCode )
And Eike might be a good person to review this ;-)
This was a thing I too wished there to be in LO calc.
Got a good chance now to implement it myself. :-)
Thanks and Regards,
Add a new enum constant to ScSubTotalFunc in sc/inc/global.hxx, e.g. SUBTOTAL_FUNC_SELECTION_COUNT
In svx/source/stbctrls/stbctrls.h define a new PSZ_FUNC_SELECTION_COUNT with the same numeric value.
In svx/inc/helpid.hrc define HID_MNU_FUNC_SELECTION_COUNT
In svx/source/stbctrls/stbctrls.src add a MenuItem resource with
Text [ en-US ] = "Selection count";
and the defined constants.
In sc/inc/globstr.hrc define STR_FUN_TEXT_SELECTION_COUNT
In sc/source/ui/src/globstr.src add a String resource for STR_FUN_TEXT_SELECTION_COUNT
Add SUBTOTAL_FUNC_SELECTION_COUNT to the switch(eFunc).
Add (eFunc != SUBTOTAL_FUNC_SELECTION_COUNT) to the if below.
In sc/source/core/data/documen4.cxx ScDocument::GetSelectionFunction() handle the SUBTOTAL_FUNC_SELECTION_COUNT case.
In sc/source/core/data/column2.cxx ScColumn::UpdateSelectionFunction() and ScColumn::UpdateAreaFunction() treat the rData.eFunc==SUBTOTAL_FUNC_SELECTION_COUNT case special such that it does not call lcl_UpdateSubTotal(0 with a cell but instead calculates the selection count.
Hope I didn't forget anything ;-)
So, that was a lot to write and guide. Thanks a lot :-)
Many thanks Michael and Eike for the code pointers and rough draft.
A simple easyhack but a lot more to learn and understand the flow of structure
I've submitted a patch for the same: https://gerrit.libreoffice.org/#/c/3213/
Thanks and Regards,
Prashant Pandey committed a patch related to this issue.
It has been pushed to "master":
fdo#61541 : Count Number of selected Cells in calc
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:
Affected users are encouraged to test the fix and report feedback.
Created attachment 80655 [details]
Something weird here, I cannot see this feature on 4.1.0b2 on OS X.
Could someone confirm this please?
(In reply to comment #7)
> Created attachment 80655 [details]
> Something weird here, I cannot see this feature on 4.1.0b2 on OS X.
> SS attached.
> Could someone confirm this please?
You have to 'enable' it by right clicking on the 'sum' count in your status bar (right bottom). Once you clicked it, you can choose 'selection count' in that list :-).
Works here using Mac OSX 10.8.3.
Created attachment 80664 [details]
(In reply to comment #8)
> You have to 'enable' it by right clicking on the 'sum' count in your status
> bar (right bottom). Once you clicked it, you can choose 'selection count' in
> that list :-).
> Works here using Mac OSX 10.8.3.
> Kind regards,
Thanks for the info, I should have dug this further before posting.
@ Reza Heidari :
(In reply to comment #11)
> @ Reza Heidari :
> Khafe shooooo
NOTABUG is _NOT_ a correct status for this bug.
Migrating Whiteboard tags to Keywords: (EasyHack,DifficultyBeginner,SkillCpp,TopicCleanup)