diff options
author | Stefan Weiberg <stefan.weiberg@germandev.org> | 2014-09-12 05:57:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-09-25 12:32:36 +0000 |
commit | c613b5dba883897c927f7b60c84830c62a79d0ea (patch) | |
tree | 58cfe08848b1d6fd5f5fba555509c26bfbad93eb /cui/source | |
parent | 5911154175b381b96991ec13c3d3d4619ad13d1d (diff) |
fdo#78783: fixed init position to 1 and using css
Change-Id: Ib7c62ce23290056c42bfa89fbac91212e7ae0ab6
Reviewed-on: https://gerrit.libreoffice.org/11409
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 558536153a8d..5828d67bead2 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -72,14 +72,14 @@ #include <svl/slstitm.hxx> #include <boost/scoped_ptr.hpp> -using namespace com::sun::star; -using namespace com::sun::star::uno; -using namespace com::sun::star::beans; -using namespace com::sun::star::lang; -using namespace com::sun::star::i18n; -using namespace com::sun::star::text; -using namespace com::sun::star::container; -using namespace com::sun::star::style; +using namespace css; +using namespace css::uno; +using namespace css::beans; +using namespace css::lang; +using namespace css::i18n; +using namespace css::text; +using namespace css::container; +using namespace css::style; #define NUM_PAGETYPE_BULLET 0 #define NUM_PAGETYPE_SINGLENUM 1 @@ -1169,11 +1169,15 @@ void SvxNumOptionsTabPage::ActivatePage(const SfxItemSet& rSet) if(*pActNum != *pSaveNum || nActNumLvl != nTmpNumLvl) { + *pActNum = *pSaveNum; nActNumLvl = nTmpNumLvl; sal_uInt16 nMask = 1; m_pLevelLB->SetUpdateMode(false); m_pLevelLB->SetNoSelection(); - m_pLevelLB->SelectEntryPos( pActNum->GetLevelCount(), nActNumLvl == SAL_MAX_UINT16); + if(bModified) + m_pLevelLB->SelectEntryPos( 0, true); + else + m_pLevelLB->SelectEntryPos( pActNum->GetLevelCount(), nActNumLvl == SAL_MAX_UINT16); if(nActNumLvl != SAL_MAX_UINT16) for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { @@ -1182,7 +1186,7 @@ void SvxNumOptionsTabPage::ActivatePage(const SfxItemSet& rSet) nMask <<= 1 ; } m_pLevelLB->SetUpdateMode(true); - *pActNum = *pSaveNum; + InitControls(); } @@ -1249,7 +1253,11 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet* rSet ) sal_uInt16 nMask = 1; m_pLevelLB->SetUpdateMode(false); m_pLevelLB->SetNoSelection(); - if(nActNumLvl == SAL_MAX_UINT16) + if(nActNumLvl == SAL_MAX_UINT16 && !bModified) + { + m_pLevelLB->SelectEntryPos( 0, true); + } + else if (nActNumLvl == SAL_MAX_UINT16) { m_pLevelLB->SelectEntryPos( pSaveNum->GetLevelCount(), true); } @@ -2923,7 +2931,10 @@ void SvxNumPositionTabPage::ActivatePage(const SfxItemSet& rSet) sal_uInt16 nMask = 1; m_pLevelLB->SetUpdateMode(false); m_pLevelLB->SetNoSelection(); - m_pLevelLB->SelectEntryPos( pActNum->GetLevelCount(), nActNumLvl == SAL_MAX_UINT16); + if(bModified) + m_pLevelLB->SelectEntryPos( 0, true); + else + m_pLevelLB->SelectEntryPos( pActNum->GetLevelCount(), nActNumLvl == SAL_MAX_UINT16); if(nActNumLvl != SAL_MAX_UINT16) for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { @@ -3009,7 +3020,11 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet* rSet ) sal_uInt16 nMask = 1; m_pLevelLB->SetUpdateMode(false); m_pLevelLB->SetNoSelection(); - if(nActNumLvl == SAL_MAX_UINT16) + if(nActNumLvl == SAL_MAX_UINT16 && !bModified) + { + m_pLevelLB->SelectEntryPos( 0, true); + } + else if (nActNumLvl == SAL_MAX_UINT16) { m_pLevelLB->SelectEntryPos( pSaveNum->GetLevelCount(), true); } |