diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-10-09 18:56:58 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-10-09 18:56:58 +0200 |
commit | 42b67336a7b63af9648bba34c17e2e90b5e330cf (patch) | |
tree | 18f3bd0e5ab761e64fbc923896a543c0c86ec0e4 /reportdesign | |
parent | 37d9e03f938067ade89aee831cc82cea96202b1d (diff) | |
parent | 8aea3d9e83a58b23bd2d350d6a8fc16c494b426b (diff) |
CWS changehid: resync to m89
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/prj/d.lst | 3 | ||||
-rw-r--r-- | reportdesign/source/core/api/ReportDefinition.cxx | 1 | ||||
-rw-r--r-- | reportdesign/source/core/api/services.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx | 20 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx | 14 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlservices.cxx | 7 | ||||
-rw-r--r-- | reportdesign/source/ui/misc/rptuiservices.cxx | 7 | ||||
-rw-r--r-- | reportdesign/source/ui/report/FormattedFieldBeautifier.cxx | 7 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 2 | ||||
-rw-r--r-- | reportdesign/util/makefile.mk | 20 | ||||
-rw-r--r-- | reportdesign/util/rpt.component | 58 | ||||
-rw-r--r-- | reportdesign/util/rptui.component | 52 | ||||
-rw-r--r-- | reportdesign/util/rptxml.component | 73 |
13 files changed, 243 insertions, 27 deletions
diff --git a/reportdesign/prj/d.lst b/reportdesign/prj/d.lst index b531c0eed8f0..d7cc5fad6396 100644 --- a/reportdesign/prj/d.lst +++ b/reportdesign/prj/d.lst @@ -19,3 +19,6 @@ dos: sh -c "if test %OS% = MACOSX; then create-bundle %_DEST%\lib%_EXT%\*.dylib; ..\uiconfig\dbreport\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\dbreport\statusbar\*.xml ..\uiconfig\dbreport\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\dbreport\toolbar\*.xml +..\%__SRC%\misc\rpt.component %_DEST%\xml%_EXT%\rpt.component +..\%__SRC%\misc\rptui.component %_DEST%\xml%_EXT%\rptui.component +..\%__SRC%\misc\rptxml.component %_DEST%\xml%_EXT%\rptxml.component diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index bcc90b54b8b6..2cf848dc0c84 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -1299,6 +1299,7 @@ void SAL_CALL OReportDefinition::close( ::sal_Bool _bDeliverOwnership ) throw (u ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed); ::comphelper::MediaDescriptor aDescriptor( _aArguments ); fillArgs(aDescriptor); + m_pImpl->m_pReportModel->SetModified(sal_False); return sal_True; } // ----------------------------------------------------------------------------- diff --git a/reportdesign/source/core/api/services.cxx b/reportdesign/source/core/api/services.cxx index c8251800afad..7598bc5d1ace 100644 --- a/reportdesign/source/core/api/services.cxx +++ b/reportdesign/source/core/api/services.cxx @@ -90,10 +90,4 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * serviceManager, void * registryKey) -{ - return cppu::component_writeInfoHelper( - serviceManager, registryKey, entries); -} } // extern "C" diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx index e86e46221e50..d3a557c3ff6b 100644 --- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx @@ -29,6 +29,7 @@ #include "xmlExportDocumentHandler.hxx" #include <com/sun/star/sdb/CommandType.hpp> #include <com/sun/star/chart2/data/XDatabaseDataProvider.hpp> +#include <com/sun/star/chart/XComplexDescriptionAccess.hpp> #include <com/sun/star/reflection/XProxyFactory.hpp> #include <com/sun/star/sdb/CommandType.hpp> #include <comphelper/sequence.hxx> @@ -289,7 +290,9 @@ void SAL_CALL ExportDocumentHandler::endElement(const ::rtl::OUString & _sName) void SAL_CALL ExportDocumentHandler::characters(const ::rtl::OUString & aChars) throw (uno::RuntimeException, xml::sax::SAXException) { if ( !(m_bTableRowsStarted || m_bFirstRowExported) ) + { m_xDelegatee->characters(aChars); + } else if ( m_bExportChar ) { static const ::rtl::OUString s_sZero(RTL_CONSTASCII_USTRINGPARAM("0")); @@ -336,12 +339,27 @@ void SAL_CALL ExportDocumentHandler::initialize( const uno::Sequence< uno::Any > // set ourself as delegator m_xProxy->setDelegator( *this ); - const ::rtl::OUString sCommand = m_xDatabaseDataProvider->getCommand(); if ( sCommand.getLength() ) m_aColumns = ::dbtools::getFieldNamesByCommandDescriptor(m_xDatabaseDataProvider->getActiveConnection() ,m_xDatabaseDataProvider->getCommandType() ,sCommand); + + uno::Reference< chart::XComplexDescriptionAccess > xDataProvider(m_xDatabaseDataProvider,uno::UNO_QUERY); + if ( xDataProvider.is() ) + { + m_aColumns.realloc(1); + uno::Sequence< uno::Sequence< ::rtl::OUString > > aColumnNames = xDataProvider->getComplexColumnDescriptions(); + for(sal_Int32 i = 0 ; i < aColumnNames.getLength();++i) + { + if ( aColumnNames[i].getLength() ) + { + sal_Int32 nCount = m_aColumns.getLength(); + m_aColumns.realloc(nCount+1); + m_aColumns[nCount] = aColumnNames[i][0]; + } + } + } } // -------------------------------------------------------------------------------- uno::Any SAL_CALL ExportDocumentHandler::queryInterface( const uno::Type& _rType ) throw (uno::RuntimeException) diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx index 4adbd142d4c8..c92eecc1084d 100644 --- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/sdb/CommandType.hpp> #include <com/sun/star/chart2/data/DatabaseDataProvider.hpp> #include <com/sun/star/chart2/data/XDataReceiver.hpp> +#include <com/sun/star/chart/XComplexDescriptionAccess.hpp> #include <com/sun/star/chart/ChartDataRowSource.hpp> #include <com/sun/star/reflection/XProxyFactory.hpp> #include <com/sun/star/sdb/CommandType.hpp> @@ -122,7 +123,6 @@ void SAL_CALL ImportDocumentHandler::endDocument() throw (uno::RuntimeException, uno::Reference< chart2::data::XDataReceiver > xReceiver(m_xModel,uno::UNO_QUERY_THROW); if ( xReceiver.is() ) { - xReceiver->attachDataProvider(m_xDatabaseDataProvider.get()); // this fills the chart again uno::Sequence< beans::PropertyValue > aArgs( 4 ); aArgs[0] = beans::PropertyValue( @@ -137,6 +137,18 @@ void SAL_CALL ImportDocumentHandler::endDocument() throw (uno::RuntimeException, aArgs[3] = beans::PropertyValue( ::rtl::OUString::createFromAscii("DataRowSource"), -1, uno::makeAny( chart::ChartDataRowSource_COLUMNS ), beans::PropertyState_DIRECT_VALUE ); + + uno::Reference< chart::XComplexDescriptionAccess > xDataProvider(m_xModel->getDataProvider(),uno::UNO_QUERY); + if ( xDataProvider.is() ) + { + aArgs.realloc(5); + uno::Sequence< uno::Sequence< ::rtl::OUString > > aColumnNames = xDataProvider->getComplexColumnDescriptions(); + aArgs[4] = beans::PropertyValue( + ::rtl::OUString::createFromAscii("ComplexColumnDescriptions"), -1, + uno::makeAny( aColumnNames ), beans::PropertyState_DIRECT_VALUE ); + } + xReceiver->attachDataProvider(m_xDatabaseDataProvider.get()); + xReceiver->setArguments( aArgs ); } } diff --git a/reportdesign/source/filter/xml/xmlservices.cxx b/reportdesign/source/filter/xml/xmlservices.cxx index bebf5f69a05b..3d7a36c3ffaf 100644 --- a/reportdesign/source/filter/xml/xmlservices.cxx +++ b/reportdesign/source/filter/xml/xmlservices.cxx @@ -92,10 +92,3 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( { *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - -extern "C" sal_Bool SAL_CALL component_writeInfo( - void * serviceManager, void * registryKey) -{ - return cppu::component_writeInfoHelper( - serviceManager, registryKey, entries); -} diff --git a/reportdesign/source/ui/misc/rptuiservices.cxx b/reportdesign/source/ui/misc/rptuiservices.cxx index efa58dc3ebae..312abfbddd5f 100644 --- a/reportdesign/source/ui/misc/rptuiservices.cxx +++ b/reportdesign/source/ui/misc/rptuiservices.cxx @@ -80,10 +80,3 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron { *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void * serviceManager, void * registryKey) -{ - return cppu::component_writeInfoHelper( - serviceManager, registryKey, entries); -} diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx index e44325dec05f..fdfdad6cb55f 100644 --- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx +++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx @@ -88,11 +88,10 @@ namespace rptui void FormattedFieldBeautifier::setPlaceholderText( const uno::Reference< uno::XInterface >& _rxComponent ) { ::rtl::OUString sDataField; - uno::Reference< report::XReportComponent > xComponent( _rxComponent, uno::UNO_QUERY ); try { - uno::Reference< report::XReportControlModel > xControlModel( xComponent, uno::UNO_QUERY ); + uno::Reference< report::XFormattedField > xControlModel( _rxComponent, uno::UNO_QUERY ); if ( xControlModel.is() ) { sDataField = xControlModel->getDataField(); @@ -119,8 +118,8 @@ namespace rptui } } - if ( xComponent.is() ) - setPlaceholderText( getVclWindowPeer( xComponent ), sDataField ); + if ( xControlModel.is() ) + setPlaceholderText( getVclWindowPeer( xControlModel.get() ), sDataField ); } catch (uno::Exception) { diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index a5280b7d93a3..6d13804fe7fa 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -333,7 +333,7 @@ IMPLEMENT_FORWARD_XINTERFACE2(OReportController,OReportController_BASE,OReportCo void OReportController::disposing() { - if ( getView() && m_pClipbordNotifier ) + if ( m_pClipbordNotifier ) { m_pClipbordNotifier->ClearCallbackLink(); m_pClipbordNotifier->AddRemoveListener( getView(), sal_False ); diff --git a/reportdesign/util/makefile.mk b/reportdesign/util/makefile.mk index 32fe4eb2a5d6..4f09018437e3 100644 --- a/reportdesign/util/makefile.mk +++ b/reportdesign/util/makefile.mk @@ -231,3 +231,23 @@ DEF3NAME=$(SHL3TARGET) .INCLUDE : target.mk + +ALLTAR : $(MISC)/rpt.component $(MISC)/rptui.component $(MISC)/rptxml.component + +$(MISC)/rpt.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + rpt.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt rpt.component + +$(MISC)/rptui.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + rptui.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt rptui.component + +$(MISC)/rptxml.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + rptxml.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL3TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt rptxml.component diff --git a/reportdesign/util/rpt.component b/reportdesign/util/rpt.component new file mode 100644 index 000000000000..ef5b2cc4c78d --- /dev/null +++ b/reportdesign/util/rpt.component @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.report.OFixedLine"> + <service name="com.sun.star.report.FixedLine"/> + </implementation> + <implementation name="com.sun.star.comp.report.OFixedText"> + <service name="com.sun.star.report.FixedText"/> + </implementation> + <implementation name="com.sun.star.comp.report.OFormatCondition"> + <service name="com.sun.star.report.FormatCondition"/> + </implementation> + <implementation name="com.sun.star.comp.report.OFormattedField"> + <service name="com.sun.star.report.FormattedField"/> + </implementation> + <implementation name="com.sun.star.comp.report.OFunction"> + <service name="com.sun.star.report.Function"/> + </implementation> + <implementation name="com.sun.star.comp.report.OImageControl"> + <service name="com.sun.star.report.ImageControl"/> + </implementation> + <implementation name="com.sun.star.comp.report.OReportDefinition"> + <service name="com.sun.star.report.ReportDefinition"/> + </implementation> + <implementation name="com.sun.star.comp.report.OReportEngineJFree"> + <service name="com.sun.star.report.ReportEngine"/> + </implementation> + <implementation name="com.sun.star.comp.report.Shape"> + <service name="com.sun.star.report.Shape"/> + </implementation> +</component> diff --git a/reportdesign/util/rptui.component b/reportdesign/util/rptui.component new file mode 100644 index 000000000000..593f06d0b582 --- /dev/null +++ b/reportdesign/util/rptui.component @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.report.DataProviderHandler"> + <service name="com.sun.star.report.inspection.DataProviderHandler"/> + </implementation> + <implementation name="com.sun.star.comp.report.DefaultComponentInspectorModel"> + <service name="com.sun.star.report.inspection.DefaultComponentInspectorModel"/> + </implementation> + <implementation name="com.sun.star.comp.report.GeometryHandler"> + <service name="com.sun.star.report.inspection.GeometryHandler"/> + </implementation> + <implementation name="com.sun.star.comp.report.ReportComponentHandler"> + <service name="com.sun.star.report.inspection.ReportComponentHandler"/> + </implementation> + <implementation name="com.sun.star.report.comp.ReportDesign"> + <service name="com.sun.star.sdb.ReportDesign"/> + </implementation> + <implementation name="com.sun.star.report.comp.ReportToolboxController"> + <service name="com.sun.star.report.ReportToolboxController"/> + </implementation> + <implementation name="com.sun.star.report.comp.StatusbarController"> + <service name="com.sun.star.frame.StatusbarController"/> + </implementation> +</component> diff --git a/reportdesign/util/rptxml.component b/reportdesign/util/rptxml.component new file mode 100644 index 000000000000..8a0021ecdf9a --- /dev/null +++ b/reportdesign/util/rptxml.component @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--********************************************************************** +* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2000, 2010 Oracle and/or its affiliates. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* 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. +* +**********************************************************************--> + +<component loader="com.sun.star.loader.SharedLibrary" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.Report.XMLOasisContentImporter"> + <service name="com.sun.star.comp.document.ImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Report.XMLOasisMetaImporter"> + <service name="com.sun.star.comp.document.ImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Report.XMLOasisSettingsImporter"> + <service name="com.sun.star.comp.document.ImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.Report.XMLOasisStylesImporter"> + <service name="com.sun.star.comp.document.ImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.report.ExportDocumentHandler"> + <service name="com.sun.star.report.ExportDocumentHandler"/> + </implementation> + <implementation name="com.sun.star.comp.report.ExportFilter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.report.ImportDocumentHandler"> + <service name="com.sun.star.report.ImportDocumentHandler"/> + </implementation> + <implementation name="com.sun.star.comp.report.OReportFilter"> + <service name="com.sun.star.comp.document.ImportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.report.ORptTypeDetection"> + <service name="com.sun.star.document.ExtendedTypeDetection"/> + </implementation> + <implementation name="com.sun.star.comp.report.XMLContentExporter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.report.XMLFullExporter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.report.XMLMetaExporter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.report.XMLSettingsExporter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> + <implementation name="com.sun.star.comp.report.XMLStylesExporter"> + <service name="com.sun.star.document.ExportFilter"/> + </implementation> +</component> |