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
fea94f21
Kaydet (Commit)
fea94f21
authored
Agu 07, 2014
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
writerfilter: Kill unnecessary indentation (return or continue early).
Change-Id: Iad20b8f9b453d413ce0d249c65b5f44767f0264b
üst
9fc83ae4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
70 deletions
+70
-70
OOXMLFactory.cxx
writerfilter/source/ooxml/OOXMLFactory.cxx
+70
-70
No files found.
writerfilter/source/ooxml/OOXMLFactory.cxx
Dosyayı görüntüle @
fea94f21
...
...
@@ -85,84 +85,84 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler,
Id
nDefine
=
pHandler
->
getDefine
();
OOXMLFactory_ns
::
Pointer_t
pFactory
=
getFactoryForNamespace
(
nDefine
);
if
(
pFactory
.
get
()
!=
NULL
)
if
(
pFactory
.
get
()
==
NULL
)
return
;
assert
(
dynamic_cast
<
sax_fastparser
::
FastAttributeList
*>
(
Attribs
.
get
()
)
!=
NULL
);
sax_fastparser
::
FastAttributeList
*
pAttribs
;
pAttribs
=
static_cast
<
sax_fastparser
::
FastAttributeList
*>
(
Attribs
.
get
()
);
const
AttributeInfo
*
pAttr
=
pFactory
->
getAttributeInfoArray
(
nDefine
);
if
(
!
pAttr
)
return
;
for
(;
pAttr
->
m_nToken
!=
-
1
;
++
pAttr
)
{
assert
(
dynamic_cast
<
sax_fastparser
::
FastAttributeList
*>
(
Attribs
.
get
()
)
!=
NULL
)
;
sax_fastparser
::
FastAttributeList
*
pAttribs
;
pAttribs
=
static_cast
<
sax_fastparser
::
FastAttributeList
*>
(
Attribs
.
get
()
)
;
sal_Int32
nToken
=
pAttr
->
m_nToken
;
if
(
!
pAttribs
->
hasAttribute
(
nToken
))
continue
;
const
AttributeInfo
*
pAttr
=
pFactory
->
getAttributeInfoArray
(
nDefine
);
if
(
!
pAttr
)
return
;
Id
nId
=
pFactory
->
getResourceId
(
nDefine
,
nToken
);
for
(;
pAttr
->
m_nToken
!=
-
1
;
++
pAttr
)
switch
(
pAttr
->
m_nResource
)
{
sal_Int32
nToken
=
pAttr
->
m_nToken
;
if
(
pAttribs
->
hasAttribute
(
nToken
))
case
RT_Boolean
:
{
Id
nId
=
pFactory
->
getResourceId
(
nDefine
,
nToken
);
switch
(
pAttr
->
m_nResource
)
const
char
*
pValue
=
""
;
pAttribs
->
getAsChar
(
nToken
,
pValue
);
OOXMLValue
::
Pointer_t
xValue
(
OOXMLBooleanValue
::
Create
(
pValue
));
pHandler
->
newProperty
(
nId
,
xValue
);
pFactory
->
attributeAction
(
pHandler
,
nToken
,
xValue
);
}
break
;
case
RT_String
:
{
OUString
aValue
(
pAttribs
->
getValue
(
nToken
));
OOXMLValue
::
Pointer_t
xValue
(
new
OOXMLStringValue
(
aValue
));
pHandler
->
newProperty
(
nId
,
xValue
);
pFactory
->
attributeAction
(
pHandler
,
nToken
,
xValue
);
}
break
;
case
RT_Integer
:
{
sal_Int32
nValue
;
pAttribs
->
getAsInteger
(
nToken
,
nValue
);
OOXMLValue
::
Pointer_t
xValue
=
OOXMLIntegerValue
::
Create
(
nValue
);
pHandler
->
newProperty
(
nId
,
xValue
);
pFactory
->
attributeAction
(
pHandler
,
nToken
,
xValue
);
}
break
;
case
RT_Hex
:
{
const
char
*
pValue
=
""
;
pAttribs
->
getAsChar
(
nToken
,
pValue
);
OOXMLValue
::
Pointer_t
xValue
(
new
OOXMLHexValue
(
pValue
));
pHandler
->
newProperty
(
nId
,
xValue
);
pFactory
->
attributeAction
(
pHandler
,
nToken
,
xValue
);
}
break
;
case
RT_UniversalMeasure
:
{
const
char
*
pValue
=
""
;
pAttribs
->
getAsChar
(
nToken
,
pValue
);
OOXMLValue
::
Pointer_t
xValue
(
new
OOXMLUniversalMeasureValue
(
pValue
));
pHandler
->
newProperty
(
nId
,
xValue
);
pFactory
->
attributeAction
(
pHandler
,
nToken
,
xValue
);
}
break
;
case
RT_List
:
{
sal_uInt32
nValue
;
if
(
pFactory
->
getListValue
(
pAttr
->
m_nRef
,
Attribs
->
getValue
(
nToken
),
nValue
))
{
case
RT_Boolean
:
{
const
char
*
pValue
=
""
;
pAttribs
->
getAsChar
(
nToken
,
pValue
);
OOXMLValue
::
Pointer_t
xValue
(
OOXMLBooleanValue
::
Create
(
pValue
));
pHandler
->
newProperty
(
nId
,
xValue
);
pFactory
->
attributeAction
(
pHandler
,
nToken
,
xValue
);
}
break
;
case
RT_String
:
{
OUString
aValue
(
pAttribs
->
getValue
(
nToken
));
OOXMLValue
::
Pointer_t
xValue
(
new
OOXMLStringValue
(
aValue
));
pHandler
->
newProperty
(
nId
,
xValue
);
pFactory
->
attributeAction
(
pHandler
,
nToken
,
xValue
);
}
break
;
case
RT_Integer
:
{
sal_Int32
nValue
;
pAttribs
->
getAsInteger
(
nToken
,
nValue
);
OOXMLValue
::
Pointer_t
xValue
=
OOXMLIntegerValue
::
Create
(
nValue
);
pHandler
->
newProperty
(
nId
,
xValue
);
pFactory
->
attributeAction
(
pHandler
,
nToken
,
xValue
);
}
break
;
case
RT_Hex
:
{
const
char
*
pValue
=
""
;
pAttribs
->
getAsChar
(
nToken
,
pValue
);
OOXMLValue
::
Pointer_t
xValue
(
new
OOXMLHexValue
(
pValue
));
pHandler
->
newProperty
(
nId
,
xValue
);
pFactory
->
attributeAction
(
pHandler
,
nToken
,
xValue
);
}
break
;
case
RT_UniversalMeasure
:
{
const
char
*
pValue
=
""
;
pAttribs
->
getAsChar
(
nToken
,
pValue
);
OOXMLValue
::
Pointer_t
xValue
(
new
OOXMLUniversalMeasureValue
(
pValue
));
pHandler
->
newProperty
(
nId
,
xValue
);
pFactory
->
attributeAction
(
pHandler
,
nToken
,
xValue
);
}
break
;
case
RT_List
:
{
sal_uInt32
nValue
;
if
(
pFactory
->
getListValue
(
pAttr
->
m_nRef
,
Attribs
->
getValue
(
nToken
),
nValue
))
{
OOXMLValue
::
Pointer_t
xValue
=
OOXMLIntegerValue
::
Create
(
nValue
);
pHandler
->
newProperty
(
nId
,
xValue
);
pFactory
->
attributeAction
(
pHandler
,
nToken
,
xValue
);
}
}
break
;
default
:
break
;
OOXMLValue
::
Pointer_t
xValue
=
OOXMLIntegerValue
::
Create
(
nValue
);
pHandler
->
newProperty
(
nId
,
xValue
);
pFactory
->
attributeAction
(
pHandler
,
nToken
,
xValue
);
}
}
break
;
default
:
break
;
}
}
}
...
...
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