<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
        <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
        <TITLE></TITLE>
        <META NAME="GENERATOR" CONTENT="LibreOffice 3.4  (Win32)">
        <META NAME="CREATED" CONTENT="20111024;12115095">
        <META NAME="CHANGED" CONTENT="20111024;12323350">
        <STYLE TYPE="text/css">
        <!--
                @page { margin: 2cm }
                P { margin-bottom: 0.21cm }
                A:link { so-language: zxx }
        -->
        </STYLE>
</HEAD>
<BODY LANG="es-MX" DIR="LTR">
<DIV STYLE="margin-bottom: 0cm"><FONT FACE="Segoe UI, serif"><FONT SIZE=2 STYLE="font-size: 9pt">I
was able to hide / unhide toolbar by following your steps.</FONT></FONT></DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm"><FONT FACE="Segoe UI, serif"><FONT SIZE=2 STYLE="font-size: 9pt">Intead
we save the visible state of each toolbar(in case user has a
customized active), I'll just send setVisible uno command to the
LayoutManager so it toggles the toolbar visible/not visible</FONT></FONT></DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm"><FONT FACE="Segoe UI, serif"><FONT SIZE=2 STYLE="font-size: 9pt"><FONT COLOR="#0000ff"><FONT SIZE=2><SPAN LANG="">if</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">
(SUCCEEDED(hr) &amp;&amp; bHide)</SPAN></FONT></FONT></FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=2>        {</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=2>                VariantInit(&amp;param1);</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=2>                param1.vt
= VT_BOOL;</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=2>                param1.boolVal
= VARIANT_FALSE;</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">                hr
= _OpenOffice::ExecuteFunc( pLayoutManager, L</SPAN></FONT></FONT><FONT COLOR="#a31515"><FONT SIZE=2><SPAN LANG="">&quot;setVisible&quot;</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">,
&amp;param1, 1, NULL );</SPAN></FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=2>                VariantClear(&amp;param1);</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=2>        }</FONT></FONT></DIV>
<DIV STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">        </SPAN></FONT></FONT><FONT COLOR="#0000ff"><FONT SIZE=2><SPAN LANG="">else</SPAN></FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=2>        {</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=2>                VariantInit(&amp;param1);</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=2>                param1.vt
= VT_BOOL;</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=2>                param1.boolVal
= VARIANT_TRUE;</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">                hr
= _OpenOffice::ExecuteFunc( pLayoutManager, L</SPAN></FONT></FONT><FONT COLOR="#a31515"><FONT SIZE=2><SPAN LANG="">&quot;setVisible&quot;</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">,
&amp;param1, 1, NULL );</SPAN></FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=2>                VariantClear(&amp;param1);</FONT></FONT></DIV>
<DIV STYLE="margin-bottom: 0cm"><FONT SIZE=2><FONT COLOR="#000000"><SPAN LANG="">        }</SPAN></FONT></FONT></DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm"><FONT SIZE=2><FONT COLOR="#000000"><SPAN LANG="">Noel:
the original code of HideToolbars is applied to the first instance of
the Writer object, later instaces created after that appear without
the toolbar the same way as the first. Even if the user tries to
start working in the Writer afterwards the toolbar is gone, so he
needs to &ldquo;reset&rdquo; the toolbar to make them appear again.</SPAN></FONT></FONT></DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm"><FONT SIZE=2><FONT COLOR="#000000"><SPAN LANG="">I'm
not sure how old this bug is... but I've seen this since 3.2.1-9
Novell Edition build.</SPAN></FONT></FONT></DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm"><FONT SIZE=2><FONT COLOR="#000000"><SPAN LANG="">I've
included an snapshot how the embedded editor look right now, while
was composing this emai. I'm having refresh issue while switching to
text view but beside that I could say the bug is &ldquo;fixed&rdquo;</SPAN></FONT></FONT></DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"> <FONT SIZE=2><SPAN LANG="">Original
code:</SPAN></FONT></FONT></DIV>
<DIV STYLE="margin-bottom: 0cm"><FONT SIZE=2><FONT COLOR="#000000"><SPAN LANG="">/***********************************************</SPAN></FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>/*if
(SUCCEEDED(hr) &amp;&amp; bHide)</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>        {</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                for
(WINT i = 0; SUCCEEDED(hr) &amp;&amp; wzAllToolBarsAndMenus[i]; i++)</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                {</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        VariantInit(&amp;param1);</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        VariantClear(&amp;result);</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        param1.vt
= VT_BSTR;</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        param1.bstrVal
= ::SysAllocString(wzAllToolBarsAndMenus[i]) ;</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        hr
= _OpenOffice::ExecuteFunc( pLayoutManager, L&quot;isElementVisible&quot;,
&amp;param1, 1, &amp;result );</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        if
(result.vt == VT_BOOL)</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        {</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                                m_bToolBarActive[i]
= (result.boolVal == VARIANT_TRUE) ? TRUE : FALSE;</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        }</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        VariantClear(&amp;param1);</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        VariantClear(&amp;result);</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                }</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>        }</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>        if
(SUCCEEDED(hr))</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>        {</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                for
(WINT i = 0; SUCCEEDED(hr) &amp;&amp; wzAllToolBarsAndMenus[i]; i++)</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                {</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        VariantInit(&amp;param1);</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        param1.vt
= VT_BSTR;</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        param1.bstrVal
= ::SysAllocString(wzAllToolBarsAndMenus[i]) ;</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        if
(bHide)</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        {</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                                hr
= _OpenOffice::ExecuteFunc( pLayoutManager, L&quot;hideElement&quot;,
&amp;param1, 1, NULL );</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        }</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        else
if (m_bToolBarActive[i])</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        {</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                                hr
= _OpenOffice::ExecuteFunc( pLayoutManager, L&quot;showElement&quot;,
&amp;param1, 1, NULL );</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        }</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                        VariantClear(&amp;param1);</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>                }</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><FONT COLOR="#008000"><FONT SIZE=2>        }*/</FONT></FONT></DIV>
<DIV LANG="" STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm"><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">        hr
= _OpenOffice::ExecuteFunc( pLayoutManager, L</SPAN></FONT></FONT><FONT COLOR="#a31515"><FONT SIZE=2><SPAN LANG="">&quot;doLayout&quot;</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">,
NULL, 0, NULL );</SPAN></FONT></FONT></DIV>
<DIV STYLE="margin-bottom: 0cm"><FONT SIZE=2><FONT COLOR="#000000"><SPAN LANG="">/****************************************</SPAN></FONT></FONT></DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm"><FONT FACE="Segoe UI, serif"><FONT SIZE=2 STYLE="font-size: 9pt">Carlos
</FONT></FONT>
</DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm"><FONT FACE="serif">&gt;&gt;&gt; Michael
Meeks &lt;michael.meeks@suse.com&gt; 10/24/11 &gt;&gt;&gt;</FONT></DIV>
<DIV STYLE="margin-bottom: 0cm">Hi Noel &amp; co.</DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm">        I'll CC the public dev list on this
since it may be of wider interest.</DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm">On Mon, 2011-10-24 at 11:24 +0100, Noel
Power wrote:</DIV>
<DIV STYLE="margin-bottom: 0cm">&gt; something like this should work (
although doesn't on master or 3.4 
</DIV>
<DIV STYLE="margin-bottom: 0cm">&gt; but... does appear to work on 3.3
:-/ ) seems like this really is a 
</DIV>
<DIV STYLE="margin-bottom: 0cm">&gt; regression</DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm">        Carlos - reading the code, it looks
like 'setVisible' is what you want</DIV>
<DIV STYLE="margin-bottom: 0cm">to be calling - it -looks- (on a first
glance) as if it doesn't save the</DIV>
<DIV STYLE="margin-bottom: 0cm">state in this case - so it should be
something we can call and will not</DIV>
<DIV STYLE="margin-bottom: 0cm">alter the other documents (but perhaps
I'm mistaken).</DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm">&gt; sub togglefind</DIV>
<DIV STYLE="margin-bottom: 0cm">&gt; layoutManager =
thisComponent.currentController.frame.layoutManager</DIV>
<DIV STYLE="margin-bottom: 0cm">&gt; findbarUrl =
&quot;private:resource/toolbar/findbar&quot;</DIV>
<DIV STYLE="margin-bottom: 0cm">&gt; bVis =
layoutmanager.iselementvisible( &quot;private:resource/toolbar/findbar&quot;
)</DIV>
<DIV STYLE="margin-bottom: 0cm">&gt; msgbox &quot;Findbar currently
IsVisible? &quot; &amp; bVis</DIV>
<DIV STYLE="margin-bottom: 0cm">&gt; 
</DIV>
<DIV STYLE="margin-bottom: 0cm">&gt; if bVis then</DIV>
<DIV STYLE="margin-bottom: 0cm">&gt;     layoutmanager.hideElement(
findbarUrl )</DIV>
<DIV STYLE="margin-bottom: 0cm">&gt; else</DIV>
<DIV STYLE="margin-bottom: 0cm">&gt;      layoutmanager.showelement(
findbarUrl )</DIV>
<DIV STYLE="margin-bottom: 0cm">&gt; endif</DIV>
<DIV STYLE="margin-bottom: 0cm">&gt; 
</DIV>
<DIV STYLE="margin-bottom: 0cm">&gt; end sub</DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm">        I'm personally suspicious of:</DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm">commit
560e5132f606b1fcd790e3cf97d665cec8c442fc</DIV>
<DIV STYLE="margin-bottom: 0cm">Author: Carsten Driesner
&lt;cd@openoffice.org&gt;</DIV>
<DIV STYLE="margin-bottom: 0cm">Date:   Mon Nov 1 13:29:26 2010 +0100</DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm">    dockingwindows: #i112595# Fixed
problem related to changes for</DIV>
<DIV STYLE="margin-bottom: 0cm">better layouting. Further code rework</DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm">        Which does the:</DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm">-        if ( pWindow &amp;&amp;
pIter-&gt;m_bFloating )</DIV>
<DIV STYLE="margin-bottom: 0cm">-            pWindow-&gt;Show(bVisible
&amp; bToolbarVisible, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );</DIV>
<DIV STYLE="margin-bottom: 0cm">+        if ( pWindow )</DIV>
<DIV STYLE="margin-bottom: 0cm">+        {</DIV>
<DIV STYLE="margin-bottom: 0cm">+            bool bSetVisible(
pIter-&gt;m_bVisible &amp; bVisible );</DIV>
<DIV STYLE="margin-bottom: 0cm">+            if ( !bSetVisible )</DIV>
<DIV STYLE="margin-bottom: 0cm">+                pWindow-&gt;Hide();</DIV>
<DIV STYLE="margin-bottom: 0cm">+            else</DIV>
<DIV STYLE="margin-bottom: 0cm">+            {</DIV>
<DIV STYLE="margin-bottom: 0cm">+                if (
pIter-&gt;m_bFloating )</DIV>
<DIV STYLE="margin-bottom: 0cm">+                   
pWindow-&gt;Show(true, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE );</DIV>
<DIV STYLE="margin-bottom: 0cm">+                else</DIV>
<DIV STYLE="margin-bottom: 0cm">+                   
implts_setLayoutDirty();</DIV>
<DIV STYLE="margin-bottom: 0cm">+            }</DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm">        Which (at first glance) doesn't seem
to hide non-floating windows ( or</DIV>
<DIV STYLE="margin-bottom: 0cm">perhaps I'm missing how the dirty
notification propagates somehow ).</DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm">        HTH,</DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm">                Michael.</DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm">-- 
</DIV>
<DIV STYLE="margin-bottom: 0cm">michael.meeks@suse.com  &lt;&gt;&lt;,
Pseudo Engineer, itinerant idiot</DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<DIV STYLE="margin-bottom: 0cm"><BR>
</DIV>
<BR>

    <div>
      <u><font color="#0000ff"><a href="http://www.novell.com/brainshare">
</a></font></u><br><u><font color="#0000ff"><a href="http://www.novell.com/brainshare">
</a><a href="http://www.novell.com/brainshare"><img src="cid:AZWXCPXFSDXM.brainshare_2011.png" border="0"></a></font></u><br>
<br>    </div>
  </BODY></HTML>