[Libreoffice-commits] core.git: 2 commits - cui/source framework/source include/svx svx/source

Noel Grandin noel.grandin at collabora.co.uk
Thu Jan 4 06:26:07 UTC 2018


 cui/source/inc/align.hxx                              |    2 -
 cui/source/tabpages/align.cxx                         |    2 -
 framework/source/uiconfiguration/imagemanagerimpl.cxx |   36 ++++++++----------
 include/svx/frmdirlbox.hxx                            |    8 +---
 svx/source/dialog/frmdirlbox.cxx                      |   10 ++---
 5 files changed, 27 insertions(+), 31 deletions(-)

New commits:
commit 5328bf4021fc3a9b8c2b031f2eaba55eb1fb249c
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Jan 3 15:13:30 2018 +0200

    drop CmdToXGraphicNameAccess typedef
    
    Change-Id: I76dc73c5a6c62b0ec0fff274ae57f084ccdb8c70
    Reviewed-on: https://gerrit.libreoffice.org/47347
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index 763af8aa13e6..0173374bd498 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -92,8 +92,6 @@ namespace framework
 
 static GlobalImageList*     pGlobalImageList = nullptr;
 
-typedef GraphicNameAccess CmdToXGraphicNameAccess;
-
 namespace
 {
     class theGlobalImageListMutex
@@ -778,8 +776,8 @@ void ImageManagerImpl::replaceImages(
     const Sequence< OUString >& aCommandURLSequence,
     const Sequence< uno::Reference< XGraphic > >& aGraphicsSequence )
 {
-    CmdToXGraphicNameAccess* pInsertedImages( nullptr );
-    CmdToXGraphicNameAccess* pReplacedImages( nullptr );
+    GraphicNameAccess* pInsertedImages( nullptr );
+    GraphicNameAccess* pReplacedImages( nullptr );
 
     {
         SolarMutexGuard g;
@@ -810,14 +808,14 @@ void ImageManagerImpl::replaceImages(
             {
                 pImageList->AddImage(aCommandURLSequence[i], Image(xGraphic));
                 if ( !pInsertedImages )
-                    pInsertedImages = new CmdToXGraphicNameAccess();
+                    pInsertedImages = new GraphicNameAccess();
                 pInsertedImages->addElement( aCommandURLSequence[i], xGraphic );
             }
             else
             {
                 pImageList->ReplaceImage(aCommandURLSequence[i], Image(xGraphic));
                 if ( !pReplacedImages )
-                    pReplacedImages = new CmdToXGraphicNameAccess();
+                    pReplacedImages = new GraphicNameAccess();
                 pReplacedImages->addElement( aCommandURLSequence[i], xGraphic );
             }
         }
@@ -858,8 +856,8 @@ void ImageManagerImpl::replaceImages(
 
 void ImageManagerImpl::removeImages( ::sal_Int16 nImageType, const Sequence< OUString >& aCommandURLSequence )
 {
-    CmdToXGraphicNameAccess* pRemovedImages( nullptr );
-    CmdToXGraphicNameAccess* pReplacedImages( nullptr );
+    GraphicNameAccess* pRemovedImages( nullptr );
+    GraphicNameAccess* pReplacedImages( nullptr );
 
     {
         SolarMutexGuard g;
@@ -903,20 +901,20 @@ void ImageManagerImpl::removeImages( ::sal_Int16 nImageType, const Sequence< OUS
                     if ( !aNewImage )
                     {
                         if ( !pRemovedImages )
-                            pRemovedImages = new CmdToXGraphicNameAccess();
+                            pRemovedImages = new GraphicNameAccess();
                         pRemovedImages->addElement( aCommandURLSequence[i], xEmptyGraphic );
                     }
                     else
                     {
                         if ( !pReplacedImages )
-                            pReplacedImages = new CmdToXGraphicNameAccess();
+                            pReplacedImages = new GraphicNameAccess();
                         pReplacedImages->addElement(aCommandURLSequence[i], GetXGraphic(aNewImage));
                     }
                 } // if ( m_bUseGlobal )
                 else
                 {
                     if ( !pRemovedImages )
-                        pRemovedImages = new CmdToXGraphicNameAccess();
+                        pRemovedImages = new GraphicNameAccess();
                     pRemovedImages->addElement( aCommandURLSequence[i], xEmptyGraphic );
                 }
             }
@@ -993,9 +991,9 @@ void ImageManagerImpl::reload()
                 pImageList = implts_getUserImageList(i);
                 pImageList->GetImageNames( aNewUserCmdImageSet );
 
-                CmdToXGraphicNameAccess* pInsertedImages( nullptr );
-                CmdToXGraphicNameAccess* pReplacedImages( nullptr );
-                CmdToXGraphicNameAccess* pRemovedImages( nullptr );
+                GraphicNameAccess* pInsertedImages( nullptr );
+                GraphicNameAccess* pReplacedImages( nullptr );
+                GraphicNameAccess* pRemovedImages( nullptr );
 
                 const sal_uInt32 nNewCount = aNewUserCmdImageSet.size();
                 for ( j = 0; j < nNewCount; j++ )
@@ -1005,14 +1003,14 @@ void ImageManagerImpl::reload()
                     {
                         pIter->second = true; // mark entry as replaced
                         if ( !pReplacedImages )
-                            pReplacedImages = new CmdToXGraphicNameAccess();
+                            pReplacedImages = new GraphicNameAccess();
                         pReplacedImages->addElement( aNewUserCmdImageSet[j],
                                                      GetXGraphic(pImageList->GetImage(aNewUserCmdImageSet[j])) );
                     }
                     else
                     {
                         if ( !pInsertedImages )
-                            pInsertedImages = new CmdToXGraphicNameAccess();
+                            pInsertedImages = new GraphicNameAccess();
                         pInsertedImages->addElement( aNewUserCmdImageSet[j],
                                                      GetXGraphic(pImageList->GetImage(aNewUserCmdImageSet[j])) );
                     }
@@ -1044,14 +1042,14 @@ void ImageManagerImpl::reload()
                             {
                                 // No image in the module/global image list => remove user image
                                 if ( !pRemovedImages )
-                                    pRemovedImages = new CmdToXGraphicNameAccess();
+                                    pRemovedImages = new GraphicNameAccess();
                                 pRemovedImages->addElement( pIter->first, xEmptyGraphic );
                             }
                             else
                             {
                                 // Image has been found in the module/global image list => replace user image
                                 if ( !pReplacedImages )
-                                    pReplacedImages = new CmdToXGraphicNameAccess();
+                                    pReplacedImages = new GraphicNameAccess();
                                 pReplacedImages->addElement(pIter->first, GetXGraphic(aImage));
                             }
                         } // if ( m_bUseGlobal )
@@ -1059,7 +1057,7 @@ void ImageManagerImpl::reload()
                         {
                             // No image in the user image list => remove user image
                             if ( !pRemovedImages )
-                                pRemovedImages = new CmdToXGraphicNameAccess();
+                                pRemovedImages = new GraphicNameAccess();
                             pRemovedImages->addElement( pIter->first, xEmptyGraphic );
                         }
                     }
commit 44a1161a3c5f7c5f9cb6307aba292fd4d2c65560
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Jan 3 15:10:53 2018 +0200

    drop FrameDirListBox typedef
    
    and rename FrameDirListBoxWrapper->FrameDirectionListBoxWrapper
    
    Change-Id: I201ab2caeff0a3219efe8ee86024bc48b8701f7e
    Reviewed-on: https://gerrit.libreoffice.org/47346
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx
index c70e95cf544d..1a90d4a21542 100644
--- a/cui/source/inc/align.hxx
+++ b/cui/source/inc/align.hxx
@@ -99,7 +99,7 @@ private:
     VclPtr<TriStateBox>         m_pBtnWrap;
     VclPtr<TriStateBox>         m_pBtnHyphen;
     VclPtr<TriStateBox>         m_pBtnShrink;
-    VclPtr<FrameDirListBox>     m_pLbFrameDir;
+    VclPtr<FrameDirectionListBox> m_pLbFrameDir;
 
     // hidden labels/string
     VclPtr<FixedText>           m_pFtBotLock;
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 327201ca8f85..373d96c0f8e5 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -236,7 +236,7 @@ AlignmentTabPage::AlignmentTabPage( vcl::Window* pParent, const SfxItemSet& rCor
     AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_HYPHENATION, *m_pBtnHyphen, ItemConnFlags::HideUnknown ) );
     AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_SHRINKTOFIT, *m_pBtnShrink, ItemConnFlags::HideUnknown ) );
     AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_FRAMEDIRECTION, *m_pBoxDirection, ItemConnFlags::HideUnknown ) );
-    AddItemConnection( new FrameDirListBoxConnection( SID_ATTR_FRAMEDIRECTION, *m_pLbFrameDir, ItemConnFlags::HideUnknown ) );
+    AddItemConnection( new FrameDirectionListBoxConnection( SID_ATTR_FRAMEDIRECTION, *m_pLbFrameDir, ItemConnFlags::HideUnknown ) );
 
 }
 
diff --git a/include/svx/frmdirlbox.hxx b/include/svx/frmdirlbox.hxx
index 6fe30a571457..9c065160cb17 100644
--- a/include/svx/frmdirlbox.hxx
+++ b/include/svx/frmdirlbox.hxx
@@ -53,14 +53,12 @@ public:
     SvxFrameDirection   GetSelectEntryValue() const;
 };
 
-typedef FrameDirectionListBox FrameDirListBox;
-
 
 /** Wrapper for usage of a FrameDirectionListBox in item connections. */
-class SAL_WARN_UNUSED SVX_DLLPUBLIC FrameDirListBoxWrapper : public sfx::SingleControlWrapper< FrameDirListBox, SvxFrameDirection >
+class SAL_WARN_UNUSED SVX_DLLPUBLIC FrameDirectionListBoxWrapper : public sfx::SingleControlWrapper< FrameDirectionListBox, SvxFrameDirection >
 {
 public:
-    explicit            FrameDirListBoxWrapper( FrameDirListBox& rListBox );
+    explicit            FrameDirectionListBoxWrapper( FrameDirectionListBox& rListBox );
 
     virtual bool        IsControlDontKnow() const override;
     virtual void        SetControlDontKnow( bool bSet ) override;
@@ -73,7 +71,7 @@ public:
 typedef sfx::ValueItemWrapper< SvxFrameDirectionItem, SvxFrameDirection > FrameDirItemWrapper;
 
 /** An item<->control connection for a FrameDirectionListBox. */
-typedef sfx::ItemControlConnection< FrameDirItemWrapper, FrameDirListBoxWrapper > FrameDirListBoxConnection;
+typedef sfx::ItemControlConnection< FrameDirItemWrapper, FrameDirectionListBoxWrapper > FrameDirectionListBoxConnection;
 
 
 }
diff --git a/svx/source/dialog/frmdirlbox.cxx b/svx/source/dialog/frmdirlbox.cxx
index 827276e947ca..11e3d8bcf46e 100644
--- a/svx/source/dialog/frmdirlbox.cxx
+++ b/svx/source/dialog/frmdirlbox.cxx
@@ -79,28 +79,28 @@ SvxFrameDirection FrameDirectionListBox::GetSelectEntryValue() const
 }
 
 
-FrameDirListBoxWrapper::FrameDirListBoxWrapper( FrameDirListBox& rListBox ) :
+FrameDirectionListBoxWrapper::FrameDirectionListBoxWrapper( FrameDirectionListBox& rListBox ) :
     SingleControlWrapperType( rListBox )
 {
 }
 
-bool FrameDirListBoxWrapper::IsControlDontKnow() const
+bool FrameDirectionListBoxWrapper::IsControlDontKnow() const
 {
     return GetControl().GetSelectedEntryCount() == 0;
 }
 
-void FrameDirListBoxWrapper::SetControlDontKnow( bool bSet )
+void FrameDirectionListBoxWrapper::SetControlDontKnow( bool bSet )
 {
     if( bSet )
         GetControl().SetNoSelection();
 }
 
-SvxFrameDirection FrameDirListBoxWrapper::GetControlValue() const
+SvxFrameDirection FrameDirectionListBoxWrapper::GetControlValue() const
 {
     return GetControl().GetSelectEntryValue();
 }
 
-void FrameDirListBoxWrapper::SetControlValue( SvxFrameDirection eValue )
+void FrameDirectionListBoxWrapper::SetControlValue( SvxFrameDirection eValue )
 {
     GetControl().SelectEntryValue( eValue );
 }


More information about the Libreoffice-commits mailing list