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
088cb5c3
Kaydet (Commit)
088cb5c3
authored
Agu 12, 2018
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Avoid getTokenCount
Change-Id: I60d11dab9bc04462cf3cc0412a356ec51212fb6e
üst
8a5d742a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
axcontrol.cxx
oox/source/ole/axcontrol.cxx
+17
-16
No files found.
oox/source/ole/axcontrol.cxx
Dosyayı görüntüle @
088cb5c3
...
@@ -47,7 +47,6 @@
...
@@ -47,7 +47,6 @@
#include <com/sun/star/style/VerticalAlignment.hpp>
#include <com/sun/star/style/VerticalAlignment.hpp>
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/table/CellAddress.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
#include <comphelper/string.hxx>
#include <rtl/tencinfo.h>
#include <rtl/tencinfo.h>
#include <osl/diagnose.h>
#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <sal/log.hxx>
...
@@ -2550,30 +2549,32 @@ HtmlSelectModel::HtmlSelectModel()
...
@@ -2550,30 +2549,32 @@ HtmlSelectModel::HtmlSelectModel()
bool
bool
HtmlSelectModel
::
importBinaryModel
(
BinaryInputStream
&
rInStrm
)
HtmlSelectModel
::
importBinaryModel
(
BinaryInputStream
&
rInStrm
)
{
{
OUString
sStringContents
=
rInStrm
.
readUnicodeArray
(
rInStrm
.
size
()
);
if
(
rInStrm
.
size
()
<=
0
)
return
true
;
OUString
data
=
sStringContents
;
OUString
sStringContents
=
rInStrm
.
readUnicodeArray
(
rInStrm
.
size
()
)
;
// replace crlf with lf
// replace crlf with lf
data
=
data
.
replaceAll
(
"
\x0D\x0A
"
,
"
\x0A
"
);
OUString
data
=
sStringContents
.
replaceAll
(
"
\x0D\x0A
"
,
"
\x0A
"
);
std
::
vector
<
OUString
>
listValues
;
std
::
vector
<
OUString
>
listValues
;
std
::
vector
<
sal_Int16
>
selectedIndices
;
std
::
vector
<
sal_Int16
>
selectedIndices
;
// Ultra hacky parser for the info
// Ultra hacky parser for the info
sal_Int32
nTokenCount
=
comphelper
::
string
::
getTokenCount
(
data
,
'\n'
);
sal_Int32
nLineIdx
{
0
};
// first line will tell us if multiselect is enabled
for
(
sal_Int32
nToken
=
0
;
nToken
<
nTokenCount
;
++
nToken
)
if
(
data
.
getToken
(
0
,
'\n'
,
nLineIdx
)
==
"<SELECT MULTIPLE"
)
mnMultiSelect
=
AX_SELECTION_MULTI
;
// skip first and last lines, no data there
if
(
nLineIdx
>
0
)
{
{
OUString
sLine
(
data
.
getToken
(
nToken
,
'\n'
)
);
for
(;;)
if
(
!
nToken
)
// first line will tell us if multiselect is enabled
{
if
(
sLine
==
"<SELECT MULTIPLE"
)
mnMultiSelect
=
AX_SELECTION_MULTI
;
}
// skip first and last lines, no data there
else
if
(
nToken
<
nTokenCount
-
1
)
{
{
if
(
comphelper
::
string
::
getTokenCount
(
sLine
,
'>'
)
)
OUString
sLine
(
data
.
getToken
(
0
,
'\n'
,
nLineIdx
)
);
if
(
nLineIdx
<
0
)
break
;
// skip last line
if
(
!
sLine
.
isEmpty
()
)
{
{
OUString
displayValue
=
sLine
.
getToken
(
1
,
'>'
);
OUString
displayValue
=
sLine
.
getToken
(
1
,
'>'
);
if
(
displayValue
.
getLength
()
)
if
(
displayValue
.
getLength
()
)
...
...
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