diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2014-05-06 17:19:22 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2014-05-06 18:12:28 +0200 |
commit | 09abd826a0e26517ea722659491e8eb525a9b8bc (patch) | |
tree | fd6a2a09bcf42bdcdc16b8104a9073a5ad9177c0 /sfx2 | |
parent | c2d7ee9abfc02febfd16e9f19c7395115036ecc5 (diff) |
remove uncompiled source files
how to find possible candidates:
find . -name *.cxx | grep -v compilerplugins > cxx.list
for i in `cat cxx.list`; do basename $i .cxx; done > cxx.base.list
for i in `cat cxx.base.list | sort -u`; do echo $(git grep -w $i -- '*.mk' | wc -l) $i; done > cxx.count
Change-Id: I15c6cc7195e58d79967388850a0c90b915b001b7
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/ContextMatcher.cxx | 139 | ||||
-rw-r--r-- | sfx2/source/sidebar/ContextMatcher.hxx | 74 | ||||
-rw-r--r-- | sfx2/source/sidebar/DeckConfiguration.cxx | 54 | ||||
-rw-r--r-- | sfx2/source/sidebar/DeckConfiguration.hxx | 48 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 1 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarPanel.cxx | 173 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarPanel.hxx | 76 |
7 files changed, 0 insertions, 565 deletions
diff --git a/sfx2/source/sidebar/ContextMatcher.cxx b/sfx2/source/sidebar/ContextMatcher.cxx deleted file mode 100644 index 018c340443ab..000000000000 --- a/sfx2/source/sidebar/ContextMatcher.cxx +++ /dev/null @@ -1,139 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#include "precompiled_sfx2.hxx" - -#include "ContextMatcher.hxx" -#include "Context.hxx" - -using ::rtl::OUString; - -namespace sfx2 { namespace sidebar { - -namespace { - static const sal_Char* gsAny = "any"; -} - - - -ContextMatcher::ContextMatcher (void) - : maEntries() -{ -} - - - - -ContextMatcher::~ContextMatcher (void) -{ -} - - - - -sal_Int32 ContextMatcher::EvaluateMatch ( - const Context& rContext) const -{ - sal_Int32 nBestMatch (Context::NoMatch); - - for (::std::vector<Entry>::const_iterator - iEntry(maEntries.begin()), - iEnd(maEntries.end()); - iEntry!=iEnd; - ++iEntry) - { - const sal_Int32 nMatch (EvaluateMatch(rContext, *iEntry)); - if (nMatch < nBestMatch) - nBestMatch = nMatch; - if (nBestMatch == Context::OptimalMatch) - break; - } - - return nBestMatch; -} - - - - -sal_Int32 ContextMatcher::EvaluateMatch ( - const Context& rContext, - const Entry& rEntry) const -{ - sal_Int32 nApplicationMatch (Context::NoMatch); - if (rContext.msApplication.equals(rEntry.msApplicationName)) - nApplicationMatch = 0; - else if (rEntry.msApplicationName.equalsAscii(gsAny)) - nApplicationMatch = Context::ApplicationWildcardMatch; - else - return Context::NoMatch; - - sal_Int32 nBestContextMatch (Context::NoMatch); - for (::std::vector<OUString>::const_iterator - iContext(rEntry.maContextNames.begin()), - iEnd(rEntry.maContextNames.end()); - iContext!=iEnd; - ++iContext) - { - sal_Int32 nContextMatch (Context::NoMatch); - if (rContext.msContext.equals(*iContext)) - nContextMatch = 0; - else if (iContext->equalsAscii(gsAny)) - nContextMatch = Context::ContextWildcardMatch; - else - continue; - if (nContextMatch < nBestContextMatch) - nBestContextMatch = nContextMatch; - } - - if (rEntry.mbIsContextListNegated) - nBestContextMatch = Context::NoMatch - nBestContextMatch; - - return nApplicationMatch + nBestContextMatch; -} - - - - -void ContextMatcher::AddMatcher ( - const ::rtl::OUString& rsApplicationName, - const ::std::vector<rtl::OUString>& rContextNames, - const bool bIsContextListNegated) -{ - maEntries.push_back(Entry()); - maEntries.back().msApplicationName = rsApplicationName; - maEntries.back().maContextNames = rContextNames; - maEntries.back().mbIsContextListNegated = bIsContextListNegated; -} - - - - -void ContextMatcher::AddMatcher ( - const ::rtl::OUString& rsApplicationName, - const ::rtl::OUString& rsContextName) -{ - maEntries.push_back(Entry()); - maEntries.back().msApplicationName = rsApplicationName; - maEntries.back().maContextNames.push_back(rsContextName); - maEntries.back().mbIsContextListNegated = false; -} - - -} } // end of namespace sfx2::sidebar - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/sidebar/ContextMatcher.hxx b/sfx2/source/sidebar/ContextMatcher.hxx deleted file mode 100644 index 99b218d56aee..000000000000 --- a/sfx2/source/sidebar/ContextMatcher.hxx +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef INCLUDED_SFX2_SOURCE_SIDEBAR_CONTEXTMATCHER_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_CONTEXTMATCHER_HXX - -#include <sal/types.h> -#include <rtl/ustring.hxx> - -#include <vector> - - -namespace sfx2 { namespace sidebar { - -class Context; - - -/** Data read from the configuration for matching contexts. -*/ -class ContextMatcher -{ -public: - ContextMatcher (void); - ~ContextMatcher (void); - - sal_Int32 EvaluateMatch ( - const Context& rContext) const; - - void AddMatcher ( - const ::rtl::OUString& rsApplicationName, - const ::std::vector<rtl::OUString>& rContextNames, - const bool mbIsContextListNegated); - void AddMatcher ( - const ::rtl::OUString& rsApplicationName, - const ::rtl::OUString& rsContextName); - -private: - class Entry - { - public: - ::rtl::OUString msApplicationName; - ::std::vector<rtl::OUString> maContextNames; - bool mbIsContextListNegated; - }; - ::std::vector<Entry> maEntries; - - sal_Int32 EvaluateMatch ( - const Context& rContext, - const Entry& rEntry) const; - -}; -static bool IsMatchBetterThan (const sal_Int32 nMatchA, const sal_Int32 nMatchB); - - -} } // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/sidebar/DeckConfiguration.cxx b/sfx2/source/sidebar/DeckConfiguration.cxx deleted file mode 100644 index f65e409d1159..000000000000 --- a/sfx2/source/sidebar/DeckConfiguration.cxx +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#include "precompiled_sfx2.hxx" - -#include "DeckConfiguration.hxx" -#include "Deck.hxx" - - -namespace sfx2 { namespace sidebar { - -DeckConfiguration::DeckConfiguration (void) - : mpDeck(NULL), - maPanels() -{ -} - - - - -void DeckConfiguration::Dispose (void) -{ - if (mpDeck != NULL) - { - mpDeck->Dispose(); - - Deck* pDeck = mpDeck; - mpDeck = NULL; - OSL_TRACE("deleting deck window subtree"); - pDeck->PrintWindowTree(); - delete pDeck; - } -} - - - -} } // end of namespace sfx2::sidebar - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/sidebar/DeckConfiguration.hxx b/sfx2/source/sidebar/DeckConfiguration.hxx deleted file mode 100644 index 208c84e62552..000000000000 --- a/sfx2/source/sidebar/DeckConfiguration.hxx +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef INCLUDED_SFX2_SOURCE_SIDEBAR_DECKCONFIGURATION_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_DECKCONFIGURATION_HXX - -#include <vector> - -namespace sfx2 { namespace sidebar { - -class Deck; -class Panel; - - -class DeckConfiguration -{ -public: - Deck* mpDeck; - ::std::vector<Panel*> maPanels; - - DeckConfiguration (void); - - void Dispose (void); -}; - - - - -} } // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 39b548881985..7701879683d0 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -21,7 +21,6 @@ #include "DeckTitleBar.hxx" #include "Panel.hxx" #include "PanelTitleBar.hxx" -#include "SidebarPanel.hxx" #include "SidebarResource.hxx" #include "TabBar.hxx" #include <sfx2/sidebar/Theme.hxx> diff --git a/sfx2/source/sidebar/SidebarPanel.cxx b/sfx2/source/sidebar/SidebarPanel.cxx deleted file mode 100644 index af2f34cfb12b..000000000000 --- a/sfx2/source/sidebar/SidebarPanel.cxx +++ /dev/null @@ -1,173 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#include "precompiled_sfx2.hxx" - -#include "SidebarPanel.hxx" - -#include "Panel.hxx" -#include <sfx2/sidebar/Theme.hxx> - -#include <vos/mutex.hxx> -#include <vcl/svapp.hxx> -#include <svl/smplhint.hxx> -#include <comphelper/processfactory.hxx> -#include <com/sun/star/awt/XWindowPeer.hpp> - - -using namespace css; -using namespace cssu; - -namespace sfx2 { namespace sidebar { - -Reference<css::ui::XSidebarPanel> SidebarPanel::Create (Panel* pPanel) -{ - return Reference<css::ui::XSidebarPanel>(new SidebarPanel(pPanel)); -} - - - - -SidebarPanel::SidebarPanel(Panel* pPanel) - : SidebarPanelInterfaceBase(m_aMutex), - mpPanel(pPanel), - mxCanvas() -{ - if (mpPanel != NULL) - mpPanel->AddEventListener(LINK(this, SidebarPanel, HandleWindowEvent)); - else - { - mpPanel = NULL; - dispose(); - } -} - - - - -SidebarPanel::~SidebarPanel (void) -{ -} - - - - -void SAL_CALL SidebarPanel::disposing (const css::lang::EventObject& rEventObject) - throw(cssu::RuntimeException) -{ - (void)rEventObject; -} - - - - -void SAL_CALL SidebarPanel::disposing (void) -{ - if (mpPanel != NULL) - { - mpPanel->RemoveEventListener(LINK(this, SidebarPanel, HandleWindowEvent)); - mpPanel = NULL; - } -} - - - - -cssu::Reference<css::rendering::XCanvas> SAL_CALL SidebarPanel::getCanvas (void) - throw (cssu::RuntimeException) -{ - if ( ! mxCanvas.is()) - { - Sequence<Any> aArg (5); - - // common: first any is VCL pointer to window (for VCL canvas) - aArg[0] = makeAny(reinterpret_cast<sal_Int64>(mpPanel)); - aArg[1] = Any(); - aArg[2] = makeAny(::com::sun::star::awt::Rectangle()); - aArg[3] = makeAny(sal_False); - aArg[4] = makeAny(mpPanel->GetComponentInterface()); - - css::uno::Reference<css::uno::XComponentContext> context( - comphelper::getProcessComponentContext()); - mxCanvas = Reference<rendering::XCanvas>( - context->getServiceManager()->createInstanceWithArgumentsAndContext( - "com.sun.star.rendering.Canvas.VCL", aArg, context), - UNO_QUERY); - } - - return mxCanvas; - -} - - - - -awt::Point SAL_CALL SidebarPanel::getPositionOnScreen (void) - throw (cssu::RuntimeException) -{ - awt::Point aAwtPoint; - - if (mpPanel != NULL) - { - ::vos::OGuard aGuard (Application::GetSolarMutex()); - - // mpPanel->GetPosPixel() - const Point aLocationOnScreen (mpPanel->OutputToAbsoluteScreenPixel(Point(0,0))); - - aAwtPoint.X = aLocationOnScreen.X(); - aAwtPoint.Y = aLocationOnScreen.Y(); - } - - return aAwtPoint; -} - - - - -Reference<beans::XPropertySet> SAL_CALL SidebarPanel::getThemeProperties (void) - throw (RuntimeException) -{ - return Theme::GetPropertySet(); -} - - - - -IMPL_LINK(SidebarPanel, HandleWindowEvent, VclWindowEvent*, pEvent) -{ - if (pEvent != NULL) - { - switch (pEvent->GetId()) - { - case SFX_HINT_DYING: - dispose(); - break; - - default: - break; - } - } - - return sal_True; -} - - - -} } // end of namespace sfx2::sidebar - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/sidebar/SidebarPanel.hxx b/sfx2/source/sidebar/SidebarPanel.hxx deleted file mode 100644 index 29de65dc0c4b..000000000000 --- a/sfx2/source/sidebar/SidebarPanel.hxx +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef INCLUDED_SFX2_SOURCE_SIDEBAR_SIDEBARPANEL_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_SIDEBARPANEL_HXX - -#include <tools/link.hxx> -#include <com/sun/star/ui/XSidebarPanel.hpp> - -#include <boost/noncopyable.hpp> -#include <cppuhelper/compbase1.hxx> -#include <cppuhelper/basemutex.hxx> - -namespace cssu = ::com::sun::star::uno; - -namespace -{ - typedef ::cppu::WeakComponentImplHelper1 < - css::ui::XSidebarPanel - > SidebarPanelInterfaceBase; -} - - -class DockingWindow; -class VclWindowEvent; - -namespace sfx2 { namespace sidebar { - -class Panel; - -class SidebarPanel - : private ::boost::noncopyable, - private ::cppu::BaseMutex, - public SidebarPanelInterfaceBase -{ -public: - static cssu::Reference<css::ui::XSidebarPanel> Create (Panel* pPanel); - -protected: - SidebarPanel( - Panel* pPanel); - virtual ~SidebarPanel (void); - - virtual void SAL_CALL disposing (const css::lang::EventObject& rEventObject) - throw(cssu::RuntimeException); - - virtual void SAL_CALL disposing (void) SAL_OVERRIDE; - -private: - Panel* mpPanel; - cssu::Reference<css::rendering::XCanvas> mxCanvas; - - DECL_LINK(HandleWindowEvent, VclWindowEvent*); -}; - - -} } // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |