summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lippka <cl@openoffice.org>2001-10-12 15:19:53 +0000
committerChristian Lippka <cl@openoffice.org>2001-10-12 15:19:53 +0000
commit864d0c8cdc63814e16a27938e7d168e06dc96cd3 (patch)
treea654300466ec43ce3dc3b2ff0578d7a074fd77fc
parentcf2c31077672f8ad16c3bdfb14b090a0b69e0575 (diff)
#91486# added xml alien attributes
-rw-r--r--svx/inc/UnoNamespaceMap.hxx77
-rw-r--r--svx/prj/d.lst1
-rw-r--r--svx/source/unodraw/UnoNamespaceMap.cxx393
-rw-r--r--svx/source/unodraw/makefile.mk6
-rw-r--r--xmloff/source/draw/sdpropls.cxx8
-rw-r--r--xmloff/source/style/xmlimppr.cxx31
6 files changed, 501 insertions, 15 deletions
diff --git a/svx/inc/UnoNamespaceMap.hxx b/svx/inc/UnoNamespaceMap.hxx
new file mode 100644
index 000000000000..74ab6dae5138
--- /dev/null
+++ b/svx/inc/UnoNamespaceMap.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * $RCSfile: UnoNamespaceMap.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: cl $ $Date: 2001-10-12 16:04:13 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVX_UNONAMESPACEMAP_HXX_
+#define _SVX_UNONAMESPACEMAP_HXX_
+
+#ifndef _COM_SUN_STAR_UNO_XINTERFACE_HPP_
+#include <com/sun/star/uno/XInterface.hpp>
+#endif
+
+class SfxItemPool;
+
+namespace svx {
+
+com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL NamespaceMap_createInstance( sal_uInt16* pWhichIds, SfxItemPool* pPool1, SfxItemPool* pPool2 = NULL );
+
+}
+
+#endif // _SVX_UNONAMESPACEMAP_HXX_
diff --git a/svx/prj/d.lst b/svx/prj/d.lst
index 001c4d4c4ab1..2f54d8ba9ee3 100644
--- a/svx/prj/d.lst
+++ b/svx/prj/d.lst
@@ -584,6 +584,7 @@ hedabu: ..\inc\UnoForbiddenCharsTable.hxx %_DEST%\inc%_EXT%\svx\UnoForbiddenChar
hedabu: ..\inc\forbiddencharacterstable.hxx %_DEST%\inc%_EXT%\svx\forbiddencharacterstable.hxx
hedabu: ..\inc\dataaccessdescriptor.hxx %_DEST%\inc%_EXT%\svx\dataaccessdescriptor.hxx
hedabu: ..\inc\xmlcnitm.hxx %_DEST%\inc%_EXT%\svx\xmlcnitm.hxx
+hedabu: ..\inc\UnoNamespaceMap.hxx %_DEST%\inc%_EXT%\svx\UnoNamespaceMap.hxx
..\xml\SvxDrawPage.xml %_DEST%\xml%_EXT%\SvxDrawPage.xml
..\xml\SvxGraphicObject.xml %_DEST%\xml%_EXT%\SvxGraphicObject.xml
diff --git a/svx/source/unodraw/UnoNamespaceMap.cxx b/svx/source/unodraw/UnoNamespaceMap.cxx
new file mode 100644
index 000000000000..bfbff34f1ea3
--- /dev/null
+++ b/svx/source/unodraw/UnoNamespaceMap.cxx
@@ -0,0 +1,393 @@
+/*************************************************************************
+ *
+ * $RCSfile: UnoNamespaceMap.cxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: cl $ $Date: 2001-10-12 16:08:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <set>
+
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_
+#include <com/sun/star/container/XNameAccess.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+
+#ifndef _CPPUHELPER_IMPLBASE3_HXX_
+#include <cppuhelper/implbase2.hxx>
+#endif
+
+#ifndef _OSL_DIAGNOSE_H_
+#include <osl/diagnose.h>
+#endif
+
+#ifndef _OSL_MUTEX_HXX_
+#include <osl/mutex.hxx>
+#endif
+
+#ifndef _COMPHELPER_STLTYPES_HXX_
+#include <comphelper/stl_types.hxx>
+#endif
+
+#ifndef _SFXITEMPOOL_HXX
+#include <svtools/itempool.hxx>
+#endif
+
+#ifndef _SVX_UNOAPI_HXX_
+#include "unoapi.hxx"
+#endif
+
+#ifndef _SVX_XMLCNITM_HXX
+#include "xmlcnitm.hxx"
+#endif
+
+using namespace ::comphelper;
+using namespace ::osl;
+using namespace ::rtl;
+using namespace ::cppu;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+
+namespace svx
+{
+ /** implements a component to export namespaces of all SvXMLAttrContainerItem inside
+ one or two pools with a variable count of which ids.
+ */
+ class NamespaceMap : public WeakImplHelper2< XNameAccess, XServiceInfo >
+ {
+ private:
+ sal_uInt16* mpWhichIds;
+ SfxItemPool* mpPool1;
+ SfxItemPool* mpPool2;
+ public:
+ NamespaceMap( sal_uInt16* pWhichIds, SfxItemPool* pPool1, SfxItemPool* pPool2 );
+ virtual ~NamespaceMap();
+
+ // XNameAccess
+ virtual Any SAL_CALL getByName( const OUString& aName ) throw (NoSuchElementException, WrappedTargetException, RuntimeException);
+ virtual Sequence< OUString > SAL_CALL getElementNames( ) throw (RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw (RuntimeException);
+
+ // XElementAccess
+ virtual Type SAL_CALL getElementType( ) throw (RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw (RuntimeException);
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw(RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(RuntimeException);
+ virtual Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(RuntimeException);
+ };
+
+ Reference< XInterface > SAL_CALL NamespaceMap_createInstance( sal_uInt16* pWhichIds, SfxItemPool* pPool1, SfxItemPool* pPool2 )
+ throw( Exception )
+ {
+ return (XWeak*)new NamespaceMap( pWhichIds, pPool1, pPool2 );
+ }
+
+ Sequence< OUString > SAL_CALL NamespaceMap_getSupportedServiceNames()
+ throw()
+ {
+ Sequence< OUString > aSupportedServiceNames( 1 );
+ aSupportedServiceNames[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.NamespaceMap" ) );
+ return aSupportedServiceNames;
+ }
+
+ OUString SAL_CALL NamespaceMap_getImplementationName()
+ throw()
+ {
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Svx.NamespaceMap" ) );
+ }
+
+
+
+ class NamespaceIteratorImpl
+ {
+ private:
+ SfxItemPool* mpPool1;
+ SfxItemPool* mpPool2;
+
+
+ SfxItemPool* mpCurrentPool;
+ sal_uInt16* mpWhichIds;
+ sal_uInt16* mpWhichId;
+
+ sal_uInt16 mnItemCount;
+ sal_uInt16 mnItem;
+
+ const SvXMLAttrContainerItem* mpCurrentAttr;
+ sal_uInt16 mnCurrentAttr;
+
+ void startPool( SfxItemPool* pPool );
+ public:
+
+ NamespaceIteratorImpl( sal_uInt16* pWhichIds, SfxItemPool* pPool1, SfxItemPool* pPool2 );
+
+ sal_Bool next( OUString& rPrefix, OUString& rURL );
+ };
+}
+
+using namespace ::svx;
+
+// -------------
+
+NamespaceIteratorImpl::NamespaceIteratorImpl( sal_uInt16* pWhichIds, SfxItemPool* pPool1, SfxItemPool* pPool2 )
+{
+ mpPool1 = pPool1;
+ mpPool2 = pPool2;
+
+ mpCurrentAttr = NULL;
+ mnCurrentAttr = 0;
+
+ mpWhichIds = pWhichIds;
+
+ startPool( pPool1 );
+}
+
+void NamespaceIteratorImpl::startPool( SfxItemPool* pPool )
+{
+ mpCurrentPool = pPool;
+
+ mpWhichId = mpWhichIds;
+
+ mnItem = 0;
+ mnItemCount = (mpWhichId && (0 != *mpWhichId) && pPool) ? pPool->GetItemCount( *mpWhichId ) : 0;
+}
+
+sal_Bool NamespaceIteratorImpl::next( OUString& rPrefix, OUString& rURL )
+{
+ // we still need to process the current attribute
+ if( mpCurrentAttr && (mnCurrentAttr != USHRT_MAX) )
+ {
+ rPrefix = mpCurrentAttr->GetPrefix( mnCurrentAttr );
+ rURL = mpCurrentAttr->GetNamespace( mnCurrentAttr );
+
+ mnCurrentAttr = mpCurrentAttr->GetNextNamespaceIndex( mnCurrentAttr );
+ return sal_True;
+ }
+
+ // we need the next namespace item
+ mpCurrentAttr = NULL;
+
+ const SfxPoolItem* pItem;
+ // look for the next available item in the current pool
+ while( (mnItem < mnItemCount) && ( NULL == (pItem = mpCurrentPool->GetItem( *mpWhichId, mnItem ) ) ) )
+ mnItem++;
+
+ // are we finished with the current whichid?
+ if( mnItem == mnItemCount )
+ {
+ mpWhichId++;
+
+ // are we finished with the current pool?
+ if( 0 == *mpWhichId )
+ {
+ // we already finished both pools
+ if( mpCurrentPool == mpPool2 )
+ return sal_False;
+
+ // switch to the second pool, if there is one
+ mpCurrentPool = mpPool2;
+ if( NULL == mpCurrentPool )
+ return sal_False;
+
+ // start with second pool
+ startPool( mpPool2 );
+ }
+ else
+ {
+ mnItem = 0;
+ mnItemCount = (mpWhichId && (0 != *mpWhichId) && mpCurrentPool) ? mpCurrentPool->GetItemCount( *mpWhichId ) : 0;
+ }
+
+ return next( rPrefix, rURL );
+ }
+
+ if( pItem )
+ {
+ mnItem++;
+
+ // get that item and see if there namespaces inside
+ const SvXMLAttrContainerItem *pUnknown = (const SvXMLAttrContainerItem *)pItem;
+ if( (pUnknown->GetAttrCount() > 0) )
+ {
+ mpCurrentAttr = pUnknown;
+ mnCurrentAttr = pUnknown->GetFirstNamespaceIndex();
+ }
+ return next( rPrefix, rURL );
+ }
+
+ return false;
+}
+
+// -------------
+
+NamespaceMap::NamespaceMap( sal_uInt16* pWhichIds, SfxItemPool* pPool1, SfxItemPool* pPool2 )
+: mpWhichIds( pWhichIds ), mpPool1( pPool1 ), mpPool2( pPool2 )
+{
+}
+
+NamespaceMap::~NamespaceMap()
+{
+}
+
+// XNameAccess
+Any SAL_CALL NamespaceMap::getByName( const OUString& aName ) throw (NoSuchElementException, WrappedTargetException, RuntimeException)
+{
+ NamespaceIteratorImpl aIter( mpWhichIds, mpPool1, mpPool2 );
+
+ OUString aPrefix;
+ OUString aURL;
+
+ sal_Bool bFound;
+
+ do
+ {
+ bFound = aIter.next( aPrefix, aURL );
+ }
+ while( bFound && (aPrefix != aName ) );
+
+ if( !bFound )
+ throw NoSuchElementException();
+
+ return makeAny( aURL );
+}
+
+Sequence< OUString > SAL_CALL NamespaceMap::getElementNames() throw (RuntimeException)
+{
+ NamespaceIteratorImpl aIter( mpWhichIds, mpPool1, mpPool2 );
+
+ OUString aPrefix;
+ OUString aURL;
+
+ std::set< OUString, comphelper::UStringLess > aPrefixSet;
+
+ while( aIter.next( aPrefix, aURL ) )
+ aPrefixSet.insert( aPrefix );
+
+ Sequence< OUString > aSeq( aPrefixSet.size() );
+ OUString* pPrefixes = aSeq.getArray();
+
+ std::set< OUString, comphelper::UStringLess >::iterator aPrefixIter( aPrefixSet.begin() );
+ const std::set< OUString, comphelper::UStringLess >::iterator aEnd( aPrefixSet.end() );
+
+ while( aPrefixIter != aEnd )
+ {
+ *pPrefixes++ = *aPrefixIter++;
+ }
+
+ return aSeq;
+}
+
+sal_Bool SAL_CALL NamespaceMap::hasByName( const OUString& aName ) throw (RuntimeException)
+{
+ NamespaceIteratorImpl aIter( mpWhichIds, mpPool1, mpPool2 );
+
+ OUString aPrefix;
+ OUString aURL;
+
+ sal_Bool bFound;
+
+ do
+ {
+ bFound = aIter.next( aPrefix, aURL );
+ }
+ while( bFound && (aPrefix != aName ) );
+
+ return bFound;
+}
+
+// XElementAccess
+Type SAL_CALL NamespaceMap::getElementType() throw (RuntimeException)
+{
+ return ::getCppuType( (const OUString*) 0 );
+}
+
+sal_Bool SAL_CALL NamespaceMap::hasElements() throw (RuntimeException)
+{
+ NamespaceIteratorImpl aIter( mpWhichIds, mpPool1, mpPool2 );
+
+ OUString aPrefix;
+ OUString aURL;
+
+ return aIter.next( aPrefix, aURL );
+}
+
+// XServiceInfo
+OUString SAL_CALL NamespaceMap::getImplementationName( )
+ throw(RuntimeException)
+{
+ return NamespaceMap_getImplementationName();
+}
+
+sal_Bool SAL_CALL NamespaceMap::supportsService( const OUString& ServiceName )
+ throw(RuntimeException)
+{
+ return sal_True;
+}
+
+Sequence< OUString > SAL_CALL NamespaceMap::getSupportedServiceNames( )
+ throw(RuntimeException)
+{
+ return NamespaceMap_getSupportedServiceNames();
+}
+
diff --git a/svx/source/unodraw/makefile.mk b/svx/source/unodraw/makefile.mk
index 6d1a108f4b8d..bf0fbc8287b7 100644
--- a/svx/source/unodraw/makefile.mk
+++ b/svx/source/unodraw/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.10 $
+# $Revision: 1.11 $
#
-# last change: $Author: cl $ $Date: 2001-08-24 11:57:40 $
+# last change: $Author: cl $ $Date: 2001-10-12 16:08:30 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -76,6 +76,7 @@ ENABLE_EXCEPTIONS=TRUE
# --- Files --------------------------------------------------------
CXXFILES = \
+ UnoNamespaceMap.cxx \
UnoGraphicExporter.cxx \
unopool.cxx \
XPropertyTable.cxx \
@@ -129,6 +130,7 @@ SVXLIGHTOBJFILES=\
$(OBJ)$/gluepts.obj
SLOFILES = \
+ $(SLO)$/UnoNamespaceMap.obj \
$(SLO)$/UnoGraphicExporter.obj \
$(SLO)$/unopool.obj \
$(SLO)$/XPropertyTable.obj \
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 0c61a047012d..eb37ca1b02df 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sdpropls.cxx,v $
*
- * $Revision: 1.51 $
+ * $Revision: 1.52 $
*
- * last change: $Author: cl $ $Date: 2001-08-24 08:24:06 $
+ * last change: $Author: cl $ $Date: 2001-10-12 16:12:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -228,6 +228,8 @@ using namespace ::xmloff::token;
const XMLPropertyMapEntry aXMLSDProperties[] =
{
+ MAP( "ShapeUserDefinedAttributes", XML_NAMESPACE_TEXT, XML_XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
+
// stroke attributes
MAP( "LineStyle", XML_NAMESPACE_DRAW, XML_STROKE, XML_SD_TYPE_STROKE, 0 ),
MAP( "LineDashName", XML_NAMESPACE_DRAW, XML_STROKE_DASH, XML_TYPE_STRING, CTF_DASHNAME ),
@@ -414,6 +416,8 @@ const XMLPropertyMapEntry aXMLSDProperties[] =
const XMLPropertyMapEntry aXMLSDPresPageProps[] =
{
+ MAP( "UserDefinedAttributes", XML_NAMESPACE_TEXT, XML_XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ),
+
MAP( "Change", XML_NAMESPACE_PRESENTATION, XML_TRANSITION_TYPE, XML_SD_TYPE_PRESPAGE_TYPE, CTF_PAGE_TRANS_TYPE ),
MAP( "Effect", XML_NAMESPACE_PRESENTATION, XML_TRANSITION_STYLE, XML_SD_TYPE_PRESPAGE_STYLE, CTF_PAGE_TRANS_STYLE ),
MAP( "Speed", XML_NAMESPACE_PRESENTATION, XML_TRANSITION_SPEED, XML_SD_TYPE_PRESPAGE_SPEED, CTF_PAGE_TRANS_SPEED ),
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
index e276cfa8325f..9b6fc06df79b 100644
--- a/xmloff/source/style/xmlimppr.cxx
+++ b/xmloff/source/style/xmlimppr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlimppr.cxx,v $
*
- * $Revision: 1.23 $
+ * $Revision: 1.24 $
*
- * last change: $Author: sab $ $Date: 2001-10-04 15:59:13 $
+ * last change: $Author: cl $ $Date: 2001-10-12 16:16:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -309,16 +309,25 @@ void SvXMLImportPropertyMapper::importXML(
xAttrContainer = xNew;
// find map entry and create new property state
- sal_Int32 nTextIndex = maPropMapper->FindEntryIndex( "TextUserDefinedAttributes", XML_NAMESPACE_TEXT, GetXMLToken(XML_XMLNS) );
- sal_Int32 nUserIndex = maPropMapper->FindEntryIndex( "UserDefinedAttributes", XML_NAMESPACE_TEXT, GetXMLToken(XML_XMLNS) );
- if ((nTextIndex > -1) && (nUserIndex > -1))
- nIndex = (nTextIndex < nUserIndex) ? nTextIndex : nUserIndex;
- else if (nTextIndex > -1)
- nIndex = nTextIndex;
- else if (nUserIndex > -1)
- nIndex = nUserIndex;
+ sal_Int32 nShapeIndex = maPropMapper->FindEntryIndex( "ShapeUserDefinedAttributes", XML_NAMESPACE_TEXT, GetXMLToken(XML_XMLNS) );
+ if( nShapeIndex > -1 )
+ {
+ nIndex = nShapeIndex;
+ }
else
- DBG_ERROR("not able to store alien attribute");
+ {
+ sal_Int32 nTextIndex = maPropMapper->FindEntryIndex( "TextUserDefinedAttributes", XML_NAMESPACE_TEXT, GetXMLToken(XML_XMLNS) );
+ sal_Int32 nUserIndex = maPropMapper->FindEntryIndex( "UserDefinedAttributes", XML_NAMESPACE_TEXT, GetXMLToken(XML_XMLNS) );
+
+ if ((nTextIndex > -1) && (nUserIndex > -1))
+ nIndex = (nTextIndex < nUserIndex) ? nTextIndex : nUserIndex;
+ else if (nTextIndex > -1)
+ nIndex = nTextIndex;
+ else if (nUserIndex > -1)
+ nIndex = nUserIndex;
+ else
+ DBG_ERROR("not able to store alien attribute");
+ }
Any aAny;
aAny <<= xAttrContainer;