Bug 120410 - Inserting of Page Breaks is Possible if Spreadsheet is in Read-only Mode
Summary: Inserting of Page Breaks is Possible if Spreadsheet is in Read-only Mode
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Xisco Faulí
URL:
Whiteboard: target:6.2.0 target:6.1.4
Keywords:
Depends on:
Blocks: Read-Only
  Show dependency treegraph
 
Reported: 2018-10-08 12:25 UTC by Harald Koester
Modified: 2019-01-17 10:18 UTC (History)
4 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 Harald Koester 2018-10-08 12:25:04 UTC
In order to reproduce:

[1] Start Calc and fill cells A1 to B2 with text.
[2] Save but don't close spreadsheet.
[3] Change to read-only mode: Edit > Edit Mode
[4] Select cell B2.
[5] Insert a page break: Sheet > Insert Page Break > Column Break. The page break is inserted. Expected: No page break. Furthermore the terms “Insert Page Break” and “Column Break” should be greyed.
[6] Insert a page break: Sheet > Insert Page Break > Row Break. The page break is inserted. Expected: No page break. Furthermore the terms “Insert Page Break” and “Row Break” should be greyed.

Bug already exists in version 3.3.0. Hence inherited from OOo.

By the way: An icon has been assigned to "Row Break" but not to Column Break.
Comment 1 Xisco Faulí 2018-10-08 15:50:29 UTC
Reproduced in

Version: 6.2.0.0.alpha0+
Build ID: 4854acc7929ea58632c5d0f7f80a4adc3c62b8cd
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded
Comment 2 Xisco Faulí 2018-10-09 21:46:52 UTC
Patch in gerrit: https://gerrit.libreoffice.org/#/c/61602/
Comment 3 Jim Raykowski 2018-10-10 07:33:28 UTC
Maybe adjust this report to Inserting/Deleting as the same happens for deleting.
Comment 4 Xisco Faulí 2018-10-10 08:40:15 UTC
Submitted another patch: https://gerrit.libreoffice.org/#/c/61602/
Comment 5 Commit Notification 2018-10-10 15:31:49 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#120410: Disable insert/delete row/page break in read-only mode

It will be available in 6.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 6 Xisco Faulí 2018-10-10 15:33:35 UTC
Cherry-picked to 6-1 -> https://gerrit.libreoffice.org/#/c/61625/
Comment 7 m_a_riosv 2018-10-10 18:26:06 UTC
I don't know why is a bug, for me an enhancement. A way of help if you need to adjust for print, and it's a voluntary action.

In fact you need to use 'save as' for save the file in such state.
Comment 8 Xisco Faulí 2018-10-10 21:18:23 UTC
(In reply to m.a.riosv from comment #7)
> I don't know why is a bug, for me an enhancement. A way of help if you need
> to adjust for print, and it's a voluntary action.
> 
> In fact you need to use 'save as' for save the file in such state.

In Writer you get the same behaviour. it's disabled in read-only mode...
Comment 9 m_a_riosv 2018-10-10 23:57:58 UTC
Maybe can be an enhancement in writer enable the option.

Why then is enable Menu/Data/Calculate or Menu/Format/Conditional format as example.

Everything that can change values or visualization should be disable?

I'm sorry, but I don't understand what benefit we take with the options disabled.

In any case, if everybody it's fine with that, I don't care, I never disable edit mode.
Comment 10 Xisco Faulí 2018-10-11 07:47:41 UTC
In meta bug 108882, we track all those things that should be disabled in read-only mode.
Everything modifying the document should be disabled in that mode... same for calculate or conditional, if they modify the document they should be disabled...
Comment 11 Commit Notification 2018-10-11 08:00:14 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ea4cef9e01b7f5882614426c231f41b522bf34c5&h=libreoffice-6-1

tdf#120410: Disable insert/delete row/page break in read-only mode

It will be available in 6.1.4.

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 12 BogdanB 2018-10-12 16:55:40 UTC
Verified on
Version: 6.2.0.0.alpha0+
Build ID: 144da6d5079bcd435e6637cb5cf95305f3ec1306
CPU threads: 4; OS: Linux 4.15; UI render: GL; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-10-12_02:13:01
Locale: ro-RO (ro_RO.UTF-8); Calc: threaded


"Row Break" and so on... are greyed.
Comment 13 Commit Notification 2018-10-22 11:51:37 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#120410: Disable insert/delete row/page break if sheet is protected

It will be available in 6.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 14 Commit Notification 2018-10-22 19:58:08 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fad764c02c7a9cd210bfa44ea0ce1ac5354d6427&h=libreoffice-6-1

tdf#120410: Disable insert/delete row/page break if sheet is protected

It will be available in 6.1.4.

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 Harald Koester 2019-01-17 10:18:51 UTC
Verified with version 6.1.4. Works as expected now --> Bug closed.