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 )
if( sText.isEmpty()) {
Reference< XPropertySet > xPropSet( rRun, UNO_QUERY );
try
{
try
{
if( !xPropSet.is() || !( xPropSet->getPropertyValue( "PlaceholderText" ) >>= sText ) )
return;
if( sText.isEmpty() )
...
...
@@ -1422,44 +1423,45 @@ void DrawingML::WriteRun( Reference< XTextRange > rRun )
mpFS->endElementNS( XML_a, XML_r );
}
#define AUTONUM(x) \
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
)
OUString 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 )
{
case SVX_NUM_CHARS_UPPER_LETTER_N :
case SVX_NUM_CHARS_UPPER_LETTER :
AUTONUM
(
alphaUc
)
;
break
;
return OUString("alphaUc") + sPrefixSuffix
;
case SVX_NUM_CHARS_LOWER_LETTER_N :
case SVX_NUM_CHARS_LOWER_LETTER :
AUTONUM
(
alphaLc
)
;
break
;
return OUString("alphaLc") + sPrefixSuffix
;
case SVX_NUM_ROMAN_UPPER :
AUTONUM
(
romanUc
)
;
break
;
return OUString("romanUc") + sPrefixSuffix
;
case SVX_NUM_ROMAN_LOWER :
AUTONUM
(
romanLc
)
;
break
;
return OUString("romanLc") + sPrefixSuffix
;
case SVX_NUM_ARABIC :
AUTONUM
(
arabic
)
{
if (sPrefixSuffix.isEmpty())
return OUString("arabicPlain");
else
pAutoNumType
=
"arabicPlain"
;
break
;
return OUString("arabic") + sPrefixSuffix
;
}
default:
break;
}
return
pAutoNumType
;
return
OUString()
;
}
void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sal_Int16 nLevel )
...
...
@@ -1520,7 +1522,6 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
else if ( aPropName == "BulletChar" )
{
aBulletChar = OUString ( *( (OUString*)pValue ) )[ 0 ];
//printf ("bullet char: %d\n", aBulletChar.getStr());
}
else if ( aPropName == "BulletFont" )
{
...
...
@@ -1549,7 +1550,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
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.
::
com
::
sun
::
star
::
awt
::
Size
aSize
;
css
::awt::Size aSize;
pPropValue[ i ].Value >>= aSize;
//aBuGraSize.nA = aSize.Width;
//aBuGraSize.nB = aSize.Height;
...
...
@@ -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() )
{
OUString sRelId = WriteImage( aGraphicURL );
...
...
@@ -1582,13 +1579,18 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
XML_charset, (aFontDesc.CharSet == awt::CharSet::SYMBOL) ? "2" : NULL,
FSEND );
if
(
pAutoNumType
)
mpFS
->
singleElementNS
(
XML_a
,
XML_buAutoNum
,
XML_type
,
pAutoNumType
,
FSEND
);
OUString pAutoNumType = GetAutoNumType( nNumberingType, bSDot, bPBehind, bPBoth );
if (!pAutoNumType.isEmpty())
{
mpFS->singleElementNS(XML_a, XML_buAutoNum,
XML_type, OUStringToOString(pAutoNumType, RTL_TEXTENCODING_UTF8).getStr(),
FSEND);
}
else
{
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