[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/dlg/dlgsnap.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 86ac337ffefff18913f2ef3d87fffbfd24ebedc0 Author: Julien NabetDate: Thu Mar 30 07:19:21 2017 +0200 tdf#106857: use SfxInt32Item for ATTR_SNAPLINE and avoid crash with this bt: 3 0x77449ef2 in __GI___assert_fail (assertion=assertion@entry=0x71f0cdd0 "dynamic_cast() != nullptr", file=file@entry=0x71f0cce8 "/home/julien/lo/libreoffice/svl/source/items/cintitem.cxx", line=line@entry=232, function=function@entry=0x71f0d0a0
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/filter/ppt/pptin.cxx | 11 --- sd/source/filter/ppt/pptin.hxx | 10 +- 2 files changed, 9 insertions(+), 12 deletions(-) New commits: commit e8a070fd1170a7452d57304d6cf979f0c9961a0e Author: Caolán McNamaraDate: Thu Mar 16 11:40:20 2017 + ofz#877 reference to stack alloced obj outlives obj (cherry picked from commit ae174b009bcf0f84073b9ebbf01ad31b274b789e) Change-Id: I8c854e2f651f8bf0018e8249827aae0fe23057e7 Reviewed-on: https://gerrit.libreoffice.org/35272 Reviewed-by: Michael Stahl Tested-by: Michael Stahl diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 8eac912e254c..74d3e45557a1 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -98,10 +98,8 @@ using namespace ::com::sun::star; SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotStorage& rStorage, SfxMedium& rMedium ) +: maParam(rDocStream, 0) { - -sal_uInt32 nImportFlags = 0; - #ifdef DBG_UTIL PropRead* pSummaryInformation = new PropRead( rStorage, OUString( "\005SummaryInformation" ) ); if ( pSummaryInformation->IsValid() ) @@ -121,7 +119,7 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotSt aPropItem.Read( aComment ); if ( aComment.indexOf( "Applixware" ) >= 0 ) { -nImportFlags |= PPT_IMPORTFLAGS_NO_TEXT_ASSERT; +maParam.nImportFlags |= PPT_IMPORTFLAGS_NO_TEXT_ASSERT; } } } @@ -129,11 +127,10 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotSt delete pSummaryInformation; #endif -PowerPointImportParam aParam( rDocStream, nImportFlags ); SvStream* pCurrentUserStream = rStorage.OpenSotStream( "Current User", STREAM_STD_READ ); if( pCurrentUserStream ) { -ReadPptCurrentUserAtom( *pCurrentUserStream, aParam.aCurrentUserAtom ); +ReadPptCurrentUserAtom(*pCurrentUserStream, maParam.aCurrentUserAtom); delete pCurrentUserStream; } @@ -153,7 +150,7 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SotSt } } -pFilter = new ImplSdPPTImport( pDocument, rStorage, rMedium, aParam ); +pFilter = new ImplSdPPTImport(pDocument, rStorage, rMedium, maParam); } bool SdPPTImport::Import() diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx index ef69e29c9308..bf221f945a2a 100644 --- a/sd/source/filter/ppt/pptin.hxx +++ b/sd/source/filter/ppt/pptin.hxx @@ -48,7 +48,6 @@ class ImplSdPPTImport : public SdrPowerPointImport { SfxMedium& mrMed; SotStorage& mrStorage; -// SvStream* mpPicStream; DffRecordHeader maDocHd; std::vector maSlideNameList; boolmbDocumentFound; @@ -82,14 +81,15 @@ public: class SdPPTImport { +PowerPointImportParam maParam; ImplSdPPTImport* pFilter; -public: +public: -SdPPTImport( SdDrawDocument* pDoc, SvStream& rDocStream, SotStorage& rStorage, SfxMedium& rMed ); -~SdPPTImport(); +SdPPTImport( SdDrawDocument* pDoc, SvStream& rDocStream, SotStorage& rStorage, SfxMedium& rMed ); +~SdPPTImport(); -bool Import(); +bool Import(); }; #endif // INCLUDED_SD_SOURCE_FILTER_PPT_PPTIN_HXX ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/view/drviews3.cxx | 351 - 1 file changed, 174 insertions(+), 177 deletions(-) New commits: commit 5d1c37e416d856a07c3dc6a51381eabb13c467ae Author: Caolán McNamaraDate: Thu Mar 16 10:50:37 2017 + Resolves: tdf#106557 don't crash on missing line spacing argument this is all a bit addled, but at least don't crash Change-Id: I19c35205446cebc83b8299839bcab8e02ff7c07d (cherry picked from commit ab10f03ec4dc7d5d7659fb62c59972c80221f733) Reviewed-on: https://gerrit.libreoffice.org/35262 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 307ee4f4db9f..aae1b9e91ec4 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -496,167 +496,166 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq) switch ( rReq.GetSlot() ) { case SID_ATTR_LONG_LRSPACE: -{ -SdUndoGroup* pUndoGroup = new SdUndoGroup(GetDoc()); -pUndoGroup->SetComment(SdResId(STR_UNDO_CHANGE_PAGEBORDER)); +if (pArgs) +{ +SdUndoGroup* pUndoGroup = new SdUndoGroup(GetDoc()); +pUndoGroup->SetComment(SdResId(STR_UNDO_CHANGE_PAGEBORDER)); -const SvxLongLRSpaceItem& rLRSpace = static_cast( -pArgs->Get(GetPool().GetWhich(SID_ATTR_LONG_LRSPACE))); +const SvxLongLRSpaceItem& rLRSpace = static_cast( +pArgs->Get(GetPool().GetWhich(SID_ATTR_LONG_LRSPACE))); -if( mpDrawView->IsTextEdit() ) -{ -Rectangle aRect = maMarkRect; -aRect.SetPos(aRect.TopLeft() + aPagePos); -aRect.Left() = rLRSpace.GetLeft(); -aRect.Right() = aViewSize.Width() - rLRSpace.GetRight(); -aRect.SetPos(aRect.TopLeft() - aPagePos); -if ( aRect != maMarkRect) +if( mpDrawView->IsTextEdit() ) { -mpDrawView->SetAllMarkedRect(aRect); -maMarkRect = mpDrawView->GetAllMarkedRect(); -Invalidate( SID_RULER_OBJECT ); +Rectangle aRect = maMarkRect; +aRect.SetPos(aRect.TopLeft() + aPagePos); +aRect.Left() = rLRSpace.GetLeft(); +aRect.Right() = aViewSize.Width() - rLRSpace.GetRight(); +aRect.SetPos(aRect.TopLeft() - aPagePos); +if ( aRect != maMarkRect) +{ +mpDrawView->SetAllMarkedRect(aRect); +maMarkRect = mpDrawView->GetAllMarkedRect(); +Invalidate( SID_RULER_OBJECT ); +} +} +else +{ +long nLeft = std::max(0L, rLRSpace.GetLeft() - aPagePos.X()); +long nRight = std::max(0L, rLRSpace.GetRight() + aPagePos.X() + + aPageSize.Width() - aViewSize.Width()); + +sal_uInt16 nPageCnt = GetDoc()->GetSdPageCount(mePageKind); +sal_uInt16 i; +for ( i = 0; i < nPageCnt; i++) +{ +SdPage* pPage = GetDoc()->GetSdPage(i, mePageKind); +SdUndoAction* pUndo = new SdPageLRUndoAction(GetDoc(), +pPage, +pPage->GetLftBorder(), +pPage->GetRgtBorder(), +nLeft, nRight); +pUndoGroup->AddAction(pUndo); +pPage->SetLftBorder(nLeft); +pPage->SetRgtBorder(nRight); +} +nPageCnt = GetDoc()->GetMasterSdPageCount(mePageKind); + +for (i = 0; i < nPageCnt; i++) +{ +SdPage* pPage = GetDoc()->GetMasterSdPage(i, mePageKind); +SdUndoAction* pUndo = new SdPageLRUndoAction(GetDoc(), +pPage, +pPage->GetLftBorder(), +pPage->GetRgtBorder(), +nLeft, nRight); +pUndoGroup->AddAction(pUndo); +pPage->SetLftBorder(nLeft); +pPage->SetRgtBorder(nRight); +} +InvalidateWindows(); } + +// give the undo group to the undo manager +GetViewFrame()->GetObjectShell()->GetUndoManager()-> +
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/filter/eppt/pptx-epptooxml.cxx | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) New commits: commit ed22f8b84ed0b5286af406c87c674f34fe8439c1 Author: Matúš KukanDate: Sat Feb 11 16:24:37 2017 +0100 tdf#104222: Put expensive debug code behind #if again dump_pset calls very expensive SdGenericDrawPage::getPropertyValue doing something with GDIMetaFiles. (regression from 5c7ce42dfc35d9cceef5f05a96e813b4e3913d38) (cherry picked from commit 9cbe69f1950115e47af693bd78fc78f96f9b508e) Change-Id: If39e9a451c87754343d77c8a1f840153c6b9de80 Reviewed-on: https://gerrit.libreoffice.org/34651 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 32f7171..fb98a6e 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -92,7 +92,10 @@ using ::com::sun::star::container::XIndexAccess; using ::sax_fastparser::FSHelperPtr; -void dump_pset(Reference< XPropertySet > rXPropSet); +#if OSL_DEBUG_LEVEL > 1 +void dump_pset(Reference< XPropertySet > const & rXPropSet); +#endif + #define IDS(x) OString(OStringLiteral(#x " ") + OString::number( mnShapeIdMax++ )).getStr() namespace oox { @@ -1789,7 +1792,9 @@ void PowerPointExport::ImplWritePPTXLayout( sal_Int32 nOffset, sal_uInt32 nMaste Reference< beans::XPropertySet > xPropSet( xSlide, uno::UNO_QUERY ); xPropSet->setPropertyValue( "Layout", makeAny( short( aLayoutInfo[ nOffset ].nType ) ) ); +#if OSL_DEBUG_LEVEL > 1 dump_pset(xPropSet); +#endif mXPagePropSet.set( xSlide, UNO_QUERY ); mXShapes.set( xSlide, UNO_QUERY ); @@ -2334,7 +2339,8 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL sdfilt_component_getFactory( const sal_Char* } #endif -void dump_pset(Reference< XPropertySet > rXPropSet) +#if OSL_DEBUG_LEVEL > 1 +void dump_pset(Reference< XPropertySet > const & rXPropSet) { Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo (); Sequence< beans::Property > props = info->getProperties (); @@ -2361,5 +2367,6 @@ void dump_pset(Reference< XPropertySet > rXPropSet) SAL_WARN("sd.eppt", "??? "); } } +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/sidebar/SlideBackground.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 95396dbcaf035655f1102480c146e6cbc9f44d70 Author: Markus MohrhardDate: Thu Feb 23 00:32:12 2017 +0100 fix crash in the sidebar code The check should be for xPanel and not xPanels. See http://crashreport.libreoffice.org/stats/signature/sfx2::sidebar::Panel::GetTitleBar() Change-Id: I745d6d8abbfc68e86ed812460faa551867ddec43 Reviewed-on: https://gerrit.libreoffice.org/34560 Tested-by: Jenkins Reviewed-by: Markus Mohrhard (cherry picked from commit 0407200401358d3d565438800f55b61fc1a61794) Reviewed-on: https://gerrit.libreoffice.org/34564 Reviewed-by: Katarina Behrens diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index dfe65a2..473cd94 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -335,7 +335,7 @@ void SlideBackground::SetPanelTitle( const OUString& rTitle ) return; Reference xPanel ( xPanels->getByName("SlideBackgroundPanel"), uno::UNO_QUERY); -if ( !xPanels.is() ) +if ( !xPanel.is() ) return; xPanel->setTitle( rTitle ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/animations/CustomAnimationDialog.cxx |4 1 file changed, 4 insertions(+) New commits: commit 43d64e9b0b634a682f5987bc6401e3207af25598 Author: Caolán McNamaraDate: Tue Feb 7 11:28:33 2017 + animation duration/scale etc don't fill horizontal space (cherry picked from commit d18089ec0a2a8758eda889a7b9b23b66128484d5) Change-Id: Ie211827c2f8231384b98fb08e0371a839e3dc41c Reviewed-on: https://gerrit.libreoffice.org/33997 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index 21f6115..1d91489 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -118,6 +118,7 @@ PresetPropertyBox::PresetPropertyBox( sal_Int32 nControlType, vcl::Window* pPare : PropertySubControl( nControlType ), maModifyLink(rModifyHdl) { mpControl = VclPtr::Create( pParent, WB_BORDER|WB_TABSTOP|WB_DROPDOWN ); +mpControl->set_hexpand(true); mpControl->SetDropDownLineCount( 10 ); mpControl->SetSelectHdl( LINK(this, PresetPropertyBox, OnSelect) ); mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_PRESETPROPERTYBOX ); @@ -201,6 +202,7 @@ ColorPropertyBox::ColorPropertyBox( sal_Int32 nControlType, vcl::Window* pParent { mpControl = VclPtr::Create( pParent, WB_BORDER|WB_TABSTOP|WB_DROPDOWN ); mpControl->SetDropDownLineCount( 10 ); +mpControl->set_hexpand(true); mpControl->SetSelectHdl( LINK(this, ColorPropertyBox, OnSelect) ); mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_COLORPROPERTYBOX ); @@ -280,6 +282,7 @@ FontPropertyBox::FontPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, : PropertySubControl( nControlType ), maModifyHdl(rModifyHdl) { mpControl = VclPtr::Create( pParent, WB_BORDER|WB_TABSTOP|WB_DROPDOWN ); +mpControl->set_hexpand(true); mpControl->SetDropDownLineCount( 10 ); mpControl->SetSelectHdl( LINK(this, FontPropertyBox, ControlSelectHdl) ); mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_FONTPROPERTYBOX ); @@ -367,6 +370,7 @@ DropdownMenuBox::DropdownMenuBox( vcl::Window* pParent, Edit* pSubControl, Popup mpDropdownButton->SetPopupMenu( pMenu ); SetSubEdit( mpSubControl ); +set_hexpand(true); mpSubControl->SetParent( this ); mpSubControl->Show(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/view/Outliner.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 5f081ce502e5528049fc76657d623afcee24 Author: Michael StahlDate: Wed Jan 11 17:17:27 2017 +0100 tdf#105182 sd: avoid iterating too far in SdOutliner::Initialize() Considering the valid indexes are extended by "-1" for backwards iterators and "size()" for forward iterators, it's obvious that a not-yet-at-the-end-in-the-other-direction iterator can be incremented once, but not necessarily twice. Why this code even wants to increment it twice isn't obvious to me. Change-Id: I578c8c6202049ebe6dbed41b8276a6bfa0566bbc (cherry picked from commit aa1ee198b5b55d0a92418eb3294c93553e8513dd) Reviewed-on: https://gerrit.libreoffice.org/32975 Tested-by: Jenkins Reviewed-by: Christian Lohmaier diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index f4d6839..42d4a20 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -580,7 +580,10 @@ void Outliner::Initialize (bool bDirectionIsForward) // The iterator has pointed to the object one ahead/before the current // one. Now move it to the one before/ahead the current one. ++maObjectIterator; -++maObjectIterator; +if (maObjectIterator != sd::outliner::OutlinerContainer(this).end()) +{ +++maObjectIterator; +} } mbMatchMayExist = true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/dlg/PhotoAlbumDialog.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 96e0beb0ef99a0840ecf434c3d726eebaa3c745e Author: Stephan BergmannDate: Tue Jan 10 15:31:53 2017 +0100 tdf#105199: Keep URL intact (cherry picked from commit 6a68e364faa0d384f1e3bf397f5decaadecf9b3b) Conflicts: sd/source/ui/dlg/PhotoAlbumDialog.cxx Change-Id: I85681fcc81246414332f88dc46ce4a4b60896c97 Reviewed-on: https://gerrit.libreoffice.org/32931 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx index 04a7b80..3f4f932 100644 --- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx +++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx @@ -507,7 +507,7 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, FileHdl, Button*, void) // Store full path, show filename only. Use INetURLObject to display spaces in filename correctly INetURLObject aUrl = INetURLObject(aFilesArr[i]); sal_Int16 nPos = pImagesLst->InsertEntry( aUrl.GetLastName(INetURLObject::DECODE_WITH_CHARSET) ); -pImagesLst->SetEntryData(nPos, new OUString(aUrl.GetMainURL(INetURLObject::DECODE_WITH_CHARSET))); +pImagesLst->SetEntryData(nPos, new OUString(aUrl.GetMainURL(INetURLObject::NO_DECODE))); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/dlg/sdtreelb.cxx | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) New commits: commit 78223678b7513ffe46804cb08f2dc5bc899b2bab Author: Noel GrandinDate: Tue Dec 6 16:11:31 2016 +0200 tdf#103756 fix crash of this on 5-2 with initial backport This crashing when the user hits ctrl-Z, because when I backported: commit d1909ab7940109ce7d43da04e480db4e82b8310f Author: Noel Grandin Date: Tue Nov 8 16:15:55 2016 +0200 tdf#103756 - CTRL+Z not working to undo changes performed through Navigator I missed that the older version of SdPageObjsTLB has two constructors while the new version (on master) only has one, and I only added the new line of code to one of them. Change-Id: Ic5bc59a20e26fecb823f5b0fadba874b947e77ad Reviewed-on: https://gerrit.libreoffice.org/31680 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 0aeab05..5f1a7c5 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -224,6 +224,8 @@ SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, const SdResId& rSdResId ) SetDragDropMode( DragDropMode::CTRL_MOVE | DragDropMode::CTRL_COPY | DragDropMode::APP_MOVE | DragDropMode::APP_COPY | DragDropMode::APP_DROP ); + +m_pAccel = ::svt::AcceleratorExecute::createAcceleratorHelper(); } SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, WinBits nStyle ) @@ -262,12 +264,9 @@ SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, WinBits nStyle ) void SdPageObjsTLB::SetViewFrame( SfxViewFrame* pViewFrame ) { mpFrame = pViewFrame; -if (m_pAccel) -{ -sd::ViewShellBase* pBase = sd::ViewShellBase::GetViewShellBase(pViewFrame); -const css::uno::Reference< css::frame::XFrame > xFrame = pBase->GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(); -m_pAccel->init(::comphelper::getProcessComponentContext(), xFrame); -} +sd::ViewShellBase* pBase = sd::ViewShellBase::GetViewShellBase(pViewFrame); +const css::uno::Reference< css::frame::XFrame > xFrame = pBase->GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(); +m_pAccel->init(::comphelper::getProcessComponentContext(), xFrame); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/dlg/sdtreelb.cxx | 22 ++ sd/source/ui/inc/sdtreelb.hxx |9 +++-- 2 files changed, 29 insertions(+), 2 deletions(-) New commits: commit d1909ab7940109ce7d43da04e480db4e82b8310f Author: Noel GrandinDate: Tue Nov 8 16:15:55 2016 +0200 tdf#103756 - CTRL+Z not working to undo changes performed through Navigator Hooked up the tree control to do explicit handling of accelerator key input. Note that there is an extra check for null in SdPageObjsTLB::SetViewFrame to prevent various 'make check' failures. No idea why this did not trigger on trunk. Reviewed-on: https://gerrit.libreoffice.org/30694 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit e9da91fd028e73846b1bed2618357d0abfbdcc57) Change-Id: I8b47fc2d651f7db2549c73c5314fbc4a7f4efecc Reviewed-on: https://gerrit.libreoffice.org/30769 Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 0e0babd..0aeab05 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -56,6 +57,8 @@ #include #include #include + + using namespace com::sun::star; class SdPageObjsTLB::IconProvider @@ -252,8 +255,22 @@ SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, WinBits nStyle ) SetDragDropMode( DragDropMode::CTRL_MOVE | DragDropMode::CTRL_COPY | DragDropMode::APP_MOVE | DragDropMode::APP_COPY | DragDropMode::APP_DROP ); + +m_pAccel = ::svt::AcceleratorExecute::createAcceleratorHelper(); } +void SdPageObjsTLB::SetViewFrame( SfxViewFrame* pViewFrame ) +{ +mpFrame = pViewFrame; +if (m_pAccel) +{ +sd::ViewShellBase* pBase = sd::ViewShellBase::GetViewShellBase(pViewFrame); +const css::uno::Reference< css::frame::XFrame > xFrame = pBase->GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(); +m_pAccel->init(::comphelper::getProcessComponentContext(), xFrame); +} +} + + SdPageObjsTLB::~SdPageObjsTLB() { disposeOnce(); @@ -268,6 +285,7 @@ void SdPageObjsTLB::dispose() delete mpMedium; mpParent.clear(); mpDropNavWin.clear(); +m_pAccel.reset(); SvTreeListBox::dispose(); } @@ -1075,6 +1093,10 @@ void SdPageObjsTLB::SelectHdl() */ void SdPageObjsTLB::KeyInput( const KeyEvent& rKEvt ) { +const vcl::KeyCode& aKeyCode = rKEvt.GetKeyCode(); +if ( m_pAccel->execute( aKeyCode ) ) +// the accelerator consumed the event +return; if( rKEvt.GetKeyCode().GetCode() == KEY_RETURN ) { // commented code from svtools/source/contnr/svimpbox.cxx diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx index 2976b65..35e166c 100644 --- a/sd/source/ui/inc/sdtreelb.hxx +++ b/sd/source/ui/inc/sdtreelb.hxx @@ -50,6 +50,9 @@ class DrawDocShell; typedef ::tools::SvRef DrawDocShellRef; #endif } +namespace svt { +class AcceleratorExecute; +} /** * Effect-Tab-Dialog @@ -62,6 +65,8 @@ private: // set contenttree in SdNavigatorWin bool bisInSdNavigatorWin; + +::std::unique_ptr< ::svt::AcceleratorExecute> m_pAccel; public: // nested class to implement the TransferableHelper @@ -183,7 +188,7 @@ public: SdPageObjsTLB( vcl::Window* pParent, const SdResId& rSdResId ); SdPageObjsTLB( vcl::Window* pParent, WinBits nStyle ); -virtual ~SdPageObjsTLB(); +virtual ~SdPageObjsTLB(); virtual voiddispose() override; // helper function for GetEntryAltText and GetEntryLongDescription @@ -193,7 +198,7 @@ public: virtual voidSelectHdl() override; virtual voidKeyInput( const KeyEvent& rKEvt ) override; -voidSetViewFrame( SfxViewFrame* pViewFrame ) { mpFrame = pViewFrame; } +voidSetViewFrame( SfxViewFrame* pViewFrame ); voidFill( const SdDrawDocument*, bool bAllPages, const OUString& rDocName ); voidFill( const SdDrawDocument*, SfxMedium* pSfxMedium, const OUString& rDocName ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/view/drviews2.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 1fcecd9d17ccf77fd446dbe4bc25aa85314b36a1 Author: Maxim MonastirskyDate: Wed Oct 19 15:03:48 2016 +0300 tdf#103264 Missing case for SID_SAVE_BACKGROUND Regression of: commit 93b4bf647a5899f54ef51f8b4bfed0faa66b466e Date: Fri Jul 31 02:28:28 2015 +0530 tdf#89466: Slide Background tab Change-Id: I1c6d1d35c47e6e4400d65474c84b2c3ebeb0330f (cherry picked from commit 4a74c8af0b4573b4b72ccf04b26c71e41799e7a0) Reviewed-on: https://gerrit.libreoffice.org/30051 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index a8388d4..5e02a2d 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -1217,6 +1217,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) break; case SID_SELECT_BACKGROUND: +case SID_SAVE_BACKGROUND: case SID_ATTR_PAGE_SIZE: case SID_ATTR_PAGE: case SID_PAGESETUP: // BASIC ?? ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/view/drviews1.cxx |9 + 1 file changed, 9 insertions(+) New commits: commit 7e049ad52cce66cf4fe3bf96b9a1ac4c3688d887 Author: Caolán McNamaraDate: Wed Sep 28 16:29:50 2016 +0100 Resolves: tdf#102343 unable to undo stylesheet changes in master... slides done via proxy textbox objects regression since... commit 12a4200e8ff7f045efcc7e9d15a24b15b248c437 Author: Armin Le Grand Date: Thu Aug 9 08:42:27 2012 + Related: #i120498# Enhanced Undo/Redo and user experience... when editing texts in graphic objects and/or tables The issue is that the formatting changes in these master textboxes create changes in the stylesheet, rather than just changes in the textbox itself and the changes above don't take that into account and throw away these unusual undo objects. Change-Id: I209758cefa96b2f886161de1d44d6a68d007faa7 (cherry picked from commit 057d8abebb19fedd769a43120621488ba305cf93) Reviewed-on: https://gerrit.libreoffice.org/29369 Tested-by: Jenkins Tested-by: Yousuf Philips Reviewed-by: Miklos Vajna diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 710f073..0302f7a 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -412,6 +412,9 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) SetAppBackgroundColor( aFillColor ); SwitchPage(nActualPageNum); + +//tdf#102343 re-enable common undo on switch back from master mode + mpDrawView->GetModel()->SetDisableTextEditUsesCommonUndoManager(false); } else { @@ -452,6 +455,12 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) maTabControl->SetCurPageId(nActualMasterPageNum + 1); SwitchPage(nActualMasterPageNum); + +//tdf#102343 changing attributes of textboxes in master typically +//changes the stylesheet they are linked to, so if the common +//undo manager is in use, those stylesheet changes are thrown +//away at present + mpDrawView->GetModel()->SetDisableTextEditUsesCommonUndoManager(true); } // If the master view toolbar is to be shown we turn it on after the ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/func/fuprlout.cxx | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) New commits: commit 40affcbad618c02f06e8ec2ba031dda187fcd950 Author: Caolán McNamaraDate: Fri Sep 30 13:43:07 2016 +0100 Resolves: tdf#101004 crash on using slide master design from master view started asserting since... commit f7ed8b99b628625851fb28ec1a3dead710c8871c Author: Caolán McNamara Date: Tue Jun 23 16:54:52 2015 +0100 allow slide design to affect multiple standard pages but looks broken well before that Change-Id: I03988696e7a25e4f8c932f55bcd1879994ac1005 (cherry picked from commit 43e241541eefd21cfc7a8e8f51ef958c2a7ba4d7) Reviewed-on: https://gerrit.libreoffice.org/29405 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx index 674aa64..e5cb57a 100644 --- a/sd/source/ui/func/fuprlout.cxx +++ b/sd/source/ui/func/fuprlout.cxx @@ -137,12 +137,6 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) } } -assert(!aSelectedPages.empty() && "no selected page"); -OUString aOldLayoutName(aSelectedPages.back()->GetLayoutName()); -sal_Int32 nPos = aOldLayoutName.indexOf(SD_LT_SEPARATOR); -if (nPos != -1) -aOldLayoutName = aOldLayoutName.copy(0, nPos); - bool bMasterPage = bOnMaster; bool bCheckMasters = false; @@ -155,7 +149,15 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) aSet.Put( SfxBoolItem( ATTR_PRESLAYOUT_LOAD, bLoad)); aSet.Put( SfxBoolItem( ATTR_PRESLAYOUT_MASTER_PAGE, bMasterPage ) ); aSet.Put( SfxBoolItem( ATTR_PRESLAYOUT_CHECK_MASTERS, bCheckMasters ) ); -aSet.Put( SfxStringItem( ATTR_PRESLAYOUT_NAME, aOldLayoutName)); + +if (!aSelectedPages.empty()) +{ +OUString aOldLayoutName(aSelectedPages.back()->GetLayoutName()); +sal_Int32 nPos = aOldLayoutName.indexOf(SD_LT_SEPARATOR); +if (nPos != -1) +aOldLayoutName = aOldLayoutName.copy(0, nPos); +aSet.Put(SfxStringItem(ATTR_PRESLAYOUT_NAME, aOldLayoutName)); +} const SfxItemSet *pArgs = rReq.GetArgs (); @@ -238,7 +240,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) static_cast (mpView)->BlockPageOrderChangedHint(false); // if the master page was visible, show it again -if (!bError) +if (!bError && !aSelectedPages.empty()) { if (bOnMaster) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/annotations/annotationwindow.cxx |4 1 file changed, 4 insertions(+) New commits: commit 59a4486bb8519fbd54da0a924b7a5f9b712b3bf2 Author: Caolán McNamaraDate: Sat Oct 1 21:09:48 2016 +0100 Engine() return mpOutliner, so can crash if Engine() used post delete if Deactivate called during ::dispose Change-Id: I066dcc52278f12442de0281c8d783353aed5a186 (cherry picked from commit 86617760eb8bc6c0b2713b9496ade9203d1077a5) Reviewed-on: https://gerrit.libreoffice.org/29443 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 0e59a38..7cddb80 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -297,6 +297,7 @@ void AnnotationWindow::dispose() mpMeta.disposeAndClear(); delete mpOutlinerView; delete mpOutliner; +mpOutliner = nullptr; mpVScrollbar.disposeAndClear(); mpTextWindow.disposeAndClear(); FloatingWindow::dispose(); @@ -614,6 +615,9 @@ void AnnotationWindow::Deactivate() if (mrManager.getPopupMenuActive()) return; +if (!mpOutliner) //in dispose +return; + Reference< XAnnotation > xAnnotation( mxAnnotation ); // write changed text back to annotation ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/unoidl/UnoDocumentSettings.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 85bd2c1145e23b67aafdfcc9c2ca8d720194fe97 Author: Noel GrandinDate: Mon Oct 3 10:07:41 2016 +0200 fix bug in DocumentSettings::LoadList when testing result of lastIndexOf managed to trigger it in a flat ODF test document of mine. I suspect that this might have something to do with one of the various conversions to OUString, the old String APIs might have returned -LARGE_INTEGER instead of -1. code was introduced in commit cbcfda9b2079ea4ef83b2a42828408b5f70f7692 Author: Michael Meeks Date: Mon Sep 5 17:22:24 2011 +0100 add XPropertyList enum, factory, and associated cleanup Change-Id: I39b4715cc12ef6366fe0466786589ef198602a98 Reviewed-on: https://gerrit.libreoffice.org/29473 Tested-by: Jenkins Reviewed-by: Michael Meeks (cherry picked from commit 9f0096d934fcdec6cd55e32a15fd438f628f894b) Reviewed-on: https://gerrit.libreoffice.org/29480 Reviewed-by: Noel Grandin diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index ec108a3..dd9f494 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -233,7 +233,7 @@ bool DocumentSettings::LoadList( XPropertyListType t, const OUString , sal_Int32 nSlash = rInPath.lastIndexOf('/'); OUString aPath, aName; -if (nSlash < -1) +if (nSlash < 0) aName = rInPath; else { aName = rInPath.copy( nSlash + 1 ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/core/drawdoc3.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit f94c217c29cdd347b56314a51cbbf795ec6517be Author: Caolán McNamaraDate: Mon Sep 19 12:24:02 2016 +0100 Related: rhbz#1353069 don't clear XATTR_FILL* from stylesheet if... This is similar to de4908eb4d2f1f2ce38a37eea18a9efc4a0073b1 where the master page is not the sole owner. Which happens when copying and pasting slides which bring along a duplicate master page to an already existing one, and the attempt to remove the duplicate strips the fill properties from the shared stylesheet in use by the other regression from... commit b876bbe2cacce8af379b10d82da6c7e7d229b361 Author: David Tardon Date: Tue Apr 26 09:17:11 2016 +0200 rbhz#1326602 avoid exp. bg bitmaps from deleted slides Change-Id: I0a3a34ade2ad8464b1edb67a6e28dab45c761a2c (cherry picked from commit 914d72ee1edb351e4975a516240a38696f619217) Reviewed-on: https://gerrit.libreoffice.org/29019 Tested-by: Jenkins Reviewed-by: David Tardon diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 4a77b7c..9bef42e 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -1241,6 +1241,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl { // Do not delete master pages that have their precious flag set bool bDeleteMaster = !pMaster->IsPrecious(); +bool bSoleOwnerOfStyleSheet = true; OUString aLayoutName = pMaster->GetLayoutName(); if(bOnlyDuplicatePages ) @@ -1255,6 +1256,10 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl { // duplicate page found -> remove it bDeleteMaster = true; + +const SfxStyleSheet* pRefSheet = pMaster->getSdrPageProperties().GetStyleSheet(); +const SfxStyleSheet* pTestSheet = pMPg->getSdrPageProperties().GetStyleSheet(); +bSoleOwnerOfStyleSheet = pRefSheet != pTestSheet; } } } @@ -1288,7 +1293,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl delete pNotesMaster; if( bUndo ) - AddUndo(GetSdrUndoFactory().CreateUndoDeletePage(*pMaster)); +AddUndo(GetSdrUndoFactory().CreateUndoDeletePage(*pMaster, bSoleOwnerOfStyleSheet)); RemoveMasterPage( pMaster->GetPageNum() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/func/futext.cxx | 15 +++ 1 file changed, 15 insertions(+) New commits: commit 970750df0ddf272f5b22555834e579d56313e579 Author: Caolán McNamaraDate: Mon Sep 19 21:21:58 2016 +0100 Resolves: tdf#102293 triple click results in visually unselected word in previously unselected textboxes in impress started happening after... commit 16c7f8916661df24f4681ec82f6bd4d7ad85d141 Date: Tue Jan 12 16:36:49 2016 + tdf#97075 - don't render sdr overlays before we paint in impress instead flush the overlay after activating the edit object if we go on to put the cursor in there. Seems to work. Change-Id: Ib746c36d1074aee09771a3dc1d69834ce80a9c08 (cherry picked from commit 38a61ddaf63768ebe19c92d561eac6f50d67ded7) Reviewed-on: https://gerrit.libreoffice.org/29040 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index c55ddfa..b2af1c8 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -21,6 +21,8 @@ #include #include #include +#include +#include #include #include #include @@ -1064,6 +1066,19 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag) if (mpView->SdrBeginTextEdit(pTextObj, pPV, mpWindow, true, pOutl) && mxTextObj->GetObjInventor() == SdrInventor) { +//tdf#102293 flush overlay before going on to pass clicks down to +//the outline view which will want to paint selections +for (sal_uInt32 b = 0; b < pPV->PageWindowCount(); ++b) +{ +const SdrPageWindow& rPageWindow = *pPV->GetPageWindow(b); +if (!rPageWindow.GetPaintWindow().OutputToWindow()) +continue; +rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager(); +if (!xManager.is()) +continue; +xManager->flush(); +} + bFirstObjCreated = true; DeleteDefaultText(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/func/fuchar.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7b56e04b296d112d13f60a80c4ddf1783eed26ba Author: Michael StahlDate: Wed Aug 31 14:45:17 2016 +0200 sd: fix un-sorted SidArray in FuChar::DoExecute() Triggers an assert in SfxBindings::Invalidate(). (regression from ecc7308efa973fd1f1985ff9a0a0f01414b73f2b) Change-Id: Ida5b6c006ef6b8a839962c4f09c8341eee980270 (cherry picked from commit 52bac50deb628cb21c88d5dcab032d4980bb8974) Reviewed-on: https://gerrit.libreoffice.org/28550 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx index 0fbd9dd..cd02f20 100644 --- a/sd/source/ui/func/fuchar.cxx +++ b/sd/source/ui/func/fuchar.cxx @@ -143,11 +143,11 @@ void FuChar::DoExecute( SfxRequest& rReq ) SID_ATTR_CHAR_UNDERLINE, SID_ATTR_CHAR_FONTHEIGHT, SID_ATTR_CHAR_COLOR, -SID_ATTR_CHAR_BACK_COLOR, SID_ATTR_CHAR_KERNING, SID_ATTR_CHAR_CASEMAP, SID_SET_SUPER_SCRIPT, SID_SET_SUB_SCRIPT, +SID_ATTR_CHAR_BACK_COLOR, 0 }; mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/framework/tools/FrameworkHelper.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 748b60a2c7e164a0ffe66270ad4b913f1c2f2924 Author: Stephan BergmannDate: Mon Jul 11 14:04:18 2016 +0200 WaE: C4100: 'pHelper' : unreferenced formal parameter (loplugin:staticcall) (cherry picked from commit 3849758adc0592327568ff465ccf255786632b4b) Change-Id: I800eef0517f063ff7e08a95de9da268fb0e9d621 Reviewed-on: https://gerrit.libreoffice.org/27618 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx index 15740f0..ed1308f 100644 --- a/sd/source/ui/framework/tools/FrameworkHelper.cxx +++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx @@ -521,12 +521,12 @@ OUString FrameworkHelper::GetViewURL (ViewShell::ShellType eType) namespace { -void updateEditMode(const Reference , FrameworkHelper* const pHelper, const EditMode eEMode, bool updateFrameView) +void updateEditMode(const Reference , const EditMode eEMode, bool updateFrameView) { // Ensure we have the expected edit mode // The check is only for DrawViewShell as OutlineViewShell // and SlideSorterViewShell have no master mode -const ::std::shared_ptr pCenterViewShell (pHelper->GetViewShell(xView)); +const ::std::shared_ptr pCenterViewShell (FrameworkHelper::GetViewShell(xView)); DrawViewShell* pDrawViewShell = dynamic_cast (pCenterViewShell.get()); if (pDrawViewShell != nullptr) @@ -548,7 +548,7 @@ void asyncUpdateEditMode(FrameworkHelper* const pHelper, const EditMode eEMode) Reference xPaneId ( FrameworkHelper::CreateResourceId(framework::FrameworkHelper::msCenterPaneURL)); Reference xView (pHelper->GetView(xPaneId)); -updateEditMode(xView, pHelper, eEMode, true); +updateEditMode(xView, eEMode, true); } } @@ -637,7 +637,7 @@ void FrameworkHelper::HandleModeChangeSlot ( } else { -updateEditMode(xView, this, eEMode, false); +updateEditMode(xView, eEMode, false); } } catch (RuntimeException&) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/func/fupage.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 7f54aa12797d0c2d6dc5c35b3c11a9c37c744edc Author: Caolán McNamaraDate: Sun Jul 24 17:50:23 2016 +0100 Resolves: tdf#101076 drag-create creates an unfilled shape... after using the slide properties->background->all slides This SetAttributes with nothing selected will end up setting the default object properties. Here I think we are setting the bg color to the master, and then unsetting the bg color of the slides to none so the master color shows through. So the additional SetAttributes call unsets the bg of the default object style Change-Id: I5cfd74eef5637b87d2a8778d4b8c8a0cbc0960db Reviewed-on: https://gerrit.libreoffice.org/27487 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 60ab08c6c5c4b5730c1cb54eca5558be214e8925) Reviewed-on: https://gerrit.libreoffice.org/27505 Reviewed-by: Miklos Vajna diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx index 11f371e..bcbca0a 100644 --- a/sd/source/ui/func/fupage.cxx +++ b/sd/source/ui/func/fupage.cxx @@ -152,7 +152,6 @@ void FuPage::DoExecute( SfxRequest& ) if( mpArgs ) { ApplyItemSet( mpArgs ); -mpView->SetAttributes( *mpArgs ); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/func/fuinsert.cxx | 17 ++--- sd/source/ui/inc/fuinsert.hxx |9 +++-- sd/source/ui/view/drviews2.cxx |3 ++- 3 files changed, 19 insertions(+), 10 deletions(-) New commits: commit 7524dd59efc9b685548caf7967b24f7758796078 Author: Samuel MehrbrodtDate: Tue Jul 5 12:05:28 2016 + tdf#73742 Don't replace existing image when inserting one If we want to replace an image, we have an entry in the context menu for that. Change-Id: I7a5326fecb72896c0709c9272769b8d51e4a5ca2 Reviewed-on: https://gerrit.libreoffice.org/26947 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt (cherry picked from commit fd6655080e181de4b78e31f13fe8ba35de8edfe5) Reviewed-on: https://gerrit.libreoffice.org/26966 Reviewed-by: Eike Rathke diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index 63410aa..a26a6b1 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -98,14 +98,17 @@ FuInsertGraphic::FuInsertGraphic ( ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, -SfxRequest& rReq) -: FuPoor(pViewSh, pWin, pView, pDoc, rReq) +SfxRequest& rReq, +bool replaceExistingImage) +: FuPoor(pViewSh, pWin, pView, pDoc, rReq), + mbReplaceExistingImage(replaceExistingImage) { } -rtl::Reference FuInsertGraphic::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ) +rtl::Reference FuInsertGraphic::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, +SdDrawDocument* pDoc, SfxRequest& rReq, bool replaceExistingImage ) { -rtl::Reference xFunc( new FuInsertGraphic( pViewSh, pWin, pView, pDoc, rReq ) ); +rtl::Reference xFunc( new FuInsertGraphic( pViewSh, pWin, pView, pDoc, rReq, replaceExistingImage ) ); xFunc->DoExecute(rReq); return xFunc; } @@ -153,14 +156,14 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq ) if( mpViewShell && dynamic_cast< DrawViewShell *>( mpViewShell ) != nullptr) { sal_Int8nAction = DND_ACTION_COPY; -SdrObject* pPickObj; +SdrObject* pPickObj = mpView->GetEmptyPresentationObject( PRESOBJ_GRAPHIC ); bool bSelectionReplaced(false); -if( ( pPickObj = mpView->GetSelectedSingleObject( mpView->GetPage() ) ) || ( pPickObj = mpView->GetEmptyPresentationObject( PRESOBJ_GRAPHIC ) ) ) +if( pPickObj ) { nAction = DND_ACTION_LINK; } -else if(1 == mpView->GetMarkedObjectCount()) +else if(mbReplaceExistingImage && mpView->GetMarkedObjectCount() == 1) { pPickObj = mpView->GetMarkedObjectByIndex(0); nAction = DND_ACTION_MOVE; diff --git a/sd/source/ui/inc/fuinsert.hxx b/sd/source/ui/inc/fuinsert.hxx index 74e251a..2a946e8 100644 --- a/sd/source/ui/inc/fuinsert.hxx +++ b/sd/source/ui/inc/fuinsert.hxx @@ -30,7 +30,9 @@ class FuInsertGraphic { public: -static rtl::Reference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ); +static rtl::Reference Create( ViewShell* pViewSh, ::sd::Window* pWin, + ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq, + bool replaceExistingImage); virtual void DoExecute( SfxRequest& rReq ) override; private: @@ -40,7 +42,10 @@ private: ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, -SfxRequest& rReq); +SfxRequest& rReq, +bool replaceExistingImage); + +bool mbReplaceExistingImage; }; // diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 6a88b01..8d4ebec 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -1114,7 +1114,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) case SID_CHANGE_PICTURE: case SID_INSERT_GRAPHIC: { -SetCurrentFunction( FuInsertGraphic::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) ); +SetCurrentFunction( FuInsertGraphic::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq, + nSId == SID_CHANGE_PICTURE ) ); Cancel(); rReq.Ignore (); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/framework/tools/FrameworkHelper.cxx | 57 --- 1 file changed, 40 insertions(+), 17 deletions(-) New commits: commit 8c319b414ed7b4f9a67077f4b1497dc8975536bc Author: David TardonDate: Mon Jul 11 11:59:41 2016 +0200 rhbz#1351292 correctly set edit mode ... when switching between different shells, e.g., from Outline to Slide master. Change-Id: I22ef6f6cac73c52fb1bedd97e653b4b57c5a7a24 (cherry picked from commit b0535f3944975c1f6cdadc149d70502843331f86) Reviewed-on: https://gerrit.libreoffice.org/27108 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx index 6b08f37..15740f0 100644 --- a/sd/source/ui/framework/tools/FrameworkHelper.cxx +++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx @@ -518,6 +518,41 @@ OUString FrameworkHelper::GetViewURL (ViewShell::ShellType eType) } } +namespace +{ + +void updateEditMode(const Reference , FrameworkHelper* const pHelper, const EditMode eEMode, bool updateFrameView) +{ +// Ensure we have the expected edit mode +// The check is only for DrawViewShell as OutlineViewShell +// and SlideSorterViewShell have no master mode +const ::std::shared_ptr pCenterViewShell (pHelper->GetViewShell(xView)); +DrawViewShell* pDrawViewShell += dynamic_cast (pCenterViewShell.get()); +if (pDrawViewShell != nullptr) +{ +pCenterViewShell->Broadcast ( +ViewShellHint(ViewShellHint::HINT_CHANGE_EDIT_MODE_START)); + +pDrawViewShell->ChangeEditMode(eEMode, pDrawViewShell->IsLayerModeActive()); +if (updateFrameView) +pDrawViewShell->WriteFrameViewData(); + +pCenterViewShell->Broadcast ( +ViewShellHint(ViewShellHint::HINT_CHANGE_EDIT_MODE_END)); +} +} + +void asyncUpdateEditMode(FrameworkHelper* const pHelper, const EditMode eEMode) +{ +Reference xPaneId ( + FrameworkHelper::CreateResourceId(framework::FrameworkHelper::msCenterPaneURL)); +Reference xView (pHelper->GetView(xPaneId)); +updateEditMode(xView, pHelper, eEMode, true); +} + +} + void FrameworkHelper::HandleModeChangeSlot ( sal_uLong nSlotId, SfxRequest& rRequest) @@ -552,7 +587,6 @@ void FrameworkHelper::HandleModeChangeSlot ( Reference xPaneId ( CreateResourceId(framework::FrameworkHelper::msCenterPaneURL)); Reference xView (GetView(xPaneId)); -::std::shared_ptr pCenterViewShell (GetViewShell(xView)); // Compute requested view OUString sRequestedView; @@ -595,26 +629,15 @@ void FrameworkHelper::HandleModeChangeSlot ( if (!(xView.is() && xView->getResourceId()->getResourceURL().equals(sRequestedView))) { +const auto xId = CreateResourceId(sRequestedView, msCenterPaneURL); mxConfigurationController->requestResourceActivation( -CreateResourceId(sRequestedView, msCenterPaneURL), +xId, ResourceActivationMode_REPLACE); +RunOnResourceActivation(xId, std::bind(, this, eEMode)); } - -// Ensure we have the expected edit mode -// The check is only for DrawViewShell as OutlineViewShell -// and SlideSorterViewShell have no master mode -DrawViewShell* pDrawViewShell -= dynamic_cast (pCenterViewShell.get()); -if (pDrawViewShell != nullptr) +else { -pCenterViewShell->Broadcast ( -ViewShellHint(ViewShellHint::HINT_CHANGE_EDIT_MODE_START)); - -pDrawViewShell->ChangeEditMode ( -eEMode, pDrawViewShell->IsLayerModeActive()); - -pCenterViewShell->Broadcast ( -ViewShellHint(ViewShellHint::HINT_CHANGE_EDIT_MODE_END)); +updateEditMode(xView, this, eEMode, false); } } catch (RuntimeException&) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/sidebar/SlideBackground.cxx | 37 +-- 1 file changed, 30 insertions(+), 7 deletions(-) New commits: commit 343f12ca3fdb3503995619a3caa1b15f77c04baa Author: Katarina BehrensDate: Tue Jun 14 22:54:37 2016 +0200 tdf#100209: Master slide of master slide makes no sense so just disable the controls when in master view Change-Id: I9551cc5c0d123e58555d248b78859c1f77de6690 Reviewed-on: https://gerrit.libreoffice.org/26276 Tested-by: Jenkins Reviewed-by: Katarina Behrens (cherry picked from commit 9e28a809d3e9fcd69b07933d698e1e166867b5c8) diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index 9c3274e..ff5f84c 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -22,6 +22,7 @@ #include "TransitionPreset.hxx" #include "sdresid.hxx" #include "ViewShellBase.hxx" +#include "FrameView.hxx" #include "DrawDocShell.hxx" #include "SlideSorterViewShell.hxx" #include "drawdoc.hxx" @@ -163,7 +164,6 @@ void SlideBackground::Initialize() mpPaperSizeBox->SetSelectHdl(LINK(this,SlideBackground,PaperSizeModifyHdl)); mpPaperOrientation->SetSelectHdl(LINK(this,SlideBackground,PaperSizeModifyHdl)); -populateMasterSlideDropdown(); meUnit = maPaperSizeController.GetCoreMetric(); @@ -174,13 +174,21 @@ void SlideBackground::Initialize() mpFillGrad->SetSelectHdl(LINK(this, SlideBackground, FillColorHdl)); mpFillAttr->SetSelectHdl(LINK(this, SlideBackground, FillBackgroundHdl)); -if (ViewShell* pMainViewShell = mrBase.GetMainViewShell().get()) +ViewShell* pMainViewShell = mrBase.GetMainViewShell().get(); +if (pMainViewShell) { -DrawViewShell* pDrawViewShell = static_cast (pMainViewShell); -SdPage* mpPage = pDrawViewShell->getCurrentPage(); -OUString aLayoutName( mpPage->GetLayoutName() ); -aLayoutName = aLayoutName.copy(0,aLayoutName.indexOf(SD_LT_SEPARATOR)); -mpMasterSlide->SelectEntry(aLayoutName); +FrameView *pFrameView = pMainViewShell->GetFrameView(); + +if ( pFrameView->GetViewShEditMode() == EM_PAGE ) +{ +DrawViewShell* pDrawViewShell = static_cast (pMainViewShell); +SdPage* mpPage = pDrawViewShell->getCurrentPage(); +populateMasterSlideDropdown(); + +OUString aLayoutName( mpPage->GetLayoutName() ); +aLayoutName = aLayoutName.copy(0,aLayoutName.indexOf(SD_LT_SEPARATOR)); +mpMasterSlide->SelectEntry(aLayoutName); +} } mpFillStyle->SelectEntryPos(0); @@ -296,6 +304,7 @@ void SlideBackground::addListener() mrBase.GetEventMultiplexer()->AddEventListener ( aLink, tools::EventMultiplexerEvent::EID_CURRENT_PAGE | +tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED | tools::EventMultiplexerEvent::EID_SHAPE_CHANGED ); } @@ -315,6 +324,20 @@ IMPL_LINK_TYPED(SlideBackground, EventMultiplexerListener, case tools::EventMultiplexerEvent::EID_SHAPE_CHANGED: populateMasterSlideDropdown(); break; +case tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED: +{ +ViewShell* pMainViewShell = mrBase.GetMainViewShell().get(); + +if (pMainViewShell) +{ +DrawViewShell* pDrawViewShell = static_cast (pMainViewShell); +EditMode eMode = pDrawViewShell->GetEditMode(); + +if ( eMode == EM_MASTERPAGE) +mpMasterSlide->Disable(); +} +} +break; case tools::EventMultiplexerEvent::EID_CURRENT_PAGE: { static sal_uInt16 SidArray[] = { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/sidebar/SlideBackground.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 0a19e85f0c34c85f18cc9d5ade9a5ad41ed6750b Author: Markus MohrhardDate: Wed Jun 15 23:34:33 2016 +0200 SfxObjectShell::Current may return nullptr See http://crashreport.libreoffice.org/stats/crash_details/caa7efba-fbe8-4c58-966d-c4bc356b5a63 Change-Id: Idc8b3a2e482a5423080735f46f50d415835f747d Reviewed-on: https://gerrit.libreoffice.org/26343 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index fd728d6..9c3274e 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -195,6 +195,9 @@ void SlideBackground::Update() { const drawing::FillStyle eXFS = (drawing::FillStyle)mpFillStyle->GetSelectEntryPos(); SfxObjectShell* pSh = SfxObjectShell::Current(); +if (!pSh) +return; + switch(eXFS) { case drawing::FillStyle_NONE: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/view/drviews2.cxx |9 + 1 file changed, 9 insertions(+) New commits: commit b523e20a8fb8c9c26e7ffdc1b3f5fd06c440985c Author: Caolán McNamaraDate: Fri Jun 10 13:25:43 2016 +0100 If we set TextFitToSize we have to unset TextAutoGrow[Height|Width] e.g. like ImpSetAttributesFitToSize and ImpSetAttributesFitToSizeVertical do otherwise you can right click on an outline->text change the value from its default of "fit to frame" to "fit to width" ok, then use rightclick->autofit to toggle "fit to frame" on and now revisit outline->text and all three are set and none can be toggled off Change-Id: I48e2f364679e055ac776f1e7c5a04efaa2b6d0d2 (cherry picked from commit 8f04f1a1093f0cab56b9cd3872f7667011f9fcf4) diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index bbfe30b..6a88b01 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -219,6 +219,15 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) mpDrawView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj)); +if (!bSet) +{ +//If we are turning on AutoFit we have to turn these off if already on +if (static_cast(pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_AUTOGROWHEIGHT))->GetValue()) + pObj->SetMergedItem(makeSdrTextAutoGrowHeightItem(false)); +if (static_cast(pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_AUTOGROWWIDTH))->GetValue()) + pObj->SetMergedItem(makeSdrTextAutoGrowWidthItem(false)); +} + pObj->SetMergedItem(SdrTextFitToSizeTypeItem(bSet ? SDRTEXTFIT_NONE : SDRTEXTFIT_AUTOFIT)); mpDrawView->EndUndo(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/sidebar/SlideBackground.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit db5498031c033bef32ba0714279db9ecfb7b860a Author: Caolán McNamaraDate: Thu Jun 2 14:11:30 2016 +0100 Resolves: tdf#100191 crash: switch to Display Mode: Notes via toolbar Change-Id: I65f5f68433940fa0b50ad951fbb96085178a42d9 (cherry picked from commit e5d8dc12fcf64fbbefadefbe863c772dc9134d38) diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index 2a616f5..f6c7d89 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -350,7 +350,8 @@ void SlideBackground::populateMasterSlideDropdown() void SlideBackground::updateMasterSlideSelection() { -SdPage* pPage = mrBase.GetMainViewShell().get()->getCurrentPage(); +ViewShell* pMainViewShell = mrBase.GetMainViewShell().get(); +SdPage* pPage = pMainViewShell ? pMainViewShell->getCurrentPage() : nullptr; if (pPage != nullptr && pPage->TRG_HasMasterPage()) { SdrPage& rMasterPage (pPage->TRG_GetMasterPage()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sd/source
sd/source/ui/docshell/docshel4.cxx | 18 ++ 1 file changed, 18 insertions(+) New commits: commit 940880a6822bc688193a5a667f5d2104ed477906 Author: Justin LuthDate: 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 Reviewed-by: Thorsten Behrens (cherry picked from commit c36b560c8d7acf5259d2a8f97317f303667140a3) Reviewed-on: https://gerrit.libreoffice.org/25761 Reviewed-by: Justin Luth 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() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits