Kaydet (Commit) e1c70f2f authored tarafından Markus Mohrhard's avatar Markus Mohrhard

the print range can start in row 0, fdo#62938

Change-Id: I8569e4e120a6fd2b626db0bdaadf5d9234d09a36
üst 5f0c969f
......@@ -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 )
{
......
......@@ -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();
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment