summaryrefslogtreecommitdiff
path: root/sfx2/source/control/macro.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/control/macro.cxx')
-rw-r--r--sfx2/source/control/macro.cxx421
1 files changed, 153 insertions, 268 deletions
diff --git a/sfx2/source/control/macro.cxx b/sfx2/source/control/macro.cxx
index da904d4a20..03efe61eae 100644
--- a/sfx2/source/control/macro.cxx
+++ b/sfx2/source/control/macro.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,181 +46,91 @@ SV_IMPL_PTRARR( SfxStatements_Impl, SfxMacroStatement* );
struct SfxMacro_Impl
-/* [Beschreibung]
+/* [Description]
- Implementations-Struktur der Klasse <SfxMacro>.
+ Implementation structure for the <SfxMacro> class.
*/
{
- SfxMacroMode eMode; /* Zweck der <SfxMacro>-Instanz,
- Bedeutung siehe enum <SfxMacroMode> */
- SfxStatements_Impl aList; /* Liste von aufgezeichneten Statements */
+ SfxMacroMode eMode; /* purpose of the <SfxMacro> instance,
+ for meaning see enum <SfxMacroMode> */
+ SfxStatements_Impl aList; /* List of recorded Statements */
};
//====================================================================
SfxMacroStatement::SfxMacroStatement
(
- const SfxShell& /*rShell*/, // <SfxShell>, die den Request ausf"uhrte
- const String& /*rTarget*/, // Name des Zielobjektes vor der Ausf"urhung
- BOOL /*bAbsolute*/, // obsolet
- const SfxSlot& rSlot, // der <SfxSlot>, der das Statement abspielen kann
- BOOL bRequestDone, // wurde der Request tats"achlich ausgef"uhrt
+ const SfxShell& /*rShell*/, // <SfxShell> which excexutes the Request
+ const String& /*rTarget*/, // Name of the target object for the
+ // excecution
+ BOOL /*bAbsolute*/, // obsolete
+ const SfxSlot& rSlot, // the <SfxSlot>, which can read the
+ // statement
+ BOOL bRequestDone, // Was the Request really excecuted
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& rArgs
)
-/* [Beschreibung]
+/* [Description]
Dieser Konstruktor der Klasse SfxMacroStatement erzeugt ein Statement,
bei dem ein Objekt angesprochen wird, welches durch 'rShell' angegeben
ist. Dabei erfolgt die Addressierung je nach 'bAbsolute' absolut,
also z.B. als '[mydoc.sdc]' oder relativ, also z.B. 'ActiveDocument'.
- Je nach Art der Subklasse von 'rShell' ergeben sich folgende
- Ausdr"ucke:
+ This constructor of the SfxMacroStatement class generate a statement in
+ which an object is brought up, which is given by 'rShell'. Thus It is
+ addressing the ever after 'bAbsolute' absolute, for example, as '[mydoc.sdc]', or relative, that is 'active document'.
- | absolut relativ
+ Depending on the subclass of 'rShell', the following terms:
+
+ | absolute relative
-----------------------------------------------------------------------
- SfxApplication' | 'StarCalc' 'Application'
+ SfxApplication' | 'StarCalc' 'Application'
SfxViewFrame' | '[mydoc.sdc:1]' 'ActiveWindow'
SfxViewShell' | '[mydoc.sdc:1]' 'AvtiveWindow'
SfxObjectShell' | '[mydoc.sdc]' 'ActiveDocument'
- sonstige (Sub-Shells) | '[mydoc.sdc:1]' 'ActiveWindow'
+ sonstige (Sub-Shells) | '[mydoc.sdc:1]' 'ActiveWindow'
Dabei sind 'StarCalc' stellvertretend fuer den Namen der Applikation
- (Application::GetAppName()const). In der absoluten Fassung k"onnte
+ (Application::GetAppName()const). In der absoluten Fassung könnte
die Selektion auch deskriptiv z.B. als 'CellSelection("A5-D8")')
angesprochen werden, dazu mu\ jedoch vom Anwendungsprogrammierer der
Konstruktor <SfxMacroStatement::SfxMacroStatement(const String&,
const SfxSlot&,BOOL,SfxArguments*)> verwendet werden.
- F"ur das so bezeichnete Objekt wird dann je nach Typ des Slots
- eine Zuweisung an eines seiner Properties oder der Aufruf einer seiner
- Methoden ausgedr"uckt.
-
+ For the so-called object is then, depending on the type of slots,
+ expressed as an assignment to one of its properties or calling its methods.
- [Beispiele]
+ [Example]
- absolut:
+ absolute:
SCalc3.OpenDocument( "\docs\mydoc.sdd", "StarDraw Presentation", 0, 0 )
[mydoc.sdd].Activate()
[mydoc.sdd:1].SwitchToView( 2 )
[mydoc.sdc:1:1].CellSelection( "A5-D8" ).LineColor = 192357
- relativ:
+ relative:
ActiveWindow.LineColor = 192357
-
- [Querverweise]
+ [Cross-reference]
<SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,BOOL,SfxArguments*)>
<SfxMacroStatement::SfxMacroStatement(const String&)>
*/
-: nSlotId( rSlot.GetSlotId() ),
+: nSlotId( rSlot.GetSlotId() ),
aArgs( rArgs ),
bDone( bRequestDone ),
pDummy( 0 )
{
- // Workaround Recording nicht exportierter Slots (#25386#)
+ // Workaround Recording non exported Slots (#25386#)
if ( !rSlot.pName )
return;
-/*
- // Objekt-Typ bestimmen
- FASTBOOL bIsApp = rShell.ISA(SfxApplication);
- FASTBOOL bIsDoc = rShell.ISA(SfxObjectShell);
- FASTBOOL bIsWin = !bIsApp && !bIsDoc &&
- ( rShell.ISA(SfxViewShell) || rShell.ISA(SfxViewFrame) );
- FASTBOOL bIsSel = !bIsApp && !bIsDoc && !bIsWin;
-
- // Objekt nicht schon im Slot-Namen enthalten?
- if ( bIsSel || rSlot.pName[0] == '.' )
- {
- // absolutes Aufzeichnen?
- if ( rSlot.IsMode( SFX_SLOT_RECORDABSOLUTE ) )
- {
- // an der Applikation oder am Modul
- if ( rShell.ISA(SfxApplication) || rShell.ISA(SfxModule) )
- aStatement = rTarget;
-
- // am Dokument?
- // '[' = 5Bh
- // ']' = 5Dh
- else if ( rShell.ISA(SfxObjectShell) )
- {
- aStatement = 0x005B;
- aStatement += rTarget;
- aStatement += 0x005D;
- }
-
- else if ( rShell.ISA(SfxViewFrame) )
- {
- aStatement = 0x005B;
- aStatement += String::CreateFromAscii("ViewFrame");//rShell.GetSbxObject()->GetName();
- aStatement += 0x005D;
- }
-
- else
- {
- // an der View oder Sub-Shell
- SfxViewShell *pViewShell = rShell.GetViewShell();
- aStatement = 0x005B;
- aStatement += String::CreateFromAscii("ViewShell");//pViewShell->GetViewFrame()->GetSbxObject()->GetName();
- aStatement += 0x005D;
- if ( !rShell.ISA(SfxViewFrame) )
- // an einer Sub-Shell zus"atlich ".Selection" anh"angen
- aStatement += DEFINE_CONST_UNICODE(".Selection");
- }
- }
- else // relatives Aufzeichnen
- {
- // an der Application?
- if ( rShell.ISA(SfxApplication) )
- aStatement = DEFINE_CONST_UNICODE("Application");
-
- // am Modul?
- else if ( rShell.ISA(SfxModule) )
- aStatement = DEFINE_CONST_UNICODE("ActiveModule");
- // am Dokument
- else if ( rShell.ISA(SfxObjectShell) )
- aStatement = DEFINE_CONST_UNICODE("ActiveDocument");
-
- // am Window
- else if ( rShell.ISA(SfxViewShell) || rShell.ISA(SfxViewFrame) )
- aStatement = DEFINE_CONST_UNICODE("ActiveWindow");
-
- else
- // an einer Sub-Shell
- aStatement = DEFINE_CONST_UNICODE("Selection");
- }
- }
-
- if ( bIsSel )
- {
- // bei Selection ggf. noch den Namen der SubShell anh"angen
- const SfxShellObject *pShObj =
- (const SfxShellObject*) rShell.GetSbxObject();
- if ( pShObj )
- {
- const SfxShellObject *pParentObj =
- (const SfxShellObject*) pShObj->GetParent();
- SfxShell *pParentSh = pParentObj->GetShell();
- DBG_ASSERT( pParentSh->ISA(SfxViewFrame),
- "parent of SubShell must be a Frame" );
- if ( rSlot.pName[0] == '.' )
- {
- aStatement += '.';
- aStatement += rShell.GetSbxObject()->GetName();
- }
- }
- else
- DBG_ASSERT( rSlot.pName[0] != '0', "recording unnamed object" );
- }
-*/
aStatement = DEFINE_CONST_UNICODE("Selection");
- // an diesen Objekt-Ausdruck den Methoden-/Property-Namen und Parameter
+ // to these object expression of the Method-/Property-Name and parameters
GenerateNameAndArgs_Impl( SfxRequest::GetRecordingMacro(), rSlot, bRequestDone, aArgs);
}
@@ -227,22 +138,22 @@ SfxMacroStatement::SfxMacroStatement
SfxMacroStatement::SfxMacroStatement
(
- const String& rTarget, // Objekt, was beim Playing angesprochen wird
- const SfxSlot& rSlot, // der <SfxSlot>, der das Statement abspielen kann
- BOOL bRequestDone, // wurde der Request tats"achlich ausgef"uhrt
+ const String& rTarget, // The Object which is addressed while playing
+ const SfxSlot& rSlot, // The <SfxSlot>, which can playback the statement
+ BOOL bRequestDone, // was the Request actually performed
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& rArgs
)
-/* [Beschreibung]
+/* [Description]
- [Querverweise]
+ [Cross-reference]
<SfxMacroStatement::SfxMacroStatement(const String&)>
<SfxMacroStatement::SfxMacroStatement(const SfxShell&,BOOL,const SfxSlot&,BOOL,SfxArguments*)>
*/
-: nSlotId( rSlot.GetSlotId() ),
+: nSlotId( rSlot.GetSlotId() ),
aArgs( rArgs ),
bDone( bRequestDone ),
pDummy( 0 )
@@ -256,25 +167,24 @@ SfxMacroStatement::SfxMacroStatement
SfxMacroStatement::SfxMacroStatement
(
- const String& rStatement // manuell erzeugte(s) Statement(s)
+ const String& rStatement // manually generated statement(s)
)
-/* [Beschreibung]
-
- Dieser Konstruktor erzeugt eine SfxMacroStatement-Instanz, deren
- Aufbau vollst"andig vom Applikationsentwickler bestimmt wird. Da der
- angegebene String auch mehrere mit CR/LF getrennte Statements
- enthalten darf, ist damit ein weitgehender Eingriff in das Aufzeichnen
- von BASIC-Makros m"oglich, um Spezialf"alle zu behandeln.
+/* [Description]
+ This constructor creates a SfxMacroStatement instance, its structure is
+ determined completely by the application developer. Because the specified
+ string may contain several statements separated with CR/LF, which enables
+ a extensive in the recording of BASIC-macros, in order to handle special
+ cases.
- [Querverweise]
+ [Cross-reference]
<SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,BOOL,SfxArguments*)>
<SfxMacroStatement::SfxMacroStatement(const SfxShell&,BOOL,const SfxSlot&,BOOL,SfxArguments*)>
*/
-: nSlotId( 0 ),
+: nSlotId( 0 ),
aStatement( rStatement ),
bDone( TRUE ),
pDummy( 0 )
@@ -285,15 +195,15 @@ SfxMacroStatement::SfxMacroStatement
SfxMacroStatement::SfxMacroStatement
(
- const SfxMacroStatement& rOrig // Original, von dem kopiert wird
+ const SfxMacroStatement& rOrig // Original, from which it will be copied
)
-/* [Beschreibung]
+/* [Description]
- Copy-Konstruktor der SfxMacroStatement-Klasse.
+ Copy constructor of the sSfxMacroStatement class.
*/
-: nSlotId( rOrig.nSlotId ),
+: nSlotId( rOrig.nSlotId ),
aStatement( rOrig.aStatement ),
bDone( rOrig.bDone ),
pDummy( 0 )
@@ -305,10 +215,10 @@ SfxMacroStatement::SfxMacroStatement
SfxMacroStatement::~SfxMacroStatement()
-/* [Beschreibung]
+/* [Description]
- Destruktor der Klasse SfxMacroStatement. Gibt die Liste der
- aktuellen Parameter frei.
+ Destructor of the SfxMacroStatement class. Frees the list of the
+ current parameters.
*/
{
@@ -318,18 +228,17 @@ SfxMacroStatement::~SfxMacroStatement()
void SfxMacroStatement::GenerateNameAndArgs_Impl
(
- SfxMacro* /*pMacro*/, // darin wird aufgezeichnet
- const SfxSlot& rSlot, // der Slot, der das Statement abspielen kann
- BOOL bRequestDone, // TRUE=wurde ausgef"uhrt, FALSE=abgebrochen
+ SfxMacro* /*pMacro*/, // in this is recorded
+ const SfxSlot& rSlot, // the slot, which can playback the statement
+ BOOL bRequestDone, // TRUE=was executed, FALSE=cancelled
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& /*rArgs*/
)
-/* [Beschreibung]
+/* [Description]
- Interne Hilfsmethode zum generieren des Funktions-/Property-Names
- sowie der Parameter. Diese Methode wird nur verwendet, wenn der
- Anwendungsprogrammierer keinen eigenen Source an den <SfxRequest>
- geh"angt hat.
+ Internal utility method for generating the functions-/property-names as
+ well as the parameter. This method is only used if the application
+ programmer has not attached his own source to the <SfxRequest>.
*/
{
@@ -337,18 +246,18 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
&& rSlot.pName[0] != '.' )
aStatement += '.';
- // der Name des Slots ist der Name der Methode / des Properties
+ // The name of the slots is the name of the method or properties
aStatement += String::CreateFromAscii(rSlot.pName);
if ( rSlot.IsMode(SFX_SLOT_METHOD) )
aStatement += DEFINE_CONST_UNICODE("( ");
else
aStatement += DEFINE_CONST_UNICODE(" = ");
- // alle zusammengesuchten Parameter rausschreiben
+ // Print all required Parameters
if ( aArgs.getLength() )
for ( USHORT nArg = 0; nArg < aArgs.getLength(); ++nArg )
{
- // den Parameter textuell darstellen
+ // represent the parameters textually
String aArg;
::com::sun::star::uno::Any& rValue = aArgs[nArg].Value;
::com::sun::star::uno::Type pType = rValue.getValueType();
@@ -375,23 +284,23 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
::rtl::OUString sTemp;
rValue >>= sTemp;
- // Anf"uhrungszeichen werden verdoppelt
+ // Quotation marks are doubled
XubString aRecordable( sTemp );
USHORT nPos = 0;
while ( TRUE )
{
- nPos = aRecordable.SearchAndReplace( DEFINE_CONST_UNICODE('"'), DEFINE_CONST_UNICODE("\"\""), nPos );
+ nPos = aRecordable.SearchAndReplace( String('"'), DEFINE_CONST_UNICODE("\"\""), nPos );
if ( STRING_NOTFOUND == nPos )
break;
nPos += 2;
}
- // nicht druckbare Zeichen werden als chr$(...) geschrieben
- FASTBOOL bPrevReplaced = FALSE;
+ // non-printable characters are written as chr $(...)
+ bool bPrevReplaced = false;
for ( USHORT n = 0; n < aRecordable.Len(); ++n )
{
sal_Unicode cChar = aRecordable.GetChar(n);
- if ( !( cChar>=32 && cChar!=127 ) ) // ALS ERSATZ FUER String::IsPrintable()!
+ if ( !( cChar>=32 && cChar!=127 ) ) // As replacement for String::IsPrintable()!
{
XubString aReplacement( DEFINE_CONST_UNICODE("+chr$(") );
aReplacement += cChar;
@@ -411,24 +320,16 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
aRecordable.Insert( aReplacement, n + 1 );
n = n + aReplacement.Len();
}
- bPrevReplaced = TRUE;
+ bPrevReplaced = true;
}
else
- bPrevReplaced = FALSE;
+ bPrevReplaced = false;
- // Argument in Anf"uhrungszeichen
+ // Argument in quotation marks
aArg = '"';
aArg += aRecordable;
aArg += '"';
}
-/*
- case SbxBYTE:
- {
- // als Zahl darstellen
- aArg = (USHORT) rVar.GetByte();
- break;
- }
-*/
}
else
{
@@ -436,12 +337,12 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
pType == ::getVoidCppuType(), "Unknown Type in recorder!" );
}
- // den Parameter anh"angen
+ // Attach the parameter
aStatement += aArg;
aStatement += DEFINE_CONST_UNICODE(", ");
}
- // Statement beeden
+ // End statement
if ( aArgs.getLength() )
aStatement.Erase( aStatement.Len() - 2, 1 );
else
@@ -450,7 +351,7 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
aStatement += ')';
if ( !bRequestDone )
- // nicht als "Done()" gekennzeichnete Statements auskommentieren
+ // not comment out the "Done ()" marked statements
aStatement.InsertAscii( "rem ", 0 );
}
@@ -458,29 +359,28 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
SfxMacro::SfxMacro
(
- SfxMacroMode eMode // Zweck der Instanz, siehe <SfxMacroMode>
+ SfxMacroMode eMode // Purpose of the instance, see <SfxMacroMode>
)
-/* [Beschreibung]
+/* [Description]
- Konstruktor der Klasse SfxMacro. Instanzen dieser Klasse werden im
- SFx zu zwei Zwecken ben"otigt:
+ Constructor of the SfxMacro class. Instances of this class are required
+ for two purposes in SFx:
- 1. zum Aufzeichnen von Makros
- In diesem Fall wird der Konstruktor mit SFX_MACRO_RECORDINGABSOLUTE
- oder SFX_MACRO_RECORDINGRELATIVE aufgerufen. Es sollte sich um eine
- Instanz einer abgeleiteten Klasse handeln, um in der Ableitung
- die Information dar"uber unterzubringen, wo das Makro gespeichert
- werden soll. Ein solches Makro solle sich dann in seinem Destruktor
- an der vom Benutzer gew"ahlten Stelle speichern.
+ 1. for recording macros
+ In this cas is th constructor called with SFX_MACRO_RECORDINGABSOLUTE or
+ SFX_MACRO_RECORDINGRELATIVE. Should be an instance of a derived class,
+ in order to acommodate the derivation of information, where the macro
+ should be saved. Such a macro should, in its destructor, be saved at the
+ location specified by the user.
- 2. zum Zuordnen von exisitierenden Makros
- In diesem Fall wird der Konstruktor mit SFX_MACRO_EXISTING aufgerufen.
- Eine solche Instanz wird z.B. ben"otigt, wenn Makros auf Events
- oder <SfxControllerItem>s konfiguriert werden sollen.
+ 2. Assignment of exisiting macros
+ In this case the constructor is called with SFX_MACRO_EXISTING.
+ Such a instance is for example needed when macros are to be configured for
+ events or <SfxControllerItem>s.
*/
-: pImp( new SfxMacro_Impl )
+: pImp( new SfxMacro_Impl )
{
pImp->eMode = eMode;
@@ -490,15 +390,13 @@ SfxMacro::SfxMacro
SfxMacro::~SfxMacro()
-/* [Beschreibung]
-
- Virtueller Destruktor der Klasse SfxMacro. Dieser sollte in den
- abgeleiteten Klassen "uberladen werden, um in den Modi
- SFX_MACRO_RECORDINGABSOLUTE und SFX_MACRO_RECORDINGRELATIVE den
- aufgezeichneten Source abzuspeichern.
+/* [Description]
+ Virtual Destructor of the SfxMacro class. This should be overloaded in
+ the derived classes to save the recorded source in the mode
+ SFX_MACRO_RECORDINGABSOLUTE and SFX_MACRO_RECORDINGRELATIVE.
- [Querverweise]
+ [Cross-reference]
<SfxMacro::GenerateSource()const>
*/
@@ -515,13 +413,12 @@ SfxMacro::~SfxMacro()
SfxMacroMode SfxMacro::GetMode() const
-/* [Beschreibung]
-
- Liefert den Modus, der besagt zu welchem Zweck das SfxMacro konstruiert
- wurde.
+/* [Description]
+ Returns the mode, which indicates for what purpose this SfxMacro was
+ constructed.
- [Querverweise]
+ [Cross-reference]
enum <SfxMacroMode>
*/
@@ -534,21 +431,20 @@ SfxMacroMode SfxMacro::GetMode() const
void SfxMacro::Record
(
- SfxMacroStatement* pStatement // aufzuzeichnendes <SfxMacroStatement>
+ SfxMacroStatement* pStatement // the recordning <SfxMacroStatement>
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode zeichnet das als Parameter "ubergeben Statement auf.
- Die Instanz auf die der "ubergebe Pointer zeigt, geht in das Eigentum
- des SfxMacro "uber.
+ This method features the parameters passed on as a Statement. The
+ instance to which the pointer points is transfered to the ownership
+ of SfxMacro.
- Der Aufruf ist nur g"ultig, wenn es sich um ein SfxMacro handelt,
- welches mit SFX_MACRO_RECORDINGABSOLUTE oder SFX_MACRO_RECORDINGRELATIVE
- konstruiert wirde.
+ The call is only valid if it is about a SfxMacro, which was constructed
+ with SFX_MACRO_RECORDINGRELATIVE or SFX_MACRO_RECORDINGABSOLUTE and is
+ available as an already recorded statement.
-
- [Querverweise]
+ [Cross-reference]
<SfxMacro::Replace(SfxMacroStatement*)>
<SfxMacro::Remove()>
@@ -564,35 +460,30 @@ void SfxMacro::Record
void SfxMacro::Replace
(
- SfxMacroStatement* pStatement // aufzuzeichnendes <SfxMacroStatement>
+ SfxMacroStatement* pStatement // the recording <SfxMacroStatement>
)
-/* [Beschreibung]
-
- Diese Methode zeichnet das als Parameter "ubergeben Statement auf.
- Dabei wird das jeweils zuletzt aufgezeichnete Statement "uberschrieben.
- Die Instanz auf die der "ubergebe Pointer zeigt, geht in das Eigentum
- des SfxMacro "uber.
+/* [Description]
- Mit dieser Methode ist es m"oglich, Statements zusammenzufassen. Z.B.
- anstelle f"unfmal hintereinander 'CursorLeft()' aufzurufen, k"onnte
- das zu 'CursorLeft(5)' zusammengefa\st werden. Oder anstelle ein Wort
- Buchstabe f"ur Buchstabe aufzubauen, k"onnte dies durch ein einziges
- Statement 'InsertString("Hallo")' ersetzt werden.
+ This method records the statement passed on as a parameter. This will
+ overwrite the last recorded statement. The instance to which the passed
+ pointer points is transfered to the ownership of the SfxMacro.
- Der Aufruf ist nur g"ultig, wenn es sich um ein SfxMacro handelt,
- welches mit SFX_MACRO_RECORDINGABSOLUTE oder SFX_MACRO_RECORDINGRELATIVE
- konstruiert wurde und bereits ein aufgezeichnetes Statement vorhanden
- ist.
+ With this method it is possible to combine statements. For example, instead
+ of calling the 'CursorLeft()' five times could be summarized as
+ 'CursorLeft (5)'. Or rather than building a word letter by letter, this
+ could be done by a single statement 'InsertString("Hello")'.
+ The call is only valid if it is about a SfxMacro, which was constructed
+ with SFX_MACRO_RECORDINGRELATIVE or SFX_MACRO_RECORDINGABSOLUTE and is
+ available as an already recorded statement.
- [Anmerkung]
+ [Note]
- Diese Methode wird typischerweise aus den Execute-Methoden der
- <SfxSlot>s von den Applikationsentwicklern gerufen.
+ This method is typically called from the execute methods of
+ <SfxSlot>s created by the application developers.
-
- [Querverweise]
+ [Cross-reference]
<SfxMacro::Record(SfxMacroStatement*)>
<SfxMacro::Remove()>
@@ -610,30 +501,26 @@ void SfxMacro::Replace
void SfxMacro::Remove()
-/* [Beschreibung]
-
- Diese Methode l"oscht das zuletzt aufgezeichnete <SfxMacroStatement>
- und entfernt es aus dem Macro.
-
- Mit dieser Methode ist es m"oglich, Statements zusammenzufassen. Z.B.
- anstelle f"unfmal hintereinander 'CursorLeft()' aufzurufen, k"onnte
- das zu 'CursorLeft(5)' zusammengefa\st werden. Oder anstelle ein Wort
- Buchstabe f"ur Buchstabe aufzubauen, k"onnte dies durch ein einziges
- Statement 'InsertString("Hallo")' ersetzt werden.
+/* [Description]
- Der Aufruf ist nur g"ultig, wenn es sich um ein SfxMacro handelt,
- welches mit SFX_MACRO_RECORDINGABSOLUTE oder SFX_MACRO_RECORDINGRELATIVE
- konstruiert wurde und bereits ein aufgezeichnetes Statement vorhanden
- ist.
+ This method deletes the last recorded <SfxMacroStatement> and removes
+ it from the macro.
+ With this method it is possible to combine statements. For example, instead
+ of calling the 'CursorLeft()' five times could be summarized as
+ 'CursorLeft (5)'. Or rather than building a word letter by letter, this
+ could be done by a single statement 'InsertString("Hello")'.
- [Anmerkung]
+ The call is only valid if it is about a SfxMacro, which was constructed
+ with SFX_MACRO_RECORDINGRELATIVE or SFX_MACRO_RECORDINGABSOLUTE and is
+ available as an already recorded statement.
- Diese Methode wird typischerweise aus den Execute-Methoden der
- <SfxSlot>s von den Applikationsentwicklern gerufen.
+ [Note]
+ This method is typically called from the the Execute methods of <SfxSlot>s
+ by the application developer.
- [Querverweise]
+ [Cross-reference]
<SfxMacro::Replace(SfxMacroStatement*)>
<SfxMacro::Record(SfxMacroStatement*)>
@@ -650,19 +537,17 @@ void SfxMacro::Remove()
const SfxMacroStatement* SfxMacro::GetLastStatement() const
-/* [Beschreibung]
+/* [Description]
- Mit dieser Methode kann auf das jeweils zuletzt aufgezeichnete Statement
- lesend zugegriffen werden. Zusammen mit der Methode
- <SfxMacro::Replace(SfxMacroStatement*)> ergibt sich dadurch die
- M"oglichkeit, Statements zusammenzufassen.
+ This method enables read access to the last recorded statement.
+ Together with the method <SfxMacro::Replace(SfxMacroStatement*)> this opens
+ for the possibility to summarize statements.
- Der Aufruf ist nur g"ultig, wenn es sich um ein SfxMacro handelt,
- welches mit SFX_MACRO_RECORDINGABSOLUTE oder SFX_MACRO_RECORDINGRELATIVE
- konstruiert wurde.
+ The call is only valid if it is about a SfxMacro, which was constructed
+ with SFX_MACRO_RECORDINGRELATIVE or SFX_MACRO_RECORDINGABSOLUTE and is
+ available as an already recorded statement.
-
- [Querverweise]
+ [Cross-reference]
<SfxMacro::Record(SfxMacroStatement*)>
<SfxMacro::Replace(SfxMacroStatement*)>
@@ -679,15 +564,14 @@ const SfxMacroStatement* SfxMacro::GetLastStatement() const
String SfxMacro::GenerateSource() const
-/* [Beschreibung]
-
- Diese Funktion generiert aus den, seit dem Konstruieren der Instanz
- bis zum Zeitpunkt des Aufrufs dieser Methode aufgezeichneten
- <SfxMacroStatement>s einen BASIC-Sourcecode, der die Statements,
- jedoch nicht den Header ('Sub X') und den Footer ('End Sub') enth"alt.
+/* [Description]
+ This function generates BASIC source code that contains the statements, but
+ does not contain the header ('Sub X') and Footer ('End Sub') from recorded
+ <SfxMacroStatement> since the construction of the instance until the time
+ of calling this method.
- [Querverweise]
+ [Cross-reference]
<SfxMacro::Record(SfxMacroStatement*)>
<SfxMacro::Repeat(SfxMacroStatement*)>
@@ -706,3 +590,4 @@ String SfxMacro::GenerateSource() const
return aSource;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */