[Libreoffice-commits] .: 3 commits - sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Dec 25 16:51:23 PST 2012
sw/source/filter/ww1/w1class.cxx | 2 +-
sw/source/filter/ww1/w1class.hxx | 18 +++++++++---------
sw/source/filter/ww1/w1filter.cxx | 30 +++++++++++++++---------------
sw/source/filter/ww1/w1sprm.cxx | 10 ++--------
sw/source/filter/ww8/rtfexport.cxx | 6 +++---
sw/source/filter/ww8/rtfexport.hxx | 3 +--
sw/source/filter/ww8/wrtw8esh.cxx | 4 ++--
sw/source/filter/ww8/wrtw8nds.cxx | 4 ++--
sw/source/filter/ww8/ww8par.cxx | 6 +++---
sw/source/filter/ww8/ww8par2.cxx | 2 +-
10 files changed, 39 insertions(+), 46 deletions(-)
New commits:
commit 7af975da68a51aa640ca6cd239f98ee1f7b9ef45
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Tue Dec 25 22:21:15 2012 +0900
Drop unused variable
Change-Id: Iccfc052323f61f8b5416c7e4c68df3c7aeeb3b1c
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index 1db1a2d..6cd33ce 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -152,7 +152,6 @@ public:
/// This is used by OutputFlyFrame_Impl() to control the written syntax
bool bRTFFlySyntax;
- sal_Bool m_bOutStyleTab : 1;
SvStream& Strm();
SvStream& OutULong( sal_uLong nVal );
SvStream& OutLong( long nVal );
commit 31e7ef32646dee9aea1b455e9f408ec0dc0be54a
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Tue Dec 25 22:20:32 2012 +0900
Nuke unreachable code
Change-Id: Id6db5aafda2f240225e6655ca7d5f594b072be31
diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx
index 9534483..0a7b243 100644
--- a/sw/source/filter/ww1/w1sprm.cxx
+++ b/sw/source/filter/ww1/w1sprm.cxx
@@ -321,7 +321,6 @@ void Ww1SingleSprmPDyaLine::Start(
if(nSpace < 0)
nSpace = -nSpace;
SvxLineSpacingItem aLSpc( LINE_SPACE_DEFAULT_HEIGHT, RES_PARATR_LINESPACING );
- if(sal_True)
{// MultilineSpace(proportional)
long n = nSpace * 100 / 240; // W1: 240 = 100%, SW: 100 = 100%
if(n>200)
@@ -329,11 +328,6 @@ void Ww1SingleSprmPDyaLine::Start(
aLSpc.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
aLSpc.SetPropLineSpace((sal_uInt8)n);
}
- else
- {// Fixed / Minimum
- aLSpc.SetLineHeight((sal_uInt16)nSpace);
- aLSpc.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF;
- }
rOut << aLSpc;
}
commit 5bfe7ed9e7a3fdb3106ab8d61624ba0136073fb9
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Tue Dec 25 22:17:38 2012 +0900
sal_Bool to bool
Change-Id: I42b4d27101f663a75aa8fc1c13e5ec3f03c8a2da
diff --git a/sw/source/filter/ww1/w1class.cxx b/sw/source/filter/ww1/w1class.cxx
index 28b5435..e39e8d3 100644
--- a/sw/source/filter/ww1/w1class.cxx
+++ b/sw/source/filter/ww1/w1class.cxx
@@ -1188,7 +1188,7 @@ void Ww1Chp::operator++()
////////////////////////////////////////////////////////////// Manager
Ww1Manager::Ww1Manager(SvStream& rStrm, sal_uLong nFieldFlgs)
- : bOK(sal_False), bInTtp(sal_False), bInStyle(sal_False), bStopAll(sal_False), aFib(rStrm),
+ : bOK(sal_False), bInTtp(false), bInStyle(false), bStopAll(false), aFib(rStrm),
aDop(aFib), aFonts(aFib, nFieldFlgs), aDoc(aFib), pDoc(&aDoc),
ulDocSeek(0), pSeek(&ulDocSeek), aFld(aFib), pFld(&aFld), aChp(aFib),
aPap(aFib), aFtn(aFib), aBooks(aFib),
diff --git a/sw/source/filter/ww1/w1class.hxx b/sw/source/filter/ww1/w1class.hxx
index acc52a1..b6cb854 100644
--- a/sw/source/filter/ww1/w1class.hxx
+++ b/sw/source/filter/ww1/w1class.hxx
@@ -1496,9 +1496,9 @@ public:
class Ww1Manager
{
sal_Bool bOK;
- sal_Bool bInTtp;
- sal_Bool bInStyle;
- sal_Bool bStopAll;
+ bool bInTtp;
+ bool bInStyle;
+ bool bStopAll;
Ww1Fib aFib;
Ww1Dop aDop;
Ww1Fonts aFonts;
@@ -1526,12 +1526,12 @@ public:
sal_Bool GetError() const { return !bOK; }
// Fuer Tabellen
- void SetInTtp(sal_Bool bSet = sal_True) { bInTtp = bSet; }
- sal_Bool IsInTtp() const { return bInTtp; }
- void SetInStyle(sal_Bool bSet = sal_True) { bInStyle = bSet; }
- sal_Bool IsInStyle() const { return bInStyle; }
- void SetStopAll(sal_Bool bSet = sal_True) { bStopAll = bSet; }
- sal_Bool IsStopAll() const { return bStopAll; }
+ void SetInTtp(bool bSet = true) { bInTtp = bSet; }
+ bool IsInTtp() const { return bInTtp; }
+ void SetInStyle(bool bSet = true) { bInStyle = bSet; }
+ bool IsInStyle() const { return bInStyle; }
+ void SetStopAll(bool bSet = true) { bStopAll = bSet; }
+ bool IsStopAll() const { return bStopAll; }
sal_Bool HasInTable();
sal_Bool HasTtp();
sal_Bool LastHasTtp();
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index bf31f5a..9aa1755 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -96,9 +96,9 @@ Ww1Shell& operator <<(Ww1Shell& rOut, Ww1Manager& This)
if (!This.Pushed())
{
{ // der wird nur temporaer gebraucht:
- This.SetInStyle( sal_True );
+ This.SetInStyle( true );
Ww1StyleSheet(This.aFib).Out(rOut, This);
- This.SetInStyle( sal_False );
+ This.SetInStyle( false );
}
{ // dieser auch:
Ww1Assoc(This.aFib).Out(rOut);
@@ -128,9 +128,9 @@ Ww1Shell& operator <<(Ww1Shell& rOut, Ww1Manager& This)
// ist:
cUnknown = This.pDoc->Out(rOut, *This.pSeek);
}
- This.SetStopAll(sal_True);
+ This.SetStopAll(true);
This.OutStop(rOut, cUnknown); // Damit die Attribute am Ende geschlossen
- This.SetStopAll(sal_False); // werden
+ This.SetStopAll(false); // werden
return rOut;
}
@@ -213,7 +213,7 @@ void Ww1Manager::Out(Ww1Shell& rOut, sal_Unicode cUnknown)
// Optimierung: Sie werden nur auf sinnvolle Werte gesetzt, wenn
// das 0x07-Zeiche ansteht.
- sal_Bool bLIsTtp = sal_False;
+ bool bLIsTtp = false;
sal_Bool bLHasTtp = sal_False;
if( cUnknown == 0x07 )
{
@@ -484,7 +484,7 @@ static WWDateTime GetTimeDatePara( const String& rForm,
DFF_DDDMMMY, DFF_DDDMMMY, DFF_DDDMMMYY, DFF_DDDMMMYY
};
- sal_Bool bHasDay = STRING_NOTFOUND != rForm.Search( 't' ) ||
+ bool bHasDay = STRING_NOTFOUND != rForm.Search( 't' ) ||
STRING_NOTFOUND != rForm.Search( 'T' ) ||
STRING_NOTFOUND != rForm.Search( 'd' ) ||
STRING_NOTFOUND != rForm.Search( 'D' );
@@ -603,7 +603,7 @@ void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 nDepth)
pData = GetData();
}
OSL_ENSURE(pData->chGet()==21, "Ww1PlainText");
- sal_Bool bKnown = sal_True;
+ bool bKnown = true;
OSL_ENSURE(pField==0, "Ww1PlainText");
if (pField != 0)
{
@@ -678,7 +678,7 @@ oncemore:
IS("anzzeichen", "numberofchars", 28)
IS("dateiname", "filename", 29)
IS("vorlage", "templatename", 30)
- bKnown = sal_False;
+ bKnown = false;
#undef IS
if (rbType != 14)
goto oncemore;
@@ -923,14 +923,14 @@ oncemore:
|| sExt.EqualsIgnoreCaseAscii( ".pic" ))
rOut.AddGraphic( sName );
else
- bKnown = sal_False;
+ bKnown = false;
}
else
- bKnown = sal_False;
+ bKnown = false;
}
break;
default: // unknown
- OSL_ENSURE(sal_False, "Ww1PlainText");
+ OSL_ENSURE(false, "Ww1PlainText");
// unsupported:
case 1: // unknown
case 2: // possible bookmark
@@ -964,7 +964,7 @@ oncemore:
case 52: // auto number outline
case 53: // auto number legal
case 54: // auto number arabic
- bKnown = sal_False;
+ bKnown = false;
break;
}
if( bKnown || sErgebnis.EqualsAscii( "\270" ))
@@ -1083,7 +1083,7 @@ void W1_CHP::Out(Ww1Shell& rOut, Ww1Manager& rMan)
rOut << SvxUnderlineItem(UNDERLINE_NONE, RES_CHRATR_UNDERLINE) <<
SvxWordLineModeItem(sal_False, RES_CHRATR_WORDLINEMODE);
} break;
- default: OSL_ENSURE(sal_False, "Chpx");
+ default: OSL_ENSURE(false, "Chpx");
case 1: {
rOut << SvxUnderlineItem(UNDERLINE_SINGLE, RES_CHRATR_UNDERLINE);
} break;
@@ -1101,7 +1101,7 @@ void W1_CHP::Out(Ww1Shell& rOut, Ww1Manager& rMan)
if (fsIcoGet())
switch(icoGet()) {
- default: OSL_ENSURE(sal_False, "Chpx");
+ default: OSL_ENSURE(false, "Chpx");
case 0: { rOut.EndItem(RES_CHRATR_COLOR); } break;
case 1: { rOut << SvxColorItem(Color(COL_BLACK), RES_CHRATR_COLOR); } break;
case 2: { rOut << SvxColorItem(Color(COL_LIGHTBLUE), RES_CHRATR_COLOR); } break;
@@ -1373,7 +1373,7 @@ SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode)
}
else
{
- OSL_ENSURE(sal_False, "WW1Fonts::GetFont: Nicht existenter Font !");
+ OSL_ENSURE(false, "WW1Fonts::GetFont: Nicht existenter Font !");
eFamily = FAMILY_SWISS;
aName.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "Helv" ));
ePitch = PITCH_VARIABLE;
diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx
index a1ec40e..9534483 100644
--- a/sw/source/filter/ww1/w1sprm.cxx
+++ b/sw/source/filter/ww1/w1sprm.cxx
@@ -229,7 +229,7 @@ SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc
pLine->SetWidth( DEF_LINE_WIDTH_0 );
}
else
- OSL_ENSURE(sal_False, "unknown linewidth");
+ OSL_ENSURE(false, "unknown linewidth");
}
return pLine;
}
@@ -415,7 +415,7 @@ void Ww1SingleSprmSColumns::Start(
void Ww1SingleSprmPTtp::Start(
Ww1Shell& /*rOut*/, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager& rMan)
{
- rMan.SetInTtp( sal_True ); // Besonderheit: wird bei InTable::Stop und
+ rMan.SetInTtp( true ); // Besonderheit: wird bei InTable::Stop und
// nicht bei InTtp::Stop zurueckgesetzt,
// da Auswertung in InTable
}
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 0d874d8..a9e6c5d 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -436,7 +436,7 @@ void RtfExport::WritePageDescTable()
OutULong( n ) << OOO_STRING_SVTOOLS_RTF_PGDSCUSE;
OutULong( rPageDesc.ReadUseOn() );
- OutPageDescription( rPageDesc, sal_False, sal_False );
+ OutPageDescription( rPageDesc, false, false );
// search for the next page description
sal_uInt16 i = nSize;
@@ -590,7 +590,7 @@ void RtfExport::ExportDocument_Impl()
// All sections are unlocked by default
Strm() << OOO_STRING_SVTOOLS_RTF_SECTUNLOCKED;
OutLong(1);
- OutPageDescription( rPageDesc, sal_False, sal_True ); // Changed bCheckForFirstPage to sal_True so headers
+ OutPageDescription( rPageDesc, false, true ); // Changed bCheckForFirstPage to sal_True so headers
// following title page are correctly added - i13107
if( pSttPgDsc )
{
@@ -1009,7 +1009,7 @@ const String* RtfExport::GetRedline( sal_uInt16 nId )
return NULL;
}
-void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, sal_Bool bWriteReset, sal_Bool bCheckForFirstPage )
+void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, bool bWriteReset, bool bCheckForFirstPage )
{
SAL_INFO("sw.rtf", OSL_THIS_FUNC << " start");
const SwPageDesc *pSave = pAktPageDesc;
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index c21a5e9..1db1a2d 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -158,7 +158,7 @@ public:
SvStream& OutLong( long nVal );
void OutUnicode(const sal_Char *pToken, const String &rContent);
void OutDateTime(const sal_Char* pStr, const util::DateTime& rDT );
- void OutPageDescription( const SwPageDesc& rPgDsc, sal_Bool bWriteReset, sal_Bool bCheckForFirstPage );
+ void OutPageDescription( const SwPageDesc& rPgDsc, bool bWriteReset, bool bCheckForFirstPage );
sal_uInt16 GetColor( const Color& rColor ) const;
void InsColor( const Color& rCol );
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 216f132..ed206c4 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -1529,7 +1529,7 @@ sal_Int32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nSh
// the left, top corner is set to ( 0, 0 ) by default constructor,
// if the width and height are set correctly bRectIsSet should be set to true
awt::Rectangle aRect;
- sal_Bool bRectIsSet = sal_False;
+ bool bRectIsSet = false;
// TODO/LATER: should the icon size be stored in case of iconified object?
@@ -1540,7 +1540,7 @@ sal_Int32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nSh
awt::Size aSize = xObj->getVisualAreaSize( nAspect );
aRect.Width = aSize.Width;
aRect.Height = aSize.Height;
- bRectIsSet = sal_True;
+ bRectIsSet = true;
}
catch( const uno::Exception& )
{}
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index aabd3f3..ebb0677 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2094,11 +2094,11 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
}
}
- sal_Bool bParaRTL = sal_False;
+ bool bParaRTL = false;
const SvxFrameDirectionItem* pItem = (const SvxFrameDirectionItem*)
rNode.GetSwAttrSet().GetItem(RES_FRAMEDIR);
if ( aAttrIter.IsParaRTL())
- bParaRTL = sal_True;
+ bParaRTL = true;
if( rNode.IsNumbered())
{
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index e71b6c0..268ed91 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -463,7 +463,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
//textbox, this was changed for #88277# to be created as a simple
//rect to keep impress happy. For the rest of us we'd like to turn
//it back into a textbox again.
- sal_Bool bIsSimpleDrawingTextBox = (pImpRec->eShapeType == mso_sptTextBox);
+ bool bIsSimpleDrawingTextBox = (pImpRec->eShapeType == mso_sptTextBox);
if (!bIsSimpleDrawingTextBox)
{
//Either
@@ -2977,11 +2977,11 @@ bool SwWW8ImplReader::HandlePageBreakChar()
if (!nInTable)
{
//xushanchuan add for issue106569
- sal_Bool IsTemp=sal_True;
+ bool IsTemp=true;
SwTxtNode* pTemp = pPaM->GetNode()->GetTxtNode();
if ( pTemp && !( pTemp->GetTxt().Len() ) && ( bFirstPara || bFirstParaOfPage ) )
{
- IsTemp = sal_False;
+ IsTemp = false;
AppendTxtNode(*pPaM->GetPoint());
pTemp->SetAttr(*GetDfltAttr(RES_PARATR_NUMRULE));
}
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 6eaf2d0..3e1ccd0 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3058,7 +3058,7 @@ void WW8TabDesc::SetTabShades( SwTableBox* pBox, short nWwIdx )
}
}
-SvxFrameDirection MakeDirection(sal_uInt16 nCode, sal_Bool bIsBiDi)
+SvxFrameDirection MakeDirection(sal_uInt16 nCode, bool bIsBiDi)
{
SvxFrameDirection eDir = FRMDIR_ENVIRONMENT;
// 1: Asian layout with rotated CJK characters
More information about the Libreoffice-commits
mailing list