summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
diff options
context:
space:
mode:
authorSascha Ballach <sab@openoffice.org>2000-12-13 16:17:33 +0000
committerSascha Ballach <sab@openoffice.org>2000-12-13 16:17:33 +0000
commit0c3782dc0396178ed1954e83eb5569bbe17610a4 (patch)
treedd23ea260d4728fc3b2f38efcfe8f0be169b15c5 /sc/source/filter/xml/XMLTableShapeImportHelper.cxx
parent20a6af13d9d9f4f7c1a5e1a2165c0c8493ea28a5 (diff)
#81841#; the size of the shape is now set after read the complete table
Diffstat (limited to 'sc/source/filter/xml/XMLTableShapeImportHelper.cxx')
-rw-r--r--sc/source/filter/xml/XMLTableShapeImportHelper.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
index 3e08e999bf06..c132ee6ab7e0 100644
--- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
+++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTableShapeImportHelper.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: sab $ $Date: 2000-11-28 16:18:57 $
+ * last change: $Author: sab $ $Date: 2000-12-13 17:17:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -126,6 +126,7 @@ void XMLTableShapeImportHelper::finishShape(
sal_Int32 X(-1);
sal_Int32 Y(-1);
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ table::CellAddress aAddress;
for( sal_Int16 i=0; i < nAttrCount; i++ )
{
const rtl::OUString& rAttrName = xAttrList->getNameByIndex( i );
@@ -137,7 +138,6 @@ void XMLTableShapeImportHelper::finishShape(
&aLocalName );
if (nPrefix = XML_NAMESPACE_TABLE && aLocalName.compareToAscii(sXML_end_cell_address) == 0)
{
- table::CellAddress aAddress;
ScXMLConverter::GetAddressFromString(aAddress, rValue, rImport.GetDocument());
pRect = new Rectangle(rImport.GetDocument()->GetMMRect( aAddress.Column, aAddress.Row, aAddress.Column, aAddress.Row, aAddress.Sheet ));
}
@@ -149,16 +149,17 @@ void XMLTableShapeImportHelper::finishShape(
if (X >= 0 && Y >= 0 && pRect)
{
X += pRect->Left();
- Y += pRect->Top();
+ //Y += pRect->Top();
awt::Point aPoint = rShape->getPosition();
awt::Size aSize = rShape->getSize();
aPoint.X += aRefPoint.X;
- aPoint.Y += aRefPoint.Y;
+ //aPoint.Y += aRefPoint.Y;
aSize.Width = X - aPoint.X;
- aSize.Height = Y - aPoint.Y;
+ //aSize.Height = Y - aPoint.Y;
rShape->setPosition(aPoint);
rShape->setSize(aSize);
delete pRect;
+ rImport.GetTables().AddShape(rShape, aAddress, Y);
}
SvxShape* pShapeImp = SvxShape::getImplementation(rShape);
if (pShapeImp)