| View previous topic :: View next topic |
| Author |
Message |
dinesh.upare@gmx.net General User

Joined: 18 Apr 2004 Posts: 15
|
Posted: Mon Aug 01, 2005 3:52 pm Post subject: Please help me out on this requirement |
|
|
I am interfacing openoffice with .NET application.
i searched a lot to know what property or method i should access, to find whether there is a dialog box on the TextDocument (openoffice document).
I want to handle differently in the code when there is spell Check dialog box appears on the TextDocument.
It would be a great help if you could answer the same.
Thanks,
dinoo |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
dinesh.upare@gmx.net General User

Joined: 18 Apr 2004 Posts: 15
|
Posted: Tue Aug 02, 2005 2:01 pm Post subject: |
|
|
I have already many functionalities with CLi-UNO libraries for .NET.
I am not sure which example you are talking about.
It would be a great help if some one can tell me, how do I identify that that there is a dialog box (e.g. Spell Check, Font Properties etc) on the writer document.
Which property of the classes (XModel, XComponent, XTextDocument, XDocumentInfo), i should access to find this.
Your help will be appreciated.
Thanks,
dinoo |
|
| Back to top |
|
 |
ms777 Super User


Joined: 07 Feb 2004 Posts: 1355
|
Posted: Sat Aug 06, 2005 1:51 am Post subject: |
|
|
I found a BASIC solution. This is not thoroughly tested, though. Good luck with translating ...
ms777
| Code: | sub main
msgbox IsWindowOpen("Spellcheck")
end sub
function IsWindowOpen(sTitle as String) as Boolean
IsWindowOpen = false
oToolkit = Stardesktop.ActiveFrame.ContainerWindow.Toolkit
lCount = oToolkit.TopWindowCount
for k=0 to lCount -1
oWin = oToolkit.getTopWindow(k)
if HasUnoInterfaces(oWin, "com.sun.star.awt.XDialog") then
if left(oWin.Title, len(sTitle)) = sTitle then
IsWindowOpen = true
exit function
endif
endif
next k
end function |
|
|
| Back to top |
|
 |
|