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
1cef3995
Kaydet (Commit)
1cef3995
authored
Mar 28, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use Notify instead of SwIterator<>
Change-Id: Id9e0bcaf2e961e2d797e4c180aa782cb0e418bcf
üst
f6bc8126
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
16 deletions
+33
-16
unotbl.hxx
sw/inc/unotbl.hxx
+3
-2
unotbl.cxx
sw/source/core/unocore/unotbl.cxx
+30
-14
No files found.
sw/inc/unotbl.hxx
Dosyayı görüntüle @
1cef3995
...
@@ -64,7 +64,7 @@ cppu::WeakImplHelper4
...
@@ -64,7 +64,7 @@ cppu::WeakImplHelper4
::
com
::
sun
::
star
::
container
::
XEnumerationAccess
::
com
::
sun
::
star
::
container
::
XEnumerationAccess
>
>
SwXCellBaseClass
;
SwXCellBaseClass
;
class
SwXCell
:
public
SwXCellBaseClass
,
class
SwXCell
SAL_FINAL
:
public
SwXCellBaseClass
,
public
SwXText
,
public
SwXText
,
public
SwClient
public
SwClient
{
{
...
@@ -94,7 +94,8 @@ protected:
...
@@ -94,7 +94,8 @@ protected:
virtual
~
SwXCell
();
virtual
~
SwXCell
();
//SwClient
//SwClient
virtual
void
Modify
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
pNew
)
SAL_OVERRIDE
;
virtual
void
Modify
(
const
SfxPoolItem
*
pOld
,
const
SfxPoolItem
*
pNew
)
SAL_OVERRIDE
;
virtual
void
SwClientNotify
(
const
SwModify
&
,
const
SfxHint
&
)
SAL_OVERRIDE
;
public
:
public
:
SwXCell
(
SwFrmFmt
*
pTblFmt
,
SwTableBox
*
pBox
,
size_t
nPos
=
NOTFOUND
);
SwXCell
(
SwFrmFmt
*
pTblFmt
,
SwTableBox
*
pBox
,
size_t
nPos
=
NOTFOUND
);
...
...
sw/source/core/unocore/unotbl.cxx
Dosyayı görüntüle @
1cef3995
...
@@ -1244,26 +1244,42 @@ void SwXCell::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
...
@@ -1244,26 +1244,42 @@ void SwXCell::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
ClientModify
(
this
,
pOld
,
pNew
);
ClientModify
(
this
,
pOld
,
pNew
);
}
}
namespace
sw
{
struct
FindXCellHint
SAL_FINAL
:
SfxHint
{
FindXCellHint
(
SwTableBox
*
pTableBox
)
:
m_pTableBox
(
pTableBox
),
m_pCell
(
nullptr
)
{};
void
SetCell
(
SwXCell
*
pCell
)
const
{
m_pCell
=
pCell
;
};
const
SwTableBox
*
const
m_pTableBox
;
mutable
SwXCell
*
m_pCell
;
};
}
void
SwXCell
::
SwClientNotify
(
const
SwModify
&
rModify
,
const
SfxHint
&
rHint
)
{
if
(
typeid
(
sw
::
FindXCellHint
)
==
typeid
(
rHint
))
{
auto
*
pFindHint
(
static_cast
<
const
sw
::
FindXCellHint
*>
(
&
rHint
));
if
(
!
pFindHint
->
m_pCell
&&
pFindHint
->
m_pTableBox
==
GetTblBox
())
pFindHint
->
m_pCell
=
this
;
}
else
SwClient
::
SwClientNotify
(
rModify
,
rHint
);
}
SwXCell
*
SwXCell
::
CreateXCell
(
SwFrmFmt
*
pTblFmt
,
SwTableBox
*
pBox
,
SwTable
*
pTable
)
SwXCell
*
SwXCell
::
CreateXCell
(
SwFrmFmt
*
pTblFmt
,
SwTableBox
*
pBox
,
SwTable
*
pTable
)
{
{
if
(
!
pTblFmt
||
!
pBox
)
if
(
!
pTblFmt
||
!
pBox
)
return
nullptr
;
return
nullptr
;
if
(
!
pTable
)
if
(
!
pTable
)
pTable
=
SwTable
::
FindTable
(
pTblFmt
);
pTable
=
SwTable
::
FindTable
(
pTblFmt
);
SwTableSortBoxes
::
const_iterator
it
=
pTable
->
GetTabSortBoxes
().
find
(
pBox
);
SwTableSortBoxes
::
const_iterator
it
=
pTable
->
GetTabSortBoxes
().
find
(
pBox
);
if
(
it
==
pTable
->
GetTabSortBoxes
().
end
()
)
if
(
it
==
pTable
->
GetTabSortBoxes
().
end
()
)
return
nullptr
;
return
nullptr
;
// if the box exists, then return a cell
SwIterator
<
SwXCell
,
SwFmt
>
aIter
(
*
pTblFmt
);
for
(
SwXCell
*
pXCell
=
aIter
.
First
();
pXCell
;
pXCell
=
aIter
.
Next
())
{
// is there already a proper cell?
if
(
pXCell
->
GetTblBox
()
==
pBox
)
return
pXCell
;
}
// otherwise create it
size_t
const
nPos
=
it
-
pTable
->
GetTabSortBoxes
().
begin
();
size_t
const
nPos
=
it
-
pTable
->
GetTabSortBoxes
().
begin
();
return
new
SwXCell
(
pTblFmt
,
pBox
,
nPos
);
sw
::
FindXCellHint
aHint
{
pBox
};
pTblFmt
->
CallSwClientNotify
(
aHint
);
return
aHint
.
m_pCell
?
aHint
.
m_pCell
:
new
SwXCell
(
pTblFmt
,
pBox
,
nPos
);
}
}
/** search if a box exists in a table
/** search if a box exists in a table
...
...
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