bool improvements
Change-Id: I142196c59ff0dc5c26e0cc9a79293ddfb0ee94cf
This commit is contained in:
@@ -79,8 +79,8 @@ class SVX_DLLPUBLIC FmFormShell : public SfxShell
|
||||
SfxViewShell* m_pParentShell;
|
||||
|
||||
sal_uInt16 m_nLastSlot;
|
||||
sal_Bool m_bDesignMode : 1;
|
||||
sal_Bool m_bHasForms : 1; // flag storing if the forms on a page exist,
|
||||
bool m_bDesignMode : 1;
|
||||
bool m_bHasForms : 1; // flag storing if the forms on a page exist,
|
||||
// only for the DesignMode, see UIFeatureChanged!
|
||||
|
||||
// the marks of a FormView have changed...
|
||||
|
@@ -55,18 +55,18 @@ class SdrObject;
|
||||
|
||||
class SVX_DLLPUBLIC SdrGluePoint {
|
||||
// Bezugspunkt ist SdrObject::GetSnapRect().Center()
|
||||
// bNoPercent=FALSE: Position ist -5000..5000 (1/100)% bzw. 0..10000 (je nach Align)
|
||||
// bNoPercent=sal_True : Position ist in log Einh, rel zum Bezugspunkt
|
||||
// bNoPercent=false: Position ist -5000..5000 (1/100)% bzw. 0..10000 (je nach Align)
|
||||
// bNoPercent=true : Position ist in log Einh, rel zum Bezugspunkt
|
||||
Point aPos;
|
||||
sal_uInt16 nEscDir;
|
||||
sal_uInt16 nId;
|
||||
sal_uInt16 nAlign;
|
||||
sal_uInt8 bNoPercent:1;
|
||||
sal_uInt8 bReallyAbsolute:1; // Temporaer zu setzen fuer Transformationen am Bezugsobjekt
|
||||
sal_uInt8 bUserDefined:1; // #i38892#
|
||||
bool bNoPercent:1;
|
||||
bool bReallyAbsolute:1; // Temporaer zu setzen fuer Transformationen am Bezugsobjekt
|
||||
bool bUserDefined:1; // #i38892#
|
||||
public:
|
||||
SdrGluePoint(): nEscDir(SDRESC_SMART),nId(0),nAlign(0) { bNoPercent=sal_False; bReallyAbsolute=sal_False; bUserDefined=sal_True; }
|
||||
SdrGluePoint(const Point& rNewPos, bool bNewPercent= sal_True, sal_uInt16 nNewAlign=0): aPos(rNewPos),nEscDir(SDRESC_SMART),nId(0),nAlign(nNewAlign) { bNoPercent=!bNewPercent; bReallyAbsolute = sal_False; bUserDefined = sal_True; }
|
||||
SdrGluePoint(): nEscDir(SDRESC_SMART),nId(0),nAlign(0),bNoPercent(false),bReallyAbsolute(false),bUserDefined(true) {}
|
||||
SdrGluePoint(const Point& rNewPos, bool bNewPercent=true, sal_uInt16 nNewAlign=0): aPos(rNewPos),nEscDir(SDRESC_SMART),nId(0),nAlign(nNewAlign),bNoPercent(!bNewPercent),bReallyAbsolute(false),bUserDefined(true) {}
|
||||
bool operator==(const SdrGluePoint& rCmpGP) const { return aPos==rCmpGP.aPos && nEscDir==rCmpGP.nEscDir && nId==rCmpGP.nId && nAlign==rCmpGP.nAlign && bNoPercent==rCmpGP.bNoPercent && bReallyAbsolute==rCmpGP.bReallyAbsolute && bUserDefined==rCmpGP.bUserDefined; }
|
||||
bool operator!=(const SdrGluePoint& rCmpGP) const { return !operator==(rCmpGP); }
|
||||
const Point& GetPos() const { return aPos; }
|
||||
@@ -75,15 +75,15 @@ public:
|
||||
void SetEscDir(sal_uInt16 nNewEsc) { nEscDir=nNewEsc; }
|
||||
sal_uInt16 GetId() const { return nId; }
|
||||
void SetId(sal_uInt16 nNewId) { nId=nNewId; }
|
||||
bool IsPercent() const { return bNoPercent ? false : true; }
|
||||
bool IsPercent() const { return !bNoPercent; }
|
||||
void SetPercent(bool bOn) { bNoPercent = !bOn; }
|
||||
// Temporaer zu setzen fuer Transformationen am Bezugsobjekt
|
||||
bool IsReallyAbsolute() const { return bReallyAbsolute ? true : false; }
|
||||
bool IsReallyAbsolute() const { return bReallyAbsolute; }
|
||||
void SetReallyAbsolute(bool bOn, const SdrObject& rObj);
|
||||
|
||||
// #i38892#
|
||||
bool IsUserDefined() const { return bUserDefined ? true : false; }
|
||||
void SetUserDefined(bool bNew) { bUserDefined = bNew ? true : false; }
|
||||
bool IsUserDefined() const { return bUserDefined; }
|
||||
void SetUserDefined(bool bNew) { bUserDefined = bNew; }
|
||||
|
||||
sal_uInt16 GetAlign() const { return nAlign; }
|
||||
void SetAlign(sal_uInt16 nAlg) { nAlign=nAlg; }
|
||||
|
@@ -214,7 +214,7 @@ void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt )
|
||||
|
||||
if ( pEntry )
|
||||
{
|
||||
sal_Bool bCheck = ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED );
|
||||
bool bCheck = ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED );
|
||||
SvLBoxItem* pItem = GetItem( pEntry, aPnt.X() );
|
||||
|
||||
if (pItem && pItem->GetType() == SV_ITEM_ID_LBOXBUTTON)
|
||||
@@ -255,7 +255,7 @@ void SvxCheckListBox::KeyInput( const KeyEvent& rKEvt )
|
||||
|
||||
if ( pEntry )
|
||||
{
|
||||
sal_Bool bCheck = ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED );
|
||||
bool bCheck = ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED );
|
||||
ToggleCheckButton( pEntry );
|
||||
if ( bCheck != ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ) )
|
||||
CheckButtonHdl();
|
||||
|
@@ -672,7 +672,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
|
||||
case SID_FM_DESIGN_MODE:
|
||||
{
|
||||
SFX_REQUEST_ARG(rReq, pDesignItem, SfxBoolItem, nSlot, sal_False);
|
||||
sal_Bool bDesignMode = pDesignItem ? pDesignItem->GetValue() : !m_bDesignMode;
|
||||
bool bDesignMode = pDesignItem ? pDesignItem->GetValue() : !m_bDesignMode;
|
||||
SetDesignMode( bDesignMode );
|
||||
if ( m_bDesignMode == bDesignMode )
|
||||
rReq.Done();
|
||||
@@ -1229,7 +1229,7 @@ void FmFormShell::SetView( FmFormView* _pView )
|
||||
void FmFormShell::DetermineForms(sal_Bool bInvalidate)
|
||||
{
|
||||
// Existieren Formulare auf der aktuellen Page
|
||||
sal_Bool bForms = GetImpl()->hasForms();
|
||||
bool bForms = GetImpl()->hasForms();
|
||||
if (bForms != m_bHasForms)
|
||||
{
|
||||
m_bHasForms = bForms;
|
||||
|
@@ -179,7 +179,7 @@ FmXUndoEnvironment::FmXUndoEnvironment(FmFormModel& _rModel)
|
||||
,m_pPropertySetCache( NULL )
|
||||
,m_pScriptingEnv( ::svxform::createDefaultFormScriptingEnvironment( _rModel ) )
|
||||
,m_Locks( 0 )
|
||||
,bReadOnly( sal_False )
|
||||
,bReadOnly( false )
|
||||
,m_bDisposed( false )
|
||||
{
|
||||
DBG_CTOR(FmXUndoEnvironment,NULL);
|
||||
|
@@ -143,7 +143,7 @@ class SVX_DLLPRIVATE FmXUndoEnvironment
|
||||
::svxform::PFormScriptingEnvironment m_pScriptingEnv;
|
||||
oslInterlockedCount m_Locks;
|
||||
::osl::Mutex m_aMutex;
|
||||
sal_Bool bReadOnly;
|
||||
bool bReadOnly;
|
||||
bool m_bDisposed;
|
||||
|
||||
public:
|
||||
|
@@ -1820,7 +1820,7 @@ void SdrModel::setLock( bool bLock )
|
||||
// #i120437# need to set first, else ImpReformatAllEdgeObjects will do nothing
|
||||
mbModelLocked = bLock;
|
||||
|
||||
if( sal_False == bLock )
|
||||
if( !bLock )
|
||||
{
|
||||
ImpReformatAllEdgeObjects();
|
||||
}
|
||||
|
@@ -2234,7 +2234,7 @@ bool SdrObjCustomShape::IsAutoGrowHeight() const
|
||||
const SfxItemSet& rSet = GetMergedItemSet();
|
||||
bool bIsAutoGrowHeight = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue();
|
||||
if ( bIsAutoGrowHeight && IsVerticalWriting() )
|
||||
bIsAutoGrowHeight = ((SdrTextWordWrapItem&)(rSet.Get(SDRATTR_TEXT_WORDWRAP))).GetValue() == sal_False;
|
||||
bIsAutoGrowHeight = !((SdrTextWordWrapItem&)(rSet.Get(SDRATTR_TEXT_WORDWRAP))).GetValue();
|
||||
return bIsAutoGrowHeight;
|
||||
}
|
||||
bool SdrObjCustomShape::IsAutoGrowWidth() const
|
||||
@@ -2242,7 +2242,7 @@ bool SdrObjCustomShape::IsAutoGrowWidth() const
|
||||
const SfxItemSet& rSet = GetMergedItemSet();
|
||||
bool bIsAutoGrowWidth = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue();
|
||||
if ( bIsAutoGrowWidth && !IsVerticalWriting() )
|
||||
bIsAutoGrowWidth = ((SdrTextWordWrapItem&)(rSet.Get(SDRATTR_TEXT_WORDWRAP))).GetValue() == sal_False;
|
||||
bIsAutoGrowWidth = !((SdrTextWordWrapItem&)(rSet.Get(SDRATTR_TEXT_WORDWRAP))).GetValue();
|
||||
return bIsAutoGrowWidth;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user