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

#95159# Changed XExactName handling to enable full qualified method names

üst 7f4a4e91
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: sbunoobj.cxx,v $ * $RCSfile: sbunoobj.cxx,v $
* *
* $Revision: 1.21 $ * $Revision: 1.22 $
* *
* last change: $Author: ab $ $Date: 2002-08-12 08:59:55 $ * last change: $Author: ab $ $Date: 2002-08-29 10:49:59 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -1735,41 +1735,42 @@ SbxVariable* SbUnoObject::Find( const XubString& rName, SbxClassType t ) ...@@ -1735,41 +1735,42 @@ SbxVariable* SbUnoObject::Find( const XubString& rName, SbxClassType t )
{ {
OUString aUName( rName ); OUString aUName( rName );
if( mxExactName.is() ) if( mxExactName.is() )
aUName = mxExactName->getExactName( aUName ); {
OUString aUExactName = mxExactName->getExactName( aUName );
if( aUExactName.getLength() )
aUName = aUExactName;
}
if( mxUnoAccess.is() ) if( mxUnoAccess.is() )
{ {
if( aUName.getLength() ) if( mxUnoAccess->hasProperty( aUName, PropertyConcept::ALL - PropertyConcept::DANGEROUS ) )
{ {
if( mxUnoAccess->hasProperty( aUName, PropertyConcept::ALL - PropertyConcept::DANGEROUS ) ) const Property& rProp = mxUnoAccess->
{ getProperty( aUName, PropertyConcept::ALL - PropertyConcept::DANGEROUS );
const Property& rProp = mxUnoAccess->
getProperty( aUName, PropertyConcept::ALL - PropertyConcept::DANGEROUS ); // #58455 Wenn die Property void sein kann, muss als Typ Variant gesetzt werden
SbxDataType eSbxType;
// #58455 Wenn die Property void sein kann, muss als Typ Variant gesetzt werden if( rProp.Attributes & PropertyAttribute::MAYBEVOID )
SbxDataType eSbxType; eSbxType = SbxVARIANT;
if( rProp.Attributes & PropertyAttribute::MAYBEVOID ) else
eSbxType = SbxVARIANT; eSbxType = unoToSbxType( rProp.Type.getTypeClass() );
else
eSbxType = unoToSbxType( rProp.Type.getTypeClass() ); // Property anlegen und reinbraten
SbxVariableRef xVarRef = new SbUnoProperty( rProp.Name, eSbxType, rProp, 0 );
// Property anlegen und reinbraten QuickInsert( (SbxVariable*)xVarRef );
SbxVariableRef xVarRef = new SbUnoProperty( rProp.Name, eSbxType, rProp, 0 ); pRes = xVarRef;
QuickInsert( (SbxVariable*)xVarRef ); }
pRes = xVarRef; else if( mxUnoAccess->hasMethod( aUName,
} MethodConcept::ALL - MethodConcept::DANGEROUS ) )
else if( mxUnoAccess->hasMethod( aUName, {
MethodConcept::ALL - MethodConcept::DANGEROUS ) ) // Methode ansprechen
{ const Reference< XIdlMethod >& rxMethod = mxUnoAccess->
// Methode ansprechen getMethod( aUName, MethodConcept::ALL - MethodConcept::DANGEROUS );
const Reference< XIdlMethod >& rxMethod = mxUnoAccess->
getMethod( aUName, MethodConcept::ALL - MethodConcept::DANGEROUS ); // SbUnoMethode anlegen und reinbraten
SbxVariableRef xMethRef = new SbUnoMethod
// SbUnoMethode anlegen und reinbraten ( rxMethod->getName(), unoToSbxType( rxMethod->getReturnType() ), rxMethod );
SbxVariableRef xMethRef = new SbUnoMethod QuickInsert( (SbxVariable*)xMethRef );
( rxMethod->getName(), unoToSbxType( rxMethod->getReturnType() ), rxMethod ); pRes = xMethRef;
QuickInsert( (SbxVariable*)xMethRef );
pRes = xMethRef;
}
} }
// Wenn immer noch nichts gefunden wurde, muss geprueft werden, ob NameAccess vorliegt // Wenn immer noch nichts gefunden wurde, muss geprueft werden, ob NameAccess vorliegt
...@@ -1815,22 +1816,19 @@ SbxVariable* SbUnoObject::Find( const XubString& rName, SbxClassType t ) ...@@ -1815,22 +1816,19 @@ SbxVariable* SbUnoObject::Find( const XubString& rName, SbxClassType t )
} }
else if( mxInvocation.is() ) else if( mxInvocation.is() )
{ {
if( aUName.getLength() ) if( mxInvocation->hasProperty( aUName ) )
{ {
if( mxInvocation->hasProperty( aUName ) ) // Property anlegen und reinbraten
{ SbxVariableRef xVarRef = new SbUnoProperty( aUName, SbxVARIANT, aDummyProp, 0 );
// Property anlegen und reinbraten QuickInsert( (SbxVariable*)xVarRef );
SbxVariableRef xVarRef = new SbUnoProperty( aUName, SbxVARIANT, aDummyProp, 0 ); pRes = xVarRef;
QuickInsert( (SbxVariable*)xVarRef ); }
pRes = xVarRef; else if( mxInvocation->hasMethod( aUName ) )
} {
else if( mxInvocation->hasMethod( aUName ) ) // SbUnoMethode anlegen und reinbraten
{ SbxVariableRef xMethRef = new SbUnoMethod( aUName, SbxVARIANT, xDummyMethod );
// SbUnoMethode anlegen und reinbraten QuickInsert( (SbxVariable*)xMethRef );
SbxVariableRef xMethRef = new SbUnoMethod( aUName, SbxVARIANT, xDummyMethod ); pRes = xMethRef;
QuickInsert( (SbxVariable*)xMethRef );
pRes = xMethRef;
}
} }
} }
} }
......
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