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
ab9e014d
Kaydet (Commit)
ab9e014d
authored
Ara 12, 2013
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Some clean-up
Change-Id: I8ea3018efb01069b9a0555d9ac4ddfa89a990ba8
üst
3f3c7554
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
74 deletions
+37
-74
ChainablePropertySetInfo.cxx
comphelper/source/property/ChainablePropertySetInfo.cxx
+7
-24
MasterPropertySetInfo.cxx
comphelper/source/property/MasterPropertySetInfo.cxx
+10
-28
ChainablePropertySetInfo.hxx
include/comphelper/ChainablePropertySetInfo.hxx
+10
-12
MasterPropertySetInfo.hxx
include/comphelper/MasterPropertySetInfo.hxx
+10
-10
No files found.
comphelper/source/property/ChainablePropertySetInfo.cxx
Dosyayı görüntüle @
ab9e014d
...
@@ -32,9 +32,14 @@ using ::com::sun::star::beans::XPropertySetInfo;
...
@@ -32,9 +32,14 @@ using ::com::sun::star::beans::XPropertySetInfo;
using
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
;
using
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
;
ChainablePropertySetInfo
::
ChainablePropertySetInfo
(
PropertyInfo
const
*
pMap
)
ChainablePropertySetInfo
::
ChainablePropertySetInfo
(
PropertyInfo
const
*
pMap
)
throw
()
{
{
add
(
pMap
);
for
(
;
!
pMap
->
maName
.
isEmpty
();
++
pMap
)
{
SAL_WARN_IF
(
maMap
.
find
(
pMap
->
maName
)
!=
maMap
.
end
(),
"comphelper"
,
"Duplicate property name
\"
"
<<
pMap
->
maName
<<
"
\"
"
);
maMap
[
pMap
->
maName
]
=
pMap
;
}
}
}
ChainablePropertySetInfo
::~
ChainablePropertySetInfo
()
ChainablePropertySetInfo
::~
ChainablePropertySetInfo
()
...
@@ -42,29 +47,7 @@ ChainablePropertySetInfo::~ChainablePropertySetInfo()
...
@@ -42,29 +47,7 @@ ChainablePropertySetInfo::~ChainablePropertySetInfo()
{
{
}
}
void
ChainablePropertySetInfo
::
add
(
PropertyInfo
const
*
pMap
,
sal_Int32
nCount
)
throw
()
{
// nCount < 0 => add all
// nCount == 0 => add nothing
// nCount > 0 => add at most nCount entries
if
(
maProperties
.
getLength
()
)
maProperties
.
realloc
(
0
);
while
(
!
pMap
->
maName
.
isEmpty
()
&&
(
(
nCount
<
0
)
||
(
nCount
--
>
0
)
)
)
{
#ifdef DBG_UTIL
PropertyInfoHash
::
iterator
aIter
=
maMap
.
find
(
pMap
->
maName
);
if
(
aIter
!=
maMap
.
end
()
)
OSL_FAIL
(
"Warning: PropertyInfo added twice, possible error!"
);
#endif
maMap
[
pMap
->
maName
]
=
pMap
;
++
pMap
;
}
}
void
ChainablePropertySetInfo
::
remove
(
const
OUString
&
aName
)
void
ChainablePropertySetInfo
::
remove
(
const
OUString
&
aName
)
throw
()
{
{
maMap
.
erase
(
aName
);
maMap
.
erase
(
aName
);
if
(
maProperties
.
getLength
()
)
if
(
maProperties
.
getLength
()
)
...
...
comphelper/source/property/MasterPropertySetInfo.cxx
Dosyayı görüntüle @
ab9e014d
...
@@ -32,9 +32,14 @@ using ::com::sun::star::beans::XPropertySetInfo;
...
@@ -32,9 +32,14 @@ using ::com::sun::star::beans::XPropertySetInfo;
using
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
;
using
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
;
MasterPropertySetInfo
::
MasterPropertySetInfo
(
PropertyInfo
const
*
pMap
)
MasterPropertySetInfo
::
MasterPropertySetInfo
(
PropertyInfo
const
*
pMap
)
throw
()
{
{
add
(
pMap
);
for
(
;
!
pMap
->
maName
.
isEmpty
();
++
pMap
)
{
SAL_WARN_IF
(
maMap
.
find
(
pMap
->
maName
)
!=
maMap
.
end
(),
"comphelper"
,
"Duplicate property name
\"
"
<<
pMap
->
maName
<<
"
\"
"
);
maMap
[
pMap
->
maName
]
=
new
PropertyData
(
0
,
pMap
);
}
}
}
MasterPropertySetInfo
::~
MasterPropertySetInfo
()
MasterPropertySetInfo
::~
MasterPropertySetInfo
()
...
@@ -48,28 +53,7 @@ MasterPropertySetInfo::~MasterPropertySetInfo()
...
@@ -48,28 +53,7 @@ MasterPropertySetInfo::~MasterPropertySetInfo()
}
}
}
}
void
MasterPropertySetInfo
::
add
(
PropertyInfo
const
*
pMap
,
sal_Int32
nCount
,
sal_uInt8
nMapId
)
throw
()
{
// nCount < 0 => add all
// nCount == 0 => add nothing
// nCount > 0 => add at most nCount entries
if
(
maProperties
.
getLength
()
)
maProperties
.
realloc
(
0
);
for
(
;
!
pMap
->
maName
.
isEmpty
()
&&
(
(
nCount
<
0
)
||
(
nCount
>
0
)
);
--
nCount
,
++
pMap
)
{
#ifdef DBG_UTIL
PropertyDataHash
::
iterator
aIter
=
maMap
.
find
(
pMap
->
maName
);
if
(
aIter
!=
maMap
.
end
()
)
OSL_FAIL
(
"Warning: PropertyInfo added twice, possible error!"
);
#endif
maMap
[
pMap
->
maName
]
=
new
PropertyData
(
nMapId
,
pMap
);
}
}
void
MasterPropertySetInfo
::
add
(
PropertyInfoHash
&
rHash
,
sal_uInt8
nMapId
)
void
MasterPropertySetInfo
::
add
(
PropertyInfoHash
&
rHash
,
sal_uInt8
nMapId
)
throw
()
{
{
if
(
maProperties
.
getLength
()
)
if
(
maProperties
.
getLength
()
)
maProperties
.
realloc
(
0
);
maProperties
.
realloc
(
0
);
...
@@ -77,11 +61,9 @@ void MasterPropertySetInfo::add( PropertyInfoHash &rHash, sal_uInt8 nMapId )
...
@@ -77,11 +61,9 @@ void MasterPropertySetInfo::add( PropertyInfoHash &rHash, sal_uInt8 nMapId )
while
(
aIter
!=
aEnd
)
while
(
aIter
!=
aEnd
)
{
{
#ifdef DBG_UTIL
SAL_WARN_IF
(
PropertyDataHash
::
iterator
aDebugIter
=
maMap
.
find
(
(
*
aIter
).
first
);
maMap
.
find
(
aIter
->
first
)
!=
maMap
.
end
(),
if
(
aDebugIter
!=
maMap
.
end
()
)
"comphelper"
,
"Duplicate property name
\"
"
<<
aIter
->
first
<<
"
\"
"
);
OSL_FAIL
(
"Warning: PropertyInfo added twice, possible error!"
);
#endif
maMap
[(
*
aIter
).
first
]
=
new
PropertyData
(
nMapId
,
(
*
aIter
).
second
);
maMap
[(
*
aIter
).
first
]
=
new
PropertyData
(
nMapId
,
(
*
aIter
).
second
);
++
aIter
;
++
aIter
;
}
}
...
...
include/comphelper/ChainablePropertySetInfo.hxx
Dosyayı görüntüle @
ab9e014d
...
@@ -37,21 +37,13 @@ namespace comphelper
...
@@ -37,21 +37,13 @@ namespace comphelper
public
::
cppu
::
WeakImplHelper1
<
public
::
cppu
::
WeakImplHelper1
<
::
com
::
sun
::
star
::
beans
::
XPropertySetInfo
>
::
com
::
sun
::
star
::
beans
::
XPropertySetInfo
>
{
{
friend
class
ChainablePropertySet
;
friend
class
MasterPropertySet
;
protected
:
PropertyInfoHash
maMap
;
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
beans
::
Property
>
maProperties
;
public
:
public
:
ChainablePropertySetInfo
(
PropertyInfo
const
*
pMap
)
ChainablePropertySetInfo
(
PropertyInfo
const
*
pMap
);
throw
();
virtual
~
ChainablePropertySetInfo
()
void
remove
(
const
OUString
&
aName
);
throw
();
void
add
(
PropertyInfo
const
*
pMap
,
sal_Int32
nCount
=
-
1
)
private
:
throw
();
virtual
~
ChainablePropertySetInfo
()
void
remove
(
const
OUString
&
aName
)
throw
();
throw
();
// XPropertySetInfo
// XPropertySetInfo
...
@@ -61,6 +53,12 @@ namespace comphelper
...
@@ -61,6 +53,12 @@ namespace comphelper
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
sal_Bool
SAL_CALL
hasPropertyByName
(
const
OUString
&
Name
)
virtual
sal_Bool
SAL_CALL
hasPropertyByName
(
const
OUString
&
Name
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
PropertyInfoHash
maMap
;
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
beans
::
Property
>
maProperties
;
friend
class
ChainablePropertySet
;
friend
class
MasterPropertySet
;
};
};
}
}
#endif
#endif
...
...
include/comphelper/MasterPropertySetInfo.hxx
Dosyayı görüntüle @
ab9e014d
...
@@ -30,19 +30,14 @@ namespace comphelper
...
@@ -30,19 +30,14 @@ namespace comphelper
public
::
cppu
::
WeakImplHelper1
<
public
::
cppu
::
WeakImplHelper1
<
::
com
::
sun
::
star
::
beans
::
XPropertySetInfo
>
::
com
::
sun
::
star
::
beans
::
XPropertySetInfo
>
{
{
friend
class
MasterPropertySet
;
protected
:
PropertyDataHash
maMap
;
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
beans
::
Property
>
maProperties
;
public
:
public
:
MasterPropertySetInfo
(
PropertyInfo
const
*
pMap
)
MasterPropertySetInfo
(
PropertyInfo
const
*
pMap
);
throw
();
private
:
virtual
~
MasterPropertySetInfo
()
virtual
~
MasterPropertySetInfo
()
throw
();
throw
();
void
add
(
PropertyInfo
const
*
pMap
,
sal_Int32
nCount
=
-
1
,
sal_uInt8
nMapId
=
0
)
throw
();
void
add
(
PropertyInfoHash
&
rHash
,
sal_uInt8
nMapId
);
void
add
(
PropertyInfoHash
&
rHash
,
sal_uInt8
nMapId
)
throw
();
// XPropertySetInfo
// XPropertySetInfo
virtual
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
Property
>
SAL_CALL
getProperties
()
virtual
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
Property
>
SAL_CALL
getProperties
()
...
@@ -51,6 +46,11 @@ namespace comphelper
...
@@ -51,6 +46,11 @@ namespace comphelper
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
throw
(
::
com
::
sun
::
star
::
beans
::
UnknownPropertyException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
sal_Bool
SAL_CALL
hasPropertyByName
(
const
OUString
&
Name
)
virtual
sal_Bool
SAL_CALL
hasPropertyByName
(
const
OUString
&
Name
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
PropertyDataHash
maMap
;
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
beans
::
Property
>
maProperties
;
friend
class
MasterPropertySet
;
};
};
}
}
#endif
#endif
...
...
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