Kaydet (Commit) 1bb71c41 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Simplify GetSize().Height() -> GetHeight()

Change-Id: I8541eb13d82d887ef589a0545d36db88e47932e7
üst 39321c5f
...@@ -608,7 +608,7 @@ void SvxStyleBox_Impl::SetupEntry(sal_uInt16 nItem, const Rectangle& rRect, Outp ...@@ -608,7 +608,7 @@ void SvxStyleBox_Impl::SetupEntry(sal_uInt16 nItem, const Rectangle& rRect, Outp
{ {
if (nItem == 0 || nItem == GetEntryCount() - 1) 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]) if(nId < MAX_STYLES_ENTRIES && m_pButtons[nId])
m_pButtons[nId]->Hide(); m_pButtons[nId]->Hide();
} }
...@@ -735,19 +735,19 @@ void SvxStyleBox_Impl::SetupEntry(sal_uInt16 nItem, const Rectangle& rRect, Outp ...@@ -735,19 +735,19 @@ void SvxStyleBox_Impl::SetupEntry(sal_uInt16 nItem, const Rectangle& rRect, Outp
// handle the push-button // handle the push-button
if (bIsNotSelected) 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]) if(nId < MAX_STYLES_ENTRIES && m_pButtons[nId])
m_pButtons[nId]->Hide(); m_pButtons[nId]->Hide();
} }
else else
{ {
unsigned int nId = (rRect.getY() / rRect.GetSize().Height()); unsigned int nId = (rRect.getY() / rRect.GetHeight());
if(nId < MAX_STYLES_ENTRIES) if(nId < MAX_STYLES_ENTRIES)
{ {
if(m_pButtons[nId] == nullptr) if(m_pButtons[nId] == nullptr)
{ {
m_pButtons[nId] = VclPtr<MenuButton>::Create(static_cast<vcl::Window*>(pDevice), WB_FLATBUTTON | WB_NOPOINTERFOCUS); 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]->SetPopupMenu(&m_aMenu);
} }
m_pButtons[nId]->SetPosPixel(Point(rRect.GetWidth() - BUTTON_WIDTH, rRect.getY())); m_pButtons[nId]->SetPosPixel(Point(rRect.GetWidth() - BUTTON_WIDTH, rRect.getY()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment