tdf#126040 - Load previously selected start/end line style index
Change-Id: Ifbc088de6b035c69899aaad5316359bd30b61739 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201103 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
This commit is contained in:
@@ -293,34 +293,26 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet )
|
||||
|
||||
*m_pnLineEndListState = ChangeType::NONE;
|
||||
|
||||
nPos = m_xLbLineStyle->get_active();
|
||||
OUString sNone( comphelper::LibreOfficeKit::isActive() ? SvxResId( RID_SVXSTR_INVISIBLE )
|
||||
: SvxResId( RID_SVXSTR_NONE ) );
|
||||
|
||||
auto sActiveStyle = m_xLbStartStyle->get_active_text();
|
||||
m_xLbStartStyle->clear();
|
||||
m_xLbStartStyle->append_text(sNone);
|
||||
|
||||
m_xLbStartStyle->Fill( m_pLineEndList );
|
||||
nCount = m_xLbStartStyle->get_count();
|
||||
if( nCount == 0 )
|
||||
; // This case should never occur
|
||||
else if( nCount <= nPos )
|
||||
m_xLbStartStyle->set_active(0);
|
||||
else
|
||||
m_xLbStartStyle->set_active(nPos);
|
||||
|
||||
// tdf#126040 - load previously selected start line style index
|
||||
auto nStylePos = m_xLbStartStyle->find_text(sActiveStyle);
|
||||
m_xLbStartStyle->set_active(nStylePos == -1 ? 0 : nStylePos);
|
||||
|
||||
sActiveStyle = m_xLbEndStyle->get_active_text();
|
||||
m_xLbEndStyle->clear();
|
||||
m_xLbEndStyle->append_text(sNone);
|
||||
|
||||
m_xLbEndStyle->Fill( m_pLineEndList, false );
|
||||
nCount = m_xLbEndStyle->get_count();
|
||||
|
||||
if( nCount == 0 )
|
||||
; // This case should never occur
|
||||
else if( nCount <= nPos )
|
||||
m_xLbEndStyle->set_active(0);
|
||||
else
|
||||
m_xLbEndStyle->set_active(nPos);
|
||||
// tdf#126040 - load previously selected end line style index
|
||||
nStylePos = m_xLbEndStyle->find_text(sActiveStyle);
|
||||
m_xLbEndStyle->set_active(nStylePos == -1 ? 0 : nStylePos);
|
||||
}
|
||||
INetURLObject aLineURL( m_pLineEndList->GetPath() );
|
||||
|
||||
|
||||
@@ -270,6 +270,7 @@ public:
|
||||
int get_active() const { return m_xControl->get_active(); }
|
||||
void set_active(int nPos) { m_xControl->set_active(nPos); }
|
||||
void set_active_text(const OUString& rStr) { m_xControl->set_active_text(rStr); }
|
||||
int find_text(const OUString& rStr) const { return m_xControl->find_text(rStr); }
|
||||
OUString get_active_text() const { return m_xControl->get_active_text(); }
|
||||
void connect_changed(const Link<weld::ComboBox&, void>& rLink) { m_xControl->connect_changed(rLink); }
|
||||
int get_count() const { return m_xControl->get_count(); }
|
||||
|
||||
Reference in New Issue
Block a user