[Libreoffice-commits] core.git: 13 commits - chart2/source cui/source editeng/source include/editeng include/svl include/svx sc/inc sc/source sfx2/source starmath/source svl/source svtools/source svx/source sw/source

Noel Grandin noel at peralex.com
Wed Jul 23 04:26:59 PDT 2014


 chart2/source/controller/dialogs/tp_AxisLabel.cxx       |    6 
 cui/source/tabpages/chardlg.cxx                         |    2 
 cui/source/tabpages/paragrph.cxx                        |    2 
 cui/source/tabpages/tpcolor.cxx                         |    2 
 editeng/source/uno/unoedprx.cxx                         |    4 
 editeng/source/uno/unofored.cxx                         |    6 
 editeng/source/uno/unofored_internal.hxx                |    2 
 editeng/source/uno/unoforou.cxx                         |    4 
 editeng/source/uno/unotext.cxx                          |   19 +-
 include/editeng/unoedprx.hxx                            |    6 
 include/editeng/unoedsrc.hxx                            |    4 
 include/editeng/unofored.hxx                            |    4 
 include/editeng/unoforou.hxx                            |    4 
 include/editeng/unotext.hxx                             |    4 
 include/svl/itempool.hxx                                |   22 +-
 include/svl/poolitem.hxx                                |  126 ++++----------
 include/svx/svdpool.hxx                                 |    1 
 sc/inc/docpool.hxx                                      |    1 
 sc/source/core/data/attrib.cxx                          |    4 
 sc/source/core/data/docpool.cxx                         |  137 +---------------
 sfx2/source/control/querystatus.cxx                     |    2 
 sfx2/source/control/sfxstatuslistener.cxx               |    2 
 sfx2/source/control/shell.cxx                           |    2 
 sfx2/source/control/statcach.cxx                        |    2 
 sfx2/source/statbar/stbitem.cxx                         |    2 
 sfx2/source/toolbox/tbxitem.cxx                         |    6 
 starmath/source/accessibility.cxx                       |   10 -
 starmath/source/accessibility.hxx                       |    4 
 svl/source/inc/poolio.hxx                               |   43 ++++-
 svl/source/inc/stringio.hxx                             |   66 +++++++
 svl/source/items/cntwall.cxx                            |    1 
 svl/source/items/ctypeitm.cxx                           |    1 
 svl/source/items/itempool.cxx                           |    3 
 svl/source/items/itemset.cxx                            |    5 
 svl/source/items/macitem.cxx                            |    9 -
 svl/source/items/poolio.cxx                             |   63 ++++++-
 svl/source/items/poolitem.cxx                           |   33 ---
 svl/source/items/slstitm.cxx                            |    1 
 svl/source/items/stritem.cxx                            |    1 
 svl/source/items/style.cxx                              |    3 
 svtools/source/misc/itemdel.cxx                         |   18 +-
 svx/source/accessibility/AccessibleEmptyEditSource.cxx  |    4 
 svx/source/dialog/srchdlg.cxx                           |    1 
 svx/source/svdraw/svdattr.cxx                           |    6 
 svx/source/svdraw/svdibrow.cxx                          |    1 
 svx/source/tbxctrls/formatpaintbrushctrl.cxx            |    2 
 svx/source/tbxctrls/tbcontrl.cxx                        |    3 
 sw/source/core/crsr/crstrvl.cxx                         |    1 
 sw/source/core/doc/DocumentContentOperationsManager.cxx |    8 
 sw/source/ui/dbui/mmoutputpage.hxx                      |    1 
 sw/source/ui/misc/num.cxx                               |    2 
 sw/source/uibase/app/docstyle.cxx                       |   25 +-
 sw/source/uibase/shells/textsh1.cxx                     |    2 
 53 files changed, 340 insertions(+), 353 deletions(-)

New commits:
commit 8c6e900e4724dc7c800047099139c080f5f5d564
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Jul 23 13:25:42 2014 +0200

    remove unused private field
    
    Change-Id: I474458058c1a3d8c93486bf2e647df203d2452cc

diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx
index 8585c02..df8030e 100644
--- a/sw/source/ui/dbui/mmoutputpage.hxx
+++ b/sw/source/ui/dbui/mmoutputpage.hxx
@@ -149,7 +149,6 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog
 
     SvSimpleTableContainer  *m_pContainer;
     HeaderBar               *m_pStatusHB;
-    SvTabListBox            *m_pStatusLB;
     SvSimpleTable           *m_pStatus;
 
     PushButton              *m_pStop;
commit 88a874fcb3a3735634c638f34dcb0cc7bd2260ac
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Jul 23 10:48:58 2014 +0200

    convert SfxItemState constants to a proper enum
    
    and while we're at it
    - use the enum type all over the place instead of passing around
    sal_uInt16
    - don't use bitwise logic on enum values
    - use enum values instead of numeric constants
    
    Change-Id: I7f24cb4d242e1c00703e7bbcf1a00c18ef1e9fd4

diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
index 14892aa..6bf9cab 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
@@ -153,7 +153,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
             bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
         m_pCbShowDescription->Check( bCheck );
 
-        if( ( aState & SFX_ITEM_DEFAULT ) == 0 )
+        if( aState != SFX_ITEM_DEFAULT )
             m_pCbShowDescription->Hide();
     }
 
@@ -201,7 +201,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
             bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
         m_pCbTextOverlap->Check( bCheck );
 
-        if( ( aState & SFX_ITEM_DEFAULT ) == 0 )
+        if( aState != SFX_ITEM_DEFAULT )
             m_pCbTextOverlap->Hide();
     }
 
@@ -220,7 +220,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
             bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
         m_pCbTextBreak->Check( bCheck );
 
-        if( ( aState & SFX_ITEM_DEFAULT ) == 0 )
+        if( aState != SFX_ITEM_DEFAULT )
         {
             m_pCbTextBreak->Hide();
             if( ! m_pCbTextOverlap->IsVisible() )
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 554d977..98a0e17 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -812,6 +812,8 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp
                 pLangBox->SelectLanguage( eLangType );
             break;
         }
