[Libreoffice-commits] core.git: 2 commits - liborcus/ExternalProject_liborcus.mk sc/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Wed May 29 13:08:39 PDT 2013
liborcus/ExternalProject_liborcus.mk | 2 -
sc/source/filter/inc/sheetdatacontext.hxx | 3 ++
sc/source/filter/oox/sheetdatacontext.cxx | 31 +++++++++++++++++++++++++-----
3 files changed, 30 insertions(+), 6 deletions(-)
New commits:
commit 70b36c6ab0414423f573bb8e5c1ee9ff0579821b
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed May 29 22:01:02 2013 +0200
enable-debug for orcus based on ENABLE_DEBUG
Change-Id: I8f677bc57ab3c70e60f7708cc020526d4bb71043
diff --git a/liborcus/ExternalProject_liborcus.mk b/liborcus/ExternalProject_liborcus.mk
index a65ae39..43b4621 100644
--- a/liborcus/ExternalProject_liborcus.mk
+++ b/liborcus/ExternalProject_liborcus.mk
@@ -88,7 +88,7 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) :
--with-pic \
--enable-static \
--disable-shared \
- --disable-debug \
+ $(if $(filter TRUE,$(ENABLE_DEBUG)),--enable-debug,--disable-debug) \
--disable-spreadsheet-model \
--disable-werror \
$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
commit af8e6f4f544ecd01d3eda5f38bbd4779d5e8b2c6
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed May 29 21:58:29 2013 +0200
r is an optional attribute in c and r, fdo#65059
Change-Id: Ic954cc5692ddc899f8a6fa99466bc0c8a83da352
diff --git a/sc/source/filter/inc/sheetdatacontext.hxx b/sc/source/filter/inc/sheetdatacontext.hxx
index 9054f5b..b492d2a 100644
--- a/sc/source/filter/inc/sheetdatacontext.hxx
+++ b/sc/source/filter/inc/sheetdatacontext.hxx
@@ -117,6 +117,9 @@ private:
BinAddress maCurrPos; /// Current cell position (BIFF12 only).
bool mbHasFormula; /// True = current cell has formula data (OOXML only).
bool mbValidRange; /// True = maFmlaData.maFormulaRef is valid (OOXML only).
+
+ sal_Int32 mnRow;
+ sal_Int32 mnCol;
};
// ============================================================================
diff --git a/sc/source/filter/oox/sheetdatacontext.cxx b/sc/source/filter/oox/sheetdatacontext.cxx
index 5403bc4..e1efe16 100644
--- a/sc/source/filter/oox/sheetdatacontext.cxx
+++ b/sc/source/filter/oox/sheetdatacontext.cxx
@@ -110,7 +110,9 @@ SheetDataContext::SheetDataContext( WorksheetFragmentBase& rFragment ) :
WorksheetContextBase( rFragment ),
SheetDataContextBase( rFragment ),
mbHasFormula( false ),
- mbValidRange( false )
+ mbValidRange( false ),
+ mnRow( -1 ),
+ mnCol( -1 )
{
}
@@ -293,7 +295,13 @@ ContextHandlerRef SheetDataContext::onCreateRecordContext( sal_Int32 nRecId, Seq
void SheetDataContext::importRow( const AttributeList& rAttribs )
{
RowModel aModel;
- aModel.mnRow = rAttribs.getInteger( XML_r, -1 );
+ sal_Int32 nRow = rAttribs.getInteger( XML_r, -1 );
+ if(nRow != -1)
+ aModel.mnRow = nRow;
+ else
+ aModel.mnRow = ++mnRow;
+ mnCol = -1;
+
aModel.mfHeight = rAttribs.getDouble( XML_ht, -1.0 );
aModel.mnXfId = rAttribs.getInteger( XML_s, -1 );
aModel.mnLevel = rAttribs.getInteger( XML_outlineLevel, 0 );
@@ -327,8 +335,21 @@ void SheetDataContext::importRow( const AttributeList& rAttribs )
bool SheetDataContext::importCell( const AttributeList& rAttribs )
{
- bool bValidAddr = mrAddressConv.convertToCellAddress( maCellData.maCellAddr, rAttribs.getString( XML_r, OUString() ), mnSheet, true );
- if( bValidAddr )
+ OUString aCellAddrStr = rAttribs.getString( XML_r, OUString() );
+ bool bValid = true;
+ if(aCellAddrStr.isEmpty())
+ {
+ ++mnCol;
+ maCellData.maCellAddr = CellAddress( mnSheet, mnCol, mnRow );
+ }
+ else
+ {
+ bValid = mrAddressConv.convertToCellAddress( maCellData.maCellAddr, aCellAddrStr, mnSheet, true );
+
+ mnCol = maCellData.maCellAddr.Column;
+ }
+
+ if( bValid )
{
maCellData.mnCellType = rAttribs.getToken( XML_t, XML_n );
maCellData.mnXfId = rAttribs.getInteger( XML_s, -1 );
@@ -342,7 +363,7 @@ bool SheetDataContext::importCell( const AttributeList& rAttribs )
// update used area of the sheet
extendUsedArea( maCellData.maCellAddr );
}
- return bValidAddr;
+ return bValid;
}
void SheetDataContext::importFormula( const AttributeList& rAttribs )
More information about the Libreoffice-commits
mailing list