[Libreoffice-commits] core.git: l10ntools/source

2023-11-19 Thread Stephan Bergmann (via logerrit)
 l10ntools/source/cfgmerge.cxx  |   10 +-
 l10ntools/source/helpmerge.cxx |   16 
 l10ntools/source/lngex.cxx |2 +-
 l10ntools/source/lngmerge.cxx  |   10 +-
 l10ntools/source/merge.cxx |   10 +-
 l10ntools/source/po.cxx|4 ++--
 l10ntools/source/propex.cxx|2 +-
 l10ntools/source/propmerge.cxx |2 +-
 l10ntools/source/treemerge.cxx |6 +++---
 l10ntools/source/xmlparse.cxx  |   34 +-
 l10ntools/source/xrmmerge.cxx  |   28 ++--
 11 files changed, 62 insertions(+), 62 deletions(-)

New commits:
commit 2718e9c1d5779a23bd6587a7e0e55a0281b88745
Author: Stephan Bergmann 
AuthorDate: Sun Nov 19 20:41:10 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Nov 20 07:28:07 2023 +0100

Extended loplugin:ostr: l10ntools

Change-Id: I6c46535568ac6c29784e9336198b51c79c9e3859
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159695
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index f07323ef7efd..9ed721aab651 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -52,7 +52,7 @@ FILE * init(int argc, char ** argv) {
 common::HandledArgs aArgs;
 if ( !common::handleArguments(argc, argv, aArgs) )
 {
-common::writeUsage("cfgex","*.xcu");
+common::writeUsage("cfgex"_ostr,"*.xcu"_ostr);
 std::exit(EXIT_FAILURE);
 }
 global::inputPathname = aArgs.m_sInputFile;
@@ -365,10 +365,10 @@ void CfgExport::WorkOnResourceEnd()
 if ( !bLocalize )
 return;
 
-if ( pStackData->sText["en-US"].isEmpty() )
+if ( pStackData->sText["en-US"_ostr].isEmpty() )
 return;
 
-OString sXComment = pStackData->sText[OString("x-comment")];
+OString sXComment = pStackData->sText["x-comment"_ostr];
 OString sLocalId = pStackData->sIdentifier;
 OString sGroupId;
 if ( aStack.size() == 1 ) {
@@ -380,11 +380,11 @@ void CfgExport::WorkOnResourceEnd()
 }
 
 
-OString sText = pStackData->sText[ "en-US" ];
+OString sText = pStackData->sText[ "en-US"_ostr ];
 sText = helper::UnQuotHTML( sText );
 
 common::writePoEntry(
-"Cfgex", pOutputStream, sPath, pStackData->sResTyp,
+"Cfgex"_ostr, pOutputStream, sPath, pStackData->sResTyp,
 sGroupId, sLocalId, sXComment, sText);
 }
 
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index abdc47d1c1d4..991309a5ee01 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -108,17 +108,17 @@ bool HelpParser::CreatePO(
 auto posm = aXMLStrHM->find(pos);
 LangHashMap* pElem = posm->second;
 
-XMLElement* pXMLElement = (*pElem)[ "en-US" ];
+XMLElement* pXMLElement = (*pElem)[ "en-US"_ostr ];
 
 if( pXMLElement != nullptr )
 {
 OString data(
 pXMLElement->ToOString().
-replaceAll("\n",OString()).
-replaceAll("\t",OString()).trim());
+replaceAll("\n"_ostr,OString()).
+replaceAll("\t"_ostr,OString()).trim());
 
 common::writePoEntry(
-"Helpex", aPoOutput, sHelpFile, rGsi1,
+"Helpex"_ostr, aPoOutput, sHelpFile, rGsi1,
 posm->first, OString(), OString(), data);
 
 pXMLElement=nullptr;
@@ -158,7 +158,7 @@ void HelpParser::MergeSingleFile( XMLFile* file , 
MergeDataFile* pMergeDataFile
 file->Extract();
 
 XMLHashMap* aXMLStrHM = file->GetStrings();
-static ResData s_ResData("","");
+static ResData s_ResData(""_ostr,""_ostr);
 s_ResData.sResTyp   = "help";
 
 std::vector order = file->getOrder();
@@ -190,7 +190,7 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const 
OString& sCur , ResDa
 if( sCur.equalsIgnoreAsciiCase("en-US") )
 return;
 
-pXMLElement = (*aLangHM)[ "en-US" ];
+pXMLElement = (*aLangHM)[ "en-US"_ostr ];
 if( pXMLElement == nullptr )
 {
 printf("Error: Can't find en-US entry\n");
@@ -202,10 +202,10 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , 
const OString& sCur , ResDa
 OString sSourceText(
 pXMLElement->ToOString().
 replaceAll(
-"\n",
+"\n"_ostr,
 OString()).
 replaceAll(
-"\t",
+"\t"_ostr,
 OString()));
 // re-add spaces to the beginning of translated string,
 // important for indentation of Basic code examples
diff --git a/l10ntools/source/lngex.cxx b/l10ntools/source/lngex.cxx
index 2d7c413ad1ed..69d49f885a1c 100644
--- a/l10ntools/source/lngex.cxx
+++ b/l10ntools/source/lngex.cxx
@@ -30,7 +30,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 common::HandledArgs aArgs;
 if (!common::handleArguments(argc, argv, aArgs))
 {
-

[Libreoffice-commits] core.git: l10ntools/source

2023-10-19 Thread Stephan Bergmann (via logerrit)
 l10ntools/source/merge.cxx|2 +-
 l10ntools/source/xmlparse.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f6f00918854bae7f03e79192e5d79f78929cb418
Author: Stephan Bergmann 
AuthorDate: Thu Oct 19 10:30:19 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Oct 19 23:20:34 2023 +0200

Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: l10ntools

Change-Id: I4878e2209b8499e02b7a6c13867b1a3aa4dad7e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158204
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 8327442b0af2..2ad9d8261fb8 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -150,7 +150,7 @@ MergeDataFile::MergeDataFile(
 OString sLang;
 //Get language id from path
 {
-static constexpr OStringLiteral 
sTransSource("translations/source/");
+static constexpr OString sTransSource("translations/source/"_ostr);
 const sal_Int32 nStart =
 sPoFileName.indexOf(sTransSource)+sTransSource.getLength();
 const sal_Int32 nCount =
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index b3fa97ae00d0..51186ac5c623 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -36,7 +36,7 @@
 
 using namespace osl;
 
-constexpr OStringLiteral XML_LANG = "xml-lang";
+constexpr OString XML_LANG = "xml-lang"_ostr;
 
 
 


[Libreoffice-commits] core.git: l10ntools/source

2023-07-27 Thread sahil (via logerrit)
 l10ntools/source/localize.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0c45d90cfb1cc60218fbce3743df442b1f1d3f70
Author: sahil 
AuthorDate: Fri Jul 28 02:04:09 2023 +0530
Commit: Ilmari Lauhakangas 
CommitDate: Fri Jul 28 07:07:11 2023 +0200

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

Change-Id: I7217c04aa13082c1d2006c0c6a145b1b4fdbac0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155003
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 7f9587b4c22b..96da93e139e2 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -203,7 +203,7 @@ bool handleFile(std::string_view rProject, const OUString& 
rUrl, std::string_vie
 { std::u16string_view(u".properties"), "propex", false },
 { std::u16string_view(u".ui"), "uiex", false },
 { std::u16string_view(u".tree"), "treex", false } };
-for (size_t i = 0; i != SAL_N_ELEMENTS(commands); ++i)
+for (size_t i = 0; i != std::size(commands); ++i)
 {
 if (rUrl.endsWith(commands[i].extension) &&
 (commands[i].executable != "propex" || rUrl.indexOf("en_US") != 
-1))


[Libreoffice-commits] core.git: l10ntools/source

2022-11-22 Thread Stephan Bergmann (via logerrit)
 l10ntools/source/localize.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 27eb23369f9e250e71cfea8524a71f962e93b8fd
Author: Stephan Bergmann 
AuthorDate: Tue Nov 22 14:46:51 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Nov 23 08:47:26 2022 +0100

Work around system(3) dropping DYLD_LIBRARY_PATH on macOS

...which caused `make translations` fail for me with

> [POT] pot.done
> dyld[96290]: Library not loaded: @__VIA_LIBRARY_PATH__/libuno_sal.dylib.3
>   Referenced from:  
.../workdir/LinkTarget/Executable/cfgex
>   Reason: tried: 
'/System/Volumes/Preboot/Cryptexes/OS@__VIA_LIBRARY_PATH__/libuno_sal.dylib.3' 
(no such file), '/usr/local/lib/libuno_sal.dylib.3' (no such file), 
'/usr/lib/libuno_sal.dylib.3' (no such file, not in dyld cache)
> Error: Failed to execute .../workdir/LinkTarget/Executable/cfgex -i 
.../connectivity/registry/ado/org/openoffice/Office/DataAccess/Drivers.xcu -o 
.../workdir//pot/connectivity/registry/ado/org/openoffice/Office/DataAccess.pot

(This is the opposite case to 17cfd43e28c45626b1e0990bd0e51fdc97409ebe 
"Avoid
external processes picking up instdir/program/libxml2.so.2".  Here, the
executables called from Executable_localize are LO-internal executables that
need the libraries in instdir/.  There, the scripts called from
Executable_localize in turn only call external tools that shall not 
accidentally
pick up LO-internal libraries from instdir/.)

Change-Id: Ib1aa240ee47a21d14ec0463fee85bebe82453cee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143118
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index c5ffd6d5c060..96037c991927 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -109,6 +109,11 @@ void handleCommand(
 }
 else
 {
+#if defined MACOSX
+if (auto const env = getenv("DYLD_LIBRARY_PATH")) {
+buf.append(OString::Concat("DYLD_LIBRARY_PATH=") + env + " ");
+}
+#endif
 auto const env = getenv("WORKDIR_FOR_BUILD");
 assert(env != nullptr);
 buf.append(env);


[Libreoffice-commits] core.git: l10ntools/source solenv/gbuild

2022-11-21 Thread Stephan Bergmann (via logerrit)
 l10ntools/source/localize.cxx |   18 --
 solenv/gbuild/Module.mk   |1 +
 2 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit 17cfd43e28c45626b1e0990bd0e51fdc97409ebe
Author: Stephan Bergmann 
AuthorDate: Sun Nov 20 17:39:27 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Nov 21 16:45:02 2022 +0100

Avoid external processes picking up instdir/program/libxml2.so.2

...which is a problem in ASan builds, as seen with a failing `make check`:

> xgettext: symbol lookup error: .../instdir/program/libxml2.so.2: 
undefined symbol: __asan_init
> xgettext: symbol lookup error: .../instdir/program/libxml2.so.2: 
undefined symbol: __asan_init
> xgettext: symbol lookup error: .../instdir/program/libxml2.so.2: 
undefined symbol: __asan_init
> xgettext: symbol lookup error: .../instdir/program/libxml2.so.2: 
undefined symbol: __asan_init
> xgettext: symbol lookup error: .../instdir/program/libxml2.so.2: 
undefined symbol: __asan_init
> Traceback (most recent call last):
>   File ".../solenv/bin/uiex", line 25, in 
> input = check_output(["xgettext", "--add-comments", "--no-wrap", 
ifile, "-o", "-"], encoding="UTF-8")
> 
^
>   File "/usr/lib64/python3.11/subprocess.py", line 465, in check_output
> return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
>^
>   File "/usr/lib64/python3.11/subprocess.py", line 569, in run
> raise CalledProcessError(retcode, process.args,
> subprocess.CalledProcessError: Command '['xgettext', '--add-comments', 
'--no-wrap', '.../basctl/uiconfig/basicide/ui/basicmacrodialog.ui', '-o', '-']' 
returned non-zero exit status 127.
> Error: Failed to execute .../solenv/bin/uiex -i 
.../basctl/uiconfig/basicide/ui/basicmacrodialog.ui -o 
.../workdir//pot/basctl/messages.pot

The solution is similar to e854abe076155fc085b56549ced50b3ee9a095d2 "Avoid
external processes picking up instdir/program/libnspr4.so" used in various
tests.  And as Executable_localize appears to only be called in that one 
place
in the recipe of `make translations`, for simplicity make the library path
override a required fourth argument for that executable.

Change-Id: Ia6326ac0bb12ea75a8b3df51f7fbf12b88aca634
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142999
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 2ec0123616f4..c5ffd6d5c060 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -46,6 +46,8 @@
 
 namespace {
 
+OString libraryPathEnvVarOverride;
+
 bool matchList(
 std::u16string_view rUrl, const std::u16string_view* pList, size_t nLength)
 {
@@ -89,6 +91,17 @@ void handleCommand(
 OStringBuffer buf;
 if (rExecutable == "uiex" || rExecutable == "hrcex")
 {
+#if !defined _WIN32
+// For now, this is only needed by some Linux ASan builds, so keep it 
simply and disable it
+// on  Windows (which doesn't support the relevant shell syntax for 
(un-)setting environment
+// variables).
+auto const n = libraryPathEnvVarOverride.indexOf('=');
+if (n == -1) {
+buf.append("unset -v " + libraryPathEnvVarOverride + " && ");
+} else {
+buf.append(libraryPathEnvVarOverride + " ");
+}
+#endif
 auto const env = getenv("SRC_ROOT");
 assert(env != nullptr);
 buf.append(env);
@@ -485,16 +498,17 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 {
 try
 {
-if (argc != 3)
+if (argc != 4)
 {
 std::cerr
 << ("localize (c)2001 by Sun Microsystems\n\n"
 "As part of the L10N framework, localize extracts en-US\n"
 "strings for translation out of the toplevel modules 
defined\n"
 "in projects array in l10ntools/source/localize.cxx.\n\n"
-"Syntax: localize  \n");
+"Syntax: localize   
\n");
 exit(EXIT_FAILURE);
 }
+libraryPathEnvVarOverride = argv[3];
 handleProjects(argv[1],argv[2]);
 }
 catch (std::exception& e)
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index 347f1239e005..fe7470e85822 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -247,6 +247,7 @@ $(WORKDIR)/pot.done : $(foreach exec,cfgex helpex localize 
propex ulfex xrmex tr
$(call gb_Trace_MakeMark,$(subst .pot,,$(subst $(WORKDIR)/,,$@)),POT)
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && $(call gb_Helper_execute,localize) 
$(SRCDIR) $(dir $@)/pot \
+   

[Libreoffice-commits] core.git: l10ntools/source

2022-11-20 Thread Stephan Bergmann (via logerrit)
 l10ntools/source/cfgmerge.cxx |   15 +++
 1 file changed, 15 insertions(+)

New commits:
commit cb24017c84efdc91a73d91655664d9ae01a1d6d6
Author: Stephan Bergmann 
AuthorDate: Sun Nov 20 17:52:34 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Sun Nov 20 22:40:27 2022 +0100

Clean up CfgParser::aStack

This is apparently some very old, very poor XML parsing code full of
questionable design decisions.  The silliness of pushing onto the 
opened-element
stack also entities that don't have a closing tag (but which cannot easily 
be
changed, see the added comment about CfgStack::GetAccessPath) caused 
consistent
memory leaks when Executable_cfgex is executed during the build.  While 
those
leaks are harmless, they might cause people to nevertheless try to clean 
them up
in various ways (see the abandoned
 "asan: fix leak in
ExecuteAnalyzedToken/Push"), so just clean up those broken-by-design excess
aStack elements.

Change-Id: I849109906c6b102d9aa90300c2bada360c727d4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143001
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index 1e43f3e99394..f07323ef7efd 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -134,6 +134,21 @@ CfgParser::CfgParser()
 
 CfgParser::~CfgParser()
 {
+// CfgParser::ExecuteAnalyzedToken pushes onto aStack some XML entities 
(like XML and document
+// type declarations) that don't have corresponding closing tags, so will 
never be popped off
+// aStack again.  But not pushing them onto aStack in the first place 
would change the
+// identifiers computed in CfgStack::GetAccessPath, which could make the 
existing translation
+// mechanisms fail.  So, for simplicity, and short of more thorough input 
error checking, take
+// into account here all the patterns of such declarations encountered 
during a build and during
+// `make translations` (some inputs start with no such declarations at 
all, some inputs start
+// with an XML declaration, and some inputs start with an XML declaration 
followed by a document
+// type declaration) and pop any corresponding remaining excess elements 
off aStack:
+if (aStack.size() == 2 && aStack.GetStackData()->GetTagType() == 
"!DOCTYPE") {
+aStack.Pop();
+}
+if (aStack.size() == 1 && aStack.GetStackData()->GetTagType() == "?xml") {
+aStack.Pop();
+}
 }
 
 bool CfgParser::IsTokenClosed(std::string_view rToken)


[Libreoffice-commits] core.git: l10ntools/source

2022-11-20 Thread Stephan Bergmann (via logerrit)
 l10ntools/source/xmlparse.cxx |   12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

New commits:
commit e735de2051143347b7283c85ad80b0e2412522dc
Author: Stephan Bergmann 
AuthorDate: Sun Nov 20 17:46:31 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Sun Nov 20 22:39:54 2022 +0100

Avoid some unnecessary, wrong downcasts during `make translations`

> l10ntools/source/xmlparse.cxx:491:51: runtime error: downcast of address 
0x60300610 which does not point to an object of type 'XMLParentNode'
> 0x60300610: note: object is of type 'XMLDefault'
>  00 00 00 00  30 44 a7 dd a0 55 00 00  00 05 10 6e a4 7f 00 00  80 00 00 
00 60 60 00 00  00 00 00 00
>   ^~~
>   vptr for 'XMLDefault'
>  #0 in XMLFile::CheckExportStatus(XMLParentNode*) at 
l10ntools/source/xmlparse.cxx:491:51
>  #1 in XMLFile::CheckExportStatus(XMLParentNode*) at 
l10ntools/source/xmlparse.cxx:481:9
>  #2 in HelpParser::CreatePO(rtl::OString const&, rtl::OString const&, 
XMLFile*, std::basic_string_view>) at 
l10ntools/source/helpmerge.cxx:91:20
>  #3 in sal_main_with_args(int, char**) at 
l10ntools/source/helpex.cxx:124:17
>  #4 in main at l10ntools/source/helpex.cxx:47:1

and

> l10ntools/source/xmlparse.cxx:523:44: runtime error: downcast of address 
0x603007c0 which does not point to an object of type 'XMLParentNode'
> 0x603007c0: note: object is of type 'XMLData'
>  00 00 00 00  e0 53 d5 c0 46 56 00 00  d0 00 00 00 40 60 00 00  f0 07 00 
00 30 60 00 00  00 00 00 00
>   ^~~
>   vptr for 'XMLData'
>  #0 in XMLFile::CheckExportStatus(XMLParentNode*) at 
l10ntools/source/xmlparse.cxx:523:44
>  #1 in XMLFile::CheckExportStatus(XMLParentNode*) at 
l10ntools/source/xmlparse.cxx:492:80
>  #2 in XMLFile::CheckExportStatus(XMLParentNode*) at 
l10ntools/source/xmlparse.cxx:481:9
>  #3 in HelpParser::CreatePO(rtl::OString const&, rtl::OString const&, 
XMLFile*, std::basic_string_view>) at 
l10ntools/source/helpmerge.cxx:91:20
>  #4 in sal_main_with_args(int, char**) at 
l10ntools/source/helpex.cxx:124:17
>  #5 in main at l10ntools/source/helpex.cxx:47:1

and

> l10ntools/source/xmlparse.cxx:526:48: runtime error: downcast of address 
0x60300820 which does not point to an object of type 'XMLParentNode'
> 0x60300820: note: object is of type 'XMLComment'
>  00 00 00 00  28 06 92 a9 17 56 00 00  d0 00 00 00 40 60 00 00  40 00 00 
00 20 61 00 00  00 00 00 00
>   ^~~
>   vptr for 'XMLComment'
>  #0 in XMLFile::CheckExportStatus(XMLParentNode*) at 
l10ntools/source/xmlparse.cxx:523:44
>  #1 in XMLFile::CheckExportStatus(XMLParentNode*) at 
l10ntools/source/xmlparse.cxx:492:80
>  #2 in XMLFile::CheckExportStatus(XMLParentNode*) at 
l10ntools/source/xmlparse.cxx:481:9
>  #3 in HelpParser::CreatePO(rtl::OString const&, rtl::OString const&, 
XMLFile*, std::basic_string_view>) at 
l10ntools/source/helpmerge.cxx:91:20
>  #4 in sal_main_with_args(int, char**) at 
l10ntools/source/helpex.cxx:124:17
>  #5 in main at l10ntools/source/helpex.cxx:47:1

Change-Id: I1e2c6bf802aa03b5b1eb21532e98fa22d966e683
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143000
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index b32ed4f5037a..bcf5d37154cb 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -488,8 +488,8 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur )
 {
 for ( size_t i = 0; i < GetChildList()->size(); i++ )
 {
-XMLParentNode* pElement = 
static_cast((*GetChildList())[ i ]);
-if( pElement->GetNodeType() ==  XMLNodeType::ELEMENT ) 
CheckExportStatus( pElement );//, i);
+XMLChildNode* pElement = (*GetChildList())[ i ];
+if( pElement->GetNodeType() ==  XMLNodeType::ELEMENT ) 
CheckExportStatus( static_cast(pElement) );//, i);
 }
 }
 }
@@ -520,7 +520,13 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur )
 else if ( pElement->GetChildList() )
 {
 for (size_t k = 0; k < pElement->GetChildList()->size(); 
++k)
-CheckExportStatus( 
static_cast((*pElement->GetChildList())[k]) );
+{
+auto const child = (*pElement->GetChildList())[k];
+auto const type = child->GetNodeType();
+if (type != XMLNodeType::DATA && type != 
XMLNodeType::COMMENT) {
+CheckExportStatus( 
static_cast(child) );
+}
+  

[Libreoffice-commits] core.git: l10ntools/source

2022-11-15 Thread Julien Nabet (via logerrit)
 l10ntools/source/treemerge.cxx |9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit bf9ce4e056b521db8e8c997a56317ab15963dce9
Author: Julien Nabet 
AuthorDate: Mon Nov 14 18:36:03 2022 +0100
Commit: Julien Nabet 
CommitDate: Tue Nov 15 19:38:32 2022 +0100

asan: fix leak in lcl_MergeLevel

Direct leak of 2000 byte(s) in 2 object(s) allocated from:
0 0x55906afe399e in malloc 
(/home/julien/lo/libo_perf/workdir/LinkTarget/Executable/treex+0xff99e) 
(BuildId: 5b19224d0ca2120a)
1 0x7fd51a4abfd7 in xmlEncodeSpecialChars 
(/lib/x86_64-linux-gnu/libxml2.so.2+0x31fd7) (BuildId: 
008b52a46ddf3013589362f7f678f7a6c8dd1e56)
2 0x55906b023403 in (anonymous namespace)::lcl_MergeLevel(_xmlDoc*, 
_xmlNode*, unsigned char const*, MergeDataFile*, rtl::OString const&, 
rtl::OString const&) treemerge.cxx
3 0x55906b0232d4 in (anonymous namespace)::lcl_MergeLevel(_xmlDoc*, 
_xmlNode*, unsigned char const*, MergeDataFile*, rtl::OString const&, 
rtl::OString const&) treemerge.cxx
4 0x55906b0232d4 in (anonymous namespace)::lcl_MergeLevel(_xmlDoc*, 
_xmlNode*, unsigned char const*, MergeDataFile*, rtl::OString const&, 
rtl::OString const&) treemerge.cxx
5 0x55906b0226ef in TreeParser::Merge(rtl::OString const&, rtl::OString 
const&, rtl::OString const&) treemerge.cxx
6 0x55906b02c0dd in sal_main_with_args(int, char**) treex.cxx
7 0x55906b02baad in main 
(/home/julien/lo/libo_perf/workdir/LinkTarget/Executable/treex+0x147aad) 
(BuildId: 5b19224d0ca2120a)
8 0x7fd519e46189 in __libc_start_call_main 
csu/../sysdeps/nptl/libc_start_call_main.h:58:16

Change-Id: I9882cd63b91967d9b8998ba25545c11a3168e739
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142717
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/l10ntools/source/treemerge.cxx b/l10ntools/source/treemerge.cxx
index ff48aeda6b74..860c85b38598 100644
--- a/l10ntools/source/treemerge.cxx
+++ b/l10ntools/source/treemerge.cxx
@@ -116,11 +116,10 @@ namespace
 helper::xmlStrToOString( sTitle ).
 replaceAll("$[officename]","%PRODUCTNAME").
 
replaceAll("$[officeversion]","%PRODUCTVERSION");
-xmlNodeSetContent(
-pReturn,
-xmlEncodeSpecialChars( nullptr,
-reinterpret_cast(
-sNewTitle.getStr() )));
+xmlChar *xmlString = xmlEncodeSpecialChars(nullptr,
+reinterpret_cast( sNewTitle.getStr() 
));
+xmlNodeSetContent( pReturn, xmlString);
+xmlFree( xmlString );
 xmlFree( sTitle );
 break;
 }


[Libreoffice-commits] core.git: l10ntools/source

2022-04-15 Thread Noel Grandin (via logerrit)
 l10ntools/source/merge.cxx |   13 +
 l10ntools/source/po.cxx|5 -
 2 files changed, 13 insertions(+), 5 deletions(-)

New commits:
commit b9c806b9e3631d76b8ceaa6208497aba60c75f83
Author: Noel Grandin 
AuthorDate: Thu Apr 14 18:52:19 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Apr 15 14:06:06 2022 +0200

address potential find/rfind failures

in the conversion in
commit 74957c7d2f3697fbf2b6f4d6a31c61d5d7df039b
Author: Noel Grandin 
Date:   Wed Apr 13 13:54:22 2022 +0200
use more string_view in l10ntools

where the prior code might have been relying on the -1 returned by
indexOf and lastIndexOd

Change-Id: Ief5dedccbaf4e14e5f59aa3c2f7481ff0bb7e2e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133027
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 8a6964c61fa4..588cb73d8614 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -34,10 +34,15 @@ namespace
 {
 OString lcl_NormalizeFilename(std::string_view rFilename)
 {
-return OString(rFilename.substr(
-std::max(
-rFilename.rfind( '\\' ),
-rFilename.rfind( '/' ))+1));
+size_t idx1 = rFilename.rfind( '\\' );
+size_t idx2 = rFilename.rfind( '/' );
+if (idx1 == std::string_view::npos && idx2 == std::string_view::npos)
+return OString(rFilename);
+if (idx1 == std::string_view::npos)
+idx1 = 0;
+if (idx2 == std::string_view::npos)
+idx2 = 0;
+return OString(rFilename.substr(std::max(idx1, idx2)+1));
 };
 
 bool lcl_ReadPoChecked(
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index b93126838c99..62d09e1e7407 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -257,7 +257,10 @@ PoEntry::PoEntry(
 throw WRONGHELPTEXT;
 
 m_pGenPo.reset( new GenPoEntry() );
-OString sReference(rSourceFile.substr(rSourceFile.rfind('/')+1));
+size_t idx = rSourceFile.rfind('/');
+if (idx == std::string_view::npos)
+idx = 0;
+OString sReference(rSourceFile.substr(idx+1));
 m_pGenPo->setReference(sReference);
 
 OString sMsgCtxt =


[Libreoffice-commits] core.git: l10ntools/source

2022-02-21 Thread Stephan Bergmann (via logerrit)
 l10ntools/source/merge.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 56c4445a8060d8ef6aec78f54ea28f4d7e5a8aa7
Author: Stephan Bergmann 
AuthorDate: Mon Feb 21 08:09:49 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 21 09:23:40 2022 +0100

Fail Executable_ulfex upon duplicate keys in malformed input

...instead of causing use-after-free of pMergeEntrys, which would be 
destroyed
during the (non-adding) emplace call but would still be used in the 
following
if/else block (see the commit message of
c6e2052b6f0d281fed334f8c803b1a6486d5b3bc "Update git submodules: Fix 
duplicate
key typo")

Change-Id: Iac8d67e61aba0144d3d5807f478c7b330d7c4c81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130235
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 004cffacc494..78334c70c8fe 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -21,7 +21,9 @@
 #include 
 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 
@@ -298,7 +300,11 @@ void MergeDataFile::InsertEntry(
 if( !pMergeEntrys )
 {
 pMergeEntrys = new MergeEntrys;
-aMap.emplace( sKey, std::unique_ptr(pMergeEntrys) );
+if (!aMap.emplace( sKey, std::unique_ptr(pMergeEntrys) 
).second)
+{
+std::cerr << "Duplicate entry " << sKey << "\n";
+std::exit(EXIT_FAILURE);
+}
 }
 
 


[Libreoffice-commits] core.git: l10ntools/source libreofficekit/qa libreofficekit/source linguistic/source lotuswordpro/source

2021-12-21 Thread Noel Grandin (via logerrit)
 l10ntools/source/xmlparse.cxx   |   32 ++--
 libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx |   60 
+++
 libreofficekit/source/gtk/lokdocview.cxx|   36 ++--
 linguistic/source/misc.cxx  |   33 ++--
 lotuswordpro/source/filter/lwpframelayout.cxx   |   43 
++---
 lotuswordpro/source/filter/lwplayout.cxx|   77 
--
 lotuswordpro/source/filter/lwppagelayout.cxx|   33 ++--
 7 files changed, 153 insertions(+), 161 deletions(-)

New commits:
commit 968b64d054eb164cee9fb92b6bf7dd93f478bf24
Author: Noel Grandin 
AuthorDate: Tue Dec 21 20:21:08 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Dec 22 07:43:22 2021 +0100

loplugin:flatten in l10ntools..lotuswordpro

Change-Id: Ie6de142db1987094fdf538148ac5ee33379a3e4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127275
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index d533d8db07ba..10f52fdcb3d7 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -394,28 +394,28 @@ XMLFile::XMLFile( const XMLFile& rObj )
 
 XMLFile& XMLFile::operator=(const XMLFile& rObj)
 {
-if( this !=  )
-{
-XMLParentNode::operator=(rObj);
+if( this ==  )
+return *this;
 
-m_aNodes_localize = rObj.m_aNodes_localize;
-m_vOrder = rObj.m_vOrder;
+XMLParentNode::operator=(rObj);
 
-m_pXMLStrings.reset();
+m_aNodes_localize = rObj.m_aNodes_localize;
+m_vOrder = rObj.m_vOrder;
 
-if( rObj.m_pXMLStrings )
+m_pXMLStrings.reset();
+
+if( rObj.m_pXMLStrings )
+{
+m_pXMLStrings.reset( new XMLHashMap );
+for (auto const& pos : *rObj.m_pXMLStrings)
 {
-m_pXMLStrings.reset( new XMLHashMap );
-for (auto const& pos : *rObj.m_pXMLStrings)
+LangHashMap* pElem=pos.second;
+LangHashMap* pNewelem = new LangHashMap;
+for (auto const& pos2 : *pElem)
 {
-LangHashMap* pElem=pos.second;
-LangHashMap* pNewelem = new LangHashMap;
-for (auto const& pos2 : *pElem)
-{
-(*pNewelem)[ pos2.first ] = new XMLElement( *pos2.second );
-}
-(*m_pXMLStrings)[ pos.first ] = pNewelem;
+(*pNewelem)[ pos2.first ] = new XMLElement( *pos2.second );
 }
+(*m_pXMLStrings)[ pos.first ] = pNewelem;
 }
 }
 return *this;
diff --git 
a/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx 
b/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx
index 90b96e57488a..a2cbd8021dea 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx
@@ -409,36 +409,36 @@ gboolean LOKDocViewSigHandlers::configureEvent(GtkWidget* 
pWidget, GdkEventConfi
 }
 
 LibreOfficeKitDocument* pDocument = 
lok_doc_view_get_document(LOK_DOC_VIEW(window->lokdocview));
-if (pDocument && pDocument->pClass->getDocumentType(pDocument) == 
LOK_DOCTYPE_SPREADSHEET)
-{
-GtkAdjustment* pVAdjustment = 
gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(window->scrolledwindow));
-int rowSizePixel = GTV_CALC_HEADER_BAR(window->rowbar)->m_nSizePixel = 
gtk_adjustment_get_page_size(pVAdjustment);
-int rowPosPixel = 
GTV_CALC_HEADER_BAR(window->rowbar)->m_nPositionPixel = 
gtk_adjustment_get_value(pVAdjustment);
-GtkAdjustment* pHAdjustment = 
gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(window->scrolledwindow));
-int colSizePixel = 
GTV_CALC_HEADER_BAR(window->columnbar)->m_nSizePixel = 
gtk_adjustment_get_page_size(pHAdjustment);
-int colPosPixel = 
GTV_CALC_HEADER_BAR(window->columnbar)->m_nPositionPixel = 
gtk_adjustment_get_value(pHAdjustment);
-
-std::stringstream aCommand;
-aCommand << ".uno:ViewRowColumnHeaders";
-aCommand << "?x=" << 
int(lok_doc_view_pixel_to_twip(LOK_DOC_VIEW(window->lokdocview), colPosPixel));
-aCommand << "=" << 
int(lok_doc_view_pixel_to_twip(LOK_DOC_VIEW(window->lokdocview), colSizePixel));
-aCommand << "=" << 
int(lok_doc_view_pixel_to_twip(LOK_DOC_VIEW(window->lokdocview), rowPosPixel));
-aCommand << "=" << 
int(lok_doc_view_pixel_to_twip(LOK_DOC_VIEW(window->lokdocview), rowSizePixel));
-std::stringstream ss;
-ss << "lok::Document::getCommandValues(" << aCommand.str() << ")";
-g_info("%s", ss.str().c_str());
-char* pValues = pDocument->pClass->getCommandValues(pDocument, 
aCommand.str().c_str());
-g_info("lok::Document::getCommandValues() returned '%s'", pValues);
-

[Libreoffice-commits] core.git: l10ntools/source lingucomponent/source linguistic/source

2021-10-04 Thread Julien Nabet (via logerrit)
 l10ntools/source/idxdict/idxdict.cxx |   34 +++
 l10ntools/source/localize.cxx|   30 ++---
 l10ntools/source/xmlparse.cxx|3 -
 l10ntools/source/xrmmerge.cxx|8 +--
 lingucomponent/source/languageguessing/guess.cxx |2 
 lingucomponent/source/languageguessing/simpleguesser.cxx |   28 +---
 linguistic/source/convdic.cxx|5 --
 linguistic/source/convdicxml.cxx |3 -
 8 files changed, 50 insertions(+), 63 deletions(-)

New commits:
commit 2f54c40fc28294676a129cfa86eed39f974a9e24
Author: Julien Nabet 
AuthorDate: Mon Oct 4 21:21:31 2021 +0200
Commit: Julien Nabet 
CommitDate: Mon Oct 4 22:30:42 2021 +0200

drop 'using namespace std' in l*

Change-Id: I88909cf813f39a52c70d3cbcb19ff326d9bb42d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123069
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/l10ntools/source/idxdict/idxdict.cxx 
b/l10ntools/source/idxdict/idxdict.cxx
index b931591b600b..6d2a22b3d048 100644
--- a/l10ntools/source/idxdict/idxdict.cxx
+++ b/l10ntools/source/idxdict/idxdict.cxx
@@ -17,13 +17,11 @@
 
 const int MAXLINE = 1024*64;
 
-using namespace std;
-
 int main(int argc, char *argv[])
 {
 if (argc != 3 || strcmp(argv[1],"-o"))
 {
-cout << "Usage: idxdict -o outputfile < input\n";
+std::cout << "Usage: idxdict -o outputfile < input\n";
 ::exit(99);
 }
 // This call improves performance by approx 5x
@@ -31,27 +29,27 @@ int main(int argc, char *argv[])
 
 const char * outputFile(argv[2]);
 char inputBuffer[MAXLINE];
-multimap entries;
-multimap::iterator ret(entries.begin());
+std::multimap entries;
+std::multimap::iterator ret(entries.begin());
 
-cin.getline(inputBuffer, MAXLINE);
-const string encoding(inputBuffer);
+std::cin.getline(inputBuffer, MAXLINE);
+const std::string encoding(inputBuffer);
 size_t currentOffset(encoding.size()+1);
 while (true)
 {
 // Extract the next word, but not the entry count
-cin.getline(inputBuffer, MAXLINE, '|');
+std::cin.getline(inputBuffer, MAXLINE, '|');
 
-if (cin.eof()) break;
+if (std::cin.eof()) break;
 
-string word(inputBuffer);
-ret = entries.insert(ret, pair(word, 
currentOffset));
+std::string word(inputBuffer);
+ret = entries.insert(ret, std::pair(word, 
currentOffset));
 currentOffset += word.size() + 1;
 // Next is the entry count
-cin.getline(inputBuffer, MAXLINE);
-if (!cin.good())
+std::cin.getline(inputBuffer, MAXLINE);
+if (!std::cin.good())
 {
-cerr << "Unable to read entry - insufficient 
buffer?.\n";
+std::cerr << "Unable to read entry - insufficient 
buffer?.\n";
 exit(99);
 }
 currentOffset += strlen(inputBuffer)+1;
@@ -60,23 +58,23 @@ int main(int argc, char *argv[])
 int entryCount(strtol(inputBuffer, , 10));
 if (errno != 0 || endptr == inputBuffer || *endptr != '\0')
 {
-cerr
+std::cerr
 << "Unable to read count from \"" << inputBuffer
 << "\" input.\n";
 exit(99);
 }
 for (int i(0); i < entryCount; ++i)
 {
-cin.getline(inputBuffer, MAXLINE);
+std::cin.getline(inputBuffer, MAXLINE);
 currentOffset += strlen(inputBuffer)+1;
 }
 }
 
 // Use binary mode to prevent any translation of LF to CRLF on Windows
-ofstream outputStream(outputFile, ios_base::binary| 
ios_base::trunc|ios_base::out);
+std::ofstream outputStream(outputFile, std::ios_base::binary| 
std::ios_base::trunc|std::ios_base::out);
 if (!outputStream.is_open())
 {
-cerr << "Unable to open output file " << outputFile << endl;
+std::cerr << "Unable to open output file " << outputFile << 
std::endl;
 ::exit(99);
 }
 
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index cede7837bdd3..a5a1b2c3b3ef 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -45,8 +45,6 @@
 
 #include 
 
-using namespace std;
-
 namespace {
 
 bool matchList(
@@ -113,7 +111,7 @@ void handleCommand(
 const OString cmd = buf.makeStringAndClear();
 if 

[Libreoffice-commits] core.git: l10ntools/source

2021-09-22 Thread Stephan Bergmann (via logerrit)
 l10ntools/source/localize.cxx |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 047a983314b560e0f64280ae2ac7d696d90d539b
Author: Stephan Bergmann 
AuthorDate: Wed Sep 22 22:06:37 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Sep 23 07:26:09 2021 +0200

Extend loplugin:stringviewparam to starts/endsWith: l10ntools

Change-Id: I2c8c8e0fb034f79bb844a1d09defc3227324e686
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122494
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 38e9c21f3cac..cede7837bdd3 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -49,17 +50,17 @@ using namespace std;
 namespace {
 
 bool matchList(
-const OUString& rUrl, const std::u16string_view* pList, size_t nLength)
+std::u16string_view rUrl, const std::u16string_view* pList, size_t nLength)
 {
 for (size_t i = 0; i != nLength; ++i) {
-if (rUrl.endsWith(pList[i])) {
+if (o3tl::ends_with(rUrl, pList[i])) {
 return true;
 }
 }
 return false;
 }
 
-bool passesNegativeList(const OUString& rUrl) {
+bool passesNegativeList(std::u16string_view rUrl) {
 static const std::u16string_view list[] = {
 u"/desktop/test/deployment/passive/help/en/help.tree",
 u"/desktop/test/deployment/passive/help/en/main.xhp",
@@ -77,7 +78,7 @@ bool passesNegativeList(const OUString& rUrl) {
 return !matchList(rUrl, list, SAL_N_ELEMENTS(list));
 }
 
-bool passesPositiveList(const OUString& rUrl) {
+bool passesPositiveList(std::u16string_view rUrl) {
 static const std::u16string_view list[] = {
 u"/description.xml"
 };


[Libreoffice-commits] core.git: l10ntools/source

2021-06-18 Thread Stephan Bergmann (via logerrit)
 l10ntools/source/merge.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5fb7f66d240fec32a4751d331a215307ad994cbb
Author: Stephan Bergmann 
AuthorDate: Fri Jun 18 15:16:06 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jun 18 22:18:02 2021 +0200

Simplify a OUString construction

Change-Id: Ie7bf010f6864db19b7cc64761b34e203ce70784d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117458
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 02bfd9a74bbc..004cffacc494 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -94,7 +94,7 @@ namespace
 {
 //DOUBLE VERTICAL LINE instead of || because the translations make 
their
 //way into action_names under gtk3 where || is illegal
-return OUStringToOString(u"\x2016", RTL_TEXTENCODING_UTF8);
+return u8"\u2016";
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2021-06-03 Thread Stephan Bergmann (via logerrit)
 l10ntools/source/xmlparse.cxx |   17 +++--
 1 file changed, 3 insertions(+), 14 deletions(-)

New commits:
commit 268f27f6623334b81762b068f842c944a7541f25
Author: Stephan Bergmann 
AuthorDate: Thu Jun 3 14:13:33 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jun 3 16:13:24 2021 +0200

-Werror,-Wunused-but-set-variable (Clang 13 trunk)

sLanguage and sTmpStrVal are unused since
c9611c5e6465948de029e9c2fbd17e75ee07d31f "loplugin:unusedfields in
l10ntools..sax".  Simplify the for loop now that it only checks for a single
item, and expand the ID macro at its last remaining use.

Change-Id: I3cf6692fc5a4efd58d0df1dbc24b3610916b2fd1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116665
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index 4bd58b1a49f6..b7bc613613e2 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -38,7 +38,6 @@ using namespace std;
 using namespace osl;
 
 #define XML_LANG"xml-lang"
-#define ID  "id"
 
 
 
@@ -343,7 +342,7 @@ void XMLFile::InsertL10NElement( XMLElement* pElement )
 {
 const OString sTempStr((*pElement->GetAttributeList())[ j 
]->GetName());
 // Get the "id" Attribute
-if (sTempStr == ID)
+if (sTempStr == "id")
 {
 sId = (*pElement->GetAttributeList())[ j ]->GetValue();
 }
@@ -449,24 +448,14 @@ void XMLFile::SearchL10NElements( XMLChildNode *pCur )
 bool bInsert = true;
 XMLElement *pElement = static_cast(pCur);
 const OString sName(pElement->GetName().toAsciiLowerCase());
-OString sLanguage("en-US");
-OString sTmpStrVal;
 if ( pElement->GetAttributeList())
 {
 for ( size_t j = 0 , cnt = 
pElement->GetAttributeList()->size(); j < cnt && bInsert; ++j )
 {
-const OString sTmpStr = 
(*pElement->GetAttributeList())[j]->GetName();
-if (sTmpStr == ID)
-{
-sTmpStrVal=(*pElement->GetAttributeList())[ j 
]->GetValue();
-}
-if (sTmpStr == "localize")
+if ((*pElement->GetAttributeList())[j]->GetName() == 
"localize")
 {
 bInsert=false;
-}
-if (sTmpStr == XML_LANG) // Get the "xml-lang" 
Attribute
-{
-sLanguage=(*pElement->GetAttributeList())[ j 
]->GetValue();
+break;
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2021-01-29 Thread Dr. David Alan Gilbert (via logerrit)
 l10ntools/source/helpmerge.cxx |   14 +-
 1 file changed, 5 insertions(+), 9 deletions(-)

New commits:
commit 4c7332e5f439774363f29cc7d47494854cc981f5
Author: Dr. David Alan Gilbert 
AuthorDate: Sun Jan 24 19:01:34 2021 +
Commit: Noel Grandin 
CommitDate: Sat Jan 30 08:12:47 2021 +0100

HelpParser::ProcessHelp: Tidy Null checks

cppcheck spotted a repeated nullptr pair of if's near
the start that can be squashed.
Those gurantee that later pXMLElement is non-null, so
we don't need the test later.

Change-Id: Ie8fc24490ef031416709d55e6fbdd99e9853c4f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110157
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index e1beff7a5da4..8fed8ffcb452 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -200,9 +200,8 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const 
OString& sCur , ResDa
 if( pXMLElement == nullptr )
 {
 printf("Error: Can't find en-US entry\n");
-}
-if( pXMLElement == nullptr )
 return;
+}
 
 OString sNewText;
 OString sNewdata;
@@ -239,13 +238,10 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , 
const OString& sCur , ResDa
 }
 if (!sNewdata.isEmpty())
 {
-if( pXMLElement != nullptr )
-{
-XMLData *data = new XMLData( sNewdata , nullptr ); // Add new one
-pXMLElement->RemoveAndDeleteAllChildren();
-pXMLElement->AddChild( data );
-aLangHM->erase( sCur );
-}
+XMLData *data = new XMLData( sNewdata , nullptr ); // Add new one
+pXMLElement->RemoveAndDeleteAllChildren();
+pXMLElement->AddChild( data );
+aLangHM->erase( sCur );
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2021-01-27 Thread Christian Lohmaier (via logerrit)
 l10ntools/source/po.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit d5c2ae6031ff075aad0705c1955f82f59e331769
Author: Christian Lohmaier 
AuthorDate: Mon Jan 25 16:31:29 2021 +0100
Commit: Christian Lohmaier 
CommitDate: Wed Jan 27 14:42:16 2021 +0100

pocheck: don't require reference for stock labels

See d5d905b480c2a9b1db982f2867e87b5c230d1ab9 and related commits for the
rationale on why those are not extracted like other strings.

Change-Id: I2a339747626e0fb314cac7f57bccb2b91853249c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109916
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 5269b5e0f7f3..7b8a1cacb3c1 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -541,8 +541,11 @@ namespace
 // Check the validity of read entry
 bool lcl_CheckInputEntry(const GenPoEntry& rEntry)
 {
-return !rEntry.getReference().empty() &&
-   !rEntry.getMsgCtxt().isEmpty() &&
+// stock button labels don't have a reference/sourcefile - they are not 
extracted from ui files
+// (explicitly skipped by solenv/bin/uiex) but instead inserted by 
l10ntools/source/localize.cxx
+// into all module templates (see d5d905b480c2a9b1db982f2867e87b5c230d1ab9)
+return !rEntry.getMsgCtxt().isEmpty() &&
+   (rEntry.getMsgCtxt() == "stock" || !rEntry.getReference().empty()) 
&&
!rEntry.getMsgId().isEmpty();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2020-12-09 Thread Stephan Bergmann (via logerrit)
 l10ntools/source/merge.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit dbce9c45f5b59e69eac580f0931a39dabae25a81
Author: Stephan Bergmann 
AuthorDate: Wed Dec 9 10:51:06 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Dec 9 14:17:01 2020 +0100

Apparently, Windows doesn't have the concept of a set but empty env var

...so in an (implicitly) --disable-release-build build (where config_host.mk
contains a

  export ENABLE_RELEASE_BUILD=

line), getenv("ENABLE_RELEASE_BUILD") returns null, and after
a5484e496dcee9b110ef696101576a14b7a5a20e "Assert that certain env vars are 
set
in these build-time tools" e.g. `make CustomTarget_librelogo/locproperties`
started to fail with

> [build PRP] CustomTarget/librelogo/locproperties/LibreLogo_de.properties
> S=C:/lo/core && I=$S/instdir && W=$S/workdir &&   
MERGEINPUT=C:/cygwin64/tmp/gbuild.iDa6ga && 
PATH="C:\lo\core\instdir\program;C:\lo\core\instdir\program;$PATH"   
$W/LinkTarget/Executable/propex.exe -i 
$S/librelogo/source/pythonpath/LibreLogo_en_US.properties -o 
$W/CustomTarget/librelogo/locproperties/LibreLogo_de.properties -m 
${MERGEINPUT} -l de && rm -rf ${MERGEINPUT}
> Assertion failed: env != nullptr, file 
C:/lo/core/l10ntools/source/merge.cxx, line 117
> make[1]: *** [C:/lo/core/librelogo/CustomTarget_librelogo.mk:38: 
C:/lo/core/workdir/CustomTarget/librelogo/locproperties/LibreLogo_de.properties]
 Error 3

The other asserts added with a5484e496dcee9b110ef696101576a14b7a5a20e 
should be
OK, though:

* SRC_ROOT should never be empty.

* WORKDIR_FOR_BUILD could presumably be empty in a cross-compilation build
  ($cross_compile = yes in configure.ac), but the code in
  l10ntools/source/localize.cxx apparently expects WORKDIR_FOR_BUILD not to 
be
  empty anyway.  (And at least in a nominally cross-compilation build with
  --host=i686-pc-cygwin on Windows x64, $cross-compile is
  left empty in configure.ac and WORKDIR_FOR_BUILD is set to a non-empty 
value.)

* ALL_LANGS should never be empty given how it is set in configure.ac, even 
if
  the code in l10ntools/source/pocheck.cxx contains an explicit

if( aLanguages.isEmpty() )

  check.

Change-Id: I06b216587f5d76e4b5d5abc748ff34308f2e9dbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107462
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index b94bb7c84fc8..694e48f23f4f 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -21,7 +21,6 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -114,8 +113,7 @@ MergeDataFile::MergeDataFile(
 bool bCaseSensitive, bool bWithQtz )
 {
 auto const env = getenv("ENABLE_RELEASE_BUILD");
-assert(env != nullptr);
-OString sEnableReleaseBuild(env);
+OString sEnableReleaseBuild(env == nullptr ? "" : env);
 
 std::ifstream aInputStream( rFileName.getStr() );
 if ( !aInputStream.is_open() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2020-12-08 Thread Stephan Bergmann (via logerrit)
 l10ntools/source/localize.cxx |9 +++--
 l10ntools/source/merge.cxx|5 -
 l10ntools/source/pocheck.cxx  |7 ++-
 3 files changed, 17 insertions(+), 4 deletions(-)

New commits:
commit a5484e496dcee9b110ef696101576a14b7a5a20e
Author: Stephan Bergmann 
AuthorDate: Tue Dec 8 14:19:00 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Dec 8 16:03:47 2020 +0100

Assert that certain env vars are set in these build-time tools

All of those env vars are exported from config_host.mk or 
config_host_lang.mk.

The asserts guard potential future changes from using OString to using
std::string_view, where OString has an undocumented feature of allowing
construction from a null pointer.

Change-Id: I7bb2217fb1d38300bf169b17e9e72dafc6970b2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107414
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 402403a8e5ea..17ad73f3b2a4 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -19,6 +19,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -90,12 +91,16 @@ void handleCommand(
 OStringBuffer buf;
 if (rExecutable == "uiex" || rExecutable == "hrcex")
 {
-buf.append(OString(getenv("SRC_ROOT")));
+auto const env = getenv("SRC_ROOT");
+assert(env != nullptr);
+buf.append(OString(env));
 buf.append("/solenv/bin/");
 }
 else
 {
-buf.append(OString(getenv("WORKDIR_FOR_BUILD")));
+auto const env = getenv("WORKDIR_FOR_BUILD");
+assert(env != nullptr);
+buf.append(OString(env));
 buf.append("/LinkTarget/Executable/");
 }
 buf.append(rExecutable.data());
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 75afdf77b9a6..b94bb7c84fc8 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -21,6 +21,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -112,7 +113,9 @@ MergeDataFile::MergeDataFile(
 const OString , const OString ,
 bool bCaseSensitive, bool bWithQtz )
 {
-OString sEnableReleaseBuild(getenv("ENABLE_RELEASE_BUILD"));
+auto const env = getenv("ENABLE_RELEASE_BUILD");
+assert(env != nullptr);
+OString sEnableReleaseBuild(env);
 
 std::ifstream aInputStream( rFileName.getStr() );
 if ( !aInputStream.is_open() )
diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx
index 1e7c951863be..0dcb2d0dcef9 100644
--- a/l10ntools/source/pocheck.cxx
+++ b/l10ntools/source/pocheck.cxx
@@ -7,6 +7,9 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+
+#include 
 #include 
 #include 
 #include 
@@ -395,7 +398,9 @@ int main()
 {
 try
 {
-OString aLanguages(getenv("ALL_LANGS"));
+auto const env = getenv("ALL_LANGS");
+assert(env != nullptr);
+OString aLanguages(env);
 if( aLanguages.isEmpty() )
 {
 std::cerr << "Usage: LD_LIBRARY_PATH=instdir/program make cmd 
cmd=workdir/LinkTarget/Executable/pocheck\n";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2020-12-08 Thread Stephan Bergmann (via logerrit)
 l10ntools/source/pocheck.cxx |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit c13909b415d701b4618d645b98d314974a25ee57
Author: Stephan Bergmann 
AuthorDate: Tue Dec 8 13:53:20 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Dec 8 15:35:54 2020 +0100

Use OString::Concat(...) + ... instead of ... + OStringLiteral(...)

...in some places

Change-Id: Ia1d6135c89bcc18d436d8c0d353ca93195dda432
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107412
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx
index 6f3252451dfa..1e7c951863be 100644
--- a/l10ntools/source/pocheck.cxx
+++ b/l10ntools/source/pocheck.cxx
@@ -22,8 +22,8 @@ static void checkStyleNames(const OString& aLanguage)
 std::map aLocalizedNumStyleNames;
 std::vector repeatedEntries;
 
-OString aPoPath = getenv("SRC_ROOT") +
-  OStringLiteral("/translations/source/") +
+OString aPoPath = OString::Concat(getenv("SRC_ROOT")) +
+  "/translations/source/" +
   aLanguage + "/sw/messages.po";
 PoIfstream aPoInput;
 aPoInput.open(aPoPath);
@@ -144,8 +144,8 @@ static void checkFunctionNames(const OString& aLanguage)
 OString aPoPaths[2];
 OUString aPoPathURL;
 
-aPoPaths[0] = getenv("SRC_ROOT") +
-  OStringLiteral("/translations/source/") +
+aPoPaths[0] = OString::Concat(getenv("SRC_ROOT")) +
+  "/translations/source/" +
   aLanguage +
   "/formula/messages.po";
 PoIfstream aPoInput;
@@ -180,8 +180,8 @@ static void checkFunctionNames(const OString& aLanguage)
 }
 aPoInput.close();
 
-aPoPaths[1] = getenv("SRC_ROOT") +
-OStringLiteral("/translations/source/") +
+aPoPaths[1] = OString::Concat(getenv("SRC_ROOT")) +
+"/translations/source/" +
 aLanguage +
 "/scaddins/messages.po";
 aPoInput.open(aPoPaths[1]);
@@ -290,8 +290,8 @@ static void checkFunctionNames(const OString& aLanguage)
 // with '|', too.
 static void checkVerticalBar(const OString& aLanguage)
 {
-OString aPoPath = getenv("SRC_ROOT") +
-  OStringLiteral("/translations/source/") +
+OString aPoPath = OString::Concat(getenv("SRC_ROOT")) +
+  "/translations/source/" +
   aLanguage +
   
"/instsetoo_native/inc_openoffice/windows/msi_languages.po";
 PoIfstream aPoInput;
@@ -343,8 +343,8 @@ static void checkVerticalBar(const OString& aLanguage)
 // must not contain spaces
 static void checkMathSymbolNames(const OString& aLanguage)
 {
-OString aPoPath = getenv("SRC_ROOT") +
-  OStringLiteral("/translations/source/") +
+OString aPoPath = OString::Concat(getenv("SRC_ROOT")) +
+  "/translations/source/" +
   aLanguage +
   "/starmath/messages.po";
 PoIfstream aPoInput;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source scp2/source solenv/inc

2020-06-24 Thread Christian Lohmaier (via logerrit)
 l10ntools/source/ulfconv/msi-encodinglist.txt |1 +
 scp2/source/ooo/module_langpack.ulf   |6 ++
 solenv/inc/langlist.mk|1 +
 3 files changed, 8 insertions(+)

New commits:
commit 030c17b538e133e89f20d52e8d11ef07354d4afc
Author: Christian Lohmaier 
AuthorDate: Wed Jun 24 12:13:29 2020 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Jun 24 15:36:39 2020 +0200

add Central Kurdish (ckb) language pack

Change-Id: I007edc0e339bd9cfd8caf95ecc954628d450664f

diff --git a/l10ntools/source/ulfconv/msi-encodinglist.txt 
b/l10ntools/source/ulfconv/msi-encodinglist.txt
index 062988a85de5..eaa1754cf538 100644
--- a/l10ntools/source/ulfconv/msi-encodinglist.txt
+++ b/l10ntools/source/ulfconv/msi-encodinglist.txt
@@ -39,6 +39,7 @@ brx  0  1603   # Bodo (India)
 bs   0  5146   # bosnian
 ca   0  1027   # Catalan
 ca-valencia 0  2051   # Catalan Valencian
+ckb  0  1170   # Central Kurdish (Sorani)
 cs   0  1029   # Czech
 cy   0  1106   # Welsh
 da   0  1030
diff --git a/scp2/source/ooo/module_langpack.ulf 
b/scp2/source/ooo/module_langpack.ulf
index 7cea9be5d0a8..ecfedfb5c337 100644
--- a/scp2/source/ooo/module_langpack.ulf
+++ b/scp2/source/ooo/module_langpack.ulf
@@ -166,6 +166,12 @@ en-US = "Thai"
 [STR_DESC_MODULE_LANGPACK_TH]
 en-US = "Installs the Thai user interface"
 
+[STR_NAME_MODULE_LANGPACK_CKB]
+en-US = "Central Kurdish"
+
+[STR_DESC_MODULE_LANGPACK_CKB]
+en-US = "Installs the Central Kurdish user interface"
+
 [STR_NAME_MODULE_LANGPACK_CS]
 en-US = "Czech"
 
diff --git a/solenv/inc/langlist.mk b/solenv/inc/langlist.mk
index c087091c9941..54e2666fc8a9 100644
--- a/solenv/inc/langlist.mk
+++ b/solenv/inc/langlist.mk
@@ -32,6 +32,7 @@ brx \
 bs \
 ca \
 ca-valencia \
+ckb \
 cs \
 cy \
 da \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2020-06-15 Thread Julien Nabet (via logerrit)
 l10ntools/source/treemerge.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8ce99faaf6714748b0d9912fb7d60f19e1b7d399
Author: Julien Nabet 
AuthorDate: Sun Jun 14 22:35:01 2020 +0200
Commit: Noel Grandin 
CommitDate: Mon Jun 15 09:15:47 2020 +0200

Don't return too early, clean vars first (l10ntools/treemerge)

Change-Id: Ib99e0897fa36bdd0c8d805e38e77c3d626c0569a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96302
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/l10ntools/source/treemerge.cxx b/l10ntools/source/treemerge.cxx
index b430575bb693..933edb79fad1 100644
--- a/l10ntools/source/treemerge.cxx
+++ b/l10ntools/source/treemerge.cxx
@@ -131,7 +131,7 @@ namespace
 std::cerr
 << "Treex error: Cannot find title in "
 << sXhpPath << std::endl;
-return nullptr;
+pReturn = nullptr;
 }
 xmlFreeDoc( pXhpFile );
 xmlCleanupParser();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2020-06-10 Thread Julien Nabet (via logerrit)
 l10ntools/source/treemerge.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 98d1b2502cece3a5bd8c5a0a040b4e20327a8560
Author: Julien Nabet 
AuthorDate: Sun Jun 7 14:11:22 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 10 13:47:02 2020 +0200

Use xmlFreeDoc since pXhpFile is a xmlDocPtr (l10ntools/treemerge)

Change-Id: I32fb8824aa91464d2198c76ba9357c82ec87a0ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95666
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/l10ntools/source/treemerge.cxx b/l10ntools/source/treemerge.cxx
index b6d246317b23..b430575bb693 100644
--- a/l10ntools/source/treemerge.cxx
+++ b/l10ntools/source/treemerge.cxx
@@ -133,7 +133,7 @@ namespace
 << sXhpPath << std::endl;
 return nullptr;
 }
-xmlFree( pXhpFile );
+xmlFreeDoc( pXhpFile );
 xmlCleanupParser();
 }
 return pReturn;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source linguistic/source oox/source package/source

2020-04-15 Thread Noel Grandin (via logerrit)
 l10ntools/source/merge.cxx|6 --
 linguistic/source/dicimp.cxx  |   10 --
 linguistic/source/hyphdsp.hxx |   10 ++
 linguistic/source/misc.cxx|8 +++-
 linguistic/source/spelldsp.hxx|   10 ++
 linguistic/source/thesdsp.hxx |5 +++--
 oox/source/dump/dumperbase.cxx|4 +++-
 package/source/zipapi/XUnbufferedStream.cxx   |7 ---
 package/source/zippackage/ZipPackageEntry.cxx |6 --
 9 files changed, 41 insertions(+), 25 deletions(-)

New commits:
commit 076fa17b5c04dc7afe593132c00ad9e57dd486f8
Author: Noel Grandin 
AuthorDate: Wed Apr 15 09:11:54 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Apr 15 19:25:53 2020 +0200

loplugin:buriedassign in l,o,p*

Change-Id: Ib2dd157d43c4387eda009475311761fe2eb627cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92241
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 60d88b927c1b..75afdf77b9a6 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -196,8 +196,10 @@ MergeDataFile::MergeDataFile(
 bSkipCurrentPOFile = true;
 break;
 }
-} while( !aPoInput.eof() &&
-( bInSameComp = PoEntry::IsInSameComp(aActPo, aNextPo) ) );
+if (aPoInput.eof())
+break;
+bInSameComp = PoEntry::IsInSameComp(aActPo, aNextPo);
+} while( bInSameComp );
 
 InsertEntry(
 aActPo.getResourceType(), aActPo.getGroupId(),
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index cae5f9871858..de8d5326c22a 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -542,8 +542,11 @@ int DictionaryNeo::cmpDicEntry(const OUString& rWord1,
 {
 // skip chars to be ignored
 IgnState = false;
-while (nIdx1 < nLen1  &&  ((cChar1 = rWord1[ nIdx1 ]) == cIgnChar || 
cChar1 == cIgnBeg || IgnState ))
+while (nIdx1 < nLen1)
 {
+cChar1 = rWord1[ nIdx1 ];
+if (cChar1 != cIgnChar && cChar1 != cIgnBeg && !IgnState )
+break;
 if ( cChar1 == cIgnBeg )
 IgnState = true;
 else if (cChar1 == cIgnEnd)
@@ -552,8 +555,11 @@ int DictionaryNeo::cmpDicEntry(const OUString& rWord1,
 nNumIgnChar1++;
 }
 IgnState = false;
-while (nIdx2 < nLen2  &&  ((cChar2 = rWord2[ nIdx2 ]) == cIgnChar || 
cChar2 == cIgnBeg || IgnState ))
+while (nIdx2 < nLen2)
 {
+cChar2 = rWord2[ nIdx2 ];
+if (cChar2 != cIgnChar && cChar2 != cIgnBeg && !IgnState )
+break;
 if ( cChar2 == cIgnBeg )
 IgnState = true;
 else if (cChar2 == cIgnEnd)
diff --git a/linguistic/source/hyphdsp.hxx b/linguistic/source/hyphdsp.hxx
index 938ab2758597..0061e9255401 100644
--- a/linguistic/source/hyphdsp.hxx
+++ b/linguistic/source/hyphdsp.hxx
@@ -111,16 +111,18 @@ public:
 inline css::uno::Reference< css::linguistic2::XLinguProperties >
 HyphenatorDispatcher::GetPropSet()
 {
-return xPropSet.is() ?
-xPropSet : xPropSet = ::linguistic::GetLinguProperties();
+if (!xPropSet.is())
+xPropSet = ::linguistic::GetLinguProperties();
+return xPropSet;
 }
 
 
 inline css::uno::Reference< css::linguistic2::XSearchableDictionaryList >
 HyphenatorDispatcher::GetDicList()
 {
-return xDicList.is() ?
-xDicList : xDicList = ::linguistic::GetDictionaryList();
+if (!xDicList.is())
+xDicList = ::linguistic::GetDictionaryList();
+return xDicList;
 }
 
 
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index eb10b709e21d..87cdb02721c7 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -290,11 +290,9 @@ uno::Reference< XDictionaryEntry > SearchDicList(
 if (   (!bSearchPosDics  &&  eType == DictionaryType_NEGATIVE)
 || ( bSearchPosDics  &&  eType == DictionaryType_POSITIVE))
 {
-if ( (xEntry = axDic->getEntry( rWord )).is() )
-{
-if (bSearchSpellEntry || lcl_HasHyphInfo( xEntry ))
-break;
-}
+xEntry = axDic->getEntry( rWord );
+if ( xEntry.is() && (bSearchSpellEntry || lcl_HasHyphInfo( 
xEntry )) )
+break;
 xEntry = nullptr;
 }
 }
diff --git a/linguistic/source/spelldsp.hxx b/linguistic/source/spelldsp.hxx
index f9a30634d9ef..492321527595 100644
--- a/linguistic/source/spelldsp.hxx
+++ b/linguistic/source/spelldsp.hxx
@@ -121,16 +121,18 @@ inline linguistic::SpellCache & 

[Libreoffice-commits] core.git: l10ntools/source

2020-04-07 Thread Noel Grandin (via logerrit)
 l10ntools/source/cfgmerge.cxx  |   77 ++--
 l10ntools/source/helpmerge.cxx |  110 -
 l10ntools/source/lngmerge.cxx  |   34 ++--
 l10ntools/source/xmlparse.cxx  |   56 ++--
 4 files changed, 139 insertions(+), 138 deletions(-)

New commits:
commit 6a2d03e7c796ad90c4d9d134ad1a91d527953c66
Author: Noel Grandin 
AuthorDate: Tue Apr 7 10:58:29 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Apr 7 13:11:10 2020 +0200

loplugin:flatten in l10ntools

Change-Id: Ib1f698eddea1da2a6e06e17d1c4fec9ef717e132
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91804
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index ae75f973724f..e02e497d5d21 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -347,29 +347,30 @@ CfgExport::~CfgExport()
 
 void CfgExport::WorkOnResourceEnd()
 {
-if ( bLocalize ) {
-if ( !pStackData->sText["en-US"].isEmpty() )
-{
-OString sXComment = pStackData->sText[OString("x-comment")];
-OString sLocalId = pStackData->sIdentifier;
-OString sGroupId;
-if ( aStack.size() == 1 ) {
-sGroupId = sLocalId;
-sLocalId = "";
-}
-else {
-sGroupId = aStack.GetAccessPath( aStack.size() - 2 );
-}
+if ( !bLocalize )
+return;
+
+if ( pStackData->sText["en-US"].isEmpty() )
+return;
+
+OString sXComment = pStackData->sText[OString("x-comment")];
+OString sLocalId = pStackData->sIdentifier;
+OString sGroupId;
+if ( aStack.size() == 1 ) {
+sGroupId = sLocalId;
+sLocalId = "";
+}
+else {
+sGroupId = aStack.GetAccessPath( aStack.size() - 2 );
+}
 
 
-OString sText = pStackData->sText[ "en-US" ];
-sText = helper::UnQuotHTML( sText );
+OString sText = pStackData->sText[ "en-US" ];
+sText = helper::UnQuotHTML( sText );
 
-common::writePoEntry(
-"Cfgex", pOutputStream, sPath, pStackData->sResTyp,
-sGroupId, sLocalId, sXComment, sText);
-}
-}
+common::writePoEntry(
+"Cfgex", pOutputStream, sPath, pStackData->sResTyp,
+sGroupId, sLocalId, sXComment, sText);
 }
 
 void CfgExport::WorkOnText(
@@ -418,27 +419,27 @@ CfgMerge::~CfgMerge()
 
 void CfgMerge::WorkOnText(OString &, const OString& rLangIndex)
 {
-
-if ( pMergeDataFile && bLocalize ) {
-if ( !pResData ) {
-OString sLocalId = pStackData->sIdentifier;
-OString sGroupId;
-if ( aStack.size() == 1 ) {
-sGroupId = sLocalId;
-sLocalId.clear();
-}
-else {
-sGroupId = aStack.GetAccessPath( aStack.size() - 2 );
-}
-
-pResData.reset( new ResData( sGroupId, sFilename ) );
-pResData->sId = sLocalId;
-pResData->sResTyp = pStackData->sResTyp;
+if ( !(pMergeDataFile && bLocalize) )
+return;
+
+if ( !pResData ) {
+OString sLocalId = pStackData->sIdentifier;
+OString sGroupId;
+if ( aStack.size() == 1 ) {
+sGroupId = sLocalId;
+sLocalId.clear();
+}
+else {
+sGroupId = aStack.GetAccessPath( aStack.size() - 2 );
 }
 
-if (rLangIndex.equalsIgnoreAsciiCase("en-US"))
-bEnglish = true;
+pResData.reset( new ResData( sGroupId, sFilename ) );
+pResData->sId = sLocalId;
+pResData->sResTyp = pStackData->sResTyp;
 }
+
+if (rLangIndex.equalsIgnoreAsciiCase("en-US"))
+bEnglish = true;
 }
 
 void CfgMerge::Output(const OString& rOutput)
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index ee442e91475b..abab8a5a03a1 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -194,67 +194,67 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , 
const OString& sCur , ResDa
 XMLElement*   pXMLElement = nullptr;
 MergeEntrys   *pEntrys= nullptr;
 
-if( !sCur.equalsIgnoreAsciiCase("en-US") ){
-pXMLElement = (*aLangHM)[ "en-US" ];
-if( pXMLElement == nullptr )
+if( sCur.equalsIgnoreAsciiCase("en-US") )
+return;
+
+pXMLElement = (*aLangHM)[ "en-US" ];
+if( pXMLElement == nullptr )
+{
+printf("Error: Can't find en-US entry\n");
+}
+if( pXMLElement == nullptr )
+return;
+
+OString sNewText;
+OString sNewdata;
+OString sSourceText(
+pXMLElement->ToOString().
+replaceAll(
+"\n",
+OString()).
+replaceAll(
+"\t",
+OString()));
+// re-add spaces to the beginning of translated string,
+// important for indentation of Basic code 

[Libreoffice-commits] core.git: l10ntools/source unoidl/source

2020-02-03 Thread Luboš Luňák (via logerrit)
 l10ntools/source/cfglex.l  |1 +
 l10ntools/source/xrmlex.l  |1 +
 unoidl/source/sourceprovider-scanner.l |2 ++
 3 files changed, 4 insertions(+)

New commits:
commit cb65745a05a0d92c8a297c2b25789f4f4faa610e
Author: Luboš Luňák 
AuthorDate: Mon Feb 3 13:54:02 2020 +0100
Commit: Luboš Luňák 
CommitDate: Mon Feb 3 16:33:20 2020 +0100

avoid flex-caused warnings about unused functions

Change-Id: If6a028efbf2403fd92dcab914ae3197d34579392
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87869
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/l10ntools/source/cfglex.l b/l10ntools/source/cfglex.l
index bea165204338..1bac5a32d53d 100644
--- a/l10ntools/source/cfglex.l
+++ b/l10ntools/source/cfglex.l
@@ -55,6 +55,7 @@ static int bText=0;
 %}
 
 %option yylineno
+%option nounput
 %option never-interactive
 
 %p 24000
diff --git a/l10ntools/source/xrmlex.l b/l10ntools/source/xrmlex.l
index 57d6e3e38b1c..0644a5bc2815 100644
--- a/l10ntools/source/xrmlex.l
+++ b/l10ntools/source/xrmlex.l
@@ -51,6 +51,7 @@ static int bText=0;
 %}
 
 %option yylineno
+%option nounput
 %option never-interactive
 
 %p 24000
diff --git a/unoidl/source/sourceprovider-scanner.l 
b/unoidl/source/sourceprovider-scanner.l
index 1c80c9e6d5b4..27a51dd9 100644
--- a/unoidl/source/sourceprovider-scanner.l
+++ b/unoidl/source/sourceprovider-scanner.l
@@ -13,6 +13,8 @@
 %option never-interactive
 %option nounistd
 %option noyywrap
+%option noinput
+%option nounput
 %option reentrant
 %option warn
 %option yylineno
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2019-10-02 Thread Christian Lohmaier (via logerrit)
 l10ntools/source/pocheck.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit abe0291cdddc9709b82d16c8aa0a0a126430d828
Author: Christian Lohmaier 
AuthorDate: Wed Oct 2 23:33:22 2019 +0200
Commit: Christian Lohmaier 
CommitDate: Wed Oct 2 23:36:51 2019 +0200

pocheck: also preserve header in check for function names

Change-Id: I53b67e8c690b110d2d77e100b8170ac968e35e2b

diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx
index 423f7246663f..e080138ed3fc 100644
--- a/l10ntools/source/pocheck.cxx
+++ b/l10ntools/source/pocheck.cxx
@@ -149,7 +149,8 @@ static void checkFunctionNames(const OString& aLanguage)
   aLanguage +
   "/formula/messages.po";
 PoIfstream aPoInput;
-aPoInput.open(aPoPaths[0]);
+OString sPoHdrMsg;
+aPoInput.open(aPoPaths[0], sPoHdrMsg);
 if( !aPoInput.isOpen() )
 {
 std::cerr << "Warning: Cannot open " << aPoPaths[0] << std::endl;
@@ -237,13 +238,13 @@ static void checkFunctionNames(const OString& aLanguage)
 {
 case 0:
 {
-PoHeader hd("formula/inc");
+PoHeader hd("formula/inc", sPoHdrMsg);
 aPoOutput.writeHeader(hd);
 break;
 }
 case 1:
 {
-PoHeader hd("scaddins/inc");
+PoHeader hd("scaddins/inc", sPoHdrMsg);
 aPoOutput.writeHeader(hd);
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: l10ntools/source oox/AllLangMoTarget_oox.mk oox/inc oox/Library_oox.mk oox/Module_oox.mk oox/source Repository.mk

2019-07-09 Thread Gabor Kelemen (via logerrit)
 Repository.mk  |1 +
 l10ntools/source/localize.cxx  |1 +
 oox/AllLangMoTarget_oox.mk |   14 ++
 oox/Library_oox.mk |1 +
 oox/Module_oox.mk  |4 
 oox/inc/ooxresid.hxx   |   19 +++
 oox/inc/strings.hrc|   18 ++
 oox/source/drawingml/chart/chartspaceconverter.cxx |4 +++-
 oox/source/helper/ooxresid.cxx |   19 +++
 9 files changed, 80 insertions(+), 1 deletion(-)

New commits:
commit 41d743310d7388cded40872364c9fc44082c7d6e
Author: Gabor Kelemen 
AuthorDate: Thu Jun 27 15:35:42 2019 +0200
Commit: Andras Timar 
CommitDate: Tue Jul 9 11:37:03 2019 +0200

tdf#126030 Translate automatic chart title in OOXML charts

Add l10n support to oox module to achieve this

Change-Id: I7bece62bdf5ef0f0d1ef424074f16cef94649d77
Reviewed-on: https://gerrit.libreoffice.org/74819
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/Repository.mk b/Repository.mk
index 2febae16202f..5717370c3be3 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -1122,6 +1122,7 @@ $(eval $(call gb_Helper_register_mos,\
$(call gb_Helper_optional,DESKTOP,fps) \
frm \
fwk \
+   oox \
pcr \
rpt \
$(call gb_Helper_optional,SCRIPTING,sb) \
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 24dbe8f73e3f..ee268cf11782 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -281,6 +281,7 @@ bool includeProject(const OString& rProject) {
 "mysqlc",
 "nlpsolver",
 "officecfg",
+"oox",
 "readlicense_oo",
 "reportbuilder",
 "reportdesign",
diff --git a/oox/AllLangMoTarget_oox.mk b/oox/AllLangMoTarget_oox.mk
new file mode 100644
index ..c2a733faf7bd
--- /dev/null
+++ b/oox/AllLangMoTarget_oox.mk
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 
100 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_AllLangMoTarget_AllLangMoTarget,oox))
+
+$(eval $(call gb_AllLangMoTarget_set_polocation,oox,oox))
+
+# vim: set noet sw=4 ts=4:
\ No newline at end of file
diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
index 2d4718a320cb..7b5a26866f5d 100644
--- a/oox/Library_oox.mk
+++ b/oox/Library_oox.mk
@@ -224,6 +224,7 @@ $(eval $(call gb_Library_add_exception_objects,oox,\
 oox/source/helper/graphichelper \
 oox/source/helper/grabbagstack \
 oox/source/helper/modelobjecthelper \
+oox/source/helper/ooxresid \
 oox/source/helper/progressbar \
 oox/source/helper/propertymap \
 oox/source/helper/propertyset \
diff --git a/oox/Module_oox.mk b/oox/Module_oox.mk
index db79a0f8e093..1f906231e981 100644
--- a/oox/Module_oox.mk
+++ b/oox/Module_oox.mk
@@ -16,6 +16,10 @@ $(eval $(call gb_Module_add_targets,oox,\
Package_generated \
 ))
 
+$(eval $(call gb_Module_add_l10n_targets,oox,\
+   AllLangMoTarget_oox \
+))
+
 $(eval $(call gb_Module_add_check_targets,oox,\
CppunitTest_oox_tokenmap \
CppunitTest_oox_vba_compression \
diff --git a/oox/inc/ooxresid.hxx b/oox/inc/ooxresid.hxx
new file mode 100644
index ..ed51b317269b
--- /dev/null
+++ b/oox/inc/ooxresid.hxx
@@ -0,0 +1,19 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_OOX_INC_RESID_HXX
+#define INCLUDED_OOX_INC_RESID_HXX
+
+#include 
+#include 
+
+OOX_DLLPUBLIC OUString OoxResId(const char* pId);
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
\ No newline at end of file
diff --git a/oox/inc/strings.hrc b/oox/inc/strings.hrc
new file mode 100644
index ..dcb0744d593f
--- /dev/null
+++ b/oox/inc/strings.hrc
@@ -0,0 +1,18 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef OOX_STRINGS_HRC
+#define OOX_STRINGS_HRC
+
+#define NC_(Context, String) 

[Libreoffice-commits] core.git: l10ntools/source

2019-07-04 Thread Julien Nabet (via logerrit)
 l10ntools/source/treemerge.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 70d9e2db8a53a994e323dbb07d42eaebaf5008af
Author: Julien Nabet 
AuthorDate: Thu Jul 4 18:51:07 2019 +0200
Commit: Julien Nabet 
CommitDate: Thu Jul 4 21:52:12 2019 +0200

cid#1448320: Resource leak in object (l10ntools/treemerge)

Change-Id: I9d09d690e003d73878ef2e30da11cf079d0db441
Reviewed-on: https://gerrit.libreoffice.org/75098
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/l10ntools/source/treemerge.cxx b/l10ntools/source/treemerge.cxx
index 65916d12d3e2..b6d246317b23 100644
--- a/l10ntools/source/treemerge.cxx
+++ b/l10ntools/source/treemerge.cxx
@@ -221,6 +221,9 @@ TreeParser::TreeParser(
 
 TreeParser::~TreeParser()
 {
+// be sure m_pSource is freed
+if (m_bIsInitialized)
+xmlFreeDoc( m_pSource );
 }
 
 void TreeParser::Extract( const OString& rPOFile )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: l10ntools/source

2019-06-27 Thread Eike Rathke (via logerrit)
 l10ntools/source/xmlparse.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 49538c5bcd3cfa933b73d471ef4825ca793ad910
Author: Eike Rathke 
AuthorDate: Thu Jun 27 19:24:44 2019 +0200
Commit: Eike Rathke 
CommitDate: Thu Jun 27 22:19:20 2019 +0200

Ditch "using namespace U_ICU_NAMESPACE;", qualify icu:: instead

geez.. for two places..

Change-Id: I4855fc92290547b0e1ca6ff5b2f10a333c6caa3f
Reviewed-on: https://gerrit.libreoffice.org/74815
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index b6df209ed896..088729aaf051 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -33,7 +33,6 @@
 #include 
 #include 
 
-using namespace U_ICU_NAMESPACE;
 using namespace std;
 using namespace osl;
 
@@ -1082,14 +1081,14 @@ OString XMLUtil::QuotHTML( const OString  )
 UErrorCode nIcuErr = U_ZERO_ERROR;
 static const sal_uInt32 nSearchFlags =
 UREGEX_DOTALL | UREGEX_CASE_INSENSITIVE;
-static const UnicodeString sSearchPat( "<[/]\?\?[a-z_-]+?(?:| 
+[a-z]+?=\".*?\") *[/]\?\?>" );
+static const icu::UnicodeString sSearchPat( "<[/]\?\?[a-z_-]+?(?:| 
+[a-z]+?=\".*?\") *[/]\?\?>" );
 
 const OUString sOUSource = OStringToOUString(rString, 
RTL_TEXTENCODING_UTF8);
 icu::UnicodeString sSource(
 reinterpret_cast(
 sOUSource.getStr()), sOUSource.getLength() );
 
-RegexMatcher aRegexMatcher( sSearchPat, nSearchFlags, nIcuErr );
+icu::RegexMatcher aRegexMatcher( sSearchPat, nSearchFlags, nIcuErr );
 aRegexMatcher.reset( sSource );
 
 icu::UnicodeString sReturn;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: l10ntools/source

2019-04-29 Thread Eike Rathke (via logerrit)
 l10ntools/source/ulfconv/msi-encodinglist.txt |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 0dcbc797a6cf7dc58ad17aae20bf0ccc7973cab1
Author: Eike Rathke 
AuthorDate: Mon Apr 29 16:02:55 2019 +0200
Commit: Eike Rathke 
CommitDate: Mon Apr 29 19:40:02 2019 +0200

Related: tdf#82184 correct wrong or obsoleted LCIDs for MSI

This solves the cases of Oromo, Kinyarwanda and Sinhala.

Kabyle is a problem on its own and apparently not easily solvable, see
attempts in https://gerrit.libreoffice.org/71247

Change-Id: Id001aeba07a95f283b4cd6057c1f6e8088de940a
Reviewed-on: https://gerrit.libreoffice.org/71535
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/l10ntools/source/ulfconv/msi-encodinglist.txt 
b/l10ntools/source/ulfconv/msi-encodinglist.txt
index 96f87341ae13..3c98165caae8 100644
--- a/l10ntools/source/ulfconv/msi-encodinglist.txt
+++ b/l10ntools/source/ulfconv/msi-encodinglist.txt
@@ -80,7 +80,7 @@ it   0  1040
 ja   0  1041
 jbo  0  1624
 ka   0  1079   # Georgian
-kab  0  1625
+kab  0  1625   # Kabyle
 kk   0  1087
 km   0  1107   # Khmer
 kmr-Latn 0  1574
@@ -116,7 +116,7 @@ nr   0  1580   # Ndebele South
 nso  0  1132
 ny   0  1598
 oc   0  1154   # Occitan-lengadocian
-om   0  2162
+om   0  1138   # Oromo
 or   0  1096   # Odia
 or-IN0  1096
 pa-IN0  1094   # Punjabi
@@ -130,13 +130,13 @@ qtz  0  1638   # key id pseudo language
 rm   0  1047   # Raeto-Romance
 ro   0  1048   # Romanian
 ru   0  1049
-rw   0  1569   # Kinyarwanda
+rw   0  1159   # Kinyarwanda
 sa-IN0  1103   # Sanskrit
 sat  0  1606   # Santali
 sb   0  1070   # Sorbian
 sc   0  3047
 sd   0  1113   # Sindhi
-si   0  2133
+si   0  1115   # Sinhala
 sid  0  1669   # Sidama, fake LCID
 sk   0  1051   # Slovak
 sl   0  1060   # Slovenian
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: l10ntools/source

2019-04-24 Thread Mike Kaganski (via logerrit)
 l10ntools/source/ulfconv/msi-encodinglist.txt |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5dea045b87a923654d6876acec947d973e0df4bc
Author: Mike Kaganski 
AuthorDate: Wed Apr 24 16:22:59 2019 +0200
Commit: Mike Kaganski 
CommitDate: Wed Apr 24 16:45:28 2019 +0200

tdf#124791: Fix Gaelic (Scotland) (gd-GB) LCID in MSI installer

... which was obviously omitted in commit
6b678c135da07f34da1bf7b19562366361e95085, which introduced the correct
value of 0x0491 (1169) in addition to the pre-existing 0x043C (1084).
The new value is used when user sets relevant entry in Region and
Language control panel applet (intl.cpl); having the old value in MSI
summary information blocks auto-detection of proper installer language.

[MS-LCID] Appendix A mentions that the new code is available since Win7,
so we are good with the fix.

[MS-LCID] 
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c

Co-authored-by: Eike Rathke 

Change-Id: Ic03b0e8eaf145c662fde48846cd5307e362d4d63
Reviewed-on: https://gerrit.libreoffice.org/71242
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 

diff --git a/l10ntools/source/ulfconv/msi-encodinglist.txt 
b/l10ntools/source/ulfconv/msi-encodinglist.txt
index 4116eca69a1e..96f87341ae13 100644
--- a/l10ntools/source/ulfconv/msi-encodinglist.txt
+++ b/l10ntools/source/ulfconv/msi-encodinglist.txt
@@ -62,7 +62,7 @@ fr-CA0  3084
 fy   0  1122   # Frisian
 fur  0  1585
 ga   0  2108   # Irish
-gd   0  1084   # Gaelic (Scotland)
+gd   0  1169   # Gaelic (Scotland)
 gl   0  1110   # Galician
 gu   0  1095   # Gujarati
 gu-IN0  1095   # Gujarati
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: l10ntools/source

2019-03-20 Thread Libreoffice Gerrit user
 l10ntools/source/cfgmerge.cxx |   41 ++---
 1 file changed, 10 insertions(+), 31 deletions(-)

New commits:
commit e99fafa6d18fb56036b2c5d739b7c0a5dd915d41
Author: Matteo Casalin 
AuthorDate: Sat Feb 23 18:02:19 2019 +0100
Commit: Matteo Casalin 
CommitDate: Wed Mar 20 07:35:14 2019 +0100

Reduce OString operations

Change-Id: I13291ca27574d3536e55d8207a0b13b2694385be
Reviewed-on: https://gerrit.libreoffice.org/69233
Tested-by: Jenkins
Reviewed-by: Matteo Casalin 

diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index 0c1167da1a3b..755359b1fa24 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -259,10 +259,7 @@ void CfgParser::ExecuteAnalyzedToken( int nToken, char 
*pToken )
 }
 else
 {
-OString sError( "Misplaced close tag: " );
-sError += sToken;
-sError += " in file ";
-sError += global::inputPathname;
+const OString sError{ "Misplaced close tag: " + sToken + " in 
file " + global::inputPathname };
 yyerror(sError.getStr());
 std::exit(EXIT_FAILURE);
 }
@@ -470,34 +467,16 @@ void CfgMerge::WorkOnResourceEnd()
 if (
 ( !sCur.equalsIgnoreAsciiCase("en-US") ) && 
!sContent.isEmpty())
 {
-
-OString sText = helper::QuotHTML( sContent);
-
-OString sAdditionalLine( "\t" );
-
 OString sTextTag = pStackData->sTextTag;
-OString sTemp = sTextTag.copy( sTextTag.indexOf( 
"xml:lang=" ));
-
-sal_Int32 n = 0;
-OString sSearch = sTemp.getToken(0, '"', n);
-sSearch += "\"";
-sSearch += sTemp.getToken(0, '"', n);
-sSearch += "\"";
-
-OString sReplace = sTemp.getToken(0, '"');
-sReplace += "\"";
-sReplace += sCur;
-sReplace += "\"";
-
-sTextTag = sTextTag.replaceFirst(sSearch, sReplace);
-
-sAdditionalLine += sTextTag;
-sAdditionalLine += sText;
-sAdditionalLine += pStackData->sEndTextTag;
-
-sAdditionalLine += "\n";
-sAdditionalLine += sLastWhitespace;
-
+const sal_Int32 nLangAttributeStart{ sTextTag.indexOf( 
"xml:lang=" ) };
+const sal_Int32 nLangStart{ sTextTag.indexOf( '"', 
nLangAttributeStart )+1 };
+const sal_Int32 nLangEnd{ sTextTag.indexOf( '"', 
nLangStart ) };
+OString sAdditionalLine{ "\t"
++ sTextTag.replaceAt(nLangStart, nLangEnd-nLangStart, 
sCur)
++ helper::QuotHTML(sContent)
++ pStackData->sEndTextTag
++ "\n"
++ sLastWhitespace };
 Output( sAdditionalLine );
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: l10ntools/source

2019-03-14 Thread Libreoffice Gerrit user
 l10ntools/source/cfgmerge.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 66da602fb911d73e89fa7662dcea5840b449241f
Author: Matteo Casalin 
AuthorDate: Sat Feb 23 19:21:40 2019 +0100
Commit: Matteo Casalin 
CommitDate: Thu Mar 14 19:22:17 2019 +0100

Fix TRUE to sal_True conversion in string

This would lead to always false condition, since that text should
be uppercase.
Introduced in d210c6ccc30466e98240c1409df0550514668d68.
Reduce parentheses while at it.

Change-Id: Iec9cbbfd0a596ad1d4dcba50aa3a5c00a54ef425
Reviewed-on: https://gerrit.libreoffice.org/69234
Tested-by: Jenkins
Reviewed-by: Matteo Casalin 

diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index ebe8487aa599..0c1167da1a3b 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -234,8 +234,8 @@ void CfgParser::ExecuteAnalyzedToken( int nToken, char 
*pToken )
 
 if ( sSearch == "cfg:name=" ) {
 OString sTemp( sToken.toAsciiUpperCase() );
-bLocalize = (( sTemp.indexOf( "CFG:TYPE=\"STRING\"" ) != 
-1 ) &&
-( sTemp.indexOf( "CFG:LOCALIZED=\"sal_True\"" ) != -1 
));
+bLocalize = sTemp.indexOf("CFG:TYPE=\"STRING\"")>=0
+&& sTemp.indexOf( "CFG:LOCALIZED=\"TRUE\"" )>=0;
 }
 }
 else if ( sTokenName == "label" ) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: l10ntools/source

2019-03-05 Thread Libreoffice Gerrit user
 l10ntools/source/lngmerge.cxx |   35 ---
 1 file changed, 12 insertions(+), 23 deletions(-)

New commits:
commit 78404432ed784b3570cb4c223e6311c3e9859b60
Author: Matteo Casalin 
AuthorDate: Thu Feb 21 18:27:58 2019 +0100
Commit: Matteo Casalin 
CommitDate: Tue Mar 5 22:37:14 2019 +0100

Group some more common code

Change-Id: I2bf3e8afd9f330e8d7377300163a3224ed4db05c
Reviewed-on: https://gerrit.libreoffice.org/68179
Tested-by: Jenkins
Reviewed-by: Matteo Casalin 

diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index f6939458c588..fdb0cf90b176 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -30,8 +30,14 @@
 
 namespace {
 
-OString getBracketedContent(const OString& text) {
-return text.getToken(1, '[').getToken(0, ']');
+bool lcl_isNextGroup(OString _out, const OString )
+{
+if (sLineTrim.startsWith("[") && sLineTrim.endsWith("]"))
+{
+sGroup_out = sLineTrim.getToken(1, '[').getToken(0, ']').trim();
+return true;
+}
+return false;
 }
 
 void lcl_RemoveUTF8ByteOrderMarker( OString  )
@@ -122,13 +128,7 @@ void LngParser::WritePO(PoOfstream ,
 
 bool LngParser::isNextGroup(OString _out, const OString _in)
 {
-const OString sLineTrim = sLine_in.trim();
-if (sLineTrim.startsWith("[") && sLineTrim.endsWith("]"))
-{
-sGroup_out = getBracketedContent(sLineTrim).trim();
-return true;
-}
-return false;
+return lcl_isNextGroup(sGroup_out, sLine_in.trim());
 }
 
 void LngParser::ReadLine(const OString _in,
@@ -162,16 +162,7 @@ void LngParser::Merge(
 
 // seek to next group
 while ( nPos < mvLines.size() && !bGroup )
-{
-OString sLine( mvLines[ nPos ] );
-sLine = sLine.trim();
-if ( sLine.startsWith("[") && sLine.endsWith("]") )
-{
-sGroup = getBracketedContent(sLine).trim();
-bGroup = true;
-}
-nPos ++;
-}
+bGroup = lcl_isNextGroup(sGroup, mvLines[nPos++].trim());
 
 while ( nPos < mvLines.size()) {
 OStringHashMap Text;
@@ -188,11 +179,9 @@ void LngParser::Merge(
 
 while ( nPos < mvLines.size() && !bGroup )
 {
-OString sLine( mvLines[ nPos ] );
-sLine = sLine.trim();
-if ( sLine.startsWith("[") && sLine.endsWith("]") )
+const OString sLine{ mvLines[nPos].trim() };
+if ( lcl_isNextGroup(sGroup, sLine) )
 {
-sGroup = getBracketedContent(sLine).trim();
 bGroup = true;
 nPos ++;
 sLanguagesDone = "";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: l10ntools/source

2019-03-05 Thread Libreoffice Gerrit user
 l10ntools/source/lngmerge.cxx |   28 +++-
 1 file changed, 11 insertions(+), 17 deletions(-)

New commits:
commit 070ea7faa821a01b6a077e24724e37962173cb23
Author: Matteo Casalin 
AuthorDate: Thu Feb 21 18:25:02 2019 +0100
Commit: Matteo Casalin 
CommitDate: Tue Mar 5 22:36:20 2019 +0100

Use optimized OString concatenation

Change-Id: Iaefacf4a57398d0e88b4de7552af11832db3e881
Reviewed-on: https://gerrit.libreoffice.org/68178
Tested-by: Jenkins
Reviewed-by: Matteo Casalin 

diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index 39f98747e99c..f6939458c588 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -209,9 +209,7 @@ void LngParser::Merge(
 {
 sLang = sLang.trim();
 
-OString sSearch( ";" );
-sSearch += sLang;
-sSearch += ";";
+OString sSearch{ ";" + sLang + ";" };
 
 if ( sLanguagesDone.indexOf( sSearch ) != -1 ) {
 mvLines.erase( mvLines.begin() + nPos );
@@ -226,14 +224,11 @@ void LngParser::Merge(
 continue;
 
 if ( !sNewText.isEmpty()) {
-OString & rLine = mvLines[ nPos ];
-
-OString sText1( sLang );
-sText1 += " = \"";
-// escape quotes, unescape double escaped 
quotes fdo#56648
-sText1 += 
sNewText.replaceAll("\"","\\\"").replaceAll("\"","\\\"");
-sText1 += "\"";
-rLine = sText1;
+mvLines[ nPos ] = sLang
++ " = \""
+// escape quotes, unescape double escaped 
quotes fdo#56648
++ 
sNewText.replaceAll("\"","\\\"").replaceAll("\"","\\\"")
++ "\"";
 Text[ sLang ] = sNewText;
 }
 }
@@ -264,12 +259,11 @@ void LngParser::Merge(
 continue;
 if ( !sNewText.isEmpty() && sCur != "x-comment")
 {
-OString sLine;
-sLine += sCur;
-sLine += " = \"";
-// escape quotes, unescape double escaped quotes 
fdo#56648
-sLine += 
sNewText.replaceAll("\"","\\\"").replaceAll("\"","\\\"");
-sLine += "\"";
+const OString sLine { sCur
++ " = \""
+// escape quotes, unescape double escaped quotes 
fdo#56648
++ 
sNewText.replaceAll("\"","\\\"").replaceAll("\"","\\\"")
++ "\"" };
 
 nLastLangPos++;
 nPos++;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: l10ntools/source

2019-03-05 Thread Libreoffice Gerrit user
 l10ntools/source/xrmmerge.cxx |   42 --
 1 file changed, 12 insertions(+), 30 deletions(-)

New commits:
commit c7ab0bff8df23661ee9304578bd9fcf63f4d2dd0
Author: Matteo Casalin 
AuthorDate: Sun Feb 17 23:44:17 2019 +0100
Commit: Matteo Casalin 
CommitDate: Tue Mar 5 22:30:09 2019 +0100

Use optimized OString concatenation

Change-Id: I7c74e007cb382701c3d9c41f9a6fb76ff0cb19fe
Reviewed-on: https://gerrit.libreoffice.org/68120
Tested-by: Jenkins
Reviewed-by: Matteo Casalin 

diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index b6f7d388c31f..26dee6f4540c 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -261,12 +261,8 @@ void XRMResParser::Execute( int nToken, char * pToken )
 
 OString XRMResParser::GetAttribute( const OString , const OString 
 )
 {
-OString sTmp( rToken );
-sTmp = sTmp.replace('\t', ' ');
-
-OString sSearch( " " );
-sSearch += rAttribute;
-sSearch += "=";
+const OString sSearch{ " " + rAttribute + "=" };
+OString sTmp{ rToken.replace('\t', ' ') };
 sal_Int32 nPos = sTmp.indexOf( sSearch );
 
 if ( nPos<0 )
@@ -293,9 +289,7 @@ XRMResExport::XRMResExport(
 pOutputStream.open( rOutputFile, PoOfstream::APP );
 if (!pOutputStream.isOpen())
 {
-OString sError( "Unable to open output file: " );
-sError += rOutputFile;
-Error( sError );
+Error( "Unable to open output file: " + rOutputFile );
 }
 }
 
@@ -310,9 +304,8 @@ void XRMResExport::WorkOnDesc(
 const OString ,
 OString  )
 {
-OString sDescFileName(
-sInputFileName.replaceAll("description.xml", OString()));
-sDescFileName += GetAttribute( rOpenTag, "xlink:href" );
+const OString sDescFileName{ sInputFileName.replaceAll("description.xml", 
OString())
++ GetAttribute( rOpenTag, "xlink:href" ) };
 ifstream file (sDescFileName.getStr(), ios::in|ios::binary|ios::ate);
 if (file.is_open()) {
 int size = static_cast(file.tellg());
@@ -377,9 +370,7 @@ XRMResMerge::XRMResMerge(
 pOutputStream.open(
 rOutputFile.getStr(), std::ios_base::out | std::ios_base::trunc);
 if (!pOutputStream.is_open()) {
-OString sError( "Unable to open output file: " );
-sError += rOutputFile;
-Error( sError );
+Error( "Unable to open output file: " + rOutputFile );
 }
 }
 
@@ -405,10 +396,8 @@ void XRMResMerge::WorkOnDesc(
 ( pEntrys->GetText( sText, sCur, true )) &&
 !sText.isEmpty())
 {
-OString sAdditionalLine( "\n" );
-sAdditionalLine += rOpenTag;
-OString sSearch = sLangAttribute;
-sSearch += "=\"";
+OString sAdditionalLine{ "\n"  + rOpenTag };
+OString sSearch{ sLangAttribute + "=\"" };
 OString sReplace( sSearch );
 
 sSearch += GetAttribute( rOpenTag, sLangAttribute );
@@ -419,9 +408,7 @@ void XRMResMerge::WorkOnDesc(
 sSearch = OString("xlink:href=\"");
 sReplace = sSearch;
 
-OString sLocDescFilename = sDescFilename;
-sLocDescFilename = sLocDescFilename.replaceFirst(
-"en-US", sCur);
+const OString sLocDescFilename = 
sDescFilename.replaceFirst( "en-US", sCur);
 
 sSearch += sDescFilename;
 sReplace += sLocDescFilename;
@@ -491,20 +478,15 @@ void XRMResMerge::EndOfText(
 helper::isWellFormedXML( sContent ))
 {
 const OString& sText( sContent );
-OString sAdditionalLine( "\n" );
-sAdditionalLine += rOpenTag;
-OString sSearch = sLangAttribute;
-sSearch += "=\"";
+OString sAdditionalLine{ "\n" + rOpenTag };
+OString sSearch{ sLangAttribute + "=\"" };
 OString sReplace( sSearch );
 
 sSearch += GetAttribute( rOpenTag, sLangAttribute );
 sReplace += sCur;
 
 sAdditionalLine = sAdditionalLine.replaceFirst(
-sSearch, sReplace);
-
-sAdditionalLine += sText;
-sAdditionalLine += rCloseTag;
+sSearch, sReplace) + sText + rCloseTag;
 
 Output( sAdditionalLine );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: l10ntools/source

2019-03-05 Thread Libreoffice Gerrit user
 l10ntools/source/xrmmerge.cxx |   11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 730df730a9425dbf4ed778dce7a95c1c0be274f6
Author: Matteo Casalin 
AuthorDate: Sun Feb 17 23:32:22 2019 +0100
Commit: Matteo Casalin 
CommitDate: Tue Mar 5 22:29:03 2019 +0100

Avoid unneeded OUString copy

Change-Id: I43d66f1bf4fc4a17f7dbea62e3fb13675dbbfb8a
Reviewed-on: https://gerrit.libreoffice.org/68119
Tested-by: Jenkins
Reviewed-by: Matteo Casalin 

diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 4670dc7c3ab2..b6f7d388c31f 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -269,13 +269,10 @@ OString XRMResParser::GetAttribute( const OString 
, const OString 
 sSearch += "=";
 sal_Int32 nPos = sTmp.indexOf( sSearch );
 
-if ( nPos != -1 )
-{
-sTmp = sTmp.copy( nPos );
-OString sId = sTmp.getToken(1, '"');
-return sId;
-}
-return OString();
+if ( nPos<0 )
+return OString();
+
+return sTmp.getToken(1, '"', nPos);
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: l10ntools/source

2019-03-03 Thread Libreoffice Gerrit user
 l10ntools/source/xrmlex.l |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d78f671e714b2d03f594bb8ea80bccbdc65ae4c2
Author: Stephan Bergmann 
AuthorDate: Sat Mar 2 21:57:52 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Sun Mar 3 11:03:21 2019 +0100

yyinput() returns int

Change-Id: I2e1958bff9778bab65b5c972bc9e0721a86546f5
Reviewed-on: https://gerrit.libreoffice.org/68630
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/l10ntools/source/xrmlex.l b/l10ntools/source/xrmlex.l
index 41a19f279cf2..57d6e3e38b1c 100644
--- a/l10ntools/source/xrmlex.l
+++ b/l10ntools/source/xrmlex.l
@@ -134,7 +134,7 @@ static int bText=0;
 
 
 

[Libreoffice-commits] core.git: l10ntools/source

2018-11-28 Thread Libreoffice Gerrit user
 l10ntools/source/xmlparse.cxx |   15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 10793855574782a1d57805883693b6f200cfac3d
Author: Olivier Hallot 
AuthorDate: Sat Nov 24 14:59:09 2018 -0200
Commit: Olivier Hallot 
CommitDate: Wed Nov 28 10:53:20 2018 +0100

tdf#121697 XHP extensions

This is the core part of the bug, and is WIP

Extend the XML parser to include new incantations of the 
tag, namely
 to 
,  and 

Extension to the  tag:
, , ,  and 

Change-Id: Idaed321cc8756fa6bcf4fbc170982365ff33d4d7
Reviewed-on: https://gerrit.libreoffice.org/63955
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index d1380208d263..369d8e6e1562 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -314,6 +314,15 @@ XMLFile::XMLFile( const OString  ) // the file 
name, empty if created
 m_aNodes_localize.emplace( OString("bookmark") , true );
 m_aNodes_localize.emplace( OString("variable") , true );
 m_aNodes_localize.emplace( OString("paragraph") , true );
+m_aNodes_localize.emplace( OString("h1") , true );
+m_aNodes_localize.emplace( OString("h2") , true );
+m_aNodes_localize.emplace( OString("h3") , true );
+m_aNodes_localize.emplace( OString("h4") , true );
+m_aNodes_localize.emplace( OString("h5") , true );
+m_aNodes_localize.emplace( OString("h6") , true );
+m_aNodes_localize.emplace( OString("note") , true );
+m_aNodes_localize.emplace( OString("tip") , true );
+m_aNodes_localize.emplace( OString("warning") , true );
 m_aNodes_localize.emplace( OString("alt") , true );
 m_aNodes_localize.emplace( OString("caption") , true );
 m_aNodes_localize.emplace( OString("title") , true );
@@ -1055,12 +1064,14 @@ icu::UnicodeString lcl_QuotRange(
 
 bool lcl_isTag( const icu::UnicodeString& rString )
 {
-static const int nSize = 15;
+static const int nSize = 20;
 static const icu::UnicodeString vTags[nSize] = {
 "ahelp", "link", "item", "emph", "defaultinline",
 "switchinline", "caseinline", "variable",
 "bookmark_value", "image", "object",
-"embedvar", "alt", "sup", "sub" };
+"embedvar", "alt", "sup", "sub",
+"menuitem", "keycode", "input", "literal", "widget"
+};
 
 for( int nIndex = 0; nIndex < nSize; ++nIndex )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2018-11-18 Thread Libreoffice Gerrit user
 l10ntools/source/po.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7e89f4194e76863097a1d791cda8cfbf352c0109
Author: Julien Nabet 
AuthorDate: Sun Nov 18 12:55:20 2018 +0100
Commit: Julien Nabet 
CommitDate: Sun Nov 18 15:03:43 2018 +0100

cppcheck: fix returnDanglingLifetime (l10ntools)

Change-Id: Ia3c094ee65be3f5048df6896a4a6428bdd8fed10
Reviewed-on: https://gerrit.libreoffice.org/63527
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 4e60d82160d3..a0107530e194 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -442,7 +442,7 @@ namespace
 struct tm* pNow = localtime();
 char pBuff[50];
 strftime( pBuff, sizeof pBuff, "%Y-%m-%d %H:%M%z", pNow );
-return pBuff;
+return OString(pBuff);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2018-10-27 Thread Libreoffice Gerrit user
 l10ntools/source/po.cxx |   27 +--
 1 file changed, 25 insertions(+), 2 deletions(-)

New commits:
commit b44b9c4519794d159b154a9713c10da1155a5198
Author: Christian Lohmaier 
AuthorDate: Sat Oct 27 13:45:43 2018 +0200
Commit: Christian Lohmaier 
CommitDate: Sat Oct 27 16:31:33 2018 +0200

pocheck: don't choke on plural forms

Change-Id: I51a82ce5fc09d44ebc6f7c06c67b475ee2adf68b
Reviewed-on: https://gerrit.libreoffice.org/62419
Reviewed-by: Christian Lohmaier 
Tested-by: Jenkins

diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 27daba097a42..bb4a06c03f36 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -33,7 +33,9 @@ private:
 std::vectorm_sReferences;
 OStringm_sMsgCtxt;
 OStringm_sMsgId;
+OStringm_sMsgIdPlural;
 OStringm_sMsgStr;
+std::vectorm_sMsgStrPlural;
 bool   m_bFuzzy;
 bool   m_bCFormat;
 bool   m_bNull;
@@ -118,7 +120,9 @@ GenPoEntry::GenPoEntry()
 , m_sReferences( std::vector() )
 , m_sMsgCtxt( OString() )
 , m_sMsgId( OString() )
+, m_sMsgIdPlural( OString() )
 , m_sMsgStr( OString() )
+, m_sMsgStrPlural( std::vector() )
 , m_bFuzzy( false )
 , m_bCFormat( false )
 , m_bNull( false )
@@ -148,8 +152,16 @@ void GenPoEntry::writeToFile(std::ofstream& rOFStream) 
const
   << std::endl;
 rOFStream << "msgid "
   << lcl_GenMsgString(m_sMsgId) << std::endl;
-rOFStream << "msgstr "
-  << lcl_GenMsgString(m_sMsgStr) << std::endl;
+if ( !m_sMsgIdPlural.isEmpty() )
+rOFStream << "msgid_plural "
+  << lcl_GenMsgString(m_sMsgIdPlural)
+  << std::endl;
+if ( !m_sMsgStrPlural.empty() )
+for(auto & line : m_sMsgStrPlural)
+rOFStream << line.copy(0,10) << lcl_GenMsgString(line.copy(10)) << 
std::endl;
+else
+rOFStream << "msgstr "
+  << lcl_GenMsgString(m_sMsgStr) << std::endl;
 }
 
 void GenPoEntry::readFromFile(std::ifstream& rIFStream)
@@ -196,11 +208,22 @@ void GenPoEntry::readFromFile(std::ifstream& rIFStream)
 m_sMsgId = lcl_GenNormString(sLine.copy(6));
 pLastMsg = _sMsgId;
 }
+else if (sLine.startsWith("msgid_plural "))
+{
+m_sMsgIdPlural = lcl_GenNormString(sLine.copy(13));
+pLastMsg = _sMsgIdPlural;
+}
 else if (sLine.startsWith("msgstr "))
 {
 m_sMsgStr = lcl_GenNormString(sLine.copy(7));
 pLastMsg = _sMsgStr;
 }
+else if (sLine.startsWith("msgstr["))
+{
+// assume there are no more than 10 plural forms...
+// and that plural strings are never split to multi-line in po
+m_sMsgStrPlural.push_back(sLine.copy(0,10) + 
lcl_GenNormString(sLine.copy(10)));
+}
 else if (sLine.startsWith("\"") && pLastMsg)
 {
 OString sReference;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source scp2/source solenv/inc

2018-10-21 Thread Libreoffice Gerrit user
 l10ntools/source/ulfconv/msi-encodinglist.txt |1 +
 scp2/source/ooo/module_langpack.ulf   |6 ++
 solenv/inc/langlist.mk|1 +
 3 files changed, 8 insertions(+)

New commits:
commit cec31fdedd7c94f4ebf903a66456a75867db22b0
Author: Christian Lohmaier 
AuthorDate: Sun Oct 21 20:28:21 2018 +0200
Commit: Christian Lohmaier 
CommitDate: Mon Oct 22 00:58:41 2018 +0200

add Lower Serbian (dsb) language pack

Change-Id: Ibafa81b412036e98fa9ab047fc8e204660eae120

diff --git a/l10ntools/source/ulfconv/msi-encodinglist.txt 
b/l10ntools/source/ulfconv/msi-encodinglist.txt
index 44d7f91b2650..4116eca69a1e 100644
--- a/l10ntools/source/ulfconv/msi-encodinglist.txt
+++ b/l10ntools/source/ulfconv/msi-encodinglist.txt
@@ -44,6 +44,7 @@ cy   0  1106   # Welsh
 da   0  1030
 de   0  1031
 dgo  0  1604   # Dogri (India)
+dsb  0  2094   # Lower Sorbian
 dz   0  3153   # Dzongkha
 el   0  1032
 en-GB0  2057
diff --git a/scp2/source/ooo/module_langpack.ulf 
b/scp2/source/ooo/module_langpack.ulf
index 7bb58e1fa98c..3cc7df5f0464 100644
--- a/scp2/source/ooo/module_langpack.ulf
+++ b/scp2/source/ooo/module_langpack.ulf
@@ -112,6 +112,12 @@ en-US = "Dutch"
 [STR_DESC_MODULE_LANGPACK_NL]
 en-US = "Installs the Dutch user interface"
 
+[STR_NAME_MODULE_LANGPACK_DSB]
+en-US = "Lower Sorbian"
+
+[STR_DESC_MODULE_LANGPACK_DSB]
+en-US = "Installs the Lower Sorbian user interface"
+
 [STR_NAME_MODULE_LANGPACK_HSB]
 en-US = "Upper Sorbian"
 
diff --git a/solenv/inc/langlist.mk b/solenv/inc/langlist.mk
index 4492cb295db1..9c8f266fba7e 100644
--- a/solenv/inc/langlist.mk
+++ b/solenv/inc/langlist.mk
@@ -37,6 +37,7 @@ cy \
 da \
 de \
 dgo \
+dsb \
 dz \
 el \
 en-GB \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2018-10-01 Thread Libreoffice Gerrit user
 l10ntools/source/po.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 59f4115122f70004d78a85b08607b9678b8fd6ca
Author: Andras Timar 
AuthorDate: Mon Oct 1 12:17:31 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Oct 1 17:10:01 2018 +0200

fix of extension description l10n

Change-Id: Ica102309627fade2a064ee5516e84801affe4082
Reviewed-on: https://gerrit.libreoffice.org/61184
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index a0cdf2172df2..27daba097a42 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -203,7 +203,15 @@ void GenPoEntry::readFromFile(std::ifstream& rIFStream)
 }
 else if (sLine.startsWith("\"") && pLastMsg)
 {
-*pLastMsg += lcl_GenNormString(sLine);
+OString sReference;
+if (!m_sReferences.empty())
+{
+sReference = m_sReferences.front();
+}
+if (pLastMsg != _sMsgCtxt || sLine != "\"" + sReference + 
"\\n\"")
+{
+*pLastMsg += lcl_GenNormString(sLine);
+}
 }
 else
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2018-09-30 Thread Libreoffice Gerrit user
 l10ntools/source/pocheck.cxx |  117 +--
 1 file changed, 16 insertions(+), 101 deletions(-)

New commits:
commit 1139c76b60b9a9f6df2bc53deb6c1c1cba42178d
Author: Andras Timar 
AuthorDate: Sun Sep 30 17:43:26 2018 +0200
Commit: Andras Timar 
CommitDate: Sun Sep 30 21:59:17 2018 +0200

pocheck: tdf#119080 update po checker tool for post LO 6.0 po files

Change-Id: I700eaa0d412fb609fdc89ca07003534e6bb13854

diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx
index 2e4b1a4eb878..4f7c7686757a 100644
--- a/l10ntools/source/pocheck.cxx
+++ b/l10ntools/source/pocheck.cxx
@@ -24,7 +24,7 @@ static void checkStyleNames(const OString& aLanguage)
 
 OString aPoPath = OString(getenv("SRC_ROOT")) +
   "/translations/source/" +
-  aLanguage + "/sw/source/ui/utlui.po";
+  aLanguage + "/sw/messages.po";
 PoIfstream aPoInput;
 aPoInput.open(aPoPath);
 if( !aPoInput.isOpen() )
@@ -43,8 +43,7 @@ static void checkStyleNames(const OString& aLanguage)
 break;
 }
 
-if( !aPoEntry.isFuzzy() && aPoEntry.getSourceFile() == "poolfmt.src" &&
-aPoEntry.getGroupId().startsWith("STR_POOLCOLL") )
+if( !aPoEntry.isFuzzy() && 
aPoEntry.getMsgCtxt().startsWith("STR_POOLCOLL") )
 {
 OString aMsgStr = aPoEntry.getMsgStr();
 if( aMsgStr.isEmpty() )
@@ -56,8 +55,7 @@ static void checkStyleNames(const OString& aLanguage)
 bRepeated = true;
 }
 }
-if( !aPoEntry.isFuzzy() && aPoEntry.getSourceFile() == "poolfmt.src" &&
-aPoEntry.getGroupId().startsWith("STR_POOLNUMRULE") )
+if( !aPoEntry.isFuzzy() && 
aPoEntry.getMsgCtxt().startsWith("STR_POOLNUMRULE") )
 {
 OString aMsgStr = aPoEntry.getMsgStr();
 if( aMsgStr.isEmpty() )
@@ -100,7 +98,7 @@ static void checkStyleNames(const OString& aLanguage)
 }
 PoOfstream aPoOutput;
 aPoOutput.open(aPoPath+".new");
-PoHeader aTmp("sw/source/ui/utlui");
+PoHeader aTmp("sw/inc");
 aPoOutput.writeHeader(aTmp);
 bool bAnyError = false;
 
@@ -113,7 +111,7 @@ static void checkStyleNames(const OString& aLanguage)
 break;
 for (auto const& repeatedEntry : repeatedEntries)
 {
-if (repeatedEntry.getMsgId() == aPoEntry.getMsgId() && 
repeatedEntry.getGroupId() == aPoEntry.getGroupId()) {
+if (repeatedEntry.getMsgId() == aPoEntry.getMsgId() && 
repeatedEntry.getMsgCtxt() == aPoEntry.getMsgCtxt()) {
 bError = true;
 break;
 }
@@ -142,13 +140,13 @@ static void checkFunctionNames(const OString& aLanguage)
 
 std::vector repeatedEntries;
 
-OString aPoPaths[4];
+OString aPoPaths[2];
 OUString aPoPathURL;
 
 aPoPaths[0] = OString(getenv("SRC_ROOT")) +
   "/translations/source/" +
   aLanguage +
-  "/formula/source/core/resource.po";
+  "/formula/messages.po";
 PoIfstream aPoInput;
 aPoInput.open(aPoPaths[0]);
 if( !aPoInput.isOpen() )
@@ -163,7 +161,7 @@ static void checkFunctionNames(const OString& aLanguage)
 aPoInput.readEntry(aPoEntry);
 if( aPoInput.eof() )
 break;
-if( !aPoEntry.isFuzzy() && aPoEntry.getGroupId() == 
"RID_STRLIST_FUNCTION_NAMES" )
+if( !aPoEntry.isFuzzy() && aPoEntry.getMsgCtxt() == 
"RID_STRLIST_FUNCTION_NAMES" )
 {
 OString aMsgStr = aPoEntry.getMsgStr();
 if( aMsgStr.isEmpty() )
@@ -183,7 +181,7 @@ static void checkFunctionNames(const OString& aLanguage)
 aPoPaths[1] = OString(getenv("SRC_ROOT")) +
 "/translations/source/" +
 aLanguage +
-"/scaddins/source/analysis.po";
+"/scaddins/messages.po";
 aPoInput.open(aPoPaths[1]);
 if( !aPoInput.isOpen() )
 {
@@ -197,7 +195,7 @@ static void checkFunctionNames(const OString& aLanguage)
 aPoInput.readEntry(aPoEntry);
 if( aPoInput.eof() )
 break;
-if( !aPoEntry.isFuzzy() && aPoEntry.getGroupId() == 
"RID_ANALYSIS_FUNCTION_NAMES" )
+if( !aPoEntry.isFuzzy() && 
aPoEntry.getMsgCtxt().startsWith("ANALYSIS_FUNCNAME") )
 {
 OString aMsgStr = aPoEntry.getMsgStr();
 if( aMsgStr.isEmpty() )
@@ -214,77 +212,6 @@ static void checkFunctionNames(const OString& aLanguage)
 }
 aPoInput.close();
 
-
-aPoPaths[2] = OString(getenv("SRC_ROOT")) +
-  "/translations/source/" +
-   aLanguage +
-  "/scaddins/source/datefunc.po";
-aPoInput.open(aPoPaths[2]);
-if( !aPoInput.isOpen() )
-{
-std::cerr << "Warning: Cannot open " << aPoPaths[2] << std::endl;
-return;
-}
-
-for(;;)
-{
-PoEntry aPoEntry;
-aPoInput.readEntry(aPoEntry);
- 

[Libreoffice-commits] core.git: l10ntools/source

2018-09-30 Thread Libreoffice Gerrit user
 l10ntools/source/po.cxx |   23 +--
 1 file changed, 13 insertions(+), 10 deletions(-)

New commits:
commit 1bf49e98f8019bf62906651804725e4da5b9d514
Author: Andras Timar 
AuthorDate: Sun Sep 30 16:42:26 2018 +0200
Commit: Andras Timar 
CommitDate: Sun Sep 30 21:57:37 2018 +0200

pocheck: PO entries can have multiple source code reference lines since LO 
6.0

Change-Id: Icbe0dd5e63eb5b10d162f34347ab86dde547dc62
Reviewed-on: https://gerrit.libreoffice.org/61164
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index ea52d8d8a66f..e87fe66f25f1 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -30,7 +30,7 @@ class GenPoEntry
 {
 private:
 OStringBuffer m_sExtractCom;
-OStringm_sReference;
+std::vectorm_sReferences;
 OStringm_sMsgCtxt;
 OStringm_sMsgId;
 OStringm_sMsgStr;
@@ -41,7 +41,7 @@ private:
 public:
 GenPoEntry();
 
-const OString& getReference() const{ return m_sReference; }
+const std::vector& getReference() const{ return 
m_sReferences; }
 const OString& getMsgCtxt() const  { return m_sMsgCtxt; }
 const OString& getMsgId() const{ return m_sMsgId; }
 const OString& getMsgStr() const   { return m_sMsgStr; }
@@ -54,7 +54,7 @@ public:
 }
 voidsetReference(const OString& rReference)
 {
-m_sReference = rReference;
+m_sReferences.push_back(rReference);
 }
 voidsetMsgCtxt(const OString& rMsgCtxt)
 {
@@ -115,7 +115,7 @@ namespace
 
 GenPoEntry::GenPoEntry()
 : m_sExtractCom( OString() )
-, m_sReference( OString() )
+, m_sReferences( std::vector() )
 , m_sMsgCtxt( OString() )
 , m_sMsgId( OString() )
 , m_sMsgStr( OString() )
@@ -133,8 +133,11 @@ void GenPoEntry::writeToFile(std::ofstream& rOFStream) 
const
 rOFStream
 << "#. "
 << m_sExtractCom.toString().replaceAll("\n","\n#. ") << std::endl;
-if ( !m_sReference.isEmpty() )
-rOFStream << "#: " << m_sReference << std::endl;
+if ( !m_sReferences.empty() )
+{
+for(std::vector::const_iterator it =  m_sReferences.begin(); 
it != m_sReferences.end(); ++it)
+rOFStream << "#: " << *it << std::endl;
+}
 if ( m_bFuzzy )
 rOFStream << "#, fuzzy" << std::endl;
 if ( m_bCFormat )
@@ -173,7 +176,7 @@ void GenPoEntry::readFromFile(std::ifstream& rIFStream)
 }
 else if (sLine.startsWith("#: "))
 {
-m_sReference = sLine.copy(3);
+m_sReferences.push_back(sLine.copy(3));
 }
 else if (sLine.startsWith("#, fuzzy"))
 {
@@ -252,7 +255,7 @@ PoEntry::PoEntry(
 m_pGenPo->setMsgId(rText);
 m_pGenPo->setExtractCom(
 ( !rHelpText.isEmpty() ?  rHelpText + "\n" : OString()) +
-genKeyId( m_pGenPo->getReference() + rGroupId + rLocalId + rResType + 
rText ) );
+genKeyId( m_pGenPo->getReference().front() + rGroupId + rLocalId + 
rResType + rText ) );
 m_bIsInitialized = true;
 }
 
@@ -301,7 +304,7 @@ PoEntry& PoEntry::operator=(PoEntry&& rPo)
 OString const & PoEntry::getSourceFile() const
 {
 assert( m_bIsInitialized );
-return m_pGenPo->getReference();
+return m_pGenPo->getReference().front();
 }
 
 OString PoEntry::getGroupId() const
@@ -492,7 +495,7 @@ namespace
 // Check the validity of read entry
 bool lcl_CheckInputEntry(const GenPoEntry& rEntry)
 {
-return !rEntry.getReference().isEmpty() &&
+return !rEntry.getReference().empty() &&
!rEntry.getMsgCtxt().isEmpty() &&
!rEntry.getMsgId().isEmpty();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2018-09-30 Thread Libreoffice Gerrit user
 l10ntools/source/pocheck.cxx |   33 -
 1 file changed, 28 insertions(+), 5 deletions(-)

New commits:
commit baf048cd2ffe1f3afeb204b9dcc11d36999c1725
Author: Andras Timar 
AuthorDate: Sun Sep 30 12:06:49 2018 +0200
Commit: Andras Timar 
CommitDate: Sun Sep 30 21:55:48 2018 +0200

pocheck: stop further processing, if input file cannot be opened

Change-Id: Ida6a13e112871ab6864ae2a32a33a15a591154c2
Reviewed-on: https://gerrit.libreoffice.org/61161
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx
index e0b66877c0bc..2e4b1a4eb878 100644
--- a/l10ntools/source/pocheck.cxx
+++ b/l10ntools/source/pocheck.cxx
@@ -28,7 +28,10 @@ static void checkStyleNames(const OString& aLanguage)
 PoIfstream aPoInput;
 aPoInput.open(aPoPath);
 if( !aPoInput.isOpen() )
+{
 std::cerr << "Warning: Cannot open " << aPoPath << std::endl;
+return;
+}
 
 for(;;)
 {
@@ -91,7 +94,10 @@ static void checkStyleNames(const OString& aLanguage)
 }
 aPoInput.open(aPoPath);
 if( !aPoInput.isOpen() )
+{
 std::cerr << "Warning: Cannot open " << aPoPath << std::endl;
+return;
+}
 PoOfstream aPoOutput;
 aPoOutput.open(aPoPath+".new");
 PoHeader aTmp("sw/source/ui/utlui");
@@ -126,7 +132,6 @@ static void checkStyleNames(const OString& aLanguage)
 osl::File::move(aPoPathURL + ".new", aPoPathURL);
 else
 osl::File::remove(aPoPathURL + ".new");
-
 }
 
 // Translated spreadsheet function names must be unique
@@ -147,7 +152,10 @@ static void checkFunctionNames(const OString& aLanguage)
 PoIfstream aPoInput;
 aPoInput.open(aPoPaths[0]);
 if( !aPoInput.isOpen() )
+{
 std::cerr << "Warning: Cannot open " << aPoPaths[0] << std::endl;
+return;
+}
 
 for(;;)
 {
@@ -178,7 +186,10 @@ static void checkFunctionNames(const OString& aLanguage)
 "/scaddins/source/analysis.po";
 aPoInput.open(aPoPaths[1]);
 if( !aPoInput.isOpen() )
+{
 std::cerr << "Warning: Cannot open " << aPoPaths[1] << std::endl;
+return;
+}
 
 for(;;)
 {
@@ -210,7 +221,10 @@ static void checkFunctionNames(const OString& aLanguage)
   "/scaddins/source/datefunc.po";
 aPoInput.open(aPoPaths[2]);
 if( !aPoInput.isOpen() )
+{
 std::cerr << "Warning: Cannot open " << aPoPaths[2] << std::endl;
+return;
+}
 
 for(;;)
 {
@@ -241,7 +255,10 @@ static void checkFunctionNames(const OString& aLanguage)
   "/scaddins/source/pricing.po";
 aPoInput.open(aPoPaths[3]);
 if( !aPoInput.isOpen() )
+{
 std::cerr << "Warning: Cannot open " << aPoPaths[3] << std::endl;
+return;
+}
 
 for(;;)
 {
@@ -362,10 +379,13 @@ static void checkVerticalBar(const OString& aLanguage)
   
"/instsetoo_native/inc_openoffice/windows/msi_languages.po";
 PoIfstream aPoInput;
 aPoInput.open(aPoPath);
-PoOfstream aPoOutput;
-aPoOutput.open(aPoPath+".new");
 if( !aPoInput.isOpen() )
+{
 std::cerr << "Warning: Cannot open " << aPoPath << std::endl;
+return;
+}
+PoOfstream aPoOutput;
+aPoOutput.open(aPoPath+".new");
 PoHeader aTmp("instsetoo_native/inc_openoffice/windows/msi_languages");
 aPoOutput.writeHeader(aTmp);
 bool bError = false;
@@ -412,10 +432,13 @@ static void checkMathSymbolNames(const OString& aLanguage)
   "/starmath/source.po";
 PoIfstream aPoInput;
 aPoInput.open(aPoPath);
-PoOfstream aPoOutput;
-aPoOutput.open(aPoPath+".new");
 if( !aPoInput.isOpen() )
+{
 std::cerr << "Warning: Cannot open " << aPoPath << std::endl;
+return;
+}
+PoOfstream aPoOutput;
+aPoOutput.open(aPoPath+".new");
 PoHeader aTmp("starmath/source");
 aPoOutput.writeHeader(aTmp);
 bool bError = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2018-09-30 Thread Libreoffice Gerrit user
 l10ntools/source/pocheck.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a906b68a9fff30c2af5c03189e59c1952cd3f69f
Author: Andras Timar 
AuthorDate: Sun Sep 30 11:49:07 2018 +0200
Commit: Andras Timar 
CommitDate: Sun Sep 30 19:16:52 2018 +0200

pocheck: fix usage message

pocheck needs environment variables that bin/run does not provide

Change-Id: I0de148363d60c515d4024cd0e97d1025ce50b6a5
Reviewed-on: https://gerrit.libreoffice.org/61160
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx
index 241c225e1c35..e0b66877c0bc 100644
--- a/l10ntools/source/pocheck.cxx
+++ b/l10ntools/source/pocheck.cxx
@@ -458,7 +458,7 @@ int main()
 OString aLanguages(getenv("ALL_LANGS"));
 if( aLanguages.isEmpty() )
 {
-std::cerr << "Usage: bin/run pocheck\n";
+std::cerr << "Usage: LD_LIBRARY_PATH=instdir/program make cmd 
cmd=workdir/LinkTarget/Executable/pocheck\n";
 return 1;
 }
 for(sal_Int32 i = 1;;++i) // skip en-US
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source lotuswordpro/inc lotuswordpro/source oox/source package/source

2018-09-09 Thread Libreoffice Gerrit user
 l10ntools/source/cfgmerge.cxx  |3 +--
 l10ntools/source/xrmmerge.cxx  |1 -
 lotuswordpro/inc/lwpfont.hxx   |1 -
 lotuswordpro/source/filter/lwpcharborderoverride.cxx   |2 --
 lotuswordpro/source/filter/lwpdlvlist.cxx  |2 +-
 lotuswordpro/source/filter/lwpdrawobj.cxx  |2 +-
 lotuswordpro/source/filter/lwpfont.cxx |2 --
 lotuswordpro/source/filter/lwpframelayout.cxx  |3 +--
 lotuswordpro/source/filter/lwpfrib.cxx |1 -
 lotuswordpro/source/filter/lwpfribbreaks.cxx   |2 +-
 lotuswordpro/source/filter/lwplaypiece.cxx |1 -
 lotuswordpro/source/filter/lwpobj.cxx  |2 +-
 lotuswordpro/source/filter/lwpoverride.cxx |4 
 lotuswordpro/source/filter/lwppara.cxx |2 --
 lotuswordpro/source/filter/xfilter/xfcell.cxx  |1 -
 lotuswordpro/source/filter/xfilter/xfcellstyle.cxx |1 -
 lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx |4 
 lotuswordpro/source/filter/xfilter/xfparastyle.cxx |2 --
 lotuswordpro/source/filter/xfilter/xfstylemanager.cxx  |2 +-
 lotuswordpro/source/filter/xfilter/xftablestyle.cxx|1 -
 oox/source/drawingml/chart/datasourcecontext.cxx   |3 +--
 oox/source/drawingml/textbodypropertiescontext.cxx |1 -
 oox/source/drawingml/texteffectscontext.cxx|1 -
 oox/source/drawingml/textparagraph.cxx |2 +-
 oox/source/ole/olehelper.cxx   |2 +-
 oox/source/ppt/pptshapegroupcontext.cxx|1 -
 package/source/xstor/ocompinstream.cxx |2 --
 package/source/xstor/ohierarchyholder.hxx  |6 ++
 package/source/xstor/switchpersistencestream.cxx   |2 --
 package/source/zipapi/Inflater.cxx |3 +--
 package/source/zippackage/zipfileaccess.cxx|1 -
 31 files changed, 13 insertions(+), 50 deletions(-)

New commits:
commit fada813d5db2be370638d182e9f3b0dcd89fa081
Author: Noel Grandin 
AuthorDate: Sun Sep 9 13:36:33 2018 +0200
Commit: Noel Grandin 
CommitDate: Sun Sep 9 19:40:02 2018 +0200

loplugin:simplifyconstruct in l10ntools..package

Change-Id: I8dba8ef1e7455af1e55bbd6086b49c0606bf4927
Reviewed-on: https://gerrit.libreoffice.org/60212
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index ed124c5c428a..872d2c29ded0 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -396,8 +396,7 @@ void CfgExport::WorkOnText(
 CfgMerge::CfgMerge(
 const OString , const OString ,
 const OString , const OString  )
-: pMergeDataFile( nullptr ),
-sFilename( rFilename ),
+: sFilename( rFilename ),
 bEnglish( false )
 {
 pOutputStream.open(
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 6c747ad98654..f866a460b06f 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -370,7 +370,6 @@ XRMResMerge::XRMResMerge(
 const OString , const OString ,
 const OString  )
 : XRMResParser(),
-pMergeDataFile( nullptr ),
 sFilename( rFilename )
 {
 if (!rMergeSource.isEmpty() && sLanguage.equalsIgnoreAsciiCase("ALL"))
diff --git a/lotuswordpro/inc/lwpfont.hxx b/lotuswordpro/inc/lwpfont.hxx
index bcaec1233876..866775485234 100644
--- a/lotuswordpro/inc/lwpfont.hxx
+++ b/lotuswordpro/inc/lwpfont.hxx
@@ -246,7 +246,6 @@ class LwpFontAttrManager
 public:
 LwpFontAttrManager()
 : m_nCount(0)
-, m_pFontAttrs(nullptr)
 {}
 ~LwpFontAttrManager();
 public:
diff --git a/lotuswordpro/source/filter/lwpcharborderoverride.cxx 
b/lotuswordpro/source/filter/lwpcharborderoverride.cxx
index fdd0736d9ea9..b50abc5365cf 100644
--- a/lotuswordpro/source/filter/lwpcharborderoverride.cxx
+++ b/lotuswordpro/source/filter/lwpcharborderoverride.cxx
@@ -75,8 +75,6 @@ LwpCharacterBorderOverride::LwpCharacterBorderOverride()
 
 
LwpCharacterBorderOverride::LwpCharacterBorderOverride(LwpCharacterBorderOverride
 const& rOther)
 : LwpOverride(rOther)
-, m_pBorderStuff(nullptr)
-, m_pMargins(nullptr)
 , m_nAboveWidth(rOther.m_nAboveWidth)
 , m_nBelowWidth(rOther.m_nBelowWidth)
 {
diff --git a/lotuswordpro/source/filter/lwpdlvlist.cxx 
b/lotuswordpro/source/filter/lwpdlvlist.cxx
index e4f56e6044f2..77431cdd03d0 100644
--- a/lotuswordpro/source/filter/lwpdlvlist.cxx
+++ b/lotuswordpro/source/filter/lwpdlvlist.cxx
@@ -119,7 +119,7 @@ void LwpDLNFVList::ReadName(LwpObjectStream* pObjStrm)
  **/
 LwpDLNFPVList::LwpDLNFPVList(LwpObjectHeader const , LwpSvStream* pStrm)
 : LwpDLNFVList(objHdr, pStrm),
-

[Libreoffice-commits] core.git: l10ntools/source lingucomponent/source linguistic/source lotuswordpro/source oox/source package/source pyuno/source registry/tools reportdesign/source

2018-07-30 Thread Libreoffice Gerrit user
 l10ntools/source/merge.cxx|1 +
 l10ntools/source/po.cxx   |1 +
 lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx |1 +
 linguistic/source/convdic.cxx |1 +
 linguistic/source/convdiclist.cxx |1 +
 linguistic/source/dicimp.cxx  |1 +
 linguistic/source/dlistimp.cxx|1 +
 linguistic/source/gciterator.cxx  |1 +
 linguistic/source/hyphdsp.cxx |1 +
 linguistic/source/lngprophelp.cxx |1 +
 linguistic/source/lngsvcmgr.cxx   |1 +
 linguistic/source/misc.cxx|1 +
 linguistic/source/spelldsp.cxx|1 +
 linguistic/source/thesdsp.cxx |1 +
 lotuswordpro/source/filter/lwpbulletstylemgr.cxx  |1 +
 lotuswordpro/source/filter/lwpdivinfo.cxx |1 +
 lotuswordpro/source/filter/lwpfont.cxx|1 +
 lotuswordpro/source/filter/lwpgrfobj.cxx  |1 +
 lotuswordpro/source/filter/lwplayout.cxx  |1 +
 lotuswordpro/source/filter/lwpobjfactory.cxx  |1 +
 lotuswordpro/source/filter/lwppagelayout.cxx  |1 +
 lotuswordpro/source/filter/lwpparaborderoverride.cxx  |1 +
 lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx |1 +
 lotuswordpro/source/filter/lwptablelayout.cxx |1 +
 lotuswordpro/source/filter/lwptblformula.cxx  |1 +
 lotuswordpro/source/filter/tocread.cxx|1 +
 oox/source/core/relationshandler.cxx  |1 +
 oox/source/core/xmlfilterbase.cxx |1 +
 oox/source/docprop/docprophandler.cxx |1 +
 oox/source/drawingml/color.cxx|1 +
 oox/source/drawingml/customshapegeometry.cxx  |1 +
 oox/source/drawingml/customshapepresetdata.cxx|1 +
 oox/source/drawingml/customshapeproperties.cxx|1 +
 oox/source/drawingml/diagram/diagram.cxx  |1 +
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx   |1 +
 oox/source/drawingml/diagram/layoutatomvisitors.cxx   |2 ++
 oox/source/drawingml/diagram/layoutnodecontext.cxx|1 +
 oox/source/drawingml/fillproperties.cxx   |1 +
 oox/source/drawingml/graphicshapecontext.cxx  |1 +
 oox/source/drawingml/shape.cxx|1 +
 oox/source/drawingml/shape3dproperties.cxx|1 +
 oox/source/drawingml/shapecontext.cxx |1 +
 oox/source/drawingml/shapegroupcontext.cxx|1 +
 oox/source/drawingml/textbodycontext.cxx  |2 ++
 oox/source/drawingml/textcharacterpropertiescontext.cxx   |2 ++
 oox/source/drawingml/textfield.cxx|1 +
 oox/source/drawingml/textliststyle.cxx|1 +
 oox/source/drawingml/textparagraph.cxx|1 +
 oox/source/drawingml/textparagraphpropertiescontext.cxx   |1 +
 oox/source/drawingml/textrun.cxx  |1 +
 oox/source/export/chartexport.cxx |1 +
 oox/source/export/drawingml.cxx   |1 +
 oox/source/export/shapes.cxx  |1 +
 oox/source/export/vmlexport.cxx   |1 +
 oox/source/helper/graphichelper.cxx   |1 +
 oox/source/helper/progressbar.cxx |2 ++
 oox/source/helper/propertymap.cxx |1 +
 oox/source/helper/propertyset.cxx |1 +
 oox/source/helper/zipstorage.cxx  |1 +
 oox/source/mathml/importutils.cxx |1 +
 oox/source/ole/axcontrol.cxx  |1 +
 oox/source/ole/vbacontrol.cxx |1 +
 oox/source/ole/vbaproject.cxx |1 +
 oox/source/ppt/animationspersist.cxx  |1 +
 oox/source/ppt/commonbehaviorcontext.cxx  |1 +
 oox/source/ppt/pptimport.cxx  |1 +
 oox/source/ppt/pptshape.cxx   |1 +
 oox/source/ppt/pptshapecontext.cxx|2 ++
 oox/source/ppt/presentationfragmenthandler.cxx|1 +
 oox/source/ppt/slidefragmenthandler.cxx   |1 +
 oox/source/ppt/slidetransition.cxx|1 +
 oox/source/ppt/timenodelistcontext.cxx|1 +
 oox/source/ppt/timetargetelementcontext.cxx   |1 +
 

[Libreoffice-commits] core.git: l10ntools/source scp2/source solenv/inc

2018-05-23 Thread Christian Lohmaier
 l10ntools/source/ulfconv/msi-encodinglist.txt |1 +
 scp2/source/ooo/module_langpack.ulf   |6 ++
 solenv/inc/langlist.mk|1 +
 3 files changed, 8 insertions(+)

New commits:
commit f8fb04d0af7b1d21b8638e92922d0965e507c5d9
Author: Christian Lohmaier 
Date:   Wed May 23 11:12:23 2018 +0200

tdf#117729 add Frisian (fy) UI langauge

Change-Id: I46f75e969b1252a9511507c116f44578dfbd
Reviewed-on: https://gerrit.libreoffice.org/54699
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/l10ntools/source/ulfconv/msi-encodinglist.txt 
b/l10ntools/source/ulfconv/msi-encodinglist.txt
index 9670f9ea0af6..44d7f91b2650 100644
--- a/l10ntools/source/ulfconv/msi-encodinglist.txt
+++ b/l10ntools/source/ulfconv/msi-encodinglist.txt
@@ -58,6 +58,7 @@ fi   0  1035
 fo   0  1080   # Faroese
 fr   0  1036
 fr-CA0  3084
+fy   0  1122   # Frisian
 fur  0  1585
 ga   0  2108   # Irish
 gd   0  1084   # Gaelic (Scotland)
diff --git a/scp2/source/ooo/module_langpack.ulf 
b/scp2/source/ooo/module_langpack.ulf
index 113f01906c5a..ca1c40b2a7db 100644
--- a/scp2/source/ooo/module_langpack.ulf
+++ b/scp2/source/ooo/module_langpack.ulf
@@ -40,6 +40,12 @@ en-US = "French"
 [STR_DESC_MODULE_LANGPACK_FR]
 en-US = "Installs the French user interface"
 
+[STR_NAME_MODULE_LANGPACK_FY]
+en-US = "Frisian"
+
+[STR_DESC_MODULE_LANGPACK_FY]
+en-US = "Installs the Frisian user interface"
+
 [STR_NAME_MODULE_LANGPACK_IT]
 en-US = "Italian"
 
diff --git a/solenv/inc/langlist.mk b/solenv/inc/langlist.mk
index 41b557a420c4..d0c5cb5cba78 100644
--- a/solenv/inc/langlist.mk
+++ b/solenv/inc/langlist.mk
@@ -49,6 +49,7 @@ eu \
 fa \
 fi \
 fr \
+fy \
 ga \
 gd \
 gl \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2018-05-07 Thread Olivier Hallot
 l10ntools/source/xmlparse.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 42b8d1c00e83c3907da7d14d21ebc0d203233a78
Author: Olivier Hallot 
Date:   Thu May 3 13:00:58 2018 -0300

tdf#116745 handle  element when localizing

The  element was brought to Pootle by wrapping it in a
 element. However, the localized build helper changed
 < and > to HTML entities, which broke the rendering of the localized
 element.

This patch addresses the issue and keep the < and > as is.

Change-Id: If03c02b8a4170284a5f7e5caa58709b3832151ed
Reviewed-on: https://gerrit.libreoffice.org/53810
Tested-by: Jenkins 
Reviewed-by: Olivier Hallot 

diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index 297b736dae22..f8faf8538089 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -1058,11 +1058,12 @@ icu::UnicodeString lcl_QuotRange(
 
 bool lcl_isTag( const icu::UnicodeString& rString )
 {
-static const int nSize = 14;
+static const int nSize = 15;
 static const icu::UnicodeString vTags[nSize] = {
 "ahelp", "link", "item", "emph", "defaultinline",
 "switchinline", "caseinline", "variable",
-"bookmark_value", "image", "embedvar", "alt", "sup", "sub" };
+"bookmark_value", "image", "object",
+"embedvar", "alt", "sup", "sub" };
 
 for( int nIndex = 0; nIndex < nSize; ++nIndex )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2017-12-07 Thread Julien Nabet
 l10ntools/source/pocheck.cxx |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 96829f75aa29411060a60c45f9553be3722b5247
Author: Julien Nabet 
Date:   Thu Dec 7 20:40:18 2017 +0100

Replace list by vector in pocheck (l10ntools)

+ use for range loops which included std::list while at it.

Change-Id: If80e63e54f6ba39b38f5de92f97642737727e60a
Reviewed-on: https://gerrit.libreoffice.org/46039
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx
index fbf42689082f..dc56014b083a 100644
--- a/l10ntools/source/pocheck.cxx
+++ b/l10ntools/source/pocheck.cxx
@@ -9,7 +9,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -21,7 +20,7 @@ static void checkStyleNames(const OString& aLanguage)
 {
 std::map aLocalizedStyleNames;
 std::map aLocalizedNumStyleNames;
-std::list repeatedEntries;
+std::vector repeatedEntries;
 
 OString aPoPath = OString(getenv("SRC_ROOT")) +
   "/translations/source/" +
@@ -106,8 +105,9 @@ static void checkStyleNames(const OString& aLanguage)
 aPoInput.readEntry(aPoEntry);
 if( aPoInput.eof() )
 break;
-for ( std::list::iterator it=repeatedEntries.begin(); 
it!=repeatedEntries.end(); ++it) {
-if (it->getMsgId() == aPoEntry.getMsgId() && it->getGroupId() == 
aPoEntry.getGroupId()) {
+for (auto const& repeatedEntry : repeatedEntries)
+{
+if (repeatedEntry.getMsgId() == aPoEntry.getMsgId() && 
repeatedEntry.getGroupId() == aPoEntry.getGroupId()) {
 bError = true;
 break;
 }
@@ -135,7 +135,7 @@ static void checkFunctionNames(const OString& aLanguage)
 std::map aLocalizedFunctionNames;
 std::map aLocalizedCoreFunctionNames;
 
-std::list repeatedEntries;
+std::vector repeatedEntries;
 
 OString aPoPaths[4];
 OUString aPoPathURL;
@@ -324,9 +324,9 @@ static void checkFunctionNames(const OString& aLanguage)
 aPoInput.readEntry(aPoEntry);
 if( aPoInput.eof() )
 break;
-for ( std::list::iterator it=repeatedEntries.begin(); 
it!=repeatedEntries.end(); ++it)
+for (auto const& repeatedEntry : repeatedEntries)
 {
-if (it->getMsgId() == aPoEntry.getMsgId() && it->getGroupId() 
== aPoEntry.getGroupId())
+if (repeatedEntry.getMsgId() == aPoEntry.getMsgId() && 
repeatedEntry.getGroupId() == aPoEntry.getGroupId())
 {
 bError = true;
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2017-08-19 Thread Andrea Gelmini
 l10ntools/source/gL10nMem.cxx |   10 --
 1 file changed, 10 deletions(-)

New commits:
commit 8f5e3852428b84ce876cbd0e5996acdd6bacefca
Author: Andrea Gelmini 
Date:   Sat Aug 19 00:18:03 2017 +0200

sdstring.src no more exists

Change-Id: I9cc937daa135ad35c1abca66a926d2fe40040dc4
Reviewed-on: https://gerrit.libreoffice.org/41315
Tested-by: Jenkins 
Reviewed-by: Jochen Nitschke 

diff --git a/l10ntools/source/gL10nMem.cxx b/l10ntools/source/gL10nMem.cxx
index 1a12b1d884c3..b8668f854666 100644
--- a/l10ntools/source/gL10nMem.cxx
+++ b/l10ntools/source/gL10nMem.cxx
@@ -652,16 +652,6 @@ bool l10nMem::convFilterWarning(const string& sSourceFile,
 return true;
 }
 }
-if (sSourceFile == "source/dialog/sdstring.src") {
-if (sKey == "RID_SVXSTR_LIGHTGREY.String.Text" ||
-sKey == "RID_SVXSTR_LIGHTBLUE.String.Text" ||
-sKey == "RID_SVXSTR_LIGHTGREEN.String.Text" ||
-sKey == "RID_SVXSTR_LIGHTCYAN.String.Text" ||
-sKey == "RID_SVXSTR_LIGHTRED.String.Text" ||
-sKey == "RID_SVXSTR_LIGHTMAGENTA.String.Text" ||
-sKey == "RID_SVXSTR_COLOR_SUN.String.Text")
-return true;
-}
 if (sSourceFile == "source/svdraw/svdstr.src" && sKey == 
"SIP_XA_FORMTXTSTDFORM.String.Text")
 return true;
 return false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2017-08-18 Thread Julien Nabet
 l10ntools/source/gRun.sh |  272 +++
 1 file changed, 21 insertions(+), 251 deletions(-)

New commits:
commit 92507dd3dc3eaf95d540475ac3e7887495030ebc
Author: Julien Nabet 
Date:   Fri Aug 18 19:44:26 2017 +0200

Remove refs to deleted src files

following 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=00657aef09d854c74fb426a935a3e8b1fc390bb0

Change-Id: I34a119676257eb3b3caa318eb788f16e7fd1bd4b
Reviewed-on: https://gerrit.libreoffice.org/41307
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/l10ntools/source/gRun.sh b/l10ntools/source/gRun.sh
index e7de0cf05fd2..d37fff547fea 100755
--- a/l10ntools/source/gRun.sh
+++ b/l10ntools/source/gRun.sh
@@ -202,213 +202,53 @@ ${MYCMD} --base 
reportbuilder/java/org/libreoffice/report/function/metadata --fi
 
 # .src files
 
-${MYCMD} --files accessibility/source/helper/accessiblestrings.src
+${MYCMD} --base basctl/source/basicide --files moduldlg.src
 
-${MYCMD} --files avmedia/source/framework/mediacontrol.src
+${MYCMD} --base chart2/source/controller/dialogs --files Bitmaps.src
 
-${MYCMD} --files avmedia/source/viewer/mediawindow.src
+${MYCMD} --base connectivity/source/resource --files conn_log_res.src
 
-${MYCMD} --base basctl/source/basicide --files basicprint.src basidesh.src 
macrodlg.src moduldlg.src objdlg.src
+${MYCMD} --base cui/source/customize --files acccfg.src
 
-${MYCMD} --files basctl/source/dlged/dlgresid.src
+${MYCMD} --base cui/source/dialogs --files multipat.src svuidlg.src
 
-${MYCMD} --files basic/source/classes/sb.src
+${MYCMD} --base cui/source/options --files optgdlg.src personalization.src
 
-${MYCMD} --files basic/source/sbx/format.src
+${MYCMD} --base cui/source/tabpages --files align.src page.src paragrph.src
 
-${MYCMD} --base chart2/source/controller/dialogs --files Bitmaps.src 
Strings.src Strings_ChartTypes.src Strings_Scale.src Strings_Statistic.src
+${MYCMD} --base desktop/source/deployment/gui --files dp_gui_backend.src 
dp_gui_dialog2.src
 
-${MYCMD} --base connectivity/source/resource --files conn_error_message.src 
conn_log_res.src conn_shared_res.src
+${MYCMD} --base extensions/source/bibliography --files toolbar.src
 
-${MYCMD} --base cui/source/customize --files acccfg.src cfg.src macropg.src
-
-${MYCMD} --base cui/source/dialogs --files fmsearch.src gallery.src 
hyperdlg.src multipat.src passwdomdlg.src scriptdlg.src svuidlg.src
-
-${MYCMD} --base cui/source/options --files connpooloptions.src dbregister.src 
doclinkdialog.src optchart.src optcolor.src optdict.src optfltr.src optgdlg.src 
optinet2.src optjava.src optlingu.src optpath.src personalization.src 
treeopt.src
-
-${MYCMD} --base cui/source/tabpages --files align.src border.src 
frmdirlbox.src page.src paragrph.src strings.src
-
-${MYCMD} --files dbaccess/source/core/resource/strings.src
-
-${MYCMD} --files dbaccess/source/ext/macromigration/macromigration.src
-
-${MYCMD} --files dbaccess/source/sdbtools/resource/sdbt_strings.src
-
-${MYCMD} --files dbaccess/source/ui/app/app.src
-
-${MYCMD} --base dbaccess/source/ui/browser --files sbabrw.src sbagrid.src
-
-${MYCMD} --base dbaccess/source/ui/control --files TableGrantCtrl.src 
tabletree.src undosqledit.src
-
-${MYCMD} --base dbaccess/source/ui/dlg --files AutoControls.src 
ConnectionPage.src dbadmin.src dbadmin2.src dbadminsetup.src directsql.src 
indexdialog.src paramdialog.src sqlmessage.src UserAdmin.src
-
-${MYCMD} --base dbaccess/source/ui/misc --files dbumiscres.src WizardPages.src
-
-${MYCMD} --base dbaccess/source/ui/querydesign --files query.src querydlg.src
-
-${MYCMD} --files dbaccess/source/ui/relationdesign/relation.src
-
-${MYCMD} --files dbaccess/source/ui/tabledesign/table.src
-
-${MYCMD} --base dbaccess/source/ui/uno --files copytablewizard.src
-
-${MYCMD} --files desktop/source/app/desktop.src
-
-${MYCMD} --base desktop/source/deployment/gui --files dp_gui_backend.src 
dp_gui_dialog.src dp_gui_dialog2.src dp_gui_updatedialog.src 
dp_gui_updateinstalldialog.src dp_gui_versionboxes.src
-
-${MYCMD} --files desktop/source/deployment/manager/dp_manager.src
-
-${MYCMD} --files desktop/source/deployment/misc/dp_misc.src
-
-${MYCMD} --files desktop/source/deployment/registry/component/dp_component.src
-
-${MYCMD} --files 
desktop/source/deployment/registry/configuration/dp_configuration.src
-
-${MYCMD} --files desktop/source/deployment/registry/dp_registry.src
-
-${MYCMD} --files desktop/source/deployment/registry/help/dp_help.src
-
-${MYCMD} --files desktop/source/deployment/registry/package/dp_package.src
-
-${MYCMD} --files desktop/source/deployment/registry/script/dp_script.src
-
-${MYCMD} --files desktop/source/deployment/registry/sfwk/dp_sfwk.src
-
-${MYCMD} --files desktop/source/deployment/unopkg/unopkg.src
-
-${MYCMD} --files editeng/source/accessibility/accessibility.src
-
-${MYCMD} --files editeng/source/editeng/editeng.src
-

[Libreoffice-commits] core.git: l10ntools/source

2017-08-16 Thread Andrea Gelmini
 l10ntools/source/gRun.sh |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 06aaedb29255efefa3575711f4fe38df20687ef8
Author: Andrea Gelmini 
Date:   Tue Aug 15 23:53:03 2017 +0200

Removed reference to deleted file

extensions/source/propctrlr/formres.src deleted on commit
00657aef09d854c74fb426a935a3e8b1fc390bb0

Change-Id: I54853e383be936623299ae6a36fe1809add28e2a
Reviewed-on: https://gerrit.libreoffice.org/41192
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/l10ntools/source/gRun.sh b/l10ntools/source/gRun.sh
index ca2a8cc7e911..4cef94a1475c 100755
--- a/l10ntools/source/gRun.sh
+++ b/l10ntools/source/gRun.sh
@@ -292,7 +292,7 @@ ${MYCMD} --base extensions/source/bibliography --files 
bib.src sections.src tool
 
 ${MYCMD} --base extensions/source/dbpilots --files commonpagesdbp.src 
dbpilots.src gridpages.src groupboxpages.src listcombopages.src
 
-${MYCMD} --base extensions/source/propctrlr --files formlinkdialog.src 
formres.src pcrmiscres.src propres.src selectlabeldialog.src
+${MYCMD} --base extensions/source/propctrlr --files formlinkdialog.src 
pcrmiscres.src propres.src selectlabeldialog.src
 
 ${MYCMD} --files extensions/source/scanner/strings.src
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2017-07-05 Thread Stephan Bergmann
 l10ntools/source/lngmerge.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0c4d4f268f6db843419f65f9809b395352867380
Author: Stephan Bergmann 
Date:   Wed Jul 5 15:05:10 2017 +0200

loplugin:unnecessaryparen

Change-Id: I38f1462c97c6a8fc5777f0db4555c11d8201b49b

diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index 0537dd8ebb44..b412f882e914 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -220,7 +220,7 @@ bool LngParser::Merge(
 sSearch += sLang;
 sSearch += ";";
 
-if (( sLanguagesDone.indexOf( sSearch ) != -1 )) {
+if ( sLanguagesDone.indexOf( sSearch ) != -1 ) {
 LngLineList::iterator it = pLines->begin();
 std::advance( it, nPos );
 pLines->erase( it );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source linguistic/source lotuswordpro/source mysqlc/source

2017-06-25 Thread Noel Grandin
 l10ntools/source/cfgmerge.cxx   |3 +--
 l10ntools/source/export.cxx |6 ++
 l10ntools/source/lngmerge.cxx   |   11 +++
 linguistic/source/dlistimp.cxx  |   12 
 linguistic/source/iprcache.cxx  |2 +-
 linguistic/source/lngopt.cxx|3 +--
 linguistic/source/lngsvcmgr.cxx |   12 +---
 lotuswordpro/source/filter/LotusWordProImportFilter.cxx |5 ++---
 lotuswordpro/source/filter/bencont.cxx  |4 +---
 lotuswordpro/source/filter/explode.cxx  |3 +--
 lotuswordpro/source/filter/lwpatomholder.cxx|4 +---
 lotuswordpro/source/filter/lwpdrawobj.cxx   |6 ++
 lotuswordpro/source/filter/lwpframelayout.cxx   |4 +---
 lotuswordpro/source/filter/lwpfribmark.cxx  |7 ++-
 lotuswordpro/source/filter/lwpmarker.cxx|   16 
 lotuswordpro/source/filter/lwpobjstrm.cxx   |3 +--
 lotuswordpro/source/filter/lwptblformula.cxx|3 +--
 lotuswordpro/source/filter/xfilter/xftextcontent.cxx|3 +--
 mysqlc/source/mysqlc_databasemetadata.cxx   |3 +--
 mysqlc/source/mysqlc_preparedstatement.cxx  |3 +--
 mysqlc/source/mysqlc_resultset.cxx  |3 +--
 mysqlc/source/mysqlc_statement.cxx  |3 +--
 22 files changed, 38 insertions(+), 81 deletions(-)

New commits:
commit 93d42c1b23721120fd2b61ee0b8842a14fd9b6b8
Author: Noel Grandin 
Date:   Fri Jun 23 16:05:57 2017 +0200

loplugin:oncevar in l10ntools..mysqlc

Change-Id: Ifd4826f8ba4e10f2e012172fa693794d68bb6b4d
Reviewed-on: https://gerrit.libreoffice.org/39188
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/l10ntools/source/cfgmerge.cxx b/l10ntools/source/cfgmerge.cxx
index d8ec518c1a3a..e7596e85d0fc 100644
--- a/l10ntools/source/cfgmerge.cxx
+++ b/l10ntools/source/cfgmerge.cxx
@@ -262,9 +262,8 @@ void CfgParser::ExecuteAnalyzedToken( int nToken, char 
*pToken )
 else
 {
 OString sError( "Misplaced close tag: " );
-OString sInFile(" in file ");
 sError += sToken;
-sError += sInFile;
+sError += " in file ";
 sError += global::inputPathname;
 yyerror(sError.getStr());
 std::exit(EXIT_FAILURE);
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index b4995ca04fb5..a3f98ef3f2ac 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -152,8 +152,7 @@ bool ResData::SetId( const OString& rId, IdLevel nLevel )
 
 if ( bChild && bChildWithText )
 {
-OString sError("ResId after child definition");
-yyerror(sError.getStr());
+yyerror("ResId after child definition");
 SetError();
 }
 
@@ -830,9 +829,8 @@ OString Export::FullId()
 }
 if (sFull.getLength() > 255)
 {
-OString sError("GroupId > 255 chars");
 printf("GroupID = %s\n", sFull.getStr());
-yyerror(sError.getStr());
+yyerror("GroupId > 255 chars");
 }
 
 return sFull.makeStringAndClear();
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index 540110f99822..0537dd8ebb44 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -122,14 +122,9 @@ void LngParser::WritePO(PoOfstream ,
 OStringHashMap _inout, const OString ,
 const OString )
 {
-
-   bool bExport = true;
-   if ( bExport )
-{
-common::writePoEntry(
-"Ulfex", aPOStream, rActFileName, "LngText",
-rID, OString(), rText_inout.count("x-comment") ? 
rText_inout["x-comment"] : OString(), rText_inout["en-US"]);
-   }
+common::writePoEntry(
+"Ulfex", aPOStream, rActFileName, "LngText",
+rID, OString(), rText_inout.count("x-comment") ? 
rText_inout["x-comment"] : OString(), rText_inout["en-US"]);
 }
 
 bool LngParser::isNextGroup(OString _out, const OString _in)
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index bff87e2f66ad..02bd690bd314 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -289,8 +289,6 @@ void DicList::SearchForDictionaries(
 const OUString *pDirCnt = aDirCnt.getConstArray();
 sal_Int32 nEntries = aDirCnt.getLength();
 
-OUString aDCN("dcn");
-OUString aDCP("dcp");
 for (sal_Int32 i = 0;  i < nEntries;  ++i)
 {
 OUString aURL( pDirCnt[i] );
@@ -303,9 +301,9 @@ void DicList::SearchForDictionaries(
 sal_Int32 nPos  = aURL.indexOf('.');
 OUString aExt( 

[Libreoffice-commits] core.git: l10ntools/source

2017-06-19 Thread Gabor Kelemen
 l10ntools/source/xmlparse.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6721e35f5a24c0a3ca343030115f1bf58f0627b5
Author: Gabor Kelemen 
Date:   Sun Jun 11 23:48:24 2017 +0200

tdf#106175 Support  tag in localized help text as well

Change-Id: If038daf4350bfcd2e7146809f63ee4f062a0dc81
Reviewed-on: https://gerrit.libreoffice.org/38670
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 

diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index 4ba87411e8b5..7717b22d3157 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -1064,11 +1064,11 @@ icu::UnicodeString lcl_QuotRange(
 
 bool lcl_isTag( const icu::UnicodeString& rString )
 {
-static const int nSize = 13;
+static const int nSize = 14;
 static const icu::UnicodeString vTags[nSize] = {
 "ahelp", "link", "item", "emph", "defaultinline",
 "switchinline", "caseinline", "variable",
-"bookmark_value", "image", "embedvar", "alt", "sup" };
+"bookmark_value", "image", "embedvar", "alt", "sup", "sub" };
 
 for( int nIndex = 0; nIndex < nSize; ++nIndex )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source scp2/source solenv/inc

2017-05-28 Thread Christian Lohmaier
 l10ntools/source/ulfconv/msi-encodinglist.txt |1 +
 scp2/source/ooo/module_langpack.ulf   |6 ++
 solenv/inc/langlist.mk|1 +
 3 files changed, 8 insertions(+)

New commits:
commit 826f1bca40a01f0a249d5b6cbb7c39c11638a060
Author: Christian Lohmaier 
Date:   Sun May 28 18:22:19 2017 +0200

rdm#2247 enable Upper Sorbian for languagepack/UI

Change-Id: Id497d8032668823c6db07eb179ad4484241b7285

diff --git a/l10ntools/source/ulfconv/msi-encodinglist.txt 
b/l10ntools/source/ulfconv/msi-encodinglist.txt
index 9c85d9db78ff..9670f9ea0af6 100644
--- a/l10ntools/source/ulfconv/msi-encodinglist.txt
+++ b/l10ntools/source/ulfconv/msi-encodinglist.txt
@@ -70,6 +70,7 @@ hi   0  1081
 hr   0  1050   # Croatian
 ht   0  1626   # Haitian
 hu   0  1038
+hsb  0  1070   # Upper Sorbian
 hy   0  1067   # Armenian
 id   0  1057   # Indonesian
 is   0  1039   # Icelandic
diff --git a/scp2/source/ooo/module_langpack.ulf 
b/scp2/source/ooo/module_langpack.ulf
index de03f39267bf..113f01906c5a 100644
--- a/scp2/source/ooo/module_langpack.ulf
+++ b/scp2/source/ooo/module_langpack.ulf
@@ -100,6 +100,12 @@ en-US = "Dutch"
 [STR_DESC_MODULE_LANGPACK_NL]
 en-US = "Installs the Dutch user interface"
 
+[STR_NAME_MODULE_LANGPACK_HSB]
+en-US = "Upper Sorbian"
+
+[STR_DESC_MODULE_LANGPACK_HSB]
+en-US = "Installs the Upper Sorbian user interface"
+
 [STR_NAME_MODULE_LANGPACK_HU]
 en-US = "Hungarian"
 
diff --git a/solenv/inc/langlist.mk b/solenv/inc/langlist.mk
index 2a1566e19fcb..41b557a420c4 100644
--- a/solenv/inc/langlist.mk
+++ b/solenv/inc/langlist.mk
@@ -55,6 +55,7 @@ gl \
 gu \
 gug \
 he \
+hsb \
 hi \
 hr \
 hu \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2017-05-26 Thread Caolán McNamara
 l10ntools/source/localize.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 8119d0ceb7e5d4c6dba406c998ad05f143f36f67
Author: Caolán McNamara 
Date:   Fri May 26 13:23:53 2017 +0100

writerperfect translations missing

persumably because there were never extracted to be available
for translation

Change-Id: Ib9d37105a41c19898577ba8acec121b87e3af9e5

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 2dfee48d5e88..2d3265871720 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -286,6 +286,7 @@ bool includeProject(const OString& rProject) {
 "uui",
 "vcl",
 "wizards",
+"writerperfect",
 "xmlsecurity" };
 for (size_t i = 0; i != SAL_N_ELEMENTS(projects); ++i) {
 if (rProject == projects[i]) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2017-04-28 Thread Christian Lohmaier
 l10ntools/source/po.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 11468ea907f7114370438db87012fb74a355bc25
Author: Christian Lohmaier 
Date:   Fri Apr 28 16:45:12 2017 +0200

allow itemlist-method's multi-line msgid strings in msgctxt

otherwise pocheck will file on strings like like e.g.

 #: analysis.src
 msgctxt ""
 "analysis.src\n"
 "ANALYSIS_Weeknum\n"
 "Returns the number of the calendar week in which the specified date 
occurs.\n"
 "This function exists for interoperability with older Microsoft Excel 
documents, for new documents use WEEKNUM instead.\n"
 "itemlist.text"
 msgid ""
 "Returns the number of the calendar week in which the specified date 
occurs.\n"
 "This function exists for interoperability with older Microsoft Excel 
documents, for new documents use WEEKNUM instead."
 msgstr ""

Change-Id: Ib64a989933ca42c5119b0ecf2339f693793d4e96

diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 87b78dd72467..7bfa070e64ce 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -491,7 +491,6 @@ bool lcl_CheckInputEntry(const GenPoEntry& rEntry)
 const OString sType = sMsgCtxt.copy( nLastDot + 1 );
 return !rEntry.getReference().isEmpty() &&
 nFirstEndLine > 0 &&
-(nLastEndLine == nFirstEndLine || nLastEndLine == 
sMsgCtxt.indexOf('\n',nFirstEndLine+1)) &&
 nLastDot - nLastEndLine > 1 &&
 (sType == "text" || sType == "quickhelptext" || sType == "title")&&
 !rEntry.getMsgId().isEmpty();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2017-02-27 Thread Stephan Bergmann
 l10ntools/source/export.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 431708c5eb27e6fa3675d17246891d717c0713ec
Author: Stephan Bergmann 
Date:   Mon Feb 27 13:00:55 2017 +0100

loplugin:loopvartoosmall

Change-Id: I580639aecc4cf6a214a7aaba3bbe92f7459856d5

diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 47f46a8..37f0d64 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -347,8 +347,7 @@ void Export::Execute( int nToken, const char * pToken )
 sal_uInt16 nOpen = 0;
 sal_uInt16 nClose = 0;
 bool bReadOver1 = false;
-sal_uInt16 i = 0;
-for ( i = 0; i < sToken.getLength(); i++ ) {
+for ( sal_Int32 i = 0; i < sToken.getLength(); i++ ) {
 if ( sToken[i] == '"' )
 bReadOver1 = !bReadOver1;
 if ( !bReadOver1 && ( sToken[i] == '{' ))
@@ -356,7 +355,7 @@ void Export::Execute( int nToken, const char * pToken )
 }
 
 bReadOver1 = false;
-for ( i = 0; i < sToken.getLength(); i++ ) {
+for ( sal_Int32 i = 0; i < sToken.getLength(); i++ ) {
 if ( sToken[i] == '"' )
 bReadOver1 = !bReadOver1;
 if ( !bReadOver1 && ( sToken[i] == '}' ))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source wizards/com wizards/source

2017-02-19 Thread Julien Nabet
 l10ntools/source/gRun.sh |2 
 wizards/com/sun/star/wizards/common/HelpIds.java |3 
 wizards/com/sun/star/wizards/common/HelpIds.py   |2 
 wizards/source/formwizard/DlgFormDB.xdl  |   10 
 wizards/source/formwizard/FormWizard.xba |4 
 wizards/source/formwizard/dbwizres.src   |  747 ---
 wizards/source/formwizard/tools.xba  |   23 
 7 files changed, 14 insertions(+), 777 deletions(-)

New commits:
commit 82d863b4a410fa78120d2efc41bd2b3b61f21cee
Author: Julien Nabet 
Date:   Sat Feb 18 14:02:30 2017 +0100

Related tdf#99967: Cleanup after Web Wizard drop

There are still webwizard*.xhp in help/source/text/shared/autopi/

Change-Id: If54d7bfc093c8c0765fd881eeb14f62bc3517194
Reviewed-on: https://gerrit.libreoffice.org/34402
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/l10ntools/source/gRun.sh b/l10ntools/source/gRun.sh
index fb9e3c0..5b2487b 100755
--- a/l10ntools/source/gRun.sh
+++ b/l10ntools/source/gRun.sh
@@ -76,7 +76,7 @@ ${MYCMD} --base helpcontent2/source/text/shared --files 
3dsettings_toolbar.xhp f
 ${MYCMD} --base helpcontent2/source/text/shared/autokorr --files 0100.xhp 
0200.xhp 0300.xhp 0400.xhp 0500.xhp 0600.xhp 0700.xhp 
0800.xhp 0900.xhp 1000.xhp 1200.xhp 1300.xhp
 
 
-${MYCMD} --base helpcontent2/source/text/shared/autopi --files 0100.xhp 
0101.xhp 01010100.xhp 01010200.xhp 01010300.xhp 01010400.xhp 01010500.xhp 
01010600.xhp 0102.xhp 01020100.xhp 01020200.xhp 01020300.xhp 01020400.xhp 
01020500.xhp 0104.xhp 01040100.xhp 01040200.xhp 01040300.xhp 01040400.xhp 
01040500.xhp 01040600.xhp 0105.xhp 01050100.xhp 01050200.xhp 01050300.xhp 
01050400.xhp 01050500.xhp 0109.xhp 01090100.xhp 01090200.xhp 01090210.xhp 
01090220.xhp 01090300.xhp 01090400.xhp 01090500.xhp 01090600.xhp 0110.xhp 
01100100.xhp 01100150.xhp 01100200.xhp 01100300.xhp 01100400.xhp 01100500.xhp 
0111.xhp 01110100.xhp 01110200.xhp 01110300.xhp 01110400.xhp 01110500.xhp 
01110600.xhp 0112.xhp 01120100.xhp 01120200.xhp 01120300.xhp 01120400.xhp 
01120500.xhp 0113.xhp 01130100.xhp 01130200.xhp 0115.xhp 0117.xhp 
01170200.xhp 01170300.xhp 01170400.xhp 01170500.xhp webwizard00.xhp 
webwizard01.xhp webwizard02.xhp webwizard03.xhp webwizard04.xhp webwizard
 05.xhp webwizard05bi.xhp webwizard05is.xhp webwizard06.xhp webwizard07.xhp 
webwizard07fc.xhp
+${MYCMD} --base helpcontent2/source/text/shared/autopi --files 0100.xhp 
0101.xhp 01010100.xhp 01010200.xhp 01010300.xhp 01010400.xhp 01010500.xhp 
01010600.xhp 0102.xhp 01020100.xhp 01020200.xhp 01020300.xhp 01020400.xhp 
01020500.xhp 0104.xhp 01040100.xhp 01040200.xhp 01040300.xhp 01040400.xhp 
01040500.xhp 01040600.xhp 0105.xhp 01050100.xhp 01050200.xhp 01050300.xhp 
01050400.xhp 01050500.xhp 0109.xhp 01090100.xhp 01090200.xhp 01090210.xhp 
01090220.xhp 01090300.xhp 01090400.xhp 01090500.xhp 01090600.xhp 0110.xhp 
01100100.xhp 01100150.xhp 01100200.xhp 01100300.xhp 01100400.xhp 01100500.xhp 
0111.xhp 01110100.xhp 01110200.xhp 01110300.xhp 01110400.xhp 01110500.xhp 
01110600.xhp 0112.xhp 01120100.xhp 01120200.xhp 01120300.xhp 01120400.xhp 
01120500.xhp 0113.xhp 01130100.xhp 01130200.xhp 0115.xhp 0117.xhp 
01170200.xhp 01170300.xhp 01170400.xhp 01170500.xhp
 
 ${MYCMD} --base helpcontent2/source/text/shared/explorer/database --files 
0200.xhp 0202.xhp 02010100.xhp 02010101.xhp 0400.xhp 0403.xhp 
0500.xhp 0501.xhp 0502.xhp 0503.xhp 0501.xhp 05010100.xhp 
0502.xhp 05020100.xhp 0503.xhp 05030100.xhp 05030200.xhp 05030300.xhp 
05030400.xhp 0504.xhp 05040100.xhp 05040200.xhp 1102.xhp 1102.xhp 
1103.xhp 11030100.xhp 1108.xhp 1109.xhp 11150200.xhp 1117.xhp 
11170100.xhp 3000.xhp 3010.xhp dabaadvprop.xhp dabaadvpropdat.xhp 
dabaadvpropgen.xhp dabadoc.xhp dabaprop.xhp dabapropadd.xhp dabapropcon.xhp 
dabapropgen.xhp dabawiz00.xhp dabawiz01.xhp dabawiz02.xhp dabawiz02access.xhp 
dabawiz02adabas.xhp dabawiz02ado.xhp dabawiz02dbase.xhp dabawiz02jdbc.xhp 
dabawiz02ldap.xhp dabawiz02mysql.xhp dabawiz02odbc.xhp dabawiz02oracle.xhp 
dabawiz02spreadsheet.xhp dabawiz02text.xhp dabawiz03auth.xhp main.xhp 
menubar.xhp menuedit.xhp menufile.xhp menufilesave.xhp menuinsert.xhp 
menutools.xhp me
 nuview.xhp migrate_macros.xhp password.xhp querywizard00.xhp querywizard01.xhp 
querywizard02.xhp querywizard03.xhp querywizard04.xhp querywizard05.xhp 
querywizard06.xhp querywizard07.xhp querywizard08.xhp rep_datetime.xhp 
rep_main.xhp rep_navigator.xhp rep_pagenumbers.xhp rep_prop.xhp rep_sort.xhp 
tablewizard00.xhp tablewizard01.xhp tablewizard02.xhp tablewizard03.xhp 
tablewizard04.xhp toolbars.xhp
 
diff --git a/wizards/com/sun/star/wizards/common/HelpIds.java 

[Libreoffice-commits] core.git: l10ntools/source

2017-02-08 Thread Stephan Bergmann
 l10ntools/source/localize.cxx |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 42d2bdcf051abc348529ba1de1c93b824d950db2
Author: Stephan Bergmann 
Date:   Wed Feb 8 11:14:56 2017 +0100

And more blind fix for apparently buggy GCC 4.8

Change-Id: I0aad8ccf24eca383c763010cfdefba19465c487d

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index f091d5b..e7df5bb 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -153,16 +153,16 @@ bool handleFile(
 bool positive;
 };
 static Command const commands[] = {
-{ ".src", "transex3", false },
-{ ".hrc", "transex3", true },
-{ ".ulf", "ulfex", false },
-{ ".xcu", "cfgex", false },
-{ ".xrm", "xrmex", false },
-{ "description.xml", "xrmex", true },
-{ ".xhp", "helpex", false },
-{ ".properties", "propex", false },
-{ ".ui", "uiex", false },
-{ ".tree", "treex", false } };
+{ OUStringLiteral(".src"), "transex3", false },
+{ OUStringLiteral(".hrc"), "transex3", true },
+{ OUStringLiteral(".ulf"), "ulfex", false },
+{ OUStringLiteral(".xcu"), "cfgex", false },
+{ OUStringLiteral(".xrm"), "xrmex", false },
+{ OUStringLiteral("description.xml"), "xrmex", true },
+{ OUStringLiteral(".xhp"), "helpex", false },
+{ OUStringLiteral(".properties"), "propex", false },
+{ OUStringLiteral(".ui"), "uiex", false },
+{ OUStringLiteral(".tree"), "treex", false } };
 for (size_t i = 0; i != SAL_N_ELEMENTS(commands); ++i)
 {
 if (rUrl.endsWith(commands[i].extension) &&
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2017-02-08 Thread Stephan Bergmann
 l10ntools/source/localize.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 88692a2d244b7e85a20b6b1782873347326cba03
Author: Stephan Bergmann 
Date:   Wed Feb 8 10:57:00 2017 +0100

This should have been OUStringLiteral

(which hopefully also fixes some tb's complaints about the code)

Change-Id: Ie7529ad40c5c91214c281e84461888525cbbf479

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 4a52300..f091d5b 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -148,7 +148,7 @@ bool handleFile(
 const OString& rPotDir, bool bInitPoFile )
 {
 struct Command {
-OUString extension;
+OUStringLiteral extension;
 OString executable;
 bool positive;
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source sw/AllLangResTarget_sw.mk sw/source

2016-12-13 Thread Eike Rathke
 l10ntools/source/gRun.sh   |2 -
 sw/AllLangResTarget_sw.mk  |1 
 sw/source/ui/misc/numberingtypelistbox.src |   54 -
 sw/source/uibase/inc/misc.hrc  |1 
 4 files changed, 1 insertion(+), 57 deletions(-)

New commits:
commit 97490635ef1b383b8c9759653edb4836015ba6d2
Author: Eike Rathke 
Date:   Tue Dec 13 18:57:00 2016 +0100

remove now unused STRRES_NUMTYPES sw/source/ui/misc/numberingtypelistbox.src

Change-Id: Ie9cdc0418cba515c2a10479695ab4f4814dd96b0

diff --git a/l10ntools/source/gRun.sh b/l10ntools/source/gRun.sh
index 0f5945a..6fb1080 100755
--- a/l10ntools/source/gRun.sh
+++ b/l10ntools/source/gRun.sh
@@ -462,7 +462,7 @@ ${MYCMD} --files sw/source/ui/globdoc/globdoc.src
 
 ${MYCMD} --base sw/source/ui/index --files cnttab.src idxmrk.src
 
-${MYCMD} --base sw/source/ui/misc --files glossary.src 
numberingtypelistbox.src swruler.src
+${MYCMD} --base sw/source/ui/misc --files glossary.src swruler.src
 
 ${MYCMD} --files sw/source/ui/shells/shells.src
 
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
index 03f7f3e..536821e 100644
--- a/sw/AllLangResTarget_sw.mk
+++ b/sw/AllLangResTarget_sw.mk
@@ -100,7 +100,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
 sw/source/ui/index/cnttab.src \
 sw/source/ui/index/idxmrk.src \
 sw/source/ui/misc/glossary.src \
-sw/source/ui/misc/numberingtypelistbox.src \
 sw/source/ui/misc/swruler.src \
 sw/source/ui/shells/shells.src \
 sw/source/ui/sidebar/PagePropertyPanel.src \
diff --git a/sw/source/ui/misc/numberingtypelistbox.src 
b/sw/source/ui/misc/numberingtypelistbox.src
deleted file mode 100644
index cbd9873..000
--- a/sw/source/ui/misc/numberingtypelistbox.src
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "misc.hrc"
-
-StringArray STRRES_NUMTYPES
-{
-ItemList [ en-US ] =
-{
-< "None" ;  5/*SVX_NUM_NUMBER_NONE */; > ;
-< "Bullet" ;6/*SVX_NUM_CHAR_SPECIAL*/; > ;
-< "Graphics" ;  8/*SVX_NUM_BITMAP  */; > ;
-< "1, 2, 3, ..." ;  4/*SVX_NUM_ARABIC  */; > ;
-< "A, B, C, ..." ;  0/*SVX_NUM_CHARS_UPPER_LETTER  */; > ;
-< "a, b, c, ..." ;  1/*SVX_NUM_CHARS_LOWER_LETTER  */; > ;
-< "I, II, III, ..." ;   2/*SVX_NUM_ROMAN_UPPER */; > ;
-< "i, ii, iii, ..." ;   3/*SVX_NUM_ROMAN_LOWER */; > ;
-< "A, .., AA, .., AAA, ..." ;   9/*SVX_NUM_CHARS_UPPER_LETTER_N*/; > ;
-< "a, .., aa, .., aaa, ..." ;  10/*SVX_NUM_CHARS_LOWER_LETTER_N*/; > ;
-< "Native Numbering" ;  12 /*NATIVE_NUMBERING  
 */; > ;
-< "А, Б, .., Аа, Аб, ... (Bulgarian)" ; 38 
/*CHARS_CYRILLIC_UPPER_LETTER_BG */; > ;
-< "а, б, .., аа, аб, ... (Bulgarian)" ; 39 
/*CHARS_CYRILLIC_LOWER_LETTER_BG */; > ;
-< "А, Б, .., Аа, Бб, ... (Bulgarian)" ; 40 
/*CHARS_CYRILLIC_UPPER_LETTER_N_BG   */; > ;
-< "а, б, .., аа, бб, ... (Bulgarian)" ; 41 
/*CHARS_CYRILLIC_LOWER_LETTER_N_BG   */; > ;
-< "А, Б, .., Аа, Аб, ... (Russian)" ;   42 
/*CHARS_CYRILLIC_UPPER_LETTER_RU */; > ;
-< "а, б, .., аа, аб, ... (Russian)" ;   43 
/*CHARS_CYRILLIC_LOWER_LETTER_RU */; > ;
-< "А, Б, .., Аа, Бб, ... (Russian)" ;   44 
/*CHARS_CYRILLIC_UPPER_LETTER_N_RU   */; > ;
-< "а, б, .., аа, бб, ... (Russian)" ;   45 
/*CHARS_CYRILLIC_LOWER_LETTER_N_RU   */; > ;
-< "А, Б, .., Аа, Аб, ... (Serbian)" ;   48 
/*CHARS_CYRILLIC_UPPER_LETTER_SR */; > ;
-< "а, б, .., аа, аб, ... (Serbian)" ;   49 
/*CHARS_CYRILLIC_LOWER_LETTER_SR */; > ;
-< "А, Б, .., Аа, Бб, ... (Serbian)" ;   50 
/*CHARS_CYRILLIC_UPPER_LETTER_N_SR   */; > ;
-< "а, б, .., аа, бб, ... (Serbian)" ;   51 

[Libreoffice-commits] core.git: l10ntools/source scp2/source solenv/inc

2016-08-30 Thread Christian Lohmaier
 l10ntools/source/ulfconv/msi-encodinglist.txt |1 +
 scp2/source/ooo/module_langpack.ulf   |6 ++
 solenv/inc/langlist.mk|1 +
 3 files changed, 8 insertions(+)

New commits:
commit cc89cb56d51b4f43d999701ff97a89ff9fb5a31a
Author: Christian Lohmaier 
Date:   Wed Aug 31 00:09:47 2016 +0200

add Venetian (vec) ui language

Change-Id: I643eb91691dddf2c4ece2edb27383cb7dd0e3fdc

diff --git a/l10ntools/source/ulfconv/msi-encodinglist.txt 
b/l10ntools/source/ulfconv/msi-encodinglist.txt
index bddd659..9c85d9d 100644
--- a/l10ntools/source/ulfconv/msi-encodinglist.txt
+++ b/l10ntools/source/ulfconv/msi-encodinglist.txt
@@ -166,6 +166,7 @@ ur   0  1056   # Urdu
 ur-IN0  2080
 uz   0  1091   # Uzbek (Latin)
 ve   0  1075   # Venda
+vec  0  1685   # Venetian
 vi   0  1066   # Vietnamese
 xh   0  1076   # Xhosa
 yi   0  1085   # Yiddish
diff --git a/scp2/source/ooo/module_langpack.ulf 
b/scp2/source/ooo/module_langpack.ulf
index 41f6974..de03f39 100644
--- a/scp2/source/ooo/module_langpack.ulf
+++ b/scp2/source/ooo/module_langpack.ulf
@@ -484,6 +484,12 @@ en-US = "Venda"
 [STR_DESC_MODULE_LANGPACK_VE]
 en-US = "Installs the Venda user interface"
 
+[STR_NAME_MODULE_LANGPACK_VEC]
+en-US = "Venetian"
+
+[STR_DESC_MODULE_LANGPACK_VEC]
+en-US = "Installs the Venetian user interface"
+
 [STR_NAME_MODULE_LANGPACK_KN]
 en-US = "Kannada"
 
diff --git a/solenv/inc/langlist.mk b/solenv/inc/langlist.mk
index 26852c2..2a1566e 100644
--- a/solenv/inc/langlist.mk
+++ b/solenv/inc/langlist.mk
@@ -123,6 +123,7 @@ ug \
 uk \
 uz \
 ve \
+vec \
 vi \
 xh \
 zh-CN \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2016-05-20 Thread Noel Grandin
 l10ntools/source/common.cxx |   28 +---
 1 file changed, 13 insertions(+), 15 deletions(-)

New commits:
commit 7cffe9dd6440e0eb6a17c950b207f5fb669e8636
Author: Noel Grandin 
Date:   Fri May 20 13:21:23 2016 +0200

Convert STATE to scoped enum

Change-Id: Id2bb63be495a50376dbaccf6eeb27a900fc2ac7b

diff --git a/l10ntools/source/common.cxx b/l10ntools/source/common.cxx
index 426b09d..444aa31 100644
--- a/l10ntools/source/common.cxx
+++ b/l10ntools/source/common.cxx
@@ -10,11 +10,9 @@
 #include "common.hxx"
 
 //flags for handleArguments()
-#define STATE_NON   0x0001
-#define STATE_INPUT 0x0002
-#define STATE_OUTPUT0x0003
-#define STATE_MERGESRC  0x0005
-#define STATE_LANGUAGES 0x0006
+enum class State {
+NONE, Input, Output, MergeSrc, Languages
+};
 
 namespace common {
 
@@ -22,26 +20,26 @@ bool handleArguments(
 int argc, char * argv[], HandledArgs& o_aHandledArgs)
 {
 o_aHandledArgs = HandledArgs();
-sal_uInt16 nState = STATE_NON;
+State nState = State::NONE;
 
 for( int i = 1; i < argc; i++ )
 {
 if ( OString( argv[ i ] ).toAsciiUpperCase() == "-I" )
 {
-nState = STATE_INPUT; // next token specifies source file
+nState = State::Input; // next token specifies source file
 }
 else if ( OString( argv[ i ] ).toAsciiUpperCase() == "-O" )
 {
-nState = STATE_OUTPUT; // next token specifies the dest file
+nState = State::Output; // next token specifies the dest file
 }
 else if ( OString( argv[ i ] ).toAsciiUpperCase() == "-M" )
 {
-nState = STATE_MERGESRC; // next token specifies the merge database
+nState = State::MergeSrc; // next token specifies the merge 
database
 o_aHandledArgs.m_bMergeMode = true;
 }
 else if ( OString( argv[ i ] ).toAsciiUpperCase() == "-L" )
 {
-nState = STATE_LANGUAGES;
+nState = State::Languages;
 }
 else if ( OString( argv[ i ] ).toAsciiUpperCase() == "-B" )
 {
@@ -51,26 +49,26 @@ bool handleArguments(
 {
 switch ( nState )
 {
-case STATE_NON:
+case State::NONE:
 {
 return false;// no valid command line
 }
-case STATE_INPUT:
+case State::Input:
 {
 o_aHandledArgs.m_sInputFile = OString( argv[i] );
 }
 break;
-case STATE_OUTPUT:
+case State::Output:
 {
 o_aHandledArgs.m_sOutputFile = OString( argv[i] );
 }
 break;
-case STATE_MERGESRC:
+case State::MergeSrc:
 {
 o_aHandledArgs.m_sMergeSrc = OString( argv[i] );
 }
 break;
-case STATE_LANGUAGES:
+case State::Languages:
 {
 o_aHandledArgs.m_sLanguage = OString( argv[i] );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2016-05-20 Thread Noel Grandin
 l10ntools/source/export.cxx |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 1e470313b81ba5249181c3d8ad7429b06dd7bd53
Author: Noel Grandin 
Date:   Fri May 20 13:18:58 2016 +0200

Convert TEXT_STATE to scoped enum

Change-Id: I86822b99c81f1e6f2cd6a117f15fdc3d20d18495

diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index f9f4199..57fdd43 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -879,8 +879,7 @@ void Export::CleanValue( OString  )
 }
 }
 
-#define TXT_STATE_TEXT  0x001
-#define TXT_STATE_MACRO 0x002
+enum class TextState { Text=1, Macro };
 
 OString Export::GetText(const OString , int nToken)
 {
@@ -899,14 +898,14 @@ OString Export::GetText(const OString , int 
nToken)
 replaceAll("\\", "-=<[0x7F]>=-").
 replaceAll("\\0x7F", "-=<[0x7F]>=-");
 
-sal_uInt16 nState = TXT_STATE_TEXT;
+TextState nState = TextState::Text;
 for (sal_Int32 i = 1; i <= lcl_countOccurrences(sTmp, '"'); ++i)
 {
 OString sToken(sTmp.getToken(i, '"'));
 if (!sToken.isEmpty()) {
-if ( nState == TXT_STATE_TEXT ) {
+if ( nState == TextState::Text ) {
 sReturn += sToken;
-nState = TXT_STATE_MACRO;
+nState = TextState::Macro;
 }
 else {
 sToken = sToken.replace('\t', ' ');
@@ -923,7 +922,7 @@ OString Export::GetText(const OString , int nToken)
 sReturn += sToken;
 sReturn += " \\\"";
 }
-nState = TXT_STATE_TEXT;
+nState = TextState::Text;
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source lingucomponent/source

2016-05-10 Thread Krishna Keshav
 l10ntools/source/gL10nMem.cxx |3 ++-
 lingucomponent/source/languageguessing/altstrfunc.cxx |5 -
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 1fcd8dfb70124acc935c24e066dfd3e2144baec9
Author: Krishna Keshav 
Date:   Thu May 5 23:28:29 2016 +0530

tdf#99589 tolower / toupper - dangerous to Turks ...

replaced tolower with to AsciiLowerCase() in
lingucomponent/source/languageguessing/altstrfunc.cxx
l10ntools/source/gL10nMem.cxx

Change-Id: I1340da18b263a4a921e2e8d96c0f133fe300086e
Reviewed-on: https://gerrit.libreoffice.org/24682
Tested-by: Jenkins 
Reviewed-by: Michael Meeks 

diff --git a/l10ntools/source/gL10nMem.cxx b/l10ntools/source/gL10nMem.cxx
index 62c924a..2662121 100644
--- a/l10ntools/source/gL10nMem.cxx
+++ b/l10ntools/source/gL10nMem.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include
 using namespace std;
 
 #include "gL10nMem.hxx"
@@ -977,6 +978,6 @@ void l10nMem::keyToLower(string& sKey)
 if (ch == ' ' || ch == '*' || ch == '+' || ch == '%')
 sKey[i] = '_';
 else
-sKey[i] = tolower(ch);
+sKey[i] = toAsciiLowerCase(ch);
 }
 }
diff --git a/lingucomponent/source/languageguessing/altstrfunc.cxx 
b/lingucomponent/source/languageguessing/altstrfunc.cxx
index 1fb2943..a155ee0 100644
--- a/lingucomponent/source/languageguessing/altstrfunc.cxx
+++ b/lingucomponent/source/languageguessing/altstrfunc.cxx
@@ -20,6 +20,9 @@
 #include "altstrfunc.hxx"
 
 #include 
+#include
+
+using namespace rtl;
 
 int start(const std::string , const std::string ){
 size_t i;
@@ -30,7 +33,7 @@ int start(const std::string , const std::string ){
 min = s2.length();
 
 for(i = 0; i < min && s2[i] && s1[i] && !ret; i++){
-ret = toupper(s1[i]) - toupper(s2[i]);
+ret =   toAsciiUpperCase(s1[i]) -  toAsciiUpperCase(s2[i]);
 if(s1[i] == '.' || s2[i] == '.'){ret = 0;}//. is a neutral character
 }
 return ret;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2016-05-04 Thread jan Iversen
 l10ntools/source/gConvPo.cxx   |5 +++--
 l10ntools/source/gConvTree.cxx |2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 709ef9f91876072407c587db63851f6da73d265f
Author: jan Iversen 
Date:   Wed May 4 12:19:46 2016 +

genLang .tree files got "help_section"

Added text type to .tree files

fixed line wrap problem when saving to .pot

Change-Id: I551521bb81e21724edf8f3bfa8aba1516ca7e879

diff --git a/l10ntools/source/gConvPo.cxx b/l10ntools/source/gConvPo.cxx
index 431b58e..40be9f9 100644
--- a/l10ntools/source/gConvPo.cxx
+++ b/l10ntools/source/gConvPo.cxx
@@ -232,8 +232,9 @@ void convert_po::save(const string& sFileName,
 << "\"" << sENUStext.substr(oldPos, newPos - oldPos);
 oldPos = newPos;
 }
-outFile << "\"" << endl
-<< "\"" << sENUStext.substr(oldPos) << "\"" << endl
+if (oldPos)
+outFile << "\"" << endl << "\"";
+outFile << sENUStext.substr(oldPos) << "\"" << endl
 << "msgstr \"" << sText << "\"" << endl;
 }
 
diff --git a/l10ntools/source/gConvTree.cxx b/l10ntools/source/gConvTree.cxx
index f13d2e7..5605e1e 100644
--- a/l10ntools/source/gConvTree.cxx
+++ b/l10ntools/source/gConvTree.cxx
@@ -105,7 +105,7 @@ void convert_tree::setString(char *yytext)
 case STATE_VAL_TITLE:
  string sText = copySourceSpecial(yytext, 1);
  sText.erase(sText.size()-1);
- mcMemory.setSourceKey(miLineNo, msSourceFile, msId, sText, "", 
"", "", mbMergeMode);
+ mcMemory.setSourceKey(miLineNo, msSourceFile, msId, sText, "", 
"help_section", "", mbMergeMode);
  break;
 }
 meStateVal = STATE_VAL_NONE;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2016-05-02 Thread jan Iversen
 l10ntools/source/gConvXcu.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 6cc547b33bf3ba250b1f08dc94fd7da91860a985
Author: jan Iversen 
Date:   Mon May 2 13:07:47 2016 +

vm174 .xcu update

One project uses "." as prefix, but LO uses ".."

Change-Id: I18eaf66c54176b0c3268d9fb94a002e4b68722fe

diff --git a/l10ntools/source/gConvXcu.cxx b/l10ntools/source/gConvXcu.cxx
index 0352e98..10653bc 100644
--- a/l10ntools/source/gConvXcu.cxx
+++ b/l10ntools/source/gConvXcu.cxx
@@ -125,6 +125,7 @@ void convert_xcu::stopCollectData(char *syyText)
 
 if (useText.size()) {
 // locate key and extract it
+useKey = ".";
 for (nL = 0; nL < (int)mcStack.size() -1; ++nL)
 useKey += "." + mcStack[nL];
 mcMemory.setSourceKey(miLineNo, msSourceFile, useKey, useText, "", 
"value", mcStack[nL], mbMergeMode);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2016-04-30 Thread jan Iversen
 l10ntools/source/gL10nMem.cxx |2 
 l10ntools/source/gList.sh |   11 -
 l10ntools/source/gRun.sh  |  415 +-
 3 files changed, 12 insertions(+), 416 deletions(-)

New commits:
commit b766c766c6bfb9bf539f474168d41c466d77dcc6
Author: jan Iversen 
Date:   Sat Apr 30 12:29:45 2016 +

genlang, update to compile with VC 2015, and script cleanup

VC2015, detected a problem that VC2013 did not.

Change-Id: I4378ad5b2c831900460839aebe0a18bbc4bc062a

diff --git a/l10ntools/source/gL10nMem.cxx b/l10ntools/source/gL10nMem.cxx
index 93e1852..62c924a 100644
--- a/l10ntools/source/gL10nMem.cxx
+++ b/l10ntools/source/gL10nMem.cxx
@@ -242,7 +242,7 @@ void l10nMem::setLanguage(const string& sLanguage,
 throw showError("language " + sLanguage + " not loaded");
 
 // create language
-mcLangList.push_back(sLanguage);
+mcLangList.push_back(l10nMem_lang_list_entry(sLanguage));
 
 // add language to all ENUS entries
 iSize = mcENUSlist.size();
diff --git a/l10ntools/source/gList.sh b/l10ntools/source/gList.sh
deleted file mode 100755
index 41d04f3..000
--- a/l10ntools/source/gList.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-find . -name \*.hrc  > filelist_hrc.txt
-find . -name \*.src  > filelist_src.txt
-find . -name \*.po   > filelist_po.txt
-find . -name \*.pot  > filelist_pot.txt
-find . -name \*.tree > filelist_tree.txt
-find . -name \*.ulf  > filelist_ulf.txt
-find . -name \*.xcu  > filelist_xcu.txt
-find . -name \*.xhp  > filelist_xhp.txt
-find . -name \*.xrm  > filelist_xrm.txt
-find . -name \*.properties > filelist_properties.txt
diff --git a/l10ntools/source/gRun.sh b/l10ntools/source/gRun.sh
index 805432f..867291e 100755
--- a/l10ntools/source/gRun.sh
+++ b/l10ntools/source/gRun.sh
@@ -7,17 +7,10 @@ MYCMD='./workdir/LinkTarget/Executable/genlang.exe extract -s 
--target workdir/j
 # .xrm files
 ${MYCMD} --base readlicense_oo/docs --files readme.xrm
 
+
 # .tree and .xhp files
 ${MYCMD} --base swext/mediawiki/help --files help.tree wiki.xhp 
wikiaccount.xhp wikiformats.xhp wikisend.xhp wikisettings.xhp
 
-#${MYCMD} --base dictionaries/da_DK/help --files da/help.tree en/help.tree 
da/org.openoffice.da.hunspell.dictionaries/page1.xhp 
da/org.openoffice.da.hunspell.dictionaries/page2.xhp
-
-#${MYCMD} --files dictionaries/hu_HU/help/en/help.tree
-
-#${MYCMD} --files dictionaries/hu_HU/help/hu/help.tree
-
-#${MYCMD} --files 
dictionaries/hu_HU/help/hu/org.openoffice.hu.hunspell.dictionaries/page1.xhp
-
 ${MYCMD} --target workdir/jan//helpcontent2/auxiliary.pot --base 
helpcontent2/source/auxiliary --files sbasic.tree scalc.tree schart.tree 
shared.tree simpress.tree smath.tree swriter.tree
 
 ${MYCMD} --files nlpsolver/help/en/com.sun.star.comp.Calc.NLPSolver/help.tree
@@ -129,9 +122,6 @@ ${MYCMD} --target workdir/jan/helpcontent2/swriter.pot 
--base helpcontent2/sourc
 
 ${MYCMD} --base nlpsolver/help/en/com.sun.star.comp.Calc.NLPSolver --files 
Options.xhp Usage.xhp
 
-#${MYCMD} --base 
odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/de/com.foocorp.foo-ext
 --files page1.xhp page2.xhp subfolder/anotherpage.xhp
-
-#${MYCMD} --base 
odk/examples/DevelopersGuide/Extensions/DialogWithHelp/help/en/com.foocorp.foo-ext
 --files page1.xhp page2.xhp subfolder/anotherpage.xhp
 
 # .ulf files
 
@@ -188,296 +178,10 @@ ${MYCMD} --base sysui/desktop/share --files 
documents.ulf launcher_comment.ulf l
 
 # .hrc files
 
-
-#${MYCMD} --files accessibility/inc/accessibility/helper/accessiblestrings.hrc
-
-#${MYCMD} --files avmedia/inc/helpids.hrc
-
-#${MYCMD} --files avmedia/source/framework/mediacontrol.hrc
-
-#${MYCMD} --files avmedia/source/viewer/mediawindow.hrc
-
-#${MYCMD} --files basctl/inc/basidesh.hrc basctl/inc/helpid.hrc
-
-#${MYCMD} --files basctl/sdi/basslots.hrc
-
-#${MYCMD} --base basctl/source/basicide --files baside2.hrc macrodlg.hrc 
objdlg.hrc
-
-#${MYCMD} --files basctl/source/inc/dlgresid.hrc
-
-#${MYCMD} --files basic/inc/sb.hrc
-
-#${MYCMD} --base chart2/source/controller/dialogs --files Bitmaps.hrc 
ResourceIds.hrc
-
-#${MYCMD} --base chart2/source/controller/inc --files HelpIds.hrc 
ShapeController.hrc
-
-#${MYCMD} --files chart2/source/controller/main/DrawCommandDispatch.hrc
-
-#${MYCMD} --files chart2/source/inc/Strings.hrc
-
-#${MYCMD} --files connectivity/source/drivers/hsqldb/hsqlui.hrc
-
-#${MYCMD} --base connectivity/source/inc/resource --files ado_res.hrc 
calc_res.hrc common_res.hrc conn_shared_res.hrc dbase_res.hrc evoab2_res.hrc 
file_res.hrc hsqldb_res.hrc jdbc_log.hrc kab_res.hrc macab_res.hrc mork_res.hrc
-
-#${MYCMD} --base cui/source/customize --files acccfg.hrc cfg.hrc
-
-#${MYCMD} --base cui/source/dialogs --files fmsearch.hrc svuidlg.hrc
-
-#${MYCMD} --base cui/source/inc --files cuires.hrc gallery.hrc helpid.hrc
-
-#${MYCMD} --files cui/source/options/optsave.hrc
-
-#${MYCMD} --base cui/source/tabpages --files align.hrc border.hrc numpages.hrc 

[Libreoffice-commits] core.git: l10ntools/source

2016-03-30 Thread Wastack
 l10ntools/source/merge.cxx |4 ++--
 l10ntools/source/po.cxx|8 
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 14060e76e33cfb305c1469fecf7db688bf8a8858
Author: Wastack 
Date:   Tue Mar 29 23:49:41 2016 +0200

tdf#97966 Drop 'static' keywords

Change-Id: I2e495243b75fc239dafbf63c7644115f0a923f4a
Reviewed-on: https://gerrit.libreoffice.org/23607
Tested-by: Jenkins 
Reviewed-by: David Tardon 

diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 7789e3b..7ee2360 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -29,7 +29,7 @@
 
 namespace
 {
-static OString lcl_NormalizeFilename(const OString& rFilename)
+OString lcl_NormalizeFilename(const OString& rFilename)
 {
 return rFilename.copy(
 std::max(
@@ -37,7 +37,7 @@ namespace
 rFilename.lastIndexOf( '/' ))+1);
 };
 
-static bool lcl_ReadPoChecked(
+bool lcl_ReadPoChecked(
 PoEntry& o_rPoEntry, PoIfstream& rPoFile,
 const OString& rFileName)
 {
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 6aa7c1d..1d8223e 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -87,7 +87,7 @@ public:
 namespace
 {
 // Convert a normal string to msg/po output string
-static OString lcl_GenMsgString(const OString& rString)
+OString lcl_GenMsgString(const OString& rString)
 {
 if ( rString.isEmpty() )
 return "\"\"";
@@ -114,7 +114,7 @@ namespace
 }
 
 // Convert msg string to normal form
-static OString lcl_GenNormString(const OString& rString)
+OString lcl_GenNormString(const OString& rString)
 {
 return
 helper::unEscapeAll(
@@ -406,7 +406,7 @@ OString PoEntry::genKeyId(const OString& rGenerator)
 namespace
 {
 // Get actual time in "YEAR-MO-DA HO:MI+ZONE" form
-static OString lcl_GetTime()
+OString lcl_GetTime()
 {
 time_t aNow = time(nullptr);
 struct tm* pNow = localtime();
@@ -511,7 +511,7 @@ namespace
 {
 
 // Check the validity of read entry
-static bool lcl_CheckInputEntry(const GenPoEntry& rEntry)
+bool lcl_CheckInputEntry(const GenPoEntry& rEntry)
 {
 const OString sMsgCtxt = rEntry.getMsgCtxt();
 const sal_Int32 nFirstEndLine = sMsgCtxt.indexOf('\n');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2016-03-27 Thread Julien Nabet
 l10ntools/source/gL10nMem.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit ef34535ceb60d7d63b8d8671e4c6e9e43ffbd17d
Author: Julien Nabet 
Date:   Sun Mar 27 10:37:54 2016 +0200

cppcheck: fix duplicate Expression

Since 
https://cgit.freedesktop.org/cgit/?url=libreoffice/core/log/=range=872755ac336eb9ad33c6c98dd73deea2206acf71

Change-Id: Iee49087caf77c6cce4d52aac562c5bd3620b659f
Reviewed-on: https://gerrit.libreoffice.org/23551
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/l10ntools/source/gL10nMem.cxx b/l10ntools/source/gL10nMem.cxx
index 789ec1a..1be3dcf 100644
--- a/l10ntools/source/gL10nMem.cxx
+++ b/l10ntools/source/gL10nMem.cxx
@@ -608,8 +608,6 @@ bool l10nMem::convFilterWarning(const string& sSourceFile,
  sKey== 
"ImpressWindowState.UIElements.States.private:resource/toolpanel/DrawingFramework/Layouts.UIName")
 ||
 (sSourceFile == 
"registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu" &&
  sKey== 
"ImpressWindowState.UIElements.States.private:resource/toolpanel/DrawingFramework/TableDesign.UIName")
 ||
-(sSourceFile == 
"registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu" &&
- sKey== 
"ImpressWindowState.UIElements.States.private:resource/toolpanel/DrawingFramework/TableDesign.UIName"))
 return true;
 }
 if (msModuleName == "readlicense_oo") {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2016-03-14 Thread Caolán McNamara
 l10ntools/source/merge.cxx |   17 +
 1 file changed, 13 insertions(+), 4 deletions(-)

New commits:
commit 032cb7ed80a504b4abec479f30c2c03f10e14639
Author: Caolán McNamara 
Date:   Mon Mar 14 15:10:44 2016 +

Resolves: tdf#98473 replace || with ‖ to avoid illegal gtk3 action names

Change-Id: Ic5098c439ac94d68f881e06378938fab29e8bb3d

diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 3922e89..7789e3b 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -121,13 +121,22 @@ bool MergeEntrys::GetText( OString ,
 return bReturn;
 }
 
+namespace
+{
+OString GetDoubleBars()
+{
+//DOUBLE VERTICAL LINE instead of || because the translations make 
their
+//way into action_names under gtk3 where || is illegal
+return OUStringToOString(OUString(static_cast(0x2016)), 
RTL_TEXTENCODING_UTF8);
+}
+}
 
 OString MergeEntrys::GetQTZText(const ResData& rResData, const OString& 
rOrigText)
 {
 const OString sFilename = 
rResData.sFilename.copy(rResData.sFilename.lastIndexOf('/')+1);
 const OString sKey =
 PoEntry::genKeyId(sFilename + rResData.sGId + rResData.sId + 
rResData.sResTyp + rOrigText);
-return sKey + "||" + rOrigText;
+return sKey + GetDoubleBars() + rOrigText;
 }
 
 
@@ -411,9 +420,9 @@ void MergeDataFile::InsertEntry(
 const OString sTemp = rInFilename + rGID + rLID + rTYP;
 pMergeEntrys->InsertEntry(
 nLANG,
-rTEXT.isEmpty()? rTEXT : PoEntry::genKeyId(sTemp + rTEXT) + "||" + 
rTEXT,
-rQHTEXT.isEmpty()? rQHTEXT : PoEntry::genKeyId(sTemp + rQHTEXT) + 
"||" + rQHTEXT,
-rTITLE.isEmpty()? rTITLE : PoEntry::genKeyId(sTemp + rTITLE) + 
"||" + rTITLE );
+rTEXT.isEmpty()? rTEXT : PoEntry::genKeyId(sTemp + rTEXT) + 
GetDoubleBars() + rTEXT,
+rQHTEXT.isEmpty()? rQHTEXT : PoEntry::genKeyId(sTemp + rQHTEXT) + 
GetDoubleBars() + rQHTEXT,
+rTITLE.isEmpty()? rTITLE : PoEntry::genKeyId(sTemp + rTITLE) + 
GetDoubleBars() + rTITLE );
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2016-02-27 Thread Julien Nabet
 l10ntools/source/merge.cxx |8 +++-
 l10ntools/source/po.cxx|1 +
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit a620a82a90614300a2df4133a85dd585b8fbfd20
Author: Julien Nabet 
Date:   Sat Feb 27 19:15:08 2016 +0100

Add SAL_WARN + convert some printf into SAL_WARN

Change-Id: I3760e50796605ce50ef2e91951fc839b84669b89
Reviewed-on: https://gerrit.libreoffice.org/22733
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 8be78d0..3922e89 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -47,9 +47,7 @@ namespace
 }
 catch (const PoIfstream::Exception&)
 {
-printf(
-"Warning : %s contains invalid entry\n",
-rFileName.getStr() );
+SAL_WARN("l10ntools", rFileName.getStr() << " contains invalid 
entry\n");
 return false;
 }
 return true;
@@ -216,7 +214,7 @@ MergeDataFile::MergeDataFile(
 std::ifstream aInputStream( rFileName.getStr() );
 if ( !aInputStream.is_open() )
 {
-printf("Warning : Can't open po path container file\n");
+SAL_WARN("l10ntools", "Can't open po path container file for " << 
rFileName.getStr());
 return;
 }
 std::string sPoFile;
@@ -233,7 +231,7 @@ MergeDataFile::MergeDataFile(
 aPoInput.open( sPoFileName );
 if ( !aPoInput.isOpen() )
 {
-printf( "Warning : Can't open %s\n", sPoFileName.getStr() );
+SAL_WARN("l10ntools", "Can't open file: " << sPoFileName.getStr());
 return;
 }
 
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 3019006c..6aa7c1d 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -596,6 +596,7 @@ void PoIfstream::readEntry( PoEntry& rPoEntry )
 }
 else
 {
+SAL_WARN("l10ntools", "Parse problem with entry: " << 
aGenPo.getMsgStr());
 throw PoIfstream::Exception();
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2016-01-16 Thread Peter Foley
 l10ntools/source/srclex.l |2 --
 1 file changed, 2 deletions(-)

New commits:
commit a7bdc9daa802ea67e41e0f93bdd8f0e64b00f8d9
Author: Peter Foley 
Date:   Fri Jan 15 22:34:38 2016 -0500

Fix set but unused variable warning


Change-Id: I23fb9abf2b9462c939d4d9caf699e48ffded3bb4
Reviewed-on: https://gerrit.libreoffice.org/21505
Reviewed-by: jan iversen 
Tested-by: jan iversen 

diff --git a/l10ntools/source/srclex.l b/l10ntools/source/srclex.l
index 1cdef41..9caf044 100644
--- a/l10ntools/source/srclex.l
+++ b/l10ntools/source/srclex.l
@@ -234,10 +234,8 @@ void yyerror( const char *s )
 }
 
 SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
-int e;
 yyin = init(argc, argv);
 yylex();
-e = GetError();
 Close();
 return EXIT_SUCCESS;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2015-12-20 Thread Tor Lillqvist
 l10ntools/source/helpmerge.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 0c246723b667fa258e1c70fa1eadc2a904207ce1
Author: Tor Lillqvist 
Date:   Sun Dec 20 11:02:32 2015 +0200

Add snide comment

Change-Id: Ie8c0d47a7a82458ec1ed0695cea13c136e2fab90

diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index d86abac..0a32b7b 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -132,6 +132,8 @@ bool HelpParser::CreatePO(
 }
 else
 {
+// If this is something totally unexpected, wouldn't an assert() 
be in order?
+// On the other hand, if this is expected, why the printf?
 fprintf(stdout,"\nDBG: NullPointer in HelpParser::CreatePO, File 
%s\n", sHelpFile.getStr());
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2015-10-21 Thread Eike Rathke
 l10ntools/source/xmlparse.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 741543132ad355e295ff0aafd1105c1225fef670
Author: Eike Rathke 
Date:   Wed Oct 21 14:09:42 2015 +0200

start next find at previous endpos, not one after previous startpos

The portion from startpos to endpos was handled, no need to recheck
things in between and find nothing; or worse, find something and
duplicate a part of a portion..

Change-Id: I37b58d2433514ffa8f31a0fa06f84c6a8aaee947

diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index eae496a..1fa5920 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -1139,7 +1139,7 @@ OString XMLUtil::QuotHTML( const OString  )
 }
 else
 sReturn.append(lcl_QuotRange(sSource, nStartPos, nEndPos));
-++nStartPos;
+nStartPos = nEndPos;
 }
 if( nEndPos < sSource.length() )
 sReturn.append(lcl_QuotRange(sSource, nEndPos, sSource.length()));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2015-09-03 Thread Stephan Bergmann
 l10ntools/source/cfglex.l |7 ---
 l10ntools/source/srclex.l |7 ---
 l10ntools/source/xrmlex.l |7 ---
 3 files changed, 21 deletions(-)

New commits:
commit 9cb929d8bb58b6f941d74bd532cecb252d2b2983
Author: Stephan Bergmann 
Date:   Thu Sep 3 10:33:44 2015 +0200

Generated code is compiled with WaE disabled, anyway

...and at least in the __GNUC__ case, the list of ignored warnings only 
covered
a fraction of the actually emitted warnings, so just don't bother

Change-Id: I962f50be7da3ae1e215318c6b7dd2f534cbdd57c

diff --git a/l10ntools/source/cfglex.l b/l10ntools/source/cfglex.l
index 663070a..fe53a88 100644
--- a/l10ntools/source/cfglex.l
+++ b/l10ntools/source/cfglex.l
@@ -44,13 +44,6 @@
 
 #include "cfglex.hxx"
 
-#if __GNUC__
-#pragma GCC diagnostic ignored "-Wunused-function"
-#pragma GCC diagnostic ignored "-Wunused-label"
-#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-#elif defined _MSC_VER
-#pragma warning(push, 1)
-#endif
 #define YY_NO_UNISTD_H
 
 int yycolumn = 1;
diff --git a/l10ntools/source/srclex.l b/l10ntools/source/srclex.l
index 979df75..1cdef41 100644
--- a/l10ntools/source/srclex.l
+++ b/l10ntools/source/srclex.l
@@ -45,13 +45,6 @@
 
 #include "srclex.hxx"
 
-#ifdef __GNUC__
-#pragma GCC diagnostic ignored "-Wunused-function"
-#pragma GCC diagnostic ignored "-Wunused-label"
-#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-#elif defined _MSC_VER
-#pragma warning(push, 1)
-#endif
 #define YY_NO_UNISTD_H
 
 /* forwards */
diff --git a/l10ntools/source/xrmlex.l b/l10ntools/source/xrmlex.l
index 0d4bb4d..4bd17ec 100644
--- a/l10ntools/source/xrmlex.l
+++ b/l10ntools/source/xrmlex.l
@@ -43,13 +43,6 @@
 
 #include "sal/main.h"
 
-#ifdef __GNUC__
-#pragma GCC diagnostic ignored "-Wunused-function"
-#pragma GCC diagnostic ignored "-Wunused-label"
-#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-#elif defined _MSC_VER
-#pragma warning(push, 1)
-#endif
 #define YY_NO_UNISTD_H
 
 /* forwards */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source scp2/source solenv/inc

2015-01-25 Thread Andras Timar
 l10ntools/source/ulfconv/msi-encodinglist.txt |7 ---
 scp2/source/ooo/module_helppack.ulf   |6 ++
 scp2/source/ooo/module_langpack.ulf   |8 +++-
 solenv/inc/langlist.mk|1 +
 4 files changed, 18 insertions(+), 4 deletions(-)

New commits:
commit b68ecae158c327c3fd85de9d2babb657ae97da1d
Author: Andras Timar andras.ti...@collabora.com
Date:   Sun Jan 25 19:47:25 2015 +0100

add Guarani (gug) language

Change-Id: Icf1612f88447e9ae348ef9ad333607a3f6dc8d32

diff --git a/l10ntools/source/ulfconv/msi-encodinglist.txt 
b/l10ntools/source/ulfconv/msi-encodinglist.txt
index e83e95a..86c9b54 100644
--- a/l10ntools/source/ulfconv/msi-encodinglist.txt
+++ b/l10ntools/source/ulfconv/msi-encodinglist.txt
@@ -33,7 +33,7 @@ bg   0  1026   # Bulgarian
 bn   0  2117   # Bengali
 bn-BD0  2117   # Bengali Bangladesh
 bn-IN0  1093   # Bengali India
-bo   0  2121   
+bo   0  2121
 br   0  1150   # Breton
 brx  0  1603   # Bodo (India)
 bs   0  5146   # bosnian
@@ -64,6 +64,7 @@ gd   0  1084   # Gaelic (Scotland)
 gl   0  1110   # Galician
 gu   0  1095   # Gujarati
 gu-IN0  1095   # Gujarati
+gug  0  1140   # Guarani - Paraguay
 he   0  1037
 hi   0  1081
 hr   0  1050   # Croatian
@@ -116,7 +117,7 @@ om   0  2162
 or   0  1096   # Odia
 or-IN0  1096
 pa-IN0  1094   # Punjabi
-pap  0  2171 
+pap  0  2171
 pl   0  1045
 ps   0  2171
 pt   0  2070
@@ -145,7 +146,7 @@ st   0  1072   # Southern Sotho, Sutu
 sv   0  1053
 sw   0  1089   # Swahili
 sw-TZ0  1089   # Swahili
-so   0  1143  
+so   0  1143
 ta   0  1097   # Tamil
 ta-IN0  1097   # Tamil
 te   0  1098
diff --git a/scp2/source/ooo/module_helppack.ulf 
b/scp2/source/ooo/module_helppack.ulf
index 2fcc6e5..bc70e6c 100644
--- a/scp2/source/ooo/module_helppack.ulf
+++ b/scp2/source/ooo/module_helppack.ulf
@@ -520,6 +520,12 @@ en-US = Gujarati
 [STR_DESC_MODULE_HELPPACK_GU]
 en-US = Installs Gujarati help in %PRODUCTNAME %PRODUCTVERSION
 
+[STR_NAME_MODULE_HELPPACK_GUG]
+en-US = Guarani
+
+[STR_DESC_MODULE_HELPPACK_GUG]
+en-US = Installs Guarani help in %PRODUCTNAME %PRODUCTVERSION
+
 [STR_NAME_MODULE_HELPPACK_EN_ZA]
 en-US = English (South Africa)
 
diff --git a/scp2/source/ooo/module_langpack.ulf 
b/scp2/source/ooo/module_langpack.ulf
index 37e911e..41f6974 100644
--- a/scp2/source/ooo/module_langpack.ulf
+++ b/scp2/source/ooo/module_langpack.ulf
@@ -15,7 +15,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
- 
+
 [STR_NAME_MODULE_ROOT_LANGPACK]
 en-US = Additional user interface languages
 
@@ -526,6 +526,12 @@ en-US = Gujarati
 [STR_DESC_MODULE_LANGPACK_GU]
 en-US = Installs the Gujarati user interface
 
+[STR_NAME_MODULE_LANGPACK_GUG]
+en-US = Guarani
+
+[STR_DESC_MODULE_LANGPACK_GUG]
+en-US = Installs the Guarani user interface
+
 [STR_NAME_MODULE_LANGPACK_EN_ZA]
 en-US = English (South Africa)
 
diff --git a/solenv/inc/langlist.mk b/solenv/inc/langlist.mk
index 5d2448b..26852c2 100644
--- a/solenv/inc/langlist.mk
+++ b/solenv/inc/langlist.mk
@@ -53,6 +53,7 @@ ga \
 gd \
 gl \
 gu \
+gug \
 he \
 hi \
 hr \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source oox/source sdext/source tools/source vcl/unx

2014-12-05 Thread Noel Grandin
 l10ntools/source/localize.cxx  |2 
 l10ntools/source/merge.cxx |2 
 l10ntools/source/po.cxx|4 
 oox/source/drawingml/customshapepresetdata.cxx |  106 -
 sdext/source/pdfimport/wrapper/wrapper.cxx |   16 +--
 tools/source/inet/inetmsg.cxx  |   96 +++---
 vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx   |2 
 7 files changed, 98 insertions(+), 130 deletions(-)

New commits:
commit 0375504f7be34d857859dfbaa312501e0ed1
Author: Noel Grandin n...@peralex.com
Date:   Thu Dec 4 14:19:41 2014 +0200

fdo#38835 strip out OString globals

Change-Id: Id2eb27132fd6c1734e50c02617ce1bbb75e294a0

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 5546e9e..5c107a6 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -261,7 +261,7 @@ void handleFilesOfDir(
 }
 
 bool includeProject(const OString rProject) {
-static const OString projects[] = {
+static const char *projects[] = {
 accessibility,
 avmedia,
 basctl,
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index ee98009..a8323be 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -439,7 +439,7 @@ void MergeDataFile::InsertEntry(
 OString MergeDataFile::CreateKey(const OString rTYP, const OString rGID,
 const OString rLID, const OString rFilename, bool bCaseSensitive)
 {
-static const OString sStroke('-');
+static const char sStroke[] = -;
 OString sKey( rTYP );
 sKey += sStroke;
 sKey += rGID;
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index bc599a0..a4e60b9 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -396,12 +396,12 @@ OString PoEntry::genKeyId(const OString rGenerator)
 aCRC32.process_bytes(rGenerator.getStr(), rGenerator.getLength());
 sal_uInt32 nCRC = aCRC32.checksum();
 // Use simple ASCII characters, exclude I, l, 1 and O, 0 to avoid 
confusing IDs
-static const OString sSymbols =
+static const char sSymbols[] =
 ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789;
 char sKeyId[6];
 for( short nKeyInd = 0; nKeyInd  5; ++nKeyInd )
 {
-sKeyId[nKeyInd] = sSymbols[(nCRC  63) % sSymbols.getLength()];
+sKeyId[nKeyInd] = sSymbols[(nCRC  63) % strlen(sSymbols)];
 nCRC = 6;
 }
 sKeyId[5] = '\0';
diff --git a/oox/source/drawingml/customshapepresetdata.cxx 
b/oox/source/drawingml/customshapepresetdata.cxx
index 2edc40c..945825e 100644
--- a/oox/source/drawingml/customshapepresetdata.cxx
+++ b/oox/source/drawingml/customshapepresetdata.cxx
@@ -29,16 +29,16 @@ void 
lcl_parseAdjustmentValue(comphelper::SequenceAsVectordrawing::EnhancedCust
 do
 {
 OString aToken = rValue.getToken(0, ',', nIndex).trim();
-static const OString aNamePrefix(Name = \);
-static const OString aValuePrefix(Value = (any) { (long) );
+static const char aNamePrefix[] = Name = \;
+static const char aValuePrefix[] = Value = (any) { (long) ;
 if (aToken.startsWith(aNamePrefix))
 {
-OString aName = aToken.copy(aNamePrefix.getLength(), 
aToken.getLength() - aNamePrefix.getLength() - strlen(\));
+OString aName = aToken.copy(strlen(aNamePrefix), 
aToken.getLength() - strlen(aNamePrefix) - strlen(\));
 aAdjustmentValue.Name = OUString::fromUtf8(aName);
 }
 else if (aToken.startsWith(aValuePrefix))
 {
-OString aValue = aToken.copy(aValuePrefix.getLength(), 
aToken.getLength() - aValuePrefix.getLength() - strlen( }));
+OString aValue = aToken.copy(strlen(aValuePrefix), 
aToken.getLength() - strlen(aValuePrefix) - strlen( }));
 aAdjustmentValue.Value = uno::makeAny(aValue.toInt32());
 }
 else if (!aToken.startsWith(State = ))
@@ -77,27 +77,27 @@ drawing::EnhancedCustomShapeParameterPair 
lcl_parseEnhancedCustomShapeParameterP
 drawing::EnhancedCustomShapeParameterPair aPair;
 OString aToken = rValue;
 // We expect the followings here: First.Value, First.Type, Second.Value, 
Second.Type
-static const OString aExpectedFVPrefix = First = 
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) ;
+static const char aExpectedFVPrefix[] = First = 
(com.sun.star.drawing.EnhancedCustomShapeParameter) { Value = (any) { (long) ;
 assert(aToken.startsWith(aExpectedFVPrefix));
-sal_Int32 nIndex = aExpectedFVPrefix.getLength();
+sal_Int32 nIndex = strlen(aExpectedFVPrefix);
 aPair.First.Value = 
uno::makeAny(static_castsal_uInt32(aToken.getToken(0, '}', 
nIndex).toInt32()));
 
-static const OString aExpectedFTPrefix = , Type = (short) ;
+static const char aExpectedFTPrefix[] = , Type = (short) ;
 aToken = aToken.copy(nIndex);
 

[Libreoffice-commits] core.git: l10ntools/source

2014-09-19 Thread Douglas Mencken
 l10ntools/source/export.cxx |   15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 43ed0dbb596399a134c34a5d906c5debb349f640
Author: Douglas Mencken dougmenc...@gmail.com
Date:   Sun Sep 7 05:52:21 2014 -0400

l10ntools/source/export.cxx: be more std::

Change-Id: Ia5f96f7d2bf366a6156d198e73e7987a471f28da
Signed-off-by: Stephan Bergmann sberg...@redhat.com

diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 6052e24..38cd3ed 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -26,8 +26,8 @@
 #include srclex.hxx
 
 #include boost/scoped_ptr.hpp
-#include stdio.h
-#include stdlib.h
+#include cstdio
+#include cstdlib
 #include common.hxx
 #include export.hxx
 #include tokens.h
@@ -207,9 +207,10 @@ Export::Export(const OString rOutput)
 pParseQueue( new ParserQueue( *this ) )
 {
 aOutput.mPo = new PoOfstream( rOutput, PoOfstream::APP );
-if (!aOutput.mPo-isOpen()) {
-fprintf(stderr, ERROR : Can't open file %s\n, rOutput.getStr());
-exit ( -1 );
+if (!aOutput.mPo-isOpen())
+{
+std::fprintf(stderr, ERROR : Can't open file %s\n, rOutput.getStr());
+std::exit(EXIT_FAILURE);
 }
 }
 
@@ -652,8 +653,8 @@ int Export::Execute( int nToken, const char * pToken )
 }
 break;
 case PRAGMA : {
-fprintf(stderr, ERROR: archaic PRAGMA %s\n, sToken.getStr());
-exit(-1);
+std::fprintf(stderr, ERROR: archaic PRAGMA %s\n, 
sToken.getStr());
+std::exit(EXIT_FAILURE);
 }
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2014-09-14 Thread David Tardon
 l10ntools/source/export.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 03626d7940d5e2fc2abf65ef1b49a7a89623f08f
Author: David Tardon dtar...@redhat.com
Date:   Sun Sep 14 13:20:29 2014 +0200

fdo#80650 src transl. merge must be case sensitive

This makes the desired changes in
workdir/SrsPartMergeTarget/starmath/source/symbol.src. The only other
merged file that is changed is
workdir/SrsPartMergeTarget/sw/source/ui/misc/numberingtypelistbox.src,
with changes like

 1, 2, 3, ... ; 4/*SVX_NUM_ARABIC
-a, b, c, ... ; 0/*SVX_NUM_CHARS_UPPER_LETTER   */;  ;
+A, B, C, ... ; 0/*SVX_NUM_CHARS_UPPER_LETTER   */;  ;
 a, b, c, ... ; 1/*SVX_NUM_CHARS_LOWER_LETTER   */;  ;

This looks okay to me too :-)

Change-Id: I729075209027ed1f3fec311c05b631c0f681708b

diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 49805cc..6052e24 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -275,7 +275,7 @@ Export::~Export()
 
 if ( bMergeMode ) {
 if ( !pMergeDataFile )
-pMergeDataFile = new MergeDataFile(sMergeSrc, 
global::inputPathname, false);
+pMergeDataFile = new MergeDataFile(sMergeSrc, 
global::inputPathname, true);
 
 delete pMergeDataFile;
 }
@@ -1062,14 +1062,14 @@ void Export::ResData2Output( MergeEntrys *pEntry, 
sal_uInt16 nType, const OStrin
 void Export::MergeRest( ResData *pResData )
 {
 if ( !pMergeDataFile ){
-pMergeDataFile = new MergeDataFile( sMergeSrc, global::inputPathname, 
false );
+pMergeDataFile = new MergeDataFile( sMergeSrc, global::inputPathname, 
true );
 aLanguages = pMergeDataFile-GetLanguages();
 
 }
 
 MergeEntrys *pEntry = 0;
 if( pResData-bText || pResData-bQuickHelpText || pResData-bTitle )
-pEntry = pMergeDataFile-GetMergeEntrys( pResData );
+pEntry = pMergeDataFile-GetMergeEntrysCaseSensitive( pResData );
 
 if ( pEntry )
 {
@@ -1154,7 +1154,7 @@ void Export::MergeRest( ResData *pResData )
 ConvertExportContent( pResData-sId );
 }
 
-MergeEntrys* pEntrys = pMergeDataFile-GetMergeEntrys( 
pResData );
+MergeEntrys* pEntrys = 
pMergeDataFile-GetMergeEntrysCaseSensitive( pResData );
 OString sText;
 bool bText = pEntrys  pEntrys-GetText( sText, 
STRING_TYP_TEXT, sCur, true );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2014-09-09 Thread Douglas Mencken
 l10ntools/source/export.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 9e773854c8cd24e526a6beed6bee74313a7fd47b
Author: Douglas Mencken dougmenc...@gmail.com
Date:   Sun Sep 7 05:56:50 2014 -0400

l10ntools/source/export.cxx: add sanity check to aOutput.mSimple

Change-Id: I05074760f189dfc00ce14ec33002609a56797a6d
Reviewed-on: https://gerrit.libreoffice.org/11321
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index efd336d..49805cc 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -233,6 +233,11 @@ Export::Export(
 {
 aOutput.mSimple = new std::ofstream();
 aOutput.mSimple-open(rOutput.getStr(), std::ios_base::out | 
std::ios_base::trunc);
+if (!aOutput.mSimple-is_open())
+{
+std::fprintf(stderr, ERROR : Can't open file %s\n, rOutput.getStr());
+std::exit(EXIT_FAILURE);
+}
 
 if ( bUTF8BOM ) WriteUTF8ByteOrderMarkToOutput();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2014-09-08 Thread Douglas Mencken
 l10ntools/source/export.cxx |   17 ++---
 1 file changed, 6 insertions(+), 11 deletions(-)

New commits:
commit 181b1c0f7cfe6a26874705d64b5efe6ea93f6e93
Author: Douglas Mencken dougmenc...@gmail.com
Date:   Mon Sep 8 10:18:14 2014 -0400

l10ntools/source/export.cxx: improve style of code

Change-Id: Ieef44da0ab8f2d33faaf8c32970bb9d33df6750b
Reviewed-on: https://gerrit.libreoffice.org/11318
Reviewed-by: Norbert Thiebaud nthieb...@gmail.com
Tested-by: Norbert Thiebaud nthieb...@gmail.com

diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 170d76f..efd336d 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -74,8 +74,8 @@ static OString lcl_GetListTyp( const sal_uInt16 nTyp, const 
bool bUpperCamelCase
 
 extern C {
 
-FILE * init(int argc, char ** argv) {
-
+FILE * init(int argc, char ** argv)
+{
 common::HandledArgs aArgs;
 if ( !common::handleArguments(argc, argv, aArgs) )
 {
@@ -109,7 +109,8 @@ int Parse( int nTyp, const char *pTokenText ){
 return 1;
 }
 
-void Close(){
+void Close()
+{
 global::exporter-GetParseQueue()-Close();
 global::exporter.reset();
 // avoid nontrivial Export dtor being executed during exit
@@ -121,19 +122,12 @@ int WorkOnTokenSet( int nTyp, char *pTokenText )
 return 1;
 }
 
-} // extern
-
-extern C {
-
 int SetError()
 {
 // set error at global instance of class Export
 global::exporter-SetError();
 return 1;
 }
-}
-
-extern C {
 
 int GetError()
 {
@@ -142,7 +136,8 @@ int GetError()
 return 1;
 return sal_False;
 }
-}
+
+} // extern C
 
 
 // class ResData
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2014-08-15 Thread Thomas Arnhold
 l10ntools/source/localize.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 8dd8e93d426a402962604c9905e1d5ad7541f325
Author: Thomas Arnhold tho...@arnhold.org
Date:   Fri Aug 15 12:31:10 2014 +0200

remove AutoControls_tmpl from localize

Change-Id: I81b77599590410da2bd93fe538b143f934917e8e

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 10b446c..5546e9e 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -91,8 +91,6 @@ bool passesPositiveList(const OUString rUrl) {
 { RTL_CONSTASCII_STRINGPARAM(
 /chart2/source/controller/dialogs/res_ErrorBar_tmpl.hrc) },
 { RTL_CONSTASCII_STRINGPARAM(
-/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc) },
-{ RTL_CONSTASCII_STRINGPARAM(
 /dbaccess/source/ui/inc/toolbox_tmpl.hrc) },
 { RTL_CONSTASCII_STRINGPARAM(/description.xml) },
 { RTL_CONSTASCII_STRINGPARAM(/svx/inc/globlmn_tmpl.hrc) },
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2014-08-13 Thread Michael Stahl
 l10ntools/source/po.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 1cf299efcce79c686544d2ff034f916f93f69920
Author: Michael Stahl mst...@redhat.com
Date:   Wed Aug 13 16:14:58 2014 +0200

l10ntools: suppress warning C4245 from boost/crc.hpp

Change-Id: I2ed53b4f902ae694fc064375e8a9cfeba32f9d1c

diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 5b40e8c..bc599a0 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -16,7 +16,15 @@
 #include vector
 #include string
 
+#ifdef _MSC_VER
+#pragma warning (push, 1)
+#pragma warning (disable: 4245)
+#endif
 #include boost/crc.hpp
+#ifdef _MSC_VER
+#pragma warning (pop)
+#endif
+
 
 #include po.hxx
 #include helper.hxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2014-06-22 Thread Andras Timar
 l10ntools/source/localize.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 856b55ecf58b129ee9ce41fbb89057f2363084fc
Author: Andras Timar andras.ti...@collabora.com
Date:   Sun Jun 22 14:37:54 2014 +0200

fdo#80324 fix path of redline_tmpl.hrc

Change-Id: Ie1684fe456ea6f9cd4b93481aa73f5b51a20ba1b

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index a6a4502..6f7dbde 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -96,7 +96,7 @@ bool passesPositiveList(const OUString rUrl) {
 /dbaccess/source/ui/inc/toolbox_tmpl.hrc) },
 { RTL_CONSTASCII_STRINGPARAM(/description.xml) },
 { RTL_CONSTASCII_STRINGPARAM(/svx/inc/globlmn_tmpl.hrc) },
-{ RTL_CONSTASCII_STRINGPARAM(/sw/source/ui/inc/redline_tmpl.hrc) }
+{ RTL_CONSTASCII_STRINGPARAM(/sw/source/uibase/inc/redline_tmpl.hrc) 
}
 };
 return matchList(rUrl, list, SAL_N_ELEMENTS(list));
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2014-06-16 Thread Andras Timar
 l10ntools/source/pocheck.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 010c9320baed31af29d302088cefafbb6063e5b7
Author: Andras Timar andras.ti...@collabora.com
Date:   Mon Jun 16 20:52:57 2014 +0200

update usage instructions of pocheck tool

Change-Id: Ibc1c5051a601a83a6616e6a22c45b05394c54e88

diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx
index c7c6164..9990a69 100644
--- a/l10ntools/source/pocheck.cxx
+++ b/l10ntools/source/pocheck.cxx
@@ -450,7 +450,7 @@ int main()
 OString aLanguages(getenv(ALL_LANGS));
 if( aLanguages.isEmpty() )
 {
-std::cerr  Usage: make cmd cmd=solver/*/bin/pocheck\n;
+std::cerr  Usage: LD_LIBRARY_PATH=instdir/ure/lib make cmd 
cmd=workdir/LinkTarget/Executable/pocheck\n;
 return 1;
 }
 for(sal_Int32 i = 1;;++i) // skip en-US
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2014-04-16 Thread Michael Stahl
 l10ntools/source/helpmerge.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit aef2111fd14d654f72ae910eb52eb8c8f2b8cc94
Author: Michael Stahl mst...@redhat.com
Date:   Wed Apr 16 13:19:44 2014 +0200

l10ntools: helpex: don't crash if the file can't be parsed; return error

Change-Id: I637f8486b0774b399ed5e250868d756c944e50f6

diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 6d3c4dd..20773de 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -152,6 +152,11 @@ bool HelpParser::Merge( const OString rPOFile, const 
OString rDestinationFile,
 //TODO: explicit BOM handling?
 
 XMLFile* xmlfile = ( aParser.Execute( sHelpFile, new XMLFile( OString('0') 
) ) );
+if (!xmlfile)
+{
+SAL_WARN(l10ntools, could not parse   sHelpFile);
+return false;
+}
 bool hasNoError = MergeSingleFile( xmlfile , pMergeDataFile , rLanguage , 
rDestinationFile );
 delete xmlfile;
 return hasNoError;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2014-04-11 Thread Stephan Bergmann
 l10ntools/source/treemerge.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 931043ab318ddb977e6943ad0b69443a2757ae7f
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Apr 11 12:23:30 2014 +0200

Memory released through xmlFreeDoc should be acquired with xmlMalloc

Change-Id: I70db57257fa8226d9f18b7d970d85cc1769252ad

diff --git a/l10ntools/source/treemerge.cxx b/l10ntools/source/treemerge.cxx
index 06e93d7..f2e959f 100644
--- a/l10ntools/source/treemerge.cxx
+++ b/l10ntools/source/treemerge.cxx
@@ -213,7 +213,7 @@ TreeParser::TreeParser(
 }
 if( !m_pSource-name )
 {
-m_pSource-name = new char[strlen(rInputFile.getStr())+1];
+m_pSource-name = static_castchar 
*(xmlMalloc(strlen(rInputFile.getStr())+1));
 strcpy( m_pSource-name, rInputFile.getStr() );
 }
 m_bIsInitialized = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2014-04-08 Thread Stephan Bergmann
 l10ntools/source/helpmerge.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit eb5e5ae0bf029b7db9f254180a214dae648a207d
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Apr 8 12:50:51 2014 +0200

Remove extra newline

Change-Id: I192542c209a1b937672650d370d3f8e93d0bc9f5

diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 12a71c8..6d3c4dd 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -260,7 +260,7 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const 
OString sCur , ResDa
 SAL_WARN(
 l10ntools,
 Can't find GID=  pResData-sGId.getStr()   LID=
- pResData-sId.getStr()   TYP=  
pResData-sResTyp.getStr()  \n);
+ pResData-sId.getStr()   TYP=  
pResData-sResTyp.getStr());
 }
 pXMLElement-ChangeLanguageTag(sCur);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2014-02-26 Thread Caolán McNamara
 l10ntools/source/localize.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 45cc7cfea269c6eff9b0d6eef6f7060c4d156623
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Feb 26 16:05:40 2014 +

fix comments

Change-Id: Iee6557755e4976e023d1c04bde24e3aa1d0fd062
Reviewed-on: https://gerrit.libreoffice.org/8369
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 9d055d5..659f689 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -323,17 +323,17 @@ bool includeProject(const OString rProject) {
 }
 
 /// Handle one directory in the hierarchy.
-/
+///
 /// Ignores symlinks and instead explicitly descends into clone/* or src/*,
 /// as the Cygwin symlinks are not supported by osl::Directory on Windows.
-/
+///
 /// @param rUrl the absolute file URL of this directory
-/
+///
 /// @param nLevel 0 if this is either the root directory that contains the
 /// projects or one of the clone/* or src/* directories that contain the
 /// additional projects; -1 if this is the clone directory; 1 if this
 /// is a project directory; 2 if this is a directory inside a project
-/
+///
 /// @param rProject the name of the project (empty and ignored if nLevel = 0)
 /// @param rPotDir the path of pot directory
 void handleDirectory(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source sw/AllLangResTarget_sw.mk sw/source

2014-01-27 Thread Andras Timar
 l10ntools/source/localize.cxx |2 -
 sw/AllLangResTarget_sw.mk |5 
 sw/source/ui/app/mn.src   |2 -
 sw/source/ui/inc/misc.hrc |   27 --
 sw/source/ui/inc/redline_tmpl.hrc |   39 ++
 sw/source/ui/lingu/olmenu.src |2 -
 6 files changed, 47 insertions(+), 30 deletions(-)

New commits:
commit 35782f89b61c04d9aa97183ea736f4288490800c
Author: Andras Timar andras.ti...@collabora.com
Date:   Mon Jan 27 22:27:24 2014 +0100

fdo#74119 fix unlocalized redline menu

Change-Id: Ia4836a69ddd8bebe8cc21cea67be96b029388cb1

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index f5a153c..a9c87b6 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -102,7 +102,7 @@ bool passesPositiveList(const OUString rUrl) {
 { RTL_CONSTASCII_STRINGPARAM(/description.xml) },
 { 
RTL_CONSTASCII_STRINGPARAM(/android/sdremote/res/values/strings.xml) },
 { RTL_CONSTASCII_STRINGPARAM(/svx/inc/globlmn_tmpl.hrc) },
-{ RTL_CONSTASCII_STRINGPARAM(/sw/source/ui/inc/misc.hrc) }
+{ RTL_CONSTASCII_STRINGPARAM(/sw/source/ui/inc/redline_tmpl.hrc) }
 };
 return matchList(rUrl, list, SAL_N_ELEMENTS(list));
 }
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
index 456dc78..aaf690c 100644
--- a/sw/AllLangResTarget_sw.mk
+++ b/sw/AllLangResTarget_sw.mk
@@ -58,6 +58,7 @@ $(eval $(call gb_SrsTarget_set_include,sw/res,\
 -I$(SRCDIR)/sw/source/ui/web \
 -I$(SRCDIR)/sw/source/ui/wrtsh \
 -I$(call gb_SrsTemplateTarget_get_include_dir,) \
+-I$(call gb_SrsTemplateTarget_get_include_dir,sw) \
 ))
 
 $(eval $(call gb_SrsTarget_add_files,sw/res,\
@@ -126,4 +127,8 @@ $(eval $(call gb_SrsTarget_add_nonlocalizable_files,sw/res,\
 sw/source/ui/envelp/envprt.src \
 ))
 
+$(eval $(call gb_SrsTarget_add_templates,sw/res,\
+sw/source/ui/inc/redline_tmpl.hrc \
+))
+
 # vim: set noet sw=4 ts=4:
diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src
index 7a762e9..eb5ee0e 100644
--- a/sw/source/ui/app/mn.src
+++ b/sw/source/ui/app/mn.src
@@ -24,7 +24,7 @@
 #include globals.hrc
 #include helpid.h
 #include popup.hrc
-#include misc.hrc
+#include redline.hrc
 
 /* - F O R M A T - */
 #define SEPARATOR   MenuItem { Separator = TRUE; }
diff --git a/sw/source/ui/inc/misc.hrc b/sw/source/ui/inc/misc.hrc
index ff20090..95113ff 100644
--- a/sw/source/ui/inc/misc.hrc
+++ b/sw/source/ui/inc/misc.hrc
@@ -21,7 +21,6 @@
 #define _MISC_HRC
 
 #include rcid.hrc
-#include cmdid.h
 
 #define DLG_INSERT_BOOKMARK (RC_MISC_BEGIN + 17)
 #define DLG_NUM_NAMES   (RC_MISC_BEGIN + 18)
@@ -56,32 +55,6 @@
 #error Resource-Id Ueberlauf in #file, #line
 #endif
 
-#define MN_EDIT_REDLINE  \
-MenuItem\
-{   \
-Identifier = FN_REDLINE_ACCEPT_DIRECT;\
-HelpId = CMD_FN_REDLINE_ACCEPT_DIRECT ;
\
-Text [ en-US ] = Accept Change ;   \
-};\
-MenuItem\
-{   \
-Identifier = FN_REDLINE_REJECT_DIRECT ;
\
-HelpId = CMD_FN_REDLINE_REJECT_DIRECT ;
\
-Text [ en-US ] = Reject Change ;   \
-};  \
-MenuItem \
-{\
-Identifier = FN_REDLINE_NEXT_CHANGE; \
-HelpId = CMD_FN_REDLINE_NEXT_CHANGE ;\
-Text [ en-US ] = Next Change ; \
-};\
-MenuItem \
-{\
-Identifier = FN_REDLINE_PREV_CHANGE; \
-HelpId = CMD_FN_REDLINE_PREV_CHANGE ;\
-Text [ en-US ] = Previous Change ; \
-};
-
 #endif  // _MISC_HRC
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/redline_tmpl.hrc 
b/sw/source/ui/inc/redline_tmpl.hrc
new file mode 100644
index 000..4271708
--- /dev/null
+++ b/sw/source/ui/inc/redline_tmpl.hrc
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla 

[Libreoffice-commits] core.git: l10ntools/source

2013-12-02 Thread Andras Timar
 l10ntools/source/xmlparse.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ab4f01412b833dc08f1d64a93addb7751d051af7
Author: Andras Timar andras.ti...@collabora.com
Date:   Mon Dec 2 13:03:59 2013 +0100

fdo#71056 add sup to list of inline help XML tags

Change-Id: If0937bd571658e0f76a51e44dd3fa008f701f02e

diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index 13a9d8f..74f126d 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -1106,11 +1106,11 @@ static icu::UnicodeString lcl_QuotRange(
 
 static bool lcl_isTag( const icu::UnicodeString rString )
 {
-static const int nSize = 12;
+static const int nSize = 13;
 static const icu::UnicodeString vTags[nSize] = {
 ahelp, link, item, emph, defaultinline,
 switchinline, caseinline, variable,
-bookmark_value, image, embedvar, alt };
+bookmark_value, image, embedvar, alt, sup };
 
 for( int nIndex = 0; nIndex  nSize; ++nIndex )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2013-11-15 Thread Andras Timar
 l10ntools/source/lngmerge.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f64ef0b43a5cd97657cffa2cfb415d523d55095c
Author: Andras Timar andras.ti...@collabora.com
Date:   Fri Nov 15 21:07:57 2013 +0100

qtz handling in ulfex

If we don't want to use qtz codes in .ulf files, then why
do we write out qtz language with en-US content?
In fact this patch would not be necessary, if I didn't find
a build breaker bug, somehow sNewText was empty for certain
strings, and the sNewText.copy(sNewText.indexOf('|') + 2)
failed.

Change-Id: Idf377e61391eb08ecb692a7c404d190659b97575

diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index 4913bc4..fc8aa7b 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -244,7 +244,7 @@ sal_Bool LngParser::Merge(
 OString sNewText;
 pEntrys-GetText( sNewText, STRING_TYP_TEXT, 
sLang, sal_True );
 if( sLang == qtz )
-sNewText = sNewText.copy(sNewText.indexOf('|') 
+ 2);
+continue;
 
 if ( !sNewText.isEmpty()) {
 OString *pLine = (*pLines)[ nPos ];
@@ -282,7 +282,7 @@ sal_Bool LngParser::Merge(
 OString sNewText;
 pEntrys-GetText( sNewText, STRING_TYP_TEXT, sCur, 
sal_True );
 if( sCur == qtz )
-sNewText = sNewText.copy(sNewText.indexOf('|') + 2);
+continue;
 if ( !sNewText.isEmpty()  sCur != x-comment)
 {
 OString sLine;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: l10ntools/source

2013-10-11 Thread Andras Timar
 l10ntools/source/localize.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 2731092c12a08e2b53d28089070d2a97c23e8925
Author: Andras Timar andras.ti...@collabora.com
Date:   Fri Oct 11 18:44:42 2013 +0200

add sw/source/ui/inc/misc.hrc

Change-Id: Id1e0d4241a356bdb08a44b3ae87c3d1023c4669e

diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index be8ec9b..be88cea 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -119,6 +119,7 @@ bool passesPositiveList(const OUString rUrl) {
 { RTL_CONSTASCII_STRINGPARAM(
 /svx/source/unodialogs/textconversiondlgs/
 chinese_direction_tmpl.hrc) },
+{ RTL_CONSTASCII_STRINGPARAM(/sw/source/ui/inc/misc.hrc) },
 { RTL_CONSTASCII_STRINGPARAM(/sw/source/ui/inc/swacc_tmpl.hrc) },
 { RTL_CONSTASCII_STRINGPARAM(/sw/source/ui/inc/swmn_tmpl.hrc) },
 { RTL_CONSTASCII_STRINGPARAM(/sw/source/ui/inc/toolbox_tmpl.hrc) }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   >