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
47612d6b
Kaydet (Commit)
47612d6b
authored
Kas 11, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sfx2: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: Idd5bec160e81deac2b570ee3137a1d5ccdc55975
üst
fe6554d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
24 deletions
+10
-24
fltfnc.cxx
sfx2/source/bastyp/fltfnc.cxx
+10
-24
No files found.
sfx2/source/bastyp/fltfnc.cxx
Dosyayı görüntüle @
47612d6b
...
@@ -99,8 +99,10 @@
...
@@ -99,8 +99,10 @@
#include "fltlst.hxx"
#include "fltlst.hxx"
#include <sfx2/request.hxx>
#include <sfx2/request.hxx>
#include "arrdecl.hxx"
#include "arrdecl.hxx"
#include <o3tl/make_unique.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
#include <vector>
#include <memory>
#include <functional>
#include <functional>
#if defined(DBG_UTIL)
#if defined(DBG_UTIL)
...
@@ -280,23 +282,10 @@ public:
...
@@ -280,23 +282,10 @@ public:
namespace
namespace
{
{
typedef
boost
::
ptr_vector
<
SfxFilterMatcher_Impl
>
SfxFilterMatcherArr_Impl
;
typedef
std
::
vector
<
std
::
unique_ptr
<
SfxFilterMatcher_Impl
>
>
SfxFilterMatcherArr_Impl
;
static
SfxFilterMatcherArr_Impl
aImplArr
;
static
SfxFilterMatcherArr_Impl
aImplArr
;
static
int
nSfxFilterMatcherCount
;
static
int
nSfxFilterMatcherCount
;
class
hasName
:
public
std
::
unary_function
<
SfxFilterMatcher_Impl
,
bool
>
{
private
:
const
OUString
&
mrName
;
public
:
explicit
hasName
(
const
OUString
&
rName
)
:
mrName
(
rName
)
{}
bool
operator
()
(
const
SfxFilterMatcher_Impl
&
rImpl
)
const
{
return
rImpl
.
aName
==
mrName
;
}
};
SfxFilterMatcher_Impl
&
getSfxFilterMatcher_Impl
(
const
OUString
&
rName
)
SfxFilterMatcher_Impl
&
getSfxFilterMatcher_Impl
(
const
OUString
&
rName
)
{
{
OUString
aName
;
OUString
aName
;
...
@@ -306,16 +295,13 @@ namespace
...
@@ -306,16 +295,13 @@ namespace
// find the impl-Data of any comparable FilterMatcher that was created
// find the impl-Data of any comparable FilterMatcher that was created
// previously
// previously
SfxFilterMatcherArr_Impl
::
iterator
aEnd
=
aImplArr
.
end
();
for
(
std
::
unique_ptr
<
SfxFilterMatcher_Impl
>&
aImpl
:
aImplArr
)
SfxFilterMatcherArr_Impl
::
iterator
aIter
=
if
(
aImpl
->
aName
==
aName
)
std
::
find_if
(
aImplArr
.
begin
(),
aEnd
,
hasName
(
aName
));
return
*
aImpl
.
get
();
if
(
aIter
!=
aEnd
)
return
*
aIter
;
// first Matcher created for this factory
// first Matcher created for this factory
SfxFilterMatcher_Impl
*
pImpl
=
new
SfxFilterMatcher_Impl
(
aName
);
aImplArr
.
push_back
(
o3tl
::
make_unique
<
SfxFilterMatcher_Impl
>
(
aName
));
aImplArr
.
push_back
(
pImpl
);
return
*
aImplArr
.
back
().
get
();
return
*
pImpl
;
}
}
}
}
...
@@ -1198,7 +1184,7 @@ void SfxFilterContainer::ReadFilters_Impl( bool bUpdate )
...
@@ -1198,7 +1184,7 @@ void SfxFilterContainer::ReadFilters_Impl( bool bUpdate )
// global filter arry was modified, factory specific ones might need an
// global filter arry was modified, factory specific ones might need an
// update too
// update too
for
(
auto
&
aImpl
:
aImplArr
)
for
(
auto
&
aImpl
:
aImplArr
)
aImpl
.
Update
();
aImpl
->
Update
();
}
}
}
}
...
...
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