It is possible to add a Draw document to a gallery?

I tried oTheme.insertDrawingByIndex(oDoc, 0), which looks like it should work based on the API, but it does not work.


http://www.pitonyak.org/OOoGalleryImport.odt

I traced things to this code in

svx/source/unogallery/unogaltheme.cxx


::sal_Int32 SAL_CALL GalleryTheme::insertDrawingByIndex(
const uno::Reference< lang::XComponent >& Drawing, sal_Int32 nIndex )
       throw (lang::WrappedTargetException, uno::RuntimeException)
{
       const ::vos::OGuard aGuard( Application::GetSolarMutex() );
       sal_Int32                       nRet = -1;

       if( mpTheme )
       {
GalleryDrawingModel* pModel = GalleryDrawingModel::getImplementation( Drawing );

if( pModel && pModel->GetDoc() && pModel->GetDoc()->ISA( FmFormModel ) )
               {
nIndex = ::std::max( ::std::min( nIndex, getCount() ), sal_Int32( 0 ) );

if( mpTheme->InsertModel( *static_cast< FmFormModel* >( pModel->GetDoc() ), nIndex ) )
                               nRet = nIndex;
               }
       }

       return nRet;
}

What kind of drawing can I insert?

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to