/*************************************************************************
 *
 *  OpenOffice.org - a multi-platform office productivity suite
 *
 *  $RCSfile: sfx2_clientsh.cxx,v $
 *
 *  $Revision: 1.6 $
 *
 *  last change: $Author: rt $ $Date: 2006/10/27 19:26:18 $
 *
 *  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

#define _SFX_CLIENTSH_CXX

#include "docfile.hxx"
#include "viewsh.hxx"
#include "contenv.hxx"
#include "interno.hxx"
#if SUPD<613//MUSTINI
#endif

//! wg. HACK
namespace binfilter {

#define SFX_CLIENTACTIVATE_TIMEOUT 100

//--------------------------------------------------------------------

/*N*/ struct SfxInPlaceClient_Impl
/*N*/ {
/*N*/ 	Timer	aTimer;
/*N*/ 	//SvInPlaceMenuBar*	pMenuBar;
/*N*/ };

//--------------------------------------------------------------------

/*N*/ SfxInPlaceClient::SfxInPlaceClient( SfxViewShell * pViewShell, Window * pDraw ) :
/*N*/ 	pImp( new SfxInPlaceClient_Impl ),
/*N*/ 	pViewSh( pViewShell )
/*N*/ {
/*N*/ 	WorkWindow* pTop;
/*!!! (pb) needs new implementation
	if ( Application::IsPresentationMode() )
	{
		// Wg. Mega-Hack im Impress mu\s die Presentation leider wieder mal
		// spezialbehandelt werden; das ViewFrameWindow oder TaskWindow liegen
		// leider au\serhalb des PresentaionWindow !
		pTop = (WorkWindow*) SFX_APP()->GetTopWindow();
	}
	else
*/
/*N*/ 	{
/*N*/         pTop = (WorkWindow*) &pViewSh->GetViewFrame()->GetFrame()->GetWindow();
/*N*/ 	}

	// Bis zur 314 erstmal gleich erzeugen
/*N*/ 	SetViewData( new SfxContainerEnv_Impl( this, pViewShell->GetViewFrame(), pTop, pDraw ) );
/*N*/ 
/*N*/ 	pImp->aTimer.SetTimeout( SFX_CLIENTACTIVATE_TIMEOUT );
/*N*/ 	pImp->aTimer.SetTimeoutHdl( LINK( this, SfxInPlaceClient, TimerHdl_Impl ) );
/*N*/ }

//--------------------------------------------------------------------

/*N*/ SfxInPlaceClient::SfxInPlaceClient( SfxViewShell * pViewShell,
/*N*/ 									SvInPlaceClient * pPar )
/*N*/ :	SvInPlaceClient( /*
		new SfxContainerEnv_Impl( pViewShell->GetViewFrame(), pPar )*/ ),
/*N*/ 	pImp( NULL ),
/*N*/  	pViewSh( pViewShell )
/*N*/ {
/*N*/ }

//--------------------------------------------------------------------

/*N*/ SfxInPlaceClient::~SfxInPlaceClient()
/*N*/ {
/*N*/ 	SvClientData *pData = GetClientData();
/*N*/ 	SetViewData( NULL );
/*N*/ 	delete pData;
/*N*/ 	pImp->aTimer.Stop();
/*N*/ 	delete pImp;
/*N*/ }

//--------------------------------------------------------------------

/*?*/ void SfxInPlaceClient::Opened( BOOL bOpen )
/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001 
/*?*/ }

//--------------------------------------------------------------------

/*?*/ void SfxInPlaceClient::Connected( BOOL bConnect )
/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001 
/*?*/ }

//--------------------------------------------------------------------

/*?*/ void SfxInPlaceClient::UIActivate( BOOL bActivate )
/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001 
/*?*/ }

//--------------------------------------------------------------------

/*?*/ void SfxInPlaceClient::RequestObjAreaPixel( const Rectangle & rObjRect )
/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001 
/*?*/ }

//--------------------------------------------------------------------

/*?*/ void SfxInPlaceClient::Embedded( BOOL bEmbedding )
/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001 
/*?*/ }


/*?*/ IMPL_LINK( SfxInPlaceClient, TimerHdl_Impl, Timer*, pTimer )

/*	[Beschreibung]

	Ein Client wurde connected, weil das Objekt ACTIVATE_WHENVISIBLE hat.
	Dann soll es nach kurzer Zeit automatisch aktiviert werden.

*/

/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001 
/*?*/ 	return 0;
/*?*/ }

/*?*/ void SfxInPlaceClient::InPlaceActivate( BOOL bActivate )
/*?*/ {DBG_BF_ASSERT(0, "STRIP"); //STRIP001 
/*?*/ }

// F"urs Update erstmal schnell rein damit ...

/*?*/ void SfxInPlaceClient::MakeViewData()
/*?*/ {
/*?*/ }

/*?*/ void SfxInPlaceClient::FreeViewData()
/*?*/ {
/*?*/ }

/*?*/ void SfxInPlaceClient::MakeVisible()
/*?*/ {
/*?*/ }

//========================================================================
/*?*/ ErrCode	SfxInPlaceClient::GetContURL
/*?*/ (
/*?*/ 	INetURLObject & rURL
/*?*/ )
/*	[Beschreibung]

	[Querverweise]

	<SvEmbeddedClient::GetContURL>
*/
/*?*/ {DBG_BF_ASSERT(0, "STRIP"); return 0;//STRIP001 
/*?*/ }


}
