[Libreoffice-commits] .: UnoControls/source

Gert Faller gfaller at kemper.freedesktop.org
Mon Nov 29 13:47:23 PST 2010


 UnoControls/source/base/basecontrol.cxx         |    2 -
 UnoControls/source/controls/framecontrol.cxx    |   10 ++---
 UnoControls/source/controls/progressbar.cxx     |    4 +-
 UnoControls/source/controls/progressmonitor.cxx |   48 ++++++++++++------------
 UnoControls/source/controls/statusindicator.cxx |   16 ++++----
 5 files changed, 40 insertions(+), 40 deletions(-)

New commits:
commit 395cfb4a43c527323a707cb2565377db1a851aab
Author: Gert Faller <gertfaller at aliceadsl.fr>
Date:   Mon Nov 29 22:46:41 2010 +0100

    RTL_CONSTASCII_USTRINGPARAM in components 5

diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx
index d168e33..90e0e60 100644
--- a/UnoControls/source/base/basecontrol.cxx
+++ b/UnoControls/source/base/basecontrol.cxx
@@ -368,7 +368,7 @@ void SAL_CALL BaseControl::createPeer(	const	Reference< XToolkit >&		xToolkit	,
         if ( xLocalToolkit.is() == sal_False )
         {
             // but first create wellknown toolkit, if it not exist
-            xLocalToolkit = Reference< XToolkit > ( m_xFactory->createInstance( OUString::createFromAscii( SERVICE_VCLTOOLKIT ) ), UNO_QUERY );
+            xLocalToolkit = Reference< XToolkit > ( m_xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( SERVICE_VCLTOOLKIT )) ), UNO_QUERY );
         }
         m_xPeer			= xLocalToolkit->createWindow( *pDescriptor );
         m_xPeerWindow	= Reference< XWindow >( m_xPeer, UNO_QUERY );
diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx
index 65e4512..e016e1c 100644
--- a/UnoControls/source/controls/framecontrol.cxx
+++ b/UnoControls/source/controls/framecontrol.cxx
@@ -311,7 +311,7 @@ const Sequence< OUString > FrameControl::impl_getStaticSupportedServiceNames()
 {
     MutexGuard aGuard( Mutex::getGlobalMutex() );
     Sequence< OUString > seqServiceNames( 1 );
-    seqServiceNames.getArray() [0] = OUString::createFromAscii( SERVICENAME_FRAMECONTROL );
+    seqServiceNames.getArray() [0] = OUString(RTL_CONSTASCII_USTRINGPARAM( SERVICENAME_FRAMECONTROL ));
     return seqServiceNames ;
 }
 
@@ -321,7 +321,7 @@ const Sequence< OUString > FrameControl::impl_getStaticSupportedServiceNames()
 
 const OUString FrameControl::impl_getStaticImplementationName()
 {
-    return OUString::createFromAscii( IMPLEMENTATIONNAME_FRAMECONTROL );
+    return OUString(RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATIONNAME_FRAMECONTROL ));
 }
 
 //____________________________________________________________________________________________________________
@@ -592,9 +592,9 @@ const Sequence< Property > FrameControl::impl_getStaticPropertyDescriptor()
     // All Properties of this implementation. The array must be sorted!
     static const Property pPropertys[PROPERTY_COUNT] =
     {
-        Property( OUString::createFromAscii( PROPERTYNAME_COMPONENTURL		), PROPERTYHANDLE_COMPONENTURL		, ::getCppuType((const OUString*)0)					, PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED	),
-        Property( OUString::createFromAscii( PROPERTYNAME_FRAME				), PROPERTYHANDLE_FRAME				, ::getCppuType((const Reference< XFrame >*)0)		, PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT	),
-        Property( OUString::createFromAscii( PROPERTYNAME_LOADERARGUMENTS	), PROPERTYHANDLE_LOADERARGUMENTS	, ::getCppuType((const Sequence< PropertyValue >*)0), PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED	)
+        Property( OUString(RTL_CONSTASCII_USTRINGPARAM( PROPERTYNAME_COMPONENTURL		)), PROPERTYHANDLE_COMPONENTURL		, ::getCppuType((const OUString*)0)					, PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED	),
+        Property( OUString(RTL_CONSTASCII_USTRINGPARAM( PROPERTYNAME_FRAME				)), PROPERTYHANDLE_FRAME				, ::getCppuType((const Reference< XFrame >*)0)		, PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT	),
+        Property( OUString(RTL_CONSTASCII_USTRINGPARAM( PROPERTYNAME_LOADERARGUMENTS	)), PROPERTYHANDLE_LOADERARGUMENTS	, ::getCppuType((const Sequence< PropertyValue >*)0), PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED	)
     };
 
     static const Sequence< Property > seqPropertys( pPropertys, PROPERTY_COUNT );
diff --git a/UnoControls/source/controls/progressbar.cxx b/UnoControls/source/controls/progressbar.cxx
index 2ca79b4..fe20436 100644
--- a/UnoControls/source/controls/progressbar.cxx
+++ b/UnoControls/source/controls/progressbar.cxx
@@ -364,7 +364,7 @@ const Sequence< OUString > ProgressBar::impl_getStaticSupportedServiceNames()
 {
     MutexGuard aGuard( Mutex::getGlobalMutex() );
     Sequence< OUString > seqServiceNames( 1 );
-    seqServiceNames.getArray() [0] = OUString::createFromAscii( SERVICENAME_PROGRESSBAR );
+    seqServiceNames.getArray() [0] = OUString(RTL_CONSTASCII_USTRINGPARAM( SERVICENAME_PROGRESSBAR ));
     return seqServiceNames ;
 }
 
@@ -374,7 +374,7 @@ const Sequence< OUString > ProgressBar::impl_getStaticSupportedServiceNames()
 
 const OUString ProgressBar::impl_getStaticImplementationName()
 {
-    return OUString::createFromAscii( IMPLEMENTATIONNAME_PROGRESSBAR );
+    return OUString(RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATIONNAME_PROGRESSBAR ));
 }
 
 //____________________________________________________________________________________________________________
diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx
index 075092d..326e3e7 100644
--- a/UnoControls/source/controls/progressmonitor.cxx
+++ b/UnoControls/source/controls/progressmonitor.cxx
@@ -74,12 +74,12 @@ ProgressMonitor::ProgressMonitor( const Reference< XMultiServiceFactory >& xFact
     ++m_refCount ;
 
     // Create instances for fixedtext, button and progress ...
-    m_xTopic_Top	= Reference< XFixedText >   ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_SERVICENAME	) ), UNO_QUERY ) ;
-    m_xText_Top		= Reference< XFixedText >   ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_SERVICENAME	) ), UNO_QUERY ) ;
-    m_xTopic_Bottom	= Reference< XFixedText >   ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_SERVICENAME	) ), UNO_QUERY ) ;
-    m_xText_Bottom	= Reference< XFixedText >   ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_SERVICENAME	) ), UNO_QUERY ) ;
-    m_xButton		= Reference< XButton >      ( xFactory->createInstance ( OUString::createFromAscii( BUTTON_SERVICENAME		) ), UNO_QUERY ) ;
-    m_xProgressBar	= Reference< XProgressBar > ( xFactory->createInstance ( OUString::createFromAscii( SERVICENAME_PROGRESSBAR	) ), UNO_QUERY ) ;
+    m_xTopic_Top	= Reference< XFixedText >   ( xFactory->createInstance ( OUString(RTL_CONSTASCII_USTRINGPARAM( FIXEDTEXT_SERVICENAME	)) ), UNO_QUERY ) ;
+    m_xText_Top		= Reference< XFixedText >   ( xFactory->createInstance ( OUString(RTL_CONSTASCII_USTRINGPARAM( FIXEDTEXT_SERVICENAME	)) ), UNO_QUERY ) ;
+    m_xTopic_Bottom	= Reference< XFixedText >   ( xFactory->createInstance ( OUString(RTL_CONSTASCII_USTRINGPARAM( FIXEDTEXT_SERVICENAME	)) ), UNO_QUERY ) ;
+    m_xText_Bottom	= Reference< XFixedText >   ( xFactory->createInstance ( OUString(RTL_CONSTASCII_USTRINGPARAM( FIXEDTEXT_SERVICENAME	)) ), UNO_QUERY ) ;
+    m_xButton		= Reference< XButton >      ( xFactory->createInstance ( OUString(RTL_CONSTASCII_USTRINGPARAM( BUTTON_SERVICENAME		)) ), UNO_QUERY ) ;
+    m_xProgressBar	= Reference< XProgressBar > ( xFactory->createInstance ( OUString(RTL_CONSTASCII_USTRINGPARAM( SERVICENAME_PROGRESSBAR	)) ), UNO_QUERY ) ;
 
     // ... cast controls to Reference< XControl >  (for "setModel"!) ...
     Reference< XControl > 	xRef_Topic_Top		( m_xTopic_Top	  , UNO_QUERY ) ;
@@ -90,20 +90,20 @@ ProgressMonitor::ProgressMonitor( const Reference< XMultiServiceFactory >& xFact
     Reference< XControl > 	xRef_ProgressBar	( m_xProgressBar  , UNO_QUERY ) ;
 
     // ... set models ...
-    xRef_Topic_Top->setModel    ( Reference< XControlModel > ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_MODELNAME ) ), UNO_QUERY ) ) ;
-    xRef_Text_Top->setModel     ( Reference< XControlModel > ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_MODELNAME ) ), UNO_QUERY ) ) ;
-    xRef_Topic_Bottom->setModel ( Reference< XControlModel > ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_MODELNAME ) ), UNO_QUERY ) ) ;
-    xRef_Text_Bottom->setModel  ( Reference< XControlModel > ( xFactory->createInstance ( OUString::createFromAscii( FIXEDTEXT_MODELNAME ) ), UNO_QUERY ) ) ;
-    xRef_Button->setModel       ( Reference< XControlModel > ( xFactory->createInstance ( OUString::createFromAscii( BUTTON_MODELNAME    ) ), UNO_QUERY ) ) ;
+    xRef_Topic_Top->setModel    ( Reference< XControlModel > ( xFactory->createInstance ( OUString(RTL_CONSTASCII_USTRINGPARAM( FIXEDTEXT_MODELNAME )) ), UNO_QUERY ) ) ;
+    xRef_Text_Top->setModel     ( Reference< XControlModel > ( xFactory->createInstance ( OUString(RTL_CONSTASCII_USTRINGPARAM( FIXEDTEXT_MODELNAME )) ), UNO_QUERY ) ) ;
+    xRef_Topic_Bottom->setModel ( Reference< XControlModel > ( xFactory->createInstance ( OUString(RTL_CONSTASCII_USTRINGPARAM( FIXEDTEXT_MODELNAME )) ), UNO_QUERY ) ) ;
+    xRef_Text_Bottom->setModel  ( Reference< XControlModel > ( xFactory->createInstance ( OUString(RTL_CONSTASCII_USTRINGPARAM( FIXEDTEXT_MODELNAME )) ), UNO_QUERY ) ) ;
+    xRef_Button->setModel       ( Reference< XControlModel > ( xFactory->createInstance ( OUString(RTL_CONSTASCII_USTRINGPARAM( BUTTON_MODELNAME    )) ), UNO_QUERY ) ) ;
     // ProgressBar has no model !!!
 
     // ... and add controls to basecontainercontrol!
-    addControl ( OUString::createFromAscii( CONTROLNAME_TEXT		) , xRef_Topic_Top   	) ;
-    addControl ( OUString::createFromAscii( CONTROLNAME_TEXT		) , xRef_Text_Top	   	) ;
-    addControl ( OUString::createFromAscii( CONTROLNAME_TEXT		) , xRef_Topic_Bottom	) ;
-    addControl ( OUString::createFromAscii( CONTROLNAME_TEXT		) , xRef_Text_Bottom	) ;
-    addControl ( OUString::createFromAscii( CONTROLNAME_BUTTON		) , xRef_Button			) ;
-    addControl ( OUString::createFromAscii( CONTROLNAME_PROGRESSBAR	) , xRef_ProgressBar 	) ;
+    addControl ( OUString(RTL_CONSTASCII_USTRINGPARAM( CONTROLNAME_TEXT		)) , xRef_Topic_Top   	) ;
+    addControl ( OUString(RTL_CONSTASCII_USTRINGPARAM( CONTROLNAME_TEXT		)) , xRef_Text_Top	   	) ;
+    addControl ( OUString(RTL_CONSTASCII_USTRINGPARAM( CONTROLNAME_TEXT		)) , xRef_Topic_Bottom	) ;
+    addControl ( OUString(RTL_CONSTASCII_USTRINGPARAM( CONTROLNAME_TEXT		)) , xRef_Text_Bottom	) ;
+    addControl ( OUString(RTL_CONSTASCII_USTRINGPARAM( CONTROLNAME_BUTTON		)) , xRef_Button			) ;
+    addControl ( OUString(RTL_CONSTASCII_USTRINGPARAM( CONTROLNAME_PROGRESSBAR	)) , xRef_ProgressBar 	) ;
 
     // FixedText make it automaticly visible by himself ... but not the progressbar !!!
     // it must be set explicitly
@@ -112,11 +112,11 @@ ProgressMonitor::ProgressMonitor( const Reference< XMultiServiceFactory >& xFact
 
     // Reset to defaults !!!
     // (progressbar take automaticly its own defaults)
-    m_xButton->setLabel      ( OUString::createFromAscii( DEFAULT_BUTTONLABEL           ) ) ;
-    m_xTopic_Top->setText    ( OUString::createFromAscii( PROGRESSMONITOR_DEFAULT_TOPIC ) ) ;
-    m_xText_Top->setText     ( OUString::createFromAscii( PROGRESSMONITOR_DEFAULT_TEXT  ) ) ;
-    m_xTopic_Bottom->setText ( OUString::createFromAscii( PROGRESSMONITOR_DEFAULT_TOPIC ) ) ;
-    m_xText_Bottom->setText  ( OUString::createFromAscii( PROGRESSMONITOR_DEFAULT_TEXT  ) ) ;
+    m_xButton->setLabel      ( OUString(RTL_CONSTASCII_USTRINGPARAM( DEFAULT_BUTTONLABEL           )) ) ;
+    m_xTopic_Top->setText    ( OUString(RTL_CONSTASCII_USTRINGPARAM( PROGRESSMONITOR_DEFAULT_TOPIC )) ) ;
+    m_xText_Top->setText     ( OUString(RTL_CONSTASCII_USTRINGPARAM( PROGRESSMONITOR_DEFAULT_TEXT  )) ) ;
+    m_xTopic_Bottom->setText ( OUString(RTL_CONSTASCII_USTRINGPARAM( PROGRESSMONITOR_DEFAULT_TOPIC )) ) ;
+    m_xText_Bottom->setText  ( OUString(RTL_CONSTASCII_USTRINGPARAM( PROGRESSMONITOR_DEFAULT_TEXT  )) ) ;
 
     --m_refCount ;
 
@@ -669,7 +669,7 @@ const Sequence< OUString > ProgressMonitor::impl_getStaticSupportedServiceNames(
 {
     MutexGuard aGuard( Mutex::getGlobalMutex() );
     Sequence< OUString > seqServiceNames( 1 );
-    seqServiceNames.getArray() [0] = OUString::createFromAscii( SERVICENAME_PROGRESSMONITOR );
+    seqServiceNames.getArray() [0] = OUString(RTL_CONSTASCII_USTRINGPARAM( SERVICENAME_PROGRESSMONITOR ));
     return seqServiceNames ;
 }
 
@@ -679,7 +679,7 @@ const Sequence< OUString > ProgressMonitor::impl_getStaticSupportedServiceNames(
 
 const OUString ProgressMonitor::impl_getStaticImplementationName()
 {
-    return OUString::createFromAscii( IMPLEMENTATIONNAME_PROGRESSMONITOR );
+    return OUString(RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATIONNAME_PROGRESSMONITOR ));
 }
 
 //____________________________________________________________________________________________________________
diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx
index 9f55e2a..9d8b6e3 100644
--- a/UnoControls/source/controls/statusindicator.cxx
+++ b/UnoControls/source/controls/statusindicator.cxx
@@ -71,23 +71,23 @@ StatusIndicator::StatusIndicator( const Reference< XMultiServiceFactory >& xFact
     ++m_refCount ;
 
     // Create instances for fixedtext and progress ...
-    m_xText			= Reference< XFixedText > 	( xFactory->createInstance( OUString::createFromAscii( FIXEDTEXT_SERVICENAME	) ), UNO_QUERY );
-    m_xProgressBar	= Reference< XProgressBar >	( xFactory->createInstance( OUString::createFromAscii( SERVICENAME_PROGRESSBAR	) ), UNO_QUERY );
+    m_xText			= Reference< XFixedText > 	( xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( FIXEDTEXT_SERVICENAME	)) ), UNO_QUERY );
+    m_xProgressBar	= Reference< XProgressBar >	( xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( SERVICENAME_PROGRESSBAR	)) ), UNO_QUERY );
     // ... cast controls to Reference< XControl > and set model ...
     // ( ProgressBar has no model !!! )
     Reference< XControl > xTextControl		( m_xText		, UNO_QUERY );
     Reference< XControl > xProgressControl	( m_xProgressBar, UNO_QUERY );
-    xTextControl->setModel( Reference< XControlModel >( xFactory->createInstance( OUString::createFromAscii( FIXEDTEXT_MODELNAME ) ), UNO_QUERY ) );
+    xTextControl->setModel( Reference< XControlModel >( xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( FIXEDTEXT_MODELNAME )) ), UNO_QUERY ) );
     // ... and add controls to basecontainercontrol!
-    addControl( OUString::createFromAscii( CONTROLNAME_TEXT			), xTextControl   	);
-    addControl( OUString::createFromAscii( CONTROLNAME_PROGRESSBAR	), xProgressControl	);
+    addControl( OUString(RTL_CONSTASCII_USTRINGPARAM( CONTROLNAME_TEXT			)), xTextControl   	);
+    addControl( OUString(RTL_CONSTASCII_USTRINGPARAM( CONTROLNAME_PROGRESSBAR	)), xProgressControl	);
     // FixedText make it automaticly visible by himself ... but not the progressbar !!!
     // it must be set explicitly
     Reference< XWindow > xProgressWindow( m_xProgressBar, UNO_QUERY );
     xProgressWindow->setVisible( sal_True );
     // Reset to defaults !!!
     // (progressbar take automaticly its own defaults)
-    m_xText->setText( OUString::createFromAscii( STATUSINDICATOR_DEFAULT_TEXT ) );
+    m_xText->setText( OUString(RTL_CONSTASCII_USTRINGPARAM( STATUSINDICATOR_DEFAULT_TEXT )) );
 
     --m_refCount ;
 }
@@ -433,7 +433,7 @@ const Sequence< OUString > StatusIndicator::impl_getStaticSupportedServiceNames(
 {
     MutexGuard aGuard( Mutex::getGlobalMutex() );
     Sequence< OUString > seqServiceNames( 1 );
-    seqServiceNames.getArray() [0] = OUString::createFromAscii( SERVICENAME_STATUSINDICATOR );
+    seqServiceNames.getArray() [0] = OUString(RTL_CONSTASCII_USTRINGPARAM( SERVICENAME_STATUSINDICATOR ));
     return seqServiceNames ;
 }
 
@@ -443,7 +443,7 @@ const Sequence< OUString > StatusIndicator::impl_getStaticSupportedServiceNames(
 
 const OUString StatusIndicator::impl_getStaticImplementationName()
 {
-    return OUString::createFromAscii( IMPLEMENTATIONNAME_STATUSINDICATOR );
+    return OUString(RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATIONNAME_STATUSINDICATOR ));
 }
 
 //____________________________________________________________________________________________________________


More information about the Libreoffice-commits mailing list