diff options
author | Christian Lippka <christian.lippka@oracle.com> | 2010-09-21 15:27:38 +0200 |
---|---|---|
committer | Christian Lippka <christian.lippka@oracle.com> | 2010-09-21 15:27:38 +0200 |
commit | d1684121929ba6881eb37ac0b45b1eead14ab427 (patch) | |
tree | 08e5a03ceabb4130c29461da376bc8c5be03997d | |
parent | 575cf859236ea36fa81eb4e343eb03e7a0c05092 (diff) |
impress201: #i112507# remove unused code
-rwxr-xr-x | sd/inc/shapelist.hxx | 2 | ||||
-rwxr-xr-x | sd/source/core/shapelist.cxx | 38 | ||||
-rwxr-xr-x | sd/source/ui/accessibility/AccessibleTreeNode.cxx | 21 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/inc/AccessibleTreeNode.hxx | 24 | ||||
-rwxr-xr-x | sd/source/ui/inc/OutlineViewShell.hxx | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/inc/SlideViewShell.hxx | 4 | ||||
-rwxr-xr-x | sd/source/ui/inc/taskpane/ControlContainer.hxx | 14 | ||||
-rwxr-xr-x | sd/source/ui/inc/taskpane/ScrollPanel.hxx | 4 | ||||
-rwxr-xr-x | sd/source/ui/inc/taskpane/SubToolPanel.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/toolpanel/ControlContainer.cxx | 55 | ||||
-rwxr-xr-x | sd/source/ui/toolpanel/ScrollPanel.cxx | 19 | ||||
-rwxr-xr-x | sd/source/ui/toolpanel/SubToolPanel.cxx | 29 | ||||
-rwxr-xr-x | sd/source/ui/toolpanel/ToolPanelViewShell.cxx | 12 | ||||
-rwxr-xr-x | sd/source/ui/view/ViewShellManager.cxx | 5 | ||||
-rwxr-xr-x | sd/source/ui/view/outlnvsh.cxx | 97 |
16 files changed, 4 insertions, 328 deletions
diff --git a/sd/inc/shapelist.hxx b/sd/inc/shapelist.hxx index 1b87a6a9e10f..4b6ffb21d496 100755 --- a/sd/inc/shapelist.hxx +++ b/sd/inc/shapelist.hxx @@ -47,8 +47,6 @@ namespace sd a pointer to the next shape in list or 0*/ SdrObject* removeShape( SdrObject& rObject ); - void replaceShape( SdrObject& rOldObject, SdrObject& rNewObject ); - /** removes all shapes from this list */ void clear(); diff --git a/sd/source/core/shapelist.cxx b/sd/source/core/shapelist.cxx index bf5b98471b53..4bb14b642f79 100755 --- a/sd/source/core/shapelist.cxx +++ b/sd/source/core/shapelist.cxx @@ -84,44 +84,6 @@ SdrObject* ShapeList::removeShape( SdrObject& rObject ) return 0; } -void ShapeList::replaceShape( SdrObject& rOldObject, SdrObject& rNewObject ) -{ - if( &rOldObject == &rNewObject ) - return; - - ListImpl::iterator aIter( std::find( maShapeList.begin(), maShapeList.end(), &rNewObject ) ); - if( aIter != maShapeList.end() ) - { - bool bIterErased = aIter == maIter; - (*aIter)->RemoveObjectUser(*this); - aIter = maShapeList.erase( aIter ); - - if( bIterErased ) - maIter = aIter; - } - - aIter = std::find( maShapeList.begin(), maShapeList.end(), &rOldObject ); - if( aIter != maShapeList.end() ) - { - bool bIterErased = aIter == maIter; - - ListImpl::iterator iNew( maShapeList.insert( aIter, &rNewObject ) ); - - (*aIter)->RemoveObjectUser(*this); - aIter = maShapeList.erase( aIter ); - - rNewObject.AddObjectUser( *this ); - - if( bIterErased ) - maIter = iNew; - } - else - { - DBG_ERROR("sd::ShapeList::replaceShape(), given shape not part of list!"); - addShape( rNewObject ); - } -} - /** removes all shapes from this list NOTE: iterators will become invalid */ void ShapeList::clear() diff --git a/sd/source/ui/accessibility/AccessibleTreeNode.cxx b/sd/source/ui/accessibility/AccessibleTreeNode.cxx index 5c7462581d0b..ced9852b74c3 100755 --- a/sd/source/ui/accessibility/AccessibleTreeNode.cxx +++ b/sd/source/ui/accessibility/AccessibleTreeNode.cxx @@ -82,27 +82,6 @@ AccessibleTreeNode::AccessibleTreeNode( -AccessibleTreeNode::AccessibleTreeNode( - const Reference<XAccessible>& rxParent, - ::sd::toolpanel::TreeNode& rNode, - const OUString& rsName, - const OUString& rsDescription, - const sal_Int16 eRole) - : AccessibleTreeNodeBase(MutexOwner::maMutex), - mxParent(rxParent), - mrTreeNode(rNode), - mrStateSet(new ::utl::AccessibleStateSetHelper()), - msName(rsName), - msDescription(rsDescription), - meRole(eRole), - mnClientId(0) -{ - CommonConstructor(); -} - - - - void AccessibleTreeNode::CommonConstructor (void) { UpdateStateSet(); diff --git a/sd/source/ui/inc/AccessibleTreeNode.hxx b/sd/source/ui/inc/AccessibleTreeNode.hxx index 2c1031921009..ce9730936659 100644..100755 --- a/sd/source/ui/inc/AccessibleTreeNode.hxx +++ b/sd/source/ui/inc/AccessibleTreeNode.hxx @@ -96,30 +96,6 @@ public: const ::rtl::OUString& rsDescription, sal_Int16 eRole); - /** Use this variant of the constructor when the accessible parent is - non-standard. - @param rxParent - The accessible parent that will be returned by - getAccessibleParent() and that is used for computing relative - coordinates. - @param rNode - The TreeNode to make accessible. - @param rsName - The accessible name that will be returned by getAccessibleName(). - @param rsDescription - The accessible description that will be returned by - getAccessibleDescription(). - @param eRole - The role that will be returned by getAccessibleRole(). - */ - AccessibleTreeNode( - const ::com::sun::star::uno::Reference< - ::com::sun::star::accessibility::XAccessible> & rxParent, - ::sd::toolpanel::TreeNode& rNode, - const ::rtl::OUString& rsName, - const ::rtl::OUString& rsDescription, - sal_Int16 eRole); - void FireAccessibleEvent ( short nEventId, const ::com::sun::star::uno::Any& rOldValue, diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx index 6c3848f39926..dce55f5d33f7 100755 --- a/sd/source/ui/inc/OutlineViewShell.hxx +++ b/sd/source/ui/inc/OutlineViewShell.hxx @@ -96,10 +96,6 @@ public: /// inherited from sd::ViewShell virtual SdPage* getCurrentPage() const; - /** Return a string that describes the currently selected pages. - */ - String GetPageRangeString (void); - void ExecCtrl(SfxRequest &rReq); void GetCtrlState(SfxItemSet &rSet); void GetMenuState(SfxItemSet &rSet); diff --git a/sd/source/ui/inc/SlideViewShell.hxx b/sd/source/ui/inc/SlideViewShell.hxx index ef8ab20fded3..7cb9d27bde18 100644..100755 --- a/sd/source/ui/inc/SlideViewShell.hxx +++ b/sd/source/ui/inc/SlideViewShell.hxx @@ -101,10 +101,6 @@ public: */ virtual SdPage* getCurrentPage() const; - /** Return a string that describes the currently selected pages. - */ - String GetPageRangeString (void); - void ExecCtrl(SfxRequest &rReq); void GetCtrlState(SfxItemSet &rSet); void GetMenuState(SfxItemSet &rSet); diff --git a/sd/source/ui/inc/taskpane/ControlContainer.hxx b/sd/source/ui/inc/taskpane/ControlContainer.hxx index 9c1652f05887..c4df3cfe4dc6 100755 --- a/sd/source/ui/inc/taskpane/ControlContainer.hxx +++ b/sd/source/ui/inc/taskpane/ControlContainer.hxx @@ -105,8 +105,6 @@ public: */ sal_uInt32 GetControlIndex (TreeNode* pControl) const; - sal_uInt32 GetActiveControlIndex (void) const; - /** Return the number of controls in the container. */ sal_uInt32 GetControlCount (void) const; @@ -164,18 +162,6 @@ public: bool bIncludeHidden=false, bool bCycle=false) const; - /** Return the index of the first control. - @param bIncludeHidden - When <FALSE/> then the first visible control is returned. - */ - sal_uInt32 GetFirstIndex (bool bIncludeHidden=false); - - /** Return the index of the last control. - @param bIncludeHidden - When <FALSE/> then the last visible control is returned. - */ - sal_uInt32 GetLastIndex (bool bIncludeHidden=false); - void SetMultiSelection (bool bFlag); /** This is method is called when the list of controls has changed, diff --git a/sd/source/ui/inc/taskpane/ScrollPanel.hxx b/sd/source/ui/inc/taskpane/ScrollPanel.hxx index f820edc69f09..f04af6f47168 100755 --- a/sd/source/ui/inc/taskpane/ScrollPanel.hxx +++ b/sd/source/ui/inc/taskpane/ScrollPanel.hxx @@ -56,10 +56,6 @@ class ScrollPanel public TreeNode { public: - /** Create a new sub tool panel with the given window as its - parent. This will usually be a child window. - */ - ScrollPanel (TreeNode* pParent); /** Create a new scroll panel which itself is the root of a TreeNode hierarchy parent. This will usually be a child window. */ diff --git a/sd/source/ui/inc/taskpane/SubToolPanel.hxx b/sd/source/ui/inc/taskpane/SubToolPanel.hxx index 669c51cfcfad..468fd079f565 100755 --- a/sd/source/ui/inc/taskpane/SubToolPanel.hxx +++ b/sd/source/ui/inc/taskpane/SubToolPanel.hxx @@ -64,7 +64,6 @@ public: /** Create a new sub tool panel with the given window as its parent. This will usually be a child window. */ - SubToolPanel (TreeNode* pParent); SubToolPanel (Window& i_rParentWindow); virtual ~SubToolPanel (void); diff --git a/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx b/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx index 5bd0cd877803..fb9d31aa04a1 100644 --- a/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx +++ b/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx @@ -95,9 +95,6 @@ public: virtual SdPage* GetActualPage (void); virtual SdPage* getCurrentPage (void) const; - void Execute (SfxRequest& rRequest); - void GetState (SfxItemSet& rItemSet); - virtual void ArrangeGUIElements (void); TaskPaneShellManager& GetSubShellManager (void) const; diff --git a/sd/source/ui/toolpanel/ControlContainer.cxx b/sd/source/ui/toolpanel/ControlContainer.cxx index cb8b6c41f5c3..78e4125b024d 100644..100755 --- a/sd/source/ui/toolpanel/ControlContainer.cxx +++ b/sd/source/ui/toolpanel/ControlContainer.cxx @@ -218,14 +218,6 @@ sal_uInt32 ControlContainer::GetControlIndex (TreeNode* pControlToExpand) const -sal_uInt32 ControlContainer::GetActiveControlIndex (void) const -{ - return mnActiveControlIndex; -} - - - - void ControlContainer::ListHasChanged (void) { } @@ -375,53 +367,6 @@ sal_uInt32 ControlContainer::GetNextIndex ( -sal_uInt32 ControlContainer::GetFirstIndex (bool bIncludeHidden) -{ - sal_uInt32 nIndex = 0; - - if (maControlList.size() == 0) - { - // The list is empty so there is no first element. - nIndex = maControlList.size(); - } - else if ( ! bIncludeHidden - && ! maControlList[nIndex]->GetWindow()->IsVisible()) - { - // The first element is not visible. Go the next visible one. - nIndex = GetNextIndex (nIndex, bIncludeHidden, false); - } - - return nIndex; -} - - - - -sal_uInt32 ControlContainer::GetLastIndex (bool bIncludeHidden) -{ - sal_uInt32 nIndex; - - if (maControlList.size() == 0) - { - // The list is empty so there is no last element. - nIndex = maControlList.size(); - } - else - { - nIndex = maControlList.size() - 1; - if ( ! bIncludeHidden - && ! maControlList[nIndex]->GetWindow()->IsVisible()) - { - // The last element is not visible. Go the previous visible one. - nIndex = GetPreviousIndex (nIndex, bIncludeHidden, false); - } - } - return nIndex; -} - - - - void ControlContainer::SetMultiSelection (bool bFlag) { mbMultiSelection = bFlag; diff --git a/sd/source/ui/toolpanel/ScrollPanel.cxx b/sd/source/ui/toolpanel/ScrollPanel.cxx index 6b10ed889424..33fd325313a3 100755 --- a/sd/source/ui/toolpanel/ScrollPanel.cxx +++ b/sd/source/ui/toolpanel/ScrollPanel.cxx @@ -41,25 +41,6 @@ namespace sd { namespace toolpanel { ScrollPanel::ScrollPanel ( - TreeNode* pParent) - : Control (pParent->GetWindow(), WB_DIALOGCONTROL), - TreeNode(pParent), - maScrollWindow(this, WB_DIALOGCONTROL), - maVerticalScrollBar(this, WB_VERT), - maHorizontalScrollBar(this, WB_HORZ), - maScrollBarFiller(this), - maScrollWindowFiller(&maScrollWindow), - mbIsRearrangePending(true), - mbIsLayoutPending(true), - mnChildrenWidth(0), - mnVerticalBorder(2), - mnVerticalGap(3), - mnHorizontalBorder(2) -{ - Construct(); -} - -ScrollPanel::ScrollPanel ( ::Window& i_rParentWindow) : Control (&i_rParentWindow, WB_DIALOGCONTROL), TreeNode(NULL), diff --git a/sd/source/ui/toolpanel/SubToolPanel.cxx b/sd/source/ui/toolpanel/SubToolPanel.cxx index 73783b0f0a41..4e85d8c9fec9 100755 --- a/sd/source/ui/toolpanel/SubToolPanel.cxx +++ b/sd/source/ui/toolpanel/SubToolPanel.cxx @@ -42,35 +42,6 @@ namespace sd { namespace toolpanel { SubToolPanel::SubToolPanel ( - TreeNode* pParent) - : Control (pParent->GetWindow(), WB_DIALOGCONTROL), - TreeNode(pParent), - maWindowFiller(this), - mbIsRearrangePending(true), - mbIsLayoutPending(true), - mnChildrenWidth(0), - mnVerticalBorder(0), - mnVerticalGap(3), - mnHorizontalBorder(2) -{ - SetAccessibleName ( - ::rtl::OUString::createFromAscii("Sub Task Panel")); - mpControlContainer->SetMultiSelection (true); - - SetBorderStyle (WINDOW_BORDER_NORMAL); - SetMapMode (MapMode(MAP_PIXEL)); - - // To reduce flickering during repaints make the container windows - // transparent and rely on their children to paint the whole area. - SetBackground(Wallpaper()); - maWindowFiller.SetBackground( - Application::GetSettings().GetStyleSettings().GetWindowColor()); -} - - - - -SubToolPanel::SubToolPanel ( Window& i_rParentWindow) : Control (&i_rParentWindow, WB_DIALOGCONTROL), TreeNode(NULL), diff --git a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx index c62faf29ca50..63988cd9af98 100755 --- a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx +++ b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx @@ -599,18 +599,6 @@ SdPage* ToolPanelViewShell::getCurrentPage() const } // --------------------------------------------------------------------------------------------------------------------- -void ToolPanelViewShell::Execute( SfxRequest& ) -{ - OSL_ENSURE( false, "ToolPanelViewShell::Execute: not to be called! (right?)" ); -} - -// --------------------------------------------------------------------------------------------------------------------- -void ToolPanelViewShell::GetState( SfxItemSet& ) -{ - OSL_ENSURE( false, "ToolPanelViewShell::GetState: not to be called! (right?)" ); -} - -// --------------------------------------------------------------------------------------------------------------------- TaskPaneShellManager& ToolPanelViewShell::GetSubShellManager() const { return *mpSubShellManager.get(); diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx index c25c0f11270a..c1ffcb884cd1 100755 --- a/sd/source/ui/view/ViewShellManager.cxx +++ b/sd/source/ui/view/ViewShellManager.cxx @@ -228,8 +228,10 @@ private: DECL_LINK(WindowEventHandler, VclWindowEvent*); +#ifdef VERBOSE void DumpShellStack (const ShellStack& rStack); void DumpSfxShellStack (void); +#endif /** To be called before a shell is taken fom the SFX shell stack. This method deactivates an active text editing to avoid problems with @@ -1319,6 +1321,7 @@ void ViewShellManager::Implementation::Shutdown (void) +#ifdef VERBOSE void ViewShellManager::Implementation::DumpShellStack (const ShellStack& rStack) { ShellStack::const_reverse_iterator iEntry; @@ -1345,7 +1348,7 @@ void ViewShellManager::Implementation::DumpSfxShellStack (void) aSfxShellStack.push_back(mrBase.GetSubShell(nIndex)); DumpShellStack(aSfxShellStack); } - +#endif diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 955a9d167b49..d83abefbea47 100755 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -1775,103 +1775,6 @@ SdPage* OutlineViewShell::GetActualPage() } -/************************************************************************* -|* -|* Retrieve range of marked pages -|* -\************************************************************************/ - -String OutlineViewShell::GetPageRangeString() -{ - ::sd::Window* pWin = GetActiveWindow(); - OutlinerView* pActiveView = pOlView->GetViewByWindow(pWin); - ::Outliner* pOutl = pActiveView->GetOutliner(); - List* pSelList = (List*)pActiveView->CreateSelectionList(); - Paragraph* pPara = (Paragraph*)pSelList->First(); - - String aStrPageRange; - BOOL bFirstPageNo = TRUE; - BOOL bOpenRange = FALSE; - USHORT nLastPage = 0; - USHORT nLastUsedPage = (USHORT)-1; - - USHORT nPageCount = 0; - for( USHORT n = 0; n< GetDoc()->GetPageCount(); n++ ) - if( ( (SdPage*)GetDoc()->GetPage( n ) )->GetPageKind() == PK_STANDARD ) - nPageCount++; - - while ( pPara ) - { - if ( !pOutl->HasParaFlag(pPara, PARAFLAG_ISPAGE) ) - { - pPara = pOlView->GetPrevTitle(pPara); - } - USHORT nPageToSelect = 0; - while(pPara) - { - pPara = pOlView->GetPrevTitle(pPara); - if (pPara) - nPageToSelect++; - } - - if( bFirstPageNo ) - { - bFirstPageNo = FALSE; - aStrPageRange = String::CreateFromInt32( sal_Int32( nPageToSelect+1 ) ); - nLastUsedPage = nPageToSelect; - nPageCount--; - } - else - { - if( nPageToSelect != nLastPage ) - { - if( nPageToSelect == nLastPage+1 ) - { - bOpenRange = TRUE; - nPageCount--; - } - else - { - if( bOpenRange ) - { - if( nLastPage == nLastUsedPage+1 ) - aStrPageRange.Append( sal_Unicode(',') ); - else - aStrPageRange.Append( sal_Unicode('-') ); - - aStrPageRange.Append( String::CreateFromInt32( sal_Int32( nLastPage+1 ) ) ); - } - aStrPageRange.Append( sal_Unicode(',') ); - aStrPageRange.Append( String::CreateFromInt32( sal_Int32( nPageToSelect+1 ) ) ); - nLastUsedPage = nPageToSelect; - bOpenRange = FALSE; - nPageCount--; - } - } - } - - nLastPage = nPageToSelect; - pPara = (Paragraph*)pSelList->Next(); - } - - if( bOpenRange ) - { - if( nLastPage == nLastUsedPage+1 ) - aStrPageRange.Append( sal_Unicode(',') ); - else - aStrPageRange.Append( sal_Unicode('-') ); - - aStrPageRange.Append( String::CreateFromInt32( sal_Int32( nLastPage+1 ) ) ); - } - - if( nPageCount == 0 ) - aStrPageRange.Erase(); - - delete pSelList; // die wurde extra fuer uns erzeugt - - return aStrPageRange; -} - void OutlineViewShell::UpdatePreview( SdPage* pPage, BOOL ) { const bool bNewPage = pPage != pLastPage; |