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
2835baa1
Kaydet (Commit)
2835baa1
authored
Tem 22, 2011
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Adjusted for HTMLParser::GetOptions return type change.
üst
c7ed86bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
33 deletions
+29
-33
HtmlReader.hxx
dbaccess/source/ui/inc/HtmlReader.hxx
+1
-1
HtmlReader.cxx
dbaccess/source/ui/misc/HtmlReader.cxx
+28
-32
No files found.
dbaccess/source/ui/inc/HtmlReader.hxx
Dosyayı görüntüle @
2835baa1
...
@@ -57,7 +57,7 @@ namespace dbaui
...
@@ -57,7 +57,7 @@ namespace dbaui
void
TableDataOn
(
SvxCellHorJustify
&
eVal
);
void
TableDataOn
(
SvxCellHorJustify
&
eVal
);
void
TableFontOn
(
::
com
::
sun
::
star
::
awt
::
FontDescriptor
&
_rFont
,
sal_Int32
&
_rTextColor
);
void
TableFontOn
(
::
com
::
sun
::
star
::
awt
::
FontDescriptor
&
_rFont
,
sal_Int32
&
_rTextColor
);
sal_Int16
GetWidthPixel
(
const
HTMLOption
*
p
Option
);
sal_Int16
GetWidthPixel
(
const
HTMLOption
&
r
Option
);
void
setTextEncoding
();
void
setTextEncoding
();
void
fetchOptions
();
void
fetchOptions
();
virtual
~
OHTMLReader
();
virtual
~
OHTMLReader
();
...
...
dbaccess/source/ui/misc/HtmlReader.cxx
Dosyayı görüntüle @
2835baa1
...
@@ -168,16 +168,15 @@ void OHTMLReader::NextToken( int nToken )
...
@@ -168,16 +168,15 @@ void OHTMLReader::NextToken( int nToken )
case
HTML_TABLE_ON
:
case
HTML_TABLE_ON
:
++
m_nTableCount
;
++
m_nTableCount
;
{
// es kann auch TD oder TH sein, wenn es vorher kein TABLE gab
{
// es kann auch TD oder TH sein, wenn es vorher kein TABLE gab
const
HTMLOptions
*
pHtmlOptions
=
GetOptions
();
const
HTMLOptions
&
rHtmlOptions
=
GetOptions
();
sal_Int16
nArrLen
=
pHtmlOptions
->
Count
();
for
(
size_t
i
=
0
,
n
=
rHtmlOptions
.
size
();
i
<
n
;
++
i
)
for
(
sal_Int16
i
=
0
;
i
<
nArrLen
;
i
++
)
{
{
const
HTMLOption
*
pOption
=
(
*
pHtmlOptions
)
[
i
];
const
HTMLOption
&
rOption
=
rHtmlOptions
[
i
];
switch
(
pOption
->
GetToken
()
)
switch
(
rOption
.
GetToken
()
)
{
{
case
HTML_O_WIDTH
:
case
HTML_O_WIDTH
:
{
// Prozent: von Dokumentbreite bzw. aeusserer Zelle
{
// Prozent: von Dokumentbreite bzw. aeusserer Zelle
m_nColumnWidth
=
GetWidthPixel
(
p
Option
);
m_nColumnWidth
=
GetWidthPixel
(
r
Option
);
}
}
break
;
break
;
}
}
...
@@ -327,21 +326,20 @@ void OHTMLReader::fetchOptions()
...
@@ -327,21 +326,20 @@ void OHTMLReader::fetchOptions()
{
{
RTL_LOGFILE_CONTEXT_AUTHOR
(
aLogger
,
"misc"
,
"Ocke.Janssen@sun.com"
,
"OHTMLReader::fetchOptions"
);
RTL_LOGFILE_CONTEXT_AUTHOR
(
aLogger
,
"misc"
,
"Ocke.Janssen@sun.com"
,
"OHTMLReader::fetchOptions"
);
m_bInTbl
=
sal_True
;
m_bInTbl
=
sal_True
;
const
HTMLOptions
*
options
=
GetOptions
();
const
HTMLOptions
&
options
=
GetOptions
();
sal_Int16
nArrLen
=
options
->
Count
();
for
(
size_t
i
=
0
,
n
=
options
.
size
();
i
<
n
;
++
i
)
for
(
sal_Int16
i
=
0
;
i
<
nArrLen
;
i
++
)
{
{
const
HTMLOption
*
pOption
=
(
*
options
)
[
i
];
const
HTMLOption
&
rOption
=
options
[
i
];
switch
(
pOption
->
GetToken
()
)
switch
(
rOption
.
GetToken
()
)
{
{
case
HTML_O_SDVAL
:
case
HTML_O_SDVAL
:
{
{
m_sValToken
=
pOption
->
GetString
();
m_sValToken
=
rOption
.
GetString
();
m_bSDNum
=
sal_True
;
m_bSDNum
=
sal_True
;
}
}
break
;
break
;
case
HTML_O_SDNUM
:
case
HTML_O_SDNUM
:
m_sNumToken
=
pOption
->
GetString
();
m_sNumToken
=
rOption
.
GetString
();
break
;
break
;
}
}
}
}
...
@@ -351,16 +349,15 @@ void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal)
...
@@ -351,16 +349,15 @@ void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal)
{
{
RTL_LOGFILE_CONTEXT_AUTHOR
(
aLogger
,
"misc"
,
"Ocke.Janssen@sun.com"
,
"OHTMLReader::TableDataOn"
);
RTL_LOGFILE_CONTEXT_AUTHOR
(
aLogger
,
"misc"
,
"Ocke.Janssen@sun.com"
,
"OHTMLReader::TableDataOn"
);
DBG_CHKTHIS
(
OHTMLReader
,
NULL
);
DBG_CHKTHIS
(
OHTMLReader
,
NULL
);
const
HTMLOptions
*
pHtmlOptions
=
GetOptions
();
const
HTMLOptions
&
rHtmlOptions
=
GetOptions
();
sal_Int16
nArrLen
=
pHtmlOptions
->
Count
();
for
(
size_t
i
=
0
,
n
=
rHtmlOptions
.
size
();
i
<
n
;
++
i
)
for
(
sal_Int16
i
=
0
;
i
<
nArrLen
;
i
++
)
{
{
const
HTMLOption
*
pOption
=
(
*
pHtmlOptions
)
[
i
];
const
HTMLOption
&
rOption
=
rHtmlOptions
[
i
];
switch
(
pOption
->
GetToken
()
)
switch
(
rOption
.
GetToken
()
)
{
{
case
HTML_O_ALIGN
:
case
HTML_O_ALIGN
:
{
{
const
String
&
rOptVal
=
pOption
->
GetString
();
const
String
&
rOptVal
=
rOption
.
GetString
();
if
(
rOptVal
.
EqualsIgnoreCaseAscii
(
OOO_STRING_SVTOOLS_HTML_AL_right
))
if
(
rOptVal
.
EqualsIgnoreCaseAscii
(
OOO_STRING_SVTOOLS_HTML_AL_right
))
eVal
=
SVX_HOR_JUSTIFY_RIGHT
;
eVal
=
SVX_HOR_JUSTIFY_RIGHT
;
else
if
(
rOptVal
.
EqualsIgnoreCaseAscii
(
OOO_STRING_SVTOOLS_HTML_AL_center
))
else
if
(
rOptVal
.
EqualsIgnoreCaseAscii
(
OOO_STRING_SVTOOLS_HTML_AL_center
))
...
@@ -372,7 +369,7 @@ void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal)
...
@@ -372,7 +369,7 @@ void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal)
}
}
break
;
break
;
case
HTML_O_WIDTH
:
case
HTML_O_WIDTH
:
m_nWidth
=
GetWidthPixel
(
p
Option
);
m_nWidth
=
GetWidthPixel
(
r
Option
);
break
;
break
;
}
}
}
}
...
@@ -383,23 +380,22 @@ void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor)
...
@@ -383,23 +380,22 @@ void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor)
{
{
RTL_LOGFILE_CONTEXT_AUTHOR
(
aLogger
,
"misc"
,
"Ocke.Janssen@sun.com"
,
"OHTMLReader::TableFontOn"
);
RTL_LOGFILE_CONTEXT_AUTHOR
(
aLogger
,
"misc"
,
"Ocke.Janssen@sun.com"
,
"OHTMLReader::TableFontOn"
);
DBG_CHKTHIS
(
OHTMLReader
,
NULL
);
DBG_CHKTHIS
(
OHTMLReader
,
NULL
);
const
HTMLOptions
*
pHtmlOptions
=
GetOptions
();
const
HTMLOptions
&
rHtmlOptions
=
GetOptions
();
sal_Int16
nArrLen
=
pHtmlOptions
->
Count
();
for
(
size_t
i
=
0
,
n
=
rHtmlOptions
.
size
();
i
<
n
;
++
i
)
for
(
sal_Int16
i
=
0
;
i
<
nArrLen
;
i
++
)
{
{
const
HTMLOption
*
pOption
=
(
*
pHtmlOptions
)
[
i
];
const
HTMLOption
&
rOption
=
rHtmlOptions
[
i
];
switch
(
pOption
->
GetToken
()
)
switch
(
rOption
.
GetToken
()
)
{
{
case
HTML_O_COLOR
:
case
HTML_O_COLOR
:
{
{
Color
aColor
;
Color
aColor
;
pOption
->
GetColor
(
aColor
);
rOption
.
GetColor
(
aColor
);
_rTextColor
=
aColor
.
GetRGBColor
();
_rTextColor
=
aColor
.
GetRGBColor
();
}
}
break
;
break
;
case
HTML_O_FACE
:
case
HTML_O_FACE
:
{
{
const
String
&
rFace
=
pOption
->
GetString
();
const
String
&
rFace
=
rOption
.
GetString
();
String
aFontName
;
String
aFontName
;
xub_StrLen
nPos
=
0
;
xub_StrLen
nPos
=
0
;
while
(
nPos
!=
STRING_NOTFOUND
)
while
(
nPos
!=
STRING_NOTFOUND
)
...
@@ -416,7 +412,7 @@ void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor)
...
@@ -416,7 +412,7 @@ void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor)
break
;
break
;
case
HTML_O_SIZE
:
case
HTML_O_SIZE
:
{
{
sal_Int16
nSize
=
(
sal_Int16
)
pOption
->
GetNumber
();
sal_Int16
nSize
=
(
sal_Int16
)
rOption
.
GetNumber
();
if
(
nSize
==
0
)
if
(
nSize
==
0
)
nSize
=
1
;
nSize
=
1
;
else
if
(
nSize
<
DBAUI_HTML_FONTSIZES
)
else
if
(
nSize
<
DBAUI_HTML_FONTSIZES
)
...
@@ -429,15 +425,15 @@ void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor)
...
@@ -429,15 +425,15 @@ void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor)
}
}
}
}
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
sal_Int16
OHTMLReader
::
GetWidthPixel
(
const
HTMLOption
*
p
Option
)
sal_Int16
OHTMLReader
::
GetWidthPixel
(
const
HTMLOption
&
r
Option
)
{
{
RTL_LOGFILE_CONTEXT_AUTHOR
(
aLogger
,
"misc"
,
"Ocke.Janssen@sun.com"
,
"OHTMLReader::GetWidthPixel"
);
RTL_LOGFILE_CONTEXT_AUTHOR
(
aLogger
,
"misc"
,
"Ocke.Janssen@sun.com"
,
"OHTMLReader::GetWidthPixel"
);
DBG_CHKTHIS
(
OHTMLReader
,
NULL
);
DBG_CHKTHIS
(
OHTMLReader
,
NULL
);
const
String
&
rOptVal
=
pOption
->
GetString
();
const
String
&
rOptVal
=
rOption
.
GetString
();
if
(
rOptVal
.
Search
(
'%'
)
!=
STRING_NOTFOUND
)
if
(
rOptVal
.
Search
(
'%'
)
!=
STRING_NOTFOUND
)
{
// Prozent
{
// Prozent
OSL_ENSURE
(
m_nColumnWidth
,
"WIDTH Option: m_nColumnWidth==0 und Width%"
);
OSL_ENSURE
(
m_nColumnWidth
,
"WIDTH Option: m_nColumnWidth==0 und Width%"
);
return
(
sal_Int16
)((
pOption
->
GetNumber
()
*
m_nColumnWidth
)
/
100
);
return
(
sal_Int16
)((
rOption
.
GetNumber
()
*
m_nColumnWidth
)
/
100
);
}
}
else
else
{
{
...
@@ -447,7 +443,7 @@ sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption* pOption )
...
@@ -447,7 +443,7 @@ sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption* pOption )
return
0
;
return
0
;
}
}
else
else
return
(
sal_Int16
)
pOption
->
GetNumber
();
// Pixel
return
(
sal_Int16
)
rOption
.
GetNumber
();
// Pixel
}
}
}
}
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
...
...
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