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
82c37453
Kaydet (Commit)
82c37453
authored
Ock 17, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SfxItemHandle is only used in one place, so inline it
Change-Id: Ie54e0699312b6c072d2b162a068cffdf960be4d0
üst
d26052bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
75 deletions
+14
-75
rtattributes.hxx
forms/source/richtext/rtattributes.hxx
+14
-14
poolitem.hxx
include/svl/poolitem.hxx
+0
-17
poolitem.cxx
svl/source/items/poolitem.cxx
+0
-44
No files found.
forms/source/richtext/rtattributes.hxx
Dosyayı görüntüle @
82c37453
...
@@ -45,7 +45,7 @@ namespace frm
...
@@ -45,7 +45,7 @@ namespace frm
struct
AttributeState
struct
AttributeState
{
{
private
:
private
:
Sfx
ItemHandle
*
pItemHandle
;
Sfx
PoolItem
*
pItemHandleItem
;
public
:
public
:
AttributeCheckState
eSimpleState
;
AttributeCheckState
eSimpleState
;
...
@@ -64,19 +64,19 @@ namespace frm
...
@@ -64,19 +64,19 @@ namespace frm
};
};
inline
AttributeState
::
AttributeState
(
)
inline
AttributeState
::
AttributeState
(
)
:
pItemHandle
(
NULL
)
:
pItemHandle
Item
(
NULL
)
,
eSimpleState
(
eIndetermined
)
,
eSimpleState
(
eIndetermined
)
{
{
}
}
inline
AttributeState
::
AttributeState
(
AttributeCheckState
_eCheckState
)
inline
AttributeState
::
AttributeState
(
AttributeCheckState
_eCheckState
)
:
pItemHandle
(
NULL
)
:
pItemHandle
Item
(
NULL
)
,
eSimpleState
(
_eCheckState
)
,
eSimpleState
(
_eCheckState
)
{
{
}
}
inline
AttributeState
::
AttributeState
(
const
AttributeState
&
_rSource
)
inline
AttributeState
::
AttributeState
(
const
AttributeState
&
_rSource
)
:
pItemHandle
(
NULL
)
:
pItemHandle
Item
(
NULL
)
,
eSimpleState
(
eIndetermined
)
,
eSimpleState
(
eIndetermined
)
{
{
operator
=
(
_rSource
);
operator
=
(
_rSource
);
...
@@ -84,7 +84,7 @@ namespace frm
...
@@ -84,7 +84,7 @@ namespace frm
inline
AttributeState
::~
AttributeState
(
)
inline
AttributeState
::~
AttributeState
(
)
{
{
delete
(
pItemHandle
);
//
delete(pItemHandle);
}
}
inline
AttributeState
&
AttributeState
::
operator
=
(
const
AttributeState
&
_rSource
)
inline
AttributeState
&
AttributeState
::
operator
=
(
const
AttributeState
&
_rSource
)
...
@@ -99,17 +99,17 @@ namespace frm
...
@@ -99,17 +99,17 @@ namespace frm
inline
const
SfxPoolItem
*
AttributeState
::
getItem
()
const
inline
const
SfxPoolItem
*
AttributeState
::
getItem
()
const
{
{
return
pItemHandle
?
&
pItemHandle
->
GetItem
()
:
NULL
;
return
pItemHandle
Item
;
}
}
inline
void
AttributeState
::
setItem
(
const
SfxPoolItem
*
_pItem
)
inline
void
AttributeState
::
setItem
(
const
SfxPoolItem
*
_pItem
)
{
{
if
(
pItemHandle
)
if
(
pItemHandle
Item
)
delete
pItemHandle
;
delete
pItemHandle
Item
;
if
(
_pItem
)
if
(
_pItem
)
pItemHandle
=
new
SfxItemHandle
(
*
const_cast
<
SfxPoolItem
*
>
(
_pItem
)
);
pItemHandle
Item
=
_pItem
->
Clone
(
);
else
else
pItemHandle
=
NULL
;
pItemHandle
Item
=
NULL
;
}
}
inline
bool
AttributeState
::
operator
==
(
const
AttributeState
&
_rRHS
)
inline
bool
AttributeState
::
operator
==
(
const
AttributeState
&
_rRHS
)
...
@@ -117,16 +117,16 @@ namespace frm
...
@@ -117,16 +117,16 @@ namespace frm
if
(
eSimpleState
!=
_rRHS
.
eSimpleState
)
if
(
eSimpleState
!=
_rRHS
.
eSimpleState
)
return
false
;
return
false
;
if
(
pItemHandle
&&
!
_rRHS
.
pItemHandle
)
if
(
pItemHandle
Item
&&
!
_rRHS
.
pItemHandleItem
)
return
false
;
return
false
;
if
(
!
pItemHandle
&&
_rRHS
.
pItemHandle
)
if
(
!
pItemHandle
Item
&&
_rRHS
.
pItemHandleItem
)
return
false
;
return
false
;
if
(
!
pItemHandle
&&
!
_rRHS
.
pItemHandle
)
if
(
!
pItemHandle
Item
&&
!
_rRHS
.
pItemHandleItem
)
return
true
;
return
true
;
return
(
pItemHandle
->
GetItem
()
==
_rRHS
.
pItemHandle
->
GetItem
()
)
;
return
pItemHandleItem
==
_rRHS
.
pItemHandleItem
;
}
}
class
IMultiAttributeDispatcher
class
IMultiAttributeDispatcher
...
...
include/svl/poolitem.hxx
Dosyayı görüntüle @
82c37453
...
@@ -339,23 +339,6 @@ public:
...
@@ -339,23 +339,6 @@ public:
};
};
// Handle class for PoolItems
class
SVL_DLLPUBLIC
SfxItemHandle
{
sal_uInt16
*
pRef
;
SfxPoolItem
*
pItem
;
public
:
explicit
SfxItemHandle
(
SfxPoolItem
&
);
SfxItemHandle
(
const
SfxItemHandle
&
);
~
SfxItemHandle
();
const
SfxItemHandle
&
operator
=
(
const
SfxItemHandle
&
);
const
SfxPoolItem
&
GetItem
()
const
{
return
*
pItem
;
}
};
DECL_PTRHINT
(
SVL_DLLPUBLIC
,
SfxPoolItemHint
,
SfxPoolItem
);
DECL_PTRHINT
(
SVL_DLLPUBLIC
,
SfxPoolItemHint
,
SfxPoolItem
);
...
...
svl/source/items/poolitem.cxx
Dosyayı görüntüle @
82c37453
...
@@ -256,50 +256,6 @@ SfxPoolItem* SfxVoidItem::Clone(SfxItemPool *) const
...
@@ -256,50 +256,6 @@ SfxPoolItem* SfxVoidItem::Clone(SfxItemPool *) const
return
new
SfxVoidItem
(
*
this
);
return
new
SfxVoidItem
(
*
this
);
}
}
// SfxInvalidItem
SfxItemHandle
::
SfxItemHandle
(
SfxPoolItem
&
rItem
)
:
pRef
(
new
sal_uInt16
(
1
)),
pItem
(
rItem
.
Clone
())
{
}
SfxItemHandle
::
SfxItemHandle
(
const
SfxItemHandle
&
rCopy
)
:
pRef
(
rCopy
.
pRef
),
pItem
(
rCopy
.
pItem
)
{
++
(
*
pRef
);
}
const
SfxItemHandle
&
SfxItemHandle
::
operator
=
(
const
SfxItemHandle
&
rCopy
)
{
if
(
&
rCopy
==
this
||
pItem
==
rCopy
.
pItem
)
return
*
this
;
--
(
*
pRef
);
if
(
!
(
*
pRef
))
{
delete
pItem
;
pItem
=
0
;
}
pRef
=
rCopy
.
pRef
;
++
(
*
pRef
);
pItem
=
rCopy
.
pItem
;
return
*
this
;
}
SfxItemHandle
::~
SfxItemHandle
()
{
--
(
*
pRef
);
if
(
!
(
*
pRef
))
{
delete
pRef
;
pRef
=
0
;
delete
pItem
;
pItem
=
0
;
}
}
bool
SfxPoolItem
::
ScaleMetrics
(
long
/*lMult*/
,
long
/*lDiv*/
)
bool
SfxPoolItem
::
ScaleMetrics
(
long
/*lMult*/
,
long
/*lDiv*/
)
{
{
return
false
;
return
false
;
...
...
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