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
4b41b87e
Kaydet (Commit)
4b41b87e
authored
Tem 13, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Michael Stahl
Tem 17, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert SV_DECL_PTRARR_SORT(_SfxObjectList) to o3tl::sorted_vector
Change-Id: I663f03c2fdafe994b609572aa3a8b6bf2354b444
üst
5a4796f7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
22 deletions
+18
-22
orgmgr.hxx
sfx2/inc/orgmgr.hxx
+3
-5
docvor.cxx
sfx2/source/doc/docvor.cxx
+2
-3
orgmgr.cxx
sfx2/source/view/orgmgr.cxx
+13
-14
No files found.
sfx2/inc/orgmgr.hxx
Dosyayı görüntüle @
4b41b87e
...
...
@@ -19,7 +19,7 @@
#ifndef _SFX_ORGMGR_HXX
#define _SFX_ORGMGR_HXX
#include <
svl/svarray
.hxx>
#include <
o3tl/sorted_vector
.hxx>
class
SfxDocumentTemplates
;
class
SfxOrganizeListBox_Impl
;
...
...
@@ -27,15 +27,13 @@ struct _FileListEntry;
//=========================================================================
SV_DECL_PTRARR_SORT
(
_SfxObjectList
,
_FileListEntry
*
,
1
)
class
SfxObjectList
:
public
_SfxObjectList
class
SfxObjectList
:
public
o3tl
::
sorted_vector
<
_FileListEntry
*
,
o3tl
::
less_ptr_to
<
_FileListEntry
>
>
{
public
:
SfxObjectList
();
~
SfxObjectList
();
const
String
&
GetBaseName
(
sal_uInt16
nId
)
const
;
const
String
&
GetBaseName
(
const
_FileListEntry
*
p
)
const
;
};
class
IntlWrapper
;
...
...
sfx2/source/doc/docvor.cxx
Dosyayı görüntüle @
4b41b87e
...
...
@@ -1378,9 +1378,8 @@ void SfxOrganizeListBox_Impl::Reset()
else
{
const
SfxObjectList
&
rList
=
pMgr
->
GetObjectList
();
const
sal_uInt16
nCount
=
rList
.
Count
();
for
(
sal_uInt16
i
=
0
;
i
<
nCount
;
++
i
)
InsertEntryByBmpType
(
rList
.
GetBaseName
(
i
),
BMPTYPE_DOC
,
0
,
sal_True
);
for
(
SfxObjectList
::
const_iterator
it
=
rList
.
begin
();
it
!=
rList
.
end
();
++
it
)
InsertEntryByBmpType
(
rList
.
GetBaseName
(
*
it
),
BMPTYPE_DOC
,
0
,
sal_True
);
}
SetUpdateMode
(
sal_True
);
...
...
sfx2/source/view/orgmgr.cxx
Dosyayı görüntüle @
4b41b87e
...
...
@@ -119,10 +119,6 @@ _FileListEntry::~_FileListEntry()
DeleteObjectShell
();
}
//-------------------------------------------------------------------------
SV_IMPL_OP_PTRARR_SORT
(
_SfxObjectList
,
_FileListEntry
*
)
//=========================================================================
sal_Bool
_FileListEntry
::
DeleteObjectShell
()
...
...
@@ -191,14 +187,16 @@ SfxObjectList::SfxObjectList()
SfxObjectList
::~
SfxObjectList
()
{
DeleteAndDestroy
(
0
,
Count
());
for
(
const_iterator
it
=
begin
();
it
!=
end
();
++
it
)
delete
*
it
;
clear
();
}
//-------------------------------------------------------------------------
const
String
&
SfxObjectList
::
GetBaseName
(
sal_uInt16
i
)
const
const
String
&
SfxObjectList
::
GetBaseName
(
const
_FileListEntry
*
p
)
const
{
return
(
*
this
)[
i
]
->
aBaseName
;
return
p
->
aBaseName
;
}
//-------------------------------------------------------------------------
...
...
@@ -230,7 +228,7 @@ SfxOrganizeMgr::SfxOrganizeMgr( SfxOrganizeListBox_Impl *pLeft,
String
aTitle
=
pTmp
->
GetTitle
(
SFX_TITLE_TITLE
);
pNewEntry
=
new
_FileListEntry
(
pTmp
->
GetMedium
()
->
GetName
(),
pCollator
,
&
aTitle
);
pNewEntry
->
aDocShell
=
pTmp
;
pImpl
->
pDocList
->
C40_PTR_INSERT
(
_FileListEntry
,
pNewEntry
);
pImpl
->
pDocList
->
insert
(
pNewEntry
);
}
}
...
...
@@ -679,14 +677,16 @@ sal_Bool SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const Str
{
const
CollatorWrapper
*
pCollator
=
pImpl
->
pIntlWrapper
->
getCaseCollator
();
_FileListEntry
*
pEntry
=
new
_FileListEntry
(
rFileName
,
pCollator
);
if
(
pImpl
->
pDocList
->
C40_PTR_INSERT
(
_FileListEntry
,
pEntry
)
)
std
::
pair
<
SfxObjectList
::
const_iterator
,
bool
>
aRes
=
pImpl
->
pDocList
->
insert
(
pEntry
);
if
(
aRes
.
second
)
{
sal_uInt16
nPos
=
0
;
pImpl
->
pDocList
->
Seek_Entry
(
pEntry
,
&
nPos
);
sal_uInt16
nPos
=
aRes
.
first
-
pImpl
->
pDocList
->
begin
();
pCaller
->
InsertEntry
(
pEntry
->
aBaseName
,
pCaller
->
GetOpenedBmp
(
1
),
pCaller
->
GetClosedBmp
(
1
),
0
,
sal_True
,
nPos
);
return
sal_True
;
}
else
delete
pEntry
;
return
sal_False
;
}
...
...
@@ -753,10 +753,9 @@ void SfxOrganizeMgr::SaveAll(Window *pParent)
}
}
}
nRangeCount
=
pImpl
->
pDocList
->
Count
();
for
(
i
=
0
;
i
<
nRangeCount
;
++
i
)
for
(
SfxObjectList
::
const_iterator
it
=
pImpl
->
pDocList
->
begin
();
it
!=
pImpl
->
pDocList
->
end
();
++
it
)
{
_FileListEntry
*
pEntry
=
(
*
pImpl
->
pDocList
)[
i
]
;
_FileListEntry
*
pEntry
=
*
it
;
if
(
!
pEntry
->
DeleteObjectShell
())
{
String
aText
(
SfxResId
(
STR_ERROR_SAVE_TEMPLATE
).
toString
());
...
...
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