impress: extend dumpAsXml to table cell and styles
Change-Id: If11ca945cae4f5127394dcc3871f4b6a76c24fac
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include <svx/sdr/properties/properties.hxx>
|
||||
#include <svx/svxdllapi.h>
|
||||
|
||||
struct _xmlTextWriter;
|
||||
|
||||
namespace sdr
|
||||
{
|
||||
@@ -59,6 +60,8 @@ namespace sdr
|
||||
// destructor
|
||||
virtual ~DefaultProperties();
|
||||
|
||||
void dumpAsXml(struct _xmlTextWriter * pWriter) const;
|
||||
|
||||
// Clone() operator, normally just calls the local copy constructor
|
||||
virtual BaseProperties& Clone(SdrObject& rObj) const override;
|
||||
|
||||
|
@@ -65,6 +65,8 @@ public:
|
||||
/** returns the current OutlinerParaObject and removes it from this instance */
|
||||
OutlinerParaObject* RemoveOutlinerParaObject();
|
||||
|
||||
void dumpAsXml(struct _xmlTextWriter * pWriter) const;
|
||||
|
||||
protected:
|
||||
virtual const SfxItemSet& GetObjectItemSet();
|
||||
virtual void SetObjectItem(const SfxPoolItem& rItem);
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include <svx/svddef.hxx>
|
||||
#include <svx/svdpool.hxx>
|
||||
#include <editeng/eeitem.hxx>
|
||||
#include <libxml/xmlwriter.h>
|
||||
|
||||
|
||||
namespace sdr
|
||||
@@ -218,6 +219,13 @@ namespace sdr
|
||||
ScaleItemSet(*mpItemSet, rScale);
|
||||
}
|
||||
}
|
||||
|
||||
void DefaultProperties::dumpAsXml(struct _xmlTextWriter * pWriter) const
|
||||
{
|
||||
xmlTextWriterStartElement(pWriter, BAD_CAST("defaultProperties"));
|
||||
mpItemSet->dumpAsXml(pWriter);
|
||||
xmlTextWriterEndElement(pWriter);
|
||||
}
|
||||
} // end of namespace properties
|
||||
} // end of namespace sdr
|
||||
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include "editeng/fhgtitem.hxx"
|
||||
#include <editeng/eeitem.hxx>
|
||||
#include <svl/itemset.hxx>
|
||||
#include <libxml/xmlwriter.h>
|
||||
#include <memory>
|
||||
|
||||
SdrText::SdrText( SdrTextObj& rObject, OutlinerParaObject* pOutlinerParaObject /* = 0 */ )
|
||||
@@ -201,4 +202,11 @@ SfxStyleSheet* SdrText::GetStyleSheet() const
|
||||
return mrObject.GetStyleSheet();
|
||||
}
|
||||
|
||||
void SdrText::dumpAsXml(struct _xmlTextWriter * pWriter) const
|
||||
{
|
||||
xmlTextWriterStartElement(pWriter, BAD_CAST("sdrText"));
|
||||
mpOutlinerParaObject->dumpAsXml(pWriter);
|
||||
xmlTextWriterEndElement(pWriter);
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <osl/mutex.hxx>
|
||||
#include <vcl/svapp.hxx>
|
||||
#include <libxml/xmlwriter.h>
|
||||
|
||||
#include "sdr/properties/textproperties.hxx"
|
||||
#include "editeng/outlobj.hxx"
|
||||
@@ -1671,6 +1672,18 @@ void SAL_CALL Cell::disposing( const EventObject& /*Source*/ ) throw (RuntimeExc
|
||||
dispose();
|
||||
}
|
||||
|
||||
void Cell::dumpAsXml(struct _xmlTextWriter * pWriter, sal_Int32 nRow, sal_Int32 nCol) const
|
||||
{
|
||||
xmlTextWriterStartElement(pWriter, BAD_CAST("cell"));
|
||||
xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("row"), "%" SAL_PRIdINT32, nRow);
|
||||
xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("col"), "%" SAL_PRIdINT32, nCol);
|
||||
SdrText::dumpAsXml(pWriter);
|
||||
//SvxUnoTextBase::dumpAsXml(pWriter);
|
||||
//mpPropSet->dumpAsXml(pWriter);
|
||||
mpProperties->dumpAsXml(pWriter);
|
||||
xmlTextWriterEndElement(pWriter);
|
||||
}
|
||||
|
||||
} }
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -194,6 +194,8 @@ public:
|
||||
|
||||
SVX_DLLPRIVATE void notifyModified();
|
||||
|
||||
void dumpAsXml(struct _xmlTextWriter * pWriter, sal_Int32 nRow, sal_Int32 nCol) const;
|
||||
|
||||
protected:
|
||||
SVX_DLLPRIVATE virtual const SfxItemSet& GetObjectItemSet() override;
|
||||
SVX_DLLPRIVATE virtual void SetObjectItem(const SfxPoolItem& rItem) override;
|
||||
@@ -213,14 +215,14 @@ private:
|
||||
|
||||
css::table::CellContentType mnCellContentType;
|
||||
|
||||
OUString msFormula;
|
||||
OUString msFormula;
|
||||
double mfValue;
|
||||
::sal_Int32 mnError;
|
||||
bool mbMerged;
|
||||
bool mbMerged;
|
||||
::sal_Int32 mnRowSpan;
|
||||
::sal_Int32 mnColSpan;
|
||||
|
||||
Rectangle maCellRect;
|
||||
Rectangle maCellRect;
|
||||
|
||||
css::uno::Reference< css::table::XTable > mxTable;
|
||||
};
|
||||
|
@@ -635,6 +635,7 @@ void SdrTableObjImpl::dumpAsXml(xmlTextWriterPtr pWriter) const
|
||||
xmlTextWriterStartElement(pWriter, BAD_CAST("sdrTableObjImpl"));
|
||||
if (mpLayouter)
|
||||
mpLayouter->dumpAsXml(pWriter);
|
||||
mxTable->dumpAsXml(pWriter);
|
||||
xmlTextWriterEndElement(pWriter);
|
||||
}
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <vcl/svapp.hxx>
|
||||
#include <osl/mutex.hxx>
|
||||
#include <libxml/xmlwriter.h>
|
||||
|
||||
#include "cell.hxx"
|
||||
#include "cellcursor.hxx"
|
||||
@@ -1123,6 +1124,17 @@ void TableModel::updateColumns()
|
||||
}
|
||||
}
|
||||
|
||||
void TableModel::dumpAsXml(struct _xmlTextWriter * pWriter) const
|
||||
{
|
||||
xmlTextWriterStartElement(pWriter, BAD_CAST("tableModel"));
|
||||
for (sal_Int32 nRow = 0; nRow < getRowCountImpl(); ++nRow)
|
||||
for (sal_Int32 nCol = 0; nCol < getColumnCountImpl(); ++nCol)
|
||||
{
|
||||
maRows[nRow]->maCells[nCol]->dumpAsXml(pWriter, nRow, nCol);
|
||||
}
|
||||
xmlTextWriterEndElement(pWriter);
|
||||
}
|
||||
|
||||
} }
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#include <comphelper/listenernotification.hxx>
|
||||
#include "celltypes.hxx"
|
||||
|
||||
struct _xmlTextWriter;
|
||||
|
||||
namespace sdr { namespace table {
|
||||
|
||||
@@ -84,6 +85,8 @@ public:
|
||||
/// Get the width of all columns in this table.
|
||||
std::vector<sal_Int32> getColumnWidths();
|
||||
|
||||
void dumpAsXml(struct _xmlTextWriter * pWriter) const;
|
||||
|
||||
// ICellRange
|
||||
virtual sal_Int32 getLeft() override;
|
||||
virtual sal_Int32 getTop() override;
|
||||
|
Reference in New Issue
Block a user