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

sal_Bool to bool

Change-Id: I27471e2331ff4813850fc5d3ca398ae6e1d86758
üst 4ef1bed7
...@@ -100,10 +100,10 @@ static void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, sal_Bool b ...@@ -100,10 +100,10 @@ static void lcl_GetRedlineHelp( const SwRedline& rRedl, String& rTxt, sal_Bool b
void SwEditWin::RequestHelp(const HelpEvent &rEvt) void SwEditWin::RequestHelp(const HelpEvent &rEvt)
{ {
SwWrtShell &rSh = rView.GetWrtShell(); SwWrtShell &rSh = rView.GetWrtShell();
sal_Bool bQuickBalloon = 0 != (rEvt.GetMode() & ( HELPMODE_QUICK | HELPMODE_BALLOON )); bool bQuickBalloon = 0 != (rEvt.GetMode() & ( HELPMODE_QUICK | HELPMODE_BALLOON ));
if(bQuickBalloon && rSh.GetViewOptions()->IsPreventTips()) if(bQuickBalloon && rSh.GetViewOptions()->IsPreventTips())
return; return;
sal_Bool bWeiter = sal_True; bool bWeiter = true;
SET_CURR_SHELL(&rSh); SET_CURR_SHELL(&rSh);
String sTxt; String sTxt;
Point aPos( PixelToLogic( ScreenToOutputPixel( rEvt.GetMousePosPixel() ) )); Point aPos( PixelToLogic( ScreenToOutputPixel( rEvt.GetMousePosPixel() ) ));
...@@ -380,7 +380,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) ...@@ -380,7 +380,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
} }
} }
bWeiter = sal_False; bWeiter = false;
} }
if( bWeiter ) if( bWeiter )
{ {
...@@ -419,7 +419,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) ...@@ -419,7 +419,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
Rectangle aRect(rEvt.GetMousePosPixel(), aTxtSize); Rectangle aRect(rEvt.GetMousePosPixel(), aTxtSize);
Help::ShowQuickHelp(this, aRect, sTxt); Help::ShowQuickHelp(this, aRect, sTxt);
} }
bWeiter = sal_False; bWeiter = false;
} }
} }
...@@ -438,7 +438,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) ...@@ -438,7 +438,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
pObj = aVEvt.pObj; pObj = aVEvt.pObj;
sTxt = pField->GetURL(); sTxt = pField->GetURL();
bWeiter = sal_False; bWeiter = false;
} }
} }
if (bWeiter && eHit == SDRHIT_TEXTEDIT) if (bWeiter && eHit == SDRHIT_TEXTEDIT)
...@@ -463,7 +463,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) ...@@ -463,7 +463,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if (pField ) if (pField )
{ {
sTxt = ((const SvxURLField*) pField)->GetURL(); sTxt = ((const SvxURLField*) pField)->GetURL();
bWeiter = sal_False; bWeiter = false;
} }
} }
} }
...@@ -502,7 +502,7 @@ void SwEditWin::Paint(const Rectangle& rRect) ...@@ -502,7 +502,7 @@ void SwEditWin::Paint(const Rectangle& rRect)
SwWrtShell* pWrtShell = GetView().GetWrtShellPtr(); SwWrtShell* pWrtShell = GetView().GetWrtShellPtr();
if(!pWrtShell) if(!pWrtShell)
return; return;
sal_Bool bPaintShadowCrsr = sal_False; bool bPaintShadowCrsr = false;
if( pShadCrsr ) if( pShadCrsr )
{ {
Rectangle aRect( pShadCrsr->GetRect()); Rectangle aRect( pShadCrsr->GetRect());
...@@ -515,7 +515,7 @@ void SwEditWin::Paint(const Rectangle& rRect) ...@@ -515,7 +515,7 @@ void SwEditWin::Paint(const Rectangle& rRect)
// resides somewhat above, then everything is clipped outside // resides somewhat above, then everything is clipped outside
// and we have to make the "inner part" at the end of the // and we have to make the "inner part" at the end of the
// Paint visible again. Otherwise Paint errors occur! // Paint visible again. Otherwise Paint errors occur!
bPaintShadowCrsr = sal_True; bPaintShadowCrsr = true;
} }
} }
......
...@@ -42,7 +42,7 @@ namespace { ...@@ -42,7 +42,7 @@ namespace {
struct SidebarWinOrder struct SidebarWinOrder
{ {
sal_Bool operator()( const SidebarWinKey& rSidebarWinKeyA, bool operator()( const SidebarWinKey& rSidebarWinKeyA,
const SidebarWinKey& rSidebarWinKeyB ) const const SidebarWinKey& rSidebarWinKeyB ) const
{ {
return rSidebarWinKeyA < rSidebarWinKeyB; return rSidebarWinKeyA < rSidebarWinKeyB;
...@@ -67,7 +67,7 @@ namespace { ...@@ -67,7 +67,7 @@ namespace {
struct FrmOrder struct FrmOrder
{ {
sal_Bool operator()( const FrmKey& rFrmKeyA, bool operator()( const FrmKey& rFrmKeyA,
const FrmKey& rFrmKeyB ) const const FrmKey& rFrmKeyB ) const
{ {
return rFrmKeyA < rFrmKeyB; return rFrmKeyA < rFrmKeyB;
......
...@@ -163,18 +163,18 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList) ...@@ -163,18 +163,18 @@ static void lcl_Highlight(const String& rSource, SwTextPortions& aPortionList)
// now we still have to look for '>' // now we still have to look for '>'
if(svtools::HTMLUNKNOWN != eFoundType) if(svtools::HTMLUNKNOWN != eFoundType)
{ {
sal_Bool bFound = sal_False; bool bFound = false;
for(sal_uInt16 i = nPortEnd; i < nStrLen; i++) for(sal_uInt16 i = nPortEnd; i < nStrLen; i++)
if(cCloseBracket == rSource.GetChar(i)) if(cCloseBracket == rSource.GetChar(i))
{ {
bFound = sal_True; bFound = true;
nPortEnd = i; nPortEnd = i;
break; break;
} }
if(!bFound && (eFoundType == svtools::HTMLCOMMENT)) if(!bFound && (eFoundType == svtools::HTMLCOMMENT))
{ {
// comment without ending in this line // comment without ending in this line
bFound = sal_True; bFound = true;
nPortEnd = nStrLen - 1; nPortEnd = nStrLen - 1;
} }
...@@ -439,7 +439,7 @@ void TextViewOutWin::KeyInput( const KeyEvent& rKEvt ) ...@@ -439,7 +439,7 @@ void TextViewOutWin::KeyInput( const KeyEvent& rKEvt )
{ {
sal_Bool bDone = sal_False; sal_Bool bDone = sal_False;
SwSrcEditWindow* pSrcEditWin = (SwSrcEditWindow*)GetParent(); SwSrcEditWindow* pSrcEditWin = (SwSrcEditWindow*)GetParent();
sal_Bool bChange = !pSrcEditWin->IsReadonly() || !TextEngine::DoesKeyChangeText( rKEvt ); bool bChange = !pSrcEditWin->IsReadonly() || !TextEngine::DoesKeyChangeText( rKEvt );
if(bChange) if(bChange)
bDone = pTextView->KeyInput( rKEvt ); bDone = pTextView->KeyInput( rKEvt );
...@@ -787,7 +787,7 @@ void SwSrcEditWindow::GetFocus() ...@@ -787,7 +787,7 @@ void SwSrcEditWindow::GetFocus()
pOutWin->GrabFocus(); pOutWin->GrabFocus();
} }
static sal_Bool lcl_GetLanguagesForEncoding(rtl_TextEncoding eEnc, LanguageType aLanguages[]) static bool lcl_GetLanguagesForEncoding(rtl_TextEncoding eEnc, LanguageType aLanguages[])
{ {
switch(eEnc) switch(eEnc)
{ {
......
...@@ -207,14 +207,14 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) : ...@@ -207,14 +207,14 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) :
aEntryName; aEntryName;
sal_uInt16 nPos = 0; sal_uInt16 nPos = 0;
sal_Bool bFound = sal_False; bool bFound = false;
while (nPos < aSizeFormatBox.GetEntryCount() && !bFound) while (nPos < aSizeFormatBox.GetEntryCount() && !bFound)
{ {
aEntryName = aSizeFormatBox.GetEntry(i); aEntryName = aSizeFormatBox.GetEntry(i);
if (aEntryName < aPaperName) if (aEntryName < aPaperName)
nPos++; nPos++;
else else
bFound = sal_True; bFound = true;
} }
aSizeFormatBox.InsertEntry(aPaperName, nPos); aSizeFormatBox.InsertEntry(aPaperName, nPos);
aIDs.insert( aIDs.begin() + nPos, (sal_uInt16) i); aIDs.insert( aIDs.begin() + nPos, (sal_uInt16) i);
...@@ -273,7 +273,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) ...@@ -273,7 +273,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
OSL_ENSURE(pSh, "Shell missing"); OSL_ENSURE(pSh, "Shell missing");
// determine collection-ptr // determine collection-ptr
sal_Bool bSender = pButton != &aAddrEditButton; bool bSender = pButton != &aAddrEditButton;
SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool( static_cast< sal_uInt16 >( SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool( static_cast< sal_uInt16 >(
bSender ? RES_POOLCOLL_SENDADRESS : RES_POOLCOLL_JAKETADRESS)); bSender ? RES_POOLCOLL_SENDADRESS : RES_POOLCOLL_JAKETADRESS));
...@@ -387,7 +387,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) ...@@ -387,7 +387,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
Description: A temporary Itemset that gets discarded at abort Description: A temporary Itemset that gets discarded at abort
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender) SfxItemSet *SwEnvFmtPage::GetCollItemSet(SwTxtFmtColl* pColl, bool bSender)
{ {
SfxItemSet *&pAddrSet = bSender ? GetParentSwEnvDlg()->pSenderSet : GetParentSwEnvDlg()->pAddresseeSet; SfxItemSet *&pAddrSet = bSender ? GetParentSwEnvDlg()->pSenderSet : GetParentSwEnvDlg()->pAddresseeSet;
......
...@@ -69,7 +69,7 @@ class SwEnvFmtPage : public SfxTabPage ...@@ -69,7 +69,7 @@ class SwEnvFmtPage : public SfxTabPage
void SetMinMax(); void SetMinMax();
SfxItemSet *GetCollItemSet(SwTxtFmtColl* pColl, sal_Bool bSender); SfxItemSet *GetCollItemSet(SwTxtFmtColl* pColl, bool bSender);
SwEnvDlg *GetParentSwEnvDlg() {return (SwEnvDlg*) GetParentDialog();} SwEnvDlg *GetParentSwEnvDlg() {return (SwEnvDlg*) GetParentDialog();}
......
...@@ -56,7 +56,7 @@ SW_DLLPUBLIC String MakeSender() ...@@ -56,7 +56,7 @@ SW_DLLPUBLIC String MakeSender()
String sRet; String sRet;
String sSenderToken(SW_RES(STR_SENDER_TOKENS)); String sSenderToken(SW_RES(STR_SENDER_TOKENS));
xub_StrLen nSttPos = 0, nTokenCount = comphelper::string::getTokenCount(sSenderToken, ';'); xub_StrLen nSttPos = 0, nTokenCount = comphelper::string::getTokenCount(sSenderToken, ';');
sal_Bool bLastLength = sal_True; bool bLastLength = true;
for( xub_StrLen i = 0; i < nTokenCount; i++ ) for( xub_StrLen i = 0; i < nTokenCount; i++ )
{ {
String sToken = sSenderToken.GetToken( 0, ';', nSttPos ); String sToken = sSenderToken.GetToken( 0, ';', nSttPos );
...@@ -70,7 +70,7 @@ SW_DLLPUBLIC String MakeSender() ...@@ -70,7 +70,7 @@ SW_DLLPUBLIC String MakeSender()
{ {
if(bLastLength) if(bLastLength)
sRet +=NEXTLINE; sRet +=NEXTLINE;
bLastLength = sal_True; bLastLength = true;
} }
else if(sToken.EqualsAscii("FIRSTNAME")) else if(sToken.EqualsAscii("FIRSTNAME"))
sRet += (String)rUserOpt.GetFirstName(); sRet += (String)rUserOpt.GetFirstName();
...@@ -300,7 +300,7 @@ Sequence<rtl::OUString> SwEnvCfgItem::GetPropertyNames() ...@@ -300,7 +300,7 @@ Sequence<rtl::OUString> SwEnvCfgItem::GetPropertyNames()
bool SwEnvItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const bool SwEnvItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
{ {
sal_Bool bRet = true; bool bRet = true;
switch(nMemberId & ~CONVERT_TWIPS) switch(nMemberId & ~CONVERT_TWIPS)
{ {
case MID_ENV_ADDR_TEXT : rVal <<= aAddrText; break; case MID_ENV_ADDR_TEXT : rVal <<= aAddrText; break;
......
...@@ -137,14 +137,14 @@ SwLabDlg::SwLabDlg(Window* pParent, const SfxItemSet& rSet, ...@@ -137,14 +137,14 @@ SwLabDlg::SwLabDlg(Window* pParent, const SfxItemSet& rSet,
pRec->aMake = pRec->aType = aTmp; pRec->aMake = pRec->aType = aTmp;
pRec->SetFromItem( aItem ); pRec->SetFromItem( aItem );
sal_Bool bDouble = sal_False; bool bDouble = false;
for (sal_uInt16 nRecPos = 0; nRecPos < pRecs->size(); nRecPos++) for (sal_uInt16 nRecPos = 0; nRecPos < pRecs->size(); nRecPos++)
{ {
if (pRec->aMake == (*pRecs)[nRecPos]->aMake && if (pRec->aMake == (*pRecs)[nRecPos]->aMake &&
pRec->aType == (*pRecs)[nRecPos]->aType) pRec->aType == (*pRecs)[nRecPos]->aType)
{ {
bDouble = sal_True; bDouble = true;
break; break;
} }
} }
...@@ -198,7 +198,7 @@ void SwLabDlg::GetLabItem(SwLabItem &rItem) ...@@ -198,7 +198,7 @@ void SwLabDlg::GetLabItem(SwLabItem &rItem)
SwLabRec* SwLabDlg::GetRecord(const String &rRecName, sal_Bool bCont) SwLabRec* SwLabDlg::GetRecord(const String &rRecName, sal_Bool bCont)
{ {
SwLabRec* pRec = NULL; SwLabRec* pRec = NULL;
sal_Bool bFound = sal_False; bool bFound = false;
String sCustom(SW_RES(STR_CUSTOM)); String sCustom(SW_RES(STR_CUSTOM));
const sal_uInt16 nCount = Recs().size(); const sal_uInt16 nCount = Recs().size();
...@@ -208,7 +208,7 @@ SwLabRec* SwLabDlg::GetRecord(const String &rRecName, sal_Bool bCont) ...@@ -208,7 +208,7 @@ SwLabRec* SwLabDlg::GetRecord(const String &rRecName, sal_Bool bCont)
if (pRec->aType != sCustom && if (pRec->aType != sCustom &&
rRecName == pRec->aType && bCont == pRec->bCont) rRecName == pRec->aType && bCont == pRec->bCont)
{ {
bFound = sal_True; bFound = true;
break; break;
} }
} }
...@@ -412,17 +412,17 @@ IMPL_LINK_NOARG(SwLabPage, MakeHdl) ...@@ -412,17 +412,17 @@ IMPL_LINK_NOARG(SwLabPage, MakeHdl)
for ( sal_uInt16 i = 0; i < nCount; ++i ) for ( sal_uInt16 i = 0; i < nCount; ++i )
{ {
const String aType ( GetParentSwLabDlg()->Recs()[i]->aType ); const String aType ( GetParentSwLabDlg()->Recs()[i]->aType );
sal_Bool bInsert = sal_False; bool bInsert = false;
if ( GetParentSwLabDlg()->Recs()[i]->aType == sCustom ) if ( GetParentSwLabDlg()->Recs()[i]->aType == sCustom )
{ {
bInsert = sal_True; bInsert = true;
aTypeBox.InsertEntry(aType ); aTypeBox.InsertEntry(aType );
} }
else if ( GetParentSwLabDlg()->Recs()[i]->bCont == bCont ) else if ( GetParentSwLabDlg()->Recs()[i]->bCont == bCont )
{ {
if ( aHiddenSortTypeBox.GetEntryPos(aType) == LISTBOX_ENTRY_NOTFOUND ) if ( aHiddenSortTypeBox.GetEntryPos(aType) == LISTBOX_ENTRY_NOTFOUND )
{ {
bInsert = sal_True; bInsert = true;
aHiddenSortTypeBox.InsertEntry( aType ); aHiddenSortTypeBox.InsertEntry( aType );
} }
} }
...@@ -703,7 +703,7 @@ static void lcl_SelectBlock(SvTreeListBox& rAutoTextLB, const String& rBlockName ...@@ -703,7 +703,7 @@ static void lcl_SelectBlock(SvTreeListBox& rAutoTextLB, const String& rBlockName
} }
} }
static sal_Bool lcl_FindBlock(SvTreeListBox& rAutoTextLB, const String& rBlockName) static bool lcl_FindBlock(SvTreeListBox& rAutoTextLB, const String& rBlockName)
{ {
SvTreeListEntry* pEntry = rAutoTextLB.First(); SvTreeListEntry* pEntry = rAutoTextLB.First();
while(pEntry) while(pEntry)
...@@ -711,24 +711,24 @@ static sal_Bool lcl_FindBlock(SvTreeListBox& rAutoTextLB, const String& rBlockNa ...@@ -711,24 +711,24 @@ static sal_Bool lcl_FindBlock(SvTreeListBox& rAutoTextLB, const String& rBlockNa
if(*(String*)pEntry->GetUserData() == rBlockName) if(*(String*)pEntry->GetUserData() == rBlockName)
{ {
rAutoTextLB.Select(pEntry); rAutoTextLB.Select(pEntry);
return sal_True; return true;
} }
pEntry = rAutoTextLB.Next(pEntry); pEntry = rAutoTextLB.Next(pEntry);
} }
return sal_False; return false;
} }
void SwVisitingCardPage::Reset(const SfxItemSet& rSet) void SwVisitingCardPage::Reset(const SfxItemSet& rSet)
{ {
aLabItem = (const SwLabItem&) rSet.Get(FN_LABEL); aLabItem = (const SwLabItem&) rSet.Get(FN_LABEL);
sal_Bool bFound = sal_False; bool bFound = false;
sal_uInt16 i; sal_uInt16 i;
for(i = 0; i < aAutoTextGroupLB.GetEntryCount() && !bFound; i++) for(i = 0; i < aAutoTextGroupLB.GetEntryCount() && !bFound; i++)
if( String(aLabItem.sGlossaryGroup) == if( String(aLabItem.sGlossaryGroup) ==
*(String*)aAutoTextGroupLB.GetEntryData( i )) *(String*)aAutoTextGroupLB.GetEntryData( i ))
{ {
bFound = sal_True; bFound = true;
break; break;
} }
...@@ -739,7 +739,7 @@ void SwVisitingCardPage::Reset(const SfxItemSet& rSet) ...@@ -739,7 +739,7 @@ void SwVisitingCardPage::Reset(const SfxItemSet& rSet)
for(i = 0; i < aAutoTextGroupLB.GetEntryCount() && !bFound; i++) for(i = 0; i < aAutoTextGroupLB.GetEntryCount() && !bFound; i++)
if(0 == (*(String*)aAutoTextGroupLB.GetEntryData( i )).SearchAscii( "crd") ) if(0 == (*(String*)aAutoTextGroupLB.GetEntryData( i )).SearchAscii( "crd") )
{ {
bFound = sal_True; bFound = true;
break; break;
} }
} }
......
...@@ -173,11 +173,11 @@ void SwLabelConfig::FillLabels(const OUString& rManufacturer, SwLabRecs& rLab ...@@ -173,11 +173,11 @@ void SwLabelConfig::FillLabels(const OUString& rManufacturer, SwLabRecs& rLab
sal_Bool SwLabelConfig::HasLabel(const rtl::OUString& rManufacturer, const rtl::OUString& rType) sal_Bool SwLabelConfig::HasLabel(const rtl::OUString& rManufacturer, const rtl::OUString& rType)
{ {
const OUString* pNode = aNodeNames.getConstArray(); const OUString* pNode = aNodeNames.getConstArray();
sal_Bool bFound = sal_False; bool bFound = false;
for(sal_Int32 nNode = 0; nNode < aNodeNames.getLength() && !bFound; nNode++) for(sal_Int32 nNode = 0; nNode < aNodeNames.getLength() && !bFound; nNode++)
{ {
if(pNode[nNode] == rManufacturer) if(pNode[nNode] == rManufacturer)
bFound = sal_True; bFound = true;
} }
if(bFound) if(bFound)
{ {
...@@ -207,24 +207,24 @@ sal_Bool SwLabelConfig::HasLabel(const rtl::OUString& rManufacturer, const rt ...@@ -207,24 +207,24 @@ sal_Bool SwLabelConfig::HasLabel(const rtl::OUString& rManufacturer, const rt
return sal_False; return sal_False;
} }
static sal_Bool lcl_Exists(const OUString& rNode, const Sequence<OUString>& rLabels) static bool lcl_Exists(const OUString& rNode, const Sequence<OUString>& rLabels)
{ {
const OUString* pLabels = rLabels.getConstArray(); const OUString* pLabels = rLabels.getConstArray();
for(sal_Int32 i = 0; i < rLabels.getLength(); i++) for(sal_Int32 i = 0; i < rLabels.getLength(); i++)
if(pLabels[i] == rNode) if(pLabels[i] == rNode)
return sal_True; return true;
return sal_False; return false;
} }
void SwLabelConfig::SaveLabel( const rtl::OUString& rManufacturer, void SwLabelConfig::SaveLabel( const rtl::OUString& rManufacturer,
const rtl::OUString& rType, const SwLabRec& rRec) const rtl::OUString& rType, const SwLabRec& rRec)
{ {
const OUString* pNode = aNodeNames.getConstArray(); const OUString* pNode = aNodeNames.getConstArray();
sal_Bool bFound = sal_False; bool bFound = false;
for(sal_Int32 nNode = 0; nNode < aNodeNames.getLength() && !bFound; nNode++) for(sal_Int32 nNode = 0; nNode < aNodeNames.getLength() && !bFound; nNode++)
{ {
if(pNode[nNode] == rManufacturer) if(pNode[nNode] == rManufacturer)
bFound = sal_True; bFound = true;
} }
if(!bFound) if(!bFound)
{ {
......
...@@ -173,15 +173,15 @@ void SwLabPreview::Paint(const Rectangle &) ...@@ -173,15 +173,15 @@ void SwLabPreview::Paint(const Rectangle &)
if (aItem.lLeft) if (aItem.lLeft)
{ {
long lX = (lX0 + lX1) / 2; long lX = (lX0 + lX1) / 2;
DrawArrow(Point(lX0, lY0 - 5), Point(lX1, lY0 - 5), sal_False); DrawArrow(Point(lX0, lY0 - 5), Point(lX1, lY0 - 5), false);
DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), sal_True); DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), true);
DrawText(Point(lX1 - lLeftWidth, lY0 - 10 - lXHeight), aLeftStr); DrawText(Point(lX1 - lLeftWidth, lY0 - 10 - lXHeight), aLeftStr);
} }
// annotation: upper border // annotation: upper border
if (aItem.lUpper) if (aItem.lUpper)
{ {
DrawArrow(Point(lX0 - 5, lY0), Point(lX0 - 5, lY1), sal_False); DrawArrow(Point(lX0 - 5, lY0), Point(lX0 - 5, lY1), false);
DrawText(Point(lX0 - 10 - lUpperWidth, ROUND(lY0 + f * aItem.lUpper / 2 - lXHeight / 2)), aUpperStr); DrawText(Point(lX0 - 10 - lUpperWidth, ROUND(lY0 + f * aItem.lUpper / 2 - lXHeight / 2)), aUpperStr);
} }
...@@ -201,36 +201,36 @@ void SwLabPreview::Paint(const Rectangle &) ...@@ -201,36 +201,36 @@ void SwLabPreview::Paint(const Rectangle &)
if (aItem.nCols > 1) if (aItem.nCols > 1)
{ {
long lX = (lX1 + lX3) / 2; long lX = (lX1 + lX3) / 2;
DrawArrow(Point(lX1, lY0 - 5), Point(lX3, lY0 - 5), sal_False); DrawArrow(Point(lX1, lY0 - 5), Point(lX3, lY0 - 5), false);
DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), sal_True); DrawArrow(Point(lX, lY0 - 10), Point(lX, lY0 - 5), true);
DrawText(Point(lX - lHDistWidth / 2, lY0 - 10 - lXHeight), aHDistStr); DrawText(Point(lX - lHDistWidth / 2, lY0 - 10 - lXHeight), aHDistStr);
} }
// annotation: vertical gap // annotation: vertical gap
if (aItem.nRows > 1) if (aItem.nRows > 1)
{ {
DrawArrow(Point(lX0 - 5, lY1), Point(lX0 - 5, lY3), sal_False); DrawArrow(Point(lX0 - 5, lY1), Point(lX0 - 5, lY3), false);
DrawText(Point(lX0 - 10 - lVDistWidth, ROUND(lY1 + f * aItem.lVDist / 2 - lXHeight / 2)), aVDistStr); DrawText(Point(lX0 - 10 - lVDistWidth, ROUND(lY1 + f * aItem.lVDist / 2 - lXHeight / 2)), aVDistStr);
} }
// annotation: columns // annotation: columns
{ {
long lY = lY0 + lOutlineH + 4; long lY = lY0 + lOutlineH + 4;
DrawArrow(Point(lX0, lY), Point(lX0 + lOutlineW - 1, lY), sal_True); DrawArrow(Point(lX0, lY), Point(lX0 + lOutlineW - 1, lY), true);
DrawText(Point((lX0 + lX0 + lOutlineW - 1) / 2 - lColsWidth / 2, lY + 5), aColsStr); DrawText(Point((lX0 + lX0 + lOutlineW - 1) / 2 - lColsWidth / 2, lY + 5), aColsStr);
} }
// annotation: lines // annotation: lines
{ {
long lX = lX0 + lOutlineW + 4; long lX = lX0 + lOutlineW + 4;
DrawArrow(Point(lX, lY0), Point(lX, lY0 + lOutlineH - 1), sal_True); DrawArrow(Point(lX, lY0), Point(lX, lY0 + lOutlineH - 1), true);
DrawText(Point(lX + 5, (lY0 + lY0 + lOutlineH - 1 - lXHeight / 2) / 2), aRowsStr); DrawText(Point(lX + 5, (lY0 + lY0 + lOutlineH - 1 - lXHeight / 2) / 2), aRowsStr);
} }
} }
// Arror or interval character -------------------------------------------- // Arror or interval character --------------------------------------------
void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, sal_Bool bArrow) void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, bool bArrow)
{ {
DrawLine(rP1, rP2); DrawLine(rP1, rP2);
...@@ -315,7 +315,7 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) : ...@@ -315,7 +315,7 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
aPHeightText (this, SW_RES(TXT_PHEIGHT )), aPHeightText (this, SW_RES(TXT_PHEIGHT )),
aPHeightField (this, SW_RES(FLD_PHEIGHT )), aPHeightField (this, SW_RES(FLD_PHEIGHT )),
aSavePB (this, SW_RES(PB_SAVE )), aSavePB (this, SW_RES(PB_SAVE )),
bModified(sal_False), bModified(false),
aItem ((const SwLabItem&) rSet.Get(FN_LABEL)) aItem ((const SwLabItem&) rSet.Get(FN_LABEL))
{ {
FreeResource(); FreeResource();
...@@ -370,7 +370,7 @@ SwLabFmtPage::~SwLabFmtPage() ...@@ -370,7 +370,7 @@ SwLabFmtPage::~SwLabFmtPage()
// Modify-handler of MetricFields. start preview timer // Modify-handler of MetricFields. start preview timer
IMPL_LINK_NOARG_INLINE_START(SwLabFmtPage, ModifyHdl) IMPL_LINK_NOARG_INLINE_START(SwLabFmtPage, ModifyHdl)
{ {
bModified = sal_True; bModified = true;
aPreviewTimer.Start(); aPreviewTimer.Start();
return 0; return 0;
} }
...@@ -575,7 +575,7 @@ IMPL_LINK_NOARG(SwLabFmtPage, SaveHdl) ...@@ -575,7 +575,7 @@ IMPL_LINK_NOARG(SwLabFmtPage, SaveHdl)
pSaveDlg->Execute(); pSaveDlg->Execute();
if(pSaveDlg->GetLabel(aItem)) if(pSaveDlg->GetLabel(aItem))
{ {
bModified = sal_False; bModified = false;
const Sequence<OUString>& rMan = GetParentSwLabDlg()->GetLabelsConfig().GetManufacturers(); const Sequence<OUString>& rMan = GetParentSwLabDlg()->GetLabelsConfig().GetManufacturers();
std::vector<rtl::OUString>& rMakes(GetParentSwLabDlg()->Makes()); std::vector<rtl::OUString>& rMakes(GetParentSwLabDlg()->Makes());
if(rMakes.size() < (sal_uInt16)rMan.getLength()) if(rMakes.size() < (sal_uInt16)rMan.getLength())
...@@ -606,7 +606,7 @@ SwSaveLabelDlg::SwSaveLabelDlg(SwLabFmtPage* pParent, SwLabRec& rRec) : ...@@ -606,7 +606,7 @@ SwSaveLabelDlg::SwSaveLabelDlg(SwLabFmtPage* pParent, SwLabRec& rRec) :
aQueryMB(this, SW_RES(MB_QUERY )), aQueryMB(this, SW_RES(MB_QUERY )),
bSuccess(sal_False), bSuccess(false),
pLabPage(pParent), pLabPage(pParent),
rLabRec(rRec) rLabRec(rRec)
{ {
...@@ -644,7 +644,7 @@ IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl) ...@@ -644,7 +644,7 @@ IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl)
} }
rLabRec.aType = sType; rLabRec.aType = sType;
rCfg.SaveLabel(sMake, sType, rLabRec); rCfg.SaveLabel(sMake, sType, rLabRec);
bSuccess = sal_True; bSuccess = true;
EndDialog(RET_OK); EndDialog(RET_OK);
return 0; return 0;
} }
...@@ -655,7 +655,7 @@ IMPL_LINK_NOARG(SwSaveLabelDlg, ModifyHdl) ...@@ -655,7 +655,7 @@ IMPL_LINK_NOARG(SwSaveLabelDlg, ModifyHdl)
return 0; return 0;
} }
sal_Bool SwSaveLabelDlg::GetLabel(SwLabItem& rItem) bool SwSaveLabelDlg::GetLabel(SwLabItem& rItem)
{ {
if(bSuccess) if(bSuccess)
{ {
......
...@@ -62,7 +62,7 @@ class SwLabPreview : public Window ...@@ -62,7 +62,7 @@ class SwLabPreview : public Window
void Paint(const Rectangle&); void Paint(const Rectangle&);
void DrawArrow(const Point& rP1, const Point& rP2, sal_Bool bArrow); void DrawArrow(const Point& rP1, const Point& rP2, bool bArrow);
using Window::GetParent; using Window::GetParent;
SwLabFmtPage* GetParent() {return (SwLabFmtPage*) Window::GetParent();} SwLabFmtPage* GetParent() {return (SwLabFmtPage*) Window::GetParent();}
...@@ -107,7 +107,7 @@ class SwLabFmtPage : public SfxTabPage ...@@ -107,7 +107,7 @@ class SwLabFmtPage : public SfxTabPage
PushButton aSavePB; PushButton aSavePB;
Timer aPreviewTimer; Timer aPreviewTimer;
sal_Bool bModified; bool bModified;
SwLabItem aItem; SwLabItem aItem;
...@@ -151,7 +151,7 @@ class SwSaveLabelDlg : public ModalDialog ...@@ -151,7 +151,7 @@ class SwSaveLabelDlg : public ModalDialog
QueryBox aQueryMB; QueryBox aQueryMB;
sal_Bool bSuccess; bool bSuccess;
SwLabFmtPage* pLabPage; SwLabFmtPage* pLabPage;
SwLabRec& rLabRec; SwLabRec& rLabRec;
...@@ -166,7 +166,7 @@ public: ...@@ -166,7 +166,7 @@ public:
aMakeCB.SetText(String(rMake)); aMakeCB.SetText(String(rMake));
aTypeED.SetText(String(rType)); aTypeED.SetText(String(rType));
} }
sal_Bool GetLabel(SwLabItem& rItem); bool GetLabel(SwLabItem& rItem);
}; };
#endif #endif
......
...@@ -275,7 +275,7 @@ SwLabCfgItem::SwLabCfgItem(sal_Bool bLabel) : ...@@ -275,7 +275,7 @@ SwLabCfgItem::SwLabCfgItem(sal_Bool bLabel) :
EnableNotification(aNames); EnableNotification(aNames);
const Any* pValues = aValues.getConstArray(); const Any* pValues = aValues.getConstArray();
OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed"); OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
sal_Bool bNoConfigValues = sal_True; bool bNoConfigValues = true;
if(aValues.getLength() == aNames.getLength()) if(aValues.getLength() == aNames.getLength())
{ {
for(int nProp = 0, nProperty = 0; nProp < aNames.getLength(); nProp++, nProperty++) for(int nProp = 0, nProperty = 0; nProp < aNames.getLength(); nProp++, nProperty++)
...@@ -287,7 +287,7 @@ SwLabCfgItem::SwLabCfgItem(sal_Bool bLabel) : ...@@ -287,7 +287,7 @@ SwLabCfgItem::SwLabCfgItem(sal_Bool bLabel) :
if(nProp == 17 && !bIsLabel) if(nProp == 17 && !bIsLabel)
nProperty += 3; nProperty += 3;
if(nProperty >= 20) if(nProperty >= 20)
bNoConfigValues = sal_False; bNoConfigValues = false;
switch(nProperty) switch(nProperty)
{ {
case 0: aItem.bCont = *(sal_Bool*)pValues[nProp].getValue(); break;// "Medium/Continous", case 0: aItem.bCont = *(sal_Bool*)pValues[nProp].getValue(); break;// "Medium/Continous",
......
...@@ -344,7 +344,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, ...@@ -344,7 +344,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
aLk = LINK(this, SwMailMergeDlg, FilenameHdl); aLk = LINK(this, SwMailMergeDlg, FilenameHdl);
aGenerateFromDataBaseCB.SetClickHdl( aLk ); aGenerateFromDataBaseCB.SetClickHdl( aLk );
sal_Bool bColumn = pModOpt->IsNameFromColumn(); bool bColumn = pModOpt->IsNameFromColumn();
if(bColumn) if(bColumn)
aGenerateFromDataBaseCB.Check(); aGenerateFromDataBaseCB.Check();
......
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