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