2000-09-18 11:07:07 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-11 02:29:16 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2010-02-12 08:01:35 -06:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-11 02:29:16 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-11 02:29:16 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-11 02:29:16 -05: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 11:07:07 -05:00
|
|
|
*
|
2008-04-11 02:29:16 -05: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 11:07:07 -05:00
|
|
|
*
|
2008-04-11 02:29:16 -05: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 11:07:07 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _SD_DOCPREV_HXX_
|
|
|
|
#define _SD_DOCPREV_HXX_
|
|
|
|
|
|
|
|
#include <com/sun/star/presentation/FadeEffect.hpp>
|
|
|
|
#include <vcl/window.hxx>
|
|
|
|
#include <tools/gen.hxx>
|
|
|
|
|
2008-04-03 08:00:46 -05:00
|
|
|
#include <rtl/ref.hxx>
|
|
|
|
|
2009-10-15 17:05:16 -05:00
|
|
|
#include <svl/lstner.hxx>
|
2003-03-27 03:58:12 -06:00
|
|
|
#include <svtools/colorcfg.hxx>
|
2004-08-23 02:21:47 -05:00
|
|
|
#include "fadedef.h"
|
|
|
|
#include "sddllapi.h"
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2004-11-26 13:16:11 -06:00
|
|
|
namespace sd {
|
2008-04-03 08:00:46 -05:00
|
|
|
class SlideShow;
|
2004-11-26 13:16:11 -06:00
|
|
|
}
|
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
class GDIMetaFile;
|
|
|
|
|
2004-08-23 02:21:47 -05:00
|
|
|
class SD_DLLPUBLIC SdDocPreviewWin : public Control, public SfxListener
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
protected:
|
|
|
|
GDIMetaFile* pMetaFile;
|
|
|
|
BOOL bInEffect;
|
|
|
|
Link aClickHdl;
|
2002-11-13 11:19:29 -06:00
|
|
|
SfxObjectShell* mpObj;
|
|
|
|
sal_uInt16 mnShowPage;
|
|
|
|
Color maDocumentColor;
|
2008-04-03 08:00:46 -05:00
|
|
|
rtl::Reference< sd::SlideShow > mxSlideShow;
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
virtual void Paint( const Rectangle& rRect );
|
|
|
|
static void CalcSizeAndPos( GDIMetaFile* pFile, Size& rSize, Point& rPoint );
|
2002-11-13 11:19:29 -06:00
|
|
|
void ImpPaint( GDIMetaFile* pFile, OutputDevice* pVDev );
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
static const int FRAME;
|
|
|
|
|
2003-03-27 03:58:12 -06:00
|
|
|
svtools::ColorConfig maColorConfig;
|
2002-11-13 11:19:29 -06:00
|
|
|
|
2008-09-30 01:36:06 -05:00
|
|
|
virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
|
2002-11-13 11:19:29 -06:00
|
|
|
|
|
|
|
void updateViewSettings();
|
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
public:
|
|
|
|
SdDocPreviewWin( Window* pParent, const ResId& rResId );
|
2005-03-30 03:30:17 -06:00
|
|
|
~SdDocPreviewWin();
|
2002-11-13 11:19:29 -06:00
|
|
|
void SetObjectShell( SfxObjectShell* pObj, sal_uInt16 nShowPage = 0 );
|
2000-09-18 11:07:07 -05:00
|
|
|
virtual void Resize();
|
2004-11-26 13:16:11 -06:00
|
|
|
void startPreview();
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
virtual long Notify( NotifyEvent& rNEvt );
|
|
|
|
|
|
|
|
void SetClickHdl( const Link& rLink ) { aClickHdl = rLink; }
|
|
|
|
const Link& GetClickHdl() const { return aClickHdl; }
|
|
|
|
|
2002-11-13 11:19:29 -06:00
|
|
|
virtual void DataChanged( const DataChangedEvent& rDCEvt );
|
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|