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
3bba88bc
Kaydet (Commit)
3bba88bc
authored
Ara 02, 2002
tarafından
Gregor Hartmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#105538# new Window Type for the TreeListBox
üst
6a312283
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
160 additions
and
170 deletions
+160
-170
rcontrol.hxx
automation/source/inc/rcontrol.hxx
+11
-10
statemnt.cxx
automation/source/server/statemnt.cxx
+149
-160
No files found.
automation/source/inc/rcontrol.hxx
Dosyayı görüntüle @
3bba88bc
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: rcontrol.hxx,v $
*
* $Revision: 1.
1
$
* $Revision: 1.
2
$
*
* last change: $Author:
mh $ $Date: 2002-11-18 11:1
2:07 $
* last change: $Author:
gh $ $Date: 2002-12-02 10:2
2:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -158,18 +158,19 @@
#define C_PatternBox 60
#define C_ToolBox 61
#define C_ValueSet 62
#define C_Control 63 // Fr das schmutzige Rummachen auf Treelist Boxen ...
#define C_Control 63
#define C_TreeListBox 64 // Hurray the TreeListBox finally got its own Window Type
#define C_OkButton 6
4
#define C_CancelButton 6
5
#define C_ButtonDialog 6
6
#define C_OkButton 6
5
#define C_CancelButton 6
6
#define C_ButtonDialog 6
7
// Some new Elements for Mozilla
#define C_Anchor 6
7
#define C_FormElement 6
8
#define C_DOMText
69
#define C_Image 7
0
#define C_Anchor 6
8
#define C_FormElement 6
9
#define C_DOMText
70
#define C_Image 7
1
...
...
automation/source/server/statemnt.cxx
Dosyayı görüntüle @
3bba88bc
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: statemnt.cxx,v $
*
* $Revision: 1.
2
$
* $Revision: 1.
3
$
*
* last change: $Author: gh $ $Date: 2002-1
1-27 12:39:13
$
* last change: $Author: gh $ $Date: 2002-1
2-02 10:22:07
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -75,6 +75,7 @@
#include <comphelper/processfactory.hxx>
#endif
#include <vcl/wintypes.hxx>
#ifndef _DIALOG_HXX //autogen
#include <vcl/dialog.hxx>
#endif
...
...
@@ -496,6 +497,7 @@ static short ImpGetRType( Window *pWin, ULONG nUId )
case
WINDOW_OKBUTTON
:
nRT
=
C_OkButton
;
break
;
case
WINDOW_CANCELBUTTON
:
nRT
=
C_CancelButton
;
break
;
case
WINDOW_BUTTONDIALOG
:
nRT
=
C_ButtonDialog
;
break
;
case
WINDOW_TREELISTBOX
:
nRT
=
C_TreeListBox
;
break
;
}
#ifdef DBG_UTIL
// Die Werte n sind bei den WindowTypen nicht mehr vergeben, werden aber in der AutoID noch verwendet
...
...
@@ -4676,6 +4678,7 @@ BOOL StatementControl::Execute()
else
{
ListBox
*
pLB
=
((
ListBox
*
)
pControl
);
pLB
=
static_cast
<
ListBox
*>
(
pControl
);
if
(
ValueOK
(
nUId
,
MethodString
(
nMethodId
),
nNr1
,
pLB
->
GetEntryCount
())
)
{
if
(
bUnselectBeforeSelect
)
...
...
@@ -5139,19 +5142,9 @@ BOOL StatementControl::Execute()
break
;
}
break
;
case C_
Control
:
case
C_
TreeListBox
:
switch
(
nMethodId
)
{
case M_AnimateMouse :
AnimateMouse( pControl, MitteOben);
break;
default:
switch( nControlType )
{
case CONST_CTTreeListBox:
switch( nMethodId )
{
...
...
@@ -5193,153 +5186,149 @@ USHORT nValidTextItemCount = 0;\
}\
}
case M_GetText : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
// aber WP hat gesagt!
{
SvTreeListBox *pTree = (SvTreeListBox*)pControl;
SvLBoxEntry *pThisEntry = pTree->GetCurEntry();
if ( ! (nParams & PARAM_USHORT_1) )
nNr1 = 1;
if ( pThisEntry )
{
GetFirstValidTextItem( pThisEntry, nNr1 );
if ( ValueOK( nUId, CUniString("GetText"), nNr1, nValidTextItemCount ) )
pRet->GenReturn ( RET_Value, nUId, pItem->GetText() );
}
else
ReportError( nUId, GEN_RES_STR2c2( S_NO_SELECTED_ENTRY, MethodString( nMethodId ), "TreeListBox" ) );
}
break;
case M_GetSelCount : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
// aber WP hat gesagt!
pRet->GenReturn ( RET_Value, nUId, ULONG(((SvLBox*)pControl)->GetSelectionCount()));
break;
case M_GetSelIndex : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
// aber WP hat gesagt!
if ( ! (nParams & PARAM_USHORT_1) )
nNr1 = 1;
if ( ValueOK(nUId, CUniString("GetSelIndex"),nNr1,((SvLBox*)pControl)->GetSelectionCount()) )
{
nNr1--;
COUNT_LBOX( FirstSelected, NextSelected, nNr1);
pRet->GenReturn ( RET_Value, nUId, ULONG( ((SvTreeListBox*)pControl)->GetVisiblePos( pThisEntry )) +1 );
}
break;
case M_GetSelText : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
// aber WP hat gesagt!
if ( ! (nParams & PARAM_USHORT_1) )
nNr1 = 1;
if ( ! (nParams & PARAM_USHORT_2) )
nNr2 = 1;
if ( ValueOK(nUId, CUniString("GetSelText"),nNr1,((SvLBox*)pControl)->GetSelectionCount()) )
{
nNr1--;
COUNT_LBOX( FirstSelected, NextSelected, nNr1);
GetFirstValidTextItem( pThisEntry, nNr2 );
if ( ValueOK( nUId, CUniString("GetSelText"), nNr2, nValidTextItemCount ) )
pRet->GenReturn ( RET_Value, nUId, pItem->GetText() );
}
break;
case M_GetItemCount : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
// aber WP hat gesagt!
pRet->GenReturn ( RET_Value, nUId, ULONG(((SvLBox*)pControl)->GetVisibleCount()) );
break;
case M_GetItemText : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
// aber WP hat gesagt!
if ( ValueOK(nUId, MethodString( nMethodId ),nNr1,((SvLBox*)pControl)->GetVisibleCount()) )
{
SvLBoxEntry *pEntry = (SvLBoxEntry*)((SvTreeListBox*)pControl)->GetEntryAtVisPos( nNr1-1 );
if ( ! (nParams & PARAM_USHORT_2) )
nNr2 = 1;
GetFirstValidTextItem( pEntry, nNr2 );
if ( ValueOK( nUId, CUniString("GetItemText"), nNr2, nValidTextItemCount ) )
pRet->GenReturn ( RET_Value, nUId, pItem->GetText() );
}
break;
case M_Select : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
// aber WP hat gesagt!
if ( ! (nParams & PARAM_BOOL_1) )
bBool1 = TRUE;
if( nParams & PARAM_STR_1 )
{
/* ListBox *pLB = ((ListBox*)pControl);
if ( pLB->GetEntryPos( aString1 ) == LISTBOX_ENTRY_NOTFOUND )
ReportError( nUId, GEN_RES_STR2( S_ENTRY_NOT_FOUND, MethodString( nMethodId ), aString1 ) );
else
{
pLB->SelectEntry( aString1, bBool1 );
if ( pLB->IsEntrySelected( aString1 ) ? !bBool1 : bBool1 ) // XOR rein mit BOOL
ReportError( nUId, GEN_RES_STR2( S_METHOD_FAILED, MethodString( nMethodId ), aString1 ) );
}
*/ ReportError( nUId, GEN_RES_STR1( S_SELECT_DESELECT_VIA_STRING_NOT_IMPLEMENTED, MethodString( nMethodId ) ) );
}
else
{
if ( ValueOK(nUId, MethodString( nMethodId ),nNr1,((SvLBox*)pControl)->GetVisibleCount()) )
{
SvLBoxEntry *pEntry = (SvLBoxEntry*)((SvTreeListBox*)pControl)->GetEntryAtVisPos( nNr1-1 );
((SvTreeListBox*)pControl)->Select ( pEntry, bBool1 );
}
}
break;
case M_IsChecked : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
case M_IsTristate : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
case M_GetState :
case M_Check : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
case M_UnCheck : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
case M_TriState : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
// aber WP hat gesagt!
{
SvTreeListBox *pTree = (SvTreeListBox*)pControl;
SvLBoxEntry *pThisEntry = pTree->GetCurEntry();
if ( !pThisEntry )
ReportError( nUId, GEN_RES_STR2c2( S_NO_SELECTED_ENTRY, MethodString( nMethodId ), "TreeListBox" ) );
else
{
SvLBoxButton* pItem = (SvLBoxButton*)(pThisEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON));
if(!pItem)
ReportError( nUId, GEN_RES_STR1( S_NO_LIST_BOX_BUTTON, MethodString( nMethodId ) ) );
else
switch( nMethodId )
{
case M_IsChecked : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
// aber WP hat gesagt!
pRet->GenReturn ( RET_Value, nUId, BOOL( pItem->IsStateChecked() ) );
break;
case M_IsTristate : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
// aber WP hat gesagt!
pRet->GenReturn ( RET_Value, nUId, BOOL( pItem->IsStateTristate() ) );
break;
case M_GetState :
pRet->GenReturn ( RET_Value, nUId, ULONG( pItem->GetButtonFlags() & ~SV_STATE_MASK ));
break;
case M_Check : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
// aber WP hat gesagt!
pItem->SetStateChecked();
pTree->InvalidateEntry( pThisEntry );
break;
case M_UnCheck : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
// aber WP hat gesagt!
pItem->SetStateUnchecked();
pTree->InvalidateEntry( pThisEntry );
break;
case M_TriState : // TreeListBox wird angenommen! (Das kann ja nur schief gehen)
// aber WP hat gesagt!
pItem->SetStateTristate();
pTree->InvalidateEntry( pThisEntry );
break;
default:
ReportError( nUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) );
break;
}
}
}
break;
default:
ReportError( nUId, GEN_RES_STR2c2( S_UNKNOWN_METHOD, MethodString(nMethodId), "TreeListBox" ) );
break;
}
break;
case
M_GetText
:
{
SvTreeListBox
*
pTree
=
(
SvTreeListBox
*
)
pControl
;
SvLBoxEntry
*
pThisEntry
=
pTree
->
GetCurEntry
();
if
(
!
(
nParams
&
PARAM_USHORT_1
)
)
nNr1
=
1
;
if
(
pThisEntry
)
{
GetFirstValidTextItem
(
pThisEntry
,
nNr1
);
if
(
ValueOK
(
nUId
,
CUniString
(
"GetText"
),
nNr1
,
nValidTextItemCount
)
)
pRet
->
GenReturn
(
RET_Value
,
nUId
,
pItem
->
GetText
()
);
}
else
ReportError
(
nUId
,
GEN_RES_STR2c2
(
S_NO_SELECTED_ENTRY
,
MethodString
(
nMethodId
),
"TreeListBox"
)
);
}
break
;
case
M_GetSelCount
:
pRet
->
GenReturn
(
RET_Value
,
nUId
,
ULONG
(((
SvLBox
*
)
pControl
)
->
GetSelectionCount
()));
break
;
case
M_GetSelIndex
:
if
(
!
(
nParams
&
PARAM_USHORT_1
)
)
nNr1
=
1
;
if
(
ValueOK
(
nUId
,
CUniString
(
"GetSelIndex"
),
nNr1
,((
SvLBox
*
)
pControl
)
->
GetSelectionCount
())
)
{
nNr1
--
;
COUNT_LBOX
(
FirstSelected
,
NextSelected
,
nNr1
);
pRet
->
GenReturn
(
RET_Value
,
nUId
,
ULONG
(
((
SvTreeListBox
*
)
pControl
)
->
GetVisiblePos
(
pThisEntry
))
+
1
);
}
break
;
case
M_GetSelText
:
if
(
!
(
nParams
&
PARAM_USHORT_1
)
)
nNr1
=
1
;
if
(
!
(
nParams
&
PARAM_USHORT_2
)
)
nNr2
=
1
;
if
(
ValueOK
(
nUId
,
CUniString
(
"GetSelText"
),
nNr1
,((
SvLBox
*
)
pControl
)
->
GetSelectionCount
())
)
{
nNr1
--
;
COUNT_LBOX
(
FirstSelected
,
NextSelected
,
nNr1
);
GetFirstValidTextItem
(
pThisEntry
,
nNr2
);
if
(
ValueOK
(
nUId
,
CUniString
(
"GetSelText"
),
nNr2
,
nValidTextItemCount
)
)
pRet
->
GenReturn
(
RET_Value
,
nUId
,
pItem
->
GetText
()
);
}
break
;
case
M_GetItemCount
:
pRet
->
GenReturn
(
RET_Value
,
nUId
,
ULONG
(((
SvLBox
*
)
pControl
)
->
GetVisibleCount
())
);
break
;
case
M_GetItemText
:
if
(
ValueOK
(
nUId
,
MethodString
(
nMethodId
),
nNr1
,((
SvLBox
*
)
pControl
)
->
GetVisibleCount
())
)
{
SvLBoxEntry
*
pEntry
=
(
SvLBoxEntry
*
)((
SvTreeListBox
*
)
pControl
)
->
GetEntryAtVisPos
(
nNr1
-
1
);
if
(
!
(
nParams
&
PARAM_USHORT_2
)
)
nNr2
=
1
;
GetFirstValidTextItem
(
pEntry
,
nNr2
);
if
(
ValueOK
(
nUId
,
CUniString
(
"GetItemText"
),
nNr2
,
nValidTextItemCount
)
)
pRet
->
GenReturn
(
RET_Value
,
nUId
,
pItem
->
GetText
()
);
}
break
;
case
M_Select
:
if
(
!
(
nParams
&
PARAM_BOOL_1
)
)
bBool1
=
TRUE
;
if
(
nParams
&
PARAM_STR_1
)
{
/* ListBox *pLB = ((ListBox*)pControl);
if ( pLB->GetEntryPos( aString1 ) == LISTBOX_ENTRY_NOTFOUND )
ReportError( nUId, GEN_RES_STR2( S_ENTRY_NOT_FOUND, MethodString( nMethodId ), aString1 ) );
else
{
pLB->SelectEntry( aString1, bBool1 );
if ( pLB->IsEntrySelected( aString1 ) ? !bBool1 : bBool1 ) // XOR rein mit BOOL
ReportError( nUId, GEN_RES_STR2( S_METHOD_FAILED, MethodString( nMethodId ), aString1 ) );
}
*/
ReportError
(
nUId
,
GEN_RES_STR1
(
S_SELECT_DESELECT_VIA_STRING_NOT_IMPLEMENTED
,
MethodString
(
nMethodId
)
)
);
}
else
{
if
(
ValueOK
(
nUId
,
MethodString
(
nMethodId
),
nNr1
,((
SvLBox
*
)
pControl
)
->
GetVisibleCount
())
)
{
SvLBoxEntry
*
pEntry
=
(
SvLBoxEntry
*
)((
SvTreeListBox
*
)
pControl
)
->
GetEntryAtVisPos
(
nNr1
-
1
);
((
SvTreeListBox
*
)
pControl
)
->
Select
(
pEntry
,
bBool1
);
}
}
break
;
case
M_IsChecked
:
case
M_IsTristate
:
case
M_GetState
:
case
M_Check
:
case
M_UnCheck
:
case
M_TriState
:
{
SvTreeListBox
*
pTree
=
(
SvTreeListBox
*
)
pControl
;
SvLBoxEntry
*
pThisEntry
=
pTree
->
GetCurEntry
();
if
(
!
pThisEntry
)
ReportError
(
nUId
,
GEN_RES_STR2c2
(
S_NO_SELECTED_ENTRY
,
MethodString
(
nMethodId
),
"TreeListBox"
)
);
else
{
SvLBoxButton
*
pItem
=
(
SvLBoxButton
*
)(
pThisEntry
->
GetFirstItem
(
SV_ITEM_ID_LBOXBUTTON
));
if
(
!
pItem
)
ReportError
(
nUId
,
GEN_RES_STR1
(
S_NO_LIST_BOX_BUTTON
,
MethodString
(
nMethodId
)
)
);
else
switch
(
nMethodId
)
{
case
M_IsChecked
:
pRet
->
GenReturn
(
RET_Value
,
nUId
,
BOOL
(
pItem
->
IsStateChecked
()
)
);
break
;
case
M_IsTristate
:
pRet
->
GenReturn
(
RET_Value
,
nUId
,
BOOL
(
pItem
->
IsStateTristate
()
)
);
break
;
case
M_GetState
:
pRet
->
GenReturn
(
RET_Value
,
nUId
,
ULONG
(
pItem
->
GetButtonFlags
()
&
~
SV_STATE_MASK
));
break
;
case
M_Check
:
pItem
->
SetStateChecked
();
pTree
->
InvalidateEntry
(
pThisEntry
);
break
;
case
M_UnCheck
:
pItem
->
SetStateUnchecked
();
pTree
->
InvalidateEntry
(
pThisEntry
);
break
;
case
M_TriState
:
pItem
->
SetStateTristate
();
pTree
->
InvalidateEntry
(
pThisEntry
);
break
;
default:
ReportError
(
nUId
,
GEN_RES_STR1
(
S_INTERNAL_ERROR
,
MethodString
(
nMethodId
)
)
);
break
;
}
}
}
break
;
default
:
ReportError
(
nUId
,
GEN_RES_STR2c2
(
S_UNKNOWN_METHOD
,
MethodString
(
nMethodId
),
"TreeListBox"
)
);
break
;
}
break
;
case
C_Control
:
switch
(
nMethodId
)
{
case
M_AnimateMouse
:
AnimateMouse
(
pControl
,
MitteOben
);
break
;
default
:
switch
(
nControlType
)
{
case
CONST_CTBrowseBox
:
switch
(
nMethodId
)
...
...
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