Bug 152591 - Deprecate css::text::XTextDocument::reformat(), and document that it does nothing
Summary: Deprecate css::text::XTextDocument::reformat(), and document that it does not...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2022-12-19 12:34 UTC by Mike Kaganski
Modified: 2023-09-11 12:41 UTC (History)
2 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 Mike Kaganski 2022-12-19 12:34:05 UTC
css::text::XTextDocument::reformat is documented [1] to "reformat the contents of the document". However, the implementation of the method [2] does nothing except for boilerplate check that the object is still valid. This has been so since the initial import (commit 7b0b5cdfeed656b279bc32cd929630d5fc25878b, 2000-09-18).

css::text::XTextDocument inherits from css::frame::XModel; and the latter has a 'refresh' method [3], which implementation in SwXTextDocument calls SwViewShell::Reformat [4].

It seems that (a) the original idea of css::text::XTextDocument::reformat is to do the same as what css::frame::XModel::refresh does; and (b) that it makes no sense to implement it now, and a better fix wuld be to just deprecate it and update its documentation.

[1] https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/text/XTextDocument.idl?r=5687eba4#38
[2] https://opengrok.libreoffice.org/xref/core/sw/source/uibase/uno/unotxdoc.cxx?r=c2bcbd36#462
[3] https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/xforms/XModel.idl?r=5687eba4#49
[4] https://opengrok.libreoffice.org/xref/core/sw/source/uibase/uno/unotxdoc.cxx?r=c2bcbd36#2172
Comment 1 Stephan Bergmann 2022-12-19 13:04:33 UTC
@Mike, who put me on cc:  Probably better to seek advice from somebody knowledgeable about Writer, than from somebody knowledgeable about the UNO mechanisms.
Comment 2 Xisco Faulí 2023-09-11 12:41:00 UTC
Hello Mike,
Should this be discussed in the development mailinglist ?