Tag: cws_src680_oj14
User: oj      
Date: 2007-05-11 12:05:20+0000
Log:
 taskpane splitter handling corrected

File Changes:

Directory: /dba/reportdesign/source/ui/report/
==============================================

File [changed]: DesignView.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/DesignView.cxx?r1=1.1.2.2&r2=1.1.2.3
Delta lines:  +27 -25
---------------------
--- DesignView.cxx      2007-05-11 09:24:19+0000        1.1.2.2
+++ DesignView.cxx      2007-05-11 12:05:17+0000        1.1.2.3
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: DesignView.cxx,v $
  *
- *  $Revision: 1.1.2.2 $
+ *  $Revision: 1.1.2.3 $
  *
- *  last change: $Author: oj $ $Date: 2007/05/11 09:24:19 $
+ *  last change: $Author: oj $ $Date: 2007/05/11 12:05:17 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -219,9 +219,6 @@
 {
        if ( !_rPlayground.IsEmpty() )
        {
-               const Size aFLSize = LogicToPixel( Size( 3, 3 ), MAP_APPFONT );
-               const Size aOldSize = _rPlayground.GetSize();
-
                const Size aPlaygroundSize( _rPlayground.GetSize() );
                
                // calc the split pos, and forward it to the controller
@@ -240,41 +237,38 @@
                        }
                } // if ( 0 != _rPlaygroundSize.Width() )
 
-        Size 
aReportWindowSize(_rPlayground.GetWidth(),_rPlayground.GetHeight());
+        Size aReportWindowSize(aPlaygroundSize);
         if ( m_aSplitter.IsVisible() )
         {
                    // normalize the split pos
                    Size        aSplitSize( 
m_aSplitter.GetSizePixel().Width(),_rPlayground.GetHeight());
 
-            Point aTaskPanePos(nSplitPos + aFLSize.A(), _rPlayground.Top());
+            Point aTaskPanePos(nSplitPos + aSplitSize.Width(), 
_rPlayground.Top());
             //long nTest = m_pPropWin->GetMinOutputSizePixel().Width();
-            if ( m_pPropWin && (aPlaygroundSize.Width() - aTaskPanePos.X()) < 
m_pPropWin->GetMinOutputSizePixel().Width() )
+            if ( m_pTaskPane && m_pTaskPane->IsVisible() )
+            {
+                aTaskPanePos.X() = aPlaygroundSize.Width() - 
m_pTaskPane->GetSizePixel().Width();
+                sal_Int32 nMinWidth = 
m_pPropWin->GetMinOutputSizePixel().Width();
+                if ( nMinWidth > (aPlaygroundSize.Width() - aTaskPanePos.X()) )
             {
-                aTaskPanePos.X() = aPlaygroundSize.Width() - 
m_pPropWin->GetMinOutputSizePixel().Width();
-                nSplitPos = aTaskPanePos.X() - aFLSize.A();
+                    aTaskPanePos.X() = aPlaygroundSize.Width() - nMinWidth;
+                }
+                nSplitPos = aTaskPanePos.X() - aSplitSize.Width();
+                getController()->setSplitPos(nSplitPos);
             }
             Point      aSplitPos( nSplitPos,_rPlayground.Top() );
-            
-            Size aTaskPaneSize(aPlaygroundSize.Width() - 
aTaskPanePos.X(),aReportWindowSize.Height() );
-
                    // set the size of the splitter
                    m_aSplitter.SetPosSizePixel( aSplitPos, aSplitSize );
                    m_aSplitter.SetDragRectPixel( _rPlayground );
 
-            aReportWindowSize = Size(aSplitPos.X() - _rPlayground.Left() - 
aFLSize.A(),_rPlayground.GetHeight());
+            aReportWindowSize = Size(aSplitPos.X() - _rPlayground.Left() - 
aSplitSize.Width(),_rPlayground.GetHeight());
+            Size aTaskPaneSize(aPlaygroundSize.Width() - 
aTaskPanePos.X(),aPlaygroundSize.Height() );
 
             // set the size of the task pane
             
-                   m_pTaskPane->SetPosSizePixel(
-                           aTaskPanePos
-                           //,Size(aPlaygroundSize.Width() - aSplitPos.X() - 
aSplitSize.Width(),aPlaygroundSize.Height() )
-                ,aTaskPaneSize
-                           );
+                   m_pTaskPane->SetPosSizePixel(aTaskPanePos,aTaskPaneSize);
                    if ( m_pPropWin )
-                           m_pPropWin->SetPosSizePixel(
-                                   Point(0,0)
-                                   ,aTaskPaneSize
-                                   );
+                           m_pPropWin->SetSizePixel(aTaskPaneSize);
         }
 
                // set the size of the report window            
@@ -447,8 +441,16 @@
        {
                m_aSplitter.SetPosPixel( Point( 
nTest,m_aSplitter.GetPosPixel().Y() ) );
                getController()->setSplitPos(nTest);
-               //m_pReportController->setModified(); // why should this modify 
the controller, it is only ui 
-               Resize();
+        if ( m_pTaskPane && m_pTaskPane->IsVisible() )
+        {
+            Point aTaskPanePos(nTest + m_aSplitter.GetSizePixel().Width(), 0);
+            Size aTaskPaneSize(aOutputSize.Width() - 
aTaskPanePos.X(),aOutputSize.Height() );
+            m_pTaskPane->SetPosSizePixel(aTaskPanePos,aTaskPaneSize);
+                   if ( m_pPropWin )
+                           m_pPropWin->SetSizePixel(aTaskPaneSize);
+            // set the size of the report window               
+                   
m_pScrollWindow->SetSizePixel(Size(nTest,aOutputSize.Height()));
+        }              
        }
     
        m_bInSplitHandler = sal_False;




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

Reply via email to