#9 superfluous frames in images

closed-fixed
nobody
None
5
2007-03-07
2007-02-27
No

Sometimes in the image inclusion frames are used ("|framed|none") even though there are no frames on the Word document.

Discussion

  • Fernando de Alcântara Correia

    Logged In: YES
    user_id=778575
    Originator: YES

    The source code is like this:
    Selection.InsertAfter vbCr & "[[Image:" & ImageInfo.Name & IIf(ImageInfo.hasFrame, "|framed|none", "") & "]]" & vbCr

    Apparently, ImageInfo.hasFrame is returning true even when the image does not have a visible frame.

     
  • Fernando de Alcântara Correia

    Logged In: YES
    user_id=778575
    Originator: YES

    The previous commentary is not exact. Actually, the first 3 images of the demo document are generated by this section:

    Case 2 'resize only if bigger then ImageMaxWidth
    If ImageInfo.Width > GetReg("ImageMaxWidth") Then
    MyIS.Range.InsertAfter "[[Image:" & ImageInfo.Name & "|thumb|none|" & GetReg("ImageMaxWidth") & "px]]" & vbCr
    Else
    MyIS.Range.InsertAfter "[[Image:" & ImageInfo.Name & "|framed|none" & "]]" & vbCr
    End If

    The fourth image is generated by this one:
    Selection.InsertAfter vbCr & "[[Image:" & ImageInfo.Name & IIf(ImageInfo.hasFrame, "|framed|none|teste2", "") & "]]" & vbCr

     
  • Fernando de Alcântara Correia

    Logged In: YES
    user_id=778575
    Originator: YES

    From the source code we can see that ImageInfo.hasFrame is almost always true, only being changed to False on a few cases (msoTextBox, msoAutoShape). It seems the code wants to use frames whenever this is possible. Probably this should be an option.

     
  • Fernando de Alcântara Correia

    • status: open --> closed-fixed
     
  • Fernando de Alcântara Correia

    Logged In: YES
    user_id=778575
    Originator: YES

    Revision 17

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks