Help needed with SfxItems mentioned in .sdi files

Miklos Vajna vmiklos at collabora.co.uk
Thu Mar 2 08:21:49 UTC 2017


Hi,

On Thu, Mar 02, 2017 at 09:11:02AM +0100, Stephan Bergmann <sbergman at redhat.com> wrote:
> In <https://gerrit.libreoffice.org/#/c/34775/> "Complete the transition of
> SwRedlineTable::size_type" I have the following question:
> 
> "TODO:  The one place I'm unsure about is SfxUInt16Items with IDs
> FN_REDLINE_ACCEPT_DIRECT, FN_REDLINE_REJECT_DIRECT, and
> FN_REDLINE_NEXT_CHANGE in sw/source/uibase/uiview/view2.cxx.  For now, I
> kept those as SfxUInt16Items and take care to "map" USHRT_MAX to npos when
> reading from those items.  But I have no idea where instances of those items
> would actually be created, and what it would mean to change those items'
> types?"
> 
> Those FN_REDLINE_* are mentioned in sw/sdi/{_viewsh,swriter}.sdi, and those
> .sdi files are a great mystery to me...

.uno:AcceptTrackedChange normally accepts the tracked change at the
current cursor position. I've extended this in
087b71f423cf6c047137fb1316527132bb47fc05 so that if you explicitly
specify the redline index, then it's possible to accept a redline that's
not at the current cursor position. Is there an other SfxPoolItem
subclass you want to use there?

libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx:778 has code that
depends on the current type, but I can imagine upgrading that to 32 or
64bit width would not be a problem. That json is read in
desktop/source/lib/init.cxx:317, where we shift the value into an
uno::Any; so in case it works to have:

sal_uInt16 value1;
size_t value2;
uno::Any any(value1);
any >>= value2;

Then it should be no problem to change the type there.

Does that help?

Regards,

Miklos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20170302/37e168d7/attachment.sig>


More information about the LibreOffice mailing list