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

Stephan Bergmann sbergman at redhat.com
Fri May 22 05:14:01 PDT 2015


 svx/source/tbxctrls/tbcontrl.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 1bb71c41b4a6e9a1d84b5b3a08fcf09f5b4a7ef0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 22 13:13:33 2015 +0100

    Simplify GetSize().Height() -> GetHeight()
    
    Change-Id: I8541eb13d82d887ef589a0545d36db88e47932e7

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 2e962cc..491ce3a 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -608,7 +608,7 @@ void SvxStyleBox_Impl::SetupEntry(sal_uInt16 nItem, const Rectangle& rRect, Outp
 {
     if (nItem == 0 || nItem == GetEntryCount() - 1)
     {
-        unsigned int nId = (rRect.getY() / rRect.GetSize().Height());
+        unsigned int nId = (rRect.getY() / rRect.GetHeight());
         if(nId < MAX_STYLES_ENTRIES && m_pButtons[nId])
             m_pButtons[nId]->Hide();
     }
@@ -735,19 +735,19 @@ void SvxStyleBox_Impl::SetupEntry(sal_uInt16 nItem, const Rectangle& rRect, Outp
                 // handle the push-button
                 if (bIsNotSelected)
                 {
-                    unsigned int nId = (rRect.getY() / rRect.GetSize().Height());
+                    unsigned int nId = (rRect.getY() / rRect.GetHeight());
                     if(nId < MAX_STYLES_ENTRIES && m_pButtons[nId])
                         m_pButtons[nId]->Hide();
                 }
                 else
                 {
-                    unsigned int nId = (rRect.getY() / rRect.GetSize().Height());
+                    unsigned int nId = (rRect.getY() / rRect.GetHeight());
                     if(nId < MAX_STYLES_ENTRIES)
                     {
                         if(m_pButtons[nId] == nullptr)
                         {
                             m_pButtons[nId] = VclPtr<MenuButton>::Create(static_cast<vcl::Window*>(pDevice), WB_FLATBUTTON | WB_NOPOINTERFOCUS);
-                            m_pButtons[nId]->SetSizePixel(Size(BUTTON_WIDTH, rRect.GetSize().Height()));
+                            m_pButtons[nId]->SetSizePixel(Size(BUTTON_WIDTH, rRect.GetHeight()));
                             m_pButtons[nId]->SetPopupMenu(&m_aMenu);
                         }
                         m_pButtons[nId]->SetPosPixel(Point(rRect.GetWidth() - BUTTON_WIDTH, rRect.getY()));


More information about the Libreoffice-commits mailing list