summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2012-09-06 18:58:56 -0300
committerLuboš Luňák <l.lunak@suse.cz>2012-09-07 13:36:04 +0000
commit419d074df87d24d4612a9e5ef5f70cb9dcefef93 (patch)
treeeee4a94a05c1c1b4f60065fa52c3a21190294ecc /vbahelper
parent0cb1b9685877f6aeaddf1088ae5008e38bade6f9 (diff)
More OUString cleanup in vbahelper
Change-Id: Ie7e350698900f1c1cacb6ebc3fa6716ef03ab782 Reviewed-on: https://gerrit.libreoffice.org/575 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbaglobalbase.cxx22
-rw-r--r--vbahelper/source/vbahelper/vbapagesetupbase.cxx56
2 files changed, 39 insertions, 39 deletions
diff --git a/vbahelper/source/vbahelper/vbaglobalbase.cxx b/vbahelper/source/vbahelper/vbaglobalbase.cxx
index 9b38f522d519..62091b6246b8 100644
--- a/vbahelper/source/vbahelper/vbaglobalbase.cxx
+++ b/vbahelper/source/vbahelper/vbaglobalbase.cxx
@@ -33,7 +33,7 @@ const char sAppService[] = "ooo.vba.Application";
VbaGlobalsBase::VbaGlobalsBase(
const uno::Reference< ov::XHelperInterface >& xParent,
-const uno::Reference< uno::XComponentContext >& xContext, const rtl::OUString& sDocCtxName )
+const uno::Reference< uno::XComponentContext >& xContext, const OUString& sDocCtxName )
: Globals_BASE( xParent, xContext )
, msDocCtxName( sDocCtxName )
, msApplication( RTL_CONSTASCII_USTRINGPARAM("Application") )
@@ -43,14 +43,14 @@ const uno::Reference< uno::XComponentContext >& xContext, const rtl::OUString& s
uno::Reference< uno::XInterface > aSrvMgr;
if ( xContext.is() && xContext->getServiceManager().is() )
{
- aSrvMgr = xContext->getServiceManager()->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.stoc.OServiceManagerWrapper") ), xContext );
+ aSrvMgr = xContext->getServiceManager()->createInstanceWithContext( "com.sun.star.comp.stoc.OServiceManagerWrapper" , xContext );
}
::cppu::ContextEntry_Init aHandlerContextInfo[] =
{
::cppu::ContextEntry_Init( msApplication, uno::Any() ),
::cppu::ContextEntry_Init( sDocCtxName, uno::Any() ),
- ::cppu::ContextEntry_Init( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.lang.theServiceManager" ) ), uno::makeAny( aSrvMgr ) )
+ ::cppu::ContextEntry_Init( "/singletons/com.sun.star.lang.theServiceManager" , uno::makeAny( aSrvMgr ) )
};
// don't pass a delegate, this seems to introduce yet another cyclic dependency ( and
// some strange behavior
@@ -117,7 +117,7 @@ VbaGlobalsBase::init( const uno::Sequence< beans::PropertyValue >& aInitArgs )
}
uno::Reference< uno::XInterface > SAL_CALL
-VbaGlobalsBase::createInstance( const ::rtl::OUString& aServiceSpecifier ) throw (uno::Exception, uno::RuntimeException)
+VbaGlobalsBase::createInstance( const OUString& aServiceSpecifier ) throw (uno::Exception, uno::RuntimeException)
{
uno::Reference< uno::XInterface > xReturn;
if ( aServiceSpecifier == sAppService )
@@ -132,7 +132,7 @@ VbaGlobalsBase::createInstance( const ::rtl::OUString& aServiceSpecifier ) throw
}
uno::Reference< uno::XInterface > SAL_CALL
-VbaGlobalsBase::createInstanceWithArguments( const ::rtl::OUString& aServiceSpecifier, const uno::Sequence< uno::Any >& Arguments ) throw (uno::Exception, uno::RuntimeException)
+VbaGlobalsBase::createInstanceWithArguments( const OUString& aServiceSpecifier, const uno::Sequence< uno::Any >& Arguments ) throw (uno::Exception, uno::RuntimeException)
{
uno::Reference< uno::XInterface > xReturn;
@@ -147,21 +147,21 @@ VbaGlobalsBase::createInstanceWithArguments( const ::rtl::OUString& aServiceSpec
return xReturn;
}
-uno::Sequence< ::rtl::OUString > SAL_CALL
+uno::Sequence< OUString > SAL_CALL
VbaGlobalsBase::getAvailableServiceNames( ) throw (uno::RuntimeException)
{
- static const rtl::OUString names[] = {
+ static const OUString names[] = {
// common
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "ooo.vba.msforms.UserForm" ) ),
+ "ooo.vba.msforms.UserForm" ,
};
- static uno::Sequence< rtl::OUString > serviceNames( names, sizeof( names )/ sizeof( names[0] ) );
+ static uno::Sequence< OUString > serviceNames( names, sizeof( names )/ sizeof( names[0] ) );
return serviceNames;
}
bool
-VbaGlobalsBase::hasServiceName( const rtl::OUString& serviceName )
+VbaGlobalsBase::hasServiceName( const OUString& serviceName )
{
- uno::Sequence< rtl::OUString > sServiceNames( getAvailableServiceNames() );
+ uno::Sequence< OUString > sServiceNames( getAvailableServiceNames() );
sal_Int32 nLen = sServiceNames.getLength();
for ( sal_Int32 index = 0; index < nLen; ++index )
{
diff --git a/vbahelper/source/vbahelper/vbapagesetupbase.cxx b/vbahelper/source/vbahelper/vbapagesetupbase.cxx
index 885abedbc277..a47f59111b5b 100644
--- a/vbahelper/source/vbahelper/vbapagesetupbase.cxx
+++ b/vbahelper/source/vbahelper/vbapagesetupbase.cxx
@@ -34,15 +34,15 @@ double SAL_CALL VbaPageSetupBase::getTopMargin() throw (css::uno::RuntimeExcepti
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")));
+ uno::Any aValue = mxPageProps->getPropertyValue( "HeaderIsOn" );
aValue >>= headerOn;
- aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")));
+ aValue = mxPageProps->getPropertyValue( "TopMargin" );
aValue >>= topMargin;
if( headerOn )
{
- aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight")));
+ aValue = mxPageProps->getPropertyValue( "HeaderHeight" );
aValue >>= headerHeight;
topMargin = topMargin + headerHeight;
}
@@ -62,18 +62,18 @@ void SAL_CALL VbaPageSetupBase::setTopMargin( double margin ) throw (css::uno::R
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")));
+ uno::Any aValue = mxPageProps->getPropertyValue( "HeaderIsOn" );
aValue >>= headerOn;
if( headerOn )
{
- aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight")));
+ aValue = mxPageProps->getPropertyValue( "HeaderHeight" );
aValue >>= headerHeight;
topMargin -= headerHeight;
}
aValue <<= topMargin;
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")), aValue );
+ mxPageProps->setPropertyValue( "TopMargin" , aValue );
}
catch( uno::Exception& )
{
@@ -88,15 +88,15 @@ double SAL_CALL VbaPageSetupBase::getBottomMargin() throw (css::uno::RuntimeExce
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")));
+ uno::Any aValue = mxPageProps->getPropertyValue( "FooterIsOn" );
aValue >>= footerOn;
- aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")));
+ aValue = mxPageProps->getPropertyValue( "BottomMargin" );
aValue >>= bottomMargin;
if( footerOn )
{
- aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight")));
+ aValue = mxPageProps->getPropertyValue( "FooterHeight" );
aValue >>= footerHeight;
bottomMargin += footerHeight;
}
@@ -116,18 +116,18 @@ void SAL_CALL VbaPageSetupBase::setBottomMargin( double margin ) throw (css::uno
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")));
+ uno::Any aValue = mxPageProps->getPropertyValue( "FooterIsOn" );
aValue >>= footerOn;
if( footerOn )
{
- aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight")));
+ aValue = mxPageProps->getPropertyValue( "FooterHeight" );
aValue >>= footerHeight;
bottomMargin -= footerHeight;
}
aValue <<= bottomMargin;
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")), aValue );
+ mxPageProps->setPropertyValue( "BottomMargin" , aValue );
}
catch( uno::Exception& )
{
@@ -139,7 +139,7 @@ double SAL_CALL VbaPageSetupBase::getRightMargin() throw (css::uno::RuntimeExcep
sal_Int32 rightMargin = 0;
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin")));
+ uno::Any aValue = mxPageProps->getPropertyValue( "RightMargin" );
aValue >>= rightMargin;
}
catch( uno::Exception& )
@@ -156,7 +156,7 @@ void SAL_CALL VbaPageSetupBase::setRightMargin( double margin ) throw (css::uno:
{
uno::Any aValue;
aValue <<= rightMargin;
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin")), aValue );
+ mxPageProps->setPropertyValue( "RightMargin" , aValue );
}
catch( uno::Exception& )
{
@@ -169,7 +169,7 @@ double SAL_CALL VbaPageSetupBase::getLeftMargin() throw (css::uno::RuntimeExcept
sal_Int32 leftMargin = 0;
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin")));
+ uno::Any aValue = mxPageProps->getPropertyValue( "LeftMargin" );
aValue >>= leftMargin;
}
catch( uno::Exception& )
@@ -186,7 +186,7 @@ void SAL_CALL VbaPageSetupBase::setLeftMargin( double margin ) throw (css::uno::
{
uno::Any aValue;
aValue <<= leftMargin;
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin")), aValue );
+ mxPageProps->setPropertyValue( "LeftMargin" , aValue );
}
catch( uno::Exception& )
{
@@ -198,7 +198,7 @@ double SAL_CALL VbaPageSetupBase::getHeaderMargin() throw (css::uno::RuntimeExce
sal_Int32 headerMargin = 0;
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")));
+ uno::Any aValue = mxPageProps->getPropertyValue( "TopMargin" );
aValue >>= headerMargin;
}
catch( uno::Exception& )
@@ -215,7 +215,7 @@ void SAL_CALL VbaPageSetupBase::setHeaderMargin( double margin ) throw (css::uno
{
uno::Any aValue;
aValue <<= headerMargin;
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")), aValue );
+ mxPageProps->setPropertyValue( "TopMargin" , aValue );
}
catch( uno::Exception& )
{
@@ -227,7 +227,7 @@ double SAL_CALL VbaPageSetupBase::getFooterMargin() throw (css::uno::RuntimeExce
sal_Int32 footerMargin = 0;
try
{
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")));
+ uno::Any aValue = mxPageProps->getPropertyValue( "BottomMargin" );
aValue >>= footerMargin;
}
catch( uno::Exception& )
@@ -244,7 +244,7 @@ void SAL_CALL VbaPageSetupBase::setFooterMargin( double margin ) throw (css::uno
{
uno::Any aValue;
aValue <<= footerMargin;
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")), aValue );
+ mxPageProps->setPropertyValue( "BottomMargin" , aValue );
}
catch( uno::Exception& )
{
@@ -257,7 +257,7 @@ sal_Int32 SAL_CALL VbaPageSetupBase::getOrientation() throw (css::uno::RuntimeEx
try
{
sal_Bool isLandscape = sal_False;
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsLandscape")));
+ uno::Any aValue = mxPageProps->getPropertyValue( "IsLandscape" );
aValue >>= isLandscape;
if( isLandscape )
@@ -276,13 +276,13 @@ void SAL_CALL VbaPageSetupBase::setOrientation( sal_Int32 orientation ) throw (c
if( ( orientation != mnOrientPortrait ) &&
( orientation != mnOrientLandscape ) )
{
- DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
+ DebugHelper::exception(SbERR_BAD_PARAMETER, OUString() );
}
try
{
sal_Bool isLandscape = sal_False;
- uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsLandscape")));
+ uno::Any aValue = mxPageProps->getPropertyValue( "IsLandscape" );
aValue >>= isLandscape;
sal_Bool switchOrientation = sal_False;
@@ -295,11 +295,11 @@ void SAL_CALL VbaPageSetupBase::setOrientation( sal_Int32 orientation ) throw (c
if( switchOrientation )
{
aValue <<= !isLandscape;
- uno::Any aHeight = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Height")));
- uno::Any aWidth = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width")));
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("IsLandscape")), aValue );
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width")), aHeight );
- mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Height")), aWidth );
+ uno::Any aHeight = mxPageProps->getPropertyValue( "Height" );
+ uno::Any aWidth = mxPageProps->getPropertyValue( "Width" );
+ mxPageProps->setPropertyValue( "IsLandscape" , aValue );
+ mxPageProps->setPropertyValue( "Width" , aHeight );
+ mxPageProps->setPropertyValue( "Height" , aWidth );
}
}
catch( uno::Exception& )