[Libreoffice-commits] core.git: sd/source

Justin Luth justin_luth at sil.org
Wed Jun 1 09:12:49 UTC 2016


 sd/source/ui/docshell/docshel4.cxx |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

New commits:
commit c36b560c8d7acf5259d2a8f97317f303667140a3
Author: Justin Luth <justin_luth at sil.org>
Date:   Tue May 31 22:11:21 2016 +0300

    tdf#66469 impress: update outline text before saving
    
    When custom annimations are present, any changes to the
    Outline text were not updated unless EndTextEdit was called.
    Ending Text Editing would cancel the cursor location, so
    simply sync the changes and then save.
    
    Change-Id: Iaf3b29e64d08c9d2fb6c18d7b0e3b3cc89c16d7f
    Reviewed-on: https://gerrit.libreoffice.org/25739
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 3f74cc3..5743e4e 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -62,6 +62,7 @@
 #include "ViewShell.hxx"
 #include "sdmod.hxx"
 #include "View.hxx"
+#include "CustomAnimationEffect.hxx"
 #include "sdpage.hxx"
 #include "sdresid.hxx"
 #include "DrawViewShell.hxx"
@@ -547,6 +548,23 @@ bool DrawDocShell::SaveAs( SfxMedium& rMedium )
     }
     mpDoc->StopWorkStartupDelay();
 
+    //With custom animation, if Outliner is modified, update text before saving
+    if( mpViewShell )
+    {
+        SdPage* pPage = mpViewShell->getCurrentPage();
+        if( pPage && pPage->getMainSequence()->getCount() )
+        {
+            SdrObject* pObj = mpViewShell->GetView()->GetTextEditObject();
+            SdrOutliner* pOutl = mpViewShell->GetView()->GetTextEditOutliner();
+            if( pObj && pOutl && pOutl->IsModified() )
+            {
+                OutlinerParaObject* pNewText = pOutl->CreateParaObject( 0, pOutl->GetParagraphCount() );
+                pObj->SetOutlinerParaObject( pNewText );
+                pOutl->ClearModifyFlag();
+            }
+        }
+    }
+
     //TODO/LATER: why this?!
     if( GetCreateMode() == SfxObjectCreateMode::STANDARD )
         SfxObjectShell::SetVisArea( Rectangle() );


More information about the Libreoffice-commits mailing list