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

sal_Bool to bool

Change-Id: I85995bc3e1fc3c1f01b4d9bded3707ea0b296fa9
üst bfe4074e
......@@ -267,10 +267,10 @@ void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab,
aTitle = pSrcDoc->GetString(nCol, nRow1, nTab);
if (aTitle.Len())
{
sal_Bool bFound = false;
bool bFound = false;
for (SCSIZE i=0; i<nColCount && !bFound; i++)
if ( *ppColHeaders[i] == aTitle )
bFound = sal_True;
bFound = true;
if (!bFound)
lcl_AddString( ppColHeaders, nColCount, aTitle );
}
......@@ -284,10 +284,10 @@ void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab,
aTitle = pSrcDoc->GetString(nCol1, nRow, nTab);
if (aTitle.Len())
{
sal_Bool bFound = false;
bool bFound = false;
for (SCSIZE i=0; i<nRowCount && !bFound; i++)
if ( *ppRowHeaders[i] == aTitle )
bFound = sal_True;
bFound = true;
if (!bFound)
lcl_AddString( ppRowHeaders, nRowCount, aTitle );
}
......@@ -539,12 +539,12 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
SCCOL nPos = SC_CONS_NOTFOUND;
if (aTitle.Len())
{
sal_Bool bFound = false;
bool bFound = false;
for (SCSIZE i=0; i<nColCount && !bFound; i++)
if ( *ppColHeaders[i] == aTitle )
{
nPos = static_cast<SCCOL>(i);
bFound = sal_True;
bFound = true;
}
OSL_ENSURE(bFound, "column not found");
}
......@@ -560,12 +560,12 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
SCROW nPos = SC_CONS_NOTFOUND;
if (aTitle.Len())
{
sal_Bool bFound = false;
bool bFound = false;
for (SCSIZE i=0; i<nRowCount && !bFound; i++)
if ( *ppRowHeaders[i] == aTitle )
{
nPos = static_cast<SCROW>(i);
bFound = sal_True;
bFound = true;
}
OSL_ENSURE(bFound, "row not found");
}
......@@ -577,7 +577,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
// Daten
sal_Bool bAnyCell = ( eFunction == SUBTOTAL_FUNC_CNT2 );
bool bAnyCell = ( eFunction == SUBTOTAL_FUNC_CNT2 );
for (nCol=nCol1; nCol<=nCol2; nCol++)
{
SCCOL nArrX = nCol-nCol1;
......@@ -794,7 +794,7 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow,
for (SCSIZE nPos=0; nPos<nDataCount; nPos++)
{
SCSIZE nTPos = ppTitlePos[nArrY][nPos];
sal_Bool bDo = sal_True;
bool bDo = true;
if (nPos+1<nDataCount)
if (ppTitlePos[nArrY][nPos+1] == nTPos)
bDo = false; // leer
......
......@@ -348,7 +348,7 @@ void ScContentTree::MouseButtonDown( const MouseEvent& rMEvt )
void ScContentTree::KeyInput( const KeyEvent& rKEvt )
{
sal_Bool bUsed = false;
bool bUsed = false;
const KeyCode aCode = rKEvt.GetKeyCode();
if (aCode.GetCode() == KEY_RETURN)
......@@ -357,7 +357,7 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt )
{
case KEY_MOD1:
ToggleRoot(); // toggle root mode (as in Writer)
bUsed = sal_True;
bUsed = true;
break;
case 0:
{
......@@ -379,7 +379,7 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt )
ContentDoubleClickHdl(0); // select content as if double clicked
}
bUsed = sal_True;
bUsed = true;
}
break;
}
......@@ -411,7 +411,7 @@ void ScContentTree::DragFinished( sal_Int8 /* nAction */ )
void ScContentTree::Command( const CommandEvent& rCEvt )
{
sal_Bool bDone = false;
bool bDone = false;
switch ( rCEvt.GetCommand() )
{
......@@ -423,7 +423,7 @@ void ScContentTree::Command( const CommandEvent& rCEvt )
Application::PostUserEvent( STATIC_LINK( this, ScContentTree, ExecDragHdl ) );
bDone = sal_True;
bDone = true;
break;
case COMMAND_CONTEXTMENU:
......@@ -1035,8 +1035,8 @@ static void lcl_DoDragObject( ScDocShell* pSrcShell, const String& rName, sal_uI
ScDrawLayer* pModel = pSrcDoc->GetDrawLayer();
if (pModel)
{
sal_Bool bOle = ( nType == SC_CONTENT_OLEOBJECT );
sal_Bool bGraf = ( nType == SC_CONTENT_GRAPHIC );
bool bOle = ( nType == SC_CONTENT_OLEOBJECT );
bool bGraf = ( nType == SC_CONTENT_GRAPHIC );
sal_uInt16 nDrawId = sal::static_int_cast<sal_uInt16>( bOle ? OBJ_OLE2 : ( bGraf ? OBJ_GRAF : OBJ_GRUP ) );
SCTAB nTab = 0;
SdrObject* pObject = pModel->GetNamedObject( rName, nDrawId, nTab );
......@@ -1136,7 +1136,7 @@ void ScContentTree::DoDrag()
}
}
sal_Bool bDoLinkTrans = false; // use ScLinkTransferObj
bool bDoLinkTrans = false; // use ScLinkTransferObj
String aLinkURL; // for ScLinkTransferObj
String aLinkText;
......@@ -1159,7 +1159,7 @@ void ScContentTree::DoDrag()
aLinkURL = aUrl;
aLinkText = aText;
}
bDoLinkTrans = sal_True;
bDoLinkTrans = true;
}
break;
case SC_DROPMODE_LINK:
......@@ -1172,12 +1172,12 @@ void ScContentTree::DoDrag()
{
case SC_CONTENT_TABLE:
pScMod->SetDragLink( aDocName, aText, EMPTY_STRING );
bDoLinkTrans = sal_True;
bDoLinkTrans = true;
break;
case SC_CONTENT_RANGENAME:
case SC_CONTENT_DBAREA:
pScMod->SetDragLink( aDocName, EMPTY_STRING, aText );
bDoLinkTrans = sal_True;
bDoLinkTrans = true;
break;
// other types cannot be linked
......@@ -1397,7 +1397,7 @@ void ScContentTree::SelectDoc(const String& rName) // rName wie im Menue/Li
if ( rName.Copy( nNotActiveStart ) == pParentWindow->aStrNotActive )
aRealName = rName.Copy( 0, nNotActiveStart );
sal_Bool bLoaded = false;
bool bLoaded = false;
// ist es ein normal geladenes Doc ?
......@@ -1406,7 +1406,7 @@ void ScContentTree::SelectDoc(const String& rName) // rName wie im Menue/Li
{
if ( pSh->ISA(ScDocShell) )
if ( pSh->GetTitle() == aRealName )
bLoaded = sal_True;
bLoaded = true;
pSh = SfxObjectShell::GetNext( *pSh );
}
......
......@@ -398,12 +398,12 @@ SC_SIMPLE_SERVICE_INFO( ScStyleFamilyObj, "ScStyleFamilyObj", "com.sun.star.styl
//------------------------------------------------------------------------
static sal_Bool lcl_AnyTabProtected( ScDocument& rDoc )
static bool lcl_AnyTabProtected( ScDocument& rDoc )
{
SCTAB nTabCount = rDoc.GetTableCount();
for (SCTAB i=0; i<nTabCount; i++)
if (rDoc.IsTabProtected(i))
return sal_True;
return true;
return false;
}
......@@ -664,7 +664,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno::
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
sal_Bool bDone = false;
bool bDone = false;
// Reflection muss nicht uno::XInterface sein, kann auch irgendein Interface sein...
uno::Reference< uno::XInterface > xInterface(aElement, uno::UNO_QUERY);
if ( xInterface.is() )
......@@ -691,7 +691,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno::
pStyleObj->InitDoc( pDocShell, aNameStr ); // Objekt kann benutzt werden
pDocShell->SetDocumentModified(); // verwendet wird der neue Style noch nicht
bDone = sal_True;
bDone = true;
}
else
throw container::ElementExistException();
......@@ -720,7 +720,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName )
lang::WrappedTargetException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
sal_Bool bFound = false;
bool bFound = false;
if ( pDocShell )
{
String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ));
......@@ -734,7 +734,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName )
SfxStyleSheetBase* pStyle = pStylePool->Find( aString, eFamily );
if (pStyle)
{
bFound = sal_True;
bFound = true;
if ( eFamily == SFX_STYLE_FAMILY_PARA )
{
// wie ScViewFunc::RemoveStyleSheetInUse
......@@ -1539,7 +1539,7 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt
throw uno::RuntimeException();
SfxItemSet& rSet = pStyle->GetItemSet(); // direkt im lebenden Style aendern...
sal_Bool bDone = false;
bool bDone = false;
if ( eFamily == SFX_STYLE_FAMILY_PAGE )
{
if(pEntry->nWID == SC_WID_UNO_HEADERSET)
......@@ -1553,7 +1553,7 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt
else
aNewHeader.GetItemSet().ClearItem( pHeaderEntry->nWID );
rSet.Put( aNewHeader );
bDone = sal_True;
bDone = true;
}
}
else if(pEntry->nWID == SC_WID_UNO_FOOTERSET)
......@@ -1567,7 +1567,7 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt
else
aNewFooter.GetItemSet().ClearItem( pFooterEntry->nWID );
rSet.Put( aNewFooter );
bDone = sal_True;
bDone = true;
}
}
}
......@@ -1687,13 +1687,13 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt
case ATTR_PAGE_PAPERBIN:
{
sal_uInt8 nTray = PAPERBIN_PRINTER_SETTINGS;
sal_Bool bFound = false;
bool bFound = false;
OUString aName;
if ( *pValue >>= aName )
{
if ( aName == SC_PAPERBIN_DEFAULTNAME )
bFound = sal_True;
bFound = true;
else
{
Printer* pPrinter = pDocShell->GetPrinter();
......@@ -1704,7 +1704,7 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt
if ( aName == pPrinter->GetPaperBinName(i) )
{
nTray = (sal_uInt8) i;
bFound = sal_True;
bFound = true;
break;
}
}
......@@ -1986,7 +1986,7 @@ OUString SAL_CALL ScStyleObj::getImplementationName() throw(uno::RuntimeExceptio
sal_Bool SAL_CALL ScStyleObj::supportsService( const OUString& rServiceName )
throw(uno::RuntimeException)
{
sal_Bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SCSTYLE_SERVICE ) )||
rServiceName.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM ( bPage ? SCPAGESTYLE_SERVICE : SCCELLSTYLE_SERVICE ));
......@@ -1995,7 +1995,7 @@ sal_Bool SAL_CALL ScStyleObj::supportsService( const OUString& rServiceName )
uno::Sequence<OUString> SAL_CALL ScStyleObj::getSupportedServiceNames()
throw(uno::RuntimeException)
{
sal_Bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
uno::Sequence<OUString> aRet(2);
OUString* pArray = aRet.getArray();
pArray[0] = OUString(SCSTYLE_SERVICE );
......
This diff is collapsed.
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