|
List Info
Thread: Multiple cells in macros
|
|
| Multiple cells in macros |

|
2006-05-17 10:57:10 |
Hi,
When I record a macro that do an operation in several cells
this only
work when I'm recording it. Later, when I execute this only
work for the
first cell.
The same thing when I want to print two or more sheets. It
only print
the first one.
Thanx
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| GRAPHIC questions |

|
2006-05-17 12:56:48 |
Hi all,
Having controll over placing-formating-sizing graphics and
Images will
be a big advantage for the many users who uses OO in a bid
more
professional way !
We are a Belgian based Editing-house who uses exclusifly OO
to produce
all the WEB-content and we planned also to let produce
our editors
all the Printed magazine-pages .
I am working o a way to let users import graphics into a
WriterDoc, with
an preview who is giving Size and Resolution off te
imported images and
if necacery chaging the ImageFormat, size and resolution,
depending on
witch medium (web-print-copie) the page will be showed.
I found finaly a way to find out the "format",
"size" and "resolution"
of a Image using the
"GraphicProvider.QuaryGraphic" (I will be happy
to share this basic-code with the community) But during
finding a way to
place -resizing-reformating the images i stumbeled on a lot
of "deadends"
Placing an embedded -grahpic into a WriterDoc (with the
GUI or withe
the API) gives different results depending if you placed
it as a
linked-graphic or and embedded-graphic.
Embedded gives us the orinal dimensions (as difined in the
Imagefile-header) gives us the correct
"orginal-size" , the image had a
"scale of "100%" and a correct
"image-size "
Linked gives us the a wrong "orginal size"
(based on 96 DPI) a
"scaling" with a percentage to optain a correct
"image size" !! Is
this behabior wanted or is it a bug ?
Before we place the image we can resize and reformat the
graphic and
define if we "embed" or "link" the
grahic. I tried different ways to
acomplish this task, it can be done, opening a hidden
drawdoc and then
place the grapic as a Shade, and finaly
"exporting" the drawpage using
the filteroptions to re-size and re-format the imagefile. To
avoid the
hidden drawdoc i tryed differend ways to acomplis the same
task:
Using the "GrapchicProvider.storeGraphic" and
defining the MIMEtype was
a prommesing option , I can do the re-formating, but i
found noway to
re-size the imagefile, there exist some filteroptions but
found noware
any documentation.
Exporting the "Shape" instead of the DrawPage
"with a filter" avoid
the use of a hidden DrawDoc , works the
"filtername" gives us the right
format but: the filter ignorges the re-sizing options.
Exporting the Writer-Drawpage let crashes OO (no pagesize i
supose)
Any hints to resolve this deadends will be very welcome,
and just maybe
someone can explain why the filteroptions only works during
the exort of
a DrawDoc-drawpage and how a filter cen be used with
GraphicProfider.StoreGrahpic
Thanks
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| GRAPHIC questions |

|
2006-05-17 13:20:04 |
thanks for sharing your expereinces, related to images
do you think you could answer two questions for me?
I am having a problem with cropping. Cropping seems to
work ok, but for some odd reason, "keep scale"
is
default during cropping, you can see this in the UI.
Therefore when I crop it then gets scaled. So all I
need to know is how to turn off "keep the scale"
and
use "keep image size" programmatically.
The other problem I have is with zOrder from
TextFrames and Lines. My lines are going to the
background, so even though I set all the zOrders, the
layering will be wrong, while the TextFrames go to the
foreground.
After experimenting I am pretty sure the problem is
that the wrap modus is influencing it. Wrap (I am
using wrap through) is always defaulting to wrap "In
the background" and this is also another undocumented
parameter which I have no idea how to set.
Any help would be grand as this problems are proving
to be real headaches. thanks.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection
around
http://mail.yahoo.com
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| GRAPHIC questions |

|
2006-05-17 19:01:55 |
Kent Gibson schreef:
> thanks for sharing your expereinces, related to images
> do you think you could answer two questions for me?
>
> I am having a problem with cropping. Cropping seems to
> work ok, but for some odd reason, "keep
scale" is
> default during cropping, you can see this in the UI.
> Therefore when I crop it then gets scaled. So all I
> need to know is how to turn off "keep the
scale" and
> use "keep image size" programmatically.
>
I think the crop-dialog i a sort of "wizard"
and can not be handled by
the API. The "keep the scale" is following the
last-klicked status and
saved someware hidden in the OOconf-user-depended-files.
The results of
using this wizard are stored as a properrty of the
"graphicObject" its
a struct. with top,bottom,left and right distances and can
at all times
easely be handeld with the API.
.
> The other problem I have is with zOrder from
> TextFrames and Lines. My lines are going to the
> background, so even though I set all the zOrders, the
> layering will be wrong, while the TextFrames go to the
> foreground.
>
> After experimenting I am pretty sure the problem is
> that the wrap modus is influencing it. Wrap (I am
> using wrap through) is always defaulting to wrap
"In
> the background" and this is also another
undocumented
>
No idee ?
Fernand
> parameter which I have no idea how to set.
>
> Any help would be grand as this problems are proving
> to be real headaches. thanks.
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
protection around
> http://mail.yahoo.com
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
> For additional commands, e-mail: dev-help api.openoffice.org
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| GRAPHIC questions |

|
2006-05-18 08:01:20 |
is there no way ensure that I am using the same layer?
I believe this a problem becuase I am mixing the draw
componenets and the writer components. It seems to
pretty straight forward to tell the draw components
which layer they are on, but writer components do not
seem to have layers, they only have zOrders, no?
The reason I am having this problem is becuase I am
want my frame borders to have fancy lines like dotten
lines, etc. Is there a way to tell a frame to use a
line for a border?
--- Fernand Vanrie <sos pmgroup.be> wrote:
> Kent Gibson schreef:
> > thanks for sharing your expereinces, related to
> images
> > do you think you could answer two questions for
> me?
> >
> > I am having a problem with cropping. Cropping
> seems to
> > work ok, but for some odd reason, "keep
scale" is
> > default during cropping, you can see this in the
> UI.
> > Therefore when I crop it then gets scaled. So all
> I
> > need to know is how to turn off "keep the
scale"
> and
> > use "keep image size"
programmatically.
> >
> I think the crop-dialog i a sort of
"wizard" and
> can not be handled by
> the API. The "keep the scale" is following
the
> last-klicked status and
> saved someware hidden in the
> OOconf-user-depended-files. The results of
> using this wizard are stored as a properrty of the
> "graphicObject" its
> a struct. with top,bottom,left and right distances
> and can at all times
> easely be handeld with the API.
> .
>
> > The other problem I have is with zOrder from
> > TextFrames and Lines. My lines are going to the
> > background, so even though I set all the zOrders,
> the
> > layering will be wrong, while the TextFrames go to
> the
> > foreground.
> >
> > After experimenting I am pretty sure the problem
> is
> > that the wrap modus is influencing it. Wrap (I am
> > using wrap through) is always defaulting to wrap
> "In
> > the background" and this is also another
> undocumented
> >
> No idee ?
>
> Fernand
> > parameter which I have no idea how to set.
> >
> > Any help would be grand as this problems are
> proving
> > to be real headaches. thanks.
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
>
------------------------------------------------------------
---------
> > To unsubscribe, e-mail:
> dev-unsubscribe api.openoffice.org
> > For additional commands, e-mail:
> dev-help api.openoffice.org
> >
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail:
> dev-unsubscribe api.openoffice.org
> For additional commands, e-mail:
> dev-help api.openoffice.org
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection
around
http://mail.yahoo.com
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| INSERT PICTURE behavior |

|
2006-05-18 10:46:23 |
Ok i spitup my Ilmages questions
Placing an embedded -grahpic into a WriterDoc (with the
GUI or withe
the API) gives different results depending if you placed
it as a
linked-graphic or as a embedded-graphic.
Embedded gives us the orinal dimensions (as difined in the
original
imported Imagefile-header) gives us the correct
"orginal-size" , the
image had a "scale of "100%" and a correct
"image-size "
Linked gives us the a wrong "orginal size"
(based on 96 DPI) a
"scaling" with a percentage to optain a correct
"image size" !!
Is this behabior wanted or is it a bug ?
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| INSERT PICTURE behavior |

