User:FlyingHat

= Presentation = Name : Alain Kong. Intern in the Labfree at Paritalie.

= Work/Tasks = Actually working on OOo4Kids and OOoLight.
 * OOo4Kids on Windows : OOo4Kids build under Windows 7 OS.
 * OOo4kids (Debian) : correction of a display bug at the home menu and addition of a centered help bubble on the home menu.

= Diary =

10-12-2010
I solved the problem, the highlight does not appear by itself anymore, and appears on the left or one the right depending on which key you press first. I inverted my boolean 'TEST' by setting to 'TRUE' by default so I can set it to 'FALSE' for the only situation where it gets the focus, and it takes less modifications in the code : SAL_DLLPRIVATE void                   ImplChangeHighlight( ImplToolItem* pItem, BOOL bNoGrabFocus = FALSE, BOOL TEST = TRUE );

// (in toolbox.cxx - 'ImplChangeHighlight') if (!TEST) {    mnHighItemId = 0; mnCurPos = TOOLBOX_ITEM_NOTFOUND; } else {    mnHighItemId = pItem->mnId; ImplDrawItem( aPos, 2 );   // always use shadow effect (2) if( mbSelection ) mnCurPos = aPos; }

I then added a new parameter to 'ImplChangeHighlightUpDn' that I called 'iffocus' set to 'FALSE' by default. SAL_DLLPRIVATE BOOL                   ImplChangeHighlightUpDn( BOOL bUp, BOOL bNoCycle = FALSE, BOOL iffocus = FALSE ); Here I changed a ternary to an 'if/else' condition, purposely for a certain call of 'ImplChangeHighlight', because I couldn't stipulate several parameters : if( (it != mpData->m_aItems.end && &(*it) == ImplGetFirstClippedItem( this )) && IsMenuEnabled ) {    ImplChangeHighlight( NULL ); ImplDrawMenubutton( this, TRUE ); } else {  // ImplChangeHighlight( (it != mpData->m_aItems.end) ? ((&(*it)),FALSE,FALSE) : NULL ); if (it != mpData->m_aItems.end) {    if (!iffocus) ImplChangeHighlight(&(*it)); // here else ImplChangeHighlight(&(*it), FALSE, FALSE); }  else ImplChangeHighlight(NULL); } return TRUE; 'iffocus' means that the window just got the focus. When 'TRUE', this avoids the highlight in 'ImplChangeHighlight'. When 'FALSE', this allows the highlight, as usual, for the press of the 'left' and 'right' keys. 'iffocus' is set to 'TRUE' in 'Notify' : long ToolBox::Notify( NotifyEvent& rNEvt )

if( rNEvt.GetWindow == this ) {    // the toolbar itself got the focus if( mnLastFocusItemId != 0 ) {        // restore last item ImplChangeHighlight( ImplGetItem( mnLastFocusItemId ) ); mnLastFocusItemId = 0; }    else if( (GetGetFocusFlags & (GETFOCUS_BACKWARD|GETFOCUS_TAB) ) == (GETFOCUS_BACKWARD|GETFOCUS_TAB)) // Shift-TAB was pressed in the parent ImplChangeHighlightUpDn( FALSE ); // here else ImplChangeHighlightUpDn( TRUE, FALSE, TRUE ); mnLastFocusItemId = 0; return true; } This is where the highlight is ordered at the same time as the focus. By specifying 'iffocus' here, we can separate the focus situation from the left key situation in 'ImplChangeHighlightUpDn', and this is how the left key's highlight works again.

4-12-2010
I fixed a big part of the bug but still, it's not fully functional. In fact, the highlight does not appear anymore when launching OOo4kids or focus its window, but the highlight and selection operates only if you press right key first. More precisely, the left key works only once you have pressed right key. The other issue is that after pressing the first key, the highlight appears directly on the right icon ("open a document...").

I added a boolean parameter to the method 'ImplChangehighlight' and set its value to 'FALSE' by default. // ~/my_OOo4kids/vcl/inc/vcl/toolbox.hxx SAL_DLLPRIVATE void                   ImplChangeHighlight( ImplToolItem* pItem, BOOL bNoGrabFocus = FALSE, BOOL TEST = FALSE ); Then I added a condition in 'ImplChangeHighlight' : if( pItem ) {      USHORT aPos = ToolBox::ImplFindItemPos( pItem, mpData->m_aItems ); if( aPos != TOOLBOX_ITEM_NOTFOUND) {          // check for line breaks USHORT nLine = ImplGetItemLine( pItem ); if( nLine >= mnCurLine + mnVisLines ) {              mnCurLine = nLine - mnVisLines + 1; mbFormat = TRUE; }          else if ( nLine < mnCurLine ) {              mnCurLine = nLine; mbFormat = TRUE; }          if( mbFormat ) ImplFormat; // here if (TEST) {              mnHighItemId = pItem->mnId; ImplDrawItem( aPos, 2 );   // always use shadow effect (2) if( mbSelection ) mnCurPos = aPos; }          else {              mnHighItemId = 0; mnCurPos = TOOLBOX_ITEM_NOTFOUND; }          ImplShowFocus; ImplCallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHT ); } After this, I set every attribute 'TEST' to 'TRUE' whenever 'ImplChangeHighlight' is called and given a first parameter other than 'NULL' or something equal to 'NULL'. The bug comes from the fact that the code links the focus to the highlight change. In fact, the highlight occurs only while the window gets the focus : the incrementation that makes the highlight appear occurs everytime OOo4kids gets the focus. mnHighItemId = pItem->mnId; This line allows the movement of the highlight from an icon to another, and because it is basically set at the focus of OOo4Kids, it starts at the first icon. else {    mnHighItemId = 0; mnCurPos = TOOLBOX_ITEM_NOTFOUND; } This resets the highlight position to zero, meaning that there is no highlight. Normally, I did it so this occurs only while focusing back to the window. But with all these modifications, the highlight does not appear with the left key anymore when pressed first.

25-11-2010
Using 'cout' in 'void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, BOOL bNoGrabFocus )' ('/my_OOo4kids/vcl/source/window/toolbox.cxx') to display some text in order to follow and visualize concretely the course of the execution in the source code. Whenever the highlight appears - which implies launching OOo4kids, switching window, moving the highlight by selecting with arrows, and minimizing then maximizing the window -, the execution enter this condition : //... after line 6000 if( pItem ) {    USHORT aPos = ToolBox::ImplFindItemPos( pItem, mpData->m_aItems ); if( aPos != TOOLBOX_ITEM_NOTFOUND) {        std::cout << _TEST_1_ << std::endl; USHORT nLine = ImplGetItemLine( pItem ); //...      }      //...    } Whenever another window is selected or OOo4kids is minimized, it enters this 'else' : else {    std::cout << "_TEST_2_" << std::endl; ImplHideFocus; mnHighItemId = 0; mnCurPos = TOOLBOX_ITEM_NOTFOUND; } This condition occurs before the two conditions above, when switching windows, minimizing, or selecting an icon : if ( mnHighItemId ) {    std::cout << "_TEST_0_" << std::endl; ImplHideFocus; USHORT nPos = GetItemPos( mnHighItemId ); pOldItem = ImplGetItem( mnHighItemId ); mnHighItemId = 0; ImplDrawItem( nPos, FALSE ); ImplCallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHTOFF, reinterpret_cast< void* >( nPos ) ); }

24-11-2010
Unfortunately I downloaded an old version ('svn checkout -r974 svn://svn.adullact.net/svnroot/ooo4kids1/trunk my_OOo4Kids'), so I did an svn up and rebuilt it. I rebuilt the 'vcl', 'framework' and 'sfx2' with debugging symbols again and copied the lib files into '/my_OOo4Kids/instsetoo_native/unxlngi6.pro/OOo4Kids/installed/install/fr/ooo4kids1.1/basis1.1/program' :

libdesktop_detectorli.so_back libvclli.so_back libvclplug_genli.so_back libvclplug_svpli.so_back libfweli.so_back libfwili.so_back libfwkli.so_back libfwlli.so_back libfwmli.so_back libsfxli.so_back
 * 1) /vcl/unxlngi6.pro/lib/
 * 1) /framework/unxlngi6.pro/lib/
 * 1) /sfx2/unxlngi6.pro/lib/

I started to use 'gdb' with OOo4kids to

23-11-2010
I rebuilt the 'framework' and 'sfx2' with debugging symbols too, but my version of OOo4kids was too old, I was told to do a 'svn up' to get the most recent version of OOo4kids (1.1). The svn didn't want to launch itself saying I had an old version of the client. But even after doing 'sudo apt-get install subversion' it said that it was the most recent version. So I removed svn and installed it again ('apt-get remove subversion' then 'apt-get install subversion') but it didn't help. I deleted all the sources, re-downloaded it from svn and built it over night (without forgetting the command 'export DPKGFORMAT=installed' before the build).

