bump product version to 4.1.6.2
[LibreOffice.git] / chart2 / source / tools / WeakListenerAdapter.cxx
blob0c8b9736c6aaac6093c08fddb0f351b86f473d09
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
21 #include "WeakListenerAdapter.hxx"
23 using namespace ::com::sun::star;
25 using ::com::sun::star::uno::Reference;
26 using ::com::sun::star::uno::Sequence;
28 namespace chart
31 WeakModifyListenerAdapter::WeakModifyListenerAdapter(
32 const uno::WeakReference< util::XModifyListener > & xListener ) :
33 WeakListenerAdapter< ::com::sun::star::util::XModifyListener >( xListener )
36 WeakModifyListenerAdapter::~WeakModifyListenerAdapter()
39 void SAL_CALL WeakModifyListenerAdapter::modified( const lang::EventObject& aEvent )
40 throw (uno::RuntimeException)
42 Reference< util::XModifyListener > xModListener( getListener() );
43 if( xModListener.is())
44 xModListener->modified( aEvent );
47 // --------------------------------------------------------------------------------
49 WeakSelectionChangeListenerAdapter::WeakSelectionChangeListenerAdapter(
50 const Reference< view::XSelectionChangeListener > & xListener ) :
51 WeakListenerAdapter< ::com::sun::star::view::XSelectionChangeListener >( xListener )
54 WeakSelectionChangeListenerAdapter::~WeakSelectionChangeListenerAdapter()
57 void SAL_CALL WeakSelectionChangeListenerAdapter::selectionChanged( const lang::EventObject& aEvent )
58 throw (uno::RuntimeException)
60 Reference< view::XSelectionChangeListener > xSelChgListener( getListener() );
61 if( xSelChgListener.is())
62 xSelChgListener->selectionChanged( aEvent );
65 } // namespace chart
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */