How to alphabetize slides?
-
- Posts: 4
- Joined: Fri Apr 20, 2018 9:41 pm
How to alphabetize slides?
Hello, is it possible to alphabetize slides, I use them for a lyric monitor. THX!
OpenOffice 4.1.5 on Windows 10 pro
Re: How to alphabetize slides?
What you want to do really? Please give us some more details.is it possible to alphabetize slides, I use them for a lyric monitor.
- Do you want to sort the slides?
- Or you want name the slides by letters or by words?
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
-
- Posts: 4
- Joined: Fri Apr 20, 2018 9:41 pm
Re: How to alphabetize slides?
Hi Zizi,
thank you for responding, yes, I would like to sort each individual slide. Each slide contains lyrics to one song and the title is at the top of the page. Is there a way to alphabetize each single slide?
thank you for responding, yes, I would like to sort each individual slide. Each slide contains lyrics to one song and the title is at the top of the page. Is there a way to alphabetize each single slide?
OpenOffice 4.1.5 on Windows 10 pro
Re: How to alphabetize slides?
Maybe you can operate with some macros, but - I think - it is not an Impress related task.Hi Zizi,
thank you for responding, yes, I would like to sort each individual slide. Each slide contains lyrics to one song and the title is at the top of the page. Is there a way to alphabetize each single slide?
Are the titles individual label objects in the slides (or they are parts only of the full text)? Can you upload an ODF type sample file hare?
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
-
- Posts: 4
- Joined: Fri Apr 20, 2018 9:41 pm
Re: How to alphabetize slides?
here is a test file...
- Attachments
-
- mastersongfile.odp
- (20.55 KiB) Downloaded 226 times
OpenOffice 4.1.5 on Windows 10 pro
Re: How to alphabetize slides?
I can see only one object on each sheet. There is not separated Title object and Text object on the slides. And the those different structures in the Titles...:I would like to sort each individual slide. Each slide contains lyrics to one song and the title is at the top of the page. Is there a way to alphabetize each single slide?
- Number - Letter
- Number - Space - Letter
It will be too difficult to alphabetize (to sort) the slides based on their contents...
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
-
- Posts: 4
- Joined: Fri Apr 20, 2018 9:41 pm
Re: How to alphabetize slides?
Is this better? two separate text boxes for title and lyrics.
- Attachments
-
- test.odp
- (19.84 KiB) Downloaded 231 times
OpenOffice 4.1.5 on Windows 10 pro
Re: How to alphabetize slides?
Yes, it is better.
Now you can get the text of the title shapes by your macro. You can find them the by the Name of theirs Style: 'title'. (The style name of the other shapes are 'subtitle'.) Then you can get the String of the shape.
But this is the first step only. You must continue the thinking about the sorting of the title strings, and about the re-sorting of the related Slides.
Here is a sample file with a macro subroutine: how to list all of the Titles in an Impress document:
Created and tested in my LibreOffice 5.4.6, and it was tested in my AOO 4.1.5 portable version.
Click on the (only one) item named 'List_Titles' of the new Menu named 'MyMacros'
the embedded macro code:
Please download, install and use one of the object inspection tools like the MRI or the XrayTool - if you want create more macros. These tools can list the properties, methods, ...etc. of the programming objects. The commands related to the Xray tool or to the simple displaying method (print) are REM-ed in my samle code by an apostrophe sign.
Now you can get the text of the title shapes by your macro. You can find them the by the Name of theirs Style: 'title'. (The style name of the other shapes are 'subtitle'.) Then you can get the String of the shape.
But this is the first step only. You must continue the thinking about the sorting of the title strings, and about the re-sorting of the related Slides.
Here is a sample file with a macro subroutine: how to list all of the Titles in an Impress document:
Created and tested in my LibreOffice 5.4.6, and it was tested in my AOO 4.1.5 portable version.
Click on the (only one) item named 'List_Titles' of the new Menu named 'MyMacros'
the embedded macro code:
Code: Select all
REM ***** BASIC *****
Option explicit
Sub List_Titles
Dim oDoc As Object
Dim oSlides As object
Dim oSlide as object
Dim oShape as Object
Dim oShapeStyle
Dim iSlideCount as Integer
Dim iSlideNumber as integer
Dim iShapeCount
Dim iShapeNumber
Dim sTitleList as string
'loadxray
oDoc = ThisComponent
'xray oDoc
oSlides = oDoc.getDrawPages
iSlideCount = oSlides.count
for iSlideNumber = 0 to iSlideCount-1
oSlide = oSlides.getbyindex(iSlideNumber)
'xray oSlide
For iShapeNumber = 0 to iShapeCount-1
oShape = oSlide.getByIndex(iShapeNumber)
'Xray oShape
oShapeStyle = oShape.Style
'print oShapeStyle.name
If oShapeStyle.name = "title" then
sTitleList = sTitleList + oShape.String + Chr(13)
'print oShape.String
end if
next iShapeNumber
next iSlideNumber
MsgBox(sTitleList, 0, "List of the Titles:")
End Sub
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: How to alphabetize slides?
Here are some macro code examples 'how to reorder the slides':
viewtopic.php?t=57451&p=253373
viewtopic.php?f=20&t=68461
viewtopic.php?f=10&t=29632
https://forum.openoffice.org/es/forum/v ... =26&t=6062
viewtopic.php?t=57451&p=253373
viewtopic.php?f=20&t=68461
viewtopic.php?f=10&t=29632
https://forum.openoffice.org/es/forum/v ... =26&t=6062
Last edited by Zizi64 on Sat Apr 28, 2018 3:04 pm, edited 3 times in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: How to alphabetize slides?
Here is a sample code, how to aplhabetize some strings (the Titles in your case):
https://wiki.openoffice.org/wiki/Sorting_and_searching
https://wiki.openoffice.org/wiki/Sorting_and_searching
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: How to alphabetize slides?
There is a great feature in the Impress: You can set a User defined order of the slides the a custom slideshow. And you can control this feature by macros. It will not sort the slides in the file, it will create a sorted custom playlist only.
Here is an example. Just click on the user defined menu named 'MyMacros' and click on the only one item named 'Create_Sorted_SlideShow'. The macro will create a Custom slideshow based on the alphabetic order of the Titles:
The macro code (it was created based on the examples of the lenked topics above, and based on KovLev's combined sort routine:
Here is an example. Just click on the user defined menu named 'MyMacros' and click on the only one item named 'Create_Sorted_SlideShow'. The macro will create a Custom slideshow based on the alphabetic order of the Titles:
The macro code (it was created based on the examples of the lenked topics above, and based on KovLev's combined sort routine:
Code: Select all
REM ***** BASIC *****
Option explicit
Sub Create_Sorted_SlideShow
Dim oDoc as object
Dim oDrawPages as object
Dim oCustPresentations as object
Dim oMyCustPres as object
Dim oPresentation as object
Dim oNewPresentation as object
Dim oActualSlide as object
Dim iSlideCount as integer
Dim iCount as integer
Dim i as integer
'loadxray
oDoc = ThisComponent
oDrawPages = oDoc.getDrawPages
iSlideCount = oDrawPages.Count
Dim vTitleList(iSlideCount-1) as String
Dim vSortedTitleIndex(iSlideCount-1) as Integer
For i = 0 to iSlideCount-1
vSortedTitleIndex(i) = i
next i
vTitleList = Get_Slide_Titles(oDoc)
SortStringArray(vTitleList, vSortedTitleIndex)
oCustPresentations = oDoc.getCustomPresentations()
If oCustPresentations.hasByname("SortedSlides") Then
oMyCustPres = oCustPresentations.getByName("SortedSlides")
iCount = oMyCustPres.Count
If iCount > 0 then
For i = 0 to iCount-1
oMyCustPres.removeByIndex(0)
next i
End if
Else
oNewPresentation = oCustPresentations.createInstance() '"com.sun.star.presentation.CustomPresentation")
oCustPresentations.insertByName("SortedSlides", oNewPresentation)
oMyCustPres = oCustPresentations.getByName("SortedSlides")
end if
iCount = oMyCustPres.Count
If iCount > 0 then
For i = 0 to iCount -1
oMyCustPres.removeByIndex(0)
next i
end if
For i = 0 to iSlideCount-1
oActualSlide = oDrawPages.getByIndex(vSortedTitleIndex(i))
oMyCustPres.insertByIndex(i, oActualSlide)
next i
oPresentation = oDoc.Presentation
oPresentation.CustomShow = "SortedSlides"
oPresentation.Start()
end sub
'________________________________________________________________
Function Get_Slide_Titles(Optional oPassedDoc as object) as Variant
Dim oDoc As Object
Dim oSlides As object
Dim oSlide as object
Dim oShape as Object
Dim oShapeStyle
Dim iSlideCount as Integer
Dim iSlideNumber as integer
Dim iShapeCount
Dim iShapeNumber
If isMissing(oPassedDoc) then
oDoc = ThisComponent
else
oDoc = oPassedDoc
end if
oSlides = oDoc.getDrawPages
iSlideCount = oSlides.count
Dim TheResultArray(iSlideCount-1) as String
for iSlideNumber = 0 to iSlideCount-1
oSlide = oSlides.getbyindex(iSlideNumber)
for iShapeNumber = 0 to iShapeCount-1
oShape = oSlide.getByIndex(iShapeNumber)
oShapeStyle = oShape.Style
If oShapeStyle.name = "title" then
TheResultArray(iSlideNumber) = oShape.String
end if
next iShapeNumber
next iSlideNumber
Get_Slide_Titles = TheResultArray
End function
'________________________________________________________________
sub SortStringArray(myArray as variant, myIntArray as variant)
dim h as integer
dim i as integer
dim j as integer
dim t as string
dim iUb as integer
dim iLb as integer
iLb = lBound(myArray)
iUb = uBound(myArray)
for i = iUb to iLb step -1
for j = 0 to i - 1 step 1
if strComp(myArray(i), myArray(j), 0) < 1 then
t = myArray(i)
h = myIntArray(i)
myArray(i) = myArray(j)
myIntArray(i) = myIntArray(j)
myArray(j) = t
myIntArray(j) = h
end if
next j
next i
end sub
'________________________________________________________________
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.