22-11-2010
I built the 'vcl' module with debugging symbols : I launched the configure, the bootstrap, and sourced the compilation env, then I did 'build debug="z"' in the vcl module folder. Then I searched for the vcl lib files in unxlngi6.pro and in instsetoo_native and copied the compiled libs from '/vcl/unxlngi6.pro/lib/' ('libvclli.so', 'libvclplug_genli.so', 'libvclplug_svpli.so') to '/instsetoo_native/unxlngi6.pro/OOo4Kids/installed/install/fr/ooo4kids1.0/basis1.0/program/' after I made backups of the files. The symbols are now visible in the terminal after launching OOo4kids.

22-10-2010
Started reading C++ tutorials in order to understand C++ and its syntax.

20-10-2010
The build went all through. I successfully launched OOo4kids, everything works.

19-10-2010
I bought a new hard disk drive, and installed Debian OS on it. About the patch, finally, I applied it mannually, but since I'm on my new HDD I don't have the file or the links, I'll put them on the wiki later. With the patch applied, I tried to build OOo4kids again, but endend with the same error. Before leaving, I launched the build on Debian.

18-10-2010
Trying to apply the patch but I can't find the folder or the file to patch. I tried in the cygwin folder and sub-folders and also in the OOo4kids sources. $ patch -p0 --dry-run < ce6f2b5587ff can't find file to patch at input line 12 ... |diff -r 2cd4e013e863 -r ce6f2b5587ff solenv/bin/deliver.pl |--- a/solenv/bin/deliver.pl   Tue Jan 05 12:38:29 2010 +0100 |+++ b/solenv/bin/deliver.pl   Tue Jan 12 13:31:15 2010 +0100 -- File to patch:

15 - 16-10-2010
It might be an issue with cygwin, I received links for a patch. Reading documentations and learning how to apply the patch.

8-10-2010 - 14-10-2010
I got really stuck with those errors and looked for solutions on google and asked for help, in vain.

7-10-2010
I copied 'dmake.exe' manually which was found in 'solenv/wntmsci12/bin/' into 'dmake/' : passed the bootstrap. It did not change anything, therefore the build led me to the same error.

6-10-2010
I thought that maybe it was a question of rights for the 'stlport_71.lib' file, so I did a chmod 775, and tried the build again. I did a make clean but it looks like I did it wrong : the configure went well but the bootstrap did not find 'dmake.exe', I've never had this problem before.

5-10-2010
Catching up on the wiki, and back to the compilation.

4-10-2010
Starting my wiki page.

Summary
By following the OOo4Kids wiki about the build under Windows, I downloaded Cygwin and installed SVN to download the sources. Once the sources were downloaded, I got MSDK and msvc from Visual C++ and some blobs to put in the 'external' folder and used the configure command line given in the wiki. It took me a little time to understand the options since I have several partitions and because it was my first time using Cygwin (Windows 7 as well). The tree under Windows and within Cygwin are not the same and the name of the folders are different too (Cygwin is in English and I have a French version of Windows 7). Once I got used to all this, I modified the options so that it was adapted to my folders and started the build and ran into several issues. ERROR: error 65280 occurred while making /cygdrive/c/Users/kong_a/Desktop/my_OOo4Kids/soltools/mkdepend
 * symlinks : indeed, I ran into this problem and I started renaming the symlinks, and particularly, the 'awk' file that I had to rename it to 'awk.exe' (there must be no 'awk').
 * missing binaries : when I installed Cygwin, I did not get all the packages, and I did not know they were not installed automatically or what it really was. So I first downloaded the packages on Cygwin each time I ran into an error, then I read the wiki attentively and understood the part about Cygwin packages, and got the rest and finished the configure.
 * winenv.set.sh : the boostrap went well, but I couldn't launch the build because of this file. First I couldn't launch the file then I tried some wrong commands while the build command was nowhere to be found. The right command line (which at least worked for me) is 'source winenv.set.sh'.
 * build error : the build launched successfully until it got to the module 'soltools' where it stopped with an error :
 * and more precisely, when build is launched in the 'soltools' folder :

LINK : fatal error LNK1181: impossible d'ouvrir le fichier en entrée 'stlport_71.lib' dmake: Error code 157, while making '../wntmsci12.pro/bin/makedepend.exe'