summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-05-09 23:26:39 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-05-09 23:28:36 +0900
commitf4cd393736505f2426c64740c156543a481dd41d (patch)
treeb370350c8bc34bcf8ef92e2c4c6921a3c6dafcc1 /svtools
parente636c23bb9247325fba469612843399732ed4cd0 (diff)
removed dead code
Change-Id: Ifaa3e07c98cea3de51d715e0eb7657a0896e77eb
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/edit/textdata.cxx13
-rw-r--r--svtools/source/edit/textdoc.hxx6
-rw-r--r--svtools/source/edit/texteng.cxx28
-rw-r--r--svtools/source/edit/textund2.hxx20
-rw-r--r--svtools/source/edit/textview.cxx37
-rw-r--r--svtools/source/hatchwindow/ipwin.cxx34
-rw-r--r--svtools/source/misc/wallitem.cxx10
-rw-r--r--svtools/source/svrtf/parrtf.cxx34
8 files changed, 1 insertions, 181 deletions
diff --git a/svtools/source/edit/textdata.cxx b/svtools/source/edit/textdata.cxx
index 894887d3e81b..6d61ee1232eb 100644
--- a/svtools/source/edit/textdata.cxx
+++ b/svtools/source/edit/textdata.cxx
@@ -113,19 +113,6 @@ sal_uInt16 TETextPortionList::FindPortion( sal_uInt16 nCharPos, sal_uInt16& nPor
return ( Count() - 1 );
}
-/*
-sal_uInt16 TETextPortionList::GetPortionStartIndex( sal_uInt16 nPortion )
-{
- sal_uInt16 nPos = 0;
- for ( sal_uInt16 nP = 0; nP < nPortion; nP++ )
- {
- TETextPortion* pPortion = GetObject( nP );
- nPos += pPortion->GetLen();
- }
- return nPos;
-}
-*/
-
// -------------------------------------------------------------------------
// (+) class TEParaPortion
diff --git a/svtools/source/edit/textdoc.hxx b/svtools/source/edit/textdoc.hxx
index eb738d1880cb..9fb6b41d212c 100644
--- a/svtools/source/edit/textdoc.hxx
+++ b/svtools/source/edit/textdoc.hxx
@@ -131,12 +131,6 @@ public:
void SetLeftMargin( sal_uInt16 n ) { mnLeftMargin = n; }
sal_uInt16 GetLeftMargin() const { return mnLeftMargin; }
-// sal_Bool RemoveAttribs( TextNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd ), sal_uInt16 nWhich = 0 );
-// sal_Bool RemoveAttribs( TextNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, TextCharAttrib*& rpStarting, TextCharAttrib*& rpEnding, sal_uInt16 nWhich = 0 );
-// void InsertAttrib( const EditCharAttrib* pAttr );
-// void InsertAttribInSelection( const EditCharAttrib* pAttr );
-// void FindAttribs( TextNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, SfxItemSet& rCurSet );
-
sal_Bool IsValidPaM( const TextPaM& rPaM );
};
diff --git a/svtools/source/edit/texteng.cxx b/svtools/source/edit/texteng.cxx
index 04b6d8d91fd7..f629ff68d6d2 100644
--- a/svtools/source/edit/texteng.cxx
+++ b/svtools/source/edit/texteng.cxx
@@ -523,16 +523,9 @@ void TextEngine::ImpRemoveChars( const TextPaM& rPaM, sal_uInt16 nChars, SfxUndo
TextCharAttrib* pAttr = pNode->GetCharAttribs().GetAttrib( --nAttr );
if ( ( pAttr->GetEnd() >= nStart ) && ( pAttr->GetStart() < nEnd ) )
{
-// TextSelection aSel( rPaM );
-// aSel.GetEnd().GetIndex() += nChars;
-// TextUndoSetAttribs* pAttrUndo = CreateAttribUndo( aSel );
-// InsertUndo( pAttrUndo );
break; // for
}
}
-// if ( pCurUndo && ( CreateTextPaM( pCurUndo->GetEPaM() ) == rPaM ) )
-// pCurUndo->GetStr() += aStr;
-// else
InsertUndo( new TextUndoRemoveChars( this, rPaM, aStr ) );
}
@@ -1920,9 +1913,6 @@ void TextEngine::RecalcTextPortion( sal_uLong nPara, sal_uInt16 nStartPos, short
sal_uInt16 nNewPortionPos = 0;
if ( nStartPos )
nNewPortionPos = SplitTextPortion( nPara, nStartPos ) + 1;
-// else if ( ( pTEParaPortion->GetTextPortions().Count() == 1 ) &&
-// !pTEParaPortion->GetTextPortions()[0]->GetLen() )
-// pTEParaPortion->GetTextPortions().Reset(); // DummyPortion
// Eine leere Portion kann hier stehen, wenn der Absatz leer war,
// oder eine Zeile durch einen harten Zeilenumbruch entstanden ist.
@@ -2833,14 +2823,6 @@ void TextEngine::ImpParagraphInserted( sal_uLong nPara )
TextView* pView = mpViews->GetObject( --nView );
if ( pView != GetActiveView() )
{
-// sal_Bool bInvers = pView->maSelection.GetEnd() < pView->maSelection.GetStart();
-// TextPaM& rMin = !bInvers ? pView->maSelection.GetStart(): pView->maSelection.GetEnd();
-// TextPaM& rMax = bInvers ? pView->maSelection.GetStart() : pView->maSelection.GetEnd();
-//
-// if ( rMin.GetPara() >= nPara )
-// rMin.GetPara()++;
-// if ( rMax.GetPara() >= nPara )
-// rMax.GetPara()++;
for ( int n = 0; n <= 1; n++ )
{
TextPaM& rPaM = n ? pView->GetSelection().GetStart(): pView->GetSelection().GetEnd();
@@ -3142,16 +3124,6 @@ long TextEngine::ImpGetPortionXOffset( sal_uLong nPara, TextLine* pLine, sal_uIn
}
}
}
-/*
- if ( IsRightToLeft() )
- {
- // Switch X postions...
- DBG_ASSERT( GetMaxTextWidth(), "GetPortionXOffset - max text width?!" );
- DBG_ASSERT( nX <= (long)GetMaxTextWidth(), "GetPortionXOffset - position out of paper size!" );
- nX = GetMaxTextWidth() - nX;
- nX -= pDestPortion->GetWidth();
- }
-*/
return nX;
}
diff --git a/svtools/source/edit/textund2.hxx b/svtools/source/edit/textund2.hxx
index 63937c31e0e8..d736932ba6d6 100644
--- a/svtools/source/edit/textund2.hxx
+++ b/svtools/source/edit/textund2.hxx
@@ -90,9 +90,6 @@ public:
TYPEINFO();
TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const String& rStr );
-// const TextPaM& GetTextPaM() { return aTextPaM; }
-// String& GetStr() { return aText; }
-
virtual void Undo();
virtual void Redo();
@@ -110,9 +107,6 @@ public:
TYPEINFO();
TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const String& rStr );
-// const TextPaM& GetTextPaM() { return aTextPaM; }
-// String& GetStr() { return aText; }
-
virtual void Undo();
virtual void Redo();
};
@@ -122,26 +116,12 @@ class TextUndoSetAttribs: public TextUndo
{
private:
TextSelection maSelection;
-// SfxItemSet aNewAttribs;
-// TextInfoArray aPrevAttribs;
-// sal_uInt8 nSpecial;
-// sal_Bool bSetIsRemove;
-// sal_uInt16 nRemoveWhich;
-//
-// void ImpSetSelection( TextView* pView );
-
public:
TYPEINFO();
TextUndoSetAttribs( TextEngine* pTextEngine, const TextSelection& rESel );
~TextUndoSetAttribs();
-// TextInfoArray& GetTextInfos() { return aPrevAttribs; }
-// SfxItemSet& GetNewAttribs() { return aNewAttribs; }
-// void SetSpecial( sal_uInt8 n ) { nSpecial = n; }
-// void SetRemoveAttribs( sal_Bool b ) { bSetIsRemove = b; }
-// void SetRemoveWhich( sal_uInt16 n ) { nRemoveWhich = n; }
-
virtual void Undo();
virtual void Redo();
};
diff --git a/svtools/source/edit/textview.cxx b/svtools/source/edit/textview.cxx
index 7e2955dd23ed..75dbb5f77539 100644
--- a/svtools/source/edit/textview.cxx
+++ b/svtools/source/edit/textview.cxx
@@ -1397,33 +1397,6 @@ void TextView::InsertNewText( const rtl::OUString& rStr, sal_Bool bSelect )
mpImpl->mpTextEngine->FormatAndUpdate( this );
}
-/*
-void TextView::InsertText( const XubString& rStr, sal_Bool bSelect )
-{
-// HideSelection();
-
- TextSelection aNewSel( mpImpl->maSelection );
-
- mpImpl->mpTextEngine->UndoActionStart();
- TextPaM aPaM = mpImpl->mpTextEngine->ImpInsertText( mpImpl->maSelection, rStr );
- mpImpl->mpTextEngine->UndoActionEnd();
-
- if ( bSelect )
- {
- aNewSel.Justify();
- aNewSel.GetEnd() = aPaM;
- }
- else
- {
- aNewSel = aPaM;
- }
-
- ImpSetSelection( aNewSel );
-
- mpImpl->mpTextEngine->FormatAndUpdate( this );
-}
-*/
-
TextPaM TextView::CursorLeft( const TextPaM& rPaM, sal_uInt16 nCharacterIteratorMode )
{
TextPaM aPaM( rPaM );
@@ -2237,16 +2210,6 @@ void TextView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDr
Point aDocPos = GetDocPos( aMousePos );
mpImpl->mpDDInfo->maDropPos = mpImpl->mpTextEngine->GetPaM( aDocPos );
-/*
- Size aOutSize = mpImpl->mpWindow->GetOutputSizePixel();
- if ( ( aMousePos.X() < 0 ) || ( aMousePos.X() > aOutSize.Width() ) ||
- ( aMousePos.Y() < 0 ) || ( aMousePos.Y() > aOutSize.Height() ) )
- {
- // Scroll?
- // No, I will not receive events for this...
- }
-*/
-
sal_Bool bProtected = sal_False;
if(mpImpl->mbSupportProtectAttribute)
{
diff --git a/svtools/source/hatchwindow/ipwin.cxx b/svtools/source/hatchwindow/ipwin.cxx
index 2257ca9e841e..af315879a71f 100644
--- a/svtools/source/hatchwindow/ipwin.cxx
+++ b/svtools/source/hatchwindow/ipwin.cxx
@@ -300,40 +300,6 @@ Rectangle SvResizeHelper::GetTrackRectPixel( const Point & rTrackPos ) const
aDiff.X() = -aDiff.X(); // workaround for move in RTL mode
aTrackRect.SetPos( aTrackRect.TopLeft() + aDiff );
break;
-/*
- case 0:
- aTrackRect = Rectangle( rTrackPos, aOuter.BottomRight() );
- break;
- case 1:
- aTrackRect = Rectangle( Point( aOuter.Left(), rTrackPos.Y() ),
- aOuter.BottomRight() );
- break;
- case 2:
- aTrackRect = Rectangle( rTrackPos, aOuter.BottomLeft() );
- break;
- case 3:
- aTrackRect = Rectangle( Point( rTrackPos.X(), aOuter.Top() ),
- aOuter.BottomLeft() );
- break;
- case 4:
- aTrackRect = Rectangle( rTrackPos, aOuter.TopLeft() );
- break;
- case 5:
- aTrackRect = Rectangle( aOuter.TopLeft(),
- Point( aOuter.Right(), rTrackPos.Y() ) );
- break;
- case 6:
- aTrackRect = Rectangle( aOuter.TopRight(), rTrackPos );
- break;
- case 7:
- aTrackRect = Rectangle( Point( rTrackPos.X(), aOuter.Top() ),
- aOuter.BottomRight() );
- break;
- case 8:
- aTrackRect = Rectangle( aOuter.TopLeft() + rTrackPos - aSelPos,
- aOuter.GetSize() );
- break;
-*/
}
}
return aTrackRect;
diff --git a/svtools/source/misc/wallitem.cxx b/svtools/source/misc/wallitem.cxx
index 2834d6443975..25da4aa55b75 100644
--- a/svtools/source/misc/wallitem.cxx
+++ b/svtools/source/misc/wallitem.cxx
@@ -49,14 +49,4 @@ SfxBrushItemLink::~SfxBrushItemLink()
{
}
-//static
-/*void SfxBrushItemLink::Set( SfxBrushItemLink* pLink )
-{
- SfxBrushItemLink** ppLink = (SfxBrushItemLink**)GetAppData(SHL_BRUSHITEM);
- if( !*ppLink )
- *ppLink = pLink;
- else
- delete pLink;
-}*/
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx
index b804845273fc..c371911c91e4 100644
--- a/svtools/source/svrtf/parrtf.cxx
+++ b/svtools/source/svrtf/parrtf.cxx
@@ -169,17 +169,9 @@ int SvRTFParser::_GetNextToken()
if( 0 <= nTokenValue )
{
nUCharOverread = (sal_uInt8)nTokenValue;
-#if 1
//cmc: other ifdef breaks #i3584
aParserStates.top().
nUCharOverread = nUCharOverread;
-#else
- if( !nUCharOverread )
- nUCharOverread = aParserStates.top().nUCharOverread;
- else
- aParserStates.top().
- nUCharOverread = nUCharOverread;
-#endif
}
aToken.Erase(); // #i47831# erase token to prevent the token from beeing treated as text
// read next token
@@ -521,7 +513,7 @@ short nBrackets=1;
if (_inSkipGroup>0)
return;
_inSkipGroup++;
-#if 1 //#i16185# fecking \bin keyword
+//#i16185# fecking \bin keyword
do
{
switch (nNextCh)
@@ -548,30 +540,6 @@ _inSkipGroup++;
nNextCh = GetNextChar();
}
} while (sal_Unicode(EOF) != nNextCh && IsParserWorking());
-#else
- sal_Unicode cPrev = 0;
- do {
- switch( nNextCh )
- {
- case '{':
- if( '\\' != cPrev )
- ++nBrackets;
- break;
-
- case '}':
- if( '\\' != cPrev && !--nBrackets )
- return;
- break;
-
- case '\\':
- if( '\\' == cPrev )
- nNextCh = 0;
- break;
- }
- cPrev = nNextCh;
- nNextCh = GetNextChar();
- } while( sal_Unicode(EOF) != nNextCh && IsParserWorking() );
-#endif
if( SVPAR_PENDING != eState && '}' != nNextCh )
eState = SVPAR_ERROR;