Commits

Anonymous committed b6bedc3

kso47:#i115372# remember splitter pos

Comments (0)

Files changed (1)

fpicker/source/office/iodlg.cxx

         String sUserData = _pFileView->GetConfigString();
         aDlgOpt.SetUserItem( ::rtl::OUString::createFromAscii( "UserData" ),
                              makeAny( ::rtl::OUString( sUserData ) ) );
+        if ( m_bHasPlaces )
+        {
+            sUserData = String::CreateFromInt32( m_aSplitWin.GetItemSize( 1 ) );
+            aDlgOpt.SetUserItem( ::rtl::OUString::createFromAscii( "PlacesWin" ),
+                                 makeAny( ::rtl::OUString( sUserData ) ) );
+        }
     }
 
     _pFileView->SetSelectHdl( Link() );
 
     m_aSplitWin.SetAlign( WINDOWALIGN_LEFT );
     if ( m_bHasPlaces )
+    {
         m_aSplitWin.InsertItem( 1, _pPlacesWin, 20, SPLITWINDOW_APPEND, 0, SWIB_PERCENTSIZE );
+        m_aSplitWin.SetItemSizeRange( 1, Range( 80, GetOutputSizePixel().Width()/2 ) );
+    }
 	m_aSplitWin.InsertItem( 2, _pFileView, 80, SPLITWINDOW_APPEND, 0, SWIB_PERCENTSIZE );
 	m_aSplitWin.Show();
     
         ::rtl::OUString sCfgStr;
         if ( aUserData >>= sCfgStr )
             _pFileView->SetConfigString( String( sCfgStr ) );
+
+        if ( m_bHasPlaces )
+        {
+            aUserData = aDlgOpt.GetUserItem( ::rtl::OUString::createFromAscii( "PlacesWin" ) );
+            if ( aUserData >>= sCfgStr )
+            {
+                long nSize = sCfgStr.toInt32();
+                m_aSplitWin.SetItemSize( 1, nSize );
+            }
+        }
     }
 }