[Libreoffice-bugs] [Bug 145745] Create a "Duplicate sheet" option in LO Calc

2022-02-05 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145745

Rafael Lima  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|libreoffice-b...@lists.free |rafael.palma.l...@gmail.com
   |desktop.org |

--- Comment #11 from Rafael Lima  ---
Proposed patch available in Gerrit for review.
https://gerrit.libreoffice.org/c/core/+/129541

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145745] Create a "Duplicate sheet" option in LO Calc

2022-02-03 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145745

--- Comment #10 from Hossein  ---
I agree with Heiko. Look for FID_TAB_MOVE, .uno:Move, and also take a look at
ScViewFunc::MoveTable(), as this command is more similar.

You can see more Calc commands here:
https://wiki.documentfoundation.org/Development/DispatchCommands#Calc

Look for "FID_TAB_MOVE":

  git grep FID_TAB_MOVE

You will see that it is defined and used in these files:

sc/inc/sc.hrc
sc/sdi/docsh.sdi
sc/sdi/scalc.sdi
sc/source/ui/view/tabcont.cxx
sc/source/ui/view/tabvwshf.cxx

You can go on and start from copying some parts from the tab move, and then try
to be specific on this command. As you may see, the ScViewFunc::MoveTable() is
invoked in the switch case inside tabvwshf.cxx.

Look for ".uno:Move":

git grep -Fw .uno:Move |grep -v .py

Look into these files:

officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
sc/uiconfig/scalc/menubar/menubar.xml
sc/uiconfig/scalc/popupmenu/sheettab.xml

You should define FID_TAB_DUPLICATE and .uno:DuplicateSheet.

BASIC is also a useful for testing. For example, I test ".uno:SheetRightToLeft"
with this BASIC code snippet. It reverses the the direction of an open Calc
document.

Sub Main
  document   = ThisComponent.CurrentController.Frame
  dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
  dim args(0) as new com.sun.star.beans.PropertyValue
  args(0).Name = "RightToLeft"
  args(0).Value = "true"
  dispatcher.executeDispatch(document, ".uno:SheetRightToLeft", "", 0, args())
End Sub

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145745] Create a "Duplicate sheet" option in LO Calc

2022-02-02 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145745

--- Comment #9 from Rafael Lima  ---
Hi Heiko, Houssein,

First of all, thanks for the code pointers.

I would like to try to fix this one. However, I find it a bit complex to
understand how to create new UNO commands. The relationship between SDI files
and the actual code is a bit complex.

Looking though Gerrit a found this patch which I believe is a good pointer to
create a new UNO command in Calc:

https://gerrit.libreoffice.org/c/core/+/114911

Do you think this is a good "template" for this bug?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145745] Create a "Duplicate sheet" option in LO Calc

2022-02-02 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145745

Heiko Tietze  changed:

   What|Removed |Added

   Keywords|difficultyMedium|difficultyInteresting
 CC||hoss...@libreoffice.org

--- Comment #8 from Heiko Tietze  ---
Code pointer: the move/copy operation is done in ScViewFunc::MoveTable() after
being initiated per FID_TAB_MOVE. It starts the dialog when called without
parameter, so a new command would just need a parameter.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145745] Create a "Duplicate sheet" option in LO Calc

2021-11-25 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145745

Heiko Tietze  changed:

   What|Removed |Added

   Keywords|needsUXEval |difficultyMedium, easyHack,
   ||skillCpp, topicUI
 Blocks||86899
 CC|libreoffice-ux-advise@lists |heiko.tietze@documentfounda
   |.freedesktop.org|tion.org,
   ||mentoring@documentfoundatio
   ||n.org

--- Comment #7 from Heiko Tietze  ---
We discussed the request in the design meeting and recommend to implement a
command uno:DuplicateSheet that bypasses the dialog.

It's likely easyhackable given the existing shortcut as Regina pointed out. The
challenge is to find the right code pointer.


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=86899
[Bug 86899] [META] Requests for the addition of UNO commands
-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145745] Create a "Duplicate sheet" option in LO Calc

2021-11-24 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145745

Cor Nouws  changed:

   What|Removed |Added

 CC||c...@nouenoff.nl
Version|7.3.0.0.alpha1+ |Inherited From OOo

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145745] Create a "Duplicate sheet" option in LO Calc

2021-11-24 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145745

--- Comment #6 from Eike Rathke  ---
(In reply to Heiko Tietze from comment #5)
> Do we need the Move anyway?
Yes. With a 200 sheets document you don't want to drag over 150 sheet tabs
to reach the target. And then miss.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145745] Create a "Duplicate sheet" option in LO Calc

2021-11-19 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145745

Heiko Tietze  changed:

   What|Removed |Added

 CC||er...@redhat.com

--- Comment #5 from Heiko Tietze  ---
I always have scruples with adding similar functions. The new "Duplicate"
command would be the same as the current "Move or Copy", with just less
options. But I see benefit from removing or cleaning-up this dialog in favor of
the "Duplicate". Do we need the Move anyway? Maybe if the target is within a
different document. So either kill the dialog or keep but without Copy.

Alternatively we could advertise the shift+drag interaction per static label on
the "copy" radio button.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145745] Create a "Duplicate sheet" option in LO Calc

2021-11-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145745

--- Comment #4 from Rafael Lima  ---
(In reply to Regina Henschel from comment #2)
> Click on the tab of the sheet, hold mouse button down and drag the tab while
> holding the Ctrl-key. That duplicates the sheet. Without Ctrl-key it moves
> the sheet.

> For renaming a sheet click on the tab while holding down the Alt-key. That
> brings the tab into edit mode.

Hi Regina. I did not know about these shortcuts. I tested them and indeed they
work. However, I could not find any documentation in the online Help about
them. I'll create some entries for these shortcuts in:

https://help.libreoffice.org/latest/en-US/text/scalc/04/0102.html?DbPAR=CALC#bm_id3145801

Despite that, I believe the new "Duplicate" option should be implemented in
addition to the existing shortcuts because these shortcuts are not very
discoverable by new (or even somewhat experienced) users. I myself had no idea
about them =)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145745] Create a "Duplicate sheet" option in LO Calc

2021-11-17 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145745

--- Comment #3 from Regina Henschel  ---
For renaming a sheet click on the tab while holding down the Alt-key. That
brings the tab into edit mode.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145745] Create a "Duplicate sheet" option in LO Calc

2021-11-17 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145745

Regina Henschel  changed:

   What|Removed |Added

 CC||rb.hensc...@t-online.de

--- Comment #2 from Regina Henschel  ---
Click on the tab of the sheet, hold mouse button down and drag the tab while
holding the Ctrl-key. That duplicates the sheet. Without Ctrl-key it moves the
sheet.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145745] Create a "Duplicate sheet" option in LO Calc

2021-11-17 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145745

Roman Kuznetsov <79045_79...@mail.ru> changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 CC||libreoffice-ux-advise@lists
   ||.freedesktop.org
 Ever confirmed|0   |1
 Blocks||108912

--- Comment #1 from Roman Kuznetsov <79045_79...@mail.ru> ---
Yep, would be nice


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=108912
[Bug 108912] [META] Sheet-level bugs and enhancements
-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 145745] Create a "Duplicate sheet" option in LO Calc

2021-11-17 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=145745

Rafael Lima  changed:

   What|Removed |Added

   Keywords||needsUXEval

-- 
You are receiving this mail because:
You are the assignee for the bug.