summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorChristian Lippka <cl@openoffice.org>2001-06-11 12:46:30 +0000
committerChristian Lippka <cl@openoffice.org>2001-06-11 12:46:30 +0000
commita63811951460d52b98e0cb1217d8d16bc253b322 (patch)
treeb04f34227a023adcc7ef853f99d4fa193956ee57 /xmloff
parent825615a257c4a64e74c18c38fcb218329e98b26f (diff)
#87923# export page number
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/ximpshap.cxx36
-rw-r--r--xmloff/source/draw/ximpshap.hxx9
2 files changed, 38 insertions, 7 deletions
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index c1e29fd1c420..69aa79d207db 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ximpshap.cxx,v $
*
- * $Revision: 1.49 $
+ * $Revision: 1.50 $
*
- * last change: $Author: cl $ $Date: 2001-06-01 12:32:47 $
+ * last change: $Author: cl $ $Date: 2001-06-11 13:46:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -67,8 +67,8 @@
#include <com/sun/star/drawing/XGluePointsSupplier.hpp>
#endif
-#ifndef _COM_SUN_STAR_DRAWING_XGLUEPOINTSSUPPLIER_HPP_
-#include <com/sun/star/drawing/XGluePointsSupplier.hpp>
+#ifndef _COM_SUN_STAR_CONTAINER_XIDENTIFIERACCESS_HPP_
+#include <com/sun/star/container/XIdentifierAccess.hpp>
#endif
#ifndef _COM_SUN_STAR_DRAWING_GLUEPOINT2_HPP_
@@ -1711,7 +1711,7 @@ SdXMLPageShapeContext::SdXMLPageShapeContext(
const OUString& rLocalName,
const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
uno::Reference< drawing::XShapes >& rShapes)
-: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes )
+: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ), mnPageNumber(0)
{
}
@@ -1723,6 +1723,23 @@ SdXMLPageShapeContext::~SdXMLPageShapeContext()
//////////////////////////////////////////////////////////////////////////////
+// this is called from the parent group for each unparsed attribute in the attribute list
+void SdXMLPageShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue )
+{
+ if( XML_NAMESPACE_DRAW == nPrefix )
+ {
+ if( rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sXML_page_number)) )
+ {
+ mnPageNumber = rValue.toInt32();
+ return;
+ }
+ }
+
+ SdXMLShapeContext::processAttribute( nPrefix, rLocalName, rValue );
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
void SdXMLPageShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList)
{
// create Page shape
@@ -1765,6 +1782,15 @@ void SdXMLPageShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib
// set pos, size, shear and rotate
SetTransformation();
+ uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY);
+ if(xPropSet.is())
+ {
+ uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
+ const OUString aPageNumberStr(RTL_CONSTASCII_USTRINGPARAM("PageNumber"));
+ if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(aPageNumberStr))
+ xPropSet->setPropertyValue(aPageNumberStr, uno::makeAny( mnPageNumber ));
+ }
+
SdXMLShapeContext::StartElement(xAttrList);
}
}
diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx
index 4f5c7c8e52f0..a549eb6279db 100644
--- a/xmloff/source/draw/ximpshap.hxx
+++ b/xmloff/source/draw/ximpshap.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ximpshap.hxx,v $
*
- * $Revision: 1.24 $
+ * $Revision: 1.25 $
*
- * last change: $Author: cl $ $Date: 2001-06-01 12:32:48 $
+ * last change: $Author: cl $ $Date: 2001-06-11 13:46:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -375,6 +375,8 @@ public:
class SdXMLPageShapeContext : public SdXMLShapeContext
{
+private:
+ sal_Int32 mnPageNumber;
public:
TYPEINFO();
@@ -384,6 +386,9 @@ public:
com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
virtual ~SdXMLPageShapeContext();
virtual void StartElement(const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+
+ // this is called from the parent group for each unparsed attribute in the attribute list
+ virtual void processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue );
};
//////////////////////////////////////////////////////////////////////////////