[Libreoffice-commits] core.git: sd/Library_sd.mk sd/source sd/uiconfig sd/UIConfig_simpress.mk
sd/Library_sd.mk |1 sd/UIConfig_simpress.mk|1 sd/source/ui/animations/CustomAnimationBox.cxx | 81 ++ sd/source/ui/animations/CustomAnimationPane.cxx| 60 + sd/source/ui/animations/CustomAnimationPane.hxx|4 sd/uiconfig/simpress/ui/customanimationspanelhorizontal.ui | 409 + sd/uiconfig/simpress/ui/notebookbar.ui | 34 - 7 files changed, 569 insertions(+), 21 deletions(-) New commits: commit 6af8c9ef2de39b933274c96fd661d219b2bed8a3 Author: Szymon KÅosDate: Tue Jun 28 16:09:16 2016 +0200 GSoC notebookbar: added animation tab for Impress Change-Id: Iff9d0269f0f8ce0e0a311c1bbcaf5f749c305348 Reviewed-on: https://gerrit.libreoffice.org/26744 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index eab6571..72ea43e 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -175,6 +175,7 @@ $(eval $(call gb_Library_add_exception_objects,sd,\ sd/source/ui/accessibility/AccessibleViewForwarder \ sd/source/ui/accessibility/SdShapeTypes \ sd/source/ui/animations/CategoryListBox \ + sd/source/ui/animations/CustomAnimationBox \ sd/source/ui/animations/CustomAnimationDialog \ sd/source/ui/animations/CustomAnimationList \ sd/source/ui/animations/CustomAnimationPane \ diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk index ef79c95..a5351dc 100644 --- a/sd/UIConfig_simpress.mk +++ b/sd/UIConfig_simpress.mk @@ -104,6 +104,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/simpress,\ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\ sd/uiconfig/simpress/ui/customanimationspanel \ + sd/uiconfig/simpress/ui/customanimationspanelhorizontal \ sd/uiconfig/simpress/ui/customanimationproperties \ sd/uiconfig/simpress/ui/customanimationeffecttab \ sd/uiconfig/simpress/ui/customanimationtimingtab \ diff --git a/sd/source/ui/animations/CustomAnimationBox.cxx b/sd/source/ui/animations/CustomAnimationBox.cxx new file mode 100644 index 000..d37de23 --- /dev/null +++ b/sd/source/ui/animations/CustomAnimationBox.cxx @@ -0,0 +1,81 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include "ViewShellBase.hxx" +#include +#include "CustomAnimationPane.hxx" +#include +#include + +namespace sd +{ + +class CustomAnimationBox : public VclVBox +{ +VclPtr m_pPane; +bool m_bIsInitialized; + +public: +CustomAnimationBox(vcl::Window* pParent); +~CustomAnimationBox() override; + +virtual void dispose() override; +virtual void StateChanged(StateChangedType nStateChange) override; +}; + +VCL_BUILDER_FACTORY(CustomAnimationBox); + +CustomAnimationBox::CustomAnimationBox(vcl::Window* pParent) +: VclVBox(pParent) +, m_bIsInitialized(false) +{ +} + +CustomAnimationBox::~CustomAnimationBox() +{ +disposeOnce(); +} + +void CustomAnimationBox::dispose() +{ +m_pPane.disposeAndClear(); +VclVBox::dispose(); +} + +void CustomAnimationBox::StateChanged(StateChangedType nStateChange) +{ +if(SfxViewFrame::Current() && !m_bIsInitialized) +{ +ViewShellBase* pBase = ViewShellBase::GetViewShellBase(SfxViewFrame::Current()); + +if(pBase && pBase->GetDocShell()) +{ +css::uno::Reference xFrame; +m_pPane = VclPtr::Create(this, *pBase, xFrame, true); +m_pPane->Show(); +m_pPane->SetSizePixel(GetSizePixel()); +m_bIsInitialized = true; +} +} +VclVBox::StateChanged(nStateChange); +} + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index e8de52c..e328453 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -133,12 +133,36 @@
[Libreoffice-commits] core.git: sd/Library_sd.mk sd/source sd/uiconfig sd/UIConfig_simpress.mk
sd/Library_sd.mk |2 sd/UIConfig_simpress.mk|2 sd/source/ui/animations/CategoryListBox.cxx| 77 ++ sd/source/ui/animations/CategoryListBox.hxx| 31 + sd/source/ui/animations/CustomAnimationPane.cxx| 499 +++-- sd/source/ui/animations/CustomAnimationPane.hxx| 23 sd/uiconfig/simpress/ui/customanimationcreatedialog.ui | 161 - sd/uiconfig/simpress/ui/customanimationcreatetab.ui| 78 -- sd/uiconfig/simpress/ui/customanimationspanel.ui | 165 - 9 files changed, 604 insertions(+), 434 deletions(-) New commits: commit e4aa4472f84dc9fcf0acaab80ede005603a4b93c Author: Rishabh KumarDate: Thu Jul 16 05:17:52 2015 +0530 tdf#87813: Moving effects list into the animation tab Adding the animation effect - 1.Press the + button Modifying the animation effect 1. Select the animation from the list of added animations 2. Select the animation style from the Listbox Change-Id: I14f9242b9f04279622d879ae8c3e162ded6e3e3d Reviewed-on: https://gerrit.libreoffice.org/17008 Tested-by: Jenkins Reviewed-by: Katarina Behrens diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index 66dca43..c54bd6d 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -174,7 +174,7 @@ $(eval $(call gb_Library_add_exception_objects,sd,\ sd/source/ui/accessibility/AccessibleSlideSorterView \ sd/source/ui/accessibility/AccessibleViewForwarder \ sd/source/ui/accessibility/SdShapeTypes \ - sd/source/ui/animations/CustomAnimationCreateDialog \ +sd/source/ui/animations/CategoryListBox \ sd/source/ui/animations/CustomAnimationDialog \ sd/source/ui/animations/CustomAnimationList \ sd/source/ui/animations/CustomAnimationPane \ diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk index d42ef0a..a0d70e9 100644 --- a/sd/UIConfig_simpress.mk +++ b/sd/UIConfig_simpress.mk @@ -71,8 +71,6 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/simpress,\ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\ sd/uiconfig/simpress/ui/assistentdialog \ - sd/uiconfig/simpress/ui/customanimationcreatedialog \ - sd/uiconfig/simpress/ui/customanimationcreatetab \ sd/uiconfig/simpress/ui/customanimationspanel \ sd/uiconfig/simpress/ui/customanimationproperties \ sd/uiconfig/simpress/ui/customanimationeffecttab \ diff --git a/sd/source/ui/animations/CategoryListBox.cxx b/sd/source/ui/animations/CategoryListBox.cxx new file mode 100644 index 000..93364d4 --- /dev/null +++ b/sd/source/ui/animations/CategoryListBox.cxx @@ -0,0 +1,77 @@ +#include "CategoryListBox.hxx" + +namespace sd { + +CategoryListBox::CategoryListBox( vcl::Window* pParent ) +: ListBox( pParent, WB_TABSTOP | WB_BORDER ) +{ +EnableUserDraw( true ); +SetDoubleClickHdl( LINK( this, CategoryListBox, implDoubleClickHdl ) ); +} + +VCL_BUILDER_FACTORY(CategoryListBox) + +CategoryListBox::~CategoryListBox() +{ +} + +sal_Int32 CategoryListBox::InsertCategory( const OUString& rStr, sal_Int32 nPos /* = LISTBOX_APPEND */ ) +{ +sal_Int32 n = ListBox::InsertEntry( rStr, nPos ); +if( n != LISTBOX_ENTRY_NOTFOUND ) +ListBox::SetEntryFlags( n, ListBox::GetEntryFlags(n) | ListBoxEntryFlags::DisableSelection ); + +return n; +} + +void CategoryListBox::UserDraw( const UserDrawEvent& rUDEvt ) +{ +const sal_uInt16 nItem = rUDEvt.GetItemId(); + +if( ListBox::GetEntryFlags(nItem) & ListBoxEntryFlags::DisableSelection ) +{ +Rectangle aOutRect( rUDEvt.GetRect() ); +vcl::RenderContext* pDev = rUDEvt.GetRenderContext(); + +// fill the background +Color aColor (GetSettings().GetStyleSettings().GetDialogColor()); + +pDev->SetFillColor (aColor); +pDev->SetLineColor (); +pDev->DrawRect(aOutRect); + +// Erase the four corner pixels to make the rectangle appear rounded. +pDev->SetLineColor( GetSettings().GetStyleSettings().GetWindowColor()); +pDev->DrawPixel( aOutRect.TopLeft()); +pDev->DrawPixel( Point(aOutRect.Right(), aOutRect.Top())); +pDev->DrawPixel( Point(aOutRect.Left(), aOutRect.Bottom())); +pDev->DrawPixel( Point(aOutRect.Right(), aOutRect.Bottom())); + +// draw the category title +pDev->DrawText (aOutRect, GetEntry(nItem), DrawTextFlags::Center ); +} +else +{ +DrawEntry( rUDEvt, true, true ); +} +} + +IMPL_LINK_NOARG_TYPED(CategoryListBox, implDoubleClickHdl, ListBox&, void) +{ +CaptureMouse(); +} + +void CategoryListBox::MouseButtonUp( const MouseEvent& rMEvt ) +{ +ReleaseMouse(); +if( rMEvt.IsLeft() && (rMEvt.GetClicks() == 2) ) +{ +maDoubleClickHdl.Call( *this ); +} +else +{ +