summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorSascha Ballach <sab@openoffice.org>2001-07-31 14:41:16 +0000
committerSascha Ballach <sab@openoffice.org>2001-07-31 14:41:16 +0000
commit8e5874c8845461a9f7f66476e7d1932d92925ade (patch)
tree12479a8f09b3ed212bd22ddc3e1cdcea080a9599 /sc/source
parentc4f1c31c2e898dbd70b725b6722e4b28ba7fd555 (diff)
#86214#; no longer necessary
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/filter/xml/XMLTableShapeImportHelper.cxx10
-rw-r--r--sc/source/filter/xml/XMLTableShapeResizer.cxx48
-rw-r--r--sc/source/filter/xml/XMLTableShapeResizer.hxx18
-rw-r--r--sc/source/filter/xml/makefile.mk6
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx20
-rw-r--r--sc/source/filter/xml/xmlexprt.hxx5
-rw-r--r--sc/source/filter/xml/xmlsubti.cxx8
-rw-r--r--sc/source/filter/xml/xmlsubti.hxx6
-rw-r--r--sc/source/filter/xml/xmltabi.cxx7
9 files changed, 68 insertions, 60 deletions
diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx
index c067afe6fc89..f4dda86c408c 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.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: sab $ $Date: 2001-07-23 15:24:06 $
+ * last change: $Author: sab $ $Date: 2001-07-31 15:41:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -126,7 +126,7 @@ void XMLTableShapeImportHelper::finishShape(
sal_Int32 nEndY(-1);
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
table::CellAddress aEndCell;
- rtl::OUString sRangeList;
+ rtl::OUString* pRangeList = NULL;
rtl::OUString sOleName;
for( sal_Int16 i=0; i < nAttrCount; i++ )
{
@@ -155,7 +155,7 @@ void XMLTableShapeImportHelper::finishShape(
else if(nPrefix == XML_NAMESPACE_DRAW)
{
if (IsXMLToken(aLocalName, XML_NOTIFY_ON_UPDATE_OF_RANGES))
- sRangeList = rValue;
+ pRangeList = new rtl::OUString(rValue);
else if (IsXMLToken(aLocalName, XML_NAME))
sOleName = rValue;
}
@@ -175,7 +175,7 @@ void XMLTableShapeImportHelper::finishShape(
if (!bOnTable)
{
static_cast<ScXMLImport&>(mrImporter).GetTables().AddShape(rShape,
- sOleName, sRangeList, aStartCell, aEndCell, nEndX, nEndY);
+ sOleName, 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 710343293f57..1011cb2f0bfe 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.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: sab $ $Date: 2001-07-23 15:24:06 $
+ * last change: $Author: sab $ $Date: 2001-07-31 15:41:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -112,36 +112,46 @@ sal_Bool ScMyShapeResizer::IsOLE(uno::Reference< drawing::XShape >& rShape) cons
void ScMyShapeResizer::CreateChartListener(ScDocument* pDoc,
const rtl::OUString& rName,
- const rtl::OUString& rRangeList)
+ const rtl::OUString* pRangeList)
{
- if (pDoc && rRangeList.getLength())
+ if(pDoc)
{
- if (!pCollection)
- pCollection = pDoc->GetChartListenerCollection();//new ScChartListenerCollection(pDoc);
- if (pCollection)
+ if (pRangeList)
{
- ScRangeListRef aRangeListRef = new ScRangeList();
- ScXMLConverter::GetRangeListFromString(*aRangeListRef, rRangeList, pDoc);
- if (aRangeListRef->Count())
+ if (pRangeList->getLength())
{
- ScChartListener* pCL = new ScChartListener(
- rName, pDoc, aRangeListRef );
- pCollection->Insert( pCL );
- pCL->StartListeningTo();
+ if (!pCollection)
+ pCollection = pDoc->GetChartListenerCollection();//new ScChartListenerCollection(pDoc);
+ if (pCollection)
+ {
+ ScRangeListRef aRangeListRef = new ScRangeList();
+ ScXMLConverter::GetRangeListFromString(*aRangeListRef, *pRangeList, pDoc);
+ if (aRangeListRef->Count())
+ {
+ ScChartListener* pCL = new ScChartListener(
+ rName, pDoc, aRangeListRef );
+ pCollection->Insert( pCL );
+ pCL->StartListeningTo();
+ }
+ }
+ }
+ else
+ {
+ pDoc->AddOLEObjectToCollection(rName);
}
}
}
}
void ScMyShapeResizer::AddShape(uno::Reference <drawing::XShape>& rShape,
- const rtl::OUString& rName, const rtl::OUString& rRangeList,
+ const rtl::OUString& rName, rtl::OUString* pRangeList,
table::CellAddress& rStartAddress, table::CellAddress& rEndAddress,
sal_Int32 nEndX, sal_Int32 nEndY)
{
ScMyToResizeShape aShape;
aShape.xShape = rShape;
aShape.sName = rName;
- aShape.sRangeList = rRangeList;
+ aShape.pRangeList = pRangeList;
aShape.aEndCell = rEndAddress;
aShape.aStartCell = rStartAddress;
aShape.nEndY = nEndY;
@@ -151,7 +161,7 @@ void ScMyShapeResizer::AddShape(uno::Reference <drawing::XShape>& rShape,
void ScMyShapeResizer::ResizeShapes()
{
- if (aShapes.size())
+ if (!aShapes.empty())
{
rtl::OUString sRowHeight(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CELLHGT));
uno::Reference<table::XCellRange> xTableRow;
@@ -245,7 +255,9 @@ void ScMyShapeResizer::ResizeShapes()
else
DBG_ERROR("something wents wrong");
if (IsOLE(aItr->xShape))
- CreateChartListener(pDoc, aItr->sName, aItr->sRangeList);
+ CreateChartListener(pDoc, aItr->sName, aItr->pRangeList);
+ if (aItr->pRangeList)
+ delete aItr->pRangeList;
aItr = aShapes.erase(aItr);
}
// if (pCollection)
diff --git a/sc/source/filter/xml/XMLTableShapeResizer.hxx b/sc/source/filter/xml/XMLTableShapeResizer.hxx
index 9e9ccdaaf48a..8661d3d93139 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.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: sab $ $Date: 2001-07-23 15:24:06 $
+ * last change: $Author: sab $ $Date: 2001-07-31 15:41:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,8 +71,8 @@
#ifndef _COM_SUN_STAR_SHEET_XSPREADSHEET_HPP_
#include <com/sun/star/sheet/XSpreadsheet.hpp>
#endif
-#ifndef __SGI_STL_VECTOR
-#include <vector>
+#ifndef __SGI_STL_LIST
+#include <list>
#endif
class ScXMLImport;
@@ -83,14 +83,16 @@ struct ScMyToResizeShape
{
com::sun::star::uno::Reference <com::sun::star::drawing::XShape> xShape;
rtl::OUString sName;
- rtl::OUString sRangeList;
+ rtl::OUString* pRangeList;
com::sun::star::table::CellAddress aEndCell;
com::sun::star::table::CellAddress aStartCell;
sal_Int32 nEndX;
sal_Int32 nEndY;
+
+ ScMyToResizeShape() : pRangeList(NULL) {}
};
-typedef std::vector<ScMyToResizeShape> ScMyToResizeShapes;
+typedef std::list<ScMyToResizeShape> ScMyToResizeShapes;
class ScMyShapeResizer
{
@@ -101,14 +103,14 @@ class ScMyShapeResizer
sal_Bool IsOLE(com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rShape) const;
void CreateChartListener(ScDocument* pDoc,
const rtl::OUString& rName,
- const rtl::OUString& rRangeList);
+ const rtl::OUString* pRangeList);
public:
ScMyShapeResizer(ScXMLImport& rImport);
~ScMyShapeResizer();
void AddShape(com::sun::star::uno::Reference <com::sun::star::drawing::XShape>& rShape,
const rtl::OUString& rName,
- const rtl::OUString& rRangeList,
+ rtl::OUString* pRangeList,
com::sun::star::table::CellAddress& rStartAddress,
com::sun::star::table::CellAddress& rEndAddress,
sal_Int32 nEndX, sal_Int32 nEndY);
diff --git a/sc/source/filter/xml/makefile.mk b/sc/source/filter/xml/makefile.mk
index f1b5839d62a4..2a6574a29582 100644
--- a/sc/source/filter/xml/makefile.mk
+++ b/sc/source/filter/xml/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.28 $
+# $Revision: 1.29 $
#
-# last change: $Author: sab $ $Date: 2001-05-11 07:43:39 $
+# last change: $Author: sab $ $Date: 2001-07-31 15:41:15 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -101,7 +101,6 @@ CXXFILES = \
xmlstyli.cxx \
xmldpimp.cxx \
xmlannoi.cxx \
- xmlmapch.cxx \
xmlsceni.cxx \
xmlcvali.cxx \
XMLTableMasterPageExport.cxx \
@@ -150,7 +149,6 @@ SLOFILES = \
$(SLO)$/xmlstyli.obj \
$(SLO)$/xmldpimp.obj \
$(SLO)$/xmlannoi.obj \
- $(SLO)$/xmlmapch.obj \
$(SLO)$/xmlsceni.obj \
$(SLO)$/xmlcvali.obj \
$(SLO)$/XMLTableMasterPageExport.obj \
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 005ababe2f41..9969bc5ed74b 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.128 $
+ * $Revision: 1.129 $
*
- * last change: $Author: sab $ $Date: 2001-07-27 10:44:22 $
+ * last change: $Author: sab $ $Date: 2001-07-31 15:41:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,9 +70,6 @@
#include "xmlexprt.hxx"
#endif
-#ifndef SC_XMLMAPCH_HXX_
-#include "xmlmapch.hxx"
-#endif
#ifndef _SC_XMLCONVERTER_HXX
#include "XMLConverter.hxx"
#endif
@@ -426,7 +423,6 @@ ScXMLExport::ScXMLExport(const sal_uInt16 nExportFlag) :
pNumberFormatAttributesExportHelper(NULL),
pGroupColumns (NULL),
pGroupRows (NULL),
- xChartExportMapper(new ScExportMapper()),
nOpenRow(-1),
nCurrentTable(0),
aTableStyles(),
@@ -1593,7 +1589,6 @@ void ScXMLExport::_ExportAutoStyles()
rtl::OUString SC_SROWPREFIX(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX));
rtl::OUString SC_SCELLPREFIX(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX));
rtl::OUString SC_NUMBERFORMAT(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_NUMFMT));
- GetChartExport()->setTableAddressMapper(xChartExportMapper);
sal_Int32 nTableCount = xIndex->getCount();
pCellStyles->AddNewTable(nTableCount - 1);
CollectShapesAutoStyles(nTableCount);
@@ -1914,11 +1909,12 @@ void ScXMLExport::_ExportAutoStyles()
GetShapeExport()->exportAutoStyles();
}
- if (getExportFlags() & EXPORT_ALL)
+ if ((getExportFlags() & EXPORT_ALL) == EXPORT_ALL)
GetChartExport()->exportAutoStyles();
if (getExportFlags() & EXPORT_MASTERSTYLES)
{
GetPageExport()->collectAutoStyles(sal_True);
+ GetTextParagraphExport()->exportTextAutoStyles();
GetPageExport()->exportAutoStyles();
}
}
@@ -2340,7 +2336,7 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
}
if(pChartListener)
{
- USHORT nIndex;
+ USHORT nIndex(0);
pChartListener->SetString( sName );
if ( GetDocument()->GetChartListenerCollection()->Search( pChartListener, nIndex ) )
{
@@ -2358,7 +2354,11 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
}
}
else
- DBG_ERROR("don't get the ChartListener for this Chart");
+ {
+ bMemChart = sal_True;
+ AddAttribute(XML_NAMESPACE_DRAW, XML_NOTIFY_ON_UPDATE_OF_RANGES, rtl::OUString());
+ GetShapeExport()->exportShape(xShape, SEF_EXPORT_NO_CHART_DATA | SEF_DEFAULT, pPoint);
+ }
}
/* SchMemChart* pMemChart = pDoc->FindChartData(sName);
if (pMemChart && pMemChart->GetSeriesAddresses().getLength())
diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx
index 08cdaa1994b5..a20bb304f41a 100644
--- a/sc/source/filter/xml/xmlexprt.hxx
+++ b/sc/source/filter/xml/xmlexprt.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlexprt.hxx,v $
*
- * $Revision: 1.65 $
+ * $Revision: 1.66 $
*
- * last change: $Author: sab $ $Date: 2001-07-27 10:44:23 $
+ * last change: $Author: sab $ $Date: 2001-07-31 15:41:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -109,7 +109,6 @@ class ScXMLExport : public SvXMLExport
{
ScDocument* pDoc;
com::sun::star::uno::Reference <com::sun::star::frame::XModel> xModel;
- com::sun::star::uno::Reference <com::sun::star::util::XStringMapping> xChartExportMapper;
com::sun::star::uno::Reference <com::sun::star::sheet::XSpreadsheet> xCurrentTable;
UniReference < XMLPropertyHandlerFactory > xScPropHdlFactory;
diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx
index 931d2fc2e2a7..179eba3f9d85 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.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: sab $ $Date: 2001-07-23 15:24:06 $
+ * last change: $Author: sab $ $Date: 2001-07-31 15:41:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -758,9 +758,9 @@ sal_Bool ScMyTables::HasXShapes()
}
void ScMyTables::AddShape(uno::Reference <drawing::XShape>& rShape,
- const rtl::OUString& rName, const rtl::OUString& rRangeList,
+ const rtl::OUString& rName, rtl::OUString* pRangeList,
table::CellAddress& rStartAddress, table::CellAddress& rEndAddress,
sal_Int32 nEndX, sal_Int32 nEndY)
{
- aResizeShapes.AddShape(rShape, rName, rRangeList, rStartAddress, rEndAddress, nEndX, nEndY);
+ aResizeShapes.AddShape(rShape, rName, pRangeList, rStartAddress, rEndAddress, nEndX, nEndY);
}
diff --git a/sc/source/filter/xml/xmlsubti.hxx b/sc/source/filter/xml/xmlsubti.hxx
index 89f92f27a957..2b51255d041f 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.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: sab $ $Date: 2001-07-23 15:24:06 $
+ * last change: $Author: sab $ $Date: 2001-07-31 15:41:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -211,7 +211,7 @@ public:
sal_Bool HasXShapes();
void AddShape(com::sun::star::uno::Reference <com::sun::star::drawing::XShape>& rShape,
const rtl::OUString& rName,
- const rtl::OUString& rRangeList,
+ rtl::OUString* pRangeList,
com::sun::star::table::CellAddress& rStartAddress,
com::sun::star::table::CellAddress& rEndAddress,
sal_Int32 nEndX, sal_Int32 nEndY);
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index 328d93748b0a..441715fc37bc 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmltabi.cxx,v $
*
- * $Revision: 1.24 $
+ * $Revision: 1.25 $
*
- * last change: $Author: sab $ $Date: 2001-07-26 14:09:26 $
+ * last change: $Author: sab $ $Date: 2001-07-31 15:41:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,7 +73,6 @@
#include "xmlcoli.hxx"
#include "xmlsceni.hxx"
#include "document.hxx"
-#include "xmlmapch.hxx"
#include "docuno.hxx"
#include "olinetab.hxx"
@@ -161,8 +160,6 @@ ScXMLTableContext::ScXMLTableContext( ScXMLImport& rImport,
{
GetScImport().GetTables().NewTable(nSpannedCols);
}
- uno::Reference <util::XStringMapping> aMapper = new ScImportMapper();
- GetScImport().GetChartImport()->SetTableAddressMapper(aMapper);
}
ScXMLTableContext::~ScXMLTableContext()