Files
libreoffice/sw/source/ui/uiview/view.cxx

1831 lines
68 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
2000-09-18 16:15:01 +00:00
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 16:15:01 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 16:15:01 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 16:15:01 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 16:15:01 +00:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2000-09-18 16:15:01 +00:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2000-09-18 16:15:01 +00:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2000-09-18 16:15:01 +00:00
*
************************************************************************/
#include <string>
2000-09-18 16:15:01 +00:00
#include <stdlib.h>
#include <hintids.hxx>
#include <comphelper/string.hxx>
#include <officecfg/Office/Common.hxx>
2001-07-23 16:20:51 +00:00
#include <rtl/logfile.hxx>
2000-09-18 16:15:01 +00:00
#include <vcl/graph.hxx>
#include <vcl/inputctx.hxx>
#include <basic/sbxobj.hxx>
#include <svl/eitem.hxx>
#include <unotools/lingucfg.hxx>
#include <unotools/useroptions.hxx>
2000-09-18 16:15:01 +00:00
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/app.hxx>
2000-09-18 16:15:01 +00:00
#include <svx/ruler.hxx>
#include <editeng/protitem.hxx>
2000-09-18 16:15:01 +00:00
#include <svx/fmshell.hxx>
#include <svx/extrusionbar.hxx>
#include <svx/fontworkbar.hxx>
2000-09-18 16:15:01 +00:00
#include <unotxvw.hxx>
#include <cmdid.h>
#include <swhints.hxx>
#include <swmodule.hxx>
#include <inputwin.hxx>
#include <chartins.hxx>
#include <uivwimp.hxx>
#include <uitool.hxx>
#include <edtwin.hxx>
#include <textsh.hxx>
#include <listsh.hxx>
#include <tabsh.hxx>
#include <grfsh.hxx>
#include <mediash.hxx>
2000-09-18 16:15:01 +00:00
#include <docsh.hxx>
#include <frmsh.hxx>
#include <olesh.hxx>
#include <drawsh.hxx>
#include <drawbase.hxx>
#include <drformsh.hxx>
#include <drwtxtsh.hxx>
#include <beziersh.hxx>
#include <navsh.hxx>
2000-09-18 16:15:01 +00:00
#include <globdoc.hxx>
#include <scroll.hxx>
#include <navipi.hxx>
#include <gloshdl.hxx>
#include <usrpref.hxx>
#include <srcview.hxx>
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
#include <drawdoc.hxx>
2000-09-18 16:15:01 +00:00
#include <wdocsh.hxx>
#include <wview.hxx>
#include <workctrl.hxx>
#include <wrtsh.hxx>
#include <barcfg.hxx>
#include <pview.hxx>
#include <swdtflvr.hxx>
2000-09-18 16:15:01 +00:00
#include <view.hrc>
#include <globdoc.hrc>
#include <frmui.hrc>
#include <cfgitems.hxx>
#include <prtopt.hxx>
2000-11-19 10:41:10 +00:00
#include <linguistic/lngprops.hxx>
#include <editeng/unolingu.hxx>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
2000-09-18 16:15:01 +00:00
#include <com/sun/star/scanner/ScannerContext.hpp>
2011-10-20 21:25:46 +02:00
#include <com/sun/star/scanner/XScannerManager2.hpp>
2000-09-18 16:15:01 +00:00
#include <toolkit/unohlp.hxx>
2001-03-23 14:43:00 +00:00
#include <rtl/ustrbuf.hxx>
#include <sax/tools/converter.hxx>
2000-09-18 16:15:01 +00:00
#include "formatclipboard.hxx"
#include <PostItMgr.hxx>
#include <annotsh.hxx>
#include <fldbas.hxx>
#include <unomid.h>
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <svl/cjkoptions.hxx>
2000-09-18 16:15:01 +00:00
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::scanner;
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
2000-09-18 16:15:01 +00:00
extern sal_Bool bNoInterrupt; // in mainwn.cxx
#define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT| \
2000-09-18 16:15:01 +00:00
SFX_VIEW_HAS_PRINTOPTIONS)
/*--------------------------------------------------------------------
Beschreibung: Statics
--------------------------------------------------------------------*/
int bDocSzUpdated = 1;
SvxSearchItem* SwView::pSrchItem = 0;
sal_uInt16 SwView::nInsertCtrlState = FN_INSERT_TABLE;
sal_uInt16 SwView::nWebInsertCtrlState = FN_INSERT_TABLE;
sal_uInt16 SwView::nInsertObjectCtrlState = SID_INSERT_DIAGRAM;
sal_Bool SwView::bExtra = sal_False;
sal_Bool SwView::bFound = sal_False;
sal_Bool SwView::bJustOpened = sal_False;
SvxSearchDialog* SwView::pSrchDlg = 0;
SearchAttrItemList* SwView::pSrchList = 0;
SearchAttrItemList* SwView::pReplList = 0;
DBG_NAME(viewhdl)
2000-09-18 16:15:01 +00:00
inline SfxDispatcher &SwView::GetDispatcher()
{
return *GetViewFrame()->GetDispatcher();
}
void SwView::ImpSetVerb( int nSelType )
{
sal_Bool bResetVerbs = bVerbsActive;
if ( !GetViewFrame()->GetFrame().IsInPlace() &&
(nsSelectionType::SEL_OLE|nsSelectionType::SEL_GRF) & nSelType )
2000-09-18 16:15:01 +00:00
{
if ( !pWrtShell->IsSelObjProtected(FLYPROTECT_CONTENT) )
{
if ( nSelType & nsSelectionType::SEL_OLE )
2000-09-18 16:15:01 +00:00
{
SetVerbs( GetWrtShell().GetOLEObject()->getSupportedVerbs() );
2000-09-18 16:15:01 +00:00
bVerbsActive = sal_True;
bResetVerbs = sal_False;
}
}
}
if ( bResetVerbs )
{
SetVerbs( Sequence< embed::VerbDescriptor >() );
2000-09-18 16:15:01 +00:00
bVerbsActive = sal_False;
}
}
/*--------------------------------------------------------------------
Description:
called by the SwEditWin when it gets the focus
--------------------------------------------------------------------*/
void SwView::GotFocus() const
{
// if we got the focus, and the form shell *is* on the top of the dispatcher
// stack, then we need to rebuild the stack (the form shell doesn't belong to
// the top then)
const SfxDispatcher& rDispatcher = const_cast< SwView* >( this )->GetDispatcher();
SfxShell* pTopShell = rDispatcher.GetShell( 0 );
FmFormShell* pAsFormShell = PTR_CAST( FmFormShell, pTopShell );
if ( pAsFormShell )
{
pAsFormShell->ForgetActiveControl();
const_cast< SwView* >( this )->AttrChangedNotify( pWrtShell );
}
else if ( mpPostItMgr )
{
SwAnnotationShell* pAsAnnotationShell = PTR_CAST( SwAnnotationShell, pTopShell );
if ( pAsAnnotationShell )
{
mpPostItMgr->SetActiveSidebarWin(0);
const_cast< SwView* >( this )->AttrChangedNotify( pWrtShell );
}
}
if( GetWrtShellPtr() )
{
SwWrtShell& rWrtShell = GetWrtShell();
rWrtShell.GetDoc()->SetCurrentViewShell( GetWrtShellPtr() );
rWrtShell.GetDoc()->set( IDocumentSettingAccess::BROWSE_MODE,
rWrtShell.GetViewOptions()->getBrowseMode() );
}
}
/*--------------------------------------------------------------------
Description:
called by the FormShell when a form control is focused. This is
a request to put the form shell on the top of the dispatcher
stack
--------------------------------------------------------------------*/
IMPL_LINK_NOARG(SwView, FormControlActivated)
{
// if a form control has been activated, and the form shell is not on the top
// of the dispatcher stack, then we need to activate it
const SfxDispatcher& rDispatcher = GetDispatcher();
const SfxShell* pTopShell = rDispatcher.GetShell( 0 );
const FmFormShell* pAsFormShell = PTR_CAST( FmFormShell, pTopShell );
if ( !pAsFormShell )
{
// if we're editing text currently, cancel this
SdrView *pSdrView = pWrtShell ? pWrtShell->GetDrawView() : NULL;
if ( pSdrView && pSdrView->IsTextEdit() )
pSdrView->SdrEndTextEdit( sal_True );
const_cast< SwView* >( this )->AttrChangedNotify( pWrtShell );
}
return 0L;
}
2000-09-18 16:15:01 +00:00
void SwView::SelectShell()
{
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
// Achtung: SelectShell fuer die WebView mitpflegen
//
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if(bInDtor)
return;
2000-09-18 16:15:01 +00:00
// Entscheidung, ob UpdateTable gerufen werden muss
sal_Bool bUpdateTable = sal_False;
const SwFrmFmt* pCurTableFmt = pWrtShell->GetTableFmt();
if(pCurTableFmt && pCurTableFmt != pLastTableFormat)
{
bUpdateTable = sal_True; // kann erst spaeter ausgefuehrt werden
}
pLastTableFormat = pCurTableFmt;
//SEL_TBL and SEL_TBL_CELLS can be changed!
2000-09-18 16:15:01 +00:00
int nNewSelectionType = (pWrtShell->GetSelectionType()
& ~nsSelectionType::SEL_TBL_CELLS);
2000-09-18 16:15:01 +00:00
if ( pFormShell && pFormShell->IsActiveControl() )
nNewSelectionType |= nsSelectionType::SEL_FOC_FRM_CTRL;
2000-09-18 16:15:01 +00:00
if ( nNewSelectionType == nSelectionType )
{
GetViewFrame()->GetBindings().InvalidateAll( sal_False );
if ( nSelectionType & nsSelectionType::SEL_OLE ||
nSelectionType & nsSelectionType::SEL_GRF )
2000-09-18 16:15:01 +00:00
//Fuer Grafiken und OLE kann sich natuerlich das Verb aendern!
ImpSetVerb( nNewSelectionType );
}
else
{
SfxDispatcher &rDispatcher = GetDispatcher();
SwToolbarConfigItem *pBarCfg = SW_MOD()->GetToolbarConfig();
if ( pShell )
{
rDispatcher.Flush(); // alle gecachten Shells wirklich loeschen
//Zur alten Selektion merken welche Toolbar sichtbar war
sal_uInt16 nId = static_cast< sal_uInt16 >( rDispatcher.GetObjectBarId( SFX_OBJECTBAR_OBJECT ));
2000-09-18 16:15:01 +00:00
if ( nId )
pBarCfg->SetTopToolbar( nSelectionType, nId );
SfxShell *pSfxShell;
for ( sal_uInt16 i = 0; sal_True; ++i )
2000-09-18 16:15:01 +00:00
{
pSfxShell = rDispatcher.GetShell( i );
if ( pSfxShell->ISA( SwBaseShell )
|| pSfxShell->ISA( SwDrawTextShell )
|| pSfxShell->ISA( svx::ExtrusionBar )
|| pSfxShell->ISA( svx::FontworkBar )
|| pSfxShell->ISA( SwAnnotationShell )
)
{
rDispatcher.Pop( *pSfxShell, SFX_SHELL_POP_DELETE );
}
else if ( pSfxShell->ISA( FmFormShell ) )
{
rDispatcher.Pop( *pSfxShell );
}
else
2000-09-18 16:15:01 +00:00
break;
}
}
sal_Bool bInitFormShell = sal_False;
2000-09-18 16:15:01 +00:00
if (!pFormShell)
{
bInitFormShell = sal_True;
pFormShell = new FmFormShell( this );
pFormShell->SetControlActivationHandler( LINK( this, SwView, FormControlActivated ) );
2000-09-18 16:15:01 +00:00
StartListening(*pFormShell);
}
sal_Bool bSetExtInpCntxt = sal_False;
2000-09-18 16:15:01 +00:00
nSelectionType = nNewSelectionType;
ShellModes eShellMode;
if ( !( nSelectionType & nsSelectionType::SEL_FOC_FRM_CTRL ) )
rDispatcher.Push( *pFormShell );
eShellMode = SHELL_MODE_NAVIGATION;
pShell = new SwNavigationShell( *this );
rDispatcher.Push( *pShell );
if ( nSelectionType & nsSelectionType::SEL_OLE )
2000-09-18 16:15:01 +00:00
{
eShellMode = SHELL_MODE_OBJECT;
2000-09-18 16:15:01 +00:00
pShell = new SwOleShell( *this );
rDispatcher.Push( *pShell );
}
else if ( nSelectionType & nsSelectionType::SEL_FRM
|| nSelectionType & nsSelectionType::SEL_GRF)
2000-09-18 16:15:01 +00:00
{
eShellMode = SHELL_MODE_FRAME;
2000-09-18 16:15:01 +00:00
pShell = new SwFrameShell( *this );
rDispatcher.Push( *pShell );
if(nSelectionType & nsSelectionType::SEL_GRF )
2000-09-18 16:15:01 +00:00
{
eShellMode = SHELL_MODE_GRAPHIC;
2000-09-18 16:15:01 +00:00
pShell = new SwGrfShell( *this );
rDispatcher.Push( *pShell );
}
}
else if ( nSelectionType & nsSelectionType::SEL_DRW )
2000-09-18 16:15:01 +00:00
{
eShellMode = SHELL_MODE_DRAW;
2000-09-18 16:15:01 +00:00
pShell = new SwDrawShell( *this );
rDispatcher.Push( *pShell );
if ( nSelectionType & nsSelectionType::SEL_BEZ )
2000-09-18 16:15:01 +00:00
{
eShellMode = SHELL_MODE_BEZIER;
2000-09-18 16:15:01 +00:00
pShell = new SwBezierShell( *this );
rDispatcher.Push( *pShell );
}
else if( nSelectionType & nsSelectionType::SEL_MEDIA )
{
eShellMode = SHELL_MODE_MEDIA;
pShell = new SwMediaShell( *this );
rDispatcher.Push( *pShell );
}
if (nSelectionType & nsSelectionType::SEL_EXTRUDED_CUSTOMSHAPE)
{
eShellMode = SHELL_MODE_EXTRUDED_CUSTOMSHAPE;
pShell = new svx::ExtrusionBar(this);
rDispatcher.Push( *pShell );
}
if (nSelectionType & nsSelectionType::SEL_FONTWORK)
{
eShellMode = SHELL_MODE_FONTWORK;
pShell = new svx::FontworkBar(this);
rDispatcher.Push( *pShell );
}
2000-09-18 16:15:01 +00:00
}
else if ( nSelectionType & nsSelectionType::SEL_DRW_FORM )
2000-09-18 16:15:01 +00:00
{
eShellMode = SHELL_MODE_DRAW_FORM;
2000-09-18 16:15:01 +00:00
pShell = new SwDrawFormShell( *this );
rDispatcher.Push( *pShell );
}
else if ( nSelectionType & nsSelectionType::SEL_DRW_TXT )
2000-09-18 16:15:01 +00:00
{
bSetExtInpCntxt = sal_True;
eShellMode = SHELL_MODE_DRAWTEXT;
2000-09-18 16:15:01 +00:00
rDispatcher.Push( *(new SwBaseShell( *this )) );
pShell = new SwDrawTextShell( *this );
rDispatcher.Push( *pShell );
}
else if ( nSelectionType & nsSelectionType::SEL_POSTIT )
{
eShellMode = SHELL_MODE_POSTIT;
pShell = new SwAnnotationShell( *this );
rDispatcher.Push( *pShell );
}
2000-09-18 16:15:01 +00:00
else
{
bSetExtInpCntxt = sal_True;
eShellMode = SHELL_MODE_TEXT;
2000-09-18 16:15:01 +00:00
sal_uInt32 nHelpId = 0;
if ( nSelectionType & nsSelectionType::SEL_NUM )
2000-09-18 16:15:01 +00:00
{
eShellMode = SHELL_MODE_LIST_TEXT;
2000-09-18 16:15:01 +00:00
pShell = new SwListShell( *this );
nHelpId = pShell->GetHelpId();
rDispatcher.Push( *pShell );
}
pShell = new SwTextShell(*this);
if(nHelpId)
pShell->SetHelpId(nHelpId);
rDispatcher.Push( *pShell );
if ( nSelectionType & nsSelectionType::SEL_TBL )
2000-09-18 16:15:01 +00:00
{
eShellMode = eShellMode == SHELL_MODE_LIST_TEXT ? SHELL_MODE_TABLE_LIST_TEXT
: SHELL_MODE_TABLE_TEXT;
2000-09-18 16:15:01 +00:00
pShell = new SwTableShell( *this );
rDispatcher.Push( *pShell );
}
}
if ( nSelectionType & nsSelectionType::SEL_FOC_FRM_CTRL )
rDispatcher.Push( *pFormShell );
2000-09-18 16:15:01 +00:00
pViewImpl->SetShellMode(eShellMode);
ImpSetVerb( nSelectionType );
if( !GetDocShell()->IsReadOnly() )
{
if( bSetExtInpCntxt && GetWrtShell().HasReadonlySel() )
bSetExtInpCntxt = sal_False;
InputContext aCntxt( GetEditWin().GetInputContext() );
aCntxt.SetOptions( bSetExtInpCntxt
? (aCntxt.GetOptions() |
( INPUTCONTEXT_TEXT |
INPUTCONTEXT_EXTTEXTINPUT ))
: (aCntxt.GetOptions() & ~
( INPUTCONTEXT_TEXT |
INPUTCONTEXT_EXTTEXTINPUT )) );
GetEditWin().SetInputContext( aCntxt );
}
//Zur neuen Selektion die Toolbar aktivieren, die auch beim letzten Mal
//aktiviert war
//Vorher muss ein Flush() sein, betrifft aber lt. MBA nicht das UI und ist
//kein Performance-Problem
// TODO/LATER: maybe now the Flush() command is superfluous?!
2000-09-18 16:15:01 +00:00
rDispatcher.Flush();
Point aPnt = GetEditWin().OutputToScreenPixel(GetEditWin().GetPointerPosPixel());
aPnt = GetEditWin().PixelToLogic(aPnt);
GetEditWin().UpdatePointer(aPnt);
SdrView* pDView = GetWrtShell().GetDrawView();
2000-09-22 07:10:29 +00:00
if ( bInitFormShell && pDView )
pFormShell->SetView(PTR_CAST(FmFormView, pDView));
2000-09-18 16:15:01 +00:00
}
//Guenstiger Zeitpunkt fuer die Kommunikation mit OLE-Objekten?
if ( GetDocShell()->GetDoc()->IsOLEPrtNotifyPending() )
GetDocShell()->GetDoc()->PrtOLENotify( sal_False );
// now the table-update
2000-09-18 16:15:01 +00:00
if(bUpdateTable)
pWrtShell->UpdateTable();
GetViewImpl()->GetUNOObject_Impl()->NotifySelChanged();
2000-09-18 16:15:01 +00:00
}
//Zusammenspiel: AttrChangedNotify() und TimeoutHdl.
//Falls noch Actions offen sind keine Aktualisierung, da der
//Cursor auf der Core-Seite im Wald stehen kann.
//Da wir aber keine Stati mehr liefern koennen und wollen locken wir
//stattdessen den Dispatcher.
extern "C"
2000-09-18 16:15:01 +00:00
{
static int lcl_CmpIds( const void *pFirst, const void *pSecond)
{
return (*(sal_uInt16*)pFirst) - (*(sal_uInt16*)pSecond);
}
2000-09-18 16:15:01 +00:00
}
IMPL_LINK_NOARG(SwView, AttrChangedNotify)
2000-09-18 16:15:01 +00:00
{
if ( GetEditWin().IsChainMode() )
2000-09-18 16:15:01 +00:00
GetEditWin().SetChainMode( sal_False );
//Opt: Nicht wenn PaintLocked. Beim Unlock wird dafuer nocheinmal ein
//Notify ausgeloest.
if( !pWrtShell->IsPaintLocked() && !bNoInterrupt &&
GetDocShell()->IsReadOnly() )
_CheckReadonlyState();
if( !pWrtShell->IsPaintLocked() && !bNoInterrupt )
_CheckReadonlySelection();
if( !bAttrChgNotified )
{
if ( pWrtShell->BasicActionPend() || bNoInterrupt ||
GetDispatcher().IsLocked() || //do not confuse the SFX
GetViewFrame()->GetBindings().IsInUpdate() )//do not confuse the SFX
{
bAttrChgNotified = sal_True;
aTimer.Start();
const SfxPoolItem *pItem;
if ( SFX_ITEM_SET != GetObjectShell()->GetMedium()->GetItemSet()->
GetItemState( SID_HIDDEN, sal_False, &pItem ) ||
!((SfxBoolItem*)pItem)->GetValue() )
{
GetViewFrame()->GetBindings().ENTERREGISTRATIONS();
bAttrChgNotifiedWithRegistrations = sal_True;
}
2000-09-18 16:15:01 +00:00
}
else
SelectShell();
2000-09-18 16:15:01 +00:00
}
// change ui if cursor is at a SwPostItField
if (mpPostItMgr)
{
// only perform the code that is needed to determine, if at the
// actual cursor position is a post-it field
mpPostItMgr->SetShadowState( pWrtShell->GetPostItFieldAtCursor() );
}
2000-09-18 16:15:01 +00:00
return 0;
}
IMPL_LINK_NOARG(SwView, TimeoutHdl)
2000-09-18 16:15:01 +00:00
{
DBG_PROFSTART(viewhdl);
if( pWrtShell->BasicActionPend() || bNoInterrupt )
{
aTimer.Start();
DBG_PROFSTOP(viewhdl);
return 0;
}
if ( bAttrChgNotifiedWithRegistrations )
{
GetViewFrame()->GetBindings().LEAVEREGISTRATIONS();
bAttrChgNotifiedWithRegistrations = sal_False;
}
_CheckReadonlyState();
_CheckReadonlySelection();
sal_Bool bOldUndo = pWrtShell->DoesUndo();
pWrtShell->DoUndo( sal_False );
2000-09-18 16:15:01 +00:00
SelectShell();
pWrtShell->DoUndo( bOldUndo );
2000-09-18 16:15:01 +00:00
bAttrChgNotified = sal_False;
2001-03-07 12:46:48 +00:00
GetViewImpl()->GetUNOObject_Impl()->NotifySelChanged();
2000-09-18 16:15:01 +00:00
DBG_PROFSTOP(viewhdl);
return 0;
}
void SwView::_CheckReadonlyState()
{
SfxDispatcher &rDis = GetDispatcher();
//Um erkennen zu koennen ob bereits disabled ist!
SfxItemState eStateRO, eStateProtAll;
const SfxPoolItem *pItem;
// von einem nur uns bekannten Slot den Status abfragen.
// Ansonsten kennen andere den Slot; wie z.B. die BasidIde
2000-09-18 16:15:01 +00:00
eStateRO = rDis.QueryState( FN_INSERT_BOOKMARK, pItem );
eStateProtAll = rDis.QueryState( FN_EDIT_REGION, pItem );
sal_Bool bChgd = sal_False;
if ( !pWrtShell->IsCrsrReadonly() )
{
static sal_uInt16 aROIds[] =
{
SID_DELETE, FN_BACKSPACE, FN_SHIFT_BACKSPACE,
SID_UNDO,
SID_REDO, SID_REPEAT, SID_PASTE,
SID_PASTE_UNFORMATTED,
SID_PASTE_SPECIAL, SID_SBA_BRW_INSERT,
2000-09-18 16:15:01 +00:00
SID_BACKGROUND_COLOR, FN_INSERT_BOOKMARK,
CWS-TOOLING: integrate CWS mba32issues01 2009-05-05 18:23:27 +0200 mba r271547 : apply diffs from m45->m47 for all files moved from dialog to cui 2009-05-05 18:22:02 +0200 mba r271545 : apply diffs from m45->m47 for all files moved from dialog to cui 2009-05-05 18:16:42 +0200 mba r271544 : apply diffs from m45->m47 for all files moved from dialog to cui 2009-04-29 19:35:58 +0200 mba r271392 : #i73672#: unify commands for inserting special characters 2009-04-29 18:01:27 +0200 mba r271391 : #i101337#: missing string resources 2009-04-29 18:01:10 +0200 mba r271390 : #i101337#: missing string resources 2009-04-29 15:42:47 +0200 mba r271380 : concurrency problem in multithreaded dmake due to missing dependency 2009-04-28 17:36:03 +0200 tbo r271336 : #i99432# 2009-04-28 13:57:52 +0200 mba r271322 : #i101302#: ctor might be called with pSet=0 2009-04-22 19:32:39 +0200 tbo r271138 : #i99432# 2009-04-09 14:46:03 +0200 mba r270709 : make sendreportw32.cxx compile with pch 2009-04-06 16:05:07 +0200 mba r270568 : #i99432#: some tweaks for build order 2009-04-06 15:38:52 +0200 mba r270558 : typo 2009-04-06 13:36:19 +0200 mba r270542 : #i99432#: split of localization also 2009-04-06 13:19:06 +0200 mba r270539 : #i99432#: split up srs files also 2009-04-03 17:57:59 +0200 mba r270513 : #i99432#: split dialog folder into two 2009-04-03 17:56:46 +0200 mba r270512 : #i99432#: split dialog folder into two 2009-04-01 22:15:00 +0200 mba r270364 : warnings on Linux 2009-04-01 22:10:44 +0200 mba r270363 : warnings on Linux 2009-04-01 21:43:54 +0200 mba r270362 : warning fixed 2009-04-01 21:41:27 +0200 mba r270361 : warning on Linux fixed 2009-04-01 21:35:44 +0200 mba r270360 : warning fixed 2009-04-01 20:19:59 +0200 mba r270358 : warning found on Linux fixed 2009-04-01 19:23:38 +0200 mba r270354 : warning due to missing eof 2009-04-01 18:56:25 +0200 mba r270352 : linking problem fixed that appeared only on mac 2009-04-01 18:41:30 +0200 mba r270350 : warnings discovered on Linux fixed 2009-04-01 18:34:28 +0200 mba r270349 : some fixes for warnings and include problems discoverd after resync and build on mac 2009-04-01 14:08:22 +0200 mba r270328 : CWS-TOOLING: rebase CWS mba32issues01 to trunk@270033 (milestone: DEV300:m45) 2009-03-04 18:13:35 +0100 mba r268858 : #i99432#: more dialogs moved to cui 2009-03-04 17:47:41 +0100 mba r268854 : #i99432#: more dialogs moved to cui 2009-03-04 17:32:39 +0100 mba r268851 : warning fixed 2009-03-04 12:59:26 +0100 mba r268814 : #i99432#: more dialogs moved to cui 2009-03-04 11:49:03 +0100 mba r268802 : #i99432#: CharmapDialog moved to cui 2009-03-04 10:46:00 +0100 mba r268795 : #i99432#: CharmapDialog moved to cui 2009-03-04 10:43:50 +0100 mba r268794 : #i99432#: CharmapDialog moved to cui 2009-03-04 10:00:29 +0100 mba r268792 : #i99432#: CharmapDialog moved to cui 2009-03-04 10:00:03 +0100 mba r268791 : #i99432#: CharmapDialog moved to cui 2009-03-04 09:59:43 +0100 mba r268790 : #i99432#: CharmapDialog moved to cui 2009-03-04 09:58:51 +0100 mba r268789 : #i99432#: CharmapDialog moved to cui 2009-03-04 09:58:16 +0100 mba r268788 : #i99432#: CharmapDialog moved to cui 2009-03-03 16:33:14 +0100 mba r268763 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:32:28 +0100 mba r268762 : #i99432#: some tabpages moved to cui 2009-03-03 16:32:09 +0100 mba r268761 : #i99432#: some tabpages moved to cui 2009-03-03 16:29:40 +0100 mba r268760 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:29:08 +0100 mba r268759 : #i99432#: MacroAssignment page moved to cui 2009-03-03 16:28:41 +0100 mba r268758 : #i99432#: MacroAssignment page moved to cui 2009-03-03 16:28:18 +0100 mba r268757 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:27:36 +0100 mba r268756 : #i99465#: replace FN_SYMBOL by SID_CHARMAP 2009-03-03 16:27:02 +0100 mba r268755 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:26:23 +0100 mba r268754 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:25:30 +0100 mba r268753 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:24:49 +0100 mba r268752 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:24:35 +0100 mba r268751 : #i99432#: MacroAssignment page moved to cui 2009-03-03 16:23:20 +0100 mba r268750 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:23:04 +0100 mba r268749 : #i99432#: MacroAssignment page moved to cui 2009-03-03 16:21:56 +0100 mba r268748 : #i99465#: new SfxAbstractDialog interface and creation methods 2009-03-03 16:18:39 +0100 mba r268747 : #i99432#: MacroAssignment page moved to cui 2009-03-03 16:13:14 +0100 mba r268745 : #i99465#: replace FN_SYMBOL by SID_CHARMAP 2009-03-03 16:02:54 +0100 mba r268738 : #i99432#: moved MacroAssignment TabPage from sfx2 2009-03-03 14:57:58 +0100 mba r268729 : #i99465#: transport return value via ItemSet 2009-03-03 00:08:10 +0100 mba r268701 : #i99432#: move acccfg to cuilib 2009-03-03 00:07:32 +0100 mba r268700 : #i99432#: move acccfg to cuilib 2009-03-03 00:02:01 +0100 mba r268699 : #i99432#: move acccfg to cuilib 2009-03-03 00:01:38 +0100 mba r268698 : #i99432#: move acccfg to cuilib 2009-03-03 00:01:11 +0100 mba r268697 : #i99432#: move acccfg to cuilib 2009-03-03 00:00:40 +0100 mba r268696 : #i99432#: move acccfg to cuilib 2009-03-03 00:00:06 +0100 mba r268695 : #i99432#: replace SfxAbstractSingleTabDialog by SfxAbstractDialog 2009-03-02 23:59:22 +0100 mba r268694 : #i99432#: move acccfg to cuilib 2009-03-02 23:57:19 +0100 mba r268693 : #i99432#: move acccfg to svx 2009-03-02 23:56:14 +0100 mba r268692 : #i99432#: replace SfxAbstractSingleTabDialog by SfxAbstractDialog 2009-03-02 23:49:37 +0100 mba r268691 : #i99785#: consolidate dialogs library 2009-03-02 17:26:40 +0100 mba r268683 : #i99785#: consolidate dialogs library 2009-03-02 17:24:28 +0100 mba r268682 : i99465#: consolidate slot for InsertSymbol command 2009-03-02 17:22:29 +0100 mba r268681 : #i99785#: consolidate dialogs library 2009-03-02 17:18:11 +0100 mba r268680 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 17:08:30 +0100 mba r268679 : #i99785#: consolidate dialogs library 2009-03-02 17:06:57 +0100 mba r268678 : #i99785#: consolidate dialogs library 2009-03-02 17:06:30 +0100 mba r268677 : #i99785#: consolidate dialogs library 2009-03-02 17:05:02 +0100 mba r268676 : #i99785#: consolidate dialogs library 2009-03-02 17:04:35 +0100 mba r268675 : #i99785#: consolidate dialogs library 2009-03-02 16:47:53 +0100 mba r268673 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:45:17 +0100 mba r268671 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:39:59 +0100 mba r268670 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:38:59 +0100 mba r268668 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:38:28 +0100 mba r268667 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:36:06 +0100 mba r268666 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:29:50 +0100 mba r268663 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:24:00 +0100 mba r268659 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:23:31 +0100 mba r268658 : i99432#: move accelconfig and macroassignment to cui 2009-03-02 16:22:41 +0100 mba r268657 : i99432#: move accelconfig and macroassignment to cui 2009-02-25 16:57:26 +0100 mba r268453 : obsolete 2009-02-17 10:50:51 +0100 mba r267846 : obsolete 2009-02-12 16:33:54 +0100 mba r267676 : #i96834#: warning fixed 2009-02-11 19:28:47 +0100 mba r267626 : #i91978#: unused code 2009-02-11 18:37:47 +0100 mba r267625 : metafile output, fixes for 3 layer office 2009-02-11 12:56:28 +0100 mba r267593 : selective trees; incomplete build lists; metafile output
2009-05-06 10:59:57 +00:00
SID_CHARMAP, FN_INSERT_SOFT_HYPHEN,
2000-09-18 16:15:01 +00:00
FN_INSERT_HARDHYPHEN, FN_INSERT_HARD_SPACE, FN_INSERT_BREAK,
FN_INSERT_LINEBREAK, FN_INSERT_COLUMN_BREAK, FN_INSERT_BREAK_DLG,
FN_DELETE_SENT, FN_DELETE_BACK_SENT, FN_DELETE_WORD,
FN_DELETE_BACK_WORD, FN_DELETE_LINE, FN_DELETE_BACK_LINE,
FN_DELETE_PARA, FN_DELETE_BACK_PARA, FN_DELETE_WHOLE_LINE,
FN_CALCULATE, FN_FORMAT_RESET,
FN_POSTIT, FN_JAVAEDIT, SID_ATTR_PARA_ADJUST_LEFT,
SID_ATTR_PARA_ADJUST_RIGHT, SID_ATTR_PARA_ADJUST_CENTER,SID_ATTR_PARA_ADJUST_BLOCK,
SID_ATTR_PARA_LINESPACE_10, SID_ATTR_PARA_LINESPACE_15, SID_ATTR_PARA_LINESPACE_20,
SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONTHEIGHT, SID_ATTR_CHAR_COLOR_BACKGROUND,
SID_ATTR_CHAR_COLOR_BACKGROUND_EXT, SID_ATTR_CHAR_COLOR_EXT,
SID_ATTR_CHAR_COLOR, SID_ATTR_CHAR_WEIGHT, SID_ATTR_CHAR_POSTURE,
SID_ATTR_CHAR_OVERLINE,
2000-09-18 16:15:01 +00:00
SID_ATTR_CHAR_UNDERLINE, SID_ATTR_FLASH, SID_ATTR_CHAR_STRIKEOUT,
FN_UNDERLINE_DOUBLE, SID_ATTR_CHAR_CONTOUR, SID_ATTR_CHAR_SHADOWED,
SID_ATTR_CHAR_AUTOKERN, SID_ATTR_CHAR_ESCAPEMENT, FN_SET_SUPER_SCRIPT,
FN_SET_SUB_SCRIPT, SID_ATTR_CHAR_CASEMAP, SID_ATTR_CHAR_LANGUAGE,
SID_ATTR_CHAR_KERNING, SID_CHAR_DLG, SID_ATTR_CHAR_WORDLINEMODE,
FN_GROW_FONT_SIZE, FN_SHRINK_FONT_SIZE, FN_TXTATR_INET,
FN_FORMAT_DROPCAPS, SID_ATTR_PARA_ADJUST, SID_ATTR_PARA_LINESPACE,
SID_ATTR_PARA_SPLIT, SID_ATTR_PARA_KEEP, SID_ATTR_PARA_WIDOWS,
SID_ATTR_PARA_ORPHANS,
SID_ATTR_PARA_MODEL, SID_PARA_DLG,
FN_SELECT_PARA, SID_DEC_INDENT,
SID_INC_INDENT
};
static sal_Bool bFirst = sal_True;
if ( bFirst )
{
qsort( (void*)aROIds, sizeof(aROIds)/sizeof(sal_uInt16), sizeof(sal_uInt16), lcl_CmpIds );
bFirst = sal_False;
}
if ( SFX_ITEM_DISABLED == eStateRO )
{
rDis.SetSlotFilter( sal_Bool(2), sizeof(aROIds)/sizeof(sal_uInt16), aROIds );
bChgd = sal_True;
}
}
else if( pWrtShell->IsAllProtect() )
{
if ( SFX_ITEM_DISABLED == eStateProtAll )
{
static sal_uInt16 aAllProtIds[] = { SID_SAVEDOC, FN_EDIT_REGION };
static sal_Bool bAllProtFirst = sal_True;
if ( bAllProtFirst )
{
qsort( (void*)aAllProtIds, sizeof(aAllProtIds)/sizeof(sal_uInt16), sizeof(sal_uInt16), lcl_CmpIds );
bAllProtFirst = sal_False;
}
rDis.SetSlotFilter( sal_Bool(2),
sizeof(aAllProtIds)/sizeof(sal_uInt16),
aAllProtIds );
bChgd = sal_True;
}
}
else if ( SFX_ITEM_DISABLED != eStateRO ||
SFX_ITEM_DISABLED != eStateProtAll )
{
bChgd = sal_True;
rDis.SetSlotFilter();
}
if ( bChgd )
GetViewFrame()->GetBindings().InvalidateAll(sal_True);
}
void SwView::_CheckReadonlySelection()
{
sal_uInt32 nDisableFlags = 0;
SfxDispatcher &rDis = GetDispatcher();
if( pWrtShell->HasReadonlySel() &&
( !pWrtShell->GetDrawView() ||
!pWrtShell->GetDrawView()->GetMarkedObjectList().GetMarkCount() ))
2000-09-18 16:15:01 +00:00
nDisableFlags |= SW_DISABLE_ON_PROTECTED_CURSOR;
if( (SW_DISABLE_ON_PROTECTED_CURSOR & nDisableFlags ) !=
(SW_DISABLE_ON_PROTECTED_CURSOR & rDis.GetDisableFlags() ) )
{
// zusaetzlich am Window den InputContext umsetzen, damit in
// japanischen / chinesischen Versionen die externe Eingabe
// ab-/angeschaltet wird. Das aber nur wenn auch die richtige
// Shell auf dem Stack steht.
switch( pViewImpl->GetShellMode() )
{
case SHELL_MODE_TEXT:
case SHELL_MODE_LIST_TEXT:
case SHELL_MODE_TABLE_TEXT:
case SHELL_MODE_TABLE_LIST_TEXT:
2000-09-18 16:15:01 +00:00
{
// temporaere Loesung!!! Sollte bei jeder Cursorbewegung
2000-09-18 16:15:01 +00:00
// den Font von der akt. Einfuegeposition setzen, also ausserhalb
// dieses if's. Aber TH wertet den Font zur Zeit nicht aus und
// das besorgen erscheint mir hier zu teuer zu sein.
// Ausserdem haben wir keinen Font, sondern nur Attribute aus denen
// die Textformatierung dann den richtigen Font zusammen baut.
InputContext aCntxt( GetEditWin().GetInputContext() );
aCntxt.SetOptions( SW_DISABLE_ON_PROTECTED_CURSOR & nDisableFlags
? (aCntxt.GetOptions() & ~
( INPUTCONTEXT_TEXT |
INPUTCONTEXT_EXTTEXTINPUT ))
: (aCntxt.GetOptions() |
( INPUTCONTEXT_TEXT |
INPUTCONTEXT_EXTTEXTINPUT )) );
GetEditWin().SetInputContext( aCntxt );
}
break;
default:
;
2000-09-18 16:15:01 +00:00
}
}
if( nDisableFlags != rDis.GetDisableFlags() )
{
rDis.SetDisableFlags( nDisableFlags );
GetViewFrame()->GetBindings().InvalidateAll( sal_True );
}
}
SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
: SfxViewShell( _pFrame, SWVIEWFLAGS ),
2000-09-18 16:15:01 +00:00
aPageStr( SW_RES( STR_PAGE )),
nNewPage(USHRT_MAX),
pNumRuleNodeFromDoc(0),
pEditWin( new SwEditWin( &_pFrame->GetWindow(), *this ) ),
2000-09-18 16:15:01 +00:00
pWrtShell(0),
pShell(0),
2000-09-18 16:15:01 +00:00
pFormShell(0),
pHScrollbar(0),
pVScrollbar(0),
pScrollFill(new ScrollBarBox( &_pFrame->GetWindow(), _pFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )),
pHRuler( new SvxRuler(&GetViewFrame()->GetWindow(), pEditWin,
2000-09-18 16:15:01 +00:00
SVXRULER_SUPPORT_TABS |
SVXRULER_SUPPORT_PARAGRAPH_MARGINS |
SVXRULER_SUPPORT_BORDERS |
SVXRULER_SUPPORT_NEGATIVE_MARGINS|
SVXRULER_SUPPORT_REDUCED_METRIC,
2000-09-18 16:15:01 +00:00
GetViewFrame()->GetBindings(),
WB_STDRULER | WB_EXTRAFIELD | WB_BORDER)),
pVRuler(new SvxRuler(&GetViewFrame()->GetWindow(), pEditWin,
SVXRULER_SUPPORT_TABS | SVXRULER_SUPPORT_PARAGRAPH_MARGINS_VERTICAL|
SVXRULER_SUPPORT_BORDERS | SVXRULER_SUPPORT_REDUCED_METRIC,
GetViewFrame()->GetBindings(),
WB_VSCROLL | WB_EXTRAFIELD | WB_BORDER )),
2000-09-18 16:15:01 +00:00
pTogglePageBtn(0),
pPageUpBtn(0),
pPageDownBtn(0),
pNaviBtn(0),
pGlosHdl(0),
pDrawActual(0),
pLastTableFormat(0),
pFormatClipboard(new SwFormatClipboard()),
mpPostItMgr(0),
nSelectionType( INT_MAX ),
CWS-TOOLING: integrate CWS mba31issues01 2009-01-28 12:14:00 +0100 mba r267052 : #i97267#: wrong license file 2009-01-28 11:52:05 +0100 mba r267048 : #i97267#: add dependency to readlicense_oo as some dicts use the OOo license files 2009-01-26 15:47:05 +0100 mba r266934 : correct mistake 2009-01-26 15:42:20 +0100 mba r266933 : #i97403#: new english dictionaries 2009-01-26 15:40:20 +0100 mba r266931 : #i97403#: new english dictionaries 2009-01-26 15:37:32 +0100 mba r266930 : #i92532#: new dictionaries and hyphenation 2009-01-26 15:36:10 +0100 mba r266929 : #i97403#: new canadian dictionaries; remove bogus dependencies 2009-01-26 15:34:38 +0100 mba r266928 : #i97403#: new canadian dictionaries 2009-01-26 09:58:18 +0100 mba r266907 : fixed warning 2009-01-26 09:53:09 +0100 mba r266906 : fixed warning 2009-01-25 20:22:32 +0100 mba r266892 : #i87495#: new property 2009-01-25 18:29:54 +0100 mba r266891 : #i96422#: new serbian dictionary 2009-01-25 00:37:28 +0100 mba r266886 : added include 2009-01-24 18:13:17 +0100 mba r266884 : CWS-TOOLING: rebase CWS mba31issues01 to trunk@266428 (milestone: DEV300:m39) 2009-01-24 11:34:07 +0100 mba r266869 : #i69705#: make nPageCnt a member 2009-01-24 11:30:44 +0100 mba r266868 : #i97490#: harmonize treatment of different protocols in hyperlinks 2009-01-24 11:16:07 +0100 mba r266867 : #i96422#: serbian dictionary 2009-01-21 17:29:33 +0100 mba r266693 : #i94743#: wrong return value after importing meta data 2009-01-16 18:49:21 +0100 mba r266451 : #i87495#: remove last change 2009-01-16 18:49:04 +0100 mba r266450 : #i87495#: remove last change 2009-01-16 18:47:43 +0100 mba r266448 : #i87495#: support for setting PaperBin via API 2009-01-16 18:36:10 +0100 mba r266446 : #i87495#: support for setting PaperBin via API 2009-01-16 18:35:53 +0100 mba r266445 : #i87495#: support for setting PaperBin via API 2009-01-16 18:34:56 +0100 mba r266444 : #159083#: set additional printoptions before printing 2009-01-16 17:00:48 +0100 mba r266437 : #159083#: always create printhelper 2009-01-16 15:39:41 +0100 mba r266427 : prevent adding of OOo licence file 2009-01-15 14:47:08 +0100 mba r266374 : #i84010#: check for missing clipboarddoc 2008-12-05 18:11:04 +0100 mba r264913 : #i92871#: update of swedish dictionary 2008-12-05 18:08:41 +0100 mba r264912 : #i92871#: update of swedish dictionary 2008-12-03 14:56:16 +0100 mba r264788 : #i69705#: nPageCnt must be a member variable 2008-12-03 14:55:40 +0100 mba r264787 : #i69705#: nPageCnt must be a member variable 2008-12-03 12:13:52 +0100 mba r264765 : #i96422#: serbian dictionaries 2008-12-03 12:13:36 +0100 mba r264764 : #i96422#: serbian dictionaries 2008-12-03 11:59:10 +0100 mba r264763 : #i96422#: serbian dictionaries 2008-12-03 11:26:19 +0100 mba r264757 : #i94562#: australian dictionary 2008-12-03 11:22:39 +0100 mba r264756 : #i94562#: australian dictionary; #i88025#: canadian spell checking 2008-12-03 11:21:03 +0100 mba r264755 : #i94562#: australian dictionary 2008-12-03 11:20:00 +0100 mba r264754 : #i94562#: australian dictionary 2008-12-03 10:56:29 +0100 mba r264751 : #i75458#: added optional service 2008-12-03 10:39:54 +0100 mba r264750 : #i96058#: missing parenthesis
2009-02-18 13:14:22 +00:00
nPageCnt(0),
2000-09-18 16:15:01 +00:00
nDrawSfxId( USHRT_MAX ),
nFormSfxId( USHRT_MAX ),
nLastPasteDestination( 0xFFFF ),
nLeftBorderDistance( 0 ),
nRightBorderDistance( 0 ),
bInMailMerge(sal_False),
bInDtor(sal_False),
bOldShellWasPagePreView(sal_False),
bIsPreviewDoubleClick(sal_False)
2000-09-18 16:15:01 +00:00
{
// According to discussion with MBA and further
// investigations, no old SfxViewShell will be set as parameter <pOldSh>,
// if function "New Window" is performed to open an additional view beside
// an already existing one.
// If the view is switch from one to another, the 'old' view is given by
// parameter <pOldSh>.
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwView::SwView" );
bCenterCrsr = bTopCrsr = bAllwaysShowSel = bTabColFromDoc = bTabRowFromDoc =
bSetTabColFromDoc = bSetTabRowFromDoc = bAttrChgNotified = bAttrChgNotifiedWithRegistrations =
bVerbsActive = bDrawRotate = bInOuterResizePixel = bInInnerResizePixel =
bPasteState = bPasteSpecialState = bMakeSelectionVisible = sal_False;
2000-09-18 16:15:01 +00:00
bShowAtResize = bDrawSelMode = bDocSzUpdated = sal_True;
_CreateScrollbar( sal_True );
_CreateScrollbar( sal_False );
2000-09-18 16:15:01 +00:00
pViewImpl = new SwView_Impl(this);
SetName(rtl::OUString("View"));
2000-09-18 16:15:01 +00:00
SetWindow( pEditWin );
aTimer.SetTimeout( 120 );
SwDocShell* pDocSh = PTR_CAST( SwDocShell, _pFrame->GetObjectShell() );
sal_Bool bOldModifyFlag = pDocSh->IsEnableSetModified();
if(bOldModifyFlag)
pDocSh->EnableSetModified( sal_False );
OSL_ENSURE( pDocSh, "view without DocShell." );
2000-09-18 16:15:01 +00:00
SwWebDocShell* pWebDShell = PTR_CAST( SwWebDocShell, pDocSh );
const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(0 != pWebDShell);
SwViewOption aUsrPref( *pUsrPref);
//! get lingu options without loading lingu DLL
SvtLinguOptions aLinguOpt;
2008-12-15 12:01:46 +00:00
SvtLinguConfig().GetOptions( aLinguOpt );
aUsrPref.SetOnlineSpell( aLinguOpt.bIsSpellAuto );
2000-09-18 16:15:01 +00:00
sal_Bool bOldShellWasSrcView = sal_False;
// determine if there is an existing view for
// document
SfxViewShell* pExistingSh = 0;
if ( pOldSh )
2000-09-18 16:15:01 +00:00
{
pExistingSh = pOldSh;
// determine type of existing view
if( pExistingSh->IsA( TYPE( SwPagePreView ) ) )
{
sSwViewData = ((SwPagePreView*)pExistingSh)->GetPrevSwViewData();
sNewCrsrPos = ((SwPagePreView*)pExistingSh)->GetNewCrsrPos();
nNewPage = ((SwPagePreView*)pExistingSh)->GetNewPage();
bOldShellWasPagePreView = sal_True;
bIsPreviewDoubleClick = sNewCrsrPos.Len() > 0 || nNewPage != USHRT_MAX;
}
else if( pExistingSh->IsA( TYPE( SwSrcView ) ) )
bOldShellWasSrcView = sal_True;
2000-09-18 16:15:01 +00:00
}
2001-07-23 16:20:51 +00:00
RTL_LOGFILE_CONTEXT_TRACE( aLog, "before create WrtShell" );
if(PTR_CAST( SwView, pExistingSh))
2000-09-18 16:15:01 +00:00
{
pWrtShell = new SwWrtShell( *((SwView*)pExistingSh)->pWrtShell,
pEditWin, *this);
}
else if( dynamic_cast<SwWrtShell*>( pDocSh->GetDoc()->GetCurrentViewShell() ) )
{
pWrtShell = new SwWrtShell( *(SwWrtShell*)pDocSh->GetDoc()->GetCurrentViewShell(),
pEditWin, *this);
2000-09-18 16:15:01 +00:00
}
else
{
SwDoc& rDoc = *((SwDocShell*)pDocSh)->GetDoc();
2000-09-18 16:15:01 +00:00
if( !bOldShellWasSrcView && pWebDShell && !bOldShellWasPagePreView )
aUsrPref.setBrowseMode( sal_True );
else
aUsrPref.setBrowseMode( rDoc.get(IDocumentSettingAccess::BROWSE_MODE) );
2000-09-18 16:15:01 +00:00
//Fuer den BrowseMode wollen wir keinen Factor uebernehmen.
if( aUsrPref.getBrowseMode() && aUsrPref.GetZoomType() != SVX_ZOOM_PERCENT )
2000-09-18 16:15:01 +00:00
{
aUsrPref.SetZoomType( SVX_ZOOM_PERCENT );
aUsrPref.SetZoom( 100 );
}
if(pDocSh->IsPreview())
CWS-TOOLING: integrate CWS os121 2008-11-28 13:44:51 +0100 os r264551 : Copy Hyperlink Location added 2008-11-28 13:36:20 +0100 os r264547 : Copy Hyperlink Location added 2008-11-25 15:43:53 +0100 os r264311 : label of EditHyperlink fixed 2008-11-25 15:42:42 +0100 os r264310 : use ResetAttr to remove hyperlink 2008-11-25 10:08:02 +0100 os r264276 : edit/remove hyperlink names fixed 2008-11-11 15:47:22 +0100 os r263565 : typo fixed 2008-11-10 18:46:00 +0100 os r263536 : CWS-TOOLING: rebase CWS os121 to trunk@263288 (milestone: DEV300:m35) 2008-11-07 15:34:41 +0100 os r263422 : #i6191# accept/reject changes;#i7311# remove hyperlink 2008-11-07 15:34:05 +0100 os r263421 : #i6191# accept/reject changes;#i7311# remove hyperlink 2008-11-06 17:26:18 +0100 os r263402 : #i43971# words from online help documents must not be added to AutoCompletion 2008-11-06 16:08:27 +0100 os r263397 : #i6191# accept/reject changes added to context menu 2008-11-06 16:07:49 +0100 os r263396 : #i6191# accept/reject changes added to context menu 2008-11-06 16:07:16 +0100 os r263395 : #i6191# accept/reject changes added to context menu 2008-11-06 16:06:18 +0100 os r263394 : #i6191# accept/reject changes added to context menu 2008-10-30 14:31:32 +0100 os r262826 : #i84980# less options changed to fewer options 2008-10-30 11:44:41 +0100 os r262824 : #i95624# don't add paragraph numbering in getString() 2008-10-27 10:46:04 +0100 os r262665 : #i88235# SvCheckListBox::SelectEntryPos() paints a CheckBox to the wrong device if page is not visible, yet - call moved to ::Reset() 2008-10-24 15:49:27 +0200 os r262648 : #i77230# make repeating headers the default 2008-10-23 16:49:42 +0200 os r262625 : #i95350# RTL output of table window fixed 2008-10-23 15:37:40 +0200 os r262623 : #i76723# RTL related patch removed - it is now done by vcl 2008-10-22 14:05:58 +0200 os r262601 : #b6297019#,#i49754# LoadStyles: restore outline settings 2008-10-22 14:05:17 +0200 os r262600 : #b6297019#,#i49754# LoadStyles: restore outline settings 2008-10-20 15:39:18 +0200 os r262323 : #i95059# border attribute: which id of SID_ATTR_BORDER_INNER fixed 2008-10-20 09:30:28 +0200 os r262305 : #i95123# conflict css::util::Color and ::Color solved 2008-10-17 11:44:16 +0200 os r262280 : #i93714# merge to PDF: convert fields to text before export 2008-10-17 10:30:11 +0200 os r262275 : #i94364# 2008-10-17 10:11:56 +0200 os r262274 : +i94536# default font ListBoxes: prevent entry duplication if 'Back' button is pressed
2008-12-09 07:49:49 +00:00
{
aUsrPref.SetZoomType( SVX_ZOOM_WHOLEPAGE );
CWS-TOOLING: integrate CWS os121 2008-11-28 13:44:51 +0100 os r264551 : Copy Hyperlink Location added 2008-11-28 13:36:20 +0100 os r264547 : Copy Hyperlink Location added 2008-11-25 15:43:53 +0100 os r264311 : label of EditHyperlink fixed 2008-11-25 15:42:42 +0100 os r264310 : use ResetAttr to remove hyperlink 2008-11-25 10:08:02 +0100 os r264276 : edit/remove hyperlink names fixed 2008-11-11 15:47:22 +0100 os r263565 : typo fixed 2008-11-10 18:46:00 +0100 os r263536 : CWS-TOOLING: rebase CWS os121 to trunk@263288 (milestone: DEV300:m35) 2008-11-07 15:34:41 +0100 os r263422 : #i6191# accept/reject changes;#i7311# remove hyperlink 2008-11-07 15:34:05 +0100 os r263421 : #i6191# accept/reject changes;#i7311# remove hyperlink 2008-11-06 17:26:18 +0100 os r263402 : #i43971# words from online help documents must not be added to AutoCompletion 2008-11-06 16:08:27 +0100 os r263397 : #i6191# accept/reject changes added to context menu 2008-11-06 16:07:49 +0100 os r263396 : #i6191# accept/reject changes added to context menu 2008-11-06 16:07:16 +0100 os r263395 : #i6191# accept/reject changes added to context menu 2008-11-06 16:06:18 +0100 os r263394 : #i6191# accept/reject changes added to context menu 2008-10-30 14:31:32 +0100 os r262826 : #i84980# less options changed to fewer options 2008-10-30 11:44:41 +0100 os r262824 : #i95624# don't add paragraph numbering in getString() 2008-10-27 10:46:04 +0100 os r262665 : #i88235# SvCheckListBox::SelectEntryPos() paints a CheckBox to the wrong device if page is not visible, yet - call moved to ::Reset() 2008-10-24 15:49:27 +0200 os r262648 : #i77230# make repeating headers the default 2008-10-23 16:49:42 +0200 os r262625 : #i95350# RTL output of table window fixed 2008-10-23 15:37:40 +0200 os r262623 : #i76723# RTL related patch removed - it is now done by vcl 2008-10-22 14:05:58 +0200 os r262601 : #b6297019#,#i49754# LoadStyles: restore outline settings 2008-10-22 14:05:17 +0200 os r262600 : #b6297019#,#i49754# LoadStyles: restore outline settings 2008-10-20 15:39:18 +0200 os r262323 : #i95059# border attribute: which id of SID_ATTR_BORDER_INNER fixed 2008-10-20 09:30:28 +0200 os r262305 : #i95123# conflict css::util::Color and ::Color solved 2008-10-17 11:44:16 +0200 os r262280 : #i93714# merge to PDF: convert fields to text before export 2008-10-17 10:30:11 +0200 os r262275 : #i94364# 2008-10-17 10:11:56 +0200 os r262274 : +i94536# default font ListBoxes: prevent entry duplication if 'Back' button is pressed
2008-12-09 07:49:49 +00:00
aUsrPref.SetViewLayoutBookMode( false );
aUsrPref.SetViewLayoutColumns( 1 );
}
pWrtShell = new SwWrtShell( rDoc, pEditWin, *this, &aUsrPref );
// creating an SwView from a SwPagePreView needs to
// add the ViewShell to the ring of the other ViewShell(s)
if(bOldShellWasPagePreView)
{
ViewShell& rPreviewViewShell = *((SwPagePreView*)pExistingSh)->GetViewShell();
pWrtShell->MoveTo(&rPreviewViewShell);
// to update the field command et.al. if necessary
const SwViewOption* pPreViewOpt = rPreviewViewShell.GetViewOptions();
if( pPreViewOpt->IsFldName() != aUsrPref.IsFldName() ||
pPreViewOpt->IsShowHiddenField() != aUsrPref.IsShowHiddenField() ||
pPreViewOpt->IsShowHiddenPara() != aUsrPref.IsShowHiddenPara() ||
pPreViewOpt->IsShowHiddenChar() != aUsrPref.IsShowHiddenChar() )
rPreviewViewShell.ApplyViewOptions(aUsrPref);
// reset design mode at draw view for form
// shell, if needed.
if ( ((SwPagePreView*)pExistingSh)->ResetFormDesignMode() &&
pWrtShell->HasDrawView() )
{
SdrView* pDrawView = pWrtShell->GetDrawView();
pDrawView->SetDesignMode( ((SwPagePreView*)pExistingSh)->FormDesignModeToReset() );
}
}
2000-09-18 16:15:01 +00:00
}
2001-07-23 16:20:51 +00:00
RTL_LOGFILE_CONTEXT_TRACE( aLog, "after create WrtShell" );
2000-09-18 16:15:01 +00:00
// assure that modified state of document
// isn't reset, if document is already modified.
const bool bIsDocModified = pWrtShell->GetDoc()->IsModified();
// damit unter anderem das HLineal im
2000-09-18 16:15:01 +00:00
// ReadonlyFall nicht angezeigt wird
aUsrPref.SetReadonly( pWrtShell->GetViewOptions()->IsReadonly() );
// no margin for OLE!
2000-09-18 16:15:01 +00:00
Size aBrwsBorder;
if( SFX_CREATE_MODE_EMBEDDED != pDocSh->GetCreateMode() )
aBrwsBorder = GetMargin();
pWrtShell->SetBrowseBorder( aBrwsBorder );
2000-09-18 16:15:01 +00:00
// Im CTOR duerfen keine Shell wechsel erfolgen, die muessen ueber
// den Timer "zwischen gespeichert" werden. Sonst raeumt der SFX
// sie wieder vom Stack!
sal_Bool bOld = bNoInterrupt;
bNoInterrupt = sal_True;
pHRuler->SetActive( sal_True );
pVRuler->SetActive( sal_True );
2000-09-18 16:15:01 +00:00
SfxViewFrame* pViewFrame = GetViewFrame();
if( pViewFrame->GetFrame().GetParentFrame())
2000-09-18 16:15:01 +00:00
{
aUsrPref.SetViewHRuler(sal_False);
aUsrPref.SetViewVRuler(sal_False);
2000-09-18 16:15:01 +00:00
}
StartListening( *pViewFrame, sal_True );
StartListening( *pDocSh, sal_True );
2000-09-18 16:15:01 +00:00
// Set Zoom-factor from HLineal
Fraction aZoomFract( aUsrPref.GetZoom(), 100 );
pHRuler->SetZoom( aZoomFract );
pVRuler->SetZoom( aZoomFract );
pHRuler->SetDoubleClickHdl(LINK( this, SwView, ExecRulerClick ));
FieldUnit eMetric = pUsrPref->GetHScrollMetric();
pHRuler->SetUnit( eMetric );
eMetric = pUsrPref->GetVScrollMetric();
pVRuler->SetUnit( eMetric );
pHRuler->SetCharWidth( 371 ); // default character width
pVRuler->SetLineHeight( 551 ); // default line height
2000-09-18 16:15:01 +00:00
// DocShell setzen
pDocSh->SetView( this );
SW_MOD()->SetView( this );
mpPostItMgr = new SwPostItMgr(this);
2000-09-18 16:15:01 +00:00
// Die DocSize erfragen und verarbeiten. Ueber die Handler konnte
// die Shell nicht gefunden werden, weil die Shell innerhalb CTOR-Phase
// nicht in der SFX-Verwaltung bekannt ist.
DocSzChgd( pWrtShell->GetDocSize() );
// AttrChangedNotify Link setzen
pWrtShell->SetChgLnk(LINK(this, SwView, AttrChangedNotify));
if( pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED &&
//TODO/LATER: why a cast here?
//!((SvEmbeddedObject *)pDocSh)->GetVisArea().IsEmpty() )
//SetVisArea( ((SvEmbeddedObject *)pDocSh)->GetVisArea(),sal_False);
!pDocSh->GetVisArea(ASPECT_CONTENT).IsEmpty() )
SetVisArea( pDocSh->GetVisArea(ASPECT_CONTENT),sal_False);
2000-09-18 16:15:01 +00:00
SAL_WARN_IF(
officecfg::Office::Common::Undo::Steps::get() <= 0,
"sw", "/org.openoffice.Office.Common/Undo/Steps <= 0");
pWrtShell->DoUndo( true );
2000-09-18 16:15:01 +00:00
const sal_Bool bBrowse = pWrtShell->GetViewOptions()->getBrowseMode();
// Disable "multiple window"
2000-09-18 16:15:01 +00:00
SetNewWindowAllowed(!bBrowse);
// End of disabled multiple window
2000-09-18 16:15:01 +00:00
ShowVScrollbar(aUsrPref.IsViewVScrollBar());
ShowHScrollbar(aUsrPref.IsViewHScrollBar());
pHScrollbar->SetAuto(bBrowse);
if( aUsrPref.IsViewHRuler() )
2000-09-18 16:15:01 +00:00
CreateTab();
if( aUsrPref.IsViewVRuler() )
2000-09-18 16:15:01 +00:00
CreateVLineal();
pWrtShell->SetUIOptions( aUsrPref );
pWrtShell->SetReadOnlyAvailable( aUsrPref.IsCursorInProtectedArea() );
pWrtShell->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions());
2000-09-18 16:15:01 +00:00
if( pWrtShell->GetDoc()->IsUpdateExpFld() )
{
if (pWrtShell->GetDoc()->containsUpdatableFields())
{
SET_CURR_SHELL( pWrtShell );
pWrtShell->StartAction();
pWrtShell->CalcLayout();
pWrtShell->GetDoc()->UpdateFlds(NULL, false);
pWrtShell->EndAction();
}
2000-09-18 16:15:01 +00:00
pWrtShell->GetDoc()->SetUpdateExpFldStat( sal_False );
}
// ggfs. alle Verzeichnisse updaten:
if( pWrtShell->GetDoc()->IsUpdateTOX() )
{
SfxRequest aSfxRequest( FN_UPDATE_TOX, SFX_CALLMODE_SLOT, GetPool() );
Execute( aSfxRequest );
pWrtShell->GetDoc()->SetUpdateTOX( sal_False ); // wieder zurueck setzen
pWrtShell->SttEndDoc(sal_True);
2000-09-18 16:15:01 +00:00
}
// kein ResetModified, wenn es schone eine View auf dieses Doc gibt
SfxViewFrame* pVFrame = GetViewFrame();
SfxViewFrame* pFirst = SfxViewFrame::GetFirst(pDocSh);
// zur Zeit(360) wird die View erst nach dem Ctor eingetragen
// der folgende Ausdruck funktioniert auch, wenn sich das aendert
// wenn per Undo nicht mehr die Modifizierung aufhebar ist,
2000-09-18 16:15:01 +00:00
// so setze das Modified NICHT zurueck.
// no reset of modified state, if document
// was already modified.
if (!pWrtShell->GetDoc()->GetIDocumentUndoRedo().IsUndoNoResetModified() &&
( !pFirst || pFirst == pVFrame ) &&
!bIsDocModified )
{
2000-09-18 16:15:01 +00:00
pWrtShell->ResetModified();
}
2000-09-18 16:15:01 +00:00
bNoInterrupt = bOld;
// wird ein GlobalDoc neu angelegt, soll auch der Navigator erzeugt werden
if( pDocSh->IsA(SwGlobalDocShell::StaticType()) &&
!pVFrame->GetChildWindow( SID_NAVIGATOR ))
{
SfxBoolItem aNavi(SID_NAVIGATOR, sal_True);
GetDispatcher().Execute(SID_NAVIGATOR, SFX_CALLMODE_ASYNCHRON, &aNavi, 0L);
}
uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame().GetFrameInterface();
uno::Reference< frame::XFrame > xBeamerFrame = xFrame->findFrame(
2010-10-27 11:38:46 +01:00
OUString(RTL_CONSTASCII_USTRINGPARAM("_beamer")), frame::FrameSearchFlag::CHILDREN);
if(xBeamerFrame.is())
{
SwDBData aData = pWrtShell->GetDBData();
SW_MOD()->ShowDBObj( *this, aData );
}
// has anybody calls the attrchanged handler in the constructor?
if( bAttrChgNotifiedWithRegistrations )
{
GetViewFrame()->GetBindings().LEAVEREGISTRATIONS();
if( aTimer.IsActive() )
aTimer.Stop();
}
2000-09-18 16:15:01 +00:00
aTimer.SetTimeoutHdl(LINK(this, SwView, TimeoutHdl));
bAttrChgNotified = bAttrChgNotifiedWithRegistrations = sal_False;
if(bOldModifyFlag)
pDocSh->EnableSetModified( sal_True );
InvalidateBorder();
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 Conflicts: starmath/inc/applicat.hxx starmath/inc/dialog.hxx starmath/inc/document.hxx starmath/inc/edit.hxx starmath/inc/format.hxx starmath/inc/node.hxx starmath/inc/parse.hxx starmath/inc/rect.hxx starmath/inc/smdll.hxx starmath/inc/smmod.hxx starmath/inc/starmath.hrc starmath/inc/symbol.hxx starmath/inc/toolbox.hxx starmath/inc/utility.hxx starmath/inc/view.hxx starmath/prj/build.lst starmath/qa/cppunit/version.map starmath/sdi/smslots.sdi starmath/source/accessibility.cxx starmath/source/cfgitem.cxx starmath/source/cfgitem.hxx starmath/source/config.cxx starmath/source/dialog.cxx starmath/source/document.cxx starmath/source/edit.cxx starmath/source/format.cxx starmath/source/makefile.mk starmath/source/math_pch.cxx starmath/source/mathmlexport.cxx starmath/source/mathmlimport.cxx starmath/source/mathtype.cxx starmath/source/node.cxx starmath/source/parse.cxx starmath/source/rect.cxx starmath/source/register.cxx starmath/source/smdetect.cxx starmath/source/smdll.cxx starmath/source/smmod.cxx starmath/source/smres.src starmath/source/symbol.cxx starmath/source/toolbox.cxx starmath/source/unomodel.cxx starmath/source/utility.cxx starmath/source/view.cxx sw/JunitTest_sw_unoapi.mk sw/Library_swd.mk sw/Makefile sw/inc/IDocumentFieldsAccess.hxx sw/inc/IDocumentSettingAccess.hxx sw/inc/IDocumentUndoRedo.hxx sw/inc/IShellCursorSupplier.hxx sw/inc/SwUndoField.hxx sw/inc/acmplwrd.hxx sw/inc/authfld.hxx sw/inc/bparr.hxx sw/inc/calbck.hxx sw/inc/calc.hxx sw/inc/ccoll.hxx sw/inc/cellatr.hxx sw/inc/cellfml.hxx sw/inc/chpfld.hxx sw/inc/cmdid.h sw/inc/crsrsh.hxx sw/inc/crstate.hxx sw/inc/dbfld.hxx sw/inc/dbmgr.hxx sw/inc/dcontact.hxx sw/inc/ddefld.hxx sw/inc/doc.hxx sw/inc/docary.hxx sw/inc/docsh.hxx sw/inc/docstat.hxx sw/inc/docstyle.hxx sw/inc/docufld.hxx sw/inc/editsh.hxx sw/inc/errhdl.hxx sw/inc/expfld.hxx sw/inc/fchrfmt.hxx sw/inc/fesh.hxx sw/inc/fldbas.hxx sw/inc/flddat.hxx sw/inc/flddropdown.hxx sw/inc/flypos.hxx sw/inc/fmtanchr.hxx sw/inc/fmtautofmt.hxx sw/inc/fmtclds.hxx sw/inc/fmtcnct.hxx sw/inc/fmtcol.hxx sw/inc/fmtfsize.hxx sw/inc/fmtftn.hxx sw/inc/fmtftntx.hxx sw/inc/fmthdft.hxx sw/inc/fmtinfmt.hxx sw/inc/fmtline.hxx sw/inc/fmtornt.hxx sw/inc/fmtpdsc.hxx sw/inc/fmtruby.hxx sw/inc/fmtsrnd.hxx sw/inc/fmturl.hxx sw/inc/fmtwrapinfluenceonobjpos.hxx sw/inc/format.hxx sw/inc/frmatr.hxx sw/inc/frmfmt.hxx sw/inc/grfatr.hxx sw/inc/helpid.h sw/inc/hintids.hxx sw/inc/hints.hxx sw/inc/htmltbl.hxx sw/inc/inetfld.hxx sw/inc/io.hxx sw/inc/iodetect.hxx sw/inc/itabenum.hxx sw/inc/ndarr.hxx sw/inc/ndgrf.hxx sw/inc/ndindex.hxx sw/inc/ndnotxt.hxx sw/inc/ndole.hxx sw/inc/ndtxt.hxx sw/inc/ndtyp.hxx sw/inc/node.hxx sw/inc/numrule.hxx sw/inc/pagedesc.hxx sw/inc/pagepreviewlayout.hxx sw/inc/pam.hxx sw/inc/paratr.hxx sw/inc/poolfmt.awk sw/inc/poolfmt.hxx sw/inc/printdata.hxx sw/inc/reffld.hxx sw/inc/shellio.hxx sw/inc/shellres.hxx sw/inc/swabstdlg.hxx sw/inc/swatrset.hxx sw/inc/swerror.h sw/inc/swprtopt.hxx sw/inc/swtable.hxx sw/inc/swtypes.hxx sw/inc/tblafmt.hxx sw/inc/tgrditem.hxx sw/inc/tox.hxx sw/inc/undobj.hxx sw/inc/unocoll.hxx sw/inc/unoframe.hxx sw/inc/unoprnms.hxx sw/inc/usrfld.hxx sw/inc/viewopt.hxx sw/inc/viewsh.hxx sw/inc/viscrs.hxx sw/prj/build.lst sw/qa/complex/accessibility/makefile.mk sw/qa/core/Test-BigPtrArray.cxx sw/qa/core/makefile.mk sw/sdi/makefile.mk sw/source/core/access/makefile.mk sw/source/core/access/textmarkuphelper.cxx sw/source/core/attr/calbck.cxx sw/source/core/attr/cellatr.cxx sw/source/core/attr/fmtwrapinfluenceonobjpos.cxx sw/source/core/attr/format.cxx sw/source/core/attr/hints.cxx sw/source/core/bastyp/calc.cxx sw/source/core/bastyp/init.cxx sw/source/core/bastyp/makefile.mk sw/source/core/bastyp/swcache.cxx sw/source/core/crsr/bookmrk.cxx sw/source/core/crsr/callnk.cxx sw/source/core/crsr/crsrsh.cxx sw/source/core/crsr/crstrvl.cxx sw/source/core/crsr/findattr.cxx sw/source/core/crsr/findcoll.cxx sw/source/core/crsr/makefile.mk sw/source/core/crsr/pam.cxx sw/source/core/crsr/swcrsr.cxx sw/source/core/crsr/trvltbl.cxx sw/source/core/crsr/unocrsr.cxx sw/source/core/crsr/viscrs.cxx sw/source/core/doc/acmplwrd.cxx sw/source/core/doc/doc.cxx sw/source/core/doc/docbm.cxx sw/source/core/doc/doccomp.cxx sw/source/core/doc/docdesc.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docedt.cxx sw/source/core/doc/docfld.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/docftn.cxx sw/source/core/doc/docglbl.cxx sw/source/core/doc/docglos.cxx sw/source/core/doc/doclay.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docnum.cxx sw/source/core/doc/docredln.cxx sw/source/core/doc/docruby.cxx sw/source/core/doc/docsort.cxx sw/source/core/doc/docstat.cxx sw/source/core/doc/doctxm.cxx sw/source/core/doc/fmtcol.cxx sw/source/core/doc/gctable.cxx sw/source/core/doc/htmltbl.cxx sw/source/core/doc/makefile.mk sw/source/core/doc/number.cxx sw/source/core/doc/poolfmt.cxx sw/source/core/doc/tblafmt.cxx sw/source/core/doc/tblcpy.cxx sw/source/core/doc/tblrwcl.cxx sw/source/core/docnode/makefile.mk sw/source/core/docnode/ndcopy.cxx sw/source/core/docnode/ndnum.cxx sw/source/core/docnode/ndsect.cxx sw/source/core/docnode/ndtbl.cxx sw/source/core/docnode/ndtbl1.cxx sw/source/core/docnode/node.cxx sw/source/core/docnode/node2lay.cxx sw/source/core/docnode/nodes.cxx sw/source/core/docnode/section.cxx sw/source/core/docnode/swbaslnk.cxx sw/source/core/draw/dcontact.cxx sw/source/core/draw/dflyobj.cxx sw/source/core/draw/drawdoc.cxx sw/source/core/draw/dview.cxx sw/source/core/draw/makefile.mk sw/source/core/edit/autofmt.cxx sw/source/core/edit/edattr.cxx sw/source/core/edit/eddel.cxx sw/source/core/edit/edfcol.cxx sw/source/core/edit/edfld.cxx sw/source/core/edit/edfldexp.cxx sw/source/core/edit/edfmt.cxx sw/source/core/edit/edglss.cxx sw/source/core/edit/editsh.cxx sw/source/core/edit/edlingu.cxx sw/source/core/edit/ednumber.cxx sw/source/core/edit/edsect.cxx sw/source/core/edit/edtab.cxx sw/source/core/edit/edtox.cxx sw/source/core/edit/edundo.cxx sw/source/core/edit/makefile.mk sw/source/core/except/dbgloop.cxx sw/source/core/except/errhdl.cxx sw/source/core/fields/authfld.cxx sw/source/core/fields/cellfml.cxx sw/source/core/fields/chpfld.cxx sw/source/core/fields/dbfld.cxx sw/source/core/fields/ddefld.cxx sw/source/core/fields/ddetbl.cxx sw/source/core/fields/docufld.cxx sw/source/core/fields/expfld.cxx sw/source/core/fields/fldbas.cxx sw/source/core/fields/flddat.cxx sw/source/core/fields/flddropdown.cxx sw/source/core/fields/macrofld.cxx sw/source/core/fields/makefile.mk sw/source/core/fields/reffld.cxx sw/source/core/fields/scrptfld.cxx sw/source/core/fields/tblcalc.cxx sw/source/core/fields/usrfld.cxx sw/source/core/frmedt/fecopy.cxx sw/source/core/frmedt/fedesc.cxx sw/source/core/frmedt/fefly1.cxx sw/source/core/frmedt/feshview.cxx sw/source/core/frmedt/fetab.cxx sw/source/core/frmedt/fews.cxx sw/source/core/frmedt/makefile.mk sw/source/core/frmedt/tblsel.cxx sw/source/core/graphic/grfatr.cxx sw/source/core/inc/SwUndoFmt.hxx sw/source/core/inc/SwUndoTOXChange.hxx sw/source/core/inc/anchoredobjectposition.hxx sw/source/core/inc/dbgloop.hxx sw/source/core/inc/drawfont.hxx sw/source/core/inc/flowfrm.hxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/inc/layact.hxx sw/source/core/inc/layfrm.hxx sw/source/core/inc/notxtfrm.hxx sw/source/core/inc/rolbck.hxx sw/source/core/inc/rootfrm.hxx sw/source/core/inc/scriptinfo.hxx sw/source/core/inc/swblocks.hxx sw/source/core/inc/swcache.hxx sw/source/core/inc/tabfrm.hxx sw/source/core/inc/txmsrt.hxx sw/source/core/inc/undoflystrattr.hxx sw/source/core/inc/viewimp.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/calcmove.cxx sw/source/core/layout/dbg_lay.cxx sw/source/core/layout/findfrm.cxx sw/source/core/layout/flowfrm.cxx sw/source/core/layout/fly.cxx sw/source/core/layout/flycnt.cxx sw/source/core/layout/flyincnt.cxx sw/source/core/layout/flylay.cxx sw/source/core/layout/frmtool.cxx sw/source/core/layout/ftnfrm.cxx sw/source/core/layout/layact.cxx sw/source/core/layout/laycache.cxx sw/source/core/layout/makefile.mk sw/source/core/layout/objectformatter.cxx sw/source/core/layout/pagechg.cxx sw/source/core/layout/pagedesc.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/layout/sectfrm.cxx sw/source/core/layout/tabfrm.cxx sw/source/core/layout/trvlfrm.cxx sw/source/core/layout/unusedf.cxx sw/source/core/layout/wsfrm.cxx sw/source/core/makefile.mk sw/source/core/objectpositioning/anchoredobjectposition.cxx sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx sw/source/core/objectpositioning/makefile.mk sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx sw/source/core/ole/ndole.cxx sw/source/core/para/makefile.mk sw/source/core/para/paratr.cxx sw/source/core/sw3io/makefile.mk sw/source/core/sw3io/sw3convert.cxx sw/source/core/swg/SwXMLTextBlocks.cxx sw/source/core/swg/makefile.mk sw/source/core/swg/swblocks.cxx sw/source/core/table/swnewtable.cxx sw/source/core/table/swtable.cxx sw/source/core/text/EnhancedPDFExportHelper.cxx sw/source/core/text/atrstck.cxx sw/source/core/text/frmcrsr.cxx sw/source/core/text/frmform.cxx sw/source/core/text/itrcrsr.cxx sw/source/core/text/itrform2.cxx sw/source/core/text/makefile.mk sw/source/core/text/porlay.cxx sw/source/core/text/pormulti.cxx sw/source/core/text/txtfld.cxx sw/source/core/text/txtfrm.cxx sw/source/core/text/txtio.cxx sw/source/core/tox/makefile.mk sw/source/core/tox/txmsrt.cxx sw/source/core/txtnode/fmtatr2.cxx sw/source/core/txtnode/fntcache.cxx sw/source/core/txtnode/fntcap.cxx sw/source/core/txtnode/makefile.mk sw/source/core/txtnode/ndhints.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/txtnode/swfont.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txtatr2.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/undo/SwUndoField.cxx sw/source/core/undo/SwUndoPageDesc.cxx sw/source/core/undo/SwUndoTOXChange.cxx sw/source/core/undo/docundo.cxx sw/source/core/undo/makefile.mk sw/source/core/undo/rolbck.cxx sw/source/core/undo/unbkmk.cxx sw/source/core/undo/undel.cxx sw/source/core/undo/undobj.cxx sw/source/core/undo/undobj1.cxx sw/source/core/undo/unfmco.cxx sw/source/core/undo/unins.cxx sw/source/core/undo/unnum.cxx sw/source/core/undo/unoutl.cxx sw/source/core/undo/unredln.cxx sw/source/core/undo/unsect.cxx sw/source/core/undo/unsort.cxx sw/source/core/undo/unspnd.cxx sw/source/core/undo/untbl.cxx sw/source/core/unocore/makefile.mk sw/source/core/unocore/swunohelper.cxx sw/source/core/unocore/unobkm.cxx sw/source/core/unocore/unocoll.cxx sw/source/core/unocore/unocrsrhelper.cxx sw/source/core/unocore/unodraw.cxx sw/source/core/unocore/unofield.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unoredlines.cxx sw/source/core/unocore/unosett.cxx sw/source/core/unocore/unosrch.cxx sw/source/core/unocore/unostyle.cxx sw/source/core/unocore/unotbl.cxx sw/source/core/view/vdraw.cxx sw/source/core/view/viewimp.cxx sw/source/core/view/viewpg.cxx sw/source/core/view/viewsh.cxx sw/source/core/view/vnew.cxx sw/source/core/view/vprint.cxx sw/source/filter/ascii/ascatr.cxx sw/source/filter/ascii/makefile.mk sw/source/filter/ascii/wrtasc.cxx sw/source/filter/basflt/fltini.cxx sw/source/filter/basflt/iodetect.cxx sw/source/filter/basflt/makefile.mk sw/source/filter/html/SwAppletImpl.cxx sw/source/filter/html/css1atr.cxx sw/source/filter/html/htmlatr.cxx sw/source/filter/html/htmlbas.cxx sw/source/filter/html/htmlcss1.cxx sw/source/filter/html/htmlfly.cxx sw/source/filter/html/htmlftn.cxx sw/source/filter/html/htmlgrin.cxx sw/source/filter/html/htmlnum.cxx sw/source/filter/html/htmlplug.cxx sw/source/filter/html/htmltab.cxx sw/source/filter/html/makefile.mk sw/source/filter/html/parcss1.cxx sw/source/filter/html/svxcss1.cxx sw/source/filter/html/swhtml.cxx sw/source/filter/inc/msfilter.hxx sw/source/filter/inc/wrtswtbl.hxx sw/source/filter/rtf/makefile.mk sw/source/filter/rtf/rtffly.cxx sw/source/filter/rtf/rtfnum.cxx sw/source/filter/rtf/rtftbl.cxx sw/source/filter/rtf/swparrtf.cxx sw/source/filter/rtf/swparrtf.hxx sw/source/filter/writer/makefile.mk sw/source/filter/writer/writer.cxx sw/source/filter/writer/wrt_fn.cxx sw/source/filter/writer/wrtswtbl.cxx sw/source/filter/ww1/fltshell.cxx sw/source/filter/ww1/makefile.mk sw/source/filter/ww1/w1class.cxx sw/source/filter/ww1/w1class.hxx sw/source/filter/ww1/w1filter.cxx sw/source/filter/ww1/w1par.cxx sw/source/filter/ww1/w1sprm.cxx sw/source/filter/ww1/w1struct.hxx sw/source/filter/ww8/README-rtf.txt sw/source/filter/ww8/attributeoutputbase.hxx sw/source/filter/ww8/docxattributeoutput.cxx sw/source/filter/ww8/docxattributeoutput.hxx sw/source/filter/ww8/docxexport.cxx sw/source/filter/ww8/docxexport.hxx sw/source/filter/ww8/docxexportfilter.cxx sw/source/filter/ww8/dump/dump8.cxx sw/source/filter/ww8/dump/dump8a.cxx sw/source/filter/ww8/dump/msvbasic.cxx sw/source/filter/ww8/dump/msvbasic.hxx sw/source/filter/ww8/dump/ww8darr.cxx sw/source/filter/ww8/dump/ww8darr.hxx sw/source/filter/ww8/dump/ww8dout.cxx sw/source/filter/ww8/dump/ww8dout.hxx sw/source/filter/ww8/dump/ww8scan.cxx sw/source/filter/ww8/dump/ww8scan.hxx sw/source/filter/ww8/dump/ww8struc.hxx sw/source/filter/ww8/makefile.mk sw/source/filter/ww8/rtfattributeoutput.cxx sw/source/filter/ww8/rtfattributeoutput.hxx sw/source/filter/ww8/rtfexport.cxx sw/source/filter/ww8/rtfexport.hxx sw/source/filter/ww8/rtfexportfilter.cxx sw/source/filter/ww8/rtfexportfilter.hxx sw/source/filter/ww8/rtfimportfilter.cxx sw/source/filter/ww8/rtfimportfilter.hxx sw/source/filter/ww8/rtfsdrexport.cxx sw/source/filter/ww8/rtfsdrexport.hxx sw/source/filter/ww8/writerhelper.cxx sw/source/filter/ww8/writerwordglue.cxx sw/source/filter/ww8/wrtw8esh.cxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtw8num.cxx sw/source/filter/ww8/wrtw8sty.cxx sw/source/filter/ww8/wrtww8.cxx sw/source/filter/ww8/wrtww8.hxx sw/source/filter/ww8/wrtww8gr.cxx sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8attributeoutput.hxx sw/source/filter/ww8/ww8graf.cxx sw/source/filter/ww8/ww8graf.hxx sw/source/filter/ww8/ww8graf2.cxx sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.hxx sw/source/filter/ww8/ww8par2.cxx sw/source/filter/ww8/ww8par3.cxx sw/source/filter/ww8/ww8par5.cxx sw/source/filter/ww8/ww8par6.cxx sw/source/filter/ww8/ww8scan.cxx sw/source/filter/ww8/ww8scan.hxx sw/source/filter/ww8/ww8struc.hxx sw/source/filter/xml/makefile.mk sw/source/filter/xml/xmlimpit.cxx sw/source/filter/xml/xmltble.cxx sw/source/filter/xml/xmltbli.cxx sw/source/ui/app/appenv.cxx sw/source/ui/app/apphdl.cxx sw/source/ui/app/applab.cxx sw/source/ui/app/appopt.cxx sw/source/ui/app/docsh.cxx sw/source/ui/app/docsh2.cxx sw/source/ui/app/docshini.cxx sw/source/ui/app/docst.cxx sw/source/ui/app/docstyle.cxx sw/source/ui/app/makefile.mk sw/source/ui/app/mn.src sw/source/ui/app/swmodul1.cxx sw/source/ui/cctrl/makefile.mk sw/source/ui/cctrl/swlbox.cxx sw/source/ui/chrdlg/break.cxx sw/source/ui/chrdlg/ccoll.cxx sw/source/ui/chrdlg/chardlg.cxx sw/source/ui/chrdlg/drpcps.cxx sw/source/ui/chrdlg/makefile.mk sw/source/ui/chrdlg/numpara.cxx sw/source/ui/chrdlg/pardlg.cxx sw/source/ui/chrdlg/swuiccoll.cxx sw/source/ui/config/barcfg.cxx sw/source/ui/config/caption.cxx sw/source/ui/config/cfgitems.cxx sw/source/ui/config/fontcfg.cxx sw/source/ui/config/mailconfigpage.cxx sw/source/ui/config/makefile.mk sw/source/ui/config/modcfg.cxx sw/source/ui/config/optcomp.cxx sw/source/ui/config/optload.cxx sw/source/ui/config/optpage.cxx sw/source/ui/config/prtopt.cxx sw/source/ui/config/uinums.cxx sw/source/ui/config/usrpref.cxx sw/source/ui/config/viewopt.cxx sw/source/ui/dbui/dbinsdlg.cxx sw/source/ui/dbui/dbmgr.cxx sw/source/ui/dbui/dbtree.cxx sw/source/ui/dbui/makefile.mk sw/source/ui/dbui/mmaddressblockpage.cxx sw/source/ui/dbui/mmdocselectpage.cxx sw/source/ui/dbui/mmoutputpage.cxx sw/source/ui/dbui/swdbtoolsclient.cxx sw/source/ui/dialog/abstract.cxx sw/source/ui/dialog/ascfldlg.cxx sw/source/ui/dialog/macassgn.cxx sw/source/ui/dialog/makefile.mk sw/source/ui/dialog/regionsw.cxx sw/source/ui/dialog/swdlgfact.cxx sw/source/ui/dialog/swdlgfact.hxx sw/source/ui/dialog/uiregionsw.cxx sw/source/ui/dochdl/gloshdl.cxx sw/source/ui/dochdl/makefile.mk sw/source/ui/dochdl/swdtflvr.cxx sw/source/ui/docvw/PostItMgr.cxx sw/source/ui/docvw/SidebarWin.cxx sw/source/ui/docvw/edtdd.cxx sw/source/ui/docvw/edtwin.cxx sw/source/ui/docvw/edtwin2.cxx sw/source/ui/docvw/edtwin3.cxx sw/source/ui/docvw/makefile.mk sw/source/ui/docvw/romenu.cxx sw/source/ui/docvw/romenu.hxx sw/source/ui/docvw/srcedtw.cxx sw/source/ui/envelp/envfmt.cxx sw/source/ui/envelp/envimg.cxx sw/source/ui/envelp/envlop1.cxx sw/source/ui/envelp/envprt.cxx sw/source/ui/envelp/label1.cxx sw/source/ui/envelp/labfmt.cxx sw/source/ui/envelp/labprt.cxx sw/source/ui/envelp/mailmrge.cxx sw/source/ui/envelp/makefile.mk sw/source/ui/fldui/flddb.cxx sw/source/ui/fldui/flddinf.cxx sw/source/ui/fldui/flddok.cxx sw/source/ui/fldui/fldedt.cxx sw/source/ui/fldui/fldfunc.cxx sw/source/ui/fldui/fldmgr.cxx sw/source/ui/fldui/fldpage.cxx sw/source/ui/fldui/fldref.cxx sw/source/ui/fldui/fldtdlg.cxx sw/source/ui/fldui/fldvar.cxx sw/source/ui/fldui/fldwrap.cxx sw/source/ui/fldui/inpdlg.cxx sw/source/ui/fldui/makefile.mk sw/source/ui/fmtui/makefile.mk sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/frmdlg/colmgr.cxx sw/source/ui/frmdlg/column.cxx sw/source/ui/frmdlg/cption.cxx sw/source/ui/frmdlg/frmdlg.cxx sw/source/ui/frmdlg/frmmgr.cxx sw/source/ui/frmdlg/frmpage.cxx sw/source/ui/frmdlg/makefile.mk sw/source/ui/frmdlg/wrap.cxx sw/source/ui/globdoc/makefile.mk sw/source/ui/inc/bmpwin.hxx sw/source/ui/inc/colmgr.hxx sw/source/ui/inc/column.hxx sw/source/ui/inc/envimg.hxx sw/source/ui/inc/envlop.hxx sw/source/ui/inc/frmpage.hxx sw/source/ui/inc/inputwin.hxx sw/source/ui/inc/javaedit.hxx sw/source/ui/inc/num.hxx sw/source/ui/inc/optpage.hxx sw/source/ui/inc/regionsw.hxx sw/source/ui/inc/split.hxx sw/source/ui/inc/swlbox.hxx sw/source/ui/inc/swmn_tmpl.hrc sw/source/ui/inc/swuiidxmrk.hxx sw/source/ui/inc/tabsh.hxx sw/source/ui/inc/toxmgr.hxx sw/source/ui/inc/uiitems.hxx sw/source/ui/inc/view.hxx sw/source/ui/inc/workctrl.hxx sw/source/ui/inc/wrap.hxx sw/source/ui/inc/wrtsh.hxx sw/source/ui/index/cnttab.cxx sw/source/ui/index/makefile.mk sw/source/ui/index/toxmgr.cxx sw/source/ui/lingu/hhcwrp.cxx sw/source/ui/lingu/makefile.mk sw/source/ui/lingu/olmenu.cxx sw/source/ui/misc/bookmark.cxx sw/source/ui/misc/docfnote.cxx sw/source/ui/misc/glosbib.cxx sw/source/ui/misc/glosdoc.cxx sw/source/ui/misc/glshell.cxx sw/source/ui/misc/insfnote.cxx sw/source/ui/misc/linenum.cxx sw/source/ui/misc/makefile.mk sw/source/ui/misc/num.cxx sw/source/ui/misc/numberingtypelistbox.cxx sw/source/ui/misc/outline.cxx sw/source/ui/misc/pgfnote.cxx sw/source/ui/misc/pggrid.cxx sw/source/ui/misc/redlndlg.cxx sw/source/ui/misc/srtdlg.cxx sw/source/ui/misc/swmodalredlineacceptdlg.cxx sw/source/ui/ribbar/conarc.cxx sw/source/ui/ribbar/drawbase.cxx sw/source/ui/ribbar/inputwin.cxx sw/source/ui/ribbar/inputwin.src sw/source/ui/ribbar/makefile.mk sw/source/ui/ribbar/tbxanchr.cxx sw/source/ui/ribbar/workctrl.cxx sw/source/ui/ribbar/workctrl.src sw/source/ui/shells/annotsh.cxx sw/source/ui/shells/basesh.cxx sw/source/ui/shells/beziersh.cxx sw/source/ui/shells/drawdlg.cxx sw/source/ui/shells/drwbassh.cxx sw/source/ui/shells/drwtxtex.cxx sw/source/ui/shells/drwtxtsh.cxx sw/source/ui/shells/frmsh.cxx sw/source/ui/shells/grfsh.cxx sw/source/ui/shells/grfshex.cxx sw/source/ui/shells/makefile.mk sw/source/ui/shells/tabsh.cxx sw/source/ui/shells/textfld.cxx sw/source/ui/shells/textglos.cxx sw/source/ui/shells/textsh.cxx sw/source/ui/shells/textsh1.cxx sw/source/ui/shells/txtattr.cxx sw/source/ui/shells/txtcrsr.cxx sw/source/ui/shells/txtnum.cxx sw/source/ui/table/convert.cxx sw/source/ui/table/instable.cxx sw/source/ui/table/makefile.mk sw/source/ui/table/swtablerep.cxx sw/source/ui/table/tabledlg.cxx sw/source/ui/table/tablemgr.cxx sw/source/ui/table/tablepg.hxx sw/source/ui/table/tautofmt.cxx sw/source/ui/uiview/formatclipboard.cxx sw/source/ui/uiview/makefile.mk sw/source/ui/uiview/pview.cxx sw/source/ui/uiview/pview.src sw/source/ui/uiview/scroll.cxx sw/source/ui/uiview/srcview.cxx sw/source/ui/uiview/swcli.cxx sw/source/ui/uiview/uivwimp.cxx sw/source/ui/uiview/view.cxx sw/source/ui/uiview/view1.cxx sw/source/ui/uiview/view2.cxx sw/source/ui/uiview/viewcoll.cxx sw/source/ui/uiview/viewdlg2.cxx sw/source/ui/uiview/viewling.cxx sw/source/ui/uiview/viewmdi.cxx sw/source/ui/uiview/viewport.cxx sw/source/ui/uiview/viewprt.cxx sw/source/ui/uiview/viewsrch.cxx sw/source/ui/uiview/viewtab.cxx sw/source/ui/uno/SwXDocumentSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.cxx sw/source/ui/uno/SwXPrintPreviewSettings.hxx sw/source/ui/uno/unoatxt.cxx sw/source/ui/uno/unomod.cxx sw/source/ui/uno/unotxdoc.cxx sw/source/ui/uno/unotxvw.cxx sw/source/ui/utlui/attrdesc.cxx sw/source/ui/utlui/content.cxx sw/source/ui/utlui/glbltree.cxx sw/source/ui/utlui/initui.cxx sw/source/ui/utlui/makefile.mk sw/source/ui/utlui/navipi.cxx sw/source/ui/utlui/navipi.src sw/source/ui/utlui/numfmtlb.cxx sw/source/ui/utlui/prcntfld.cxx sw/source/ui/utlui/uiitems.cxx sw/source/ui/utlui/uitool.cxx sw/source/ui/utlui/unotools.cxx sw/source/ui/utlui/viewlayoutctrl.cxx sw/source/ui/utlui/zoomctrl.cxx sw/source/ui/vba/makefile.mk sw/source/ui/vba/service.cxx sw/source/ui/web/makefile.mk sw/source/ui/wrtsh/makefile.mk sw/source/ui/wrtsh/wrtsh1.cxx sw/source/ui/wrtsh/wrtsh2.cxx sw/source/ui/wrtsh/wrtsh4.cxx sw/source/ui/wrtsh/wrtundo.cxx sw/util/hidother.src sw/util/makefile.mk sw/util/msword.map
2011-03-14 16:51:14 +00:00
if( !pHScrollbar->IsVisible( sal_True ) )
ShowHScrollbar( sal_False );
if( !pVScrollbar->IsVisible( sal_True ) )
ShowVScrollbar( sal_False );
GetViewFrame()->GetWindow().AddChildEventListener( LINK( this, SwView, WindowChildEventListener ) );
2000-09-18 16:15:01 +00:00
}
SwView::~SwView()
{
GetViewFrame()->GetWindow().RemoveChildEventListener( LINK( this, SwView, WindowChildEventListener ) );
delete mpPostItMgr;
mpPostItMgr = 0;
bInDtor = sal_True;
2000-09-18 16:15:01 +00:00
pEditWin->Hide(); // damit kein Paint Aerger machen kann!
// An der SwDocShell den Pointer auf die View ruecksetzen
SwDocShell* pDocSh = GetDocShell();
if( pDocSh && pDocSh->GetView() == this )
pDocSh->SetView( 0 );
if ( SW_MOD()->GetView() == this )
SW_MOD()->SetView( 0 );
if( aTimer.IsActive() && bAttrChgNotifiedWithRegistrations )
GetViewFrame()->GetBindings().LEAVEREGISTRATIONS();
// the last view must end the text edit
2000-11-27 19:53:49 +00:00
SdrView *pSdrView = pWrtShell ? pWrtShell->GetDrawView() : 0;
2000-11-28 10:37:33 +00:00
if( pSdrView && pSdrView->IsTextEdit() )
pSdrView->SdrEndTextEdit( sal_True );
2000-11-27 19:53:49 +00:00
2000-09-18 16:15:01 +00:00
SetWindow( 0 );
pViewImpl->Invalidate();
2000-09-18 16:15:01 +00:00
EndListening(*GetViewFrame());
EndListening(*GetDocShell());
delete pScrollFill;
delete pWrtShell;
pWrtShell = 0; // Auf 0 setzen, damit folgende DToren nicht drauf zugreifen
pShell = 0;
delete pHScrollbar;
delete pVScrollbar;
delete pHRuler;
delete pVRuler;
2000-09-18 16:15:01 +00:00
delete pTogglePageBtn;
delete pPageUpBtn;
delete pNaviBtn;
delete pPageDownBtn;
delete pGlosHdl;
delete pViewImpl;
delete pEditWin;
delete pFormatClipboard;
2000-09-18 16:15:01 +00:00
}
SwDocShell* SwView::GetDocShell()
{
SfxObjectShell* pDocShell = GetViewFrame()->GetObjectShell();
return PTR_CAST(SwDocShell, pDocShell);
2000-09-18 16:15:01 +00:00
}
/*--------------------------------------------------------------------
Beschreibung: CursorPos merken
--------------------------------------------------------------------*/
void SwView::WriteUserData( String &rUserData, sal_Bool bBrowse )
{
//Das Browse-Flag wird vom Sfx durchgereicht, wenn Dokumente gebrowsed
//werden (nicht zu verwechseln mit dem BrowseMode).
//Die dann gespeicherten Daten sind nicht persistent!!
const SwRect& rRect = pWrtShell->GetCharRect();
const Rectangle& rVis = GetVisArea();
rUserData = String::CreateFromInt32( rRect.Left() );
rUserData += ';';
rUserData += String::CreateFromInt32( rRect.Top() );
rUserData += ';';
rUserData += String::CreateFromInt32( pWrtShell->GetViewOptions()->GetZoom() );
rUserData += ';';
rUserData += String::CreateFromInt32( rVis.Left() );
rUserData += ';';
rUserData += String::CreateFromInt32( rVis.Top() );
rUserData += ';';
2012-04-13 20:20:37 +02:00
rUserData += String::CreateFromInt32( bBrowse ? SAL_MIN_INT32 : rVis.Right());
2000-09-18 16:15:01 +00:00
rUserData += ';';
2012-04-13 20:20:37 +02:00
rUserData += String::CreateFromInt32( bBrowse ? SAL_MIN_INT32 : rVis.Bottom());
2000-09-18 16:15:01 +00:00
rUserData += ';';
rUserData += String::CreateFromInt32(
(sal_uInt16)pWrtShell->GetViewOptions()->GetZoomType());//eZoom;
rUserData += ';';
rUserData += FRMTYPE_NONE == pWrtShell->GetSelFrmType() ? '0' : '1';
}
2010-10-11 17:38:56 -05:00
2000-09-18 16:15:01 +00:00
/*--------------------------------------------------------------------
Beschreibung: CursorPos setzen
--------------------------------------------------------------------*/
static bool lcl_IsOwnDocument( SwView& rView )
{
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
rView.GetDocShell()->GetModel(), uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentProperties> xDocProps
= xDPS->getDocumentProperties();
String Created = xDocProps->getAuthor();
String Changed = xDocProps->getModifiedBy();
String FullName = SW_MOD()->GetUserOptions().GetFullName();
return (FullName.Len() &&
(Changed.Len() && Changed == FullName )) ||
(!Changed.Len() && Created.Len() && Created == FullName );
}
2000-09-18 16:15:01 +00:00
void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse )
{
if ( comphelper::string::getTokenCount(rUserData, ';') > 1 &&
2000-09-18 16:15:01 +00:00
//Fuer Dokumente ohne Layout nur im OnlineLayout oder beim
//Forward/Backward
(!pWrtShell->IsNewLayout() || pWrtShell->GetViewOptions()->getBrowseMode() || bBrowse) )
2000-09-18 16:15:01 +00:00
{
bool bIsOwnDocument = lcl_IsOwnDocument( *this );
2000-09-18 16:15:01 +00:00
SET_CURR_SHELL(pWrtShell);
sal_uInt16 nPos = 0;
// Nein, es ist *keine* gute Idee GetToken gleich im Point-Konstr.
// aufzurufen, denn welcher Parameter wird zuerst ausgewertet?
long nX = rUserData.GetToken( 0, ';', nPos ).ToInt32(),
nY = rUserData.GetToken( 0, ';', nPos ).ToInt32();
Point aCrsrPos( nX, nY );
sal_uInt16 nZoomFactor =
static_cast< sal_uInt16 >( rUserData.GetToken(0, ';', nPos ).ToInt32() );
2000-09-18 16:15:01 +00:00
long nLeft = rUserData.GetToken(0, ';', nPos ).ToInt32(),
nTop = rUserData.GetToken(0, ';', nPos ).ToInt32(),
nRight = rUserData.GetToken(0, ';', nPos ).ToInt32(),
nBottom= rUserData.GetToken(0, ';', nPos ).ToInt32();
const long nAdd = pWrtShell->GetViewOptions()->getBrowseMode() ? DOCUMENTBORDER : DOCUMENTBORDER*2;
2000-09-18 16:15:01 +00:00
if ( nBottom <= (pWrtShell->GetDocSize().Height()+nAdd) )
{
pWrtShell->EnableSmooth( sal_False );
const Rectangle aVis( nLeft, nTop, nRight, nBottom );
sal_uInt16 nOff = 0;
SvxZoomType eZoom;
if( !pWrtShell->GetViewOptions()->getBrowseMode() )
2000-09-18 16:15:01 +00:00
eZoom = (SvxZoomType) (sal_uInt16)rUserData.GetToken(nOff, ';', nPos ).ToInt32();
else
{
eZoom = SVX_ZOOM_PERCENT;
++nOff;
}
sal_Bool bSelectObj = (0 != rUserData.GetToken( nOff, ';', nPos ).ToInt32())
&& pWrtShell->IsObjSelectable( aCrsrPos );
// restore editing position
pViewImpl->SetRestorePosition(aCrsrPos, bSelectObj);
// set flag value to avoid macro execution.
bool bSavedFlagValue = pWrtShell->IsMacroExecAllowed();
pWrtShell->SetMacroExecAllowed( false );
// os: changed: The user data has to be read if the view is switched back from page preview
// go to the last editing position when opening own files
if(bOldShellWasPagePreView || bIsOwnDocument)
2000-09-18 16:15:01 +00:00
{
pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos, !bSelectObj );
if( bSelectObj )
{
pWrtShell->SelectObj( aCrsrPos );
pWrtShell->EnterSelFrmMode( &aCrsrPos );
}
2000-09-18 16:15:01 +00:00
}
// reset flag value
pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
// set visible area before applying
// information from print preview. Otherwise, the applied information
// is lost.
// os: changed: The user data has to be read if the view is switched back from page preview
// go to the last editing position when opening own files
if(bOldShellWasPagePreView || bIsOwnDocument )
{
if ( bBrowse )
SetVisArea( aVis.TopLeft() );
else
SetVisArea( aVis );
}
//apply information from print preview - if available
if( sNewCrsrPos.Len() )
{
long nXTmp = sNewCrsrPos.GetToken( 0, ';' ).ToInt32(),
nYTmp = sNewCrsrPos.GetToken( 1, ';' ).ToInt32();
Point aCrsrPos2( nXTmp, nYTmp );
bSelectObj = pWrtShell->IsObjSelectable( aCrsrPos2 );
pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos2, sal_False );
if( bSelectObj )
{
pWrtShell->SelectObj( aCrsrPos2 );
pWrtShell->EnterSelFrmMode( &aCrsrPos2 );
}
pWrtShell->MakeSelVisible();
sNewCrsrPos.Erase();
}
else if(USHRT_MAX != nNewPage)
{
pWrtShell->GotoPage(nNewPage, sal_True);
nNewPage = USHRT_MAX;
}
2000-09-18 16:15:01 +00:00
SelectShell();
pWrtShell->StartAction();
const SwViewOption* pVOpt = pWrtShell->GetViewOptions();
if( pVOpt->GetZoom() != nZoomFactor || pVOpt->GetZoomType() != eZoom )
SetZoom( eZoom, nZoomFactor);
pWrtShell->LockView( sal_True );
pWrtShell->EndAction();
pWrtShell->LockView( sal_False );
pWrtShell->EnableSmooth( sal_True );
}
}
}
void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >& rSequence, sal_Bool bBrowse )
{
if(GetDocShell()->IsPreview()||bIsPreviewDoubleClick)
return;
bool bIsOwnDocument = lcl_IsOwnDocument( *this );
sal_Int32 nLength = rSequence.getLength();
if (nLength && (!pWrtShell->IsNewLayout() || pWrtShell->GetViewOptions()->getBrowseMode() || bBrowse) )
{
SET_CURR_SHELL(pWrtShell);
const beans::PropertyValue *pValue = rSequence.getConstArray();
const SwRect& rRect = pWrtShell->GetCharRect();
const Rectangle &rVis = GetVisArea();
const SwViewOption* pVOpt = pWrtShell->GetViewOptions();
long nX = rRect.Left(), nY = rRect.Top(), nLeft = rVis.Left(), nTop = rVis.Top();
long nRight = bBrowse ? LONG_MIN : rVis.Right(), nBottom = bBrowse ? LONG_MIN : rVis.Bottom();
sal_Int16 nZoomType = static_cast< sal_Int16 >(pVOpt->GetZoomType());
sal_Int16 nZoomFactor = static_cast < sal_Int16 > (pVOpt->GetZoom());
bool bViewLayoutBookMode = pVOpt->IsViewLayoutBookMode();
sal_Int16 nViewLayoutColumns = pVOpt->GetViewLayoutColumns();
sal_Bool bSelectedFrame = ( pWrtShell->GetSelFrmType() != FRMTYPE_NONE ),
2011-01-24 14:45:12 +00:00
bGotVisibleLeft = sal_False,
bGotVisibleTop = sal_False, bGotVisibleRight = sal_False,
bGotVisibleBottom = sal_False, bGotZoomType = sal_False,
bGotZoomFactor = sal_False, bGotIsSelectedFrame = sal_False,
bGotViewLayoutColumns = sal_False, bGotViewLayoutBookMode = sal_False;
for (sal_Int16 i = 0 ; i < nLength; i++)
{
if ( pValue->Name == "ViewLeft" )
{
2001-03-23 14:43:00 +00:00
pValue->Value >>= nX;
2001-05-04 09:48:52 +00:00
nX = MM100_TO_TWIP( nX );
}
else if ( pValue->Name == "ViewTop" )
{
2001-03-23 14:43:00 +00:00
pValue->Value >>= nY;
2001-05-04 09:48:52 +00:00
nY = MM100_TO_TWIP( nY );
}
else if ( pValue->Name == "VisibleLeft" )
{
2001-03-23 14:43:00 +00:00
pValue->Value >>= nLeft;
2001-05-04 09:48:52 +00:00
nLeft = MM100_TO_TWIP( nLeft );
bGotVisibleLeft = sal_True;
}
else if ( pValue->Name == "VisibleTop" )
{
2001-03-23 14:43:00 +00:00
pValue->Value >>= nTop;
2001-05-04 09:48:52 +00:00
nTop = MM100_TO_TWIP( nTop );
bGotVisibleTop = sal_True;
}
else if ( pValue->Name == "VisibleRight" )
{
2001-03-23 14:43:00 +00:00
pValue->Value >>= nRight;
2001-05-04 09:48:52 +00:00
nRight = MM100_TO_TWIP( nRight );
bGotVisibleRight = sal_True;
}
else if ( pValue->Name == "VisibleBottom" )
{
2001-03-23 14:43:00 +00:00
pValue->Value >>= nBottom;
2001-05-04 09:48:52 +00:00
nBottom = MM100_TO_TWIP( nBottom );
bGotVisibleBottom = sal_True;
}
else if ( pValue->Name == "ZoomType" )
{
2001-03-23 14:43:00 +00:00
pValue->Value >>= nZoomType;
bGotZoomType = sal_True;
}
else if ( pValue->Name == "ZoomFactor" )
{
2001-03-23 14:43:00 +00:00
pValue->Value >>= nZoomFactor;
bGotZoomFactor = sal_True;
}
else if ( pValue->Name == "ViewLayoutColumns" )
{
pValue->Value >>= nViewLayoutColumns;
bGotViewLayoutColumns = sal_True;
}
else if ( pValue->Name == "ViewLayoutBookMode" )
{
bViewLayoutBookMode = * (sal_Bool *) pValue->Value.getValue();
bGotViewLayoutBookMode = sal_True;
}
else if ( pValue->Name == "IsSelectedFrame" )
2008-10-29 11:35:03 +00:00
{
pValue->Value >>= bSelectedFrame;
bGotIsSelectedFrame = sal_True;
}
2001-03-23 14:43:00 +00:00
pValue++;
}
if (bGotVisibleBottom)
{
Point aCrsrPos( nX, nY );
const long nAdd = pWrtShell->GetViewOptions()->getBrowseMode() ? DOCUMENTBORDER : DOCUMENTBORDER*2;
if (nBottom <= (pWrtShell->GetDocSize().Height()+nAdd) )
{
pWrtShell->EnableSmooth( sal_False );
const Rectangle aVis( nLeft, nTop, nRight, nBottom );
SvxZoomType eZoom;
if ( !pWrtShell->GetViewOptions()->getBrowseMode() )
eZoom = static_cast < SvxZoomType > ( nZoomType );
else
{
eZoom = SVX_ZOOM_PERCENT;
}
if (bGotIsSelectedFrame)
{
sal_Bool bSelectObj = (sal_False != bSelectedFrame )
&& pWrtShell->IsObjSelectable( aCrsrPos );
// set flag value to avoid macro execution.
bool bSavedFlagValue = pWrtShell->IsMacroExecAllowed();
pWrtShell->SetMacroExecAllowed( false );
// os: changed: The user data has to be read if the view is switched back from page preview
// go to the last editing position when opening own files
pViewImpl->SetRestorePosition(aCrsrPos, bSelectObj);
if(bOldShellWasPagePreView|| bIsOwnDocument)
{
pWrtShell->SwCrsrShell::SetCrsr( aCrsrPos, !bSelectObj );
if( bSelectObj )
{
pWrtShell->SelectObj( aCrsrPos );
pWrtShell->EnterSelFrmMode( &aCrsrPos );
}
}
// reset flag value
pWrtShell->SetMacroExecAllowed( bSavedFlagValue );
}
SelectShell();
// Set ViewLayoutSettings
const bool bSetViewLayoutSettings = bGotViewLayoutColumns && bGotViewLayoutBookMode &&
( pVOpt->GetViewLayoutColumns() != nViewLayoutColumns || pVOpt->IsViewLayoutBookMode() != bViewLayoutBookMode );
const bool bSetViewSettings = bGotZoomType && bGotZoomFactor &&
( pVOpt->GetZoom() != nZoomFactor || pVOpt->GetZoomType() != eZoom );
// In case we have a 'fixed' view layout of 2 or more columns,
// we have to apply the view options *before* starting the action.
// Otherwsie the SetZoom function cannot work correctly, because
// the view layout hasn't been calculated.
const bool bZoomNeedsViewLayout = bSetViewLayoutSettings &&
1 < nViewLayoutColumns &&
bSetViewSettings &&
eZoom != SVX_ZOOM_PERCENT;
if ( !bZoomNeedsViewLayout )
pWrtShell->StartAction();
if ( bSetViewLayoutSettings )
SetViewLayout( nViewLayoutColumns, bViewLayoutBookMode, sal_True );
if ( bZoomNeedsViewLayout )
pWrtShell->StartAction();
if ( bSetViewSettings )
SetZoom( eZoom, nZoomFactor, sal_True );
// os: changed: The user data has to be read if the view is switched back from page preview
// go to the last editing position when opening own files
if(bOldShellWasPagePreView||bIsOwnDocument)
{
if ( bBrowse && bGotVisibleLeft && bGotVisibleTop )
{
Point aTopLeft(aVis.TopLeft());
// make sure the document is still centered
const SwTwips lBorder = IsDocumentBorder() ? DOCUMENTBORDER : 2 * DOCUMENTBORDER;
SwTwips nEditWidth = GetEditWin().GetOutputSize().Width();
if(nEditWidth > (aDocSz.Width() + lBorder ))
aTopLeft.X() = ( aDocSz.Width() + lBorder - nEditWidth ) / 2;
else
{
//check if the values are possible
long nXMax = pHScrollbar->GetRangeMax() - pHScrollbar->GetVisibleSize();
if( aTopLeft.X() > nXMax )
aTopLeft.X() = nXMax < 0 ? 0 : nXMax;
}
SetVisArea( aTopLeft );
}
else if (bGotVisibleLeft && bGotVisibleTop && bGotVisibleRight && bGotVisibleBottom )
SetVisArea( aVis );
}
pWrtShell->LockView( sal_True );
pWrtShell->EndAction();
pWrtShell->LockView( sal_False );
pWrtShell->EnableSmooth( sal_True );
}
}
}
}
2010-10-11 17:38:56 -05:00
#define NUM_VIEW_SETTINGS 12
void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSequence, sal_Bool bBrowse )
{
const SwRect& rRect = pWrtShell->GetCharRect();
const Rectangle& rVis = GetVisArea();
Any aAny;
rSequence.realloc ( NUM_VIEW_SETTINGS );
sal_Int16 nIndex = 0;
beans::PropertyValue *pValue = rSequence.getArray();
2001-03-23 14:43:00 +00:00
sal_uInt16 nViewID( GetViewFrame()->GetCurViewId());
pValue->Name = rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM( "ViewId" ) );
OUStringBuffer sBuffer ( OUString(RTL_CONSTASCII_USTRINGPARAM( "view" ) ) );
::sax::Converter::convertNumber(sBuffer, static_cast<sal_Int32>(nViewID));
2001-03-23 14:43:00 +00:00
pValue->Value <<= sBuffer.makeStringAndClear();
pValue++;nIndex++;
pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "ViewLeft" ) );
pValue->Value <<= TWIP_TO_MM100 ( rRect.Left() );
pValue++;nIndex++;
2001-03-23 14:43:00 +00:00
pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "ViewTop" ) );
pValue->Value <<= TWIP_TO_MM100 ( rRect.Top() );
pValue++;nIndex++;
2001-03-23 14:43:00 +00:00
pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "VisibleLeft" ) );
pValue->Value <<= TWIP_TO_MM100 ( rVis.Left() );
pValue++;nIndex++;
2001-03-23 14:43:00 +00:00
pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "VisibleTop" ) );
pValue->Value <<= TWIP_TO_MM100 ( rVis.Top() );
pValue++;nIndex++;
2001-03-23 14:43:00 +00:00
pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "VisibleRight" ) );
pValue->Value <<= TWIP_TO_MM100 ( bBrowse ? LONG_MIN : rVis.Right() );
pValue++;nIndex++;
2001-03-23 14:43:00 +00:00
pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "VisibleBottom" ) );
pValue->Value <<= TWIP_TO_MM100 ( bBrowse ? LONG_MIN : rVis.Bottom() );
pValue++;nIndex++;
2001-03-23 14:43:00 +00:00
pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "ZoomType" ) );
const sal_Int16 nZoomType = static_cast< sal_Int16 >(pWrtShell->GetViewOptions()->GetZoomType());
pValue->Value <<= nZoomType;
pValue++;nIndex++;
pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "ViewLayoutColumns" ) );
const sal_Int16 nViewLayoutColumns = static_cast< sal_Int16 >(pWrtShell->GetViewOptions()->GetViewLayoutColumns());
pValue->Value <<= nViewLayoutColumns;
pValue++;nIndex++;
pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "ViewLayoutBookMode" ) );
const sal_Bool bIsViewLayoutBookMode = pWrtShell->GetViewOptions()->IsViewLayoutBookMode();
pValue->Value.setValue( &bIsViewLayoutBookMode, ::getBooleanCppuType() );
2001-03-23 14:43:00 +00:00
pValue++;nIndex++;
2001-03-23 14:43:00 +00:00
pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "ZoomFactor" ) );
pValue->Value <<= static_cast < sal_Int16 > (pWrtShell->GetViewOptions()->GetZoom());
pValue++;nIndex++;
2001-03-23 14:43:00 +00:00
pValue->Name = OUString ( RTL_CONSTASCII_USTRINGPARAM ( "IsSelectedFrame" ) );
const sal_Bool bIsSelected = FRMTYPE_NONE == pWrtShell->GetSelFrmType() ? sal_False : sal_True;
pValue->Value.setValue ( &bIsSelected, ::getBooleanCppuType() );
2001-03-23 14:43:00 +00:00
nIndex++;
if ( nIndex < NUM_VIEW_SETTINGS )
rSequence.realloc ( nIndex );
}
#undef NUM_VIEW_SETTINGS
2010-10-05 07:57:55 -05:00
void SwView::ShowCursor( bool bOn )
2000-09-18 16:15:01 +00:00
{
//don't scroll the cursor into the visible area
sal_Bool bUnlockView = !pWrtShell->IsViewLocked();
pWrtShell->LockView( sal_True ); //lock visible section
if( !bOn )
pWrtShell->HideCrsr();
else if( !pWrtShell->IsFrmSelected() && !pWrtShell->IsObjSelected() )
pWrtShell->ShowCrsr();
if( bUnlockView )
pWrtShell->LockView( sal_False );
2000-09-18 16:15:01 +00:00
}
ErrCode SwView::DoVerb( long nVerb )
{
if ( !GetViewFrame()->GetFrame().IsInPlace() )
2000-09-18 16:15:01 +00:00
{
SwWrtShell &rSh = GetWrtShell();
const int nSel = rSh.GetSelectionType();
if ( nSel & nsSelectionType::SEL_OLE )
2000-09-18 16:15:01 +00:00
rSh.LaunchOLEObj( nVerb );
}
return ERRCODE_NONE;
}
/* only return sal_True for a text selection
*/
2000-09-18 16:15:01 +00:00
sal_Bool SwView::HasSelection( sal_Bool bText ) const
{
return bText ? GetWrtShell().SwCrsrShell::HasSelection()
: GetWrtShell().HasSelection();
}
String SwView::GetSelectionText( sal_Bool bCompleteWrds )
2000-09-18 16:15:01 +00:00
{
return GetSelectionTextParam( bCompleteWrds, sal_True );
2000-09-18 16:15:01 +00:00
}
2000-10-25 13:08:22 +00:00
String SwView::GetSelectionTextParam( sal_Bool bCompleteWrds,
sal_Bool bEraseTrail )
2000-09-18 16:15:01 +00:00
{
String sReturn;
if( bCompleteWrds && !GetWrtShell().HasSelection() )
2000-09-18 16:15:01 +00:00
GetWrtShell().SelWrd();
GetWrtShell().GetSelectedText( sReturn );
if( bEraseTrail )
sReturn = comphelper::string::stripEnd(sReturn, ' ');
2000-09-18 16:15:01 +00:00
return sReturn;
}
SwGlossaryHdl* SwView::GetGlosHdl()
{
if(!pGlosHdl)
pGlosHdl = new SwGlossaryHdl(GetViewFrame(), pWrtShell);
return pGlosHdl;
}
void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
sal_Bool bCallBase = sal_True;
2000-09-18 16:15:01 +00:00
if ( rHint.ISA(SfxSimpleHint) )
{
sal_uInt32 nId = ((SfxSimpleHint&)rHint).GetId();
switch ( nId )
{
// sub shells will be destroyed by the
// dispatcher, if the view frame is dying. Thus, reset member <pShell>.
case SFX_HINT_DYING:
{
if ( &rBC == GetViewFrame() )
{
ResetSubShell();
}
}
break;
2000-09-18 16:15:01 +00:00
case SFX_HINT_MODECHANGED:
{
// Modalmodus-Umschaltung?
sal_Bool bModal = GetDocShell()->IsInModalMode();
pHRuler->SetActive( !bModal );
pVRuler->SetActive( !bModal );
2000-09-18 16:15:01 +00:00
}
/* no break here */
2000-09-18 16:15:01 +00:00
case SFX_HINT_TITLECHANGED:
if ( GetDocShell()->IsReadOnly() != GetWrtShell().GetViewOptions()->IsReadonly() )
{
SwWrtShell &rSh = GetWrtShell();
rSh.SetReadonlyOption( GetDocShell()->IsReadOnly() );
if ( rSh.GetViewOptions()->IsViewVRuler() )
2000-09-18 16:15:01 +00:00
CreateVLineal();
else
KillVLineal();
if ( rSh.GetViewOptions()->IsViewHRuler() )
2000-09-18 16:15:01 +00:00
CreateTab();
else
KillTab();
bool bReadonly = GetDocShell()->IsReadOnly();
// if document is to be opened in alive-mode then this has to be regarded while switching from readonly-mode to edit-mode
if( !bReadonly )
{
SwDrawDocument * pDrawDoc = 0;
if ( 0 != ( pDrawDoc = dynamic_cast< SwDrawDocument * > (GetDocShell()->GetDoc()->GetDrawModel() ) ) )
{
if( !pDrawDoc->GetOpenInDesignMode() )
break;// don't touch the design mode
}
}
SfxBoolItem aItem( SID_FM_DESIGN_MODE, !bReadonly);
2000-09-18 16:15:01 +00:00
GetDispatcher().Execute( SID_FM_DESIGN_MODE, SFX_CALLMODE_ASYNCHRON,
&aItem, 0L );
}
break;
case SW_BROADCAST_DRAWVIEWS_CREATED:
{
bCallBase = sal_False;
if ( GetFormShell() )
{
GetFormShell()->SetView(
PTR_CAST(FmFormView, GetWrtShell().GetDrawView()) );
SfxBoolItem aItem( SID_FM_DESIGN_MODE, !GetDocShell()->IsReadOnly());
GetDispatcher().Execute( SID_FM_DESIGN_MODE, SFX_CALLMODE_SYNCHRON,
2000-09-18 16:15:01 +00:00
&aItem, 0L );
}
}
break;
}
}
else if(rHint.ISA(FmDesignModeChangedHint))
{
sal_Bool bDesignMode = ((FmDesignModeChangedHint&)rHint).GetDesignMode();
if (!bDesignMode && GetDrawFuncPtr())
{
GetDrawFuncPtr()->Deactivate();
SetDrawFuncPtr(NULL);
LeaveDrawCreate();
AttrChangedNotify(pWrtShell);
}
}
if ( bCallBase )
SfxViewShell::Notify(rBC, rHint);
}
#if defined WNT || defined UNX
2000-09-18 16:15:01 +00:00
void SwView::ScannerEventHdl( const EventObject& /*rEventObject*/ )
2000-09-18 16:15:01 +00:00
{
2011-10-20 21:25:46 +02:00
uno::Reference< XScannerManager2 > xScanMgr = SW_MOD()->GetScannerManager();
2000-09-18 16:15:01 +00:00
if( xScanMgr.is() )
{
const ScannerContext aContext( xScanMgr->getAvailableScanners().getConstArray()[ 0 ] );
const ScanError eError = xScanMgr->getError( aContext );
if( ScanError_ScanErrorNone == eError )
{
const uno::Reference< awt::XBitmap > xBitmap( xScanMgr->getBitmap( aContext ) );
if( xBitmap.is() )
{
const BitmapEx aScanBmp( VCLUnoHelper::GetBitmap( xBitmap ) );
if( !!aScanBmp )
{
Graphic aGrf(aScanBmp);
pWrtShell->Insert( aEmptyStr, aEmptyStr, aGrf );
}
}
}
}
SfxBindings& rBind = GetViewFrame()->GetBindings();
rBind.Invalidate( SID_TWAIN_SELECT );
rBind.Invalidate( SID_TWAIN_TRANSFER );
}
#endif
void SwView::StopShellTimer()
{
if(aTimer.IsActive())
{
aTimer.Stop();
if ( bAttrChgNotifiedWithRegistrations )
{
GetViewFrame()->GetBindings().LEAVEREGISTRATIONS();
bAttrChgNotifiedWithRegistrations = sal_False;
}
SelectShell();
bAttrChgNotified = sal_False;
}
}
sal_uInt16 SwView::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
{
SfxViewFrame* pVFrame = GetViewFrame();
pVFrame->SetChildWindow( SwInputChild::GetChildWindowId(), sal_False );
if( pVFrame->GetDispatcher()->IsLocked() )
pVFrame->GetDispatcher()->Lock(sal_False);
2000-09-18 16:15:01 +00:00
sal_uInt16 nRet;
if ( pFormShell &&
sal_True != (nRet = pFormShell->PrepareClose( bUI, bForBrowsing )) )
{
return nRet;
}
return SfxViewShell::PrepareClose( bUI, bForBrowsing );
}
2010-10-11 17:38:56 -05:00
// status methods for clipboard.
// Status changes now notified from the clipboard.
sal_Bool SwView::IsPasteAllowed()
{
sal_uInt16 nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell );
if( nLastPasteDestination != nPasteDestination )
{
TransferableDataHelper aDataHelper(
TransferableDataHelper::CreateFromSystemClipboard(
&GetEditWin()) );
if( aDataHelper.GetXTransferable().is() )
{
bPasteState = SwTransferable::IsPaste( *pWrtShell, aDataHelper );
bPasteSpecialState = SwTransferable::IsPasteSpecial(
*pWrtShell, aDataHelper );
}
else
bPasteState = bPasteSpecialState = sal_False;
if( 0xFFFF == nLastPasteDestination ) // the init value
pViewImpl->AddClipboardListener();
nLastPasteDestination = nPasteDestination;
}
return bPasteState;
}
sal_Bool SwView::IsPasteSpecialAllowed()
{
if ( pFormShell && pFormShell->IsActiveControl() )
return sal_False;
sal_uInt16 nPasteDestination = SwTransferable::GetSotDestination( *pWrtShell );
if( nLastPasteDestination != nPasteDestination )
{
TransferableDataHelper aDataHelper(
TransferableDataHelper::CreateFromSystemClipboard(
&GetEditWin()) );
if( aDataHelper.GetXTransferable().is() )
{
bPasteState = SwTransferable::IsPaste( *pWrtShell, aDataHelper );
bPasteSpecialState = SwTransferable::IsPasteSpecial(
*pWrtShell, aDataHelper );
}
else
bPasteState = bPasteSpecialState = sal_False;
if( 0xFFFF == nLastPasteDestination ) // the init value
pViewImpl->AddClipboardListener();
}
return bPasteSpecialState;
}
void SwView::NotifyDBChanged()
{
GetViewImpl()->GetUNOObject_Impl()->NotifyDBChanged();
}
/*--------------------------------------------------------------------
Printing
--------------------------------------------------------------------*/
SfxObjectShellLock SwView::CreateTmpSelectionDoc()
{
SwXTextView *const pImpl = GetViewImpl()->GetUNOObject_Impl();
return pImpl->BuildTmpSelectionDoc();
}
void SwView::AddTransferable(SwTransferable& rTransferable)
{
GetViewImpl()->AddTransferable(rTransferable);
}
namespace sw {
void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb)
{
o_rData = *SW_MOD()->GetPrtOptions(bWeb);
}
} // namespace sw
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */