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
18992f30
Kaydet (Commit)
18992f30
authored
Haz 21, 2015
tarafından
Maxim Monastirsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert NUM_PAGETYPE_ to a scoped enum
Change-Id: Iddc194a0d8f77e307c05bd3dfef1fc30568173c1
üst
4604a6a7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
30 deletions
+26
-30
numpages.cxx
cui/source/tabpages/numpages.cxx
+3
-7
numvset.hxx
include/svx/numvset.hxx
+10
-2
svxbmpnumvalueset.cxx
svx/source/dialog/svxbmpnumvalueset.cxx
+12
-17
bulletsnumbering.cxx
svx/source/tbxctrls/bulletsnumbering.cxx
+1
-4
No files found.
cui/source/tabpages/numpages.cxx
Dosyayı görüntüle @
18992f30
...
@@ -91,10 +91,6 @@ using namespace css::text;
...
@@ -91,10 +91,6 @@ using namespace css::text;
using
namespace
css
::
container
;
using
namespace
css
::
container
;
using
namespace
css
::
style
;
using
namespace
css
::
style
;
#define NUM_PAGETYPE_BULLET 0
#define NUM_PAGETYPE_SINGLENUM 1
#define NUM_PAGETYPE_NUM 2
#define SHOW_NUMBERING 0
#define SHOW_NUMBERING 0
#define SHOW_BULLET 1
#define SHOW_BULLET 1
#define SHOW_BITMAP 2
#define SHOW_BITMAP 2
...
@@ -197,7 +193,7 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(vcl::Window* pParent,
...
@@ -197,7 +193,7 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(vcl::Window* pParent,
{
{
SetExchangeSupport
();
SetExchangeSupport
();
get
(
m_pExamplesVS
,
"valueset"
);
get
(
m_pExamplesVS
,
"valueset"
);
m_pExamplesVS
->
init
(
N
UM_PAGETYPE_
SINGLENUM
);
m_pExamplesVS
->
init
(
N
umberingPageType
::
SINGLENUM
);
m_pExamplesVS
->
SetSelectHdl
(
LINK
(
this
,
SvxSingleNumPickTabPage
,
NumSelectHdl_Impl
));
m_pExamplesVS
->
SetSelectHdl
(
LINK
(
this
,
SvxSingleNumPickTabPage
,
NumSelectHdl_Impl
));
m_pExamplesVS
->
SetDoubleClickHdl
(
LINK
(
this
,
SvxSingleNumPickTabPage
,
DoubleClickHdl_Impl
));
m_pExamplesVS
->
SetDoubleClickHdl
(
LINK
(
this
,
SvxSingleNumPickTabPage
,
DoubleClickHdl_Impl
));
...
@@ -394,7 +390,7 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(vcl::Window* pParent,
...
@@ -394,7 +390,7 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(vcl::Window* pParent,
{
{
SetExchangeSupport
();
SetExchangeSupport
();
get
(
m_pExamplesVS
,
"valueset"
);
get
(
m_pExamplesVS
,
"valueset"
);
m_pExamplesVS
->
init
(
N
UM_PAGETYPE_
BULLET
),
m_pExamplesVS
->
init
(
N
umberingPageType
::
BULLET
),
m_pExamplesVS
->
SetSelectHdl
(
LINK
(
this
,
SvxBulletPickTabPage
,
NumSelectHdl_Impl
));
m_pExamplesVS
->
SetSelectHdl
(
LINK
(
this
,
SvxBulletPickTabPage
,
NumSelectHdl_Impl
));
m_pExamplesVS
->
SetDoubleClickHdl
(
LINK
(
this
,
SvxBulletPickTabPage
,
DoubleClickHdl_Impl
));
m_pExamplesVS
->
SetDoubleClickHdl
(
LINK
(
this
,
SvxBulletPickTabPage
,
DoubleClickHdl_Impl
));
}
}
...
@@ -567,7 +563,7 @@ SvxNumPickTabPage::SvxNumPickTabPage(vcl::Window* pParent,
...
@@ -567,7 +563,7 @@ SvxNumPickTabPage::SvxNumPickTabPage(vcl::Window* pParent,
SetExchangeSupport
();
SetExchangeSupport
();
get
(
m_pExamplesVS
,
"valueset"
);
get
(
m_pExamplesVS
,
"valueset"
);
m_pExamplesVS
->
init
(
N
UM_PAGETYPE_NUM
);
m_pExamplesVS
->
init
(
N
umberingPageType
::
OUTLINE
);
m_pExamplesVS
->
SetSelectHdl
(
LINK
(
this
,
SvxNumPickTabPage
,
NumSelectHdl_Impl
));
m_pExamplesVS
->
SetSelectHdl
(
LINK
(
this
,
SvxNumPickTabPage
,
NumSelectHdl_Impl
));
m_pExamplesVS
->
SetDoubleClickHdl
(
LINK
(
this
,
SvxNumPickTabPage
,
DoubleClickHdl_Impl
));
m_pExamplesVS
->
SetDoubleClickHdl
(
LINK
(
this
,
SvxNumPickTabPage
,
DoubleClickHdl_Impl
));
...
...
include/svx/numvset.hxx
Dosyayı görüntüle @
18992f30
...
@@ -47,10 +47,18 @@ struct SvxBmpItemInfo
...
@@ -47,10 +47,18 @@ struct SvxBmpItemInfo
sal_uInt16
nItemId
;
sal_uInt16
nItemId
;
};
};
enum
class
NumberingPageType
{
BULLET
,
SINGLENUM
,
OUTLINE
,
BITMAP
};
class
SVX_DLLPUBLIC
SvxNumValueSet
:
public
ValueSet
class
SVX_DLLPUBLIC
SvxNumValueSet
:
public
ValueSet
{
{
Color
aLineColor
;
Color
aLineColor
;
sal_uInt16
n
PageType
;
NumberingPageType
e
PageType
;
bool
bHTMLMode
;
bool
bHTMLMode
;
Rectangle
aOrgRect
;
Rectangle
aOrgRect
;
VclPtr
<
VirtualDevice
>
pVDev
;
VclPtr
<
VirtualDevice
>
pVDev
;
...
@@ -68,7 +76,7 @@ class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet
...
@@ -68,7 +76,7 @@ class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet
public
:
public
:
SvxNumValueSet
(
vcl
::
Window
*
pParent
,
WinBits
nWinBits
=
WB_TABSTOP
);
SvxNumValueSet
(
vcl
::
Window
*
pParent
,
WinBits
nWinBits
=
WB_TABSTOP
);
void
init
(
sal_uInt16
n
Type
);
void
init
(
NumberingPageType
e
Type
);
virtual
~
SvxNumValueSet
();
virtual
~
SvxNumValueSet
();
virtual
void
dispose
()
SAL_OVERRIDE
;
virtual
void
dispose
()
SAL_OVERRIDE
;
...
...
svx/source/dialog/svxbmpnumvalueset.cxx
Dosyayı görüntüle @
18992f30
...
@@ -64,11 +64,6 @@ using namespace com::sun::star::text;
...
@@ -64,11 +64,6 @@ using namespace com::sun::star::text;
using
namespace
com
::
sun
::
star
::
container
;
using
namespace
com
::
sun
::
star
::
container
;
using
namespace
com
::
sun
::
star
::
style
;
using
namespace
com
::
sun
::
star
::
style
;
#define NUM_PAGETYPE_BULLET 0
#define NUM_PAGETYPE_SINGLENUM 1
#define NUM_PAGETYPE_NUM 2
#define NUM_PAGETYPE_BMP 3
static
const
sal_Char
cNumberingType
[]
=
"NumberingType"
;
static
const
sal_Char
cNumberingType
[]
=
"NumberingType"
;
static
const
sal_Char
cValue
[]
=
"Value"
;
static
const
sal_Char
cValue
[]
=
"Value"
;
static
const
sal_Char
cParentNumbering
[]
=
"ParentNumbering"
;
static
const
sal_Char
cParentNumbering
[]
=
"ParentNumbering"
;
...
@@ -166,9 +161,9 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
...
@@ -166,9 +161,9 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
aRuleFont
.
SetSize
(
aSize
);
aRuleFont
.
SetSize
(
aSize
);
aRuleFont
.
SetColor
(
aTextColor
);
aRuleFont
.
SetColor
(
aTextColor
);
aRuleFont
.
SetFillColor
(
aBackColor
);
aRuleFont
.
SetFillColor
(
aBackColor
);
if
(
nPageType
==
NUM_PAGETYPE_
BULLET
)
if
(
ePageType
==
NumberingPageType
::
BULLET
)
aFont
=
aRuleFont
;
aFont
=
aRuleFont
;
else
if
(
nPageType
==
NUM_PAGETYPE_NUM
)
else
if
(
ePageType
==
NumberingPageType
::
OUTLINE
)
{
{
aSize
.
Height
()
=
nRectHeight
/
8
;
aSize
.
Height
()
=
nRectHeight
/
8
;
}
}
...
@@ -192,7 +187,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
...
@@ -192,7 +187,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
aLineColor
.
Invert
();
aLineColor
.
Invert
();
pVDev
->
SetLineColor
(
aLineColor
);
pVDev
->
SetLineColor
(
aLineColor
);
// Draw line only once
// Draw line only once
if
(
nPageType
!=
NUM_PAGETYPE_NUM
)
if
(
ePageType
!=
NumberingPageType
::
OUTLINE
)
{
{
Point
aStart
(
aBLPos
.
X
()
+
nRectWidth
*
25
/
100
,
0
);
Point
aStart
(
aBLPos
.
X
()
+
nRectWidth
*
25
/
100
,
0
);
Point
aEnd
(
aBLPos
.
X
()
+
nRectWidth
*
9
/
10
,
0
);
Point
aEnd
(
aBLPos
.
X
()
+
nRectWidth
*
9
/
10
,
0
);
...
@@ -210,8 +205,8 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
...
@@ -210,8 +205,8 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
*
pVDev
);
*
pVDev
);
// Now comes the text
// Now comes the text
const
OUString
sValue
(
cValue
);
const
OUString
sValue
(
cValue
);
if
(
N
UM_PAGETYPE_SINGLENUM
==
n
PageType
||
if
(
N
umberingPageType
::
SINGLENUM
==
e
PageType
||
NUM_PAGETYPE_BULLET
==
n
PageType
)
NumberingPageType
::
BULLET
==
e
PageType
)
{
{
Point
aStart
(
aBLPos
.
X
()
+
nRectWidth
/
9
,
0
);
Point
aStart
(
aBLPos
.
X
()
+
nRectWidth
/
9
,
0
);
for
(
sal_uInt16
i
=
0
;
i
<
3
;
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
3
;
i
++
)
...
@@ -219,7 +214,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
...
@@ -219,7 +214,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
sal_uInt16
nY
=
11
+
i
*
33
;
sal_uInt16
nY
=
11
+
i
*
33
;
aStart
.
Y
()
=
aBLPos
.
Y
()
+
nRectHeight
*
nY
/
100
;
aStart
.
Y
()
=
aBLPos
.
Y
()
+
nRectHeight
*
nY
/
100
;
OUString
sText
;
OUString
sText
;
if
(
nPageType
==
NUM_PAGETYPE_
BULLET
)
if
(
ePageType
==
NumberingPageType
::
BULLET
)
{
{
sText
=
OUString
(
aBulletTypes
[
nItemId
-
1
]
);
sText
=
OUString
(
aBulletTypes
[
nItemId
-
1
]
);
aStart
.
Y
()
-=
pDev
->
GetTextHeight
()
/
2
;
aStart
.
Y
()
-=
pDev
->
GetTextHeight
()
/
2
;
...
@@ -250,7 +245,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
...
@@ -250,7 +245,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
pDev
->
DrawText
(
aStart
,
sText
);
pDev
->
DrawText
(
aStart
,
sText
);
}
}
}
}
else
if
(
N
UM_PAGETYPE_NUM
==
n
PageType
)
else
if
(
N
umberingPageType
::
OUTLINE
==
e
PageType
)
{
{
// Outline numbering has to be painted into the virtual device
// Outline numbering has to be painted into the virtual device
// to get correct lines
// to get correct lines
...
@@ -392,7 +387,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
...
@@ -392,7 +387,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
SvxNumValueSet
::
SvxNumValueSet
(
vcl
::
Window
*
pParent
,
WinBits
nWinBits
)
SvxNumValueSet
::
SvxNumValueSet
(
vcl
::
Window
*
pParent
,
WinBits
nWinBits
)
:
ValueSet
(
pParent
,
nWinBits
)
:
ValueSet
(
pParent
,
nWinBits
)
,
nPageType
(
0
)
,
ePageType
(
NumberingPageType
::
BULLET
)
,
bHTMLMode
(
false
)
,
bHTMLMode
(
false
)
,
pVDev
(
NULL
)
,
pVDev
(
NULL
)
{
{
...
@@ -400,17 +395,17 @@ SvxNumValueSet::SvxNumValueSet(vcl::Window* pParent, WinBits nWinBits)
...
@@ -400,17 +395,17 @@ SvxNumValueSet::SvxNumValueSet(vcl::Window* pParent, WinBits nWinBits)
VCL_BUILDER_FACTORY_ARGS
(
SvxNumValueSet
,
WB_TABSTOP
)
VCL_BUILDER_FACTORY_ARGS
(
SvxNumValueSet
,
WB_TABSTOP
)
void
SvxNumValueSet
::
init
(
sal_uInt16
n
Type
)
void
SvxNumValueSet
::
init
(
NumberingPageType
e
Type
)
{
{
aLineColor
=
COL_LIGHTGRAY
;
aLineColor
=
COL_LIGHTGRAY
;
nPageType
=
n
Type
;
ePageType
=
e
Type
;
bHTMLMode
=
false
;
bHTMLMode
=
false
;
pVDev
=
NULL
;
pVDev
=
NULL
;
SetColCount
(
4
);
SetColCount
(
4
);
SetLineCount
(
2
);
SetLineCount
(
2
);
SetStyle
(
GetStyle
()
|
WB_ITEMBORDER
|
WB_DOUBLEBORDER
);
SetStyle
(
GetStyle
()
|
WB_ITEMBORDER
|
WB_DOUBLEBORDER
);
if
(
N
UM_PAGETYPE_BULLET
==
n
Type
)
if
(
N
umberingPageType
::
BULLET
==
e
Type
)
{
{
for
(
sal_uInt16
i
=
0
;
i
<
8
;
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
8
;
i
++
)
{
{
...
@@ -477,7 +472,7 @@ VCL_BUILDER_FACTORY_ARGS(SvxBmpNumValueSet, WB_TABSTOP)
...
@@ -477,7 +472,7 @@ VCL_BUILDER_FACTORY_ARGS(SvxBmpNumValueSet, WB_TABSTOP)
void
SvxBmpNumValueSet
::
init
()
void
SvxBmpNumValueSet
::
init
()
{
{
SvxNumValueSet
::
init
(
N
UM_PAGETYPE_BM
P
);
SvxNumValueSet
::
init
(
N
umberingPageType
::
BITMA
P
);
bGrfNotFound
=
false
;
bGrfNotFound
=
false
;
GalleryExplorer
::
BeginLocking
(
GALLERY_THEME_BULLETS
);
GalleryExplorer
::
BeginLocking
(
GALLERY_THEME_BULLETS
);
SetStyle
(
GetStyle
()
|
WB_VSCROLL
);
SetStyle
(
GetStyle
()
|
WB_VSCROLL
);
...
...
svx/source/tbxctrls/bulletsnumbering.cxx
Dosyayı görüntüle @
18992f30
...
@@ -31,9 +31,6 @@
...
@@ -31,9 +31,6 @@
#include <vcl/toolbox.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/settings.hxx>
#include <vcl/settings.hxx>
#define NUM_PAGETYPE_BULLET 0
#define NUM_PAGETYPE_SINGLENUM 1
class
NumberingToolBoxControl
;
class
NumberingToolBoxControl
;
class
NumberingPopup
:
public
svtools
::
ToolbarMenu
class
NumberingPopup
:
public
svtools
::
ToolbarMenu
...
@@ -90,7 +87,7 @@ NumberingPopup::NumberingPopup( NumberingToolBoxControl& rController,
...
@@ -90,7 +87,7 @@ NumberingPopup::NumberingPopup( NumberingToolBoxControl& rController,
{
{
WinBits
nBits
=
WB_TABSTOP
|
WB_MENUSTYLEVALUESET
|
WB_FLATVALUESET
|
WB_NO_DIRECTSELECT
;
WinBits
nBits
=
WB_TABSTOP
|
WB_MENUSTYLEVALUESET
|
WB_FLATVALUESET
|
WB_NO_DIRECTSELECT
;
mpValueSet
=
VclPtr
<
SvxNumValueSet
>::
Create
(
this
,
nBits
);
mpValueSet
=
VclPtr
<
SvxNumValueSet
>::
Create
(
this
,
nBits
);
mpValueSet
->
init
(
mbBulletItem
?
N
UM_PAGETYPE_BULLET
:
NUM_PAGETYPE_
SINGLENUM
);
mpValueSet
->
init
(
mbBulletItem
?
N
umberingPageType
::
BULLET
:
NumberingPageType
::
SINGLENUM
);
if
(
!
mbBulletItem
)
if
(
!
mbBulletItem
)
{
{
...
...
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