Update ooo320-m1
[ooovba.git] / applied_patches / 0584-sd-create-table-height-fix.diff
blob29f3bb6ff316a5bc675f0b0e5b5f9aadf2af5c5f
1 Set proper table height when creating a fresh one
3 From: Thorsten Behrens <thb@openoffice.org>
6 ---
8 sd/source/ui/table/tablefunction.cxx | 7 ++++++-
9 1 files changed, 6 insertions(+), 1 deletions(-)
12 diff --git sd/source/ui/table/tablefunction.cxx sd/source/ui/table/tablefunction.cxx
13 index 3e9f471..8ff6d89 100644
14 --- sd/source/ui/table/tablefunction.cxx
15 +++ sd/source/ui/table/tablefunction.cxx
16 @@ -70,6 +70,7 @@
17 #include "DrawViewShell.hxx"
18 #include "drawdoc.hxx"
19 #include "DrawDocShell.hxx"
20 +#include "Outliner.hxx"
21 #include "Window.hxx"
22 #include "drawview.hxx"
23 #include "sdresid.hxx"
24 @@ -150,8 +151,12 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
25 nRows = pDlg->getRows();
28 - Size aSize( 14100, 200 );
29 + Size aSize( 14100, 3000 );
31 + ::sd::Outliner* pSdOutliner = GetDoc()->GetOutliner();
32 + const long nTextHeight = pSdOutliner->GetTextHeight();
33 + aSize.Height() = std::max(aSize.Height(),nRows*nTextHeight);
35 Point aPos;
36 Rectangle aWinRect(aPos, GetActiveWindow()->GetOutputSizePixel() );
37 aPos = aWinRect.Center();