Kaydet (Commit) 43afea36 authored tarafından Caolán McNamara's avatar Caolán McNamara

micro opts and fix indentation

üst 817463a2
...@@ -156,18 +156,18 @@ void SFURL_firing_impl( const ScriptEvent& aScriptEvent, Any* pRet, const Refere ...@@ -156,18 +156,18 @@ void SFURL_firing_impl( const ScriptEvent& aScriptEvent, Any* pRet, const Refere
Reference< XComponentContext > xContext; Reference< XComponentContext > xContext;
Reference< XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), UNO_QUERY ); Reference< XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), UNO_QUERY );
OSL_ASSERT( xProps.is() ); OSL_ASSERT( xProps.is() );
OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString::createFromAscii( "DefaultContext" ) ) >>= xContext ); OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext );
if ( xContext.is() ) if ( xContext.is() )
{ {
Reference< provider::XScriptProviderFactory > xFactory( Reference< provider::XScriptProviderFactory > xFactory(
xContext->getValueByName( xContext->getValueByName(
::rtl::OUString::createFromAscii( "/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory" ) ), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.script.provider.theMasterScriptProviderFactory")) ),
UNO_QUERY ); UNO_QUERY );
OSL_ENSURE( xFactory.is(), "SFURL_firing_impl: failed to get master script provider factory" ); OSL_ENSURE( xFactory.is(), "SFURL_firing_impl: failed to get master script provider factory" );
if ( xFactory.is() ) if ( xFactory.is() )
{ {
Any aCtx; Any aCtx;
aCtx <<= ::rtl::OUString::createFromAscii( "user" ); aCtx <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user"));
xScriptProvider.set( xFactory->createScriptProvider( aCtx ), UNO_QUERY ); xScriptProvider.set( xFactory->createScriptProvider( aCtx ), UNO_QUERY );
} }
} }
...@@ -486,15 +486,8 @@ Any implFindDialogLibForDialogBasic( const Any& aAnyISP, SbxObject* pBasic, Star ...@@ -486,15 +486,8 @@ Any implFindDialogLibForDialogBasic( const Any& aAnyISP, SbxObject* pBasic, Star
return aDlgLibAny; return aDlgLibAny;
} }
static ::rtl::OUString aDecorationPropName =
::rtl::OUString::createFromAscii( "Decoration" );
static ::rtl::OUString aTitlePropName =
::rtl::OUString::createFromAscii( "Title" );
void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
{ {
static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAscii( "ResourceResolver" );
(void)pBasic; (void)pBasic;
(void)bWrite; (void)bWrite;
...@@ -553,11 +546,14 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) ...@@ -553,11 +546,14 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
bool bDecoration = true; bool bDecoration = true;
try try
{ {
::rtl::OUString aDecorationPropName(RTL_CONSTASCII_USTRINGPARAM("Decoration"));
Any aDecorationAny = xDlgModPropSet->getPropertyValue( aDecorationPropName ); Any aDecorationAny = xDlgModPropSet->getPropertyValue( aDecorationPropName );
aDecorationAny >>= bDecoration; aDecorationAny >>= bDecoration;
if( !bDecoration ) if( !bDecoration )
{ {
xDlgModPropSet->setPropertyValue( aDecorationPropName, makeAny( true ) ); xDlgModPropSet->setPropertyValue( aDecorationPropName, makeAny( true ) );
::rtl::OUString aTitlePropName(RTL_CONSTASCII_USTRINGPARAM("Title"));
xDlgModPropSet->setPropertyValue( aTitlePropName, makeAny( ::rtl::OUString() ) ); xDlgModPropSet->setPropertyValue( aTitlePropName, makeAny( ::rtl::OUString() ) );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment