summaryrefslogtreecommitdiff
path: root/sw/source/ui/uiview
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/uiview')
-rw-r--r--sw/source/ui/uiview/pview.cxx21
-rw-r--r--sw/source/ui/uiview/srcview.cxx4
-rw-r--r--sw/source/ui/uiview/view.cxx31
-rw-r--r--sw/source/ui/uiview/view2.cxx3
-rw-r--r--sw/source/ui/uiview/viewling.cxx5
-rw-r--r--sw/source/ui/uiview/viewmdi.cxx6
-rw-r--r--sw/source/ui/uiview/viewport.cxx8
7 files changed, 29 insertions, 49 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();
+ }
}
/*--------------------------------------------------------------------
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index 58ce311d800d..c7c52e3f53ff 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -111,9 +111,7 @@ using ::rtl::OUString;
using ::com::sun::star::util::SearchOptions;
-#define SWSRCVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST| \
- SFX_VIEW_OBJECTSIZE_EMBEDDED| \
- SFX_VIEW_CAN_PRINT|\
+#define SWSRCVIEWFLAGS ( SFX_VIEW_CAN_PRINT|\
SFX_VIEW_NO_NEWWINDOW )
#define SRC_SEARCHOPTIONS (0xFFFF & ~(SEARCH_OPTIONS_FORMAT|SEARCH_OPTIONS_FAMILIES|SEARCH_OPTIONS_SEARCH_ALL))
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 677015b25d96..23e6a44012e4 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -127,14 +127,9 @@ using ::rtl::OUStringBuffer;
extern sal_Bool bNoInterrupt; // in mainwn.cxx
-#define SWVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST| \
- SFX_VIEW_OBJECTSIZE_EMBEDDED| \
- SFX_VIEW_CAN_PRINT| \
+#define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT| \
SFX_VIEW_HAS_PRINTOPTIONS)
-//MA 06. Nov. 95: Each raus in Absprache mit MI wg. Bug 21523
-// SFX_VIEW_OPTIMIZE_EACH|
-
/*--------------------------------------------------------------------
Beschreibung: Statics
--------------------------------------------------------------------*/
@@ -174,7 +169,7 @@ inline SfxDispatcher &SwView::GetDispatcher()
void SwView::ImpSetVerb( int nSelType )
{
sal_Bool bResetVerbs = bVerbsActive;
- if ( !GetViewFrame()->GetFrame()->IsInPlace() &&
+ if ( !GetViewFrame()->GetFrame().IsInPlace() &&
(nsSelectionType::SEL_OLE|nsSelectionType::SEL_GRF) & nSelType )
{
if ( !pWrtShell->IsSelObjProtected(FLYPROTECT_CONTENT) )
@@ -756,7 +751,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
pFormShell(0),
pHScrollbar(0),
pVScrollbar(0),
- pScrollFill(new ScrollBarBox( &_pFrame->GetWindow(), _pFrame->GetFrame()->GetParentFrame() ? 0 : WB_SIZEABLE )),
+ pScrollFill(new ScrollBarBox( &_pFrame->GetWindow(), _pFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )),
pHRuler( new SvxRuler(&GetViewFrame()->GetWindow(), pEditWin,
SVXRULER_SUPPORT_TABS |
SVXRULER_SUPPORT_PARAGRAPH_MARGINS |
@@ -928,10 +923,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
if( SFX_CREATE_MODE_EMBEDDED != pDocSh->GetCreateMode() )
aBrwsBorder = GetMargin();
- if( _pFrame->GetFrameType() & SFXFRAME_INTERNAL )
- pWrtShell->SetFrameView( aBrwsBorder );
- else
- pWrtShell->SetBrowseBorder( aBrwsBorder );
+ pWrtShell->SetBrowseBorder( aBrwsBorder );
// Im CTOR duerfen keine Shell wechsel erfolgen, die muessen ueber
// den Timer "zwischen gespeichert" werden. Sonst raeumt der SFX
@@ -943,7 +935,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
pVRuler->SetActive( sal_True );
SfxViewFrame* pViewFrame = GetViewFrame();
- if( pViewFrame->GetFrame()->GetParentFrame())
+ if( pViewFrame->GetFrame().GetParentFrame())
{
aUsrPref.SetViewHRuler(sal_False);
aUsrPref.SetViewVRuler(sal_False);
@@ -1002,13 +994,6 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
pWrtShell->SetReadOnlyAvailable( aUsrPref.IsCursorInProtectedArea() );
pWrtShell->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions());
- if( UseObjectSize() )
- {
- //Damit der Sfx _rechtzeitig weiss_, wie gross die sheet::Border sind.
- SvBorder aTmp;
- CalcAndSetBorderPixel( aTmp, sal_True );
- }
-
if( pWrtShell->GetDoc()->IsUpdateExpFld() )
{
SET_CURR_SHELL( pWrtShell );
@@ -1057,10 +1042,10 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
/*uno::Reference< awt::XWindow > aTmpRef;
- _pFrame->GetFrame()->GetFrameInterface()->setComponent( aTmpRef,
+ _pFrame->GetFrame().GetFrameInterface()->setComponent( aTmpRef,
pViewImpl->GetUNOObject_Impl());*/
- uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame()->GetFrameInterface();
+ uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame().GetFrameInterface();
uno::Reference< frame::XFrame > xBeamerFrame = xFrame->findFrame(
OUString::createFromAscii("_beamer"), frame::FrameSearchFlag::CHILDREN);
@@ -1622,7 +1607,7 @@ void SwView::ShowCursor( FASTBOOL bOn )
ErrCode SwView::DoVerb( long nVerb )
{
- if ( !GetViewFrame()->GetFrame()->IsInPlace() )
+ if ( !GetViewFrame()->GetFrame().IsInPlace() )
{
SwWrtShell &rSh = GetWrtShell();
const int nSel = rSh.GetSelectionType();
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 14c416f5e398..a38956cc5d68 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -72,7 +72,6 @@
#include <sfx2/fcontnr.hxx>
#include <editeng/sizeitem.hxx>
#include <sfx2/dispatch.hxx>
-#include <sfx2/topfrm.hxx>
#include <svl/whiter.hxx>
#include <svl/ptitem.hxx>
#include <sfx2/linkmgr.hxx>
@@ -1028,7 +1027,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
if(bQuery)
{
SfxViewFrame* pTmpFrame = GetViewFrame();
- SfxHelp::OpenHelpAgent( pTmpFrame->GetFrame(), HID_MAIL_MERGE_SELECT );
+ SfxHelp::OpenHelpAgent( &pTmpFrame->GetFrame(), HID_MAIL_MERGE_SELECT );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractMailMergeCreateFromDlg* pDlg = pFact->CreateMailMergeCreateFromDlg( DLG_MERGE_CREATE,
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index 05191276e0d0..04414b5d83db 100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -830,10 +830,9 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
else
{
SfxViewFrame *pSfxViewFrame = GetViewFrame();
- SfxFrame *pSfxFrame = pSfxViewFrame? pSfxViewFrame->GetFrame() : 0;
uno::Reference< frame::XFrame > xFrame;
- if (pSfxFrame)
- xFrame = pSfxFrame->GetFrameInterface();
+ if ( pSfxViewFrame )
+ xFrame = pSfxViewFrame->GetFrame().GetFrameInterface();
com::sun::star::util::URL aURL;
uno::Reference< frame::XDispatchProvider > xDispatchProvider( xFrame, UNO_QUERY );
uno::Reference< lang::XMultiServiceFactory > xMgr( utl::getProcessServiceFactory(), uno::UNO_QUERY );
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 8df3116fa189..d3c5d54d8743 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -178,7 +178,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
nFac = Max( long( MINZOOM ), nFac );
SwViewOption aOpt( *pOpt );
- if ( !GetViewFrame()->GetFrame()->IsInPlace() )
+ if ( !GetViewFrame()->GetFrame().IsInPlace() )
{
//MasterUsrPrefs updaten UND DANACH die ViewOptions der aktuellen
//View updaten.
@@ -261,7 +261,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
ACT_KONTEXT(pWrtShell);
- if ( !GetViewFrame()->GetFrame()->IsInPlace() && !bViewOnly )
+ if ( !GetViewFrame()->GetFrame().IsInPlace() && !bViewOnly )
{
const BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
SwMasterUsrPref *pUsrPref = (SwMasterUsrPref*)SW_MOD()->GetUsrPref(bWeb);
@@ -347,7 +347,7 @@ void SwView::CreatePageButtons(BOOL bShow)
pPageUpBtn->SetHelpId(HID_SCRL_PAGEUP);
pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), FALSE );
pPageDownBtn->SetHelpId(HID_SCRL_PAGEDOWN);
- Reference< XFrame > xFrame = GetViewFrame()->GetFrame()->GetFrameInterface();
+ Reference< XFrame > xFrame = GetViewFrame()->GetFrame().GetFrameInterface();
pNaviBtn = new SwNaviImageButton(pMDI, xFrame );
pNaviBtn->SetHelpId(HID_SCRL_NAVI);
Link aLk( LINK( this, SwView, BtnPage ) );
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index 3d8c3f05e1f7..b343619f2ea8 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -221,7 +221,7 @@ aDocSz = rSz;
SetVisArea( aNewVisArea, FALSE );
if ( UpdateScrollbars() && !bInOuterResizePixel && !bInInnerResizePixel &&
- !GetViewFrame()->GetFrame()->IsInPlace())
+ !GetViewFrame()->GetFrame().IsInPlace())
OuterResizePixel( Point(),
GetViewFrame()->GetWindow().GetOutputSizePixel() );
}
@@ -355,7 +355,7 @@ void SwView::SetVisArea( const Point &rPt, BOOL bUpdateScrollbar )
void SwView::CheckVisArea()
{
pHScrollbar->SetAuto( pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
- !GetViewFrame()->GetFrame()->IsInPlace() );
+ !GetViewFrame()->GetFrame().IsInPlace() );
if ( IsDocumentBorder() )
{
if ( aVisArea.Left() != DOCUMENTBORDER ||
@@ -732,7 +732,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
{
// JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE,
// so we dont must do it agin.
-// if(!GetViewFrame()->GetFrame()->IsInPlace())
+// if(!GetViewFrame()->GetFrame().IsInPlace())
// S F X_BINDINGS().Update(FN_STAT_PAGE);
//QuickHelp:
@@ -1053,7 +1053,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
Size aSz( rSize );
SvBorder aBorder;
CalcAndSetBorderPixel( aBorder, TRUE );
- if ( GetViewFrame()->GetFrame()->IsInPlace() )
+ if ( GetViewFrame()->GetFrame().IsInPlace() )
{
Size aViewSize( aSz );
Point aViewPos( rOfst );