Kaydet (Commit) e46454b6 authored tarafından Noel Power's avatar Noel Power

reorganise some resize logic

üst 7c8c4f78
...@@ -520,9 +520,9 @@ void ScInputWindow::Resize() ...@@ -520,9 +520,9 @@ void ScInputWindow::Resize()
ToolBox::Resize(); ToolBox::Resize();
if ( lcl_isExperimentalMode() ) if ( lcl_isExperimentalMode() )
{ {
Size aSize = GetSizePixel();
aTextWindow.Resize(); aTextWindow.Resize();
aSize.Height() = aTextWindow.GetSizePixel().Height() + 11; Size aSize = GetSizePixel();
aSize.Height() = CalcWindowSizePixel().Height();
SetSizePixel(aSize); SetSizePixel(aSize);
Invalidate(); Invalidate();
} }
...@@ -1027,7 +1027,6 @@ IMPL_LINK( ScInputBarGroup, ClickHdl, PushButton*, EMPTYARG ) ...@@ -1027,7 +1027,6 @@ IMPL_LINK( ScInputBarGroup, ClickHdl, PushButton*, EMPTYARG )
OSL_FAIL("The parent window pointer pParent is null"); OSL_FAIL("The parent window pointer pParent is null");
return 1; return 1;
} }
if( aMultiTextWnd.GetNumLines() > 1 ) if( aMultiTextWnd.GetNumLines() > 1 )
{ {
aMultiTextWnd.SetNumLines( 1 ); aMultiTextWnd.SetNumLines( 1 );
...@@ -1064,7 +1063,6 @@ void ScInputBarGroup::TriggerToolboxLayout() ...@@ -1064,7 +1063,6 @@ void ScInputBarGroup::TriggerToolboxLayout()
else else
pParent->SetToolbarLayoutMode( TBX_LAYOUT_NORMAL ); pParent->SetToolbarLayoutMode( TBX_LAYOUT_NORMAL );
xLayoutManager->lock(); xLayoutManager->lock();
pParent->Resize();
DataChangedEvent aFakeUpdate( DATACHANGED_SETTINGS, NULL, SETTINGS_STYLE ); DataChangedEvent aFakeUpdate( DATACHANGED_SETTINGS, NULL, SETTINGS_STYLE );
// this basically will trigger the reposititioning of the // this basically will trigger the reposititioning of the
// items in the toolbar from ImplFormat ( which is controlled by // items in the toolbar from ImplFormat ( which is controlled by
...@@ -1073,6 +1071,10 @@ void ScInputBarGroup::TriggerToolboxLayout() ...@@ -1073,6 +1071,10 @@ void ScInputBarGroup::TriggerToolboxLayout()
// controlled via mbFormat. It seems the easiest way to get these // controlled via mbFormat. It seems the easiest way to get these
// booleans set is to send in the fake event below. // booleans set is to send in the fake event below.
pParent->DataChanged( aFakeUpdate); pParent->DataChanged( aFakeUpdate);
// highest item in toolbar will have been calculated via the
// event above. Call resize on InputBar to pick up the height
// change
pParent->Resize();
// unlock relayouts the toolbars in the 4 quadrants // unlock relayouts the toolbars in the 4 quadrants
xLayoutManager->unlock(); xLayoutManager->unlock();
} }
...@@ -1137,7 +1139,10 @@ void ScMultiTextWnd::SetNumLines( long nLines ) ...@@ -1137,7 +1139,10 @@ void ScMultiTextWnd::SetNumLines( long nLines )
{ {
mnLines = nLines; mnLines = nLines;
if ( nLines > 1 ) if ( nLines > 1 )
{
mnLastExpandedLines = nLines; mnLastExpandedLines = nLines;
Resize();
}
} }
void ScMultiTextWnd::Resize() void ScMultiTextWnd::Resize()
...@@ -1161,6 +1166,7 @@ void ScMultiTextWnd::Resize() ...@@ -1161,6 +1166,7 @@ void ScMultiTextWnd::Resize()
pEditEngine->SetPaperSize( PixelToLogic(Size((aOutputSize.Width()-= 2 * nTextStartPos - 1), 10000 ) )); pEditEngine->SetPaperSize( PixelToLogic(Size((aOutputSize.Width()-= 2 * nTextStartPos - 1), 10000 ) ));
} }
SetScrollBarRange(); SetScrollBarRange();
SetSizePixel(aTextBoxSize); SetSizePixel(aTextBoxSize);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment