diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2016-06-15 17:57:39 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2016-08-18 02:39:07 +0200 |
commit | 13a9727a6399df8df0b2719adb094c81e147a3e8 (patch) | |
tree | a6da2221808f08b901c0e1f2a042bcb09e3e97df /sfx2 | |
parent | 3fb0839da320bb2256b7a2dcf46363fc25bbfbc9 (diff) |
screenshots: added more virtualization/abstraction
TabPabe Identification to UI-File names. Isolated some data
initialization constructs. Added more dialogs to dump. Should dump on
all systems now
Change-Id: I7ee07309e0bf88064f789c13bcbff93c17370f77
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index b8f4041b025e..cb6842f99efb 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -1332,9 +1332,9 @@ FactoryFunction SfxTabDialog::GetUITestFactory() const return SfxTabDialogUIObject::create; } -std::vector<OUString> SfxTabDialog::getAllPageUIXMLDescriptions() const +std::vector<OString> SfxTabDialog::getAllPageUIXMLDescriptions() const { - std::vector<OUString> aRetval; + std::vector<OString> aRetval; for (SfxTabDlgData_Impl::const_iterator it = pImpl->aData.begin(); it != pImpl->aData.end(); ++it) { @@ -1349,21 +1349,17 @@ std::vector<OUString> SfxTabDialog::getAllPageUIXMLDescriptions() const if (pCandidate) { - // for now, use IDs, later change to UI-Strings - aRetval.push_back(OUString::number((*it)->nId)); + // use UIXMLDescription (without '.ui', with '/') + aRetval.push_back(pCandidate->getUIFile()); } } return aRetval; } -void SfxTabDialog::selectPageByUIXMLDescription(const OUString& rUIXMLDescription) +bool SfxTabDialog::selectPageByUIXMLDescription(const OString& 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) + for (SfxTabDlgData_Impl::const_iterator it = pImpl->aData.begin(); it != pImpl->aData.end(); ++it) { SfxTabPage* pCandidate = (*it)->pTabPage; @@ -1374,12 +1370,14 @@ void SfxTabDialog::selectPageByUIXMLDescription(const OUString& rUIXMLDescriptio pCandidate = GetTabPage((*it)->nId); } - if (pCandidate && (*it)->nId == nTargetId) + if (pCandidate && pCandidate->getUIFile() == rUIXMLDescription) { - ShowPage(nTargetId); - bDone = true; + ShowPage((*it)->nId); + return true; } } + + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |