View | Details | Raw Unified | Return to issue 85358
Collapse All | Expand All

(-)/data4/LatestSourceOnly/ooo-build/build/ooh680-m1/sc/source/filter/excel/xiescher.cxx (-2 / +32 lines)
Lines 598-605 sal_Size XclImpDrawObjBase::DoGetProgres Link Here
598
    return 1;
598
    return 1;
599
}
599
}
600
600
601
void XclImpDrawObjBase::DoProcessSdrObj( SdrObject& /*rSdrObj*/ ) const
601
void XclImpDrawObjBase::DoProcessSdrObj( SdrObject& rSdrObj ) const
602
{
602
{
603
    if ( rSdrObj.GetName().Len() == 0 )
604
    {
605
        // create  a default name based on the shape id and shape type
606
        sal_uInt32 nID = ( mnShapeId & 0x000003ff );
607
        String sID = String::CreateFromInt32( nID );
608
        String sName;
609
        switch ( mnObjType )
610
        {
611
            case EXC_OBJ_CMO_DRAWING: 
612
                  sName = ScGlobal::GetRscString( STR_SHAPE_AUTOSHAPE );
613
                  break;
614
            case EXC_OBJ_CMO_RECTANGLE:
615
                  sName = ScGlobal::GetRscString( STR_SHAPE_RECTANGLE );
616
                  break;
617
            case EXC_OBJ_CMO_LINE:
618
                  sName = ScGlobal::GetRscString( STR_SHAPE_LINE );
619
                  break;
620
            case EXC_OBJ_CMO_ELLIPSE:
621
                  sName = ScGlobal::GetRscString( STR_SHAPE_OVAL );
622
                  break;
623
            case EXC_OBJ_CMO_TEXT:
624
                  sName = ScGlobal::GetRscString( STR_SHAPE_TEXTBOX );
625
                  break;
626
        default:
627
            DBG_ERROR1( "XclImpDrawObjBase::ProcessSdrObject - unknown object type 0x%04hX", mnObjId );
628
            break;
629
        }       
630
        if ( sName.Len() > 0 )
631
            rSdrObj.SetName( sName.Append( sID ) );
632
    } 
603
    // trace if object is not printable
633
    // trace if object is not printable
604
    if( !IsPrintable() )
634
    if( !IsPrintable() )
605
        GetTracer().TraceObjectNotPrintable();
635
        GetTracer().TraceObjectNotPrintable();
Lines 914-920 void XclImpTbxControlObj::DoProcessSdrOb Link Here
914
    // #118053# #i51348# set internal name of the control (use name from SdrObject, if extant)
941
    // #118053# #i51348# set internal name of the control (use name from SdrObject, if extant)
915
    OUString aCtrlName = rSdrObj.GetName();
942
    OUString aCtrlName = rSdrObj.GetName();
916
    if( aCtrlName.getLength() == 0 )
943
    if( aCtrlName.getLength() == 0 )
917
        aCtrlName = XclControlObjHelper::GetTbxControlName( GetObjType() );
944
        aCtrlName = XclControlObjHelper::GetTbxControlName( GetObjType(), GetShapeId() );
918
    if( aCtrlName.getLength() > 0 )
945
    if( aCtrlName.getLength() > 0 )
919
        aPropSet.SetProperty( CREATE_OUSTRING( "Name" ), aCtrlName );
946
        aPropSet.SetProperty( CREATE_OUSTRING( "Name" ), aCtrlName );
920
947
(-)/data4/LatestSourceOnly/ooo-build/build/ooh680-m1/sc/source/filter/excel/xlescher.cxx (-11 / +13 lines)
Lines 58-63 Link Here
58
#ifndef SC_XESTREAM_HXX
58
#ifndef SC_XESTREAM_HXX
59
#include "xestream.hxx"
59
#include "xestream.hxx"
60
#endif
60
#endif
61
#include "globstr.hrc"
61
62
62
using ::rtl::OUString;
63
using ::rtl::OUString;
63
using ::com::sun::star::uno::Reference
64
using ::com::sun::star::uno::Reference
Lines 342-364 OUString XclControlObjHelper::GetTbxServ Link Here
342
    return aName;
342
    return aName;
343
}
343
}
344
344
345
OUString XclControlObjHelper::GetTbxControlName( sal_uInt16 nCtrlType )
345
OUString XclControlObjHelper::GetTbxControlName( sal_uInt16 nCtrlType, sal_uInt32 nShapeId )
346
{
346
{
347
    OUString aName;
347
    OUString aName;
348
    OUString sID = OUString::valueOf( static_cast< sal_Int32 >( nShapeId )  & 0x000003ff );
348
    switch( nCtrlType )
349
    switch( nCtrlType )
349
    {
350
    {
350
        case EXC_OBJ_CMO_BUTTON:        aName = CREATE_OUSTRING( "CommandButton" ); break;
351
        case EXC_OBJ_CMO_BUTTON:        aName = ScGlobal::GetRscString( STR_FORM_BUTTON ); break;
351
        case EXC_OBJ_CMO_CHECKBOX:      aName = CREATE_OUSTRING( "CheckBox" );      break;
352
        case EXC_OBJ_CMO_CHECKBOX:      aName = ScGlobal::GetRscString( STR_FORM_CHECKBOX );      break;
352
        case EXC_OBJ_CMO_OPTIONBUTTON:  aName = CREATE_OUSTRING( "OptionButton" );  break;
353
        case EXC_OBJ_CMO_OPTIONBUTTON:  aName = ScGlobal::GetRscString( STR_FORM_OPTIONBOX );  break;
353
        case EXC_OBJ_CMO_LABEL:         aName = CREATE_OUSTRING( "Label" );         break;
354
        case EXC_OBJ_CMO_LABEL:         aName = ScGlobal::GetRscString( STR_FORM_LABEL );         break;
354
        case EXC_OBJ_CMO_LISTBOX:       aName = CREATE_OUSTRING( "ListBox" );       break;
355
        case EXC_OBJ_CMO_LISTBOX:       aName = ScGlobal::GetRscString( STR_FORM_LISTBOX );       break;
355
        case EXC_OBJ_CMO_GROUPBOX:      aName = CREATE_OUSTRING( "GroupBox" );      break;
356
        case EXC_OBJ_CMO_GROUPBOX:      aName = ScGlobal::GetRscString( STR_FORM_GROUPBOX );      break;
356
        case EXC_OBJ_CMO_COMBOBOX:      aName = CREATE_OUSTRING( "ComboBox" );      break;
357
        case EXC_OBJ_CMO_COMBOBOX:      aName = ScGlobal::GetRscString( STR_FORM_DROPDOWN );      break;
357
        case EXC_OBJ_CMO_SPIN:          aName = CREATE_OUSTRING( "SpinButton" );    break;
358
        case EXC_OBJ_CMO_SPIN:          aName = ScGlobal::GetRscString( STR_FORM_SPINNER );    break;
358
        case EXC_OBJ_CMO_SCROLLBAR:     aName = CREATE_OUSTRING( "ScrollBar" );     break;
359
        case EXC_OBJ_CMO_SCROLLBAR:     aName = ScGlobal::GetRscString( STR_FORM_SCROLLBAR );     break;
359
        default:    DBG_ERRORFILE( "XclControlObjHelper::GetTbxControlName - unknown control type" );
360
        default:    DBG_ERRORFILE( "XclControlObjHelper::GetTbxControlName - unknown control type" );
360
    }
361
    }
361
    return aName;
362
    return aName = aName += sID;
362
}
363
}
363
364
364
OUString XclControlObjHelper::GetTbxListenerType( sal_uInt16 nCtrlType )
365
OUString XclControlObjHelper::GetTbxListenerType( sal_uInt16 nCtrlType )
(-)/data4/LatestSourceOnly/ooo-build/build/ooh680-m1/sc/source/filter/inc/xlescher.hxx (-1 / +1 lines)
Lines 278-284 public: Link Here
278
    /** Returns the component service name for the passed control type. */
