[Solved No answer?] FirstStepsTutorial v4:Blank Insert Issue

Creating a macro - Writing a Script - Using the API

[Solved No answer?] FirstStepsTutorial v4:Blank Insert Issue

Postby ralphhosmer » Sun Jan 11, 2015 8:33 pm

I've moved this from 'Macros & UNO_API' hoping for a response:
The AnchorType API http://www.openoffice.org/api/docs/comm ... rType.html gives me basic definitions so that I can experiment with the different types {in Writer for this issue}, but I'm still at a loss as to how to prevent inserting an apparently blank 'Green Handles' frame which should {and does} contain my picture file. By dragging the 'frame' I can usually make the picture visible, but I really want to have the picture visible at the time it is inserted into the writer document. Any suggestions.
Attachments
FirstStepsBASIC_4.odt
(20.01 KiB) Downloaded 54 times
Last edited by ralphhosmer on Sun Jan 18, 2015 4:54 pm, edited 2 times in total.
OpenOffice 4.1.1 on Windows 10 Home
ralphhosmer
 
Posts: 65
Joined: Mon Nov 03, 2014 2:14 pm

Re: First Steps Tutorial v4: Blank Insert Issue

Postby RoryOF » Sun Jan 11, 2015 8:51 pm

I can't answer your problem, but a sample picture inserted from your macro is displaced out of the frame. As soon as I move the frame the picture takes its correct place.
Apache OpenOffice 4.1.8 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31743
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: First Steps Tutorial v4: Blank Insert Issue

Postby ralphhosmer » Sun Jan 11, 2015 8:58 pm

My experience as well: Still looking for suggestions on ways to avoid the 'Blank Insert Syndrome'.
OpenOffice 4.1.1 on Windows 10 Home
ralphhosmer
 
Posts: 65
Joined: Mon Nov 03, 2014 2:14 pm

Re: First Steps Tutorial v4: Blank Insert Issue

Postby MTP » Sun Jan 11, 2015 9:29 pm

If, as a user, moving the frame clears the bug, maybe try using the macro to move the frame and see if that also clears the bug?
OpenOffice 4.1.1 on Windows 10, HSQLDB 1.8 split database
User avatar
MTP
Volunteer
 
Posts: 1620
Joined: Mon Sep 10, 2012 7:31 pm
Location: Midwest USA

Re: First Steps Tutorial v4: Blank Insert Issue

Postby ralphhosmer » Sun Jan 11, 2015 10:18 pm

I added the second 'oText' to the 'Sub FinishGraphicsDialog':
Code: Select all   Expand viewCollapse view
oText.insertTextContent(oCursor.getStart(), oGraphicObject, false)
     
      oText.insertControlCharacter(oViewCursor, ControlCharacter_PARAGRAPH_BREAK, false)
      ' Graphics file inserted after above executes, but below the 'frame'

It's pretty apparent I don't know what I'm doing, but any help I can get will be appreciated. EDIT: I added 'wait 5000' before executing the oText....ControlCharacter_PARAGRAPH_BREAK ...... This delay seems to insert the 'picture' as VISIBLE. I'm guessing this is still pretty crude and needs a lot more text handling 'Tender Loving Care' before this is reasonably stable. I'll keep working on it and any other suggestions will be very welcome.
OpenOffice 4.1.1 on Windows 10 Home
ralphhosmer
 
Posts: 65
Joined: Mon Nov 03, 2014 2:14 pm

Re: First Steps Tutorial v4: Blank Insert Issue

Postby acknak » Sun Jan 11, 2015 11:20 pm

ralphhosmer wrote:I've moved this from 'Macros & UNO_API' hoping for a response: ...

Sorry, programming discussions belong here. This is where the programming folks watch and are most likely to respond.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 7 guests