/*************************************************************************
 *
 *  OpenOffice.org - a multi-platform office productivity suite
 *
 *  $RCSfile: sd_viewshe3.cxx,v $
 *
 *  $Revision: 1.6 $
 *
 *  last change: $Author: rt $ $Date: 2006/10/27 18:48:12 $
 *
 *  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 <utility>
#include <vector>

#include "app.hrc"
#include "strings.hrc"
#include "res_bmp.hrc"


#ifndef _SFXDISPATCH_HXX
#include <bf_sfx2/dispatch.hxx>
#endif



#
















#include "slidechg.hxx"

#include "prevchld.hxx"

#include "sdwindow.hxx"
#include "outlnvsh.hxx"
#include "frmview.hxx"


// #96090#
#ifndef _SVXIDS_HXX
#include <bf_svx/svxids.hrc>
#endif

namespace binfilter {

using namespace ::com::sun::star;
using namespace ::rtl;

/*************************************************************************
|*
|* EffekteWindow updaten
|*
\************************************************************************/

/*N*/ void SdViewShell::UpdateSlideChangeWindow()
/*N*/ {
/*N*/ 	USHORT nId = SdSlideChangeChildWindow::GetChildWindowId();
/*N*/ 	SfxChildWindow* pWindow = GetViewFrame()->GetChildWindow( nId );
/*N*/ 	if( pWindow )
/*N*/ 	{
		DBG_BF_ASSERT(0, "STRIP"); //STRIP001 /*?*/ 		SdSlideChangeWin* pSlideChangeWin = (SdSlideChangeWin*) pWindow->GetWindow();
/*?*/ 	}
/*N*/ }

/*************************************************************************
|*
|* Vom EffekteWindow zuweisen
|*
\************************************************************************/


			/***************************************************************
			|* ggfs. in Preview anzeigen
			\**************************************************************/

/*************************************************************************
|*
|* aktuellen Drucker des Dokuments zurueckgeben
|*
\************************************************************************/
/*N*/ SfxPrinter* SdViewShell::GetPrinter(BOOL bCreate)
/*N*/ {
/*N*/ 	return ( pDocSh->GetPrinter(bCreate) );
/*N*/ }

/*************************************************************************
|*
|* neuen Drucker fuer die Applikation setzen
|*
\************************************************************************/


/*************************************************************************
|*
|* Druckdialog erzeugen; virtuell, wird vom SFX aufgerufen
|*
\************************************************************************/

/*************************************************************************
|*
|* Factory Methode Tabpage Zusaetze (vom Druckdialog)
|*
\************************************************************************/


/*************************************************************************
|*
|* Vorbereitung fuers Drucken; virtuell, wird vom SFX aufgerufen
|*
\************************************************************************/


/*************************************************************************
|*
|* Drucken; virtuell, wird vom SFX aufgerufen
|*
\************************************************************************/



/*************************************************************************
|*
|* Drucken der Outlinerdaten
|*
\************************************************************************/
	/*
	if( pPrintOpts && !pPrintOpts->IsPaperbin() ) // Drucken NICHT aus Druckereinstellung
	{
		USHORT nPaperBin = pDoc->GetSdPage(nPage, PK_STANDARD)->GetPaperBin();
		rPrinter.SetPaperBin( nPaperBin );
	} */

/*************************************************************************
|*
|* Drucken der Handouts
|*
\************************************************************************/

/*************************************************************************
|*
|* Drucken der normalen Seiten oder der Notizseiten
|*
\************************************************************************/

/*************************************************************************
|*
|* Seite drucken
|*
\************************************************************************/

/*************************************************************************
|*
|* Status (Enabled/Disabled) von Menue-SfxSlots setzen
|*
\************************************************************************/

/*N*/ void  SdViewShell::GetMenuState( SfxItemSet &rSet )
/*N*/ {
/*N*/ 	if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_STYLE_FAMILY ) )
/*N*/ 	{
/*?*/ 		DBG_BF_ASSERT(0, "STRIP"); //STRIP001 UINT16 nFamily = (SfxStyleFamily)pDocSh->GetStyleFamily();
/*N*/ 	}

	// #96090#
/*N*/     if(SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_GETUNDOSTRINGS))
/*N*/ 	{
/*?*/ 		DBG_BF_ASSERT(0, "STRIP"); //STRIP001 ImpGetUndoStrings(rSet);
/*?*/ 	}
/*N*/ 
/*N*/ 	// #96090#
/*N*/     if(SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_GETREDOSTRINGS))
/*N*/ 	{
/*?*/ 		DBG_BF_ASSERT(0, "STRIP"); //STRIP001 ImpGetRedoStrings(rSet);
/*?*/ 	}
/*N*/ 
/*N*/ 	// #96090#
/*N*/     if(SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_UNDO))
/*N*/ 	{
/*?*/ 		DBG_BF_ASSERT(0, "STRIP"); //STRIP001 SfxUndoManager* pUndoManager = ImpGetUndoManager();
/*?*/ 	}

	// #96090#
/*N*/     if(SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_REDO))
/*N*/ 	{
/*?*/ 		DBG_BF_ASSERT(0, "STRIP"); //STRIP001 SfxUndoManager* pUndoManager = ImpGetUndoManager();
/*?*/ 	}
/*N*/ }


/*N*/ void SdViewShell::SetPreview( bool bVisible )
/*N*/ {
/*N*/ 	DBG_ASSERT( GetViewFrame(), "FATAL: no viewframe?" );
/*N*/ 	DBG_ASSERT( pWindow, "FATAL: no window?" );
/*N*/ 
/*N*/ 	if( GetViewFrame() && pWindow )
/*N*/ 	{
/*N*/         if ( ! bVisible)
/*?*/         {DBG_BF_ASSERT(0, "STRIP");} //STRIP001     mpWindowUpdater->UnregisterPreview ();
/*N*/ 		GetViewFrame()->SetChildWindow(SdPreviewChildWindow::GetChildWindowId(), bVisible,false);
/*N*/         if (bVisible)
/*?*/         {DBG_BF_ASSERT(0, "STRIP");} //STRIP001     mpWindowUpdater->RegisterPreview ();
/*N*/ 
/*N*/ 		const StyleSettings& rStyleSettings = pWindow->GetSettings().GetStyleSettings();
/*N*/ 
/*N*/ 		sal_uInt16 nPreviewSlot;
/*N*/         
/*N*/ 		SvtAccessibilityOptions aAccOptions;
/*N*/ 
/*N*/ 		if( GetViewFrame()->GetDispatcher() )
/*N*/ 		{
/*N*/ 			if( rStyleSettings.GetHighContrastMode() && aAccOptions.GetIsForPagePreviews() )
/*N*/ 			{
/*N*/ 				nPreviewSlot = SID_PREVIEW_QUALITY_CONTRAST;
/*N*/ 			}
/*N*/ 			else
/*N*/ 			{
/*N*/ 				nPreviewSlot = SID_PREVIEW_QUALITY_COLOR;
/*N*/ 			}
/*N*/ 
/*N*/ 			GetViewFrame()->GetDispatcher()->Execute( nPreviewSlot, SFX_CALLMODE_ASYNCHRON );
/*N*/ 		}
/*N*/ 
/*N*/ 		SfxBindings& rBindings = GetViewFrame()->GetBindings();
/*N*/ 		rBindings.Invalidate(SID_PREVIEW_WIN);
/*N*/ 		rBindings.Invalidate(SID_PREVIEW_QUALITY_COLOR);
/*N*/ 		rBindings.Invalidate(SID_PREVIEW_QUALITY_GRAYSCALE);
/*N*/ 		rBindings.Invalidate(SID_PREVIEW_QUALITY_BLACKWHITE);
/*N*/ 		rBindings.Invalidate(SID_PREVIEW_QUALITY_CONTRAST);
/*N*/ 
/*N*/ 	}
/*N*/ }

}
