1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include "sal/config.h"
23 #include "sfx2/dllapi.h"
24 #include <tools/string.hxx>
25 #include <svl/hint.hxx>
26 #include <unotools/eventcfg.hxx>
27 #include <rtl/ustring.hxx>
29 #include <com/sun/star/uno/Sequence.hxx>
30 #include <com/sun/star/beans/PropertyValue.hpp>
31 #include <com/sun/star/frame/XController2.hpp>
35 //-------------------------------------------------------------------
37 class SFX2_DLLPUBLIC SfxEventHint
: public SfxHint
39 SfxObjectShell
* pObjShell
;
45 SfxEventHint( sal_uInt16 nId
, const OUString
& aName
, SfxObjectShell
*pObj
= 0 )
51 sal_uInt16
GetEventId() const
54 OUString
GetEventName() const
55 { return aEventName
; }
57 SfxObjectShell
* GetObjShell() const
61 //-------------------------------------------------------------------
63 class SFX2_DLLPUBLIC SfxViewEventHint
: public SfxEventHint
65 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XController2
> xViewController
;
70 SfxViewEventHint( sal_uInt16 nId
, const OUString
& aName
, SfxObjectShell
*pObj
, const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XController
>& xController
)
71 : SfxEventHint( nId
, aName
, pObj
)
72 , xViewController( xController
, ::com::sun::star::uno::UNO_QUERY
)
75 SfxViewEventHint( sal_uInt16 nId
, const OUString
& aName
, SfxObjectShell
*pObj
, const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XController2
>& xController
)
76 : SfxEventHint( nId
, aName
, pObj
)
77 , xViewController( xController
)
80 ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XController2
> GetController() const
81 { return xViewController
; }
84 //-------------------------------------------------------------------
86 class SfxNamedHint
: public SfxHint
89 SfxObjectShell
* _pObjShell
;
95 SfxNamedHint( const String
& rName
,
97 SfxObjectShell
*pObj
= 0 )
98 : _aEventName( rName
),
103 SfxNamedHint( const String
& rName
,
104 SfxObjectShell
*pObj
= 0 )
105 : _aEventName( rName
),
109 const String
& GetArgs() const { return _aArgs
;}
110 const String
& GetName() const { return _aEventName
; }
111 SfxObjectShell
* GetObjShell() const { return _pObjShell
; }
115 class SfxPrintingHint
: public SfxHint
118 com::sun::star::uno::Sequence
< com::sun::star::beans::PropertyValue
> aOpts
;
121 SfxPrintingHint( sal_Int32 nEvent
, const com::sun::star::uno::Sequence
< com::sun::star::beans::PropertyValue
>& rOpts
)
126 SfxPrintingHint( sal_Int32 nEvent
)
130 sal_Int32
GetWhich() const { return nWhich
; }
131 const com::sun::star::uno::Sequence
< com::sun::star::beans::PropertyValue
>& GetOptions() { return aOpts
; }
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */