[Libreoffice-commits] .: 14 commits - starmath/source sw/source
Thomas Arnhold
tarnhold at kemper.freedesktop.org
Sun Jan 23 23:35:42 PST 2011
starmath/source/dialog.cxx | 5
sw/source/core/inc/rootfrm.hxx | 4
sw/source/core/layout/ftnfrm.cxx | 23 ---
sw/source/core/layout/paintfrm.cxx | 45 ------
sw/source/core/table/swnewtable.cxx | 148 -------------------
sw/source/core/text/txtdrop.cxx | 11 -
sw/source/core/text/txtfly.cxx | 4
sw/source/core/text/txthyph.cxx | 11 -
sw/source/core/text/txtio.cxx | 215 -----------------------------
sw/source/core/txtnode/fntcache.cxx | 57 -------
sw/source/core/txtnode/ndhints.cxx | 66 --------
sw/source/core/txtnode/ndtxt.cxx | 38 -----
sw/source/core/txtnode/txtedt.cxx | 81 ----------
sw/source/ui/docvw/edtwin.cxx | 17 --
sw/source/ui/docvw/edtwin2.cxx | 10 -
sw/source/ui/uiview/formatclipboard.cxx | 25 ---
sw/source/ui/vba/vbadocument.cxx | 9 -
sw/source/ui/vba/vbafind.cxx | 7
sw/source/ui/vba/vbafind.hxx | 3
sw/source/ui/vba/vbaheaderfooterhelper.cxx | 19 --
sw/source/ui/vba/vbaheaderfooterhelper.hxx | 4
sw/source/ui/vba/vbarange.cxx | 67 ---------
sw/source/ui/vba/vbarange.hxx | 3
23 files changed, 6 insertions(+), 866 deletions(-)
New commits:
commit a81ace2dbc49778cf71d278199483c2503c380ad
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Jan 24 01:49:58 2011 +0100
Remove some more dead code.
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index bcccf16..39d8259 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -2144,9 +2144,6 @@ short SmSymDefineDialog::Execute()
void SmSymDefineDialog::SetSymbolSetManager(const SmSymbolManager &rMgr)
{
aSymbolMgrCopy = rMgr;
-#ifdef DEBUG
-// USHORT nS = aSymbolMgrCopy.GetSymbolSetCount();
-#endif
// Das modified Flag der Kopie auf false setzen, damit man spaeter damit
// testen kann ob sich was geaendert hat.
@@ -2339,7 +2336,7 @@ void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rSt
if (pSubsetMap)
delete pSubsetMap;
pSubsetMap = new SubsetMap( &aFontCharMap );
- //
+
aFontsSubsetLB.Clear();
bool bFirst = true;
const Subset* pSubset;
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index 2d85886..89c73b4 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -299,10 +299,6 @@ public:
void SetBrowseWidth( long n ) { bBrowseWidthValid = TRUE; nBrowseWidth = n;}
inline void InvalidateBrowseWidth();
-#ifdef LONG_TABLE_HACK
- void HackPrepareLongTblPaint( int nMode );
-#endif
-
BOOL IsNewLayout() const { return bIsNewLayout; }
void ResetNewLayout() { bIsNewLayout = FALSE;}
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 0f07573..821f899 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -81,10 +81,6 @@
#include "viewopt.hxx" // SwViewOptions, nur zum Testen (Test2)
#endif
-#ifdef VERT_DISTANCE
-#include <math.h>
-#endif
-
using namespace ::com::sun::star;
commit c25c67e60c0a184be69b2e7e408106921eef210a
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Jan 24 01:49:28 2011 +0100
Remove FONT_TEST_DEBUG, COMING_SOON and some more dead code.
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 59e1772..c9fd7a6 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1450,21 +1450,8 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
}
else
{
-// BOOL bRestore = FALSE;
-// MapMode aOld( rInf.GetOut().GetMapMode() );
-// if( rInf.GetZoom().GetNumerator() &&
-// rInf.GetZoom() != aOld.GetScaleX() )
-// {
-// MapMode aNew( aOld );
-// aNew.SetScaleX( rInf.GetZoom() );
-// aNew.SetScaleY( rInf.GetZoom() );
-// rInf.GetOut().SetMapMode( aNew );
-// bRestore = TRUE;
-// }
rInf.GetOut().GetTextArray( rInf.GetText(), pKernArray,
rInf.GetIdx(), rInf.GetLen() );
-// if( bRestore )
-// rInf.GetOut().SetMapMode( aOld );
}
//
@@ -1637,11 +1624,8 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// linksbuendig zur Druckerposition.
if ( nCh == CH_BLANK )
{
-#ifdef FONT_TEST_DEBUG
- lcl_Pos( 3, nScrPos, nScr, pKernArray[i-1], pKernArray[i] );
-#else
nScrPos = pKernArray[i-1] + nScr;
-#endif
+
if ( cChPrev == CH_BLANK )
nSpaceSum += nOtherHalf;
if ( i + 1 == nCnt )
@@ -1653,28 +1637,17 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
{
if ( cChPrev == CH_BLANK )
{
-#ifdef FONT_TEST_DEBUG
- lcl_Pos( 6, nScrPos, nScr, pKernArray[i-1], pKernArray[i] );
-#else
nScrPos = pKernArray[i-1] + nScr;
-#endif
+
// kein Pixel geht verloren:
nSpaceSum += nOtherHalf;
}
else if ( cChPrev == '-' )
-#ifdef FONT_TEST_DEBUG
- lcl_Pos( 6, nScrPos, nScr, pKernArray[i-1], pKernArray[i] );
-#else
nScrPos = pKernArray[i-1] + nScr;
-#endif
else
{
-#ifdef FONT_TEST_DEBUG
- lcl_Pos( 0, nScrPos, nScr, pKernArray[i-1], pKernArray[i] );
-#else
nScrPos += nScr;
nScrPos = ( nMul * nScrPos + pKernArray[i] ) / nDiv;
-#endif
}
}
cChPrev = nCh;
@@ -1786,31 +1759,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
xub_StrLen nOffs = 0;
xub_StrLen nLen = rInf.GetLen();
-#ifdef COMING_SOON
- if( aPos.X() < rInf.GetLeft() )
- {
- while( nOffs < nLen &&
- aPos.X() + pKernArray[ nOffs ] < rInf.GetLeft() )
- ++nOffs;
- if( nOffs < nLen )
- {
- --nLen;
- while( nLen > nOffs &&
- aPos.X() + pKernArray[ nLen ] > rInf.GetRight() )
- --nLen;
- ++nLen;
- if( nOffs )
- --nOffs;
- }
- if( nOffs )
- {
- long nDiff = pKernArray[ nOffs - 1 ];
- aPos.X() += nDiff;
- for( xub_StrLen nX = nOffs; nX < nLen; ++nX )
- pKernArray[ nX ] -= nDiff;
- }
- }
-#endif
+
if( nOffs < nLen )
{
// If we paint bullets instead of spaces, we use a copy of
commit 5649bc22fa9beae5dd4a4af83e2c73f544e0bf39
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Jan 24 01:48:33 2011 +0100
Remove NIE directive. 'Nie' means 'never' in German.
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index 283f1ae..5512823 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -687,17 +687,6 @@ void SwTxtPainter::PaintDropPortion()
}
Point aLineOrigin( GetTopLeft() );
-#ifdef NIE
- // Retusche nachholen...
- if( nX )
- {
- const Point aPoint( Left(), Y() );
- const Size aSize( nX - 1, GetDropHeight()+GetDropDescent() );
- SwRect aRetouche( aPoint, aSize );
- GetInfo().DrawRect( aRetouche );
- }
-#endif
-
aLineOrigin.X() += nX;
KSHORT nTmpAscent, nTmpHeight;
CalcAscentAndHeight( nTmpAscent, nTmpHeight );
diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx
index 9a76e6f..0a6d72c 100644
--- a/sw/source/core/txtnode/ndhints.cxx
+++ b/sw/source/core/txtnode/ndhints.cxx
@@ -29,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "txatbase.hxx"
#include "ndhints.hxx"
#include <txtatr.hxx>
@@ -43,40 +41,7 @@
_SV_IMPL_SORTAR_ALG( SwpHtStart, SwTxtAttr* )
_SV_IMPL_SORTAR_ALG( SwpHtEnd, SwTxtAttr* )
-#ifdef NIE
-
-void DumpHints( const SwpHtStart &rHtStart,
- const SwpHtEnd &rHtEnd )
-{
-#if OSL_DEBUG_LEVEL > 1
- aDbstream << "DumpHints:" << endl;
- (aDbstream << "\tStarts:" ).WriteNumber(rHtStart.Count()) << endl;
- for( USHORT i = 0; i < rHtStart.Count(); ++i )
- {
- const SwTxtAttr *pHt = rHtStart[i];
- ((((aDbstream << '\t').WriteNumber( i )<< " [").WriteNumber( pHt->Which() )
- << ']' << '\t').WriteNumber( long( pHt ) )
- << '\t').WriteNumber( *pHt->GetStart() );
- if( pHt->GetEnd() )
- (aDbstream << " -> " ).WriteNumber( *pHt->GetEnd() );
- aDbstream << endl;
- }
- (aDbstream << "\tEnds:").WriteNumber( rHtEnd.Count() )<< endl;
- for( i = 0; i < rHtEnd.Count(); ++i )
- {
- const SwTxtAttr *pHt = rHtEnd[i];
- (((aDbstream << '\t').WriteNumber( i )<< " [").WriteNumber( pHt->Which() )
- << ']' << '\t' ).WriteNumber( long( pHt ) );
- if( pHt->GetEnd() )
- (aDbstream << '\t').WriteNumber( *pHt->GetEnd() )<< " <- ";
- aDbstream.WriteNumber( *pHt->GetStart() )<< endl;
- }
- aDbstream << endl;
-#endif
-}
-#else
inline void DumpHints(const SwpHtStart &, const SwpHtEnd &) { }
-#endif
/*************************************************************************
* inline IsEqual()
@@ -254,12 +219,6 @@ void SwpHintsArray::Insert( const SwTxtAttr *pHt )
#endif
m_HintStarts.Insert( pHt );
m_HintEnds.Insert( pHt );
-#if OSL_DEBUG_LEVEL > 1
-#ifdef NIE
- (aDbstream << "Insert: " ).WriteNumber( long( pHt ) ) << endl;
- DumpHints( m_HintStarts, m_HintEnds );
-#endif
-#endif
}
void SwpHintsArray::DeleteAtPos( const USHORT nPos )
@@ -273,12 +232,6 @@ void SwpHintsArray::DeleteAtPos( const USHORT nPos )
USHORT nEndPos;
m_HintEnds.Seek_Entry( pHt, &nEndPos );
m_HintEnds.Remove( nEndPos );
-#if OSL_DEBUG_LEVEL > 1
-#ifdef NIE
- (aDbstream << "DeleteAtPos: " ).WriteNumber( long( pHt ) ) << endl;
- DumpHints( m_HintStarts, m_HintEnds );
-#endif
-#endif
}
#if OSL_DEBUG_LEVEL > 1
@@ -446,13 +399,6 @@ bool SwpHintsArray::Resort()
const SwTxtAttr *pHt = m_HintStarts[i];
if( pLast && !lcl_IsLessStart( *pLast, *pHt ) )
{
-#ifdef NIE
-#if OSL_DEBUG_LEVEL > 1
-// OSL_ENSURE( bResort, "!Resort/Start: correcting hints-array" );
- aDbstream << "Resort: Starts" << endl;
- DumpHints( m_HintStarts, m_HintEnds );
-#endif
-#endif
m_HintStarts.Remove( i );
m_HintStarts.Insert( pHt );
pHt = m_HintStarts[i];
@@ -469,12 +415,6 @@ bool SwpHintsArray::Resort()
const SwTxtAttr *pHt = m_HintEnds[i];
if( pLast && !lcl_IsLessEnd( *pLast, *pHt ) )
{
-#ifdef NIE
-#if OSL_DEBUG_LEVEL > 1
- aDbstream << "Resort: Ends" << endl;
- DumpHints( m_HintStarts, m_HintEnds );
-#endif
-#endif
m_HintEnds.Remove( i );
m_HintEnds.Insert( pHt );
pHt = m_HintEnds[i]; // normalerweise == pLast
@@ -486,12 +426,6 @@ bool SwpHintsArray::Resort()
}
pLast = pHt;
}
-#if OSL_DEBUG_LEVEL > 1
-#ifdef NIE
- aDbstream << "Resorted:" << endl;
- DumpHints( m_HintStarts, m_HintEnds );
-#endif
-#endif
return bResort;
}
commit 892485296da172ab3507bd4f3db3edb630dc7e20
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Jan 24 01:46:37 2011 +0100
Remove CUTNOEXPAND directive.
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 6c6ba34..c602b83 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1964,24 +1964,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
// Update aller Indizies
Update( rDestStart, nLen, FALSE, TRUE );
}
-#ifdef CUTNOEXPAND
- else
- // wird am Ende eingefuegt, nur die Attribut-Indizies verschieben
- if ( 0 < nLen && 0 < nInitSize && m_pSwpHints )
- {
- // check if there was the end of an attribute at the insertion
- // position: if it is not a field, it must be expanded
- for ( USHORT n = 0; n < m_pSwpHints->Count(); n++ )
- {
- SwTxtAttr * const pHt = m_pSwpHints->GetTextHint(n);
- const xub_StrLen * const pEndIdx = pHt->GetEnd();
- if ( pEndIdx && (*pEndIdx == nInitSize) )
- {
- *pEndIdx = *pEndIdx + nLen;
- }
- }
- }
-#endif
+
CHECK_SWPHINTS(this);
Update( rStart, nLen, TRUE, TRUE );
@@ -2023,24 +2006,7 @@ void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
// Update aller Indizies
pDest->Update( rDestStart, nLen, FALSE, TRUE);
}
-#ifdef CUTNOEXPAND
- else
- // wird am Ende eingefuegt, nur die Attribut-Indizies verschieben
- if ( 0 < nLen && 0 < nInitSize && pDest->m_pSwpHints )
- {
- // check if there was the end of an attribute at the insertion
- // position: if it is not a field, it must be expanded
- for ( USHORT n = 0; n < pDest->m_pSwpHints->Count(); n++ )
- {
- SwTxtAttr * const pHt = pDest->m_pSwpHints->GetTextHint(n);
- const xub_StrLen * const pEndIdx = pHt->GetEnd();
- if ( pEndIdx && (*pEndIdx == nInitSize) )
- {
- *pEndIdx = *pEndIdx + nLen;
- }
- }
- }
-#endif
+
CHECK_SWPHINTS(pDest);
const xub_StrLen nEnd = rStart.GetIndex() + nLen;
commit 87423e371b9953657a1db1e8832f5a21b4c3d277
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Jan 24 01:46:11 2011 +0100
Remove MYDEBUG directive.
diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx
index 128bea7..a6df9a3 100644
--- a/sw/source/ui/docvw/edtwin2.cxx
+++ b/sw/source/ui/docvw/edtwin2.cxx
@@ -512,16 +512,6 @@ void SwEditWin::PrePaint()
void SwEditWin::Paint(const Rectangle& rRect)
{
-#if defined(MYDEBUG)
- // StartUp-Statistik
- if ( pTickList )
- {
- SYSTICK( "Start SwEditWin::Paint" );
- READ_FIRST_TICKS()
- FLUSH_TICKS()
- }
-#endif
-
SwWrtShell* pWrtShell = GetView().GetWrtShellPtr();
if(!pWrtShell)
return;
commit 2d0b31d2a7ceb58e4f0567fe0c255d16c8f502ff
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Jan 24 01:45:48 2011 +0100
Remove FORMAT_PAINTBRUSH_ALSO_COPY_NUMBERFORMAT_FOR_TABLES directive.
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx
index fd6303e..4182565 100644
--- a/sw/source/ui/uiview/formatclipboard.cxx
+++ b/sw/source/ui/uiview/formatclipboard.cxx
@@ -64,12 +64,6 @@
#include <swundo.hxx> // fuer die UndoIds
#include <boost/shared_ptr.hpp>
-//#define FORMAT_PAINTBRUSH_ALSO_COPY_NUMBERFORMAT_FOR_TABLES 1
-
-#ifdef FORMAT_PAINTBRUSH_ALSO_COPY_NUMBERFORMAT_FOR_TABLES
-#include <cellatr.hxx>
-#endif
-
/*--------------------------------------------------------------------
--------------------------------------------------------------------*/
@@ -126,9 +120,6 @@ SfxItemSet* lcl_CreateEmptyItemSet( int nSelectionType, SfxItemPool& rPool
FN_PARAM_TABLE_HEADLINE, FN_PARAM_TABLE_HEADLINE,
FN_TABLE_BOX_TEXTDIRECTION, FN_TABLE_BOX_TEXTDIRECTION,
FN_TABLE_SET_VERT_ALIGN, FN_TABLE_SET_VERT_ALIGN,
-#ifdef FORMAT_PAINTBRUSH_ALSO_COPY_NUMBERFORMAT_FOR_TABLES
- RES_BOXATR_FORMAT, RES_BOXATR_FORMAT,
-#endif
0);
}
else if( nSelectionType & nsSelectionType::SEL_TXT )
@@ -189,11 +180,6 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh )
rSh.GetRowSplit(pSplit);
if(pSplit)
rSet.Put(*pSplit);
-
- //-- numberformat in cells
-#ifdef FORMAT_PAINTBRUSH_ALSO_COPY_NUMBERFORMAT_FOR_TABLES
- rSh.GetTblBoxFormulaAttrs( rSet ); //RES_BOXATR_FORMAT
-#endif
}
void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
@@ -282,17 +268,6 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh )
if( SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, FALSE, &pItem) )
rSh.SetRowSplit(*static_cast<const SwFmtRowSplit*>(pItem));
-
- //-- numberformat in cells
-#ifdef FORMAT_PAINTBRUSH_ALSO_COPY_NUMBERFORMAT_FOR_TABLES
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem ))
- {
- SfxItemSet aBoxSet( *rSet.GetPool(), RES_BOXATR_FORMAT, RES_BOXATR_FORMAT );
- aBoxSet.Put( SwTblBoxNumFormat( ((SfxUInt32Item*)pItem)->GetValue() ));
- rSh.SetTblBoxFormulaAttrs( aBoxSet );
-
- }
-#endif
}
}//end anonymous namespace
commit 092bf0c4eedb52987cd2efde4f87e64fe645e290
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Jan 24 01:45:11 2011 +0100
Remove LINGU_STATISTIK directive. Used to display stats for linguistics.
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 3c5c32d..ed0f91e 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -29,15 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-// So kann man die Linguistik-Statistik ( (Tmp-Path)\swlingu.stk ) aktivieren:
-//#define LINGU_STATISTIK
-#ifdef LINGU_STATISTIK
- #include <stdio.h> // in SwLinguStatistik::DTOR
- #include <stdlib.h> // getenv()
- #include <time.h> // clock()
- #include <tools/stream.hxx>
-#endif
-
#include <hintids.hxx>
#include <vcl/svapp.hxx>
#include <svl/itemiter.hxx>
@@ -1502,78 +1493,6 @@ BOOL SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
return FALSE;
}
-#ifdef LINGU_STATISTIK
-
-// globale Variable
-SwLinguStatistik aSwLinguStat;
-
-void SwLinguStatistik::Flush()
-{
- if ( !nWords )
- return ;
-
- static char *pLogName = 0;
- const BOOL bFirstOpen = pLogName ? FALSE : TRUE;
- if( bFirstOpen )
- {
- char *pPath = getenv( "TEMP" );
- char *pName = "swlingu.stk";
- if( !pPath )
- pLogName = pName;
- else
- {
- const int nLen = strlen(pPath);
- // fuer dieses new wird es kein delete geben.
- pLogName = new char[nLen + strlen(pName) + 3];
- if(nLen && (pPath[nLen-1] == '\\') || (pPath[nLen-1] == '/'))
- snprintf( pLogName, sizeof(pLogName), "%s%s", pPath, pName );
- else
- snprintf( pLogName, sizeof(pLogName), "%s/%s", pPath, pName );
- }
- }
- SvFileStream aStream( String::CreateFromAscii(pLogName), (bFirstOpen
- ? STREAM_WRITE | STREAM_TRUNC
- : STREAM_WRITE ));
-
- if( !aStream.GetError() )
- {
- if ( bFirstOpen )
- aStream << "\nLinguistik-Statistik\n";
- aStream << endl << ++nFlushCnt << ". Messung\n";
- aStream << "Rechtschreibung\n";
- aStream << "gepruefte Worte: \t" << nWords << endl;
- aStream << "als fehlerhaft erkannt:\t" << nWrong << endl;
- aStream << "Alternativvorschlaege:\t" << nAlter << endl;
- if ( nWrong )
- aStream << "Durchschnitt:\t\t" << nAlter*1.0 / nWrong << endl;
- aStream << "Dauer (msec):\t\t" << nSpellTime << endl;
- aStream << "\nThesaurus\n";
- aStream << "Synonyme gesamt:\t" << nSynonym << endl;
- if ( nSynonym )
- aStream << "Synonym-Durchschnitt:\t" <<
- nSynonym*1.0 / ( nWords - nNoSynonym ) << endl;
- aStream << "ohne Synonyme:\t\t" << nNoSynonym << endl;
- aStream << "Bedeutungen gesamt:\t" << nSynonym << endl;
- aStream << "keine Bedeutungen:\t"<< nNoSynonym << endl;
- aStream << "Dauer (msec):\t\t" << nTheTime << endl;
- aStream << "\nHyphenator\n";
- aStream << "Trennstellen gesamt:\t" << nHyphens << endl;
- if ( nHyphens )
- aStream << "Hyphen-Durchschnitt:\t" <<
- nHyphens*1.0 / ( nWords - nNoHyph - nHyphErr ) << endl;
- aStream << "keine Trennstellen:\t" << nNoHyph << endl;
- aStream << "Trennung verweigert:\t" << nHyphErr << endl;
- aStream << "Dauer (msec):\t\t" << nHyphTime << endl;
- aStream << "---------------------------------------------\n";
- }
- nWords = nWrong = nAlter = nSynonym = nNoSynonym =
- nHyphens = nNoHyph = nHyphErr = nSpellTime = nTheTime =
- nHyphTime = 0;
- //pThes = NULL;
-}
-
-#endif
-
struct TransliterationChgData
{
xub_StrLen nStart;
commit e03c5afd97c0c32e369887ac3ee7c1851a032f95
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Jan 24 01:43:42 2011 +0100
Remove TEST_FOR_BUG91313 directive.
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index b9d1f5a..48e2982 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -615,11 +615,7 @@ void SwEditWin::JustifyAreaTimer()
nDiff = Max(
Max( aMovePos.Y() - rVisArea.Bottom(), rVisArea.Top() - aMovePos.Y() ),
Max( aMovePos.X() - rVisArea.Right(), rVisArea.Left() - aMovePos.X()));
-#ifdef TEST_FOR_BUG91313
- aTimer.SetTimeout( Max( coMinLen, nTimeout - nDiff) );
-#else
aTimer.SetTimeout( Max( coMinLen, nTimeout - nDiff*2L) );
-#endif
}
void SwEditWin::LeaveArea(const Point &rPos)
@@ -3393,20 +3389,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
}
const Point aOldPt( rSh.VisArea().Pos() );
-#ifdef TEST_FOR_BUG91313
- // n Pixel as FUZZY border
- SwRect aVis( rSh.VisArea() );
- Size aFuzzySz( 2, 2 );
- aFuzzySz = PixelToLogic( aFuzzySz );
-
- aVis.Top( aVis.Top() + aFuzzySz.Height() );
- aVis.Bottom( aVis.Bottom() - aFuzzySz.Height() );
- aVis.Left( aVis.Left() + aFuzzySz.Width() );
- aVis.Right( aVis.Right() - aFuzzySz.Width() );
- const BOOL bInsWin = aVis.IsInside( aDocPt );
-#else
const BOOL bInsWin = rSh.VisArea().IsInside( aDocPt );
-#endif
if( pShadCrsr && !bInsWin )
delete pShadCrsr, pShadCrsr = 0;
commit f31e6e1cf4cf89b7d31e14d4a464cecb1502f501
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Jan 24 01:42:29 2011 +0100
Remove AMA_LAYOUT directive. Methods to display layout structure.
diff --git a/sw/source/core/text/txtio.cxx b/sw/source/core/text/txtio.cxx
index d93d8d1..010ee89 100644
--- a/sw/source/core/text/txtio.cxx
+++ b/sw/source/core/text/txtio.cxx
@@ -59,224 +59,9 @@
#include "pormulti.hxx"
#include "ndhints.hxx"
-// So kann man die Layoutstruktur ausgeben lassen
-// #define AMA_LAYOUT
-#ifdef AMA_LAYOUT
-#include <stdio.h>
-#include <stdlib.h> // getenv()
-#include <flowfrm.hxx>
-#include <pagefrm.hxx>
-#include <svx/svdobj.hxx>
-#include <dflyobj.hxx>
-
-
-void lcl_OutFollow( XubString &rTmp, const SwFrm* pFrm )
-{
- if( pFrm->IsFlowFrm() )
- {
- const SwFlowFrm *pFlow = SwFlowFrm::CastFlowFrm( pFrm );
- if( pFlow->IsFollow() || pFlow->GetFollow() )
- {
- rTmp += "(";
- if( pFlow->IsFollow() )
- rTmp += ".";
- if( pFlow->GetFollow() )
- {
- MSHORT nFrmId = pFlow->GetFollow()->GetFrm()->GetFrmId();
- rTmp += nFrmId;
- }
- rTmp += ")";
- }
- }
-}
-
-void lcl_OutFrame( SvFileStream& rStr, const SwFrm* pFrm, ByteString& rSp, sal_Bool bNxt )
-{
- if( !pFrm )
- return;
- KSHORT nSpc = 0;
- MSHORT nFrmId = pFrm->GetFrmId();
- ByteString aTmp;
- if( pFrm->IsLayoutFrm() )
- {
- if( pFrm->IsRootFrm() )
- aTmp = "R";
- else if( pFrm->IsPageFrm() )
- aTmp = "P";
- else if( pFrm->IsBodyFrm() )
- aTmp = "B";
- else if( pFrm->IsColumnFrm() )
- aTmp = "C";
- else if( pFrm->IsTabFrm() )
- aTmp = "Tb";
- else if( pFrm->IsRowFrm() )
- aTmp = "Rw";
- else if( pFrm->IsCellFrm() )
- aTmp = "Ce";
- else if( pFrm->IsSctFrm() )
- aTmp = "S";
- else if( pFrm->IsFlyFrm() )
- {
- aTmp = "F";
- const SwFlyFrm *pFly = (SwFlyFrm*)pFrm;
- if( pFly->IsFlyInCntFrm() )
- aTmp += "in";
- else if( pFly->IsFlyAtCntFrm() )
- {
- aTmp += "a";
- if( pFly->IsAutoPos() )
- aTmp += "u";
- else
- aTmp += "t";
- }
- else
- aTmp += "l";
- }
- else if( pFrm->IsHeaderFrm() )
- aTmp = "H";
- else if( pFrm->IsFooterFrm() )
- aTmp = "Fz";
- else if( pFrm->IsFtnContFrm() )
- aTmp = "Fc";
- else if( pFrm->IsFtnFrm() )
- aTmp = "Fn";
- else
- aTmp = "?L?";
- aTmp += nFrmId;
- lcl_OutFollow( aTmp, pFrm );
- aTmp += " ";
- rStr << aTmp;
- nSpc = aTmp.Len();
- rSp.Expand( nSpc + rSp.Len() );
- lcl_OutFrame( rStr, ((SwLayoutFrm*)pFrm)->Lower(), rSp, sal_True );
- }
- else
- {
- if( pFrm->IsTxtFrm() )
- aTmp = "T";
- else if( pFrm->IsNoTxtFrm() )
- aTmp = "N";
- else
- aTmp = "?C?";
- aTmp += nFrmId;
- lcl_OutFollow( aTmp, pFrm );
- aTmp += " ";
- rStr << aTmp;
- nSpc = aTmp.Len();
- rSp.Expand( nSpc + rSp.Len() );
- }
- if( pFrm->IsPageFrm() )
- {
- const SwPageFrm* pPg = (SwPageFrm*)pFrm;
- const SwSortedObjs *pSorted = pPg->GetSortedObjs();
- const MSHORT nCnt = pSorted ? pSorted->Count() : 0;
- if( nCnt )
- {
- for( MSHORT i=0; i < nCnt; ++i )
- {
- // --> OD 2004-07-07 #i28701# - consider changed type of
- // <SwSortedObjs> entries
- SwAnchoredObject* pAnchoredObj = (*pSorted)[ i ];
- if( pAnchoredObj->ISA(SwFlyFrm) )
- {
- SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
- lcl_OutFrame( rStr, pFly, rSp, sal_False );
- }
- else
- {
- aTmp = pAnchoredObj->GetDrawObj()->IsUnoObj() ? "UNO" : "Drw";
- rStr << aTmp;
- }
- // <--
- if( i < nCnt - 1 )
- rStr << endl << rSp;
- }
- }
- }
- else if( pFrm->GetDrawObjs() )
- {
- MSHORT nCnt = pFrm->GetDrawObjs()->Count();
- if( nCnt )
- {
- for( MSHORT i=0; i < nCnt; ++i )
- {
- // --> OD 2004-07-07 #i28701# - consider changed type of
- // <SwSortedObjs> entries
- SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[ i ];
- if( pAnchoredObj->ISA(SwFlyFrm) )
- {
- SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
- lcl_OutFrame( rStr, pFly, rSp, sal_False );
- }
- else
- {
- aTmp = pAnchoredObj->GetDrawObj()->IsUnoObj() ? "UNO" : "Drw";
- rStr << aTmp;
- }
- if( i < nCnt - 1 )
- rStr << endl << rSp;
- }
- }
- }
- if( nSpc )
- rSp.Erase( rSp.Len() - nSpc );
- if( bNxt && pFrm->GetNext() )
- {
- do
- {
- pFrm = pFrm->GetNext();
- rStr << endl << rSp;
- lcl_OutFrame( rStr, pFrm, rSp, sal_False );
- } while ( pFrm->GetNext() );
- }
-}
-
-void LayOutPut( const SwFrm* pFrm )
-{
- static char* pOutName = 0;
- const sal_Bool bFirstOpen = pOutName ? sal_False : sal_True;
- if( bFirstOpen )
- {
- char *pPath = getenv( "TEMP" );
- char *pName = "layout.txt";
- if( !pPath )
- pOutName = pName;
- else
- {
- const int nLen = strlen(pPath);
- // fuer dieses new wird es kein delete geben.
- pOutName = new char[nLen + strlen(pName) + 3];
- if(nLen && (pPath[nLen-1] == '\\') || (pPath[nLen-1] == '/'))
- snprintf( pOutName, sizeof(pOutName), "%s%s", pPath, pName );
- else
- snprintf( pOutName, sizeof(pOutName), "%s/%s", pPath, pName );
- }
- }
- SvFileStream aStream( pOutName, (bFirstOpen
- ? STREAM_WRITE | STREAM_TRUNC
- : STREAM_WRITE ));
-
- if( !aStream.GetError() )
- {
- if ( bFirstOpen )
- aStream << "Layout-Struktur";
- else
- aStream.Seek( STREAM_SEEK_TO_END );
- aStream << endl;
- aStream << "---------------------------------------------" << endl;
- XubString aSpace;
- lcl_OutFrame( aStream, pFrm, aSpace, sal_False );
- }
-}
-
-#endif
-
SvStream &operator<<( SvStream &rOs, const SwpHints & ) //$ ostream
{
rOs << " {HINTS:";
-
-// REMOVED
-
rOs << '}';
return rOs;
}
commit 08e8fa7fa1cbe2cccba4f807de1f785dd2c7ad1d
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Jan 24 01:42:01 2011 +0100
Remove DEBUGGY directive.
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index 4407754..0e7d07a 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -281,17 +281,6 @@ sal_Bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
rHyphInf.SetNoLang( sal_False );
rHyphInf.SetCheck( sal_True );
}
-#ifdef DEBUGGY
- if( OPTDBG( rInf ) )
- {
- OSL_ENSURE( aSelTxt == aHyphWord,
- "!SwTxtFormatter::Hyphenate: different words, different planets" );
- aDbstream << "Diff: \"" << aSelTxt.GetStr() << "\" != \""
- << aHyphWord.GetStr() << "\"" << endl;
- OSL_ENSURE( bRet, "!SwTxtFormatter::Hyphenate: three of a perfect pair" );
- aDbstream << "Hyphenate: ";
- }
-#endif
}
}
return bRet;
commit c799bd8f10af83b3f4549925a8d053a8a0c3b2af
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Jan 24 01:41:38 2011 +0100
Remove MA_DEBUG directive.
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index d175b18..a901a70 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -67,29 +67,6 @@ ULONG MA_FASTCALL lcl_FindFtnPos( const SwDoc *pDoc, const SwTxtFtn *pAttr )
{
const SwFtnIdxs &rFtnIdxs = pDoc->GetFtnIdxs();
-#ifdef MA_DEBUG
- //Wenn das Array nicht stimmt haben wir ein Problem, denn viele
- //Ftn-Functions bauen auf dem Array auf.
- for ( USHORT k = 0; k+1 < rFtnIdxs.Count(); ++k )
- {
- SwIndex aIdx1(&pDoc->GetNodes());
- SwIndex aIdx2(&pDoc->GetNodes());
- rFtnIdxs[k]->pFtn-> GetTxtNode().GetIndex(aIdx1);
- rFtnIdxs[k+1]->pFtn->GetTxtNode().GetIndex(aIdx2);
- if ( aIdx1.GetIndex() > aIdx2.GetIndex() )
- {
- OSL_ENSURE( !rFtnIdxs.Count(), "FtnIdxs not up to date" );
- }
- else if ( aIdx1.GetIndex() == aIdx2.GetIndex() )
- {
- SwTxtFtn *p1 = rFtnIdxs[k];
- SwTxtFtn *p2 = rFtnIdxs[k+1];
- OSL_ENSURE( *p1->GetStart() < *p2->GetStart(),
- "FtnIdxs not up to date" );
- }
- }
-#endif
-
USHORT nRet;
SwTxtFtnPtr pBla = (SwTxtFtn*)pAttr;
if ( rFtnIdxs.Seek_Entry( pBla, &nRet ) )
commit 22e16c6ebe751e19fd051c72dbcc3d6734f45041
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Jan 24 01:41:10 2011 +0100
Remove FINDSTARTENDOFROWSPANCACHE directive and some more dead code.
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index 79d6f41..91b1958 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -691,7 +691,6 @@ BOOL SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
_FndBox aFndBox( 0, 0 );
aFndBox.SetTableLines( rBoxes, *this );
aFndBox.DelFrms( *this );
-// aFndBox.SaveChartData( *this );
SwTableNode* pTblNd = GetTableNode();
std::vector<SwTableBoxFmt*> aInsFormat( nCnt, 0 );
@@ -772,7 +771,6 @@ BOOL SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
}
aFndBox.MakeFrms( *this );
-// aFndBox.RestoreChartData( *this );
#if OSL_DEBUG_LEVEL > 1
{
const SwTableBoxes &rTabBoxes = aLines[0]->GetTabBoxes();
@@ -1494,7 +1492,6 @@ BOOL SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
_FndBox aFndBox( 0, 0 );
aFndBox.SetTableLines( rBoxes, *this );
aFndBox.DelFrms( *this );
-// aFndBox.SaveChartData( *this );
bRet = true;
SwTableLine *pLine = GetTabLines()[ nRowIdx ];
@@ -1532,7 +1529,6 @@ BOOL SwTable::InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
lcl_ChangeRowSpan( *this, nCnt, --nRowIdx, true );
//Layout update
aFndBox.MakeFrms( *this );
-// aFndBox.RestoreChartData( *this );
}
CHECK_TABLE( *this )
}
@@ -1626,7 +1622,6 @@ void lcl_SearchSelBox( const SwTable &rTable, SwSelBoxes& rBoxes, long nMin, lon
bAdd = nLeft <= nMid || nRight - nMax < nMax - nLeft;
long nRowSpan = pBox->getRowSpan();
if( bAdd &&
- //( bColumn || nRowSpan > 0 ) &&
( !bChkProtected ||
!pBox->GetFrmFmt()->GetProtect().IsCntntProtected() ) )
{
@@ -1789,47 +1784,6 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
lcl_SearchSelBox( *this, rBoxes, nMin, nMax, *aLines[i],
bChkProtected, bColumn );
}
- /* if( nTop + 1 < nBottom )
- {
- long nInnerMin = nUpperMin < nLowerMin ? nLowerMin : nUpperMin;
- long nInnerMax = nUpperMax < nLowerMax ? nUpperMax : nLowerMax;
- for( USHORT i = nTop + 1; i < nBottom; ++i )
- lcl_SearchSelBox( *this, rBoxes, nInnerMin, nInnerMax, *aLines[i],
- bChkProtected, bColumn );
- }
- if( bCombine ) // => nUpperMin == nLowerMin, nUpperMax == nLowerMax
- {
- if( nBottom > nTop )
- lcl_SearchSelBox( *this, rBoxes, nUpperMin, nUpperMax, *aLines[nTop],
- bChkProtected, bColumn );
- lcl_SearchSelBox( *this, rBoxes, nLowerMin, nLowerMax, *aLines[nBottom],
- bChkProtected, bColumn );
- }
- else if( aKeepBoxes.Count() )
- {
- long nMin = nUpperMin < nLowerMin ? nUpperMin : nLowerMin;
- long nMax = nUpperMax < nLowerMax ? nLowerMax : nUpperMax;
- SwSelBoxes aCandidates;
- for( USHORT i = nTop; i <= nBottom; ++i )
- lcl_SearchSelBox( *this, aCandidates, nMin, nMax, *aLines[i],
- bChkProtected, bColumn );
- USHORT nOld = 0, nNew = 0;
- while ( nOld < aKeepBoxes.Count() && nNew < aCandidates.Count() )
- {
- const SwTableBox* pPOld = *( aKeepBoxes.GetData() + nOld );
- SwTableBox* pPNew = *( aCandidates.GetData() + nNew );
- if( pPOld == pPNew )
- { // this box will stay
- rBoxes.Insert( pPNew );
- ++nOld;
- ++nNew;
- }
- else if( pPOld->GetSttIdx() < pPNew->GetSttIdx() )
- ++nOld;
- else
- ++nNew;
- }
- } */
if( bColumn )
{
for( USHORT i = nBottom + 1; i < nLines; ++i )
@@ -2216,106 +2170,4 @@ void SwTable::CheckConsistency() const
#endif
-
-#ifdef FINDSTARTENDOFROWSPANCACHE
-/*
- * A small optimization for FindStartEndOfRowSpan START
- *
- * NOTE: Results of some measurement revealed that this cache
- * does not improve performance!
- */
-
-class SwFindRowSpanCache
-{
-private:
-
- struct SwFindRowSpanCacheObj
- {
- const SwTableBox* mpKeyBox;
- const SwTableBox* mpCacheBox;
- USHORT mnSteps;
- bool mbStart;
-
- SwFindRowSpanCacheObj( const SwTableBox& rKeyBox, const SwTableBox& rCacheBox, USHORT nSteps, bool bStart ) :
- mpKeyBox( &rKeyBox ), mpCacheBox( &rCacheBox ), mnSteps( nSteps ), mbStart( bStart ) {}
- };
-
- std::list< SwFindRowSpanCacheObj > aCache;
- bool mbUseCache;
- static SwFindRowSpanCache* mpFindRowSpanCache;
- SwFindRowSpanCache();
-
-public:
-
- static SwFindRowSpanCache& getSwFindRowSpanCache();
- const SwTableBox* FindCachedStartEndOfRowSpan( const SwTableBox& rKeyBox, USHORT nSteps, bool bStart );
- void SetCachedStartEndOfRowSpan( const SwTableBox& rKeyBox, const SwTableBox& rCacheBox, USHORT nSteps, bool bStart );
- void SetUseCache( bool bNew );
-};
-
-SwFindRowSpanCache* SwFindRowSpanCache::mpFindRowSpanCache = 0;
-SwFindRowSpanCache& SwFindRowSpanCache::getSwFindRowSpanCache()
-{
- if ( !mpFindRowSpanCache ) mpFindRowSpanCache = new SwFindRowSpanCache;
- return *mpFindRowSpanCache;
-}
-
-SwFindRowSpanCache::SwFindRowSpanCache() : mbUseCache( false )
-{
-}
-
-void SwFindRowSpanCache::SetUseCache( bool bNew )
-{
- mbUseCache = bNew; aCache.clear();
-}
-
-const SwTableBox* SwFindRowSpanCache::FindCachedStartEndOfRowSpan( const SwTableBox& rKeyBox,
- USHORT nSteps,
- bool bStart )
-{
- static nCallCount = 0;
- static nSuccessCount = 0;
- ++nCallCount;
-
- if ( !mbUseCache ) return 0;
-
- const SwTableBox* pRet = 0;
-
- std::list< SwFindRowSpanCacheObj >::const_iterator aIter;
- for ( aIter = aCache.begin(); aIter != aCache.end(); ++aIter )
- {
- if ( aIter->mpKeyBox == &rKeyBox &&
- aIter->mnSteps == nSteps &&
- aIter->mbStart == bStart )
- {
- pRet = aIter->mpCacheBox;
- ++nSuccessCount;
- break;
- }
- }
-
- return pRet;
-}
-
-const int FindBoxCacheSize = 2;
-
-void SwFindRowSpanCache::SetCachedStartEndOfRowSpan( const SwTableBox& rKeyBox,
- const SwTableBox& rCacheBox,
- USHORT nSteps,
- bool bStart )
-{
- if ( !mbUseCache ) return;
-
- const SwFindRowSpanCacheObj aNew( rKeyBox, rCacheBox, nSteps, bStart );
- aCache.push_front( aNew );
- if ( aCache.size() > FindBoxCacheSize )
- aCache.pop_back();
-}
-
-/*
- * A small optimization for FindStartEndOfRowSpan END
- */
-
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit e681a23d6ba27a0aa2c20c1be0920a5494cd91e3
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Jan 24 01:40:19 2011 +0100
Remove FRANK_TEST directive.
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 32dc0e4..da3d71a 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3085,18 +3085,6 @@ void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) con
DELETEZ( pLines );
-#ifdef FRANK_TEST
- if ( pSh->GetWin() )
- {
- Rectangle aRect( aFrm.SVRect() );
- pSh->GetWin()->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
- pSh->GetWin()->SetFillColor();
- pSh->GetWin()->SetLineColor( COL_LIGHTRED );
- pSh->GetWin()->DrawRect( aRect );
- pSh->GetWin()->Pop();
- }
-#endif
-
if ( bResetRootPaint )
SwRootFrm::bInPaint = FALSE;
if ( pStatics )
@@ -3110,39 +3098,6 @@ void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) con
((SwRootFrm*)this)->SetCallbackActionEnabled( bOldAction );
}
-#ifdef LONG_TABLE_HACK
-
-/*************************************************************************
-|*
-|* SwRootFrm::HackPrepareLongTblPaint()
-|*
-|*************************************************************************/
-
-void SwRootFrm::HackPrepareLongTblPaint( int nMode )
-{
- switch ( nMode )
- {
- case HACK_TABLEMODE_INIT : OSL_ENSURE( !pLines, "HackPrepare: already prepared" );
- pLines = new SwLineRects;
- OSL_ENSURE( !pGlobalShell, "old GlobalShell lost" );
- pGlobalShell = GetShell();
- bTableHack = TRUE;
- break;
- case HACK_TABLEMODE_LOCKLINES : pLines->LockLines( TRUE ); break;
- case HACK_TABLEMODE_PAINTLINES : pLines->PaintLines( GetShell()->GetOut() );
- break;
- case HACK_TABLEMODE_UNLOCKLINES: pLines->LockLines( FALSE ); break;
- case HACK_TABLEMODE_EXIT : pLines->PaintLines( GetShell()->GetOut() );
- DELETEZ( pLines );
- pGlobalShell = 0;
- bTableHack = FALSE;
- break;
- }
-}
-
-#endif
-
-
/*************************************************************************
|*
|* SwLayoutFrm::Paint()
commit f7fea40326cfe143f39af80f5a1634138e0f4e6c
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Jan 24 01:39:01 2011 +0100
Remove unused FIELDPATCH and TOMORROW directive.
diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx
index 22e00a1..36b9d8e 100644
--- a/sw/source/ui/vba/vbadocument.cxx
+++ b/sw/source/ui/vba/vbadocument.cxx
@@ -236,19 +236,10 @@ SwVbaDocument::TablesOfContents( const uno::Any& index ) throw (uno::RuntimeExce
return uno::makeAny( xCol );
}
-#ifdef FIELDPATCH
-uno::Any SAL_CALL
-SwVbaDocument::FormFields( const uno::Any& index ) throw (uno::RuntimeException)
-{
- uno::Reference< XCollection > xCol( new SwVbaFormFields( this, mxContext, getModel() ) );
- if ( index.hasValue() )
- return xCol->Item( index, uno::Any() );
-#else
uno::Any SAL_CALL
SwVbaDocument::FormFields( const uno::Any& /*index*/ ) throw (uno::RuntimeException)
{
uno::Reference< XCollection > xCol;
-#endif
return uno::makeAny( xCol );
}
diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx
index fc8ec9d..25f1bcd 100644
--- a/sw/source/ui/vba/vbafind.cxx
+++ b/sw/source/ui/vba/vbafind.cxx
@@ -81,13 +81,6 @@ void SwVbaFind::SetReplace( sal_Int32 type )
mnReplaceType = type;
mbReplace = sal_True;
}
-#ifdef TOMORROW
-rtl::OUString SwVbaFind::ReplaceWildcards( const rtl::OUString& /*rText*/ ) throw ( uno::RuntimeException )
-{
- // TODO:
- return rtl::OUString();
-}
-#endif
uno::Reference< text::XTextRange > SwVbaFind::FindOneElement() throw ( uno::RuntimeException )
{
uno::Reference< text::XTextRange > xFoundOne;
diff --git a/sw/source/ui/vba/vbafind.hxx b/sw/source/ui/vba/vbafind.hxx
index 0c5bf65..da07d2f 100644
--- a/sw/source/ui/vba/vbafind.hxx
+++ b/sw/source/ui/vba/vbafind.hxx
@@ -59,9 +59,6 @@ private:
void SetReplace( sal_Int32 type );
void SetReplaceWith( const rtl::OUString& rText ) throw ( css::uno::RuntimeException );
rtl::OUString GetReplaceWith() throw ( css::uno::RuntimeException );
-#ifdef TOMORROW
- rtl::OUString ReplaceWildcards( const rtl::OUString& rText ) throw ( css::uno::RuntimeException );
-#endif
css::uno::Reference< css::text::XTextRange > FindOneElement() throw ( css::uno::RuntimeException );
sal_Bool SearchReplace() throw ( css::uno::RuntimeException );
diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.cxx b/sw/source/ui/vba/vbaheaderfooterhelper.cxx
index 29c9144..c1d04f6 100644
--- a/sw/source/ui/vba/vbaheaderfooterhelper.cxx
+++ b/sw/source/ui/vba/vbaheaderfooterhelper.cxx
@@ -187,24 +187,5 @@ sal_Bool HeaderFooterHelper::isEvenPagesFooter( const uno::Reference< frame::XMo
}
return sal_False;
}
-#ifdef TOMORROW
-sal_Bool HeaderFooterHelper::isPrimaryHeader( const uno::Reference< frame::XModel >& xModel, const uno::Reference< text::XText >& xCurrentText ) throw (uno::RuntimeException)
-{
- if( isHeader( xModel ) )
- {
- return( !( isFirstPageHeader( xModel ) && isEvenPagesHeader( xModel ) ) );
- }
- return sal_False;
-}
-
-sal_Bool HeaderFooterHelper::isPrimaryFooter( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException)
-{
- if( isHeader( xModel ) )
- {
- return( !( isFirstPageFooter( xModel ) && isEvenPagesFooter( xModel ) ) );
- }
- return sal_False;
-}
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/vba/vbaheaderfooterhelper.hxx b/sw/source/ui/vba/vbaheaderfooterhelper.hxx
index e26741f..551db0a 100644
--- a/sw/source/ui/vba/vbaheaderfooterhelper.hxx
+++ b/sw/source/ui/vba/vbaheaderfooterhelper.hxx
@@ -47,10 +47,6 @@ public:
static sal_Bool isEvenPagesFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
static sal_Bool isPrimaryHeader( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
static sal_Bool isPrimaryFooter( const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException);
-#ifdef TOMORROW
- static sal_Bool isPrimaryHeader( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
- static sal_Bool isPrimaryFooter( const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::text::XText >& xCurrentText ) throw (css::uno::RuntimeException);
-#endif
};
#endif
diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx
index 2fa024f..f58f7ab 100644
--- a/sw/source/ui/vba/vbarange.cxx
+++ b/sw/source/ui/vba/vbarange.cxx
@@ -96,74 +96,7 @@ SwVbaRange::getXTextRange() throw (uno::RuntimeException)
uno::Reference< text::XTextRange > xTextRange( mxTextCursor, uno::UNO_QUERY_THROW );
return xTextRange;
}
-#ifdef TOMORROW
-void SwVbaRange::setXTextRange( const uno::Reference< text::XTextRange >& xRange ) throw (uno::RuntimeException)
-{
- mxTextCursor->gotoRange( xRange->getStart(), sal_False );
- mxTextCursor->gotoRange( xRange->getEnd(), sal_True );
-}
-
-void
-SwVbaRange::Move( const uno::Any& _unit, const uno::Any& _count, const uno::Any& _extend, word::E_DIRECTION eDirection ) throw ( uno::RuntimeException )
-{
- sal_Int32 nUnit = word::WdUnits::wdCharacter;
- sal_Int32 nCount = 1;
- sal_Int32 nExtend = word::WdMovementType::wdMove;
-
- if( _unit.hasValue() )
- _unit >>= nUnit;
- if( _count.hasValue() )
- _count >>= nCount;
- if( _extend.hasValue() )
- _extend >>= nExtend;
- if( nCount == 0 )
- return;
-
- sal_Bool bExpand = ( nExtend == word::WdMovementType::wdMove ) ? sal_False : sal_True;
-
- switch( nUnit )
- {
- case word::WdUnits::wdParagraph:
- {
- if( eDirection == word::MOVE_LEFT || eDirection == word::MOVE_RIGHT )
- {
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
- }
- uno::Reference< text::XParagraphCursor > xParagraphCursor( mxTextCursor, uno::UNO_QUERY_THROW );
- for( sal_Int32 i=0; i<nCount; i++ )
- {
- if( ( eDirection == word::MOVE_UP ) && ( xParagraphCursor->gotoPreviousParagraph( bExpand ) == sal_False ) )
- break;
- else if( ( eDirection == word::MOVE_DOWN ) && ( xParagraphCursor->gotoNextParagraph( bExpand ) == sal_False ) )
- break;
- }
- break;
- }
- case word::WdUnits::wdWord:
- {
- if( eDirection == word::MOVE_UP || eDirection == word::MOVE_DOWN )
- {
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
- }
- uno::Reference< text::XWordCursor > xWordCursor( mxTextCursor, uno::UNO_QUERY_THROW );
- for( sal_Int32 i=0; i<nCount; i++ )
- {
- if( (eDirection == word::MOVE_LEFT ) && ( xWordCursor->gotoPreviousWord( bExpand ) == sal_False ) )
- break;
- else if( ( eDirection == word::MOVE_RIGHT ) && ( xWordCursor->gotoNextWord( bExpand ) == sal_False ) )
- break;
- }
- break;
- }
- default:
- {
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
- break;
- }
- }
-}
-#endif
/**
* The complexity in this method is because we need to workaround
* an issue that the last paragraph in a document does not have a trailing CRLF.
diff --git a/sw/source/ui/vba/vbarange.hxx b/sw/source/ui/vba/vbarange.hxx
index 6c43174..fb6f8e0 100644
--- a/sw/source/ui/vba/vbarange.hxx
+++ b/sw/source/ui/vba/vbarange.hxx
@@ -60,9 +60,6 @@ public:
css::uno::Reference< css::text::XTextDocument > getDocument() { return mxTextDocument; }
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getXTextRange() throw (css::uno::RuntimeException);
-#ifdef TOMORROW
- void setXTextRange( const css::uno::Reference< css::text::XTextRange >& xRange ) throw (css::uno::RuntimeException);
-#endif
css::uno::Reference< css::text::XText > getXText() { return mxText; }
void setXTextCursor( const css::uno::Reference< css::text::XTextCursor >& xTextCursor ) { mxTextCursor = xTextCursor; }
void Move( const css::uno::Any& _unit, const css::uno::Any& _count, const css::uno::Any& _extend, ooo::vba::word::E_DIRECTION eDirection ) throw (css::uno::RuntimeException);
More information about the Libreoffice-commits
mailing list