Tag: cws_src680_reportdesign01 User: oj Date: 2007-10-15 06:06:11+0000 Modified: dba/reportdesign/source/filter/xml/xmlTable.cxx
Log: #i77142# check line size File Changes: Directory: /dba/reportdesign/source/filter/xml/ =============================================== File [changed]: xmlTable.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/filter/xml/xmlTable.cxx?r1=1.3&r2=1.3.18.1 Delta lines: +17 -8 -------------------- --- xmlTable.cxx 2007-08-03 09:58:22+0000 1.3 +++ xmlTable.cxx 2007-10-15 06:06:07+0000 1.3.18.1 @@ -4,9 +4,9 @@ * * $RCSfile: xmlTable.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.3.18.1 $ * - * last change: $Author: hr $ $Date: 2007/08/03 09:58:22 $ + * last change: $Author: oj $ $Date: 2007/10/15 06:06:07 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -86,6 +86,9 @@ #include <com/sun/star/report/XShape.hpp> #include <com/sun/star/report/XFixedLine.hpp> +#define MIN_WIDTH 80 +#define MIN_HEIGHT 20 + namespace rptxml { using namespace ::rtl; @@ -286,11 +289,17 @@ } } Reference<XFixedLine> xFixedLine(*aCellIter,uno::UNO_QUERY); - if ( xFixedLine.is() && xFixedLine->getOrientation() == 1 ) // vertical + if ( xFixedLine.is() ) + { + if ( 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."); nWidth += m_aWidth[j+1]; - + if ( nWidth < MIN_WIDTH ) + nWidth = MIN_WIDTH; + } + else if ( nHeight < MIN_HEIGHT ) + nHeight = MIN_HEIGHT; } try { @@ -299,7 +308,7 @@ } catch(beans::PropertyVetoException) { - OSL_ENSURE(0,"Could set the correct positions!"); + OSL_ENSURE(0,"Could not set the correct position or size!"); } } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
