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
647b9681
Kaydet (Commit)
647b9681
authored
Mar 22, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
cleanup sidebar: LinePropertyPanel
Change-Id: Ic8de5d12ee83713b04e947fbabfe1a1184f868ca
üst
6ce97778
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
147 additions
and
208 deletions
+147
-208
LinePropertyPanel.cxx
svx/source/sidebar/line/LinePropertyPanel.cxx
+98
-164
LinePropertyPanel.hxx
svx/source/sidebar/line/LinePropertyPanel.hxx
+49
-44
No files found.
svx/source/sidebar/line/LinePropertyPanel.cxx
Dosyayı görüntüle @
647b9681
...
@@ -53,104 +53,102 @@
...
@@ -53,104 +53,102 @@
using
namespace
css
;
using
namespace
css
;
using
namespace
css
::
uno
;
using
namespace
css
::
uno
;
using
::
sfx2
::
sidebar
::
Theme
;
using
sfx2
::
sidebar
::
Theme
;
const
char
UNO_SELECTWIDTH
[]
=
".uno:SelectWidth"
;
const
char
UNO_SELECTWIDTH
[]
=
".uno:SelectWidth"
;
namespace
{
namespace
void
FillLineEndListBox
(
ListBox
&
rListBoxStart
,
ListBox
&
rListBoxEnd
,
const
XLineEndList
&
rList
)
{
{
const
sal_uInt32
nCount
(
rList
.
Count
());
const
OUString
sNone
(
SVX_RESSTR
(
RID_SVXSTR_NONE
));
rListBoxStart
.
SetUpdateMode
(
false
);
void
FillLineEndListBox
(
ListBox
&
rListBoxStart
,
ListBox
&
rListBoxEnd
,
const
XLineEndList
&
rList
)
rListBoxEnd
.
SetUpdateMode
(
false
);
{
const
sal_uInt32
nCount
(
rList
.
Count
());
const
OUString
sNone
(
SVX_RESSTR
(
RID_SVXSTR_NONE
));
rListBoxStart
.
Clear
(
);
rListBoxStart
.
SetUpdateMode
(
false
);
rListBoxEnd
.
Clear
(
);
rListBoxEnd
.
SetUpdateMode
(
false
);
// add 'none' entries
rListBoxStart
.
Clear
();
rListBoxStart
.
InsertEntry
(
sNone
);
rListBoxEnd
.
Clear
();
rListBoxEnd
.
InsertEntry
(
sNone
);
for
(
sal_uInt32
i
(
0
);
i
<
nCount
;
i
++
)
// add 'none' entries
{
rListBoxStart
.
InsertEntry
(
sNone
);
XLineEndEntry
*
pEntry
=
rList
.
GetLineEnd
(
i
);
rListBoxEnd
.
InsertEntry
(
sNone
);
const
Bitmap
aBitmap
=
const_cast
<
XLineEndList
&
>
(
rList
).
GetUiBitmap
(
i
);
if
(
!
aBitmap
.
IsEmpty
())
for
(
sal_uInt32
i
(
0
);
i
<
nCount
;
i
++
)
{
{
Bitmap
aCopyStart
(
aBitmap
);
XLineEndEntry
*
pEntry
=
rList
.
GetLineEnd
(
i
);
Bitmap
aCopyEnd
(
aBitmap
);
const
Bitmap
aBitmap
=
const_cast
<
XLineEndList
&
>
(
rList
).
GetUiBitmap
(
i
);
// delete pBitmap;
const
Size
aBmpSize
(
aCopyStart
.
GetSizePixel
());
const
Rectangle
aCropRectStart
(
Point
(),
Size
(
aBmpSize
.
Width
()
/
2
,
aBmpSize
.
Height
()));
const
Rectangle
aCropRectEnd
(
Point
(
aBmpSize
.
Width
()
/
2
,
0
),
Size
(
aBmpSize
.
Width
()
/
2
,
aBmpSize
.
Height
()));
aCopyStart
.
Crop
(
aCropRectStart
);
rListBoxStart
.
InsertEntry
(
pEntry
->
GetName
(),
Image
(
aCopyStart
));
aCopyEnd
.
Crop
(
aCropRectEnd
);
rListBoxEnd
.
InsertEntry
(
pEntry
->
GetName
(),
Image
(
aCopyEnd
));
}
else
{
rListBoxStart
.
InsertEntry
(
pEntry
->
GetName
());
rListBoxEnd
.
InsertEntry
(
pEntry
->
GetName
());
}
}
rListBoxStart
.
SetUpdateMode
(
true
);
if
(
!
aBitmap
.
IsEmpty
())
rListBoxEnd
.
SetUpdateMode
(
true
);
{
Bitmap
aCopyStart
(
aBitmap
);
Bitmap
aCopyEnd
(
aBitmap
);
const
Size
aBmpSize
(
aCopyStart
.
GetSizePixel
());
const
Rectangle
aCropRectStart
(
Point
(),
Size
(
aBmpSize
.
Width
()
/
2
,
aBmpSize
.
Height
()));
const
Rectangle
aCropRectEnd
(
Point
(
aBmpSize
.
Width
()
/
2
,
0
),
Size
(
aBmpSize
.
Width
()
/
2
,
aBmpSize
.
Height
()));
aCopyStart
.
Crop
(
aCropRectStart
);
rListBoxStart
.
InsertEntry
(
pEntry
->
GetName
(),
Image
(
aCopyStart
));
aCopyEnd
.
Crop
(
aCropRectEnd
);
rListBoxEnd
.
InsertEntry
(
pEntry
->
GetName
(),
Image
(
aCopyEnd
));
}
else
{
rListBoxStart
.
InsertEntry
(
pEntry
->
GetName
());
rListBoxEnd
.
InsertEntry
(
pEntry
->
GetName
());
}
}
}
void
FillLineStyleListBox
(
ListBox
&
rListBox
,
const
XDashList
&
rList
)
rListBoxStart
.
SetUpdateMode
(
true
);
{
rListBoxEnd
.
SetUpdateMode
(
true
);
const
sal_uInt32
nCount
(
rList
.
Count
());
}
rListBox
.
SetUpdateMode
(
false
);
rListBox
.
Clear
();
void
FillLineStyleListBox
(
ListBox
&
rListBox
,
const
XDashList
&
rList
)
{
const
sal_uInt32
nCount
(
rList
.
Count
());
rListBox
.
SetUpdateMode
(
false
);
// entry for 'none'
rListBox
.
Clear
();
rListBox
.
InsertEntry
(
rList
.
GetStringForUiNoLine
());
// entry for solid line
// entry for 'none'
rListBox
.
InsertEntry
(
rList
.
GetStringForUiSolidLine
(),
rListBox
.
InsertEntry
(
rList
.
GetStringForUiNoLine
());
Image
(
rList
.
GetBitmapForUISolidLine
()));
for
(
sal_uInt32
i
(
0
);
i
<
nCount
;
i
++
)
// entry for solid line
{
rListBox
.
InsertEntry
(
rList
.
GetStringForUiSolidLine
(),
XDashEntry
*
pEntry
=
rList
.
GetDash
(
i
);
Image
(
rList
.
GetBitmapForUISolidLine
()));
const
Bitmap
aBitmap
=
const_cast
<
XDashList
&
>
(
rList
).
GetUiBitmap
(
i
);
if
(
!
aBitmap
.
IsEmpty
())
for
(
sal_uInt32
i
(
0
);
i
<
nCount
;
i
++
)
{
{
rListBox
.
InsertEntry
(
XDashEntry
*
pEntry
=
rList
.
GetDash
(
i
);
pEntry
->
GetName
(),
const
Bitmap
aBitmap
=
const_cast
<
XDashList
&
>
(
rList
).
GetUiBitmap
(
i
);
Image
(
aBitmap
));
// delete pBitmap;
}
else
{
rListBox
.
InsertEntry
(
pEntry
->
GetName
());
}
}
rListBox
.
SetUpdateMode
(
true
);
if
(
!
aBitmap
.
IsEmpty
())
{
rListBox
.
InsertEntry
(
pEntry
->
GetName
(),
Image
(
aBitmap
));
}
else
{
rListBox
.
InsertEntry
(
pEntry
->
GetName
());
}
}
}
}
// end of anonymous namespace
// namespace open
rListBox
.
SetUpdateMode
(
true
);
}
}
// end of anonymous namespace
namespace
svx
{
namespace
sidebar
{
namespace
svx
{
namespace
sidebar
{
LinePropertyPanel
::
LinePropertyPanel
(
LinePropertyPanel
::
LinePropertyPanel
(
vcl
::
Window
*
pParent
,
vcl
::
Window
*
pParent
,
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
rxFrame
,
const
uno
::
Reference
<
frame
::
XFrame
>&
rxFrame
,
SfxBindings
*
pBindings
)
SfxBindings
*
pBindings
)
:
PanelLayout
(
pParent
,
"LinePropertyPanel"
,
"svx/ui/sidebarline.ui"
,
rxFrame
),
:
PanelLayout
(
pParent
,
"LinePropertyPanel"
,
"svx/ui/sidebarline.ui"
,
rxFrame
),
maStyleControl
(
SID_ATTR_LINE_STYLE
,
*
pBindings
,
*
this
),
maStyleControl
(
SID_ATTR_LINE_STYLE
,
*
pBindings
,
*
this
),
...
@@ -194,14 +192,10 @@ LinePropertyPanel::LinePropertyPanel(
...
@@ -194,14 +192,10 @@ LinePropertyPanel::LinePropertyPanel(
Initialize
();
Initialize
();
}
}
LinePropertyPanel
::~
LinePropertyPanel
()
LinePropertyPanel
::~
LinePropertyPanel
()
{
{
}
}
void
LinePropertyPanel
::
Initialize
()
void
LinePropertyPanel
::
Initialize
()
{
{
mpIMGWidthIcon
.
reset
(
new
Image
[
8
]);
mpIMGWidthIcon
.
reset
(
new
Image
[
8
]);
...
@@ -235,16 +229,16 @@ void LinePropertyPanel::Initialize()
...
@@ -235,16 +229,16 @@ void LinePropertyPanel::Initialize()
SelectEndStyle
(
false
);
SelectEndStyle
(
false
);
aLink
=
LINK
(
this
,
LinePropertyPanel
,
ChangeStartHdl
);
aLink
=
LINK
(
this
,
LinePropertyPanel
,
ChangeStartHdl
);
mpLBStart
->
SetSelectHdl
(
aLink
);
mpLBStart
->
SetSelectHdl
(
aLink
);
mpLBStart
->
SetAccessibleName
(
OUString
(
"Beginning Style"
));
//wj acc
mpLBStart
->
SetAccessibleName
(
OUString
(
"Beginning Style"
));
//wj acc
mpLBStart
->
AdaptDropDownLineCountToMaximum
();
mpLBStart
->
AdaptDropDownLineCountToMaximum
();
aLink
=
LINK
(
this
,
LinePropertyPanel
,
ChangeEndHdl
);
aLink
=
LINK
(
this
,
LinePropertyPanel
,
ChangeEndHdl
);
mpLBEnd
->
SetSelectHdl
(
aLink
);
mpLBEnd
->
SetSelectHdl
(
aLink
);
mpLBEnd
->
SetAccessibleName
(
OUString
(
"Ending Style"
));
//wj acc
mpLBEnd
->
SetAccessibleName
(
OUString
(
"Ending Style"
));
//wj acc
mpLBEnd
->
AdaptDropDownLineCountToMaximum
();
mpLBEnd
->
AdaptDropDownLineCountToMaximum
();
aLink
=
LINK
(
this
,
LinePropertyPanel
,
ChangeTransparentHdl
);
aLink
=
LINK
(
this
,
LinePropertyPanel
,
ChangeTransparentHdl
);
mpMFTransparent
->
SetModifyHdl
(
aLink
);
mpMFTransparent
->
SetModifyHdl
(
aLink
);
mpMFTransparent
->
SetAccessibleName
(
OUString
(
"Transparency"
));
//wj acc
mpMFTransparent
->
SetAccessibleName
(
OUString
(
"Transparency"
));
//wj acc
mpTBWidth
->
SetAccessibleRelationLabeledBy
(
mpFTWidth
);
mpTBWidth
->
SetAccessibleRelationLabeledBy
(
mpFTWidth
);
mpLBStyle
->
SetAccessibleRelationLabeledBy
(
mpFTStyle
);
mpLBStyle
->
SetAccessibleRelationLabeledBy
(
mpFTStyle
);
...
@@ -254,15 +248,13 @@ void LinePropertyPanel::Initialize()
...
@@ -254,15 +248,13 @@ void LinePropertyPanel::Initialize()
aLink
=
LINK
(
this
,
LinePropertyPanel
,
ChangeEdgeStyleHdl
);
aLink
=
LINK
(
this
,
LinePropertyPanel
,
ChangeEdgeStyleHdl
);
mpLBEdgeStyle
->
SetSelectHdl
(
aLink
);
mpLBEdgeStyle
->
SetSelectHdl
(
aLink
);
mpLBEdgeStyle
->
SetAccessibleName
(
OUString
(
"Corner Style"
));
mpLBEdgeStyle
->
SetAccessibleName
(
OUString
(
"Corner Style"
));
aLink
=
LINK
(
this
,
LinePropertyPanel
,
ChangeCapStyleHdl
);
aLink
=
LINK
(
this
,
LinePropertyPanel
,
ChangeCapStyleHdl
);
mpLBCapStyle
->
SetSelectHdl
(
aLink
);
mpLBCapStyle
->
SetSelectHdl
(
aLink
);
mpLBCapStyle
->
SetAccessibleName
(
OUString
(
"Cap Style"
));
mpLBCapStyle
->
SetAccessibleName
(
OUString
(
"Cap Style"
));
}
}
void
LinePropertyPanel
::
SetupIcons
(
void
)
void
LinePropertyPanel
::
SetupIcons
(
void
)
{
{
if
(
Theme
::
GetBoolean
(
Theme
::
Bool_UseSymphonyIcons
))
if
(
Theme
::
GetBoolean
(
Theme
::
Bool_UseSymphonyIcons
))
...
@@ -275,11 +267,9 @@ void LinePropertyPanel::SetupIcons(void)
...
@@ -275,11 +267,9 @@ void LinePropertyPanel::SetupIcons(void)
}
}
}
}
LinePropertyPanel
*
LinePropertyPanel
::
Create
(
LinePropertyPanel
*
LinePropertyPanel
::
Create
(
vcl
::
Window
*
pParent
,
vcl
::
Window
*
pParent
,
const
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>&
rxFrame
,
const
uno
::
Reference
<
frame
::
XFrame
>&
rxFrame
,
SfxBindings
*
pBindings
)
SfxBindings
*
pBindings
)
{
{
if
(
pParent
==
NULL
)
if
(
pParent
==
NULL
)
...
@@ -289,33 +279,20 @@ LinePropertyPanel* LinePropertyPanel::Create (
...
@@ -289,33 +279,20 @@ LinePropertyPanel* LinePropertyPanel::Create (
if
(
pBindings
==
NULL
)
if
(
pBindings
==
NULL
)
throw
lang
::
IllegalArgumentException
(
"no SfxBindings given to LinePropertyPanel::Create"
,
NULL
,
2
);
throw
lang
::
IllegalArgumentException
(
"no SfxBindings given to LinePropertyPanel::Create"
,
NULL
,
2
);
return
new
LinePropertyPanel
(
return
new
LinePropertyPanel
(
pParent
,
rxFrame
,
pBindings
);
pParent
,
rxFrame
,
pBindings
);
}
}
void
LinePropertyPanel
::
DataChanged
(
const
DataChangedEvent
&
/*rEvent*/
)
void
LinePropertyPanel
::
DataChanged
(
const
DataChangedEvent
&
rEvent
)
{
{
(
void
)
rEvent
;
SetupIcons
();
SetupIcons
();
}
}
void
LinePropertyPanel
::
NotifyItemUpdate
(
void
LinePropertyPanel
::
NotifyItemUpdate
(
sal_uInt16
nSID
,
sal_uInt16
nSID
,
SfxItemState
eState
,
SfxItemState
eState
,
const
SfxPoolItem
*
pState
,
const
SfxPoolItem
*
pState
,
const
bool
bIsEnabled
)
const
bool
/*bIsEnabled*/
)
{
{
(
void
)
bIsEnabled
;
const
bool
bDisabled
(
SfxItemState
::
DISABLED
==
eState
);
const
bool
bDisabled
(
SfxItemState
::
DISABLED
==
eState
);
switch
(
nSID
)
switch
(
nSID
)
...
@@ -523,23 +500,23 @@ void LinePropertyPanel::NotifyItemUpdate(
...
@@ -523,23 +500,23 @@ void LinePropertyPanel::NotifyItemUpdate(
switch
(
pItem
->
GetValue
())
switch
(
pItem
->
GetValue
())
{
{
case
com
:
:
sun
::
star
::
drawing
::
LineJoint_MIDDLE
:
case
drawing
:
:
LineJoint_MIDDLE
:
case
com
:
:
sun
::
star
::
drawing
::
LineJoint_ROUND
:
case
drawing
:
:
LineJoint_ROUND
:
{
{
nEntryPos
=
1
;
nEntryPos
=
1
;
break
;
break
;
}
}
case
com
:
:
sun
::
star
::
drawing
::
LineJoint_NONE
:
case
drawing
:
:
LineJoint_NONE
:
{
{
nEntryPos
=
2
;
nEntryPos
=
2
;
break
;
break
;
}
}
case
com
:
:
sun
::
star
::
drawing
::
LineJoint_MITER
:
case
drawing
:
:
LineJoint_MITER
:
{
{
nEntryPos
=
3
;
nEntryPos
=
3
;
break
;
break
;
}
}
case
com
:
:
sun
::
star
::
drawing
::
LineJoint_BEVEL
:
case
drawing
:
:
LineJoint_BEVEL
:
{
{
nEntryPos
=
4
;
nEntryPos
=
4
;
break
;
break
;
...
@@ -583,17 +560,17 @@ void LinePropertyPanel::NotifyItemUpdate(
...
@@ -583,17 +560,17 @@ void LinePropertyPanel::NotifyItemUpdate(
switch
(
pItem
->
GetValue
())
switch
(
pItem
->
GetValue
())
{
{
case
com
:
:
sun
::
star
::
drawing
::
LineCap_BUTT
:
case
drawing
:
:
LineCap_BUTT
:
{
{
nEntryPos
=
1
;
nEntryPos
=
1
;
break
;
break
;
}
}
case
com
:
:
sun
::
star
::
drawing
::
LineCap_ROUND
:
case
drawing
:
:
LineCap_ROUND
:
{
{
nEntryPos
=
2
;
nEntryPos
=
2
;
break
;
break
;
}
}
case
com
:
:
sun
::
star
::
drawing
::
LineCap_SQUARE
:
case
drawing
:
:
LineCap_SQUARE
:
{
{
nEntryPos
=
3
;
nEntryPos
=
3
;
break
;
break
;
...
@@ -617,12 +594,6 @@ void LinePropertyPanel::NotifyItemUpdate(
...
@@ -617,12 +594,6 @@ void LinePropertyPanel::NotifyItemUpdate(
}
}
}
}
IMPL_LINK_NOARG
(
LinePropertyPanel
,
ChangeLineStyleHdl
)
IMPL_LINK_NOARG
(
LinePropertyPanel
,
ChangeLineStyleHdl
)
{
{
const
sal_Int32
nPos
(
mpLBStyle
->
GetSelectEntryPos
());
const
sal_Int32
nPos
(
mpLBStyle
->
GetSelectEntryPos
());
...
@@ -661,8 +632,6 @@ IMPL_LINK_NOARG(LinePropertyPanel, ChangeLineStyleHdl)
...
@@ -661,8 +632,6 @@ IMPL_LINK_NOARG(LinePropertyPanel, ChangeLineStyleHdl)
return
0
;
return
0
;
}
}
IMPL_LINK
(
LinePropertyPanel
,
ChangeStartHdl
,
void
*
,
EMPTYARG
)
IMPL_LINK
(
LinePropertyPanel
,
ChangeStartHdl
,
void
*
,
EMPTYARG
)
{
{
sal_Int32
nPos
=
mpLBStart
->
GetSelectEntryPos
();
sal_Int32
nPos
=
mpLBStart
->
GetSelectEntryPos
();
...
@@ -678,9 +647,6 @@ IMPL_LINK(LinePropertyPanel, ChangeStartHdl, void*, EMPTYARG)
...
@@ -678,9 +647,6 @@ IMPL_LINK(LinePropertyPanel, ChangeStartHdl, void*, EMPTYARG)
return
0
;
return
0
;
}
}
IMPL_LINK
(
LinePropertyPanel
,
ChangeEndHdl
,
void
*
,
EMPTYARG
)
IMPL_LINK
(
LinePropertyPanel
,
ChangeEndHdl
,
void
*
,
EMPTYARG
)
{
{
sal_Int32
nPos
=
mpLBEnd
->
GetSelectEntryPos
();
sal_Int32
nPos
=
mpLBEnd
->
GetSelectEntryPos
();
...
@@ -696,9 +662,6 @@ IMPL_LINK(LinePropertyPanel, ChangeEndHdl, void*, EMPTYARG)
...
@@ -696,9 +662,6 @@ IMPL_LINK(LinePropertyPanel, ChangeEndHdl, void*, EMPTYARG)
return
0
;
return
0
;
}
}
IMPL_LINK
(
LinePropertyPanel
,
ChangeEdgeStyleHdl
,
void
*
,
EMPTYARG
)
IMPL_LINK
(
LinePropertyPanel
,
ChangeEdgeStyleHdl
,
void
*
,
EMPTYARG
)
{
{
const
sal_Int32
nPos
(
mpLBEdgeStyle
->
GetSelectEntryPos
());
const
sal_Int32
nPos
(
mpLBEdgeStyle
->
GetSelectEntryPos
());
...
@@ -711,22 +674,22 @@ IMPL_LINK(LinePropertyPanel, ChangeEdgeStyleHdl, void*, EMPTYARG)
...
@@ -711,22 +674,22 @@ IMPL_LINK(LinePropertyPanel, ChangeEdgeStyleHdl, void*, EMPTYARG)
{
{
case
0
:
// rounded
case
0
:
// rounded
{
{
pItem
.
reset
(
new
XLineJointItem
(
com
::
sun
::
star
::
drawing
::
LineJoint_ROUND
));
pItem
.
reset
(
new
XLineJointItem
(
drawing
::
LineJoint_ROUND
));
break
;
break
;
}
}
case
1
:
// none
case
1
:
// none
{
{
pItem
.
reset
(
new
XLineJointItem
(
com
::
sun
::
star
::
drawing
::
LineJoint_NONE
));
pItem
.
reset
(
new
XLineJointItem
(
drawing
::
LineJoint_NONE
));
break
;
break
;
}
}
case
2
:
// mitered
case
2
:
// mitered
{
{
pItem
.
reset
(
new
XLineJointItem
(
com
::
sun
::
star
::
drawing
::
LineJoint_MITER
));
pItem
.
reset
(
new
XLineJointItem
(
drawing
::
LineJoint_MITER
));
break
;
break
;
}
}
case
3
:
// beveled
case
3
:
// beveled
{
{
pItem
.
reset
(
new
XLineJointItem
(
com
::
sun
::
star
::
drawing
::
LineJoint_BEVEL
));
pItem
.
reset
(
new
XLineJointItem
(
drawing
::
LineJoint_BEVEL
));
break
;
break
;
}
}
}
}
...
@@ -736,9 +699,6 @@ IMPL_LINK(LinePropertyPanel, ChangeEdgeStyleHdl, void*, EMPTYARG)
...
@@ -736,9 +699,6 @@ IMPL_LINK(LinePropertyPanel, ChangeEdgeStyleHdl, void*, EMPTYARG)
return
0
;
return
0
;
}
}
IMPL_LINK
(
LinePropertyPanel
,
ChangeCapStyleHdl
,
void
*
,
EMPTYARG
)
IMPL_LINK
(
LinePropertyPanel
,
ChangeCapStyleHdl
,
void
*
,
EMPTYARG
)
{
{
const
sal_Int32
nPos
(
mpLBCapStyle
->
GetSelectEntryPos
());
const
sal_Int32
nPos
(
mpLBCapStyle
->
GetSelectEntryPos
());
...
@@ -751,17 +711,17 @@ IMPL_LINK(LinePropertyPanel, ChangeCapStyleHdl, void*, EMPTYARG)
...
@@ -751,17 +711,17 @@ IMPL_LINK(LinePropertyPanel, ChangeCapStyleHdl, void*, EMPTYARG)
{
{
case
0
:
// flat
case
0
:
// flat
{
{
pItem
.
reset
(
new
XLineCapItem
(
com
::
sun
::
star
::
drawing
::
LineCap_BUTT
));
pItem
.
reset
(
new
XLineCapItem
(
drawing
::
LineCap_BUTT
));
break
;
break
;
}
}
case
1
:
// round
case
1
:
// round
{
{
pItem
.
reset
(
new
XLineCapItem
(
com
::
sun
::
star
::
drawing
::
LineCap_ROUND
));
pItem
.
reset
(
new
XLineCapItem
(
drawing
::
LineCap_ROUND
));
break
;
break
;
}
}
case
2
:
// square
case
2
:
// square
{
{
pItem
.
reset
(
new
XLineCapItem
(
com
::
sun
::
star
::
drawing
::
LineCap_SQUARE
));
pItem
.
reset
(
new
XLineCapItem
(
drawing
::
LineCap_SQUARE
));
break
;
break
;
}
}
}
}
...
@@ -771,9 +731,6 @@ IMPL_LINK(LinePropertyPanel, ChangeCapStyleHdl, void*, EMPTYARG)
...
@@ -771,9 +731,6 @@ IMPL_LINK(LinePropertyPanel, ChangeCapStyleHdl, void*, EMPTYARG)
return
0
;
return
0
;
}
}
IMPL_LINK
(
LinePropertyPanel
,
ToolboxWidthSelectHdl
,
ToolBox
*
,
pToolBox
)
IMPL_LINK
(
LinePropertyPanel
,
ToolboxWidthSelectHdl
,
ToolBox
*
,
pToolBox
)
{
{
if
(
pToolBox
->
GetItemCommand
(
pToolBox
->
GetCurItemId
())
==
UNO_SELECTWIDTH
)
if
(
pToolBox
->
GetItemCommand
(
pToolBox
->
GetCurItemId
())
==
UNO_SELECTWIDTH
)
...
@@ -784,9 +741,6 @@ IMPL_LINK(LinePropertyPanel, ToolboxWidthSelectHdl,ToolBox*, pToolBox)
...
@@ -784,9 +741,6 @@ IMPL_LINK(LinePropertyPanel, ToolboxWidthSelectHdl,ToolBox*, pToolBox)
return
0
;
return
0
;
}
}
IMPL_LINK
(
LinePropertyPanel
,
ChangeTransparentHdl
,
void
*
,
EMPTYARG
)
IMPL_LINK
(
LinePropertyPanel
,
ChangeTransparentHdl
,
void
*
,
EMPTYARG
)
{
{
sal_uInt16
nVal
=
(
sal_uInt16
)
mpMFTransparent
->
GetValue
();
sal_uInt16
nVal
=
(
sal_uInt16
)
mpMFTransparent
->
GetValue
();
...
@@ -796,36 +750,25 @@ IMPL_LINK( LinePropertyPanel, ChangeTransparentHdl, void *, EMPTYARG )
...
@@ -796,36 +750,25 @@ IMPL_LINK( LinePropertyPanel, ChangeTransparentHdl, void *, EMPTYARG )
return
0L
;
return
0L
;
}
}
PopupControl
*
LinePropertyPanel
::
CreateLineWidthPopupControl
(
PopupContainer
*
pParent
)
PopupControl
*
LinePropertyPanel
::
CreateLineWidthPopupControl
(
PopupContainer
*
pParent
)
{
{
return
new
LineWidthControl
(
pParent
,
*
this
);
return
new
LineWidthControl
(
pParent
,
*
this
);
}
}
void
LinePropertyPanel
::
EndLineWidthPopupMode
(
void
)
void
LinePropertyPanel
::
EndLineWidthPopupMode
(
void
)
{
{
maLineWidthPopup
.
Hide
();
maLineWidthPopup
.
Hide
();
}
}
void
LinePropertyPanel
::
SetWidthIcon
(
int
n
)
void
LinePropertyPanel
::
SetWidthIcon
(
int
n
)
{
{
const
sal_uInt16
nIdWidth
=
mpTBWidth
->
GetItemId
(
UNO_SELECTWIDTH
);
const
sal_uInt16
nIdWidth
=
mpTBWidth
->
GetItemId
(
UNO_SELECTWIDTH
);
if
(
n
==
0
)
if
(
n
==
0
)
mpTBWidth
->
SetItemImage
(
nIdWidth
,
maIMGNone
);
mpTBWidth
->
SetItemImage
(
nIdWidth
,
maIMGNone
);
else
else
mpTBWidth
->
SetItemImage
(
nIdWidth
,
mpIMGWidthIcon
[
n
-
1
]);
mpTBWidth
->
SetItemImage
(
nIdWidth
,
mpIMGWidthIcon
[
n
-
1
]);
}
}
void
LinePropertyPanel
::
SetWidthIcon
()
void
LinePropertyPanel
::
SetWidthIcon
()
{
{
if
(
!
mbWidthValuable
)
if
(
!
mbWidthValuable
)
...
@@ -857,16 +800,12 @@ void LinePropertyPanel::SetWidthIcon()
...
@@ -857,16 +800,12 @@ void LinePropertyPanel::SetWidthIcon()
}
}
void
LinePropertyPanel
::
SetWidth
(
long
nWidth
)
void
LinePropertyPanel
::
SetWidth
(
long
nWidth
)
{
{
mnWidthCoreValue
=
nWidth
;
mnWidthCoreValue
=
nWidth
;
mbWidthValuable
=
true
;
mbWidthValuable
=
true
;
}
}
void
LinePropertyPanel
::
FillLineEndList
()
void
LinePropertyPanel
::
FillLineEndList
()
{
{
SfxObjectShell
*
pSh
=
SfxObjectShell
::
Current
();
SfxObjectShell
*
pSh
=
SfxObjectShell
::
Current
();
...
@@ -891,8 +830,6 @@ void LinePropertyPanel::FillLineEndList()
...
@@ -891,8 +830,6 @@ void LinePropertyPanel::FillLineEndList()
}
}
}
}
void
LinePropertyPanel
::
FillLineStyleList
()
void
LinePropertyPanel
::
FillLineStyleList
()
{
{
SfxObjectShell
*
pSh
=
SfxObjectShell
::
Current
();
SfxObjectShell
*
pSh
=
SfxObjectShell
::
Current
();
...
@@ -915,8 +852,6 @@ void LinePropertyPanel::FillLineStyleList()
...
@@ -915,8 +852,6 @@ void LinePropertyPanel::FillLineStyleList()
}
}
}
}
void
LinePropertyPanel
::
SelectLineStyle
()
void
LinePropertyPanel
::
SelectLineStyle
()
{
{
if
(
!
mpStyleItem
.
get
()
||
!
mpDashItem
.
get
()
)
if
(
!
mpStyleItem
.
get
()
||
!
mpDashItem
.
get
()
)
...
@@ -1023,7 +958,6 @@ void LinePropertyPanel::SelectEndStyle(bool bStart)
...
@@ -1023,7 +958,6 @@ void LinePropertyPanel::SelectEndStyle(bool bStart)
}
}
}
}
}}
// end of namespace svx::sidebar
}
}
// end of namespace svx::sidebar
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svx/source/sidebar/line/LinePropertyPanel.hxx
Dosyayı görüntüle @
647b9681
...
@@ -42,19 +42,23 @@ class ListBox;
...
@@ -42,19 +42,23 @@ class ListBox;
class
ToolBox
;
class
ToolBox
;
class
FloatingWindow
;
class
FloatingWindow
;
namespace
{
namespace
#define SIDEBAR_LINE_WIDTH_GLOBAL_VALUE "PopupPanel_LineWidth"
{
#define SIDEBAR_LINE_WIDTH_GLOBAL_VALUE "PopupPanel_LineWidth"
}
//end of anonymous namespace
}
//end of anonymous namespace
namespace
svx
{
namespace
sidebar
{
namespace
svx
{
namespace
sidebar
{
class
PopupContainer
;
class
PopupContainer
;
class
LineWidthControl
;
class
LineWidthControl
;
class
LinePropertyPanel
:
public
PanelLayout
,
class
LinePropertyPanel
public
sfx2
::
sidebar
::
ControllerItem
::
ItemUpdateReceiverInterface
:
public
PanelLayout
,
public
::
sfx2
::
sidebar
::
ControllerItem
::
ItemUpdateReceiverInterface
{
{
public
:
public
:
static
LinePropertyPanel
*
Create
(
static
LinePropertyPanel
*
Create
(
...
@@ -81,53 +85,54 @@ public:
...
@@ -81,53 +85,54 @@ public:
private
:
private
:
//ui controls
//ui controls
FixedText
*
mpFTWidth
;
FixedText
*
mpFTWidth
;
ToolBox
*
mpTBWidth
;
ToolBox
*
mpTBWidth
;
FixedText
*
mpFTStyle
;
FixedText
*
mpFTStyle
;
ListBox
*
mpLBStyle
;
ListBox
*
mpLBStyle
;
FixedText
*
mpFTTrancparency
;
FixedText
*
mpFTTrancparency
;
MetricField
*
mpMFTransparent
;
MetricField
*
mpMFTransparent
;
FixedText
*
mpFTArrow
;
FixedText
*
mpFTArrow
;
ListBox
*
mpLBStart
;
ListBox
*
mpLBStart
;
ListBox
*
mpLBEnd
;
ListBox
*
mpLBEnd
;
FixedText
*
mpFTEdgeStyle
;
FixedText
*
mpFTEdgeStyle
;
ListBox
*
mpLBEdgeStyle
;
ListBox
*
mpLBEdgeStyle
;
FixedText
*
mpFTCapStyle
;
FixedText
*
mpFTCapStyle
;
ListBox
*
mpLBCapStyle
;
ListBox
*
mpLBCapStyle
;
//ControllerItem
//ControllerItem
::
sfx2
::
sidebar
::
ControllerItem
maStyleControl
;
sfx2
::
sidebar
::
ControllerItem
maStyleControl
;
::
sfx2
::
sidebar
::
ControllerItem
maDashControl
;
sfx2
::
sidebar
::
ControllerItem
maDashControl
;
::
sfx2
::
sidebar
::
ControllerItem
maWidthControl
;
sfx2
::
sidebar
::
ControllerItem
maWidthControl
;
::
sfx2
::
sidebar
::
ControllerItem
maStartControl
;
sfx2
::
sidebar
::
ControllerItem
maStartControl
;
::
sfx2
::
sidebar
::
ControllerItem
maEndControl
;
sfx2
::
sidebar
::
ControllerItem
maEndControl
;
::
sfx2
::
sidebar
::
ControllerItem
maLineEndListControl
;
sfx2
::
sidebar
::
ControllerItem
maLineEndListControl
;
::
sfx2
::
sidebar
::
ControllerItem
maLineStyleListControl
;
sfx2
::
sidebar
::
ControllerItem
maLineStyleListControl
;
::
sfx2
::
sidebar
::
ControllerItem
maTransControl
;
sfx2
::
sidebar
::
ControllerItem
maTransControl
;
::
sfx2
::
sidebar
::
ControllerItem
maEdgeStyle
;
sfx2
::
sidebar
::
ControllerItem
maEdgeStyle
;
::
sfx2
::
sidebar
::
ControllerItem
maCapStyle
;
sfx2
::
sidebar
::
ControllerItem
maCapStyle
;
::
boost
::
scoped_ptr
<
XLineStyleItem
>
mpStyleItem
;
boost
::
scoped_ptr
<
XLineStyleItem
>
mpStyleItem
;
::
boost
::
scoped_ptr
<
XLineDashItem
>
mpDashItem
;
boost
::
scoped_ptr
<
XLineDashItem
>
mpDashItem
;
sal_uInt16
mnTrans
;
SfxMapUnit
meMapUnit
;
sal_uInt16
mnTrans
;
sal_Int32
mnWidthCoreValue
;
SfxMapUnit
meMapUnit
;
XLineEndListRef
mxLineEndList
;
sal_Int32
mnWidthCoreValue
;
XDashListRef
mxLineStyleList
;
XLineEndListRef
mxLineEndList
;
::
boost
::
scoped_ptr
<
XLineStartItem
>
mpStartItem
;
XDashListRef
mxLineStyleList
;
::
boost
::
scoped_ptr
<
XLineEndItem
>
mpEndItem
;
boost
::
scoped_ptr
<
XLineStartItem
>
mpStartItem
;
boost
::
scoped_ptr
<
XLineEndItem
>
mpEndItem
;
//popup windows
//popup windows
LineWidthPopup
maLineWidthPopup
;
LineWidthPopup
maLineWidthPopup
;
// images from resource
// images from resource
Image
maIMGNone
;
Image
maIMGNone
;
// multi-images
// multi-images
::
boost
::
scoped_array
<
Image
>
mpIMGWidthIcon
;
boost
::
scoped_array
<
Image
>
mpIMGWidthIcon
;
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>
mxFrame
;
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>
mxFrame
;
SfxBindings
*
mpBindings
;
SfxBindings
*
mpBindings
;
/// bitfield
/// bitfield
bool
mbWidthValuable
:
1
;
bool
mbWidthValuable
:
1
;
...
...
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