You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by zh...@apache.org on 2013/03/21 21:47:25 UTC

svn commit: r1459519 [1/2] - in /openoffice/branches/sidebar/main: default_images/svx/res/ sfx2/inc/sfx2/sidebar/ sfx2/source/sidebar/ svx/inc/svx/sidebar/ svx/source/sidebar/ svx/source/sidebar/debug/ svx/source/sidebar/possize/

Author: zhengfan
Date: Thu Mar 21 20:47:25 2013
New Revision: 1459519

URL: http://svn.apache.org/r1459519
Log: (empty)

Added:
    openoffice/branches/sidebar/main/default_images/svx/res/rotation.png   (with props)
    openoffice/branches/sidebar/main/default_images/svx/res/rotation_h.png   (with props)
    openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/ContextChangeBroadcaster.hxx   (with props)
    openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/IContextChangeReceiver.hxx   (with props)
    openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextChangeBroadcaster.cxx   (with props)
    openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextList.cxx   (with props)
    openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextList.hxx   (with props)
    openoffice/branches/sidebar/main/svx/inc/svx/sidebar/SelectionAnalyzer.hxx   (with props)
    openoffice/branches/sidebar/main/svx/inc/svx/sidebar/SelectionChangeHandler.hxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.hxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/SelectionAnalyzer.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/SelectionChangeHandler.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/debug/
    openoffice/branches/sidebar/main/svx/source/sidebar/debug/ColorPanel.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/debug/ColorPanel.hxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/debug/ContextPanel.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/debug/ContextPanel.hxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/debug/NotYetImplementedPanel.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/debug/NotYetImplementedPanel.hxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/possize/
    openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.hrc   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.hxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.src   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/possize/SidebarDialControl.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/possize/SidebarDialControl.hxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/possize/SidebarDialControlBmp.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/possize/SidebarDialControlBmp.hxx   (with props)

Added: openoffice/branches/sidebar/main/default_images/svx/res/rotation.png
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/default_images/svx/res/rotation.png?rev=1459519&view=auto
==============================================================================
Binary file - no diff available.

Propchange: openoffice/branches/sidebar/main/default_images/svx/res/rotation.png
------------------------------------------------------------------------------
    svn:executable = *

Propchange: openoffice/branches/sidebar/main/default_images/svx/res/rotation.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: openoffice/branches/sidebar/main/default_images/svx/res/rotation_h.png
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/default_images/svx/res/rotation_h.png?rev=1459519&view=auto
==============================================================================
Binary file - no diff available.

Propchange: openoffice/branches/sidebar/main/default_images/svx/res/rotation_h.png
------------------------------------------------------------------------------
    svn:executable = *

Propchange: openoffice/branches/sidebar/main/default_images/svx/res/rotation_h.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/ContextChangeBroadcaster.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/ContextChangeBroadcaster.hxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/ContextChangeBroadcaster.hxx (added)
+++ openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/ContextChangeBroadcaster.hxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,62 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef SFX_SIDEBAR_CONTEXT_CHANGE_BROADCASTER_HXX
+#define SFX_SIDEBAR_CONTEXT_CHANGE_BROADCASTER_HXX
+
+#include <com/sun/star/frame/XFrame.hpp>
+
+namespace css = ::com::sun::star;
+namespace cssu = ::com::sun::star::uno;
+
+namespace sfx2 { namespace sidebar {
+
+
+/** This class is a helper for broadcasting context changes that are
+    tied to shells being activated or deactivated.
+*/
+class ContextChangeBroadcaster
+{
+public:
+    ContextChangeBroadcaster (void);
+    ~ContextChangeBroadcaster (void);
+
+    void Initialize (const ::rtl::OUString& rsContextName);
+
+    void Activate (const cssu::Reference<css::frame::XFrame>& rxFrame);
+    void Deactivate (const cssu::Reference<css::frame::XFrame>& rxFrame);
+
+private:
+    rtl::OUString msContextName;
+    bool mbIsContextActive;
+
+    void BroadcastContextChange (
+        const cssu::Reference<css::frame::XFrame>& rxFrame,
+        const ::rtl::OUString& rsModuleName,
+        const ::rtl::OUString& rsContextName);
+    ::rtl::OUString GetModuleName (
+        const cssu::Reference<css::frame::XFrame>& rxFrame);
+};
+
+
+} } // end of namespace ::sd::sidebar
+
+#endif

Propchange: openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/ContextChangeBroadcaster.hxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/IContextChangeReceiver.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/IContextChangeReceiver.hxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/IContextChangeReceiver.hxx (added)
+++ openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/IContextChangeReceiver.hxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,40 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef SFX_SIDEBAR_CONTEXT_CHANGE_RECEIVER_INTERFACE_HXX
+#define SFX_SIDEBAR_CONTEXT_CHANGE_RECEIVER_INTERFACE_HXX
+
+#include "EnumContext.hxx"
+
+
+namespace sfx2 { namespace sidebar {
+
+
+class SFX2_DLLPUBLIC IContextChangeReceiver
+{
+public:
+    virtual void HandleContextChange (
+        const EnumContext aContext) = 0;
+};
+
+} } // end of namespace ::sd::sidebar
+
+#endif

Propchange: openoffice/branches/sidebar/main/sfx2/inc/sfx2/sidebar/IContextChangeReceiver.hxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextChangeBroadcaster.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextChangeBroadcaster.cxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextChangeBroadcaster.cxx (added)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextChangeBroadcaster.cxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,137 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#include "precompiled_sfx2.hxx"
+
+#include "sfx2/sidebar/ContextChangeBroadcaster.hxx"
+#include "sfx2/sidebar/EnumContext.hxx"
+#include <com/sun/star/ui/ContextChangeEventObject.hpp>
+#include <com/sun/star/ui/ContextChangeEventMultiplexer.hpp>
+#include <com/sun/star/frame/XModuleManager.hpp>
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
+
+
+using ::rtl::OUString;
+using namespace css;
+using namespace cssu;
+
+namespace sfx2 { namespace sidebar {
+
+
+ContextChangeBroadcaster::ContextChangeBroadcaster (void)
+    : msContextName(),
+      mbIsContextActive(false)
+{
+}
+
+
+
+ContextChangeBroadcaster::~ContextChangeBroadcaster (void)
+{
+}
+
+
+
+
+void ContextChangeBroadcaster::Initialize (const ::rtl::OUString& rsContextName)
+{
+    OSL_ASSERT( ! mbIsContextActive);
+    
+    msContextName = rsContextName;
+}
+
+
+
+
+void ContextChangeBroadcaster::Activate (const cssu::Reference<css::frame::XFrame>& rxFrame)
+{
+    if (msContextName.getLength() > 0)
+        BroadcastContextChange(rxFrame, GetModuleName(rxFrame), msContextName);
+}
+
+
+
+
+void ContextChangeBroadcaster::Deactivate (const cssu::Reference<css::frame::XFrame>& rxFrame)
+{
+    if (msContextName.getLength() > 0)
+    {
+        BroadcastContextChange(
+            rxFrame,
+            GetModuleName(rxFrame),
+            EnumContext::GetContextName(EnumContext::Context_Default));
+    }
+}
+
+
+
+
+void ContextChangeBroadcaster::BroadcastContextChange (
+    const cssu::Reference<css::frame::XFrame>& rxFrame,
+    const ::rtl::OUString& rsModuleName,
+    const ::rtl::OUString& rsContextName)
+{
+    if (rsContextName.getLength() == 0)
+        return;
+    
+    if ( ! rxFrame.is())
+    {
+        OSL_ENSURE(false, "Activate called with invalid frame");
+        return;
+    }
+    
+    const css::ui::ContextChangeEventObject aEvent(
+        rxFrame->getController(),
+        rsModuleName,
+        rsContextName);
+    
+    cssu::Reference<css::ui::XContextChangeEventMultiplexer> xMultiplexer (
+        css::ui::ContextChangeEventMultiplexer::get(
+            ::comphelper::getProcessComponentContext()));
+    if (xMultiplexer.is())
+        xMultiplexer->broadcastContextChangeEvent(aEvent, rxFrame->getController());
+}
+
+
+
+
+OUString ContextChangeBroadcaster::GetModuleName (const cssu::Reference<css::frame::XFrame>& rxFrame)
+{
+    OUString sModuleName;
+    try
+    {
+        const ::comphelper::ComponentContext aContext (::comphelper::getProcessServiceFactory());
+        const Reference<frame::XModuleManager> xModuleManager (
+            aContext.createComponent("com.sun.star.frame.ModuleManager" ),
+            UNO_QUERY_THROW );
+        return xModuleManager->identify(rxFrame);
+    }
+    catch (const Exception&)
+    {
+        OSL_ENSURE(false, "can not determine module name");
+    }
+    return OUString();
+}
+
+
+
+} } // end of namespace ::sd::sidebar

Propchange: openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextChangeBroadcaster.cxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextList.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextList.cxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextList.cxx (added)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextList.cxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,111 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#include "precompiled_sfx2.hxx"
+
+#include "ContextList.hxx"
+#include "Context.hxx"
+
+using ::rtl::OUString;
+
+namespace sfx2 { namespace sidebar {
+
+namespace {
+    static const sal_Char* gsAny = "any";
+}
+
+
+
+ContextList::ContextList (void)
+    : maEntries()
+{
+}
+
+
+
+
+ContextList::~ContextList (void)
+{
+}
+
+
+
+
+const ContextList::Entry* ContextList::GetMatch (const Context& rContext) const
+{
+    const ::std::vector<Entry>::const_iterator iEntry = FindBestMatch(rContext);
+    if (iEntry != maEntries.end())
+        return &*iEntry;
+    else
+        return NULL;
+}
+
+
+
+
+::std::vector<ContextList::Entry>::const_iterator ContextList::FindBestMatch (const Context& rContext) const
+{
+    sal_Int32 nBestMatch (Context::NoMatch);
+    ::std::vector<Entry>::const_iterator iBestMatch (maEntries.end());
+    
+    for (::std::vector<Entry>::const_iterator
+             iEntry(maEntries.begin()),
+             iEnd(maEntries.end());
+         iEntry!=iEnd;
+         ++iEntry)
+    {
+        const sal_Int32 nMatch (rContext.EvaluateMatch(iEntry->maContext));
+        if (nMatch < nBestMatch)
+        {
+            nBestMatch = nMatch;
+            iBestMatch = iEntry;
+        }
+        if (nBestMatch == Context::OptimalMatch)
+            return iEntry;
+    }
+
+    return iBestMatch;
+}
+
+
+
+
+void ContextList::AddContextDescription (
+    const Context& rContext,
+    const bool bIsInitiallyVisible,
+    const OUString& rsMenuCommand)
+{
+    maEntries.push_back(Entry());
+    maEntries.back().maContext = rContext;
+    maEntries.back().mbIsInitiallyVisible = bIsInitiallyVisible;
+    maEntries.back().msMenuCommand = rsMenuCommand;
+}
+
+
+
+
+bool ContextList::IsEmpty (void)
+{
+    return maEntries.empty();
+}
+
+
+} } // end of namespace sfx2::sidebar

Propchange: openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextList.cxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextList.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextList.hxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextList.hxx (added)
+++ openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextList.hxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,73 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef SFX_SIDEBAR_CONTEXT_LIST_HXX
+#define SFX_SIDEBAR_CONTEXT_LIST_HXX
+
+#include "Context.hxx"
+#include <sal/types.h>
+#include <rtl/ustring.hxx>
+
+#include <vector>
+
+
+namespace sfx2 { namespace sidebar {
+
+
+class ContextList
+{
+public:
+    ContextList (void);
+    ~ContextList (void);
+
+    class Entry
+    {
+    public:
+        Context maContext;
+        bool mbIsInitiallyVisible;
+        ::rtl::OUString msMenuCommand;
+    };
+
+    /** Return <TRUE/> when the given context matches any of the stored contexts.
+    */
+    const Entry* GetMatch (
+        const Context& rContext) const;
+
+    void AddContextDescription (
+        const Context& rContext,
+        const bool bIsInitiallyVisible,
+        const ::rtl::OUString& rsMenuCommand);
+
+    /** Returns <TRUE/> when no call to AddContextDescription() was made before.
+    */
+    bool IsEmpty (void);
+    
+    
+private:
+    ::std::vector<Entry> maEntries;
+
+    ::std::vector<Entry>::const_iterator FindBestMatch (const Context& rContext) const;
+};
+
+
+} } // end of namespace sfx2::sidebar
+
+#endif

Propchange: openoffice/branches/sidebar/main/sfx2/source/sidebar/ContextList.hxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/svx/inc/svx/sidebar/SelectionAnalyzer.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/inc/svx/sidebar/SelectionAnalyzer.hxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/inc/svx/sidebar/SelectionAnalyzer.hxx (added)
+++ openoffice/branches/sidebar/main/svx/inc/svx/sidebar/SelectionAnalyzer.hxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,66 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef _SVX_SIDEBAR_SELECTION_ANALYZER_HXX_
+#define _SVX_SIDEBAR_SELECTION_ANALYZER_HXX_
+
+#include <sfx2/sidebar/EnumContext.hxx>
+#include "svx/svxdllapi.h"
+
+class SdrMarkList;
+class SdrObject;
+
+
+namespace svx { namespace sidebar {
+
+class SVX_DLLPUBLIC SelectionAnalyzer
+{
+public :
+    static sfx2::sidebar::EnumContext::Context GetContextForSelection_SC (
+        const SdrMarkList& rMarkList);
+    static sfx2::sidebar::EnumContext::Context GetContextForSelection_SD (
+        const SdrMarkList& rMarkList,
+        const bool bIsMasterPage,
+        const bool bIsHandoutPage,
+        const bool bIsNotesPage);
+
+private:
+    static sfx2::sidebar::EnumContext::Context GetContextForObjectId_SC (
+        const sal_uInt16 nObjectId);
+    static sfx2::sidebar::EnumContext::Context GetContextForObjectId_SD (
+        const sal_uInt16 nObjectId,
+        const bool bIsHandoutPage,
+        const bool bIsNotesPage);
+    static sal_uInt32 GetInventorTypeFromMark (
+        const SdrMarkList& rMarkList);
+    static sal_uInt16 GetObjectTypeFromMark (
+        const SdrMarkList& rMarkList);
+    static sal_uInt16 GetObjectTypeFromGroup (
+        const SdrObject* pObj);
+    static bool IsShapeType (
+        const sal_uInt16 nType);
+    static bool IsTextObjType (
+        const sal_uInt16 nType);
+};
+
+} } // end of namespace svx::sidebar
+
+#endif

Propchange: openoffice/branches/sidebar/main/svx/inc/svx/sidebar/SelectionAnalyzer.hxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/svx/inc/svx/sidebar/SelectionChangeHandler.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/inc/svx/sidebar/SelectionChangeHandler.hxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/inc/svx/sidebar/SelectionChangeHandler.hxx (added)
+++ openoffice/branches/sidebar/main/svx/inc/svx/sidebar/SelectionChangeHandler.hxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,89 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef _SVX_SIDEBAR_SELECTION_CHANGE_HANDLER_HXX_
+#define _SVX_SIDEBAR_SELECTION_CHANGE_HANDLER_HXX_
+
+#include "svx/svxdllapi.h"
+#include <sfx2/sidebar/EnumContext.hxx>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/view/XSelectionChangeListener.hpp>
+
+#include <cppuhelper/compbase1.hxx>
+#include <cppuhelper/basemutex.hxx>
+
+#include <boost/noncopyable.hpp>
+#include <boost/function.hpp>
+
+namespace css = ::com::sun::star;
+namespace cssu = ::com::sun::star::uno;
+
+
+class SdrMarkView;
+
+
+namespace svx { namespace sidebar {
+
+namespace {
+    typedef ::cppu::WeakComponentImplHelper1 <
+        css::view::XSelectionChangeListener
+        > SelectionChangeHandlerInterfaceBase;
+}
+
+
+class SVX_DLLPUBLIC SelectionChangeHandler
+    : private ::boost::noncopyable,
+      private ::cppu::BaseMutex,
+      public SelectionChangeHandlerInterfaceBase
+{
+public:
+    SelectionChangeHandler (
+        const boost::function<sfx2::sidebar::EnumContext::Context(void)>& rSelectionChangeCallback,
+        const cssu::Reference<css::frame::XController>& rxController,
+        const sfx2::sidebar::EnumContext::Context eDefaultContext);
+    virtual ~SelectionChangeHandler (void);
+        
+    virtual void SAL_CALL selectionChanged (const css::lang::EventObject& rEvent)
+        throw (cssu::RuntimeException);
+        
+    virtual void SAL_CALL disposing (const css::lang::EventObject& rEvent)
+        throw (cssu::RuntimeException);
+
+    virtual void SAL_CALL disposing (void)
+        throw (cssu::RuntimeException);
+
+    void Connect (void);
+    void Disconnect (void);
+
+private:
+    const boost::function<sfx2::sidebar::EnumContext::Context(void)> maSelectionChangeCallback;
+    cssu::Reference<css::frame::XController> mxController;
+    const sfx2::sidebar::EnumContext::Context meDefaultContext;
+    bool mbIsConnected;
+};
+
+
+} } // end of namespace svx::sidebar
+
+
+#endif
+

