Print-Preview in Calc

Kohei Yoshida libreoffice at kohei.us
Fri Feb 20 06:01:42 PST 2015


Hi Juergen,

> On February 20, 2015 at 5:52 AM Juergen Funk Mailinglist
> <Juergen.Funk_ml at cib.de> wrote:
> 
> 
> Hi,
> 
> In Calc the Save button and the SaveAs are enable, but when i change to the
> Print-Preview, both button are disable, under Writer it works.

Lots of operations are disabled in Calc's print preview window intentionally,
and most notably the ability to save from it.

> I've changed it but when I click nothing happens.

It's disabled at 2 different levels; at the icon level, and at the code level,
just to make sure a clever user can't try to circumvent that by modifying the
UI.

> Gived a reason of that manner, when not I open a bug-report an want fixed.

It's not a bug, at least from my point of view. Now, we could debate
indefinitely over whether or not something is a bug, a feature, or an
intentional limitation, and I could see that happening over this behavior.  So,
let me give you a background on this current behavior.

Previously, Calc allowed to save directly from the preview window. But when the
document was saved from the preview window, it would skip storing many crucial
"view" data that Calc expected to see when loading that document again. Such
crucial view data might include active sheet, cursor position, zoom level etc at
the time of last document save. There were one or several bug reports that were
directly or indirectly caused by this lack of view data stored in the document.

I investigated this, and initially I tried to find a way to transfer the view
data from the main Calc window to the preview window so that the data would be
available when the user wished to save the document from the preview window.
Long story short, because of the way the preview window was implemented, it was
just not possible. The preview window, for all intense and purposes, was whole
another application, and transferring data from the main window to this window
was just too much of a hassle to be worthwhile.  So, we've decided to disable
file save, and several other equally affected operations from the preview
window.  I even changed the behavior of the window close action so that when the
user closes the preview window it goes back to the main window rather than
closing the document. (I hope this functionality still works today, but I'm not
too confident given how much change has gone in since that time.)

The reason Writer still allows saving from its preview is simply that I wasn't
familiar with whether or not Writer had the same issue, and I was not confident
enough that I could make the change for Writer. But I did recommend that someone
who is more familiar with the Writer code look into this.

So, if you think it's a bug and wants it "fixed", I can't stop you, but you'd
have to also keep the above fact in mind and make sure that when it is
re-enabled, whatever funny things Calc used to do when the document was saved
from the preview window and reloaded would no longer happen.

FYI, Excel has the same limitation; you can't save Excel document directly from
the preview window. I don't pretend to know their reasoning, but I wouldn't be
surprised that they went through the same ordeal and reached the same conclusion
as we did as I described above.

HTH,

Kohei


More information about the LibreOffice mailing list