incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r1172129 - in /incubator/ooo/trunk/main/sd/source/ui/slidesorter: controller/ inc/controller/ inc/model/ inc/view/ model/ view/
Date Sat, 17 Sep 2011 22:42:58 GMT
Author: mst
Date: Sat Sep 17 22:42:57 2011
New Revision: 1172129

URL: http://svn.apache.org/viewvc?rev=1172129&view=rev
Log:
slidesorter1: #117012# Update preview when text editing ends.

# HG changeset patch
# User Andre Fischer<andre.f.fischer@oracle.com>
# Date 1298986855 -3600
# Node ID 5d52cdcf6d9357e7a6dcc1aa80ba27840042a6de
# Parent  aa5b0a65d4614b8a3a38a2748ff20f9e548e1f99

Modified:
    incubator/ooo/trunk/main/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
    incubator/ooo/trunk/main/sd/source/ui/slidesorter/controller/SlsListener.cxx
    incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
    incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
    incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
    incubator/ooo/trunk/main/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
    incubator/ooo/trunk/main/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx

Modified: incubator/ooo/trunk/main/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/slidesorter/controller/SlideSorterController.cxx?rev=1172129&r1=1172128&r2=1172129&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
(original)
+++ incubator/ooo/trunk/main/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
Sat Sep 17 22:42:57 2011
@@ -1102,6 +1102,26 @@ void SlideSorterController::CheckForMast
 
 
 
+void SlideSorterController::CheckForSlideTransitionAssignment (void)
+{
+    if (mrModel.GetPageCount()%2==0)
+        return;
+    PageEnumeration aAllPages (PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
+    while (aAllPages.HasMoreElements())
+    {
+        SharedPageDescriptor pDescriptor (aAllPages.GetNextElement());
+        if (pDescriptor->UpdateTransitionFlag())
+        {
+            mrView.GetPreviewCache()->InvalidatePreviewBitmap (
+                pDescriptor->GetPage(),
+                true);
+        }
+    }
+}
+
+
+
+
 //===== SlideSorterController::ModelChangeLock ================================
 
 SlideSorterController::ModelChangeLock::ModelChangeLock (

Modified: incubator/ooo/trunk/main/sd/source/ui/slidesorter/controller/SlsListener.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/slidesorter/controller/SlsListener.cxx?rev=1172129&r1=1172128&r2=1172129&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/slidesorter/controller/SlsListener.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/slidesorter/controller/SlsListener.cxx Sat Sep 17
22:42:57 2011
@@ -363,6 +363,7 @@ void Listener::Notify (
         {
             case SFX_HINT_DOCCHANGED:
                 mrController.CheckForMasterPageAssignment();
+                mrController.CheckForSlideTransitionAssignment();
                 break;
         }
     }
@@ -422,6 +423,14 @@ IMPL_LINK(Listener, EventMultiplexerCall
         case tools::EventMultiplexerEvent::EID_SHAPE_REMOVED:
             HandleShapeModification(static_cast<const SdrPage*>(pEvent->mpUserData));
             break;
+            
+        case tools::EventMultiplexerEvent::EID_END_TEXT_EDIT:
+            if (pEvent->mpUserData != NULL)
+            {
+                const SdrObject* pObject = static_cast<const SdrObject*>(pEvent->mpUserData);
+                HandleShapeModification(pObject->GetPage());
+            }
+            break;
 
         default:
             break;

Modified: incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx?rev=1172129&r1=1172128&r2=1172129&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
(original)
+++ incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
Sat Sep 17 22:42:57 2011
@@ -240,6 +240,7 @@ public:
     VisibleAreaManager& GetVisibleAreaManager (void) const;
 
     void CheckForMasterPageAssignment (void);
+    void CheckForSlideTransitionAssignment (void);
 
 private:
     SlideSorter& mrSlideSorter;

Modified: incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx?rev=1172129&r1=1172128&r2=1172129&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx Sat
Sep 17 22:42:57 2011
@@ -99,6 +99,7 @@ public:
     void SetPageIndex (const sal_Int32 nIndex);
     
     bool UpdateMasterPage (void);
+    bool UpdateTransitionFlag (void);
 
     enum State { ST_Visible, ST_Selected, ST_WasSelected,
                  ST_Focused, ST_MouseOver, ST_Current, ST_Excluded };
@@ -148,6 +149,7 @@ private:
     bool mbIsFocused : 1;
     bool mbIsCurrent : 1;
     bool mbIsMouseOver : 1;
+    bool mbHasTransition : 1;
 
     
     // Do not use the copy constructor operator.  It is not implemented.

Modified: incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx?rev=1172129&r1=1172128&r2=1172129&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx Sat
Sep 17 22:42:57 2011
@@ -97,6 +97,7 @@ private:
     Bitmap maMouseOverSelectedAndFocusedBackground;
     ::rtl::OUString msUnhideString;
     ButtonBar& mrButtonBar;
+    Size maSize;
 
     void PaintBackground (
         OutputDevice& rDevice,
@@ -131,6 +132,7 @@ private:
         const Bitmap& rPreview,
         const BitmapEx& rOverlay,
         const OutputDevice* pReferenceDevice) const;
+    void InvalidateBitmaps (void);
 };
 
 } } } // end of namespace sd::slidesorter::view

Modified: incubator/ooo/trunk/main/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx?rev=1172129&r1=1172128&r2=1172129&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx Sat Sep
17 22:42:57 2011
@@ -59,12 +59,18 @@ PageDescriptor::PageDescriptor (
       mbIsVisible(false),
       mbIsFocused(false),
       mbIsCurrent(false),
-      mbIsMouseOver(false)
+      mbIsMouseOver(false),
+      mbHasTransition(false)      
 {
     OSL_ASSERT(mpPage);
     OSL_ASSERT(mpPage == SdPage::getImplementation(rxPage));
-    if (mpPage!=NULL && mpPage->TRG_HasMasterPage())
-        mpMasterPage = &mpPage->TRG_GetMasterPage();
+    if (mpPage != NULL)
+    {
+        if (mpPage->TRG_HasMasterPage())
+            mpMasterPage = &mpPage->TRG_GetMasterPage();
+        if (mpPage->getTransitionType() > 0)
+            mbHasTransition = true;
+    }
 }
 
 
@@ -127,6 +133,23 @@ bool PageDescriptor::UpdateMasterPage (v
 
 
 
+bool PageDescriptor::UpdateTransitionFlag (void)
+{
+    bool bHasSlideTransition (false);
+    if (mpPage != NULL)
+        bHasSlideTransition = mpPage->getTransitionType() > 0;
+    if (bHasSlideTransition != mbHasTransition)
+    {
+        mbHasTransition = bHasSlideTransition;
+        return true;
+    }
+    else
+        return false;
+}
+
+
+
+
 bool PageDescriptor::HasState (const State eState) const
 {
     switch (eState)

Modified: incubator/ooo/trunk/main/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx?rev=1172129&r1=1172128&r2=1172129&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx Sat Sep
17 22:42:57 2011
@@ -113,7 +113,8 @@ PageObjectPainter::PageObjectPainter (
       maMouseOverBackground(),
       maMouseOverFocusedBackground(),
       msUnhideString(mpTheme->GetString(Theme::String_Unhide)),
-      mrButtonBar(rSlideSorter.GetView().GetButtonBar())
+      mrButtonBar(rSlideSorter.GetView().GetButtonBar()),
+      maSize()
 {
     // Replace the color (not the alpha values) in the focus border with a
     // color derived from the current selection color.
@@ -166,7 +167,26 @@ void PageObjectPainter::PaintPageObject 
 
 void PageObjectPainter::NotifyResize (const bool bForce)
 {
-    (void)bForce;
+    if (bForce || ! mpPageObjectLayouter)
+        InvalidateBitmaps();
+    else
+    {
+        const Size aSize (mpPageObjectLayouter->GetSize(
+                PageObjectLayouter::FocusIndicator,
+                PageObjectLayouter::WindowCoordinateSystem));
+        if ( maSize!=aSize)
+        {
+            maSize = aSize;
+            InvalidateBitmaps();
+        }
+    }
+}
+
+
+
+
+void PageObjectPainter::InvalidateBitmaps (void)
+{
     maNormalBackground.SetEmpty();
     maSelectionBackground.SetEmpty();
     maFocusedSelectionBackground.SetEmpty();



Mime
View raw message