SprmIdToString went to resourcemodel
This commit is contained in:
parent
2a9743111a
commit
c717d9faf5
6 changed files with 45 additions and 59 deletions
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: QNameToString.hxx,v $
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hbrinkm $ $Date: 2007-04-13 10:04:53 $
|
||||
* last change: $Author: hbrinkm $ $Date: 2007-04-16 09:00:24 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -63,6 +63,26 @@ public:
|
|||
|
||||
string operator()(writerfilter::QName_t qName);
|
||||
};
|
||||
|
||||
class SprmIdToString
|
||||
{
|
||||
typedef boost::shared_ptr<SprmIdToString> Pointer_t;
|
||||
|
||||
static Pointer_t pInstance;
|
||||
|
||||
map<sal_uInt32, string> mMap;
|
||||
|
||||
protected:
|
||||
/**
|
||||
Generated automatically.
|
||||
*/
|
||||
SprmIdToString();
|
||||
|
||||
public:
|
||||
static Pointer_t Instance();
|
||||
string operator()(sal_uInt32 nId);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // INCLUDED_QNAME_TO_STRING_HXX
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: WW8PropertySetImpl.cxx,v $
|
||||
*
|
||||
* $Revision: 1.3 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
* last change: $Author: hbrinkm $ $Date: 2007-01-30 13:24:14 $
|
||||
* last change: $Author: hbrinkm $ $Date: 2007-04-16 09:02:14 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -36,6 +36,7 @@
|
|||
#include "WW8DocumentImpl.hxx"
|
||||
#include "WW8ResourceModelImpl.hxx"
|
||||
#include <doctok/resourceids.hxx>
|
||||
#include <resourcemodel/QNameToString.hxx>
|
||||
|
||||
namespace doctok
|
||||
{
|
||||
|
@ -404,19 +405,4 @@ string WW8PropertySetIteratorImpl::toString() const
|
|||
return sResult;
|
||||
}
|
||||
|
||||
SprmIdToString::Pointer_t SprmIdToString::pInstance;
|
||||
|
||||
SprmIdToString::Pointer_t SprmIdToString::Instance()
|
||||
{
|
||||
if (pInstance.get() == NULL)
|
||||
pInstance = SprmIdToString::Pointer_t(new SprmIdToString());
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
string SprmIdToString::operator()(sal_uInt32 nId)
|
||||
{
|
||||
return mMap[nId];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
*
|
||||
* $RCSfile: WW8PropertySetImpl.hxx,v $
|
||||
*
|
||||
* $Revision: 1.3 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
* last change: $Author: hbrinkm $ $Date: 2006-11-01 09:14:32 $
|
||||
* last change: $Author: hbrinkm $ $Date: 2007-04-16 09:02:15 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -153,26 +153,6 @@ public:
|
|||
virtual string toString() const;
|
||||
};
|
||||
|
||||
|
||||
class SprmIdToString
|
||||
{
|
||||
typedef boost::shared_ptr<SprmIdToString> Pointer_t;
|
||||
|
||||
static Pointer_t pInstance;
|
||||
|
||||
map<sal_uInt32, string> mMap;
|
||||
|
||||
protected:
|
||||
/**
|
||||
Generated automatically.
|
||||
*/
|
||||
SprmIdToString();
|
||||
|
||||
public:
|
||||
static Pointer_t Instance();
|
||||
string operator()(sal_uInt32 nId);
|
||||
};
|
||||
|
||||
::doctok::Reference<Properties>::Pointer_t createSprmProps
|
||||
(WW8PropertyImpl & rProp);
|
||||
::doctok::Reference<BinaryObj>::Pointer_t createSprmBinary
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
*
|
||||
* $RCSfile: resourcesimpl.xsl,v $
|
||||
*
|
||||
* $Revision: 1.7 $
|
||||
* $Revision: 1.8 $
|
||||
*
|
||||
* last change: $Author: hbrinkm $ $Date: 2007-03-08 16:22:56 $
|
||||
* last change: $Author: hbrinkm $ $Date: 2007-04-16 09:02:14 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -49,9 +49,9 @@
|
|||
*
|
||||
* $RCSfile: resourcesimpl.xsl,v $
|
||||
*
|
||||
* $Revision: 1.7 $
|
||||
* $Revision: 1.8 $
|
||||
*
|
||||
* last change: $Author: hbrinkm $ $Date: 2007-03-08 16:22:56 $
|
||||
* last change: $Author: hbrinkm $ $Date: 2007-04-16 09:02:14 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -95,7 +95,6 @@ extern WW8OutputWithDepth output;
|
|||
using namespace ::std;
|
||||
</xsl:text>
|
||||
<xsl:apply-templates select='.//UML:Class' mode='class'/>
|
||||
<xsl:apply-templates select='//UML:Model' mode='sprmcodetostr'/>
|
||||
<xsl:apply-templates select='//UML:Model' mode='createsprmprops'/>
|
||||
<xsl:apply-templates select='//UML:Model' mode='createsprmbinary'/>
|
||||
<xsl:apply-templates select='//UML:Model' mode='createdffrecord'/>
|
||||
|
@ -490,15 +489,6 @@ using namespace ::std;
|
|||
</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='UML:Model' mode='sprmcodetostr'>
|
||||
SprmIdToString::SprmIdToString()
|
||||
{
|
||||
<xsl:variable name='tmp'>map < sal_uInt32, string > </xsl:variable>
|
||||
<xsl:for-each select='.//UML:Class[.//UML:Stereotype/@xmi.idref="ww8sprm"]'>
|
||||
mMap[<xsl:value-of select='.//UML:TaggedValue[.//UML:TagDefinition/@xmi.idref="sprmcode"]//UML:TaggedValue.dataValue'/>] = "<xsl:value-of select='.//UML:TaggedValue[.//UML:TagDefinition/@xmi.idref="sprmid"]//UML:TaggedValue.dataValue'/>";</xsl:for-each>
|
||||
}
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='UML:Model' mode='createsprmprops'>
|
||||
doctok::Reference < Properties > ::Pointer_t createSprmProps
|
||||
(WW8PropertyImpl & rProp)
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
*
|
||||
* $RCSfile: resourcetools.xsl,v $
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hbrinkm $ $Date: 2007-03-12 12:37:44 $
|
||||
* last change: $Author: hbrinkm $ $Date: 2007-04-16 09:02:14 $
|
||||
*
|
||||
* The Contents of this file are made available subject to
|
||||
* the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -149,4 +149,13 @@
|
|||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='UML:Model' mode='sprmcodetostr'>
|
||||
SprmIdToString::SprmIdToString()
|
||||
{
|
||||
<xsl:variable name='tmp'>map < sal_uInt32, string > </xsl:variable>
|
||||
<xsl:for-each select='.//UML:Class[.//UML:Stereotype/@xmi.idref="ww8sprm"]'>
|
||||
mMap[<xsl:value-of select='.//UML:TaggedValue[.//UML:TagDefinition/@xmi.idref="sprmcode"]//UML:TaggedValue.dataValue'/>] = "<xsl:value-of select='.//UML:TaggedValue[.//UML:TagDefinition/@xmi.idref="sprmid"]//UML:TaggedValue.dataValue'/>";</xsl:for-each>
|
||||
}
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
|
@ -5,9 +5,9 @@
|
|||
#
|
||||
# $RCSfile: xmitocpp,v $
|
||||
#
|
||||
# $Revision: 1.6 $
|
||||
# $Revision: 1.7 $
|
||||
#
|
||||
# last change: $Author: hbrinkm $ $Date: 2007-04-13 10:38:10 $
|
||||
# last change: $Author: hbrinkm $ $Date: 2007-04-16 09:02:15 $
|
||||
#
|
||||
# The Contents of this file are made available subject to
|
||||
# the terms of GNU Lesser General Public License Version 2.1.
|
||||
|
@ -34,6 +34,7 @@
|
|||
# ***********************************************************************/
|
||||
|
||||
xalan -xsl qnametostr.xsl -in resources.xmi > qnametostr.tmp
|
||||
xalan -xsl sprmcodetostr.xsl -in resources.xmi > sprmcodetostr.tmp
|
||||
xalan -xsl resources.xsl -in resources.xmi | indent > resources.hxx
|
||||
xalan -xsl resourcesimpl.xsl -in resources.xmi | indent > resources.cxx
|
||||
xalan -xsl resourceids.xsl -in resources.xmi | indent > ../../inc/doctok/resourceids.hxx
|
||||
|
|
Loading…
Reference in a new issue