https://bugs.documentfoundation.org/show_bug.cgi?id=173613
Bug ID: 173613
Summary: Start Center File → Open does not apply saved document
window size and position
Product: LibreOffice
Version: 27.2.0.0 alpha0+ master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
Description:
Opening a document from the Start Center reuses that frame and delivers
COMPONENT_REATTACHED with a new controller.
In unpatched builds, PersistentWindowState uses a frame-lifetime flag
(m_bWindowStateAlreadySet). Because the Start Center has already initialized
the frame, COMPONENT_REATTACHED does not apply the new document's saved
WindowState from model ViewData. The document window therefore keeps the Start
Center or module fallback geometry.
My proposed fix tracks the last processed controller. When a new controller is
attached, it applies model ViewData on both COMPONENT_ATTACHED and
COMPONENT_REATTACHED. Module configuration remains a fallback only for
COMPONENT_ATTACHED when model ViewData is unavailable.
See also: tdf#41777, tdf#75644, tdf#168530, tdf#166698
Steps to Reproduce:
1. Start LibreOffice at the Start Center.
2. File → Open a Writer or Calc document.
3. Move and resize the window to a distinctive size, then save.
4. Close the document to the Start Center, or quit LibreOffice.
5. From the Start Center, File → Open the same file.
Actual Results:
The document window keeps the Start Center (or module fallback) size and
position instead of the size saved with that document.
Expected Results:
If the document has saved WindowState in model ViewData, that size and
position should be applied before the document is first shown.
Reproducible: Always
User Profile Reset: Yes
Additional Info:
A two-file PersistentWindowState patch is ready and will be uploaded to Gerrit
against this bug once the tdf# is assigned.
Validation:
* macOS master: instrumented patched-versus-control A/B tests on Writer and
Calc.
* Control: COMPONENT_REATTACHED did not apply model ViewData; the first expose
retained Start Center geometry.
* Patched: model ViewData was applied during COMPONENT_REATTACHED before the
first expose.
* The unpatched symptom was also observed in stock Writer and Calc on Linux and
in current stable Writer on Windows.
* The patch has not been built or tested on Linux or Windows.
Version: 27.2.0.0.alpha0+ (AARCH64)
Build ID: 8ce702c278f7c3f403602469e0cb38402c2b4375
CPU threads: 8; OS: macOS 15.6.1
UI render: Skia/Raster; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
--
You are receiving this mail because:
You are the assignee for the bug.