Tuesday May 23, 2006

We all know that Sun Support  also supports OpenOffice.org users (if they want to pay for the professional support).
But the OOo community has some more support offerings of their own. And that support is free of charge for everyone. Perhaps, if you see how well it works, you'll decide you want to pay back something to the community, let's say you give some advice to others on the mail list, but that depends on your own decision.
The following list gives only some of the entry points for OOo support.

http://documentation.openoffice.org/ is the documentation project home page with links to the mail list, documents, tutorials and more.

http://oooauthors.org/ is another site where authors of helpful documentation meet.

http://www.oooforum.org/ is a Web forum with questions and answers.

Several language projects have developed wonderful Web sites that are worth browsing if you can read the language. For example, the german project maintains the site http://de.openoffice.org/, and the french project can be found at http://fr.openoffice.org/.

Monday May 22, 2006

Since we're talking macros:

When going through a document to do the final layout  I occasionally need to adjust page breaks manually. Writer allows page breaks to be a property of a paragraph but the property is buried deep down in a dialog: Format - Paragraph - Text Flow - Breaks.

With this macro toggling a page break for the current paragraph is at the tip of your finger (after you assigned the macro to a shortcut key using Tools - Customize):

sub TogglePagebreak
Dim oVCur As Object
    On Error Goto ERRORHANDLER
   
    oSel = thiscomponent.getcurrentcontroller.getselection

    oCur = oSel(0).getText.createTextCursorByRange(oSel(0))
    ShowProp(oCur.TextTable)
      if oCur.BreakType = com.sun.star.style.BreakType.PAGE_BEFORE then
        oCur.BreakType = com.sun.star.style.BreakType.NONE
    else
        oCur.BreakType = com.sun.star.style.BreakType.PAGE_BEFORE
    end if

    Exit Sub
   
    ERRORHANDLER:
        msgbox ("Cannot change page break settings here:"+chr(13)+chr(13)+Error$,48,"D'oh!")
end sub

This macro switched a page break before on or off. Other BreakTypes are listed in the API Reference.

Are you a fast typer?

Then you probably frequently run across the problem that your left index was quicker than expected and you end up with characters in the wrong sequence. I very otfen do ;-)

Andrew Brown sent in a neat little macro that swaps letters to bring them in the correct sequence again :

Sub transpose
' acb, 2001-2003
' very heavily commented trivial macro
' which demonstrates how to get at the text under the cursor
' and do something useful with it.
Dim oDocument as Object
Dim oText as Object
Dim oVCursor, oCursor As Object
Dim sWombat as string
    'shortcut to the active document
    oDocument=thiscomponent
    ' after this, an obscure call gets the current cursor position
    oVCursor = oDocument.currentcontroller.getViewCursor()
    ' but most cursor methods don't work with a view cursor
    ' so now I create an invisible cursor under it, to do the work.
    oText = oVCursor.getText()
    ' the Pitonyak hack
    oCursor=oText.createTextCursorByRange(oVCursor.getStart())
    ' grab the next character
    oCursor.goRight(1,TRUE)
    ' and save a copy of it (no clipboard)
    sWombat = ocursor.getString()
    ' delete the original (seems to be no obvious delete method)
    oCursor.setString("")
    ' next two lines move the invisible cursor
    ' back one letter before where it started
    oCursor.CollapseToStart()
    oCursor.goLeft(1,true)
    ' and now insert the previously cut character
    oText.insertString(oCursor.getStart(),sWombat,false)
    oVCursor.GoLeft(1,false) ' finally return the visible cursor whence it came
End Sub

Now assign that macro to a shortcut key using Tools - Customize.

Happy Sawpping!


Wednesday May 17, 2006

Pedro writes about a nice little trick in Calc that I wasn't even aware of:

In Calc, one often wants to enter data quickly on several lines. Hence, once you have entered the first line, you click on the beginning of the second line and so on for each line. As, using the mouse is too exhausting for power users, here is a trick for you :

- Select a range of cells
- Press the tabulation key

Each time you press the tabulation key, you will move to the next cell and once you are at the end of a line, the selection will go back at the beginning of the selection on the following line without clicking.

Just tried it and it works great!

See here for the original.

Merci beaucoup!

Tuesday May 16, 2006

In your spreadsheet you have hidden a few rows in a cell range. Now you want to copy, delete, or format only the currently visible rows.

The Calc result depends on how the cells have been hidden, either by a filter or manually.

This is what you do

This is what you get

Case a) Some cells are hidden by applying AutoFilters, standard filters or advanced filters.

Now you copy, delete, move, or format a selection of currently visible cells.

Case a) Only the visible cells of the selection are copied, deleted, moved, or formatted.

Case b) Some cells are hidden using the Hide command
in the context menu of the row or column headers,
or by applying an outline

Again you copy, delete, move, or format a selection of currently visible cells.

Case b) All cells of the selection, including the hidden cells, are copied, deleted, moved, or formatted

With Calc in OpenOffice.org 2 or StarOffice 8, now you will not accidentally delete cells that are temporarily hidden by any filter. This is an improvement compared to OpenOffice.org 1 or StarOffice 7 and before.

Note that pasting cells is not covered by this change.

Monday May 15, 2006

Why is it so difficult for some users to print envelopes in Writer?

According to Issue Tracker and mailing lists, some users just cannot print envelopes in Writer. So why not? - Well, this is difficult to answer. For the huge majority of users it just works. No problems. No clue why it should not work for others.

a) May be a problem with the printer driver?
In ancient times, Windows printer drivers had been able to forward the information from any software package about the paper tray to use, while most UNIX printer drivers had to be set 'manually' in the printer settings to use another tray.

b) May be the user did not see that the 'Insert - Envelope' dialog has three tab pages?
Using only the first tab page, it would be indeed difficult to adjust the paper in the tray. Have a look at the screenshot from StarOffice 8 on Solaris 10 with JDS 3:

tab three of Envelope dialog


  • Enter your envelope data on the first tab page.
  • Position the addressee and sender and enter the envelope size at the second tab page.
  • Choose the correct position of the envelope in the printer tray on the third tab page. Depending on your printer driver, it may be necessary to change the landscape/portrait paper orientation in the printer driver. Click the Setup button to do so.
    You may want to experiment first using a letter or A4 piece of paper to find where it prints, then insert the envelope and print again.

By the way, whenever something doesn't seem to work for you, please give all the information that is possibly needed to help with the problem. In this case, to be able to help, other users would at least need the following information:

  • Which operating system / platform?
  • Which version of OOo or StarOffice?
  • Which brand and type of printer?
  • Which printer driver software? Did you look for an update? Is it the latest version?
  • Do you use any printer manager software?
  • What do you want to achieve, what did you do, what happened instead of the expected result?
  • If an error message, give the full message if possible.
  • Did you reboot, restart and tried again? (Often, out-of-memory problems vanish this way).

 

Friday May 12, 2006

The versions before OOo 1.x and SO7 had an annoyance that used to bug one of us to the extent that he started to write BASIC macros as a workaround: they didn't allow to switch styles using the keyboard. You had to use the mouse and select a style from the Stylist (now called Styles and Formatting) window which meant frequent disruptions of the workflow for the ones who write much and use styles a lot (which you should) - like us.

Now thanks to the wonderfully gifted and dedicated OOo developers, this nuisance is no more.

You can now assign a style to a keyboard shortcut as you can assign the execution of a macro or a dialog. By default, the styles for Heading 1 to 3 are placed on the Ctrl+1 to 3 keys but you are free to adjust this to your needs. Here's how:

  1. Select Tools - Customize from the main menu
  2. Select the Keyboard tab
  3. Select the shortcut key to assign from the list of shortcut keys
  4. Select Style from the Category list
    Scroll right down to the Styles entry and click the + sign to show the style types of OOo
  5. Select the style to assign from the Function list
  6. Click Ok

What's this Blog all about?

With this Blog we will start to post tips and tricks, background information and concepts and any useful information about OpenOffice.org and StarOffice that didn't make it into the documentation.

BTW: I am lazy and I am addicted to acronyms, so whenever you read OOo, expand that to OpenOffice.org, whenever you read SO expand that to StarOffice.

Who is "we"?

We, that's us ;-)
We're the (small but dedicated) team of technical writers working on OpenOffice.org and StarOffice documentation here at Sun Microsystems in Hamburg, Germany.

So what exactly will go in here?

Some of the information posted here will just be little tips that can ease your daily work with OOo, some may just even be links to other people's docs, and some pieces may be more or less elaborate pieces of additional information that you may find useful. It's all about the usage of OOo. If you want to develop, you'd better try here or here instead.
Well, you may find one or the other BASIC code snippet here that is useful for macro processing but don't expect anything sophisticated. We know our limits :-)

Hey, cool. Can I do anything?

Since you're asking:

  • Do you have tips and tricks for OOo  or SO to share?
  • Do you have a feature or an issue that you would like to know more about?
  • Are you an expert when it comes to OOo functionality and features and would like to share your wisdom with the rest of us?
  • Do you miss something in the existing documentation?

Let us know! You can comment on a blog entry or just write us an email.

Lets hope we'll get a valuable knowledge pool started with this blog.

This blog copyright 2009 by fpe