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
55982a9b
Kaydet (Commit)
55982a9b
authored
Ock 29, 2008
tarafından
Rüdiger Timm
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
INTEGRATION: CWS oj30 (1.27.90); FILE MERGED
2008/01/10 14:27:04 oj 1.27.90.1: #i85085# add std
üst
be6f7274
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
InterfaceContainer.cxx
forms/source/misc/InterfaceContainer.cxx
+13
-13
No files found.
forms/source/misc/InterfaceContainer.cxx
Dosyayı görüntüle @
55982a9b
...
@@ -4,9 +4,9 @@
...
@@ -4,9 +4,9 @@
*
*
* $RCSfile: InterfaceContainer.cxx,v $
* $RCSfile: InterfaceContainer.cxx,v $
*
*
* $Revision: 1.2
7
$
* $Revision: 1.2
8
$
*
*
* last change: $Author: rt $ $Date: 200
6-12-01 16:55:25
$
* last change: $Author: rt $ $Date: 200
8-01-29 17:06:59
$
*
*
* The Contents of this file are made available subject to
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
* the terms of GNU Lesser General Public License Version 2.1.
...
@@ -594,13 +594,13 @@ throw (::com::sun::star::uno::RuntimeException) {
...
@@ -594,13 +594,13 @@ throw (::com::sun::star::uno::RuntimeException) {
if
(
evt
.
PropertyName
==
PROPERTY_NAME
)
if
(
evt
.
PropertyName
==
PROPERTY_NAME
)
{
{
::
osl
::
MutexGuard
aGuard
(
m_rMutex
);
::
osl
::
MutexGuard
aGuard
(
m_rMutex
);
OInterfaceMap
::
iterator
i
=
find
(
m_aMap
.
begin
(),
m_aMap
.
end
(),
OInterfaceMap
::
iterator
i
=
::
std
::
find
(
m_aMap
.
begin
(),
m_aMap
.
end
(),
pair
<
const
::
rtl
::
OUString
,
InterfaceRef
>
(
::
comphelper
::
getString
(
evt
.
OldValue
),
evt
.
Source
));
::
std
::
pair
<
const
::
rtl
::
OUString
,
InterfaceRef
>
(
::
comphelper
::
getString
(
evt
.
OldValue
),
evt
.
Source
));
if
(
i
!=
m_aMap
.
end
())
if
(
i
!=
m_aMap
.
end
())
{
{
InterfaceRef
xCorrectType
((
*
i
).
second
);
InterfaceRef
xCorrectType
((
*
i
).
second
);
m_aMap
.
erase
(
i
);
m_aMap
.
erase
(
i
);
m_aMap
.
insert
(
pair
<
const
::
rtl
::
OUString
,
InterfaceRef
>
(
::
comphelper
::
getString
(
evt
.
NewValue
),
xCorrectType
));
m_aMap
.
insert
(
::
std
::
pair
<
const
::
rtl
::
OUString
,
InterfaceRef
>
(
::
comphelper
::
getString
(
evt
.
NewValue
),
xCorrectType
));
}
}
}
}
}
}
...
@@ -630,7 +630,7 @@ Reference<XEnumeration> SAL_CALL OInterfaceContainer::createEnumeration() throw(
...
@@ -630,7 +630,7 @@ Reference<XEnumeration> SAL_CALL OInterfaceContainer::createEnumeration() throw(
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
Any
SAL_CALL
OInterfaceContainer
::
getByName
(
const
::
rtl
::
OUString
&
_rName
)
throw
(
NoSuchElementException
,
WrappedTargetException
,
RuntimeException
)
Any
SAL_CALL
OInterfaceContainer
::
getByName
(
const
::
rtl
::
OUString
&
_rName
)
throw
(
NoSuchElementException
,
WrappedTargetException
,
RuntimeException
)
{
{
pair
<
OInterfaceMap
::
iterator
,
::
std
::
pair
<
OInterfaceMap
::
iterator
,
OInterfaceMap
::
iterator
>
aPair
=
m_aMap
.
equal_range
(
_rName
);
OInterfaceMap
::
iterator
>
aPair
=
m_aMap
.
equal_range
(
_rName
);
if
(
aPair
.
first
==
aPair
.
second
)
if
(
aPair
.
first
==
aPair
.
second
)
...
@@ -655,7 +655,7 @@ StringSequence SAL_CALL OInterfaceContainer::getElementNames() throw(RuntimeExce
...
@@ -655,7 +655,7 @@ StringSequence SAL_CALL OInterfaceContainer::getElementNames() throw(RuntimeExce
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
sal_Bool
SAL_CALL
OInterfaceContainer
::
hasByName
(
const
::
rtl
::
OUString
&
_rName
)
throw
(
RuntimeException
)
sal_Bool
SAL_CALL
OInterfaceContainer
::
hasByName
(
const
::
rtl
::
OUString
&
_rName
)
throw
(
RuntimeException
)
{
{
pair
<
OInterfaceMap
::
iterator
,
::
std
::
pair
<
OInterfaceMap
::
iterator
,
OInterfaceMap
::
iterator
>
aPair
=
m_aMap
.
equal_range
(
_rName
);
OInterfaceMap
::
iterator
>
aPair
=
m_aMap
.
equal_range
(
_rName
);
return
aPair
.
first
!=
aPair
.
second
;
return
aPair
.
first
!=
aPair
.
second
;
}
}
...
@@ -762,7 +762,7 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper
...
@@ -762,7 +762,7 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper
else
else
m_aItems
.
insert
(
m_aItems
.
begin
()
+
_nIndex
,
pElementMetaData
->
xInterface
);
m_aItems
.
insert
(
m_aItems
.
begin
()
+
_nIndex
,
pElementMetaData
->
xInterface
);
m_aMap
.
insert
(
pair
<
const
::
rtl
::
OUString
,
InterfaceRef
>
(
sName
,
pElementMetaData
->
xInterface
)
);
m_aMap
.
insert
(
::
std
::
pair
<
const
::
rtl
::
OUString
,
InterfaceRef
>
(
sName
,
pElementMetaData
->
xInterface
)
);
// announce ourself as parent to the new element
// announce ourself as parent to the new element
{
{
...
@@ -877,7 +877,7 @@ void OInterfaceContainer::implReplaceByIndex( const sal_Int32 _nIndex, const Any
...
@@ -877,7 +877,7 @@ void OInterfaceContainer::implReplaceByIndex( const sal_Int32 _nIndex, const Any
aElementMetaData
.
get
()
->
xPropertySet
->
addPropertyChangeListener
(
PROPERTY_NAME
,
this
);
aElementMetaData
.
get
()
->
xPropertySet
->
addPropertyChangeListener
(
PROPERTY_NAME
,
this
);
// insert the new one
// insert the new one
m_aMap
.
insert
(
pair
<
const
::
rtl
::
OUString
,
InterfaceRef
>
(
sName
,
aElementMetaData
.
get
()
->
xInterface
)
);
m_aMap
.
insert
(
::
std
::
pair
<
const
::
rtl
::
OUString
,
InterfaceRef
>
(
sName
,
aElementMetaData
.
get
()
->
xInterface
)
);
m_aItems
[
_nIndex
]
=
aElementMetaData
.
get
()
->
xInterface
;
m_aItems
[
_nIndex
]
=
aElementMetaData
.
get
()
->
xInterface
;
aElementMetaData
.
get
()
->
xChild
->
setParent
(
static_cast
<
XContainer
*>
(
this
));
aElementMetaData
.
get
()
->
xChild
->
setParent
(
static_cast
<
XContainer
*>
(
this
));
...
@@ -1012,7 +1012,7 @@ void SAL_CALL OInterfaceContainer::insertByName(const ::rtl::OUString& _rName, c
...
@@ -1012,7 +1012,7 @@ void SAL_CALL OInterfaceContainer::insertByName(const ::rtl::OUString& _rName, c
void
SAL_CALL
OInterfaceContainer
::
replaceByName
(
const
::
rtl
::
OUString
&
Name
,
const
Any
&
Element
)
throw
(
IllegalArgumentException
,
NoSuchElementException
,
WrappedTargetException
,
RuntimeException
)
void
SAL_CALL
OInterfaceContainer
::
replaceByName
(
const
::
rtl
::
OUString
&
Name
,
const
Any
&
Element
)
throw
(
IllegalArgumentException
,
NoSuchElementException
,
WrappedTargetException
,
RuntimeException
)
{
{
::
osl
::
ClearableMutexGuard
aGuard
(
m_rMutex
);
::
osl
::
ClearableMutexGuard
aGuard
(
m_rMutex
);
pair
<
OInterfaceMap
::
iterator
,
::
std
::
pair
<
OInterfaceMap
::
iterator
,
OInterfaceMap
::
iterator
>
aPair
=
m_aMap
.
equal_range
(
Name
);
OInterfaceMap
::
iterator
>
aPair
=
m_aMap
.
equal_range
(
Name
);
if
(
aPair
.
first
==
aPair
.
second
)
if
(
aPair
.
first
==
aPair
.
second
)
throw
NoSuchElementException
();
throw
NoSuchElementException
();
...
@@ -1031,7 +1031,7 @@ void SAL_CALL OInterfaceContainer::replaceByName(const ::rtl::OUString& Name, co
...
@@ -1031,7 +1031,7 @@ void SAL_CALL OInterfaceContainer::replaceByName(const ::rtl::OUString& Name, co
}
}
// determine the element pos
// determine the element pos
sal_Int32
nPos
=
find
(
m_aItems
.
begin
(),
m_aItems
.
end
(),
(
*
aPair
.
first
).
second
)
-
m_aItems
.
begin
();
sal_Int32
nPos
=
::
std
::
find
(
m_aItems
.
begin
(),
m_aItems
.
end
(),
(
*
aPair
.
first
).
second
)
-
m_aItems
.
begin
();
implReplaceByIndex
(
nPos
,
Element
,
aGuard
);
implReplaceByIndex
(
nPos
,
Element
,
aGuard
);
}
}
...
@@ -1040,12 +1040,12 @@ void SAL_CALL OInterfaceContainer::replaceByName(const ::rtl::OUString& Name, co
...
@@ -1040,12 +1040,12 @@ void SAL_CALL OInterfaceContainer::replaceByName(const ::rtl::OUString& Name, co
void
SAL_CALL
OInterfaceContainer
::
removeByName
(
const
::
rtl
::
OUString
&
Name
)
throw
(
NoSuchElementException
,
WrappedTargetException
,
RuntimeException
)
void
SAL_CALL
OInterfaceContainer
::
removeByName
(
const
::
rtl
::
OUString
&
Name
)
throw
(
NoSuchElementException
,
WrappedTargetException
,
RuntimeException
)
{
{
::
osl
::
MutexGuard
aGuard
(
m_rMutex
);
::
osl
::
MutexGuard
aGuard
(
m_rMutex
);
pair
<
OInterfaceMap
::
iterator
,
::
std
::
pair
<
OInterfaceMap
::
iterator
,
OInterfaceMap
::
iterator
>
aPair
=
m_aMap
.
equal_range
(
Name
);
OInterfaceMap
::
iterator
>
aPair
=
m_aMap
.
equal_range
(
Name
);
if
(
aPair
.
first
==
aPair
.
second
)
if
(
aPair
.
first
==
aPair
.
second
)
throw
NoSuchElementException
();
throw
NoSuchElementException
();
sal_Int32
nPos
=
find
(
m_aItems
.
begin
(),
m_aItems
.
end
(),
(
*
aPair
.
first
).
second
)
-
m_aItems
.
begin
();
sal_Int32
nPos
=
::
std
::
find
(
m_aItems
.
begin
(),
m_aItems
.
end
(),
(
*
aPair
.
first
).
second
)
-
m_aItems
.
begin
();
removeByIndex
(
nPos
);
removeByIndex
(
nPos
);
}
}
...
...
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