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
deaceba0
Kaydet (Commit)
deaceba0
authored
Kas 13, 2012
tarafından
Andras Timar
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
XML tag check in help and readme translations
Change-Id: Iec88ae875e00777f499cd0044f256275d854dca8
üst
06ec1c08
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
4 deletions
+41
-4
Executable_helpex.mk
l10ntools/Executable_helpex.mk
+4
-0
Executable_xrmex.mk
l10ntools/Executable_xrmex.mk
+4
-0
helper.hxx
l10ntools/source/helper.hxx
+20
-0
helpmerge.cxx
l10ntools/source/helpmerge.cxx
+10
-3
xrmmerge.cxx
l10ntools/source/xrmmerge.cxx
+3
-1
No files found.
l10ntools/Executable_helpex.mk
Dosyayı görüntüle @
deaceba0
...
@@ -49,4 +49,8 @@ $(eval $(call gb_Executable_add_exception_objects,helpex,\
...
@@ -49,4 +49,8 @@ $(eval $(call gb_Executable_add_exception_objects,helpex,\
l10ntools/source/helpmerge \
l10ntools/source/helpmerge \
))
))
$(eval $(call gb_Executable_use_externals,helpex,\
libxml2 \
))
# vim:set shiftwidth=4 softtabstop=4 expandtab:
# vim:set shiftwidth=4 softtabstop=4 expandtab:
l10ntools/Executable_xrmex.mk
Dosyayı görüntüle @
deaceba0
...
@@ -50,4 +50,8 @@ $(eval $(call gb_Executable_add_exception_objects,xrmex,\
...
@@ -50,4 +50,8 @@ $(eval $(call gb_Executable_add_exception_objects,xrmex,\
l10ntools/source/xrmmerge \
l10ntools/source/xrmmerge \
))
))
$(eval $(call gb_Executable_use_externals,xrmex,\
libxml2 \
))
# vim:set shiftwidth=4 softtabstop=4 expandtab:
# vim:set shiftwidth=4 softtabstop=4 expandtab:
l10ntools/source/helper.hxx
Dosyayı görüntüle @
deaceba0
...
@@ -35,6 +35,8 @@
...
@@ -35,6 +35,8 @@
#include <algorithm>
#include <algorithm>
#include <cassert>
#include <cassert>
#include <libxml/parser.h>
#include "rtl/string.hxx"
#include "rtl/string.hxx"
#include "rtl/ustring.hxx"
#include "rtl/ustring.hxx"
#include "sal/types.h"
#include "sal/types.h"
...
@@ -100,6 +102,24 @@ inline sal_Int32 indexOfAnyAsciiL(
...
@@ -100,6 +102,24 @@ inline sal_Int32 indexOfAnyAsciiL(
return
-
1
;
return
-
1
;
}
}
inline
bool
isWellFormedXML
(
OString
const
&
text
)
{
xmlDocPtr
doc
;
OString
content
;
bool
result
=
true
;
content
=
"<root>"
;
content
+=
text
;
content
+=
"</root>"
;
doc
=
xmlParseMemory
(
content
.
getStr
(),(
int
)
content
.
getLength
());
if
(
doc
==
NULL
)
{
result
=
false
;
}
xmlFreeDoc
(
doc
);
xmlCleanupParser
();
return
result
;
}
template
<
typename
T
>
inline
T
abbreviate
(
template
<
typename
T
>
inline
T
abbreviate
(
T
const
&
text
,
sal_Int32
start
,
sal_Int32
length
)
T
const
&
text
,
sal_Int32
start
,
sal_Int32
length
)
{
{
...
...
l10ntools/source/helpmerge.cxx
Dosyayı görüntüle @
deaceba0
...
@@ -379,9 +379,16 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const rtl::OString& sCur ,
...
@@ -379,9 +379,16 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const rtl::OString& sCur ,
while
(
(
nPreSpaces
<
nLen
)
&&
(
*
(
sSourceText
.
getStr
()
+
nPreSpaces
)
==
' '
)
)
while
(
(
nPreSpaces
<
nLen
)
&&
(
*
(
sSourceText
.
getStr
()
+
nPreSpaces
)
==
' '
)
)
nPreSpaces
++
;
nPreSpaces
++
;
pEntrys
->
GetText
(
sNewText
,
STRING_TYP_TEXT
,
sCur
,
true
);
pEntrys
->
GetText
(
sNewText
,
STRING_TYP_TEXT
,
sCur
,
true
);
rtl
::
OUString
sNewdata
(
OUString
sNewdata
;
sSourceText
.
copy
(
0
,
nPreSpaces
)
+
if
(
helper
::
isWellFormedXML
(
sNewText
))
rtl
::
OStringToOUString
(
sNewText
,
RTL_TEXTENCODING_UTF8
));
{
sNewdata
=
sSourceText
.
copy
(
0
,
nPreSpaces
)
+
rtl
::
OStringToOUString
(
sNewText
,
RTL_TEXTENCODING_UTF8
);
}
else
{
sNewdata
=
sSourceText
;
}
if
(
!
sNewdata
.
isEmpty
())
if
(
!
sNewdata
.
isEmpty
())
{
{
if
(
pXMLElement
!=
NULL
)
if
(
pXMLElement
!=
NULL
)
...
...
l10ntools/source/xrmmerge.cxx
Dosyayı görüntüle @
deaceba0
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include "export.hxx"
#include "export.hxx"
#include "xrmmerge.hxx"
#include "xrmmerge.hxx"
#include "tokens.h"
#include "tokens.h"
#include "helper.hxx"
#include <iostream>
#include <iostream>
#include <fstream>
#include <fstream>
#include <vector>
#include <vector>
...
@@ -606,7 +607,8 @@ void XRMResMerge::WorkOnText(
...
@@ -606,7 +607,8 @@ void XRMResMerge::WorkOnText(
if
(
Export
::
isAllowed
(
sLang
)
&&
if
(
Export
::
isAllowed
(
sLang
)
&&
(
pEntrys
->
GetText
(
(
pEntrys
->
GetText
(
sContent
,
STRING_TYP_TEXT
,
sLang
))
&&
sContent
,
STRING_TYP_TEXT
,
sLang
))
&&
(
sContent
!=
"-"
)
&&
!
sContent
.
isEmpty
())
(
sContent
!=
"-"
)
&&
!
sContent
.
isEmpty
()
&&
helper
::
isWellFormedXML
(
sContent
))
{
{
rText
=
sContent
;
rText
=
sContent
;
...
...
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