Villeroy wrote:I'm not shure, but something is looking strange. You loop through the collection of embedded objects ...
Code: Select all
objects = ThisComponent.getEmbeddedObjects()
For i = 0 to objects.count-1
... and then you get another embedded object from the member of the collection:
Code: Select all
obj = objects(i)
embedded = obj.getEmbeddedObject()
Symbol "embedded" is not a member of the the original collection "objects".
Is there perhaps an approved way of accomplishing this?
Villeroy wrote:You do use the Xray tool, don't you?
No, but I'll look into it.
[UPDATE] I installed Xray and messed around with it a bit.
Seems that when getEmbeddedObject() is called on the 21st object (i=20), the system hangs for around 1-5 seconds, then returns an incomplete object.
It seems as if it's trying to duplicate the object somehow before returning it, decides it takes to long, returns it anyway and tries to finish up the duplication hoping the object won't be accessed right away. Sounds weird, I know.
Depending on how fast the 'embedded' variable is accessed, it'll be a Null object or (very rarely) what appears to be an incomplete object as shown by Xray:
Code: Select all
Alignment integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
BaseFontHeight integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
BasicLibraries object read-only, <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
BottomMargin integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
CustomFontNameFixed string <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
CustomFontNameSans string <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
CustomFontNameSerif string <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
DialogLibraries object read-only, <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontFixedIsBold boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontFixedIsItalic boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontFunctionsIsBold boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontFunctionsIsItalic boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontNameFunctions string <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontNameNumbers string <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontNameText string <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontNameVariables string <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontNumbersIsBold boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontNumbersIsItalic boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontSansIsBold boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontSansIsItalic boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontSerifIsBold boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontSerifIsItalic boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontTextIsBold boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontTextIsItalic boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontVariablesIsBold boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
FontVariablesIsItalic boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
Formula string <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
IsScaleAllBrackets boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
IsTextMode boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
LeftMargin integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
LoadReadonly boolean <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
PrinterName string <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
PrinterSetup []byte <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeBracketDistance integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeBracketExcessSize integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeFontHeightFunctions integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeFontHeightIndices integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeFontHeightLimits integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeFontHeightOperators integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeFontHeightText integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeFractionBarExcessLength integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeFractionBarLineWeight integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeFractionDenominatorDepth integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeFractionNumeratorHeight integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeIndexSubscript integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeIndexSuperscript integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeLineSpacing integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeLowerLimitDistance integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeMatrixColumnSpacing integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeMatrixLineSpacing integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeOperatorExcessSize integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeOperatorSpacing integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeRootSpacing integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeScaleBracketExcessSize integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeSpacing integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeSymbolMinimumHeight integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeSymbolPrimaryHeight integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RelativeUpperLimitDistance integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RightMargin integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
RuntimeUID string read-only, <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
Symbols []struct <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
TopMargin integer <An exception occurred
Type: com.sun.star.beans.UnknownPropertyException
Message: .>
Parent object pseudo-prop
DocumentInfo object pseudo-prop, read-only
DocumentProperties object pseudo-prop, read-only
Events object pseudo-prop, read-only
AllowMacroExecution boolean attribute, read-only
ScriptContainer object attribute, read-only
URL string pseudo-prop, read-only
Args []struct pseudo-prop, read-only
CurrentController object pseudo-prop
CurrentSelection object pseudo-prop, read-only
Controllers object <null> pseudo-prop, read-only
AvailableViewControllerNames []string <empty> pseudo-prop, read-only
Modified boolean pseudo-prop, write-only
Printer []struct pseudo-prop
Location string pseudo-prop, read-only
LibraryContainer object pseudo-prop, read-only
ViewData object pseudo-prop
TransferDataFlavors []struct pseudo-prop, read-only
DocumentSubStoragesNames []string pseudo-prop, read-only
DocumentStorage object pseudo-prop, read-only
ScriptProvider object pseudo-prop, read-only
UIConfigurationManager object pseudo-prop, read-only
Identifier string "" pseudo-prop
Title string "" pseudo-prop
UntitledPrefix string "" pseudo-prop, read-only
Types []type pseudo-prop, read-only
ImplementationId []byte pseudo-prop, read-only
ImplementationName string <...> pseudo-prop, read-only
SupportedServiceNames []string pseudo-prop, read-only
PropertySetInfo object pseudo-prop, read-only
Dbg_Properties string <...> basic prop, read-only
Dbg_Methods string <...> basic prop, read-only
Dbg_SupportedInterfaces string <...> basic prop, read-only
It seems possible to make things work it there's a forced pause (waiting a while before clicking Xray's Close button) between access of the 20th and 21st objects. The same seems to be true for every increment of 20, but it's harder to get it to die on the later ones.