+        case SFX_ITEM_DONTCARE:
+            break;
     }
 
     OUString sMapText(pFontList->GetFontMapText(
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 3b059ed..bbeb896 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -2187,7 +2187,7 @@ static void lcl_SetBox(const SfxItemSet& rSet, sal_uInt16 nSlotId, CheckBox& rBo
 {
     sal_uInt16 _nWhich = rSet.GetPool()->GetWhich(nSlotId);
     SfxItemState eState = rSet.GetItemState(_nWhich, true);
-    if(!eState || eState == SFX_ITEM_DISABLED )
+    if( eState == SFX_ITEM_UNKNOWN || eState == SFX_ITEM_DISABLED )
         rBox.Enable(false);
     else if(eState >= SFX_ITEM_AVAILABLE)
     {
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 2e016df..9a1218a 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -594,7 +594,7 @@ void SvxColorTabPage::UpdateModified()
 
 void SvxColorTabPage::Reset( const SfxItemSet* rSet )
 {
-    sal_uInt16 nState = rSet->GetItemState( XATTR_FILLCOLOR );
+    SfxItemState nState = rSet->GetItemState( XATTR_FILLCOLOR );
 
     Color aNewColor;
 
diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx
index 874c6b1..81f64dd 100644
--- a/editeng/source/uno/unoedprx.cxx
+++ b/editeng/source/uno/unoedprx.cxx
@@ -553,7 +553,7 @@ void SvxAccessibleTextAdapter::GetPortions( sal_Int32 nPara, std::vector<sal_Int
     mpTextForwarder->GetPortions( nPara, rList );
 }
 
-sal_uInt16 SvxAccessibleTextAdapter::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
+SfxItemState SvxAccessibleTextAdapter::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
 {
     assert(mpTextForwarder && "SvxAccessibleTextAdapter: no forwarder");
 
@@ -567,7 +567,7 @@ sal_uInt16 SvxAccessibleTextAdapter::GetItemState( const ESelection& rSel, sal_u
                                           nWhich );
 }
 
-sal_uInt16 SvxAccessibleTextAdapter::GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const
+SfxItemState SvxAccessibleTextAdapter::GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const
 {
     assert(mpTextForwarder && "SvxAccessibleTextAdapter: no forwarder");
 
diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx
index b454b6d..1f5ad40 100644
--- a/editeng/source/uno/unofored.cxx
+++ b/editeng/source/uno/unofored.cxx
@@ -165,7 +165,7 @@ void SvxEditEngineForwarder::FieldClicked( const SvxFieldItem& rField, sal_Int32
     rEditEngine.FieldClicked( rField, nPara, nPos );
 }
 
-sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich )
+SfxItemState GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich )
 {
     std::vector<EECharAttrib> aAttribs;
 
@@ -258,12 +258,12 @@ sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection&
     return eState;
 }
 
-sal_uInt16 SvxEditEngineForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
+SfxItemState SvxEditEngineForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
 {
     return GetSvxEditEngineItemState( rEditEngine, rSel, nWhich );
 }
 
-sal_uInt16 SvxEditEngineForwarder::GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const
+SfxItemState SvxEditEngineForwarder::GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const
 {
     const SfxItemSet& rSet = rEditEngine.GetParaAttribs( nPara );
     return rSet.GetItemState( nWhich );
diff --git a/editeng/source/uno/unofored_internal.hxx b/editeng/source/uno/unofored_internal.hxx
index 66758b0..4702e76 100644
--- a/editeng/source/uno/unofored_internal.hxx
+++ b/editeng/source/uno/unofored_internal.hxx
@@ -21,7 +21,7 @@
 #define INCLUDED_EDITENG_SOURCE_UNO_UNFORED_INTERNAL_HXX
 
 
-sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich );
+SfxItemState GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich );
 
 
 #endif // INCLUDED_EDITENG_SOURCE_UNO_UNFORED_INTERNAL_HXX
diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx
index b39b453..f0d3fbb 100644
--- a/editeng/source/uno/unoforou.cxx
+++ b/editeng/source/uno/unoforou.cxx
@@ -244,12 +244,12 @@ bool SvxOutlinerForwarder::IsValid() const
     return rOutliner.GetUpdateMode();
 }
 
-sal_uInt16 SvxOutlinerForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
+SfxItemState SvxOutlinerForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
 {
     return GetSvxEditEngineItemState( (EditEngine&)rOutliner.GetEditEngine(), rSel, nWhich );
 }
 
-sal_uInt16 SvxOutlinerForwarder::GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const
+SfxItemState SvxOutlinerForwarder::GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const
 {
     const SfxItemSet& rSet = rOutliner.GetParaAttribs( nPara );
     return rSet.GetItemState( nWhich );
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 16727ff..135448b 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -699,7 +699,8 @@ bool SvxUnoTextRangeBase::GetPropertyValueHelper(  SfxItemSet& rSet, const SfxIt
 
     case EE_PARA_NUMBULLET:
         {
-            if((rSet.GetItemState( EE_PARA_NUMBULLET, true ) & (SFX_ITEM_SET|SFX_ITEM_DEFAULT)) == 0)
+            SfxItemState eState = rSet.GetItemState( EE_PARA_NUMBULLET, true );
+            if( eState != SFX_ITEM_SET && eState != SFX_ITEM_DEFAULT)
                 throw uno::RuntimeException();
 
             SvxNumBulletItem* pBulletItem = (SvxNumBulletItem*)rSet.GetItem( EE_PARA_NUMBULLET, true );
@@ -740,7 +741,8 @@ bool SvxUnoTextRangeBase::GetPropertyValueHelper(  SfxItemSet& rSet, const SfxIt
     case EE_PARA_BULLETSTATE:
         {
             bool bState = false;
-            if( rSet.GetItemState( EE_PARA_BULLETSTATE, true ) & (SFX_ITEM_SET|SFX_ITEM_DEFAULT))
+            SfxItemState eState = rSet.GetItemState( EE_PARA_BULLETSTATE, true );
+            if( eState == SFX_ITEM_SET || eState == SFX_ITEM_DEFAULT )
             {
                 SfxBoolItem* pItem = (SfxBoolItem*)rSet.GetItem( EE_PARA_BULLETSTATE, true );
                 bState = pItem->GetValue() ? sal_True : sal_False;
@@ -971,7 +973,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt
             case WID_FONTDESC:
                 {
                     const sal_uInt16* pWhichId = aSvxUnoFontDescriptorWhichMap;
-                    SfxItemState eTempItemState;
+                    SfxItemState eTempItemState = SFX_ITEM_UNKNOWN;
                     while( *pWhichId )
                     {
                         if(nPara != -1)
@@ -1039,6 +1041,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt
                 return beans::PropertyState_DIRECT_VALUE;
             case SFX_ITEM_DEFAULT:
                 return beans::PropertyState_DEFAULT_VALUE;
+            default: break;
 //              case SFX_ITEM_UNKNOWN:
             }
         }
@@ -1118,7 +1121,7 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const Sf
             case WID_FONTDESC:
                 {
                     const sal_uInt16* pWhichId = aSvxUnoFontDescriptorWhichMap;
-                    SfxItemState eTempItemState;
+                    SfxItemState eTempItemState = SFX_ITEM_UNKNOWN;
                     while( *pWhichId )
                     {
                         eTempItemState = pSet->GetItemState( *pWhichId );
@@ -2425,14 +2428,14 @@ void SvxDummyTextSource::GetPortions( sal_Int32, std::vector<sal_Int32>& ) const
 {
 }
 
-sal_uInt16 SvxDummyTextSource::GetItemState( const ESelection&, sal_uInt16 ) const
+SfxItemState SvxDummyTextSource::GetItemState( const ESelection&, sal_uInt16 ) const
 {
-    return 0;
+    return SFX_ITEM_UNKNOWN;
 }
 
-sal_uInt16 SvxDummyTextSource::GetItemState( sal_Int32, sal_uInt16 ) const
+SfxItemState SvxDummyTextSource::GetItemState( sal_Int32, sal_uInt16 ) const
 {
-    return 0;
+    return SFX_ITEM_UNKNOWN;
 }
 
 SfxItemPool* SvxDummyTextSource::GetPool() const
diff --git a/include/editeng/unoedprx.hxx b/include/editeng/unoedprx.hxx
index a7cab62..bbe67ff 100644
--- a/include/editeng/unoedprx.hxx
+++ b/include/editeng/unoedprx.hxx
@@ -42,10 +42,10 @@ public:
     virtual void            RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ) SAL_OVERRIDE;
     virtual void            GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const SAL_OVERRIDE;
 
-    virtual sal_uInt16          CalcEditEngineIndex( sal_Int32 nPara, sal_Int32 nLogicalIndex );
+    virtual sal_uInt16      CalcEditEngineIndex( sal_Int32 nPara, sal_Int32 nLogicalIndex );
 
-     virtual sal_uInt16         GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const SAL_OVERRIDE;
-    virtual sal_uInt16          GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const SAL_OVERRIDE;
+    virtual SfxItemState    GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const SAL_OVERRIDE;
+    virtual SfxItemState    GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const SAL_OVERRIDE;
 
     virtual void            QuickInsertText( const OUString& rText, const ESelection& rSel ) SAL_OVERRIDE;
     virtual void            QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) SAL_OVERRIDE;
diff --git a/include/editeng/unoedsrc.hxx b/include/editeng/unoedsrc.hxx
index a76db33..4f52c50 100644
--- a/include/editeng/unoedsrc.hxx
+++ b/include/editeng/unoedsrc.hxx
@@ -148,8 +148,8 @@ public:
     virtual void        RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ) = 0;
     virtual void        GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const = 0;
 
-    virtual sal_uInt16      GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const = 0;
-    virtual sal_uInt16      GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const = 0;
+    virtual SfxItemState    GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const = 0;
+    virtual SfxItemState    GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const = 0;
 
     virtual void        QuickInsertText( const OUString& rText, const ESelection& rSel ) = 0;
     virtual void        QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) = 0;
diff --git a/include/editeng/unofored.hxx b/include/editeng/unofored.hxx
index a07a784..1910bcd 100644
--- a/include/editeng/unofored.hxx
+++ b/include/editeng/unofored.hxx
@@ -44,8 +44,8 @@ public:
     virtual void        RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ) SAL_OVERRIDE;
     virtual void        GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const SAL_OVERRIDE;
 
-    virtual sal_uInt16      GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const SAL_OVERRIDE;
-    virtual sal_uInt16      GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const SAL_OVERRIDE;
+    virtual SfxItemState    GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const SAL_OVERRIDE;
+    virtual SfxItemState    GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const SAL_OVERRIDE;
 
     virtual void        QuickInsertText( const OUString& rText, const ESelection& rSel ) SAL_OVERRIDE;
     virtual void        QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) SAL_OVERRIDE;
diff --git a/include/editeng/unoforou.hxx b/include/editeng/unoforou.hxx
index 7840909..5403ef6 100644
--- a/include/editeng/unoforou.hxx
+++ b/include/editeng/unoforou.hxx
@@ -62,8 +62,8 @@ public:
     virtual void        RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ) SAL_OVERRIDE;
     virtual void        GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const SAL_OVERRIDE;
 
-    virtual sal_uInt16      GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const SAL_OVERRIDE;
-    virtual sal_uInt16      GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const SAL_OVERRIDE;
+    virtual SfxItemState    GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const SAL_OVERRIDE;
+    virtual SfxItemState    GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const SAL_OVERRIDE;
 
     virtual void        QuickInsertText( const OUString& rText, const ESelection& rSel ) SAL_OVERRIDE;
     virtual void        QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) SAL_OVERRIDE;
diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx
index 496de99..da7708c 100644
--- a/include/editeng/unotext.hxx
+++ b/include/editeng/unotext.hxx
@@ -184,8 +184,8 @@ public:
     virtual void            RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ) SAL_OVERRIDE;
     virtual void            GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const SAL_OVERRIDE;
 
-    sal_uInt16              GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const SAL_OVERRIDE;
-    sal_uInt16              GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const SAL_OVERRIDE;
+    SfxItemState            GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const SAL_OVERRIDE;
+    SfxItemState            GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const SAL_OVERRIDE;
 
     virtual SfxItemPool*    GetPool() const SAL_OVERRIDE;
 
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index 892f2ad..718a78b 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -130,16 +130,15 @@ enum SfxItemPresentation
 
 
 
-typedef sal_uInt16 SfxItemState;
-
-#define SFX_ITEM_UNKNOWN    0x0000
-
-#define SFX_ITEM_DISABLED   0x0001
-#define SFX_ITEM_READONLY   0x0002
-
-#define SFX_ITEM_DONTCARE   0x0010
-#define SFX_ITEM_DEFAULT    0x0020
-#define SFX_ITEM_SET        0x0030
+enum SfxItemState {
+    // These values have to match the values in the com::sun::star::frame::status::ItemState IDL
+    SFX_ITEM_UNKNOWN  = 0,
+    SFX_ITEM_DISABLED = 0x0001,
+    SFX_ITEM_READONLY = 0x0002,
+    SFX_ITEM_DONTCARE = 0x0010,
+    SFX_ITEM_DEFAULT  = 0x0020,
+    SFX_ITEM_SET      = 0x0030
+};
 
 // old stuff - dont use!!!
 #define SFX_ITEM_AVAILABLE  SFX_ITEM_DEFAULT
diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx
index 04e91f0..64c1c0e 100644
--- a/sfx2/source/control/querystatus.cxx
+++ b/sfx2/source/control/querystatus.cxx
@@ -139,7 +139,7 @@ throw( RuntimeException, std::exception )
         {
             ItemStatus aItemStatus;
             rEvent.State >>= aItemStatus;
-            m_eState = aItemStatus.State;
+            m_eState = (SfxItemState) aItemStatus.State;
             m_pItem = new SfxVoidItem( m_nSlotID );
         }
         else if ( pType == cppu::UnoType< ::com::sun::star::frame::status::Visibility>::get() )
diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx
index aeaaebf..703ad90 100644
--- a/sfx2/source/control/sfxstatuslistener.cxx
+++ b/sfx2/source/control/sfxstatuslistener.cxx
@@ -203,7 +203,7 @@ throw( RuntimeException, std::exception )
         {
             ItemStatus aItemStatus;
             rEvent.State >>= aItemStatus;
-            eState = aItemStatus.State;
+            eState = (SfxItemState) aItemStatus.State;
             pItem = new SfxVoidItem( m_nSlotID );
         }
         else if ( pType == cppu::UnoType< ::com::sun::star::frame::status::Visibility >::get() )
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 49e9eba..27f5a76 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -886,7 +886,7 @@ const SfxPoolItem* SfxShell::GetSlotState
     // Get Slot on the given Interface
     if ( !pIF )
         pIF = GetInterface();
-    SfxItemState eState;
+    SfxItemState eState = SFX_ITEM_UNKNOWN;
     SfxItemPool &rPool = GetPool();
 
     const SfxSlot* pSlot = NULL;
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index 8ee8d72..b0a4e59 100644
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -184,7 +184,7 @@ SfxStateCache::SfxStateCache( sal_uInt16 nFuncId ):
     pInternalController(0),
     pController(0),
     pLastItem( 0 ),
-    eLastState( 0 ),
+    eLastState( SFX_ITEM_UNKNOWN ),
     bItemVisible( true )
 {
     bCtrlDirty = true;
diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
index 882c4ea..3de5bcd 100644
--- a/sfx2/source/statbar/stbitem.cxx
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -290,7 +290,7 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception )
                 {
                     frame::status::ItemStatus aItemStatus;
                     rEvent.State >>= aItemStatus;
-                    eState = aItemStatus.State;
+                    eState = (SfxItemState) aItemStatus.State;
                     pItem = new SfxVoidItem( nSlotID );
                 }
                 else
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 8c443f1..d4152af 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -548,7 +548,7 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception )
                 {
                     ItemStatus aItemStatus;
                     rEvent.State >>= aItemStatus;
-                    eState = aItemStatus.State;
+                    eState = (SfxItemState) aItemStatus.State;
                     pItem = new SfxVoidItem( nSlotId );
                 }
                 else if ( pType == cppu::UnoType< ::com::sun::star::frame::status::Visibility>::get() )
@@ -939,6 +939,8 @@ void SfxToolBoxControl::StateChanged
             nItemBits |= TIB_CHECKABLE;
         }
         break;
+
+        default: break; // do nothing
     }
 
     pImpl->pBox->SetItemState( GetId(), eTri );
@@ -1094,7 +1096,7 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception )
                 {
                     ItemStatus aItemStatus;
                     rEvent.State >>= aItemStatus;
-                    eState = aItemStatus.State;
+                    eState = (SfxItemState) aItemStatus.State;
                     pItem = new SfxVoidItem( nSlotId );
                 }
                 else if ( pType == cppu::UnoType< ::com::sun::star::frame::status::Visibility>::get() )
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index a037861..835b009 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -1112,7 +1112,7 @@ void SmTextForwarder::FieldClicked(const SvxFieldItem&, sal_Int32, sal_Int32)
 {
 }
 
-static sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich )
+static SfxItemState GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, sal_uInt16 nWhich )
 {
     std::vector<EECharAttrib> aAttribs;
 
@@ -1204,18 +1204,18 @@ static sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESel
     return eState;
 }
 
-sal_uInt16 SmTextForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
+SfxItemState SmTextForwarder::GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const
 {
-    sal_uInt16 nState = SFX_ITEM_DISABLED;
+    SfxItemState nState = SFX_ITEM_DISABLED;
     EditEngine *pEditEngine = rEditAcc.GetEditEngine();
     if (pEditEngine)
         nState = GetSvxEditEngineItemState( *pEditEngine, rSel, nWhich );
     return nState;
 }
 
-sal_uInt16 SmTextForwarder::GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const
+SfxItemState SmTextForwarder::GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const
 {
-    sal_uInt16 nState = SFX_ITEM_DISABLED;
+    SfxItemState nState = SFX_ITEM_DISABLED;
     EditEngine *pEditEngine = rEditAcc.GetEditEngine();
     if (pEditEngine)
     {
diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx
index 1b8f4da..1414b53 100644
--- a/starmath/source/accessibility.hxx
+++ b/starmath/source/accessibility.hxx
@@ -210,8 +210,8 @@ public:
     virtual void        RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ) SAL_OVERRIDE;
     virtual void        GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const SAL_OVERRIDE;
 
-    virtual sal_uInt16      GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const SAL_OVERRIDE;
-    virtual sal_uInt16      GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const SAL_OVERRIDE;
+    virtual SfxItemState  GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const SAL_OVERRIDE;
+    virtual SfxItemState  GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const SAL_OVERRIDE;
 
     virtual void        QuickInsertText( const OUString& rText, const ESelection& rSel ) SAL_OVERRIDE;
     virtual void        QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) SAL_OVERRIDE;
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index cf15b26..33ed2d4 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -737,7 +737,8 @@ void SfxItemSet::MergeRange( sal_uInt16 nFrom, sal_uInt16 nTo )
 
 {
     // special case: exactly one sal_uInt16 which is already included?
-    if ( nFrom == nTo && SFX_ITEM_AVAILABLE <= GetItemState(nFrom, false) )
+    SfxItemState eItemState = GetItemState(nFrom, false);
+    if ( nFrom == nTo && ( eItemState == SFX_ITEM_DEFAULT || eItemState == SFX_ITEM_SET ) )
         return;
 
     // merge new range
@@ -1096,7 +1097,7 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet )
             sal_uInt16 nWhich = IsInvalidItem( pItem )
                                 ? GetWhichByPos( aIter.GetCurPos() )
                                 : pItem->Which();
-            if( 0 == rSet.GetItemState( nWhich, false ) )
+            if( SFX_ITEM_UNKNOWN == rSet.GetItemState( nWhich, false ) )
                 ClearItem( nWhich );        // loeschen
             if( aIter.IsAtEnd() )
                 break;
diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
index 776e964..d2d0ac2 100644
--- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx
+++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
@@ -107,8 +107,8 @@ namespace accessibility
         void            RemoveAttribs( const ESelection& /*rSelection*/, bool /*bRemoveParaAttribs*/, sal_uInt16 /*nWhich*/ ) SAL_OVERRIDE {}
         void            GetPortions( sal_Int32 /*nPara*/, std::vector<sal_Int32>& /*rList*/ ) const SAL_OVERRIDE {}
 
-        sal_uInt16          GetItemState( const ESelection& /*rSel*/, sal_uInt16 /*nWhich*/ ) const SAL_OVERRIDE { return 0; }
-        sal_uInt16          GetItemState( sal_Int32 /*nPara*/, sal_uInt16 /*nWhich*/ ) const SAL_OVERRIDE { return 0; }
+        SfxItemState    GetItemState( const ESelection& /*rSel*/, sal_uInt16 /*nWhich*/ ) const SAL_OVERRIDE { return SFX_ITEM_UNKNOWN; }
+        SfxItemState    GetItemState( sal_Int32 /*nPara*/, sal_uInt16 /*nWhich*/ ) const SAL_OVERRIDE { return SFX_ITEM_UNKNOWN; }
 
         SfxItemPool*    GetPool() const SAL_OVERRIDE { return NULL; }
 
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 9f1322c..40ca0d9 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -325,6 +325,7 @@ OUString _SdrItemBrowserControl::GetCellText(long _nRow, sal_uInt16 _nColId) con
                             case SFX_ITEM_DONTCARE: sRet = "DontCare"; break;
                             case SFX_ITEM_SET     : sRet = "Set";      break;
                             case SFX_ITEM_DEFAULT : sRet = "Default";  break;
+                            case SFX_ITEM_READONLY: sRet = "ReadOnly";  break;
                         } // switch
                     } break;
                     case ITEMBROWSER_TYPECOL_ID: sRet = pEntry->GetItemTypeStr(); break;
diff --git a/svx/source/tbxctrls/formatpaintbrushctrl.cxx b/svx/source/tbxctrls/formatpaintbrushctrl.cxx
index 0c977e6..27c6c8a 100644
--- a/svx/source/tbxctrls/formatpaintbrushctrl.cxx
+++ b/svx/source/tbxctrls/formatpaintbrushctrl.cxx
@@ -96,7 +96,7 @@ void FormatPaintBrushToolBoxControl::Select(sal_uInt16 /*nSelectModifier*/)
 void FormatPaintBrushToolBoxControl::StateChanged( sal_uInt16 nSID, SfxItemState eState,
                 const SfxPoolItem* pState )
 {
-    if( ( eState & SFX_ITEM_SET ) == 0 )
+    if( eState != SFX_ITEM_SET )
         m_bPersistentCopy = false;
     SfxToolBoxControl::StateChanged( nSID, eState, pState );
 }
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index e0e8eb3..816afbe 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2078,6 +2078,9 @@ void SvxStyleToolBoxControl::StateChanged(
         case SFX_ITEM_DONTCARE:
             eTri = TRISTATE_INDET;
             break;
+
+        default:
+            break;
     }
 
     rTbx.SetItemState( nId, eTri );
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 70221d1..795cb89 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -4148,9 +4148,9 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos,
 
                 // Safe numrule item at destination.
                 // #i86492# - Safe also <ListId> item of destination.
-                int aNumRuleState = SFX_ITEM_UNKNOWN;
+                SfxItemState aNumRuleState = SFX_ITEM_UNKNOWN;
                 SwNumRuleItem aNumRuleItem;
-                int aListIdState = SFX_ITEM_UNKNOWN;
+                SfxItemState aListIdState = SFX_ITEM_UNKNOWN;
                 SfxStringItem aListIdItem( RES_PARATR_LIST_ID, OUString() );
                 {
                     const SfxItemSet * pAttrSet = pDestTxtNd->GetpSwAttrSet();
@@ -4293,9 +4293,9 @@ bool DocumentContentOperationsManager::CopyImpl( SwPaM& rPam, SwPosition& rPos,
 
             // Save numrule at destination
             // #i86492# - Safe also <ListId> item of destination.
-            int aNumRuleState = SFX_ITEM_UNKNOWN;
+            SfxItemState aNumRuleState = SFX_ITEM_UNKNOWN;
             SwNumRuleItem aNumRuleItem;
-            int aListIdState = SFX_ITEM_UNKNOWN;
+            SfxItemState aListIdState = SFX_ITEM_UNKNOWN;
             SfxStringItem aListIdItem( RES_PARATR_LIST_ID, OUString() );
             {
                 const SfxItemSet* pAttrSet = pDestTxtNd->GetpSwAttrSet();
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 9973c2d..3cde10f 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -366,7 +366,7 @@ void SwNumPositionTabPage::ActivatePage(const SfxItemSet& )
     sal_uInt16 nTmpNumLvl =
         pOutlineDlg ? SwOutlineTabDialog::GetActNumLevel() : 0;
     const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
-    if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, false, &pItem))
+    if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, false, &pItem) != SFX_ITEM_UNKNOWN)
     {
         bPreset = ((const SfxBoolItem*)pItem)->GetValue();
     }
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 7accf66..e6d208e 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -1493,15 +1493,16 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
                 }
                 break;
                 case SFX_ITEM_DONTCARE:
-                    // set NumRule to default values
-                    // what are the default values?
-                    {
-                        SwNumRule aRule( pNumRule->GetName(),
-                                         // #i89178#
-                                         numfunc::GetDefaultPositionAndSpaceMode() );
-                        rDoc.ChgNumRuleFmts( aRule );
-                    }
-                    break;
+                // set NumRule to default values
+                // what are the default values?
+                {
+                    SwNumRule aRule( pNumRule->GetName(),
+                                     // #i89178#
+                                     numfunc::GetDefaultPositionAndSpaceMode() );
+                    rDoc.ChgNumRuleFmts( aRule );
+                }
+                break;
+                default: break;
                 }
             }
             break;
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 66b4f08..ad35342 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1671,7 +1671,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
                 rSh.GetCurAttr(aSet);
 
                 // If a hyperlink is selected, either alone or along with other text...
-                if( ((SFX_ITEM_DONTCARE & aSet.GetItemState( RES_TXTATR_INETFMT, true )) == 0) || rSh.HasReadonlySel())
+                if(aSet.GetItemState( RES_TXTATR_INETFMT, true ) != SFX_ITEM_DONTCARE || rSh.HasReadonlySel())
                 {
                     rSet.DisableItem(nWhich);
                 }
commit 11e66edd0e60d55fe5b6d285b919c012ae7500ce
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Jul 22 13:48:16 2014 +0200

    remove dead SfxArgumentError typedef
    
    Change-Id: I62127b23475dedf081fc981c20e916d5868ab086

diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index ec3791c..892f2ad 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -29,8 +29,6 @@
 #include <tools/debug.hxx>
 #include <svl/hint.hxx>
 
-typedef long SfxArgumentError;
-
 class SbxVariable;
 class SbxObject;
 class SvStream;
commit e72ddca6a00b2f86f58869db9f688c37d9072bda
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Jul 22 13:47:46 2014 +0200

    move string IO methods out of global header
    
    and into a module-local header.
    It's not like the methods have any actual relationship with the
    SfxPoolItem class.
    
    Change-Id: I1378364a1554642333b0c5c79d869d719b53fa0c

diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index ce91650..ec3791c 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -211,48 +211,6 @@ public:
     sal_uLong                GetRefCount() const { return m_nRefCount; }
     inline SfxItemKind       GetKind() const { return m_nKind; }
 
-    /** Read in a Unicode string from a streamed byte string representation.
-
-        @param rStream  Some (input) stream.  Its Stream/TargetCharSets must
-        be set to correct values!
-
-        @return  On success, returns the reconstructed Unicode string.
-     */
-    static OUString readByteString(SvStream & rStream);
-
-    /** Write a byte string representation of a Unicode string into a stream.
-
-        @param rStream  Some (output) stream.  Its Stream/TargetCharSets must
-        be set to correct values!
-
-        @param rString  Some Unicode string.
-     */
-    static void writeByteString(SvStream & rStream,
-                                const OUString& rString);
-
-    /** Read in a Unicode string from either a streamed Unicode or byte string
-        representation.
-
-        @param rStream  Some (input) stream.  If bUnicode is false, its
-        Stream/TargetCharSets must be set to correct values!
-
-        @param bUnicode  Whether to read in a stream Unicode (true) or byte
-        string (false) representation.
-
-        @return          On success, returns the reconstructed Unicode string.
-     */
-    static OUString readUnicodeString(SvStream & rStream, bool bUnicode);
-
-    /** Write a Unicode string representation of a Unicode string into a
-        stream.
-
-        @param rStream  Some (output) stream.
-
-        @param rString  Some Unicode string.
-     */
-    static void writeUnicodeString(SvStream & rStream,
-                                   const OUString& rString);
-
 private:
     SfxPoolItem&             operator=( const SfxPoolItem& );    // not implemented!!
 };
diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx
index 02e1c60..2dcd2ca 100644
--- a/svl/source/inc/poolio.hxx
+++ b/svl/source/inc/poolio.hxx
@@ -71,7 +71,7 @@ struct SfxPoolItemArray_Impl: public SfxPoolItemArrayBase_Impl
     typedef boost::unordered_map<SfxPoolItem*,sal_uInt32> Hash;
 
 public:
-    /// Track list of indicees into our array that contain an empty slot
+    /// Track list of indices into our array that contain an empty slot
     FreeList maFree;
     /// Hash of SfxPoolItem pointer to index into our array that contains that slot
     Hash     maHash;
@@ -244,6 +244,47 @@ struct SfxItemPool_Impl
 #define SFX_STYLES_REC_HEADER       sal_uInt16(0x0010)
 #define SFX_STYLES_REC_STYLES       sal_uInt16(0x0020)
 
+/** Read in a Unicode string from a streamed byte string representation.
+
+    @param rStream  Some (input) stream.  Its Stream/TargetCharSets must
+    be set to correct values!
+
+    @return  On success, returns the reconstructed Unicode string.
+ */
+OUString readByteString(SvStream & rStream);
+
+/** Write a byte string representation of a Unicode string into a stream.
+
+    @param rStream  Some (output) stream.  Its Stream/TargetCharSets must
+    be set to correct values!
+
+    @param rString  Some Unicode string.
+ */
+void writeByteString(SvStream & rStream, const OUString& rString);
+
+/** Read in a Unicode string from either a streamed Unicode or byte string
+    representation.
+
+    @param rStream  Some (input) stream.  If bUnicode is false, its
+    Stream/TargetCharSets must be set to correct values!
+
+    @param bUnicode  Whether to read in a stream Unicode (true) or byte
+    string (false) representation.
+
+    @return          On success, returns the reconstructed Unicode string.
+ */
+OUString readUnicodeString(SvStream & rStream, bool bUnicode);
+
+/** Write a Unicode string representation of a Unicode string into a
+    stream.
+
+    @param rStream  Some (output) stream.
+
+    @param rString  Some Unicode string.
+ */
+void writeUnicodeString(SvStream & rStream, const OUString& rString);
+
+
 #endif // INCLUDED_SVL_SOURCE_INC_POOLIO_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/inc/stringio.hxx b/svl/source/inc/stringio.hxx
new file mode 100644
index 0000000..6d86852
--- /dev/null
+++ b/svl/source/inc/stringio.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVL_SOURCE_INC_STRINGIO_HXX
+#define INCLUDED_SVL_SOURCE_INC_STRINGIO_HXX
+
+/** Read in a Unicode string from a streamed byte string representation.
+
+    @param rStream  Some (input) stream.  Its Stream/TargetCharSets must
+    be set to correct values!
+
+    @return  On success, returns the reconstructed Unicode string.
+ */
+OUString readByteString(SvStream & rStream);
+
+/** Write a byte string representation of a Unicode string into a stream.
+
+    @param rStream  Some (output) stream.  Its Stream/TargetCharSets must
+    be set to correct values!
+
+    @param rString  Some Unicode string.
+ */
+void writeByteString(SvStream & rStream, const OUString& rString);
+
+/** Read in a Unicode string from either a streamed Unicode or byte string
+    representation.
+
+    @param rStream  Some (input) stream.  If bUnicode is false, its
+    Stream/TargetCharSets must be set to correct values!
+
+    @param bUnicode  Whether to read in a stream Unicode (true) or byte
+    string (false) representation.
+
+    @return          On success, returns the reconstructed Unicode string.
+ */
+OUString readUnicodeString(SvStream & rStream, bool bUnicode);
+
+/** Write a Unicode string representation of a Unicode string into a
+    stream.
+
+    @param rStream  Some (output) stream.
+
+    @param rString  Some Unicode string.
+ */
+void writeUnicodeString(SvStream & rStream, const OUString& rString);
+
+
+#endif // INCLUDED_SVL_SOURCE_INC_STRINGIO_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/items/cntwall.cxx b/svl/source/items/cntwall.cxx
index afd8e34..ce2fe9d 100644
--- a/svl/source/items/cntwall.cxx
+++ b/svl/source/items/cntwall.cxx
@@ -23,6 +23,7 @@
 #include <tools/vcompat.hxx>
 
 #include <svl/cntwall.hxx>
+#include <stringio.hxx>
 
 #define CNTWALLPAPERITEM_STREAM_MAGIC   ( (sal_uInt32)0xfefefefe )
 #define CNTWALLPAPERITEM_STREAM_SEEKREL (-( (long)( sizeof( sal_uInt32 ) ) ) )
diff --git a/svl/source/items/ctypeitm.cxx b/svl/source/items/ctypeitm.cxx
index e212bc6..d0a2734 100644
--- a/svl/source/items/ctypeitm.cxx
+++ b/svl/source/items/ctypeitm.cxx
@@ -22,6 +22,7 @@
 #include <unotools/intlwrapper.hxx>
 #include <tools/stream.hxx>
 #include <svl/ctypeitm.hxx>
+#include <stringio.hxx>
 
 // The following defines are copied from chaos/source/items/cstritem.cxx:
 #define CNTSTRINGITEM_STREAM_MAGIC   ( (sal_uInt32)0xfefefefe )
diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx
index ca0eb42..ecdfa9f 100644
--- a/svl/source/items/macitem.cxx
+++ b/svl/source/items/macitem.cxx
@@ -20,6 +20,7 @@
 #include <tools/stream.hxx>
 
 #include <svl/macitem.hxx>
+#include <stringio.hxx>
 
 TYPEINIT1_FACTORY(SvxMacroItem, SfxPoolItem, new SvxMacroItem(0));
 
@@ -107,8 +108,8 @@ SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, sal_uInt16 nVersion )
         sal_uInt16 nCurKey, eType = STARBASIC;
         OUString aLibName, aMacName;
         rStrm.ReadUInt16( nCurKey );
-        aLibName = SfxPoolItem::readByteString(rStrm);
-        aMacName = SfxPoolItem::readByteString(rStrm);
+        aLibName = readByteString(rStrm);
+        aMacName = readByteString(rStrm);
 
         if( SVX_MACROTBL_VERSION40 <= nVersion )
             rStrm.ReadUInt16( eType );
@@ -135,8 +136,8 @@ SvStream& SvxMacroTableDtor::Write( SvStream& rStream ) const
     {
         const SvxMacro& rMac = it->second;
         rStream.WriteUInt16( it->first );
-        SfxPoolItem::writeByteString(rStream, rMac.GetLibName());
-        SfxPoolItem::writeByteString(rStream, rMac.GetMacName());
+        writeByteString(rStream, rMac.GetLibName());
+        writeByteString(rStream, rMac.GetMacName());
 
         if( SVX_MACROTBL_VERSION40 <= nVersion )
             rStream.WriteUInt16( (sal_uInt16)rMac.GetScriptType() );
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index 4a3c67d..4b667c1 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -149,7 +149,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
     {
         SfxMiniRecordWriter aPoolHeaderRec( &rStream, SFX_ITEMPOOL_REC_HEADER);
         rStream.WriteUInt16( pImp->nVersion );
-        SfxPoolItem::writeByteString(rStream, pImp->aName);
+        writeByteString(rStream, pImp->aName);
     }
 
     // VersionMaps
@@ -560,7 +560,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
 
         // Read Header
         rStream.ReadUInt16( pImp->nLoadingVersion );
-        aExternName = SfxPoolItem::readByteString(rStream);
+        aExternName = readByteString(rStream);
         bool bOwnPool = aExternName == pImp->aName;
 
         //! As long as we cannot read foreign Pools
@@ -734,7 +734,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
     OUString aExternName;
     if ( pImp->nMajorVer > 1 || pImp->nMinorVer >= 2 )
         rStream.ReadUInt16( pImp->nLoadingVersion );
-    aExternName = SfxPoolItem::readByteString(rStream);
+    aExternName = readByteString(rStream);
     bool bOwnPool = aExternName == pImp->aName;
     pImp->bStreaming = true;
 
@@ -1534,4 +1534,26 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, bool bDirect,
 }
 
 
+OUString readByteString(SvStream& rStream)
+{
+    return rStream.ReadUniOrByteString(rStream.GetStreamCharSet());
+}
+
+void writeByteString(SvStream & rStream, const OUString& rString)
+{
+    rStream.WriteUniOrByteString(rString, rStream.GetStreamCharSet());
+}
+
+OUString readUnicodeString(SvStream & rStream, bool bUnicode)
+{
+    return rStream.ReadUniOrByteString(bUnicode ? RTL_TEXTENCODING_UCS2 :
+                                      rStream.GetStreamCharSet());
+}
+
+void writeUnicodeString(SvStream & rStream, const OUString& rString)
+{
+    rStream.WriteUniOrByteString(rString, RTL_TEXTENCODING_UCS2);
+}
+
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
index ef327d6..6445721 100644
--- a/svl/source/items/poolitem.cxx
+++ b/svl/source/items/poolitem.cxx
@@ -159,31 +159,6 @@ SvStream& SfxPoolItem::Store(SvStream &rStream, sal_uInt16 ) const
     return rStream;
 }
 
-// static
-OUString SfxPoolItem::readByteString(SvStream& rStream)
-{
-    return rStream.ReadUniOrByteString(rStream.GetStreamCharSet());
-}
-
-// static
-void SfxPoolItem::writeByteString(SvStream & rStream, const OUString& rString)
-{
-    rStream.WriteUniOrByteString(rString, rStream.GetStreamCharSet());
-}
-
-// static
-OUString SfxPoolItem::readUnicodeString(SvStream & rStream, bool bUnicode)
-{
-    return rStream.ReadUniOrByteString(bUnicode ? RTL_TEXTENCODING_UCS2 :
-                                      rStream.GetStreamCharSet());
-}
-
-// static
-void SfxPoolItem::writeUnicodeString(SvStream & rStream, const OUString& rString)
-{
-    rStream.WriteUniOrByteString(rString, RTL_TEXTENCODING_UCS2);
-}
-
 /**
  * This virtual method allows to get a textual representation of the value
  * for the SfxPoolItem subclasses. It should be overloaded by all UI-relevant
diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx
index 2b875f8..8fc3c5d 100644
--- a/svl/source/items/slstitm.cxx
+++ b/svl/source/items/slstitm.cxx
@@ -23,6 +23,7 @@
 #include <com/sun/star/uno/Any.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
 #include <tools/stream.hxx>
+#include <stringio.hxx>
 
 TYPEINIT1_AUTOFACTORY(SfxStringListItem, SfxPoolItem);
 
diff --git a/svl/source/items/stritem.cxx b/svl/source/items/stritem.cxx
index bdb75b6..dd94154 100644
--- a/svl/source/items/stritem.cxx
+++ b/svl/source/items/stritem.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <svl/stritem.hxx>
+#include <stringio.hxx>
 
 
 //  class SfxStringItem
commit 8497efb425d901257464a03e7c5faa3f1bbea9fe
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Jul 22 13:09:24 2014 +0200

    convert SfxPoolItem kind constants to an enum
    
    Change-Id: I57de8c0cebfd60fdf70c23c72ecf1e47c69d7ecd

diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx
index 3fd8450..09c1305 100644
--- a/include/svl/itempool.hxx
+++ b/include/svl/itempool.hxx
@@ -89,7 +89,7 @@ protected:
     static inline void              SetRefCount( SfxPoolItem& rItem, sal_uLong n );
     static inline void              AddRef( const SfxPoolItem& rItem, sal_uLong n = 1 );
     static inline sal_uLong         ReleaseRef( const SfxPoolItem& rItem, sal_uLong n = 1);
-    static inline void              SetKind( SfxPoolItem& rItem, sal_uInt16 nRef );
+    static inline void              SetKind( SfxPoolItem& rItem, SfxItemKind nRef );
 
 public:
                                     SfxItemPool( const SfxItemPool &rPool,
@@ -238,7 +238,7 @@ inline sal_uLong SfxItemPool::ReleaseRef( const SfxPoolItem& rItem, sal_uLong n
     return rItem.ReleaseRef(n);
 }
 
-inline void SfxItemPool::SetKind( SfxPoolItem& rItem, sal_uInt16 nRef )
+inline void SfxItemPool::SetKind( SfxPoolItem& rItem, SfxItemKind nRef )
 {
     rItem.SetKind( nRef );
 }
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index 698fe6e..ce91650 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -39,13 +39,16 @@ 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;
-
-#define SFX_ITEMS_POOLDEFAULT               0xffff
-#define SFX_ITEMS_STATICDEFAULT             0xfffe
-#define SFX_ITEMS_DELETEONIDLE              0xfffd
+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,
+   SFX_ITEMS_STATICDEFAULT,
+   SFX_ITEMS_POOLDEFAULT
+};
 
 #define SFX_ITEMS_OLD_MAXREF                0xffef
 #define SFX_ITEMS_MAXREF                    0xfffffffe
@@ -162,11 +165,11 @@ friend class SfxVoidItem;
 
     mutable sal_uLong   m_nRefCount;
     sal_uInt16  m_nWhich;
-    sal_uInt16  m_nKind;
+    SfxItemKind  m_nKind;
 
 private:
     inline void              SetRefCount( sal_uLong n );
-    inline void              SetKind( sal_uInt16 n );
+    inline void              SetKind( SfxItemKind n );
 public:
     inline void              AddRef( sal_uLong n = 1 ) const;
 private:
@@ -206,7 +209,7 @@ public:
     virtual SfxPoolItem*     Clone( SfxItemPool *pPool = 0 ) const = 0;
 
     sal_uLong                GetRefCount() const { return m_nRefCount; }
-    inline sal_uInt16        GetKind() const { return m_nKind; }
+    inline SfxItemKind       GetKind() const { return m_nKind; }
 
     /** Read in a Unicode string from a streamed byte string representation.
 
@@ -259,10 +262,10 @@ private:
 inline void SfxPoolItem::SetRefCount( sal_uLong n )
 {
     m_nRefCount = n;
-    m_nKind = 0;
+    m_nKind = SFX_ITEMS_NONE;
 }
 
-inline void SfxPoolItem::SetKind( sal_uInt16 n )
+inline void SfxPoolItem::SetKind( SfxItemKind n )
 {
     m_nRefCount = SFX_ITEMS_SPECIAL;
     m_nKind = n;
@@ -297,7 +300,7 @@ inline bool IsStaticDefaultItem(const SfxPoolItem *pItem )
 
 inline bool IsDefaultItem( const SfxPoolItem *pItem )
 {
-    return pItem && pItem->GetKind() >= SFX_ITEMS_STATICDEFAULT;
+    return pItem && (pItem->GetKind() == SFX_ITEMS_STATICDEFAULT || pItem->GetKind() == SFX_ITEMS_POOLDEFAULT);
 }
 
 inline bool IsPooledItem( const SfxPoolItem *pItem )
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index bbc73f5..4a3c67d 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -42,6 +42,34 @@ const SfxItemPool* SfxItemPool::GetStoringPool()
     return pStoringPool_;
 }
 
+static sal_uInt16 convertSfxItemKindToUInt16(SfxItemKind x)
+{
+    if ( x == SFX_ITEMS_NONE )
+        return 0;
+    if ( x == SFX_ITEMS_DELETEONIDLE )
+        return 0xfffd;
+    if ( x == SFX_ITEMS_STATICDEFAULT )
+        return 0xfffe;
+    if ( x == SFX_ITEMS_POOLDEFAULT )
+        return 0xffff;
+    assert(false);
+}
+
+static SfxItemKind convertUInt16ToSfxItemKind(sal_uInt16 x)
+{
+    if ( x == 0 )
+        return SFX_ITEMS_NONE;
+    if ( x == 0xfffd )
+        return SFX_ITEMS_DELETEONIDLE;
+    if ( x == 0xfffe )
+        return SFX_ITEMS_STATICDEFAULT;
+    if ( x == 0xffff )
+        return SFX_ITEMS_POOLDEFAULT;
+    assert(false);
+}
+
+
+
 /**
  * The SfxItemPool is saved to the specified Stream (together with all its
  * secondary Pools) using its Pool Defaults and pooled Items.
@@ -191,7 +219,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
                             aItemsRec.NewContent((sal_uInt16)j, 'X' );
 
                             if ( pItem->GetRefCount() == SFX_ITEMS_SPECIAL )
-                                rStream.WriteUInt16( (sal_uInt16) pItem->GetKind() );
+                                rStream.WriteUInt16( convertSfxItemKindToUInt16(pItem->GetKind()) );
                             else
                             {
                                 rStream.WriteUInt16( (sal_uInt16) pItem->GetRefCount() );
@@ -371,7 +399,7 @@ void SfxItemPool_Impl::readTheItems (
         else
         {
             if ( nRef > SFX_ITEMS_OLD_MAXREF )
-                SfxItemPool::SetKind(*pItem, nRef);
+                SfxItemPool::SetKind(*pItem, convertUInt16ToSfxItemKind(nRef));
             else
                 SfxItemPool::AddRef(*pItem, nRef);
         }
@@ -692,6 +720,7 @@ sal_uInt16 SfxItemPool::GetSize_Impl() const
     return pImp->mnEnd - pImp->mnStart + 1;
 }
 
+
 SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
 {
     // For the Master the Header has already been loaded in Load()
@@ -843,7 +872,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
                 else
                 {
                     if ( nRef > SFX_ITEMS_OLD_MAXREF )
-                        pItem->SetKind( nRef );
+                        pItem->SetKind( convertUInt16ToSfxItemKind(nRef) );
                     else
                         AddRef(*pItem, nRef);
                 }
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
index 38c7437..ef327d6 100644
--- a/svl/source/items/poolitem.cxx
+++ b/svl/source/items/poolitem.cxx
@@ -44,7 +44,7 @@ IMPL_PTRHINT(SfxPoolItemHint,SfxPoolItem)
 SfxPoolItem::SfxPoolItem(sal_uInt16 const nWhich)
     : m_nRefCount(0)
     , m_nWhich(nWhich)
-    , m_nKind(0)
+    , m_nKind(SFX_ITEMS_NONE)
 {
     DBG_ASSERT(nWhich <= SHRT_MAX, "invalid WhichId");
 #if OSL_DEBUG_LEVEL > 1
@@ -81,7 +81,7 @@ SfxPoolItem::SfxPoolItem(sal_uInt16 const nWhich)
 SfxPoolItem::SfxPoolItem( const SfxPoolItem& rCpy )
     : m_nRefCount(0) // don't copy that
     , m_nWhich(rCpy.Which()) // call function because of ChkThis() (WTF does that mean?)
-    , m_nKind( 0 )
+    , m_nKind( SFX_ITEMS_NONE )
 {
 #if OSL_DEBUG_LEVEL > 1
     ++nItemCount;
commit b78d881520f2eb658180e2c90ffee3d30a80f0ae
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Jul 22 07:31:59 2014 +0200

    remove unused values from SfxFieldUnit enum
    
    Change-Id: I3cb720b62216f5534d0ff3b524c596158ffe824c

diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index 5a6d456..698fe6e 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -88,9 +88,7 @@ inline ::com::sun::star::uno::Any Bool2Any( bool bValue )
 //! Notloesung!!!
 enum SfxFieldUnit
 {
-    SFX_FUNIT_NONE, SFX_FUNIT_MM, SFX_FUNIT_CM, SFX_FUNIT_M, SFX_FUNIT_KM,
-    SFX_FUNIT_TWIP, SFX_FUNIT_POINT, SFX_FUNIT_PICA,
-    SFX_FUNIT_INCH, SFX_FUNIT_FOOT, SFX_FUNIT_MILE, SFX_FUNIT_CHAR, SFX_FUNIT_LINE, SFX_FUNIT_CUSTOM
+    SFX_FUNIT_NONE, SFX_FUNIT_TWIP
 };
 
 enum SfxMapUnit
commit 262bde9b3eddf8937d3ce57939dddb1c20b1daaa
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jul 21 15:53:14 2014 +0200

    simplify SfxItemPool::GetPresentation
    
    drop the ePresentation parameter, since all 4 of the callsites use
    SFX_ITEM_PRESENTATION_COMPLETE as the parameter value,
    and just inline the value into the method.
    
    Change-Id: I42c8eae82837c9f9d4edc886d7c760f57b129125

diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx
index edff191..3fd8450 100644
--- a/include/svl/itempool.hxx
+++ b/include/svl/itempool.hxx
@@ -144,7 +144,6 @@ public:
         string representation of 'rItem'
     */
     virtual SfxItemPresentation     GetPresentation( const SfxPoolItem& rItem,
-                                        SfxItemPresentation ePresentation,
                                         SfxMapUnit          ePresentationMetric,
                                         OUString&           rText,
                                         const IntlWrapper * pIntlWrapper = 0 ) const;
diff --git a/include/svx/svdpool.hxx b/include/svx/svdpool.hxx
index 10e20c6..e5c91ba 100644
--- a/include/svx/svdpool.hxx
+++ b/include/svx/svdpool.hxx
@@ -40,7 +40,6 @@ public:
 
     virtual SfxItemPool* Clone() const SAL_OVERRIDE;
     virtual SfxItemPresentation GetPresentation(const SfxPoolItem& rItem,
-        SfxItemPresentation ePresentation,
         SfxMapUnit          ePresentationMetric,
         OUString&             rText,
         const IntlWrapper * pIntlWrapper
diff --git a/sc/inc/docpool.hxx b/sc/inc/docpool.hxx
index e5be858..ceff3d1 100644
--- a/sc/inc/docpool.hxx
+++ b/sc/inc/docpool.hxx
@@ -60,7 +60,6 @@ public:
     void CellStyleCreated( const OUString& rName );
     virtual SfxItemPresentation     GetPresentation(
                                         const SfxPoolItem&  rItem,
-                                        SfxItemPresentation ePresentation,
                                         SfxMapUnit          ePresentationMetric,
                                         OUString&           rText,
                                         const IntlWrapper* pIntl = 0 ) const SAL_OVERRIDE;
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 062297e..3329731 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -793,7 +793,6 @@ static SfxItemPresentation lcl_HFPresentation
 
 SfxItemPresentation ScDocumentPool::GetPresentation(
     const SfxPoolItem&  rItem,
-    SfxItemPresentation ePresentation,
     SfxMapUnit          ePresentationMetric,
     OUString&           rText,
     const IntlWrapper* pIntl ) const
@@ -803,104 +802,39 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
     OUString aStrNo   ( ScGlobal::GetRscString(STR_NO) );
     OUString aStrSep(": ");
 
+    SfxItemPresentation ePresentationRet = SFX_ITEM_PRESENTATION_COMPLETE;
     switch( nW )
     {
         case ATTR_PAGE_TOPDOWN:
-        switch ( ePresentation )
-        {
-            case SFX_ITEM_PRESENTATION_COMPLETE:
             rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_PRINTDIR) + aStrSep;
-//          break; // DURCHFALLEN!!!
-            case SFX_ITEM_PRESENTATION_NAMELESS:
             rText += ((const SfxBoolItem&)rItem).GetValue() ?
                 ScGlobal::GetRscString(STR_SCATTR_PAGE_TOPDOWN) :
                 ScGlobal::GetRscString(STR_SCATTR_PAGE_LEFTRIGHT) ;
-            break;
-            default:
-            {
-                // added to avoid warnings
-            }
-        }
         break;
 
         case ATTR_PAGE_HEADERS:
-        switch ( ePresentation )
-        {
-            case SFX_ITEM_PRESENTATION_COMPLETE:
             rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_HEADERS) + aStrSep;
-//          break; // DURCHFALLEN!!!
-            case SFX_ITEM_PRESENTATION_NAMELESS:
             rText += ((const SfxBoolItem&)rItem).GetValue() ? aStrYes : aStrNo ;
-            break;
-            default:
-            {
-                // added to avoid warnings
-            }
-        }
         break;
 
         case ATTR_PAGE_NULLVALS:
-        switch ( ePresentation )
-        {
-            case SFX_ITEM_PRESENTATION_COMPLETE:
             rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_NULLVALS) + aStrSep;
-//          break; // DURCHFALLEN!!!
-            case SFX_ITEM_PRESENTATION_NAMELESS:
             rText += ((const SfxBoolItem&)rItem).GetValue() ? aStrYes : aStrNo ;
-            break;
-            default:
-            {
-                // added to avoid warnings
-            }
-        }
         break;
 
         case ATTR_PAGE_FORMULAS:
-        switch ( ePresentation )
-        {
-            case SFX_ITEM_PRESENTATION_COMPLETE:
             rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_FORMULAS) + aStrSep;
-//          break; // DURCHFALLEN!!!
-            case SFX_ITEM_PRESENTATION_NAMELESS:
             rText += ((const SfxBoolItem&)rItem).GetValue() ? aStrYes : aStrNo ;
-            break;
-            default:
-            {
-                // added to avoid warnings
-            }
-        }
         break;
 
         case ATTR_PAGE_NOTES:
-        switch ( ePresentation )
-        {
-            case SFX_ITEM_PRESENTATION_COMPLETE:
             rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_NOTES) + aStrSep;
-//          break; // DURCHFALLEN!!!
-            case SFX_ITEM_PRESENTATION_NAMELESS:
             rText += ((const SfxBoolItem&)rItem).GetValue() ? aStrYes : aStrNo ;
-            break;
-            default:
-            {
-                // added to avoid warnings
-            }
-        }
         break;
 
         case ATTR_PAGE_GRID:
-        switch ( ePresentation )
-        {
-            case SFX_ITEM_PRESENTATION_COMPLETE:
             rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_GRID) + aStrSep;
-//          break; // DURCHFALLEN!!!
-            case SFX_ITEM_PRESENTATION_NAMELESS:
             rText += ((const SfxBoolItem&)rItem).GetValue() ? aStrYes : aStrNo ;
-            break;
-            default:
-            {
-                // added to avoid warnings
-            }
-        }
         break;
 
         case ATTR_PAGE_SCALETOPAGES:
@@ -909,29 +843,14 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
 
             if( nPagNo )
             {
-                switch ( ePresentation )
-                {
-                    case SFX_ITEM_PRESENTATION_COMPLETE:
-                    {
-                        rText = ScGlobal::GetRscString( STR_SCATTR_PAGE_SCALETOPAGES ) + aStrSep;
-                    }
-//                  break; // DURCHFALLEN!!!
-                    case SFX_ITEM_PRESENTATION_NAMELESS:
-                    {
-                        OUString aPages( ScGlobal::GetRscString( STR_SCATTR_PAGE_SCALE_PAGES ) );
-                        aPages = aPages.replaceFirst( "%1", OUString::number( nPagNo ) );
-                        rText += aPages;
-                    }
-                    break;
-                    default:
-                    {
-                        // added to avoid warnings
-                    }
-                }
+                rText = ScGlobal::GetRscString( STR_SCATTR_PAGE_SCALETOPAGES ) + aStrSep;
+                OUString aPages( ScGlobal::GetRscString( STR_SCATTR_PAGE_SCALE_PAGES ) );
+                aPages = aPages.replaceFirst( "%1", OUString::number( nPagNo ) );
+                rText += aPages;
             }
             else
             {
-                ePresentation = SFX_ITEM_PRESENTATION_NONE;
+                ePresentationRet = SFX_ITEM_PRESENTATION_NONE;
             }
         }
         break;
@@ -942,23 +861,12 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
 
             if( nPagNo )
             {
-                switch ( ePresentation )
-                {
-                    case SFX_ITEM_PRESENTATION_COMPLETE:
-                    rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_FIRSTPAGENO) + aStrSep;
-//                  break; // DURCHFALLEN!!!
-                    case SFX_ITEM_PRESENTATION_NAMELESS:
-                    rText += OUString::number( nPagNo );
-                    break;
-                    default:
-                    {
-                        // added to avoid warnings
-                    }
-                }
+                rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_FIRSTPAGENO) + aStrSep;
+                rText += OUString::number( nPagNo );
             }
             else
             {
-                ePresentation = SFX_ITEM_PRESENTATION_NONE;
+                ePresentationRet = SFX_ITEM_PRESENTATION_NONE;
             }
         }
         break;
@@ -969,24 +877,13 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
 
             if( nPercent )
             {
-                switch ( ePresentation )
-                {
-                    case SFX_ITEM_PRESENTATION_COMPLETE:
-                    rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_SCALE) + aStrSep;
-//                  break; // DURCHFALLEN!!!
-                    case SFX_ITEM_PRESENTATION_NAMELESS:
-                    rText = rText + unicode::formatPercent(nPercent,
-                        Application::GetSettings().GetUILanguageTag());
-                    break;
-                    default:
-                    {
-                        // added to avoid warnings
-                    }
-                }
+                rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_SCALE) + aStrSep;
+                rText = rText + unicode::formatPercent(nPercent,
+                    Application::GetSettings().GetUILanguageTag());
             }
             else
             {
-                ePresentation = SFX_ITEM_PRESENTATION_NONE;
+                ePresentationRet = SFX_ITEM_PRESENTATION_NONE;
             }
         }
         break;
@@ -995,7 +892,7 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
         {
             OUString  aBuffer;
 
-            if( lcl_HFPresentation( rItem, ePresentation, GetMetric( nW ), ePresentationMetric, aBuffer, pIntl ) != SFX_ITEM_PRESENTATION_NONE )
+            if( lcl_HFPresentation( rItem, SFX_ITEM_PRESENTATION_COMPLETE, GetMetric( nW ), ePresentationMetric, aBuffer, pIntl ) != SFX_ITEM_PRESENTATION_NONE )
             {
                 rText = ScGlobal::GetRscString(STR_HEADER) + " ( " + aBuffer + " ) ";
             }
@@ -1006,7 +903,7 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
         {
             OUString  aBuffer;
 
-            if( lcl_HFPresentation( rItem, ePresentation, GetMetric( nW ), ePresentationMetric, aBuffer, pIntl ) != SFX_ITEM_PRESENTATION_NONE )
+            if( lcl_HFPresentation( rItem, SFX_ITEM_PRESENTATION_COMPLETE, GetMetric( nW ), ePresentationMetric, aBuffer, pIntl ) != SFX_ITEM_PRESENTATION_NONE )
             {
                 rText = ScGlobal::GetRscString(STR_FOOTER) + " ( " + aBuffer + " ) ";
             }
@@ -1016,11 +913,11 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
         default:
             if ( !pIntl )
                 pIntl = ScGlobal::GetScIntlWrapper();
-            ePresentation = rItem.GetPresentation( ePresentation, GetMetric( nW ), ePresentationMetric, rText, pIntl );
+            ePresentationRet = rItem.GetPresentation( SFX_ITEM_PRESENTATION_COMPLETE, GetMetric( nW ), ePresentationMetric, rText, pIntl );
         break;
     }
 
-    return ePresentation;
+    return ePresentationRet;
 }
 
 SfxMapUnit ScDocumentPool::GetMetric( sal_uInt16 nWhich ) const
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 96c318b..5508499 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -507,14 +507,13 @@ const OUString& SfxItemPool::GetName() const
 SfxItemPresentation SfxItemPool::GetPresentation
 (
     const SfxPoolItem&  rItem,
-    SfxItemPresentation ePresent,
     SfxMapUnit          eMetric,
     OUString&           rText,
     const IntlWrapper * pIntlWrapper
 )   const
 {
     return rItem.GetPresentation(
-        ePresent, GetMetric(rItem.Which()), eMetric, rText, pIntlWrapper );
+        SFX_ITEM_PRESENTATION_COMPLETE, GetMetric(rItem.Which()), eMetric, rText, pIntlWrapper );
 }
 
 
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 369bebe..9d21234 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -343,8 +343,7 @@ OUString SfxStyleSheetBase::GetDescription( SfxMapUnit eMetric )
 
         if ( !IsInvalidItem( pItem ) &&
              pPool->GetPool().GetPresentation(
-                *pItem, SFX_ITEM_PRESENTATION_COMPLETE,
-                eMetric, aItemPresentation, &aIntlWrapper ) )
+                *pItem, eMetric, aItemPresentation, &aIntlWrapper ) )
         {
             if ( !aDesc.isEmpty() && !aItemPresentation.isEmpty() )
                 aDesc += " + ";
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index c3c3912..d59c090 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -2058,7 +2058,6 @@ OUString& SvxSearchDialog::BuildAttrText_Impl( OUString& rStr,
         {
             OUString aStr;
             rPool.GetPresentation( *rItem.pItem,
-                                    SFX_ITEM_PRESENTATION_COMPLETE,
                                     eMapUnit, aStr );
             rStr += aStr;
         }
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 6ba5925..0ddb215 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -396,7 +396,7 @@ SdrItemPool::~SdrItemPool()
 }
 
 SfxItemPresentation SdrItemPool::GetPresentation(
-              const SfxPoolItem& rItem, SfxItemPresentation ePresentation,
+              const SfxPoolItem& rItem,
               SfxMapUnit ePresentationMetric, OUString& rText,
               const IntlWrapper * pIntlWrapper) const
 {
@@ -411,10 +411,10 @@ SfxItemPresentation SdrItemPool::GetPresentation(
             TakeItemName(nWhich, aStr);
             rText = aStr + " " + rText;
 
-            return ePresentation;
+            return SFX_ITEM_PRESENTATION_COMPLETE;
         }
     }
-    return XOutdevItemPool::GetPresentation(rItem,ePresentation,ePresentationMetric,rText,pIntlWrapper);
+    return XOutdevItemPool::GetPresentation(rItem,ePresentationMetric,rText,pIntlWrapper);
 }
 
 void SdrItemPool::TakeItemName(sal_uInt16 nWhich, OUString& rItemName)
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 90c1713..7d0dfdc 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1569,7 +1569,6 @@ bool SwCrsrShell::GetContentAtPos( const Point& rPt,
                         {
                             OUString aStr;
                             GetDoc()->GetAttrPool().GetPresentation( *pItem,
-                                SFX_ITEM_PRESENTATION_COMPLETE,
                                 SFX_MAPUNIT_CM, aStr );
                             if (!sAttrs.isEmpty())
                                 sAttrs += ", ";
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index d74956e..7accf66 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -763,8 +763,7 @@ OUString  SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
                         OUString aItemPresentation;
                         if ( !IsInvalidItem( pItem ) &&
                              pPool->GetPool().GetPresentation(
-                                *pItem, SFX_ITEM_PRESENTATION_COMPLETE,
-                                eUnit, aItemPresentation, &aIntlWrapper ) )
+                                *pItem, eUnit, aItemPresentation, &aIntlWrapper ) )
                         {
                             if ( !aDesc.isEmpty() && !aItemPresentation.isEmpty() )
                                 aDesc += sPlus;
@@ -817,8 +816,7 @@ OUString  SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
                         OUString aItemPresentation;
                         if ( !IsInvalidItem( pItem ) &&
                              pPool->GetPool().GetPresentation(
-                                *pItem, SFX_ITEM_PRESENTATION_COMPLETE,
-                                eUnit, aItemPresentation, &aIntlWrapper ) )
+                                *pItem, eUnit, aItemPresentation, &aIntlWrapper ) )
                         {
                             bool bIsDefault = false;
                             switch ( pItem->Which() )
commit f2940a4bfffec5bc34fb03cb32205bff4708a027
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jul 21 14:01:05 2014 +0200

    rename SfxItemDesruptor -> SfxItemDisruptor
    
    Change-Id: I7cc9fa3ab6aebc541df4708e29b530f8021b14ba

diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index 8878355..5a6d456 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -157,7 +157,7 @@ class SfxItemSet;
 class SVL_DLLPUBLIC SfxPoolItem
 {
 friend class SfxItemPool;
-friend class SfxItemDesruptor_Impl;
+friend class SfxItemDisruptor_Impl;
 friend class SfxItemPoolCache;
 friend class SfxItemSet;
 friend class SfxVoidItem;
diff --git a/svtools/source/misc/itemdel.cxx b/svtools/source/misc/itemdel.cxx
index b1c7719..7645089 100644
--- a/svtools/source/misc/itemdel.cxx
+++ b/svtools/source/misc/itemdel.cxx
@@ -28,7 +28,7 @@
 
 #include <svl/itempool.hxx>
 
-class SfxItemDesruptor_Impl: private boost::noncopyable
+class SfxItemDisruptor_Impl: private boost::noncopyable
 {
     SfxPoolItem *pItem;
     Link         aLink;
@@ -37,27 +37,27 @@ private:
     DECL_LINK( Delete, void* );
 
 public:
-    SfxItemDesruptor_Impl( SfxPoolItem *pItemToDesrupt );
+    SfxItemDisruptor_Impl( SfxPoolItem *pItemToDesrupt );
     void LaunchDeleteOnIdle();
-    ~SfxItemDesruptor_Impl();
+    ~SfxItemDisruptor_Impl();
 };
 
-SfxItemDesruptor_Impl::SfxItemDesruptor_Impl( SfxPoolItem *pItemToDesrupt ):
+SfxItemDisruptor_Impl::SfxItemDisruptor_Impl( SfxPoolItem *pItemToDesrupt ):
     pItem(pItemToDesrupt),
-    aLink( LINK(this, SfxItemDesruptor_Impl, Delete) )
+    aLink( LINK(this, SfxItemDisruptor_Impl, Delete) )
 {
 
     DBG_ASSERT( 0 == pItem->GetRefCount(), "disrupting pooled item" );
     pItem->SetKind( SFX_ITEMS_DELETEONIDLE );
 }
 
-void SfxItemDesruptor_Impl::LaunchDeleteOnIdle()
+void SfxItemDisruptor_Impl::LaunchDeleteOnIdle()
 {
     // process in Idle
     Application::InsertIdleHdl( aLink, 1 );
 }
 
-SfxItemDesruptor_Impl::~SfxItemDesruptor_Impl()
+SfxItemDisruptor_Impl::~SfxItemDisruptor_Impl()
 {
 
     // remove from Idle-Handler
@@ -69,7 +69,7 @@ SfxItemDesruptor_Impl::~SfxItemDesruptor_Impl()
     delete pItem;
 }
 
-IMPL_LINK_NOARG(SfxItemDesruptor_Impl, Delete)
+IMPL_LINK_NOARG(SfxItemDisruptor_Impl, Delete)
 {
     delete this;
     return 0;
@@ -78,7 +78,7 @@ IMPL_LINK_NOARG(SfxItemDesruptor_Impl, Delete)
 void DeleteItemOnIdle(SfxPoolItem* pItem)
 {
     DBG_ASSERT( 0 == pItem->GetRefCount(), "deleting item in use" );
-    SfxItemDesruptor_Impl *pDesruptor = new SfxItemDesruptor_Impl(pItem);
+    SfxItemDisruptor_Impl *pDesruptor = new SfxItemDisruptor_Impl(pItem);
     pDesruptor->LaunchDeleteOnIdle();
 }
 
commit dc0af9ef8eb00170997181c2adddbe93315486c7
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jul 21 12:23:23 2014 +0200

    mark m_nRefCount in SfxPoolItem as mutable
    
    so that we don't have to const-cast when modifying it
    
    Change-Id: If584e4ddd440638169af00493f0194b34832177f

diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index e3243e2..8878355 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -162,7 +162,7 @@ friend class SfxItemPoolCache;
 friend class SfxItemSet;
 friend class SfxVoidItem;
 
-    sal_uLong   m_nRefCount;
+    mutable sal_uLong   m_nRefCount;
     sal_uInt16  m_nWhich;
     sal_uInt16  m_nKind;
 
@@ -274,14 +274,14 @@ inline void SfxPoolItem::AddRef( sal_uLong n ) const
 {
     DBG_ASSERT(m_nRefCount <= SFX_ITEMS_MAXREF, "AddRef with non-Pool-Item");
     DBG_ASSERT(ULONG_MAX - m_nRefCount > n, "AddRef: refcount overflow");
-    const_cast<SfxPoolItem *>(this)->m_nRefCount += n;
+    m_nRefCount += n;
 }
 
 inline sal_uLong SfxPoolItem::ReleaseRef( sal_uLong n ) const
 {
     DBG_ASSERT(m_nRefCount <= SFX_ITEMS_MAXREF, "AddRef with non-Pool-Item");
     DBG_ASSERT(m_nRefCount >= n, "AddRef: refcount underflow");
-    const_cast<SfxPoolItem *>(this)->m_nRefCount -= n;
+    m_nRefCount -= n;
     return m_nRefCount;
 }
 
commit 0361eb7c20db4eba051ad5593c63b69f3565e488
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jul 21 12:18:47 2014 +0200

    remove unused return type from SfxItemPool::AddRef
    
    Change-Id: Ideb690df8a74efe55bff832e16e66a6b77b1530a

diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx
index 77e43a5..edff191 100644
--- a/include/svl/itempool.hxx
+++ b/include/svl/itempool.hxx
@@ -87,7 +87,7 @@ public:
 
 protected:
     static inline void              SetRefCount( SfxPoolItem& rItem, sal_uLong n );
-    static inline sal_uLong         AddRef( const SfxPoolItem& rItem, sal_uLong n = 1 );
+    static inline void              AddRef( const SfxPoolItem& rItem, sal_uLong n = 1 );
     static inline sal_uLong         ReleaseRef( const SfxPoolItem& rItem, sal_uLong n = 1);
     static inline void              SetKind( SfxPoolItem& rItem, sal_uInt16 nRef );
 
@@ -228,9 +228,9 @@ inline void SfxItemPool::SetRefCount( SfxPoolItem& rItem, sal_uLong n )
 }
 
 // only the pool may manipulate the reference counts
-inline sal_uLong SfxItemPool::AddRef( const SfxPoolItem& rItem, sal_uLong n )
+inline void SfxItemPool::AddRef( const SfxPoolItem& rItem, sal_uLong n )
 {
-    return rItem.AddRef(n);
+    rItem.AddRef(n);
 }
 
 // only the pool may manipulate the reference counts
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index 0d438a9..e3243e2 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -170,7 +170,7 @@ private:
     inline void              SetRefCount( sal_uLong n );
     inline void              SetKind( sal_uInt16 n );
 public:
-    inline sal_uLong         AddRef( sal_uLong n = 1 ) const;
+    inline void              AddRef( sal_uLong n = 1 ) const;
 private:
     inline sal_uLong         ReleaseRef( sal_uLong n = 1 ) const;
 
@@ -270,11 +270,11 @@ inline void SfxPoolItem::SetKind( sal_uInt16 n )
     m_nKind = n;
 }
 
-inline sal_uLong SfxPoolItem::AddRef( sal_uLong n ) const
+inline void SfxPoolItem::AddRef( sal_uLong n ) const
 {
     DBG_ASSERT(m_nRefCount <= SFX_ITEMS_MAXREF, "AddRef with non-Pool-Item");
     DBG_ASSERT(ULONG_MAX - m_nRefCount > n, "AddRef: refcount overflow");
-    return (const_cast<SfxPoolItem *>(this)->m_nRefCount += n);
+    const_cast<SfxPoolItem *>(this)->m_nRefCount += n;
 }
 
 inline sal_uLong SfxPoolItem::ReleaseRef( sal_uLong n ) const
commit b0a13b78e7b381cfc9d06a4a351d5d345e15e557
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jul 21 12:14:05 2014 +0200

    remove unused SfxPoolItem::Delete_Impl method
    
    Change-Id: Idb20e9acd97a27801ff95dc53d3e179326c122d4

diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index af8e405..0d438a9 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -173,7 +173,6 @@ public:
     inline sal_uLong         AddRef( sal_uLong n = 1 ) const;
 private:
     inline sal_uLong         ReleaseRef( sal_uLong n = 1 ) const;
-    SVL_DLLPRIVATE long      Delete_Impl(void*);
 
 protected:
                              explicit SfxPoolItem( sal_uInt16 nWhich = 0 );
commit 331132b4cb5717ec0177ef89bc90ef1f474dfea7
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jul 21 12:08:13 2014 +0200

    comments and code formatting in SfxPoolItem
    
    Change-Id: Ibf7b2f5e93748198eccbbbf54fad5f8053270003

diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx
index 6960d5e..77e43a5 100644
--- a/include/svl/itempool.hxx
+++ b/include/svl/itempool.hxx
@@ -119,12 +119,12 @@ public:
     virtual SfxMapUnit              GetMetric( sal_uInt16 nWhich ) const;
     void                            SetDefaultMetric( SfxMapUnit eNewMetric );
 
-    /** Request string representation of pool items
+    /** Request string representation of pool items.
 
-        This virtual function produces a string representation, of
+        This virtual function produces a string representation
         from the respective SfxItemPool subclass' known SfxPoolItems.
 
-        Subclasses, please overwrite this method, and handle
+        Subclasses, please override this method, and handle
         SfxPoolItems that don't return useful/complete information on
         SfxPoolItem::GetPresentation()
 
@@ -147,10 +147,9 @@ public:
                                         SfxItemPresentation ePresentation,
                                         SfxMapUnit          ePresentationMetric,
                                         OUString&           rText,
-                                        const IntlWrapper * pIntlWrapper
-                                         = 0 ) const;
+                                        const IntlWrapper * pIntlWrapper = 0 ) const;
     virtual SfxItemPool*            Clone() const;
-    const OUString&            GetName() const;
+    const OUString&                 GetName() const;
 
     virtual const SfxPoolItem&      Put( const SfxPoolItem&, sal_uInt16 nWhich = 0 );
     virtual void                    Remove( const SfxPoolItem& );
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index e61e13c..af8e405 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -170,9 +170,9 @@ private:
     inline void              SetRefCount( sal_uLong n );
     inline void              SetKind( sal_uInt16 n );
 public:
-    inline sal_uLong             AddRef( sal_uLong n = 1 ) const;
+    inline sal_uLong         AddRef( sal_uLong n = 1 ) const;
 private:
-    inline sal_uLong             ReleaseRef( sal_uLong n = 1 ) const;
+    inline sal_uLong         ReleaseRef( sal_uLong n = 1 ) const;
     SVL_DLLPRIVATE long      Delete_Impl(void*);
 
 protected:
@@ -184,7 +184,7 @@ public:
     virtual                  ~SfxPoolItem();
 
     void                     SetWhich( sal_uInt16 nId ) { m_nWhich = nId; }
-    sal_uInt16                   Which() const { return m_nWhich; }
+    sal_uInt16               Which() const { return m_nWhich; }
     virtual bool             operator==( const SfxPoolItem& ) const = 0;
     bool                     operator!=( const SfxPoolItem& rItem ) const
                              { return !(*this == rItem); }
@@ -197,7 +197,7 @@ public:
                                     OUString &rText,
                                     const IntlWrapper * pIntlWrapper = 0 ) const;
 
-    virtual sal_uInt16           GetVersion( sal_uInt16 nFileFormatVersion ) const;
+    virtual sal_uInt16       GetVersion( sal_uInt16 nFileFormatVersion ) const;
     virtual bool             ScaleMetrics( long lMult, long lDiv );
     virtual bool             HasMetrics() const;
 
@@ -208,8 +208,8 @@ public:
     virtual SvStream&        Store( SvStream &, sal_uInt16 nItemVersion ) const;
     virtual SfxPoolItem*     Clone( SfxItemPool *pPool = 0 ) const = 0;
 
-    sal_uLong                    GetRefCount() const { return m_nRefCount; }
-    inline sal_uInt16            GetKind() const { return m_nKind; }
+    sal_uLong                GetRefCount() const { return m_nRefCount; }
+    inline sal_uInt16        GetKind() const { return m_nKind; }
 
     /** Read in a Unicode string from a streamed byte string representation.
 
@@ -254,7 +254,7 @@ public:
                                    const OUString& rString);
 
 private:
-    SfxPoolItem&             operator=( const SfxPoolItem& );    // n.i.!!
+    SfxPoolItem&             operator=( const SfxPoolItem& );    // not implemented!!
 };
 
 
@@ -333,7 +333,7 @@ public:
                                     OUString &rText,
                                     const IntlWrapper * = 0 ) const SAL_OVERRIDE;
 
-    // von sich selbst eine Kopie erzeugen
+    // create a copy of itself
     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
             void            SetWhich(sal_uInt16 nWh) { m_nWhich = nWh; }
 };
@@ -361,7 +361,7 @@ public:
                                     OUString &rText,
                                     const IntlWrapper * = 0 ) const SAL_OVERRIDE;
 
-    // von sich selbst eine Kopie erzeugen
+    // create a copy of itself
     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE = 0;
     virtual SfxPoolItem*    Create(SvStream &, sal_uInt16 nVersion) const SAL_OVERRIDE = 0;
     virtual SvStream&       Store(SvStream &, sal_uInt16 nVer) const SAL_OVERRIDE;
@@ -373,12 +373,12 @@ public:
 };
 
 
-// Handle Klasse fuer PoolItems
+// Handle class for PoolItems
 
 class SVL_DLLPUBLIC SfxItemHandle
 {
     sal_uInt16      *pRef;
-    SfxPoolItem *pItem;
+    SfxPoolItem     *pItem;
 public:
     explicit SfxItemHandle( SfxPoolItem& );
     SfxItemHandle( const SfxItemHandle& );
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
index e1c4b0f8..38c7437 100644
--- a/svl/source/items/poolitem.cxx
+++ b/svl/source/items/poolitem.cxx
@@ -144,7 +144,7 @@ bool SfxPoolItem::operator==( const SfxPoolItem& rCmp ) const
 
 SfxPoolItem* SfxPoolItem::Create(SvStream &, sal_uInt16) const
 {
-    return Clone(0);
+    return Clone();
 }
 
 
@@ -284,7 +284,7 @@ SfxPoolItem* SfxVoidItem::Clone(SfxItemPool *) const
 // SfxItemHandle ----------------------------------------------------------
 SfxItemHandle::SfxItemHandle(SfxPoolItem &rItem):
     pRef(new sal_uInt16(1)),
-    pItem(rItem.Clone(0))
+    pItem(rItem.Clone())
 {
 }
 
commit 7be041309cf339b64827eee064421eaa2d3b9939
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jul 21 12:06:35 2014 +0200

    remove SFX_ITEM_PRESENTATION_NAMEONLY
    
    since it is unused
    
    Change-Id: Ib739240a362eeff6a72b2300804583b575edfb24

diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index 5a31571..e61e13c 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -125,7 +125,6 @@ enum SfxItemPresentation
 
 {
     SFX_ITEM_PRESENTATION_NONE,
-    SFX_ITEM_PRESENTATION_NAMEONLY,
     SFX_ITEM_PRESENTATION_NAMELESS,
     SFX_ITEM_PRESENTATION_COMPLETE
 };
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 07e3f29..5ff9f05 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -1040,10 +1040,6 @@ SfxItemPresentation ScPageScaleToItem::GetPresentation(
         case SFX_ITEM_PRESENTATION_NONE:
         break;
 
-        case SFX_ITEM_PRESENTATION_NAMEONLY:
-            rText = aName;
-        break;
-
         case SFX_ITEM_PRESENTATION_NAMELESS:
             rText = aValue;
         break;


More information about the Libreoffice-commits mailing list