Propchange: openoffice/branches/sidebar/main/svx/inc/svx/sidebar/SelectionChangeHandler.hxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.cxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.cxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.cxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,49 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#include "precompiled_svx.hxx"
+
+#include "EmptyPanel.hxx"
+
+namespace svx { namespace sidebar {
+
+EmptyPanel::EmptyPanel (::Window* pParent)
+    : Window(pParent, 0),
+      maMessageControl(this, 0)
+{
+    maMessageControl.SetPosSizePixel(5,5, 250,15);
+    maMessageControl.SetText(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Intentionally letft blank")));
+    
+    maMessageControl.Show();
+    Show();
+}
+
+
+
+
+EmptyPanel::~EmptyPanel (void)
+{
+}
+
+
+
+
+} } // end of namespace ::svx::sidebar

Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.cxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.hxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.hxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.hxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,48 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef SVX_SIDEBAR_DEBUG_EMPTY_PANEL_HXX
+#define SVX_SIDEBAR_DEBUG_EMPTY_PANEL_HXX
+
+#include <vcl/window.hxx>
+#include <vcl/fixed.hxx>
+
+
+namespace svx { namespace sidebar {
+
+
+/** Display a panel that tells the user that the current deck is
+    intentionally empty.
+*/
+class EmptyPanel
+    : public Window
+{
+public:
+    EmptyPanel (::Window* pParent);
+    virtual ~EmptyPanel (void);
+
+private:
+    FixedText maMessageControl;
+};
+
+} } // end of namespace ::svx::sidebar
+
+#endif

Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/EmptyPanel.hxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/svx/source/sidebar/SelectionAnalyzer.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/SelectionAnalyzer.cxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/SelectionAnalyzer.cxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/SelectionAnalyzer.cxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,461 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#include "precompiled_svx.hxx"
+
+#include "svx/sidebar/SelectionAnalyzer.hxx"
+#include "svx/svdmrkv.hxx"
+#include "svx/svdobj.hxx"
+#include "svx/svdpage.hxx"
+#include "svx/fmglob.hxx"
+#include "svx/globl3d.hxx"
+
+using sfx2::sidebar::EnumContext;
+
+
+namespace svx { namespace sidebar {
+
+EnumContext::Context SelectionAnalyzer::GetContextForSelection_SC (const SdrMarkList& rMarkList)
+{
+    EnumContext::Context eContext = EnumContext::Context_Unknown;
+
+    switch (rMarkList.GetMarkCount())
+    {
+        case 0:
+            // Empty selection.  Return Context_Unknown to let the caller
+            // substitute it with the default context.
+            break;
+
+        case 1:
+        {
+            SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+            const sal_uInt32 nInv = pObj->GetObjInventor();
+            const sal_uInt16 nObjId = pObj->GetObjIdentifier();
+            if (nInv == SdrInventor)
+                eContext = GetContextForObjectId_SC(nObjId);
+            else if (nInv == FmFormInventor)
+                eContext = EnumContext::Context_Form;
+            break;
+        }
+        
+        default:
+        {
+            // Multi selection.
+            switch (GetInventorTypeFromMark(rMarkList))
+            {
+                case SdrInventor:
+                {
+                    const sal_uInt16 nObjId (GetObjectTypeFromMark(rMarkList));
+                    if (nObjId == 0)
+                        eContext = EnumContext::Context_MultiObject;
+                    else
+                        eContext = GetContextForObjectId_SC(nObjId);
+                    break;
+                }
+
+                case FmFormInventor:
+                    eContext = EnumContext::Context_Form;
+                    break;
+
+                case 0:
+                    eContext = EnumContext::Context_MultiObject;
+                    break;
+            }
+        }
+    }
+
+    return eContext;
+}
+
+
+
+
+EnumContext::Context SelectionAnalyzer::GetContextForSelection_SD (
+    const SdrMarkList& rMarkList,
+    const bool bIsMasterPage,
+    const bool bIsHandoutPage,
+    const bool bIsNotesPage)
+{
+    EnumContext::Context eContext = EnumContext::Context_Unknown;
+
+    // Note that some cases are handled by the caller.  They rely on
+    // sd specific data.
+    switch (rMarkList.GetMarkCount())
+    {
+        case 0:
+            if (bIsHandoutPage)
+                eContext = EnumContext::Context_HandoutPage;
+            else if (bIsNotesPage)
+                eContext = EnumContext::Context_NotesPage;
+            else if (bIsMasterPage)
+                eContext = EnumContext::Context_MasterPage;
+            else
+                eContext = EnumContext::Context_DrawPage;
+            break;
+            
+        case 1:
+        {
+            SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+            const sal_uInt32 nInv = pObj->GetObjInventor();
+            sal_uInt16 nObjId = pObj->GetObjIdentifier();
+            if (nInv == SdrInventor)
+            {
+                if (nObjId == OBJ_GRUP)
+                {
+                    nObjId = GetObjectTypeFromGroup(pObj);
+                    if (nObjId == 0)
+                        nObjId = OBJ_GRUP;
+                }
+                eContext = GetContextForObjectId_SD(nObjId, bIsHandoutPage, bIsNotesPage);
+            }
+            else if (nInv == E3dInventor)
+            {
+                eContext = EnumContext::Context_3DObject;
+            }
+            else if (nInv == FmFormInventor)
+            {
+                eContext = EnumContext::Context_Form;
+            }
+            break;
+        }
+        
+        default:
+        {
+            switch (GetInventorTypeFromMark(rMarkList))
+            {
+                case SdrInventor:
+                {
+                    const sal_uInt16 nObjId = GetObjectTypeFromMark(rMarkList);
+                    if (nObjId == 0)
+                        eContext = EnumContext::Context_MultiObject;
+                    else
+                        eContext = GetContextForObjectId_SD(nObjId, bIsHandoutPage, bIsNotesPage);
+                    break;
+                }
+                
+                case E3dInventor:
+                    eContext = EnumContext::Context_3DObject;
+                    break;
+
+                case FmFormInventor:
+                    eContext = EnumContext::Context_Form;
+                    break;
+
+                case 0:
+                    eContext = EnumContext::Context_MultiObject;
+                    break;
+            }
+            break;
+        }
+    }
+
+	return eContext;
+}
+
+
+
+
+EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SC (const sal_uInt16 nObjectId)
+{
+    switch (nObjectId)
+    {
+        case OBJ_CAPTION:
+        case OBJ_TITLETEXT:
+        case OBJ_OUTLINETEXT:
+        case OBJ_TEXT:
+        case OBJ_TEXTEXT:
+        case OBJ_PATHLINE:
+        case OBJ_PLIN:
+        case OBJ_FREELINE:
+        case OBJ_EDGE:
+        case OBJ_LINE:
+        case OBJ_MEASURE:
+        case OBJ_RECT:
+        case OBJ_CIRC:
+        case OBJ_FREEFILL:
+        case OBJ_PATHFILL:
+        case OBJ_POLY:
+        case OBJ_SECT:
+        case OBJ_CARC:
+        case OBJ_CCUT:
+        case OBJ_CUSTOMSHAPE:
+        case OBJ_GRUP:
+            return EnumContext::Context_Draw;
+            
+        case OBJ_GRAF:
+            return EnumContext::Context_Graphic;
+            
+        case OBJ_OLE2:
+            return EnumContext::Context_OLE;
+
+        case OBJ_MEDIA:
+            return EnumContext::Context_Media;
+            break;
+
+        default:
+            return EnumContext::Context_Unknown;
+    }
+}
+
+
+
+
+EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SD (
+    const sal_uInt16 nObjectId,
+    const bool bIsHandoutPage,
+    const bool bIsNotesPage)
+{
+	switch (nObjectId)
+	{
+		case OBJ_CAPTION:		
+		case OBJ_PATHLINE:
+		case OBJ_PLIN:
+		case OBJ_FREELINE:
+		case OBJ_EDGE:
+		case OBJ_LINE:
+		case OBJ_MEASURE:
+		case OBJ_RECT:
+		case OBJ_CIRC:
+		case OBJ_FREEFILL:
+		case OBJ_PATHFILL:
+		case OBJ_POLY:
+		case OBJ_SECT:
+		case OBJ_CARC:
+		case OBJ_CCUT:
+		case OBJ_CUSTOMSHAPE:
+		case OBJ_GRUP:
+			return EnumContext::Context_Draw;
+
+		case OBJ_TITLETEXT:
+		case OBJ_OUTLINETEXT:
+		case OBJ_TEXT:
+		case OBJ_TEXTEXT:
+			return EnumContext::Context_TextObject;
+
+		case OBJ_GRAF:
+			return EnumContext::Context_Graphic;
+
+		case OBJ_OLE2:
+			return EnumContext::Context_OLE;
+
+		case OBJ_MEDIA:
+			return EnumContext::Context_Media;
+
+		case OBJ_TABLE:
+			return EnumContext::Context_Table;
+
+		case OBJ_PAGE:
+            if (bIsHandoutPage)
+				return EnumContext::Context_HandoutPage;
+            else if (bIsNotesPage)
+				return EnumContext::Context_NotesPage;
+			else
+                return EnumContext::Context_Unknown;
+
+        default:
+            return EnumContext::Context_Unknown;
+	}
+}
+
+
+
+
+sal_uInt32 SelectionAnalyzer::GetInventorTypeFromMark (const SdrMarkList& rMarkList)
+{
+    const sal_uLong nMarkCount (rMarkList.GetMarkCount());
+    
+    if (nMarkCount < 1)
+        return 0;
+
+    SdrMark* pMark = rMarkList.GetMark(0);
+    SdrObject* pObj = pMark->GetMarkedSdrObj();
+    const sal_uInt32 nFirstInv = pObj->GetObjInventor();
+        
+    for (sal_uLong nIndex=1; nIndex<nMarkCount; ++nIndex)
+    {
+        pMark = rMarkList.GetMark(nIndex);
+        pObj = pMark->GetMarkedSdrObj();
+        const sal_uInt32 nInv (pObj->GetObjInventor());
+        
+        if (nInv != nFirstInv)
+            return 0;
+    }
+
+    return nFirstInv;
+}
+
+
+
+
+sal_uInt16 SelectionAnalyzer::GetObjectTypeFromGroup (const SdrObject* pObj)
+{
+    SdrObjList* pObjList = pObj->GetSubList();
+    if (pObjList)
+    {
+        const sal_uLong nSubObjCount (pObjList->GetObjCount());
+        
+        if (nSubObjCount>0)
+        {
+            SdrObject* pObj = pObjList->GetObj(0);
+            sal_uInt16 nResultType = pObj->GetObjIdentifier();
+
+            if (nResultType == OBJ_GRUP)
+                nResultType = GetObjectTypeFromGroup(pObj);
+
+            if (IsShapeType(nResultType))
+                nResultType = OBJ_CUSTOMSHAPE;
+
+            if (IsTextObjType(nResultType))
+                nResultType = OBJ_TEXT;
+
+            for (sal_uInt16 nIndex=1; nIndex<nSubObjCount; ++nIndex)
+            {
+                pObj = pObjList->GetObj(nIndex);
+                sal_uInt16 nType (pObj->GetObjIdentifier());
+
+                if(nType == OBJ_GRUP)
+                    nType = GetObjectTypeFromGroup(pObj);
+
+                if (IsShapeType(nType))
+                    nType = OBJ_CUSTOMSHAPE;
+
+                if ((nType == OBJ_CUSTOMSHAPE) && (nResultType == OBJ_TEXT))
+                    nType = OBJ_TEXT;
+
+                if (IsTextObjType(nType))
+                    nType = OBJ_TEXT;
+
+                if ((nType == OBJ_TEXT) && (nResultType == OBJ_CUSTOMSHAPE))
+                    nResultType = OBJ_TEXT;
+                
+                if (nType != nResultType)
+                    return 0;
+            }
+
+            return nResultType;      
+        }
+    }
+    
+    return 0;
+}
+
+
+
+
+sal_uInt16  SelectionAnalyzer::GetObjectTypeFromMark (const SdrMarkList& rMarkList)
+{
+    const sal_uLong nMarkCount (rMarkList.GetMarkCount());
+    
+    if (nMarkCount < 1)
+        return 0;
+
+    SdrMark* pMark = rMarkList.GetMark(0);
+    SdrObject* pObj = pMark->GetMarkedSdrObj();
+    sal_uInt16 nResultType = pObj->GetObjIdentifier();
+    
+    if(nResultType == OBJ_GRUP)
+        nResultType = GetObjectTypeFromGroup(pObj);
+
+    if (IsShapeType(nResultType))
+        nResultType = OBJ_CUSTOMSHAPE;
+
+    if (IsTextObjType(nResultType))
+        nResultType = OBJ_TEXT;
+    
+    for (sal_uLong nIndex=1; nIndex<nMarkCount; ++nIndex)
+    {
+        pMark = rMarkList.GetMark(nIndex);
+        pObj = pMark->GetMarkedSdrObj();
+        sal_uInt16 nType = pObj->GetObjIdentifier();
+        
+        if(nType == OBJ_GRUP)
+            nType = GetObjectTypeFromGroup(pObj);
+
+        if (IsShapeType(nType))
+            nType = OBJ_CUSTOMSHAPE;
+
+        if ((nType == OBJ_CUSTOMSHAPE) && (nResultType == OBJ_TEXT))
+            nType = OBJ_TEXT;
+
+        if (IsTextObjType(nType))
+            nType = OBJ_TEXT;
+
+        if ((nType == OBJ_TEXT) && (nResultType == OBJ_CUSTOMSHAPE))
+            nResultType = OBJ_TEXT;
+
+        if (nType != nResultType)
+            return 0;
+    }
+        
+    return nResultType;
+}
+
+
+
+
+bool SelectionAnalyzer::IsShapeType (const sal_uInt16 nType)
+{
+	switch (nType)
+    {
+		case OBJ_LINE:
+		case OBJ_CARC:
+		case OBJ_PLIN:
+		case OBJ_PATHLINE:
+		case OBJ_RECT:
+		case OBJ_CIRC:
+		case OBJ_SECT: 
+		case OBJ_CCUT:
+		case OBJ_PATHFILL:
+		case OBJ_CUSTOMSHAPE:		
+		case OBJ_CAPTION:
+		case OBJ_MEASURE:
+		case OBJ_EDGE:   
+		case OBJ_POLY:
+		case OBJ_FREELINE:
+		case OBJ_FREEFILL:
+			return true;
+
+		default:
+            return false;
+	}
+}
+
+
+
+
+bool SelectionAnalyzer::IsTextObjType (const sal_uInt16 nType)
+{
+	switch(nType)
+    {
+		case OBJ_TEXT:
+		case OBJ_TEXTEXT:
+		case OBJ_TITLETEXT:
+		case OBJ_OUTLINETEXT:		
+			return true;
+            
+		default:
+            return false;
+	}
+}
+
+
+
+} } // end of namespace ::svx::sidebar

Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/SelectionAnalyzer.cxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/svx/source/sidebar/SelectionChangeHandler.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/SelectionChangeHandler.cxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/SelectionChangeHandler.cxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/SelectionChangeHandler.cxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,119 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#include "svx/sidebar/SelectionChangeHandler.hxx"
+#include "svx/sidebar/SelectionAnalyzer.hxx"
+#include "svx/sidebar/ContextChangeEventMultiplexer.hxx"
+#include "svx/svdmrkv.hxx"
+
+#include <sfx2/sidebar/EnumContext.hxx>
+#include <sfx2/shell.hxx>
+
+
+using namespace css;
+using namespace cssu;
+
+using namespace sfx2::sidebar;
+
+namespace svx { namespace sidebar {
+
+SelectionChangeHandler::SelectionChangeHandler (
+    const boost::function<sfx2::sidebar::EnumContext::Context(void)>& rSelectionChangeCallback,
+    const Reference<frame::XController>& rxController,
+    const EnumContext::Context eDefaultContext)
+    : SelectionChangeHandlerInterfaceBase(m_aMutex),
+      maSelectionChangeCallback(rSelectionChangeCallback),
+      mxController(rxController),
+      meDefaultContext(eDefaultContext),
+      mbIsConnected(false)
+{
+}
+
+
+
+
+SelectionChangeHandler::~SelectionChangeHandler (void)
+{
+}
+
+
+
+
+void SAL_CALL SelectionChangeHandler::selectionChanged (const lang::EventObject&)
+    throw (uno::RuntimeException)
+{
+    if (maSelectionChangeCallback)
+    {
+        const EnumContext::Context eContext (maSelectionChangeCallback());
+        ContextChangeEventMultiplexer::NotifyContextChange(
+            mxController,
+            eContext==EnumContext::Context_Unknown
+                ? meDefaultContext
+                : eContext);
+    }
+}
+        
+
+
+
+void SAL_CALL SelectionChangeHandler::disposing (const lang::EventObject&)
+    throw (uno::RuntimeException)
+{
+}
+
+
+
+
+void SAL_CALL SelectionChangeHandler::disposing (void)
+    throw (uno::RuntimeException)
+{
+    if (mbIsConnected)
+        Disconnect();
+}
+
+
+
+
+void SelectionChangeHandler::Connect (void)
+{
+    uno::Reference<view::XSelectionSupplier> xSupplier (mxController, uno::UNO_QUERY);
+    if (xSupplier.is())
+    {
+        mbIsConnected = true;
+        xSupplier->addSelectionChangeListener(this);
+    }
+}
+
+
+
+
+void SelectionChangeHandler::Disconnect (void)
+{
+    uno::Reference<view::XSelectionSupplier> xSupplier (mxController, uno::UNO_QUERY);
+    if (xSupplier.is())
+    {
+        mbIsConnected = false;
+        xSupplier->removeSelectionChangeListener(this);
+    }
+}
+
+
+} } // end of namespace svx::sidebar

Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/SelectionChangeHandler.cxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/svx/source/sidebar/debug/ColorPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/debug/ColorPanel.cxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/debug/ColorPanel.cxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/debug/ColorPanel.cxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,233 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#include "precompiled_svx.hxx"
+
+#include "ColorPanel.hxx"
+
+#include <vcl/image.hxx>
+#include <vcl/svapp.hxx>
+
+namespace svx { namespace sidebar {
+
+ColorPanel::ColorPanel (::Window* pParent)
+    : ValueSet(pParent),
+      mnPreferredColumnCount(2)
+{
+    WinBits aStyle = 
+        WB_ITEMBORDER 
+        | WB_DOUBLEBORDER 
+        | WB_NAMEFIELD 
+        | WB_FLATVALUESET
+        | WB_TABSTOP
+        | WB_VSCROLL;
+
+    SetStyle(GetStyle() | aStyle); 
+    SetExtraSpacing(2);
+
+    Fill ();
+    Show();
+}
+
+
+
+
+ColorPanel::~ColorPanel (void)
+{
+}
+
+
+
+
+sal_Int32 ColorPanel::GetPreferredHeight (sal_Int32 nWidth)
+{
+    sal_Int32 nPreferredHeight = 0;
+    if (GetItemCount()>0)
+    {
+        Image aImage = GetItemImage(GetItemId(0));
+        Size aItemSize = CalcItemSizePixel (aImage.GetSizePixel());
+        if (nWidth>0 && aItemSize.Width()>0)
+        {
+            int nColumnCount = nWidth / aItemSize.Width();
+            if (nColumnCount <= 0)
+                nColumnCount = 1;
+            else if (nColumnCount > 4)
+                nColumnCount = 4;
+            int nRowCount = (GetItemCount() + nColumnCount-1) 
+                / nColumnCount;
+            nPreferredHeight = nRowCount * aItemSize.Height();
+        }
+    }
+    return nPreferredHeight;
+}
+
+
+
+
+void ColorPanel::Resize (void)
+{
+    ::Window::Resize();
+    Size aWindowSize = GetOutputSizePixel();
+    SetPosSizePixel(Point(0,0), aWindowSize);
+    if (IsVisible() && aWindowSize.Width() > 0)
+    {
+        // Calculate the number of rows and columns.
+        if (GetItemCount() > 0)
+        {
+            Image aImage = GetItemImage(GetItemId(0));
+            Size aItemSize = CalcItemSizePixel (
+                aImage.GetSizePixel());
+            int nColumnCount = aWindowSize.Width() / 30;
+            if (nColumnCount < 1)
+                nColumnCount = 1;
+            else if (nColumnCount > 4)
+                nColumnCount = 4;
+
+            sal_uInt16 nRowCount = (sal_uInt16)CalculateRowCount(aItemSize, nColumnCount);
+            
+            SetColCount((sal_uInt16)nColumnCount);
+            SetLineCount(nRowCount);
+        }
+    }
+
+}
+
+
+
+
+int ColorPanel::CalculateRowCount (const Size&, int nColumnCount)
+{
+    int nRowCount = 0;
+
+    if (GetItemCount()>0 && nColumnCount>0)
+    {
+        nRowCount = GetOutputSizePixel().Height() / 30;
+        if (nRowCount < 1)
+            nRowCount = 1;
+    }
+
+    return nRowCount;
+}
+
+
+
+
+void ColorPanel::DataChanged (const DataChangedEvent& rEvent)
+{
+    Fill();
+}
+
+
+
+
+void ColorPanel::Fill (void)
+{
+    const StyleSettings& rSettings (
+        Application::GetSettings().GetStyleSettings());
+    Clear();
+    SetItemWidth (30);
+    SetItemHeight (30);
+    sal_uInt16 i = 0;
+    InsertItem (++i, rSettings.GetFaceColor());
+    SetItemText (i, String::CreateFromAscii("FaceColor"));
+    InsertItem (++i, rSettings.GetCheckedColor());
+    SetItemText (i, String::CreateFromAscii("CheckedColor"));
+    InsertItem (++i, rSettings.GetLightColor());
+    SetItemText (i, String::CreateFromAscii("LightColor"));
+    InsertItem (++i, rSettings.GetLightBorderColor());
+    SetItemText (i, String::CreateFromAscii("LightBorderColor"));
+    InsertItem (++i, rSettings.GetShadowColor());
+    SetItemText (i, String::CreateFromAscii("ShadowColor"));
+    InsertItem (++i, rSettings.GetDarkShadowColor());
+    SetItemText (i, String::CreateFromAscii("DarkShadowColor"));
+    InsertItem (++i, rSettings.GetButtonTextColor());
+    SetItemText (i, String::CreateFromAscii("ButtonTextColor"));
+    InsertItem (++i, rSettings.GetRadioCheckTextColor());
+    SetItemText (i, String::CreateFromAscii("RadioCheckTextColor"));
+    InsertItem (++i, rSettings.GetGroupTextColor());
+    SetItemText (i, String::CreateFromAscii("GroupTextColor"));
+    InsertItem (++i, rSettings.GetLabelTextColor());
+    SetItemText (i, String::CreateFromAscii("LabelTextColor"));
+    InsertItem (++i, rSettings.GetInfoTextColor());
+    SetItemText (i, String::CreateFromAscii("InfoTextColor"));
+    InsertItem (++i, rSettings.GetWindowColor());
+    SetItemText (i, String::CreateFromAscii("WindowColor"));
+    InsertItem (++i, rSettings.GetWindowTextColor());
+    SetItemText (i, String::CreateFromAscii("WindowTextColor"));
+    InsertItem (++i, rSettings.GetDialogColor());
+    SetItemText (i, String::CreateFromAscii("DialogColor"));
+    InsertItem (++i, rSettings.GetDialogTextColor());
+    SetItemText (i, String::CreateFromAscii("DialogTextColor"));
+    InsertItem (++i, rSettings.GetWorkspaceColor());
+    SetItemText (i, String::CreateFromAscii("WorkspaceColor"));
+    InsertItem (++i, rSettings.GetFieldColor());
+    SetItemText (i, String::CreateFromAscii("FieldColor"));
+    InsertItem (++i, rSettings.GetFieldTextColor());
+    SetItemText (i, String::CreateFromAscii("FieldTextColor"));
+    InsertItem (++i, rSettings.GetActiveColor());
+    SetItemText (i, String::CreateFromAscii("ActiveColor"));
+    InsertItem (++i, rSettings.GetActiveColor2());
+    SetItemText (i, String::CreateFromAscii("ActiveColor2"));
+    InsertItem (++i, rSettings.GetActiveTextColor());
+    SetItemText (i, String::CreateFromAscii("ActiveTextColor"));
+    InsertItem (++i, rSettings.GetActiveBorderColor());
+    SetItemText (i, String::CreateFromAscii("ActiveBorderColor"));
+    InsertItem (++i, rSettings.GetDeactiveColor());
+    SetItemText (i, String::CreateFromAscii("DeactiveColor"));
+    InsertItem (++i, rSettings.GetDeactiveColor2());
+    SetItemText (i, String::CreateFromAscii("DeactiveColor2"));
+    InsertItem (++i, rSettings.GetDeactiveTextColor());
+    SetItemText (i, String::CreateFromAscii("DeactiveTextColor"));
+    InsertItem (++i, rSettings.GetDeactiveBorderColor());
+    SetItemText (i, String::CreateFromAscii("DeactiveBorderColor"));
+    InsertItem (++i, rSettings.GetHighlightColor());
+    SetItemText (i, String::CreateFromAscii("HighlightColor"));
+    InsertItem (++i, rSettings.GetHighlightTextColor());
+    SetItemText (i, String::CreateFromAscii("HighlightTextColor"));
+    InsertItem (++i, rSettings.GetDisableColor());
+    SetItemText (i, String::CreateFromAscii("DisableColor"));
+    InsertItem (++i, rSettings.GetHelpColor());
+    SetItemText (i, String::CreateFromAscii("HelpColor"));
+    InsertItem (++i, rSettings.GetHelpTextColor());
+    SetItemText (i, String::CreateFromAscii("HelpTextColor"));
+    InsertItem (++i, rSettings.GetMenuColor());
+    SetItemText (i, String::CreateFromAscii("MenuColor"));
+    InsertItem (++i, rSettings.GetMenuBarColor());
+    SetItemText (i, String::CreateFromAscii("MenuBarColor"));
+    InsertItem (++i, rSettings.GetMenuBorderColor());
+    SetItemText (i, String::CreateFromAscii("MenuBorderColor"));
+    InsertItem (++i, rSettings.GetMenuTextColor());
+    SetItemText (i, String::CreateFromAscii("MenuTextColor"));
+    InsertItem (++i, rSettings.GetMenuHighlightColor());
+    SetItemText (i, String::CreateFromAscii("MenuHighlightColor"));
+    InsertItem (++i, rSettings.GetMenuHighlightTextColor());
+    SetItemText (i, String::CreateFromAscii("MenuHighlightTextColor"));
+    InsertItem (++i, rSettings.GetLinkColor());
+    SetItemText (i, String::CreateFromAscii("LinkColor"));
+    InsertItem (++i, rSettings.GetVisitedLinkColor());
+    SetItemText (i, String::CreateFromAscii("VisitedLinkColor"));
+    InsertItem (++i, rSettings.GetHighlightLinkColor());
+    SetItemText (i, String::CreateFromAscii("HighlightLinkColor"));
+    InsertItem (++i, rSettings.GetFontColor());
+    SetItemText (i, String::CreateFromAscii("FontColor"));
+}
+
+} } // end of namespace ::svx::sidebar

Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/debug/ColorPanel.cxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/svx/source/sidebar/debug/ColorPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/debug/ColorPanel.hxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/debug/ColorPanel.hxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/debug/ColorPanel.hxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,61 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef SVX_SIDEBAR_COLOR_PANEL_HXX
+#define SVX_SIDEBAR_COLOR_PANEL_HXX
+
+#include <svtools/valueset.hxx>
+#include <vcl/window.hxx>
+
+
+namespace svx { namespace sidebar {
+
+
+/** This demo panel shows the colors that are available from the
+    StyleSettings.
+*/
+class ColorPanel
+    : public ValueSet
+{
+public:
+    ColorPanel (::Window* pParent);
+    virtual ~ColorPanel (void);
+
+    // From ::Window
+    virtual void Resize (void);
+    virtual void DataChanged (const DataChangedEvent& rEvent);
+
+private:
+    int mnPreferredColumnCount;
+
+    /** Depending on the given number of columns and the item size
+        calculate the number of rows that are necessary to display all
+        items.
+    */
+    int CalculateRowCount (const Size& rItemSize, int nColumnCount);
+    void Fill (void);
+
+    sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
+};
+
+} } // end of namespace ::svx::sidebar
+
+#endif

Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/debug/ColorPanel.hxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/svx/source/sidebar/debug/ContextPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/debug/ContextPanel.cxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/debug/ContextPanel.cxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/debug/ContextPanel.cxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,69 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#include "precompiled_svx.hxx"
+
+#include "ContextPanel.hxx"
+
+namespace svx { namespace sidebar {
+
+ContextPanel::ContextPanel (::Window* pParent)
+    : Window(pParent, 0),
+      maApplicationName(this, 0),
+      maContextName(this, 0)
+{
+    maApplicationName.SetPosSizePixel(5,5, 250,15);
+    maContextName.SetPosSizePixel(5,25, 250,15);
+
+    maApplicationName.Show();
+    maContextName.Show();
+    Show();
+}
+
+
+
+
+ContextPanel::~ContextPanel (void)
+{
+}
+
+
+
+
+sal_Int32 ContextPanel::GetPreferredHeight (sal_Int32 nWidth)
+{
+    const sal_Int32 nHeight (maContextName.GetPosPixel().Y() + maContextName.GetSizePixel().Height() + 5);
+    return nHeight;
+}
+
+
+
+
+void ContextPanel::HandleContextChange (const sfx2::sidebar::EnumContext aContext)
+{
+    maApplicationName.SetText(aContext.GetApplicationName());
+    maContextName.SetText(aContext.GetContextName());
+}
+
+
+
+
+} } // end of namespace ::svx::sidebar

Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/debug/ContextPanel.cxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/svx/source/sidebar/debug/ContextPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/debug/ContextPanel.hxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/debug/ContextPanel.hxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/debug/ContextPanel.hxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,56 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef SVX_SIDEBAR_DEBUG_CONTEXT_PANEL_HXX
+#define SVX_SIDEBAR_DEBUG_CONTEXT_PANEL_HXX
+
+#include <sfx2/sidebar/IContextChangeReceiver.hxx>
+#include <vcl/window.hxx>
+#include <vcl/fixed.hxx>
+
+
+namespace svx { namespace sidebar {
+
+
+/** Display the current context.
+*/
+class ContextPanel
+    : public Window,
+      public sfx2::sidebar::IContextChangeReceiver
+{
+public:
+    ContextPanel (::Window* pParent);
+    virtual ~ContextPanel (void);
+
+    // From Window
+    sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
+
+    // From IContextChangeReceiverInterface
+    virtual void HandleContextChange (const ::sfx2::sidebar::EnumContext aContext);
+
+private:
+    FixedText maApplicationName;
+    FixedText maContextName;
+};
+
+} } // end of namespace ::svx::sidebar
+
+#endif

Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/debug/ContextPanel.hxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/svx/source/sidebar/debug/NotYetImplementedPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/debug/NotYetImplementedPanel.cxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/debug/NotYetImplementedPanel.cxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/debug/NotYetImplementedPanel.cxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,49 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#include "precompiled_svx.hxx"
+
+#include "NotYetImplementedPanel.hxx"
+
+namespace svx { namespace sidebar {
+
+NotYetImplementedPanel::NotYetImplementedPanel (::Window* pParent)
+    : Window(pParent, 0),
+      maMessageControl(this, 0)
+{
+    maMessageControl.SetPosSizePixel(5,5, 250,15);
+    maMessageControl.SetText(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("not yet implemented")));
+    
+    maMessageControl.Show();
+    Show();
+}
+
+
+
+
+NotYetImplementedPanel::~NotYetImplementedPanel (void)
+{
+}
+
+
+
+
+} } // end of namespace ::svx::sidebar

Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/debug/NotYetImplementedPanel.cxx
------------------------------------------------------------------------------
    svn:executable = *

