2010-10-27 12:53:26 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2006-03-21 16:25:19 +00:00
|
|
|
|
2013-10-23 22:38:46 +02:00
|
|
|
#ifndef INCLUDED_SD_SOURCE_UI_INC_SDUNODRAWVIEW_HXX
|
|
|
|
#define INCLUDED_SD_SOURCE_UI_INC_SDUNODRAWVIEW_HXX
|
2002-01-24 13:33:46 +00:00
|
|
|
|
2006-03-21 16:25:19 +00:00
|
|
|
#include "DrawSubController.hxx"
|
2008-04-03 12:55:46 +00:00
|
|
|
#include <cppuhelper/basemutex.hxx>
|
2002-01-24 13:33:46 +00:00
|
|
|
|
|
|
|
class SdXImpressDocument;
|
|
|
|
|
2006-03-21 16:25:19 +00:00
|
|
|
namespace com { namespace sun { namespace star { namespace drawing {
|
|
|
|
class XLayer;
|
|
|
|
} } } }
|
|
|
|
|
2004-01-20 10:42:07 +00:00
|
|
|
namespace sd {
|
|
|
|
|
|
|
|
class DrawViewShell;
|
2018-08-10 07:48:42 +02:00
|
|
|
class View;
|
2004-01-20 10:42:07 +00:00
|
|
|
|
2006-03-21 16:25:19 +00:00
|
|
|
/** This class implements the DrawViewShell specific part of the controller.
|
|
|
|
*/
|
2017-10-25 15:53:56 +02:00
|
|
|
class SdUnoDrawView final
|
2008-04-03 12:55:46 +00:00
|
|
|
: private cppu::BaseMutex,
|
|
|
|
public DrawSubControllerInterfaceBase
|
2002-01-24 13:33:46 +00:00
|
|
|
{
|
|
|
|
public:
|
2004-06-03 10:53:55 +00:00
|
|
|
SdUnoDrawView (
|
2006-03-21 16:25:19 +00:00
|
|
|
DrawViewShell& rViewShell,
|
2004-06-03 10:53:55 +00:00
|
|
|
View& rView) throw();
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SdUnoDrawView() throw() override;
|
2002-01-24 13:33:46 +00:00
|
|
|
|
|
|
|
// XSelectionSupplier
|
2008-04-03 12:55:46 +00:00
|
|
|
|
|
|
|
virtual sal_Bool SAL_CALL select (
|
2017-01-26 12:28:58 +01:00
|
|
|
const css::uno::Any& aSelection) override;
|
2008-04-03 12:55:46 +00:00
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Any SAL_CALL getSelection() override;
|
2008-04-03 12:55:46 +00:00
|
|
|
|
|
|
|
virtual void SAL_CALL addSelectionChangeListener (
|
2017-01-26 12:28:58 +01:00
|
|
|
const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener) override;
|
2008-04-03 12:55:46 +00:00
|
|
|
|
|
|
|
virtual void SAL_CALL removeSelectionChangeListener (
|
2017-01-26 12:28:58 +01:00
|
|
|
const css::uno::Reference<css::view::XSelectionChangeListener>& rxListener) override;
|
2008-04-03 12:55:46 +00:00
|
|
|
|
2002-01-24 13:33:46 +00:00
|
|
|
// XDrawView
|
2008-04-03 12:55:46 +00:00
|
|
|
|
|
|
|
virtual void SAL_CALL setCurrentPage (
|
2017-01-26 12:28:58 +01:00
|
|
|
const css::uno::Reference<css::drawing::XDrawPage >& xPage) override;
|
2008-04-03 12:55:46 +00:00
|
|
|
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual css::uno::Reference<css::drawing::XDrawPage> SAL_CALL getCurrentPage() override;
|
2008-04-03 12:55:46 +00:00
|
|
|
|
|
|
|
// XFastPropertySet
|
|
|
|
|
|
|
|
virtual void SAL_CALL setFastPropertyValue (
|
2002-01-24 13:33:46 +00:00
|
|
|
sal_Int32 nHandle,
|
2017-01-26 12:28:58 +01:00
|
|
|
const css::uno::Any& rValue) override;
|
2008-04-03 12:55:46 +00:00
|
|
|
|
|
|
|
virtual css::uno::Any SAL_CALL getFastPropertyValue (
|
2017-01-26 12:28:58 +01:00
|
|
|
sal_Int32 nHandle) override;
|
2002-01-24 13:33:46 +00:00
|
|
|
|
2010-04-01 11:00:20 +02:00
|
|
|
// XServiceInfo
|
2017-01-26 12:28:58 +01:00
|
|
|
virtual OUString SAL_CALL getImplementationName( ) override;
|
|
|
|
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
|
|
|
|
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
|
2010-04-01 11:00:20 +02:00
|
|
|
|
2002-08-02 10:59:45 +00:00
|
|
|
/** Return a reference to the active layer object.
|
|
|
|
@return
|
|
|
|
The returned value may be empty when the internal state of this
|
|
|
|
view is not valid (like during destruction.)
|
|
|
|
*/
|
2017-12-22 10:50:40 +00:00
|
|
|
css::uno::Reference< css::drawing::XLayer> getActiveLayer();
|
2017-10-25 15:53:56 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
bool getMasterPageMode() const throw();
|
|
|
|
void setMasterPageMode(bool MasterPageMode_) throw();
|
|
|
|
bool getLayerMode() const throw();
|
|
|
|
void setLayerMode(bool LayerMode_) throw();
|
2002-08-02 10:59:45 +00:00
|
|
|
/** Make the specified object the active layer.
|
|
|
|
@param rxLayer
|
|
|
|
The new layer object.
|
2017-01-19 17:53:18 +01:00
|
|
|
@throws css::uno::RuntimeException
|
2002-08-02 10:59:45 +00:00
|
|
|
*/
|
2017-01-26 12:28:58 +01:00
|
|
|
void setActiveLayer (const css::uno::Reference< css::drawing::XLayer>& rxLayer);
|
2002-08-02 10:59:45 +00:00
|
|
|
|
2003-03-27 09:58:12 +00:00
|
|
|
void SetZoom( sal_Int16 nZoom );
|
2015-04-14 12:44:47 +02:00
|
|
|
sal_Int16 GetZoom() const;
|
2003-03-27 09:58:12 +00:00
|
|
|
|
2015-10-28 12:01:32 +02:00
|
|
|
void SetViewOffset(const css::awt::Point& rWinPos );
|
|
|
|
css::awt::Point GetViewOffset() const;
|
2003-03-27 09:58:12 +00:00
|
|
|
|
|
|
|
void SetZoomType( sal_Int16 nType );
|
|
|
|
|
2015-10-28 12:01:32 +02:00
|
|
|
css::uno::Any getDrawViewMode() const;
|
2010-04-01 11:00:20 +02:00
|
|
|
|
2017-10-25 15:53:56 +02:00
|
|
|
SdXImpressDocument* GetModel() const throw();
|
|
|
|
|
2006-03-21 16:25:19 +00:00
|
|
|
DrawViewShell& mrDrawViewShell;
|
|
|
|
sd::View& mrView;
|
2002-01-24 13:33:46 +00:00
|
|
|
};
|
|
|
|
|
2004-01-20 10:42:07 +00:00
|
|
|
} // end of namespace sd
|
|
|
|
|
2002-08-02 10:59:45 +00:00
|
|
|
#endif
|
2010-10-27 12:53:26 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|