diff options
author | Kevin Hunter <hunteke@earlham.edu> | 2010-11-08 06:05:04 -0500 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-11-09 21:08:15 +0000 |
commit | 91805e713e2d39080f8112f943c4461ce327c866 (patch) | |
tree | 702e586f395dbf11078a8a744d3e7f28a39485f8 /chart2/workbench | |
parent | 4fa05ecc089a027f243e87f76cc9bcd1f70447e4 (diff) |
EasyHack: createFromAscii to RTL macro
Diffstat (limited to 'chart2/workbench')
-rw-r--r-- | chart2/workbench/addin/sampleaddin.cxx | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/chart2/workbench/addin/sampleaddin.cxx b/chart2/workbench/addin/sampleaddin.cxx index 7b5b672d1be6..b039490b6793 100644 --- a/chart2/workbench/addin/sampleaddin.cxx +++ b/chart2/workbench/addin/sampleaddin.cxx @@ -56,9 +56,9 @@ sal_Bool SAL_CALL component_writeInfo( { try { - OUString aImpl = OUString::createFromAscii( "/" ); + OUString aImpl( RTL_CONSTASCII_USTRINGPARAM( "/" )); aImpl += SampleAddIn::getImplementationName_Static(); - aImpl += OUString::createFromAscii( "/UNO/SERVICES" ); + aImpl += OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" )); uno::Reference< registry::XRegistryKey> xNewKey( reinterpret_cast<registry::XRegistryKey*>( pRegistryKey )->createKey( aImpl ) ); @@ -137,9 +137,9 @@ sal_Bool SampleAddIn::getLogicalPosition( uno::Reference< drawing::XShape >& xAx try { double fMin(0.0), fMax(0.0); - uno::Any aAny = xProp->getPropertyValue( OUString::createFromAscii( "Min" )); + uno::Any aAny = xProp->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Min" ))); aAny >>= fMin; - aAny = xProp->getPropertyValue( OUString::createFromAscii( "Max" )); + aAny = xProp->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Max" ))); aAny >>= fMax; double fRange = fMax - fMin; @@ -174,17 +174,17 @@ sal_Bool SampleAddIn::getLogicalPosition( uno::Reference< drawing::XShape >& xAx OUString SampleAddIn::getImplementationName_Static() { - return OUString::createFromAscii( "SampleAddIn" ); + return OUString( RTL_CONSTASCII_USTRINGPARAM( "SampleAddIn" )); } uno::Sequence< ::rtl::OUString > SampleAddIn::getSupportedServiceNames_Static() { uno::Sequence< OUString > aSeq( 4 ); - aSeq[ 0 ] = OUString::createFromAscii( "com.sun.star.chart.ChartAxisXSupplier" ); - aSeq[ 1 ] = OUString::createFromAscii( "com.sun.star.chart.ChartAxisYSupplier" ); - aSeq[ 2 ] = OUString::createFromAscii( "com.sun.star.chart.Diagram" ); - aSeq[ 3 ] = OUString::createFromAscii( "com.sun.star.chart.SampleAddIn" ); + aSeq[ 0 ] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.ChartAxisXSupplier" )); + aSeq[ 1 ] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.ChartAxisYSupplier" )); + aSeq[ 2 ] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.Diagram" )); + aSeq[ 3 ] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.SampleAddIn" )); return aSeq; } @@ -219,7 +219,7 @@ void SAL_CALL SampleAddIn::initialize( const uno::Sequence< uno::Any >& aArgumen aBaseType <<= rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.XYDiagram" )); try { - xDocProp->setPropertyValue( rtl::OUString::createFromAscii( "BaseDiagram" ), aBaseType ); + xDocProp->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BaseDiagram" )), aBaseType ); } catch( ... ) {} @@ -236,8 +236,8 @@ void SAL_CALL SampleAddIn::initialize( const uno::Sequence< uno::Any >& aArgumen { uno::Any aAny; aAny <<= (sal_Int32)( 0xe0e0f0 ); - xDiaProp->setPropertyValue( OUString::createFromAscii( "FillColor" ), aAny ); - xLegendProp->setPropertyValue( OUString::createFromAscii( "FillColor" ), aAny ); + xDiaProp->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "FillColor" )), aAny ); + xLegendProp->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "FillColor" )), aAny ); } } } @@ -285,7 +285,7 @@ void SAL_CALL SampleAddIn::refresh() throw( uno::RuntimeException ) if( ! mxMyRedLine.is()) { mxMyRedLine = uno::Reference< drawing::XShape >( - xFactory->createInstance( OUString::createFromAscii( "com.sun.star.drawing.LineShape" )), + xFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.LineShape" ))), uno::UNO_QUERY ); xPage->add( mxMyRedLine ); @@ -298,8 +298,8 @@ void SAL_CALL SampleAddIn::refresh() throw( uno::RuntimeException ) aWidth <<= (sal_Int32)(50); // 0.5 mm try { - xShapeProp->setPropertyValue( OUString::createFromAscii( "LineColor" ), aColor ); - xShapeProp->setPropertyValue( OUString::createFromAscii( "LineWidth" ), aWidth ); + xShapeProp->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "LineColor" )), aColor ); + xShapeProp->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "LineWidth" )), aWidth ); } catch( ... ) {} @@ -309,16 +309,16 @@ void SAL_CALL SampleAddIn::refresh() throw( uno::RuntimeException ) if( ! mxMyText.is()) { mxMyText = uno::Reference< drawing::XShape >( - xFactory->createInstance( OUString::createFromAscii( "com.sun.star.drawing.TextShape" )), + xFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.TextShape" ))), uno::UNO_QUERY ); xPage->add( mxMyText ); // change text OUString aText; -// if( maLocale.Language.equalsIgnoreCase( OUString::createFromAscii("DE"))) -// aText = OUString::createFromAscii( "Kleines Beispiel" ); +// if( maLocale.Language.equalsIgnoreCase( OUString( RTL_CONSTASCII_USTRINGPARAM( "DE" )))) +// aText = OUString( RTL_CONSTASCII_USTRINGPARAM( "Kleines Beispiel" )); // else - aText = OUString::createFromAscii( "Little Example" ); + aText = OUString( RTL_CONSTASCII_USTRINGPARAM( "Little Example" )); uno::Reference< beans::XPropertySet > xTextProp( mxMyText, uno::UNO_QUERY ); if( xTextProp.is()) @@ -327,7 +327,7 @@ void SAL_CALL SampleAddIn::refresh() throw( uno::RuntimeException ) aTrueAny <<= (sal_Bool)(sal_True); try { - xTextProp->setPropertyValue( rtl::OUString::createFromAscii( "TextAutoGrowWidth" ), aTrueAny ); + xTextProp->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextAutoGrowWidth" )), aTrueAny ); } catch( ... ) {} @@ -379,7 +379,7 @@ void SAL_CALL SampleAddIn::refresh() throw( uno::RuntimeException ) { uno::Any aAny; aAny <<= aPtSeq; - xShapeProp->setPropertyValue( rtl::OUString::createFromAscii( "PolyPolygon" ), aAny ); + xShapeProp->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PolyPolygon" )), aAny ); } } if( mxMyText.is()) @@ -400,10 +400,10 @@ void SAL_CALL SampleAddIn::refresh() throw( uno::RuntimeException ) // { // uno::Any aAny; // aAny <<= (sal_Bool)(sal_False); -// xXAxis->setPropertyValue( rtl::OUString::createFromAscii( "AutoStepMain" ), +// xXAxis->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AutoStepMain" )), // aAny ); // aAny <<= (double)(200.0); -// xXAxis->setPropertyValue( rtl::OUString::createFromAscii( "StepMain" ), +// xXAxis->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StepMain" )), // aAny ); // } @@ -413,9 +413,9 @@ void SAL_CALL SampleAddIn::refresh() throw( uno::RuntimeException ) // { // uno::Any aAny; // aAny <<= (sal_Int32)(-1); -// xProp->setPropertyValue( OUString::createFromAscii( "SymbolType" ), aAny ); -// aAny <<= rtl::OUString::createFromAscii( "http://mib-1168/www/images/go.gif" ); -// xProp->setPropertyValue( OUString::createFromAscii( "SymbolBitmapURL" ), aAny ); +// xProp->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "SymbolType" )), aAny ); +// aAny <<= rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "http://mib-1168/www/images/go.gif" )); +// xProp->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "SymbolBitmapURL" )), aAny ); // } } @@ -436,7 +436,7 @@ void SAL_CALL SampleAddIn::removeRefreshListener( const uno::Reference< util::XR // XDiagram OUString SAL_CALL SampleAddIn::getDiagramType() throw( uno::RuntimeException ) { - return OUString::createFromAscii( "com.sun.star.chart.SampleDiagram" ); + return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.SampleDiagram" )); } // the following methods just delegate to the "parent diagram" (which in the future might no longer exist) @@ -521,7 +521,7 @@ void SAL_CALL SampleAddIn::setPosition( const awt::Point& aPos ) // XShapeDescriptor ( ::XShape ::XDiagram ) rtl::OUString SAL_CALL SampleAddIn::getShapeType() throw( com::sun::star::uno::RuntimeException ) { - return OUString::createFromAscii( "com.sun.star.chart.SampleAddinShape" ); + return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.SampleAddinShape" )); } // XAxisXSupplier @@ -673,7 +673,7 @@ uno::Reference< beans::XPropertySet > SAL_CALL SampleAddIn::getMinMaxLine() // XServiceName OUString SAL_CALL SampleAddIn::getServiceName() throw( uno::RuntimeException ) { - return OUString::createFromAscii( "com.sun.star.chart.SampleAddIn" ); + return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart.SampleAddIn" )); } // XServiceInfo |