[API CHANGE] Add PopupRequest - a callback to open a pop-up win. in calc
Change-Id: Iea600e229deb69d1638a1a649008fc4738a5934a Reviewed-on: https://gerrit.libreoffice.org/34005 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
parent
614f4b5a32
commit
8cc8ffdb04
@ -223,6 +223,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
|
||||
chart2/source/tools/ObjectIdentifier \
|
||||
chart2/source/tools/OPropertySet \
|
||||
chart2/source/tools/PolynomialRegressionCurveCalculator \
|
||||
chart2/source/tools/PopupRequest \
|
||||
chart2/source/tools/PotentialRegressionCurveCalculator \
|
||||
chart2/source/tools/PropertyHelper \
|
||||
chart2/source/tools/RangeHighlighter \
|
||||
|
@ -143,6 +143,7 @@ private:
|
||||
css::awt::Size m_aVisualAreaSize;
|
||||
css::uno::Reference< css::frame::XModel > m_xParent;
|
||||
css::uno::Reference< css::chart2::data::XRangeHighlighter > m_xRangeHighlighter;
|
||||
css::uno::Reference<css::chart2::data::XPopupRequest> m_xPopupRequest;
|
||||
::std::vector< GraphicObject > m_aGraphicObjectVector;
|
||||
|
||||
css::uno::Reference< css::chart2::data::XDataProvider > m_xDataProvider;
|
||||
@ -382,6 +383,7 @@ public:
|
||||
virtual void SAL_CALL attachNumberFormatsSupplier( const css::uno::Reference<
|
||||
css::util::XNumberFormatsSupplier >& xSupplier ) override;
|
||||
virtual css::uno::Reference< css::chart2::data::XRangeHighlighter > SAL_CALL getRangeHighlighter() override;
|
||||
virtual css::uno::Reference< css::chart2::data::XPopupRequest > SAL_CALL getPopupRequest() override;
|
||||
|
||||
// ____ XTitled ____
|
||||
virtual css::uno::Reference< css::chart2::XTitle > SAL_CALL getTitleObject() override;
|
||||
|
51
chart2/source/inc/PopupRequest.hxx
Normal file
51
chart2/source/inc/PopupRequest.hxx
Normal file
@ -0,0 +1,51 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_CHART2_SOURCE_INC_POPUPREQUEST_HXX
|
||||
#define INCLUDED_CHART2_SOURCE_INC_POPUPREQUEST_HXX
|
||||
|
||||
#include "MutexContainer.hxx"
|
||||
#include <cppuhelper/compbase.hxx>
|
||||
#include <com/sun/star/chart2/data/XPopupRequest.hpp>
|
||||
#include <com/sun/star/beans/XPropertySet.hpp>
|
||||
|
||||
namespace chart
|
||||
{
|
||||
|
||||
namespace impl
|
||||
{
|
||||
|
||||
typedef cppu::WeakComponentImplHelper<css::chart2::data::XPopupRequest> PopupRequest_Base;
|
||||
|
||||
}
|
||||
|
||||
class PopupRequest : public MutexContainer, public impl::PopupRequest_Base
|
||||
{
|
||||
public:
|
||||
explicit PopupRequest();
|
||||
virtual ~PopupRequest() override;
|
||||
|
||||
protected:
|
||||
// ____ XRequestCallback ____
|
||||
virtual void SAL_CALL addCallback(const css::uno::Reference< ::css::awt::XCallback >& xCallback,
|
||||
const css::uno::Any& aData) override;
|
||||
|
||||
// ____ WeakComponentImplHelperBase ____
|
||||
// is called when dispose() is called at this component
|
||||
virtual void SAL_CALL disposing() override;
|
||||
|
||||
private:
|
||||
css::uno::Reference<css::awt::XCallback> m_xCallback;
|
||||
};
|
||||
|
||||
} // namespace chart
|
||||
|
||||
#endif // INCLUDED_CHART2_SOURCE_INC_POPUPREQUEST_HXX
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -32,6 +32,7 @@
|
||||
#include "NameContainer.hxx"
|
||||
#include "UndoManager.hxx"
|
||||
#include "ChartView.hxx"
|
||||
#include "PopupRequest.hxx"
|
||||
#include <svx/charthelper.hxx>
|
||||
|
||||
#include <vcl/openglwin.hxx>
|
||||
@ -412,6 +413,7 @@ void SAL_CALL ChartModel::disconnectController( const uno::Reference< frame::XCo
|
||||
m_xCurrentController.clear();
|
||||
|
||||
DisposeHelper::DisposeAndClear( m_xRangeHighlighter );
|
||||
DisposeHelper::DisposeAndClear(m_xPopupRequest);
|
||||
}
|
||||
|
||||
void SAL_CALL ChartModel::lockControllers()
|
||||
@ -496,6 +498,7 @@ void SAL_CALL ChartModel::setCurrentController( const uno::Reference< frame::XCo
|
||||
m_xCurrentController = xController;
|
||||
|
||||
DisposeHelper::DisposeAndClear( m_xRangeHighlighter );
|
||||
DisposeHelper::DisposeAndClear(m_xPopupRequest);
|
||||
}
|
||||
|
||||
uno::Reference< uno::XInterface > SAL_CALL ChartModel::getCurrentSelection()
|
||||
@ -569,6 +572,7 @@ void SAL_CALL ChartModel::dispose()
|
||||
m_xCurrentController.clear();
|
||||
|
||||
DisposeHelper::DisposeAndClear( m_xRangeHighlighter );
|
||||
DisposeHelper::DisposeAndClear(m_xPopupRequest);
|
||||
|
||||
if( m_xOldModelAgg.is())
|
||||
m_xOldModelAgg->setDelegator( nullptr );
|
||||
@ -909,6 +913,13 @@ Reference< chart2::data::XRangeHighlighter > SAL_CALL ChartModel::getRangeHighli
|
||||
return m_xRangeHighlighter;
|
||||
}
|
||||
|
||||
Reference<chart2::data::XPopupRequest> SAL_CALL ChartModel::getPopupRequest()
|
||||
{
|
||||
if (!m_xPopupRequest.is())
|
||||
m_xPopupRequest.set(new PopupRequest);
|
||||
return m_xPopupRequest;
|
||||
}
|
||||
|
||||
Reference< chart2::XChartTypeTemplate > ChartModel::impl_createDefaultChartTypeTemplate()
|
||||
{
|
||||
Reference< chart2::XChartTypeTemplate > xTemplate;
|
||||
|
42
chart2/source/tools/PopupRequest.cxx
Normal file
42
chart2/source/tools/PopupRequest.cxx
Normal file
@ -0,0 +1,42 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* 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/.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "PopupRequest.hxx"
|
||||
|
||||
using namespace css;
|
||||
|
||||
namespace chart
|
||||
{
|
||||
|
||||
PopupRequest::PopupRequest()
|
||||
: impl::PopupRequest_Base(m_aMutex)
|
||||
{
|
||||
}
|
||||
|
||||
PopupRequest::~PopupRequest()
|
||||
{}
|
||||
|
||||
// ____ XRequestCallback ____
|
||||
|
||||
void SAL_CALL PopupRequest::addCallback(const uno::Reference<awt::XCallback>& xCallback,
|
||||
const uno::Any& /*aData*/)
|
||||
{
|
||||
m_xCallback = xCallback;
|
||||
}
|
||||
|
||||
// ____ WeakComponentImplHelperBase ____
|
||||
// is called when dispose() is called at this component
|
||||
void SAL_CALL PopupRequest::disposing()
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace chart
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -658,6 +658,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,com/sun/star/chart2/data,\
|
||||
DataSequence \
|
||||
DataSink \
|
||||
DataSource \
|
||||
PopupRequest \
|
||||
RangeHighlighter \
|
||||
RangeHighlightListener \
|
||||
TabularDataProviderArguments \
|
||||
@ -2057,6 +2058,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/chart2/data,\
|
||||
XLabeledDataSequence \
|
||||
XLabeledDataSequence2 \
|
||||
XNumericalDataSequence \
|
||||
XPopupRequest \
|
||||
XRangeHighlighter \
|
||||
XRangeXMLConversion \
|
||||
XSheetDataProvider \
|
||||
|
44
offapi/com/sun/star/chart2/data/PopupRequest.idl
Normal file
44
offapi/com/sun/star/chart2/data/PopupRequest.idl
Normal file
@ -0,0 +1,44 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* 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/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef com_sun_star_chart2_data_PopupRequest_idl
|
||||
#define com_sun_star_chart2_data_PopupRequest_idl
|
||||
|
||||
#include <com/sun/star/chart2/data/XPopupRequest.idl>
|
||||
|
||||
module com
|
||||
{
|
||||
module sun
|
||||
{
|
||||
module star
|
||||
{
|
||||
module chart2
|
||||
{
|
||||
module data
|
||||
{
|
||||
|
||||
/**
|
||||
*/
|
||||
service PopupRequest
|
||||
{
|
||||
/**
|
||||
*/
|
||||
interface XPopupRequest;
|
||||
};
|
||||
|
||||
} ; // data
|
||||
} ; // chart2
|
||||
} ; // com
|
||||
} ; // sun
|
||||
} ; // star
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -87,6 +87,8 @@ interface XDataReceiver : ::com::sun::star::uno::XInterface
|
||||
return an empty object.</p>
|
||||
*/
|
||||
XRangeHighlighter getRangeHighlighter();
|
||||
|
||||
XPopupRequest getPopupRequest();
|
||||
};
|
||||
|
||||
} ; // data
|
||||
|
39
offapi/com/sun/star/chart2/data/XPopupRequest.idl
Normal file
39
offapi/com/sun/star/chart2/data/XPopupRequest.idl
Normal file
@ -0,0 +1,39 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* 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/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef com_sun_star_chart2_data_XPopupRequest_idl
|
||||
#define com_sun_star_chart2_data_XPopupRequest_idl
|
||||
|
||||
#include <com/sun/star/uno/XInterface.idl>
|
||||
|
||||
module com
|
||||
{
|
||||
module sun
|
||||
{
|
||||
module star
|
||||
{
|
||||
module chart2
|
||||
{
|
||||
module data
|
||||
{
|
||||
|
||||
interface XPopupRequest : com::sun::star::awt::XRequestCallback
|
||||
{
|
||||
};
|
||||
|
||||
} ; // data
|
||||
} ; // chart2
|
||||
} ; // com
|
||||
} ; // sun
|
||||
} ; // star
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
Loading…
x
Reference in New Issue
Block a user