Bug 169110 - Basic macro error Application.CutCopyMode
Summary: Basic macro error Application.CutCopyMode
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
26.2.0.0 alpha0+ master
Hardware: All Linux (All)
: medium normal
Assignee: Devansh Varshney
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2025-10-28 10:56 UTC by raal
Modified: 2025-11-15 14:57 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
test file (21.25 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-10-28 10:57 UTC, raal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description raal 2025-10-28 10:56:37 UTC
Description:

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2595f031fa93c1eb89fb4dce6f337de9be813e15
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

Works in Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: cs-CZ
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.10
Calc: threaded

Steps to Reproduce:
 - open attached file, enable macros
 - everything is correct, macro works
 - now open macro Tools-Macros-Edit macros. Open macro countifs_benchmark()
 - run the macro when IDE is opened
 

Actual Results:
 Error on line 16     Application.CutCopyMode = False
 Basic runtime error '423' Property or method not found: CutCopyMode

Expected Results:
 Macro runs.


Reproducible: Always


User Profile Reset: No

Additional Info:
VBA reference 
https://learn.microsoft.com/en-us/office/vba/api/excel.application.cutcopymode
Comment 1 raal 2025-10-28 10:57:55 UTC
Created attachment 203580 [details]
test file
Comment 2 raal 2025-10-28 11:20:06 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-26.2.
Adding Cc: to Devansh Varshney ; Could you possibly take a look at this one?
Thanks
 ca11e027f5ac4103874a8101faaabe8ad5b15435 is the first bad commit
commit ca11e027f5ac4103874a8101faaabe8ad5b15435
Author: Jenkins Build User <tdf@maggie.tdf>
Date:   Tue Oct 14 18:48:14 2025 +0200

    source a2d19c07041bf6fe1208dd7cb94b9c80aff33979

191405: tdf#165785: basctl: Implement data provider for Object Browser | https://gerrit.libreoffice.org/c/core/+/191405
Comment 3 Devansh Varshney 2025-10-29 18:13:09 UTC
(In reply to raal from comment #2)
> This seems to have begun at the below commit in bibisect repository/OS
> linux-64-26.2.
> Adding Cc: to Devansh Varshney ; Could you possibly take a look at this one?
> Thanks
>  ca11e027f5ac4103874a8101faaabe8ad5b15435 is the first bad commit
> commit ca11e027f5ac4103874a8101faaabe8ad5b15435
> Author: Jenkins Build User <tdf@maggie.tdf>
> Date:   Tue Oct 14 18:48:14 2025 +0200
> 
>     source a2d19c07041bf6fe1208dd7cb94b9c80aff33979
> 
> 191405: tdf#165785: basctl: Implement data provider for Object Browser |
> https://gerrit.libreoffice.org/c/core/+/191405

I have created the patch

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

it is working and I tested with the document.


The only know bug which this has is for the first time when I am running the Macro the UI is refreshing.

Which I will fix with a new patch for all this minute UI cleanup.
or this could be fixed in the document search patch which still needs a little more work :) https://gerrit.libreoffice.org/c/core/+/192808
Comment 4 Devansh Varshney 2025-11-12 12:39:03 UTC
I am still working on this bug and it is really deep in code. 

I have been able to separate the corruption from the search indexing but the Standard Libraries are losing the context that they are in VBA mode and hence the regression is happening.
Comment 5 Devansh Varshney 2025-11-15 14:57:31 UTC
The Regression is resolved and I will create a clean patch.