Kaydet (Commit) 215e9273 authored tarafından Miklos Vajna's avatar Miklos Vajna

swpagerelsize ui: disable RelWidthRelation when RelWidthCB is not checked

Change-Id: I422f1f0d9b8436546ba355852fe6b3a21e2d1d23
üst 5bb8a4b2
...@@ -941,15 +941,18 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) ...@@ -941,15 +941,18 @@ void SwFrmPage::Reset( const SfxItemSet &rSet )
const SwFmtFrmSize& rFrmSize = (const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE); const SwFmtFrmSize& rFrmSize = (const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE);
m_pRelWidthRelationLB->InsertEntry(aFramePosString.GetString(SwFPos::FRAME));
m_pRelWidthRelationLB->InsertEntry(aFramePosString.GetString(SwFPos::REL_PG_FRAME));
if (rFrmSize.GetWidthPercent() != 0xff && rFrmSize.GetWidthPercent() != 0) if (rFrmSize.GetWidthPercent() != 0xff && rFrmSize.GetWidthPercent() != 0)
{ {
//calculate the rerference value from the with and relative width values //calculate the rerference value from the with and relative width values
sal_Int32 nSpace = rFrmSize.GetWidth() * 100 / rFrmSize.GetWidthPercent(); sal_Int32 nSpace = rFrmSize.GetWidth() * 100 / rFrmSize.GetWidthPercent();
m_aWidthED.SetRefValue( nSpace ); m_aWidthED.SetRefValue( nSpace );
m_pRelWidthRelationLB->InsertEntry(aFramePosString.GetString(SwFPos::FRAME)); m_pRelWidthRelationLB->Enable();
m_pRelWidthRelationLB->InsertEntry(aFramePosString.GetString(SwFPos::REL_PG_FRAME));
} }
else
m_pRelWidthRelationLB->Disable();
if (rFrmSize.GetHeightPercent() != 0xff && rFrmSize.GetHeightPercent() != 0) if (rFrmSize.GetHeightPercent() != 0xff && rFrmSize.GetHeightPercent() != 0)
{ {
...@@ -1733,6 +1736,7 @@ IMPL_LINK( SwFrmPage, RelSizeClickHdl, CheckBox *, pBtn ) ...@@ -1733,6 +1736,7 @@ IMPL_LINK( SwFrmPage, RelSizeClickHdl, CheckBox *, pBtn )
if (pBtn == m_pRelWidthCB) if (pBtn == m_pRelWidthCB)
{ {
m_aWidthED.ShowPercent(pBtn->IsChecked()); m_aWidthED.ShowPercent(pBtn->IsChecked());
m_pRelWidthRelationLB->Enable(pBtn->IsChecked());
if(pBtn->IsChecked()) if(pBtn->IsChecked())
m_aWidthED.get()->SetMax(MAX_PERCENT_WIDTH); m_aWidthED.get()->SetMax(MAX_PERCENT_WIDTH);
} }
......
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