[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source vcl/opengl

2018-07-27 Thread Libreoffice Gerrit user
 svx/source/svdraw/svdograf.cxx |3 +++
 vcl/opengl/salbmp.cxx  |6 ++
 2 files changed, 9 insertions(+)

New commits:
commit 2038ab9d4cbb7282172a65352e4ed1a852404b29
Author: Miklos Vajna 
AuthorDate: Wed Jul 25 17:02:21 2018 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jul 27 11:21:07 2018 +0200

tdf#118860 svx opengl: avoid SalBitmap creation without solar mutex

The bugdoc has 2 slides. When switching to the second slide, the graphic
is loaded in the background, but OpenGLSalBitmap::Create() can't work
correctly if the caller doesn't own the solar mutex.

This already asserts in OpenGLContext::prepareForYield() in a less
obvious way.

Focus on the correctness, so just hold the solar mutex during the whole
ImportGrpahic() call. If it turns out that the purpose of running this
on a thread is to avoid synchronous network traffic, then the data could
be first copied to a memory stream, and only then take the lock + import
the graphic.

(cherry picked from commit 919ccaba419531d689231b76a43ab29c6a9ec65a)

Change-Id: I88203c12b4e7a5f2b689928c01e2ba953c5b13c5
Reviewed-on: https://gerrit.libreoffice.org/58126
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 3eb3abfe0953..ab179960f88c 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -93,6 +93,9 @@ const Graphic ImpLoadLinkedGraphic( const OUString& 
aFileName, const OUString& a
 aFilterData[ 0 ].Name = "CreateNativeLink";
 aFilterData[ 0 ].Value <<= true;
 
+// Need to own the solar mutex while creating a SalBitmap.
+SolarMutexGuard aGuard;
+
 // #i123042# for e.g SVG the path is needed, so hand it over here. I 
have no real idea
 // what consequences this may have; maybe this is not handed over by 
purpose here. Not
 // handing it over means that any GraphicFormat that internally needs 
a path as base
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index 1ae3e2ae4a01..a68c2f38129f 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -117,6 +117,7 @@ OpenGLSalBitmap::~OpenGLSalBitmap()
 
 bool OpenGLSalBitmap::Create( const OpenGLTexture& rTex, long nX, long nY, 
long nWidth, long nHeight )
 {
+DBG_TESTSOLARMUTEX();
 static const BitmapPalette aEmptyPalette;
 OpenGLVCLContextZone aContextZone;
 
@@ -160,6 +161,7 @@ bool OpenGLSalBitmap::Create( const OpenGLTexture& rTex, 
long nX, long nY, long
 
 bool OpenGLSalBitmap::Create( const Size& rSize, sal_uInt16 nBits, const 
BitmapPalette& rBitmapPalette )
 {
+DBG_TESTSOLARMUTEX();
 OpenGLVCLContextZone aContextZone;
 
 Destroy();
@@ -185,16 +187,19 @@ bool OpenGLSalBitmap::Create( const Size& rSize, 
sal_uInt16 nBits, const BitmapP
 
 bool OpenGLSalBitmap::Create( const SalBitmap& rSalBmp )
 {
+DBG_TESTSOLARMUTEX();
 return Create( rSalBmp, rSalBmp.GetBitCount() );
 }
 
 bool OpenGLSalBitmap::Create( const SalBitmap& rSalBmp, SalGraphics* pGraphics 
)
 {
+DBG_TESTSOLARMUTEX();
 return Create( rSalBmp, pGraphics ? pGraphics->GetBitCount() : 
rSalBmp.GetBitCount() );
 }
 
 bool OpenGLSalBitmap::Create( const SalBitmap& rSalBmp, sal_uInt16 
nNewBitCount )
 {
+DBG_TESTSOLARMUTEX();
 OpenGLZone aZone;
 
 // check that carefully only in the debug mode
@@ -233,6 +238,7 @@ bool OpenGLSalBitmap::Create( const SalBitmap& rSalBmp, 
sal_uInt16 nNewBitCount
 
 bool OpenGLSalBitmap::Create( const css::uno::Reference< 
css::rendering::XBitmapCanvas >& /*xBitmapCanvas*/, Size& /*rSize*/, bool 
/*bMask*/ )
 {
+DBG_TESTSOLARMUTEX();
 // TODO Is this method needed?
 return false;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2018-07-25 Thread Libreoffice Gerrit user
 svx/source/form/datanavi.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 239ce8ea56527c96bd1b30b68a3448872f382b47
Author: Caolán McNamara 
AuthorDate: Wed Jul 25 10:18:56 2018 +0100
Commit: Eike Rathke 
CommitDate: Thu Jul 26 00:49:43 2018 +0200

Resolves: tdf#118862 new instances cannot be edited

Change-Id: I9b10ff4f043949c7140852ac9ad9106ca611c98c
Reviewed-on: https://gerrit.libreoffice.org/57963
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 076a4c35c291..5e077453f6ff 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -1756,7 +1756,7 @@ namespace svxform
 
 bool DataNavigatorWindow::IsAdditionalPage(sal_uInt16 nId) const
 {
-return m_pTabCtrl->GetPagePos(nId) >= 3;
+return m_pTabCtrl->GetPageName(nId).isEmpty();
 }
 
 IMPL_LINK( DataNavigatorWindow, MenuActivateHdl, MenuButton *, pBtn, void )
@@ -1910,8 +1910,10 @@ namespace svxform
 XFormsPage* pPage = GetCurrentPage( nId );
 DBG_ASSERT( pPage, "DataNavigatorWindow::SetPageModel(): no 
page" );
 if (IsAdditionalPage(nId) || m_pTabCtrl->GetPageName(nId) == 
"instance")
+{
 // instance page
 nPagePos = m_pTabCtrl->GetPagePos( nId );
+}
 m_bIsNotifyDisabled = true;
 OUString sText = pPage->SetModel( xFormsModel, nPagePos );
 m_bIsNotifyDisabled = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2018-07-10 Thread Julien Nabet
 svx/source/fmcomp/gridcell.cxx |   14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 44f72ca3747deb1c8824626f216d295815b5ceff
Author: Julien Nabet 
Date:   Thu Jun 14 23:49:11 2018 +0200

tdf#118022: fix crash when searching record in form by handling SQLException

See https://bugs.documentfoundation.org/attachment.cgi?id=142760
Found thanks on gdb with command
catch throw com::sun::star::sdbc::SQLException

First SQLException was dealt but not the second one

Reviewed-on: https://gerrit.libreoffice.org/55836
(cherry picked from commit f94292e8c4d469bd3123e1649b0f2a94d4b357b3)

Change-Id: I7d5d3ad612db132a3bda97cff14367912ae885f9
Reviewed-on: https://gerrit.libreoffice.org/55853
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 7da52af19012..2da40fa9b03c 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1150,10 +1150,22 @@ void DbTextField::PaintFieldToCell( OutputDevice& 
_rDev, const tools::Rectangle&
 
 OUString DbTextField::GetFormatText(const Reference< XColumn >& _rxField, 
const Reference< XNumberFormatter >& xFormatter, Color** /*ppColor*/)
 {
+if (!_rxField.is())
+return OUString();
+
 const css::uno::Reference xPS(_rxField, 
UNO_QUERY);
 FormattedColumnValue fmter( xFormatter, xPS );
 
-return fmter.getFormattedValue();
+try
+{
+return fmter.getFormattedValue();
+}
+catch( const Exception& )
+{
+DBG_UNHANDLED_EXCEPTION();
+}
+return OUString();
+
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2018-06-07 Thread Caolán McNamara
 svx/source/dialog/charmap.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 63e1546668ac464d1ba0b02ba5e76fb064e63100
Author: Caolán McNamara 
Date:   Tue Jun 5 16:49:11 2018 +0100

Resolves: tdf#116876 don't reselect index on resize if it wouldn't change

selecting the index sets it as active and updates the previews, so if its an
inactive index and resize happens, leave it as inactive but selected

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

diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 9fc4f3f66a8b..7a57199e2d87 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -758,7 +758,8 @@ void SvxShowCharSet::RecalculateFont(vcl::RenderContext& 
rRenderContext)
 
 // restore last selected unicode
 int nMapIndex = mxFontCharMap->GetIndexFromChar(getSelectedChar());
-SelectIndex(nMapIndex);
+if (nMapIndex != nSelectedIndex)
+SelectIndex(nMapIndex);
 
 aVscrollSB->Show();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2018-06-06 Thread Caolán McNamara
 svx/source/tbxctrls/tbcontrl.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit c6c82096301180cfa7942dd9fb9d1cb66c7ecc04
Author: Caolán McNamara 
Date:   Thu May 31 13:49:40 2018 +0100

tdf#117537 block rentry to CheckAndMarkUnknownFont

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

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 997520fd5e32..c5c19346ce3f 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -192,6 +192,7 @@ private:
 Reference< XDispatchProvider > m_xDispatchProvider;
 Reference< XFrame >m_xFrame;
 boolmbEndPreview;
+boolmbCheckingUnknownFont;
 
 voidReleaseFocus_Impl();
 voidEnableControls_Impl();
@@ -970,7 +971,8 @@ SvxFontNameBox_Impl::SvxFontNameBox_Impl( vcl::Window* 
pParent, const Reference<
 bRelease   ( true ),
 m_xDispatchProvider( rDispatchProvider ),
 m_xFrame (_xFrame),
-mbEndPreview(false)
+mbEndPreview(false),
+mbCheckingUnknownFont(false)
 {
 SetOptimalSize();
 EnableControls_Impl();
@@ -1002,6 +1004,9 @@ IMPL_LINK( SvxFontNameBox_Impl, CheckAndMarkUnknownFont, 
VclWindowEvent&, event,
 {
 if( event.GetId() != VclEventId::EditModify )
 return;
+if (mbCheckingUnknownFont) //tdf#117537 block rentry
+return;
+mbCheckingUnknownFont = true;
 OUString fontname = GetSubEdit()->GetText();
 lcl_GetDocFontList( , this );
 // If the font is unknown, show it in italic.
@@ -1024,6 +1029,7 @@ IMPL_LINK( SvxFontNameBox_Impl, CheckAndMarkUnknownFont, 
VclWindowEvent&, event,
 SetQuickHelpText( SvxResId( RID_SVXSTR_CHARFONTNAME_NOTAVAILABLE 
));
 }
 }
+mbCheckingUnknownFont = false;
 }
 
 void SvxFontNameBox_Impl::Update( const css::awt::FontDescriptor* pFontDesc )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2018-05-29 Thread Marco Cecchetti
 svx/source/core/graphichelper.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit b582ec97fbcce88fa1a39bc7fe2a2ae084f30e35
Author: Marco Cecchetti 
Date:   Tue May 15 11:13:05 2018 +0200

tdf#117172 - Image context menu Save fails to do anything

Change-Id: I5c0980d85ef5ed050bfafbc368576c5ad72a80a7
Reviewed-on: https://gerrit.libreoffice.org/54359
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 
(cherry picked from commit 796bee47e90efee7c076f6acdc2a95004ed081d0)
Reviewed-on: https://gerrit.libreoffice.org/54931
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/svx/source/core/graphichelper.cxx 
b/svx/source/core/graphichelper.cxx
index 9e8f3dfceab8..6ec0b53fb70d 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -331,6 +331,13 @@ OUString GraphicHelper::ExportGraphic(const vcl::Window* 
pParent, const Graphic&
 return sPath;
 }
 }
+else
+{
+XOutBitmap::WriteGraphic( rGraphic, sPath, aFilter,
+XOutFlags::DontExpandFilename |
+XOutFlags::DontAddExtension |
+XOutFlags::UseNativeIfPossible );
+}
 }
 }
 return OUString();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2018-04-05 Thread Caolán McNamara
 svx/source/dialog/searchcharmap.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ebd78caf7ff49328b902158ad101e9496b0f7a5b
Author: Caolán McNamara 
Date:   Fri Mar 23 10:06:38 2018 +

a11y crash with no chars selected in character map

type gibberish in character map search box, click character map widget,
crash

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

diff --git a/svx/source/dialog/searchcharmap.cxx 
b/svx/source/dialog/searchcharmap.cxx
index db6f4e37bbcd..66101b21d703 100644
--- a/svx/source/dialog/searchcharmap.cxx
+++ b/svx/source/dialog/searchcharmap.cxx
@@ -437,7 +437,8 @@ svx::SvxShowCharSetItem* SvxSearchCharSet::ImplGetItem( int 
_nPos )
 aFind = m_aItems.emplace(_nPos, xItem).first;
 OUStringBuffer buf;
 std::unordered_map::const_iterator got = 
m_aItemList.find (_nPos);
-buf.appendUtf32( got->second );
+if (got != m_aItemList.end())
+buf.appendUtf32(got->second);
 aFind->second->maText = buf.makeStringAndClear();
 Point pix = MapIndexToPixel( _nPos );
 aFind->second->maRect = tools::Rectangle( Point( pix.X() + 1, pix.Y() 
+ 1 ), Size(nX-1,nY-1) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2018-02-28 Thread Tor Lillqvist
 svx/source/svdraw/svdomedia.cxx |   28 
 1 file changed, 24 insertions(+), 4 deletions(-)

New commits:
commit bf6ff1ac366ceff7bf46ff3cf40e39e236c2c1cb
Author: Tor Lillqvist 
Date:   Mon Feb 26 21:24:49 2018 +0200

tdf#79546: Make sure temp copy of inserted media file keeps the same 
extension

Inserting videos into Impress presentations with 'Insert>Audio or
Video' did not work at all for me. This helps. It seems that the
AVFoundation APIs are sadly rather picky about file name extensions.

Why we need to make a temporary copy of the media file (which after
all can be rather large) at all, when inserting it in a slide, I don't
understand. But I am not going to dig into that now.

Change-Id: I43fcfb5bb3ef0a2c0f8979ac3e7c458a84f180a1
Reviewed-on: https://gerrit.libreoffice.org/50390
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 
(cherry picked from commit 1aa5a3874bf716acfbded2a09319dce5d4ce8c0d)
Reviewed-on: https://gerrit.libreoffice.org/50440
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index 785a3a0f73fb..9fb5645738d5 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column:100 -*- */
 /*
  * This file is part of the LibreOffice project.
  *
@@ -269,7 +269,8 @@ uno::Reference 
SdrMediaObj::GetInputStream()
 
 static bool lcl_CopyToTempFile(
 uno::Reference const& xInStream,
-OUString & o_rTempFileURL)
+OUString & o_rTempFileURL,
+const OUString& rDesiredExtension)
 {
 OUString tempFileURL;
 ::osl::FileBase::RC const err =
@@ -280,6 +281,17 @@ static bool lcl_CopyToTempFile(
 return false;
 }
 
+if (!rDesiredExtension.isEmpty())
+{
+OUString newTempFileURL = tempFileURL + rDesiredExtension;
+if (osl::File::move(tempFileURL, newTempFileURL) != 
osl::FileBase::E_None)
+{
+SAL_WARN("svx", "Could not rename file '" << tempFileURL << "' to 
'" << newTempFileURL << "'");
+return false;
+}
+tempFileURL = newTempFileURL;
+}
+
 try
 {
 ::ucbhelper::Content tempContent(tempFileURL,
@@ -304,7 +316,7 @@ void 
SdrMediaObj::SetInputStream(uno::Reference const& xStream
 return;
 }
 OUString tempFileURL;
-bool const bSuccess = lcl_CopyToTempFile(xStream, tempFileURL);
+bool const bSuccess = lcl_CopyToTempFile(xStream, tempFileURL, "");
 if (bSuccess)
 {
 m_xImpl->m_pTempFile.reset(new MediaTempFile(tempFileURL));
@@ -346,7 +358,15 @@ static bool lcl_HandlePackageURL(
 SAL_WARN("svx", "no stream?");
 return false;
 }
-return lcl_CopyToTempFile(xInStream, o_rTempFileURL);
+// Make sure the temporary copy has the same file name extension as the 
original media file
+// (like .mp4). That seems to be important for some AVFoundation APIs. For 
random extension-less
+// file names, they don't seem to even bother looking inside the file.
+sal_Int32 nLastDot = rURL.lastIndexOf('.');
+sal_Int32 nLastSlash = rURL.lastIndexOf('/');
+OUString sDesiredExtension;
+if (nLastDot > nLastSlash && nLastDot+1 < rURL.getLength())
+sDesiredExtension = rURL.copy(nLastDot);
+return lcl_CopyToTempFile(xInStream, o_rTempFileURL, sDesiredExtension);
 }
 #endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2018-02-22 Thread Julien Nabet
 svx/source/form/formcontroller.cxx |   34 ++
 1 file changed, 34 insertions(+)

New commits:
commit 074cda388a8c378f3ab433c1f4a5f086b4dcd67e
Author: Julien Nabet 
Date:   Thu Jan 25 14:52:43 2018 +0100

tdf#107134: add comparator in form filter

Change-Id: I86d3b5c4ebd231bdad70dc9f5a364658cfca6df4
Reviewed-on: https://gerrit.libreoffice.org/48609
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 
(cherry picked from commit 819ba42b3409bd2f66593f619f1934ea7f461364)
Reviewed-on: https://gerrit.libreoffice.org/49681
Reviewed-by: Eike Rathke 

diff --git a/svx/source/form/formcontroller.cxx 
b/svx/source/form/formcontroller.cxx
index 15be71774403..f7d53f99128a 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -51,6 +51,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -3170,6 +3171,39 @@ void 
FormController::setFilter(::std::vector& rFieldInfos)
 if ( pParseNode != nullptr )
 {
 OUString sCriteria;
+switch (pRefValues[j].Handle)
+{
+case css::sdb::SQLFilterOperator::EQUAL:
+sCriteria += "=";
+break;
+case 
css::sdb::SQLFilterOperator::NOT_EQUAL:
+sCriteria += "!=";
+break;
+case css::sdb::SQLFilterOperator::LESS:
+sCriteria += "<";
+break;
+case css::sdb::SQLFilterOperator::GREATER:
+sCriteria += ">";
+break;
+case 
css::sdb::SQLFilterOperator::LESS_EQUAL:
+sCriteria += "<=";
+break;
+case 
css::sdb::SQLFilterOperator::GREATER_EQUAL:
+sCriteria += ">=";
+break;
+case css::sdb::SQLFilterOperator::LIKE:
+sCriteria += "LIKE ";
+break;
+case css::sdb::SQLFilterOperator::NOT_LIKE:
+sCriteria += "NOT LIKE ";
+break;
+case css::sdb::SQLFilterOperator::SQLNULL:
+sCriteria += "IS NULL";
+break;
+case 
css::sdb::SQLFilterOperator::NOT_SQLNULL:
+sCriteria += "IS NOT NULL";
+break;
+}
 pParseNode->parseNodeToPredicateStr( sCriteria
 
,xConnection
 ,xFormatter
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2018-02-22 Thread Caolán McNamara
 svx/source/dialog/srchdlg.cxx |   42 +-
 1 file changed, 17 insertions(+), 25 deletions(-)

New commits:
commit fc956febae30ed0604477c49a78247bc81cde66e
Author: Caolán McNamara 
Date:   Tue Feb 20 13:59:08 2018 +

Resolves: rhbz#1546997 'search not found' at 0,0 when window too narrow

if the statusbar hadn't got space for the initial label, then it doesn't 
get set a position,
so when later forced visible it draws at 0,0

call Resize on the toolbox to get it to relayout, and while we're at it
set the required size of the label so we might have space for it if that
text is shorter than the original len allocation

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

diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 504c52f2de4e..2ee79ba6b44d 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -2363,11 +2363,11 @@ SfxChildWinInfo SvxSearchDialogWrapper::GetInfo() const
 }
 
 
-static vcl::Window* lcl_GetSearchLabelWindow()
+static void lcl_SetSearchLabelWindow(const OUString& rStr)
 {
 SfxViewFrame* pViewFrame = SfxViewFrame::Current();
 if (!pViewFrame)
-return nullptr;
+return;
 
 css::uno::Reference< css::beans::XPropertySet > xPropSet(
 pViewFrame->GetFrame().GetFrameInterface(), 
css::uno::UNO_QUERY_THROW);
@@ -2376,7 +2376,7 @@ static vcl::Window* lcl_GetSearchLabelWindow()
 css::uno::Reference< css::ui::XUIElement > xUIElement =
 xLayoutManager->getElement("private:resource/toolbar/findbar");
 if (!xUIElement.is())
-return nullptr;
+return;
 css::uno::Reference< css::awt::XWindow > xWindow(
 xUIElement->getRealInterface(), css::uno::UNO_QUERY_THROW);
 VclPtr< ToolBox > pToolBox = static_cast( 
VCLUnoHelper::GetWindow(xWindow).get() );
@@ -2384,9 +2384,19 @@ static vcl::Window* lcl_GetSearchLabelWindow()
 {
 sal_uInt16 id = pToolBox->GetItemId(i);
 if (pToolBox->GetItemCommand(id) == ".uno:SearchLabel")
-return pToolBox->GetItemWindow(id);
+{
+vcl::Window* pSearchLabel = pToolBox->GetItemWindow(id);
+assert(pSearchLabel);
+pSearchLabel->Hide();
+pSearchLabel->SetText(rStr);
+if (!rStr.isEmpty())
+{
+pSearchLabel->SetSizePixel(pSearchLabel->get_preferred_size());
+pSearchLabel->Show();
+}
+}
 }
-return nullptr;
+pToolBox->Resize();
 }
 
 void SvxSearchDialogWrapper::SetSearchLabel(const SearchLabel& rSL)
@@ -2401,16 +2411,7 @@ void SvxSearchDialogWrapper::SetSearchLabel(const 
SearchLabel& rSL)
 else if (rSL == SearchLabel::NotFound)
 sStr = SvxResId(RID_SVXSTR_SEARCH_NOT_FOUND);
 
-if (vcl::Window *pSearchLabel = lcl_GetSearchLabelWindow())
-{
-if (sStr.isEmpty())
-pSearchLabel->Hide();
-else
-{
-pSearchLabel->SetText(sStr);
-pSearchLabel->Show();
-}
-}
+lcl_SetSearchLabelWindow(sStr);
 if (SvxSearchDialogWrapper *pWrp = static_cast( 
SfxViewFrame::Current()->
 GetChildWindow( SvxSearchDialogWrapper::GetChildWindowId() )))
 pWrp->getDialog()->SetSearchLabel(sStr);
@@ -2419,16 +2420,7 @@ void SvxSearchDialogWrapper::SetSearchLabel(const 
SearchLabel& rSL)
 void SvxSearchDialogWrapper::SetSearchLabel(const OUString& sStr)
 {
 
-if (vcl::Window *pSearchLabel = lcl_GetSearchLabelWindow())
-{
-if (sStr.isEmpty())
-pSearchLabel->Hide();
-else
-{
-pSearchLabel->SetText(sStr);
-pSearchLabel->Show();
-}
-}
+lcl_SetSearchLabelWindow(sStr);
 if (SvxSearchDialogWrapper *pWrp = static_cast( 
SfxViewFrame::Current()->
 GetChildWindow( SvxSearchDialogWrapper::GetChildWindowId() )))
 pWrp->getDialog()->SetSearchLabel(sStr);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2018-02-20 Thread Michael Stahl
 svx/source/gallery2/gallery1.cxx |   14 --
 1 file changed, 4 insertions(+), 10 deletions(-)

New commits:
commit 854d5f0f4f4f61d559305befa1daf2721b3d4ee6
Author: Michael Stahl 
Date:   Mon Feb 19 13:16:07 2018 +0100

svx: fix deadlock in Gallery::GetGalleryInstance()

Seen in UITest_writer_tests.

Use C++11 thread-safe static initialisation here, which should
avoid the deadlock that is caused by relying on
osl::Mutex::getGlobalMutex().

Thread #1:

2  in osl_acquireMutex(oslMutexImpl*) (pMutex=0x1ad2c70) at 
sal/osl/unx/mutex.cxx:97
3  in osl::Mutex::acquire() (this=0x7ff3252b9628 ::get()::instance>) at 
include/osl/mutex.hxx:56
4  in osl::Guard::Guard(osl::Mutex&) (this=0x7ffca8bdd6c0, 
t=...) at include/osl/mutex.hxx:129
5  in cppu::getTypeEntries(cppu::class_data*) (cd=0x7ff31e458fe0 
, com::sun::star::io::XActiveDataControl, 
com::sun::star::io::XActiveDataSink>::operator()()::s_cd>) at 
cppuhelper/source/implbase_ex.cxx:89
6  in cppu::queryDeepNoXInterface(typelib_TypeDescriptionReference const*, 
cppu::class_data*, void*) (pDemandedTDR=0x2e643b0, cd=0x7ff31e458fe0 
, com::sun::star::io::XActiveDataControl, 
com::sun::star::io::XActiveDataSink>::operator()()::s_cd>, that=0x387cbe0) at 
cppuhelper/source/implbase_ex.cxx:173
[...]
20 in utl::UcbStreamHelper::CreateStream(rtl::OUString const&, StreamMode) 
(rFileName="file://instdir/program/../share/gallery/sounds.thm", 
eOpenMode=StreamMode::READ) at unotools/source/ucbhelper/ucbstreamhelper.cxx:149
21 in GalleryTheme::CreateThemeEntry(INetURLObject const&, bool) (rURL=..., 
bReadOnly=false) at svx/source/gallery2/galtheme.cxx:692
22 in Gallery::ImplLoadSubDirs(INetURLObject const&, bool&) 
(this=0x38762c0, rBaseURL=..., rbDirIsReadOnly=@0x7ffca8bde7df: false) at 
svx/source/gallery2/gallery1.cxx:474
23 in Gallery::ImplLoad(rtl::OUString const&) (this=0x38762c0, 
rMultiPath="file://instdir/program/../share/gallery;file://workdir/UITest/writer_tests/user/user/gallery")
 at svx/source/gallery2/gallery1.cxx:301
24 in Gallery::Gallery(rtl::OUString const&) (this=0x38762c0, 
rMultiPath="file://instdir/program/../share/gallery;file://workdir/UITest/writer_tests/user/user/gallery")
 at svx/source/gallery2/gallery1.cxx:257
25 in Gallery::GetGalleryInstance() () at 
svx/source/gallery2/gallery1.cxx:273
26 in GalleryExplorer::BeginLocking(unsigned int) (nThemeId=3) at 
svx/source/gallery2/galexpl.cxx:264
27 in SvxBmpNumValueSet::init() (this=0x3873ed0) at 
svx/source/dialog/svxbmpnumvalueset.cxx:501

Thread #8 Grammar Checking:

2  in osl_acquireMutex(oslMutexImpl*) (pMutex=0x7ff329045420 
) at sal/osl/unx/mutex.cxx:97
3  in osl::Mutex::acquire() (this=0x7ff32903b780 
) at include/osl/mutex.hxx:56
4  in osl::Guard::Guard(osl::Mutex*) (this=0x7ff2f5b30030, 
pT_=0x7ff32903b780 ) at 
include/osl/mutex.hxx:122
5  in 
com::sun::star::container::cppu_detail_getUnoType(com::sun::star::container::XEnumeration
 const*) () at 
workdir/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/container/XEnumeration.hpp:69
6  in cppu::UnoType::get() () at 
include/cppu/unotype.hxx:296
7  in 
cppu::detail::cppu_detail_getUnoType(com::sun::star::uno::Reference
 const*) () at include/cppu/unotype.hxx:259
8  in 
cppu::UnoType::get() () at include/cppu/unotype.hxx:296
9  in 
com::sun::star::reflection::detail::theXTypeDescriptionEnumerationType::operator()()
 const (this=0x7ff2f5b30177) at 
workdir/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/reflection/XTypeDescriptionEnumeration.hpp:30
10 in rtl::StaticWithInit::get() () at include/rtl/instance.hxx:603
11 in 
com::sun::star::reflection::cppu_detail_getUnoType(com::sun::star::reflection::XTypeDescriptionEnumeration
 const*) () at 
workdir/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/reflection/XTypeDescriptionEnumeration.hpp:57
12 in 
cppu::UnoType::get() 
() at include/cppu/unotype.hxx:296
13 in 
com::sun::star::reflection::XTypeDescriptionEnumeration::static_type(void*) () 
at 
workdir/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/reflection/XTypeDescriptionEnumeration.hpp:102
14 in cppu::getTypeEntries(cppu::class_data*) (cd=0x7ff3252b8ac0 


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2018-02-19 Thread Caolán McNamara
 svx/source/svdraw/svdattr.cxx |  111 +-
 1 file changed, 100 insertions(+), 11 deletions(-)

New commits:
commit c26995f9d725a317e9ba27310ac64f5e25bb570f
Author: Caolán McNamara 
Date:   Mon Feb 19 10:43:06 2018 +

Related: tdf#114756 fix up similar cases

Change-Id: Id67ccaeda6ebff477f5d86617863280766713f24
Reviewed-on: https://gerrit.libreoffice.org/49982
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 

diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index a6f6af0391e9..9524354de7d8 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -889,7 +889,15 @@ sal_uInt16 SdrCaptionTypeItem::GetValueCount() const { 
return 4; }
 
 OUString SdrCaptionTypeItem::GetValueTextByPos(sal_uInt16 nPos) const
 {
-return ImpGetResStr(STR_ItemValCAPTIONTYPE1+nPos);
+static const char* ITEMVALCAPTIONTYPES[] =
+{
+STR_ItemValCAPTIONTYPE1,
+STR_ItemValCAPTIONTYPE2,
+STR_ItemValCAPTIONTYPE3,
+STR_ItemValCAPTIONTYPE4
+};
+assert(nPos < SAL_N_ELEMENTS(ITEMVALCAPTIONTYPES) && "wrong pos!");
+return ImpGetResStr(ITEMVALCAPTIONTYPES[nPos]);
 }
 
 bool SdrCaptionTypeItem::GetPresentation(SfxItemPresentation ePres,
@@ -912,7 +920,14 @@ sal_uInt16 SdrCaptionEscDirItem::GetValueCount() const { 
return 3; }
 
 OUString SdrCaptionEscDirItem::GetValueTextByPos(sal_uInt16 nPos) const
 {
-return ImpGetResStr(STR_ItemValCAPTIONESCHORI+nPos);
+static const char* ITEMVALCAPTIONTYPES[] =
+{
+STR_ItemValCAPTIONESCHORI,
+STR_ItemValCAPTIONESCVERT,
+STR_ItemValCAPTIONESCBESTFIT
+};
+assert(nPos < SAL_N_ELEMENTS(ITEMVALCAPTIONTYPES) && "wrong pos!");
+return ImpGetResStr(ITEMVALCAPTIONTYPES[nPos]);
 }
 
 bool SdrCaptionEscDirItem::GetPresentation(SfxItemPresentation ePres,
@@ -942,7 +957,15 @@ sal_uInt16 SdrTextFitToSizeTypeItem::GetValueCount() const 
{ return 4; }
 
 OUString SdrTextFitToSizeTypeItem::GetValueTextByPos(sal_uInt16 nPos) const
 {
-return ImpGetResStr(STR_ItemValFITTOSIZENONE+nPos);
+static const char* ITEMVALFITTISIZETYPES[] =
+{
+STR_ItemValFITTOSIZENONE,
+STR_ItemValFITTOSIZEPROP,
+STR_ItemValFITTOSIZEALLLINES,
+STR_ItemValFITTOSIZERESIZEAT
+};
+assert(nPos < SAL_N_ELEMENTS(ITEMVALFITTISIZETYPES) && "wrong pos!");
+return ImpGetResStr(ITEMVALFITTISIZETYPES[nPos]);
 }
 
 bool SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPresentation ePres,
@@ -999,7 +1022,16 @@ sal_uInt16 SdrTextVertAdjustItem::GetValueCount() const { 
return 5; }
 
 OUString SdrTextVertAdjustItem::GetValueTextByPos(sal_uInt16 nPos) const
 {
-return ImpGetResStr(STR_ItemValTEXTVADJTOP+nPos);
+static const char* ITEMVALTEXTVADJTYPES[] =
+{
+STR_ItemValTEXTVADJTOP,
+STR_ItemValTEXTVADJCENTER,
+STR_ItemValTEXTVADJBOTTOM,
+STR_ItemValTEXTVADJBLOCK,
+STR_ItemValTEXTVADJSTRETCH
+};
+assert(nPos < SAL_N_ELEMENTS(ITEMVALTEXTVADJTYPES) && "wrong pos!");
+return ImpGetResStr(ITEMVALTEXTVADJTYPES[nPos]);
 }
 
 bool SdrTextVertAdjustItem::GetPresentation(SfxItemPresentation ePres,
@@ -1052,7 +1084,16 @@ sal_uInt16 SdrTextHorzAdjustItem::GetValueCount() const 
{ return 5; }
 
 OUString SdrTextHorzAdjustItem::GetValueTextByPos(sal_uInt16 nPos) const
 {
-return ImpGetResStr(STR_ItemValTEXTHADJLEFT+nPos);
+static const char* ITEMVALTEXTHADJTYPES[] =
+{
+STR_ItemValTEXTHADJLEFT,
+STR_ItemValTEXTHADJCENTER,
+STR_ItemValTEXTHADJRIGHT,
+STR_ItemValTEXTHADJBLOCK,
+STR_ItemValTEXTHADJSTRETCH
+};
+assert(nPos < SAL_N_ELEMENTS(ITEMVALTEXTHADJTYPES) && "wrong pos!");
+return ImpGetResStr(ITEMVALTEXTHADJTYPES[nPos]);
 }
 
 bool SdrTextHorzAdjustItem::GetPresentation(SfxItemPresentation ePres,
@@ -1098,7 +1139,16 @@ sal_uInt16 SdrTextAniKindItem::GetValueCount() const { 
return 5; }
 
 OUString SdrTextAniKindItem::GetValueTextByPos(sal_uInt16 nPos) const
 {
-return ImpGetResStr(STR_ItemValTEXTANI_NONE+nPos);
+static const char* ITEMVALTEXTANITYPES[] =
+{
+STR_ItemValTEXTANI_NONE,
+STR_ItemValTEXTANI_BLINK,
+STR_ItemValTEXTANI_SCROLL,
+STR_ItemValTEXTANI_ALTERNATE,
+STR_ItemValTEXTANI_SLIDE
+};
+assert(nPos < SAL_N_ELEMENTS(ITEMVALTEXTANITYPES) && "wrong pos!");
+return ImpGetResStr(ITEMVALTEXTANITYPES[nPos]);
 }
 
 bool SdrTextAniKindItem::GetPresentation(SfxItemPresentation ePres,
@@ -1143,7 +1193,15 @@ sal_uInt16 SdrTextAniDirectionItem::GetValueCount() 
const { return 4; }
 
 OUString SdrTextAniDirectionItem::GetValueTextByPos(sal_uInt16 nPos) const
 {
-return ImpGetResStr(STR_ItemValTEXTANI_LEFT+nPos);
+static const char* ITEMVALTEXTANITYPES[] =
+{
+STR_ItemValTEXTANI_LEFT,
+STR_ItemValTEXTANI_UP,
+

[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2018-02-19 Thread Julien Nabet
 svx/source/svdraw/svdattr.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit a42cc82de16d2fb142624a86b892f81522814698
Author: Julien Nabet 
Date:   Sun Feb 18 11:18:32 2018 +0100

tdf#114756: fix connector dropdown

bt:
0  0x7fffef4738d3 in SdrEdgeKindItem::GetValueTextByPos(unsigned short) 
const (this=0x587ff770, nPos=0)
at /home/julien/lo/libreoffice/svx/source/svdraw/svdattr.cxx:1307
1  0x7fffba50f71b in SvxConnectionPage::FillTypeLB() 
(this=0x5c4d2a90) at 
/home/julien/lo/libreoffice/cui/source/tabpages/connect.cxx:507
2  0x7fffba50be46 in SvxConnectionPage::SvxConnectionPage(vcl::Window*, 
SfxItemSet const&) (this=0x5c4d2a90, pWindow=0x5c46cc70, rInAttrs=
SfxItemSet of pool 0x57883790 with parent 0x0 and Which ranges: 
[(1000, 1234), (4003, 4057)], __in_chrg=, __vtt_parm=)
at /home/julien/lo/libreoffice/cui/source/tabpages/connect.cxx:98
See https://bugs.documentfoundation.org/attachment.cgi?id=139972

Change-Id: I24ba9e0140668d666da686e3f8a05587b46e923f
Reviewed-on: https://gerrit.libreoffice.org/49924
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 
(cherry picked from commit a2721ba03e61a476838d3c518505b05a12ad2a5b)
Reviewed-on: https://gerrit.libreoffice.org/49973
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index e7447041e23b..a6f6af0391e9 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -1304,7 +1304,15 @@ sal_uInt16 SdrEdgeKindItem::GetValueCount() const { 
return 4; }
 
 OUString SdrEdgeKindItem::GetValueTextByPos(sal_uInt16 nPos) const
 {
-return ImpGetResStr(STR_ItemValEDGE_ORTHOLINES+nPos);
+static const char* ITEMVALEDGES[] =
+{
+STR_ItemValEDGE_ORTHOLINES,
+STR_ItemValEDGE_THREELINES,
+STR_ItemValEDGE_ONELINE,
+STR_ItemValEDGE_BEZIER
+};
+assert(nPos < SAL_N_ELEMENTS(ITEMVALEDGES) && "wrong pos!");
+return ImpGetResStr(ITEMVALEDGES[nPos]);
 }
 
 bool SdrEdgeKindItem::GetPresentation(SfxItemPresentation ePres,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2018-02-13 Thread Maxim Monastirsky
 svx/source/tbxctrls/tbcontrl.cxx |8 
 1 file changed, 8 deletions(-)

New commits:
commit 9cb3b0f5cbf7d35342ed2d5c5c1130f63ef050e3
Author: Maxim Monastirsky 
Date:   Fri Feb 9 11:22:41 2018 +0200

tdf#107403 Don't scale frame icons twice

It's already done by ImplImageTree, see loadImageFromStream
function in ImplImageTree.cxx.

Change-Id: I5aa7439876037fb0168f6c1da264af9697788ef0
Reviewed-on: https://gerrit.libreoffice.org/49478
Tested-by: Jenkins 
Reviewed-by: Maxim Monastirsky 
(cherry picked from commit 273d0ee7b7edb24c2c9e15e9f4337f71c175801a)
Reviewed-on: https://gerrit.libreoffice.org/49549
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index efd6c4861f4e..997520fd5e32 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1967,14 +1967,6 @@ void SvxFrameWindow_Impl::InitImageList()
 aImgVec.emplace_back(RID_SVXBMP_FRAME10);
 aImgVec.emplace_back(RID_SVXBMP_FRAME11);
 aImgVec.emplace_back(RID_SVXBMP_FRAME12);
-
-if (GetParent()->GetDPIScaleFactor() > 1)
-{
-for (size_t i = 0; i < aImgVec.size(); ++i)
-{
-aImgVec[i].Scale(GetParent()->GetDPIScaleFactor(), 
GetParent()->GetDPIScaleFactor());
-}
-}
 }
 
 static Color lcl_mediumColor( Color aMain, Color /*aDefault*/ )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2018-01-10 Thread Mark Hung
 svx/source/svdraw/svdoedge.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 37052f28ff18a0d74c482f6169a3d02a7bd960fa
Author: Mark Hung 
Date:   Fri Dec 15 22:21:27 2017 +0800

tdf#51188: allow connector gluepoint undo

It should had overwritten the connector data when the
connector attach to a different glue point of the same
object. Let’s always overwrite it, though it waste a
little bit time.

Change-Id: Ib4cc4bf105e5ef17289e027dcddd0110f7297190
Reviewed-on: https://gerrit.libreoffice.org/46559
Tested-by: Jenkins 
Reviewed-by: Mark Hung 
(cherry picked from commit 4173798ef73d3fc7da8c5b8fa575a36f05cd6f83)
Reviewed-on: https://gerrit.libreoffice.org/47248
Reviewed-by: Noel Grandin 
Reviewed-by: Katarina Behrens 

diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 02ef84946b31..150fbc2b8811 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -2449,11 +2449,17 @@ void SdrEdgeObj::RestGeoData(const SdrObjGeoData& rGeo)
 aCon1=rEGeo.aCon1;
 if (aCon1.pObj!=nullptr) aCon1.pObj->AddListener(*this);
 }
+else
+aCon1=rEGeo.aCon1;
+
 if (aCon2.pObj!=rEGeo.aCon2.pObj) {
 if (aCon2.pObj!=nullptr) aCon2.pObj->RemoveListener(*this);
 aCon2=rEGeo.aCon2;
 if (aCon2.pObj!=nullptr) aCon2.pObj->AddListener(*this);
 }
+else
+aCon2=rEGeo.aCon2;
+
 *pEdgeTrack=*rEGeo.pEdgeTrack;
 bEdgeTrackDirty=rEGeo.bEdgeTrackDirty;
 bEdgeTrackUserDefined=rEGeo.bEdgeTrackUserDefined;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2018-01-03 Thread Julien Nabet
 svx/source/form/filtnav.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 93f8172ffb783da95391ac53ab6402f5a055aa44
Author: Julien Nabet 
Date:   Wed Jan 3 19:09:49 2018 +0100

tdf#114788: fix crash in form-based filter

regression from 
https://cgit.freedesktop.org/libreoffice/core/diff/svx/source/form/filtnav.cxx?id=85f93697defd9a812a0cda0bc4e9364e28c0339e

Change-Id: If6f248b460a55aa1e30902d5edeb807dabb37d7b
Reviewed-on: https://gerrit.libreoffice.org/47338
(cherry picked from commit d2c9b749503ef0763a6140a7b509f73adb6015d2)
Reviewed-on: https://gerrit.libreoffice.org/47357
Tested-by: Jenkins 
Reviewed-by: Lionel Elie Mamane 

diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 989019e0a702..393c23ff9cbf 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1144,7 +1144,7 @@ bool FmFilterNavigator::EditingEntry( SvTreeListEntry* 
pEntry, Selection& rSelec
 if (!SvTreeListBox::EditingEntry( pEntry, rSelection ))
 return false;
 
-return pEntry && dynamic_cast(static_cast(pEntry->GetUserData())) == nullptr;
+return pEntry && dynamic_cast(static_cast(pEntry->GetUserData())) != nullptr;
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2017-12-31 Thread Julien Nabet
 svx/source/fmcomp/fmgridcl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1823d8d0f1a1f29db8cb4bfbfbf2b7b2c94dcbb7
Author: Julien Nabet 
Date:   Sun Dec 31 15:50:36 2017 +0100

tdf#114775: fix crash when deleting some rows

see bt https://bugs.documentfoundation.org/attachment.cgi?id=138757

Change-Id: I493bf47b1541262a5ea78b541bc1f47f93cc73df
Reviewed-on: https://gerrit.libreoffice.org/47227
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 57af471fda3f..0ed000716416 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -1840,7 +1840,7 @@ Sequence< Any> FmGridControl::getSelectionBookmarks()
 // change our selection. So a "FirstSelected(); SeekCursor(); 
NextSelected();" may produce unpredictable results.
 // That's why we _first_ collect the indices of the selected rows and 
_then_ their bookmarks.
 long nIdx = FirstSelectedRow();
-while (nIdx >= 0)
+while (nIdx != BROWSER_ENDOFSELECTION)
 {
 // (we misuse the bookmarks array for this ...)
 pBookmarks[i++] <<= (sal_Int32)nIdx;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2017-12-19 Thread Mark Hung
 svx/source/svdraw/svdoedge.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 15946e60b8f38ed978883baec97e487e88824ff6
Author: Mark Hung 
Date:   Tue Dec 12 23:40:57 2017 +0800

tdf#51188: notify that geometry has changed when dragging the connector.

Change-Id: I7b7cb7719c9c735eeb4f964b1ae6ce6819186aed
Reviewed-on: https://gerrit.libreoffice.org/46319
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 
(cherry picked from commit 98de1ed2e2c49ea52f398f666aef7480b60e4e3c)
Reviewed-on: https://gerrit.libreoffice.org/46516
Reviewed-by: Christian Lohmaier 

diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index f81c1b3d5710..02ef84946b31 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -1854,6 +1854,8 @@ bool SdrEdgeObj::applySpecialDrag(SdrDragStat& rDragStat)
 const bool bDragA(0 == rDragStat.GetHdl()->GetPointNum());
 const Point aPointNow(rDragStat.GetNow());
 
+rDragStat.SetEndDragChangesGeoAndAttributes(true);
+
 if(rDragStat.GetPageView())
 {
 SdrObjConnection* pDraggedOne(bDragA ?  : );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svx/source

2017-11-30 Thread Daniel
 svx/source/table/tablecontroller.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit cf715c7c60bd37d69f6fd6cbcb55e320503d9e36
Author: Daniel 
Date:   Wed Nov 29 00:26:43 2017 -0200

tdf#111773 tdf#111780 Fix selection after merge cells in an Impress table

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

diff --git a/svx/source/table/tablecontroller.cxx 
b/svx/source/table/tablecontroller.cxx
index 521ace14a873..6649ba4df9b4 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -2757,12 +2757,12 @@ IMPL_LINK_NOARG(SvxTableController, UpdateHdl, void*, 
void)
 CellPos aEnd( maCursorLastPos );
 checkCell(aStart);
 checkCell(aEnd);
-if( aStart != maCursorFirstPos  || aEnd != maCursorLastPos )
+if( aStart != maCursorFirstPos || aEnd != maCursorLastPos )
 {
 setSelectedCells( aStart, aEnd );
+updateSelectionOverlay();
 }
 }
-updateSelectionOverlay();
 }
 
 namespace
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits