Tag: cws_src680_rpt23fix02 User: oj Date: 2007-07-24 08:32:46+0000 Modified: dba/reportdesign/source/filter/xml/xmlCell.cxx dba/reportdesign/source/filter/xml/xmlTable.cxx dba/reportdesign/source/filter/xml/xmlTable.hxx
Log: #i79942# handle shapes correctly File Changes: Directory: /dba/reportdesign/source/filter/xml/ =============================================== File [changed]: xmlCell.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/filter/xml/xmlCell.cxx?r1=1.2&r2=1.2.4.1 Delta lines: +4 -4 ------------------- --- xmlCell.cxx 2007-07-09 11:56:17+0000 1.2 +++ xmlCell.cxx 2007-07-24 08:32:44+0000 1.2.4.1 @@ -4,9 +4,9 @@ * * $RCSfile: xmlCell.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.2.4.1 $ * - * last change: $Author: rt $ $Date: 2007/07/09 11:56:17 $ + * last change: $Author: oj $ $Date: 2007/07/24 08:32:44 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -233,7 +233,7 @@ break; } - if ( m_xComponent.is() ) + if ( m_xComponent.is() && !m_bShape ) m_pContainer->addCell(m_xComponent); if( !pContext ) @@ -248,7 +248,7 @@ { m_xComponent.set(m_pContainer->getSection()->getByIndex(m_pContainer->getSection()->getCount()-1),uno::UNO_QUERY); m_pContainer->addCell(m_xComponent); - m_pCell->setComponent(m_xComponent); + //m_pCell->setComponent(m_xComponent); } else if ( m_pCell != this && m_sText.getLength() ) { File [changed]: xmlTable.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/filter/xml/xmlTable.cxx?r1=1.2&r2=1.2.4.1 Delta lines: +48 -42 --------------------- --- xmlTable.cxx 2007-07-09 11:56:18+0000 1.2 +++ xmlTable.cxx 2007-07-24 08:32:44+0000 1.2.4.1 @@ -4,9 +4,9 @@ * * $RCSfile: xmlTable.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.2.4.1 $ * - * last change: $Author: rt $ $Date: 2007/07/09 11:56:18 $ + * last change: $Author: oj $ $Date: 2007/07/24 08:32:44 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -251,9 +251,13 @@ for (sal_Int32 j = 0; aColIter != aColEnd; ++aColIter,++j) { TCell& rCell = *aColIter; - if ( rCell.xElement.is()) + if ( !rCell.xElements.empty()) { - uno::Reference<report::XShape> xShape(rCell.xElement,uno::UNO_QUERY); + ::std::vector< uno::Reference< report::XReportComponent> >::iterator aIter = rCell.xElements.begin(); + const ::std::vector< uno::Reference< report::XReportComponent> >::iterator aEnd = rCell.xElements.end(); + for (;aIter != aEnd ; ++aIter) + { + uno::Reference<report::XShape> xShape(*aIter,uno::UNO_QUERY); if ( xShape.is() ) { xShape->setPositionX(xShape->getPositionX() + nLeftMargin); @@ -283,7 +287,7 @@ --nRowSpan; } } - Reference<XFixedLine> xFixedLine(rCell.xElement,uno::UNO_QUERY); + Reference<XFixedLine> xFixedLine(*aIter,uno::UNO_QUERY); if ( xFixedLine.is() && xFixedLine->getOrientation() == 1 ) // vertical { OSL_ENSURE(static_cast<sal_uInt32>(j+1) < m_aWidth.size(),"Illegal pos of col iter. There should be an empty cell for the next line part."); @@ -292,8 +296,8 @@ } try { - rCell.xElement->setSize(awt::Size(nWidth,nHeight)); - rCell.xElement->setPosition(awt::Point(nPosX,nPosY)); + (*aIter)->setSize(awt::Size(nWidth,nHeight)); + (*aIter)->setPosition(awt::Point(nPosX,nPosY)); } catch(beans::PropertyVetoException) { @@ -301,6 +305,7 @@ } } } + } nPosX += m_aWidth[j]; } nPosY += m_aHeight[i]; @@ -320,7 +325,8 @@ if ( static_cast<sal_uInt32>(m_nRowIndex-1 ) < m_aGrid.size() && static_cast<sal_uInt32>( m_nColumnIndex-1 ) < m_aGrid[m_nRowIndex-1].size() ) { TCell& rCell = m_aGrid[m_nRowIndex-1][m_nColumnIndex-1]; - rCell.xElement = _xElement; + if ( _xElement.is() ) + rCell.xElements.push_back( _xElement ); rCell.nWidth = m_aWidth[m_nColumnIndex-1]; rCell.nHeight = m_aHeight[m_nRowIndex-1]; rCell.nColSpan = m_nColSpan; File [changed]: xmlTable.hxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/filter/xml/xmlTable.hxx?r1=1.2&r2=1.2.4.1 Delta lines: +3 -3 ------------------- --- xmlTable.hxx 2007-07-09 11:56:18+0000 1.2 +++ xmlTable.hxx 2007-07-24 08:32:44+0000 1.2.4.1 @@ -6,9 +6,9 @@ * * $RCSfile: xmlTable.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.2.4.1 $ * - * last change: $Author: rt $ $Date: 2007/07/09 11:56:18 $ + * last change: $Author: oj $ $Date: 2007/07/24 08:32:44 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -55,7 +55,7 @@ sal_Int32 nHeight; sal_Int32 nColSpan; sal_Int32 nRowSpan; - ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent> xElement; + ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent> > xElements; TCell() : nWidth(0),nHeight(0),nColSpan(1),nRowSpan(1){} }; private: --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
