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
9a2dea06
Kaydet (Commit)
9a2dea06
authored
Nis 07, 2016
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
dllexport class deriving from template means trouble with MSVC
Change-Id: I9d170168eac26c52fd6ca8d22124e8ff78b81226
üst
8b9207f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
protocolhandlercache.hxx
framework/inc/classes/protocolhandlercache.hxx
+3
-7
protocolhandlercache.cxx
framework/source/fwi/classes/protocolhandlercache.cxx
+8
-4
No files found.
framework/inc/classes/protocolhandlercache.hxx
Dosyayı görüntüle @
9a2dea06
...
...
@@ -60,13 +60,9 @@ struct FWI_DLLPUBLIC ProtocolHandler
uno implementation names as value. Overloading of the index operator makes it possible
to search for a key by using a full qualified URL on list of all possible pattern keys.
*/
class
FWI_DLLPUBLIC
PatternHash
:
public
std
::
unordered_map
<
OUString
,
OUString
,
OUStringHash
>
{
/* interface */
public
:
PatternHash
::
iterator
findPatternKey
(
const
OUString
&
sURL
);
};
typedef
std
::
unordered_map
<
OUString
,
OUString
,
OUStringHash
>
PatternHash
;
FWI_DLLPUBLIC
PatternHash
::
iterator
findPatternKey
(
PatternHash
const
&
hash
,
const
OUString
&
sURL
);
/**
This hash holds protocol handler structs by her names.
...
...
framework/source/fwi/classes/protocolhandlercache.cxx
Dosyayı görüntüle @
9a2dea06
...
...
@@ -49,10 +49,12 @@ namespace framework{
@return An iterator which points to the found item inside the hash or PatternHash::end()
if no pattern match this given <var>sURL</var>.
*/
PatternHash
::
iterator
PatternHash
::
findPatternKey
(
const
OUString
&
sURL
)
namespace
{
PatternHash
::
const_iterator
findPatternKey
(
PatternHash
const
*
hash
,
const
OUString
&
sURL
)
{
PatternHash
::
iterator
pItem
=
this
->
begin
();
while
(
pItem
!=
this
->
end
()
)
auto
pItem
=
hash
->
begin
();
while
(
pItem
!=
hash
->
end
()
)
{
WildCard
aPattern
(
pItem
->
first
);
if
(
aPattern
.
Matches
(
sURL
))
...
...
@@ -62,6 +64,8 @@ PatternHash::iterator PatternHash::findPatternKey( const OUString& sURL )
return
pItem
;
}
}
/**
@short initialize static member of class HandlerCache
@descr We use a singleton pattern to implement this handler cache.
...
...
@@ -131,7 +135,7 @@ bool HandlerCache::search( const OUString& sURL, ProtocolHandler* pReturn ) cons
SolarMutexGuard
aGuard
;
PatternHash
::
const_iterator
pItem
=
m_pPattern
->
findPatternKey
(
sURL
);
PatternHash
::
const_iterator
pItem
=
findPatternKey
(
m_pPattern
,
sURL
);
if
(
pItem
!=
m_pPattern
->
end
())
{
*
pReturn
=
(
*
m_pHandler
)[
pItem
->
second
];
...
...
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