openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "蜗牛" <>
Subject a question of Export custom file format?
Date Wed, 06 Jun 2012 15:27:22 GMT
Hi Ariel 
 The following code excerpt since ooo1.1,  if this demo code can be implemented in the extension,
my question can be resolved</:includetail>
 VCLXDevice*                 pXDevice = new VCLXDevice;
PDFWriter*  pPDFWriter = new PDFWriter( aURL.GetMainURL(INetURLObject::DECODE_TO_IURI), PDFWriter::PDF_1_4,
eCompressMode );
OutputDevice*  pOut = pPDFWriter->GetReferenceDevice();
pXDevice->SetOutputDevice( pOut );
GDIMetaFile aMtf;
const MapMode   aMapMode( MAP_100TH_MM );
const Size      aMtfSize( aPageSize.Width, aPageSize.Height );
pOut->EnableOutput( FALSE );
pOut->SetMapMode( aMapMode );
 aMtf.SetPrefSize( aMtfSize );
aMtf.SetPrefMapMode( aMapMode );
aMtf.Record( pOut );
 xRenderable->render( nSel - 1, aSelection, aRenderOptions );
 if( aMtf.GetActionCount() )
    bRet = ImplExportPage( *pPDFWriter, aMtf, nCompressMode ) || bRet;

On Wed, Jun 06, 2012 at 09:35:34PM +0800, 蜗牛 wrote:
> Hi  Ariel 
>   can not directly access the VCL interface is the SDK problem?  

If you are going to work in an extension, you must use only UNO API as
described in the API reference; so forget about VCL :) VCL is used
internally, as an API Developer you don't need to know anything about

You can only work with the features described in the reference
and document in the Developer's Guide.

Did you study the API? I don't mean the whole API and the whole
Developer's Guide. But the first question you should answer yourself is
if you can achieve what you're trying to do, using *only* the API. (In
order to use the API, you must know the API, of course).

>   If the SDK, can directly modify the SDK code to solve this problem?

No, you will have to start implement things yourself. Of course, this
will be more than welcome (as far as the API is useful).

The main issue I see by reading your mails, is that you didn't try to
find out how feasible is it to do what you're trying to do, using only

Ariel Constenla-Haile
La Plata, Argentina

  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message