Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Sat, Jan 7, 2012 at 7:39 PM, Ivan Timofeev <timofeev.i.s@gmail.com>wrote:

06.01.2012 20:57, Lior Kaplan пишет:

    The strings are coming from svx/source/items/svxitems.src
   (RID_SVXITEMS_PAGE_LAND_FALSE and RID_SVXITEMS_PAGE_USAGE_LEFT), and
   the only reference for them I found is svx/source/items/pageitem.cxx

   I compared it to the code of other items in the page, and didn't
   find any space addition the other strings... any idea why in this
   case there's a missing space?


Bug? The author forgot to add the delimiter?

           if ( bLandscape )
               rText += SVX_RESSTR(RID_SVXITEMS_PAGE_**LAND_TRUE);
           else
               rText += SVX_RESSTR(RID_SVXITEMS_PAGE_**LAND_FALSE);
-           rText += GetUsageText( eUse );
+           String aUsageText = GetUsageText( eUse );
+           if (aUsageText.Len())
+           {
+               rText += cpDelim;
+               rText += aUsageText;
+           }
           return SFX_ITEM_PRESENTATION_**NAMELESS;

       }


Cool (:

This fix is also relevant a few lines bellow, adding a patch to include
them both.

Also, including [REVIEW] in the subject.

Kaplan
diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx
index 0ac676d..e544382 100644
--- a/svx/source/items/pageitem.cxx
+++ b/svx/source/items/pageitem.cxx
@@ -136,7 +136,12 @@ SfxItemPresentation SvxPageItem::GetPresentation
                 rText += SVX_RESSTR(RID_SVXITEMS_PAGE_LAND_TRUE);
             else
                 rText += SVX_RESSTR(RID_SVXITEMS_PAGE_LAND_FALSE);
-            rText += GetUsageText( eUse );
+            String aUsageText = GetUsageText( eUse );
+            if (aUsageText.Len())
+            {
+                rText += cpDelim;
+                rText += aUsageText;
+            }
             return SFX_ITEM_PRESENTATION_NAMELESS;
         }
         case SFX_ITEM_PRESENTATION_COMPLETE:
@@ -154,7 +159,12 @@ SfxItemPresentation SvxPageItem::GetPresentation
                 rText += SVX_RESSTR(RID_SVXITEMS_PAGE_LAND_TRUE);
             else
                 rText += SVX_RESSTR(RID_SVXITEMS_PAGE_LAND_FALSE);
-            rText += GetUsageText( eUse );
+            String aUsageText = GetUsageText( eUse );
+            if (aUsageText.Len())
+            {
+                rText += cpDelim;
+                rText += aUsageText;
+            }
             return SFX_ITEM_PRESENTATION_COMPLETE;
         }
         default: ;//prevent warning

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.