Hi Mathias,

Thank you for the detailed explanation. I have some further questions.
Please read it inline.

在 2009-09-09三的 12:08 +0200,Mathias Bauer写道:
> Zhu Lihua wrote:
> 
> > Hi,
> > 
> > Thank you, Joost, Niklas and Bjoern.
> > 
> > It's still abit abstract for me. I know SlotIDs are constants defined
> > in .hrc files, e.g., sc.hrc. What about WhichIDs?
> 
> They are also defined in some hrc or hxx files somewhere.
Do you have a example by hand, which shows WhichIDs defined?

> 
> > Could you please give me a simple example to illustrate the relationship
> > between "module", "item", "whichId" and "SlotId"?
> 
> "Modules" here means the application module. While slotids mark a
> functionality in the UI, whichids mark the corresponding attribute in
> the document core of the application.
Does it mean WhichID is a root ID of the corresponding SlotIDs?
I guess, common functionality in different module have different SlotID,
but they have the same WhichID which match this functionality. So we
convert it to WhichID, and the program know which functionality is it.
Right?
> 
> As an example, we have a slotid that can be used to change the font size
> of a text, SID_ATTR_FONT_SIZE. The id has a numerical value that is
> defined in svx.hrc. When an item with that slotid is passed to a
> SfxDispatcher call to one of our documents, its ID is converted to the
> matching whichid that the attribute "font size" has in the "document pool".
> 
> > 
> >>>From Niklas' explanation, I sense each module have a range of WhichIDs.
> > What does "module" means here? Does it mean the application module? 
> Yes.
> 
> > Writer, calc, impress and so on. "an ItemPool can define a Slot-ID for
> > each Which-ID. The same Slot-ID is then used for an item across the
> > modules", I can't understand the above explanation. Different module
> > have different WhichIDs. How can it use same SlotID? Does it define the
> > same SlotID for different WhichID in different modules?
> 
> The slotid is a universal ID, it is understood in all modules. In the
> code of each application module there is a conversion table that
> converts the slot ids into the matching whichids.
Where is this table? I believe it helps to me to understand the
relationship of the SlotID and WhichID. Does it exist as a file? or Is
it a dynamic array in the run time?
> 
> Usually you don't need to care for the exact values, you just should be
> aware of this fact.
> 
> Regards,
> Mathias
> 

Thank you very much.

Best regards,
-- 
Lihua


北京红旗贰仟软件技术有限公司
Beijing Redflag 2000 Software Co., Ltd.
Building No.2, Block A, Huilongsen, 18 Xihuan Nanlu
Beijing Economic-Technological Development Area
Beijing - P.R.China

Tel:+86-10-51570010 ext.6141
http://www.RedOffice.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to