diff options
author | Noel Power <noel.power@novell.com> | 2011-06-29 18:15:00 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2011-06-29 18:15:00 +0100 |
commit | 0a5679e3a58301a433cb0bf2a210745dc752e52f (patch) | |
tree | 2b191c8bed984fade54804a245d299aff73b6465 | |
parent | 692518586d50126f495f12659925cc6554eacd8b (diff) |
temporary resizing etc. from anurag to get it displaying
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index c3d0ffcf4..dc1237694 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -140,7 +140,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : ToolBox ( pParent, WinBits(WB_BORDER|WB_3DLOOK|WB_CLIPCHILDREN) ), aWndPos ( this ), // maScrollBar ( this, WB_VERT | WB_DRAG ), - aBarGroup ( this ), + aBarGroup ( this), pInputHdl ( NULL ), pBindings ( pBind ), aTextOk ( ScResId( SCSTR_QHELP_BTNOK ) ), // not always new from Resource @@ -179,14 +179,6 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : // aTextWindow.SetQuickHelpText( ScResId( SCSTR_QHELP_INPUTWND ) ); // aTextWindow.SetHelpId ( HID_INSWIN_INPUT ); -/* - maScrollBar.SetPageSize( 1 ); - maScrollBar.SetVisibleSize( 1 ); - maScrollBar.SetLineSize( 1 ); - maScrollBar.SetRange( Range( 0, 1 ) ); - maScrollBar.SetThumbPos( 10 ); -*/ - // kein SetHelpText, die Hilfetexte kommen aus der Hilfe SetItemText ( SID_INPUT_FUNCTION, ScResId( SCSTR_QHELP_BTNCALC ) ); @@ -496,6 +488,15 @@ void ScInputWindow::Resize() { ToolBox::Resize(); + long nWidth = GetSizePixel().Width(); + long nLeft = aBarGroup.GetPosPixel().X(); + Size aSize = aBarGroup.GetSizePixel(); + + aSize.Width() = Max( ((long)(nWidth - nLeft - 10)), (long)0 ); + aSize.Height()= TBX_WINDOW_HEIGHT; + aBarGroup.SetSizePixel( aSize ); + aBarGroup.Invalidate(); + aBarGroup.Resize(); } @@ -719,7 +720,7 @@ void ScInputWindow::DataChanged( const DataChangedEvent& rDCEvt ) //======================================================================== ScInputBarGroup::ScInputBarGroup(Window* pParent) - : Window ( pParent, WinBits(WB_HIDE | WB_BORDER) ), + : Window ( pParent, WinBits(WB_HIDE) ), aTextWindow ( this ), maScrollBar ( this, WB_VERT | WB_DRAG ), bIsMultiLine ( false ) @@ -729,7 +730,12 @@ ScInputBarGroup::ScInputBarGroup(Window* pParent) aTextWindow.SetQuickHelpText( ScResId( SCSTR_QHELP_INPUTWND ) ); aTextWindow.SetHelpId ( HID_INSWIN_INPUT ); - + maScrollBar.SetPageSize( 1 ); + maScrollBar.SetVisibleSize( 1 ); + maScrollBar.SetLineSize( 1 ); + maScrollBar.SetRange( Range( 0, 1 ) ); + maScrollBar.SetThumbPos( 10 ); + maScrollBar.Show(); } ScInputBarGroup::~ScInputBarGroup() @@ -746,9 +752,8 @@ void ScInputBarGroup::Resize() long nWidth = GetSizePixel().Width(); long nLeft = aTextWindow.GetPosPixel().X(); Size aSize = aTextWindow.GetSizePixel(); - aSize.Width() = Max( ((long)(nWidth - nLeft - 40)), (long)0 ); - + aSize.Height()=22; aTextWindow.SetSizePixel( aSize ); aTextWindow.Invalidate(); } @@ -820,10 +825,8 @@ ScTextWnd::ScTextWnd( Window* pParent ) Size aSize(1,TBX_WINDOW_HEIGHT); Size aMinEditSize( Edit::GetMinimumEditSize() ); - printf("construstor of ScTextWnd edit height %ld edit width%ld\n",aMinEditSize.Height() , aMinEditSize.Width() ); if( aMinEditSize.Height() > aSize.Height() ) aSize.Height() = aMinEditSize.Height(); - printf("So aSize is %ld %ld \n",aSize.Width(), aSize.Height()); SetSizePixel ( aSize ); SetBackground ( aBgColor ); SetLineColor ( COL_BLACK ); @@ -860,7 +863,6 @@ void ScTextWnd::Resize() Size aSize = GetOutputSizePixel(); Size bSize = LogicToPixel(Size(0,pEditEngine->GetLineHeight(0,0))); int nDiff=(aSize.Height()-bSize.Height())/2; - printf("here %d %d %d\n", nDiff , bSize.Height(), aSize.Height()); Point aPos(TEXT_STARTPOS,nDiff*aSize.Height()/aSize.Height()); Point aPos2(aSize.Width()-5,(aSize.Height()-nDiff)*aSize.Height()/aSize.Height()); pEditView->SetOutputArea( |