Kaydet (Commit) 3fa2c6da authored tarafından Takeshi Abe's avatar Takeshi Abe

sal_Bool to bool

Change-Id: Ib83c02d53fbae6a70781d9d9d7ab015b016c72a8
üst 68d40d2c
...@@ -431,9 +431,9 @@ public: ...@@ -431,9 +431,9 @@ public:
SwViewOption& operator=( const SwViewOption &rOpt ); SwViewOption& operator=( const SwViewOption &rOpt );
// Compare methods. // Compare methods.
sal_Bool IsEqualFlags ( const SwViewOption &rOpt ) const; bool IsEqualFlags ( const SwViewOption &rOpt ) const;
inline sal_Bool operator == ( const SwViewOption &rOpt ) const; inline bool operator == ( const SwViewOption &rOpt ) const;
inline sal_Bool operator != ( const SwViewOption &rOpt ) const { return !(*this == rOpt); } inline bool operator != ( const SwViewOption &rOpt ) const { return !(*this == rOpt); }
/*--------------------------------------------------------------------------- /*---------------------------------------------------------------------------
...@@ -572,7 +572,7 @@ public: ...@@ -572,7 +572,7 @@ public:
}; };
inline sal_Bool SwViewOption::operator==( const SwViewOption &rOpt ) const inline bool SwViewOption::operator==( const SwViewOption &rOpt ) const
{ {
return IsEqualFlags( rOpt ) && nZoom == rOpt.GetZoom(); return IsEqualFlags( rOpt ) && nZoom == rOpt.GetZoom();
} }
......
...@@ -66,7 +66,7 @@ InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt ) ...@@ -66,7 +66,7 @@ InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt )
return *this; return *this;
} }
sal_Bool InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const bool InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const
{ {
return (eObjType == rOpt.eObjType && return (eObjType == rOpt.eObjType &&
aOleId == rOpt.aOleId); // So that identical Ole-IDs can't be added multiple aOleId == rOpt.aOleId); // So that identical Ole-IDs can't be added multiple
......
...@@ -168,9 +168,9 @@ SwStdFontConfig::~SwStdFontConfig() ...@@ -168,9 +168,9 @@ SwStdFontConfig::~SwStdFontConfig()
{ {
} }
sal_Bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const
{ {
sal_Bool bSame = sal_False; bool bSame = false;
SvtLinguOptions aLinguOpt; SvtLinguOptions aLinguOpt;
SvtLinguConfig().GetOptions( aLinguOpt ); SvtLinguConfig().GetOptions( aLinguOpt );
...@@ -210,7 +210,7 @@ sal_Bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const ...@@ -210,7 +210,7 @@ sal_Bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const
case FONT_CAPTION_CJK : case FONT_CAPTION_CJK :
case FONT_INDEX_CJK : case FONT_INDEX_CJK :
{ {
sal_Bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCJK; bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCJK;
bSame = b1 && sDefaultFonts[nFontType] == sDefFontCJK; bSame = b1 && sDefaultFonts[nFontType] == sDefFontCJK;
} }
break; break;
...@@ -218,7 +218,7 @@ sal_Bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const ...@@ -218,7 +218,7 @@ sal_Bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const
case FONT_CAPTION_CTL : case FONT_CAPTION_CTL :
case FONT_INDEX_CTL : case FONT_INDEX_CTL :
{ {
sal_Bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCTL; bool b1 = sDefaultFonts[FONT_STANDARD_CJK] == sDefFontCTL;
bSame = b1 && sDefaultFonts[nFontType] == sDefFontCTL; bSame = b1 && sDefaultFonts[nFontType] == sDefFontCTL;
} }
break; break;
......
...@@ -74,7 +74,7 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption( ...@@ -74,7 +74,7 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption(
} }
else else
{ {
sal_Bool bFound = sal_False; bool bFound = false;
if(eType == OLE_CAP && pOleId) if(eType == OLE_CAP && pOleId)
{ {
for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++) for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++)
...@@ -96,7 +96,7 @@ sal_Bool SwModuleOptions::SetCapOption(sal_Bool bHTML, const InsCaptionOpt* pOpt ...@@ -96,7 +96,7 @@ sal_Bool SwModuleOptions::SetCapOption(sal_Bool bHTML, const InsCaptionOpt* pOpt
} }
else if (pOpt) else if (pOpt)
{ {
sal_Bool bFound = sal_False; bool bFound = false;
if(pOpt->GetObjType() == OLE_CAP && &pOpt->GetOleId()) if(pOpt->GetObjType() == OLE_CAP && &pOpt->GetOleId())
{ {
for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART; nId++) for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART; nId++)
...@@ -161,7 +161,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFro ...@@ -161,7 +161,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFro
case 'x': case 'x':
{ {
sal_Unicode nVal, nChar; sal_Unicode nVal, nChar;
sal_Bool bValidData = sal_True; bool bValidData = true;
xub_StrLen n; xub_StrLen n;
for( n = 0, nChar = 0; n < 2 && i < rDelim.Len(); ++n, ++i ) for( n = 0, nChar = 0; n < 2 && i < rDelim.Len(); ++n, ++i )
{ {
...@@ -174,7 +174,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFro ...@@ -174,7 +174,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFro
else else
{ {
OSL_FAIL("wrong hex value" ); OSL_FAIL("wrong hex value" );
bValidData = sal_False; bValidData = false;
break; break;
} }
...@@ -320,7 +320,7 @@ void SwRevisionConfig::Commit() ...@@ -320,7 +320,7 @@ void SwRevisionConfig::Commit()
PutProperties(aNames, aValues); PutProperties(aNames, aValues);
} }
static void lcl_ConvertCfgToAttr(sal_Int32 nVal, AuthorCharAttr& rAttr, sal_Bool bDelete = sal_False) static void lcl_ConvertCfgToAttr(sal_Int32 nVal, AuthorCharAttr& rAttr, bool bDelete = false)
{ {
rAttr.nItemId = rAttr.nAttr = 0; rAttr.nItemId = rAttr.nAttr = 0;
switch(nVal) switch(nVal)
...@@ -364,7 +364,7 @@ void SwRevisionConfig::Load() ...@@ -364,7 +364,7 @@ void SwRevisionConfig::Load()
{ {
case 0 : lcl_ConvertCfgToAttr(nVal, aInsertAttr); break; case 0 : lcl_ConvertCfgToAttr(nVal, aInsertAttr); break;
case 1 : aInsertAttr.nColor = nVal; break; case 1 : aInsertAttr.nColor = nVal; break;
case 2 : lcl_ConvertCfgToAttr(nVal, aDeletedAttr, sal_True); break; case 2 : lcl_ConvertCfgToAttr(nVal, aDeletedAttr, true); break;
case 3 : aDeletedAttr.nColor = nVal; break; case 3 : aDeletedAttr.nColor = nVal; break;
case 4 : lcl_ConvertCfgToAttr(nVal, aFormatAttr); break; case 4 : lcl_ConvertCfgToAttr(nVal, aFormatAttr); break;
case 5 : aFormatAttr.nColor = nVal; break; case 5 : aFormatAttr.nColor = nVal; break;
......
...@@ -673,7 +673,7 @@ sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& ) ...@@ -673,7 +673,7 @@ sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& )
{ {
pWrtShell->StartAllAction(); pWrtShell->StartAllAction();
SfxPrinter* pPrinter = pWrtShell->getIDocumentDeviceAccess()->getPrinter( false ); SfxPrinter* pPrinter = pWrtShell->getIDocumentDeviceAccess()->getPrinter( false );
sal_Bool bMod = sal_False; bool bMod = false;
sal_uInt16 nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >( sal_uInt16 nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONT : nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONT :
FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONT : RES_CHRATR_CTL_FONT); FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONT : RES_CHRATR_CTL_FONT);
...@@ -689,7 +689,7 @@ sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& ) ...@@ -689,7 +689,7 @@ sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& )
aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich)); aEmptyStr, aFont.GetPitch(), aFont.GetCharSet(), nFontWhich));
SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD);
pColl->ResetFmtAttr(nFontWhich); pColl->ResetFmtAttr(nFontWhich);
bMod = sal_True; bMod = true;
} }
if(bStandardHeightChanged) if(bStandardHeightChanged)
{ {
...@@ -697,52 +697,52 @@ sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& ) ...@@ -697,52 +697,52 @@ sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& )
pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), 100, nFontHeightWhich ) ); pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), 100, nFontHeightWhich ) );
SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD);
pColl->ResetFmtAttr(nFontHeightWhich); pColl->ResetFmtAttr(nFontHeightWhich);
bMod = sal_True; bMod = true;
} }
if(sTitle != sShellTitle ) if(sTitle != sShellTitle )
{ {
lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE, pPrinter, sTitle, nFontWhich); lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE, pPrinter, sTitle, nFontWhich);
bMod = sal_True; bMod = true;
} }
if(bTitleHeightChanged) if(bTitleHeightChanged)
{ {
lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE, lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE,
sal::static_int_cast< sal_uInt16, sal_Int64 >(aTitleHeightLB.GetValue()), nFontHeightWhich); sal::static_int_cast< sal_uInt16, sal_Int64 >(aTitleHeightLB.GetValue()), nFontHeightWhich);
bMod = sal_True; bMod = true;
} }
if(sList != sShellList && (!bListDefault || !bSetListDefault )) if(sList != sShellList && (!bListDefault || !bSetListDefault ))
{ {
lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE, pPrinter, sList, nFontWhich); lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE, pPrinter, sList, nFontWhich);
bMod = sal_True; bMod = true;
} }
if(bListHeightChanged) if(bListHeightChanged)
{ {
lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE, lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE,
sal::static_int_cast< sal_uInt16, sal_Int64 >(aListHeightLB.GetValue()), nFontHeightWhich); sal::static_int_cast< sal_uInt16, sal_Int64 >(aListHeightLB.GetValue()), nFontHeightWhich);
bMod = sal_True; bMod = true;
} }
if(sLabel != sShellLabel && (!bLabelDefault || !bSetLabelDefault)) if(sLabel != sShellLabel && (!bLabelDefault || !bSetLabelDefault))
{ {
lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL, pPrinter, sLabel, nFontWhich); lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL, pPrinter, sLabel, nFontWhich);
bMod = sal_True; bMod = true;
} }
if(bLabelHeightChanged) if(bLabelHeightChanged)
{ {
lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL, lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL,
sal::static_int_cast< sal_uInt16, sal_Int64 >(aLabelHeightLB.GetValue()), nFontHeightWhich); sal::static_int_cast< sal_uInt16, sal_Int64 >(aLabelHeightLB.GetValue()), nFontHeightWhich);
bMod = sal_True; bMod = true;
} }
if(sIdx != sShellIndex && (!bIdxDefault || !bSetIdxDefault)) if(sIdx != sShellIndex && (!bIdxDefault || !bSetIdxDefault))
{ {
lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE, pPrinter, sIdx, nFontWhich); lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE, pPrinter, sIdx, nFontWhich);
bMod = sal_True; bMod = true;
} }
if(bIndexHeightChanged) if(bIndexHeightChanged)
{ {
lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE, lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE,
sal::static_int_cast< sal_uInt16, sal_Int64 >(aIndexHeightLB.GetValue()), nFontHeightWhich); sal::static_int_cast< sal_uInt16, sal_Int64 >(aIndexHeightLB.GetValue()), nFontHeightWhich);
bMod = sal_True; bMod = true;
} }
if ( bMod ) if ( bMod )
pWrtShell->SetModified(); pWrtShell->SetModified();
......
...@@ -67,7 +67,7 @@ sal_uInt16 SwViewOption::nPixelTwips = 0; // one pixel on the screen ...@@ -67,7 +67,7 @@ sal_uInt16 SwViewOption::nPixelTwips = 0; // one pixel on the screen
static const char aPostItStr[] = " "; static const char aPostItStr[] = " ";
sal_Bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
{ {
return nCoreOptions == rOpt.nCoreOptions return nCoreOptions == rOpt.nCoreOptions
&& nCore2Options == rOpt.nCore2Options && nCore2Options == rOpt.nCore2Options
......
...@@ -646,10 +646,10 @@ IMPL_LINK( SwInsertDBColAutoPilot, DblClickHdl, ListBox*, pBox ) ...@@ -646,10 +646,10 @@ IMPL_LINK( SwInsertDBColAutoPilot, DblClickHdl, ListBox*, pBox )
IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton ) IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
{ {
SwWrtShell& rSh = pView->GetWrtShell(); SwWrtShell& rSh = pView->GetWrtShell();
sal_Bool bNewSet = sal_False; bool bNewSet = false;
if( !pTblSet ) if( !pTblSet )
{ {
bNewSet = sal_True; bNewSet = true;
pTblSet = new SfxItemSet( rSh.GetAttrPool(), SwuiGetUITableAttrRange() ); pTblSet = new SfxItemSet( rSh.GetAttrPool(), SwuiGetUITableAttrRange() );
// At first acquire the simple attributes // At first acquire the simple attributes
...@@ -1054,7 +1054,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, ...@@ -1054,7 +1054,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
for( sal_Int32 i = 0 ; ; ++i ) for( sal_Int32 i = 0 ; ; ++i )
{ {
sal_Bool bBreak = sal_False; bool bBreak = false;
try try
{ {
if(pSelection) if(pSelection)
...@@ -1068,7 +1068,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, ...@@ -1068,7 +1068,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
} }
catch (const Exception&) catch (const Exception&)
{ {
bBreak = sal_True; bBreak = true;
} }
if(bBreak) if(bBreak)
break; break;
...@@ -1243,12 +1243,12 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, ...@@ -1243,12 +1243,12 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
rtl::OUString("1"), aEmptyStr, aDBData ); rtl::OUString("1"), aEmptyStr, aDBData );
sal_Bool bSetCrsr = sal_True; bool bSetCrsr = true;
sal_uInt16 n = 0, nCols = aColArr.size(); sal_uInt16 n = 0, nCols = aColArr.size();
::sw::mark::IMark* pMark = NULL; ::sw::mark::IMark* pMark = NULL;
for( sal_Int32 i = 0 ; ; ++i ) for( sal_Int32 i = 0 ; ; ++i )
{ {
sal_Bool bBreak = sal_False; bool bBreak = false;
try try
{ {
if(pSelection) if(pSelection)
...@@ -1262,7 +1262,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, ...@@ -1262,7 +1262,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
} }
catch (const Exception&) catch (const Exception&)
{ {
bBreak = sal_True; bBreak = true;
} }
if(bBreak) if(bBreak)
...@@ -1369,7 +1369,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, ...@@ -1369,7 +1369,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
::rtl::OUString(), IDocumentMarkAccess::UNO_BOOKMARK ); ::rtl::OUString(), IDocumentMarkAccess::UNO_BOOKMARK );
rSh.SwCrsrShell::MovePara( rSh.SwCrsrShell::MovePara(
GetfnParaCurr(), GetfnParaEnd() ); GetfnParaCurr(), GetfnParaEnd() );
bSetCrsr = sal_False; bSetCrsr = false;
} }
} }
...@@ -1526,15 +1526,15 @@ static rtl::OUString lcl_CreateUniqueName(const Sequence<rtl::OUString>& aNames) ...@@ -1526,15 +1526,15 @@ static rtl::OUString lcl_CreateUniqueName(const Sequence<rtl::OUString>& aNames)
const rtl::OUString* pNames = aNames.getConstArray(); const rtl::OUString* pNames = aNames.getConstArray();
rtl::OUString sTest("_"); rtl::OUString sTest("_");
rtl::OUString sRet; rtl::OUString sRet;
while(sal_True) while(true)
{ {
sRet = sTest; sRet += rtl::OUString::valueOf(nIdx++); sRet = sTest; sRet += rtl::OUString::valueOf(nIdx++);
sal_Bool bFound = sal_False; bool bFound = false;
for(sal_Int32 i = 0; i < aNames.getLength(); i++) for(sal_Int32 i = 0; i < aNames.getLength(); i++)
{ {
if(pNames[i] == sRet) if(pNames[i] == sRet)
{ {
bFound = sal_True; bFound = true;
break; break;
} }
} }
...@@ -1733,12 +1733,12 @@ void SwInsertDBColAutoPilot::Load() ...@@ -1733,12 +1733,12 @@ void SwInsertDBColAutoPilot::Load()
rtl::OUString sColumn; rtl::OUString sColumn;
pSubProps[0] >>= sColumn; pSubProps[0] >>= sColumn;
//check for existance of the loaded column name //check for existance of the loaded column name
sal_Bool bFound = sal_False; bool bFound = false;
for(sal_uInt16 nRealColumn = 0; nRealColumn < aDBColumns.size(); nRealColumn++) for(sal_uInt16 nRealColumn = 0; nRealColumn < aDBColumns.size(); nRealColumn++)
{ {
if(aDBColumns[nRealColumn]->sColumn == sColumn) if(aDBColumns[nRealColumn]->sColumn == sColumn)
{ {
bFound = sal_True; bFound = true;
break; break;
} }
} }
......
...@@ -826,9 +826,9 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, ...@@ -826,9 +826,9 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
const SwMergeDescriptor& rMergeDescriptor) const SwMergeDescriptor& rMergeDescriptor)
{ {
//check if the doc is synchronized and contains at least one linked section //check if the doc is synchronized and contains at least one linked section
sal_Bool bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFmtCount() > 1; bool bSynchronizedDoc = pSourceShell->IsLabelDoc() && pSourceShell->GetSectionFmtCount() > 1;
sal_Bool bLoop = sal_True; sal_Bool bLoop = sal_True;
sal_Bool bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_MAILING; bool bEMail = rMergeDescriptor.nMergeType == DBMGR_MERGE_MAILING;
const bool bAsSingleFile = rMergeDescriptor.nMergeType == DBMGR_MERGE_SINGLE_FILE; const bool bAsSingleFile = rMergeDescriptor.nMergeType == DBMGR_MERGE_SINGLE_FILE;
::rtl::Reference< MailDispatcher > xMailDispatcher; ::rtl::Reference< MailDispatcher > xMailDispatcher;
...@@ -853,7 +853,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, ...@@ -853,7 +853,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
uno::Reference< XPropertySet > xColumnProp; uno::Reference< XPropertySet > xColumnProp;
{ {
sal_Bool bColumnName = sEMailAddrFld.Len() > 0; bool bColumnName = sEMailAddrFld.Len() > 0;
if (bColumnName) if (bColumnName)
{ {
...@@ -1364,7 +1364,7 @@ sal_uLong SwNewDBMgr::GetColumnFmt( const String& rDBName, ...@@ -1364,7 +1364,7 @@ sal_uLong SwNewDBMgr::GetColumnFmt( const String& rDBName,
{ {
uno::Reference< XDataSource> xSource; uno::Reference< XDataSource> xSource;
uno::Reference< XConnection> xConnection; uno::Reference< XConnection> xConnection;
sal_Bool bUseMergeData = sal_False; bool bUseMergeData = false;
uno::Reference< XColumnsSupplier> xColsSupp; uno::Reference< XColumnsSupplier> xColsSupp;
bool bDisposeConnection = false; bool bDisposeConnection = false;
if(pImpl->pMergeData && if(pImpl->pMergeData &&
...@@ -1372,7 +1372,7 @@ sal_uLong SwNewDBMgr::GetColumnFmt( const String& rDBName, ...@@ -1372,7 +1372,7 @@ sal_uLong SwNewDBMgr::GetColumnFmt( const String& rDBName,
{ {
xConnection = pImpl->pMergeData->xConnection; xConnection = pImpl->pMergeData->xConnection;
xSource = SwNewDBMgr::getDataSourceAsParent(xConnection,rDBName); xSource = SwNewDBMgr::getDataSourceAsParent(xConnection,rDBName);
bUseMergeData = sal_True; bUseMergeData = true;
xColsSupp = xColsSupp.query( pImpl->pMergeData->xResultSet ); xColsSupp = xColsSupp.query( pImpl->pMergeData->xResultSet );
} }
if(!xConnection.is()) if(!xConnection.is())
...@@ -1765,13 +1765,13 @@ sal_Bool SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTabl ...@@ -1765,13 +1765,13 @@ sal_Bool SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTabl
{ {
//the destination has to be an element of the selection //the destination has to be an element of the selection
const Any* pSelection = pFound->aSelection.getConstArray(); const Any* pSelection = pFound->aSelection.getConstArray();
sal_Bool bFound = sal_False; bool bFound = false;
for(sal_Int32 nPos = 0; !bFound && nPos < pFound->aSelection.getLength(); nPos++) for(sal_Int32 nPos = 0; !bFound && nPos < pFound->aSelection.getLength(); nPos++)
{ {
sal_Int32 nSelection = 0; sal_Int32 nSelection = 0;
pSelection[nPos] >>= nSelection; pSelection[nPos] >>= nSelection;
if(nSelection == static_cast<sal_Int32>(nAbsRecordId)) if(nSelection == static_cast<sal_Int32>(nAbsRecordId))
bFound = sal_True; bFound = true;
} }
if(!bFound) if(!bFound)
return sal_False; return sal_False;
...@@ -2715,7 +2715,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, ...@@ -2715,7 +2715,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
} }
SwWrtShell& rSourceShell = rSourceView.GetWrtShell(); SwWrtShell& rSourceShell = rSourceView.GetWrtShell();
sal_Bool bSynchronizedDoc = rSourceShell.IsLabelDoc() && rSourceShell.GetSectionFmtCount() > 1; bool bSynchronizedDoc = rSourceShell.IsLabelDoc() && rSourceShell.GetSectionFmtCount() > 1;
//save the settings of the first //save the settings of the first
rSourceShell.SttEndDoc(sal_True); rSourceShell.SttEndDoc(sal_True);
sal_uInt16 nStartingPageNo = rSourceShell.GetVirtPageNum(); sal_uInt16 nStartingPageNo = rSourceShell.GetVirtPageNum();
......
...@@ -87,9 +87,9 @@ public: ...@@ -87,9 +87,9 @@ public:
inline sal_Bool& CopyAttributes() { return bCopyAttributes; } inline sal_Bool& CopyAttributes() { return bCopyAttributes; }
inline sal_Bool CopyAttributes() const { return bCopyAttributes; } inline sal_Bool CopyAttributes() const { return bCopyAttributes; }
sal_Bool operator==( const InsCaptionOpt& rOpt ) const; bool operator==( const InsCaptionOpt& rOpt ) const;
InsCaptionOpt& operator= ( const InsCaptionOpt& rOpt ); InsCaptionOpt& operator= ( const InsCaptionOpt& rOpt );
inline sal_Bool operator< ( const InsCaptionOpt & rObj ) const inline bool operator< ( const InsCaptionOpt & rObj ) const
{ return aOleId < rObj.aOleId; } { return aOleId < rObj.aOleId; }
}; };
......
...@@ -86,7 +86,7 @@ public: ...@@ -86,7 +86,7 @@ public:
const String& GetFontIndex (sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_INDEX + FONT_PER_GROUP * nFontGroup];} const String& GetFontIndex (sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_INDEX + FONT_PER_GROUP * nFontGroup];}
const String& GetFontFor(sal_uInt16 nFontType) const {return sDefaultFonts[nFontType];} const String& GetFontFor(sal_uInt16 nFontType) const {return sDefaultFonts[nFontType];}
sal_Bool IsFontDefault(sal_uInt16 nFontType) const; bool IsFontDefault(sal_uInt16 nFontType) const;
void SetFontStandard(const String& rSet, sal_uInt8 nFontGroup) void SetFontStandard(const String& rSet, sal_uInt8 nFontGroup)
{ChangeString(FONT_STANDARD + FONT_PER_GROUP * nFontGroup, rSet);} {ChangeString(FONT_STANDARD + FONT_PER_GROUP * nFontGroup, rSet);}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment