Kaydet (Commit) 510a7175 authored tarafından Takeshi Abe's avatar Takeshi Abe

sal_Bool to bool

Change-Id: I9dff9f25afff4253001902a2685b626d1e706e22
üst 0aeb5d4f
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
using ::rtl::OUString; using ::rtl::OUString;
extern void sw_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq ); extern void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq );
......
...@@ -102,7 +102,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) ...@@ -102,7 +102,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem); pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
Window *pMDI = &GetView().GetViewFrame()->GetWindow(); Window *pMDI = &GetView().GetViewFrame()->GetWindow();
sal_Bool bMore = sal_False; bool bMore = false;
bool bIsText = true; bool bIsText = true;
sal_uInt16 nInsertType = 0; sal_uInt16 nInsertType = 0;
sal_uInt16 nInsertSubType = 0; sal_uInt16 nInsertSubType = 0;
...@@ -182,7 +182,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) ...@@ -182,7 +182,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break; break;
default: default:
bMore = sal_True; bMore = true;
} }
if(bMore) if(bMore)
{ {
...@@ -338,7 +338,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) ...@@ -338,7 +338,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_POSTIT: case FN_POSTIT:
{ {
SwPostItField* pPostIt = (SwPostItField*)aFldMgr.GetCurFld(); SwPostItField* pPostIt = (SwPostItField*)aFldMgr.GetCurFld();
sal_Bool bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD); bool bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD);
if (bNew || GetView().GetPostItMgr()->IsAnswer()) if (bNew || GetView().GetPostItMgr()->IsAnswer())
{ {
SvtUserOptions aUserOpt; SvtUserOptions aUserOpt;
...@@ -689,7 +689,7 @@ void SwTextShell::StateField( SfxItemSet &rSet ) ...@@ -689,7 +689,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
break; break;
case FN_POSTIT : case FN_POSTIT :
case FN_JAVAEDIT : case FN_JAVAEDIT :
sal_Bool bCurField = sal_False; bool bCurField = false;
pField = rSh.GetCurFld(); pField = rSh.GetCurFld();
if(nWhich == FN_POSTIT) if(nWhich == FN_POSTIT)
bCurField = pField && pField->GetTyp()->Which() == RES_POSTITFLD; bCurField = pField && pField->GetTyp()->Which() == RES_POSTITFLD;
......
...@@ -39,7 +39,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq) ...@@ -39,7 +39,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
FN_GLOSSARY_DLG == nSlot ); FN_GLOSSARY_DLG == nSlot );
SwGlossaryHdl* pGlosHdl = GetView().GetGlosHdl(); SwGlossaryHdl* pGlosHdl = GetView().GetGlosHdl();
// SwGlossaryList updaten? // SwGlossaryList updaten?
sal_Bool bUpdateList = sal_False; bool bUpdateList = false;
const SfxItemSet *pArgs = rReq.GetArgs(); const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0; const SfxPoolItem* pItem = 0;
...@@ -50,7 +50,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq) ...@@ -50,7 +50,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
{ {
case FN_GLOSSARY_DLG: case FN_GLOSSARY_DLG:
pGlosHdl->GlossaryDlg(); pGlosHdl->GlossaryDlg();
bUpdateList = sal_True; bUpdateList = true;
rReq.Ignore(); rReq.Ignore();
break; break;
case FN_EXPAND_GLOSSARY: case FN_EXPAND_GLOSSARY:
...@@ -82,7 +82,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq) ...@@ -82,7 +82,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
pGlosHdl->NewGlossary( aName, aShortName, sal_True ); pGlosHdl->NewGlossary( aName, aShortName, sal_True );
rReq.Done(); rReq.Done();
} }
bUpdateList = sal_True; bUpdateList = true;
break; break;
case FN_SET_ACT_GLOSSARY: case FN_SET_ACT_GLOSSARY:
if(pItem) if(pItem)
......
...@@ -176,7 +176,7 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet) ...@@ -176,7 +176,7 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
SfxChildWindow* pAuthMark = pVFrame->GetChildWindow(FN_INSERT_AUTH_ENTRY_DLG); SfxChildWindow* pAuthMark = pVFrame->GetChildWindow(FN_INSERT_AUTH_ENTRY_DLG);
const sal_Bool bHtmlMode = 0 != ::GetHtmlMode( GetView().GetDocShell() ); const bool bHtmlMode = 0 != ::GetHtmlMode( GetView().GetDocShell() );
const SwTOXBase* pBase = 0; const SwTOXBase* pBase = 0;
if( bHtmlMode || 0 != ( pBase = rSh.GetCurTOX()) ) if( bHtmlMode || 0 != ( pBase = rSh.GetCurTOX()) )
{ {
...@@ -205,16 +205,16 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet) ...@@ -205,16 +205,16 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
else else
{ {
sal_Bool bEnableEdit = sal_True; bool bEnableEdit = true;
sal_Bool bInReadonly = rSh.HasReadonlySel(); sal_Bool bInReadonly = rSh.HasReadonlySel();
if( rSh.HasSelection() || bInReadonly) if( rSh.HasSelection() || bInReadonly)
bEnableEdit = sal_False; bEnableEdit = false;
else else
{ {
SwTOXMarks aArr; SwTOXMarks aArr;
rSh.GetCurTOXMarks( aArr ); rSh.GetCurTOXMarks( aArr );
if( aArr.empty()) if( aArr.empty())
bEnableEdit = sal_False; bEnableEdit = false;
} }
if(!bEnableEdit) if(!bEnableEdit)
......
...@@ -502,14 +502,14 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) ...@@ -502,14 +502,14 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
break; break;
case FN_INSERT_FRAME: case FN_INSERT_FRAME:
{ {
sal_Bool bSingleCol = sal_False; bool bSingleCol = false;
if( 0!= dynamic_cast< SwWebDocShell*>( GetView().GetDocShell()) ) if( 0!= dynamic_cast< SwWebDocShell*>( GetView().GetDocShell()) )
{ {
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get(); SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
sal_uInt16 nExport = rHtmlOpt.GetExportMode(); sal_uInt16 nExport = rHtmlOpt.GetExportMode();
if( HTML_CFG_MSIE == nExport ) if( HTML_CFG_MSIE == nExport )
{ {
bSingleCol = sal_True; bSingleCol = true;
} }
} }
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
void sw_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq ) void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq )
{ {
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rWrtSh.GetView())); FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rWrtSh.GetView()));
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
...@@ -269,7 +269,7 @@ static short lcl_AskRedlineMode(Window *pWin) ...@@ -269,7 +269,7 @@ static short lcl_AskRedlineMode(Window *pWin)
void SwTextShell::Execute(SfxRequest &rReq) void SwTextShell::Execute(SfxRequest &rReq)
{ {
sal_Bool bUseDialog = sal_True; bool bUseDialog = true;
const SfxItemSet *pArgs = rReq.GetArgs(); const SfxItemSet *pArgs = rReq.GetArgs();
SwWrtShell& rWrtSh = GetShell(); SwWrtShell& rWrtSh = GetShell();
const SfxPoolItem* pItem = 0; const SfxPoolItem* pItem = 0;
...@@ -412,7 +412,7 @@ void SwTextShell::Execute(SfxRequest &rReq) ...@@ -412,7 +412,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, nSlot , sal_False ); SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, nSlot , sal_False );
if ( pNameItem ) if ( pNameItem )
aStr = pNameItem->GetValue(); aStr = pNameItem->GetValue();
sal_Bool bFont = pFont && pFont->GetValue().Len(); bool bFont = pFont && pFont->GetValue().Len();
rWrtSh.StartUndo( UNDO_UI_INSERT_FOOTNOTE ); rWrtSh.StartUndo( UNDO_UI_INSERT_FOOTNOTE );
rWrtSh.InsertFootnote( aStr, nSlot == FN_INSERT_ENDNOTE, !bFont ); rWrtSh.InsertFootnote( aStr, nSlot == FN_INSERT_ENDNOTE, !bFont );
if ( bFont ) if ( bFont )
...@@ -812,7 +812,7 @@ void SwTextShell::Execute(SfxRequest &rReq) ...@@ -812,7 +812,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
{ {
sal_uInt16 nWhich = GetPool().GetWhich( nSlot ); sal_uInt16 nWhich = GetPool().GetWhich( nSlot );
if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET ) if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET )
bUseDialog = sal_False; bUseDialog = false;
// intentionally no break // intentionally no break
} }
case SID_CHAR_DLG: case SID_CHAR_DLG:
...@@ -843,7 +843,7 @@ void SwTextShell::Execute(SfxRequest &rReq) ...@@ -843,7 +843,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
{ {
sal_uInt16 nWhich = GetPool().GetWhich( nSlot ); sal_uInt16 nWhich = GetPool().GetWhich( nSlot );
if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET ) if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET )
bUseDialog = sal_False; bUseDialog = false;
// intentionally no break // intentionally no break
} }
...@@ -1344,7 +1344,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) ...@@ -1344,7 +1344,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
{ {
// is there a valid selection to get text from? // is there a valid selection to get text from?
String aText; String aText;
sal_Bool bValid = !rSh.HasSelection() || bool bValid = !rSh.HasSelection() ||
(rSh.IsSelOnePara() && !rSh.IsMultiSelection()); (rSh.IsSelOnePara() && !rSh.IsMultiSelection());
// prevent context menu from showing when cursor is not in or at the end of a word // prevent context menu from showing when cursor is not in or at the end of a word
// (GetCurWord will return the next word if there is none at the current position...) // (GetCurWord will return the next word if there is none at the current position...)
......
...@@ -238,7 +238,7 @@ IMPL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl*, pDBStruct ) ...@@ -238,7 +238,7 @@ IMPL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl*, pDBStruct )
{ {
if( pDBStruct ) if( pDBStruct )
{ {
sal_Bool bDispose = sal_False; bool bDispose = false;
Reference< sdbc::XConnection> xConnection = pDBStruct->xConnection; Reference< sdbc::XConnection> xConnection = pDBStruct->xConnection;
Reference<XDataSource> xSource = SwNewDBMgr::getDataSourceAsParent(xConnection,pDBStruct->aDBData.sDataSource); Reference<XDataSource> xSource = SwNewDBMgr::getDataSourceAsParent(xConnection,pDBStruct->aDBData.sDataSource);
// #111987# the connection is disposed an so no parent has been found // #111987# the connection is disposed an so no parent has been found
...@@ -248,7 +248,7 @@ IMPL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl*, pDBStruct ) ...@@ -248,7 +248,7 @@ IMPL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl*, pDBStruct )
if ( !xConnection.is() ) if ( !xConnection.is() )
{ {
xConnection = SwNewDBMgr::GetConnection(pDBStruct->aDBData.sDataSource, xSource); xConnection = SwNewDBMgr::GetConnection(pDBStruct->aDBData.sDataSource, xSource);
bDispose = sal_True; bDispose = true;
} }
Reference< XColumnsSupplier> xColSupp; Reference< XColumnsSupplier> xColSupp;
......
...@@ -172,7 +172,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) ...@@ -172,7 +172,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
{ {
sal_uInt16 nSlot = rReq.GetSlot(); sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs(); const SfxItemSet* pArgs = rReq.GetArgs();
sal_Bool bArgs = pArgs != 0 && pArgs->Count() > 0; bool bArgs = pArgs != 0 && pArgs->Count() > 0;
int bGrow = sal_False; int bGrow = sal_False;
SwWrtShell& rWrtSh = GetShell(); SwWrtShell& rWrtSh = GetShell();
SwTxtFmtColl* pColl = 0; SwTxtFmtColl* pColl = 0;
...@@ -340,7 +340,7 @@ SET_LINESPACE: ...@@ -340,7 +340,7 @@ SET_LINESPACE:
SfxItemSet aAdjustSet( GetPool(), SfxItemSet aAdjustSet( GetPool(),
RES_PARATR_ADJUST, RES_PARATR_ADJUST ); RES_PARATR_ADJUST, RES_PARATR_ADJUST );
GetShell().GetCurAttr(aAdjustSet); GetShell().GetCurAttr(aAdjustSet);
sal_Bool bChgAdjust = sal_False; bool bChgAdjust = false;
SfxItemState eAdjustState = aAdjustSet.GetItemState(RES_PARATR_ADJUST, sal_False); SfxItemState eAdjustState = aAdjustSet.GetItemState(RES_PARATR_ADJUST, sal_False);
if(eAdjustState >= SFX_ITEM_DEFAULT) if(eAdjustState >= SFX_ITEM_DEFAULT)
{ {
...@@ -350,7 +350,7 @@ SET_LINESPACE: ...@@ -350,7 +350,7 @@ SET_LINESPACE:
(SVX_ADJUST_RIGHT == eAdjust && SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot); (SVX_ADJUST_RIGHT == eAdjust && SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot);
} }
else else
bChgAdjust = sal_True; bChgAdjust = true;
SvxFrameDirection eFrmDirection = SvxFrameDirection eFrmDirection =
(SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot) ? (SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot) ?
......
...@@ -87,7 +87,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) ...@@ -87,7 +87,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL, SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL,
0 ); 0 );
SwDocShell* pDocSh = GetView().GetDocShell(); SwDocShell* pDocSh = GetView().GetDocShell();
sal_Bool bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh); bool bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh);
const SwNumRule* pCurRule = GetShell().GetCurNumRule(); const SwNumRule* pCurRule = GetShell().GetCurNumRule();
if( pCurRule ) if( pCurRule )
{ {
......
...@@ -130,7 +130,7 @@ sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const ...@@ -130,7 +130,7 @@ sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
SwTwips nOld = 0; SwTwips nOld = 0;
SwTwips nNew = 0; SwTwips nNew = 0;
sal_Bool bOld = sal_False; sal_Bool bOld = sal_False;
sal_Bool bFirst = sal_True; bool bFirst = true;
i = 0; i = 0;
while ( i < nAllCols -1 ) while ( i < nAllCols -1 )
...@@ -149,7 +149,7 @@ sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const ...@@ -149,7 +149,7 @@ sal_Bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const
if(pOldTColumns[nNewPos - 1].bVisible) if(pOldTColumns[nNewPos - 1].bVisible)
break; break;
} }
bFirst = sal_False; bFirst = false;
// sie muessen sortiert eingefuegt werden // sie muessen sortiert eingefuegt werden
bOld = nOld < nNew; bOld = nOld < nNew;
nPos = sal_uInt16(bOld ? nOld : nNew); nPos = sal_uInt16(bOld ? nOld : nNew);
......
...@@ -495,17 +495,17 @@ void SwFormatTablePage::Reset( const SfxItemSet& ) ...@@ -495,17 +495,17 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
nOldAlign = pTblData->GetAlign(); nOldAlign = pTblData->GetAlign();
sal_Bool bSetRight = sal_False, bSetLeft = sal_False; bool bSetRight = false, bSetLeft = false;
switch( nOldAlign ) switch( nOldAlign )
{ {
case text::HoriOrientation::NONE: case text::HoriOrientation::NONE:
m_pFreeBtn->Check(); m_pFreeBtn->Check();
if(m_pRelWidthCB->IsChecked()) if(m_pRelWidthCB->IsChecked())
bSetRight = sal_True; bSetRight = true;
break; break;
case text::HoriOrientation::FULL: case text::HoriOrientation::FULL:
{ {
bSetRight = bSetLeft = sal_True; bSetRight = bSetLeft = true;
m_pFullBtn->Check(); m_pFullBtn->Check();
m_aWidthMF.Enable(sal_False); m_aWidthMF.Enable(sal_False);
m_pRelWidthCB->Enable(sal_False); m_pRelWidthCB->Enable(sal_False);
...@@ -514,25 +514,25 @@ void SwFormatTablePage::Reset( const SfxItemSet& ) ...@@ -514,25 +514,25 @@ void SwFormatTablePage::Reset( const SfxItemSet& )
break; break;
case text::HoriOrientation::LEFT: case text::HoriOrientation::LEFT:
{ {
bSetLeft = sal_True; bSetLeft = true;
m_pLeftBtn->Check(); m_pLeftBtn->Check();
} }
break; break;
case text::HoriOrientation::LEFT_AND_WIDTH : case text::HoriOrientation::LEFT_AND_WIDTH :
{ {
bSetRight = sal_True; bSetRight = true;
m_pFromLeftBtn->Check(); m_pFromLeftBtn->Check();
} }
break; break;
case text::HoriOrientation::RIGHT: case text::HoriOrientation::RIGHT:
{ {
bSetRight = sal_True; bSetRight = true;
m_pRightBtn->Check(); m_pRightBtn->Check();
} }
break; break;
case text::HoriOrientation::CENTER: case text::HoriOrientation::CENTER:
{ {
bSetRight = sal_True; bSetRight = true;
m_pCenterBtn->Check(); m_pCenterBtn->Check();
} }
break; break;
...@@ -1474,7 +1474,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) ...@@ -1474,7 +1474,7 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet )
{ {
const SfxPoolItem* pItem; const SfxPoolItem* pItem;
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get(); SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
sal_Bool bFlowAllowed = !bHtmlMode || rHtmlOpt.IsPrintLayoutExtension(); bool bFlowAllowed = !bHtmlMode || rHtmlOpt.IsPrintLayoutExtension();
if(bFlowAllowed) if(bFlowAllowed)
{ {
// Einfuegen der vorhandenen Seitenvorlagen in die Listbox // Einfuegen der vorhandenen Seitenvorlagen in die Listbox
......
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