Issue 122047

Summary: [Sidebar]On properties panel, superscript and subscript buttons do not work as intended
Product: Writer Reporter: rgb <rgb.mldc>
Component: uiAssignee: Oliver-Rainer Wittmann <orw>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: awf.aoo, issues, liuyixuan.527, orw, ydario, zheng.easyfan
Version: 4.0.0-dev   
Target Milestone: 4.0.0   
Hardware: All   
OS: Linux, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 121420    

Description rgb 2013-04-14 00:26:41 UTC
On a recent dev build with the sidebar enabled, open a Writer document, select some text and press, on the properties panel in the sidebar, the buttons for superscript or subscript: the text is not changed. 

Now, with some text selected use the keyboard shortcuts to apply superscript or subscript, Ctrl-P or Ctrl-B: the corresponding button on the sidebar will be highlighted. 

The buttons on the sidebar seems to recognize the status of sub or superscript on the text, but cannot apply it. 

Note that the corresponding buttons on the Formatting toolbar work without problems.
Comment 1 Andre 2013-04-15 12:55:22 UTC
I can not reproduce this.  As discussed on the mailing list, this may be an artifact caused by a broken incremental windows build.
Comment 2 liuyixuan.527 2013-04-23 14:43:44 UTC
I could reproduced
Comment 3 Andre 2013-04-24 08:43:03 UTC
liuyixuan.527@gmail.com: Please be more specific.
Comment 4 zhengfan 2013-04-26 03:41:57 UTC
Yes I confirm it could be reproduced in SUSE environment:
In AOO create a writer document and input some text inside;

Select some text and click the superscript or subscript toolbox item, nothing happens;
Correponding boolboxes avaliable in toolbar;
-------------------------
But the exact same build (also confirmed) in windows/Mac working correctly. So it should be a linux platform related issue.
Comment 5 rgb 2013-04-27 20:55:29 UTC
@ zhengfan: do you have a 64 bits system? It seems that 32 bits systems do not show the problem, but both 32 and 64 bits builds show the problem on 64 bits systems.
Comment 6 Oliver-Rainer Wittmann 2013-05-03 11:18:49 UTC
rgb and/or zhengfan:
Could you please check, if the described defect also occurs in Calc, Impress and Draw. Thx in advance.
Comment 7 rgb 2013-05-03 21:43:07 UTC
(In reply to comment #6)
> rgb and/or zhengfan:
> Could you please check, if the described defect also occurs in Calc, Impress
> and Draw. Thx in advance.

The problem is only present on Writer. On Calc, Impress and Draw both superscript and subscript buttons on sidebar work OK.
Comment 8 Oliver-Rainer Wittmann 2013-05-06 09:35:47 UTC
Adjusting 'Platform' to 'Linux64' regarding the given comments.
Comment 9 Oliver-Rainer Wittmann 2013-05-06 09:36:29 UTC
taking over for further investigation
Comment 10 Oliver-Rainer Wittmann 2013-05-06 10:18:30 UTC
I reproduced the described defect on Linux 32bit (Ubuntu 32bit 11.10)
--> 'Platform' back to 'Linux'
Comment 11 Oliver-Rainer Wittmann 2013-05-06 11:43:20 UTC
I just figured out in my Linux environments (Ubuntu 11.10 32bit and 64bit) that the sidebar panels whose controls shown/hidden/enabled/disabled depending on the context does not reflect the context dependency. E.g. in the text property panel the highlight color control should be hidden in Calc, Draw and Impress, but under Linux it is not.

Can somebody confirm my observation?
Comment 12 rgb 2013-05-06 17:12:46 UTC
(In reply to comment #11)
> I just figured out in my Linux environments (Ubuntu 11.10 32bit and 64bit)
> that the sidebar panels whose controls shown/hidden/enabled/disabled
> depending on the context does not reflect the context dependency. E.g. in
> the text property panel the highlight color control should be hidden in
> Calc, Draw and Impress, but under Linux it is not.
> 
> Can somebody confirm my observation?

I confirm this on my Linux 64 bits box. Also, when selecting a picture on Writer I can see the rotation controls: rotation of pictures on Writer is not implemented yet so those controls should not be there.
Comment 13 Andre 2013-05-08 10:00:20 UTC
With Olivers preparation and help I have found the root cause for the missing context notifications.  Context notifications are done via the sfx2::sidebar::IContextChangeReceiver interface.  On a context change the SidebarPanelBase class attempts to dynamic_cast the panel object to IContextChangeReceiver.  This cast fails for a few compilers because they provide vtable information only when there is a virtual destructor.  Up to now IContextChangeReceiver had only one abstract virtual function and no destructor.

Adding the virtual destructor should fix this problem.
Comment 14 Andre 2013-05-10 11:05:02 UTC
Added virtual constructors to IContextChangeReceiver for the problem described in this issue and to ILayoutableWindow to fix a problem with disappearing panels.
Comment 15 Andre 2013-05-10 11:10:29 UTC
*** Issue 122052 has been marked as a duplicate of this issue. ***
Comment 16 SVN Robot 2013-05-10 11:20:20 UTC
"af" committed SVN revision 1480980 into trunk:
122047: Adding virutal destructors to interfaces to prevent problems with old...
Comment 17 Yuri Dario 2013-05-11 14:32:59 UTC
after SVN revision 1480980, the files 

sfx2/source/sidebar/IContextChangeReceiver.cxx
sfx2/source/sidebar/ILayoutableWindow.cxx

are missing in the trunk. maybe related headers too.
Comment 18 SVN Robot 2013-05-13 07:59:10 UTC
"af" committed SVN revision 1481723 into trunk:
122047: Added missing implementation of virtual destructors.
Comment 19 SVN Robot 2013-05-13 08:18:23 UTC
"orw" committed SVN revision 1481728 into trunk:
122047: adding missing pre-compiled header include
Comment 20 Oliver-Rainer Wittmann 2013-05-13 10:35:20 UTC
*** Issue 122048 has been marked as a duplicate of this issue. ***