Added: openoffice/branches/sidebar/main/svx/source/sidebar/debug/NotYetImplementedPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/debug/NotYetImplementedPanel.hxx?rev=1459519&view=auto
==============================================================================
--- openoffice/branches/sidebar/main/svx/source/sidebar/debug/NotYetImplementedPanel.hxx (added)
+++ openoffice/branches/sidebar/main/svx/source/sidebar/debug/NotYetImplementedPanel.hxx Thu Mar 21 20:47:25 2013
@@ -0,0 +1,47 @@
+/**************************************************************
+ * 
+ * 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
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+#ifndef SVX_SIDEBAR_DEBUG_NOT_YET_IMPLEMENTED_PANEL_HXX
+#define SVX_SIDEBAR_DEBUG_NOT_YET_IMPLEMENTED_PANEL_HXX
+
+#include <vcl/window.hxx>
+#include <vcl/fixed.hxx>
+
+
+namespace svx { namespace sidebar {
+
+
+/** Display a panel as placeholder for a not-yet-implemented panel.
+*/
+class NotYetImplementedPanel
+    : public Window
+{
+public:
+    NotYetImplementedPanel (::Window* pParent);
+    virtual ~NotYetImplementedPanel (void);
+
+private:
+    FixedText maMessageControl;
+};
+
+} } // end of namespace ::svx::sidebar
+
+#endif

Propchange: openoffice/branches/sidebar/main/svx/source/sidebar/debug/NotYetImplementedPanel.hxx
------------------------------------------------------------------------------
    svn:executable = *