[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2018-04-06 Thread Julien Nabet
 sd/source/ui/animations/SlideTransitionPane.cxx |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit fce0f5823bbd6297f3455a2a36e4a66c423db9b9
Author: Julien Nabet 
Date:   Thu Apr 5 21:45:20 2018 +0200

tdf#115407: preselect sound file saved

To display the sound in the dropbox, the complete filename
(eg: 
file:///home/julien/lo/libreoffice/instdir/share/gallery/sounds/pluck.wav)
was compared with items of the sound list formed like this:

file:///home/julien/lo/libreoffice/instdir/program/../share/gallery/sounds/pluck.wav

See https://bugs.documentfoundation.org/show_bug.cgi?id=115407#c1

Since listbox displays only basename, let's just compare basenames

Change-Id: I5fb49990322423fa7818e5d6e1cafd828e3500ec
Reviewed-on: https://gerrit.libreoffice.org/52476
(cherry picked from commit 23c82e1a377ea6fce65d71277ec59b3ca150b98a)
Reviewed-on: https://gerrit.libreoffice.org/52490
Reviewed-by: Noel Grandin 
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx 
b/sd/source/ui/animations/SlideTransitionPane.cxx
index c6aef5197813..8cce78ffc5bb 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -270,10 +270,11 @@ struct lcl_EqualsSoundFileName : public 
::std::unary_function< OUString, bool >
 {
 // note: formerly this was a case insensitive search for all
 // platforms. It seems more sensible to do this platform-dependent
+INetURLObject aURL(rStr);
 #if defined(_WIN32)
-return maStr.equalsIgnoreAsciiCase( rStr );
+return maStr.equalsIgnoreAsciiCase( aURL.GetBase() );
 #else
-return maStr == rStr;
+return maStr == aURL.GetBase();
 #endif
 }
 
@@ -286,9 +287,10 @@ bool lcl_findSoundInList( const ::std::vector< OUString > 
& rSoundList,
   const OUString & rFileName,
   ::std::vector< OUString >::size_type & rOutPosition )
 {
+INetURLObject aURL(rFileName);
 ::std::vector< OUString >::const_iterator aIt =
   ::std::find_if( rSoundList.begin(), rSoundList.end(),
-  lcl_EqualsSoundFileName( rFileName ));
+  lcl_EqualsSoundFileName( aURL.GetBase()));
 if( aIt != rSoundList.end())
 {
 rOutPosition = ::std::distance( rSoundList.begin(), aIt );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2018-04-05 Thread Caolán McNamara
 sd/source/ui/dlg/PhotoAlbumDialog.cxx |   76 +++---
 1 file changed, 62 insertions(+), 14 deletions(-)

New commits:
commit 92a0181d96a43a7a0449f400d38299097e864617
Author: Caolán McNamara 
Date:   Sun Mar 25 17:16:36 2018 +0100

tdf#116544 crash on unhandled IllegalArgument exception

Change-Id: I290ba6097d6d91bf4677e7e92c896bd6359cbc49
Reviewed-on: https://gerrit.libreoffice.org/51835
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx 
b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index ffc73486e2c3..6d117be7fc79 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -180,9 +180,16 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, 
void)
 aPicPos.Y = (aPageSize.Height - aPicSize.Height)/2;
 
 xShape->setPosition(aPicPos);
-xSlide->add(xShape);
-if(bCreateCaptions)
-createCaption( aPageSize );
+try
+{
+xSlide->add(xShape);
+if (bCreateCaptions)
+createCaption( aPageSize );
+}
+catch (const css::uno::Exception& exc)
+{
+SAL_WARN( "sd", exc.Message );
+}
 }
 }
 else if( nOpt == TWO_IMAGES )
@@ -249,7 +256,14 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, 
void)
 aPicPos.Y = aPageSize.Height/2 - aPicSize.Height/2;
 
 xShape->setPosition(aPicPos);
-xSlide->add(xShape);
+try
+{
+xSlide->add(xShape);
+}
+catch (const css::uno::Exception& exc)
+{
+SAL_WARN( "sd", exc.Message );
+}
 }
 
 if( !sUrl2.isEmpty() )
@@ -287,10 +301,17 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, 
void)
 aPicPos.Y = aPageSize.Height/2 - aPicSize.Height/2;
 
 xShape->setPosition(aPicPos);
-xSlide->add(xShape);
-if(bCreateCaptions)
-createCaption( aPageSize );
 
+try
+{
+xSlide->add(xShape);
+if(bCreateCaptions)
+createCaption( aPageSize );
+}
+catch (const css::uno::Exception& exc)
+{
+SAL_WARN( "sd", exc.Message );
+}
 }
 }
 }
@@ -370,7 +391,14 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, 
void)
 aPicPos.Y = aPageSize.Height/4 - aPicSize.Height/2;
 
 xShape->setPosition(aPicPos);
-xSlide->add(xShape);
+try
+{
+xSlide->add(xShape);
+}
+catch (const css::uno::Exception& exc)
+{
+SAL_WARN( "sd", exc.Message );
+}
 }
 if( !sUrl2.isEmpty() )
 {
@@ -407,7 +435,14 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, 
void)
 aPicPos.Y = aPageSize.Height/4 - aPicSize.Height/2;
 
 xShape->setPosition(aPicPos);
-xSlide->add(xShape);
+try
+{
+xSlide->add(xShape);
+}
+catch (const css::uno::Exception& exc)
+{
+SAL_WARN( "sd", exc.Message );
+}
 }
 if( !sUrl3.isEmpty() )
 {
@@ -444,7 +479,14 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, 
void)
 aPicPos.Y = aPageSize.Height/4 - aPicSize.Height/2 + 
aPageSize.Height/2;
 
 xShape->setPosition(aPicPos);
-xSlide->add(xShape);
+try
+{
+xSlide->add(xShape);
+}
+catch (const css::uno::Exception& exc)
+{
+SAL_WARN( "sd", exc.Message );
+}
 }
 if( !sUrl4.isEmpty() )
 {
@@ -481,10 +523,16 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl, Button*, 
void)
 aPicPos.Y = aPageSize.Height/4 - aPicSize.Height/2 + 
aPageSize.Height/2;
 
 xShape->setPosition(aPicPos);
-

[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2018-03-21 Thread Xisco Fauli
 sd/source/ui/view/drviewse.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 2d8d36713790584b4ab7f5c94179bad05754b2ec
Author: Xisco Fauli 
Date:   Wed Mar 14 10:19:47 2018 +0100

tdf#115539, tdf#116238: Don't display the notebookbar in presentation mode

Change-Id: Ifc64d9a3b5c93b83fa238737375e7a58b2ae86db
Reviewed-on: https://gerrit.libreoffice.org/51262
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 6a9326803c01f4c9bc7da855053ce4e80646fad8)
Reviewed-on: https://gerrit.libreoffice.org/51295
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 54b3628826cc..52a244635ddb 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -720,12 +720,8 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
 case SID_PRESENTATION_CURRENT_SLIDE:
 case SID_REHEARSE_TIMINGS:
 {
-sfx2::SfxNotebookBar::LockNotebookBar();
-
 slideshowhelp::ShowSlideShow(rReq, *GetDoc());
 rReq.Ignore ();
-
-sfx2::SfxNotebookBar::UnlockNotebookBar();
 }
 break;
 
@@ -1582,6 +1578,7 @@ namespace slideshowhelp
 Reference< XPresentation2 > xPresentation( rDoc.getPresentation() );
 if( xPresentation.is() )
 {
+sfx2::SfxNotebookBar::LockNotebookBar();
 if (SID_REHEARSE_TIMINGS == rReq.GetSlot())
 xPresentation->rehearseTimings();
 else if (rDoc.getPresentationSettings().mbCustomShow)
@@ -1611,6 +1608,7 @@ namespace slideshowhelp
 
 xPresentation->startWithArguments( aArguments );
 }
+sfx2::SfxNotebookBar::UnlockNotebookBar();
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2018-02-27 Thread Rostislav Kondratenko
 sd/source/ui/remotecontrol/BluetoothServer.cxx |9 +++--
 sd/source/ui/remotecontrol/Server.cxx  |2 +-
 2 files changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 424eb9e4282596818ed39943b9d4a64cb6888eef
Author: Rostislav Kondratenko 
Date:   Wed Feb 21 17:27:00 2018 +0300

tdf#97614 Fixing initialization code for Bluetooth and IP Server for 
Impress.

Change-Id: Icc385fb760b8a5ff337f58dc95ba3c3f86805eaa
Reviewed-on: https://gerrit.libreoffice.org/50108
Reviewed-by: Michael Stahl 
Tested-by: Jenkins 
(cherry picked from commit fb5f13671c50f7f84d654a779bc0ff07e31ce95e)
Reviewed-on: https://gerrit.libreoffice.org/50414

diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx 
b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index bf68261e95e1..e42fc31c96b1 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -1336,16 +1336,14 @@ void SAL_CALL BluetoothServer::run()
 return;
 }
 
-SOCKADDR aName;
+SOCKADDR_BTH aName;
 int aNameSize = sizeof(aName);
-getsockname( aSocket, ,  ); // Retrieve the local address 
and port
+getsockname( aSocket, reinterpret_cast(),  ); 
// Retrieve the local address and port
 
 CSADDR_INFO aAddrInfo;
 memset( , 0, sizeof(aAddrInfo) );
-aAddrInfo.LocalAddr.lpSockaddr = 
+aAddrInfo.LocalAddr.lpSockaddr = reinterpret_cast();
 aAddrInfo.LocalAddr.iSockaddrLength = sizeof( SOCKADDR_BTH );
-aAddrInfo.RemoteAddr.lpSockaddr = 
-aAddrInfo.RemoteAddr.iSockaddrLength = sizeof( SOCKADDR_BTH );
 aAddrInfo.iSocketType = SOCK_STREAM;
 aAddrInfo.iProtocol = BTHPROTO_RFCOMM;
 
@@ -1369,7 +1367,6 @@ void SAL_CALL BluetoothServer::run()
 aRecord.dwNameSpace = NS_BTH;
 aRecord.dwNumberOfCsAddrs = 1;
 aRecord.lpcsaBuffer = 
-
 if (WSASetServiceW( , RNRSERVICE_REGISTER, 0 ) == SOCKET_ERROR)
 {
 closesocket( aSocket );
diff --git a/sd/source/ui/remotecontrol/Server.cxx 
b/sd/source/ui/remotecontrol/Server.cxx
index 6d51a4e0d4a5..d653b0a380d6 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -83,7 +83,7 @@ void RemoteServer::execute()
 spServer = nullptr;
 return;
 }
-osl::SocketAddr aAddr( "0", PORT );
+osl::SocketAddr aAddr( "0.0.0.0", PORT );
 if ( !mSocket.bind( aAddr ) )
 {
 SAL_WARN( "sdremote", "bind failed" << mSocket.getErrorAsString() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source svx/source

2017-12-21 Thread Mark Hung
 sd/source/ui/func/fuediglu.cxx |2 +-
 svx/source/svdraw/svddrgv.cxx  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6442a8976b4accb53acb902834171ab5f1802d2a
Author: Mark Hung 
Date:   Fri Dec 15 00:13:49 2017 +0800

tdf113594: marking gluepoints immediately.

pPV was for the parameter of MarkGluePoint that was removed
in ec38966951f2, and was kept somehow and is converted
to bool here.  Just replace the default boolean value to false
( that means marking instead of unmarking. )

Change-Id: I4c4b9dd368537b7b90cc4effae482a7b8a41eec9
Reviewed-on: https://gerrit.libreoffice.org/46472
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 
(cherry picked from commit bf151f0716910b56e3538579f4af7ede8f51bbcf)
Reviewed-on: https://gerrit.libreoffice.org/46497
(cherry picked from commit 715d0f32eb36593a4c9e52763b2ceb17ec1283c5)
Reviewed-on: https://gerrit.libreoffice.org/46913
Reviewed-by: Aron Budea 

diff --git a/sd/source/ui/func/fuediglu.cxx b/sd/source/ui/func/fuediglu.cxx
index bdb72cc6..daa4a6740ecc 100644
--- a/sd/source/ui/func/fuediglu.cxx
+++ b/sd/source/ui/func/fuediglu.cxx
@@ -141,7 +141,7 @@ bool FuEditGluePoints::MouseButtonDown(const MouseEvent& 
rMEvt)
 if (!rMEvt.IsShift())
 mpView->UnmarkAllGluePoints();
 
-mpView->MarkGluePoint(aVEvt.pObj, aVEvt.nGlueId, aVEvt.pPV);
+mpView->MarkGluePoint(aVEvt.pObj, aVEvt.nGlueId, false);
 SdrHdl* pHdl = mpView->GetGluePointHdl(aVEvt.pObj, aVEvt.nGlueId);
 
 if (pHdl)
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index 2c4d78762e03..6b7a224ae27f 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -752,7 +752,7 @@ bool SdrDragView::BegInsGluePoint(const Point& rPnt)
 rGP.SetAbsolutePos(rPnt,*pObj);
 
 SdrHdl* pHdl=nullptr;
-if (MarkGluePoint(pObj,nGlueId,pPV))
+if (MarkGluePoint(pObj,nGlueId,false))
 {
 pHdl=GetGluePointHdl(pObj,nGlueId);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-11-30 Thread Michael Stahl
 sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d2d4e0b7ceaa3f635fa0caf2fb549afc530ca4e2
Author: Michael Stahl 
Date:   Mon Oct 16 21:20:57 2017 +0200

sd: BestFittingCacheComparer must be irreflexive

/usr/include/c++/7/bits/stl_algo.h:4866:
Error: comparison doesn't meet irreflexive requirements, assert(!(a < a)).

... when using "Window->New Window" in Impress.

Change-Id: I885a59cf378b7020d549580c2fc1cf121c6a59bd
(cherry picked from commit d4269c5373cf8ccc0a5631b9d0900227e11e13f1)
Reviewed-on: https://gerrit.libreoffice.org/45440
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx 
b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
index 9b7f551e57f0..9cc2ae04ddde 100644
--- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
@@ -89,10 +89,10 @@ public:
 bool operator()(const 
::sd::slidesorter::cache::PageCacheManager::BestFittingPageCaches::value_type& 
rElement1,
 const 
::sd::slidesorter::cache::PageCacheManager::BestFittingPageCaches::value_type& 
rElement2)
 {
-if (rElement1.first == maPreferredSize)
-return true;
-else if (rElement2.first == maPreferredSize)
+if (rElement2.first == maPreferredSize)
 return false;
+else if (rElement1.first == maPreferredSize)
+return true;
 else
 return (rElement1.first.Width()*rElement1.first.Height()
 > rElement2.first.Width()*rElement2.first.Height());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-11-06 Thread Caolán McNamara
 sd/source/ui/slidesorter/controller/SlideSorterController.cxx |   15 +++---
 1 file changed, 5 insertions(+), 10 deletions(-)

New commits:
commit 5b9c9ad69d58d04ae9f29deab894f5a1846cbd63
Author: Caolán McNamara 
Date:   Fri Nov 3 16:24:14 2017 +

Resolves: rtl: tdf#60315 slide pane context menu misplaced

so use same (slighty crazed) logic as DrawViewShell::Command

to get the right place when rtl is enabled

Change-Id: Icb4a39310ab98bd186cbafd516ca5f323da8cce1
Reviewed-on: https://gerrit.libreoffice.org/44275
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx 
b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index dfd07f3de532..a5b2411a9caa 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -356,15 +356,7 @@ bool SlideSorterController::Command (
 pWindow->ReleaseMouse();
 
 Point aMenuLocation (0,0);
-if (rEvent.IsMouseEvent())
-{
-// We have to explicitly specify the location of the menu
-// when the slide sorter is placed in an undocked child
-// menu.  But when it is docked it does not hurt, so we
-// specify the location always.
-aMenuLocation = rEvent.GetMousePosPixel();
-}
-else
+if (!rEvent.IsMouseEvent())
 {
 // The event is not a mouse event.  Use the center of the
 // focused page as top left position of the context menu.
@@ -388,7 +380,10 @@ bool SlideSorterController::Command (
 if (pDispatcher != nullptr)
 {
 mbContextMenuOpen = true;
-pDispatcher->ExecutePopup( aPopupId, pWindow, 
 );
+if (!rEvent.IsMouseEvent())
+pDispatcher->ExecutePopup(aPopupId, pWindow, 
);
+else
+pDispatcher->ExecutePopup(aPopupId);
 mbContextMenuOpen = false;
 mrSlideSorter.GetView().UpdatePageUnderMouse();
 ::rtl::Reference 
pFunction(GetCurrentSelectionFunction());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-10-24 Thread Noel Grandin
 sd/source/filter/eppt/pptx-text.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit ba0909f83e65ec953ba517f09c06053709fbb523
Author: Noel Grandin 
Date:   Tue Oct 24 09:01:24 2017 +0200

tdf#113227 FILESAVE: PPT: bullets disappear after RT

regression from

commit afa675469cd9894f41a6b9eeb2e7acc8245d256c
use SvxExtNumType in SvxNumberType

where I managed to put a "default: break" statement in the wrong place

Change-Id: Ic821a03208a75363c538c4641077b084f1e2d242
Reviewed-on: https://gerrit.libreoffice.org/43737
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 
(cherry picked from commit f99767d532dbe2741cb9cccf26db3547cc5e14df)
Reviewed-on: https://gerrit.libreoffice.org/43743
Reviewed-by: Michael Stahl 

diff --git a/sd/source/filter/eppt/pptx-text.cxx 
b/sd/source/filter/eppt/pptx-text.cxx
index 0cdf747dce6e..f84f1550809a 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -1076,14 +1076,15 @@ void ParagraphObj::ImplGetNumberingLevel( 
PPTExBulletProvider* pBuProv, sal_Int1
 default:
 break;
 }
-break;
-default: break;
 }
 nParaFlags |= 0x2f;
 nBulletFlags |= 6;
 if ( mbIsBullet && bNumberingIsNumber )
 nBulletFlags |= 1;
+break;
 }
+default:
+break;
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-10-17 Thread Caolán McNamara
 sd/source/ui/sidebar/SlideBackground.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 70205e37455b2d3a7155f65e0c1bfd2a89239046
Author: Caolán McNamara 
Date:   Mon Oct 9 14:28:24 2017 +0100

Resolves: rhbz#1471983 fatal exception on older config without slide bg 
panel

Change-Id: Id437bdd8feac06da42c180ff4f7759ec282fa8d4
Reviewed-on: https://gerrit.libreoffice.org/43280
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/sd/source/ui/sidebar/SlideBackground.cxx 
b/sd/source/ui/sidebar/SlideBackground.cxx
index 7425518a5980..23f266cf95dd 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -294,11 +294,14 @@ void SlideBackground::SetPanelTitle( const OUString& 
rTitle )
 if ( !xPanels.is() )
 return;
 
-Reference xPanel ( xPanels->getByName("SlideBackgroundPanel"), 
uno::UNO_QUERY);
-if ( !xPanel.is() )
-return;
+if (xPanels->hasByName("SlideBackgroundPanel"))
+{
+Reference xPanel ( 
xPanels->getByName("SlideBackgroundPanel"), uno::UNO_QUERY);
+if ( !xPanel.is() )
+return;
 
-xPanel->setTitle( rTitle );
+xPanel->setTitle( rTitle );
+}
 }
 
 void SlideBackground::addListener()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-10-04 Thread Noel Grandin
 sd/source/core/sdpage.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e609558c98b7610928507a819ec30a2879fc2ca1
Author: Noel Grandin 
Date:   Tue Oct 3 10:43:00 2017 +0200

tdf#112836 master view, bottom areas are wrongly positioned

Bug was introduced in
commit 12b2803f196b897ffb901b0eebe271c5ee43d03e
"drop unused PRESOBJ_IMAGE"

Change-Id: I50be74b505a674439bd8b67545b89a9660a85a33
Reviewed-on: https://gerrit.libreoffice.org/43062
Reviewed-by: Julien Nabet 
Tested-by: Noel Grandin 
(cherry picked from commit d352dda3dbfc9e26b7f80746e1502f3cb4cd45c1)
Reviewed-on: https://gerrit.libreoffice.org/43066
Tested-by: Jenkins 

diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 6cb7963bcacd..94be400fd3b6 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -903,7 +903,7 @@ const char* const PresObjKindVector[] = {
 "PRESOBJ_NONE", "PRESOBJ_TITLE", "PRESOBJ_OUTLINE",
 "PRESOBJ_TEXT" ,"PRESOBJ_GRAPHIC" , "PRESOBJ_OBJECT",
 "PRESOBJ_CHART", "PRESOBJ_ORGCHART", "PRESOBJ_TABLE",
-"PRESOBJ_IMAGE", "PRESOBJ_PAGE", "PRESOBJ_HANDOUT",
+"PRESOBJ_PAGE", "PRESOBJ_HANDOUT",
 "PRESOBJ_NOTES","PRESOBJ_HEADER", "PRESOBJ_FOOTER",
 "PRESOBJ_DATETIME", "PRESOBJ_SLIDENUMBER", "PRESOBJ_CALC",
 "PRESOBJ_MEDIA", "PRESOBJ_MAX"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-09-06 Thread Tamás Zolnai
 sd/source/ui/view/sdview4.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 12109f0053fefcc74e54c696a940052faffea0e3
Author: Tamás Zolnai 
Date:   Sat Sep 2 06:19:05 2017 +0200

tdf#109261: Crash when adding a video to a slide with zero undo steps

When undo is disabled (no undo steps), ReplaceObjectAtView()
method frees pPickObj, so we need to save it's reused data first.

Change-Id: Icbc800d4d33cf229006aecde7d62aa2a7ea35879
Reviewed-on: https://gerrit.libreoffice.org/41822
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 
(cherry picked from commit 27068e6cc39aed8ebfa5fdd7a67acb89f5adcb89)
Reviewed-on: https://gerrit.libreoffice.org/41824
Reviewed-by: Michael Stahl 

diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 051a3cc0e5e3..ad806d8b6073 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -341,8 +341,12 @@ SdrMediaObj* View::InsertMediaObj( const OUString& 
rMediaURL, const OUString& rM
 else if( pPV )
 {
 ::tools::Rectangle aRect( rPos, rSize );
+SdrObjUserCall* pUserCall = nullptr;
 if( pPickObj )
+{
 aRect = pPickObj->GetLogicRect();
+pUserCall = pPickObj->GetUserCall(); // ReplaceObjectAtView can 
free pPickObj
+}
 
 pNewMediaObj = new SdrMediaObj( aRect );
 
@@ -371,9 +375,9 @@ SdrMediaObj* View::InsertMediaObj( const OUString& 
rMediaURL, const OUString& rM
 
 if( pPickObj )
 {
-pNewMediaObj->AdjustToMaxRect( pPickObj->GetLogicRect() );
+pNewMediaObj->AdjustToMaxRect( aRect );
 if( bIsPres )
-pNewMediaObj->SetUserCall(pPickObj->GetUserCall());
+pNewMediaObj->SetUserCall( pUserCall );
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-09-06 Thread Tamás Zolnai
 sd/source/filter/ppt/pptin.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit bf8ba674089cea3b335c0668a40bc42274f4146a
Author: Tamás Zolnai 
Date:   Sat Sep 2 06:45:35 2017 +0200

tdf#109052: Crash after PPT import when undo is disabled

It was not a good idea to enable undo unconditionally.
Use the saved undo state instead.

Change-Id: I60875da23466b6ef54f034b447d636bdbab38151
Reviewed-on: https://gerrit.libreoffice.org/41823
Reviewed-by: Tamás Zolnai 
Tested-by: Tamás Zolnai 
(cherry picked from commit a726c69ffef2533545e316172e3e1494b8ad327e)
Reviewed-on: https://gerrit.libreoffice.org/41825
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 3b18699b2e9c..738e865cb23a 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -237,6 +237,7 @@ bool ImplSdPPTImport::Import()
 return false;
 
 pSdrModel->setLock(true);
+const bool bSavedUndoEnabled = pSdrModel->IsUndoEnabled();
 pSdrModel->EnableUndo(false);
 
 SdrOutliner& rOutl = mpDoc->GetDrawOutliner();
@@ -1407,7 +1408,7 @@ bool ImplSdPPTImport::Import()
 xDocProps->setTemplateName(OUString());
 
 pSdrModel->setLock(false);
-pSdrModel->EnableUndo(true);
+pSdrModel->EnableUndo(bSavedUndoEnabled);
 return bOk;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-08-22 Thread Tamás Zolnai
 sd/source/ui/dlg/prltempl.cxx |2 +-
 sd/source/ui/func/futempl.cxx |   20 
 2 files changed, 1 insertion(+), 21 deletions(-)

New commits:
commit b6e16872490a12a6b0f9a214bb5e4eef8b236903
Author: Tamás Zolnai 
Date:   Fri Aug 18 20:07:16 2017 +0200

Related to tdf#109863: Crash when close slide style dialog with OK

Use item conversion implemented inside the background tab page.

Change-Id: I4cb0fa60e6d2024a2e6e08e06af337d85b7f49fa
Reviewed-on: https://gerrit.libreoffice.org/41266
Reviewed-by: Michael Stahl 
Reviewed-by: Katarina Behrens 
Tested-by: Katarina Behrens 

diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
index ea873f8e802e..d261946720f6 100644
--- a/sd/source/ui/dlg/prltempl.cxx
+++ b/sd/source/ui/dlg/prltempl.cxx
@@ -280,7 +280,7 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, 
SfxTabPage  )
 }
 else if (nId == mnBackground)
 {
-
aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast(SvxBackgroundTabFlags::SHOW_HIGHLIGHTING)));
+
aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast(SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR)));
 rPage.PageCreated(aSet);
 }
 }
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx
index 51a074342c25..dade95970d5f 100644
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -105,10 +105,6 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
 SfxStyleSheetBase* pStyleSheet = nullptr;
 
 const SfxPoolItem* pItem;
-static const sal_uInt16 aRanges[] = {
-EE_ITEMS_START, EE_ITEMS_END,
-SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR
-};
 SfxStyleFamily nFamily = (SfxStyleFamily)USHRT_MAX;
 if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY,
 false,  ))
@@ -305,15 +301,6 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
 ScopedVclPtr pPresDlg;
 SdAbstractDialogFactory* pFact = 
SdAbstractDialogFactory::Create();
 bool bOldDocInOtherLanguage = false;
-SfxItemSet aNewAttr(mpViewShell->GetPool(), aRanges);
-
-if( aNewAttr.GetItemState( XATTR_FILLBACKGROUND, true,  
) == SfxItemState::SET)
-{
-Color aBackColor = static_cast(pItem)->GetValue();
-SvxBrushItem aBrushItem(aBackColor, XATTR_FILLBACKGROUND);
-aNewAttr.ClearItem(XATTR_FILLBACKGROUND);
-aNewAttr.Put(aBrushItem);
-}
 
 SfxStyleFamily eFamily = pStyleSheet->GetFamily();
 
@@ -414,13 +401,6 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
 SfxItemSet aTempSet(*pOutSet);
 
static_cast(pStyleSheet)->AdjustToFontHeight(aTempSet);
 
-const SvxBrushItem* pBrushItem = 
aTempSet.GetItem(XATTR_FILLBACKGROUND);
-if( pBrushItem )
-{
-   SvxBackgroundColorItem aBackColorItem( 
pBrushItem->GetColor(), EE_CHAR_BKGCOLOR);
-   aTempSet.ClearItem(XATTR_FILLBACKGROUND);
-   aTempSet.Put(aBackColorItem);
-}
 /* Special treatment: reset the INVALIDS to
NULL-Pointer (otherwise INVALIDs or pointer 
point
to DefaultItems in the template; both would
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-08-14 Thread Tamás Zolnai
 sd/source/ui/dlg/prltempl.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 86ce5b2a9e50305f261882079465861319dbbd8f
Author: Tamás Zolnai 
Date:   Mon Aug 14 06:36:34 2017 +0200

tdf#109863: Crash while trying to set pattern fill in Impress

This line was missed to add in this commit:
76585ae33f3ca75c05c0ccbf6a621b6e2d42bc00

Change-Id: I2fb8c90b34ecbdfdd2bdc62adaa5e0a0d074ce33
Reviewed-on: https://gerrit.libreoffice.org/41129
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 
(cherry picked from commit e980d98dea38e71379f3ec02ab03fbff15022e5c)
Reviewed-on: https://gerrit.libreoffice.org/41132
Reviewed-by: Katarina Behrens 

diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
index 3573b27bd929..ea873f8e802e 100644
--- a/sd/source/ui/dlg/prltempl.cxx
+++ b/sd/source/ui/dlg/prltempl.cxx
@@ -244,6 +244,7 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, 
SfxTabPage  )
 aSet.Put (SvxGradientListItem(pGradientList,SID_GRADIENT_LIST));
 aSet.Put (SvxHatchListItem(pHatchingList,SID_HATCH_LIST));
 aSet.Put (SvxBitmapListItem(pBitmapList,SID_BITMAP_LIST));
+aSet.Put (SvxPatternListItem(pPatternList,SID_PATTERN_LIST));
 aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,0));
 aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1));
 aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,0));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-08-11 Thread Pranav Kant
 sd/source/ui/view/drviews2.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c9ff6f8f9c7f94070bef0909636f0ec91d9baaf7
Author: Pranav Kant 
Date:   Tue Aug 1 16:37:52 2017 +0530

tdf#110743: Use page position to insert master page, not id

Fallback from c454fbb9b62164d5f047990ae63522c9fb932086

Change-Id: I8835f1a23feeb12d77963e621e8d9d59568420f2
(cherry picked from commit f4e5940abbbaa3c2747108b0954e8912d164f3e5)
Reviewed-on: https://gerrit.libreoffice.org/40633
Reviewed-by: Michael Stahl 
Tested-by: Jenkins 

diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index d2a5a202890e..2ebcb3230611 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -356,7 +356,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 xMasterPagesSupplier->getMasterPages());
 if (xMasterPages.is())
 {
-sal_uInt16 nIndex = GetCurPageId();
+sal_uInt16 nIndex = GetCurPagePos() + 1;
 xMasterPages->insertNewByIndex (nIndex);
 
 // Create shapes for the default layout.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-08-03 Thread Caolán McNamara
 sd/source/ui/dlg/sdpreslt.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ab3e90e48a7ce8b1ebcee39af56289f625940d69
Author: Caolán McNamara 
Date:   Thu Aug 3 17:24:32 2017 +0100

Resolves: tdf#111308 crash after load designs with no design selected

Change-Id: Ia7d5e1d0c4c960700d94cfec01a8a01799f89d9a
Reviewed-on: https://gerrit.libreoffice.org/40732
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit e325a5442ab350e8eb66458aed98d38ce21aec06)
Reviewed-on: https://gerrit.libreoffice.org/40745
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index b7f7d3642671..2eacdbbedb31 100644
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -121,7 +121,7 @@ void SdPresLayoutDlg::GetAttr(SfxItemSet& rOutAttrs)
 {
 aLayoutName = maName + "#" + maLayoutNames[ nId - 1 ];
 }
-else
+else if (nId)
 {
 aLayoutName = maLayoutNames[ nId - 1 ];
 if( aLayoutName == maStrNone )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-07-28 Thread Caolán McNamara
 sd/source/ui/slidesorter/controller/SlideSorterController.cxx |   14 
+++---
 sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx |1 
 2 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 6e812e78cdbda7704414f9bc76830d043d38e2a5
Author: Caolán McNamara 
Date:   Mon Jul 24 21:32:30 2017 +0100

don't jump back to selected slide on right click context menu

i.e. two many slides to fit in slide sorter panel, so scroll bar,
select slide one, scroll to the end and right click between slides
(or anywhere that isn't a slide) and without this fix the sorter
jumps back to make the selected slide 1 visible. The right click
menu will offer "new slide", choosing that will insert a slide
at the point that was originally clicked, not at the point it
was scrolled back to

losing focus trigger a (dubious looking) callback to jump to the
selected slide, so disable it while context menu is up

Change-Id: Ie42bf158258cc38c9b7cfda7672f24d2ac8bfa11
Reviewed-on: https://gerrit.libreoffice.org/40382
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx 
b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index dfbf1692ef8d..dfd07f3de532 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -111,6 +111,7 @@ SlideSorterController::SlideSorterController (SlideSorter& 
rSlideSorter)
   mpListener(),
   mnModelChangeLockCount(0),
   mbIsForcedRearrangePending(false),
+  mbContextMenuOpen(false),
   mbPreModelChangeDone(false),
   mbPostModelChangePending(false),
   maSelectionBeforeSwitch(),
@@ -386,7 +387,9 @@ bool SlideSorterController::Command (
 SfxDispatcher* pDispatcher = pViewShell->GetDispatcher();
 if (pDispatcher != nullptr)
 {
+mbContextMenuOpen = true;
 pDispatcher->ExecutePopup( aPopupId, pWindow, 
 );
+mbContextMenuOpen = false;
 mrSlideSorter.GetView().UpdatePageUnderMouse();
 ::rtl::Reference 
pFunction(GetCurrentSelectionFunction());
 if (pFunction.is())
@@ -553,9 +556,14 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, 
VclWindowEvent&, rEvent, vo
 GetFocusManager().HideFocus();
 mrView.GetToolTip().Hide();
 
-// Select the current slide so that it is properly
-// visualized when the focus is moved to the edit view.
-
GetPageSelector().SelectPage(GetCurrentSlideManager()->GetCurrentSlide());
+//don't scroll back to the selected slide when we lose
+//focus due to a temporary active context menu
+if (!mbContextMenuOpen)
+{
+// Select the current slide so that it is properly
+// visualized when the focus is moved to the edit view.
+
GetPageSelector().SelectPage(GetCurrentSlideManager()->GetCurrentSlide());
+}
 }
 break;
 
diff --git a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx 
b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
index cee9f9631bd8..33130e5aeea0 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
@@ -240,6 +240,7 @@ private:
 
 int mnModelChangeLockCount;
 bool mbIsForcedRearrangePending;
+bool mbContextMenuOpen;
 
 bool mbPreModelChangeDone;
 bool mbPostModelChangePending;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-07-17 Thread Tamás Zolnai
 sd/source/ui/func/futext.cxx   |6 ++
 sd/source/ui/inc/futext.hxx|3 +++
 sd/source/ui/view/viewshel.cxx |   25 +
 3 files changed, 34 insertions(+)

New commits:
commit 1569b4b1813d44b38e250111411f3c75eeb0c483
Author: Tamás Zolnai 
Date:   Fri Jul 14 03:09:33 2017 +0200

tdf#109107: Sidebar's fontheight field is not updated...

... by moving cursor in an Impress table

Table controller handles key and mouse events itself, but can't
do the invalidation of the slotids which would lead to update
sidebar corresponding widgets.

Change-Id: I0d1db58ecb714bb16dfb1b5662f0fba7ce69c06f
Reviewed-on: https://gerrit.libreoffice.org/39933
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 
(cherry picked from commit 6feb40b950557dcfdc5249f22d72edad397d4c67)
Reviewed-on: https://gerrit.libreoffice.org/39949
Reviewed-by: Miklos Vajna 

diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index e794d2602479..96f595c6a12b 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -1461,6 +1461,12 @@ void FuText::ChangeFontSize( bool bGrow, OutlinerView* 
pOLV, const FontList* pFo
 }
 }
 
+void FuText::InvalidateBindings()
+{
+mpViewShell->GetViewFrame()->GetBindings().Invalidate(SidArray);
+}
+
+
 } // end of namespace sd
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/futext.hxx b/sd/source/ui/inc/futext.hxx
index 281af763e1ec..3530dfb9fb01 100644
--- a/sd/source/ui/inc/futext.hxx
+++ b/sd/source/ui/inc/futext.hxx
@@ -69,6 +69,9 @@ public:
 
 static void ChangeFontSize( bool, OutlinerView*, const FontList*, 
::sd::View* );
 
+void InvalidateBindings();
+
+
 protected:
 FuText (ViewShell* pViewSh,
 ::sd::Window* pWin,
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index b741231d7986..ac4c4a08a08f 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -82,6 +82,7 @@
 
 #include "Window.hxx"
 #include "fupoor.hxx"
+#include "futext.hxx"
 
 #include 
 #include 
@@ -440,6 +441,12 @@ bool ViewShell::KeyInput(const KeyEvent& rKEvt, 
::sd::Window* pWin)
 else
 {
 bReturn = true;
+if (HasCurrentFunction())
+{
+FuText* pTextFunction = 
dynamic_cast(GetCurrentFunction().get());
+if(pTextFunction != nullptr)
+pTextFunction->InvalidateBindings();
+}
 }
 }
 }
@@ -498,6 +505,15 @@ void ViewShell::MouseButtonDown(const MouseEvent& rMEvt, 
::sd::Window* pWin)
 if(HasCurrentFunction())
 GetCurrentFunction()->MouseButtonDown(rMEvt);
 }
+else
+{
+if (HasCurrentFunction())
+{
+FuText* pTextFunction = 
dynamic_cast(GetCurrentFunction().get());
+if (pTextFunction != nullptr)
+pTextFunction->InvalidateBindings();
+}
+}
 }
 }
 
@@ -682,6 +698,15 @@ void ViewShell::MouseButtonUp(const MouseEvent& rMEvt, 
::sd::Window* pWin)
 if(HasCurrentFunction())
 GetCurrentFunction()->MouseButtonUp(rMEvt);
 }
+else
+{
+if (HasCurrentFunction())
+{
+FuText* pTextFunction = 
dynamic_cast(GetCurrentFunction().get());
+if (pTextFunction != nullptr)
+pTextFunction->InvalidateBindings();
+}
+}
 }
 
 if ( ! mpImpl->mpUpdateLockForMouse.expired())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-07-04 Thread Michael Stahl
 sd/source/filter/xml/sdxmlwrp.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f6e84702699ce8c48ae669d9d50aa56f78a05ea1
Author: Michael Stahl 
Date:   Fri Jun 30 16:13:06 2017 +0200

tdf#108833 sd: don't unconditionally enable Undo after import

Change-Id: Id637e649ccf3782658832d909b3a7150a0606229
(cherry picked from commit 3d59018b1ed816b4399cad4c2c4818cf25d4f4a1)
Reviewed-on: https://gerrit.libreoffice.org/39420
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/sd/source/filter/xml/sdxmlwrp.cxx 
b/sd/source/filter/xml/sdxmlwrp.cxx
index b84854e68b94..f435577fcf96 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -453,6 +453,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
 comphelper::getProcessComponentContext();
 
 SdDrawDocument* pDoc = mrDocShell.GetDoc();
+bool const bWasUndo(pDoc->IsUndoEnabled());
 pDoc->EnableUndo(false);
 pDoc->NewOrLoadCompleted( NEW_DOC );
 pDoc->CreateFirstPages();
@@ -780,7 +781,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
 
 fixupOutlinePlaceholderNumberingDepths(pDoc);
 
-pDoc->EnableUndo(true);
+pDoc->EnableUndo(bWasUndo);
 mrDocShell.ClearUndoBuffer();
 return nRet == 0;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-07-04 Thread Michael Stahl
 sd/source/ui/docshell/docshell.cxx |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 0755d19069403ef16f55326c3a567ddf84d4d9ec
Author: Michael Stahl 
Date:   Fri Jun 30 12:39:26 2017 +0200

tdf#108863 sd: disable Undo earlier if no Undo Steps

If 0 Undo Steps, the Undo is disabled by a timer somewhere calling
SfxShell::SetUndoManager().  This seems a bit risky, so disable it
already when the sd::UndoManager is created.

Change-Id: I9caf14fe32251d1f92cb5fa0683838316275eab3
(cherry picked from commit 495284716f49072e432b8425944cc67dfe0df0e0)
Reviewed-on: https://gerrit.libreoffice.org/39417
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/sd/source/ui/docshell/docshell.cxx 
b/sd/source/ui/docshell/docshell.cxx
index 799c2cfaa907..a764938d2d69 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -18,6 +18,11 @@
  */
 
 #include "DrawDocShell.hxx"
+
+#include 
+
+#include 
+
 #include 
 
 #include 
@@ -108,6 +113,11 @@ void DrawDocShell::Construct( bool bClipboard )
 SetBaseModel( new SdXImpressDocument( this, bClipboard ) );
 SetPool( >GetItemPool() );
 mpUndoManager = new sd::UndoManager;
+if (!utl::ConfigManager::IsAvoidConfig()
+&& officecfg::Office::Common::Undo::Steps::get() < 1)
+{
+mpUndoManager->EnableUndo(false); // tdf#108863 disable if 0 steps
+}
 mpDoc->SetSdrUndoManager( mpUndoManager );
 mpDoc->SetSdrUndoFactory( new sd::UndoFactory );
 UpdateTablePointers();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-07-04 Thread Noel Grandin
 sd/source/ui/view/drviews3.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 788a87d46a64dc9e50eb371680c883a1d274b3e1
Author: Noel Grandin 
Date:   Mon Jul 3 16:04:58 2017 +0200

tdf#108609 rtl mode set on ruler when it should be ltr

regression from
commit 8ccbc16b5e3f94b8db105232d7085a8553e6bc03
"convert SvxFrameDirection to scoped enum"

Change-Id: I2063ddf4344fb41b54f2ad96a471df4d3205406d
Reviewed-on: https://gerrit.libreoffice.org/39478
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 
(cherry picked from commit eb104a28daf5b17f24c95da637fc292593eea99b)
Reviewed-on: https://gerrit.libreoffice.org/39485
Tested-by: Noel Grandin 

diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index ab4aaf5f6936..1bd20c345afd 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -963,7 +963,7 @@ void  DrawViewShell::GetRulerState(SfxItemSet& rSet)
 if( aEditAttr.GetItemState( EE_PARA_WRITINGDIR ) >= 
SfxItemState::DEFAULT )
 {
 const SvxFrameDirectionItem& rItem = static_cast( aEditAttr.Get( EE_PARA_WRITINGDIR ) );
-rSet.Put(SfxBoolItem(SID_RULER_TEXT_RIGHT_TO_LEFT, 
rItem.GetValue() == SvxFrameDirection::Horizontal_LR_TB));
+rSet.Put(SfxBoolItem(SID_RULER_TEXT_RIGHT_TO_LEFT, 
rItem.GetValue() == SvxFrameDirection::Horizontal_RL_TB));
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-06-25 Thread Caolán McNamara
 sd/source/ui/slideshow/slideshowimpl.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 5c768420a4b0a6543ef802549f90f489063ac609
Author: Caolán McNamara 
Date:   Thu Jun 22 17:22:17 2017 +0100

Resolves: tdf#108475 swipe only if some reasonable movement was involved

Change-Id: I5ee2a60f80728a2cca1401e43c8e27f852bfc657
Reviewed-on: https://gerrit.libreoffice.org/39117
Tested-by: Jenkins 
Reviewed-by: David Tardon 

diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 8de1e7ac82d2..6cb57b88e444 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1188,8 +1188,10 @@ bool SlideshowImpl::swipe(const CommandSwipeData 
)
 {
 if (mbUsePen || mnContextMenuEvent)
 return false;
-
 double nVelocityX = rSwipeData.getVelocityX();
+// tdf#108475 make it swipe only if some reasonable movement was involved
+if (fabs(nVelocityX) < 50)
+return false;
 if (nVelocityX > 0)
 {
 gotoPreviousSlide();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-06-02 Thread Caolán McNamara
 sd/source/ui/dlg/tpaction.cxx |   37 +++--
 1 file changed, 23 insertions(+), 14 deletions(-)

New commits:
commit 57ccbbc1bae230b9f03f808d8b5d363f22fa1b25
Author: Caolán McNamara 
Date:   Fri Jun 2 11:57:30 2017 +0100

Resolves: tdf#108187 fatal exception on testing if ooxml is a odf

Change-Id: Ie88a66aa8d73bb3c4045629604756470ce51b92b
Reviewed-on: https://gerrit.libreoffice.org/38353
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index a0dec36b6c8c..d106886d8f31 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -662,30 +662,39 @@ IMPL_LINK_NOARG(SdTPAction, CheckFileHdl, Control&, void)
 {
 WaitObject aWait( GetParentDialog() );
 
+bool bHideTreeDocument = true;
+
 // is it a draw file?
 // open with READ, otherwise the Storages might write into the 
file!
 uno::Reference < embed::XStorage > xStorage = aMedium.GetStorage();
 DBG_ASSERT( xStorage.is(), "No storage!" );
 
 uno::Reference < container::XNameAccess > xAccess( xStorage, 
uno::UNO_QUERY );
-if( xAccess.is() &&
-( xAccess->hasByName( pStarDrawXMLContent ) ||
-xAccess->hasByName( pStarDrawOldXMLContent ) ) )
+if (xAccess.is())
 {
-SdDrawDocument* pBookmarkDoc = mpDoc->OpenBookmarkDoc( aFile );
-if( pBookmarkDoc )
+try
+{
+if (xAccess->hasByName(pStarDrawXMLContent) ||
+xAccess->hasByName(pStarDrawOldXMLContent))
+{
+if (SdDrawDocument* pBookmarkDoc = 
mpDoc->OpenBookmarkDoc(aFile))
+{
+aLastFile = aFile;
+
+m_pLbTreeDocument->Clear();
+m_pLbTreeDocument->Fill(pBookmarkDoc, true, aFile);
+mpDoc->CloseBookmarkDoc();
+m_pLbTreeDocument->Show();
+bHideTreeDocument = false;
+}
+}
+}
+catch (...)
 {
-aLastFile = aFile;
-
-m_pLbTreeDocument->Clear();
-m_pLbTreeDocument->Fill( pBookmarkDoc, true, aFile );
-mpDoc->CloseBookmarkDoc();
-m_pLbTreeDocument->Show();
 }
-else
-m_pLbTreeDocument->Hide();
 }
-else
+
+if (bHideTreeDocument)
 m_pLbTreeDocument->Hide();
 
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-06-01 Thread Takeshi Abe
 sd/source/ui/view/drviews2.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 30a1c429c24b8de9a51ed066571d3c315f812844
Author: Takeshi Abe 
Date:   Fri May 26 23:16:57 2017 +0900

tdf#108024 Keep original selection during DrawViewShell::FuTemporary()

Otherwise it was disposed in the middle of its own mouse event handler
FuSelection::MouseButtonUp().

Change-Id: I0d96048526dece7232e5a777364ad4da1d64c904
Reviewed-on: https://gerrit.libreoffice.org/37976
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 
(cherry picked from commit 96d59ffc572c4cf112405a85aee3366d45bc7757)
Reviewed-on: https://gerrit.libreoffice.org/38301
Reviewed-by: Takeshi Abe 

diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index a189006ea60d..d2a5a202890e 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1110,7 +1110,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 // Set the selection tool as the old one. This in particular 
important for the
 // zoom function, in which clicking without dragging zooms as 
well, and that
 // makes exiting the object editing mode impossible.
-SetOldFunction( FuSelection::Create( this, GetActiveWindow(), 
mpDrawView, GetDoc(), rReq ) );
+if (dynamic_cast( GetOldFunction().get() ) == 
nullptr)
+SetOldFunction( FuSelection::Create( this, GetActiveWindow(), 
mpDrawView, GetDoc(), rReq ) );
 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-4' - sd/source

2017-05-23 Thread Caolán McNamara
 sd/source/filter/html/htmlex.cxx |   26 +++---
 sd/source/ui/app/strings.src |5 +
 sd/source/ui/inc/strings.hrc |1 +
 3 files changed, 13 insertions(+), 19 deletions(-)

New commits:
commit 847174d769be66f4defa1b8a664c89af0aa89a88
Author: Caolán McNamara 
Date:   Tue May 23 10:38:21 2017 +0100

mysterious and missing 4077 resource used in sd

this would have been
String RID_WEBWIZARDDIALOG_START +77
from
wizards/source/formwizard/dbwizres.src

which is now gone (very reasonably) since...

commit 82d863b4a410fa78120d2efc41bd2b3b61f21cee
Date:   Sat Feb 18 14:02:30 2017 +0100

Related tdf#99967: Cleanup after Web Wizard drop

There are still webwizard*.xhp in help/source/text/shared/autopi/

Change-Id: If54d7bfc093c8c0765fd881eeb14f62bc3517194
Reviewed-on: https://gerrit.libreoffice.org/34402
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

the original complicated reuse of another modules translation
was in

commit 660c23c4c1c624b9db626be8f01166a154021e0d
Date:   Fri Jan 28 14:38:37 2005 +

INTEGRATION: CWS impress30 (1.18.40); FILE MERGED
2005/01/20 13:44:50 cl 1.18.40.1: #b4752338# give warning when 
overwriting files

Change-Id: I80ff0a545bbf08bcea142bb8bd41c547713ee11b
(cherry picked from commit 476c50943864e70a4758ccf01e2567067bc7c44f)

diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 06babc1c576b..161d8fa6afce 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -3097,25 +3097,13 @@ bool HtmlExport::checkForExistingFiles()
 
 if( bFound )
 {
-ResMgr *pResMgr = ResMgr::CreateResMgr( "dbw" );
-if( pResMgr )
-{
-ResId aResId( 4077, *pResMgr );
-OUString aMsg( aResId );
-
-OUString aSystemPath;
-osl::FileBase::getSystemPathFromFileURL( maExportPath, 
aSystemPath );
-aMsg = aMsg.replaceFirst( "%FILENAME", aSystemPath );
-ScopedVclPtrInstance< WarningBox > aWarning( nullptr, 
WB_YES_NO | WB_DEF_YES, aMsg );
-aWarning->SetImage( WarningBox::GetStandardImage() );
-bFound = ( RET_NO == aWarning->Execute() );
-
-delete pResMgr;
-}
-else
-{
-bFound = false;
-}
+OUString aSystemPath;
+osl::FileBase::getSystemPathFromFileURL( maExportPath, aSystemPath 
);
+OUString aMsg(SdResId(STR_OVERWRITE_WARNING));
+aMsg = aMsg.replaceFirst( "%FILENAME", aSystemPath );
+ScopedVclPtrInstance< WarningBox > aWarning( nullptr, WB_YES_NO | 
WB_DEF_YES, aMsg );
+aWarning->SetImage( WarningBox::GetStandardImage() );
+bFound = ( RET_NO == aWarning->Execute() );
 }
 }
 catch( Exception& )
diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src
index 7dd87b46059e..89b9b00dd9bb 100644
--- a/sd/source/ui/app/strings.src
+++ b/sd/source/ui/app/strings.src
@@ -1127,4 +1127,9 @@ String STR_OBJECTS_TREE
 Text [ en-US ] = "Page Tree";
 };
 
+String STR_OVERWRITE_WARNING
+{
+Text [ en-US  ] = "The local target directory '%FILENAME' is not empty. 
Some files might be overwritten. Do you want to continue?";
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc
index 7d0b1217af58..500ad5012010 100644
--- a/sd/source/ui/inc/strings.hrc
+++ b/sd/source/ui/inc/strings.hrc
@@ -163,6 +163,7 @@
 #define STR_UNDO_INSERT_TEXTFRAME   (RID_APP_START+275)
 #define STR_ACTION_NOTPOSSIBLE  (RID_APP_START+278)
 #define STR_DLG_INSERT_PAGES_FROM_FILE  (RID_APP_START+279)
+#define STR_OVERWRITE_WARNING   (RID_APP_START+280)
 #define STR_SCALE_OBJECTS   (RID_APP_START+281)
 #define STR_CREATE_PAGES(RID_APP_START+282)
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sd/source

2017-05-22 Thread Caolán McNamara
 sd/source/ui/view/drviews6.cxx |   17 +++--
 1 file changed, 7 insertions(+), 10 deletions(-)

New commits:
commit e4db2fc10ba4447fa5393853d0cfed795b260f0b
Author: Caolán McNamara 
Date:   Mon May 22 09:10:14 2017 +0100

Resolves: tdf#107959 SdrGrafObj leak triggers later crash

if the graphic doesn't change, then the cloned SdrGrafObj
persists beyond stylesheet destruction and blows up

Change-Id: I0013e7e118985c1334ab460507bc5c8271700160
(cherry picked from commit 118401aae4516bf4cc122e96b376d129ab3a3d5e)

diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index d34931a65364..ddb72778bdac 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -276,20 +276,17 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq )
 
 if ( pObj && !mpDrawView->IsTextEdit() )
 {
-SdrGrafObj* pNewObj = pObj->Clone();
+std::unique_ptr xNewObj(pObj->Clone());
 bool bCont = true;
 
-if( pNewObj->IsLinkedGraphic() )
+if (xNewObj->IsLinkedGraphic())
 {
 ScopedVclPtrInstance< MessageDialog > aQueryBox( 
static_cast(GetActiveWindow()),"QueryUnlinkImageDialog","modules/sdraw/ui/queryunlinkimagedialog.ui");
 
 if (RET_YES == aQueryBox->Execute())
-pNewObj->ReleaseGraphicLink();
+xNewObj->ReleaseGraphicLink();
 else
-{
-delete pNewObj;
 bCont = false;
-}
 }
 
 SfxChildWindow* pWnd = GetViewFrame()->GetChildWindow(
@@ -298,21 +295,21 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq )
 assert(pBmpMask);
 if (bCont && pBmpMask)
 {
-const Graphic&  rOldGraphic = pNewObj->GetGraphic();
+const Graphic&  rOldGraphic = xNewObj->GetGraphic();
 const Graphic   aNewGraphic(pBmpMask->Mask(rOldGraphic));
 
 if( aNewGraphic != rOldGraphic )
 {
 SdrPageView* pPV = mpDrawView->GetSdrPageView();
 
-pNewObj->SetEmptyPresObj( false );
-
pNewObj->SetGraphic(pBmpMask->Mask(pNewObj->GetGraphic()));
+xNewObj->SetEmptyPresObj(false);
+
xNewObj->SetGraphic(pBmpMask->Mask(xNewObj->GetGraphic()));
 
 OUString aStr( 
mpDrawView->GetDescriptionOfMarkedObjects() );
 aStr += " " + SdResId(STR_EYEDROPPER);
 
 mpDrawView->BegUndo( aStr );
-mpDrawView->ReplaceObjectAtView( pObj, *pPV, pNewObj );
+mpDrawView->ReplaceObjectAtView(pObj, *pPV, 
xNewObj.release());
 mpDrawView->EndUndo();
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits