[ooo-build-commit] .: 2 commits - sc/inc sc/source
Michael Meeks
mmeeks at kemper.freedesktop.org
Mon Oct 4 09:05:37 PDT 2010
sc/inc/attrib.hxx | 12 ++++++------
sc/source/core/data/attrib.cxx | 34 +++++++++++++++++-----------------
sc/source/filter/xml/xmlstyle.cxx | 2 +-
sc/source/ui/app/uiitems.cxx | 8 ++++----
sc/source/ui/inc/uiitems.hxx | 4 ++--
5 files changed, 30 insertions(+), 30 deletions(-)
New commits:
commit 481cbafe6b477e8a9c90ab53f8fa2cb20df21804
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Mon Oct 4 15:36:50 2010 +0100
native bool support in SvXMLUnitConverter
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index 90fa69a..af1fdac 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -1121,7 +1121,7 @@ sal_Bool XmlScPropHdl_PrintContent::importXML(
}
if ((rValue >>= aCellProtection) || bDefault)
{
- sal_Bool bValue;
+ bool bValue;
if (SvXMLUnitConverter::convertBool(bValue, rStrImpValue))
{
aCellProtection.IsPrintHidden = !bValue;
commit 56e4318580b235b8a0fa8e43dadf3b142f2a0327
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Mon Oct 4 15:23:39 2010 +0100
Convert all Query/Put Value() to bool
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index 3e7f757..aaac8dd 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -137,8 +137,8 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
BOOL GetProtection() const { return bProtection; }
BOOL SetProtection( BOOL bProtect);
@@ -278,8 +278,8 @@ public:
virtual SfxPoolItem* Create( SvStream& rStream, USHORT nVer ) const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
const EditTextObject* GetLeftArea() const { return pLeftArea; }
const EditTextObject* GetCenterArea() const { return pCenterArea; }
@@ -384,8 +384,8 @@ public:
XubString& rText,
const IntlWrapper* = 0 ) const;
- virtual BOOL QueryValue( ::com::sun::star::uno::Any& rAny, BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const ::com::sun::star::uno::Any& rAny, BYTE nMemberId = 0 );
+ virtual bool QueryValue( ::com::sun::star::uno::Any& rAny, BYTE nMemberId = 0 ) const;
+ virtual bool PutValue( const ::com::sun::star::uno::Any& rAny, BYTE nMemberId = 0 );
private:
sal_uInt16 mnWidth;
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index c9f0275..1f4b7f9 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -241,7 +241,7 @@ ScProtectionAttr::~ScProtectionAttr()
//------------------------------------------------------------------------
-BOOL ScProtectionAttr::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+bool ScProtectionAttr::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -266,15 +266,15 @@ BOOL ScProtectionAttr::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
rVal <<= (sal_Bool ) bHidePrint; break;
default:
DBG_ERROR("Wrong MemberID!");
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
-BOOL ScProtectionAttr::PutValue( const uno::Any& rVal, BYTE nMemberId )
+bool ScProtectionAttr::PutValue( const uno::Any& rVal, BYTE nMemberId )
{
- BOOL bRet = FALSE;
+ bool bRet = false;
sal_Bool bVal = sal_Bool();
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -288,7 +288,7 @@ BOOL ScProtectionAttr::PutValue( const uno::Any& rVal, BYTE nMemberId )
bHideFormula = aProtection.IsFormulaHidden;
bHideCell = aProtection.IsHidden;
bHidePrint = aProtection.IsPrintHidden;
- bRet = TRUE;
+ bRet = true;
}
else
{
@@ -662,18 +662,18 @@ ScPageHFItem::~ScPageHFItem()
//------------------------------------------------------------------------
-BOOL ScPageHFItem::QueryValue( uno::Any& rVal, BYTE /* nMemberId */ ) const
+bool ScPageHFItem::QueryValue( uno::Any& rVal, BYTE /* nMemberId */ ) const
{
uno::Reference<sheet::XHeaderFooterContent> xContent =
new ScHeaderFooterContentObj( pLeftArea, pCenterArea, pRightArea );
rVal <<= xContent;
- return TRUE;
+ return true;
}
-BOOL ScPageHFItem::PutValue( const uno::Any& rVal, BYTE /* nMemberId */ )
+bool ScPageHFItem::PutValue( const uno::Any& rVal, BYTE /* nMemberId */ )
{
- BOOL bRet = FALSE;
+ bool bRet = false;
uno::Reference<sheet::XHeaderFooterContent> xContent;
if ( rVal >>= xContent )
{
@@ -707,7 +707,7 @@ BOOL ScPageHFItem::PutValue( const uno::Any& rVal, BYTE /* nMemberId */ )
pRightArea = aEngine.CreateTextObject();
}
- bRet = TRUE;
+ bRet = true;
}
}
}
@@ -717,7 +717,7 @@ BOOL ScPageHFItem::PutValue( const uno::Any& rVal, BYTE /* nMemberId */ )
DBG_ERROR("exception - wrong argument");
}
- return bRet;
+ return true;
}
//------------------------------------------------------------------------
@@ -1201,23 +1201,23 @@ SfxItemPresentation ScPageScaleToItem::GetPresentation(
return ePres;
}
-BOOL ScPageScaleToItem::QueryValue( uno::Any& rAny, BYTE nMemberId ) const
+bool ScPageScaleToItem::QueryValue( uno::Any& rAny, BYTE nMemberId ) const
{
- BOOL bRet = TRUE;
+ bool bRet = true;
switch( nMemberId )
{
case SC_MID_PAGE_SCALETO_WIDTH: rAny <<= mnWidth; break;
case SC_MID_PAGE_SCALETO_HEIGHT: rAny <<= mnHeight; break;
default:
DBG_ERRORFILE( "ScPageScaleToItem::QueryValue - unknown member ID" );
- bRet = FALSE;
+ bRet = false;
}
return bRet;
}
-BOOL ScPageScaleToItem::PutValue( const uno::Any& rAny, BYTE nMemberId )
+bool ScPageScaleToItem::PutValue( const uno::Any& rAny, BYTE nMemberId )
{
- BOOL bRet = FALSE;
+ BOOL bRet = false;
switch( nMemberId )
{
case SC_MID_PAGE_SCALETO_WIDTH: bRet = rAny >>= mnWidth; break;
diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx
index 95c660b..49fa30f 100644
--- a/sc/source/ui/app/uiitems.cxx
+++ b/sc/source/ui/app/uiitems.cxx
@@ -221,11 +221,11 @@ SfxPoolItem* __EXPORT ScSortItem::Clone( SfxItemPool * ) const
//------------------------------------------------------------------------
-sal_Bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMemberUd */ ) const
+bool ScSortItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMemberUd */ ) const
{
// Return empty value as there is no useful conversion
rVal = com::sun::star::uno::Any();
- return sal_True;
+ return true;
}
// -----------------------------------------------------------------------
@@ -379,11 +379,11 @@ SfxPoolItem* __EXPORT ScSubTotalItem::Clone( SfxItemPool * ) const
//------------------------------------------------------------------------
-sal_Bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMemberUd */ ) const
+bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMemberUd */ ) const
{
// Return empty value as there is no useful conversion
rVal = com::sun::star::uno::Any();
- return sal_True;
+ return true;
}
// -----------------------------------------------------------------------
diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx
index 842603a..e9d4aa0 100644
--- a/sc/source/ui/inc/uiitems.hxx
+++ b/sc/source/ui/inc/uiitems.hxx
@@ -158,7 +158,7 @@ public:
virtual String GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberUd ) const;
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberUd ) const;
ScViewData* GetViewData () const { return pViewData; }
const ScSortParam& GetSortData () const { return theSortData; }
@@ -218,7 +218,7 @@ public:
virtual String GetValueText() const;
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberUd ) const;
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberUd ) const;
ScViewData* GetViewData () const { return pViewData; }
const ScSubTotalParam& GetSubTotalData() const { return theSubTotalData; }
More information about the ooo-build-commit
mailing list