diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2016-06-15 17:53:52 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2016-08-18 02:39:07 +0200 |
commit | 3fb0839da320bb2256b7a2dcf46363fc25bbfbc9 (patch) | |
tree | 8f31da02adb34e2cc99d49607b956e0b16ee8a96 /sfx2 | |
parent | eab85ed43846c7304980c098522f51de7ff11da8 (diff) |
screenshots: extend default paths where stuff gets written
Change-Id: I1886d832bb9474371ea27d4d36f0446b221246d0
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index dd6ccd789950..b8f4041b025e 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -1332,4 +1332,54 @@ FactoryFunction SfxTabDialog::GetUITestFactory() const return SfxTabDialogUIObject::create; } +std::vector<OUString> SfxTabDialog::getAllPageUIXMLDescriptions() const +{ + std::vector<OUString> aRetval; + + for (SfxTabDlgData_Impl::const_iterator it = pImpl->aData.begin(); it != pImpl->aData.end(); ++it) + { + SfxTabPage* pCandidate = GetTabPage((*it)->nId); + + if (!pCandidate) + { + // force SfxTabPage creation + const_cast<SfxTabDialog*>(this)->ShowPage((*it)->nId); + pCandidate = GetTabPage((*it)->nId); + } + + if (pCandidate) + { + // for now, use IDs, later change to UI-Strings + aRetval.push_back(OUString::number((*it)->nId)); + } + } + + return aRetval; +} + +void SfxTabDialog::selectPageByUIXMLDescription(const OUString& rUIXMLDescription) +{ + // for now, use IDs, later change to UI-Strings + const sal_uInt16 nTargetId((sal_uInt16)rUIXMLDescription.toUInt32()); + bool bDone(false); + + for (SfxTabDlgData_Impl::const_iterator it = pImpl->aData.begin(); !bDone && it != pImpl->aData.end(); ++it) + { + SfxTabPage* pCandidate = (*it)->pTabPage; + + if (!pCandidate) + { + // force SfxTabPage creation + const_cast<SfxTabDialog*>(this)->ShowPage((*it)->nId); + pCandidate = GetTabPage((*it)->nId); + } + + if (pCandidate && (*it)->nId == nTargetId) + { + ShowPage(nTargetId); + bDone = true; + } + } +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |