Bug 139539 - Makro Basic - CALC - makro mode "hidden" - method store() unfixes fixed rows
Summary: Makro Basic - CALC - makro mode "hidden" - method store() unfixes fixed rows
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.4.7.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-11 14:30 UTC by Hans-Werner
Modified: 2023-01-30 12:15 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
CALC.ods (13.05 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-01-11 14:32 UTC, Hans-Werner
Details
TestFixedRow.bas (1.18 KB, text/plain)
2021-01-11 14:32 UTC, Hans-Werner
Details
TestFixedRow.bas (1006 bytes, text/plain)
2021-01-26 18:14 UTC, Hans-Werner
Details
CALC.ods (12.76 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-01-28 06:45 UTC, Hans-Werner
Details
TestFixedRow.bas (440 bytes, text/plain)
2021-01-28 06:45 UTC, Hans-Werner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Werner 2021-01-11 14:30:39 UTC
Description:
Opening CALC by macro using "loadComponentFromURL" and using mode "hidden" unfixes a fixed row.

Steps to Reproduce:
Test A (not "hidden" mode)

1. Open CALC.
2. Fix first row of all 3 sheets, if not fixed.
3. Set: aCALCpropv(0).Value = FALSE
4. Save/Close CALC.
5. Start macro TestFixedRow.
6. Open CALC.
7. First row of all 3 sheets is still fixed.

Test B ("hidden" mode)

1. Open CALC.
2. Fix first row of all 3 sheets, if not fixed.
3. Set: aCALCpropv(0).Value = TRUE
4. Save/Close CALC.
5. Start macro TestFixedRow.
6. Open CALC.
7. First row of all 3 sheets is not fixed anymore. 

Actual Results:
1. When opening CALC using mode "not hidden" fixed rows are still fixed.
2. When opening CALC using mode "hidden" all fixed rows are unfixed.

Expected Results:
When opening CALC using mode "hidden" all fixed rows should not be unfixed.


Reproducible: Always


User Profile Reset: No



Additional Info:
LO 6.4.7.2 + LO 7.0.4.2
Comment 1 Hans-Werner 2021-01-11 14:32:02 UTC
Created attachment 168818 [details]
CALC.ods
Comment 2 Hans-Werner 2021-01-11 14:32:35 UTC
Created attachment 168819 [details]
TestFixedRow.bas
Comment 3 Hans-Werner 2021-01-26 18:14:24 UTC
Created attachment 169157 [details]
TestFixedRow.bas
Comment 4 Hans-Werner 2021-01-28 06:43:59 UTC
After some helpful discussion (users@de.libreoffice.org) some more detailed description of the bug:

Test 1 - macro NOT "hidden mode"

1.1 Check attached "CALC.ods": First row should be fixed.
1.2 Unzip "CALC.ods".
1.3 "settings.xml" should contain entry:
config:config-item-map-indexed config:name="Views">
<config:config-item-map-entry>
:
<config:config-item config:name="VerticalSplitMode" config:type="short">2</config:config-item>
:
</config:config-item-map-indexed>
1.4 Zip unzipped "CALC.ods".
1.5 Run attached macro "TestFixedRows.bas" NOT using "hidden mode" (aCALCpropv(0).Value = False).
1.6 Result: Fixed row and above mentioned entry are STILL EXISTING.

Test 2 - macro "hidden mode"

2.1 Check attached "CALC.ods": First row should be fixed.
2.2 Run attached macro "TestFixedRows.bas" using "hidden mode" (aCALCpropv(0).Value = True).
2.3 Result. Fixed row and above mentioned entry are NOT EXISTING ANYMORE.

Test 3 - macro "hidden mode" and "oCALC.Store()" commented

3.1 Check attached "CALC.ods": First row should be fixed.
3.2 Comment macro code line "oCALC.Store()".
3.3 Run attached macro "TestFixedRows.bas" using "hidden mode" (aCALCpropv(0).Value = True).
3.4 Result: Fixed row and above mentioned entry are STILL EXISTING.

Summary

It seems to be, that "oCALC.Store()" deletes above mentioned entry (unfixes fixed line) when running macro in "hidden mode".
Comment 5 Hans-Werner 2021-01-28 06:45:02 UTC
Created attachment 169210 [details]
CALC.ods
Comment 6 Hans-Werner 2021-01-28 06:45:41 UTC
Created attachment 169211 [details]
TestFixedRow.bas
Comment 7 Thomas Krumbein 2021-01-28 07:14:58 UTC
I can confirm this behaviour.

having a deeper look to the object with xray-tool:

open the document per macro in normal mode (visible):
- doc-object.currentController -> show the correct properties SplitRow/SpitColumn.

- using the methode store() noting changed

- open the Document again -> split is corret and visible.


open the document per macro in invisible mode :
- doc-object.currentController -> show the correct properties SplitRow/SpitColumn.

- using the methode store() 
- inspecting again doc-object.currentController -> show the correct properties SplitRow/SpitColumn. Nothing has changed.
- closing Document.

- open the Document again -> no split any more. 
- inspecting again doc-object.currentController -> properties SplitRow/SpitColumn is 0 (zero)


Next Test:
Open a calc-Document via "loadComponentFromURL" - visible mode:
setting per macro: 
-thisComponent.getCurrentController.freezeAtPosition(2,3) ->
Rows and colums are fixed, properties are stored (SplitRow/SpitColumn).
-storing and closing document -> still fixed.

Open a calc-Document via "loadComponentFromURL" - invisible mode:
setting per macro: 
-thisComponent.getCurrentController.freezeAtPosition(2,3) ->

xray does not show any changes, still properties of SplitRow/SpitColumn remain to zero (0). 
Storing the document -> no split is stored.


Version: 7.0.2.2 (x64)
Build ID: 8349ace3c3162073abd90d81fd06dcfb6b36b994
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL
Rows and colums are fixed, properties are stored (SplitRow/SpitColumn).
-storing and closing document -> still fixed.
Comment 8 QA Administrators 2023-01-30 03:21:56 UTC Comment hidden (obsolete)
Comment 9 Hans-Werner 2023-01-30 12:15:08 UTC
RESOLVED

Version: 7.5.0.2 (X86_64) / LibreOffice Community
Build ID: c0dd1bc3f1a385d110b88e26ece634da94921f58
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded