User: ihi     
Date: 2007-11-20 19:04:20+0000
Modified:
   dba/reportdesign/source/filter/xml/xmlTable.cxx

Log:
 INTEGRATION: CWS reportdesign01 (1.3.18); FILE MERGED
 2007/10/16 06:08:59 oj 1.3.18.3: #i82574# import print condition for section
 2007/10/15 07:51:50 oj 1.3.18.2: RESYNC: (1.3-1.4); FILE MERGED
 2007/10/15 06:06:07 oj 1.3.18.1: #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.4&r2=1.5
Delta lines:  +18 -7
--------------------
--- xmlTable.cxx        2007-09-26 14:24:40+0000        1.4
+++ xmlTable.cxx        2007-11-20 19:04:17+0000        1.5
@@ -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 ::xmloff;
@@ -130,7 +133,7 @@
                    rtl::OUString sLocalName;
                    const rtl::OUString sAttrName = _xAttrList->getNameByIndex( 
i );
                    const sal_uInt16 nPrefix = rMap.GetKeyByAttrName( 
sAttrName,&sLocalName );
-                   rtl::OUString sValue = _xAttrList->getValueByIndex( i );
+                   const rtl::OUString sValue = _xAttrList->getValueByIndex( i 
);
 
                    switch( rTokenMap.Get( nPrefix, sLocalName ) )
                    {
@@ -146,7 +149,6 @@
                            case XML_TOK_KEEP_TOGETHER:
                                    m_xSection->setKeepTogether(sValue == 
s_sTRUE);
                                    break;
-                           
                            case XML_TOK_SECTION_NAME:
                                    m_xSection->setName(sValue);
                                    break;
@@ -195,6 +197,9 @@
             rImport.GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
                        pContext = new OXMLRowColumn( rImport, _nPrefix, 
_rLocalName,xAttrList,this);
                        break;
+        case XML_TOK_CONDITIONAL_PRINT_EXPRESSION:
+                       pContext = new OXMLCondPrtExpr( rImport, _nPrefix, 
_rLocalName,xAttrList,m_xSection.get());
+                       break;
         default:
                 break;
        }
@@ -285,11 +290,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
                                 {
@@ -298,7 +309,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]

Reply via email to