The following code is in one of my source files and executing this code
has a pretty good chance to hang my C# software and the OpenOffice
counterpart.
The systems hangs at line "docuProperties.Title = ..." or
"docuProperties.Subject = ..."
Sometimes this code works, but around 40% (or 30% ?) this code fails to
work. I've used the Subject and Title field in the template ott I open
with my software and then I fill the docu properties ..
Done in VS2008, .NET 3.5, OpenOffice 3.0 and Windows XP-SP3.
Marten Feldtmann
/// <summary>
/// Setze Thema und Titel des Dokumentes, damit dieses im Dokument über
Felder genutzt werden kann
/// </summary>
/// <param name="textDocument"></param>
/// <param name="titleString"></param>
/// <param name="themaString"></param>
private void SetTitleAndThema(XTextDocument textDocument, string
titleString, string themaString)
{
XDocumentPropertiesSupplier propSupp = textDocument as
XDocumentPropertiesSupplier;
if (propSupp != null)
{
XDocumentProperties docuProperties =
propSupp.getDocumentProperties();
docuProperties.Title = titleString;
docuProperties.Subject = themaString;
}
else
{
if (Debugger.IsAttached)
Debugger.Break();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]