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

2018-08-24 Thread Libreoffice Gerrit user
 sfx2/source/doc/objserv.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2169b1f16356dbebc662b6f60fd176ca2d6c4e52
Author: Caolán McNamara 
AuthorDate: Thu Aug 23 15:57:47 2018 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Aug 24 09:40:40 2018 +0200

tdf#117426 don't crash is infobar is disposed in preview view

Change-Id: Iff2dece2ea5f65c5d0896af888e05703ae709c65
Reviewed-on: https://gerrit.libreoffice.org/59520
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 1f14aa27b889..4ae9d094385e 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1046,7 +1046,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet )
 if ( !sMessage.isEmpty() )
 {
 auto pInfoBar = pFrame->AppendInfoBar("signature", 
sMessage, aInfoBarType);
-if (pInfoBar == nullptr)
+if (pInfoBar == nullptr || pInfoBar->IsDisposed())
 return;
 VclPtrInstance 
xBtn(&(pFrame->GetWindow()));
 xBtn->SetText(SfxResId(STR_SIGNATURE_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' - sfx2/source

2018-07-23 Thread Libreoffice Gerrit user
 sfx2/source/doc/objxtor.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d4052d2ca523cc000132620aaecb59c14c17e20d
Author: Markus Mohrhard 
AuthorDate: Sat Jul 21 01:57:27 2018 +0200
Commit: Michael Meeks 
CommitDate: Mon Jul 23 19:28:56 2018 +0200

fix shutdown crash when SfxApplication has already been destroyed

See e.g. 
http://crashreport.libreoffice.org/stats/crash_details/dc1ae6ff-923e-44f6-99a9-84893039efd7

Change-Id: I3b5a24bfb62977ca922bf3bececb6676691bf6ea
Reviewed-on: https://gerrit.libreoffice.org/57789
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard 
(cherry picked from commit 715fcaff01ed048c52c69264a7a0fb773dd57b32)
Reviewed-on: https://gerrit.libreoffice.org/57809
Reviewed-by: Michael Meeks 

diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 959666dfcc74..e1a130c7fc79 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -314,13 +314,13 @@ SfxObjectShell::~SfxObjectShell()
 DELETEX(AutoReloadTimer_Impl, pImpl->pReloadTimer );
 
 SfxApplication *pSfxApp = SfxGetpApp();
-if ( USHRT_MAX != pImpl->nVisualDocumentNumber )
+if ( USHRT_MAX != pImpl->nVisualDocumentNumber && pSfxApp )
 pSfxApp->ReleaseIndex(pImpl->nVisualDocumentNumber);
 
 // Destroy Basic-Manager
 pImpl->aBasicManager.reset( nullptr );
 
-if ( pSfxApp->GetDdeService() )
+if ( pSfxApp && pSfxApp->GetDdeService() )
 pSfxApp->RemoveDdeTopic( this );
 
 pImpl->pBaseModel.set( 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' - sfx2/source

2018-05-23 Thread Tor Lillqvist
 sfx2/source/doc/templatedlg.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 30bdedc49f7007ce0305d013ac89c910c6cb1ae4
Author: Tor Lillqvist 
Date:   Tue May 22 11:00:35 2018 +0300

Open template read-only

Otherwise when creating a new docuent based on a template, the
template document file is opened read-write eventually (after first
being opened read-only five times, and closed again...). Sure,
LibreOffice probably doesn't actually write anything to it, but still,
just opening read-write when you are going to only read is silly.

Stack trace from the read-write opening:

 #0  0x7f063dea0047 in openFilePath(char const*, void**, unsigned int, 
unsigned int) (cpFilePath=0x7ffeacc7d610 
"/ssd1/lo/fedora/instdir/share/template/common/officorr/Modern_business_letter_sans_serif.ott",
 pHandle=0x342af78, uFlags=3, mode=438)
at /ssd1/lo/fedora/sal/osl/unx/file.cxx:1039
 #1  0x7f063dea027b in openFile(_rtl_uString*, void**, unsigned int, 
unsigned int) (ustrFileURL=0x33ff7e0, pHandle=0x342af78, uFlags=3, 
mode=4294967295) at /ssd1/lo/fedora/sal/osl/unx/file.cxx:1071
 #2  0x7f063dea01a8 in osl_openFile(rtl_uString*, oslFileHandle*, 
sal_uInt32) (ustrFileURL=0x33ff7e0, pHandle=0x342af78, uFlags=3)
at /ssd1/lo/fedora/sal/osl/unx/file.cxx:1050
 #3  0x7f060aec5f1a in osl::File::open(unsigned int) (this=0x342af78, 
uFlags=3) at /ssd1/lo/fedora/include/osl/file.hxx:975
 #4  0x7f060aec5a8f in fileaccess::ReconnectingFile::open(unsigned int) 
