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


Hi there,

On Tue, 2012-02-21 at 08:52 +0100, Winfried Donkers wrote:
Presently, the last used colour is stored within the control
(mLastColor) and in the shell (e.g. ScFormatShell, SwTextShell) where
the execute function is. 

        Riight - that doesn't seem so optimal :-)

I would like to obtain the last used colour from the control when the
execute function is called. When a user wants to use the last used
colour, the execute funtion is called with the SlotId, but without
other arguments. 

        OK - makes sense. So presumably we could add arguments to the
SfxRequest that gets passed in there with the last color selected ?

Does anyone know if and how the control can be addressed from the
execute function (with the SlotId as key)? I can then add a simple
GetLastColor() method to the control and remove all redundant
lastusedColor stuff within the shell.

        Might it not be better to pass the color into the code via the
SfxRequest's Attrs ?

#0  ScFormatShell::ExecuteAttr (this=0x8ace6e0, rReq=...)
at /data/opt/libreoffice/master/sc/source/ui/view/formatsh.cxx:1421
#1  0xae7aadb0 in SfxStubScFormatShellExecuteAttr (pShell=0x8ace6e0,
rReq=...)
at /data/opt/libreoffice/master/workdir/unxlngi6.pro/SdiTarget/sc/sdi/scslots.hxx:5469
#2  0xb683094b in ?? () from /data/opt/OOInstall/program/libmergedlo.so
#3  0xb682bb25 in ?? () from /data/opt/OOInstall/program/libmergedlo.so
#4  0xb6840e12 in ?? () from /data/opt/OOInstall/program/libmergedlo.so
#5  0xb68413ef in ?? () from /data/opt/OOInstall/program/libmergedlo.so
#6  0xb693da13 in SfxToolBoxControl::Dispatch(rtl::OUString const&,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&) ()
   from /data/opt/OOInstall/program/libmergedlo.so
#7  0xb6e6caa1 in SvxFontColorExtToolBoxControl::Select(unsigned char)
() from /data/opt/OOInstall/program/libmergedlo.so
#8  0xb693b6a8 in SfxToolBoxControl::Select(unsigned short) ()
from /data/opt/OOInstall/program/libmergedlo.so

        Looks like you could add

        svx/source/tbxctrls/tbcontrl.cxx

        some magic into the SfxToolboxControl::Dispatch's arguments, though I
suspect you'd need to tweak the scslots.sdi file for that ID as well -
it's not a piece I'm horribly familiar with, but hopefully tracing
through another id that passes more parameters might do.

        Does that help ? :-) hopefully having got one done, the rest will
follow ...

        Thanks for tackling this!

                Michael.

-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot


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.