summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/xml/XMLTableShapeImportHelper.cxx9
-rw-r--r--sc/source/filter/xml/XMLTableShapeResizer.cxx23
-rw-r--r--sc/source/filter/xml/XMLTableShapeResizer.hxx6
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx12
-rw-r--r--sc/source/filter/xml/xmlsubti.cxx8
-rw-r--r--sc/source/filter/xml/xmlsubti.hxx5
6 files changed, 36 insertions, 27 deletions
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
index 3502b765ae1f..07216b0518a1 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.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: sab $ $Date: 2001-09-25 10:37:31 $
+ * last change: $Author: sab $ $Date: 2001-11-01 18:55:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -128,7 +128,6 @@ void XMLTableShapeImportHelper::finishShape(
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
table::CellAddress aEndCell;
rtl::OUString* pRangeList = NULL;
- rtl::OUString sOleName;
for( sal_Int16 i=0; i < nAttrCount; i++ )
{
const rtl::OUString& rAttrName = xAttrList->getNameByIndex( i );
@@ -157,8 +156,6 @@ void XMLTableShapeImportHelper::finishShape(
{
if (IsXMLToken(aLocalName, XML_NOTIFY_ON_UPDATE_OF_RANGES))
pRangeList = new rtl::OUString(rValue);
- else if (IsXMLToken(aLocalName, XML_NAME))
- sOleName = rValue;
}
}
if (bBackground)
@@ -176,7 +173,7 @@ void XMLTableShapeImportHelper::finishShape(
if (!bOnTable)
{
static_cast<ScXMLImport&>(mrImporter).GetTables().AddShape(rShape,
- sOleName, pRangeList, aStartCell, aEndCell, nEndX, nEndY);
+ pRangeList, aStartCell, aEndCell, nEndX, nEndY);
SvxShape* pShapeImp = SvxShape::getImplementation(rShape);
if (pShapeImp)
{
diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx
index 4e03cff07259..7d6048ad50b6 100644
--- a/sc/source/filter/xml/XMLTableShapeResizer.cxx
+++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTableShapeResizer.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: sab $ $Date: 2001-09-25 10:37:31 $
+ * last change: $Author: sab $ $Date: 2001-11-01 18:55:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -144,13 +144,12 @@ void ScMyShapeResizer::CreateChartListener(ScDocument* pDoc,
}
void ScMyShapeResizer::AddShape(uno::Reference <drawing::XShape>& rShape,
- const rtl::OUString& rName, rtl::OUString* pRangeList,
+ rtl::OUString* pRangeList,
table::CellAddress& rStartAddress, table::CellAddress& rEndAddress,
sal_Int32 nEndX, sal_Int32 nEndY)
{
ScMyToResizeShape aShape;
aShape.xShape = rShape;
- aShape.sName = rName;
aShape.pRangeList = pRangeList;
aShape.aEndCell = rEndAddress;
aShape.aStartCell = rStartAddress;
@@ -164,6 +163,7 @@ void ScMyShapeResizer::ResizeShapes()
if (!aShapes.empty() && rImport.GetModel().is())
{
rtl::OUString sRowHeight(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CELLHGT));
+ rtl::OUString sPersistName (RTL_CONSTASCII_USTRINGPARAM("PersistName"));
uno::Reference<table::XCellRange> xTableRow;
uno::Reference<sheet::XSpreadsheet> xSheet;
uno::Reference<table::XTableRows> xTableRows;
@@ -256,7 +256,20 @@ void ScMyShapeResizer::ResizeShapes()
else
DBG_ERROR("something wents wrong");
if (IsOLE(aItr->xShape))
- CreateChartListener(pDoc, aItr->sName, aItr->pRangeList);
+ {
+ uno::Reference < beans::XPropertySet > xShapeProps ( aItr->xShape, uno::UNO_QUERY );
+ uno::Reference < beans::XPropertySetInfo > xShapeInfo = xShapeProps->getPropertySetInfo();
+ if (xShapeProps.is() && xShapeInfo.is())
+ {
+ if (xShapeInfo->hasPropertyByName(sPersistName))
+ {
+ uno::Any aAny = xShapeProps->getPropertyValue(sPersistName);
+ rtl::OUString sName;
+ if (aAny >>= sName)
+ CreateChartListener(pDoc, sName, aItr->pRangeList);
+ }
+ }
+ }
if (aItr->pRangeList)
delete aItr->pRangeList;
aItr = aShapes.erase(aItr);
diff --git a/sc/source/filter/xml/XMLTableShapeResizer.hxx b/sc/source/filter/xml/XMLTableShapeResizer.hxx
index 8661d3d93139..02d3f8f308d3 100644
--- a/sc/source/filter/xml/XMLTableShapeResizer.hxx
+++ b/sc/source/filter/xml/XMLTableShapeResizer.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTableShapeResizer.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: sab $ $Date: 2001-07-31 15:41:15 $
+ * last change: $Author: sab $ $Date: 2001-11-01 18:55:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -82,7 +82,6 @@ class ScDocument;
struct ScMyToResizeShape
{
com::sun::star::uno::Reference <com::sun::star::drawing::XShape> xShape;
- rtl::OUString sName;
rtl::OUString* pRangeList;
com::sun::star::table::CellAddress aEndCell;
com::sun::star::table::CellAddress aStartCell;
@@ -109,7 +108,6 @@ public:
~ScMyShapeResizer();
void AddShape(com::sun::star::uno::Reference <com::sun::star::drawing::XShape>& rShape,
- const rtl::OUString& rName,
rtl::OUString* pRangeList,
com::sun::star::table::CellAddress& rStartAddress,
com::sun::star::table::CellAddress& rEndAddress,
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 3847cbb0a64f..d5ac26d06e96 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlexprt.cxx,v $
*
- * $Revision: 1.146 $
+ * $Revision: 1.147 $
*
- * last change: $Author: sab $ $Date: 2001-10-29 16:07:01 $
+ * last change: $Author: sab $ $Date: 2001-11-01 18:55:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1506,7 +1506,7 @@ void ScXMLExport::_ExportContent()
void ScXMLExport::_ExportStyles( sal_Bool bUsed )
{
- SvXMLExport::_ExportStyles(bUsed);
+// SvXMLExport::_ExportStyles(bUsed);
if (!pSharedData)
{
sal_Int32 nTableCount(0);
@@ -2339,6 +2339,7 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
uno::Reference < beans::XPropertySet > xShapeProps ( xShape, uno::UNO_QUERY );
sal_Bool bMemChart(sal_False);
rtl::OUString sPropCLSID (RTL_CONSTASCII_USTRINGPARAM("CLSID"));
+ rtl::OUString sPersistName (RTL_CONSTASCII_USTRINGPARAM("PersistName"));
if (xShapeProps.is())
{
uno::Any aAny = xShapeProps->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ZOrder")));
@@ -2358,8 +2359,9 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
{
if ( sCLSID.equalsIgnoreAsciiCase(GetChartExport()->getChartCLSID()) )
{
- uno::Reference < container::XNamed > xNamed (xShape, uno::UNO_QUERY );
- rtl::OUString sOUName ( xNamed->getName() );
+ aAny = xShapeProps->getPropertyValue(sPersistName);
+ rtl::OUString sOUName;
+ aAny >>= sOUName;
String sName(sOUName);
if (!pChartListener)
{
diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx
index cbdb8c5d7c71..2ba0de243b4a 100644
--- a/sc/source/filter/xml/xmlsubti.cxx
+++ b/sc/source/filter/xml/xmlsubti.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlsubti.cxx,v $
*
- * $Revision: 1.31 $
+ * $Revision: 1.32 $
*
- * last change: $Author: sab $ $Date: 2001-10-08 08:06:19 $
+ * last change: $Author: sab $ $Date: 2001-11-01 18:55:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -788,9 +788,9 @@ sal_Bool ScMyTables::HasXShapes()
}
void ScMyTables::AddShape(uno::Reference <drawing::XShape>& rShape,
- const rtl::OUString& rName, rtl::OUString* pRangeList,
+ rtl::OUString* pRangeList,
table::CellAddress& rStartAddress, table::CellAddress& rEndAddress,
sal_Int32 nEndX, sal_Int32 nEndY)
{
- aResizeShapes.AddShape(rShape, rName, pRangeList, rStartAddress, rEndAddress, nEndX, nEndY);
+ aResizeShapes.AddShape(rShape, pRangeList, rStartAddress, rEndAddress, nEndX, nEndY);
}
diff --git a/sc/source/filter/xml/xmlsubti.hxx b/sc/source/filter/xml/xmlsubti.hxx
index f603a9ff2f53..98db7afcfa7a 100644
--- a/sc/source/filter/xml/xmlsubti.hxx
+++ b/sc/source/filter/xml/xmlsubti.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlsubti.hxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: sab $ $Date: 2001-09-13 15:15:15 $
+ * last change: $Author: sab $ $Date: 2001-11-01 18:55:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -209,7 +209,6 @@ public:
sal_Bool HasDrawPage();
sal_Bool HasXShapes();
void AddShape(com::sun::star::uno::Reference <com::sun::star::drawing::XShape>& rShape,
- const rtl::OUString& rName,
rtl::OUString* pRangeList,
com::sun::star::table::CellAddress& rStartAddress,
com::sun::star::table::CellAddress& rEndAddress,