(this=0x342af78, uFlags=3)
at /ssd1/lo/fedora/ucb/source/ucp/file/filrec.cxx:50
 #5  0x7f060aee0324 in 
fileaccess::XStream_impl::XStream_impl(rtl::OUString const&, bool) 
(this=0x342af10, 
aUncPath="file:///ssd1/lo/fedora/instdir/share/template/common/officorr/Modern_business_letter_sans_serif.ott",
 bLock=true) at /ssd1/lo/fedora/ucb/source/ucp/file/filstr.cxx:58
 #6  0x7f060aee8bac in fileaccess::TaskManager::open_rw(int, 
rtl::OUString const&, bool) (this=0x2c5ded0, CommandId=231, 
aUnqPath="file:///ssd1/lo/fedora/instdir/share/template/common/officorr/Modern_business_letter_sans_serif.ott",
 bLock=true)
at /ssd1/lo/fedora/ucb/source/ucp/file/filtask.cxx:766
 #7  0x7f060ae9ba9b in fileaccess::BaseContent::open(int, 
com::sun::star::ucb::OpenCommandArgument2 const&) (this=0x3428810, 
nMyCommandIdentifier=231, aCommandArgument=...) at 
/ssd1/lo/fedora/ucb/source/ucp/file/bc.cxx:937
 #8  0x7f060ae99dfa in 
fileaccess::BaseContent::execute(com::sun::star::ucb::Command const&, int, 
com::sun::star::uno::Reference 
const&) (this=0x3428810, aCommand=..., CommandId=231, 
Environment=uno::Reference to (ucbhelper::CommandEnvironment *) 0x341d088) at 
/ssd1/lo/fedora/ucb/source/ucp/file/bc.cxx:331
 #9  0x7f060ae9d001 in non-virtual thunk to 
fileaccess::BaseContent::execute(com::sun::star::ucb::Command const&, int, 
com::sun::star::uno::Reference 
const&) () at /ssd1/lo/fedora/instdir/program/../program/libucpfile1.so
 #10 0x7f06337395da in 
ucbhelper::Content_Impl::executeCommand(com::sun::star::ucb::Command const&) 
(this=0x3427f70, rCommand=...)
at /ssd1/lo/fedora/ucbhelper/source/client/content.cxx:1258
 #11 0x7f063373be55 in ucbhelper::Content::openWriteableStream() 
(this=0x7ffeacc7f030)
at /ssd1/lo/fedora/ucbhelper/source/client/content.cxx:751
 #12 0x7f06333f56c0 in 
utl::MediaDescriptor::impl_openStreamWithURL(rtl::OUString const&, bool) 
(this=0x7ffeacc801d0, 
sURL="file:///ssd1/lo/fedora/instdir/share/template/common/officorr/Modern_business_letter_sans_serif.ott",
 bLockFile=true)
at /ssd1/lo/fedora/unotools/source/misc/mediadescriptor.cxx:666
 #13 0x7f06333f3e01 in utl::MediaDescriptor::impl_addInputStream(bool) 
(this=0x7ffeacc801d0, bLockFile=true)
at /ssd1/lo/fedora/unotools/source/misc/mediadescriptor.cxx:521
 #14 0x7f06333f4051 in utl::MediaDescriptor::addInputStreamOwnLock() 
(this=0x7ffeacc801d0)
at /ssd1/lo/fedora/unotools/source/misc/mediadescriptor.cxx:490
 #15 0x7f05b132f0bf in 
filter::config::TypeDetection::impl_openStream(utl::MediaDescriptor&) 
(this=0x33caa10, rDescriptor=...)
at /ssd1/lo/fedora/filter/source/config/cache/typedetection.cxx:1127
 #16 0x7f05b132e9ac in 
filter::config::TypeDetection::impl_askDetectService(rtl::OUString const&, 
utl::MediaDescriptor&) (this=0x33caa10, 
sDetectService="com.sun.star.comp.filters.StorageFilterDetect", 
rDescriptor=...) at 
/ssd1/lo/fedora/filter/source/config/cache/typedetection.cxx:981
 #17 0x7f05b132b7a4 in 
filter::config::TypeDetection::impl_detectTypeFlatAndDeep(utl::MediaDescriptor&,
 std::__debug::vector const&, bool, 
std::__debug::vector&, 
rtl::OUString&) (this=0x33caa10, rDescriptor=..., 

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

2018-04-16 Thread Caolán McNamara
 sfx2/source/appl/workwin.cxx |   23 ++-
 sfx2/source/inc/workwin.hxx  |2 ++
 2 files changed, 24 insertions(+), 1 deletion(-)

New commits:
commit 32a38bae39661a4c0f08e5e2a9db8c4f1fda462a
Author: Caolán McNamara 
Date:   Fri Apr 13 10:10:29 2018 +0100

Resolves: tdf#116865 trigger pending sizing timers before arranging

trigger pending sizing timers now so we arrange with the final size of the
client area

Otherwise calling GetSizePixel in the Arranging loop will trigger the timers
anyway, causing reentry into Arrange_Impl again where the inner Arrange_Impl
arranges with the final size, and then returns to this outer Arrange_Impl 
which
would rearrange with the old client area size.

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

diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 8d0970ed5d81..3a09ab31aa5a 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -696,6 +696,20 @@ void SfxWorkWindow::ArrangeChildren_Impl( bool bForce )
 ArrangeAutoHideWindows( nullptr );
 }
 
+void SfxWorkWindow::FlushPendingChildSizes()
+{
+// tdf#116865, if any windows are being resized, i.e. their
+// resize timer is active, then calling GetSizePixel on
+// them forces the timer to fire and sets the final
+// size to which they are getting resized towards.
+for (size_t i = 0; i < aChildren.size(); ++i)
+{
+SfxChild_Impl *pCli = aChildren[i];
+if (!pCli || !pCli->pWin)
+continue;
+(void)pCli->pWin->GetSizePixel();
+}
+}
 
 SvBorder SfxWorkWindow::Arrange_Impl()
 
@@ -707,7 +721,14 @@ SvBorder SfxWorkWindow::Arrange_Impl()
 ClientArea, it is set to "not visible".
 */
 {
-
+//tdf#116865 trigger pending sizing timers now so we arrange
+//with the final size of the client area.
+//
+//Otherwise calling GetSizePixel in the following loop will trigger the
+//timers, causing reentry into Arrange_Impl again where the inner
+//Arrange_Impl arranges with the final size, and then returns to this outer
+//Arrange_Impl which would rearrange with the old client area size
+FlushPendingChildSizes();
 aClientArea = GetTopRect_Impl();
 aUpperClientArea = aClientArea;
 
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 6a80892900eb..0c714c479446 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -226,6 +226,8 @@ class SfxWorkWindow final
 voidSaveStatus_Impl(SfxChildWindow*, const 
SfxChildWinInfo&);
 static bool IsPluginMode( SfxObjectShell const * pObjShell );
 
+voidFlushPendingChildSizes();
+
 public:
 SfxWorkWindow( vcl::Window* pWin, SfxFrame* pFrm, 
SfxFrame* pMaster );
 ~SfxWorkWindow();
___
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' - sfx2/source

2018-04-03 Thread Julien Nabet
 sfx2/source/dialog/dinfdlg.cxx |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit 5d3313c832862b545cf6ec35c2b6c5fc08d8213c
Author: Julien Nabet 
Date:   Tue Feb 20 23:50:04 2018 +0100

tdf#115853: save current custom property when adding line

by reloading current lines before adding a brand new one
indeed the info are deleted by ClearCustomProperties
each time SfxDocumentInfoItem destructor is called

Change-Id: Id1e2e652e90c720f00b8612aa9afbfa91b784d1d
Reviewed-on: https://gerrit.libreoffice.org/50070
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 
Reviewed-on: https://gerrit.libreoffice.org/51297
Reviewed-by: Jean-Baptiste Faure 
Reviewed-by: Katarina Behrens 

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 145a9e4aebbc..6255a76e6c43 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -2160,6 +2160,20 @@ void SfxCustomPropertiesPage::dispose()
 
 IMPL_LINK_NOARG(SfxCustomPropertiesPage, AddHdl, Button*, void)
 {
+// tdf#115853: reload current lines before adding a brand new one
+// indeed the info are deleted by ClearCustomProperties
+// each time SfxDocumentInfoItem destructor is called
+SfxDocumentInfoItem pInfo;
+Sequence< beans::PropertyValue > aPropertySeq = 
m_pPropertiesCtrl->GetCustomProperties();
+sal_Int32 i = 0, nCount = aPropertySeq.getLength();
+for ( ; i < nCount; ++i )
+{
+if ( !aPropertySeq[i].Name.isEmpty() )
+{
+pInfo.AddCustomProperty( aPropertySeq[i].Name, 
aPropertySeq[i].Value );
+}
+}
+
 Any aAny;
 m_pPropertiesCtrl->AddLine( OUString(), aAny, true );
 }
___
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' - sfx2/source

2018-03-19 Thread Michael Stahl
 sfx2/source/dialog/templdlg.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 21f220fce05bb99964f098247786eec014e56902
Author: Michael Stahl 
Date:   Tue Mar 13 22:16:20 2018 +0100

tdf#91106 sfx2: Stylist hierarchical: sort the Default Style first

(regression from 41af2a9e26f3ee6b505b343120d5df3617ba5c49)

(cherry picked from commit fd67ee14e769ebdf1e43d55e0117f70f90d53053)

Change-Id: I47377447dd1e04a44033dea27ce7307a65821737
Reviewed-on: https://gerrit.libreoffice.org/51244
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 0e3f8e54a92b..aab3bc258236 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -561,6 +561,10 @@ StyleTreeArr_Impl& MakeTree_Impl(StyleTreeArr_Impl& rArr)
 // tdf#91106 sort top level styles
 std::sort(rArr.begin(), rArr.end(),
 [](StyleTree_Impl* pEntry1, StyleTree_Impl* pEntry2) {
+if (pEntry2->getName() == "Default Style")
+return false;
+if (pEntry1->getName() == "Default Style")
+return true; // default always first
 return aSorter.compare(pEntry1->getName(), pEntry2->getName()) < 0;
 });
 
___
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' - sfx2/source

2018-03-07 Thread Caolán McNamara
 sfx2/source/dialog/dinfdlg.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 97b65102db4b1e8f95faf08521329da37cc3f2ec
Author: Caolán McNamara 
Date:   Wed Mar 7 12:02:28 2018 +

Resolves: tdf#116116 vertically center line in allocated height

Change-Id: Iee4cd859cdc52a2272f5b01c3e4a57336cc336a4
Reviewed-on: https://gerrit.libreoffice.org/50891
Tested-by: Jenkins 
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index fd0dcd6fd4a2..145a9e4aebbc 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1748,6 +1748,7 @@ void CustomPropertiesWindow::CreateNewLine()
 pNewLine->m_aValueEdit->SetAccessibleName(m_pHeaderAccValue->GetText());
 
 sal_Int32 nPos = GetExistingLineCount() * GetLineHeight();
+nPos += LogicToPixel(Size(0, 2), MapMode(MapUnit::MapAppFont)).Height();
 m_aCustomPropertiesLines.push_back( pNewLine );
 
 SetWidgetWidths(pNewLine);
___
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' - sfx2/source

2018-02-28 Thread Franklin Weng
 sfx2/source/appl/appserv.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5fefbde340ed3bb7591f2301282e986c1caf2ee9
Author: Franklin Weng 
Date:   Wed Feb 28 18:12:07 2018 +0800

tdf#115795 Solve wrong redirect behavior of "Get Online Help"

When under locale zh-TW, Help > Get Online Help would use only "zh"
as the parameter of LOLang and sent it to hub.libreoffice.org, which
would redirect to Simplified Chinese forum instead of zh_TW
ask.libreoffice.org forum.  After discussing with Guilhem he
refactored the behavior of the Hub, use LOlocale instead of LOLang,
and keep LOLang for backward compatibility.  The LibreOffice sent
LOlocale instead to avoid this problem happening again.

Change-Id: Ia9348cff88723210f693e65260bb987826a3f3ea
Reviewed-on: https://gerrit.libreoffice.org/50503
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 7c1f11985c0b42981cf8600840fb87521ce5ad33)
Reviewed-on: https://gerrit.libreoffice.org/50511

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 1e2a2ec4984c..7ed64646e37f 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -499,8 +499,8 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
 {
 // Askbot has URL's normalized to languages, not locales
 // Get language from locale: ll or lll or ll-CC or lll-CC
-OUString aLang = 
LanguageTag(utl::ConfigManager::getLocale()).getLanguage();
-OUString sURL("https://hub.libreoffice.org/forum/?LOlang=; + 
aLang);
+
+OUString sURL("https://hub.libreoffice.org/forum/?LOlocale=; + 
utl::ConfigManager::getLocale());
 sfx2::openUriExternally(sURL, false);
 break;
 }
___
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' - sfx2/source

2018-02-21 Thread Maxim Monastirsky
 sfx2/source/control/bindings.cxx |1 +
 sfx2/source/control/statcach.cxx |7 ++-
 sfx2/source/inc/statcach.hxx |2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit f8a7d0426729b1982f1a03b933bc148acab12bd9
Author: Maxim Monastirsky 
Date:   Thu Feb 8 13:04:27 2018 +0200

tdf#115430 BindDispatch_Impl needs a disposal method

The dtor will never be called otherwise, because the
dispatcher is holding a reference to us, so
removeStatusListener is needed first.

Regression of a5dbe5a8a9e98f2d79f2c535182fc557b561ed0f
("use rtl::Reference in svl,sfx2")

Change-Id: I52da6152f0ddb0030d7354f7201e969d5a1f11cf
Reviewed-on: https://gerrit.libreoffice.org/49423
Reviewed-by: Noel Grandin 
Tested-by: Jenkins 
Reviewed-by: Maxim Monastirsky 
(cherry picked from commit d09bdaaa660c40df241e6e1c0b8a3e905db85420)
Reviewed-on: https://gerrit.libreoffice.org/49463
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 1356c20fc231..058b496c4a1b 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1607,6 +1607,7 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, 
std::unique_ptrremoveStatusListener( xBind.get(), aURL );
+xBind->Release();
 xBind.clear();
 if ( bDeleteCache )
 DELETEZ( pCache );
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index 1ec54f2fd1c3..0d6d5b6b08fa 100644
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -145,13 +145,14 @@ void SAL_CALL  BindDispatch_Impl::statusChanged( const 
css::frame::FeatureStateE
 }
 }
 
