Created attachment 88142 [details]
Spreadsheet with a macro
Context : a macro launched via a command button to copy a range of cells.
The problem arises when a button has the focus. In this case the copy is irrelevant that the macro is launched via the button or otherwise (menus, shortcut).
The attached spreadsheet contains:
- A macro "Disp" that copies A1:A3 to C1.
- A button that launches the macro.
When you open the spreadsheet the button has focus. Start macro without clicking the button, but through the menus (macro> run, or macro> organize> Run). It does not work (move and selection are but not copy).
Click on the sheet (anywhere) then restart the macro via menus: everything works as many times as you want (change the range A1:A3 to check).
There is a workaround (use the copy method of a sheet) but this is an annoying regression because the feature is widely used, especially by beginners.
Set to "New" because reproduced (qa-fr) :
- 4.0.5 Windows 7 32b
- 4.1.1 W8/64
- 188.8.131.52/Ubuntu 12.04
- 184.108.40.206 W/XP
Reproduced with 4.0.4 W7/32 and 220.127.116.11 Ubuntu 12.04. The problem appears when any button in the sheet has the focus, not only those calling the macro with "uno:copy".
With any version of LibO 3, the macro works fine, regardless the way to launch it, and for all platforms.
works in 18.104.22.168, broken in 22.214.171.124
Results from bibisect-43all:
e2a9149a7723f4e00eb3cafe466e204e5da19e9c is the first bad commit
Author: Bjoern Michaelsen <firstname.lastname@example.org>
Date: Thu Oct 17 05:01:44 2013 +0000
Author: Khaled Hosny <email@example.com>
AuthorDate: Sun May 12 17:59:50 2013 +0200
Commit: Khaled Hosny <firstname.lastname@example.org>
CommitDate: Sun May 12 18:47:36 2013 +0200
# bad: [423a84c4f7068853974887d98442bc2a2d0cc91b] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
# good: [a71a4447320f177181c9cff9f7c6fd93802cbd8e] source-hash-9afb6e1e38c362a768e8e981f7b03cf8bcaf22cf
git bisect start 'latest' 'last36onmaster'
# bad: [f2554751603ad8537257b3cf52d6171056c76eeb] source-hash-f42768fe0b60ecbbe9c68d775329bf28c0690131
git bisect bad f2554751603ad8537257b3cf52d6171056c76eeb
# good: [c826604de689fbabd8b1b8ea41396694e99a23d4] source-hash-32acb98b3fb6acb4712f7195cf5ea1bd69c9c6b4
git bisect good c826604de689fbabd8b1b8ea41396694e99a23d4
# bad: [e818f97b99709bcedf56865e733647666cfae09c] source-hash-66e39940d763586060c4bcc8c3cd213495c40b79
git bisect bad e818f97b99709bcedf56865e733647666cfae09c
# good: [3142334d94a2c49f484453556493532e4a994002] source-hash-0644a20605965b36fcc983e4c1158820fd858726
git bisect good 3142334d94a2c49f484453556493532e4a994002
# good: [b17e3e62a0b58fb7670463f6934881c1aac97b39] source-hash-092fa33f22bbdcb74c3533750158db1724971878
git bisect good b17e3e62a0b58fb7670463f6934881c1aac97b39
# good: [f1fda5341557321cf4953c0d5dc6ffe262f1b545] source-hash-ee8323e2280c72eb5cc9ec0257164154b2580a78
git bisect good f1fda5341557321cf4953c0d5dc6ffe262f1b545
# bad: [38e06ae137e1dcaaaf82127b977869499742bd94] source-hash-3fb33e3e04c7f339e1e15d24529e8ea1d4dbe321
git bisect bad 38e06ae137e1dcaaaf82127b977869499742bd94
# good: [7735ac016add3b7e4b96d6017919a828e3271a0a] source-hash-923312f67fbf120158f01c2c0e588af38fc22364
git bisect good 7735ac016add3b7e4b96d6017919a828e3271a0a
# bad: [b827dce34450091ab3fd608fcb1774899cb2f865] source-hash-1472b5f87314fe660ef1a7b254e51272669f12f6
git bisect bad b827dce34450091ab3fd608fcb1774899cb2f865
# bad: [e2a9149a7723f4e00eb3cafe466e204e5da19e9c] source-hash-2ede6c95e6481c92cc199e7d74fd36c841636304
git bisect bad e2a9149a7723f4e00eb3cafe466e204e5da19e9c
# first bad commit: [e2a9149a7723f4e00eb3cafe466e204e5da19e9c] source-hash-2ede6c95e6481c92cc199e7d74fd36c841636304
there is the same problem on : 4.3.5-1
Twice Alternatives (manuel) with :
oDoc = ThisComponent
oPlage = oDoc.CurrentSelection ' Plage sélectionnée
oFeuille = oDoc.Sheets.getByName("Feuille1") ' Nom de la feuille où coller
oColleCellule = oFeuille.getCellRangeByName("A1") ' Cellule où démarre le collage
If oPlage.supportsService("com.sun.star.table.CellRange") Then
' A compléter si plages discontigües
msgBox "Sélectionnez au moins deux cellules contigües"
Or with :
Dim oDoc as Object, oRange as Object, aCopier as Object
oDoc = thisComponent
oRange = oDoc.Sheets(0).getCellRangeByName("H2:H9") ' la zone à copier
oDoc.CurrentController.select(oRange) 'Sélection de la zone
aCopier = oDoc.CurrentController.getTransferable() 'Copie
oRange = oDoc.Sheets(0).getCellRangeByName("A1") 'Première cellule pour recopie de la zone
oDoc.CurrentController.select(oRange) 'Selection de la cellule
oDoc.CurrentController.insertTransferable(aCopier) 'Transfert des données
The change in behaviour seems to have been caused by the below commit.
Adding Cc: to email@example.com. Any thoughts on what can be done with this one? Thanks
Author: Lionel Elie Mamane <firstname.lastname@example.org>
Date: Sun May 12 00:35:31 2013 +0200
fdo#63695 revert hackish fix to i#51621
This looks like it is exactly i#51621 ( https://issues.apache.org/ooo/show_bug.cgi?id=51621 ).
Not surprising since my fix to bug 62520 (fdo#62520) was to revert the fix to i#51621.
Since bug 62520 leads to data loss (entered data is not saved and discarded), I consider it as "more important".
So what needs to happen is "somebody fixes this without reintroducing bug 62520".
I encountered this problem in a macro I'm working on.
Forcing the code to take off the focus from the button seems to work for me.
I placed the following code as the fist line in the macro:
Migrating Whiteboard tags to Keywords: (bibisected)
Quand je veux faire un copier d'un fichier sur un autre, sachant que les 2 fichiers sont ouverts, "copier" se fait sans problème. mais le clic droit réalisé sur la cellule de destination ne présente pas "coller" automatiquement Je suis le plus souvent obligé de fermer et ré-ouvrir le fichier de destination
pour que la proposition "coller" apparaisse !
Trying to help with
I just found the bug living in LibO V 126.96.36.199 under Win 10.
I can confirm the bug i still there with LibreOffice 5.4.1002 and OS X 10.13 High Sierra.
And thanks @fsoltrash for the workaround!
*** Bug 115844 has been marked as a duplicate of this bug. ***
** Please read this message in its entirety before responding **
To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.
There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.
If you have time, please do the following:
Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/
If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.
Please DO NOT
Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not
appropriate in this case)
If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/
2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword
Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa
Thank you for helping us make LibreOffice even better for everyone!
Build ID: 1:6.2.5-0ubuntu0.18.04.1~lo1
CPU threads: 4; OS: Linux 5.1; UI render: default; VCL: gtk3;
Locale: en-GB (en_GB.UTF-8); UI-Language: en-GB
I can confirm that this bug is still present.
Versión: 188.8.131.52 (x64)
Id. de compilación: 60da17e045e08f1793c57c00ba83cdfce946d0aa
Subprocs. CPU: 8; SO: Windows 10.0; Repres. IU: GL; VCL: win;
Configuración regional: es-ES (es_ES); Idioma de IU: es-ES
The bug is still present.
and again i tapped on an old bug nobody cared for since years ...
(i like libreoffice and consider it one of the best office suites, the weakest points are the 'old bugs', that nobody cares for them, and that new findings are pulled away as duplicates. this is a general weakness of the development as a community, and the systematics of the bugtracker.)
still failing with:
Version: 184.108.40.206.alpha0+ (x64)
Build ID: 61d8d991a27c3bfe70e3b8d3b4ce4d8a41d18d2d
CPU threads: 8; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win;
Locale: de-DE (de_DE); UI-Language: en-US
trick from https://bugs.documentfoundation.org/show_bug.cgi?id=70883#c7 works.
(In reply to b. from comment #16)
> and again i tapped on an old bug nobody cared for since years ...
> (i like libreoffice and consider it one of the best office suites, the
> weakest points are the 'old bugs', that nobody cares for them, and that new
> findings are pulled away as duplicates. this is a general weakness of the
> development as a community, and the systematics of the bugtracker.)
If you think some report is wrongly closed as a duplicate, please explain why you think so. Findings from duplicates can be copied as comments to the open reports.
> If you think some report is wrongly closed as a duplicate, please explain why you think so.
no, i didn't say that, thus nothing to explain,
> Findings from duplicates can be copied as comments to the open reports.
i know that, and did so sometimes,
what i'd say was:
"(i like libreoffice and consider it one of the best office suites, the weakest points are the 'old bugs', that nobody cares for them, and that new findings are pulled away as duplicates. this is a general weakness of the development as a community, and the systematics of the bugtracker.)"
as an extenuation of a - gallows humor - remark:
"and again i tapped on an old bug nobody cared for since years ... "
mean point, as bugs and bugtracker are actually handeled they lead developers to the triage: 1. new bug? oh no, it's a duplicate, 2. care for the origin? oh no, too many comments, difficult stuff, 3. what do do? mark as dup and care for something else. and that buries 'old bugs'.
you can verify this opinion on this bug - 6 years, no patch, no progress, on other fields like 'shared formulas', parallelizing, - there had been some progress - macro functionality, iterations, comment slowdowns, autocalc, #REF! errors and so on, or on #62196 mentioned by Mike - basic functionality, six years, 13 duplicates, no patch, no progress, it already has a sibling #65606 with some duplicates, and a grandfather #34599 ... you'll see that bug handling for old bugs in calc (and libreoffice?) is not the most effective point of the project.
i wouldn't cry about that in 'bugs' - imho intended for work on the factual problems - if i'd know any better place, perhaps you can give me a hint.
am i right with the following 'backtrace'?
the problem is old and was once solved -
that fix was reverted by @Lionel reg. #62520 and being 'hackish' -
but without noting it in that thread (62520),
thus the ooo thread 51621 pinpoints the problem, and needs a rework taking into account the problems of #62520?
but the site with the old fix passed away
(http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Id=3085&Path=SRC680%2Fdba201d is broken),
and the wayback machine didn't archive that branch, :-(
under 'see also', thus here.
(In reply to b. from comment #19)
You basically correctly describe what had been mentioned in comment 6, bug 63695 comment 21 (which shows that Lionel's change *was* noted there), and i#51621 (https://bz.apache.org/ooo/show_bug.cgi?id=51621).
The original fix was in https://git.libreoffice.org/core/+/bdf02613fe455963dbcb4ee8f85da628856b146c.
I was confused that the 'correction' had not been mentioned in #62520 ...
*** Bug 131317 has been marked as a duplicate of this bug. ***