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
071c49da
Kaydet (Commit)
071c49da
authored
Haz 01, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
refactor out frame collection with layout
Change-Id: I977c9915414eedead860622b120f00ad811e18e9
üst
41e43dc3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
29 deletions
+36
-29
sortedobjs.hxx
sw/source/core/inc/sortedobjs.hxx
+5
-0
unoobj2.cxx
sw/source/core/unocore/unoobj2.cxx
+31
-29
No files found.
sw/source/core/inc/sortedobjs.hxx
Dosyayı görüntüle @
071c49da
...
...
@@ -51,6 +51,7 @@ class SwSortedObjs
std
::
vector
<
SwAnchoredObject
*
>
maSortedObjLst
;
public
:
typedef
std
::
vector
<
SwAnchoredObject
*>::
const_iterator
const_iterator
;
SwSortedObjs
();
~
SwSortedObjs
();
...
...
@@ -62,6 +63,10 @@ class SwSortedObjs
input parameter - index of entry, valid value range [0..size()-1]
*/
SwAnchoredObject
*
operator
[](
size_t
_nIndex
)
const
;
const_iterator
begin
()
const
{
return
maSortedObjLst
.
cbegin
();
};
const_iterator
end
()
const
{
return
maSortedObjLst
.
cend
();
};
bool
Insert
(
SwAnchoredObject
&
_rAnchoredObj
);
...
...
sw/source/core/unocore/unoobj2.cxx
Dosyayı görüntüle @
071c49da
...
...
@@ -165,6 +165,35 @@ struct FrameClientSortListLess
}
};
namespace
{
void
lcl_CollectFrameAtNodeWithLayout
(
SwDoc
*
pDoc
,
const
SwContentFrm
*
pCFrm
,
FrameClientSortList_t
&
rFrames
,
const
sal_uInt16
nAnchorType
)
{
auto
pObjs
=
pCFrm
->
GetDrawObjs
();
if
(
!
pObjs
)
return
;
const
auto
aTextBoxes
=
SwTextBoxHelper
::
findTextBoxes
(
pDoc
);
for
(
const
auto
pAnchoredObj
:
*
pObjs
)
{
SwFrameFormat
&
rFormat
=
pAnchoredObj
->
GetFrameFormat
();
// Filter out textboxes, which are not interesting at an UNO level.
if
(
aTextBoxes
.
find
(
&
rFormat
)
!=
aTextBoxes
.
end
())
continue
;
if
(
rFormat
.
GetAnchor
().
GetAnchorId
()
==
nAnchorType
)
{
const
auto
nIdx
=
rFormat
.
GetAnchor
().
GetContentAnchor
()
->
nContent
.
GetIndex
();
const
auto
nOrder
=
rFormat
.
GetAnchor
().
GetOrder
();
FrameClientSortListEntry
entry
(
nIdx
,
nOrder
,
new
sw
::
FrameClient
(
&
rFormat
));
rFrames
.
push_back
(
entry
);
}
}
}
}
void
CollectFrameAtNode
(
const
SwNodeIndex
&
rIdx
,
FrameClientSortList_t
&
rFrames
,
const
bool
bAtCharAnchoredObjs
)
...
...
@@ -176,7 +205,7 @@ void CollectFrameAtNode( const SwNodeIndex& rIdx,
// search all borders, images, and OLEs that are connected to the paragraph
SwDoc
*
pDoc
=
rIdx
.
GetNode
().
GetDoc
();
const
sal_uInt16
nChkType
=
static_cast
<
sal_uInt16
>
((
bAtCharAnchoredObjs
)
const
auto
nChkType
=
static_cast
<
sal_uInt16
>
((
bAtCharAnchoredObjs
)
?
FLY_AT_CHAR
:
FLY_AT_PARA
);
const
SwContentFrm
*
pCFrm
;
const
SwContentNode
*
pCNd
;
...
...
@@ -184,34 +213,7 @@ void CollectFrameAtNode( const SwNodeIndex& rIdx,
0
!=
(
pCNd
=
rIdx
.
GetNode
().
GetContentNode
())
&&
0
!=
(
pCFrm
=
pCNd
->
getLayoutFrm
(
pDoc
->
getIDocumentLayoutAccess
().
GetCurrentLayout
()))
)
{
const
SwSortedObjs
*
pObjs
=
pCFrm
->
GetDrawObjs
();
if
(
pObjs
)
{
std
::
set
<
const
SwFrameFormat
*>
aTextBoxes
=
SwTextBoxHelper
::
findTextBoxes
(
pDoc
);
for
(
size_t
i
=
0
;
i
<
pObjs
->
size
();
++
i
)
{
SwAnchoredObject
*
pAnchoredObj
=
(
*
pObjs
)[
i
];
SwFrameFormat
&
rFormat
=
pAnchoredObj
->
GetFrameFormat
();
// Filter out textboxes, which are not interesting at an UNO level.
if
(
aTextBoxes
.
find
(
&
rFormat
)
!=
aTextBoxes
.
end
())
continue
;
if
(
rFormat
.
GetAnchor
().
GetAnchorId
()
==
nChkType
)
{
// create SwDepend and insert into array
sw
::
FrameClient
*
pNewClient
=
new
sw
::
FrameClient
(
&
rFormat
);
const
sal_Int32
idx
=
rFormat
.
GetAnchor
().
GetContentAnchor
()
->
nContent
.
GetIndex
();
sal_uInt32
nOrder
=
rFormat
.
GetAnchor
().
GetOrder
();
// OD 2004-05-07 #i28701# - sorting no longer needed,
// because list <SwSortedObjs> is already sorted.
FrameClientSortListEntry
entry
(
idx
,
nOrder
,
pNewClient
);
rFrames
.
push_back
(
entry
);
}
}
}
lcl_CollectFrameAtNodeWithLayout
(
pDoc
,
pCFrm
,
rFrames
,
nChkType
);
}
else
{
...
...
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