278
    /** Returns the component service name for the passed control type. */
279
    static ::rtl::OUString GetTbxServiceName( sal_uInt16 nCtrlType );
279
    static ::rtl::OUString GetTbxServiceName( sal_uInt16 nCtrlType );
280
    /** Returns a default control name for the passed control type. */
280
    /** Returns a default control name for the passed control type. */
281
    static ::rtl::OUString GetTbxControlName( sal_uInt16 nCtrlType );
281
    static ::rtl::OUString GetTbxControlName( sal_uInt16 nCtrlType, sal_uInt32 nShapeId );
282
282
283
    /** Returns the listener type (interface name) for macro events for the passed control type. */
283
    /** Returns the listener type (interface name) for macro events for the passed control type. */
284
    static ::rtl::OUString GetTbxListenerType( sal_uInt16 nCtrlType );
284
    static ::rtl::OUString GetTbxListenerType( sal_uInt16 nCtrlType );
(-)backup/sc/inc/globstr.hrc (-1 / +17 lines)
Lines 563-569 Link Here
563
#define STR_ERR_LONG_NESTED_ARRAY   419
563
#define STR_ERR_LONG_NESTED_ARRAY   419
564
#define STR_UNDO_TEXTTOCOLUMNS      420
564
#define STR_UNDO_TEXTTOCOLUMNS      420
565
565
566
#define STR_COUNT                   421
566
#define STR_SHAPE_AUTOSHAPE         421
567
#define STR_SHAPE_RECTANGLE         422
568
#define STR_SHAPE_LINE              423
569
#define STR_SHAPE_OVAL              424
570
#define STR_SHAPE_TEXTBOX           425
571
572
#define STR_FORM_BUTTON             426
573
#define STR_FORM_CHECKBOX           427
574
#define STR_FORM_OPTIONBOX          428
575
#define STR_FORM_LABEL              429
576
#define STR_FORM_LISTBOX            430
577
#define STR_FORM_GROUPBOX           431
578
#define STR_FORM_DROPDOWN           432
579
#define STR_FORM_SPINNER            433
580
#define STR_FORM_SCROLLBAR          434
581
582
#define STR_COUNT                   434
567
583
568
#endif
584
#endif
569
585
(-)backup/sc/source/ui/src/globstr.src (+71 lines)
Lines 1691-1695 Resource RID_GLOBSTR Link Here
1691
    {
1691
    {
1692
        Text [ en-US ] = "Text to Columns";
1692
        Text [ en-US ] = "Text to Columns";
1693
    };
1693
    };
1694
1695
    String STR_SHAPE_AUTOSHAPE
1696
    {
1697
        Text [ en-US ] = "AutoShape ";
1698
    };
1699
1700
    String STR_SHAPE_RECTANGLE
1701
    {
1702
        Text [ en-US ] = "Rectangle ";
1703
    };
1704
1705
    String STR_SHAPE_LINE
1706
    {
1707
        Text [ en-US ] = "Line ";
1708
    };
1709
1710
    String STR_SHAPE_OVAL
1711
    {
1712
        Text [ en-US ] = "Oval ";
1713
    };
1714
1715
    String STR_SHAPE_TEXTBOX
1716
    {
1717
        Text [ en-US ] = "Text Box ";
1718
    };
1719
1720
    String STR_FORM_BUTTON
1721
    {
1722
        Text [ en-US ] = "Button ";
1723
    };
1724
1725
    String STR_FORM_CHECKBOX
1726
    {
1727
        Text [ en-US ] = "Check Box ";
1728
    };
1729
1730
    String STR_FORM_OPTIONBOX
1731
    {
1732
        Text [ en-US ] = "Option Box ";
1733
    };
1734
1735
    String STR_FORM_LABEL
1736
    {
1737
        Text [ en-US ] = "Label ";
1738
    };
1739
1740
    String STR_FORM_LISTBOX
1741
    {
1742
        Text [ en-US ] = "List Box ";
1743
    };
1744
1745
    String STR_FORM_GROUPBOX
1746
    {
1747
        Text [ en-US ] = "Group Box ";
1748
    };
1749
1750
    String STR_FORM_DROPDOWN 
1751
    {
1752
        Text [ en-US ] = "Drop Down ";
1753
    };
1754
1755
    String STR_FORM_SPINNER
1756
    {
1757
        Text [ en-US ] = "Spinner ";
1758
    };
1759
1760
    String STR_FORM_SCROLLBAR
1761
    {
1762
        Text [ en-US ] = "Scroll Bar ";
1763
    };
1764
1694
};
1765
};
1695
1766

Return to issue 85358