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
b59ece02
Kaydet (Commit)
b59ece02
authored
Ock 29, 2016
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
This can be a Window and not a DockingWindow now
Change-Id: I5b7e42c008328e30d6475283a635e4fdfa1148cb
üst
e964c55f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
230 deletions
+65
-230
dwfunctr.cxx
sc/source/ui/formdlg/dwfunctr.cxx
+58
-207
dwfunctr.src
sc/source/ui/formdlg/dwfunctr.src
+1
-9
dwfunctr.hxx
sc/source/ui/inc/dwfunctr.hxx
+5
-13
ScPanelFactory.cxx
sc/source/ui/sidebar/ScPanelFactory.cxx
+1
-1
No files found.
sc/source/ui/formdlg/dwfunctr.cxx
Dosyayı görüntüle @
b59ece02
...
@@ -40,12 +40,12 @@
...
@@ -40,12 +40,12 @@
#include "dwfunctr.hxx"
#include "dwfunctr.hxx"
/*************************************************************************
/*************************************************************************
#* Member: ScFunction
Dock
Win
#* Member: ScFunctionWin
#*------------------------------------------------------------------------
#*------------------------------------------------------------------------
#*
#*
#* Klasse: ScFunction
Dock
Win
#* Klasse: ScFunctionWin
#*
#*
#* Funktion: Konstruktor der Klasse ScFunction
Dock
Win
#* Funktion: Konstruktor der Klasse ScFunctionWin
#*
#*
#* Input: Sfx- Verknuepfungen, Fenster, Resource
#* Input: Sfx- Verknuepfungen, Fenster, Resource
#*
#*
...
@@ -53,8 +53,9 @@
...
@@ -53,8 +53,9 @@
#*
#*
#************************************************************************/
#************************************************************************/
ScFunctionDockWin
::
ScFunctionDockWin
(
SfxBindings
*
pBindingsP
,
vcl
::
Window
*
pParent
,
const
ResId
&
rResId
)
:
ScFunctionWin
::
ScFunctionWin
(
SfxBindings
*
pBindingsP
,
vcl
::
Window
*
pParent
,
const
ResId
&
rResId
)
:
SfxDockingWindow
(
pBindingsP
,
nullptr
,
pParent
,
rResId
),
vcl
::
Window
(
pParent
,
rResId
),
rBindings
(
*
pBindingsP
),
aPrivatSplit
(
VclPtr
<
ScPrivatSplit
>::
Create
(
this
,
ResId
(
FT_SPLIT
,
*
rResId
.
GetResMgr
()
)
)
),
aPrivatSplit
(
VclPtr
<
ScPrivatSplit
>::
Create
(
this
,
ResId
(
FT_SPLIT
,
*
rResId
.
GetResMgr
()
)
)
),
aCatBox
(
VclPtr
<
ListBox
>::
Create
(
this
,
ResId
(
CB_CAT
,
*
rResId
.
GetResMgr
()
)
)
),
aCatBox
(
VclPtr
<
ListBox
>::
Create
(
this
,
ResId
(
CB_CAT
,
*
rResId
.
GetResMgr
()
)
)
),
aFuncList
(
VclPtr
<
ListBox
>::
Create
(
this
,
ResId
(
LB_FUNC
,
*
rResId
.
GetResMgr
()
)
)
),
aFuncList
(
VclPtr
<
ListBox
>::
Create
(
this
,
ResId
(
LB_FUNC
,
*
rResId
.
GetResMgr
()
)
)
),
...
@@ -69,7 +70,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, vcl::Window* pPar
...
@@ -69,7 +70,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, vcl::Window* pPar
SetStyle
(
GetStyle
()
|
WB_CLIPCHILDREN
);
SetStyle
(
GetStyle
()
|
WB_CLIPCHILDREN
);
aIdle
.
SetPriority
(
SchedulerPriority
::
LOWER
);
aIdle
.
SetPriority
(
SchedulerPriority
::
LOWER
);
aIdle
.
SetIdleHdl
(
LINK
(
this
,
ScFunction
Dock
Win
,
TimerHdl
));
aIdle
.
SetIdleHdl
(
LINK
(
this
,
ScFunctionWin
,
TimerHdl
));
aFiFuncDesc
->
SetUpdateMode
(
true
);
aFiFuncDesc
->
SetUpdateMode
(
true
);
pAllFuncList
=
aFuncList
;
pAllFuncList
=
aFuncList
;
...
@@ -83,18 +84,18 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, vcl::Window* pPar
...
@@ -83,18 +84,18 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, vcl::Window* pPar
aFiFuncDesc
->
SetFont
(
aFont
);
aFiFuncDesc
->
SetFont
(
aFont
);
aFiFuncDesc
->
SetBackground
(
GetBackground
()
);
//! never transparent?
aFiFuncDesc
->
SetBackground
(
GetBackground
()
);
//! never transparent?
Link
<
ListBox
&
,
void
>
aLink
=
LINK
(
this
,
ScFunction
Dock
Win
,
SelHdl
);
Link
<
ListBox
&
,
void
>
aLink
=
LINK
(
this
,
ScFunctionWin
,
SelHdl
);
aCatBox
->
SetSelectHdl
(
aLink
);
aCatBox
->
SetSelectHdl
(
aLink
);
aFuncList
->
SetSelectHdl
(
aLink
);
aFuncList
->
SetSelectHdl
(
aLink
);
aDDFuncList
->
SetSelectHdl
(
aLink
);
aDDFuncList
->
SetSelectHdl
(
aLink
);
aFuncList
->
SetDoubleClickHdl
(
LINK
(
this
,
ScFunction
Dock
Win
,
SetSelectionHdl
));
aFuncList
->
SetDoubleClickHdl
(
LINK
(
this
,
ScFunctionWin
,
SetSelectionHdl
));
aDDFuncList
->
SetSelectHdl
(
aLink
);
aDDFuncList
->
SetSelectHdl
(
aLink
);
aInsertButton
->
SetClickHdl
(
LINK
(
this
,
ScFunction
Dock
Win
,
SetSelectionClickHdl
));
aInsertButton
->
SetClickHdl
(
LINK
(
this
,
ScFunctionWin
,
SetSelectionClickHdl
));
Link
<
ScPrivatSplit
&
,
void
>
a3Link
=
LINK
(
this
,
ScFunction
Dock
Win
,
SetSplitHdl
);
Link
<
ScPrivatSplit
&
,
void
>
a3Link
=
LINK
(
this
,
ScFunctionWin
,
SetSplitHdl
);
aPrivatSplit
->
SetCtrModifiedHdl
(
a3Link
);
aPrivatSplit
->
SetCtrModifiedHdl
(
a3Link
);
StartListening
(
*
pBindingsP
,
true
);
StartListening
(
rBindings
,
true
);
Point
aTopLeft
=
aCatBox
->
GetPosPixel
();
Point
aTopLeft
=
aCatBox
->
GetPosPixel
();
OUString
aString
(
"ww"
);
OUString
aString
(
"ww"
);
...
@@ -111,12 +112,12 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, vcl::Window* pPar
...
@@ -111,12 +112,12 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, vcl::Window* pPar
}
}
/*************************************************************************
/*************************************************************************
#* Member: ScFunction
Dock
Win
#* Member: ScFunctionWin
#*------------------------------------------------------------------------
#*------------------------------------------------------------------------
#*
#*
#* Klasse: ScFunction
Dock
Win
#* Klasse: ScFunctionWin
#*
#*
#* Funktion: Destruktor der Klasse ScFunction
Dock
Win
#* Funktion: Destruktor der Klasse ScFunctionWin
#*
#*
#* Input: ---
#* Input: ---
#*
#*
...
@@ -124,14 +125,14 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, vcl::Window* pPar
...
@@ -124,14 +125,14 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, vcl::Window* pPar
#*
#*
#************************************************************************/
#************************************************************************/
ScFunction
DockWin
::~
ScFunctionDock
Win
()
ScFunction
Win
::~
ScFunction
Win
()
{
{
disposeOnce
();
disposeOnce
();
}
}
void
ScFunction
Dock
Win
::
dispose
()
void
ScFunctionWin
::
dispose
()
{
{
EndListening
(
GetBindings
()
);
EndListening
(
rBindings
);
aPrivatSplit
.
disposeAndClear
();
aPrivatSplit
.
disposeAndClear
();
aCatBox
.
disposeAndClear
();
aCatBox
.
disposeAndClear
();
aFuncList
.
disposeAndClear
();
aFuncList
.
disposeAndClear
();
...
@@ -139,14 +140,14 @@ void ScFunctionDockWin::dispose()
...
@@ -139,14 +140,14 @@ void ScFunctionDockWin::dispose()
aInsertButton
.
disposeAndClear
();
aInsertButton
.
disposeAndClear
();
aFiFuncDesc
.
disposeAndClear
();
aFiFuncDesc
.
disposeAndClear
();
pAllFuncList
.
clear
();
pAllFuncList
.
clear
();
SfxDocking
Window
::
dispose
();
vcl
::
Window
::
dispose
();
}
}
/*************************************************************************
/*************************************************************************
#* Member: UpdateFunctionList
#* Member: UpdateFunctionList
#*------------------------------------------------------------------------
#*------------------------------------------------------------------------
#*
#*
#* Klasse: ScFunction
Dock
Win
#* Klasse: ScFunctionWin
#*
#*
#* Funktion: Aktualisiert die Liste der Funktionen ab-
#* Funktion: Aktualisiert die Liste der Funktionen ab-
#* haengig von der eingestellten Kategorie.
#* haengig von der eingestellten Kategorie.
...
@@ -157,7 +158,7 @@ void ScFunctionDockWin::dispose()
...
@@ -157,7 +158,7 @@ void ScFunctionDockWin::dispose()
#*
#*
#************************************************************************/
#************************************************************************/
void
ScFunction
Dock
Win
::
InitLRUList
()
void
ScFunctionWin
::
InitLRUList
()
{
{
ScFunctionMgr
*
pFuncMgr
=
ScGlobal
::
GetStarCalcFunctionMgr
();
ScFunctionMgr
*
pFuncMgr
=
ScGlobal
::
GetStarCalcFunctionMgr
();
pFuncMgr
->
fillLastRecentlyUsedFunctions
(
aLRUList
);
pFuncMgr
->
fillLastRecentlyUsedFunctions
(
aLRUList
);
...
@@ -172,7 +173,7 @@ void ScFunctionDockWin::InitLRUList()
...
@@ -172,7 +173,7 @@ void ScFunctionDockWin::InitLRUList()
#* Member: UpdateFunctionList
#* Member: UpdateFunctionList
#*------------------------------------------------------------------------
#*------------------------------------------------------------------------
#*
#*
#* Klasse: ScFunction
Dock
Win
#* Klasse: ScFunctionWin
#*
#*
#* Funktion: Aktualisiert die Liste der zuletzt verwendeten Funktionen.
#* Funktion: Aktualisiert die Liste der zuletzt verwendeten Funktionen.
#*
#*
...
@@ -182,7 +183,7 @@ void ScFunctionDockWin::InitLRUList()
...
@@ -182,7 +183,7 @@ void ScFunctionDockWin::InitLRUList()
#*
#*
#************************************************************************/
#************************************************************************/
void
ScFunction
Dock
Win
::
UpdateLRUList
()
void
ScFunctionWin
::
UpdateLRUList
()
{
{
if
(
pFuncDesc
&&
pFuncDesc
->
nFIndex
!=
0
)
if
(
pFuncDesc
&&
pFuncDesc
->
nFIndex
!=
0
)
{
{
...
@@ -195,7 +196,7 @@ void ScFunctionDockWin::UpdateLRUList()
...
@@ -195,7 +196,7 @@ void ScFunctionDockWin::UpdateLRUList()
#* Member: SetSize
#* Member: SetSize
#*------------------------------------------------------------------------
#*------------------------------------------------------------------------
#*
#*
#* Klasse: ScFunction
Dock
Win
#* Klasse: ScFunctionWin
#*
#*
#* Funktion: Groesse fuer die einzelnen Controls einzustellen.
#* Funktion: Groesse fuer die einzelnen Controls einzustellen.
#*
#*
...
@@ -205,7 +206,7 @@ void ScFunctionDockWin::UpdateLRUList()
...
@@ -205,7 +206,7 @@ void ScFunctionDockWin::UpdateLRUList()
#*
#*
#************************************************************************/
#************************************************************************/
void
ScFunction
Dock
Win
::
SetSize
()
void
ScFunctionWin
::
SetSize
()
{
{
SetLeftRightSize
();
SetLeftRightSize
();
}
}
...
@@ -214,7 +215,7 @@ void ScFunctionDockWin::SetSize()
...
@@ -214,7 +215,7 @@ void ScFunctionDockWin::SetSize()
#* Member: SetLeftRightSize
#* Member: SetLeftRightSize
#*------------------------------------------------------------------------
#*------------------------------------------------------------------------
#*
#*
#* Klasse: ScFunction
Dock
Win
#* Klasse: ScFunctionWin
#*
#*
#* Funktion: Groesse fuer die einzelnen Controls einstellen,
#* Funktion: Groesse fuer die einzelnen Controls einstellen,
#* wenn Links oder Rechts angedockt wird.
#* wenn Links oder Rechts angedockt wird.
...
@@ -225,7 +226,7 @@ void ScFunctionDockWin::SetSize()
...
@@ -225,7 +226,7 @@ void ScFunctionDockWin::SetSize()
#*
#*
#************************************************************************/
#************************************************************************/
void
ScFunction
Dock
Win
::
SetLeftRightSize
()
void
ScFunctionWin
::
SetLeftRightSize
()
{
{
if
(
!
bSizeFlag
)
if
(
!
bSizeFlag
)
{
{
...
@@ -261,7 +262,7 @@ void ScFunctionDockWin::SetLeftRightSize()
...
@@ -261,7 +262,7 @@ void ScFunctionDockWin::SetLeftRightSize()
#* Member: SetMyWidthLeRi
#* Member: SetMyWidthLeRi
#*------------------------------------------------------------------------
#*------------------------------------------------------------------------
#*
#*
#* Klasse: ScFunction
Dock
Win
#* Klasse: ScFunctionWin
#*
#*
#* Funktion: Breite fuer die einzelnen Controls und
#* Funktion: Breite fuer die einzelnen Controls und
#* das Fenster einstellen,wenn Li oder Re
#* das Fenster einstellen,wenn Li oder Re
...
@@ -272,7 +273,7 @@ void ScFunctionDockWin::SetLeftRightSize()
...
@@ -272,7 +273,7 @@ void ScFunctionDockWin::SetLeftRightSize()
#*
#*
#************************************************************************/
#************************************************************************/
void
ScFunction
Dock
Win
::
SetMyWidthLeRi
(
Size
&
aNewSize
)
void
ScFunctionWin
::
SetMyWidthLeRi
(
Size
&
aNewSize
)
{
{
if
((
sal_uLong
)
aNewSize
.
Width
()
<
nMinWidth
)
aNewSize
.
Width
()
=
nMinWidth
;
if
((
sal_uLong
)
aNewSize
.
Width
()
<
nMinWidth
)
aNewSize
.
Width
()
=
nMinWidth
;
...
@@ -299,7 +300,7 @@ void ScFunctionDockWin::SetMyWidthLeRi(Size &aNewSize)
...
@@ -299,7 +300,7 @@ void ScFunctionDockWin::SetMyWidthLeRi(Size &aNewSize)
#* Member: SetHeight
#* Member: SetHeight
#*------------------------------------------------------------------------
#*------------------------------------------------------------------------
#*
#*
#* Klasse: ScFunction
Dock
Win
#* Klasse: ScFunctionWin
#*
#*
#* Funktion: Hoehe fuer die einzelnen Controls und
#* Funktion: Hoehe fuer die einzelnen Controls und
#* das Fenster einstellen bei Li oder Re
#* das Fenster einstellen bei Li oder Re
...
@@ -310,7 +311,7 @@ void ScFunctionDockWin::SetMyWidthLeRi(Size &aNewSize)
...
@@ -310,7 +311,7 @@ void ScFunctionDockWin::SetMyWidthLeRi(Size &aNewSize)
#*
#*
#************************************************************************/
#************************************************************************/
void
ScFunction
Dock
Win
::
SetMyHeightLeRi
(
Size
&
aNewSize
)
void
ScFunctionWin
::
SetMyHeightLeRi
(
Size
&
aNewSize
)
{
{
if
((
sal_uLong
)
aNewSize
.
Height
()
<
nMinHeight
)
aNewSize
.
Height
()
=
nMinHeight
;
if
((
sal_uLong
)
aNewSize
.
Height
()
<
nMinHeight
)
aNewSize
.
Height
()
=
nMinHeight
;
...
@@ -347,7 +348,7 @@ void ScFunctionDockWin::SetMyHeightLeRi(Size &aNewSize)
...
@@ -347,7 +348,7 @@ void ScFunctionDockWin::SetMyHeightLeRi(Size &aNewSize)
#* Member: SetDescription
#* Member: SetDescription
#*------------------------------------------------------------------------
#*------------------------------------------------------------------------
#*
#*
#* Klasse: ScFunction
Dock
Win
#* Klasse: ScFunctionWin
#*
#*
#* Funktion: Erklaerungstext fuer die Funktion einstellen.
#* Funktion: Erklaerungstext fuer die Funktion einstellen.
#*
#*
...
@@ -357,7 +358,7 @@ void ScFunctionDockWin::SetMyHeightLeRi(Size &aNewSize)
...
@@ -357,7 +358,7 @@ void ScFunctionDockWin::SetMyHeightLeRi(Size &aNewSize)
#*
#*
#************************************************************************/
#************************************************************************/
void
ScFunction
Dock
Win
::
SetDescription
()
void
ScFunctionWin
::
SetDescription
()
{
{
aFiFuncDesc
->
SetText
(
EMPTY_OUSTRING
);
aFiFuncDesc
->
SetText
(
EMPTY_OUSTRING
);
const
ScFuncDesc
*
pDesc
=
const
ScFuncDesc
*
pDesc
=
...
@@ -381,93 +382,11 @@ void ScFunctionDockWin::SetDescription()
...
@@ -381,93 +382,11 @@ void ScFunctionDockWin::SetDescription()
}
}
}
}
/// override to set new size of the controls
void
ScFunctionDockWin
::
Resizing
(
Size
&
rNewSize
)
{
if
((
sal_uLong
)
rNewSize
.
Width
()
<
nMinWidth
)
rNewSize
.
Width
()
=
nMinWidth
;
if
((
sal_uLong
)
rNewSize
.
Height
()
<
nMinHeight
)
rNewSize
.
Height
()
=
nMinHeight
;
}
/*************************************************************************
#* Member: Close
#*------------------------------------------------------------------------
#*
#* Klasse: ScFunctionDockWin
#*
#* Funktion: Schliessen des Fensters
#*
#* Input: ---
#*
#* Output: TRUE
#*
#************************************************************************/
bool
ScFunctionDockWin
::
Close
()
{
SfxBoolItem
aItem
(
FID_FUNCTION_BOX
,
false
);
GetBindings
().
GetDispatcher
()
->
Execute
(
FID_FUNCTION_BOX
,
SfxCallMode
::
ASYNCHRON
|
SfxCallMode
::
RECORD
,
&
aItem
,
0L
);
SfxDockingWindow
::
Close
();
return
true
;
}
/*************************************************************************
#* Member: CheckAlignment
#*------------------------------------------------------------------------
#*
#* Klasse: ScFunctionDockWin
#*
#* Funktion: Ueberprueft den Andockmodus und stellt die
#* Groessen dementsprechend ein.
#*
#* Input: Das neue Alignment
#*
#* Output: Das uebergebene Alignment
#*
#************************************************************************/
SfxChildAlignment
ScFunctionDockWin
::
CheckAlignment
(
SfxChildAlignment
eCurrentAlignment
,
SfxChildAlignment
eRequestedAlignment
)
{
OUString
aString
(
"ww"
);
Size
aTxtSize
(
aFiFuncDesc
->
GetTextWidth
(
aString
),
aFiFuncDesc
->
GetTextHeight
()
);
Point
aTopLeft
=
aCatBox
->
GetPosPixel
();
nMinWidth
=
aTxtSize
.
Width
()
+
aTopLeft
.
X
()
+
2
*
aFuncList
->
GetPosPixel
().
X
();
nMinHeight
=
19
*
aTxtSize
.
Height
();
switch
(
eRequestedAlignment
)
{
case
SfxChildAlignment
:
:
TOP
:
case
SfxChildAlignment
:
:
HIGHESTTOP
:
case
SfxChildAlignment
:
:
LOWESTTOP
:
case
SfxChildAlignment
:
:
BOTTOM
:
case
SfxChildAlignment
:
:
LOWESTBOTTOM
:
case
SfxChildAlignment
:
:
HIGHESTBOTTOM
:
return
eCurrentAlignment
;
case
SfxChildAlignment
:
:
LEFT
:
case
SfxChildAlignment
:
:
RIGHT
:
case
SfxChildAlignment
:
:
FIRSTLEFT
:
case
SfxChildAlignment
:
:
LASTLEFT
:
case
SfxChildAlignment
:
:
FIRSTRIGHT
:
case
SfxChildAlignment
:
:
LASTRIGHT
:
return
eRequestedAlignment
;
default
:
return
eRequestedAlignment
;
}
}
/*************************************************************************
/*************************************************************************
#* Member: Close
#* Member: Close
#*------------------------------------------------------------------------
#*------------------------------------------------------------------------
#*
#*
#* Klasse: ScFunction
Dock
Win
#* Klasse: ScFunctionWin
#*
#*
#* Funktion: Aenderungen erkennen
#* Funktion: Aenderungen erkennen
#*
#*
...
@@ -476,28 +395,22 @@ SfxChildAlignment ScFunctionDockWin::CheckAlignment(
...
@@ -476,28 +395,22 @@ SfxChildAlignment ScFunctionDockWin::CheckAlignment(
#* Output: TRUE
#* Output: TRUE
#*
#*
#************************************************************************/
#************************************************************************/
void
ScFunction
Dock
Win
::
Notify
(
SfxBroadcaster
&
,
const
SfxHint
&
/* rHint */
)
void
ScFunctionWin
::
Notify
(
SfxBroadcaster
&
,
const
SfxHint
&
/* rHint */
)
{
{
}
}
/// override to set new size of the controls
/// override to set new size of the controls
void
ScFunction
Dock
Win
::
Resize
()
void
ScFunctionWin
::
Resize
()
{
{
if
(
!
IsFloatingMode
()
||
SetSize
();
!
GetFloatingWindow
()
->
IsRollUp
()
)
vcl
::
Window
::
Resize
();
{
Size
aQSize
=
GetOutputSizePixel
();
Resizing
(
aQSize
);
SetSize
();
}
SfxDockingWindow
::
Resize
();
}
}
/*************************************************************************
/*************************************************************************
#* Member: UpdateFunctionList
#* Member: UpdateFunctionList
#*------------------------------------------------------------------------
#*------------------------------------------------------------------------
#*
#*
#* Klasse: ScFunction
Dock
Win
#* Klasse: ScFunctionWin
#*
#*
#* Funktion: Aktualisiert die Liste der Funktionen ab-
#* Funktion: Aktualisiert die Liste der Funktionen ab-
#* haengig von der eingestellten Kategorie.
#* haengig von der eingestellten Kategorie.
...
@@ -508,7 +421,7 @@ void ScFunctionDockWin::Resize()
...
@@ -508,7 +421,7 @@ void ScFunctionDockWin::Resize()
#*
#*
#************************************************************************/
#************************************************************************/
void
ScFunction
Dock
Win
::
UpdateFunctionList
()
void
ScFunctionWin
::
UpdateFunctionList
()
{
{
sal_Int32
nSelPos
=
aCatBox
->
GetSelectEntryPos
();
sal_Int32
nSelPos
=
aCatBox
->
GetSelectEntryPos
();
sal_Int32
nCategory
=
(
LISTBOX_ENTRY_NOTFOUND
!=
nSelPos
)
sal_Int32
nCategory
=
(
LISTBOX_ENTRY_NOTFOUND
!=
nSelPos
)
...
@@ -558,7 +471,7 @@ void ScFunctionDockWin::UpdateFunctionList()
...
@@ -558,7 +471,7 @@ void ScFunctionDockWin::UpdateFunctionList()
#* Member: DoEnter
#* Member: DoEnter
#*------------------------------------------------------------------------
#*------------------------------------------------------------------------
#*
#*
#* Klasse: ScFunction
Dock
Win
#* Klasse: ScFunctionWin
#*
#*
#* Funktion: Eingabe ins Dokument uebernehmen. Wird aufgerufen
#* Funktion: Eingabe ins Dokument uebernehmen. Wird aufgerufen
#* nach betaetigen der Uebernehmen- Schaltflaeche
#* nach betaetigen der Uebernehmen- Schaltflaeche
...
@@ -570,7 +483,7 @@ void ScFunctionDockWin::UpdateFunctionList()
...
@@ -570,7 +483,7 @@ void ScFunctionDockWin::UpdateFunctionList()
#*
#*
#************************************************************************/
#************************************************************************/
void
ScFunction
Dock
Win
::
DoEnter
()
void
ScFunctionWin
::
DoEnter
()
{
{
OUString
aFirstArgStr
;
OUString
aFirstArgStr
;
OUString
aArgStr
;
OUString
aArgStr
;
...
@@ -679,7 +592,7 @@ void ScFunctionDockWin::DoEnter()
...
@@ -679,7 +592,7 @@ void ScFunctionDockWin::DoEnter()
#* Handle: SelHdl
#* Handle: SelHdl
#*------------------------------------------------------------------------
#*------------------------------------------------------------------------
#*
#*
#* Klasse: ScFunction
Dock
Win
#* Klasse: ScFunctionWin
#*
#*
#* Funktion: Bei einer Aenderung der Kategorie wird die
#* Funktion: Bei einer Aenderung der Kategorie wird die
#* die Liste der Funktionen aktualisiert.
#* die Liste der Funktionen aktualisiert.
...
@@ -690,7 +603,7 @@ void ScFunctionDockWin::DoEnter()
...
@@ -690,7 +603,7 @@ void ScFunctionDockWin::DoEnter()
#*
#*
#************************************************************************/
#************************************************************************/
IMPL_LINK_TYPED
(
ScFunction
Dock
Win
,
SelHdl
,
ListBox
&
,
rLb
,
void
)
IMPL_LINK_TYPED
(
ScFunctionWin
,
SelHdl
,
ListBox
&
,
rLb
,
void
)
{
{
if
(
&
rLb
==
aCatBox
.
get
()
)
if
(
&
rLb
==
aCatBox
.
get
()
)
{
{
...
@@ -708,7 +621,7 @@ IMPL_LINK_TYPED( ScFunctionDockWin, SelHdl, ListBox&, rLb, void )
...
@@ -708,7 +621,7 @@ IMPL_LINK_TYPED( ScFunctionDockWin, SelHdl, ListBox&, rLb, void )
#* Handle: SelHdl
#* Handle: SelHdl
#*------------------------------------------------------------------------
#*------------------------------------------------------------------------
#*
#*
#* Klasse: ScFunction
Dock
Win
#* Klasse: ScFunctionWin
#*
#*
#* Funktion: Bei einer Aenderung der Kategorie wird die
#* Funktion: Bei einer Aenderung der Kategorie wird die
#* die Liste der Funktionen aktualisiert.
#* die Liste der Funktionen aktualisiert.
...
@@ -719,11 +632,11 @@ IMPL_LINK_TYPED( ScFunctionDockWin, SelHdl, ListBox&, rLb, void )
...
@@ -719,11 +632,11 @@ IMPL_LINK_TYPED( ScFunctionDockWin, SelHdl, ListBox&, rLb, void )
#*
#*
#************************************************************************/
#************************************************************************/
IMPL_LINK_NOARG_TYPED
(
ScFunction
Dock
Win
,
SetSelectionClickHdl
,
Button
*
,
void
)
IMPL_LINK_NOARG_TYPED
(
ScFunctionWin
,
SetSelectionClickHdl
,
Button
*
,
void
)
{
{
DoEnter
();
// Uebernimmt die Eingabe
DoEnter
();
// Uebernimmt die Eingabe
}
}
IMPL_LINK_NOARG_TYPED
(
ScFunction
Dock
Win
,
SetSelectionHdl
,
ListBox
&
,
void
)
IMPL_LINK_NOARG_TYPED
(
ScFunctionWin
,
SetSelectionHdl
,
ListBox
&
,
void
)
{
{
DoEnter
();
// Uebernimmt die Eingabe
DoEnter
();
// Uebernimmt die Eingabe
}
}
...
@@ -732,7 +645,7 @@ IMPL_LINK_NOARG_TYPED( ScFunctionDockWin, SetSelectionHdl, ListBox&, void )
...
@@ -732,7 +645,7 @@ IMPL_LINK_NOARG_TYPED( ScFunctionDockWin, SetSelectionHdl, ListBox&, void )
#* Handle: SetSplitHdl
#* Handle: SetSplitHdl
#*------------------------------------------------------------------------
#*------------------------------------------------------------------------
#*
#*
#* Klasse: ScFunction
Dock
Win
#* Klasse: ScFunctionWin
#*
#*
#* Funktion: Bei einer Aenderung des Split- Controls werden die
#* Funktion: Bei einer Aenderung des Split- Controls werden die
#* einzelnen Controls an die neue Groesse angepasst.
#* einzelnen Controls an die neue Groesse angepasst.
...
@@ -743,7 +656,7 @@ IMPL_LINK_NOARG_TYPED( ScFunctionDockWin, SetSelectionHdl, ListBox&, void )
...
@@ -743,7 +656,7 @@ IMPL_LINK_NOARG_TYPED( ScFunctionDockWin, SetSelectionHdl, ListBox&, void )
#*
#*
#************************************************************************/
#************************************************************************/
IMPL_LINK_TYPED
(
ScFunction
Dock
Win
,
SetSplitHdl
,
ScPrivatSplit
&
,
rCtrl
,
void
)
IMPL_LINK_TYPED
(
ScFunctionWin
,
SetSplitHdl
,
ScPrivatSplit
&
,
rCtrl
,
void
)
{
{
if
(
&
rCtrl
==
aPrivatSplit
.
get
())
if
(
&
rCtrl
==
aPrivatSplit
.
get
())
{
{
...
@@ -761,79 +674,17 @@ IMPL_LINK_TYPED( ScFunctionDockWin, SetSplitHdl, ScPrivatSplit&, rCtrl, void )
...
@@ -761,79 +674,17 @@ IMPL_LINK_TYPED( ScFunctionDockWin, SetSplitHdl, ScPrivatSplit&, rCtrl, void )
}
}
}
}
void
ScFunctionDockWin
::
ToggleFloatingMode
(
)
IMPL_LINK_NOARG_TYPED
(
ScFunctionWin
,
TimerHdl
,
Idle
*
,
void
)
{
{
aSplitterInitPos
=
Point
();
OUString
aString
(
"ww"
);
SfxDockingWindow
::
ToggleFloatingMode
();
Size
aTxtSize
(
aFiFuncDesc
->
GetTextWidth
(
aString
),
aFiFuncDesc
->
GetTextHeight
()
);
Point
aTopLeft
=
aCatBox
->
GetPosPixel
();
aOldSize
.
Height
()
=
0
;
nMinWidth
=
aTxtSize
.
Width
()
+
aTopLeft
.
X
()
+
2
*
aFuncList
->
GetPosPixel
().
X
();
aOldSize
.
Width
()
=
0
;
nMinHeight
=
19
*
aTxtSize
.
Height
();
aIdle
.
Start
();
}
IMPL_LINK_NOARG_TYPED
(
ScFunctionDockWin
,
TimerHdl
,
Idle
*
,
void
)
{
CheckAlignment
(
GetAlignment
(),
GetAlignment
());
SetSize
();
SetSize
();
}
}
void
ScFunctionDockWin
::
Initialize
(
SfxChildWinInfo
*
pInfo
)
void
ScFunctionWin
::
UseSplitterInitPos
()
{
OUString
aStr
;
if
(
pInfo
!=
nullptr
)
{
if
(
!
pInfo
->
aExtraString
.
isEmpty
()
)
{
sal_Int32
nPos
=
pInfo
->
aExtraString
.
indexOf
(
"ScFuncList:"
);
// Versuche, den Alignment-String "ALIGN:(...)" einzulesen; wenn
// er nicht vorhanden ist, liegt eine "altere Version vor
if
(
nPos
!=
-
1
)
{
sal_Int32
n1
=
pInfo
->
aExtraString
.
indexOf
(
'('
,
nPos
);
if
(
n1
!=
-
1
)
{
sal_Int32
n2
=
pInfo
->
aExtraString
.
indexOf
(
')'
,
n1
);
if
(
n2
!=
-
1
)
{
// Alignment-String herausschneiden
aStr
=
pInfo
->
aExtraString
.
copy
(
nPos
,
n2
-
nPos
+
1
);
pInfo
->
aExtraString
=
pInfo
->
aExtraString
.
replaceAt
(
nPos
,
n2
-
nPos
+
1
,
""
);
aStr
=
aStr
.
copy
(
n1
-
nPos
+
1
);
}
}
}
}
}
SfxDockingWindow
::
Initialize
(
pInfo
);
if
(
!
aStr
.
isEmpty
())
{
aSplitterInitPos
=
aPrivatSplit
->
GetPosPixel
();
aSplitterInitPos
.
Y
()
=
(
sal_uInt16
)
aStr
.
toInt32
();
sal_Int32
n1
=
aStr
.
indexOf
(
';'
);
aStr
=
aStr
.
copy
(
n1
+
1
);
sal_Int32
nSelPos
=
aStr
.
toInt32
();
aCatBox
->
SelectEntryPos
(
nSelPos
);
SelHdl
(
*
aCatBox
.
get
());
// if the window has already been shown (from SfxDockingWindow::Initialize if docked),
// set the splitter position now, otherwise it is set in StateChanged with type INITSHOW
UseSplitterInitPos
();
}
}
void
ScFunctionDockWin
::
FillInfo
(
SfxChildWinInfo
&
rInfo
)
const
{
SfxDockingWindow
::
FillInfo
(
rInfo
);
Point
aPoint
=
aPrivatSplit
->
GetPosPixel
();
rInfo
.
aExtraString
+=
"ScFuncList:("
+
OUString
::
number
(
aPoint
.
Y
())
+
";"
+
OUString
::
number
(
aCatBox
->
GetSelectEntryPos
())
+
")"
;
}
void
ScFunctionDockWin
::
UseSplitterInitPos
()
{
{
if
(
IsVisible
()
&&
aPrivatSplit
->
IsEnabled
()
&&
aSplitterInitPos
!=
Point
()
)
if
(
IsVisible
()
&&
aPrivatSplit
->
IsEnabled
()
&&
aSplitterInitPos
!=
Point
()
)
{
{
...
@@ -842,9 +693,9 @@ void ScFunctionDockWin::UseSplitterInitPos()
...
@@ -842,9 +693,9 @@ void ScFunctionDockWin::UseSplitterInitPos()
}
}
}
}
void
ScFunction
Dock
Win
::
StateChanged
(
StateChangedType
nStateChange
)
void
ScFunctionWin
::
StateChanged
(
StateChangedType
nStateChange
)
{
{
SfxDocking
Window
::
StateChanged
(
nStateChange
);
vcl
::
Window
::
StateChanged
(
nStateChange
);
if
(
nStateChange
==
StateChangedType
::
InitShow
)
if
(
nStateChange
==
StateChangedType
::
InitShow
)
{
{
...
...
sc/source/ui/formdlg/dwfunctr.src
Dosyayı görüntüle @
b59ece02
...
@@ -20,17 +20,9 @@
...
@@ -20,17 +20,9 @@
#include "sc.hrc"
#include "sc.hrc"
#include "dwfunctr.hrc"
#include "dwfunctr.hrc"
Docking
Window FID_FUNCTION_BOX
Window FID_FUNCTION_BOX
{
{
Border = TRUE ;
Hide = TRUE ;
SVLook = TRUE ;
SVLook = TRUE ;
Sizeable = TRUE ;
Moveable = TRUE ;
Closeable = TRUE ;
Zoomable = TRUE ;
Dockable = TRUE ;
EnableResizing = TRUE ;
Size = MAP_APPFONT ( 130 , 160 ) ;
Size = MAP_APPFONT ( 130 , 160 ) ;
HelpId = HID_FUNCTION_BOX ;
HelpId = HID_FUNCTION_BOX ;
ListBox CB_CAT
ListBox CB_CAT
...
...
sc/source/ui/inc/dwfunctr.hxx
Dosyayı görüntüle @
b59ece02
...
@@ -32,10 +32,11 @@
...
@@ -32,10 +32,11 @@
#include "privsplt.hxx"
#include "privsplt.hxx"
#include "funcdesc.hxx"
#include "funcdesc.hxx"
class
ScFunction
DockWin
:
public
SfxDocking
Window
,
public
SfxListener
class
ScFunction
Win
:
public
vcl
::
Window
,
public
SfxListener
{
{
private
:
private
:
SfxBindings
&
rBindings
;
Idle
aIdle
;
Idle
aIdle
;
VclPtr
<
ScPrivatSplit
>
aPrivatSplit
;
VclPtr
<
ScPrivatSplit
>
aPrivatSplit
;
VclPtr
<
ListBox
>
aCatBox
;
VclPtr
<
ListBox
>
aCatBox
;
...
@@ -72,31 +73,22 @@ private:
...
@@ -72,31 +73,22 @@ private:
protected
:
protected
:
virtual
bool
Close
()
override
;
virtual
void
Resize
()
override
;
virtual
void
Resize
()
override
;
virtual
void
Resizing
(
Size
&
rSize
)
override
;
void
SetSize
();
void
SetSize
();
virtual
void
ToggleFloatingMode
()
override
;
virtual
void
StateChanged
(
StateChangedType
nStateChange
)
override
;
virtual
void
StateChanged
(
StateChangedType
nStateChange
)
override
;
virtual
SfxChildAlignment
CheckAlignment
(
SfxChildAlignment
,
SfxChildAlignment
eAlign
)
override
;
public
:
public
:
ScFunction
Dock
Win
(
SfxBindings
*
pBindings
,
ScFunctionWin
(
SfxBindings
*
pBindings
,
vcl
::
Window
*
pParent
,
vcl
::
Window
*
pParent
,
const
ResId
&
rResId
);
const
ResId
&
rResId
);
virtual
~
ScFunction
Dock
Win
();
virtual
~
ScFunctionWin
();
virtual
void
dispose
()
override
;
virtual
void
dispose
()
override
;
using
SfxDocking
Window
::
Notify
;
using
::
vcl
::
Window
::
Notify
;
virtual
void
Notify
(
SfxBroadcaster
&
rBC
,
const
SfxHint
&
rHint
)
override
;
virtual
void
Notify
(
SfxBroadcaster
&
rBC
,
const
SfxHint
&
rHint
)
override
;
void
InitLRUList
();
void
InitLRUList
();
void
Initialize
(
SfxChildWinInfo
*
pInfo
);
virtual
void
FillInfo
(
SfxChildWinInfo
&
)
const
override
;
};
};
#endif
#endif
...
...
sc/source/ui/sidebar/ScPanelFactory.cxx
Dosyayı görüntüle @
b59ece02
...
@@ -99,7 +99,7 @@ Reference<ui::XUIElement> SAL_CALL ScPanelFactory::createUIElement (
...
@@ -99,7 +99,7 @@ Reference<ui::XUIElement> SAL_CALL ScPanelFactory::createUIElement (
}
}
else
if
(
rsResourceURL
.
endsWith
(
"/FunctionsPanel"
))
else
if
(
rsResourceURL
.
endsWith
(
"/FunctionsPanel"
))
{
{
pPanel
=
VclPtr
<
ScFunction
Dock
Win
>::
Create
(
pBindings
,
pParentWindow
,
ScResId
(
FID_FUNCTION_BOX
));
pPanel
=
VclPtr
<
ScFunctionWin
>::
Create
(
pBindings
,
pParentWindow
,
ScResId
(
FID_FUNCTION_BOX
));
nMinimumSize
=
0
;
nMinimumSize
=
0
;
}
}
...
...
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