diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-02-09 11:29:37 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-02-09 11:29:37 +0100 |
commit | c12ab867f282e783507fcf74ab5c90e784681f65 (patch) | |
tree | 6435dd10b5d05d86b9ea4549bceb2696d028b641 | |
parent | d84e78aa31252f6e514ad8a8ef38c4a4ec93cb37 (diff) |
Remove unused methods
GetOptimalSizePixel and GetHCtrlWidth are never called
Change-Id: Ib2ce1445447e85de66683f8b0fdf4fc8aa464084
-rw-r--r-- | basctl/source/basicide/basidesh.cxx | 6 | ||||
-rw-r--r-- | basctl/source/inc/basidesh.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/prevwsh.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/tabvwsh.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/prevwsh.cxx | 36 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsh4.cxx | 28 | ||||
-rw-r--r-- | sd/source/ui/inc/DrawViewShell.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/OutlineViewShell.hxx | 3 | ||||
-rw-r--r-- | sd/source/ui/inc/ViewShell.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviews1.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/view/drviews5.cxx | 36 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvsh.cxx | 32 | ||||
-rw-r--r-- | sd/source/ui/view/viewshe2.cxx | 5 | ||||
-rw-r--r-- | sfx2/inc/sfx2/viewsh.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 8 | ||||
-rw-r--r-- | starmath/inc/view.hxx | 1 | ||||
-rw-r--r-- | starmath/source/view.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/inc/pview.hxx | 1 | ||||
-rw-r--r-- | sw/source/ui/inc/view.hxx | 1 | ||||
-rw-r--r-- | sw/source/ui/uiview/pview.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewport.cxx | 21 |
21 files changed, 0 insertions, 217 deletions
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 812ca411decb..42f005d47bcb 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -435,12 +435,6 @@ void Shell::InitTabBar() } -Size Shell::GetOptimalSizePixel() const -{ - return Size( 400, 300 ); -} - - void Shell::OuterResizePixel( const Point &rPos, const Size &rSize ) { diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx index e093680e92d4..b16f535f873a 100644 --- a/basctl/source/inc/basidesh.hxx +++ b/basctl/source/inc/basidesh.hxx @@ -118,7 +118,6 @@ private: private: virtual void AdjustPosSizePixel( const Point &rPos, const Size &rSize ); virtual void OuterResizePixel( const Point &rPos, const Size &rSize ); - virtual Size GetOptimalSizePixel() const; sal_uInt16 InsertWindowInTable (BaseWindow* pNewWin); virtual sal_uInt16 PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing ); diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx index 753047843fc4..8a4910093a0e 100644 --- a/sc/source/ui/inc/prevwsh.hxx +++ b/sc/source/ui/inc/prevwsh.hxx @@ -71,8 +71,6 @@ protected: virtual void InnerResizePixel( const Point &rOfs, const Size &rSize ); virtual void OuterResizePixel( const Point &rOfs, const Size &rSize ); - virtual Size GetOptimalSizePixel() const; - virtual String GetDescription() const; virtual void WriteUserData(String &, sal_Bool bBrowse = false); diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index d1e53adb39e4..9ca9868a4542 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -213,8 +213,6 @@ protected: virtual void QueryObjAreaPixel( Rectangle& rRect ) const; - virtual Size GetOptimalSizePixel() const; - virtual String GetSelectionText( sal_Bool bWholeWord ); virtual sal_Bool HasSelection( sal_Bool bText ) const; virtual String GetDescription() const; diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 37e0e8678d95..2cc99a59eab2 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -211,42 +211,6 @@ String ScPreviewShell::GetDescription() const return rtl::OUString(" ** Test ** "); } -Size ScPreviewShell::GetOptimalSizePixel() const -{ - Size aOptSize(100,100); - - ScTabViewShell* pViewSh = pDocShell->GetBestViewShell(); - - if ( pViewSh ) - { - ScViewData* pViewData = pViewSh->GetViewData(); - SCTAB nCurTab = pViewData->GetTabNo(); - ScDocument* pDoc = pDocShell->GetDocument(); - ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); - SfxStyleSheetBase* pStyleSheet = pStylePool->Find( - pDoc->GetPageStyle( nCurTab ), - SFX_STYLE_FAMILY_PAGE ); - - OSL_ENSURE( pStyleSheet, "PageStyle not found :-/" ); - - if ( pStyleSheet ) - { - const SfxItemSet& rSet = pStyleSheet->GetItemSet(); - const SvxSizeItem& rItem = (const SvxSizeItem&)rSet.Get( ATTR_PAGE_SIZE ); - const Size& rPageSize = rItem.GetSize(); - - aOptSize.Width() = (long) (rPageSize.Width() * pViewData->GetPPTX()); - aOptSize.Height() = (long) (rPageSize.Height() * pViewData->GetPPTY()); - } - } - else - { - OSL_FAIL( "TabViewShell not found :-/" ); - } - - return aOptSize; -} - void ScPreviewShell::AdjustPosSizePixel( const Point &rPos, const Size &rSize ) { Size aOutSize( rSize ); diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 4f9681d0f373..04af91d985d6 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -305,34 +305,6 @@ sal_uInt16 ScTabViewShell::PrepareClose(sal_Bool bUI, sal_Bool bForBrowsing) //------------------------------------------------------------------ -Size ScTabViewShell::GetOptimalSizePixel() const -{ - Size aOptSize; - - SCTAB nCurTab = GetViewData()->GetTabNo(); - ScDocument* pDoc = GetViewData()->GetDocument(); - ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); - SfxStyleSheetBase* pStyleSheet = pStylePool->Find( - pDoc->GetPageStyle( nCurTab ), - SFX_STYLE_FAMILY_PAGE ); - - OSL_ENSURE( pStyleSheet, "PageStyle not found :-/" ); - - if ( pStyleSheet ) - { - const SfxItemSet& rSet = pStyleSheet->GetItemSet(); - const SvxSizeItem& rItem = (const SvxSizeItem&)rSet.Get( ATTR_PAGE_SIZE ); - const Size& rPageSize = rItem.GetSize(); - - aOptSize.Width() = (long) (rPageSize.Width() * GetViewData()->GetPPTX()); - aOptSize.Height() = (long) (rPageSize.Height() * GetViewData()->GetPPTY()); - } - - return aOptSize; -} - -//------------------------------------------------------------------ - // Zoom fuer In-Place berechnen // aus Verhaeltnis von VisArea und Fenstergroesse des GridWin diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index 1705abc97d5b..64de25ea84e3 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -389,9 +389,7 @@ protected: virtual SvxRuler* CreateVRuler(::sd::Window* pWin); virtual void UpdateHRuler(); virtual void UpdateVRuler(); - virtual long GetHCtrlWidth(); virtual void SetZoomFactor(const Fraction& rZoomX, const Fraction& rZoomY); - virtual Size GetOptimalSizePixel() const; void SetupPage( Size &rSize, long nLeft, long nRight, long nUpper, long nLower, sal_Bool bSize, sal_Bool bMargin, sal_Bool bScaleAll ); diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx index eb8dc5da26fa..616ed4269305 100644 --- a/sd/source/ui/inc/OutlineViewShell.hxx +++ b/sd/source/ui/inc/OutlineViewShell.hxx @@ -150,9 +150,6 @@ public: bool UpdateTitleObject( SdPage* pPage, Paragraph* pPara ); bool UpdateOutlineObject( SdPage* pPage, Paragraph* pPara ); -protected: - virtual Size GetOptimalSizePixel() const; - private: OutlineView* pOlView; SdPage* pLastPage; // Zur performanten Aufbereitung der Preview diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx index f1411652c8b7..7d7c58e9b396 100644 --- a/sd/source/ui/inc/ViewShell.hxx +++ b/sd/source/ui/inc/ViewShell.hxx @@ -537,10 +537,6 @@ protected: virtual void UpdateHRuler(); virtual void UpdateVRuler(); - // Zeiger auf ein zusaetzliches Control im horizontalen ScrollBar - // abgeleiteter Klassen (z.B. ein TabBar) zurueckgeben - virtual long GetHCtrlWidth(); - virtual void Activate(sal_Bool IsMDIActivate); virtual void Deactivate(sal_Bool IsMDIActivate); diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 92370bfd2030..2a2bfbafddeb 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -476,18 +476,6 @@ bool DrawViewShell::IsLayerModeActive (void) const } - -/** - * Return size of TabControls and ModeButtons - */ - -long DrawViewShell::GetHCtrlWidth() -{ - // return maTabControl.GetSizePixel().Width(); - return 0; -} - - /** * Generate horizontal ruler */ diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx index 2df7ffc396bc..152dc114fd10 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -478,42 +478,6 @@ void DrawViewShell::SetZoomFactor(const Fraction& rZoomX, const Fraction& rZoomY /************************************************************************* |* -|* Optimale Groesse zurueckgeben -|* -\************************************************************************/ - -Size DrawViewShell::GetOptimalSizePixel() const -{ - Size aSize; - - SdrPageView* pPV = mpDrawView->GetSdrPageView(); - if (pPV) - { - SdPage* pPage = (SdPage*) pPV->GetPage(); - - if (pPage) - { - if (!mbZoomOnPage) - { - // Gegenwaertigen MapMode beruecksichtigen - aSize = GetActiveWindow()->LogicToPixel( pPage->GetSize() ); - } - else - { - // 1:1 Darstellung - MapMode aMapMode(MAP_100TH_MM); - aSize = GetActiveWindow()->LogicToPixel( pPage->GetSize(), aMapMode ); - const_cast< DrawViewShell* >(this)->mbZoomOnPage = sal_True; - } - } - } - - return(aSize); -} - - -/************************************************************************* -|* |* Seite wird gehided |* \************************************************************************/ diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 6469ef017270..2703bf14e184 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -1536,38 +1536,6 @@ sal_Bool OutlineViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin) /************************************************************************* |* -|* Return optimal Size -|* -\************************************************************************/ - -Size OutlineViewShell::GetOptimalSizePixel() const -{ - Size aResult(200, 200); - if (pOlView) - { - ::Outliner* pOutliner = pOlView->GetOutliner(); - if (pOutliner) - { - Size aTemp = pOutliner->CalcTextSize(); - aTemp = GetActiveWindow()->LogicToPixel(aTemp); - aResult.Width() = Max(aResult.Width(), aTemp.Width()); - aResult.Height() = Max(aResult.Height(), aTemp.Height()); - if (4 * aResult.Height() > 3 * aResult.Width()) - { - aResult.Height() = 3 * aResult.Width() / 4; - } - } - } - - // now add the default stuff - aResult.Width() += mpVerticalScrollBar->GetSizePixel().Width(); - aResult.Height() += mpHorizontalScrollBar->GetSizePixel().Height(); - return aResult; -} - - -/************************************************************************* -|* |* Return text of the selection |* \************************************************************************/ diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index e4b65e04a906..c666875643ec 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -284,11 +284,6 @@ void ViewShell::UpdateVRuler() { } -long ViewShell::GetHCtrlWidth() -{ - return 0; -} - /************************************************************************* |* |* Eine bestimmte Anzahl von Zeilen scrollen (wird beim automatischen diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx index b7110a67c700..fc789407fcab 100644 --- a/sfx2/inc/sfx2/viewsh.hxx +++ b/sfx2/inc/sfx2/viewsh.hxx @@ -144,8 +144,6 @@ protected: virtual void Activate(sal_Bool IsMDIActivate); virtual void Deactivate(sal_Bool IsMDIActivate); - virtual Size GetOptimalSizePixel() const; - virtual void InnerResizePixel( const Point &rOfs, const Size &rSize ); virtual void OuterResizePixel( const Point &rOfs, const Size &rSize ); virtual void SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY ); diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 941ec1537a91..4a4cfcec82ab 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1251,14 +1251,6 @@ void SfxViewShell::SetWindow //-------------------------------------------------------------------- -Size SfxViewShell::GetOptimalSizePixel() const -{ - OSL_FAIL( "Useless call!" ); - return Size(); -} - -//------------------------------------------------------------------------ - SfxViewShell::SfxViewShell ( SfxViewFrame* pViewFrame, /* <SfxViewFrame>, which will be diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx index cdfb6143569b..d0d4f63a7112 100644 --- a/starmath/inc/view.hxx +++ b/starmath/inc/view.hxx @@ -271,7 +271,6 @@ protected: const SfxItemSet &rOptions); virtual void Deactivate(sal_Bool IsMDIActivate); virtual void Activate(sal_Bool IsMDIActivate); - virtual Size GetOptimalSizePixel() const; virtual void AdjustPosSizePixel(const Point &rPos, const Size &rSize); virtual void InnerResizePixel(const Point &rOfs, const Size &rSize); virtual void OuterResizePixel(const Point &rOfs, const Size &rSize); diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 306d92a26716..964e284f3df6 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -935,14 +935,6 @@ SFX_IMPL_NAMED_VIEWFACTORY(SmViewShell, "Default") } -Size SmViewShell::GetOptimalSizePixel() const -{ - RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::GetOptimalSizePixel" ); - - return aGraphic.LogicToPixel( ((SmViewShell*)this)->GetDoc()->GetSize() ); -} - - void SmViewShell::AdjustPosSizePixel(const Point &rPos, const Size &rSize) { RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::AdjustPosSizePixel" ); diff --git a/sw/source/ui/inc/pview.hxx b/sw/source/ui/inc/pview.hxx index d055aa57f2ce..fbb8a725395f 100644 --- a/sw/source/ui/inc/pview.hxx +++ b/sw/source/ui/inc/pview.hxx @@ -212,7 +212,6 @@ class SW_DLLPUBLIC SwPagePreView: public SfxViewShell protected: virtual void InnerResizePixel( const Point &rOfs, const Size &rSize ); virtual void OuterResizePixel( const Point &rOfs, const Size &rSize ); - virtual Size GetOptimalSizePixel() const; void SetZoom(SvxZoomType eSet, sal_uInt16 nFactor); diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 68383d4d2ef1..2cfcf389fdae 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -379,7 +379,6 @@ protected: virtual void Deactivate(sal_Bool); virtual void InnerResizePixel( const Point &rOfs, const Size &rSize ); virtual void OuterResizePixel( const Point &rOfs, const Size &rSize ); - virtual Size GetOptimalSizePixel() const; void SetImageButtonColor(Color& rColor); diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 6d0bb7095eb5..c2256f89dfe5 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -1770,12 +1770,6 @@ SfxTabPage* SwPagePreView::CreatePrintOptionsPage( Window *pParent, return ::CreatePrintOptionsPage( pParent, rOptions, !bNormalPrint ); } -Size SwPagePreView::GetOptimalSizePixel() const -{ - OSL_FAIL( "overloaded virtual method <SwPagePreView::GetOptimalSizePixel()> needed ??" ); - return Size( -1, -1 ); -} - void SwPagePreViewWin::SetViewShell( ViewShell* pShell ) { mpViewShell = pShell; diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx index 729a42bed3d2..6d442926adc2 100644 --- a/sw/source/ui/uiview/viewport.cxx +++ b/sw/source/ui/uiview/viewport.cxx @@ -1197,27 +1197,6 @@ void SwView::SetZoomFactor( const Fraction &rX, const Fraction &rY ) SfxViewShell::SetZoomFactor( rX, rY ); } -Size SwView::GetOptimalSizePixel() const -{ - Size aPgSize; - if ( pWrtShell->GetViewOptions()->getBrowseMode() ) - aPgSize = SvxPaperInfo::GetPaperSize(PAPER_A4); - else - { - aPgSize = GetWrtShell().GetAnyCurRect(RECT_PAGE).SSize(); - aPgSize.Width() += DOCUMENTBORDER * 2; - - const SwPageDesc &rDesc = pWrtShell->GetPageDesc( pWrtShell->GetCurPageDesc() ); - if( nsUseOnPage::PD_MIRROR == rDesc.GetUseOn() ) - { - const SvxLRSpaceItem &rLRSpace = rDesc.GetMaster().GetLRSpace(); - const SvxLRSpaceItem &rLeftLRSpace = rDesc.GetLeft().GetLRSpace(); - aPgSize.Width() += Abs( long(rLeftLRSpace.GetLeft()) - long(rLRSpace.GetLeft()) ); - } - } - return GetEditWin().LogicToPixel( aPgSize ); -} - sal_Bool SwView::UpdateScrollbars() { sal_Bool bRet = sal_False; |