summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2016-05-31 22:11:21 +0300
committerJustin Luth <justin_luth@sil.org>2016-06-01 17:45:31 +0000
commit1245bead3a68c9495a870f194f3c523b3b78cf87 (patch)
tree0072a13afaa0bf8d766ad73fc588caddf7de044a
parent76ed212b249a77ed86ee608f04d579d943e5ebd0 (diff)
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@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit c36b560c8d7acf5259d2a8f97317f303667140a3) Reviewed-on: https://gerrit.libreoffice.org/25761 Reviewed-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit 940880a6822bc688193a5a667f5d2104ed477906) Reviewed-on: https://gerrit.libreoffice.org/25780
-rw-r--r--sd/source/ui/docshell/docshel4.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 0ab60d24b0dd..badc20bc80aa 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() );