Hi,

I am writing a C++ filter extension for DOCX file format. I need to get
some information from user before opening the document, After that default
DOCX filter will be used.
I was able to create a filter which can open DOCX files. Also created XDL
file using Basic Dialog editor.
Now when I try to use this XDL file, I don't see any dialog opening up.

I tried to follow the directions in
http://openoffice.2283327.n4.nabble.com/help-with-dialog-boxes-td3026585.html
But I couldn't get it working yet.

sal_Int16 SAL_CALL SimpleDialog::execute() throw ( RuntimeException )
{
    Reference< XDialogProvider > xDialogProvider(
                mxServiceFactory->createInstanceWithContext(
C2U("com.sun.star.awt.DialogProvider2"), mxContext), UNO_QUERY_THROW );

    OUString sXDLPath = getFilterInstallPath();
    sXDLPath += C2U("xdl/SimpleDialog.xdl");

    mxDialog = Reference< XDialog>
(xDialogProvider->createDialog(sXDLPath), UNO_QUERY_THROW);
    Reference< XControl > xControl(mxDialog, UNO_QUERY_THROW);

    short nRet = mxDialog->execute();
    return mRet;
}


I get a valid xdl file path in sXDLPath, File path starts with "file://"
instead of "vnd.sun.star.extension://" Is this OK ?
Is there any mistake in the code snippet above?

Because, If I create dialog programatically, it works fine. Problem happens
only when I use XDL file.

Thanks in advance!

-- 
Mani Chandrasekar

Reply via email to