Modified: openoffice/trunk/main/sw/source/ui/uno/unofreg.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/uno/unofreg.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/ui/uno/unofreg.cxx (original) +++ openoffice/trunk/main/sw/source/ui/uno/unofreg.cxx Wed Apr 10 09:20:16 2013 @@ -124,7 +124,6 @@ extern uno::Sequence< OUString > SAL_CAL extern OUString SAL_CALL SwXMailMerge_getImplementationName() throw(); extern uno::Reference< uno::XInterface > SAL_CALL SwXMailMerge_createInstance(const uno::Reference< XMultiServiceFactory > & rSMgr) throw( uno::Exception ); -// --> OD 2007-05-24 #i73788# #include "cppuhelper/implementationentry.hxx" namespace comp_FinalThreadManager { @@ -135,7 +134,8 @@ com::sun::star::uno::Reference< com::sun com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const & context ); } -// <-- + +#include "SwPanelFactory.hxx" // #ifdef __cplusplus @@ -144,10 +144,10 @@ extern "C" #endif SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, + const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) { - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; + *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } static ::cppu::ImplementationEntry const entries[] = { @@ -159,155 +159,155 @@ static ::cppu::ImplementationEntry const }; SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( - const sal_Char * pImplName, - void * pServiceManager, + const sal_Char * pImplName, + void * pServiceManager, void * pRegistryKey ) { - void * pRet = 0; - if( pServiceManager ) - { - uno::Reference< XMultiServiceFactory > xMSF( - reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) ); - - uno::Reference< XSingleServiceFactory > xFactory; - - const sal_Int32 nImplNameLen = strlen( pImplName ); - if( SwXMLImport_getImplementationName().equalsAsciiL( pImplName, - nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, - SwXMLImport_getImplementationName(), - SwXMLImport_createInstance, - SwXMLImport_getSupportedServiceNames() ); - } - else if( SwXMLImportStyles_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, - SwXMLImportStyles_getImplementationName(), - SwXMLImportStyles_createInstance, - SwXMLImportStyles_getSupportedServiceNames() ); - } - else if( SwXMLImportContent_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, - SwXMLImportContent_getImplementationName(), - SwXMLImportContent_createInstance, - SwXMLImportContent_getSupportedServiceNames() ); - } - else if( SwXMLImportMeta_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, - SwXMLImportMeta_getImplementationName(), - SwXMLImportMeta_createInstance, - SwXMLImportMeta_getSupportedServiceNames() ); - } - else if( SwXMLImportSettings_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, - SwXMLImportSettings_getImplementationName(), - SwXMLImportSettings_createInstance, - SwXMLImportSettings_getSupportedServiceNames() ); - } - else if( SwXMLExportOOO_getImplementationName().equalsAsciiL( pImplName, - nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, - SwXMLExportOOO_getImplementationName(), - SwXMLExportOOO_createInstance, - SwXMLExportOOO_getSupportedServiceNames() ); - } - else if( SwXMLExportStylesOOO_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, - SwXMLExportStylesOOO_getImplementationName(), - SwXMLExportStylesOOO_createInstance, - SwXMLExportStylesOOO_getSupportedServiceNames() ); - } - else if( SwXMLExportContentOOO_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, - SwXMLExportContentOOO_getImplementationName(), - SwXMLExportContentOOO_createInstance, - SwXMLExportContentOOO_getSupportedServiceNames() ); - } - else if( SwXMLExportMetaOOO_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, - SwXMLExportMetaOOO_getImplementationName(), - SwXMLExportMetaOOO_createInstance, - SwXMLExportMetaOOO_getSupportedServiceNames() ); - } - else if( SwXMLExportSettingsOOO_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, - SwXMLExportSettingsOOO_getImplementationName(), - SwXMLExportSettingsOOO_createInstance, - SwXMLExportSettingsOOO_getSupportedServiceNames() ); - } - else if( SwXMLExport_getImplementationName().equalsAsciiL( pImplName, - nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, - SwXMLExport_getImplementationName(), - SwXMLExport_createInstance, - SwXMLExport_getSupportedServiceNames() ); - } - else if( SwXMLExportStyles_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, - SwXMLExportStyles_getImplementationName(), - SwXMLExportStyles_createInstance, - SwXMLExportStyles_getSupportedServiceNames() ); - } - else if( SwXMLExportContent_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, - SwXMLExportContent_getImplementationName(), - SwXMLExportContent_createInstance, - SwXMLExportContent_getSupportedServiceNames() ); - } - else if( SwXMLExportMeta_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, - SwXMLExportMeta_getImplementationName(), - SwXMLExportMeta_createInstance, - SwXMLExportMeta_getSupportedServiceNames() ); - } - else if( SwXMLExportSettings_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, - SwXMLExportSettings_getImplementationName(), - SwXMLExportSettings_createInstance, - SwXMLExportSettings_getSupportedServiceNames() ); - } + void * pRet = 0; + if( pServiceManager ) + { + uno::Reference< XMultiServiceFactory > xMSF( + reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) ); + + uno::Reference< XSingleServiceFactory > xFactory; + + const sal_Int32 nImplNameLen = strlen( pImplName ); + if( SwXMLImport_getImplementationName().equalsAsciiL( pImplName, + nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, + SwXMLImport_getImplementationName(), + SwXMLImport_createInstance, + SwXMLImport_getSupportedServiceNames() ); + } + else if( SwXMLImportStyles_getImplementationName().equalsAsciiL( + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, + SwXMLImportStyles_getImplementationName(), + SwXMLImportStyles_createInstance, + SwXMLImportStyles_getSupportedServiceNames() ); + } + else if( SwXMLImportContent_getImplementationName().equalsAsciiL( + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, + SwXMLImportContent_getImplementationName(), + SwXMLImportContent_createInstance, + SwXMLImportContent_getSupportedServiceNames() ); + } + else if( SwXMLImportMeta_getImplementationName().equalsAsciiL( + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, + SwXMLImportMeta_getImplementationName(), + SwXMLImportMeta_createInstance, + SwXMLImportMeta_getSupportedServiceNames() ); + } + else if( SwXMLImportSettings_getImplementationName().equalsAsciiL( + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, + SwXMLImportSettings_getImplementationName(), + SwXMLImportSettings_createInstance, + SwXMLImportSettings_getSupportedServiceNames() ); + } + else if( SwXMLExportOOO_getImplementationName().equalsAsciiL( pImplName, + nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, + SwXMLExportOOO_getImplementationName(), + SwXMLExportOOO_createInstance, + SwXMLExportOOO_getSupportedServiceNames() ); + } + else if( SwXMLExportStylesOOO_getImplementationName().equalsAsciiL( + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, + SwXMLExportStylesOOO_getImplementationName(), + SwXMLExportStylesOOO_createInstance, + SwXMLExportStylesOOO_getSupportedServiceNames() ); + } + else if( SwXMLExportContentOOO_getImplementationName().equalsAsciiL( + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, + SwXMLExportContentOOO_getImplementationName(), + SwXMLExportContentOOO_createInstance, + SwXMLExportContentOOO_getSupportedServiceNames() ); + } + else if( SwXMLExportMetaOOO_getImplementationName().equalsAsciiL( + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, + SwXMLExportMetaOOO_getImplementationName(), + SwXMLExportMetaOOO_createInstance, + SwXMLExportMetaOOO_getSupportedServiceNames() ); + } + else if( SwXMLExportSettingsOOO_getImplementationName().equalsAsciiL( + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, + SwXMLExportSettingsOOO_getImplementationName(), + SwXMLExportSettingsOOO_createInstance, + SwXMLExportSettingsOOO_getSupportedServiceNames() ); + } + else if( SwXMLExport_getImplementationName().equalsAsciiL( pImplName, + nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, + SwXMLExport_getImplementationName(), + SwXMLExport_createInstance, + SwXMLExport_getSupportedServiceNames() ); + } + else if( SwXMLExportStyles_getImplementationName().equalsAsciiL( + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, + SwXMLExportStyles_getImplementationName(), + SwXMLExportStyles_createInstance, + SwXMLExportStyles_getSupportedServiceNames() ); + } + else if( SwXMLExportContent_getImplementationName().equalsAsciiL( + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, + SwXMLExportContent_getImplementationName(), + SwXMLExportContent_createInstance, + SwXMLExportContent_getSupportedServiceNames() ); + } + else if( SwXMLExportMeta_getImplementationName().equalsAsciiL( + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, + SwXMLExportMeta_getImplementationName(), + SwXMLExportMeta_createInstance, + SwXMLExportMeta_getSupportedServiceNames() ); + } + else if( SwXMLExportSettings_getImplementationName().equalsAsciiL( + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, + SwXMLExportSettings_getImplementationName(), + SwXMLExportSettings_createInstance, + SwXMLExportSettings_getSupportedServiceNames() ); + } else if( SwXAutoTextContainer_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, SwXAutoTextContainer_getImplementationName(), SwXAutoTextContainer_createInstance, SwXAutoTextContainer_getSupportedServiceNames() ); - } + } else if( SwXModule_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, SwXModule_getImplementationName(), SwXModule_createInstance, SwXModule_getSupportedServiceNames() ); - } + } else if( SwXMailMerge_getImplementationName().equalsAsciiL( pImplName, nImplNameLen ) ) { @@ -317,61 +317,66 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL com SwXMailMerge_getSupportedServiceNames() ); } else if( SwXFilterOptions::getImplementationName_Static().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, SwXFilterOptions::getImplementationName_Static(), SwXFilterOptions_createInstance, SwXFilterOptions::getSupportedServiceNames_Static() ); - } + } else if( SwTextDocument_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::sfx2::createSfxModelFactory( xMSF, + pImplName, nImplNameLen ) ) + { + xFactory = ::sfx2::createSfxModelFactory( xMSF, SwTextDocument_getImplementationName(), SwTextDocument_createInstance, SwTextDocument_getSupportedServiceNames() ); - } + } else if( SwWebDocument_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, SwWebDocument_getImplementationName(), SwWebDocument_createInstance, SwWebDocument_getSupportedServiceNames() ); - } + } else if( SwGlobalDocument_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, SwGlobalDocument_getImplementationName(), SwGlobalDocument_createInstance, SwGlobalDocument_getSupportedServiceNames() ); - } + } else if( SwUnoModule_getImplementationName().equalsAsciiL( - pImplName, nImplNameLen ) ) - { - xFactory = ::cppu::createSingleFactory( xMSF, + pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, SwUnoModule_getImplementationName(), SwUnoModule_createInstance, SwUnoModule_getSupportedServiceNames() ); - } - // --> OD 2007-05-24 #i73788# + } + else if ( ::sw::sidebar::SwPanelFactory::getImplementationName().equalsAsciiL( pImplName, nImplNameLen ) ) + { + xFactory = ::cppu::createSingleFactory( xMSF, + ::sw::sidebar::SwPanelFactory::getImplementationName(), + ::sw::sidebar::SwPanelFactory::createInstance, + ::sw::sidebar::SwPanelFactory::getSupportedServiceNames() ); + } else if( comp_FinalThreadManager::_getImplementationName().equalsAsciiL( pImplName, nImplNameLen ) ) { pRet = ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, entries); } - // <-- if( xFactory.is()) - { - xFactory->acquire(); - pRet = xFactory.get(); - } - } - return pRet; + { + xFactory->acquire(); + pRet = xFactory.get(); + } + } + return pRet; } #ifdef __cplusplus
Modified: openoffice/trunk/main/sw/source/ui/utlui/navipi.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/utlui/navipi.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/ui/utlui/navipi.cxx (original) +++ openoffice/trunk/main/sw/source/ui/utlui/navipi.cxx Wed Apr 10 09:20:16 2013 @@ -283,18 +283,18 @@ IMPL_LINK( SwNavigationPI, ToolBoxSelect break; case FN_SHOW_CONTENT_BOX: case FN_SELECT_CONTENT: - if(pContextWin->GetFloatingWindow()) - { - if(_IsZoomedIn() ) - { - _ZoomOut(); - } - else - { - _ZoomIn(); - } - } - return sal_True; + if(pContextWin!=NULL && pContextWin->GetFloatingWindow()!=NULL) + { + if(_IsZoomedIn() ) + { + _ZoomOut(); + } + else + { + _ZoomIn(); + } + } + return sal_True; //break; // Funktionen, die eine direkte Aktion ausloesen @@ -624,7 +624,7 @@ void SwNavigationPI::MakeMark() void SwNavigationPI::GotoPage() { - if ( pContextWin->GetFloatingWindow() && pContextWin->GetFloatingWindow()->IsRollUp()) + if (pContextWin && pContextWin->GetFloatingWindow() && pContextWin->GetFloatingWindow()->IsRollUp()) _ZoomIn(); if(IsGlobalMode()) ToggleTree(); @@ -640,14 +640,15 @@ void SwNavigationPI::_ZoomOut() { if (_IsZoomedIn()) { - FloatingWindow* pFloat = pContextWin->GetFloatingWindow(); + FloatingWindow* pFloat = pContextWin!=NULL ? pContextWin->GetFloatingWindow() : NULL; bIsZoomedIn = sal_False; Size aSz(GetOutputSizePixel()); aSz.Height() = nZoomOut; Size aMinOutSizePixel = ((SfxDockingWindow*)GetParent())->GetMinOutputSizePixel(); ((SfxDockingWindow*)GetParent())->SetMinOutputSizePixel(Size( aMinOutSizePixel.Width(),nZoomOutInit)); - pFloat->SetOutputSizePixel(aSz); + if (pFloat != NULL) + pFloat->SetOutputSizePixel(aSz); FillBox(); if(IsGlobalMode()) { @@ -672,29 +673,32 @@ void SwNavigationPI::_ZoomOut() void SwNavigationPI::_ZoomIn() { - FloatingWindow* pFloat = pContextWin->GetFloatingWindow(); - if (pFloat && - (!_IsZoomedIn() || ( pContextWin->GetFloatingWindow()->IsRollUp()))) - { - aContentTree.HideTree(); - aDocListBox.Hide(); - aGlobalTree.HideTree(); - bIsZoomedIn = sal_True; - Size aSz(GetOutputSizePixel()); - if( aSz.Height() > nZoomIn ) - nZoomOut = ( short ) aSz.Height(); - - aSz.Height() = nZoomIn; - Size aMinOutSizePixel = ((SfxDockingWindow*)GetParent())->GetMinOutputSizePixel(); - ((SfxDockingWindow*)GetParent())->SetMinOutputSizePixel(Size( - aMinOutSizePixel.Width(), aSz.Height())); - pFloat->SetOutputSizePixel(aSz); - SvLBoxEntry* pFirst = aContentTree.FirstSelected(); - if(pFirst) - aContentTree.Select(pFirst, sal_True); // toolbox enablen - pConfig->SetSmall( sal_True ); - aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, sal_False); - } + if (pContextWin != NULL) + { + FloatingWindow* pFloat = pContextWin->GetFloatingWindow(); + if (pFloat && + (!_IsZoomedIn() || ( pContextWin->GetFloatingWindow()->IsRollUp()))) + { + aContentTree.HideTree(); + aDocListBox.Hide(); + aGlobalTree.HideTree(); + bIsZoomedIn = sal_True; + Size aSz(GetOutputSizePixel()); + if( aSz.Height() > nZoomIn ) + nZoomOut = ( short ) aSz.Height(); + + aSz.Height() = nZoomIn; + Size aMinOutSizePixel = ((SfxDockingWindow*)GetParent())->GetMinOutputSizePixel(); + ((SfxDockingWindow*)GetParent())->SetMinOutputSizePixel(Size( + aMinOutSizePixel.Width(), aSz.Height())); + pFloat->SetOutputSizePixel(aSz); + SvLBoxEntry* pFirst = aContentTree.FirstSelected(); + if(pFirst) + aContentTree.Select(pFirst, sal_True); // toolbox enablen + pConfig->SetSmall( sal_True ); + aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, sal_False); + } + } } /*------------------------------------------------------------------------ Beschreibung: @@ -703,48 +707,51 @@ void SwNavigationPI::_ZoomIn() void SwNavigationPI::Resize() { Window* pParent = GetParent(); - FloatingWindow* pFloat = ((DockingWindow*)pParent)->GetFloatingWindow(); - Size aNewSize; - if( !_IsZoomedIn() ) - { - //change the minimum width depending on the dock status - Size aMinOutSizePixel = ((SfxDockingWindow*)pParent)->GetMinOutputSizePixel(); - if( pFloat) - { - aNewSize = pFloat->GetOutputSizePixel(); - aMinOutSizePixel.Width() = nWishWidth; - aMinOutSizePixel.Height() = _IsZoomedIn() ? nZoomIn : nZoomOutInit; - } - else - { - aNewSize = pParent->GetOutputSizePixel(); - aMinOutSizePixel.Width() = 0; - aMinOutSizePixel.Height() = 0; - } - ((SfxDockingWindow*)GetParent())->SetMinOutputSizePixel(aMinOutSizePixel); + if( !_IsZoomedIn() ) + { + Size aNewSize (pParent->GetOutputSizePixel()); + SfxDockingWindow* pDockingParent = dynamic_cast<SfxDockingWindow*>(pParent); + if (pDockingParent != NULL) + { + FloatingWindow* pFloat = pDockingParent->GetFloatingWindow(); + //change the minimum width depending on the dock status + Size aMinOutSizePixel = pDockingParent->GetMinOutputSizePixel(); + if( pFloat) + { + aNewSize = pFloat->GetOutputSizePixel(); + aMinOutSizePixel.Width() = nWishWidth; + aMinOutSizePixel.Height() = _IsZoomedIn() ? nZoomIn : nZoomOutInit; + } + else + { + aMinOutSizePixel.Width() = 0; + aMinOutSizePixel.Height() = 0; + } + pDockingParent->SetMinOutputSizePixel(aMinOutSizePixel); + } + const Point aPos = aContentTree.GetPosPixel(); - Point aLBPos = aDocListBox.GetPosPixel(); - long nDist = aPos.X(); - aNewSize.Height() -= (aPos.Y() + aPos.X() + nDocLBIniHeight + nDist); - aNewSize.Width() -= 2 * nDist; - aLBPos.Y() = aPos.Y() + aNewSize.Height() + nDist; - aDocListBox.Show(!aGlobalTree.IsVisible() && aLBPos.Y() > aPos.Y() ); - - Size aDocLBSz = aDocListBox.GetSizePixel(); - aDocLBSz.Width() = aNewSize.Width(); - if(aNewSize.Height() < 0) - aDocLBSz.Height() = 0; - else - aDocLBSz.Height() = nDocLBIniHeight; - aContentTree.SetSizePixel(aNewSize); - // GlobalTree faengt weiter oben an und reicht bis ganz unten - aNewSize.Height() += (nDist + nDocLBIniHeight + aPos.Y() - aGlobalTree.GetPosPixel().Y()); - aGlobalTree.SetSizePixel(aNewSize); - aDocListBox.SetPosSizePixel( aLBPos.X(), aLBPos.Y(), - aDocLBSz.Width(), aDocLBSz.Height(), - WINDOW_POSSIZE_X|WINDOW_POSSIZE_Y|WINDOW_POSSIZE_WIDTH); - + Point aLBPos = aDocListBox.GetPosPixel(); + long nDist = aPos.X(); + aNewSize.Height() -= (aPos.Y() + aPos.X() + nDocLBIniHeight + nDist); + aNewSize.Width() -= 2 * nDist; + aLBPos.Y() = aPos.Y() + aNewSize.Height() + nDist; + aDocListBox.Show(!aGlobalTree.IsVisible() && aLBPos.Y() > aPos.Y() ); + + Size aDocLBSz = aDocListBox.GetSizePixel(); + aDocLBSz.Width() = aNewSize.Width(); + if(aNewSize.Height() < 0) + aDocLBSz.Height() = 0; + else + aDocLBSz.Height() = nDocLBIniHeight; + aContentTree.SetSizePixel(aNewSize); + // GlobalTree faengt weiter oben an und reicht bis ganz unten + aNewSize.Height() += (nDist + nDocLBIniHeight + aPos.Y() - aGlobalTree.GetPosPixel().Y()); + aGlobalTree.SetSizePixel(aNewSize); + aDocListBox.SetPosSizePixel( aLBPos.X(), aLBPos.Y(), + aDocLBSz.Width(), aDocLBSz.Height(), + WINDOW_POSSIZE_X|WINDOW_POSSIZE_Y|WINDOW_POSSIZE_WIDTH); } } @@ -851,21 +858,29 @@ SwNavigationPI::SwNavigationPI( SfxBindi nWishWidth = aContentToolboxSize.Width(); nWishWidth += 2 * aContentToolBox.GetPosPixel().X(); - FloatingWindow* pFloat = ((DockingWindow*)pParent)->GetFloatingWindow(); - Size aMinSize(pFloat ? nWishWidth : 0, pFloat ? nZoomOutInit : 0); - ((SfxDockingWindow*)pParent)->SetMinOutputSizePixel(aMinSize); - SetOutputSizePixel( Size( nWishWidth, nZoomOutInit)); - Size aTmpParentSize(((SfxDockingWindow*)pParent)->GetSizePixel()); - if( - ( - aTmpParentSize.Width() < aMinSize.Width() || - aTmpParentSize.Height() < aMinSize.Height() - ) - && - ((SfxDockingWindow*)pParent)->GetFloatingWindow() && - !((SfxDockingWindow*)pParent)->GetFloatingWindow()->IsRollUp() - ) - ((SfxDockingWindow*)pParent)->SetOutputSizePixel(aMinSize); + DockingWindow* pDockingParent = dynamic_cast<DockingWindow*>(pParent); + if (pDockingParent != NULL) + { + FloatingWindow* pFloat = pDockingParent->GetFloatingWindow(); + Size aMinSize(pFloat ? nWishWidth : 0, pFloat ? nZoomOutInit : 0); + pDockingParent->SetMinOutputSizePixel(aMinSize); + SetOutputSizePixel( Size( nWishWidth, nZoomOutInit)); + + SfxDockingWindow* pSfxDockingParent = dynamic_cast<SfxDockingWindow*>(pParent); + if (pSfxDockingParent != NULL) + { + Size aTmpParentSize(pSfxDockingParent->GetSizePixel()); + if (aTmpParentSize.Width() < aMinSize.Width() + || aTmpParentSize.Height() < aMinSize.Height()) + { + if (pSfxDockingParent->GetFloatingWindow() + && ! pSfxDockingParent->GetFloatingWindow()->IsRollUp()) + { + pSfxDockingParent->SetOutputSizePixel(aMinSize); + } + } + } + } aContentTree.SetPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); aContentTree.SetStyle( aContentTree.GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT| @@ -937,6 +952,15 @@ SwNavigationPI::SwNavigationPI( SfxBindi aContentTree.SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_CONTENT)); aGlobalTree.SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_GLOBAL)); aDocListBox.SetAccessibleName(aStatusArr[3]); + + if (pContextWin == NULL) + { + // When the context window is missing then the navigator is + // displayed in the sidebar. While the navigator could change + // its size, the sidebar can not, and the navigator would just + // waste space. Therefore hide this button. + aContentToolBox.RemoveItem(aContentToolBox.GetItemPos(FN_SHOW_CONTENT_BOX)); + } } /*------------------------------------------------------------------------ Modified: openoffice/trunk/main/sw/source/ui/wrtsh/wrtsh3.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/wrtsh/wrtsh3.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/ui/wrtsh/wrtsh3.cxx (original) +++ openoffice/trunk/main/sw/source/ui/wrtsh/wrtsh3.cxx Wed Apr 10 09:20:16 2013 @@ -128,7 +128,12 @@ void SwWrtShell::DrawSelChanged( ) static sal_uInt16 __READONLY_DATA aInval[] = { SID_ATTR_FILL_STYLE, SID_ATTR_FILL_COLOR, SID_ATTR_LINE_STYLE, - SID_ATTR_LINE_WIDTH, SID_ATTR_LINE_COLOR, 0 + SID_ATTR_LINE_WIDTH, SID_ATTR_LINE_COLOR, + /*AF: these may be needed for the sidebar. + SID_SVX_AREA_TRANSPARENCY, SID_SVX_AREA_TRANSP_GRADIENT, + SID_SVX_AREA_TRANS_TYPE, + */ + 0 }; GetView().GetViewFrame()->GetBindings().Invalidate(aInval); Modified: openoffice/trunk/main/sw/uiconfig/swriter/menubar/menubar.xml URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/uiconfig/swriter/menubar/menubar.xml?rev=1466396&r1=1466395&r2=1466396&view=diff ============================================================================== --- openoffice/trunk/main/sw/uiconfig/swriter/menubar/menubar.xml (original) +++ openoffice/trunk/main/sw/uiconfig/swriter/menubar/menubar.xml Wed Apr 10 09:20:16 2013 @@ -144,6 +144,7 @@ <menu:menuitem menu:id=".uno:ViewDataSourceBrowser"/> <menu:menuitem menu:id=".uno:Navigator"/> <menu:menuitem menu:id=".uno:TaskPane"/> + <menu:menuitem menu:id=".uno:Sidebar"/> <menu:menuseparator/> <menu:menuitem menu:id=".uno:FullScreen"/> <menu:menuitem menu:id=".uno:Zoom"/> Modified: openoffice/trunk/main/sw/util/sw.component URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/util/sw.component?rev=1466396&r1=1466395&r2=1466396&view=diff ============================================================================== --- openoffice/trunk/main/sw/util/sw.component (original) +++ openoffice/trunk/main/sw/util/sw.component Wed Apr 10 09:20:16 2013 @@ -97,4 +97,7 @@ <implementation name="com.sun.star.util.comp.FinalThreadManager"> <service name="com.sun.star.util.JobManager"/> </implementation> + <implementation name="org.apache.openoffice.comp.sw.sidebar.SwPanelFactory"> + <service name="com.sun.star.ui.UIElementFactory"/> + </implementation> </component> Modified: openoffice/trunk/main/vcl/inc/vcl/button.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/vcl/button.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff ============================================================================== --- openoffice/trunk/main/vcl/inc/vcl/button.hxx (original) +++ openoffice/trunk/main/vcl/inc/vcl/button.hxx Wed Apr 10 09:20:16 2013 @@ -437,13 +437,11 @@ protected: using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); - SAL_DLLPRIVATE virtual void FillLayoutData() const; - SAL_DLLPRIVATE virtual const Font& - GetCanonicalFont( const StyleSettings& _rStyle ) const; - SAL_DLLPRIVATE virtual const Color& - GetCanonicalTextColor( const StyleSettings& _rStyle ) const; + virtual void FillLayoutData() const; + virtual const Font& GetCanonicalFont( const StyleSettings& _rStyle ) const; + virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const; - SAL_DLLPRIVATE virtual void ImplDrawCheckBoxState(); + virtual void ImplDrawCheckBoxState(); SAL_DLLPRIVATE const Rectangle& GetStateRect() const { return maStateRect; } SAL_DLLPRIVATE const Rectangle& GetMouseRect() const { return maMouseRect; } public: Modified: openoffice/trunk/main/vcl/inc/vcl/split.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/vcl/split.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff ============================================================================== --- openoffice/trunk/main/vcl/inc/vcl/split.hxx (original) +++ openoffice/trunk/main/vcl/inc/vcl/split.hxx Wed Apr 10 09:20:16 2013 @@ -19,8 +19,6 @@ * *************************************************************/ - - #ifndef _SV_SPLIT_HXX #define _SV_SPLIT_HXX @@ -60,6 +58,7 @@ private: SAL_DLLPRIVATE sal_Bool ImplSplitterActive(); SAL_DLLPRIVATE Splitter* ImplFindSibling(); SAL_DLLPRIVATE void ImplRestoreSplitter(); + SAL_DLLPRIVATE void ImplInitHorVer(bool bNew); // Copy assignment is forbidden and not implemented. SAL_DLLPRIVATE Splitter (const Splitter &); @@ -104,7 +103,8 @@ public: void SetLastSplitPosPixel( long nNewPos ); long GetLastSplitPosPixel() const { return mnLastSplitPos; } - sal_Bool IsHorizontal() const { return mbHorzSplit; } + sal_Bool IsHorizontal() const { return mbHorzSplit; } + void SetHorizontal(bool bNew); // set the stepsize of the splitter for cursor movement // the default is 10% of the reference window's width/height Modified: openoffice/trunk/main/vcl/inc/vcl/window.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/vcl/window.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff ============================================================================== --- openoffice/trunk/main/vcl/inc/vcl/window.hxx (original) +++ openoffice/trunk/main/vcl/inc/vcl/window.hxx Wed Apr 10 09:20:16 2013 @@ -1176,7 +1176,15 @@ public: /* */ virtual void setProperties( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& ); - + + + void EnableThemeSupport (void); + void DisableThemeSupport (void); + + virtual ImplBorderWindow* CreateBorderWindow ( + Window* pParent, + const WinBits nStyle, + const sal_uInt16 nTypeStyle); }; Modified: openoffice/trunk/main/vcl/inc/window.h URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/inc/window.h?rev=1466396&r1=1466395&r2=1466396&view=diff ============================================================================== --- openoffice/trunk/main/vcl/inc/window.h (original) +++ openoffice/trunk/main/vcl/inc/window.h Wed Apr 10 09:20:16 2013 @@ -382,7 +382,8 @@ public: mbDisableAccessibleLabeledByRelation:1, mbHelpTextDynamic:1, mbFakeFocusSet:1, - mbInterceptChildWindowKeyDown:1; + mbInterceptChildWindowKeyDown:1, + mbIsThemingEnabled; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer; }; Modified: openoffice/trunk/main/vcl/source/window/split.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/window/split.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff ============================================================================== --- openoffice/trunk/main/vcl/source/window/split.cxx (original) +++ openoffice/trunk/main/vcl/source/window/split.cxx Wed Apr 10 09:20:16 2013 @@ -19,8 +19,6 @@ * *************************************************************/ - - // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" @@ -72,32 +70,39 @@ void Splitter::ImplInitSplitterData() // ----------------------------------------------------------------------- -void Splitter::ImplInit( Window* pParent, WinBits nWinStyle ) +void Splitter::ImplInitHorVer(bool bNew) { - Window::ImplInit( pParent, nWinStyle, NULL ); + if(bNew != (bool)mbHorzSplit) + { + mbHorzSplit = bNew; - mpRefWin = pParent; + PointerStyle ePointerStyle; + const StyleSettings& rSettings = GetSettings().GetStyleSettings(); - const StyleSettings& rSettings = GetSettings().GetStyleSettings(); - long nA = rSettings.GetScrollBarSize(); - long nB = rSettings.GetSplitSize(); + if ( mbHorzSplit ) + { + ePointerStyle = POINTER_HSPLIT; + SetSizePixel( Size( rSettings.GetSplitSize(), rSettings.GetScrollBarSize() ) ); + } + else + { + ePointerStyle = POINTER_VSPLIT; + SetSizePixel( Size( rSettings.GetScrollBarSize(), rSettings.GetSplitSize() ) ); + } - PointerStyle ePointerStyle; + SetPointer( Pointer( ePointerStyle ) ); + } +} - if ( nWinStyle & WB_HSCROLL ) - { - ePointerStyle = POINTER_HSPLIT; - mbHorzSplit = sal_True; - SetSizePixel( Size( nB, nA ) ); - } - else - { - ePointerStyle = POINTER_VSPLIT; - mbHorzSplit = sal_False; - SetSizePixel( Size( nA, nB ) ); - } +// ----------------------------------------------------------------------- + +void Splitter::ImplInit( Window* pParent, WinBits nWinStyle ) +{ + Window::ImplInit( pParent, nWinStyle, NULL ); + + mpRefWin = pParent; - SetPointer( Pointer( ePointerStyle ) ); + ImplInitHorVer(nWinStyle & WB_HSCROLL); if( GetSettings().GetStyleSettings().GetFaceColor().IsDark() ) SetBackground( ImplWhiteWall::get() ); @@ -182,6 +187,16 @@ Splitter::~Splitter() // ----------------------------------------------------------------------- +void Splitter::SetHorizontal(bool bNew) +{ + if(bNew != (bool)mbHorzSplit) + { + ImplInitHorVer(bNew); + } +} + +// ----------------------------------------------------------------------- + void Splitter::SetKeyboardStepSize( long nStepSize ) { mnKeyboardStepSize = nStepSize; Modified: openoffice/trunk/main/vcl/source/window/window.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/window/window.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff ============================================================================== --- openoffice/trunk/main/vcl/source/window/window.cxx (original) +++ openoffice/trunk/main/vcl/source/window/window.cxx Wed Apr 10 09:20:16 2013 @@ -277,7 +277,9 @@ WindowImpl::WindowImpl( WindowType nType mbDisableAccessibleLabelForRelation = sal_False; // sal_True: do not set LabelFor relation on accessible objects mbDisableAccessibleLabeledByRelation = sal_False; // sal_True: do not set LabeledBy relation on accessible objects mbHelpTextDynamic = sal_False; // sal_True: append help id in HELP_DEBUG case - mbFakeFocusSet = sal_False; // sal_True: pretend as if the window has focus. + mbFakeFocusSet = sal_False; // sal_True: pretend as if the window + // has focus. + mbIsThemingEnabled = sal_True; } WindowImpl::~WindowImpl() @@ -756,7 +758,10 @@ void Window::ImplInit( Window* pParent, nBorderTypeStyle |= BORDERWINDOW_STYLE_FRAME; nStyle |= WB_BORDER; } - ImplBorderWindow* pBorderWin = new ImplBorderWindow( pParent, nStyle & (WB_BORDER | WB_DIALOGCONTROL | WB_NODIALOGCONTROL | WB_NEEDSFOCUS), nBorderTypeStyle ); + ImplBorderWindow* pBorderWin = + mpWindowImpl->mbIsThemingEnabled + ? CreateBorderWindow( pParent, nStyle & (WB_BORDER | WB_DIALOGCONTROL | WB_NODIALOGCONTROL | WB_NEEDSFOCUS), nBorderTypeStyle ) + : new ImplBorderWindow( pParent, nStyle & (WB_BORDER | WB_DIALOGCONTROL | WB_NODIALOGCONTROL | WB_NEEDSFOCUS), nBorderTypeStyle ); ((Window*)pBorderWin)->mpWindowImpl->mpClientWindow = this; pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder ); mpWindowImpl->mpBorderWindow = pBorderWin; Modified: openoffice/trunk/main/vcl/source/window/window4.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/window/window4.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff ============================================================================== --- openoffice/trunk/main/vcl/source/window/window4.cxx (original) +++ openoffice/trunk/main/vcl/source/window/window4.cxx Wed Apr 10 09:20:16 2013 @@ -28,6 +28,7 @@ #include "window.h" #include "svdata.hxx" +#include "brdwin.hxx" #include "com/sun/star/beans/PropertyValue.hpp" @@ -219,3 +220,29 @@ uno::Sequence< beans::PropertyValue > Wi return aProps; } + + + +void Window::EnableThemeSupport (void) +{ + mpWindowImpl->mbIsThemingEnabled = sal_True; +} + + + + +void Window::DisableThemeSupport (void) +{ + mpWindowImpl->mbIsThemingEnabled = sal_False; +} + + + + +ImplBorderWindow* Window::CreateBorderWindow ( + Window* pParent, + const WinBits nStyle, + const sal_uInt16 nTypeStyle) +{ + return new ImplBorderWindow(pParent, nStyle, nTypeStyle); +} Propchange: openoffice/trunk/test/ ------------------------------------------------------------------------------ Merged /openoffice/branches/sidebar/test:r1415095-1466374 Propchange: openoffice/trunk/test/testcommon/source/org/openoffice/test/vcl/ ------------------------------------------------------------------------------ Merged /openoffice/branches/sidebar/test/testcommon/source/org/openoffice/test/vcl:r1415095-1466374