Tag: cws_src680_rptchart01 User: oj Date: 2008-02-13 07:12:50+0000 Modified: dba/reportdesign/source/core/api/FixedLine.cxx dba/reportdesign/source/core/api/FixedText.cxx dba/reportdesign/source/core/api/FormattedField.cxx dba/reportdesign/source/core/api/ImageControl.cxx dba/reportdesign/source/core/api/ReportDefinition.cxx dba/reportdesign/source/core/api/ReportEngineJFree.cxx dba/reportdesign/source/core/api/Shape.cxx dba/reportdesign/source/core/inc/ReportComponent.hxx dba/reportdesign/source/core/inc/ReportEngineJFree.hxx dba/reportdesign/source/core/inc/ReportHelperImpl.hxx dba/reportdesign/source/ui/inc/DataProviderHandler.hxx dba/reportdesign/source/ui/inspection/DataProviderHandler.cxx
Log: #i85225# impl chart readhandler and oleproducer File Changes: Directory: /dba/reportdesign/source/core/api/ ============================================= File [changed]: FixedLine.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/FixedLine.cxx?r1=1.4&r2=1.4.20.1 Delta lines: +7 -4 ------------------- --- FixedLine.cxx 2007-11-20 18:57:35+0000 1.4 +++ FixedLine.cxx 2008-02-13 07:12:46+0000 1.4.20.1 @@ -4,9 +4,9 @@ * * $RCSfile: FixedLine.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.4.20.1 $ * - * last change: $Author: ihi $ $Date: 2007/11/20 18:57:35 $ + * last change: $Author: oj $ $Date: 2008/02/13 07:12:46 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -124,6 +124,8 @@ ,PROPERTY_PRINTREPEATEDVALUES ,PROPERTY_CONDITIONALPRINTEXPRESSION ,PROPERTY_PRINTWHENGROUPCHANGE + ,PROPERTY_MASTERFIELDS + ,PROPERTY_DETAILFIELDS }; return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0])); } @@ -245,7 +247,8 @@ } // ----------------------------------------------------------------------------- // XReportComponent -REPORTCOMPONENT_IMPL3(OFixedLine) +REPORTCOMPONENT_IMPL3(OFixedLine,m_aProps.aComponent) +REPORTCOMPONENT_NOMASTERDETAIL(OFixedLine) // ----------------------------------------------------------------------------- ::sal_Int16 SAL_CALL OFixedLine::getControlBorder( ) throw (beans::UnknownPropertyException, uno::RuntimeException) { File [changed]: FixedText.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/FixedText.cxx?r1=1.2&r2=1.2.70.1 Delta lines: +6 -5 ------------------- --- FixedText.cxx 2007-07-09 11:56:13+0000 1.2 +++ FixedText.cxx 2008-02-13 07:12:46+0000 1.2.70.1 @@ -4,9 +4,9 @@ * * $RCSfile: FixedText.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.2.70.1 $ * - * last change: $Author: rt $ $Date: 2007/07/09 11:56:13 $ + * last change: $Author: oj $ $Date: 2008/02/13 07:12:46 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -77,7 +77,7 @@ using namespace comphelper; uno::Sequence< ::rtl::OUString > lcl_getFixedTextOptionals() { - ::rtl::OUString pProps[] = { PROPERTY_DATAFIELD }; + ::rtl::OUString pProps[] = { PROPERTY_DATAFIELD,PROPERTY_MASTERFIELDS,PROPERTY_DETAILFIELDS }; return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0])); } DBG_NAME( rpt_OFixedText ) @@ -179,8 +179,9 @@ } // ----------------------------------------------------------------------------- // XReportComponent -REPORTCOMPONENT_IMPL(OFixedText) -REPORTCOMPONENT_IMPL2(OFixedText) +REPORTCOMPONENT_IMPL(OFixedText,m_aProps.aComponent) +REPORTCOMPONENT_IMPL2(OFixedText,m_aProps.aComponent) +REPORTCOMPONENT_NOMASTERDETAIL(OFixedText) REPORTCONTROLFORMAT_IMPL(OFixedText,m_aProps.aFormatProperties) // ----------------------------------------------------------------------------- uno::Reference< beans::XPropertySetInfo > SAL_CALL OFixedText::getPropertySetInfo( ) throw(uno::RuntimeException) File [changed]: FormattedField.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/FormattedField.cxx?r1=1.3&r2=1.3.62.1 Delta lines: +13 -7 -------------------- --- FormattedField.cxx 2007-08-02 14:29:38+0000 1.3 +++ FormattedField.cxx 2008-02-13 07:12:46+0000 1.3.62.1 @@ -4,9 +4,9 @@ * * $RCSfile: FormattedField.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.3.62.1 $ * - * last change: $Author: hr $ $Date: 2007/08/02 14:29:38 $ + * last change: $Author: oj $ $Date: 2008/02/13 07:12:46 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -84,11 +84,16 @@ return *(new OFormattedField(xContext)); } +uno::Sequence< ::rtl::OUString > lcl_getFormattedFieldOptionals() +{ + ::rtl::OUString pProps[] = { PROPERTY_MASTERFIELDS,PROPERTY_DETAILFIELDS }; + return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0])); +} DBG_NAME( rpt_OFormattedField ) // ----------------------------------------------------------------------------- OFormattedField::OFormattedField(uno::Reference< uno::XComponentContext > const & _xContext) :FormattedFieldBase(m_aMutex) -,FormattedFieldPropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),uno::Sequence< ::rtl::OUString >()) +,FormattedFieldPropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getFormattedFieldOptionals()) ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext) ,m_nFormatKey(0) { @@ -100,7 +105,7 @@ ,const uno::Reference< lang::XMultiServiceFactory>& _xFactory ,uno::Reference< drawing::XShape >& _xShape) :FormattedFieldBase(m_aMutex) -,FormattedFieldPropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),uno::Sequence< ::rtl::OUString >()) +,FormattedFieldPropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getFormattedFieldOptionals()) ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext) ,m_nFormatKey(0) { @@ -177,8 +182,9 @@ } // ----------------------------------------------------------------------------- // XReportComponent -REPORTCOMPONENT_IMPL(OFormattedField) -REPORTCOMPONENT_IMPL2(OFormattedField) +REPORTCOMPONENT_IMPL(OFormattedField,m_aProps.aComponent) +REPORTCOMPONENT_IMPL2(OFormattedField,m_aProps.aComponent) +REPORTCOMPONENT_NOMASTERDETAIL(OFormattedField) REPORTCONTROLFORMAT_IMPL(OFormattedField,m_aProps.aFormatProperties) // ----------------------------------------------------------------------------- File [changed]: ImageControl.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/ImageControl.cxx?r1=1.3&r2=1.3.62.1 Delta lines: +8 -5 ------------------- --- ImageControl.cxx 2007-08-02 14:30:02+0000 1.3 +++ ImageControl.cxx 2008-02-13 07:12:46+0000 1.3.62.1 @@ -4,9 +4,9 @@ * * $RCSfile: ImageControl.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.3.62.1 $ * - * last change: $Author: hr $ $Date: 2007/08/02 14:30:02 $ + * last change: $Author: oj $ $Date: 2008/02/13 07:12:46 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -112,6 +112,8 @@ ,PROPERTY_VISITEDCHARSTYLENAME ,PROPERTY_UNVISITEDCHARSTYLENAME ,PROPERTY_CHARKERNING + ,PROPERTY_MASTERFIELDS + ,PROPERTY_DETAILFIELDS }; return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0])); } @@ -213,8 +215,9 @@ } // ----------------------------------------------------------------------------- // XReportComponent -REPORTCOMPONENT_IMPL(OImageControl) -REPORTCOMPONENT_IMPL2(OImageControl) +REPORTCOMPONENT_IMPL(OImageControl,m_aProps.aComponent) +REPORTCOMPONENT_IMPL2(OImageControl,m_aProps.aComponent) +REPORTCOMPONENT_NOMASTERDETAIL(OImageControl) //REPORTCONTROLFORMAT_IMPL(OImageControl,m_aProps.aFormatProperties) NO_REPORTCONTROLFORMAT_IMPL(OImageControl) ::rtl::OUString SAL_CALL OImageControl::getHyperLinkURL() throw (uno::RuntimeException, beans::UnknownPropertyException) File [changed]: ReportDefinition.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/ReportDefinition.cxx?r1=1.5.20.4&r2=1.5.20.5 Delta lines: +9 -126 --------------------- --- ReportDefinition.cxx 2008-01-31 09:32:40+0000 1.5.20.4 +++ ReportDefinition.cxx 2008-02-13 07:12:47+0000 1.5.20.5 @@ -4,9 +4,9 @@ * * $RCSfile: ReportDefinition.cxx,v $ * - * $Revision: 1.5.20.4 $ + * $Revision: 1.5.20.5 $ * - * last change: $Author: oj $ $Date: 2008/01/31 09:32:40 $ + * last change: $Author: oj $ $Date: 2008/02/13 07:12:47 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -211,6 +211,7 @@ #ifndef RPT_SHAPE_HXX #include "Shape.hxx" #endif +#include "ReportHelperImpl.hxx" #ifndef _SFXITEMPOOL_HXX #include <svtools/itempool.hxx> #endif @@ -615,8 +616,6 @@ ::cppu::OInterfaceContainerHelper m_aModifyListeners; ::cppu::OInterfaceContainerHelper m_aDocEventListeners; ::std::vector< uno::Reference< frame::XController> > m_aControllers; - uno::Sequence< ::rtl::OUString > m_aMasterFields; - uno::Sequence< ::rtl::OUString > m_aDetailFields; uno::Sequence< beans::PropertyValue > m_aArgs; uno::Reference< report::XGroups > m_xGroups; @@ -963,28 +962,6 @@ set(PROPERTY_PAGEFOOTEROPTION,_pagefooteroption,m_pImpl->m_nPageFooterOption); } // ----------------------------------------------------------------------------- -uno::Sequence< ::rtl::OUString > SAL_CALL OReportDefinition::getMasterFields() throw (uno::RuntimeException) -{ - ::osl::MutexGuard aGuard(m_aMutex); - return m_pImpl->m_aMasterFields; -} -// ----------------------------------------------------------------------------- -void SAL_CALL OReportDefinition::setMasterFields( const uno::Sequence< ::rtl::OUString >& _masterfields ) throw (uno::RuntimeException) -{ - set(PROPERTY_MASTERFIELDS,_masterfields,m_pImpl->m_aMasterFields); -} -// ----------------------------------------------------------------------------- -uno::Sequence< ::rtl::OUString > SAL_CALL OReportDefinition::getDetailFields() throw (uno::RuntimeException) -{ - ::osl::MutexGuard aGuard(m_aMutex); - return m_pImpl->m_aDetailFields; -} -// ----------------------------------------------------------------------------- -void SAL_CALL OReportDefinition::setDetailFields( const uno::Sequence< ::rtl::OUString >& _detailfields ) throw (uno::RuntimeException) -{ - set(PROPERTY_DETAILFIELDS,_detailfields,m_pImpl->m_aDetailFields); -} -// ----------------------------------------------------------------------------- ::rtl::OUString SAL_CALL OReportDefinition::getCommand() throw (uno::RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -1141,104 +1118,10 @@ } //------------------------------------------------------------------------------ // XReportComponent -::rtl::OUString SAL_CALL OReportDefinition::getName() throw (uno::RuntimeException) -{ - ::osl::MutexGuard aGuard(m_aMutex); - return m_aProps->m_sName; -} -// ----------------------------------------------------------------------------- -void SAL_CALL OReportDefinition::setName( const ::rtl::OUString& _name ) throw (uno::RuntimeException,beans::PropertyVetoException) -{ - set(PROPERTY_NAME,_name,m_aProps->m_sName); -} -// ----------------------------------------------------------------------------- -::sal_Int32 SAL_CALL OReportDefinition::getHeight() throw (uno::RuntimeException) -{ - return getSize().Height; -} -// ----------------------------------------------------------------------------- -void SAL_CALL OReportDefinition::setHeight( ::sal_Int32 _height ) throw (uno::RuntimeException) -{ - awt::Size aSize = getSize(); - aSize.Height = _height; - setSize(aSize); -} -// ----------------------------------------------------------------------------- -::sal_Int32 SAL_CALL OReportDefinition::getPositionX() throw (uno::RuntimeException) -{ - return getPosition().X; -} -// ----------------------------------------------------------------------------- -void SAL_CALL OReportDefinition::setPositionX( ::sal_Int32 _positionx ) throw (uno::RuntimeException) -{ - awt::Point aPos = getPosition(); - aPos.X = _positionx; - setPosition(aPos); -} -// ----------------------------------------------------------------------------- -::sal_Int32 SAL_CALL OReportDefinition::getPositionY() throw (uno::RuntimeException) -{ - return getPosition().Y; -} -// ----------------------------------------------------------------------------- -void SAL_CALL OReportDefinition::setPositionY( ::sal_Int32 _positiony ) throw (uno::RuntimeException) -{ - awt::Point aPos = getPosition(); - aPos.Y = _positiony; - setPosition(aPos); -} -// ----------------------------------------------------------------------------- -::sal_Int32 SAL_CALL OReportDefinition::getWidth() throw (uno::RuntimeException) -{ - return getSize().Width; -} -// ----------------------------------------------------------------------------- -void SAL_CALL OReportDefinition::setWidth( ::sal_Int32 _width ) throw (uno::RuntimeException) -{ - awt::Size aSize = getSize(); - aSize.Width = _width; - setSize(aSize); -} -// ----------------------------------------------------------------------------- -::sal_Int16 SAL_CALL OReportDefinition::getControlBorder() throw (beans::UnknownPropertyException, uno::RuntimeException) -{ - ::osl::MutexGuard aGuard(m_aMutex); - return m_aProps->m_nBorder; -} -// ----------------------------------------------------------------------------- -void SAL_CALL OReportDefinition::setControlBorder( ::sal_Int16 _border ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException) -{ - set(PROPERTY_CONTROLBORDER,_border,m_aProps->m_nBorder); -} -// ----------------------------------------------------------------------------- -::sal_Int32 SAL_CALL OReportDefinition::getControlBorderColor() throw (beans::UnknownPropertyException,uno::RuntimeException) -{ - ::osl::MutexGuard aGuard(m_aMutex); - return m_aProps->m_nBorderColor; -} -// ----------------------------------------------------------------------------- -void SAL_CALL OReportDefinition::setControlBorderColor( ::sal_Int32 _bordercolor ) throw (beans::UnknownPropertyException,lang::IllegalArgumentException,uno::RuntimeException) -{ - set(PROPERTY_CONTROLBORDERCOLOR,_bordercolor,m_aProps->m_nBorderColor); -} -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -::sal_Bool SAL_CALL OReportDefinition::getPrintRepeatedValues() throw (beans::UnknownPropertyException, uno::RuntimeException) -{ - ::osl::MutexGuard aGuard(m_aMutex); - return m_aProps->m_bPrintRepeatedValues; -} -// ----------------------------------------------------------------------------- -void SAL_CALL OReportDefinition::setPrintRepeatedValues( ::sal_Bool _printrepeatedvalues ) throw (beans::UnknownPropertyException, uno::RuntimeException) -{ - set(PROPERTY_PRINTREPEATEDVALUES,_printrepeatedvalues,m_aProps->m_bPrintRepeatedValues); -} -// ----------------------------------------------------------------------------- -uno::Reference< report::XSection > SAL_CALL OReportDefinition::getSection() throw (uno::RuntimeException) -{ - uno::Reference< container::XChild > xParent(getParent( ),uno::UNO_QUERY); - return lcl_getSection(xParent); -} +REPORTCOMPONENT_MASTERDETAIL(OReportDefinition,*m_aProps) +REPORTCOMPONENT_IMPL(OReportDefinition,*m_aProps) +REPORTCOMPONENT_IMPL2(OReportDefinition,*m_aProps) + // ----------------------------------------------------------------------------- uno::Reference< beans::XPropertySetInfo > SAL_CALL OReportDefinition::getPropertySetInfo( ) throw(uno::RuntimeException) { @@ -1635,10 +1518,10 @@ if ( _xStorageToSaveTo == m_pImpl->m_xStorage ) bPersist = m_pImpl->m_pObjectContainer->StoreChildren(sal_True,sal_False); else - bPersist = m_pImpl->m_pObjectContainer->StoreToChildren(sal_True,sal_True,_xStorageToSaveTo); + bPersist = m_pImpl->m_pObjectContainer->StoreAsChildren(sal_True,sal_True,_xStorageToSaveTo); if( bPersist ) - m_pImpl->m_pObjectContainer->SetPersistentEntries(_xStorageToSaveTo); + m_pImpl->m_pObjectContainer->SetPersistentEntries(m_pImpl->m_xStorage); try { uno::Reference<embed::XTransactedObject> xTransact(_xStorageToSaveTo,uno::UNO_QUERY); File [changed]: ReportEngineJFree.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/ReportEngineJFree.cxx?r1=1.5.18.1&r2=1.5.18.2 Delta lines: +8 -87 -------------------- --- ReportEngineJFree.cxx 2008-01-24 12:39:31+0000 1.5.18.1 +++ ReportEngineJFree.cxx 2008-02-13 07:12:47+0000 1.5.18.2 @@ -4,9 +4,9 @@ * * $RCSfile: ReportEngineJFree.cxx,v $ * - * $Revision: 1.5.18.1 $ + * $Revision: 1.5.18.2 $ * - * last change: $Author: oj $ $Date: 2008/01/24 12:39:31 $ + * last change: $Author: oj $ $Date: 2008/02/13 07:12:47 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -71,7 +71,6 @@ #include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.hpp> #include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp> #include <com/sun/star/sdb/CommandType.hpp> -#include <connectivity/statementcomposer.hxx> #include <com/sun/star/task/XInteractionHandler.hpp> #ifndef _COM_SUN_STAR_TASK_XJOB_HPP_ @@ -134,7 +133,6 @@ { ReportEnginePropertySet::dispose(); cppu::WeakComponentImplHelperBase::dispose(); - ::comphelper::disposeComponent(m_xRowSet); m_xActiveConnection.clear(); } // ----------------------------------------------------------------------------- @@ -192,26 +190,11 @@ { prepareSet(PROPERTY_REPORTDEFINITION, uno::makeAny(m_xReport), uno::makeAny(_report), &l); m_xReport = _report; - ::comphelper::disposeComponent(m_xRowSet); - m_xRowSet.set(m_xContext->getServiceManager()->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.RowSet")) - ,m_xContext),uno::UNO_QUERY); } - setRowSetProperties(); } l.notify(); } // ----------------------------------------------------------------------------- -void OReportEngineJFree::setRowSetProperties() -{ - if ( m_xReport.is() && m_xRowSet.is() ) - { - uno::Reference< beans::XPropertySet> xRowSetProp(m_xRowSet,uno::UNO_QUERY); - xRowSetProp->setPropertyValue(PROPERTY_COMMAND,m_xReport->getPropertyValue(PROPERTY_COMMAND)); - xRowSetProp->setPropertyValue(PROPERTY_COMMANDTYPE,m_xReport->getPropertyValue(PROPERTY_COMMANDTYPE)); - xRowSetProp->setPropertyValue(PROPERTY_FILTER,m_xReport->getPropertyValue(PROPERTY_FILTER)); - } -} -// ----------------------------------------------------------------------------- uno::Reference< task::XStatusIndicator > SAL_CALL OReportEngineJFree::getStatusIndicator() throw (uno::RuntimeException) { ::osl::MutexGuard aGuard(m_aMutex); @@ -234,7 +217,7 @@ { ::osl::MutexGuard aGuard(m_aMutex); ::connectivity::checkDisposed(ReportEngineBase::rBHelper.bDisposed); - if ( !m_xReport.is() || !m_xRowSet.is() || !m_xActiveConnection.is() ) + if ( !m_xReport.is() || !m_xActiveConnection.is() ) throw lang::IllegalArgumentException(); try @@ -252,17 +235,10 @@ uno::Sequence< beans::NamedValue > aConvertedProperties(5/*6*/); sal_Int32 nPos = 0; - - //aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Key")); - //::rtl::OUString sKey;// = StorageContainer::registerStorage(m_xReport); - //aConvertedProperties[nPos++].Value <<= sKey; - aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputStorage")); aConvertedProperties[nPos++].Value <<= xTemp; - aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OutputStorage")); - //! TODO: has to be changed into a temp storage later on const static String s_sExt = String::CreateFromAscii(".rpt"); String sName = m_xReport->getName(); ::utl::TempFile aFile(sName,sal_False,&s_sExt); @@ -274,75 +250,20 @@ static const ::rtl::OUString sPropName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")); xStorageProp->setPropertyValue( sPropName, uno::makeAny(m_xReport->getMimeType())); } - /*::rtl::OUString sStyles(RTL_CONSTASCII_USTRINGPARAM("styles.xml")); - xTemp->copyElementTo(sStyles,xOut,sStyles);*/ aConvertedProperties[nPos++].Value <<= xOut; - aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("mimetype")); - aConvertedProperties[nPos++].Value <<= m_xReport->getMimeType(); + aConvertedProperties[nPos].Name = PROPERTY_REPORTDEFINITION; + aConvertedProperties[nPos++].Value <<= m_xReport; - aConvertedProperties[nPos].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RowSet")); - aConvertedProperties[nPos++].Value <<= m_xRowSet; + aConvertedProperties[nPos].Name = PROPERTY_ACTIVECONNECTION; + aConvertedProperties[nPos++].Value <<= m_xActiveConnection; // create job factory and initialize uno::Reference<task::XJob> xJob(m_xContext->getServiceManager()->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.report.pentaho.SOReportJobFactory")),m_xContext),uno::UNO_QUERY); if ( xJob.is() ) { - if ( m_xReport->getCommand().getLength() ) - { - uno::Reference< beans::XPropertySet> xRowSetProp(m_xRowSet,uno::UNO_QUERY); - xRowSetProp->setPropertyValue(PROPERTY_ACTIVECONNECTION,uno::makeAny(m_xActiveConnection)); - - ::rtl::OUString sOrder = getOrderStatement(); - if (sOrder.getLength() > 0) - { - sal_Int32 nCommandType = 0; - xRowSetProp->getPropertyValue(PROPERTY_COMMANDTYPE) >>= nCommandType; - if (nCommandType != sdb::CommandType::TABLE) - { - rtl::OUString sOldCommand; - xRowSetProp->getPropertyValue(PROPERTY_COMMAND) >>= sOldCommand; - dbtools::StatementComposer aComposer(m_xActiveConnection, sOldCommand, nCommandType, sal_True ); - - uno::Reference< sdb::XSingleSelectQueryComposer > xComposer( aComposer.getComposer() ); - if ( xComposer.is() ) - { - rtl::OUString sCurrentSQL = xComposer->getQuery(); - // Magic here, read the nice documentation out of the IDL. - xComposer->setQuery(sCurrentSQL); - rtl::OUString sOldOrder = xComposer->getOrder(); - if (sOldOrder.getLength() > 0) - { - sOrder += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); - sOrder += sOldOrder; - xComposer->setOrder(rtl::OUString()); - rtl::OUString sQuery = xComposer->getQuery(); - xRowSetProp->setPropertyValue(PROPERTY_COMMAND, uno::makeAny(sQuery)); - xRowSetProp->setPropertyValue(PROPERTY_COMMANDTYPE, uno::makeAny(sdb::CommandType::COMMAND)); - } - } - } - } - // we have to set the order everytime, at least we clear the old one. - xRowSetProp->setPropertyValue(PROPERTY_ORDER,uno::makeAny(sOrder)); - xRowSetProp->setPropertyValue(PROPERTY_APPLYFILTER,uno::makeAny(m_xReport->getFilter().getLength() != 0)); - - uno::Reference<sdb::XCompletedExecution> xExecute( m_xRowSet, uno::UNO_QUERY ); - if ( xExecute.is() ) - { - uno::Reference<task::XInteractionHandler> xHandler( - m_xContext->getServiceManager()->createInstanceWithContext( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.InteractionHandler")) - ,m_xContext), - uno::UNO_QUERY); - xExecute->executeWithCompletion(xHandler); - } - else - m_xRowSet->execute(); xJob->execute(aConvertedProperties); - } - if ( xStorageProp.is() ) { //xStorageProp->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL"))) >>= sOutputName; File [changed]: Shape.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/Shape.cxx?r1=1.3.62.1&r2=1.3.62.2 Delta lines: +5 -4 ------------------- --- Shape.cxx 2008-01-24 12:39:31+0000 1.3.62.1 +++ Shape.cxx 2008-02-13 07:12:47+0000 1.3.62.2 @@ -4,9 +4,9 @@ * * $RCSfile: Shape.cxx,v $ * - * $Revision: 1.3.62.1 $ + * $Revision: 1.3.62.2 $ * - * last change: $Author: oj $ $Date: 2008/01/24 12:39:31 $ + * last change: $Author: oj $ $Date: 2008/02/13 07:12:47 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -192,8 +192,9 @@ } // ----------------------------------------------------------------------------- // XReportComponent -REPORTCOMPONENT_IMPL(OShape) -REPORTCOMPONENT_IMPL2(OShape) +REPORTCOMPONENT_IMPL(OShape,m_aProps.aComponent) +REPORTCOMPONENT_IMPL2(OShape,m_aProps.aComponent) +REPORTCOMPONENT_MASTERDETAIL(OShape,m_aProps.aComponent) REPORTCONTROLFORMAT_IMPL2(OShape,m_aProps.aFormatProperties) // ----------------------------------------------------------------------------- ::sal_Int32 SAL_CALL OShape::getControlBackground() throw (beans::UnknownPropertyException, uno::RuntimeException) Directory: /dba/reportdesign/source/core/inc/ ============================================= File [changed]: ReportComponent.hxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/inc/ReportComponent.hxx?r1=1.2&r2=1.2.70.1 Delta lines: +4 -2 ------------------- --- ReportComponent.hxx 2007-07-09 11:56:15+0000 1.2 +++ ReportComponent.hxx 2008-02-13 07:12:47+0000 1.2.70.1 @@ -4,9 +4,9 @@ * * $RCSfile: ReportComponent.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.2.70.1 $ * - * last change: $Author: rt $ $Date: 2007/07/09 11:56:15 $ + * last change: $Author: oj $ $Date: 2008/02/13 07:12:47 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -85,6 +85,8 @@ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XTypeProvider > m_xTypeProvider; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > m_xUnoTunnel; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo > m_xServiceInfo; + ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aMasterFields; + ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aDetailFields; ::rtl::OUString m_sName; ::sal_Int32 m_nHeight; ::sal_Int32 m_nWidth; File [changed]: ReportEngineJFree.hxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/inc/ReportEngineJFree.hxx?r1=1.2.70.1&r2=1.2.70.2 Delta lines: +2 -8 ------------------- --- ReportEngineJFree.hxx 2008-01-24 12:39:31+0000 1.2.70.1 +++ ReportEngineJFree.hxx 2008-02-13 07:12:47+0000 1.2.70.2 @@ -6,9 +6,9 @@ * * $RCSfile: ReportEngineJFree.hxx,v $ * - * $Revision: 1.2.70.1 $ + * $Revision: 1.2.70.2 $ * - * last change: $Author: oj $ $Date: 2008/01/24 12:39:31 $ + * last change: $Author: oj $ $Date: 2008/02/13 07:12:47 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -82,7 +82,6 @@ typedef ::std::multimap< ::rtl::OUString, ::com::sun::star::uno::Any , ::comphelper::UStringMixLess> TComponentMap; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition > m_xReport; - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xRowSet; ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator> m_StatusIndicator; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xActiveConnection; private: @@ -113,11 +112,6 @@ */ ::rtl::OUString getNewOutputName(); - /** set the rowset properties. - * - */ - void setRowSetProperties(); - /** generates the order statement defined by the groups of the report * * \return the ORDER BY part File [changed]: ReportHelperImpl.hxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/inc/ReportHelperImpl.hxx?r1=1.3&r2=1.3.62.1 Delta lines: +55 -15 --------------------- --- ReportHelperImpl.hxx 2007-08-02 14:30:52+0000 1.3 +++ ReportHelperImpl.hxx 2008-02-13 07:12:47+0000 1.3.62.1 @@ -4,9 +4,9 @@ * * $RCSfile: ReportHelperImpl.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.3.62.1 $ * - * last change: $Author: hr $ $Date: 2007/08/02 14:30:52 $ + * last change: $Author: oj $ $Date: 2008/02/13 07:12:47 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -35,15 +35,15 @@ #ifndef INCLUDED_REPORTHELPERIMPL_HXX #define INCLUDED_REPORTHELPERIMPL_HXX // ::com::sun::star::report::XReportComponent: -#define REPORTCOMPONENT_IMPL3(clazz) \ +#define REPORTCOMPONENT_IMPL3(clazz,arg) \ ::rtl::OUString SAL_CALL clazz::getName() throw (uno::RuntimeException) \ { \ ::osl::MutexGuard aGuard(m_aMutex); \ - return m_aProps.aComponent.m_sName; \ + return (arg).m_sName; \ } \ void SAL_CALL clazz::setName( const ::rtl::OUString& _name ) throw (uno::RuntimeException,beans::PropertyVetoException) \ { \ - set(PROPERTY_NAME,_name,m_aProps.aComponent.m_sName); \ + set(PROPERTY_NAME,_name,(arg).m_sName); \ } \ ::sal_Int32 SAL_CALL clazz::getHeight() throw (uno::RuntimeException) \ { \ @@ -92,37 +92,77 @@ return lcl_getSection(xParent); \ } -#define REPORTCOMPONENT_IMPL(clazz) \ -REPORTCOMPONENT_IMPL3(clazz)\ +#define REPORTCOMPONENT_IMPL(clazz,arg) \ +REPORTCOMPONENT_IMPL3(clazz,arg)\ ::sal_Bool SAL_CALL clazz::getPrintRepeatedValues() throw (beans::UnknownPropertyException, uno::RuntimeException) \ { \ ::osl::MutexGuard aGuard(m_aMutex); \ - return m_aProps.aComponent.m_bPrintRepeatedValues; \ + return (arg).m_bPrintRepeatedValues; \ } \ void SAL_CALL clazz::setPrintRepeatedValues( ::sal_Bool _printrepeatedvalues ) throw (beans::UnknownPropertyException, uno::RuntimeException) \ { \ - set(PROPERTY_PRINTREPEATEDVALUES,_printrepeatedvalues,m_aProps.aComponent.m_bPrintRepeatedValues); \ + set(PROPERTY_PRINTREPEATEDVALUES,_printrepeatedvalues,(arg).m_bPrintRepeatedValues); \ } -#define REPORTCOMPONENT_IMPL2(clazz) \ +#define REPORTCOMPONENT_IMPL2(clazz,arg) \ ::sal_Int16 SAL_CALL clazz::getControlBorder() throw (beans::UnknownPropertyException, uno::RuntimeException) \ { \ ::osl::MutexGuard aGuard(m_aMutex); \ - return m_aProps.aComponent.m_nBorder; \ + return (arg).m_nBorder; \ } \ void SAL_CALL clazz::setControlBorder( ::sal_Int16 _border ) throw (uno::RuntimeException,lang::IllegalArgumentException,beans::UnknownPropertyException)\ { \ - set(PROPERTY_CONTROLBORDER,_border,m_aProps.aComponent.m_nBorder); \ + set(PROPERTY_CONTROLBORDER,_border,(arg).m_nBorder); \ } \ ::sal_Int32 SAL_CALL clazz::getControlBorderColor() throw (beans::UnknownPropertyException,uno::RuntimeException) \ { \ ::osl::MutexGuard aGuard(m_aMutex); \ - return m_aProps.aComponent.m_nBorderColor; \ + return (arg).m_nBorderColor; \ } \ void SAL_CALL clazz::setControlBorderColor( ::sal_Int32 _bordercolor ) throw (uno::RuntimeException, lang::IllegalArgumentException, beans::UnknownPropertyException) \ { \ - set(PROPERTY_CONTROLBORDERCOLOR,_bordercolor,m_aProps.aComponent.m_nBorderColor); \ + set(PROPERTY_CONTROLBORDERCOLOR,_bordercolor,(arg).m_nBorderColor); \ +} + +#define REPORTCOMPONENT_MASTERDETAIL(clazz,arg) \ +::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL clazz::getMasterFields() throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) \ +{ \ + ::osl::MutexGuard aGuard(m_aMutex); \ + return (arg).m_aMasterFields; \ +} \ +void SAL_CALL clazz::setMasterFields( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _masterfields ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)\ +{ \ + ::osl::MutexGuard aGuard(m_aMutex); \ + set(PROPERTY_MASTERFIELDS,_masterfields,(arg).m_aMasterFields); \ +} \ +::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL clazz::getDetailFields() throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)\ +{ \ + ::osl::MutexGuard aGuard(m_aMutex); \ + return (arg).m_aDetailFields; \ +} \ +void SAL_CALL clazz::setDetailFields( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _detailfields ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)\ +{ \ + ::osl::MutexGuard aGuard(m_aMutex); \ + set(PROPERTY_DETAILFIELDS,_detailfields,(arg).m_aDetailFields); \ +} + +#define REPORTCOMPONENT_NOMASTERDETAIL(clazz) \ +::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL clazz::getMasterFields() throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException) \ +{ \ + throw ::com::sun::star::beans::UnknownPropertyException();\ } \ +void SAL_CALL clazz::setMasterFields( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)\ +{ \ + throw ::com::sun::star::beans::UnknownPropertyException();\ +} \ +::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL clazz::getDetailFields() throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)\ +{ \ + throw ::com::sun::star::beans::UnknownPropertyException();\ +} \ +void SAL_CALL clazz::setDetailFields( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)\ +{ \ + throw ::com::sun::star::beans::UnknownPropertyException();\ +} // ::com::sun::star::report::XReportControlFormat: #define REPORTCONTROLFORMAT_IMPL1(clazz,varName) \ Directory: /dba/reportdesign/source/ui/inc/ =========================================== File [changed]: DataProviderHandler.hxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inc/DataProviderHandler.hxx?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +3 -2 ------------------- --- DataProviderHandler.hxx 2008-01-25 13:57:55+0000 1.1.2.2 +++ DataProviderHandler.hxx 2008-02-13 07:12:47+0000 1.1.2.3 @@ -4,9 +4,9 @@ * * $RCSfile: DataProviderHandler.hxx,v $ * - * $Revision: 1.1.2.2 $ + * $Revision: 1.1.2.3 $ * - * last change: $Author: oj $ $Date: 2008/01/25 13:57:55 $ + * last change: $Author: oj $ $Date: 2008/02/13 07:12:47 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -133,6 +133,7 @@ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xFormComponent; /// inspectee ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent > m_xReportComponent; /// inspectee ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument> m_xChartModel; + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > m_xMasterDetails; ::std::auto_ptr< OPropertyInfoService > m_pInfoService; }; //........................................................................ Directory: /dba/reportdesign/source/ui/inspection/ ================================================== File [changed]: DataProviderHandler.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inspection/DataProviderHandler.cxx?r1=1.1.2.2&r2=1.1.2.3 Delta lines: +13 -2 -------------------- --- DataProviderHandler.cxx 2008-01-25 13:57:55+0000 1.1.2.2 +++ DataProviderHandler.cxx 2008-02-13 07:12:47+0000 1.1.2.3 @@ -4,9 +4,9 @@ * * $RCSfile: DataProviderHandler.cxx,v $ * - * $Revision: 1.1.2.2 $ + * $Revision: 1.1.2.3 $ * - * last change: $Author: oj $ $Date: 2008/01/25 13:57:55 $ + * last change: $Author: oj $ $Date: 2008/02/13 07:12:47 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -88,6 +88,7 @@ #endif #include "helpids.hrc" #include "uistrings.hrc" +#include "PropertyForward.hxx" //........................................................................ namespace rptui { @@ -153,6 +154,7 @@ void SAL_CALL DataProviderHandler::disposing() { ::comphelper::disposeComponent(m_xFormComponentHandler); + ::comphelper::disposeComponent( m_xMasterDetails ); } void SAL_CALL DataProviderHandler::addEventListener(const uno::Reference< lang::XEventListener > & xListener) throw (uno::RuntimeException) { @@ -186,6 +188,15 @@ } m_xDataProvider.set(m_xFormComponent,uno::UNO_QUERY); m_xReportComponent.set( xNameCont->getByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ReportComponent" ) ) ), uno::UNO_QUERY ); + if ( m_xDataProvider.is() ) + { + TPropertyNamePair aPropertyMediation; + aPropertyMediation.insert( TPropertyNamePair::value_type( PROPERTY_MASTERFIELDS, PROPERTY_MASTERFIELDS ) ); + aPropertyMediation.insert( TPropertyNamePair::value_type( PROPERTY_DETAILFIELDS, PROPERTY_DETAILFIELDS ) ); + + m_xMasterDetails = new OPropertyMediator( m_xDataProvider.get(), m_xReportComponent.get(), aPropertyMediation ); + } + //const ::rtl::OUString sRowSet(RTL_CONSTASCII_USTRINGPARAM("RowSet")); //if ( xNameCont->hasByName(sRowSet) ) //{ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
