Commits

Anonymous committed 440fcb3

sw34bf04: #i104017#: use MAXTABLECELLS to define maximum number of cells in a table row

Comments (0)

Files changed (3)

sw/source/filter/ww8/WW8TableInfo.cxx

         pWidths = WidthsPtr(new Widths);
         // number of cell written
         sal_uInt32 nBoxes = rTabBoxes.Count();
-        if ( nBoxes > 63 )
-            nBoxes = 63;
+        if ( nBoxes > MAXTABLECELLS )
+            nBoxes = MAXTABLECELLS;
         
         for (sal_uInt32 n = 0; n < nBoxes; n++)
         {
         const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes();
 
         sal_uInt32 nBoxes = rTabBoxes.Count();
-        if (nBoxes > 63)
-            nBoxes = 63;
+        if (nBoxes > MAXTABLECELLS)
+            nBoxes = MAXTABLECELLS;
         
         for (sal_uInt32 n = 0; n < nBoxes; ++n)
         {

sw/source/filter/ww8/WW8TableInfo.hxx

 {
 using namespace ::std;
 
+const unsigned int MAXTABLECELLS = 63;
+
 class WW8TableNodeInfo;
 typedef boost::shared_ptr<SwRect> SwRectPtr; 
 typedef ::std::vector<const SwTableBox *> TableBoxVector;

sw/source/filter/ww8/wrtww8.cxx

         pTableTextNodeInfoInner->getTableBoxesOfRow();
     // number of cell written
     sal_uInt32 nBoxes = pTableBoxes->size();
-    if (nBoxes > 63)
-        nBoxes = 63;
+    if (nBoxes > ww8::MAXTABLECELLS)
+        nBoxes = ww8::MAXTABLECELLS;
     
     // sprm header
     m_rWW8Export.InsUInt16( NS_sprm::LN_TDefTable );