diff options
Diffstat (limited to 'dbaccess/source/ui/app/AppDetailPageHelper.cxx')
-rw-r--r-- | dbaccess/source/ui/app/AppDetailPageHelper.cxx | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 50e357b687b8..fbc5b8d0c359 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -93,9 +93,6 @@ #ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/helper/vclunohelper.hxx> #endif -#ifndef _COM_SUN_STAR_UCB_XCONTENTCREATOR_HPP_ -#include <com/sun/star/ucb/XContentCreator.hpp> -#endif #ifndef _COM_SUN_STAR_UCB_XCOMMANDENVIRONMENT_HPP_ #include <com/sun/star/ucb/XCommandEnvironment.hpp> #endif @@ -256,7 +253,7 @@ namespace EnableInput(FALSE); return 0L; } - // ----------------------------------------------------------------------------- + // ----------------------------------------------------------------------------- void OTablePreviewWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); @@ -268,7 +265,7 @@ namespace Invalidate(); } } - // ----------------------------------------------------------------------------- + // ----------------------------------------------------------------------------- void OTablePreviewWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -634,13 +631,13 @@ sal_Bool OAppDetailPageHelper::isCutAllowed() // ----------------------------------------------------------------------------- sal_Bool OAppDetailPageHelper::isCopyAllowed() { - // int nPos = getVisibleControlIndex(); + //int nPos = getVisibleControlIndex(); return sal_True; } // ----------------------------------------------------------------------------- sal_Bool OAppDetailPageHelper::isPasteAllowed() { - // int nPos = getVisibleControlIndex(); + //int nPos = getVisibleControlIndex(); return sal_True; } // ----------------------------------------------------------------------------- @@ -658,6 +655,8 @@ void OAppDetailPageHelper::paste() // ----------------------------------------------------------------------------- bool OAppDetailPageHelper::isLeaf(SvLBoxEntry* _pEntry) const { + if ( !_pEntry ) + return false; sal_Int32 nEntryType = reinterpret_cast< sal_IntPtr >( _pEntry->GetUserData() ); if ( ( nEntryType == DatabaseObjectContainer::TABLES ) || ( nEntryType == DatabaseObjectContainer::CATALOG ) @@ -1099,8 +1098,8 @@ void OAppDetailPageHelper::Resize() ////////////////////////////////////////////////////////////////////// // Abmessungen parent window Size aOutputSize( GetOutputSize() ); - long nOutputWidth = aOutputSize.Width(); - long nOutputHeight = aOutputSize.Height(); + long nOutputWidth = aOutputSize.Width(); + long nOutputHeight = aOutputSize.Height(); Window* pWindow = getCurrentView(); if ( pWindow ) @@ -1115,12 +1114,12 @@ void OAppDetailPageHelper::Resize() String sText = m_aTBPreview.GetItemText(SID_DB_APP_DISABLE_PREVIEW); Size aTBSize = m_aTBPreview.CalcWindowSizePixel(); - m_aTBPreview.SetPosSizePixel( Point(nOutputWidth - aTBSize.getWidth(), 0 ), - aTBSize ); + m_aTBPreview.SetPosSizePixel(Point(nOutputWidth - aTBSize.getWidth(), 0 ), + aTBSize ); - m_aBorder.SetPosSizePixel( Point(nHalfOutputWidth + aFLSize.Width() + n6PPT, aTBSize.getHeight() + n6PPT ), - Size(nHalfOutputWidth - aFLSize.Width() - n6PPT, nOutputHeight - 2*n6PPT - aTBSize.getHeight()) ); - m_aPreview.SetPosSizePixel( Point(0,0),m_aBorder.GetSizePixel() ); + m_aBorder.SetPosSizePixel(Point(nHalfOutputWidth + aFLSize.Width() + n6PPT, aTBSize.getHeight() + n6PPT ), + Size(nHalfOutputWidth - aFLSize.Width() - n6PPT, nOutputHeight - 2*n6PPT - aTBSize.getHeight()) ); + m_aPreview.SetPosSizePixel(Point(0,0),m_aBorder.GetSizePixel() ); m_aDocumentInfo.SetPosSizePixel(Point(0,0),m_aBorder.GetSizePixel() ); m_pTablePreview->SetPosSizePixel(Point(0,0),m_aBorder.GetSizePixel() ); } @@ -1237,9 +1236,9 @@ void OAppDetailPageHelper::showPreview(const Reference< XContent >& _xContent) // Why the below code? It might have side effects, as the tree view needs to know // its current selection for other purposes than the preview, too. -// DBTreeListBox* pTreeView = getCurrentView(); -// if ( pTreeView ) -// pTreeView->clearCurrentSelection(); +// DBTreeListBox* pTreeView = getCurrentView(); +// if ( pTreeView ) +// pTreeView->clearCurrentSelection(); } } catch( const Exception& ) @@ -1386,7 +1385,7 @@ void OAppDetailPageHelper::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || + if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || (rDCEvt.GetType() == DATACHANGED_DISPLAY) || (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && @@ -1445,9 +1444,9 @@ OPreviewWindow::OPreviewWindow(Window* _pParent) // ----------------------------------------------------------------------------- BOOL OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const { - const Size aWinSize( GetOutputSizePixel() ); - Size aNewSize( LogicToPixel( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode() ) ); - BOOL bRet = FALSE; + const Size aWinSize( GetOutputSizePixel() ); + Size aNewSize( LogicToPixel( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode() ) ); + BOOL bRet = FALSE; if( aNewSize.Width() && aNewSize.Height() ) { @@ -1505,7 +1504,7 @@ void OPreviewWindow::DataChanged( const DataChangedEvent& rDCEvt ) Invalidate(); } } -// ----------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- void OPreviewWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); |