summaryrefslogtreecommitdiff
path: root/sfx2/source/sidebar/SidebarDockingWindow.cxx
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2013-05-16 09:51:11 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-20 15:02:20 +0100
commit2e52faf39b08b4b4575554a965c570015c46b04b (patch)
treeb3422ff2c9eaa40ec1de53dfd629d6f771122df6 /sfx2/source/sidebar/SidebarDockingWindow.cxx
parent7d56c8d0772965a20d8614482bd7c2324e4be8c1 (diff)
Resolves: #i122320# Show closer after docking sidebar.
Prevent sidebar from being docked above or below edit view. (cherry picked from commit ca7264d7ab7e8b70693362d60227c7dd7626df8b) Change-Id: I634e0b68c27039613054160b7add5d2d07b666cd (cherry picked from commit 3c451f893663c118201ccdd4688fe97f1524d21e)
Diffstat (limited to 'sfx2/source/sidebar/SidebarDockingWindow.cxx')
-rw-r--r--sfx2/source/sidebar/SidebarDockingWindow.cxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx
index f991c7a5fdd0..3b6a61daf58b 100644
--- a/sfx2/source/sidebar/SidebarDockingWindow.cxx
+++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx
@@ -102,4 +102,34 @@ sal_Bool SidebarDockingWindow::Close (void)
}
+
+
+SfxChildAlignment SidebarDockingWindow::CheckAlignment (
+ SfxChildAlignment eCurrentAlignment,
+ SfxChildAlignment eRequestedAlignment)
+{
+ switch (eRequestedAlignment)
+ {
+ case SFX_ALIGN_TOP:
+ case SFX_ALIGN_HIGHESTTOP:
+ case SFX_ALIGN_LOWESTTOP:
+ case SFX_ALIGN_BOTTOM:
+ case SFX_ALIGN_LOWESTBOTTOM:
+ case SFX_ALIGN_HIGHESTBOTTOM:
+ return eCurrentAlignment;
+
+ case SFX_ALIGN_LEFT:
+ case SFX_ALIGN_RIGHT:
+ case SFX_ALIGN_FIRSTLEFT:
+ case SFX_ALIGN_LASTLEFT:
+ case SFX_ALIGN_FIRSTRIGHT:
+ case SFX_ALIGN_LASTRIGHT:
+ return eRequestedAlignment;
+
+ default:
+ return eRequestedAlignment;
+ }
+}
+
+
} } // end of namespace sfx2::sidebar