cppcanvas/source/mtfrenderer/emfplus.cxx | 17 +++++++++-------- sd/source/ui/app/sddll2.cxx | 2 +- sd/source/ui/dlg/PaneChildWindows.cxx | 8 ++++++++ sd/source/ui/inc/PaneChildWindows.hxx | 2 ++ sfx2/source/view/viewfrm.cxx | 15 ++++++++++----- 5 files changed, 30 insertions(+), 14 deletions(-)
New commits: commit ed30996f8fdae4f98d699c711c5b4c7b16e56888 Author: Michael Meeks <michael.me...@suse.com> Date: Fri Jun 7 15:00:17 2013 +0100 fdo#65502 - EmfFillPie fix. Change-Id: I395ef5f5175b9a2d758f4023605b8e2d4dce859f diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index dfc9b31..14670a4 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1342,18 +1342,19 @@ namespace cppcanvas B2DPoint mappedCenter (Map (dx + dw/2, dy + dh/2)); B2DSize mappedSize( MapSize (dw/2, dh/2)); - double endAngle = startAngle + sweepAngle; + float endAngle = startAngle + sweepAngle; + startAngle = fmod (startAngle, M_PI*2); + if (startAngle < 0) + startAngle += M_PI*2; + endAngle = fmod (endAngle, M_PI*2); if (endAngle < 0) endAngle += M_PI*2; - endAngle = fmod (endAngle, M_PI*2); - if (sweepAngle < 0) { - double tmp = startAngle; - startAngle = endAngle; - endAngle = tmp; - } + if (sweepAngle < 0) + std::swap (endAngle, startAngle); - SAL_INFO("cppcanvas.emf", "EMF+ angles: " << startAngle << "," << sweepAngle << " ---> " << startAngle << "," << endAngle); + SAL_INFO("cppcanvas.emf", "EMF+ adjusted angles: start " << + (360.0*startAngle/M_PI) << ", end: " << (360.0*endAngle/M_PI)); B2DPolygon polygon = tools::createPolygonFromEllipseSegment (mappedCenter, mappedSize.getX (), mappedSize.getY (), startAngle, endAngle); polygon.append (mappedCenter); commit ee1726bfdba483623d496a3bcc09089e8b55cd65 Author: Michael Meeks <michael.me...@suse.com> Date: Wed Jun 5 11:48:17 2013 +0100 sidebar: disable impress task pane if sidebar is enabled. Change-Id: I64e601dfd6f4a3763188537f9507c536b86b70fe diff --git a/sd/source/ui/app/sddll2.cxx b/sd/source/ui/app/sddll2.cxx index 78c78ea..a945bfb 100644 --- a/sd/source/ui/app/sddll2.cxx +++ b/sd/source/ui/app/sddll2.cxx @@ -126,7 +126,7 @@ void SdDLL::RegisterControllers() ::avmedia::MediaPlayer::RegisterChildWindow(0, pMod); ::sd::LeftPaneImpressChildWindow::RegisterChildWindow(0, pMod); ::sd::LeftPaneDrawChildWindow::RegisterChildWindow(0, pMod); - ::sd::ToolPanelChildWindow::RegisterChildWindow(0, pMod); + ::sd::ToolPanelChildWindow::RegisterChildWindowIfEnabled(0, pMod); ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindowIfEnabled(0, pMod); SvxFillToolBoxControl::RegisterControl(0, pMod); diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx index df79974..30e5b2f 100644 --- a/sd/source/ui/dlg/PaneChildWindows.cxx +++ b/sd/source/ui/dlg/PaneChildWindows.cxx @@ -215,6 +215,14 @@ void ToolPanelChildWindow::ActivateToolPanel( const OUString& i_rPanelURL ) } } +void ToolPanelChildWindow::RegisterChildWindowIfEnabled (sal_Bool bVisible, + SfxModule *pMod, + sal_uInt16 nFlags) +{ + if ( ! SfxViewFrame::IsSidebarEnabled() ) + RegisterChildWindow( bVisible, pMod, nFlags ); +} + } // end of namespace ::sd /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/PaneChildWindows.hxx b/sd/source/ui/inc/PaneChildWindows.hxx index b2f63d9..dc93ae0 100644 --- a/sd/source/ui/inc/PaneChildWindows.hxx +++ b/sd/source/ui/inc/PaneChildWindows.hxx @@ -70,6 +70,8 @@ public: SFX_DECL_CHILDWINDOW_WITHID( ToolPanelChildWindow ); + static void RegisterChildWindowIfEnabled (sal_Bool bVisible=sal_False, SfxModule *pMod=NULL, sal_uInt16 nFlags=0); + // ::sfx2::ITaskPaneToolPanelAccess virtual void ActivateToolPanel( const OUString& i_rPanelURL ); }; diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 64094df..6aee3b0 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -3418,21 +3418,26 @@ bool SfxViewFrame::IsSidebarEnabled() } // rip out the services from framework/ for good measure - if( !bEnabled ) + try { - try + uno::Reference< ui::XUIElementFactoryManager > xUIElementFactory = ui::UIElementFactoryManager::create( xContext ); + if( !bEnabled ) { - uno::Reference< ui::XUIElementFactoryManager > xUIElementFactory = ui::UIElementFactoryManager::create( xContext ); xUIElementFactory->deregisterFactory( "toolpanel", "ScPanelFactory", "" ); xUIElementFactory->deregisterFactory( "toolpanel", "SwPanelFactory", "" ); xUIElementFactory->deregisterFactory( "toolpanel", "SvxPanelFactory", "" ); xUIElementFactory->deregisterFactory( "toolpanel", "SdPanelFactory", "" ); } - catch ( const uno::Exception &e ) + else { - SAL_WARN( "sfx2.view", "Exception de-registering sidebar factories " << e.Message ); + xUIElementFactory->deregisterFactory( "toolpanel", "DrawingFramework", + "com.sun.star.presentation.PresentationDocument" ); } } + catch ( const uno::Exception &e ) + { + SAL_WARN( "sfx2.view", "Exception de-registering sidebar factories " << e.Message ); + } } return bEnabled; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits