[Libreoffice-commits] core.git: sw/source

2018-05-29 Thread Mike Kaganski
 sw/source/uibase/app/apphdl.cxx |   70 ++--
 1 file changed, 18 insertions(+), 52 deletions(-)

New commits:
commit d7c2667089535d25b8f0ad4f58810ee54552156b
Author: Mike Kaganski 
Date:   Sat May 26 19:55:49 2018 +0300

Only show Mail Merge toolbar after wizard finished

The toolbar is not needed while wizard works (since it's modal).
This simplifies the logic a little.

Also this allows to show the toolbar in the actual document used for
mailmerge (e.g., when a new or existing document is used, nit the
current one); previously, the toolbar appeared in the document active at
the moment of wizard launch remained in that document, and actual
document went without the toolbar.

Change-Id: I44c45c41f1a3e06cd0fb1930092727b9e08caf74
Reviewed-on: https://gerrit.libreoffice.org/54864
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 

diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 05efb9d821e4..ac5a40287a4d 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -59,9 +59,7 @@
 #include 
 #include 
 #include 
-#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -331,8 +329,6 @@ class SwMailMergeWizardExecutor : public 
salhelper::SimpleReferenceObject
 VclPtr m_pWizard; // always owner
 VclPtr m_pWizardToDestroyInCallback;
 
-bool m_bDestroyMMToolbarOnCancel;
-
 DECL_LINK( EndDialogHdl, Dialog&, void );
 DECL_LINK( DestroyDialogHdl, void*, void );
 DECL_LINK( DestroyWizardHdl, void*, void );
@@ -352,8 +348,7 @@ public:
 SwMailMergeWizardExecutor::SwMailMergeWizardExecutor()
 : m_pView( nullptr ),
   m_pView2Close( nullptr ),
-  m_pWizard( nullptr ),
-  m_bDestroyMMToolbarOnCancel( false )
+  m_pWizard( nullptr )
 {
 }
 
@@ -418,25 +413,6 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( 
const SfxItemSet * pArgs
 SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
 m_pWizard = pFact->CreateMailMergeWizard(*m_pView, xMMConfig);
 
-uno::Reference 
xPropSet(m_pView->GetViewFrame()->GetFrame().GetFrameInterface(), 
uno::UNO_QUERY);
-if (!xPropSet.is())
-return;
-
-uno::Reference xLayoutManager;
-uno::Any aValue = xPropSet->getPropertyValue("LayoutManager");
-aValue >>= xLayoutManager;
-if (!xLayoutManager.is())
-return;
-
-const OUString sResourceURL( "private:resource/toolbar/mailmerge" );
-uno::Reference xUIElement = 
xLayoutManager->getElement(sResourceURL);
-if (!xUIElement.is())
-{
-// ensure the mail-merge toolbar is displayed and remember if it was 
before
-m_bDestroyMMToolbarOnCancel = true;
-xLayoutManager->createElement(sResourceURL);
-xLayoutManager->showElement(sResourceURL);
-}
 ExecuteWizard();
 }
 
@@ -452,21 +428,24 @@ void SwMailMergeWizardExecutor::ExecutionFinished()
 SwDBManager* pDbManager = pDoc->GetDBManager();
 if (pDbManager)
 pDbManager->CommitLastRegistrations();
-}
 
-// Update Mail Merge controls
-const sal_uInt16 slotIds[] = { FN_MAILMERGE_FIRST_ENTRY,
-   FN_MAILMERGE_PREV_ENTRY,
-   FN_MAILMERGE_NEXT_ENTRY,
-   FN_MAILMERGE_LAST_ENTRY,
-   FN_MAILMERGE_CURRENT_ENTRY,
-   FN_MAILMERGE_EXCLUDE_ENTRY,
-   FN_MAILMERGE_CREATE_DOCUMENTS,
-   FN_MAILMERGE_SAVE_DOCUMENTS,
-   FN_MAILMERGE_PRINT_DOCUMENTS,
-   FN_MAILMERGE_EMAIL_DOCUMENTS,
-   0 };
-m_pView->GetViewFrame()->GetBindings().Invalidate(slotIds);
+// Show the toolbar
+m_pView->ShowUIElement("private:resource/toolbar/mailmerge");
+
+// Update Mail Merge controls
+const sal_uInt16 slotIds[] = { FN_MAILMERGE_FIRST_ENTRY,
+   FN_MAILMERGE_PREV_ENTRY,
+   FN_MAILMERGE_NEXT_ENTRY,
+   FN_MAILMERGE_LAST_ENTRY,
+   FN_MAILMERGE_CURRENT_ENTRY,
+   FN_MAILMERGE_EXCLUDE_ENTRY,
+   FN_MAILMERGE_CREATE_DOCUMENTS,
+   FN_MAILMERGE_SAVE_DOCUMENTS,
+   FN_MAILMERGE_PRINT_DOCUMENTS,
+   FN_MAILMERGE_EMAIL_DOCUMENTS,
+   0 };
+m_pView->GetViewFrame()->GetBindings().Invalidate(slotIds);
+}
 
 // release/destroy asynchronously
 Application::PostUserEvent( LINK( this, SwMailMergeWizardExecutor, 
DestroyDialogHdl ) );

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sw/source

2018-05-29 Thread Mike Kaganski
 sw/source/uibase/app/apphdl.cxx |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit d64da241e8ebd0c212548982dcf61cc658939e8a
Author: Mike Kaganski 
Date:   Sat May 26 14:23:13 2018 +0300

tdf#117817: Update Mail Merge controls after wizard completes

Otherwise they may stay disabled until cursor position changes.

Change-Id: If734bbd4793b3b01c64601d68126d5752f5aba0c
Reviewed-on: https://gerrit.libreoffice.org/54841
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 
(cherry picked from commit f304ae0ca4738fa3605587146224ee8972a894f3)
Reviewed-on: https://gerrit.libreoffice.org/54964

diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 467112e58956..27dbf41be1ce 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -487,6 +487,20 @@ void SwMailMergeWizardExecutor::ExecutionFinished()
 pDbManager->CommitLastRegistrations();
 }
 
+// Update Mail Merge controls
+const sal_uInt16 slotIds[] = { FN_MAILMERGE_FIRST_ENTRY,
+   FN_MAILMERGE_PREV_ENTRY,
+   FN_MAILMERGE_NEXT_ENTRY,
+   FN_MAILMERGE_LAST_ENTRY,
+   FN_MAILMERGE_CURRENT_ENTRY,
+   FN_MAILMERGE_EXCLUDE_ENTRY,
+   FN_MAILMERGE_CREATE_DOCUMENTS,
+   FN_MAILMERGE_SAVE_DOCUMENTS,
+   FN_MAILMERGE_PRINT_DOCUMENTS,
+   FN_MAILMERGE_EMAIL_DOCUMENTS,
+   0 };
+m_pView->GetViewFrame()->GetBindings().Invalidate(slotIds);
+
 // release/destroy asynchronously
 Application::PostUserEvent( LINK( this, SwMailMergeWizardExecutor, 
DestroyDialogHdl ) );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - dbaccess/source xmloff/inc xmloff/source

2018-05-29 Thread Noel Grandin
 dbaccess/source/ui/dlg/dlgattr.cxx|4 +--
 dbaccess/source/ui/inc/dlgattr.hxx|2 -
 xmloff/inc/XMLTextHeaderFooterContext.hxx |1 
 xmloff/inc/animationimport.hxx|1 
 xmloff/inc/txtfldi.hxx|1 
 xmloff/inc/txtvfldi.hxx   |2 -
 xmloff/source/draw/animationimport.cxx|6 ++---
 xmloff/source/draw/animimp.cxx|   10 +++--
 xmloff/source/draw/eventimp.cxx   |   10 +++--
 xmloff/source/draw/ximpbody.cxx   |   12 +--
 xmloff/source/draw/ximpbody.hxx   |2 -
 xmloff/source/draw/ximpnote.cxx   |8 +++
 xmloff/source/draw/ximpnote.hxx   |3 --
 xmloff/source/draw/ximpstyl.cxx   |   24 ++
 xmloff/source/draw/ximpstyl.hxx   |6 -
 xmloff/source/style/xmlexppr.cxx  |2 -
 xmloff/source/style/xmlnumi.cxx   |   13 ---
 xmloff/source/text/XMLTextFrameContext.cxx|4 ---
 xmloff/source/text/XMLTextHeaderFooterContext.cxx |2 -
 xmloff/source/text/XMLTextListBlockContext.cxx|1 
 xmloff/source/text/XMLTextListBlockContext.hxx|1 
 xmloff/source/text/txtfldi.cxx|3 --
 xmloff/source/text/txtparai.cxx   |1 
 xmloff/source/text/txtparai.hxx   |2 -
 xmloff/source/text/txtvfldi.cxx   |5 +++-
 25 files changed, 42 insertions(+), 84 deletions(-)

New commits:
commit 2e80fe39a438ab702ad8f3e2456159328cb16365
Author: Noel Grandin 
Date:   Fri May 18 13:46:59 2018 +0200

loplugin:useuniqueptr in dbaui::SbaSbAttrDlg

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

diff --git a/dbaccess/source/ui/dlg/dlgattr.cxx 
b/dbaccess/source/ui/dlg/dlgattr.cxx
index f64c42e3e8ba..d2c3031b72ee 100644
--- a/dbaccess/source/ui/dlg/dlgattr.cxx
+++ b/dbaccess/source/ui/dlg/dlgattr.cxx
@@ -38,7 +38,7 @@ SbaSbAttrDlg::SbaSbAttrDlg(vcl::Window* pParent, const 
SfxItemSet* pCellAttrs,
 : SfxTabDialog(pParent, "FieldDialog", "dbaccess/ui/fielddialog.ui", 
pCellAttrs)
 , m_nNumberFormatId(0)
 {
-pNumberInfoItem = new SvxNumberInfoItem( pFormatter, 0 );
+pNumberInfoItem.reset( new SvxNumberInfoItem( pFormatter, 0 ) );
 
 if (bHasFormat)
 m_nNumberFormatId = AddTabPage("format", RID_SVXPAGE_NUMBERFORMAT);
@@ -54,7 +54,7 @@ SbaSbAttrDlg::~SbaSbAttrDlg()
 
 void SbaSbAttrDlg::dispose()
 {
-delete pNumberInfoItem;
+pNumberInfoItem.reset();
 SfxTabDialog::dispose();
 }
 
diff --git a/dbaccess/source/ui/inc/dlgattr.hxx 
b/dbaccess/source/ui/inc/dlgattr.hxx
index d5b5c20b4102..1a10d63ace86 100644
--- a/dbaccess/source/ui/inc/dlgattr.hxx
+++ b/dbaccess/source/ui/inc/dlgattr.hxx
@@ -29,7 +29,7 @@ namespace dbaui
 
 class SbaSbAttrDlg : public SfxTabDialog
 {
-SvxNumberInfoItem* pNumberInfoItem;
+std::unique_ptr pNumberInfoItem;
 sal_uInt32 m_nNumberFormatId;
 
 public:
commit 03841dc12ff3ee65ca632039418c65bbfd5ccaea
Author: Noel Grandin 
Date:   Fri May 25 17:00:23 2018 +0200

loplugin:unusedfields-in-constructor in xmloff

fields that are only referenced in the constructor

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

diff --git a/xmloff/inc/XMLTextHeaderFooterContext.hxx 
b/xmloff/inc/XMLTextHeaderFooterContext.hxx
index 47688ba08021..385190dd5674 100644
--- a/xmloff/inc/XMLTextHeaderFooterContext.hxx
+++ b/xmloff/inc/XMLTextHeaderFooterContext.hxx
@@ -34,7 +34,6 @@ class XMLTextHeaderFooterContext: public SvXMLImportContext
 
 const OUString sOn;
 const OUString sShareContent;
-const OUString sShareContentFirst;
 const OUString sText;
 const OUString sTextFirst;
 const OUString sTextLeft;
diff --git a/xmloff/inc/animationimport.hxx b/xmloff/inc/animationimport.hxx
index 6d59ad9a4898..b59f8cb60b30 100644
--- a/xmloff/inc/animationimport.hxx
+++ b/xmloff/inc/animationimport.hxx
@@ -34,7 +34,6 @@ class AnimationsImportHelperImpl;
 class AnimationNodeContext : public SvXMLImportContext
 {
 std::shared_ptr mpHelper;
-bool mbRootContext;
 css::uno::Reference< css::animations::XAnimationNode > mxNode;
 
 void init_node( const css::uno::Reference< css::xml::sax::XAttributeList 
>& xAttrList );
diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 350ca6d11e0e..936c7102b3fb 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -216,7 +216,6 @@ protected:
 class XMLAuthorFieldImportContext : public XMLSenderFieldImportContext
 {
 bool bAuthorFullName;
-const OUString sServiceAuthor;
 

[Libreoffice-commits] core.git: 2 commits - dbaccess/source

2018-05-29 Thread Noel Grandin
 dbaccess/source/ui/dlg/dbwizsetup.cxx  |   13 ++---
 dbaccess/source/ui/dlg/indexdialog.cxx |4 ++--
 dbaccess/source/ui/inc/dbwizsetup.hxx  |2 +-
 dbaccess/source/ui/inc/indexdialog.hxx |2 +-
 4 files changed, 10 insertions(+), 11 deletions(-)

New commits:
commit c9f120a424072808c0ed09fc2487541cc212c45e
Author: Noel Grandin 
Date:   Mon May 21 15:46:07 2018 +0200

loplugin:useuniqueptr in ODbTypeWizDialogSetup

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

diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx 
b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 3403203c2e33..03b520739f25 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -141,7 +141,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(vcl::Window* 
_pParent
 m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxORB,this,this));
 m_pImpl->setDataSourceOrName(_aDataSourceName);
 Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource();
-m_pOutSet = new SfxItemSet( *_pItems->GetPool(), _pItems->GetRanges() );
+m_pOutSet.reset( new SfxItemSet( *_pItems->GetPool(), _pItems->GetRanges() 
) );
 
 m_pImpl->translateProperties(xDatasource, *m_pOutSet);
 
@@ -264,8 +264,7 @@ ODbTypeWizDialogSetup::~ODbTypeWizDialogSetup()
 
 void ODbTypeWizDialogSetup::dispose()
 {
-delete m_pOutSet;
-m_pOutSet = nullptr;
+m_pOutSet.reset();
 m_pGeneralPage.clear();
 m_pMySQLIntroPage.clear();
 m_pFinalPage.clear();
@@ -388,12 +387,12 @@ void ODbTypeWizDialogSetup::resetPages(const Reference< 
XPropertySet >& _rxDatas
 
 const SfxItemSet* ODbTypeWizDialogSetup::getOutputSet() const
 {
-return m_pOutSet;
+return m_pOutSet.get();
 }
 
 SfxItemSet* ODbTypeWizDialogSetup::getWriteOutputSet()
 {
-return m_pOutSet;
+return m_pOutSet.get();
 }
 
 std::pair< Reference,bool> 
ODbTypeWizDialogSetup::createConnection()
@@ -628,7 +627,7 @@ void ODbTypeWizDialogSetup::saveDatasource()
 {
 SfxTabPage* pPage = 
static_cast(WizardDialog::GetPage(getCurrentState()));
 if ( pPage )
-pPage->FillItemSet(m_pOutSet);
+pPage->FillItemSet(m_pOutSet.get());
 }
 
 bool ODbTypeWizDialogSetup::leaveState(WizardState _nState)
@@ -640,7 +639,7 @@ bool ODbTypeWizDialogSetup::leaveState(WizardState _nState)
 resetPages(m_pImpl->getCurrentDataSource());
 }
 SfxTabPage* pPage = 
static_cast(WizardDialog::GetPage(_nState));
-return pPage && pPage->DeactivatePage(m_pOutSet) != DeactivateRC::KeepPage;
+return pPage && pPage->DeactivatePage(m_pOutSet.get()) != 
DeactivateRC::KeepPage;
 }
 
 void ODbTypeWizDialogSetup::setTitle(const OUString& /*_sTitle*/)
diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx 
b/dbaccess/source/ui/inc/dbwizsetup.hxx
index 0f0588f9bf68..c84b730fab94 100644
--- a/dbaccess/source/ui/inc/dbwizsetup.hxx
+++ b/dbaccess/source/ui/inc/dbwizsetup.hxx
@@ -58,7 +58,7 @@ class ODbTypeWizDialogSetup final : public svt::RoadmapWizard 
, public IItemSetH
 {
 private:
 std::unique_ptr  m_pImpl;
-SfxItemSet* m_pOutSet;
+std::unique_ptr m_pOutSet;
 OUStringm_sURL;
 OUStringm_sOldURL;
 boolm_bIsConnectable : 1;
commit 1ebeb51e8bfa7b139e2661e8fe460a102dfb5659
Author: Noel Grandin 
Date:   Fri May 18 15:27:18 2018 +0200

loplugin:useuniqueptr in DbaIndexDialog

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

diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx 
b/dbaccess/source/ui/dlg/indexdialog.cxx
index e2e7adc0986f..c12b89e5f5c1 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -215,7 +215,7 @@ namespace dbaui
 
 setToolBox(m_pActions);
 
-m_pIndexes = new OIndexCollection();
+m_pIndexes.reset(new OIndexCollection());
 try
 {
 m_pIndexes->attach(_rxIndexes);
@@ -307,7 +307,7 @@ namespace dbaui
 void DbaIndexDialog::dispose()
 {
 setToolBox(nullptr);
-delete m_pIndexes;
+m_pIndexes.reset();
 m_pActions.clear();
 m_pIndexList.clear();
 m_pIndexDetails.clear();
diff --git a/dbaccess/source/ui/inc/indexdialog.hxx 
b/dbaccess/source/ui/inc/indexdialog.hxx
index 766177035374..e7b458559fbb 100644
--- a/dbaccess/source/ui/inc/indexdialog.hxx
+++ b/dbaccess/source/ui/inc/indexdialog.hxx
@@ -89,7 +89,7 @@ namespace dbaui
 VclPtr  m_pFields;
 VclPtr  m_pClose;
 
-OIndexCollection*   m_pIndexes;
+std::unique_ptr m_pIndexes;
 SvTreeListEntry*m_pPreviousSelection;
 boolm_bEditAgain;
 

[Libreoffice-commits] core.git: vbahelper/source

2018-05-29 Thread Samuel Mehrbrodt
 vbahelper/source/vbahelper/vbacommandbarhelper.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 535f31419ab61c33212b1dd2693e34968902d3ad
Author: Samuel Mehrbrodt 
Date:   Mon May 28 14:45:31 2018 +0200

Add missing include

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

diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx 
b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
index b2d01cfa633f..5b344dc61225 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
@@ -18,6 +18,7 @@
  */
 #include "vbacommandbarhelper.hxx"
 #include 
+#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2018-05-29 Thread Bjoern Michaelsen
 sw/source/core/unocore/unofield.cxx |   41 ++--
 1 file changed, 17 insertions(+), 24 deletions(-)

New commits:
commit aec1f4a12c1b94339d6d9ed32ffa012002df3f9c
Author: Bjoern Michaelsen 
Date:   Thu May 10 10:51:42 2018 +0200

dont use SwClient/SwModify in unocore: FieldEnumeration

Change-Id: Ia307836869e54ab8f5a9727c913979cee4f259f4
Reviewed-on: https://gerrit.libreoffice.org/54868
Tested-by: Jenkins 
Reviewed-by: Björn Michaelsen 

diff --git a/sw/source/core/unocore/unofield.cxx 
b/sw/source/core/unocore/unofield.cxx
index 030125a8f44b..d87a4539742b 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -86,6 +86,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2895,24 +2896,25 @@ void SAL_CALL SwXTextFieldTypes::removeRefreshListener(
 }
 
 class SwXFieldEnumeration::Impl
-: public SwClient
+: public SvtListener
 {
-
 public:
-SwDoc * m_pDoc;
-
-std::vector< uno::Reference > m_Items;
-sal_Int32   m_nNextIndex;  ///< index of next element to be returned
+SwDoc* m_pDoc;
+std::vector> m_Items;
+sal_Int32 m_nNextIndex;  ///< index of next element to be returned
 
-explicit Impl(SwDoc & rDoc)
-: 
SwClient(rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD))
-, m_pDoc(& rDoc)
+explicit Impl(SwDoc& rDoc)
+: m_pDoc()
 , m_nNextIndex(0)
-{ }
+{
+
StartListening(rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD)->GetNotifier());
+}
 
-protected:
-// SwClient
-virtual void Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew) 
override;
+virtual void Notify(const SfxHint& rHint) override
+{
+if(rHint.GetId() == SfxHintId::Dying)
+m_pDoc = nullptr;
+}
 };
 
 OUString SAL_CALL
@@ -2926,11 +2928,10 @@ sal_Bool SAL_CALL 
SwXFieldEnumeration::supportsService(const OUString& rServiceN
 return cppu::supportsService(this, rServiceName);
 }
 
-uno::Sequence< OUString > SAL_CALL
+uno::Sequence SAL_CALL
 SwXFieldEnumeration::getSupportedServiceNames()
 {
-uno::Sequence aRet { "com.sun.star.text.FieldEnumeration" };
-return aRet;
+return { "com.sun.star.text.FieldEnumeration" };
 }
 
 SwXFieldEnumeration::SwXFieldEnumeration(SwDoc & rDoc)
@@ -2996,12 +2997,4 @@ uno::Any SAL_CALL SwXFieldEnumeration::nextElement()
 return aRet;
 }
 
-void SwXFieldEnumeration::Impl::Modify(
-SfxPoolItem const*const pOld, SfxPoolItem const*const pNew)
-{
-ClientModify(this, pOld, pNew);
-if(!GetRegisteredIn())
-m_pDoc = nullptr;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa

2018-05-29 Thread Zdeněk Crhonek
 sc/qa/uitest/calc_tests/tdf104117.py |   54 
 sc/qa/uitest/calc_tests/tdf80693.py  |   58 +++
 2 files changed, 112 insertions(+)

New commits:
commit f5af8615e40bca1a747695c8ca28675c4ab0d384
Author: Zdeněk Crhonek 
Date:   Tue May 29 16:03:22 2018 +0200

uitest for bug tdf#104117 and tdf#80693

Change-Id: I29bdf088c83ce69152d5c3edee2c855bfece4585
Reviewed-on: https://gerrit.libreoffice.org/55019
Tested-by: Jenkins 
Reviewed-by: Zdenek Crhonek 

diff --git a/sc/qa/uitest/calc_tests/tdf104117.py 
b/sc/qa/uitest/calc_tests/tdf104117.py
new file mode 100644
index ..84ab28580461
--- /dev/null
+++ b/sc/qa/uitest/calc_tests/tdf104117.py
@@ -0,0 +1,54 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_pos
+from uitest.uihelper.calc import enter_text_to_cell
+from libreoffice.calc.document import get_sheet_from_doc
+from libreoffice.calc.conditional_format import 
get_conditional_format_from_sheet
+from uitest.debug import sleep
+from libreoffice.calc.document import get_cell_by_position
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+#Bug 104117 - Crash in Calc when selecting "Uniform Integer" with an max value 
"100" in "Random Number Generator
+class tdf104117(UITestCase):
+def test_tdf104117(self):
+calc_doc = self.ui_test.create_doc_in_start_center("calc")
+xCalcDoc = self.xUITest.getTopFocusWindow()
+gridwin = xCalcDoc.getChild("grid_window")
+document = self.ui_test.get_component()
+gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A2"}))
+
self.ui_test.execute_modeless_dialog_through_command(".uno:RandomNumberGeneratorDialog")
+xDialog = self.xUITest.getTopFocusWindow()
+xcellrangeedit = xDialog.getChild("cell-range-edit")
+xdistributioncombo = xDialog.getChild("distribution-combo")
+xparameter1spin = xDialog.getChild("parameter1-spin")
+xparameter2spin = xDialog.getChild("parameter2-spin")
+xenableseedcheck = xDialog.getChild("enable-seed-check")
+xseedspin = xDialog.getChild("seed-spin")
+xenableroundingcheck = xDialog.getChild("enable-rounding-check")
+xdecimalplacesspin = xDialog.getChild("decimal-places-spin")
+
+xcellrangeedit.executeAction("TYPE", 
mkPropertyValues({"TEXT":"$Sheet1.$A$1:$A$2"}))
+props = {"TEXT": "Uniform Integer"}
+actionProps = mkPropertyValues(props)
+xdistributioncombo.executeAction("SELECT", actionProps)
+xparameter2spin.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+A"}))
+xparameter2spin.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+xparameter2spin.executeAction("TYPE", 
mkPropertyValues({"TEXT":"10"}))
+
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+#Verify
+self.assertEqual(bool(get_cell_by_position(document, 0, 0, 
0).getString() ), True)
+self.assertEqual(bool(get_cell_by_position(document, 0, 0, 
1).getString() ), True)
+#undo
+self.xUITest.executeCommand(".uno:Undo")
+self.assertEqual(bool(get_cell_by_position(document, 0, 0, 
0).getString() ), False)
+self.assertEqual(bool(get_cell_by_position(document, 0, 0, 
1).getString() ), False)
+self.ui_test.close_doc()
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
\ No newline at end of file
diff --git a/sc/qa/uitest/calc_tests/tdf80693.py 
b/sc/qa/uitest/calc_tests/tdf80693.py
new file mode 100644
index ..f416fce81514
--- /dev/null
+++ b/sc/qa/uitest/calc_tests/tdf80693.py
@@ -0,0 +1,58 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_pos
+from uitest.uihelper.calc import enter_text_to_cell
+from libreoffice.calc.document import get_sheet_from_doc
+from libreoffice.calc.conditional_format import 
get_conditional_format_from_sheet
+from uitest.debug import sleep
+from libreoffice.calc.document import get_cell_by_position
+from libreoffice.uno.propertyvalue import mkPropertyValues
+
+#Bug 80693 - EDITING: fill cell with random numbers with min = max
+class tdf80693(UITestCase):
+def 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - configure.ac

2018-05-29 Thread Andras Timar
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6855f7cb73ae19d01a98585be6c4c71fd6f78a6e
Author: Andras Timar 
Date:   Tue May 29 20:52:39 2018 +0200

Bump version to 5.3-47

Change-Id: Ibea054c2661e26a87ef842973f28b84e07bba43f

diff --git a/configure.ac b/configure.ac
index e835dfefc024..e793a0bb5ce3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([Collabora Office],[5.3.10.46],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[5.3.10.47],[],[],[https://collaboraoffice.com/])
 
 AC_PREREQ([2.59])
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/cp-5.3-47'

2018-05-29 Thread Olivier R
Tag 'cp-5.3-47' created by Andras Timar  at 
2018-05-29 18:53 +

cp-5.3-47

Changes since cp-5.3-10:
Olivier R (1):
  tdf#107558 French spelling dictionary (6.0.3) and thesaurus

---
 fr_FR/README_fr.txt   |4 
 fr_FR/description.xml |2 
 fr_FR/fr.aff  |17751 ++--
 fr_FR/fr.dic  |155369 
+-
 fr_FR/package-description.txt |2 
 fr_FR/thes_fr.dat |  206 
 6 files changed, 88495 insertions(+), 84839 deletions(-)
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Changes to 'refs/tags/cp-5.3-47'

2018-05-29 Thread Andras Timar
Tag 'cp-5.3-47' created by Andras Timar  at 
2018-05-29 18:53 +

cp-5.3-47

Changes since libreoffice-5-3-branch-point-28:
---
 0 files changed
---
___
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' - drawinglayer/source

2018-05-29 Thread Caolán McNamara
 drawinglayer/source/texture/texture3d.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 0a2035492c66bc323d84ad6c2c4cbc0dc3c9d9aa
Author: Caolán McNamara 
Date:   Mon May 28 21:36:16 2018 +0100

forcepoint#41 null deref

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

diff --git a/drawinglayer/source/texture/texture3d.cxx 
b/drawinglayer/source/texture/texture3d.cxx
index 2120b8f04280..91604803f8eb 100644
--- a/drawinglayer/source/texture/texture3d.cxx
+++ b/drawinglayer/source/texture/texture3d.cxx
@@ -74,8 +74,6 @@ namespace drawinglayer
 {
 // #121194# Todo: use alpha channel, too (for 3d)
 maBitmap = maBitmapEx.GetBitmap();
-mpReadBitmap = Bitmap::ScopedReadAccess(maBitmap);
-OSL_ENSURE(mpReadBitmap, "GeoTexSvxBitmapEx: Got no read access to 
Bitmap (!)");
 
 if(mbIsTransparent)
 {
@@ -92,8 +90,13 @@ namespace drawinglayer
 mpReadTransparence = Bitmap::ScopedReadAccess(maTransparence);
 }
 
-mfMulX = (double)mpReadBitmap->Width() / maSize.getX();
-mfMulY = (double)mpReadBitmap->Height() / maSize.getY();
+mpReadBitmap = Bitmap::ScopedReadAccess(maBitmap);
+SAL_WARN_IF(!mpReadBitmap, "drawinglayer", "GeoTexSvxBitmapEx: Got 
no read access to Bitmap");
+if (mpReadBitmap)
+{
+mfMulX = static_cast(mpReadBitmap->Width()) / 
maSize.getX();
+mfMulY = static_cast(mpReadBitmap->Height()) / 
maSize.getY();
+}
 
 if(maSize.getX() <= 1.0)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: chart2/source cui/source cui/uiconfig include/sfx2 include/svx sc/source sd/source sfx2/source svx/source sw/source

2018-05-29 Thread Caolán McNamara
 chart2/source/controller/main/ChartController_Position.cxx |3 
 chart2/source/controller/main/ShapeController.cxx  |2 
 cui/source/factory/dlgfact.cxx |   50 +++--
 cui/source/factory/dlgfact.hxx |   27 +-
 cui/source/inc/transfrm.hxx|   19 -
 cui/source/tabpages/transfrm.cxx   |   86 +++-
 cui/uiconfig/ui/positionsizedialog.ui  |  127 +++--
 include/sfx2/tabdlg.hxx|2 
 include/svx/svxdlg.hxx |   17 -
 sc/source/ui/drawfunc/drawsh.cxx   |2 
 sd/source/ui/func/futransf.cxx |6 
 sfx2/source/dialog/tabdlg.cxx  |7 
 svx/source/dialog/dialcontrol.cxx  |4 
 sw/source/uibase/shells/drwbassh.cxx   |2 
 14 files changed, 235 insertions(+), 119 deletions(-)

New commits:
commit 6d0d201b30122395eb164807b93d76d567ff970b
Author: Caolán McNamara 
Date:   Tue May 29 09:32:41 2018 +0100

weld SvxTransformTabDialog

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

diff --git a/chart2/source/controller/main/ChartController_Position.cxx 
b/chart2/source/controller/main/ChartController_Position.cxx
index 37b0ef9ef208..2304bb72cda0 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -136,8 +136,9 @@ void ChartController::executeDispatch_PositionAndSize()
 SolarMutexGuard aGuard;
 SvxAbstractDialogFactory * pFact = SvxAbstractDialogFactory::Create();
 OSL_ENSURE( pFact, "No dialog factory" );
+vcl::Window* pWin = GetChartWindow();
 ScopedVclPtr 
pDlg(pFact->CreateSchTransformTabDialog(
-GetChartWindow(), , pSdrView, bResizePossible ));
+pWin ? pWin->GetFrameWeld() : nullptr, , pSdrView, 
bResizePossible));
 OSL_ENSURE( pDlg, "Couldn't create SchTransformTabDialog" );
 
 if( pDlg->Execute() == RET_OK )
diff --git a/chart2/source/controller/main/ShapeController.cxx 
b/chart2/source/controller/main/ShapeController.cxx
index 1b6a89b94985..80203f179b83 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -399,7 +399,7 @@ void ShapeController::executeDispatch_TransformDialog()
 if ( pFact )
 {
 ScopedVclPtr< SfxAbstractTabDialog > pDlg(
-pFact->CreateSvxTransformTabDialog( pChartWindow, 
, pDrawViewWrapper ) );
+pFact->CreateSvxTransformTabDialog(pChartWindow ? 
pChartWindow->GetFrameWeld() : nullptr, , pDrawViewWrapper));
 if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
 {
 const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index a5c76ef405ab..05c404a88b5e 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -130,7 +130,16 @@ short AbstractSvxSearchSimilarityDialog_Impl::Execute()
 return m_xDlg->run();
 }
 
-IMPL_ABSTDLG_BASE(AbstractSvxTransformTabDialog_Impl);
+short AbstractSvxTransformTabDialog_Impl::Execute()
+{
+return m_xDlg->execute();
+}
+
+bool AbstractSvxTransformTabDialog_Impl::StartExecuteAsync(AsyncContext )
+{
+return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
+
 IMPL_ABSTDLG_BASE(AbstractSvxCaptionDialog_Impl);
 IMPL_ABSTDLG_BASE(AbstractSvxJSearchOptionsDialog_Impl);
 
@@ -579,31 +588,33 @@ bool AbstractSvxSearchSimilarityDialog_Impl::IsRelaxed()
 // AbstractSvxTransformTabDialog implementations just forwards everything to 
the dialog
 void AbstractSvxTransformTabDialog_Impl::SetCurPageId( const OString& rName )
 {
-pDlg->SetCurPageId( rName );
+m_xDlg->SetCurPageId( rName );
 }
 
 const SfxItemSet* AbstractSvxTransformTabDialog_Impl::GetOutputItemSet() const
 {
-return pDlg->GetOutputItemSet();
+return m_xDlg->GetOutputItemSet();
 }
 
 const sal_uInt16* AbstractSvxTransformTabDialog_Impl::GetInputRanges(const 
SfxItemPool& pItem )
 {
-return pDlg->GetInputRanges( pItem );
+return m_xDlg->GetInputRanges( pItem );
 }
 
 void AbstractSvxTransformTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet 
)
 {
- pDlg->SetInputSet( pInSet );
+ m_xDlg->SetInputSet( pInSet );
 }
+
 //From class Window.
 void AbstractSvxTransformTabDialog_Impl::SetText( const OUString& rStr )
 {
-pDlg->SetText( rStr );
+m_xDlg->set_title(rStr);
 }
+
 void AbstractSvxTransformTabDialog_Impl::SetValidateFramePosLink( const 
Link& 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/unx

2018-05-29 Thread Caolán McNamara
 vcl/unx/gtk3/gtk3gtkinst.cxx |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit 9773f6140e9c990f6f7e4ea366580cb94bd1539c
Author: Caolán McNamara 
Date:   Tue May 29 11:26:07 2018 +0100

only get notified for user events, not api ones

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

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 28ef5090b1fd..e956f4a3c93b 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2514,9 +2514,23 @@ public:
 return OUString(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8);
 }
 
+virtual void disable_notify_events() override
+{
+g_signal_handler_block(m_pNotebook, m_nSignalId);
+GtkInstanceContainer::disable_notify_events();
+}
+
+virtual void enable_notify_events() override
+{
+GtkInstanceContainer::enable_notify_events();
+g_signal_handler_unblock(m_pNotebook, m_nSignalId);
+}
+
 virtual void remove_page(const OString& rIdent) override
 {
+disable_notify_events();
 gtk_notebook_remove_page(m_pNotebook, get_page_number(rIdent));
+enable_notify_events();
 }
 
 virtual ~GtkInstanceNotebook() override
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - cui/source

2018-05-29 Thread Caolán McNamara
 cui/source/tabpages/transfrm.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 91ea25d7579ac1830e428fcefbf522c0b4da2a97
Author: Caolán McNamara 
Date:   Tue May 29 13:53:35 2018 +0100

fix pow by digits

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

diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index cf3bc446a78e..0f5894d8d550 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -1071,6 +1071,8 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet*  )
 pItem = GetItem( mrOutAttrs, SID_ATTR_TRANSFORM_WIDTH );
 mfOldWidth = std::max( pItem ? static_cast(static_cast(pItem)->GetValue()) : 0.0, 1.0 );
 double 
fTmpWidth((OutputDevice::LogicToLogic(static_cast(mfOldWidth), 
mePoolUnit, MapUnit::Map100thMM)) / fUIScale);
+if (m_xMtrWidth->get_digits())
+fTmpWidth *= pow(10.0, m_xMtrWidth->get_digits());
 m_xMtrWidth->set_value(static_cast(fTmpWidth), FUNIT_100TH_MM);
 }
 
@@ -1078,6 +1080,8 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet*  )
 pItem = GetItem( mrOutAttrs, SID_ATTR_TRANSFORM_HEIGHT );
 mfOldHeight = std::max( pItem ? static_cast(static_cast(pItem)->GetValue()) : 0.0, 1.0 );
 double 
fTmpHeight((OutputDevice::LogicToLogic(static_cast(mfOldHeight), 
mePoolUnit, MapUnit::Map100thMM)) / fUIScale);
+if (m_xMtrHeight->get_digits())
+fTmpHeight *= pow(10.0, m_xMtrHeight->get_digits());
 m_xMtrHeight->set_value(static_cast(fTmpHeight), FUNIT_100TH_MM);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sfx2 sfx2/source

2018-05-29 Thread Caolán McNamara
 include/sfx2/tabdlg.hxx   |1 +
 sfx2/source/dialog/tabdlg.cxx |   40 +---
 2 files changed, 26 insertions(+), 15 deletions(-)

New commits:
commit ba0408ae9a4ac1b391944b2fdcfd02f86ab2f773
Author: Caolán McNamara 
Date:   Tue May 29 10:43:11 2018 +0100

we need to be able to query the ranges before creating the pages

so don't create the pages until the first execute

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

diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 9da02d5c371e..a83573d1dfa6 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -249,6 +249,7 @@ private:
 DECL_DLLPRIVATE_LINK(ActivatePageHdl, const OString&, void);
 DECL_DLLPRIVATE_LINK(DeactivatePageHdl, const OString&, bool);
 SAL_DLLPRIVATE void Init_Impl(bool bFmtFlag);
+SAL_DLLPRIVATE void CreatePages();
 
 protected:
 virtual short   Ok();
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 31be0ca30543..5ccfb377fd0b 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -1615,6 +1615,8 @@ IMPL_LINK(SfxTabDialogController, ActivatePageHdl, const 
OString&, rPage, void)
 }
 
 VclPtr pTabPage = pDataObject->pTabPage;
+if (!pTabPage)
+return;
 
 if (pDataObject->bRefresh)
 pTabPage->Reset(m_pSet);
@@ -1935,24 +1937,30 @@ void SfxTabDialogController::AddTabPage
 )
 {
 m_pImpl->aData.push_back(new Data_Impl(m_pImpl->aData.size(), rName, 
pCreateFunc, pRangesFunc));
-Data_Impl* pDataObject = m_pImpl->aData.back();
+}
 
-assert(pDataObject->pTabPage == nullptr && "create TabPage more than 
once");
-weld::Container* pPage = m_xTabCtrl->get_page(rName);
-pDataObject->pTabPage = (pDataObject->fnCreatePage)(pPage, m_pSet);
-pDataObject->pTabPage->SetDialogController(this);
+void SfxTabDialogController::CreatePages()
+{
+for (auto pDataObject : m_pImpl->aData)
+{
+if (pDataObject->pTabPage)
+   continue;
+weld::Container* pPage = m_xTabCtrl->get_page(pDataObject->sId);
+pDataObject->pTabPage = (pDataObject->fnCreatePage)(pPage, m_pSet);
+pDataObject->pTabPage->SetDialogController(this);
 
-OUString sConfigId = 
OStringToOUString(pDataObject->pTabPage->GetConfigId(), RTL_TEXTENCODING_UTF8);
-SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId);
-OUString sUserData;
-Any aUserItem = aPageOpt.GetUserItem(USERITEM_NAME);
-OUString aTemp;
-if ( aUserItem >>= aTemp )
-sUserData = aTemp;
-pDataObject->pTabPage->SetUserData(sUserData);
+OUString sConfigId = 
OStringToOUString(pDataObject->pTabPage->GetConfigId(), RTL_TEXTENCODING_UTF8);
+SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId);
+OUString sUserData;
+Any aUserItem = aPageOpt.GetUserItem(USERITEM_NAME);
+OUString aTemp;
+if ( aUserItem >>= aTemp )
+sUserData = aTemp;
+pDataObject->pTabPage->SetUserData(sUserData);
 
-PageCreated(rName, *pDataObject->pTabPage);
-pDataObject->pTabPage->Reset(m_pSet);
+PageCreated(pDataObject->sId, *pDataObject->pTabPage);
+pDataObject->pTabPage->Reset(m_pSet);
+}
 }
 
 void SfxTabDialogController::RemoveTabPage(const OString& rId)
@@ -1996,6 +2004,8 @@ void SfxTabDialogController::RemoveTabPage(const OString& 
rId)
 
 void SfxTabDialogController::Start_Impl()
 {
+CreatePages();
+
 assert(m_pImpl->aData.size() == 
static_cast(m_xTabCtrl->get_n_pages())
 && "not all pages registered");
 
___
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' - dictionaries

2018-05-29 Thread Kruno
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 317319422bd2780c883251d5adc623dd7cc11ae8
Author: Kruno 
Date:   Fri Apr 27 21:35:24 2018 +0100

Updated core
Project: dictionaries  7da396b70265569b851a1c2327e7dcf757e3f936

Update Croatian dictionary to version 2.1.1

Change-Id: I8425ab128d04d428ccc99cb6c8abe2635292f143
Reviewed-on: https://gerrit.libreoffice.org/53579
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/dictionaries b/dictionaries
index 37c3e3924d33..7da396b70265 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit 37c3e3924d33f29dbff7fb3dba40b36a694c6792
+Subproject commit 7da396b70265569b851a1c2327e7dcf757e3f936
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: Branch 'libreoffice-6-0' - hr_HR/hr_HR.aff hr_HR/hr_HR.dic hr_HR/README_hr_HR.txt

2018-05-29 Thread Kruno
 hr_HR/README_hr_HR.txt |9 
 hr_HR/hr_HR.aff|  285 ++-
 hr_HR/hr_HR.dic|  509 +++--
 3 files changed, 607 insertions(+), 196 deletions(-)

New commits:
commit 7da396b70265569b851a1c2327e7dcf757e3f936
Author: Kruno 
Date:   Fri Apr 27 21:35:24 2018 +0100

Update Croatian dictionary to version 2.1.1

Change-Id: I8425ab128d04d428ccc99cb6c8abe2635292f143
Reviewed-on: https://gerrit.libreoffice.org/53579
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/hr_HR/README_hr_HR.txt b/hr_HR/README_hr_HR.txt
index d8bf8df..3f8cc76 100644
--- a/hr_HR/README_hr_HR.txt
+++ b/hr_HR/README_hr_HR.txt
@@ -11,11 +11,16 @@ repository: https://www.github.com/krunose/hr-hunspell
 
 ### Autori i doprinositelji ###
 
-Mirko Kos (m i r k o s 9 9 [ a t ] g m a i l . c o m), 2016. - 2017.
+
+Boris Juric, 2017. - 2018.
+
+-
+
+Mirko Kos (m i r k o s 9 9 [ a t ] g m a i l // c o m), 2016. - 2017.
 
 -
 
-Krunoslav Šebetić (k r u n o . s e [ a t ] g m x . c o m), 2014. - 2017.
+Krunoslav Šebetić (k r u n o . s e [ a t ] g m x // c o m), 2014. - 2018.
 
 -
 
diff --git a/hr_HR/hr_HR.aff b/hr_HR/hr_HR.aff
index 67e56bc..3e91312 100644
--- a/hr_HR/hr_HR.aff
+++ b/hr_HR/hr_HR.aff
@@ -25,6 +25,7 @@ SUBSTANDARD ZO
 FORBIDDENWORD ZN
 WARN ZM
 
+# NOSPLITSUGS
 # SUGSWITHDOTS
 # FORBIDWARN
 
@@ -75,12 +76,14 @@ ICONV ŕ r
 
 
 # REP - .
-REP 157
+REP 219
 REP ^pocrtava podcrtava
 REP ^zdrastv zdravstv
 REP nućemo$ nut_ćemo
 REP nućete$ nut_ćete
 REP ^riječo$ riječ_o
+REP ^usisač usisivač
+REP rejanac rejac
 REP ^prenat prednat
 REP šćemo$ st_ćemo
 REP šćete$ st_ćete
@@ -88,14 +91,19 @@ REP aćemo$ at_ćemo
 REP aćete$ at_ćete
 REP ićete$ it_ćete
 REP avaon ovaonic
+REP ^očenaš Očenaš
 REP ićemo$ it_ćemo
 REP ećete$ et_ćete
 REP nućeš$ nut_ćeš
 REP ećemo$ et_ćemo
 REP bčanci$ pčanki
+REP ^rasazn razazn
+REP ^kosmos kozmos
 REP stravn stavn
 REP ^poravo$ pravo
 REP skinj stkinj
+REP reank rejk
+REP ampiš ampinš
 REP ^nezna ne_zna
 REP ^prdon pridon
 REP dreti$ derati
@@ -104,6 +112,7 @@ REP ićeš$ it_ćeš
 REP ^subst supst
 REP aćeš$ at_ćeš
 REP ^obama$ oboma
+REP ^lotus lotos
 REP nuću$ nut_ću
 REP nion nionic
 REP nuće$ nut_će
@@ -117,24 +126,33 @@ REP natn nantn
 REP dvgn dvagn
 REP skma$ skima
 REP ^bimo$ bismo
+REP ^kazin kasin
 REP ^htjeo$ htio
 REP ^menom$ mnom
 REP ^bite$ biste
 REP ^stim$ s_tim
 REP ^polu- polu
+REP ^moće$ može
 REP skme$ skome
 REP nara napra
 REP skmu$ skomu
+REP ^ljud$ ljut
+REP ^paje$ pa_je
 REP ^trab trav
 REP ^trab treb
 REP ^jel$ je_li
 REP bljiv biv
+REP ljiv ljav
 REP najs naes
+REP sup sump
+REP ion ijun
 REP zir rizir
 REP aon aonic
 REP iće$ it_će
 REP šće$ st_će
 REP arn arnic
+REP iju e
+REP tid tud
 REP ^poveč več
 REP aću$ at_ću
 REP iću$ it_ću
@@ -151,10 +169,13 @@ REP skm$ skim
 REP skm$ skom
 REP ioc$ ilac
 REP kno ktno
+REP ije ive
 REP isl i_sl
+REP nest nijet
 REP aoc$ alac
 REP ^mže$ može
 REP rni rnu
+REP rh rth
 REP ljnj nj
 REP mnj mlj
 REP ^bim$ bih
@@ -169,6 +190,8 @@ REP skuj šć
 REP xy ksi
 REP je ije
 REP ^biš$ bi
+REP and ad
+REP ^sa su
 REP ije je
 REP om -om
 REP ći vši
@@ -182,6 +205,7 @@ REP is ijs
 REP un utn
 REP vši ći
 REP ko$ klo
+REP nk ngk
 REP ia ija
 REP lj nj
 REP iju$ e
@@ -190,6 +214,7 @@ REP zk sk
 REP ki$ ci
 REP bč pč
 REP dk tk
+REP dp tp
 REP bs ps
 REP gi zi
 REP zc sc
@@ -217,10 +242,14 @@ REP x ks
 REP c ts
 REP c ds
 REP a -a
+REP a aa
+REP d dd
 REP e ee
 REP u -u
+REP n nn
 REP o oo
 REP u uu
+REP s ss
 REP i je
 REP zš š
 REP j dž
@@ -228,13 +257,48 @@ REP dž č
 REP ^ts c
 REP št š
 REP st s
-REP - _
 REP c k
 REP g h
 REP ć č
 REP č ć
+REP ^a A
+REP ^b B
+REP ^c C
+REP ^č Č
+REP ^ć Ć
+REP ^d D
+REP ^dž Dž
+REP ^đ Đ
+REP ^e E
+REP ^f F
+REP ^g G
+REP ^h H
+REP ^i I
+REP ^j J
+REP ^k K
+REP ^l L
+REP ^lj Lj
+REP ^m M
+REP ^n N
+REP ^nj Nj
+REP ^o O
+REP ^p P
+REP ^q Q
+REP ^r R
+REP ^s S
+REP ^š Š
+REP ^t T
+REP ^u U
+REP ^v V
+REP ^w W
+REP ^x X
+REP ^y Y
+REP ^z Z
+REP ^ž Ž
+REP - _
+
 
-AF 403
+AF 416
 AF ZZ  # 1
 AF ZY  # 2
 AF ZX  # 3
@@ -637,7 +701,20 @@ AF TF  # 399
 AF TE  # 400
 AF TD  # 401
 AF THTGTETC# 402
-AF TB  #403
+AF TB  # 403
+AF TA  # 404
+AF SZ  # 405
+AF SY  # 406
+AF SX  # 407
+AF SW  # 408
+AF SV  # 409
+AF SU  # 410
+AF THTG# 411
+AF ST  # 412
+AF SS  # 413
+AF SOSPSR  # 414
+AF SMSNSR  # 415
+AF SL  # 416
 
 
 SFX XZ Y  21
@@ -3612,6 +3689,7 @@ SFX TF 0 -evoga .
 SFX TF 0 -evome .
 SFX TF 0 -evomu .
 
+
 SFX TE Y 7
 SFX TE 0 -ovac .
 SFX TE 0 -ovca .
@@ -3622,13 +3700,13 @@ SFX TE 0 -ovcem .
 SFX TE 0 -ovcima .
 
 SFX TD Y 7
-SFX TD 0 -evac .
-SFX TD 0 -evca .
-SFX TD 0 -evcu .
-SFX TD 0 -evcem .
-SFX TD 0 -evci .
-SFX TD 0 -evcem .
-SFX TD 0 -evcima .
+SFX TD 0 -evac im
+SFX TD 0 -evca im
+SFX TD 0 -evcu im
+SFX TD 0 -evcem im
+SFX TD 0 -evci im
+SFX TD 0 -evcem im
+SFX TD 0 -evcima im
 
 SFX TC Y 6
 SFX TC 0 -ovka .
@@ -3642,3 +3720,188 @@ SFX TB Y 3
 SFX TB 0 -a .

[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - cui/uiconfig

2018-05-29 Thread Caolán McNamara
 cui/uiconfig/ui/positionsizedialog.ui |2 +-
 cui/uiconfig/ui/possizetabpage.ui |   21 ++---
 cui/uiconfig/ui/rotationtabpage.ui|6 +++---
 3 files changed, 14 insertions(+), 15 deletions(-)

New commits:
commit 49a10ec8ce1f92a29b7ee9f8660b313d1d5c5c5b
Author: Caolán McNamara 
Date:   Tue May 29 10:53:06 2018 +0100

these spinbuttons should be focusable

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

diff --git a/cui/uiconfig/ui/positionsizedialog.ui 
b/cui/uiconfig/ui/positionsizedialog.ui
index 792fa764dddc..8b276311627c 100644
--- a/cui/uiconfig/ui/positionsizedialog.ui
+++ b/cui/uiconfig/ui/positionsizedialog.ui
@@ -93,7 +93,7 @@
 
   
 True
-False
+True
 True
 True
 
diff --git a/cui/uiconfig/ui/possizetabpage.ui 
b/cui/uiconfig/ui/possizetabpage.ui
index 76fffb89d621..94e7d628089e 100644
--- a/cui/uiconfig/ui/possizetabpage.ui
+++ b/cui/uiconfig/ui/possizetabpage.ui
@@ -2,7 +2,6 @@
 
 
   
-  
   
 -120
 240
@@ -86,7 +85,7 @@
 
   
 True
-False
+True
 True
 adjustmentPOS
 2
@@ -99,7 +98,7 @@
 
   
 True
-False
+True
 True
 adjustmentPOS1
 2
@@ -249,7 +248,7 @@
 
   
 True
-False
+True
 True
 adjustmentSIZE
 2
@@ -262,7 +261,7 @@
 
   
 True
-False
+True
 True
 adjustmentSIZE1
 2
@@ -276,7 +275,7 @@
   
 _Keep ratio
 True
-False
+True
 False
 True
 0
@@ -316,7 +315,7 @@
   
 
 
-   
+  
 True
 True
 center
@@ -401,7 +400,7 @@
   
 Positio_n
 True
-False
+True
 False
 True
 0
@@ -418,7 +417,7 @@
   
 _Size
 True
-False
+True
 False
 True
 0
@@ -475,7 +474,7 @@
   
 _Fit width to text
 True
-False
+True
 False
 True
 0
@@ -492,7 +491,7 @@
   
 Fit _height to text
 True
-False
+True
 False
 True
 0
diff --git a/cui/uiconfig/ui/rotationtabpage.ui 
b/cui/uiconfig/ui/rotationtabpage.ui
index af5f9ec6260c..0bb66f4d4282 100644
--- a/cui/uiconfig/ui/rotationtabpage.ui
+++ b/cui/uiconfig/ui/rotationtabpage.ui
@@ -80,7 +80,7 @@
 
   
 True
-False
+True
 True
 adjustmentPOS1
 2
@@ -93,7 +93,7 @@
 
   
 True
-False
+True
 True
 adjustmentPOS2
 2
@@ -231,7 +231,7 @@
 
   
 True
-False
+True
 True
 adjustmentANGLE
 2
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svx/source

2018-05-29 Thread Caolán McNamara
 svx/source/dialog/SafeModeDialog.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dc24a62c59121df2b70b25118b562661c24c2841
Author: Caolán McNamara 
Date:   Tue May 29 20:57:32 2018 +0100

tdf#117862 crash in profile export dialog

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

diff --git a/svx/source/dialog/SafeModeDialog.cxx 
b/svx/source/dialog/SafeModeDialog.cxx
index 33e8912bebc5..d802258d3788 100644
--- a/svx/source/dialog/SafeModeDialog.cxx
+++ b/svx/source/dialog/SafeModeDialog.cxx
@@ -343,7 +343,7 @@ namespace {
 };
 
 ProfileExportedDialog::ProfileExportedDialog(weld::Window* pParent)
-: GenericDialogController(pParent, "svx/ui/profileexporteddialog.ui", 
"GenericDialogController")
+: GenericDialogController(pParent, "svx/ui/profileexporteddialog.ui", 
"ProfileExportedDialog")
 , m_xButton(m_xBuilder->weld_button("ok"))
 {
 m_xButton->connect_clicked(LINK(this, ProfileExportedDialog, OpenHdl));
___
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' - vcl/inc vcl/unx

2018-05-29 Thread Caolán McNamara
 vcl/inc/unx/salobj.h  |1 +
 vcl/unx/generic/window/salobj.cxx |   12 +---
 2 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit d9c5e7f4aef8da58b2b59e3259d1704296648cbf
Author: Caolán McNamara 
Date:   Mon May 28 10:48:32 2018 +0100

tdf#117628 crash after closing media player with X11 backend

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

diff --git a/vcl/inc/unx/salobj.h b/vcl/inc/unx/salobj.h
index 8eb91b917efe..4a0535507dc2 100644
--- a/vcl/inc/unx/salobj.h
+++ b/vcl/inc/unx/salobj.h
@@ -56,6 +56,7 @@ class VCLPLUG_GEN_PUBLIC X11SalObject : public SalObject
 public:
 SystemEnvData maSystemChildData;
 SalFrame*   mpParent;
+::WindowmaParentWin;
 ::WindowmaPrimary;
 ::WindowmaSecondary;
 ColormapmaColormap;
diff --git a/vcl/unx/generic/window/salobj.cxx 
b/vcl/unx/generic/window/salobj.cxx
index 9d0833094c1d..de41bc8bf8cb 100644
--- a/vcl/unx/generic/window/salobj.cxx
+++ b/vcl/unx/generic/window/salobj.cxx
@@ -62,7 +62,8 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, 
SystemWindowData* p
 SalDisplay* pSalDisp= 
vcl_sal::getSalDisplay(GetGenericUnixSalData());
 const SystemEnvData* pEnv   = pParent->GetSystemData();
 Display* pDisp  = pSalDisp->GetDisplay();
-::Window aObjectParent  = (::Window)pEnv->aWindow;
+::Window aObjectParent  = static_cast<::Window>(pEnv->aWindow);
+pObject->maParentWin = aObjectParent;
 
 // find out on which screen that window is
 XWindowAttributes aParentAttr;
@@ -235,8 +236,7 @@ X11SalObject::~X11SalObject()
 rObjects.remove( this );
 
 GetGenericUnixSalData()->ErrorTrapPush();
-const SystemEnvData* pEnv   = mpParent->GetSystemData();
-::Window aObjectParent  = (::Window)pEnv->aWindow;
+::Window aObjectParent = maParentWin;
 
XSetWindowBackgroundPixmap(static_cast(maSystemChildData.pDisplay), 
aObjectParent, None);
 if ( maSecondary )
 XDestroyWindow( static_cast(maSystemChildData.pDisplay), 
maSecondary );
@@ -400,12 +400,11 @@ bool X11SalObject::Dispatch( XEvent* pEvent )
)
 {
 SalMouseEvent aEvt;
-const SystemEnvData* pParentData = 
pObject->mpParent->GetSystemData();
 int dest_x, dest_y;
 ::Window aChild = None;
 XTranslateCoordinates( pEvent->xbutton.display,
pEvent->xbutton.root,
-   pParentData->aWindow,
+   pObject->maParentWin,
pEvent->xbutton.x_root,
pEvent->xbutton.y_root,
_x, _y,
@@ -466,9 +465,8 @@ bool X11SalObject::Dispatch( XEvent* pEvent )
 void X11SalObject::SetLeaveEnterBackgrounds(const 
css::uno::Sequence& rLeaveArgs, const 
css::uno::Sequence& rEnterArgs)
 {
 SalDisplay* pSalDisp= 
vcl_sal::getSalDisplay(GetGenericUnixSalData());
-const SystemEnvData* pEnv   = mpParent->GetSystemData();
 Display* pDisp  = pSalDisp->GetDisplay();
-::Window aObjectParent  = (::Window)pEnv->aWindow;
+::Window aObjectParent  = maParentWin;
 
 bool bFreePixmap = false;
 Pixmap aPixmap = None;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/unx

2018-05-29 Thread Caolán McNamara
 vcl/unx/gtk3/gtk3gtkinst.cxx |   15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

New commits:
commit cb65109caf5ba5b2c04202464a435c658a4a1ccc
Author: Caolán McNamara 
Date:   Tue May 29 14:23:03 2018 +0100

remember button pressed to reuse for move

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

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 9a1d58098e74..28ef5090b1fd 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3647,6 +3647,7 @@ private:
 ScopedVclPtrInstance m_xDevice;
 std::vector m_aBuffer;
 cairo_surface_t* m_pSurface;
+sal_uInt16 m_nLastMouseButton;
 gulong m_nDrawSignalId;
 gulong m_nSizeAllocateSignalId;
 gulong m_nButtonPressSignalId;
@@ -3776,17 +3777,16 @@ private:
 return false;
 }
 
-sal_uInt16 nButton;
 switch (pEvent->button)
 {
 case 1:
-nButton = MOUSE_LEFT;
+m_nLastMouseButton = MOUSE_LEFT;
 break;
 case 2:
-nButton = MOUSE_MIDDLE;
+m_nLastMouseButton = MOUSE_MIDDLE;
 break;
 case 3:
-nButton = MOUSE_RIGHT;
+m_nLastMouseButton = MOUSE_RIGHT;
 break;
 default:
 return false;
@@ -3794,8 +3794,8 @@ private:
 
 Point aPos(pEvent->x, pEvent->y);
 sal_uInt32 nModCode = GtkSalFrame::GetMouseModCode(pEvent->state);
-sal_uInt16 nCode = nButton | (nModCode & (KEY_SHIFT | KEY_MOD1 | 
KEY_MOD2));
-MouseEvent aMEvt(aPos, nClicks, ImplGetMouseButtonMode(nButton, 
nModCode), nCode, nCode);
+sal_uInt16 nCode = m_nLastMouseButton | (nModCode & (KEY_SHIFT | 
KEY_MOD1 | KEY_MOD2));
+MouseEvent aMEvt(aPos, nClicks, 
ImplGetMouseButtonMode(m_nLastMouseButton, nModCode), nCode, nCode);
 
 if (nEventType == SalEvent::MouseButtonDown)
 m_aMousePressHdl.Call(aMEvt);
@@ -3814,7 +3814,7 @@ private:
 {
 Point aPos(pEvent->x, pEvent->y);
 sal_uInt32 nModCode = GtkSalFrame::GetMouseModCode(pEvent->state);
-sal_uInt16 nCode = (nModCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2));
+sal_uInt16 nCode = m_nLastMouseButton | (nModCode & (KEY_SHIFT | 
KEY_MOD1 | KEY_MOD2));
 MouseEvent aMEvt(aPos, 0, ImplGetMouseMoveMode(nModCode), nCode, 
nCode);
 
 m_aMouseMotionHdl.Call(aMEvt);
@@ -3854,6 +3854,7 @@ public:
 , m_pAccessible(nullptr)
 , m_xDevice(nullptr, Size(1, 1), DeviceFormat::DEFAULT)
 , m_pSurface(nullptr)
+, m_nLastMouseButton(0)
 , m_nDrawSignalId(g_signal_connect(m_pDrawingArea, "draw", 
G_CALLBACK(signalDraw), this))
 , m_nSizeAllocateSignalId(g_signal_connect(m_pDrawingArea, 
"size_allocate", G_CALLBACK(signalSizeAllocate), this))
 , m_nButtonPressSignalId(g_signal_connect(m_pDrawingArea, 
"button-press-event", G_CALLBACK(signalButton), this))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sfx2/source

2018-05-29 Thread Caolán McNamara
 sfx2/source/appl/newhelp.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 509df47d2165fd08a7e0d270cade28ff52da532e
Author: Caolán McNamara 
Date:   Tue May 29 16:35:27 2018 +0100

Resolves: tdf#117712 closing help crashes

since...

commit 9fa32e5dce345dea17129587c401c03520fb398b
Date:   Wed May 16 11:54:52 2018 +0200

fix leak of HelpListener_Impl in SfxHelpWindow_Impl

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

diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index ab95c195ec77..133502e6fef8 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -503,7 +503,7 @@ friend class SfxHelpIndexWindow_Impl;
 VclPtrpIndexWin;
 VclPtr pTextWin;
 HelpInterceptor_Impl*   pHelpInterceptor;
-std::unique_ptr pHelpListener;
+rtl::Reference pHelpListener;
 
 sal_Int32   nExpandWidth;
 sal_Int32   nCollapseWidth;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-29 Thread Caolán McNamara
 sfx2/source/appl/newhelp.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 379a83359f93fa34799e116c38532f43d0534265
Author: Caolán McNamara 
Date:   Tue May 29 16:35:27 2018 +0100

Resolves: tdf#117712 closing help crashes

since...

commit 9fa32e5dce345dea17129587c401c03520fb398b
Date:   Wed May 16 11:54:52 2018 +0200

fix leak of HelpListener_Impl in SfxHelpWindow_Impl

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

diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index ab95c195ec77..133502e6fef8 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -503,7 +503,7 @@ friend class SfxHelpIndexWindow_Impl;
 VclPtrpIndexWin;
 VclPtr pTextWin;
 HelpInterceptor_Impl*   pHelpInterceptor;
-std::unique_ptr pHelpListener;
+rtl::Reference pHelpListener;
 
 sal_Int32   nExpandWidth;
 sal_Int32   nCollapseWidth;
___
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' - sc/qa sc/source

2018-05-29 Thread Caolán McNamara
 sc/qa/unit/data/xls/forcepoint-pivot-1.xls |binary
 sc/source/filter/excel/xipivot.cxx |8 
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 69c5be9b26cf1a45e220d69f65b1bb0fa2aedaf6
Author: Caolán McNamara 
Date:   Mon May 28 21:22:56 2018 +0100

forcepoint#40 null deref

presumably since

commit 0098bee792c3e208ea4f6ef1c676958d3f4cd207
Date:   Thu Sep 21 06:48:09 2017 +0200

tdf#112501: Pivot table: popupbuttons are placed on wrong cells

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

diff --git a/sc/qa/unit/data/xls/forcepoint-pivot-1.xls 
b/sc/qa/unit/data/xls/forcepoint-pivot-1.xls
new file mode 100644
index ..12919922666b
Binary files /dev/null and b/sc/qa/unit/data/xls/forcepoint-pivot-1.xls differ
diff --git a/sc/source/filter/excel/xipivot.cxx 
b/sc/source/filter/excel/xipivot.cxx
index e63db6cdb1ab..669d6262cc2d 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -1566,13 +1566,13 @@ void XclImpPivotTable::ApplyMergeFlags(const ScRange& 
rOutRange, const ScDPSaveD
 itr= aFieldBtns.begin();
 itrEnd = aFieldBtns.end();
 vector::const_iterator itDim = 
aFieldDims.begin();
-for (; itr != itrEnd; ++itr, ++itDim)
+for (; itr != itrEnd; ++itr)
 {
 ScMF nMFlag = ScMF::Button;
-const ScDPSaveDimension* pDim = *itDim;
-if (pDim->HasInvisibleMember())
+const ScDPSaveDimension* pDim = itDim != aFieldDims.end() ? 
*itDim++ : nullptr;
+if (pDim && pDim->HasInvisibleMember())
 nMFlag |= ScMF::HiddenMember;
-if (!pDim->IsDataLayout())
+if (!pDim || !pDim->IsDataLayout())
 nMFlag |= ScMF::ButtonPopup;
 rDoc.ApplyFlagsTab(itr->Col(), itr->Row(), itr->Col(), itr->Row(), 
itr->Tab(), nMFlag);
 }
___
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' - vcl/qa vcl/source

2018-05-29 Thread Miklos Vajna
 vcl/qa/cppunit/pdfexport/data/tdf113143.odp |binary
 vcl/qa/cppunit/pdfexport/pdfexport.cxx  |  173 +---
 vcl/source/gdi/pdfextoutdevdata.cxx |6 
 3 files changed, 114 insertions(+), 65 deletions(-)

New commits:
commit 257014ce03dee29506e8e70c204e912c4ed33172
Author: Miklos Vajna 
Date:   Thu May 24 17:29:13 2018 +0200

tdf#113143 PDF export: fix mis-scaled JPGs on Impress note pages

This is really similar to commit
4c2172a3e973bc6351107a3a1b554c77b40b75dd (tdf#106702 PDF export: fix
missing images from Writer headers/footers, 2018-05-22) just this one is
about the size of the output rectangle for JPG content, while the
previous problem was about the position of them.

Also extract PdfExportTest::exportAndParse() from the last two tests to
avoid duplication.

(cherry picked from commit 89dc667cebfec5315f0c0361e49d759e88458689)

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

diff --git a/vcl/qa/cppunit/pdfexport/data/tdf113143.odp 
b/vcl/qa/cppunit/pdfexport/data/tdf113143.odp
new file mode 100644
index ..5f8a1b10e2e5
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf113143.odp differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 9e6924f2e66a..da3da74fc63d 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -40,8 +40,13 @@ class PdfExportTest : public test::BootstrapFixture, public 
unotest::MacrosTest
 uno::Reference mxComponent;
 FPDF_PAGE mpPdfPage = nullptr;
 FPDF_DOCUMENT mpPdfDocument = nullptr;
+utl::TempFile maTempFile;
+SvMemoryStream maMemory;
+// Export the document as PDF, then parse it with PDFium.
+void exportAndParse(const OUString& rURL, const utl::MediaDescriptor& 
rDescriptor);
 
 public:
+PdfExportTest();
 virtual void setUp() override;
 virtual void tearDown() override;
 void load(const OUString& rFile, vcl::filter::PDFDocument& rDocument);
@@ -77,6 +82,7 @@ public:
 void testTdf109143();
 void testTdf105954();
 void testTdf106702();
+void testTdf113143();
 
 CPPUNIT_TEST_SUITE(PdfExportTest);
 CPPUNIT_TEST(testTdf106059);
@@ -102,9 +108,32 @@ public:
 CPPUNIT_TEST(testTdf109143);
 CPPUNIT_TEST(testTdf105954);
 CPPUNIT_TEST(testTdf106702);
+CPPUNIT_TEST(testTdf113143);
 CPPUNIT_TEST_SUITE_END();
 };
 
+PdfExportTest::PdfExportTest()
+{
+maTempFile.EnableKillingFile();
+}
+
+void PdfExportTest::exportAndParse(const OUString& rURL, const 
utl::MediaDescriptor& rDescriptor)
+{
+// Import the bugdoc and export as PDF.
+mxComponent = loadFromDesktop(rURL);
+CPPUNIT_ASSERT(mxComponent.is());
+
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+xStorable->storeToURL(maTempFile.GetURL(), 
rDescriptor.getAsConstPropertyValueList());
+
+// Parse the export result with pdfium.
+SvFileStream aFile(maTempFile.GetURL(), StreamMode::READ);
+maMemory.WriteStream(aFile);
+mpPdfDocument
+= FPDF_LoadMemDocument(maMemory.GetData(), maMemory.GetSize(), 
/*password=*/nullptr);
+CPPUNIT_ASSERT(mpPdfDocument);
+}
+
 void PdfExportTest::setUp()
 {
 test::BootstrapFixture::setUp();
@@ -142,14 +171,12 @@ void PdfExportTest::load(const OUString& rFile, 
vcl::filter::PDFDocument& rDocum
 CPPUNIT_ASSERT(mxComponent.is());
 
 uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
-utl::TempFile aTempFile;
-aTempFile.EnableKillingFile();
 utl::MediaDescriptor aMediaDescriptor;
 aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
-xStorable->storeToURL(aTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
+xStorable->storeToURL(maTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
 
 // Parse the export result.
-SvFileStream aStream(aTempFile.GetURL(), StreamMode::READ);
+SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ);
 CPPUNIT_ASSERT(rDocument.Read(aStream));
 }
 
@@ -161,8 +188,6 @@ void PdfExportTest::testTdf106059()
 CPPUNIT_ASSERT(mxComponent.is());
 
 uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
-utl::TempFile aTempFile;
-aTempFile.EnableKillingFile();
 utl::MediaDescriptor aMediaDescriptor;
 aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
 // Explicitly enable the usage of the reference XObject markup.
@@ -170,11 +195,11 @@ void PdfExportTest::testTdf106059()
 {"UseReferenceXObject", uno::Any(true) }
 }));
 aMediaDescriptor["FilterData"] <<= aFilterData;
-xStorable->storeToURL(aTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
+xStorable->storeToURL(maTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
 
 

[Libreoffice-commits] core.git: vcl/inc vcl/source

2018-05-29 Thread Stephan Bergmann
 vcl/inc/sft.hxx|1 -
 vcl/source/fontsubset/ttcr.hxx |1 -
 2 files changed, 2 deletions(-)

New commits:
commit 5a5518f7f0ce977cace7728c977b0c115589b254
Author: Stephan Bergmann 
Date:   Tue May 29 16:04:15 2018 +0200

Remove unused SFErrCodes::TableFormat

...which was apparently unused (under its original name SF_TABLEFORMAT) ever
since its introduction in 571f15004533c1e7a5472e033139d5765862fb73 "Unix PS-
Print Environment".  (Not sure what its appearance in the comment to 
AddTable,
also there since that introductory commit, was ever supposed to mean.)

Change-Id: I363e21e2e2d23aaf17c6f10b3936ba700203b9eb
Reviewed-on: https://gerrit.libreoffice.org/55020
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx
index c4bdee9f2a76..07146f03aa83 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -69,7 +69,6 @@ namespace vcl
 GlyphNum,/**< incorrect number of glyphs   
*/
 BadArg,  /**< incorrect arguments  
*/
 TtFormat,/**< incorrect TrueType font format   
*/
-TableFormat, /**< incorrect format of a TrueType 
table */
 FontNo   /**< incorrect logical font number of 
a TTC font  */
 };
 
diff --git a/vcl/source/fontsubset/ttcr.hxx b/vcl/source/fontsubset/ttcr.hxx
index 5acd5230ecd8..c1ac5d029dfd 100644
--- a/vcl/source/fontsubset/ttcr.hxx
+++ b/vcl/source/fontsubset/ttcr.hxx
@@ -64,7 +64,6 @@ namespace vcl
 
 /**
  * Adds a TrueType table to the TrueType creator.
- * SFErrCodes::TableFormat value.
  * @return value of SFErrCodes type
  */
 SFErrCodes AddTable(TrueTypeCreator *_this, TrueTypeTable *table);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-5.3-47'

2018-05-29 Thread Andras Timar
Tag 'cp-5.3-47' created by Andras Timar  at 
2018-05-29 18:53 +

cp-5.3-47

Changes since cp-5.3-46-30:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - chart2/source cui/source cui/uiconfig include/sfx2 include/svx sc/source sd/source sfx2/source svx/source sw/source

2018-05-29 Thread Caolán McNamara
 chart2/source/controller/main/ChartController_Position.cxx |3 
 chart2/source/controller/main/ShapeController.cxx  |2 
 cui/source/factory/dlgfact.cxx |   50 +++--
 cui/source/factory/dlgfact.hxx |   27 +-
 cui/source/inc/transfrm.hxx|   19 -
 cui/source/tabpages/transfrm.cxx   |   86 +++-
 cui/uiconfig/ui/positionsizedialog.ui  |  127 +++--
 include/sfx2/tabdlg.hxx|2 
 include/svx/svxdlg.hxx |   17 -
 sc/source/ui/drawfunc/drawsh.cxx   |2 
 sd/source/ui/func/futransf.cxx |6 
 sfx2/source/dialog/tabdlg.cxx  |7 
 svx/source/dialog/dialcontrol.cxx  |4 
 sw/source/uibase/shells/drwbassh.cxx   |2 
 14 files changed, 235 insertions(+), 119 deletions(-)

New commits:
commit eff752aec065d02a98693fff6c12092cb3c35176
Author: Caolán McNamara 
Date:   Tue May 29 09:32:41 2018 +0100

weld SvxTransformTabDialog

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

diff --git a/chart2/source/controller/main/ChartController_Position.cxx 
b/chart2/source/controller/main/ChartController_Position.cxx
index 37b0ef9ef208..2304bb72cda0 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -136,8 +136,9 @@ void ChartController::executeDispatch_PositionAndSize()
 SolarMutexGuard aGuard;
 SvxAbstractDialogFactory * pFact = SvxAbstractDialogFactory::Create();
 OSL_ENSURE( pFact, "No dialog factory" );
+vcl::Window* pWin = GetChartWindow();
 ScopedVclPtr 
pDlg(pFact->CreateSchTransformTabDialog(
-GetChartWindow(), , pSdrView, bResizePossible ));
+pWin ? pWin->GetFrameWeld() : nullptr, , pSdrView, 
bResizePossible));
 OSL_ENSURE( pDlg, "Couldn't create SchTransformTabDialog" );
 
 if( pDlg->Execute() == RET_OK )
diff --git a/chart2/source/controller/main/ShapeController.cxx 
b/chart2/source/controller/main/ShapeController.cxx
index 1b6a89b94985..80203f179b83 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -399,7 +399,7 @@ void ShapeController::executeDispatch_TransformDialog()
 if ( pFact )
 {
 ScopedVclPtr< SfxAbstractTabDialog > pDlg(
-pFact->CreateSvxTransformTabDialog( pChartWindow, 
, pDrawViewWrapper ) );
+pFact->CreateSvxTransformTabDialog(pChartWindow ? 
pChartWindow->GetFrameWeld() : nullptr, , pDrawViewWrapper));
 if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
 {
 const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index a5c76ef405ab..05c404a88b5e 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -130,7 +130,16 @@ short AbstractSvxSearchSimilarityDialog_Impl::Execute()
 return m_xDlg->run();
 }
 
-IMPL_ABSTDLG_BASE(AbstractSvxTransformTabDialog_Impl);
+short AbstractSvxTransformTabDialog_Impl::Execute()
+{
+return m_xDlg->execute();
+}
+
+bool AbstractSvxTransformTabDialog_Impl::StartExecuteAsync(AsyncContext )
+{
+return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
+
 IMPL_ABSTDLG_BASE(AbstractSvxCaptionDialog_Impl);
 IMPL_ABSTDLG_BASE(AbstractSvxJSearchOptionsDialog_Impl);
 
@@ -579,31 +588,33 @@ bool AbstractSvxSearchSimilarityDialog_Impl::IsRelaxed()
 // AbstractSvxTransformTabDialog implementations just forwards everything to 
the dialog
 void AbstractSvxTransformTabDialog_Impl::SetCurPageId( const OString& rName )
 {
-pDlg->SetCurPageId( rName );
+m_xDlg->SetCurPageId( rName );
 }
 
 const SfxItemSet* AbstractSvxTransformTabDialog_Impl::GetOutputItemSet() const
 {
-return pDlg->GetOutputItemSet();
+return m_xDlg->GetOutputItemSet();
 }
 
 const sal_uInt16* AbstractSvxTransformTabDialog_Impl::GetInputRanges(const 
SfxItemPool& pItem )
 {
-return pDlg->GetInputRanges( pItem );
+return m_xDlg->GetInputRanges( pItem );
 }
 
 void AbstractSvxTransformTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet 
)
 {
- pDlg->SetInputSet( pInSet );
+ m_xDlg->SetInputSet( pInSet );
 }
+
 //From class Window.
 void AbstractSvxTransformTabDialog_Impl::SetText( const OUString& rStr )
 {
-pDlg->SetText( rStr );
+m_xDlg->set_title(rStr);
 }
+
 void AbstractSvxTransformTabDialog_Impl::SetValidateFramePosLink( const 
Link& 

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

2018-05-29 Thread Caolán McNamara
 include/sfx2/tabdlg.hxx   |1 +
 sfx2/source/dialog/tabdlg.cxx |   40 +---
 2 files changed, 26 insertions(+), 15 deletions(-)

New commits:
commit efdc9425394e790c325644cd32f537341594f0b8
Author: Caolán McNamara 
Date:   Tue May 29 10:43:11 2018 +0100

we need to be able to query the ranges before creating the pages

so don't create the pages until the first execute

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

diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 9da02d5c371e..a83573d1dfa6 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -249,6 +249,7 @@ private:
 DECL_DLLPRIVATE_LINK(ActivatePageHdl, const OString&, void);
 DECL_DLLPRIVATE_LINK(DeactivatePageHdl, const OString&, bool);
 SAL_DLLPRIVATE void Init_Impl(bool bFmtFlag);
+SAL_DLLPRIVATE void CreatePages();
 
 protected:
 virtual short   Ok();
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 31be0ca30543..5ccfb377fd0b 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -1615,6 +1615,8 @@ IMPL_LINK(SfxTabDialogController, ActivatePageHdl, const 
OString&, rPage, void)
 }
 
 VclPtr pTabPage = pDataObject->pTabPage;
+if (!pTabPage)
+return;
 
 if (pDataObject->bRefresh)
 pTabPage->Reset(m_pSet);
@@ -1935,24 +1937,30 @@ void SfxTabDialogController::AddTabPage
 )
 {
 m_pImpl->aData.push_back(new Data_Impl(m_pImpl->aData.size(), rName, 
pCreateFunc, pRangesFunc));
-Data_Impl* pDataObject = m_pImpl->aData.back();
+}
 
-assert(pDataObject->pTabPage == nullptr && "create TabPage more than 
once");
-weld::Container* pPage = m_xTabCtrl->get_page(rName);
-pDataObject->pTabPage = (pDataObject->fnCreatePage)(pPage, m_pSet);
-pDataObject->pTabPage->SetDialogController(this);
+void SfxTabDialogController::CreatePages()
+{
+for (auto pDataObject : m_pImpl->aData)
+{
+if (pDataObject->pTabPage)
+   continue;
+weld::Container* pPage = m_xTabCtrl->get_page(pDataObject->sId);
+pDataObject->pTabPage = (pDataObject->fnCreatePage)(pPage, m_pSet);
+pDataObject->pTabPage->SetDialogController(this);
 
-OUString sConfigId = 
OStringToOUString(pDataObject->pTabPage->GetConfigId(), RTL_TEXTENCODING_UTF8);
-SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId);
-OUString sUserData;
-Any aUserItem = aPageOpt.GetUserItem(USERITEM_NAME);
-OUString aTemp;
-if ( aUserItem >>= aTemp )
-sUserData = aTemp;
-pDataObject->pTabPage->SetUserData(sUserData);
+OUString sConfigId = 
OStringToOUString(pDataObject->pTabPage->GetConfigId(), RTL_TEXTENCODING_UTF8);
+SvtViewOptions aPageOpt(EViewType::TabPage, sConfigId);
+OUString sUserData;
+Any aUserItem = aPageOpt.GetUserItem(USERITEM_NAME);
+OUString aTemp;
+if ( aUserItem >>= aTemp )
+sUserData = aTemp;
+pDataObject->pTabPage->SetUserData(sUserData);
 
-PageCreated(rName, *pDataObject->pTabPage);
-pDataObject->pTabPage->Reset(m_pSet);
+PageCreated(pDataObject->sId, *pDataObject->pTabPage);
+pDataObject->pTabPage->Reset(m_pSet);
+}
 }
 
 void SfxTabDialogController::RemoveTabPage(const OString& rId)
@@ -1996,6 +2004,8 @@ void SfxTabDialogController::RemoveTabPage(const OString& 
rId)
 
 void SfxTabDialogController::Start_Impl()
 {
+CreatePages();
+
 assert(m_pImpl->aData.size() == 
static_cast(m_xTabCtrl->get_n_pages())
 && "not all pages registered");
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/unx

2018-05-29 Thread Caolán McNamara
 vcl/unx/gtk3/gtk3gtkinst.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5dc1b50e952765b160395aef15730c71864786ff
Author: Caolán McNamara 
Date:   Tue May 29 12:41:07 2018 +0100

disable inconsistent when setting true/false

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

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index e956f4a3c93b..577d5e1d2744 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2692,6 +2692,7 @@ public:
 virtual void set_active(bool active) override
 {
 disable_notify_events();
+gtk_toggle_button_set_inconsistent(m_pToggleButton, false);
 gtk_toggle_button_set_active(m_pToggleButton, active);
 enable_notify_events();
 }
___
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' - basic/source

2018-05-29 Thread Caolán McNamara
 basic/source/comp/scanner.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 15ea1cda0b3c37ff944ad9a239b7ed453e8b0591
Author: Caolán McNamara 
Date:   Mon May 28 21:51:01 2018 +0100

forcepoint#42 check available str length

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

diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 67177b7d9f44..89f4140a7a60 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -607,7 +607,7 @@ bool SbiScanner::NextSym()
 case '>': if( *pLine == '=' ) n = 2; break;
 case ':': if( *pLine == '=' ) n = 2; break;
 }
-aSym = aLine.copy( nCol, n );
+aSym = aLine.copy(nCol, std::min(n, aLine.getLength() - nCol));
 pLine += n-1; nCol = nCol + n;
 }
 
___
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' - svtools/source

2018-05-29 Thread Caolán McNamara
 svtools/source/misc/embedhlp.cxx |   12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 1663a364c80fde2ac8396dd2fbcbee4240231271
Author: Caolán McNamara 
Date:   Tue May 29 13:12:12 2018 +0100

forcepoint#43 endless update ole2 preview recursion

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

diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 45beb0d17853..10cfeff47d23 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -228,6 +228,7 @@ struct EmbeddedObjectRef_Impl
 sal_Int64   nViewAspect;
 boolbIsLocked:1;
 boolbNeedUpdate:1;
+boolbUpdating:1;
 
 // #i104867#
 sal_uInt32  mnGraphicVersion;
@@ -239,6 +240,7 @@ struct EmbeddedObjectRef_Impl
 nViewAspect(embed::Aspects::MSOLE_CONTENT),
 bIsLocked(false),
 bNeedUpdate(false),
+bUpdating(false),
 mnGraphicVersion(0),
 aDefaultSizeForChart_In_100TH_MM(awt::Size(8000,7000))
 {}
@@ -252,6 +254,7 @@ struct EmbeddedObjectRef_Impl
 nViewAspect(r.nViewAspect),
 bIsLocked(r.bIsLocked),
 bNeedUpdate(r.bNeedUpdate),
+bUpdating(r.bUpdating),
 mnGraphicVersion(0),
 aDefaultSizeForChart_In_100TH_MM(r.aDefaultSizeForChart_In_100TH_MM)
 {
@@ -805,7 +808,14 @@ bool EmbeddedObjectRef::IsGLChart(const 
css::uno::Reference < css::embed::XEmbed
 
 void EmbeddedObjectRef::UpdateReplacement()
 {
-GetReplacement( true );
+if (mpImpl->bUpdating)
+{
+SAL_WARN("svtools.misc", "UpdateReplacement called while 
UpdateReplacement already underway");
+return;
+}
+mpImpl->bUpdating = true;
+GetReplacement(true);
+mpImpl->bUpdating = false;
 }
 
 void EmbeddedObjectRef::UpdateReplacementOnDemand()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dictionaries

2018-05-29 Thread Kruno
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ee4bbc3e9d8cca49eea89b99ea8e3836f7a4e224
Author: Kruno 
Date:   Fri Apr 27 21:35:24 2018 +0100

Updated core
Project: dictionaries  6c85a19c887b6147ec7d3a600b51cb2a44284fa2

Update Croatian dictionary to version 2.1.1

Change-Id: I8425ab128d04d428ccc99cb6c8abe2635292f143
Reviewed-on: https://gerrit.libreoffice.org/53578
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/dictionaries b/dictionaries
index e90e83b23b6a..6c85a19c887b 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit e90e83b23b6ace35349fc2b3e65bd2d69c80ddd8
+Subproject commit 6c85a19c887b6147ec7d3a600b51cb2a44284fa2
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: hr_HR/hr_HR.aff hr_HR/hr_HR.dic hr_HR/README_hr_HR.txt

2018-05-29 Thread Kruno
 hr_HR/README_hr_HR.txt |9 
 hr_HR/hr_HR.aff|  285 ++-
 hr_HR/hr_HR.dic|  509 +++--
 3 files changed, 607 insertions(+), 196 deletions(-)

New commits:
commit 6c85a19c887b6147ec7d3a600b51cb2a44284fa2
Author: Kruno 
Date:   Fri Apr 27 21:35:24 2018 +0100

Update Croatian dictionary to version 2.1.1

Change-Id: I8425ab128d04d428ccc99cb6c8abe2635292f143
Reviewed-on: https://gerrit.libreoffice.org/53578
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/hr_HR/README_hr_HR.txt b/hr_HR/README_hr_HR.txt
index d8bf8df..3f8cc76 100644
--- a/hr_HR/README_hr_HR.txt
+++ b/hr_HR/README_hr_HR.txt
@@ -11,11 +11,16 @@ repository: https://www.github.com/krunose/hr-hunspell
 
 ### Autori i doprinositelji ###
 
-Mirko Kos (m i r k o s 9 9 [ a t ] g m a i l . c o m), 2016. - 2017.
+
+Boris Juric, 2017. - 2018.
+
+-
+
+Mirko Kos (m i r k o s 9 9 [ a t ] g m a i l // c o m), 2016. - 2017.
 
 -
 
-Krunoslav Šebetić (k r u n o . s e [ a t ] g m x . c o m), 2014. - 2017.
+Krunoslav Šebetić (k r u n o . s e [ a t ] g m x // c o m), 2014. - 2018.
 
 -
 
diff --git a/hr_HR/hr_HR.aff b/hr_HR/hr_HR.aff
index 67e56bc..3e91312 100644
--- a/hr_HR/hr_HR.aff
+++ b/hr_HR/hr_HR.aff
@@ -25,6 +25,7 @@ SUBSTANDARD ZO
 FORBIDDENWORD ZN
 WARN ZM
 
+# NOSPLITSUGS
 # SUGSWITHDOTS
 # FORBIDWARN
 
@@ -75,12 +76,14 @@ ICONV ŕ r
 
 
 # REP - .
-REP 157
+REP 219
 REP ^pocrtava podcrtava
 REP ^zdrastv zdravstv
 REP nućemo$ nut_ćemo
 REP nućete$ nut_ćete
 REP ^riječo$ riječ_o
+REP ^usisač usisivač
+REP rejanac rejac
 REP ^prenat prednat
 REP šćemo$ st_ćemo
 REP šćete$ st_ćete
@@ -88,14 +91,19 @@ REP aćemo$ at_ćemo
 REP aćete$ at_ćete
 REP ićete$ it_ćete
 REP avaon ovaonic
+REP ^očenaš Očenaš
 REP ićemo$ it_ćemo
 REP ećete$ et_ćete
 REP nućeš$ nut_ćeš
 REP ećemo$ et_ćemo
 REP bčanci$ pčanki
+REP ^rasazn razazn
+REP ^kosmos kozmos
 REP stravn stavn
 REP ^poravo$ pravo
 REP skinj stkinj
+REP reank rejk
+REP ampiš ampinš
 REP ^nezna ne_zna
 REP ^prdon pridon
 REP dreti$ derati
@@ -104,6 +112,7 @@ REP ićeš$ it_ćeš
 REP ^subst supst
 REP aćeš$ at_ćeš
 REP ^obama$ oboma
+REP ^lotus lotos
 REP nuću$ nut_ću
 REP nion nionic
 REP nuće$ nut_će
@@ -117,24 +126,33 @@ REP natn nantn
 REP dvgn dvagn
 REP skma$ skima
 REP ^bimo$ bismo
+REP ^kazin kasin
 REP ^htjeo$ htio
 REP ^menom$ mnom
 REP ^bite$ biste
 REP ^stim$ s_tim
 REP ^polu- polu
+REP ^moće$ može
 REP skme$ skome
 REP nara napra
 REP skmu$ skomu
+REP ^ljud$ ljut
+REP ^paje$ pa_je
 REP ^trab trav
 REP ^trab treb
 REP ^jel$ je_li
 REP bljiv biv
+REP ljiv ljav
 REP najs naes
+REP sup sump
+REP ion ijun
 REP zir rizir
 REP aon aonic
 REP iće$ it_će
 REP šće$ st_će
 REP arn arnic
+REP iju e
+REP tid tud
 REP ^poveč več
 REP aću$ at_ću
 REP iću$ it_ću
@@ -151,10 +169,13 @@ REP skm$ skim
 REP skm$ skom
 REP ioc$ ilac
 REP kno ktno
+REP ije ive
 REP isl i_sl
+REP nest nijet
 REP aoc$ alac
 REP ^mže$ može
 REP rni rnu
+REP rh rth
 REP ljnj nj
 REP mnj mlj
 REP ^bim$ bih
@@ -169,6 +190,8 @@ REP skuj šć
 REP xy ksi
 REP je ije
 REP ^biš$ bi
+REP and ad
+REP ^sa su
 REP ije je
 REP om -om
 REP ći vši
@@ -182,6 +205,7 @@ REP is ijs
 REP un utn
 REP vši ći
 REP ko$ klo
+REP nk ngk
 REP ia ija
 REP lj nj
 REP iju$ e
@@ -190,6 +214,7 @@ REP zk sk
 REP ki$ ci
 REP bč pč
 REP dk tk
+REP dp tp
 REP bs ps
 REP gi zi
 REP zc sc
@@ -217,10 +242,14 @@ REP x ks
 REP c ts
 REP c ds
 REP a -a
+REP a aa
+REP d dd
 REP e ee
 REP u -u
+REP n nn
 REP o oo
 REP u uu
+REP s ss
 REP i je
 REP zš š
 REP j dž
@@ -228,13 +257,48 @@ REP dž č
 REP ^ts c
 REP št š
 REP st s
-REP - _
 REP c k
 REP g h
 REP ć č
 REP č ć
+REP ^a A
+REP ^b B
+REP ^c C
+REP ^č Č
+REP ^ć Ć
+REP ^d D
+REP ^dž Dž
+REP ^đ Đ
+REP ^e E
+REP ^f F
+REP ^g G
+REP ^h H
+REP ^i I
+REP ^j J
+REP ^k K
+REP ^l L
+REP ^lj Lj
+REP ^m M
+REP ^n N
+REP ^nj Nj
+REP ^o O
+REP ^p P
+REP ^q Q
+REP ^r R
+REP ^s S
+REP ^š Š
+REP ^t T
+REP ^u U
+REP ^v V
+REP ^w W
+REP ^x X
+REP ^y Y
+REP ^z Z
+REP ^ž Ž
+REP - _
+
 
-AF 403
+AF 416
 AF ZZ  # 1
 AF ZY  # 2
 AF ZX  # 3
@@ -637,7 +701,20 @@ AF TF  # 399
 AF TE  # 400
 AF TD  # 401
 AF THTGTETC# 402
-AF TB  #403
+AF TB  # 403
+AF TA  # 404
+AF SZ  # 405
+AF SY  # 406
+AF SX  # 407
+AF SW  # 408
+AF SV  # 409
+AF SU  # 410
+AF THTG# 411
+AF ST  # 412
+AF SS  # 413
+AF SOSPSR  # 414
+AF SMSNSR  # 415
+AF SL  # 416
 
 
 SFX XZ Y  21
@@ -3612,6 +3689,7 @@ SFX TF 0 -evoga .
 SFX TF 0 -evome .
 SFX TF 0 -evomu .
 
+
 SFX TE Y 7
 SFX TE 0 -ovac .
 SFX TE 0 -ovca .
@@ -3622,13 +3700,13 @@ SFX TE 0 -ovcem .
 SFX TE 0 -ovcima .
 
 SFX TD Y 7
-SFX TD 0 -evac .
-SFX TD 0 -evca .
-SFX TD 0 -evcu .
-SFX TD 0 -evcem .
-SFX TD 0 -evci .
-SFX TD 0 -evcem .
-SFX TD 0 -evcima .
+SFX TD 0 -evac im
+SFX TD 0 -evca im
+SFX TD 0 -evcu im
+SFX TD 0 -evcem im
+SFX TD 0 -evci im
+SFX TD 0 -evcem im
+SFX TD 0 -evcima im
 
 SFX TC Y 6
 SFX TC 0 -ovka .
@@ -3642,3 +3720,188 @@ SFX TB Y 3
 SFX TB 0 -a .

[Libreoffice-commits] translations.git: Changes to 'refs/tags/cp-5.3-47'

2018-05-29 Thread Andras Timar
Tag 'cp-5.3-47' created by Andras Timar  at 
2018-05-29 18:53 +

cp-5.3-47

Changes since cp-5.3-46:
Andras Timar (1):
  remove extra ~ characters from German translation

---
 source/de/officecfg/registry/data/org/openoffice/Office/UI.po |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
___
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' - vcl/osx

2018-05-29 Thread Tor Lillqvist
 vcl/osx/vclnsapp.mm |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit b1eeeaccc3337510df93b147f5905fca3416fc48
Author: Tor Lillqvist 
Date:   Mon May 28 14:41:20 2018 +0300

tdf#117850: Just call _Exit() in our applicationWillTerminate:

Sure, it is just a workaround, but a very effective workaround.

Change-Id: Id0daff048a27dae5cf8fb5e0e949c5b21e03fc86
Reviewed-on: https://gerrit.libreoffice.org/54924
Tested-by: Jenkins 
Reviewed-by: Tor Lillqvist 
(cherry picked from commit aa81a086bd3dcd7d6b830951619f310bd0aff30c)
Reviewed-on: https://gerrit.libreoffice.org/54995
Reviewed-by: Christian Lohmaier 

diff --git a/vcl/osx/vclnsapp.mm b/vcl/osx/vclnsapp.mm
index 09c3a8001f2d..61dac67b5d77 100644
--- a/vcl/osx/vclnsapp.mm
+++ b/vcl/osx/vclnsapp.mm
@@ -22,6 +22,8 @@
 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -314,6 +316,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 {
 (void)aNotification;
 sal_detail_deinitialize();
+_Exit(0);
 }
 
 -(NSApplicationTerminateReply)applicationShouldTerminate: (NSApplication *) app
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source

2018-05-29 Thread Caolán McNamara
 cui/source/tabpages/transfrm.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 7725eff80a7bc3f3e422e56e1cd7bfa531f19a70
Author: Caolán McNamara 
Date:   Tue May 29 13:53:35 2018 +0100

fix pow by digits

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

diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 6cfe85e3c0bf..fcd86eb7c082 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -1063,6 +1063,8 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet*  )
 pItem = GetItem( mrOutAttrs, SID_ATTR_TRANSFORM_WIDTH );
 mfOldWidth = std::max( pItem ? static_cast(static_cast(pItem)->GetValue()) : 0.0, 1.0 );
 double 
fTmpWidth((OutputDevice::LogicToLogic(static_cast(mfOldWidth), 
mePoolUnit, MapUnit::Map100thMM)) / fUIScale);
+if (m_xMtrWidth->get_digits())
+fTmpWidth *= pow(10.0, m_xMtrWidth->get_digits());
 m_xMtrWidth->set_value(static_cast(fTmpWidth), FUNIT_100TH_MM);
 }
 
@@ -1070,6 +1072,8 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet*  )
 pItem = GetItem( mrOutAttrs, SID_ATTR_TRANSFORM_HEIGHT );
 mfOldHeight = std::max( pItem ? static_cast(static_cast(pItem)->GetValue()) : 0.0, 1.0 );
 double 
fTmpHeight((OutputDevice::LogicToLogic(static_cast(mfOldHeight), 
mePoolUnit, MapUnit::Map100thMM)) / fUIScale);
+if (m_xMtrHeight->get_digits())
+fTmpHeight *= pow(10.0, m_xMtrHeight->get_digits());
 m_xMtrHeight->set_value(static_cast(fTmpHeight), FUNIT_100TH_MM);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Invitation: ESC - evening slot. @ Wed May 30, 2018 5pm - 6pm (BST) (libreoffice@lists.freedesktop.org)

2018-05-29 Thread Michael Meeks
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VEVENT
DTSTART:20180530T16Z
DTEND:20180530T17Z
DTSTAMP:20180529T093433Z
ORGANIZER;CN=Michael Meeks:mailto:mejme...@gmail.com
UID:r5pktqhjf6sipob3l3nm3iq...@google.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;CN=libreoffice-dev;X-NUM-GUESTS=0:mailto:libreoffice@lists.freedesktop
 .org
CREATED:20180529T093328Z
DESCRIPTION:Do join us for an ESC call - https://meet.jit.si/TDFESC\n\n-::~
 :~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~
 ::~:~::-\nPlease do not edit this section of the description.\n\nView your 
 event at https://www.google.com/calendar/event?action=VIEW=cjVwa3RxaGpm
 NnNpcG9iM2wzbm0zaXFkbW8gbGlicmVvZmZpY2VAbGlzdHMuZnJlZWRlc2t0b3Aub3Jn=MT
 gjbWVqbWVla3NAZ21haWwuY29tNzBkYTBiOGYxNjBhZjBkYWY2NmFhODk0YzJjZDcyMWQwYzczM
 zEzNQ=Europe%2FLondon=en=1.\n-::~:~::~:~:~:~:~:~:~:~:~:~:~:~:~:~:
 ~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~:~::~:~::-
LAST-MODIFIED:20180529T093432Z
LOCATION:
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:ESC - evening slot.
TRANSP:OPAQUE
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:This is an event reminder
TRIGGER:-P0DT0H15M0S
END:VALARM
END:VEVENT
END:VCALENDAR


invite.ics
Description: application/ics
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Change file_path LOOL

2018-05-29 Thread Renato Ribeiro
Hello all,


When I launch the LOOL server I can use the link displayed to open a document 
in a web browser (link below)


https://localhost:9980/loleaflet/2bac/loleaflet.html?file_path=file:///home//libreoffice/online/test/data/hello_world.odt


But this link shows the path of my diretories' tree 
(/home//libreoffice/online/test/data/hello_world.odt).
 I would like to know how I can hide this path. Can I define a variable for 
this path and with this show online the name fo the variable instead the path? 
In which diretory I can change this?


Thanks in advance.

Best regards
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Changes to 'feature/print_revamp'

2018-05-29 Thread Caolán McNamara
New branch 'feature/print_revamp' available with the following commits:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - README

2018-05-29 Thread Matthias Seidel
 README |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 8d04f84ef940b408f184e634f179cd0fc262d0ff
Author: Matthias Seidel 
Date:   Tue May 29 22:15:50 2018 +

Updated Readme for 250,000,000 downloads

diff --git a/README b/README
index 9f2029f3b2e9..45303ed84fbc 100644
--- a/README
+++ b/README
@@ -4,11 +4,11 @@ Apache OpenOffice (AOO)
 
 The Apache OpenOffice project provides a full featured office productivity 
suite
 based on open standards. It is the continuation of the OpenOffice.org 
project.
-
-For detailed information about Apache OpenOffice please visit 
+
+For detailed information about Apache OpenOffice please visit
 https://openoffice.apache.org/
 
-Apache OpenOffice is a very large project with many components and mainly 
+Apache OpenOffice is a very large project with many components and mainly
 implemented in C++ but also in Java, Perl, Python and other languages.
 
 Currently supported platforms include:
@@ -19,7 +19,7 @@ Apache OpenOffice (AOO)
 FreeBSD
 OS/2
 
-OpenOffice is used by millions of users worldwide and with more than 225 
million
+OpenOffice is used by millions of users worldwide and with more than 250 
million
 downloads it is one of the most successful open source projects.
 
 Getting the latest sources via Subversion
@@ -36,7 +36,7 @@ Building Apache OpenOffice
 ===
 
 Apache OpenOffice is a big project and depends on several other external 
libraries.
-The list of prerequisites varies for the different platforms. 
+The list of prerequisites varies for the different platforms.
 
 A comprehensive and complete building guide can be found in the project 
wiki under
 
@@ -54,7 +54,7 @@ Building Apache OpenOffice
 
 Note that building OpenOffice can take several hours.
 
-The default build will produce a setup version (e.g. setup program on 
windows, dmg on Mac OS, 
+The default build will produce a setup version (e.g. setup program on 
Windows, dmg on macOS,
 rpm and deb packages on Linux, pkg packages on Solaris) and an archived 
version. The output
 can be found in the  directory in 
instsetoo_native//Apache_OpenOffice/...
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-cd-3-2' - 3 commits - debian/changelog debian/control loolwsd.spec.in

2018-05-29 Thread Andras Timar
 debian/changelog |7 +++
 debian/control   |2 +-
 loolwsd.spec.in  |2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit a557eac1f335c3969b9fd365d918ea140de65127
Author: Andras Timar 
Date:   Tue May 29 22:23:18 2018 +0200

Bump package version to 3.2.2-2

diff --git a/debian/changelog b/debian/changelog
index 73ad63348..7c67d474f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,15 @@
+loolwsd (3.2.2-2) unstable; urgency=medium
+
+  * see the git log: http://col.la/coolcd32
+
+ -- Andras Timar   Tue, 29 May 2018 22:20:00 +0100
+
 loolwsd (3.2.2-1) unstable; urgency=medium
 
   * see the git log: http://col.la/cool32
 
  -- Andras Timar   Thu, 10 May 2018 11:20:00 +0100
+
 loolwsd (3.2.1-1) unstable; urgency=medium
 
   * see the git log: http://col.la/cool321
diff --git a/loolwsd.spec.in b/loolwsd.spec.in
index e206dcf00..de6587671 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -12,7 +12,7 @@ Name:   loolwsd%{name_suffix}
 Name:   loolwsd
 %endif
 Version:@PACKAGE_VERSION@
-Release:1%{?dist}
+Release:2%{?dist}
 %if 0%{?suse_version} == 1110
 Group:  Productivity/Office/Suite
 BuildRoot:  %{_tmppath}/%{name}-%{version}-build
commit 1af148cbe68a8137f63b03f70254861234c32e95
Author: Andras Timar 
Date:   Tue May 29 22:20:22 2018 +0200

require Collabora Office 5.3-47

diff --git a/debian/control b/debian/control
index 0faa0656a..ee1310c5c 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Standards-Version: 3.9.7
 Package: loolwsd
 Section: web
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, fontconfig, libsm6, 
libxinerama1, libxrender1, libgl1-mesa-glx, libcups2, libcurl3-gnutls, cpio, 
libcap2-bin, libexpat1, libicu55, libjpeg-turbo8, libnss3, libpng12-0, 
libpoppler58, libxcb-render0, libxcb-shm0, libxml2, libxslt1.1, 
collaboraofficebasis5.3-calc (>= 5.3.10.46), collaboraofficebasis5.3-core (>= 
5.3.10.46), collaboraofficebasis5.3-graphicfilter (>= 5.3.10.46), 
collaboraofficebasis5.3-images (>= 5.3.10.46), collaboraofficebasis5.3-impress 
(>= 5.3.10.46), collaboraofficebasis5.3-ooofonts (>= 5.3.10.46), 
collaboraofficebasis5.3-writer (>= 5.3.10.46), collaboraoffice5.3 (>= 
5.3.10.46), collaboraoffice5.3-ure (>= 5.3.10.46), 
collaboraofficebasis5.3-en-us (>= 5.3.10.46), 
collaboraofficebasis5.3-en-us-calc (>= 5.3.10.46), 
collaboraofficebasis5.3-en-us-res (>= 5.3.10.46), 
collaboraofficebasis5.3-noto-fonts (>= 5.3.10.46), collaboraofficebasis5.3-draw 
(>= 5.3.10.46), collaboraofficebasis5.3-extension-pdf-import (>= 5.3.10.46)
 , collaboraofficebasis5.3-filter-data (>= 5.3.10.46), 
collaboraofficebasis5.3-ooolinguistic (>= 5.3.10.46)
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, fontconfig, libsm6, 
libxinerama1, libxrender1, libgl1-mesa-glx, libcups2, libcurl3-gnutls, cpio, 
libcap2-bin, libexpat1, libicu55, libjpeg-turbo8, libnss3, libpng12-0, 
libpoppler58, libxcb-render0, libxcb-shm0, libxml2, libxslt1.1, 
collaboraofficebasis5.3-calc (>= 5.3.10.47), collaboraofficebasis5.3-core (>= 
5.3.10.47), collaboraofficebasis5.3-graphicfilter (>= 5.3.10.47), 
collaboraofficebasis5.3-images (>= 5.3.10.47), collaboraofficebasis5.3-impress 
(>= 5.3.10.47), collaboraofficebasis5.3-ooofonts (>= 5.3.10.47), 
collaboraofficebasis5.3-writer (>= 5.3.10.47), collaboraoffice5.3 (>= 
5.3.10.47), collaboraoffice5.3-ure (>= 5.3.10.47), 
collaboraofficebasis5.3-en-us (>= 5.3.10.47), 
collaboraofficebasis5.3-en-us-calc (>= 5.3.10.47), 
collaboraofficebasis5.3-en-us-res (>= 5.3.10.47), 
collaboraofficebasis5.3-noto-fonts (>= 5.3.10.47), collaboraofficebasis5.3-draw 
(>= 5.3.10.47), collaboraofficebasis5.3-extension-pdf-import (>= 5.3.10.47)
 , collaboraofficebasis5.3-filter-data (>= 5.3.10.47), 
collaboraofficebasis5.3-ooolinguistic (>= 5.3.10.47)
 Conflicts: collaboraofficebasis5.3-gnome-integration, 
collaboraofficebasis5.3-kde-integration
 Description: LibreOffice Online WebSocket Daemon
  LOOLWSD is a daemon that talks to web browser clients and provides LibreOffice
commit 0d5abf9189e2614305fa05361009af7e982ed91c
Author: Andras Timar 
Date:   Tue May 29 21:55:40 2018 +0200

missing dependencies

diff --git a/debian/control b/debian/control
index 76f676324..0faa0656a 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Standards-Version: 3.9.7
 Package: loolwsd
 Section: web
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, fontconfig, libsm6, 
libxinerama1, libxrender1, libgl1-mesa-glx, libcups2, cpio, libcap2-bin, 
libxcb-render0, libxcb-shm0, collaboraofficebasis5.3-calc (>= 5.3.10.46), 
collaboraofficebasis5.3-core (>= 5.3.10.46), 
collaboraofficebasis5.3-graphicfilter (>= 5.3.10.46), 
collaboraofficebasis5.3-images (>= 5.3.10.46), collaboraofficebasis5.3-impress 
(>= 5.3.10.46), collaboraofficebasis5.3-ooofonts (>= 5.3.10.46), 
collaboraofficebasis5.3-writer (>= 5.3.10.46), collaboraoffice5.3 (>= 
5.3.10.46), 

[Libreoffice-commits] online.git: Changes to 'refs/tags/cd-3.2.2-2'

2018-05-29 Thread Andras Timar
Tag 'cd-3.2.2-2' created by Andras Timar  at 
2018-05-29 20:23 +

cd-3.2.2-2

Changes since cd-3.2.2-1-3:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/print_revamp' - vcl/inc vcl/source vcl/uiconfig

2018-05-29 Thread Daniel
 vcl/inc/printdlg.hxx   |3 +
 vcl/inc/strings.hrc|1 
 vcl/source/window/printdlg.cxx |   62 +
 vcl/uiconfig/ui/printdialog.ui |   16 ++
 4 files changed, 71 insertions(+), 11 deletions(-)

New commits:
commit b9c297021d2b95b67fa2ab2842f0f4b344338129
Author: Daniel 
Date:   Tue May 15 22:58:38 2018 -0300

tdf#67905 adds an option to disable print preview in print dialog

Change-Id: Id6dd1724a1b8f61d94f0685f63d28b3cff19988f

diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx
index b16d91cad1f6..0a5b09fd366a 100644
--- a/vcl/inc/printdlg.hxx
+++ b/vcl/inc/printdlg.hxx
@@ -181,6 +181,7 @@ namespace vcl
 VclPtr   mpNumPagesText;
 VclPtr  mpBackwardBtn;
 VclPtr  mpForwardBtn;
+VclPtrmpPreviewBox;
 
 VclPtrmpOKButton;
 VclPtrmpCancelButton;
@@ -188,6 +189,7 @@ namespace vcl
 
 OUStringmaPageStr;
 OUStringmaNoPageStr;
+OUStringmaNoPreviewStr;
 sal_Int32   mnCurPage;
 sal_Int32   mnCachedPages;
 
@@ -247,6 +249,7 @@ namespace vcl
 bool isPrintToFile();
 bool isCollate();
 bool isSingleJobs();
+bool hasPreview();
 
 void previewForward();
 void previewBackward();
diff --git a/vcl/inc/strings.hrc b/vcl/inc/strings.hrc
index 1475e2a65ceb..1e5eb9d14743 100644
--- a/vcl/inc/strings.hrc
+++ b/vcl/inc/strings.hrc
@@ -113,6 +113,7 @@
 #define SV_ACCESSERROR_NO_FONTS  
NC_("SV_ACCESSERROR_NO_FONTS", "No fonts could be found on the system.")
 
 #define SV_PRINT_NOPAGES NC_("SV_PRINT_NOPAGES", 
"No pages")
+#define SV_PRINT_NOPREVIEW   NC_("SV_PRINT_NOPREVIEW", 
"Preview is disabled")
 #define SV_PRINT_TOFILE_TXT  
NC_("SV_PRINT_TOFILE_TXT", "Print to File...")
 #define SV_PRINT_DEFPRT_TXT  
NC_("SV_PRINT_DEFPRT_TXT", "Default printer")
 #define SV_PRINT_PRINTPREVIEW_TXT
NC_("SV_PRINT_PRINTPREVIEW_TXT", "Print preview")
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 084763fa934b..e59694ca8c0f 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -650,6 +650,7 @@ PrintDialog::PrintDialog( vcl::Window* i_pParent, const 
std::shared_ptrGetText();
@@ -715,9 +717,6 @@ PrintDialog::PrintDialog( vcl::Window* i_pParent, const 
std::shared_ptrresetPrinterOptions( false );
 
-// get the first page
-preparePreview( true, true );
-
 // update the text fields for the printer
 updatePrinterText();
 
@@ -747,6 +746,7 @@ PrintDialog::PrintDialog( vcl::Window* i_pParent, const 
std::shared_ptrSetClickHdl( LINK( this, PrintDialog, ClickHdl ) );
 mpForwardBtn->SetClickHdl( LINK( this, PrintDialog, ClickHdl ) );
 mpBackwardBtn->SetClickHdl( LINK( this, PrintDialog, ClickHdl ) );
+mpPreviewBox->SetClickHdl( LINK( this, PrintDialog, ClickHdl ) );
 
 maJobPage.mpCollateBox->SetToggleHdl( LINK( this, PrintDialog, ToggleHdl ) 
);
 maJobPage.mpSetupButton->SetClickHdl( LINK( this, PrintDialog, ClickHdl ) 
);
@@ -805,6 +805,7 @@ void PrintDialog::dispose()
 mpNumPagesText.clear();
 mpBackwardBtn.clear();
 mpForwardBtn.clear();
+mpPreviewBox.clear();
 mpOKButton.clear();
 mpCancelButton.clear();
 mpHelpButton.clear();
@@ -834,6 +835,16 @@ void PrintDialog::readFromSettings()
 }
 }
 
+aValue = pItem->getValue( "PrintDialog", "HasPreview" );
+if ( aValue.equalsIgnoreAsciiCase("true") )
+{
+mpPreviewBox->Check();
+}
+else
+{
+mpPreviewBox->Check( false );
+}
+
 // persistent window state
 OUString aWinState( pItem->getValue( "PrintDialog",
   "WindowState" ) );
@@ -864,6 +875,9 @@ void PrintDialog::storeToSettings()
  "WindowState",
  OStringToOUString( GetWindowState(), 
RTL_TEXTENCODING_UTF8 )
  );
+pItem->setValue( "PrintDialog",
+ "HasPreview",
+ hasPreview() ? OUString("true") : OUString("false") );
 pItem->Commit();
 }
 
@@ -882,6 +896,11 @@ bool PrintDialog::isSingleJobs()
 return maOptionsPage.mpCollateSingleJobsBox->IsChecked();
 }
 
+bool PrintDialog::hasPreview()
+{
+return mpPreviewBox->IsChecked();
+}
+
 void setHelpId( vcl::Window* i_pWindow, const Sequence< OUString >& 
i_rHelpIds, sal_Int32 i_nIndex )
 {
 if( i_nIndex >= 0 && i_nIndex < i_rHelpIds.getLength() )
@@ -1381,25 +1400,43 @@ void PrintDialog::setPreviewText()
 
 void 

[Libreoffice-commits] core.git: sw/CppunitTest_sw_ooxmllinks.mk sw/CppunitTest_sw_ww8export2.mk sw/qa writerfilter/source

2018-05-29 Thread Miklos Vajna
 sw/CppunitTest_sw_ww8export2.mk |   34 
 sw/qa/extras/ooxmlexport/ooxmlexport6.cxx   |4 +--
 sw/qa/extras/ww8export/data/tdf117503.docx  |binary
 sw/qa/extras/ww8export/ww8export2.cxx   |7 +
 writerfilter/source/dmapper/PropertyMap.cxx |   27 +-
 5 files changed, 36 insertions(+), 36 deletions(-)

New commits:
commit b7ae863efeb082816cc4fe660527a9650d90e186
Author: Miklos Vajna 
Date:   Mon May 28 21:59:27 2018 +0200

tdf#117503 DOCX import: fix out of sync first/later top margin

Improve the synchronization between the first page and follow page
style, so that when the DOC export invokes
sw::util::IsPlausableSingleWordSection(), it recognizes that originally
these were the same Word section.

If they don't match up, then the exporter will insert an explicit
section break, meaning we get one more page in the export result
compared to the original.

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

diff --git a/sw/CppunitTest_sw_ooxmllinks.mk b/sw/CppunitTest_sw_ooxmllinks.mk
old mode 100755
new mode 100644
diff --git a/sw/CppunitTest_sw_ww8export2.mk b/sw/CppunitTest_sw_ww8export2.mk
index 5ece5d90a0a3..616347d52904 100644
--- a/sw/CppunitTest_sw_ww8export2.mk
+++ b/sw/CppunitTest_sw_ww8export2.mk
@@ -47,39 +47,7 @@ $(eval $(call gb_CppunitTest_use_sdk_api,sw_ww8export2))
 $(eval $(call gb_CppunitTest_use_ure,sw_ww8export2))
 $(eval $(call gb_CppunitTest_use_vcl,sw_ww8export2))
 
-$(eval $(call gb_CppunitTest_use_components,sw_ww8export2,\
-basic/util/sb \
-comphelper/util/comphelp \
-configmgr/source/configmgr \
-dbaccess/util/dba \
-embeddedobj/util/embobj \
-emfio/emfio \
-filter/source/config/cache/filterconfig1 \
-filter/source/storagefilterdetect/storagefd \
-forms/util/frm \
-framework/util/fwk \
-i18npool/util/i18npool \
-linguistic/source/lng \
-package/source/xstor/xstor \
-package/util/package2 \
-sax/source/expatwrap/expwrap \
-sw/util/msword \
-sw/util/sw \
-sw/util/swd \
-sfx2/util/sfx \
-svl/source/fsstor/fsstorage \
-svtools/util/svt \
-toolkit/util/tk \
-ucb/source/core/ucb1 \
-ucb/source/ucp/file/ucpfile1 \
-unotools/util/utl \
-unoxml/source/service/unoxml \
-unoxml/source/rdf/unordf \
-uui/util/uui \
-$(if $(filter DESKTOP,$(BUILD_TYPE)),xmlhelp/util/ucpchelp1) \
-vcl/vcl.common \
-xmloff/util/xo \
-))
+$(eval $(call gb_CppunitTest_use_rdb,sw_ww8export2,services))
 
 $(eval $(call gb_CppunitTest_use_configuration,sw_ww8export2))
 
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index 099566cd8072..837111995c79 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -454,7 +454,7 @@ DECLARE_OOXMLEXPORT_TEST(testVMLData, "TestVMLData.docx")
 {
 // The problem was exporter was exporting vml data for shape in w:rPr 
element.
 // vml data should not come under w:rPr element.
-xmlDocPtr pXmlDoc = parseExport("word/header1.xml");
+xmlDocPtr pXmlDoc = parseExport("word/header2.xml");
 if (!pXmlDoc)
 return;
 CPPUNIT_ASSERT(getXPath(pXmlDoc, 
"/w:hdr/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:shape", 
"stroked").match("f"));
@@ -464,7 +464,7 @@ DECLARE_OOXMLEXPORT_TEST(testImageData, "image_data.docx")
 {
 // The problem was exporter was exporting v:imagedata data for shape in 
w:pict as v:fill w element.
 
-xmlDocPtr pXmlDoc = parseExport("word/header1.xml");
+xmlDocPtr pXmlDoc = parseExport("word/header2.xml");
 if (!pXmlDoc)
 return;
 CPPUNIT_ASSERT(getXPath(pXmlDoc, 
"/w:hdr/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:shape/v:imagedata", 
"detectmouseclick").match("t"));
diff --git a/sw/qa/extras/ww8export/data/tdf117503.docx 
b/sw/qa/extras/ww8export/data/tdf117503.docx
new file mode 100644
index ..f817f035b5cf
Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf117503.docx differ
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx 
b/sw/qa/extras/ww8export/ww8export2.cxx
index bc9a104740bb..f7ec720bce99 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -814,6 +814,13 @@ DECLARE_WW8EXPORT_TEST(testTdf112118_DOC, "tdf112118.doc")
 }
 }
 
+DECLARE_WW8EXPORT_TEST(testTdf117503, "tdf117503.docx")
+{
+// This was 3, first page + standard page styles were not merged together
+// on export.
+CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index f9a09b31df61..7289a744c3f4 100644
--- 

[Libreoffice-commits] core.git: sc/inc sc/IwyuFilter_sc.yaml

2018-05-29 Thread Gabor Kelemen
 sc/IwyuFilter_sc.yaml  |   11 +++
 sc/inc/macromgr.hxx|1 -
 sc/inc/markdata.hxx|1 -
 sc/inc/markmulti.hxx   |1 -
 sc/inc/miscuno.hxx |1 -
 sc/inc/mtvcellfunc.hxx |2 --
 sc/inc/mtvelements.hxx |1 -
 7 files changed, 11 insertions(+), 7 deletions(-)

New commits:
commit a03a63edd3cfbbacd4e9f59b315095fbeb70873c
Author: Gabor Kelemen 
Date:   Mon May 14 07:56:01 2018 +0200

tdf#42949 Fix IWYU warnings in sc/inc/m*

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

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

diff --git a/sc/IwyuFilter_sc.yaml b/sc/IwyuFilter_sc.yaml
index 853e06214546..47346286fea1 100644
--- a/sc/IwyuFilter_sc.yaml
+++ b/sc/IwyuFilter_sc.yaml
@@ -181,3 +181,14 @@ blacklist:
 # base class has to be a complete type
 - com/sun/star/uno/Reference.hxx
 - tools/ref.hxx
+sc/inc/macromgr.hxx:
+# base class has to be a complete type
+- com/sun/star/container/XContainerListener.hpp
+sc/inc/miscuno.hxx:
+# base class has to be a complete type
+- com/sun/star/beans/XPropertySet.hpp
+- com/sun/star/container/XEnumeration.hpp
+- com/sun/star/container/XIndexAccess.hpp
+- com/sun/star/container/XNameAccess.hpp
+- com/sun/star/lang/XServiceInfo.hpp
+- cppuhelper/supportsservice.hxx
diff --git a/sc/inc/macromgr.hxx b/sc/inc/macromgr.hxx
index e524ff59bad2..5904a1ce564f 100644
--- a/sc/inc/macromgr.hxx
+++ b/sc/inc/macromgr.hxx
@@ -17,7 +17,6 @@
 
 #include 
 #include 
-#include 
 
 class ScDocument;
 class ScFormulaCell;
diff --git a/sc/inc/markdata.hxx b/sc/inc/markdata.hxx
index 26387109b833..c4497da322d6 100644
--- a/sc/inc/markdata.hxx
+++ b/sc/inc/markdata.hxx
@@ -36,7 +36,6 @@ struct ColRowSpan;
 }
 
 class ScMarkArray;
-class ScRangeList;
 
 //! todo:
 //! It should be possible to have MarkArrays for each table, in order to
diff --git a/sc/inc/markmulti.hxx b/sc/inc/markmulti.hxx
index cf68a403fb21..a8482048a48b 100644
--- a/sc/inc/markmulti.hxx
+++ b/sc/inc/markmulti.hxx
@@ -20,7 +20,6 @@
 #ifndef INCLUDED_SC_INC_MARKMULTI_HXX
 #define INCLUDED_SC_INC_MARKMULTI_HXX
 
-#include "address.hxx"
 #include "segmenttree.hxx"
 #include "markarr.hxx"
 
diff --git a/sc/inc/miscuno.hxx b/sc/inc/miscuno.hxx
index ec83181a4e9e..566ca6d1cae2 100644
--- a/sc/inc/miscuno.hxx
+++ b/sc/inc/miscuno.hxx
@@ -24,7 +24,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sc/inc/mtvcellfunc.hxx b/sc/inc/mtvcellfunc.hxx
index 195e6449007a..145d1ee38779 100644
--- a/sc/inc/mtvcellfunc.hxx
+++ b/sc/inc/mtvcellfunc.hxx
@@ -13,8 +13,6 @@
 #include "mtvelements.hxx"
 #include "mtvfunctions.hxx"
 
-#include 
-
 class ScFormulaCell;
 
 namespace sc {
diff --git a/sc/inc/mtvelements.hxx b/sc/inc/mtvelements.hxx
index f13562d47fbd..04c34775cedb 100644
--- a/sc/inc/mtvelements.hxx
+++ b/sc/inc/mtvelements.hxx
@@ -10,7 +10,6 @@
 #ifndef INCLUDED_SC_INC_MTVELEMENTS_HXX
 #define INCLUDED_SC_INC_MTVELEMENTS_HXX
 
-#include "address.hxx"
 #include "formulacell.hxx"
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sd/inc sd/qa sd/source

2018-05-29 Thread Mike Kaganski
 sd/inc/stlsheet.hxx |3 +
 sd/qa/unit/misc-tests.cxx   |   34 +++
 sd/source/core/stlsheet.cxx |  126 ++--
 3 files changed, 114 insertions(+), 49 deletions(-)

New commits:
commit cc1a43017912324909aca7812e1619d337362bbc
Author: Mike Kaganski 
Date:   Sun May 27 14:02:09 2018 +0300

tdf#38225: update API name when renaming using a base class ref

... but don't update it in case it's a predefined API name

Change-Id: I20075a4e085bdeab8374860c16e7eb2a72772c33
Reviewed-on: https://gerrit.libreoffice.org/54879
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/54985
Tested-by: Mike Kaganski 

diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx
index a24a2b31cafc..4407c63b631b 100644
--- a/sd/inc/stlsheet.hxx
+++ b/sd/inc/stlsheet.hxx
@@ -81,6 +81,9 @@ public:
 static void BroadcastSdStyleSheetChange(SfxStyleSheetBase const * 
pStyleSheet, PresentationObjects ePO,
 SfxStyleSheetBasePool* pSSPool);
 
+// SfxStyleSheetBase
+virtual bool SetName(const OUString& rNewName, bool bReindexNow = true) 
override;
+
 // XInterface
 virtual void SAL_CALL release(  ) throw () override;
 
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index e995d0146957..f0e493683737 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -62,6 +62,7 @@ public:
 void testTdf99396TextEdit();
 void testFillGradient();
 void testTdf44774();
+void testTdf38225();
 
 CPPUNIT_TEST_SUITE(SdMiscTest);
 CPPUNIT_TEST(testTdf96206);
@@ -70,6 +71,7 @@ public:
 CPPUNIT_TEST(testTdf99396TextEdit);
 CPPUNIT_TEST(testFillGradient);
 CPPUNIT_TEST(testTdf44774);
+CPPUNIT_TEST(testTdf38225);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -328,6 +330,38 @@ void SdMiscTest::testTdf44774()
 CPPUNIT_ASSERT_EQUAL(OUString("StyleA"), pStyle->GetParent());
 }
 
+void SdMiscTest::testTdf38225()
+{
+sd::DrawDocShellRef xDocShRef = new 
sd::DrawDocShell(SfxObjectCreateMode::EMBEDDED, false,
+DocumentType::Draw);
+const uno::Reference xLoadable(xDocShRef->GetModel(), 
uno::UNO_QUERY_THROW);
+xLoadable->initNew();
+SfxStyleSheetBasePool* pSSPool = xDocShRef->GetStyleSheetPool();
+
+// Create a new style with a name
+pSSPool->Make("StyleWithName1", SfxStyleFamily::Para, SFXSTYLEBIT_USERDEF);
+
+// Now save the file and reload
+xDocShRef = saveAndReload(xDocShRef.get(), ODG);
+pSSPool = xDocShRef->GetStyleSheetPool();
+
+SfxStyleSheetBase* pStyle = pSSPool->Find("StyleWithName1", 
SfxStyleFamily::Para);
+CPPUNIT_ASSERT(pStyle);
+
+// Rename the style
+CPPUNIT_ASSERT(pStyle->SetName("StyleWithName2"));
+
+// Save the file and reload again
+xDocShRef = saveAndReload(xDocShRef.get(), ODG);
+pSSPool = xDocShRef->GetStyleSheetPool();
+
+// The problem was that the style kept the old name upon reloading
+pStyle = pSSPool->Find("StyleWithName1", SfxStyleFamily::Para);
+CPPUNIT_ASSERT(!pStyle);
+pStyle = pSSPool->Find("StyleWithName2", SfxStyleFamily::Para);
+CPPUNIT_ASSERT(pStyle);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdMiscTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 3cd669294b1a..585d0b6cbfae 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -580,55 +580,76 @@ bool SdStyleSheet::HasClearParentSupport() const
 return true;
 }
 
-void SdStyleSheet::SetHelpId( const OUString& r, sal_uLong nId )
+namespace
 {
-SfxStyleSheet::SetHelpId( r, nId );
+struct ApiNameMap
+{
+OUStringLiteral mpApiName;
+sal_uInt32 mnHelpId;
+} const pApiNameMap[]
+= { { OUStringLiteral("title"), HID_PSEUDOSHEET_TITLE },
+{ OUStringLiteral("subtitle"), HID_PSEUDOSHEET_SUBTITLE },
+{ OUStringLiteral("background"), HID_PSEUDOSHEET_BACKGROUND },
+{ OUStringLiteral("backgroundobjects"), 
HID_PSEUDOSHEET_BACKGROUNDOBJECTS },
+{ OUStringLiteral("notes"), HID_PSEUDOSHEET_NOTES },
+{ OUStringLiteral("standard"), HID_STANDARD_STYLESHEET_NAME },
+{ OUStringLiteral("objectwitharrow"), HID_POOLSHEET_OBJWITHARROW },
+{ OUStringLiteral("objectwithshadow"), HID_POOLSHEET_OBJWITHSHADOW },
+{ OUStringLiteral("objectwithoutfill"), HID_POOLSHEET_OBJWITHOUTFILL },
+{ OUStringLiteral("text"), HID_POOLSHEET_TEXT },
+{ OUStringLiteral("textbody"), HID_POOLSHEET_TEXTBODY },
+{ OUStringLiteral("textbodyjustfied"), HID_POOLSHEET_TEXTBODY_JUSTIFY 
},
+{ OUStringLiteral("textbodyindent"), HID_POOLSHEET_TEXTBODY_INDENT },
+{ OUStringLiteral("title"), HID_POOLSHEET_TITLE },
+{ OUStringLiteral("title1"), HID_POOLSHEET_TITLE1 },
+{ OUStringLiteral("title2"), HID_POOLSHEET_TITLE2 },
+{ OUStringLiteral("headline"), HID_POOLSHEET_HEADLINE },
+{ 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - cui/source cui/uiconfig include/vcl

2018-05-29 Thread Caolán McNamara
 cui/source/inc/transfrm.hxx   |   70 +++---
 cui/source/tabpages/transfrm.cxx  |  439 --
 cui/uiconfig/ui/possizetabpage.ui |  145 +++-
 include/vcl/customweld.hxx|1 
 4 files changed, 311 insertions(+), 344 deletions(-)

New commits:
commit 7ea2b86a7f82860be35bd1f7a4597d33cc82cef6
Author: Caolán McNamara 
Date:   Mon May 28 16:51:20 2018 +0100

weld SvxPositionSizeTabPage

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

diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
index 94fa4836de51..959cd6bd8f4d 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -74,32 +74,6 @@ class SvxPositionSizeTabPage : public SvxTabPage
 static const sal_uInt16 pPosSizeRanges[];
 
 private:
-// position
-VclPtrm_pFlPosition;
-VclPtr m_pMtrPosX;
-VclPtr m_pMtrPosY;
-VclPtr  m_pCtlPos;
-
-// size
-VclPtrm_pFlSize;
-VclPtr   m_pFtWidth;
-VclPtr m_pMtrWidth;
-VclPtr   m_pFtHeight;
-VclPtr m_pMtrHeight;
-VclPtrm_pCbxScale;
-VclPtr  m_pCtlSize;
-
-// protect
-VclPtrm_pFlProtect;
-VclPtr m_pTsbPosProtect;
-VclPtr m_pTsbSizeProtect;
-
-// adjust
-VclPtrm_pFlAdjust;
-VclPtr m_pTsbAutoGrowWidth;
-VclPtr m_pTsbAutoGrowHeight;
-
-private:
 const SfxItemSet&   mrOutAttrs;
 
 const SdrView*  mpView;
@@ -123,22 +97,48 @@ private:
 double  mfOldHeight;
 RectPoint  meRP;
 
+RectCtl  m_aCtlPos;
+RectCtl  m_aCtlSize;
 
-DECL_LINK( ChangePosProtectHdl, Button*, void );
-DECL_LINK( ChangeSizeProtectHdl, Button*, void );
+// position
+std::unique_ptr m_xFlPosition;
+std::unique_ptr m_xMtrPosX;
+std::unique_ptr m_xMtrPosY;
+std::unique_ptr m_xCtlPos;
+
+// size
+std::unique_ptr m_xFlSize;
+std::unique_ptr m_xFtWidth;
+std::unique_ptr m_xMtrWidth;
+std::unique_ptr m_xFtHeight;
+std::unique_ptr m_xMtrHeight;
+std::unique_ptr m_xCbxScale;
+std::unique_ptr m_xCtlSize;
+
+// protect
+std::unique_ptr m_xFlProtect;
+std::unique_ptr m_xTsbPosProtect;
+std::unique_ptr m_xTsbSizeProtect;
+
+// adjust
+std::unique_ptr m_xFlAdjust;
+std::unique_ptr m_xTsbAutoGrowWidth;
+std::unique_ptr m_xTsbAutoGrowHeight;
+
+DECL_LINK(ChangePosProtectHdl, weld::ToggleButton&, void);
+DECL_LINK(ChangeSizeProtectHdl, weld::ToggleButton&, void);
 
 void SetMinMaxPosition();
 void GetTopLeftPosition(double& rfX, double& rfY, const basegfx::B2DRange& 
rRange);
 
-DECL_LINK( ChangeWidthHdl, Edit&, void );
-DECL_LINK( ChangeHeightHdl, Edit&, void );
-DECL_LINK( ClickSizeProtectHdl, Button*, void );
-DECL_LINK( ClickAutoHdl, Button*, void );
+DECL_LINK( ChangeWidthHdl, weld::MetricSpinButton&, void );
+DECL_LINK( ChangeHeightHdl, weld::MetricSpinButton&, void );
+DECL_LINK( ClickSizeProtectHdl, weld::ToggleButton&, void );
+DECL_LINK( ClickAutoHdl, weld::ToggleButton&, void );
 
 public:
-SvxPositionSizeTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs  
);
+SvxPositionSizeTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
 virtual ~SvxPositionSizeTabPage() override;
-virtual void dispose() override;
 
 static VclPtr Create( TabPageParent, const SfxItemSet* );
 static const sal_uInt16* GetRanges() {  return pPosSizeRanges; }
@@ -149,8 +149,8 @@ public:
 virtual void ActivatePage( const SfxItemSet& rSet ) override;
 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
-virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
 virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) 
override;
+virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
 
 void Construct();
 void SetView( const SdrView* pSdrView ) { mpView = pSdrView; }
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 570635d1737a..0e67b85261b9 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -804,8 +804,8 @@ void SvxSlantTabPage::PointChanged( weld::DrawingArea*, 
RectPoint )
 |*  Dialog for changing position and size of graphic objects
 |*
 \/
-SvxPositionSizeTabPage::SvxPositionSizeTabPage(vcl::Window* pParent, const 
SfxItemSet& rInAttrs)
-: SvxTabPage(pParent,"PositionAndSize","cui/ui/possizetabpage.ui", 
rInAttrs)
+SvxPositionSizeTabPage::SvxPositionSizeTabPage(TabPageParent pParent, const 
SfxItemSet& 

Slow UITests

2018-05-29 Thread Stephan Bergmann
I see that some of the UITests (executed at least during `make check`) 
take rather long, one taking over 20 min for me, see below for details.


I'm not sure whether something fundamental could be improved to cut down 
on processing time (e.g., on a cursory glance, it looks to me that a 
single UITest sequentially spawns multiple soffice processes?), or 
whether the cure would be to split the longer-running UITests into 
smaller ones each doing fewer sub-tests so that multiple of those 
smaller tests will run in parallel (similar to how other CppunitTests or 
JunitTests have been split in the past).


But I would ask the authors/maintainers of those UITests to please do 
something appropriate to help reduce overall build time.


Edited output of elapsed wall-clock time for each of the UITests (which 
all succeeded) for me (running `for i in */UITest_*.mk; do (cd 
"$(dirname "$i")" && (time make -rs "$(basename "$i" .mk)"; echo $?)); 
done`):


   0m13.038s hide_cols
   0m13.080s range_name
   0m14.920s search_replace
   0m16.144s cui_dialogs
   0m20.515s math_demo
   0m25.939s conditional_format
   0m26.513s writerperfect_epubexport
   1m00.827s manual_tests
   1m45.238s impress_demo
   2m00.418s autofilter
   2m05.138s calc_demo
   3m31.141s demo_ui
   5m09.131s writer_demo
   9m37.676s writer_tests
  22m28.748s calc_tests
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

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

New commits:
commit 41b0c3c789c3423b2e25fd3e219e1c631883fdf5
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/54930
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 355ba12fcec9..4c01c13191ac 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -331,6 +331,13 @@ OUString GraphicHelper::ExportGraphic(weld::Window* 
pParent, const Graphic& rGra
 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-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: basic/source

2018-05-29 Thread Caolán McNamara
 basic/source/comp/scanner.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a2dae039f1209b5324879930c142b24d50fafc69
Author: Caolán McNamara 
Date:   Mon May 28 21:51:01 2018 +0100

forcepoint#42 check available str length

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

diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index f29b5c2a5d9f..e79f145c29b9 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -606,7 +606,7 @@ bool SbiScanner::NextSym()
 case '>': if( *pLine == '=' ) n = 2; break;
 case ':': if( *pLine == '=' ) n = 2; break;
 }
-aSym = aLine.copy( nCol, n );
+aSym = aLine.copy(nCol, std::min(n, aLine.getLength() - nCol));
 pLine += n-1; nCol = nCol + n;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa sc/source

2018-05-29 Thread Caolán McNamara
 sc/qa/unit/data/xls/forcepoint-pivot-1.xls |binary
 sc/source/filter/excel/xipivot.cxx |8 
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 0162cfd55f397ded2af7d32f50cb3cba763c68bc
Author: Caolán McNamara 
Date:   Mon May 28 21:22:56 2018 +0100

forcepoint#40 null deref

presumably since

commit 0098bee792c3e208ea4f6ef1c676958d3f4cd207
Date:   Thu Sep 21 06:48:09 2017 +0200

tdf#112501: Pivot table: popupbuttons are placed on wrong cells

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

diff --git a/sc/qa/unit/data/xls/forcepoint-pivot-1.xls 
b/sc/qa/unit/data/xls/forcepoint-pivot-1.xls
new file mode 100644
index ..12919922666b
Binary files /dev/null and b/sc/qa/unit/data/xls/forcepoint-pivot-1.xls differ
diff --git a/sc/source/filter/excel/xipivot.cxx 
b/sc/source/filter/excel/xipivot.cxx
index 118e9a014691..b0452408054b 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -1566,13 +1566,13 @@ void XclImpPivotTable::ApplyMergeFlags(const ScRange& 
rOutRange, const ScDPSaveD
 itr= aFieldBtns.begin();
 itrEnd = aFieldBtns.end();
 vector::const_iterator itDim = 
aFieldDims.begin();
-for (; itr != itrEnd; ++itr, ++itDim)
+for (; itr != itrEnd; ++itr)
 {
 ScMF nMFlag = ScMF::Button;
-const ScDPSaveDimension* pDim = *itDim;
-if (pDim->HasInvisibleMember())
+const ScDPSaveDimension* pDim = itDim != aFieldDims.end() ? 
*itDim++ : nullptr;
+if (pDim && pDim->HasInvisibleMember())
 nMFlag |= ScMF::HiddenMember;
-if (!pDim->IsDataLayout())
+if (!pDim || !pDim->IsDataLayout())
 nMFlag |= ScMF::ButtonPopup;
 rDoc.ApplyFlagsTab(itr->Col(), itr->Row(), itr->Col(), itr->Row(), 
itr->Tab(), nMFlag);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: drawinglayer/source

2018-05-29 Thread Caolán McNamara
 drawinglayer/source/texture/texture3d.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit be1c4cfa195ac8a34c543b85dd17ceb75204fff9
Author: Caolán McNamara 
Date:   Mon May 28 21:36:16 2018 +0100

forcepoint#41 null deref

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

diff --git a/drawinglayer/source/texture/texture3d.cxx 
b/drawinglayer/source/texture/texture3d.cxx
index fc8750199c8f..0dac447ccf50 100644
--- a/drawinglayer/source/texture/texture3d.cxx
+++ b/drawinglayer/source/texture/texture3d.cxx
@@ -74,8 +74,6 @@ namespace drawinglayer
 {
 // #121194# Todo: use alpha channel, too (for 3d)
 maBitmap = maBitmapEx.GetBitmap();
-mpReadBitmap = Bitmap::ScopedReadAccess(maBitmap);
-OSL_ENSURE(mpReadBitmap, "GeoTexSvxBitmapEx: Got no read access to 
Bitmap (!)");
 
 if(mbIsTransparent)
 {
@@ -92,8 +90,13 @@ namespace drawinglayer
 mpReadTransparence = Bitmap::ScopedReadAccess(maTransparence);
 }
 
-mfMulX = static_cast(mpReadBitmap->Width()) / 
maSize.getX();
-mfMulY = static_cast(mpReadBitmap->Height()) / 
maSize.getY();
+mpReadBitmap = Bitmap::ScopedReadAccess(maBitmap);
+SAL_WARN_IF(!mpReadBitmap, "drawinglayer", "GeoTexSvxBitmapEx: Got 
no read access to Bitmap");
+if (mpReadBitmap)
+{
+mfMulX = static_cast(mpReadBitmap->Width()) / 
maSize.getX();
+mfMulY = static_cast(mpReadBitmap->Height()) / 
maSize.getY();
+}
 
 if(maSize.getX() <= 1.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-1' - svx/source

2018-05-29 Thread Caolán McNamara
 svx/source/dialog/dlgctrl.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit ee74e5638ace7daca188c55c29957ce92b289fbb
Author: Caolán McNamara 
Date:   Mon May 28 09:08:26 2018 +0100

coverity#1435838 Uninitialized scalar field

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

diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 3f72131aa1bd..eee6d668d1e0 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -626,6 +626,7 @@ BitmapEx& RectCtl::GetRectBitmap()
 RectCtl::RectCtl(SvxTabPage* pPage, RectPoint eRpt, sal_uInt16 nBorder)
 : m_pPage(pPage)
 , nBorderWidth(Application::GetDefaultDevice()->LogicToPixel(Size(nBorder, 
0), MapMode(MapUnit::Map100thMM)).Width())
+, eRP(eRpt)
 , eDefRP(eRpt)
 , pBitmap(nullptr)
 , m_nState(CTL_STATE::NONE)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - basic/source

2018-05-29 Thread Caolán McNamara
 basic/source/comp/scanner.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f2d5ba04a7660ecea326d90d08ec8002462883a5
Author: Caolán McNamara 
Date:   Mon May 28 21:51:01 2018 +0100

forcepoint#42 check available str length

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

diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index f29b5c2a5d9f..e79f145c29b9 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -606,7 +606,7 @@ bool SbiScanner::NextSym()
 case '>': if( *pLine == '=' ) n = 2; break;
 case ':': if( *pLine == '=' ) n = 2; break;
 }
-aSym = aLine.copy( nCol, n );
+aSym = aLine.copy(nCol, std::min(n, aLine.getLength() - nCol));
 pLine += n-1; nCol = nCol + n;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Self-signed certificate

2018-05-29 Thread Miklos Vajna
Hi,

On Wed, May 09, 2018 at 03:42:40PM +, Renato Ribeiro 
 wrote:
> I've tried to create a self-signed to access the LOOL application in a web 
> browser but even following all steps of README file 
> (online.git/wsd/README):[cid:8fb534d4-99cd-40e5-9866-07243cdf1e55]
> when I try to access the link on the image below the browser (I tested on 
> Mozilla and Chrome) blocked the page because the certification. When I'm 
> creating the certification I've putting the Common Name as 127.0.0.1 
> (localhost address). I think it's the right way but I don't know. Could 
> anyone help me with this issue?

I guess that's expected, browsers do complain about self-signed certs
and localhost will always have a self-signed cert, no problem with that.

Regards,

Miklos


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - cui/source cui/uiconfig

2018-05-29 Thread Caolán McNamara
 cui/source/inc/transfrm.hxx   |   24 +++
 cui/source/tabpages/transfrm.cxx  |  113 --
 cui/uiconfig/ui/slantcornertabpage.ui |   68 ++--
 3 files changed, 101 insertions(+), 104 deletions(-)

New commits:
commit 9f1fb000a50f38e45b68b4cb14cb4f7f9c514f82
Author: Caolán McNamara 
Date:   Fri May 25 16:19:52 2018 +0100

weld SvxSlantTabPage

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

diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
index 959cd6bd8f4d..7e7aa264f91b 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -227,17 +227,6 @@ class SvxSlantTabPage : public SvxTabPage
 static const sal_uInt16 pSlantRanges[];
 
 private:
-VclPtrm_pFlRadius;
-VclPtr m_pMtrRadius;
-VclPtrm_pFlAngle;
-VclPtr m_pMtrAngle;
-
-VclPtrm_aControlGroups[2];
-VclPtrm_aControlGroupX[2];
-VclPtr m_aControlX[2];
-VclPtrm_aControlGroupY[2];
-VclPtr m_aControlY[2];
-
 const SfxItemSet&   rOutAttrs;
 
 const SdrView*  pView;
@@ -248,10 +237,19 @@ private:
 MapUnit ePoolUnit;
 FieldUnit   eDlgUnit;
 
+std::unique_ptr m_xFlRadius;
+std::unique_ptr m_xMtrRadius;
+std::unique_ptr m_xFlAngle;
+std::unique_ptr m_xMtrAngle;
+std::unique_ptr m_aControlGroups[2];
+std::unique_ptr m_aControlGroupX[2];
+std::unique_ptr m_aControlX[2];
+std::unique_ptr m_aControlGroupY[2];
+std::unique_ptr m_aControlY[2];
+
 public:
- SvxSlantTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs  );
+SvxSlantTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
 virtual ~SvxSlantTabPage() override;
-virtual void dispose() override;
 
 static VclPtr Create( TabPageParent, const SfxItemSet* );
 static const sal_uInt16* GetRanges() {  return pSlantRanges; }
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 0e67b85261b9..b37d366f2f0b 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -320,13 +320,11 @@ void SvxAngleTabPage::Reset(const SfxItemSet* rAttrs)
 m_pCtlAngle->SaveValue();
 }
 
-
 VclPtr SvxAngleTabPage::Create( TabPageParent pWindow, const 
SfxItemSet* rSet)
 {
 return VclPtr::Create(pWindow.pParent, *rSet);
 }
 
-
 void SvxAngleTabPage::ActivatePage(const SfxItemSet& rSet)
 {
 SfxBoolItem const * bPosProtect = nullptr;
@@ -337,7 +335,6 @@ void SvxAngleTabPage::ActivatePage(const SfxItemSet& rSet)
 }
 }
 
-
 DeactivateRC SvxAngleTabPage::DeactivatePage( SfxItemSet* _pSet )
 {
 if(_pSet)
@@ -422,25 +419,23 @@ void SvxAngleTabPage::PointChanged(weld::DrawingArea* 
/*pWindow*/, RectPoint /*e
 |*  dialog for changing slant and corner radius
 |*
 \/
-SvxSlantTabPage::SvxSlantTabPage(vcl::Window* pParent, const SfxItemSet& 
rInAttrs)
-: SvxTabPage( 
pParent,"SlantAndCornerRadius","cui/ui/slantcornertabpage.ui",
-rInAttrs)
+SvxSlantTabPage::SvxSlantTabPage(TabPageParent pParent, const SfxItemSet& 
rInAttrs)
+: SvxTabPage(pParent, "cui/ui/slantcornertabpage.ui", 
"SlantAndCornerRadius", rInAttrs)
 , rOutAttrs(rInAttrs)
 , pView(nullptr)
 , eDlgUnit(FUNIT_NONE)
+, m_xFlRadius(m_xBuilder->weld_widget("FL_RADIUS"))
+, m_xMtrRadius(m_xBuilder->weld_metric_spin_button("MTR_FLD_RADIUS", 
FUNIT_CM))
+, m_xFlAngle(m_xBuilder->weld_widget("FL_SLANT"))
+, m_xMtrAngle(m_xBuilder->weld_metric_spin_button("MTR_FLD_ANGLE", 
FUNIT_DEGREE))
 {
-get(m_pFlRadius, "FL_RADIUS");
-get(m_pMtrRadius, "MTR_FLD_RADIUS");
-get(m_pFlAngle, "FL_SLANT");
-get(m_pMtrAngle, "MTR_FLD_ANGLE");
-
 for (int i = 0; i < 2; ++i)
 {
-get(m_aControlGroups[i], "controlgroups" + OString::number(i+1));
-get(m_aControlGroupX[i], "controlgroupx" + OString::number(i+1));
-get(m_aControlX[i], "controlx" + OString::number(i+1));
-get(m_aControlGroupY[i], "controlgroupy" + OString::number(i+1));
-get(m_aControlY[i], "controly" + OString::number(i+1));
+m_aControlGroups[i].reset(m_xBuilder->weld_widget("controlgroups" + 
OString::number(i+1)));
+m_aControlGroupX[i].reset(m_xBuilder->weld_widget("controlgroupx" + 
OString::number(i+1)));
+m_aControlX[i].reset(m_xBuilder->weld_metric_spin_button("controlx" + 
OString::number(i+1), FUNIT_CM));
+m_aControlGroupY[i].reset(m_xBuilder->weld_widget("controlgroupy" + 
OString::number(i+1)));
+m_aControlY[i].reset(m_xBuilder->weld_metric_spin_button("controly" + 
OString::number(i+1), FUNIT_CM));
 }
 
 // this page needs ExchangeSupport
@@ -448,30 +443,12 @@ 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sc/qa sc/source

2018-05-29 Thread Caolán McNamara
 sc/qa/unit/data/xls/forcepoint-pivot-1.xls |binary
 sc/source/filter/excel/xipivot.cxx |8 
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit d9f2a3e005f10bbb3426bc21b08ed55ffdc00b76
Author: Caolán McNamara 
Date:   Mon May 28 21:22:56 2018 +0100

forcepoint#40 null deref

presumably since

commit 0098bee792c3e208ea4f6ef1c676958d3f4cd207
Date:   Thu Sep 21 06:48:09 2017 +0200

tdf#112501: Pivot table: popupbuttons are placed on wrong cells

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

diff --git a/sc/qa/unit/data/xls/forcepoint-pivot-1.xls 
b/sc/qa/unit/data/xls/forcepoint-pivot-1.xls
new file mode 100644
index ..12919922666b
Binary files /dev/null and b/sc/qa/unit/data/xls/forcepoint-pivot-1.xls differ
diff --git a/sc/source/filter/excel/xipivot.cxx 
b/sc/source/filter/excel/xipivot.cxx
index 118e9a014691..b0452408054b 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -1566,13 +1566,13 @@ void XclImpPivotTable::ApplyMergeFlags(const ScRange& 
rOutRange, const ScDPSaveD
 itr= aFieldBtns.begin();
 itrEnd = aFieldBtns.end();
 vector::const_iterator itDim = 
aFieldDims.begin();
-for (; itr != itrEnd; ++itr, ++itDim)
+for (; itr != itrEnd; ++itr)
 {
 ScMF nMFlag = ScMF::Button;
-const ScDPSaveDimension* pDim = *itDim;
-if (pDim->HasInvisibleMember())
+const ScDPSaveDimension* pDim = itDim != aFieldDims.end() ? 
*itDim++ : nullptr;
+if (pDim && pDim->HasInvisibleMember())
 nMFlag |= ScMF::HiddenMember;
-if (!pDim->IsDataLayout())
+if (!pDim || !pDim->IsDataLayout())
 nMFlag |= ScMF::ButtonPopup;
 rDoc.ApplyFlagsTab(itr->Col(), itr->Row(), itr->Col(), itr->Row(), 
itr->Tab(), nMFlag);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/source

2018-05-29 Thread Ilhan Yesil
 sd/source/ui/view/drtxtob.cxx |   20 
 1 file changed, 16 insertions(+), 4 deletions(-)

New commits:
commit 07610feeeff47fc5bbe057c91c50ffae54a41c85
Author: Ilhan Yesil 
Date:   Mon May 28 11:05:30 2018 +0200

tdf#117847 Impress: Deselected alignment remained checked

The state of the attributes for alignment are now read and set
correctly.

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

diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index ad3bb02d0c16..8d4ebf161ada 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -481,16 +481,28 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
 {
 case SvxAdjust::Left:
 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, true ) );
-break;
+rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, false ) );
+rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, false ) );
+rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, false ) );
+break;
 case SvxAdjust::Center:
 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, true ) );
-break;
+rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, false ) );
+rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, false ) );
+rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, false ) );
+break;
 case SvxAdjust::Right:
 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, true ) );
-break;
+rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, false ) );
+rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, false ) );
+rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, false ) );
+break;
 case SvxAdjust::Block:
 rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, true ) );
-break;
+rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, false ) );
+rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, false ) );
+rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, false ) );
+break;
 default:
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/source

2018-05-29 Thread Noel Grandin
 dbaccess/source/ui/dlg/TablesSingleDlg.cxx |   10 +-
 dbaccess/source/ui/inc/TablesSingleDlg.hxx |2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit b69457c1a5cb31c8b0fb3d047e2826bc3d61fea4
Author: Noel Grandin 
Date:   Fri May 18 13:49:03 2018 +0200

loplugin:useuniqueptr in OTableSubscriptionDialog

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

diff --git a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx 
b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx
index 65f95fdf689f..2c18a418b69a 100644
--- a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx
+++ b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx
@@ -47,10 +47,10 @@ 
OTableSubscriptionDialog::OTableSubscriptionDialog(vcl::Window* pParent
 {
 m_pImpl->setDataSourceOrName(_aDataSourceName);
 Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource();
-m_pOutSet = new SfxItemSet( *_pItems );
+m_pOutSet.reset(new SfxItemSet( *_pItems ));
 
 m_pImpl->translateProperties(xDatasource, *m_pOutSet);
-SetInputSet(m_pOutSet);
+SetInputSet(m_pOutSet.get());
 
 VclPtrInstance pTabPage(get_content_area(), 
*m_pOutSet, this);
 pTabPage->SetServiceFactory(_rxORB);
@@ -64,7 +64,7 @@ OTableSubscriptionDialog::~OTableSubscriptionDialog()
 
 void OTableSubscriptionDialog::dispose()
 {
-delete m_pOutSet;
+m_pOutSet.reset();
 SfxSingleTabDialog::dispose();
 }
 
@@ -110,12 +110,12 @@ Reference< XPropertySet > const & 
OTableSubscriptionDialog::getCurrentDataSource
 
 const SfxItemSet* OTableSubscriptionDialog::getOutputSet() const
 {
-return m_pOutSet;
+return m_pOutSet.get();
 }
 
 SfxItemSet* OTableSubscriptionDialog::getWriteOutputSet()
 {
-return m_pOutSet;
+return m_pOutSet.get();
 }
 
 }   // namespace dbaui
diff --git a/dbaccess/source/ui/inc/TablesSingleDlg.hxx 
b/dbaccess/source/ui/inc/TablesSingleDlg.hxx
index 4622f91a72ca..2df28c524308 100644
--- a/dbaccess/source/ui/inc/TablesSingleDlg.hxx
+++ b/dbaccess/source/ui/inc/TablesSingleDlg.hxx
@@ -44,7 +44,7 @@ class ODbDataSourceAdministrationHelper;
 std::unique_ptr  m_pImpl;
 bool m_bStopExecution; // set when the dialog should not be executed
 
-SfxItemSet* m_pOutSet;
+std::unique_ptr m_pOutSet;
 public:
 
 OTableSubscriptionDialog(vcl::Window* pParent
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx include/vcl svx/source vcl/source vcl/unx

2018-05-29 Thread Caolán McNamara
 cui/source/dialogs/colorpicker.cxx |   14 -
 cui/source/inc/transfrm.hxx|   27 +--
 cui/source/tabpages/transfrm.cxx   |  134 -
 cui/uiconfig/ui/rotationtabpage.ui |   86 ---
 include/svx/dialcontrol.hxx|   93 
 include/vcl/customweld.hxx |6 
 include/vcl/weld.hxx   |4 
 svx/source/dialog/charmap.cxx  |4 
 svx/source/dialog/dialcontrol.cxx  |  277 -
 vcl/source/app/salvtables.cxx  |   15 ++
 vcl/unx/gtk3/gtk3gtkinst.cxx   |   15 ++
 11 files changed, 543 insertions(+), 132 deletions(-)

New commits:
commit 66cd438e3545edecaa05aa27beb289c6a6df53fc
Author: Caolán McNamara 
Date:   Fri May 25 16:54:30 2018 +0100

weld SvxAngleTabPage

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

diff --git a/cui/source/dialogs/colorpicker.cxx 
b/cui/source/dialogs/colorpicker.cxx
index 4fba23b2f7ca..3b182cde641a 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -426,7 +426,7 @@ void ColorFieldControl::ShowPosition( const Point& rPos, 
bool bUpdate )
 
 void ColorFieldControl::MouseButtonDown(const MouseEvent& rMEvt)
 {
-grab_add();
+CaptureMouse();
 mbMouseCaptured = true;
 ShowPosition(rMEvt.GetPosPixel(), true);
 Modify();
@@ -443,7 +443,7 @@ void ColorFieldControl::MouseMove(const MouseEvent& rMEvt)
 
 void ColorFieldControl::MouseButtonUp(const MouseEvent&)
 {
-grab_remove();
+ReleaseMouse();
 mbMouseCaptured = false;
 }
 
@@ -537,14 +537,12 @@ private:
 VclPtr mxBitmap;
 sal_Int16 mnLevel;
 double mdValue;
-bool mbMouseCaptured;
 };
 
 ColorSliderControl::ColorSliderControl()
 : meMode( DefaultMode )
 , mnLevel( 0 )
 , mdValue( -1.0 )
-, mbMouseCaptured(false)
 {
 }
 
@@ -651,15 +649,14 @@ void ColorSliderControl::ChangePosition(long nY)
 
 void ColorSliderControl::MouseButtonDown(const MouseEvent& rMEvt)
 {
-grab_add();
-mbMouseCaptured = true;
+CaptureMouse();
 ChangePosition(rMEvt.GetPosPixel().Y());
 Modify();
 }
 
 void ColorSliderControl::MouseMove(const MouseEvent& rMEvt)
 {
-if (mbMouseCaptured)
+if (IsMouseCaptured())
 {
 ChangePosition(rMEvt.GetPosPixel().Y());
 Modify();
@@ -668,8 +665,7 @@ void ColorSliderControl::MouseMove(const MouseEvent& rMEvt)
 
 void ColorSliderControl::MouseButtonUp(const MouseEvent&)
 {
-grab_remove();
-mbMouseCaptured = false;
+ReleaseMouse();
 }
 
 void ColorSliderControl::Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle&)
diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
index 7e7aa264f91b..9dccd2663241 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -175,15 +175,6 @@ class SvxAngleTabPage : public SvxTabPage
 static const sal_uInt16 pAngleRanges[];
 
 private:
-VclPtrm_pFlPosition;
-VclPtr m_pMtrPosX;
-VclPtr m_pMtrPosY;
-VclPtr  m_pCtlRect;
-
-VclPtrm_pFlAngle;
-VclPtrm_pNfAngle;
-VclPtrm_pCtlAngle;
-
 const SfxItemSet&   rOutAttrs;
 const SdrView*  pView;
 
@@ -194,10 +185,20 @@ private:
 MapUnit ePoolUnit;
 FieldUnit   eDlgUnit;
 
+svx::SvxDialControl m_aCtlAngle;
+RectCtl m_aCtlRect;
+
+std::unique_ptr m_xFlPosition;
+std::unique_ptr m_xMtrPosX;
+std::unique_ptr m_xMtrPosY;
+std::unique_ptr m_xCtlRect;
+std::unique_ptr m_xFlAngle;
+std::unique_ptr m_xNfAngle;
+std::unique_ptr m_xCtlAngle;
+
 public:
- SvxAngleTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs  );
+SvxAngleTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
 virtual ~SvxAngleTabPage() override;
-virtual void dispose() override;
 
 static VclPtr Create( TabPageParent, const SfxItemSet* );
 static const sal_uInt16*  GetRanges() { return pAngleRanges; }
@@ -208,8 +209,8 @@ public:
 virtual void ActivatePage( const SfxItemSet& rSet ) override;
 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
-virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
-virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) 
override;
+virtual void PointChanged(weld::DrawingArea* pWindow, RectPoint eRP) 
override;
+virtual void PointChanged(vcl::Window* pWindow, RectPoint eRP) override;
 
 void Construct();
 void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index b37d366f2f0b..cf3bc446a78e 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -173,57 +173,43 @@ void 

[Libreoffice-commits] core.git: cui/source cui/uiconfig include/svx include/vcl starmath/source svx/source vcl/source

2018-05-29 Thread Caolán McNamara
 cui/source/inc/swpossizetabpage.hxx  |   97 +---
 cui/source/tabpages/swpossizetabpage.cxx |  746 ++-
 cui/uiconfig/ui/swpossizepage.ui |   64 +-
 include/svx/swframeexample.hxx   |   65 ++
 include/vcl/weld.hxx |4 
 starmath/source/dialog.cxx   |8 
 svx/source/dialog/swframeexample.cxx |  666 +++
 vcl/source/app/salvtables.cxx|5 
 8 files changed, 1168 insertions(+), 487 deletions(-)

New commits:
commit c4041a3b6c703254ee3977eef1a989992506772b
Author: Caolán McNamara 
Date:   Mon May 28 14:33:42 2018 +0100

weld SvxSwPosSizeTabPage

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

diff --git a/cui/source/inc/swpossizetabpage.hxx 
b/cui/source/inc/swpossizetabpage.hxx
index b10e2ca7617f..d9e326dee456 100644
--- a/cui/source/inc/swpossizetabpage.hxx
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -20,12 +20,9 @@
 #define INCLUDED_CUI_SOURCE_INC_SWPOSSIZETABPAGE_HXX
 
 #include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
+#include 
 
 // SvxSwPosSizeTabPage - position and size page for Writer drawing objects
 struct FrmMap;
@@ -37,40 +34,6 @@ class SvxSwPosSizeTabPage : public SfxTabPage
 {
 using TabPage::DeactivatePage;
 
-VclPtr  m_pWidthMF;
-VclPtr  m_pHeightMF;
-VclPtr m_pKeepRatioCB;
-
-VclPtr  m_pToPageRB;
-VclPtr  m_pToParaRB;
-VclPtr  m_pToCharRB;
-VclPtr  m_pAsCharRB;
-VclPtr  m_pToFrameRB;
-
-VclPtr  m_pPositionCB;
-VclPtr  m_pSizeCB;
-
-VclPtr m_pPosFrame;
-VclPtrm_pHoriFT;
-VclPtr  m_pHoriLB;
-VclPtrm_pHoriByFT;
-VclPtr  m_pHoriByMF;
-VclPtrm_pHoriToFT;
-VclPtr  m_pHoriToLB;
-
-VclPtr m_pHoriMirrorCB;
-
-VclPtrm_pVertFT;
-VclPtr  m_pVertLB;
-VclPtrm_pVertByFT;
-VclPtr  m_pVertByMF;
-VclPtrm_pVertToFT;
-VclPtr  m_pVertToLB;
-
-VclPtr m_pFollowCB;
-
-VclPtr m_pExampleWN;
-
 Link m_aValidateLink;
 
 ::tools::Rectangle   m_aRect; //size of all selected objects
@@ -95,24 +58,53 @@ class SvxSwPosSizeTabPage : public SfxTabPage
 boolm_bIsInRightToLeft;
 TriStatem_nProtectSizeState;
 
-DECL_LINK(RangeModifyHdl, Control&, void);
-DECL_LINK(RangeModifyClickHdl, Button*, void);
-DECL_LINK(AnchorTypeHdl, Button*, void);
-DECL_LINK( PosHdl, ListBox&, void );
-DECL_LINK( RelHdl, ListBox&, void );
-DECL_LINK(MirrorHdl, Button*, void);
-DECL_LINK( ModifyHdl, Edit&, void );
-DECL_LINK(ProtectHdl, Button*, void);
+SwFrameExample m_aExampleWN;
+
+std::unique_ptr m_xWidthMF;
+std::unique_ptr m_xHeightMF;
+std::unique_ptr m_xKeepRatioCB;
+std::unique_ptr m_xToPageRB;
+std::unique_ptr m_xToParaRB;
+std::unique_ptr m_xToCharRB;
+std::unique_ptr m_xAsCharRB;
+std::unique_ptr m_xToFrameRB;
+std::unique_ptr m_xPositionCB;
+std::unique_ptr m_xSizeCB;
+std::unique_ptr m_xPosFrame;
+std::unique_ptr m_xHoriFT;
+std::unique_ptr m_xHoriLB;
+std::unique_ptr m_xHoriByFT;
+std::unique_ptr m_xHoriByMF;
+std::unique_ptr m_xHoriToFT;
+std::unique_ptr m_xHoriToLB;
+std::unique_ptr m_xHoriMirrorCB;
+std::unique_ptr m_xVertFT;
+std::unique_ptr m_xVertLB;
+std::unique_ptr m_xVertByFT;
+std::unique_ptr m_xVertByMF;
+std::unique_ptr m_xVertToFT;
+std::unique_ptr m_xVertToLB;
+std::unique_ptr m_xFollowCB;
+std::unique_ptr m_xExampleWN;
+
+DECL_LINK(RangeModifyHdl, weld::Widget&, void);
+DECL_LINK(RangeModifyClickHdl, weld::ToggleButton&, void);
+DECL_LINK(AnchorTypeHdl, weld::ToggleButton&, void);
+DECL_LINK(PosHdl, weld::ComboBoxText&, void);
+DECL_LINK(RelHdl, weld::ComboBoxText&, void);
+DECL_LINK(MirrorHdl, weld::ToggleButton&, void);
+DECL_LINK(ModifyHdl, weld::MetricSpinButton&, void);
+DECL_LINK(ProtectHdl, weld::ToggleButton&, void);
 
 voidInitPos(RndStdIds nAnchorType, sal_uInt16 nH, sal_uInt16 
nHRel,
 sal_uInt16 nV,  sal_uInt16 nVRel,
 long   nX,  long   nY);
-static sal_uInt16   GetMapPos(FrmMap const *pMap, ListBox const );
-static shortGetAlignment(FrmMap const *pMap, sal_uInt16 nMapPos, 
ListBox const );
-static shortGetRelation(ListBox const );
+static sal_uInt16   GetMapPos(FrmMap const *pMap, const 
weld::ComboBoxText& rAlignLB);
+static shortGetAlignment(FrmMap const *pMap, sal_uInt16 nMapPos, 
const weld::ComboBoxText& rRelationLB);
+static shortGetRelation(const weld::ComboBoxText& rRelationLB);
 RndStdIds   GetAnchorType(bool* pbHasChanged = nullptr);
-voidFillRelLB(FrmMap const *pMap, 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - drawinglayer/source

2018-05-29 Thread Caolán McNamara
 drawinglayer/source/texture/texture3d.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit f532decefb7881eb5f56864db9fcfd5d2ba85ee4
Author: Caolán McNamara 
Date:   Mon May 28 21:36:16 2018 +0100

forcepoint#41 null deref

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

diff --git a/drawinglayer/source/texture/texture3d.cxx 
b/drawinglayer/source/texture/texture3d.cxx
index fc8750199c8f..0dac447ccf50 100644
--- a/drawinglayer/source/texture/texture3d.cxx
+++ b/drawinglayer/source/texture/texture3d.cxx
@@ -74,8 +74,6 @@ namespace drawinglayer
 {
 // #121194# Todo: use alpha channel, too (for 3d)
 maBitmap = maBitmapEx.GetBitmap();
-mpReadBitmap = Bitmap::ScopedReadAccess(maBitmap);
-OSL_ENSURE(mpReadBitmap, "GeoTexSvxBitmapEx: Got no read access to 
Bitmap (!)");
 
 if(mbIsTransparent)
 {
@@ -92,8 +90,13 @@ namespace drawinglayer
 mpReadTransparence = Bitmap::ScopedReadAccess(maTransparence);
 }
 
-mfMulX = static_cast(mpReadBitmap->Width()) / 
maSize.getX();
-mfMulY = static_cast(mpReadBitmap->Height()) / 
maSize.getY();
+mpReadBitmap = Bitmap::ScopedReadAccess(maBitmap);
+SAL_WARN_IF(!mpReadBitmap, "drawinglayer", "GeoTexSvxBitmapEx: Got 
no read access to Bitmap");
+if (mpReadBitmap)
+{
+mfMulX = static_cast(mpReadBitmap->Width()) / 
maSize.getX();
+mfMulY = static_cast(mpReadBitmap->Height()) / 
maSize.getY();
+}
 
 if(maSize.getX() <= 1.0)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/qt5+kde5' - 2 commits - vcl/qt5

2018-05-29 Thread Katarina Behrens
 vcl/qt5/Qt5Menu.cxx |   23 +++
 1 file changed, 23 insertions(+)

New commits:
commit d81634d3815c2c4e0acdf26811afbe656bc98fb9
Author: Katarina Behrens 
Date:   Tue May 29 09:53:43 2018 +0200

Add radiobuttons to native menus

Change-Id: I015bbb0a337b917096ca6f542a73c24c79fbef7d

diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx
index 6c219aff7557..e61595af4850 100644
--- a/vcl/qt5/Qt5Menu.cxx
+++ b/vcl/qt5/Qt5Menu.cxx
@@ -87,6 +87,7 @@ void Qt5Menu::DoFullMenuUpdate( Menu* pMenuBar, QMenu* 
pParentMenu )
 
 if ( mbMenuBar && mpQMenuBar )
 mpQMenuBar->clear();
+QActionGroup* pQAG = nullptr;
 
 for ( sal_Int32 nItem = 0; nItem < static_cast(GetItemCount()); 
nItem++ )
 {
@@ -105,8 +106,11 @@ void Qt5Menu::DoFullMenuUpdate( Menu* pMenuBar, QMenu* 
pParentMenu )
 else
 {
 if( pSalMenuItem->mpSubMenu )
+{
 // submenu
 pQMenu = pQMenu->addMenu( toQString(aText) );
+pQAG = new QActionGroup( pQMenu );
+}
 else
 {
 if ( pSalMenuItem->mnType == MenuItemType::SEPARATOR )
@@ -122,6 +126,16 @@ void Qt5Menu::DoFullMenuUpdate( Menu* pMenuBar, QMenu* 
pParentMenu )
 pAction->setCheckable( true );
 pAction->setChecked( bChecked );
 }
+else if (itemBits & MenuItemBits::RADIOCHECK)
+{
+pAction->setCheckable(true);
+if ( !pQAG )
+{
+pQAG = new QActionGroup( pQMenu );
+pQAG->setExclusive(true);
+}
+pQAG->addAction( pAction );
+}
 
 connect( pAction, ::triggered, this,
  [this, pSalMenuItem]{ 
DispatchCommand(pSalMenuItem); } );
commit 1cd7a03876f665289c4e4a6b9f4cb73fc54d987a
Author: Katarina Behrens 
Date:   Mon May 28 13:59:43 2018 +0200

Add checkmark buttons to native menus

Change-Id: If64227af287006cb4f9b980dac97b2fb401eac88

diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx
index 91de0defccff..6c219aff7557 100644
--- a/vcl/qt5/Qt5Menu.cxx
+++ b/vcl/qt5/Qt5Menu.cxx
@@ -96,6 +96,8 @@ void Qt5Menu::DoFullMenuUpdate( Menu* pMenuBar, QMenu* 
pParentMenu )
 QMenu* pQMenu = pParentMenu;
 NativeItemText( aText );
 vcl::KeyCode nAccelKey = pVCLMenu->GetAccelKey( nId );
+bool bChecked = pVCLMenu->IsItemChecked( nId );
+MenuItemBits itemBits = pVCLMenu->GetItemBits( nId );
 
 if (mbMenuBar && mpQMenuBar)
 // top-level menu
@@ -114,6 +116,13 @@ void Qt5Menu::DoFullMenuUpdate( Menu* pMenuBar, QMenu* 
pParentMenu )
 // leaf menu
 QAction *pAction = pQMenu->addAction( toQString(aText) );
 pAction->setShortcut( toQString( 
nAccelKey.GetName(GetFrame()->GetWindow()) ) );
+
+if (itemBits & MenuItemBits::CHECKABLE)
+{
+pAction->setCheckable( true );
+pAction->setChecked( bChecked );
+}
+
 connect( pAction, ::triggered, this,
  [this, pSalMenuItem]{ 
DispatchCommand(pSalMenuItem); } );
 }
___
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' - sc/source

2018-05-29 Thread Armin Le Grand
 sc/source/ui/view/output.cxx |   21 +++--
 1 file changed, 15 insertions(+), 6 deletions(-)

New commits:
commit 08e45e11a0e74cdb4a17ec29df9d03ad03b7f7c0
Author: Armin Le Grand 
Date:   Thu Apr 19 18:56:55 2018 +0200

tdf#115582 Correct coordinate usage for sc's ::Array

In ScOutputData::SetCellRotations() eventually existing
CellRotations are added to the svx::frame::Array data
that gets created for repaint. This used the wrong coordinate
calculation, thus in some cases the repaint of rotated
Cells failed.

Change-Id: Ib5df8576e8c9404d717d5dcc5662aa04b82cf959
Reviewed-on: https://gerrit.libreoffice.org/53171
Tested-by: Jenkins 
Reviewed-by: Armin Le Grand 
(cherry picked from commit 0185e65bcd73dbad2205a39369e1e06b33a2ca51)
Reviewed-on: https://gerrit.libreoffice.org/54922

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 6e0fa1a77e5c..ac525bb0f803 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -657,13 +657,22 @@ void ScOutputData::SetCellRotations()
 // Needed for CellInfo internal decisions (bg fill, 
...)
 pInfo->nRotateDir = nDir;
 
-// add rotation info to Array information
-const long 
nAttrRotate(pPattern->GetRotateVal(pCondSet));
-const SvxRotateMode 
eRotMode(pPattern->GetItem(ATTR_ROTATE_MODE, pCondSet).GetValue());
-const double fOrient((bLayoutRTL ? -1.0 : 1.0) * 
nAttrRotate * F_PI18000); // 1/100th degrees -> [0..2PI]
-svx::frame::Array& rArray = mrTabInfo.maArray;
+// create target coordinates
+const SCCOL nTargetX(nX - nVisX1 + 1);
+const SCROW nTargetY(nY - nVisY1 + 1);
 
-rArray.SetCellRotation(nX+1, nY+1, eRotMode, fOrient);
+// Check for values - below in SetCellRotation these 
will
+// be converted to size_t and thus may not be negative
+if(nTargetX >= 0 && nTargetY >= 0)
+{
+// add rotation info to Array information
+const long 
nAttrRotate(pPattern->GetRotateVal(pCondSet));
+const SvxRotateMode 
eRotMode(pPattern->GetItem(ATTR_ROTATE_MODE, pCondSet).GetValue());
+const double fOrient((bLayoutRTL ? -1.0 : 1.0) * 
nAttrRotate * F_PI18000); // 1/100th degrees -> [0..2PI]
+svx::frame::Array& rArray = mrTabInfo.maArray;
+
+rArray.SetCellRotation(nTargetX, nTargetY, 
eRotMode, fOrient);
+}
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa

2018-05-29 Thread Luboš Luňák
 sc/qa/uitest/calc_tests/tdf53482.py |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 173c3a7321d0ba2583f1198d5ea3b54983665f37
Author: Luboš Luňák 
Date:   Tue May 29 10:06:40 2018 +0200

Revert "UITest_calc_tests: disable randomly failing assert for now"

Fixed by my previous commit.
This reverts commit 27cc0064a8a52c9000d0249581e80fe7a0c8a7b6.

Change-Id: Ib64e7341251d848b4db0dbb1f58c4fcef51437ed

diff --git a/sc/qa/uitest/calc_tests/tdf53482.py 
b/sc/qa/uitest/calc_tests/tdf53482.py
index ff23eb8105e2..33ffa71d6283 100644
--- a/sc/qa/uitest/calc_tests/tdf53482.py
+++ b/sc/qa/uitest/calc_tests/tdf53482.py
@@ -49,8 +49,7 @@ class tdf53482(UITestCase):
 self.ui_test.close_dialog_through_button(xOK)
 #6. Expected behavior:  Ignore column labels when sorting
 self.assertEqual(get_cell_by_position(document, 0, 6, 7).getString(), 
"Occupation")
-# FIXME this fails randomly, e.g. travel Industry or ttavel Industry.
-#self.assertEqual(get_cell_by_position(document, 0, 6, 8).getString(), 
"Travel Industry")
+self.assertEqual(get_cell_by_position(document, 0, 6, 8).getString(), 
"Travel Industry")
 self.assertEqual(get_cell_by_position(document, 0, 6, 
123).getString(), "13")
 
 self.ui_test.close_doc()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa

2018-05-29 Thread Mike Kaganski
 sw/qa/extras/ww8export/data/tdf91083.odt |binary
 sw/qa/extras/ww8export/ww8export.cxx |2 --
 2 files changed, 2 deletions(-)

New commits:
commit b7da22a63dcf09fdcbb3fe62c82af699d8546d3b
Author: Mike Kaganski 
Date:   Sun May 6 12:01:47 2018 +0300

ww8export: Fix testTableKeep

The tables in the test .ODT contain a cell with text "With merged cells".
The text is supposed to wrap, so that cell height includes the two lines.
The width of the cell is 32.72 mm. When it is exported to .DOC, due to
rounding errors, the width becomes 32.76 mm. It happens that the text
width is too close to these numbers, so depending on rounding when text
layouting, it may start to not wrap in .DOC.

This just adds an extra space character to the line, to stop depend on
rounding errors.

This also reverts commits b2a053160c4c8eb0acd66b74c52dbda23a654bda and
a30a36b3c70e64b62add9f3c5376202b9682851f, which had workarounded this
issue.

Change-Id: Ifdb7a042f78a1a3cce3a385e9db865a1b8c7b134
Reviewed-on: https://gerrit.libreoffice.org/53906
Reviewed-by: Justin Luth 
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/sw/qa/extras/ww8export/data/tdf91083.odt 
b/sw/qa/extras/ww8export/data/tdf91083.odt
index e4f55e58acf0..482a2dc4d5d1 100644
Binary files a/sw/qa/extras/ww8export/data/tdf91083.odt and 
b/sw/qa/extras/ww8export/data/tdf91083.odt differ
diff --git a/sw/qa/extras/ww8export/ww8export.cxx 
b/sw/qa/extras/ww8export/ww8export.cxx
index d5a84b2b1ded..6659749b3c80 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -1293,7 +1293,6 @@ DECLARE_WW8EXPORT_TEST(testCommentExport, 
"comment-export.odt")
 }
 }
 
-#if !defined(MACOSX) && !defined(_WIN32)
 #if !TEST_FONTS_MISSING
 DECLARE_WW8EXPORT_TEST(testTableKeep, "tdf91083.odt")
 {
@@ -1302,7 +1301,6 @@ DECLARE_WW8EXPORT_TEST(testTableKeep, "tdf91083.odt")
 CPPUNIT_ASSERT_EQUAL( OUString("Row 1"), 
parseDump("/root/page[6]/body/tab[1]/row[2]/cell[1]/txt[1]") );
 }
 #endif
-#endif
 
 DECLARE_WW8EXPORT_TEST(testTdf76349_textboxMargins, 
"tdf76349_textboxMargins.doc")
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: unotools/source

2018-05-29 Thread Luboš Luňák
 unotools/source/i18n/charclass.cxx |   56 -
 1 file changed, 55 insertions(+), 1 deletion(-)

New commits:
commit a2045f94677c4407c00a3299da0936ded696cfb2
Author: Luboš Luňák 
Date:   Tue May 29 12:27:34 2018 +0200

make CharClass also mutex-protect calls to its dependent class

When calc_tests runs test_tdf53482_Range_contains_column_headings_file()
with Calc's threading enabled, it ends up calling ScInterpreter::ScProper()
from threads, which calls to CharClass. And while CharClass tries to be
thread-safe (guessing from the mutex usage), it forwards calls to i18npool's
CharacterClassificationImpl and cclass_Unicode, both of which aren't
thread-safe. Which makes thread safety of CharClass itself pointless.

Since CharClass already acquires the mutex anyway because of getMyLocale(),
just extend the duration for the entire call, which hopefully shouldn't
make that much of a difference.

Change-Id: I544b34d7e58c4a901f3b6e3a3ff52156b9e320a8
Reviewed-on: https://gerrit.libreoffice.org/54999
Reviewed-by: Michael Meeks 
Tested-by: Luboš Luňák 

diff --git a/unotools/source/i18n/charclass.cxx 
b/unotools/source/i18n/charclass.cxx
index 9e3d184b1490..4be3ad89c3b8 100644
--- a/unotools/source/i18n/charclass.cxx
+++ b/unotools/source/i18n/charclass.cxx
@@ -64,7 +64,7 @@ const LanguageTag& CharClass::getLanguageTag() const
 
 const css::lang::Locale& CharClass::getMyLocale() const
 {
-::osl::MutexGuard aGuard( aMutex );
+// Mutex locked by callers.
 return maLanguageTag.getLocale();
 }
 
@@ -113,8 +113,11 @@ bool CharClass::isAlpha( const OUString& rStr, sal_Int32 
nPos ) const
 try
 {
 if ( xCC.is() )
+{
+::osl::MutexGuard aGuard( aMutex );
 return  (xCC->getCharacterType( rStr, nPos, getMyLocale() ) &
  nCharClassAlphaType) != 0;
+}
 }
 catch ( const Exception& )
 {
@@ -132,8 +135,11 @@ bool CharClass::isLetter( const OUString& rStr, sal_Int32 
nPos ) const
 try
 {
 if ( xCC.is() )
+{
+::osl::MutexGuard aGuard( aMutex );
 return  (xCC->getCharacterType( rStr, nPos, getMyLocale() ) &
  nCharClassLetterType) != 0;
+}
 }
 catch ( const Exception& )
 {
@@ -147,7 +153,10 @@ bool CharClass::isLetter( const OUString& rStr ) const
 try
 {
 if ( xCC.is() )
+{
+::osl::MutexGuard aGuard( aMutex );
 return isLetterType( xCC->getStringType( rStr, 0, 
rStr.getLength(), getMyLocale() ) );
+}
 }
 catch ( const Exception& )
 {
@@ -165,8 +174,11 @@ bool CharClass::isDigit( const OUString& rStr, sal_Int32 
nPos ) const
 try
 {
 if ( xCC.is() )
+{
+::osl::MutexGuard aGuard( aMutex );
 return  (xCC->getCharacterType( rStr, nPos, getMyLocale() ) &
  KCharacterType::DIGIT) != 0;
+}
 }
 catch ( const Exception& )
 {
@@ -180,7 +192,10 @@ bool CharClass::isNumeric( const OUString& rStr ) const
 try
 {
 if ( xCC.is() )
+{
+::osl::MutexGuard aGuard( aMutex );
 return isNumericType( xCC->getStringType( rStr, 0, 
rStr.getLength(), getMyLocale() ) );
+}
 }
 catch ( const Exception& )
 {
@@ -198,8 +213,11 @@ bool CharClass::isAlphaNumeric( const OUString& rStr, 
sal_Int32 nPos ) const
 try
 {
 if ( xCC.is() )
+{
+::osl::MutexGuard aGuard( aMutex );
 return  (xCC->getCharacterType( rStr, nPos, getMyLocale() ) &
 (nCharClassAlphaType | KCharacterType::DIGIT)) != 0;
+}
 }
 catch ( const Exception& )
 {
@@ -217,8 +235,11 @@ bool CharClass::isLetterNumeric( const OUString& rStr, 
sal_Int32 nPos ) const
 try
 {
 if ( xCC.is() )
+{
+::osl::MutexGuard aGuard( aMutex );
 return  (xCC->getCharacterType( rStr, nPos, getMyLocale() ) &
  (nCharClassLetterType | KCharacterType::DIGIT)) != 0;
+}
 }
 catch ( const Exception& )
 {
@@ -232,7 +253,10 @@ bool CharClass::isLetterNumeric( const OUString& rStr ) 
const
 try
 {
 if ( xCC.is() )
+{
+::osl::MutexGuard aGuard( aMutex );
 return isLetterNumericType( xCC->getStringType( rStr, 0, 
rStr.getLength(), getMyLocale() ) );
+}
 }
 catch ( const Exception& )
 {
@@ -246,7 +270,10 @@ OUString CharClass::titlecase(const OUString& rStr, 
sal_Int32 nPos, sal_Int32 nC
 try
 {
 if ( xCC.is() )
+{
+::osl::MutexGuard aGuard( aMutex );
 return xCC->toTitle( rStr, nPos, nCount, getMyLocale() );
+}
 }
 catch ( const Exception& )
 {
@@ -260,7 +287,10 @@ OUString CharClass::uppercase( const OUString& rStr, 
sal_Int32 

LibreOffice ESC call, Wed - 18:00 central European (local) time

2018-05-29 Thread Michael Meeks
Hi guys,

NB: - new time for this week ... =)

Prototype agenda below, bug metrics also at the link below;
extra items appreciated as last-week:

https://demo.collaboracloudsuite.com/tdf/

Lets persevere with the jitsi goodness this week too at:

https://meet.jit.si/TDFESC

ATB,

Michael.

* Completed Action Items:

* Pending Action Items:

* Release Engineering update (Christian)
+ 6.0.5 – RC1 – this week.
+ 6.1.0 beta 1 status ...
+ 6.1 late features
+ calc threading default / fixing (Miklos)
   + ongoing – more fixes this week.
+ writer – red-lining re-factoring (Michael S)
+ KDE5 work (Bubli/Thorsten)
+ Help format (Stephan)
+ Renewed the Windows certificate for another year (watch out QA).
+ Remotes
+ iOS remote pending Apple’s approval.
+ Android viewer
+ Online
+ waiting for -6-1 branch.

* Documentation (Olivier)

* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
247(247) (topicUI) bugs open, 315(315) (needsUXEval)
+ Updates:
BZ changes   1 week   1 month3 months   12 months  
 added 1(-2)  7(-7) 33(-5) 103(-5) 
 commented 8(-32)   110(-67)   461(-51)   1890(-64)
   removed 0(0)   0(0)   2(0)   11(0)  
  resolved 2(1)   5(-1) 31(1)  180(0)  
+ top 10 contributors:
  Tietze, Heiko made 46 changes in 1 month, and 813 changes in 1 year
  Pedro made 35 changes in 1 month, and 44 changes in 1 year
  Cor Nouws made 14 changes in 1 month, and 155 changes in 1 year
  Thomas Lendo made 12 changes in 1 month, and 395 changes in 1 year
  Dieter Praas made 10 changes in 1 month, and 141 changes in 1 year
  Xisco Faulí made 8 changes in 1 month, and 330 changes in 1 year
  Foote, V Stuart made 8 changes in 1 month, and 265 changes in 1 year
  Henschel, Regina made 7 changes in 1 month, and 107 changes in 1 year
  Kainz, Andreas made 7 changes in 1 month, and 23 changes in 1 year
  Buovjaga made 7 changes in 1 month, and 191 changes in 1 year

* Crash Reporting (Caolan)
+ 6(-11) import failure, 3(+0) export failures
   + 2 exports – mst layout asserts.
   + fast-parser fix integrated.
+ coverity
+ ?? 6 (+3, -9)
+ forcepoint round 7.
+ ??
+ oss-fuzz ?? (10 outstanding, 9 minor)

* Crash Reporting (Xisco) [ updated 05/May 4pm]
+ http://crashreport.libreoffice.org/stats/version/5.4.5.1 
  + 615 (last 7 days) (+13)
+ http://crashreport.libreoffice.org/stats/version/5.4.6.2 
  + 661 (last 7 days) (-177)
+ http://crashreport.libreoffice.org/stats/version/5.4.7.2
  + 224 (last 7 days) (+222)
+ http://crashreport.libreoffice.org/stats/version/6.0.3.2
  + 1332 (last 7 days) (-132)
+ http://crashreport.libreoffice.org/stats/version/6.0.4.2
  + 1012 (last 7 days) (+440)

* Budget ranking (Thorsten)
   + on ESC share - “Budget2018” - add your ranking.

* GSoC schedule (Heiko)
   + Coding: May 14 - August 6
   + please tell students to send a weekly status upate.
   + Evaluation 1: June 11 - 15
   + Evaluation 2: July 9 - 13
   + Students Submit Code and Final Evaluations: August 6 - 14
   + Mentors Submit Final Evaluations: August 14 - 21
   + Results Announced: August 22
   + https://wiki.documentfoundation.org/Development/GSoC/2018

* Hackfests & Events
+ a hole here – potential one in Switzerland later in the year.

* mentoring/easyhack update
 committer...   1 week 1 month 3 months12 months  
  open  83(10) 138(9)  146(3)   149(3) 
   reviews 578(118)   1719(-11)   4718(-56)   18038(40)
merged 247(15)1039(8) 3497(-77)   13242(66)
 abandoned  13(-2) 135(1)  276(-1)  948(3) 
   own commits 246(-39)   1158(-18)   3604(-62)   13451(-6)
review commits  63(-7) 293(-26)912(-36)3093(-6)
contributor...   1 week 1 month 3 months12 months   
  open  64(32)  94(30)  96(31)  100(31) 
   reviews 842(68)2853(73)8539(-87)   31482(229)
merged  19(-5)  96(-17)409(-29)1729(-11)
 abandoned   2(-12) 31(-11)111(-3)  380(-2) 
   own commits  23(-5) 106(-15)362(-11)1189(22) 
review commits   0(0)0(0)0(0) 0(0)  
+ easyHack statistics:
   needsDevEval 43(43)   needsUXEval 2(2)   cleanup_comments 203(203)   
   total 252(252)   assigned 25(25)   open 180(180)   
+ top 5 contributors:
  Gelmini, Andrea made 53 patches in 1 month, and 363 patches in 1 year
  Sophia Schröder made 8 patches in 1 month, and 45 patches in 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - cui/source cui/uiconfig include/svx include/vcl svx/source vcl/source vcl/unx

2018-05-29 Thread Caolán McNamara
 cui/source/dialogs/colorpicker.cxx |   14 -
 cui/source/inc/transfrm.hxx|   27 +--
 cui/source/tabpages/transfrm.cxx   |  134 -
 cui/uiconfig/ui/rotationtabpage.ui |   86 ---
 include/svx/dialcontrol.hxx|   93 
 include/vcl/customweld.hxx |6 
 include/vcl/weld.hxx   |4 
 svx/source/dialog/charmap.cxx  |4 
 svx/source/dialog/dialcontrol.cxx  |  277 -
 vcl/source/app/salvtables.cxx  |   15 ++
 vcl/unx/gtk3/gtk3gtkinst.cxx   |   15 ++
 11 files changed, 543 insertions(+), 132 deletions(-)

New commits:
commit 94762fbc8dcb3b7fe6d535374915db7e7ab95937
Author: Caolán McNamara 
Date:   Fri May 25 16:54:30 2018 +0100

weld SvxAngleTabPage

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

diff --git a/cui/source/dialogs/colorpicker.cxx 
b/cui/source/dialogs/colorpicker.cxx
index 4fba23b2f7ca..3b182cde641a 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -426,7 +426,7 @@ void ColorFieldControl::ShowPosition( const Point& rPos, 
bool bUpdate )
 
 void ColorFieldControl::MouseButtonDown(const MouseEvent& rMEvt)
 {
-grab_add();
+CaptureMouse();
 mbMouseCaptured = true;
 ShowPosition(rMEvt.GetPosPixel(), true);
 Modify();
@@ -443,7 +443,7 @@ void ColorFieldControl::MouseMove(const MouseEvent& rMEvt)
 
 void ColorFieldControl::MouseButtonUp(const MouseEvent&)
 {
-grab_remove();
+ReleaseMouse();
 mbMouseCaptured = false;
 }
 
@@ -537,14 +537,12 @@ private:
 VclPtr mxBitmap;
 sal_Int16 mnLevel;
 double mdValue;
-bool mbMouseCaptured;
 };
 
 ColorSliderControl::ColorSliderControl()
 : meMode( DefaultMode )
 , mnLevel( 0 )
 , mdValue( -1.0 )
-, mbMouseCaptured(false)
 {
 }
 
@@ -651,15 +649,14 @@ void ColorSliderControl::ChangePosition(long nY)
 
 void ColorSliderControl::MouseButtonDown(const MouseEvent& rMEvt)
 {
-grab_add();
-mbMouseCaptured = true;
+CaptureMouse();
 ChangePosition(rMEvt.GetPosPixel().Y());
 Modify();
 }
 
 void ColorSliderControl::MouseMove(const MouseEvent& rMEvt)
 {
-if (mbMouseCaptured)
+if (IsMouseCaptured())
 {
 ChangePosition(rMEvt.GetPosPixel().Y());
 Modify();
@@ -668,8 +665,7 @@ void ColorSliderControl::MouseMove(const MouseEvent& rMEvt)
 
 void ColorSliderControl::MouseButtonUp(const MouseEvent&)
 {
-grab_remove();
-mbMouseCaptured = false;
+ReleaseMouse();
 }
 
 void ColorSliderControl::Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle&)
diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx
index 7e7aa264f91b..9dccd2663241 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -175,15 +175,6 @@ class SvxAngleTabPage : public SvxTabPage
 static const sal_uInt16 pAngleRanges[];
 
 private:
-VclPtrm_pFlPosition;
-VclPtr m_pMtrPosX;
-VclPtr m_pMtrPosY;
-VclPtr  m_pCtlRect;
-
-VclPtrm_pFlAngle;
-VclPtrm_pNfAngle;
-VclPtrm_pCtlAngle;
-
 const SfxItemSet&   rOutAttrs;
 const SdrView*  pView;
 
@@ -194,10 +185,20 @@ private:
 MapUnit ePoolUnit;
 FieldUnit   eDlgUnit;
 
+svx::SvxDialControl m_aCtlAngle;
+RectCtl m_aCtlRect;
+
+std::unique_ptr m_xFlPosition;
+std::unique_ptr m_xMtrPosX;
+std::unique_ptr m_xMtrPosY;
+std::unique_ptr m_xCtlRect;
+std::unique_ptr m_xFlAngle;
+std::unique_ptr m_xNfAngle;
+std::unique_ptr m_xCtlAngle;
+
 public:
- SvxAngleTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs  );
+SvxAngleTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
 virtual ~SvxAngleTabPage() override;
-virtual void dispose() override;
 
 static VclPtr Create( TabPageParent, const SfxItemSet* );
 static const sal_uInt16*  GetRanges() { return pAngleRanges; }
@@ -208,8 +209,8 @@ public:
 virtual void ActivatePage( const SfxItemSet& rSet ) override;
 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 
-virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override;
-virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) 
override;
+virtual void PointChanged(weld::DrawingArea* pWindow, RectPoint eRP) 
override;
+virtual void PointChanged(vcl::Window* pWindow, RectPoint eRP) override;
 
 void Construct();
 void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index b37d366f2f0b..cf3bc446a78e 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -173,57 +173,43 @@ void 

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

2018-05-29 Thread Caolán McNamara
 vcl/source/app/salvtables.cxx |   22 ++
 1 file changed, 22 insertions(+)

New commits:
commit 096692d397b086775d68a29a905d8883184b70a4
Author: Caolán McNamara 
Date:   Mon May 28 17:29:17 2018 +0100

toggle should trigger only through ui

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

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 2c6fdac648ae..1579aae20222 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -991,6 +991,7 @@ class SalInstanceRadioButton : public SalInstanceButton, 
public virtual weld::Ra
 {
 private:
 VclPtr<::RadioButton> m_xRadioButton;
+bool m_bBlockNotify;
 
 DECL_LINK(ToggleHdl, ::RadioButton&, void);
 
@@ -998,13 +999,16 @@ public:
 SalInstanceRadioButton(::RadioButton* pButton, bool bTakeOwnership)
 : SalInstanceButton(pButton, bTakeOwnership)
 , m_xRadioButton(pButton)
+, m_bBlockNotify(false)
 {
 m_xRadioButton->SetToggleHdl(LINK(this, SalInstanceRadioButton, 
ToggleHdl));
 }
 
 virtual void set_active(bool active) override
 {
+m_bBlockNotify = true;
 m_xRadioButton->Check(active);
+m_bBlockNotify = false;
 }
 
 virtual bool get_active() const override
@@ -1030,6 +1034,8 @@ public:
 
 IMPL_LINK_NOARG(SalInstanceRadioButton, ToggleHdl, ::RadioButton&, void)
 {
+if (m_bBlockNotify)
+return;
 signal_toggled();
 }
 
@@ -1037,6 +1043,7 @@ class SalInstanceToggleButton : public SalInstanceButton, 
public virtual weld::T
 {
 private:
 VclPtr m_xToggleButton;
+bool m_bBlockNotify;
 
 DECL_LINK(ToggleListener, VclWindowEvent&, void);
 
@@ -1044,6 +1051,7 @@ public:
 SalInstanceToggleButton(PushButton* pButton, bool bTakeOwnership)
 : SalInstanceButton(pButton, bTakeOwnership)
 , m_xToggleButton(pButton)
+, m_bBlockNotify(false)
 {
 }
 
@@ -1056,7 +1064,9 @@ public:
 
 virtual void set_active(bool active) override
 {
+m_bBlockNotify = true;
 m_xToggleButton->Check(active);
+m_bBlockNotify = false;
 }
 
 virtual bool get_active() const override
@@ -1066,7 +1076,9 @@ public:
 
 virtual void set_inconsistent(bool inconsistent) override
 {
+m_bBlockNotify = false;
 m_xToggleButton->SetState(inconsistent ? TRISTATE_INDET : 
TRISTATE_FALSE);
+m_bBlockNotify = true;
 }
 
 virtual bool get_inconsistent() const override
@@ -1083,6 +1095,8 @@ public:
 
 IMPL_LINK(SalInstanceToggleButton, ToggleListener, VclWindowEvent&, rEvent, 
void)
 {
+if (m_bBlockNotify)
+return;
 if (rEvent.GetId() == VclEventId::PushbuttonToggle)
 signal_toggled();
 }
@@ -1091,19 +1105,23 @@ class SalInstanceCheckButton : public 
SalInstanceButton, public virtual weld::Ch
 {
 private:
 VclPtr m_xCheckButton;
+bool m_bBlockNotify;
 
 DECL_LINK(ToggleHdl, CheckBox&, void);
 public:
 SalInstanceCheckButton(CheckBox* pButton, bool bTakeOwnership)
 : SalInstanceButton(pButton, bTakeOwnership)
 , m_xCheckButton(pButton)
+, m_bBlockNotify(false)
 {
 m_xCheckButton->SetToggleHdl(LINK(this, SalInstanceCheckButton, 
ToggleHdl));
 }
 
 virtual void set_active(bool active) override
 {
+m_bBlockNotify = true;
 m_xCheckButton->Check(active);
+m_bBlockNotify = false;
 }
 
 virtual bool get_active() const override
@@ -1113,7 +1131,9 @@ public:
 
 virtual void set_inconsistent(bool inconsistent) override
 {
+m_bBlockNotify = true;
 m_xCheckButton->SetState(inconsistent ? TRISTATE_INDET : 
TRISTATE_FALSE);
+m_bBlockNotify = false;
 }
 
 virtual bool get_inconsistent() const override
@@ -1129,6 +1149,8 @@ public:
 
 IMPL_LINK_NOARG(SalInstanceCheckButton, ToggleHdl, CheckBox&, void)
 {
+if (m_bBlockNotify)
+return;
 signal_toggled();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/source

2018-05-29 Thread Luboš Luňák
 sc/source/core/tool/editutil.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit fb32f28a2b7f0c33533592b855ead127b858040c
Author: Luboš Luňák 
Date:   Tue May 29 10:00:31 2018 +0200

avoid using EditEngine in ScEditUtils::GetString() if possible

According to 1ecdc7aaf66 it is really needed only for resolving fields,
so if there's no field, simply concatenate the contents, as used to
be the case before that commit. This should be faster and also safer
in the case of Calc's threading enabled.

Change-Id: I23a2e1873deb8538e2a1ae0dd80af7e5356c18a5
Reviewed-on: https://gerrit.libreoffice.org/54986
Reviewed-by: Michael Meeks 
Tested-by: Jenkins 

diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index d05cac306c86..b40764739a48 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -112,6 +112,9 @@ OUString ScEditUtil::GetMultilineString( const 
EditTextObject& rEdit )
 
 OUString ScEditUtil::GetString( const EditTextObject& rEditText, const 
ScDocument* pDoc )
 {
+if( !rEditText.HasField())
+return GetMultilineString( rEditText );
+
 static osl::Mutex aMutex;
 osl::MutexGuard aGuard( aMutex);
 // ScFieldEditEngine is needed to resolve field contents.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - loleaflet/src wsd/LOOLWSD.cpp

2018-05-29 Thread Pranav Kant
 loleaflet/src/control/Control.AlertDialog.js |   13 -
 loleaflet/src/layer/tile/TileLayer.js|5 -
 wsd/LOOLWSD.cpp  |6 +-
 3 files changed, 9 insertions(+), 15 deletions(-)

New commits:
commit 309e53cba404301407ef5b1851c52090565fd7f2
Author: Pranav Kant 
Date:   Mon May 28 16:33:04 2018 +0530

loleaflet: Open pdf file in new tab instead of asking to download

new parameter to download POST requests, ?attachment=0 to instruct wsd
to not set the Content-Disposition header.

Change-Id: Id7694d940e1b4d616263ad720d29f1474164eb68
Reviewed-on: https://gerrit.libreoffice.org/54919
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/src/control/Control.AlertDialog.js 
b/loleaflet/src/control/Control.AlertDialog.js
index 1d9b9e48c..a87b494f3 100644
--- a/loleaflet/src/control/Control.AlertDialog.js
+++ b/loleaflet/src/control/Control.AlertDialog.js
@@ -8,7 +8,6 @@ L.Control.AlertDialog = L.Control.extend({
// TODO: Better distinction between warnings and errors
map.on('error', this._onError, this);
map.on('warn', this._onError, this);
-   map.on('print', this._onPrint, this);
},
 
_onError: function(e) {
@@ -33,18 +32,6 @@ L.Control.AlertDialog = L.Control.extend({
 
// Remember the current dialog ID to close it later.
vex.dialogID = vex.globalID - 1;
-   },
-
-   _onPrint: function (e) {
-   var url = e.url;
-   vex.dialog.confirm({
-   message: _('Download PDF export?'),
-   callback: L.bind(function (value) {
-   if (value) {
-   this._map._fileDownloader.src = url;
-   }
-   }, this)
-   });
}
 });
 
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 49aa853c6..ebf953302 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -560,7 +560,10 @@ L.TileLayer = L.GridLayer.extend({
if (command.id === 'print') {
if (L.Browser.gecko || L.Browser.edge || 
this._map.options.print === false) {
// the print dialog doesn't work well on firefox
-   this._map.fire('print', {url: url});
+   // due to a pdf.js issue - 
https://github.com/mozilla/pdf.js/issues/5397
+   // open the pdf file in a new tab so that that 
user can print it directly in the browser's
+   // pdf viewer
+   window.open(url + '?attachment=0', '_blank');
}
else {
this._map.fire('filedownloadready', {url: url});
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 4831aea33..3b645fe8f 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2166,11 +2166,15 @@ private:
 LOG_INF("HTTP request for: " << filePath.toString());
 if (filePath.isAbsolute() && File(filePath).exists())
 {
+int serveAsAttachment = 1;
+if (tokens.count() >= 7)
+getTokenInteger(tokens[6], "attachment", 
serveAsAttachment);
+
 // Instruct browsers to download the file, not display it
 // with the exception of SVG where we need the browser to
 // actually show it.
 std::string contentType = getContentType(fileName);
-if (contentType != "image/svg+xml")
+if (serveAsAttachment != 0 && contentType != "image/svg+xml")
 response.set("Content-Disposition", "attachment; 
filename=\"" + fileName + "\"");
 
 try
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - wsd/FileServer.cpp

2018-05-29 Thread Andras Timar
 wsd/FileServer.cpp |   18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

New commits:
commit 3cdb93b72c827472a10998d87f4816578c10db5a
Author: Andras Timar 
Date:   Fri May 18 09:48:07 2018 +0200

serve files with old gith hash in their path, that comes from cached 
discovery.xml

Change-Id: I157a410df0a90f9ab151b899e44566b95cbd9929
Reviewed-on: https://gerrit.libreoffice.org/54557
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 378578c56..9c9ae5489 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -270,6 +271,13 @@ void FileServerRequestHandler::handleRequest(const 
HTTPRequest& request, Poco::M
 LOG_TRC("Fileserver request: " << requestUri.toString());
 requestUri.normalize(); // avoid .'s and ..'s
 
+std::string path(requestUri.getPath());
+if (path.find("loleaflet/" LOOLWSD_VERSION_HASH "/") == 
std::string::npos)
+{
+LOG_WRN("client - server version mismatch, disabling browser 
cache.");
+noCache = true;
+}
+
 std::vector requestSegments;
 requestUri.getPathSegments(requestSegments);
 const std::string relPath = getRequestPathname(request);
@@ -540,9 +548,13 @@ std::string 
FileServerRequestHandler::getRequestPathname(const HTTPRequest& requ
 requestUri.normalize();
 
 std::string path(requestUri.getPath());
-
-// Convert version back to a real file name.
-Poco::replaceInPlace(path, std::string("/loleaflet/" LOOLWSD_VERSION_HASH 
"/"), std::string("/loleaflet/dist/"));
+Poco::RegularExpression gitHashRe("/([0-9a-f]+)/");
+std::string gitHash;
+if (gitHashRe.extract(path, gitHash))
+{
+// Convert version back to a real file name.
+Poco::replaceInPlace(path, std::string("/loleaflet" + gitHash), 
std::string("/loleaflet/dist/"));
+}
 
 return path;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - config_host.mk.in configure.ac download.lst extras/CustomTarget_opensymbol.mk extras/Module_extras.mk extras/Package_fonts.mk extras/source Makefile.fetch

2018-05-29 Thread Rene Engelhard
 Makefile.fetch|3 ++-
 config_host.mk.in |2 ++
 configure.ac  |   27 ++-
 dev/null  |binary
 download.lst  |1 +
 extras/CustomTarget_opensymbol.mk |   23 +++
 extras/Module_extras.mk   |4 
 extras/Package_fonts.mk   |6 --
 8 files changed, 62 insertions(+), 4 deletions(-)

New commits:
commit 4c63572b2ca9648aeebe6df6f71da1308dbd5ac1
Author: Rene Engelhard 
Date:   Wed May 23 17:30:04 2018 +0200

micro-optimization: do not check for ant if we don't need it

Change-Id: I84644cddd8a318a2af23780ada9afc26fe23a9fe
Reviewed-on: https://gerrit.libreoffice.org/54719
Tested-by: Jenkins 
Tested-by: Rene Engelhard 
Reviewed-by: Rene Engelhard 

diff --git a/configure.ac b/configure.ac
index f45d8fde9866..b730bd2870ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8503,6 +8503,7 @@ if test "$with_java" != "no"; then
 AC_MSG_RESULT([internal])
 SYSTEM_HSQLDB=
 BUILD_TYPE="$BUILD_TYPE HSQLDB"
+NEED_ANT=TRUE
 AC_MSG_CHECKING([whether hsqldb should be built with JDBC 4.1])
 javanumver=`$JAVAINTERPRETER -version 2>&1 | $AWK -v num=true -f 
$SRC_ROOT/solenv/bin/getcompver.awk`
 if expr "$javanumver" '>=' 00010006 > /dev/null; then
@@ -10617,6 +10618,7 @@ if test "$enable_report_builder" != "no" -a 
"$with_java" != "no"; then
 AC_MSG_RESULT([internal])
 SYSTEM_JFREEREPORT=
 BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
+NEED_ANT=TRUE
 fi
 else
 AC_MSG_RESULT([no])
@@ -10660,6 +10662,7 @@ if test "$ENABLE_REPORTBUILDER" = "TRUE"; then
 AC_MSG_RESULT([internal])
 SYSTEM_APACHE_COMMONS=
 BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS"
+NEED_ANT=TRUE
 fi
 fi
 AC_SUBST(SYSTEM_APACHE_COMMONS)
@@ -10722,6 +10725,7 @@ if test "${enable_scripting_javascript}" != "no" -a 
"x$with_java" != "xno"; then
 AC_MSG_RESULT([internal])
 SYSTEM_RHINO=
 BUILD_TYPE="$BUILD_TYPE RHINO"
+NEED_ANT=TRUE
 fi
 else
 AC_MSG_RESULT([no])
@@ -11650,7 +11654,7 @@ dnl 
===
 dnl Test for the presence of Ant and that it works
 dnl ===
 
-if test "$ENABLE_JAVA" != ""; then
+if test "$ENABLE_JAVA" != "" -a "$NEED_ANT" = "TRUE"; then
 ANT_HOME=; export ANT_HOME
 WITH_ANT_HOME=; export WITH_ANT_HOME
 if test -z "$with_ant_home" -a -n "$LODE_HOME" ; then
commit f54478ccfa8f4d2dc0289eec37a3191c922ce627
Author: Rene Engelhard 
Date:   Mon May 28 16:54:41 2018 +0200

add --enable-build-opensymbol option to build opens___.ttf from source

... and handle opens___.ttf like unowinreg.dll
(-> download.lst/$(TARFILE_LOCATION))

Change-Id: Id4723fb15c4b4b04133dedf97b1262441baa4756
Reviewed-on: https://gerrit.libreoffice.org/54938
Tested-by: Rene Engelhard 
Tested-by: Jenkins 
Reviewed-by: Rene Engelhard 

diff --git a/Makefile.fetch b/Makefile.fetch
index fce291d2c3ac..44f5031aac4a 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -52,7 +52,7 @@ $(filter 32,$(words $(shell echo $(1) | sed -e 's/./& /g')))
 endef
 
 define fetch_Download__subst_var
-$(subst _DLL,_SHA256SUM,$(subst _TARBALL,_SHA256SUM,$(subst 
_PACK,_SHA256SUM,$(subst _JAR,_SHA256SUM,$(1)
+$(subst _TTF,_SHA256SUM,$(subst _DLL,_SHA256SUM,$(subst 
_TARBALL,_SHA256SUM,$(subst _PACK,_SHA256SUM,$(subst _JAR,_SHA256SUM,$(1))
 endef
 
 # fetch_Download_item url variable-name
@@ -224,6 +224,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk 
$(SRCDIR)/download.lst $(S
,$(call 
fetch_Download_item,https://dev-www.libreoffice.org/src,$(item)))
$(foreach item, \
$(call fetch_Optional,ODK,UNOWINREG_DLL) \
+   $(call fetch_Optional,OPENSYMBOL,OPENSYMBOL_TTF) \
$(call fetch_Optional,ODFVALIDATOR,ODFVALIDATOR_JAR) \
$(call fetch_Optional,OFFICEOTRON,OFFICEOTRON_JAR) \
,$(call 
fetch_Download_item,https://dev-www.libreoffice.org/extern,$(item)))
diff --git a/config_host.mk.in b/config_host.mk.in
index 4a864c745424..0e3ba4864755 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -188,6 +188,7 @@ export FLEX=@FLEX@
 export FLUTE_JAR=@FLUTE_JAR@
 export FONTCONFIG_CFLAGS=$(gb_SPACE)@FONTCONFIG_CFLAGS@
 export FONTCONFIG_LIBS=$(gb_SPACE)@FONTCONFIG_LIBS@
+export FONTFORGE=@FONTFORGE@
 export FREEHAND_CFLAGS=$(gb_SPACE)@FREEHAND_CFLAGS@
 export FREEHAND_LIBS=$(gb_SPACE)@FREEHAND_LIBS@
 export FREETYPE_CFLAGS=$(gb_SPACE)@FREETYPE_CFLAGS@
@@ -432,6 +433,7 @@ export OOO_JUNIT_JAR=@OOO_JUNIT_JAR@
 export OOO_VENDOR=@OOO_VENDOR@
 export OPENSSL_CFLAGS=$(gb_SPACE)@OPENSSL_CFLAGS@
 export OPENSSL_LIBS=$(gb_SPACE)@OPENSSL_LIBS@
+export OPENSYMBOL_TTF=@OPENSYMBOL_TTF@
 export 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sc/qa

2018-05-29 Thread Miklos Vajna
 sc/qa/uitest/calc_tests/tdf53482.py |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 2963892215398615fb459eb108b8cb52a4776c2e
Author: Miklos Vajna 
Date:   Fri May 25 21:31:47 2018 +0200

UITest_calc_tests: disable randomly failing assert for now

make -sr UITest_calc_tests

UITEST_TEST_NAME="tdf53482.tdf53482.test_tdf53482_Range_contains_column_headings_file"

passed for me 10 times in a row without problems after this, while 'make
check' randomly fails here & there since the introduction of this test.

(cherry picked from commit 27cc0064a8a52c9000d0249581e80fe7a0c8a7b6)

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

diff --git a/sc/qa/uitest/calc_tests/tdf53482.py 
b/sc/qa/uitest/calc_tests/tdf53482.py
index 33ffa71d6283..ff23eb8105e2 100644
--- a/sc/qa/uitest/calc_tests/tdf53482.py
+++ b/sc/qa/uitest/calc_tests/tdf53482.py
@@ -49,7 +49,8 @@ class tdf53482(UITestCase):
 self.ui_test.close_dialog_through_button(xOK)
 #6. Expected behavior:  Ignore column labels when sorting
 self.assertEqual(get_cell_by_position(document, 0, 6, 7).getString(), 
"Occupation")
-self.assertEqual(get_cell_by_position(document, 0, 6, 8).getString(), 
"Travel Industry")
+# FIXME this fails randomly, e.g. travel Industry or ttavel Industry.
+#self.assertEqual(get_cell_by_position(document, 0, 6, 8).getString(), 
"Travel Industry")
 self.assertEqual(get_cell_by_position(document, 0, 6, 
123).getString(), "13")
 
 self.ui_test.close_doc()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3-desktop' - sw/inc sw/source

2018-05-29 Thread Mike Kaganski
 sw/inc/view.hxx  |1 +
 sw/source/uibase/app/applab.cxx  |3 +++
 sw/source/uibase/uiview/view.cxx |   26 ++
 3 files changed, 18 insertions(+), 12 deletions(-)

New commits:
commit 2a7ab376ffeeed07a2ae282033c65b568c56a08a
Author: Mike Kaganski 
Date:   Fri May 25 16:05:12 2018 +0300

tdf#115386: Show Mail Merge toolbar for new labels

Change-Id: I26ec6c7fdfa5b6f6f818927fd9ede00184dc5e8c
Reviewed-on: https://gerrit.libreoffice.org/54813
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/54962
Tested-by: Mike Kaganski 

diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index a54c6d8e7935..965177c3ebf5 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -645,6 +645,7 @@ public:
 const OUString& GetRedlineAuthor();
 /// See SfxViewShell::NotifyCursor().
 void NotifyCursor(SfxViewShell* pViewShell) const override;
+void ShowUIElement(const OUString& sElementURL) const;
 };
 
 inline long SwView::GetXScroll() const
diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx
index c15fa2e7ea81..27c9be51b57a 100644
--- a/sw/source/uibase/app/applab.cxx
+++ b/sw/source/uibase/app/applab.cxx
@@ -388,6 +388,9 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel)
 if (pFirstFlyFormat)
 pSh->GotoFly(pFirstFlyFormat->GetName(), FLYCNTTYPE_ALL, 
false);
 
+if (pSh->IsAnyDatabaseFieldInDoc())
+
pSh->GetView().ShowUIElement("private:resource/toolbar/mailmerge");
+
 pSh->EndAllAction();
 pSh->DoUndo();
 }
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 2e241fc01555..fd63a262cbd0 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -243,6 +243,19 @@ uno::Reference 
getLayoutManager(const SfxViewFrame& rView
 }
 }
 
+void SwView::ShowUIElement(const OUString& sElementURL) const
+{
+auto xLayoutManager = getLayoutManager(*GetViewFrame());
+if (xLayoutManager.is())
+{
+if (!xLayoutManager->getElement(sElementURL).is())
+{
+xLayoutManager->createElement(sElementURL);
+xLayoutManager->showElement(sElementURL);
+}
+}
+}
+
 void SwView::SelectShell()
 {
 // Attention: Maintain the SelectShell for the WebView additionally
@@ -450,18 +463,7 @@ void SwView::SelectShell()
 
 // Show Mail Merge toolbar initially for documents with Database fields
 if (!m_bInitOnceCompleted && GetWrtShell().IsAnyDatabaseFieldInDoc())
-{
-auto xLayoutManager = getLayoutManager(*GetViewFrame());
-if (xLayoutManager.is())
-{
-const OUString 
sResourceURL("private:resource/toolbar/mailmerge");
-if (!xLayoutManager->getElement(sResourceURL).is())
-{
-xLayoutManager->createElement(sResourceURL);
-xLayoutManager->showElement(sResourceURL);
-}
-}
-}
+ShowUIElement("private:resource/toolbar/mailmerge");
 
 // Activate the toolbar to the new selection which also was active 
last time.
 // Before a flush () must be, but does not affect the UI according to 
MBA and
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svx/source

2018-05-29 Thread Noel Grandin
 svx/source/fmcomp/gridcell.cxx |   14 +++---
 svx/source/inc/gridcell.hxx|6 +++---
 2 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 0611e0643101c9282934de872249b438bd1a7f53
Author: Noel Grandin 
Date:   Thu May 17 15:39:53 2018 +0200

loplugin:useuniqueptr in DbTextField

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

diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 8767b3efb0b5..deff8c93ffd8 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1060,8 +1060,8 @@ DbTextField::DbTextField(DbGridColumn& _rColumn)
 
 DbTextField::~DbTextField( )
 {
-DELETEZ( m_pPainterImplementation );
-DELETEZ( m_pEdit );
+m_pPainterImplementation.reset();
+m_pEdit.reset();
 }
 
 
@@ -1102,18 +1102,18 @@ void DbTextField::Init( vcl::Window& rParent, const 
Reference< XRowSet >& xCurso
 if ( bIsMultiLine )
 {
 m_pWindow = VclPtr::Create( , nStyle );
-m_pEdit = new MultiLineEditImplementation( *static_cast< 
MultiLineTextCell* >( m_pWindow.get() ) );
+m_pEdit.reset(new MultiLineEditImplementation( *static_cast< 
MultiLineTextCell* >( m_pWindow.get() ) ));
 
 m_pPainter = VclPtr::Create( , nStyle );
-m_pPainterImplementation = new MultiLineEditImplementation( 
*static_cast< MultiLineTextCell* >( m_pPainter.get() ) );
+m_pPainterImplementation.reset(new MultiLineEditImplementation( 
*static_cast< MultiLineTextCell* >( m_pPainter.get() ) ));
 }
 else
 {
 m_pWindow = VclPtr::Create( , nStyle );
-m_pEdit = new EditImplementation( *static_cast< Edit* >( 
m_pWindow.get() ) );
+m_pEdit.reset(new EditImplementation( *static_cast< Edit* >( 
m_pWindow.get() ) ));
 
 m_pPainter = VclPtr::Create( , nStyle );
-m_pPainterImplementation = new EditImplementation( *static_cast< Edit* 
>( m_pPainter.get() ) );
+m_pPainterImplementation.reset(new EditImplementation( *static_cast< 
Edit* >( m_pPainter.get() ) ));
 }
 
 if ( WB_LEFT == nStyle )
@@ -1135,7 +1135,7 @@ void DbTextField::Init( vcl::Window& rParent, const 
Reference< XRowSet >& xCurso
 
 CellControllerRef DbTextField::CreateController() const
 {
-return new EditCellController( m_pEdit );
+return new EditCellController( m_pEdit.get() );
 }
 
 
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index 7574d90dbac2..1368e9a19a66 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -377,8 +377,8 @@ protected:
 
 class DbTextField : public DbLimitedLengthField
 {
-::svt::IEditImplementation* m_pEdit;
-::svt::IEditImplementation* m_pPainterImplementation;
+std::unique_ptr<::svt::IEditImplementation> m_pEdit;
+std::unique_ptr<::svt::IEditImplementation> m_pPainterImplementation;
 boolm_bIsSimpleEdit;
 
 protected:
@@ -387,7 +387,7 @@ protected:
 public:
 DbTextField(DbGridColumn& _rColumn);
 
-::svt::IEditImplementation* GetEditImplementation() { return m_pEdit; }
+::svt::IEditImplementation* GetEditImplementation() { return 
m_pEdit.get(); }
 boolIsSimpleEdit() const { return m_bIsSimpleEdit; }
 
 virtual void Init( vcl::Window& rParent, const css::uno::Reference< 
css::sdbc::XRowSet >& xCursor ) override;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/inc vcl/quartz vcl/source vcl/unx vcl/win

2018-05-29 Thread Stephan Bergmann
 vcl/inc/sft.hxx |   36 ++--
 vcl/quartz/salgdi.cxx   |4 -
 vcl/quartz/salgdicommon.cxx |6 +-
 vcl/source/font/font.cxx|2 
 vcl/source/fontsubset/fontsubset.cxx|4 -
 vcl/source/fontsubset/sft.cxx   |   79 ++--
 vcl/source/fontsubset/ttcr.cxx  |   22 +++
 vcl/source/fontsubset/ttcr.hxx  |8 +-
 vcl/source/gdi/embeddedfontshelper.cxx  |2 
 vcl/unx/generic/fontmanager/fontmanager.cxx |8 +-
 vcl/unx/generic/print/glyphset.cxx  |4 -
 vcl/win/gdi/salfont.cxx |   14 ++--
 12 files changed, 95 insertions(+), 94 deletions(-)

New commits:
commit d4992bb36efb15da91a70e86e68a80f13b97e947
Author: Stephan Bergmann 
Date:   Tue May 29 12:00:11 2018 +0200

Change SFErrCodes to scoped enum

Change-Id: Ib2f267397e419e8164bb2d732f7cbcca7acad1a6
Reviewed-on: https://gerrit.libreoffice.org/54996
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx
index 1888f8bf79f6..c4bdee9f2a76 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -61,16 +61,16 @@ namespace vcl
 /*@}*/
 
 /** Return value of OpenTTFont() and CreateT3FromTTGlyphs() */
-enum SFErrCodes {
-SF_OK,  /**< no error  
   */
-SF_BADFILE, /**< file not found
   */
-SF_FILEIO,  /**< file I/O error
   */
-SF_MEMORY,  /**< memory allocation error   
   */
-SF_GLYPHNUM,/**< incorrect number of glyphs
   */
-SF_BADARG,  /**< incorrect arguments   
   */
-SF_TTFORMAT,/**< incorrect TrueType font 
format   */
-SF_TABLEFORMAT, /**< incorrect format of a 
TrueType table */
-SF_FONTNO   /**< incorrect logical font number 
of a TTC font  */
+enum class SFErrCodes {
+Ok,  /**< no error 
*/
+BadFile, /**< file not found   
*/
+FileIo,  /**< file I/O error   
*/
+Memory,  /**< memory allocation error  
*/
+GlyphNum,/**< incorrect number of glyphs   
*/
+BadArg,  /**< incorrect arguments  
*/
+TtFormat,/**< incorrect TrueType font format   
*/
+TableFormat, /**< incorrect format of a TrueType 
table */
+FontNo   /**< incorrect logical font number of 
a TTC font  */
 };
 
 #ifndef FW_THIN /* WIN32 compilation would conflict */
@@ -213,7 +213,7 @@ namespace vcl
  * @return value of SFErrCodes enum
  * @ingroup sft
  */
-int VCL_DLLPUBLIC OpenTTFontBuffer(const void* pBuffer, sal_uInt32 nLen, 
sal_uInt32 facenum, TrueTypeFont** ttf);
+SFErrCodes VCL_DLLPUBLIC OpenTTFontBuffer(const void* pBuffer, sal_uInt32 
nLen, sal_uInt32 facenum, TrueTypeFont** ttf);
 #if !defined(_WIN32)
 /**
  * TrueTypeFont constructor.
@@ -226,7 +226,7 @@ namespace vcl
  * @return value of SFErrCodes enum
  * @ingroup sft
  */
-int VCL_DLLPUBLIC OpenTTFontFile(const char *fname, sal_uInt32 facenum, 
TrueTypeFont** ttf);
+SFErrCodes VCL_DLLPUBLIC OpenTTFontFile(const char *fname, sal_uInt32 
facenum, TrueTypeFont** ttf);
 #endif
 
 bool VCL_DLLPUBLIC getTTCoverage(
@@ -326,7 +326,7 @@ namespace vcl
  * @ingroup sft
  *
  */
-int  CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char 
*fname, sal_uInt16 const *glyphArray, sal_uInt8 *encoding, int nGlyphs, int 
wmode);
+SFErrCodes CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char 
*fname, sal_uInt16 const *glyphArray, sal_uInt8 *encoding, int nGlyphs, int 
wmode);
 
 /**
  * Generates a new TrueType font and dumps it to outf file.
@@ -345,7 +345,7 @@ namespace vcl
  * @ingroup sft
  *
  */
-int  CreateTTFromTTGlyphs(TrueTypeFont  *ttf,
+SFErrCodes CreateTTFromTTGlyphs(TrueTypeFont  *ttf,
   const char*fname,
   sal_uInt16 const *glyphArray,
   sal_uInt8 const *encoding,
@@ -363,15 +363,15 @@ namespace vcl
  *the glyphID glyphArray[i]. Character code 0 usually 
points to a default
  *glyph (glyphID 0)
  * @param nGlyphs number of glyph IDs in glyphArray and encoding values in 

[Libreoffice-commits] core.git: extensions/source

2018-05-29 Thread Tor Lillqvist
 extensions/source/ole/unoobjw.cxx |  124 ++
 1 file changed, 124 insertions(+)

New commits:
commit 52eb78c8d2c9954733d95326922462a820d9f0dd
Author: Tor Lillqvist 
Date:   Tue Feb 13 18:37:28 2018 +0200

Handle DISPID_NEWENUM

We get that when an Automation client wants to enumerate an object
that is a collection. We need to create an IEnumVARIANT object and
return it (as an IUnknown).

I wasted days on trying to implement this IEnumVARIANT object using
the same twisty maze of helpers, wrappers, UNO conversion utilities,
etc as used for the other stuff here. The other objects have both UNO
and OLE personalities. Could not figure out how to do it.

Then I decided to just do it brute force, following some sample code,
not bothering with any UNO personality at all for the IEnumVARIANT
thing, and it worked right away.

Change-Id: I6a175ea80b75d48d2f0b793f143f3a84715522c1
Reviewed-on: https://gerrit.libreoffice.org/54994
Tested-by: Jenkins 
Reviewed-by: Tor Lillqvist 

diff --git a/extensions/source/ole/unoobjw.cxx 
b/extensions/source/ole/unoobjw.cxx
index 0d012daa2bed..376496e005c8 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -24,6 +24,10 @@
 #include 
 #include 
 
+#include 
+#include 
+#include 
+
 #include 
 #include 
 #include 
@@ -36,6 +40,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -1040,6 +1046,92 @@ HRESULT InterfaceOleWrapper::doSetProperty( DISPPARAMS * 
/*pdispparams*/, VARIAN
 return ret;
 }
 
+class CXEnumVariant : public IEnumVARIANT,
+  public CComObjectRoot
+{
+public:
+CXEnumVariant()
+{
+}
+
+~CXEnumVariant()
+{
+}
+
+BEGIN_COM_MAP(CXEnumVariant)
+COM_INTERFACE_ENTRY(IEnumVARIANT)
+END_COM_MAP()
+
+DECLARE_NOT_AGGREGATABLE(CXEnumVariant)
+
+// Creates and intializes the enumerator
+void Init(InterfaceOleWrapper* pInterfaceOleWrapper,
+  const Reference< XEnumeration > xEnumeration)
+{
+mpInterfaceOleWrapper = pInterfaceOleWrapper;
+mxEnumeration = xEnumeration;
+}
+
+// IEnumVARIANT
+virtual HRESULT STDMETHODCALLTYPE Clone(IEnumVARIANT **ppEnum) override
+{
+(void) ppEnum;
+return E_NOTIMPL;
+}
+
+virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt,
+   VARIANT *rgVar,
+   ULONG *pCeltFetched) override
+{
+if (pCeltFetched)
+*pCeltFetched = 0;
+
+if (celt == 0)
+return E_INVALIDARG;
+
+if (rgVar == NULL || (celt != 1 && pCeltFetched == NULL))
+return E_FAIL;
+
+for (ULONG i = 0; i < celt; i++)
+VariantInit([i]);
+
+while (celt > 0)
+{
+   if (!mxEnumeration->hasMoreElements())
+return S_FALSE;
+Any aElement = mxEnumeration->nextElement();
+mpInterfaceOleWrapper->anyToVariant(rgVar, aElement);
+// rgVar->pdispVal->AddRef(); ??
+if (pCeltFetched)
+(*pCeltFetched)++;
+rgVar++;
+celt--;
+}
+return S_OK;
+}
+
+virtual HRESULT STDMETHODCALLTYPE Reset() override
+{
+return E_NOTIMPL;
+}
+
+virtual HRESULT STDMETHODCALLTYPE STDMETHODCALLTYPE Skip(ULONG celt) 
override
+{
+while (celt > 0)
+{
+if (!mxEnumeration->hasMoreElements())
+return S_FALSE;
+mxEnumeration->nextElement();
+celt--;
+}
+return S_OK;
+}
+
+private:
+InterfaceOleWrapper* mpInterfaceOleWrapper;
+Reference mxEnumeration;
+};
+
 HRESULT InterfaceOleWrapper::InvokeGeneral( DISPID dispidMember, unsigned 
short wFlags,
  DISPPARAMS * pdispparams, VARIANT * pvarResult, 
EXCEPINFO * pexcepinfo,
  unsigned int * /*puArgErr*/, bool& bHandled)
@@ -1136,6 +1228,38 @@ HRESULT InterfaceOleWrapper::InvokeGeneral( DISPID 
dispidMember, unsigned short
 return DISP_E_EXCEPTION;
 }
 }
+else if (dispidMember == DISPID_NEWENUM)
+{
+bHandled = true;
+if( !pvarResult)
+return E_POINTER;
+
+Reference< XEnumerationAccess > xEnumerationAccess(m_xOrigin, 
UNO_QUERY_THROW);
+if (!xEnumerationAccess.is())
+return DISP_E_MEMBERNOTFOUND;
+
+Reference< XEnumeration > xEnumeration = 
xEnumerationAccess->createEnumeration();
+
+CComObject* pEnumVar;
+
+ret = CComObject::CreateInstance();
+if (FAILED(ret))
+return ret;
+
+pEnumVar->AddRef();
+
+pEnumVar->Init(this, xEnumeration);
+
+pvarResult->vt = VT_UNKNOWN;
+  

[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - cui/source cui/uiconfig include/svx include/vcl starmath/source svx/source vcl/source

2018-05-29 Thread Caolán McNamara
 cui/source/inc/swpossizetabpage.hxx  |   97 +---
 cui/source/tabpages/swpossizetabpage.cxx |  746 ++-
 cui/uiconfig/ui/swpossizepage.ui |   64 +-
 include/svx/swframeexample.hxx   |   65 ++
 include/vcl/weld.hxx |4 
 starmath/source/dialog.cxx   |8 
 svx/source/dialog/swframeexample.cxx |  666 +++
 vcl/source/app/salvtables.cxx|5 
 8 files changed, 1168 insertions(+), 487 deletions(-)

New commits:
commit f78dbaad37f7b0ec08686a6aa31984ad11c631aa
Author: Caolán McNamara 
Date:   Mon May 28 14:33:42 2018 +0100

weld SvxSwPosSizeTabPage

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

diff --git a/cui/source/inc/swpossizetabpage.hxx 
b/cui/source/inc/swpossizetabpage.hxx
index b10e2ca7617f..d9e326dee456 100644
--- a/cui/source/inc/swpossizetabpage.hxx
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -20,12 +20,9 @@
 #define INCLUDED_CUI_SOURCE_INC_SWPOSSIZETABPAGE_HXX
 
 #include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
+#include 
 
 // SvxSwPosSizeTabPage - position and size page for Writer drawing objects
 struct FrmMap;
@@ -37,40 +34,6 @@ class SvxSwPosSizeTabPage : public SfxTabPage
 {
 using TabPage::DeactivatePage;
 
-VclPtr  m_pWidthMF;
-VclPtr  m_pHeightMF;
-VclPtr m_pKeepRatioCB;
-
-VclPtr  m_pToPageRB;
-VclPtr  m_pToParaRB;
-VclPtr  m_pToCharRB;
-VclPtr  m_pAsCharRB;
-VclPtr  m_pToFrameRB;
-
-VclPtr  m_pPositionCB;
-VclPtr  m_pSizeCB;
-
-VclPtr m_pPosFrame;
-VclPtrm_pHoriFT;
-VclPtr  m_pHoriLB;
-VclPtrm_pHoriByFT;
-VclPtr  m_pHoriByMF;
-VclPtrm_pHoriToFT;
-VclPtr  m_pHoriToLB;
-
-VclPtr m_pHoriMirrorCB;
-
-VclPtrm_pVertFT;
-VclPtr  m_pVertLB;
-VclPtrm_pVertByFT;
-VclPtr  m_pVertByMF;
-VclPtrm_pVertToFT;
-VclPtr  m_pVertToLB;
-
-VclPtr m_pFollowCB;
-
-VclPtr m_pExampleWN;
-
 Link m_aValidateLink;
 
 ::tools::Rectangle   m_aRect; //size of all selected objects
@@ -95,24 +58,53 @@ class SvxSwPosSizeTabPage : public SfxTabPage
 boolm_bIsInRightToLeft;
 TriStatem_nProtectSizeState;
 
-DECL_LINK(RangeModifyHdl, Control&, void);
-DECL_LINK(RangeModifyClickHdl, Button*, void);
-DECL_LINK(AnchorTypeHdl, Button*, void);
-DECL_LINK( PosHdl, ListBox&, void );
-DECL_LINK( RelHdl, ListBox&, void );
-DECL_LINK(MirrorHdl, Button*, void);
-DECL_LINK( ModifyHdl, Edit&, void );
-DECL_LINK(ProtectHdl, Button*, void);
+SwFrameExample m_aExampleWN;
+
+std::unique_ptr m_xWidthMF;
+std::unique_ptr m_xHeightMF;
+std::unique_ptr m_xKeepRatioCB;
+std::unique_ptr m_xToPageRB;
+std::unique_ptr m_xToParaRB;
+std::unique_ptr m_xToCharRB;
+std::unique_ptr m_xAsCharRB;
+std::unique_ptr m_xToFrameRB;
+std::unique_ptr m_xPositionCB;
+std::unique_ptr m_xSizeCB;
+std::unique_ptr m_xPosFrame;
+std::unique_ptr m_xHoriFT;
+std::unique_ptr m_xHoriLB;
+std::unique_ptr m_xHoriByFT;
+std::unique_ptr m_xHoriByMF;
+std::unique_ptr m_xHoriToFT;
+std::unique_ptr m_xHoriToLB;
+std::unique_ptr m_xHoriMirrorCB;
+std::unique_ptr m_xVertFT;
+std::unique_ptr m_xVertLB;
+std::unique_ptr m_xVertByFT;
+std::unique_ptr m_xVertByMF;
+std::unique_ptr m_xVertToFT;
+std::unique_ptr m_xVertToLB;
+std::unique_ptr m_xFollowCB;
+std::unique_ptr m_xExampleWN;
+
+DECL_LINK(RangeModifyHdl, weld::Widget&, void);
+DECL_LINK(RangeModifyClickHdl, weld::ToggleButton&, void);
+DECL_LINK(AnchorTypeHdl, weld::ToggleButton&, void);
+DECL_LINK(PosHdl, weld::ComboBoxText&, void);
+DECL_LINK(RelHdl, weld::ComboBoxText&, void);
+DECL_LINK(MirrorHdl, weld::ToggleButton&, void);
+DECL_LINK(ModifyHdl, weld::MetricSpinButton&, void);
+DECL_LINK(ProtectHdl, weld::ToggleButton&, void);
 
 voidInitPos(RndStdIds nAnchorType, sal_uInt16 nH, sal_uInt16 
nHRel,
 sal_uInt16 nV,  sal_uInt16 nVRel,
 long   nX,  long   nY);
-static sal_uInt16   GetMapPos(FrmMap const *pMap, ListBox const );
-static shortGetAlignment(FrmMap const *pMap, sal_uInt16 nMapPos, 
ListBox const );
-static shortGetRelation(ListBox const );
+static sal_uInt16   GetMapPos(FrmMap const *pMap, const 
weld::ComboBoxText& rAlignLB);
+static shortGetAlignment(FrmMap const *pMap, sal_uInt16 nMapPos, 
const weld::ComboBoxText& rRelationLB);
+static shortGetRelation(const weld::ComboBoxText& rRelationLB);
 RndStdIds   GetAnchorType(bool* pbHasChanged = nullptr);
-voidFillRelLB(FrmMap const *pMap, sal_uInt16 nLBSelPos, 

[Libreoffice-commits] core.git: comphelper/source cppcanvas/source cppuhelper/source include/comphelper include/oox lotuswordpro/source oox/source reportdesign/source svx/source writerfilter/source

2018-05-29 Thread Noel Grandin
 comphelper/source/misc/syntaxhighlight.cxx  |4 ++--
 cppcanvas/source/mtfrenderer/textaction.cxx |9 -
 cppuhelper/source/propertysetmixin.cxx  |5 ++---
 include/comphelper/syntaxhighlight.hxx  |1 -
 include/oox/export/shapes.hxx   |1 -
 lotuswordpro/source/filter/bento.hxx|5 ++---
 oox/source/export/shapes.cxx|3 +--
 reportdesign/source/filter/xml/xmlComponent.cxx |2 --
 reportdesign/source/filter/xml/xmlComponent.hxx |1 -
 reportdesign/source/filter/xml/xmlExport.cxx|1 -
 reportdesign/source/filter/xml/xmlExport.hxx|1 -
 svx/source/svdraw/svdopath.cxx  |3 +--
 writerfilter/source/ooxml/OOXMLPropertySet.cxx  |1 -
 writerfilter/source/ooxml/OOXMLPropertySet.hxx  |1 -
 14 files changed, 12 insertions(+), 26 deletions(-)

New commits:
commit 17c936bca548acc93d6b2e70593bc711c0e6b8a4
Author: Noel Grandin 
Date:   Mon May 28 11:27:37 2018 +0200

loplugin:unusedfields-in-constructor in various

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

diff --git a/comphelper/source/misc/syntaxhighlight.cxx 
b/comphelper/source/misc/syntaxhighlight.cxx
index c63fdd5bf7d7..76c8dfa862d3 100644
--- a/comphelper/source/misc/syntaxhighlight.cxx
+++ b/comphelper/source/misc/syntaxhighlight.cxx
@@ -687,9 +687,9 @@ void 
SyntaxHighlighter::Tokenizer::getHighlightPortions(const OUString& rLine,
 
 
 SyntaxHighlighter::SyntaxHighlighter(HighlighterLanguage language):
-eLanguage(language), m_tokenizer(new 
SyntaxHighlighter::Tokenizer(language))
+m_tokenizer(new SyntaxHighlighter::Tokenizer(language))
 {
-switch (eLanguage)
+switch (language)
 {
 case HighlighterLanguage::Basic:
 m_tokenizer->setKeyWords( strListBasicKeyWords,
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx 
b/cppcanvas/source/mtfrenderer/textaction.cxx
index 7444c06c0012..8292935e976f 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -815,7 +815,6 @@ namespace cppcanvas
 rendering::RenderState  maState;
 const tools::TextLineInfo   maTextLineInfo;
 ::basegfx::B2DSize  maLinesOverallSize;
-const doublemnLineWidth;
 uno::Reference< rendering::XPolyPolygon2D > mxTextLines;
 const ::basegfx::B2DSizemaReliefOffset;
 const ::Color   maReliefColor;
@@ -841,7 +840,6 @@ namespace cppcanvas
 maState(),
 maTextLineInfo( tools::createTextLineInfo( rVDev, rState ) ),
 maLinesOverallSize(),
-mnLineWidth( getLineWidth( rVDev, rState, maStringContext ) ),
 mxTextLines(),
 maReliefOffset( rReliefOffset ),
 maReliefColor( rReliefColor ),
@@ -849,10 +847,11 @@ namespace cppcanvas
 maShadowColor( rShadowColor ),
 maTextDirection( rState.textDirection )
 {
+const double nLineWidth(getLineWidth( rVDev, rState, 
maStringContext ));
 initEffectLinePolyPolygon( maLinesOverallSize,
mxTextLines,
rCanvas,
-   mnLineWidth,
+   nLineWidth,
maTextLineInfo );
 
 init( maState, mxFont,
@@ -881,7 +880,6 @@ namespace cppcanvas
 maState(),
 maTextLineInfo( tools::createTextLineInfo( rVDev, rState ) ),
 maLinesOverallSize(),
-mnLineWidth( getLineWidth( rVDev, rState, maStringContext ) ),
 mxTextLines(),
 maReliefOffset( rReliefOffset ),
 maReliefColor( rReliefColor ),
@@ -889,10 +887,11 @@ namespace cppcanvas
 maShadowColor( rShadowColor ),
 maTextDirection( rState.textDirection )
 {
+const double nLineWidth( getLineWidth( rVDev, rState, 
maStringContext ) );
 initEffectLinePolyPolygon( maLinesOverallSize,
mxTextLines,
rCanvas,
-   mnLineWidth,
+   nLineWidth,
maTextLineInfo );
 
 init( maState, mxFont,
diff --git a/cppuhelper/source/propertysetmixin.cxx 
b/cppuhelper/source/propertysetmixin.cxx
index 88e104d90453..84f2432b7db7 100644
--- 

[Libreoffice-commits] core.git: sc/inc sc/source

2018-05-29 Thread Noel Grandin
 sc/inc/columniterator.hxx|1 -
 sc/source/core/data/columniterator.cxx   |   15 +++
 sc/source/core/data/dpoutput.cxx |   16 +---
 sc/source/filter/excel/xestyle.cxx   |7 ---
 sc/source/filter/excel/xiname.cxx|   14 +++---
 sc/source/filter/inc/orcusinterface.hxx  |1 -
 sc/source/filter/inc/xestyle.hxx |1 -
 sc/source/filter/inc/xiname.hxx  |1 -
 sc/source/filter/orcus/interface.cxx |1 -
 sc/source/filter/xml/xmlcondformat.cxx   |7 +++
 sc/source/filter/xml/xmlcondformat.hxx   |1 -
 sc/source/filter/xml/xmlcvali.cxx|3 ---
 sc/source/filter/xml/xmldpimp.cxx|   25 ++---
 sc/source/filter/xml/xmldpimp.hxx|   10 --
 sc/source/filter/xml/xmldrani.cxx|   10 --
 sc/source/filter/xml/xmldrani.hxx|4 
 sc/source/filter/xml/xmlexternaltabi.cxx |3 ++-
 sc/source/filter/xml/xmlexternaltabi.hxx |1 -
 18 files changed, 42 insertions(+), 79 deletions(-)

New commits:
commit eb754cf5f36a7730672a72e198cf564b7e05fa3c
Author: Noel Grandin 
Date:   Mon May 28 11:27:22 2018 +0200

loplugin:unusedfields-in-constructor in sc

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

diff --git a/sc/inc/columniterator.hxx b/sc/inc/columniterator.hxx
index b36a4c7028b2..c964e0ccb9c9 100644
--- a/sc/inc/columniterator.hxx
+++ b/sc/inc/columniterator.hxx
@@ -22,7 +22,6 @@ struct ScRefCellValue;
 
 class ScColumnTextWidthIterator
 {
-sc::CellTextAttrStoreType& mrCellTextAttrs;
 const size_t mnEnd;
 size_t mnCurPos;
 sc::CellTextAttrStoreType::iterator miBlockCur;
diff --git a/sc/source/core/data/columniterator.cxx 
b/sc/source/core/data/columniterator.cxx
index f7367193d9cb..819f8466768d 100644
--- a/sc/source/core/data/columniterator.cxx
+++ b/sc/source/core/data/columniterator.cxx
@@ -15,22 +15,21 @@
 #include 
 
 ScColumnTextWidthIterator::ScColumnTextWidthIterator(ScColumn& rCol, SCROW 
nStartRow, SCROW nEndRow) :
-mrCellTextAttrs(rCol.maCellTextAttrs),
 mnEnd(static_cast(nEndRow)),
-mnCurPos(0),
-miBlockCur(mrCellTextAttrs.begin()),
-miBlockEnd(mrCellTextAttrs.end())
+mnCurPos(0)
 {
+miBlockCur = rCol.maCellTextAttrs.begin();
+miBlockEnd = rCol.maCellTextAttrs.end();
 init(nStartRow, nEndRow);
 }
 
 ScColumnTextWidthIterator::ScColumnTextWidthIterator(ScDocument& rDoc, const 
ScAddress& rStartPos, SCROW nEndRow) :
-
mrCellTextAttrs(rDoc.maTabs[rStartPos.Tab()]->aCol[rStartPos.Col()].maCellTextAttrs),
 mnEnd(static_cast(nEndRow)),
-mnCurPos(0),
-miBlockCur(mrCellTextAttrs.begin()),
-miBlockEnd(mrCellTextAttrs.end())
+mnCurPos(0)
 {
+auto & rCellTextAttrs = 
rDoc.maTabs[rStartPos.Tab()]->aCol[rStartPos.Col()].maCellTextAttrs;
+miBlockCur = rCellTextAttrs.begin();
+miBlockEnd = rCellTextAttrs.end();
 init(rStartPos.Row(), nEndRow);
 }
 
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 3b15dd30d616..bcf1559c58bd 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -81,18 +81,16 @@ struct ScDPOutLevelData
 uno::Sequence  maResult;
 OUStringmaName; /// Name is the internal 
field name.
 OUStringmaCaption;  /// Caption is the name 
visible in the output table.
-double  mfValue;/// Value is the 
underlying numeric value, if any, or NaN
 boolmbHasHiddenMember:1;
 boolmbDataLayout:1;
 boolmbPageDim:1;
 
 ScDPOutLevelData(long nDim, long nHier, long nLevel, long nDimPos, 
sal_uInt32 nSrcNumFmt, const uno::Sequence  ,
-   const OUString , const OUString , double 
fValue, bool bHasHiddenMember, bool bDataLayout, bool bPageDim) :
+   const OUString , const OUString , bool 
bHasHiddenMember, bool bDataLayout, bool bPageDim) :
 mnDim(nDim), mnHier(nHier), mnLevel(nLevel), mnDimPos(nDimPos), 
mnSrcNumFmt(nSrcNumFmt), maResult(aResult),
-maName(aName), maCaption(aCaption), mfValue(fValue), 
mbHasHiddenMember(bHasHiddenMember), mbDataLayout(bDataLayout),
+maName(aName), maCaption(aCaption), 
mbHasHiddenMember(bHasHiddenMember), mbDataLayout(bDataLayout),
 mbPageDim(bPageDim)
 {
-rtl::math::setNan();
 }
 
 // bug (73840) in uno::Sequence - copy and then assign doesn't work!
@@ -595,10 +593,6 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const 
uno::Reference 
aResult = getVisiblePageMembersAsResults(xLevel);
 // no check on results for page fields
 ScDPOutLevelData 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3-desktop' - sd/inc sd/qa sd/source

2018-05-29 Thread Mike Kaganski
 sd/inc/stlsheet.hxx |3 
 sd/qa/unit/misc-tests.cxx   |   34 +++
 sd/source/core/stlsheet.cxx |  136 +++-
 3 files changed, 122 insertions(+), 51 deletions(-)

New commits:
commit 47bd52d8657673f5310c85d2912c3dd2f3adf125
Author: Mike Kaganski 
Date:   Sun May 27 14:02:09 2018 +0300

tdf#38225: update API name when renaming using a base class ref

... but don't update it in case it's a predefined API name

Change-Id: I20075a4e085bdeab8374860c16e7eb2a72772c33
Reviewed-on: https://gerrit.libreoffice.org/54879
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/54985
Tested-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/55021

diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx
index a57f3fe9c187..f775e9995913 100644
--- a/sd/inc/stlsheet.hxx
+++ b/sd/inc/stlsheet.hxx
@@ -82,6 +82,9 @@ public:
 static void BroadcastSdStyleSheetChange(SfxStyleSheetBase* pStyleSheet, 
PresentationObjects ePO,
 SfxStyleSheetBasePool* pSSPool);
 
+// SfxStyleSheetBase
+virtual bool SetName(const OUString& rNewName, bool bReindexNow = true) 
override;
+
 // XInterface
 virtual void SAL_CALL release(  ) throw () override;
 
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index 046e97f20525..c50f731da234 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -53,6 +53,7 @@ public:
 void testTdf99396();
 void testTdf99396TextEdit();
 void testTdf44774();
+void testTdf38225();
 
 CPPUNIT_TEST_SUITE(SdMiscTest);
 CPPUNIT_TEST(testTdf96206);
@@ -60,6 +61,7 @@ public:
 CPPUNIT_TEST(testTdf99396);
 CPPUNIT_TEST(testTdf99396TextEdit);
 CPPUNIT_TEST(testTdf44774);
+CPPUNIT_TEST(testTdf38225);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -285,6 +287,38 @@ void SdMiscTest::testTdf44774()
 CPPUNIT_ASSERT_EQUAL(OUString("StyleA"), pStyle->GetParent());
 }
 
+void SdMiscTest::testTdf38225()
+{
+sd::DrawDocShellRef xDocShRef = new 
sd::DrawDocShell(SfxObjectCreateMode::EMBEDDED, false,
+DocumentType::Draw);
+const uno::Reference xLoadable(xDocShRef->GetModel(), 
uno::UNO_QUERY_THROW);
+xLoadable->initNew();
+SfxStyleSheetBasePool* pSSPool = xDocShRef->GetStyleSheetPool();
+
+// Create a new style with a name
+pSSPool->Make("StyleWithName1", SfxStyleFamily::Para, SFXSTYLEBIT_USERDEF);
+
+// Now save the file and reload
+xDocShRef = saveAndReload(xDocShRef.get(), ODG);
+pSSPool = xDocShRef->GetStyleSheetPool();
+
+SfxStyleSheetBase* pStyle = pSSPool->Find("StyleWithName1", 
SfxStyleFamily::Para);
+CPPUNIT_ASSERT(pStyle);
+
+// Rename the style
+CPPUNIT_ASSERT(pStyle->SetName("StyleWithName2"));
+
+// Save the file and reload again
+xDocShRef = saveAndReload(xDocShRef.get(), ODG);
+pSSPool = xDocShRef->GetStyleSheetPool();
+
+// The problem was that the style kept the old name upon reloading
+pStyle = pSSPool->Find("StyleWithName1", SfxStyleFamily::Para);
+CPPUNIT_ASSERT(!pStyle);
+pStyle = pSSPool->Find("StyleWithName2", SfxStyleFamily::Para);
+CPPUNIT_ASSERT(pStyle);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdMiscTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index b3380370836f..2d44daba6356 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -611,59 +611,86 @@ bool SdStyleSheet::HasClearParentSupport() const
 return true;
 }
 
-void SdStyleSheet::SetHelpId( const OUString& r, sal_uLong nId )
+namespace
 {
-SfxStyleSheet::SetHelpId( r, nId );
+struct ApiNameMap
+{
+const sal_Char* mpApiName;
+sal_uInt32  mnApiNameLength;
+sal_uInt32  mnHelpId;
+} const pApiNameMap[]
+= { { RTL_CONSTASCII_STRINGPARAM("title"), HID_PSEUDOSHEET_TITLE },
+{ RTL_CONSTASCII_STRINGPARAM("subtitle"), HID_PSEUDOSHEET_SUBTITLE },
+{ RTL_CONSTASCII_STRINGPARAM("background"), HID_PSEUDOSHEET_BACKGROUND 
},
+{ RTL_CONSTASCII_STRINGPARAM("backgroundobjects"), 
HID_PSEUDOSHEET_BACKGROUNDOBJECTS },
+{ RTL_CONSTASCII_STRINGPARAM("notes"), HID_PSEUDOSHEET_NOTES },
+{ RTL_CONSTASCII_STRINGPARAM("standard"), HID_STANDARD_STYLESHEET_NAME 
},
+{ RTL_CONSTASCII_STRINGPARAM("objectwitharrow"), 
HID_POOLSHEET_OBJWITHARROW },
+{ RTL_CONSTASCII_STRINGPARAM("objectwithshadow"), 
HID_POOLSHEET_OBJWITHSHADOW },
+{ RTL_CONSTASCII_STRINGPARAM("objectwithoutfill"), 
HID_POOLSHEET_OBJWITHOUTFILL },
+{ RTL_CONSTASCII_STRINGPARAM("text"), HID_POOLSHEET_TEXT },
+{ RTL_CONSTASCII_STRINGPARAM("textbody"), HID_POOLSHEET_TEXTBODY },
+{ RTL_CONSTASCII_STRINGPARAM("textbodyjustfied"), 
HID_POOLSHEET_TEXTBODY_JUSTIFY },
+{ RTL_CONSTASCII_STRINGPARAM("textbodyindent"), 
HID_POOLSHEET_TEXTBODY_INDENT },
+{ 

[Libreoffice-commits] core.git: extensions/Library_oleautobridge.mk extensions/source

2018-05-29 Thread Tor Lillqvist
 extensions/Library_oleautobridge.mk |6 +-
 extensions/source/ole/servprov.cxx  |   36 +---
 extensions/source/ole/servprov.hxx  |8 +---
 3 files changed, 39 insertions(+), 11 deletions(-)

New commits:
commit 0667df70dc749ae50ce29713308f14d624f2a683
Author: Tor Lillqvist 
Date:   Tue Feb 13 18:41:24 2018 +0200

Provide also an ooo.vba.word.XApplication object

Create the objects on offer to Automation clients lazily

It would be silly to create the ooo.vba.word.XApplication in every
LibreOffice instance, even if no Writer functionality was going to be
used at all in that process.

I did not have to do what the old FIXME said, "make Application a
proper service", whatever that means.

Change-Id: I02a0ceb6290012b4bb6afacadc03871feaf57406
Reviewed-on: https://gerrit.libreoffice.org/55005
Tested-by: Jenkins 
Reviewed-by: Tor Lillqvist 

diff --git a/extensions/Library_oleautobridge.mk 
b/extensions/Library_oleautobridge.mk
index 70b518c50d41..ec59f715c504 100644
--- a/extensions/Library_oleautobridge.mk
+++ b/extensions/Library_oleautobridge.mk
@@ -13,7 +13,11 @@ $(eval $(call gb_Library_Library,oleautobridge))
 
 $(eval $(call 
gb_Library_set_componentfile,oleautobridge,extensions/source/ole/oleautobridge))
 
-$(eval $(call gb_Library_use_sdk_api,oleautobridge))
+$(eval $(call gb_Library_use_api,oleautobridge,\
+offapi \
+oovbaapi \
+udkapi \
+))
 
 $(eval $(call gb_Library_set_include,oleautobridge,\
$(foreach inc,$(ATL_INCLUDE),-I$(inc)) \
diff --git a/extensions/source/ole/servprov.cxx 
b/extensions/source/ole/servprov.cxx
index 72e5944fb5ba..220ced0bc2fd 100644
--- a/extensions/source/ole/servprov.cxx
+++ b/extensions/source/ole/servprov.cxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace cppu;
 using namespace osl;
@@ -43,10 +44,14 @@ using namespace com::sun::star::bridge::ModelDependent;
 // {82154420-0FBF-11d4-8313-005004526AB4}
 DEFINE_GUID(OID_ServiceManager, 0x82154420, 0xfbf, 0x11d4, 0x83, 0x13, 0x0, 
0x50, 0x4, 0x52, 0x6a, 0xb4);
 
+// FIXME: This GUID is just the above with the initial part bumped by one. Is 
that good enough?
+// {82154421-0FBF-11d4-8313-005004526AB4}
+DEFINE_GUID(OID_LibreOfficeWriterApplication, 0x82154421, 0xfbf, 0x11d4, 0x83, 
0x13, 0x0, 0x50, 0x4, 0x52, 0x6a, 0xb4);
+
 OneInstanceOleWrapper::OneInstanceOleWrapper(  const 
Reference& smgr,
-   const Reference& 
xInst )
+   std::function()> xInstFunction )
 : m_refCount(0)
-, m_xInst(xInst)
+, m_xInstFunction(xInstFunction)
 , m_factoryHandle(0)
 , m_smgr(smgr)
 {
@@ -127,9 +132,10 @@ STDMETHODIMP 
OneInstanceOleWrapper::CreateInstance(IUnknown FAR* punkOuter,
 HRESULT ret = ResultFromScode(E_UNEXPECTED);
 punkOuter = nullptr;
 
-if (m_xInst.is())
+const Reference& xInst = m_xInstFunction();
+if (xInst.is())
 {
-Any usrAny(_xInst, cppu::UnoType::get());
+Any usrAny(, cppu::UnoType::get());
 sal_uInt8 arId[16];
 rtl_getGlobalProcessId( arId);
 Any oleAny = m_bridgeSupplier->createBridge(usrAny,
@@ -456,7 +462,23 @@ OleServer::OleServer( const 
Reference& smgr):
 a >>= m_bridgeSupplier;
 }
 
-(void) provideInstance( m_smgr, _ServiceManager );
+(void) provideInstance( [&]
+{
+return m_smgr;
+},
+_ServiceManager );
+
+(void) provideInstance( [&]
+{
+const Reference xWordGlobals = 
m_smgr->createInstance("ooo.vba.word.Globals");
+xWordGlobals->acquire();
+const Reference 
xHelperInterface(xWordGlobals, UNO_QUERY);
+Any aApplication = 
xHelperInterface->Application();
+Reference xApplication;
+aApplication >>= xApplication;
+return xApplication;
+},
+_LibreOfficeWriterApplication );
 }
 
 OleServer::~OleServer()
@@ -486,9 +508,9 @@ css::uno::Sequence 
OleServer::getSupportedServiceNames()
 "com.sun.star.bridge.oleautomation.ApplicationRegistration"};
 }
 
-bool OleServer::provideInstance(const Reference& xInst, GUID const 
* guid)
+bool OleServer::provideInstance(std::function()> 
xInstFunction, GUID const * guid)
 {
-OneInstanceOleWrapper* pWrapper = new OneInstanceOleWrapper( m_smgr, xInst 
);
+OneInstanceOleWrapper* pWrapper = new OneInstanceOleWrapper( m_smgr, 
xInstFunction );
 
 pWrapper->AddRef();
 m_wrapperList.push_back(pWrapper);
diff --git a/extensions/source/ole/servprov.hxx 
b/extensions/source/ole/servprov.hxx
index 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3-desktop' - sw/source

2018-05-29 Thread Mike Kaganski
 sw/source/uibase/app/appenv.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4f0fee308da574634cd9f9181cc8dda2afdf73b3
Author: Mike Kaganski 
Date:   Fri May 25 14:58:11 2018 +0300

tdf#35798: use separate paragraphs for Label elements

Since commit db04be037b611e296ef9f2542322c52ed82d7a2b, empty Database
fields are hidden. But since Labels wizard generates a single paragraph
with line breaks for the label's text, the hiding feature cannot be
used efficiently.

Let the individual lines be in individual paragraphs.

Change-Id: I27430d54baea88461c2ea9de38baa95d6b7e9e62
Reviewed-on: https://gerrit.libreoffice.org/54800
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
(cherry picked from commit 2f11ce0670749b9da20dfb29269b176cb09fb01e)
Reviewed-on: https://gerrit.libreoffice.org/54960
Tested-by: Mike Kaganski 

diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index 286ddc49ed42..b33f62c60bd3 100644
--- a/sw/source/uibase/app/appenv.cxx
+++ b/sw/source/uibase/app/appenv.cxx
@@ -125,7 +125,7 @@ OUString InsertLabEnvText( SwWrtShell& rSh, SwFieldMgr& 
rFieldMgr, const OUStrin
 if ( !bField )
 rSh.Insert( sTmpText );
 }
-rSh.InsertLineBreak();
+rSh.SplitNode();
 }
 rSh.DelLeft();  // Again remove last linebreak
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3-desktop' - sw/source

2018-05-29 Thread Mike Kaganski
 sw/source/uibase/app/apphdl.cxx |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit ff8fdd1133403050182b18cccec5fe461cf0b0c3
Author: Mike Kaganski 
Date:   Sat May 26 14:23:13 2018 +0300

tdf#117817: Update Mail Merge controls after wizard completes

Otherwise they may stay disabled until cursor position changes.

Change-Id: If734bbd4793b3b01c64601d68126d5752f5aba0c
Reviewed-on: https://gerrit.libreoffice.org/54841
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 
(cherry picked from commit f304ae0ca4738fa3605587146224ee8972a894f3)
Reviewed-on: https://gerrit.libreoffice.org/54983

diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 619c202a6039..d9b3f45ae62a 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -497,6 +497,20 @@ void SwMailMergeWizardExecutor::ExecutionFinished()
 pDbManager->CommitLastRegistrations();
 }
 
+// Update Mail Merge controls
+const sal_uInt16 slotIds[] = { FN_MAILMERGE_FIRST_ENTRY,
+   FN_MAILMERGE_PREV_ENTRY,
+   FN_MAILMERGE_NEXT_ENTRY,
+   FN_MAILMERGE_LAST_ENTRY,
+   FN_MAILMERGE_CURRENT_ENTRY,
+   FN_MAILMERGE_EXCLUDE_ENTRY,
+   FN_MAILMERGE_CREATE_DOCUMENTS,
+   FN_MAILMERGE_SAVE_DOCUMENTS,
+   FN_MAILMERGE_PRINT_DOCUMENTS,
+   FN_MAILMERGE_EMAIL_DOCUMENTS,
+   0 };
+m_pView->GetViewFrame()->GetBindings().Invalidate(slotIds);
+
 // release/destroy asynchronously
 Application::PostUserEvent( LINK( this, SwMailMergeWizardExecutor, 
DestroyDialogHdl ) );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sw/CppunitTest_sw_ooxmllinks.mk sw/CppunitTest_sw_ww8export2.mk sw/qa writerfilter/source

2018-05-29 Thread Miklos Vajna
 sw/CppunitTest_sw_ww8export2.mk |   34 
 sw/qa/extras/ooxmlexport/ooxmlexport6.cxx   |4 +--
 sw/qa/extras/ww8export/data/tdf117503.docx  |binary
 sw/qa/extras/ww8export/ww8export2.cxx   |7 +
 writerfilter/source/dmapper/PropertyMap.cxx |   27 +-
 5 files changed, 36 insertions(+), 36 deletions(-)

New commits:
commit 02a924831933d964cda209897bab27c48803c891
Author: Miklos Vajna 
Date:   Mon May 28 21:59:27 2018 +0200

tdf#117503 DOCX import: fix out of sync first/later top margin

Improve the synchronization between the first page and follow page
style, so that when the DOC export invokes
sw::util::IsPlausableSingleWordSection(), it recognizes that originally
these were the same Word section.

If they don't match up, then the exporter will insert an explicit
section break, meaning we get one more page in the export result
compared to the original.

(cherry picked from commit b7ae863efeb082816cc4fe660527a9650d90e186)

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

diff --git a/sw/CppunitTest_sw_ooxmllinks.mk b/sw/CppunitTest_sw_ooxmllinks.mk
old mode 100755
new mode 100644
diff --git a/sw/CppunitTest_sw_ww8export2.mk b/sw/CppunitTest_sw_ww8export2.mk
index 5ece5d90a0a3..616347d52904 100644
--- a/sw/CppunitTest_sw_ww8export2.mk
+++ b/sw/CppunitTest_sw_ww8export2.mk
@@ -47,39 +47,7 @@ $(eval $(call gb_CppunitTest_use_sdk_api,sw_ww8export2))
 $(eval $(call gb_CppunitTest_use_ure,sw_ww8export2))
 $(eval $(call gb_CppunitTest_use_vcl,sw_ww8export2))
 
-$(eval $(call gb_CppunitTest_use_components,sw_ww8export2,\
-basic/util/sb \
-comphelper/util/comphelp \
-configmgr/source/configmgr \
-dbaccess/util/dba \
-embeddedobj/util/embobj \
-emfio/emfio \
-filter/source/config/cache/filterconfig1 \
-filter/source/storagefilterdetect/storagefd \
-forms/util/frm \
-framework/util/fwk \
-i18npool/util/i18npool \
-linguistic/source/lng \
-package/source/xstor/xstor \
-package/util/package2 \
-sax/source/expatwrap/expwrap \
-sw/util/msword \
-sw/util/sw \
-sw/util/swd \
-sfx2/util/sfx \
-svl/source/fsstor/fsstorage \
-svtools/util/svt \
-toolkit/util/tk \
-ucb/source/core/ucb1 \
-ucb/source/ucp/file/ucpfile1 \
-unotools/util/utl \
-unoxml/source/service/unoxml \
-unoxml/source/rdf/unordf \
-uui/util/uui \
-$(if $(filter DESKTOP,$(BUILD_TYPE)),xmlhelp/util/ucpchelp1) \
-vcl/vcl.common \
-xmloff/util/xo \
-))
+$(eval $(call gb_CppunitTest_use_rdb,sw_ww8export2,services))
 
 $(eval $(call gb_CppunitTest_use_configuration,sw_ww8export2))
 
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index 099566cd8072..837111995c79 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -454,7 +454,7 @@ DECLARE_OOXMLEXPORT_TEST(testVMLData, "TestVMLData.docx")
 {
 // The problem was exporter was exporting vml data for shape in w:rPr 
element.
 // vml data should not come under w:rPr element.
-xmlDocPtr pXmlDoc = parseExport("word/header1.xml");
+xmlDocPtr pXmlDoc = parseExport("word/header2.xml");
 if (!pXmlDoc)
 return;
 CPPUNIT_ASSERT(getXPath(pXmlDoc, 
"/w:hdr/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:shape", 
"stroked").match("f"));
@@ -464,7 +464,7 @@ DECLARE_OOXMLEXPORT_TEST(testImageData, "image_data.docx")
 {
 // The problem was exporter was exporting v:imagedata data for shape in 
w:pict as v:fill w element.
 
-xmlDocPtr pXmlDoc = parseExport("word/header1.xml");
+xmlDocPtr pXmlDoc = parseExport("word/header2.xml");
 if (!pXmlDoc)
 return;
 CPPUNIT_ASSERT(getXPath(pXmlDoc, 
"/w:hdr/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:shape/v:imagedata", 
"detectmouseclick").match("t"));
diff --git a/sw/qa/extras/ww8export/data/tdf117503.docx 
b/sw/qa/extras/ww8export/data/tdf117503.docx
new file mode 100644
index ..f817f035b5cf
Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf117503.docx differ
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx 
b/sw/qa/extras/ww8export/ww8export2.cxx
index bc9a104740bb..f7ec720bce99 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -814,6 +814,13 @@ DECLARE_WW8EXPORT_TEST(testTdf112118_DOC, "tdf112118.doc")
 }
 }
 
+DECLARE_WW8EXPORT_TEST(testTdf117503, "tdf117503.docx")
+{
+// This was 3, first page + standard page styles were not merged together
+// on export.
+CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - common/FileUtil.cpp

2018-05-29 Thread Ashod Nakashian
 common/FileUtil.cpp |   29 +
 1 file changed, 17 insertions(+), 12 deletions(-)

New commits:
commit 13b40cd3bc4a04c567b6f9b2f2578bdc9c261422
Author: Ashod Nakashian 
Date:   Fri Feb 23 19:14:49 2018 -0500

wsd: reduce lock scope and log diskspace checks

Change-Id: If093670ae83de5596a86a116ba6224aa0badbcbe
Reviewed-on: https://gerrit.libreoffice.org/52678
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/common/FileUtil.cpp b/common/FileUtil.cpp
index af6dfef57..e6175311e 100644
--- a/common/FileUtil.cpp
+++ b/common/FileUtil.cpp
@@ -188,14 +188,14 @@ namespace FileUtil
 {
 void registerFileSystemForDiskSpaceChecks(const std::string& path)
 {
-std::lock_guard lock(fsmutex);
-
-if (!path.empty())
+const std::string::size_type lastSlash = path.rfind('/');
+assert(path.empty() || lastSlash != std::string::npos);
+if (lastSlash != std::string::npos)
 {
-std::string dirPath = path;
-std::string::size_type lastSlash = dirPath.rfind('/');
-assert(lastSlash != std::string::npos);
-dirPath = dirPath.substr(0, lastSlash + 1) + '.';
+const std::string dirPath = path.substr(0, lastSlash + 1) + '.';
+LOG_INF("Registering filesystem for space checks: [" << dirPath << 
"]");
+
+std::lock_guard lock(fsmutex);
 
 struct stat s;
 if (stat(dirPath.c_str(), ) == 0)
@@ -207,19 +207,19 @@ namespace FileUtil
 
 std::string checkDiskSpaceOnRegisteredFileSystems(const bool 
cacheLastCheck)
 {
-std::lock_guard lock(fsmutex);
-
 static std::chrono::steady_clock::time_point lastCheck;
 std::chrono::steady_clock::time_point 
now(std::chrono::steady_clock::now());
 
-// Don't check more often that once a minute
+std::lock_guard lock(fsmutex);
+
+// Don't check more often than once a minute
 if (std::chrono::duration_cast(now - 
lastCheck).count() < 60)
 return std::string();
 
 if (cacheLastCheck)
 lastCheck = now;
 
-for (auto& i: filesystems)
+for (const auto& i: filesystems)
 {
 if (!checkDiskSpace(i.path))
 {
@@ -242,10 +242,15 @@ namespace FileUtil
 if (statfs(path.c_str(), ) == -1)
 return true;
 
+const int64_t freeBytes = static_cast(sfs.f_bavail) * 
sfs.f_bsize;
+
+LOG_INF("Filesystem [" << path << "] has " << (freeBytes / 1024 / 
1024) <<
+" MB free (" << (sfs.f_bavail * 100. / sfs.f_blocks) << "%).");
+
 // we should be able to run just OK with 5GB
 constexpr int64_t ENOUGH_SPACE = int64_t(5)*1024*1024*1024;
 
-if (static_cast(sfs.f_bavail) * sfs.f_bsize > ENOUGH_SPACE)
+if (freeBytes > ENOUGH_SPACE)
 return true;
 
 if (static_cast(sfs.f_bavail) / sfs.f_blocks <= 0.05)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Shashvat Kedia license statement

2018-05-29 Thread Shashvat Kedia
 All of my past & future contributions to LibreOffice may be
   licensed under the MPLv2/LGPLv3+ dual license.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - wsd/ClientSession.cpp

2018-05-29 Thread Ashod Nakashian
 wsd/ClientSession.cpp |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 1f30b1fe9fc7de54f908e0d39e4f89aad6569688
Author: Ashod Nakashian 
Date:   Wed Feb 28 09:20:55 2018 -0500

wsd: localize variables

Change-Id: I411e435fa2360423b4c48d087eb501b942cc637d
Reviewed-on: https://gerrit.libreoffice.org/52681
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 5d172417a..d85366ef2 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -869,11 +869,9 @@ bool ClientSession::handleKitToClientMessage(const char* 
buffer, const int lengt
 
 bool ClientSession::forwardToClient(const std::shared_ptr& payload)
 {
-const auto& message = payload->abbr();
-
 if (isCloseFrame())
 {
-LOG_TRC(getName() << ": peer began the closing handshake. Dropping 
forward message [" << message << "].");
+LOG_TRC(getName() << ": peer began the closing handshake. Dropping 
forward message [" << payload->abbr() << "].");
 return true;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - loleaflet/debug loleaflet/dist loleaflet/main.css

2018-05-29 Thread Henry Castro
 loleaflet/debug/document/loleaflet.html|1 
 loleaflet/dist/loleaflet.css   |   30 
 loleaflet/dist/loleaflet.html  |   17 
 loleaflet/dist/menubar.css |4 
 loleaflet/dist/toolbar.css |   30 
 loleaflet/dist/toolbar/toolbar.js  |  342 
 loleaflet/dist/toolbar/w2ui-1.5.rc1.js |18953 +
 loleaflet/dist/toolbar/w2ui-1.5.rc1.min.js |   14 
 loleaflet/dist/toolbar/w2ui.min.js |   11 
 loleaflet/dist/w2ui-1.5.rc1.css| 3247 
 loleaflet/main.css |2 
 11 files changed, 22319 insertions(+), 332 deletions(-)

New commits:
commit 793bfbe2d91156f2f4ceb71319116240ccb9ac80
Author: Henry Castro 
Date:   Tue Mar 27 22:58:38 2018 -0400

loleaflet: fix responsive toolbar button issues

Updates the w2ui to version 1.5 (RC1).

Change-Id: I6a24f498511d4b03a04e68af0aa3715bb8c1b48b
Reviewed-on: https://gerrit.libreoffice.org/52987
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/debug/document/loleaflet.html 
b/loleaflet/debug/document/loleaflet.html
index ddb760f98..429da430e 100644
--- a/loleaflet/debug/document/loleaflet.html
+++ b/loleaflet/debug/document/loleaflet.html
@@ -79,7 +79,6 @@
 
 
 
-
 
 
 
diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css
index e8d88a974..e220f5126 100644
--- a/loleaflet/dist/loleaflet.css
+++ b/loleaflet/dist/loleaflet.css
@@ -66,6 +66,21 @@ body {
 top: 30px;
 }
 
+#toolbar-wrapper {
+position: relative;
+table-layout: fixed;
+border-collapse: collapse;
+width: 100%;
+}
+
+#toolbar-logo {
+width: 125px;
+}
+
+#toolbar-hamburger {
+width: 0;
+}
+
 @media (max-width: 767px) {
 /* Show slidesorter beyond 768px only */
 #presentation-controls-wrapper {
@@ -90,18 +105,11 @@ body {
 #spreadsheet-row-column-frame.readonly {
top: 30px !important;
 }
-/* There seems to be some bug in w2ui library -
- * when we are in very low screen width, the toolbar-up-more
- * toolbar's width doesn't adjust according to its children toolbar
- * items and truncate all items but one. Lets override the width in
- * mobile mode to prevent that.
- */
-#toolbar-up-more {
-   width: auto !important;
+#toolbar-logo {
+   width: 32px;
 }
-/* We need to give space for options menu */
-#tb_toolbar-up_item_rightmenupadding {
-   padding-right: 40px;
+#toolbar-hamburger {
+   width: 41px;
 }
 #closebutton {
display: none;
diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html
index e18a9cda8..3a3424c79 100644
--- a/loleaflet/dist/loleaflet.html
+++ b/loleaflet/dist/loleaflet.html
@@ -45,11 +45,16 @@


   
-  
-   
-   
-   
-  
+  
+   
+ 
+ 
+ 
+   
+   
+ 
+   
+  
   
 
 
@@ -100,6 +105,6 @@
 
  
 
-
+
 
 
diff --git a/loleaflet/dist/menubar.css b/loleaflet/dist/menubar.css
index 1d8e5eecb..f192eacbf 100644
--- a/loleaflet/dist/menubar.css
+++ b/loleaflet/dist/menubar.css
@@ -190,10 +190,6 @@
 display: block;
 }
 
-#toolbar-wrapper {
-position: relative;
-}
-
 /* desktop mode */
 @media (min-width: 768px) {
 /* hide the button in desktop view */
diff --git a/loleaflet/dist/toolbar.css b/loleaflet/dist/toolbar.css
index 984014b66..4025453a4 100644
--- a/loleaflet/dist/toolbar.css
+++ b/loleaflet/dist/toolbar.css
@@ -2,7 +2,7 @@
 left: 0;
 right: 0;
 text-align: center;
-z-index: 1000;
+z-index: 999;
 overflow: visible !important;
 }
 
@@ -16,7 +16,7 @@
 z-index: 1000;
 }
 
-#toolbar-up-more,w2ui-toolbar {
+w2ui-toolbar {
 position: absolute;
 right: 10px;
 top: 40px;
@@ -52,15 +52,15 @@
 z-index: 11;
 }
 
+.w2ui-scroll-left,
+.w2ui-scroll-right {
+z-index: 15;
+}
+
 /* center the toolbar */
 #tb_presentation-toolbar_item_left {
 width: 50%;
 }
-/* leave space for branding logo */
-#tb_toolbar-up_item_left {
-width: 0;
-padding-left: 125px;
-}
 
 #addressInput {
 height: 29px;
@@ -72,6 +72,12 @@
 width: 700px;
 }
 
+@media (max-width: 767px) {
+ #formulaInput {
+   width: 500px;
+ }
+}
+
 #document-name-input {
 position: fixed;
 z-index: 1050;
@@ -119,10 +125,6 @@
 }
 .closebuttonimage{ background: url('../images/lc_closedoc.svg') no-repeat 
center !important; }
 
-#tb_toolbar-up_item_right {
-width: 100%;
-}
-
 #tb_toolbar-down_item_left {
 width: 45%;
 }
@@ -313,11 +315,6 @@ button.leaflet-control-search-next
 .w2ui-icon.specialcharacter{ background: url('../images/lc_insertsymbol.svg') 
no-repeat center !important; }
 .w2ui-icon.insertobjectchart{ background: url('../images/lc_drawchart.svg') 
no-repeat center !important; }
 
-#inserttable-wrapper {
-position: 

[Libreoffice-commits] core.git: Branch 'private/mst/sw_redlinehide' - 10 commits - sw/inc sw/source

2018-05-29 Thread Michael Stahl
 sw/inc/calbck.hxx   |   72 +++---
 sw/source/core/access/accmap.cxx|4 
 sw/source/core/crsr/crstrvl.cxx |8 -
 sw/source/core/doc/CntntIdxStore.cxx|6 -
 sw/source/core/doc/doc.cxx  |2 
 sw/source/core/doc/docnum.cxx   |7 -
 sw/source/core/doc/docredln.cxx |4 
 sw/source/core/docnode/node.cxx |6 -
 sw/source/core/docnode/node2lay.cxx |   12 +-
 sw/source/core/draw/dcontact.cxx|4 
 sw/source/core/fields/docufld.cxx   |5 
 sw/source/core/fields/postithelper.cxx  |2 
 sw/source/core/inc/txtfrm.hxx   |   44 
 sw/source/core/layout/atrfrm.cxx|   12 +-
 sw/source/core/layout/calcmove.cxx  |3 
 sw/source/core/layout/frmtool.cxx   |4 
 sw/source/core/layout/ftnfrm.cxx|4 
 sw/source/core/layout/movedfwdfrmsbyobjpos.cxx  |2 
 sw/source/core/layout/softpagebreak.cxx |2 
 sw/source/core/layout/ssfrm.cxx |2 
 sw/source/core/layout/wsfrm.cxx |2 
 sw/source/core/text/EnhancedPDFExportHelper.cxx |2 
 sw/source/core/text/itratr.cxx  |8 -
 sw/source/core/text/porlay.cxx  |2 
 sw/source/core/text/redlnitr.cxx|   15 ++
 sw/source/core/text/txtdrop.cxx |6 -
 sw/source/core/text/txtfrm.cxx  |  123 
 sw/source/core/txtnode/atrftn.cxx   |4 
 sw/source/core/txtnode/ndtxt.cxx|6 -
 29 files changed, 270 insertions(+), 103 deletions(-)

New commits:
commit 2f475a555947ce151b2e5c4ac71320ac3b423693
Author: Michael Stahl 
Date:   Tue May 29 18:33:06 2018 +0200

sw_redlinehide: replace SwTextFrame::Modify() with SwClientNotify()

This is critical because it needs to know what SwTextNode sent the hint.

Fortunately it looks like we can just convert this one implementation
and the backward compat stuff in SwClient will keep the other
SwFrames working as before with their Modify().

Change-Id: I16f0bf7495002e7393148429640262cb38dc4849

diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 70f2566e06f2..456cfd4997f4 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -263,7 +263,7 @@ class SW_DLLPUBLIC SwTextFrame: public SwContentFrame
 virtual ~SwTextFrame() override;
 
 protected:
-virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override;
+virtual void SwClientNotify(SwModify const& rModify, SfxHint const& rHint) 
override;
 
 public:
 
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 047175b8eb8f..d5345e0822b4 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1264,13 +1264,55 @@ static bool isA11yRelevantAttribute(sal_uInt16 nWhich)
 return nWhich != RES_CHRATR_RSID;
 }
 
-void SwTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
+// Note: for now this overrides SwClient::SwClientNotify; the intermediary
+// classes still override SwClient::Modify, which should continue to work
+// as their implementation of SwClientNotify is SwClient's which calls Modify.
+// Therefore we also don't need to call SwClient::SwClientNotify(rModify, 
rHint)
+// because that's all it does, and this implementation calls
+// SwContentFrame::Modify() when appropriate.
+void SwTextFrame::SwClientNotify(SwModify const& rModify, SfxHint const& rHint)
 {
+auto const pHint(dynamic_cast());
+assert(pHint); // TODO this is the only type expected here for now
+
+SfxPoolItem const*const pOld(pHint->m_pOld);
+SfxPoolItem const*const pNew(pHint->m_pNew);
+
+#if 1
+if (m_pMergedPara)
+{
+bool good(false);
+struct HorribleDebugHack : public SwClient { SwClient * m; };
+std::vector const* 
p(reinterpret_cast 
const*>(_pMergedPara->listener));
+for (HorribleDebugHack const& h : *p)
+{
+if (h.GetRegisteredIn() == )
+{
+(void) h.m;
+good = true;
+break;
+}
+}
+assert(good);
+}
+#endif
+
 const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
 
 // modifications concerning frame attributes are processed by the base 
class
 if( IsInRange( aFrameFormatSetRange, nWhich ) || RES_FMT_CHG == nWhich )
 {
+if (m_pMergedPara)
+{   // ignore item set changes that don't apply
+SwTextNode const*const pAttrNode(
+(nWhich == RES_PAGEDESC || nWhich == RES_BREAK)
+? m_pMergedPara->pFirstNode
+: 

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - wsd/LOOLWSD.cpp

2018-05-29 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |   73 +---
 1 file changed, 38 insertions(+), 35 deletions(-)

New commits:
commit 3c6492101b967f103036ea2b4b9e627dd4ee29a8
Author: Ashod Nakashian 
Date:   Fri Feb 23 20:59:59 2018 -0500

wsd: refactor diskpace and session limit checks

Checks are now done after adding new sessions
to DocBroker rather than before, so the current
session being added doesn't need special handling.

The checks for diskspace is separated from that
of the number of sessions as they are unrelated.

Also, no reason to do the checks for convert-to
requests, since these don't have interactive
clients, rather the connections are closed after
the conversion.

Change-Id: Idc50cd38263e6779acdeed72d5eb876a3228c96e
Reviewed-on: https://gerrit.libreoffice.org/52680
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 3b645fe8f..48e915ab8 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -218,23 +218,24 @@ inline void shutdownLimitReached(WebSocketHandler& ws)
 }
 #endif
 
-inline void infoLimitReached(const WebSocketHandler* ws)
+inline void checkSessionLimitsAndWarnClients()
 {
-const std::string info = Poco::format(PAYLOAD_INFO_LIMIT_REACHED, 
LOOLWSD::MaxDocuments, LOOLWSD::MaxConnections);
-LOG_INF("Sending client 'limitreached' message: " << info);
-
-try
-{
-Util::alertAllUsers(info);
-ws->sendMessage(info);
-}
-catch (const std::exception& ex)
+if (DocBrokers.size() > LOOLWSD::MaxDocuments || LOOLWSD::NumConnections 
>= LOOLWSD::MaxConnections)
 {
-LOG_ERR("Error while shuting down socket on reaching limit: " << 
ex.what());
+const std::string info = Poco::format(PAYLOAD_INFO_LIMIT_REACHED, 
LOOLWSD::MaxDocuments, LOOLWSD::MaxConnections);
+LOG_INF("Sending client 'limitreached' message: " << info);
+
+try
+{
+Util::alertAllUsers(info);
+}
+catch (const std::exception& ex)
+{
+LOG_ERR("Error while shuting down socket on reaching limit: " << 
ex.what());
+}
 }
 }
 
-
 /// Internal implementation to alert all clients
 /// connected to any document.
 void alertAllUsersInternal(const std::string& msg)
@@ -252,6 +253,24 @@ void alertAllUsersInternal(const std::string& msg)
 docBroker->addCallback([msg, docBroker](){ 
docBroker->alertAllUsers(msg); });
 }
 }
+
+static void checkDiskSpaceAndWarnClients(const bool cacheLastCheck)
+{
+try
+{
+const std::string fs = 
FileUtil::checkDiskSpaceOnRegisteredFileSystems(cacheLastCheck);
+if (!fs.empty())
+{
+LOG_WRN("File system of [" << fs << "] is dangerously low on disk 
space.");
+alertAllUsersInternal("error: cmd=internal kind=diskfull");
+}
+}
+catch (const std::exception& exc)
+{
+LOG_WRN("Exception while checking disk-space and warning clients: " << 
exc.what());
+}
+}
+
 }
 
 /// Remove dead and idle DocBrokers.
@@ -302,12 +321,7 @@ static int forkChildren(const int number)
 
 if (number > 0)
 {
-const std::string fs = 
FileUtil::checkDiskSpaceOnRegisteredFileSystems(false);
-if (!fs.empty())
-{
-LOG_WRN("File system of " << fs << " dangerously low on disk 
space");
-alertAllUsersInternal("error: cmd=internal kind=diskfull");
-}
+checkDiskSpaceAndWarnClients(false);
 
 #ifdef KIT_IN_PROCESS
 forkLibreOfficeKit(LOOLWSD::ChildRoot, LOOLWSD::SysTemplate, 
LOOLWSD::LoTemplate, LO_JAIL_SUBPATH, number);
@@ -1507,23 +1521,6 @@ static std::shared_ptr 
createNewClientSession(const WebSocketHand
 const std::string statusReady = "statusindicator: ready";
 LOG_TRC("Sending to Client [" << statusReady << "].");
 ws->sendMessage(statusReady);
-
-const std::string fs = 
FileUtil::checkDiskSpaceOnRegisteredFileSystems();
-if (!fs.empty())
-{
-LOG_WRN("File system of [" << fs << "] is dangerously low on 
disk space.");
-const std::string diskfullMsg = "error: cmd=internal 
kind=diskfull";
-// Alert all existing sessions
-Util::alertAllUsers(diskfullMsg);
-ws->sendMessage(diskfullMsg);
-}
-#if !ENABLE_SUPPORT_KEY
-// Users of development versions get just an info when reaching 
max documents or connections
-if (DocBrokers.size() > LOOLWSD::MaxDocuments || 
LOOLWSD::NumConnections >= LOOLWSD::MaxConnections)
-{
-infoLimitReached(ws);
-}
-#endif
 }
 
 // In case of WOPI, if this session is not set as readonly, it might 
be set so
@@ -2285,6 +2282,12 @@ private:
 
 // Add and load the session.
  

[Libreoffice-commits] core.git: svtools/source

2018-05-29 Thread Caolán McNamara
 svtools/source/misc/embedhlp.cxx |   12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit e33399b804115c6f772428ac9f6616fda0d0908d
Author: Caolán McNamara 
Date:   Tue May 29 13:12:12 2018 +0100

forcepoint#43 endless update ole2 preview recursion

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

diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 9ea797c3fe2c..f2220b8bdfd0 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -228,6 +228,7 @@ struct EmbeddedObjectRef_Impl
 sal_Int64   nViewAspect;
 boolbIsLocked:1;
 boolbNeedUpdate:1;
+boolbUpdating:1;
 
 // #i104867#
 sal_uInt32  mnGraphicVersion;
@@ -239,6 +240,7 @@ struct EmbeddedObjectRef_Impl
 nViewAspect(embed::Aspects::MSOLE_CONTENT),
 bIsLocked(false),
 bNeedUpdate(false),
+bUpdating(false),
 mnGraphicVersion(0),
 aDefaultSizeForChart_In_100TH_MM(awt::Size(8000,7000))
 {}
@@ -252,6 +254,7 @@ struct EmbeddedObjectRef_Impl
 nViewAspect(r.nViewAspect),
 bIsLocked(r.bIsLocked),
 bNeedUpdate(r.bNeedUpdate),
+bUpdating(r.bUpdating),
 mnGraphicVersion(0),
 aDefaultSizeForChart_In_100TH_MM(r.aDefaultSizeForChart_In_100TH_MM)
 {
@@ -805,7 +808,14 @@ bool EmbeddedObjectRef::IsGLChart(const 
css::uno::Reference < css::embed::XEmbed
 
 void EmbeddedObjectRef::UpdateReplacement()
 {
-GetReplacement( true );
+if (mpImpl->bUpdating)
+{
+SAL_WARN("svtools.misc", "UpdateReplacement called while 
UpdateReplacement already underway");
+return;
+}
+mpImpl->bUpdating = true;
+GetReplacement(true);
+mpImpl->bUpdating = false;
 }
 
 void EmbeddedObjectRef::UpdateReplacementOnDemand()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/unx

2018-05-29 Thread Caolán McNamara
 vcl/unx/gtk3/gtk3gtkinst.cxx |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit 48cc955ec233b815449ffe0b340023cf2ab6abb6
Author: Caolán McNamara 
Date:   Tue May 29 11:26:07 2018 +0100

only get notified for user events, not api ones

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

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 9a1d58098e74..737bd4a3959c 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2514,9 +2514,23 @@ public:
 return OUString(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8);
 }
 
+virtual void disable_notify_events() override
+{
+g_signal_handler_block(m_pNotebook, m_nSignalId);
+GtkInstanceContainer::disable_notify_events();
+}
+
+virtual void enable_notify_events() override
+{
+GtkInstanceContainer::enable_notify_events();
+g_signal_handler_unblock(m_pNotebook, m_nSignalId);
+}
+
 virtual void remove_page(const OString& rIdent) override
 {
+disable_notify_events();
 gtk_notebook_remove_page(m_pNotebook, get_page_number(rIdent));
+enable_notify_events();
 }
 
 virtual ~GtkInstanceNotebook() override
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/uiconfig

2018-05-29 Thread Caolán McNamara
 cui/uiconfig/ui/positionsizedialog.ui |2 +-
 cui/uiconfig/ui/possizetabpage.ui |   21 ++---
 cui/uiconfig/ui/rotationtabpage.ui|6 +++---
 3 files changed, 14 insertions(+), 15 deletions(-)

New commits:
commit 46ac529c44d513c31942f13dd5b40f3e5d7c363f
Author: Caolán McNamara 
Date:   Tue May 29 10:53:06 2018 +0100

these spinbuttons should be focusable

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

diff --git a/cui/uiconfig/ui/positionsizedialog.ui 
b/cui/uiconfig/ui/positionsizedialog.ui
index a5af423d62a2..658d5d056f8e 100644
--- a/cui/uiconfig/ui/positionsizedialog.ui
+++ b/cui/uiconfig/ui/positionsizedialog.ui
@@ -88,7 +88,7 @@
 
   
 True
-False
+True
 True
 True
 
diff --git a/cui/uiconfig/ui/possizetabpage.ui 
b/cui/uiconfig/ui/possizetabpage.ui
index 76fffb89d621..94e7d628089e 100644
--- a/cui/uiconfig/ui/possizetabpage.ui
+++ b/cui/uiconfig/ui/possizetabpage.ui
@@ -2,7 +2,6 @@
 
 
   
-  
   
 -120
 240
@@ -86,7 +85,7 @@
 
   
 True
-False
+True
 True
 adjustmentPOS
 2
@@ -99,7 +98,7 @@
 
   
 True
-False
+True
 True
 adjustmentPOS1
 2
@@ -249,7 +248,7 @@
 
   
 True
-False
+True
 True
 adjustmentSIZE
 2
@@ -262,7 +261,7 @@
 
   
 True
-False
+True
 True
 adjustmentSIZE1
 2
@@ -276,7 +275,7 @@
   
 _Keep ratio
 True
-False
+True
 False
 True
 0
@@ -316,7 +315,7 @@
   
 
 
-   
+  
 True
 True
 center
@@ -401,7 +400,7 @@
   
 Positio_n
 True
-False
+True
 False
 True
 0
@@ -418,7 +417,7 @@
   
 _Size
 True
-False
+True
 False
 True
 0
@@ -475,7 +474,7 @@
   
 _Fit width to text
 True
-False
+True
 False
 True
 0
@@ -492,7 +491,7 @@
   
 Fit _height to text
 True
-False
+True
 False
 True
 0
diff --git a/cui/uiconfig/ui/rotationtabpage.ui 
b/cui/uiconfig/ui/rotationtabpage.ui
index af5f9ec6260c..0bb66f4d4282 100644
--- a/cui/uiconfig/ui/rotationtabpage.ui
+++ b/cui/uiconfig/ui/rotationtabpage.ui
@@ -80,7 +80,7 @@
 
   
 True
-False
+True
 True
 adjustmentPOS1
 2
@@ -93,7 +93,7 @@
 
   
 True
-False
+True
 True
 adjustmentPOS2
 2
@@ -231,7 +231,7 @@
 
   
 True
-False
+True
 True
 adjustmentANGLE
 2
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - wsd/FileServer.cpp

2018-05-29 Thread Ashod Nakashian
 wsd/FileServer.cpp |   11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 0835d3d24500525c532c680820806a8847e0d573
Author: Ashod Nakashian 
Date:   Fri Feb 23 19:16:57 2018 -0500

wsd: warn for invalid file requests by clients instead of error

Also, logs append new-line automatically.

Change-Id: Ie5b09e454236cab2cdaa14d6f8be7b67e8fb1000
Reviewed-on: https://gerrit.libreoffice.org/52679
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 9c9ae5489..cd49d28dd 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -436,7 +436,7 @@ void FileServerRequestHandler::handleRequest(const 
HTTPRequest& request, Poco::M
 }
 catch (const Poco::FileNotFoundException& exc)
 {
-LOG_ERR("FileServerRequestHandler: " << exc.displayText());
+LOG_WRN("FileServerRequestHandler: " << exc.displayText());
 
 // 404 not found
 std::ostringstream oss;
@@ -455,7 +455,7 @@ void FileServerRequestHandler::readDirToHash(const 
std::string , const
 struct stat fileStat;
 DIR *workingdir;
 
-LOG_TRC("Pre-reading directory: " << basePath << path << "\n");
+LOG_TRC("Pre-reading directory: " << basePath << path);
 workingdir = opendir((basePath + path).c_str());
 
 while ((currentFile = readdir(workingdir)) != NULL)
@@ -471,7 +471,7 @@ void FileServerRequestHandler::readDirToHash(const 
std::string , const
 
 else if (S_ISREG(fileStat.st_mode))
 {
-LOG_TRC("Reading file: '" << basePath << relPath << " as '" << 
relPath << "'\n");
+LOG_TRC("Reading file: '" << basePath << relPath << " as '" << 
relPath << "'");
 
 std::ifstream file(basePath + relPath, std::ios::binary);
 
@@ -486,7 +486,8 @@ void FileServerRequestHandler::readDirToHash(const 
std::string , const
 compressedFile.reserve(fileStat.st_size);
 std::string uncompressedFile;
 uncompressedFile.reserve(fileStat.st_size);
-do {
+do
+{
 file.read([0], fileStat.st_size);
 const long unsigned int size = file.gcount();
 if (size == 0)
@@ -597,7 +598,7 @@ void FileServerRequestHandler::preprocessFile(const 
HTTPRequest& request, Poco::
 {
 tokenTtl = std::stoul(accessTokenTtl);
 }
-catch(const std::exception& exc)
+catch (const std::exception& exc)
 {
 LOG_ERR("access_token_ttl must be represented as the number of 
milliseconds since January 1, 1970 UTC, when the token will expire");
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/unx

2018-05-29 Thread Caolán McNamara
 vcl/unx/gtk3/gtk3gtkinst.cxx |   15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 84be319c26ddae9a4022ffc1d01a3f4fa82e3a3e
Author: Caolán McNamara 
Date:   Tue May 29 14:23:03 2018 +0100

remember button pressed to reuse for move

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

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 737bd4a3959c..e956f4a3c93b 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -3661,6 +3661,7 @@ private:
 ScopedVclPtrInstance m_xDevice;
 std::vector m_aBuffer;
 cairo_surface_t* m_pSurface;
+sal_uInt16 m_nLastMouseButton;
 gulong m_nDrawSignalId;
 gulong m_nSizeAllocateSignalId;
 gulong m_nButtonPressSignalId;
@@ -3790,17 +3791,16 @@ private:
 return false;
 }
 
-sal_uInt16 nButton;
 switch (pEvent->button)
 {
 case 1:
-nButton = MOUSE_LEFT;
+m_nLastMouseButton = MOUSE_LEFT;
 break;
 case 2:
-nButton = MOUSE_MIDDLE;
+m_nLastMouseButton = MOUSE_MIDDLE;
 break;
 case 3:
-nButton = MOUSE_RIGHT;
+m_nLastMouseButton = MOUSE_RIGHT;
 break;
 default:
 return false;
@@ -3808,8 +3808,8 @@ private:
 
 Point aPos(pEvent->x, pEvent->y);
 sal_uInt32 nModCode = GtkSalFrame::GetMouseModCode(pEvent->state);
-sal_uInt16 nCode = nButton | (nModCode & (KEY_SHIFT | KEY_MOD1 | 
KEY_MOD2));
-MouseEvent aMEvt(aPos, nClicks, ImplGetMouseButtonMode(nButton, 
nModCode), nCode, nCode);
+sal_uInt16 nCode = m_nLastMouseButton | (nModCode & (KEY_SHIFT | 
KEY_MOD1 | KEY_MOD2));
+MouseEvent aMEvt(aPos, nClicks, 
ImplGetMouseButtonMode(m_nLastMouseButton, nModCode), nCode, nCode);
 
 if (nEventType == SalEvent::MouseButtonDown)
 m_aMousePressHdl.Call(aMEvt);
@@ -3828,7 +3828,7 @@ private:
 {
 Point aPos(pEvent->x, pEvent->y);
 sal_uInt32 nModCode = GtkSalFrame::GetMouseModCode(pEvent->state);
-sal_uInt16 nCode = (nModCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2));
+sal_uInt16 nCode = m_nLastMouseButton | (nModCode & (KEY_SHIFT | 
KEY_MOD1 | KEY_MOD2));
 MouseEvent aMEvt(aPos, 0, ImplGetMouseMoveMode(nModCode), nCode, 
nCode);
 
 m_aMouseMotionHdl.Call(aMEvt);
@@ -3868,6 +3868,7 @@ public:
 , m_pAccessible(nullptr)
 , m_xDevice(nullptr, Size(1, 1), DeviceFormat::DEFAULT)
 , m_pSurface(nullptr)
+, m_nLastMouseButton(0)
 , m_nDrawSignalId(g_signal_connect(m_pDrawingArea, "draw", 
G_CALLBACK(signalDraw), this))
 , m_nSizeAllocateSignalId(g_signal_connect(m_pDrawingArea, 
"size_allocate", G_CALLBACK(signalSizeAllocate), this))
 , m_nButtonPressSignalId(g_signal_connect(m_pDrawingArea, 
"button-press-event", G_CALLBACK(signalButton), this))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   3   4   >