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
58f8e286
Kaydet (Commit)
58f8e286
authored
Mar 16, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add HtmlWriterHelper to svtools.
Change-Id: I4d96402cc0fa86d83fe0ade314b84bff86d7db97
üst
c7b69624
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
htmlout.hxx
include/svtools/htmlout.hxx
+7
-0
htmlout.cxx
svtools/source/svhtml/htmlout.cxx
+26
-0
No files found.
include/svtools/htmlout.hxx
Dosyayı görüntüle @
58f8e286
...
...
@@ -26,6 +26,8 @@
#include <rtl/string.hxx>
#include <svl/macitem.hxx>
#include "HtmlWriter.hxx"
class
Color
;
class
ImageMap
;
class
SvStream
;
...
...
@@ -104,6 +106,11 @@ struct HTMLOutFuncs
OUString
*
pNonConvertableChars
=
0
);
};
struct
HtmlWriterHelper
{
SVT_DLLPUBLIC
static
void
applyColor
(
HtmlWriter
&
rHtmlWriter
,
OString
aAttributeName
,
const
Color
&
rColor
);
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svtools/source/svhtml/htmlout.cxx
Dosyayı görüntüle @
58f8e286
...
...
@@ -32,6 +32,8 @@
#include <svtools/imappoly.hxx>
#include "svl/urihelper.hxx"
#include <sstream>
#define TXTCONV_BUFFER_SIZE 20
HTMLOutContext
::
HTMLOutContext
(
rtl_TextEncoding
eDestEnc
)
...
...
@@ -975,4 +977,28 @@ OString HTMLOutFuncs::CreateTableDataOptionsValNum(
return
aStrTD
.
makeStringAndClear
();
}
void
HtmlWriterHelper
::
applyColor
(
HtmlWriter
&
rHtmlWriter
,
OString
aAttributeName
,
const
Color
&
rColor
)
{
OStringBuffer
sBuffer
;
if
(
rColor
.
GetColor
()
==
COL_AUTO
)
{
sBuffer
.
append
(
"#000000"
);
}
else
{
sBuffer
.
append
(
'#'
);
std
::
ostringstream
sStringStream
;
sStringStream
<<
std
::
right
<<
std
::
setfill
(
'0'
)
<<
std
::
setw
(
6
)
<<
std
::
hex
<<
rColor
.
GetRGBColor
();
sBuffer
.
append
(
sStringStream
.
str
().
c_str
());
}
rHtmlWriter
.
attribute
(
aAttributeName
,
sBuffer
.
makeStringAndClear
());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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