[Libreoffice-commits] .: sc/source svl/inc svl/source sw/source

Kohei Yoshida kohei at kemper.freedesktop.org
Tue Feb 7 08:19:10 PST 2012


 sc/source/ui/app/scmod.cxx                  |   38 +++++++++++++-------------
 sc/source/ui/docshell/docsh4.cxx            |   16 +++++------
 sc/source/ui/drawfunc/fuins2.cxx            |    4 +-
 sc/source/ui/optdlg/tpcompatibility.cxx     |    2 -
 sc/source/ui/pagedlg/scuitphfedit.cxx       |    2 -
 sc/source/ui/view/cellsh1.cxx               |   40 ++++++++++++++--------------
 sc/source/ui/view/cellsh4.cxx               |    8 ++---
 sc/source/ui/view/tabvwsh3.cxx              |    4 +-
 sc/source/ui/view/tabvwshf.cxx              |   24 ++++++++--------
 svl/inc/svl/itemset.hxx                     |    2 -
 svl/source/items/itemset.cxx                |    8 ++---
 sw/source/filter/ww8/rtfattributeoutput.cxx |    6 ++--
 12 files changed, 77 insertions(+), 77 deletions(-)

New commits:
commit 8e6e880949b3f603c3d26ab5467cb417b92ae2be
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Tue Feb 7 11:18:31 2012 -0500

    Have SfxItemSet::HasItem take an optional pointer-to-pointer.
    
    To make it clear that the second argument is optional.

diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 7072387..2b84ace 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -994,26 +994,26 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
 
     //  Linguistik nicht mehr
 
-    if (rOptSet.HasItem(SID_ATTR_METRIC, pItem))
+    if (rOptSet.HasItem(SID_ATTR_METRIC, &pItem))
     {
         PutItem( *pItem );
         pAppCfg->SetAppMetric( (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue() );
         bSaveAppOptions = sal_True;
     }
 
-    if (rOptSet.HasItem(SCITEM_USERLIST, pItem))
+    if (rOptSet.HasItem(SCITEM_USERLIST, &pItem))
     {
         ScGlobal::SetUserList( ((const ScUserListItem*)pItem)->GetUserList() );
         bSaveAppOptions = sal_True;
     }
 
-    if (rOptSet.HasItem(SID_SC_OPT_SYNCZOOM, pItem))
+    if (rOptSet.HasItem(SID_SC_OPT_SYNCZOOM, &pItem))
     {
         pAppCfg->SetSynchronizeZoom( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
         bSaveAppOptions = sal_True;
     }
 
-    if (rOptSet.HasItem(SID_SC_OPT_KEY_BINDING_COMPAT, pItem))
+    if (rOptSet.HasItem(SID_SC_OPT_KEY_BINDING_COMPAT, &pItem))
     {
         sal_uInt16 nVal = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
         ScOptionsUtil::KeyBindingType eOld = pAppCfg->GetKeyBindingType();
@@ -1030,7 +1030,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
     // ViewOptions
     //============================================
 
-    if (rOptSet.HasItem(SID_SCVIEWOPTIONS, pItem))
+    if (rOptSet.HasItem(SID_SCVIEWOPTIONS, &pItem))
     {
         const ScViewOptions& rNewOpt = ((const ScTpViewItem*)pItem)->GetViewOptions();
 
@@ -1062,7 +1062,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
     // da GridOptions Member der ViewOptions ist!
     //============================================
 
-    if ( rOptSet.HasItem(SID_ATTR_GRID_OPTIONS,pItem) )
+    if ( rOptSet.HasItem(SID_ATTR_GRID_OPTIONS,&pItem) )
     {
         ScGridOptions aNewGridOpt( (const SvxOptionsGrid&)((const SvxGridItem&)*pItem) );
 
@@ -1096,7 +1096,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
     // DocOptions
     //============================================
 
-    if ( rOptSet.HasItem(SID_SCDOCOPTIONS,pItem) )
+    if ( rOptSet.HasItem(SID_SCDOCOPTIONS,&pItem) )
     {
         const ScDocOptions& rNewOpt = ((const ScTpCalcItem*)pItem)->GetDocOptions();
 
@@ -1124,7 +1124,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
     }
 
     // nach den eigentlichen DocOptions auch noch die TabDistance setzen
-    if ( rOptSet.HasItem(SID_ATTR_DEFTABSTOP,pItem) )
+    if ( rOptSet.HasItem(SID_ATTR_DEFTABSTOP,&pItem) )
     {
         sal_uInt16 nTabDist = ((SfxUInt16Item*)pItem)->GetValue();
         ScDocOptions aOpt(GetDocOptions());
@@ -1144,7 +1144,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
 
     //  AutoSpell nach den Doc-Options (weil Member)
 
-    if ( rOptSet.HasItem(SID_AUTOSPELL_CHECK,pItem) )              // an Doc-Options
+    if ( rOptSet.HasItem(SID_AUTOSPELL_CHECK,&pItem) )              // an Doc-Options
     {
         sal_Bool bDoAutoSpell = ((const SfxBoolItem*)pItem)->GetValue();
 
@@ -1190,43 +1190,43 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
     // InputOptions
     //============================================
 
-    if ( rOptSet.HasItem(SID_SC_INPUT_SELECTIONPOS,pItem) )
+    if ( rOptSet.HasItem(SID_SC_INPUT_SELECTIONPOS,&pItem) )
     {
         pInputCfg->SetMoveDir( ((const SfxUInt16Item*)pItem)->GetValue() );
         bSaveInputOptions = sal_True;
     }
-    if ( rOptSet.HasItem(SID_SC_INPUT_SELECTION,pItem) )
+    if ( rOptSet.HasItem(SID_SC_INPUT_SELECTION,&pItem) )
     {
         pInputCfg->SetMoveSelection( ((const SfxBoolItem*)pItem)->GetValue() );
         bSaveInputOptions = sal_True;
     }
-    if ( rOptSet.HasItem(SID_SC_INPUT_EDITMODE,pItem) )
+    if ( rOptSet.HasItem(SID_SC_INPUT_EDITMODE,&pItem) )
     {
         pInputCfg->SetEnterEdit( ((const SfxBoolItem*)pItem)->GetValue() );
         bSaveInputOptions = sal_True;
     }
-    if ( rOptSet.HasItem(SID_SC_INPUT_FMT_EXPAND,pItem) )
+    if ( rOptSet.HasItem(SID_SC_INPUT_FMT_EXPAND,&pItem) )
     {
         pInputCfg->SetExtendFormat( ((const SfxBoolItem*)pItem)->GetValue() );
         bSaveInputOptions = sal_True;
     }
-    if ( rOptSet.HasItem(SID_SC_INPUT_RANGEFINDER,pItem) )
+    if ( rOptSet.HasItem(SID_SC_INPUT_RANGEFINDER,&pItem) )
     {
         pInputCfg->SetRangeFinder( ((const SfxBoolItem*)pItem)->GetValue() );
         bSaveInputOptions = sal_True;
     }
-    if ( rOptSet.HasItem(SID_SC_INPUT_REF_EXPAND,pItem) )
+    if ( rOptSet.HasItem(SID_SC_INPUT_REF_EXPAND,&pItem) )
     {
         pInputCfg->SetExpandRefs( ((const SfxBoolItem*)pItem)->GetValue() );
         bSaveInputOptions = sal_True;
     }
-    if ( rOptSet.HasItem(SID_SC_INPUT_MARK_HEADER,pItem) )
+    if ( rOptSet.HasItem(SID_SC_INPUT_MARK_HEADER,&pItem) )
     {
         pInputCfg->SetMarkHeader( ((const SfxBoolItem*)pItem)->GetValue() );
         bSaveInputOptions = sal_True;
         bUpdateMarks = sal_True;
     }
-    if ( rOptSet.HasItem(SID_SC_INPUT_TEXTWYSIWYG,pItem) )
+    if ( rOptSet.HasItem(SID_SC_INPUT_TEXTWYSIWYG,&pItem) )
     {
         sal_Bool bNew = ((const SfxBoolItem*)pItem)->GetValue();
         if ( bNew != pInputCfg->GetTextWysiwyg() )
@@ -1236,7 +1236,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
             bUpdateRefDev = sal_True;
         }
     }
-    if( rOptSet.HasItem( SID_SC_INPUT_REPLCELLSWARN, pItem ) )
+    if( rOptSet.HasItem( SID_SC_INPUT_REPLCELLSWARN, &pItem ) )
     {
         pInputCfg->SetReplaceCellsWarn( ((const SfxBoolItem*)pItem)->GetValue() );
         bSaveInputOptions = sal_True;
@@ -1246,7 +1246,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
     // PrintOptions
     //============================================
 
-    if ( rOptSet.HasItem(SID_SCPRINTOPTIONS,pItem) )
+    if ( rOptSet.HasItem(SID_SCPRINTOPTIONS,&pItem) )
     {
         const ScPrintOptions& rNewOpt = ((const ScTpPrintItem*)pItem)->GetPrintOptions();
         SetPrintOptions( rNewOpt );
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 7718b42..8b527f5 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -156,10 +156,10 @@ void ScDocShell::Execute( SfxRequest& rReq )
             const SfxPoolItem* pRowItem;
             const SfxPoolItem* pTabItem;
             const SfxPoolItem* pTextItem;
-            if( pReqArgs && pReqArgs->HasItem( FN_PARAM_1, pColItem ) &&
-                            pReqArgs->HasItem( FN_PARAM_2, pRowItem ) &&
-                            pReqArgs->HasItem( FN_PARAM_3, pTabItem ) &&
-                            pReqArgs->HasItem( SID_SC_SETTEXT, pTextItem ) )
+            if( pReqArgs && pReqArgs->HasItem( FN_PARAM_1, &pColItem ) &&
+                            pReqArgs->HasItem( FN_PARAM_2, &pRowItem ) &&
+                            pReqArgs->HasItem( FN_PARAM_3, &pTabItem ) &&
+                            pReqArgs->HasItem( SID_SC_SETTEXT, &pTextItem ) )
             {
                 //  Parameter sind 1-based !!!
                 SCCOL nCol = ((SfxInt16Item*)pColItem)->GetValue() - 1;
@@ -288,18 +288,18 @@ void ScDocShell::Execute( SfxRequest& rReq )
                 sal_Bool bRowInit = false;
                 sal_Bool bAddRange = (nSlot == SID_CHART_ADDSOURCE);
 
-                if( pReqArgs->HasItem( SID_CHART_NAME, pItem ) )
+                if( pReqArgs->HasItem( SID_CHART_NAME, &pItem ) )
                     aChartName = ((const SfxStringItem*)pItem)->GetValue();
 
-                if( pReqArgs->HasItem( SID_CHART_SOURCE, pItem ) )
+                if( pReqArgs->HasItem( SID_CHART_SOURCE, &pItem ) )
                     aRangeName = ((const SfxStringItem*)pItem)->GetValue();
 
-                if( pReqArgs->HasItem( FN_PARAM_1, pItem ) )
+                if( pReqArgs->HasItem( FN_PARAM_1, &pItem ) )
                 {
                     bColHeaders = ((const SfxBoolItem*)pItem)->GetValue();
                     bColInit = sal_True;
                 }
-                if( pReqArgs->HasItem( FN_PARAM_2, pItem ) )
+                if( pReqArgs->HasItem( FN_PARAM_2, &pItem ) )
                 {
                     bRowHeaders = ((const SfxBoolItem*)pItem)->GetValue();
                     bRowInit = sal_True;
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 4cbf062..aa65b51 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -502,7 +502,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
         if( pReqArgs )
         {
             const SfxPoolItem* pItem;
-            if( pReqArgs->HasItem( FN_PARAM_5, pItem ) )
+            if( pReqArgs->HasItem( FN_PARAM_5, &pItem ) )
             aRangeString = ::rtl::OUString( ((const SfxStringItem*)pItem)->GetValue());
 
             aPositionRange = pViewSh->GetViewData()->GetCurPos();
@@ -602,7 +602,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView*
             const SfxPoolItem* pItem;
             sal_uInt16 nToTable = 0;
 
-            if( pReqArgs->HasItem( FN_PARAM_4, pItem ) )
+            if( pReqArgs->HasItem( FN_PARAM_4, &pItem ) )
             {
                 if ( pItem->ISA( SfxUInt16Item ) )
                     nToTable = ((const SfxUInt16Item*)pItem)->GetValue();
diff --git a/sc/source/ui/optdlg/tpcompatibility.cxx b/sc/source/ui/optdlg/tpcompatibility.cxx
index f94fa99..32b3e12 100644
--- a/sc/source/ui/optdlg/tpcompatibility.cxx
+++ b/sc/source/ui/optdlg/tpcompatibility.cxx
@@ -69,7 +69,7 @@ sal_Bool ScTpCompatOptions::FillItemSet(SfxItemSet &rCoreAttrs)
 void ScTpCompatOptions::Reset(const SfxItemSet &rCoreAttrs)
 {
     const SfxPoolItem* pItem;
-    if (rCoreAttrs.HasItem(SID_SC_OPT_KEY_BINDING_COMPAT, pItem))
+    if (rCoreAttrs.HasItem(SID_SC_OPT_KEY_BINDING_COMPAT, &pItem))
     {
         const SfxUInt16Item* p16Item = static_cast<const SfxUInt16Item*>(pItem);
         ScOptionsUtil::KeyBindingType eKeyB =
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 3b78edf..603a742 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -164,7 +164,7 @@ void ScHFEditPage::SetNumType(SvxNumType eNumType)
 void ScHFEditPage::Reset( const SfxItemSet& rCoreSet )
 {
     const SfxPoolItem* pItem = NULL;
-    if ( rCoreSet.HasItem(nWhich, pItem) )
+    if ( rCoreSet.HasItem(nWhich, &pItem) )
     {
         const ScPageHFItem& rItem = static_cast<const ScPageHFItem&>(*pItem);
 
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 0b71f25..c7a8024 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -199,7 +199,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                     const SfxPoolItem* pItem;
                     String aFlags;
 
-                    if( pReqArgs->HasItem( FID_INS_CELL, pItem ) )
+                    if( pReqArgs->HasItem( FID_INS_CELL, &pItem ) )
                         aFlags = ((const SfxStringItem*)pItem)->GetValue();
                     if( aFlags.Len() )
                     {
@@ -269,7 +269,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                     const SfxPoolItem* pItem;
                     String aFlags;
 
-                    if( pReqArgs->HasItem( FID_DELETE_CELL, pItem ) )
+                    if( pReqArgs->HasItem( FID_DELETE_CELL, &pItem ) )
                         aFlags = ((const SfxStringItem*)pItem)->GetValue();
                     if( aFlags.Len() )
                     {
@@ -352,7 +352,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                     const   SfxPoolItem* pItem;
                     String  aFlags = 'A';
 
-                    if( pReqArgs->HasItem( SID_DELETE, pItem ) )
+                    if( pReqArgs->HasItem( SID_DELETE, &pItem ) )
                         aFlags = ((const SfxStringItem*)pItem)->GetValue();
 
                     aFlags.ToUpperAscii();
@@ -466,7 +466,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                     const   SfxPoolItem* pItem;
                     String  aFlags = 'A';
 
-                    if( pReqArgs->HasItem( FID_FILL_TAB, pItem ) )
+                    if( pReqArgs->HasItem( FID_FILL_TAB, &pItem ) )
                         aFlags = ((const SfxStringItem*)pItem)->GetValue();
 
                     aFlags.ToUpperAscii();
@@ -585,17 +585,17 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 
                     bDoIt=false;
 
-                    if( pReqArgs->HasItem( FID_FILL_SERIES, pItem ) )
+                    if( pReqArgs->HasItem( FID_FILL_SERIES, &pItem ) )
                         aFillDir = ((const SfxStringItem*)pItem)->GetValue();
-                    if( pReqArgs->HasItem( FN_PARAM_1, pItem ) )
+                    if( pReqArgs->HasItem( FN_PARAM_1, &pItem ) )
                         aFillCmd = ((const SfxStringItem*)pItem)->GetValue();
-                    if( pReqArgs->HasItem( FN_PARAM_2, pItem ) )
+                    if( pReqArgs->HasItem( FN_PARAM_2, &pItem ) )
                         aFillDateCmd = ((const SfxStringItem*)pItem)->GetValue();
-                    if( pReqArgs->HasItem( FN_PARAM_3, pItem ) )
+                    if( pReqArgs->HasItem( FN_PARAM_3, &pItem ) )
                         aFillStep = ((const SfxStringItem*)pItem)->GetValue();
-                    if( pReqArgs->HasItem( FN_PARAM_4, pItem ) )
+                    if( pReqArgs->HasItem( FN_PARAM_4, &pItem ) )
                         aFillStart = ((const SfxStringItem*)pItem)->GetValue();
-                    if( pReqArgs->HasItem( FN_PARAM_5, pItem ) )
+                    if( pReqArgs->HasItem( FN_PARAM_5, &pItem ) )
                         aFillMax = ((const SfxStringItem*)pItem)->GetValue();
 
                     if( aFillDir.Len() )
@@ -836,7 +836,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                 {
                     const SfxPoolItem* pItem;
 
-                    if( pReqArgs->HasItem( FID_FILL_AUTO, pItem ) )
+                    if( pReqArgs->HasItem( FID_FILL_AUTO, &pItem ) )
                     {
                         ScAddress aScAddress;
                         String aArg = ((const SfxStringItem*)pItem)->GetValue();
@@ -1027,7 +1027,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                     const SfxPoolItem* pItem;
                     bOk = false;
 
-                    if( pReqArgs->HasItem( SID_OUTLINE_MAKE, pItem ) )
+                    if( pReqArgs->HasItem( SID_OUTLINE_MAKE, &pItem ) )
                     {
                         String aCol = ((const SfxStringItem*)pItem)->GetValue();
                         aCol.ToUpperAscii();
@@ -1089,7 +1089,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                     const SfxPoolItem* pItem;
                     bOk = false;
 
-                    if( pReqArgs->HasItem( SID_OUTLINE_REMOVE, pItem ) )
+                    if( pReqArgs->HasItem( SID_OUTLINE_REMOVE, &pItem ) )
                     {
                         String aCol = ((const SfxStringItem*)pItem)->GetValue();
                         aCol.ToUpperAscii();
@@ -1230,7 +1230,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                         const   SfxPoolItem* pItem;
                         String  aFlags = 'A';
 
-                        if( pReqArgs->HasItem( FID_INS_CELL_CONTENTS, pItem ) )
+                        if( pReqArgs->HasItem( FID_INS_CELL_CONTENTS, &pItem ) )
                             aFlags = ((const SfxStringItem*)pItem)->GetValue();
 
                         aFlags.ToUpperAscii();
@@ -1715,13 +1715,13 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                 const SfxPoolItem* pItem;
                 String  aName, aSymbol, aAttrib;
 
-                if( pReqArgs->HasItem( FID_DEFINE_NAME, pItem ) )
+                if( pReqArgs->HasItem( FID_DEFINE_NAME, &pItem ) )
                     aName = ((const SfxStringItem*)pItem)->GetValue();
 
-                if( pReqArgs->HasItem( FN_PARAM_1, pItem ) )
+                if( pReqArgs->HasItem( FN_PARAM_1, &pItem ) )
                     aSymbol = ((const SfxStringItem*)pItem)->GetValue();
 
-                if( pReqArgs->HasItem( FN_PARAM_2, pItem ) )
+                if( pReqArgs->HasItem( FN_PARAM_2, &pItem ) )
                     aAttrib = ((const SfxStringItem*)pItem)->GetValue();
 
                 if ( aName.Len() && aSymbol.Len() )
@@ -1772,7 +1772,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                 {
                     const SfxPoolItem* pItem;
 
-                    if( pReqArgs->HasItem( SID_UPDATECHART, pItem ) )
+                    if( pReqArgs->HasItem( SID_UPDATECHART, &pItem ) )
                         bAll = ((const SfxBoolItem*)pItem)->GetValue();
                 }
 
@@ -2008,7 +2008,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
             if( pReqArgs )
             {
                 const SfxPoolItem* pItem;
-                if( pReqArgs->HasItem( SID_HYPERLINK_SETLINK, pItem ) )
+                if( pReqArgs->HasItem( SID_HYPERLINK_SETLINK, &pItem ) )
                 {
                     const SvxHyperlinkItem* pHyper = (const SvxHyperlinkItem*) pItem;
                     const String& rName   = pHyper->GetName();
@@ -2028,7 +2028,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
             if( pReqArgs )
             {
                 const SfxPoolItem* pItem;
-                if( pReqArgs->HasItem( FID_CONDITIONAL_FORMAT, pItem ) )
+                if( pReqArgs->HasItem( FID_CONDITIONAL_FORMAT, &pItem ) )
                 {
                     // when RefInput has switched to other tabs as data table, switch back
                     if ( GetViewData()->GetTabNo() != GetViewData()->GetRefTabNo() )
diff --git a/sc/source/ui/view/cellsh4.cxx b/sc/source/ui/view/cellsh4.cxx
index 1e65f43..839dc84 100644
--- a/sc/source/ui/view/cellsh4.cxx
+++ b/sc/source/ui/view/cellsh4.cxx
@@ -63,9 +63,9 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
     if ( pReqArgs != NULL )
     {
         const   SfxPoolItem* pItem;
-        if (pReqArgs->HasItem(FN_PARAM_1, pItem))
+        if (pReqArgs->HasItem(FN_PARAM_1, &pItem))
             nRepeat = static_cast<SCsCOLROW>(((const SfxInt16Item*)pItem)->GetValue());
-        if (pReqArgs->HasItem(FN_PARAM_2, pItem))
+        if (pReqArgs->HasItem(FN_PARAM_2, &pItem))
             bSel = ((const SfxBoolItem*)pItem)->GetValue();
     }
     else
@@ -225,7 +225,7 @@ void ScCellShell::ExecuteCursorSel( SfxRequest& rReq )
     if ( pReqArgs != NULL )
     {
         const SfxPoolItem* pItem;
-        if (pReqArgs->HasItem(FN_PARAM_1, pItem))
+        if (pReqArgs->HasItem(FN_PARAM_1, &pItem))
             nRepeat = static_cast<SCsCOLROW>(((const SfxInt16Item*)pItem)->GetValue());
     }
 
@@ -413,7 +413,7 @@ void ScCellShell::ExecutePage( SfxRequest& rReq )
     if ( pReqArgs != NULL )
     {
         const   SfxPoolItem* pItem;
-        if (pReqArgs->HasItem(FN_PARAM_2, pItem))
+        if (pReqArgs->HasItem(FN_PARAM_2, &pItem))
             bSel = ((const SfxBoolItem*)pItem)->GetValue();
     }
     else
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index ebd6490..8fcb469 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -996,7 +996,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
                 if( pReqArgs )
                 {
                     const SfxPoolItem* pItem;
-                    if( pReqArgs->HasItem( FID_PROTECT_DOC, pItem ) &&
+                    if( pReqArgs->HasItem( FID_PROTECT_DOC, &pItem ) &&
                         ((const SfxBoolItem*)pItem)->GetValue() == pDoc->IsDocProtected() )
                     {
                         rReq.Ignore();
@@ -1069,7 +1069,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
             {
                 const SfxPoolItem* pItem;
                 bool bNewProtection = !bOldProtection;
-                if( pReqArgs->HasItem( FID_PROTECT_TABLE, pItem ) )
+                if( pReqArgs->HasItem( FID_PROTECT_TABLE, &pItem ) )
                     bNewProtection = ((const SfxBoolItem*)pItem)->GetValue();
                 if( bNewProtection == bOldProtection )
                 {
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index e9558d3..1858ecc 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -87,7 +87,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                 if( pReqArgs != NULL )
                 {
                     const SfxPoolItem* pItem;
-                    if( pReqArgs->HasItem( FID_TABLE_VISIBLE, pItem ) )
+                    if( pReqArgs->HasItem( FID_TABLE_VISIBLE, &pItem ) )
                         bVisible = ((const SfxBoolItem*)pItem)->GetValue();
                 }
 
@@ -129,7 +129,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                 if( pReqArgs != NULL )
                 {
                     const SfxPoolItem* pItem;
-                    if( pReqArgs->HasItem( FID_TABLE_HIDE, pItem ) )
+                    if( pReqArgs->HasItem( FID_TABLE_HIDE, &pItem ) )
                         aName = ((const SfxStringItem*)pItem)->GetValue();
                 }
 
@@ -154,7 +154,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                 if ( pReqArgs )
                 {
                     const SfxPoolItem* pItem;
-                    if( pReqArgs->HasItem( FID_TABLE_SHOW, pItem ) )
+                    if( pReqArgs->HasItem( FID_TABLE_SHOW, &pItem ) )
                     {
                         aName = ((const SfxStringItem*)pItem)->GetValue();
 
@@ -217,8 +217,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                     const SfxPoolItem*  pNameItem;
                     String              aName;
 
-                    if ( pReqArgs->HasItem( FN_PARAM_1, pTabItem ) &&
-                         pReqArgs->HasItem( nSlot, pNameItem ) )
+                    if ( pReqArgs->HasItem( FN_PARAM_1, &pTabItem ) &&
+                         pReqArgs->HasItem( nSlot, &pNameItem ) )
                     {
                         //  Tabellennr. von Basic: 1-basiert
 
@@ -364,10 +364,10 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                     const SfxPoolItem* pItem;
                     String      aName;
 
-                    if( pReqArgs->HasItem( FN_PARAM_1, pItem ) )
+                    if( pReqArgs->HasItem( FN_PARAM_1, &pItem ) )
                         nTabNr = ((const SfxUInt16Item*)pItem)->GetValue();
 
-                    if( pReqArgs->HasItem( nSlot, pItem ) )
+                    if( pReqArgs->HasItem( nSlot, &pItem ) )
                         aName = ((const SfxStringItem*)pItem)->GetValue();
 
                     switch ( nSlot )
@@ -481,16 +481,16 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                     SCTAB nTableCount = pDoc->GetTableCount();
                     const SfxPoolItem* pItem;
 
-                    if( pReqArgs->HasItem( FID_TAB_MOVE, pItem ) )
+                    if( pReqArgs->HasItem( FID_TAB_MOVE, &pItem ) )
                         aDocName = ((const SfxStringItem*)pItem)->GetValue();
-                    if( pReqArgs->HasItem( FN_PARAM_1, pItem ) )
+                    if( pReqArgs->HasItem( FN_PARAM_1, &pItem ) )
                     {
                         //  Tabelle ist 1-basiert
                         nTab = ((const SfxUInt16Item*)pItem)->GetValue() - 1;
                         if ( nTab >= nTableCount )
                             nTab = SC_TAB_APPEND;
                     }
-                    if( pReqArgs->HasItem( FN_PARAM_2, pItem ) )
+                    if( pReqArgs->HasItem( FN_PARAM_2, &pItem ) )
                         bCpy = ((const SfxBoolItem*)pItem)->GetValue();
 
                     if (!aDocName.isEmpty())
@@ -700,10 +700,10 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                     sal_Bool                bDone = false;
                     const SfxPoolItem*  pItem;
                     Color               aColor;
-                    if( pReqArgs->HasItem( FN_PARAM_1, pItem ) )
+                    if( pReqArgs->HasItem( FN_PARAM_1, &pItem ) )
                         nTabNr = ((const SfxUInt16Item*)pItem)->GetValue();
 
-                    if( pReqArgs->HasItem( nSlot, pItem ) )
+                    if( pReqArgs->HasItem( nSlot, &pItem ) )
                         aColor = ((const SvxColorItem*)pItem)->GetValue();
 
                     if ( nTabSelCount > 1 )
diff --git a/svl/inc/svl/itemset.hxx b/svl/inc/svl/itemset.hxx
index e939365..2b019e2 100644
--- a/svl/inc/svl/itemset.hxx
+++ b/svl/inc/svl/itemset.hxx
@@ -134,7 +134,7 @@ public:
                                                 sal_Bool bSrchInParent = sal_True,
                                                 const SfxPoolItem **ppItem = 0 ) const;
 
-    bool                        HasItem(sal_uInt16 nWhich, const SfxPoolItem*& rpItem) const;
+    bool                        HasItem(sal_uInt16 nWhich, const SfxPoolItem** ppItem = NULL) const;
 
     virtual void                DisableItem(sal_uInt16 nWhich);
     virtual void                InvalidateItem( sal_uInt16 nWhich );
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 6ef1445..b526749 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -546,11 +546,11 @@ SfxItemState SfxItemSet::GetItemState( sal_uInt16 nWhich,
     return eRet;
 }
 
-bool SfxItemSet::HasItem(sal_uInt16 nWhich, const SfxPoolItem*& rpItem) const
+bool SfxItemSet::HasItem(sal_uInt16 nWhich, const SfxPoolItem** ppItem) const
 {
-    bool bRet = SFX_ITEM_SET == GetItemState(nWhich, true, &rpItem);
-    if (!bRet)
-        rpItem = NULL;
+    bool bRet = SFX_ITEM_SET == GetItemState(nWhich, true, ppItem);
+    if (!bRet && ppItem)
+        *ppItem = NULL;
     return bRet;
 }
 
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 66048cc..52d80fc 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -648,7 +648,7 @@ void RtfAttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe
     SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
     const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
     const SfxPoolItem* pItem;
-    if (pCellFmt->GetAttrSet().HasItem(RES_BOX, pItem))
+    if (pCellFmt->GetAttrSet().HasItem(RES_BOX, &pItem))
     {
         const SvxBoxItem& rBox = (SvxBoxItem&)*pItem;
         static const sal_uInt16 aBorders[] =
@@ -694,7 +694,7 @@ void RtfAttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
     SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
     const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
     const SfxPoolItem* pItem;
-    if (pCellFmt->GetAttrSet().HasItem(RES_BACKGROUND, pItem))
+    if (pCellFmt->GetAttrSet().HasItem(RES_BACKGROUND, &pItem))
     {
         const SvxBrushItem& rBack = (SvxBrushItem&)*pItem;
         if( !rBack.GetColor().GetTransparency() )
@@ -777,7 +777,7 @@ void RtfAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_
         m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CLVMRG);
 
     // vertical alignment
-    if (pCellFmt->GetAttrSet().HasItem(RES_VERT_ORIENT, pItem))
+    if (pCellFmt->GetAttrSet().HasItem(RES_VERT_ORIENT, &pItem))
         switch( ((SwFmtVertOrient*)pItem)->GetVertOrient() )
         {
             case text::VertOrientation::CENTER: m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CLVERTALC); break;


More information about the Libreoffice-commits mailing list