Markus Mohrhard schrieb:
Hey Regina,


commit 29ac03994484cb65725ec697cb7615a31b117b58 translated some comments.
It
translated a String constant too, but left out one occurrences of that
constant. This patch adds the missing translation.


As explained in Hamburg this is not the right fix for the problem. We
should instead don't initialize the string with a value and check at
this position if the string is empty.


No, that does not work. I have tested it. It results in an empty status bar
for a single click and a "xxx selected" in case of dragging, where the
changes should be shown. I think, that is because of the test
if(!aStr.Len()) in line 1181.


In this case we need to find another solution. It is never a good idea
to have two string constants at different places that are related.
Either we move it to a variable and use the variable for that or we
find another clean solution. Thorsten mentioned also that using
nothing is not the best idea because it is a valid name in this case.

I have now defined a macro for that string, so that there is only one place for the literal string. This way the semantic remains the same as it has worked for several years.

Kind regards
Regina
>From 1bd70e853fbe178193bb07d18e4b03a00ee797ac Mon Sep 17 00:00:00 2001
From: Regina Henschel <rb.hensc...@t-online.de>
Date: Wed, 18 Apr 2012 01:00:08 +0200
Subject: [PATCH] fdo#48473 Missing translation of local String constant

---
 svx/source/svdraw/svdview.cxx |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 18237ce..81a81f5 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -1172,7 +1172,8 @@ XubString SdrView::GetStatusText()
     XubString aStr;
     XubString aName;
 
-    aStr.AppendAscii("nothing");
+    #define STR_NOTHING "nothing"
+    aStr.AppendAscii(STR_NOTHING);
 
     if (pAktCreate!=NULL)
     {
@@ -1267,7 +1268,7 @@ XubString SdrView::GetStatusText()
 #endif
     }
 
-    if(aStr.EqualsAscii("nix"))
+    if(aStr.EqualsAscii(STR_NOTHING))
     {
         if (AreObjectsMarked()) {
             ImpTakeDescriptionStr(STR_ViewMarked,aStr);
-- 
1.7.5.1

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to