[Libreoffice-commits] core.git: 5 commits - include/vcl sw/AllLangResTarget_sw.mk sw/inc sw/source sw/uiconfig sw/UIConfig_swriter.mk vcl/source
Caolán McNamara
caolanm at redhat.com
Wed Jul 17 08:13:27 PDT 2013
include/vcl/button.hxx | 1
sw/AllLangResTarget_sw.mk | 1
sw/UIConfig_swriter.mk | 1
sw/inc/helpid.h | 1
sw/source/ui/frmdlg/wrap.cxx | 378 +++++++++----------
sw/source/ui/frmdlg/wrap.src | 257 -------------
sw/source/ui/inc/wrap.hxx | 40 --
sw/uiconfig/swriter/ui/wrappage.ui | 708 +++++++++++++++++++++++++++++++++++++
vcl/source/control/button.cxx | 240 +++++++-----
vcl/source/window/builder.cxx | 5
10 files changed, 1050 insertions(+), 582 deletions(-)
New commits:
commit 3bbcae718be74a2e47effeec99655f53f97bed90
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jul 16 19:31:11 2013 +0100
convert frame/graphic wrap page to .ui
Change-Id: I931214850dea1442fa0a4e3314dd339aaff5a789
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
index c4553fd..71f541f 100644
--- a/sw/AllLangResTarget_sw.mk
+++ b/sw/AllLangResTarget_sw.mk
@@ -116,7 +116,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
sw/source/ui/fmtui/tmpdlg.src \
sw/source/ui/frmdlg/frmpage.src \
sw/source/ui/frmdlg/frmui.src \
- sw/source/ui/frmdlg/wrap.src \
sw/source/ui/globdoc/globdoc.src \
sw/source/ui/index/cnttab.src \
sw/source/ui/index/idxmrk.src \
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 4cd89ab..9a770d3 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -135,6 +135,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/titlepage \
sw/uiconfig/swriter/ui/viewoptionspage \
sw/uiconfig/swriter/ui/wordcount \
+ sw/uiconfig/swriter/ui/wrappage \
))
# vim: set noet sw=4 ts=4:
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index c82e46e..cb80c92 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -142,7 +142,6 @@
// TabPage Help-IDs
-#define HID_FRM_EXT "SW_HID_FRM_EXT"
#define HID_FRM_STD "SW_HID_FRM_STD"
#define HID_GRF_EXT "SW_HID_GRF_EXT"
#define HID_LAB_LAB "SW_HID_LAB_LAB"
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index b22ea10..9194bb5 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -70,84 +70,68 @@ SwWrapDlg::~SwWrapDlg()
{
}
-SwWrapTabPage::SwWrapTabPage(Window *pParent, const SfxItemSet &rSet) :
- SfxTabPage(pParent, SW_RES(TP_FRM_WRAP), rSet),
-
- aWrapFLC (this, SW_RES(C_WRAP_FL)),
- aNoWrapRB (this, SW_RES(RB_NO_WRAP)),
- aWrapLeftRB (this, SW_RES(RB_WRAP_LEFT)),
- aWrapRightRB (this, SW_RES(RB_WRAP_RIGHT)),
- aWrapParallelRB (this, SW_RES(RB_WRAP_PARALLEL)),
- aWrapThroughRB (this, SW_RES(RB_WRAP_THROUGH)),
- aIdealWrapRB (this, SW_RES(RB_WRAP_IDEAL)),
-
- aMarginFL (this, SW_RES(FL_MARGIN)),
- aLeftMarginFT (this, SW_RES(FT_LEFT_MARGIN)),
- aLeftMarginED (this, SW_RES(ED_LEFT_MARGIN)),
- aRightMarginFT (this, SW_RES(FT_RIGHT_MARGIN)),
- aRightMarginED (this, SW_RES(ED_RIGHT_MARGIN)),
- aTopMarginFT (this, SW_RES(FT_TOP_MARGIN)),
- aTopMarginED (this, SW_RES(ED_TOP_MARGIN)),
- aBottomMarginFT (this, SW_RES(FT_BOTTOM_MARGIN)),
- aBottomMarginED (this, SW_RES(ED_BOTTOM_MARGIN)),
-
- aOptionsSepFL (this, SW_RES(FL_OPTION_SEP)),
- aOptionsFL (this, SW_RES(FL_OPTION)),
- aWrapAnchorOnlyCB (this, SW_RES(CB_ANCHOR_ONLY)),
- aWrapTransparentCB (this, SW_RES(CB_TRANSPARENT)),
- aWrapOutlineCB (this, SW_RES(CB_OUTLINE)),
- aWrapOutsideCB (this, SW_RES(CB_ONLYOUTSIDE)),
-
- aWrapIL (SW_RES(IL_WRAP)),
-
- nAnchorId(FLY_AT_PARA),
- nHtmlMode(0),
-
- pWrtSh(0),
-
- bFormat(sal_False),
- bNew(sal_True),
- bHtmlMode(sal_False),
- bContourImage(sal_False)
+SwWrapTabPage::SwWrapTabPage(Window *pParent, const SfxItemSet &rSet)
+ : SfxTabPage(pParent, "WrapPage" , "modules/swriter/ui/wrappage.ui", rSet)
+ , nAnchorId(FLY_AT_PARA)
+ , nHtmlMode(0)
+ , pWrtSh(0)
+ , bFormat(false)
+ , bNew(true)
+ , bHtmlMode(false)
+ , bContourImage(false)
{
- FreeResource();
+ get(m_pNoWrapRB, "none");
+ get(m_pWrapLeftRB, "before");
+ get(m_pWrapRightRB, "after");
+ get(m_pWrapParallelRB, "parallel");
+ get(m_pWrapThroughRB, "through");
+ get(m_pIdealWrapRB, "optimal");
+ get(m_pLeftMarginED, "left");
+ get(m_pRightMarginED, "right");
+ get(m_pTopMarginED, "top");
+ get(m_pBottomMarginED, "bottom");
+ get(m_pWrapAnchorOnlyCB, "anchoronly");
+ get(m_pWrapTransparentCB, "transparent");
+ get(m_pWrapOutlineCB, "outline");
+ get(m_pWrapOutsideCB, "outside");
+
SetExchangeSupport();
Link aLk = LINK(this, SwWrapTabPage, RangeModifyHdl);
- aLeftMarginED.SetUpHdl(aLk);
- aLeftMarginED.SetDownHdl(aLk);
- aLeftMarginED.SetFirstHdl(aLk);
- aLeftMarginED.SetLastHdl(aLk);
- aLeftMarginED.SetLoseFocusHdl(aLk);
-
- aRightMarginED.SetUpHdl(aLk);
- aRightMarginED.SetDownHdl(aLk);
- aRightMarginED.SetFirstHdl(aLk);
- aRightMarginED.SetLastHdl(aLk);
- aRightMarginED.SetLoseFocusHdl(aLk);
-
- aTopMarginED.SetUpHdl(aLk);
- aTopMarginED.SetDownHdl(aLk);
- aTopMarginED.SetFirstHdl(aLk);
- aTopMarginED.SetLastHdl(aLk);
- aTopMarginED.SetLoseFocusHdl(aLk);
-
- aBottomMarginED.SetUpHdl(aLk);
- aBottomMarginED.SetDownHdl(aLk);
- aBottomMarginED.SetFirstHdl(aLk);
- aBottomMarginED.SetLastHdl(aLk);
- aBottomMarginED.SetLoseFocusHdl(aLk);
+ m_pLeftMarginED->SetUpHdl(aLk);
+ m_pLeftMarginED->SetDownHdl(aLk);
+ m_pLeftMarginED->SetFirstHdl(aLk);
+ m_pLeftMarginED->SetLastHdl(aLk);
+ m_pLeftMarginED->SetLoseFocusHdl(aLk);
+
+ m_pRightMarginED->SetUpHdl(aLk);
+ m_pRightMarginED->SetDownHdl(aLk);
+ m_pRightMarginED->SetFirstHdl(aLk);
+ m_pRightMarginED->SetLastHdl(aLk);
+ m_pRightMarginED->SetLoseFocusHdl(aLk);
+
+ m_pTopMarginED->SetUpHdl(aLk);
+ m_pTopMarginED->SetDownHdl(aLk);
+ m_pTopMarginED->SetFirstHdl(aLk);
+ m_pTopMarginED->SetLastHdl(aLk);
+ m_pTopMarginED->SetLoseFocusHdl(aLk);
+
+ m_pBottomMarginED->SetUpHdl(aLk);
+ m_pBottomMarginED->SetDownHdl(aLk);
+ m_pBottomMarginED->SetFirstHdl(aLk);
+ m_pBottomMarginED->SetLastHdl(aLk);
+ m_pBottomMarginED->SetLoseFocusHdl(aLk);
aLk = LINK(this, SwWrapTabPage, WrapTypeHdl);
- aNoWrapRB.SetClickHdl(aLk);
- aWrapLeftRB.SetClickHdl(aLk);
- aWrapRightRB.SetClickHdl(aLk);
- aWrapParallelRB.SetClickHdl(aLk);
- aWrapThroughRB.SetClickHdl(aLk);
- aIdealWrapRB.SetClickHdl(aLk);
+ m_pNoWrapRB->SetClickHdl(aLk);
+ m_pWrapLeftRB->SetClickHdl(aLk);
+ m_pWrapRightRB->SetClickHdl(aLk);
+ m_pWrapParallelRB->SetClickHdl(aLk);
+ m_pWrapThroughRB->SetClickHdl(aLk);
+ m_pIdealWrapRB->SetClickHdl(aLk);
ApplyImageList();
- aWrapOutlineCB.SetClickHdl(LINK(this, SwWrapTabPage, ContourHdl));
+ m_pWrapOutlineCB->SetClickHdl(LINK(this, SwWrapTabPage, ContourHdl));
}
SwWrapTabPage::~SwWrapTabPage()
@@ -164,12 +148,12 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
// contour for Draw, Graphic and OLE (Insert/Graphic/Properties still missing!)
if( bDrawMode )
{
- aWrapOutlineCB.Show();
- aWrapOutsideCB.Show();
+ m_pWrapOutlineCB->Show();
+ m_pWrapOutsideCB->Show();
- aWrapTransparentCB.Check( 0 == ((const SfxInt16Item&)rSet.Get(
+ m_pWrapTransparentCB->Check( 0 == ((const SfxInt16Item&)rSet.Get(
FN_DRAW_WRAP_DLG)).GetValue() );
- aWrapTransparentCB.SaveValue();
+ m_pWrapTransparentCB->SaveValue();
}
else
{
@@ -184,8 +168,8 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
}
if( bShowCB )
{
- aWrapOutlineCB.Show();
- aWrapOutsideCB.Show();
+ m_pWrapOutlineCB->Show();
+ m_pWrapOutsideCB->Show();
}
}
@@ -193,10 +177,10 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
bHtmlMode = nHtmlMode & HTMLMODE_ON ? sal_True : sal_False;
FieldUnit aMetric = ::GetDfltMetric(bHtmlMode);
- SetMetric( aLeftMarginED , aMetric );
- SetMetric( aRightMarginED , aMetric );
- SetMetric( aTopMarginED , aMetric );
- SetMetric( aBottomMarginED, aMetric );
+ SetMetric(*m_pLeftMarginED, aMetric);
+ SetMetric(*m_pRightMarginED, aMetric);
+ SetMetric(*m_pTopMarginED, aMetric);
+ SetMetric(*m_pBottomMarginED, aMetric);
const SwFmtSurround& rSurround = (const SwFmtSurround&)rSet.Get(RES_SURROUND);
@@ -207,60 +191,60 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
if (((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR))
&& (nSur != SURROUND_NONE))
{
- aWrapAnchorOnlyCB.Check( rSurround.IsAnchorOnly() );
+ m_pWrapAnchorOnlyCB->Check( rSurround.IsAnchorOnly() );
}
else
{
- aWrapAnchorOnlyCB.Enable( sal_False );
+ m_pWrapAnchorOnlyCB->Enable( sal_False );
}
sal_Bool bContour = rSurround.IsContour();
- aWrapOutlineCB.Check( bContour );
- aWrapOutsideCB.Check( rSurround.IsOutside() );
- aWrapThroughRB.Enable(!aWrapOutlineCB.IsChecked());
+ m_pWrapOutlineCB->Check( bContour );
+ m_pWrapOutsideCB->Check( rSurround.IsOutside() );
+ m_pWrapThroughRB->Enable(!m_pWrapOutlineCB->IsChecked());
bContourImage = !bContour;
- ImageRadioButton* pBtn = NULL;
+ RadioButton* pBtn = NULL;
switch (nSur)
{
case SURROUND_NONE:
{
- pBtn = &aNoWrapRB;
+ pBtn = m_pNoWrapRB;
break;
}
case SURROUND_THROUGHT:
{
// transparent ?
- pBtn = &aWrapThroughRB;
+ pBtn = m_pWrapThroughRB;
if (!bDrawMode)
{
const SvxOpaqueItem& rOpaque = (const SvxOpaqueItem&)rSet.Get(RES_OPAQUE);
- aWrapTransparentCB.Check(!rOpaque.GetValue());
+ m_pWrapTransparentCB->Check(!rOpaque.GetValue());
}
break;
}
case SURROUND_PARALLEL:
{
- pBtn = &aWrapParallelRB;
+ pBtn = m_pWrapParallelRB;
break;
}
case SURROUND_IDEAL:
{
- pBtn = &aIdealWrapRB;
+ pBtn = m_pIdealWrapRB;
break;
}
default:
{
if (nSur == SURROUND_LEFT)
- pBtn = &aWrapLeftRB;
+ pBtn = m_pWrapLeftRB;
else if (nSur == SURROUND_RIGHT)
- pBtn = &aWrapRightRB;
+ pBtn = m_pWrapRightRB;
}
}
if (pBtn)
@@ -270,19 +254,19 @@ void SwWrapTabPage::Reset(const SfxItemSet &rSet)
// For character objects that currently are in passage, the default
// "contour on" is prepared here, in case we switch to any other
// passage later.
- if (bDrawMode && !aWrapOutlineCB.IsEnabled())
- aWrapOutlineCB.Check();
+ if (bDrawMode && !m_pWrapOutlineCB->IsEnabled())
+ m_pWrapOutlineCB->Check();
}
- aWrapTransparentCB.Enable( pBtn == &aWrapThroughRB && !bHtmlMode );
+ m_pWrapTransparentCB->Enable( pBtn == m_pWrapThroughRB && !bHtmlMode );
const SvxULSpaceItem& rUL = (const SvxULSpaceItem&)rSet.Get(RES_UL_SPACE);
const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&)rSet.Get(RES_LR_SPACE);
// gap to text
- aLeftMarginED.SetValue(aLeftMarginED.Normalize(rLR.GetLeft()), FUNIT_TWIP);
- aRightMarginED.SetValue(aRightMarginED.Normalize(rLR.GetRight()), FUNIT_TWIP);
- aTopMarginED.SetValue(aTopMarginED.Normalize(rUL.GetUpper()), FUNIT_TWIP);
- aBottomMarginED.SetValue(aBottomMarginED.Normalize(rUL.GetLower()), FUNIT_TWIP);
+ m_pLeftMarginED->SetValue(m_pLeftMarginED->Normalize(rLR.GetLeft()), FUNIT_TWIP);
+ m_pRightMarginED->SetValue(m_pRightMarginED->Normalize(rLR.GetRight()), FUNIT_TWIP);
+ m_pTopMarginED->SetValue(m_pTopMarginED->Normalize(rUL.GetUpper()), FUNIT_TWIP);
+ m_pBottomMarginED->SetValue(m_pBottomMarginED->Normalize(rUL.GetLower()), FUNIT_TWIP);
ContourHdl(0);
ActivatePage( rSet );
@@ -308,29 +292,29 @@ sal_Bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
aOp.SetValue(sal_True);
}
- if (aNoWrapRB.IsChecked())
+ if (m_pNoWrapRB->IsChecked())
aSur.SetSurround(SURROUND_NONE);
- else if (aWrapLeftRB.IsChecked())
+ else if (m_pWrapLeftRB->IsChecked())
aSur.SetSurround(SURROUND_LEFT);
- else if (aWrapRightRB.IsChecked())
+ else if (m_pWrapRightRB->IsChecked())
aSur.SetSurround(SURROUND_RIGHT);
- else if (aWrapParallelRB.IsChecked())
+ else if (m_pWrapParallelRB->IsChecked())
aSur.SetSurround(SURROUND_PARALLEL);
- else if (aWrapThroughRB.IsChecked())
+ else if (m_pWrapThroughRB->IsChecked())
{
aSur.SetSurround(SURROUND_THROUGHT);
- if (aWrapTransparentCB.IsChecked() && !bDrawMode)
+ if (m_pWrapTransparentCB->IsChecked() && !bDrawMode)
aOp.SetValue(sal_False);
}
- else if (aIdealWrapRB.IsChecked())
+ else if (m_pIdealWrapRB->IsChecked())
aSur.SetSurround(SURROUND_IDEAL);
- aSur.SetAnchorOnly( aWrapAnchorOnlyCB.IsChecked() );
- sal_Bool bContour = aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled();
+ aSur.SetAnchorOnly( m_pWrapAnchorOnlyCB->IsChecked() );
+ sal_Bool bContour = m_pWrapOutlineCB->IsChecked() && m_pWrapOutlineCB->IsEnabled();
aSur.SetContour( bContour );
if ( bContour )
- aSur.SetOutside(aWrapOutsideCB.IsChecked());
+ aSur.SetOutside(m_pWrapOutsideCB->IsChecked());
if(0 == (pOldItem = GetOldItem( rSet, RES_SURROUND )) ||
aSur != *pOldItem )
@@ -349,12 +333,12 @@ sal_Bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
}
}
- sal_Bool bTopMod = aTopMarginED.IsValueModified();
- sal_Bool bBottomMod = aBottomMarginED.IsValueModified();
+ sal_Bool bTopMod = m_pTopMarginED->IsValueModified();
+ sal_Bool bBottomMod = m_pBottomMarginED->IsValueModified();
SvxULSpaceItem aUL( RES_UL_SPACE );
- aUL.SetUpper((sal_uInt16)aTopMarginED.Denormalize(aTopMarginED.GetValue(FUNIT_TWIP)));
- aUL.SetLower((sal_uInt16)aBottomMarginED.Denormalize(aBottomMarginED.GetValue(FUNIT_TWIP)));
+ aUL.SetUpper((sal_uInt16)m_pTopMarginED->Denormalize(m_pTopMarginED->GetValue(FUNIT_TWIP)));
+ aUL.SetLower((sal_uInt16)m_pBottomMarginED->Denormalize(m_pBottomMarginED->GetValue(FUNIT_TWIP)));
if ( bTopMod || bBottomMod )
{
@@ -366,12 +350,12 @@ sal_Bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
}
}
- sal_Bool bLeftMod = aLeftMarginED.IsValueModified();
- sal_Bool bRightMod = aRightMarginED.IsValueModified();
+ sal_Bool bLeftMod = m_pLeftMarginED->IsValueModified();
+ sal_Bool bRightMod = m_pRightMarginED->IsValueModified();
SvxLRSpaceItem aLR( RES_LR_SPACE );
- aLR.SetLeft((sal_uInt16)aLeftMarginED.Denormalize(aLeftMarginED.GetValue(FUNIT_TWIP)));
- aLR.SetRight((sal_uInt16)aRightMarginED.Denormalize(aRightMarginED.GetValue(FUNIT_TWIP)));
+ aLR.SetLeft((sal_uInt16)m_pLeftMarginED->Denormalize(m_pLeftMarginED->GetValue(FUNIT_TWIP)));
+ aLR.SetRight((sal_uInt16)m_pRightMarginED->Denormalize(m_pRightMarginED->GetValue(FUNIT_TWIP)));
if ( bLeftMod || bRightMod )
{
@@ -385,8 +369,8 @@ sal_Bool SwWrapTabPage::FillItemSet(SfxItemSet &rSet)
if ( bDrawMode )
{
- sal_Bool bChecked = aWrapTransparentCB.IsChecked() & aWrapTransparentCB.IsEnabled();
- if (aWrapTransparentCB.GetSavedValue() != bChecked)
+ sal_Bool bChecked = m_pWrapTransparentCB->IsChecked() & m_pWrapTransparentCB->IsEnabled();
+ if (m_pWrapTransparentCB->GetSavedValue() != bChecked)
bModified |= 0 != rSet.Put(SfxInt16Item(FN_DRAW_WRAP_DLG, bChecked ? 0 : 1));
}
@@ -488,94 +472,94 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet)
nRight = nLeft;
}
- aLeftMarginED.SetMax(aLeftMarginED.Normalize(nLeft), FUNIT_TWIP);
- aRightMarginED.SetMax(aRightMarginED.Normalize(nRight), FUNIT_TWIP);
+ m_pLeftMarginED->SetMax(m_pLeftMarginED->Normalize(nLeft), FUNIT_TWIP);
+ m_pRightMarginED->SetMax(m_pRightMarginED->Normalize(nRight), FUNIT_TWIP);
- aTopMarginED.SetMax(aTopMarginED.Normalize(nTop), FUNIT_TWIP);
- aBottomMarginED.SetMax(aBottomMarginED.Normalize(nBottom), FUNIT_TWIP);
+ m_pTopMarginED->SetMax(m_pTopMarginED->Normalize(nTop), FUNIT_TWIP);
+ m_pBottomMarginED->SetMax(m_pBottomMarginED->Normalize(nBottom), FUNIT_TWIP);
- RangeModifyHdl(&aLeftMarginED);
- RangeModifyHdl(&aTopMarginED);
+ RangeModifyHdl(m_pLeftMarginED);
+ RangeModifyHdl(m_pTopMarginED);
}
const SwFmtSurround& rSurround = (const SwFmtSurround&)rSet.Get(RES_SURROUND);
SwSurround nSur = rSurround.GetSurround();
- aWrapTransparentCB.Enable( bEnable && !bHtmlMode && nSur == SURROUND_THROUGHT );
+ m_pWrapTransparentCB->Enable( bEnable && !bHtmlMode && nSur == SURROUND_THROUGHT );
if(bHtmlMode)
{
const SwFmtHoriOrient& rHori = (const SwFmtHoriOrient&)rSet.Get(RES_HORI_ORIENT);
sal_Int16 eHOrient = rHori.GetHoriOrient();
sal_Int16 eHRelOrient = rHori.GetRelationOrient();
- aWrapOutlineCB.Hide();
+ m_pWrapOutlineCB->Hide();
const bool bAllHtmlModes =
((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR)) &&
(eHOrient == text::HoriOrientation::RIGHT || eHOrient == text::HoriOrientation::LEFT);
- aWrapAnchorOnlyCB.Enable( bAllHtmlModes && nSur != SURROUND_NONE );
- aWrapOutsideCB.Hide();
- aIdealWrapRB.Enable( sal_False );
+ m_pWrapAnchorOnlyCB->Enable( bAllHtmlModes && nSur != SURROUND_NONE );
+ m_pWrapOutsideCB->Hide();
+ m_pIdealWrapRB->Enable( sal_False );
- aWrapTransparentCB.Enable( sal_False );
- aNoWrapRB.Enable( FLY_AT_PARA == nAnchorId );
- aWrapParallelRB.Enable( sal_False );
- aWrapLeftRB .Enable
+ m_pWrapTransparentCB->Enable( sal_False );
+ m_pNoWrapRB->Enable( FLY_AT_PARA == nAnchorId );
+ m_pWrapParallelRB->Enable( sal_False );
+ m_pWrapLeftRB->Enable
( (FLY_AT_PARA == nAnchorId)
|| ( (FLY_AT_CHAR == nAnchorId)
&& (eHOrient == text::HoriOrientation::RIGHT)
&& (eHRelOrient == text::RelOrientation::PRINT_AREA)));
- aWrapRightRB .Enable
+ m_pWrapRightRB->Enable
( (FLY_AT_PARA == nAnchorId)
|| ( (FLY_AT_CHAR == nAnchorId)
&& (eHOrient == text::HoriOrientation::LEFT)
&& (eHRelOrient == text::RelOrientation::PRINT_AREA)));
- aWrapThroughRB.Enable
+ m_pWrapThroughRB->Enable
( ( (FLY_AT_PAGE == nAnchorId)
|| ( (FLY_AT_CHAR == nAnchorId)
&& (eHRelOrient != text::RelOrientation::PRINT_AREA))
|| (FLY_AT_PARA == nAnchorId))
&& (eHOrient != text::HoriOrientation::RIGHT));
- if(aNoWrapRB.IsChecked() && !aNoWrapRB.IsEnabled())
+ if(m_pNoWrapRB->IsChecked() && !m_pNoWrapRB->IsEnabled())
{
- if(aWrapThroughRB.IsEnabled())
- aWrapThroughRB.Check(sal_True);
- else if(aWrapLeftRB.IsEnabled())
- aWrapLeftRB.Check();
- else if(aWrapRightRB.IsEnabled())
- aWrapRightRB.Check();
+ if(m_pWrapThroughRB->IsEnabled())
+ m_pWrapThroughRB->Check(sal_True);
+ else if(m_pWrapLeftRB->IsEnabled())
+ m_pWrapLeftRB->Check();
+ else if(m_pWrapRightRB->IsEnabled())
+ m_pWrapRightRB->Check();
}
- if(aWrapLeftRB.IsChecked() && !aWrapLeftRB.IsEnabled())
+ if(m_pWrapLeftRB->IsChecked() && !m_pWrapLeftRB->IsEnabled())
{
- if(aWrapRightRB.IsEnabled())
- aWrapRightRB.Check();
- else if(aWrapThroughRB.IsEnabled())
- aWrapThroughRB.Check();
+ if(m_pWrapRightRB->IsEnabled())
+ m_pWrapRightRB->Check();
+ else if(m_pWrapThroughRB->IsEnabled())
+ m_pWrapThroughRB->Check();
}
- if(aWrapRightRB.IsChecked() && !aWrapRightRB.IsEnabled())
+ if(m_pWrapRightRB->IsChecked() && !m_pWrapRightRB->IsEnabled())
{
- if(aWrapLeftRB.IsEnabled())
- aWrapLeftRB.Check();
- else if(aWrapThroughRB.IsEnabled())
- aWrapThroughRB.Check();
+ if(m_pWrapLeftRB->IsEnabled())
+ m_pWrapLeftRB->Check();
+ else if(m_pWrapThroughRB->IsEnabled())
+ m_pWrapThroughRB->Check();
}
- if(aWrapThroughRB.IsChecked() && !aWrapThroughRB.IsEnabled())
- if(aNoWrapRB.IsEnabled())
- aNoWrapRB.Check();
+ if(m_pWrapThroughRB->IsChecked() && !m_pWrapThroughRB->IsEnabled())
+ if(m_pNoWrapRB->IsEnabled())
+ m_pNoWrapRB->Check();
- if(aWrapParallelRB.IsChecked() && !aWrapParallelRB.IsEnabled())
- aWrapThroughRB.Check();
+ if(m_pWrapParallelRB->IsChecked() && !m_pWrapParallelRB->IsEnabled())
+ m_pWrapThroughRB->Check();
}
else
{
- aNoWrapRB.Enable( bEnable );
- aWrapLeftRB.Enable( bEnable );
- aWrapRightRB.Enable( bEnable );
- aIdealWrapRB.Enable( bEnable );
- aWrapThroughRB.Enable( bEnable );
- aWrapParallelRB.Enable( bEnable );
- aWrapAnchorOnlyCB.Enable(
+ m_pNoWrapRB->Enable( bEnable );
+ m_pWrapLeftRB->Enable( bEnable );
+ m_pWrapRightRB->Enable( bEnable );
+ m_pIdealWrapRB->Enable( bEnable );
+ m_pWrapThroughRB->Enable( bEnable );
+ m_pWrapParallelRB->Enable( bEnable );
+ m_pWrapAnchorOnlyCB->Enable(
((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR))
&& nSur != SURROUND_NONE );
}
@@ -598,14 +582,14 @@ IMPL_LINK( SwWrapTabPage, RangeModifyHdl, MetricField *, pEdit )
sal_Int64 nValue = pEdit->GetValue();
MetricField *pOpposite = 0;
- if (pEdit == &aLeftMarginED)
- pOpposite = &aRightMarginED;
- else if (pEdit == &aRightMarginED)
- pOpposite = &aLeftMarginED;
- else if (pEdit == &aTopMarginED)
- pOpposite = &aBottomMarginED;
- else if (pEdit == &aBottomMarginED)
- pOpposite = &aTopMarginED;
+ if (pEdit == m_pLeftMarginED)
+ pOpposite = m_pRightMarginED;
+ else if (pEdit == m_pRightMarginED)
+ pOpposite = m_pLeftMarginED;
+ else if (pEdit == m_pTopMarginED)
+ pOpposite = m_pBottomMarginED;
+ else if (pEdit == m_pBottomMarginED)
+ pOpposite = m_pTopMarginED;
OSL_ASSERT(pOpposite);
@@ -620,16 +604,16 @@ IMPL_LINK( SwWrapTabPage, RangeModifyHdl, MetricField *, pEdit )
return 0;
}
-IMPL_LINK( SwWrapTabPage, WrapTypeHdl, ImageRadioButton *, pBtn )
+IMPL_LINK( SwWrapTabPage, WrapTypeHdl, RadioButton *, pBtn )
{
- sal_Bool bWrapThrough = (pBtn == &aWrapThroughRB);
- aWrapTransparentCB.Enable( bWrapThrough && !bHtmlMode );
+ sal_Bool bWrapThrough = (pBtn == m_pWrapThroughRB);
+ m_pWrapTransparentCB->Enable( bWrapThrough && !bHtmlMode );
bWrapThrough |= ( nAnchorId == FLY_AS_CHAR );
- aWrapOutlineCB.Enable( !bWrapThrough && pBtn != &aNoWrapRB);
- aWrapOutsideCB.Enable( !bWrapThrough && aWrapOutlineCB.IsChecked() );
- aWrapAnchorOnlyCB.Enable(
+ m_pWrapOutlineCB->Enable( !bWrapThrough && pBtn != m_pNoWrapRB);
+ m_pWrapOutsideCB->Enable( !bWrapThrough && m_pWrapOutlineCB->IsChecked() );
+ m_pWrapAnchorOnlyCB->Enable(
((nAnchorId == FLY_AT_PARA) || (nAnchorId == FLY_AT_CHAR)) &&
- (pBtn != &aNoWrapRB) );
+ (pBtn != m_pNoWrapRB) );
ContourHdl(0);
return 0;
@@ -637,11 +621,11 @@ IMPL_LINK( SwWrapTabPage, WrapTypeHdl, ImageRadioButton *, pBtn )
IMPL_LINK_NOARG(SwWrapTabPage, ContourHdl)
{
- sal_Bool bEnable = !(aWrapOutlineCB.IsChecked() && aWrapOutlineCB.IsEnabled());
+ sal_Bool bEnable = !(m_pWrapOutlineCB->IsChecked() && m_pWrapOutlineCB->IsEnabled());
- aWrapOutsideCB.Enable(!bEnable);
+ m_pWrapOutsideCB->Enable(!bEnable);
- bEnable = !aWrapOutlineCB.IsChecked();
+ bEnable = !m_pWrapOutlineCB->IsChecked();
if (bEnable == bContourImage) // so that it doesn't always flicker
{
bContourImage = !bEnable;
@@ -667,25 +651,23 @@ void SwWrapTabPage::DataChanged( const DataChangedEvent& rDCEvt )
void SwWrapTabPage::ApplyImageList()
{
- ImageList& rImgLst = aWrapIL;
-
- aWrapThroughRB.SetModeRadioImage(rImgLst.GetImage(IMG_THROUGH));
- sal_Bool bWrapOutline = !aWrapOutlineCB.IsChecked();
+ m_pWrapThroughRB->SetModeRadioImage(get<FixedImage>("imgthrough")->GetImage());
+ sal_Bool bWrapOutline = !m_pWrapOutlineCB->IsChecked();
if(bWrapOutline)
{
- aNoWrapRB.SetModeRadioImage( rImgLst.GetImage( IMG_NONE ));
- aWrapLeftRB.SetModeRadioImage( rImgLst.GetImage( IMG_LEFT ));
- aWrapRightRB.SetModeRadioImage( rImgLst.GetImage( IMG_RIGHT ));
- aWrapParallelRB.SetModeRadioImage( rImgLst.GetImage( IMG_PARALLEL ));
- aIdealWrapRB.SetModeRadioImage( rImgLst.GetImage( IMG_IDEAL ));
+ m_pNoWrapRB->SetModeRadioImage(get<FixedImage>("imgnone")->GetImage());
+ m_pWrapLeftRB->SetModeRadioImage(get<FixedImage>("imgleft")->GetImage());
+ m_pWrapRightRB->SetModeRadioImage(get<FixedImage>("imgright")->GetImage());
+ m_pWrapParallelRB->SetModeRadioImage(get<FixedImage>("imgparallel")->GetImage());
+ m_pIdealWrapRB->SetModeRadioImage(get<FixedImage>("imgideal")->GetImage());
}
else
{
- aNoWrapRB.SetModeRadioImage( rImgLst.GetImage( IMG_KON_NONE ));
- aWrapLeftRB.SetModeRadioImage( rImgLst.GetImage( IMG_KON_LEFT ));
- aWrapRightRB.SetModeRadioImage( rImgLst.GetImage( IMG_KON_RIGHT ));
- aWrapParallelRB.SetModeRadioImage( rImgLst.GetImage( IMG_KON_PARALLEL ));
- aIdealWrapRB.SetModeRadioImage( rImgLst.GetImage( IMG_KON_IDEAL ));
+ m_pNoWrapRB->SetModeRadioImage(get<FixedImage>("imgkonnone")->GetImage());
+ m_pWrapLeftRB->SetModeRadioImage(get<FixedImage>("imgkonleft")->GetImage());
+ m_pWrapRightRB->SetModeRadioImage(get<FixedImage>("imgkonright")->GetImage());
+ m_pWrapParallelRB->SetModeRadioImage(get<FixedImage>("imgkonparallel")->GetImage());
+ m_pIdealWrapRB->SetModeRadioImage(get<FixedImage>("imgkonideal")->GetImage());
}
}
diff --git a/sw/source/ui/frmdlg/wrap.src b/sw/source/ui/frmdlg/wrap.src
deleted file mode 100644
index 3993ef5..0000000
--- a/sw/source/ui/frmdlg/wrap.src
+++ /dev/null
@@ -1,257 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "frmui.hrc"
-#include "wrap.hrc"
-#include "globals.hrc"
-#include "helpid.h"
-TabPage TP_FRM_WRAP
-{
- SVLook = TRUE ;
- HelpID = HID_FRM_EXT ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
- Hide = TRUE;
- FixedLine C_WRAP_FL
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Settings";
- };
- ImageRadioButton RB_NO_WRAP
- {
- HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_NO_WRAP";
- Pos = MAP_APPFONT ( 6 , 14 ) ;
- Size = MAP_APPFONT ( 40 , 37 ) ;
- WordBreak = TRUE;
- Text [ en-US ] = "~None" ;
- TopImage = True ;
- };
- ImageRadioButton RB_WRAP_LEFT
- {
- HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_LEFT";
- Pos = MAP_APPFONT ( 65 , 14 ) ;
- Size = MAP_APPFONT ( 40 , 37 ) ;
- WordBreak = TRUE;
- TopImage = True ;
- Text [ en-US ] = "Before" ;
- };
- ImageRadioButton RB_WRAP_RIGHT
- {
- HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_RIGHT";
- Pos = MAP_APPFONT ( 121 , 14 ) ;
- Size = MAP_APPFONT ( 40 , 37 ) ;
- WordBreak = TRUE;
- TopImage = True ;
- Text [ en-US ] = "After" ;
- };
- ImageRadioButton RB_WRAP_PARALLEL
- {
- HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_PARALLEL";
- Pos = MAP_APPFONT ( 177 , 14 ) ;
- Size = MAP_APPFONT ( 40 , 37 ) ;
- WordBreak = TRUE;
- Text [ en-US ] = "~Parallel" ;
- TopImage = True ;
- };
- ImageRadioButton RB_WRAP_THROUGH
- {
- HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_THROUGH";
- Pos = MAP_APPFONT ( 6 , 57 ) ;
- Size = MAP_APPFONT ( 40 , 37 ) ;
- WordBreak = TRUE;
- Text [ en-US ] = "Thro~ugh" ;
- TopImage = True ;
- };
- ImageRadioButton RB_WRAP_IDEAL
- {
- HelpID = "sw:ImageRadioButton:TP_FRM_WRAP:RB_WRAP_IDEAL";
- Pos = MAP_APPFONT ( 65 , 57 ) ;
- Size = MAP_APPFONT ( 40 , 37 ) ;
- WordBreak = TRUE;
- TopImage = True ;
- Text [ en-US ] = "~Optimal" ;
- };
-
- CheckBox CB_ANCHOR_ONLY
- {
- HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_ANCHOR_ONLY";
- Pos = MAP_APPFONT ( 139 , 111 ) ;
- Size = MAP_APPFONT ( 109 , 10 ) ;
- Text [ en-US ] = "~First paragraph" ;
- };
- CheckBox CB_TRANSPARENT
- {
- HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_TRANSPARENT";
- Pos = MAP_APPFONT ( 139 , 125 ) ;
- Size = MAP_APPFONT ( 109 , 10 ) ;
- Text [ en-US ] = "In bac~kground" ;
- };
- CheckBox CB_OUTLINE
- {
- HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_OUTLINE";
- Pos = MAP_APPFONT ( 139 , 139 ) ;
- Size = MAP_APPFONT ( 109 , 10 ) ;
- Hide = TRUE ;
- Text [ en-US ] = "~Contour" ;
- };
- CheckBox CB_ONLYOUTSIDE
- {
- HelpID = "sw:CheckBox:TP_FRM_WRAP:CB_ONLYOUTSIDE";
- Pos = MAP_APPFONT ( 139 , 153 ) ;
- Size = MAP_APPFONT ( 109 , 10 ) ;
- Hide = TRUE ;
- Text [ en-US ] = "Outside only" ;
- };
- FixedLine FL_OPTION
- {
- Pos = MAP_APPFONT ( 133 , 100 ) ;
- Size = MAP_APPFONT ( 121 , 8 ) ;
- Text [ en-US ] = "Options" ;
- };
- FixedLine FL_OPTION_SEP
- {
- Pos = MAP_APPFONT ( 128 , 111 ) ;
- Size = MAP_APPFONT ( 4 , 60 ) ;
- Vert = TRUE;
- };
- FixedText FT_LEFT_MARGIN
- {
- Pos = MAP_APPFONT ( 12 , 113 ) ;
- Size = MAP_APPFONT ( 60 , 8 ) ;
- Text [ en-US ] = "L~eft" ;
- Left = TRUE ;
- };
- MetricField ED_LEFT_MARGIN
- {
- HelpID = "sw:MetricField:TP_FRM_WRAP:ED_LEFT_MARGIN";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 81 , 111 ) ;
- Size = MAP_APPFONT ( 40 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Maximum = 9999 ;
- DecimalDigits = 2 ;
- Unit = FUNIT_CM ;
- Last = 9999 ;
- SpinSize = 10 ;
- };
- FixedText FT_RIGHT_MARGIN
- {
- Pos = MAP_APPFONT ( 12 , 129 ) ;
- Size = MAP_APPFONT ( 60 , 8 ) ;
- Text [ en-US ] = "~Right" ;
- Left = TRUE ;
- };
- MetricField ED_RIGHT_MARGIN
- {
- HelpID = "sw:MetricField:TP_FRM_WRAP:ED_RIGHT_MARGIN";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 81 , 127 ) ;
- Size = MAP_APPFONT ( 40 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Maximum = 9999 ;
- DecimalDigits = 2 ;
- Unit = FUNIT_CM ;
- Last = 9999 ;
- SpinSize = 10 ;
- };
- FixedText FT_TOP_MARGIN
- {
- Pos = MAP_APPFONT ( 12 , 145 ) ;
- Size = MAP_APPFONT ( 60 , 8 ) ;
- Text [ en-US ] = "~Top" ;
- Left = TRUE ;
- };
- MetricField ED_TOP_MARGIN
- {
- HelpID = "sw:MetricField:TP_FRM_WRAP:ED_TOP_MARGIN";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 81 , 143 ) ;
- Size = MAP_APPFONT ( 40 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Maximum = 9999 ;
- DecimalDigits = 2 ;
- Unit = FUNIT_CM ;
- Last = 9999 ;
- SpinSize = 10 ;
- };
- FixedText FT_BOTTOM_MARGIN
- {
- Pos = MAP_APPFONT ( 12 , 161 ) ;
- Size = MAP_APPFONT ( 60 , 8 ) ;
- Text [ en-US ] = "~Bottom" ;
- Left = TRUE ;
- };
- MetricField ED_BOTTOM_MARGIN
- {
- HelpID = "sw:MetricField:TP_FRM_WRAP:ED_BOTTOM_MARGIN";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 81 , 159 ) ;
- Size = MAP_APPFONT ( 40 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Maximum = 9999 ;
- DecimalDigits = 2 ;
- Unit = FUNIT_CM ;
- Last = 9999 ;
- SpinSize = 10 ;
- };
- FixedLine FL_MARGIN
- {
- Pos = MAP_APPFONT ( 6 , 100 ) ;
- Size = MAP_APPFONT ( 121 , 8 ) ;
- Text [ en-US ] = "Spacing" ;
- };
-#define WRAP_IDLIST \
- IdList = \
- { \
- IMG_NONE ; \
- IMG_LEFT ; \
- IMG_RIGHT ; \
- IMG_PARALLEL ; \
- IMG_THROUGH ; \
- IMG_IDEAL ; \
- IMG_KON_NONE ; \
- IMG_KON_LEFT ; \
- IMG_KON_RIGHT ; \
- IMG_KON_PARALLEL ;\
- IMG_KON_IDEAL ;\
- }; \
- IdCount = { 11 ; };
-
- ImageList IL_WRAP
- {
- Prefix = "wr";
- MaskColor = IMAGE_MASK_COLOR ;
- WRAP_IDLIST
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/wrap.hxx b/sw/source/ui/inc/wrap.hxx
index 684ef6c..7190ab9 100644
--- a/sw/source/ui/inc/wrap.hxx
+++ b/sw/source/ui/inc/wrap.hxx
@@ -48,34 +48,24 @@ public:
class SwWrapTabPage: public SfxTabPage
{
// WRAPPING
- FixedLine aWrapFLC;
- ImageRadioButton aNoWrapRB;
- ImageRadioButton aWrapLeftRB;
- ImageRadioButton aWrapRightRB;
- ImageRadioButton aWrapParallelRB;
- ImageRadioButton aWrapThroughRB;
- ImageRadioButton aIdealWrapRB;
+ RadioButton* m_pNoWrapRB;
+ RadioButton* m_pWrapLeftRB;
+ RadioButton* m_pWrapRightRB;
+ RadioButton* m_pWrapParallelRB;
+ RadioButton* m_pWrapThroughRB;
+ RadioButton* m_pIdealWrapRB;
// MARGIN
- FixedLine aMarginFL;
- FixedText aLeftMarginFT;
- MetricField aLeftMarginED;
- FixedText aRightMarginFT;
- MetricField aRightMarginED;
- FixedText aTopMarginFT;
- MetricField aTopMarginED;
- FixedText aBottomMarginFT;
- MetricField aBottomMarginED;
+ MetricField* m_pLeftMarginED;
+ MetricField* m_pRightMarginED;
+ MetricField* m_pTopMarginED;
+ MetricField* m_pBottomMarginED;
// OPTIONS
- FixedLine aOptionsSepFL;
- FixedLine aOptionsFL;
- CheckBox aWrapAnchorOnlyCB;
- CheckBox aWrapTransparentCB;
- CheckBox aWrapOutlineCB;
- CheckBox aWrapOutsideCB;
-
- ImageList aWrapIL;
+ CheckBox* m_pWrapAnchorOnlyCB;
+ CheckBox* m_pWrapTransparentCB;
+ CheckBox* m_pWrapOutlineCB;
+ CheckBox* m_pWrapOutsideCB;
sal_uInt16 nOldLeftMargin;
sal_uInt16 nOldRightMargin;
@@ -104,7 +94,7 @@ class SwWrapTabPage: public SfxTabPage
virtual void DataChanged( const DataChangedEvent& rDCEvt );
DECL_LINK( RangeModifyHdl, MetricField * );
- DECL_LINK( WrapTypeHdl, ImageRadioButton * );
+ DECL_LINK( WrapTypeHdl, RadioButton * );
DECL_LINK(ContourHdl, void *);
using SfxTabPage::ActivatePage;
diff --git a/sw/uiconfig/swriter/ui/wrappage.ui b/sw/uiconfig/swriter/ui/wrappage.ui
new file mode 100644
index 0000000..5d4f989
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/wrappage.ui
@@ -0,0 +1,708 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="upper">99.989999999999995</property>
+ <property name="step_increment">0.10000000000000001</property>
+ <property name="page_increment">1</property>
+ </object>
+ <object class="GtkGrid" id="WrapPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="border_width">6</property>
+ <property name="row_spacing">24</property>
+ <child>
+ <object class="GtkFrame" id="backgroundgradientframe">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">24</property>
+ <property name="column_spacing">24</property>
+ <property name="row_homogeneous">True</property>
+ <property name="column_homogeneous">True</property>
+ <child>
+ <object class="GtkBox" id="box4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <child>
+ <object class="GtkRadioButton" id="after">
+ <property name="label" translatable="yes">After</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="image_position">top</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">parallel</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="imgright">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="pixbuf">sw/imglst/wr03.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="imgkonright">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="pixbuf">sw/imglst/wr09.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <child>
+ <object class="GtkRadioButton" id="before">
+ <property name="label" translatable="yes">Before</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="image_position">top</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">after</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="imgleft">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="pixbuf">sw/imglst/wr02.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="imgkonleft">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="pixbuf">sw/imglst/wr08.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <child>
+ <object class="GtkRadioButton" id="none">
+ <property name="label" translatable="yes">_None</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="image_position">top</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">before</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="imgnone">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="pixbuf">sw/imglst/wr01.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="imgkonnone">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="pixbuf">sw/imglst/wr07.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <child>
+ <object class="GtkRadioButton" id="optimal">
+ <property name="label" translatable="yes">_Optimal</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="image_position">top</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">none</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="imgideal">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="pixbuf">sw/imglst/wr06.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="imgkonideal">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="pixbuf">sw/imglst/wr011.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">center</property>
+ <child>
+ <object class="GtkRadioButton" id="through">
+ <property name="label" translatable="yes">Thro_ugh</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="image_position">top</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">optimal</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="image1">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="pixbuf">sw/imglst/wr05.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <child>
+ <object class="GtkRadioButton" id="parallel">
+ <property name="label" translatable="yes">_Parallel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="image_position">top</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">through</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="imgparallel">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="pixbuf">sw/imglst/wr04.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="imgkonparallel">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="pixbuf">sw/imglst/wr010.png</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Settings</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="vexpand">True</property>
+ <property name="column_spacing">12</property>
+ <property name="column_homogeneous">True</property>
+ <child>
+ <object class="GtkFrame" id="backgroundgradientframe1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">L_eft</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">left:0.00cm</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Right</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">right:0.00cm</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Top</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">top:0.00cm</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Bottom</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">bottom:0.00cm</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="left:0.00cm">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">â</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="digits">2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="right:0.00cm">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">â</property>
+ <property name="invisible_char_set">True</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="digits">2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="top:0.00cm">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">â</property>
+ <property name="invisible_char_set">True</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="digits">2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="bottom:0.00cm">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">â</property>
+ <property name="invisible_char_set">True</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="digits">2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Spacing</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="backgroundgradientframe2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_homogeneous">True</property>
+ <child>
+ <object class="GtkCheckButton" id="anchoronly">
+ <property name="label" translatable="yes">_First paragraph</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="transparent">
+ <property name="label" translatable="yes">In bac_kground</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="outline">
+ <property name="label" translatable="yes">_Contour</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="outside">
+ <property name="label" translatable="yes">Outside only</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Options</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+</interface>
commit 47e2359ded050c5e179c91ee3485c0ea87cea0d9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 17 15:29:56 2013 +0100
fix old indent
Change-Id: I05781f34ed22801ac2d99629a0914c069201a918
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 55e6024..2c447a4 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2084,91 +2084,91 @@ void RadioButton::ImplDrawRadioButtonState()
}
-if ( bNativeOK == sal_False )
-{
- // kein Image-RadioButton
- if ( !maImage )
- {
- sal_uInt16 nStyle = ImplGetButtonState();
- if ( !IsEnabled() )
- nStyle |= BUTTON_DRAW_DISABLED;
- if ( mbChecked )
- nStyle |= BUTTON_DRAW_CHECKED;
- Image aImage = GetRadioImage( GetSettings(), nStyle );
- if ( IsZoom() )
- DrawImage( maStateRect.TopLeft(), maStateRect.GetSize(), aImage );
- else
- DrawImage( maStateRect.TopLeft(), aImage );
- }
- else
+ if ( bNativeOK == sal_False )
{
- HideFocus();
-
- DecorationView aDecoView( this );
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- Rectangle aImageRect = maStateRect;
- Size aImageSize = maImage.GetSizePixel();
- sal_Bool bEnabled = IsEnabled();
- sal_uInt16 nButtonStyle = FRAME_DRAW_DOUBLEIN;
-
- aImageSize.Width() = CalcZoom( aImageSize.Width() );
- aImageSize.Height() = CalcZoom( aImageSize.Height() );
-
- // display border and selection status
- aImageRect = aDecoView.DrawFrame( aImageRect, nButtonStyle );
- if ( (ImplGetButtonState() & BUTTON_DRAW_PRESSED) || !bEnabled )
- SetFillColor( rStyleSettings.GetFaceColor() );
+ // kein Image-RadioButton
+ if ( !maImage )
+ {
+ sal_uInt16 nStyle = ImplGetButtonState();
+ if ( !IsEnabled() )
+ nStyle |= BUTTON_DRAW_DISABLED;
+ if ( mbChecked )
+ nStyle |= BUTTON_DRAW_CHECKED;
+ Image aImage = GetRadioImage( GetSettings(), nStyle );
+ if ( IsZoom() )
+ DrawImage( maStateRect.TopLeft(), maStateRect.GetSize(), aImage );
+ else
+ DrawImage( maStateRect.TopLeft(), aImage );
+ }
else
- SetFillColor( rStyleSettings.GetFieldColor() );
- SetLineColor();
- DrawRect( aImageRect );
+ {
+ HideFocus();
+
+ DecorationView aDecoView( this );
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ Rectangle aImageRect = maStateRect;
+ Size aImageSize = maImage.GetSizePixel();
+ sal_Bool bEnabled = IsEnabled();
+ sal_uInt16 nButtonStyle = FRAME_DRAW_DOUBLEIN;
+
+ aImageSize.Width() = CalcZoom( aImageSize.Width() );
+ aImageSize.Height() = CalcZoom( aImageSize.Height() );
+
+ // display border and selection status
+ aImageRect = aDecoView.DrawFrame( aImageRect, nButtonStyle );
+ if ( (ImplGetButtonState() & BUTTON_DRAW_PRESSED) || !bEnabled )
+ SetFillColor( rStyleSettings.GetFaceColor() );
+ else
+ SetFillColor( rStyleSettings.GetFieldColor() );
+ SetLineColor();
+ DrawRect( aImageRect );
- // display image
- nButtonStyle = 0;
- if ( !bEnabled )
- nButtonStyle |= IMAGE_DRAW_DISABLE;
+ // display image
+ nButtonStyle = 0;
+ if ( !bEnabled )
+ nButtonStyle |= IMAGE_DRAW_DISABLE;
- Image *pImage = &maImage;
+ Image *pImage = &maImage;
- Point aImagePos( aImageRect.TopLeft() );
- aImagePos.X() += (aImageRect.GetWidth()-aImageSize.Width())/2;
- aImagePos.Y() += (aImageRect.GetHeight()-aImageSize.Height())/2;
- if ( IsZoom() )
- DrawImage( aImagePos, aImageSize, *pImage, nButtonStyle );
- else
- DrawImage( aImagePos, *pImage, nButtonStyle );
+ Point aImagePos( aImageRect.TopLeft() );
+ aImagePos.X() += (aImageRect.GetWidth()-aImageSize.Width())/2;
+ aImagePos.Y() += (aImageRect.GetHeight()-aImageSize.Height())/2;
+ if ( IsZoom() )
+ DrawImage( aImagePos, aImageSize, *pImage, nButtonStyle );
+ else
+ DrawImage( aImagePos, *pImage, nButtonStyle );
- aImageRect.Left()++;
- aImageRect.Top()++;
- aImageRect.Right()--;
- aImageRect.Bottom()--;
+ aImageRect.Left()++;
+ aImageRect.Top()++;
+ aImageRect.Right()--;
+ aImageRect.Bottom()--;
- ImplSetFocusRect( aImageRect );
+ ImplSetFocusRect( aImageRect );
- if ( mbChecked )
- {
- SetLineColor( rStyleSettings.GetHighlightColor() );
- SetFillColor();
- if ( (aImageSize.Width() >= 20) || (aImageSize.Height() >= 20) )
+ if ( mbChecked )
{
+ SetLineColor( rStyleSettings.GetHighlightColor() );
+ SetFillColor();
+ if ( (aImageSize.Width() >= 20) || (aImageSize.Height() >= 20) )
+ {
+ aImageRect.Left()++;
+ aImageRect.Top()++;
+ aImageRect.Right()--;
+ aImageRect.Bottom()--;
+ }
+ DrawRect( aImageRect );
aImageRect.Left()++;
aImageRect.Top()++;
aImageRect.Right()--;
aImageRect.Bottom()--;
+ DrawRect( aImageRect );
}
- DrawRect( aImageRect );
- aImageRect.Left()++;
- aImageRect.Top()++;
- aImageRect.Right()--;
- aImageRect.Bottom()--;
- DrawRect( aImageRect );
- }
- if ( HasFocus() )
- ShowFocus( ImplGetFocusRect() );
+ if ( HasFocus() )
+ ShowFocus( ImplGetFocusRect() );
+ }
}
}
-}
// -----------------------------------------------------------------------
commit 015fc22e0d00b80f5679ea271f71656ea3733d15
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 17 15:28:18 2013 +0100
fix radiobutton GetOptimalSize for images
Incredibly ugly stuff, but this is (as far as I can see) what the drawing is
actually doing. e.g. WB_TOP, surely it should be using image align.
Change-Id: If2dcb1caf92cd5bbd2f07114ae2c41843b5a7f38
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index de4d7a3..55e6024 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -3075,32 +3075,46 @@ Size RadioButton::CalcMinimumSize( long nMaxWidth ) const
if ( !maImage )
aSize = ImplGetRadioImageSize();
else
+ {
aSize = maImage.GetSizePixel();
-
- nMaxWidth -= aSize.Width();
+ aSize.Width() += 8;
+ aSize.Height() += 8;
+ }
OUString aText = GetText();
if ( !aText.isEmpty() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
{
+ bool bTopImage = (GetStyle() & WB_TOP) != 0;
+
+ if (!bTopImage)
+ {
+ nMaxWidth -= aSize.Width();
+ nMaxWidth -= ImplGetImageToTextDistance();
+ }
+
// subtract what will be added later
nMaxWidth-=2;
- nMaxWidth -= ImplGetImageToTextDistance();
Size aTextSize = GetTextRect( Rectangle( Point(), Size( nMaxWidth > 0 ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ),
aText, FixedText::ImplGetTextStyle( GetStyle() ) ).GetSize();
+
aSize.Width()+=2; // for focus rect
- aSize.Width() += ImplGetImageToTextDistance();
- aSize.Width() += aTextSize.Width();
- if ( aSize.Height() < aTextSize.Height() )
- aSize.Height() = aTextSize.Height();
+
+ if (!bTopImage)
+ {
+ aSize.Width() += ImplGetImageToTextDistance();
+ aSize.Width() += aTextSize.Width();
+ if ( aSize.Height() < aTextSize.Height() )
+ aSize.Height() = aTextSize.Height();
+ }
+ else
+ {
+ aSize.Height() += 6;
+ aSize.Height() += GetTextHeight();
+ if ( aSize.Width() < aTextSize.Width() )
+ aSize.Width() = aTextSize.Width();
+ }
}
-// else if ( !maImage )
-// {
-/* da ansonsten im Writer die Control zu weit oben haengen
- aSize.Width() += 2;
- aSize.Height() += 2;
-*/
-// }
return CalcWindowSize( aSize );
}
commit 67d6091052b24745ca6b45654be0906257ceb9cf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 17 13:52:15 2013 +0100
dump the name of the radiobuttons without groups set
Change-Id: I873b5825ef4c49aec86799556229584116f066fa
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index f4b4351..de4d7a3 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2398,7 +2398,7 @@ std::vector< RadioButton* > RadioButton::GetRadioButtonGroup(bool bIncludeThis)
}
//old-school
- SAL_WARN("vcl.control", "No new-style group set on radiobutton, using old-style digging around");
+ SAL_WARN("vcl.control", "No new-style group set on radiobutton <" << GetHelpId() << "> using old-style digging around");
// go back to first in group;
Window* pFirst = const_cast<RadioButton*>(this);
commit aff838877219f0dddd3c84788cb2fdcbc42d3285
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 17 13:48:01 2013 +0100
allow radiobuttons and checkbox images to be aligned from .ui
Change-Id: Iee7b970344ac85e4b8ce51f1c3b5ae6605c05843
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index b325d78..fae8240 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -86,6 +86,7 @@ public:
void SetFocusRect( const Rectangle& rFocusRect );
bool IsSmallSymbol() const;
void SetSmallSymbol(bool bSmall = true);
+ virtual bool set_property(const OString &rKey, const OString &rValue);
};
// --------------------
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 74542e6..f4b4351 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -605,6 +605,47 @@ bool Button::IsSmallSymbol () const
return mpButtonData->mbSmallSymbol;
}
+bool Button::set_property(const OString &rKey, const OString &rValue)
+{
+ if (rKey == "image-position")
+ {
+ ImageAlign eAlign = IMAGEALIGN_LEFT;
+ WinBits nBits = GetStyle();
+ if (rValue == "left")
+ {
+ nBits &= ~(WB_CENTER | WB_RIGHT);
+ nBits |= WB_LEFT;
+ eAlign = IMAGEALIGN_LEFT;
+ }
+ else if (rValue == "right")
+ {
+ nBits &= ~(WB_CENTER | WB_LEFT);
+ nBits |= WB_RIGHT;
+ eAlign = IMAGEALIGN_RIGHT;
+ }
+ else if (rValue == "top")
+ {
+ nBits &= ~(WB_VCENTER | WB_BOTTOM);
+ nBits |= WB_TOP;
+ eAlign = IMAGEALIGN_TOP;
+ }
+ else if (rValue == "bottom")
+ {
+ nBits &= ~(WB_VCENTER | WB_TOP);
+ nBits |= WB_BOTTOM;
+ eAlign = IMAGEALIGN_BOTTOM;
+ }
+ SetImageAlign(eAlign);
+ //Its rather mad to have to set these bits when there is the other
+ //image align. Looks like e.g. the radiobuttons etc weren't converted
+ //over to image align fully.
+ SetStyle(nBits);
+ }
+ else
+ return Control::set_property(rKey, rValue);
+ return true;
+}
+
// =======================================================================
void PushButton::ImplInitPushButtonData()
@@ -1720,21 +1761,8 @@ bool PushButton::set_property(const OString &rKey, const OString &rValue)
nBits |= WB_DEFBUTTON;
SetStyle(nBits);
}
- else if (rKey == "image-position")
- {
- ImageAlign eAlign = IMAGEALIGN_LEFT;
- if (rValue == "left")
- eAlign = IMAGEALIGN_LEFT;
- else if (rValue == "right")
- eAlign = IMAGEALIGN_RIGHT;
- else if (rValue == "top")
- eAlign = IMAGEALIGN_TOP;
- else if (rValue == "bottom")
- eAlign = IMAGEALIGN_BOTTOM;
- SetImageAlign(eAlign);
- }
else
- return Control::set_property(rKey, rValue);
+ return Button::set_property(rKey, rValue);
return true;
}
@@ -2859,7 +2887,7 @@ bool RadioButton::set_property(const OString &rKey, const OString &rValue)
if (rKey == "active")
SetState(toBool(rValue));
else
- return Window::set_property(rKey, rValue);
+ return Button::set_property(rKey, rValue);
return true;
}
@@ -3805,7 +3833,7 @@ bool CheckBox::set_property(const OString &rKey, const OString &rValue)
if (rKey == "active")
SetState(toBool(rValue) ? STATE_CHECK : STATE_NOCHECK);
else
- return Window::set_property(rKey, rValue);
+ return Button::set_property(rKey, rValue);
return true;
}
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 8fa72ee..a0bfcec 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1138,7 +1138,9 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
OString sWrap = extractCustomProperty(rMap);
if (!sWrap.isEmpty())
nBits |= WB_WORDBREAK;
- pWindow = new RadioButton(pParent, nBits);
+ RadioButton *pButton = new RadioButton(pParent, nBits);
+ pButton->SetImageAlign(IMAGEALIGN_LEFT); //default to left
+ pWindow = pButton;
}
else if (name == "GtkCheckButton")
{
@@ -1153,6 +1155,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
new CheckBox(pParent, nBits);
if (bIsTriState)
pCheckBox->SetState(STATE_DONTKNOW);
+ pCheckBox->SetImageAlign(IMAGEALIGN_LEFT); //default to left
pWindow = pCheckBox;
}
else if (name == "GtkSpinButton")
More information about the Libreoffice-commits
mailing list