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
ce46c98d
Kaydet (Commit)
ce46c98d
authored
Mar 25, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert BS_ constants to SvxBulletStyle enum class
Change-Id: I8d68394c29b7602b21f8d972552aa7226778d3ff
üst
701343b1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
24 deletions
+29
-24
bulitem.cxx
editeng/source/items/bulitem.cxx
+13
-11
bulletitem.hxx
include/editeng/bulletitem.hxx
+14
-11
drawdoc4.cxx
sd/source/core/drawdoc4.cxx
+2
-2
No files found.
editeng/source/items/bulitem.cxx
Dosyayı görüntüle @
ce46c98d
...
@@ -112,13 +112,15 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich )
...
@@ -112,13 +112,15 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich )
:
SfxPoolItem
(
_nWhich
)
:
SfxPoolItem
(
_nWhich
)
,
pGraphicObject
(
NULL
)
,
pGraphicObject
(
NULL
)
,
nStart
(
0
)
,
nStart
(
0
)
,
nStyle
(
0
)
,
nStyle
(
SvxBulletStyle
::
ABC_BIG
)
,
nScale
(
0
)
,
nScale
(
0
)
,
nJustify
(
0
)
,
nJustify
(
0
)
{
{
rStrm
.
ReadUInt16
(
nStyle
);
sal_uInt16
nTmp1
;
rStrm
.
ReadUInt16
(
nTmp1
);
nStyle
=
static_cast
<
SvxBulletStyle
>
(
nTmp1
);
if
(
nStyle
!=
BS_
BMP
)
if
(
nStyle
!=
SvxBulletStyle
::
BMP
)
aFont
=
CreateFont
(
rStrm
,
BULITEM_VERSION
);
aFont
=
CreateFont
(
rStrm
,
BULITEM_VERSION
);
else
else
{
{
...
@@ -138,7 +140,7 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich )
...
@@ -138,7 +140,7 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich )
if
(
aBmp
.
IsEmpty
()
)
if
(
aBmp
.
IsEmpty
()
)
{
{
rStrm
.
Seek
(
nOldPos
);
rStrm
.
Seek
(
nOldPos
);
nStyle
=
BS_
NONE
;
nStyle
=
SvxBulletStyle
::
NONE
;
}
}
else
else
pGraphicObject
=
new
GraphicObject
(
aBmp
);
pGraphicObject
=
new
GraphicObject
(
aBmp
);
...
@@ -218,7 +220,7 @@ void SvxBulletItem::SetDefaults_Impl()
...
@@ -218,7 +220,7 @@ void SvxBulletItem::SetDefaults_Impl()
pGraphicObject
=
NULL
;
pGraphicObject
=
NULL
;
nWidth
=
1200
;
// 1.2cm
nWidth
=
1200
;
// 1.2cm
nStart
=
1
;
nStart
=
1
;
nStyle
=
BS_
123
;
nStyle
=
SvxBulletStyle
::
N
123
;
nJustify
=
BJ_HLEFT
|
BJ_VCENTER
;
nJustify
=
BJ_HLEFT
|
BJ_VCENTER
;
cSymbol
=
' '
;
cSymbol
=
' '
;
nScale
=
75
;
nScale
=
75
;
...
@@ -283,10 +285,10 @@ bool SvxBulletItem::operator==( const SfxPoolItem& rItem ) const
...
@@ -283,10 +285,10 @@ bool SvxBulletItem::operator==( const SfxPoolItem& rItem ) const
aFollowText
!=
rBullet
.
aFollowText
)
aFollowText
!=
rBullet
.
aFollowText
)
return
false
;
return
false
;
if
(
(
nStyle
!=
BS_
BMP
)
&&
(
aFont
!=
rBullet
.
aFont
)
)
if
(
(
nStyle
!=
SvxBulletStyle
::
BMP
)
&&
(
aFont
!=
rBullet
.
aFont
)
)
return
false
;
return
false
;
if
(
nStyle
==
BS_
BMP
)
if
(
nStyle
==
SvxBulletStyle
::
BMP
)
{
{
if
(
(
pGraphicObject
&&
!
rBullet
.
pGraphicObject
)
||
(
!
pGraphicObject
&&
rBullet
.
pGraphicObject
)
)
if
(
(
pGraphicObject
&&
!
rBullet
.
pGraphicObject
)
||
(
!
pGraphicObject
&&
rBullet
.
pGraphicObject
)
)
return
false
;
return
false
;
...
@@ -307,7 +309,7 @@ bool SvxBulletItem::operator==( const SfxPoolItem& rItem ) const
...
@@ -307,7 +309,7 @@ bool SvxBulletItem::operator==( const SfxPoolItem& rItem ) const
SvStream
&
SvxBulletItem
::
Store
(
SvStream
&
rStrm
,
sal_uInt16
/*nItemVersion*/
)
const
SvStream
&
SvxBulletItem
::
Store
(
SvStream
&
rStrm
,
sal_uInt16
/*nItemVersion*/
)
const
{
{
// Correction for empty bitmap
// Correction for empty bitmap
if
(
(
nStyle
==
BS_
BMP
)
&&
if
(
(
nStyle
==
SvxBulletStyle
::
BMP
)
&&
(
!
pGraphicObject
||
(
GRAPHIC_NONE
==
pGraphicObject
->
GetType
()
)
||
(
GRAPHIC_DEFAULT
==
pGraphicObject
->
GetType
()
)
)
)
(
!
pGraphicObject
||
(
GRAPHIC_NONE
==
pGraphicObject
->
GetType
()
)
||
(
GRAPHIC_DEFAULT
==
pGraphicObject
->
GetType
()
)
)
)
{
{
if
(
pGraphicObject
)
if
(
pGraphicObject
)
...
@@ -316,12 +318,12 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) c
...
@@ -316,12 +318,12 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) c
const_cast
<
SvxBulletItem
*
>
(
this
)
->
pGraphicObject
=
NULL
;
const_cast
<
SvxBulletItem
*
>
(
this
)
->
pGraphicObject
=
NULL
;
}
}
const_cast
<
SvxBulletItem
*
>
(
this
)
->
nStyle
=
BS_
NONE
;
const_cast
<
SvxBulletItem
*
>
(
this
)
->
nStyle
=
SvxBulletStyle
::
NONE
;
}
}
rStrm
.
WriteUInt16
(
nStyle
);
rStrm
.
WriteUInt16
(
static_cast
<
sal_uInt16
>
(
nStyle
)
);
if
(
nStyle
!=
BS_
BMP
)
if
(
nStyle
!=
SvxBulletStyle
::
BMP
)
StoreFont
(
rStrm
,
aFont
);
StoreFont
(
rStrm
,
aFont
);
else
else
{
{
...
...
include/editeng/bulletitem.hxx
Dosyayı görüntüle @
ce46c98d
...
@@ -25,14 +25,17 @@
...
@@ -25,14 +25,17 @@
// define ----------------------------------------------------------------
// define ----------------------------------------------------------------
// Styles
// Styles
#define BS_ABC_BIG 0
enum
class
SvxBulletStyle
#define BS_ABC_SMALL 1
{
#define BS_ROMAN_BIG 2
ABC_BIG
=
0
,
#define BS_ROMAN_SMALL 3
ABC_SMALL
=
1
,
#define BS_123 4
ROMAN_BIG
=
2
,
#define BS_NONE 5
ROMAN_SMALL
=
3
,
#define BS_BULLET 6
N123
=
4
,
#define BS_BMP 128
NONE
=
5
,
BULLET
=
6
,
BMP
=
128
};
// Justification
// Justification
#define BJ_HLEFT 0x01
#define BJ_HLEFT 0x01
...
@@ -66,7 +69,7 @@ class EDITENG_DLLPUBLIC SvxBulletItem : public SfxPoolItem
...
@@ -66,7 +69,7 @@ class EDITENG_DLLPUBLIC SvxBulletItem : public SfxPoolItem
OUString
aPrevText
;
OUString
aPrevText
;
OUString
aFollowText
;
OUString
aFollowText
;
sal_uInt16
nStart
;
sal_uInt16
nStart
;
sal_uInt16
nStyle
;
SvxBulletStyle
nStyle
;
long
nWidth
;
long
nWidth
;
sal_uInt16
nScale
;
sal_uInt16
nScale
;
sal_Unicode
cSymbol
;
sal_Unicode
cSymbol
;
...
@@ -96,7 +99,7 @@ public:
...
@@ -96,7 +99,7 @@ public:
sal_uInt16
GetStart
()
const
{
return
nStart
;
}
sal_uInt16
GetStart
()
const
{
return
nStart
;
}
long
GetWidth
()
const
{
return
nWidth
;
}
long
GetWidth
()
const
{
return
nWidth
;
}
sal_uInt16
GetStyle
()
const
{
return
nStyle
;
}
SvxBulletStyle
GetStyle
()
const
{
return
nStyle
;
}
sal_uInt8
GetJustification
()
const
{
return
nJustify
;
}
sal_uInt8
GetJustification
()
const
{
return
nJustify
;
}
vcl
::
Font
GetFont
()
const
{
return
aFont
;
}
vcl
::
Font
GetFont
()
const
{
return
aFont
;
}
sal_uInt16
GetScale
()
const
{
return
nScale
;
}
sal_uInt16
GetScale
()
const
{
return
nScale
;
}
...
@@ -110,7 +113,7 @@ public:
...
@@ -110,7 +113,7 @@ public:
void
SetStart
(
sal_uInt16
nNew
)
{
nStart
=
nNew
;
}
void
SetStart
(
sal_uInt16
nNew
)
{
nStart
=
nNew
;
}
void
SetWidth
(
long
nNew
)
{
nWidth
=
nNew
;
}
void
SetWidth
(
long
nNew
)
{
nWidth
=
nNew
;
}
void
SetStyle
(
sal_uInt16
nNew
)
{
nStyle
=
nNew
;
}
void
SetStyle
(
SvxBulletStyle
nNew
)
{
nStyle
=
nNew
;
}
void
SetJustification
(
sal_uInt8
nNew
)
{
nJustify
=
nNew
;
}
void
SetJustification
(
sal_uInt8
nNew
)
{
nJustify
=
nNew
;
}
void
SetFont
(
const
vcl
::
Font
&
rNew
)
{
aFont
=
rNew
;
}
void
SetFont
(
const
vcl
::
Font
&
rNew
)
{
aFont
=
rNew
;
}
void
SetScale
(
sal_uInt16
nNew
)
{
nScale
=
nNew
;
}
void
SetScale
(
sal_uInt16
nNew
)
{
nScale
=
nNew
;
}
...
...
sd/source/core/drawdoc4.cxx
Dosyayı görüntüle @
ce46c98d
...
@@ -238,7 +238,7 @@ void SdDrawDocument::CreateLayoutTemplates()
...
@@ -238,7 +238,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// BulletItem and BulletFont for title and outline
// BulletItem and BulletFont for title and outline
SvxBulletItem
aBulletItem
(
EE_PARA_BULLET
);
SvxBulletItem
aBulletItem
(
EE_PARA_BULLET
);
// Identical in all layers
// Identical in all layers
aBulletItem
.
SetStyle
(
BS_
BULLET
);
aBulletItem
.
SetStyle
(
SvxBulletStyle
::
BULLET
);
aBulletItem
.
SetStart
(
1
);
aBulletItem
.
SetStart
(
1
);
aBulletItem
.
SetScale
(
45
);
// In percent
aBulletItem
.
SetScale
(
45
);
// In percent
...
@@ -1206,7 +1206,7 @@ void SdDrawDocument::SetTextDefaults() const
...
@@ -1206,7 +1206,7 @@ void SdDrawDocument::SetTextDefaults() const
vcl
::
Font
aBulletFont
(
SdStyleSheetPool
::
GetBulletFont
()
);
vcl
::
Font
aBulletFont
(
SdStyleSheetPool
::
GetBulletFont
()
);
aBulletFont
.
SetSize
(
Size
(
0
,
846
));
// 24 pt
aBulletFont
.
SetSize
(
Size
(
0
,
846
));
// 24 pt
aBulletItem
.
SetFont
(
aBulletFont
);
aBulletItem
.
SetFont
(
aBulletFont
);
aBulletItem
.
SetStyle
(
BS_
BULLET
);
aBulletItem
.
SetStyle
(
SvxBulletStyle
::
BULLET
);
aBulletItem
.
SetStart
(
1
);
aBulletItem
.
SetStart
(
1
);
aBulletItem
.
SetScale
(
45
);
// In percent
aBulletItem
.
SetScale
(
45
);
// In percent
aBulletItem
.
SetSymbol
(
0x25CF
);
// In points
aBulletItem
.
SetSymbol
(
0x25CF
);
// In points
...
...
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