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

Noel Grandin noel.grandin at collabora.co.uk
Thu Nov 10 06:51:41 UTC 2016


 cui/source/dialogs/SpellDialog.cxx |    8 +-------
 cui/source/dialogs/cuigaldlg.cxx   |   16 ++--------------
 cui/source/dialogs/cuigrfflt.cxx   |   19 ++++++++++++-------
 cui/source/dialogs/hltpbase.cxx    |    9 ++-------
 cui/source/dialogs/iconcdlg.cxx    |    7 +------
 cui/source/dialogs/insdlg.cxx      |    8 +-------
 cui/source/inc/SpellDialog.hxx     |    1 -
 cui/source/inc/chardlg.hxx         |    8 --------
 cui/source/inc/cuigaldlg.hxx       |    2 --
 cui/source/inc/cuigrfflt.hxx       |    9 ---------
 cui/source/inc/cuitabarea.hxx      |   14 +-------------
 cui/source/inc/hltpbase.hxx        |    2 --
 cui/source/inc/iconcdlg.hxx        |    1 -
 cui/source/inc/insdlg.hxx          |    1 -
 cui/source/inc/macroass.hxx        |    1 -
 cui/source/inc/numfmt.hxx          |    2 --
 cui/source/inc/page.hxx            |    3 ---
 cui/source/tabpages/chardlg.cxx    |   35 ++++++++---------------------------
 cui/source/tabpages/macroass.cxx   |   15 +++++----------
 cui/source/tabpages/numfmt.cxx     |   12 ++----------
 cui/source/tabpages/page.cxx       |    2 +-
 cui/source/tabpages/tpcolor.cxx    |    4 ++--
 22 files changed, 38 insertions(+), 141 deletions(-)

New commits:
commit 76c8336eec82862732d3a26be84b5e8a52efe022
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Nov 9 14:56:41 2016 +0200

    loplugin:expandablemethods in cui
    
    Change-Id: I3dae1d142874c767ec1e32401acba0bbca95df5f
    Reviewed-on: https://gerrit.libreoffice.org/30716
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 7d76879..e0bdeb0 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -340,7 +340,7 @@ void SpellDialog::UpdateBoxes_Impl()
     }
     else
         SetTitle_Impl( nAltLanguage );
-    SetSelectedLang_Impl( nAltLanguage );
+    m_pLanguageLB->SelectLanguage( nAltLanguage );
     int nDicts = InitUserDicts();
 
     // enter alternatives
@@ -759,12 +759,6 @@ bool SpellDialog::Close()
 }
 
 
-void SpellDialog::SetSelectedLang_Impl( LanguageType nLang )
-{
-    m_pLanguageLB->SelectLanguage( nLang );
-}
-
-
 LanguageType SpellDialog::GetSelectedLang_Impl() const
 {
     sal_Int16 nLang = m_pLanguageLB->GetSelectLanguage();
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index f90e719..3667772 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -218,19 +218,13 @@ void SearchProgress::dispose()
 }
 
 
-void SearchProgress::Terminate()
+IMPL_LINK_NOARG(SearchProgress, ClickCancelBtn, Button*, void)
 {
     if (maSearchThread.is())
         maSearchThread->terminate();
 }
 
 
-IMPL_LINK_NOARG(SearchProgress, ClickCancelBtn, Button*, void)
-{
-    Terminate();
-}
-
-
 IMPL_LINK_NOARG(SearchProgress, CleanUpHdl, void*, void)
 {
     if (maSearchThread.is())
@@ -347,19 +341,13 @@ void TakeProgress::dispose()
 }
 
 
-void TakeProgress::Terminate()
+IMPL_LINK_NOARG(TakeProgress, ClickCancelBtn, Button*, void)
 {
     if (maTakeThread.is())
         maTakeThread->terminate();
 }
 
 
-IMPL_LINK_NOARG(TakeProgress, ClickCancelBtn, Button*, void)
-{
-    Terminate();
-}
-
-
 IMPL_LINK_NOARG(TakeProgress, CleanUpHdl, void*, void)
 {
     if (maTakeThread.is())
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index c6928c2..f90faf9 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -232,8 +232,10 @@ Graphic GraphicFilterMosaic::GetFilteredGraphic( const Graphic& rGraphic,
                                                  double fScaleX, double fScaleY )
 {
     Graphic         aRet;
-    const Size      aSize( std::max( FRound( GetTileWidth() * fScaleX ), 1L ),
-                           std::max( FRound( GetTileHeight() * fScaleY ), 1L ) );
+    long            nTileWidth = static_cast<long>(mpMtrWidth->GetValue());
+    long            nTileHeight = static_cast<long>(mpMtrHeight->GetValue());
+    const Size      aSize( std::max( FRound( nTileWidth * fScaleX ), 1L ),
+                           std::max( FRound( nTileHeight * fScaleY ), 1L ) );
     BmpFilterParam  aParam( aSize );
 
     if( rGraphic.IsAnimated() )
@@ -299,7 +301,8 @@ void GraphicFilterSmooth::dispose()
 Graphic GraphicFilterSmooth::GetFilteredGraphic( const Graphic& rGraphic, double, double )
 {
     Graphic         aRet;
-    BmpFilterParam  aParam( GetRadius() );
+    double          nRadius = mpMtrRadius->GetValue() / 10.0;
+    BmpFilterParam  aParam( nRadius );
 
     if( rGraphic.IsAnimated() )
     {
@@ -369,7 +372,8 @@ void GraphicFilterSolarize::dispose()
 Graphic GraphicFilterSolarize::GetFilteredGraphic( const Graphic& rGraphic, double, double )
 {
     Graphic         aRet;
-    BmpFilterParam  aParam( GetGreyThreshold() );
+    sal_uInt8       nGreyThreshold = (sal_uInt8) FRound( mpMtrThreshold->GetValue() * 2.55 );
+    BmpFilterParam  aParam( nGreyThreshold );
 
     if( rGraphic.IsAnimated() )
     {
@@ -430,7 +434,8 @@ void GraphicFilterSepia::dispose()
 Graphic GraphicFilterSepia::GetFilteredGraphic( const Graphic& rGraphic, double, double )
 {
     Graphic         aRet;
-    BmpFilterParam  aParam( GetSepiaPercent() );
+    sal_uInt16      nSepiaPct = sal::static_int_cast< sal_uInt16 >(mpMtrSepia->GetValue());
+    BmpFilterParam  aParam( nSepiaPct );
 
     if( rGraphic.IsAnimated() )
     {
@@ -486,8 +491,8 @@ void GraphicFilterPoster::dispose()
 
 Graphic GraphicFilterPoster::GetFilteredGraphic( const Graphic& rGraphic, double, double )
 {
-    Graphic         aRet;
-    const sal_uInt16    nPosterCount = GetPosterColorCount();
+    Graphic          aRet;
+    const sal_uInt16 nPosterCount = (sal_uInt16) mpNumPoster->GetValue();
 
     if( rGraphic.IsAnimated() )
     {
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index efa0335..f6d48ad 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -299,12 +299,6 @@ void SvxHyperlinkTabPageBase::SetInitFocus()
     GrabFocus();
 }
 
-// Ask dialog whether the current doc is a HTML-doc
-bool SvxHyperlinkTabPageBase::IsHTMLDoc() const
-{
-    return static_cast<SvxHpLinkDlg*>(mpDialog.get())->IsHTMLDoc();
-}
-
 // retrieve dispatcher
 SfxDispatcher* SvxHyperlinkTabPageBase::GetDispatcher() const
 {
@@ -432,7 +426,8 @@ void SvxHyperlinkTabPageBase::GetDataFromCommonFields( OUString& aStrName,
     aStrName    = mpEdIndication->GetText();
     aStrFrame   = mpCbbFrame->GetText();
     eMode       = (SvxLinkInsertMode) (mpLbForm->GetSelectEntryPos()+1);
-    if( IsHTMLDoc() )
+    // Ask dialog whether the current doc is a HTML-doc
+    if (static_cast<SvxHpLinkDlg*>(mpDialog.get())->IsHTMLDoc())
         eMode = (SvxLinkInsertMode) ( sal_uInt16(eMode) | HLINK_HTMLMODE );
 }
 
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 4026fdc..d58c488 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -485,7 +485,7 @@ void IconChoiceDialog::DeActivatePageImpl ()
 
         if ( nRet & DeactivateRC::RefreshSet )
         {
-            RefreshInputSet();
+            // TODO refresh input set
             // flag all pages to be newly initialized
             for (IconChoicePageData* pObj : maPageList)
             {
@@ -620,11 +620,6 @@ void IconChoiceDialog::Start_Impl()
     ActivatePageImpl();
 }
 
-void IconChoiceDialog::RefreshInputSet()
-{
-    SAL_WARN( "cui.dialogs", "RefreshInputSet not implemented" );
-}
-
 /**********************************************************************
 |
 | tool-methods
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index eb6f18a..47af495 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -147,12 +147,6 @@ IMPL_LINK_NOARG(SvInsertOleDlg, RadioHdl, Button*, void)
 }
 
 
-void SvInsertOleDlg::SelectDefault()
-{
-    m_pLbObjecttype->SelectEntryPos(0);
-}
-
-
 SvInsertOleDlg::SvInsertOleDlg
 (
     vcl::Window* pParent,
@@ -213,7 +207,7 @@ short SvInsertOleDlg::Execute()
     for ( sal_uLong i = 0; i < m_pServers->Count(); i++ )
         m_pLbObjecttype->InsertEntry( (*m_pServers)[i].GetHumanName() );
     m_pLbObjecttype->SetUpdateMode( true );
-    SelectDefault();
+    m_pLbObjecttype->SelectEntryPos(0);
     OUString aName;
 
     DBG_ASSERT( m_xStorage.is(), "No storage!");
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index b268706..4ca5eee 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -204,7 +204,6 @@ private:
     void            LockFocusChanges( bool bLock ) {bFocusLocked = bLock;}
     void            Impl_Restore(bool bUseSavedSentence);
 
-    void            SetSelectedLang_Impl( LanguageType nLang );
     LanguageType    GetSelectedLang_Impl() const;
 
     /** Retrieves the next sentence.
diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx
index 484897d..e537150 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -160,8 +160,6 @@ public:
     void                SetFontList( const SvxFontListItem& rItem );
     void                EnableRelativeMode();
     void                EnableSearchMode();
-    ///                  the writer uses SID_ATTR_BRUSH as font background
-    void                SetPreviewBackgroundToCharacter();
 
     void                DisableControls( sal_uInt16 nDisable );
     virtual void        PageCreated(const SfxAllItemSet& aSet) override;
@@ -242,8 +240,6 @@ public:
     virtual void        ChangesApplied() override;
 
     void                DisableControls( sal_uInt16 nDisable );
-    ///                  the writer uses SID_ATTR_BRUSH as font background
-    void                SetPreviewBackgroundToCharacter();
     virtual void        PageCreated(const SfxAllItemSet& aSet) override;
 };
 
@@ -320,8 +316,6 @@ public:
     virtual bool        FillItemSet( SfxItemSet* rSet ) override;
     virtual void        ChangesApplied() override;
     virtual void        FillUserData() override;
-    ///                  the writer uses SID_ATTR_BRUSH as font background
-    void                SetPreviewBackgroundToCharacter();
     virtual void        PageCreated(const SfxAllItemSet& aSet) override;
 };
 
@@ -365,8 +359,6 @@ public:
 
     virtual void        Reset( const SfxItemSet* rSet ) override;
     virtual bool        FillItemSet( SfxItemSet* rSet ) override;
-    ///                  the writer uses SID_ATTR_BRUSH as font background
-    void                SetPreviewBackgroundToCharacter();
     virtual void        PageCreated(const SfxAllItemSet& aSet) override;
 };
 
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index 7fe1f00..12014af 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -89,7 +89,6 @@ private:
     rtl::Reference< SearchThread > maSearchThread;
 
                         DECL_LINK( ClickCancelBtn, Button*, void );
-    void                Terminate();
 
 public:
                         SearchProgress( vcl::Window* pParent, const INetURLObject& rStartURL );
@@ -134,7 +133,6 @@ private:
     TokenList_impl      maTakenList;
 
     DECL_LINK( ClickCancelBtn, Button*, void );
-    void                Terminate();
 
 public:
 
diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx
index ad3803a..1fdeffc 100644
--- a/cui/source/inc/cuigrfflt.hxx
+++ b/cui/source/inc/cuigrfflt.hxx
@@ -104,7 +104,6 @@ public:
     virtual void dispose() override;
 
     virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) override;
-    double          GetRadius() const { return mpMtrRadius->GetValue() / 10.0; }
 };
 
 class GraphicFilterMosaic : public GraphicFilterDialog
@@ -123,8 +122,6 @@ public:
     virtual void dispose() override;
 
     virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) override;
-    long            GetTileWidth() const { return static_cast<long>(mpMtrWidth->GetValue()); }
-    long            GetTileHeight() const { return static_cast<long>(mpMtrHeight->GetValue()); }
     bool            IsEnhanceEdges() const { return mpCbxEdges->IsChecked(); }
 };
 
@@ -144,7 +141,6 @@ public:
     virtual void dispose() override;
 
     virtual Graphic     GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) override;
-    sal_uInt8           GetGreyThreshold() const { return( (sal_uInt8) FRound( mpMtrThreshold->GetValue() * 2.55 ) ); }
     bool            IsInvert() const { return mpCbxInvert->IsChecked(); }
 };
 
@@ -159,10 +155,6 @@ public:
     virtual ~GraphicFilterSepia() override;
     virtual void dispose() override;
     virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) override;
-    sal_uInt16 GetSepiaPercent() const
-    {
-        return sal::static_int_cast< sal_uInt16 >(mpMtrSepia->GetValue());
-    }
 };
 
 class GraphicFilterPoster : public GraphicFilterDialog
@@ -177,7 +169,6 @@ public:
     virtual void dispose() override;
 
     virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) override;
-    sal_uInt16      GetPosterColorCount() const { return( (sal_uInt16) mpNumPoster->GetValue() ); }
 };
 
 class EmbossControl : public SvxRectCtl
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index a6e9f1d..f58e6cd 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -785,7 +785,7 @@ public:
     virtual void ActivatePage( const SfxItemSet& rSet ) override;
     virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
-    void             SetPropertyList( XPropertyListType t, const XPropertyListRef &xRef );
+    void    SetPropertyList( XPropertyListType t, const XPropertyListRef &xRef );
     void    SetPos( sal_Int32* pInPos ) { pPos = pInPos; }
     void    SetColorList( const XColorListRef& pColList );
 
@@ -793,18 +793,6 @@ public:
     void    SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; }
 
     virtual void FillUserData() override;
-
-    void SetModified(bool bIsModified)
-    {
-        if (bIsModified)
-            *pnColorListState |= ChangeType::MODIFIED;
-        else
-            *pnColorListState &= ~ChangeType::MODIFIED;
-    }
-    void AddState(ChangeType nState)
-    {
-        *pnColorListState |= nState;
-    }
 };
 
 #endif // INCLUDED_CUI_SOURCE_INC_CUITABAREA_HXX
diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx
index 642d281..52076b1 100644
--- a/cui/source/inc/hltpbase.hxx
+++ b/cui/source/inc/hltpbase.hxx
@@ -146,8 +146,6 @@ protected:
 
     HyperDialogEvent   GetMacroEvents();
     SvxMacroTableDtor* GetMacroTable();
-
-    bool IsHTMLDoc() const;
 };
 
 #endif // INCLUDED_CUI_SOURCE_INC_HLTPBASE_HXX
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index 66a61d1..2b7c014 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -140,7 +140,6 @@ protected:
     static SfxItemSet*      CreateInputItemSet( sal_uInt16 nId );
     inline IconChoicePage*  GetTabPage( sal_uInt16 nPageId )
                                 { return ( GetPageData (nPageId)->pPage ? GetPageData (nPageId)->pPage.get() : nullptr); }
-    static void             RefreshInputSet();
 
     void                    ActivatePageImpl ();
     void                    DeActivatePageImpl ();
diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx
index 14ddc40..cd6a45a 100644
--- a/cui/source/inc/insdlg.hxx
+++ b/cui/source/inc/insdlg.hxx
@@ -72,7 +72,6 @@ class SvInsertOleDlg : public InsertObjectDialog_Impl
     DECL_LINK(DoubleClickHdl, ListBox&, void);
     DECL_LINK(BrowseHdl, Button*, void);
     DECL_LINK(RadioHdl, Button*, void);
-    void SelectDefault();
     bool IsCreateNew() const override
         { return m_pRbNewObject->IsChecked(); }
 
diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx
index 66906fd..0c46364 100644
--- a/cui/source/inc/macroass.hxx
+++ b/cui/source/inc/macroass.hxx
@@ -50,7 +50,6 @@ protected:
 
     void                        InitAndSetHandler();
     void                        FillEvents();
-    void                        FillMacroList();
     void                        EnableButtons();
 
 public:
diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx
index eeed5e5..09a1fc6 100644
--- a/cui/source/inc/numfmt.hxx
+++ b/cui/source/inc/numfmt.hxx
@@ -78,8 +78,6 @@ public:
     virtual void            Reset( const SfxItemSet* rSet ) override;
     virtual DeactivateRC    DeactivatePage  ( SfxItemSet* pSet ) override;
 
-    void                    SetInfoItem( const SvxNumberInfoItem& rItem );
-
     void                    HideLanguage(bool bFlag=true);
     virtual bool            PreNotify( NotifyEvent& rNEvt ) override;
     virtual void            PageCreated(const SfxAllItemSet& aSet) override;
diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index 4dd6e80..d0317b6 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -181,9 +181,6 @@ private:
 
     SvxPageDescPage( vcl::Window* pParent, const SfxItemSet& rSet );
 
-    //UUUU
-    void EnableDrawingLayerFillStyles(bool bNew) { mbEnableDrawingLayerFillStyles = bNew; }
-
 protected:
     virtual void        ActivatePage( const SfxItemSet& rSet ) override;
     virtual DeactivateRC   DeactivatePage( SfxItemSet* pSet ) override;
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 15a1020..fb2d9a5 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1319,12 +1319,6 @@ void SvxCharNamePage::DisableControls( sal_uInt16 nDisable )
 }
 
 
-void SvxCharNamePage::SetPreviewBackgroundToCharacter()
-{
-    m_bPreviewBackgroundToCharacter = true;
-}
-
-
 void SvxCharNamePage::PageCreated(const SfxAllItemSet& aSet)
 {
     const SvxFontListItem* pFontListItem = aSet.GetItem<SvxFontListItem>(SID_ATTR_CHAR_FONTLIST, false);
@@ -1339,7 +1333,8 @@ void SvxCharNamePage::PageCreated(const SfxAllItemSet& aSet)
         if ( ( nFlags & SVX_RELATIVE_MODE ) == SVX_RELATIVE_MODE )
             EnableRelativeMode();
         if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER )
-            SetPreviewBackgroundToCharacter();
+            // the writer uses SID_ATTR_BRUSH as font background
+            m_bPreviewBackgroundToCharacter = true;
     }
     if (pDisalbeItem)
         DisableControls(pDisalbeItem->GetValue());
@@ -2466,12 +2461,6 @@ void SvxCharEffectsPage::DisableControls( sal_uInt16 nDisable )
     }
 }
 
-void SvxCharEffectsPage::SetPreviewBackgroundToCharacter()
-{
-    m_bPreviewBackgroundToCharacter = true;
-}
-
-
 void SvxCharEffectsPage::PageCreated(const SfxAllItemSet& aSet)
 {
     const SfxUInt16Item* pDisableCtlItem = aSet.GetItem<SfxUInt16Item>(SID_DISABLE_CTL, false);
@@ -2485,7 +2474,8 @@ void SvxCharEffectsPage::PageCreated(const SfxAllItemSet& aSet)
         if ( ( nFlags & SVX_ENABLE_FLASH ) == SVX_ENABLE_FLASH )
             m_pBlinkingBtn->Show();
         if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER )
-            SetPreviewBackgroundToCharacter();
+            // the writer uses SID_ATTR_BRUSH as font background
+            m_bPreviewBackgroundToCharacter = true;
     }
 }
 
@@ -3133,11 +3123,6 @@ void SvxCharPositionPage::FillUserData()
 }
 
 
-void SvxCharPositionPage::SetPreviewBackgroundToCharacter()
-{
-    m_bPreviewBackgroundToCharacter = true;
-}
-
 void SvxCharPositionPage::PageCreated(const SfxAllItemSet& aSet)
 {
     const SfxUInt32Item* pFlagItem = aSet.GetItem<SfxUInt32Item>(SID_FLAG_TYPE, false);
@@ -3145,7 +3130,8 @@ void SvxCharPositionPage::PageCreated(const SfxAllItemSet& aSet)
     {
         sal_uInt32 nFlags=pFlagItem->GetValue();
         if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER )
-            SetPreviewBackgroundToCharacter();
+            // the writer uses SID_ATTR_BRUSH as font background
+            m_bPreviewBackgroundToCharacter = true;
     }
 }
 // class SvxCharTwoLinesPage ------------------------------------------------
@@ -3363,12 +3349,6 @@ void    SvxCharTwoLinesPage::UpdatePreview_Impl()
     m_pPreviewWin->Invalidate();
 }
 
-void SvxCharTwoLinesPage::SetPreviewBackgroundToCharacter()
-{
-    m_bPreviewBackgroundToCharacter = true;
-}
-
-
 void SvxCharTwoLinesPage::PageCreated(const SfxAllItemSet& aSet)
 {
     const SfxUInt32Item* pFlagItem = aSet.GetItem<SfxUInt32Item>(SID_FLAG_TYPE, false);
@@ -3376,7 +3356,8 @@ void SvxCharTwoLinesPage::PageCreated(const SfxAllItemSet& aSet)
     {
         sal_uInt32 nFlags=pFlagItem->GetValue();
         if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER )
-            SetPreviewBackgroundToCharacter();
+            // the writer uses SID_ATTR_BRUSH as font background
+            m_bPreviewBackgroundToCharacter = true;
     }
 }
 
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index 8c7a4e0..3325b3f 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -373,7 +373,11 @@ IMPL_LINK( SfxMacroTabPage, TimeOut_Impl, Idle*,, void )
         pTabDlg->EnterWait();
         pTabDlg->EnableInput( false );
     }
-    FillMacroList();
+    // fill macro list
+    mpImpl->pGroupLB->Init(
+        css::uno::Reference<css::uno::XComponentContext >(),
+        GetFrame(),
+        OUString(), false);
     if ( pTabDlg )
     {
         pTabDlg->EnableInput();
@@ -414,15 +418,6 @@ void SfxMacroTabPage::InitAndSetHandler()
 
 }
 
-void SfxMacroTabPage::FillMacroList()
-{
-    mpImpl->pGroupLB->Init(
-        css::uno::Reference<
-            css::uno::XComponentContext >(),
-        GetFrame(),
-        OUString(), false);
-}
-
 void SfxMacroTabPage::FillEvents()
 {
     SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox();
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 5ba83a2..c3abc9a 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -832,14 +832,6 @@ DeactivateRC SvxNumberFormatTabPage::DeactivatePage( SfxItemSet* _pSet )
     return DeactivateRC::LeavePage;
 }
 
-void SvxNumberFormatTabPage::SetInfoItem( const SvxNumberInfoItem& rItem )
-{
-    if(pNumItem==nullptr)
-    {
-        pNumItem = static_cast<SvxNumberInfoItem*>(rItem.Clone());
-    }
-}
-
 void SvxNumberFormatTabPage::FillFormatListBox_Impl( std::vector<OUString>& rEntries )
 {
     OUString    aEntry;
@@ -1844,8 +1836,8 @@ void SvxNumberFormatTabPage::PageCreated(const SfxAllItemSet& aSet)
 {
     const SvxNumberInfoItem* pNumberInfoItem = aSet.GetItem<SvxNumberInfoItem>(SID_ATTR_NUMBERFORMAT_INFO, false);
     const SfxLinkItem* pLinkItem = aSet.GetItem<SfxLinkItem>(SID_LINK_TYPE, false);
-    if (pNumberInfoItem)
-        SetInfoItem(*pNumberInfoItem);
+    if (pNumberInfoItem && !pNumItem)
+        pNumItem = static_cast<SvxNumberInfoItem*>(pNumberInfoItem->Clone());
     if (pLinkItem)
         fnOkHdl = pLinkItem->GetValue();
 }
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 0ddcd6d..95125e2 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -1722,7 +1722,7 @@ void SvxPageDescPage::PageCreated(const SfxAllItemSet& aSet)
     {
         const bool bNew(pSupportDrawingLayerFillStyleItem->GetValue());
 
-        EnableDrawingLayerFillStyles(bNew);
+        mbEnableDrawingLayerFillStyles = bNew;
     }
 }
 
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index a823fa7..71a23a2 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -507,8 +507,8 @@ IMPL_LINK_NOARG(SvxColorTabPage, SelectPaletteLBHdl, ListBox&, void)
                 pLine->SetNewColorList(pList);
             else
                 SetColorList(pList);
-            AddState( ChangeType::CHANGED );
-            SetModified( false );
+            *pnColorListState |= ChangeType::CHANGED;
+            *pnColorListState &= ~ChangeType::MODIFIED;
         }
     }
     if(nPos != 0)


More information about the Libreoffice-commits mailing list