[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - sc/source

Markus Mohrhard markus.mohrhard at googlemail.com
Sun Jun 2 19:35:11 PDT 2013


 sc/source/filter/xml/xmlrowi.cxx |    8 +++++---
 sc/source/filter/xml/xmlrowi.hxx |    2 +-
 sc/source/filter/xml/xmltabi.cxx |    6 +++---
 3 files changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 3c332c935e3531ca58fafebe79f7f99cf9d16a72
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Jun 3 04:21:13 2013 +0200

    the print range can start in row 0, fdo#62938
    
    Change-Id: I8569e4e120a6fd2b626db0bdaadf5d9234d09a36

diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index 3fa6142..bbe2c92 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -218,7 +218,7 @@ ScXMLTableRowsContext::ScXMLTableRowsContext( ScXMLImport& rImport,
                                       const OUString& rLName,
                                       const ::com::sun::star::uno::Reference<
                                       ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
-                                      const bool bTempHeader, const bool bTempGroup ) :
+                                      const bool bTempHeader, const bool bTempGroup, bool bFirstRow ) :
     SvXMLImportContext( rImport, nPrfx, rLName ),
     nHeaderStartRow(0),
     nHeaderEndRow(0),
@@ -232,12 +232,14 @@ ScXMLTableRowsContext::ScXMLTableRowsContext( ScXMLImport& rImport,
     if (bHeader)
     {
         nHeaderStartRow = rImport.GetTables().GetCurrentRow();
-        ++nHeaderStartRow;
+        if(!bFirstRow)
+            ++nHeaderStartRow;
     }
     else if (bGroup)
     {
         nGroupStartRow = rImport.GetTables().GetCurrentRow();
-        ++nGroupStartRow;
+        if(!bFirstRow)
+            ++nGroupStartRow;
         sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
         for( sal_Int16 i=0; i < nAttrCount; ++i )
         {
diff --git a/sc/source/filter/xml/xmlrowi.hxx b/sc/source/filter/xml/xmlrowi.hxx
index c24a103..1651287 100644
--- a/sc/source/filter/xml/xmlrowi.hxx
+++ b/sc/source/filter/xml/xmlrowi.hxx
@@ -70,7 +70,7 @@ public:
                        const OUString& rLName,
                        const ::com::sun::star::uno::Reference<
                                         ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
-                       const bool bHeader, const bool bGroup);
+                       const bool bHeader, const bool bGroup, bool bFirstRow = false);
 
     virtual ~ScXMLTableRowsContext();
 
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index a7f014c..d33cf22 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -291,17 +291,17 @@ SvXMLImportContext *ScXMLTableContext::CreateChildContext( sal_uInt16 nPrefix,
     case XML_TOK_TABLE_ROW_GROUP:
         pContext = new ScXMLTableRowsContext( GetScImport(), nPrefix,
                                                    rLName, xAttrList,
-                                                   false, true );
+                                                   false, true, true );
         break;
     case XML_TOK_TABLE_HEADER_ROWS:
         pContext = new ScXMLTableRowsContext( GetScImport(), nPrefix,
                                                    rLName, xAttrList,
-                                                   true, false );
+                                                   true, false, true );
         break;
     case XML_TOK_TABLE_ROWS:
         pContext = new ScXMLTableRowsContext( GetScImport(), nPrefix,
                                                    rLName, xAttrList,
-                                                   false, false );
+                                                   false, false, true );
         break;
     case XML_TOK_TABLE_ROW:
             pContext = new ScXMLTableRowContext( GetScImport(), nPrefix,


More information about the Libreoffice-commits mailing list