Files
help/source/text/sbasic/shared/01040000.xhp
Gabor Kelemen 1ae135d756 Mass remove excess spaces from inside tags
This is fallout from the l10n and oldref attribute removal.
Some tags were broken into two rows and the second was
indented with spaces.
The line break was removed along the tags, but those
spaces were not.
Command I used to catch these:

find source/text/ -name "*xhp" | xargs sed -i -e 's#\"  *>#\">#g'

Change-Id: I6f9bad46cbfb7416950bee8230e358a3dd851def
Reviewed-on: https://gerrit.libreoffice.org/37791
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-05-30 09:37:17 +02:00

227 lines
12 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<helpdocument version="1.0">
<!--
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<meta>
<topic id="textsbasicshared01040000xml" indexer="include" status="PUBLISH">
<title xml-lang="en-US" id="tit">Event-Driven Macros</title>
<filename>/text/sbasic/shared/01040000.xhp</filename>
</topic>
</meta>
<body>
<section id="weitere">
<bookmark xml-lang="en-US" branch="index" id="bm_id3154581"><bookmark_value>deleting; macro assignments to events</bookmark_value>
<bookmark_value>macros; assigning to events</bookmark_value>
<bookmark_value>assigning macros to events</bookmark_value>
<bookmark_value>events; assigning macros</bookmark_value>
</bookmark>
<paragraph xml-lang="en-US" id="hd_id3147348" role="heading" level="1"><link href="text/sbasic/shared/01040000.xhp" name="Event-Driven Macros">Event-Driven Macros</link></paragraph>
<paragraph xml-lang="en-US" id="par_id3146120" role="paragraph">This section describes how to assign Basic programs to program events.</paragraph>
</section>
<paragraph xml-lang="en-US" id="par_id3149263" role="paragraph">You can automatically execute a macro when a specified software event occurs by assigning the desired macro to the event. The following table provides an overview of program events and at what point an assigned macro is executed.</paragraph>
<table id="tbl_id3148646">
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3148455" role="tablehead">Event</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3145799" role="tablehead">An assigned macro is executed...</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3149379" role="tablecontent">Program Start</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3150715" role="tablecontent">... after a $[officename] application is started.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3146914" role="tablecontent">Program End</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3153765" role="tablecontent">...before a $[officename] application is terminated.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3145150" role="tablecontent">Create Document</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3163808" role="tablecontent">...after a new document is created with <emph>File - New</emph> or with the <emph>New</emph> icon.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3145790" role="tablecontent">Open Document</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3154572" role="tablecontent">...after a document is opened with <emph>File - Open</emph> or with the <emph>Open</emph> icon.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3153266" role="tablecontent">Save Document As</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3150208" role="tablecontent">...before a document is saved under a specified name (with <emph>File - Save As</emph>, or with <emph>File - Save</emph> or the <emph>Save</emph> icon, if a document name has not yet been specified).</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3158215" role="tablecontent">Document has been saved as</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3150980" role="tablecontent">... after a document was saved under a specified name (with <emph>File - Save As</emph>, or with <emph>File - Save</emph> or with the <emph>Save</emph> icon, if a document name has not yet been specified).</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3150519" role="tablecontent">Save Document</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3155529" role="tablecontent">...before a document is saved with <emph>File - Save</emph> or the <emph>Save</emph> icon, provided that a document name has already been specified.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3149404" role="tablecontent">Document has been saved</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3151332" role="tablecontent">...after a document is saved with <emph>File - Save</emph> or the <emph>Save</emph> icon, provided that a document name has already been specified.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3159171" role="tablecontent">Document is closing<comment>i104852</comment></paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3146868" role="tablecontent">...before a document is closed.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3159097" role="tablecontent">Document closed</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3148606" role="tablecontent">...after a document was closed. Note that the "Save Document" event may also occur when the document is saved before closing.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3144772" role="tablecontent">Activate Document</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3149442" role="tablecontent">...after a document is brought to the foreground.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3150888" role="tablecontent">Deactivate Document</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3154060" role="tablecontent">...after another document is brought to the foreground.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3152384" role="tablecontent">Print Document</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3152873" role="tablecontent">...after the <emph>Print</emph> dialog is closed, but before the actual print process begins.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3159227" role="tablecontent">JavaScript run-time error</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3145362" role="tablecontent">...when a JavaScript run-time error occurs.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3154767" role="tablecontent">Print Mail Merge</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3153555" role="tablecontent">...after the <emph>Print</emph> dialog is closed, but before the actual print process begins. This event occurs for each copy printed.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3156366" role="tablecontent">Change of the page count</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3154627" role="tablecontent">...when the page count changes.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3154737" role="tablecontent">Message received</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id3150952" role="tablecontent">...if a message was received.</paragraph>
</tablecell>
</tablerow>
</table>
<paragraph xml-lang="en-US" id="hd_id3153299" role="heading" level="2">Assigning a Macro to an Event</paragraph>
<list type="ordered">
<listitem>
<paragraph xml-lang="en-US" id="par_id3147244" role="listitem">Choose <emph>Tools - Customize</emph> and click the <emph>Events</emph> tab.</paragraph>
</listitem>
<listitem>
<paragraph xml-lang="en-US" id="par_id3146098" role="listitem">Select whether you want the assignment to be globally valid or just valid in the current document in the <emph>Save In</emph> listbox.</paragraph>
</listitem>
<listitem>
<paragraph xml-lang="en-US" id="par_id3150431" role="listitem">Select the event from the <emph>Event</emph> list.</paragraph>
</listitem>
<listitem>
<paragraph xml-lang="en-US" id="par_id3148742" role="listitem">Click <emph>Macro</emph> and select the macro to be assigned to the selected event.</paragraph>
</listitem>
<listitem>
<paragraph xml-lang="en-US" id="par_id3146321" role="listitem">Click <emph>OK</emph> to assign the macro.</paragraph>
</listitem>
<listitem>
<paragraph xml-lang="en-US" id="par_id3147414" role="listitem">Click <emph>OK</emph> to close the dialog.</paragraph>
</listitem>
</list>
<paragraph xml-lang="en-US" id="hd_id3154581" role="heading" level="2">Removing the Assignment of a Macro to an Event</paragraph>
<list type="ordered">
<listitem>
<paragraph xml-lang="en-US" id="par_id3146883" role="listitem">Choose <emph>Tools - Customize</emph> and click the <emph>Events</emph> tab.</paragraph>
</listitem>
<listitem>
<paragraph xml-lang="en-US" id="par_id3155909" role="listitem">Select whether you want to remove a global assignment or an assignment that is just valid in the current document by selecting the option in the <emph>Save In</emph> listbox.</paragraph>
</listitem>
<listitem>
<paragraph xml-lang="en-US" id="par_id3159129" role="listitem">Select the event that contains the assignment to be removed from the <emph>Event</emph> list.</paragraph>
</listitem>
<listitem>
<paragraph xml-lang="en-US" id="par_id3149143" role="listitem">Click <emph>Remove</emph>.</paragraph>
</listitem>
<listitem>
<paragraph xml-lang="en-US" id="par_id3149351" role="listitem">Click <emph>OK</emph> to close the dialog.</paragraph>
</listitem>
</list>
</body>
</helpdocument>