SidebarController.cxx (ae13266d) SidebarController.cxx (6fa16b61)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 1008 unchanged lines hidden (view full) ---

1017bool SidebarController::CanModifyChildWindowWidth (void)
1018{
1019 SfxSplitWindow* pSplitWindow = GetSplitWindow();
1020 if (pSplitWindow == NULL)
1021 return false;
1022
1023 sal_uInt16 nRow (0xffff);
1024 sal_uInt16 nColumn (0xffff);
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 1008 unchanged lines hidden (view full) ---

1017bool SidebarController::CanModifyChildWindowWidth (void)
1018{
1019 SfxSplitWindow* pSplitWindow = GetSplitWindow();
1020 if (pSplitWindow == NULL)
1021 return false;
1022
1023 sal_uInt16 nRow (0xffff);
1024 sal_uInt16 nColumn (0xffff);
1025 pSplitWindow->GetWindowPos(mpParentWindow, nColumn, nRow);
1026
1027 sal_uInt16 nRowCount (pSplitWindow->GetWindowCount(nColumn));
1028
1029 return nRowCount==1;
1025 if (pSplitWindow->GetWindowPos(mpParentWindow, nColumn, nRow))
1026 {
1027 sal_uInt16 nRowCount (pSplitWindow->GetWindowCount(nColumn));
1028 return nRowCount==1;
1029 }
1030 else
1031 return false;
1030}
1031
1032
1033
1034
1035sal_Int32 SidebarController::SetChildWindowWidth (const sal_Int32 nNewWidth)
1036{
1037 SfxSplitWindow* pSplitWindow = GetSplitWindow();

--- 35 unchanged lines hidden (view full) ---

1073 }
1074}
1075
1076
1077
1078
1079SfxSplitWindow* SidebarController::GetSplitWindow (void)
1080{
1032}
1033
1034
1035
1036
1037sal_Int32 SidebarController::SetChildWindowWidth (const sal_Int32 nNewWidth)
1038{
1039 SfxSplitWindow* pSplitWindow = GetSplitWindow();

--- 35 unchanged lines hidden (view full) ---

1075 }
1076}
1077
1078
1079
1080
1081SfxSplitWindow* SidebarController::GetSplitWindow (void)
1082{
1081 if (mpSplitWindow == NULL)
1083 if (mpParentWindow != NULL)
1082 {
1084 {
1083 if (mpParentWindow != NULL)
1085 SfxSplitWindow* pSplitWindow = dynamic_cast<SfxSplitWindow*>(mpParentWindow->GetParent());
1086 if (pSplitWindow != mpSplitWindow)
1084 {
1087 {
1085 mpSplitWindow = dynamic_cast<SfxSplitWindow*>(mpParentWindow->GetParent());
1086 if (mpSplitWindow != NULL)
1088 if (mpSplitWindow != NULL)
1089 mpSplitWindow->RemoveEventListener(LINK(this, SidebarController, WindowEventHandler));
1090
1091 mpSplitWindow = pSplitWindow;
1092
1093 if (mpSplitWindow != NULL)
1087 mpSplitWindow->AddEventListener(LINK(this, SidebarController, WindowEventHandler));
1088 }
1094 mpSplitWindow->AddEventListener(LINK(this, SidebarController, WindowEventHandler));
1095 }
1096 return mpSplitWindow;
1089 }
1097 }
1090
1091 return mpSplitWindow;
1098 else
1099 return NULL;
1092}
1093
1094
1095
1096
1097void SidebarController::UpdateCloseIndicator (const bool bCloseAfterDrag)
1098{
1099 if (mpParentWindow == NULL)

--- 95 unchanged lines hidden ---
1100}
1101
1102
1103
1104
1105void SidebarController::UpdateCloseIndicator (const bool bCloseAfterDrag)
1106{
1107 if (mpParentWindow == NULL)

--- 95 unchanged lines hidden ---