From 6adc3b35fca36b73a02520ae303ef305d996debc Mon Sep 17 00:00:00 2001 From: milipili Date: Sat, 30 May 2015 20:32:33 +0200 Subject: [PATCH 01/11] scintilla: buffer: fixed invalid read in the stack when loading a file The method `FileManager::loadFileData` uses a stack-based buffer for reading a file. However, due to the optimization used by `Utf8_16_Read` (`UnicodeConvertor`), this buffer is not copied, but a pointer to this object is kept. After `loadFileData`, this object is destroyed, but is used afterward (via `UnicodeConvertor.getNewBuf`). --- PowerEditor/src/ScitillaComponent/Buffer.cpp | 24 ++++++++++++-------- PowerEditor/src/ScitillaComponent/Buffer.h | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/PowerEditor/src/ScitillaComponent/Buffer.cpp b/PowerEditor/src/ScitillaComponent/Buffer.cpp index 875bf973..a5001fe8 100644 --- a/PowerEditor/src/ScitillaComponent/Buffer.cpp +++ b/PowerEditor/src/ScitillaComponent/Buffer.cpp @@ -38,13 +38,18 @@ FileManager * FileManager::_pSelf = new FileManager(); -const int blockSize = 128 * 1024 + 4; +static const int blockSize = 128 * 1024 + 4; // Ordre important!! Ne le changes pas! //SC_EOL_CRLF (0), SC_EOL_CR (1), or SC_EOL_LF (2). -const int CR = 0x0D; -const int LF = 0x0A; +static const int CR = 0x0D; +static const int LF = 0x0A; + + + + + Buffer::Buffer(FileManager * pManager, BufferID id, Document doc, DocFileStatus type, const TCHAR *fileName) //type must be either DOC_REGULAR or DOC_UNNAMED : _pManager(pManager), _id(id), _isDirty(false), _doc(doc), _isFileReadOnly(false), _isUserReadOnly(false), _recentTag(-1), _references(0), @@ -480,8 +485,9 @@ BufferID FileManager::loadFile(const TCHAR * filename, Document doc, int encodin Utf8_16_Read UnicodeConvertor; //declare here so we can get information after loading is done + char data[blockSize + 8]; // +8 for incomplete multibyte char formatType format; - bool res = loadFileData(doc, backupFileName?backupFileName:fullpath, &UnicodeConvertor, L_TEXT, encoding, &format); + bool res = loadFileData(doc, backupFileName?backupFileName:fullpath, data, &UnicodeConvertor, L_TEXT, encoding, &format); if (res) { Buffer * newBuf = new Buffer(this, _nextBufferID, doc, DOC_REGULAR, fullpath); @@ -560,14 +566,15 @@ bool FileManager::reloadBuffer(BufferID id) Utf8_16_Read UnicodeConvertor; buf->_canNotify = false; //disable notify during file load, we dont want dirty to be triggered int encoding = buf->getEncoding(); + char data[blockSize + 8]; // +8 for incomplete multibyte char formatType format; - bool res = loadFileData(doc, buf->getFullPathName(), &UnicodeConvertor, buf->getLangType(), encoding, &format); + bool res = loadFileData(doc, buf->getFullPathName(), data, &UnicodeConvertor, buf->getLangType(), encoding, &format); buf->_canNotify = true; if (res) { if (encoding == -1) { - if (UnicodeConvertor.getNewBuf()) + if (nullptr != UnicodeConvertor.getNewBuf()) { int format = getEOLFormatForm(UnicodeConvertor.getNewBuf()); buf->setFormat(format == -1?WIN_FORMAT:(formatType)format); @@ -1134,10 +1141,9 @@ int FileManager::detectCodepage(char* buf, size_t len) return codepage; } -bool FileManager::loadFileData(Document doc, const TCHAR * filename, Utf8_16_Read * UnicodeConvertor, LangType language, int & encoding, formatType *pFormat) +inline bool FileManager::loadFileData(Document doc, const TCHAR * filename, char* data, Utf8_16_Read * UnicodeConvertor, + LangType language, int & encoding, formatType *pFormat) { - const int blockSize = 128 * 1024; //128 kB - char data[blockSize+8]; FILE *fp = generic_fopen(filename, TEXT("rb")); if (!fp) return false; diff --git a/PowerEditor/src/ScitillaComponent/Buffer.h b/PowerEditor/src/ScitillaComponent/Buffer.h index 51c30cba..d460f27d 100644 --- a/PowerEditor/src/ScitillaComponent/Buffer.h +++ b/PowerEditor/src/ScitillaComponent/Buffer.h @@ -120,7 +120,7 @@ private: size_t _nrBufs; int detectCodepage(char* buf, size_t len); - bool loadFileData(Document doc, const TCHAR * filename, Utf8_16_Read * UnicodeConvertor, LangType language, int & encoding, formatType *pFormat = NULL); + bool loadFileData(Document doc, const TCHAR * filename, char* buffer, Utf8_16_Read * UnicodeConvertor, LangType language, int & encoding, formatType *pFormat = NULL); }; #define MainFileManager FileManager::getInstance() From d09947d22dbb9e4acbda9e6ce6ba0c20cc87023f Mon Sep 17 00:00:00 2001 From: milipili Date: Sat, 30 May 2015 19:47:44 +0200 Subject: [PATCH 02/11] Scintilla: Buffer: fixed invalid read via strlen when loading a file When loading a file via `FileManager::loadFileData`, a fixed-length buffer is filled via `fread`. Then, in some cases, a conversion is done with the help of `Utf8_16_Read`. However, the method `Utf8_16_Read::convert` performs a call to `strlen` on this buffer. This is obviously wrong: `\0` char should be accepted (even if a bit strange) and the buffer is not zero-terminated. The changes merely consist in adding an additional parameter `length` to not have to guess the size of the buffer. --- PowerEditor/src/ScitillaComponent/Buffer.cpp | 18 ++++++++-------- PowerEditor/src/ScitillaComponent/Buffer.h | 5 ++++- PowerEditor/src/Utf8_16.cpp | 22 ++++++++++---------- PowerEditor/src/Utf8_16.h | 8 +++++-- 4 files changed, 30 insertions(+), 23 deletions(-) diff --git a/PowerEditor/src/ScitillaComponent/Buffer.cpp b/PowerEditor/src/ScitillaComponent/Buffer.cpp index 875bf973..3c1dc9d8 100644 --- a/PowerEditor/src/ScitillaComponent/Buffer.cpp +++ b/PowerEditor/src/ScitillaComponent/Buffer.cpp @@ -508,11 +508,10 @@ BufferID FileManager::loadFile(const TCHAR * filename, Document doc, int encodin if (encoding == -1) { // 3 formats : WIN_FORMAT, UNIX_FORMAT and MAC_FORMAT - if (UnicodeConvertor.getNewBuf()) + if (nullptr != UnicodeConvertor.getNewBuf()) { - int format = getEOLFormatForm(UnicodeConvertor.getNewBuf()); + int format = getEOLFormatForm(UnicodeConvertor.getNewBuf(), UnicodeConvertor.getNewSize()); buf->setFormat(format == -1?WIN_FORMAT:(formatType)format); - } else { @@ -569,7 +568,7 @@ bool FileManager::reloadBuffer(BufferID id) { if (UnicodeConvertor.getNewBuf()) { - int format = getEOLFormatForm(UnicodeConvertor.getNewBuf()); + int format = getEOLFormatForm(UnicodeConvertor.getNewBuf(), UnicodeConvertor.getNewSize()); buf->setFormat(format == -1?WIN_FORMAT:(formatType)format); } else @@ -1241,7 +1240,7 @@ bool FileManager::loadFileData(Document doc, const TCHAR * filename, Utf8_16_Rea } if (format == -1) - format = getEOLFormatForm(data); + format = getEOLFormatForm(data, lenFile); } else { @@ -1323,14 +1322,15 @@ int FileManager::docLength(Buffer * buffer) const return docLen; } -int FileManager::getEOLFormatForm(const char *data) const +int FileManager::getEOLFormatForm(const char* const data, size_t length) const { - size_t len = strlen(data); - for (size_t i = 0 ; i < len ; i++) + assert(data != nullptr && "invalid buffer for getEOLFormatForm()"); + + for (size_t i = 0; i != length; ++i) { if (data[i] == CR) { - if (i+1 < len && data[i+1] == LF) + if (i+1 < length && data[i+1] == LF) { return int(WIN_FORMAT); } diff --git a/PowerEditor/src/ScitillaComponent/Buffer.h b/PowerEditor/src/ScitillaComponent/Buffer.h index 51c30cba..a96c8b7e 100644 --- a/PowerEditor/src/ScitillaComponent/Buffer.h +++ b/PowerEditor/src/ScitillaComponent/Buffer.h @@ -104,7 +104,7 @@ public: void destroyInstance() { delete _pSelf; }; int getFileNameFromBuffer(BufferID id, TCHAR * fn2copy); int docLength(Buffer * buffer) const; - int getEOLFormatForm(const char *data) const; + int getEOLFormatForm(const char* const data, size_t length) const; size_t nextUntitledNewNumber() const; private: @@ -384,6 +384,9 @@ private : if (_canNotify) _pManager->beNotifiedOfBufferChange(this, mask); }; + + Buffer(const Buffer&) { assert(false); } + Buffer& operator = (const Buffer&) { assert(false); return *this; } }; #endif //BUFFER_H diff --git a/PowerEditor/src/Utf8_16.cpp b/PowerEditor/src/Utf8_16.cpp index b120c35c..729427ab 100644 --- a/PowerEditor/src/Utf8_16.cpp +++ b/PowerEditor/src/Utf8_16.cpp @@ -31,7 +31,8 @@ const Utf8_16::utf8 Utf8_16::k_Boms[][3] = { Utf8_16_Read::Utf8_16_Read() { m_eEncoding = uni8Bit; - m_nBufSize = 0; + m_nAllocatedBufSize = 0; + m_nNewBufSize = 0; m_pNewBuf = NULL; m_bFirstRead = true; } @@ -113,10 +114,9 @@ size_t Utf8_16_Read::convert(char* buf, size_t len) // bugfix by Jens Lorenz static size_t nSkip = 0; - size_t ret = 0; - m_pBuf = (ubyte*)buf; m_nLen = len; + m_nNewBufSize = 0; if (m_bFirstRead == true) { @@ -131,16 +131,16 @@ size_t Utf8_16_Read::convert(char* buf, size_t len) case uni8Bit: case uniCookie: { // Do nothing, pass through - m_nBufSize = 0; + m_nAllocatedBufSize = 0; m_pNewBuf = m_pBuf; - ret = len; + m_nNewBufSize = len; break; } case uniUTF8: { // Pass through after BOM - m_nBufSize = 0; + m_nAllocatedBufSize = 0; m_pNewBuf = m_pBuf + nSkip; - ret = len - nSkip; + m_nNewBufSize = len - nSkip; break; } case uni16BE_NoBOM: @@ -149,13 +149,13 @@ size_t Utf8_16_Read::convert(char* buf, size_t len) case uni16LE: { size_t newSize = len + len / 2 + 1; - if (m_nBufSize != newSize) + if (m_nAllocatedBufSize != newSize) { if (m_pNewBuf) delete [] m_pNewBuf; m_pNewBuf = NULL; m_pNewBuf = new ubyte[newSize]; - m_nBufSize = newSize; + m_nAllocatedBufSize = newSize; } ubyte* pCur = m_pNewBuf; @@ -166,7 +166,7 @@ size_t Utf8_16_Read::convert(char* buf, size_t len) { *pCur++ = m_Iter16.get(); } - ret = pCur - m_pNewBuf; + m_nNewBufSize = pCur - m_pNewBuf; break; } default: @@ -176,7 +176,7 @@ size_t Utf8_16_Read::convert(char* buf, size_t len) // necessary for second calls and more nSkip = 0; - return ret; + return m_nNewBufSize; } diff --git a/PowerEditor/src/Utf8_16.h b/PowerEditor/src/Utf8_16.h index c47d964b..e9aa102a 100644 --- a/PowerEditor/src/Utf8_16.h +++ b/PowerEditor/src/Utf8_16.h @@ -112,7 +112,8 @@ public: ~Utf8_16_Read(); size_t convert(char* buf, size_t len); - char* getNewBuf() { return reinterpret_cast(m_pNewBuf); } + const char* getNewBuf() const { return (const char*) m_pNewBuf; } + size_t getNewSize() const { return m_nNewBufSize; } UniMode getEncoding() const { return m_eEncoding; } size_t calcCurPos(size_t pos); @@ -126,7 +127,10 @@ private: UniMode m_eEncoding; ubyte* m_pBuf; ubyte* m_pNewBuf; - size_t m_nBufSize; + // size of the new buffer + size_t m_nNewBufSize; + // size of the previously allocated buffer (if != 0) + size_t m_nAllocatedBufSize; size_t m_nSkip; bool m_bFirstRead; size_t m_nLen; From 25b3a712fbbaebd99480ee2e188f316a54c99059 Mon Sep 17 00:00:00 2001 From: milipili Date: Sun, 31 May 2015 21:27:27 +0200 Subject: [PATCH 03/11] fixed minor memory leak when exporting the parameters to XML When writing the parameters as a XML file (when the application quits), a new node was created but not destroyed (`InsertEndChild` makes a clone of the given node). --- PowerEditor/src/Parameters.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index dc543550..141cf9e5 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -3401,28 +3401,28 @@ bool NppParameters::writeProjectPanelsSettings() const TiXmlNode *nppRoot = _pXmlUserDoc->FirstChild(TEXT("NotepadPlus")); if (!nppRoot) return false; - TiXmlNode *projPanelRootNode = nppRoot->FirstChildElement(TEXT("ProjectPanels")); - if (projPanelRootNode) + TiXmlNode *oldProjPanelRootNode = nppRoot->FirstChildElement(TEXT("ProjectPanels")); + if (nullptr != oldProjPanelRootNode) { // Erase the Project Panel root - nppRoot->RemoveChild(projPanelRootNode); + nppRoot->RemoveChild(oldProjPanelRootNode); } // Create the Project Panel root - projPanelRootNode = new TiXmlElement(TEXT("ProjectPanels")); + TiXmlElement projPanelRootNode{TEXT("ProjectPanels")}; // Add 3 Project Panel parameters for (int i = 0 ; i < 3 ; ++i) { - TiXmlElement projPanelNode(TEXT("ProjectPanel")); + TiXmlElement projPanelNode{TEXT("ProjectPanel")}; (projPanelNode.ToElement())->SetAttribute(TEXT("id"), i); (projPanelNode.ToElement())->SetAttribute(TEXT("workSpaceFile"), _workSpaceFilePathes[i]); - (projPanelRootNode->ToElement())->InsertEndChild(projPanelNode); + (projPanelRootNode.ToElement())->InsertEndChild(projPanelNode); } // (Re)Insert the Project Panel root - (nppRoot->ToElement())->InsertEndChild(*projPanelRootNode); + (nppRoot->ToElement())->InsertEndChild(projPanelRootNode); return true; } From 54c8fd7ac8028a4ffb194a7cfc03a99915b4a0b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20J=C3=B6nsson?= Date: Mon, 1 Jun 2015 18:10:43 +0200 Subject: [PATCH 04/11] Make case of "all" consistent. --- PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index 39ba9980..289624bf 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -2658,10 +2658,10 @@ BOOL CALLBACK Finder::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFERUNCOLLAPSE, TEXT("Uncollapse all"))); tmp.push_back(MenuItemUnit(0, TEXT("Separator"))); tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFERCOPY, TEXT("Copy"))); - tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFERSELECTALL, TEXT("Select All"))); - tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFERCLEARALL, TEXT("Clear All"))); + tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFERSELECTALL, TEXT("Select all"))); + tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFERCLEARALL, TEXT("Clear all"))); tmp.push_back(MenuItemUnit(0, TEXT("Separator"))); - tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFEROPENALL, TEXT("Open All"))); + tmp.push_back(MenuItemUnit(NPPM_INTERNAL_SCINTILLAFINFEROPENALL, TEXT("Open all"))); scintillaContextmenu.create(_hSelf, tmp); From d6081a5f3785fe0565900fc4c7f6ce1a78e5c6ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20J=C3=B6nsson?= Date: Mon, 1 Jun 2015 18:39:22 +0200 Subject: [PATCH 05/11] Improve copy functionality in find results window Just copy the actual results, without the additional formatting with line and file name. It respects the hierarchy in the results, i.e. you can copy all results from a search operation, or from a specific file, or just the lines you selected. --- PowerEditor/src/MISC/Common/Common.cpp | 33 +++++++++ PowerEditor/src/MISC/Common/Common.h | 2 + PowerEditor/src/Notepad_plus.cpp | 30 +------- .../src/ScitillaComponent/FindReplaceDlg.cpp | 71 ++++++++++++++++++- .../src/ScitillaComponent/FindReplaceDlg.h | 4 ++ .../ScitillaComponent/ScintillaEditView.cpp | 10 +++ .../src/ScitillaComponent/ScintillaEditView.h | 1 + 7 files changed, 121 insertions(+), 30 deletions(-) diff --git a/PowerEditor/src/MISC/Common/Common.cpp b/PowerEditor/src/MISC/Common/Common.cpp index e5236475..eb6e8ece 100644 --- a/PowerEditor/src/MISC/Common/Common.cpp +++ b/PowerEditor/src/MISC/Common/Common.cpp @@ -777,4 +777,37 @@ double stodLocale(const generic_string& str, _locale_t loc, size_t* idx) if (idx != NULL) *idx = (size_t)(eptr - ptr); return ans; +} + +bool str2Clipboard(const TCHAR *str2cpy, HWND hwnd) +{ + if (!str2cpy) + return false; + + int len2Allocate = lstrlen(str2cpy) + 1; + len2Allocate *= sizeof(TCHAR); + unsigned int cilpboardFormat = CF_TEXT; + + cilpboardFormat = CF_UNICODETEXT; + + HGLOBAL hglbCopy = ::GlobalAlloc(GMEM_MOVEABLE, len2Allocate); + if (hglbCopy == NULL) + { + return false; + } + + if (!::OpenClipboard(hwnd)) //_pPublicInterface->getHSelf())) + return false; + + ::EmptyClipboard(); + + // Lock the handle and copy the text to the buffer. + TCHAR *pStr = (TCHAR *)::GlobalLock(hglbCopy); + lstrcpy(pStr, str2cpy); + ::GlobalUnlock(hglbCopy); + + // Place the handle on the clipboard. + ::SetClipboardData(cilpboardFormat, hglbCopy); + ::CloseClipboard(); + return true; } \ No newline at end of file diff --git a/PowerEditor/src/MISC/Common/Common.h b/PowerEditor/src/MISC/Common/Common.h index 519de712..22572d9c 100644 --- a/PowerEditor/src/MISC/Common/Common.h +++ b/PowerEditor/src/MISC/Common/Common.h @@ -198,4 +198,6 @@ generic_string stringJoin(const std::vector& strings, const gene generic_string stringTakeWhileAdmissable(const generic_string& input, const generic_string& admissable); double stodLocale(const generic_string& str, _locale_t loc, size_t* idx = NULL); +bool str2Clipboard(const TCHAR *str2cpy, HWND hwnd); + #endif //M30_IDE_COMMUN_H diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 1d455312..7b63f764 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -4557,35 +4557,7 @@ void Notepad_plus::getCurrentOpenedFiles(Session & session, bool includUntitledD bool Notepad_plus::str2Cliboard(const TCHAR *str2cpy) { - if (!str2cpy) - return false; - - int len2Allocate = lstrlen(str2cpy) + 1; - len2Allocate *= sizeof(TCHAR); - unsigned int cilpboardFormat = CF_TEXT; - - cilpboardFormat = CF_UNICODETEXT; - - HGLOBAL hglbCopy = ::GlobalAlloc(GMEM_MOVEABLE, len2Allocate); - if (hglbCopy == NULL) - { - return false; - } - - if (!::OpenClipboard(_pPublicInterface->getHSelf())) - return false; - - ::EmptyClipboard(); - - // Lock the handle and copy the text to the buffer. - TCHAR *pStr = (TCHAR *)::GlobalLock(hglbCopy); - lstrcpy(pStr, str2cpy); - ::GlobalUnlock(hglbCopy); - - // Place the handle on the clipboard. - ::SetClipboardData(cilpboardFormat, hglbCopy); - ::CloseClipboard(); - return true; + return str2Clipboard(str2cpy, _pPublicInterface->getHSelf()); } //ONLY CALL IN CASE OF EMERGENCY: EXCEPTION diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index 289624bf..1279b3fa 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -2505,6 +2505,75 @@ void Finder::openAll() } } +bool Finder::isLineActualSearchResult(int line) +{ + const int foldLevel = _scintView.execute(SCI_GETFOLDLEVEL, line) & SC_FOLDLEVELNUMBERMASK; + return foldLevel == SC_FOLDLEVELBASE + 3; +} + +generic_string Finder::prepareStringForClipboard(generic_string s) +{ + // Input: a string like "\tLine 3: search result". + // Output: "search result" + s = stringReplace(s, TEXT("\r"), TEXT("")); + s = stringReplace(s, TEXT("\n"), TEXT("")); + const unsigned int firstColon = s.find(TEXT(':')); + if (firstColon == std::string::npos) + { + // Should never happen. + assert(false); + return s; + } + else + { + // Plus 2 in order to deal with ": ". + return s.substr(2 + firstColon); + } +} + +void Finder::copy() +{ + size_t fromLine, toLine; + { + const int selStart = _scintView.execute(SCI_GETSELECTIONSTART); + const int selEnd = _scintView.execute(SCI_GETSELECTIONEND); + const bool hasSelection = selStart != selEnd; + const pair lineRange = _scintView.getSelectionLinesRange(); + if (hasSelection && lineRange.first != lineRange.second) + { + fromLine = lineRange.first; + toLine = lineRange.second; + } + else + { + // Abuse fold levels to find out which lines to copy to clipboard. + // We get the current line and then the next line which has a smaller fold level (SCI_GETLASTCHILD). + // Then we loop all lines between them and determine which actually contain search results. + fromLine = _scintView.getCurrentLineNumber(); + const int selectedLineFoldLevel = _scintView.execute(SCI_GETFOLDLEVEL, fromLine) & SC_FOLDLEVELNUMBERMASK; + toLine = _scintView.execute(SCI_GETLASTCHILD, fromLine, selectedLineFoldLevel); + } + } + + std::vector lines; + for (size_t line = fromLine; line <= toLine; ++line) + { + if (isLineActualSearchResult(line)) + { + lines.push_back(prepareStringForClipboard(_scintView.getLine(line))); + } + } + const generic_string toClipboard = stringJoin(lines, TEXT("\r\n")); + if (!toClipboard.empty()) + { + if (!str2Clipboard(toClipboard.c_str(), _hSelf)) + { + assert(false); + ::MessageBox(NULL, TEXT("Error placing text in clipboard."), TEXT("Notepad++"), MB_ICONINFORMATION); + } + } +} + void Finder::beginNewFilesSearch() { //_scintView.execute(SCI_SETLEXER, SCLEX_NULL); @@ -2617,7 +2686,7 @@ BOOL CALLBACK Finder::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) case NPPM_INTERNAL_SCINTILLAFINFERCOPY : { - _scintView.execute(SCI_COPY); + copy(); return TRUE; } diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h index 3d21ee18..280afc29 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h @@ -144,6 +144,7 @@ public: void setFinderStyle(); void removeAll(); void openAll(); + void copy(); void beginNewFilesSearch(); void finishFilesSearch(int count); void gotoNextFoundResult(int direction); @@ -177,6 +178,9 @@ private: _scintView.execute(SCI_SETREADONLY, isReadOnly); }; + bool isLineActualSearchResult(int line); + generic_string prepareStringForClipboard(generic_string s); + static FoundInfo EmptyFoundInfo; static SearchResultMarking EmptySearchResultMarking; }; diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index 97922c18..1e206a9b 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -31,6 +31,7 @@ #include "Parameters.h" #include "Sorters.h" #include "TCHAR.h" +#include using namespace std; @@ -1913,6 +1914,15 @@ void ScintillaEditView::showCallTip(int startPos, const TCHAR * def) execute(SCI_CALLTIPSHOW, startPos, LPARAM(defA)); } +generic_string ScintillaEditView::getLine(int lineNumber) +{ + int lineLen = execute(SCI_LINELENGTH, lineNumber); + const int bufSize = lineLen; + std::unique_ptr buf = std::make_unique(bufSize); + getLine(lineNumber, buf.get(), bufSize); + return buf.get(); +} + void ScintillaEditView::getLine(int lineNumber, TCHAR * line, int lineBufferLen) { WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance(); diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h index eb2f34c1..f218b83e 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h @@ -272,6 +272,7 @@ public: int replaceTargetRegExMode(const TCHAR * re, int fromTargetPos = -1, int toTargetPos = -1) const; void showAutoComletion(int lenEntered, const TCHAR * list); void showCallTip(int startPos, const TCHAR * def); + generic_string getLine(int lineNumber); void getLine(int lineNumber, TCHAR * line, int lineBufferLen); void addText(int length, const char *buf); From 933aae4fc25f007ce4ca5375be2ddf2b2bd0a191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20J=C3=B6nsson?= Date: Mon, 1 Jun 2015 18:47:24 +0200 Subject: [PATCH 06/11] Improve str2Clipboard. Make it take generic_string instead of TCHAR*, since at most callsites we already have a generic_string. Improve error handling. Depending on where we are in the function when we get an error, we need to free the memory, unlock the memory, or close the clipboard. Note that if SetClipboardData succeeds then we should not do anything more to the memory. --- PowerEditor/src/MISC/Common/Common.cpp | 52 ++++++++++++++++---------- PowerEditor/src/MISC/Common/Common.h | 2 +- PowerEditor/src/Notepad_plus.cpp | 6 +-- PowerEditor/src/Notepad_plus.h | 2 +- PowerEditor/src/NppCommands.cpp | 2 +- 5 files changed, 39 insertions(+), 25 deletions(-) diff --git a/PowerEditor/src/MISC/Common/Common.cpp b/PowerEditor/src/MISC/Common/Common.cpp index eb6e8ece..3b97a041 100644 --- a/PowerEditor/src/MISC/Common/Common.cpp +++ b/PowerEditor/src/MISC/Common/Common.cpp @@ -779,35 +779,49 @@ double stodLocale(const generic_string& str, _locale_t loc, size_t* idx) return ans; } -bool str2Clipboard(const TCHAR *str2cpy, HWND hwnd) +bool str2Clipboard(const generic_string &str2cpy, HWND hwnd) { - if (!str2cpy) - return false; - - int len2Allocate = lstrlen(str2cpy) + 1; - len2Allocate *= sizeof(TCHAR); - unsigned int cilpboardFormat = CF_TEXT; - - cilpboardFormat = CF_UNICODETEXT; - + int len2Allocate = (str2cpy.size() + 1) * sizeof(TCHAR); HGLOBAL hglbCopy = ::GlobalAlloc(GMEM_MOVEABLE, len2Allocate); if (hglbCopy == NULL) { return false; } - - if (!::OpenClipboard(hwnd)) //_pPublicInterface->getHSelf())) + if (!::OpenClipboard(hwnd)) + { + ::GlobalFree(hglbCopy); + ::CloseClipboard(); return false; - - ::EmptyClipboard(); - + } + if (!::EmptyClipboard()) + { + ::GlobalFree(hglbCopy); + ::CloseClipboard(); + return false; + } // Lock the handle and copy the text to the buffer. TCHAR *pStr = (TCHAR *)::GlobalLock(hglbCopy); - lstrcpy(pStr, str2cpy); + if (pStr == NULL) + { + ::GlobalUnlock(hglbCopy); + ::GlobalFree(hglbCopy); + ::CloseClipboard(); + return false; + } + _tcscpy_s(pStr, len2Allocate / sizeof(TCHAR), str2cpy.c_str()); ::GlobalUnlock(hglbCopy); - // Place the handle on the clipboard. - ::SetClipboardData(cilpboardFormat, hglbCopy); - ::CloseClipboard(); + unsigned int clipBoardFormat = CF_UNICODETEXT; + if (::SetClipboardData(clipBoardFormat, hglbCopy) == NULL) + { + ::GlobalUnlock(hglbCopy); + ::GlobalFree(hglbCopy); + ::CloseClipboard(); + return false; + } + if (!::CloseClipboard()) + { + return false; + } return true; } \ No newline at end of file diff --git a/PowerEditor/src/MISC/Common/Common.h b/PowerEditor/src/MISC/Common/Common.h index 22572d9c..80171755 100644 --- a/PowerEditor/src/MISC/Common/Common.h +++ b/PowerEditor/src/MISC/Common/Common.h @@ -198,6 +198,6 @@ generic_string stringJoin(const std::vector& strings, const gene generic_string stringTakeWhileAdmissable(const generic_string& input, const generic_string& admissable); double stodLocale(const generic_string& str, _locale_t loc, size_t* idx = NULL); -bool str2Clipboard(const TCHAR *str2cpy, HWND hwnd); +bool str2Clipboard(const generic_string &str2cpy, HWND hwnd); #endif //M30_IDE_COMMUN_H diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 7b63f764..c81d48a5 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -1933,7 +1933,7 @@ void Notepad_plus::copyMarkedLines() globalStr = currentStr; } } - str2Cliboard(globalStr.c_str()); + str2Cliboard(globalStr); } void Notepad_plus::cutMarkedLines() @@ -1953,7 +1953,7 @@ void Notepad_plus::cutMarkedLines() } } _pEditView->execute(SCI_ENDUNDOACTION); - str2Cliboard(globalStr.c_str()); + str2Cliboard(globalStr); } void Notepad_plus::deleteMarkedLines(bool isMarked) @@ -4555,7 +4555,7 @@ void Notepad_plus::getCurrentOpenedFiles(Session & session, bool includUntitledD _invisibleEditView.execute(SCI_SETDOCPOINTER, 0, oldDoc); } -bool Notepad_plus::str2Cliboard(const TCHAR *str2cpy) +bool Notepad_plus::str2Cliboard(const generic_string & str2cpy) { return str2Clipboard(str2cpy, _pPublicInterface->getHSelf()); } diff --git a/PowerEditor/src/Notepad_plus.h b/PowerEditor/src/Notepad_plus.h index f0d4d607..d209080f 100644 --- a/PowerEditor/src/Notepad_plus.h +++ b/PowerEditor/src/Notepad_plus.h @@ -599,7 +599,7 @@ private: void doSynScorll(HWND hW); void setWorkingDir(const TCHAR *dir); - bool str2Cliboard(const TCHAR *str2cpy); + bool str2Cliboard(const generic_string & str2cpy); bool bin2Cliboard(const UCHAR *uchar2cpy, size_t length); bool getIntegralDockingData(tTbData & dockData, int & iCont, bool & isVisible); diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index a75a8186..2df44ee7 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -676,7 +676,7 @@ void Notepad_plus::command(int id) { generic_string dir(buf->getFullPathName()); PathRemoveFileSpec(dir); - str2Cliboard(dir.c_str()); + str2Cliboard(dir); } else if (id == IDM_EDIT_FILENAMETOCLIP) { From 23ac5e3da840d82b1e8561aa7f5fa70c2f6655d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20J=C3=B6nsson?= Date: Mon, 1 Jun 2015 18:48:49 +0200 Subject: [PATCH 07/11] Mark some methods as const. --- PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp | 4 ++-- PowerEditor/src/ScitillaComponent/FindReplaceDlg.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index 1279b3fa..cf9fdb4b 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -2505,13 +2505,13 @@ void Finder::openAll() } } -bool Finder::isLineActualSearchResult(int line) +bool Finder::isLineActualSearchResult(int line) const { const int foldLevel = _scintView.execute(SCI_GETFOLDLEVEL, line) & SC_FOLDLEVELNUMBERMASK; return foldLevel == SC_FOLDLEVELBASE + 3; } -generic_string Finder::prepareStringForClipboard(generic_string s) +generic_string Finder::prepareStringForClipboard(generic_string s) const { // Input: a string like "\tLine 3: search result". // Output: "search result" diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h index 280afc29..52a436c0 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h @@ -178,8 +178,8 @@ private: _scintView.execute(SCI_SETREADONLY, isReadOnly); }; - bool isLineActualSearchResult(int line); - generic_string prepareStringForClipboard(generic_string s); + bool isLineActualSearchResult(int line) const; + generic_string prepareStringForClipboard(generic_string s) const; static FoundInfo EmptyFoundInfo; static SearchResultMarking EmptySearchResultMarking; From f3934fadb726ae4471e1a8008da066bf3ebcfa1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20J=C3=B6nsson?= Date: Mon, 1 Jun 2015 18:55:25 +0200 Subject: [PATCH 08/11] Fix array termination error. --- PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index 1e206a9b..c21646fc 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -1917,7 +1917,7 @@ void ScintillaEditView::showCallTip(int startPos, const TCHAR * def) generic_string ScintillaEditView::getLine(int lineNumber) { int lineLen = execute(SCI_LINELENGTH, lineNumber); - const int bufSize = lineLen; + const int bufSize = lineLen + 1; std::unique_ptr buf = std::make_unique(bufSize); getLine(lineNumber, buf.get(), bufSize); return buf.get(); @@ -1928,6 +1928,8 @@ void ScintillaEditView::getLine(int lineNumber, TCHAR * line, int lineBufferLen) WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance(); unsigned int cp = execute(SCI_GETCODEPAGE); char *lineA = new char[lineBufferLen]; + // From Scintilla documentation for SCI_GETLINE: "The buffer is not terminated by a 0 character." + memset(lineA, '\0', sizeof(char) * lineBufferLen); execute(SCI_GETLINE, lineNumber, (LPARAM)lineA); const TCHAR *lineW = wmc->char2wchar(lineA, cp); lstrcpyn(line, lineW, lineBufferLen); From c18101823a0631e0e265b0908286d4c24dfd28dc Mon Sep 17 00:00:00 2001 From: NN Date: Mon, 1 Jun 2015 21:40:20 +0300 Subject: [PATCH 09/11] Add missing files. Add warning 4091 to be ignored. Define _CRT_NON_CONFORMING_WCSTOK globally. --- PowerEditor/src/MISC/Common/precompiledHeaders.h | 5 ----- PowerEditor/visual.net/notepadPlus.vs2015.vcxproj | 10 ++++++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/PowerEditor/src/MISC/Common/precompiledHeaders.h b/PowerEditor/src/MISC/Common/precompiledHeaders.h index 3ad68618..73bff62f 100644 --- a/PowerEditor/src/MISC/Common/precompiledHeaders.h +++ b/PowerEditor/src/MISC/Common/precompiledHeaders.h @@ -32,7 +32,6 @@ // w/o precompiled headers file : 1 minute 55 sec #define _WIN32_WINNT 0x0501 -#define _CRT_NON_CONFORMING_WCSTOK // C RunTime Header Files #include @@ -64,11 +63,7 @@ #include #include #include - -#pragma warning(push) -#pragma warning(disable: 4091) // 'keyword' : ignored on left of 'type' when no variable is declared #include -#pragma warning(pop) #include #include diff --git a/PowerEditor/visual.net/notepadPlus.vs2015.vcxproj b/PowerEditor/visual.net/notepadPlus.vs2015.vcxproj index 17c3bf72..bfcbc74e 100644 --- a/PowerEditor/visual.net/notepadPlus.vs2015.vcxproj +++ b/PowerEditor/visual.net/notepadPlus.vs2015.vcxproj @@ -58,7 +58,7 @@ Disabled Neither ..\src\WinControls\AboutDlg;..\..\scintilla\include;..\include;..\src\WinControls;..\src\WinControls\ImageListSet;..\src\WinControls\OpenSaveFileDialog;..\src\WinControls\SplitterContainer;..\src\WinControls\StaticDialog;..\src\WinControls\TabBar;..\src\WinControls\ToolBar;..\src\MISC\Process;..\src\ScitillaComponent;..\src\MISC;..\src\MISC\SysMsg;..\src\WinControls\StatusBar;..\src;..\src\WinControls\StaticDialog\RunDlg;..\src\tinyxml;..\src\WinControls\ColourPicker;..\src\Win32Explr;..\src\MISC\RegExt;..\src\WinControls\TrayIcon;..\src\WinControls\shortcut;..\src\WinControls\Grid;..\src\WinControls\ContextMenu;..\src\MISC\PluginsManager;..\src\WinControls\Preference;..\src\WinControls\WindowsDlg;..\src\WinControls\TaskList;..\src\WinControls\DockingWnd;..\src\WinControls\ToolTip;..\src\MISC\Exception;..\src\MISC\Common;..\src\tinyxml\tinyXmlA;..\src\WinControls\AnsiCharPanel;..\src\WinControls\ClipboardHistory;..\src\WinControls\FindCharsInRange;..\src\WinControls\VerticalFileSwitcher;..\src\WinControls\ProjectPanel;..\src\WinControls\DocumentMap;..\src\WinControls\FunctionList;..\src\uchardet;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;_USE_64BIT_TIME_T;TIXML_USE_STL;TIXMLA_USE_STL;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS=1;%(PreprocessorDefinitions) + WIN32;_WINDOWS;_USE_64BIT_TIME_T;TIXML_USE_STL;TIXMLA_USE_STL;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS=1;_CRT_NON_CONFORMING_WCSTOK;%(PreprocessorDefinitions) Async Default MultiThreadedDebug @@ -66,7 +66,7 @@ true ProgramDatabase true - 4456;4457;4459 + 4091;4456;4457;4459 /fixed:no %(AdditionalOptions) @@ -96,7 +96,7 @@ false false ..\src\WinControls\AboutDlg;..\..\scintilla\include;..\include;..\src\WinControls;..\src\WinControls\ImageListSet;..\src\WinControls\OpenSaveFileDialog;..\src\WinControls\SplitterContainer;..\src\WinControls\StaticDialog;..\src\WinControls\TabBar;..\src\WinControls\ToolBar;..\src\MISC\Process;..\src\ScitillaComponent;..\src\MISC;..\src\MISC\SysMsg;..\src\WinControls\StatusBar;..\src;..\src\WinControls\StaticDialog\RunDlg;..\src\tinyxml;..\src\WinControls\ColourPicker;..\src\Win32Explr;..\src\MISC\RegExt;..\src\WinControls\TrayIcon;..\src\WinControls\shortcut;..\src\WinControls\Grid;..\src\WinControls\ContextMenu;..\src\MISC\PluginsManager;..\src\WinControls\Preference;..\src\WinControls\WindowsDlg;..\src\WinControls\TaskList;..\src\WinControls\DockingWnd;..\src\WinControls\ToolTip;..\src\MISC\Exception;..\src\MISC\Common;..\src\tinyxml\tinyXmlA;..\src\WinControls\AnsiCharPanel;..\src\WinControls\ClipboardHistory;..\src\WinControls\FindCharsInRange;..\src\WinControls\VerticalFileSwitcher;..\src\WinControls\ProjectPanel;..\src\WinControls\DocumentMap;..\src\WinControls\FunctionList;..\src\uchardet;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USE_64BIT_TIME_T;TIXML_USE_STL;TIXMLA_USE_STL;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS=1;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USE_64BIT_TIME_T;TIXML_USE_STL;TIXMLA_USE_STL;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS=1;_CRT_NON_CONFORMING_WCSTOK;%(PreprocessorDefinitions) false false true @@ -108,7 +108,7 @@ ProgramDatabase NoExtensions true - 4456;4457;4459 + 4091;4456;4457;4459 comctl32.lib;shlwapi.lib;shell32.lib;Oleacc.lib;%(AdditionalDependencies) @@ -140,6 +140,7 @@ copy ..\src\contextMenu.xml ..\bin\contextMenu.xml + @@ -409,6 +410,7 @@ copy ..\src\contextMenu.xml ..\bin\contextMenu.xml + From 246c8bd1684f89d1e3c87a77148bc51e6555f83c Mon Sep 17 00:00:00 2001 From: Don Ho Date: Tue, 2 Jun 2015 18:01:47 +0200 Subject: [PATCH 10/11] [UPDATE] Unprecompile headers (part 3) --- PowerEditor/src/EncodingMapper.cpp | 2 +- PowerEditor/src/MISC/Common/Common.cpp | 10 +++++++++- .../src/MISC/Common/precompiledHeaders.h | 2 +- PowerEditor/src/MISC/Exception/MiniDumper.cpp | 2 +- PowerEditor/src/MISC/Exception/MiniDumper.h | 3 +++ .../src/MISC/Exception/Win32Exception.cpp | 1 - .../src/MISC/Exception/Win32Exception.h | 7 +++++++ .../src/MISC/PluginsManager/IDAllocator.cpp | 2 -- .../src/MISC/PluginsManager/PluginsManager.cpp | 2 +- PowerEditor/src/MISC/Process/Process.cpp | 1 - PowerEditor/src/MISC/RegExt/regExtDlg.cpp | 3 +-- PowerEditor/src/MISC/RegExt/regExtDlg.h | 2 ++ PowerEditor/src/Notepad_plus.cpp | 4 ++-- PowerEditor/src/Notepad_plus_Window.cpp | 3 ++- PowerEditor/src/NppBigSwitch.cpp | 3 ++- PowerEditor/src/NppCommands.cpp | 4 ++-- PowerEditor/src/NppIO.cpp | 3 ++- PowerEditor/src/NppNotification.cpp | 2 +- .../src/ScitillaComponent/DocTabView.cpp | 2 +- .../src/ScitillaComponent/FindReplaceDlg.cpp | 4 ++-- .../src/ScitillaComponent/FunctionCallTip.cpp | 1 - .../src/ScitillaComponent/GoToLineDlg.cpp | 1 - PowerEditor/src/ScitillaComponent/Printer.cpp | 1 - .../src/ScitillaComponent/UserDefineDialog.cpp | 2 -- .../UserDefineLangReference.h | 2 -- PowerEditor/src/TinyXml/tinyXmlA/tinystrA.cpp | 1 - PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.cpp | 2 +- .../src/TinyXml/tinyXmlA/tinyxmlerrorA.cpp | 2 +- .../src/TinyXml/tinyXmlA/tinyxmlparserA.cpp | 2 +- PowerEditor/src/TinyXml/tinystr.cpp | 1 - PowerEditor/src/TinyXml/tinyxml.cpp | 2 +- PowerEditor/src/TinyXml/tinyxmlerror.cpp | 2 +- PowerEditor/src/TinyXml/tinyxmlparser.cpp | 2 +- PowerEditor/src/UniConversion.cpp | 2 +- PowerEditor/src/UniConversion.h | 5 +++++ PowerEditor/src/Utf8_16.cpp | 1 - .../src/WinControls/AnsiCharPanel/ListView.cpp | 2 +- .../src/WinControls/AnsiCharPanel/ListView.h | 1 + .../WinControls/ColourPicker/WordStyleDlg.h | 9 +-------- .../WinControls/DockingWnd/DockingManager.cpp | 18 ++++++++++++------ .../WinControls/DockingWnd/DockingManager.h | 6 ++++++ .../WinControls/DockingWnd/DockingSplitter.cpp | 2 +- .../WinControls/DockingWnd/DockingSplitter.h | 2 ++ .../src/WinControls/DockingWnd/Gripper.cpp | 1 - .../src/WinControls/DockingWnd/Gripper.h | 4 ++++ .../WinControls/DocumentMap/documentMap.cpp | 1 - .../FindCharsInRange/FindCharsInRange.cpp | 1 - .../FunctionList/functionListPanel.cpp | 1 - .../FunctionList/functionParser.cpp | 2 +- .../WinControls/ImageListSet/ImageListSet.cpp | 1 - .../WinControls/ImageListSet/ImageListSet.h | 2 ++ .../WinControls/Preference/preferenceDlg.cpp | 5 +++-- .../WinControls/ProjectPanel/ProjectPanel.cpp | 1 - .../src/WinControls/ProjectPanel/TreeView.cpp | 2 +- .../src/WinControls/ProjectPanel/TreeView.h | 3 +++ .../WinControls/StaticDialog/RunDlg/RunDlg.cpp | 2 +- .../WinControls/StaticDialog/RunDlg/RunDlg.h | 3 +++ .../WinControls/StaticDialog/StaticDialog.h | 3 --- PowerEditor/src/WinControls/TabBar/TabBar.cpp | 2 +- .../src/WinControls/TaskList/TaskList.cpp | 2 +- .../src/WinControls/TaskList/TaskList.h | 4 ++++ .../src/WinControls/TaskList/TaskListDlg.cpp | 2 +- .../src/WinControls/TaskList/TaskListDlg.h | 3 +++ .../src/WinControls/ToolBar/ToolBar.cpp | 2 +- PowerEditor/src/WinControls/ToolBar/ToolBar.h | 6 ++---- .../src/WinControls/ToolTip/ToolTip.cpp | 5 +---- PowerEditor/src/WinControls/ToolTip/ToolTip.h | 2 ++ .../WinControls/TrayIcon/trayIconControler.cpp | 1 - .../WinControls/TrayIcon/trayIconControler.h | 2 ++ .../VerticalFileSwitcher.cpp | 2 +- .../VerticalFileSwitcher.h | 4 ---- .../src/WinControls/WindowsDlg/WinMgr.cpp | 2 +- .../src/WinControls/WindowsDlg/WinRect.cpp | 1 - .../src/WinControls/WindowsDlg/WindowsDlg.h | 3 --- PowerEditor/src/lastRecentFileList.cpp | 2 +- PowerEditor/src/lesDlgs.cpp | 2 +- PowerEditor/src/lesDlgs.h | 3 +++ PowerEditor/src/localization.cpp | 1 - PowerEditor/src/localization.h | 4 ++-- PowerEditor/src/uchardet/JpCntx.cpp | 2 +- .../src/uchardet/LangBulgarianModel.cpp | 2 +- PowerEditor/src/uchardet/LangCyrillicModel.cpp | 2 +- PowerEditor/src/uchardet/LangGreekModel.cpp | 2 +- PowerEditor/src/uchardet/LangHebrewModel.cpp | 2 +- .../src/uchardet/LangHungarianModel.cpp | 2 +- PowerEditor/src/uchardet/LangThaiModel.cpp | 2 +- PowerEditor/src/uchardet/nsBig5Prober.cpp | 2 +- PowerEditor/src/uchardet/nsCharSetProber.cpp | 2 +- PowerEditor/src/uchardet/nsEUCJPProber.cpp | 2 +- PowerEditor/src/uchardet/nsEUCKRProber.cpp | 2 +- PowerEditor/src/uchardet/nsEUCTWProber.cpp | 2 +- .../src/uchardet/nsEscCharsetProber.cpp | 2 +- PowerEditor/src/uchardet/nsEscSM.cpp | 2 +- PowerEditor/src/uchardet/nsGB2312Prober.cpp | 2 +- PowerEditor/src/uchardet/nsHebrewProber.cpp | 1 - PowerEditor/src/uchardet/nsLatin1Prober.cpp | 1 - PowerEditor/src/uchardet/nsMBCSGroupProber.cpp | 2 +- PowerEditor/src/uchardet/nsMBCSSM.cpp | 2 +- PowerEditor/src/uchardet/nsSBCSGroupProber.cpp | 1 - PowerEditor/src/uchardet/nsSBCharSetProber.cpp | 2 +- PowerEditor/src/uchardet/nsSJISProber.cpp | 2 +- PowerEditor/src/uchardet/nsUTF8Prober.cpp | 1 - .../src/uchardet/nsUniversalDetector.cpp | 2 -- PowerEditor/src/uchardet/uchardet.cpp | 2 +- PowerEditor/src/winmain.cpp | 2 +- 105 files changed, 142 insertions(+), 124 deletions(-) diff --git a/PowerEditor/src/EncodingMapper.cpp b/PowerEditor/src/EncodingMapper.cpp index 48245966..27c02c49 100644 --- a/PowerEditor/src/EncodingMapper.cpp +++ b/PowerEditor/src/EncodingMapper.cpp @@ -26,7 +26,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" +#include #include "EncodingMapper.h" #include "Scintilla.h" diff --git a/PowerEditor/src/MISC/Common/Common.cpp b/PowerEditor/src/MISC/Common/Common.cpp index 3b97a041..d9a5a04c 100644 --- a/PowerEditor/src/MISC/Common/Common.cpp +++ b/PowerEditor/src/MISC/Common/Common.cpp @@ -26,7 +26,15 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" +#include +#include +#include +#include +#include "StaticDialog.h" + + + +#include "Common.h" #include "../Utf8.h" WcharMbcsConvertor * WcharMbcsConvertor::_pSelf = new WcharMbcsConvertor; diff --git a/PowerEditor/src/MISC/Common/precompiledHeaders.h b/PowerEditor/src/MISC/Common/precompiledHeaders.h index 73bff62f..c3a6a897 100644 --- a/PowerEditor/src/MISC/Common/precompiledHeaders.h +++ b/PowerEditor/src/MISC/Common/precompiledHeaders.h @@ -59,8 +59,8 @@ // Windows Header Files #include #include -#include #include +#include #include #include #include diff --git a/PowerEditor/src/MISC/Exception/MiniDumper.cpp b/PowerEditor/src/MISC/Exception/MiniDumper.cpp index f713a160..939cbda0 100644 --- a/PowerEditor/src/MISC/Exception/MiniDumper.cpp +++ b/PowerEditor/src/MISC/Exception/MiniDumper.cpp @@ -29,7 +29,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" +#include #include "MiniDumper.h" LPCTSTR msgTitle = TEXT("Notepad++ crash analysis"); diff --git a/PowerEditor/src/MISC/Exception/MiniDumper.h b/PowerEditor/src/MISC/Exception/MiniDumper.h index 130953d2..d3b5c112 100644 --- a/PowerEditor/src/MISC/Exception/MiniDumper.h +++ b/PowerEditor/src/MISC/Exception/MiniDumper.h @@ -32,6 +32,9 @@ #ifndef MDUMP_H #define MDUMP_H +#include +#include + // based on dbghelp.h typedef BOOL (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess, DWORD dwPid, HANDLE hFile, MINIDUMP_TYPE DumpType, diff --git a/PowerEditor/src/MISC/Exception/Win32Exception.cpp b/PowerEditor/src/MISC/Exception/Win32Exception.cpp index d37d4d41..74fca430 100644 --- a/PowerEditor/src/MISC/Exception/Win32Exception.cpp +++ b/PowerEditor/src/MISC/Exception/Win32Exception.cpp @@ -32,7 +32,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" #include "Win32Exception.h" diff --git a/PowerEditor/src/MISC/Exception/Win32Exception.h b/PowerEditor/src/MISC/Exception/Win32Exception.h index 3117a1bc..5be89c2f 100644 --- a/PowerEditor/src/MISC/Exception/Win32Exception.h +++ b/PowerEditor/src/MISC/Exception/Win32Exception.h @@ -31,6 +31,11 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +#ifndef WIN32_EXCEPTION_H +#define WIN32_EXCEPTION_H + +#include +#include typedef const void* ExceptionAddress; // OK on Win32 platform @@ -69,3 +74,5 @@ private: friend void Win32Exception::translate(unsigned code, EXCEPTION_POINTERS* info); }; + +#endif // WIN32_EXCEPTION_H \ No newline at end of file diff --git a/PowerEditor/src/MISC/PluginsManager/IDAllocator.cpp b/PowerEditor/src/MISC/PluginsManager/IDAllocator.cpp index 568d6fb8..5cd78d51 100644 --- a/PowerEditor/src/MISC/PluginsManager/IDAllocator.cpp +++ b/PowerEditor/src/MISC/PluginsManager/IDAllocator.cpp @@ -28,8 +28,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" - #include "IDAllocator.h" IDAllocator::IDAllocator(int start, int maximumID) diff --git a/PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp b/PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp index f37a993e..9048cfae 100644 --- a/PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp +++ b/PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp @@ -26,7 +26,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" +#include #include "PluginsManager.h" #include "resource.h" diff --git a/PowerEditor/src/MISC/Process/Process.cpp b/PowerEditor/src/MISC/Process/Process.cpp index 33c7818a..56904083 100644 --- a/PowerEditor/src/MISC/Process/Process.cpp +++ b/PowerEditor/src/MISC/Process/Process.cpp @@ -26,7 +26,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" #include "Parameters.h" #include "process.h" diff --git a/PowerEditor/src/MISC/RegExt/regExtDlg.cpp b/PowerEditor/src/MISC/RegExt/regExtDlg.cpp index 41015a2a..6a21061e 100644 --- a/PowerEditor/src/MISC/RegExt/regExtDlg.cpp +++ b/PowerEditor/src/MISC/RegExt/regExtDlg.cpp @@ -25,8 +25,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -#include "precompiledHeaders.h" +#include "Common.h" #include "regExtDlg.h" #include "resource.h" diff --git a/PowerEditor/src/MISC/RegExt/regExtDlg.h b/PowerEditor/src/MISC/RegExt/regExtDlg.h index 2ef81778..14a48634 100644 --- a/PowerEditor/src/MISC/RegExt/regExtDlg.h +++ b/PowerEditor/src/MISC/RegExt/regExtDlg.h @@ -33,6 +33,8 @@ #include "regExtDlgRc.h" #endif //REGEXTDLGRC_H +#include "StaticDialog.h" + const int extNameLen = 32; class RegExtDlg : public StaticDialog diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index c81d48a5..3a0d078c 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -25,8 +25,8 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -#include "precompiledHeaders.h" +#include +#include #include "Notepad_plus.h" #include "Notepad_plus_Window.h" #include "FileDialog.h" diff --git a/PowerEditor/src/Notepad_plus_Window.cpp b/PowerEditor/src/Notepad_plus_Window.cpp index 0e9d8169..49f8be61 100644 --- a/PowerEditor/src/Notepad_plus_Window.cpp +++ b/PowerEditor/src/Notepad_plus_Window.cpp @@ -26,7 +26,8 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" +#include +#include #include "Notepad_plus_Window.h" const TCHAR Notepad_plus_Window::_className[32] = TEXT("Notepad++"); diff --git a/PowerEditor/src/NppBigSwitch.cpp b/PowerEditor/src/NppBigSwitch.cpp index 494238e3..89857a46 100644 --- a/PowerEditor/src/NppBigSwitch.cpp +++ b/PowerEditor/src/NppBigSwitch.cpp @@ -26,7 +26,8 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" +#include +#include #include "Notepad_plus_Window.h" #include "TaskListDlg.h" #include "ImageListSet.h" diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 2df44ee7..d15c671b 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -25,8 +25,8 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -#include "precompiledHeaders.h" +#include +#include #include "Notepad_plus_Window.h" #include "EncodingMapper.h" #include "ShortcutMapper.h" diff --git a/PowerEditor/src/NppIO.cpp b/PowerEditor/src/NppIO.cpp index ee732d1a..9fcc33a7 100644 --- a/PowerEditor/src/NppIO.cpp +++ b/PowerEditor/src/NppIO.cpp @@ -26,7 +26,8 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" +#include +#include #include "Notepad_plus_Window.h" #include "FileDialog.h" #include "EncodingMapper.h" diff --git a/PowerEditor/src/NppNotification.cpp b/PowerEditor/src/NppNotification.cpp index fcbc5eee..44599880 100644 --- a/PowerEditor/src/NppNotification.cpp +++ b/PowerEditor/src/NppNotification.cpp @@ -26,7 +26,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" + #include "Notepad_plus_Window.h" #include "xmlMatchedTagsHighlighter.h" #include "VerticalFileSwitcher.h" diff --git a/PowerEditor/src/ScitillaComponent/DocTabView.cpp b/PowerEditor/src/ScitillaComponent/DocTabView.cpp index 95506df7..03d26069 100644 --- a/PowerEditor/src/ScitillaComponent/DocTabView.cpp +++ b/PowerEditor/src/ScitillaComponent/DocTabView.cpp @@ -26,7 +26,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" + #include "DocTabView.h" #include "ScintillaEditView.h" diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index cf9fdb4b..89059ef9 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -25,8 +25,8 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -#include "precompiledHeaders.h" +#include +#include #include "FindReplaceDlg.h" #include "ScintillaEditView.h" #include "Notepad_plus_msgs.h" diff --git a/PowerEditor/src/ScitillaComponent/FunctionCallTip.cpp b/PowerEditor/src/ScitillaComponent/FunctionCallTip.cpp index 475a49e2..c7d40daf 100644 --- a/PowerEditor/src/ScitillaComponent/FunctionCallTip.cpp +++ b/PowerEditor/src/ScitillaComponent/FunctionCallTip.cpp @@ -26,7 +26,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" #include "FunctionCallTip.h" diff --git a/PowerEditor/src/ScitillaComponent/GoToLineDlg.cpp b/PowerEditor/src/ScitillaComponent/GoToLineDlg.cpp index 55375f06..3f2543d0 100644 --- a/PowerEditor/src/ScitillaComponent/GoToLineDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/GoToLineDlg.cpp @@ -26,7 +26,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" #include "GoToLineDlg.h" diff --git a/PowerEditor/src/ScitillaComponent/Printer.cpp b/PowerEditor/src/ScitillaComponent/Printer.cpp index b82de0a3..4b976b31 100644 --- a/PowerEditor/src/ScitillaComponent/Printer.cpp +++ b/PowerEditor/src/ScitillaComponent/Printer.cpp @@ -26,7 +26,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" #include "Printer.h" #include "RunDlg.h" //#include "Parameters.h" diff --git a/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp b/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp index 1485d8b1..83d2de23 100644 --- a/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp +++ b/PowerEditor/src/ScitillaComponent/UserDefineDialog.cpp @@ -26,8 +26,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" - #include "localization.h" #include "UserDefineDialog.h" #include "ScintillaEditView.h" diff --git a/PowerEditor/src/ScitillaComponent/UserDefineLangReference.h b/PowerEditor/src/ScitillaComponent/UserDefineLangReference.h index cc924065..3f8c7a92 100644 --- a/PowerEditor/src/ScitillaComponent/UserDefineLangReference.h +++ b/PowerEditor/src/ScitillaComponent/UserDefineLangReference.h @@ -29,9 +29,7 @@ #ifndef USER_DEFINE_LANG_REFERENCE_H #define USER_DEFINE_LANG_REFERENCE_H -#ifndef SCILEXER_H #include "scilexer.h" -#endif //SCILEXER_H const int langNameLenMax = 33; const int extsLenMax = 256; diff --git a/PowerEditor/src/TinyXml/tinyXmlA/tinystrA.cpp b/PowerEditor/src/TinyXml/tinyXmlA/tinystrA.cpp index 39240495..3640ea72 100644 --- a/PowerEditor/src/TinyXml/tinyXmlA/tinystrA.cpp +++ b/PowerEditor/src/TinyXml/tinyXmlA/tinystrA.cpp @@ -22,7 +22,6 @@ must not be misrepresented as being the original software. distribution. */ -#include "precompiledHeaders.h" #include "tinyxmlA.h" #ifndef TIXMLA_USE_STL diff --git a/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.cpp b/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.cpp index afaa1c3d..c3affd57 100644 --- a/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.cpp +++ b/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlA.cpp @@ -22,7 +22,7 @@ must not be misrepresented as being the original software. distribution. */ -#include "precompiledHeaders.h" +#include "Common.h" #include "tinyxmlA.h" #ifdef TIXMLA_USE_STL diff --git a/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlerrorA.cpp b/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlerrorA.cpp index 5ad92200..51302660 100644 --- a/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlerrorA.cpp +++ b/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlerrorA.cpp @@ -22,7 +22,7 @@ must not be misrepresented as being the original software. distribution. */ -#include "precompiledHeaders.h" + #include "tinyxmlA.h" // The goal of the seperate error file is to make the first diff --git a/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlparserA.cpp b/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlparserA.cpp index 935f8fc4..d7d4f375 100644 --- a/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlparserA.cpp +++ b/PowerEditor/src/TinyXml/tinyXmlA/tinyxmlparserA.cpp @@ -22,7 +22,7 @@ must not be misrepresented as being the original software. distribution. */ -#include "precompiledHeaders.h" + #include "tinyxmlA.h" //#define DEBUG_PARSER diff --git a/PowerEditor/src/TinyXml/tinystr.cpp b/PowerEditor/src/TinyXml/tinystr.cpp index 78bf513b..45343fda 100644 --- a/PowerEditor/src/TinyXml/tinystr.cpp +++ b/PowerEditor/src/TinyXml/tinystr.cpp @@ -22,7 +22,6 @@ must not be misrepresented as being the original software. distribution. */ -#include "precompiledHeaders.h" #ifndef TIXML_USE_STL diff --git a/PowerEditor/src/TinyXml/tinyxml.cpp b/PowerEditor/src/TinyXml/tinyxml.cpp index e8419cc1..d50938c5 100644 --- a/PowerEditor/src/TinyXml/tinyxml.cpp +++ b/PowerEditor/src/TinyXml/tinyxml.cpp @@ -22,7 +22,7 @@ must not be misrepresented as being the original software. distribution. */ -#include "precompiledHeaders.h" +#include #include "tinyxml.h" bool TiXmlBase::condenseWhiteSpace = true; diff --git a/PowerEditor/src/TinyXml/tinyxmlerror.cpp b/PowerEditor/src/TinyXml/tinyxmlerror.cpp index a5259b99..717cfb9d 100644 --- a/PowerEditor/src/TinyXml/tinyxmlerror.cpp +++ b/PowerEditor/src/TinyXml/tinyxmlerror.cpp @@ -22,7 +22,7 @@ must not be misrepresented as being the original software. distribution. */ -#include "precompiledHeaders.h" + #include "tinyxml.h" // The goal of the seperate error file is to make the first diff --git a/PowerEditor/src/TinyXml/tinyxmlparser.cpp b/PowerEditor/src/TinyXml/tinyxmlparser.cpp index f4a8d941..45ff2621 100644 --- a/PowerEditor/src/TinyXml/tinyxmlparser.cpp +++ b/PowerEditor/src/TinyXml/tinyxmlparser.cpp @@ -22,7 +22,7 @@ must not be misrepresented as being the original software. distribution. */ -#include "precompiledHeaders.h" + #include "tinyxml.h" //#define DEBUG_PARSER diff --git a/PowerEditor/src/UniConversion.cpp b/PowerEditor/src/UniConversion.cpp index 90f90225..bff612c6 100644 --- a/PowerEditor/src/UniConversion.cpp +++ b/PowerEditor/src/UniConversion.cpp @@ -5,7 +5,7 @@ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. -#include "precompiledHeaders.h" +#include #include "UniConversion.h" unsigned int UTF8Length(const wchar_t *uptr, unsigned int tlen) { diff --git a/PowerEditor/src/UniConversion.h b/PowerEditor/src/UniConversion.h index c959087c..3a0b3393 100644 --- a/PowerEditor/src/UniConversion.h +++ b/PowerEditor/src/UniConversion.h @@ -5,9 +5,14 @@ // Copyright 1998-2001 by Neil Hodgson // The License.txt file describes the conditions under which this software may be distributed. +#ifndef UNICONVERSION_H +#define UNICONVERSION_H + unsigned int UTF8Length(const wchar_t * uptr, unsigned int tlen); void UTF8FromUCS2(const wchar_t * uptr, unsigned int tlen, char * putf, unsigned int len); unsigned int UCS2Length(const char * s, unsigned int len); unsigned int UCS2FromUTF8(const char * s, unsigned int len, wchar_t * tbuf, unsigned int tlen); unsigned int ascii_to_utf8(const char * pszASCII, unsigned int lenASCII, char * pszUTF8); int utf8_to_ascii(const char * pszUTF8, unsigned int lenUTF8, char * pszASCII); + +#endif //UNICONVERSION_H diff --git a/PowerEditor/src/Utf8_16.cpp b/PowerEditor/src/Utf8_16.cpp index 729427ab..1532c758 100644 --- a/PowerEditor/src/Utf8_16.cpp +++ b/PowerEditor/src/Utf8_16.cpp @@ -16,7 +16,6 @@ // - Add convert function in Utf8_16_Write //////////////////////////////////////////////////////////////////////////////// -#include "precompiledHeaders.h" #include "Utf8_16.h" const Utf8_16::utf8 Utf8_16::k_Boms[][3] = { diff --git a/PowerEditor/src/WinControls/AnsiCharPanel/ListView.cpp b/PowerEditor/src/WinControls/AnsiCharPanel/ListView.cpp index e5f15c1f..ea37f218 100644 --- a/PowerEditor/src/WinControls/AnsiCharPanel/ListView.cpp +++ b/PowerEditor/src/WinControls/AnsiCharPanel/ListView.cpp @@ -26,7 +26,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" + #include "ListView.h" #include "Parameters.h" #include "localization.h" diff --git a/PowerEditor/src/WinControls/AnsiCharPanel/ListView.h b/PowerEditor/src/WinControls/AnsiCharPanel/ListView.h index 0b7faf34..6a510161 100644 --- a/PowerEditor/src/WinControls/AnsiCharPanel/ListView.h +++ b/PowerEditor/src/WinControls/AnsiCharPanel/ListView.h @@ -30,6 +30,7 @@ #define LISTVIEW_H #include "window.h" +#include "Common.h" class ListView : public Window { diff --git a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.h b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.h index 8df97f7b..5a290a4b 100644 --- a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.h +++ b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.h @@ -29,17 +29,10 @@ #ifndef WORD_STYLE_H #define WORD_STYLE_H -#ifndef COLOUR_PICKER_H #include "ColourPicker.h" -#endif //COLOUR_PICKER_H - -#ifndef WORD_STYLE_DLG_RES_H #include "WordStyleDlgRes.h" -#endif //WORD_STYLE_DLG_RES_H - -#ifndef PARAMETERS_H #include "Parameters.h" -#endif //PARAMETERS_H + #define WM_UPDATESCINTILLAS (WORDSTYLE_USER + 1) //GlobalStyleDlg's msg 2 send 2 its parent diff --git a/PowerEditor/src/WinControls/DockingWnd/DockingManager.cpp b/PowerEditor/src/WinControls/DockingWnd/DockingManager.cpp index 8c78baf6..88d0361e 100644 --- a/PowerEditor/src/WinControls/DockingWnd/DockingManager.cpp +++ b/PowerEditor/src/WinControls/DockingWnd/DockingManager.cpp @@ -26,7 +26,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" + #include "DockingManager.h" #include "DockingSplitter.h" #include "DockingCont.h" @@ -44,18 +44,24 @@ static HHOOK gWinCallHook = NULL; LRESULT CALLBACK FocusWndProc(int nCode, WPARAM wParam, LPARAM lParam); // Callback function that handles messages (to test focus) -LRESULT CALLBACK FocusWndProc(int nCode, WPARAM wParam, LPARAM lParam) { - if (nCode == HC_ACTION && hWndServer) { +LRESULT CALLBACK FocusWndProc(int nCode, WPARAM wParam, LPARAM lParam) +{ + if (nCode == HC_ACTION && hWndServer) + { DockingManager *pDockingManager = (DockingManager *)::GetWindowLongPtr(hWndServer, GWL_USERDATA); - if (pDockingManager) { + if (pDockingManager) + { vector & vcontainer = pDockingManager->getContainerInfo(); CWPSTRUCT * pCwp = (CWPSTRUCT*)lParam; - if (pCwp->message == WM_KILLFOCUS) { + if (pCwp->message == WM_KILLFOCUS) + { for (int i = 0; i < DOCKCONT_MAX; ++i) { vcontainer[i]->SetActive(FALSE); //deactivate all containers } - } else if (pCwp->message == WM_SETFOCUS) { + } + else if (pCwp->message == WM_SETFOCUS) + { for (int i = 0; i < DOCKCONT_MAX; ++i) { vcontainer[i]->SetActive(IsChild(vcontainer[i]->getHSelf(), pCwp->hwnd)); //activate the container that contains the window with focus, this can be none diff --git a/PowerEditor/src/WinControls/DockingWnd/DockingManager.h b/PowerEditor/src/WinControls/DockingWnd/DockingManager.h index da401842..91ab144f 100644 --- a/PowerEditor/src/WinControls/DockingWnd/DockingManager.h +++ b/PowerEditor/src/WinControls/DockingWnd/DockingManager.h @@ -29,6 +29,11 @@ #ifndef DOCKINGMANAGER_H #define DOCKINGMANAGER_H +#include +#include +#include +#include "Window.h" + #ifndef DOCKINGCONT #include "DockingCont.h" #endif //DOCKINGCONT @@ -39,6 +44,7 @@ class DockingSplitter; #include "SplitterContainer.h" #endif //SPLITTER_CONTAINER_H + #define DSPC_CLASS_NAME TEXT("dockingManager") #define CONT_MAP_MAX 50 diff --git a/PowerEditor/src/WinControls/DockingWnd/DockingSplitter.cpp b/PowerEditor/src/WinControls/DockingWnd/DockingSplitter.cpp index 1778042e..3d07437e 100644 --- a/PowerEditor/src/WinControls/DockingWnd/DockingSplitter.cpp +++ b/PowerEditor/src/WinControls/DockingWnd/DockingSplitter.cpp @@ -26,7 +26,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" + #include "DockingSplitter.h" #include "Notepad_plus_msgs.h" #include "Parameters.h" diff --git a/PowerEditor/src/WinControls/DockingWnd/DockingSplitter.h b/PowerEditor/src/WinControls/DockingWnd/DockingSplitter.h index ffc33cbe..521c117c 100644 --- a/PowerEditor/src/WinControls/DockingWnd/DockingSplitter.h +++ b/PowerEditor/src/WinControls/DockingWnd/DockingSplitter.h @@ -29,6 +29,8 @@ #ifndef DOCKINGSPLITTER_H #define DOCKINGSPLITTER_H +#include "Window.h" + #ifndef DOCKING_H #include "Docking.h" #endif //DOCKING_H diff --git a/PowerEditor/src/WinControls/DockingWnd/Gripper.cpp b/PowerEditor/src/WinControls/DockingWnd/Gripper.cpp index 344d6d4f..10284fc5 100644 --- a/PowerEditor/src/WinControls/DockingWnd/Gripper.cpp +++ b/PowerEditor/src/WinControls/DockingWnd/Gripper.cpp @@ -29,7 +29,6 @@ // speed and consistency of the drag-rectangle - August 2010, Joern Gruel (jg) -#include "precompiledHeaders.h" #include "Gripper.h" #include "DockingManager.h" #include "Parameters.h" diff --git a/PowerEditor/src/WinControls/DockingWnd/Gripper.h b/PowerEditor/src/WinControls/DockingWnd/Gripper.h index 98aa4662..c154821b 100644 --- a/PowerEditor/src/WinControls/DockingWnd/Gripper.h +++ b/PowerEditor/src/WinControls/DockingWnd/Gripper.h @@ -29,6 +29,10 @@ #ifndef GRIPPER_H #define GRIPPER_H +#include +#include +#include "Common.h" + #ifndef DOCKING_H #include "Docking.h" #endif //DOCKING_H diff --git a/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp b/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp index 11f50af0..ac8245c1 100644 --- a/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp +++ b/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp @@ -26,7 +26,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" #include "documentMap.h" #include "ScintillaEditView.h" diff --git a/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.cpp b/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.cpp index 79716580..8ad4227e 100644 --- a/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.cpp +++ b/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.cpp @@ -26,7 +26,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" #include "FindCharsInRange.h" #include "FindCharsInRange_rc.h" diff --git a/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp b/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp index 2e2fd339..13f780ba 100644 --- a/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp +++ b/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp @@ -26,7 +26,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" #include "functionListPanel.h" #include "ScintillaEditView.h" #include "localization.h" diff --git a/PowerEditor/src/WinControls/FunctionList/functionParser.cpp b/PowerEditor/src/WinControls/FunctionList/functionParser.cpp index 16d3904b..a0b80242 100644 --- a/PowerEditor/src/WinControls/FunctionList/functionParser.cpp +++ b/PowerEditor/src/WinControls/FunctionList/functionParser.cpp @@ -25,7 +25,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" +#include #include "ScintillaEditView.h" #include "functionParser.h" #include "boostregexsearch.h" diff --git a/PowerEditor/src/WinControls/ImageListSet/ImageListSet.cpp b/PowerEditor/src/WinControls/ImageListSet/ImageListSet.cpp index e6f42f02..8f8a7cba 100644 --- a/PowerEditor/src/WinControls/ImageListSet/ImageListSet.cpp +++ b/PowerEditor/src/WinControls/ImageListSet/ImageListSet.cpp @@ -26,7 +26,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" #include "ImageListSet.h" void IconList::create(HINSTANCE hInst, int iconSize) diff --git a/PowerEditor/src/WinControls/ImageListSet/ImageListSet.h b/PowerEditor/src/WinControls/ImageListSet/ImageListSet.h index 84343b75..6ebbea91 100644 --- a/PowerEditor/src/WinControls/ImageListSet/ImageListSet.h +++ b/PowerEditor/src/WinControls/ImageListSet/ImageListSet.h @@ -29,6 +29,8 @@ #ifndef IMAGE_LIST_H #define IMAGE_LIST_H +#include +#include #include const int nbMax = 45; diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp index d8f4d2ba..477a43a5 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp @@ -25,8 +25,9 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -#include "precompiledHeaders.h" +#include +#include +#include #include "preferenceDlg.h" #include "lesDlgs.h" #include "EncodingMapper.h" diff --git a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp index f0372919..2c56c05a 100644 --- a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp +++ b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp @@ -26,7 +26,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" #include "ProjectPanel.h" #include "resource.h" #include "tinyxml.h" diff --git a/PowerEditor/src/WinControls/ProjectPanel/TreeView.cpp b/PowerEditor/src/WinControls/ProjectPanel/TreeView.cpp index d46f347b..7aa100e8 100644 --- a/PowerEditor/src/WinControls/ProjectPanel/TreeView.cpp +++ b/PowerEditor/src/WinControls/ProjectPanel/TreeView.cpp @@ -26,7 +26,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" + #include "TreeView.h" #define CY_ITEMHEIGHT 18 diff --git a/PowerEditor/src/WinControls/ProjectPanel/TreeView.h b/PowerEditor/src/WinControls/ProjectPanel/TreeView.h index 0138fe8c..d14b4b5c 100644 --- a/PowerEditor/src/WinControls/ProjectPanel/TreeView.h +++ b/PowerEditor/src/WinControls/ProjectPanel/TreeView.h @@ -28,7 +28,10 @@ #ifndef TREE_VIEW_H #define TREE_VIEW_H +#include +#include #include "window.h" +#include "Common.h" struct TreeStateNode { generic_string _label; diff --git a/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp b/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp index f4b6526a..63255732 100644 --- a/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp +++ b/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp @@ -15,7 +15,7 @@ //along with this program; if not, write to the Free Software //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" +#include "StaticDialog.h" #include "RunDlg.h" #include "FileDialog.h" #include "Notepad_plus_msgs.h" diff --git a/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.h b/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.h index 18e6898a..a4ef21ba 100644 --- a/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.h +++ b/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.h @@ -18,6 +18,9 @@ #ifndef RUN_DLG_H #define RUN_DLG_H +#include +#include "Common.h" + #ifndef RUN_DLG_RC_H #include "RunDlg_rc.h" #endif //RUN_DLG_RC_H diff --git a/PowerEditor/src/WinControls/StaticDialog/StaticDialog.h b/PowerEditor/src/WinControls/StaticDialog/StaticDialog.h index f4e37456..e3431a89 100644 --- a/PowerEditor/src/WinControls/StaticDialog/StaticDialog.h +++ b/PowerEditor/src/WinControls/StaticDialog/StaticDialog.h @@ -29,10 +29,7 @@ #ifndef STATIC_DIALOG_H #define STATIC_DIALOG_H -#ifndef NOTEPAD_PLUS_MSGS_H #include "Notepad_plus_msgs.h" -#endif //NOTEPAD_PLUS_MSGS_H - #include "Window.h" typedef HRESULT (WINAPI * ETDTProc) (HWND, DWORD); diff --git a/PowerEditor/src/WinControls/TabBar/TabBar.cpp b/PowerEditor/src/WinControls/TabBar/TabBar.cpp index 6e9e24a4..bcb9aa20 100644 --- a/PowerEditor/src/WinControls/TabBar/TabBar.cpp +++ b/PowerEditor/src/WinControls/TabBar/TabBar.cpp @@ -26,7 +26,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" + #include "TabBar.h" #include "Parameters.h" diff --git a/PowerEditor/src/WinControls/TaskList/TaskList.cpp b/PowerEditor/src/WinControls/TaskList/TaskList.cpp index 0006583b..42205a46 100644 --- a/PowerEditor/src/WinControls/TaskList/TaskList.cpp +++ b/PowerEditor/src/WinControls/TaskList/TaskList.cpp @@ -26,7 +26,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" + #include "TaskList.h" #include "TaskListDlg_rc.h" #include "colors.h" diff --git a/PowerEditor/src/WinControls/TaskList/TaskList.h b/PowerEditor/src/WinControls/TaskList/TaskList.h index 9645823e..b2a64142 100644 --- a/PowerEditor/src/WinControls/TaskList/TaskList.h +++ b/PowerEditor/src/WinControls/TaskList/TaskList.h @@ -29,6 +29,10 @@ #ifndef TASKLIST_H #define TASKLIST_H +#include +#include +#include "Window.h" + #ifndef WM_MOUSEWHEEL #define WM_MOUSEWHEEL 0x020A #endif //WM_MOUSEWHEEL diff --git a/PowerEditor/src/WinControls/TaskList/TaskListDlg.cpp b/PowerEditor/src/WinControls/TaskList/TaskListDlg.cpp index 67dda3cc..ef5657ad 100644 --- a/PowerEditor/src/WinControls/TaskList/TaskListDlg.cpp +++ b/PowerEditor/src/WinControls/TaskList/TaskListDlg.cpp @@ -26,7 +26,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" + #include "TaskListDlg.h" #include "Parameters.h" #include "resource.h" diff --git a/PowerEditor/src/WinControls/TaskList/TaskListDlg.h b/PowerEditor/src/WinControls/TaskList/TaskListDlg.h index 9362e736..42cd16b4 100644 --- a/PowerEditor/src/WinControls/TaskList/TaskListDlg.h +++ b/PowerEditor/src/WinControls/TaskList/TaskListDlg.h @@ -29,6 +29,9 @@ #ifndef TASKLISTDLG_H #define TASKLISTDLG_H +#include "Common.h" +#include "StaticDialog.h" + #ifndef TASKLISTDLGRC_H #include "TaskListDlg_rc.h" #endif //TASKLISTDLGRC_H diff --git a/PowerEditor/src/WinControls/ToolBar/ToolBar.cpp b/PowerEditor/src/WinControls/ToolBar/ToolBar.cpp index c2807f61..2439d852 100644 --- a/PowerEditor/src/WinControls/ToolBar/ToolBar.cpp +++ b/PowerEditor/src/WinControls/ToolBar/ToolBar.cpp @@ -26,7 +26,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" + #include "ToolBar.h" #include "Shortcut.h" #include "Parameters.h" diff --git a/PowerEditor/src/WinControls/ToolBar/ToolBar.h b/PowerEditor/src/WinControls/ToolBar/ToolBar.h index ec695189..6db67f13 100644 --- a/PowerEditor/src/WinControls/ToolBar/ToolBar.h +++ b/PowerEditor/src/WinControls/ToolBar/ToolBar.h @@ -29,11 +29,9 @@ #ifndef TOOL_BAR_H #define TOOL_BAR_H -#ifndef NOTEPAD_PLUS_MSGS_H -#include "Notepad_plus_msgs.h" -#endif //NOTEPAD_PLUS_MSGS_H - +#include "Common.h" #include "Window.h" +#include "Notepad_plus_msgs.h" #include "ImageListSet.h" #define REBAR_BAR_TOOLBAR 0 diff --git a/PowerEditor/src/WinControls/ToolTip/ToolTip.cpp b/PowerEditor/src/WinControls/ToolTip/ToolTip.cpp index 1d7024cb..9b984c05 100644 --- a/PowerEditor/src/WinControls/ToolTip/ToolTip.cpp +++ b/PowerEditor/src/WinControls/ToolTip/ToolTip.cpp @@ -26,14 +26,11 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" +#include #include "ToolTip.h" - - LRESULT CALLBACK dlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); - void ToolTip::init(HINSTANCE hInst, HWND hParent) { if (_hSelf == NULL) diff --git a/PowerEditor/src/WinControls/ToolTip/ToolTip.h b/PowerEditor/src/WinControls/ToolTip/ToolTip.h index a8bf735e..8310c57d 100644 --- a/PowerEditor/src/WinControls/ToolTip/ToolTip.h +++ b/PowerEditor/src/WinControls/ToolTip/ToolTip.h @@ -29,7 +29,9 @@ #ifndef __TOOLTIP_H__ #define __TOOLTIP_H__ +#include #include +#include "Window.h" class ToolTip : public Window { diff --git a/PowerEditor/src/WinControls/TrayIcon/trayIconControler.cpp b/PowerEditor/src/WinControls/TrayIcon/trayIconControler.cpp index 84d77284..b34af62f 100644 --- a/PowerEditor/src/WinControls/TrayIcon/trayIconControler.cpp +++ b/PowerEditor/src/WinControls/TrayIcon/trayIconControler.cpp @@ -26,7 +26,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" #include "trayIconControler.h" trayIconControler::trayIconControler(HWND hwnd, UINT uID, UINT uCBMsg, HICON hicon, TCHAR *tip) diff --git a/PowerEditor/src/WinControls/TrayIcon/trayIconControler.h b/PowerEditor/src/WinControls/TrayIcon/trayIconControler.h index d3bd689a..bfaf436b 100644 --- a/PowerEditor/src/WinControls/TrayIcon/trayIconControler.h +++ b/PowerEditor/src/WinControls/TrayIcon/trayIconControler.h @@ -29,6 +29,8 @@ #ifndef TRAY_ICON_CONTROLER_H #define TRAY_ICON_CONTROLER_H +#include + #define ADD NIM_ADD #define REMOVE NIM_DELETE diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp index a5532f58..658648ad 100644 --- a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp @@ -26,7 +26,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" + #include "VerticalFileSwitcher.h" #include "menuCmdID.h" #include "Parameters.h" diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h index 5fb08eb4..0276cd00 100644 --- a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h @@ -29,11 +29,7 @@ #ifndef VERTICALFILESWITCHER_H #define VERTICALFILESWITCHER_H -//#include -#ifndef DOCKINGDLGINTERFACE_H #include "DockingDlgInterface.h" -#endif //DOCKINGDLGINTERFACE_H - #include "VerticalFileSwitcher_rc.h" #include "VerticalFileSwitcherListView.h" diff --git a/PowerEditor/src/WinControls/WindowsDlg/WinMgr.cpp b/PowerEditor/src/WinControls/WindowsDlg/WinMgr.cpp index 47127d92..d4f37813 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/WinMgr.cpp +++ b/PowerEditor/src/WinControls/WindowsDlg/WinMgr.cpp @@ -8,7 +8,7 @@ // Theo - Heavily modified to remove MFC dependencies. // Replaced CWnd*/HWND, CRect/RECT, CSize/SIZE, CPoint/POINT -#include "precompiledHeaders.h" + #include "WinMgr.h" // Theo - Style Helpers diff --git a/PowerEditor/src/WinControls/WindowsDlg/WinRect.cpp b/PowerEditor/src/WinControls/WindowsDlg/WinRect.cpp index 5caeb955..3dcb68f0 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/WinRect.cpp +++ b/PowerEditor/src/WinControls/WindowsDlg/WinRect.cpp @@ -7,7 +7,6 @@ // -#include "precompiledHeaders.h" #include "WinMgr.h" ////////////////// diff --git a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h index 48eac8b0..d194dc4e 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h +++ b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.h @@ -29,10 +29,7 @@ #ifndef WINDOWS_DLG_H #define WINDOWS_DLG_H -#ifndef SIZABLE_DLG_H #include "SizeableDlg.h" -#endif //SIZABLE_DLG_H - #include "Common.h" class DocTabView; diff --git a/PowerEditor/src/lastRecentFileList.cpp b/PowerEditor/src/lastRecentFileList.cpp index 2e7dc670..b2b9d80b 100644 --- a/PowerEditor/src/lastRecentFileList.cpp +++ b/PowerEditor/src/lastRecentFileList.cpp @@ -26,7 +26,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" + #include "lastRecentFileList.h" #include "menuCmdID.h" #include "localization.h" diff --git a/PowerEditor/src/lesDlgs.cpp b/PowerEditor/src/lesDlgs.cpp index 57947d89..0b2e29c6 100644 --- a/PowerEditor/src/lesDlgs.cpp +++ b/PowerEditor/src/lesDlgs.cpp @@ -26,7 +26,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" + #include "lesDlgs.h" #include "resource.h" #include "menuCmdID.h" diff --git a/PowerEditor/src/lesDlgs.h b/PowerEditor/src/lesDlgs.h index a3e52e7e..0fdd66be 100644 --- a/PowerEditor/src/lesDlgs.h +++ b/PowerEditor/src/lesDlgs.h @@ -29,6 +29,9 @@ #ifndef SIZE_DLG_H #define SIZE_DLG_H +#include "StaticDialog.h" +#include "Common.h" + const int DEFAULT_NB_NUMBER = 2; class ValueDlg : public StaticDialog { diff --git a/PowerEditor/src/localization.cpp b/PowerEditor/src/localization.cpp index fd41fa30..920eba3e 100644 --- a/PowerEditor/src/localization.cpp +++ b/PowerEditor/src/localization.cpp @@ -26,7 +26,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" #include "Notepad_plus.h" #include "ShortcutMapper.h" #include "EncodingMapper.h" diff --git a/PowerEditor/src/localization.h b/PowerEditor/src/localization.h index e436909e..4d77d6db 100644 --- a/PowerEditor/src/localization.h +++ b/PowerEditor/src/localization.h @@ -29,9 +29,9 @@ #ifndef LOCALIZATION_H #define LOCALIZATION_H -#ifndef TINYXMLA_INCLUDED +#include "Common.h" #include "tinyxmlA.h" -#endif //TINYXMLA_INCLUDED + class FindReplaceDlg; class PreferenceDlg; diff --git a/PowerEditor/src/uchardet/JpCntx.cpp b/PowerEditor/src/uchardet/JpCntx.cpp index 033bb2a7..7da04139 100644 --- a/PowerEditor/src/uchardet/JpCntx.cpp +++ b/PowerEditor/src/uchardet/JpCntx.cpp @@ -34,7 +34,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include "nscore.h" #include "JpCntx.h" diff --git a/PowerEditor/src/uchardet/LangBulgarianModel.cpp b/PowerEditor/src/uchardet/LangBulgarianModel.cpp index 9af123d9..77686607 100644 --- a/PowerEditor/src/uchardet/LangBulgarianModel.cpp +++ b/PowerEditor/src/uchardet/LangBulgarianModel.cpp @@ -34,7 +34,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include "nsSBCharSetProber.h" /**************************************************************** 255: Control characters that usually does not exist in any text diff --git a/PowerEditor/src/uchardet/LangCyrillicModel.cpp b/PowerEditor/src/uchardet/LangCyrillicModel.cpp index 6407e8f5..42f28876 100644 --- a/PowerEditor/src/uchardet/LangCyrillicModel.cpp +++ b/PowerEditor/src/uchardet/LangCyrillicModel.cpp @@ -34,7 +34,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include "nsSBCharSetProber.h" diff --git a/PowerEditor/src/uchardet/LangGreekModel.cpp b/PowerEditor/src/uchardet/LangGreekModel.cpp index e09b1864..d90ced9d 100644 --- a/PowerEditor/src/uchardet/LangGreekModel.cpp +++ b/PowerEditor/src/uchardet/LangGreekModel.cpp @@ -34,7 +34,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include "nsSBCharSetProber.h" /**************************************************************** 255: Control characters that usually does not exist in any text diff --git a/PowerEditor/src/uchardet/LangHebrewModel.cpp b/PowerEditor/src/uchardet/LangHebrewModel.cpp index f3c11852..99a36e72 100644 --- a/PowerEditor/src/uchardet/LangHebrewModel.cpp +++ b/PowerEditor/src/uchardet/LangHebrewModel.cpp @@ -36,7 +36,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include "nsSBCharSetProber.h" diff --git a/PowerEditor/src/uchardet/LangHungarianModel.cpp b/PowerEditor/src/uchardet/LangHungarianModel.cpp index cf3e449d..856644af 100644 --- a/PowerEditor/src/uchardet/LangHungarianModel.cpp +++ b/PowerEditor/src/uchardet/LangHungarianModel.cpp @@ -34,7 +34,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include "nsSBCharSetProber.h" /**************************************************************** 255: Control characters that usually does not exist in any text diff --git a/PowerEditor/src/uchardet/LangThaiModel.cpp b/PowerEditor/src/uchardet/LangThaiModel.cpp index f849e01d..11b8e75e 100644 --- a/PowerEditor/src/uchardet/LangThaiModel.cpp +++ b/PowerEditor/src/uchardet/LangThaiModel.cpp @@ -34,7 +34,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include "nsSBCharSetProber.h" diff --git a/PowerEditor/src/uchardet/nsBig5Prober.cpp b/PowerEditor/src/uchardet/nsBig5Prober.cpp index b2ae4f6a..7a85abb5 100644 --- a/PowerEditor/src/uchardet/nsBig5Prober.cpp +++ b/PowerEditor/src/uchardet/nsBig5Prober.cpp @@ -34,7 +34,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include "nsBig5Prober.h" void nsBig5Prober::Reset(void) diff --git a/PowerEditor/src/uchardet/nsCharSetProber.cpp b/PowerEditor/src/uchardet/nsCharSetProber.cpp index 6a823470..fdfe7d7a 100644 --- a/PowerEditor/src/uchardet/nsCharSetProber.cpp +++ b/PowerEditor/src/uchardet/nsCharSetProber.cpp @@ -35,7 +35,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include "nsCharSetProber.h" #include "prmem.h" diff --git a/PowerEditor/src/uchardet/nsEUCJPProber.cpp b/PowerEditor/src/uchardet/nsEUCJPProber.cpp index 9255394d..54861b3d 100644 --- a/PowerEditor/src/uchardet/nsEUCJPProber.cpp +++ b/PowerEditor/src/uchardet/nsEUCJPProber.cpp @@ -39,7 +39,7 @@ // 1, kana character (or hankaku?) often have hight frequency of appereance // 2, kana character often exist in group // 3, certain combination of kana is never used in japanese language -#include "precompiledHeaders.h" + #include "nsEUCJPProber.h" void nsEUCJPProber::Reset(void) diff --git a/PowerEditor/src/uchardet/nsEUCKRProber.cpp b/PowerEditor/src/uchardet/nsEUCKRProber.cpp index ff9fea0f..3632f1f9 100644 --- a/PowerEditor/src/uchardet/nsEUCKRProber.cpp +++ b/PowerEditor/src/uchardet/nsEUCKRProber.cpp @@ -34,7 +34,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include "nsEUCKRProber.h" void nsEUCKRProber::Reset(void) diff --git a/PowerEditor/src/uchardet/nsEUCTWProber.cpp b/PowerEditor/src/uchardet/nsEUCTWProber.cpp index 33f4b0ee..a06e074b 100644 --- a/PowerEditor/src/uchardet/nsEUCTWProber.cpp +++ b/PowerEditor/src/uchardet/nsEUCTWProber.cpp @@ -34,7 +34,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include "nsEUCTWProber.h" void nsEUCTWProber::Reset(void) diff --git a/PowerEditor/src/uchardet/nsEscCharsetProber.cpp b/PowerEditor/src/uchardet/nsEscCharsetProber.cpp index 9390b5a5..464c7534 100644 --- a/PowerEditor/src/uchardet/nsEscCharsetProber.cpp +++ b/PowerEditor/src/uchardet/nsEscCharsetProber.cpp @@ -35,7 +35,7 @@ * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include "nsEscCharsetProber.h" #include "nsUniversalDetector.h" diff --git a/PowerEditor/src/uchardet/nsEscSM.cpp b/PowerEditor/src/uchardet/nsEscSM.cpp index c746609d..7b1de390 100644 --- a/PowerEditor/src/uchardet/nsEscSM.cpp +++ b/PowerEditor/src/uchardet/nsEscSM.cpp @@ -34,7 +34,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include "nsCodingStateMachine.h" static const PRUint32 HZ_cls[ 256 / 8 ] = { diff --git a/PowerEditor/src/uchardet/nsGB2312Prober.cpp b/PowerEditor/src/uchardet/nsGB2312Prober.cpp index fb0ae6fc..b6d469ce 100644 --- a/PowerEditor/src/uchardet/nsGB2312Prober.cpp +++ b/PowerEditor/src/uchardet/nsGB2312Prober.cpp @@ -39,7 +39,7 @@ // 1, kana character (or hankaku?) often have hight frequency of appereance // 2, kana character often exist in group // 3, certain combination of kana is never used in japanese language -#include "precompiledHeaders.h" + #include "nsGB2312Prober.h" void nsGB18030Prober::Reset(void) diff --git a/PowerEditor/src/uchardet/nsHebrewProber.cpp b/PowerEditor/src/uchardet/nsHebrewProber.cpp index 2dd4b7cd..b148ce3f 100644 --- a/PowerEditor/src/uchardet/nsHebrewProber.cpp +++ b/PowerEditor/src/uchardet/nsHebrewProber.cpp @@ -35,7 +35,6 @@ * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" #include "nsHebrewProber.h" #include diff --git a/PowerEditor/src/uchardet/nsLatin1Prober.cpp b/PowerEditor/src/uchardet/nsLatin1Prober.cpp index 77a8c6a2..7694ef76 100644 --- a/PowerEditor/src/uchardet/nsLatin1Prober.cpp +++ b/PowerEditor/src/uchardet/nsLatin1Prober.cpp @@ -36,7 +36,6 @@ * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" #include "nsLatin1Prober.h" #include "prmem.h" #include diff --git a/PowerEditor/src/uchardet/nsMBCSGroupProber.cpp b/PowerEditor/src/uchardet/nsMBCSGroupProber.cpp index 360635ab..4fafb134 100644 --- a/PowerEditor/src/uchardet/nsMBCSGroupProber.cpp +++ b/PowerEditor/src/uchardet/nsMBCSGroupProber.cpp @@ -36,7 +36,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include #include "nsMBCSGroupProber.h" diff --git a/PowerEditor/src/uchardet/nsMBCSSM.cpp b/PowerEditor/src/uchardet/nsMBCSSM.cpp index e4fe43ce..bedf2b76 100644 --- a/PowerEditor/src/uchardet/nsMBCSSM.cpp +++ b/PowerEditor/src/uchardet/nsMBCSSM.cpp @@ -34,7 +34,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include "nsCodingStateMachine.h" /* diff --git a/PowerEditor/src/uchardet/nsSBCSGroupProber.cpp b/PowerEditor/src/uchardet/nsSBCSGroupProber.cpp index 1adcfef6..d8fef879 100644 --- a/PowerEditor/src/uchardet/nsSBCSGroupProber.cpp +++ b/PowerEditor/src/uchardet/nsSBCSGroupProber.cpp @@ -36,7 +36,6 @@ * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" #include #include "prmem.h" diff --git a/PowerEditor/src/uchardet/nsSBCharSetProber.cpp b/PowerEditor/src/uchardet/nsSBCharSetProber.cpp index 8ebfacda..3a88fdf3 100644 --- a/PowerEditor/src/uchardet/nsSBCharSetProber.cpp +++ b/PowerEditor/src/uchardet/nsSBCharSetProber.cpp @@ -35,7 +35,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include #include "nsSBCharSetProber.h" diff --git a/PowerEditor/src/uchardet/nsSJISProber.cpp b/PowerEditor/src/uchardet/nsSJISProber.cpp index 7386a9cd..0b59e399 100644 --- a/PowerEditor/src/uchardet/nsSJISProber.cpp +++ b/PowerEditor/src/uchardet/nsSJISProber.cpp @@ -40,7 +40,7 @@ // 2, kana character often exist in group // 3, certain combination of kana is never used in japanese language -#include "precompiledHeaders.h" + #include "nsSJISProber.h" void nsSJISProber::Reset(void) diff --git a/PowerEditor/src/uchardet/nsUTF8Prober.cpp b/PowerEditor/src/uchardet/nsUTF8Prober.cpp index 81ab5f18..ab8d9f7b 100644 --- a/PowerEditor/src/uchardet/nsUTF8Prober.cpp +++ b/PowerEditor/src/uchardet/nsUTF8Prober.cpp @@ -35,7 +35,6 @@ * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" #include "nsUTF8Prober.h" void nsUTF8Prober::Reset(void) diff --git a/PowerEditor/src/uchardet/nsUniversalDetector.cpp b/PowerEditor/src/uchardet/nsUniversalDetector.cpp index 16a26cd7..dd74243c 100644 --- a/PowerEditor/src/uchardet/nsUniversalDetector.cpp +++ b/PowerEditor/src/uchardet/nsUniversalDetector.cpp @@ -36,8 +36,6 @@ * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" - #include "nscore.h" #include "nsUniversalDetector.h" diff --git a/PowerEditor/src/uchardet/uchardet.cpp b/PowerEditor/src/uchardet/uchardet.cpp index eeba3106..35b84092 100644 --- a/PowerEditor/src/uchardet/uchardet.cpp +++ b/PowerEditor/src/uchardet/uchardet.cpp @@ -34,7 +34,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -#include "precompiledHeaders.h" + #include "uchardet.h" #include "nscore.h" #include "nsUniversalDetector.h" diff --git a/PowerEditor/src/winmain.cpp b/PowerEditor/src/winmain.cpp index 7ad85802..4b6a8752 100644 --- a/PowerEditor/src/winmain.cpp +++ b/PowerEditor/src/winmain.cpp @@ -25,8 +25,8 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +#define _WIN32_WINNT 0x0501 -#include "precompiledHeaders.h" #include "Notepad_plus_Window.h" #include "Process.h" From bc94d07766e88fcdf24c05c7bef0eac76a138a14 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Wed, 3 Jun 2015 00:55:28 +0200 Subject: [PATCH 11/11] [UPDATE] Unprecompile headers (part 4 - final) --- .../src/MISC/Common/precompiledHeaders.h | 76 ------------------- PowerEditor/src/Parameters.cpp | 5 +- .../src/WinControls/AboutDlg/URLCtrl.cpp | 1 - .../VerticalFileSwitcherListView.cpp | 3 +- .../WinControls/WindowsDlg/SizeableDlg.cpp | 2 - PowerEditor/src/winmain.cpp | 3 - PowerEditor/visual.net/notepadPlus.vcxproj | 3 +- 7 files changed, 6 insertions(+), 87 deletions(-) delete mode 100644 PowerEditor/src/MISC/Common/precompiledHeaders.h diff --git a/PowerEditor/src/MISC/Common/precompiledHeaders.h b/PowerEditor/src/MISC/Common/precompiledHeaders.h deleted file mode 100644 index c3a6a897..00000000 --- a/PowerEditor/src/MISC/Common/precompiledHeaders.h +++ /dev/null @@ -1,76 +0,0 @@ -// This file is part of Notepad++ project -// Copyright (C)2003 Don HO -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// Note that the GPL places important restrictions on "derived works", yet -// it does not provide a detailed definition of that term. To avoid -// misunderstandings, we consider an application to constitute a -// "derivative work" for the purpose of this license if it does any of the -// following: -// 1. Integrates source code from Notepad++. -// 2. Integrates/includes/aggregates Notepad++ into a proprietary executable -// installer, such as those produced by InstallShield. -// 3. Links to a library or executes a program that does any of the above. -// -// This program 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - -#ifndef PRECOMPILEHEADER_H -#define PRECOMPILEHEADER_H - -// w/o precompiled headers file : 1 minute 55 sec - -#define _WIN32_WINNT 0x0501 - -// C RunTime Header Files -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// STL Headers -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Windows Header Files -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -// Notepad++ -#include "Common.h" -#include "Window.h" -#include "StaticDialog.h" - -#endif //PRECOMPILEHEADER_H diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index a44f938e..7806a482 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -25,8 +25,9 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -#include "precompiledHeaders.h" +#include +#include +#include #include "Parameters.h" #include "FileDialog.h" #include "ScintillaEditView.h" diff --git a/PowerEditor/src/WinControls/AboutDlg/URLCtrl.cpp b/PowerEditor/src/WinControls/AboutDlg/URLCtrl.cpp index 9115abf5..7423d475 100644 --- a/PowerEditor/src/WinControls/AboutDlg/URLCtrl.cpp +++ b/PowerEditor/src/WinControls/AboutDlg/URLCtrl.cpp @@ -26,7 +26,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" #include "URLCtrl.h" static BYTE XORMask[128] = diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.cpp b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.cpp index ba9bb981..304b65cc 100644 --- a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.cpp +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.cpp @@ -25,8 +25,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -#include "precompiledHeaders.h" +#include #include "VerticalFileSwitcherListView.h" #include "Buffer.h" #include "localization.h" diff --git a/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.cpp b/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.cpp index 14adbcc7..f0ec1492 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.cpp +++ b/PowerEditor/src/WinControls/WindowsDlg/SizeableDlg.cpp @@ -26,8 +26,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#include "precompiledHeaders.h" - #include "WindowsDlg.h" #include "WindowsDlgRc.h" diff --git a/PowerEditor/src/winmain.cpp b/PowerEditor/src/winmain.cpp index 4b6a8752..6a52e3a2 100644 --- a/PowerEditor/src/winmain.cpp +++ b/PowerEditor/src/winmain.cpp @@ -25,11 +25,8 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#define _WIN32_WINNT 0x0501 - #include "Notepad_plus_Window.h" #include "Process.h" - #include "Win32Exception.h" //Win32 exception #include "MiniDumper.h" //Write dump files diff --git a/PowerEditor/visual.net/notepadPlus.vcxproj b/PowerEditor/visual.net/notepadPlus.vcxproj index 762db800..77b1efe9 100644 --- a/PowerEditor/visual.net/notepadPlus.vcxproj +++ b/PowerEditor/visual.net/notepadPlus.vcxproj @@ -66,6 +66,7 @@ true ProgramDatabase true + /D_WIN32_WINNT=0x0501 %(AdditionalOptions) /fixed:no %(AdditionalOptions) @@ -107,6 +108,7 @@ ProgramDatabase NoExtensions true + /D_WIN32_WINNT=0x0501 %(AdditionalOptions) comctl32.lib;shlwapi.lib;shell32.lib;Oleacc.lib;%(AdditionalDependencies) @@ -478,7 +480,6 @@ copy ..\src\contextMenu.xml ..\bin\contextMenu.xml -