#92576# update page and scroll bars after size change
This commit is contained in:
parent
9c33a28e43
commit
82f6213f8b
1 changed files with 34 additions and 2 deletions
|
@ -2,9 +2,9 @@
|
||||||
*
|
*
|
||||||
* $RCSfile: unopage.cxx,v $
|
* $RCSfile: unopage.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.38 $
|
* $Revision: 1.39 $
|
||||||
*
|
*
|
||||||
* last change: $Author: cl $ $Date: 2001-10-12 16:25:40 $
|
* last change: $Author: cl $ $Date: 2001-10-17 08:28:34 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
|
@ -1131,6 +1131,34 @@ void SdGenericDrawPage::SetLwrBorder( sal_Int32 nValue )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void refreshpage( SdDrawDocument* pDoc, const PageKind ePageKind )
|
||||||
|
{
|
||||||
|
SdDrawDocShell* pDocShell = pDoc->GetDocSh();
|
||||||
|
if ( pDocShell )
|
||||||
|
{
|
||||||
|
SdViewShell* pViewSh = pDocShell->GetViewShell();
|
||||||
|
|
||||||
|
if( pViewSh )
|
||||||
|
{
|
||||||
|
if( pViewSh->ISA( SdDrawViewShell ) )
|
||||||
|
((SdDrawViewShell*) pViewSh)->ResetActualPage();
|
||||||
|
|
||||||
|
Size aPageSize = pDoc->GetSdPage(0, ePageKind)->GetSize();
|
||||||
|
const long nWidth = aPageSize.Width();
|
||||||
|
const long nHeight = aPageSize.Height();
|
||||||
|
|
||||||
|
Point aPageOrg = Point(nWidth, nHeight / 2);
|
||||||
|
Size aViewSize = Size(nWidth * 3, nHeight * 2);
|
||||||
|
|
||||||
|
pDoc->SetMaxObjSize(aViewSize);
|
||||||
|
|
||||||
|
pViewSh->InitWindows(aPageOrg, aViewSize, Point(-1, -1), TRUE);
|
||||||
|
|
||||||
|
pViewSh->UpdateScrollBars();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SdGenericDrawPage::SetWidth( sal_Int32 nWidth )
|
void SdGenericDrawPage::SetWidth( sal_Int32 nWidth )
|
||||||
{
|
{
|
||||||
Size aSize( GetPage()->GetSize() );
|
Size aSize( GetPage()->GetSize() );
|
||||||
|
@ -1155,6 +1183,8 @@ void SdGenericDrawPage::SetWidth( sal_Int32 nWidth )
|
||||||
SdPage* pPage = pDoc->GetSdPage(i, ePageKind);
|
SdPage* pPage = pDoc->GetSdPage(i, ePageKind);
|
||||||
pPage->SetSize(aSize);
|
pPage->SetSize(aSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
refreshpage( pDoc, ePageKind );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1182,6 +1212,8 @@ void SdGenericDrawPage::SetHeight( sal_Int32 nHeight )
|
||||||
SdPage* pPage = pDoc->GetSdPage(i, ePageKind);
|
SdPage* pPage = pDoc->GetSdPage(i, ePageKind);
|
||||||
pPage->SetSize(aSize);
|
pPage->SetSize(aSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
refreshpage( pDoc, ePageKind );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue