Bug 167549 - Opening a document as read only does not work
Summary: Opening a document as read only does not work
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, possibleRegression
Depends on:
Blocks: CSV-Dialog
  Show dependency treegraph
 
Reported: 2025-07-17 18:07 UTC by seven
Modified: 2026-07-01 03:03 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 seven 2025-07-17 18:07:31 UTC
Description:
Opening a file in read-only lock mode does not open it in this mode and locks the file for other applications

Steps to Reproduce:
1. Launch LibreOffice Calc (maybe other file types too)
2. Open the Open dialog box and select the file.
3. Check the "Read-only" box.
4. Open document

Actual Results:
The document is open for editing.

Expected Results:
The document is open for reading only.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.8.0.1 (X86_64)
Build ID: 127f2cf27c25aaac008a1045ebfed22015cb3064
CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL threaded
Comment 1 Takenori Yasuda 2025-07-18 02:07:15 UTC
Reproduced not only in Calc but also in Writer, Impress, and Draw.

Version: 25.8.0.1.0+ (X86_64) / LibreOffice Community
Build ID: d9236672b8d2928692c1948c99a8e6372dc9b2c2
CPU threads: 8; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded Jumbo
Comment 2 Saburo 2025-07-18 04:21:05 UTC
bibisected with linux-64-25.8
commit bd1c60bcf290d50a8d496246a785f346a20af04d
author	Shardul Vikram Singh

[API CHANGE] tdf#74580 Add option to skip filter settings dialog

adding CC : Shardul Vikram Singh
Please, take a look?
Comment 3 David H. Gutteridge 2026-06-25 21:09:00 UTC
Still reproducible for me on Fedora 44 with:

Version: 26.2.4.2 (X86_64)
Build ID: 620(Build:2)
CPU threads: 8; OS: Linux 7.0; UI render: default; VCL: gtk3
Locale: en-CA (en_CA.UTF-8); UI: en-US
Calc: threaded

(I discovered this while trying to reproduce https://bugs.documentfoundation.org/show_bug.cgi?id=98053.)
Comment 4 Saburo 2026-06-28 08:35:25 UTC
I haven't tried it yet, but wouldn't changing FILEOPEN_READONLY_VERSION to FILEOPEN_READONLY_VERSION_FILTEROPTIONS work?

https://opengrok.libreoffice.org/xref/core/sfx2/source/dialog/filedlghelper.cxx?r=4df292a3cabba02027b993a0805af7018c327182#1506

 // set the read-only flag. When inserting a file, this flag is always set
     if ( mbInsert )
         rpSet->Put( SfxBoolItem( SID_DOC_READONLY, true ) );
-    else if ( ( FILEOPEN_READONLY_VERSION == m_nDialogType ) && xCtrlAccess.is() )
+    else if ( ( FILEOPEN_READONLY_VERSION_FILTEROPTIONS == m_nDialogType ) && xCtrlAccess.is() )
     {
Comment 5 ady 2026-06-28 13:03:58 UTC
After more than a year, there is no point awaiting for a reply from the author of the commit.

A developer should rather look at all the changes related to tdf 74580.

IDK whether the original reviewer of those patches is still available for LO development, but if there is really an API change (committed more than a year ago ATM) that is causing this bug, it should rather be corrected ASAP, I would guess.

Perhaps the IMPORTANCE of this report should be raised?