ooo-build r11343 - in trunk: . patches/src680



Author: noelpwer
Date: Mon Jan 21 15:55:19 2008
New Revision: 11343
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11343&view=rev

Log:
2008-01-21  Noel Power  <noel power novell com>

        * patches/src680/default-autotext-and-form-name.diff: using
        * resource
        strings as the default names should be localised



Modified:
   trunk/ChangeLog
   trunk/patches/src680/default-autotext-and-form-name.diff

Modified: trunk/patches/src680/default-autotext-and-form-name.diff
==============================================================================
--- trunk/patches/src680/default-autotext-and-form-name.diff	(original)
+++ trunk/patches/src680/default-autotext-and-form-name.diff	Mon Jan 21 15:55:19 2008
@@ -1,7 +1,7 @@
 diff -rup /data4/LatestSourceOnly/ooo-build/build/ooh680-m1/sc/source/filter/excel/xiescher.cxx sc/source/filter/excel/xiescher.cxx
 --- /data4/LatestSourceOnly/ooo-build/build/ooh680-m1/sc/source/filter/excel/xiescher.cxx	2008-01-17 16:28:44.000000000 +0000
 +++ sc/source/filter/excel/xiescher.cxx	2008-01-17 15:03:09.000000000 +0000
-@@ -598,8 +598,35 @@ sal_Size XclImpDrawObjBase::DoGetProgres
+@@ -598,8 +598,38 @@ sal_Size XclImpDrawObjBase::DoGetProgres
      return 1;
  }
  
@@ -13,27 +13,30 @@
 +        // create  a default name based on the shape id and shape type
 +        sal_uInt32 nID = ( mnShapeId & 0x000003ff );
 +        String sID = String::CreateFromInt32( nID );
++        String sName;
 +        switch ( mnObjType )
 +        {
 +            case EXC_OBJ_CMO_DRAWING: 
-+                  rSdrObj.SetName( String( RTL_CONSTASCII_USTRINGPARAM("AutoShape ") ).Append( sID ) );
++                  sName = ScGlobal::GetRscString( STR_SHAPE_AUTOSHAPE );
 +                  break;
 +            case EXC_OBJ_CMO_RECTANGLE:
-+                  rSdrObj.SetName( String( RTL_CONSTASCII_USTRINGPARAM("Rectangle ") ).Append( sID ) );
++                  sName = ScGlobal::GetRscString( STR_SHAPE_RECTANGLE );
 +                  break;
 +            case EXC_OBJ_CMO_LINE:
-+                  rSdrObj.SetName( String( RTL_CONSTASCII_USTRINGPARAM("Line ") ).Append( sID ) );
++                  sName = ScGlobal::GetRscString( STR_SHAPE_LINE );
 +                  break;
 +            case EXC_OBJ_CMO_ELLIPSE:
-+                  rSdrObj.SetName( String( RTL_CONSTASCII_USTRINGPARAM("Oval ") ).Append( sID ) );
++                  sName = ScGlobal::GetRscString( STR_SHAPE_OVAL );
 +                  break;
 +            case EXC_OBJ_CMO_TEXT:
-+                  rSdrObj.SetName( String( RTL_CONSTASCII_USTRINGPARAM("Text Box ") ).Append( sID ) );
++                  sName = ScGlobal::GetRscString( STR_SHAPE_TEXTBOX );
 +                  break;
 +        default:
 +            DBG_ERROR1( "XclImpDrawObjBase::ProcessSdrObject - unknown object type 0x%04hX", mnObjId );
 +            break;
 +        }       
++        if ( sName.Len() > 0 )
++            rSdrObj.SetName( sName.Append( sID ) );
 +    } 
      // trace if object is not printable
      if( !IsPrintable() )
@@ -50,6 +53,14 @@
 diff -rup /data4/LatestSourceOnly/ooo-build/build/ooh680-m1/sc/source/filter/excel/xlescher.cxx sc/source/filter/excel/xlescher.cxx
 --- /data4/LatestSourceOnly/ooo-build/build/ooh680-m1/sc/source/filter/excel/xlescher.cxx	2007-05-22 20:51:34.000000000 +0100
 +++ sc/source/filter/excel/xlescher.cxx	2008-01-17 15:37:51.000000000 +0000
+@@ -58,6 +58,7 @@
+ #ifndef SC_XESTREAM_HXX
+ #include "xestream.hxx"
+ #endif
++#include "globstr.hrc"
+ 
+ using ::rtl::OUString;
+ using ::com::sun::star::uno::Reference
 @@ -342,23 +342,24 @@ OUString XclControlObjHelper::GetTbxServ
      return aName;
  }
@@ -70,15 +81,15 @@
 -        case EXC_OBJ_CMO_COMBOBOX:      aName = CREATE_OUSTRING( "ComboBox" );      break;
 -        case EXC_OBJ_CMO_SPIN:          aName = CREATE_OUSTRING( "SpinButton" );    break;
 -        case EXC_OBJ_CMO_SCROLLBAR:     aName = CREATE_OUSTRING( "ScrollBar" );     break;
-+        case EXC_OBJ_CMO_BUTTON:        aName = CREATE_OUSTRING( "Button " ); break;
-+        case EXC_OBJ_CMO_CHECKBOX:      aName = CREATE_OUSTRING( "Check Box " );      break;
-+        case EXC_OBJ_CMO_OPTIONBUTTON:  aName = CREATE_OUSTRING( "Option Button " );  break;
-+        case EXC_OBJ_CMO_LABEL:         aName = CREATE_OUSTRING( "Label " );         break;
-+        case EXC_OBJ_CMO_LISTBOX:       aName = CREATE_OUSTRING( "List Box " );       break;
-+        case EXC_OBJ_CMO_GROUPBOX:      aName = CREATE_OUSTRING( "Group Box " );      break;
-+        case EXC_OBJ_CMO_COMBOBOX:      aName = CREATE_OUSTRING( "Drop Down " );      break;
-+        case EXC_OBJ_CMO_SPIN:          aName = CREATE_OUSTRING( "Spinner " );    break;
-+        case EXC_OBJ_CMO_SCROLLBAR:     aName = CREATE_OUSTRING( "Scroll Bar " );     break;
++        case EXC_OBJ_CMO_BUTTON:        aName = ScGlobal::GetRscString( STR_FORM_BUTTON ); break;
++        case EXC_OBJ_CMO_CHECKBOX:      aName = ScGlobal::GetRscString( STR_FORM_CHECKBOX );      break;
++        case EXC_OBJ_CMO_OPTIONBUTTON:  aName = ScGlobal::GetRscString( STR_FORM_OPTIONBUTTON );  break;
++        case EXC_OBJ_CMO_LABEL:         aName = ScGlobal::GetRscString( STR_FORM_LABEL );         break;
++        case EXC_OBJ_CMO_LISTBOX:       aName = ScGlobal::GetRscString( STR_FORM_LISTBOX );       break;
++        case EXC_OBJ_CMO_GROUPBOX:      aName = ScGlobal::GetRscString( STR_FORM_GROUPBOX );      break;
++        case EXC_OBJ_CMO_COMBOBOX:      aName = ScGlobal::GetRscString( STR_FORM_DROPDOWN );      break;
++        case EXC_OBJ_CMO_SPIN:          aName = ScGlobal::GetRscString( STR_FORM_SPINNER );    break;
++        case EXC_OBJ_CMO_SCROLLBAR:     aName = ScGlobal::GetRscString( STR_FORM_SCROLLBAR );     break;
          default:    DBG_ERRORFILE( "XclControlObjHelper::GetTbxControlName - unknown control type" );
      }
 -    return aName;
@@ -98,3 +109,109 @@
  
      /** Returns the listener type (interface name) for macro events for the passed control type. */
      static ::rtl::OUString GetTbxListenerType( sal_uInt16 nCtrlType );
+--- backup/sc/inc/globstr.hrc	2007-11-26 14:41:12.000000000 +0000
++++ sc/inc/globstr.hrc	2008-01-21 15:34:45.000000000 +0000
+@@ -563,7 +563,23 @@
+ #define STR_ERR_LONG_NESTED_ARRAY   419
+ #define STR_UNDO_TEXTTOCOLUMNS      420
+ 
+-#define STR_COUNT                   421
++#define STR_SHAPE_AUTOSHAPE         421
++#define STR_SHAPE_RECTANGLE         422
++#define STR_SHAPE_LINE              423
++#define STR_SHAPE_OVAL              424
++#define STR_SHAPE_TEXTBOX           425
++
++#define STR_FORM_BUTTON             426
++#define STR_FORM_CHECKBOX           427
++#define STR_FORM_OPTIONBUTTON       428
++#define STR_FORM_LABEL              429
++#define STR_FORM_LISTBOX            430
++#define STR_FORM_GROUPBOX           431
++#define STR_FORM_DROPDOWN           432
++#define STR_FORM_SPINNER            433
++#define STR_FORM_SCROLLBAR          434
++
++#define STR_COUNT                   434
+ 
+ #endif
+ 
+--- backup/sc/source/ui/src/globstr.src	2007-11-26 14:42:38.000000000 +0000
++++ sc/source/ui/src/globstr.src	2008-01-21 14:46:09.000000000 +0000
+@@ -1691,5 +1691,76 @@ Resource RID_GLOBSTR
+     {
+         Text [ en-US ] = "Text to Columns";
+     };
++
++    String STR_SHAPE_AUTOSHAPE
++    {
++        Text [ en-US ] = "AutoShape ";
++    };
++
++    String STR_SHAPE_RECTANGLE
++    {
++        Text [ en-US ] = "Rectangle ";
++    };
++
++    String STR_SHAPE_LINE
++    {
++        Text [ en-US ] = "Line ";
++    };
++
++    String STR_SHAPE_OVAL
++    {
++        Text [ en-US ] = "Oval ";
++    };
++
++    String STR_SHAPE_TEXTBOX
++    {
++        Text [ en-US ] = "Text Box ";
++    };
++
++    String STR_FORM_BUTTON
++    {
++        Text [ en-US ] = "Button ";
++    };
++
++    String STR_FORM_CHECKBOX
++    {
++        Text [ en-US ] = "Check Box ";
++    };
++
++    String STR_FORM_OPTIONBOX
++    {
++        Text [ en-US ] = "Option Box ";
++    };
++
++    String STR_FORM_LABEL
++    {
++        Text [ en-US ] = "Label ";
++    };
++
++    String STR_FORM_LISTBOX
++    {
++        Text [ en-US ] = "List Box ";
++    };
++
++    String STR_FORM_GROUPBOX
++    {
++        Text [ en-US ] = "Group Box ";
++    };
++
++    String STR_FORM_DROPDOWN 
++    {
++        Text [ en-US ] = "Drop Down ";
++    };
++
++    String STR_FORM_SPINNER
++    {
++        Text [ en-US ] = "Spinner ";
++    };
++
++    String STR_FORM_SCROLLBAR
++    {
++        Text [ en-US ] = "Scroll Bar ";
++    };
++
+ };
+ 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]