Hallo,
> was muß ich wo einstellen, damit ein Tabellenblatt mit all
> seinem Inhalt
> UND all seinen Atributen - also 1:1 - kopiert wird?
Das geht imho nicht
> Im konkreten Fall wird z.B. der Druckbereich nicht mitkopiert!?!?!
Dann mache das per Makro. Am Zweckmäßigsten [1] zeiche das Kopieren des Blattes
per Makrorekorder auf, z.B.:
sub Main
rem --
rem define variables
dim document as object
dim dispatcher as object
rem --
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem --
dim args1(2) as new com.sun.star.beans.PropertyValue
args1(0).Name = "DocName"
args1(0).Value = "Unbenannt3"
args1(1).Name = "Index"
args1(1).Value = 32767
args1(2).Name = "Copy"
args1(2).Value = true
dispatcher.executeDispatch(document, ".uno:Move", "", 0, args1())
end sub
Und ergänze diesen Code händisch um das Übertragen der Druckbereiche:
sub Main
tmp_pa = ThisComponent.CurrentController.getActiveSheet().getPrintAreas()
rem --
rem define variables
dim document as object
dim dispatcher as object
rem --
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem --
dim args1(2) as new com.sun.star.beans.PropertyValue
args1(0).Name = "DocName"
args1(0).Value = "Unbenannt3"
args1(1).Name = "Index"
args1(1).Value = 32767
args1(2).Name = "Copy"
args1(2).Value = true
dispatcher.executeDispatch(document, ".uno:Move", "", 0, args1())
akt = ThisComponent.Sheets().Count - 1
ThisComponent.Sheets().getByIndex(akt).setPrintAreas(tmp_pa())
end sub
[1]
Zweckmäßig deshalb weil bei OO ein weitgehend vollständiges Kopieren am
Einfachsten mit sog. Dispatcher-Code möglich ist, der vom Makrorekorder
automatisch erzeugt wird.
Gruß
Jörg
-
To unsubscribe, e-mail: users-de-unsubscr...@openoffice.apache.org
For additional commands, e-mail: users-de-h...@openoffice.apache.org