[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - l10ntools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Nov 21 12:37:08 UTC 2018
l10ntools/source/pocheck.cxx | 33 ++++++++++++++++++++++++++++-----
1 file changed, 28 insertions(+), 5 deletions(-)
New commits:
commit c7da2fde04464da7372565d3cfb729ec46247412
Author: Andras Timar <andras.timar at collabora.com>
AuthorDate: Sun Sep 30 12:06:49 2018 +0200
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Nov 21 13:36:43 2018 +0100
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 <andras.timar at collabora.com>
(cherry picked from commit baf048cd2ffe1f3afeb204b9dcc11d36999c1725)
Reviewed-on: https://gerrit.libreoffice.org/63594
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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;
More information about the Libreoffice-commits
mailing list