Changeset 629 in dev for trunk/ab5.0/abdev/abdev/Replace.cpp
- Timestamp:
- Jun 2, 2008, 11:50:24 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/Replace.cpp
r625 r629 9 9 CHARRANGE Range,cr2; 10 10 11 pBuf=MdiInfo[WndNum] .pMdiTextEdit->buffer;11 pBuf=MdiInfo[WndNum]->pMdiTextEdit->buffer; 12 12 13 13 //行の先頭位置を取得 … … 31 31 //初期化(すべて黒色に戻す) 32 32 for(i=Range.cpMin;i<Range.cpMax;i++){ 33 MdiInfo[WndNum] .pMdiTextEdit->pColorRef[i]=tci.rgbDefault;33 MdiInfo[WndNum]->pMdiTextEdit->pColorRef[i]=tci.rgbDefault; 34 34 } 35 35 … … 60 60 if(bResult){ 61 61 for(i2=cr2.cpMin;i2<cr2.cpMax;i2++){ 62 MdiInfo[WndNum] .pMdiTextEdit->pColorRef[i2]=tci.rgbStatement;62 MdiInfo[WndNum]->pMdiTextEdit->pColorRef[i2]=tci.rgbStatement; 63 63 } 64 64 } … … 66 66 if(IsStr||pBuf[i]=='\"'&&IsStr==0){ 67 67 //文字列カラー(""で囲まれる範囲) 68 MdiInfo[WndNum] .pMdiTextEdit->pColorRef[i]=tci.rgbString;68 MdiInfo[WndNum]->pMdiTextEdit->pColorRef[i]=tci.rgbString; 69 69 } 70 70 if(pBuf[i]=='\0') break; … … 90 90 //バッファ長を取得 91 91 int length; 92 length=lstrlen(MdiInfo[WndNum] .pMdiTextEdit->buffer);92 length=lstrlen(MdiInfo[WndNum]->pMdiTextEdit->buffer); 93 93 94 94 int delta; … … 99 99 //////////////////// 100 100 101 MdiInfo[WndNum] .pMdiTextEdit->buffer=(char *)HeapReAlloc(hHeap,101 MdiInfo[WndNum]->pMdiTextEdit->buffer=(char *)HeapReAlloc(hHeap, 102 102 0, 103 MdiInfo[WndNum] .pMdiTextEdit->buffer,103 MdiInfo[WndNum]->pMdiTextEdit->buffer, 104 104 length+1+delta); 105 105 106 MdiInfo[WndNum] .pMdiTextEdit->pColorRef=(COLORREF *)HeapReAlloc(hHeap,106 MdiInfo[WndNum]->pMdiTextEdit->pColorRef=(COLORREF *)HeapReAlloc(hHeap, 107 107 0, 108 MdiInfo[WndNum] .pMdiTextEdit->pColorRef,108 MdiInfo[WndNum]->pMdiTextEdit->pColorRef, 109 109 (length+1+delta)*sizeof(COLORREF)); 110 110 } … … 114 114 if( projectInfo.IsOpened() ){ 115 115 projectInfo.pobj_DBBreakPoint->replace( 116 MdiInfo[WndNum] .path.c_str(),117 MdiInfo[WndNum] .pMdiTextEdit->buffer,116 MdiInfo[WndNum]->path.c_str(), 117 MdiInfo[WndNum]->pMdiTextEdit->buffer, 118 118 &DelRange, 119 119 &Range, … … 123 123 extern CDBBreakPoint *pobj_DBBreakPoint; 124 124 pobj_DBBreakPoint->replace( 125 MdiInfo[WndNum] .path.c_str(),126 MdiInfo[WndNum] .pMdiTextEdit->buffer,125 MdiInfo[WndNum]->path.c_str(), 126 MdiInfo[WndNum]->pMdiTextEdit->buffer, 127 127 &DelRange, 128 128 &Range, … … 132 132 133 133 //文字列バッファをスライドして、挿入 134 SlideString(MdiInfo[WndNum] .pMdiTextEdit->buffer+DelRange.cpMax,134 SlideString(MdiInfo[WndNum]->pMdiTextEdit->buffer+DelRange.cpMax, 135 135 delta); 136 memcpy(MdiInfo[WndNum] .pMdiTextEdit->buffer+Range.cpMin,str,lstrlen(str));136 memcpy(MdiInfo[WndNum]->pMdiTextEdit->buffer+Range.cpMin,str,lstrlen(str)); 137 137 138 138 //文字カラーバッファをスライド 139 SlideBuffer(((char *)MdiInfo[WndNum] .pMdiTextEdit->pColorRef)+DelRange.cpMax*sizeof(COLORREF),139 SlideBuffer(((char *)MdiInfo[WndNum]->pMdiTextEdit->pColorRef)+DelRange.cpMax*sizeof(COLORREF), 140 140 (length-DelRange.cpMax) * sizeof(COLORREF), 141 141 delta*sizeof(COLORREF)); 142 142 //色づけ 143 TextEdit_ResetWordColor(WndNum,&Range,MdiInfo[WndNum] .DocType);143 TextEdit_ResetWordColor(WndNum,&Range,MdiInfo[WndNum]->DocType); 144 144 145 145 //新しいキャレット位置に変更 146 GetCaretPosFromBufferIndex(MdiInfo[WndNum] .pMdiTextEdit->buffer,146 GetCaretPosFromBufferIndex(MdiInfo[WndNum]->pMdiTextEdit->buffer, 147 147 Range.cpMax, 148 &MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos);149 MdiInfo[WndNum] .pMdiTextEdit->EndCaretPos=MdiInfo[WndNum].pMdiTextEdit->StartCaretPos;148 &MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos); 149 MdiInfo[WndNum]->pMdiTextEdit->EndCaretPos=MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos; 150 150 151 151 //コントロールタブスペースの幅と行番号の文字数を更新 152 MdiInfo[WndNum] .pMdiTextEdit->iWidth_ControlTabSpace=153 GetControlTabSpace(WndNum,&MdiInfo[WndNum] .pMdiTextEdit->iLineNumberTextCount);152 MdiInfo[WndNum]->pMdiTextEdit->iWidth_ControlTabSpace= 153 GetControlTabSpace(WndNum,&MdiInfo[WndNum]->pMdiTextEdit->iLineNumberTextCount); 154 154 155 155 if(bRedraw){ … … 159 159 160 160 if(!TextEdit_ScrollCaret(WndNum,0)){ 161 UpdateWindow(MdiInfo[WndNum] .pMdiTextEdit->hEdit); //ちらつき防止162 InvalidateRect(MdiInfo[WndNum] .pMdiTextEdit->hEdit,NULL,0);161 UpdateWindow(MdiInfo[WndNum]->pMdiTextEdit->hEdit); //ちらつき防止 162 InvalidateRect(MdiInfo[WndNum]->pMdiTextEdit->hEdit,NULL,0); 163 163 } 164 164 … … 167 167 168 168 //上下キャレット移動時の左右位置保持機能を解除 169 MdiInfo[WndNum] .pMdiTextEdit->Temp_UpDown_CaretXPos=-1;169 MdiInfo[WndNum]->pMdiTextEdit->Temp_UpDown_CaretXPos=-1; 170 170 171 171 //編集メニューをリセット 172 172 ResetState_EditMenu(); 173 173 174 if( ! MdiInfo[WndNum] .pMdiTextEdit->IsModified() ){174 if( ! MdiInfo[WndNum]->pMdiTextEdit->IsModified() ){ 175 175 //変更フラグをセット 176 MdiInfo[WndNum] .pMdiTextEdit->Modify();176 MdiInfo[WndNum]->pMdiTextEdit->Modify(); 177 177 } 178 178 … … 180 180 //if( projectInfo.IsOpened() ){ 181 181 //プロジェクトが開かれているとき 182 if(MdiInfo[WndNum] .DocType==WNDTYPE_BASIC){182 if(MdiInfo[WndNum]->DocType==WNDTYPE_BASIC){ 183 183 //クラスツリーを再表示 184 184 ResetClassTree(GetFileNum(WndNum)); … … 193 193 CHARRANGE Range,DelRange; 194 194 195 if(MdiInfo[WndNum] .IndentStr){195 if(MdiInfo[WndNum]->IndentStr){ 196 196 //自動インデントを有効にする 197 lstrcpy(temporary,MdiInfo[WndNum] .IndentStr);197 lstrcpy(temporary,MdiInfo[WndNum]->IndentStr); 198 198 199 199 CancelBeforeAutoIndent(WndNum); … … 246 246 #endif 247 247 char *pBuf; 248 pBuf=MdiInfo[WndNum] .pMdiTextEdit->buffer;248 pBuf=MdiInfo[WndNum]->pMdiTextEdit->buffer; 249 249 250 250 //行全体を選択(min) … … 271 271 buffer=(char *)HeapAlloc(hHeap,0,length*3+1024); 272 272 temporary=(char *)HeapAlloc(hHeap,0,length*3+1024); 273 memcpy(buffer,MdiInfo[WndNum] .pMdiTextEdit->buffer+CharRange.cpMin,length);273 memcpy(buffer,MdiInfo[WndNum]->pMdiTextEdit->buffer+CharRange.cpMin,length); 274 274 buffer[length]=0; 275 275
Note:
See TracChangeset
for help on using the changeset viewer.