Kaydet (Commit) 44a1161a authored tarafından Noel Grandin's avatar Noel Grandin

drop FrameDirListBox typedef

and rename FrameDirListBoxWrapper->FrameDirectionListBoxWrapper

Change-Id: I201ab2caeff0a3219efe8ee86024bc48b8701f7e
Reviewed-on: https://gerrit.libreoffice.org/47346Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 3f54055c
......@@ -99,7 +99,7 @@ private:
VclPtr<TriStateBox> m_pBtnWrap;
VclPtr<TriStateBox> m_pBtnHyphen;
VclPtr<TriStateBox> m_pBtnShrink;
VclPtr<FrameDirListBox> m_pLbFrameDir;
VclPtr<FrameDirectionListBox> m_pLbFrameDir;
// hidden labels/string
VclPtr<FixedText> m_pFtBotLock;
......
......@@ -236,7 +236,7 @@ AlignmentTabPage::AlignmentTabPage( vcl::Window* pParent, const SfxItemSet& rCor
AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_HYPHENATION, *m_pBtnHyphen, ItemConnFlags::HideUnknown ) );
AddItemConnection( new sfx::CheckBoxConnection( SID_ATTR_ALIGN_SHRINKTOFIT, *m_pBtnShrink, ItemConnFlags::HideUnknown ) );
AddItemConnection( new sfx::DummyItemConnection( SID_ATTR_FRAMEDIRECTION, *m_pBoxDirection, ItemConnFlags::HideUnknown ) );
AddItemConnection( new FrameDirListBoxConnection( SID_ATTR_FRAMEDIRECTION, *m_pLbFrameDir, ItemConnFlags::HideUnknown ) );
AddItemConnection( new FrameDirectionListBoxConnection( SID_ATTR_FRAMEDIRECTION, *m_pLbFrameDir, ItemConnFlags::HideUnknown ) );
}
......
......@@ -53,14 +53,12 @@ public:
SvxFrameDirection GetSelectEntryValue() const;
};
typedef FrameDirectionListBox FrameDirListBox;
/** Wrapper for usage of a FrameDirectionListBox in item connections. */
class SAL_WARN_UNUSED SVX_DLLPUBLIC FrameDirListBoxWrapper : public sfx::SingleControlWrapper< FrameDirListBox, SvxFrameDirection >
class SAL_WARN_UNUSED SVX_DLLPUBLIC FrameDirectionListBoxWrapper : public sfx::SingleControlWrapper< FrameDirectionListBox, SvxFrameDirection >
{
public:
explicit FrameDirListBoxWrapper( FrameDirListBox& rListBox );
explicit FrameDirectionListBoxWrapper( FrameDirectionListBox& rListBox );
virtual bool IsControlDontKnow() const override;
virtual void SetControlDontKnow( bool bSet ) override;
......@@ -73,7 +71,7 @@ public:
typedef sfx::ValueItemWrapper< SvxFrameDirectionItem, SvxFrameDirection > FrameDirItemWrapper;
/** An item<->control connection for a FrameDirectionListBox. */
typedef sfx::ItemControlConnection< FrameDirItemWrapper, FrameDirListBoxWrapper > FrameDirListBoxConnection;
typedef sfx::ItemControlConnection< FrameDirItemWrapper, FrameDirectionListBoxWrapper > FrameDirectionListBoxConnection;
}
......
......@@ -79,28 +79,28 @@ SvxFrameDirection FrameDirectionListBox::GetSelectEntryValue() const
}
FrameDirListBoxWrapper::FrameDirListBoxWrapper( FrameDirListBox& rListBox ) :
FrameDirectionListBoxWrapper::FrameDirectionListBoxWrapper( FrameDirectionListBox& rListBox ) :
SingleControlWrapperType( rListBox )
{
}
bool FrameDirListBoxWrapper::IsControlDontKnow() const
bool FrameDirectionListBoxWrapper::IsControlDontKnow() const
{
return GetControl().GetSelectedEntryCount() == 0;
}
void FrameDirListBoxWrapper::SetControlDontKnow( bool bSet )
void FrameDirectionListBoxWrapper::SetControlDontKnow( bool bSet )
{
if( bSet )
GetControl().SetNoSelection();
}
SvxFrameDirection FrameDirListBoxWrapper::GetControlValue() const
SvxFrameDirection FrameDirectionListBoxWrapper::GetControlValue() const
{
return GetControl().GetSelectEntryValue();
}
void FrameDirListBoxWrapper::SetControlValue( SvxFrameDirection eValue )
void FrameDirectionListBoxWrapper::SetControlValue( SvxFrameDirection eValue )
{
GetControl().SelectEntryValue( eValue );
}
......
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