Hi,
I am doing something modify to the codes to add a cache for the PolyPolygon, 
which is being generated durning the export of the flash. 
Christian, you said that the key to that cache is actually the PolyPolygon 
itself and the
mapped value is the flash id.
So I new a cache maPolyPolygonIndex in the class writer 
(filter\souce\flash\swfwriter.hxx) and I add the codes in the 
Writer::defineShape(). filter\source\flash\swfwriter.cxx

sal_uInt16 Writer::defineShape( const PolyPolygon& rPolyPoly, const FillStyle& 
rFillStyle )
{
     //add fangyq 070521
     // see if we already created a glyph for this character
     sal_uInt16 nShapeId = 0;
     std::map<PolyPolygon, sal_uInt16>::const_iterator aIter( 
maPolyPolygonIndex.find(rPolyPoly) );
     if( aIter != maPolyPolygonIndex.end() )
     {
          nShapeId = aIter->second;
     }
     else
     {
          // if not, we create one now
          nShapeId = createID();
     }
     maPolyPolygonIndex[rPolyPoly]=nShapeId;

     .......

     return nShapeId;
}

But after building and debuging it, I found it cause a serious problem. The swf 
cannot be exported successfully, and an error messagebox appeares when I export 
the impress to swf. It says 

        "Error saving the document Untitled1: Writer Error. The file could not 
be written." 

And unfortunately I cannot trace the code of this part as it seems not pass 
through the code, but the problem is assuredly influenced by it.
I am puzzled about it and looking forward to your reply.

Sincerely,
Fang









Fang Yaqiong [EMAIL PROTECTED]
2007-05-22
Regards&Thanks! 
Tel:010-5157-0010 Ext.6202 
Beijing Redflag CH2000 Software Co., Ltd. 
  • [graphics-dev] The cach... Fang Yaqiong

Reply via email to