summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/transfrm.cxx
diff options
context:
space:
mode:
authorKshitij Pathania <kshitijpathania@gmail.com>2017-12-10 22:28:48 +0530
committerTamás Zolnai <tamas.zolnai@collabora.com>2018-01-19 12:47:51 +0100
commit4f344f025a2fe0b8f2359aaf74a91f209e196923 (patch)
treefd0081a011d5f319412afae4c1456b351c342b8f /cui/source/tabpages/transfrm.cxx
parentf2fd69e3c95723eb41ee35c9ff288bef027d2d8b (diff)
tdf#111747 Enabled position protection immediately after protection is checked
Change-Id: I10409fe9e6eb7b932496346224952a7c4012cb38 Reviewed-on: https://gerrit.libreoffice.org/46192 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'cui/source/tabpages/transfrm.cxx')
-rw-r--r--cui/source/tabpages/transfrm.cxx25
1 files changed, 23 insertions, 2 deletions
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 245e823ba6c3..7ce63c79aa0d 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -327,8 +327,14 @@ VclPtr<SfxTabPage> SvxAngleTabPage::Create( vcl::Window* pWindow, const SfxItemS
}
-void SvxAngleTabPage::ActivatePage(const SfxItemSet& /*rSet*/)
+void SvxAngleTabPage::ActivatePage(const SfxItemSet& rSet)
{
+ SfxBoolItem const * bPosProtect = nullptr;
+ if(SfxItemState::SET == rSet.GetItemState( GetWhich(SID_ATTR_TRANSFORM_PROTECT_POS ) , false, reinterpret_cast<SfxPoolItem const **>(&bPosProtect) ))
+ {
+ m_pFlPosition->Enable(!bPosProtect->GetValue());
+ m_pFlAngle->Enable(!bPosProtect->GetValue());
+ }
}
@@ -698,6 +704,18 @@ void SvxSlantTabPage::ActivatePage( const SfxItemSet& rSet )
const ::tools::Rectangle aTempRect(pRectItem->GetValue());
maRange = basegfx::B2DRange(aTempRect.Left(), aTempRect.Top(), aTempRect.Right(), aTempRect.Bottom());
}
+
+ SfxBoolItem const * bPosProtect = nullptr;
+ if(SfxItemState::SET == rSet.GetItemState( GetWhich(SID_ATTR_TRANSFORM_PROTECT_POS ) , false, reinterpret_cast<SfxPoolItem const **>(&bPosProtect) ))
+ {
+ m_pFlAngle->Enable(!bPosProtect->GetValue());
+ }
+ SfxBoolItem const * bSizeProtect = nullptr;
+ if(SfxItemState::SET == rSet.GetItemState( GetWhich(SID_ATTR_TRANSFORM_PROTECT_SIZE ) , false, reinterpret_cast<SfxPoolItem const **>(&bSizeProtect) ))
+ {
+ m_pFlAngle->Enable(!bSizeProtect->GetValue());
+ }
+
}
@@ -1168,7 +1186,10 @@ DeactivateRC SvxPositionSizeTabPage::DeactivatePage( SfxItemSet* _pSet )
basegfx::fround(fX), basegfx::fround(fY),
basegfx::fround(fX + maRange.getWidth()), basegfx::fround(fY + maRange.getHeight()));
_pSet->Put(SfxRectangleItem(SID_ATTR_TRANSFORM_INTERN, aOutRectangle));
-
+ _pSet->Put(SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_POS ),
+ m_pTsbPosProtect->GetState() == TRISTATE_TRUE ));
+ _pSet->Put(SfxBoolItem( GetWhich( SID_ATTR_TRANSFORM_PROTECT_SIZE ),
+ m_pTsbSizeProtect->GetState() == TRISTATE_TRUE ));
FillItemSet(_pSet);
}