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
3f1f2d71
Kaydet (Commit)
3f1f2d71
authored
Agu 28, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
drawingml: remove AUTONUM macro, unneded checks
Change-Id: Ie0ad7ed9df9d0d1b19fa09b3a4b93a5cbd6b41c6
üst
2fa3aed1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
33 deletions
+35
-33
drawingml.cxx
oox/source/export/drawingml.cxx
+35
-33
No files found.
oox/source/export/drawingml.cxx
Dosyayı görüntüle @
3f1f2d71
...
@@ -1386,7 +1386,8 @@ void DrawingML::WriteRun( Reference< XTextRange > rRun )
...
@@ -1386,7 +1386,8 @@ void DrawingML::WriteRun( Reference< XTextRange > rRun )
if
(
sText
.
isEmpty
())
{
if
(
sText
.
isEmpty
())
{
Reference
<
XPropertySet
>
xPropSet
(
rRun
,
UNO_QUERY
);
Reference
<
XPropertySet
>
xPropSet
(
rRun
,
UNO_QUERY
);
try
{
try
{
if
(
!
xPropSet
.
is
()
||
!
(
xPropSet
->
getPropertyValue
(
"PlaceholderText"
)
>>=
sText
)
)
if
(
!
xPropSet
.
is
()
||
!
(
xPropSet
->
getPropertyValue
(
"PlaceholderText"
)
>>=
sText
)
)
return
;
return
;
if
(
sText
.
isEmpty
()
)
if
(
sText
.
isEmpty
()
)
...
@@ -1422,44 +1423,45 @@ void DrawingML::WriteRun( Reference< XTextRange > rRun )
...
@@ -1422,44 +1423,45 @@ void DrawingML::WriteRun( Reference< XTextRange > rRun )
mpFS
->
endElementNS
(
XML_a
,
XML_r
);
mpFS
->
endElementNS
(
XML_a
,
XML_r
);
}
}
#define AUTONUM(x) \
OUString
GetAutoNumType
(
sal_Int16
nNumberingType
,
bool
bSDot
,
bool
bPBehind
,
bool
bPBoth
)
if( bPBoth ) \
pAutoNumType = #x "ParenBoth"; \
else if( bPBehind ) \
pAutoNumType = #x "ParenR"; \
else if( bSDot ) \
pAutoNumType = #x "Period";
inline
static
const
char
*
GetAutoNumType
(
sal_Int16
nNumberingType
,
bool
bSDot
,
bool
bPBehind
,
bool
bPBoth
)
{
{
const
char
*
pAutoNumType
=
NULL
;
OUString
sPrefixSuffix
;
if
(
bPBoth
)
sPrefixSuffix
=
"ParenBoth"
;
else
if
(
bPBehind
)
sPrefixSuffix
=
"ParenR"
;
else
if
(
bSDot
)
sPrefixSuffix
=
"Period"
;
switch
(
(
SvxExtNumType
)
nNumberingType
)
switch
(
(
SvxExtNumType
)
nNumberingType
)
{
{
case
SVX_NUM_CHARS_UPPER_LETTER_N
:
case
SVX_NUM_CHARS_UPPER_LETTER_N
:
case
SVX_NUM_CHARS_UPPER_LETTER
:
case
SVX_NUM_CHARS_UPPER_LETTER
:
AUTONUM
(
alphaUc
)
;
return
OUString
(
"alphaUc"
)
+
sPrefixSuffix
;
break
;
case
SVX_NUM_CHARS_LOWER_LETTER_N
:
case
SVX_NUM_CHARS_LOWER_LETTER_N
:
case
SVX_NUM_CHARS_LOWER_LETTER
:
case
SVX_NUM_CHARS_LOWER_LETTER
:
AUTONUM
(
alphaLc
)
;
return
OUString
(
"alphaLc"
)
+
sPrefixSuffix
;
break
;
case
SVX_NUM_ROMAN_UPPER
:
case
SVX_NUM_ROMAN_UPPER
:
AUTONUM
(
romanUc
)
;
return
OUString
(
"romanUc"
)
+
sPrefixSuffix
;
break
;
case
SVX_NUM_ROMAN_LOWER
:
case
SVX_NUM_ROMAN_LOWER
:
AUTONUM
(
romanLc
)
;
return
OUString
(
"romanLc"
)
+
sPrefixSuffix
;
break
;
case
SVX_NUM_ARABIC
:
case
SVX_NUM_ARABIC
:
AUTONUM
(
arabic
)
{
if
(
sPrefixSuffix
.
isEmpty
())
return
OUString
(
"arabicPlain"
);
else
else
pAutoNumType
=
"arabicPlain"
;
return
OUString
(
"arabic"
)
+
sPrefixSuffix
;
break
;
}
default
:
default
:
break
;
break
;
}
}
return
pAutoNumType
;
return
OUString
()
;
}
}
void
DrawingML
::
WriteParagraphNumbering
(
Reference
<
XPropertySet
>
rXPropSet
,
sal_Int16
nLevel
)
void
DrawingML
::
WriteParagraphNumbering
(
Reference
<
XPropertySet
>
rXPropSet
,
sal_Int16
nLevel
)
...
@@ -1520,7 +1522,6 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
...
@@ -1520,7 +1522,6 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
else
if
(
aPropName
==
"BulletChar"
)
else
if
(
aPropName
==
"BulletChar"
)
{
{
aBulletChar
=
OUString
(
*
(
(
OUString
*
)
pValue
)
)[
0
];
aBulletChar
=
OUString
(
*
(
(
OUString
*
)
pValue
)
)[
0
];
//printf ("bullet char: %d\n", aBulletChar.getStr());
}
}
else
if
(
aPropName
==
"BulletFont"
)
else
if
(
aPropName
==
"BulletFont"
)
{
{
...
@@ -1549,7 +1550,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
...
@@ -1549,7 +1550,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
if
(
pPropValue
[
i
].
Value
.
getValueType
()
==
cppu
::
UnoType
<
awt
::
Size
>::
get
())
if
(
pPropValue
[
i
].
Value
.
getValueType
()
==
cppu
::
UnoType
<
awt
::
Size
>::
get
())
{
{
// don't cast awt::Size to Size as on 64-bits they are not the same.
// don't cast awt::Size to Size as on 64-bits they are not the same.
::
com
::
sun
::
star
::
awt
::
Size
aSize
;
css
::
awt
::
Size
aSize
;
pPropValue
[
i
].
Value
>>=
aSize
;
pPropValue
[
i
].
Value
>>=
aSize
;
//aBuGraSize.nA = aSize.Width;
//aBuGraSize.nA = aSize.Width;
//aBuGraSize.nB = aSize.Height;
//aBuGraSize.nB = aSize.Height;
...
@@ -1559,10 +1560,6 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
...
@@ -1559,10 +1560,6 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
}
}
}
}
const
char
*
pAutoNumType
=
GetAutoNumType
(
nNumberingType
,
bSDot
,
bPBehind
,
bPBoth
);
if
(
nLevel
>=
0
)
{
if
(
!
aGraphicURL
.
isEmpty
()
)
if
(
!
aGraphicURL
.
isEmpty
()
)
{
{
OUString
sRelId
=
WriteImage
(
aGraphicURL
);
OUString
sRelId
=
WriteImage
(
aGraphicURL
);
...
@@ -1582,13 +1579,18 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
...
@@ -1582,13 +1579,18 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
XML_charset
,
(
aFontDesc
.
CharSet
==
awt
::
CharSet
::
SYMBOL
)
?
"2"
:
NULL
,
XML_charset
,
(
aFontDesc
.
CharSet
==
awt
::
CharSet
::
SYMBOL
)
?
"2"
:
NULL
,
FSEND
);
FSEND
);
if
(
pAutoNumType
)
OUString
pAutoNumType
=
GetAutoNumType
(
nNumberingType
,
bSDot
,
bPBehind
,
bPBoth
);
mpFS
->
singleElementNS
(
XML_a
,
XML_buAutoNum
,
XML_type
,
pAutoNumType
,
FSEND
);
if
(
!
pAutoNumType
.
isEmpty
())
{
mpFS
->
singleElementNS
(
XML_a
,
XML_buAutoNum
,
XML_type
,
OUStringToOString
(
pAutoNumType
,
RTL_TEXTENCODING_UTF8
).
getStr
(),
FSEND
);
}
else
else
{
{
aBulletChar
=
SubstituteBullet
(
aBulletChar
,
aFontDesc
);
aBulletChar
=
SubstituteBullet
(
aBulletChar
,
aFontDesc
);
mpFS
->
singleElementNS
(
XML_a
,
XML_buChar
,
XML_char
,
USS
(
OUString
(
aBulletChar
)
),
FSEND
);
mpFS
->
singleElementNS
(
XML_a
,
XML_buChar
,
XML_char
,
USS
(
OUString
(
aBulletChar
)
),
FSEND
);
}
}
}
}
}
}
}
...
...
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