[Libreoffice-commits] core.git: cui/source

Katarina Behrens Katarina.Behrens at cib.de
Mon Jun 12 16:49:37 UTC 2017


 cui/source/inc/cuitabarea.hxx     |    7 -------
 cui/source/tabpages/tabarea.cxx   |    2 --
 cui/source/tabpages/tparea.cxx    |    2 --
 cui/source/tabpages/tppattern.cxx |   10 +++-------
 4 files changed, 3 insertions(+), 18 deletions(-)

New commits:
commit c32952b2393ddd04fb5a00763a9e5e724b991bd7
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Fri Jun 9 11:08:44 2017 +0200

    Get rid of last remainders of SetPos nonsense
    
    Change-Id: I6ebff09322e40adfc616a9003424fd1d4ff748ce
    Reviewed-on: https://gerrit.libreoffice.org/38629
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index e45186823170..595738d4055d 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -122,7 +122,6 @@ private:
     ChangeType          mnGradientListState;
     ChangeType          mnHatchingListState;
 
-    sal_Int16           mnPos;
     PageType            mnPageType;
     bool                mbAreaTP;
 
@@ -257,7 +256,6 @@ private:
     ChangeType*         m_pnHatchingListState;
 
     PageType            m_nPageType;
-    sal_Int32           m_nPos;
     sal_uInt16          m_nDlgType;
     bool*               m_pbAreaTP;
 
@@ -296,7 +294,6 @@ public:
     void    SetDrawModel( SdrModel* pModel ) { mpDrawModel = pModel; }
     void    SetPageType( PageType nInType ) { m_nPageType = nInType; }
     void    SetDlgType( sal_uInt16 nInType ) { m_nDlgType = nInType; }
-    void    SetPos( sal_uInt16 nInPos ) { m_nPos = nInPos; }
     void    SetAreaTP( bool* pIn ) { m_pbAreaTP = pIn; }
     virtual void PageCreated(const SfxAllItemSet& aSet) override;
     void    CreatePage(sal_Int32 nId, SfxTabPage* pTab);
@@ -551,7 +548,6 @@ private:
 
     double                     m_fObjectWidth;
     double                     m_fObjectHeight;
-    sal_Int32*                 m_pPos;
 
     XFillAttrSetItem           m_aXFillAttr;
     SfxItemSet&                m_rXFSet;
@@ -594,7 +590,6 @@ public:
     virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
 
     void    SetBitmapList( const XBitmapListRef& pBmpLst) { m_pBitmapList = pBmpLst; }
-    void    SetPos( sal_Int32* pPos ) { m_pPos = pPos; }
     void    SetBmpChgd( ChangeType* pIn ) { m_pnBitmapListState = pIn; }
 };
 
@@ -623,7 +618,6 @@ private:
 
     ChangeType*         m_pnPatternListState;
     ChangeType*         m_pnColorListState;
-    sal_Int32*          m_pPos;
 
     XFillStyleItem      m_aXFStyleItem;
     XFillBitmapItem     m_aXPatternItem;
@@ -657,7 +651,6 @@ public:
 
     void    SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
     void    SetPatternList( XPatternListRef const & pPatternList) { m_pPatternList = pPatternList; }
-    void    SetPos( sal_Int32* pPos ) { m_pPos = pPos; }
     void    SetPtrnChgd( ChangeType* pIn ) { m_pnPatternListState = pIn; }
     void    SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
     void    ChangeColor_Impl();
diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx
index 72538f070da7..1d21b7edd216 100644
--- a/cui/source/tabpages/tabarea.cxx
+++ b/cui/source/tabpages/tabarea.cxx
@@ -67,7 +67,6 @@ SvxAreaTabDialog::SvxAreaTabDialog
     mnPatternListState ( ChangeType::NONE ),
     mnGradientListState ( ChangeType::NONE ),
     mnHatchingListState ( ChangeType::NONE ),
-    mnPos( 0 ),
     mnPageType( PageType::Area ),
     mbAreaTP( false )
 {
@@ -252,7 +251,6 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
             static_cast<SvxAreaTabPage&>(rPage).SetDrawModel( mpDrawModel );
             static_cast<SvxAreaTabPage&>(rPage).SetPageType( mnPageType );
             static_cast<SvxAreaTabPage&>(rPage).SetDlgType( 0 );
-            static_cast<SvxAreaTabPage&>(rPage).SetPos( mnPos );
             static_cast<SvxAreaTabPage&>(rPage).SetAreaTP( &mbAreaTP );
             static_cast<SvxAreaTabPage&>(rPage).SetGrdChgd( &mnGradientListState );
             static_cast<SvxAreaTabPage&>(rPage).SetHtchChgd( &mnHatchingListState );
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 9a5e22c8a6bc..53d9ab5a2248 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -108,7 +108,6 @@ SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs
     m_pnGradientListState(&maFixed_ChangeType),
     m_pnHatchingListState(&maFixed_ChangeType),
     m_nPageType(PageType::Area),
-    m_nPos(0),
     m_nDlgType(0),
     m_pbAreaTP(nullptr),
     m_aXFillAttr          ( rInAttrs.GetPool() ),
@@ -447,7 +446,6 @@ void SvxAreaTabPage::CreatePage( sal_Int32 nId, SfxTabPage* pTab )
     {
         static_cast<SvxPatternTabPage*>(pTab)->SetColorList( m_pColorList );
         static_cast<SvxPatternTabPage*>(pTab)->SetPatternList( m_pPatternList );
-        static_cast<SvxPatternTabPage*>(pTab)->SetPos( &m_nPos );
         static_cast<SvxPatternTabPage*>(pTab)->SetPtrnChgd( m_pnPatternListState );
         static_cast<SvxPatternTabPage*>(pTab)->SetColorChgd( m_pnColorListState );
         static_cast<SvxPatternTabPage*>(pTab)->Construct();
diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx
index 71aea3caf0f7..dba1fc108066 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -92,8 +92,6 @@ SvxPatternTabPage::SvxPatternTabPage(  vcl::Window* pParent, const SfxItemSet& r
 
     m_pnPatternListState  ( nullptr ),
     m_pnColorListState    ( nullptr ),
-    m_pPos                ( nullptr ),
-
     m_aXFStyleItem        ( drawing::FillStyle_BITMAP ),
     m_aXPatternItem       ( OUString(), Graphic() ),
     m_aXFillAttr          ( rInAttrs.GetPool() ),
@@ -189,14 +187,12 @@ void SvxPatternTabPage::ActivatePage( const SfxItemSet& rSet )
         else
             aString += aURL.getBase();
 
-        *m_pPos = SearchPatternList( ( &static_cast<const XFillBitmapItem&>( rSet.Get(XATTR_FILLBITMAP)) )->GetName() );
-        if( *m_pPos != LISTBOX_ENTRY_NOTFOUND )
+        sal_Int32 nPos = SearchPatternList( ( &static_cast<const XFillBitmapItem&>( rSet.Get(XATTR_FILLBITMAP)) )->GetName() );
+        if( nPos != LISTBOX_ENTRY_NOTFOUND )
         {
-            sal_uInt16 nId = m_pPatternLB->GetItemId( static_cast<size_t>( *m_pPos ) );
+            sal_uInt16 nId = m_pPatternLB->GetItemId( static_cast<size_t>( nPos ) );
             m_pPatternLB->SelectItem( nId );
         }
-
-        *m_pPos = LISTBOX_ENTRY_NOTFOUND;
     }
 }
 


More information about the Libreoffice-commits mailing list