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
2f1c0be4
Kaydet (Commit)
2f1c0be4
authored
Şub 26, 2013
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
avoid string substr/replace with invalid pos
Change-Id: Iceb9851bcb5e6fe66efd701fcb31e16596fe8b5a
üst
fba47cde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
HelpCompiler.cxx
helpcompiler/source/HelpCompiler.cxx
+6
-3
No files found.
helpcompiler/source/HelpCompiler.cxx
Dosyayı görüntüle @
2f1c0be4
...
...
@@ -95,7 +95,9 @@ void HelpCompiler::saveXhpForJar( xmlDocPtr doc, const fs::path &filePath )
#endif
const
std
::
string
&
sourceXhpPath
=
filePath
.
native_file_string
();
std
::
string
zipdirPath
=
zipdir
.
native_file_string
();
std
::
string
jarXhpPath
=
sourceXhpPath
.
substr
(
sourceXhpPath
.
rfind
(
lang
+
pathSep
+
"text"
+
pathSep
)
).
substr
(
lang
.
length
()
);
const
std
::
string
srcdirPath
(
src
.
native_file_string
()
);
// srcdirPath contains trailing /, but we want the file path with / at the beginning
std
::
string
jarXhpPath
=
sourceXhpPath
.
substr
(
srcdirPath
.
length
()
-
1
);
std
::
string
xhpFileName
=
jarXhpPath
.
substr
(
jarXhpPath
.
rfind
(
pathSep
)
+
1
);
jarXhpPath
=
jarXhpPath
.
substr
(
0
,
jarXhpPath
.
rfind
(
pathSep
)
);
if
(
!
jarXhpPath
.
compare
(
1
,
11
,
"text"
+
pathSep
+
"sbasic"
)
)
...
...
@@ -104,8 +106,9 @@ void HelpCompiler::saveXhpForJar( xmlDocPtr doc, const fs::path &filePath )
}
if
(
!
jarXhpPath
.
compare
(
1
,
11
,
"text"
+
pathSep
+
"shared"
)
)
{
size_t
pos
=
zipdirPath
.
find
(
"ziptmp"
)
+
6
;
zipdirPath
.
replace
(
pos
,
module
.
length
(),
"shared"
);
const
size_t
pos
=
zipdirPath
.
find
(
"ziptmp"
);
if
(
pos
!=
std
::
string
::
npos
)
zipdirPath
.
replace
(
pos
+
6
,
module
.
length
(),
"shared"
);
}
xmlDocPtr
compacted
=
compactXhpForJar
(
doc
);
fs
::
create_directory
(
fs
::
path
(
zipdirPath
+
jarXhpPath
,
fs
::
native
)
);
...
...
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