Date: prev next · Thread: first prev next last
2019 Archives by date, by thread · List index


Hi all,

Miklos Vajna schrieb am 08-Nov-19 um 09:33:
Hi,

On Thu, Nov 07, 2019 at 11:01:33PM +0100, Regina Henschel <rb.henschel@t-online.de> wrote:
Ok, that contains how to use an UndoManager.

Yes, that was the intention I assume -- tiledrendering is just a suite
that happened to contain that example code. :-)

But how can I act with the shape, so that an undo-entry is generated?
UI actions, that produce the error are: changing line or fill attributes,
switching extrusion on/off, setting "Autofit text" on.

I think the general concept is that if you manipulate the doc model
directly (SdrModel), then you don't get undo/redo. In contrast, if you
manipulate the doc model via UNO or the UI shells, then you get it.

I first tried with comphelper::dispatchCommand(), which I had seen in tiledrendering, but that did not know the needed SID. Now I have used pViewShell->GetViewFrame()->GetDispatcher()->Execute, which I have seen in uiimpress, and that works.


And would it be correct to add my test to that file? My topic is different
from 'tiledrendering'.

If you want to test Impress undo/redo, my first guess would be
sd/qa/unit/uiimpress.cxx.

Yes, that is suitable. It has already some undo parts. My patch is finished now. Find it in https://gerrit.libreoffice.org/#/c/82367/2

Kind regards
Regina

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.