|
2006-05-18 11:30:22 |
you are probably aware of this but have you tried to
use the property "ActualSize" and compare it
with the
results from the method getSize() from an xShape?
--- Fernand Vanrie <sos pmgroup.be> wrote:
> Ok i spitup my Ilmages questions
>
> Placing an embedded -grahpic into a WriterDoc
> (with the GUI or withe
> the API) gives different results depending if you
> placed it as a
> linked-graphic or as a embedded-graphic.
> Embedded gives us the orinal dimensions (as difined
> in the original
> imported Imagefile-header) gives us the correct
> "orginal-size" , the
> image had a "scale of "100%" and a
correct
> "image-size "
> Linked gives us the a wrong "orginal size"
(based
> on 96 DPI) a
> "scaling" with a percentage to optain a
correct
> "image size" !!
>
> Is this behabior wanted or is it a bug ?
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail:
> dev-unsubscribe api.openoffice.org
> For additional commands, e-mail:
> dev-help api.openoffice.org
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection
around
http://mail.yahoo.com
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| INSERT PICTURE behavior |

|
2006-05-18 12:06:31 |
Kent Gibson schreef:
> you are probably aware of this but have you tried to
> use the property "ActualSize" and compare
it with the
> results from the method getSize() from an xShape
>
The behaviour is the same for placing the graphic with the
API as with
the UI
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| 3 Ways to export Writer Graphics |

|
2006-05-18 12:04:39 |
Before we place the image we can resize and reformat the
graphic and
define if we "embed" or "link" the
grahic. I tried different ways to
acomplish this task, it can be done, opening a hidden
drawdoc and then
place the grapic as a Shade, and finaly
"exporting" the drawpage using
the filteroptions to re-size and re-format the imagefile.
To avoid the hidden drawdoc i tryed differend ways to
acomplis the same
task:
Using the "GrapchicProvider.storeGraphic" and
defining the MIMEtype was
a prommesing option , I can do the re-formating, but i
found noway to
re-size the imagefile, there exist some filteroptions but
found noware
any documentation.
Exporting the "Shape" instead of the DrawPage
"with a filter" avoid
the use of a hidden DrawDoc , works the
"filtername" gives us the right
format but: the filter ignorges the re-sizing options.
Exporting the Writer-Drawpage let crashes OO (no pagesize i
supose)
The code below demonstrates the Exports (copy the code into
an emty
WriterDoc and place an imagefile c:\testIN.jpg, and
everiting can be tested)
REM thanks to Stephan Wunderlich, ms777 for the initial
codelines
sub main
EmbedGraphic(ThisComponent,
ConvertToUrl("C:\testIN.jpg"),ConvertToUrl(&qu
ot;C:\testUIT.jpg") )
end sub
Sub EmbedGraphic(oDoc, sURLIN$, sURLUIT$)
Dim oShape
Dim oGraph 'The graphic object is text content.
Dim oProvider 'GraphicProvider service.
Dim oText
Dim aSize As New com.sun.star.awt.Size
aSize.Width = 320
aSize.Height = 400
oShape =
oDoc.createInstance("com.sun.star.drawing.GraphicObjec
tShape")
oGraph =
oDoc.createInstance("com.sun.star.text.GraphicObject&
quot;)
oDoc.getDrawPage().add(oShape)
oProvider =
createUnoService("com.sun.star.graphic.GraphicProvider
")
Dim oPropsIN(1)as new com.sun.star.beans.PropertyValue
oPropsIN(0).Name = "URL"
oPropsIN(0).Value = sURLIN
oPropsIN(1).Name = "SizePixel"
oPropsIN(1).Value = asize ' >>has NO influence on
the imported Graphic<<
oShape.Graphic = oProvider.queryGraphic(oPropsIN())
oShape.Graphic.setpropertyvalue("SizePixel"
,asize ) ' >> has NO
influence on the SHAPE size<<
msgBOX "THE RESOLUTION = " &
int(oShape.Graphic.sizepixel.height /
(oShape.Graphic.size100thMM.height / 100) * 25.40 )
Dim aFilterData (1) as new
com.sun.star.beans.PropertyValue
aFilterData(0).Name = "PixelWidth"
'
aFilterData(0).Value = 320
aFilterData(1).Name = "PixelHeight"
aFilterData(1).Value = 400
' oGraph.GraphicUrl =
ConvertToUrl("C:\testuit.jpg") 'with a link
oGraph.GraphicUrl = oShape.GraphicUrl ' embedded
oGraph.Size = oShape.Graphic.Size100thMM
oText= oDoc.getText() ' insert the Graphic at the
current cursor
location
oText.insertTextContent(oDoc.getCurrentController().getViewC
ursor(),
oGraph, false)
oDrawpage = oDoc.Drawpage()
' >>1<<Export with the Provider
Dim oPropsUIT(3)as new com.sun.star.beans.PropertyValue
oPropsUIT(0).Name = "URL"
oPropsUIT(0).Value = sURLuit
oPropsUIT(1).Name = "SizePixel"
oPropsUIT(1).Value = asize
oPropsUIT(2).Name = "MimeType"
oPropsUIT(2).Value = "image/jpeg" '
>>WORKS fine<<
oPropsUIT(3).Name = "FilterData"
' oPropsUIT(3).Value = aFilterData ' >>HOW to
implement ???<
' oProvider.storeGraphic( oShape.Graphic , oPropsUIT())
'>>WORKS fine
but Ignores the sizing<<
' >>2<< Export the Drawpapage with the
Xexporter
' RunExport(oDrawpage , sURLuit , aFilterData() )
'>>OOCrashes with
the Wrter Drwapage !!!"
' >>3>> Export the Shape with the Xexporter
RunExport( oShape, sURLuit , aFilterData() ) '
>>WORKS but
Filtersettings are ignored !!!<<
End Sub
Sub RunExport( xObject, sFileUrl As String, aFilterData )
xExporter = createUnoService(
"com.sun.star.drawing.GraphicExportFilter" )
xExporter.SetSourceDocument( xObject )
Dim aArgs (2) as new com.sun.star.beans.PropertyValue
Dim aURL as new com.sun.star.util.URL
sFileUrl = ConvertToURL(sFileUrl)
aArgs(0).Name = "FilterName"
aArgs(0).Value = "jpg"
aArgs(1).Name = "URL"
aArgs(1).Value = sFileUrl
aArgs(2).Name = "FilterData"
aArgs(2).Value = aFilterData
xExporter.filter( aArgs() ) '>> WORKS when using
a DRAWING drawpage
: only here we find a resized file <<
End Sub
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| GRAPHIC questions |

|
2006-05-18 07:04:02 |
Fernand Vanrie wrote:
> Placing an embedded -grahpic into a WriterDoc (with
the GUI or withe
> the API) gives different results depending if you
placed it as a
> linked-graphic or and embedded-graphic.
> Embedded gives us the orinal dimensions (as difined in
the
> Imagefile-header) gives us the correct
"orginal-size" , the image had a
> "scale of "100%" and a correct
"image-size "
> Linked gives us the a wrong "orginal size"
(based on 96 DPI) a
> "scaling" with a percentage to optain a
correct "image size" !! Is
> this behabior wanted or is it a bug ?
Sounds like a bug to me. I suggest creating an issue.
> Before we place the image we can resize and reformat
the graphic and
> define if we "embed" or "link"
the grahic. I tried different ways to
> acomplish this task, it can be done, opening a hidden
drawdoc and then
> place the grapic as a Shade, and finaly
"exporting" the drawpage using
> the filteroptions to re-size and re-format the
imagefile. To avoid the
> hidden drawdoc i tryed differend ways to acomplis the
same task:
> Using the "GrapchicProvider.storeGraphic"
and defining the MIMEtype was
> a prommesing option , I can do the re-formating, but i
found noway to
> re-size the imagefile, there exist some filteroptions
but found noware
> any documentation.
> Exporting the "Shape" instead of the
DrawPage "with a filter" avoid
> the use of a hidden DrawDoc , works the
"filtername" gives us the right
> format but: the filter ignorges the re-sizing
options.
> Exporting the Writer-Drawpage let crashes OO (no
pagesize i supose)
I have to admit that I don't understand what you are trying
to achieve.
You started writing about inserting graphics and that you
have some
problems with it, but now you talk about storing graphics.
Do I
understand you correctly that storing graphics isn't your
real goal, you
just do it as part of a workaround to overcome limitations
for the
resizing/reformatting options? If that is correct: what
would you really
like to do, without any workarounds?
Best regards,
Mathias
--
Mathias Bauer - OpenOffice.org Application Framework Project
Lead
Please reply to the list only, nospamforMBA gmx.de is
a spam sink.
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
|
|