summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorPhilipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>2011-02-09 14:55:43 +0100
committerPhilipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>2011-02-09 14:55:43 +0100
commita5d6bf6a4af95ca365249dc8d7e5fb3abc98787d (patch)
treec5595a786f836c18c87b437fbf72e3e8fdd1ee11 /basic
parentb8290691f0837a992bd59586216e9021fbccc231 (diff)
vcl119: #i86067# fix long since broken layouting algorithm
Diffstat (limited to 'basic')
-rw-r--r--basic/source/app/app.cxx9
-rw-r--r--basic/source/app/app.hxx1
-rw-r--r--basic/source/app/appwin.cxx8
3 files changed, 11 insertions, 7 deletions
diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx
index fd613a81673f..7214c97c119e 100644
--- a/basic/source/app/app.cxx
+++ b/basic/source/app/app.cxx
@@ -857,6 +857,15 @@ void BasicFrame::Resize()
}
}
+Rectangle BasicFrame::GetInnerRect() const
+{
+ Rectangle aRect( Point(0,0), GetOutputSizePixel() );
+ aRect.Bottom() = pStatus->GetPosPixel().Y()-1;
+ if( aRect.Bottom() < 0 ) // sanity check
+ aRect.Bottom() = 0;
+ return aRect;
+}
+
void BasicFrame::Move()
{
Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
diff --git a/basic/source/app/app.hxx b/basic/source/app/app.hxx
index cd76b6481def..eaff9e210fcb 100644
--- a/basic/source/app/app.hxx
+++ b/basic/source/app/app.hxx
@@ -188,6 +188,7 @@ public:
void SetAppMode( const String &aNewMode ){ aAppMode = aNewMode; UpdateTitle(); }
String GenRealString( const String &aResString );
+ Rectangle GetInnerRect() const;
};
diff --git a/basic/source/app/appwin.cxx b/basic/source/app/appwin.cxx
index b0a6c07ec956..cb1927f2ecc0 100644
--- a/basic/source/app/appwin.cxx
+++ b/basic/source/app/appwin.cxx
@@ -121,14 +121,8 @@ void AppWin::Maximize()
pFrame->nMaximizedWindows++;
nWinState = TT_WIN_STATE_MAX;
}
- sal_Int32 nTitleHeight;
- {
- sal_Int32 nDummy1, nDummy2, nDummy3;
- pFrame->GetBorder( nDummy1, nTitleHeight, nDummy2, nDummy3 );
- }
- Size aSize = pFrame->GetOutputSizePixel();
- aSize.Height() -= nTitleHeight;
+ Size aSize = pFrame->GetInnerRect().GetSize();
aSize.Height() -= 2;
aSize.Width() -= 2;
SetSizePixel( aSize );