[Libreoffice-commits] core.git: include/svl sc/source svl/source
Noel Grandin
noel at peralex.com
Wed Jul 23 23:13:39 PDT 2014
include/svl/itempool.hxx | 1 +
include/svl/poolitem.hxx | 4 ----
sc/source/ui/unoobj/defltuno.cxx | 2 +-
svl/source/inc/poolio.hxx | 4 ++++
svl/source/items/itempool.cxx | 5 +++++
svl/source/items/itemset.cxx | 1 +
6 files changed, 12 insertions(+), 5 deletions(-)
New commits:
commit 2a19718575e4b9c5757da55ab64dd17ef7d3c9c4
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jul 23 15:09:14 2014 +0200
move SFX_ITEMS_DIRECT etc. definitions inside the module
These are internal constants, they don't need to be visible to the rest
of LO
Change-Id: I313def85b8c404948ec9ecb3996fed03b32ff9bf
diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx
index 09c1305..5b6a14d 100644
--- a/include/svl/itempool.hxx
+++ b/include/svl/itempool.hxx
@@ -163,6 +163,7 @@ public:
sal_uInt32 GetSurrogate(const SfxPoolItem *) const;
const SfxPoolItem * GetItem2(sal_uInt16 nWhich, sal_uInt32 nSurrogate) const;
+ const SfxPoolItem * GetItem2Default(sal_uInt16 nWhich) const;
sal_uInt32 GetItemCount2(sal_uInt16 nWhich) const;
const SfxPoolItem* LoadSurrogate(SvStream& rStream,
sal_uInt16 &rWhich, sal_uInt16 nSlotId,
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index 718a78b..f19003e 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -37,10 +37,6 @@ class IntlWrapper;
namespace com { namespace sun { namespace star { namespace uno { class Any; } } } }
-static const sal_uInt32 SFX_ITEMS_DIRECT = 0xffffffff;
-static const sal_uInt32 SFX_ITEMS_NULL = 0xfffffff0; // instead StoreSurrogate
-static const sal_uInt32 SFX_ITEMS_DEFAULT = 0xfffffffe;
-
enum SfxItemKind {
SFX_ITEMS_NONE,
SFX_ITEMS_DELETEONIDLE,
diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx
index 155f24f..a091677 100644
--- a/sc/source/ui/unoobj/defltuno.cxx
+++ b/sc/source/ui/unoobj/defltuno.cxx
@@ -339,7 +339,7 @@ uno::Any SAL_CALL ScDocDefaultsObj::getPropertyDefault( const OUString& aPropert
if (pEntry->nWID)
{
ScDocumentPool* pPool = pDocShell->GetDocument().GetPool();
- const SfxPoolItem* pItem = pPool->GetItem2( pEntry->nWID, SFX_ITEMS_DEFAULT );
+ const SfxPoolItem* pItem = pPool->GetItem2Default( pEntry->nWID );
if (pItem)
pItem->QueryValue( aRet, pEntry->nMemberId );
}
diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx
index 2dcd2ca..80eaa18 100644
--- a/svl/source/inc/poolio.hxx
+++ b/svl/source/inc/poolio.hxx
@@ -33,6 +33,10 @@ class SfxItemPoolUser;
#define DELETEZ(pPtr) { delete pPtr; pPtr = 0; }
#endif
+static const sal_uInt32 SFX_ITEMS_DIRECT = 0xffffffff;
+static const sal_uInt32 SFX_ITEMS_NULL = 0xfffffff0; // instead StoreSurrogate
+static const sal_uInt32 SFX_ITEMS_DEFAULT = 0xfffffffe;
+
struct SfxPoolVersion_Impl
{
sal_uInt16 _nVer;
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 5508499..0638eec 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -979,6 +979,11 @@ const sal_uInt16* SfxItemPool::GetFrozenIdRanges() const
return pImp->mpPoolRanges;
}
+const SfxPoolItem *SfxItemPool::GetItem2Default(sal_uInt16 nWhich) const
+{
+ return GetItem2(nWhich, SFX_ITEMS_DEFAULT);
+}
+
const SfxPoolItem *SfxItemPool::GetItem2(sal_uInt16 nWhich, sal_uInt32 nOfst) const
{
if ( !IsInRange(nWhich) )
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 3050442..f773fb5 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -41,6 +41,7 @@ static sal_uLong nRangesCopyCount = 0; // How often have ranges been copied?
#endif
#include "nranges.cxx"
+#include "poolio.hxx"
#ifdef DBG_UTIL
More information about the Libreoffice-commits
mailing list