Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
bbb9f4f7
Kaydet (Commit)
bbb9f4f7
authored
Ara 11, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
writerfilter: remove unused resources.xsl
Change-Id: Id9bb0ae05395fe635aec1a42e8b3c0995cf81463
üst
a5297c08
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
472 deletions
+1
-472
CustomTarget_source.mk
writerfilter/CustomTarget_source.mk
+0
-7
resources.xsl
writerfilter/source/doctok/resources.xsl
+0
-464
resourcesimpl.xsl
writerfilter/source/doctok/resourcesimpl.xsl
+1
-1
No files found.
writerfilter/CustomTarget_source.mk
Dosyayı görüntüle @
bbb9f4f7
...
...
@@ -44,7 +44,6 @@ writerfilter_OOXMLNAMESPACES= \
writerfilter_ALL = \
$(writerfilter_GEN_doctok_ResourceIds_hxx) \
$(writerfilter_GEN_doctok_Resources_cxx) \
$(writerfilter_GEN_doctok_Resources_hxx) \
$(writerfilter_GEN_doctok_QNameToStr_cxx) \
$(writerfilter_GEN_doctok_SprmIds_hxx) \
$(writerfilter_GEN_model_SprmCodeToStr_cxx) \
...
...
@@ -65,7 +64,6 @@ writerfilter_ALL = \
writerfilter_DEP_ooxml_Namespaces_txt=$(call gb_CustomTarget_get_workdir,oox/generated)/misc/namespaces.txt
writerfilter_GEN_doctok_ResourceIds_hxx=$(writerfilter_WORK)/doctok/resourceids.hxx
writerfilter_GEN_doctok_Resources_cxx=$(writerfilter_WORK)/resources.cxx
writerfilter_GEN_doctok_Resources_hxx=$(writerfilter_WORK)/doctok/resources.hxx
writerfilter_GEN_doctok_QNameToStr_cxx=$(writerfilter_WORK)/doctok/qnametostr.cxx
writerfilter_GEN_doctok_SprmIds_hxx=$(writerfilter_WORK)/doctok/sprmids.hxx
writerfilter_GEN_model_SprmCodeToStr_cxx=$(writerfilter_WORK)/sprmcodetostr.cxx
...
...
@@ -90,7 +88,6 @@ writerfilter_SRC_doctok_QNameToStr_xsl=$(writerfilter_SRC)/doctok/qnametostr.xsl
writerfilter_SRC_doctok_ResourceIds_xsl=$(writerfilter_SRC)/doctok/resourceids.xsl
writerfilter_SRC_doctok_ResourceTools_xsl=$(writerfilter_SRC)/doctok/resourcetools.xsl
writerfilter_SRC_doctok_ResourcesImpl_xsl=$(writerfilter_SRC)/doctok/resourcesimpl.xsl
writerfilter_SRC_doctok_Resources_xsl=$(writerfilter_SRC)/doctok/resources.xsl
writerfilter_SRC_doctok_SprmCodeToStr_xsl=$(writerfilter_SRC)/doctok/sprmcodetostr.xsl
writerfilter_SRC_doctok_SprmIds_xsl=$(writerfilter_SRC)/doctok/sprmids.xsl
writerfilter_SRC_model_NamespacePreprocess=$(writerfilter_SRC)/resourcemodel/namespace_preprocess.pl
...
...
@@ -118,10 +115,6 @@ $(writerfilter_GEN_doctok_Resources_cxx) : $(writerfilter_SRC_doctok_Model) $(wr
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,XSL,1)
$(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_doctok_ResourcesImpl_xsl) $(writerfilter_SRC_doctok_Model)) > $@
$(writerfilter_GEN_doctok_Resources_hxx) : $(writerfilter_SRC_doctok_Model) $(writerfilter_SRC_doctok_Resources_xsl) | $(writerfilter_WORK)/doctok/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,XSL,1)
$(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_doctok_Resources_xsl) $(writerfilter_SRC_doctok_Model)) > $@
$(writerfilter_GEN_doctok_SprmIds_hxx) : $(writerfilter_SRC_doctok_Model) $(writerfilter_SRC_doctok_SprmIds_xsl) | $(writerfilter_WORK)/doctok/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,XSL,1)
$(call gb_Helper_abbreviate_dirs, $(writerfilter_XSLTCOMMAND) $(writerfilter_SRC_doctok_SprmIds_xsl) $(writerfilter_SRC_doctok_Model)) > $@
...
...
writerfilter/source/doctok/resources.xsl
deleted
100644 → 0
Dosyayı görüntüle @
a5297c08
<!--
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 .
-->
<xsl:stylesheet
version=
"1.0"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:office=
"urn:oasis:names:tc:opendocument:xmlns:office:1.0"
xmlns:style=
"urn:oasis:names:tc:opendocument:xmlns:style:1.0"
xmlns:text=
"urn:oasis:names:tc:opendocument:xmlns:text:1.0"
xmlns:table=
"urn:oasis:names:tc:opendocument:xmlns:table:1.0"
xmlns:draw=
"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
xmlns:fo=
"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xmlns:dc=
"http://purl.org/dc/elements/1.1/"
xmlns:meta=
"urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
xmlns:number=
"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
xmlns:svg=
"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
xmlns:chart=
"urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
xmlns:dr3d=
"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
xmlns:math=
"http://www.w3.org/1998/Math/MathML"
xmlns:form=
"urn:oasis:names:tc:opendocument:xmlns:form:1.0"
xmlns:script=
"urn:oasis:names:tc:opendocument:xmlns:script:1.0"
xmlns:config=
"urn:oasis:names:tc:opendocument:xmlns:config:1.0"
xmlns:ooo=
"http://openoffice.org/2004/office"
xmlns:ooow=
"http://openoffice.org/2004/writer"
xmlns:oooc=
"http://openoffice.org/2004/calc"
xmlns:dom=
"http://www.w3.org/2001/xml-events"
xmlns:xforms=
"http://www.w3.org/2002/xforms"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs=
"http://www.w3.org/2000/01/rdf-schema#"
xmlns:UML =
'org.omg.xmi.namespace.UML'
xml:space=
"default"
>
<xsl:output
method=
"text"
/>
<xsl:template
match=
"/"
>
<out
xml:space=
"preserve"
>
<xsl:text>
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 .
*/
/*
THIS FILE IS GENERATED AUTOMATICALLY! DO NOT EDIT!
*/
#ifndef INCLUDED_RESOURCES_HXX
#define INCLUDED_RESOURCES_HXX
#include
<
vector
>
#include
<
boost/shared_ptr.hpp
>
#include
<
resourcemodel/OutputWithDepth.hxx
>
#include
<
doctok/resourceids.hxx
>
namespace writerfilter {
namespace doctok {
using namespace ::std;


</xsl:text>
<xsl:apply-templates
select=
"//UML:Class"
mode=
"class"
/>
<xsl:text>
OUString getDffOptName(sal_uInt32 nPid);
}}
#endif // INCLUDED_RESOURCES_HXX


</xsl:text></out>
</xsl:template>
<xsl:template
match=
"UML:Class"
mode=
"class"
>
<xsl:choose>
<xsl:when
test=
'.//UML:Stereotype[@xmi.idref = "dffrecord"]'
>
<xsl:apply-templates
select=
"."
mode=
"dffrecord"
/>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template
match=
'UML:Class'
mode=
'declsProperties'
>
<xsl:choose>
<xsl:when
test=
'.//UML:Stereotype[@xmi.idref ="withmembers"]'
>
<xsl:for-each
select=
'.//UML:Attribute[@name!="reserved"]'
>
<xsl:apply-templates
select=
'.'
mode=
'accessmembers'
/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:variable
name=
"debug"
>
<xsl:choose>
<xsl:when
test=
'.//UML:Stereotype[@xmi.idref="debug"]'
>
<xsl:text>
true
</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>
false
</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:for-each
select=
'.//UML:Attribute[@name!="reserved"]'
>
<xsl:apply-templates
select=
'.'
mode=
'access'
>
<xsl:with-param
name=
"debug"
>
<xsl:value-of
select=
"$debug"
/>
</xsl:with-param>
</xsl:apply-templates>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
<xsl:for-each
select=
'.//UML:Operation[@name!="reserved"]'
>
<xsl:apply-templates
select=
'.'
mode=
'declsOperations'
/>
</xsl:for-each>
</xsl:template>
<xsl:template
match=
"UML:Class"
mode=
"resolveProperties"
>
<xsl:if
test=
'.//UML:Stereotype[@xmi.idref = "resolvenoauto"]'
>
void resolveNoAuto(Properties
&
rHandler);
</xsl:if>
void resolve(Properties
&
rHandler);
</xsl:template>
<xsl:template
match=
"UML:Class"
mode=
"declsTable"
>
sal_uInt32 getEntryCount();
writerfilter::Reference
<
Properties
>
::Pointer_t getEntry(sal_uInt32 nIndex);
</xsl:template>
<xsl:template
match=
"UML:Class"
mode=
"resolveTable"
>
void resolve(Table
&
rHandler);
</xsl:template>
<xsl:template
match=
"UML:Attribute"
mode=
"access"
>
<xsl:param
name=
"debug"
/>
<xsl:variable
name=
"stereotype"
><xsl:value-of
select=
".//UML:Stereotype[1]/@xmi.idref"
/></xsl:variable>
<xsl:variable
name=
"offset_"
><xsl:value-of
select=
'translate(.//UML:TaggedValue[.//UML:TagDefinition/@xmi.idref="offset"]/UML:TaggedValue.dataValue, "ABCDEFX", "abcdefx")'
/></xsl:variable>
<xsl:variable
name=
"offset"
>
<xsl:value-of
select=
'$offset_'
/>
</xsl:variable>
<xsl:variable
name=
"shift"
><xsl:value-of
select=
'.//UML:TaggedValue[.//UML:TagDefinition/@xmi.idref="shift"]/UML:TaggedValue.dataValue'
/></xsl:variable>
<xsl:variable
name=
"mask_"
><xsl:value-of
select=
'translate(.//UML:TaggedValue[.//UML:TagDefinition/@xmi.idref="mask"]/UML:TaggedValue.dataValue, "ABCDEFX", "abcdefx")'
/></xsl:variable>
<xsl:variable
name=
"mask"
>
<xsl:if
test=
'$mask_ != "" and not(starts-with($mask_, "0x"))'
>
0x
</xsl:if>
<xsl:value-of
select=
'$mask_'
/>
</xsl:variable>
<xsl:variable
name=
'type'
>
<xsl:value-of
select=
"UML:StructuralFeature.type/UML:DataType/@xmi.idref"
/>
</xsl:variable>
<xsl:variable
name=
"completetype"
>
<xsl:text>
WW8
</xsl:text>
<xsl:value-of
select=
"$type"
/>
</xsl:variable>
<xsl:variable
name=
"saltype"
>
<xsl:apply-templates
select=
"."
mode=
"returntype"
/>
</xsl:variable>
<xsl:variable
name=
'typetype'
>
<xsl:call-template
name=
'typetype'
>
<xsl:with-param
name=
'type'
><xsl:value-of
select=
"$type"
/></xsl:with-param>
</xsl:call-template>
</xsl:variable>
/**
<xsl:value-of
select=
'.//UML:TaggedValue[.//UML:TagDefinition/@xmi.idref="comment"]/UML:TaggedValue.dataValue'
/>
<
table
>
<
tr
>
<
th
>
Name
<
/th
>
<
td
>
<xsl:value-of
select=
'@name'
/>
(
<xsl:value-of
select=
'$stereotype'
/>
)
<
/td
>
<
/tr
>
<
tr
>
<
th
>
Offset
<
/th
>
<
td
>
<xsl:value-of
select=
'$offset'
/>
<
/td
>
<
/tr
>
<
tr
>
<
th
>
Mask
<
/th
>
<
td
>
<xsl:value-of
select=
'$mask'
/>
<
/td
>
<
/tr
>
<
tr
>
<
th
>
Shift
<
/th
>
<
td
>
<xsl:value-of
select=
'$shift'
/>
<
/td
>
<
/tr
>
<
/table
>
*/
<xsl:choose>
<xsl:when
test=
'$stereotype = "attribute"'
>
<xsl:if
test=
'././/UML:Stereotype[@xmi.idref="virtual"]'
>
<xsl:text>
virtual
</xsl:text>
</xsl:if>
<xsl:value-of
select=
'$saltype'
/>
get_
<xsl:value-of
select=
'@name'
/>
() const
{
<xsl:if
test=
'$debug="true"'
>
<xsl:text>
clog
<<
"
<
called
>
</xsl:text>
<xsl:value-of
select=
"@name"
/>
<xsl:text>
<
/called
>
"
<<
endl;


</xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when
test=
'././/UML:Stereotype[@xmi.idref="attributeremainder"]'
>
<xsl:text>
return writerfilter::Reference
<
BinaryObj
>
::Pointer_t(new WW8BinaryObjReference(getRemainder(
</xsl:text>
<xsl:value-of
select=
"$offset"
/>
<xsl:text>
)));


</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when
test=
'$typetype = "complex"'
>
<xsl:text>
return
</xsl:text>
<xsl:value-of
select=
"$saltype"
/>
<xsl:text>
(new
</xsl:text>
<xsl:value-of
select=
"$completetype"
/>
<xsl:text>
(*this,
</xsl:text>
<xsl:value-of
select=
"$offset"
/>
<xsl:text>
));


</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>
return (get
</xsl:text>
<xsl:value-of
select=
"$type"
/>
<xsl:text>
(
</xsl:text>
<xsl:value-of
select=
"$offset"
/>
<xsl:text>
)
</xsl:text>
<xsl:if
test=
"string-length($mask)>0"
>
<xsl:text>
&
</xsl:text>
<xsl:value-of
select=
"$mask"
/>
</xsl:if>
<xsl:text>
)
</xsl:text>
<xsl:if
test=
"$shift>0"
>
<xsl:text>
>>
</xsl:text>
<xsl:value-of
select=
"$shift"
/>
</xsl:if>
<xsl:text>
;
</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
}
</xsl:when>
<xsl:when
test=
'$stereotype = "array"'
>
<xsl:text>
sal_uInt32 get_
</xsl:text>
<xsl:value-of
select=
'@name'
/>
<xsl:text>
_count() const
</xsl:text>
<xsl:choose>
<xsl:when
test=
'.//UML:TaggedValue[.//UML:TagDefinition/@xmi.idref = "arraycount"]'
>
<xsl:text>
{ return
</xsl:text>
<xsl:value-of
select=
'.//UML:TaggedValue[.//UML:TagDefinition/@xmi.idref = "arraycount"]/UML:TaggedValue.dataValue'
/>
<xsl:text>
; }


</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>
;


</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of
select=
'$saltype'
/>
<xsl:text>
get_
</xsl:text>
<xsl:value-of
select=
'@name'
/>
<xsl:text>
(sal_uInt32 nIndex) const {
</xsl:text>
<xsl:choose>
<xsl:when
test=
"$typetype='complex'"
>
<xsl:text>
return
</xsl:text>
<xsl:value-of
select=
"$saltype"
/>
<xsl:text>
( new
</xsl:text>
<xsl:value-of
select=
"$completetype"
/>
<xsl:text>
(static_cast
<
const WW8StructBase
>
(*this),
</xsl:text>
<xsl:value-of
select=
"$offset"
/>
<xsl:text>
+ nIndex *
</xsl:text>
<xsl:value-of
select=
"$completetype"
/>
<xsl:text>
::getSize()));
</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>
return get
</xsl:text>
<xsl:value-of
select=
'$type'
/>
<xsl:text>
(
</xsl:text><xsl:value-of
select=
'$offset'
/>
<xsl:text>
+ nIndex * sizeof(
</xsl:text>
<xsl:value-of
select=
'$saltype'
/>
<xsl:text>
))
</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text>
; }


</xsl:text>
</xsl:when>
<xsl:when
test=
'$stereotype = "string"'
>
OUString get_
<xsl:value-of
select=
'@name'
/>
() const { return getString(
<xsl:value-of
select=
'$offset'
/>
); }
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template
match=
'UML:Attribute'
mode=
'accessmembers'
>
<xsl:text>
</xsl:text>
<xsl:call-template
name=
'saltype'
>
<xsl:with-param
name=
'type'
>
<xsl:value-of
select=
'.//UML:DataType/@xmi.idref'
/>
</xsl:with-param>
</xsl:call-template>
<xsl:text>
get_
</xsl:text>
<xsl:value-of
select=
'@name'
/>
<xsl:text>
() const { return m
</xsl:text>
<xsl:value-of
select=
'@name'
/>
<xsl:text>
; }
</xsl:text>
</xsl:template>
<xsl:template
match=
"UML:Operation"
mode=
"declsOperations"
>
<xsl:choose>
<xsl:when
test=
'.//UML:Stereotype/@xmi.idref = "array"'
>
<xsl:variable
name=
"elementtype"
>
<xsl:value-of
select=
'.//UML:Parameter.type/UML:Class/@xmi.idref'
/>
</xsl:variable>
<xsl:variable
name=
"parentclass"
>
<xsl:call-template
name=
'parenttype'
>
<xsl:with-param
name=
'type'
>
<xsl:value-of
select=
'$elementtype'
/>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:variable
name=
'saltype'
>
<xsl:call-template
name=
'saltype'
>
<xsl:with-param
name=
'type'
>
<xsl:value-of
select=
'$elementtype'
/>
</xsl:with-param>
<xsl:with-param
name=
'parenttype'
>
<xsl:value-of
select=
'$parentclass'
/>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
/**
Array:
<xsl:value-of
select=
"@name"
/>
ElementType:
<xsl:value-of
select=
"$elementtype"
/>
(
<xsl:value-of
select=
"$parentclass"
/>
)
*/
sal_uInt32 get_
<xsl:value-of
select=
"@name"
/>
_count();
<xsl:text>
</xsl:text><xsl:value-of
select=
'$saltype'
/>
get_
<xsl:value-of
select=
"@name"
/>
(sal_uInt32 pos);
</xsl:when>
<xsl:when
test=
'.//UML:Stereotype/@xmi.idref = "attribute" or .//UML:Stereotype/@xmi.idref = "binary"'
>
<xsl:variable
name=
"returntype_"
>
<xsl:value-of
select=
'.//UML:Parameter.type/UML:Class/@xmi.idref'
/>
</xsl:variable>
<xsl:variable
name=
"returntype"
>
<xsl:call-template
name=
'saltype'
>
<xsl:with-param
name=
'type'
>
<xsl:value-of
select=
'$returntype_'
/>
</xsl:with-param>
<xsl:with-param
name=
'parenttype'
>
<xsl:call-template
name=
'parenttype'
>
<xsl:with-param
name=
'type'
>
<xsl:value-of
select=
'$returntype_'
/>
</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
/**
Operation:
<xsl:value-of
select=
"@name"
/>
*/
<xsl:text>
</xsl:text>
<xsl:value-of
select=
'$returntype'
/>
<xsl:text>
get_
</xsl:text>
<xsl:value-of
select=
'@name'
/>
<xsl:text>
();


</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template
match=
"UML:Attribute"
mode=
'declmembers'
>
<xsl:text>
</xsl:text>
<xsl:call-template
name=
'saltype'
>
<xsl:with-param
name=
'type'
>
<xsl:value-of
select=
'.//UML:DataType/@xmi.idref'
/>
</xsl:with-param>
</xsl:call-template>
<xsl:text>
m
</xsl:text>
<xsl:value-of
select=
"@name"
/>
<xsl:text>
;
</xsl:text>
</xsl:template>
<xsl:template
name=
'idtoqname'
>
<xsl:param
name=
'id'
/>
NS_
<xsl:value-of
select=
'substring-before($id, ":")'
/>
::LN_
<xsl:value-of
select=
'substring-after($id, ":")'
/>
</xsl:template>
<xsl:template
name=
'saltype'
>
<xsl:param
name=
'type'
/>
<xsl:param
name=
'parenttype'
/>
<xsl:choose>
<xsl:when
test=
"$type='U8'"
>
sal_uInt8
</xsl:when>
<xsl:when
test=
"$type='S8'"
>
sal_Int8
</xsl:when>
<xsl:when
test=
"$type='U16'"
>
sal_uInt16
</xsl:when>
<xsl:when
test=
"$type='S16'"
>
sal_Int16
</xsl:when>
<xsl:when
test=
"$type='U32'"
>
sal_uInt32
</xsl:when>
<xsl:when
test=
"$type='S32'"
>
sal_Int32
</xsl:when>
<xsl:when
test=
"$type='String'"
>
OUString
</xsl:when>
<xsl:when
test=
"$type='Value'"
>
WW8Value::Pointer_t
</xsl:when>
<xsl:when
test=
"$type='Binary'"
>
WW8BinaryObjReference::Pointer_t
</xsl:when>
<xsl:when
test=
"$parenttype=''"
>
<xsl:value-of
select=
"$type"
/>
</xsl:when>
<xsl:otherwise>
<xsl:text>
writerfilter::Reference
<
</xsl:text>
<xsl:value-of
select=
'$parenttype'
/>
<xsl:text>
>
::Pointer_t
</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template
name=
'typetype'
>
<xsl:param
name=
'type'
/><xsl:choose>
<xsl:when
test=
"$type='U8'"
>
simple
</xsl:when>
<xsl:when
test=
"$type='S8'"
>
simple
</xsl:when>
<xsl:when
test=
"$type='U16'"
>
simple
</xsl:when>
<xsl:when
test=
"$type='S16'"
>
simple
</xsl:when>
<xsl:when
test=
"$type='U32'"
>
simple
</xsl:when>
<xsl:when
test=
"$type='S32'"
>
simple
</xsl:when>
<xsl:when
test=
"$type='String'"
>
string
</xsl:when>
<xsl:when
test=
"$type='Value'"
>
value
</xsl:when>
<xsl:otherwise>
complex
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template
match=
"UML:Attribute"
mode=
"valuetype"
>
<xsl:variable
name=
'type'
>
<xsl:value-of
select=
'.//UML:DataType/@xmi.idref'
/>
</xsl:variable>
<xsl:choose>
<xsl:when
test=
'$type="U8"'
>
WW8IntValue
</xsl:when>
<xsl:when
test=
'$type="S8"'
>
WW8IntValue
</xsl:when>
<xsl:when
test=
'$type="U16"'
>
WW8IntValue
</xsl:when>
<xsl:when
test=
'$type="S16"'
>
WW8IntValue
</xsl:when>
<xsl:when
test=
'$type="U32"'
>
WW8IntValue
</xsl:when>
<xsl:when
test=
'$type="S32"'
>
WW8IntValue
</xsl:when>
<xsl:otherwise>
WW8PropertiesValue
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template
name=
"parenttype"
>
<xsl:param
name=
'type'
/>
<xsl:for-each
select=
'/XMI/XMI.content/UML:Model/UML:Namespace.ownedElement/UML:Generalization[UML:Generalization.child/UML:Class/@xmi.idref=$type]'
>
<xsl:value-of
select=
'./UML:Generalization.parent/UML:Class/@xmi.idref'
/>
</xsl:for-each>
</xsl:template>
<xsl:template
match=
"UML:Attribute"
mode=
"returntype"
>
<xsl:variable
name=
'type'
>
<xsl:value-of
select=
"UML:StructuralFeature.type/UML:DataType/@xmi.idref"
/>
</xsl:variable>
<xsl:call-template
name=
'saltype'
>
<xsl:with-param
name=
'type'
>
<xsl:value-of
select=
"$type"
/>
</xsl:with-param>
<xsl:with-param
name=
'parenttype'
>
<xsl:call-template
name=
'parenttype'
>
<xsl:with-param
name=
'type'
><xsl:value-of
select=
'$type'
/></xsl:with-param>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
</xsl:stylesheet>
writerfilter/source/doctok/resourcesimpl.xsl
Dosyayı görüntüle @
bbb9f4f7
...
...
@@ -24,7 +24,7 @@
<xsl:template
match=
"/"
>
<xsl:call-template
name=
"licenseheader"
/>
<xsl:text>
#include
<
doctok/resources
.hxx
>
#include
<
resourcemodel/WW8ResourceModel
.hxx
>
#ifndef INCLUDED_SPRMIDS_HXX
#include
<
doctok/sprmids.hxx
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment