summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-01-20 11:32:41 +0000
committerOliver Bolte <obo@openoffice.org>2004-01-20 11:32:41 +0000
commit0563db72e0da19c1d164275c8a2f19ace2d0eb89 (patch)
treedd687669e98f19bd995dea533f78392d23a98dba /sd/source
parent5de7a3972715e5a80179ab6cde2f1f79e28fe11e (diff)
INTEGRATION: CWS impress1 (1.3.228); FILE MERGED
2003/09/24 16:28:05 af 1.3.228.2: #111996# Modified architecture of controllers. 2003/09/17 09:42:27 af 1.3.228.1: #111996# Transition to stacked sub-shells. Introduction of namespace sd.
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/unoidl/SdUnoPresView.cxx150
1 files changed, 74 insertions, 76 deletions
diff --git a/sd/source/ui/unoidl/SdUnoPresView.cxx b/sd/source/ui/unoidl/SdUnoPresView.cxx
index 22c787f18772..fd93b9453579 100644
--- a/sd/source/ui/unoidl/SdUnoPresView.cxx
+++ b/sd/source/ui/unoidl/SdUnoPresView.cxx
@@ -1,14 +1,72 @@
+/*************************************************************************
+ *
+ * $RCSfile: SdUnoPresView.cxx,v $
+ *
+ * $Revision: 1.4 $
+ *
+ * last change: $Author: obo $ $Date: 2004-01-20 12:32:41 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 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
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
#include "SdUnoPresView.hxx"
#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
#include <com/sun/star/beans/PropertyAttribute.hpp>
#endif
-
#ifndef _VOS_MUTEX_HXX_
#include <vos/mutex.hxx>
#endif
-
#ifndef _SV_SVAPP_HXX
#include <vcl/svapp.hxx>
#endif
@@ -19,103 +77,44 @@ using namespace ::cppu;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-#include "unohelp.hxx"
-#include "presvish.hxx"
-#include "prvwshll.hxx"
+namespace sd {
-//----------------------------------------------------------------------
-//------ SdUnoPresView--------------------------------------------------
-//----------------------------------------------------------------------
-SdUnoPresView::SdUnoPresView(SdView* pSdView, SdDrawViewShell* pSdViewSh) throw()
-: SdUnoDrawView( pSdView, pSdViewSh )
+SdUnoPresView::SdUnoPresView (
+ View& rView,
+ DrawViewShell& rViewShell) throw()
+ : SdUnoDrawView (rView, rViewShell)
{
}
+
+
+
SdUnoPresView::~SdUnoPresView() throw()
{
}
-//----------------------------------------------------------------------
-//------ XInterface ----------------------------------------------------
-//----------------------------------------------------------------------
-Any SAL_CALL SdUnoPresView::queryInterface( const Type & rType )
- throw(RuntimeException)
-{
- Any aAny;
-
- QUERYINT( drawing::XDrawView );
- else QUERYINT( lang::XServiceInfo );
- else QUERYINT( beans::XPropertySet );
- else if( rType == ITYPE(lang::XComponent) )
- aAny <<= uno::Reference< lang::XComponent >(static_cast<SfxBaseController*>(this));
- else QUERYINT( awt::XWindow );
- else
- return SfxBaseController::queryInterface(rType);
-
- return aAny;
-}
-//----------------------------------------------------------------------
-//------ XTypeProvider -------------------------------------------------
-//----------------------------------------------------------------------
-Sequence< Type > SAL_CALL SdUnoPresView::getTypes()
- throw(RuntimeException)
-{
- static Sequence< Type > aTypeSequence;
- if( 0 == aTypeSequence.getLength() )
- {
- ::osl::MutexGuard guard( ::osl::Mutex::getGlobalMutex() );
- if( 0 == aTypeSequence.getLength() )
- {
- const Sequence< Type > aBaseTypes( SfxBaseController::getTypes() );
- const sal_Int32 nBaseTypes = aBaseTypes.getLength();
- const Type* pBaseTypes = aBaseTypes.getConstArray();
+// XTypeProvider
- const sal_Int32 nOwnTypes = 5; // !DANGER! Keep this updated!
+IMPLEMENT_GET_IMPLEMENTATION_ID(SdUnoPresView);
- aTypeSequence.realloc( nBaseTypes + nOwnTypes );
- Type* pTypes = aTypeSequence.getArray();
- *pTypes++ = ITYPE(drawing::XDrawView);
- *pTypes++ = ITYPE(lang::XServiceInfo);
- *pTypes++ = ITYPE(beans::XPropertySet);
- *pTypes++ = ITYPE(lang::XComponent);
- *pTypes++ = ITYPE(awt::XWindow);
- for( sal_Int32 nType = 0; nType < nBaseTypes; nType++ )
- *pTypes++ = *pBaseTypes++;
- }
- }
- return aTypeSequence;
-}
+// XServiceInfo
-//----------------------------------------------------------------------
-Sequence< sal_Int8 > SAL_CALL SdUnoPresView::getImplementationId()
+OUString SAL_CALL SdUnoPresView::getImplementationName (void)
throw(RuntimeException)
{
- static Sequence< sal_Int8 > aId;
- if( aId.getLength() == 0 )
- {
- aId.realloc( 16 );
- rtl_createUuid( (sal_uInt8 *)aId.getArray(), 0, sal_True );
- }
- return aId;
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "SdUnoPresView" ) );
}
-//----------------------------------------------------------------------
-//------ XServiceInfo --------------------------------------------------
-//----------------------------------------------------------------------
-OUString SAL_CALL SdUnoPresView::getImplementationName( ) throw(RuntimeException)
-{
- return OUString( RTL_CONSTASCII_USTRINGPARAM( "SdUnoPresView" ) );
-}
//----------------------------------------------------------------------
//------ The Properties of this implementation -------------------------
@@ -125,7 +124,6 @@ OUString SAL_CALL SdUnoPresView::getImplementationName( ) throw(RuntimeExceptio
enum properties
{
PROPERTY_CURRENTPAGE = 0,
- PROPERTY_WORKAREA,
PROPERTY_COUNT
};
@@ -146,7 +144,6 @@ static beans::Property * getBasicProps()
static beans::Property aBasicProps[PROPERTY_COUNT] =
{
beans::Property( OUString( RTL_CONSTASCII_USTRINGPARAM("CurrentPage") ), PROPERTY_CURRENTPAGE, ::getCppuType((const Reference< drawing::XDrawPage > *)0), beans::PropertyAttribute::BOUND ),
- beans::Property( OUString( RTL_CONSTASCII_USTRINGPARAM("VisibleArea") ), PROPERTY_WORKAREA, ::getCppuType((const ::com::sun::star::awt::Rectangle*)0), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY )
};
pTable = aBasicProps;
}
@@ -179,3 +176,4 @@ Reference < beans::XPropertySetInfo > SdUnoPresView::getPropertySetInfo() throw
return xInfo;
}
+} // end of namespace sd