From 1cc154166fe504e17735669b7b9e366f93e34d64 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Tue, 20 Dec 2011 22:17:20 -0800 Subject: STORM-1738 - Add autocorrect functionality Ported with owner permission from Firestorm, inital work done by LordGregGreg Back --- indra/llui/lllineeditor.cpp | 57 + indra/llui/lllineeditor.h | 1 + indra/newview/CMakeLists.txt | 4 + indra/newview/app_settings/settings.xml | 33 + .../newview/app_settings/settings_autocorrect.xml | 8369 ++++++++++++++++++++ indra/newview/llautocorrect.cpp | 402 + indra/newview/llautocorrect.h | 60 + indra/newview/llautocorrectfloater.cpp | 384 + indra/newview/llautocorrectfloater.h | 67 + indra/newview/llfloaterpreference.cpp | 4 +- indra/newview/llviewerfloaterreg.cpp | 3 +- .../skins/default/xui/en/floater_autocorrect.xml | 83 + .../newview/skins/default/xui/en/notifications.xml | 7 + .../default/xui/en/panel_preferences_chat.xml | 15 +- 14 files changed, 9485 insertions(+), 4 deletions(-) create mode 100644 indra/newview/app_settings/settings_autocorrect.xml create mode 100644 indra/newview/llautocorrect.cpp create mode 100644 indra/newview/llautocorrect.h create mode 100644 indra/newview/llautocorrectfloater.cpp create mode 100644 indra/newview/llautocorrectfloater.h create mode 100644 indra/newview/skins/default/xui/en/floater_autocorrect.xml (limited to 'indra') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 06dfc90d83..cee84cc53f 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -51,6 +51,8 @@ #include "lluictrlfactory.h" #include "llclipboard.h" #include "llmenugl.h" +#include "../newview/llautocorrect.h" +#include "../newview/llviewercontrol.h" // // Imported globals @@ -194,7 +196,60 @@ LLLineEditor::~LLLineEditor() // calls onCommit() while LLLineEditor still valid gFocusMgr.releaseFocusIfNeeded( this ); } +void LLLineEditor::autoCorrectText() +{ + static LLCachedControl doAnything(gSavedSettings, "EnableAutoCorrect"); + if( (!mReadOnly) && (doAnything))// && (isDirty())) + { + S32 wordStart = 0; + S32 wordEnd = mCursorPos-1; + //llinfos <<"Checking Word, Cursor is at "< 0) && (' '!=text[wordEnd-1])) + { + wordEnd--; + } + + wordStart=wordEnd; + + while ((wordEnd < (S32)text.length()) && (' '!=text[wordEnd] ) ) + { + wordEnd++; + } + + std::string strLastWord = std::string(text.begin(), text.end()); + std::string lastTypedWord = strLastWord.substr( wordStart, wordEnd-wordStart); + std::string correctedWord( AutoCorrect::getInstance()->replaceWord(lastTypedWord)); + if(correctedWord!=lastTypedWord) + { + LLWString strNew = utf8str_to_wstring( correctedWord ); + LLWString strOld = utf8str_to_wstring( lastTypedWord ); + int nDiff = strNew.size() - strOld.size(); + + //int wordStart = regText.find(lastTypedWord); + text.replace(wordStart,lastTypedWord.length(),strNew); + mText = wstring_to_utf8str(text); + mCursorPos+=nDiff; + } + } + } +} void LLLineEditor::onFocusReceived() { @@ -866,6 +921,8 @@ void LLLineEditor::addChar(const llwchar uni_char) LLUI::reportBadKeystroke(); } + autoCorrectText(); + getWindow()->hideCursorUntilMouseMove(); } diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 2518dbe3c7..8dcc801b62 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -169,6 +169,7 @@ public: virtual BOOL setTextArg( const std::string& key, const LLStringExplicit& text ); virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); + void autoCorrectText(); void setLabel(const LLStringExplicit &new_label) { mLabel = new_label; } const std::string& getLabel() { return mLabel.getString(); } diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 6b2fe1e45a..b43426ad9f 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -97,6 +97,8 @@ set(viewer_SOURCE_FILES llassetuploadresponders.cpp llattachmentsmgr.cpp llaudiosourcevo.cpp + llautocorrect.cpp + llautocorrectfloater.cpp llavataractions.cpp llavatariconctrl.cpp llavatarlist.cpp @@ -651,6 +653,8 @@ set(viewer_HEADER_FILES llassetuploadresponders.h llattachmentsmgr.h llaudiosourcevo.h + llautocorrect.h + llautocorrectfloater.h llavataractions.h llavatariconctrl.h llavatarlist.h diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index aa8ad53a3d..c132cc6ea2 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -346,6 +346,17 @@ Value 0 + AutoCorrectCount + + Comment + How many words have been auto replaced. + Persist + 1 + Type + S32 + Value + 0 + AutoAcceptNewInventory Comment @@ -1606,6 +1617,17 @@ Value 0 + CmdLineAutocorrect + + Comment + Command for adding new entries to autocorrect + Persist + 1 + Type + String + Value + /addac + CmdLineDisableVoice Comment @@ -2775,6 +2797,17 @@ Value 1 + EnableAutoCorrect + + Comment + Enables or disables the autocorrect function + Persist + 1 + Type + Boolean + Value + 0 + EnableGroupChatPopups Comment diff --git a/indra/newview/app_settings/settings_autocorrect.xml b/indra/newview/app_settings/settings_autocorrect.xml new file mode 100644 index 0000000000..4669ba5822 --- /dev/null +++ b/indra/newview/app_settings/settings_autocorrect.xml @@ -0,0 +1,8369 @@ + + + Custom + + announce + 0 + author + You + data + + enabled + 1 + priority + 10 + wordStyle + 1 + + Abbreviations + + announce + 0 + author + Wulf / TankMaster + data + + afaic + As far as I am concerned + afaik + As far as I know + afk + (Away from Keyboard) + atm + at the moment + bbiab + (Be back in a bit) + bbl + (Be back later) + brb + (Be Right Back) + btw + By the way + fyi + For your information + fwiw + For what its worth + gtg + (Got to go) + idk + I don't know + iirc + If I recall correctly + imho + in my humble opinion + imo + in my opinion + irl + in real life + lol + (Laughing out Loud) + nm + Not much + np + No problem + nsfw + not safe for work + nvm + Nevermind + rofl + (Rolling on Floor Laughing) + tc + Take care + thx + Thanks + ttfn + Ta Ta for now + ttyl + Talk to you later + ty + Thank you + tyvm + Thank you very much + wb + Welcome back + yw + You're Welcome + yvw + You're very welcome + + enabled + 1 + priority + 4 + wordStyle + 1 + + Spelling Corrections + + announce + 0 + author + LordGregGreg / Wikipedia + data + + Amercia + America + Bernouilli + Bernoulli + Blitzkreig + Blitzkrieg + Bonnano + Bonanno + Brasillian + Brazilian + Britian + Britain + Brittish + British + Buddah + Buddha + Buddist + Buddhist + Cambrige + Cambridge + Capetown + Cape Town + Carmalite + Carmelite + Carnagie + Carnegie + Carnagie-Mellon + Carnegie-Mellon + Carnigie + Carnegie + Carnigie-Mellon + Carnegie-Mellon + Carribbean + Caribbean + Carribean + Caribbean + Carthagian + Carthaginian + Cataline + Catiline + Ceasar + Caesar + Celcius + Celsius + Champange + Champagne + Cincinatti + Cincinnati + Cincinnatti + Cincinnati + Conneticut + Connecticut + Dardenelles + Dardanelles + Dravadian + Dravidian + Enlish + English + Europian + European + Europians + Europeans + Eurpean + European + Eurpoean + European + Farenheit + Fahrenheit + Febuary + February + Feburary + February + Flemmish + Flemish + Formalhaut + Fomalhaut + Foundland + Newfoundland + Fransiscan + Franciscan + Fransiscans + Franciscans + Galations + Galatians + Gameboy + Game Boy + Ghandi + Gandhi + Godounov + Godunov + Gothenberg + Gothenburg + Gottleib + Gottlieb + Guaduloupe + Guadalupe + Guadulupe + Guadalupe + Guatamala + Guatemala + Guatamalan + Guatemalan + Guilia + Giulia + Guilio + Giulio + Guiness + Guinness + Guiseppe + Giuseppe + Habsbourg + Habsburg + Hallowean + Halloween + Heidelburg + Heidelberg + Ihaca + Ithaca + Israelies + Israelis + Janurary + January + Januray + January + Japanes + Japanese + Johanine + Johannine + Jospeh + Joseph + Juadaism + Judaism + Juadism + Judaism + Lybia + Libya + Malcom + Malcolm + Massachussets + Massachusetts + Massachussetts + Massachusetts + Mediteranean + Mediterranean + Michagan + Michigan + Misouri + Missouri + Missisipi + Mississippi + Missisippi + Mississippi + Monserrat + Montserrat + Montnana + Montana + Morisette + Morissette + Morrisette + Morissette + Mythraic + Mithraic + Naploeon + Napoleon + Napolean + Napoleon + Napoleonian + Napoleonic + Nazereth + Nazareth + Newyorker + New Yorker + Novermber + November + Nullabour + Nullarbor + Nuremburg + Nuremberg + Palistian + Palestinian + Palistinian + Palestinian + Palistinians + Palestinians + Papanicalou + Papanicolaou + Peloponnes + Peloponnesus + Pennyslvania + Pennsylvania + Pharoah + Pharaoh + Philipines + Philippines + Phillipine + Philippine + Phillipines + Philippines + Phillippines + Philippines + Phonecian + Phoenecian + Portugese + Portuguese + Postdam + Potsdam + Premonasterians + Premonstratensians + Pucini + Puccini + Puertorrican + Puerto Rican + Puertorricans + Puerto Ricans + Queenland + Queensland + Rockerfeller + Rockefeller + Russion + Russian + Sanhedrim + Sanhedrin + Saterday + Saturday + Saterdays + Saturdays + Sionist + Zionist + Sionists + Zionists + Sixtin + Sistine + Skagerak + Skagerrak + Tolkein + Tolkien + Tuscon + Tucson + Ukranian + Ukrainian + UnitesStates + UnitedStates + Yementite + Yemenite + abandonned + abandoned + aberation + aberration + abilties + abilities + abilty + ability + abondon + abandon + abondoned + abandoned + abondoning + abandoning + abondons + abandons + aborigene + aborigine + abortificant + abortifacient + abreviate + abbreviate + abreviated + abbreviated + abreviation + abbreviation + abritrary + arbitrary + absail + abseil + absailing + abseiling + absense + absence + absolutly + absolutely + absorbsion + absorption + absorbtion + absorption + abundacies + abundances + abundancies + abundances + abundunt + abundant + abutts + abuts + acadamy + academy + acadmic + academic + accademic + academic + accademy + academy + acccused + accused + accelleration + acceleration + accension + ascension + acceptence + acceptance + acceptible + acceptable + accessable + accessible + accidentaly + accidentally + accidently + accidentally + acclimitization + acclimatization + accomadate + accommodate + accomadated + accommodated + accomadates + accommodates + accomadating + accommodating + accomadation + accommodation + accomadations + accommodations + accomdate + accommodate + accomodate + accommodate + accomodated + accommodated + accomodates + accommodates + accomodating + accommodating + accomodation + accommodation + accomodations + accommodations + accompanyed + accompanied + accordeon + accordion + accordian + accordion + accoring + according + accoustic + acoustic + accquainted + acquainted + accrediation + accreditation + accredidation + accreditation + accross + across + accussed + accused + acedemic + academic + acheive + achieve + acheived + achieved + acheivement + achievement + acheivements + achievements + acheives + achieves + acheiving + achieving + acheivment + achievement + acheivments + achievements + achievment + achievement + achievments + achievements + achivement + achievement + achivements + achievements + acknowldeged + acknowledged + acknowledgeing + acknowledging + ackward + awkward + acommodate + accommodate + acomplish + accomplish + acomplished + accomplished + acomplishment + accomplishment + acomplishments + accomplishments + acording + according + acordingly + accordingly + acquaintence + acquaintance + acquaintences + acquaintances + acquiantence + acquaintance + acquiantences + acquaintances + acquited + acquitted + activites + activities + activly + actively + actualy + actually + acuracy + accuracy + acused + accused + acustom + accustom + acustommed + accustomed + adavanced + advanced + adbandon + abandon + additinally + additionally + additionaly + additionally + additonal + additional + additonally + additionally + addmission + admission + addopt + adopt + addopted + adopted + addoptive + adoptive + addres + address + addresable + addressable + addresed + addressed + addresing + addressing + addressess + addresses + addtion + addition + addtional + additional + adecuate + adequate + adequit + adequate + adhearing + adhering + adherance + adherence + admendment + amendment + admininistrative + administrative + adminstered + administered + adminstrate + administrate + adminstration + administration + adminstrative + administrative + adminstrator + administrator + admissability + admissibility + admissable + admissible + admited + admitted + admitedly + admittedly + adn + and + adolecent + adolescent + adquire + acquire + adquired + acquired + adquires + acquires + adquiring + acquiring + adres + address + adresable + addressable + adresing + addressing + adress + address + adressable + addressable + adressed + addressed + adressing + addressing + adventrous + adventurous + advertisment + advertisement + advertisments + advertisements + advesary + adversary + adviced + advised + aeriel + aerial + aeriels + aerials + afair + affair + afficianados + aficionados + afficionado + aficionado + afficionados + aficionados + affilate + affiliate + affilliate + affiliate + affort + afford + aforememtioned + aforementioned + againnst + against + agains + against + agaisnt + against + aganist + against + aggaravates + aggravates + aggreed + agreed + aggreement + agreement + aggregious + egregious + aggresive + aggressive + agian + again + agianst + against + agin + again + agina + again + aginst + against + agravate + aggravate + agre + agree + agred + agreed + agreeement + agreement + agreemnt + agreement + agregate + aggregate + agregates + aggregates + agreing + agreeing + agression + aggression + agressive + aggressive + agressively + aggressively + agressor + aggressor + agricuture + agriculture + agrieved + aggrieved + ahev + have + ahppen + happen + ahve + have + aicraft + aircraft + aiport + airport + airbourne + airborne + aircaft + aircraft + aircrafts + aircraft + airporta + airports + airrcraft + aircraft + aisian + asian + albiet + albeit + alchohol + alcohol + alchoholic + alcoholic + alchol + alcohol + alcholic + alcoholic + alcohal + alcohol + alcoholical + alcoholic + aledge + allege + aledged + alleged + aledges + alleges + alege + allege + aleged + alleged + alegience + allegiance + algebraical + algebraic + algorhitms + algorithms + algoritm + algorithm + algoritms + algorithms + alientating + alienating + alledge + allege + alledged + alleged + alledgedly + allegedly + alledges + alleges + allegedely + allegedly + allegedy + allegedly + allegely + allegedly + allegence + allegiance + allegience + allegiance + allign + align + alligned + aligned + alliviate + alleviate + allopone + allophone + allopones + allophones + allready + already + allthough + although + alltime + all-time + alltogether + altogether + almsot + almost + alochol + alcohol + alomst + almost + alot + a lot + alotted + allotted + alowed + allowed + alowing + allowing + alreayd + already + alse + else + alsot + also + alternitives + alternatives + altho + although + althought + although + altough + although + alusion + allusion + alwasy + always + alwyas + always + amalgomated + amalgamated + amatuer + amateur + amature + armature + amendmant + amendment + amerliorate + ameliorate + amke + make + amking + making + ammend + amend + ammended + amended + ammendment + amendment + ammendments + amendments + ammount + amount + ammused + amused + amoung + among + amoungst + amongst + amung + among + amunition + ammunition + analagous + analogous + analitic + analytic + analogeous + analogous + anarchim + anarchism + anarchistm + anarchism + anbd + and + ancestory + ancestry + ancilliary + ancillary + androgenous + androgynous + androgeny + androgyny + anihilation + annihilation + aniversary + anniversary + annoint + anoint + annointed + anointed + annointing + anointing + annoints + anoints + annouced + announced + annualy + annually + annuled + annulled + anohter + another + anomolies + anomalies + anomolous + anomalous + anomoly + anomaly + anonimity + anonymity + anounced + announced + anouncement + announcement + ansalisation + nasalisation + ansalization + nasalization + ansestors + ancestors + antartic + antarctic + anthromorphization + anthropomorphization + anthropolgist + anthropologist + anthropolgy + anthropology + anual + annual + anulled + annulled + anwsered + answered + anyhwere + anywhere + anyother + any other + anytying + anything + aparent + apparent + aparment + apartment + apenines + apennines + aplication + application + aplied + applied + apolegetics + apologetics + apon + apron + apparant + apparent + apparantly + apparently + appart + apart + appartment + apartment + appartments + apartments + appealling + appealing + appeareance + appearance + appearence + appearance + appearences + appearances + apperance + appearance + apperances + appearances + appereance + appearance + appereances + appearances + applicaiton + application + applicaitons + applications + appologies + apologies + appology + apology + apprearance + appearance + apprieciate + appreciate + approachs + approaches + appropiate + appropriate + appropraite + appropriate + appropropiate + appropriate + approproximate + approximate + approxamately + approximately + approxiately + approximately + approximitely + approximately + aprehensive + apprehensive + apropriate + appropriate + aproximate + approximate + aproximately + approximately + aquaduct + aqueduct + aquaintance + acquaintance + aquainted + acquainted + aquiantance + acquaintance + aquire + acquire + aquired + acquired + aquiring + acquiring + aquisition + acquisition + aquitted + acquitted + aranged + arranged + arangement + arrangement + arbitarily + arbitrarily + arbitary + arbitrary + archaelogists + archaeologists + archaelogy + archaeology + archaoelogy + archaeology + archaology + archaeology + archeaologist + archaeologist + archeaologists + archaeologists + archetect + architect + archetects + architects + archetectural + architectural + archetecturally + architecturally + archetecture + architecture + archiac + archaic + archictect + architect + archimedian + archimedean + architecht + architect + architechturally + architecturally + architechture + architecture + architechtures + architectures + architectual + architectural + archtype + archetype + archtypes + archetypes + aready + already + areodynamics + aerodynamics + argubly + arguably + arguement + argument + arguements + arguments + arised + arose + arival + arrival + armamant + armament + armistace + armistice + arogant + arrogant + arogent + arrogant + aroud + around + arrangment + arrangement + arrangments + arrangements + arround + around + artical + article + artice + article + articel + article + artifical + artificial + artifically + artificially + artillary + artillery + arund + around + asetic + ascetic + asfar + as far + asign + assign + aslo + also + asociated + associated + asorbed + absorbed + asphyxation + asphyxiation + assasin + assassin + assasinate + assassinate + assasinated + assassinated + assasinates + assassinates + assasination + assassination + assasinations + assassinations + assasined + assassinated + assasins + assassins + assassintation + assassination + assemple + assemble + assertation + assertion + asside + aside + assisnate + assassinate + assit + assist + assitant + assistant + assocation + association + assoicate + associate + assoicated + associated + assoicates + associates + assosication + assassination + asssassans + assassins + assualt + assault + assualted + assaulted + assymetric + asymmetric + assymetrical + asymmetrical + asteriod + asteroid + asthetic + aesthetic + asthetical + aesthetical + asthetically + aesthetically + asume + assume + aswell + as well + atain + attain + atempting + attempting + atheistical + atheistic + athenean + athenian + atheneans + athenians + athiesm + atheism + athiest + atheist + atorney + attorney + atribute + attribute + atributed + attributed + atributes + attributes + attaindre + attainder + attemp + attempt + attemped + attempted + attemt + attempt + attemted + attempted + attemting + attempting + attemts + attempts + attendence + attendance + attendent + attendant + attendents + attendants + attened + attended + attension + attention + attitide + attitude + attributred + attributed + attrocities + atrocities + audeince + audience + auromated + automated + austrailia + Australia + austrailian + Australian + auther + author + authobiographic + autobiographic + authobiography + autobiography + authorative + authoritative + authorites + authorities + authorithy + authority + authoritiers + authorities + authoritive + authoritative + authrorities + authorities + autochtonous + autochthonous + autoctonous + autochthonous + automaticly + automatically + automibile + automobile + automonomous + autonomous + autor + author + autority + authority + auxilary + auxiliary + auxillaries + auxiliaries + auxillary + auxiliary + auxilliaries + auxiliaries + auxilliary + auxiliary + availabe + available + availablity + availability + availaible + available + availble + available + availiable + available + availible + available + avalable + available + avalance + avalanche + avaliable + available + avation + aviation + avengence + a vengeance + averageed + averaged + avilable + available + awared + awarded + awya + away + baceause + because + backgorund + background + backrounds + backgrounds + bakc + back + banannas + bananas + bandwith + bandwidth + bankrupcy + bankruptcy + banruptcy + bankruptcy + baout + about + basicaly + basically + basicly + basically + bcak + back + beachead + beachhead + beacuse + because + beastiality + bestiality + beatiful + beautiful + beaurocracy + bureaucracy + beaurocratic + bureaucratic + beautyfull + beautiful + becamae + became + becames + becomes + becasue + because + beccause + because + becomeing + becoming + becomming + becoming + becouse + because + becuase + because + bedore + before + befoer + before + beggin + begin + begginer + beginner + begginers + beginners + beggining + beginning + begginings + beginnings + beggins + begins + begining + beginning + beginnig + beginning + behavour + behavior + beleagured + beleaguered + beleif + belief + beleive + believe + beleived + believed + beleives + believes + beleiving + believing + beligum + belgium + belive + believe + belived + believed + belives + believes + belligerant + belligerent + bellweather + bellwether + bemusemnt + bemusement + beneficary + beneficiary + beng + being + benificial + beneficial + benifit + benefit + benifits + benefits + bergamont + bergamot + beseige + besiege + beseiged + besieged + beseiging + besieging + betwen + between + beween + between + bewteen + between + bilateraly + bilaterally + billingualism + bilingualism + binominal + binomial + bizzare + bizarre + blaim + blame + blaimed + blamed + blessure + blessing + bodydbuilder + bodybuilder + bombardement + bombardment + bombarment + bombardment + bondary + boundary + borke + broke + boundry + boundary + bouyancy + buoyancy + bouyant + buoyant + boyant + buoyant + breakthough + breakthrough + breakthroughts + breakthroughs + breif + brief + breifly + briefly + brethen + brethren + bretheren + brethren + briliant + brilliant + brillant + brilliant + brimestone + brimstone + broacasted + broadcast + broadacasting + broadcasting + broady + broadly + buisness + business + buisnessman + businessman + buoancy + buoyancy + burried + buried + busineses + businesses + busness + business + bussiness + business + caculater + calculator + cacuses + caucuses + cahracters + characters + calaber + caliber + calculater + calculator + calculs + calculus + calenders + calendars + caligraphy + calligraphy + caluclate + calculate + caluclated + calculated + caluculate + calculate + caluculated + calculated + calulate + calculate + calulated + calculated + calulater + calculator + camoflage + camouflage + campain + campaign + campains + campaigns + candadate + candidate + candiate + candidate + candidiate + candidate + cannister + canister + cannisters + canisters + cannnot + cannot + cannonical + canonical + cannotation + connotation + cannotations + connotations + cant + can't + caost + coast + caperbility + capability + capible + capable + captial + capital + captued + captured + capturd + captured + carachter + character + caracterized + characterized + carcas + carcass + carefull + careful + careing + caring + carismatic + charismatic + carnege + carnage + carnige + carnage + carniverous + carnivorous + carreer + career + carrers + careers + cartdridge + cartridge + carthographer + cartographer + cartilege + cartilage + cartilidge + cartilage + cartrige + cartridge + casette + cassette + casion + caisson + cassawory + cassowary + cassowarry + cassowary + casulaties + casualties + casulaty + casualty + catagories + categories + catagorized + categorized + catagory + category + catapillar + caterpillar + catapillars + caterpillars + catapiller + caterpillar + catapillers + caterpillars + catepillar + caterpillar + catepillars + caterpillars + catergorize + categorize + catergorized + categorized + caterpilar + caterpillar + caterpilars + caterpillars + caterpiller + caterpillar + caterpillers + caterpillars + cathlic + catholic + catholocism + catholicism + catterpilar + caterpillar + catterpilars + caterpillars + catterpillar + caterpillar + catterpillars + caterpillars + cattleship + battleship + causalities + casualties + cellpading + cellpadding + cementary + cemetery + cemetarey + cemetery + cemetaries + cemeteries + cemetary + cemetery + cencus + census + censur + censor + cententenial + centennial + centruies + centuries + centruy + century + ceratin + certain + cerimonial + ceremonial + cerimonies + ceremonies + cerimonious + ceremonious + cerimony + ceremony + ceromony + ceremony + certainity + certainty + certian + certain + chalenging + challenging + challange + challenge + challanged + challenged + challege + challenge + changable + changeable + charachter + character + charachters + characters + charactersistic + characteristic + charactor + character + charactors + characters + charasmatic + charismatic + charaterized + characterized + chariman + chairman + charistics + characteristics + cheif + chief + cheifs + chiefs + chemcial + chemical + chemcially + chemically + chemestry + chemistry + chemicaly + chemically + childbird + childbirth + childen + children + choosen + chosen + chracter + character + chuch + church + churchs + churches + circulaton + circulation + circumsicion + circumcision + circut + circuit + ciricuit + circuit + ciriculum + curriculum + civillian + civilian + claer + clear + claerer + clearer + claerly + clearly + claimes + claims + clas + class + clasic + classic + clasical + classical + clasically + classically + cleareance + clearance + clera + clear + clincial + clinical + clinicaly + clinically + cmo + com + cmoputer + computer + co-incided + coincided + coctail + cocktail + coform + conform + cognizent + cognizant + coincedentally + coincidentally + colaborations + collaborations + colateral + collateral + colelctive + collective + collaberative + collaborative + collecton + collection + collegue + colleague + collegues + colleagues + collonade + colonnade + collonies + colonies + collony + colony + collosal + colossal + colonizators + colonizers + comander + commander + comando + commando + comandos + commandos + comany + company + comapany + company + comback + comeback + combanations + combinations + combinatins + combinations + combusion + combustion + comdemnation + condemnation + comemmorates + commemorates + comemoretion + commemoration + comision + commission + comisioned + commissioned + comisioner + commissioner + comisioning + commissioning + comisions + commissions + comission + commission + comissioned + commissioned + comissioner + commissioner + comissioning + commissioning + comissions + commissions + comited + committed + comiting + committing + comitted + committed + comittee + committee + comitting + committing + commandoes + commandos + commedic + comedic + commemerative + commemorative + commemmorate + commemorate + commemmorating + commemorating + commerical + commercial + commerically + commercially + commericial + commercial + commericially + commercially + commerorative + commemorative + comming + coming + comminication + communication + commision + commission + commisioned + commissioned + commisioner + commissioner + commisioning + commissioning + commisions + commissions + commited + committed + commitee + committee + commiting + committing + committe + committee + committment + commitment + committments + commitments + commmemorated + commemorated + commongly + commonly + commonweath + commonwealth + commuications + communications + commuinications + communications + communciation + communication + communiation + communication + communites + communities + compability + compatibility + comparision + comparison + comparisions + comparisons + comparitive + comparative + comparitively + comparatively + compatabilities + compatibilities + compatability + compatibility + compatable + compatible + compatablities + compatibilities + compatablity + compatibility + compatiable + compatible + compatiblities + compatibilities + compatiblity + compatibility + compeitions + competitions + compensantion + compensation + competance + competence + competant + competent + competative + competitive + competion + competition + competitiion + competition + competive + competitive + competiveness + competitiveness + comphrehensive + comprehensive + compitent + competent + completedthe + completed the + completelyl + completely + completetion + completion + complier + compiler + componant + component + comprable + comparable + comprimise + compromise + compulsary + compulsory + compulsery + compulsory + computarized + computerized + concensus + consensus + concider + consider + concidered + considered + concidering + considering + conciders + considers + concieted + conceited + concieved + conceived + concious + conscious + conciously + consciously + conciousness + consciousness + condamned + condemned + condemmed + condemned + condidtion + condition + condidtions + conditions + conditionsof + conditions of + conected + connected + conection + connection + conesencus + consensus + confidental + confidential + confidentally + confidentially + confids + confides + configureable + configurable + confortable + comfortable + congradulations + congratulations + congresional + congressional + conived + connived + conjecutre + conjecture + conjuction + conjunction + conotations + connotations + conquerd + conquered + conquerer + conqueror + conquerers + conquerors + conqured + conquered + conscent + consent + consciouness + consciousness + consdider + consider + consdidered + considered + consdiered + considered + consectutive + consecutive + consenquently + consequently + consentrate + concentrate + consentrated + concentrated + consentrates + concentrates + consept + concept + consequentually + consequently + consequeseces + consequences + consern + concern + conserned + concerned + conserning + concerning + conservitive + conservative + consiciousness + consciousness + consicousness + consciousness + considerd + considered + consideres + considered + consious + conscious + consistant + consistent + consistantly + consistently + consituencies + constituencies + consituency + constituency + consituted + constituted + consitution + constitution + consitutional + constitutional + consolodate + consolidate + consolodated + consolidated + consonent + consonant + consonents + consonants + consorcium + consortium + conspiracys + conspiracies + conspiriator + conspirator + constaints + constraints + constanly + constantly + constarnation + consternation + constatn + constant + constinually + continually + constituant + constituent + constituants + constituents + constituion + constitution + constituional + constitutional + consttruction + construction + constuction + construction + consulant + consultant + consumate + consummate + consumated + consummated + contaiminate + contaminate + containes + contains + contamporaries + contemporaries + contamporary + contemporary + contempoary + contemporary + contemporaneus + contemporaneous + contempory + contemporary + contendor + contender + contibute + contribute + contibuted + contributed + contibutes + contributes + contigent + contingent + contined + continued + continous + continuous + continously + continuously + continueing + continuing + contravercial + controversial + contraversy + controversy + contributer + contributor + contributers + contributors + contritutions + contributions + controled + controlled + controling + controlling + controll + control + controlls + controls + controvercial + controversial + controvercy + controversy + controveries + controversies + controversal + controversial + controversey + controversy + controvertial + controversial + controvery + controversy + contruction + construction + conveinent + convenient + convenant + covenant + convential + conventional + convertables + convertibles + convertion + conversion + conveyer + conveyor + conviced + convinced + convienient + convenient + coordiantion + coordination + coorperations + corporations + copmetitors + competitors + coputer + computer + copywrite + copyright + coridal + cordial + cornmitted + committed + corosion + corrosion + corparate + corporate + corperations + corporations + correcters + correctors + correponding + corresponding + correposding + corresponding + correspondant + correspondent + correspondants + correspondents + corridoors + corridors + corrispond + correspond + corrispondant + correspondent + corrispondants + correspondents + corrisponded + corresponded + corrisponding + corresponding + corrisponds + corresponds + costitution + constitution + coucil + council + counries + countries + countains + contains + countires + countries + coururier + courier + coverted + converted + cpoy + copy + creaeted + created + creedence + credence + critereon + criterion + criterias + criteria + criticists + critics + critising + criticising + critisising + criticising + critisism + criticism + critisisms + criticisms + critisize + criticise + critisized + criticised + critisizes + criticises + critisizing + criticising + critized + criticized + critizing + criticizing + crockodiles + crocodiles + crowm + crown + crtical + critical + crticised + criticised + crucifiction + crucifixion + crusies + cruises + crystalisation + crystallisation + culiminating + culminating + cumulatative + cumulative + curch + church + curcuit + circuit + currenly + currently + curriculem + curriculum + cxan + cyan + cyclinder + cylinder + dacquiri + daiquiri + dael + deal + dalmation + dalmatian + damenor + demeanor + dammage + damage + daugher + daughter + debateable + debatable + decendant + descendant + decendants + descendants + decendent + descendant + decendents + descendants + decideable + decidable + decidely + decidedly + decieved + deceived + decison + decision + decomissioned + decommissioned + decomposit + decompose + decomposited + decomposed + decompositing + decomposing + decomposits + decomposes + decress + decrees + decribe + describe + decribed + described + decribes + describes + decribing + describing + dectect + detect + defendent + defendant + defendents + defendants + deffensively + defensively + deffine + define + deffined + defined + definance + defiance + definate + definite + definately + definitely + definatly + definitely + definetly + definitely + definining + defining + definit + definite + definitly + definitely + definiton + definition + defintion + definition + degrate + degrade + delagates + delegates + delapidated + dilapidated + delerious + delirious + delevopment + development + deliberatly + deliberately + delusionally + delusively + demenor + demeanor + demographical + demographic + demolision + demolition + demorcracy + democracy + demostration + demonstration + denegrating + denigrating + densly + densely + deparment + department + deparmental + departmental + deparments + departments + dependance + dependence + dependancy + dependency + dependant + dependent + deram + dream + deriviated + derived + derivitive + derivative + derogitory + derogatory + descendands + descendants + descibed + described + descision + decision + descisions + decisions + descriibes + describes + descripters + descriptors + descripton + description + desctruction + destruction + descuss + discuss + desgined + designed + deside + decide + desigining + designing + desinations + destinations + desintegrated + disintegrated + desintegration + disintegration + desireable + desirable + desitned + destined + desktiop + desktop + desorder + disorder + desoriented + disoriented + desparate + desperate + despict + depict + despiration + desperation + dessicated + desiccated + dessigned + designed + destablized + destabilized + destory + destroy + detailled + detailed + detatched + detached + deteoriated + deteriorated + deteriate + deteriorate + deterioriating + deteriorating + determinining + determining + detremental + detrimental + devasted + devastated + develope + develop + developement + development + developped + developed + develpment + development + devels + delves + devestated + devastated + devestating + devastating + devide + divide + devided + divided + devistating + devastating + devolopement + development + diablical + diabolical + diamons + diamonds + diaster + disaster + dichtomy + dichotomy + diconnects + disconnects + dicover + discover + dicovered + discovered + dicovering + discovering + dicovers + discovers + dicovery + discovery + dicussed + discussed + didnt + didn't + diea + idea + dieing + dying + dieties + deities + diety + deity + diferent + different + diferrent + different + differentiatiations + differentiations + differnt + different + difficulity + difficulty + diffrent + different + dificulties + difficulties + dificulty + difficulty + dimenions + dimensions + dimention + dimension + dimentional + dimensional + dimentions + dimensions + dimesnional + dimensional + diminuitive + diminutive + dimunitive + diminutive + diosese + diocese + diphtong + diphthong + diphtongs + diphthongs + diplomancy + diplomacy + dipthong + diphthong + dipthongs + diphthongs + dirived + derived + disagreeed + disagreed + disapeared + disappeared + disapointing + disappointing + disappearred + disappeared + disaproval + disapproval + disasterous + disastrous + disatisfaction + dissatisfaction + disatisfied + dissatisfied + disatrous + disastrous + discontentment + discontent + discribe + describe + discribed + described + discribes + describes + discribing + describing + disctinction + distinction + disctinctive + distinctive + disemination + dissemination + disenchanged + disenchanted + disiplined + disciplined + disobediance + disobedience + disobediant + disobedient + disolved + dissolved + disover + discover + dispair + despair + disparingly + disparagingly + dispence + dispense + dispenced + dispensed + dispencing + dispensing + dispicable + despicable + dispite + despite + dispostion + disposition + disproportiate + disproportionate + disputandem + disputandum + disricts + districts + dissagreement + disagreement + dissapear + disappear + dissapearance + disappearance + dissapeared + disappeared + dissapearing + disappearing + dissapears + disappears + dissappear + disappear + dissappears + disappears + dissappointed + disappointed + dissarray + disarray + dissobediance + disobedience + dissobediant + disobedient + dissobedience + disobedience + dissobedient + disobedient + distiction + distinction + distingish + distinguish + distingished + distinguished + distingishes + distinguishes + distingishing + distinguishing + distingquished + distinguished + distrubution + distribution + distruction + destruction + distructive + destructive + ditributed + distributed + diversed + diverged + divice + device + divison + division + divisons + divisions + doccument + document + doccumented + documented + doccuments + documents + docrines + doctrines + doctines + doctrines + documenatry + documentary + doens + does + doesnt + doesn't + doign + doing + dominaton + domination + dominent + dominant + dominiant + dominant + donig + doing + dont + don't + dosen't + doesn't + doub + doubt + doulbe + double + dowloads + downloads + dramtic + dramatic + draughtman + draughtsman + dreasm + dreams + driectly + directly + drnik + drink + druming + drumming + drummless + drumless + dupicate + duplicate + durig + during + durring + during + duting + during + dyas + dryas + eahc + each + ealier + earlier + earlies + earliest + earnt + earned + ecclectic + eclectic + eceonomy + economy + ecidious + deciduous + eclispe + eclipse + ecomonic + economic + ect + etc + eearly + early + efel + evil + effeciency + efficiency + effecient + efficient + effeciently + efficiently + efficency + efficiency + efficent + efficient + efficently + efficiently + efford + effort + effords + efforts + effulence + effluence + eigth + eight + eiter + either + elction + election + electic + electric + electon + electron + electrial + electrical + electricly + electrically + electricty + electricity + elementay + elementary + eleminated + eliminated + eleminating + eliminating + eles + eels + eletricity + electricity + elicided + elicited + eligable + eligible + elimentary + elementary + ellected + elected + elphant + elephant + embarass + embarrass + embarassed + embarrassed + embarassing + embarrassing + embarassment + embarrassment + embargos + embargoes + embarras + embarrass + embarrased + embarrassed + embarrasing + embarrassing + embarrasment + embarrassment + embezelled + embezzled + emblamatic + emblematic + eminate + emanate + eminated + emanated + emision + emission + emited + emitted + emiting + emitting + emition + emission + emmediately + immediately + emmigrated + immigrated + emminently + eminently + emmisaries + emissaries + emmisarries + emissaries + emmisarry + emissary + emmisary + emissary + emmision + emission + emmisions + emissions + emmited + emitted + emmiting + emitting + emmitted + emitted + emmitting + emitting + emnity + enmity + emperical + empirical + emphaised + emphasised + emphsis + emphasis + emphysyma + emphysema + emprisoned + imprisoned + enameld + enameled + enchancement + enhancement + encouraing + encouraging + encryptiion + encryption + encylopedia + encyclopedia + endevors + endeavors + endevour + endeavour + endig + ending + endolithes + endoliths + enduce + induce + ened + need + enflamed + inflamed + enforceing + enforcing + engagment + engagement + engeneer + engineer + engeneering + engineering + engieneer + engineer + engieneers + engineers + enlargment + enlargement + enlargments + enlargements + enourmous + enormous + enourmously + enormously + ensconsed + ensconced + entaglements + entanglements + enteratinment + entertainment + enthusiatic + enthusiastic + entitity + entity + entitlied + entitled + entrepeneur + entrepreneur + entrepeneurs + entrepreneurs + enviorment + environment + enviormental + environmental + enviormentally + environmentally + enviorments + environments + enviornment + environment + enviornmental + environmental + enviornmentalist + environmentalist + enviornmentally + environmentally + enviornments + environments + enviroment + environment + enviromental + environmental + enviromentalist + environmentalist + enviromentally + environmentally + enviroments + environments + envolutionary + evolutionary + envrionments + environments + enxt + next + epidsodes + episodes + epsiode + episode + equialent + equivalent + equilibium + equilibrium + equilibrum + equilibrium + equiped + equipped + equippment + equipment + equitorial + equatorial + equivelant + equivalent + equivelent + equivalent + equivilant + equivalent + equivilent + equivalent + equivlalent + equivalent + erally + really + eratic + erratic + eratically + erratically + eraticly + erratically + errupted + erupted + esential + essential + esitmated + estimated + esle + else + especialy + especially + essencial + essential + essense + essence + essentail + essential + essentialy + essentially + essentual + essential + essesital + essential + estabishes + establishes + establising + establishing + ethnocentricm + ethnocentrism + ethose + those + evenhtually + eventually + eventally + eventually + eventhough + even though + eventially + eventually + eventualy + eventually + everthing + everything + everytime + every time + everyting + everything + eveyr + every + evidentally + evidently + exagerate + exaggerate + exagerated + exaggerated + exagerates + exaggerates + exagerating + exaggerating + exagerrate + exaggerate + exagerrated + exaggerated + exagerrates + exaggerates + exagerrating + exaggerating + examinated + examined + exampt + exempt + exapansion + expansion + excact + exact + excange + exchange + excecute + execute + excecuted + executed + excecutes + executes + excecuting + executing + excecution + execution + excedded + exceeded + excelent + excellent + excell + excel + excellance + excellence + excellant + excellent + excells + excels + excercise + exercise + exchanching + exchanging + excisted + existed + exculsivly + exclusively + execising + exercising + exection + execution + exectued + executed + exeedingly + exceedingly + exelent + excellent + exellent + excellent + exemple + example + exept + except + exeptional + exceptional + exerbate + exacerbate + exerbated + exacerbated + exerciese + exercises + exerpt + excerpt + exerpts + excerpts + exersize + exercise + exerternal + external + exhalted + exalted + exhibtion + exhibition + exibition + exhibition + exibitions + exhibitions + exicting + exciting + exinct + extinct + existance + existence + existant + existent + existince + existence + exliled + exiled + exludes + excludes + exmaple + example + exonorate + exonerate + exoskelaton + exoskeleton + expalin + explain + expatriot + expatriate + expeced + expected + expecially + especially + expeditonary + expeditionary + expeiments + experiments + expell + expel + expells + expels + experiance + experience + experianced + experienced + expiditions + expeditions + expierence + experience + explaination + explanation + explaning + explaining + explictly + explicitly + exploititive + exploitative + explotation + exploitation + expropiated + expropriated + expropiation + expropriation + exressed + expressed + extemely + extremely + extention + extension + extentions + extensions + extered + exerted + extermist + extremist + extint + extinct + extradiction + extradition + extraterrestial + extraterrestrial + extraterrestials + extraterrestrials + extravagent + extravagant + extrememly + extremely + extremeophile + extremophile + extremly + extremely + extrordinarily + extraordinarily + extrordinary + extraordinary + eyar + year + eyars + years + eyasr + years + faciliate + facilitate + faciliated + facilitated + faciliates + facilitates + facilites + facilities + facillitate + facilitate + facinated + fascinated + facist + fascist + familes + families + familliar + familiar + famoust + famous + fanatism + fanaticism + fatc + fact + faught + fought + favoutrable + favourable + feasable + feasible + fedreally + federally + feromone + pheromone + fertily + fertility + fianite + finite + fianlly + finally + ficticious + fictitious + fictious + fictitious + fidn + find + fiercly + fiercely + fightings + fighting + filiament + filament + fimilies + families + finacial + financial + finaly + finally + financialy + financially + firends + friends + firts + first + fisionable + fissionable + flamable + flammable + flawess + flawless + fleed + fled + florescent + fluorescent + flourescent + fluorescent + flourine + fluorine + fluorish + flourish + follwoing + following + folowing + following + fomed + formed + fomr + from + fonetic + phonetic + fontrier + fontier + foootball + football + forbad + forbade + forbiden + forbidden + foreward + foreword + forfiet + forfeit + forhead + forehead + foriegn + foreign + formallize + formalize + formallized + formalized + formaly + formally + formelly + formerly + formidible + formidable + formost + foremost + forsaw + foresaw + forseeable + foreseeable + fortelling + foretelling + forunner + forerunner + foucs + focus + foudn + found + fougth + fought + foundaries + foundries + foundary + foundry + fourties + forties + fourty + forty + fouth + fourth + foward + forward + freind + friend + freindly + friendly + frequentily + frequently + frome + from + fromed + formed + froniter + frontier + fucntion + function + fucntioning + functioning + fufill + fulfill + fufilled + fulfilled + fulfiled + fulfilled + fullfill + fulfill + fullfilled + fulfilled + fundametal + fundamental + fundametals + fundamentals + funguses + fungi + funtion + function + furuther + further + futher + further + futhermore + furthermore + galatic + galactic + gallaxies + galaxies + galvinized + galvanized + ganerate + generate + ganes + games + ganster + gangster + garantee + guarantee + garanteed + guaranteed + garantees + guarantees + garnison + garrison + gaurantee + guarantee + gauranteed + guaranteed + gaurantees + guarantees + gaurd + guard + gaurentee + guarantee + gaurenteed + guaranteed + gaurentees + guarantees + geneological + genealogical + geneologies + genealogies + geneology + genealogy + generaly + generally + generatting + generating + genialia + genitalia + geographicial + geographical + geometrician + geometer + geometricians + geometers + gerat + great + glight + flight + gnawwed + gnawed + godess + goddess + godesses + goddesses + gogin + going + goign + going + gonig + going + gouvener + governor + govement + government + govenment + government + govenrment + government + goverance + governance + goverment + government + govermental + governmental + governer + governor + governmnet + government + govorment + government + govormental + governmental + govornment + government + gracefull + graceful + graet + great + grafitti + graffiti + gramatically + grammatically + grammaticaly + grammatically + grammer + grammar + grat + great + gratuitious + gratuitous + greatful + grateful + greatfully + gratefully + greif + grief + gridles + griddles + gropu + group + grwo + grow + guage + gauge + guarentee + guarantee + guarenteed + guaranteed + guarentees + guarantees + guerilla + guerrilla + guerillas + guerrillas + guerrila + guerrilla + guerrilas + guerrillas + guidence + guidance + gunanine + guanine + gurantee + guarantee + guranteed + guaranteed + gurantees + guarantees + guttaral + guttural + gutteral + guttural + habaeus + habeas + habeus + habeas + haemorrage + haemorrhage + haev + have + halp + help + hapen + happen + hapened + happened + hapening + happening + happend + happened + happended + happened + happenned + happened + harased + harassed + harases + harasses + harasment + harassment + harasments + harassments + harassement + harassment + harras + harass + harrased + harassed + harrases + harasses + harrasing + harassing + harrasment + harassment + harrasments + harassments + harrassed + harassed + harrasses + harassed + harrassing + harassing + harrassment + harassment + harrassments + harassments + hasnt + hasn't + haviest + heaviest + headquarer + headquarter + headquater + headquarter + headquatered + headquartered + headquaters + headquarters + healthercare + healthcare + heared + heard + heathy + healthy + heigher + higher + heirarchy + hierarchy + heiroglyphics + hieroglyphics + helment + helmet + helpfull + helpful + helpped + helped + hemmorhage + hemorrhage + herad + heard + heridity + heredity + heroe + hero + heros + heroes + hertiage + heritage + hertzs + hertz + hesistant + hesitant + heterogenous + heterogeneous + hieght + height + hierachical + hierarchical + hierachies + hierarchies + hierachy + hierarchy + hierarcical + hierarchical + hierarcy + hierarchy + hieroglph + hieroglyph + hieroglphs + hieroglyphs + higer + higher + higest + highest + higway + highway + hillarious + hilarious + himselv + himself + hinderance + hindrance + hinderence + hindrance + hindrence + hindrance + hipopotamus + hippopotamus + hismelf + himself + histocompatability + histocompatibility + historicians + historians + hitsingles + hit singles + holliday + holiday + homestate + home state + homogeneize + homogenize + homogeneized + homogenized + honory + honorary + horrifing + horrifying + hosited + hoisted + hospitible + hospitable + hounour + honour + housr + hours + howver + however + hsitorians + historians + hstory + history + hten + then + htere + there + htey + they + htikn + think + hting + thing + htink + think + htis + this + humer + humor + humerous + humorous + huminoid + humanoid + humoural + humoral + humurous + humorous + husban + husband + hvae + have + hvaing + having + hvea + have + hwihc + which + hwile + while + hwole + whole + hydogen + hydrogen + hydropile + hydrophile + hydropilic + hydrophilic + hydropobe + hydrophobe + hydropobic + hydrophobic + hygeine + hygiene + hypocracy + hypocrisy + hypocrasy + hypocrisy + hypocricy + hypocrisy + hypocrit + hypocrite + hypocrits + hypocrites + i + I + iconclastic + iconoclastic + idaeidae + idea + idaes + ideas + idealogies + ideologies + idealogy + ideology + identicial + identical + identifers + identifiers + ideosyncratic + idiosyncratic + idesa + ideas + idiosyncracy + idiosyncrasy + illegimacy + illegitimacy + illegitmate + illegitimate + illess + illness + illiegal + illegal + illution + illusion + ilness + illness + ilogical + illogical + imagenary + imaginary + imagin + imagine + imaginery + imaginary + imcomplete + incomplete + imediately + immediately + imense + immense + immediatley + immediately + immediatly + immediately + immidately + immediately + immidiately + immediately + immitate + imitate + immitated + imitated + immitating + imitating + immitator + imitator + immunosupressant + immunosuppressant + impecabbly + impeccably + impedence + impedance + implamenting + implementing + impliment + implement + implimented + implemented + imploys + employs + importamt + important + imprioned + imprisoned + imprisonned + imprisoned + improvision + improvisation + improvments + improvements + inablility + inability + inaccessable + inaccessible + inadiquate + inadequate + inadquate + inadequate + inadvertant + inadvertent + inadvertantly + inadvertently + inagurated + inaugurated + inaguration + inauguration + inappropiate + inappropriate + inaugures + inaugurates + inbalance + imbalance + inbalanced + imbalanced + inbetween + between + incarcirated + incarcerated + incidentially + incidentally + incidently + incidentally + inclreased + increased + includ + include + includng + including + incompatabilities + incompatibilities + incompatability + incompatibility + incompatable + incompatible + incompatablities + incompatibilities + incompatablity + incompatibility + incompatiblities + incompatibilities + incompatiblity + incompatibility + incompetance + incompetence + incompetant + incompetent + incomptable + incompatible + incomptetent + incompetent + inconsistant + inconsistent + incoroporated + incorporated + incorperation + incorporation + incorportaed + incorporated + incorprates + incorporates + incorruptable + incorruptible + incramentally + incrementally + increadible + incredible + incredable + incredible + inctroduce + introduce + inctroduced + introduced + incuding + including + incunabla + incunabula + indefinately + indefinitely + indefineable + undefinable + indefinitly + indefinitely + indentical + identical + indepedantly + independently + indepedence + independence + independance + independence + independant + independent + independantly + independently + independece + independence + independendet + independent + indespensable + indispensable + indespensible + indispensable + indictement + indictment + indigineous + indigenous + indipendence + independence + indipendent + independent + indipendently + independently + indispensible + indispensable + indisputible + indisputable + indisputibly + indisputably + indite + indict + individualy + individually + indpendent + independent + indpendently + independently + indulgue + indulge + indutrial + industrial + indviduals + individuals + inefficienty + inefficiently + inevatible + inevitable + inevitible + inevitable + inevititably + inevitably + infalability + infallibility + infallable + infallible + infectuous + infectious + infered + inferred + infilitrate + infiltrate + infilitrated + infiltrated + infilitration + infiltration + infinit + infinite + inflamation + inflammation + influencial + influential + influented + influenced + infomation + information + informtion + information + infrantryman + infantryman + infrigement + infringement + ingenius + ingenious + ingreediants + ingredients + inhabitans + inhabitants + inherantly + inherently + inheritence + inheritance + inital + initial + initally + initially + initation + initiation + initiaitive + initiative + inlcuding + including + inmigrant + immigrant + inmigrants + immigrants + innoculated + inoculated + inocence + innocence + inofficial + unofficial + inot + into + inpeach + impeach + inpolite + impolite + inprisonment + imprisonment + inproving + improving + insectiverous + insectivorous + insensative + insensitive + inseperable + inseparable + insistance + insistence + insitution + institution + insitutions + institutions + inspite + in spite + instade + instead + instatance + instance + institue + institute + instuction + instruction + instuments + instruments + instutionalized + institutionalized + instutions + intuitions + insurence + insurance + intelectual + intellectual + inteligence + intelligence + inteligent + intelligent + intenational + international + intented + intended + intepretation + interpretation + intepretator + interpretor + interational + international + interbread + interbreed + interchangable + interchangeable + interchangably + interchangeably + intercontinetal + intercontinental + intered + interred + interelated + interrelated + interferance + interference + interfereing + interfering + intergrated + integrated + intergration + integration + interm + interim + internation + international + interpet + interpret + interrim + interim + interrugum + interregnum + intertaining + entertaining + interupt + interrupt + intervines + intervenes + intevene + intervene + intial + initial + intially + initially + intrduced + introduced + intrest + interest + introdued + introduced + intruduced + introduced + intrument + instrument + intrumental + instrumental + intruments + instruments + intrusted + entrusted + intutive + intuitive + intutively + intuitively + inudstry + industry + inventer + inventor + invertibrates + invertebrates + investingate + investigate + involvment + involvement + irelevent + irrelevant + iresistable + irresistible + iresistably + irresistibly + iresistible + irresistible + iresistibly + irresistibly + iritable + irritable + iritated + irritated + ironicly + ironically + irregardless + regardless + irrelevent + irrelevant + irreplacable + irreplaceable + irresistable + irresistible + irresistably + irresistibly + isnt + isn't + issueing + issuing + itnroduced + introduced + iunior + junior + iwll + will + iwth + with + jaques + jacques + jeapardy + jeopardy + jewllery + jewellery + jouney + journey + journied + journeyed + journies + journeys + jstu + just + jsut + just + judical + judicial + judisuary + judiciary + juducial + judicial + juristiction + jurisdiction + juristictions + jurisdictions + kindergarden + kindergarten + klenex + kleenex + knifes + knives + knive + knife + knowlege + knowledge + knowlegeable + knowledgeable + knwo + know + knwos + knows + konw + know + konws + knows + kwno + know + labatory + laboratory + labratory + laboratory + laguage + language + laguages + languages + larg + large + largst + largest + larrry + larry + lastr + last + lattitude + latitude + launhed + launched + lavae + larvae + layed + laid + lazyness + laziness + leage + league + leanr + learn + leathal + lethal + lefted + left + legitamate + legitimate + legitmate + legitimate + leibnitz + leibniz + lenght + length + leran + learn + lerans + learns + leutenant + lieutenant + levetate + levitate + levetated + levitated + levetates + levitates + levetating + levitating + levle + level + liasion + liaison + liason + liaison + liasons + liaisons + libary + library + libell + libel + libguistic + linguistic + libguistics + linguistics + libitarianisn + libertarianism + lieing + lying + liek + like + liekd + liked + liesure + leisure + lieuenant + lieutenant + lieved + lived + liftime + lifetime + lightyear + light year + lightyears + light years + likelyhood + likelihood + linnaena + linnaean + lippizaner + lipizzaner + liquify + liquefy + liscense + license + lisence + license + lisense + license + listners + listeners + litature + literature + literaly + literally + literture + literature + littel + little + litterally + literally + liuke + like + livley + lively + lmits + limits + loev + love + lonelyness + loneliness + longitudonal + longitudinal + lonley + lonely + lonly + lonely + loosing + losing + lotharingen + lothringen + lsat + last + lukid + likud + lveo + love + lvoe + love + maching + machine + mackeral + mackerel + magasine + magazine + magincian + magician + magnificient + magnificent + magolia + magnolia + mailny + mainly + maintainance + maintenance + maintainence + maintenance + maintance + maintenance + maintenence + maintenance + maintinaing + maintaining + maintioned + mentioned + majoroty + majority + maked + marked + makse + makes + maltesian + Maltese + mamal + mammal + mamalian + mammalian + managable + manageable + managment + management + maneouvre + manoeuvre + maneouvred + manoeuvred + maneouvres + manoeuvres + maneouvring + manoeuvring + manisfestations + manifestations + manoeuverability + maneuverability + manouver + maneuver + manouverability + maneuverability + manouverable + maneuverable + manouvers + maneuvers + mantained + maintained + manuever + maneuver + manuevers + maneuvers + manufacturedd + manufactured + manufature + manufacture + manufatured + manufactured + manufaturing + manufacturing + manuver + maneuver + mariage + marriage + marjority + majority + markes + marks + marketting + marketing + marmelade + marmalade + marrage + marriage + marraige + marriage + marrtyred + martyred + marryied + married + massmedia + mass media + masterbation + masturbation + mataphysical + metaphysical + materalists + materialist + mathamatics + mathematics + mathematican + mathematician + mathematicas + mathematics + matheticians + mathematicians + mathmatically + mathematically + mathmatician + mathematician + mathmaticians + mathematicians + mccarthyst + mccarthyist + mchanics + mechanics + meaninng + meaning + mear + wear + mechandise + merchandise + medacine + medicine + medeival + medieval + medevial + medieval + mediciney + mediciny + medievel + medieval + mediterainnean + mediterranean + meerkrat + meerkat + melieux + milieux + membranaphone + membranophone + memeber + member + menally + mentally + meranda + Miranda + mercentile + mercantile + messanger + messenger + messenging + messaging + metalic + metallic + metalurgic + metallurgic + metalurgical + metallurgical + metalurgy + metallurgy + metamorphysis + metamorphosis + metaphoricial + metaphorical + meterologist + meteorologist + meterology + meteorology + methaphor + metaphor + methaphors + metaphors + micoscopy + microscopy + midwifes + midwives + mileau + milieu + milennia + millennia + milennium + millennium + mileu + milieu + miliary + military + milion + million + miliraty + military + millenia + millennia + millenial + millennial + millenialism + millennialism + millenium + millennium + millepede + millipede + millioniare + millionaire + millitary + military + millon + million + miltary + military + minature + miniature + minerial + mineral + miniscule + minuscule + ministery + ministry + minstries + ministries + minstry + ministry + minumum + minimum + mirrorred + mirrored + miscelaneous + miscellaneous + miscellanious + miscellaneous + miscellanous + miscellaneous + mischeivous + mischievous + mischevious + mischievous + mischievious + mischievous + misdameanor + misdemeanor + misdameanors + misdemeanors + misdemenor + misdemeanor + misdemenors + misdemeanors + misfourtunes + misfortunes + misile + missile + mispell + misspell + mispelled + misspelled + mispelling + misspelling + missen + mizzen + missle + missile + missonary + missionary + misterious + mysterious + mistery + mystery + misteryous + mysterious + mkae + make + mkaes + makes + mkaing + making + mkea + make + moderm + modem + modle + model + moent + moment + moeny + money + mohammedans + muslims + moil + soil + moleclues + molecules + momento + memento + monestaries + monasteries + monestary + monastery + monickers + monikers + monolite + monolithic + montains + mountains + montanous + mountainous + monts + months + montypic + monotypic + moreso + more so + morgage + mortgage + morroccan + moroccan + morrocco + morocco + morroco + morocco + mortage + mortgage + mosture + moisture + motiviated + motivated + mounth + month + movei + movie + movment + movement + mroe + more + mucuous + mucous + muder + murder + mudering + murdering + muhammadan + muslim + multicultralism + multiculturalism + multipled + multiplied + multiplers + multipliers + munbers + numbers + muncipalities + municipalities + muncipality + municipality + munnicipality + municipality + muscels + muscles + muscial + musical + muscician + musician + muscicians + musicians + mutiliated + mutilated + myraid + myriad + mysef + myself + mysogynist + misogynist + mysogyny + misogyny + mysterous + mysterious + naieve + naive + naturaly + naturally + naturely + naturally + naturual + natural + naturually + naturally + neccesarily + necessarily + neccesary + necessary + neccessarily + necessarily + neccessary + necessary + neccessities + necessities + necesarily + necessarily + necesary + necessary + necessiate + necessitate + neglible + negligible + negligable + negligible + negociate + negotiate + negociation + negotiation + negociations + negotiations + negotation + negotiation + neice + niece + neigborhood + neighborhood + neigbour + neighbour + neigbourhood + neighbourhood + neolitic + neolithic + nessasarily + necessarily + nessecary + necessary + nestin + nesting + neverthless + nevertheless + newletters + newsletters + nickle + nickel + nightfa;; + nightfall + nightime + nighttime + nineth + ninth + ninteenth + nineteenth + ninties + 1990s + ninty + ninety + nkow + know + nkwo + know + nmae + name + noncombatents + noncombatants + nonsence + nonsense + nontheless + nonetheless + noone + no one + norhern + northern + northen + northern + northereastern + northeastern + notabley + notably + noteable + notable + noteably + notably + noteriety + notoriety + noth + north + nothern + northern + noticable + noticeable + noticably + noticeably + noticeing + noticing + noticible + noticeable + notwhithstanding + notwithstanding + noveau + nouveau + nowdays + nowadays + nowe + now + nto + not + nucular + nuclear + nuculear + nuclear + nuisanse + nuisance + numberous + numerous + nusance + nuisance + nutritent + nutrient + nutritents + nutrients + nuturing + nurturing + obediance + obedience + obediant + obedient + obession + obsession + obssessed + obsessed + obstacal + obstacle + obstancles + obstacles + obstruced + obstructed + ocasion + occasion + ocasional + occasional + ocasionally + occasionally + ocasionaly + occasionally + ocasioned + occasioned + ocasions + occasions + ocassion + occasion + ocassional + occasional + ocassionally + occasionally + ocassionaly + occasionally + ocassioned + occasioned + ocassions + occasions + occaison + occasion + occassion + occasion + occassional + occasional + occassionally + occasionally + occassionaly + occasionally + occassioned + occasioned + occassions + occasions + occationally + occasionally + occour + occur + occurance + occurrence + occurances + occurrences + occured + occurred + occurence + occurrence + occurences + occurrences + occuring + occurring + occurr + occur + occurrance + occurrence + occurrances + occurrences + octohedra + octahedra + octohedral + octahedral + octohedron + octahedron + ocuntries + countries + ocuntry + country + ocurr + occur + ocurrance + occurrence + ocurred + occurred + ocurrence + occurrence + offcers + officers + offcially + officially + offereings + offerings + offical + official + offically + officially + officals + officials + officaly + officially + officialy + officially + offred + offered + oftenly + often + oging + going + omision + omission + omited + omitted + omiting + omitting + omlette + omelette + ommision + omission + ommited + omitted + ommiting + omitting + ommitted + omitted + ommitting + omitting + omniverous + omnivorous + omniverously + omnivorously + omre + more + onot + note + onxy + onyx + onyl + only + openess + openness + oponent + opponent + oportunity + opportunity + opose + oppose + oposite + opposite + oposition + opposition + oppenly + openly + oppinion + opinion + opponant + opponent + oppononent + opponent + oppositition + opposition + oppossed + opposed + opprotunity + opportunity + opression + oppression + opressive + oppressive + opthalmic + ophthalmic + opthalmologist + ophthalmologist + opthalmology + ophthalmology + opthamologist + ophthalmologist + optmizations + optimizations + optomism + optimism + orded + ordered + organim + organism + organistion + organisation + organiztion + organization + orgin + origin + orginal + original + orginally + originally + orginize + organise + oridinarily + ordinarily + origanaly + originally + originall + original + originaly + originally + originially + originally + originnally + originally + origional + original + orignally + originally + orignially + originally + otehr + other + oublisher + publisher + ouevre + oeuvre + oustanding + outstanding + overshaddowed + overshadowed + overthere + over there + overwelming + overwhelming + overwheliming + overwhelming + owrk + work + owudl + would + oxigen + oxygen + oximoron + oxymoron + p0enis + penis + paide + paid + paitience + patience + palce + place + paleolitic + paleolithic + paliamentarian + parliamentarian + pallete + palette + pamflet + pamphlet + pamplet + pamphlet + pantomine + pantomime + paralel + parallel + paralell + parallel + paralelly + parallelly + paralely + parallelly + parallely + parallelly + paranthesis + parenthesis + paraphenalia + paraphernalia + parellels + parallels + parituclar + particular + parliment + parliament + parrakeets + parakeets + parralel + parallel + parrallel + parallel + parrallell + parallel + parrallelly + parallelly + parrallely + parallelly + partialy + partially + particually + particularly + particualr + particular + particuarly + particularly + particularily + particularly + particulary + particularly + pary + party + pased + passed + pasengers + passengers + passerbys + passersby + pasttime + pastime + pastural + pastoral + paticular + particular + pattented + patented + pavillion + pavilion + payed + paid + pblisher + publisher + pbulisher + publisher + peacefuland + peaceful and + peageant + pageant + peculure + peculiar + pedestrain + pedestrian + peformed + performed + peice + piece + penatly + penalty + penerator + penetrator + penisula + peninsula + penisular + peninsular + penninsula + peninsula + penninsular + peninsular + pennisula + peninsula + pensinula + peninsula + peom + poem + peoms + poems + peopel + people + peotry + poetry + perade + parade + percepted + perceived + percieve + perceive + percieved + perceived + perenially + perennially + perfomance + performance + perfomers + performers + performence + performance + performes + performed + perhasp + perhaps + perheaps + perhaps + perhpas + perhaps + peripathetic + peripatetic + peristent + persistent + perjery + perjury + perjorative + pejorative + permanant + permanent + permenant + permanent + permenantly + permanently + permissable + permissible + perogative + prerogative + peronal + personal + perosnality + personality + perphas + perhaps + perpindicular + perpendicular + perseverence + perseverance + persistance + persistence + persistant + persistent + personel + personnel + personell + personnel + personnell + personnel + persuded + persuaded + persue + pursue + persued + pursued + persuing + pursuing + persuit + pursuit + persuits + pursuits + pertubation + perturbation + pertubations + perturbations + pessiary + pessary + petetion + petition + phenomenom + phenomenon + phenomenonal + phenomenal + phenomenonly + phenomenally + phenomonenon + phenomenon + phenomonon + phenomenon + phenonmena + phenomena + philisopher + philosopher + philisophical + philosophical + philisophy + philosophy + phillosophically + philosophically + philospher + philosopher + philosphies + philosophies + philosphy + philosophy + phongraph + phonograph + phylosophical + philosophical + physicaly + physically + piblisher + publisher + pich + pitch + pilgrimmage + pilgrimage + pilgrimmages + pilgrimages + pinapple + pineapple + pinnaple + pineapple + pinoneered + pioneered + plagarism + plagiarism + planation + plantation + planed + planned + plantiff + plaintiff + plateu + plateau + plausable + plausible + playright + playwright + playwrite + playwright + playwrites + playwrights + pleasent + pleasant + plebicite + plebiscite + plesant + pleasant + poenis + penis + poeoples + peoples + poety + poetry + poisin + poison + polical + political + polinator + pollinator + polinators + pollinators + politican + politician + politicans + politicians + poltical + political + polute + pollute + poluted + polluted + polutes + pollutes + poluting + polluting + polution + pollution + polyphonyic + polyphonic + polysaccaride + polysaccharide + polysaccharid + polysaccharide + pomegranite + pomegranate + pomotion + promotion + poportional + proportional + popoulation + population + popularaty + popularity + populare + popular + populer + popular + portait + portrait + portayed + portrayed + portraing + portraying + portuguease + portuguese + portugues + Portuguese + posess + possess + posessed + possessed + posesses + possesses + posessing + possessing + posession + possession + posessions + possessions + posion + poison + positon + position + possable + possible + possably + possibly + posseses + possesses + possesing + possessing + possesion + possession + possessess + possesses + possibile + possible + possibilty + possibility + possiblility + possibility + possiblilty + possibility + possiblities + possibilities + possiblity + possibility + possition + position + posthomous + posthumous + postion + position + postive + positive + potatos + potatoes + potrait + portrait + potrayed + portrayed + poulations + populations + poverful + powerful + poweful + powerful + powerfull + powerful + ppublisher + publisher + practial + practical + practially + practically + practicaly + practically + practicioner + practitioner + practicioners + practitioners + practicly + practically + practioner + practitioner + practioners + practitioners + prairy + prairie + prarie + prairie + praries + prairies + pratice + practice + preample + preamble + precedessor + predecessor + preceed + precede + preceeded + preceded + preceeding + preceding + preceeds + precedes + precentage + percentage + precice + precise + precisly + precisely + precurser + precursor + predecesors + predecessors + predicatble + predictable + predicitons + predictions + predomiantly + predominately + prefered + preferred + prefering + preferring + preferrably + preferably + pregancies + pregnancies + preiod + period + preliferation + proliferation + premeire + premiere + premeired + premiered + premillenial + premillennial + preminence + preeminence + premission + permission + preocupation + preoccupation + prepair + prepare + prepartion + preparation + prepatory + preparatory + preperation + preparation + preperations + preparations + preriod + period + presedential + presidential + presense + presence + presidenital + presidential + presidental + presidential + presitgious + prestigious + prespective + perspective + prestigeous + prestigious + prestigous + prestigious + presumabely + presumably + presumibly + presumably + pretection + protection + prevelant + prevalent + preverse + perverse + previvous + previous + pricipal + principal + priciple + principle + priestood + priesthood + primarly + primarily + primative + primitive + primatively + primitively + primatives + primitives + primordal + primordial + priveledges + privileges + privelege + privilege + priveleged + privileged + priveleges + privileges + privelige + privilege + priveliged + privileged + priveliges + privileges + privelleges + privileges + privilage + privilege + priviledge + privilege + priviledges + privileges + privledge + privilege + privte + private + probabilaty + probability + probablistic + probabilistic + probablly + probably + probalibity + probability + probaly + probably + probelm + problem + proccess + process + proccessing + processing + procede + proceed + proceded + proceeded + procedes + proceeds + procedger + procedure + proceding + proceeding + procedings + proceedings + proceedure + procedure + proces + process + processer + processor + proclaimation + proclamation + proclamed + proclaimed + proclaming + proclaiming + proclomation + proclamation + profesion + profession + profesor + professor + professer + professor + proffesed + professed + proffesion + profession + proffesional + professional + proffesor + professor + profilic + prolific + progessed + progressed + programable + programmable + progrom + program + progroms + programs + prohabition + prohibition + prologomena + prolegomena + prominance + prominence + prominant + prominent + prominantly + prominently + prominately + prominently + promiscous + promiscuous + promotted + promoted + pronomial + pronominal + pronouced + pronounced + pronounched + pronounced + pronounciation + pronunciation + proove + prove + prooved + proved + prophacy + prophecy + propietary + proprietary + propmted + prompted + propoganda + propaganda + propogate + propagate + propogates + propagates + propogation + propagation + propostion + proposition + propotions + proportions + propper + proper + propperly + properly + proprietory + proprietary + proseletyzing + proselytizing + protaganist + protagonist + protaganists + protagonists + protocal + protocol + protoganist + protagonist + protrayed + portrayed + protruberance + protuberance + protruberances + protuberances + prouncements + pronouncements + provacative + provocative + provded + provided + provicial + provincial + provinicial + provincial + provisiosn + provision + provisonal + provisional + proximty + proximity + pseudononymous + pseudonymous + pseudonyn + pseudonym + psuedo + pseudo + psycology + psychology + psyhic + psychic + pubilsher + publisher + pubisher + publisher + publiaher + publisher + publically + publicly + publicaly + publicly + publicher + publisher + publihser + publisher + publisehr + publisher + publiser + publisher + publisger + publisher + publisheed + published + publisherr + publisher + publishher + publisher + publishor + publisher + publishre + publisher + publissher + publisher + publlisher + publisher + publsiher + publisher + publusher + publisher + puchasing + purchasing + pulisher + publisher + pumkin + pumpkin + puplisher + publisher + puritannical + puritanical + purposedly + purposely + purpotedly + purportedly + pursuade + persuade + pursuaded + persuaded + pursuades + persuades + pususading + persuading + puting + putting + pwoer + power + pyscic + psychic + qtuie + quiet + quantaty + quantity + quantitiy + quantity + quarantaine + quarantine + questonable + questionable + quicklyu + quickly + quinessential + quintessential + quitted + quit + quizes + quizzes + qutie + quiet + rabinnical + rabbinical + racaus + raucous + radiactive + radioactive + radify + ratify + raelly + really + rarified + rarefied + reaccurring + recurring + reacing + reaching + reacll + recall + readmition + readmission + realitvely + relatively + realsitic + realistic + realtions + relations + realy + really + realyl + really + reasearch + research + rebiulding + rebuilding + rebllions + rebellions + rebounce + rebound + reccomend + recommend + reccomendations + recommendations + reccomended + recommended + reccomending + recommending + reccommend + recommend + reccommended + recommended + reccommending + recommending + reccuring + recurring + receeded + receded + receeding + receding + receivedfrom + received from + recepient + recipient + recepients + recipients + receving + receiving + rechargable + rechargeable + reched + reached + recide + reside + recided + resided + recident + resident + recidents + residents + reciding + residing + reciepents + recipients + reciept + receipt + recieve + receive + recieved + received + reciever + receiver + recievers + receivers + recieves + receives + recieving + receiving + recipiant + recipient + recipiants + recipients + recived + received + recivership + receivership + recogise + recognise + recogize + recognize + recomend + recommend + recomended + recommended + recomending + recommending + recomends + recommends + recommedations + recommendations + reconaissance + reconnaissance + reconcilation + reconciliation + reconized + recognized + reconnaisance + reconnaissance + reconnaissence + reconnaissance + recontructed + reconstructed + recordproducer + record producer + recquired + required + recrational + recreational + recrod + record + recuiting + recruiting + recuring + recurring + recurrance + recurrence + rediculous + ridiculous + reedeming + redeeming + reenforced + reinforced + refect + reflect + refedendum + referendum + referal + referral + referece + reference + refereces + references + refered + referred + referemce + reference + referemces + references + referencs + references + referenece + reference + refereneced + referenced + refereneces + references + referiang + referring + refering + referring + refernce + references + refernces + references + referrence + reference + referrences + references + referrs + refers + reffered + referred + refference + reference + reffering + referring + refrence + reference + refrences + references + refrers + refers + refridgeration + refrigeration + refridgerator + refrigerator + refromist + reformist + refusla + refusal + regardes + regards + regluar + regular + reguarly + regularly + regulaion + regulation + regulaotrs + regulators + regularily + regularly + rehersal + rehearsal + reicarnation + reincarnation + reigining + reigning + reknown + renown + reknowned + renowned + rela + real + relaly + really + relatiopnship + relationship + relativly + relatively + relected + reelected + releive + relieve + releived + relieved + releiver + reliever + releses + releases + relevence + relevance + relevent + relevant + reliablity + reliability + relient + reliant + religeous + religious + religous + religious + religously + religiously + relinqushment + relinquishment + relitavely + relatively + relized + realized + relpacement + replacement + remaing + remaining + remeber + remember + rememberable + memorable + rememberance + remembrance + remembrence + remembrance + remenant + remnant + remenicent + reminiscent + reminent + remnant + reminescent + reminiscent + reminscent + reminiscent + reminsicent + reminiscent + rendevous + rendezvous + rendezous + rendezvous + renedered + rende + renewl + renewal + rennovate + renovate + rennovated + renovated + rennovating + renovating + rennovation + renovation + rentors + renters + reoccurrence + recurrence + reorganision + reorganisation + repatition + repetition + repectively + respectively + repeition + repetition + repentence + repentance + repentent + repentant + repeteadly + repeatedly + repetion + repetition + repid + rapid + reponse + response + reponsible + responsible + reportadly + reportedly + represantative + representative + representive + representative + representives + representatives + reproducable + reproducible + reprtoire + repertoire + repsectively + respectively + reptition + repetition + requirment + requirement + requred + required + resaurant + restaurant + resembelance + resemblance + resembes + resembles + resemblence + resemblance + resevoir + reservoir + residental + residential + resignement + resignment + resistable + resistible + resistence + resistance + resistent + resistant + respectivly + respectively + responce + response + responibilities + responsibilities + responisble + responsible + responnsibilty + responsibility + responsability + responsibility + responsibile + responsible + responsibilites + responsibilities + responsiblities + responsibilities + responsiblity + responsibility + ressemblance + resemblance + ressemble + resemble + ressembled + resembled + ressemblence + resemblance + ressembling + resembling + resssurecting + resurrecting + ressurect + resurrect + ressurected + resurrected + ressurection + resurrection + ressurrection + resurrection + restarant + restaurant + restarants + restaurants + restaraunt + restaurant + restaraunteur + restaurateur + restaraunteurs + restaurateurs + restaraunts + restaurants + restauranteurs + restaurateurs + restauration + restoration + restauraunt + restaurant + resteraunt + restaurant + resteraunts + restaurants + resticted + restricted + restraunt + restraint + resturant + restaurant + resturants + restaurants + resturaunt + restaurant + resturaunts + restaurants + resurecting + resurrecting + retalitated + retaliated + retalitation + retaliation + retreive + retrieve + returnd + returned + revaluated + reevaluated + reveiw + review + reveral + reversal + reversable + reversible + revolutionar + revolutionary + rewitten + rewritten + rewriet + rewrite + rference + reference + rferences + references + rhymme + rhyme + rhythem + rhythm + rhythim + rhythm + rhytmic + rhythmic + rigourous + rigorous + rininging + ringing + rised + rose + rococco + rococo + rocord + record + roomate + roommate + rougly + roughly + rucuperate + recuperate + rudimentatry + rudimentary + rulle + rule + runing + running + runnung + running + russina + Russian + rwite + write + rythem + rhythm + rythim + rhythm + rythm + rhythm + rythmic + rhythmic + rythyms + rhythms + sacrafice + sacrifice + sacreligious + sacrilegious + sacrifical + sacrificial + saftey + safety + safty + safety + salery + salary + sanctionning + sanctioning + sandwhich + sandwich + santioned + sanctioned + sargant + sergeant + sargeant + sergeant + satelite + satellite + satelites + satellites + satisfactority + satisfactorily + satric + satiric + satrical + satirical + satrically + satirically + sattelite + satellite + sattelites + satellites + saught + sought + saveing + saving + saxaphone + saxophone + scaleable + scalable + scandanavia + Scandinavia + scaricity + scarcity + scavanged + scavenged + schedual + schedule + scholarhip + scholarship + scholarstic + scholastic + scientfic + scientific + scientifc + scientific + scientis + scientist + scince + science + scinece + science + scirpt + script + scoll + scroll + screenwrighter + screenwriter + scrutinity + scrutiny + scuptures + sculptures + seach + search + seached + searched + seaches + searches + secratary + secretary + secretery + secretary + sedereal + sidereal + seeked + sought + segementation + segmentation + seguoys + segues + seige + siege + seing + seeing + seinor + senior + seldomly + seldom + senarios + scenarios + senstive + sensitive + sensure + censure + seperate + separate + seperated + separated + seperately + separately + seperates + separates + seperating + separating + seperation + separation + seperatism + separatism + seperatist + separatist + sepina + subpoena + sergent + sergeant + settelement + settlement + settlment + settlement + severeal + several + severley + severely + severly + severely + sevice + service + shadasloo + shadaloo + shaddow + shadow + shadoloo + shadaloo + shamen + shaman + sheat + sheath + sheild + shield + sherif + sheriff + shineing + shining + shiped + shipped + shiping + shipping + shopkeeepers + shopkeepers + shorly + shortly + shortwhile + short while + shoudl + should + shoudln + shouldn't + shouldnt + shouldn't + shreak + shriek + shrinked + shrunk + sicne + since + sideral + sidereal + siezure + seizure + siezures + seizures + siginificant + significant + signficant + significant + signficiant + significant + signfies + signifies + signifantly + significantly + significently + significantly + signifigant + significant + signifigantly + significantly + signitories + signatories + signitory + signatory + similarily + similarly + similiar + similar + similiarity + similarity + similiarly + similarly + simmilar + similar + simpley + simply + simplier + simpler + simultanous + simultaneous + simultanously + simultaneously + sincerley + sincerely + singsog + singsong + sinse + since + skateing + skating + slaugterhouses + slaughterhouses + slighly + slightly + slowy + slowly + smae + same + smealting + smelting + smoe + some + sneeks + sneaks + snese + sneeze + socalism + socialism + socities + societies + soem + some + sofware + software + sohw + show + soilders + soldiers + solatary + solitary + soley + solely + soliders + soldiers + soliliquy + soliloquy + soluable + soluble + somene + someone + somtimes + sometimes + somwhere + somewhere + sophicated + sophisticated + sophmore + sophomore + sorceror + sorcerer + sorrounding + surrounding + sotry + story + sotyr + story + soudn + sound + soudns + sounds + sould + could + sountrack + soundtrack + sourth + south + sourthern + southern + souvenier + souvenir + souveniers + souvenirs + soveits + soviets + sovereignity + sovereignty + soverign + sovereign + soverignity + sovereignty + soverignty + sovereignty + spainish + Spanish + speach + speech + specfic + specific + speciallized + specialized + specifiying + specifying + speciman + specimen + spectauclar + spectacular + spectaulars + spectaculars + spectum + spectrum + speices + species + spendour + splendour + spermatozoan + spermatozoon + spoace + space + sponser + sponsor + sponsered + sponsored + spontanous + spontaneous + sponzored + sponsored + spoonfulls + spoonfuls + sppeches + speeches + spreaded + spread + sprech + speech + spred + spread + spriritual + spiritual + spritual + spiritual + sqaure + square + stablility + stability + stainlees + stainless + staion + station + standars + standards + stange + strange + startegic + strategic + startegies + strategies + startegy + strategy + stateman + statesman + statememts + statements + statment + statement + steriods + steroids + sterotypes + stereotypes + stilus + stylus + stingent + stringent + stiring + stirring + stirrs + stirs + stlye + style + stomache + stomach + stong + strong + stopry + story + storeis + stories + storise + stories + stornegst + strongest + stoyr + story + stpo + stop + stradegies + strategies + stradegy + strategy + strat + start + stratagically + strategically + streemlining + streamlining + stregth + strength + strenghen + strengthen + strenghened + strengthened + strenghening + strengthening + strenght + strength + strenghten + strengthen + strenghtened + strengthened + strenghtening + strengthening + strengtened + strengthened + strenous + strenuous + strictist + strictest + strikely + strikingly + strnad + strand + stroy + story + structual + structural + stubborness + stubbornness + stucture + structure + stuctured + structured + studdy + study + studing + studying + stuggling + struggling + sturcture + structure + subcatagories + subcategories + subcatagory + subcategory + subconsiously + subconsciously + subjudgation + subjugation + submachne + submachine + subpecies + subspecies + subsidary + subsidiary + subsiduary + subsidiary + subsquent + subsequent + subsquently + subsequently + substace + substance + substancial + substantial + substatial + substantial + substituded + substituted + substract + subtract + substracted + subtracted + substracting + subtracting + substraction + subtraction + substracts + subtracts + subtances + substances + subterranian + subterranean + suburburban + suburban + succceeded + succeeded + succcesses + successes + succedded + succeeded + succeded + succeeded + succeds + succeeds + succesful + successful + succesfully + successfully + succesfuly + successfully + succesion + succession + succesive + successive + successfull + successful + successully + successfully + succsess + success + succsessfull + successful + suceed + succeed + suceeded + succeeded + suceeding + succeeding + suceeds + succeeds + sucesful + successful + sucesfully + successfully + sucesfuly + successfully + sucesion + succession + sucess + success + sucesses + successes + sucessful + successful + sucessfull + successful + sucessfully + successfully + sucessfuly + successfully + sucession + succession + sucessive + successive + sucessor + successor + sucessot + successor + sucide + suicide + sucidial + suicidal + sufferage + suffrage + sufferred + suffered + sufferring + suffering + sufficent + sufficient + sufficently + sufficiently + sumary + summary + sunglases + sunglasses + suop + soup + superceeded + superseded + superintendant + superintendent + suphisticated + sophisticated + suplimented + supplemented + supose + suppose + suposed + supposed + suposedly + supposedly + suposes + supposes + suposing + supposing + supplamented + supplemented + suppliementing + supplementing + suppoed + supposed + supposingly + supposedly + suppy + supply + supress + suppress + supressed + suppressed + supresses + suppresses + supressing + suppressing + suprise + surprise + suprised + surprised + suprising + surprising + suprisingly + surprisingly + suprize + surprise + suprized + surprised + suprizing + surprising + suprizingly + surprisingly + surfce + surface + surley + surely + suround + surround + surounded + surrounded + surounding + surrounding + suroundings + surroundings + surounds + surrounds + surplanted + supplanted + surpress + suppress + surpressed + suppressed + surprize + surprise + surprized + surprised + surprizing + surprising + surprizingly + surprisingly + surrended + surrendered + surrepetitious + surreptitious + surrepetitiously + surreptitiously + surreptious + surreptitious + surreptiously + surreptitiously + surronded + surrounded + surrouded + surrounded + surrouding + surrounding + surrundering + surrendering + surveilence + surveillance + surveill + surveil + surveyer + surveyor + surviver + survivor + survivers + survivors + survivied + survived + suseptable + susceptible + suseptible + susceptible + suspention + suspension + swaer + swear + swaers + swears + swepth + swept + swiming + swimming + syas + says + symetrical + symmetrical + symetrically + symmetrically + symetry + symmetry + symettric + symmetric + symmetral + symmetric + symmetricaly + symmetrically + synagouge + synagogue + syncronization + synchronization + synonomous + synonymous + synonymns + synonyms + synphony + symphony + syphyllis + syphilis + sypmtoms + symptoms + syrap + syrup + sysmatically + systematically + sytem + system + sytle + style + tabacco + tobacco + tahn + than + taht + that + talekd + talked + targetted + targeted + targetting + targeting + tast + taste + tath + that + tattooes + tattoos + taxanomic + taxonomic + taxanomy + taxonomy + teached + taught + techician + technician + techicians + technicians + techiniques + techniques + technitian + technician + technnology + technology + technolgy + technology + teh + the + tehy + they + telelevision + television + televsion + television + telphony + telephony + temerature + temperature + tempalte + template + tempaltes + templates + temparate + temperate + temperarily + temporarily + temperment + temperament + tempertaure + temperature + temperture + temperature + temprary + temporary + tenacle + tentacle + tenacles + tentacles + tendacy + tendency + tendancies + tendencies + tendancy + tendency + tennisplayer + tennis player + tepmorarily + temporarily + terrestial + terrestrial + terriories + territories + terriory + territory + territorist + terrorist + territoy + territory + terroist + terrorist + testiclular + testicular + tghe + the + thast + that's + theather + theater + theese + these + theif + thief + theives + thieves + themselfs + themselves + themslves + themselves + ther + there + therafter + thereafter + therby + thereby + theri + their + theyre + they're + thgat + that + thge + the + thier + their + thign + thing + thigns + things + thigsn + things + thikn + think + thikning + thinking + thikns + thinks + thiunk + think + thn + then + thna + than + thne + then + thnig + thing + thnigs + things + thoughout + throughout + threatend + threatened + threatning + threatening + threee + three + threshhold + threshold + thrid + third + throrough + thorough + throughly + thoroughly + throught + throat + througout + throughout + thru + through + thsi + this + thsoe + those + thta + that + thyat + that + tiem + time + tihkn + think + tihs + this + timne + time + tiome + time + tje + the + tjhe + the + tjpanishad + upanishad + tkae + take + tkaes + takes + tkaing + taking + tlaking + talking + tobbaco + tobacco + todays + today's + todya + today + toghether + together + toke + took + tolerence + tolerance + tomatos + tomatoes + tommorow + tomorrow + tommorrow + tomorrow + tongiht + tonight + toriodal + toroidal + tormenters + tormentors + tornadoe + tornado + torpeados + torpedoes + torpedos + torpedoes + tothe + to the + toubles + troubles + tounge + tongue + tourch + torch + towords + towards + towrad + toward + tradionally + traditionally + traditionaly + traditionally + traditionnal + traditional + traditition + tradition + tradtionally + traditionally + trafficed + trafficked + trafficing + trafficking + trafic + traffic + trancendent + transcendent + trancending + transcending + tranform + transform + tranformed + transformed + transcendance + transcendence + transcendant + transcendent + transcendentational + transcendental + transcripting + transcribing + transending + transcending + transesxuals + transsexuals + transfered + transferred + transfering + transferring + transformaton + transformation + transistion + transition + translater + translator + translaters + translators + transmissable + transmissible + transporation + transportation + tremelo + tremolo + tremelos + tremolos + triguered + triggered + triology + trilogy + troling + trolling + troup + troupe + troups + troops + truely + truly + trustworthyness + trustworthiness + turnk + trunk + tust + trust + twelth + twelfth + twon + town + twpo + two + tyhat + that + tyhe + they + typcial + typical + typicaly + typically + tyranies + tyrannies + tyrany + tyranny + tyrranies + tyrannies + tyrrany + tyranny + ubiquitious + ubiquitous + ublisher + publisher + uise + use + ultimely + ultimately + unacompanied + unaccompanied + unahppy + unhappy + unanymous + unanimous + unathorised + unauthorised + unavailible + unavailable + unballance + unbalance + unbeknowst + unbeknownst + unbeleivable + unbelievable + uncertainity + uncertainty + unchallengable + unchallengeable + unchangable + unchangeable + uncompetive + uncompetitive + unconcious + unconscious + unconciousness + unconsciousness + unconfortability + discomfort + uncontitutional + unconstitutional + unconvential + unconventional + undecideable + undecidable + understoon + understood + undesireable + undesirable + undetecable + undetectable + undoubtely + undoubtedly + undreground + underground + uneccesary + unnecessary + unecessary + unnecessary + unequalities + inequalities + unforetunately + unfortunately + unforgetable + unforgettable + unforgiveable + unforgivable + unfortunatley + unfortunately + unfortunatly + unfortunately + unfourtunately + unfortunately + unihabited + uninhabited + unilateraly + unilaterally + unilatreal + unilateral + unilatreally + unilaterally + uninterruped + uninterrupted + uninterupted + uninterrupted + univeral + universal + univeristies + universities + univeristy + university + univerity + university + universtiy + university + univesities + universities + univesity + university + unkown + unknown + unlikey + unlikely + unmanouverable + unmaneuverable + unmistakeably + unmistakably + unneccesarily + unnecessarily + unneccesary + unnecessary + unneccessarily + unnecessarily + unneccessary + unnecessary + unnecesarily + unnecessarily + unnecesary + unnecessary + unoffical + unofficial + unoperational + nonoperational + unoticeable + unnoticeable + unplease + displease + unplesant + unpleasant + unprecendented + unprecedented + unprecidented + unprecedented + unrepentent + unrepentant + unrepetant + unrepentant + unrepetent + unrepentant + unsed + unused + unsubstanciated + unsubstantiated + unsuccesful + unsuccessful + unsuccesfully + unsuccessfully + unsuccessfull + unsuccessful + unsucesful + unsuccessful + unsucesfuly + unsuccessfully + unsucessful + unsuccessful + unsucessfull + unsuccessful + unsucessfully + unsuccessfully + unsuprised + unsurprised + unsuprising + unsurprising + unsuprisingly + unsurprisingly + unsuprized + unsurprised + unsuprizing + unsurprising + unsuprizingly + unsurprisingly + unsurprized + unsurprised + unsurprizing + unsurprising + unsurprizingly + unsurprisingly + untill + until + untranslateable + untranslatable + unuseable + unusable + unusuable + unusable + unviersity + university + unwarrented + unwarranted + unweildly + unwieldy + unwieldly + unwieldy + upcomming + upcoming + upgradded + upgraded + upto + up to + usally + usually + useage + usage + usefull + useful + usefuly + usefully + useing + using + usualy + usually + ususally + usually + vaccum + vacuum + vaccume + vacuum + vacinity + vicinity + vaguaries + vagaries + vaieties + varieties + vailidty + validity + valetta + valletta + valuble + valuable + valueable + valuable + varations + variations + varient + variant + variey + variety + varing + varying + varities + varieties + varity + variety + vasall + vassal + vasalls + vassals + vegatarian + vegetarian + vegitable + vegetable + vegitables + vegetables + vegtable + vegetable + vehicule + vehicle + vell + well + venemous + venomous + vengance + vengeance + vengence + vengeance + verfication + verification + verison + version + verisons + versions + vermillion + vermilion + versitilaty + versatility + versitlity + versatility + vetween + between + veyr + very + vigeur + vigor + vigilence + vigilance + vigourous + vigorous + villian + villain + villification + vilification + villify + vilify + villin + villain + vincinity + vicinity + violentce + violence + virtualy + virtually + virutal + virtual + virutally + virtually + visable + visible + visably + visibly + visting + visiting + vistors + visitors + vitories + victories + volcanoe + volcano + voleyball + volleyball + volontary + voluntary + volonteer + volunteer + volonteered + volunteered + volonteering + volunteering + volonteers + volunteers + volounteer + volunteer + volounteered + volunteered + volounteering + volunteering + volounteers + volunteers + volumne + volume + vreity + variety + vrey + very + vriety + variety + vulnerablility + vulnerability + vyer + very + vyre + very + waht + what + wanna + want to + warantee + warranty + wardobe + wardrobe + warrent + warrant + warrriors + warriors + wasnt + wasn't + wass + was + watn + want + wayword + wayward + weaponary + weaponry + weas + was + wehn + when + weild + wield + weilded + wielded + wendsay + Wednesday + wensday + Wednesday + wereabouts + whereabouts + whant + want + whants + wants + whcih + which + wheras + whereas + wherease + whereas + whereever + wherever + whic + which + whihc + which + whith + with + whlch + which + whn + when + wholey + wholly + wholy + holy + whta + what + whther + whether + wich + which + widesread + widespread + wief + wife + wierd + weird + wiew + view + wih + with + wiht + with + wille + will + willingless + willingness + wirting + writing + withdrawl + withdrawal + witheld + withheld + withh + with + withing + within + withold + withhold + witht + with + witn + with + wiull + will + wnat + want + wnated + wanted + wnats + wants + wohle + whole + wokr + work + wokring + working + wonderfull + wonderful + wont + won't + wordlwide + worldwide + workststion + workstation + worls + world + worstened + worsened + woudl + would + wresters + wrestlers + wriet + write + writen + written + wroet + wrote + wrok + work + wroking + working + wtih + with + wupport + support + xenophoby + xenophobia + yaching + yachting + yaer + year + yaerly + yearly + yaers + years + yatch + yacht + yearm + year + yeasr + years + yeild + yield + yeilding + yielding + yera + year + yeras + years + yersa + years + yotube + YouTube + youre + you're + youseff + yousef + youself + yourself + ytou + you + yuo + you + zeebra + zebra + + enabled + 1 + priority + 5 + wordStyle + 1 + + + diff --git a/indra/newview/llautocorrect.cpp b/indra/newview/llautocorrect.cpp new file mode 100644 index 0000000000..08643fea93 --- /dev/null +++ b/indra/newview/llautocorrect.cpp @@ -0,0 +1,402 @@ +/** + * @file llautocorrect.cpp + * @brief Auto Correct Manager + * @copyright Copyright (c) 2011 LordGregGreg Back + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "llviewerprecompiledheaders.h" +#include "llautocorrect.h" +#include "llsdserialize.h" +#include "llboost.h" +#include "llcontrol.h" +#include "llviewercontrol.h" +#include "llnotificationsutil.h" + +AutoCorrect* AutoCorrect::sInstance; + +AutoCorrect::AutoCorrect() +{ + sInstance = this; + sInstance->loadFromDisk(); +} + +AutoCorrect::~AutoCorrect() +{ + sInstance = NULL; +} + +AutoCorrect* AutoCorrect::getInstance() +{ + if(sInstance)return sInstance; + else + { + sInstance = new AutoCorrect(); + return sInstance; + } +} +void AutoCorrect::save() +{ + saveToDisk(mAutoCorrects); +} +std::string AutoCorrect::getFileName() +{ + std::string path=gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""); + + if (!path.empty()) + { + path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings_autocorrect.xml"); + } + return path; +} +std::string AutoCorrect::getDefaultFileName() +{ + std::string path=gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""); + + if (!path.empty()) + { + path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "settings_autocorrect.xml"); + } + return path; +} +LLSD AutoCorrect::exportList(std::string listName) +{ + LLSD toReturn; + if(mAutoCorrects.has(listName)) + { + toReturn["listName"]=listName; + toReturn["data"]=mAutoCorrects[listName]["data"]; + toReturn["author"]=mAutoCorrects[listName]["author"]; + toReturn["wordStyle"]=mAutoCorrects[listName]["wordStyle"]; + toReturn["priority"]=mAutoCorrects[listName]["priority"]; + } + return toReturn; +} +BOOL AutoCorrect::addCorrectionList(LLSD newList) +{ + if(newList.has("listName")) + { + std::string name = newList["listName"]; + //if(!mAutoCorrects.has(name)){ + LLSD newPart; + newPart["data"]=newList["data"]; + newPart["enabled"]=TRUE; + newPart["announce"]=FALSE; + newPart["author"]=newList["author"]; + newPart["wordStyle"]=newList["wordStyle"]; + newPart["priority"]=newList["priority"].asInteger(); + llinfos << "adding new list with settings priority "<fileExists(filename)) + { + std::string defaultName = getDefaultFileName(); + llinfos << " user settings file doesnt exist, going to try and read default one from "<fileExists(defaultName)) + { + LLSD blankllsd; + llifstream file; + file.open(defaultName.c_str()); + if (file.is_open()) + { + LLSDSerialize::fromXMLDocument(blankllsd, file); + } + file.close(); + saveToDisk(blankllsd); + }else + saveToDisk(getExampleLLSD()); + } + else + { + llifstream file; + file.open(filename.c_str()); + if (file.is_open()) + { + LLSDSerialize::fromXML(mAutoCorrects, file); + } + file.close(); + } +} +void AutoCorrect::saveToDisk(LLSD newSettings) +{ + mAutoCorrects=newSettings; + std::string filename=getFileName(); + llofstream file; + file.open(filename.c_str()); + LLSDSerialize::toPrettyXML(mAutoCorrects, file); + file.close(); +} +void AutoCorrect::runTest() +{ + std::string startS("He just abandonned all his abilties"); + std::string endS = replaceWords(startS); + llinfos << "!!! Test of autoreplace; start with "< doAnything(gSavedSettings, "EnableAutoCorrect"); + if(!(doAnything))return currentWord; + //loop through priorities + for(int currentPriority = 10;currentPriority>=0;currentPriority--) + { + LLSD::map_const_iterator loc_it = mAutoCorrects.beginMap(); + LLSD::map_const_iterator loc_end = mAutoCorrects.endMap(); + for ( ; loc_it != loc_end; ++loc_it) + { + const std::string& location = (*loc_it).first; + //llinfos << "location is "< " << replacement.c_str() << llendl; + return replacement; + } + } + } + } + return currentWord; +} +std::string AutoCorrect::replaceWords(std::string words) +{ + static LLCachedControl doAnything(gSavedSettings, "EnableAutoCorrect"); + if(!(doAnything))return words; + //TODO update this function to use the "wordStyle" thing, + //but so far this function is never used, so later + + boost_tokenizer tokens(words, boost::char_separator(" ")); + for (boost_tokenizer::iterator token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) + { + std::string currentWord(*token_iter); + LLSD::map_const_iterator loc_it = mAutoCorrects.beginMap(); + LLSD::map_const_iterator loc_end = mAutoCorrects.endMap(); + for ( ; loc_it != loc_end; ++loc_it) + { + const std::string& location = (*loc_it).first; + //llinfos << "location is "< " << replacement.c_str() << llendl; + int wordStart = words.find(currentWord); + words.replace(wordStart,currentWord.length(),replacement); + return replaceWords(words);//lol recursion! + } + } + } + return words; +} +BOOL AutoCorrect::addEntryToList(std::string wrong, std::string right, std::string listName) +{ + // *HACK: Make sure the "Custom" list exists, because the design of this + // system prevents us from updating it by changing the original file... + if(mAutoCorrects.has(listName)) + { + mAutoCorrects[listName]["data"][wrong]=right; + return TRUE; + } + else if(listName == "Custom") + { + mAutoCorrects[listName]["announce"] = 0; + mAutoCorrects[listName]["author"] = "You"; + mAutoCorrects[listName]["data"][wrong] = right; + mAutoCorrects[listName]["enabled"] = 1; + mAutoCorrects[listName]["priority"] = 10; + mAutoCorrects[listName]["wordStyle"] = 1; + return TRUE; + } + + return FALSE; +} +BOOL AutoCorrect::removeEntryFromList(std::string wrong, std::string listName) +{ + if(mAutoCorrects.has(listName)) + { + if(mAutoCorrects[listName]["data"].has(wrong)) + { + mAutoCorrects[listName]["data"].erase(wrong); + return TRUE; + } + } + return FALSE; +} + +LLSD AutoCorrect::getExampleLLSD() +{ + LLSD toReturn; + + LLSD listone; + LLSD listtwo; + + LLSD itemOne; + itemOne["wrong"]="wrong1"; + itemOne["right"]="right1"; + listone[0]=itemOne; + + LLSD itemTwo; + itemTwo["wrong"]="wrong2"; + itemTwo["right"]="right2"; + listone[1]=itemTwo; + + toReturn["listOne"]=listone; + + + itemOne["wrong"]="secondwrong1"; + itemOne["right"]="secondright1"; + listone[0]=itemOne; + + itemTwo["wrong"]="secondwrong2"; + itemTwo["right"]="secondright2"; + listone[1]=itemTwo; + + toReturn["listTwo"]=listone; + + return toReturn; +} + diff --git a/indra/newview/llautocorrect.h b/indra/newview/llautocorrect.h new file mode 100644 index 0000000000..ed8e819ca1 --- /dev/null +++ b/indra/newview/llautocorrect.h @@ -0,0 +1,60 @@ +/** + * @file llautocorrect.h + * @brief Auto Correct Manager + * @copyright Copyright (c) 2011 LordGregGreg Back + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ +#ifndef AUTO_CORRECT +#define AUTO_CORRECT +class AutoCorrect +{ + AutoCorrect(); + ~AutoCorrect(); + static AutoCorrect* sInstance; +public: + static AutoCorrect* getInstance(); + BOOL addCorrectionList(LLSD newList); + BOOL removeCorrectionList(std::string listName); + BOOL setListEnabled(std::string listName, BOOL enabled); + BOOL setListAnnounceeState(std::string listName, BOOL announce); + BOOL setListPriority(std::string listName, int priority); + BOOL setListStyle(std::string listName, BOOL announce); + std::string replaceWords(std::string words); + std::string replaceWord(std::string currentWord); + BOOL addEntryToList(std::string wrong, std::string right, std::string listName); + BOOL removeEntryFromList(std::string wrong, std::string listName); + BOOL saveListToDisk(std::string listName, std::string fileName); + LLSD exportList(std::string listName); + void runTest(); + LLSD getAutoCorrects(); + LLSD getAutoCorrectEntries(std::string listName); + void save(); + + void loadFromDisk(); + +private: + void saveToDisk(LLSD newSettings); + LLSD getExampleLLSD(); + std::string getFileName(); + std::string getDefaultFileName(); + + LLSD mAutoCorrects; + +}; + + + +#endif diff --git a/indra/newview/llautocorrectfloater.cpp b/indra/newview/llautocorrectfloater.cpp new file mode 100644 index 0000000000..6dca759b02 --- /dev/null +++ b/indra/newview/llautocorrectfloater.cpp @@ -0,0 +1,384 @@ +/** + * @file llautocorrectfloater.cpp + * @brief Auto Correct List floater + * @copyright Copyright (c) 2011 LordGregGreg Back + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "llviewerprecompiledheaders.h" + +#include "llautocorrectfloater.h" + +#include "llagentdata.h" +#include "llcommandhandler.h" +#include "llfloater.h" +#include "lluictrlfactory.h" +#include "llagent.h" +#include "llpanel.h" +#include "llbutton.h" +#include "llcolorswatch.h" +#include "llcombobox.h" +#include "llview.h" +#include "llhttpclient.h" +#include "llbufferstream.h" +#include "llcheckboxctrl.h" +#include "llviewercontrol.h" + +#include "llui.h" +#include "llcontrol.h" +#include "llscrollingpanellist.h" +#include "llautocorrect.h" +#include "llfilepicker.h" +#include "llfile.h" +#include "llsdserialize.h" +//#include "llfloaterchat.h" +#include "llchat.h" +#include "llinventorymodel.h" +#include "llhost.h" +#include "llassetstorage.h" +#include "roles_constants.h" +#include "llviewertexteditor.h" +#include + +#include +#include "llfloaterreg.h" +#include "llinspecttoast.h" +#include "llnotificationhandler.h" +#include "llnotificationmanager.h" + + +AutoCorrectFloater::AutoCorrectFloater(const LLSD& key) : +LLFloater(key) +{ +} +void AutoCorrectFloater::onClose(bool app_quitting) +{ + destroy(); +} + +BOOL AutoCorrectFloater::postBuild(void) +{ + + namesList = getChild("ac_list_name"); + entryList = getChild("ac_list_entry"); + + childSetCommitCallback("ac_enable",onBoxCommitEnabled,this); + + childSetCommitCallback("ac_list_enabled",onEntrySettingChange,this); + childSetCommitCallback("ac_list_show",onEntrySettingChange,this); + childSetCommitCallback("ac_list_style",onEntrySettingChange,this); + childSetCommitCallback("ac_priority",onEntrySettingChange,this); + + + + updateEnabledStuff(); + updateNamesList(); + + + namesList->setCommitOnSelectionChange(TRUE); + childSetCommitCallback("ac_list_name", onSelectName, this); + + childSetAction("ac_deletelist",removeList,this); + childSetAction("ac_rementry",deleteEntry,this); + childSetAction("ac_exportlist",exportList,this); + childSetAction("ac_addentry",addEntry,this); + childSetAction("ac_loadlist",loadList,this); + + return true; +} + +void AutoCorrectFloater::onSelectName(LLUICtrl* ctrl, void* user_data) +{ + if ( user_data ) + { + AutoCorrectFloater* self = ( AutoCorrectFloater* )user_data; + if ( self ) + self->updateItemsList(); + } + +} +void AutoCorrectFloater::updateItemsList() +{ + entryList->deleteAllItems(); + if((namesList->getAllSelected().size())<=0) + { + + updateListControlsEnabled(FALSE); + return; + } + + updateListControlsEnabled(TRUE); + std::string listName= namesList->getFirstSelected()->getColumn(0)->getValue().asString(); + + LLSD listData = AutoCorrect::getInstance()->getAutoCorrectEntries(listName); + childSetValue("ac_list_enabled",listData["enabled"].asBoolean()); + childSetValue("ac_list_style",listData["wordStyle"].asBoolean()); + childSetValue("ac_list_show",listData["announce"].asBoolean()); + childSetValue("ac_text_name",listName); + childSetValue("ac_text_author",listData["author"]); + childSetValue("ac_priority",listData["priority"]); + static LLCachedControl countAuto(gSavedSettings, "AutoCorrectCount"); + childSetValue("ac_stats",(S32)countAuto); + + LLSD autoCorrects = listData["data"]; + LLSD::map_const_iterator loc_it = autoCorrects.beginMap(); + LLSD::map_const_iterator loc_end = autoCorrects.endMap(); + for ( ; loc_it != loc_end; ++loc_it) + { + const std::string& wrong = (*loc_it).first; + const std::string& right = (*loc_it).second; + + //std::string lentry(wrong+"=>"+right); + + LLSD element; + element["id"] = wrong; + LLSD& s_column = element["columns"][0]; + s_column["column"] = "Search"; + s_column["value"] = wrong; + s_column["font"] = "SANSSERIF"; + LLSD& r_column = element["columns"][1]; + r_column["column"] = "Replace"; + r_column["value"] = right; + r_column["font"] = "SANSSERIF"; + + entryList->addElement(element, ADD_BOTTOM); + } + +} +void AutoCorrectFloater::updateNamesList() +{ + namesList->deleteAllItems(); + static LLCachedControl enabledd(gSavedSettings, "EnableAutoCorrect"); + if(!(enabledd)) + { + updateItemsList(); + return; + } + static LLCachedControl countAuto(gSavedSettings, "AutoCorrectCount"); + childSetValue("ac_stats",(S32)countAuto); + LLSD autoCorrects = AutoCorrect::getInstance()->getAutoCorrects(); + LLSD::map_const_iterator loc_it = autoCorrects.beginMap(); + LLSD::map_const_iterator loc_end = autoCorrects.endMap(); + for ( ; loc_it != loc_end; ++loc_it) + { + const std::string& listName = (*loc_it).first; + + LLSD element; + element["id"] = listName; + LLSD& friend_column = element["columns"][0]; + friend_column["column"] = "Entries"; + friend_column["value"] = listName; + //friend_column["font"] = "SANSSERIF"; + const LLSD& loc_map = (*loc_it).second; + if(loc_map["enabled"].asBoolean()) + friend_column["font"] = "SANSSERIF"; + //friend_column["style"] = "BOLD"; + else + friend_column["font"] = "SANSSERIF_SMALL"; + //friend_column["style"] = "NORMAL"; + if(namesList) + namesList->addElement(element, ADD_BOTTOM); + } + updateItemsList(); +} +void AutoCorrectFloater::updateListControlsEnabled(BOOL selected) +{ + + childSetEnabled("ac_text1",selected); + childSetEnabled("ac_text2",selected); + childSetEnabled("ac_text_name",selected); + childSetEnabled("ac_text_author",selected); + childSetEnabled("ac_list_enabled",selected); + childSetEnabled("ac_list_show",selected); + childSetEnabled("ac_list_style",selected); + childSetEnabled("ac_deletelist",selected); + childSetEnabled("ac_exportlist",selected); + childSetEnabled("ac_addentry",selected); + childSetEnabled("ac_rementry",selected); + childSetEnabled("ac_priority",selected); + +} +void AutoCorrectFloater::updateEnabledStuff() +{ + static LLCachedControl enabledd(gSavedSettings, "EnableAutoCorrect"); + if(!(enabledd)) + { + LLCheckBoxCtrl *enBox = getChild("ac_enable"); + enBox->setDisabledColor(LLColor4::red); + getChild("ac_enable")->setEnabledColor(LLColor4(1.0f,0.0f,0.0f,1.0f)); + }else + { + getChild("ac_enable")->setEnabledColor( + LLUIColorTable::instance().getColor( "LabelTextColor" )); + } + + childSetEnabled("ac_list_name",enabledd); + childSetEnabled("ac_list_entry",enabledd); + updateListControlsEnabled(enabledd); + updateNamesList(); + AutoCorrect::getInstance()->save(); + +} +void AutoCorrectFloater::setData(void * data) +{ + //empanel = (LLPanel*)data; +} +void AutoCorrectFloater::onBoxCommitEnabled(LLUICtrl* caller, void* user_data) +{ + if ( user_data ) + { + AutoCorrectFloater* self = ( AutoCorrectFloater* )user_data; + if ( self ) + { + self->updateEnabledStuff(); + } + } +} +void AutoCorrectFloater::onEntrySettingChange(LLUICtrl* caller, void* user_data) +{ + if ( user_data ) + { + AutoCorrectFloater* self = ( AutoCorrectFloater* )user_data; + if ( self ) + { + std::string listName= self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); + AutoCorrect::getInstance()->setListEnabled(listName,self->childGetValue("ac_list_enabled").asBoolean()); + AutoCorrect::getInstance()->setListAnnounceeState(listName,self->childGetValue("ac_list_show").asBoolean()); + AutoCorrect::getInstance()->setListStyle(listName,self->childGetValue("ac_list_style").asBoolean()); + AutoCorrect::getInstance()->setListPriority(listName,self->childGetValue("ac_priority").asInteger()); + + //sInstance->updateEnabledStuff(); + self->updateItemsList(); + AutoCorrect::getInstance()->save(); + } + } +} +void AutoCorrectFloater::deleteEntry(void* data) +{ + if ( data ) + { + AutoCorrectFloater* self = ( AutoCorrectFloater* )data; + if ( self ) + { + + std::string listName=self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); + + if((self->entryList->getAllSelected().size())>0) + { + std::string wrong= self->entryList->getFirstSelected()->getColumn(0)->getValue().asString(); + AutoCorrect::getInstance()->removeEntryFromList(wrong,listName); + self->updateItemsList(); + AutoCorrect::getInstance()->save(); + } + } + } +} +void AutoCorrectFloater::loadList(void* data) +{ + LLFilePicker& picker = LLFilePicker::instance(); + + if(!picker.getOpenFile( LLFilePicker::FFLOAD_XML) ) + {return; + } + llifstream file; + file.open(picker.getFirstFile().c_str()); + LLSD blankllsd; + if (file.is_open()) + { + LLSDSerialize::fromXMLDocument(blankllsd, file); + } + file.close(); + gSavedSettings.setBOOL("EnableAutoCorrect",true); + AutoCorrect::getInstance()->addCorrectionList(blankllsd); + if ( data ) + { + AutoCorrectFloater* self = ( AutoCorrectFloater* )data; + if ( self ) + self->updateEnabledStuff(); + } +} +void AutoCorrectFloater::removeList(void* data) +{ + if ( data ) + { + AutoCorrectFloater* self = ( AutoCorrectFloater* )data; + if ( self ) + { + std::string listName= self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); + AutoCorrect::getInstance()->removeCorrectionList(listName); + self->updateEnabledStuff(); + } + + } +} +void AutoCorrectFloater::exportList(void *data) +{ + if ( data ) + { + AutoCorrectFloater* self = ( AutoCorrectFloater* )data; + if ( self ) + { + std::string listName=self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); + + LLFilePicker& picker = LLFilePicker::instance(); + + if(!picker.getSaveFile( LLFilePicker::FFSAVE_XML) ) + {return; + } + llofstream file; + file.open(picker.getFirstFile().c_str()); + LLSDSerialize::toPrettyXML(AutoCorrect::getInstance()->exportList(listName), file); + file.close(); + } + + } +} +void AutoCorrectFloater::addEntry(void* data) +{ + if ( data ) + { + AutoCorrectFloater* self = ( AutoCorrectFloater* )data; + if ( self ) + { + std::string listName= self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); + LLChat chat; + chat.mText ="To add an entry, please type in chat \""+gSavedSettings.getString("CmdLineAutocorrect")+" "+listName+"|wrongWord|rightWord\""; + + chat.mSourceType = CHAT_SOURCE_SYSTEM; + LLSD args; + args["type"] = LLNotificationsUI::NT_NEARBYCHAT; + LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args); + + } + } + +} +AutoCorrectFloater* AutoCorrectFloater::showFloater() +{ + AutoCorrectFloater *floater = dynamic_cast(LLFloaterReg::getInstance("autocorrect")); + if(floater) + { + floater->setVisible(true); + floater->setFrontmost(true); + floater->center(); + return floater; + } + else + { + LL_WARNS("AutoCorrect") << "Can't find floater!" << LL_ENDL; + return NULL; + } +} diff --git a/indra/newview/llautocorrectfloater.h b/indra/newview/llautocorrectfloater.h new file mode 100644 index 0000000000..bec7161d1a --- /dev/null +++ b/indra/newview/llautocorrectfloater.h @@ -0,0 +1,67 @@ +/** + * @file llautocorrectfloater.h + * @brief Auto Correct List floater + * @copyright Copyright (c) 2011 LordGregGreg Back + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AUTOCORRECTFLOATER_H +#define AUTOCORRECTFLOATER_H + +#include "llfloater.h" +#include "llmediactrl.h" +#include "llscrolllistctrl.h" + +#include "llviewerinventory.h" +#include + +class AutoCorrectFloater : +public LLFloater +{ +public: + AutoCorrectFloater(const LLSD& key); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onClose(bool app_quitting); + + static AutoCorrectFloater* showFloater(); + + void setData(void * data); + void updateEnabledStuff(); + void updateNamesList(); + void updateListControlsEnabled(BOOL selected); + void updateItemsList(); + + LLScrollListCtrl *namesList; + LLScrollListCtrl *entryList; + //LLPanel * empanel; +private: + //static JCInvDropTarget* mNotecardDropTarget; + static void onBoxCommitEnabled(LLUICtrl* caller, void* user_data); + static void onEntrySettingChange(LLUICtrl* caller, void* user_data); + static void onSelectName(LLUICtrl* caller, void* user_data); + //static void ResponseItemDrop(LLViewerInventoryItem* item); + //static void onNotecardLoadComplete(LLVFS *vfs,const LLUUID& asset_uuid,LLAssetType::EType type,void* user_data, S32 status, LLExtStat ext_status); + + + static void deleteEntry(void* data); + static void addEntry(void* data); + static void exportList(void* data); + static void removeList(void* data); + static void loadList(void* data); +}; + +#endif // AUTOCORRECTFLOATER_H diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index a333989e7e..368d8f1efe 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -35,7 +35,7 @@ #include "llfloaterpreference.h" #include "message.h" - +#include "llautocorrectfloater.h" #include "llagent.h" #include "llavatarconstants.h" #include "llcheckboxctrl.h" @@ -354,6 +354,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) gSavedSettings.getControl("NameTagShowUsernames")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2)); + + mCommitCallbackRegistrar.add("Pref.ShowAC", boost::bind(&AutoCorrectFloater::showFloater)); LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this ); } diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 8406f639df..3d33125b6a 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -30,7 +30,7 @@ #include "llfloaterreg.h" #include "llviewerfloaterreg.h" - +#include "llautocorrectfloater.h" #include "llcompilequeue.h" #include "llcallfloater.h" #include "llfasttimerview.h" @@ -169,6 +169,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("autocorrect", "floater_autocorrect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar", "floater_avatar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/xui/en/floater_autocorrect.xml b/indra/newview/skins/default/xui/en/floater_autocorrect.xml new file mode 100644 index 0000000000..0b8ed1c067 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_autocorrect.xml @@ -0,0 +1,83 @@ + + + + - \ No newline at end of file + + -- cgit v1.2.3 From 9c66ac87fd46db3987e60ae50989b2497099480b Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 20 Jan 2012 18:06:32 +0100 Subject: STORM-276 Basic spellchecking framework --- indra/cmake/Copy3rdPartyLibs.cmake | 3 + indra/cmake/ViewerMiscLibs.cmake | 1 + indra/llui/CMakeLists.txt | 3 + indra/llui/llmenugl.cpp | 6 +- indra/llui/llmenugl.h | 6 +- indra/llui/llspellcheck.cpp | 345 ++++++++++++++++++++++++++++++++ indra/llui/llspellcheck.h | 77 +++++++ indra/llui/llspellcheckmenuhandler.h | 46 +++++ indra/newview/app_settings/settings.xml | 22 ++ indra/newview/llappviewer.cpp | 14 ++ indra/newview/llstartup.cpp | 1 + indra/newview/llviewercontrol.cpp | 24 +++ indra/newview/llviewermenu.cpp | 86 ++++++++ indra/newview/llviewermenu.h | 1 + indra/newview/viewer_manifest.py | 8 + 15 files changed, 641 insertions(+), 2 deletions(-) create mode 100644 indra/llui/llspellcheck.cpp create mode 100644 indra/llui/llspellcheck.h create mode 100644 indra/llui/llspellcheckmenuhandler.h (limited to 'indra') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 394db362b1..ebeae3e5be 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -41,6 +41,7 @@ if(WINDOWS) libeay32.dll libcollada14dom22-d.dll glod.dll + libhunspell.dll ) set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}") @@ -53,6 +54,7 @@ if(WINDOWS) libeay32.dll libcollada14dom22.dll glod.dll + libhunspell.dll ) if(USE_GOOGLE_PERFTOOLS) @@ -215,6 +217,7 @@ elseif(DARWIN) libllqtwebkit.dylib libminizip.a libndofdev.dylib + libhunspell-1.3.dylib libexception_handler.dylib libcollada14dom.dylib ) diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index df013b1665..f907181929 100644 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -2,6 +2,7 @@ include(Prebuilt) if (NOT STANDALONE) + use_prebuilt_binary(libhunspell) use_prebuilt_binary(libuuid) use_prebuilt_binary(slvoice) use_prebuilt_binary(fontconfig) diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 772f173f17..1377336bb4 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -87,6 +87,7 @@ set(llui_SOURCE_FILES llsearcheditor.cpp llslider.cpp llsliderctrl.cpp + llspellcheck.cpp llspinctrl.cpp llstatbar.cpp llstatgraph.cpp @@ -192,6 +193,8 @@ set(llui_HEADER_FILES llsdparam.h llsliderctrl.h llslider.h + llspellcheck.h + llspellcheckmenuhandler.h llspinctrl.h llstatbar.h llstatgraph.h diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 95ecbb1c94..2a65262bbb 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3854,7 +3854,7 @@ void LLContextMenu::setVisible(BOOL visible) } // Takes cursor position in screen space? -void LLContextMenu::show(S32 x, S32 y) +void LLContextMenu::show(S32 x, S32 y, LLView* spawning_view) { if (getChildList()->empty()) { @@ -3908,6 +3908,10 @@ void LLContextMenu::show(S32 x, S32 y) setRect(rect); arrange(); + if (spawning_view) + mSpawningViewHandle = spawning_view->getHandle(); + else + mSpawningViewHandle.markDead(); LLView::setVisible(TRUE); } diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 36f3ba34b9..67b3e1fbe6 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -670,7 +670,7 @@ public: virtual void draw (); - virtual void show (S32 x, S32 y); + virtual void show (S32 x, S32 y, LLView* spawning_view = NULL); virtual void hide (); virtual BOOL handleHover ( S32 x, S32 y, MASK mask ); @@ -683,10 +683,14 @@ public: LLHandle getHandle() { return getDerivedHandle(); } + LLView* getSpawningView() const { return mSpawningViewHandle.get(); } + void setSpawningView(LLHandle spawning_view) { mSpawningViewHandle = spawning_view; } + protected: BOOL mHoveredAnyItem; LLMenuItemGL* mHoverItem; LLRootHandle mHandle; + LLHandle mSpawningViewHandle; }; diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp new file mode 100644 index 0000000000..433ca02852 --- /dev/null +++ b/indra/llui/llspellcheck.cpp @@ -0,0 +1,345 @@ +/** + * @file llspellcheck.cpp + * @brief Spell checking functionality + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "linden_common.h" + +#include "lldir.h" +#include "llsdserialize.h" + +#include "llspellcheck.h" +#if LL_WINDOWS + #include + #pragma comment(lib, "libhunspell.lib") +#else + #include +#endif + +static const std::string DICT_DIR = "dictionaries"; +static const std::string DICT_CUSTOM_SUFFIX = "_custom"; +static const std::string DICT_IGNORE_SUFFIX = "_ignore"; + +LLSpellChecker::settings_change_signal_t LLSpellChecker::sSettingsChangeSignal; + +LLSpellChecker::LLSpellChecker() + : mHunspell(NULL) +{ + // Load initial dictionary information + refreshDictionaryMap(); +} + +LLSpellChecker::~LLSpellChecker() +{ + delete mHunspell; +} + +bool LLSpellChecker::checkSpelling(const std::string& word) const +{ + if ( (!mHunspell) || (word.length() < 3) || (0 != mHunspell->spell(word.c_str())) ) + { + return true; + } + if (mIgnoreList.size() > 0) + { + std::string word_lower(word); + LLStringUtil::toLower(word_lower); + return (mIgnoreList.end() != std::find(mIgnoreList.begin(), mIgnoreList.end(), word_lower)); + } + return false; +} + +S32 LLSpellChecker::getSuggestions(const std::string& word, std::vector& suggestions) const +{ + suggestions.clear(); + if ( (!mHunspell) || (word.length() < 3) ) + return 0; + + char** suggestion_list; int suggestion_cnt = 0; + if ( (suggestion_cnt = mHunspell->suggest(&suggestion_list, word.c_str())) != 0 ) + { + for (int suggestion_index = 0; suggestion_index < suggestion_cnt; suggestion_index++) + suggestions.push_back(suggestion_list[suggestion_index]); + mHunspell->free_list(&suggestion_list, suggestion_cnt); + } + return suggestions.size(); +} + +const LLSD LLSpellChecker::getDictionaryData(const std::string& dict_name) const +{ + for (LLSD::array_const_iterator it = mDictMap.beginArray(); it != mDictMap.endArray(); ++it) + { + const LLSD& dict_entry = *it; + if (dict_name == dict_entry["language"].asString()) + return dict_entry; + } + return LLSD(); +} + +void LLSpellChecker::refreshDictionaryMap() +{ + const std::string app_path = getDictionaryAppPath(); + const std::string user_path = getDictionaryUserPath(); + + // Load dictionary information (file name, friendly name, ...) + llifstream user_map(user_path + "dictionaries.xml", std::ios::binary); + if ( (!user_map.is_open()) || (0 == LLSDSerialize::fromXMLDocument(mDictMap, user_map)) || (0 == mDictMap.size()) ) + { + llifstream app_map(app_path + "dictionaries.xml", std::ios::binary); + if ( (!app_map.is_open()) || (0 == LLSDSerialize::fromXMLDocument(mDictMap, app_map)) || (0 == mDictMap.size()) ) + return; + } + + // Look for installed dictionaries + std::string tmp_app_path, tmp_user_path; + for (LLSD::array_iterator it = mDictMap.beginArray(); it != mDictMap.endArray(); ++it) + { + LLSD& sdDict = *it; + tmp_app_path = (sdDict.has("name")) ? app_path + sdDict["name"].asString() : LLStringUtil::null; + tmp_user_path = (sdDict.has("name")) ? user_path + sdDict["name"].asString() : LLStringUtil::null; + sdDict["installed"] = + (!tmp_app_path.empty()) && + ( ((gDirUtilp->fileExists(tmp_user_path + ".aff")) && (gDirUtilp->fileExists(tmp_user_path + ".dic"))) || + ((gDirUtilp->fileExists(tmp_app_path + ".aff")) && (gDirUtilp->fileExists(tmp_app_path + ".dic"))) ); + sdDict["has_custom"] = (!tmp_user_path.empty()) && (gDirUtilp->fileExists(tmp_user_path + DICT_CUSTOM_SUFFIX + ".dic")); + sdDict["has_ignore"] = (!tmp_user_path.empty()) && (gDirUtilp->fileExists(tmp_user_path + DICT_IGNORE_SUFFIX + ".dic")); + } +} + +void LLSpellChecker::addToCustomDictionary(const std::string& word) +{ + if (mHunspell) + { + mHunspell->add(word.c_str()); + } + addToDictFile(getDictionaryUserPath() + mDictFile + DICT_CUSTOM_SUFFIX + ".dic", word); + sSettingsChangeSignal(); +} + +void LLSpellChecker::addToIgnoreList(const std::string& word) +{ + std::string word_lower(word); + LLStringUtil::toLower(word_lower); + if (mIgnoreList.end() != std::find(mIgnoreList.begin(), mIgnoreList.end(), word_lower)) + { + mIgnoreList.push_back(word_lower); + addToDictFile(getDictionaryUserPath() + mDictFile + DICT_IGNORE_SUFFIX + ".dic", word_lower); + sSettingsChangeSignal(); + } +} + +void LLSpellChecker::addToDictFile(const std::string& dict_path, const std::string& word) +{ + std::vector word_list; + + if (gDirUtilp->fileExists(dict_path)) + { + llifstream file_in(dict_path, std::ios::in); + if (file_in.is_open()) + { + std::string word; int line_num = 0; + while (getline(file_in, word)) + { + // Skip over the first line since that's just a line count + if (0 != line_num) + word_list.push_back(word); + line_num++; + } + } + else + { + // TODO: show error message? + return; + } + } + + word_list.push_back(word); + + llofstream file_out(dict_path, std::ios::out | std::ios::trunc); + if (file_out.is_open()) + { + file_out << word_list.size() << std::endl; + for (std::vector::const_iterator itWord = word_list.begin(); itWord != word_list.end(); ++itWord) + file_out << *itWord << std::endl; + file_out.close(); + } +} + +void LLSpellChecker::setSecondaryDictionaries(std::list dict_list) +{ + if (!getUseSpellCheck()) + { + return; + } + + // Check if we're only adding secondary dictionaries, or removing them + std::list dict_add(llmax(dict_list.size(), mDictSecondary.size())), dict_rem(llmax(dict_list.size(), mDictSecondary.size())); + dict_list.sort(); + mDictSecondary.sort(); + std::list::iterator end_added = std::set_difference(dict_list.begin(), dict_list.end(), mDictSecondary.begin(), mDictSecondary.end(), dict_add.begin()); + std::list::iterator end_removed = std::set_difference(mDictSecondary.begin(), mDictSecondary.end(), dict_list.begin(), dict_list.end(), dict_rem.begin()); + + if (end_removed != dict_rem.begin()) // We can't remove secondary dictionaries so we need to recreate the Hunspell instance + { + mDictSecondary = dict_list; + + std::string dict_name = mDictName; + initHunspell(dict_name); + } + else if (end_added != dict_add.begin()) // Add the new secondary dictionaries one by one + { + const std::string app_path = getDictionaryAppPath(); + const std::string user_path = getDictionaryUserPath(); + for (std::list::const_iterator it_added = dict_add.begin(); it_added != end_added; ++it_added) + { + const LLSD dict_entry = getDictionaryData(*it_added); + if ( (!dict_entry.isDefined()) || (!dict_entry["installed"].asBoolean()) ) + continue; + + const std::string strFileDic = dict_entry["name"].asString() + ".dic"; + if (gDirUtilp->fileExists(user_path + strFileDic)) + mHunspell->add_dic((user_path + strFileDic).c_str()); + else if (gDirUtilp->fileExists(app_path + strFileDic)) + mHunspell->add_dic((app_path + strFileDic).c_str()); + } + mDictSecondary = dict_list; + sSettingsChangeSignal(); + } +} + +void LLSpellChecker::initHunspell(const std::string& dict_name) +{ + if (mHunspell) + { + delete mHunspell; + mHunspell = NULL; + mDictName.clear(); + mDictFile.clear(); + mIgnoreList.clear(); + } + + const LLSD dict_entry = (!dict_name.empty()) ? getDictionaryData(dict_name) : LLSD(); + if ( (!dict_entry.isDefined()) || (!dict_entry["installed"].asBoolean()) ) + { + sSettingsChangeSignal(); + return; + } + + const std::string app_path = getDictionaryAppPath(); + const std::string user_path = getDictionaryUserPath(); + if (dict_entry.has("name")) + { + const std::string filename_aff = dict_entry["name"].asString() + ".aff"; + const std::string filename_dic = dict_entry["name"].asString() + ".dic"; + if ( (gDirUtilp->fileExists(user_path + filename_aff)) && (gDirUtilp->fileExists(user_path + filename_dic)) ) + mHunspell = new Hunspell((user_path + filename_aff).c_str(), (user_path + filename_dic).c_str()); + else if ( (gDirUtilp->fileExists(app_path + filename_aff)) && (gDirUtilp->fileExists(app_path + filename_dic)) ) + mHunspell = new Hunspell((app_path + filename_aff).c_str(), (app_path + filename_dic).c_str()); + if (!mHunspell) + return; + + mDictName = dict_name; + mDictFile = dict_entry["name"].asString(); + + if (dict_entry["has_custom"].asBoolean()) + { + const std::string filename_dic = user_path + mDictFile + DICT_CUSTOM_SUFFIX + ".dic"; + mHunspell->add_dic(filename_dic.c_str()); + } + + if (dict_entry["has_ignore"].asBoolean()) + { + llifstream file_in(user_path + mDictFile + DICT_IGNORE_SUFFIX + ".dic", std::ios::in); + if (file_in.is_open()) + { + std::string word; int idxLine = 0; + while (getline(file_in, word)) + { + // Skip over the first line since that's just a line count + if (0 != idxLine) + { + LLStringUtil::toLower(word); + mIgnoreList.push_back(word); + } + idxLine++; + } + } + } + + for (std::list::const_iterator it = mDictSecondary.begin(); it != mDictSecondary.end(); ++it) + { + const LLSD dict_entry = getDictionaryData(*it); + if ( (!dict_entry.isDefined()) || (!dict_entry["installed"].asBoolean()) ) + continue; + + const std::string filename_dic = dict_entry["name"].asString() + ".dic"; + if (gDirUtilp->fileExists(user_path + filename_dic)) + mHunspell->add_dic((user_path + filename_dic).c_str()); + else if (gDirUtilp->fileExists(app_path + filename_dic)) + mHunspell->add_dic((app_path + filename_dic).c_str()); + } + } + + sSettingsChangeSignal(); +} + +// static +const std::string LLSpellChecker::getDictionaryAppPath() +{ + std::string dict_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, DICT_DIR, ""); + return dict_path; +} + +// static +const std::string LLSpellChecker::getDictionaryUserPath() +{ + std::string dict_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, DICT_DIR, ""); + if (!gDirUtilp->fileExists(dict_path)) + { + LLFile::mkdir(dict_path); + } + return dict_path; +} + +// static +bool LLSpellChecker::getUseSpellCheck() +{ + return (LLSpellChecker::instanceExists()) && (LLSpellChecker::instance().mHunspell); +} + +// static +boost::signals2::connection LLSpellChecker::setSettingsChangeCallback(const settings_change_signal_t::slot_type& cb) +{ + return sSettingsChangeSignal.connect(cb); +} + +// static +void LLSpellChecker::setUseSpellCheck(const std::string& dict_name) +{ + if ( (((dict_name.empty()) && (getUseSpellCheck())) || (!dict_name.empty())) && + (LLSpellChecker::instance().mDictName != dict_name) ) + { + LLSpellChecker::instance().initHunspell(dict_name); + } +} diff --git a/indra/llui/llspellcheck.h b/indra/llui/llspellcheck.h new file mode 100644 index 0000000000..affdac2907 --- /dev/null +++ b/indra/llui/llspellcheck.h @@ -0,0 +1,77 @@ +/** + * @file llspellcheck.h + * @brief Spell checking functionality + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LLSPELLCHECK_H +#define LLSPELLCHECK_H + +#include "llsingleton.h" +#include + +class Hunspell; + +class LLSpellChecker : public LLSingleton +{ + friend class LLSingleton; +protected: + LLSpellChecker(); + ~LLSpellChecker(); + +public: + void addToCustomDictionary(const std::string& word); + void addToIgnoreList(const std::string& word); + bool checkSpelling(const std::string& word) const; + S32 getSuggestions(const std::string& word, std::vector& suggestions) const; + +public: + const LLSD getDictionaryData(const std::string& dict_name) const; + const LLSD& getDictionaryMap() const { return mDictMap; } + void refreshDictionaryMap(); + void setSecondaryDictionaries(std::list dictList); +protected: + void addToDictFile(const std::string& dict_path, const std::string& word); + void initHunspell(const std::string& dict_name); + +public: + static const std::string getDictionaryAppPath(); + static const std::string getDictionaryUserPath(); + static bool getUseSpellCheck(); + static void setUseSpellCheck(const std::string& dict_name); + + typedef boost::signals2::signal settings_change_signal_t; + static boost::signals2::connection setSettingsChangeCallback(const settings_change_signal_t::slot_type& cb); + +protected: + Hunspell* mHunspell; + std::string mDictName; + std::string mDictFile; + LLSD mDictMap; + std::list mDictSecondary; + std::vector mIgnoreList; + + static settings_change_signal_t sSettingsChangeSignal; +}; + +#endif // LLSPELLCHECK_H diff --git a/indra/llui/llspellcheckmenuhandler.h b/indra/llui/llspellcheckmenuhandler.h new file mode 100644 index 0000000000..d5c95bad39 --- /dev/null +++ b/indra/llui/llspellcheckmenuhandler.h @@ -0,0 +1,46 @@ +/** + * @file llspellcheckmenuhandler.h + * @brief Interface used by spell check menu handling + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LLSPELLCHECKMENUHANDLER_H +#define LLSPELLCHECKMENUHANDLER_H + +class LLSpellCheckMenuHandler +{ +public: + virtual bool getSpellCheck() const { return false; } + + virtual const std::string& getSuggestion(U32 index) const { return LLStringUtil::null; } + virtual U32 getSuggestionCount() const { return 0; } + virtual void replaceWithSuggestion(U32 index){} + + virtual void addToDictionary() {} + virtual bool canAddToDictionary() const { return false; } + + virtual void addToIgnore() {} + virtual bool canAddToIgnore() const { return false; } +}; + +#endif // LLSPELLCHECKMENUHANDLER_H diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 1ea623791d..1ad3ee1dd1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12082,6 +12082,28 @@ Value 10.0 + SpellCheck + + Comment + Enable spellchecking on line and text editors + Persist + 1 + Type + Boolean + Value + 1 + + SpellCheckDictionary + + Comment + Current primary and secondary dictionaries used for spell checking + Persist + 1 + Type + String + Value + English (United States) + UseNewWalkRun Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0861fe85a8..698f2469a3 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -91,6 +91,7 @@ #include "llsecondlifeurls.h" #include "llupdaterservice.h" #include "llcallfloater.h" +#include "llspellcheck.h" // Linden library includes #include "llavatarnamecache.h" @@ -112,6 +113,7 @@ // Third party library includes #include #include +#include @@ -2488,6 +2490,18 @@ bool LLAppViewer::initConfiguration() //gDirUtilp->setSkinFolder("default"); } + if (gSavedSettings.getBOOL("SpellCheck")) + { + std::list dict_list; + boost::split(dict_list, gSavedSettings.getString("SpellCheckDictionary"), boost::is_any_of(std::string(","))); + if (!dict_list.empty()) + { + LLSpellChecker::setUseSpellCheck(dict_list.front()); + dict_list.pop_front(); + LLSpellChecker::instance().setSecondaryDictionaries(dict_list); + } + } + mYieldTime = gSavedSettings.getS32("YieldTime"); // Read skin/branding settings if specified. diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 7e02a41e7e..89360778d1 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -739,6 +739,7 @@ bool idle_startup() { display_startup(); initialize_edit_menu(); + initialize_spellcheck_menu(); display_startup(); init_menus(); display_startup(); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 093b84413a..7b6dbfaa0b 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -71,8 +71,12 @@ #include "llpaneloutfitsinventory.h" #include "llpanellogin.h" #include "llpaneltopinfobar.h" +#include "llspellcheck.h" #include "llupdaterservice.h" +// Third party library includes +#include + #ifdef TOGGLE_HACKED_GODLIKE_VIEWER BOOL gHackGodmode = FALSE; #endif @@ -498,6 +502,24 @@ bool handleForceShowGrid(const LLSD& newvalue) return true; } +bool handleSpellCheckChanged() +{ + if (gSavedSettings.getBOOL("SpellCheck")) + { + std::list dict_list; + boost::split(dict_list, gSavedSettings.getString("SpellCheckDictionary"), boost::is_any_of(std::string(","))); + if (!dict_list.empty()) + { + LLSpellChecker::setUseSpellCheck(dict_list.front()); + dict_list.pop_front(); + LLSpellChecker::instance().setSecondaryDictionaries(dict_list); + return true; + } + } + LLSpellChecker::setUseSpellCheck(LLStringUtil::null); + return true; +} + bool toggle_agent_pause(const LLSD& newvalue) { if ( newvalue.asBoolean() ) @@ -704,6 +726,8 @@ void settings_setup_listeners() gSavedSettings.getControl("UpdaterServiceSetting")->getSignal()->connect(boost::bind(&toggle_updater_service_active, _2)); gSavedSettings.getControl("ForceShowGrid")->getSignal()->connect(boost::bind(&handleForceShowGrid, _2)); gSavedSettings.getControl("RenderTransparentWater")->getSignal()->connect(boost::bind(&handleRenderTransparentWaterChanged, _2)); + gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&handleSpellCheckChanged)); + gSavedSettings.getControl("SpellCheckDictionary")->getSignal()->connect(boost::bind(&handleSpellCheckChanged)); } #if TEST_CACHED_CONTROL diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 0104d35e53..2a11f3cc16 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -81,6 +81,7 @@ #include "llrootview.h" #include "llsceneview.h" #include "llselectmgr.h" +#include "llspellcheckmenuhandler.h" #include "llstatusbar.h" #include "lltextureview.h" #include "lltoolcomp.h" @@ -4984,6 +4985,78 @@ class LLEditDelete : public view_listener_t } }; +void handle_spellcheck_replace_with_suggestion(const LLUICtrl* ctrl, const LLSD& param) +{ + const LLContextMenu* menu = dynamic_cast(ctrl->getParent()); + LLSpellCheckMenuHandler* spellcheck_handler = (menu) ? dynamic_cast(menu->getSpawningView()) : NULL; + if ( (!spellcheck_handler) || (!spellcheck_handler->getSpellCheck()) ) + { + return; + } + + U32 index = 0; + if ( (!LLStringUtil::convertToU32(param.asString(), index)) || (index >= spellcheck_handler->getSuggestionCount()) ) + { + return; + } + + spellcheck_handler->replaceWithSuggestion(index); +} + +bool visible_spellcheck_suggestion(LLUICtrl* ctrl, const LLSD& param) +{ + LLMenuItemGL* item = dynamic_cast(ctrl); + const LLContextMenu* menu = (item) ? dynamic_cast(item->getParent()) : NULL; + const LLSpellCheckMenuHandler* spellcheck_handler = (menu) ? dynamic_cast(menu->getSpawningView()) : NULL; + if ( (!spellcheck_handler) || (!spellcheck_handler->getSpellCheck()) ) + { + return false; + } + + U32 index = 0; + if ( (!LLStringUtil::convertToU32(param.asString(), index)) || (index >= spellcheck_handler->getSuggestionCount()) ) + { + return false; + } + + item->setLabel(spellcheck_handler->getSuggestion(index)); + return true; +} + +void handle_spellcheck_add_to_dictionary(const LLUICtrl* ctrl) +{ + const LLContextMenu* menu = dynamic_cast(ctrl->getParent()); + LLSpellCheckMenuHandler* spellcheck_handler = (menu) ? dynamic_cast(menu->getSpawningView()) : NULL; + if ( (spellcheck_handler) && (spellcheck_handler->canAddToDictionary()) ) + { + spellcheck_handler->addToDictionary(); + } +} + +bool enable_spellcheck_add_to_dictionary(const LLUICtrl* ctrl) +{ + const LLContextMenu* menu = dynamic_cast(ctrl->getParent()); + const LLSpellCheckMenuHandler* spellcheck_handler = (menu) ? dynamic_cast(menu->getSpawningView()) : NULL; + return (spellcheck_handler) && (spellcheck_handler->canAddToDictionary()); +} + +void handle_spellcheck_add_to_ignore(const LLUICtrl* ctrl) +{ + const LLContextMenu* menu = dynamic_cast(ctrl->getParent()); + LLSpellCheckMenuHandler* spellcheck_handler = (menu) ? dynamic_cast(menu->getSpawningView()) : NULL; + if ( (spellcheck_handler) && (spellcheck_handler->canAddToIgnore()) ) + { + spellcheck_handler->addToIgnore(); + } +} + +bool enable_spellcheck_add_to_ignore(const LLUICtrl* ctrl) +{ + const LLContextMenu* menu = dynamic_cast(ctrl->getParent()); + const LLSpellCheckMenuHandler* spellcheck_handler = (menu) ? dynamic_cast(menu->getSpawningView()) : NULL; + return (spellcheck_handler) && (spellcheck_handler->canAddToIgnore()); +} + bool enable_object_delete() { bool new_value = @@ -7933,6 +8006,19 @@ void initialize_edit_menu() } +void initialize_spellcheck_menu() +{ + LLUICtrl::CommitCallbackRegistry::Registrar& commit = LLUICtrl::CommitCallbackRegistry::currentRegistrar(); + LLUICtrl::EnableCallbackRegistry::Registrar& enable = LLUICtrl::EnableCallbackRegistry::currentRegistrar(); + + commit.add("SpellCheck.ReplaceWithSuggestion", boost::bind(&handle_spellcheck_replace_with_suggestion, _1, _2)); + enable.add("SpellCheck.VisibleSuggestion", boost::bind(&visible_spellcheck_suggestion, _1, _2)); + commit.add("SpellCheck.AddToDictionary", boost::bind(&handle_spellcheck_add_to_dictionary, _1)); + enable.add("SpellCheck.EnableAddToDictionary", boost::bind(&enable_spellcheck_add_to_dictionary, _1)); + commit.add("SpellCheck.AddToIgnore", boost::bind(&handle_spellcheck_add_to_ignore, _1)); + enable.add("SpellCheck.EnableAddToIgnore", boost::bind(&enable_spellcheck_add_to_ignore, _1)); +} + void initialize_menus() { // A parameterized event handler used as ctrl-8/9/0 zoom controls below. diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 87cb4efbc4..8c40762865 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -39,6 +39,7 @@ class LLObjectSelection; class LLSelectNode; void initialize_edit_menu(); +void initialize_spellcheck_menu(); void init_menus(); void cleanup_menus(); diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 0931c4ec9b..1b732676e4 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -91,6 +91,8 @@ class ViewerManifest(LLManifest): # ... and the entire windlight directory self.path("windlight") + # ... and the pre-installed spell checking dictionaries + self.path("dictionaries") self.end_prefix("app_settings") if self.prefix(src="character"): @@ -393,6 +395,9 @@ class WindowsManifest(ViewerManifest): self.path("ssleay32.dll") self.path("libeay32.dll") + # Hunspell + self.path("libhunspell.dll") + # For google-perftools tcmalloc allocator. try: if self.args['configuration'].lower() == 'debug': @@ -659,6 +664,7 @@ class DarwinManifest(ViewerManifest): # copy additional libs in /Contents/MacOS/ self.path("../packages/lib/release/libndofdev.dylib", dst="Resources/libndofdev.dylib") + self.path("../packages/lib/release/libhunspell-1.3.dylib", dst="Resources/libhunspell-1.3.dylib") self.path("../viewer_components/updater/scripts/darwin/update_install", "MacOS/update_install") @@ -1053,6 +1059,8 @@ class Linux_i686Manifest(LinuxManifest): self.path("libopenjpeg.so.1.4.0") self.path("libopenjpeg.so.1") self.path("libopenjpeg.so") + self.path("libhunspell-1.3.so") + self.path("libhunspell-1.3.so.0") self.path("libalut.so") self.path("libopenal.so", "libopenal.so.1") self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname -- cgit v1.2.3 From f0d1afc2266e13b4f36f750ba5e721e427caf7b8 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 20 Jan 2012 18:07:35 +0100 Subject: STORM-276 Added spellcheck functionality to the LLLineEditor control --- indra/llcommon/llstring.h | 3 + indra/llui/lllineeditor.cpp | 217 ++++++++++++++++++++- indra/llui/lllineeditor.h | 29 ++- .../skins/default/xui/en/menu_text_editor.xml | 79 ++++++++ 4 files changed, 324 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 7e41e787b5..3a27badb5a 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -182,6 +182,9 @@ public: static bool isPunct(char a) { return ispunct((unsigned char)a) != 0; } static bool isPunct(llwchar a) { return iswpunct(a) != 0; } + static bool isAlpha(char a) { return isalpha((unsigned char)a) != 0; } + static bool isAlpha(llwchar a) { return iswalpha(a) != 0; } + static bool isAlnum(char a) { return isalnum((unsigned char)a) != 0; } static bool isAlnum(llwchar a) { return iswalnum(a) != 0; } diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 06dfc90d83..5479c080bd 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -45,6 +45,7 @@ #include "llkeyboard.h" #include "llrect.h" #include "llresmgr.h" +#include "llspellcheck.h" #include "llstring.h" #include "llwindow.h" #include "llui.h" @@ -65,6 +66,7 @@ const S32 SCROLL_INCREMENT_ADD = 0; // make space for typing const S32 SCROLL_INCREMENT_DEL = 4; // make space for baskspacing const F32 AUTO_SCROLL_TIME = 0.05f; const F32 TRIPLE_CLICK_INTERVAL = 0.3f; // delay between double and triple click. *TODO: make this equal to the double click interval? +const F32 SPELLCHECK_DELAY = 0.5f; // delay between the last keypress and showing spell checking feedback for the word the cursor is on const std::string PASSWORD_ASTERISK( "\xE2\x80\xA2" ); // U+2022 BULLET @@ -88,6 +90,7 @@ LLLineEditor::Params::Params() background_image_focused("background_image_focused"), select_on_focus("select_on_focus", false), revert_on_esc("revert_on_esc", true), + spellcheck("spellcheck", false), commit_on_focus_lost("commit_on_focus_lost", true), ignore_tab("ignore_tab", true), is_password("is_password", false), @@ -134,6 +137,9 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) mIgnoreArrowKeys( FALSE ), mIgnoreTab( p.ignore_tab ), mDrawAsterixes( p.is_password ), + mSpellCheck( p.spellcheck ), + mSpellCheckStart(-1), + mSpellCheckEnd(-1), mSelectAllonFocusReceived( p.select_on_focus ), mSelectAllonCommit( TRUE ), mPassDelete(FALSE), @@ -177,6 +183,12 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) updateTextPadding(); setCursor(mText.length()); + if (mSpellCheck) + { + LLSpellChecker::setSettingsChangeCallback(boost::bind(&LLLineEditor::onSpellCheckSettingsChange, this)); + } + mSpellCheckTimer.reset(); + setPrevalidateInput(p.prevalidate_input_callback()); setPrevalidate(p.prevalidate_callback()); @@ -519,6 +531,94 @@ void LLLineEditor::selectAll() updatePrimary(); } +bool LLLineEditor::getSpellCheck() const +{ + return (LLSpellChecker::getUseSpellCheck()) && (!mReadOnly) && (mSpellCheck); +} + +const std::string& LLLineEditor::getSuggestion(U32 index) const +{ + return (index < mSuggestionList.size()) ? mSuggestionList[index] : LLStringUtil::null; +} + +U32 LLLineEditor::getSuggestionCount() const +{ + return mSuggestionList.size(); +} + +void LLLineEditor::replaceWithSuggestion(U32 index) +{ + for (std::list >::const_iterator it = mMisspellRanges.begin(); it != mMisspellRanges.end(); ++it) + { + if ( (it->first <= (U32)mCursorPos) && (it->second >= (U32)mCursorPos) ) + { + deselect(); + + // Delete the misspelled word + mText.erase(it->first, it->second - it->first); + + // Insert the suggestion in its place + LLWString suggestion = utf8str_to_wstring(mSuggestionList[index]); + mText.insert(it->first, suggestion); + setCursor(it->first + (S32)suggestion.length()); + + break; + } + } + mSpellCheckStart = mSpellCheckEnd = -1; +} + +void LLLineEditor::addToDictionary() +{ + if (canAddToDictionary()) + { + LLSpellChecker::instance().addToCustomDictionary(getMisspelledWord(mCursorPos)); + } +} + +bool LLLineEditor::canAddToDictionary() const +{ + return (getSpellCheck()) && (isMisspelledWord(mCursorPos)); +} + +void LLLineEditor::addToIgnore() +{ + if (canAddToIgnore()) + { + LLSpellChecker::instance().addToIgnoreList(getMisspelledWord(mCursorPos)); + } +} + +bool LLLineEditor::canAddToIgnore() const +{ + return (getSpellCheck()) && (isMisspelledWord(mCursorPos)); +} + +std::string LLLineEditor::getMisspelledWord(U32 pos) const +{ + for (std::list >::const_iterator it = mMisspellRanges.begin(); it != mMisspellRanges.end(); ++it) + { + if ( (it->first <= pos) && (it->second >= pos) ) + return wstring_to_utf8str(mText.getWString().substr(it->first, it->second - it->first)); + } + return LLStringUtil::null; +} + +bool LLLineEditor::isMisspelledWord(U32 pos) const +{ + for (std::list >::const_iterator it = mMisspellRanges.begin(); it != mMisspellRanges.end(); ++it) + { + if ( (it->first <= pos) && (it->second >= pos) ) + return true; + } + return false; +} + +void LLLineEditor::onSpellCheckSettingsChange() +{ + // Recheck the spelling on every change + mSpellCheckStart = mSpellCheckEnd = -1; +} BOOL LLLineEditor::handleDoubleClick(S32 x, S32 y, MASK mask) { @@ -1453,6 +1553,10 @@ BOOL LLLineEditor::handleKeyHere(KEY key, MASK mask ) { mKeystrokeCallback(this); } + if ( (!selection_modified) && (KEY_BACKSPACE == key) ) + { + mSpellCheckTimer.setTimerExpirySec(SPELLCHECK_DELAY); + } } } } @@ -1510,6 +1614,7 @@ BOOL LLLineEditor::handleUnicodeCharHere(llwchar uni_char) // We'll have to do something about this if something ever changes! - Doug mKeystrokeCallback( this ); } + mSpellCheckTimer.setTimerExpirySec(SPELLCHECK_DELAY); } } return handled; @@ -1560,6 +1665,7 @@ void LLLineEditor::doDelete() { mKeystrokeCallback( this ); } + mSpellCheckTimer.setTimerExpirySec(SPELLCHECK_DELAY); } } } @@ -1756,7 +1862,7 @@ void LLLineEditor::draw() if( (rendered_pixels_right < (F32)mTextRightEdge) && (rendered_text < text_len) ) { // unselected, right side - mGLFont->render( + rendered_text += mGLFont->render( mText, mScrollHPos + rendered_text, rendered_pixels_right, text_bottom, text_color, @@ -1770,7 +1876,7 @@ void LLLineEditor::draw() } else { - mGLFont->render( + rendered_text = mGLFont->render( mText, mScrollHPos, rendered_pixels_right, text_bottom, text_color, @@ -1785,6 +1891,80 @@ void LLLineEditor::draw() mBorder->setVisible(FALSE); // no more programmatic art. #endif + if ( (getSpellCheck()) && (mText.length() > 2) ) + { + // Calculate start and end indices for the first and last visible word + U32 start = prevWordPos(mScrollHPos), end = nextWordPos(mScrollHPos + rendered_text); + + if ( (mSpellCheckStart != start) || (mSpellCheckEnd = end) ) + { + const LLWString& text = mText.getWString().substr(start, end); + + // Find the start of the first word + U32 word_start = 0, word_end = 0; + while ( (word_start < text.length()) && (!LLStringOps::isAlpha(text[word_start])) ) + word_start++; + + // Iterate over all words in the text block and check them one by one + mMisspellRanges.clear(); + while (word_start < text.length()) + { + // Find the end of the current word (special case handling for "'" when it's used as a contraction) + word_end = word_start + 1; + while ( (word_end < text.length()) && + ((LLWStringUtil::isPartOfWord(text[word_end])) || + ((L'\'' == text[word_end]) && (word_end + 1 < text.length()) && + (LLStringOps::isAlnum(text[word_end - 1])) && (LLStringOps::isAlnum(text[word_end + 1])))) ) + { + word_end++; + } + if (word_end >= text.length()) + break; + + // Don't process words shorter than 3 characters + std::string word = wstring_to_utf8str(text.substr(word_start, word_end - word_start)); + if ( (word.length() >= 3) && (!LLSpellChecker::instance().checkSpelling(word)) ) + mMisspellRanges.push_back(std::pair(start + word_start, start + word_end)); + + // Find the start of the next word + word_start = word_end + 1; + while ( (word_start < text.length()) && (!LLWStringUtil::isPartOfWord(text[word_start])) ) + word_start++; + } + + mSpellCheckStart = start; + mSpellCheckEnd = end; + } + + // Draw squiggly lines under any (visible) misspelled words + for (std::list >::const_iterator it = mMisspellRanges.begin(); it != mMisspellRanges.end(); ++it) + { + // Skip over words that aren't (partially) visible + if ( ((it->first < start) && (it->second < start)) || (it->first > end) ) + continue; + + // Skip the current word if the user is still busy editing it + if ( (!mSpellCheckTimer.hasExpired()) && (it->first <= (U32)mCursorPos) && (it->second >= (U32)mCursorPos) ) + continue; + + S32 pxWidth = getRect().getWidth(); + S32 pxStart = findPixelNearestPos(it->first - getCursor()); + if (pxStart > pxWidth) + continue; + S32 pxEnd = findPixelNearestPos(it->second - getCursor()); + if (pxEnd > pxWidth) + pxEnd = pxWidth; + + gGL.color4ub(255, 0, 0, 200); + while (pxStart < pxEnd) + { + gl_line_2d(pxStart, text_bottom - 2, pxStart + 3, text_bottom + 1); + gl_line_2d(pxStart + 3, text_bottom + 1, pxStart + 6, text_bottom - 2); + pxStart += 6; + } + } + } + // If we're editing... if( hasFocus()) { @@ -2242,6 +2422,7 @@ void LLLineEditor::updatePreedit(const LLWString &preedit_string, { mKeystrokeCallback( this ); } + mSpellCheckTimer.setTimerExpirySec(SPELLCHECK_DELAY); } BOOL LLLineEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect *bounds, LLRect *control) const @@ -2393,7 +2574,37 @@ void LLLineEditor::showContextMenu(S32 x, S32 y) S32 screen_x, screen_y; localPointToScreen(x, y, &screen_x, &screen_y); - menu->show(screen_x, screen_y); + + if (hasSelection()) + { + if ( (mCursorPos < llmin(mSelectionStart, mSelectionEnd)) || (mCursorPos > llmax(mSelectionStart, mSelectionEnd)) ) + deselect(); + else + setCursor(llmax(mSelectionStart, mSelectionEnd)); + } + else + { + setCursorAtLocalPos(x); + } + + bool use_spellcheck = getSpellCheck(), is_misspelled = false; + if (use_spellcheck) + { + mSuggestionList.clear(); + + // If the cursor is on a misspelled word, retrieve suggestions for it + std::string misspelled_word = getMisspelledWord(mCursorPos); + if ((is_misspelled = !misspelled_word.empty()) == true) + { + LLSpellChecker::instance().getSuggestions(misspelled_word, mSuggestionList); + } + } + + menu->setItemVisible("Suggestion Separator", (use_spellcheck) && (!mSuggestionList.empty())); + menu->setItemVisible("Add to Dictionary", (use_spellcheck) && (is_misspelled)); + menu->setItemVisible("Add to Ignore", (use_spellcheck) && (is_misspelled)); + menu->setItemVisible("Spellcheck Separator", (use_spellcheck) && (is_misspelled)); + menu->show(screen_x, screen_y, this); } } diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 2518dbe3c7..9513274f21 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -40,6 +40,7 @@ #include "llframetimer.h" #include "lleditmenuhandler.h" +#include "llspellcheckmenuhandler.h" #include "lluictrl.h" #include "lluiimage.h" #include "lluistring.h" @@ -54,7 +55,7 @@ class LLButton; class LLContextMenu; class LLLineEditor -: public LLUICtrl, public LLEditMenuHandler, protected LLPreeditor +: public LLUICtrl, public LLEditMenuHandler, protected LLPreeditor, public LLSpellCheckMenuHandler { public: @@ -86,6 +87,7 @@ public: Optional select_on_focus, revert_on_esc, + spellcheck, commit_on_focus_lost, ignore_tab, is_password; @@ -146,6 +148,24 @@ public: virtual void deselect(); virtual BOOL canDeselect() const; + // LLSpellCheckMenuHandler overrides + /*virtual*/ bool getSpellCheck() const; + + /*virtual*/ const std::string& getSuggestion(U32 index) const; + /*virtual*/ U32 getSuggestionCount() const; + /*virtual*/ void replaceWithSuggestion(U32 index); + + /*virtual*/ void addToDictionary(); + /*virtual*/ bool canAddToDictionary() const; + + /*virtual*/ void addToIgnore(); + /*virtual*/ bool canAddToIgnore() const; + + // Spell checking helper functions + std::string getMisspelledWord(U32 pos) const; + bool isMisspelledWord(U32 pos) const; + void onSpellCheckSettingsChange(); + // view overrides virtual void draw(); virtual void reshape(S32 width,S32 height,BOOL called_from_parent=TRUE); @@ -322,6 +342,13 @@ protected: S32 mLastSelectionStart; S32 mLastSelectionEnd; + bool mSpellCheck; + S32 mSpellCheckStart; + S32 mSpellCheckEnd; + LLTimer mSpellCheckTimer; + std::list > mMisspellRanges; + std::vector mSuggestionList; + LLTextValidate::validate_func_t mPrevalidateFunc; LLTextValidate::validate_func_t mPrevalidateInputFunc; diff --git a/indra/newview/skins/default/xui/en/menu_text_editor.xml b/indra/newview/skins/default/xui/en/menu_text_editor.xml index fe8489166b..70b40dd89b 100644 --- a/indra/newview/skins/default/xui/en/menu_text_editor.xml +++ b/indra/newview/skins/default/xui/en/menu_text_editor.xml @@ -1,6 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Date: Mon, 23 Jan 2012 19:22:47 +0100 Subject: STORM-276 Added missing library includes --- indra/newview/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 6b2fe1e45a..bb0c4a9979 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -71,6 +71,7 @@ include_directories( ${LLLOGIN_INCLUDE_DIRS} ${UPDATER_INCLUDE_DIRS} ${LIBS_PREBUILT_DIR}/include/collada + ${LIBS_PREBUILD_DIR}/include/hunspell ${OPENAL_LIB_INCLUDE_DIRS} ${LIBS_PREBUILT_DIR}/include/collada/1.4 ) @@ -1566,6 +1567,9 @@ if (WINDOWS) ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/msvcp100.dll ${SHARED_LIB_STAGING_DIR}/Debug/msvcr100d.dll ${SHARED_LIB_STAGING_DIR}/Debug/msvcp100d.dll + ${SHARED_LIB_STAGING_DIR}/Release/libhunspell.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libhunspell.dll + ${SHARED_LIB_STAGING_DIR}/Debug/libhunspell.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/SLVoice.exe ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk.dll ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ortp.dll @@ -1745,6 +1749,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} ${NDOF_LIBRARY} + ${HUNSPELL_LIBRARY} ${viewer_LIBRARIES} ${BOOST_PROGRAM_OPTIONS_LIBRARY} ${BOOST_REGEX_LIBRARY} -- cgit v1.2.3 From b81bf4f6f182e6345889d70140b34b15cbfb8d27 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Mon, 23 Jan 2012 19:31:47 +0100 Subject: STORM-276 Enabled spellchecking on selective line editors --- indra/newview/skins/default/xui/en/floater_chat_bar.xml | 1 + indra/newview/skins/default/xui/en/floater_im_session.xml | 1 + indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml | 1 + 3 files changed, 3 insertions(+) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_chat_bar.xml b/indra/newview/skins/default/xui/en/floater_chat_bar.xml index 63992462b3..32a2c26cf0 100644 --- a/indra/newview/skins/default/xui/en/floater_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/floater_chat_bar.xml @@ -46,6 +46,7 @@ left="0" max_length_bytes="1023" name="chat_box" + spellcheck="true" text_pad_left="5" text_pad_right="25" tool_tip="Press Enter to say, Ctrl+Enter to shout" diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index a2739a8339..2f3788ec3d 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -84,6 +84,7 @@ label="To" layout="bottomleft" name="chat_editor" + spellcheck="true" tab_group="3" width="249"> diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml index 21c627cdfb..6bc9c48729 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml @@ -19,6 +19,7 @@ left="0" max_length_bytes="1023" name="chat_box" + spellcheck="true" text_pad_left="5" text_pad_right="25" tool_tip="Press Enter to say, Ctrl+Enter to shout" -- cgit v1.2.3 From 8758c7b8415a1cb67c504f142f96b5a7fec296d2 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 25 Jan 2012 11:34:22 -0500 Subject: storm-1738: mock autocorrect to allow building the llui_libtest integration test --- indra/integration_tests/llui_libtest/llui_libtest.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra') diff --git a/indra/integration_tests/llui_libtest/llui_libtest.cpp b/indra/integration_tests/llui_libtest/llui_libtest.cpp index 217e26c3ca..af0cb7c301 100644 --- a/indra/integration_tests/llui_libtest/llui_libtest.cpp +++ b/indra/integration_tests/llui_libtest/llui_libtest.cpp @@ -31,6 +31,7 @@ #include "llwidgetreg.h" // linden library includes +#include "llautocorrect.h" #include "llcontrol.h" // LLControlGroup #include "lldir.h" #include "lldiriterator.h" @@ -107,6 +108,16 @@ public: }; TestImageProvider gTestImageProvider; +// Mock Autocorrect +AutoCorrect* AutoCorrect::getInstance() +{ + return NULL; +} +std::string AutoCorrect::replaceWord(std::string currentWord) +{ + return currentWord; +} + static std::string get_xui_dir() { std::string delim = gDirUtilp->getDirDelimiter(); -- cgit v1.2.3 From 59dfcba33de76bfc998b9aa2121c53dff75024f7 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 1 Feb 2012 10:28:45 -0500 Subject: STORM-1738 Slight adjustment to callback --- indra/llui/lllineeditor.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index ba50728e89..de951d3b56 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -151,7 +151,8 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p) mHighlightColor(p.highlight_color()), mPreeditBgColor(p.preedit_bg_color()), mGLFont(p.font), - mContextMenuHandle() + mContextMenuHandle(), + mAutocorrectCallback() { llassert( mMaxLengthBytes > 0 ); @@ -866,10 +867,10 @@ void LLLineEditor::addChar(const llwchar uni_char) } // *TODO implement callback routine - if (!mReadOnly /*&& autocorrectCallbackRoutine != NULL */) + if (!mReadOnly && mAutocorrectCallback != NULL) { // call callback - // autotocorrectCallbackRoutine(mText&, mCursorPos&); + // mAutotocorrectCallback(mText&, mCursorPos&); } getWindow()->hideCursorUntilMouseMove(); -- cgit v1.2.3 From 19ad674b107f121c02b3a353517b535ce170feb4 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 1 Feb 2012 11:23:59 -0500 Subject: STORM-1738 Make autocorrect into a proper singleton warn-on-failure:open-license --- indra/newview/llautocorrect.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llautocorrect.h b/indra/newview/llautocorrect.h index a5e8c5396e..82cf75f3cf 100644 --- a/indra/newview/llautocorrect.h +++ b/indra/newview/llautocorrect.h @@ -22,7 +22,7 @@ #include "lllineeditor.h" -class AutoCorrect +class AutoCorrect : public LLSingleton { AutoCorrect(); ~AutoCorrect(); @@ -50,6 +50,7 @@ public: void loadFromDisk(); private: + friend class LLSingleton; void saveToDisk(LLSD newSettings); LLSD getExampleLLSD(); std::string getFileName(); -- cgit v1.2.3 From d3a7a7ad4bd3d2c921f6e829aa283fece0a9da6a Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Thu, 2 Feb 2012 11:00:11 -0500 Subject: STORM-1738 Settings cleanup warn-on-failure:open-license --- indra/newview/app_settings/settings.xml | 33 ++++++++-------------- indra/newview/llautocorrect.cpp | 13 ++++----- indra/newview/llautocorrectfloater.cpp | 13 ++------- .../skins/default/xui/en/floater_autocorrect.xml | 4 --- 4 files changed, 20 insertions(+), 43 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 060ec8bd5a..16fa3a1cb2 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -346,17 +346,17 @@ Value 0 - AutoCorrectCount - - Comment - How many words have been auto replaced. - Persist - 1 - Type - S32 - Value - 0 - + AutoCorrect + + Comment + Replaces common spelling mistakes with correct word + Persist + 1 + Type + Boolean + Value + 0 + AutoAcceptNewInventory Comment @@ -2808,17 +2808,6 @@ Value 1 - EnableAutoCorrect - - Comment - Enables or disables the autocorrect function - Persist - 1 - Type - Boolean - Value - 0 - EnableGroupChatPopups Comment diff --git a/indra/newview/llautocorrect.cpp b/indra/newview/llautocorrect.cpp index d1aa2384b7..cca5c6913f 100644 --- a/indra/newview/llautocorrect.cpp +++ b/indra/newview/llautocorrect.cpp @@ -41,8 +41,8 @@ AutoCorrect::~AutoCorrect() void AutoCorrect::autocorrectCallback(LLUIString& inputText, S32& cursorPos) { - static LLCachedControl doAnything(gSavedSettings, "EnableAutoCorrect"); - if(doAnything) + static LLCachedControl perform_autocorrect(gSavedSettings, "AutoCorrect"); + if(perform_autocorrect) { S32 wordStart = 0; S32 wordEnd = cursorPos-1; @@ -290,8 +290,8 @@ LLSD AutoCorrect::getAutoCorrectEntries(std::string listName) } std::string AutoCorrect::replaceWord(std::string currentWord) { - static LLCachedControl doAnything(gSavedSettings, "EnableAutoCorrect"); - if(!(doAnything))return currentWord; + static LLCachedControl perform_autocorrect(gSavedSettings, "AutoCorrect"); + if(!(perform_autocorrect))return currentWord; //loop through priorities for(int currentPriority = 10;currentPriority>=0;currentPriority--) { @@ -337,7 +337,6 @@ std::string AutoCorrect::replaceWord(std::string currentWord) args["REPLACEMENT"]=replacement; LLNotificationsUtil::add("AutoReplace",args); } - gSavedSettings.setS32("AutoCorrectCount",gSavedSettings.getS32("AutoCorrectCount")+1); llinfos << "found a word in list " << location.c_str() << " and it will replace " << currentWord.c_str() << " => " << replacement.c_str() << llendl; return replacement; } @@ -348,8 +347,8 @@ std::string AutoCorrect::replaceWord(std::string currentWord) } std::string AutoCorrect::replaceWords(std::string words) { - static LLCachedControl doAnything(gSavedSettings, "EnableAutoCorrect"); - if(!(doAnything))return words; + static LLCachedControl perform_autocorrect(gSavedSettings, "AutoCorrect"); + if(!(perform_autocorrect))return words; //TODO update this function to use the "wordStyle" thing, //but so far this function is never used, so later diff --git a/indra/newview/llautocorrectfloater.cpp b/indra/newview/llautocorrectfloater.cpp index 6dca759b02..74762a876f 100644 --- a/indra/newview/llautocorrectfloater.cpp +++ b/indra/newview/llautocorrectfloater.cpp @@ -130,8 +130,6 @@ void AutoCorrectFloater::updateItemsList() childSetValue("ac_text_name",listName); childSetValue("ac_text_author",listData["author"]); childSetValue("ac_priority",listData["priority"]); - static LLCachedControl countAuto(gSavedSettings, "AutoCorrectCount"); - childSetValue("ac_stats",(S32)countAuto); LLSD autoCorrects = listData["data"]; LLSD::map_const_iterator loc_it = autoCorrects.beginMap(); @@ -161,14 +159,11 @@ void AutoCorrectFloater::updateItemsList() void AutoCorrectFloater::updateNamesList() { namesList->deleteAllItems(); - static LLCachedControl enabledd(gSavedSettings, "EnableAutoCorrect"); - if(!(enabledd)) + if(!gSavedSettings, "AutoCorrect") { updateItemsList(); return; } - static LLCachedControl countAuto(gSavedSettings, "AutoCorrectCount"); - childSetValue("ac_stats",(S32)countAuto); LLSD autoCorrects = AutoCorrect::getInstance()->getAutoCorrects(); LLSD::map_const_iterator loc_it = autoCorrects.beginMap(); LLSD::map_const_iterator loc_end = autoCorrects.endMap(); @@ -213,8 +208,7 @@ void AutoCorrectFloater::updateListControlsEnabled(BOOL selected) } void AutoCorrectFloater::updateEnabledStuff() { - static LLCachedControl enabledd(gSavedSettings, "EnableAutoCorrect"); - if(!(enabledd)) + if(!gSavedSettings, "AutoCorrect") { LLCheckBoxCtrl *enBox = getChild("ac_enable"); enBox->setDisabledColor(LLColor4::red); @@ -234,7 +228,6 @@ void AutoCorrectFloater::updateEnabledStuff() } void AutoCorrectFloater::setData(void * data) { - //empanel = (LLPanel*)data; } void AutoCorrectFloater::onBoxCommitEnabled(LLUICtrl* caller, void* user_data) { @@ -301,7 +294,7 @@ void AutoCorrectFloater::loadList(void* data) LLSDSerialize::fromXMLDocument(blankllsd, file); } file.close(); - gSavedSettings.setBOOL("EnableAutoCorrect",true); + gSavedSettings.setBOOL("AutoCorrect",true); AutoCorrect::getInstance()->addCorrectionList(blankllsd); if ( data ) { diff --git a/indra/newview/skins/default/xui/en/floater_autocorrect.xml b/indra/newview/skins/default/xui/en/floater_autocorrect.xml index 0b8ed1c067..b67b2e7ec0 100644 --- a/indra/newview/skins/default/xui/en/floater_autocorrect.xml +++ b/indra/newview/skins/default/xui/en/floater_autocorrect.xml @@ -75,9 +75,5 @@ >Words automatically corrected: - Count - \ No newline at end of file -- cgit v1.2.3 From 6443701a3fc41eff2c48f6e57a79010cdb8339e2 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Thu, 2 Feb 2012 12:59:41 -0500 Subject: STORM-1738 Change a few llwarns to lldebugs warn-on-failure:open-license --- indra/newview/llautocorrect.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llautocorrect.cpp b/indra/newview/llautocorrect.cpp index cca5c6913f..c16787d637 100644 --- a/indra/newview/llautocorrect.cpp +++ b/indra/newview/llautocorrect.cpp @@ -337,7 +337,7 @@ std::string AutoCorrect::replaceWord(std::string currentWord) args["REPLACEMENT"]=replacement; LLNotificationsUtil::add("AutoReplace",args); } - llinfos << "found a word in list " << location.c_str() << " and it will replace " << currentWord.c_str() << " => " << replacement.c_str() << llendl; + lldebugs << "found a word in list " << location.c_str() << " and it will replace " << currentWord.c_str() << " => " << replacement.c_str() << llendl; return replacement; } } @@ -361,7 +361,6 @@ std::string AutoCorrect::replaceWords(std::string words) for (; loc_it != loc_end; ++loc_it) { const std::string& location = (*loc_it).first; - //llinfos << "location is "< " << replacement.c_str() << llendl; + ldebugs << "found a word in list " << location.c_str() << " and it will replace " << currentWord.c_str() << " => " << replacement.c_str() << llendl; int wordStart = words.find(currentWord); words.replace(wordStart,currentWord.length(),replacement); return replaceWords(words);//lol recursion! -- cgit v1.2.3 From a9d11219779473c7d0c06bd0e56b0f068a487ad0 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 3 Feb 2012 15:20:34 +0100 Subject: STORM-276 Added spellcheck functionality to the LLTextEditor control --- indra/llui/lltextbase.cpp | 209 +++++++++++++++++++++++++++++++++++++++++++- indra/llui/lltextbase.h | 31 ++++++- indra/llui/lltexteditor.cpp | 34 ++++++- 3 files changed, 271 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 0040be45c7..7eee1d39c4 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -32,6 +32,7 @@ #include "lllocalcliprect.h" #include "llmenugl.h" #include "llscrollcontainer.h" +#include "llspellcheck.h" #include "llstl.h" #include "lltextparser.h" #include "lltextutil.h" @@ -155,6 +156,7 @@ LLTextBase::Params::Params() plain_text("plain_text",false), track_end("track_end", false), read_only("read_only", false), + spellcheck("spellcheck", false), v_pad("v_pad", 0), h_pad("h_pad", 0), clip("clip", true), @@ -181,6 +183,9 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) mFontShadow(p.font_shadow), mPopupMenu(NULL), mReadOnly(p.read_only), + mSpellCheck(p.spellcheck), + mSpellCheckStart(-1), + mSpellCheckEnd(-1), mCursorColor(p.cursor_color), mFgColor(p.text_color), mBorderVisible( p.border_visible ), @@ -246,6 +251,12 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) addChild(mDocumentView); } + if (mSpellCheck) + { + LLSpellChecker::setSettingsChangeCallback(boost::bind(&LLTextBase::onSpellCheckSettingsChange, this)); + } + mSpellCheckTimer.reset(); + createDefaultSegment(); updateRects(); @@ -530,8 +541,86 @@ void LLTextBase::drawText() return; } + // Perform spell check if needed + if ( (getSpellCheck()) && (getWText().length() > 2) ) + { + // Calculate start and end indices for the spell checking range + S32 start = line_start, end = getLineEnd(last_line); + + if ( (mSpellCheckStart != start) || (mSpellCheckEnd != end) ) + { + const LLWString& wstrText = getWText(); + mMisspellRanges.clear(); + + segment_set_t::iterator seg_it = getSegIterContaining(start); + while (mSegments.end() != seg_it) + { + LLTextSegmentPtr text_segment = *seg_it; + if ( (text_segment.isNull()) || (text_segment->getStart() >= end) ) + { + break; + } + + if (!text_segment->canEdit()) + { + ++seg_it; + continue; + } + + // Combine adjoining text segments into one + U32 seg_start = text_segment->getStart(), seg_end = llmin(text_segment->getEnd(), end); + while (mSegments.end() != ++seg_it) + { + text_segment = *seg_it; + if ( (text_segment.isNull()) || (!text_segment->canEdit()) || (text_segment->getStart() >= end) ) + { + break; + } + seg_end = llmin(text_segment->getEnd(), end); + } + + // Find the start of the first word + U32 word_start = seg_start, word_end = -1; + while ( (word_start < wstrText.length()) && (!LLStringOps::isAlpha(wstrText[word_start])) ) + word_start++; + + // Iterate over all words in the text block and check them one by one + while (word_start < seg_end) + { + // Find the end of the current word (special case handling for "'" when it's used as a contraction) + word_end = word_start + 1; + while ( (word_end < seg_end) && + ((LLWStringUtil::isPartOfWord(wstrText[word_end])) || + ((L'\'' == wstrText[word_end]) && + (LLStringOps::isAlnum(wstrText[word_end - 1])) && (LLStringOps::isAlnum(wstrText[word_end + 1])))) ) + { + word_end++; + } + if (word_end > seg_end) + break; + + // Don't process words shorter than 3 characters + std::string word = wstring_to_utf8str(wstrText.substr(word_start, word_end - word_start)); + if ( (word.length() >= 3) && (!LLSpellChecker::instance().checkSpelling(word)) ) + { + mMisspellRanges.push_back(std::pair(word_start, word_end)); + } + + // Find the start of the next word + word_start = word_end + 1; + while ( (word_start < seg_end) && (!LLWStringUtil::isPartOfWord(wstrText[word_start])) ) + word_start++; + } + } + + mSpellCheckStart = start; + mSpellCheckEnd = end; + } + } + LLTextSegmentPtr cur_segment = *seg_iter; + std::list >::const_iterator misspell_it = std::lower_bound(mMisspellRanges.begin(), mMisspellRanges.end(), std::pair(line_start, 0)); for (S32 cur_line = first_line; cur_line < last_line; cur_line++) { S32 next_line = cur_line + 1; @@ -566,7 +655,8 @@ void LLTextBase::drawText() cur_segment = *seg_iter; } - S32 clipped_end = llmin( line_end, cur_segment->getEnd() ) - cur_segment->getStart(); + S32 seg_end = llmin(line_end, cur_segment->getEnd()); + S32 clipped_end = seg_end - cur_segment->getStart(); if (mUseEllipses // using ellipses && clipped_end == line_end // last segment on line @@ -578,6 +668,35 @@ void LLTextBase::drawText() text_rect.mRight -= 2; } + // Draw squiggly lines under any visible misspelled words + while ( (mMisspellRanges.end() != misspell_it) && (misspell_it->first < seg_end) && (misspell_it->second > seg_start) ) + { + // Skip the current word if the user is still busy editing it + if ( (!mSpellCheckTimer.hasExpired()) && (misspell_it->first <= (U32)mCursorPos) && (misspell_it->second >= (U32)mCursorPos) ) + continue; + + S32 squiggle_start = 0, squiggle_end = 0, pony = 0; + cur_segment->getDimensions(seg_start - cur_segment->getStart(), misspell_it->first - seg_start, squiggle_start, pony); + cur_segment->getDimensions(misspell_it->first - cur_segment->getStart(), misspell_it->second - misspell_it->first, squiggle_end, pony); + squiggle_start += text_rect.mLeft; + + pony = (squiggle_end + 3) / 6; + squiggle_start += squiggle_end / 2 - pony * 3; + squiggle_end = squiggle_start + pony * 6; + + gGL.color4ub(255, 0, 0, 200); + while (squiggle_start < squiggle_end) + { + gl_line_2d(squiggle_start, text_rect.mBottom - 2, squiggle_start + 3, text_rect.mBottom + 1); + gl_line_2d(squiggle_start + 3, text_rect.mBottom + 1, squiggle_start + 6, text_rect.mBottom - 2); + squiggle_start += 6; + } + + if (misspell_it->second > seg_end) + break; + ++misspell_it; + } + text_rect.mLeft = (S32)(cur_segment->draw(seg_start - cur_segment->getStart(), clipped_end, selection_left, selection_right, text_rect)); seg_start = clipped_end + cur_segment->getStart(); @@ -1103,6 +1222,94 @@ void LLTextBase::deselect() mIsSelecting = FALSE; } +bool LLTextBase::getSpellCheck() const +{ + return (LLSpellChecker::getUseSpellCheck()) && (!mReadOnly) && (mSpellCheck); +} + +const std::string& LLTextBase::getSuggestion(U32 index) const +{ + return (index < mSuggestionList.size()) ? mSuggestionList[index] : LLStringUtil::null; +} + +U32 LLTextBase::getSuggestionCount() const +{ + return mSuggestionList.size(); +} + +void LLTextBase::replaceWithSuggestion(U32 index) +{ + for (std::list >::const_iterator it = mMisspellRanges.begin(); it != mMisspellRanges.end(); ++it) + { + if ( (it->first <= (U32)mCursorPos) && (it->second >= (U32)mCursorPos) ) + { + deselect(); + + // Delete the misspelled word + removeStringNoUndo(it->first, it->second - it->first); + + // Insert the suggestion in its place + LLWString suggestion = utf8str_to_wstring(mSuggestionList[index]); + insertStringNoUndo(it->first, utf8str_to_wstring(mSuggestionList[index])); + setCursorPos(it->first + (S32)suggestion.length()); + + break; + } + } + mSpellCheckStart = mSpellCheckEnd = -1; +} + +void LLTextBase::addToDictionary() +{ + if (canAddToDictionary()) + { + LLSpellChecker::instance().addToCustomDictionary(getMisspelledWord(mCursorPos)); + } +} + +bool LLTextBase::canAddToDictionary() const +{ + return (getSpellCheck()) && (isMisspelledWord(mCursorPos)); +} + +void LLTextBase::addToIgnore() +{ + if (canAddToIgnore()) + { + LLSpellChecker::instance().addToIgnoreList(getMisspelledWord(mCursorPos)); + } +} + +bool LLTextBase::canAddToIgnore() const +{ + return (getSpellCheck()) && (isMisspelledWord(mCursorPos)); +} + +std::string LLTextBase::getMisspelledWord(U32 pos) const +{ + for (std::list >::const_iterator it = mMisspellRanges.begin(); it != mMisspellRanges.end(); ++it) + { + if ( (it->first <= pos) && (it->second >= pos) ) + return wstring_to_utf8str(getWText().substr(it->first, it->second - it->first)); + } + return LLStringUtil::null; +} + +bool LLTextBase::isMisspelledWord(U32 pos) const +{ + for (std::list >::const_iterator it = mMisspellRanges.begin(); it != mMisspellRanges.end(); ++it) + { + if ( (it->first <= pos) && (it->second >= pos) ) + return true; + } + return false; +} + +void LLTextBase::onSpellCheckSettingsChange() +{ + // Recheck the spelling on every change + mSpellCheckStart = mSpellCheckEnd = -1; +} // Sets the scrollbar from the cursor position void LLTextBase::updateScrollFromCursor() diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 0549141b72..90b147cee1 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -30,6 +30,7 @@ #include "v4color.h" #include "lleditmenuhandler.h" +#include "llspellcheckmenuhandler.h" #include "llstyle.h" #include "llkeywords.h" #include "llpanel.h" @@ -230,7 +231,8 @@ typedef LLPointer LLTextSegmentPtr; /// class LLTextBase : public LLUICtrl, - protected LLEditMenuHandler + protected LLEditMenuHandler, + public LLSpellCheckMenuHandler { public: friend class LLTextSegment; @@ -259,6 +261,7 @@ public: border_visible, track_end, read_only, + spellcheck, allow_scroll, plain_text, wrap, @@ -311,6 +314,24 @@ public: /*virtual*/ BOOL canDeselect() const; /*virtual*/ void deselect(); + // LLSpellCheckMenuHandler overrides + /*virtual*/ bool getSpellCheck() const; + + /*virtual*/ const std::string& getSuggestion(U32 index) const; + /*virtual*/ U32 getSuggestionCount() const; + /*virtual*/ void replaceWithSuggestion(U32 index); + + /*virtual*/ void addToDictionary(); + /*virtual*/ bool canAddToDictionary() const; + + /*virtual*/ void addToIgnore(); + /*virtual*/ bool canAddToIgnore() const; + + // Spell checking helper functions + std::string getMisspelledWord(U32 pos) const; + bool isMisspelledWord(U32 pos) const; + void onSpellCheckSettingsChange(); + // used by LLTextSegment layout code bool getWordWrap() { return mWordWrap; } bool getUseEllipses() { return mUseEllipses; } @@ -540,6 +561,14 @@ protected: BOOL mIsSelecting; // Are we in the middle of a drag-select? + // spell checking + bool mSpellCheck; + S32 mSpellCheckStart; + S32 mSpellCheckEnd; + LLTimer mSpellCheckTimer; + std::list > mMisspellRanges; + std::vector mSuggestionList; + // configuration S32 mHPad; // padding on left of text S32 mVPad; // padding above text diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 3a23ce1cac..c5957838ba 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -54,6 +54,7 @@ #include "llwindow.h" #include "lltextparser.h" #include "llscrollcontainer.h" +#include "llspellcheck.h" #include "llpanel.h" #include "llurlregistry.h" #include "lltooltip.h" @@ -77,6 +78,7 @@ template class LLTextEditor* LLView::getChild( const S32 UI_TEXTEDITOR_LINE_NUMBER_MARGIN = 32; const S32 UI_TEXTEDITOR_LINE_NUMBER_DIGITS = 4; const S32 SPACES_PER_TAB = 4; +const F32 SPELLCHECK_DELAY = 0.5f; // delay between the last keypress and spell checking the word the cursor is on /////////////////////////////////////////////////////////////////// @@ -1961,7 +1963,34 @@ void LLTextEditor::showContextMenu(S32 x, S32 y) S32 screen_x, screen_y; localPointToScreen(x, y, &screen_x, &screen_y); - mContextMenu->show(screen_x, screen_y); + + setCursorAtLocalPos(x, y, false); + if (hasSelection()) + { + if ( (mCursorPos < llmin(mSelectionStart, mSelectionEnd)) || (mCursorPos > llmax(mSelectionStart, mSelectionEnd)) ) + deselect(); + else + setCursorPos(llmax(mSelectionStart, mSelectionEnd)); + } + + bool use_spellcheck = getSpellCheck(), is_misspelled = false; + if (use_spellcheck) + { + mSuggestionList.clear(); + + // If the cursor is on a misspelled word, retrieve suggestions for it + std::string misspelled_word = getMisspelledWord(mCursorPos); + if ((is_misspelled = !misspelled_word.empty()) == true) + { + LLSpellChecker::instance().getSuggestions(misspelled_word, mSuggestionList); + } + } + + mContextMenu->setItemVisible("Suggestion Separator", (use_spellcheck) && (!mSuggestionList.empty())); + mContextMenu->setItemVisible("Add to Dictionary", (use_spellcheck) && (is_misspelled)); + mContextMenu->setItemVisible("Add to Ignore", (use_spellcheck) && (is_misspelled)); + mContextMenu->setItemVisible("Spellcheck Separator", (use_spellcheck) && (is_misspelled)); + mContextMenu->show(screen_x, screen_y, this); } @@ -2846,6 +2875,9 @@ void LLTextEditor::setKeystrokeCallback(const keystroke_signal_t::slot_type& cal void LLTextEditor::onKeyStroke() { mKeystrokeSignal(this); + + mSpellCheckStart = mSpellCheckEnd = -1; + mSpellCheckTimer.setTimerExpirySec(SPELLCHECK_DELAY); } //virtual -- cgit v1.2.3 From 41e11a508379d8f6d2b95f835d2df9f4e2bbea01 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 3 Feb 2012 15:34:52 +0100 Subject: STORM-276 FIXED Selecting a character in a line editor and replacing it doesn't trigger a spell check --- indra/llui/lllineeditor.cpp | 53 ++++++++++++++++++++------------------------- indra/llui/lllineeditor.h | 1 + 2 files changed, 24 insertions(+), 30 deletions(-) (limited to 'indra') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 5479c080bd..e67753292e 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -66,7 +66,7 @@ const S32 SCROLL_INCREMENT_ADD = 0; // make space for typing const S32 SCROLL_INCREMENT_DEL = 4; // make space for baskspacing const F32 AUTO_SCROLL_TIME = 0.05f; const F32 TRIPLE_CLICK_INTERVAL = 0.3f; // delay between double and triple click. *TODO: make this equal to the double click interval? -const F32 SPELLCHECK_DELAY = 0.5f; // delay between the last keypress and showing spell checking feedback for the word the cursor is on +const F32 SPELLCHECK_DELAY = 0.5f; // delay between the last keypress and spell checking the word the cursor is on const std::string PASSWORD_ASTERISK( "\xE2\x80\xA2" ); // U+2022 BULLET @@ -1158,9 +1158,8 @@ void LLLineEditor::cut() LLUI::reportBadKeystroke(); } else - if( mKeystrokeCallback ) { - mKeystrokeCallback( this ); + onKeystroke(); } } } @@ -1294,9 +1293,8 @@ void LLLineEditor::pasteHelper(bool is_primary) LLUI::reportBadKeystroke(); } else - if( mKeystrokeCallback ) { - mKeystrokeCallback( this ); + onKeystroke(); } } } @@ -1549,10 +1547,7 @@ BOOL LLLineEditor::handleKeyHere(KEY key, MASK mask ) // Notify owner if requested if (!need_to_rollback && handled) { - if (mKeystrokeCallback) - { - mKeystrokeCallback(this); - } + onKeystroke(); if ( (!selection_modified) && (KEY_BACKSPACE == key) ) { mSpellCheckTimer.setTimerExpirySec(SPELLCHECK_DELAY); @@ -1608,12 +1603,10 @@ BOOL LLLineEditor::handleUnicodeCharHere(llwchar uni_char) // Notify owner if requested if( !need_to_rollback && handled ) { - if( mKeystrokeCallback ) - { - // HACK! The only usage of this callback doesn't do anything with the character. - // We'll have to do something about this if something ever changes! - Doug - mKeystrokeCallback( this ); - } + // HACK! The only usage of this callback doesn't do anything with the character. + // We'll have to do something about this if something ever changes! - Doug + onKeystroke(); + mSpellCheckTimer.setTimerExpirySec(SPELLCHECK_DELAY); } } @@ -1643,9 +1636,7 @@ void LLLineEditor::doDelete() if (!prevalidateInput(text_to_delete)) { - if( mKeystrokeCallback ) - mKeystrokeCallback( this ); - + onKeystroke(); return; } setCursor(getCursor() + 1); @@ -1661,10 +1652,8 @@ void LLLineEditor::doDelete() } else { - if( mKeystrokeCallback ) - { - mKeystrokeCallback( this ); - } + onKeystroke(); + mSpellCheckTimer.setTimerExpirySec(SPELLCHECK_DELAY); } } @@ -2296,6 +2285,15 @@ void LLLineEditor::setSelectAllonFocusReceived(BOOL b) mSelectAllonFocusReceived = b; } +void LLLineEditor::onKeystroke() +{ + if (mKeystrokeCallback) + { + mKeystrokeCallback(this); + } + + mSpellCheckStart = mSpellCheckEnd = -1; +} void LLLineEditor::setKeystrokeCallback(callback_t callback, void* user_data) { @@ -2418,10 +2416,8 @@ void LLLineEditor::updatePreedit(const LLWString &preedit_string, // Update of the preedit should be caused by some key strokes. mKeystrokeTimer.reset(); - if( mKeystrokeCallback ) - { - mKeystrokeCallback( this ); - } + onKeystroke(); + mSpellCheckTimer.setTimerExpirySec(SPELLCHECK_DELAY); } @@ -2575,6 +2571,7 @@ void LLLineEditor::showContextMenu(S32 x, S32 y) S32 screen_x, screen_y; localPointToScreen(x, y, &screen_x, &screen_y); + setCursorAtLocalPos(x); if (hasSelection()) { if ( (mCursorPos < llmin(mSelectionStart, mSelectionEnd)) || (mCursorPos > llmax(mSelectionStart, mSelectionEnd)) ) @@ -2582,10 +2579,6 @@ void LLLineEditor::showContextMenu(S32 x, S32 y) else setCursor(llmax(mSelectionStart, mSelectionEnd)); } - else - { - setCursorAtLocalPos(x); - } bool use_spellcheck = getSpellCheck(), is_misspelled = false; if (use_spellcheck) diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 9513274f21..40f931ecc1 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -243,6 +243,7 @@ public: void setSelectAllonFocusReceived(BOOL b); void setSelectAllonCommit(BOOL b) { mSelectAllonCommit = b; } + void onKeystroke(); typedef boost::function callback_t; void setKeystrokeCallback(callback_t callback, void* user_data); -- cgit v1.2.3 From 49e0c38ee85214eb7d0e7e995d1a380ee2f60720 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 3 Feb 2012 19:45:00 +0100 Subject: STORM-276 Added preferences panel --- indra/llui/lllineeditor.cpp | 1 + indra/llui/llspellcheck.cpp | 12 +- indra/llui/llspellcheck.h | 29 +++-- indra/llui/lltextbase.cpp | 1 + indra/newview/llfloaterpreference.cpp | 95 +++++++++++++++ indra/newview/llfloaterpreference.h | 2 + indra/newview/skins/default/textures/textures.xml | 2 + .../skins/default/textures/widgets/Arrow_Left.png | Bin 0 -> 311 bytes .../skins/default/textures/widgets/Arrow_Right.png | Bin 0 -> 313 bytes .../skins/default/xui/en/floater_preferences.xml | 6 + .../xui/en/panel_preferences_spellcheck.xml | 132 +++++++++++++++++++++ 11 files changed, 261 insertions(+), 19 deletions(-) create mode 100644 indra/newview/skins/default/textures/widgets/Arrow_Left.png create mode 100644 indra/newview/skins/default/textures/widgets/Arrow_Right.png create mode 100644 indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml (limited to 'indra') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index e67753292e..42cfc4cae9 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -617,6 +617,7 @@ bool LLLineEditor::isMisspelledWord(U32 pos) const void LLLineEditor::onSpellCheckSettingsChange() { // Recheck the spelling on every change + mMisspellRanges.clear(); mSpellCheckStart = mSpellCheckEnd = -1; } diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp index 433ca02852..65207144f8 100644 --- a/indra/llui/llspellcheck.cpp +++ b/indra/llui/llspellcheck.cpp @@ -186,7 +186,7 @@ void LLSpellChecker::addToDictFile(const std::string& dict_path, const std::stri } } -void LLSpellChecker::setSecondaryDictionaries(std::list dict_list) +void LLSpellChecker::setSecondaryDictionaries(dict_list_t dict_list) { if (!getUseSpellCheck()) { @@ -194,11 +194,11 @@ void LLSpellChecker::setSecondaryDictionaries(std::list dict_list) } // Check if we're only adding secondary dictionaries, or removing them - std::list dict_add(llmax(dict_list.size(), mDictSecondary.size())), dict_rem(llmax(dict_list.size(), mDictSecondary.size())); + dict_list_t dict_add(llmax(dict_list.size(), mDictSecondary.size())), dict_rem(llmax(dict_list.size(), mDictSecondary.size())); dict_list.sort(); mDictSecondary.sort(); - std::list::iterator end_added = std::set_difference(dict_list.begin(), dict_list.end(), mDictSecondary.begin(), mDictSecondary.end(), dict_add.begin()); - std::list::iterator end_removed = std::set_difference(mDictSecondary.begin(), mDictSecondary.end(), dict_list.begin(), dict_list.end(), dict_rem.begin()); + dict_list_t::iterator end_added = std::set_difference(dict_list.begin(), dict_list.end(), mDictSecondary.begin(), mDictSecondary.end(), dict_add.begin()); + dict_list_t::iterator end_removed = std::set_difference(mDictSecondary.begin(), mDictSecondary.end(), dict_list.begin(), dict_list.end(), dict_rem.begin()); if (end_removed != dict_rem.begin()) // We can't remove secondary dictionaries so we need to recreate the Hunspell instance { @@ -211,7 +211,7 @@ void LLSpellChecker::setSecondaryDictionaries(std::list dict_list) { const std::string app_path = getDictionaryAppPath(); const std::string user_path = getDictionaryUserPath(); - for (std::list::const_iterator it_added = dict_add.begin(); it_added != end_added; ++it_added) + for (dict_list_t::const_iterator it_added = dict_add.begin(); it_added != end_added; ++it_added) { const LLSD dict_entry = getDictionaryData(*it_added); if ( (!dict_entry.isDefined()) || (!dict_entry["installed"].asBoolean()) ) @@ -287,7 +287,7 @@ void LLSpellChecker::initHunspell(const std::string& dict_name) } } - for (std::list::const_iterator it = mDictSecondary.begin(); it != mDictSecondary.end(); ++it) + for (dict_list_t::const_iterator it = mDictSecondary.begin(); it != mDictSecondary.end(); ++it) { const LLSD dict_entry = getDictionaryData(*it); if ( (!dict_entry.isDefined()) || (!dict_entry["installed"].asBoolean()) ) diff --git a/indra/llui/llspellcheck.h b/indra/llui/llspellcheck.h index affdac2907..8351655b49 100644 --- a/indra/llui/llspellcheck.h +++ b/indra/llui/llspellcheck.h @@ -44,17 +44,20 @@ public: void addToIgnoreList(const std::string& word); bool checkSpelling(const std::string& word) const; S32 getSuggestions(const std::string& word, std::vector& suggestions) const; - -public: - const LLSD getDictionaryData(const std::string& dict_name) const; - const LLSD& getDictionaryMap() const { return mDictMap; } - void refreshDictionaryMap(); - void setSecondaryDictionaries(std::list dictList); protected: - void addToDictFile(const std::string& dict_path, const std::string& word); - void initHunspell(const std::string& dict_name); + void addToDictFile(const std::string& dict_path, const std::string& word); + void initHunspell(const std::string& dict_name); public: + typedef std::list dict_list_t; + + const std::string& getActiveDictionary() const { return mDictName; } + const LLSD getDictionaryData(const std::string& dict_name) const; + const LLSD& getDictionaryMap() const { return mDictMap; } + const dict_list_t& getSecondaryDictionaries() const { return mDictSecondary; } + void refreshDictionaryMap(); + void setSecondaryDictionaries(dict_list_t dict_list); + static const std::string getDictionaryAppPath(); static const std::string getDictionaryUserPath(); static bool getUseSpellCheck(); @@ -64,11 +67,11 @@ public: static boost::signals2::connection setSettingsChangeCallback(const settings_change_signal_t::slot_type& cb); protected: - Hunspell* mHunspell; - std::string mDictName; - std::string mDictFile; - LLSD mDictMap; - std::list mDictSecondary; + Hunspell* mHunspell; + std::string mDictName; + std::string mDictFile; + LLSD mDictMap; + dict_list_t mDictSecondary; std::vector mIgnoreList; static settings_change_signal_t sSettingsChangeSignal; diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 7eee1d39c4..2231d9b983 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1308,6 +1308,7 @@ bool LLTextBase::isMisspelledWord(U32 pos) const void LLTextBase::onSpellCheckSettingsChange() { // Recheck the spelling on every change + mMisspellRanges.clear(); mSpellCheckStart = mSpellCheckEnd = -1; } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index a333989e7e..29b07d2479 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -66,6 +66,7 @@ #include "llsky.h" #include "llscrolllistctrl.h" #include "llscrolllistitem.h" +#include "llspellcheck.h" #include "llsliderctrl.h" #include "lltabcontainer.h" #include "lltrans.h" @@ -110,6 +111,8 @@ #include "lllogininstance.h" // to check if logged in yet #include "llsdserialize.h" +#include + const F32 MAX_USER_FAR_CLIP = 512.f; const F32 MIN_USER_FAR_CLIP = 64.f; const F32 BANDWIDTH_UPDATER_TIMEOUT = 0.5f; @@ -445,6 +448,9 @@ BOOL LLFloaterPreference::postBuild() getChild("language_combobox")->setCommitCallback(boost::bind(&LLFloaterPreference::onLanguageChange, this)); + getChild("btn_spellcheck_moveleft")->setCommitCallback(boost::bind(&LLFloaterPreference::onClickDictMove, this, "list_spellcheck_active", "list_spellcheck_available")); + getChild("btn_spellcheck_moveright")->setCommitCallback(boost::bind(&LLFloaterPreference::onClickDictMove, this, "list_spellcheck_available", "list_spellcheck_active")); + // if floater is opened before login set default localized busy message if (LLStartUp::getStartupState() < STATE_STARTED) { @@ -577,6 +583,19 @@ void LLFloaterPreference::apply() } } + if (hasChild("check_spellcheck"), TRUE) + { + LLScrollListCtrl* list_ctrl = findChild("list_spellcheck_active"); + std::vector list_items = list_ctrl->getAllData(); + + std::list list_dict; + list_dict.push_back(LLSpellChecker::instance().getActiveDictionary()); + for (std::vector::const_iterator item_it = list_items.begin(); item_it != list_items.end(); ++item_it) + list_dict.push_back((*item_it)->getColumn(0)->getValue().asString()); + + gSavedSettings.setString("SpellCheckDictionary", boost::join(list_dict, ",")); + } + saveAvatarProperties(); if (mClickActionDirty) @@ -687,6 +706,8 @@ void LLFloaterPreference::onOpen(const LLSD& key) // Load (double-)click to walk/teleport settings. updateClickActionControls(); + buildDictLists(); + // Enabled/disabled popups, might have been changed by user actions // while preferences floater was closed. buildPopupLists(); @@ -865,6 +886,25 @@ void LLFloaterPreference::onNameTagOpacityChange(const LLSD& newvalue) } } +void LLFloaterPreference::onClickDictMove(const std::string& from, const std::string& to) +{ + LLScrollListCtrl* from_ctrl = findChild(from); + LLScrollListCtrl* to_ctrl = findChild(to); + + LLSD row; + row["columns"][0]["column"] = "name"; + row["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; + row["columns"][0]["font"]["style"] = "NORMAL"; + + std::vector sel_items = from_ctrl->getAllSelected(); + for (std::vector::const_iterator sel_it = sel_items.begin(); sel_it != sel_items.end(); ++sel_it) + { + row["columns"][0]["value"] = (*sel_it)->getColumn(0)->getValue(); + to_ctrl->addElement(row); + } + from_ctrl->deleteSelectedItems(); +} + void LLFloaterPreference::onClickSetCache() { std::string cur_name(gSavedSettings.getString("CacheLocation")); @@ -930,6 +970,61 @@ void LLFloaterPreference::refreshSkin(void* data) self->getChild("skin_selection", true)->setValue(sSkin); } +void LLFloaterPreference::buildDictLists() +{ + LLComboBox* dict_combo = findChild("combo_spellcheck_dict"); + dict_combo->clearRows(); + + LLScrollListCtrl* active_ctrl = findChild("list_spellcheck_active"); + active_ctrl->clearRows(); + + LLScrollListCtrl* avail_ctrl = findChild("list_spellcheck_available"); + avail_ctrl->clearRows(); + + if (LLSpellChecker::getUseSpellCheck()) + { + // Populate the main dictionary combobox + const LLSD& dict_map = LLSpellChecker::instance().getDictionaryMap(); + if (dict_map.size()) + { + for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) + { + const LLSD& dict = *dict_it; + if ( (dict["installed"].asBoolean()) && (dict.has("language")) ) + dict_combo->add(dict["language"].asString()); + } + dict_combo->selectByValue(LLSpellChecker::instance().getActiveDictionary()); + } + + LLSD row; + row["columns"][0]["column"] = "name"; + row["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; + row["columns"][0]["font"]["style"] = "NORMAL"; + + // Populate the active dictionary list + LLSpellChecker::dict_list_t active_list = LLSpellChecker::instance().getSecondaryDictionaries(); + active_ctrl->sortByColumnIndex(0, true); + for (LLSpellChecker::dict_list_t::const_iterator it = active_list.begin(); it != active_list.end(); ++it) + { + row["columns"][0]["value"] = *it; + active_ctrl->addElement(row); + } + active_list.push_back(LLSpellChecker::instance().getActiveDictionary()); + + // Populate the available dictionary list + avail_ctrl->sortByColumnIndex(0, true); + for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) + { + const LLSD& dict = *dict_it; + if ( (dict["installed"].asBoolean()) && (dict.has("language")) && + (active_list.end() == std::find(active_list.begin(), active_list.end(), dict["language"].asString())) ) + { + row["columns"][0]["value"] = dict["language"].asString(); + avail_ctrl->addElement(row); + } + } + } +} void LLFloaterPreference::buildPopupLists() { diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 7ee3294478..cd258b5614 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -121,6 +121,7 @@ public: void setCacheLocation(const LLStringExplicit& location); + void onClickDictMove(const std::string& from, const std::string& to); void onClickSetCache(); void onClickResetCache(); void onClickSkin(LLUICtrl* ctrl,const LLSD& userdata); @@ -160,6 +161,7 @@ public: void applyUIColor(LLUICtrl* ctrl, const LLSD& param); void getUIColor(LLUICtrl* ctrl, const LLSD& param); + void buildDictLists(); void buildPopupLists(); static void refreshSkin(void* data); private: diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 8702ebde2a..bc0363014a 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -54,6 +54,8 @@ with the same filename but different name + + diff --git a/indra/newview/skins/default/textures/widgets/Arrow_Left.png b/indra/newview/skins/default/textures/widgets/Arrow_Left.png new file mode 100644 index 0000000000..a424282839 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Arrow_Left.png differ diff --git a/indra/newview/skins/default/textures/widgets/Arrow_Right.png b/indra/newview/skins/default/textures/widgets/Arrow_Right.png new file mode 100644 index 0000000000..e32bee8f34 Binary files /dev/null and b/indra/newview/skins/default/textures/widgets/Arrow_Right.png differ diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index 402868bb97..eebc3a9cca 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -120,6 +120,12 @@ layout="topleft" help_topic="preferences_advanced1_tab" name="advanced1" /> + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml b/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml new file mode 100644 index 0000000000..9b5d429846 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml @@ -0,0 +1,132 @@ + + + + + Main dictionary : + + + + + Additional dictionaries : + + + Available + + + Active + + + + + + + -- cgit v1.2.3 From 2114e88cd1291ef1dba4b79bcdcca4b2d134262f Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 3 Feb 2012 19:51:18 +0100 Subject: STORM-276 Enabled spell checking on notecards, picks and group notices --- indra/newview/skins/default/xui/en/floater_preview_notecard.xml | 1 + indra/newview/skins/default/xui/en/panel_edit_pick.xml | 1 + indra/newview/skins/default/xui/en/panel_group_notices.xml | 4 ++++ 3 files changed, 6 insertions(+) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml index be3b2d179d..2e1c8ce670 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml @@ -70,6 +70,7 @@ max_length="65536" name="Notecard Editor" parse_urls="false" + spellcheck="true" tab_group="1" top="46" width="392" diff --git a/indra/newview/skins/default/xui/en/panel_edit_pick.xml b/indra/newview/skins/default/xui/en/panel_edit_pick.xml index 2ec2e03e8c..6d0be7fdec 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_pick.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_pick.xml @@ -134,6 +134,7 @@ top_pad="2" max_length="1023" name="pick_desc" + spellcheck="true" text_color="black" word_wrap="true" /> @@ -309,6 +311,7 @@ Maximum 200 per group daily left_pad="3" max_length_bytes="63" name="view_subject" + spellcheck="true" top_delta="-1" visible="false" width="200" /> @@ -333,6 +336,7 @@ Maximum 200 per group daily right="-1" max_length="511" name="view_message" + spellcheck="true" top_delta="-40" width="313" word_wrap="true" /> -- cgit v1.2.3 From 39ffad760b7abd09c8a7af6871fcabbf2da9c1e6 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sun, 5 Feb 2012 15:48:07 -0500 Subject: STORM-1738 Fix some syntax errors warn-on-failure:open-license --- indra/newview/llautocorrect.cpp | 2 +- indra/newview/llautocorrectfloater.cpp | 11 ++++++----- indra/newview/llnearbychatbar.cpp | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/llautocorrect.cpp b/indra/newview/llautocorrect.cpp index c16787d637..9162b35f45 100644 --- a/indra/newview/llautocorrect.cpp +++ b/indra/newview/llautocorrect.cpp @@ -375,7 +375,7 @@ std::string AutoCorrect::replaceWords(std::string words) args["REPLACEMENT"]=replacement; LLNotificationsUtil::add("AutoReplace",args); } - ldebugs << "found a word in list " << location.c_str() << " and it will replace " << currentWord.c_str() << " => " << replacement.c_str() << llendl; + lldebugs << "found a word in list " << location.c_str() << " and it will replace " << currentWord.c_str() << " => " << replacement.c_str() << llendl; int wordStart = words.find(currentWord); words.replace(wordStart,currentWord.length(),replacement); return replaceWords(words);//lol recursion! diff --git a/indra/newview/llautocorrectfloater.cpp b/indra/newview/llautocorrectfloater.cpp index 74762a876f..97170fc65c 100644 --- a/indra/newview/llautocorrectfloater.cpp +++ b/indra/newview/llautocorrectfloater.cpp @@ -159,7 +159,7 @@ void AutoCorrectFloater::updateItemsList() void AutoCorrectFloater::updateNamesList() { namesList->deleteAllItems(); - if(!gSavedSettings, "AutoCorrect") + if(!gSavedSettings.getBOOL("AutoCorrect")) { updateItemsList(); return; @@ -208,7 +208,8 @@ void AutoCorrectFloater::updateListControlsEnabled(BOOL selected) } void AutoCorrectFloater::updateEnabledStuff() { - if(!gSavedSettings, "AutoCorrect") + BOOL autocorrect = gSavedSettings.getBOOL("AutoCorrect"); + if(autocorrect) { LLCheckBoxCtrl *enBox = getChild("ac_enable"); enBox->setDisabledColor(LLColor4::red); @@ -219,9 +220,9 @@ void AutoCorrectFloater::updateEnabledStuff() LLUIColorTable::instance().getColor( "LabelTextColor" )); } - childSetEnabled("ac_list_name",enabledd); - childSetEnabled("ac_list_entry",enabledd); - updateListControlsEnabled(enabledd); + childSetEnabled("ac_list_name", autocorrect); + childSetEnabled("ac_list_entry", autocorrect); + updateListControlsEnabled(autocorrect); updateNamesList(); AutoCorrect::getInstance()->save(); diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 8c8707e16c..86244cbaa6 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -89,7 +89,7 @@ BOOL LLNearbyChatBar::postBuild() mChatBox = getChild("chat_box"); // *TODO Establish LineEditor with autocorrect callback -// mChatBox->setAutocorrectCallback(boost::bind(&AutoCorrect::autocorrectCallback)); +// mChatBox->setAutocorrectCallback(boost::bind(&AutoCorrect::autocorrectCallback, _1, _2)); mChatBox->setCommitCallback(boost::bind(&LLNearbyChatBar::onChatBoxCommit, this)); mChatBox->setKeystrokeCallback(&onChatBoxKeystroke, this); mChatBox->setFocusLostCallback(boost::bind(&onChatBoxFocusLost, _1, this)); -- cgit v1.2.3 From 60e39343b17f29c65e8a60a415f7ed83ff069a12 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 14 Feb 2012 21:48:22 +0100 Subject: STORM-276 Reworked the spell check preferences to be more robust and less error-prone --- indra/llui/llspellcheck.cpp | 20 +++- indra/llui/llspellcheck.h | 14 ++- indra/newview/llfloaterpreference.cpp | 121 +++++++++++++-------- indra/newview/llfloaterpreference.h | 2 +- .../xui/en/panel_preferences_spellcheck.xml | 4 + 5 files changed, 104 insertions(+), 57 deletions(-) (limited to 'indra') diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp index 65207144f8..46df44cdba 100644 --- a/indra/llui/llspellcheck.cpp +++ b/indra/llui/llspellcheck.cpp @@ -41,6 +41,7 @@ static const std::string DICT_DIR = "dictionaries"; static const std::string DICT_CUSTOM_SUFFIX = "_custom"; static const std::string DICT_IGNORE_SUFFIX = "_ignore"; +LLSD LLSpellChecker::sDictMap; LLSpellChecker::settings_change_signal_t LLSpellChecker::sSettingsChangeSignal; LLSpellChecker::LLSpellChecker() @@ -86,9 +87,10 @@ S32 LLSpellChecker::getSuggestions(const std::string& word, std::vector class Hunspell; -class LLSpellChecker : public LLSingleton +class LLSpellChecker : public LLSingleton, public LLInitClass { friend class LLSingleton; + friend class LLInitClass; protected: LLSpellChecker(); ~LLSpellChecker(); @@ -52,28 +54,30 @@ public: typedef std::list dict_list_t; const std::string& getActiveDictionary() const { return mDictName; } - const LLSD getDictionaryData(const std::string& dict_name) const; - const LLSD& getDictionaryMap() const { return mDictMap; } const dict_list_t& getSecondaryDictionaries() const { return mDictSecondary; } - void refreshDictionaryMap(); void setSecondaryDictionaries(dict_list_t dict_list); static const std::string getDictionaryAppPath(); static const std::string getDictionaryUserPath(); + static const LLSD getDictionaryData(const std::string& dict_name); + static const LLSD& getDictionaryMap() { return sDictMap; } static bool getUseSpellCheck(); + static void refreshDictionaryMap(); static void setUseSpellCheck(const std::string& dict_name); typedef boost::signals2::signal settings_change_signal_t; static boost::signals2::connection setSettingsChangeCallback(const settings_change_signal_t::slot_type& cb); +protected: + static void initClass(); protected: Hunspell* mHunspell; std::string mDictName; std::string mDictFile; - LLSD mDictMap; dict_list_t mDictSecondary; std::vector mIgnoreList; + static LLSD sDictMap; static settings_change_signal_t sSettingsChangeSignal; }; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 29b07d2479..c41488ce91 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -448,6 +448,8 @@ BOOL LLFloaterPreference::postBuild() getChild("language_combobox")->setCommitCallback(boost::bind(&LLFloaterPreference::onLanguageChange, this)); + gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&LLFloaterPreference::refreshDictLists, this, false)); + getChild("combo_spellcheck_dict")->setCommitCallback(boost::bind(&LLFloaterPreference::refreshDictLists, this, false)); getChild("btn_spellcheck_moveleft")->setCommitCallback(boost::bind(&LLFloaterPreference::onClickDictMove, this, "list_spellcheck_active", "list_spellcheck_available")); getChild("btn_spellcheck_moveright")->setCommitCallback(boost::bind(&LLFloaterPreference::onClickDictMove, this, "list_spellcheck_available", "list_spellcheck_active")); @@ -585,14 +587,19 @@ void LLFloaterPreference::apply() if (hasChild("check_spellcheck"), TRUE) { - LLScrollListCtrl* list_ctrl = findChild("list_spellcheck_active"); - std::vector list_items = list_ctrl->getAllData(); - std::list list_dict; - list_dict.push_back(LLSpellChecker::instance().getActiveDictionary()); - for (std::vector::const_iterator item_it = list_items.begin(); item_it != list_items.end(); ++item_it) - list_dict.push_back((*item_it)->getColumn(0)->getValue().asString()); + LLComboBox* dict_combo = findChild("combo_spellcheck_dict"); + const std::string dict_name = dict_combo->getSelectedItemLabel(); + if (!dict_name.empty()) + { + list_dict.push_back(dict_name); + + LLScrollListCtrl* list_ctrl = findChild("list_spellcheck_active"); + std::vector list_items = list_ctrl->getAllData(); + for (std::vector::const_iterator item_it = list_items.begin(); item_it != list_items.end(); ++item_it) + list_dict.push_back((*item_it)->getColumn(0)->getValue().asString()); + } gSavedSettings.setString("SpellCheckDictionary", boost::join(list_dict, ",")); } @@ -706,7 +713,7 @@ void LLFloaterPreference::onOpen(const LLSD& key) // Load (double-)click to walk/teleport settings. updateClickActionControls(); - buildDictLists(); + refreshDictLists(true); // Enabled/disabled popups, might have been changed by user actions // while preferences floater was closed. @@ -970,58 +977,80 @@ void LLFloaterPreference::refreshSkin(void* data) self->getChild("skin_selection", true)->setValue(sSkin); } -void LLFloaterPreference::buildDictLists() +void LLFloaterPreference::refreshDictLists(bool from_settings) { + bool enabled = gSavedSettings.getBOOL("SpellCheck"); + getChild("btn_spellcheck_moveleft")->setEnabled(enabled); + getChild("btn_spellcheck_moveright")->setEnabled(enabled); + + // Populate the dictionary combobox LLComboBox* dict_combo = findChild("combo_spellcheck_dict"); + std::string dict_cur = dict_combo->getSelectedItemLabel(); + if ((dict_cur.empty() || from_settings) && (LLSpellChecker::getUseSpellCheck())) + dict_cur = LLSpellChecker::instance().getActiveDictionary(); dict_combo->clearRows(); + dict_combo->setEnabled(enabled); - LLScrollListCtrl* active_ctrl = findChild("list_spellcheck_active"); - active_ctrl->clearRows(); + const LLSD& dict_map = LLSpellChecker::getDictionaryMap(); + if (dict_map.size()) + { + for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) + { + const LLSD& dict = *dict_it; + if ( (dict["installed"].asBoolean()) && (dict.has("language")) ) + dict_combo->add(dict["language"].asString()); + } + if (!dict_combo->selectByValue(dict_cur)) + dict_combo->clear(); + } + // Populate the available and active dictionary list LLScrollListCtrl* avail_ctrl = findChild("list_spellcheck_available"); - avail_ctrl->clearRows(); + LLScrollListCtrl* active_ctrl = findChild("list_spellcheck_active"); - if (LLSpellChecker::getUseSpellCheck()) + LLSpellChecker::dict_list_t active_list; + if ( ((!avail_ctrl->getItemCount()) && (!active_ctrl->getItemCount())) || (from_settings) ) { - // Populate the main dictionary combobox - const LLSD& dict_map = LLSpellChecker::instance().getDictionaryMap(); - if (dict_map.size()) + if (LLSpellChecker::getUseSpellCheck()) + active_list = LLSpellChecker::instance().getSecondaryDictionaries(); + } + else + { + std::vector active_items = active_ctrl->getAllData(); + for (std::vector::const_iterator item_it = active_items.begin(); item_it != active_items.end(); ++item_it) { - for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) - { - const LLSD& dict = *dict_it; - if ( (dict["installed"].asBoolean()) && (dict.has("language")) ) - dict_combo->add(dict["language"].asString()); - } - dict_combo->selectByValue(LLSpellChecker::instance().getActiveDictionary()); + std::string dict = (*item_it)->getColumn(0)->getValue().asString(); + if (dict_cur != dict) + active_list.push_back(dict); } + } - LLSD row; - row["columns"][0]["column"] = "name"; - row["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; - row["columns"][0]["font"]["style"] = "NORMAL"; - - // Populate the active dictionary list - LLSpellChecker::dict_list_t active_list = LLSpellChecker::instance().getSecondaryDictionaries(); - active_ctrl->sortByColumnIndex(0, true); - for (LLSpellChecker::dict_list_t::const_iterator it = active_list.begin(); it != active_list.end(); ++it) - { - row["columns"][0]["value"] = *it; - active_ctrl->addElement(row); - } - active_list.push_back(LLSpellChecker::instance().getActiveDictionary()); + LLSD row; + row["columns"][0]["column"] = "name"; + row["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; + row["columns"][0]["font"]["style"] = "NORMAL"; - // Populate the available dictionary list - avail_ctrl->sortByColumnIndex(0, true); - for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) + active_ctrl->clearRows(); + active_ctrl->setEnabled(enabled); + active_ctrl->sortByColumnIndex(0, true); + for (LLSpellChecker::dict_list_t::const_iterator it = active_list.begin(); it != active_list.end(); ++it) + { + row["columns"][0]["value"] = *it; + active_ctrl->addElement(row); + } + active_list.push_back(dict_cur); + + avail_ctrl->clearRows(); + avail_ctrl->setEnabled(enabled); + avail_ctrl->sortByColumnIndex(0, true); + for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) + { + const LLSD& dict = *dict_it; + if ( (dict["installed"].asBoolean()) && (dict.has("language")) && + (active_list.end() == std::find(active_list.begin(), active_list.end(), dict["language"].asString())) ) { - const LLSD& dict = *dict_it; - if ( (dict["installed"].asBoolean()) && (dict.has("language")) && - (active_list.end() == std::find(active_list.begin(), active_list.end(), dict["language"].asString())) ) - { - row["columns"][0]["value"] = dict["language"].asString(); - avail_ctrl->addElement(row); - } + row["columns"][0]["value"] = dict["language"].asString(); + avail_ctrl->addElement(row); } } } diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index cd258b5614..f75f71cc3d 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -161,8 +161,8 @@ public: void applyUIColor(LLUICtrl* ctrl, const LLSD& param); void getUIColor(LLUICtrl* ctrl, const LLSD& param); - void buildDictLists(); void buildPopupLists(); + void refreshDictLists(bool from_settings); static void refreshSkin(void* data); private: static std::string sSkin; diff --git a/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml b/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml index 9b5d429846..f1b16c5d0d 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml @@ -86,6 +86,7 @@ Active Date: Tue, 14 Feb 2012 21:57:58 +0100 Subject: STORM-276 FIXED Typing in an LLTextEditor freezes the viewer --- indra/llui/lltextbase.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 2231d9b983..2d7516a1cd 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -552,7 +552,7 @@ void LLTextBase::drawText() const LLWString& wstrText = getWText(); mMisspellRanges.clear(); - segment_set_t::iterator seg_it = getSegIterContaining(start); + segment_set_t::const_iterator seg_it = getSegIterContaining(start); while (mSegments.end() != seg_it) { LLTextSegmentPtr text_segment = *seg_it; @@ -673,7 +673,10 @@ void LLTextBase::drawText() { // Skip the current word if the user is still busy editing it if ( (!mSpellCheckTimer.hasExpired()) && (misspell_it->first <= (U32)mCursorPos) && (misspell_it->second >= (U32)mCursorPos) ) + { + ++misspell_it; continue; + } S32 squiggle_start = 0, squiggle_end = 0, pony = 0; cur_segment->getDimensions(seg_start - cur_segment->getStart(), misspell_it->first - seg_start, squiggle_start, pony); -- cgit v1.2.3 From 9c792e337695b904e4f52fce83b293a2e97fdeaf Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 14 Feb 2012 22:33:28 +0100 Subject: STORM-276 FIXED Misspellings that span multiple lines don't have their squiggly lines drawn correctly --- indra/llui/lltextbase.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 2d7516a1cd..ce405cd4a4 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -678,9 +678,10 @@ void LLTextBase::drawText() continue; } + U32 misspell_start = llmax(misspell_it->first, seg_start), misspell_end = llmin(misspell_it->second, seg_end); S32 squiggle_start = 0, squiggle_end = 0, pony = 0; - cur_segment->getDimensions(seg_start - cur_segment->getStart(), misspell_it->first - seg_start, squiggle_start, pony); - cur_segment->getDimensions(misspell_it->first - cur_segment->getStart(), misspell_it->second - misspell_it->first, squiggle_end, pony); + cur_segment->getDimensions(seg_start - cur_segment->getStart(), misspell_start - seg_start, squiggle_start, pony); + cur_segment->getDimensions(misspell_start - cur_segment->getStart(), misspell_end - misspell_start, squiggle_end, pony); squiggle_start += text_rect.mLeft; pony = (squiggle_end + 3) / 6; -- cgit v1.2.3 From e615660823e680e824d2db0f1a59917597e64a13 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 9 Feb 2012 22:02:32 +0100 Subject: STORM-276 Differentiate between primary and secondary dictionaries --- indra/llui/llspellcheck.cpp | 6 ++---- indra/newview/llfloaterpreference.cpp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp index 46df44cdba..aa39e21a96 100644 --- a/indra/llui/llspellcheck.cpp +++ b/indra/llui/llspellcheck.cpp @@ -122,9 +122,7 @@ void LLSpellChecker::refreshDictionaryMap() tmp_app_path = (sdDict.has("name")) ? app_path + sdDict["name"].asString() : LLStringUtil::null; tmp_user_path = (sdDict.has("name")) ? user_path + sdDict["name"].asString() : LLStringUtil::null; sdDict["installed"] = - (!tmp_app_path.empty()) && - ( ((gDirUtilp->fileExists(tmp_user_path + ".aff")) && (gDirUtilp->fileExists(tmp_user_path + ".dic"))) || - ((gDirUtilp->fileExists(tmp_app_path + ".aff")) && (gDirUtilp->fileExists(tmp_app_path + ".dic"))) ); + (!tmp_app_path.empty()) && ((gDirUtilp->fileExists(tmp_user_path + ".dic")) || (gDirUtilp->fileExists(tmp_app_path + ".dic"))); sdDict["has_custom"] = (!tmp_user_path.empty()) && (gDirUtilp->fileExists(tmp_user_path + DICT_CUSTOM_SUFFIX + ".dic")); sdDict["has_ignore"] = (!tmp_user_path.empty()) && (gDirUtilp->fileExists(tmp_user_path + DICT_IGNORE_SUFFIX + ".dic")); } @@ -243,7 +241,7 @@ void LLSpellChecker::initHunspell(const std::string& dict_name) } const LLSD dict_entry = (!dict_name.empty()) ? getDictionaryData(dict_name) : LLSD(); - if ( (!dict_entry.isDefined()) || (!dict_entry["installed"].asBoolean()) ) + if ( (!dict_entry.isDefined()) || (!dict_entry["installed"].asBoolean()) || (!dict_entry["is_primary"].asBoolean())) { sSettingsChangeSignal(); return; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index c41488ce91..c444d2bb6f 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -997,7 +997,7 @@ void LLFloaterPreference::refreshDictLists(bool from_settings) for (LLSD::array_const_iterator dict_it = dict_map.beginArray(); dict_it != dict_map.endArray(); ++dict_it) { const LLSD& dict = *dict_it; - if ( (dict["installed"].asBoolean()) && (dict.has("language")) ) + if ( (dict["installed"].asBoolean()) && (dict["is_primary"].asBoolean()) && (dict.has("language")) ) dict_combo->add(dict["language"].asString()); } if (!dict_combo->selectByValue(dict_cur)) -- cgit v1.2.3 From 59bfc3f608bed806e03898b833a0fda9f95d42b9 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 25 Mar 2012 19:50:46 +0200 Subject: Minor fix for GCC --- indra/llui/lllineeditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 42cfc4cae9..0dc381231d 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -1948,8 +1948,8 @@ void LLLineEditor::draw() gGL.color4ub(255, 0, 0, 200); while (pxStart < pxEnd) { - gl_line_2d(pxStart, text_bottom - 2, pxStart + 3, text_bottom + 1); - gl_line_2d(pxStart + 3, text_bottom + 1, pxStart + 6, text_bottom - 2); + gl_line_2d(pxStart, (S32)text_bottom - 2, pxStart + 3, (S32)text_bottom + 1); + gl_line_2d(pxStart + 3, (S32)text_bottom + 1, pxStart + 6, (S32)text_bottom - 2); pxStart += 6; } } -- cgit v1.2.3 From 2587f6d9d8167bb29491ff681dcd133eb28aba67 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 29 Mar 2012 18:25:48 +0200 Subject: Minor fix for GCC --- indra/newview/llappviewer.cpp | 3 ++- indra/newview/llviewercontrol.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5a68cd531e..fac5416aab 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2502,7 +2502,8 @@ bool LLAppViewer::initConfiguration() if (gSavedSettings.getBOOL("SpellCheck")) { std::list dict_list; - boost::split(dict_list, gSavedSettings.getString("SpellCheckDictionary"), boost::is_any_of(std::string(","))); + std::string dict_setting = gSavedSettings.getString("SpellCheckDictionary"); + boost::split(dict_list, dict_setting, boost::is_any_of(std::string(","))); if (!dict_list.empty()) { LLSpellChecker::setUseSpellCheck(dict_list.front()); diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 7b6dbfaa0b..d7168a401c 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -507,7 +507,8 @@ bool handleSpellCheckChanged() if (gSavedSettings.getBOOL("SpellCheck")) { std::list dict_list; - boost::split(dict_list, gSavedSettings.getString("SpellCheckDictionary"), boost::is_any_of(std::string(","))); + std::string dict_setting = gSavedSettings.getString("SpellCheckDictionary"); + boost::split(dict_list, dict_setting, boost::is_any_of(std::string(","))); if (!dict_list.empty()) { LLSpellChecker::setUseSpellCheck(dict_list.front()); -- cgit v1.2.3 From e60dac5ce486f55fe69949a6a3a2949d4f868193 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 29 Mar 2012 21:07:09 +0200 Subject: STORM-276 Added dictionaries.xml and the Second Life glossary dictionary (enabled by default) --- .../app_settings/dictionaries/dictionaries.xml | 45 ++++ indra/newview/app_settings/dictionaries/sl.dic | 226 +++++++++++++++++++++ indra/newview/app_settings/settings.xml | 2 +- 3 files changed, 272 insertions(+), 1 deletion(-) create mode 100644 indra/newview/app_settings/dictionaries/dictionaries.xml create mode 100644 indra/newview/app_settings/dictionaries/sl.dic (limited to 'indra') diff --git a/indra/newview/app_settings/dictionaries/dictionaries.xml b/indra/newview/app_settings/dictionaries/dictionaries.xml new file mode 100644 index 0000000000..0ba959766b --- /dev/null +++ b/indra/newview/app_settings/dictionaries/dictionaries.xml @@ -0,0 +1,45 @@ + + + + + name + en_gb + is_primary + 1 + language + English (United Kingdom) + + + name + en_us + is_primary + 1 + language + English (United States) + + + name + es_es + is_primary + 1 + language + Español (España) + + + name + pt_br + is_primary + 1 + language + Português (Brasil) + + + name + sl + is_primary + 0 + language + Second Life Glossary + + + diff --git a/indra/newview/app_settings/dictionaries/sl.dic b/indra/newview/app_settings/dictionaries/sl.dic new file mode 100644 index 0000000000..06decad74b --- /dev/null +++ b/indra/newview/app_settings/dictionaries/sl.dic @@ -0,0 +1,226 @@ +225 +account +aditi +adult +agent +agni +alpha +alt +animation +AR +asset +attachment +autoreturn +avatar +avie +baked +ban +banlines +banlist +BDSM +beacon +bling +block +blog +blogger +bodyparts +bot +box +build +busy +cache +cage +camp +campie +Catznip +chim +classified +client +coalesced +collar +collision +combat +community +concierge +conference +continent +contribution +coordinate +copy +covenant +CS +damage +damage-enabled +death +deed +detach +displayname +Dolphin +drama +drop +estate +event +face +facelight +favorites +FIC +Firestorm +flexible +flexiprim +floater +fly +flycam +FMOD +follower +forums +freebie +freeze +friendship +fullperm +furry +gadget +general +gesture +goo +grid +gridnaut +griefer +griefing +ground +group +GSLR +GUI +Havok +hippo +hippotropolis +home +homestead +host +HUD +IM +impostors +Imprudence +indra +infohub +inspector +inventory +invisiprim +inworld +island +item +JIRA +JPEG2000 +Kakadu +KDU +kick +L$ +lag +land +landmark +LDPW +liaison +library +limits +linden +LindeX +link +linkset +live +lock +log +machinima +mainland +mainlanders +map +marketplace +mature +media +mega +megaprim +mentor +mesh +minimap +mini-map +moderate +modify +mono +morph +MOTD +mouselook +mouseview +move +mute +neko +newbie +non-physical +notecard +NPIOF +object +occlusion +off-world +officer +offline +ogg +online +ONSR +openspace +orbiter +orientation +parcel +particles +partner +permission +PG +phantom +Phoenix +physics +pick +poofer +position +premium +prim +primitar +primitive +profile +quaternion +Radegast +region +relog +resi +resident +return +rez +rezday +RLV +RLVa +roleplay +run +ruth +script +sculpted +sculptie +sculpty +shout +sim +simulator +Singularity +skin +SLEX +SLurl +snapshot +stipend +telehub +teleport +terraform +texture +tier +TOS +transfer +unlink +username +UUID +vendor +viewer +walk +whisper +windlight diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e15822ed1f..7dc06cda0e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12168,7 +12168,7 @@ Type String Value - English (United States) + English (United States),Second Life Glossary UseNewWalkRun -- cgit v1.2.3 From 5f32e6493ed4f8b9b480da857f487fa21f32bd64 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 30 Mar 2012 14:09:39 -0400 Subject: convert line endings on sl.dic for coding standards compliance --- indra/newview/app_settings/dictionaries/sl.dic | 452 ++++++++++++------------- 1 file changed, 226 insertions(+), 226 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/dictionaries/sl.dic b/indra/newview/app_settings/dictionaries/sl.dic index 06decad74b..57e9dd06cd 100644 --- a/indra/newview/app_settings/dictionaries/sl.dic +++ b/indra/newview/app_settings/dictionaries/sl.dic @@ -1,226 +1,226 @@ -225 -account -aditi -adult -agent -agni -alpha -alt -animation -AR -asset -attachment -autoreturn -avatar -avie -baked -ban -banlines -banlist -BDSM -beacon -bling -block -blog -blogger -bodyparts -bot -box -build -busy -cache -cage -camp -campie -Catznip -chim -classified -client -coalesced -collar -collision -combat -community -concierge -conference -continent -contribution -coordinate -copy -covenant -CS -damage -damage-enabled -death -deed -detach -displayname -Dolphin -drama -drop -estate -event -face -facelight -favorites -FIC -Firestorm -flexible -flexiprim -floater -fly -flycam -FMOD -follower -forums -freebie -freeze -friendship -fullperm -furry -gadget -general -gesture -goo -grid -gridnaut -griefer -griefing -ground -group -GSLR -GUI -Havok -hippo -hippotropolis -home -homestead -host -HUD -IM -impostors -Imprudence -indra -infohub -inspector -inventory -invisiprim -inworld -island -item -JIRA -JPEG2000 -Kakadu -KDU -kick -L$ -lag -land -landmark -LDPW -liaison -library -limits -linden -LindeX -link -linkset -live -lock -log -machinima -mainland -mainlanders -map -marketplace -mature -media -mega -megaprim -mentor -mesh -minimap -mini-map -moderate -modify -mono -morph -MOTD -mouselook -mouseview -move -mute -neko -newbie -non-physical -notecard -NPIOF -object -occlusion -off-world -officer -offline -ogg -online -ONSR -openspace -orbiter -orientation -parcel -particles -partner -permission -PG -phantom -Phoenix -physics -pick -poofer -position -premium -prim -primitar -primitive -profile -quaternion -Radegast -region -relog -resi -resident -return -rez -rezday -RLV -RLVa -roleplay -run -ruth -script -sculpted -sculptie -sculpty -shout -sim -simulator -Singularity -skin -SLEX -SLurl -snapshot -stipend -telehub -teleport -terraform -texture -tier -TOS -transfer -unlink -username -UUID -vendor -viewer -walk -whisper -windlight +225 +account +aditi +adult +agent +agni +alpha +alt +animation +AR +asset +attachment +autoreturn +avatar +avie +baked +ban +banlines +banlist +BDSM +beacon +bling +block +blog +blogger +bodyparts +bot +box +build +busy +cache +cage +camp +campie +Catznip +chim +classified +client +coalesced +collar +collision +combat +community +concierge +conference +continent +contribution +coordinate +copy +covenant +CS +damage +damage-enabled +death +deed +detach +displayname +Dolphin +drama +drop +estate +event +face +facelight +favorites +FIC +Firestorm +flexible +flexiprim +floater +fly +flycam +FMOD +follower +forums +freebie +freeze +friendship +fullperm +furry +gadget +general +gesture +goo +grid +gridnaut +griefer +griefing +ground +group +GSLR +GUI +Havok +hippo +hippotropolis +home +homestead +host +HUD +IM +impostors +Imprudence +indra +infohub +inspector +inventory +invisiprim +inworld +island +item +JIRA +JPEG2000 +Kakadu +KDU +kick +L$ +lag +land +landmark +LDPW +liaison +library +limits +linden +LindeX +link +linkset +live +lock +log +machinima +mainland +mainlanders +map +marketplace +mature +media +mega +megaprim +mentor +mesh +minimap +mini-map +moderate +modify +mono +morph +MOTD +mouselook +mouseview +move +mute +neko +newbie +non-physical +notecard +NPIOF +object +occlusion +off-world +officer +offline +ogg +online +ONSR +openspace +orbiter +orientation +parcel +particles +partner +permission +PG +phantom +Phoenix +physics +pick +poofer +position +premium +prim +primitar +primitive +profile +quaternion +Radegast +region +relog +resi +resident +return +rez +rezday +RLV +RLVa +roleplay +run +ruth +script +sculpted +sculptie +sculpty +shout +sim +simulator +Singularity +skin +SLEX +SLurl +snapshot +stipend +telehub +teleport +terraform +texture +tier +TOS +transfer +unlink +username +UUID +vendor +viewer +walk +whisper +windlight -- cgit v1.2.3 From 3af3d5e83c81ecfa77735e6811470d1aa0f705da Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 30 Mar 2012 15:07:46 -0400 Subject: move all dictionaries to the prebuilt package, and install from there --- .../app_settings/dictionaries/dictionaries.xml | 45 ---- indra/newview/app_settings/dictionaries/sl.dic | 226 --------------------- indra/newview/viewer_manifest.py | 2 +- 3 files changed, 1 insertion(+), 272 deletions(-) delete mode 100644 indra/newview/app_settings/dictionaries/dictionaries.xml delete mode 100644 indra/newview/app_settings/dictionaries/sl.dic (limited to 'indra') diff --git a/indra/newview/app_settings/dictionaries/dictionaries.xml b/indra/newview/app_settings/dictionaries/dictionaries.xml deleted file mode 100644 index 0ba959766b..0000000000 --- a/indra/newview/app_settings/dictionaries/dictionaries.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - name - en_gb - is_primary - 1 - language - English (United Kingdom) - - - name - en_us - is_primary - 1 - language - English (United States) - - - name - es_es - is_primary - 1 - language - Español (España) - - - name - pt_br - is_primary - 1 - language - Português (Brasil) - - - name - sl - is_primary - 0 - language - Second Life Glossary - - - diff --git a/indra/newview/app_settings/dictionaries/sl.dic b/indra/newview/app_settings/dictionaries/sl.dic deleted file mode 100644 index 57e9dd06cd..0000000000 --- a/indra/newview/app_settings/dictionaries/sl.dic +++ /dev/null @@ -1,226 +0,0 @@ -225 -account -aditi -adult -agent -agni -alpha -alt -animation -AR -asset -attachment -autoreturn -avatar -avie -baked -ban -banlines -banlist -BDSM -beacon -bling -block -blog -blogger -bodyparts -bot -box -build -busy -cache -cage -camp -campie -Catznip -chim -classified -client -coalesced -collar -collision -combat -community -concierge -conference -continent -contribution -coordinate -copy -covenant -CS -damage -damage-enabled -death -deed -detach -displayname -Dolphin -drama -drop -estate -event -face -facelight -favorites -FIC -Firestorm -flexible -flexiprim -floater -fly -flycam -FMOD -follower -forums -freebie -freeze -friendship -fullperm -furry -gadget -general -gesture -goo -grid -gridnaut -griefer -griefing -ground -group -GSLR -GUI -Havok -hippo -hippotropolis -home -homestead -host -HUD -IM -impostors -Imprudence -indra -infohub -inspector -inventory -invisiprim -inworld -island -item -JIRA -JPEG2000 -Kakadu -KDU -kick -L$ -lag -land -landmark -LDPW -liaison -library -limits -linden -LindeX -link -linkset -live -lock -log -machinima -mainland -mainlanders -map -marketplace -mature -media -mega -megaprim -mentor -mesh -minimap -mini-map -moderate -modify -mono -morph -MOTD -mouselook -mouseview -move -mute -neko -newbie -non-physical -notecard -NPIOF -object -occlusion -off-world -officer -offline -ogg -online -ONSR -openspace -orbiter -orientation -parcel -particles -partner -permission -PG -phantom -Phoenix -physics -pick -poofer -position -premium -prim -primitar -primitive -profile -quaternion -Radegast -region -relog -resi -resident -return -rez -rezday -RLV -RLVa -roleplay -run -ruth -script -sculpted -sculptie -sculpty -shout -sim -simulator -Singularity -skin -SLEX -SLurl -snapshot -stipend -telehub -teleport -terraform -texture -tier -TOS -transfer -unlink -username -UUID -vendor -viewer -walk -whisper -windlight diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 1b732676e4..a59b763910 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -92,7 +92,7 @@ class ViewerManifest(LLManifest): # ... and the entire windlight directory self.path("windlight") # ... and the pre-installed spell checking dictionaries - self.path("dictionaries") + self.path("../../packages/dictionaries", dst="dictionaries") self.end_prefix("app_settings") if self.prefix(src="character"): -- cgit v1.2.3 From 63196a9c08c94ced5bb9ff5b9e623564d956bcd8 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 10 Apr 2012 15:57:39 -0400 Subject: add hunspell libs --- indra/llui/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 1377336bb4..2208a2f327 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -25,6 +25,7 @@ include_directories( ${LLVFS_INCLUDE_DIRS} ${LLXML_INCLUDE_DIRS} ${LLXUIXML_INCLUDE_DIRS} + ${LIBS_PREBUILD_DIR}/include/hunspell ) set(llui_SOURCE_FILES @@ -252,6 +253,7 @@ add_library (llui ${llui_SOURCE_FILES}) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level target_link_libraries(llui + ${HUNSPELL_LIBRARY} ${LLMESSAGE_LIBRARIES} ${LLRENDER_LIBRARIES} ${LLWINDOW_LIBRARIES} -- cgit v1.2.3 From 51ceacbb45802209c36c555c03eeeb2f5fd1d3b4 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 11 Apr 2012 12:14:35 -0400 Subject: fix ordering problem in libraries? --- indra/llui/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 2208a2f327..d0fd37a5b4 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -253,7 +253,6 @@ add_library (llui ${llui_SOURCE_FILES}) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level target_link_libraries(llui - ${HUNSPELL_LIBRARY} ${LLMESSAGE_LIBRARIES} ${LLRENDER_LIBRARIES} ${LLWINDOW_LIBRARIES} @@ -263,6 +262,7 @@ target_link_libraries(llui ${LLXUIXML_LIBRARIES} ${LLXML_LIBRARIES} ${LLMATH_LIBRARIES} + ${HUNSPELL_LIBRARY} ${LLCOMMON_LIBRARIES} # must be after llimage, llwindow, llrender ) -- cgit v1.2.3 From cf370a8dcde5ae77c27aa4fdd105d399c60c3d53 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 11 Apr 2012 13:31:06 -0400 Subject: add hunspell libraries in unit test build --- indra/integration_tests/llui_libtest/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt index 1180460f4b..ba6b318cb8 100644 --- a/indra/integration_tests/llui_libtest/CMakeLists.txt +++ b/indra/integration_tests/llui_libtest/CMakeLists.txt @@ -33,6 +33,7 @@ include_directories( ${LLWINDOW_INCLUDE_DIRS} ${LLXML_INCLUDE_DIRS} ${LLXUIXML_INCLUDE_DIRS} + ${LIBS_PREBUILD_DIR}/include/hunspell ) set(llui_libtest_SOURCE_FILES @@ -80,6 +81,7 @@ target_link_libraries(llui_libtest ${LLIMAGEJ2COJ_LIBRARIES} ${OS_LIBRARIES} ${GOOGLE_PERFTOOLS_LIBRARIES} + ${HUNSPELL_LIBRARY} ) if (WINDOWS) -- cgit v1.2.3 From 6d050cad618493b7881ea6d0073e64ba732b6352 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 10 Feb 2012 16:25:55 +0100 Subject: - fixed : Hunspell linking issues --- indra/cmake/CMakeLists.txt | 1 + indra/cmake/FindHUNSPELL.cmake | 38 ++++++++++++++++++++++++++++++++++++++ indra/cmake/Hunspell.cmake | 21 +++++++++++++++++++++ indra/newview/CMakeLists.txt | 1 + 4 files changed, 61 insertions(+) create mode 100644 indra/cmake/FindHUNSPELL.cmake create mode 100644 indra/cmake/Hunspell.cmake (limited to 'indra') diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 279d577a27..9b836aac5f 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -37,6 +37,7 @@ set(cmake_SOURCE_FILES GLOD.cmake GStreamer010Plugin.cmake GooglePerfTools.cmake + Hunspell.cmake JPEG.cmake LLAddBuildTest.cmake LLAudio.cmake diff --git a/indra/cmake/FindHUNSPELL.cmake b/indra/cmake/FindHUNSPELL.cmake new file mode 100644 index 0000000000..d411bdb9e5 --- /dev/null +++ b/indra/cmake/FindHUNSPELL.cmake @@ -0,0 +1,38 @@ +# -*- cmake -*- + +# - Find HUNSPELL +# This module defines +# HUNSPELL_INCLUDE_DIR, where to find libhunspell.h, etc. +# HUNSPELL_LIBRARY, the library needed to use HUNSPELL. +# HUNSPELL_FOUND, If false, do not try to use HUNSPELL. + +find_path(HUNSPELL_INCLUDE_DIR hunspell.h + PATH_SUFFIXES hunspell + ) + +set(HUNSPELL_NAMES ${HUNSPELL_NAMES} libhunspell-1.3 libhunspell) +find_library(HUNSPELL_LIBRARY + NAMES ${HUNSPELL_NAMES} + ) + +if (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR) + set(HUNSPELL_FOUND "YES") +else (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR) + set(HUNSPELL_FOUND "NO") +endif (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR) + + +if (HUNSPELL_FOUND) + if (NOT HUNSPELL_FIND_QUIETLY) + message(STATUS "Found Hunspell: Library in '${HUNSPELL_LIBRARY}' and header in '${HUNSPELL_INCLUDE_DIR}' ") + endif (NOT HUNSPELL_FIND_QUIETLY) +else (HUNSPELL_FOUND) + if (HUNSPELL_FIND_REQUIRED) + message(FATAL_ERROR " * * *\nCould not find HUNSPELL library! * * *") + endif (HUNSPELL_FIND_REQUIRED) +endif (HUNSPELL_FOUND) + +mark_as_advanced( + HUNSPELL_LIBRARY + HUNSPELL_INCLUDE_DIR + ) diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake new file mode 100644 index 0000000000..def2198c93 --- /dev/null +++ b/indra/cmake/Hunspell.cmake @@ -0,0 +1,21 @@ +# -*- cmake -*- +include(Prebuilt) + +set(HUNSPELL_FIND_QUIETLY ON) +set(HUNSPELL_FIND_REQUIRED ON) + +if (STANDALONE) + include(FindHUNSPELL) +else (STANDALONE) + use_prebuilt_binary(libhunspell) + if (WINDOWS) + set(HUNSPELL_LIBRARY libhunspell) + set(HUNSPELL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/hunspell) + elseif(DARWIN) + set(HUNSPELL_LIBRARY hunspell-1.3) + set(HUNSPELL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/hunspell) + else() + set(HUNSPELL_LIBRARY hunspell-1.3) + set(HUNSPELL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/hunspell) + endif() +endif (STANDALONE) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0ec3e0e08a..fed9ea6790 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -13,6 +13,7 @@ include(EXPAT) include(FMOD) include(OPENAL) include(FindOpenGL) +include(Hunspell) include(JsonCpp) include(LLAudio) include(LLCharacter) -- cgit v1.2.3 From 22f26725b902cb2e942048d059710169666e4a45 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 10 Feb 2012 17:40:58 -0500 Subject: STORM-1738 Autocorrect working for nearby chat and IM input boxes warn-on-failure:open-license --- indra/llui/lllineeditor.cpp | 3 +-- indra/llui/lllineeditor.h | 3 +-- indra/newview/llautocorrect.cpp | 2 +- indra/newview/llimfloater.cpp | 5 +++-- indra/newview/llnearbychatbar.cpp | 3 +-- 5 files changed, 7 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index de951d3b56..4d0b972bf1 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -866,11 +866,10 @@ void LLLineEditor::addChar(const llwchar uni_char) LLUI::reportBadKeystroke(); } -// *TODO implement callback routine if (!mReadOnly && mAutocorrectCallback != NULL) { // call callback - // mAutotocorrectCallback(mText&, mCursorPos&); + mAutocorrectCallback(mText, mCursorPos); } getWindow()->hideCursorUntilMouseMove(); diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 9394700e8c..53af9ac996 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -169,8 +169,7 @@ public: virtual BOOL setTextArg( const std::string& key, const LLStringExplicit& text ); virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); - // *TODO Make this work - typedef boost::function autocorrect_callback_t; + typedef boost::function autocorrect_callback_t; autocorrect_callback_t mAutocorrectCallback; void setAutocorrectCallback(autocorrect_callback_t cb) { mAutocorrectCallback = cb; } void setLabel(const LLStringExplicit &new_label) { mLabel = new_label; } diff --git a/indra/newview/llautocorrect.cpp b/indra/newview/llautocorrect.cpp index 9162b35f45..791d34df0c 100644 --- a/indra/newview/llautocorrect.cpp +++ b/indra/newview/llautocorrect.cpp @@ -349,7 +349,7 @@ std::string AutoCorrect::replaceWords(std::string words) { static LLCachedControl perform_autocorrect(gSavedSettings, "AutoCorrect"); if(!(perform_autocorrect))return words; - //TODO update this function to use the "wordStyle" thing, + //*TODO update this function to use the "wordStyle" thing, //but so far this function is never used, so later boost_tokenizer tokens(words, boost::char_separator(" ")); diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 8354243bd3..e300f6f32d 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -56,7 +56,7 @@ #include "llrootview.h" #include "llspeakers.h" #include "llviewerchat.h" - +#include "llautocorrect.h" LLIMFloater::LLIMFloater(const LLUUID& session_id) : LLTransientDockableFloater(NULL, true, session_id), @@ -251,11 +251,12 @@ BOOL LLIMFloater::postBuild() slide_right->setVisible(!mControlPanel->getParent()->getVisible()); slide_right->setClickedCallback(boost::bind(&LLIMFloater::onSlide, this)); - // *TODO Establish LineEditor with autocorrect callback mInputEditor = getChild("chat_editor"); mInputEditor->setMaxTextLength(1023); // enable line history support for instant message bar mInputEditor->setEnableLineHistory(TRUE); + // *TODO Establish LineEditor with autocorrect callback + mInputEditor->setAutocorrectCallback(boost::bind(&AutoCorrect::autocorrectCallback, AutoCorrect::getInstance(), _1, _2)); LLFontGL* font = LLViewerChat::getChatFont(); mInputEditor->setFont(font); diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 86244cbaa6..72fb95aca5 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -88,8 +88,7 @@ BOOL LLNearbyChatBar::postBuild() { mChatBox = getChild("chat_box"); - // *TODO Establish LineEditor with autocorrect callback -// mChatBox->setAutocorrectCallback(boost::bind(&AutoCorrect::autocorrectCallback, _1, _2)); + mChatBox->setAutocorrectCallback(boost::bind(&AutoCorrect::autocorrectCallback, AutoCorrect::getInstance(), _1, _2)); mChatBox->setCommitCallback(boost::bind(&LLNearbyChatBar::onChatBoxCommit, this)); mChatBox->setKeystrokeCallback(&onChatBoxKeystroke, this); mChatBox->setFocusLostCallback(boost::bind(&onChatBoxFocusLost, _1, this)); -- cgit v1.2.3 From e1fa05d8be51febec618d5ba124dbbab350ab747 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 11 Feb 2012 15:31:31 -0500 Subject: STORM-1738 Enable floater --- indra/newview/llviewerfloaterreg.cpp | 2 +- indra/newview/llviewermenu.cpp | 9 + .../skins/default/xui/en/floater_autocorrect.xml | 381 +++++++++++++++++---- indra/newview/skins/default/xui/en/menu_viewer.xml | 5 + 4 files changed, 323 insertions(+), 74 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index fc71160b2d..116076d789 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -170,7 +170,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("autocorrect", "floater_autocorrect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("settings_autocorrect", "floater_autocorrect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar", "floater_avatar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 67f6150dbe..b6a20becb2 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1973,6 +1973,14 @@ class LLAdvancedCompressImage : public view_listener_t }; +class LLAdvancedShowAutocorrectSettings : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLFloaterReg::showInstance("settings_autocorrect", userdata); + return true; + } +}; ///////////////////////// // SHOW DEBUG SETTINGS // @@ -8235,6 +8243,7 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedToggleShowObjectUpdates(), "Advanced.ToggleShowObjectUpdates"); view_listener_t::addMenu(new LLAdvancedCheckShowObjectUpdates(), "Advanced.CheckShowObjectUpdates"); view_listener_t::addMenu(new LLAdvancedCompressImage(), "Advanced.CompressImage"); + view_listener_t::addMenu(new LLAdvancedShowAutocorrectSettings(), "Advanced.ShowAutocorrectSettings"); view_listener_t::addMenu(new LLAdvancedShowDebugSettings(), "Advanced.ShowDebugSettings"); view_listener_t::addMenu(new LLAdvancedEnableViewAdminOptions(), "Advanced.EnableViewAdminOptions"); view_listener_t::addMenu(new LLAdvancedToggleViewAdminOptions(), "Advanced.ToggleViewAdminOptions"); diff --git a/indra/newview/skins/default/xui/en/floater_autocorrect.xml b/indra/newview/skins/default/xui/en/floater_autocorrect.xml index b67b2e7ec0..05683c9907 100644 --- a/indra/newview/skins/default/xui/en/floater_autocorrect.xml +++ b/indra/newview/skins/default/xui/en/floater_autocorrect.xml @@ -1,79 +1,314 @@ - - - -- cgit v1.2.3 From 6d9c0fab8f2c19fa624e3c1f697ee9c7f08d9245 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 11 May 2012 14:31:45 -0400 Subject: remove author tracking, non-wordstyle option, and notifications --- .../newview/app_settings/settings_autoreplace.xml | 18 ------ indra/newview/llautoreplace.cpp | 71 ---------------------- indra/newview/llautoreplace.h | 2 - indra/newview/llautoreplacefloater.cpp | 5 -- .../skins/default/xui/en/floater_autoreplace.xml | 63 +------------------ .../newview/skins/default/xui/en/notifications.xml | 7 --- 6 files changed, 1 insertion(+), 165 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings_autoreplace.xml b/indra/newview/app_settings/settings_autoreplace.xml index 4669ba5822..790cd62a02 100644 --- a/indra/newview/app_settings/settings_autoreplace.xml +++ b/indra/newview/app_settings/settings_autoreplace.xml @@ -2,25 +2,15 @@ Custom - announce - 0 - author - You data enabled 1 priority 10 - wordStyle - 1 Abbreviations - announce - 0 - author - Wulf / TankMaster data afaic @@ -90,15 +80,9 @@ 1 priority 4 - wordStyle - 1 Spelling Corrections - announce - 0 - author - LordGregGreg / Wikipedia data Amercia @@ -8362,8 +8346,6 @@ 1 priority 5 - wordStyle - 1 diff --git a/indra/newview/llautoreplace.cpp b/indra/newview/llautoreplace.cpp index a5683e4190..fa46f53e96 100644 --- a/indra/newview/llautoreplace.cpp +++ b/indra/newview/llautoreplace.cpp @@ -137,8 +137,6 @@ LLSD AutoReplace::exportList(std::string listName) { toReturn["listName"]=listName; toReturn["data"]=mAutoReplaces[listName]["data"]; - toReturn["author"]=mAutoReplaces[listName]["author"]; - toReturn["wordStyle"]=mAutoReplaces[listName]["wordStyle"]; toReturn["priority"]=mAutoReplaces[listName]["priority"]; } return toReturn; @@ -152,9 +150,6 @@ BOOL AutoReplace::addReplacementList(LLSD newList) LLSD newPart; newPart["data"]=newList["data"]; newPart["enabled"]=TRUE; - newPart["announce"]=FALSE; - newPart["author"]=newList["author"]; - newPart["wordStyle"]=newList["wordStyle"]; newPart["priority"]=newList["priority"].asInteger(); llinfos << "adding new list with settings priority "< " << replacement.c_str() << llendl; return replacement; } @@ -353,8 +297,6 @@ std::string AutoReplace::replaceWords(std::string words) { static LLCachedControl perform_autoreplace(gSavedSettings, "AutoReplace"); if(!(perform_autoreplace))return words; - //*TODO update this function to use the "wordStyle" thing, - //but so far this function is never used, so later boost_tokenizer tokens(words, boost::char_separator(" ")); for (boost_tokenizer::iterator token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) @@ -369,16 +311,6 @@ std::string AutoReplace::replaceWords(std::string words) if((loc_map["data"].has(currentWord))&&(loc_map["enabled"].asBoolean())) { std::string replacement = loc_map["data"][currentWord]; - if(loc_map["announce"].asBoolean()) - { - LLSD args; - //"[Before]" has been auto replaced by "[Replacement]" - // based on your [ListName] list. - args["BEFORE"] = currentWord; - args["LISTNAME"]=location; - args["REPLACEMENT"]=replacement; - LLNotificationsUtil::add("AutoReplace",args); - } lldebugs << "found a word in list " << location.c_str() << " and it will replace " << currentWord.c_str() << " => " << replacement.c_str() << llendl; int wordStart = words.find(currentWord); words.replace(wordStart,currentWord.length(),replacement); @@ -399,12 +331,9 @@ BOOL AutoReplace::addEntryToList(std::string wrong, std::string right, std::stri } else if(listName == "Custom") { - mAutoReplaces[listName]["announce"] = 0; - mAutoReplaces[listName]["author"] = "You"; mAutoReplaces[listName]["data"][wrong] = right; mAutoReplaces[listName]["enabled"] = 1; mAutoReplaces[listName]["priority"] = 10; - mAutoReplaces[listName]["wordStyle"] = 1; return TRUE; } diff --git a/indra/newview/llautoreplace.h b/indra/newview/llautoreplace.h index b11c124a62..6c531d0040 100644 --- a/indra/newview/llautoreplace.h +++ b/indra/newview/llautoreplace.h @@ -33,9 +33,7 @@ public: BOOL addReplacementList(LLSD newList); BOOL removeReplacementList(std::string listName); BOOL setListEnabled(std::string listName, BOOL enabled); - BOOL setListAnnounceeState(std::string listName, BOOL announce); BOOL setListPriority(std::string listName, int priority); - BOOL setListStyle(std::string listName, BOOL announce); std::string replaceWords(std::string words); std::string replaceWord(std::string currentWord); BOOL addEntryToList(std::string wrong, std::string right, std::string listName); diff --git a/indra/newview/llautoreplacefloater.cpp b/indra/newview/llautoreplacefloater.cpp index 01950adb37..ab299aeffe 100644 --- a/indra/newview/llautoreplacefloater.cpp +++ b/indra/newview/llautoreplacefloater.cpp @@ -131,10 +131,7 @@ void AutoReplaceFloater::updateItemsList() LLSD listData = AutoReplace::getInstance()->getAutoReplaceEntries(listName); childSetValue("ac_list_enabled",listData["enabled"].asBoolean()); - childSetValue("ac_list_style",listData["wordStyle"].asBoolean()); - childSetValue("ac_list_show",listData["announce"].asBoolean()); childSetValue("ac_text_name",listName); - childSetValue("ac_text_author",listData["author"]); childSetValue("ac_priority",listData["priority"]); LLSD autoReplaces = listData["data"]; @@ -201,7 +198,6 @@ void AutoReplaceFloater::updateListControlsEnabled(BOOL selected) childSetEnabled("ac_text1",selected); childSetEnabled("ac_text2",selected); childSetEnabled("ac_text_name",selected); - childSetEnabled("ac_text_author",selected); childSetEnabled("ac_list_enabled",selected); childSetEnabled("ac_list_show",selected); childSetEnabled("ac_list_style",selected); @@ -256,7 +252,6 @@ void AutoReplaceFloater::onEntrySettingChange(LLUICtrl* caller, void* user_data) { std::string listName= self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); AutoReplace::getInstance()->setListEnabled(listName,self->childGetValue("ac_list_enabled").asBoolean()); - AutoReplace::getInstance()->setListAnnounceeState(listName,self->childGetValue("ac_list_show").asBoolean()); AutoReplace::getInstance()->setListStyle(listName,self->childGetValue("ac_list_style").asBoolean()); AutoReplace::getInstance()->setListPriority(listName,self->childGetValue("ac_priority").asInteger()); diff --git a/indra/newview/skins/default/xui/en/floater_autoreplace.xml b/indra/newview/skins/default/xui/en/floater_autoreplace.xml index 5f53e61fa2..f68aeacb97 100644 --- a/indra/newview/skins/default/xui/en/floater_autoreplace.xml +++ b/indra/newview/skins/default/xui/en/floater_autoreplace.xml @@ -126,39 +126,6 @@ name="ac_text_name"> List Name - - Author: - - - - Author Name - - - -- cgit v1.2.3 From f509b492226a570bfc8bab0bd50b2e041679ff9f Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 11 May 2012 15:31:35 -0400 Subject: missed one setListStyle --- indra/newview/llautoreplacefloater.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llautoreplacefloater.cpp b/indra/newview/llautoreplacefloater.cpp index ab299aeffe..c2d7be269b 100644 --- a/indra/newview/llautoreplacefloater.cpp +++ b/indra/newview/llautoreplacefloater.cpp @@ -252,7 +252,6 @@ void AutoReplaceFloater::onEntrySettingChange(LLUICtrl* caller, void* user_data) { std::string listName= self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); AutoReplace::getInstance()->setListEnabled(listName,self->childGetValue("ac_list_enabled").asBoolean()); - AutoReplace::getInstance()->setListStyle(listName,self->childGetValue("ac_list_style").asBoolean()); AutoReplace::getInstance()->setListPriority(listName,self->childGetValue("ac_priority").asInteger()); //sInstance->updateEnabledStuff(); -- cgit v1.2.3 From ce17ae8a182cf8b1acd88bbbb3dceb7ff39fd0ff Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Sat, 12 May 2012 07:29:25 -0400 Subject: STORM-1738: get autoreplace preferences working, clean up some coding and naming conventions --- indra/newview/CMakeLists.txt | 4 +- indra/newview/llautoreplacefloater.cpp | 377 --------------------- indra/newview/llautoreplacefloater.h | 75 ---- indra/newview/llfloaterautoreplacesettings.cpp | 367 ++++++++++++++++++++ indra/newview/llfloaterautoreplacesettings.h | 70 ++++ indra/newview/llfloaterpreference.cpp | 12 +- indra/newview/llfloaterpreference.h | 1 + indra/newview/llviewerfloaterreg.cpp | 4 +- .../skins/default/xui/en/floater_autoreplace.xml | 4 +- .../default/xui/en/panel_preferences_chat.xml | 2 +- 10 files changed, 455 insertions(+), 461 deletions(-) delete mode 100644 indra/newview/llautoreplacefloater.cpp delete mode 100644 indra/newview/llautoreplacefloater.h create mode 100644 indra/newview/llfloaterautoreplacesettings.cpp create mode 100644 indra/newview/llfloaterautoreplacesettings.h (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 90468ccbef..a45467324b 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -99,7 +99,6 @@ set(viewer_SOURCE_FILES llattachmentsmgr.cpp llaudiosourcevo.cpp llautoreplace.cpp - llautoreplacefloater.cpp llavataractions.cpp llavatariconctrl.cpp llavatarlist.cpp @@ -171,6 +170,7 @@ set(viewer_SOURCE_FILES llfloaterabout.cpp llfloaterbvhpreview.cpp llfloaterauction.cpp + llfloaterautoreplacesettings.cpp llfloateravatar.cpp llfloateravatarpicker.cpp llfloateravatartextures.cpp @@ -657,7 +657,6 @@ set(viewer_HEADER_FILES llattachmentsmgr.h llaudiosourcevo.h llautoreplace.h - llautoreplacefloater.h llavataractions.h llavatariconctrl.h llavatarlist.h @@ -729,6 +728,7 @@ set(viewer_HEADER_FILES llfloaterabout.h llfloaterbvhpreview.h llfloaterauction.h + llfloaterautoreplacesettings.h llfloateravatar.h llfloateravatarpicker.h llfloateravatartextures.h diff --git a/indra/newview/llautoreplacefloater.cpp b/indra/newview/llautoreplacefloater.cpp deleted file mode 100644 index c2d7be269b..0000000000 --- a/indra/newview/llautoreplacefloater.cpp +++ /dev/null @@ -1,377 +0,0 @@ -/** - * @file llautoreplacefloater.cpp - * @brief Auto Replace List floater - * - * $LicenseInfo:firstyear=2012&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2012, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include "llautoreplacefloater.h" - -#include "llagentdata.h" -#include "llcommandhandler.h" -#include "llfloater.h" -#include "lluictrlfactory.h" -#include "llagent.h" -#include "llpanel.h" -#include "llbutton.h" -#include "llcolorswatch.h" -#include "llcombobox.h" -#include "llview.h" -#include "llhttpclient.h" -#include "llbufferstream.h" -#include "llcheckboxctrl.h" -#include "llviewercontrol.h" - -#include "llui.h" -#include "llcontrol.h" -#include "llscrollingpanellist.h" -#include "llautoreplace.h" -#include "llfilepicker.h" -#include "llfile.h" -#include "llsdserialize.h" -//#include "llfloaterchat.h" -#include "llchat.h" -#include "llinventorymodel.h" -#include "llhost.h" -#include "llassetstorage.h" -#include "roles_constants.h" -#include "llviewertexteditor.h" -#include - -#include -#include "llfloaterreg.h" -#include "llinspecttoast.h" -#include "llnotificationhandler.h" -#include "llnotificationmanager.h" - - -AutoReplaceFloater::AutoReplaceFloater(const LLSD& key) : -LLFloater(key) -{ -} -void AutoReplaceFloater::onClose(bool app_quitting) -{ - destroy(); -} - -BOOL AutoReplaceFloater::postBuild(void) -{ - - namesList = getChild("ac_list_name"); - entryList = getChild("ac_list_entry"); - mOldText = getChild("ac_old_text"); - mNewText = getChild("ac_new_text"); - - childSetCommitCallback("ac_enable",onBoxCommitEnabled,this); - - childSetCommitCallback("ac_list_enabled",onEntrySettingChange,this); - childSetCommitCallback("ac_list_show",onEntrySettingChange,this); - childSetCommitCallback("ac_list_style",onEntrySettingChange,this); - childSetCommitCallback("ac_priority",onEntrySettingChange,this); - - - - updateEnabledStuff(); - updateNamesList(); - - - namesList->setCommitOnSelectionChange(TRUE); - childSetCommitCallback("ac_list_name", onSelectName, this); - - childSetAction("ac_deletelist",removeList,this); - childSetAction("ac_rementry",deleteEntry,this); - childSetAction("ac_exportlist",exportList,this); - childSetAction("ac_addentry",addEntry,this); - childSetAction("ac_loadlist",loadList,this); - - return true; -} - -void AutoReplaceFloater::onSelectName(LLUICtrl* ctrl, void* user_data) -{ - if ( user_data ) - { - AutoReplaceFloater* self = ( AutoReplaceFloater* )user_data; - if ( self ) - self->updateItemsList(); - } - -} -void AutoReplaceFloater::updateItemsList() -{ - entryList->deleteAllItems(); - if((namesList->getAllSelected().size())<=0) - { - - updateListControlsEnabled(FALSE); - return; - } - - updateListControlsEnabled(TRUE); - std::string listName= namesList->getFirstSelected()->getColumn(0)->getValue().asString(); - - LLSD listData = AutoReplace::getInstance()->getAutoReplaceEntries(listName); - childSetValue("ac_list_enabled",listData["enabled"].asBoolean()); - childSetValue("ac_text_name",listName); - childSetValue("ac_priority",listData["priority"]); - - LLSD autoReplaces = listData["data"]; - LLSD::map_const_iterator loc_it = autoReplaces.beginMap(); - LLSD::map_const_iterator loc_end = autoReplaces.endMap(); - for ( ; loc_it != loc_end; ++loc_it) - { - const std::string& wrong = (*loc_it).first; - const std::string& right = (*loc_it).second; - - //std::string lentry(wrong+"=>"+right); - - LLSD element; - element["id"] = wrong; - LLSD& s_column = element["columns"][0]; - s_column["column"] = "Search"; - s_column["value"] = wrong; - s_column["font"] = "SANSSERIF"; - LLSD& r_column = element["columns"][1]; - r_column["column"] = "Replace"; - r_column["value"] = right; - r_column["font"] = "SANSSERIF"; - - entryList->addElement(element, ADD_BOTTOM); - } - -} -void AutoReplaceFloater::updateNamesList() -{ - namesList->deleteAllItems(); - if(!gSavedSettings.getBOOL("AutoReplace")) - { - updateItemsList(); - return; - } - LLSD autoReplaces = AutoReplace::getInstance()->getAutoReplaces(); - LLSD::map_const_iterator loc_it = autoReplaces.beginMap(); - LLSD::map_const_iterator loc_end = autoReplaces.endMap(); - for ( ; loc_it != loc_end; ++loc_it) - { - const std::string& listName = (*loc_it).first; - - LLSD element; - element["id"] = listName; - LLSD& friend_column = element["columns"][0]; - friend_column["column"] = "Entries"; - friend_column["value"] = listName; - //friend_column["font"] = "SANSSERIF"; - const LLSD& loc_map = (*loc_it).second; - if(loc_map["enabled"].asBoolean()) - friend_column["font"] = "SANSSERIF"; - //friend_column["style"] = "BOLD"; - else - friend_column["font"] = "SANSSERIF_SMALL"; - //friend_column["style"] = "NORMAL"; - if(namesList) - namesList->addElement(element, ADD_BOTTOM); - } - updateItemsList(); -} -void AutoReplaceFloater::updateListControlsEnabled(BOOL selected) -{ - - childSetEnabled("ac_text1",selected); - childSetEnabled("ac_text2",selected); - childSetEnabled("ac_text_name",selected); - childSetEnabled("ac_list_enabled",selected); - childSetEnabled("ac_list_show",selected); - childSetEnabled("ac_list_style",selected); - childSetEnabled("ac_deletelist",selected); - childSetEnabled("ac_exportlist",selected); - childSetEnabled("ac_addentry",selected); - childSetEnabled("ac_rementry",selected); - childSetEnabled("ac_priority",selected); - -} -void AutoReplaceFloater::updateEnabledStuff() -{ - BOOL autoreplace = gSavedSettings.getBOOL("AutoReplace"); - if(autoreplace) - { - LLCheckBoxCtrl *enBox = getChild("ac_enable"); - enBox->setDisabledColor(LLColor4::red); - getChild("ac_enable")->setEnabledColor(LLColor4(1.0f,0.0f,0.0f,1.0f)); - }else - { - getChild("ac_enable")->setEnabledColor( - LLUIColorTable::instance().getColor( "LabelTextColor" )); - } - - childSetEnabled("ac_list_name", autoreplace); - childSetEnabled("ac_list_entry", autoreplace); - updateListControlsEnabled(autoreplace); - updateNamesList(); - AutoReplace::getInstance()->save(); - -} -void AutoReplaceFloater::setData(void * data) -{ -} -void AutoReplaceFloater::onBoxCommitEnabled(LLUICtrl* caller, void* user_data) -{ - if ( user_data ) - { - AutoReplaceFloater* self = ( AutoReplaceFloater* )user_data; - if ( self ) - { - self->updateEnabledStuff(); - } - } -} -void AutoReplaceFloater::onEntrySettingChange(LLUICtrl* caller, void* user_data) -{ - if ( user_data ) - { - AutoReplaceFloater* self = ( AutoReplaceFloater* )user_data; - if ( self ) - { - std::string listName= self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); - AutoReplace::getInstance()->setListEnabled(listName,self->childGetValue("ac_list_enabled").asBoolean()); - AutoReplace::getInstance()->setListPriority(listName,self->childGetValue("ac_priority").asInteger()); - - //sInstance->updateEnabledStuff(); - self->updateItemsList(); - AutoReplace::getInstance()->save(); - } - } -} -void AutoReplaceFloater::deleteEntry(void* data) -{ - if ( data ) - { - AutoReplaceFloater* self = ( AutoReplaceFloater* )data; - if ( self ) - { - - std::string listName=self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); - - if((self->entryList->getAllSelected().size())>0) - { - std::string wrong= self->entryList->getFirstSelected()->getColumn(0)->getValue().asString(); - AutoReplace::getInstance()->removeEntryFromList(wrong,listName); - self->updateItemsList(); - AutoReplace::getInstance()->save(); - } - } - } -} -void AutoReplaceFloater::loadList(void* data) -{ - LLFilePicker& picker = LLFilePicker::instance(); - - if(!picker.getOpenFile( LLFilePicker::FFLOAD_XML) ) - {return; - } - llifstream file; - file.open(picker.getFirstFile().c_str()); - LLSD blankllsd; - if (file.is_open()) - { - LLSDSerialize::fromXMLDocument(blankllsd, file); - } - file.close(); - gSavedSettings.setBOOL("AutoReplace",true); - AutoReplace::getInstance()->addReplacementList(blankllsd); - if ( data ) - { - AutoReplaceFloater* self = ( AutoReplaceFloater* )data; - if ( self ) - self->updateEnabledStuff(); - } -} -void AutoReplaceFloater::removeList(void* data) -{ - if ( data ) - { - AutoReplaceFloater* self = ( AutoReplaceFloater* )data; - if ( self ) - { - std::string listName= self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); - AutoReplace::getInstance()->removeReplacementList(listName); - self->updateEnabledStuff(); - } - - } -} -void AutoReplaceFloater::exportList(void *data) -{ - if ( data ) - { - AutoReplaceFloater* self = ( AutoReplaceFloater* )data; - if ( self ) - { - std::string listName=self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); - - LLFilePicker& picker = LLFilePicker::instance(); - - if(!picker.getSaveFile( LLFilePicker::FFSAVE_XML) ) - {return; - } - llofstream file; - file.open(picker.getFirstFile().c_str()); - LLSDSerialize::toPrettyXML(AutoReplace::getInstance()->exportList(listName), file); - file.close(); - } - - } -} -void AutoReplaceFloater::addEntry(void* data) -{ - if ( data ) - { - AutoReplaceFloater* self = ( AutoReplaceFloater* )data; - if ( self ) - { - std::string listName= self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); - std::string wrong = self->mOldText->getText(); - std::string right = self->mNewText->getText(); - if(wrong != "" && right != "") - { - AutoReplace::getInstance()->addEntryToList(wrong, right, listName); - self->updateItemsList(); - AutoReplace::getInstance()->save(); - } - } - } -} -AutoReplaceFloater* AutoReplaceFloater::showFloater() -{ - AutoReplaceFloater *floater = dynamic_cast(LLFloaterReg::getInstance("autoreplace")); - if(floater) - { - floater->setVisible(true); - floater->setFrontmost(true); - floater->center(); - return floater; - } - else - { - LL_WARNS("AutoReplace") << "Can't find floater!" << LL_ENDL; - return NULL; - } -} diff --git a/indra/newview/llautoreplacefloater.h b/indra/newview/llautoreplacefloater.h deleted file mode 100644 index 213cf93a30..0000000000 --- a/indra/newview/llautoreplacefloater.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - * @file llautoreplacefloater.h - * @brief Auto Replace List floater - * @copyright Copyright (c) 2011 LordGregGreg Back - * - * $LicenseInfo:firstyear=2012&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2012, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * $/LicenseInfo$ - */ - -#ifndef AUTOREPLACEFLOATER_H -#define AUTOREPLACEFLOATER_H - -#include "llfloater.h" -#include "llmediactrl.h" -#include "llscrolllistctrl.h" -#include "lllineeditor.h" - -#include "llviewerinventory.h" -#include - -class AutoReplaceFloater : -public LLFloater -{ -public: - AutoReplaceFloater(const LLSD& key); - - /*virtual*/ BOOL postBuild(); - /*virtual*/ void onClose(bool app_quitting); - - static AutoReplaceFloater* showFloater(); - - void setData(void * data); - void updateEnabledStuff(); - void updateNamesList(); - void updateListControlsEnabled(BOOL selected); - void updateItemsList(); - - LLScrollListCtrl *namesList; - LLScrollListCtrl *entryList; - LLLineEditor* mOldText; - LLLineEditor* mNewText; - //LLPanel * empanel; -private: - //static JCInvDropTarget* mNotecardDropTarget; - static void onBoxCommitEnabled(LLUICtrl* caller, void* user_data); - static void onEntrySettingChange(LLUICtrl* caller, void* user_data); - static void onSelectName(LLUICtrl* caller, void* user_data); - //static void ResponseItemDrop(LLViewerInventoryItem* item); - //static void onNotecardLoadComplete(LLVFS *vfs,const LLUUID& asset_uuid,LLAssetType::EType type,void* user_data, S32 status, LLExtStat ext_status); - - - static void deleteEntry(void* data); - static void addEntry(void* data); - static void exportList(void* data); - static void removeList(void* data); - static void loadList(void* data); -}; - -#endif // AUTOREPLACEFLOATER_H diff --git a/indra/newview/llfloaterautoreplacesettings.cpp b/indra/newview/llfloaterautoreplacesettings.cpp new file mode 100644 index 0000000000..3dfcfba936 --- /dev/null +++ b/indra/newview/llfloaterautoreplacesettings.cpp @@ -0,0 +1,367 @@ +/** + * @file llautoreplacefloater.cpp + * @brief Auto Replace List floater + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloaterautoreplacesettings.h" + +#include "llagentdata.h" +#include "llcommandhandler.h" +#include "llfloater.h" +#include "lluictrlfactory.h" +#include "llagent.h" +#include "llpanel.h" +#include "llbutton.h" +#include "llcolorswatch.h" +#include "llcombobox.h" +#include "llview.h" +#include "llhttpclient.h" +#include "llbufferstream.h" +#include "llcheckboxctrl.h" +#include "llviewercontrol.h" + +#include "llui.h" +#include "llcontrol.h" +#include "llscrollingpanellist.h" +#include "llautoreplace.h" +#include "llfilepicker.h" +#include "llfile.h" +#include "llsdserialize.h" +//#include "llfloaterchat.h" +#include "llchat.h" +#include "llinventorymodel.h" +#include "llhost.h" +#include "llassetstorage.h" +#include "roles_constants.h" +#include "llviewertexteditor.h" +#include + +#include +#include "llfloaterreg.h" +#include "llinspecttoast.h" +#include "llnotificationhandler.h" +#include "llnotificationmanager.h" + + +LLFloaterAutoReplaceSettings::LLFloaterAutoReplaceSettings(const LLSD& key) + : LLFloater(key) + , namesList(NULL) + , entryList(NULL) + , mOldText(NULL) + , mNewText(NULL) +{ +} +void LLFloaterAutoReplaceSettings::onClose(bool app_quitting) +{ + destroy(); +} + +BOOL LLFloaterAutoReplaceSettings::postBuild(void) +{ + + namesList = getChild("ac_list_name"); + entryList = getChild("ac_list_entry"); + mOldText = getChild("ac_old_text"); + mNewText = getChild("ac_new_text"); + + childSetCommitCallback("ac_enable",onBoxCommitEnabled,this); + + childSetCommitCallback("ac_list_enabled",onEntrySettingChange,this); + childSetCommitCallback("ac_list_show",onEntrySettingChange,this); + childSetCommitCallback("ac_list_style",onEntrySettingChange,this); + childSetCommitCallback("ac_priority",onEntrySettingChange,this); + + updateEnabledStuff(); + updateNamesList(); + + namesList->setCommitOnSelectionChange(TRUE); + childSetCommitCallback("ac_list_name", onSelectName, this); + + childSetAction("ac_deletelist",removeList,this); + childSetAction("ac_rementry",deleteEntry,this); + childSetAction("ac_exportlist",exportList,this); + childSetAction("ac_addentry",addEntry,this); + childSetAction("ac_loadlist",loadList,this); + + return true; +} + +void LLFloaterAutoReplaceSettings::onSelectName(LLUICtrl* ctrl, void* user_data) +{ + if ( user_data ) + { + LLFloaterAutoReplaceSettings* self = ( LLFloaterAutoReplaceSettings* )user_data; + if ( self ) + { + self->updateItemsList(); + } + } +} +void LLFloaterAutoReplaceSettings::updateItemsList() +{ + entryList->deleteAllItems(); + if((namesList->getAllSelected().size())<=0) + { + updateListControlsEnabled(FALSE); + return; + } + + updateListControlsEnabled(TRUE); + std::string listName= namesList->getFirstSelected()->getColumn(0)->getValue().asString(); + + LLSD listData = AutoReplace::getInstance()->getAutoReplaceEntries(listName); + childSetValue("ac_list_enabled",listData["enabled"].asBoolean()); + childSetValue("ac_text_name",listName); + childSetValue("ac_priority",listData["priority"]); + + LLSD autoReplaces = listData["data"]; + LLSD::map_const_iterator loc_it = autoReplaces.beginMap(); + LLSD::map_const_iterator loc_end = autoReplaces.endMap(); + for ( ; loc_it != loc_end; ++loc_it) + { + const std::string& wrong = (*loc_it).first; + const std::string& right = (*loc_it).second; + + LLSD element; + element["id"] = wrong; + LLSD& s_column = element["columns"][0]; + s_column["column"] = "Search"; + s_column["value"] = wrong; + s_column["font"] = "SANSSERIF"; + LLSD& r_column = element["columns"][1]; + r_column["column"] = "Replace"; + r_column["value"] = right; + r_column["font"] = "SANSSERIF"; + + entryList->addElement(element, ADD_BOTTOM); + } + +} +void LLFloaterAutoReplaceSettings::updateNamesList() +{ + namesList->deleteAllItems(); + if(!gSavedSettings.getBOOL("AutoReplace")) + { + updateItemsList(); + return; + } + LLSD autoReplaces = AutoReplace::getInstance()->getAutoReplaces(); + LLSD::map_const_iterator loc_it = autoReplaces.beginMap(); + LLSD::map_const_iterator loc_end = autoReplaces.endMap(); + for ( ; loc_it != loc_end; ++loc_it) + { + const std::string& listName = (*loc_it).first; + + LLSD element; + element["id"] = listName; + LLSD& friend_column = element["columns"][0]; + friend_column["column"] = "Entries"; + friend_column["value"] = listName; + //friend_column["font"] = "SANSSERIF"; + const LLSD& loc_map = (*loc_it).second; + if(loc_map["enabled"].asBoolean()) + { + friend_column["font"] = "SANSSERIF"; + } + else + { + friend_column["font"] = "SANSSERIF_SMALL"; + } + if(namesList) + { + namesList->addElement(element, ADD_BOTTOM); + } + } + updateItemsList(); +} +void LLFloaterAutoReplaceSettings::updateListControlsEnabled(BOOL selected) +{ + + childSetEnabled("ac_text1",selected); + childSetEnabled("ac_text2",selected); + childSetEnabled("ac_text_name",selected); + childSetEnabled("ac_list_enabled",selected); + childSetEnabled("ac_list_show",selected); + childSetEnabled("ac_list_style",selected); + childSetEnabled("ac_deletelist",selected); + childSetEnabled("ac_exportlist",selected); + childSetEnabled("ac_addentry",selected); + childSetEnabled("ac_rementry",selected); + childSetEnabled("ac_priority",selected); + +} +void LLFloaterAutoReplaceSettings::updateEnabledStuff() +{ + BOOL autoreplace = gSavedSettings.getBOOL("AutoReplace"); + if(autoreplace) + { + LLCheckBoxCtrl *enBox = getChild("ac_enable"); + enBox->setDisabledColor(LLColor4::red); + getChild("ac_enable")->setEnabledColor(LLColor4(1.0f,0.0f,0.0f,1.0f)); + } + else + { + getChild("ac_enable")->setEnabledColor( + LLUIColorTable::instance().getColor( "LabelTextColor" )); + } + + childSetEnabled("ac_list_name", autoreplace); + childSetEnabled("ac_list_entry", autoreplace); + updateListControlsEnabled(autoreplace); + updateNamesList(); + AutoReplace::getInstance()->save(); + +} +void LLFloaterAutoReplaceSettings::setData(void * data) +{ +} +void LLFloaterAutoReplaceSettings::onBoxCommitEnabled(LLUICtrl* caller, void* user_data) +{ + if ( user_data ) + { + LLFloaterAutoReplaceSettings* self = ( LLFloaterAutoReplaceSettings* )user_data; + if ( self ) + { + self->updateEnabledStuff(); + } + } +} +void LLFloaterAutoReplaceSettings::onEntrySettingChange(LLUICtrl* caller, void* user_data) +{ + if ( user_data ) + { + LLFloaterAutoReplaceSettings* self = ( LLFloaterAutoReplaceSettings* )user_data; + if ( self ) + { + std::string listName= self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); + AutoReplace::getInstance()->setListEnabled(listName,self->childGetValue("ac_list_enabled").asBoolean()); + AutoReplace::getInstance()->setListPriority(listName,self->childGetValue("ac_priority").asInteger()); + + //sInstance->updateEnabledStuff(); + self->updateItemsList(); + AutoReplace::getInstance()->save(); + } + } +} +void LLFloaterAutoReplaceSettings::deleteEntry(void* data) +{ + if ( data ) + { + LLFloaterAutoReplaceSettings* self = ( LLFloaterAutoReplaceSettings* )data; + if ( self ) + { + + std::string listName=self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); + + if((self->entryList->getAllSelected().size())>0) + { + std::string wrong= self->entryList->getFirstSelected()->getColumn(0)->getValue().asString(); + AutoReplace::getInstance()->removeEntryFromList(wrong,listName); + self->updateItemsList(); + AutoReplace::getInstance()->save(); + } + } + } +} +void LLFloaterAutoReplaceSettings::loadList(void* data) +{ + LLFilePicker& picker = LLFilePicker::instance(); + + if(!picker.getOpenFile( LLFilePicker::FFLOAD_XML) ) + { + return; + } + llifstream file; + file.open(picker.getFirstFile().c_str()); + LLSD blankllsd; + if (file.is_open()) + { + LLSDSerialize::fromXMLDocument(blankllsd, file); + } + file.close(); + gSavedSettings.setBOOL("AutoReplace",true); + AutoReplace::getInstance()->addReplacementList(blankllsd); + if ( data ) + { + LLFloaterAutoReplaceSettings* self = ( LLFloaterAutoReplaceSettings* )data; + if ( self ) + { + self->updateEnabledStuff(); + } + } +} +void LLFloaterAutoReplaceSettings::removeList(void* data) +{ + if ( data ) + { + LLFloaterAutoReplaceSettings* self = ( LLFloaterAutoReplaceSettings* )data; + if ( self ) + { + std::string listName= self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); + AutoReplace::getInstance()->removeReplacementList(listName); + self->updateEnabledStuff(); + } + + } +} +void LLFloaterAutoReplaceSettings::exportList(void *data) +{ + if ( data ) + { + LLFloaterAutoReplaceSettings* self = ( LLFloaterAutoReplaceSettings* )data; + if ( self ) + { + std::string listName=self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); + + LLFilePicker& picker = LLFilePicker::instance(); + if(picker.getSaveFile( LLFilePicker::FFSAVE_XML) ) + { + llofstream file; + file.open(picker.getFirstFile().c_str()); + LLSDSerialize::toPrettyXML(AutoReplace::getInstance()->exportList(listName), file); + file.close(); + } + } + } +} +void LLFloaterAutoReplaceSettings::addEntry(void* data) +{ + if ( data ) + { + LLFloaterAutoReplaceSettings* self = ( LLFloaterAutoReplaceSettings* )data; + if ( self ) + { + std::string listName= self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); + std::string wrong = self->mOldText->getText(); + std::string right = self->mNewText->getText(); + if(wrong != "" && right != "") + { + AutoReplace::getInstance()->addEntryToList(wrong, right, listName); + self->updateItemsList(); + AutoReplace::getInstance()->save(); + } + } + } +} + diff --git a/indra/newview/llfloaterautoreplacesettings.h b/indra/newview/llfloaterautoreplacesettings.h new file mode 100644 index 0000000000..dd0acb613b --- /dev/null +++ b/indra/newview/llfloaterautoreplacesettings.h @@ -0,0 +1,70 @@ +/** + * @file llfloaterautoreplacesettings.h + * @brief Auto Replace List floater + * @copyright Copyright (c) 2011 LordGregGreg Back + * + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * $/LicenseInfo$ + */ + +#ifndef LLFLOATERAUTOREPLACESETTINGS_H +#define LLFLOATERAUTOREPLACESETTINGS_H + +#include "llfloater.h" +#include "llmediactrl.h" +#include "llscrolllistctrl.h" +#include "lllineeditor.h" + +#include "llviewerinventory.h" +#include + +class LLFloaterAutoReplaceSettings : +public LLFloater +{ +public: + LLFloaterAutoReplaceSettings(const LLSD& key); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void onClose(bool app_quitting); + + void setData(void * data); + void updateEnabledStuff(); + void updateNamesList(); + void updateListControlsEnabled(BOOL selected); + void updateItemsList(); + + LLScrollListCtrl *namesList; + LLScrollListCtrl *entryList; + LLLineEditor* mOldText; + LLLineEditor* mNewText; + +private: + + static void onBoxCommitEnabled(LLUICtrl* caller, void* user_data); + static void onEntrySettingChange(LLUICtrl* caller, void* user_data); + static void onSelectName(LLUICtrl* caller, void* user_data); + + static void deleteEntry(void* data); + static void addEntry(void* data); + static void exportList(void* data); + static void removeList(void* data); + static void loadList(void* data); +}; + +#endif // LLFLOATERAUTOREPLACESETTINGS_H diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 7ef8125896..2c383f09ba 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -35,7 +35,7 @@ #include "llfloaterpreference.h" #include "message.h" -#include "llautoreplacefloater.h" +#include "llfloaterautoreplacesettings.h" #include "llagent.h" #include "llavatarconstants.h" #include "llcheckboxctrl.h" @@ -346,7 +346,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.BlockList", boost::bind(&LLFloaterPreference::onClickBlockList, this)); mCommitCallbackRegistrar.add("Pref.Proxy", boost::bind(&LLFloaterPreference::onClickProxySettings, this)); mCommitCallbackRegistrar.add("Pref.TranslationSettings", boost::bind(&LLFloaterPreference::onClickTranslationSettings, this)); - mCommitCallbackRegistrar.add("Pref.AutoReplace.", boost::bind(&AutoReplaceFloater::showFloater, this)); + mCommitCallbackRegistrar.add("Pref.AutoReplace", boost::bind(&LLFloaterPreference::onClickAutoReplace, this)); sSkin = gSavedSettings.getString("SkinCurrent"); @@ -605,6 +605,9 @@ void LLFloaterPreference::cancel() // hide translation settings floater LLFloaterReg::hideInstance("prefs_translation"); + // hide translation settings floater + LLFloaterReg::hideInstance("prefs_autoreplace"); + // cancel hardware menu LLFloaterHardwareSettings* hardware_settings = LLFloaterReg::getTypedInstance("prefs_hardware_settings"); if (hardware_settings) @@ -1516,6 +1519,11 @@ void LLFloaterPreference::onClickTranslationSettings() LLFloaterReg::showInstance("prefs_translation"); } +void LLFloaterPreference::onClickAutoReplace() +{ + LLFloaterReg::showInstance("prefs_autoreplace"); +} + void LLFloaterPreference::onClickActionChange() { mClickActionDirty = true; diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index ec5994e917..0b63002345 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -157,6 +157,7 @@ public: void onClickBlockList(); void onClickProxySettings(); void onClickTranslationSettings(); + void onClickAutoReplace(); void applyUIColor(LLUICtrl* ctrl, const LLSD& param); void getUIColor(LLUICtrl* ctrl, const LLSD& param); diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index b2480a1805..d66f742a70 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -30,7 +30,7 @@ #include "llfloaterreg.h" #include "llviewerfloaterreg.h" -#include "llautoreplacefloater.h" +#include "llfloaterautoreplacesettings.h" #include "llcompilequeue.h" #include "llcallfloater.h" #include "llfasttimerview.h" @@ -170,7 +170,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("appearance", "floater_my_appearance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("settings_autoreplace", "floater_autoreplace.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar", "floater_avatar.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); @@ -250,6 +249,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("prefs_proxy", "floater_preferences_proxy.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("prefs_hardware_settings", "floater_hardware_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("prefs_translation", "floater_translation_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("prefs_autoreplace", "floater_autoreplace.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("perm_prefs", "floater_perm_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("picks", "floater_picks.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("pref_joystick", "floater_joystick.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/xui/en/floater_autoreplace.xml b/indra/newview/skins/default/xui/en/floater_autoreplace.xml index f68aeacb97..17f64c1433 100644 --- a/indra/newview/skins/default/xui/en/floater_autoreplace.xml +++ b/indra/newview/skins/default/xui/en/floater_autoreplace.xml @@ -96,7 +96,7 @@ -- cgit v1.2.3 From 0f5d636a1a45500fc49cc713e6f93160c4fafe0b Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Sat, 12 May 2012 07:51:38 -0400 Subject: STORM-1738: remove unimplemented notecard target from autoreplace settings floater --- .../skins/default/xui/en/floater_autoreplace.xml | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_autoreplace.xml b/indra/newview/skins/default/xui/en/floater_autoreplace.xml index 17f64c1433..5baae4f0d4 100644 --- a/indra/newview/skins/default/xui/en/floater_autoreplace.xml +++ b/indra/newview/skins/default/xui/en/floater_autoreplace.xml @@ -38,27 +38,6 @@ name="ac_loadlist" label="Load List.." tool_tip="Click this to load a previously exported list from a file."/> - - - - Date: Sat, 12 May 2012 12:59:07 -0400 Subject: STORM-1738: fix class name and other coding standards issues --- indra/newview/llautoreplace.cpp | 107 ++++++++++++++++--------- indra/newview/llautoreplace.h | 18 ++--- indra/newview/llfloaterautoreplacesettings.cpp | 26 +++--- indra/newview/llimfloater.cpp | 2 +- indra/newview/llnearbychatbar.cpp | 2 +- 5 files changed, 90 insertions(+), 65 deletions(-) (limited to 'indra') diff --git a/indra/newview/llautoreplace.cpp b/indra/newview/llautoreplace.cpp index fa46f53e96..10005aee9f 100644 --- a/indra/newview/llautoreplace.cpp +++ b/indra/newview/llautoreplace.cpp @@ -30,20 +30,20 @@ #include "llviewercontrol.h" #include "llnotificationsutil.h" -AutoReplace* AutoReplace::sInstance; +LLAutoReplace* LLAutoReplace::sInstance; -AutoReplace::AutoReplace() +LLAutoReplace::LLAutoReplace() { sInstance = this; sInstance->loadFromDisk(); } -AutoReplace::~AutoReplace() +LLAutoReplace::~LLAutoReplace() { sInstance = NULL; } -void AutoReplace::autoreplaceCallback(LLUIString& inputText, S32& cursorPos) +void LLAutoReplace::autoreplaceCallback(LLUIString& inputText, S32& cursorPos) { static LLCachedControl perform_autoreplace(gSavedSettings, "AutoReplace"); if(perform_autoreplace) @@ -52,16 +52,22 @@ void AutoReplace::autoreplaceCallback(LLUIString& inputText, S32& cursorPos) S32 wordEnd = cursorPos-1; if(wordEnd < 1) + { return; - + } + LLWString text = inputText.getWString(); if(text.size()<1) + { return; - + } + if(LLWStringUtil::isPartOfWord(text[wordEnd])) + { return;//we only check on word breaks - + } + wordEnd--; if(LLWStringUtil::isPartOfWord(text[wordEnd])) @@ -80,11 +86,11 @@ void AutoReplace::autoreplaceCallback(LLUIString& inputText, S32& cursorPos) std::string strLastWord = std::string(text.begin(), text.end()); std::string lastTypedWord = strLastWord.substr(wordStart, wordEnd-wordStart); - std::string replaceedWord(replaceWord(lastTypedWord)); + std::string replacedWord(replaceWord(lastTypedWord)); - if(replaceedWord != lastTypedWord) + if(replacedWord != lastTypedWord) { - LLWString strNew = utf8str_to_wstring(replaceedWord); + LLWString strNew = utf8str_to_wstring(replacedWord); LLWString strOld = utf8str_to_wstring(lastTypedWord); int nDiff = strNew.size() - strOld.size(); @@ -97,20 +103,21 @@ void AutoReplace::autoreplaceCallback(LLUIString& inputText, S32& cursorPos) } } -AutoReplace* AutoReplace::getInstance() +LLAutoReplace* LLAutoReplace::getInstance() { - if(sInstance)return sInstance; - else + if(!sInstance) { - sInstance = new AutoReplace(); - return sInstance; + sInstance = new LLAutoReplace(); } + return sInstance; } -void AutoReplace::save() + +void LLAutoReplace::save() { saveToDisk(mAutoReplaces); } -std::string AutoReplace::getFileName() + +std::string LLAutoReplace::getFileName() { std::string path=gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""); @@ -120,7 +127,8 @@ std::string AutoReplace::getFileName() } return path; } -std::string AutoReplace::getDefaultFileName() + +std::string LLAutoReplace::getDefaultFileName() { std::string path=gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""); @@ -130,7 +138,8 @@ std::string AutoReplace::getDefaultFileName() } return path; } -LLSD AutoReplace::exportList(std::string listName) + +LLSD LLAutoReplace::exportList(std::string listName) { LLSD toReturn; if(mAutoReplaces.has(listName)) @@ -141,12 +150,12 @@ LLSD AutoReplace::exportList(std::string listName) } return toReturn; } -BOOL AutoReplace::addReplacementList(LLSD newList) + +BOOL LLAutoReplace::addReplacementList(LLSD newList) { if(newList.has("listName")) { std::string name = newList["listName"]; - //if(!mAutoReplaces.has(name)){ LLSD newPart; newPart["data"]=newList["data"]; newPart["enabled"]=TRUE; @@ -155,11 +164,11 @@ BOOL AutoReplace::addReplacementList(LLSD newList) mAutoReplaces[name]=newPart; return TRUE; - } return FALSE; } -BOOL AutoReplace::removeReplacementList(std::string listName) + +BOOL LLAutoReplace::removeReplacementList(std::string listName) { if(mAutoReplaces.has(listName)) { @@ -168,7 +177,8 @@ BOOL AutoReplace::removeReplacementList(std::string listName) } return FALSE; } -BOOL AutoReplace::setListEnabled(std::string listName, BOOL enabled) + +BOOL LLAutoReplace::setListEnabled(std::string listName, BOOL enabled) { if(mAutoReplaces.has(listName)) { @@ -178,7 +188,8 @@ BOOL AutoReplace::setListEnabled(std::string listName, BOOL enabled) return FALSE; } -BOOL AutoReplace::setListPriority(std::string listName, int priority) + +BOOL LLAutoReplace::setListPriority(std::string listName, int priority) { if(mAutoReplaces.has(listName)) { @@ -187,11 +198,13 @@ BOOL AutoReplace::setListPriority(std::string listName, int priority) } return FALSE; } -LLSD AutoReplace::getAutoReplaces() + +LLSD LLAutoReplace::getAutoReplaces() { return mAutoReplaces; } -void AutoReplace::loadFromDisk() + +void LLAutoReplace::loadFromDisk() { std::string filename=getFileName(); if (filename.empty()) @@ -214,8 +227,11 @@ void AutoReplace::loadFromDisk() } file.close(); saveToDisk(blankllsd); - }else - saveToDisk(getExampleLLSD()); + } + else + { + saveToDisk(getExampleLLSD()); + } } else { @@ -228,7 +244,8 @@ void AutoReplace::loadFromDisk() file.close(); } } -void AutoReplace::saveToDisk(LLSD newSettings) + +void LLAutoReplace::saveToDisk(LLSD newSettings) { mAutoReplaces=newSettings; std::string filename=getFileName(); @@ -237,7 +254,8 @@ void AutoReplace::saveToDisk(LLSD newSettings) LLSDSerialize::toPrettyXML(mAutoReplaces, file); file.close(); } -void AutoReplace::runTest() + +void LLAutoReplace::runTest() { std::string startS("He just abandonned all his abilties"); std::string endS = replaceWords(startS); @@ -245,7 +263,8 @@ void AutoReplace::runTest() } -BOOL AutoReplace::saveListToDisk(std::string listName, std::string fileName) + +BOOL LLAutoReplace::saveListToDisk(std::string listName, std::string fileName) { if(mAutoReplaces.has(listName)) { @@ -257,7 +276,8 @@ BOOL AutoReplace::saveListToDisk(std::string listName, std::string fileName) } return FALSE; } -LLSD AutoReplace::getAutoReplaceEntries(std::string listName) + +LLSD LLAutoReplace::getAutoReplaceEntries(std::string listName) { LLSD toReturn; if(mAutoReplaces.has(listName)) @@ -266,7 +286,8 @@ LLSD AutoReplace::getAutoReplaceEntries(std::string listName) } return toReturn; } -std::string AutoReplace::replaceWord(std::string currentWord) + +std::string LLAutoReplace::replaceWord(std::string currentWord) { static LLCachedControl perform_autoreplace(gSavedSettings, "AutoReplace"); if(!(perform_autoreplace))return currentWord; @@ -293,11 +314,15 @@ std::string AutoReplace::replaceWord(std::string currentWord) } return currentWord; } -std::string AutoReplace::replaceWords(std::string words) + +std::string LLAutoReplace::replaceWords(std::string words) { static LLCachedControl perform_autoreplace(gSavedSettings, "AutoReplace"); - if(!(perform_autoreplace))return words; - + if(!(perform_autoreplace)) + { + return words; + } + boost_tokenizer tokens(words, boost::char_separator(" ")); for (boost_tokenizer::iterator token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) { @@ -320,7 +345,8 @@ std::string AutoReplace::replaceWords(std::string words) } return words; } -BOOL AutoReplace::addEntryToList(std::string wrong, std::string right, std::string listName) + +BOOL LLAutoReplace::addEntryToList(std::string wrong, std::string right, std::string listName) { // *HACK: Make sure the "Custom" list exists, because the design of this // system prevents us from updating it by changing the original file... @@ -339,7 +365,8 @@ BOOL AutoReplace::addEntryToList(std::string wrong, std::string right, std::stri return FALSE; } -BOOL AutoReplace::removeEntryFromList(std::string wrong, std::string listName) + +BOOL LLAutoReplace::removeEntryFromList(std::string wrong, std::string listName) { if(mAutoReplaces.has(listName)) { @@ -352,7 +379,7 @@ BOOL AutoReplace::removeEntryFromList(std::string wrong, std::string listName) return FALSE; } -LLSD AutoReplace::getExampleLLSD() +LLSD LLAutoReplace::getExampleLLSD() { LLSD toReturn; diff --git a/indra/newview/llautoreplace.h b/indra/newview/llautoreplace.h index 6c531d0040..27533c4ef1 100644 --- a/indra/newview/llautoreplace.h +++ b/indra/newview/llautoreplace.h @@ -17,19 +17,19 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef AUTO_REPLACE -#define AUTO_REPLACE +#ifndef LLAUTOREPLACE_H +#define LLAUTOREPLACE_H #include "lllineeditor.h" -class AutoReplace : public LLSingleton +class LLAutoReplace : public LLSingleton { - AutoReplace(); - ~AutoReplace(); - static AutoReplace* sInstance; + LLAutoReplace(); + ~LLAutoReplace(); + static LLAutoReplace* sInstance; public: void autoreplaceCallback(LLUIString& inputText, S32& cursorPos); - static AutoReplace* getInstance(); + static LLAutoReplace* getInstance(); BOOL addReplacementList(LLSD newList); BOOL removeReplacementList(std::string listName); BOOL setListEnabled(std::string listName, BOOL enabled); @@ -48,7 +48,7 @@ public: void loadFromDisk(); private: - friend class LLSingleton; + friend class LLSingleton; void saveToDisk(LLSD newSettings); LLSD getExampleLLSD(); std::string getFileName(); @@ -58,6 +58,4 @@ private: }; - - #endif diff --git a/indra/newview/llfloaterautoreplacesettings.cpp b/indra/newview/llfloaterautoreplacesettings.cpp index 3dfcfba936..1a52e5d493 100644 --- a/indra/newview/llfloaterautoreplacesettings.cpp +++ b/indra/newview/llfloaterautoreplacesettings.cpp @@ -130,7 +130,7 @@ void LLFloaterAutoReplaceSettings::updateItemsList() updateListControlsEnabled(TRUE); std::string listName= namesList->getFirstSelected()->getColumn(0)->getValue().asString(); - LLSD listData = AutoReplace::getInstance()->getAutoReplaceEntries(listName); + LLSD listData = LLAutoReplace::getInstance()->getAutoReplaceEntries(listName); childSetValue("ac_list_enabled",listData["enabled"].asBoolean()); childSetValue("ac_text_name",listName); childSetValue("ac_priority",listData["priority"]); @@ -166,7 +166,7 @@ void LLFloaterAutoReplaceSettings::updateNamesList() updateItemsList(); return; } - LLSD autoReplaces = AutoReplace::getInstance()->getAutoReplaces(); + LLSD autoReplaces = LLAutoReplace::getInstance()->getAutoReplaces(); LLSD::map_const_iterator loc_it = autoReplaces.beginMap(); LLSD::map_const_iterator loc_end = autoReplaces.endMap(); for ( ; loc_it != loc_end; ++loc_it) @@ -230,7 +230,7 @@ void LLFloaterAutoReplaceSettings::updateEnabledStuff() childSetEnabled("ac_list_entry", autoreplace); updateListControlsEnabled(autoreplace); updateNamesList(); - AutoReplace::getInstance()->save(); + LLAutoReplace::getInstance()->save(); } void LLFloaterAutoReplaceSettings::setData(void * data) @@ -255,12 +255,12 @@ void LLFloaterAutoReplaceSettings::onEntrySettingChange(LLUICtrl* caller, void* if ( self ) { std::string listName= self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); - AutoReplace::getInstance()->setListEnabled(listName,self->childGetValue("ac_list_enabled").asBoolean()); - AutoReplace::getInstance()->setListPriority(listName,self->childGetValue("ac_priority").asInteger()); + LLAutoReplace::getInstance()->setListEnabled(listName,self->childGetValue("ac_list_enabled").asBoolean()); + LLAutoReplace::getInstance()->setListPriority(listName,self->childGetValue("ac_priority").asInteger()); //sInstance->updateEnabledStuff(); self->updateItemsList(); - AutoReplace::getInstance()->save(); + LLAutoReplace::getInstance()->save(); } } } @@ -277,9 +277,9 @@ void LLFloaterAutoReplaceSettings::deleteEntry(void* data) if((self->entryList->getAllSelected().size())>0) { std::string wrong= self->entryList->getFirstSelected()->getColumn(0)->getValue().asString(); - AutoReplace::getInstance()->removeEntryFromList(wrong,listName); + LLAutoReplace::getInstance()->removeEntryFromList(wrong,listName); self->updateItemsList(); - AutoReplace::getInstance()->save(); + LLAutoReplace::getInstance()->save(); } } } @@ -301,7 +301,7 @@ void LLFloaterAutoReplaceSettings::loadList(void* data) } file.close(); gSavedSettings.setBOOL("AutoReplace",true); - AutoReplace::getInstance()->addReplacementList(blankllsd); + LLAutoReplace::getInstance()->addReplacementList(blankllsd); if ( data ) { LLFloaterAutoReplaceSettings* self = ( LLFloaterAutoReplaceSettings* )data; @@ -319,7 +319,7 @@ void LLFloaterAutoReplaceSettings::removeList(void* data) if ( self ) { std::string listName= self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); - AutoReplace::getInstance()->removeReplacementList(listName); + LLAutoReplace::getInstance()->removeReplacementList(listName); self->updateEnabledStuff(); } @@ -339,7 +339,7 @@ void LLFloaterAutoReplaceSettings::exportList(void *data) { llofstream file; file.open(picker.getFirstFile().c_str()); - LLSDSerialize::toPrettyXML(AutoReplace::getInstance()->exportList(listName), file); + LLSDSerialize::toPrettyXML(LLAutoReplace::getInstance()->exportList(listName), file); file.close(); } } @@ -357,9 +357,9 @@ void LLFloaterAutoReplaceSettings::addEntry(void* data) std::string right = self->mNewText->getText(); if(wrong != "" && right != "") { - AutoReplace::getInstance()->addEntryToList(wrong, right, listName); + LLAutoReplace::getInstance()->addEntryToList(wrong, right, listName); self->updateItemsList(); - AutoReplace::getInstance()->save(); + LLAutoReplace::getInstance()->save(); } } } diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 670db3773e..63eedcdfea 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -256,7 +256,7 @@ BOOL LLIMFloater::postBuild() // enable line history support for instant message bar mInputEditor->setEnableLineHistory(TRUE); // *TODO Establish LineEditor with autoreplace callback - mInputEditor->setAutoreplaceCallback(boost::bind(&AutoReplace::autoreplaceCallback, AutoReplace::getInstance(), _1, _2)); + mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2)); LLFontGL* font = LLViewerChat::getChatFont(); mInputEditor->setFont(font); diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index a3aeadbfb8..2a1d3b9fc5 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -88,7 +88,7 @@ BOOL LLNearbyChatBar::postBuild() { mChatBox = getChild("chat_box"); - mChatBox->setAutoreplaceCallback(boost::bind(&AutoReplace::autoreplaceCallback, AutoReplace::getInstance(), _1, _2)); + mChatBox->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2)); mChatBox->setCommitCallback(boost::bind(&LLNearbyChatBar::onChatBoxCommit, this)); mChatBox->setKeystrokeCallback(&onChatBoxKeystroke, this); mChatBox->setFocusLostCallback(boost::bind(&onChatBoxFocusLost, _1, this)); -- cgit v1.2.3 From 34e7226ac88e14d4cfed6bc0d63da215afe0ac88 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 15 May 2012 13:13:44 +0200 Subject: STORM-276 FIXED Squiggles overflow line editor height when font size is set to large - Also reduced squiggle width from 6 to 4 and prevented running past the end of a word --- indra/llrender/llfontgl.cpp | 10 ++++++++++ indra/llrender/llfontgl.h | 2 ++ indra/llui/lllineeditor.cpp | 15 +++++++++++---- indra/llui/lltextbase.cpp | 11 +++++++---- 4 files changed, 30 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index fccbf37a8d..4dc2fcd714 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -422,6 +422,16 @@ S32 LLFontGL::renderUTF8(const std::string &text, S32 begin_offset, S32 x, S32 y } // font metrics - override for LLFontFreetype that returns units of virtual pixels +F32 LLFontGL::getAscenderHeight() const +{ + return mFontFreetype->getAscenderHeight() / sScaleY; +} + +F32 LLFontGL::getDescenderHeight() const +{ + return mFontFreetype->getDescenderHeight() / sScaleY; +} + S32 LLFontGL::getLineHeight() const { return llceil(mFontFreetype->getAscenderHeight() / sScaleY) + llceil(mFontFreetype->getDescenderHeight() / sScaleY); diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index 74bdbb43e7..5ed5d2c4eb 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -115,6 +115,8 @@ public: S32 renderUTF8(const std::string &text, S32 begin_offset, S32 x, S32 y, const LLColor4 &color, HAlign halign, VAlign valign, U8 style = NORMAL, ShadowType shadow = NO_SHADOW) const; // font metrics - override for LLFontFreetype that returns units of virtual pixels + F32 getAscenderHeight() const; + F32 getDescenderHeight() const; S32 getLineHeight() const; S32 getWidth(const std::string& utf8text) const; diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index f119b0d9bc..d87b9d930c 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -1727,6 +1727,10 @@ void LLLineEditor::draw() background.stretch( -mBorderThickness ); S32 lineeditor_v_pad = (background.getHeight() - mGLFont->getLineHeight()) / 2; + if (mSpellCheck) + { + lineeditor_v_pad += 1; + } drawBackground(); @@ -1945,12 +1949,15 @@ void LLLineEditor::draw() if (pxEnd > pxWidth) pxEnd = pxWidth; + S32 pxBottom = (S32)(text_bottom + mGLFont->getDescenderHeight()); + gGL.color4ub(255, 0, 0, 200); - while (pxStart < pxEnd) + while (pxStart + 1 < pxEnd) { - gl_line_2d(pxStart, (S32)text_bottom - 2, pxStart + 3, (S32)text_bottom + 1); - gl_line_2d(pxStart + 3, (S32)text_bottom + 1, pxStart + 6, (S32)text_bottom - 2); - pxStart += 6; + gl_line_2d(pxStart, pxBottom, pxStart + 2, pxBottom - 2); + if (pxStart + 3 < pxEnd) + gl_line_2d(pxStart + 2, pxBottom - 3, pxStart + 4, pxBottom - 1); + pxStart += 4; } } } diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 990c442b73..4db1efdd20 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -688,12 +688,15 @@ void LLTextBase::drawText() squiggle_start += squiggle_end / 2 - pony * 3; squiggle_end = squiggle_start + pony * 6; + S32 squiggle_bottom = text_rect.mBottom + (S32)cur_segment->getStyle()->getFont()->getDescenderHeight(); + gGL.color4ub(255, 0, 0, 200); - while (squiggle_start < squiggle_end) + while (squiggle_start + 1 < squiggle_end) { - gl_line_2d(squiggle_start, text_rect.mBottom - 2, squiggle_start + 3, text_rect.mBottom + 1); - gl_line_2d(squiggle_start + 3, text_rect.mBottom + 1, squiggle_start + 6, text_rect.mBottom - 2); - squiggle_start += 6; + gl_line_2d(squiggle_start, squiggle_bottom, squiggle_start + 2, squiggle_bottom - 2); + if (squiggle_start + 3 < squiggle_end) + gl_line_2d(squiggle_start + 2, squiggle_bottom - 3, squiggle_start + 4, squiggle_bottom - 1); + squiggle_start += 4; } if (misspell_it->second > seg_end) -- cgit v1.2.3 From 8199cc997aeaccc72b5bd5389ded8afc7b9c379c Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 15 May 2012 14:09:13 +0200 Subject: STORM-276 FIXED Right-to-left line editor selection becomes invisible if the cursor moves --- indra/llui/lllineeditor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index d87b9d930c..83527ae5ad 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -1805,14 +1805,14 @@ void LLLineEditor::draw() { S32 select_left; S32 select_right; - if( mSelectionStart < getCursor() ) + if (mSelectionStart < mSelectionEnd) { select_left = mSelectionStart; - select_right = getCursor(); + select_right = mSelectionEnd; } else { - select_left = getCursor(); + select_left = mSelectionEnd; select_right = mSelectionStart; } -- cgit v1.2.3 From 04ab2cf43b5341900737f0d480bce0b8205add8e Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 23 May 2012 21:30:13 -0400 Subject: storm-1738: restructure code, preferences storage, preferences ui; ui not completely tested --- .../newview/app_settings/settings_autoreplace.xml | 16673 +++++++++---------- indra/newview/llautoreplace.cpp | 711 +- indra/newview/llautoreplace.h | 220 +- indra/newview/llfloaterautoreplacesettings.cpp | 686 +- indra/newview/llfloaterautoreplacesettings.h | 85 +- .../skins/default/xui/en/floater_autoreplace.xml | 334 +- .../newview/skins/default/xui/en/notifications.xml | 57 + .../default/xui/en/panel_preferences_chat.xml | 2 +- 8 files changed, 9829 insertions(+), 8939 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings_autoreplace.xml b/indra/newview/app_settings/settings_autoreplace.xml index 790cd62a02..09d19f7b04 100644 --- a/indra/newview/app_settings/settings_autoreplace.xml +++ b/indra/newview/app_settings/settings_autoreplace.xml @@ -1,8351 +1,8330 @@ + - Custom - - data - - enabled - 1 - priority - 10 - - Abbreviations - - data - - afaic - As far as I am concerned - afaik - As far as I know - afk - (Away from Keyboard) - atm - at the moment - bbiab - (Be back in a bit) - bbl - (Be back later) - brb - (Be Right Back) - btw - By the way - fyi - For your information - fwiw - For what its worth - gtg - (Got to go) - idk - I don't know - iirc - If I recall correctly - imho - in my humble opinion - imo - in my opinion - irl - in real life - lol - (Laughing out Loud) - nm - Not much - np - No problem - nsfw - not safe for work - nvm - Nevermind - rofl - (Rolling on Floor Laughing) - tc - Take care - thx - Thanks - ttfn - Ta Ta for now - ttyl - Talk to you later - ty - Thank you - tyvm - Thank you very much - wb - Welcome back - yw - You're Welcome - yvw - You're very welcome - - enabled - 1 - priority - 4 - - Spelling Corrections - - data - - Amercia - America - Bernouilli - Bernoulli - Blitzkreig - Blitzkrieg - Bonnano - Bonanno - Brasillian - Brazilian - Britian - Britain - Brittish - British - Buddah - Buddha - Buddist - Buddhist - Cambrige - Cambridge - Capetown - Cape Town - Carmalite - Carmelite - Carnagie - Carnegie - Carnagie-Mellon - Carnegie-Mellon - Carnigie - Carnegie - Carnigie-Mellon - Carnegie-Mellon - Carribbean - Caribbean - Carribean - Caribbean - Carthagian - Carthaginian - Cataline - Catiline - Ceasar - Caesar - Celcius - Celsius - Champange - Champagne - Cincinatti - Cincinnati - Cincinnatti - Cincinnati - Conneticut - Connecticut - Dardenelles - Dardanelles - Dravadian - Dravidian - Enlish - English - Europian - European - Europians - Europeans - Eurpean - European - Eurpoean - European - Farenheit - Fahrenheit - Febuary - February - Feburary - February - Flemmish - Flemish - Formalhaut - Fomalhaut - Foundland - Newfoundland - Fransiscan - Franciscan - Fransiscans - Franciscans - Galations - Galatians - Gameboy - Game Boy - Ghandi - Gandhi - Godounov - Godunov - Gothenberg - Gothenburg - Gottleib - Gottlieb - Guaduloupe - Guadalupe - Guadulupe - Guadalupe - Guatamala - Guatemala - Guatamalan - Guatemalan - Guilia - Giulia - Guilio - Giulio - Guiness - Guinness - Guiseppe - Giuseppe - Habsbourg - Habsburg - Hallowean - Halloween - Heidelburg - Heidelberg - Ihaca - Ithaca - Israelies - Israelis - Janurary - January - Januray - January - Japanes - Japanese - Johanine - Johannine - Jospeh - Joseph - Juadaism - Judaism - Juadism - Judaism - Lybia - Libya - Malcom - Malcolm - Massachussets - Massachusetts - Massachussetts - Massachusetts - Mediteranean - Mediterranean - Michagan - Michigan - Misouri - Missouri - Missisipi - Mississippi - Missisippi - Mississippi - Monserrat - Montserrat - Montnana - Montana - Morisette - Morissette - Morrisette - Morissette - Mythraic - Mithraic - Naploeon - Napoleon - Napolean - Napoleon - Napoleonian - Napoleonic - Nazereth - Nazareth - Newyorker - New Yorker - Novermber - November - Nullabour - Nullarbor - Nuremburg - Nuremberg - Palistian - Palestinian - Palistinian - Palestinian - Palistinians - Palestinians - Papanicalou - Papanicolaou - Peloponnes - Peloponnesus - Pennyslvania - Pennsylvania - Pharoah - Pharaoh - Philipines - Philippines - Phillipine - Philippine - Phillipines - Philippines - Phillippines - Philippines - Phonecian - Phoenecian - Portugese - Portuguese - Postdam - Potsdam - Premonasterians - Premonstratensians - Pucini - Puccini - Puertorrican - Puerto Rican - Puertorricans - Puerto Ricans - Queenland - Queensland - Rockerfeller - Rockefeller - Russion - Russian - Sanhedrim - Sanhedrin - Saterday - Saturday - Saterdays - Saturdays - Sionist - Zionist - Sionists - Zionists - Sixtin - Sistine - Skagerak - Skagerrak - Tolkein - Tolkien - Tuscon - Tucson - Ukranian - Ukrainian - UnitesStates - UnitedStates - Yementite - Yemenite - abandonned - abandoned - aberation - aberration - abilties - abilities - abilty - ability - abondon - abandon - abondoned - abandoned - abondoning - abandoning - abondons - abandons - aborigene - aborigine - abortificant - abortifacient - abreviate - abbreviate - abreviated - abbreviated - abreviation - abbreviation - abritrary - arbitrary - absail - abseil - absailing - abseiling - absense - absence - absolutly - absolutely - absorbsion - absorption - absorbtion - absorption - abundacies - abundances - abundancies - abundances - abundunt - abundant - abutts - abuts - acadamy - academy - acadmic - academic - accademic - academic - accademy - academy - acccused - accused - accelleration - acceleration - accension - ascension - acceptence - acceptance - acceptible - acceptable - accessable - accessible - accidentaly - accidentally - accidently - accidentally - acclimitization - acclimatization - accomadate - accommodate - accomadated - accommodated - accomadates - accommodates - accomadating - accommodating - accomadation - accommodation - accomadations - accommodations - accomdate - accommodate - accomodate - accommodate - accomodated - accommodated - accomodates - accommodates - accomodating - accommodating - accomodation - accommodation - accomodations - accommodations - accompanyed - accompanied - accordeon - accordion - accordian - accordion - accoring - according - accoustic - acoustic - accquainted - acquainted - accrediation - accreditation - accredidation - accreditation - accross - across - accussed - accused - acedemic - academic - acheive - achieve - acheived - achieved - acheivement - achievement - acheivements - achievements - acheives - achieves - acheiving - achieving - acheivment - achievement - acheivments - achievements - achievment - achievement - achievments - achievements - achivement - achievement - achivements - achievements - acknowldeged - acknowledged - acknowledgeing - acknowledging - ackward - awkward - acommodate - accommodate - acomplish - accomplish - acomplished - accomplished - acomplishment - accomplishment - acomplishments - accomplishments - acording - according - acordingly - accordingly - acquaintence - acquaintance - acquaintences - acquaintances - acquiantence - acquaintance - acquiantences - acquaintances - acquited - acquitted - activites - activities - activly - actively - actualy - actually - acuracy - accuracy - acused - accused - acustom - accustom - acustommed - accustomed - adavanced - advanced - adbandon - abandon - additinally - additionally - additionaly - additionally - additonal - additional - additonally - additionally - addmission - admission - addopt - adopt - addopted - adopted - addoptive - adoptive - addres - address - addresable - addressable - addresed - addressed - addresing - addressing - addressess - addresses - addtion - addition - addtional - additional - adecuate - adequate - adequit - adequate - adhearing - adhering - adherance - adherence - admendment - amendment - admininistrative - administrative - adminstered - administered - adminstrate - administrate - adminstration - administration - adminstrative - administrative - adminstrator - administrator - admissability - admissibility - admissable - admissible - admited - admitted - admitedly - admittedly - adn - and - adolecent - adolescent - adquire - acquire - adquired - acquired - adquires - acquires - adquiring - acquiring - adres - address - adresable - addressable - adresing - addressing - adress - address - adressable - addressable - adressed - addressed - adressing - addressing - adventrous - adventurous - advertisment - advertisement - advertisments - advertisements - advesary - adversary - adviced - advised - aeriel - aerial - aeriels - aerials - afair - affair - afficianados - aficionados - afficionado - aficionado - afficionados - aficionados - affilate - affiliate - affilliate - affiliate - affort - afford - aforememtioned - aforementioned - againnst - against - agains - against - agaisnt - against - aganist - against - aggaravates - aggravates - aggreed - agreed - aggreement - agreement - aggregious - egregious - aggresive - aggressive - agian - again - agianst - against - agin - again - agina - again - aginst - against - agravate - aggravate - agre - agree - agred - agreed - agreeement - agreement - agreemnt - agreement - agregate - aggregate - agregates - aggregates - agreing - agreeing - agression - aggression - agressive - aggressive - agressively - aggressively - agressor - aggressor - agricuture - agriculture - agrieved - aggrieved - ahev - have - ahppen - happen - ahve - have - aicraft - aircraft - aiport - airport - airbourne - airborne - aircaft - aircraft - aircrafts - aircraft - airporta - airports - airrcraft - aircraft - aisian - asian - albiet - albeit - alchohol - alcohol - alchoholic - alcoholic - alchol - alcohol - alcholic - alcoholic - alcohal - alcohol - alcoholical - alcoholic - aledge - allege - aledged - alleged - aledges - alleges - alege - allege - aleged - alleged - alegience - allegiance - algebraical - algebraic - algorhitms - algorithms - algoritm - algorithm - algoritms - algorithms - alientating - alienating - alledge - allege - alledged - alleged - alledgedly - allegedly - alledges - alleges - allegedely - allegedly - allegedy - allegedly - allegely - allegedly - allegence - allegiance - allegience - allegiance - allign - align - alligned - aligned - alliviate - alleviate - allopone - allophone - allopones - allophones - allready - already - allthough - although - alltime - all-time - alltogether - altogether - almsot - almost - alochol - alcohol - alomst - almost - alot - a lot - alotted - allotted - alowed - allowed - alowing - allowing - alreayd - already - alse - else - alsot - also - alternitives - alternatives - altho - although - althought - although - altough - although - alusion - allusion - alwasy - always - alwyas - always - amalgomated - amalgamated - amatuer - amateur - amature - armature - amendmant - amendment - amerliorate - ameliorate - amke - make - amking - making - ammend - amend - ammended - amended - ammendment - amendment - ammendments - amendments - ammount - amount - ammused - amused - amoung - among - amoungst - amongst - amung - among - amunition - ammunition - analagous - analogous - analitic - analytic - analogeous - analogous - anarchim - anarchism - anarchistm - anarchism - anbd - and - ancestory - ancestry - ancilliary - ancillary - androgenous - androgynous - androgeny - androgyny - anihilation - annihilation - aniversary - anniversary - annoint - anoint - annointed - anointed - annointing - anointing - annoints - anoints - annouced - announced - annualy - annually - annuled - annulled - anohter - another - anomolies - anomalies - anomolous - anomalous - anomoly - anomaly - anonimity - anonymity - anounced - announced - anouncement - announcement - ansalisation - nasalisation - ansalization - nasalization - ansestors - ancestors - antartic - antarctic - anthromorphization - anthropomorphization - anthropolgist - anthropologist - anthropolgy - anthropology - anual - annual - anulled - annulled - anwsered - answered - anyhwere - anywhere - anyother - any other - anytying - anything - aparent - apparent - aparment - apartment - apenines - apennines - aplication - application - aplied - applied - apolegetics - apologetics - apon - apron - apparant - apparent - apparantly - apparently - appart - apart - appartment - apartment - appartments - apartments - appealling - appealing - appeareance - appearance - appearence - appearance - appearences - appearances - apperance - appearance - apperances - appearances - appereance - appearance - appereances - appearances - applicaiton - application - applicaitons - applications - appologies - apologies - appology - apology - apprearance - appearance - apprieciate - appreciate - approachs - approaches - appropiate - appropriate - appropraite - appropriate - appropropiate - appropriate - approproximate - approximate - approxamately - approximately - approxiately - approximately - approximitely - approximately - aprehensive - apprehensive - apropriate - appropriate - aproximate - approximate - aproximately - approximately - aquaduct - aqueduct - aquaintance - acquaintance - aquainted - acquainted - aquiantance - acquaintance - aquire - acquire - aquired - acquired - aquiring - acquiring - aquisition - acquisition - aquitted - acquitted - aranged - arranged - arangement - arrangement - arbitarily - arbitrarily - arbitary - arbitrary - archaelogists - archaeologists - archaelogy - archaeology - archaoelogy - archaeology - archaology - archaeology - archeaologist - archaeologist - archeaologists - archaeologists - archetect - architect - archetects - architects - archetectural - architectural - archetecturally - architecturally - archetecture - architecture - archiac - archaic - archictect - architect - archimedian - archimedean - architecht - architect - architechturally - architecturally - architechture - architecture - architechtures - architectures - architectual - architectural - archtype - archetype - archtypes - archetypes - aready - already - areodynamics - aerodynamics - argubly - arguably - arguement - argument - arguements - arguments - arised - arose - arival - arrival - armamant - armament - armistace - armistice - arogant - arrogant - arogent - arrogant - aroud - around - arrangment - arrangement - arrangments - arrangements - arround - around - artical - article - artice - article - articel - article - artifical - artificial - artifically - artificially - artillary - artillery - arund - around - asetic - ascetic - asfar - as far - asign - assign - aslo - also - asociated - associated - asorbed - absorbed - asphyxation - asphyxiation - assasin - assassin - assasinate - assassinate - assasinated - assassinated - assasinates - assassinates - assasination - assassination - assasinations - assassinations - assasined - assassinated - assasins - assassins - assassintation - assassination - assemple - assemble - assertation - assertion - asside - aside - assisnate - assassinate - assit - assist - assitant - assistant - assocation - association - assoicate - associate - assoicated - associated - assoicates - associates - assosication - assassination - asssassans - assassins - assualt - assault - assualted - assaulted - assymetric - asymmetric - assymetrical - asymmetrical - asteriod - asteroid - asthetic - aesthetic - asthetical - aesthetical - asthetically - aesthetically - asume - assume - aswell - as well - atain - attain - atempting - attempting - atheistical - atheistic - athenean - athenian - atheneans - athenians - athiesm - atheism - athiest - atheist - atorney - attorney - atribute - attribute - atributed - attributed - atributes - attributes - attaindre - attainder - attemp - attempt - attemped - attempted - attemt - attempt - attemted - attempted - attemting - attempting - attemts - attempts - attendence - attendance - attendent - attendant - attendents - attendants - attened - attended - attension - attention - attitide - attitude - attributred - attributed - attrocities - atrocities - audeince - audience - auromated - automated - austrailia - Australia - austrailian - Australian - auther - author - authobiographic - autobiographic - authobiography - autobiography - authorative - authoritative - authorites - authorities - authorithy - authority - authoritiers - authorities - authoritive - authoritative - authrorities - authorities - autochtonous - autochthonous - autoctonous - autochthonous - automaticly - automatically - automibile - automobile - automonomous - autonomous - autor - author - autority - authority - auxilary - auxiliary - auxillaries - auxiliaries - auxillary - auxiliary - auxilliaries - auxiliaries - auxilliary - auxiliary - availabe - available - availablity - availability - availaible - available - availble - available - availiable - available - availible - available - avalable - available - avalance - avalanche - avaliable - available - avation - aviation - avengence - a vengeance - averageed - averaged - avilable - available - awared - awarded - awya - away - baceause - because - backgorund - background - backrounds - backgrounds - bakc - back - banannas - bananas - bandwith - bandwidth - bankrupcy - bankruptcy - banruptcy - bankruptcy - baout - about - basicaly - basically - basicly - basically - bcak - back - beachead - beachhead - beacuse - because - beastiality - bestiality - beatiful - beautiful - beaurocracy - bureaucracy - beaurocratic - bureaucratic - beautyfull - beautiful - becamae - became - becames - becomes - becasue - because - beccause - because - becomeing - becoming - becomming - becoming - becouse - because - becuase - because - bedore - before - befoer - before - beggin - begin - begginer - beginner - begginers - beginners - beggining - beginning - begginings - beginnings - beggins - begins - begining - beginning - beginnig - beginning - behavour - behavior - beleagured - beleaguered - beleif - belief - beleive - believe - beleived - believed - beleives - believes - beleiving - believing - beligum - belgium - belive - believe - belived - believed - belives - believes - belligerant - belligerent - bellweather - bellwether - bemusemnt - bemusement - beneficary - beneficiary - beng - being - benificial - beneficial - benifit - benefit - benifits - benefits - bergamont - bergamot - beseige - besiege - beseiged - besieged - beseiging - besieging - betwen - between - beween - between - bewteen - between - bilateraly - bilaterally - billingualism - bilingualism - binominal - binomial - bizzare - bizarre - blaim - blame - blaimed - blamed - blessure - blessing - bodydbuilder - bodybuilder - bombardement - bombardment - bombarment - bombardment - bondary - boundary - borke - broke - boundry - boundary - bouyancy - buoyancy - bouyant - buoyant - boyant - buoyant - breakthough - breakthrough - breakthroughts - breakthroughs - breif - brief - breifly - briefly - brethen - brethren - bretheren - brethren - briliant - brilliant - brillant - brilliant - brimestone - brimstone - broacasted - broadcast - broadacasting - broadcasting - broady - broadly - buisness - business - buisnessman - businessman - buoancy - buoyancy - burried - buried - busineses - businesses - busness - business - bussiness - business - caculater - calculator - cacuses - caucuses - cahracters - characters - calaber - caliber - calculater - calculator - calculs - calculus - calenders - calendars - caligraphy - calligraphy - caluclate - calculate - caluclated - calculated - caluculate - calculate - caluculated - calculated - calulate - calculate - calulated - calculated - calulater - calculator - camoflage - camouflage - campain - campaign - campains - campaigns - candadate - candidate - candiate - candidate - candidiate - candidate - cannister - canister - cannisters - canisters - cannnot - cannot - cannonical - canonical - cannotation - connotation - cannotations - connotations - cant - can't - caost - coast - caperbility - capability - capible - capable - captial - capital - captued - captured - capturd - captured - carachter - character - caracterized - characterized - carcas - carcass - carefull - careful - careing - caring - carismatic - charismatic - carnege - carnage - carnige - carnage - carniverous - carnivorous - carreer - career - carrers - careers - cartdridge - cartridge - carthographer - cartographer - cartilege - cartilage - cartilidge - cartilage - cartrige - cartridge - casette - cassette - casion - caisson - cassawory - cassowary - cassowarry - cassowary - casulaties - casualties - casulaty - casualty - catagories - categories - catagorized - categorized - catagory - category - catapillar - caterpillar - catapillars - caterpillars - catapiller - caterpillar - catapillers - caterpillars - catepillar - caterpillar - catepillars - caterpillars - catergorize - categorize - catergorized - categorized - caterpilar - caterpillar - caterpilars - caterpillars - caterpiller - caterpillar - caterpillers - caterpillars - cathlic - catholic - catholocism - catholicism - catterpilar - caterpillar - catterpilars - caterpillars - catterpillar - caterpillar - catterpillars - caterpillars - cattleship - battleship - causalities - casualties - cellpading - cellpadding - cementary - cemetery - cemetarey - cemetery - cemetaries - cemeteries - cemetary - cemetery - cencus - census - censur - censor - cententenial - centennial - centruies - centuries - centruy - century - ceratin - certain - cerimonial - ceremonial - cerimonies - ceremonies - cerimonious - ceremonious - cerimony - ceremony - ceromony - ceremony - certainity - certainty - certian - certain - chalenging - challenging - challange - challenge - challanged - challenged - challege - challenge - changable - changeable - charachter - character - charachters - characters - charactersistic - characteristic - charactor - character - charactors - characters - charasmatic - charismatic - charaterized - characterized - chariman - chairman - charistics - characteristics - cheif - chief - cheifs - chiefs - chemcial - chemical - chemcially - chemically - chemestry - chemistry - chemicaly - chemically - childbird - childbirth - childen - children - choosen - chosen - chracter - character - chuch - church - churchs - churches - circulaton - circulation - circumsicion - circumcision - circut - circuit - ciricuit - circuit - ciriculum - curriculum - civillian - civilian - claer - clear - claerer - clearer - claerly - clearly - claimes - claims - clas - class - clasic - classic - clasical - classical - clasically - classically - cleareance - clearance - clera - clear - clincial - clinical - clinicaly - clinically - cmo - com - cmoputer - computer - co-incided - coincided - coctail - cocktail - coform - conform - cognizent - cognizant - coincedentally - coincidentally - colaborations - collaborations - colateral - collateral - colelctive - collective - collaberative - collaborative - collecton - collection - collegue - colleague - collegues - colleagues - collonade - colonnade - collonies - colonies - collony - colony - collosal - colossal - colonizators - colonizers - comander - commander - comando - commando - comandos - commandos - comany - company - comapany - company - comback - comeback - combanations - combinations - combinatins - combinations - combusion - combustion - comdemnation - condemnation - comemmorates - commemorates - comemoretion - commemoration - comision - commission - comisioned - commissioned - comisioner - commissioner - comisioning - commissioning - comisions - commissions - comission - commission - comissioned - commissioned - comissioner - commissioner - comissioning - commissioning - comissions - commissions - comited - committed - comiting - committing - comitted - committed - comittee - committee - comitting - committing - commandoes - commandos - commedic - comedic - commemerative - commemorative - commemmorate - commemorate - commemmorating - commemorating - commerical - commercial - commerically - commercially - commericial - commercial - commericially - commercially - commerorative - commemorative - comming - coming - comminication - communication - commision - commission - commisioned - commissioned - commisioner - commissioner - commisioning - commissioning - commisions - commissions - commited - committed - commitee - committee - commiting - committing - committe - committee - committment - commitment - committments - commitments - commmemorated - commemorated - commongly - commonly - commonweath - commonwealth - commuications - communications - commuinications - communications - communciation - communication - communiation - communication - communites - communities - compability - compatibility - comparision - comparison - comparisions - comparisons - comparitive - comparative - comparitively - comparatively - compatabilities - compatibilities - compatability - compatibility - compatable - compatible - compatablities - compatibilities - compatablity - compatibility - compatiable - compatible - compatiblities - compatibilities - compatiblity - compatibility - compeitions - competitions - compensantion - compensation - competance - competence - competant - competent - competative - competitive - competion - competition - competitiion - competition - competive - competitive - competiveness - competitiveness - comphrehensive - comprehensive - compitent - competent - completedthe - completed the - completelyl - completely - completetion - completion - complier - compiler - componant - component - comprable - comparable - comprimise - compromise - compulsary - compulsory - compulsery - compulsory - computarized - computerized - concensus - consensus - concider - consider - concidered - considered - concidering - considering - conciders - considers - concieted - conceited - concieved - conceived - concious - conscious - conciously - consciously - conciousness - consciousness - condamned - condemned - condemmed - condemned - condidtion - condition - condidtions - conditions - conditionsof - conditions of - conected - connected - conection - connection - conesencus - consensus - confidental - confidential - confidentally - confidentially - confids - confides - configureable - configurable - confortable - comfortable - congradulations - congratulations - congresional - congressional - conived - connived - conjecutre - conjecture - conjuction - conjunction - conotations - connotations - conquerd - conquered - conquerer - conqueror - conquerers - conquerors - conqured - conquered - conscent - consent - consciouness - consciousness - consdider - consider - consdidered - considered - consdiered - considered - consectutive - consecutive - consenquently - consequently - consentrate - concentrate - consentrated - concentrated - consentrates - concentrates - consept - concept - consequentually - consequently - consequeseces - consequences - consern - concern - conserned - concerned - conserning - concerning - conservitive - conservative - consiciousness - consciousness - consicousness - consciousness - considerd - considered - consideres - considered - consious - conscious - consistant - consistent - consistantly - consistently - consituencies - constituencies - consituency - constituency - consituted - constituted - consitution - constitution - consitutional - constitutional - consolodate - consolidate - consolodated - consolidated - consonent - consonant - consonents - consonants - consorcium - consortium - conspiracys - conspiracies - conspiriator - conspirator - constaints - constraints - constanly - constantly - constarnation - consternation - constatn - constant - constinually - continually - constituant - constituent - constituants - constituents - constituion - constitution - constituional - constitutional - consttruction - construction - constuction - construction - consulant - consultant - consumate - consummate - consumated - consummated - contaiminate - contaminate - containes - contains - contamporaries - contemporaries - contamporary - contemporary - contempoary - contemporary - contemporaneus - contemporaneous - contempory - contemporary - contendor - contender - contibute - contribute - contibuted - contributed - contibutes - contributes - contigent - contingent - contined - continued - continous - continuous - continously - continuously - continueing - continuing - contravercial - controversial - contraversy - controversy - contributer - contributor - contributers - contributors - contritutions - contributions - controled - controlled - controling - controlling - controll - control - controlls - controls - controvercial - controversial - controvercy - controversy - controveries - controversies - controversal - controversial - controversey - controversy - controvertial - controversial - controvery - controversy - contruction - construction - conveinent - convenient - convenant - covenant - convential - conventional - convertables - convertibles - convertion - conversion - conveyer - conveyor - conviced - convinced - convienient - convenient - coordiantion - coordination - coorperations - corporations - copmetitors - competitors - coputer - computer - copywrite - copyright - coridal - cordial - cornmitted - committed - corosion - corrosion - corparate - corporate - corperations - corporations - correcters - correctors - correponding - corresponding - correposding - corresponding - correspondant - correspondent - correspondants - correspondents - corridoors - corridors - corrispond - correspond - corrispondant - correspondent - corrispondants - correspondents - corrisponded - corresponded - corrisponding - corresponding - corrisponds - corresponds - costitution - constitution - coucil - council - counries - countries - countains - contains - countires - countries - coururier - courier - coverted - converted - cpoy - copy - creaeted - created - creedence - credence - critereon - criterion - criterias - criteria - criticists - critics - critising - criticising - critisising - criticising - critisism - criticism - critisisms - criticisms - critisize - criticise - critisized - criticised - critisizes - criticises - critisizing - criticising - critized - criticized - critizing - criticizing - crockodiles - crocodiles - crowm - crown - crtical - critical - crticised - criticised - crucifiction - crucifixion - crusies - cruises - crystalisation - crystallisation - culiminating - culminating - cumulatative - cumulative - curch - church - curcuit - circuit - currenly - currently - curriculem - curriculum - cxan - cyan - cyclinder - cylinder - dacquiri - daiquiri - dael - deal - dalmation - dalmatian - damenor - demeanor - dammage - damage - daugher - daughter - debateable - debatable - decendant - descendant - decendants - descendants - decendent - descendant - decendents - descendants - decideable - decidable - decidely - decidedly - decieved - deceived - decison - decision - decomissioned - decommissioned - decomposit - decompose - decomposited - decomposed - decompositing - decomposing - decomposits - decomposes - decress - decrees - decribe - describe - decribed - described - decribes - describes - decribing - describing - dectect - detect - defendent - defendant - defendents - defendants - deffensively - defensively - deffine - define - deffined - defined - definance - defiance - definate - definite - definately - definitely - definatly - definitely - definetly - definitely - definining - defining - definit - definite - definitly - definitely - definiton - definition - defintion - definition - degrate - degrade - delagates - delegates - delapidated - dilapidated - delerious - delirious - delevopment - development - deliberatly - deliberately - delusionally - delusively - demenor - demeanor - demographical - demographic - demolision - demolition - demorcracy - democracy - demostration - demonstration - denegrating - denigrating - densly - densely - deparment - department - deparmental - departmental - deparments - departments - dependance - dependence - dependancy - dependency - dependant - dependent - deram - dream - deriviated - derived - derivitive - derivative - derogitory - derogatory - descendands - descendants - descibed - described - descision - decision - descisions - decisions - descriibes - describes - descripters - descriptors - descripton - description - desctruction - destruction - descuss - discuss - desgined - designed - deside - decide - desigining - designing - desinations - destinations - desintegrated - disintegrated - desintegration - disintegration - desireable - desirable - desitned - destined - desktiop - desktop - desorder - disorder - desoriented - disoriented - desparate - desperate - despict - depict - despiration - desperation - dessicated - desiccated - dessigned - designed - destablized - destabilized - destory - destroy - detailled - detailed - detatched - detached - deteoriated - deteriorated - deteriate - deteriorate - deterioriating - deteriorating - determinining - determining - detremental - detrimental - devasted - devastated - develope - develop - developement - development - developped - developed - develpment - development - devels - delves - devestated - devastated - devestating - devastating - devide - divide - devided - divided - devistating - devastating - devolopement - development - diablical - diabolical - diamons - diamonds - diaster - disaster - dichtomy - dichotomy - diconnects - disconnects - dicover - discover - dicovered - discovered - dicovering - discovering - dicovers - discovers - dicovery - discovery - dicussed - discussed - didnt - didn't - diea - idea - dieing - dying - dieties - deities - diety - deity - diferent - different - diferrent - different - differentiatiations - differentiations - differnt - different - difficulity - difficulty - diffrent - different - dificulties - difficulties - dificulty - difficulty - dimenions - dimensions - dimention - dimension - dimentional - dimensional - dimentions - dimensions - dimesnional - dimensional - diminuitive - diminutive - dimunitive - diminutive - diosese - diocese - diphtong - diphthong - diphtongs - diphthongs - diplomancy - diplomacy - dipthong - diphthong - dipthongs - diphthongs - dirived - derived - disagreeed - disagreed - disapeared - disappeared - disapointing - disappointing - disappearred - disappeared - disaproval - disapproval - disasterous - disastrous - disatisfaction - dissatisfaction - disatisfied - dissatisfied - disatrous - disastrous - discontentment - discontent - discribe - describe - discribed - described - discribes - describes - discribing - describing - disctinction - distinction - disctinctive - distinctive - disemination - dissemination - disenchanged - disenchanted - disiplined - disciplined - disobediance - disobedience - disobediant - disobedient - disolved - dissolved - disover - discover - dispair - despair - disparingly - disparagingly - dispence - dispense - dispenced - dispensed - dispencing - dispensing - dispicable - despicable - dispite - despite - dispostion - disposition - disproportiate - disproportionate - disputandem - disputandum - disricts - districts - dissagreement - disagreement - dissapear - disappear - dissapearance - disappearance - dissapeared - disappeared - dissapearing - disappearing - dissapears - disappears - dissappear - disappear - dissappears - disappears - dissappointed - disappointed - dissarray - disarray - dissobediance - disobedience - dissobediant - disobedient - dissobedience - disobedience - dissobedient - disobedient - distiction - distinction - distingish - distinguish - distingished - distinguished - distingishes - distinguishes - distingishing - distinguishing - distingquished - distinguished - distrubution - distribution - distruction - destruction - distructive - destructive - ditributed - distributed - diversed - diverged - divice - device - divison - division - divisons - divisions - doccument - document - doccumented - documented - doccuments - documents - docrines - doctrines - doctines - doctrines - documenatry - documentary - doens - does - doesnt - doesn't - doign - doing - dominaton - domination - dominent - dominant - dominiant - dominant - donig - doing - dont - don't - dosen't - doesn't - doub - doubt - doulbe - double - dowloads - downloads - dramtic - dramatic - draughtman - draughtsman - dreasm - dreams - driectly - directly - drnik - drink - druming - drumming - drummless - drumless - dupicate - duplicate - durig - during - durring - during - duting - during - dyas - dryas - eahc - each - ealier - earlier - earlies - earliest - earnt - earned - ecclectic - eclectic - eceonomy - economy - ecidious - deciduous - eclispe - eclipse - ecomonic - economic - ect - etc - eearly - early - efel - evil - effeciency - efficiency - effecient - efficient - effeciently - efficiently - efficency - efficiency - efficent - efficient - efficently - efficiently - efford - effort - effords - efforts - effulence - effluence - eigth - eight - eiter - either - elction - election - electic - electric - electon - electron - electrial - electrical - electricly - electrically - electricty - electricity - elementay - elementary - eleminated - eliminated - eleminating - eliminating - eles - eels - eletricity - electricity - elicided - elicited - eligable - eligible - elimentary - elementary - ellected - elected - elphant - elephant - embarass - embarrass - embarassed - embarrassed - embarassing - embarrassing - embarassment - embarrassment - embargos - embargoes - embarras - embarrass - embarrased - embarrassed - embarrasing - embarrassing - embarrasment - embarrassment - embezelled - embezzled - emblamatic - emblematic - eminate - emanate - eminated - emanated - emision - emission - emited - emitted - emiting - emitting - emition - emission - emmediately - immediately - emmigrated - immigrated - emminently - eminently - emmisaries - emissaries - emmisarries - emissaries - emmisarry - emissary - emmisary - emissary - emmision - emission - emmisions - emissions - emmited - emitted - emmiting - emitting - emmitted - emitted - emmitting - emitting - emnity - enmity - emperical - empirical - emphaised - emphasised - emphsis - emphasis - emphysyma - emphysema - emprisoned - imprisoned - enameld - enameled - enchancement - enhancement - encouraing - encouraging - encryptiion - encryption - encylopedia - encyclopedia - endevors - endeavors - endevour - endeavour - endig - ending - endolithes - endoliths - enduce - induce - ened - need - enflamed - inflamed - enforceing - enforcing - engagment - engagement - engeneer - engineer - engeneering - engineering - engieneer - engineer - engieneers - engineers - enlargment - enlargement - enlargments - enlargements - enourmous - enormous - enourmously - enormously - ensconsed - ensconced - entaglements - entanglements - enteratinment - entertainment - enthusiatic - enthusiastic - entitity - entity - entitlied - entitled - entrepeneur - entrepreneur - entrepeneurs - entrepreneurs - enviorment - environment - enviormental - environmental - enviormentally - environmentally - enviorments - environments - enviornment - environment - enviornmental - environmental - enviornmentalist - environmentalist - enviornmentally - environmentally - enviornments - environments - enviroment - environment - enviromental - environmental - enviromentalist - environmentalist - enviromentally - environmentally - enviroments - environments - envolutionary - evolutionary - envrionments - environments - enxt - next - epidsodes - episodes - epsiode - episode - equialent - equivalent - equilibium - equilibrium - equilibrum - equilibrium - equiped - equipped - equippment - equipment - equitorial - equatorial - equivelant - equivalent - equivelent - equivalent - equivilant - equivalent - equivilent - equivalent - equivlalent - equivalent - erally - really - eratic - erratic - eratically - erratically - eraticly - erratically - errupted - erupted - esential - essential - esitmated - estimated - esle - else - especialy - especially - essencial - essential - essense - essence - essentail - essential - essentialy - essentially - essentual - essential - essesital - essential - estabishes - establishes - establising - establishing - ethnocentricm - ethnocentrism - ethose - those - evenhtually - eventually - eventally - eventually - eventhough - even though - eventially - eventually - eventualy - eventually - everthing - everything - everytime - every time - everyting - everything - eveyr - every - evidentally - evidently - exagerate - exaggerate - exagerated - exaggerated - exagerates - exaggerates - exagerating - exaggerating - exagerrate - exaggerate - exagerrated - exaggerated - exagerrates - exaggerates - exagerrating - exaggerating - examinated - examined - exampt - exempt - exapansion - expansion - excact - exact - excange - exchange - excecute - execute - excecuted - executed - excecutes - executes - excecuting - executing - excecution - execution - excedded - exceeded - excelent - excellent - excell - excel - excellance - excellence - excellant - excellent - excells - excels - excercise - exercise - exchanching - exchanging - excisted - existed - exculsivly - exclusively - execising - exercising - exection - execution - exectued - executed - exeedingly - exceedingly - exelent - excellent - exellent - excellent - exemple - example - exept - except - exeptional - exceptional - exerbate - exacerbate - exerbated - exacerbated - exerciese - exercises - exerpt - excerpt - exerpts - excerpts - exersize - exercise - exerternal - external - exhalted - exalted - exhibtion - exhibition - exibition - exhibition - exibitions - exhibitions - exicting - exciting - exinct - extinct - existance - existence - existant - existent - existince - existence - exliled - exiled - exludes - excludes - exmaple - example - exonorate - exonerate - exoskelaton - exoskeleton - expalin - explain - expatriot - expatriate - expeced - expected - expecially - especially - expeditonary - expeditionary - expeiments - experiments - expell - expel - expells - expels - experiance - experience - experianced - experienced - expiditions - expeditions - expierence - experience - explaination - explanation - explaning - explaining - explictly - explicitly - exploititive - exploitative - explotation - exploitation - expropiated - expropriated - expropiation - expropriation - exressed - expressed - extemely - extremely - extention - extension - extentions - extensions - extered - exerted - extermist - extremist - extint - extinct - extradiction - extradition - extraterrestial - extraterrestrial - extraterrestials - extraterrestrials - extravagent - extravagant - extrememly - extremely - extremeophile - extremophile - extremly - extremely - extrordinarily - extraordinarily - extrordinary - extraordinary - eyar - year - eyars - years - eyasr - years - faciliate - facilitate - faciliated - facilitated - faciliates - facilitates - facilites - facilities - facillitate - facilitate - facinated - fascinated - facist - fascist - familes - families - familliar - familiar - famoust - famous - fanatism - fanaticism - fatc - fact - faught - fought - favoutrable - favourable - feasable - feasible - fedreally - federally - feromone - pheromone - fertily - fertility - fianite - finite - fianlly - finally - ficticious - fictitious - fictious - fictitious - fidn - find - fiercly - fiercely - fightings - fighting - filiament - filament - fimilies - families - finacial - financial - finaly - finally - financialy - financially - firends - friends - firts - first - fisionable - fissionable - flamable - flammable - flawess - flawless - fleed - fled - florescent - fluorescent - flourescent - fluorescent - flourine - fluorine - fluorish - flourish - follwoing - following - folowing - following - fomed - formed - fomr - from - fonetic - phonetic - fontrier - fontier - foootball - football - forbad - forbade - forbiden - forbidden - foreward - foreword - forfiet - forfeit - forhead - forehead - foriegn - foreign - formallize - formalize - formallized - formalized - formaly - formally - formelly - formerly - formidible - formidable - formost - foremost - forsaw - foresaw - forseeable - foreseeable - fortelling - foretelling - forunner - forerunner - foucs - focus - foudn - found - fougth - fought - foundaries - foundries - foundary - foundry - fourties - forties - fourty - forty - fouth - fourth - foward - forward - freind - friend - freindly - friendly - frequentily - frequently - frome - from - fromed - formed - froniter - frontier - fucntion - function - fucntioning - functioning - fufill - fulfill - fufilled - fulfilled - fulfiled - fulfilled - fullfill - fulfill - fullfilled - fulfilled - fundametal - fundamental - fundametals - fundamentals - funguses - fungi - funtion - function - furuther - further - futher - further - futhermore - furthermore - galatic - galactic - gallaxies - galaxies - galvinized - galvanized - ganerate - generate - ganes - games - ganster - gangster - garantee - guarantee - garanteed - guaranteed - garantees - guarantees - garnison - garrison - gaurantee - guarantee - gauranteed - guaranteed - gaurantees - guarantees - gaurd - guard - gaurentee - guarantee - gaurenteed - guaranteed - gaurentees - guarantees - geneological - genealogical - geneologies - genealogies - geneology - genealogy - generaly - generally - generatting - generating - genialia - genitalia - geographicial - geographical - geometrician - geometer - geometricians - geometers - gerat - great - glight - flight - gnawwed - gnawed - godess - goddess - godesses - goddesses - gogin - going - goign - going - gonig - going - gouvener - governor - govement - government - govenment - government - govenrment - government - goverance - governance - goverment - government - govermental - governmental - governer - governor - governmnet - government - govorment - government - govormental - governmental - govornment - government - gracefull - graceful - graet - great - grafitti - graffiti - gramatically - grammatically - grammaticaly - grammatically - grammer - grammar - grat - great - gratuitious - gratuitous - greatful - grateful - greatfully - gratefully - greif - grief - gridles - griddles - gropu - group - grwo - grow - guage - gauge - guarentee - guarantee - guarenteed - guaranteed - guarentees - guarantees - guerilla - guerrilla - guerillas - guerrillas - guerrila - guerrilla - guerrilas - guerrillas - guidence - guidance - gunanine - guanine - gurantee - guarantee - guranteed - guaranteed - gurantees - guarantees - guttaral - guttural - gutteral - guttural - habaeus - habeas - habeus - habeas - haemorrage - haemorrhage - haev - have - halp - help - hapen - happen - hapened - happened - hapening - happening - happend - happened - happended - happened - happenned - happened - harased - harassed - harases - harasses - harasment - harassment - harasments - harassments - harassement - harassment - harras - harass - harrased - harassed - harrases - harasses - harrasing - harassing - harrasment - harassment - harrasments - harassments - harrassed - harassed - harrasses - harassed - harrassing - harassing - harrassment - harassment - harrassments - harassments - hasnt - hasn't - haviest - heaviest - headquarer - headquarter - headquater - headquarter - headquatered - headquartered - headquaters - headquarters - healthercare - healthcare - heared - heard - heathy - healthy - heigher - higher - heirarchy - hierarchy - heiroglyphics - hieroglyphics - helment - helmet - helpfull - helpful - helpped - helped - hemmorhage - hemorrhage - herad - heard - heridity - heredity - heroe - hero - heros - heroes - hertiage - heritage - hertzs - hertz - hesistant - hesitant - heterogenous - heterogeneous - hieght - height - hierachical - hierarchical - hierachies - hierarchies - hierachy - hierarchy - hierarcical - hierarchical - hierarcy - hierarchy - hieroglph - hieroglyph - hieroglphs - hieroglyphs - higer - higher - higest - highest - higway - highway - hillarious - hilarious - himselv - himself - hinderance - hindrance - hinderence - hindrance - hindrence - hindrance - hipopotamus - hippopotamus - hismelf - himself - histocompatability - histocompatibility - historicians - historians - hitsingles - hit singles - holliday - holiday - homestate - home state - homogeneize - homogenize - homogeneized - homogenized - honory - honorary - horrifing - horrifying - hosited - hoisted - hospitible - hospitable - hounour - honour - housr - hours - howver - however - hsitorians - historians - hstory - history - hten - then - htere - there - htey - they - htikn - think - hting - thing - htink - think - htis - this - humer - humor - humerous - humorous - huminoid - humanoid - humoural - humoral - humurous - humorous - husban - husband - hvae - have - hvaing - having - hvea - have - hwihc - which - hwile - while - hwole - whole - hydogen - hydrogen - hydropile - hydrophile - hydropilic - hydrophilic - hydropobe - hydrophobe - hydropobic - hydrophobic - hygeine - hygiene - hypocracy - hypocrisy - hypocrasy - hypocrisy - hypocricy - hypocrisy - hypocrit - hypocrite - hypocrits - hypocrites - i - I - iconclastic - iconoclastic - idaeidae - idea - idaes - ideas - idealogies - ideologies - idealogy - ideology - identicial - identical - identifers - identifiers - ideosyncratic - idiosyncratic - idesa - ideas - idiosyncracy - idiosyncrasy - illegimacy - illegitimacy - illegitmate - illegitimate - illess - illness - illiegal - illegal - illution - illusion - ilness - illness - ilogical - illogical - imagenary - imaginary - imagin - imagine - imaginery - imaginary - imcomplete - incomplete - imediately - immediately - imense - immense - immediatley - immediately - immediatly - immediately - immidately - immediately - immidiately - immediately - immitate - imitate - immitated - imitated - immitating - imitating - immitator - imitator - immunosupressant - immunosuppressant - impecabbly - impeccably - impedence - impedance - implamenting - implementing - impliment - implement - implimented - implemented - imploys - employs - importamt - important - imprioned - imprisoned - imprisonned - imprisoned - improvision - improvisation - improvments - improvements - inablility - inability - inaccessable - inaccessible - inadiquate - inadequate - inadquate - inadequate - inadvertant - inadvertent - inadvertantly - inadvertently - inagurated - inaugurated - inaguration - inauguration - inappropiate - inappropriate - inaugures - inaugurates - inbalance - imbalance - inbalanced - imbalanced - inbetween - between - incarcirated - incarcerated - incidentially - incidentally - incidently - incidentally - inclreased - increased - includ - include - includng - including - incompatabilities - incompatibilities - incompatability - incompatibility - incompatable - incompatible - incompatablities - incompatibilities - incompatablity - incompatibility - incompatiblities - incompatibilities - incompatiblity - incompatibility - incompetance - incompetence - incompetant - incompetent - incomptable - incompatible - incomptetent - incompetent - inconsistant - inconsistent - incoroporated - incorporated - incorperation - incorporation - incorportaed - incorporated - incorprates - incorporates - incorruptable - incorruptible - incramentally - incrementally - increadible - incredible - incredable - incredible - inctroduce - introduce - inctroduced - introduced - incuding - including - incunabla - incunabula - indefinately - indefinitely - indefineable - undefinable - indefinitly - indefinitely - indentical - identical - indepedantly - independently - indepedence - independence - independance - independence - independant - independent - independantly - independently - independece - independence - independendet - independent - indespensable - indispensable - indespensible - indispensable - indictement - indictment - indigineous - indigenous - indipendence - independence - indipendent - independent - indipendently - independently - indispensible - indispensable - indisputible - indisputable - indisputibly - indisputably - indite - indict - individualy - individually - indpendent - independent - indpendently - independently - indulgue - indulge - indutrial - industrial - indviduals - individuals - inefficienty - inefficiently - inevatible - inevitable - inevitible - inevitable - inevititably - inevitably - infalability - infallibility - infallable - infallible - infectuous - infectious - infered - inferred - infilitrate - infiltrate - infilitrated - infiltrated - infilitration - infiltration - infinit - infinite - inflamation - inflammation - influencial - influential - influented - influenced - infomation - information - informtion - information - infrantryman - infantryman - infrigement - infringement - ingenius - ingenious - ingreediants - ingredients - inhabitans - inhabitants - inherantly - inherently - inheritence - inheritance - inital - initial - initally - initially - initation - initiation - initiaitive - initiative - inlcuding - including - inmigrant - immigrant - inmigrants - immigrants - innoculated - inoculated - inocence - innocence - inofficial - unofficial - inot - into - inpeach - impeach - inpolite - impolite - inprisonment - imprisonment - inproving - improving - insectiverous - insectivorous - insensative - insensitive - inseperable - inseparable - insistance - insistence - insitution - institution - insitutions - institutions - inspite - in spite - instade - instead - instatance - instance - institue - institute - instuction - instruction - instuments - instruments - instutionalized - institutionalized - instutions - intuitions - insurence - insurance - intelectual - intellectual - inteligence - intelligence - inteligent - intelligent - intenational - international - intented - intended - intepretation - interpretation - intepretator - interpretor - interational - international - interbread - interbreed - interchangable - interchangeable - interchangably - interchangeably - intercontinetal - intercontinental - intered - interred - interelated - interrelated - interferance - interference - interfereing - interfering - intergrated - integrated - intergration - integration - interm - interim - internation - international - interpet - interpret - interrim - interim - interrugum - interregnum - intertaining - entertaining - interupt - interrupt - intervines - intervenes - intevene - intervene - intial - initial - intially - initially - intrduced - introduced - intrest - interest - introdued - introduced - intruduced - introduced - intrument - instrument - intrumental - instrumental - intruments - instruments - intrusted - entrusted - intutive - intuitive - intutively - intuitively - inudstry - industry - inventer - inventor - invertibrates - invertebrates - investingate - investigate - involvment - involvement - irelevent - irrelevant - iresistable - irresistible - iresistably - irresistibly - iresistible - irresistible - iresistibly - irresistibly - iritable - irritable - iritated - irritated - ironicly - ironically - irregardless - regardless - irrelevent - irrelevant - irreplacable - irreplaceable - irresistable - irresistible - irresistably - irresistibly - isnt - isn't - issueing - issuing - itnroduced - introduced - iunior - junior - iwll - will - iwth - with - jaques - jacques - jeapardy - jeopardy - jewllery - jewellery - jouney - journey - journied - journeyed - journies - journeys - jstu - just - jsut - just - judical - judicial - judisuary - judiciary - juducial - judicial - juristiction - jurisdiction - juristictions - jurisdictions - kindergarden - kindergarten - klenex - kleenex - knifes - knives - knive - knife - knowlege - knowledge - knowlegeable - knowledgeable - knwo - know - knwos - knows - konw - know - konws - knows - kwno - know - labatory - laboratory - labratory - laboratory - laguage - language - laguages - languages - larg - large - largst - largest - larrry - larry - lastr - last - lattitude - latitude - launhed - launched - lavae - larvae - layed - laid - lazyness - laziness - leage - league - leanr - learn - leathal - lethal - lefted - left - legitamate - legitimate - legitmate - legitimate - leibnitz - leibniz - lenght - length - leran - learn - lerans - learns - leutenant - lieutenant - levetate - levitate - levetated - levitated - levetates - levitates - levetating - levitating - levle - level - liasion - liaison - liason - liaison - liasons - liaisons - libary - library - libell - libel - libguistic - linguistic - libguistics - linguistics - libitarianisn - libertarianism - lieing - lying - liek - like - liekd - liked - liesure - leisure - lieuenant - lieutenant - lieved - lived - liftime - lifetime - lightyear - light year - lightyears - light years - likelyhood - likelihood - linnaena - linnaean - lippizaner - lipizzaner - liquify - liquefy - liscense - license - lisence - license - lisense - license - listners - listeners - litature - literature - literaly - literally - literture - literature - littel - little - litterally - literally - liuke - like - livley - lively - lmits - limits - loev - love - lonelyness - loneliness - longitudonal - longitudinal - lonley - lonely - lonly - lonely - loosing - losing - lotharingen - lothringen - lsat - last - lukid - likud - lveo - love - lvoe - love - maching - machine - mackeral - mackerel - magasine - magazine - magincian - magician - magnificient - magnificent - magolia - magnolia - mailny - mainly - maintainance - maintenance - maintainence - maintenance - maintance - maintenance - maintenence - maintenance - maintinaing - maintaining - maintioned - mentioned - majoroty - majority - maked - marked - makse - makes - maltesian - Maltese - mamal - mammal - mamalian - mammalian - managable - manageable - managment - management - maneouvre - manoeuvre - maneouvred - manoeuvred - maneouvres - manoeuvres - maneouvring - manoeuvring - manisfestations - manifestations - manoeuverability - maneuverability - manouver - maneuver - manouverability - maneuverability - manouverable - maneuverable - manouvers - maneuvers - mantained - maintained - manuever - maneuver - manuevers - maneuvers - manufacturedd - manufactured - manufature - manufacture - manufatured - manufactured - manufaturing - manufacturing - manuver - maneuver - mariage - marriage - marjority - majority - markes - marks - marketting - marketing - marmelade - marmalade - marrage - marriage - marraige - marriage - marrtyred - martyred - marryied - married - massmedia - mass media - masterbation - masturbation - mataphysical - metaphysical - materalists - materialist - mathamatics - mathematics - mathematican - mathematician - mathematicas - mathematics - matheticians - mathematicians - mathmatically - mathematically - mathmatician - mathematician - mathmaticians - mathematicians - mccarthyst - mccarthyist - mchanics - mechanics - meaninng - meaning - mear - wear - mechandise - merchandise - medacine - medicine - medeival - medieval - medevial - medieval - mediciney - mediciny - medievel - medieval - mediterainnean - mediterranean - meerkrat - meerkat - melieux - milieux - membranaphone - membranophone - memeber - member - menally - mentally - meranda - Miranda - mercentile - mercantile - messanger - messenger - messenging - messaging - metalic - metallic - metalurgic - metallurgic - metalurgical - metallurgical - metalurgy - metallurgy - metamorphysis - metamorphosis - metaphoricial - metaphorical - meterologist - meteorologist - meterology - meteorology - methaphor - metaphor - methaphors - metaphors - micoscopy - microscopy - midwifes - midwives - mileau - milieu - milennia - millennia - milennium - millennium - mileu - milieu - miliary - military - milion - million - miliraty - military - millenia - millennia - millenial - millennial - millenialism - millennialism - millenium - millennium - millepede - millipede - millioniare - millionaire - millitary - military - millon - million - miltary - military - minature - miniature - minerial - mineral - miniscule - minuscule - ministery - ministry - minstries - ministries - minstry - ministry - minumum - minimum - mirrorred - mirrored - miscelaneous - miscellaneous - miscellanious - miscellaneous - miscellanous - miscellaneous - mischeivous - mischievous - mischevious - mischievous - mischievious - mischievous - misdameanor - misdemeanor - misdameanors - misdemeanors - misdemenor - misdemeanor - misdemenors - misdemeanors - misfourtunes - misfortunes - misile - missile - mispell - misspell - mispelled - misspelled - mispelling - misspelling - missen - mizzen - missle - missile - missonary - missionary - misterious - mysterious - mistery - mystery - misteryous - mysterious - mkae - make - mkaes - makes - mkaing - making - mkea - make - moderm - modem - modle - model - moent - moment - moeny - money - mohammedans - muslims - moil - soil - moleclues - molecules - momento - memento - monestaries - monasteries - monestary - monastery - monickers - monikers - monolite - monolithic - montains - mountains - montanous - mountainous - monts - months - montypic - monotypic - moreso - more so - morgage - mortgage - morroccan - moroccan - morrocco - morocco - morroco - morocco - mortage - mortgage - mosture - moisture - motiviated - motivated - mounth - month - movei - movie - movment - movement - mroe - more - mucuous - mucous - muder - murder - mudering - murdering - muhammadan - muslim - multicultralism - multiculturalism - multipled - multiplied - multiplers - multipliers - munbers - numbers - muncipalities - municipalities - muncipality - municipality - munnicipality - municipality - muscels - muscles - muscial - musical - muscician - musician - muscicians - musicians - mutiliated - mutilated - myraid - myriad - mysef - myself - mysogynist - misogynist - mysogyny - misogyny - mysterous - mysterious - naieve - naive - naturaly - naturally - naturely - naturally - naturual - natural - naturually - naturally - neccesarily - necessarily - neccesary - necessary - neccessarily - necessarily - neccessary - necessary - neccessities - necessities - necesarily - necessarily - necesary - necessary - necessiate - necessitate - neglible - negligible - negligable - negligible - negociate - negotiate - negociation - negotiation - negociations - negotiations - negotation - negotiation - neice - niece - neigborhood - neighborhood - neigbour - neighbour - neigbourhood - neighbourhood - neolitic - neolithic - nessasarily - necessarily - nessecary - necessary - nestin - nesting - neverthless - nevertheless - newletters - newsletters - nickle - nickel - nightfa;; - nightfall - nightime - nighttime - nineth - ninth - ninteenth - nineteenth - ninties - 1990s - ninty - ninety - nkow - know - nkwo - know - nmae - name - noncombatents - noncombatants - nonsence - nonsense - nontheless - nonetheless - noone - no one - norhern - northern - northen - northern - northereastern - northeastern - notabley - notably - noteable - notable - noteably - notably - noteriety - notoriety - noth - north - nothern - northern - noticable - noticeable - noticably - noticeably - noticeing - noticing - noticible - noticeable - notwhithstanding - notwithstanding - noveau - nouveau - nowdays - nowadays - nowe - now - nto - not - nucular - nuclear - nuculear - nuclear - nuisanse - nuisance - numberous - numerous - nusance - nuisance - nutritent - nutrient - nutritents - nutrients - nuturing - nurturing - obediance - obedience - obediant - obedient - obession - obsession - obssessed - obsessed - obstacal - obstacle - obstancles - obstacles - obstruced - obstructed - ocasion - occasion - ocasional - occasional - ocasionally - occasionally - ocasionaly - occasionally - ocasioned - occasioned - ocasions - occasions - ocassion - occasion - ocassional - occasional - ocassionally - occasionally - ocassionaly - occasionally - ocassioned - occasioned - ocassions - occasions - occaison - occasion - occassion - occasion - occassional - occasional - occassionally - occasionally - occassionaly - occasionally - occassioned - occasioned - occassions - occasions - occationally - occasionally - occour - occur - occurance - occurrence - occurances - occurrences - occured - occurred - occurence - occurrence - occurences - occurrences - occuring - occurring - occurr - occur - occurrance - occurrence - occurrances - occurrences - octohedra - octahedra - octohedral - octahedral - octohedron - octahedron - ocuntries - countries - ocuntry - country - ocurr - occur - ocurrance - occurrence - ocurred - occurred - ocurrence - occurrence - offcers - officers - offcially - officially - offereings - offerings - offical - official - offically - officially - officals - officials - officaly - officially - officialy - officially - offred - offered - oftenly - often - oging - going - omision - omission - omited - omitted - omiting - omitting - omlette - omelette - ommision - omission - ommited - omitted - ommiting - omitting - ommitted - omitted - ommitting - omitting - omniverous - omnivorous - omniverously - omnivorously - omre - more - onot - note - onxy - onyx - onyl - only - openess - openness - oponent - opponent - oportunity - opportunity - opose - oppose - oposite - opposite - oposition - opposition - oppenly - openly - oppinion - opinion - opponant - opponent - oppononent - opponent - oppositition - opposition - oppossed - opposed - opprotunity - opportunity - opression - oppression - opressive - oppressive - opthalmic - ophthalmic - opthalmologist - ophthalmologist - opthalmology - ophthalmology - opthamologist - ophthalmologist - optmizations - optimizations - optomism - optimism - orded - ordered - organim - organism - organistion - organisation - organiztion - organization - orgin - origin - orginal - original - orginally - originally - orginize - organise - oridinarily - ordinarily - origanaly - originally - originall - original - originaly - originally - originially - originally - originnally - originally - origional - original - orignally - originally - orignially - originally - otehr - other - oublisher - publisher - ouevre - oeuvre - oustanding - outstanding - overshaddowed - overshadowed - overthere - over there - overwelming - overwhelming - overwheliming - overwhelming - owrk - work - owudl - would - oxigen - oxygen - oximoron - oxymoron - p0enis - penis - paide - paid - paitience - patience - palce - place - paleolitic - paleolithic - paliamentarian - parliamentarian - pallete - palette - pamflet - pamphlet - pamplet - pamphlet - pantomine - pantomime - paralel - parallel - paralell - parallel - paralelly - parallelly - paralely - parallelly - parallely - parallelly - paranthesis - parenthesis - paraphenalia - paraphernalia - parellels - parallels - parituclar - particular - parliment - parliament - parrakeets - parakeets - parralel - parallel - parrallel - parallel - parrallell - parallel - parrallelly - parallelly - parrallely - parallelly - partialy - partially - particually - particularly - particualr - particular - particuarly - particularly - particularily - particularly - particulary - particularly - pary - party - pased - passed - pasengers - passengers - passerbys - passersby - pasttime - pastime - pastural - pastoral - paticular - particular - pattented - patented - pavillion - pavilion - payed - paid - pblisher - publisher - pbulisher - publisher - peacefuland - peaceful and - peageant - pageant - peculure - peculiar - pedestrain - pedestrian - peformed - performed - peice - piece - penatly - penalty - penerator - penetrator - penisula - peninsula - penisular - peninsular - penninsula - peninsula - penninsular - peninsular - pennisula - peninsula - pensinula - peninsula - peom - poem - peoms - poems - peopel - people - peotry - poetry - perade - parade - percepted - perceived - percieve - perceive - percieved - perceived - perenially - perennially - perfomance - performance - perfomers - performers - performence - performance - performes - performed - perhasp - perhaps - perheaps - perhaps - perhpas - perhaps - peripathetic - peripatetic - peristent - persistent - perjery - perjury - perjorative - pejorative - permanant - permanent - permenant - permanent - permenantly - permanently - permissable - permissible - perogative - prerogative - peronal - personal - perosnality - personality - perphas - perhaps - perpindicular - perpendicular - perseverence - perseverance - persistance - persistence - persistant - persistent - personel - personnel - personell - personnel - personnell - personnel - persuded - persuaded - persue - pursue - persued - pursued - persuing - pursuing - persuit - pursuit - persuits - pursuits - pertubation - perturbation - pertubations - perturbations - pessiary - pessary - petetion - petition - phenomenom - phenomenon - phenomenonal - phenomenal - phenomenonly - phenomenally - phenomonenon - phenomenon - phenomonon - phenomenon - phenonmena - phenomena - philisopher - philosopher - philisophical - philosophical - philisophy - philosophy - phillosophically - philosophically - philospher - philosopher - philosphies - philosophies - philosphy - philosophy - phongraph - phonograph - phylosophical - philosophical - physicaly - physically - piblisher - publisher - pich - pitch - pilgrimmage - pilgrimage - pilgrimmages - pilgrimages - pinapple - pineapple - pinnaple - pineapple - pinoneered - pioneered - plagarism - plagiarism - planation - plantation - planed - planned - plantiff - plaintiff - plateu - plateau - plausable - plausible - playright - playwright - playwrite - playwright - playwrites - playwrights - pleasent - pleasant - plebicite - plebiscite - plesant - pleasant - poenis - penis - poeoples - peoples - poety - poetry - poisin - poison - polical - political - polinator - pollinator - polinators - pollinators - politican - politician - politicans - politicians - poltical - political - polute - pollute - poluted - polluted - polutes - pollutes - poluting - polluting - polution - pollution - polyphonyic - polyphonic - polysaccaride - polysaccharide - polysaccharid - polysaccharide - pomegranite - pomegranate - pomotion - promotion - poportional - proportional - popoulation - population - popularaty - popularity - populare - popular - populer - popular - portait - portrait - portayed - portrayed - portraing - portraying - portuguease - portuguese - portugues - Portuguese - posess - possess - posessed - possessed - posesses - possesses - posessing - possessing - posession - possession - posessions - possessions - posion - poison - positon - position - possable - possible - possably - possibly - posseses - possesses - possesing - possessing - possesion - possession - possessess - possesses - possibile - possible - possibilty - possibility - possiblility - possibility - possiblilty - possibility - possiblities - possibilities - possiblity - possibility - possition - position - posthomous - posthumous - postion - position - postive - positive - potatos - potatoes - potrait - portrait - potrayed - portrayed - poulations - populations - poverful - powerful - poweful - powerful - powerfull - powerful - ppublisher - publisher - practial - practical - practially - practically - practicaly - practically - practicioner - practitioner - practicioners - practitioners - practicly - practically - practioner - practitioner - practioners - practitioners - prairy - prairie - prarie - prairie - praries - prairies - pratice - practice - preample - preamble - precedessor - predecessor - preceed - precede - preceeded - preceded - preceeding - preceding - preceeds - precedes - precentage - percentage - precice - precise - precisly - precisely - precurser - precursor - predecesors - predecessors - predicatble - predictable - predicitons - predictions - predomiantly - predominately - prefered - preferred - prefering - preferring - preferrably - preferably - pregancies - pregnancies - preiod - period - preliferation - proliferation - premeire - premiere - premeired - premiered - premillenial - premillennial - preminence - preeminence - premission - permission - preocupation - preoccupation - prepair - prepare - prepartion - preparation - prepatory - preparatory - preperation - preparation - preperations - preparations - preriod - period - presedential - presidential - presense - presence - presidenital - presidential - presidental - presidential - presitgious - prestigious - prespective - perspective - prestigeous - prestigious - prestigous - prestigious - presumabely - presumably - presumibly - presumably - pretection - protection - prevelant - prevalent - preverse - perverse - previvous - previous - pricipal - principal - priciple - principle - priestood - priesthood - primarly - primarily - primative - primitive - primatively - primitively - primatives - primitives - primordal - primordial - priveledges - privileges - privelege - privilege - priveleged - privileged - priveleges - privileges - privelige - privilege - priveliged - privileged - priveliges - privileges - privelleges - privileges - privilage - privilege - priviledge - privilege - priviledges - privileges - privledge - privilege - privte - private - probabilaty - probability - probablistic - probabilistic - probablly - probably - probalibity - probability - probaly - probably - probelm - problem - proccess - process - proccessing - processing - procede - proceed - proceded - proceeded - procedes - proceeds - procedger - procedure - proceding - proceeding - procedings - proceedings - proceedure - procedure - proces - process - processer - processor - proclaimation - proclamation - proclamed - proclaimed - proclaming - proclaiming - proclomation - proclamation - profesion - profession - profesor - professor - professer - professor - proffesed - professed - proffesion - profession - proffesional - professional - proffesor - professor - profilic - prolific - progessed - progressed - programable - programmable - progrom - program - progroms - programs - prohabition - prohibition - prologomena - prolegomena - prominance - prominence - prominant - prominent - prominantly - prominently - prominately - prominently - promiscous - promiscuous - promotted - promoted - pronomial - pronominal - pronouced - pronounced - pronounched - pronounced - pronounciation - pronunciation - proove - prove - prooved - proved - prophacy - prophecy - propietary - proprietary - propmted - prompted - propoganda - propaganda - propogate - propagate - propogates - propagates - propogation - propagation - propostion - proposition - propotions - proportions - propper - proper - propperly - properly - proprietory - proprietary - proseletyzing - proselytizing - protaganist - protagonist - protaganists - protagonists - protocal - protocol - protoganist - protagonist - protrayed - portrayed - protruberance - protuberance - protruberances - protuberances - prouncements - pronouncements - provacative - provocative - provded - provided - provicial - provincial - provinicial - provincial - provisiosn - provision - provisonal - provisional - proximty - proximity - pseudononymous - pseudonymous - pseudonyn - pseudonym - psuedo - pseudo - psycology - psychology - psyhic - psychic - pubilsher - publisher - pubisher - publisher - publiaher - publisher - publically - publicly - publicaly - publicly - publicher - publisher - publihser - publisher - publisehr - publisher - publiser - publisher - publisger - publisher - publisheed - published - publisherr - publisher - publishher - publisher - publishor - publisher - publishre - publisher - publissher - publisher - publlisher - publisher - publsiher - publisher - publusher - publisher - puchasing - purchasing - pulisher - publisher - pumkin - pumpkin - puplisher - publisher - puritannical - puritanical - purposedly - purposely - purpotedly - purportedly - pursuade - persuade - pursuaded - persuaded - pursuades - persuades - pususading - persuading - puting - putting - pwoer - power - pyscic - psychic - qtuie - quiet - quantaty - quantity - quantitiy - quantity - quarantaine - quarantine - questonable - questionable - quicklyu - quickly - quinessential - quintessential - quitted - quit - quizes - quizzes - qutie - quiet - rabinnical - rabbinical - racaus - raucous - radiactive - radioactive - radify - ratify - raelly - really - rarified - rarefied - reaccurring - recurring - reacing - reaching - reacll - recall - readmition - readmission - realitvely - relatively - realsitic - realistic - realtions - relations - realy - really - realyl - really - reasearch - research - rebiulding - rebuilding - rebllions - rebellions - rebounce - rebound - reccomend - recommend - reccomendations - recommendations - reccomended - recommended - reccomending - recommending - reccommend - recommend - reccommended - recommended - reccommending - recommending - reccuring - recurring - receeded - receded - receeding - receding - receivedfrom - received from - recepient - recipient - recepients - recipients - receving - receiving - rechargable - rechargeable - reched - reached - recide - reside - recided - resided - recident - resident - recidents - residents - reciding - residing - reciepents - recipients - reciept - receipt - recieve - receive - recieved - received - reciever - receiver - recievers - receivers - recieves - receives - recieving - receiving - recipiant - recipient - recipiants - recipients - recived - received - recivership - receivership - recogise - recognise - recogize - recognize - recomend - recommend - recomended - recommended - recomending - recommending - recomends - recommends - recommedations - recommendations - reconaissance - reconnaissance - reconcilation - reconciliation - reconized - recognized - reconnaisance - reconnaissance - reconnaissence - reconnaissance - recontructed - reconstructed - recordproducer - record producer - recquired - required - recrational - recreational - recrod - record - recuiting - recruiting - recuring - recurring - recurrance - recurrence - rediculous - ridiculous - reedeming - redeeming - reenforced - reinforced - refect - reflect - refedendum - referendum - referal - referral - referece - reference - refereces - references - refered - referred - referemce - reference - referemces - references - referencs - references - referenece - reference - refereneced - referenced - refereneces - references - referiang - referring - refering - referring - refernce - references - refernces - references - referrence - reference - referrences - references - referrs - refers - reffered - referred - refference - reference - reffering - referring - refrence - reference - refrences - references - refrers - refers - refridgeration - refrigeration - refridgerator - refrigerator - refromist - reformist - refusla - refusal - regardes - regards - regluar - regular - reguarly - regularly - regulaion - regulation - regulaotrs - regulators - regularily - regularly - rehersal - rehearsal - reicarnation - reincarnation - reigining - reigning - reknown - renown - reknowned - renowned - rela - real - relaly - really - relatiopnship - relationship - relativly - relatively - relected - reelected - releive - relieve - releived - relieved - releiver - reliever - releses - releases - relevence - relevance - relevent - relevant - reliablity - reliability - relient - reliant - religeous - religious - religous - religious - religously - religiously - relinqushment - relinquishment - relitavely - relatively - relized - realized - relpacement - replacement - remaing - remaining - remeber - remember - rememberable - memorable - rememberance - remembrance - remembrence - remembrance - remenant - remnant - remenicent - reminiscent - reminent - remnant - reminescent - reminiscent - reminscent - reminiscent - reminsicent - reminiscent - rendevous - rendezvous - rendezous - rendezvous - renedered - rende - renewl - renewal - rennovate - renovate - rennovated - renovated - rennovating - renovating - rennovation - renovation - rentors - renters - reoccurrence - recurrence - reorganision - reorganisation - repatition - repetition - repectively - respectively - repeition - repetition - repentence - repentance - repentent - repentant - repeteadly - repeatedly - repetion - repetition - repid - rapid - reponse - response - reponsible - responsible - reportadly - reportedly - represantative - representative - representive - representative - representives - representatives - reproducable - reproducible - reprtoire - repertoire - repsectively - respectively - reptition - repetition - requirment - requirement - requred - required - resaurant - restaurant - resembelance - resemblance - resembes - resembles - resemblence - resemblance - resevoir - reservoir - residental - residential - resignement - resignment - resistable - resistible - resistence - resistance - resistent - resistant - respectivly - respectively - responce - response - responibilities - responsibilities - responisble - responsible - responnsibilty - responsibility - responsability - responsibility - responsibile - responsible - responsibilites - responsibilities - responsiblities - responsibilities - responsiblity - responsibility - ressemblance - resemblance - ressemble - resemble - ressembled - resembled - ressemblence - resemblance - ressembling - resembling - resssurecting - resurrecting - ressurect - resurrect - ressurected - resurrected - ressurection - resurrection - ressurrection - resurrection - restarant - restaurant - restarants - restaurants - restaraunt - restaurant - restaraunteur - restaurateur - restaraunteurs - restaurateurs - restaraunts - restaurants - restauranteurs - restaurateurs - restauration - restoration - restauraunt - restaurant - resteraunt - restaurant - resteraunts - restaurants - resticted - restricted - restraunt - restraint - resturant - restaurant - resturants - restaurants - resturaunt - restaurant - resturaunts - restaurants - resurecting - resurrecting - retalitated - retaliated - retalitation - retaliation - retreive - retrieve - returnd - returned - revaluated - reevaluated - reveiw - review - reveral - reversal - reversable - reversible - revolutionar - revolutionary - rewitten - rewritten - rewriet - rewrite - rference - reference - rferences - references - rhymme - rhyme - rhythem - rhythm - rhythim - rhythm - rhytmic - rhythmic - rigourous - rigorous - rininging - ringing - rised - rose - rococco - rococo - rocord - record - roomate - roommate - rougly - roughly - rucuperate - recuperate - rudimentatry - rudimentary - rulle - rule - runing - running - runnung - running - russina - Russian - rwite - write - rythem - rhythm - rythim - rhythm - rythm - rhythm - rythmic - rhythmic - rythyms - rhythms - sacrafice - sacrifice - sacreligious - sacrilegious - sacrifical - sacrificial - saftey - safety - safty - safety - salery - salary - sanctionning - sanctioning - sandwhich - sandwich - santioned - sanctioned - sargant - sergeant - sargeant - sergeant - satelite - satellite - satelites - satellites - satisfactority - satisfactorily - satric - satiric - satrical - satirical - satrically - satirically - sattelite - satellite - sattelites - satellites - saught - sought - saveing - saving - saxaphone - saxophone - scaleable - scalable - scandanavia - Scandinavia - scaricity - scarcity - scavanged - scavenged - schedual - schedule - scholarhip - scholarship - scholarstic - scholastic - scientfic - scientific - scientifc - scientific - scientis - scientist - scince - science - scinece - science - scirpt - script - scoll - scroll - screenwrighter - screenwriter - scrutinity - scrutiny - scuptures - sculptures - seach - search - seached - searched - seaches - searches - secratary - secretary - secretery - secretary - sedereal - sidereal - seeked - sought - segementation - segmentation - seguoys - segues - seige - siege - seing - seeing - seinor - senior - seldomly - seldom - senarios - scenarios - senstive - sensitive - sensure - censure - seperate - separate - seperated - separated - seperately - separately - seperates - separates - seperating - separating - seperation - separation - seperatism - separatism - seperatist - separatist - sepina - subpoena - sergent - sergeant - settelement - settlement - settlment - settlement - severeal - several - severley - severely - severly - severely - sevice - service - shadasloo - shadaloo - shaddow - shadow - shadoloo - shadaloo - shamen - shaman - sheat - sheath - sheild - shield - sherif - sheriff - shineing - shining - shiped - shipped - shiping - shipping - shopkeeepers - shopkeepers - shorly - shortly - shortwhile - short while - shoudl - should - shoudln - shouldn't - shouldnt - shouldn't - shreak - shriek - shrinked - shrunk - sicne - since - sideral - sidereal - siezure - seizure - siezures - seizures - siginificant - significant - signficant - significant - signficiant - significant - signfies - signifies - signifantly - significantly - significently - significantly - signifigant - significant - signifigantly - significantly - signitories - signatories - signitory - signatory - similarily - similarly - similiar - similar - similiarity - similarity - similiarly - similarly - simmilar - similar - simpley - simply - simplier - simpler - simultanous - simultaneous - simultanously - simultaneously - sincerley - sincerely - singsog - singsong - sinse - since - skateing - skating - slaugterhouses - slaughterhouses - slighly - slightly - slowy - slowly - smae - same - smealting - smelting - smoe - some - sneeks - sneaks - snese - sneeze - socalism - socialism - socities - societies - soem - some - sofware - software - sohw - show - soilders - soldiers - solatary - solitary - soley - solely - soliders - soldiers - soliliquy - soliloquy - soluable - soluble - somene - someone - somtimes - sometimes - somwhere - somewhere - sophicated - sophisticated - sophmore - sophomore - sorceror - sorcerer - sorrounding - surrounding - sotry - story - sotyr - story - soudn - sound - soudns - sounds - sould - could - sountrack - soundtrack - sourth - south - sourthern - southern - souvenier - souvenir - souveniers - souvenirs - soveits - soviets - sovereignity - sovereignty - soverign - sovereign - soverignity - sovereignty - soverignty - sovereignty - spainish - Spanish - speach - speech - specfic - specific - speciallized - specialized - specifiying - specifying - speciman - specimen - spectauclar - spectacular - spectaulars - spectaculars - spectum - spectrum - speices - species - spendour - splendour - spermatozoan - spermatozoon - spoace - space - sponser - sponsor - sponsered - sponsored - spontanous - spontaneous - sponzored - sponsored - spoonfulls - spoonfuls - sppeches - speeches - spreaded - spread - sprech - speech - spred - spread - spriritual - spiritual - spritual - spiritual - sqaure - square - stablility - stability - stainlees - stainless - staion - station - standars - standards - stange - strange - startegic - strategic - startegies - strategies - startegy - strategy - stateman - statesman - statememts - statements - statment - statement - steriods - steroids - sterotypes - stereotypes - stilus - stylus - stingent - stringent - stiring - stirring - stirrs - stirs - stlye - style - stomache - stomach - stong - strong - stopry - story - storeis - stories - storise - stories - stornegst - strongest - stoyr - story - stpo - stop - stradegies - strategies - stradegy - strategy - strat - start - stratagically - strategically - streemlining - streamlining - stregth - strength - strenghen - strengthen - strenghened - strengthened - strenghening - strengthening - strenght - strength - strenghten - strengthen - strenghtened - strengthened - strenghtening - strengthening - strengtened - strengthened - strenous - strenuous - strictist - strictest - strikely - strikingly - strnad - strand - stroy - story - structual - structural - stubborness - stubbornness - stucture - structure - stuctured - structured - studdy - study - studing - studying - stuggling - struggling - sturcture - structure - subcatagories - subcategories - subcatagory - subcategory - subconsiously - subconsciously - subjudgation - subjugation - submachne - submachine - subpecies - subspecies - subsidary - subsidiary - subsiduary - subsidiary - subsquent - subsequent - subsquently - subsequently - substace - substance - substancial - substantial - substatial - substantial - substituded - substituted - substract - subtract - substracted - subtracted - substracting - subtracting - substraction - subtraction - substracts - subtracts - subtances - substances - subterranian - subterranean - suburburban - suburban - succceeded - succeeded - succcesses - successes - succedded - succeeded - succeded - succeeded - succeds - succeeds - succesful - successful - succesfully - successfully - succesfuly - successfully - succesion - succession - succesive - successive - successfull - successful - successully - successfully - succsess - success - succsessfull - successful - suceed - succeed - suceeded - succeeded - suceeding - succeeding - suceeds - succeeds - sucesful - successful - sucesfully - successfully - sucesfuly - successfully - sucesion - succession - sucess - success - sucesses - successes - sucessful - successful - sucessfull - successful - sucessfully - successfully - sucessfuly - successfully - sucession - succession - sucessive - successive - sucessor - successor - sucessot - successor - sucide - suicide - sucidial - suicidal - sufferage - suffrage - sufferred - suffered - sufferring - suffering - sufficent - sufficient - sufficently - sufficiently - sumary - summary - sunglases - sunglasses - suop - soup - superceeded - superseded - superintendant - superintendent - suphisticated - sophisticated - suplimented - supplemented - supose - suppose - suposed - supposed - suposedly - supposedly - suposes - supposes - suposing - supposing - supplamented - supplemented - suppliementing - supplementing - suppoed - supposed - supposingly - supposedly - suppy - supply - supress - suppress - supressed - suppressed - supresses - suppresses - supressing - suppressing - suprise - surprise - suprised - surprised - suprising - surprising - suprisingly - surprisingly - suprize - surprise - suprized - surprised - suprizing - surprising - suprizingly - surprisingly - surfce - surface - surley - surely - suround - surround - surounded - surrounded - surounding - surrounding - suroundings - surroundings - surounds - surrounds - surplanted - supplanted - surpress - suppress - surpressed - suppressed - surprize - surprise - surprized - surprised - surprizing - surprising - surprizingly - surprisingly - surrended - surrendered - surrepetitious - surreptitious - surrepetitiously - surreptitiously - surreptious - surreptitious - surreptiously - surreptitiously - surronded - surrounded - surrouded - surrounded - surrouding - surrounding - surrundering - surrendering - surveilence - surveillance - surveill - surveil - surveyer - surveyor - surviver - survivor - survivers - survivors - survivied - survived - suseptable - susceptible - suseptible - susceptible - suspention - suspension - swaer - swear - swaers - swears - swepth - swept - swiming - swimming - syas - says - symetrical - symmetrical - symetrically - symmetrically - symetry - symmetry - symettric - symmetric - symmetral - symmetric - symmetricaly - symmetrically - synagouge - synagogue - syncronization - synchronization - synonomous - synonymous - synonymns - synonyms - synphony - symphony - syphyllis - syphilis - sypmtoms - symptoms - syrap - syrup - sysmatically - systematically - sytem - system - sytle - style - tabacco - tobacco - tahn - than - taht - that - talekd - talked - targetted - targeted - targetting - targeting - tast - taste - tath - that - tattooes - tattoos - taxanomic - taxonomic - taxanomy - taxonomy - teached - taught - techician - technician - techicians - technicians - techiniques - techniques - technitian - technician - technnology - technology - technolgy - technology - teh - the - tehy - they - telelevision - television - televsion - television - telphony - telephony - temerature - temperature - tempalte - template - tempaltes - templates - temparate - temperate - temperarily - temporarily - temperment - temperament - tempertaure - temperature - temperture - temperature - temprary - temporary - tenacle - tentacle - tenacles - tentacles - tendacy - tendency - tendancies - tendencies - tendancy - tendency - tennisplayer - tennis player - tepmorarily - temporarily - terrestial - terrestrial - terriories - territories - terriory - territory - territorist - terrorist - territoy - territory - terroist - terrorist - testiclular - testicular - tghe - the - thast - that's - theather - theater - theese - these - theif - thief - theives - thieves - themselfs - themselves - themslves - themselves - ther - there - therafter - thereafter - therby - thereby - theri - their - theyre - they're - thgat - that - thge - the - thier - their - thign - thing - thigns - things - thigsn - things - thikn - think - thikning - thinking - thikns - thinks - thiunk - think - thn - then - thna - than - thne - then - thnig - thing - thnigs - things - thoughout - throughout - threatend - threatened - threatning - threatening - threee - three - threshhold - threshold - thrid - third - throrough - thorough - throughly - thoroughly - throught - throat - througout - throughout - thru - through - thsi - this - thsoe - those - thta - that - thyat - that - tiem - time - tihkn - think - tihs - this - timne - time - tiome - time - tje - the - tjhe - the - tjpanishad - upanishad - tkae - take - tkaes - takes - tkaing - taking - tlaking - talking - tobbaco - tobacco - todays - today's - todya - today - toghether - together - toke - took - tolerence - tolerance - tomatos - tomatoes - tommorow - tomorrow - tommorrow - tomorrow - tongiht - tonight - toriodal - toroidal - tormenters - tormentors - tornadoe - tornado - torpeados - torpedoes - torpedos - torpedoes - tothe - to the - toubles - troubles - tounge - tongue - tourch - torch - towords - towards - towrad - toward - tradionally - traditionally - traditionaly - traditionally - traditionnal - traditional - traditition - tradition - tradtionally - traditionally - trafficed - trafficked - trafficing - trafficking - trafic - traffic - trancendent - transcendent - trancending - transcending - tranform - transform - tranformed - transformed - transcendance - transcendence - transcendant - transcendent - transcendentational - transcendental - transcripting - transcribing - transending - transcending - transesxuals - transsexuals - transfered - transferred - transfering - transferring - transformaton - transformation - transistion - transition - translater - translator - translaters - translators - transmissable - transmissible - transporation - transportation - tremelo - tremolo - tremelos - tremolos - triguered - triggered - triology - trilogy - troling - trolling - troup - troupe - troups - troops - truely - truly - trustworthyness - trustworthiness - turnk - trunk - tust - trust - twelth - twelfth - twon - town - twpo - two - tyhat - that - tyhe - they - typcial - typical - typicaly - typically - tyranies - tyrannies - tyrany - tyranny - tyrranies - tyrannies - tyrrany - tyranny - ubiquitious - ubiquitous - ublisher - publisher - uise - use - ultimely - ultimately - unacompanied - unaccompanied - unahppy - unhappy - unanymous - unanimous - unathorised - unauthorised - unavailible - unavailable - unballance - unbalance - unbeknowst - unbeknownst - unbeleivable - unbelievable - uncertainity - uncertainty - unchallengable - unchallengeable - unchangable - unchangeable - uncompetive - uncompetitive - unconcious - unconscious - unconciousness - unconsciousness - unconfortability - discomfort - uncontitutional - unconstitutional - unconvential - unconventional - undecideable - undecidable - understoon - understood - undesireable - undesirable - undetecable - undetectable - undoubtely - undoubtedly - undreground - underground - uneccesary - unnecessary - unecessary - unnecessary - unequalities - inequalities - unforetunately - unfortunately - unforgetable - unforgettable - unforgiveable - unforgivable - unfortunatley - unfortunately - unfortunatly - unfortunately - unfourtunately - unfortunately - unihabited - uninhabited - unilateraly - unilaterally - unilatreal - unilateral - unilatreally - unilaterally - uninterruped - uninterrupted - uninterupted - uninterrupted - univeral - universal - univeristies - universities - univeristy - university - univerity - university - universtiy - university - univesities - universities - univesity - university - unkown - unknown - unlikey - unlikely - unmanouverable - unmaneuverable - unmistakeably - unmistakably - unneccesarily - unnecessarily - unneccesary - unnecessary - unneccessarily - unnecessarily - unneccessary - unnecessary - unnecesarily - unnecessarily - unnecesary - unnecessary - unoffical - unofficial - unoperational - nonoperational - unoticeable - unnoticeable - unplease - displease - unplesant - unpleasant - unprecendented - unprecedented - unprecidented - unprecedented - unrepentent - unrepentant - unrepetant - unrepentant - unrepetent - unrepentant - unsed - unused - unsubstanciated - unsubstantiated - unsuccesful - unsuccessful - unsuccesfully - unsuccessfully - unsuccessfull - unsuccessful - unsucesful - unsuccessful - unsucesfuly - unsuccessfully - unsucessful - unsuccessful - unsucessfull - unsuccessful - unsucessfully - unsuccessfully - unsuprised - unsurprised - unsuprising - unsurprising - unsuprisingly - unsurprisingly - unsuprized - unsurprised - unsuprizing - unsurprising - unsuprizingly - unsurprisingly - unsurprized - unsurprised - unsurprizing - unsurprising - unsurprizingly - unsurprisingly - untill - until - untranslateable - untranslatable - unuseable - unusable - unusuable - unusable - unviersity - university - unwarrented - unwarranted - unweildly - unwieldy - unwieldly - unwieldy - upcomming - upcoming - upgradded - upgraded - upto - up to - usally - usually - useage - usage - usefull - useful - usefuly - usefully - useing - using - usualy - usually - ususally - usually - vaccum - vacuum - vaccume - vacuum - vacinity - vicinity - vaguaries - vagaries - vaieties - varieties - vailidty - validity - valetta - valletta - valuble - valuable - valueable - valuable - varations - variations - varient - variant - variey - variety - varing - varying - varities - varieties - varity - variety - vasall - vassal - vasalls - vassals - vegatarian - vegetarian - vegitable - vegetable - vegitables - vegetables - vegtable - vegetable - vehicule - vehicle - vell - well - venemous - venomous - vengance - vengeance - vengence - vengeance - verfication - verification - verison - version - verisons - versions - vermillion - vermilion - versitilaty - versatility - versitlity - versatility - vetween - between - veyr - very - vigeur - vigor - vigilence - vigilance - vigourous - vigorous - villian - villain - villification - vilification - villify - vilify - villin - villain - vincinity - vicinity - violentce - violence - virtualy - virtually - virutal - virtual - virutally - virtually - visable - visible - visably - visibly - visting - visiting - vistors - visitors - vitories - victories - volcanoe - volcano - voleyball - volleyball - volontary - voluntary - volonteer - volunteer - volonteered - volunteered - volonteering - volunteering - volonteers - volunteers - volounteer - volunteer - volounteered - volunteered - volounteering - volunteering - volounteers - volunteers - volumne - volume - vreity - variety - vrey - very - vriety - variety - vulnerablility - vulnerability - vyer - very - vyre - very - waht - what - wanna - want to - warantee - warranty - wardobe - wardrobe - warrent - warrant - warrriors - warriors - wasnt - wasn't - wass - was - watn - want - wayword - wayward - weaponary - weaponry - weas - was - wehn - when - weild - wield - weilded - wielded - wendsay - Wednesday - wensday - Wednesday - wereabouts - whereabouts - whant - want - whants - wants - whcih - which - wheras - whereas - wherease - whereas - whereever - wherever - whic - which - whihc - which - whith - with - whlch - which - whn - when - wholey - wholly - wholy - holy - whta - what - whther - whether - wich - which - widesread - widespread - wief - wife - wierd - weird - wiew - view - wih - with - wiht - with - wille - will - willingless - willingness - wirting - writing - withdrawl - withdrawal - witheld - withheld - withh - with - withing - within - withold - withhold - witht - with - witn - with - wiull - will - wnat - want - wnated - wanted - wnats - wants - wohle - whole - wokr - work - wokring - working - wonderfull - wonderful - wont - won't - wordlwide - worldwide - workststion - workstation - worls - world - worstened - worsened - woudl - would - wresters - wrestlers - wriet - write - writen - written - wroet - wrote - wrok - work - wroking - working - wtih - with - wupport - support - xenophoby - xenophobia - yaching - yachting - yaer - year - yaerly - yearly - yaers - years - yatch - yacht - yearm - year - yeasr - years - yeild - yield - yeilding - yielding - yera - year - yeras - years - yersa - years - yotube - YouTube - youre - you're - youseff - yousef - youself - yourself - ytou - you - yuo - you - zeebra - zebra - - enabled - 1 - priority - 5 - + name + Abbreviations + replacements + + afaic + As far as I am concerned + afaik + As far as I know + afk + away from keyboard + atm + at the moment + bbiab + be back in a bit + bbl + be back later + brb + be right back + btw + by the way + fyi + For your information + fwiw + For what its worth + gtg + got to go + idk + I don't know + iirc + if I recall correctly + imho + in my humble opinion + imo + in my opinion + irl + in real life + np + no problem + nsfw + not safe for work + nvm + nevermind + tc + take care + thx + thanks + ttfn + ta-ta for now + ttyl + talk to you later + ty + thank you + tyvm + thank you very much + wb + welcome back + yw + you're welcome + yvw + you're very welcome + + + name + Spelling Corrections + replacements + + Amercia + America + Bernouilli + Bernoulli + Blitzkreig + Blitzkrieg + Bonnano + Bonanno + Brasillian + Brazilian + Britian + Britain + Brittish + British + Buddah + Buddha + Buddist + Buddhist + Cambrige + Cambridge + Capetown + Cape Town + Carmalite + Carmelite + Carnagie + Carnegie + Carnagie-Mellon + Carnegie-Mellon + Carnigie + Carnegie + Carnigie-Mellon + Carnegie-Mellon + Carribbean + Caribbean + Carribean + Caribbean + Carthagian + Carthaginian + Cataline + Catiline + Ceasar + Caesar + Celcius + Celsius + Champange + Champagne + Cincinatti + Cincinnati + Cincinnatti + Cincinnati + Conneticut + Connecticut + Dardenelles + Dardanelles + Dravadian + Dravidian + Enlish + English + Europian + European + Europians + Europeans + Eurpean + European + Eurpoean + European + Farenheit + Fahrenheit + Febuary + February + Feburary + February + Flemmish + Flemish + Formalhaut + Fomalhaut + Foundland + Newfoundland + Fransiscan + Franciscan + Fransiscans + Franciscans + Galations + Galatians + Gameboy + Game Boy + Ghandi + Gandhi + Godounov + Godunov + Gothenberg + Gothenburg + Gottleib + Gottlieb + Guaduloupe + Guadalupe + Guadulupe + Guadalupe + Guatamala + Guatemala + Guatamalan + Guatemalan + Guilia + Giulia + Guilio + Giulio + Guiness + Guinness + Guiseppe + Giuseppe + Habsbourg + Habsburg + Hallowean + Halloween + Heidelburg + Heidelberg + Ihaca + Ithaca + Israelies + Israelis + Janurary + January + Januray + January + Japanes + Japanese + Johanine + Johannine + Jospeh + Joseph + Juadaism + Judaism + Juadism + Judaism + Lybia + Libya + Malcom + Malcolm + Massachussets + Massachusetts + Massachussetts + Massachusetts + Mediteranean + Mediterranean + Michagan + Michigan + Misouri + Missouri + Missisipi + Mississippi + Missisippi + Mississippi + Monserrat + Montserrat + Montnana + Montana + Morisette + Morissette + Morrisette + Morissette + Mythraic + Mithraic + Naploeon + Napoleon + Napolean + Napoleon + Napoleonian + Napoleonic + Nazereth + Nazareth + Newyorker + New Yorker + Novermber + November + Nullabour + Nullarbor + Nuremburg + Nuremberg + Palistian + Palestinian + Palistinian + Palestinian + Palistinians + Palestinians + Papanicalou + Papanicolaou + Peloponnes + Peloponnesus + Pennyslvania + Pennsylvania + Pharoah + Pharaoh + Philipines + Philippines + Phillipine + Philippine + Phillipines + Philippines + Phillippines + Philippines + Phonecian + Phoenecian + Portugese + Portuguese + Postdam + Potsdam + Premonasterians + Premonstratensians + Pucini + Puccini + Puertorrican + Puerto Rican + Puertorricans + Puerto Ricans + Queenland + Queensland + Rockerfeller + Rockefeller + Russion + Russian + Sanhedrim + Sanhedrin + Saterday + Saturday + Saterdays + Saturdays + Sionist + Zionist + Sionists + Zionists + Sixtin + Sistine + Skagerak + Skagerrak + Tolkein + Tolkien + Tuscon + Tucson + Ukranian + Ukrainian + UnitesStates + UnitedStates + Yementite + Yemenite + abandonned + abandoned + aberation + aberration + abilties + abilities + abilty + ability + abondon + abandon + abondoned + abandoned + abondoning + abandoning + abondons + abandons + aborigene + aborigine + abortificant + abortifacient + abreviate + abbreviate + abreviated + abbreviated + abreviation + abbreviation + abritrary + arbitrary + absail + abseil + absailing + abseiling + absense + absence + absolutly + absolutely + absorbsion + absorption + absorbtion + absorption + abundacies + abundances + abundancies + abundances + abundunt + abundant + abutts + abuts + acadamy + academy + acadmic + academic + accademic + academic + accademy + academy + acccused + accused + accelleration + acceleration + accension + ascension + acceptence + acceptance + acceptible + acceptable + accessable + accessible + accidentaly + accidentally + accidently + accidentally + acclimitization + acclimatization + accomadate + accommodate + accomadated + accommodated + accomadates + accommodates + accomadating + accommodating + accomadation + accommodation + accomadations + accommodations + accomdate + accommodate + accomodate + accommodate + accomodated + accommodated + accomodates + accommodates + accomodating + accommodating + accomodation + accommodation + accomodations + accommodations + accompanyed + accompanied + accordeon + accordion + accordian + accordion + accoring + according + accoustic + acoustic + accquainted + acquainted + accrediation + accreditation + accredidation + accreditation + accross + across + accussed + accused + acedemic + academic + acheive + achieve + acheived + achieved + acheivement + achievement + acheivements + achievements + acheives + achieves + acheiving + achieving + acheivment + achievement + acheivments + achievements + achievment + achievement + achievments + achievements + achivement + achievement + achivements + achievements + acknowldeged + acknowledged + acknowledgeing + acknowledging + ackward + awkward + acommodate + accommodate + acomplish + accomplish + acomplished + accomplished + acomplishment + accomplishment + acomplishments + accomplishments + acording + according + acordingly + accordingly + acquaintence + acquaintance + acquaintences + acquaintances + acquiantence + acquaintance + acquiantences + acquaintances + acquited + acquitted + activites + activities + activly + actively + actualy + actually + acuracy + accuracy + acused + accused + acustom + accustom + acustommed + accustomed + adavanced + advanced + adbandon + abandon + additinally + additionally + additionaly + additionally + additonal + additional + additonally + additionally + addmission + admission + addopt + adopt + addopted + adopted + addoptive + adoptive + addres + address + addresable + addressable + addresed + addressed + addresing + addressing + addressess + addresses + addtion + addition + addtional + additional + adecuate + adequate + adequit + adequate + adhearing + adhering + adherance + adherence + admendment + amendment + admininistrative + administrative + adminstered + administered + adminstrate + administrate + adminstration + administration + adminstrative + administrative + adminstrator + administrator + admissability + admissibility + admissable + admissible + admited + admitted + admitedly + admittedly + adn + and + adolecent + adolescent + adquire + acquire + adquired + acquired + adquires + acquires + adquiring + acquiring + adres + address + adresable + addressable + adresing + addressing + adress + address + adressable + addressable + adressed + addressed + adressing + addressing + adventrous + adventurous + advertisment + advertisement + advertisments + advertisements + advesary + adversary + adviced + advised + aeriel + aerial + aeriels + aerials + afair + affair + afficianados + aficionados + afficionado + aficionado + afficionados + aficionados + affilate + affiliate + affilliate + affiliate + affort + afford + aforememtioned + aforementioned + againnst + against + agains + against + agaisnt + against + aganist + against + aggaravates + aggravates + aggreed + agreed + aggreement + agreement + aggregious + egregious + aggresive + aggressive + agian + again + agianst + against + agin + again + agina + again + aginst + against + agravate + aggravate + agre + agree + agred + agreed + agreeement + agreement + agreemnt + agreement + agregate + aggregate + agregates + aggregates + agreing + agreeing + agression + aggression + agressive + aggressive + agressively + aggressively + agressor + aggressor + agricuture + agriculture + agrieved + aggrieved + ahev + have + ahppen + happen + ahve + have + aicraft + aircraft + aiport + airport + airbourne + airborne + aircaft + aircraft + aircrafts + aircraft + airporta + airports + airrcraft + aircraft + aisian + asian + albiet + albeit + alchohol + alcohol + alchoholic + alcoholic + alchol + alcohol + alcholic + alcoholic + alcohal + alcohol + alcoholical + alcoholic + aledge + allege + aledged + alleged + aledges + alleges + alege + allege + aleged + alleged + alegience + allegiance + algebraical + algebraic + algorhitms + algorithms + algoritm + algorithm + algoritms + algorithms + alientating + alienating + alledge + allege + alledged + alleged + alledgedly + allegedly + alledges + alleges + allegedely + allegedly + allegedy + allegedly + allegely + allegedly + allegence + allegiance + allegience + allegiance + allign + align + alligned + aligned + alliviate + alleviate + allopone + allophone + allopones + allophones + allready + already + allthough + although + alltime + all-time + alltogether + altogether + almsot + almost + alochol + alcohol + alomst + almost + alot + a lot + alotted + allotted + alowed + allowed + alowing + allowing + alreayd + already + alse + else + alsot + also + alternitives + alternatives + altho + although + althought + although + altough + although + alusion + allusion + alwasy + always + alwyas + always + amalgomated + amalgamated + amatuer + amateur + amature + armature + amendmant + amendment + amerliorate + ameliorate + amke + make + amking + making + ammend + amend + ammended + amended + ammendment + amendment + ammendments + amendments + ammount + amount + ammused + amused + amoung + among + amoungst + amongst + amung + among + amunition + ammunition + analagous + analogous + analitic + analytic + analogeous + analogous + anarchim + anarchism + anarchistm + anarchism + anbd + and + ancestory + ancestry + ancilliary + ancillary + androgenous + androgynous + androgeny + androgyny + anihilation + annihilation + aniversary + anniversary + annoint + anoint + annointed + anointed + annointing + anointing + annoints + anoints + annouced + announced + annualy + annually + annuled + annulled + anohter + another + anomolies + anomalies + anomolous + anomalous + anomoly + anomaly + anonimity + anonymity + anounced + announced + anouncement + announcement + ansalisation + nasalisation + ansalization + nasalization + ansestors + ancestors + antartic + antarctic + anthromorphization + anthropomorphization + anthropolgist + anthropologist + anthropolgy + anthropology + anual + annual + anulled + annulled + anwsered + answered + anyhwere + anywhere + anyother + any other + anytying + anything + aparent + apparent + aparment + apartment + apenines + apennines + aplication + application + aplied + applied + apolegetics + apologetics + apon + apron + apparant + apparent + apparantly + apparently + appart + apart + appartment + apartment + appartments + apartments + appealling + appealing + appeareance + appearance + appearence + appearance + appearences + appearances + apperance + appearance + apperances + appearances + appereance + appearance + appereances + appearances + applicaiton + application + applicaitons + applications + appologies + apologies + appology + apology + apprearance + appearance + apprieciate + appreciate + approachs + approaches + appropiate + appropriate + appropraite + appropriate + appropropiate + appropriate + approproximate + approximate + approxamately + approximately + approxiately + approximately + approximitely + approximately + aprehensive + apprehensive + apropriate + appropriate + aproximate + approximate + aproximately + approximately + aquaduct + aqueduct + aquaintance + acquaintance + aquainted + acquainted + aquiantance + acquaintance + aquire + acquire + aquired + acquired + aquiring + acquiring + aquisition + acquisition + aquitted + acquitted + aranged + arranged + arangement + arrangement + arbitarily + arbitrarily + arbitary + arbitrary + archaelogists + archaeologists + archaelogy + archaeology + archaoelogy + archaeology + archaology + archaeology + archeaologist + archaeologist + archeaologists + archaeologists + archetect + architect + archetects + architects + archetectural + architectural + archetecturally + architecturally + archetecture + architecture + archiac + archaic + archictect + architect + archimedian + archimedean + architecht + architect + architechturally + architecturally + architechture + architecture + architechtures + architectures + architectual + architectural + archtype + archetype + archtypes + archetypes + aready + already + areodynamics + aerodynamics + argubly + arguably + arguement + argument + arguements + arguments + arised + arose + arival + arrival + armamant + armament + armistace + armistice + arogant + arrogant + arogent + arrogant + aroud + around + arrangment + arrangement + arrangments + arrangements + arround + around + artical + article + artice + article + articel + article + artifical + artificial + artifically + artificially + artillary + artillery + arund + around + asetic + ascetic + asfar + as far + asign + assign + aslo + also + asociated + associated + asorbed + absorbed + asphyxation + asphyxiation + assasin + assassin + assasinate + assassinate + assasinated + assassinated + assasinates + assassinates + assasination + assassination + assasinations + assassinations + assasined + assassinated + assasins + assassins + assassintation + assassination + assemple + assemble + assertation + assertion + asside + aside + assisnate + assassinate + assit + assist + assitant + assistant + assocation + association + assoicate + associate + assoicated + associated + assoicates + associates + assosication + assassination + asssassans + assassins + assualt + assault + assualted + assaulted + assymetric + asymmetric + assymetrical + asymmetrical + asteriod + asteroid + asthetic + aesthetic + asthetical + aesthetical + asthetically + aesthetically + asume + assume + aswell + as well + atain + attain + atempting + attempting + atheistical + atheistic + athenean + athenian + atheneans + athenians + athiesm + atheism + athiest + atheist + atorney + attorney + atribute + attribute + atributed + attributed + atributes + attributes + attaindre + attainder + attemp + attempt + attemped + attempted + attemt + attempt + attemted + attempted + attemting + attempting + attemts + attempts + attendence + attendance + attendent + attendant + attendents + attendants + attened + attended + attension + attention + attitide + attitude + attributred + attributed + attrocities + atrocities + audeince + audience + auromated + automated + austrailia + Australia + austrailian + Australian + auther + author + authobiographic + autobiographic + authobiography + autobiography + authorative + authoritative + authorites + authorities + authorithy + authority + authoritiers + authorities + authoritive + authoritative + authrorities + authorities + autochtonous + autochthonous + autoctonous + autochthonous + automaticly + automatically + automibile + automobile + automonomous + autonomous + autor + author + autority + authority + auxilary + auxiliary + auxillaries + auxiliaries + auxillary + auxiliary + auxilliaries + auxiliaries + auxilliary + auxiliary + availabe + available + availablity + availability + availaible + available + availble + available + availiable + available + availible + available + avalable + available + avalance + avalanche + avaliable + available + avation + aviation + avengence + a vengeance + averageed + averaged + avilable + available + awared + awarded + awya + away + baceause + because + backgorund + background + backrounds + backgrounds + bakc + back + banannas + bananas + bandwith + bandwidth + bankrupcy + bankruptcy + banruptcy + bankruptcy + baout + about + basicaly + basically + basicly + basically + bcak + back + beachead + beachhead + beacuse + because + beastiality + bestiality + beatiful + beautiful + beaurocracy + bureaucracy + beaurocratic + bureaucratic + beautyfull + beautiful + becamae + became + becames + becomes + becasue + because + beccause + because + becomeing + becoming + becomming + becoming + becouse + because + becuase + because + bedore + before + befoer + before + beggin + begin + begginer + beginner + begginers + beginners + beggining + beginning + begginings + beginnings + beggins + begins + begining + beginning + beginnig + beginning + behavour + behavior + beleagured + beleaguered + beleif + belief + beleive + believe + beleived + believed + beleives + believes + beleiving + believing + beligum + belgium + belive + believe + belived + believed + belives + believes + belligerant + belligerent + bellweather + bellwether + bemusemnt + bemusement + beneficary + beneficiary + beng + being + benificial + beneficial + benifit + benefit + benifits + benefits + bergamont + bergamot + beseige + besiege + beseiged + besieged + beseiging + besieging + betwen + between + beween + between + bewteen + between + bilateraly + bilaterally + billingualism + bilingualism + binominal + binomial + bizzare + bizarre + blaim + blame + blaimed + blamed + blessure + blessing + bodydbuilder + bodybuilder + bombardement + bombardment + bombarment + bombardment + bondary + boundary + borke + broke + boundry + boundary + bouyancy + buoyancy + bouyant + buoyant + boyant + buoyant + breakthough + breakthrough + breakthroughts + breakthroughs + breif + brief + breifly + briefly + brethen + brethren + bretheren + brethren + briliant + brilliant + brillant + brilliant + brimestone + brimstone + broacasted + broadcast + broadacasting + broadcasting + broady + broadly + buisness + business + buisnessman + businessman + buoancy + buoyancy + burried + buried + busineses + businesses + busness + business + bussiness + business + caculater + calculator + cacuses + caucuses + cahracters + characters + calaber + caliber + calculater + calculator + calculs + calculus + calenders + calendars + caligraphy + calligraphy + caluclate + calculate + caluclated + calculated + caluculate + calculate + caluculated + calculated + calulate + calculate + calulated + calculated + calulater + calculator + camoflage + camouflage + campain + campaign + campains + campaigns + candadate + candidate + candiate + candidate + candidiate + candidate + cannister + canister + cannisters + canisters + cannnot + cannot + cannonical + canonical + cannotation + connotation + cannotations + connotations + cant + can't + caost + coast + caperbility + capability + capible + capable + captial + capital + captued + captured + capturd + captured + carachter + character + caracterized + characterized + carcas + carcass + carefull + careful + careing + caring + carismatic + charismatic + carnege + carnage + carnige + carnage + carniverous + carnivorous + carreer + career + carrers + careers + cartdridge + cartridge + carthographer + cartographer + cartilege + cartilage + cartilidge + cartilage + cartrige + cartridge + casette + cassette + casion + caisson + cassawory + cassowary + cassowarry + cassowary + casulaties + casualties + casulaty + casualty + catagories + categories + catagorized + categorized + catagory + category + catapillar + caterpillar + catapillars + caterpillars + catapiller + caterpillar + catapillers + caterpillars + catepillar + caterpillar + catepillars + caterpillars + catergorize + categorize + catergorized + categorized + caterpilar + caterpillar + caterpilars + caterpillars + caterpiller + caterpillar + caterpillers + caterpillars + cathlic + catholic + catholocism + catholicism + catterpilar + caterpillar + catterpilars + caterpillars + catterpillar + caterpillar + catterpillars + caterpillars + cattleship + battleship + causalities + casualties + cellpading + cellpadding + cementary + cemetery + cemetarey + cemetery + cemetaries + cemeteries + cemetary + cemetery + cencus + census + censur + censor + cententenial + centennial + centruies + centuries + centruy + century + ceratin + certain + cerimonial + ceremonial + cerimonies + ceremonies + cerimonious + ceremonious + cerimony + ceremony + ceromony + ceremony + certainity + certainty + certian + certain + chalenging + challenging + challange + challenge + challanged + challenged + challege + challenge + changable + changeable + charachter + character + charachters + characters + charactersistic + characteristic + charactor + character + charactors + characters + charasmatic + charismatic + charaterized + characterized + chariman + chairman + charistics + characteristics + cheif + chief + cheifs + chiefs + chemcial + chemical + chemcially + chemically + chemestry + chemistry + chemicaly + chemically + childbird + childbirth + childen + children + choosen + chosen + chracter + character + chuch + church + churchs + churches + circulaton + circulation + circumsicion + circumcision + circut + circuit + ciricuit + circuit + ciriculum + curriculum + civillian + civilian + claer + clear + claerer + clearer + claerly + clearly + claimes + claims + clas + class + clasic + classic + clasical + classical + clasically + classically + cleareance + clearance + clera + clear + clincial + clinical + clinicaly + clinically + cmo + com + cmoputer + computer + co-incided + coincided + coctail + cocktail + coform + conform + cognizent + cognizant + coincedentally + coincidentally + colaborations + collaborations + colateral + collateral + colelctive + collective + collaberative + collaborative + collecton + collection + collegue + colleague + collegues + colleagues + collonade + colonnade + collonies + colonies + collony + colony + collosal + colossal + colonizators + colonizers + comander + commander + comando + commando + comandos + commandos + comany + company + comapany + company + comback + comeback + combanations + combinations + combinatins + combinations + combusion + combustion + comdemnation + condemnation + comemmorates + commemorates + comemoretion + commemoration + comision + commission + comisioned + commissioned + comisioner + commissioner + comisioning + commissioning + comisions + commissions + comission + commission + comissioned + commissioned + comissioner + commissioner + comissioning + commissioning + comissions + commissions + comited + committed + comiting + committing + comitted + committed + comittee + committee + comitting + committing + commandoes + commandos + commedic + comedic + commemerative + commemorative + commemmorate + commemorate + commemmorating + commemorating + commerical + commercial + commerically + commercially + commericial + commercial + commericially + commercially + commerorative + commemorative + comming + coming + comminication + communication + commision + commission + commisioned + commissioned + commisioner + commissioner + commisioning + commissioning + commisions + commissions + commited + committed + commitee + committee + commiting + committing + committe + committee + committment + commitment + committments + commitments + commmemorated + commemorated + commongly + commonly + commonweath + commonwealth + commuications + communications + commuinications + communications + communciation + communication + communiation + communication + communites + communities + compability + compatibility + comparision + comparison + comparisions + comparisons + comparitive + comparative + comparitively + comparatively + compatabilities + compatibilities + compatability + compatibility + compatable + compatible + compatablities + compatibilities + compatablity + compatibility + compatiable + compatible + compatiblities + compatibilities + compatiblity + compatibility + compeitions + competitions + compensantion + compensation + competance + competence + competant + competent + competative + competitive + competion + competition + competitiion + competition + competive + competitive + competiveness + competitiveness + comphrehensive + comprehensive + compitent + competent + completedthe + completed the + completelyl + completely + completetion + completion + complier + compiler + componant + component + comprable + comparable + comprimise + compromise + compulsary + compulsory + compulsery + compulsory + computarized + computerized + concensus + consensus + concider + consider + concidered + considered + concidering + considering + conciders + considers + concieted + conceited + concieved + conceived + concious + conscious + conciously + consciously + conciousness + consciousness + condamned + condemned + condemmed + condemned + condidtion + condition + condidtions + conditions + conditionsof + conditions of + conected + connected + conection + connection + conesencus + consensus + confidental + confidential + confidentally + confidentially + confids + confides + configureable + configurable + confortable + comfortable + congradulations + congratulations + congresional + congressional + conived + connived + conjecutre + conjecture + conjuction + conjunction + conotations + connotations + conquerd + conquered + conquerer + conqueror + conquerers + conquerors + conqured + conquered + conscent + consent + consciouness + consciousness + consdider + consider + consdidered + considered + consdiered + considered + consectutive + consecutive + consenquently + consequently + consentrate + concentrate + consentrated + concentrated + consentrates + concentrates + consept + concept + consequentually + consequently + consequeseces + consequences + consern + concern + conserned + concerned + conserning + concerning + conservitive + conservative + consiciousness + consciousness + consicousness + consciousness + considerd + considered + consideres + considered + consious + conscious + consistant + consistent + consistantly + consistently + consituencies + constituencies + consituency + constituency + consituted + constituted + consitution + constitution + consitutional + constitutional + consolodate + consolidate + consolodated + consolidated + consonent + consonant + consonents + consonants + consorcium + consortium + conspiracys + conspiracies + conspiriator + conspirator + constaints + constraints + constanly + constantly + constarnation + consternation + constatn + constant + constinually + continually + constituant + constituent + constituants + constituents + constituion + constitution + constituional + constitutional + consttruction + construction + constuction + construction + consulant + consultant + consumate + consummate + consumated + consummated + contaiminate + contaminate + containes + contains + contamporaries + contemporaries + contamporary + contemporary + contempoary + contemporary + contemporaneus + contemporaneous + contempory + contemporary + contendor + contender + contibute + contribute + contibuted + contributed + contibutes + contributes + contigent + contingent + contined + continued + continous + continuous + continously + continuously + continueing + continuing + contravercial + controversial + contraversy + controversy + contributer + contributor + contributers + contributors + contritutions + contributions + controled + controlled + controling + controlling + controll + control + controlls + controls + controvercial + controversial + controvercy + controversy + controveries + controversies + controversal + controversial + controversey + controversy + controvertial + controversial + controvery + controversy + contruction + construction + conveinent + convenient + convenant + covenant + convential + conventional + convertables + convertibles + convertion + conversion + conveyer + conveyor + conviced + convinced + convienient + convenient + coordiantion + coordination + coorperations + corporations + copmetitors + competitors + coputer + computer + copywrite + copyright + coridal + cordial + cornmitted + committed + corosion + corrosion + corparate + corporate + corperations + corporations + correcters + correctors + correponding + corresponding + correposding + corresponding + correspondant + correspondent + correspondants + correspondents + corridoors + corridors + corrispond + correspond + corrispondant + correspondent + corrispondants + correspondents + corrisponded + corresponded + corrisponding + corresponding + corrisponds + corresponds + costitution + constitution + coucil + council + counries + countries + countains + contains + countires + countries + coururier + courier + coverted + converted + cpoy + copy + creaeted + created + creedence + credence + critereon + criterion + criterias + criteria + criticists + critics + critising + criticising + critisising + criticising + critisism + criticism + critisisms + criticisms + critisize + criticise + critisized + criticised + critisizes + criticises + critisizing + criticising + critized + criticized + critizing + criticizing + crockodiles + crocodiles + crowm + crown + crtical + critical + crticised + criticised + crucifiction + crucifixion + crusies + cruises + crystalisation + crystallisation + culiminating + culminating + cumulatative + cumulative + curch + church + curcuit + circuit + currenly + currently + curriculem + curriculum + cxan + cyan + cyclinder + cylinder + dacquiri + daiquiri + dael + deal + dalmation + dalmatian + damenor + demeanor + dammage + damage + daugher + daughter + debateable + debatable + decendant + descendant + decendants + descendants + decendent + descendant + decendents + descendants + decideable + decidable + decidely + decidedly + decieved + deceived + decison + decision + decomissioned + decommissioned + decomposit + decompose + decomposited + decomposed + decompositing + decomposing + decomposits + decomposes + decress + decrees + decribe + describe + decribed + described + decribes + describes + decribing + describing + dectect + detect + defendent + defendant + defendents + defendants + deffensively + defensively + deffine + define + deffined + defined + definance + defiance + definate + definite + definately + definitely + definatly + definitely + definetly + definitely + definining + defining + definit + definite + definitly + definitely + definiton + definition + defintion + definition + degrate + degrade + delagates + delegates + delapidated + dilapidated + delerious + delirious + delevopment + development + deliberatly + deliberately + delusionally + delusively + demenor + demeanor + demographical + demographic + demolision + demolition + demorcracy + democracy + demostration + demonstration + denegrating + denigrating + densly + densely + deparment + department + deparmental + departmental + deparments + departments + dependance + dependence + dependancy + dependency + dependant + dependent + deram + dream + deriviated + derived + derivitive + derivative + derogitory + derogatory + descendands + descendants + descibed + described + descision + decision + descisions + decisions + descriibes + describes + descripters + descriptors + descripton + description + desctruction + destruction + descuss + discuss + desgined + designed + deside + decide + desigining + designing + desinations + destinations + desintegrated + disintegrated + desintegration + disintegration + desireable + desirable + desitned + destined + desktiop + desktop + desorder + disorder + desoriented + disoriented + desparate + desperate + despict + depict + despiration + desperation + dessicated + desiccated + dessigned + designed + destablized + destabilized + destory + destroy + detailled + detailed + detatched + detached + deteoriated + deteriorated + deteriate + deteriorate + deterioriating + deteriorating + determinining + determining + detremental + detrimental + devasted + devastated + develope + develop + developement + development + developped + developed + develpment + development + devels + delves + devestated + devastated + devestating + devastating + devide + divide + devided + divided + devistating + devastating + devolopement + development + diablical + diabolical + diamons + diamonds + diaster + disaster + dichtomy + dichotomy + diconnects + disconnects + dicover + discover + dicovered + discovered + dicovering + discovering + dicovers + discovers + dicovery + discovery + dicussed + discussed + didnt + didn't + diea + idea + dieing + dying + dieties + deities + diety + deity + diferent + different + diferrent + different + differentiatiations + differentiations + differnt + different + difficulity + difficulty + diffrent + different + dificulties + difficulties + dificulty + difficulty + dimenions + dimensions + dimention + dimension + dimentional + dimensional + dimentions + dimensions + dimesnional + dimensional + diminuitive + diminutive + dimunitive + diminutive + diosese + diocese + diphtong + diphthong + diphtongs + diphthongs + diplomancy + diplomacy + dipthong + diphthong + dipthongs + diphthongs + dirived + derived + disagreeed + disagreed + disapeared + disappeared + disapointing + disappointing + disappearred + disappeared + disaproval + disapproval + disasterous + disastrous + disatisfaction + dissatisfaction + disatisfied + dissatisfied + disatrous + disastrous + discontentment + discontent + discribe + describe + discribed + described + discribes + describes + discribing + describing + disctinction + distinction + disctinctive + distinctive + disemination + dissemination + disenchanged + disenchanted + disiplined + disciplined + disobediance + disobedience + disobediant + disobedient + disolved + dissolved + disover + discover + dispair + despair + disparingly + disparagingly + dispence + dispense + dispenced + dispensed + dispencing + dispensing + dispicable + despicable + dispite + despite + dispostion + disposition + disproportiate + disproportionate + disputandem + disputandum + disricts + districts + dissagreement + disagreement + dissapear + disappear + dissapearance + disappearance + dissapeared + disappeared + dissapearing + disappearing + dissapears + disappears + dissappear + disappear + dissappears + disappears + dissappointed + disappointed + dissarray + disarray + dissobediance + disobedience + dissobediant + disobedient + dissobedience + disobedience + dissobedient + disobedient + distiction + distinction + distingish + distinguish + distingished + distinguished + distingishes + distinguishes + distingishing + distinguishing + distingquished + distinguished + distrubution + distribution + distruction + destruction + distructive + destructive + ditributed + distributed + diversed + diverged + divice + device + divison + division + divisons + divisions + doccument + document + doccumented + documented + doccuments + documents + docrines + doctrines + doctines + doctrines + documenatry + documentary + doens + does + doesnt + doesn't + doign + doing + dominaton + domination + dominent + dominant + dominiant + dominant + donig + doing + dont + don't + dosen't + doesn't + doub + doubt + doulbe + double + dowloads + downloads + dramtic + dramatic + draughtman + draughtsman + dreasm + dreams + driectly + directly + drnik + drink + druming + drumming + drummless + drumless + dupicate + duplicate + durig + during + durring + during + duting + during + dyas + dryas + eahc + each + ealier + earlier + earlies + earliest + earnt + earned + ecclectic + eclectic + eceonomy + economy + ecidious + deciduous + eclispe + eclipse + ecomonic + economic + ect + etc + eearly + early + efel + evil + effeciency + efficiency + effecient + efficient + effeciently + efficiently + efficency + efficiency + efficent + efficient + efficently + efficiently + efford + effort + effords + efforts + effulence + effluence + eigth + eight + eiter + either + elction + election + electic + electric + electon + electron + electrial + electrical + electricly + electrically + electricty + electricity + elementay + elementary + eleminated + eliminated + eleminating + eliminating + eles + eels + eletricity + electricity + elicided + elicited + eligable + eligible + elimentary + elementary + ellected + elected + elphant + elephant + embarass + embarrass + embarassed + embarrassed + embarassing + embarrassing + embarassment + embarrassment + embargos + embargoes + embarras + embarrass + embarrased + embarrassed + embarrasing + embarrassing + embarrasment + embarrassment + embezelled + embezzled + emblamatic + emblematic + eminate + emanate + eminated + emanated + emision + emission + emited + emitted + emiting + emitting + emition + emission + emmediately + immediately + emmigrated + immigrated + emminently + eminently + emmisaries + emissaries + emmisarries + emissaries + emmisarry + emissary + emmisary + emissary + emmision + emission + emmisions + emissions + emmited + emitted + emmiting + emitting + emmitted + emitted + emmitting + emitting + emnity + enmity + emperical + empirical + emphaised + emphasised + emphsis + emphasis + emphysyma + emphysema + emprisoned + imprisoned + enameld + enameled + enchancement + enhancement + encouraing + encouraging + encryptiion + encryption + encylopedia + encyclopedia + endevors + endeavors + endevour + endeavour + endig + ending + endolithes + endoliths + enduce + induce + ened + need + enflamed + inflamed + enforceing + enforcing + engagment + engagement + engeneer + engineer + engeneering + engineering + engieneer + engineer + engieneers + engineers + enlargment + enlargement + enlargments + enlargements + enourmous + enormous + enourmously + enormously + ensconsed + ensconced + entaglements + entanglements + enteratinment + entertainment + enthusiatic + enthusiastic + entitity + entity + entitlied + entitled + entrepeneur + entrepreneur + entrepeneurs + entrepreneurs + enviorment + environment + enviormental + environmental + enviormentally + environmentally + enviorments + environments + enviornment + environment + enviornmental + environmental + enviornmentalist + environmentalist + enviornmentally + environmentally + enviornments + environments + enviroment + environment + enviromental + environmental + enviromentalist + environmentalist + enviromentally + environmentally + enviroments + environments + envolutionary + evolutionary + envrionments + environments + enxt + next + epidsodes + episodes + epsiode + episode + equialent + equivalent + equilibium + equilibrium + equilibrum + equilibrium + equiped + equipped + equippment + equipment + equitorial + equatorial + equivelant + equivalent + equivelent + equivalent + equivilant + equivalent + equivilent + equivalent + equivlalent + equivalent + erally + really + eratic + erratic + eratically + erratically + eraticly + erratically + errupted + erupted + esential + essential + esitmated + estimated + esle + else + especialy + especially + essencial + essential + essense + essence + essentail + essential + essentialy + essentially + essentual + essential + essesital + essential + estabishes + establishes + establising + establishing + ethnocentricm + ethnocentrism + ethose + those + evenhtually + eventually + eventally + eventually + eventhough + even though + eventially + eventually + eventualy + eventually + everthing + everything + everytime + every time + everyting + everything + eveyr + every + evidentally + evidently + exagerate + exaggerate + exagerated + exaggerated + exagerates + exaggerates + exagerating + exaggerating + exagerrate + exaggerate + exagerrated + exaggerated + exagerrates + exaggerates + exagerrating + exaggerating + examinated + examined + exampt + exempt + exapansion + expansion + excact + exact + excange + exchange + excecute + execute + excecuted + executed + excecutes + executes + excecuting + executing + excecution + execution + excedded + exceeded + excelent + excellent + excell + excel + excellance + excellence + excellant + excellent + excells + excels + excercise + exercise + exchanching + exchanging + excisted + existed + exculsivly + exclusively + execising + exercising + exection + execution + exectued + executed + exeedingly + exceedingly + exelent + excellent + exellent + excellent + exemple + example + exept + except + exeptional + exceptional + exerbate + exacerbate + exerbated + exacerbated + exerciese + exercises + exerpt + excerpt + exerpts + excerpts + exersize + exercise + exerternal + external + exhalted + exalted + exhibtion + exhibition + exibition + exhibition + exibitions + exhibitions + exicting + exciting + exinct + extinct + existance + existence + existant + existent + existince + existence + exliled + exiled + exludes + excludes + exmaple + example + exonorate + exonerate + exoskelaton + exoskeleton + expalin + explain + expatriot + expatriate + expeced + expected + expecially + especially + expeditonary + expeditionary + expeiments + experiments + expell + expel + expells + expels + experiance + experience + experianced + experienced + expiditions + expeditions + expierence + experience + explaination + explanation + explaning + explaining + explictly + explicitly + exploititive + exploitative + explotation + exploitation + expropiated + expropriated + expropiation + expropriation + exressed + expressed + extemely + extremely + extention + extension + extentions + extensions + extered + exerted + extermist + extremist + extint + extinct + extradiction + extradition + extraterrestial + extraterrestrial + extraterrestials + extraterrestrials + extravagent + extravagant + extrememly + extremely + extremeophile + extremophile + extremly + extremely + extrordinarily + extraordinarily + extrordinary + extraordinary + eyar + year + eyars + years + eyasr + years + faciliate + facilitate + faciliated + facilitated + faciliates + facilitates + facilites + facilities + facillitate + facilitate + facinated + fascinated + facist + fascist + familes + families + familliar + familiar + famoust + famous + fanatism + fanaticism + fatc + fact + faught + fought + favoutrable + favourable + feasable + feasible + fedreally + federally + feromone + pheromone + fertily + fertility + fianite + finite + fianlly + finally + ficticious + fictitious + fictious + fictitious + fidn + find + fiercly + fiercely + fightings + fighting + filiament + filament + fimilies + families + finacial + financial + finaly + finally + financialy + financially + firends + friends + firts + first + fisionable + fissionable + flamable + flammable + flawess + flawless + fleed + fled + florescent + fluorescent + flourescent + fluorescent + flourine + fluorine + fluorish + flourish + follwoing + following + folowing + following + fomed + formed + fomr + from + fonetic + phonetic + fontrier + fontier + foootball + football + forbad + forbade + forbiden + forbidden + foreward + foreword + forfiet + forfeit + forhead + forehead + foriegn + foreign + formallize + formalize + formallized + formalized + formaly + formally + formelly + formerly + formidible + formidable + formost + foremost + forsaw + foresaw + forseeable + foreseeable + fortelling + foretelling + forunner + forerunner + foucs + focus + foudn + found + fougth + fought + foundaries + foundries + foundary + foundry + fourties + forties + fourty + forty + fouth + fourth + foward + forward + freind + friend + freindly + friendly + frequentily + frequently + frome + from + fromed + formed + froniter + frontier + fucntion + function + fucntioning + functioning + fufill + fulfill + fufilled + fulfilled + fulfiled + fulfilled + fullfill + fulfill + fullfilled + fulfilled + fundametal + fundamental + fundametals + fundamentals + funguses + fungi + funtion + function + furuther + further + futher + further + futhermore + furthermore + galatic + galactic + gallaxies + galaxies + galvinized + galvanized + ganerate + generate + ganes + games + ganster + gangster + garantee + guarantee + garanteed + guaranteed + garantees + guarantees + garnison + garrison + gaurantee + guarantee + gauranteed + guaranteed + gaurantees + guarantees + gaurd + guard + gaurentee + guarantee + gaurenteed + guaranteed + gaurentees + guarantees + geneological + genealogical + geneologies + genealogies + geneology + genealogy + generaly + generally + generatting + generating + genialia + genitalia + geographicial + geographical + geometrician + geometer + geometricians + geometers + gerat + great + glight + flight + gnawwed + gnawed + godess + goddess + godesses + goddesses + gogin + going + goign + going + gonig + going + gouvener + governor + govement + government + govenment + government + govenrment + government + goverance + governance + goverment + government + govermental + governmental + governer + governor + governmnet + government + govorment + government + govormental + governmental + govornment + government + gracefull + graceful + graet + great + grafitti + graffiti + gramatically + grammatically + grammaticaly + grammatically + grammer + grammar + grat + great + gratuitious + gratuitous + greatful + grateful + greatfully + gratefully + greif + grief + gridles + griddles + gropu + group + grwo + grow + guage + gauge + guarentee + guarantee + guarenteed + guaranteed + guarentees + guarantees + guerilla + guerrilla + guerillas + guerrillas + guerrila + guerrilla + guerrilas + guerrillas + guidence + guidance + gunanine + guanine + gurantee + guarantee + guranteed + guaranteed + gurantees + guarantees + guttaral + guttural + gutteral + guttural + habaeus + habeas + habeus + habeas + haemorrage + haemorrhage + haev + have + halp + help + hapen + happen + hapened + happened + hapening + happening + happend + happened + happended + happened + happenned + happened + harased + harassed + harases + harasses + harasment + harassment + harasments + harassments + harassement + harassment + harras + harass + harrased + harassed + harrases + harasses + harrasing + harassing + harrasment + harassment + harrasments + harassments + harrassed + harassed + harrasses + harassed + harrassing + harassing + harrassment + harassment + harrassments + harassments + hasnt + hasn't + haviest + heaviest + headquarer + headquarter + headquater + headquarter + headquatered + headquartered + headquaters + headquarters + healthercare + healthcare + heared + heard + heathy + healthy + heigher + higher + heirarchy + hierarchy + heiroglyphics + hieroglyphics + helment + helmet + helpfull + helpful + helpped + helped + hemmorhage + hemorrhage + herad + heard + heridity + heredity + heroe + hero + heros + heroes + hertiage + heritage + hertzs + hertz + hesistant + hesitant + heterogenous + heterogeneous + hieght + height + hierachical + hierarchical + hierachies + hierarchies + hierachy + hierarchy + hierarcical + hierarchical + hierarcy + hierarchy + hieroglph + hieroglyph + hieroglphs + hieroglyphs + higer + higher + higest + highest + higway + highway + hillarious + hilarious + himselv + himself + hinderance + hindrance + hinderence + hindrance + hindrence + hindrance + hipopotamus + hippopotamus + hismelf + himself + histocompatability + histocompatibility + historicians + historians + hitsingles + hit singles + holliday + holiday + homestate + home state + homogeneize + homogenize + homogeneized + homogenized + honory + honorary + horrifing + horrifying + hosited + hoisted + hospitible + hospitable + hounour + honour + housr + hours + howver + however + hsitorians + historians + hstory + history + hten + then + htere + there + htey + they + htikn + think + hting + thing + htink + think + htis + this + humer + humor + humerous + humorous + huminoid + humanoid + humoural + humoral + humurous + humorous + husban + husband + hvae + have + hvaing + having + hvea + have + hwihc + which + hwile + while + hwole + whole + hydogen + hydrogen + hydropile + hydrophile + hydropilic + hydrophilic + hydropobe + hydrophobe + hydropobic + hydrophobic + hygeine + hygiene + hypocracy + hypocrisy + hypocrasy + hypocrisy + hypocricy + hypocrisy + hypocrit + hypocrite + hypocrits + hypocrites + i + I + iconclastic + iconoclastic + idaeidae + idea + idaes + ideas + idealogies + ideologies + idealogy + ideology + identicial + identical + identifers + identifiers + ideosyncratic + idiosyncratic + idesa + ideas + idiosyncracy + idiosyncrasy + illegimacy + illegitimacy + illegitmate + illegitimate + illess + illness + illiegal + illegal + illution + illusion + ilness + illness + ilogical + illogical + imagenary + imaginary + imagin + imagine + imaginery + imaginary + imcomplete + incomplete + imediately + immediately + imense + immense + immediatley + immediately + immediatly + immediately + immidately + immediately + immidiately + immediately + immitate + imitate + immitated + imitated + immitating + imitating + immitator + imitator + immunosupressant + immunosuppressant + impecabbly + impeccably + impedence + impedance + implamenting + implementing + impliment + implement + implimented + implemented + imploys + employs + importamt + important + imprioned + imprisoned + imprisonned + imprisoned + improvision + improvisation + improvments + improvements + inablility + inability + inaccessable + inaccessible + inadiquate + inadequate + inadquate + inadequate + inadvertant + inadvertent + inadvertantly + inadvertently + inagurated + inaugurated + inaguration + inauguration + inappropiate + inappropriate + inaugures + inaugurates + inbalance + imbalance + inbalanced + imbalanced + inbetween + between + incarcirated + incarcerated + incidentially + incidentally + incidently + incidentally + inclreased + increased + includ + include + includng + including + incompatabilities + incompatibilities + incompatability + incompatibility + incompatable + incompatible + incompatablities + incompatibilities + incompatablity + incompatibility + incompatiblities + incompatibilities + incompatiblity + incompatibility + incompetance + incompetence + incompetant + incompetent + incomptable + incompatible + incomptetent + incompetent + inconsistant + inconsistent + incoroporated + incorporated + incorperation + incorporation + incorportaed + incorporated + incorprates + incorporates + incorruptable + incorruptible + incramentally + incrementally + increadible + incredible + incredable + incredible + inctroduce + introduce + inctroduced + introduced + incuding + including + incunabla + incunabula + indefinately + indefinitely + indefineable + undefinable + indefinitly + indefinitely + indentical + identical + indepedantly + independently + indepedence + independence + independance + independence + independant + independent + independantly + independently + independece + independence + independendet + independent + indespensable + indispensable + indespensible + indispensable + indictement + indictment + indigineous + indigenous + indipendence + independence + indipendent + independent + indipendently + independently + indispensible + indispensable + indisputible + indisputable + indisputibly + indisputably + indite + indict + individualy + individually + indpendent + independent + indpendently + independently + indulgue + indulge + indutrial + industrial + indviduals + individuals + inefficienty + inefficiently + inevatible + inevitable + inevitible + inevitable + inevititably + inevitably + infalability + infallibility + infallable + infallible + infectuous + infectious + infered + inferred + infilitrate + infiltrate + infilitrated + infiltrated + infilitration + infiltration + infinit + infinite + inflamation + inflammation + influencial + influential + influented + influenced + infomation + information + informtion + information + infrantryman + infantryman + infrigement + infringement + ingenius + ingenious + ingreediants + ingredients + inhabitans + inhabitants + inherantly + inherently + inheritence + inheritance + inital + initial + initally + initially + initation + initiation + initiaitive + initiative + inlcuding + including + inmigrant + immigrant + inmigrants + immigrants + innoculated + inoculated + inocence + innocence + inofficial + unofficial + inot + into + inpeach + impeach + inpolite + impolite + inprisonment + imprisonment + inproving + improving + insectiverous + insectivorous + insensative + insensitive + inseperable + inseparable + insistance + insistence + insitution + institution + insitutions + institutions + inspite + in spite + instade + instead + instatance + instance + institue + institute + instuction + instruction + instuments + instruments + instutionalized + institutionalized + instutions + intuitions + insurence + insurance + intelectual + intellectual + inteligence + intelligence + inteligent + intelligent + intenational + international + intented + intended + intepretation + interpretation + intepretator + interpretor + interational + international + interbread + interbreed + interchangable + interchangeable + interchangably + interchangeably + intercontinetal + intercontinental + intered + interred + interelated + interrelated + interferance + interference + interfereing + interfering + intergrated + integrated + intergration + integration + interm + interim + internation + international + interpet + interpret + interrim + interim + interrugum + interregnum + intertaining + entertaining + interupt + interrupt + intervines + intervenes + intevene + intervene + intial + initial + intially + initially + intrduced + introduced + intrest + interest + introdued + introduced + intruduced + introduced + intrument + instrument + intrumental + instrumental + intruments + instruments + intrusted + entrusted + intutive + intuitive + intutively + intuitively + inudstry + industry + inventer + inventor + invertibrates + invertebrates + investingate + investigate + involvment + involvement + irelevent + irrelevant + iresistable + irresistible + iresistably + irresistibly + iresistible + irresistible + iresistibly + irresistibly + iritable + irritable + iritated + irritated + ironicly + ironically + irregardless + regardless + irrelevent + irrelevant + irreplacable + irreplaceable + irresistable + irresistible + irresistably + irresistibly + isnt + isn't + issueing + issuing + itnroduced + introduced + iunior + junior + iwll + will + iwth + with + jaques + jacques + jeapardy + jeopardy + jewllery + jewellery + jouney + journey + journied + journeyed + journies + journeys + jstu + just + jsut + just + judical + judicial + judisuary + judiciary + juducial + judicial + juristiction + jurisdiction + juristictions + jurisdictions + kindergarden + kindergarten + klenex + kleenex + knifes + knives + knive + knife + knowlege + knowledge + knowlegeable + knowledgeable + knwo + know + knwos + knows + konw + know + konws + knows + kwno + know + labatory + laboratory + labratory + laboratory + laguage + language + laguages + languages + larg + large + largst + largest + larrry + larry + lastr + last + lattitude + latitude + launhed + launched + lavae + larvae + layed + laid + lazyness + laziness + leage + league + leanr + learn + leathal + lethal + lefted + left + legitamate + legitimate + legitmate + legitimate + leibnitz + leibniz + lenght + length + leran + learn + lerans + learns + leutenant + lieutenant + levetate + levitate + levetated + levitated + levetates + levitates + levetating + levitating + levle + level + liasion + liaison + liason + liaison + liasons + liaisons + libary + library + libell + libel + libguistic + linguistic + libguistics + linguistics + libitarianisn + libertarianism + lieing + lying + liek + like + liekd + liked + liesure + leisure + lieuenant + lieutenant + lieved + lived + liftime + lifetime + lightyear + light year + lightyears + light years + likelyhood + likelihood + linnaena + linnaean + lippizaner + lipizzaner + liquify + liquefy + liscense + license + lisence + license + lisense + license + listners + listeners + litature + literature + literaly + literally + literture + literature + littel + little + litterally + literally + liuke + like + livley + lively + lmits + limits + loev + love + lonelyness + loneliness + longitudonal + longitudinal + lonley + lonely + lonly + lonely + loosing + losing + lotharingen + lothringen + lsat + last + lukid + likud + lveo + love + lvoe + love + maching + machine + mackeral + mackerel + magasine + magazine + magincian + magician + magnificient + magnificent + magolia + magnolia + mailny + mainly + maintainance + maintenance + maintainence + maintenance + maintance + maintenance + maintenence + maintenance + maintinaing + maintaining + maintioned + mentioned + majoroty + majority + maked + marked + makse + makes + maltesian + Maltese + mamal + mammal + mamalian + mammalian + managable + manageable + managment + management + maneouvre + manoeuvre + maneouvred + manoeuvred + maneouvres + manoeuvres + maneouvring + manoeuvring + manisfestations + manifestations + manoeuverability + maneuverability + manouver + maneuver + manouverability + maneuverability + manouverable + maneuverable + manouvers + maneuvers + mantained + maintained + manuever + maneuver + manuevers + maneuvers + manufacturedd + manufactured + manufature + manufacture + manufatured + manufactured + manufaturing + manufacturing + manuver + maneuver + mariage + marriage + marjority + majority + markes + marks + marketting + marketing + marmelade + marmalade + marrage + marriage + marraige + marriage + marrtyred + martyred + marryied + married + massmedia + mass media + masterbation + masturbation + mataphysical + metaphysical + materalists + materialist + mathamatics + mathematics + mathematican + mathematician + mathematicas + mathematics + matheticians + mathematicians + mathmatically + mathematically + mathmatician + mathematician + mathmaticians + mathematicians + mccarthyst + mccarthyist + mchanics + mechanics + meaninng + meaning + mear + wear + mechandise + merchandise + medacine + medicine + medeival + medieval + medevial + medieval + mediciney + mediciny + medievel + medieval + mediterainnean + mediterranean + meerkrat + meerkat + melieux + milieux + membranaphone + membranophone + memeber + member + menally + mentally + meranda + Miranda + mercentile + mercantile + messanger + messenger + messenging + messaging + metalic + metallic + metalurgic + metallurgic + metalurgical + metallurgical + metalurgy + metallurgy + metamorphysis + metamorphosis + metaphoricial + metaphorical + meterologist + meteorologist + meterology + meteorology + methaphor + metaphor + methaphors + metaphors + micoscopy + microscopy + midwifes + midwives + mileau + milieu + milennia + millennia + milennium + millennium + mileu + milieu + miliary + military + milion + million + miliraty + military + millenia + millennia + millenial + millennial + millenialism + millennialism + millenium + millennium + millepede + millipede + millioniare + millionaire + millitary + military + millon + million + miltary + military + minature + miniature + minerial + mineral + miniscule + minuscule + ministery + ministry + minstries + ministries + minstry + ministry + minumum + minimum + mirrorred + mirrored + miscelaneous + miscellaneous + miscellanious + miscellaneous + miscellanous + miscellaneous + mischeivous + mischievous + mischevious + mischievous + mischievious + mischievous + misdameanor + misdemeanor + misdameanors + misdemeanors + misdemenor + misdemeanor + misdemenors + misdemeanors + misfourtunes + misfortunes + misile + missile + mispell + misspell + mispelled + misspelled + mispelling + misspelling + missen + mizzen + missle + missile + missonary + missionary + misterious + mysterious + mistery + mystery + misteryous + mysterious + mkae + make + mkaes + makes + mkaing + making + mkea + make + moderm + modem + modle + model + moent + moment + moeny + money + mohammedans + muslims + moil + soil + moleclues + molecules + momento + memento + monestaries + monasteries + monestary + monastery + monickers + monikers + monolite + monolithic + montains + mountains + montanous + mountainous + monts + months + montypic + monotypic + moreso + more so + morgage + mortgage + morroccan + moroccan + morrocco + morocco + morroco + morocco + mortage + mortgage + mosture + moisture + motiviated + motivated + mounth + month + movei + movie + movment + movement + mroe + more + mucuous + mucous + muder + murder + mudering + murdering + muhammadan + muslim + multicultralism + multiculturalism + multipled + multiplied + multiplers + multipliers + munbers + numbers + muncipalities + municipalities + muncipality + municipality + munnicipality + municipality + muscels + muscles + muscial + musical + muscician + musician + muscicians + musicians + mutiliated + mutilated + myraid + myriad + mysef + myself + mysogynist + misogynist + mysogyny + misogyny + mysterous + mysterious + naieve + naive + naturaly + naturally + naturely + naturally + naturual + natural + naturually + naturally + neccesarily + necessarily + neccesary + necessary + neccessarily + necessarily + neccessary + necessary + neccessities + necessities + necesarily + necessarily + necesary + necessary + necessiate + necessitate + neglible + negligible + negligable + negligible + negociate + negotiate + negociation + negotiation + negociations + negotiations + negotation + negotiation + neice + niece + neigborhood + neighborhood + neigbour + neighbour + neigbourhood + neighbourhood + neolitic + neolithic + nessasarily + necessarily + nessecary + necessary + nestin + nesting + neverthless + nevertheless + newletters + newsletters + nickle + nickel + nightfa;; + nightfall + nightime + nighttime + nineth + ninth + ninteenth + nineteenth + ninties + 1990s + ninty + ninety + nkow + know + nkwo + know + nmae + name + noncombatents + noncombatants + nonsence + nonsense + nontheless + nonetheless + noone + no one + norhern + northern + northen + northern + northereastern + northeastern + notabley + notably + noteable + notable + noteably + notably + noteriety + notoriety + noth + north + nothern + northern + noticable + noticeable + noticably + noticeably + noticeing + noticing + noticible + noticeable + notwhithstanding + notwithstanding + noveau + nouveau + nowdays + nowadays + nowe + now + nto + not + nucular + nuclear + nuculear + nuclear + nuisanse + nuisance + numberous + numerous + nusance + nuisance + nutritent + nutrient + nutritents + nutrients + nuturing + nurturing + obediance + obedience + obediant + obedient + obession + obsession + obssessed + obsessed + obstacal + obstacle + obstancles + obstacles + obstruced + obstructed + ocasion + occasion + ocasional + occasional + ocasionally + occasionally + ocasionaly + occasionally + ocasioned + occasioned + ocasions + occasions + ocassion + occasion + ocassional + occasional + ocassionally + occasionally + ocassionaly + occasionally + ocassioned + occasioned + ocassions + occasions + occaison + occasion + occassion + occasion + occassional + occasional + occassionally + occasionally + occassionaly + occasionally + occassioned + occasioned + occassions + occasions + occationally + occasionally + occour + occur + occurance + occurrence + occurances + occurrences + occured + occurred + occurence + occurrence + occurences + occurrences + occuring + occurring + occurr + occur + occurrance + occurrence + occurrances + occurrences + octohedra + octahedra + octohedral + octahedral + octohedron + octahedron + ocuntries + countries + ocuntry + country + ocurr + occur + ocurrance + occurrence + ocurred + occurred + ocurrence + occurrence + offcers + officers + offcially + officially + offereings + offerings + offical + official + offically + officially + officals + officials + officaly + officially + officialy + officially + offred + offered + oftenly + often + oging + going + omision + omission + omited + omitted + omiting + omitting + omlette + omelette + ommision + omission + ommited + omitted + ommiting + omitting + ommitted + omitted + ommitting + omitting + omniverous + omnivorous + omniverously + omnivorously + omre + more + onot + note + onxy + onyx + onyl + only + openess + openness + oponent + opponent + oportunity + opportunity + opose + oppose + oposite + opposite + oposition + opposition + oppenly + openly + oppinion + opinion + opponant + opponent + oppononent + opponent + oppositition + opposition + oppossed + opposed + opprotunity + opportunity + opression + oppression + opressive + oppressive + opthalmic + ophthalmic + opthalmologist + ophthalmologist + opthalmology + ophthalmology + opthamologist + ophthalmologist + optmizations + optimizations + optomism + optimism + orded + ordered + organim + organism + organistion + organisation + organiztion + organization + orgin + origin + orginal + original + orginally + originally + orginize + organise + oridinarily + ordinarily + origanaly + originally + originall + original + originaly + originally + originially + originally + originnally + originally + origional + original + orignally + originally + orignially + originally + otehr + other + oublisher + publisher + ouevre + oeuvre + oustanding + outstanding + overshaddowed + overshadowed + overthere + over there + overwelming + overwhelming + overwheliming + overwhelming + owrk + work + owudl + would + oxigen + oxygen + oximoron + oxymoron + p0enis + penis + paide + paid + paitience + patience + palce + place + paleolitic + paleolithic + paliamentarian + parliamentarian + pallete + palette + pamflet + pamphlet + pamplet + pamphlet + pantomine + pantomime + paralel + parallel + paralell + parallel + paralelly + parallelly + paralely + parallelly + parallely + parallelly + paranthesis + parenthesis + paraphenalia + paraphernalia + parellels + parallels + parituclar + particular + parliment + parliament + parrakeets + parakeets + parralel + parallel + parrallel + parallel + parrallell + parallel + parrallelly + parallelly + parrallely + parallelly + partialy + partially + particually + particularly + particualr + particular + particuarly + particularly + particularily + particularly + particulary + particularly + pary + party + pased + passed + pasengers + passengers + passerbys + passersby + pasttime + pastime + pastural + pastoral + paticular + particular + pattented + patented + pavillion + pavilion + payed + paid + pblisher + publisher + pbulisher + publisher + peacefuland + peaceful and + peageant + pageant + peculure + peculiar + pedestrain + pedestrian + peformed + performed + peice + piece + penatly + penalty + penerator + penetrator + penisula + peninsula + penisular + peninsular + penninsula + peninsula + penninsular + peninsular + pennisula + peninsula + pensinula + peninsula + peom + poem + peoms + poems + peopel + people + peotry + poetry + perade + parade + percepted + perceived + percieve + perceive + percieved + perceived + perenially + perennially + perfomance + performance + perfomers + performers + performence + performance + performes + performed + perhasp + perhaps + perheaps + perhaps + perhpas + perhaps + peripathetic + peripatetic + peristent + persistent + perjery + perjury + perjorative + pejorative + permanant + permanent + permenant + permanent + permenantly + permanently + permissable + permissible + perogative + prerogative + peronal + personal + perosnality + personality + perphas + perhaps + perpindicular + perpendicular + perseverence + perseverance + persistance + persistence + persistant + persistent + personel + personnel + personell + personnel + personnell + personnel + persuded + persuaded + persue + pursue + persued + pursued + persuing + pursuing + persuit + pursuit + persuits + pursuits + pertubation + perturbation + pertubations + perturbations + pessiary + pessary + petetion + petition + phenomenom + phenomenon + phenomenonal + phenomenal + phenomenonly + phenomenally + phenomonenon + phenomenon + phenomonon + phenomenon + phenonmena + phenomena + philisopher + philosopher + philisophical + philosophical + philisophy + philosophy + phillosophically + philosophically + philospher + philosopher + philosphies + philosophies + philosphy + philosophy + phongraph + phonograph + phylosophical + philosophical + physicaly + physically + piblisher + publisher + pich + pitch + pilgrimmage + pilgrimage + pilgrimmages + pilgrimages + pinapple + pineapple + pinnaple + pineapple + pinoneered + pioneered + plagarism + plagiarism + planation + plantation + planed + planned + plantiff + plaintiff + plateu + plateau + plausable + plausible + playright + playwright + playwrite + playwright + playwrites + playwrights + pleasent + pleasant + plebicite + plebiscite + plesant + pleasant + poenis + penis + poeoples + peoples + poety + poetry + poisin + poison + polical + political + polinator + pollinator + polinators + pollinators + politican + politician + politicans + politicians + poltical + political + polute + pollute + poluted + polluted + polutes + pollutes + poluting + polluting + polution + pollution + polyphonyic + polyphonic + polysaccaride + polysaccharide + polysaccharid + polysaccharide + pomegranite + pomegranate + pomotion + promotion + poportional + proportional + popoulation + population + popularaty + popularity + populare + popular + populer + popular + portait + portrait + portayed + portrayed + portraing + portraying + portuguease + portuguese + portugues + Portuguese + posess + possess + posessed + possessed + posesses + possesses + posessing + possessing + posession + possession + posessions + possessions + posion + poison + positon + position + possable + possible + possably + possibly + posseses + possesses + possesing + possessing + possesion + possession + possessess + possesses + possibile + possible + possibilty + possibility + possiblility + possibility + possiblilty + possibility + possiblities + possibilities + possiblity + possibility + possition + position + posthomous + posthumous + postion + position + postive + positive + potatos + potatoes + potrait + portrait + potrayed + portrayed + poulations + populations + poverful + powerful + poweful + powerful + powerfull + powerful + ppublisher + publisher + practial + practical + practially + practically + practicaly + practically + practicioner + practitioner + practicioners + practitioners + practicly + practically + practioner + practitioner + practioners + practitioners + prairy + prairie + prarie + prairie + praries + prairies + pratice + practice + preample + preamble + precedessor + predecessor + preceed + precede + preceeded + preceded + preceeding + preceding + preceeds + precedes + precentage + percentage + precice + precise + precisly + precisely + precurser + precursor + predecesors + predecessors + predicatble + predictable + predicitons + predictions + predomiantly + predominately + prefered + preferred + prefering + preferring + preferrably + preferably + pregancies + pregnancies + preiod + period + preliferation + proliferation + premeire + premiere + premeired + premiered + premillenial + premillennial + preminence + preeminence + premission + permission + preocupation + preoccupation + prepair + prepare + prepartion + preparation + prepatory + preparatory + preperation + preparation + preperations + preparations + preriod + period + presedential + presidential + presense + presence + presidenital + presidential + presidental + presidential + presitgious + prestigious + prespective + perspective + prestigeous + prestigious + prestigous + prestigious + presumabely + presumably + presumibly + presumably + pretection + protection + prevelant + prevalent + preverse + perverse + previvous + previous + pricipal + principal + priciple + principle + priestood + priesthood + primarly + primarily + primative + primitive + primatively + primitively + primatives + primitives + primordal + primordial + priveledges + privileges + privelege + privilege + priveleged + privileged + priveleges + privileges + privelige + privilege + priveliged + privileged + priveliges + privileges + privelleges + privileges + privilage + privilege + priviledge + privilege + priviledges + privileges + privledge + privilege + privte + private + probabilaty + probability + probablistic + probabilistic + probablly + probably + probalibity + probability + probaly + probably + probelm + problem + proccess + process + proccessing + processing + procede + proceed + proceded + proceeded + procedes + proceeds + procedger + procedure + proceding + proceeding + procedings + proceedings + proceedure + procedure + proces + process + processer + processor + proclaimation + proclamation + proclamed + proclaimed + proclaming + proclaiming + proclomation + proclamation + profesion + profession + profesor + professor + professer + professor + proffesed + professed + proffesion + profession + proffesional + professional + proffesor + professor + profilic + prolific + progessed + progressed + programable + programmable + progrom + program + progroms + programs + prohabition + prohibition + prologomena + prolegomena + prominance + prominence + prominant + prominent + prominantly + prominently + prominately + prominently + promiscous + promiscuous + promotted + promoted + pronomial + pronominal + pronouced + pronounced + pronounched + pronounced + pronounciation + pronunciation + proove + prove + prooved + proved + prophacy + prophecy + propietary + proprietary + propmted + prompted + propoganda + propaganda + propogate + propagate + propogates + propagates + propogation + propagation + propostion + proposition + propotions + proportions + propper + proper + propperly + properly + proprietory + proprietary + proseletyzing + proselytizing + protaganist + protagonist + protaganists + protagonists + protocal + protocol + protoganist + protagonist + protrayed + portrayed + protruberance + protuberance + protruberances + protuberances + prouncements + pronouncements + provacative + provocative + provded + provided + provicial + provincial + provinicial + provincial + provisiosn + provision + provisonal + provisional + proximty + proximity + pseudononymous + pseudonymous + pseudonyn + pseudonym + psuedo + pseudo + psycology + psychology + psyhic + psychic + pubilsher + publisher + pubisher + publisher + publiaher + publisher + publically + publicly + publicaly + publicly + publicher + publisher + publihser + publisher + publisehr + publisher + publiser + publisher + publisger + publisher + publisheed + published + publisherr + publisher + publishher + publisher + publishor + publisher + publishre + publisher + publissher + publisher + publlisher + publisher + publsiher + publisher + publusher + publisher + puchasing + purchasing + pulisher + publisher + pumkin + pumpkin + puplisher + publisher + puritannical + puritanical + purposedly + purposely + purpotedly + purportedly + pursuade + persuade + pursuaded + persuaded + pursuades + persuades + pususading + persuading + puting + putting + pwoer + power + pyscic + psychic + qtuie + quiet + quantaty + quantity + quantitiy + quantity + quarantaine + quarantine + questonable + questionable + quicklyu + quickly + quinessential + quintessential + quitted + quit + quizes + quizzes + qutie + quiet + rabinnical + rabbinical + racaus + raucous + radiactive + radioactive + radify + ratify + raelly + really + rarified + rarefied + reaccurring + recurring + reacing + reaching + reacll + recall + readmition + readmission + realitvely + relatively + realsitic + realistic + realtions + relations + realy + really + realyl + really + reasearch + research + rebiulding + rebuilding + rebllions + rebellions + rebounce + rebound + reccomend + recommend + reccomendations + recommendations + reccomended + recommended + reccomending + recommending + reccommend + recommend + reccommended + recommended + reccommending + recommending + reccuring + recurring + receeded + receded + receeding + receding + receivedfrom + received from + recepient + recipient + recepients + recipients + receving + receiving + rechargable + rechargeable + reched + reached + recide + reside + recided + resided + recident + resident + recidents + residents + reciding + residing + reciepents + recipients + reciept + receipt + recieve + receive + recieved + received + reciever + receiver + recievers + receivers + recieves + receives + recieving + receiving + recipiant + recipient + recipiants + recipients + recived + received + recivership + receivership + recogise + recognise + recogize + recognize + recomend + recommend + recomended + recommended + recomending + recommending + recomends + recommends + recommedations + recommendations + reconaissance + reconnaissance + reconcilation + reconciliation + reconized + recognized + reconnaisance + reconnaissance + reconnaissence + reconnaissance + recontructed + reconstructed + recordproducer + record producer + recquired + required + recrational + recreational + recrod + record + recuiting + recruiting + recuring + recurring + recurrance + recurrence + rediculous + ridiculous + reedeming + redeeming + reenforced + reinforced + refect + reflect + refedendum + referendum + referal + referral + referece + reference + refereces + references + refered + referred + referemce + reference + referemces + references + referencs + references + referenece + reference + refereneced + referenced + refereneces + references + referiang + referring + refering + referring + refernce + references + refernces + references + referrence + reference + referrences + references + referrs + refers + reffered + referred + refference + reference + reffering + referring + refrence + reference + refrences + references + refrers + refers + refridgeration + refrigeration + refridgerator + refrigerator + refromist + reformist + refusla + refusal + regardes + regards + regluar + regular + reguarly + regularly + regulaion + regulation + regulaotrs + regulators + regularily + regularly + rehersal + rehearsal + reicarnation + reincarnation + reigining + reigning + reknown + renown + reknowned + renowned + rela + real + relaly + really + relatiopnship + relationship + relativly + relatively + relected + reelected + releive + relieve + releived + relieved + releiver + reliever + releses + releases + relevence + relevance + relevent + relevant + reliablity + reliability + relient + reliant + religeous + religious + religous + religious + religously + religiously + relinqushment + relinquishment + relitavely + relatively + relized + realized + relpacement + replacement + remaing + remaining + remeber + remember + rememberable + memorable + rememberance + remembrance + remembrence + remembrance + remenant + remnant + remenicent + reminiscent + reminent + remnant + reminescent + reminiscent + reminscent + reminiscent + reminsicent + reminiscent + rendevous + rendezvous + rendezous + rendezvous + renedered + rende + renewl + renewal + rennovate + renovate + rennovated + renovated + rennovating + renovating + rennovation + renovation + rentors + renters + reoccurrence + recurrence + reorganision + reorganisation + repatition + repetition + repectively + respectively + repeition + repetition + repentence + repentance + repentent + repentant + repeteadly + repeatedly + repetion + repetition + repid + rapid + reponse + response + reponsible + responsible + reportadly + reportedly + represantative + representative + representive + representative + representives + representatives + reproducable + reproducible + reprtoire + repertoire + repsectively + respectively + reptition + repetition + requirment + requirement + requred + required + resaurant + restaurant + resembelance + resemblance + resembes + resembles + resemblence + resemblance + resevoir + reservoir + residental + residential + resignement + resignment + resistable + resistible + resistence + resistance + resistent + resistant + respectivly + respectively + responce + response + responibilities + responsibilities + responisble + responsible + responnsibilty + responsibility + responsability + responsibility + responsibile + responsible + responsibilites + responsibilities + responsiblities + responsibilities + responsiblity + responsibility + ressemblance + resemblance + ressemble + resemble + ressembled + resembled + ressemblence + resemblance + ressembling + resembling + resssurecting + resurrecting + ressurect + resurrect + ressurected + resurrected + ressurection + resurrection + ressurrection + resurrection + restarant + restaurant + restarants + restaurants + restaraunt + restaurant + restaraunteur + restaurateur + restaraunteurs + restaurateurs + restaraunts + restaurants + restauranteurs + restaurateurs + restauration + restoration + restauraunt + restaurant + resteraunt + restaurant + resteraunts + restaurants + resticted + restricted + restraunt + restraint + resturant + restaurant + resturants + restaurants + resturaunt + restaurant + resturaunts + restaurants + resurecting + resurrecting + retalitated + retaliated + retalitation + retaliation + retreive + retrieve + returnd + returned + revaluated + reevaluated + reveiw + review + reveral + reversal + reversable + reversible + revolutionar + revolutionary + rewitten + rewritten + rewriet + rewrite + rference + reference + rferences + references + rhymme + rhyme + rhythem + rhythm + rhythim + rhythm + rhytmic + rhythmic + rigourous + rigorous + rininging + ringing + rised + rose + rococco + rococo + rocord + record + roomate + roommate + rougly + roughly + rucuperate + recuperate + rudimentatry + rudimentary + rulle + rule + runing + running + runnung + running + russina + Russian + rwite + write + rythem + rhythm + rythim + rhythm + rythm + rhythm + rythmic + rhythmic + rythyms + rhythms + sacrafice + sacrifice + sacreligious + sacrilegious + sacrifical + sacrificial + saftey + safety + safty + safety + salery + salary + sanctionning + sanctioning + sandwhich + sandwich + santioned + sanctioned + sargant + sergeant + sargeant + sergeant + satelite + satellite + satelites + satellites + satisfactority + satisfactorily + satric + satiric + satrical + satirical + satrically + satirically + sattelite + satellite + sattelites + satellites + saught + sought + saveing + saving + saxaphone + saxophone + scaleable + scalable + scandanavia + Scandinavia + scaricity + scarcity + scavanged + scavenged + schedual + schedule + scholarhip + scholarship + scholarstic + scholastic + scientfic + scientific + scientifc + scientific + scientis + scientist + scince + science + scinece + science + scirpt + script + scoll + scroll + screenwrighter + screenwriter + scrutinity + scrutiny + scuptures + sculptures + seach + search + seached + searched + seaches + searches + secratary + secretary + secretery + secretary + sedereal + sidereal + seeked + sought + segementation + segmentation + seguoys + segues + seige + siege + seing + seeing + seinor + senior + seldomly + seldom + senarios + scenarios + senstive + sensitive + sensure + censure + seperate + separate + seperated + separated + seperately + separately + seperates + separates + seperating + separating + seperation + separation + seperatism + separatism + seperatist + separatist + sepina + subpoena + sergent + sergeant + settelement + settlement + settlment + settlement + severeal + several + severley + severely + severly + severely + sevice + service + shadasloo + shadaloo + shaddow + shadow + shadoloo + shadaloo + shamen + shaman + sheat + sheath + sheild + shield + sherif + sheriff + shineing + shining + shiped + shipped + shiping + shipping + shopkeeepers + shopkeepers + shorly + shortly + shortwhile + short while + shoudl + should + shoudln + shouldn't + shouldnt + shouldn't + shreak + shriek + shrinked + shrunk + sicne + since + sideral + sidereal + siezure + seizure + siezures + seizures + siginificant + significant + signficant + significant + signficiant + significant + signfies + signifies + signifantly + significantly + significently + significantly + signifigant + significant + signifigantly + significantly + signitories + signatories + signitory + signatory + similarily + similarly + similiar + similar + similiarity + similarity + similiarly + similarly + simmilar + similar + simpley + simply + simplier + simpler + simultanous + simultaneous + simultanously + simultaneously + sincerley + sincerely + singsog + singsong + sinse + since + skateing + skating + slaugterhouses + slaughterhouses + slighly + slightly + slowy + slowly + smae + same + smealting + smelting + smoe + some + sneeks + sneaks + snese + sneeze + socalism + socialism + socities + societies + soem + some + sofware + software + sohw + show + soilders + soldiers + solatary + solitary + soley + solely + soliders + soldiers + soliliquy + soliloquy + soluable + soluble + somene + someone + somtimes + sometimes + somwhere + somewhere + sophicated + sophisticated + sophmore + sophomore + sorceror + sorcerer + sorrounding + surrounding + sotry + story + sotyr + story + soudn + sound + soudns + sounds + sould + could + sountrack + soundtrack + sourth + south + sourthern + southern + souvenier + souvenir + souveniers + souvenirs + soveits + soviets + sovereignity + sovereignty + soverign + sovereign + soverignity + sovereignty + soverignty + sovereignty + spainish + Spanish + speach + speech + specfic + specific + speciallized + specialized + specifiying + specifying + speciman + specimen + spectauclar + spectacular + spectaulars + spectaculars + spectum + spectrum + speices + species + spendour + splendour + spermatozoan + spermatozoon + spoace + space + sponser + sponsor + sponsered + sponsored + spontanous + spontaneous + sponzored + sponsored + spoonfulls + spoonfuls + sppeches + speeches + spreaded + spread + sprech + speech + spred + spread + spriritual + spiritual + spritual + spiritual + sqaure + square + stablility + stability + stainlees + stainless + staion + station + standars + standards + stange + strange + startegic + strategic + startegies + strategies + startegy + strategy + stateman + statesman + statememts + statements + statment + statement + steriods + steroids + sterotypes + stereotypes + stilus + stylus + stingent + stringent + stiring + stirring + stirrs + stirs + stlye + style + stomache + stomach + stong + strong + stopry + story + storeis + stories + storise + stories + stornegst + strongest + stoyr + story + stpo + stop + stradegies + strategies + stradegy + strategy + strat + start + stratagically + strategically + streemlining + streamlining + stregth + strength + strenghen + strengthen + strenghened + strengthened + strenghening + strengthening + strenght + strength + strenghten + strengthen + strenghtened + strengthened + strenghtening + strengthening + strengtened + strengthened + strenous + strenuous + strictist + strictest + strikely + strikingly + strnad + strand + stroy + story + structual + structural + stubborness + stubbornness + stucture + structure + stuctured + structured + studdy + study + studing + studying + stuggling + struggling + sturcture + structure + subcatagories + subcategories + subcatagory + subcategory + subconsiously + subconsciously + subjudgation + subjugation + submachne + submachine + subpecies + subspecies + subsidary + subsidiary + subsiduary + subsidiary + subsquent + subsequent + subsquently + subsequently + substace + substance + substancial + substantial + substatial + substantial + substituded + substituted + substract + subtract + substracted + subtracted + substracting + subtracting + substraction + subtraction + substracts + subtracts + subtances + substances + subterranian + subterranean + suburburban + suburban + succceeded + succeeded + succcesses + successes + succedded + succeeded + succeded + succeeded + succeds + succeeds + succesful + successful + succesfully + successfully + succesfuly + successfully + succesion + succession + succesive + successive + successfull + successful + successully + successfully + succsess + success + succsessfull + successful + suceed + succeed + suceeded + succeeded + suceeding + succeeding + suceeds + succeeds + sucesful + successful + sucesfully + successfully + sucesfuly + successfully + sucesion + succession + sucess + success + sucesses + successes + sucessful + successful + sucessfull + successful + sucessfully + successfully + sucessfuly + successfully + sucession + succession + sucessive + successive + sucessor + successor + sucessot + successor + sucide + suicide + sucidial + suicidal + sufferage + suffrage + sufferred + suffered + sufferring + suffering + sufficent + sufficient + sufficently + sufficiently + sumary + summary + sunglases + sunglasses + suop + soup + superceeded + superseded + superintendant + superintendent + suphisticated + sophisticated + suplimented + supplemented + supose + suppose + suposed + supposed + suposedly + supposedly + suposes + supposes + suposing + supposing + supplamented + supplemented + suppliementing + supplementing + suppoed + supposed + supposingly + supposedly + suppy + supply + supress + suppress + supressed + suppressed + supresses + suppresses + supressing + suppressing + suprise + surprise + suprised + surprised + suprising + surprising + suprisingly + surprisingly + suprize + surprise + suprized + surprised + suprizing + surprising + suprizingly + surprisingly + surfce + surface + surley + surely + suround + surround + surounded + surrounded + surounding + surrounding + suroundings + surroundings + surounds + surrounds + surplanted + supplanted + surpress + suppress + surpressed + suppressed + surprize + surprise + surprized + surprised + surprizing + surprising + surprizingly + surprisingly + surrended + surrendered + surrepetitious + surreptitious + surrepetitiously + surreptitiously + surreptious + surreptitious + surreptiously + surreptitiously + surronded + surrounded + surrouded + surrounded + surrouding + surrounding + surrundering + surrendering + surveilence + surveillance + surveill + surveil + surveyer + surveyor + surviver + survivor + survivers + survivors + survivied + survived + suseptable + susceptible + suseptible + susceptible + suspention + suspension + swaer + swear + swaers + swears + swepth + swept + swiming + swimming + syas + says + symetrical + symmetrical + symetrically + symmetrically + symetry + symmetry + symettric + symmetric + symmetral + symmetric + symmetricaly + symmetrically + synagouge + synagogue + syncronization + synchronization + synonomous + synonymous + synonymns + synonyms + synphony + symphony + syphyllis + syphilis + sypmtoms + symptoms + syrap + syrup + sysmatically + systematically + sytem + system + sytle + style + tabacco + tobacco + tahn + than + taht + that + talekd + talked + targetted + targeted + targetting + targeting + tast + taste + tath + that + tattooes + tattoos + taxanomic + taxonomic + taxanomy + taxonomy + teached + taught + techician + technician + techicians + technicians + techiniques + techniques + technitian + technician + technnology + technology + technolgy + technology + teh + the + tehy + they + telelevision + television + televsion + television + telphony + telephony + temerature + temperature + tempalte + template + tempaltes + templates + temparate + temperate + temperarily + temporarily + temperment + temperament + tempertaure + temperature + temperture + temperature + temprary + temporary + tenacle + tentacle + tenacles + tentacles + tendacy + tendency + tendancies + tendencies + tendancy + tendency + tennisplayer + tennis player + tepmorarily + temporarily + terrestial + terrestrial + terriories + territories + terriory + territory + territorist + terrorist + territoy + territory + terroist + terrorist + testiclular + testicular + tghe + the + thast + that's + theather + theater + theese + these + theif + thief + theives + thieves + themselfs + themselves + themslves + themselves + ther + there + therafter + thereafter + therby + thereby + theri + their + theyre + they're + thgat + that + thge + the + thier + their + thign + thing + thigns + things + thigsn + things + thikn + think + thikning + thinking + thikns + thinks + thiunk + think + thn + then + thna + than + thne + then + thnig + thing + thnigs + things + thoughout + throughout + threatend + threatened + threatning + threatening + threee + three + threshhold + threshold + thrid + third + throrough + thorough + throughly + thoroughly + throught + throat + througout + throughout + thru + through + thsi + this + thsoe + those + thta + that + thyat + that + tiem + time + tihkn + think + tihs + this + timne + time + tiome + time + tje + the + tjhe + the + tjpanishad + upanishad + tkae + take + tkaes + takes + tkaing + taking + tlaking + talking + tobbaco + tobacco + todays + today's + todya + today + toghether + together + toke + took + tolerence + tolerance + tomatos + tomatoes + tommorow + tomorrow + tommorrow + tomorrow + tongiht + tonight + toriodal + toroidal + tormenters + tormentors + tornadoe + tornado + torpeados + torpedoes + torpedos + torpedoes + tothe + to the + toubles + troubles + tounge + tongue + tourch + torch + towords + towards + towrad + toward + tradionally + traditionally + traditionaly + traditionally + traditionnal + traditional + traditition + tradition + tradtionally + traditionally + trafficed + trafficked + trafficing + trafficking + trafic + traffic + trancendent + transcendent + trancending + transcending + tranform + transform + tranformed + transformed + transcendance + transcendence + transcendant + transcendent + transcendentational + transcendental + transcripting + transcribing + transending + transcending + transesxuals + transsexuals + transfered + transferred + transfering + transferring + transformaton + transformation + transistion + transition + translater + translator + translaters + translators + transmissable + transmissible + transporation + transportation + tremelo + tremolo + tremelos + tremolos + triguered + triggered + triology + trilogy + troling + trolling + troup + troupe + troups + troops + truely + truly + trustworthyness + trustworthiness + turnk + trunk + tust + trust + twelth + twelfth + twon + town + twpo + two + tyhat + that + tyhe + they + typcial + typical + typicaly + typically + tyranies + tyrannies + tyrany + tyranny + tyrranies + tyrannies + tyrrany + tyranny + ubiquitious + ubiquitous + ublisher + publisher + uise + use + ultimely + ultimately + unacompanied + unaccompanied + unahppy + unhappy + unanymous + unanimous + unathorised + unauthorised + unavailible + unavailable + unballance + unbalance + unbeknowst + unbeknownst + unbeleivable + unbelievable + uncertainity + uncertainty + unchallengable + unchallengeable + unchangable + unchangeable + uncompetive + uncompetitive + unconcious + unconscious + unconciousness + unconsciousness + unconfortability + discomfort + uncontitutional + unconstitutional + unconvential + unconventional + undecideable + undecidable + understoon + understood + undesireable + undesirable + undetecable + undetectable + undoubtely + undoubtedly + undreground + underground + uneccesary + unnecessary + unecessary + unnecessary + unequalities + inequalities + unforetunately + unfortunately + unforgetable + unforgettable + unforgiveable + unforgivable + unfortunatley + unfortunately + unfortunatly + unfortunately + unfourtunately + unfortunately + unihabited + uninhabited + unilateraly + unilaterally + unilatreal + unilateral + unilatreally + unilaterally + uninterruped + uninterrupted + uninterupted + uninterrupted + univeral + universal + univeristies + universities + univeristy + university + univerity + university + universtiy + university + univesities + universities + univesity + university + unkown + unknown + unlikey + unlikely + unmanouverable + unmaneuverable + unmistakeably + unmistakably + unneccesarily + unnecessarily + unneccesary + unnecessary + unneccessarily + unnecessarily + unneccessary + unnecessary + unnecesarily + unnecessarily + unnecesary + unnecessary + unoffical + unofficial + unoperational + nonoperational + unoticeable + unnoticeable + unplease + displease + unplesant + unpleasant + unprecendented + unprecedented + unprecidented + unprecedented + unrepentent + unrepentant + unrepetant + unrepentant + unrepetent + unrepentant + unsed + unused + unsubstanciated + unsubstantiated + unsuccesful + unsuccessful + unsuccesfully + unsuccessfully + unsuccessfull + unsuccessful + unsucesful + unsuccessful + unsucesfuly + unsuccessfully + unsucessful + unsuccessful + unsucessfull + unsuccessful + unsucessfully + unsuccessfully + unsuprised + unsurprised + unsuprising + unsurprising + unsuprisingly + unsurprisingly + unsuprized + unsurprised + unsuprizing + unsurprising + unsuprizingly + unsurprisingly + unsurprized + unsurprised + unsurprizing + unsurprising + unsurprizingly + unsurprisingly + untill + until + untranslateable + untranslatable + unuseable + unusable + unusuable + unusable + unviersity + university + unwarrented + unwarranted + unweildly + unwieldy + unwieldly + unwieldy + upcomming + upcoming + upgradded + upgraded + upto + up to + usally + usually + useage + usage + usefull + useful + usefuly + usefully + useing + using + usualy + usually + ususally + usually + vaccum + vacuum + vaccume + vacuum + vacinity + vicinity + vaguaries + vagaries + vaieties + varieties + vailidty + validity + valetta + valletta + valuble + valuable + valueable + valuable + varations + variations + varient + variant + variey + variety + varing + varying + varities + varieties + varity + variety + vasall + vassal + vasalls + vassals + vegatarian + vegetarian + vegitable + vegetable + vegitables + vegetables + vegtable + vegetable + vehicule + vehicle + vell + well + venemous + venomous + vengance + vengeance + vengence + vengeance + verfication + verification + verison + version + verisons + versions + vermillion + vermilion + versitilaty + versatility + versitlity + versatility + vetween + between + veyr + very + vigeur + vigor + vigilence + vigilance + vigourous + vigorous + villian + villain + villification + vilification + villify + vilify + villin + villain + vincinity + vicinity + violentce + violence + virtualy + virtually + virutal + virtual + virutally + virtually + visable + visible + visably + visibly + visting + visiting + vistors + visitors + vitories + victories + volcanoe + volcano + voleyball + volleyball + volontary + voluntary + volonteer + volunteer + volonteered + volunteered + volonteering + volunteering + volonteers + volunteers + volounteer + volunteer + volounteered + volunteered + volounteering + volunteering + volounteers + volunteers + volumne + volume + vreity + variety + vrey + very + vriety + variety + vulnerablility + vulnerability + vyer + very + vyre + very + waht + what + wanna + want to + warantee + warranty + wardobe + wardrobe + warrent + warrant + warrriors + warriors + wasnt + wasn't + wass + was + watn + want + wayword + wayward + weaponary + weaponry + weas + was + wehn + when + weild + wield + weilded + wielded + wendsay + Wednesday + wensday + Wednesday + wereabouts + whereabouts + whant + want + whants + wants + whcih + which + wheras + whereas + wherease + whereas + whereever + wherever + whic + which + whihc + which + whith + with + whlch + which + whn + when + wholey + wholly + wholy + holy + whta + what + whther + whether + wich + which + widesread + widespread + wief + wife + wierd + weird + wiew + view + wih + with + wiht + with + wille + will + willingless + willingness + wirting + writing + withdrawl + withdrawal + witheld + withheld + withh + with + withing + within + withold + withhold + witht + with + witn + with + wiull + will + wnat + want + wnated + wanted + wnats + wants + wohle + whole + wokr + work + wokring + working + wonderfull + wonderful + wont + won't + wordlwide + worldwide + workststion + workstation + worls + world + worstened + worsened + woudl + would + wresters + wrestlers + wriet + write + writen + written + wroet + wrote + wrok + work + wroking + working + wtih + with + wupport + support + xenophoby + xenophobia + yaching + yachting + yaer + year + yaerly + yearly + yaers + years + yatch + yacht + yearm + year + yeasr + years + yeild + yield + yeilding + yielding + yera + year + yeras + years + yersa + years + yotube + YouTube + youre + you're + youseff + yousef + youself + yourself + ytou + you + yuo + you + zeebra + zebra + + + diff --git a/indra/newview/llautoreplace.cpp b/indra/newview/llautoreplace.cpp index 10005aee9f..0432bf735a 100644 --- a/indra/newview/llautoreplace.cpp +++ b/indra/newview/llautoreplace.cpp @@ -1,4 +1,4 @@ -/** +/** * @file llautoreplace.cpp * @brief Auto Replace Manager * @@ -10,12 +10,12 @@ * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -32,10 +32,10 @@ LLAutoReplace* LLAutoReplace::sInstance; +const char* LLAutoReplace::SETTINGS_FILE_NAME = "settings_autoreplace.xml"; + LLAutoReplace::LLAutoReplace() { - sInstance = this; - sInstance->loadFromDisk(); } LLAutoReplace::~LLAutoReplace() @@ -55,29 +55,27 @@ void LLAutoReplace::autoreplaceCallback(LLUIString& inputText, S32& cursorPos) { return; } - - LLWString text = inputText.getWString(); + LLWString text = inputText.getWString(); if(text.size()<1) { return; } - + if(LLWStringUtil::isPartOfWord(text[wordEnd])) { return;//we only check on word breaks } - - wordEnd--; - if(LLWStringUtil::isPartOfWord(text[wordEnd])) + wordEnd--; + if ( LLWStringUtil::isPartOfWord(text[wordEnd]) ) { while ((wordEnd > 0) && (' ' != text[wordEnd-1])) { wordEnd--; } - wordStart=wordEnd; + wordStart=wordEnd; while ((wordEnd < (S32)text.length()) && (' ' != text[wordEnd])) { @@ -86,7 +84,7 @@ void LLAutoReplace::autoreplaceCallback(LLUIString& inputText, S32& cursorPos) std::string strLastWord = std::string(text.begin(), text.end()); std::string lastTypedWord = strLastWord.substr(wordStart, wordEnd-wordStart); - std::string replacedWord(replaceWord(lastTypedWord)); + std::string replacedWord( mSettings.replaceWord(lastTypedWord) ); if(replacedWord != lastTypedWord) { @@ -94,7 +92,6 @@ void LLAutoReplace::autoreplaceCallback(LLUIString& inputText, S32& cursorPos) LLWString strOld = utf8str_to_wstring(lastTypedWord); int nDiff = strNew.size() - strOld.size(); - //int wordStart = regText.find(lastTypedWord); text.replace(wordStart,lastTypedWord.length(),strNew); inputText = wstring_to_utf8str(text); cursorPos+=nDiff; @@ -108,307 +105,623 @@ LLAutoReplace* LLAutoReplace::getInstance() if(!sInstance) { sInstance = new LLAutoReplace(); + sInstance->loadFromSettings(); } return sInstance; } -void LLAutoReplace::save() -{ - saveToDisk(mAutoReplaces); -} - -std::string LLAutoReplace::getFileName() +std::string LLAutoReplace::getUserSettingsFileName() { std::string path=gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""); if (!path.empty()) { - path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings_autoreplace.xml"); + path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, SETTINGS_FILE_NAME); } - return path; + return path; } -std::string LLAutoReplace::getDefaultFileName() +std::string LLAutoReplace::getAppSettingsFileName() { std::string path=gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""); if (!path.empty()) { - path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "settings_autoreplace.xml"); + path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, SETTINGS_FILE_NAME); } - return path; + else + { + LL_ERRS("AutoReplace") << "Failed to get app settings directory name" << LL_ENDL; + } + return path; } -LLSD LLAutoReplace::exportList(std::string listName) +LLAutoReplaceSettings LLAutoReplace::getSettings() { - LLSD toReturn; - if(mAutoReplaces.has(listName)) - { - toReturn["listName"]=listName; - toReturn["data"]=mAutoReplaces[listName]["data"]; - toReturn["priority"]=mAutoReplaces[listName]["priority"]; - } - return toReturn; + return mSettings; +} + +void LLAutoReplace::setSettings(const LLAutoReplaceSettings& newSettings) +{ + mSettings.set(newSettings); } -BOOL LLAutoReplace::addReplacementList(LLSD newList) +void LLAutoReplace::loadFromSettings() { - if(newList.has("listName")) + std::string filename=getUserSettingsFileName(); + if (filename.empty()) + { + LL_INFOS("AutoReplace") << "no valid user settings directory." << LL_ENDL; + } + if(gDirUtilp->fileExists(filename)) { - std::string name = newList["listName"]; - LLSD newPart; - newPart["data"]=newList["data"]; - newPart["enabled"]=TRUE; - newPart["priority"]=newList["priority"].asInteger(); - llinfos << "adding new list with settings priority "<fileExists(defaultName)) + { + LLSD appDefault; + llifstream file; + file.open(defaultName.c_str()); + if (file.is_open()) + { + LLSDSerialize::fromXMLDocument(appDefault, file); + } + file.close(); - return TRUE; + if ( mSettings.setFromLLSD(appDefault) ) + { + LL_INFOS("AutoReplace") << "settings loaded from '" << filename << "'" << LL_ENDL; + saveToUserSettings(appDefault); + } + else + { + LL_WARNS("AutoReplace") << "invalid settings found in '" << filename << "'" << LL_ENDL; + } + } + else + { + if (mSettings.setFromLLSD(mSettings.getExampleLLSD())) + { + LL_WARNS("AutoReplace") << "no settings found; loaded example." << LL_ENDL; + } + else + { + LL_WARNS("AutoReplace") << "no settings found and example invalid!" << LL_ENDL; + } + } } - return FALSE; } -BOOL LLAutoReplace::removeReplacementList(std::string listName) +void LLAutoReplace::saveToUserSettings(const LLSD& newSettings) { - if(mAutoReplaces.has(listName)) - { - mAutoReplaces.erase(listName); - return TRUE; - } - return FALSE; + std::string filename=getUserSettingsFileName(); + llofstream file; + file.open(filename.c_str()); + LLSDSerialize::toPrettyXML(newSettings, file); + file.close(); + LL_INFOS("AutoReplace") << "settings saved to '" << filename << "'" << LL_ENDL; } -BOOL LLAutoReplace::setListEnabled(std::string listName, BOOL enabled) +// ================================================================ +// LLAutoReplaceSettings +// ================================================================ + +const std::string LLAutoReplaceSettings::AUTOREPLACE_LIST_NAME = "name"; ///< key for looking up list names +const std::string LLAutoReplaceSettings::AUTOREPLACE_LIST_REPLACEMENTS = "replacements"; ///< key for looking up replacement map + +LLAutoReplaceSettings::LLAutoReplaceSettings() { - if(mAutoReplaces.has(listName)) +} + +LLAutoReplaceSettings::LLAutoReplaceSettings(const LLAutoReplaceSettings& settings) +{ + // copy all values through fundamental type intermediates for thread safety + mLists = LLSD::emptyArray(); + + for ( LLSD::array_const_iterator list = settings.mLists.beginArray(), listEnd = settings.mLists.endArray(); + list != listEnd; + list++ + ) { - mAutoReplaces[listName]["enabled"]=enabled; - return TRUE; + LLSD listMap = LLSD::emptyMap(); + std::string listName = (*list)[AUTOREPLACE_LIST_NAME]; + listMap[AUTOREPLACE_LIST_NAME] = listName; + listMap[AUTOREPLACE_LIST_REPLACEMENTS] = LLSD::emptyMap(); + + for ( LLSD::map_const_iterator + entry = (*list)[AUTOREPLACE_LIST_REPLACEMENTS].beginMap(), + entriesEnd = (*list)[AUTOREPLACE_LIST_REPLACEMENTS].endMap(); + entry != entriesEnd; + entry++ + ) + { + std::string keyword = entry->first; + std::string replacement = entry->second.asString(); + listMap[AUTOREPLACE_LIST_REPLACEMENTS].insert(keyword, LLSD(replacement)); + } + + mLists.append(listMap); } - - return FALSE; } -BOOL LLAutoReplace::setListPriority(std::string listName, int priority) +void LLAutoReplaceSettings::set(const LLAutoReplaceSettings& newSettings) { - if(mAutoReplaces.has(listName)) + mLists = newSettings.mLists; +} + +bool LLAutoReplaceSettings::setFromLLSD(const LLSD& settingsFromLLSD) +{ + bool settingsValid = true; + + if ( settingsFromLLSD.isArray() ) { - mAutoReplaces[listName]["priority"]=priority; - return TRUE; + for ( LLSD::array_const_iterator + list = settingsFromLLSD.beginArray(), + listEnd = settingsFromLLSD.endArray(); + settingsValid && list != listEnd; + list++ + ) + { + settingsValid = listIsValid(*list); + } } - return FALSE; + else + { + settingsValid = false; + LL_WARNS("AutoReplace") << "settings are not an array" << LL_ENDL; + } + + if ( settingsValid ) + { + mLists = settingsFromLLSD; + } + else + { + LL_WARNS("AutoReplace") << "invalid settings discarded; using hard coded example" << LL_ENDL; + } + + return settingsValid; } -LLSD LLAutoReplace::getAutoReplaces() +bool LLAutoReplaceSettings::listNameMatches( const LLSD& list, const std::string name ) { - return mAutoReplaces; + return list.isMap() + && list.has(AUTOREPLACE_LIST_NAME) + && list[AUTOREPLACE_LIST_NAME].asString() == name; } -void LLAutoReplace::loadFromDisk() +const LLSD* LLAutoReplaceSettings::getListEntries(std::string listName) { - std::string filename=getFileName(); - if (filename.empty()) + const LLSD* returnedEntries = NULL; + for( LLSD::array_const_iterator list = mLists.beginArray(), endList = mLists.endArray(); + returnedEntries == NULL && list != endList; + list++ + ) + { + const LLSD& thisList = *list; + if ( listNameMatches(thisList, listName) ) + { + returnedEntries = &thisList[AUTOREPLACE_LIST_REPLACEMENTS]; + } + } + return returnedEntries; +} + +std::string LLAutoReplaceSettings::replacementFor(std::string keyword, std::string listName) +{ + std::string replacement; + bool foundList = false; + for( LLSD::array_const_iterator list = mLists.beginArray(), endList = mLists.endArray(); + ! foundList && list != endList; + list++ + ) { - llinfos << "no valid user directory." << llendl; + const LLSD& thisList = *list; + if ( listNameMatches(thisList, listName) ) + { + foundList = true; // whether there is a replacement or not, we're done + if ( thisList.isMap() + && thisList.has(AUTOREPLACE_LIST_REPLACEMENTS) + && thisList[AUTOREPLACE_LIST_REPLACEMENTS].has(keyword) + ) + { + replacement = thisList[AUTOREPLACE_LIST_REPLACEMENTS][keyword].asString(); + LL_DEBUGS("AutoReplace")<<"'"< '"<fileExists(filename)) + if (replacement.empty()) { - std::string defaultName = getDefaultFileName(); - llinfos << " user settings file doesnt exist, going to try and read default one from "<fileExists(defaultName)) +LLSD LLAutoReplaceSettings::getListNames() +{ + LLSD toReturn = LLSD::emptyArray(); + for( LLSD::array_const_iterator list = mLists.beginArray(), endList = mLists.endArray(); + list != endList && (*list).isDefined(); // deleting entries leaves undefined items in the iterator + list++ + ) + { + const LLSD& thisList = *list; + if ( thisList.isMap() ) { - LLSD blankllsd; - llifstream file; - file.open(defaultName.c_str()); - if (file.is_open()) + if ( thisList.has(AUTOREPLACE_LIST_NAME) ) { - LLSDSerialize::fromXMLDocument(blankllsd, file); + std::string name = thisList[AUTOREPLACE_LIST_NAME].asString(); + toReturn.append(LLSD(name)); + } + else + { + LL_ERRS("AutoReplace") << " ! MISSING "<second.isString() ) + { + listValid = false; + LL_WARNS("AutoReplace") + << "non-string replacement value found in list '" + << list[AUTOREPLACE_LIST_NAME].asString() << "'" + << LL_ENDL; + } } - file.close(); - } + } + + return listValid; } -void LLAutoReplace::saveToDisk(LLSD newSettings) +const LLSD* LLAutoReplaceSettings::exportList(std::string listName) { - mAutoReplaces=newSettings; - std::string filename=getFileName(); - llofstream file; - file.open(filename.c_str()); - LLSDSerialize::toPrettyXML(mAutoReplaces, file); - file.close(); + const LLSD* exportedList = NULL; + for ( LLSD::array_const_iterator list = mLists.beginArray(), listEnd = mLists.endArray(); + exportedList == NULL && list != listEnd; + list++ + ) + { + if ( listNameMatches(*list, listName) ) + { + const LLSD& namedList = (*list); + exportedList = &namedList; + } + } + return exportedList; } -void LLAutoReplace::runTest() +bool LLAutoReplaceSettings::listNameIsUnique(const LLSD& newList) { - std::string startS("He just abandonned all his abilties"); - std::string endS = replaceWords(startS); - llinfos << "!!! Test of autoreplace; start with "< perform_autoreplace(gSavedSettings, "AutoReplace"); - if(!(perform_autoreplace))return currentWord; - //loop through priorities - for(int currentPriority = 10;currentPriority>=0;currentPriority--) + bool found = false; + for( S32 index = 0; !found && mLists[index].isDefined(); index++ ) { - LLSD::map_const_iterator loc_it = mAutoReplaces.beginMap(); - LLSD::map_const_iterator loc_end = mAutoReplaces.endMap(); - for (; loc_it != loc_end; ++loc_it) + if( listNameMatches(mLists.get(index), listName) ) { - const std::string& location = (*loc_it).first; - //llinfos << "location is "< " << replacement.c_str() << llendl; - return replacement; - } - } + LL_DEBUGS("AutoReplace")<<"list '"< perform_autoreplace(gSavedSettings, "AutoReplace"); - if(!(perform_autoreplace)) + LL_DEBUGS("AutoReplace")<(" ")); - for (boost_tokenizer::iterator token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter) - { - std::string currentWord(*token_iter); - LLSD::map_const_iterator loc_it = mAutoReplaces.beginMap(); - LLSD::map_const_iterator loc_end = mAutoReplaces.endMap(); - for (; loc_it != loc_end; ++loc_it) + if ( listNameMatches( targetList, listName) ) { - const std::string& location = (*loc_it).first; - const LLSD& loc_map = (*loc_it).second; - if((loc_map["data"].has(currentWord))&&(loc_map["enabled"].asBoolean())) + LL_DEBUGS("AutoReplace")<<"found at index "< 0) + { + // copy the target to before the element preceding it + mLists.insert(search_index-1,targetList); + // delete the original, now duplicate, copy + mLists.erase(search_index+1); + } + else { - std::string replacement = loc_map["data"][currentWord]; - lldebugs << "found a word in list " << location.c_str() << " and it will replace " << currentWord.c_str() << " => " << replacement.c_str() << llendl; - int wordStart = words.find(currentWord); - words.replace(wordStart,currentWord.length(),replacement); - return replaceWords(words);//lol recursion! + LL_WARNS("AutoReplace") << "attempted to move top list up" << LL_ENDL; } - } + } } - return words; + return found; } -BOOL LLAutoReplace::addEntryToList(std::string wrong, std::string right, std::string listName) +/// Move the named list down in the priority order +bool LLAutoReplaceSettings::decreaseListPriority(std::string listName) { - // *HACK: Make sure the "Custom" list exists, because the design of this - // system prevents us from updating it by changing the original file... - if(mAutoReplaces.has(listName)) + LL_DEBUGS("AutoReplace")< autoreplace_enabled(gSavedSettings, "AutoReplace"); + if ( autoreplace_enabled ) { - if(mAutoReplaces[listName]["data"].has(wrong)) + //loop through lists in order + bool found = false; + for( LLSD::array_const_iterator list = mLists.beginArray(), endLists = mLists.endArray(); + ! found && list != endLists; + list++ + ) { - mAutoReplaces[listName]["data"].erase(wrong); - return TRUE; + const LLSD& checkList = *list; + const LLSD& replacements = checkList[AUTOREPLACE_LIST_REPLACEMENTS]; + + if ( replacements.has(currentWord) ) + { + found = true; + LL_DEBUGS("AutoReplace") + << "found in list '" << checkList[AUTOREPLACE_LIST_NAME].asString() << "' : '" + << currentWord << "' => '" << replacements[currentWord].asString() << "'" + << LL_ENDL; + returnedWord = replacements[currentWord].asString(); + } } } - return FALSE; + return returnedWord; } -LLSD LLAutoReplace::getExampleLLSD() +bool LLAutoReplaceSettings::addEntryToList(std::string keyword, std::string replacement, std::string listName) { - LLSD toReturn; - - LLSD listone; - LLSD listtwo; - - LLSD itemOne; - itemOne["wrong"]="wrong1"; - itemOne["right"]="right1"; - listone[0]=itemOne; - - LLSD itemTwo; - itemTwo["wrong"]="wrong2"; - itemTwo["right"]="right2"; - listone[1]=itemTwo; - - toReturn["listOne"]=listone; + bool added = false; + if ( ! keyword.empty() && ! replacement.empty() ) + { + bool isOneWord = true; + for (S32 character = 0; isOneWord && character < keyword.size(); character++ ) + { + if ( ! LLWStringUtil::isPartOfWord(keyword[character]) ) + { + LL_WARNS("AutoReplace") << "keyword '" << keyword << "' not a single word" << LL_ENDL; + isOneWord = false; + } + } - itemOne["wrong"]="secondwrong1"; - itemOne["right"]="secondright1"; - listone[0]=itemOne; + if ( isOneWord ) + { + bool listFound = false; + for( LLSD::array_iterator list = mLists.beginArray(), endLists = mLists.endArray(); + ! listFound && list != endLists; + list++ + ) + { + if ( listNameMatches(*list, listName) ) + { + listFound = true; + (*list)[AUTOREPLACE_LIST_REPLACEMENTS][keyword]=replacement; + } + } + if (listFound) + { + added = true; + } + else + { + LL_WARNS("AutoReplace") << "list '" << listName << "' not found" << LL_ENDL; + } + } + } - itemTwo["wrong"]="secondwrong2"; - itemTwo["right"]="secondright2"; - listone[1]=itemTwo; + return added; +} - toReturn["listTwo"]=listone; +bool LLAutoReplaceSettings::removeEntryFromList(std::string keyword, std::string listName) +{ + bool found = false; + for( LLSD::array_iterator list = mLists.beginArray(), endLists = mLists.endArray(); + ! found && list != endLists; + list++ + ) + { + if ( listNameMatches(*list, listName) ) + { + found = true; + (*list)[AUTOREPLACE_LIST_REPLACEMENTS].erase(keyword); + } + } + if (!found) + { + LL_WARNS("AutoReplace") << "list '" << listName << "' not found" << LL_ENDL; + } + return found; +} - return toReturn; +LLSD LLAutoReplaceSettings::getExampleLLSD() +{ + LL_DEBUGS("AutoReplace")< replacement test pairs + + /// Get the replacement for the keyword from the specified list + std::string replacementFor(std::string keyword, std::string listName); + + /// Adds a keywword/replacement pair to the named list + bool addEntryToList(std::string keyword, std::string replacement, std::string listName); + + /// Removes the keywword and its replacement from the named list + bool removeEntryFromList(std::string keyword, std::string listName); + + /** + * Look for currentWord in the lists in order, returning any substitution found + * If no configured substitution is found, returns currentWord + */ + std::string replaceWord(const std::string currentWord /**< word to search for */ ); + + /// Provides a hard-coded example of settings + LLSD getExampleLLSD(); + + private: + /// Efficiently and safely compare list names + bool listNameMatches( const LLSD& list, const std::string name ); + + /// The actual llsd data structure + LLSD mLists; + + static const std::string AUTOREPLACE_LIST_NAME; ///< key for looking up list names + static const std::string AUTOREPLACE_LIST_REPLACEMENTS; ///< key for looking up replacement map + + /**< + * LLSD structure of the lists + * - The configuration is an array (mLists), + * - Each entry in the array is a replacement list + * - Each replacement list is a map with three keys: + * @verbatim + * "name" String the name of the list + * "replacements" Map keyword -> replacement pairs + * + * + * + * + * name List 1 + * data + * + * keyword1 replacement1 + * keyword2 replacement2 + * + * + * + * name List 2 + * data + * + * keyword1 replacement1 + * keyword2 replacement2 + * + * + * + * + * @endverbatim + */ +}; + +/** Provides a facility to auto-replace text dynamically as it is entered. + * + * When the end of a word is detected (defined as any punctuation character, + * or any whitespace except newline or return), the preceding word is used + * as a lookup key in an ordered list of maps. If a match is found in any + * map, the keyword is replaced by the associated value from the map. + * + * See the autoreplaceCallback method for how to add autoreplace functionality + * to a text entry tool. + */ class LLAutoReplace : public LLSingleton { + public: LLAutoReplace(); ~LLAutoReplace(); - static LLAutoReplace* sInstance; -public: - void autoreplaceCallback(LLUIString& inputText, S32& cursorPos); + + /// @return a pointer to the active instance static LLAutoReplace* getInstance(); - BOOL addReplacementList(LLSD newList); - BOOL removeReplacementList(std::string listName); - BOOL setListEnabled(std::string listName, BOOL enabled); - BOOL setListPriority(std::string listName, int priority); - std::string replaceWords(std::string words); - std::string replaceWord(std::string currentWord); - BOOL addEntryToList(std::string wrong, std::string right, std::string listName); - BOOL removeEntryFromList(std::string wrong, std::string listName); - BOOL saveListToDisk(std::string listName, std::string fileName); - LLSD exportList(std::string listName); - void runTest(); - LLSD getAutoReplaces(); - LLSD getAutoReplaceEntries(std::string listName); - void save(); - - void loadFromDisk(); - -private: + + /// Callback that provides the hook for use in text entry methods + void autoreplaceCallback(LLUIString& inputText, S32& cursorPos); + + /// Get a copy of the current settings to be manipulated in the preferences dialog + LLAutoReplaceSettings getSettings(); + ///< @note: the caller is respon + + /// Commit new settings after making changes + void setSettings(const LLAutoReplaceSettings& settings); + + private: friend class LLSingleton; - void saveToDisk(LLSD newSettings); - LLSD getExampleLLSD(); - std::string getFileName(); - std::string getDefaultFileName(); + static LLAutoReplace* sInstance; ///< the active settings instance + + LLAutoReplaceSettings mSettings; ///< configuration information + + /// Write the current lists out to the settings storage + void saveToUserSettings(const LLSD& newSettings); + + /// Read settings from persistent storage + void loadFromSettings(); + + /// Compute the user settings file name + std::string getUserSettingsFileName(); - LLSD mAutoReplaces; + /// Compute the (read-ony) application settings file name + std::string getAppSettingsFileName(); + /// basename for the settings files + static const char* SETTINGS_FILE_NAME; }; -#endif +#endif /* LLAUTOREPLACE_H */ diff --git a/indra/newview/llfloaterautoreplacesettings.cpp b/indra/newview/llfloaterautoreplacesettings.cpp index 1a52e5d493..7d6be10549 100644 --- a/indra/newview/llfloaterautoreplacesettings.cpp +++ b/indra/newview/llfloaterautoreplacesettings.cpp @@ -1,5 +1,5 @@ /** - * @file llautoreplacefloater.cpp + * @file llfloaterautoreplacesettings.cpp * @brief Auto Replace List floater * * $LicenseInfo:firstyear=2012&license=viewerlgpl$ @@ -48,7 +48,8 @@ #include "llfilepicker.h" #include "llfile.h" #include "llsdserialize.h" -//#include "llfloaterchat.h" +#include "llsdutil.h" + #include "llchat.h" #include "llinventorymodel.h" #include "llhost.h" @@ -62,306 +63,577 @@ #include "llinspecttoast.h" #include "llnotificationhandler.h" #include "llnotificationmanager.h" +#include "llnotificationsutil.h" LLFloaterAutoReplaceSettings::LLFloaterAutoReplaceSettings(const LLSD& key) : LLFloater(key) - , namesList(NULL) - , entryList(NULL) - , mOldText(NULL) - , mNewText(NULL) + , mSelectedListName("") + , mListNames(NULL) + , mReplacementsList(NULL) + , mKeyword(NULL) + , mPreviousKeyword("") + , mReplacement(NULL) { } + void LLFloaterAutoReplaceSettings::onClose(bool app_quitting) { - destroy(); + cleanUp(); } BOOL LLFloaterAutoReplaceSettings::postBuild(void) { + // get copies of the current settings that we will operate on + mEnabled = gSavedSettings.getBOOL("AutoReplace"); + LL_DEBUGS("AutoReplace") << ( mEnabled ? "enabled" : "disabled") << LL_ENDL; - namesList = getChild("ac_list_name"); - entryList = getChild("ac_list_entry"); - mOldText = getChild("ac_old_text"); - mNewText = getChild("ac_new_text"); + mSettings = LLAutoReplace::getInstance()->getSettings(); + + // global checkbox for whether or not autoreplace is active + LLUICtrl* enabledCheckbox = getChild("autoreplace_enable"); + enabledCheckbox->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onAutoReplaceToggled, this)); + enabledCheckbox->setValue(LLSD(mEnabled)); - childSetCommitCallback("ac_enable",onBoxCommitEnabled,this); + // top row list creation and deletion + getChild("autoreplace_import_list")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onImportList,this)); + getChild("autoreplace_export_list")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onExportList,this)); + getChild("autoreplace_new_list")->setCommitCallback( boost::bind(&LLFloaterAutoReplaceSettings::onNewList,this)); + getChild("autoreplace_delete_list")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onDeleteList,this)); - childSetCommitCallback("ac_list_enabled",onEntrySettingChange,this); - childSetCommitCallback("ac_list_show",onEntrySettingChange,this); - childSetCommitCallback("ac_list_style",onEntrySettingChange,this); - childSetCommitCallback("ac_priority",onEntrySettingChange,this); + // the list of keyword->replacement lists + mListNames = getChild("autoreplace_list_name"); + mListNames->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSelectList, this)); + mListNames->setCommitOnSelectionChange(true); - updateEnabledStuff(); - updateNamesList(); + // list ordering + getChild("autoreplace_list_up")->setCommitCallback( boost::bind(&LLFloaterAutoReplaceSettings::onListUp,this)); + getChild("autoreplace_list_down")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onListDown,this)); - namesList->setCommitOnSelectionChange(TRUE); - childSetCommitCallback("ac_list_name", onSelectName, this); - - childSetAction("ac_deletelist",removeList,this); - childSetAction("ac_rementry",deleteEntry,this); - childSetAction("ac_exportlist",exportList,this); - childSetAction("ac_addentry",addEntry,this); - childSetAction("ac_loadlist",loadList,this); + // keyword->replacement entry add / delete + getChild("autoreplace_add_entry")->setCommitCallback( boost::bind(&LLFloaterAutoReplaceSettings::onAddEntry,this)); + getChild("autoreplace_delete_entry")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onDeleteEntry,this)); + + // entry edits + mKeyword = getChild("autoreplace_keyword"); + mReplacement = getChild("autoreplace_replacement"); + getChild("autoreplace_save_entry")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSaveEntry, this)); + + // dialog termination ( Save Changes / Cancel ) + getChild("autoreplace_save_changes")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSaveChanges, this)); + getChild("autoreplace_cancel")->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onCancel, this)); + + // the list of keyword->replacement pairs + mReplacementsList = getChild("autoreplace_list_replacements"); + mReplacementsList->setCommitCallback(boost::bind(&LLFloaterAutoReplaceSettings::onSelectEntry, this)); + mReplacementsList->setCommitOnSelectionChange(true); + + mSelectedListName.clear(); + updateListNames(); + updateListNamesControls(); + updateReplacementsList(); return true; } -void LLFloaterAutoReplaceSettings::onSelectName(LLUICtrl* ctrl, void* user_data) + +void LLFloaterAutoReplaceSettings::updateListNames() { - if ( user_data ) + mListNames->deleteAllItems(); // start from scratch + + LLSD listNames = mSettings.getListNames(); // Array of Strings + + for ( LLSD::array_const_iterator entry = listNames.beginArray(), end = listNames.endArray(); + entry != end; + ++entry + ) { - LLFloaterAutoReplaceSettings* self = ( LLFloaterAutoReplaceSettings* )user_data; - if ( self ) - { - self->updateItemsList(); - } + const std::string& listName = entry->asString(); + mListNames->addSimpleElement(listName); + } + + if (!mSelectedListName.empty()) + { + mListNames->setSelectedByValue( LLSD(mSelectedListName), true ); } } -void LLFloaterAutoReplaceSettings::updateItemsList() + +void LLFloaterAutoReplaceSettings::updateListNamesControls() { - entryList->deleteAllItems(); - if((namesList->getAllSelected().size())<=0) + if ( mSelectedListName.empty() ) { - updateListControlsEnabled(FALSE); - return; + // There is no selected list + + // Disable all controls that operate on the selected list + getChild("autoreplace_export_list")->setEnabled(false); + getChild("autoreplace_delete_list")->setEnabled(false); + getChild("autoreplace_list_up")->setEnabled(false); + getChild("autoreplace_list_down")->setEnabled(false); + + mReplacementsList->deleteAllItems(); } + else + { + // Enable the controls that operate on the selected list + getChild("autoreplace_export_list")->setEnabled(true); + getChild("autoreplace_delete_list")->setEnabled(true); + getChild("autoreplace_list_up")->setEnabled(!selectedListIsFirst()); + getChild("autoreplace_list_down")->setEnabled(!selectedListIsLast()); + } +} - updateListControlsEnabled(TRUE); - std::string listName= namesList->getFirstSelected()->getColumn(0)->getValue().asString(); - - LLSD listData = LLAutoReplace::getInstance()->getAutoReplaceEntries(listName); - childSetValue("ac_list_enabled",listData["enabled"].asBoolean()); - childSetValue("ac_text_name",listName); - childSetValue("ac_priority",listData["priority"]); - - LLSD autoReplaces = listData["data"]; - LLSD::map_const_iterator loc_it = autoReplaces.beginMap(); - LLSD::map_const_iterator loc_end = autoReplaces.endMap(); - for ( ; loc_it != loc_end; ++loc_it) +void LLFloaterAutoReplaceSettings::onSelectList() +{ + std::string previousSelectedListName = mSelectedListName; + // only one selection allowed + LLSD selected = mListNames->getSelectedValue(); + if (selected.isDefined()) { - const std::string& wrong = (*loc_it).first; - const std::string& right = (*loc_it).second; - - LLSD element; - element["id"] = wrong; - LLSD& s_column = element["columns"][0]; - s_column["column"] = "Search"; - s_column["value"] = wrong; - s_column["font"] = "SANSSERIF"; - LLSD& r_column = element["columns"][1]; - r_column["column"] = "Replace"; - r_column["value"] = right; - r_column["font"] = "SANSSERIF"; - - entryList->addElement(element, ADD_BOTTOM); + mSelectedListName = selected.asString(); + LL_DEBUGS("AutoReplace")<<"selected list '"<deleteAllItems(); - if(!gSavedSettings.getBOOL("AutoReplace")) + LLSD selectedRow = mReplacementsList->getSelectedValue(); + if (selectedRow.isDefined()) { - updateItemsList(); - return; + mPreviousKeyword = selectedRow.asString(); + LL_DEBUGS("AutoReplace")<<"selected entry '"<setValue(selectedRow); + std::string replacement = mSettings.replacementFor(mPreviousKeyword, mSelectedListName ); + mReplacement->setValue(replacement); + enableReplacementEntry(); + mReplacement->setFocus(true); } - LLSD autoReplaces = LLAutoReplace::getInstance()->getAutoReplaces(); - LLSD::map_const_iterator loc_it = autoReplaces.beginMap(); - LLSD::map_const_iterator loc_end = autoReplaces.endMap(); - for ( ; loc_it != loc_end; ++loc_it) + else { - const std::string& listName = (*loc_it).first; - - LLSD element; - element["id"] = listName; - LLSD& friend_column = element["columns"][0]; - friend_column["column"] = "Entries"; - friend_column["value"] = listName; - //friend_column["font"] = "SANSSERIF"; - const LLSD& loc_map = (*loc_it).second; - if(loc_map["enabled"].asBoolean()) - { - friend_column["font"] = "SANSSERIF"; - } - else - { - friend_column["font"] = "SANSSERIF_SMALL"; - } - if(namesList) + // no entry selection, so the entry panel should be off + disableReplacementEntry(); + LL_DEBUGS("AutoReplace")<<"no row selected"<deleteAllItems(); + + if ( mSelectedListName.empty() ) + { + mReplacementsList->setEnabled(false); + getChild("autoreplace_add_entry")->setEnabled(false); + disableReplacementEntry(); + } + else + { + // Populate the keyword->replacement list from the selected list + const LLSD* mappings = mSettings.getListEntries(mSelectedListName); + for ( LLSD::map_const_iterator entry = mappings->beginMap(), end = mappings->endMap(); + entry != end; + entry++ + ) { - namesList->addElement(element, ADD_BOTTOM); + LLSD row; + row["id"] = entry->first; + row["columns"][0]["column"] = "keyword"; + row["columns"][0]["value"] = entry->first; + row["columns"][1]["column"] = "replacement"; + row["columns"][1]["value"] = entry->second; + + mReplacementsList->addElement(row, ADD_BOTTOM); } + + mReplacementsList->deselectAllItems(false /* don't call commit */); + mReplacementsList->setEnabled(true); + + getChild("autoreplace_add_entry")->setEnabled(true); + disableReplacementEntry(); } - updateItemsList(); } -void LLFloaterAutoReplaceSettings::updateListControlsEnabled(BOOL selected) + +void LLFloaterAutoReplaceSettings::enableReplacementEntry() { + LL_DEBUGS("AutoReplace")<setEnabled(true); + mReplacement->setEnabled(true); + getChild("autoreplace_save_entry")->setEnabled(true); + getChild("autoreplace_delete_entry")->setEnabled(true); +} - childSetEnabled("ac_text1",selected); - childSetEnabled("ac_text2",selected); - childSetEnabled("ac_text_name",selected); - childSetEnabled("ac_list_enabled",selected); - childSetEnabled("ac_list_show",selected); - childSetEnabled("ac_list_style",selected); - childSetEnabled("ac_deletelist",selected); - childSetEnabled("ac_exportlist",selected); - childSetEnabled("ac_addentry",selected); - childSetEnabled("ac_rementry",selected); - childSetEnabled("ac_priority",selected); - +void LLFloaterAutoReplaceSettings::disableReplacementEntry() +{ + LL_DEBUGS("AutoReplace")<clear(); + mKeyword->setEnabled(false); + mReplacement->clear(); + mReplacement->setEnabled(false); + getChild("autoreplace_save_entry")->setEnabled(false); + getChild("autoreplace_delete_entry")->setEnabled(false); } -void LLFloaterAutoReplaceSettings::updateEnabledStuff() + +// called when the global settings checkbox is changed +void LLFloaterAutoReplaceSettings::onAutoReplaceToggled() { - BOOL autoreplace = gSavedSettings.getBOOL("AutoReplace"); - if(autoreplace) + // set our local copy of the flag, copied to the global preference in onOk + mEnabled = childGetValue("autoreplace_enable").asBoolean(); + LL_DEBUGS("AutoReplace")<< "autoreplace_enable " << ( mEnabled ? "on" : "off" ) << LL_ENDL; +} + +// called when the List Up button is pressed +void LLFloaterAutoReplaceSettings::onListUp() +{ + S32 selectedRow = mListNames->getFirstSelectedIndex(); + LLSD selectedName = mListNames->getSelectedValue().asString(); + + if ( mSettings.increaseListPriority(selectedName) ) { - LLCheckBoxCtrl *enBox = getChild("ac_enable"); - enBox->setDisabledColor(LLColor4::red); - getChild("ac_enable")->setEnabledColor(LLColor4(1.0f,0.0f,0.0f,1.0f)); + mListNames->swapWithPrevious(selectedRow); + updateListNamesControls(); } else { - getChild("ac_enable")->setEnabledColor( - LLUIColorTable::instance().getColor( "LabelTextColor" )); + LL_WARNS("AutoReplace") + << "invalid row ("<save(); +// called when the List Down button is pressed +void LLFloaterAutoReplaceSettings::onListDown() +{ + S32 selectedRow = mListNames->getFirstSelectedIndex(); + std::string selectedName = mListNames->getSelectedValue().asString(); + if ( mSettings.decreaseListPriority(selectedName) ) + { + mListNames->swapWithNext(selectedRow); + updateListNamesControls(); + } + else + { + LL_WARNS("AutoReplace") + << "invalid row ("<getSelectedValue(); + if (selectedRow.isDefined()) + { + std::string keyword = selectedRow.asString(); + mReplacementsList->deleteSelectedItems(); // delete from the control + mSettings.removeEntryFromList(keyword, mSelectedListName); // delete from the local settings copy + disableReplacementEntry(); // no selection active, so turn off the buttons + } } -void LLFloaterAutoReplaceSettings::onBoxCommitEnabled(LLUICtrl* caller, void* user_data) + +// called when the Import List button is pressed +void LLFloaterAutoReplaceSettings::onImportList() { - if ( user_data ) + LLFilePicker& picker = LLFilePicker::instance(); + if( picker.getOpenFile( LLFilePicker::FFLOAD_XML) ) { - LLFloaterAutoReplaceSettings* self = ( LLFloaterAutoReplaceSettings* )user_data; - if ( self ) + llifstream file; + file.open(picker.getFirstFile().c_str()); + LLSD newList; + if (file.is_open()) { - self->updateEnabledStuff(); + LLSDSerialize::fromXMLDocument(newList, file); } + file.close(); + + switch ( mSettings.addList(newList) ) + { + case LLAutoReplaceSettings::AddListOk: + mSelectedListName = LLAutoReplaceSettings::getListName(newList); + + updateListNames(); + updateListNamesControls(); + updateReplacementsList(); + break; + + case LLAutoReplaceSettings::AddListDuplicateName: + { + std::string newName = LLAutoReplaceSettings::getListName(newList); + LL_WARNS("AutoReplace")<<"name '"<namesList->getFirstSelected()->getColumn(0)->getValue().asString(); - LLAutoReplace::getInstance()->setListEnabled(listName,self->childGetValue("ac_list_enabled").asBoolean()); - LLAutoReplace::getInstance()->setListPriority(listName,self->childGetValue("ac_priority").asInteger()); + case LLAutoReplaceSettings::AddListOk: + LL_INFOS("AutoReplace") << "added new list '"<updateEnabledStuff(); - self->updateItemsList(); - LLAutoReplace::getInstance()->save(); + case LLAutoReplaceSettings::AddListDuplicateName: + { + LL_WARNS("AutoReplace")<<"name '"<namesList->getFirstSelected()->getColumn(0)->getValue().asString(); + case 1: + // Use New Name + LL_INFOS("AutoReplace")<<"option 'use new name' selected"<entryList->getAllSelected().size())>0) - { - std::string wrong= self->entryList->getFirstSelected()->getColumn(0)->getValue().asString(); - LLAutoReplace::getInstance()->removeEntryFromList(wrong,listName); - self->updateItemsList(); - LLAutoReplace::getInstance()->save(); - } - } + default: + LL_ERRS("AutoReplace")<<"invalid selected option "<getFirstSelected()->getColumn(0)->getValue().asString(); + mSettings.removeReplacementList(listName); // remove from the copy of settings + mReplacementsList->deleteSelectedItems(); // remove from the scrolling list + + mSelectedListName.clear(); + updateListNames(); + updateListNamesControls(); + updateReplacementsList(); +} + +void LLFloaterAutoReplaceSettings::onExportList() +{ + std::string listName=mListNames->getFirstSelected()->getColumn(0)->getValue().asString(); + const LLSD* list = mSettings.exportList(listName); + std::string listFileName = listName + ".xml"; LLFilePicker& picker = LLFilePicker::instance(); + if( picker.getSaveFile( LLFilePicker::FFSAVE_XML, listFileName) ) + { + llofstream file; + file.open(picker.getFirstFile().c_str()); + LLSDSerialize::toPrettyXML(*list, file); + file.close(); + } +} - if(!picker.getOpenFile( LLFilePicker::FFLOAD_XML) ) +void LLFloaterAutoReplaceSettings::onAddEntry() +{ + mPreviousKeyword.clear(); + mKeyword->clear(); + mReplacement->clear(); + enableReplacementEntry(); + mKeyword->setFocus(true); +} + +void LLFloaterAutoReplaceSettings::onSaveEntry() +{ + LL_DEBUGS("AutoReplace")<<"called"<getValue().asString(); + std::string replacement = mReplacement->getValue().asString(); + if ( mSettings.addEntryToList(keyword, replacement, mSelectedListName) ) { - LLSDSerialize::fromXMLDocument(blankllsd, file); + // insert the new keyword->replacement pair + LL_INFOS("AutoReplace") + << "list '" << mSelectedListName << "' " + << "added '" << keyword + << "' -> '" << replacement + << "'" << LL_ENDL; + + updateReplacementsList(); } - file.close(); - gSavedSettings.setBOOL("AutoReplace",true); - LLAutoReplace::getInstance()->addReplacementList(blankllsd); - if ( data ) + else { - LLFloaterAutoReplaceSettings* self = ( LLFloaterAutoReplaceSettings* )data; - if ( self ) - { - self->updateEnabledStuff(); - } + LLNotificationsUtil::add("InvalidAutoReplaceEntry"); + LL_WARNS("AutoReplace")<<"invalid entry " + << "keyword '" << keyword + << "' replacement '" << replacement + << "'" << LL_ENDL; } } -void LLFloaterAutoReplaceSettings::removeList(void* data) + +void LLFloaterAutoReplaceSettings::onCancel() { - if ( data ) - { - LLFloaterAutoReplaceSettings* self = ( LLFloaterAutoReplaceSettings* )data; - if ( self ) - { - std::string listName= self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); - LLAutoReplace::getInstance()->removeReplacementList(listName); - self->updateEnabledStuff(); - } + cleanUp(); + closeFloater(false /* not quitting */); +} - } +void LLFloaterAutoReplaceSettings::onSaveChanges() +{ + // put our local copy of the settings into the active copy + LLAutoReplace::getInstance()->setSettings( mSettings ); + // save our local copy of the global feature enable/disable value + gSavedSettings.setBOOL("AutoReplace", mEnabled); + cleanUp(); + closeFloater(false /* not quitting */); } -void LLFloaterAutoReplaceSettings::exportList(void *data) + +void LLFloaterAutoReplaceSettings::cleanUp() +{ + +} + +bool LLFloaterAutoReplaceSettings::selectedListIsFirst() { - if ( data ) + bool isFirst = false; + + if (!mSelectedListName.empty()) { - LLFloaterAutoReplaceSettings* self = ( LLFloaterAutoReplaceSettings* )data; - if ( self ) + LLSD lists = mSettings.getListNames(); // an Array of Strings + LLSD first = lists.get(0); + if ( first.isString() && first.asString() == mSelectedListName ) { - std::string listName=self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); - - LLFilePicker& picker = LLFilePicker::instance(); - if(picker.getSaveFile( LLFilePicker::FFSAVE_XML) ) - { - llofstream file; - file.open(picker.getFirstFile().c_str()); - LLSDSerialize::toPrettyXML(LLAutoReplace::getInstance()->exportList(listName), file); - file.close(); - } + isFirst = true; } } + return isFirst; } -void LLFloaterAutoReplaceSettings::addEntry(void* data) + +bool LLFloaterAutoReplaceSettings::selectedListIsLast() { - if ( data ) + bool isLast = false; + + if (!mSelectedListName.empty()) { - LLFloaterAutoReplaceSettings* self = ( LLFloaterAutoReplaceSettings* )data; - if ( self ) + LLSD last; + LLSD lists = mSettings.getListNames(); // an Array of Strings + for ( LLSD::array_const_iterator list = lists.beginArray(), listEnd = lists.endArray(); + list != listEnd; + list++ + ) { - std::string listName= self->namesList->getFirstSelected()->getColumn(0)->getValue().asString(); - std::string wrong = self->mOldText->getText(); - std::string right = self->mNewText->getText(); - if(wrong != "" && right != "") - { - LLAutoReplace::getInstance()->addEntryToList(wrong, right, listName); - self->updateItemsList(); - LLAutoReplace::getInstance()->save(); - } + last = *list; + } + if ( last.isString() && last.asString() == mSelectedListName ) + { + isLast = true; } } + return isLast; } +/* TBD +mOldText = getChild("autoreplace_old_text"); +mNewText = getChild("autoreplace_new_text"); +*/ diff --git a/indra/newview/llfloaterautoreplacesettings.h b/indra/newview/llfloaterautoreplacesettings.h index dd0acb613b..629aea3e3c 100644 --- a/indra/newview/llfloaterautoreplacesettings.h +++ b/indra/newview/llfloaterautoreplacesettings.h @@ -33,9 +33,9 @@ #include "llviewerinventory.h" #include +#include "llautoreplace.h" -class LLFloaterAutoReplaceSettings : -public LLFloater +class LLFloaterAutoReplaceSettings : public LLFloater { public: LLFloaterAutoReplaceSettings(const LLSD& key); @@ -44,27 +44,74 @@ public: /*virtual*/ void onClose(bool app_quitting); void setData(void * data); - void updateEnabledStuff(); - void updateNamesList(); - void updateListControlsEnabled(BOOL selected); - void updateItemsList(); - - LLScrollListCtrl *namesList; - LLScrollListCtrl *entryList; - LLLineEditor* mOldText; - LLLineEditor* mNewText; private: - static void onBoxCommitEnabled(LLUICtrl* caller, void* user_data); - static void onEntrySettingChange(LLUICtrl* caller, void* user_data); - static void onSelectName(LLUICtrl* caller, void* user_data); + /** @{ @name Local Copies of Settings + * These are populated in the postBuild method with the values + * current when the floater is instantiated, and then either + * discarded when Cancel is pressed, or copied back to the active + * settings if Ok is pressed. + */ + bool mEnabled; ///< the global preference for AutoReplace + LLAutoReplaceSettings mSettings; ///< settings being modified + /** @} */ + + /// convenience variable - the name of the currently selected list (if any) + std::string mSelectedListName; + /// the scrolling list of list names (one column, no headings, order manually controlled) + LLScrollListCtrl* mListNames; + /// the scroling list of keyword->replacement pairs + LLScrollListCtrl* mReplacementsList; + + /// the keyword for the entry editing pane + LLLineEditor* mKeyword; + /// saved keyword value + std::string mPreviousKeyword; + /// the replacement for the entry editing pane + LLLineEditor* mReplacement; + + /// callback for when the feature enable/disable checkbox changes + void onAutoReplaceToggled(); + /// callback for when an entry in the list of list names is selected + void onSelectList(); + + void onImportList(); + void onExportList(); + void onNewList(); + void onDeleteList(); + + void onListUp(); + void onListDown(); + + void onSelectEntry(); + void onAddEntry(); + void onDeleteEntry(); + void onSaveEntry(); + + void onSaveChanges(); + void onCancel(); + + /// updates the contents of the mListNames + void updateListNames(); + /// updates the controls associated with mListNames (depends on whether a name is selected or not) + void updateListNamesControls(); + /// updates the contents of the mReplacementsList + void updateReplacementsList(); + /// enables the components that should only be active when a keyword is selected + void enableReplacementEntry(); + /// disables the components that should only be active when a keyword is selected + void disableReplacementEntry(); + + /// called from the AddAutoReplaceList notification dialog + bool callbackNewListName(const LLSD& notification, const LLSD& response); + /// called from the RenameAutoReplaceList notification dialog + bool callbackListNameConflict(const LLSD& notification, const LLSD& response); + + bool selectedListIsFirst(); + bool selectedListIsLast(); - static void deleteEntry(void* data); - static void addEntry(void* data); - static void exportList(void* data); - static void removeList(void* data); - static void loadList(void* data); + void cleanUp(); }; #endif // LLFLOATERAUTOREPLACESETTINGS_H diff --git a/indra/newview/skins/default/xui/en/floater_autoreplace.xml b/indra/newview/skins/default/xui/en/floater_autoreplace.xml index 5baae4f0d4..df3b1c6256 100644 --- a/indra/newview/skins/default/xui/en/floater_autoreplace.xml +++ b/indra/newview/skins/default/xui/en/floater_autoreplace.xml @@ -6,228 +6,286 @@ bottom="400" left="300" can_resize="false" - height="500" - width="400" - name="ac_floater" + height="455" + width="490" + name="autoreplace_floater" title="Autoreplace Settings"> - + + + + + \ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml b/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml deleted file mode 100644 index f1b16c5d0d..0000000000 --- a/indra/newview/skins/default/xui/en/panel_preferences_spellcheck.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - Main dictionary : - - - - - Additional dictionaries : - - - Available - - - Active - - - - - - - -- cgit v1.2.3 From 76234b48256a93c6a0f9dd1d3807706b1039a181 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 31 May 2012 17:08:14 +0200 Subject: STORM-276 FIXED "Add to Ignore" doesn't trigger --- indra/llui/llspellcheck.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp index aa39e21a96..bde3b56741 100644 --- a/indra/llui/llspellcheck.cpp +++ b/indra/llui/llspellcheck.cpp @@ -142,7 +142,7 @@ void LLSpellChecker::addToIgnoreList(const std::string& word) { std::string word_lower(word); LLStringUtil::toLower(word_lower); - if (mIgnoreList.end() != std::find(mIgnoreList.begin(), mIgnoreList.end(), word_lower)) + if (mIgnoreList.end() == std::find(mIgnoreList.begin(), mIgnoreList.end(), word_lower)) { mIgnoreList.push_back(word_lower); addToDictFile(getDictionaryUserPath() + mDictFile + DICT_IGNORE_SUFFIX + ".dic", word_lower); -- cgit v1.2.3 From d7303541ccd4ea1420de4cd11ff824aeb171fae7 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 31 May 2012 17:37:19 +0200 Subject: STORM-276 FIXED Line editor misspells are checked every frame --- indra/llui/lllineeditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 352854c629..1e0b194e44 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -1883,7 +1883,7 @@ void LLLineEditor::draw() // Calculate start and end indices for the first and last visible word U32 start = prevWordPos(mScrollHPos), end = nextWordPos(mScrollHPos + rendered_text); - if ( (mSpellCheckStart != start) || (mSpellCheckEnd = end) ) + if ( (mSpellCheckStart != start) || (mSpellCheckEnd != end) ) { const LLWString& text = mText.getWString().substr(start, end); -- cgit v1.2.3 From e2e33c0ed5f2acbbfe35c46b1298ed56eb9d1003 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 31 May 2012 20:47:14 +0200 Subject: STORM-276 FIXED Last word in a line editor isn't spell checked --- indra/llui/lllineeditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 1e0b194e44..ae1f7f2419 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -1905,7 +1905,7 @@ void LLLineEditor::draw() { word_end++; } - if (word_end >= text.length()) + if (word_end > text.length()) break; // Don't process words shorter than 3 characters -- cgit v1.2.3 From 5e5dbd718e65dc30365bf435a7a865e7f95096cc Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 31 May 2012 16:12:52 -0400 Subject: fix spell checker floater registration --- indra/newview/llfloaterspellchecksettings.h | 6 +++--- indra/newview/llviewerfloaterreg.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterspellchecksettings.h b/indra/newview/llfloaterspellchecksettings.h index 33c376fff6..2fbf47617a 100644 --- a/indra/newview/llfloaterspellchecksettings.h +++ b/indra/newview/llfloaterspellchecksettings.h @@ -24,8 +24,8 @@ * $/LicenseInfo$ */ -#ifndef LLFLOATERAUTOREPLACESETTINGS_H -#define LLFLOATERAUTOREPLACESETTINGS_H +#ifndef LLFLOATERSPELLCHECKERSETTINGS_H +#define LLFLOATERSPELLCHECKERSETTINGS_H #include "llfloater.h" @@ -45,4 +45,4 @@ protected: void refreshDictionaryLists(bool from_settings); }; -#endif // LLFLOATERAUTOREPLACESETTINGS_H +#endif // LLFLOATERSPELLCHECKERSETTINGS_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index d310e5a09a..4d84262a3a 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -249,8 +249,8 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("prefs_proxy", "floater_preferences_proxy.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("prefs_hardware_settings", "floater_hardware_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("prefs_spellchecker", "floater_spellcheck.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("prefs_translation", "floater_translation_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("prefs_spellchecker", "floater_spellcheck.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("prefs_autoreplace", "floater_autoreplace.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("perm_prefs", "floater_perm_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("picks", "floater_picks.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); -- cgit v1.2.3 From 20210455f5a350b3e8e24515ba7af71db0eece0b Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Mon, 4 Jun 2012 16:10:32 +0200 Subject: STORM-276 Dictionary import functionality and floater --- indra/llui/llspellcheck.cpp | 45 +++++++- indra/llui/llspellcheck.h | 5 +- indra/newview/llfilepicker.cpp | 22 ++++ indra/newview/llfilepicker.h | 1 + indra/newview/llfloaterspellchecksettings.cpp | 127 +++++++++++++++++++-- indra/newview/llfloaterspellchecksettings.h | 25 +++- indra/newview/llviewerfloaterreg.cpp | 1 + .../skins/default/xui/en/floater_spellcheck.xml | 10 ++ .../default/xui/en/floater_spellcheck_import.xml | 116 +++++++++++++++++++ indra/newview/skins/default/xui/en/strings.xml | 1 + 10 files changed, 335 insertions(+), 18 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/floater_spellcheck_import.xml (limited to 'indra') diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp index bde3b56741..04c8a4fed0 100644 --- a/indra/llui/llspellcheck.cpp +++ b/indra/llui/llspellcheck.cpp @@ -88,17 +88,37 @@ S32 LLSpellChecker::getSuggestions(const std::string& word, std::vectorfileExists(tmp_user_path + DICT_CUSTOM_SUFFIX + ".dic")); sdDict["has_ignore"] = (!tmp_user_path.empty()) && (gDirUtilp->fileExists(tmp_user_path + DICT_IGNORE_SUFFIX + ".dic")); } + + sSettingsChangeSignal(); } void LLSpellChecker::addToCustomDictionary(const std::string& word) diff --git a/indra/llui/llspellcheck.h b/indra/llui/llspellcheck.h index d736a7f082..acb121dd19 100644 --- a/indra/llui/llspellcheck.h +++ b/indra/llui/llspellcheck.h @@ -59,12 +59,15 @@ public: static const std::string getDictionaryAppPath(); static const std::string getDictionaryUserPath(); - static const LLSD getDictionaryData(const std::string& dict_name); + static const LLSD getDictionaryData(const std::string& dict_language); static const LLSD& getDictionaryMap() { return sDictMap; } static bool getUseSpellCheck(); static void refreshDictionaryMap(); static void setUseSpellCheck(const std::string& dict_name); +protected: + static void setDictionaryData(const LLSD& dict_info); +public: typedef boost::signals2::signal settings_change_signal_t; static boost::signals2::connection setSettingsChangeCallback(const settings_change_signal_t::slot_type& cb); protected: diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 8986a694f9..cbb5a40cfa 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -59,6 +59,7 @@ LLFilePicker LLFilePicker::sInstance; #define RAW_FILTER L"RAW files (*.raw)\0*.raw\0" #define MODEL_FILTER L"Model files (*.dae)\0*.dae\0" #define SCRIPT_FILTER L"Script files (*.lsl)\0*.lsl\0" +#define DICTIONARY_FILTER L"Dictionary files (*.dic)\0*.dic\0" #endif // @@ -218,6 +219,10 @@ BOOL LLFilePicker::setupFilter(ELoadFilter filter) mOFN.lpstrFilter = SCRIPT_FILTER \ L"\0"; break; + case FFLOAD_DICTIONARY: + mOFN.lpstrFilter = DICTIONARY_FILTER \ + L"\0"; + break; default: res = FALSE; break; @@ -643,6 +648,14 @@ Boolean LLFilePicker::navOpenFilterProc(AEDesc *theItem, void *info, void *callB result = false; } } + else if (filter == FFLOAD_DICTIONARY) + { + if (fileInfo.filetype != 'DIC ' && + (fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("dic"), kCFCompareCaseInsensitive) != kCFCompareEqualTo)) ) + { + result = false; + } + } if (fileInfo.extension) { @@ -1235,6 +1248,12 @@ static std::string add_script_filter_to_gtkchooser(GtkWindow *picker) LLTrans::getString("script_files") + " (*.lsl)"); } +static std::string add_dictionary_filter_to_gtkchooser(GtkWindow *picker) +{ + return add_simple_mime_filter_to_gtkchooser(picker, "text/plain", + LLTrans::getString("dictionary_files") + " (*.dic)"); +} + BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename ) { BOOL rtn = FALSE; @@ -1371,6 +1390,9 @@ BOOL LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking ) case FFLOAD_SCRIPT: filtername = add_script_filter_to_gtkchooser(picker); break; + case FFLOAD_DICTIONARY: + filtername = add_dictionary_filter_to_gtkchooser(picker); + break; default:; break; } diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h index a4d5d68ff5..55c665b9c7 100644 --- a/indra/newview/llfilepicker.h +++ b/indra/newview/llfilepicker.h @@ -85,6 +85,7 @@ public: FFLOAD_MODEL = 9, FFLOAD_COLLADA = 10, FFLOAD_SCRIPT = 11, + FFLOAD_DICTIONARY = 12 }; enum ESaveFilter diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index ff5afc8169..8bf480c4df 100644 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -27,13 +27,19 @@ #include "llviewerprecompiledheaders.h" #include "llcombobox.h" +#include "llfilepicker.h" +#include "llfloaterreg.h" #include "llfloaterspellchecksettings.h" #include "llscrolllistctrl.h" +#include "llsdserialize.h" #include "llspellcheck.h" #include "llviewercontrol.h" #include +///---------------------------------------------------------------------------- +/// Class LLFloaterSpellCheckerSettings +///---------------------------------------------------------------------------- LLFloaterSpellCheckerSettings::LLFloaterSpellCheckerSettings(const LLSD& key) : LLFloater(key) { @@ -42,21 +48,28 @@ LLFloaterSpellCheckerSettings::LLFloaterSpellCheckerSettings(const LLSD& key) BOOL LLFloaterSpellCheckerSettings::postBuild(void) { gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&LLFloaterSpellCheckerSettings::refreshDictionaryLists, this, false)); + LLSpellChecker::setSettingsChangeCallback(boost::bind(&LLFloaterSpellCheckerSettings::onSpellCheckSettingsChange, this)); + getChild("spellcheck_import_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnImport, this)); getChild("spellcheck_main_combo")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::refreshDictionaryLists, this, false)); - getChild("spellcheck_moveleft_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onClickDictMove, this, "spellcheck_active_list", "spellcheck_available_list")); - getChild("spellcheck_moveright_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onClickDictMove, this, "spellcheck_available_list", "spellcheck_active_list")); - getChild("spellcheck_ok")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onOK, this)); - getChild("spellcheck_cancel")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onCancel, this)); + getChild("spellcheck_moveleft_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnMove, this, "spellcheck_active_list", "spellcheck_available_list")); + getChild("spellcheck_moveright_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnMove, this, "spellcheck_available_list", "spellcheck_active_list")); + getChild("spellcheck_ok")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnOK, this)); + getChild("spellcheck_cancel")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnCancel, this)); return true; } -void LLFloaterSpellCheckerSettings::onCancel() +void LLFloaterSpellCheckerSettings::onBtnCancel() { closeFloater(false); } -void LLFloaterSpellCheckerSettings::onClickDictMove(const std::string& from, const std::string& to) +void LLFloaterSpellCheckerSettings::onBtnImport() +{ + LLFloaterReg::showInstance("prefs_spellchecker_import"); +} + +void LLFloaterSpellCheckerSettings::onBtnMove(const std::string& from, const std::string& to) { LLScrollListCtrl* from_ctrl = findChild(from); LLScrollListCtrl* to_ctrl = findChild(to); @@ -75,7 +88,7 @@ void LLFloaterSpellCheckerSettings::onClickDictMove(const std::string& from, con from_ctrl->deleteSelectedItems(); } -void LLFloaterSpellCheckerSettings::onOK() +void LLFloaterSpellCheckerSettings::onBtnOK() { std::list list_dict; @@ -100,6 +113,11 @@ void LLFloaterSpellCheckerSettings::onOpen(const LLSD& key) refreshDictionaryLists(true); } +void LLFloaterSpellCheckerSettings::onSpellCheckSettingsChange() +{ + refreshDictionaryLists(true); +} + void LLFloaterSpellCheckerSettings::refreshDictionaryLists(bool from_settings) { bool enabled = gSavedSettings.getBOOL("SpellCheck"); @@ -177,3 +195,98 @@ void LLFloaterSpellCheckerSettings::refreshDictionaryLists(bool from_settings) } } } + +///---------------------------------------------------------------------------- +/// Class LLFloaterSpellCheckerImport +///---------------------------------------------------------------------------- +LLFloaterSpellCheckerImport::LLFloaterSpellCheckerImport(const LLSD& key) + : LLFloater(key) +{ +} + +BOOL LLFloaterSpellCheckerImport::postBuild(void) +{ + getChild("dictionary_path_browse")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerImport::onBtnBrowse, this)); + getChild("ok_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerImport::onBtnOK, this)); + getChild("cancel_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerImport::onBtnCancel, this)); + + return true; +} + +void LLFloaterSpellCheckerImport::onBtnBrowse() +{ + LLFilePicker& file_picker = LLFilePicker::instance(); + if (!file_picker.getOpenFile(LLFilePicker::FFLOAD_DICTIONARY)) + { + return; + } + + const std::string filepath = file_picker.getFirstFile(); + getChild("dictionary_path")->setValue(filepath); + + mDictionaryDir = gDirUtilp->getDirName(filepath); + mDictionaryBasename = gDirUtilp->getBaseFileName(filepath, true); + getChild("dictionary_name")->setValue(mDictionaryBasename); +} + +void LLFloaterSpellCheckerImport::onBtnCancel() +{ + closeFloater(false); +} + +void LLFloaterSpellCheckerImport::onBtnOK() +{ + const std::string dict_dic = mDictionaryDir + gDirUtilp->getDirDelimiter() + mDictionaryBasename + ".dic"; + const std::string dict_aff = mDictionaryDir + gDirUtilp->getDirDelimiter() + mDictionaryBasename + ".aff"; + std::string dict_language = getChild("dictionary_language")->getValue().asString(); + LLStringUtil::trim(dict_language); + if ( (dict_language.empty()) || (!gDirUtilp->fileExists(dict_dic)) || + (mDictionaryDir.empty()) || (mDictionaryBasename.empty()) ) + { + return; + } + + LLSD custom_dict_info; + custom_dict_info["is_primary"] = (bool)gDirUtilp->fileExists(dict_aff); + custom_dict_info["name"] = mDictionaryBasename; + custom_dict_info["language"] = dict_language; + + LLSD custom_dict_map; + llifstream custom_file_in(LLSpellChecker::getDictionaryUserPath() + "user_dictionaries.xml"); + if (custom_file_in.is_open()) + { + LLSDSerialize::fromXMLDocument(custom_dict_map, custom_file_in); + custom_file_in.close(); + } + + LLSD::array_iterator it = custom_dict_map.beginArray(); + for (; it != custom_dict_map.endArray(); ++it) + { + LLSD& dict_info = *it; + if (dict_info["name"].asString() == mDictionaryBasename) + { + dict_info = custom_dict_info; + break; + } + } + if (custom_dict_map.endArray() == it) + { + custom_dict_map.append(custom_dict_info); + } + + llofstream custom_file_out(LLSpellChecker::getDictionaryUserPath() + "user_dictionaries.xml", std::ios::trunc); + if (custom_file_out.is_open()) + { + LLSDSerialize::toPrettyXML(custom_dict_map, custom_file_out); + custom_file_out.close(); + } + + LLFile::rename(dict_dic, LLSpellChecker::getDictionaryUserPath() + mDictionaryBasename + ".dic"); + if (gDirUtilp->fileExists(dict_aff)) + { + LLFile::rename(dict_aff, LLSpellChecker::getDictionaryUserPath() + mDictionaryBasename + ".aff"); + } + LLSpellChecker::refreshDictionaryMap(); + + closeFloater(false); +} diff --git a/indra/newview/llfloaterspellchecksettings.h b/indra/newview/llfloaterspellchecksettings.h index 33c376fff6..521b586835 100644 --- a/indra/newview/llfloaterspellchecksettings.h +++ b/indra/newview/llfloaterspellchecksettings.h @@ -38,11 +38,28 @@ public: /*virtual*/ void onOpen(const LLSD& key); protected: - void onCancel(); - void onClickDictMove(const std::string& from, const std::string& to); - void onOK(); - void onSave(); + void onBtnCancel(); + void onBtnImport(); + void onBtnMove(const std::string& from, const std::string& to); + void onBtnOK(); + void onSpellCheckSettingsChange(); void refreshDictionaryLists(bool from_settings); }; +class LLFloaterSpellCheckerImport : public LLFloater +{ +public: + LLFloaterSpellCheckerImport(const LLSD& key); + + /*virtual*/ BOOL postBuild(); + +protected: + void onBtnBrowse(); + void onBtnCancel(); + void onBtnOK(); + + std::string mDictionaryDir; + std::string mDictionaryBasename; +}; + #endif // LLFLOATERAUTOREPLACESETTINGS_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index e9ce04fd3f..9c27e19255 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -250,6 +250,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("prefs_proxy", "floater_preferences_proxy.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("prefs_hardware_settings", "floater_hardware_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("prefs_spellchecker", "floater_spellcheck.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("prefs_spellchecker_import", "floater_spellcheck_import.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("prefs_translation", "floater_translation_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("perm_prefs", "floater_perm_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("picks", "floater_picks.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/xui/en/floater_spellcheck.xml b/indra/newview/skins/default/xui/en/floater_spellcheck.xml index bd3f60cf4a..91639ed0da 100644 --- a/indra/newview/skins/default/xui/en/floater_spellcheck.xml +++ b/indra/newview/skins/default/xui/en/floater_spellcheck.xml @@ -53,6 +53,16 @@ top_pad="-15" width="175" /> + -- cgit v1.2.3 From fc1f30a05b14d80786f7fd41b30640092fc5683d Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 14 Jun 2012 19:51:59 -0400 Subject: STORM-1882: keep dictionary selected when moving, allowing deletion when moved to Available --- indra/newview/llfloaterspellchecksettings.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index d350637790..95934d46a8 100644 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -88,11 +88,13 @@ void LLFloaterSpellCheckerSettings::onBtnMove(const std::string& from, const std row["columns"][0]["font"]["style"] = "NORMAL"; std::vector sel_items = from_ctrl->getAllSelected(); - for (std::vector::const_iterator sel_it = sel_items.begin(); sel_it != sel_items.end(); ++sel_it) + std::vector::const_iterator sel_it; + for ( sel_it = sel_items.begin(); sel_it != sel_items.end(); ++sel_it) { row["value"] = (*sel_it)->getValue(); row["columns"][0]["value"] = (*sel_it)->getColumn(0)->getValue(); to_ctrl->addElement(row); + to_ctrl->setSelectedByValue( (*sel_it)->getValue(), true ); } from_ctrl->deleteSelectedItems(); } -- cgit v1.2.3 From c8f21753fa4cc88e3ad58f9e117c231d6f5388c0 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 14 Jun 2012 20:18:16 -0400 Subject: STORM-1881: close dictionary import dialog if parent spell checking prefs dialog is closed --- indra/newview/llfloaterspellchecksettings.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index 95934d46a8..5116ec50a6 100644 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -106,6 +106,7 @@ void LLFloaterSpellCheckerSettings::onClose(bool app_quitting) // don't save anything return; } + LLFloaterReg::hideInstance("prefs_spellchecker_import"); std::list list_dict; -- cgit v1.2.3 From 02f0f87f95c7f47a93d20de9478bf0b2d5c6e4e6 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 14 Jun 2012 21:21:42 -0400 Subject: STORM-1880: copy imported dictionary files rather than moving them --- indra/newview/llfloaterspellchecksettings.cpp | 124 +++++++++++++++------ indra/newview/llfloaterspellchecksettings.h | 1 + .../newview/skins/default/xui/en/notifications.xml | 11 ++ 3 files changed, 105 insertions(+), 31 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index 5116ec50a6..758ac23b4c 100644 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -35,6 +35,7 @@ #include "llspellcheck.h" #include "lltrans.h" #include "llviewercontrol.h" +#include "llnotificationsutil.h" #include @@ -291,47 +292,108 @@ void LLFloaterSpellCheckerImport::onBtnOK() return; } - LLSD custom_dict_info; - custom_dict_info["is_primary"] = (bool)gDirUtilp->fileExists(dict_aff); - custom_dict_info["name"] = mDictionaryBasename; - custom_dict_info["language"] = dict_language; - - LLSD custom_dict_map; - llifstream custom_file_in(LLSpellChecker::getDictionaryUserPath() + "user_dictionaries.xml"); - if (custom_file_in.is_open()) + bool imported = false; + std::string settings_dic = LLSpellChecker::getDictionaryUserPath() + mDictionaryBasename + ".dic"; + if ( copyFile( dict_dic, settings_dic ) ) { - LLSDSerialize::fromXMLDocument(custom_dict_map, custom_file_in); - custom_file_in.close(); - } - - LLSD::array_iterator it = custom_dict_map.beginArray(); - for (; it != custom_dict_map.endArray(); ++it) - { - LLSD& dict_info = *it; - if (dict_info["name"].asString() == mDictionaryBasename) + if (gDirUtilp->fileExists(dict_aff)) + { + std::string settings_aff = LLSpellChecker::getDictionaryUserPath() + mDictionaryBasename + ".aff"; + if (copyFile( dict_aff, settings_aff )) + { + imported = true; + } + else + { + LLSD args = LLSD::emptyMap(); + args["FROM_NAME"] = dict_aff; + args["TO_NAME"] = settings_aff; + LLNotificationsUtil::add("SpellingDictImportFailed", args); + } + } + else { - dict_info = custom_dict_info; - break; + imported = true; } } - if (custom_dict_map.endArray() == it) + else { - custom_dict_map.append(custom_dict_info); + LLSD args = LLSD::emptyMap(); + args["FROM_NAME"] = dict_dic; + args["TO_NAME"] = settings_dic; + LLNotificationsUtil::add("SpellingDictImportFailed", args); } - llofstream custom_file_out(LLSpellChecker::getDictionaryUserPath() + "user_dictionaries.xml", std::ios::trunc); - if (custom_file_out.is_open()) + if ( imported ) { - LLSDSerialize::toPrettyXML(custom_dict_map, custom_file_out); - custom_file_out.close(); - } + LLSD custom_dict_info; + custom_dict_info["is_primary"] = (bool)gDirUtilp->fileExists(dict_aff); + custom_dict_info["name"] = mDictionaryBasename; + custom_dict_info["language"] = dict_language; + + LLSD custom_dict_map; + llifstream custom_file_in(LLSpellChecker::getDictionaryUserPath() + "user_dictionaries.xml"); + if (custom_file_in.is_open()) + { + LLSDSerialize::fromXMLDocument(custom_dict_map, custom_file_in); + custom_file_in.close(); + } + + LLSD::array_iterator it = custom_dict_map.beginArray(); + for (; it != custom_dict_map.endArray(); ++it) + { + LLSD& dict_info = *it; + if (dict_info["name"].asString() == mDictionaryBasename) + { + dict_info = custom_dict_info; + break; + } + } + if (custom_dict_map.endArray() == it) + { + custom_dict_map.append(custom_dict_info); + } - LLFile::rename(dict_dic, LLSpellChecker::getDictionaryUserPath() + mDictionaryBasename + ".dic"); - if (gDirUtilp->fileExists(dict_aff)) - { - LLFile::rename(dict_aff, LLSpellChecker::getDictionaryUserPath() + mDictionaryBasename + ".aff"); + llofstream custom_file_out(LLSpellChecker::getDictionaryUserPath() + "user_dictionaries.xml", std::ios::trunc); + if (custom_file_out.is_open()) + { + LLSDSerialize::toPrettyXML(custom_dict_map, custom_file_out); + custom_file_out.close(); + } + + LLSpellChecker::refreshDictionaryMap(); } - LLSpellChecker::refreshDictionaryMap(); closeFloater(false); } + +bool LLFloaterSpellCheckerImport::copyFile(const std::string from, const std::string to) +{ + bool copied = false; + LLFILE* in = LLFile::fopen(from, "rb"); /* Flawfinder: ignore */ + if (in) + { + LLFILE* out = LLFile::fopen(to, "wb"); /* Flawfinder: ignore */ + if (out) + { + char buf[16384]; /* Flawfinder: ignore */ + size_t readbytes; + bool write_ok = true; + while(write_ok && (readbytes = fread(buf, 1, 16384, in))) /* Flawfinder: ignore */ + { + if (fwrite(buf, 1, readbytes, out) != readbytes) + { + LL_WARNS("SpellCheck") << "Short write" << LL_ENDL; + write_ok = false; + } + } + if ( write_ok ) + { + copied = true; + } + fclose(out); + } + } + fclose(in); + return copied; +} diff --git a/indra/newview/llfloaterspellchecksettings.h b/indra/newview/llfloaterspellchecksettings.h index 4bc68e2a88..8c4ac22bc6 100644 --- a/indra/newview/llfloaterspellchecksettings.h +++ b/indra/newview/llfloaterspellchecksettings.h @@ -58,6 +58,7 @@ protected: void onBtnBrowse(); void onBtnCancel(); void onBtnOK(); + bool copyFile(const std::string from, const std::string to); std::string mDictionaryDir; std::string mDictionaryBasename; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index bc69e973ed..c04e33fe8e 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2396,6 +2396,17 @@ Would you be my friend? fail + + Unable to copy + [FROM_NAME] + to + [TO_NAME] + fail + + Date: Fri, 15 Jun 2012 09:16:49 -0400 Subject: minor cosmetic changes to spelling floater --- indra/newview/llfloaterspellchecksettings.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index 758ac23b4c..8e4e5bb744 100644 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -69,7 +69,7 @@ BOOL LLFloaterSpellCheckerSettings::postBuild(void) getChild("spellcheck_main_combo")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::refreshDictionaries, this, false)); getChild("spellcheck_moveleft_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnMove, this, "spellcheck_active_list", "spellcheck_available_list")); getChild("spellcheck_moveright_btn")->setCommitCallback(boost::bind(&LLFloaterSpellCheckerSettings::onBtnMove, this, "spellcheck_available_list", "spellcheck_active_list")); - + center(); return true; } @@ -85,8 +85,6 @@ void LLFloaterSpellCheckerSettings::onBtnMove(const std::string& from, const std LLSD row; row["columns"][0]["column"] = "name"; - row["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; - row["columns"][0]["font"]["style"] = "NORMAL"; std::vector sel_items = from_ctrl->getAllSelected(); std::vector::const_iterator sel_it; @@ -164,7 +162,6 @@ void LLFloaterSpellCheckerSettings::refreshDictionaries(bool from_settings) dict_cur = LLSpellChecker::instance().getPrimaryDictionary(); } dict_combo->clearRows(); - dict_combo->setEnabled(enabled); const LLSD& dict_map = LLSpellChecker::getDictionaryMap(); if (dict_map.size()) @@ -182,6 +179,7 @@ void LLFloaterSpellCheckerSettings::refreshDictionaries(bool from_settings) dict_combo->clear(); } } + dict_combo->setEnabled(enabled); // Populate the available and active dictionary list LLScrollListCtrl* avail_ctrl = findChild("spellcheck_available_list"); @@ -210,8 +208,6 @@ void LLFloaterSpellCheckerSettings::refreshDictionaries(bool from_settings) LLSD row; row["columns"][0]["column"] = "name"; - row["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; - row["columns"][0]["font"]["style"] = "NORMAL"; active_ctrl->clearRows(); active_ctrl->setEnabled(enabled); -- cgit v1.2.3 From bdb0f4f4853472bdba94ed7a6a70653de6290e0c Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 15 Jun 2012 17:11:58 +0200 Subject: STORM-276 FIXED Main dictionary combobox in spell check settings floater doesn't sort dictionaries by name --- indra/newview/llfloaterspellchecksettings.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index 8e4e5bb744..22eaa566fe 100644 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -179,6 +179,7 @@ void LLFloaterSpellCheckerSettings::refreshDictionaries(bool from_settings) dict_combo->clear(); } } + dict_combo->sortByName(); dict_combo->setEnabled(enabled); // Populate the available and active dictionary list -- cgit v1.2.3 From 3f7ed8b888b5725912e38f19e36c4c5e1583ea7c Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 15 Jun 2012 12:36:03 -0400 Subject: STORM-1883: add alert when a secondary dictionary is imported --- indra/newview/llfloaterspellchecksettings.cpp | 4 ++++ indra/newview/skins/default/xui/en/notifications.xml | 11 +++++++++++ 2 files changed, 15 insertions(+) (limited to 'indra') diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index 22eaa566fe..d7fbc94631 100644 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -310,6 +310,10 @@ void LLFloaterSpellCheckerImport::onBtnOK() } else { + LLSD args = LLSD::emptyMap(); + args["DIC_NAME"] = dict_dic; + LLNotificationsUtil::add("SpellingDictIsSecondary", args); + imported = true; } } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index c04e33fe8e..79e02727e9 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2396,6 +2396,17 @@ Would you be my friend? fail + +The dictionary [DIC_NAME] does not appear to have an "aff" file; this means that it is a "secondary" dictionary. +It can be used as an additional dictionary, but not as your Main dictionary. + +See https://wiki.secondlife.com/wiki/Adding_Spelling_Dictionaries + confirm + + Date: Fri, 15 Jun 2012 20:47:02 +0200 Subject: STORM-276 Ease-of-use importing of Open Office dictionary extensions --- indra/newview/llfilepicker.cpp | 8 ++- indra/newview/llfloaterspellchecksettings.cpp | 87 ++++++++++++++++++++++++++- indra/newview/llfloaterspellchecksettings.h | 1 + 3 files changed, 92 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index cbb5a40cfa..5c963025cb 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -59,7 +59,7 @@ LLFilePicker LLFilePicker::sInstance; #define RAW_FILTER L"RAW files (*.raw)\0*.raw\0" #define MODEL_FILTER L"Model files (*.dae)\0*.dae\0" #define SCRIPT_FILTER L"Script files (*.lsl)\0*.lsl\0" -#define DICTIONARY_FILTER L"Dictionary files (*.dic)\0*.dic\0" +#define DICTIONARY_FILTER L"Dictionary files (*.dic; *.xcu)\0*.dic;*.xcu\0" #endif // @@ -651,7 +651,9 @@ Boolean LLFilePicker::navOpenFilterProc(AEDesc *theItem, void *info, void *callB else if (filter == FFLOAD_DICTIONARY) { if (fileInfo.filetype != 'DIC ' && - (fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("dic"), kCFCompareCaseInsensitive) != kCFCompareEqualTo)) ) + fileInfo.filetype != 'XCU ' && + (fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("dic"), kCFCompareCaseInsensitive) != kCFCompareEqualTo) && + fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("xcu"), kCFCompareCaseInsensitive) != kCFCompareEqualTo)) { result = false; } @@ -1251,7 +1253,7 @@ static std::string add_script_filter_to_gtkchooser(GtkWindow *picker) static std::string add_dictionary_filter_to_gtkchooser(GtkWindow *picker) { return add_simple_mime_filter_to_gtkchooser(picker, "text/plain", - LLTrans::getString("dictionary_files") + " (*.dic)"); + LLTrans::getString("dictionary_files") + " (*.dic; *.xcu)"); } BOOL LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename ) diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index d7fbc94631..c62577bc94 100644 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -264,7 +264,18 @@ void LLFloaterSpellCheckerImport::onBtnBrowse() return; } - const std::string filepath = file_picker.getFirstFile(); + std::string filepath = file_picker.getFirstFile(); + + const std::string extension = gDirUtilp->getExtension(filepath); + if ("xcu" == extension) + { + filepath = parseXcuFile(filepath); + if (filepath.empty()) + { + return; + } + } + getChild("dictionary_path")->setValue(filepath); mDictionaryDir = gDirUtilp->getDirName(filepath); @@ -398,3 +409,77 @@ bool LLFloaterSpellCheckerImport::copyFile(const std::string from, const std::st fclose(in); return copied; } + +std::string LLFloaterSpellCheckerImport::parseXcuFile(const std::string& file_path) const +{ + LLXMLNodePtr xml_root; + if ( (!LLUICtrlFactory::getLayeredXMLNode(file_path, xml_root)) || (xml_root.isNull()) ) + { + return LLStringUtil::null; + } + + // Bury down to the "Dictionaries" parent node + LLXMLNode* dict_node = NULL; + for (LLXMLNode* outer_node = xml_root->getFirstChild(); outer_node && !dict_node; outer_node = outer_node->getNextSibling()) + { + std::string temp; + if ( (outer_node->getAttributeString("oor:name", temp)) && ("ServiceManager" == temp) ) + { + for (LLXMLNode* inner_node = outer_node->getFirstChild(); inner_node && !dict_node; inner_node = inner_node->getNextSibling()) + { + if ( (inner_node->getAttributeString("oor:name", temp)) && ("Dictionaries" == temp) ) + { + dict_node = inner_node; + break; + } + } + } + } + + if (dict_node) + { + // Iterate over all child nodes until we find one that has a DICT_SPELL node + for (LLXMLNode* outer_node = dict_node->getFirstChild(); outer_node; outer_node = outer_node->getNextSibling()) + { + std::string temp; + LLXMLNodePtr location_node, format_node; + for (LLXMLNode* inner_node = outer_node->getFirstChild(); inner_node; inner_node = inner_node->getNextSibling()) + { + if (inner_node->getAttributeString("oor:name", temp)) + { + if ("Locations" == temp) + { + inner_node->getChild("value", location_node, false); + } + else if ("Format" == temp) + { + inner_node->getChild("value", format_node, false); + } + } + } + if ( (format_node.isNull()) || ("DICT_SPELL" != format_node->getValue()) || (location_node.isNull()) ) + { + continue; + } + + // Found a list of file locations, return the .dic (if present) + std::list location_list; + boost::split(location_list, location_node->getValue(), boost::is_any_of(std::string(" "))); + for (std::list::iterator it = location_list.begin(); it != location_list.end(); ++it) + { + std::string& location = *it; + if ("\\" != gDirUtilp->getDirDelimiter()) + LLStringUtil::replaceString(location, "\\", gDirUtilp->getDirDelimiter()); + else + LLStringUtil::replaceString(location, "/", gDirUtilp->getDirDelimiter()); + LLStringUtil::replaceString(location, "%origin%", gDirUtilp->getDirName(file_path)); + if ("dic" == gDirUtilp->getExtension(location)) + { + return location; + } + } + } + } + + return LLStringUtil::null; +} diff --git a/indra/newview/llfloaterspellchecksettings.h b/indra/newview/llfloaterspellchecksettings.h index 8c4ac22bc6..eded3a9133 100644 --- a/indra/newview/llfloaterspellchecksettings.h +++ b/indra/newview/llfloaterspellchecksettings.h @@ -59,6 +59,7 @@ protected: void onBtnCancel(); void onBtnOK(); bool copyFile(const std::string from, const std::string to); + std::string parseXcuFile(const std::string& file_path) const; std::string mDictionaryDir; std::string mDictionaryBasename; -- cgit v1.2.3 From 10275e9bb1ac21eec7bb34fd5c42c61b17b76a74 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 15 Jun 2012 17:40:07 -0400 Subject: corrected build problem detected on Mac --- indra/newview/llfilepicker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 5c963025cb..4bf5b26b3b 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -653,7 +653,7 @@ Boolean LLFilePicker::navOpenFilterProc(AEDesc *theItem, void *info, void *callB if (fileInfo.filetype != 'DIC ' && fileInfo.filetype != 'XCU ' && (fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("dic"), kCFCompareCaseInsensitive) != kCFCompareEqualTo) && - fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("xcu"), kCFCompareCaseInsensitive) != kCFCompareEqualTo)) + fileInfo.extension && (CFStringCompare(fileInfo.extension, CFSTR("xcu"), kCFCompareCaseInsensitive) != kCFCompareEqualTo))) { result = false; } -- cgit v1.2.3 From 8ef14ffb299a55d29284111899415d824db89263 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Tue, 19 Jun 2012 21:48:45 +0200 Subject: STORM-1887 FIXED Added words are not saved in dictionaries if main dictionary was reselected The user's custom dictionary and ignore list are now independent of the primary dictionary. --- indra/llui/llspellcheck.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp index 887714d720..a189375fbe 100644 --- a/indra/llui/llspellcheck.cpp +++ b/indra/llui/llspellcheck.cpp @@ -38,8 +38,8 @@ #endif static const std::string DICT_DIR = "dictionaries"; -static const std::string DICT_CUSTOM_SUFFIX = "_custom"; -static const std::string DICT_IGNORE_SUFFIX = "_ignore"; +static const std::string DICT_FILE_CUSTOM = "user_custom.dic"; +static const std::string DICT_FILE_IGNORE = "user_ignore.dic"; static const std::string DICT_FILE_MAIN = "dictionaries.xml"; static const std::string DICT_FILE_USER = "user_dictionaries.xml"; @@ -178,8 +178,6 @@ void LLSpellChecker::refreshDictionaryMap() tmp_user_path = (sdDict.has("name")) ? user_path + sdDict["name"].asString() : LLStringUtil::null; sdDict["installed"] = (!tmp_app_path.empty()) && ((gDirUtilp->fileExists(tmp_user_path + ".dic")) || (gDirUtilp->fileExists(tmp_app_path + ".dic"))); - sdDict["has_custom"] = (!tmp_user_path.empty()) && (gDirUtilp->fileExists(tmp_user_path + DICT_CUSTOM_SUFFIX + ".dic")); - sdDict["has_ignore"] = (!tmp_user_path.empty()) && (gDirUtilp->fileExists(tmp_user_path + DICT_IGNORE_SUFFIX + ".dic")); } sSettingsChangeSignal(); @@ -191,7 +189,7 @@ void LLSpellChecker::addToCustomDictionary(const std::string& word) { mHunspell->add(word.c_str()); } - addToDictFile(getDictionaryUserPath() + mDictFile + DICT_CUSTOM_SUFFIX + ".dic", word); + addToDictFile(getDictionaryUserPath() + DICT_FILE_CUSTOM, word); sSettingsChangeSignal(); } @@ -202,7 +200,7 @@ void LLSpellChecker::addToIgnoreList(const std::string& word) if (mIgnoreList.end() == std::find(mIgnoreList.begin(), mIgnoreList.end(), word_lower)) { mIgnoreList.push_back(word_lower); - addToDictFile(getDictionaryUserPath() + mDictFile + DICT_IGNORE_SUFFIX + ".dic", word_lower); + addToDictFile(getDictionaryUserPath() + DICT_FILE_IGNORE, word_lower); sSettingsChangeSignal(); } } @@ -343,15 +341,14 @@ void LLSpellChecker::initHunspell(const std::string& dict_language) mDictLanguage = dict_language; mDictFile = dict_entry["name"].asString(); - if (dict_entry["has_custom"].asBoolean()) + if (gDirUtilp->fileExists(user_path + DICT_FILE_CUSTOM)) { - const std::string filename_dic = user_path + mDictFile + DICT_CUSTOM_SUFFIX + ".dic"; - mHunspell->add_dic(filename_dic.c_str()); + mHunspell->add_dic((user_path + DICT_FILE_CUSTOM).c_str()); } - if (dict_entry["has_ignore"].asBoolean()) + if (gDirUtilp->fileExists(user_path + DICT_FILE_IGNORE)) { - llifstream file_in(user_path + mDictFile + DICT_IGNORE_SUFFIX + ".dic", std::ios::in); + llifstream file_in(user_path + DICT_FILE_IGNORE, std::ios::in); if (file_in.is_open()) { std::string word; int idxLine = 0; -- cgit v1.2.3 From 5dceb6b06c8493d0bf0e21ead14539185bd4b4a8 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 20 Jun 2012 21:52:42 -0400 Subject: STORM-1889: require all fields when importing spelling dictionary --- indra/newview/llfloaterspellchecksettings.cpp | 56 ++++++++++++---------- .../newview/skins/default/xui/en/notifications.xml | 8 ++++ 2 files changed, 39 insertions(+), 25 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterspellchecksettings.cpp b/indra/newview/llfloaterspellchecksettings.cpp index c62577bc94..5ecdd11918 100644 --- a/indra/newview/llfloaterspellchecksettings.cpp +++ b/indra/newview/llfloaterspellchecksettings.cpp @@ -294,47 +294,53 @@ void LLFloaterSpellCheckerImport::onBtnOK() const std::string dict_aff = mDictionaryDir + gDirUtilp->getDirDelimiter() + mDictionaryBasename + ".aff"; std::string dict_language = getChild("dictionary_language")->getValue().asString(); LLStringUtil::trim(dict_language); - if ( (dict_language.empty()) || (!gDirUtilp->fileExists(dict_dic)) || - (mDictionaryDir.empty()) || (mDictionaryBasename.empty()) ) - { - return; - } bool imported = false; - std::string settings_dic = LLSpellChecker::getDictionaryUserPath() + mDictionaryBasename + ".dic"; - if ( copyFile( dict_dic, settings_dic ) ) + if ( dict_language.empty() + || mDictionaryDir.empty() + || mDictionaryBasename.empty() + || ! gDirUtilp->fileExists(dict_dic) + ) { - if (gDirUtilp->fileExists(dict_aff)) + LLNotificationsUtil::add("SpellingDictImportRequired"); + } + else + { + std::string settings_dic = LLSpellChecker::getDictionaryUserPath() + mDictionaryBasename + ".dic"; + if ( copyFile( dict_dic, settings_dic ) ) { - std::string settings_aff = LLSpellChecker::getDictionaryUserPath() + mDictionaryBasename + ".aff"; - if (copyFile( dict_aff, settings_aff )) + if (gDirUtilp->fileExists(dict_aff)) { - imported = true; + std::string settings_aff = LLSpellChecker::getDictionaryUserPath() + mDictionaryBasename + ".aff"; + if (copyFile( dict_aff, settings_aff )) + { + imported = true; + } + else + { + LLSD args = LLSD::emptyMap(); + args["FROM_NAME"] = dict_aff; + args["TO_NAME"] = settings_aff; + LLNotificationsUtil::add("SpellingDictImportFailed", args); + } } else { LLSD args = LLSD::emptyMap(); - args["FROM_NAME"] = dict_aff; - args["TO_NAME"] = settings_aff; - LLNotificationsUtil::add("SpellingDictImportFailed", args); + args["DIC_NAME"] = dict_dic; + LLNotificationsUtil::add("SpellingDictIsSecondary", args); + + imported = true; } } else { LLSD args = LLSD::emptyMap(); - args["DIC_NAME"] = dict_dic; - LLNotificationsUtil::add("SpellingDictIsSecondary", args); - - imported = true; + args["FROM_NAME"] = dict_dic; + args["TO_NAME"] = settings_dic; + LLNotificationsUtil::add("SpellingDictImportFailed", args); } } - else - { - LLSD args = LLSD::emptyMap(); - args["FROM_NAME"] = dict_dic; - args["TO_NAME"] = settings_dic; - LLNotificationsUtil::add("SpellingDictImportFailed", args); - } if ( imported ) { diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 79e02727e9..1cb0fad9a9 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2396,6 +2396,14 @@ Would you be my friend? fail + + You must specify a file, a name, and a language. + fail + +