Commits

Anonymous committed d4f2f15

vcl122: #i117746# remove unused Dialog::ImplCenterDialog

Comments (0)

Files changed (2)

vcl/inc/vcl/dialog.hxx

 	SAL_DLLPRIVATE void    ImplInitDialogData();
 	SAL_DLLPRIVATE void    ImplInitSettings();
 
-//#if 0 // _SOLAR__PRIVATE
     // Copy assignment is forbidden and not implemented.
 	SAL_DLLPRIVATE         Dialog (const Dialog &);
 	SAL_DLLPRIVATE         Dialog & operator= (const Dialog &);
     using Window::ImplInit;
 	SAL_DLLPRIVATE void    ImplInit( Window* pParent, WinBits nStyle );
 	SAL_DLLPRIVATE void    ImplDialogRes( const ResId& rResId );
-	SAL_DLLPRIVATE void    ImplCenterDialog();
 
 public:
 	SAL_DLLPRIVATE sal_Bool    IsInClose() const { return mbInClose; }
-//#endif
 
 protected:
 					Dialog( WindowType nType );

vcl/source/window/dialog.cxx

 
 // -----------------------------------------------------------------------
 
-void Dialog::ImplCenterDialog()
-{
-    Rectangle   aDeskRect = ImplGetFrameWindow()->GetDesktopRectPixel();
-    Point       aDeskPos = aDeskRect.TopLeft();
-    Size        aDeskSize = aDeskRect.GetSize();
-    Size        aWinSize = GetSizePixel();
-    Window *pWindow = this;
-    while ( pWindow->mpWindowImpl->mpBorderWindow )
-        pWindow = pWindow->mpWindowImpl->mpBorderWindow;
-    Point       aWinPos( ((aDeskSize.Width() - aWinSize.Width()) / 2) + aDeskPos.X(),
-                         ((aDeskSize.Height() - aWinSize.Height()) / 2) + aDeskPos.Y() );
-
-    // Pruefen, ob Dialogbox ausserhalb des Desks liegt
-    if ( (aWinPos.X() + aWinSize.Width()) > (aDeskPos.X()+aDeskSize.Width()) )
-        aWinPos.X() = aDeskPos.X()+aDeskSize.Width() - aWinSize.Width();
-    if ( (aWinPos.Y()+aWinSize.Height()) > (aDeskPos.Y()+aDeskSize.Height()) )
-        aWinPos.Y() = aDeskPos.Y()+aDeskSize.Height() - aWinSize.Height();
-    // Linke Ecke bevorzugen, da Titelbar oben ist
-    if ( aWinPos.X() < aDeskPos.X() )
-        aWinPos.X() = aDeskPos.X();
-    if ( aWinPos.Y() < aDeskPos.Y() )
-        aWinPos.Y() = aDeskPos.Y();
-
-    //SetPosPixel( aWinPos );
-    SetPosPixel( pWindow->ScreenToOutputPixel( aWinPos ) );
-}
-
-// -----------------------------------------------------------------------
-
 Dialog::Dialog( WindowType nType ) :
     SystemWindow( nType )
 {
         if ( GetSettings().GetStyleSettings().GetAutoMnemonic() )
             ImplWindowAutoMnemonic( this );
 
-        //if ( IsDefaultPos() && !mpWindowImpl->mbFrame )
-        //    ImplCenterDialog();
         if ( !HasChildPathFocus() || HasFocus() )
             GrabFocusToFirstControl();
         if ( !(GetStyle() & WB_CLOSEABLE) )