diff options
author | Armin Le Grand <alg@apache.org> | 2014-03-19 16:17:02 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2014-03-19 16:17:02 +0000 |
commit | b635b4fa4e42053d30ab639643d2236a20243f62 (patch) | |
tree | 657b08929ada71b91fdac54482605c67a7d14c74 /sfx2 | |
parent | 4e04ad3623f2ab4693dcd50a9934fc836e190a6f (diff) |
Merge back branch alg_writerframes to trunk
Notes
Notes:
merged as: 6e61ecd09679a66060f932835622821d39e92f01
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index f6c15123140a..78a0fd5e9bac 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -1394,7 +1394,7 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl ) */ { - sal_uInt16 const nId = pTabCtrl->GetCurPageId(); + sal_uInt16 nId = pTabCtrl->GetCurPageId(); DBG_ASSERT( pImpl->pData->Count(), "keine Pages angemeldet" ); SFX_APP(); @@ -1402,6 +1402,16 @@ IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl ) // Tab Page schon da? SfxTabPage* pTabPage = dynamic_cast<SfxTabPage*> (pTabCtrl->GetTabPage( nId )); Data_Impl* pDataObject = Find( *pImpl->pData, nId ); + + //UUUU fallback to 1st page when requested one does not exist + if(!pDataObject && pTabCtrl->GetPageCount()) + { + pTabCtrl->SetCurPageId(pTabCtrl->GetPageId(0)); + nId = pTabCtrl->GetCurPageId(); + pTabPage = dynamic_cast< SfxTabPage* >(pTabCtrl->GetTabPage(nId)); + Data_Impl* pDataObject = Find(*pImpl->pData, nId); + } + DBG_ASSERT( pDataObject, "Id nicht bekannt" ); // ggf. TabPage erzeugen: |