summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-01-28 19:40:54 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-01-29 15:39:56 +0100
commit11670f4949ab5cea02d66b187f04c4e5e5efe4a3 (patch)
tree7bf89706e1bfac2038c02da3383e017dda1f6606 /sw/source
parent7058bf6c3d41f8390befc04cad871f8b930ace29 (diff)
Remove double line spacing, unused code and some unnecessary brackets.
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/docnode/finalthreadmanager.cxx38
-rw-r--r--sw/source/core/text/inftxt.cxx33
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx20
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.hxx21
-rw-r--r--sw/source/filter/ww8/ww8attributeoutput.hxx13
5 files changed, 2 insertions, 123 deletions
diff --git a/sw/source/core/docnode/finalthreadmanager.cxx b/sw/source/core/docnode/finalthreadmanager.cxx
index 8fd06b84bfa2..586010c5a2b5 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 6f7d185a66e8..6137324901ab 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 2c8677889496..f3cb8af9200d 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 17de6060d331..13535f7e3234 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 3553d320a1c0..b09748918c7e 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.