[Libreoffice-commits] .: 3 commits - sw/source
Thomas Arnhold
tarnhold at kemper.freedesktop.org
Sat Jan 29 06:41:29 PST 2011
sw/source/core/docnode/finalthreadmanager.cxx | 38 +-------------------------
sw/source/core/text/frmform.cxx | 9 ------
sw/source/core/text/frmpaint.cxx | 4 --
sw/source/core/text/inftxt.cxx | 33 ----------------------
sw/source/core/text/itradj.cxx | 3 --
sw/source/core/text/itrpaint.cxx | 5 ---
sw/source/core/text/itrtxt.cxx | 9 ------
sw/source/core/text/porlin.hxx | 7 ----
sw/source/filter/ww8/docxattributeoutput.hxx | 20 -------------
sw/source/filter/ww8/rtfattributeoutput.hxx | 21 --------------
sw/source/filter/ww8/ww8attributeoutput.hxx | 13 --------
sw/source/filter/ww8/ww8par5.cxx | 4 --
12 files changed, 2 insertions(+), 164 deletions(-)
New commits:
commit b80828bfa0045a230b32d1b5805cbe7a18c87e13
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri Jan 28 22:34:57 2011 +0100
cppcheck: remove unused variable bHidden.
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 7500453..7dc1bf4 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -1536,7 +1536,6 @@ eF_ResT SwWW8ImplReader::Read_F_Seq( WW8FieldDesc*, String& rStr )
{
String aSequenceName;
String aBook;
- bool bHidden = false;
bool bFormat = false;
bool bShowLast = false;
bool bCountOn = true;
@@ -1556,13 +1555,10 @@ eF_ResT SwWW8ImplReader::Read_F_Seq( WW8FieldDesc*, String& rStr )
break;
case 'h':
- if( !bFormat )
- bHidden = true; // Hidden-Flag aktivieren
break;
case '*':
bFormat = true; // Format-Flag aktivieren
- bHidden = false; // Hidden-Flag deaktivieren
nRet = aReadParam.SkipToNextToken();
if( -2 == nRet )
eNumFormat = GetNumTypeFromName( aReadParam.GetResult() );
commit f4a50eb6fbcfdbc2c67322e4e9ab6dd94fdf2f8c
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri Jan 28 21:55:02 2011 +0100
Remove DBGTXT.
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index bde7d70..6616a20 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -790,12 +790,6 @@ SwCntntFrm *SwTxtFrm::SplitFrm( const xub_StrLen nTxtPos )
void SwTxtFrm::_SetOfst( const xub_StrLen nNewOfst )
{
-#ifdef DBGTXT
- // Es gibt tatsaechlich einen Sonderfall, in dem ein SetOfst(0)
- // zulaessig ist: bug 3496
- OSL_ENSURE( nNewOfst, "!SwTxtFrm::SetOfst: missing JoinFrm()." );
-#endif
-
// Die Invalidierung unseres Follows ist nicht noetig.
// Wir sind ein Follow, werden gleich formatiert und
// rufen von dort aus das SetOfst() !
@@ -1699,9 +1693,6 @@ void SwTxtFrm::FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
sal_uInt8 nGo = 0;
while( bGoOn )
{
-#ifdef DBGTXT
- aDbstream << "OnceMore!" << endl;
-#endif
++nGo;
rInf.Init();
rLine.Top();
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 10804a6..b74f2d4 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -619,10 +619,6 @@ void SwTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/ )
(void)nDbgY;
#endif
-#ifdef DBGTXT
- if( IsDbg( this ) )
- DBTXTFRM << "Paint()" << endl;
-#endif
if( IsLocked() || IsHiddenNow() || ! Prt().HasArea() )
return;
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index a0c3e3d..4f667f7 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -882,9 +882,6 @@ void SwTxtAdjuster::CalcDropAdjust()
pLeft->MoveAllGlue( pRight );
else
pLeft->MoveGlue( pRight, nGlue );
-#ifdef DBGTXT
- aDbstream << "Drop adjusted: " << nGlue << endl;
-#endif
}
}
}
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index a8cac07..2419d66 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -264,12 +264,7 @@ void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
}
if( !pPor && !bEndPor )
- {
-#ifdef DBGTXT
- aDbstream << "PAINTER: done nothing" << endl;
-#endif
return;
- }
// Baseline-Ausgabe auch bei nicht-TxtPortions (vgl. TabPor mit Fill)
// if no special vertical alignment is used,
diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx
index 5a4b98d..640182b 100644
--- a/sw/source/core/text/itrtxt.cxx
+++ b/sw/source/core/text/itrtxt.cxx
@@ -58,15 +58,6 @@
void SwTxtIter::CtorInitTxtIter( SwTxtFrm *pNewFrm, SwTxtInfo *pNewInf )
{
-#ifdef DBGTXT
- // nStopAt laesst sich vom CV bearbeiten.
- static MSHORT nStopAt = 0;
- if( nStopAt == pNewFrm->GetFrmId() )
- {
- int i = pNewFrm->GetFrmId();
- }
-#endif
-
SwTxtNode *pNode = pNewFrm->GetTxtNode();
OSL_ENSURE( pNewFrm->GetPara(), "No paragraph" );
diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx
index a3ff1b4..0d74613 100644
--- a/sw/source/core/text/porlin.hxx
+++ b/sw/source/core/text/porlin.hxx
@@ -245,14 +245,7 @@ inline void SwLinePortion::Truncate()
//$ ostream
-#ifdef DBGTXT
-#define CLASSIO( class ) \
- inline SvStream &operator<<( SvStream &rOs, const class &rClass ) {\
- return rClass.operator<<( rOs );\
- }
-#else
#define CLASSIO( class )
-#endif
CLASSIO( SwLinePortion )
commit 30ef44cfa314df4845a57d8a87ff3d4d83fd4486
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri Jan 28 19:40:54 2011 +0100
Remove double line spacing, unused code and some unnecessary brackets.
diff --git a/sw/source/core/docnode/finalthreadmanager.cxx b/sw/source/core/docnode/finalthreadmanager.cxx
index 6d5d0c9..5698f2e 100644
--- a/sw/source/core/docnode/finalthreadmanager.cxx
+++ b/sw/source/core/docnode/finalthreadmanager.cxx
@@ -60,21 +60,16 @@ class CancelJobsThread : public osl::Thread
virtual ~CancelJobsThread() {}
void addJobs( std::list< css::uno::Reference< css::util::XCancellable > >& rJobs );
-
bool allJobsCancelled() const;
-
void stopWhenAllJobsCancelled();
private:
-
bool existJobs() const;
css::uno::Reference< css::util::XCancellable > getNextJob();
bool stopped() const;
-
virtual void SAL_CALL run();
-
mutable osl::Mutex maMutex;
std::list< css::uno::Reference< css::util::XCancellable > > maJobs;
@@ -143,9 +138,7 @@ void SAL_CALL CancelJobsThread::run()
{
css::uno::Reference< css::util::XCancellable > aJob( getNextJob() );
if ( aJob.is() )
- {
aJob->cancel();
- }
}
mbAllJobsCancelled = true;
@@ -179,22 +172,17 @@ class TerminateOfficeThread : public osl::Thread
}
virtual ~TerminateOfficeThread() {}
-
void StopOfficeTermination();
private:
-
virtual void SAL_CALL run();
virtual void SAL_CALL onTerminated();
-
bool OfficeTerminationStopped();
-
void PerformOfficeTermination();
osl::Mutex maMutex;
const CancelJobsThread& mrCancelJobsThread;
-
bool mbStopOfficeTermination;
css::uno::Reference< css::uno::XComponentContext > mxContext;
@@ -221,15 +209,11 @@ void SAL_CALL TerminateOfficeThread::run()
osl::MutexGuard aGuard(maMutex);
if ( mrCancelJobsThread.allJobsCancelled() )
- {
break;
- }
}
if ( !OfficeTerminationStopped() )
- {
PerformOfficeTermination();
- }
}
void TerminateOfficeThread::PerformOfficeTermination()
@@ -256,18 +240,14 @@ void TerminateOfficeThread::PerformOfficeTermination()
{
css::uno::Reference< css::frame::XDesktop > xDesktop( xTasksSupplier, css::uno::UNO_QUERY );
if ( xDesktop.is() && !OfficeTerminationStopped() )
- {
xDesktop->terminate();
- }
}
}
void SAL_CALL TerminateOfficeThread::onTerminated()
{
if ( OfficeTerminationStopped() )
- {
delete this;
- }
}
@@ -296,9 +276,7 @@ void FinalThreadManager::registerAsListenerAtDesktop()
css::uno::UNO_QUERY );
if ( xDesktop.is() )
- {
xDesktop->addTerminateListener( css::uno::Reference< css::frame::XTerminateListener >( static_cast< cppu::OWeakObject* >( this ), css::uno::UNO_QUERY ) );
- }
}
FinalThreadManager::~FinalThreadManager()
@@ -324,9 +302,7 @@ FinalThreadManager::~FinalThreadManager()
if ( mpCancelJobsThread != 0 )
{
if ( !mpCancelJobsThread->allJobsCancelled() )
- {
OSL_ENSURE( false, "<FinalThreadManager::~FinalThreadManager()> - cancellation of registered jobs not yet finished -> wait for its finish" );
- }
mpCancelJobsThread->stopWhenAllJobsCancelled();
mpCancelJobsThread->join();
@@ -406,9 +382,7 @@ void SAL_CALL FinalThreadManager::cancelAllJobs() throw (css::uno::RuntimeExcept
}
}
else
- {
mpCancelJobsThread->addJobs( aThreads );
- }
}
}
@@ -435,13 +409,10 @@ void SAL_CALL FinalThreadManager::queryTermination( const css::lang::EventObject
if ( mpTerminateOfficeThread != 0 )
{
if ( mpTerminateOfficeThread->isRunning() )
- {
mpTerminateOfficeThread->StopOfficeTermination(); // thread kills itself.
- }
else
- {
delete mpTerminateOfficeThread;
- }
+
mpTerminateOfficeThread = 0;
}
mpTerminateOfficeThread = new TerminateOfficeThread( *mpCancelJobsThread,
@@ -476,20 +447,15 @@ void SAL_CALL FinalThreadManager::notifyTermination( const css::lang::EventObjec
if ( mpTerminateOfficeThread != 0 )
{
if ( mpTerminateOfficeThread->isRunning() )
- {
mpTerminateOfficeThread->StopOfficeTermination(); // thread kills itself.
- }
else
- {
delete mpTerminateOfficeThread;
- }
+
mpTerminateOfficeThread = 0;
}
if ( !maThreads.empty() )
- {
cancelAllJobs();
- }
if ( mpCancelJobsThread != 0 )
{
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 5e52ce2..ab668cf 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -117,29 +117,17 @@ static sal_Bool bDbgLow = sal_False;
#endif
#if OSL_DEBUG_LEVEL > 1
-
sal_Bool SwTxtSizeInfo::IsOptCalm() const { return !GetOpt().IsTest3(); }
-
sal_Bool SwTxtSizeInfo::IsOptLow() const { return bDbgLow; }
-
sal_Bool SwTxtSizeInfo::IsOptDbg() const { return GetOpt().IsTest4(); }
-
sal_Bool SwTxtSizeInfo::IsOptTest1() const { return GetOpt().IsTest1(); }
-
sal_Bool SwTxtSizeInfo::IsOptTest2() const { return GetOpt().IsTest2(); }
-
sal_Bool SwTxtSizeInfo::IsOptTest3() const { return GetOpt().IsTest3(); }
-
sal_Bool SwTxtSizeInfo::IsOptTest4() const { return GetOpt().IsTest4(); }
-
sal_Bool SwTxtSizeInfo::IsOptTest5() const { return GetOpt().IsTest5(); }
-
sal_Bool SwTxtSizeInfo::IsOptTest6() const { return GetOpt().IsTest6(); }
-
sal_Bool SwTxtSizeInfo::IsOptTest7() const { return GetOpt().IsTest7(); }
-
sal_Bool SwTxtSizeInfo::IsOptTest8() const { return GetOpt().IsTest8(); }
-
#endif
/*************************************************************************
@@ -163,7 +151,6 @@ SwLineInfo::~SwLineInfo()
void SwLineInfo::CtorInitLineInfo( const SwAttrSet& rAttrSet,
const SwTxtNode& rTxtNode )
{
-// pRuler = &rAttrSet.GetTabStops();
delete pRuler;
pRuler = new SvxTabStopItem( rAttrSet.GetTabStops() );
if ( rTxtNode.GetListTabStopPosition( nListTabStopPosition ) )
@@ -336,18 +323,6 @@ void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt,
nDirection = DIR_LEFT2RIGHT;
}
-/* LanguageType eLang;
- const SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions();
- if ( SvtCTLOptions::NUMERALS_HINDI == rCTLOptions.GetCTLTextNumerals() )
- eLang = LANGUAGE_ARABIC_SAUDI_ARABIA;
- else if ( SvtCTLOptions::NUMERALS_ARABIC == rCTLOptions.GetCTLTextNumerals() )
- eLang = LANGUAGE_ENGLISH;
- else
- eLang = (LanguageType)::GetAppLanguage();
-
- pOut->SetDigitLanguage( eLang );
- pRef->SetDigitLanguage( eLang );*/
-
//
// The Options
//
@@ -1626,12 +1601,6 @@ xub_StrLen SwTxtFormatInfo::ScanPortionEnd( const xub_StrLen nStart,
bool bNumFound = false;
const bool bTabCompat = GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_COMPAT);
- // Removed for i7288. bSkip used to be passed from SwFldPortion::Format
- // as IsFollow(). Therefore more than one special character was not
- // handled correctly at the beginning of follow fields.
-// if ( bSkip && i < nEnd )
-// ++i;
-
for( ; i < nEnd; ++i )
{
const xub_Unicode cPos = GetChar( i );
@@ -1650,8 +1619,6 @@ xub_StrLen SwTxtFormatInfo::ScanPortionEnd( const xub_StrLen nStart,
case CH_BREAK:
case CHAR_ZWSP :
case CHAR_ZWNBSP :
-// case CHAR_RLM :
-// case CHAR_LRM :
cHookChar = cPos;
return i;
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index e72dd49..afec908 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -140,31 +140,18 @@ public:
virtual void ParagraphStyle( USHORT nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo );
-
virtual void TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner );
-
virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableRowEnd( sal_uInt32 nDepth = 1 );
/// Start of the styles table.
@@ -307,19 +294,12 @@ private:
void WriteOLE2Obj( const SdrObject* pSdrObj, const Size& rSize );
void InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void EndTableCell( );
-
void EndTableRow( );
-
void EndTable();
/// End cell, row, and even the entire table if necessary.
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index 17de606..13535f7 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -116,31 +116,18 @@ public:
virtual void ParagraphStyle( USHORT nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo );
-
virtual void TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner );
-
virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableRowEnd( sal_uInt32 nDepth );
/// Start of the styles table.
@@ -439,21 +426,13 @@ private:
/*
* Table methods.
*/
-
void InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
void EndTableCell( );
-
void EndTableRow( );
-
void EndTable();
/// End cell, row, and even the entire table if necessary.
diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx
index 5300b85..0779ce4 100644
--- a/sw/source/filter/ww8/ww8attributeoutput.hxx
+++ b/sw/source/filter/ww8/ww8attributeoutput.hxx
@@ -102,31 +102,18 @@ public:
virtual void ParagraphStyle( USHORT nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
-
virtual void TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo );
-
virtual void TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner );
-
virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
-
virtual void TableRowEnd( sal_uInt32 nDepth = 1 );
/// Start of the styles table.
More information about the Libreoffice-commits
mailing list