openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jorge ivan poot diaz <ivan.pootd...@gmail.com>
Subject Re: FormatArea Draw
Date Wed, 20 Mar 2013 01:56:34 GMT
hello,

I understand that:
155    aBtnAdd.SetClickHdl( LINK( this, SvxColorTabPage, ClickAddHdl_Impl )
);

Generates the window to register a new color:
465  IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG )

I want to make: that the new color added
-- The user does not enter the color name, the system automatically do this

So the color is recorded automatically,

Any ideas for to do this

help me, please!

Regards


2013/3/18 Ariel Constenla-Haile <arielch@apache.org>

> On Mon, Mar 18, 2013 at 02:41:12PM -0600, jorge ivan poot diaz wrote:
> > where's the code that registers the new color?
> > > The button to add colors, now I want to know where is the code that
> > > registers the colors.
>
> Once you have found where the source code for that tab page is, build
> cui (or this file) with debug symbols, set a break point, and start
> learning by debugging. There is no other way.
>
> I already pointed you in another mail where to look.
> Try to locate in cui/source/tabpages/tpcolor.cxx the button that you
> press to add a new color. It is named aBtnAdd.
>
> When you insert a push button, you may want to get notified when the user
> pushed it: this is done in the constructor
> SvxColorTabPage::SvxColorTabPage
>
> aBtnAdd.SetClickHdl( LINK( this, SvxColorTabPage, ClickAddHdl_Impl ) );
>
> In IMPL_LINK( SvxColorTabPage, ClickAddHdl_Impl, void *, EMPTYARG )
>
> http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/cui/source/tabpages/tpcolor.cxx#465
> you can see the code that triggered the dialog in
> http://imagebin.org/250778
> In the same place is the code that "adds" the new color:
>
> http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/cui/source/tabpages/tpcolor.cxx#525
>
> 525        pEntry = new XColorEntry( aAktuellColor, aName );
> 526
> 527        pColorTab->Insert( pColorTab->Count(), pEntry );
>
>
> Of course, to understand how this ends up in an XML file named
> standard.soc in <user directory>/config/standard.soc you will have to
> study the code. I already told in other mail that you will end up in the
> class XColorTable, in the svx module.
>
> In a project so complex like this, there isn't a single place in
> a source file where something is done as an atomic, isolated action; so
> you won't find the "code that registers the colors", there are several
> classes, in several modules. IMHO the only way to progress diving into
> this, is building with debug symbols, and start learning by debugging.
>
>
> Regards
> --
> Ariel Constenla-Haile
> La Plata, Argentina
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message