From: <bl...@us...> - 2003-05-15 20:04:20
|
Update of /cvsroot/cpptool/rfta/src/rftavc7addin In directory sc8-pr-cvs1:/tmp/cvs-serv22106/src/rftavc7addin Modified Files: TextDocumentHelper.cpp TextDocumentHelper.h TextSelectionHelper.cpp TextSelectionHelper.h Log Message: * removed dead code Index: TextDocumentHelper.cpp =================================================================== RCS file: /cvsroot/cpptool/rfta/src/rftavc7addin/TextDocumentHelper.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TextDocumentHelper.cpp 14 May 2003 18:55:50 -0000 1.1 --- TextDocumentHelper.cpp 15 May 2003 19:29:33 -0000 1.2 *************** *** 36,48 **** - void - TextDocumentHelper::discardingClose() - { - CComPtr<EnvDTE::Document> document; - _document->get_Parent( &document ); - document->Close( EnvDTE::vsSaveChangesNo ); - } - - int TextDocumentHelper::getTabSize() const --- 36,39 ---- *************** *** 52,72 **** return tabSize; } - /* - - bool - TextDocumentHelper::redo() const - { - VARIANT_BOOL success; - _document->Redo( &success ); - return success != 0; - } - - - bool - TextDocumentHelper::undo() const - { - VARIANT_BOOL success; - _document->Undo( &success ); - return success != 0; - } - */ \ No newline at end of file --- 43,44 ---- Index: TextDocumentHelper.h =================================================================== RCS file: /cvsroot/cpptool/rfta/src/rftavc7addin/TextDocumentHelper.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TextDocumentHelper.h 14 May 2003 18:55:50 -0000 1.1 --- TextDocumentHelper.h 15 May 2003 19:29:33 -0000 1.2 *************** *** 26,39 **** TextSelectionHelper selection() const; - // EditPointHelper createEditPoint() const; - - void discardingClose(); - int getTabSize() const; - /* - bool undo() const; - bool redo() const; - */ private: CComPtr<EnvDTE::TextDocument> _document; --- 26,31 ---- Index: TextSelectionHelper.cpp =================================================================== RCS file: /cvsroot/cpptool/rfta/src/rftavc7addin/TextSelectionHelper.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TextSelectionHelper.cpp 14 May 2003 18:55:50 -0000 1.1 --- TextSelectionHelper.cpp 15 May 2003 19:29:33 -0000 1.2 *************** *** 28,142 **** int - TextSelectionHelper::currentColumn() - { - long column; - _selection->get_CurrentColumn( &column ); - return column; - } - - - int - TextSelectionHelper::currentLine() - { - long line; - _selection->get_CurrentLine( &line ); - return line; - } - - - int - TextSelectionHelper::selectionTopLine() - { - long beginLine; - _selection->get_TopLine( &beginLine ); - return beginLine; - } - - - int - TextSelectionHelper::selectionBottomLine() - { - long endLine; - _selection->get_BottomLine( &endLine ); - return endLine; - } - - - CString - TextSelectionHelper::text() - { - CComBSTR text; - _selection->get_Text( &text ); - - CString toNormalize( text ); - return toNormalize; - /* - CString normalized; - for ( int index = 0; index < toNormalize.GetLength(); ++index ) - { - if ( toNormalize.GetAt( index ) != '\r' ) - normalized += toNormalize.GetAt( index ); - } - return normalized; - */ - } - - - void - TextSelectionHelper::setText( const CString &newText ) - { - /* - CString normalizedText; - for ( int index =0; index < newText.GetLength(); ++index ) - { - if ( newText.GetAt( index ) == '\n' ) - normalizedText += '\r'; - normalizedText += newText.GetAt( index ); - } - - CComBSTR unicodeText( normalizedText ); - */ - CComBSTR unicodeText( newText ); - // if ( newText.GetLength() > 0 ) - // _selection->Delete( CComVariant(1) ); - _selection->put_Text( unicodeText ); - } - - - void - TextSelectionHelper::selectAll() - { - _selection->SelectAll(); - } - - - void - TextSelectionHelper::cancelSelection() - { - _selection->Cancel(); - } - - /* - void - TextSelectionHelper::goToLine( int lineNumber, - bool selectLine ) - { - _selection->GoToLine( lineNumber, selectLine ? CComVariant(1) : - CComVariant(0) ); - } - - - void - TextSelectionHelper::moveTo( int lineNumber, - int columnNumber, - bool extendSelection ) - { - _selection->MoveTo( lineNumber, - columnNumber, - CComVariant(extendSelection ? dsExtend : dsMove) ); - } - */ - - int TextSelectionHelper::selectionStartCharOffset() { --- 28,31 ---- *************** *** 153,179 **** TextSelectionHelper::selectionEndCharOffset() { - /* - { - CComPtr<EnvDTE::VirtualPoint> point; - CComPtr<EnvDTE::VirtualPoint> point1; - CComPtr<EnvDTE::VirtualPoint> point2; - CComPtr<EnvDTE::VirtualPoint> point3; - long bottom; - long active; - long anchor; - long top; - _selection->get_BottomPoint( &point ); - point->get_AbsoluteCharOffset( &bottom ); - - _selection->get_ActivePoint( &point1 ); - point1->get_AbsoluteCharOffset( &active ); - - _selection->get_AnchorPoint( &point2 ); - point2->get_AbsoluteCharOffset( &anchor ); - - _selection->get_TopPoint( &point3 ); - point3->get_AbsoluteCharOffset( &top ); - } - */ CComPtr<EnvDTE::VirtualPoint> point; _selection->get_BottomPoint( &point ); --- 42,45 ---- Index: TextSelectionHelper.h =================================================================== RCS file: /cvsroot/cpptool/rfta/src/rftavc7addin/TextSelectionHelper.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TextSelectionHelper.h 14 May 2003 18:55:50 -0000 1.1 --- TextSelectionHelper.h 15 May 2003 19:29:33 -0000 1.2 *************** *** 20,52 **** bool isValid(); - // End of selection column - int currentColumn(); - - // End of selection line - int currentLine(); - - // Start of selection line. - int selectionTopLine(); - - // End of selection line. - int selectionBottomLine(); - - /*! Returns selected text. - * Returns selected text as contains in the file. \r\n for EOL of - * DOS file, \n for EOL of Unix file, and \r for EOL of Mac file. - */ - CString text(); - void setText( const CString &text ); - - void selectAll(); - void cancelSelection(); - /* - void goToLine( int lineNumber, - bool selectLine = true ); - - void moveTo( int lineNumber, - int columnNumber, - bool extendSelection =false ); - */ /// zero based index int selectionStartCharOffset(); --- 20,23 ---- |