ooo-build r14648 - in trunk: . patches/dev300



Author: noelpwer
Date: Fri Nov 28 14:39:18 2008
New Revision: 14648
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14648&view=rev

Log:
2008-11-28  Noel Power  <noel power novell com>

        * patches/dev300/default-autotext-and-form-name.diff: tweak for
        * m35+



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

Modified: trunk/patches/dev300/default-autotext-and-form-name.diff
==============================================================================
--- trunk/patches/dev300/default-autotext-and-form-name.diff	(original)
+++ trunk/patches/dev300/default-autotext-and-form-name.diff	Fri Nov 28 14:39:18 2008
@@ -1,117 +1,8 @@
-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,38 @@ sal_Size XclImpDrawObjBase::DoGetProgres
-     return 1;
- }
- 
--void XclImpDrawObjBase::DoProcessSdrObj( SdrObject& /*rSdrObj*/ ) const
-+void XclImpDrawObjBase::DoProcessSdrObj( SdrObject& rSdrObj ) const
- {
-+    if ( rSdrObj.GetName().Len() == 0 )
-+    {
-+        // 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: 
-+                  sName = ScGlobal::GetRscString( STR_SHAPE_AUTOSHAPE );
-+                  break;
-+            case EXC_OBJ_CMO_RECTANGLE:
-+                  sName = ScGlobal::GetRscString( STR_SHAPE_RECTANGLE );
-+                  break;
-+            case EXC_OBJ_CMO_LINE:
-+                  sName = ScGlobal::GetRscString( STR_SHAPE_LINE );
-+                  break;
-+            case EXC_OBJ_CMO_ELLIPSE:
-+                  sName = ScGlobal::GetRscString( STR_SHAPE_OVAL );
-+                  break;
-+            case EXC_OBJ_CMO_TEXT:
-+                  sName = ScGlobal::GetRscString( STR_SHAPE_TEXTBOX );
-+                  break;
-+        default:
-+            DBG_ERROR1( "XclImpDrawObjBase::ProcessSdrObject - unknown object type 0x%04hX", mnObjType );
-+            break;
-+        }       
-+        if ( sName.Len() > 0 )
-+            rSdrObj.SetName( sName.Append( sID ) );
-+    } 
-     // trace if object is not printable
-     if( !IsPrintable() )
-         GetTracer().TraceObjectNotPrintable();
-@@ -914,7 +941,7 @@ void XclImpTbxControlObj::DoProcessSdrOb
-     // #118053# #i51348# set internal name of the control (use name from SdrObject, if extant)
-     OUString aCtrlName = rSdrObj.GetName();
-     if( aCtrlName.getLength() == 0 )
--        aCtrlName = XclControlObjHelper::GetTbxControlName( GetObjType() );
-+        aCtrlName = XclControlObjHelper::GetTbxControlName( GetObjType(), GetShapeId() );
-     if( aCtrlName.getLength() > 0 )
-         aPropSet.SetProperty( CREATE_OUSTRING( "Name" ), aCtrlName );
- 
-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 @@
- #include "document.hxx"
- #include "xistream.hxx"
- #include "xestream.hxx"
-+#include "globstr.hrc"
- 
- using ::rtl::OUString;
- using ::com::sun::star::uno::Reference
-@@ -342,23 +342,24 @@ OUString XclControlObjHelper::GetTbxServ
-     return aName;
- }
- 
--OUString XclControlObjHelper::GetTbxControlName( sal_uInt16 nCtrlType )
-+OUString XclControlObjHelper::GetTbxControlName( sal_uInt16 nCtrlType, sal_uInt32 nShapeId )
- {
-     OUString aName;
-+    OUString sID = OUString::valueOf( static_cast< sal_Int32 >( nShapeId )  & 0x000003ff );
-     switch( nCtrlType )
-     {
--        case EXC_OBJ_CMO_BUTTON:        aName = CREATE_OUSTRING( "CommandButton" ); break;
--        case EXC_OBJ_CMO_CHECKBOX:      aName = CREATE_OUSTRING( "CheckBox" );      break;
--        case EXC_OBJ_CMO_OPTIONBUTTON:  aName = CREATE_OUSTRING( "OptionButton" );  break;
--        case EXC_OBJ_CMO_LABEL:         aName = CREATE_OUSTRING( "Label" );         break;
--        case EXC_OBJ_CMO_LISTBOX:       aName = CREATE_OUSTRING( "ListBox" );       break;
--        case EXC_OBJ_CMO_GROUPBOX:      aName = CREATE_OUSTRING( "GroupBox" );      break;
--        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 = 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_OPTIONBOX );  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;
-+    return aName = aName += sID;
- }
- 
- OUString XclControlObjHelper::GetTbxListenerType( sal_uInt16 nCtrlType )
-diff -rup /data4/LatestSourceOnly/ooo-build/build/ooh680-m1/sc/source/filter/inc/xlescher.hxx sc/source/filter/inc/xlescher.hxx
---- /data4/LatestSourceOnly/ooo-build/build/ooh680-m1/sc/source/filter/inc/xlescher.hxx	2007-01-22 13:22:23.000000000 +0000
-+++ sc/source/filter/inc/xlescher.hxx	2008-01-17 15:39:12.000000000 +0000
-@@ -278,7 +278,7 @@ public:
-     /** Returns the component service name for the passed control type. */
-     static ::rtl::OUString GetTbxServiceName( sal_uInt16 nCtrlType );
-     /** Returns a default control name for the passed control type. */
--    static ::rtl::OUString GetTbxControlName( sal_uInt16 nCtrlType );
-+    static ::rtl::OUString GetTbxControlName( sal_uInt16 nCtrlType, sal_uInt32 nShapeId );
- 
-     /** 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 @@
+diff --git sc/inc/globstr.hrc sc/inc/globstr.hrc
+index d0c9e8f..b4e6f90 100644
+--- sc/inc/globstr.hrc
++++ sc/inc/globstr.hrc
+@@ -569,7 +569,23 @@
  #define STR_UNKNOWN_USER            429
  #define STR_LONG_ERR_NULL           430
  
@@ -124,7 +15,7 @@
 +
 +#define STR_FORM_BUTTON             436
 +#define STR_FORM_CHECKBOX           437
-+#define STR_FORM_OPTIONBOX          438
++#define STR_FORM_OPTIONBUTTON       438
 +#define STR_FORM_LABEL              439
 +#define STR_FORM_LISTBOX            440
 +#define STR_FORM_GROUPBOX           441
@@ -136,11 +27,70 @@
  
  #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
+diff --git sc/source/filter/excel/xiescher.cxx sc/source/filter/excel/xiescher.cxx
+index 2508629..51deb7c 100644
+--- sc/source/filter/excel/xiescher.cxx
++++ sc/source/filter/excel/xiescher.cxx
+@@ -3547,27 +3547,27 @@ XclImpObjectManager::XclImpObjectManager( const XclImpRoot& rRoot ) :
+     XclImpRoot( rRoot )
+ {
+     maDefObjNames[ EXC_OBJTYPE_GROUP ]          = CREATE_STRING( "Group" );
+-    maDefObjNames[ EXC_OBJTYPE_LINE ]           = CREATE_STRING( "Line" );
+-    maDefObjNames[ EXC_OBJTYPE_RECTANGLE ]      = CREATE_STRING( "Rectangle" );
+-    maDefObjNames[ EXC_OBJTYPE_OVAL ]           = CREATE_STRING( "Oval" );
++    maDefObjNames[ EXC_OBJTYPE_LINE ]           = ScGlobal::GetRscString( STR_SHAPE_LINE );
++    maDefObjNames[ EXC_OBJTYPE_RECTANGLE ]      = ScGlobal::GetRscString( STR_SHAPE_RECTANGLE );
++    maDefObjNames[ EXC_OBJTYPE_OVAL ]           = ScGlobal::GetRscString( STR_SHAPE_OVAL );
+     maDefObjNames[ EXC_OBJTYPE_ARC ]            = CREATE_STRING( "Arc" );
+     maDefObjNames[ EXC_OBJTYPE_CHART ]          = CREATE_STRING( "Chart" );
+     maDefObjNames[ EXC_OBJTYPE_TEXT ]           = CREATE_STRING( "Text" );
+-    maDefObjNames[ EXC_OBJTYPE_BUTTON ]         = CREATE_STRING( "Button" );
++    maDefObjNames[ EXC_OBJTYPE_BUTTON ]         =  ScGlobal::GetRscString( STR_FORM_BUTTON );
+     maDefObjNames[ EXC_OBJTYPE_PICTURE ]        = CREATE_STRING( "Picture" );
+     maDefObjNames[ EXC_OBJTYPE_POLYGON ]        = CREATE_STRING( "Freeform" );
+-    maDefObjNames[ EXC_OBJTYPE_CHECKBOX ]       = CREATE_STRING( "Check Box" );
+-    maDefObjNames[ EXC_OBJTYPE_OPTIONBUTTON ]   = CREATE_STRING( "Option Button" );
++    maDefObjNames[ EXC_OBJTYPE_CHECKBOX ]       = ScGlobal::GetRscString( STR_FORM_CHECKBOX ); 
++    maDefObjNames[ EXC_OBJTYPE_OPTIONBUTTON ]   = ScGlobal::GetRscString( STR_FORM_OPTIONBUTTON );
+     maDefObjNames[ EXC_OBJTYPE_EDIT ]           = CREATE_STRING( "Edit Box" );
+-    maDefObjNames[ EXC_OBJTYPE_LABEL ]          = CREATE_STRING( "Label" );
++    maDefObjNames[ EXC_OBJTYPE_LABEL ]          = ScGlobal::GetRscString( STR_FORM_LABEL );
+     maDefObjNames[ EXC_OBJTYPE_DIALOG ]         = CREATE_STRING( "Dialog Frame" );
+-    maDefObjNames[ EXC_OBJTYPE_SPIN ]           = CREATE_STRING( "Spinner" );
+-    maDefObjNames[ EXC_OBJTYPE_SCROLLBAR ]      = CREATE_STRING( "Scroll Bar" );
+-    maDefObjNames[ EXC_OBJTYPE_LISTBOX ]        = CREATE_STRING( "List Box" );
+-    maDefObjNames[ EXC_OBJTYPE_GROUPBOX ]       = CREATE_STRING( "Group Box" );
+-    maDefObjNames[ EXC_OBJTYPE_DROPDOWN ]       = CREATE_STRING( "Drop Down" );
++    maDefObjNames[ EXC_OBJTYPE_SPIN ]           = ScGlobal::GetRscString( STR_FORM_SPINNER );
++    maDefObjNames[ EXC_OBJTYPE_SCROLLBAR ]      = ScGlobal::GetRscString( STR_FORM_SCROLLBAR );
++    maDefObjNames[ EXC_OBJTYPE_LISTBOX ]        = ScGlobal::GetRscString( STR_FORM_LISTBOX );
++    maDefObjNames[ EXC_OBJTYPE_GROUPBOX ]       = ScGlobal::GetRscString( STR_FORM_GROUPBOX );
++    maDefObjNames[ EXC_OBJTYPE_DROPDOWN ]       = ScGlobal::GetRscString( STR_FORM_DROPDOWN );
+     maDefObjNames[ EXC_OBJTYPE_NOTE ]           = CREATE_STRING( "Comment" );
+-    maDefObjNames[ EXC_OBJTYPE_DRAWING ]        = CREATE_STRING( "AutoShape" );
++    maDefObjNames[ EXC_OBJTYPE_DRAWING ]        = ScGlobal::GetRscString( STR_SHAPE_AUTOSHAPE );
+ }
+ 
+ XclImpObjectManager::~XclImpObjectManager()
+diff --git sc/source/filter/excel/xlescher.cxx sc/source/filter/excel/xlescher.cxx
+index e66f60d..5076ad2 100644
+--- sc/source/filter/excel/xlescher.cxx
++++ sc/source/filter/excel/xlescher.cxx
+@@ -38,6 +38,7 @@
+ #include "document.hxx"
+ #include "xistream.hxx"
+ #include "xestream.hxx"
++#include "globstr.hrc"
+ 
+ using ::rtl::OUString;
+ using ::com::sun::star::uno::Reference;
+diff --git sc/source/ui/src/globstr.src sc/source/ui/src/globstr.src
+index 24664f5..19e48c6 100644
+--- sc/source/ui/src/globstr.src
++++ sc/source/ui/src/globstr.src
+@@ -1713,5 +1713,76 @@ Resource RID_GLOBSTR
      {
-         Text [ en-US ] = "Text to Columns";
+         Text [ en-US ] = "Unknown User";
      };
 +
 +    String STR_SHAPE_AUTOSHAPE
@@ -178,9 +128,9 @@
 +        Text [ en-US ] = "Check Box ";
 +    };
 +
-+    String STR_FORM_OPTIONBOX
++    String STR_FORM_OPTIONBUTTON
 +    {
-+        Text [ en-US ] = "Option Box ";
++        Text [ en-US ] = "Option Button ";
 +    };
 +
 +    String STR_FORM_LABEL



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