-BindDispatch_Impl::~BindDispatch_Impl()
+void BindDispatch_Impl::Release()
 {
 if ( xDisp.is() )
 {
 xDisp->removeStatusListener( 
static_cast(this), aURL );
 xDisp.clear();
 }
+pCache = nullptr;
 }
 
 
@@ -197,6 +198,8 @@ SfxStateCache::~SfxStateCache()
 DBG_ASSERT( pController == nullptr && pInternalController == nullptr, 
"there are still Controllers registered" );
 if ( !IsInvalidItem(pLastItem) )
 delete pLastItem;
+if ( mxDispatch.is() )
+mxDispatch->Release();
 }
 
 
@@ -208,6 +211,8 @@ void SfxStateCache::Invalidate( bool bWithMsg )
 {
 bSlotDirty = true;
 aSlotServ.SetSlot( nullptr );
+if ( mxDispatch.is() )
+mxDispatch->Release();
 mxDispatch.clear();
 }
 }
diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx
index ef09b5dd51c4..58ddc1766889 100644
--- a/sfx2/source/inc/statcach.hxx
+++ b/sfx2/source/inc/statcach.hxx
@@ -46,13 +46,13 @@ public:
 const css::uno::Reference< 
css::frame::XDispatch > & rDisp,
 const css::util::URL& rURL,
 SfxStateCache* pStateCache, const SfxSlot* 
pSlot );
-~BindDispatch_Impl() override;
 
 virtual void SAL_CALL   statusChanged( const 
css::frame::FeatureStateEvent& Event ) override;
 virtual void SAL_CALL   disposing( const css::lang::EventObject& Source ) 
override;
 
 const css::frame::FeatureStateEvent& GetStatus() const { return aStatus;}
 sal_Int16   Dispatch( const css::uno::Sequence < 
css::beans::PropertyValue >& aProps, bool bForceSynchron );
+voidRelease();
 };
 
 class SfxStateCache
___
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' - sfx2/source

2018-02-08 Thread Justin Luth
 sfx2/source/doc/objstor.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit d51c01846afb9bea5a39fd48fbb30b9fd02c2870
Author: Justin Luth 
Date:   Fri Feb 2 14:53:40 2018 +0300

init known ExtraLanguages before document loads

Extensions can add RegisterOnTheFly languages for spell checkers.
A late initialization of the LanguageTable resulted in the inability
to recognize the available spell checker.

So, if a .doc file had an onTheFly language inside, and it was
the first document that LibreOffice opened, then the spell checking
extension was disabled for any other document opened while LibreOffice
was living, including docx and odt files.  (Starting with a blank
document, or a .docx or .odt file seems to initialize OK - and
then subsequent .doc files are also ok in those sessions.)

Ensuring that the static LanguageTable is intialized early in the process
avoids this headache.

In my case, .doc was failing with:
LanguageTag::registerOnTheFly: not cross-inserted
0x7e0 for 'kbo' have 'en-US'

but with this patch now matches .odt/docx with:

LanguageTag::registerOnTheFly: cross-inserted
0x7e0 for 'kbo' [have 'kbo']

This fixes .ods .odg, odp,
   .xls .xlsx .ppt, pptx
   .doc and likely many others

Change-Id: Ie6dcbfd73e063eef4573016c3c62d29cf8ad43ca
Reviewed-on: https://gerrit.libreoffice.org/49142
Reviewed-by: Martin Hosken 
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
(cherry picked from commit 427c0804cd4aecde1cadb7cb3c4f3487991bd573)
Reviewed-on: https://gerrit.libreoffice.org/49171
Reviewed-by: Justin Luth 

diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index a82821922606..207c4fdeae96 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -71,6 +71,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -642,6 +643,9 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
 pImpl->nLoadedFlags = SfxLoadedFlags::NONE;
 pImpl->bModelInitialized = false;
 
+// initialize static language table so language-related extensions are 
learned before the document loads
+(void)SvtLanguageTable::GetLanguageEntryCount();
+
 //TODO/LATER: make a clear strategy how to handle "UsesStorage" etc.
 bool bOwnStorageFormat = IsOwnStorageFormat( *pMedium );
 bool bHasStorage = IsPackageStorageFormat_Impl( *pMedium );
___
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' - sfx2/source

2018-01-24 Thread Michael Meeks
 sfx2/source/doc/sfxbasemodel.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit a747dfef9c723808e12e802a2cc2f5688ab255fa
Author: Michael Meeks 
Date:   Tue Jan 16 13:31:37 2018 +

tdf#113755 - avoid null ptr de-reference during shutdown.

Why the PostUserEvent's that should do the XTDataObject async destroy
are not completed by here, is rather unclear; but - de-referencing
NULL is not a great thing to do during shutdown.


