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
27825a35
Kaydet (Commit)
27825a35
authored
Tem 27, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: replace boost::ptr_set with std::set<std::unique_ptr>
Change-Id: Ie4854f8b0d52771a609aee7ba4620c9308424d64
üst
6be72cc2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
35 deletions
+45
-35
htmlatr.cxx
sw/source/filter/html/htmlatr.cxx
+27
-27
wrthtml.cxx
sw/source/filter/html/wrthtml.cxx
+4
-4
wrthtml.hxx
sw/source/filter/html/wrthtml.hxx
+14
-4
No files found.
sw/source/filter/html/htmlatr.cxx
Dosyayı görüntüle @
27825a35
...
@@ -523,12 +523,12 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
...
@@ -523,12 +523,12 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
}
}
// Jetzt holen wir das Token und ggf. die Klasse
// Jetzt holen wir das Token und ggf. die Klasse
SwHTMLFormatInfo
aFormatInfo
(
&
rFormat
);
std
::
unique_ptr
<
SwHTMLFormatInfo
>
pTmpInfo
(
new
SwHTMLFormatInfo
(
&
rFormat
)
);
SwHTMLFormatInfo
*
pFormatInfo
;
SwHTMLFormatInfo
*
pFormatInfo
;
SwHTMLFormatInfos
::
iterator
it
=
rHWrt
.
aTextCollInfos
.
find
(
aFormat
Info
);
SwHTMLFormatInfos
::
iterator
it
=
rHWrt
.
m_TextCollInfos
.
find
(
pTmp
Info
);
if
(
it
!=
rHWrt
.
aTextCollInfos
.
end
()
)
if
(
it
!=
rHWrt
.
m_TextCollInfos
.
end
()
)
{
{
pFormatInfo
=
&*
it
;
pFormatInfo
=
it
->
get
()
;
}
}
else
else
{
{
...
@@ -536,7 +536,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
...
@@ -536,7 +536,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
rHWrt
.
bCfgOutStyles
,
rHWrt
.
eLang
,
rHWrt
.
bCfgOutStyles
,
rHWrt
.
eLang
,
rHWrt
.
nCSS1Script
,
rHWrt
.
nCSS1Script
,
false
);
false
);
rHWrt
.
aTextCollInfos
.
insert
(
pFormatInfo
);
rHWrt
.
m_TextCollInfos
.
insert
(
std
::
unique_ptr
<
SwHTMLFormatInfo
>
(
pFormatInfo
)
);
if
(
rHWrt
.
aScriptParaStyles
.
count
(
rFormat
.
GetName
()
)
)
if
(
rHWrt
.
aScriptParaStyles
.
count
(
rFormat
.
GetName
()
)
)
pFormatInfo
->
bScriptDependent
=
true
;
pFormatInfo
->
bScriptDependent
=
true
;
}
}
...
@@ -1590,17 +1590,17 @@ const SwHTMLFormatInfo *HTMLEndPosLst::GetFormatInfo( const SwFormat& rFormat,
...
@@ -1590,17 +1590,17 @@ const SwHTMLFormatInfo *HTMLEndPosLst::GetFormatInfo( const SwFormat& rFormat,
SwHTMLFormatInfos
&
rFormatInfos
)
SwHTMLFormatInfos
&
rFormatInfos
)
{
{
SwHTMLFormatInfo
*
pFormatInfo
;
SwHTMLFormatInfo
*
pFormatInfo
;
const
SwHTMLFormatInfo
aFormatInfo
(
&
rFormat
);
std
::
unique_ptr
<
SwHTMLFormatInfo
>
pTmpInfo
(
new
SwHTMLFormatInfo
(
&
rFormat
)
);
SwHTMLFormatInfos
::
iterator
it
=
rFormatInfos
.
find
(
aFormat
Info
);
SwHTMLFormatInfos
::
iterator
it
=
rFormatInfos
.
find
(
pTmp
Info
);
if
(
it
!=
rFormatInfos
.
end
()
)
if
(
it
!=
rFormatInfos
.
end
()
)
{
{
pFormatInfo
=
&*
it
;
pFormatInfo
=
it
->
get
()
;
}
}
else
else
{
{
pFormatInfo
=
new
SwHTMLFormatInfo
(
&
rFormat
,
pDoc
,
pTemplate
,
pFormatInfo
=
new
SwHTMLFormatInfo
(
&
rFormat
,
pDoc
,
pTemplate
,
bOutStyles
);
bOutStyles
);
rFormatInfos
.
insert
(
pFormatInfo
);
rFormatInfos
.
insert
(
std
::
unique_ptr
<
SwHTMLFormatInfo
>
(
pFormatInfo
)
);
if
(
rScriptTextStyles
.
count
(
rFormat
.
GetName
()
)
)
if
(
rScriptTextStyles
.
count
(
rFormat
.
GetName
()
)
)
pFormatInfo
->
bScriptDependent
=
true
;
pFormatInfo
->
bScriptDependent
=
true
;
}
}
...
@@ -2309,7 +2309,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
...
@@ -2309,7 +2309,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
if
(
aFormatInfo
.
pItemSet
)
if
(
aFormatInfo
.
pItemSet
)
{
{
aEndPosLst
.
Insert
(
*
aFormatInfo
.
pItemSet
,
0
,
nEnd
+
nOffset
,
aEndPosLst
.
Insert
(
*
aFormatInfo
.
pItemSet
,
0
,
nEnd
+
nOffset
,
rHTMLWrt
.
aCh
rFormatInfos
,
false
,
true
);
rHTMLWrt
.
m_Cha
rFormatInfos
,
false
,
true
);
}
}
if
(
!
aOutlineText
.
isEmpty
()
||
rHTMLWrt
.
pFormatFootnote
)
if
(
!
aOutlineText
.
isEmpty
()
||
rHTMLWrt
.
pFormatFootnote
)
...
@@ -2368,14 +2368,14 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
...
@@ -2368,14 +2368,14 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
if
(
rHTMLWrt
.
bWriteAll
)
if
(
rHTMLWrt
.
bWriteAll
)
aEndPosLst
.
Insert
(
pHt
->
GetAttr
(),
nHtStt
+
nOffset
,
aEndPosLst
.
Insert
(
pHt
->
GetAttr
(),
nHtStt
+
nOffset
,
nHtEnd
+
nOffset
,
nHtEnd
+
nOffset
,
rHTMLWrt
.
aCh
rFormatInfos
);
rHTMLWrt
.
m_Cha
rFormatInfos
);
else
else
{
{
sal_Int32
nTmpStt
=
nHtStt
<
nStrPos
?
nStrPos
:
nHtStt
;
sal_Int32
nTmpStt
=
nHtStt
<
nStrPos
?
nStrPos
:
nHtStt
;
sal_Int32
nTmpEnd
=
nHtEnd
<
nEnd
?
nHtEnd
:
nEnd
;
sal_Int32
nTmpEnd
=
nHtEnd
<
nEnd
?
nHtEnd
:
nEnd
;
aEndPosLst
.
Insert
(
pHt
->
GetAttr
(),
nTmpStt
+
nOffset
,
aEndPosLst
.
Insert
(
pHt
->
GetAttr
(),
nTmpStt
+
nOffset
,
nTmpEnd
+
nOffset
,
nTmpEnd
+
nOffset
,
rHTMLWrt
.
aCh
rFormatInfos
);
rHTMLWrt
.
m_Cha
rFormatInfos
);
}
}
continue
;
continue
;
// aber nicht ausgeben, das erfolgt spaeter !!
// aber nicht ausgeben, das erfolgt spaeter !!
...
@@ -2423,7 +2423,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
...
@@ -2423,7 +2423,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
// Bereich aufspannen werden ignoriert
// Bereich aufspannen werden ignoriert
aEndPosLst
.
Insert
(
pHt
->
GetAttr
(),
nStrPos
+
nOffset
,
aEndPosLst
.
Insert
(
pHt
->
GetAttr
(),
nStrPos
+
nOffset
,
*
pHt
->
End
()
+
nOffset
,
*
pHt
->
End
()
+
nOffset
,
rHTMLWrt
.
aCh
rFormatInfos
);
rHTMLWrt
.
m_Cha
rFormatInfos
);
}
}
}
}
else
else
...
@@ -2460,7 +2460,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
...
@@ -2460,7 +2460,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
if
(
RES_DRAWFRMFMT
==
pFrameFormat
->
Which
()
)
if
(
RES_DRAWFRMFMT
==
pFrameFormat
->
Which
()
)
aEndPosLst
.
Insert
(
*
static_cast
<
const
SwDrawFrameFormat
*>
(
pFrameFormat
),
aEndPosLst
.
Insert
(
*
static_cast
<
const
SwDrawFrameFormat
*>
(
pFrameFormat
),
nStrPos
+
nOffset
,
nStrPos
+
nOffset
,
rHTMLWrt
.
aCh
rFormatInfos
);
rHTMLWrt
.
m_Cha
rFormatInfos
);
}
}
aEndPosLst
.
OutEndAttrs
(
rHTMLWrt
,
nStrPos
+
nOffset
,
&
aContext
);
aEndPosLst
.
OutEndAttrs
(
rHTMLWrt
,
nStrPos
+
nOffset
,
&
aContext
);
...
@@ -2954,22 +2954,22 @@ Writer& OutHTML_INetFormat( Writer& rWrt, const SwFormatINetFormat& rINetFormat,
...
@@ -2954,22 +2954,22 @@ Writer& OutHTML_INetFormat( Writer& rWrt, const SwFormatINetFormat& rINetFormat,
{
{
const
SwCharFormat
*
pFormat
=
rWrt
.
pDoc
->
getIDocumentStylePoolAccess
().
GetCharFormatFromPool
(
const
SwCharFormat
*
pFormat
=
rWrt
.
pDoc
->
getIDocumentStylePoolAccess
().
GetCharFormatFromPool
(
RES_POOLCHR_INET_NORMAL
);
RES_POOLCHR_INET_NORMAL
);
SwHTMLFormatInfo
aFormatInfo
(
pFormat
);
std
::
unique_ptr
<
SwHTMLFormatInfo
>
pFormatInfo
(
new
SwHTMLFormatInfo
(
pFormat
)
);
SwHTMLFormatInfos
::
const_iterator
it
=
rHTMLWrt
.
aChrFormatInfos
.
find
(
a
FormatInfo
);
auto
const
it
=
rHTMLWrt
.
m_CharFormatInfos
.
find
(
p
FormatInfo
);
if
(
it
!=
rHTMLWrt
.
aChrFormatInfos
.
end
()
)
if
(
it
!=
rHTMLWrt
.
m_CharFormatInfos
.
end
()
)
{
{
bScriptDependent
=
it
->
bScriptDependent
;
bScriptDependent
=
(
*
it
)
->
bScriptDependent
;
}
}
}
}
if
(
!
bScriptDependent
)
if
(
!
bScriptDependent
)
{
{
const
SwCharFormat
*
pFormat
=
rWrt
.
pDoc
->
getIDocumentStylePoolAccess
().
GetCharFormatFromPool
(
const
SwCharFormat
*
pFormat
=
rWrt
.
pDoc
->
getIDocumentStylePoolAccess
().
GetCharFormatFromPool
(
RES_POOLCHR_INET_VISIT
);
RES_POOLCHR_INET_VISIT
);
SwHTMLFormatInfo
aFormatInfo
(
pFormat
);
std
::
unique_ptr
<
SwHTMLFormatInfo
>
pFormatInfo
(
new
SwHTMLFormatInfo
(
pFormat
)
);
SwHTMLFormatInfos
::
const_iterator
it
=
rHTMLWrt
.
aChrFormatInfos
.
find
(
a
FormatInfo
);
auto
const
it
=
rHTMLWrt
.
m_CharFormatInfos
.
find
(
p
FormatInfo
);
if
(
it
!=
rHTMLWrt
.
aChrFormatInfos
.
end
()
)
if
(
it
!=
rHTMLWrt
.
m_CharFormatInfos
.
end
()
)
{
{
bScriptDependent
=
it
->
bScriptDependent
;
bScriptDependent
=
(
*
it
)
->
bScriptDependent
;
}
}
}
}
...
@@ -3113,12 +3113,12 @@ static Writer& OutHTML_SwTextCharFormat( Writer& rWrt, const SfxPoolItem& rHt )
...
@@ -3113,12 +3113,12 @@ static Writer& OutHTML_SwTextCharFormat( Writer& rWrt, const SfxPoolItem& rHt )
return
rWrt
;
return
rWrt
;
}
}
SwHTMLFormatInfo
aFormatInfo
(
pFormat
);
std
::
unique_ptr
<
SwHTMLFormatInfo
>
pTmpInfo
(
new
SwHTMLFormatInfo
(
pFormat
)
);
SwHTMLFormatInfos
::
const_iterator
it
=
rHTMLWrt
.
aChrFormatInfos
.
find
(
aFormatInfo
);
SwHTMLFormatInfos
::
const_iterator
it
=
rHTMLWrt
.
m_CharFormatInfos
.
find
(
pTmpInfo
);
if
(
it
==
rHTMLWrt
.
aCh
rFormatInfos
.
end
())
if
(
it
==
rHTMLWrt
.
m_Cha
rFormatInfos
.
end
())
return
rWrt
;
return
rWrt
;
const
SwHTMLFormatInfo
*
pFormatInfo
=
&*
it
;
const
SwHTMLFormatInfo
*
pFormatInfo
=
it
->
get
()
;
OSL_ENSURE
(
pFormatInfo
,
"Wieso gint es keine Infos ueber die Zeichenvorlage?"
);
OSL_ENSURE
(
pFormatInfo
,
"Wieso gint es keine Infos ueber die Zeichenvorlage?"
);
if
(
rHTMLWrt
.
bTagOn
)
if
(
rHTMLWrt
.
bTagOn
)
...
...
sw/source/filter/html/wrthtml.cxx
Dosyayı görüntüle @
27825a35
...
@@ -448,11 +448,11 @@ sal_uLong SwHTMLWriter::WriteStream()
...
@@ -448,11 +448,11 @@ sal_uLong SwHTMLWriter::WriteStream()
aHTMLControls
.
DeleteAndDestroyAll
();
aHTMLControls
.
DeleteAndDestroyAll
();
if
(
!
aChrFormatInfos
.
empty
()
)
if
(
!
m_CharFormatInfos
.
empty
()
)
aCh
rFormatInfos
.
clear
();
m_Cha
rFormatInfos
.
clear
();
if
(
!
aTextCollInfos
.
empty
()
)
if
(
!
m_TextCollInfos
.
empty
()
)
a
TextCollInfos
.
clear
();
m_
TextCollInfos
.
clear
();
if
(
!
aImgMapNames
.
empty
())
if
(
!
aImgMapNames
.
empty
())
aImgMapNames
.
clear
();
aImgMapNames
.
clear
();
...
...
sw/source/filter/html/wrthtml.hxx
Dosyayı görüntüle @
27825a35
...
@@ -20,8 +20,9 @@
...
@@ -20,8 +20,9 @@
#define INCLUDED_SW_SOURCE_FILTER_HTML_WRTHTML_HXX
#define INCLUDED_SW_SOURCE_FILTER_HTML_WRTHTML_HXX
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <
boost/ptr_container/ptr_set.hpp
>
#include <
memory
>
#include <vector>
#include <vector>
#include <set>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/form/XForm.hpp>
#include <com/sun/star/form/XForm.hpp>
...
@@ -263,7 +264,16 @@ struct SwHTMLFormatInfo
...
@@ -263,7 +264,16 @@ struct SwHTMLFormatInfo
};
};
typedef
boost
::
ptr_set
<
SwHTMLFormatInfo
>
SwHTMLFormatInfos
;
struct
SwHTMLFormatInfo_Less
{
bool
operator
()(
std
::
unique_ptr
<
SwHTMLFormatInfo
>
const
&
lhs
,
std
::
unique_ptr
<
SwHTMLFormatInfo
>
const
&
rhs
)
{
return
(
*
lhs
)
<
(
*
rhs
);
}
};
typedef
std
::
set
<
std
::
unique_ptr
<
SwHTMLFormatInfo
>
,
SwHTMLFormatInfo_Less
>
SwHTMLFormatInfos
;
class
IDocumentStylePoolAccess
;
class
IDocumentStylePoolAccess
;
...
@@ -296,8 +306,8 @@ public:
...
@@ -296,8 +306,8 @@ public:
std
::
vector
<
OUString
>
aOutlineMarks
;
std
::
vector
<
OUString
>
aOutlineMarks
;
std
::
vector
<
sal_uInt32
>
aOutlineMarkPoss
;
std
::
vector
<
sal_uInt32
>
aOutlineMarkPoss
;
HTMLControls
aHTMLControls
;
// die zu schreibenden Forms
HTMLControls
aHTMLControls
;
// die zu schreibenden Forms
SwHTMLFormatInfos
aCh
rFormatInfos
;
SwHTMLFormatInfos
m_Cha
rFormatInfos
;
SwHTMLFormatInfos
a
TextCollInfos
;
SwHTMLFormatInfos
m_
TextCollInfos
;
INetFormats
aINetFormats
;
// die "offenen" INet-Attribute
INetFormats
aINetFormats
;
// die "offenen" INet-Attribute
SwHTMLTextFootnotes
*
pFootEndNotes
;
SwHTMLTextFootnotes
*
pFootEndNotes
;
...
...
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