summaryrefslogtreecommitdiff
path: root/sd/source/ui/app
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/app')
-rw-r--r--sd/source/ui/app/scalectrl.cxx40
-rw-r--r--sd/source/ui/app/sdpopup.cxx24
2 files changed, 32 insertions, 32 deletions
diff --git a/sd/source/ui/app/scalectrl.cxx b/sd/source/ui/app/scalectrl.cxx
index 6ab069f8a1e4..d1b8dc277fce 100644
--- a/sd/source/ui/app/scalectrl.cxx
+++ b/sd/source/ui/app/scalectrl.cxx
@@ -83,26 +83,26 @@ void SdScaleControl::Command(const CommandEvent& rCEvt)
::tools::Rectangle aRect(rCEvt.GetMousePosPixel(), Size(1, 1));
weld::Window* pParent = weld::GetPopupParent(GetStatusBar(), aRect);
OString sResult = xPopup->popup_at_rect(pParent, aRect);
- if (!sResult.isEmpty())
- {
- sal_Int32 i = sResult.toUInt32();
- sal_Int32 nX;
- sal_Int32 nY;
- if (i > 11)
- nX = 1;
- else
- nX = aTable[(12 - i) % 12];
- if (i > 11)
- nY = aTable[i % 12];
- else
- nY = 1;
- pDoc->SetUIScale(Fraction(nX, nY));
-
- SfxBindings& pBindings = pViewFrame->GetBindings();
- pBindings.Invalidate(SID_SCALE); //update statusbar
- pBindings.Invalidate(SID_ATTR_METRIC); //update sidebar
- pViewShellBase->UpdateBorder(true); // update ruler
- }
+ if (sResult.isEmpty())
+ return;
+
+ sal_Int32 i = sResult.toUInt32();
+ sal_Int32 nX;
+ sal_Int32 nY;
+ if (i > 11)
+ nX = 1;
+ else
+ nX = aTable[(12 - i) % 12];
+ if (i > 11)
+ nY = aTable[i % 12];
+ else
+ nY = 1;
+ pDoc->SetUIScale(Fraction(nX, nY));
+
+ SfxBindings& pBindings = pViewFrame->GetBindings();
+ pBindings.Invalidate(SID_SCALE); //update statusbar
+ pBindings.Invalidate(SID_ATTR_METRIC); //update sidebar
+ pViewShellBase->UpdateBorder(true); // update ruler
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/app/sdpopup.cxx b/sd/source/ui/app/sdpopup.cxx
index ebccfe8cb4c9..52a0435351de 100644
--- a/sd/source/ui/app/sdpopup.cxx
+++ b/sd/source/ui/app/sdpopup.cxx
@@ -152,19 +152,19 @@ void SdFieldPopup::Fill( LanguageType eLanguage )
void SdFieldPopup::Execute(weld::Window* pParent, const tools::Rectangle& rRect)
{
OString sIdent = m_xPopup->popup_at_rect(pParent, rRect);
- if (!sIdent.isEmpty())
+ if (sIdent.isEmpty())
+ return;
+
+ if (sIdent == "1" || sIdent == "2")
{
- if (sIdent == "1" || sIdent == "2")
- {
- m_xPopup->set_active("1", sIdent == "1");
- m_xPopup->set_active("2", sIdent == "2");
- }
- else
- {
- int nCount = m_xPopup->n_children();
- for (int i = 3; i < nCount; i++)
- m_xPopup->set_active(OString::number(i), sIdent == OString::number(i));
- }
+ m_xPopup->set_active("1", sIdent == "1");
+ m_xPopup->set_active("2", sIdent == "2");
+ }
+ else
+ {
+ int nCount = m_xPopup->n_children();
+ for (int i = 3; i < nCount; i++)
+ m_xPopup->set_active(OString::number(i), sIdent == OString::number(i));
}
}