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
5d8474ba
Kaydet (Commit)
5d8474ba
authored
Şub 23, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert PropertyOrigin to scoped enum
Change-Id: I26c9929be8aad02030722508334e66f5028ffb37
üst
dc1f1cde
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
21 deletions
+21
-21
propagg.cxx
comphelper/source/property/propagg.cxx
+5
-5
propagg.hxx
include/comphelper/propagg.hxx
+4
-4
Shape.cxx
reportdesign/source/core/api/Shape.cxx
+12
-12
No files found.
comphelper/source/property/propagg.cxx
Dosyayı görüntüle @
5d8474ba
...
...
@@ -146,7 +146,7 @@ OPropertyArrayAggregationHelper::OPropertyArrayAggregationHelper(
OPropertyArrayAggregationHelper
::
PropertyOrigin
OPropertyArrayAggregationHelper
::
classifyProperty
(
const
OUString
&
_rName
)
{
PropertyOrigin
eOrigin
=
UNKNOWN_PROPERTY
;
PropertyOrigin
eOrigin
=
PropertyOrigin
::
Unknown
;
// look up the name
const
Property
*
pPropertyDescriptor
=
lcl_findPropertyByName
(
m_aProperties
,
_rName
);
if
(
pPropertyDescriptor
)
...
...
@@ -156,7 +156,7 @@ OPropertyArrayAggregationHelper::PropertyOrigin OPropertyArrayAggregationHelper:
OSL_ENSURE
(
m_aPropertyAccessors
.
end
()
!=
aPos
,
"OPropertyArrayAggregationHelper::classifyProperty: should have this handle in my map!"
);
if
(
m_aPropertyAccessors
.
end
()
!=
aPos
)
{
eOrigin
=
aPos
->
second
.
bAggregate
?
AGGREGATE_PROPERTY
:
DELEGATOR_PROPERTY
;
eOrigin
=
aPos
->
second
.
bAggregate
?
PropertyOrigin
::
Aggregate
:
PropertyOrigin
::
Delegator
;
}
}
return
eOrigin
;
...
...
@@ -660,12 +660,12 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues(
for
(
sal_Int32
i
=
0
;
i
<
nLen
;
++
i
,
++
pNames
)
{
OPropertyArrayAggregationHelper
::
PropertyOrigin
ePropOrg
=
rPH
.
classifyProperty
(
*
pNames
);
if
(
OPropertyArrayAggregationHelper
::
UNKNOWN_PROPERTY
==
ePropOrg
)
if
(
OPropertyArrayAggregationHelper
::
PropertyOrigin
::
Unknown
==
ePropOrg
)
throw
WrappedTargetException
(
OUString
(),
static_cast
<
XMultiPropertySet
*
>
(
this
),
makeAny
(
UnknownPropertyException
(
)
)
);
// due to a flaw in the API design, this method is not allowed to throw an UnknownPropertyException
// so we wrap it into a WrappedTargetException
if
(
OPropertyArrayAggregationHelper
::
AGGREGATE_PROPERTY
==
ePropOrg
)
if
(
OPropertyArrayAggregationHelper
::
PropertyOrigin
::
Aggregate
==
ePropOrg
)
++
nAggCount
;
}
...
...
@@ -705,7 +705,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyValues(
for
(
sal_Int32
i
=
0
;
i
<
nLen
;
++
i
,
++
pNames
,
++
pValues
)
{
if
(
OPropertyArrayAggregationHelper
::
AGGREGATE_PROPERTY
==
rPH
.
classifyProperty
(
*
pNames
)
)
if
(
OPropertyArrayAggregationHelper
::
PropertyOrigin
::
Aggregate
==
rPH
.
classifyProperty
(
*
pNames
)
)
{
*
pAggNames
++
=
*
pNames
;
*
pAggValues
++
=
*
pValues
;
...
...
include/comphelper/propagg.hxx
Dosyayı görüntüle @
5d8474ba
...
...
@@ -156,11 +156,11 @@ public:
bool
getPropertyByHandle
(
sal_Int32
_nHandle
,
css
::
beans
::
Property
&
_rProperty
)
const
;
enum
PropertyOrigin
enum
class
PropertyOrigin
{
A
GGREGATE_PROPERTY
,
D
ELEGATOR_PROPERTY
,
U
NKNOWN_PROPERTY
A
ggregate
,
D
elegator
,
U
nknown
};
/** prefer this one over the XPropertySetInfo of the aggregate!
...
...
reportdesign/source/core/api/Shape.cxx
Dosyayı görüntüle @
5d8474ba
...
...
@@ -208,20 +208,20 @@ cppu::IPropertyArrayHelper& OShape::getInfoHelper()
void
SAL_CALL
OShape
::
setPropertyValue
(
const
OUString
&
aPropertyName
,
const
uno
::
Any
&
aValue
)
throw
(
beans
::
UnknownPropertyException
,
beans
::
PropertyVetoException
,
lang
::
IllegalArgumentException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
{
getInfoHelper
();
if
(
m_pAggHelper
->
classifyProperty
(
aPropertyName
)
==
OPropertyArrayAggregationHelper
::
AGGREGATE_PROPERTY
)
if
(
m_pAggHelper
->
classifyProperty
(
aPropertyName
)
==
OPropertyArrayAggregationHelper
::
PropertyOrigin
::
Aggregate
)
m_aProps
.
aComponent
.
m_xProperty
->
setPropertyValue
(
aPropertyName
,
aValue
);
// can be in both
if
(
m_pAggHelper
->
classifyProperty
(
aPropertyName
)
==
OPropertyArrayAggregationHelper
::
DELEGATOR_PROPERTY
)
if
(
m_pAggHelper
->
classifyProperty
(
aPropertyName
)
==
OPropertyArrayAggregationHelper
::
PropertyOrigin
::
Delegator
)
ShapePropertySet
::
setPropertyValue
(
aPropertyName
,
aValue
);
}
uno
::
Any
SAL_CALL
OShape
::
getPropertyValue
(
const
OUString
&
PropertyName
)
throw
(
beans
::
UnknownPropertyException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
{
getInfoHelper
();
if
(
m_pAggHelper
->
classifyProperty
(
PropertyName
)
==
OPropertyArrayAggregationHelper
::
AGGREGATE_PROPERTY
)
if
(
m_pAggHelper
->
classifyProperty
(
PropertyName
)
==
OPropertyArrayAggregationHelper
::
PropertyOrigin
::
Aggregate
)
return
m_aProps
.
aComponent
.
m_xProperty
->
getPropertyValue
(
PropertyName
);
// can be in both
if
(
m_pAggHelper
->
classifyProperty
(
PropertyName
)
==
OPropertyArrayAggregationHelper
::
DELEGATOR_PROPERTY
)
if
(
m_pAggHelper
->
classifyProperty
(
PropertyName
)
==
OPropertyArrayAggregationHelper
::
PropertyOrigin
::
Delegator
)
return
ShapePropertySet
::
getPropertyValue
(
PropertyName
);
return
uno
::
Any
();
}
...
...
@@ -229,40 +229,40 @@ uno::Any SAL_CALL OShape::getPropertyValue( const OUString& PropertyName ) throw
void
SAL_CALL
OShape
::
addPropertyChangeListener
(
const
OUString
&
aPropertyName
,
const
uno
::
Reference
<
beans
::
XPropertyChangeListener
>&
xListener
)
throw
(
beans
::
UnknownPropertyException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
{
getInfoHelper
();
if
(
m_pAggHelper
->
classifyProperty
(
aPropertyName
)
==
OPropertyArrayAggregationHelper
::
AGGREGATE_PROPERTY
||
aPropertyName
.
isEmpty
()
)
if
(
m_pAggHelper
->
classifyProperty
(
aPropertyName
)
==
OPropertyArrayAggregationHelper
::
PropertyOrigin
::
Aggregate
||
aPropertyName
.
isEmpty
()
)
m_aProps
.
aComponent
.
m_xProperty
->
addPropertyChangeListener
(
aPropertyName
,
xListener
);
// can be in both
if
(
m_pAggHelper
->
classifyProperty
(
aPropertyName
)
==
OPropertyArrayAggregationHelper
::
DELEGATOR_PROPERTY
||
aPropertyName
.
isEmpty
()
)
if
(
m_pAggHelper
->
classifyProperty
(
aPropertyName
)
==
OPropertyArrayAggregationHelper
::
PropertyOrigin
::
Delegator
||
aPropertyName
.
isEmpty
()
)
ShapePropertySet
::
addPropertyChangeListener
(
aPropertyName
,
xListener
);
}
void
SAL_CALL
OShape
::
removePropertyChangeListener
(
const
OUString
&
aPropertyName
,
const
uno
::
Reference
<
beans
::
XPropertyChangeListener
>&
aListener
)
throw
(
beans
::
UnknownPropertyException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
{
getInfoHelper
();
if
(
m_pAggHelper
->
classifyProperty
(
aPropertyName
)
==
OPropertyArrayAggregationHelper
::
AGGREGATE_PROPERTY
||
aPropertyName
.
isEmpty
()
)
if
(
m_pAggHelper
->
classifyProperty
(
aPropertyName
)
==
OPropertyArrayAggregationHelper
::
PropertyOrigin
::
Aggregate
||
aPropertyName
.
isEmpty
()
)
m_aProps
.
aComponent
.
m_xProperty
->
removePropertyChangeListener
(
aPropertyName
,
aListener
);
// can be in both
if
(
m_pAggHelper
->
classifyProperty
(
aPropertyName
)
==
OPropertyArrayAggregationHelper
::
DELEGATOR_PROPERTY
||
aPropertyName
.
isEmpty
()
)
if
(
m_pAggHelper
->
classifyProperty
(
aPropertyName
)
==
OPropertyArrayAggregationHelper
::
PropertyOrigin
::
Delegator
||
aPropertyName
.
isEmpty
()
)
ShapePropertySet
::
removePropertyChangeListener
(
aPropertyName
,
aListener
);
}
void
SAL_CALL
OShape
::
addVetoableChangeListener
(
const
OUString
&
PropertyName
,
const
uno
::
Reference
<
beans
::
XVetoableChangeListener
>&
aListener
)
throw
(
beans
::
UnknownPropertyException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
{
getInfoHelper
();
if
(
m_pAggHelper
->
classifyProperty
(
PropertyName
)
==
OPropertyArrayAggregationHelper
::
AGGREGATE_PROPERTY
||
PropertyName
.
isEmpty
()
)
if
(
m_pAggHelper
->
classifyProperty
(
PropertyName
)
==
OPropertyArrayAggregationHelper
::
PropertyOrigin
::
Aggregate
||
PropertyName
.
isEmpty
()
)
m_aProps
.
aComponent
.
m_xProperty
->
addVetoableChangeListener
(
PropertyName
,
aListener
);
// can be in both
if
(
m_pAggHelper
->
classifyProperty
(
PropertyName
)
==
OPropertyArrayAggregationHelper
::
DELEGATOR_PROPERTY
||
PropertyName
.
isEmpty
()
)
if
(
m_pAggHelper
->
classifyProperty
(
PropertyName
)
==
OPropertyArrayAggregationHelper
::
PropertyOrigin
::
Delegator
||
PropertyName
.
isEmpty
()
)
ShapePropertySet
::
addVetoableChangeListener
(
PropertyName
,
aListener
);
}
void
SAL_CALL
OShape
::
removeVetoableChangeListener
(
const
OUString
&
PropertyName
,
const
uno
::
Reference
<
beans
::
XVetoableChangeListener
>&
aListener
)
throw
(
beans
::
UnknownPropertyException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
{
getInfoHelper
();
if
(
m_pAggHelper
->
classifyProperty
(
PropertyName
)
==
OPropertyArrayAggregationHelper
::
AGGREGATE_PROPERTY
||
PropertyName
.
isEmpty
()
)
if
(
m_pAggHelper
->
classifyProperty
(
PropertyName
)
==
OPropertyArrayAggregationHelper
::
PropertyOrigin
::
Aggregate
||
PropertyName
.
isEmpty
()
)
m_aProps
.
aComponent
.
m_xProperty
->
removeVetoableChangeListener
(
PropertyName
,
aListener
);
// can be in both
if
(
m_pAggHelper
->
classifyProperty
(
PropertyName
)
==
OPropertyArrayAggregationHelper
::
DELEGATOR_PROPERTY
||
PropertyName
.
isEmpty
()
)
if
(
m_pAggHelper
->
classifyProperty
(
PropertyName
)
==
OPropertyArrayAggregationHelper
::
PropertyOrigin
::
Delegator
||
PropertyName
.
isEmpty
()
)
ShapePropertySet
::
removeVetoableChangeListener
(
PropertyName
,
aListener
);
}
...
...
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