yunjingtao schrieb:
> Daniel schrieb:
>> Please do not rely on the item state only, but test the contents of the
>> item too. See the example for the FID_MERGE_TOGGLE item in the same
>> file: the test  " ... >= SFX_ITEM_DEFAULT "
>> makes sure that the item exists (it has state "DEFAULT" or "SET"), and
>> that it is possible to use the item returned in the pItem parameter of
>> the QueryState function. Try to combine the GetValue() test into the "else 
>> if ..."; 
> 
> hi, Daniel
> I made some changes and submitted another patch to issue25018. 
> I don't know whether I understood you completely.
> The variable bIsFullScreen I add is used to test.  

Hello,


Some comments on the new attached patch: You query the state of item
"nSlot" which is currently "SID_CANCEL" (nSlot is used in the
switch/case). But we need to query the current state of the
SID_WIN_FULLSCREEN slot. Next, you call pTabViewShell->Escape() when
fullscreen is enabled, and disble fullscreen if it is already off.

Please try the following:

1) Add two functions to ScCellShell, as I mentioned in my last mail:

bool IsFullScreen() const
{
   ... query the state of the SID_WIN_FULLSCREEN slot as described
before (use QueryState and SfxBoolItem::GetValue)
}

void SetFullScreen( bool bSet )
{
   ... put a new bool item for the SID_WIN_FULLSCREEN slot
}

This is done to improve readability of the code.

2) Now it is possible to add a simple two-liner to the SID_CANCEL
handler in cellsh3.cxx, something like

  ...
  else if( IsFullScreen() )
      SetFullScreen( false );
  else
  ...


Hope this helps
Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to