Call "Cell style" dialogbox

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
User avatar
Mr.Dandy
Posts: 427
Joined: Tue Dec 11, 2012 4:22 pm

Call "Cell style" dialogbox

Post by Mr.Dandy »

Hello,
Capture-1.png
Is it possible to call this dialogbox by macro?
OpenOffice 4.1.12 - Windows 10
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Call "Cell style" dialogbox

Post by RoryOF »

I think only as individual items in com.sun.star.style.CharacterProperties , ...ParagraphProperties and ...CellProperties
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Call "Cell style" dialogbox

Post by RoryOF »

https://www.openoffice.org/api/docs/com ... Style.html

Search for "OpenOffice API cellstyle".
You'll have to select what is relevant to you.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
B Marcelly
Volunteer
Posts: 1160
Joined: Mon Oct 08, 2007 1:26 am
Location: France, Paris area

Re: Call "Cell style" dialogbox

Post by B Marcelly »

Hi,
You can open the Styles and Formatting dialog with the dispatcher:

Code: Select all

dim document as object, dispatcher as object

document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dispatcher.executeDispatch(document, ".uno:StyleNewByExample", "", 0, Array())
The highlighted style is the style of the current cell.
Bernard

OpenOffice.org 1.1.5 / Apache OpenOffice 4.1.1 / LibreOffice 5.0.5
MS-Windows 7 Home SP1
User avatar
Mr.Dandy
Posts: 427
Joined: Tue Dec 11, 2012 4:22 pm

Re: Call "Cell style" dialogbox

Post by Mr.Dandy »

B Marcelly wrote:You can open the Styles and Formatting dialog with the dispatcher:
Second best solution
I wanted to avoid having to build my own dialog

Thanks
OpenOffice 4.1.12 - Windows 10
Post Reply