Tag: cws_dev300_rptchart02 User: oj Date: 2008-06-05 10:44:58+0000 Modified: dba/reportdesign/source/ui/report/ReportController.cxx
Log: #i90298# impl asian and complex File Changes: Directory: /dba/reportdesign/source/ui/report/ ============================================== File [changed]: ReportController.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportController.cxx?r1=1.12.4.8&r2=1.12.4.9 Delta lines: +27 -31 --------------------- --- ReportController.cxx 2008-05-23 05:41:26+0000 1.12.4.8 +++ ReportController.cxx 2008-06-05 10:44:55+0000 1.12.4.9 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ReportController.cxx,v $ - * $Revision: 1.12.4.8 $ + * $Revision: 1.12.4.9 $ * * This file is part of OpenOffice.org. * @@ -49,9 +49,7 @@ #include "ReportController.hxx" #include "ReportDefinition.hxx" #include "CondFormat.hxx" -#ifndef RPTUI_TOOLS_HXX #include "UITools.hxx" -#endif #include <toolkit/helper/vclunohelper.hxx> #include "DateTime.hxx" #include <svtools/syslocale.hxx> @@ -59,9 +57,7 @@ #include <sfx2/filedlghelper.hxx> #include <tools/string.hxx> #include <tools/diagnose_ex.h> -#ifndef _RPTUI_SLOTID_HRC_ #include "rptui_slotid.hrc" -#endif #include "reportformula.hxx" #include <comphelper/documentconstants.hxx> #include <comphelper/property.hxx> @@ -81,9 +77,7 @@ #include <com/sun/star/frame/FrameSearchFlag.hpp> #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/container/XNameContainer.hpp> -#ifndef _COM_SUN_STAR_REPORT_XImageControl_HPP_ #include <com/sun/star/report/XImageControl.hpp> -#endif #include <com/sun/star/report/XFixedLine.hpp> #include <com/sun/star/report/Function.hpp> #include <com/sun/star/report/XShape.hpp> @@ -107,13 +101,9 @@ #include <svx/dataaccessdescriptor.hxx> #include <vcl/msgbox.hxx> #include <vcl/waitobj.hxx> -#ifndef _SBASLTID_HRC #include <svx/svxids.hrc> -#endif #include <svx/svdobj.hxx> -#ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC #include "uistrings.hrc" -#endif #include <svtools/cliplistener.hxx> #include "RptDef.hxx" #include "ReportSection.hxx" @@ -2876,24 +2866,27 @@ uno::Reference<beans::XPropertySetInfo> xShapeInfo = xShapeProp->getPropertySetInfo(); uno::Reference<beans::XPropertySetInfo> xInfo = xUnoProp->getPropertySetInfo(); - if ( xInfo->hasPropertyByName(PROPERTY_NAME) ) - xUnoProp->setPropertyValue(PROPERTY_NAME,xShapeProp->getPropertyValue(PROPERTY_NAME)); + const ::rtl::OUString sProps[] = { PROPERTY_NAME + ,PROPERTY_FONTDESCRIPTOR + ,PROPERTY_FONTDESCRIPTORASIAN + ,PROPERTY_FONTDESCRIPTORCOMPLEX + ,PROPERTY_ORIENTATION + ,PROPERTY_BORDER + ,PROPERTY_FORMATSSUPPLIER + ,PROPERTY_BACKGROUNDCOLOR + }; + for(size_t i = 0; i < sizeof(sProps)/sizeof(sProps[0]);++i) + { + if ( xInfo->hasPropertyByName(sProps[i]) && xShapeInfo->hasPropertyByName(sProps[i]) ) + xUnoProp->setPropertyValue(sProps[i],xShapeProp->getPropertyValue(sProps[i])); + } - if ( xInfo->hasPropertyByName(PROPERTY_FONTDESCRIPTOR) && xShapeInfo->hasPropertyByName(PROPERTY_FONTDESCRIPTOR) ) - xUnoProp->setPropertyValue(PROPERTY_FONTDESCRIPTOR,xShapeProp->getPropertyValue(PROPERTY_FONTDESCRIPTOR)); - if ( xInfo->hasPropertyByName(PROPERTY_ORIENTATION) && xShapeInfo->hasPropertyByName(PROPERTY_ORIENTATION) ) - xUnoProp->setPropertyValue(PROPERTY_ORIENTATION,xShapeProp->getPropertyValue(PROPERTY_ORIENTATION)); - if ( xInfo->hasPropertyByName(PROPERTY_BORDER) && xShapeInfo->hasPropertyByName(PROPERTY_CONTROLBORDER) ) - xUnoProp->setPropertyValue(PROPERTY_BORDER,xShapeProp->getPropertyValue(PROPERTY_CONTROLBORDER)); if ( xInfo->hasPropertyByName(PROPERTY_DATAFIELD) && _sFunction.getLength() ) { ReportFormula aFunctionFormula( ReportFormula::Expression, _sFunction ); xUnoProp->setPropertyValue( PROPERTY_DATAFIELD, uno::makeAny( aFunctionFormula.getCompleteFormula() ) ); } - if ( xInfo->hasPropertyByName(PROPERTY_FORMATSSUPPLIER) && xShapeInfo->hasPropertyByName(PROPERTY_FORMATSSUPPLIER) ) - xUnoProp->setPropertyValue( PROPERTY_FORMATSSUPPLIER, xShapeProp->getPropertyValue( PROPERTY_FORMATSSUPPLIER) ); - sal_Int32 nFormatKey = aMap.getUnpackedValueOrDefault(PROPERTY_FORMATKEY,sal_Int32(0)); if ( nFormatKey && xInfo->hasPropertyByName(PROPERTY_FORMATKEY) ) xUnoProp->setPropertyValue( PROPERTY_FORMATKEY, uno::makeAny( nFormatKey ) ); @@ -2901,8 +2894,6 @@ ::rtl::OUString sUrl = aMap.getUnpackedValueOrDefault(PROPERTY_IMAGEURL,::rtl::OUString()); if ( sUrl.getLength() && xInfo->hasPropertyByName(PROPERTY_IMAGEURL) ) xUnoProp->setPropertyValue( PROPERTY_IMAGEURL, uno::makeAny( sUrl ) ); - if ( xInfo->hasPropertyByName(PROPERTY_BACKGROUNDCOLOR) ) - xUnoProp->setPropertyValue(PROPERTY_BACKGROUNDCOLOR,xShapeProp->getPropertyValue(PROPERTY_CONTROLBACKGROUND)); pObj->CreateMediator(sal_True); @@ -3170,11 +3161,19 @@ uno::Reference< report::XReportComponent> xShapeProp(pObjs[i]->getUnoShape(),uno::UNO_QUERY_THROW); xUnoProp->setPropertyValue(PROPERTY_NAME,xShapeProp->getPropertyValue(PROPERTY_NAME)); + uno::Reference<beans::XPropertySetInfo> xShapeInfo = xShapeProp->getPropertySetInfo(); uno::Reference<beans::XPropertySetInfo> xInfo = xUnoProp->getPropertySetInfo(); - if ( xInfo->hasPropertyByName(PROPERTY_FONTDESCRIPTOR) ) - xUnoProp->setPropertyValue(PROPERTY_FONTDESCRIPTOR,xShapeProp->getPropertyValue(PROPERTY_FONTDESCRIPTOR)); - if ( xInfo->hasPropertyByName(PROPERTY_BORDER) ) - xUnoProp->setPropertyValue(PROPERTY_BORDER,xShapeProp->getPropertyValue(PROPERTY_CONTROLBORDER)); + const ::rtl::OUString sProps[] = { PROPERTY_FONTDESCRIPTOR + ,PROPERTY_FONTDESCRIPTORASIAN + ,PROPERTY_FONTDESCRIPTORCOMPLEX + ,PROPERTY_BORDER + ,PROPERTY_BACKGROUNDCOLOR + }; + for(size_t k = 0; k < sizeof(sProps)/sizeof(sProps[0]);++k) + { + if ( xInfo->hasPropertyByName(sProps[k]) && xShapeInfo->hasPropertyByName(sProps[k]) ) + xUnoProp->setPropertyValue(sProps[k],xShapeProp->getPropertyValue(sProps[k])); + } if ( xInfo->hasPropertyByName(PROPERTY_DATAFIELD) ) { ::rtl::OUString sName; @@ -3185,8 +3184,6 @@ ReportFormula aFormula( ReportFormula::Field, sName ); xUnoProp->setPropertyValue( PROPERTY_DATAFIELD, uno::makeAny( aFormula.getCompleteFormula() ) ); } - if ( xInfo->hasPropertyByName(PROPERTY_BACKGROUNDCOLOR) ) - xUnoProp->setPropertyValue(PROPERTY_BACKGROUNDCOLOR,xShapeProp->getPropertyValue(PROPERTY_CONTROLBACKGROUND)); pObjs[i]->CreateMediator(sal_True); // need SectionView from the above or follow Section @@ -3758,4 +3755,3 @@ _rState.bChecked = m_pMyOwnView->GetInsertObj() == OBJ_CUSTOMSHAPE && sShapeType.compareToAscii(_pCustomShapeType) == 0; } // ----------------------------------------------------------------------------- - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
