The calc formula toolbar bar has a 'Sigma' button on it - this inserts a sum - which is all well and good, however - it would be nice to have a drop-down with a selection of other formulae to insert in there: SUM, AVERAGE, COUNT, etc. - similar to the selection available in the status bar for selections.
The code that inserts this item into a toolbar is here:
sc/source/ui/app/inputwin.cxx- InsertItem (SID_INPUT_SUM, Image(BitmapEx(RID_BMP_INPUT_SUM)), ToolBoxItemBits::NONE, 3);
We could insert a more complex toolbar item containing a drop-down instead.
Also a good idea to read the:
$ git grep -5 ToolBoxItemBits::DROPDOWN # output
and also checkout vcl/source/window/toolbox2.cxx to see how this can be populated.
(In reply to Michael Meeks from comment #1)
(In reply to Michael Meeks from comment #0)
> The calc formula toolbar bar has a 'Sigma' button on it - this inserts a sum
> - which is all well and good, however - it would be nice to have a drop-down
> with a selection of other formulae to insert in there: SUM, AVERAGE, COUNT,
> etc. - similar to the selection available in the status bar for selections.
Is it selection available in sidebar bar ?
I have 2 mockups one is the currency dropdown menu (https://drive.google.com/file/d/1y9pUVYLlQlDGcJE09oZZYwo-hsIYN5Tt/view?usp=sharing ) and other is conditional formatting dropdown menu ( https://drive.google.com/open?id=1OEk03NWWVTlRJoyJcSE3_9_Ao896jO7t ).
We can use any of them depending on the number of functions to be added in the drop-down menu.
Would you please let me know how you want the drop-down menu to be ?
I guess Michael wants it to be similar to Microsoft Excel's AutoSum feature, and that in my opinion will be a nice and handy tool to have. I can start working on it.
Sure - so I think people get the idea generally - I hoped it was fairly clear from the description ;-) The key is digging another drop-down toolbar button out of the code to see how it is done I guess.
(In reply to ranjan.purbey from comment #3)
> I guess Michael wants it to be similar to Microsoft Excel's AutoSum feature,
> and that in my opinion will be a nice and handy tool to have. I can start
> working on it.
I was working on this issue but if you have already started, Here are my findings and code pointers.
toolBoxItemBits::DROPDOWN - vcl/source/window/toolbox.cxx
Related forumla and sigma button files
: sc/source/ui/view/tabvwshc.cxx line :736
: sc/source/ui/view/viewfunc.cxx line :673
: sc/source/ui/app/inputwin.cxx line :372
Also , similar patch https://gerrit.libreoffice.org/#/c/22958/ .
Please let me know @ranjan.purbey.
Hi Sumit - nice work systematically building notes on code pointers! =) that's the way to solve ~any tough problem; good stuff.
Hey mmeeks , can you assign this bug to me. So ,that no two people are working on the same bug.
(In reply to Sumit Chauhan from comment #7)
> Hey mmeeks , can you assign this bug to me. So ,that no two people are
> working on the same bug.
Done, you have rights to do it yourself as well!
A polite ping, still working on this bug?
(In reply to Xisco Faulí from comment #9)
> A polite ping, still working on this bug?
Yes , I am working but facing difficulty with UI. I will try to finish it as soon as possible.