Kaydet (Commit) d966688f authored tarafından Andreas Bregas's avatar Andreas Bregas

#99891# RTL function GetDefaultContext()

üst 6e11cad3
......@@ -2,9 +2,9 @@
*
* $RCSfile: sbunoobj.cxx,v $
*
* $Revision: 1.20 $
* $Revision: 1.21 $
*
* last change: $Author: ab $ $Date: 2002-08-08 09:53:13 $
* last change: $Author: ab $ $Date: 2002-08-12 08:59:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -2722,5 +2722,28 @@ void SbRtl_CreateUnoListener( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
refVar->PutObject( p->xSbxObj );
}
//========================================================================
// Represents the DefaultContext property of the ProcessServiceManager
// in the Basic runtime system.
void RTL_Impl_GetDefaultContext( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite )
{
SbxVariableRef refVar = rPar.Get(0);
Reference< XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory();
Reference< XPropertySet> xPSMPropertySet( xFactory, UNO_QUERY );
if( xPSMPropertySet.is() )
{
Any aContextAny = xPSMPropertySet->getPropertyValue(
String( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ) );
SbUnoObjectRef xUnoObj = new SbUnoObject
( String( RTL_CONSTASCII_USTRINGPARAM("DefaultContext") ),
aContextAny );
refVar->PutObject( (SbUnoObject*)xUnoObj );
}
else
{
refVar->PutObject( NULL );
}
}
......@@ -2,9 +2,9 @@
*
* $RCSfile: sbunoobj.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: ab $ $Date: 2002-06-11 11:10:41 $
* last change: $Author: ab $ $Date: 2002-08-12 08:56:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -239,6 +239,7 @@ void RTL_Impl_GetProcessServiceManager( StarBASIC* pBasic, SbxArray& rPar, BOOL
void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite );
void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite );
void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite );
void RTL_Impl_GetDefaultContext( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite );
#endif
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: methods1.cxx,v $
*
* $Revision: 1.8 $
* $Revision: 1.9 $
*
* last change: $Author: mh $ $Date: 2001-10-17 18:35:14 $
* last change: $Author: ab $ $Date: 2002-08-12 09:00:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -1330,3 +1330,8 @@ RTLFUNC(ConvertFromUrl)
}
// Provide DefaultContext
RTLFUNC(GetDefaultContext)
{
RTL_Impl_GetDefaultContext( pBasic, rPar, bWrite );
}
......@@ -2,9 +2,9 @@
*
* $RCSfile: rtlproto.hxx,v $
*
* $Revision: 1.5 $
* $Revision: 1.6 $
*
* last change: $Author: ab $ $Date: 2001-10-26 13:32:16 $
* last change: $Author: ab $ $Date: 2002-08-12 09:00:48 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -344,6 +344,7 @@ extern RTLFUNC(ResolvePath);
extern RTLFUNC(CreateUnoStruct);
extern RTLFUNC(CreateUnoService);
extern RTLFUNC(GetProcessServiceManager);
extern RTLFUNC(GetDefaultContext);
extern RTLFUNC(CreatePropertySet);
extern RTLFUNC(CreateUnoListener);
extern RTLFUNC(HasUnoInterfaces);
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: stdobj.cxx,v $
*
* $Revision: 1.6 $
* $Revision: 1.7 $
*
* last change: $Author: ab $ $Date: 2001-10-26 13:33:25 $
* last change: $Author: ab $ $Date: 2002-08-12 09:00:48 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -289,6 +289,7 @@ static Methods aMethods[] = {
{ "GetAttr", SbxINTEGER, 1 | _FUNCTION, RTLNAME(GetAttr) },
{ "filename", SbxSTRING },
{ "GetDefaultContext", SbxOBJECT, 0 | _FUNCTION, RTLNAME(GetDefaultContext) },
{ "GetDialogZoomFactorX", SbxDOUBLE, _FUNCTION,RTLNAME(GetDialogZoomFactorX) },
{ "GetDialogZoomFactorY", SbxDOUBLE, _FUNCTION,RTLNAME(GetDialogZoomFactorY) },
{ "GetGUIType", SbxINTEGER, _FUNCTION,RTLNAME(GetGUIType) },
......
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