summaryrefslogtreecommitdiff
path: root/vbahelper/source/msforms/vbacontrol.cxx
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-05-31 19:37:03 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-05-31 19:37:03 -0500
commit02bd365494a59bb9080a4d73eafbde7903bd2cc9 (patch)
treed588b40845b221f227d22f151c754e473ed29bff /vbahelper/source/msforms/vbacontrol.cxx
parent76f63f4c9b324de9a6d2e1de1c6f718a153feb26 (diff)
targeted string re-work
Change-Id: I7a67dba479e562ae3b08e6acf9bb6139eb155556
Diffstat (limited to 'vbahelper/source/msforms/vbacontrol.cxx')
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx118
1 files changed, 59 insertions, 59 deletions
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index caf5491f7370..1978899704cf 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -95,7 +95,7 @@ ScVbaControl::getWindowPeer() throw (uno::RuntimeException)
}
catch(const uno::Exception&)
{
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The Control does not exsit")),
+ throw uno::RuntimeException( rtl::OUString("The Control does not exsit"),
uno::Reference< uno::XInterface >() );
}
return xWinPeer;
@@ -147,7 +147,7 @@ ScVbaControl::ScVbaControl( const uno::Reference< XHelperInterface >& xParent, c
{
m_xProps.set( xControlShape->getControl(), uno::UNO_QUERY_THROW );
rtl::OUString sDefaultControl;
- m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("DefaultControl") ) ) >>= sDefaultControl;
+ m_xProps->getPropertyValue( rtl::OUString( "DefaultControl" ) ) >>= sDefaultControl;
uno::Reference< lang::XMultiComponentFactory > xMFac( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
m_xEmptyFormControl.set( xMFac->createInstanceWithContext( sDefaultControl, mxContext ), uno::UNO_QUERY_THROW );
}
@@ -185,7 +185,7 @@ void ScVbaControl::removeResouce() throw( uno::RuntimeException )
sal_Bool SAL_CALL ScVbaControl::getEnabled() throw (uno::RuntimeException)
{
uno::Any aValue = m_xProps->getPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Enabled" ) ) );
+ (rtl::OUString( "Enabled" ) );
sal_Bool bRet = false;
aValue >>= bRet;
return bRet;
@@ -195,7 +195,7 @@ void SAL_CALL ScVbaControl::setEnabled( sal_Bool bVisible ) throw (uno::RuntimeE
{
uno::Any aValue( bVisible );
m_xProps->setPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Enabled" ) ), aValue);
+ (rtl::OUString( "Enabled" ), aValue);
}
@@ -203,7 +203,7 @@ sal_Bool SAL_CALL ScVbaControl::getVisible() throw (uno::RuntimeException)
{
sal_Bool bVisible( sal_True );
m_xProps->getPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EnableVisible" ) )) >>= bVisible;
+ (rtl::OUString( "EnableVisible" )) >>= bVisible;
return bVisible;
}
@@ -211,7 +211,7 @@ void SAL_CALL ScVbaControl::setVisible( sal_Bool bVisible ) throw (uno::RuntimeE
{
uno::Any aValue( bVisible );
m_xProps->setPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EnableVisible" ) ), aValue);
+ (rtl::OUString( "EnableVisible" ), aValue);
}
double SAL_CALL ScVbaControl::getHeight() throw (uno::RuntimeException)
{
@@ -298,12 +298,12 @@ ScVbaControl::getControlSource() throw (uno::RuntimeException)
try
{
uno::Reference< lang::XMultiServiceFactory > xFac( m_xModel, uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xConvertor( xFac->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.table.CellAddressConversion" ))), uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xConvertor( xFac->createInstance( rtl::OUString( "com.sun.star.table.CellAddressConversion" )), uno::UNO_QUERY );
uno::Reference< beans::XPropertySet > xProps( xBindable->getValueBinding(), uno::UNO_QUERY_THROW );
table::CellAddress aAddress;
- xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BoundCell") ) ) >>= aAddress;
- xConvertor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Address") ), uno::makeAny( aAddress ) );
- xConvertor->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("XL_A1_Representation") ) ) >>= sControlSource;
+ xProps->getPropertyValue( rtl::OUString( "BoundCell" ) ) >>= aAddress;
+ xConvertor->setPropertyValue( rtl::OUString( "Address" ), uno::makeAny( aAddress ) );
+ xConvertor->getPropertyValue( rtl::OUString( "XL_A1_Representation" ) ) >>= sControlSource;
}
catch(const uno::Exception&)
{
@@ -311,7 +311,7 @@ ScVbaControl::getControlSource() throw (uno::RuntimeException)
}
return sControlSource;
#else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("getControlSource not supported") ), uno::Reference< uno::XInterface >()); // not supported
+ throw uno::RuntimeException( rtl::OUString( "getControlSource not supported" ), uno::Reference< uno::XInterface >()); // not supported
#endif
}
@@ -322,7 +322,7 @@ ScVbaControl::setControlSource( const rtl::OUString& _controlsource ) throw (uno
rtl::OUString sEmpty;
svt::BindableControlHelper::ApplyListSourceAndBindableData( m_xModel, m_xProps, _controlsource, sEmpty );
#else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("setControlSource not supported ") ).concat( _controlsource ), uno::Reference< uno::XInterface >()); // not supported
+ throw uno::RuntimeException( rtl::OUString( "setControlSource not supported " ).concat( _controlsource ), uno::Reference< uno::XInterface >()); // not supported
#endif
}
@@ -337,13 +337,13 @@ ScVbaControl::getRowSource() throw (uno::RuntimeException)
try
{
uno::Reference< lang::XMultiServiceFactory > xFac( m_xModel, uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xConvertor( xFac->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.table.CellRangeAddressConversion" ))), uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xConvertor( xFac->createInstance( rtl::OUString( "com.sun.star.table.CellRangeAddressConversion" )), uno::UNO_QUERY );
uno::Reference< beans::XPropertySet > xProps( xListSink->getListEntrySource(), uno::UNO_QUERY_THROW );
table::CellRangeAddress aAddress;
- xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CellRange") ) ) >>= aAddress;
- xConvertor->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Address")), uno::makeAny( aAddress ) );
- xConvertor->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("XL_A1_Representation") ) ) >>= sRowSource;
+ xProps->getPropertyValue( rtl::OUString( "CellRange" ) ) >>= aAddress;
+ xConvertor->setPropertyValue( rtl::OUString( "Address"), uno::makeAny( aAddress ) );
+ xConvertor->getPropertyValue( rtl::OUString( "XL_A1_Representation" ) ) >>= sRowSource;
}
catch(const uno::Exception&)
{
@@ -351,7 +351,7 @@ ScVbaControl::getRowSource() throw (uno::RuntimeException)
}
return sRowSource;
#else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("getRowSource not supported") ), uno::Reference< uno::XInterface >()); // not supported
+ throw uno::RuntimeException( rtl::OUString( "getRowSource not supported" ), uno::Reference< uno::XInterface >()); // not supported
#endif
}
@@ -362,7 +362,7 @@ ScVbaControl::setRowSource( const rtl::OUString& _rowsource ) throw (uno::Runtim
rtl::OUString sEmpty;
svt::BindableControlHelper::ApplyListSourceAndBindableData( m_xModel, m_xProps, sEmpty, _rowsource );
#else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("setRowSource not supported ") ).concat( _rowsource ), uno::Reference< uno::XInterface >()); // not supported
+ throw uno::RuntimeException( rtl::OUString( "setRowSource not supported " ).concat( _rowsource ), uno::Reference< uno::XInterface >()); // not supported
#endif
}
@@ -371,7 +371,7 @@ ScVbaControl::getName() throw (uno::RuntimeException)
{
rtl::OUString sName;
m_xProps->getPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ) ) >>= sName;
+ (rtl::OUString( "Name" ) ) >>= sName;
return sName;
}
@@ -380,7 +380,7 @@ void SAL_CALL
ScVbaControl::setName( const rtl::OUString& _name ) throw (uno::RuntimeException)
{
m_xProps->setPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ), uno::makeAny( _name ) );
+ (rtl::OUString( "Name" ), uno::makeAny( _name ) );
}
rtl::OUString SAL_CALL
@@ -388,7 +388,7 @@ ScVbaControl::getControlTipText() throw (css::uno::RuntimeException)
{
rtl::OUString sName;
m_xProps->getPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HelpText" ) ) ) >>= sName;
+ (rtl::OUString( "HelpText" ) ) >>= sName;
return sName;
}
@@ -396,7 +396,7 @@ void SAL_CALL
ScVbaControl::setControlTipText( const rtl::OUString& rsToolTip ) throw (css::uno::RuntimeException)
{
m_xProps->setPropertyValue
- (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HelpText" ) ), uno::makeAny( rsToolTip ) );
+ (rtl::OUString( "HelpText" ), uno::makeAny( rsToolTip ) );
}
::rtl::OUString SAL_CALL ScVbaControl::getTag()
@@ -414,13 +414,13 @@ void SAL_CALL ScVbaControl::setTag( const ::rtl::OUString& aTag )
::sal_Int32 SAL_CALL ScVbaControl::getForeColor() throw (::com::sun::star::uno::RuntimeException)
{
sal_Int32 nForeColor = -1;
- m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextColor" ) ) ) >>= nForeColor;
+ m_xProps->getPropertyValue( rtl::OUString( "TextColor" ) ) >>= nForeColor;
return OORGBToXLRGB( nForeColor );
}
void SAL_CALL ScVbaControl::setForeColor( ::sal_Int32 _forecolor ) throw (::com::sun::star::uno::RuntimeException)
{
- m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextColor" ) ), uno::makeAny( XLRGBToOORGB( _forecolor ) ) );
+ m_xProps->setPropertyValue( rtl::OUString( "TextColor" ), uno::makeAny( XLRGBToOORGB( _forecolor ) ) );
}
struct PointerStyles
@@ -505,10 +505,10 @@ ScVbaControl::setMousePointer( ::sal_Int32 _mousepointer ) throw (::com::sun::st
void ScVbaControl::fireEvent( script::ScriptEvent& evt )
{
uno::Reference<lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
- uno::Reference< script::XScriptListener > xScriptListener( xServiceManager->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.EventListener" ) ), mxContext ), uno::UNO_QUERY_THROW );
+ uno::Reference< script::XScriptListener > xScriptListener( xServiceManager->createInstanceWithContext( rtl::OUString( "ooo.vba.EventListener" ), mxContext ), uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xProps( xScriptListener, uno::UNO_QUERY_THROW );
- xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Model" ) ), uno::makeAny( m_xModel ) );
+ xProps->setPropertyValue( ::rtl::OUString( "Model" ), uno::makeAny( m_xModel ) );
// handling for sheet control
uno::Reference< msforms::XControl > xThisControl( this );
@@ -526,7 +526,7 @@ void ScVbaControl::fireEvent( script::ScriptEvent& evt )
aEvt.Source = m_xEmptyFormControl;
// Set up proper scriptcode
uno::Reference< lang::XMultiServiceFactory > xDocFac( m_xModel, uno::UNO_QUERY_THROW );
- uno::Reference< document::XCodeNameQuery > xNameQuery( xDocFac->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo.vba.VBACodeNameProvider")) ), uno::UNO_QUERY_THROW );
+ uno::Reference< document::XCodeNameQuery > xNameQuery( xDocFac->createInstance( rtl::OUString("ooo.vba.VBACodeNameProvider") ), uno::UNO_QUERY_THROW );
uno::Reference< uno::XInterface > xIf( xControlShape->getControl(), uno::UNO_QUERY_THROW );
evt.ScriptCode = xNameQuery->getCodeNameForObject( xIf );
evt.Arguments[ 0 ] = uno::makeAny( aEvt );
@@ -555,18 +555,18 @@ void ScVbaControl::fireEvent( script::ScriptEvent& evt )
void ScVbaControl::fireChangeEvent()
{
script::ScriptEvent evt;
- evt.ScriptType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("VBAInterop") );
+ evt.ScriptType = rtl::OUString( "VBAInterop" );
evt.ListenerType = form::XChangeListener::static_type(0);
- evt.MethodName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("changed") );
+ evt.MethodName = rtl::OUString( "changed" );
fireEvent( evt );
}
void ScVbaControl::fireClickEvent()
{
script::ScriptEvent evt;
- evt.ScriptType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("VBAInterop") );
+ evt.ScriptType = rtl::OUString( "VBAInterop" );
evt.ListenerType = awt::XActionListener::static_type(0);
- evt.MethodName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("actionPerformed") );
+ evt.MethodName = rtl::OUString( "actionPerformed" );
fireEvent( evt );
}
@@ -588,7 +588,7 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R
{
uno::Reference< beans::XPropertySet > xProps( xControlShape->getControl(), uno::UNO_QUERY_THROW );
sal_Int32 nClassId = -1;
- const static rtl::OUString sClassId( RTL_CONSTASCII_USTRINGPARAM("ClassId") );
+ const static rtl::OUString sClassId( "ClassId" );
xProps->getPropertyValue( sClassId ) >>= nClassId;
uno::Reference< XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess
uno::Reference< drawing::XShape > xShape( xControlShape, uno::UNO_QUERY_THROW );
@@ -616,7 +616,7 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R
case form::FormComponentType::SCROLLBAR:
return new ScVbaScrollBar( xVbaParent, xContext, xControlShape, xModel, xGeoHelper.release() );
}
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unsupported control.")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("Unsupported control."), uno::Reference< uno::XInterface >() );
}
/*static*/ uno::Reference< msforms::XControl > ScVbaControlFactory::createUserformControl(
@@ -632,59 +632,59 @@ void SAL_CALL ScVbaControl::setTabIndex( sal_Int32 /*nTabIndex*/ ) throw (uno::R
uno::Reference< XHelperInterface > xVbaParent; // #FIXME - should be worksheet I guess
::std::auto_ptr< UserFormGeometryHelper > xGeoHelper( new UserFormGeometryHelper( xContext, xControl, fOffsetX, fOffsetY ) );
- if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlCheckBoxModel") ) ) )
+ if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlCheckBoxModel" ) ) )
xVBAControl.set( new ScVbaCheckbox( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlRadioButtonModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlRadioButtonModel" ) ) )
xVBAControl.set( new ScVbaRadioButton( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlEditModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlEditModel" ) ) )
xVBAControl.set( new ScVbaTextBox( xVbaParent, xContext, xControl, xModel, xGeoHelper.release(), true ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlButtonModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlButtonModel" ) ) )
{
sal_Bool bToggle = sal_False;
- xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Toggle") ) ) >>= bToggle;
+ xProps->getPropertyValue( rtl::OUString( "Toggle" ) ) >>= bToggle;
if ( bToggle )
xVBAControl.set( new ScVbaToggleButton( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
else
xVBAControl.set( new ScVbaButton( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
}
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlComboBoxModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlComboBoxModel" ) ) )
xVBAControl.set( new ScVbaComboBox( xVbaParent, xContext, xControl, xModel, xGeoHelper.release(), true ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlListBoxModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlListBoxModel" ) ) )
xVBAControl.set( new ScVbaListBox( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlFixedTextModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlFixedTextModel" ) ) )
xVBAControl.set( new ScVbaLabel( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlImageControlModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlImageControlModel" ) ) )
xVBAControl.set( new ScVbaImage( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlProgressBarModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlProgressBarModel" ) ) )
xVBAControl.set( new ScVbaProgressBar( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlGroupBoxModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlGroupBoxModel" ) ) )
xVBAControl.set( new ScVbaFrame( xVbaParent, xContext, xControl, xModel, xGeoHelper.release(), xDialog ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlScrollBarModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlScrollBarModel" ) ) )
xVBAControl.set( new ScVbaScrollBar( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoMultiPageModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoMultiPageModel" ) ) )
xVBAControl.set( new ScVbaMultiPage( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlSpinButtonModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlSpinButtonModel" ) ) )
xVBAControl.set( new ScVbaSpinButton( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.custom.awt.UnoControlSystemAXContainerModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.custom.awt.UnoControlSystemAXContainerModel" ) ) )
xVBAControl.set( new VbaSystemAXControl( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
// #FIXME implement a page control
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoPageModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoPageModel" ) ) )
xVBAControl.set( new ScVbaControl( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoFrameModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoFrameModel" ) ) )
xVBAControl.set( new ScVbaFrame( xVbaParent, xContext, xControl, xModel, xGeoHelper.release(), xDialog ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlSpinButtonModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.awt.UnoControlSpinButtonModel" ) ) )
xVBAControl.set( new ScVbaSpinButton( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
- else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.custom.awt.UnoControlSystemAXContainerModel") ) ) )
+ else if ( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.custom.awt.UnoControlSystemAXContainerModel" ) ) )
xVBAControl.set( new VbaSystemAXControl( xVbaParent, xContext, xControl, xModel, xGeoHelper.release() ) );
if( xVBAControl.is() )
return xVBAControl;
- throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unsupported control.")), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString("Unsupported control."), uno::Reference< uno::XInterface >() );
}
rtl::OUString
ScVbaControl::getServiceImplName()
{
- return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScVbaControl"));
+ return rtl::OUString("ScVbaControl");
}
uno::Sequence< rtl::OUString >
@@ -694,7 +694,7 @@ ScVbaControl::getServiceNames()
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.Control" ) );
+ aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.excel.Control" );
}
return aServiceNames;
}
@@ -704,7 +704,7 @@ sal_Int32 nSysCols[] = { 0xC8D0D4, 0x0, 0x6A240A, 0x808080, 0xE4E4E4, 0xFFFFFF,
sal_Int32 ScVbaControl::getBackColor() throw (uno::RuntimeException)
{
sal_Int32 nBackColor = 0;
- m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ) ) >>= nBackColor;
+ m_xProps->getPropertyValue( rtl::OUString( "BackgroundColor" ) ) >>= nBackColor;
return nBackColor;
}
@@ -714,7 +714,7 @@ void ScVbaControl::setBackColor( sal_Int32 nBackColor ) throw (uno::RuntimeExcep
{
nBackColor = nSysCols[ nBackColor - 0x80000000 ];
}
- m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BackgroundColor") ), uno::makeAny( XLRGBToOORGB( nBackColor ) ) );
+ m_xProps->setPropertyValue( rtl::OUString( "BackgroundColor" ), uno::makeAny( XLRGBToOORGB( nBackColor ) ) );
}
sal_Bool ScVbaControl::getAutoSize() throw (uno::RuntimeException)
@@ -730,13 +730,13 @@ void ScVbaControl::setAutoSize( sal_Bool /*bAutoSize*/ ) throw (uno::RuntimeExce
sal_Bool ScVbaControl::getLocked() throw (uno::RuntimeException)
{
sal_Bool bRes( sal_False );
- m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ) ) >>= bRes;
+ m_xProps->getPropertyValue( rtl::OUString( "ReadOnly" ) ) >>= bRes;
return bRes;
}
void ScVbaControl::setLocked( sal_Bool bLocked ) throw (uno::RuntimeException)
{
- m_xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ), uno::makeAny( bLocked ) );
+ m_xProps->setPropertyValue( rtl::OUString( "ReadOnly" ), uno::makeAny( bLocked ) );
}
typedef cppu::WeakImplHelper1< XControlProvider > ControlProvider_BASE;