diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-22 08:56:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-23 10:12:04 +0200 |
commit | 3b65ce7996c8cedcdb710275a0d1fb948b5d78bb (patch) | |
tree | 28dd1d63d79ebf7249f9a1f13fd24219fc5197b9 /vcl | |
parent | 4c1f44047aa680c2e2e84986353ab2b2f375f6f2 (diff) |
loplugin:unusedmethods
Change-Id: I5fd081780d46fd30864830eea2956bad6dc3e222
Reviewed-on: https://gerrit.libreoffice.org/81360
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/treelist/treelist.cxx | 18 | ||||
-rw-r--r-- | vcl/source/treelist/treelistbox.cxx | 5 | ||||
-rw-r--r-- | vcl/source/window/syswin.cxx | 12 | ||||
-rw-r--r-- | vcl/source/window/tabdlg.cxx | 142 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 5 |
5 files changed, 0 insertions, 182 deletions
diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx index 03c1d9d4e831..681bef4d0c7d 100644 --- a/vcl/source/treelist/treelist.cxx +++ b/vcl/source/treelist/treelist.cxx @@ -1468,24 +1468,6 @@ void SvTreeList::ResortChildren( SvTreeListEntry* pParent ) SetListPositions(pParent->m_Children); // correct list position in target list } -void SvTreeList::ReverseChildren( SvTreeListEntry* pParent ) -{ - DBG_ASSERT(pParent,"Parent not set"); - - if (pParent->m_Children.empty()) - return; - - std::reverse(pParent->m_Children.begin(), pParent->m_Children.end()); - // Recursively sort child entries. - for (auto const& it : pParent->m_Children) - { - SvTreeListEntry& r = *it; - ReverseChildren(&r); - } - - SetListPositions(pParent->m_Children); // correct list position in target list -} - void SvTreeList::GetInsertionPos( SvTreeListEntry const * pEntry, SvTreeListEntry* pParent, sal_uLong& rPos ) { diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index 529839943445..239325e2ba0c 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -2497,11 +2497,6 @@ bool SvTreeListBox::AreChildrenTransient() const return pImpl->AreChildrenTransient(); } -void SvTreeListBox::SetChildrenNotTransient() -{ - pImpl->SetChildrenNotTransient(); -} - void SvTreeListBox::EditedText( const OUString& rStr ) { diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 62ceb456c8a6..5d87ad141c7b 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -1154,18 +1154,6 @@ void SystemWindow::doDeferredInit(WinBits /*nBits*/) SAL_WARN("vcl.layout", "SystemWindow in layout without doDeferredInit impl"); } -std::vector<OString> SystemWindow::getAllPageUIXMLDescriptions() const -{ - // default has no pages - return std::vector<OString>(); -} - -bool SystemWindow::selectPageByUIXMLDescription(const OString& /*rUIXMLDescription*/) -{ - // default cannot select anything (which is okay, return true) - return true; -} - void SystemWindow::createScreenshot(VirtualDevice& rOutput) { // same prerequisites as in Execute() diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx index 47212cb7fc8a..ff621de78fba 100644 --- a/vcl/source/window/tabdlg.cxx +++ b/vcl/source/window/tabdlg.cxx @@ -181,146 +181,4 @@ void TabDialog::StateChanged( StateChangedType nType ) Dialog::StateChanged( nType ); } -static vcl::Window* findTabControl(vcl::Window* pCurrent) -{ - if (!pCurrent) - { - return nullptr; - } - - if (pCurrent->GetType() == WindowType::TABCONTROL) - { - return pCurrent; - } - - vcl::Window* pChild = pCurrent->GetWindow(GetWindowType::FirstChild); - - while (pChild) - { - - vcl::Window* pInorderChild = findTabControl(pChild); - - if (pInorderChild) - { - return pInorderChild; - } - - pChild = pChild->GetWindow(GetWindowType::Next); - } - - return nullptr; -} - -std::vector<OString> TabDialog::getAllPageUIXMLDescriptions() const -{ - std::vector<OString> aRetval; - - const TabControl* pTabCtrl = dynamic_cast<TabControl*>(findTabControl(const_cast<TabDialog*>(this))); - - if (pTabCtrl) - { - for (sal_uInt16 a(0); a < pTabCtrl->GetPageCount(); a++) - { - const sal_uInt16 nPageId(pTabCtrl->GetPageId(a)); - - if (TAB_PAGE_NOTFOUND != nPageId) - { - TabPage* pCandidate = pTabCtrl->GetTabPage(nPageId); - - if (pCandidate) - { - OString aNewName(pCandidate->getUIFile()); - - if (!aNewName.isEmpty()) - { - // we have to check for double entries, this may happen e.g. - // in the HeaderFooterDialog which has two times the same - // tabPage added. Add the PageID as hint to the name, separated - // by a token (using "|" here). Do not do this for 1st occurrence, - // that is used for detection and is not necessary. - // Use the UIXMLDescription without trailing '.ui', with one trailing '/' - bool bAlreadyAdded(false); - - for (auto const& elem : aRetval) - { - bAlreadyAdded = (elem == aNewName); - if (bAlreadyAdded) - break; - } - - if (bAlreadyAdded) - { - // add the PageId to be able to detect the correct tabPage in - // selectPageByUIXMLDescription below - aNewName += "|" + OString::number(nPageId); - } - - aRetval.push_back(aNewName); - } - } - } - } - } - - return aRetval; -} - -bool TabDialog::selectPageByUIXMLDescription(const OString& rUIXMLDescription) -{ - TabControl* pTabCtrl = dynamic_cast<TabControl*>(findTabControl(this)); - - if (pTabCtrl) - { - sal_uInt32 nTargetPageId(0); - OString aTargetName(rUIXMLDescription); - const sal_Int32 nIndexOfSeparator(rUIXMLDescription.indexOf("|")); - - if (-1 != nIndexOfSeparator) - { - // more than one tabPage with that UXMLDescription is added to this dialog, - // see getAllPageUIXMLDescriptions() above. Extract target PageId and - // strip the UXMLDescription name for comparison - nTargetPageId = rUIXMLDescription.copy(nIndexOfSeparator + 1).toUInt32(); - aTargetName = rUIXMLDescription.copy(0, nIndexOfSeparator); - } - - for (sal_uInt16 a(0); a < pTabCtrl->GetPageCount(); a++) - { - const sal_uInt16 nPageId(pTabCtrl->GetPageId(a)); - - if (TAB_PAGE_NOTFOUND != nPageId) - { - TabPage* pCandidate = pTabCtrl->GetTabPage(nPageId); - - if (pCandidate) - { - if (pCandidate->getUIFile() == aTargetName) - { - if (nTargetPageId) - { - // when multiple versions may exist, name is not sufficient. Also - // check for the given PageId to select the correct tabPage - // for cases where the same TabPage is used more than once - // in a tabDialog (e.g. HeaderFooterDialog) - if (nTargetPageId == nPageId) - { - pTabCtrl->SelectTabPage(nPageId); - return true; - } - } - else - { - // select that tabPage - pTabCtrl->SelectTabPage(nPageId); - return true; - } - } - } - } - } - } - - return false; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 3869ee771a7d..6f32ea52eafd 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -830,11 +830,6 @@ const OString& Window::GetHelpId() const return mpWindowImpl->maHelpId; } -OString Window::GetScreenshotId() const -{ - return GetHelpId(); -} - // --------- old inline methods --------------- vcl::Window* Window::ImplGetWindow() const |