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
232ed9fd
Kaydet (Commit)
232ed9fd
authored
Ara 01, 2003
tarafından
Rüdiger Timm
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
INTEGRATION: CWS geordi2q10 (1.10.80); FILE MERGED
2003/11/28 11:15:29 rt 1.10.80.1: #111934#: join CWS dba01pp1
üst
e17bde37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
7 deletions
+53
-7
GroupManager.cxx
forms/source/component/GroupManager.cxx
+53
-7
No files found.
forms/source/component/GroupManager.cxx
Dosyayı görüntüle @
232ed9fd
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: GroupManager.cxx,v $
*
* $Revision: 1.1
0
$
* $Revision: 1.1
1
$
*
* last change: $Author:
hr $ $Date: 2003-03-25 18:01:17
$
* last change: $Author:
rt $ $Date: 2003-12-01 10:15:40
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -69,6 +69,9 @@
#ifndef _COM_SUN_STAR_BEANS_XFASTPROPERTYSET_HPP_
#include <com/sun/star/beans/XFastPropertySet.hpp>
#endif
#ifndef _COM_SUN_STAR_FORM_FORMCOMPONENTTYPE_HPP_
#include <com/sun/star/form/FormComponentType.hpp>
#endif
#ifndef _COMPHELPER_PROPERTY_HXX_
#include <comphelper/property.hxx>
...
...
@@ -102,6 +105,23 @@ using namespace ::com::sun::star::awt;
using
namespace
::
com
::
sun
::
star
::
io
;
using
namespace
::
com
::
sun
::
star
::
lang
;
using
namespace
::
com
::
sun
::
star
::
util
;
using
namespace
::
com
::
sun
::
star
::
form
;
namespace
{
bool
isRadioButton
(
const
Reference
<
XPropertySet
>&
_rxComponent
)
{
bool
bIs
=
false
;
if
(
hasProperty
(
PROPERTY_CLASSID
,
_rxComponent
)
)
{
sal_Int16
nClassId
=
FormComponentType
::
CONTROL
;
_rxComponent
->
getPropertyValue
(
PROPERTY_CLASSID
)
>>=
nClassId
;
if
(
nClassId
==
FormComponentType
::
RADIOBUTTON
)
bIs
=
true
;
}
return
bIs
;
}
}
//========================================================================
// class OGroupCompAcc
...
...
@@ -354,9 +374,18 @@ void OGroupManager::removeFromGroupMap(const ::rtl::OUString& _sGroupName,const
// Wenn Anzahl der Gruppenelemente == 1 ist, Gruppe deaktivieren
if
(
aFind
->
second
.
Count
()
==
1
)
{
OActiveGroups
::
iterator
aActiveFind
=
::
std
::
find
(
m_aActiveGroupMap
.
begin
(),
m_aActiveGroupMap
.
end
(),
aFind
);
OActiveGroups
::
iterator
aActiveFind
=
::
std
::
find
(
m_aActiveGroupMap
.
begin
(),
m_aActiveGroupMap
.
end
(),
aFind
);
if
(
aActiveFind
!=
m_aActiveGroupMap
.
end
()
)
m_aActiveGroupMap
.
erase
(
aActiveFind
);
{
// the group is active. Deactivate it if the remaining component
// is *no* radio button
if
(
!
isRadioButton
(
aFind
->
second
.
GetObject
(
0
)
)
)
m_aActiveGroupMap
.
erase
(
aActiveFind
);
}
}
}
...
...
@@ -471,11 +500,28 @@ void OGroupManager::InsertElement( const Reference<XPropertySet>& xSet )
aFind
->
second
.
InsertComponent
(
xSet
);
// if we have at least 2 elements in the group, then this is an "active group"
bool
bActivateGroup
=
aFind
->
second
.
Count
()
==
2
;
// Additionally, if the component is a radio button, then it's group becomes active,
// too. With this, we ensure that in a container with n radio buttons which all are
// in different groups the selection still works reliably (means that all radios can be
// clicked independently)
if
(
aFind
->
second
.
Count
()
==
1
)
{
if
(
isRadioButton
(
xSet
)
)
bActivateGroup
=
true
;
}
// Wenn Anzahl der Gruppenelemente == 2 ist, Gruppe aktivieren
if
(
aFind
->
second
.
Count
()
==
2
)
if
(
bActivateGroup
)
{
m_aActiveGroupMap
.
push_back
(
aFind
);
OActiveGroups
::
iterator
aAlreadyExistent
=
::
std
::
find
(
m_aActiveGroupMap
.
begin
(),
m_aActiveGroupMap
.
end
(),
aFind
);
if
(
aAlreadyExistent
==
m_aActiveGroupMap
.
end
()
)
m_aActiveGroupMap
.
push_back
(
aFind
);
}
...
...
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