393ad50836
2009-08-27 18:21:38 +0200 af r275502 : #i73289# Fixed detection of the cases when the layout menu is be disabled. 2009-08-24 17:45:50 +0200 sj r275326 : #i103360# only setting filltype if there is also a correct fill element 2009-08-24 16:11:06 +0200 cl r275322 : #i73871# only remove replaced objects from mark list if replaced by SdrEditView::ReplaceObjectAtView(). see issue for reason 2009-08-24 15:03:33 +0200 cl r275319 : fixed merge error 2009-08-20 12:45:29 +0200 sj r275174 : CWS-TOOLING: rebase CWS impress174 to trunk@275001 (milestone: DEV300:m55) 2009-08-19 15:54:47 +0200 sj r275153 : #158486# text of flipped shapes is not flipped in word 2009-08-17 17:30:16 +0200 sj r275063 : #158486# also correcting text bound for additional text rotation 2009-08-05 11:09:32 +0200 sj r274643 : #i102797# adapted customshape coloring (fixed fontwork) 2009-08-04 14:17:36 +0200 sj r274620 : #i99501# pdf export: fixed export of rotated graphics 2009-07-30 16:15:44 +0200 sj r274494 : #158653# binary ppt import: fixed table border lines 2009-07-27 18:28:02 +0200 sj r274376 : added shape text clipping for customshapes 2009-07-20 18:09:14 +0200 sj r274154 : #i101918# fixed gallery preview (now taking the correct mapmode) 2009-07-13 18:00:58 +0200 cl r273948 : #i103238# clear hard set attributes only if new style set is manually applied 2009-07-13 17:58:07 +0200 cl r273947 : #i73289# do not expand a toolpanel when it gets enabled 2009-07-08 12:39:49 +0200 sj r273827 : #i101566# applied patch from cmc to solve font width inconsistencies 2009-07-08 12:11:13 +0200 sj r273826 : #i87727# added PDFDialog service 2009-07-06 17:22:40 +0200 sj r273755 : #i103360# fixed a merge problem, no more looping when loading transparence gradients on background page 2009-07-03 14:42:07 +0200 sj r273701 : #102797# added patch from thb (Adapted customshape coloring) 2009-07-03 14:09:44 +0200 sj r273696 : #102797# removed warning 2009-07-03 14:01:47 +0200 sj r273695 : #102797# added patch from thb (Adapted customshape coloring) 2009-07-03 13:13:39 +0200 sj r273688 : #102797# added patch from thb (Adapted customshape coloring) 2009-07-03 11:25:30 +0200 sj r273684 : #i103278# fixed import of lines 2009-07-01 16:23:47 +0200 cl r273599 : #i96820# correctly call setChanged on model if table is modified 2009-07-01 14:43:09 +0200 cl r273588 : #i8770# Patch: fix missing type provider for pdf export dialog 2009-07-01 14:40:28 +0200 cl r273586 : #i73871# activate picture bar after converting shape to bitmap 2009-07-01 14:39:05 +0200 cl r273584 : #i73871# activate picture bar after converting shape to bitmap 2009-07-01 14:04:53 +0200 cl r273578 : #i73289# PATCH: Disable layout pane on the masterslide
225 lines
7.5 KiB
C++
225 lines
7.5 KiB
C++
/*************************************************************************
|
|
*
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
*
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
|
*
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
|
*
|
|
* $RCSfile: EventMultiplexer.hxx,v $
|
|
* $Revision: 1.7 $
|
|
*
|
|
* This file is part of OpenOffice.org.
|
|
*
|
|
* 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.
|
|
*
|
|
* 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).
|
|
*
|
|
* 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.
|
|
*
|
|
************************************************************************/
|
|
|
|
#ifndef SD_TOOLS_EVENT_MULTIPLEXER_HXX
|
|
#define SD_TOOLS_EVENT_MULTIPLEXER_HXX
|
|
|
|
#include <svtools/lstner.hxx>
|
|
|
|
#include <set>
|
|
#include <memory>
|
|
|
|
class Link;
|
|
|
|
namespace sd {
|
|
class ViewShellBase;
|
|
}
|
|
|
|
namespace sd { namespace tools {
|
|
|
|
class EventMultiplexerEvent
|
|
{
|
|
public:
|
|
typedef sal_uInt32 EventId;
|
|
/** The EventMultiplexer itself is being disposed. Called for a live
|
|
EventMultiplexer. Removing a listener as response is not necessary,
|
|
though.
|
|
*/
|
|
static const EventId EID_DISPOSING = 0x00000001;
|
|
|
|
/** The selection in the center pane has changed.
|
|
*/
|
|
static const EventId EID_EDIT_VIEW_SELECTION = 0x00000002;
|
|
|
|
/** The selection in the slide sorter has changed, regardless of whether
|
|
the slide sorter is displayed in the left pane or the center pane.
|
|
*/
|
|
static const EventId EID_SLIDE_SORTER_SELECTION = 0x00000004;
|
|
|
|
/** The current page has changed.
|
|
*/
|
|
static const EventId EID_CURRENT_PAGE = 0x00000008;
|
|
|
|
/** The current MainViewShell (the ViewShell displayed in the center
|
|
pane) has been removed.
|
|
*/
|
|
static const EventId EID_MAIN_VIEW_REMOVED = 0x00000010;
|
|
|
|
/** A new ViewShell has been made the MainViewShell.
|
|
*/
|
|
static const EventId EID_MAIN_VIEW_ADDED = 0x00000020;
|
|
|
|
/** A ViewShell has been removed from one of the panes. Note that for
|
|
the ViewShell in the center pane bth this event type and
|
|
EID_MAIN_VIEW_REMOVED is broadcasted.
|
|
*/
|
|
static const EventId EID_VIEW_REMOVED = 0x00000040;
|
|
|
|
/** A new ViewShell is being displayed in one of the panes. Note that
|
|
for the ViewShell in the center pane both this event type and
|
|
EID_MAIN_VIEW_ADDED is broadcasted.
|
|
*/
|
|
static const EventId EID_VIEW_ADDED = 0x00000080;
|
|
|
|
/** The PaneManager is being destroyed.
|
|
*/
|
|
static const EventId EID_PANE_MANAGER_DYING = 0x00000100;
|
|
|
|
/** Edit mode was (or is being) switched to normal mode. Find
|
|
EID_EDIT_MODE_MASTER below.
|
|
*/
|
|
static const EventId EID_EDIT_MODE_NORMAL = 0x00000200;
|
|
|
|
/** One or more pages have been inserted into or deleted from the model.
|
|
*/
|
|
static const EventId EID_PAGE_ORDER = 0x00000400;
|
|
|
|
/** Text editing in one of the shapes in the MainViewShell has started.
|
|
*/
|
|
static const EventId EID_BEGIN_TEXT_EDIT = 0x00000800;
|
|
|
|
/** Text editing in one of the shapes in the MainViewShell has ended.
|
|
*/
|
|
static const EventId EID_END_TEXT_EDIT = 0x00001000;
|
|
|
|
/** A UNO controller has been attached to the UNO frame.
|
|
*/
|
|
static const EventId EID_CONTROLLER_ATTACHED = 0x00002000;
|
|
|
|
/** A UNO controller has been detached to the UNO frame.
|
|
*/
|
|
static const EventId EID_CONTROLLER_DETACHED = 0x00004000;
|
|
|
|
/** The state of a shape has changed. The page is available in the user data.
|
|
*/
|
|
static const EventId EID_SHAPE_CHANGED = 0x00008000;
|
|
|
|
/** A shape has been inserted to a page. The page is available in the
|
|
user data.
|
|
*/
|
|
static const EventId EID_SHAPE_INSERTED = 0x00010000;
|
|
|
|
/** A shape has been removed from a page. The page is available in the
|
|
user data.
|
|
*/
|
|
static const EventId EID_SHAPE_REMOVED = 0x00020000;
|
|
|
|
/** A configuration update has been completed.
|
|
*/
|
|
static const EventId EID_CONFIGURATION_UPDATED = 0x00040000;
|
|
|
|
/** Edit mode was (or is being) switched to master mode.
|
|
*/
|
|
static const EventId EID_EDIT_MODE_MASTER = 0x00080000;
|
|
|
|
const ViewShellBase& mrBase;
|
|
EventId meEventId;
|
|
const void* mpUserData;
|
|
|
|
EventMultiplexerEvent (
|
|
const ViewShellBase& rBase,
|
|
EventId eEventId,
|
|
const void* pUserData);
|
|
};
|
|
|
|
|
|
/** This convenience class makes it easy to listen to various events that
|
|
originally are broadcasted via different channels.
|
|
|
|
There is usually one EventMultiplexer instance per ViewShellBase().
|
|
Call the laters GetEventMultiplexer() method to get access to that
|
|
instance.
|
|
|
|
When a listener is registered it can specify the events it
|
|
wants to be informed of. This can be done with code like the following:
|
|
|
|
mrViewShellBase.GetEventMultiplexer().AddEventListener (
|
|
LINK(this,MasterPagesSelector,EventMultiplexerListener),
|
|
tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED
|
|
| tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED);
|
|
*/
|
|
class EventMultiplexer
|
|
{
|
|
public:
|
|
/** Create new EventMultiplexer for the given ViewShellBase object.
|
|
*/
|
|
EventMultiplexer (ViewShellBase& rBase);
|
|
~EventMultiplexer (void);
|
|
|
|
/** Some constants that make it easier to remove a listener for all
|
|
event types at once.
|
|
*/
|
|
static const EventMultiplexerEvent::EventId EID_FULL_SET = 0xffffffff;
|
|
static const EventMultiplexerEvent::EventId EID_EMPTY_SET = 0x00000000;
|
|
|
|
/** Add an event listener that will be informed about the specified
|
|
event types.
|
|
@param rCallback
|
|
The callback to call as soon as one of the event specified by
|
|
aEventTypeSet is received by the EventMultiplexer.
|
|
@param aEventTypeSet
|
|
A, possibly empty, set of event types that the listener wants to
|
|
be informed about.
|
|
*/
|
|
void AddEventListener (
|
|
Link& rCallback,
|
|
EventMultiplexerEvent::EventId aEventTypeSet);
|
|
|
|
/** Remove an event listener for the specified event types.
|
|
@param aEventTypeSet
|
|
The listener will not be called anymore for any of the event
|
|
types in this set. Use EID_FULL_SET, the default value, to
|
|
remove the listener for all event types it has been registered
|
|
for.
|
|
*/
|
|
void RemoveEventListener (
|
|
Link& rCallback,
|
|
EventMultiplexerEvent::EventId aEventTypeSet = EID_FULL_SET);
|
|
|
|
/** This method is used for out-of-line events. An event of the
|
|
specified type will be sent to all listeners that are registered for
|
|
that type.
|
|
@param eEventId
|
|
The type of the event.
|
|
@param pUserData
|
|
Some data sent to the listeners along with the event.
|
|
*/
|
|
void MultiplexEvent(
|
|
EventMultiplexerEvent::EventId eEventId,
|
|
void* pUserData = 0);
|
|
|
|
private:
|
|
class Implementation;
|
|
::std::auto_ptr<Implementation> mpImpl;
|
|
};
|
|
|
|
} } // end of namespace ::sd::tools
|
|
|
|
#endif
|