http://crashreport.libreoffice.org/stats/crash_details/a7d8fd19-0512-4292-b3a0-140dcff204c8

Change-Id: I3f294379f07f4cfc0106c1b5fc5e705c41e78b03
Reviewed-on: https://gerrit.libreoffice.org/48007
Tested-by: Jenkins 
Reviewed-by: Michael Meeks 
(cherry picked from commit ad7e6339e5e5cf465a2ef25442099eb59f1a0deb)
Reviewed-on: https://gerrit.libreoffice.org/48013
Reviewed-by: Eike Rathke 

diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 56ab68ea97df..2403ca27d212 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -934,6 +934,13 @@ OUString SAL_CALL SfxBaseModel::getURL()
 Sequence< beans::PropertyValue > SAL_CALL SfxBaseModel::getArgs()
 {
 SfxModelGuard aGuard( *this );
+
+if (!SfxApplication::Get()) // tdf#113755
+{
+SAL_WARN("sfx.appl", "Unexpected operations on model");
+return m_pData->m_seqArguments;
+}
+
 if ( m_pData->m_pObjectShell.is() )
 {
 Sequence< beans::PropertyValue > seqArgsNew;
___
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' - sfx2/source

2018-01-11 Thread Noel Grandin
 sfx2/source/control/emojicontrol.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit c66fc64e49353144a204743f900191443dbff5a1
Author: Noel Grandin 
Date:   Wed Jan 10 15:19:43 2018 +0200

tdf#114802 Emojis palette inserts code instead of emoji

regression from

commit 027b25ecd54ac97ea2471ca73e3ba89ce052fe76
use comphelper::InitPropertySequence in more places

Change-Id: I587242427c00ebf1faf44ad6b12090a39a1a3ef7
Reviewed-on: https://gerrit.libreoffice.org/47705
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 
Tested-by: Xisco Faulí 
Reviewed-by: Miklos Vajna 

diff --git a/sfx2/source/control/emojicontrol.cxx 
b/sfx2/source/control/emojicontrol.cxx
index c8bd584977a9..635408e8d77f 100644
--- a/sfx2/source/control/emojicontrol.cxx
+++ b/sfx2/source/control/emojicontrol.cxx
@@ -160,13 +160,14 @@ IMPL_LINK_NOARG(SfxEmojiControl, ActivatePageHdl, 
TabControl*, void)
 
 IMPL_STATIC_LINK(SfxEmojiControl, InsertHdl, ThumbnailViewItem*, pItem, void)
 {
-OUString sHexText = OUString::number(pItem->getTitle().toUInt32(16));
+OUString sHexText = pItem->getTitle();
+sal_uInt32 cEmojiChar = sHexText.toUInt32(16);
 
 uno::Reference< uno::XComponentContext > xContext( 
comphelper::getProcessComponentContext() );
 OUString 
sFontName(officecfg::Office::Common::Misc::EmojiFont::get(xContext));
 
 uno::Sequence aArgs( 
comphelper::InitPropertySequence({
-{ "Symbols", uno::Any(sHexText) },
+{ "Symbols", uno::Any(OUString(, 1)) },
 // add font settings here
 { "FontName", uno::Any(sFontName) }
 }));
___
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' - sfx2/source

2018-01-10 Thread Pranav Kant
 sfx2/source/view/lokcharthelper.cxx |   45 +++-
 1 file changed, 24 insertions(+), 21 deletions(-)

New commits:
commit 6a299d487d93fa862a640011c5ae8a2f406283b8
Author: Pranav Kant 
Date:   Fri Dec 22 18:40:05 2017 +0530

lokdocview: android: tiled annotations is the cause of the problem

The earlier workaround only fixes it for android but keep other clients
like gnome-documents broken. The real problem with these clients is that
they ask lokit to render annotations in the tiles.

This patch should keep the problem fixed for android and additionally
make gnome-documents work, or any other lok clients who do not use comments
API but render comments in tiles.

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

diff --git a/sfx2/source/view/lokcharthelper.cxx 
b/sfx2/source/view/lokcharthelper.cxx
index 6181920916c0..dc82d2ffe4db 100644
--- a/sfx2/source/view/lokcharthelper.cxx
+++ b/sfx2/source/view/lokcharthelper.cxx
@@ -236,29 +236,32 @@ void LokChartHelper::PaintAllChartsOnTile(VirtualDevice& 
rDevice,
   int nTilePosX, int nTilePosY,
   long nTileWidth, long nTileHeight)
 {
-// Resizes the virtual device so to contain the entries context
-rDevice.SetOutputSizePixel(Size(nOutputWidth, nOutputHeight));
-
-rDevice.Push(PushFlags::MAPMODE);
-MapMode aMapMode(rDevice.GetMapMode());
-
-// Scaling. Must convert from pixels to twips. We know
-// that VirtualDevices use a DPI of 96.
-Fraction scaleX = Fraction(nOutputWidth, 96) * Fraction(1440) / 
Fraction(nTileWidth);
-Fraction scaleY = Fraction(nOutputHeight, 96) * Fraction(1440) / 
Fraction(nTileHeight);
-aMapMode.SetScaleX(scaleX);
-aMapMode.SetScaleY(scaleY);
-rDevice.SetMapMode(aMapMode);
-
-tools::Rectangle aTileRect(Point(nTilePosX, nTilePosY), Size(nTileWidth, 
nTileHeight));
-SfxViewShell* pViewShell = SfxViewShell::GetFirst();
-while (pViewShell)
+if (!comphelper::LibreOfficeKit::isTiledAnnotations())
 {
-LokChartHelper aChartHelper(pViewShell);
-aChartHelper.PaintTile(rDevice, aTileRect);
-pViewShell = SfxViewShell::GetNext(*pViewShell);
+// Resizes the virtual device so to contain the entries context
+rDevice.SetOutputSizePixel(Size(nOutputWidth, nOutputHeight));
+
+rDevice.Push(PushFlags::MAPMODE);
+MapMode aMapMode(rDevice.GetMapMode());
+
+// Scaling. Must convert from pixels to twips. We know
+// that VirtualDevices use a DPI of 96.
+Fraction scaleX = Fraction(nOutputWidth, 96) * Fraction(1440) / 
Fraction(nTileWidth);
+Fraction scaleY = Fraction(nOutputHeight, 96) * Fraction(1440) / 
Fraction(nTileHeight);
+aMapMode.SetScaleX(scaleX);
+aMapMode.SetScaleY(scaleY);
+rDevice.SetMapMode(aMapMode);
+
+tools::Rectangle aTileRect(Point(nTilePosX, nTilePosY), 
Size(nTileWidth, nTileHeight));
+SfxViewShell* pViewShell = SfxViewShell::GetFirst();
+while (pViewShell)
+{
+LokChartHelper aChartHelper(pViewShell);
+aChartHelper.PaintTile(rDevice, aTileRect);
+pViewShell = SfxViewShell::GetNext(*pViewShell);
+}
+rDevice.Pop();
 }
-rDevice.Pop();
 }
 
 bool LokChartHelper::postMouseEvent(int nType, int nX, int nY,
___
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' - sfx2/source

2018-01-03 Thread Tamás Zolnai
 sfx2/source/sidebar/UnoPanels.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit ffca194466e08691e381d642b07154121edefece
Author: Tamás Zolnai 
Date:   Thu Dec 28 14:42:24 2017 +0100

tdf#104870 - Impress crashes switching views in read-only mode

We need to check read only mode similar to SidebarController::CreatePanels()
method. Otherwise SfxUnoPanels::getByName() creates an invalid panel.

Reviewed-on: https://gerrit.libreoffice.org/47116
Tested-by: Xisco Faulí 
Reviewed-by: Tamás Zolnai 
(cherry picked from commit 23a83639f5a06708074b13bc13ea4f6f819f55f0)

Change-Id: Ib7801b81c95f3f505a06c00f749ba4ed5809bfe0
Reviewed-on: https://gerrit.libreoffice.org/47138
Tested-by: Xisco Faulí 
Reviewed-by: Michael Stahl 

diff --git a/sfx2/source/sidebar/UnoPanels.cxx 
b/sfx2/source/sidebar/UnoPanels.cxx
index a74763572cdb..49815a9ff649 100644
--- a/sfx2/source/sidebar/UnoPanels.cxx
+++ b/sfx2/source/sidebar/UnoPanels.cxx
@@ -108,6 +108,9 @@ sal_Bool SAL_CALL SfxUnoPanels::hasByName( const OUString& 
aName )
 iPanel(aPanels.begin()), iEnd(aPanels.end());
 iPanel!=iEnd; ++iPanel)
 {
+// Determine if the panel can be displayed.
+if(pSidebarController->IsDocumentReadOnly() && 
!iPanel->mbShowForReadOnlyDocuments)
+continue;
 if (iPanel->msId == aName)
 return true;
 }
___
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' - sfx2/source

2017-12-21 Thread Aron Budea
 sfx2/source/sidebar/SidebarController.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8bc50d17eb5aaeaaa81255eb5cee6fb60f99c7bc
Author: Aron Budea 
Date:   Wed Dec 20 12:06:39 2017 +0100

tdf#104229: properly switch to def sidebar deck on status change

regression since a64999511ae654131d997eec9a3d78478cfc1c75

Change-Id: Id1d0a76f89c41e88511f670f1aac4b866e4c15c6
Reviewed-on: https://gerrit.libreoffice.org/46840
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 
(cherry picked from commit f2f5ebcee462472b27b610f53abc7f9a6378462b)
Reviewed-on: https://gerrit.libreoffice.org/46881

diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index b0610ae203d9..5752120038a4 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -307,7 +307,7 @@ void SAL_CALL SidebarController::statusChanged (const 
css::frame::FeatureStateEv
 
 // Force the current deck to update its panel list.
 if ( ! mbIsDocumentReadOnly)
-msCurrentDeckId = gsDefaultDeckId;
+SwitchToDefaultDeck();
 
 mnRequestedForceFlags |= SwitchFlag_ForceSwitch;
 maAsynchronousDeckSwitch.CancelRequest();
___
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' - sfx2/source svx/source

2017-12-18 Thread Tomaž Vajngerl
 sfx2/source/view/classificationhelper.cxx  |3 +--
 svx/source/dialog/ClassificationDialog.cxx |2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 59b62c9af6961300555e4f2a170fd70c76b83a72
Author: Tomaž Vajngerl 
Date:   Mon Nov 27 17:07:33 2017 +0900

TSCP: don't put a non-existing name into doc. props

We combined the abbr. name with the name and put that as a value
into doc. properties. This is not correct as such a name doesn't
exist in the BAPolicy and con't be identified anymore, so removing
this.

Also use the values that were put into the ClassificationField
instead of the extracted text.

Change-Id: I3037bc90a7a394d430f7c0cca4d326473eff3147
Reviewed-on: https://gerrit.libreoffice.org/45316
Tested-by: Jenkins 
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit ec9b555e8094f4552c068820cab633307fcf520f)
Reviewed-on: https://gerrit.libreoffice.org/46720
Tested-by: Tomaž Vajngerl 

diff --git a/sfx2/source/view/classificationhelper.cxx 
b/sfx2/source/view/classificationhelper.cxx
index e1381e85cd01..1d7c0e94b4d3 100644
--- a/sfx2/source/view/classificationhelper.cxx
+++ b/sfx2/source/view/classificationhelper.cxx
@@ -451,8 +451,7 @@ void 
SfxClassificationHelper::Impl::pushToDocumentProperties()
 SfxClassificationPolicyType eType = rPair.first;
 SfxClassificationCategory& rCategory = rPair.second;
 std::map aLabels = rCategory.m_aLabels;
-const OUString abbreviation = (rCategory.m_aName != 
rCategory.m_aAbbreviatedName ? " (" + rCategory.m_aAbbreviatedName + ")" : 
OUString());
-aLabels[policyTypeToString(eType) + PROP_BACNAME()] = 
rCategory.m_aName + abbreviation;
+aLabels[policyTypeToString(eType) + PROP_BACNAME()] = 
rCategory.m_aName;
 for (const auto& rLabel : aLabels)
 {
 try
diff --git a/svx/source/dialog/ClassificationDialog.cxx 
b/svx/source/dialog/ClassificationDialog.cxx
index aa7f2e778be9..fa5be8da164d 100644
--- a/svx/source/dialog/ClassificationDialog.cxx
+++ b/svx/source/dialog/ClassificationDialog.cxx
@@ -568,7 +568,7 @@ std::vector 
ClassificationDialog::getResult()
 if (pClassificationField)
 {
 aClassificationResults.push_back({ 
pClassificationField->meType, pClassificationField->msFullClassName,
-   sDisplayString, 
pClassificationField->msIdentifier });
+   
pClassificationField->msDescription, pClassificationField->msIdentifier });
 }
 else
 {
___
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' - sfx2/source

2017-12-06 Thread Heiko Tietze
 sfx2/source/control/charwin.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7a0fefa3818e9218f3f871ce3156df39ee444703
Author: Heiko Tietze 
Date:   Wed Nov 29 11:09:35 2017 +0100

tdf#113343 Floating charmap window must not have a context menu

Change-Id: I76c567047b0033ae766ab6c5161c96416e478e8e
Reviewed-on: https://gerrit.libreoffice.org/45475
Tested-by: Jenkins 
Reviewed-by: Heiko Tietze 
Tested-by: Heiko Tietze 
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 2246ab1a187a5ca73b35ca700c1db63c9b74054e)
Reviewed-on: https://gerrit.libreoffice.org/45966

diff --git a/sfx2/source/control/charwin.cxx b/sfx2/source/control/charwin.cxx
index 7a7ec777f124..8bd37fc67452 100644
--- a/sfx2/source/control/charwin.cxx
+++ b/sfx2/source/control/charwin.cxx
@@ -53,7 +53,8 @@ void SvxCharView::MouseButtonDown( const MouseEvent& rMEvt )
 maMouseClickHdl.Call(this);
 }
 
-if(rMEvt.IsRight())
+// suppress context menu on floating windows
+if (rMEvt.IsRight() && GetSystemWindow()->GetType() != 
WindowType::FLOATINGWINDOW)
 {
 Point aPosition (rMEvt.GetPosPixel());
 maPosition = aPosition;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits