Skip to content

Commit 0adefac

Browse files
committed
fix typos (for #5698)
1 parent e145790 commit 0adefac

8 files changed

Lines changed: 16 additions & 16 deletions

File tree

src/Canvas.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2584,15 +2584,15 @@ static LRESULT OnGesture(MainWindow* win, UINT msg, WPARAM wp, LPARAM lp) {
25842584
if (!dm->NeedHScroll()) {
25852585
// if the page is fully visible
25862586
flipPage = true;
2587-
// logf("flipPage becaues !dm->NeedHScroll()");
2587+
// logf("flipPage because !dm->NeedHScroll()");
25882588
}
25892589
if (deltaX > 0 && !dm->CanScrollRight()) {
25902590
flipPage = true;
2591-
// logf("flipPage becaues deltaX > 0 && !dm->CanScrollRight()");
2591+
// logf("flipPage because deltaX > 0 && !dm->CanScrollRight()");
25922592
}
25932593
if (deltaX < 0 && !dm->CanScrollLeft()) {
25942594
flipPage = true;
2595-
// logf("flipPage becaues deltaX < 0 && !dm->CanScrollLeft()");
2595+
// logf("flipPage because deltaX < 0 && !dm->CanScrollLeft()");
25962596
}
25972597

25982598
if (isFlickX && flipPage) {

src/RenderCache.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ void RenderCache::FreePage(DisplayModel* dm, int pageNo, TilePosition* tile) {
319319
}
320320
ScopedCritSec scope(&cacheAccess);
321321

322-
// must go from end becaues freeing changes the cache
322+
// must go from end because freeing changes the cache
323323
for (int i = cacheCount - 1; i >= 0; i--) {
324324
BitmapCacheEntry* entry = cache[i];
325325
bool shouldFree = (entry->dm == dm) && (entry->pageNo == pageNo);
@@ -339,7 +339,7 @@ void RenderCache::FreePage(DisplayModel* dm, int pageNo, TilePosition* tile) {
339339
void RenderCache::FreeForDisplayModel(DisplayModel* dm) {
340340
rcLogf("RenderCache::FreeForDisplayModel: dm: 0x%p\n", dm);
341341
ScopedCritSec scope(&cacheAccess);
342-
// must go from end becaues freeing changes the cache
342+
// must go from end because freeing changes the cache
343343
for (int i = cacheCount - 1; i >= 0; i--) {
344344
BitmapCacheEntry* entry = cache[i];
345345
if (entry->dm == dm) {
@@ -351,7 +351,7 @@ void RenderCache::FreeForDisplayModel(DisplayModel* dm) {
351351
void RenderCache::FreeNotVisible() {
352352
// rcLogf("RenderCache::FreeNotVisible\n");
353353
ScopedCritSec scope(&cacheAccess);
354-
// must go from end becaues freeing changes the cache
354+
// must go from end because freeing changes the cache
355355
for (int i = cacheCount - 1; i >= 0; i--) {
356356
BitmapCacheEntry* entry = cache[i];
357357
// all invisible pages resp. page tiles

src/SearchAndDDE.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ bool AbortFinding(MainWindow* win, bool hideMessage) {
438438

439439
// wasModified
440440
// if true, starting a search for new term
441-
// if false, searching for the next occurence of previous term
441+
// if false, searching for the next occurrence of previous term
442442
// TODO: should detect wasModified by comparing with the last search result
443443
void FindTextOnThread(MainWindow* win, TextSearch::Direction direction, const char* text, bool wasModified,
444444
bool showProgress) {
@@ -668,7 +668,7 @@ void ShowForwardSearchResult(MainWindow* win, const char* fileName, int line, in
668668
} else if (ret == PDFSYNCERR_SYNCFILE_CANNOT_BE_OPENED) {
669669
args.msg = _TRA("Synchronization file cannot be opened");
670670
} else if (ret == PDFSYNCERR_INVALID_PAGE_NUMBER) {
671-
buf = str::FormatTemp(_TRA("Page number %u inexistant"), page);
671+
buf = str::FormatTemp(_TRA("Page number %u nonexistent"), page);
672672
} else if (ret == PDFSYNCERR_NO_SYNC_AT_LOCATION) {
673673
args.msg = _TRA("No synchronization info at this position");
674674
} else if (ret == PDFSYNCERR_UNKNOWN_SOURCEFILE) {
@@ -1301,7 +1301,7 @@ static const char* HandleCmdCommand(HWND hwnd, const char* cmd, bool* ack) {
13011301
}
13021302
MainWindow* win = FindMainWindowByHwnd(hwnd);
13031303
if (!win) {
1304-
logfa("HandleCmdCommand: not executing DDE becaues MainWindow for hwnd 0x%p not found\n", hwnd);
1304+
logfa("HandleCmdCommand: not executing DDE because MainWindow for hwnd 0x%p not found\n", hwnd);
13051305
return nullptr;
13061306
}
13071307

@@ -1411,7 +1411,7 @@ LRESULT OnDDERequest(HWND hwnd, WPARAM wp, LPARAM lp) {
14111411
StrBuilder str;
14121412
bool didHandle = HandleRequestCmds(hwnd, cmd, str);
14131413
if (!didHandle) {
1414-
str.Set("error: unknoqn command");
1414+
str.Set("error: unknown command");
14151415
}
14161416

14171417
void* data;

src/SumatraPDF.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3752,7 +3752,7 @@ static void SaveCurrentFileAs(MainWindow* win) {
37523752
// Replace with EngineGetDocumentData() and save that if not empty
37533753
TempStr errorMsg = nullptr;
37543754
if (!file::Exists(srcFileName) && engine) {
3755-
// Recreate inexistant files from memory...
3755+
// Recreate nonexistent files from memory...
37563756
logf("calling engine->SaveFileAs(%s)\n", realDstFileName);
37573757
ok = engine->SaveFileAs(realDstFileName);
37583758
} else if (!path::IsSame(srcFileName, realDstFileName)) {
@@ -9626,7 +9626,7 @@ void ShowCrashHandlerMessage() {
96269626
// to fix the unexpected behavior (of which for a restricted set of documents
96279627
// there should be much less, anyway)
96289628
if (!CanAccessDisk()) {
9629-
log("ShowCrashHandlerMessage: skipping beacuse !CanAccessDisk()\n");
9629+
log("ShowCrashHandlerMessage: skipping because !CanAccessDisk()\n");
96309630
return;
96319631
}
96329632

src/TableOfContents.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ void OnTocCustomDraw(TreeView::CustomDrawEvent* ev) {
10111011
}
10121012
}
10131013

1014-
// disabled becaues of https://github.com/sumatrapdfreader/sumatrapdf/issues/2202
1014+
// disabled because of https://github.com/sumatrapdfreader/sumatrapdf/issues/2202
10151015
// it was added for https://github.com/sumatrapdfreader/sumatrapdf/issues/1716
10161016
// but unclear if its still needed
10171017
// this calls GoToTocLinkTask) which will eventually call GoToPage()

src/ifilter/PdfFilter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static bool PdfDateParse(const char* pdfDate, SYSTEMTIME* timeOut) {
8282

8383
static const char* PdfFilterStateToStr(PdfFilterState state) {
8484
const char* res = seqstrings::IdxToStr(kPdfFilterStateStrs, (int)state);
85-
return res ? res : "uknown";
85+
return res ? res : "unknown";
8686
}
8787

8888
HRESULT PdfFilter::GetNextChunkValue(ChunkValue& chunkValue) {

src/regress/Regress03.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void SearchTestWithDir(const char* searchFileA, const WCHAR* searchTerm, const T
2727
ReportIf(true);
2828
}
2929
if (expected[expIndex].len != tsel->len) {
30-
wprintf(L"Text selection length mismatch for %s at occurence %i: got %i, wanted %i\n", searchTerm,
30+
wprintf(L"Text selection length mismatch for %s at occurrence %i: got %i, wanted %i\n", searchTerm,
3131
findCount, expected[expIndex].len, tsel->len);
3232
ReportIf(true);
3333
}

src/utils/WinUtil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ TempStr GetWindowsVerTemp() {
308308
BOOL ok = GetVersionExW((OSVERSIONINFO*)&ver); // NOLINT
309309
#pragma warning(pop)
310310
if (!ok) {
311-
return str::DupTemp("uknown");
311+
return str::DupTemp("unknown");
312312
}
313313
return OsNameFromVerTemp(ver);
314314
}

0 commit comments

Comments
 (0)