diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-02-03 19:38:01 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-02-03 19:52:45 +0100 |
commit | 215e92735dd09954e105a09a5e349ff74009ef9f (patch) | |
tree | 0114ccbc2860b1df36dcb4f3364f95d08a19fcf7 | |
parent | 5bb8a4b2e3137208d307cadf26df5a242b08e507 (diff) |
swpagerelsize ui: disable RelWidthRelation when RelWidthCB is not checked
Change-Id: I422f1f0d9b8436546ba355852fe6b3a21e2d1d23
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 6de74854abe7..3942d5d475fd 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -941,15 +941,18 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) 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) { //calculate the rerference value from the with and relative width values sal_Int32 nSpace = rFrmSize.GetWidth() * 100 / rFrmSize.GetWidthPercent(); m_aWidthED.SetRefValue( nSpace ); - m_pRelWidthRelationLB->InsertEntry(aFramePosString.GetString(SwFPos::FRAME)); - m_pRelWidthRelationLB->InsertEntry(aFramePosString.GetString(SwFPos::REL_PG_FRAME)); + m_pRelWidthRelationLB->Enable(); } + else + m_pRelWidthRelationLB->Disable(); if (rFrmSize.GetHeightPercent() != 0xff && rFrmSize.GetHeightPercent() != 0) { @@ -1733,6 +1736,7 @@ IMPL_LINK( SwFrmPage, RelSizeClickHdl, CheckBox *, pBtn ) if (pBtn == m_pRelWidthCB) { m_aWidthED.ShowPercent(pBtn->IsChecked()); + m_pRelWidthRelationLB->Enable(pBtn->IsChecked()); if(pBtn->IsChecked()) m_aWidthED.get()->SetMax(MAX_PERCENT_WIDTH); } |