Tag: cws_dev300_rptchart02 User: oj Date: 2008-05-15 12:28:04+0000 Modified: dba/reportdesign/source/ui/inspection/DataProviderHandler.cxx dba/reportdesign/source/ui/inspection/DefaultInspection.cxx dba/reportdesign/source/ui/inspection/metadata.cxx
Log: #i89369# disbale title feature at propbrw for teh moment but impl all what is needed as we can introduce new strings again File Changes: 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.2.4.4&r2=1.2.4.5 Delta lines: +43 -6 -------------------- --- DataProviderHandler.cxx 2008-04-16 06:29:58+0000 1.2.4.4 +++ DataProviderHandler.cxx 2008-05-15 12:28:01+0000 1.2.4.5 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: DataProviderHandler.cxx,v $ - * $Revision: 1.2.4.4 $ + * $Revision: 1.2.4.5 $ * * This file is part of OpenOffice.org. * @@ -43,6 +43,9 @@ #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp> #include <com/sun/star/chart2/XChartTypeContainer.hpp> #include <com/sun/star/chart2/XChartType.hpp> +#include <com/sun/star/chart2/XFormattedString.hpp> +#include <com/sun/star/chart2/XTitled.hpp> +#include <com/sun/star/chart2/XTitle.hpp> #include <com/sun/star/chart2/data/XDataReceiver.hpp> #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> #include <com/sun/star/report/XReportDefinition.hpp> @@ -63,7 +66,6 @@ { //........................................................................ using namespace ::com::sun::star; -// using namespace comphelper; DataProviderHandler::DataProviderHandler(uno::Reference< uno::XComponentContext > const & context) :DataProviderHandler_Base(m_aMutex) @@ -247,6 +249,30 @@ break; } } +// ----------------------------------------------------------------------------- +void DataProviderHandler::impl_updateChartTitle_throw(const uno::Any& _aValue) +{ + uno::Reference<chart2::XTitled> xTitled(m_xChartModel,uno::UNO_QUERY); + if ( xTitled.is() ) + { + uno::Reference<chart2::XTitle> xTitle = xTitled->getTitleObject(); + if ( !xTitle.is() ) + { + xTitle.set(m_xContext->getServiceManager()->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.Title")),m_xContext),uno::UNO_QUERY); + xTitled->setTitleObject(xTitle); + } + if ( xTitle.is() ) + { + uno::Reference< chart2::XFormattedString> xFormatted(m_xContext->getServiceManager()->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.FormattedString")),m_xContext),uno::UNO_QUERY); + ::rtl::OUString sStr; + _aValue>>= sStr; + xFormatted->setString(sStr); + uno::Sequence< uno::Reference< chart2::XFormattedString> > aArgs(1); + aArgs[0] = xFormatted; + xTitle->setText(aArgs); + } + } // if ( xTitled.is() ) +} beans::PropertyState SAL_CALL DataProviderHandler::getPropertyState(const ::rtl::OUString & PropertyName) throw (uno::RuntimeException, beans::UnknownPropertyException) { @@ -370,8 +396,9 @@ ,PROPERTY_MASTERFIELDS ,PROPERTY_DETAILFIELDS ,PROPERTY_PREVIEW_COUNT + //,PROPERTY_TITLE }; - ; + for (size_t nPos = 0; nPos < sizeof(s_pProperties)/sizeof(s_pProperties[0]) ;++nPos ) { aValue.Name = s_pProperties[nPos]; @@ -383,13 +410,18 @@ uno::Sequence< ::rtl::OUString > SAL_CALL DataProviderHandler::getSupersededProperties() throw (uno::RuntimeException) { - uno::Sequence< ::rtl::OUString > aRet; + uno::Sequence< ::rtl::OUString > aRet(1); + aRet[0] = PROPERTY_TITLE; // have a look at OPropertyInfoService::getExcludeProperties return aRet; } uno::Sequence< ::rtl::OUString > SAL_CALL DataProviderHandler::getActuatingProperties() throw (uno::RuntimeException) { - return m_xFormComponentHandler->getActuatingProperties(); + ::osl::MutexGuard aGuard( m_aMutex ); + + uno::Sequence< ::rtl::OUString > aSeq(1); + aSeq[0] = PROPERTY_TITLE; + return ::comphelper::concatSequences(m_xFormComponentHandler->getActuatingProperties(),aSeq); } ::sal_Bool SAL_CALL DataProviderHandler::isComposable( const ::rtl::OUString& _rPropertyName ) throw (uno::RuntimeException, beans::UnknownPropertyException) @@ -457,6 +489,11 @@ if ( !bModified ) xReport->setModified(sal_False); } + } // if ( ActuatingPropertyName == PROPERTY_COMMAND ) + else if ( ActuatingPropertyName == PROPERTY_TITLE ) + { + if ( NewValue != OldValue ) + impl_updateChartTitle_throw(NewValue); } else { File [changed]: DefaultInspection.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inspection/DefaultInspection.cxx?r1=1.4.4.2&r2=1.4.4.3 Delta lines: +6 -5 ------------------- --- DefaultInspection.cxx 2008-04-16 06:30:01+0000 1.4.4.2 +++ DefaultInspection.cxx 2008-05-15 12:28:02+0000 1.4.4.3 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: DefaultInspection.cxx,v $ - * $Revision: 1.4.4.2 $ + * $Revision: 1.4.4.3 $ * * This file is part of OpenOffice.org. * @@ -138,11 +138,12 @@ } aFactories[] = { { "com.sun.star.report.inspection.ReportComponentHandler"}, + { "com.sun.star.form.inspection.EditPropertyHandler"}, { "com.sun.star.report.inspection.DataProviderHandler"}, - { "com.sun.star.report.inspection.GeometryHandler"}, + { "com.sun.star.report.inspection.GeometryHandler"} // generic virtual edit properties - { "com.sun.star.form.inspection.EditPropertyHandler"}, + }; const size_t nFactories = sizeof( aFactories ) / sizeof( aFactories[ 0 ] ); File [changed]: metadata.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inspection/metadata.cxx?r1=1.6.4.2&r2=1.6.4.3 Delta lines: +5 -4 ------------------- --- metadata.cxx 2008-04-16 06:30:11+0000 1.6.4.2 +++ metadata.cxx 2008-05-15 12:28:02+0000 1.6.4.3 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: metadata.cxx,v $ - * $Revision: 1.6.4.2 $ + * $Revision: 1.6.4.3 $ * * This file is part of OpenOffice.org. * @@ -263,7 +263,7 @@ void OPropertyInfoService::getExcludeProperties(::std::vector< beans::Property >& _rExcludeProperties,const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >& _xFormComponentHandler) { uno::Sequence< beans::Property > aProps = _xFormComponentHandler->getSupportedProperties(); - ::rtl::OUString pExcludeProperties[] = + static const ::rtl::OUString pExcludeProperties[] = { ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Printable")), @@ -288,6 +288,7 @@ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RepeatDelay")), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlLabel")), /// TODO: has to be checked ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LabelControl")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), // comment this out if you want to have title feature for charts PROPERTY_MAXTEXTLEN, PROPERTY_EFFECTIVEDEFAULT, PROPERTY_EFFECTIVEMAX, --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
