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
e2a2d14d
Kaydet (Commit)
e2a2d14d
authored
Haz 01, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Michael Stahl
Haz 08, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert SV_DECL_PTRARR_DEL(StyleTreeArr_Impl) to std::vector
Change-Id: I22b42fea3f46b76769ff64d496e1bb6864451247
üst
1e921f77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
18 deletions
+24
-18
templdlg.cxx
sfx2/source/dialog/templdlg.cxx
+24
-18
No files found.
sfx2/source/dialog/templdlg.cxx
Dosyayı görüntüle @
e2a2d14d
...
...
@@ -624,7 +624,6 @@ StyleTreeListBox_Impl::StyleTreeListBox_Impl(
class
StyleTreeArr_Impl
;
/* [Description]
Internal structure for the establishment of the hierarchical view
...
...
@@ -645,14 +644,20 @@ struct StyleTree_Impl
sal_uIntPtr
Count
();
};
typedef
StyleTree_Impl
*
StyleTree_ImplPtr
;
SV_DECL_PTRARR_DEL
(
StyleTreeArr_Impl
,
StyleTree_ImplPtr
,
16
)
SV_IMPL_PTRARR
(
StyleTreeArr_Impl
,
StyleTree_ImplPtr
)
class
StyleTreeArr_Impl
:
public
std
::
vector
<
StyleTree_Impl
*>
{
public
:
~
StyleTreeArr_Impl
()
{
for
(
const_iterator
it
=
begin
();
it
!=
end
();
++
it
)
delete
*
it
;
}
};
sal_uIntPtr
StyleTree_Impl
::
Count
()
{
return
pChildren
?
pChildren
->
Count
()
:
0L
;
return
pChildren
?
pChildren
->
size
()
:
0L
;
}
//-------------------------------------------------------------------------
...
...
@@ -670,15 +675,16 @@ void StyleTree_Impl::Put(StyleTree_Impl* pIns, sal_uIntPtr lPos)
pChildren
=
new
StyleTreeArr_Impl
;
if
(
ULONG_MAX
==
lPos
)
lPos
=
pChildren
->
Count
();
pChildren
->
Insert
(
pIns
,
(
sal_uInt16
)
lPos
);
pChildren
->
push_back
(
pIns
);
else
pChildren
->
insert
(
pChildren
->
begin
()
+
(
sal_uInt16
)
lPos
,
pIns
);
}
//-------------------------------------------------------------------------
StyleTreeArr_Impl
&
MakeTree_Impl
(
StyleTreeArr_Impl
&
rArr
)
{
const
sal_uInt16
nCount
=
rArr
.
Count
();
const
sal_uInt16
nCount
=
rArr
.
size
();
comphelper
::
string
::
NaturalStringSorter
aSorter
(
::
comphelper
::
getProcessComponentContext
(),
...
...
@@ -688,12 +694,12 @@ StyleTreeArr_Impl &MakeTree_Impl(StyleTreeArr_Impl &rArr)
sal_uInt16
i
;
for
(
i
=
0
;
i
<
nCount
;
++
i
)
{
StyleTree_Impl
Ptr
pEntry
=
rArr
[
i
];
StyleTree_Impl
*
pEntry
=
rArr
[
i
];
if
(
pEntry
->
HasParent
())
{
for
(
sal_uInt16
j
=
0
;
j
<
nCount
;
++
j
)
{
StyleTree_Impl
Ptr
pCmp
=
rArr
[
j
];
StyleTree_Impl
*
pCmp
=
rArr
[
j
];
if
(
pCmp
->
aName
==
pEntry
->
aParent
)
{
// Paste initial filter
...
...
@@ -708,10 +714,10 @@ StyleTreeArr_Impl &MakeTree_Impl(StyleTreeArr_Impl &rArr)
}
}
for
(
i
=
0
;
i
<
rArr
.
Count
();
)
for
(
i
=
0
;
i
<
rArr
.
size
();
)
{
if
(
rArr
[
i
]
->
HasParent
())
rArr
.
Remove
(
i
);
rArr
.
erase
(
rArr
.
begin
()
+
i
);
else
++
i
;
}
...
...
@@ -734,12 +740,12 @@ inline sal_Bool IsExpanded_Impl( const ExpandedEntries& rEntries,
SvLBoxEntry
*
FillBox_Impl
(
SvTreeListBox
*
pBox
,
StyleTree_Impl
Ptr
pEntry
,
StyleTree_Impl
*
pEntry
,
const
ExpandedEntries
&
rEntries
,
SvLBoxEntry
*
pParent
=
0
)
{
SvLBoxEntry
*
pNewEntry
=
pBox
->
InsertEntry
(
pEntry
->
aName
,
pParent
);
const
sal_uInt16
nCount
=
pEntry
->
pChildren
?
pEntry
->
pChildren
->
Count
()
:
0
;
const
sal_uInt16
nCount
=
pEntry
->
pChildren
?
pEntry
->
pChildren
->
size
()
:
0
;
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
++
i
)
FillBox_Impl
(
pBox
,
(
*
pEntry
->
pChildren
)[
i
],
rEntries
,
pNewEntry
);
return
pNewEntry
;
...
...
@@ -1184,9 +1190,9 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox()
pTreeBox
->
SetDragDropMode
(
SV_DRAGDROP_NONE
);
while
(
pStyle
)
{
StyleTree_Impl
Ptr
pNew
=
StyleTree_Impl
*
pNew
=
new
StyleTree_Impl
(
pStyle
->
GetName
(),
pStyle
->
GetParent
());
aArr
.
Insert
(
pNew
,
aArr
.
Count
()
);
aArr
.
push_back
(
pNew
);
pStyle
=
pStyleSheetPool
->
Next
();
}
MakeTree_Impl
(
aArr
);
...
...
@@ -1196,10 +1202,10 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox()
MakeExpanded_Impl
(
aEntries
);
pTreeBox
->
SetUpdateMode
(
sal_False
);
pTreeBox
->
Clear
();
const
sal_uInt16
nCount
=
aArr
.
Count
();
const
sal_uInt16
nCount
=
aArr
.
size
();
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
++
i
)
FillBox_Impl
(
pTreeBox
,
aArr
[
i
],
aEntries
);
;
EnableItem
(
SID_STYLE_WATERCAN
,
sal_False
);
SfxTemplateItem
*
pState
=
pFamilyState
[
nActFamily
-
1
];
...
...
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