Bug 91013 - UNO commands to freeze first row and column
Summary: UNO commands to freeze first row and column
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium enhancement
Assignee: Gülşah Köse
QA Contact:
URL:
Whiteboard: target:5.2.0
Keywords:
Depends on: 99477
Blocks: UNO-Command
  Show dependency treegraph
 
Reported: 2015-05-02 10:03 UTC by Yousuf Philips (jay)
Modified: 2017-09-26 15:42 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) 2015-05-02 10:03:36 UTC
In preparation for a freeze split/group button for the toolbar, we need two new UNO commands for freeze. One UNO command to freeze the first row and one UNO command to freeze the first column.
Comment 1 Yousuf Philips (jay) 2015-05-02 10:05:15 UTC
Setting NEW as ux-advise enhancement.
Comment 2 Yousuf Philips (jay) 2015-06-21 16:23:16 UTC
@Phil: It would be great if you could work on this one. :D
Comment 3 Robinson Tryon (qubit) 2015-12-13 11:23:59 UTC Comment hidden (obsolete)
Comment 4 Yousuf Philips (jay) 2016-01-19 08:53:16 UTC
Hi Gulsah,

Thanks for taking this on. Did you need some code pointers?
Comment 5 Gülşah Köse 2016-01-19 10:46:41 UTC
> Thanks for taking this on. Did you need some code pointers?

Hi Yousuf

I'm working on it for a while. I think this method must be changed --> http://opengrok.libreoffice.org/xref/core/sc/source/ui/inc/tabview.hxx#497
IMHO It must be separated into two parts for rows and cols.

but i can't understand how it calculates cells which must be freezed. I need some code point for this. Thank you for your interest.
Comment 6 Gülşah Köse 2016-01-19 12:27:39 UTC
(In reply to Yousuf (Jay) Philips from comment #4)
> Hi Gulsah,
> 
> Thanks for taking this on. Did you need some code pointers?

Hi again. I've understood freezesplitters method. But i need some code point split button. I've research about "split button" but i think it has different name in LibreOffice or openoffice terminology. Do you know any source or code point about split buttons?
Comment 7 Yousuf Philips (jay) 2016-01-19 12:49:36 UTC
@Jan, @Maxim, @Bubli: Any code pointers for Gulsah would be appreciated.
Comment 8 Gülşah Köse 2016-01-19 15:58:04 UTC
This is my patch for this --> https://gerrit.libreoffice.org/#/c/21604
I'm still working on split button.
Comment 9 Eike Rathke 2016-01-19 19:47:16 UTC
@Gülşah:
Are you looking for this?
officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu

      <node oor:name=".uno:FreezePanes" oor:op="replace">
        <prop oor:name="Label" oor:type="xs:string">
          <value xml:lang="en-US">Freeze ~Rows and Columns</value>
        </prop>
        <prop oor:name="Properties" oor:type="xs:int">
          <value>1</value>
        </prop>
      </node>
Comment 10 Eike Rathke 2016-01-19 19:55:30 UTC
If so, then corresponding are

sc/sdi/scalc.sdi:SfxVoidItem FreezePanes SID_WINDOW_FIX
(and all files under sc/ where SID_WINDOW_FIX is handled)

sc/uiconfig/scalc/menubar/menubar.xml:            <menu:menuitem menu:id=".uno:FreezePanes"/>

sc/uiconfig/scalc/toolbar/standardbar.xml: <toolbar:toolbaritem xlink:href=".uno:FreezePanes"/>
Comment 11 Maxim Monastirsky 2016-01-19 20:14:35 UTC
(In reply to Gülşah Köse from comment #6)
> But i need some code point
> split button. I've research about "split button" but i think it has
> different name in LibreOffice or openoffice terminology. Do you know any
> source or code point about split buttons?
There are two kinds of split buttons - toolbar based (e.g. Custom Shapes buttons) and menu based (e.g. New document button). For toolbar based button you should use SubToolBarController, and for menu based button use GenericPopupToolbarController. Both are configured through officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu, and for both it's possible to specify the list of commands in XML format, and also reuse the same list for a submenu in the main menu or a context menu (for toolbar based button using ToolbarAsMenuController).
Comment 12 Eike Rathke 2016-01-20 14:20:40 UTC
(In reply to Yousuf (Jay) Philips from comment #0)
> In preparation for a freeze split/group button for the toolbar, we need two
> new UNO commands for freeze. One UNO command to freeze the first row and one
> UNO command to freeze the first column.

Did I understand correctly that the request is to have the split freeze the first row only or the first column only, regardless where the current cursor position is? Or is it to freeze only the columns or only the rows (not both) where the current cursor is?
Comment 13 Yousuf Philips (jay) 2016-01-20 19:43:05 UTC
(In reply to Eike Rathke from comment #12)
> Did I understand correctly that the request is to have the split freeze the
> first row only or the first column only, regardless where the current cursor
> position is? Or is it to freeze only the columns or only the rows (not both)
> where the current cursor is?

The request is to have 2 addition UNO commands for freezing either the first row or the first column. The functionality of freezing rows and columns can be quite difficult for new users and providing them with an easy means to freeze just the most commonly frozen cell groups is what is being targeted with this request, which hopefully will lead to a freeze split button that would have give access to these alternative UNO commands.
Comment 14 Commit Notification 2016-02-17 11:04:35 UTC
Gulsah Kose committed a patch related to this issue.
It has been pushed to "master":

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

tdf#91013 Add new uno commands to freeze one row and column.

It will be available in 5.2.0.

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 15 Commit Notification 2016-02-17 11:04:40 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

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

tdf#91013 Convert freezepanes menu to xml

It will be available in 5.2.0.

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 16 Yousuf Philips (jay) 2016-02-21 00:03:54 UTC
Thanks Gulsah and Maxim for the work on this.

There is a problem with the logic of the code as if i enable one freeze option (e.g. Freeze First Column) and then want to change it to another freeze option (e.g. Freeze First Row), it just disables the first freeze option, so then a user would have to choose the another option again to get it working.

Created a Freeze Cells submenu in the View menu.
https://gerrit.libreoffice.org/22580
Comment 17 Commit Notification 2016-02-22 13:48:18 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "master":

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

tdf#91013 Create freeze cells submenu in the view menu

It will be available in 5.2.0.

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 18 narayanaras 2016-08-22 08:22:14 UTC
@Yousuf,

The 5.2.0.4 still has the same old (defective) behavior as you described in Comment 16 (https://bugs.documentfoundation.org/show_bug.cgi?id=91013#c16).

Both "Freeze first column" and "Freeze first row" should act as toggle.
(If we repeat the command, it should toggle.)
They must not act as unfreeze command for the other axis. (column <--> row)
Comment 19 narayanaras 2016-08-22 08:24:04 UTC Comment hidden (no-value, obsolete)
Comment 20 narayanaras 2016-08-22 08:26:59 UTC Comment hidden (no-value, obsolete)
Comment 21 Yousuf Philips (jay) 2016-10-19 21:03:54 UTC
Lets close this and have bug 99477 pursue the fix in the behaviour.