/************************************************************************* * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: fulink.cxx,v $ * * $Revision: 1.7 $ * * last change: $Author: rt $ $Date: 2005-12-14 17:00:04 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. * * * GNU Lesser General Public License Version 2.1 * ============================================= * Copyright 2005 by Sun Microsystems, Inc. * 901 San Antonio Road, Palo Alto, CA 94303, USA * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1, as published by the Free Software Foundation. * * This library 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 for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * ************************************************************************/ #pragma hdrstop #include "fulink.hxx" #include #ifndef _SFX_BINDINGS_HXX //autogen #include #endif #ifndef _SFXVIEWFRM_HXX #include #endif #include #ifndef SD_WINDOW_SHELL_HXX #include "Window.hxx" #endif #include "drawdoc.hxx" #ifndef SD_VIEW_SHELL_HXX #include "ViewShell.hxx" #endif #include "app.hrc" class SfxRequest; namespace sd { TYPEINIT1( FuLink, FuPoor ); /************************************************************************* |* |* Konstruktor |* \************************************************************************/ FuLink::FuLink ( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ) : FuPoor(pViewSh, pWin, pView, pDoc, rReq) { } FunctionReference FuLink::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ) { FunctionReference xFunc( new FuLink( pViewSh, pWin, pView, pDoc, rReq ) ); xFunc->DoExecute(rReq); return xFunc; } void FuLink::DoExecute( SfxRequest& rReq ) { SvxLinkManager* pLinkManager = pDoc->GetLinkManager(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( pViewShell->GetActiveWindow(), pLinkManager ); if ( pDlg ) { pDlg->Execute(); pViewShell->GetViewFrame()->GetBindings().Invalidate( SID_MANAGE_LINKS ); delete pDlg; } } } // end of namespace sd