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

sal_Bool to bool

Change-Id: Id6488ba7a72603f2f0eb2972f22797d6025f6031
üst c0c366bb
...@@ -98,7 +98,7 @@ private: ...@@ -98,7 +98,7 @@ private:
sal_uInt16 nTabs; sal_uInt16 nTabs;
sal_uInt16 nMargin1Style; sal_uInt16 nMargin1Style;
sal_uInt16 nMargin2Style; sal_uInt16 nMargin2Style;
sal_Bool bAutoPageWidth; bool bAutoPageWidth;
sal_Bool bTextRTL; sal_Bool bTextRTL;
public: public:
...@@ -130,11 +130,11 @@ struct ImplRulerHitTest ...@@ -130,11 +130,11 @@ struct ImplRulerHitTest
RulerType eType; RulerType eType;
sal_uInt16 nAryPos; sal_uInt16 nAryPos;
sal_uInt16 mnDragSize; sal_uInt16 mnDragSize;
sal_Bool bSize; bool bSize;
sal_Bool bSizeBar; bool bSizeBar;
sal_Bool bExpandTest; bool bExpandTest;
ImplRulerHitTest() : ImplRulerHitTest() :
bExpandTest( sal_False ) {} bExpandTest( false ) {}
}; };
// ======================================================================= // =======================================================================
...@@ -144,7 +144,7 @@ ImplRulerData::ImplRulerData() ...@@ -144,7 +144,7 @@ ImplRulerData::ImplRulerData()
memset( this, 0, sizeof( ImplRulerData ) ); memset( this, 0, sizeof( ImplRulerData ) );
// PageBreite == EditWinBreite // PageBreite == EditWinBreite
bAutoPageWidth = sal_True; bAutoPageWidth = true;
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
...@@ -436,7 +436,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) ...@@ -436,7 +436,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
long nTickCount = aImplRulerUnitTab[mnUnitIndex].nTick1; long nTickCount = aImplRulerUnitTab[mnUnitIndex].nTick1;
Size aPixSize = maVirDev.LogicToPixel( Size( nTick3, nTick3 ), maMapMode ); Size aPixSize = maVirDev.LogicToPixel( Size( nTick3, nTick3 ), maMapMode );
long nTickWidth; long nTickWidth;
sal_Bool bNoTicks = sal_False; bool bNoTicks = false;
long nTickUnit = 0; long nTickUnit = 0;
long nTick2 = 0; long nTick2 = 0;
...@@ -508,7 +508,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) ...@@ -508,7 +508,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
// koennen // koennen
if ( nMulti < nOldMulti ) if ( nMulti < nOldMulti )
{ {
bNoTicks = sal_True; bNoTicks = true;
break; break;
} }
...@@ -770,7 +770,7 @@ void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom ...@@ -770,7 +770,7 @@ void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom
static void ImplCenterTabPos( Point& rPos, sal_uInt16 nTabStyle ) static void ImplCenterTabPos( Point& rPos, sal_uInt16 nTabStyle )
{ {
sal_Bool bRTL = 0 != (nTabStyle & RULER_TAB_RTL); bool bRTL = 0 != (nTabStyle & RULER_TAB_RTL);
nTabStyle &= RULER_TAB_STYLE; nTabStyle &= RULER_TAB_STYLE;
rPos.Y() += RULER_TAB_HEIGHT/2; rPos.Y() += RULER_TAB_HEIGHT/2;
if ( (!bRTL && nTabStyle == RULER_TAB_LEFT) ||( bRTL && nTabStyle == RULER_TAB_RIGHT)) if ( (!bRTL && nTabStyle == RULER_TAB_LEFT) ||( bRTL && nTabStyle == RULER_TAB_RIGHT))
...@@ -780,7 +780,7 @@ static void ImplCenterTabPos( Point& rPos, sal_uInt16 nTabStyle ) ...@@ -780,7 +780,7 @@ static void ImplCenterTabPos( Point& rPos, sal_uInt16 nTabStyle )
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
static void lcl_RotateRect_Impl(Rectangle& rRect, const long nReference, sal_Bool bRightAligned) static void lcl_RotateRect_Impl(Rectangle& rRect, const long nReference, bool bRightAligned)
{ {
if(!rRect.IsEmpty()) if(!rRect.IsEmpty())
{ {
...@@ -806,7 +806,7 @@ static void ImplDrawRulerTab( OutputDevice* pDevice, ...@@ -806,7 +806,7 @@ static void ImplDrawRulerTab( OutputDevice* pDevice,
return; return;
sal_uInt16 nTabStyle = nStyle & RULER_TAB_STYLE; sal_uInt16 nTabStyle = nStyle & RULER_TAB_STYLE;
sal_Bool bRTL = 0 != (nStyle & RULER_TAB_RTL); bool bRTL = 0 != (nStyle & RULER_TAB_RTL);
Rectangle aRect1, aRect2, aRect3; Rectangle aRect1, aRect2, aRect3;
aRect3.SetEmpty(); aRect3.SetEmpty();
if ( nTabStyle == RULER_TAB_DEFAULT ) if ( nTabStyle == RULER_TAB_DEFAULT )
...@@ -864,7 +864,7 @@ static void ImplDrawRulerTab( OutputDevice* pDevice, ...@@ -864,7 +864,7 @@ static void ImplDrawRulerTab( OutputDevice* pDevice,
} }
if( 0 == (nWinBits&WB_HORZ) ) if( 0 == (nWinBits&WB_HORZ) )
{ {
sal_Bool bRightAligned = 0 != (nWinBits&WB_RIGHT_ALIGNED); bool bRightAligned = 0 != (nWinBits&WB_RIGHT_ALIGNED);
lcl_RotateRect_Impl(aRect1, rPos.Y(), bRightAligned); lcl_RotateRect_Impl(aRect1, rPos.Y(), bRightAligned);
lcl_RotateRect_Impl(aRect2, rPos.Y(), bRightAligned); lcl_RotateRect_Impl(aRect2, rPos.Y(), bRightAligned);
lcl_RotateRect_Impl(aRect3, rPos.Y(), bRightAligned); lcl_RotateRect_Impl(aRect3, rPos.Y(), bRightAligned);
...@@ -1273,7 +1273,7 @@ void Ruler::ImplDrawExtra( sal_Bool bPaint ) ...@@ -1273,7 +1273,7 @@ void Ruler::ImplDrawExtra( sal_Bool bPaint )
{ {
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Rectangle aRect = maExtraRect; Rectangle aRect = maExtraRect;
sal_Bool bEraseRect = sal_False; bool bEraseRect = false;
aRect.Left() += 2; aRect.Left() += 2;
aRect.Top() += 2; aRect.Top() += 2;
...@@ -1283,14 +1283,14 @@ void Ruler::ImplDrawExtra( sal_Bool bPaint ) ...@@ -1283,14 +1283,14 @@ void Ruler::ImplDrawExtra( sal_Bool bPaint )
if ( !bPaint && !(mnExtraStyle & RULER_STYLE_HIGHLIGHT) ) if ( !bPaint && !(mnExtraStyle & RULER_STYLE_HIGHLIGHT) )
{ {
SetFillColor( rStyleSettings.GetWorkspaceColor() ); SetFillColor( rStyleSettings.GetWorkspaceColor() );
bEraseRect = sal_True; bEraseRect = true;
} }
else else
{ {
if ( mnExtraStyle & RULER_STYLE_HIGHLIGHT ) if ( mnExtraStyle & RULER_STYLE_HIGHLIGHT )
{ {
SetFillColor( rStyleSettings.GetCheckedColor() ); SetFillColor( rStyleSettings.GetCheckedColor() );
bEraseRect = sal_True; bEraseRect = true;
} }
} }
...@@ -1395,8 +1395,8 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, ...@@ -1395,8 +1395,8 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
// #i32608# // #i32608#
pHitTest->nAryPos = 0; pHitTest->nAryPos = 0;
pHitTest->mnDragSize = 0; pHitTest->mnDragSize = 0;
pHitTest->bSize = sal_False; pHitTest->bSize = false;
pHitTest->bSizeBar = sal_False; pHitTest->bSizeBar = false;
// Damit ueberstehende Tabs und Einzuege mit beruecksichtigt werden // Damit ueberstehende Tabs und Einzuege mit beruecksichtigt werden
long nXExtraOff; long nXExtraOff;
...@@ -1546,7 +1546,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, ...@@ -1546,7 +1546,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
{ {
if ( nStyle & RULER_BORDER_MOVEABLE ) if ( nStyle & RULER_BORDER_MOVEABLE )
{ {
pHitTest->bSizeBar = sal_True; pHitTest->bSizeBar = true;
pHitTest->mnDragSize = RULER_DRAGSIZE_MOVE; pHitTest->mnDragSize = RULER_DRAGSIZE_MOVE;
} }
} }
...@@ -1566,19 +1566,19 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, ...@@ -1566,19 +1566,19 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
if ( nX <= n1+nMOff ) if ( nX <= n1+nMOff )
{ {
pHitTest->bSize = sal_True; pHitTest->bSize = true;
pHitTest->mnDragSize = RULER_DRAGSIZE_1; pHitTest->mnDragSize = RULER_DRAGSIZE_1;
} }
else if ( nX >= n2-nMOff ) else if ( nX >= n2-nMOff )
{ {
pHitTest->bSize = sal_True; pHitTest->bSize = true;
pHitTest->mnDragSize = RULER_DRAGSIZE_2; pHitTest->mnDragSize = RULER_DRAGSIZE_2;
} }
else else
{ {
if ( nStyle & RULER_BORDER_MOVEABLE ) if ( nStyle & RULER_BORDER_MOVEABLE )
{ {
pHitTest->bSizeBar = sal_True; pHitTest->bSizeBar = true;
pHitTest->mnDragSize = RULER_DRAGSIZE_MOVE; pHitTest->mnDragSize = RULER_DRAGSIZE_MOVE;
} }
} }
...@@ -1598,7 +1598,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, ...@@ -1598,7 +1598,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
if ( (nX >= n1 - nMarginTolerance) && (nX <= n1 + nMarginTolerance) ) if ( (nX >= n1 - nMarginTolerance) && (nX <= n1 + nMarginTolerance) )
{ {
pHitTest->eType = RULER_TYPE_MARGIN1; pHitTest->eType = RULER_TYPE_MARGIN1;
pHitTest->bSize = sal_True; pHitTest->bSize = true;
return sal_True; return sal_True;
} }
} }
...@@ -1608,7 +1608,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest, ...@@ -1608,7 +1608,7 @@ sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
if ( (nX >= n1 - nMarginTolerance) && (nX <= n1 + nMarginTolerance) ) if ( (nX >= n1 - nMarginTolerance) && (nX <= n1 + nMarginTolerance) )
{ {
pHitTest->eType = RULER_TYPE_MARGIN2; pHitTest->eType = RULER_TYPE_MARGIN2;
pHitTest->bSize = sal_True; pHitTest->bSize = true;
return sal_True; return sal_True;
} }
} }
...@@ -2272,7 +2272,7 @@ sal_Bool Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType ) ...@@ -2272,7 +2272,7 @@ sal_Bool Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType )
sal_uInt16 nMouseModifier = rMEvt.GetModifier(); sal_uInt16 nMouseModifier = rMEvt.GetModifier();
ImplRulerHitTest aHitTest; ImplRulerHitTest aHitTest;
if(eDragType != RULER_TYPE_DONTKNOW) if(eDragType != RULER_TYPE_DONTKNOW)
aHitTest.bExpandTest = sal_True; aHitTest.bExpandTest = true;
// Gegebenenfalls Lineal updaten (damit mit den richtigen Daten // Gegebenenfalls Lineal updaten (damit mit den richtigen Daten
// gearbeitet wird und die Anzeige auch zur Bearbeitung passt) // gearbeitet wird und die Anzeige auch zur Bearbeitung passt)
...@@ -2388,9 +2388,9 @@ void Ruler::SetPagePos( long nNewOff, long nNewWidth ) ...@@ -2388,9 +2388,9 @@ void Ruler::SetPagePos( long nNewOff, long nNewWidth )
// Gegebenenfalls werden die Breiten automatisch berechnet // Gegebenenfalls werden die Breiten automatisch berechnet
if ( !nNewWidth ) if ( !nNewWidth )
mpData->bAutoPageWidth = sal_True; mpData->bAutoPageWidth = true;
else else
mpData->bAutoPageWidth = sal_False; mpData->bAutoPageWidth = false;
// Werte setzen (werden in ImplFormat gegebenenfalls mitberechnet) // Werte setzen (werden in ImplFormat gegebenenfalls mitberechnet)
mpData->nPageOff = nNewOff; mpData->nPageOff = nNewOff;
...@@ -2576,11 +2576,11 @@ void Ruler::SetLines( sal_uInt16 n, const RulerLine* pLineAry ) ...@@ -2576,11 +2576,11 @@ void Ruler::SetLines( sal_uInt16 n, const RulerLine* pLineAry )
} }
// New values and new share issue // New values and new share issue
sal_Bool bMustUpdate; bool bMustUpdate;
if ( IsReallyVisible() && IsUpdateMode() ) if ( IsReallyVisible() && IsUpdateMode() )
bMustUpdate = sal_True; bMustUpdate = true;
else else
bMustUpdate = sal_False; bMustUpdate = false;
// Delete old lines // Delete old lines
if ( bMustUpdate ) if ( bMustUpdate )
......
...@@ -130,7 +130,7 @@ class GridFieldValueListener : protected ::comphelper::OPropertyChangeListener ...@@ -130,7 +130,7 @@ class GridFieldValueListener : protected ::comphelper::OPropertyChangeListener
::comphelper::OPropertyChangeMultiplexer* m_pRealListener; ::comphelper::OPropertyChangeMultiplexer* m_pRealListener;
sal_uInt16 m_nId; sal_uInt16 m_nId;
sal_Int16 m_nSuspended; sal_Int16 m_nSuspended;
sal_Bool m_bDisposed : 1; bool m_bDisposed : 1;
public: public:
GridFieldValueListener(DbGridControl& _rParent, const Reference< XPropertySet >& xField, sal_uInt16 _nId); GridFieldValueListener(DbGridControl& _rParent, const Reference< XPropertySet >& xField, sal_uInt16 _nId);
...@@ -150,7 +150,7 @@ GridFieldValueListener::GridFieldValueListener(DbGridControl& _rParent, const Re ...@@ -150,7 +150,7 @@ GridFieldValueListener::GridFieldValueListener(DbGridControl& _rParent, const Re
,m_pRealListener(NULL) ,m_pRealListener(NULL)
,m_nId(_nId) ,m_nId(_nId)
,m_nSuspended(0) ,m_nSuspended(0)
,m_bDisposed(sal_False) ,m_bDisposed(false)
{ {
DBG_CTOR(GridFieldValueListener, NULL); DBG_CTOR(GridFieldValueListener, NULL);
if (_rField.is()) if (_rField.is())
...@@ -192,7 +192,7 @@ void GridFieldValueListener::dispose() ...@@ -192,7 +192,7 @@ void GridFieldValueListener::dispose()
m_pRealListener = NULL; m_pRealListener = NULL;
} }
m_bDisposed = sal_True; m_bDisposed = true;
m_rParent.FieldListenerDisposing(m_nId); m_rParent.FieldListenerDisposing(m_nId);
} }
...@@ -1312,7 +1312,7 @@ sal_uInt16 DbGridControl::SetOptions(sal_uInt16 nOpt) ...@@ -1312,7 +1312,7 @@ sal_uInt16 DbGridControl::SetOptions(sal_uInt16 nOpt)
// _after_ setting the mode because this results in an ActivateCell // _after_ setting the mode because this results in an ActivateCell
DeactivateCell(); DeactivateCell();
sal_Bool bInsertChanged = (nOpt & OPT_INSERT) != (m_nOptions & OPT_INSERT); bool bInsertChanged = (nOpt & OPT_INSERT) != (m_nOptions & OPT_INSERT);
m_nOptions = nOpt; m_nOptions = nOpt;
// we need to set this before the code below because it indirectly uses m_nOptions // we need to set this before the code below because it indirectly uses m_nOptions
...@@ -1858,7 +1858,7 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B ...@@ -1858,7 +1858,7 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B
} }
// ignore any updates implicit made // ignore any updates implicit made
sal_Bool bDisablePaint = !bUpdateCursor && IsPaintEnabled(); bool bDisablePaint = !bUpdateCursor && IsPaintEnabled();
if (bDisablePaint) if (bDisablePaint)
EnablePaint(sal_False); EnablePaint(sal_False);
...@@ -1866,7 +1866,7 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B ...@@ -1866,7 +1866,7 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B
Reference< XPropertySet > xSet = m_pSeekCursor->getPropertySet(); Reference< XPropertySet > xSet = m_pSeekCursor->getPropertySet();
sal_Int32 nCacheSize = 0; sal_Int32 nCacheSize = 0;
xSet->getPropertyValue(FM_PROP_FETCHSIZE) >>= nCacheSize; xSet->getPropertyValue(FM_PROP_FETCHSIZE) >>= nCacheSize;
sal_Bool bCacheAligned = sal_False; bool bCacheAligned = false;
// Nach der Initialisierung (m_nSeekPos < 0) keine Cursorbewegung, da bereits auf den ersten // Nach der Initialisierung (m_nSeekPos < 0) keine Cursorbewegung, da bereits auf den ersten
// Satz positioniert // Satz positioniert
long nDelta = nNewTopRow - GetTopRow(); long nDelta = nNewTopRow - GetTopRow();
...@@ -1881,7 +1881,7 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B ...@@ -1881,7 +1881,7 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B
xSet->setPropertyValue(FM_PROP_FETCHSIZE, aCacheSize); xSet->setPropertyValue(FM_PROP_FETCHSIZE, aCacheSize);
// jetzt auf alle Faelle den Cursor anpassen // jetzt auf alle Faelle den Cursor anpassen
bUpdateCursor = sal_True; bUpdateCursor = sal_True;
bCacheAligned = sal_True; bCacheAligned = true;
nLimit = nLinesOnScreen; nLimit = nLinesOnScreen;
} }
...@@ -2103,7 +2103,7 @@ sal_Bool DbGridControl::SetCurrent(long nNewRow) ...@@ -2103,7 +2103,7 @@ sal_Bool DbGridControl::SetCurrent(long nNewRow)
} }
else else
{ {
sal_Bool bNewRowInserted = sal_False; bool bNewRowInserted = false;
// Should we go to the insertrow ? // Should we go to the insertrow ?
if (IsInsertionRow(nNewRow)) if (IsInsertionRow(nNewRow))
{ {
...@@ -2116,7 +2116,7 @@ sal_Bool DbGridControl::SetCurrent(long nNewRow) ...@@ -2116,7 +2116,7 @@ sal_Bool DbGridControl::SetCurrent(long nNewRow)
Reference< XResultSetUpdate > xUpdateCursor((Reference< XInterface >)*m_pDataCursor, UNO_QUERY); Reference< XResultSetUpdate > xUpdateCursor((Reference< XInterface >)*m_pDataCursor, UNO_QUERY);
xUpdateCursor->moveToInsertRow(); xUpdateCursor->moveToInsertRow();
} }
bNewRowInserted = sal_True; bNewRowInserted = true;
} }
else else
{ {
...@@ -3261,7 +3261,7 @@ sal_Bool DbGridControl::SaveRow() ...@@ -3261,7 +3261,7 @@ sal_Bool DbGridControl::SaveRow()
BeginCursorAction(); BeginCursorAction();
sal_Bool bAppending = m_xCurrentRow->IsNew(); sal_Bool bAppending = m_xCurrentRow->IsNew();
sal_Bool bSuccess = sal_False; bool bSuccess = false;
try try
{ {
Reference< XResultSetUpdate > xUpdateCursor((Reference< XInterface >)*m_pDataCursor, UNO_QUERY); Reference< XResultSetUpdate > xUpdateCursor((Reference< XInterface >)*m_pDataCursor, UNO_QUERY);
...@@ -3269,7 +3269,7 @@ sal_Bool DbGridControl::SaveRow() ...@@ -3269,7 +3269,7 @@ sal_Bool DbGridControl::SaveRow()
xUpdateCursor->insertRow(); xUpdateCursor->insertRow();
else else
xUpdateCursor->updateRow(); xUpdateCursor->updateRow();
bSuccess = sal_True; bSuccess = true;
} }
catch(SQLException&) catch(SQLException&)
{ {
......
...@@ -1914,8 +1914,8 @@ void FmXFormShell::setActiveController( const Reference< runtime::XFormControlle ...@@ -1914,8 +1914,8 @@ void FmXFormShell::setActiveController( const Reference< runtime::XFormControlle
xOldForm = getInternalForm(xOldForm); xOldForm = getInternalForm(xOldForm);
xNewForm = getInternalForm(xNewForm); xNewForm = getInternalForm(xNewForm);
sal_Bool bDifferentForm = ( xOldForm.get() != xNewForm.get() ); bool bDifferentForm = ( xOldForm.get() != xNewForm.get() );
sal_Bool bNeedSave = bDifferentForm && !_bNoSaveOldContent; bool bNeedSave = bDifferentForm && !_bNoSaveOldContent;
// we save the content of the old form if we move to a new form, and saving old content is allowed // we save the content of the old form if we move to a new form, and saving old content is allowed
if ( m_xActiveController.is() && bNeedSave ) if ( m_xActiveController.is() && bNeedSave )
...@@ -2777,23 +2777,23 @@ class FmXFormShell::SuspendPropertyTracking ...@@ -2777,23 +2777,23 @@ class FmXFormShell::SuspendPropertyTracking
{ {
private: private:
FmXFormShell& m_rShell; FmXFormShell& m_rShell;
sal_Bool m_bEnabled; bool m_bEnabled;
public: public:
SuspendPropertyTracking( FmXFormShell& _rShell ) SuspendPropertyTracking( FmXFormShell& _rShell )
:m_rShell( _rShell ) :m_rShell( _rShell )
,m_bEnabled( sal_False ) ,m_bEnabled( false )
{ {
if ( m_rShell.IsTrackPropertiesEnabled() ) if ( m_rShell.IsTrackPropertiesEnabled() )
{ {
m_rShell.EnableTrackProperties( sal_False ); m_rShell.EnableTrackProperties( sal_False );
m_bEnabled = sal_True; m_bEnabled = true;
} }
} }
~SuspendPropertyTracking( ) ~SuspendPropertyTracking( )
{ {
if ( m_bEnabled ) // note that ( sal_False != m_bEnabled ) implies ( NULL != m_pShell ) if ( m_bEnabled ) // note that ( false != m_bEnabled ) implies ( NULL != m_pShell )
m_rShell.EnableTrackProperties( sal_True ); m_rShell.EnableTrackProperties( sal_True );
} }
}; };
...@@ -3187,7 +3187,7 @@ void FmXFormShell::CreateExternalView() ...@@ -3187,7 +3187,7 @@ void FmXFormShell::CreateExternalView()
{ {
FmXBoundFormFieldIterator aModelIterator(xCurrentNavController->getModel()); FmXBoundFormFieldIterator aModelIterator(xCurrentNavController->getModel());
Reference< XPropertySet> xCurrentModelSet; Reference< XPropertySet> xCurrentModelSet;
sal_Bool bHaveUsableControls = sal_False; bool bHaveUsableControls = false;
while ((xCurrentModelSet = Reference< XPropertySet>(aModelIterator.Next(), UNO_QUERY)).is()) while ((xCurrentModelSet = Reference< XPropertySet>(aModelIterator.Next(), UNO_QUERY)).is())
{ {
// the FmXBoundFormFieldIterator only supplies controls with a valid control source // the FmXBoundFormFieldIterator only supplies controls with a valid control source
...@@ -3199,7 +3199,7 @@ void FmXFormShell::CreateExternalView() ...@@ -3199,7 +3199,7 @@ void FmXFormShell::CreateExternalView()
case FormComponentType::CONTROL: case FormComponentType::CONTROL:
continue; continue;
} }
bHaveUsableControls = sal_True; bHaveUsableControls = true;
break; break;
} }
...@@ -3840,38 +3840,38 @@ IMPL_LINK( FmXFormShell, OnLoadForms, FmFormPage*, /*_pPage*/ ) ...@@ -3840,38 +3840,38 @@ IMPL_LINK( FmXFormShell, OnLoadForms, FmFormPage*, /*_pPage*/ )
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace namespace
{ {
sal_Bool lcl_isLoadable( const Reference< XInterface >& _rxLoadable ) bool lcl_isLoadable( const Reference< XInterface >& _rxLoadable )
{ {
// determines whether a form should be loaded or not // determines whether a form should be loaded or not
// if there is no datasource or connection there is no reason to load a form // if there is no datasource or connection there is no reason to load a form
Reference< XPropertySet > xSet( _rxLoadable, UNO_QUERY ); Reference< XPropertySet > xSet( _rxLoadable, UNO_QUERY );
if ( !xSet.is() ) if ( !xSet.is() )
return sal_False; return false;
try try
{ {
Reference< XConnection > xConn; Reference< XConnection > xConn;
if ( OStaticDataAccessTools().isEmbeddedInDatabase( _rxLoadable.get(), xConn ) ) if ( OStaticDataAccessTools().isEmbeddedInDatabase( _rxLoadable.get(), xConn ) )
return sal_True; return true;
// is there already a active connection // is there already a active connection
xSet->getPropertyValue(FM_PROP_ACTIVE_CONNECTION) >>= xConn; xSet->getPropertyValue(FM_PROP_ACTIVE_CONNECTION) >>= xConn;
if ( xConn.is() ) if ( xConn.is() )
return sal_True; return true;
OUString sPropertyValue; OUString sPropertyValue;
OSL_VERIFY( xSet->getPropertyValue( FM_PROP_DATASOURCE ) >>= sPropertyValue ); OSL_VERIFY( xSet->getPropertyValue( FM_PROP_DATASOURCE ) >>= sPropertyValue );
if ( !sPropertyValue.isEmpty() ) if ( !sPropertyValue.isEmpty() )
return sal_True; return true;
OSL_VERIFY( xSet->getPropertyValue( FM_PROP_URL ) >>= sPropertyValue ); OSL_VERIFY( xSet->getPropertyValue( FM_PROP_URL ) >>= sPropertyValue );
if ( !sPropertyValue.isEmpty() ) if ( !sPropertyValue.isEmpty() )
return sal_True; return true;
} }
catch(const Exception&) catch(const Exception&)
{ {
DBG_UNHANDLED_EXCEPTION(); DBG_UNHANDLED_EXCEPTION();
} }
return sal_False; return false;
} }
} }
...@@ -3908,11 +3908,11 @@ void FmXFormShell::loadForms( FmFormPage* _pPage, const sal_uInt16 _nBehaviour / ...@@ -3908,11 +3908,11 @@ void FmXFormShell::loadForms( FmFormPage* _pPage, const sal_uInt16 _nBehaviour /
if ( xForms.is() ) if ( xForms.is() )
{ {
Reference< XLoadable > xForm; Reference< XLoadable > xForm;
sal_Bool bFormWasLoaded = sal_False; bool bFormWasLoaded = false;
for ( sal_Int32 j = 0, nCount = xForms->getCount(); j < nCount; ++j ) for ( sal_Int32 j = 0, nCount = xForms->getCount(); j < nCount; ++j )
{ {
xForms->getByIndex( j ) >>= xForm; xForms->getByIndex( j ) >>= xForm;
bFormWasLoaded = sal_False; bFormWasLoaded = false;
// a database form must be loaded for // a database form must be loaded for
try try
{ {
...@@ -3925,7 +3925,7 @@ void FmXFormShell::loadForms( FmFormPage* _pPage, const sal_uInt16 _nBehaviour / ...@@ -3925,7 +3925,7 @@ void FmXFormShell::loadForms( FmFormPage* _pPage, const sal_uInt16 _nBehaviour /
{ {
if ( xForm->isLoaded() ) if ( xForm->isLoaded() )
{ {
bFormWasLoaded = sal_True; bFormWasLoaded = true;
xForm->unload(); xForm->unload();
} }
} }
......
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