[Libreoffice-commits] .: 2 commits - svtools/source

Takeshi Abe tabe at kemper.freedesktop.org
Wed May 9 07:29:51 PDT 2012


 svtools/source/dialogs/filedlg2.cxx         |   11 --------
 svtools/source/edit/textdata.cxx            |   13 ---------
 svtools/source/edit/textdoc.hxx             |    6 ----
 svtools/source/edit/texteng.cxx             |   32 ------------------------
 svtools/source/edit/textund2.hxx            |   20 ---------------
 svtools/source/edit/textview.cxx            |   37 ----------------------------
 svtools/source/filter/FilterConfigCache.cxx |    5 ---
 svtools/source/filter/ixbm/xbmread.cxx      |    2 -
 svtools/source/filter/wmf/winmtf.cxx        |    2 -
 svtools/source/graphic/grfmgr2.cxx          |    1 
 svtools/source/hatchwindow/ipwin.cxx        |   34 -------------------------
 svtools/source/misc/wallitem.cxx            |   10 -------
 svtools/source/svrtf/parrtf.cxx             |   34 -------------------------
 svtools/source/svrtf/svparser.cxx           |    8 ------
 svtools/source/uno/treecontrolpeer.cxx      |    2 -
 15 files changed, 1 insertion(+), 216 deletions(-)

New commits:
commit d7f5dcbc413b4bf89a70fc25a20533323840b63c
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed May 9 23:27:45 2012 +0900

    removed unused defines
    
    Change-Id: Ife6ba8104a3af79aa5d62509755b9d2c58d98e3a

diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx
index d16f65a..2b74255 100644
--- a/svtools/source/dialogs/filedlg2.cxx
+++ b/svtools/source/dialogs/filedlg2.cxx
@@ -52,17 +52,6 @@ using namespace com::sun::star::uno;
 
 typedef ::std::vector< UniString* > UniStringList;
 
-#define STD_BTN_WIDTH   80
-#define STD_BTN_HEIGHT  26
-
-#ifndef UNX
-    #define ALLFILES                "*.*"
-#else
-    #define ALLFILES                "*"
-#endif
-//      #define STD_BTN_WIDTH   90
-//      #define STD_BTN_HEIGHT  35
-
 #define INITCONTROL( p, ControlClass, nBits, aPos, aSize, aTitel, rHelpId ) \
     p = new ControlClass( GetPathDialog(), WinBits( nBits ) ); \
     p->SetHelpId( rHelpId ); \
diff --git a/svtools/source/edit/texteng.cxx b/svtools/source/edit/texteng.cxx
index f629ff6..fa62f3f 100644
--- a/svtools/source/edit/texteng.cxx
+++ b/svtools/source/edit/texteng.cxx
@@ -72,10 +72,6 @@ using namespace ::rtl;
 
 typedef TextView* TextViewPtr;
 SV_DECL_PTRARR( TextViews, TextViewPtr, 0 )
-// SV_IMPL_PTRARR( TextViews, TextViewPtr );
-
-#define RESDIFF     10
-#define SCRLRANGE   20      // 1/20 der Breite/Hoehe scrollen, wenn im QueryDrop
 
 
 // -------------------------------------------------------------------------
diff --git a/svtools/source/filter/FilterConfigCache.cxx b/svtools/source/filter/FilterConfigCache.cxx
index 66ffb8d..c7bd37c 100644
--- a/svtools/source/filter/FilterConfigCache.cxx
+++ b/svtools/source/filter/FilterConfigCache.cxx
@@ -34,11 +34,6 @@
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 
-#define TOKEN_COUNT_FOR_OWN_FILTER      3
-// #define TOKEN_INDEX_FOR_IDENT          0
-#define TOKEN_INDEX_FOR_FILTER          1
-// #define TOKEN_INDEX_FOR_HASDIALOG      2
-
 using namespace ::com::sun::star::lang          ;   // XMultiServiceFactory
 using namespace ::com::sun::star::container     ;   // XNameAccess
 using namespace ::com::sun::star::uno           ;   // Reference
diff --git a/svtools/source/filter/ixbm/xbmread.cxx b/svtools/source/filter/ixbm/xbmread.cxx
index 84a8b02..1b79c3f 100644
--- a/svtools/source/filter/ixbm/xbmread.cxx
+++ b/svtools/source/filter/ixbm/xbmread.cxx
@@ -27,8 +27,6 @@
  ************************************************************************/
 
 
-#define XBMMINREAD 512
-
 #define _XBMPRIVATE
 #include <ctype.h>
 #include <comphelper/string.hxx>
diff --git a/svtools/source/filter/wmf/winmtf.cxx b/svtools/source/filter/wmf/winmtf.cxx
index 6abf445..2968ec1 100644
--- a/svtools/source/filter/wmf/winmtf.cxx
+++ b/svtools/source/filter/wmf/winmtf.cxx
@@ -41,8 +41,6 @@
 
 // ------------------------------------------------------------------------
 
-#define WIN_MTF_MAX_CLIP_DEPTH 16
-
 #if OSL_DEBUG_LEVEL > 1
 #define EMFP_DEBUG(x) x
 #else
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 35de9a6..1967e44 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -44,7 +44,6 @@
 // - defines -
 // -----------
 
-#define MAX_PRINTER_EXT             1024
 #define MAP( cVal0, cVal1, nFrac )  ((sal_uInt8)((((long)(cVal0)<<20L)+nFrac*((long)(cVal1)-(cVal0)))>>20L))
 #define WATERMARK_LUM_OFFSET        50
 #define WATERMARK_CON_OFFSET        -70
diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx
index 7c70608..1d0fb8e 100644
--- a/svtools/source/svrtf/svparser.cxx
+++ b/svtools/source/svrtf/svparser.cxx
@@ -34,14 +34,6 @@
 #include <rtl/textcvt.h>
 #include <rtl/tencinfo.h>
 
-#define SVPAR_CSM_
-
-#define SVPAR_CSM_ANSI      0x0001U
-#define SVPAR_CSM_UTF8      0x0002U
-#define SVPAR_CSM_UCS2B     0x0004U
-#define SVPAR_CSM_UCS2L     0x0008U
-#define SVPAR_CSM_SWITCH    0x8000U
-
 // Struktur, um sich die akt. Daten zumerken
 struct SvParser_Impl
 {
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index 67dab97..aea3cd6 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -56,8 +56,6 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::graphic;
 
-#define O(x) OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
-
 struct LockGuard
 {
 public:
commit f4cd393736505f2426c64740c156543a481dd41d
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed May 9 23:26:39 2012 +0900

    removed dead code
    
    Change-Id: Ifaa3e07c98cea3de51d715e0eb7657a0896e77eb

diff --git a/svtools/source/edit/textdata.cxx b/svtools/source/edit/textdata.cxx
index 894887d..6d61ee1 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 eb738d1..9fb6b41 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 04b6d8d..f629ff6 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 63937c3..d736932 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 7e2955d..75dbb5f 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 2257ca9..af31587 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 2834d64..25da4aa 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 b804845..c371911 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;


More information about the Libreoffice-commits mailing list