summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-06-03 04:21:13 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-06-03 04:29:41 +0200
commite1c70f2f046ab6c5bb808666b4f5466902b9fcf8 (patch)
tree2e65be3c925299ad46d721715d67a5143f5b7fd3 /sc/source/filter
parent5f0c969f43538e8a92ed37c27fab228d97b1bebe (diff)
the print range can start in row 0, fdo#62938
Change-Id: I8569e4e120a6fd2b626db0bdaadf5d9234d09a36
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/xml/xmlrowi.cxx8
-rw-r--r--sc/source/filter/xml/xmlrowi.hxx2
-rw-r--r--sc/source/filter/xml/xmltabi.cxx6
3 files changed, 9 insertions, 7 deletions
diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index 3fa6142091b3..bbe2c92cabe7 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 c24a103f9b6e..16512875cabc 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 a7f014cef506..d33cf2288ca2 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,