LibreOffice Module reportdesign (master) 1
ReportEngineJFree.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#ifndef INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_REPORTENGINEJFREE_HXX
20#define INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_REPORTENGINEJFREE_HXX
21
22#include <sal/config.h>
23
24#include <com/sun/star/report/XReportEngine.hpp>
27#include <comphelper/uno3.hxx>
29#include <com/sun/star/uno/XComponentContext.hpp>
30#include <com/sun/star/lang/XServiceInfo.hpp>
31
32namespace reportdesign
33{
34 typedef ::cppu::WeakComponentImplHelper< css::report::XReportEngine
35 ,css::lang::XServiceInfo> ReportEngineBase;
36 typedef ::cppu::PropertySetMixin<css::report::XReportEngine> ReportEnginePropertySet;
37
39 public ReportEngineBase,
41 {
42 css::uno::Reference< css::uno::XComponentContext > m_xContext;
43 css::uno::Reference< css::report::XReportDefinition > m_xReport;
44 css::uno::Reference< css::task::XStatusIndicator> m_StatusIndicator;
45 css::uno::Reference< css::sdbc::XConnection > m_xActiveConnection;
46 ::sal_Int32 m_nMaxRows;
47 private:
50 template <typename T> void set( const OUString& _sProperty
51 ,const T& Value
52 ,T& _member)
53 {
54 BoundListeners l;
55 {
56 ::osl::MutexGuard aGuard(m_aMutex);
57 prepareSet(_sProperty, css::uno::Any(_member), css::uno::Any(Value), &l);
58 _member = Value;
59 }
60 l.notify();
61 }
62
67 OUString getNewOutputName();
68
69 protected:
70 // TODO: VirtualFunctionFinder: This is virtual function!
71
72 virtual ~OReportEngineJFree() override;
73 public:
74 OReportEngineJFree(const css::uno::Reference< css::uno::XComponentContext >& context);
75
77 // css::lang::XServiceInfo
78 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
79 virtual OUString SAL_CALL getImplementationName( ) override;
80 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
81
83 static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
85 static OUString getImplementationName_Static();
86 static css::uno::Reference< css::uno::XInterface >
87 create(css::uno::Reference< css::uno::XComponentContext > const & xContext);
88 private:
89 // css::beans::XPropertySet
90 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
91 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
92 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
93 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
94 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
95 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
96 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
97
98 // XReportEngine
99 // Attributes
100 virtual css::uno::Reference< css::report::XReportDefinition > SAL_CALL getReportDefinition() override ;
101 virtual void SAL_CALL setReportDefinition( const css::uno::Reference< css::report::XReportDefinition >& _reportdefinition ) override;
102 virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL getActiveConnection() override;
103 virtual void SAL_CALL setActiveConnection( const css::uno::Reference< css::sdbc::XConnection >& _activeconnection ) override;
104 virtual css::uno::Reference< css::task::XStatusIndicator > SAL_CALL getStatusIndicator() override ;
105 virtual void SAL_CALL setStatusIndicator( const css::uno::Reference< css::task::XStatusIndicator >& _statusindicator ) override ;
106 virtual ::sal_Int32 SAL_CALL getMaxRows() override;
107 virtual void SAL_CALL setMaxRows( ::sal_Int32 MaxRows ) override;
108 // Methods
109 virtual css::uno::Reference< css::frame::XModel > SAL_CALL createDocumentModel( ) override ;
110 virtual css::uno::Reference< css::frame::XModel > SAL_CALL createDocumentAlive( const css::uno::Reference< css::frame::XFrame >& _frame ) override ;
115 css::uno::Reference< css::frame::XModel > createDocumentAlive( const css::uno::Reference< css::frame::XFrame >& _frame ,bool _bHidden) ;
116 virtual css::util::URL SAL_CALL createDocument( ) override ;
117 virtual void SAL_CALL interrupt( ) override ;
118
119 // XComponent
120 virtual void SAL_CALL dispose() override;
121 virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override
122 {
123 cppu::WeakComponentImplHelperBase::addEventListener(aListener);
124 }
125 virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override
126 {
127 cppu::WeakComponentImplHelperBase::removeEventListener(aListener);
128 }
129 };
130}
131#endif // INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_REPORTENGINEJFREE_HXX
132
133/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void prepareSet(rtl::OUString const &propertyName, css::uno::Any const &oldValue, css::uno::Any const &newValue, BoundListeners *boundListeners)
static css::uno::Sequence< OUString > getSupportedServiceNames_Static()
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
css::uno::Reference< css::report::XReportDefinition > m_xReport
static css::uno::Reference< css::uno::XInterface > create(css::uno::Reference< css::uno::XComponentContext > const &xContext)
css::uno::Reference< css::task::XStatusIndicator > m_StatusIndicator
OReportEngineJFree(const css::uno::Reference< css::uno::XComponentContext > &context)
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void SAL_CALL interrupt() override
OUString getNewOutputName()
returns the file url for a new model
OReportEngineJFree & operator=(const OReportEngineJFree &)=delete
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual css::util::URL SAL_CALL createDocument() override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL setReportDefinition(const css::uno::Reference< css::report::XReportDefinition > &_reportdefinition) override
virtual css::uno::Reference< css::frame::XModel > SAL_CALL createDocumentAlive(const css::uno::Reference< css::frame::XFrame > &_frame) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual void SAL_CALL setMaxRows(::sal_Int32 MaxRows) override
virtual void SAL_CALL dispose() override
void set(const OUString &_sProperty, const T &Value, T &_member)
virtual OUString SAL_CALL getImplementationName() override
OReportEngineJFree(const OReportEngineJFree &)=delete
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL getActiveConnection() override
virtual void SAL_CALL setActiveConnection(const css::uno::Reference< css::sdbc::XConnection > &_activeconnection) override
css::uno::Reference< css::sdbc::XConnection > m_xActiveConnection
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual css::uno::Reference< css::frame::XModel > SAL_CALL createDocumentModel() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
static OUString getImplementationName_Static()
virtual void SAL_CALL setStatusIndicator(const css::uno::Reference< css::task::XStatusIndicator > &_statusindicator) override
virtual ::sal_Int32 SAL_CALL getMaxRows() override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual css::uno::Reference< css::report::XReportDefinition > SAL_CALL getReportDefinition() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual css::uno::Reference< css::task::XStatusIndicator > SAL_CALL getStatusIndicator() override
Value
::cppu::WeakComponentImplHelper< css::report::XReportEngine,css::lang::XServiceInfo > ReportEngineBase
::cppu::PropertySetMixin< css::report::XReportEngine > ReportEnginePropertySet
unsigned char sal_Bool
#define DECLARE_XINTERFACE()