summaryrefslogtreecommitdiffstats
path: root/editeng/source/misc/splwrap.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'editeng/source/misc/splwrap.cxx')
-rwxr-xr-x[-rw-r--r--]editeng/source/misc/splwrap.cxx83
1 files changed, 37 insertions, 46 deletions
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index af6b029b3001..c7dec39046d7 100644..100755
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.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,7 +46,7 @@
#include <map>
#include <editeng/svxenum.hxx>
-#include <editeng/splwrap.hxx> // Der Wrapper
+#include <editeng/splwrap.hxx>
#include <editeng/edtdlg.hxx>
#include <editeng/eerdll.hxx>
#include <editeng/editrids.hrc>
@@ -87,8 +88,6 @@ void SvxPrepareAutoCorrect( String &rOldText, String &rNewText )
}
}
-// -----------------------------------------------------------------------
-
#define SVX_LANG_NEED_CHECK 0
#define SVX_LANG_OK 1
#define SVX_LANG_MISSING 2
@@ -152,7 +151,7 @@ SvxSpellWrapper::~SvxSpellWrapper()
}
/*--------------------------------------------------------------------
- * Beschreibung: Ctor, die Pruefreihenfolge wird festgelegt
+ * Description: Constructor, the test sequence is determined
*
* !bStart && !bOtherCntnt: BODY_END, BODY_START, OTHER
* !bStart && bOtherCntnt: OTHER, BODY
@@ -179,7 +178,7 @@ SvxSpellWrapper::SvxSpellWrapper( Window* pWn,
Reference< beans::XPropertySet > xProp( SvxGetLinguPropertySet() );
sal_Bool bWrapReverse = xProp.is() ?
*(sal_Bool*)xProp->getPropertyValue(
- ::rtl::OUString::createFromAscii(UPN_IS_WRAP_REVERSE) ).getValue()
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UPN_IS_WRAP_REVERSE)) ).getValue()
: sal_False;
bReverse = bRevAllow && bWrapReverse;
bStartDone = bOther || ( !bReverse && bStart );
@@ -262,15 +261,15 @@ sal_Int16 SvxSpellWrapper::CheckHyphLang(
void SvxSpellWrapper::SpellStart( SvxSpellArea /*eSpell*/ )
-{ // Hier muessen die notwendigen Vorbereitungen fuer SpellContinue
-} // im uebergebenen Bereich getroffen werden.
+{ // Here, the necessary preparations be made for SpellContinue in the
+} // given area.
// -----------------------------------------------------------------------
sal_Bool SvxSpellWrapper::HasOtherCnt()
{
- return sal_False; // Gibt es ueberhaupt einen Sonderbereich?
+ return sal_False; // Is there a special area?
}
// -----------------------------------------------------------------------
@@ -278,14 +277,14 @@ sal_Bool SvxSpellWrapper::HasOtherCnt()
sal_Bool SvxSpellWrapper::SpellMore()
{
- return sal_False; // Sollen weitere Dokumente geprueft werden?
+ return sal_False; // Should additional documents be examined?
}
// -----------------------------------------------------------------------
void SvxSpellWrapper::SpellEnd()
-{ // Bereich ist abgeschlossen, ggf. Aufraeumen
+{ // Area is complete, tidy up if necessary
// display error for last language not found
ShowLanguageErrors();
@@ -309,14 +308,14 @@ void SvxSpellWrapper::AutoCorrect( const String&, const String& )
void SvxSpellWrapper::ScrollArea()
-{ // Scrollarea einstellen
+{ // Set Scroll area
}
// -----------------------------------------------------------------------
void SvxSpellWrapper::ChangeWord( const String&, const sal_uInt16 )
-{ // Wort ersetzen
+{ // Insert Word
}
// -----------------------------------------------------------------------
@@ -324,7 +323,7 @@ void SvxSpellWrapper::ChangeWord( const String&, const sal_uInt16 )
String SvxSpellWrapper::GetThesWord()
{
- // Welches Wort soll nachgeschlagen werden?
+ // What word should be looked up?
return String();
}
@@ -333,7 +332,7 @@ String SvxSpellWrapper::GetThesWord()
void SvxSpellWrapper::ChangeThesWord( const String& )
{
- // Wort wg. Thesaurus ersetzen
+ // replace word due to Thesaurus.
}
// -----------------------------------------------------------------------
@@ -361,25 +360,25 @@ void SvxSpellWrapper::StartThesaurus( const String &rWord, sal_uInt16 nLanguage
// -----------------------------------------------------------------------
void SvxSpellWrapper::ReplaceAll( const String &, sal_Int16 )
-{ // Wort aus der Replace-Liste ersetzen
+{ // Replace Word from the the Replace list
}
// -----------------------------------------------------------------------
void SvxSpellWrapper::SetLanguage( const sal_uInt16 )
-{ // Sprache aendern
+{ // Set Language
}
// -----------------------------------------------------------------------
void SvxSpellWrapper::InsertHyphen( const sal_uInt16 )
-{ // Hyphen einfuegen bzw. loeschen
+{ // inserting and deleting Hyphae
}
// -----------------------------------------------------------------------
-// Pruefung der Dokumentbereiche in der durch die Flags angegebenen Reihenfolge
+// Testing of the document areas in the order specified by the flags
void SvxSpellWrapper::SpellDocument( )
@@ -419,7 +418,7 @@ void SvxSpellWrapper::SpellDocument( )
}
// -----------------------------------------------------------------------
-// Naechsten Bereich auswaehlen
+// Select the next area
sal_Bool SvxSpellWrapper::SpellNext( )
@@ -427,30 +426,31 @@ sal_Bool SvxSpellWrapper::SpellNext( )
Reference< beans::XPropertySet > xProp( SvxGetLinguPropertySet() );
sal_Bool bWrapReverse = xProp.is() ?
*(sal_Bool*)xProp->getPropertyValue(
- ::rtl::OUString::createFromAscii(UPN_IS_WRAP_REVERSE) ).getValue()
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UPN_IS_WRAP_REVERSE)) ).getValue()
: sal_False;
sal_Bool bActRev = bRevAllowed && bWrapReverse;
- // bActRev ist die Richtung nach dem Spellen, bReverse die am Anfang.
+ // bActRev is the direction after Spell checking, bReverse is the one
+ // at the beginning.
if( bActRev == bReverse )
- { // Keine Richtungsaenderung, also ist
- if( bStartChk ) // der gewuenschte Bereich ( bStartChk )
- bStartDone = sal_True; // vollstaendig abgearbeitet.
+ { // No change of direction, thus is the
+ if( bStartChk ) // desired area ( bStartChk )
+ bStartDone = sal_True; // completely processed.
else
bEndDone = sal_True;
}
- else if( bReverse == bStartChk ) // Bei einer Richtungsaenderung kann
- { // u.U. auch ein Bereich abgearbeitet sein.
- if( bStartChk ) // Sollte der vordere Teil rueckwaerts gespellt
- bEndDone = sal_True; // werden und wir kehren unterwegs um, so ist
- else // der hintere Teil abgearbeitet (und umgekehrt).
+ else if( bReverse == bStartChk ) //For a change of direction, an area can
+ { // be processed during certain circumstances
+ if( bStartChk ) // If the firdt part is spell checked in backwards
+ bEndDone = sal_True; // and this is reversed in the process, then
+ else // then the end part is processed (and vice-versa).
bStartDone = sal_True;
}
bReverse = bActRev;
- if( bOtherCntnt && bStartDone && bEndDone ) // Dokument komplett geprueft?
+ if( bOtherCntnt && bStartDone && bEndDone ) // Document has been fully checked?
{
- if ( SpellMore() ) // ein weiteres Dokument pruefen?
+ if ( SpellMore() ) // spell check another document?
{
bOtherCntnt = sal_False;
bStartDone = !bReverse;
@@ -473,15 +473,15 @@ sal_Bool SvxSpellWrapper::SpellNext( )
{
sal_Bool bIsSpellSpecial = xProp.is() ?
*(sal_Bool*)xProp->getPropertyValue(
- ::rtl::OUString::createFromAscii(UPN_IS_SPELL_SPECIAL) ).getValue()
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UPN_IS_SPELL_SPECIAL)) ).getValue()
: sal_False;
- // Bodybereich erledigt, Frage nach Sonderbereich
+ // Body area done, ask for special area
if( !IsHyphen() && bIsSpellSpecial && HasOtherCnt() )
{
SpellStart( SVX_SPELL_OTHER );
bOtherCntnt = bGoOn = sal_True;
}
- else if ( SpellMore() ) // ein weiteres Dokument pruefen?
+ else if ( SpellMore() ) // check another document?
{
bOtherCntnt = sal_False;
bStartDone = !bReverse;
@@ -492,24 +492,14 @@ sal_Bool SvxSpellWrapper::SpellNext( )
}
else
{
- // Ein BODY_Bereich erledigt, Frage nach dem anderen BODY_Bereich
+ // a BODY_area done, ask for the other BODY_area
WAIT_OFF();
-// Sobald im Dialog das DontWrapAround gesetzt werden kann, kann der
-// folgende #ifdef-Zweig aktiviert werden ...
-#ifdef USED
- sal_Bool bDontWrapAround = IsHyphen() ?
- pSpell->GetOptions() & DONT_WRAPAROUND :
- pSpell->GetHyphOptions() & HYPH_DONT_WRAPAROUND;
- if( bDontWrapAround )
-#else
sal_uInt16 nResId = bReverse ? RID_SVXQB_BW_CONTINUE : RID_SVXQB_CONTINUE;
QueryBox aBox( pWin, EditResId( nResId ) );
if ( aBox.Execute() != RET_YES )
-#endif
-
{
- // Verzicht auf den anderen Bereich, ggf. Frage nach Sonderbereich
+ // sacrifice the other area if necessary ask for special area
WAIT_ON();
bStartDone = bEndDone = sal_True;
return SpellNext();
@@ -630,3 +620,4 @@ sal_Bool SvxSpellWrapper::FindSpellError()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */