[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

problem with macro in OOo 1.1.1-3 on PPC



Hi folks,

OOo is crashing on my Powerpc when I try to run a macro I am very fond
of -- MakeRecentFilesHoldMoreItems .  the upstream version of 1.1.1
does not crash.  

I've pasted in the macro code with a pointer to the lines that seem to
cause the crash (diagnosed by the primitive method of commenting out
the whole macro and adding in commands line-by-line).  Any ideas on
what's wrong/how I can fix it/ a workaround?  thx,

matt

Sub MakeRecentFilesHoldMoreItems()
    ' Get the number of recent files from the drawing.
    oDrawDoc = ThisComponent
    oDrawPage = oDrawDoc.getDrawPages().getByIndex( 0 )
    oForms = oDrawPage.getForms()
    oForm = oForms.getByName( "Standard" )
    oFldNumRecentFiles = oForm.getByName( "fldNumRecentFiles" )
    nNumRecentFiles = oFldNumRecentFiles.Value
    
'   oConfigProvider = createUnoService("com.sun.star.configuration.ConfigurationProvider" )

--->> here's the problem 
   oConfigProvider =GetProcessServiceManager().createInstanceWithArguments(_
		"com.sun.star.configuration.ConfigurationProvider",_
		Array( MakePropertyValue( "enableasync", False ) ) )
oConfigAccess = oConfigProvider.createInstanceWithArguments( "com.sun.star.configuration.ConfigurationUpdateAccess",_
	      Array( MakePropertyValue( "nodepath", "/org.openoffice.Office.Common/History" ),_
	    MakePropertyValue( "lazywrite", False ) ) )
<<-- as you can see, it's the most important part of the macro!  

nNumRecentFilesOld = oConfigAccess.PickListSize
oConfigAccess.PickListSize = nNumRecentFiles
oConfigAccess.commitChanges()
																	    
MsgBox( "Your Recent Files list previously held " + CSTR( nNumRecentFilesOld ) + " entries."_
 +"  It now holds " + CSTR( nNumRecentFiles ) + " entries." )

End Sub


-----------
thanks as always for the help!
matt



Reply to: