summaryrefslogtreecommitdiff
path: root/sw/source/ui/uiview/pview.cxx
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2010-03-23 11:58:14 +0100
committerVladimir Glazunov <vg@openoffice.org>2010-03-23 11:58:14 +0100
commit444a273dd82495387986b9c32dd81d32a91c029f (patch)
tree2bdcde69969cbc858f4f59ed0b480101daf55aa9 /sw/source/ui/uiview/pview.cxx
parent68e5b2dd800ccbbccfe24ac109ca191e4992c441 (diff)
parent23fe49e15145fce54048c44c49ca0fb09f03c2c2 (diff)
CWS-TOOLING: integrate CWS autorecovery
Diffstat (limited to 'sw/source/ui/uiview/pview.cxx')
-rw-r--r--sw/source/ui/uiview/pview.cxx21
1 files changed, 10 insertions, 11 deletions
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index aeebee5eecfe..6f0854b51857 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -44,7 +44,6 @@
#include <sfx2/printer.hxx>
#include <sfx2/progress.hxx>
#include <sfx2/app.hxx>
-#include <sfx2/topfrm.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/request.hxx>
#include <sfx2/dispatch.hxx>
@@ -128,8 +127,7 @@ SFX_IMPL_INTERFACE(SwPagePreView, SfxViewShell, SW_RES(RID_PVIEW_TOOLBOX))
TYPEINIT1(SwPagePreView,SfxViewShell)
-#define SWVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST|SFX_VIEW_OPTIMIZE_EACH| \
- SFX_VIEW_CAN_PRINT|SFX_VIEW_HAS_PRINTOPTIONS )
+#define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT|SFX_VIEW_HAS_PRINTOPTIONS )
#define MIN_PREVIEW_ZOOM 25
#define MAX_PREVIEW_ZOOM 600
@@ -1816,7 +1814,7 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
pPageUpBtn(0),
pPageDownBtn(0),
pScrollFill(new ScrollBarBox( &pViewFrame->GetWindow(),
- pViewFrame->GetFrame()->GetParentFrame() ? 0 : WB_SIZEABLE )),
+ pViewFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )),
mnPageCount( 0 ),
// OD 09.01.2003 #106334#
mbResetFormDesignMode( false ),
@@ -1901,15 +1899,13 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
delete pPageDownBtn;
/* SfxObjectShell* pDocSh = GetDocShell();
- TypeId aType = TYPE( SfxTopViewFrame );
-
- for( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocSh, aType );
- pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDocSh, aType ) )
+ for( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocSh );
+ pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDocSh ) )
if( pFrame != GetViewFrame() )
{
// es gibt noch eine weitere Sicht auf unser Dokument, also
// aktiviere dieses
- pFrame->GetFrame()->Appear();
+ pFrame->GetFrame().Appear();
break;
}
*/}
@@ -2086,8 +2082,11 @@ void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize )
//Aufruf der DocSzChgd-Methode der Scrollbars ist noetig, da vom maximalen
//Scrollrange immer die halbe Hoehe der VisArea abgezogen wird.
- if ( pVScrollbar )
- ScrollDocSzChg();
+ if ( pVScrollbar &&
+ aTmpSize.Width() > 0 && aTmpSize.Height() > 0 )
+ {
+ ScrollDocSzChg();
+ }
}
/*--------------------------------------------------------------------