[PATCH libreoffice-4-0] the print range can start in row 0, fdo#62938
Markus Mohrhard (via Code Review)
gerrit at gerrit.libreoffice.org
Sun Jun 2 19:35:40 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/4138
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/38/4138/1
the print range can start in row 0, fdo#62938
Change-Id: I8569e4e120a6fd2b626db0bdaadf5d9234d09a36
---
M sc/source/filter/xml/xmlrowi.cxx
M sc/source/filter/xml/xmlrowi.hxx
M sc/source/filter/xml/xmltabi.cxx
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx
index ec4c5a5..e27abea 100644
--- a/sc/source/filter/xml/xmlrowi.cxx
+++ b/sc/source/filter/xml/xmlrowi.cxx
@@ -218,7 +218,7 @@
const ::rtl::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 @@
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 a900ff7..fc90639 100644
--- a/sc/source/filter/xml/xmlrowi.hxx
+++ b/sc/source/filter/xml/xmlrowi.hxx
@@ -70,7 +70,7 @@
const ::rtl::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 f8dd920..af77d90 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -292,17 +292,17 @@
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,
--
To view, visit https://gerrit.libreoffice.org/4138
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8569e4e120a6fd2b626db0bdaadf5d9234d09a36
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Markus Mohrhard <markus.mohrhard at googlemail.com>
More information about the LibreOffice
mailing list