Hi ????,
On 07.06.2012 02:24, ???? wrote:
hi Armin
can i modify the SDK to achieve my need.
Not the SDK, but the UNO API definition and imlementation for primitives.
You could do that in principle, but it is a lot of work and requires
knowing the UNO API and it's principles, Primitives and their
principles, some of the AOO code and it's functionalities and a lot of
AOO-specific data types and how to handle them over the API. It also is
a region where first design and then open discussion will be needed to
guarantee a good API design; it would be intended to be used by everyone
and (in principle) should never need to be changed (and needs to stay
backward compatible from there on since it would be a public API).
achieve demo code as below:
Reference< XRenderable> xRenderable( mxSrcDoc, UNO_QUERY )
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->Push();
pOut->EnableOutput( FALSE );
pOut->SetMapMode( aMapMode );
aMtf.SetPrefSize( aMtfSize );
aMtf.SetPrefMapMode( aMapMode );
aMtf.Record( pOut );
xRenderable->render( nSel - 1, aSelection, aRenderOptions );
aMtf.Stop();
aMtf.WindStart();
if( aMtf.GetActionCount() )
bRet = ImplExportPage( *pPDFWriter, aMtf, nCompressMode ) || bRet;
pOut->Pop();
just provide the output of the VCL. To meet my needs.
If this idea can be.
How do I do?
Regards
On 06.06.2012 12:23, ???? wrote:
hi Armin
could you give me a example of use your Way doing a new
exporter, assuming that the file format is pdf?
It would be more or less the same as every UNO API based export, iterate
over the document, the pages and the shapes. Instead of getting a
MetaFile from the shape (using Graphicxporter) you would get the
sequence of primitives and use that as base geometry information.
You cannot use this when you want to develop an extension, the UNO API
for primitives is minimal currently and thus you would have to link
against office components (what the definition of extension does not
allow). To do this, the most needed primitives would need to get an UNO
API implementation first.
Regards
Sincerely,
Armin
--
ALG
</:includetail>
Sincerely,
Armin
--
ALG