sheetdatacontext.cxx (ca5ec200) | sheetdatacontext.cxx (f4ffe9ae) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 89 unchanged lines hidden (view full) --- 98// ============================================================================ 99 100SheetDataContextBase::SheetDataContextBase( const WorksheetHelper& rHelper ) : 101 mrAddressConv( rHelper.getAddressConverter() ), 102 mrFormulaParser( rHelper.getFormulaParser() ), 103 mrSheetData( rHelper.getSheetData() ), 104 mnSheet( rHelper.getSheetIndex() ) 105{ | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 89 unchanged lines hidden (view full) --- 98// ============================================================================ 99 100SheetDataContextBase::SheetDataContextBase( const WorksheetHelper& rHelper ) : 101 mrAddressConv( rHelper.getAddressConverter() ), 102 mrFormulaParser( rHelper.getFormulaParser() ), 103 mrSheetData( rHelper.getSheetData() ), 104 mnSheet( rHelper.getSheetIndex() ) 105{ |
106 maLastCellAddress.Sheet = rHelper.getSheetIndex(); 107 maLastCellAddress.Row = SAL_MAX_UINT32; // wraps around to 0 when incremented |
|
106} 107 108SheetDataContextBase::~SheetDataContextBase() 109{ 110} 111 112// ============================================================================ 113 --- 165 unchanged lines hidden (view full) --- 279} 280 281// private -------------------------------------------------------------------- 282 283void SheetDataContext::importRow( const AttributeList& rAttribs ) 284{ 285 RowModel aModel; 286 aModel.mnRow = rAttribs.getInteger( XML_r, -1 ); | 108} 109 110SheetDataContextBase::~SheetDataContextBase() 111{ 112} 113 114// ============================================================================ 115 --- 165 unchanged lines hidden (view full) --- 281} 282 283// private -------------------------------------------------------------------- 284 285void SheetDataContext::importRow( const AttributeList& rAttribs ) 286{ 287 RowModel aModel; 288 aModel.mnRow = rAttribs.getInteger( XML_r, -1 ); |
289 if ( aModel.mnRow == -1 ) 290 aModel.mnRow = ++maLastCellAddress.Row; 291 else 292 maLastCellAddress.Row = aModel.mnRow - 1; 293 maLastCellAddress.Column = SAL_MAX_UINT32; // wraps around to 0 when incremented |
|
287 aModel.mfHeight = rAttribs.getDouble( XML_ht, -1.0 ); 288 aModel.mnXfId = rAttribs.getInteger( XML_s, -1 ); 289 aModel.mnLevel = rAttribs.getInteger( XML_outlineLevel, 0 ); 290 aModel.mbCustomHeight = rAttribs.getBool( XML_customHeight, false ); 291 aModel.mbCustomFormat = rAttribs.getBool( XML_customFormat, false ); 292 aModel.mbShowPhonetic = rAttribs.getBool( XML_ph, false ); 293 aModel.mbHidden = rAttribs.getBool( XML_hidden, false ); 294 aModel.mbCollapsed = rAttribs.getBool( XML_collapsed, false ); --- 17 unchanged lines hidden (view full) --- 312 } 313 314 // set row properties in the current sheet 315 setRowModel( aModel ); 316} 317 318bool SheetDataContext::importCell( const AttributeList& rAttribs ) 319{ | 294 aModel.mfHeight = rAttribs.getDouble( XML_ht, -1.0 ); 295 aModel.mnXfId = rAttribs.getInteger( XML_s, -1 ); 296 aModel.mnLevel = rAttribs.getInteger( XML_outlineLevel, 0 ); 297 aModel.mbCustomHeight = rAttribs.getBool( XML_customHeight, false ); 298 aModel.mbCustomFormat = rAttribs.getBool( XML_customFormat, false ); 299 aModel.mbShowPhonetic = rAttribs.getBool( XML_ph, false ); 300 aModel.mbHidden = rAttribs.getBool( XML_hidden, false ); 301 aModel.mbCollapsed = rAttribs.getBool( XML_collapsed, false ); --- 17 unchanged lines hidden (view full) --- 319 } 320 321 // set row properties in the current sheet 322 setRowModel( aModel ); 323} 324 325bool SheetDataContext::importCell( const AttributeList& rAttribs ) 326{ |
320 bool bValidAddr = mrAddressConv.convertToCellAddress( maCellData.maCellAddr, rAttribs.getString( XML_r, OUString() ), mnSheet, true ); | 327 OUString r = rAttribs.getString( XML_r, OUString() ); 328 bool bValidAddr; 329 if ( r.getLength() > 0 ) 330 bValidAddr = mrAddressConv.convertToCellAddress( maCellData.maCellAddr, rAttribs.getString( XML_r, OUString() ), mnSheet, true ); 331 else 332 { 333 maCellData.maCellAddr.Column = ++maLastCellAddress.Column; 334 maCellData.maCellAddr.Row = maLastCellAddress.Row; 335 maCellData.maCellAddr.Sheet = maLastCellAddress.Sheet; 336 bValidAddr = true; 337 } |
321 if( bValidAddr ) 322 { | 338 if( bValidAddr ) 339 { |
340 maLastCellAddress.Column = maCellData.maCellAddr.Column; 341 maLastCellAddress.Row = maCellData.maCellAddr.Row; 342 maLastCellAddress.Sheet = maCellData.maCellAddr.Sheet; |
|
323 maCellData.mnCellType = rAttribs.getToken( XML_t, XML_n ); 324 maCellData.mnXfId = rAttribs.getInteger( XML_s, -1 ); 325 maCellData.mbShowPhonetic = rAttribs.getBool( XML_ph, false ); 326 327 // reset cell value, formula settings, and inline string 328 maCellValue = OUString(); 329 mxInlineStr.reset(); 330 mbHasFormula = false; --- 662 unchanged lines hidden --- | 343 maCellData.mnCellType = rAttribs.getToken( XML_t, XML_n ); 344 maCellData.mnXfId = rAttribs.getInteger( XML_s, -1 ); 345 maCellData.mbShowPhonetic = rAttribs.getBool( XML_ph, false ); 346 347 // reset cell value, formula settings, and inline string 348 maCellValue = OUString(); 349 mxInlineStr.reset(); 350 mbHasFormula = false; --- 662 unchanged lines hidden --- |