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
2ea45a40
Kaydet (Commit)
2ea45a40
authored
Agu 21, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tdf#93240: replace boost::ptr_map with std::map<std::unique_ptr>
Change-Id: I7bc614dc45154c8dd5a7d3948f2129e5127876b3
üst
395e6776
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
21 deletions
+22
-21
svxcss1.cxx
sw/source/filter/html/svxcss1.cxx
+14
-15
svxcss1.hxx
sw/source/filter/html/svxcss1.hxx
+8
-6
No files found.
sw/source/filter/html/svxcss1.cxx
Dosyayı görüntüle @
2ea45a40
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
#include <stdlib.h>
#include <stdlib.h>
#include <o3tl/ptr_container.hxx>
#include <svx/svxids.hrc>
#include <svx/svxids.hrc>
#include <i18nlangtag/languagetag.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <svtools/ctrltool.hxx>
#include <svtools/ctrltool.hxx>
...
@@ -772,26 +771,26 @@ void SvxCSS1Parser::InsertId( const OUString& rId,
...
@@ -772,26 +771,26 @@ void SvxCSS1Parser::InsertId( const OUString& rId,
const
SfxItemSet
&
rItemSet
,
const
SfxItemSet
&
rItemSet
,
const
SvxCSS1PropertyInfo
&
rProp
)
const
SvxCSS1PropertyInfo
&
rProp
)
{
{
InsertMapEntry
(
rId
,
rItemSet
,
rProp
,
a
Ids
);
InsertMapEntry
(
rId
,
rItemSet
,
rProp
,
m_
Ids
);
}
}
const
SvxCSS1MapEntry
*
SvxCSS1Parser
::
GetId
(
const
OUString
&
rId
)
const
const
SvxCSS1MapEntry
*
SvxCSS1Parser
::
GetId
(
const
OUString
&
rId
)
const
{
{
CSS1Map
::
const_iterator
itr
=
a
Ids
.
find
(
rId
);
CSS1Map
::
const_iterator
itr
=
m_
Ids
.
find
(
rId
);
return
itr
==
aIds
.
end
()
?
NULL
:
itr
->
second
;
return
itr
==
m_Ids
.
end
()
?
nullptr
:
itr
->
second
.
get
()
;
}
}
void
SvxCSS1Parser
::
InsertClass
(
const
OUString
&
rClass
,
void
SvxCSS1Parser
::
InsertClass
(
const
OUString
&
rClass
,
const
SfxItemSet
&
rItemSet
,
const
SfxItemSet
&
rItemSet
,
const
SvxCSS1PropertyInfo
&
rProp
)
const
SvxCSS1PropertyInfo
&
rProp
)
{
{
InsertMapEntry
(
rClass
,
rItemSet
,
rProp
,
a
Classes
);
InsertMapEntry
(
rClass
,
rItemSet
,
rProp
,
m_
Classes
);
}
}
const
SvxCSS1MapEntry
*
SvxCSS1Parser
::
GetClass
(
const
OUString
&
rClass
)
const
const
SvxCSS1MapEntry
*
SvxCSS1Parser
::
GetClass
(
const
OUString
&
rClass
)
const
{
{
CSS1Map
::
const_iterator
itr
=
a
Classes
.
find
(
rClass
);
CSS1Map
::
const_iterator
itr
=
m_
Classes
.
find
(
rClass
);
return
itr
==
aClasses
.
end
()
?
NULL
:
itr
->
second
;
return
itr
==
m_Classes
.
end
()
?
nullptr
:
itr
->
second
.
get
()
;
}
}
void
SvxCSS1Parser
::
InsertPage
(
const
OUString
&
rPage
,
void
SvxCSS1Parser
::
InsertPage
(
const
OUString
&
rPage
,
...
@@ -802,7 +801,7 @@ void SvxCSS1Parser::InsertPage( const OUString& rPage,
...
@@ -802,7 +801,7 @@ void SvxCSS1Parser::InsertPage( const OUString& rPage,
OUString
aKey
(
rPage
);
OUString
aKey
(
rPage
);
if
(
bPseudo
)
if
(
bPseudo
)
aKey
=
":"
+
aKey
;
aKey
=
":"
+
aKey
;
InsertMapEntry
(
aKey
,
rItemSet
,
rProp
,
a
Pages
);
InsertMapEntry
(
aKey
,
rItemSet
,
rProp
,
m_
Pages
);
}
}
SvxCSS1MapEntry
*
SvxCSS1Parser
::
GetPage
(
const
OUString
&
rPage
,
bool
bPseudo
)
SvxCSS1MapEntry
*
SvxCSS1Parser
::
GetPage
(
const
OUString
&
rPage
,
bool
bPseudo
)
...
@@ -811,21 +810,21 @@ SvxCSS1MapEntry* SvxCSS1Parser::GetPage( const OUString& rPage, bool bPseudo )
...
@@ -811,21 +810,21 @@ SvxCSS1MapEntry* SvxCSS1Parser::GetPage( const OUString& rPage, bool bPseudo )
if
(
bPseudo
)
if
(
bPseudo
)
aKey
=
":"
+
aKey
;
aKey
=
":"
+
aKey
;
CSS1Map
::
iterator
itr
=
a
Pages
.
find
(
aKey
);
CSS1Map
::
iterator
itr
=
m_
Pages
.
find
(
aKey
);
return
itr
==
aPages
.
end
()
?
NULL
:
itr
->
second
;
return
itr
==
m_Pages
.
end
()
?
nullptr
:
itr
->
second
.
get
()
;
}
}
void
SvxCSS1Parser
::
InsertTag
(
const
OUString
&
rTag
,
void
SvxCSS1Parser
::
InsertTag
(
const
OUString
&
rTag
,
const
SfxItemSet
&
rItemSet
,
const
SfxItemSet
&
rItemSet
,
const
SvxCSS1PropertyInfo
&
rProp
)
const
SvxCSS1PropertyInfo
&
rProp
)
{
{
InsertMapEntry
(
rTag
,
rItemSet
,
rProp
,
a
Tags
);
InsertMapEntry
(
rTag
,
rItemSet
,
rProp
,
m_
Tags
);
}
}
SvxCSS1MapEntry
*
SvxCSS1Parser
::
GetTag
(
const
OUString
&
rTag
)
SvxCSS1MapEntry
*
SvxCSS1Parser
::
GetTag
(
const
OUString
&
rTag
)
{
{
CSS1Map
::
iterator
itr
=
a
Tags
.
find
(
rTag
);
CSS1Map
::
iterator
itr
=
m_
Tags
.
find
(
rTag
);
return
itr
==
aTags
.
end
()
?
NULL
:
itr
->
second
;
return
itr
==
m_Tags
.
end
()
?
nullptr
:
itr
->
second
.
get
()
;
}
}
bool
SvxCSS1Parser
::
ParseStyleSheet
(
const
OUString
&
rIn
)
bool
SvxCSS1Parser
::
ParseStyleSheet
(
const
OUString
&
rIn
)
...
@@ -930,11 +929,11 @@ void SvxCSS1Parser::InsertMapEntry( const OUString& rKey,
...
@@ -930,11 +929,11 @@ void SvxCSS1Parser::InsertMapEntry( const OUString& rKey,
if
(
itr
==
rMap
.
end
())
if
(
itr
==
rMap
.
end
())
{
{
std
::
unique_ptr
<
SvxCSS1MapEntry
>
p
(
new
SvxCSS1MapEntry
(
rKey
,
rItemSet
,
rProp
));
std
::
unique_ptr
<
SvxCSS1MapEntry
>
p
(
new
SvxCSS1MapEntry
(
rKey
,
rItemSet
,
rProp
));
o3tl
::
ptr_container
::
insert
(
rMap
,
rKey
,
std
::
move
(
p
));
rMap
.
insert
(
std
::
make_pair
(
rKey
,
std
::
move
(
p
)
));
}
}
else
else
{
{
SvxCSS1MapEntry
*
p
=
itr
->
second
;
SvxCSS1MapEntry
*
const
p
=
itr
->
second
.
get
()
;
MergeStyles
(
rItemSet
,
rProp
,
MergeStyles
(
rItemSet
,
rProp
,
p
->
GetItemSet
(),
p
->
GetPropertyInfo
(),
true
);
p
->
GetItemSet
(),
p
->
GetPropertyInfo
(),
true
);
}
}
...
...
sw/source/filter/html/svxcss1.hxx
Dosyayı görüntüle @
2ea45a40
...
@@ -25,7 +25,9 @@
...
@@ -25,7 +25,9 @@
#include "parcss1.hxx"
#include "parcss1.hxx"
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/ptr_container/ptr_map.hpp>
#include <memory>
#include <map>
class
SfxItemPool
;
class
SfxItemPool
;
class
SvxBoxItem
;
class
SvxBoxItem
;
...
@@ -197,13 +199,13 @@ inline bool operator<( const SvxCSS1MapEntry& rE1, const SvxCSS1MapEntry& rE2 )
...
@@ -197,13 +199,13 @@ inline bool operator<( const SvxCSS1MapEntry& rE1, const SvxCSS1MapEntry& rE2 )
class
SvxCSS1Parser
:
public
CSS1Parser
class
SvxCSS1Parser
:
public
CSS1Parser
{
{
typedef
::
boost
::
ptr_vector
<
CSS1Selector
>
CSS1Selectors
;
typedef
::
boost
::
ptr_vector
<
CSS1Selector
>
CSS1Selectors
;
typedef
::
boost
::
ptr_map
<
OUString
,
SvxCSS1MapEntry
>
CSS1Map
;
typedef
::
std
::
map
<
OUString
,
std
::
unique_ptr
<
SvxCSS1MapEntry
>
>
CSS1Map
;
CSS1Selectors
aSelectors
;
// Liste der "offenen" Selectoren
CSS1Selectors
aSelectors
;
// Liste der "offenen" Selectoren
CSS1Map
a
Ids
;
CSS1Map
m_
Ids
;
CSS1Map
a
Classes
;
CSS1Map
m_
Classes
;
CSS1Map
a
Pages
;
CSS1Map
m_
Pages
;
CSS1Map
a
Tags
;
CSS1Map
m_
Tags
;
OUString
sBaseURL
;
OUString
sBaseURL
;
...
...
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