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
8aae7125
Kaydet (Commit)
8aae7125
authored
Haz 17, 2014
tarafından
Krisztian Pinter
Kaydeden (comit)
Tomaž Vajngerl
Eyl 17, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add navigation buttons to SvxColorWindow_Impl
Change-Id: I346af872f78396d51a458539f7d3038fc63dad8e
üst
e75a3b87
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
13 deletions
+58
-13
tbcontrl.hxx
include/svx/tbcontrl.hxx
+3
-1
colorwindow.hxx
svx/source/tbxctrls/colorwindow.hxx
+9
-1
tbcontrl.cxx
svx/source/tbxctrls/tbcontrl.cxx
+46
-11
No files found.
include/svx/tbcontrl.hxx
Dosyayı görüntüle @
8aae7125
...
...
@@ -221,6 +221,7 @@ class SVX_DLLPUBLIC SvxColorToolBoxControl : public SfxToolBoxControl
::
boost
::
scoped_ptr
<
::
svx
::
ToolboxButtonColorUpdater
>
pBtnUpdater
;
Color
mLastColor
;
sal_uInt16
nCurrentPalette
;
DECL_LINK
(
SelectedHdl
,
Color
*
);
public
:
SFX_DECL_TOOLBOX_CONTROL
();
...
...
@@ -240,7 +241,8 @@ public:
class
SVX_DLLPUBLIC
SvxLineColorToolBoxControl
:
public
SfxToolBoxControl
{
::
boost
::
scoped_ptr
<
::
svx
::
ToolboxButtonColorUpdater
>
pBtnUpdater
;
Color
mLastColor
;
Color
mLastColor
;
sal_uInt16
nCurrentPalette
;
DECL_LINK
(
SelectedHdl
,
Color
*
);
public
:
SFX_DECL_TOOLBOX_CONTROL
();
...
...
svx/source/tbxctrls/colorwindow.hxx
Dosyayı görüntüle @
8aae7125
...
...
@@ -34,11 +34,18 @@ class SvxColorWindow_Impl : public SfxPopupWindow
private
:
const
sal_uInt16
theSlotId
;
SvxColorValueSet
aColorSet
;
SvxColorValueSet
aDocColorSet
;
PushButton
aButtonLeft
;
PushButton
aButtonRight
;
OUString
maCommand
;
Link
maSelectedLink
;
const
sal_uInt16
nNavButtonWidth
;
const
sal_uInt16
nNavButtonHeight
;
sal_uInt16
&
rnCurrentPalette
;
DECL_LINK
(
SelectHdl
,
void
*
);
DECL_LINK
(
StepLeftClickHdl
,
void
*
);
DECL_LINK
(
StepRightClickHdl
,
void
*
);
protected
:
virtual
void
Resize
()
SAL_OVERRIDE
;
...
...
@@ -46,6 +53,7 @@ protected:
public
:
SvxColorWindow_Impl
(
const
OUString
&
rCommand
,
sal_uInt16
&
rnCurrentPalette_
,
sal_uInt16
nSlotId
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
frame
::
XFrame
>&
rFrame
,
const
OUString
&
rWndTitle
,
...
...
svx/source/tbxctrls/tbcontrl.cxx
Dosyayı görüntüle @
8aae7125
...
...
@@ -98,7 +98,7 @@
// don't make more than 15 entries visible at once
#define MAX_STYLES_ENTRIES static_cast< sal_uInt16 >( 15 )
static
void
lcl_ResizeValueSet
(
Window
&
rWin
,
ValueSet
&
rValueSet
);
static
void
lcl_ResizeValueSet
(
Window
&
rWin
,
ValueSet
&
rValueSet
,
sal_uInt16
nVertPadding
);
static
void
lcl_CalcSizeValueSet
(
Window
&
rWin
,
ValueSet
&
rValueSet
,
const
Size
&
aItemSize
);
// namespaces
...
...
@@ -1003,6 +1003,7 @@ void SvxFontNameBox_Impl::Select()
#endif
SvxColorWindow_Impl
::
SvxColorWindow_Impl
(
const
OUString
&
rCommand
,
sal_uInt16
&
rnCurrentPalette_
,
sal_uInt16
nSlotId
,
const
Reference
<
XFrame
>&
rFrame
,
const
OUString
&
rWndTitle
,
...
...
@@ -1010,8 +1011,12 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
SfxPopupWindow
(
nSlotId
,
rFrame
,
pParentWindow
,
WinBits
(
WB_STDPOPUP
|
WB_OWNERDRAWDECORATION
)
),
theSlotId
(
nSlotId
),
aColorSet
(
this
,
WinBits
(
WB_ITEMBORDER
|
WB_NAMEFIELD
|
WB_3DLOOK
|
WB_NO_DIRECTSELECT
)
),
aDocColorSet
(
this
,
WinBits
(
WB_ITEMBORDER
|
WB_NAMEFIELD
|
WB_3DLOOK
|
WB_NO_DIRECTSELECT
)
),
maCommand
(
rCommand
)
aButtonLeft
(
this
),
aButtonRight
(
this
),
maCommand
(
rCommand
),
nNavButtonWidth
(
20
),
nNavButtonHeight
(
20
),
rnCurrentPalette
(
rnCurrentPalette_
)
{
SfxObjectShell
*
pDocSh
=
SfxObjectShell
::
Current
();
...
...
@@ -1075,9 +1080,21 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
aColorSet
.
SetOutputSizePixel
(
aNewSize
);
static
sal_Int32
nAdd
=
4
;
SetOutputSizePixel
(
Size
(
aNewSize
.
Width
()
+
nAdd
,
aNewSize
.
Height
()
+
nAdd
));
SetOutputSizePixel
(
Size
(
aNewSize
.
Width
()
+
nAdd
,
aNewSize
.
Height
()
+
nAdd
+
nNavButtonHeight
));
aColorSet
.
Clear
();
aColorSet
.
addEntriesForXColorList
(
*
pColorList
);
aButtonLeft
.
SetText
(
"<"
);
aButtonLeft
.
SetClickHdl
(
LINK
(
this
,
SvxColorWindow_Impl
,
StepLeftClickHdl
)
);
aButtonLeft
.
SetSizePixel
(
Size
(
nNavButtonWidth
,
nNavButtonHeight
));
aButtonLeft
.
SetPosPixel
(
Point
(
0
,
aNewSize
.
Height
()
+
nAdd
+
1
));
aButtonLeft
.
Show
();
aButtonRight
.
SetText
(
">"
);
aButtonRight
.
SetClickHdl
(
LINK
(
this
,
SvxColorWindow_Impl
,
StepRightClickHdl
)
);
aButtonRight
.
SetSizePixel
(
Size
(
nNavButtonWidth
,
nNavButtonHeight
));
aButtonRight
.
SetPosPixel
(
Point
(
aNewSize
.
Width
()
+
nAdd
-
nNavButtonWidth
,
aNewSize
.
Height
()
+
nAdd
+
1
));
aButtonRight
.
Show
();
}
aColorSet
.
SetSelectHdl
(
LINK
(
this
,
SvxColorWindow_Impl
,
SelectHdl
)
);
...
...
@@ -1101,7 +1118,7 @@ void SvxColorWindow_Impl::KeyInput( const KeyEvent& rKEvt )
SfxPopupWindow
*
SvxColorWindow_Impl
::
Clone
()
const
{
return
new
SvxColorWindow_Impl
(
maCommand
,
theSlotId
,
GetFrame
(),
GetText
(),
GetParent
()
);
return
new
SvxColorWindow_Impl
(
maCommand
,
rnCurrentPalette
,
theSlotId
,
GetFrame
(),
GetText
(),
GetParent
()
);
}
IMPL_LINK_NOARG
(
SvxColorWindow_Impl
,
SelectHdl
)
...
...
@@ -1141,9 +1158,21 @@ IMPL_LINK_NOARG(SvxColorWindow_Impl, SelectHdl)
return
0
;
}
IMPL_LINK_NOARG
(
SvxColorWindow_Impl
,
StepLeftClickHdl
)
{
rnCurrentPalette
--
;
return
0
;
}
IMPL_LINK_NOARG
(
SvxColorWindow_Impl
,
StepRightClickHdl
)
{
rnCurrentPalette
++
;
return
0
;
}
void
SvxColorWindow_Impl
::
Resize
()
{
lcl_ResizeValueSet
(
*
this
,
aColorSet
);
lcl_ResizeValueSet
(
*
this
,
aColorSet
,
nNavButtonHeight
+
2
);
}
void
SvxColorWindow_Impl
::
StartSelection
()
...
...
@@ -1408,7 +1437,7 @@ IMPL_LINK_NOARG(SvxFrameWindow_Impl, SelectHdl)
void
SvxFrameWindow_Impl
::
Resize
()
{
lcl_ResizeValueSet
(
*
this
,
aFrameSet
);
lcl_ResizeValueSet
(
*
this
,
aFrameSet
,
0
);
}
void
SvxFrameWindow_Impl
::
StateChanged
(
...
...
@@ -2174,7 +2203,8 @@ SvxColorToolBoxControl::SvxColorToolBoxControl(
sal_uInt16
nId
,
ToolBox
&
rTbx
)
:
SfxToolBoxControl
(
nSlotId
,
nId
,
rTbx
),
mLastColor
(
COL_AUTO
)
mLastColor
(
COL_AUTO
),
nCurrentPalette
(
0
)
{
rTbx
.
SetItemBits
(
nId
,
TIB_DROPDOWN
|
rTbx
.
GetItemBits
(
nId
)
);
...
...
@@ -2228,6 +2258,7 @@ SfxPopupWindow* SvxColorToolBoxControl::CreatePopupWindow()
SvxColorWindow_Impl
*
pColorWin
=
new
SvxColorWindow_Impl
(
m_aCommandURL
,
nCurrentPalette
,
GetSlotId
(),
m_xFrame
,
SVX_RESSTR
(
RID_SVXITEMS_EXTRAS_CHARCOLOR
),
...
...
@@ -2335,7 +2366,8 @@ SvxLineColorToolBoxControl::SvxLineColorToolBoxControl(
ToolBox
&
rTbx
)
:
SfxToolBoxControl
(
nSlotId
,
nId
,
rTbx
),
mLastColor
(
COL_BLACK
)
mLastColor
(
COL_BLACK
),
nCurrentPalette
(
0
)
{
rTbx
.
SetItemBits
(
nId
,
TIB_DROPDOWN
|
rTbx
.
GetItemBits
(
nId
)
);
addStatusListener
(
OUString
(
".uno:XLineColor"
)
);
...
...
@@ -2356,6 +2388,7 @@ SfxPopupWindow* SvxLineColorToolBoxControl::CreatePopupWindow()
SvxColorWindow_Impl
*
pColorWin
=
new
SvxColorWindow_Impl
(
m_aCommandURL
,
nCurrentPalette
,
GetSlotId
(),
m_xFrame
,
SVX_RESSTR
(
RID_SVXSTR_LINECOLOR
),
...
...
@@ -2497,11 +2530,13 @@ void SvxSimpleUndoRedoController::StateChanged( sal_uInt16, SfxItemState eState,
rBox
.
EnableItem
(
GetId
(),
eState
!=
SfxItemState
::
DISABLED
);
}
static
void
lcl_ResizeValueSet
(
Window
&
rWin
,
ValueSet
&
rValueSet
)
static
void
lcl_ResizeValueSet
(
Window
&
rWin
,
ValueSet
&
rValueSet
,
sal_uInt16
nVertPadding
)
{
Size
aSize
=
rWin
.
GetOutputSizePixel
();
aSize
.
Width
()
-=
4
;
aSize
.
Height
()
-=
4
;
aSize
.
Height
()
-=
4
+
nVertPadding
;
rValueSet
.
SetPosSizePixel
(
Point
(
2
,
2
),
aSize
);
}
...
...
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