[Libreoffice-commits] core.git: codemaker/source include/codemaker include/registry registry/source sal/textenc store/source

2017-10-19 Thread Noel Grandin
 codemaker/source/codemaker/global.cxx  |2 
 codemaker/source/cppumaker/cppuoptions.cxx |2 
 codemaker/source/cppumaker/cppuoptions.hxx |2 
 codemaker/source/cppumaker/cpputype.cxx|   36 +++
 codemaker/source/javamaker/javaoptions.cxx |2 
 codemaker/source/javamaker/javaoptions.hxx |2 
 include/codemaker/global.hxx   |4 
 include/codemaker/options.hxx  |2 
 include/registry/registry.hxx  |   10 +-
 include/registry/writer.hxx|2 
 registry/source/keyimpl.cxx|4 
 registry/source/keyimpl.hxx|4 
 registry/source/reflread.cxx   |  144 ++---
 registry/source/reflwrit.cxx   |   12 +-
 sal/textenc/textenc.cxx|2 
 store/source/storbios.cxx  |8 -
 store/source/storbios.hxx  |8 -
 store/source/stordata.cxx  |8 -
 store/source/stordata.hxx  |   10 +-
 store/source/stortree.cxx  |4 
 store/source/stortree.hxx  |4 
 21 files changed, 136 insertions(+), 136 deletions(-)

New commits:
commit 14d45665433eec974acd96f813f2bf314bdb3eba
Author: Noel Grandin 
Date:   Thu Oct 19 11:09:13 2017 +0200

loplugin:constmethod in codemaker,registry,store

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

diff --git a/codemaker/source/codemaker/global.cxx 
b/codemaker/source/codemaker/global.cxx
index 46d5a07e35a6..30484f7e6111 100644
--- a/codemaker/source/codemaker/global.cxx
+++ b/codemaker/source/codemaker/global.cxx
@@ -273,7 +273,7 @@ FileStream::~FileStream()
 osl_closeFile(m_file);
 }
 
-bool FileStream::isValid()
+bool FileStream::isValid() const
 {
 if ( m_file )
 return true;
diff --git a/codemaker/source/cppumaker/cppuoptions.cxx 
b/codemaker/source/cppumaker/cppuoptions.cxx
index af644af1538f..d4575968b784 100644
--- a/codemaker/source/cppumaker/cppuoptions.cxx
+++ b/codemaker/source/cppumaker/cppuoptions.cxx
@@ -320,7 +320,7 @@ OString CppuOptions::prepareHelp()
 return help;
 }
 
-OString CppuOptions::prepareVersion()
+OString CppuOptions::prepareVersion() const
 {
 OString version = m_program + " Version 2.0\n\n";
 return version;
diff --git a/codemaker/source/cppumaker/cppuoptions.hxx 
b/codemaker/source/cppumaker/cppuoptions.hxx
index 497fbd96402b..882dfa66dbef 100644
--- a/codemaker/source/cppumaker/cppuoptions.hxx
+++ b/codemaker/source/cppumaker/cppuoptions.hxx
@@ -32,7 +32,7 @@ public:
 
 OString  prepareHelp() override;
 
-OString  prepareVersion();
+OString  prepareVersion() const;
 
 protected:
 };
diff --git a/codemaker/source/cppumaker/cpputype.cxx 
b/codemaker/source/cppumaker/cpputype.cxx
index dafbe682fd8b..bff92a920d57 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -167,7 +167,7 @@ public:
 CppuOptions const & options);
 
 void dumpDependedTypes(
-codemaker::GeneratedTypeSet & generated, CppuOptions const & options);
+codemaker::GeneratedTypeSet & generated, CppuOptions const & options) 
const;
 
 virtual void dumpHdlFile(
 FileStream & out, codemaker::cppumaker::Includes & includes) {
@@ -176,7 +176,7 @@ public:
 
 virtual void dumpHppFile(FileStream& o, codemaker::cppumaker::Includes & 
includes) = 0;
 
-OUString dumpHeaderDefine(FileStream& o, OUString const & extension);
+OUString dumpHeaderDefine(FileStream& o, OUString const & extension) const;
 
 void dumpGetCppuType(FileStream & out);
 
@@ -198,7 +198,7 @@ public:
 OUString getTypeClass(OUString const & name, bool cStyle = false);
 
 void dumpCppuGetType(
-FileStream & out, OUString const & name, OUString const * ownName = 
nullptr);
+FileStream & out, OUString const & name, OUString const * ownName = 
nullptr) const;
 
 sal_uInt32 getInheritedMemberCount();
 
@@ -454,7 +454,7 @@ bool CppuType::dumpFile(
 }
 
 void CppuType::dumpDependedTypes(
-codemaker::GeneratedTypeSet & generated, CppuOptions const & options)
+codemaker::GeneratedTypeSet & generated, CppuOptions const & options) const
 {
 if (!options.isValid("-nD")) {
 codemaker::cppumaker::Dependencies::Map const & map
@@ -466,7 +466,7 @@ void CppuType::dumpDependedTypes(
 }
 
 OUString CppuType::dumpHeaderDefine(
-FileStream & out, OUString const & extension)
+FileStream & out, OUString const & extension) const
 {
 OUString def(
 "INCLUDED_" + name_.replace('.', '_').toAsciiUpperCase() + "_"
@@ -849,7 +849,7 @@ void CppuType::dumpType(
 }
 
 void CppuType::dumpCppuGetType(
-FileStream & out, OUString const & name, OUString const * ownName)
+FileStream & out, OUString const & name, OUString const * ownName) const
 {
 //TO

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

2017-10-19 Thread Noel Grandin
 filter/source/msfilter/escherex.cxx  |   38 ++-
 include/filter/msfilter/escherex.hxx |   15 ++---
 2 files changed, 27 insertions(+), 26 deletions(-)

New commits:
commit 8f8a1e301c7f5b9e924e192ab68b7baa23dcc47a
Author: Noel Grandin 
Date:   Wed Oct 18 16:11:00 2017 +0200

use std::unique_ptr in EscherSolverContainer

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

diff --git a/filter/source/msfilter/escherex.cxx 
b/filter/source/msfilter/escherex.cxx
index 4efaa4fffcc6..7e5e3e1460df 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -19,6 +19,7 @@
 
 #include "eschesdo.hxx"
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -3816,14 +3817,11 @@ EscherPersistTable::EscherPersistTable()
 
 EscherPersistTable::~EscherPersistTable()
 {
-for(EscherPersistEntry* i : maPersistTable) {
-delete i;
-}
 }
 
 bool EscherPersistTable::PtIsID( sal_uInt32 nID )
 {
-for(EscherPersistEntry* pPtr : maPersistTable) {
+for(auto const & pPtr : maPersistTable) {
 if ( pPtr->mnID == nID ) {
 return true;
 }
@@ -3833,16 +3831,14 @@ bool EscherPersistTable::PtIsID( sal_uInt32 nID )
 
 void EscherPersistTable::PtInsert( sal_uInt32 nID, sal_uInt32 nOfs )
 {
-maPersistTable.push_back( new EscherPersistEntry( nID, nOfs ) );
+maPersistTable.push_back( o3tl::make_unique( nID, nOfs 
) );
 }
 
 void EscherPersistTable::PtDelete( sal_uInt32 nID )
 {
-::std::vector< EscherPersistEntry* >::iterator it = maPersistTable.begin();
-for( ; it != maPersistTable.end() ; ++it )
+for(auto it = maPersistTable.begin(); it != maPersistTable.end() ; ++it)
 {
 if ( (*it)->mnID == nID ) {
-delete *it;
 maPersistTable.erase( it );
 break;
 }
@@ -3851,7 +3847,7 @@ void EscherPersistTable::PtDelete( sal_uInt32 nID )
 
 sal_uInt32 EscherPersistTable::PtGetOffsetByID( sal_uInt32 nID )
 {
-for(EscherPersistEntry* pPtr : maPersistTable) {
+for(auto const & pPtr : maPersistTable) {
 if ( pPtr->mnID == nID ) {
 return pPtr->mnOffset;
 }
@@ -3861,7 +3857,7 @@ sal_uInt32 EscherPersistTable::PtGetOffsetByID( 
sal_uInt32 nID )
 
 void EscherPersistTable::PtReplace( sal_uInt32 nID, sal_uInt32 nOfs )
 {
-for(EscherPersistEntry* pPtr : maPersistTable) {
+for(auto const & pPtr : maPersistTable) {
 if ( pPtr->mnID == nID ) {
 pPtr->mnOffset = nOfs;
 return;
@@ -3871,7 +3867,7 @@ void EscherPersistTable::PtReplace( sal_uInt32 nID, 
sal_uInt32 nOfs )
 
 void EscherPersistTable::PtReplaceOrInsert( sal_uInt32 nID, sal_uInt32 nOfs )
 {
-for(EscherPersistEntry* pPtr : maPersistTable) {
+for(auto const & pPtr : maPersistTable) {
 if ( pPtr->mnID == nID ) {
 pPtr->mnOffset = nOfs;
 return;
@@ -4673,19 +4669,17 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( 
bool bFirst )
 return nRule;
 }
 
+EscherSolverContainer::EscherSolverContainer()
+{
+}
+
 EscherSolverContainer::~EscherSolverContainer()
 {
-for(EscherShapeListEntry* i : maShapeList) {
-delete i;
-}
-for(EscherConnectorListEntry* i : maConnectorList) {
-delete i;
-}
 }
 
 void EscherSolverContainer::AddShape( const css::uno::Reference< 
css::drawing::XShape > & rXShape, sal_uInt32 nId )
 {
-maShapeList.push_back( new EscherShapeListEntry( rXShape, nId ) );
+maShapeList.push_back( o3tl::make_unique( rXShape, 
nId ) );
 }
 
 void EscherSolverContainer::AddConnector(
@@ -4696,12 +4690,12 @@ void EscherSolverContainer::AddConnector(
 css::uno::Reference< css::drawing::XShape > const & rConB
 )
 {
-maConnectorList.push_back( new EscherConnectorListEntry( rConnector, rPA, 
rConA, rPB, rConB ) );
+maConnectorList.push_back( o3tl::make_unique( 
rConnector, rPA, rConA, rPB, rConB ) );
 }
 
 sal_uInt32 EscherSolverContainer::GetShapeId( const css::uno::Reference< 
css::drawing::XShape > & rXShape ) const
 {
-for (EscherShapeListEntry* pPtr : maShapeList)
+for (auto const & pPtr : maShapeList)
 {
 if ( rXShape == pPtr->aXShape )
 return pPtr->n_EscherId;
@@ -4723,7 +4717,7 @@ void EscherSolverContainer::WriteSolver( SvStream& rStrm )
 
 EscherConnectorRule aConnectorRule;
 aConnectorRule.nRuleId = 2;
-for (EscherConnectorListEntry* pPtr : maConnectorList)
+for (auto const & pPtr : maConnectorList)
 {
 aConnectorRule.ncptiA  = aConnectorRule.ncptiB = 0x;
 aConnectorRule.nShapeC = GetShapeId( pPtr->mXConnector );
@@ -4966,7 +4960,7 @@ void EscherEx::InsertAtCurrentPos( sal_uInt32 nBytes )
 sal_uInt32  nSize, nType, nSource, nBufSize, nToCopy, nCurPos = 
mpOutStrm->Tell();
 
 // adjust persist table
-for(

[Libreoffice-commits] core.git: compilerplugins/clang

2017-10-19 Thread Stephan Bergmann
 compilerplugins/clang/pluginhandler.cxx |   11 ++-
 compilerplugins/clang/pluginhandler.hxx |1 +
 2 files changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 15dce20e8b97dbd0179f01910ca4d0027e80ff4e
Author: Stephan Bergmann 
Date:   Thu Oct 19 21:33:08 2017 +0200

Fully ignore inappropriately named loplugins in unit-test mode

...even if they implement PPCallbacks, so filtering them out in
HandleTranslationUnit was ineffective.

Change-Id: I9df8103a50739f3176e6d63accfd0334da7faa9a
Reviewed-on: https://gerrit.libreoffice.org/43575
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/compilerplugins/clang/pluginhandler.cxx 
b/compilerplugins/clang/pluginhandler.cxx
index 5712f02dcc3a..d82a369cb119 100644
--- a/compilerplugins/clang/pluginhandler.cxx
+++ b/compilerplugins/clang/pluginhandler.cxx
@@ -55,6 +55,7 @@ static bool unitTestMode = false;
 
 PluginHandler::PluginHandler( CompilerInstance& compiler, const std::vector< 
std::string >& args )
 : compiler( compiler )
+, 
mainFileName(compiler.getASTContext().getSourceManager().getFileEntryForID(compiler.getASTContext().getSourceManager().getMainFileID())->getName())
 , rewriter( compiler.getSourceManager(), compiler.getLangOpts())
 , scope( "mainfile" )
 , warningsAsErrors( false )
@@ -120,6 +121,10 @@ void PluginHandler::createPlugins( std::set< std::string > 
rewriters )
 for( int i = 0; i < pluginCount; ++i )
 {
 const char* name = plugins[i].optionName;
+// When in unit-test mode, ignore plugins whose names don't match the 
filename of the test,
+// so that we only generate warnings for the plugin that we want to 
test.
+if (unitTestMode && mainFileName.find(plugins[ i ].optionName) == 
StringRef::npos)
+continue;
 if( rewriters.erase( name ) != 0 )
 plugins[ i ].object = plugins[ i ].create( 
Plugin::InstantiationData { name, *this, compiler, &rewriter } );
 else if( plugins[ i ].byDefault )
@@ -179,7 +184,6 @@ void PluginHandler::HandleTranslationUnit( ASTContext& 
context )
 {
 if( context.getDiagnostics().hasErrorOccurred())
 return;
-StringRef const mainFileName = 
context.getSourceManager().getFileEntryForID(context.getSourceManager().getMainFileID())->getName();
 if (mainFileName.endswith(".ii"))
 {
 report(DiagnosticsEngine::Fatal,
@@ -191,10 +195,7 @@ void PluginHandler::HandleTranslationUnit( ASTContext& 
context )
 {
 if( plugins[ i ].object != NULL )
 {
-// When in unit-test mode, ignore plugins whose names don't match 
the filename of the test,
-// so that we only generate warnings for the plugin that we want 
to test.
-if (!unitTestMode || mainFileName.find(plugins[ i ].optionName) != 
StringRef::npos)
-plugins[ i ].object->run();
+plugins[ i ].object->run();
 }
 }
 #if defined _WIN32
diff --git a/compilerplugins/clang/pluginhandler.hxx 
b/compilerplugins/clang/pluginhandler.hxx
index 9c3d0a49c839..63210fa11df4 100644
--- a/compilerplugins/clang/pluginhandler.hxx
+++ b/compilerplugins/clang/pluginhandler.hxx
@@ -43,6 +43,7 @@ private:
 void createPlugins( std::set< std::string > rewriters );
 DiagnosticBuilder report( DiagnosticsEngine::Level level, StringRef 
message, SourceLocation loc = SourceLocation());
 CompilerInstance& compiler;
+StringRef const mainFileName;
 Rewriter rewriter;
 std::set< SourceLocation > removals;
 std::string scope;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Gabor Kelemen
 avmedia/inc/strings.hrc   |2 ++
 avmedia/source/framework/MediaControlBase.cxx |2 ++
 2 files changed, 4 insertions(+)

New commits:
commit 2161abff3510dd591db30d94911241436c90c4d4
Author: Gabor Kelemen 
Date:   Thu Oct 19 19:48:11 2017 +0200

tdf#87808 Add missing tooltips to Media Playback toolbar

For the Position and the Volume sliders

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

diff --git a/avmedia/inc/strings.hrc b/avmedia/inc/strings.hrc
index b4e260ad4363..78c39db02682 100644
--- a/avmedia/inc/strings.hrc
+++ b/avmedia/inc/strings.hrc
@@ -34,6 +34,8 @@
 #define AVMEDIA_STR_ZOOM_100NC_("AVMEDIA_STR_ZOOM_100", "100%")
 #define AVMEDIA_STR_ZOOM_200NC_("AVMEDIA_STR_ZOOM_200", "200%")
 #define AVMEDIA_STR_ZOOM_FITNC_("AVMEDIA_STR_ZOOM_FIT", "Scaled")
+#define AVMEDIA_STR_VOLUME  NC_("AVMEDIA_STR_VOLUME", "Volume")
+#define AVMEDIA_STR_POSITIONNC_("AVMEDIA_STR_POSITION", "Position")
 #define AVMEDIA_STR_MEDIAPLAYER NC_("AVMEDIA_STR_MEDIAPLAYER", "Media 
Player")
 #define AVMEDIA_MEDIA_PATH  NC_("AVMEDIA_MEDIA_PATH", "Media Path")
 #define AVMEDIA_MEDIA_PATH_DEFAULT  NC_("AVMEDIA_MEDIA_PATH_DEFAULT", "No 
Media Selected")
diff --git a/avmedia/source/framework/MediaControlBase.cxx 
b/avmedia/source/framework/MediaControlBase.cxx
index 9b844907cbec..22d2b8896d3b 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -129,10 +129,12 @@ void MediaControlBase::InitializeWidgets()
 
 mpVolumeSlider->SetRange( Range( AVMEDIA_DB_RANGE, 0 ) );
 mpVolumeSlider->SetUpdateMode( true );
+mpVolumeSlider->SetQuickHelpText( AvmResId( AVMEDIA_STR_VOLUME ));
 mpVolumeSlider->SetHelpId( HID_AVMEDIA_VOLUMESLIDER );
 
 mpTimeSlider->SetRange( Range( 0, AVMEDIA_TIME_RANGE ) );
 mpTimeSlider->SetUpdateMode( true );
+mpTimeSlider->SetQuickHelpText( AvmResId( AVMEDIA_STR_POSITION ));
 mpTimeSlider->SetStyle(WB_HORZ | WB_DRAG | WB_3DLOOK);
 mpTimeSlider->SetScrollTypeSet(true);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Takeshi Abe
 include/svtools/treelistentry.hxx   |2 +-
 svtools/source/contnr/treelistentry.cxx |   13 -
 2 files changed, 1 insertion(+), 14 deletions(-)

New commits:
commit 44f54bf392375b789e3e3c3e868c9426d6cd4e41
Author: Takeshi Abe 
Date:   Wed Oct 18 17:22:02 2017 +0900

svtools: SvTreeListEntry's copy ctor is unnecessary

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

diff --git a/include/svtools/treelistentry.hxx 
b/include/svtools/treelistentry.hxx
index 57a7056cdad7..899e3f8bbc96 100644
--- a/include/svtools/treelistentry.hxx
+++ b/include/svtools/treelistentry.hxx
@@ -70,13 +70,13 @@ private:
 void SetListPositions();
 void InvalidateChildrensListPositions();
 
+SvTreeListEntry(const SvTreeListEntry& r) = delete;
 void operator=(SvTreeListEntry const&) = delete;
 
 public:
 static const size_t ITEM_NOT_FOUND = SAL_MAX_SIZE;
 
 SvTreeListEntry();
-SvTreeListEntry(const SvTreeListEntry& r);
 virtual ~SvTreeListEntry();
 
 bool HasChildren() const;
diff --git a/svtools/source/contnr/treelistentry.cxx 
b/svtools/source/contnr/treelistentry.cxx
index 72436e9f5fa6..aab1f37597c2 100644
--- a/svtools/source/contnr/treelistentry.cxx
+++ b/svtools/source/contnr/treelistentry.cxx
@@ -20,7 +20,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -60,18 +59,6 @@ SvTreeListEntry::SvTreeListEntry()
 {
 }
 
-SvTreeListEntry::SvTreeListEntry(const SvTreeListEntry& r)
-: pParent(nullptr)
-, nAbsPos(r.nAbsPos)
-, nListPos(r.nListPos & 0x7FFF)
-, pUserData(r.pUserData)
-, nEntryFlags(r.nEntryFlags)
-, 
maBackColor(Application::GetSettings().GetStyleSettings().GetWindowColor())
-{
-for (auto const& it : r.m_Children)
-m_Children.push_back(o3tl::make_unique(*it));
-}
-
 SvTreeListEntry::~SvTreeListEntry()
 {
 #ifdef DBG_UTIL
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: How to run multiple instances of Writer simultaneously?

2017-10-19 Thread Jens Tröger
Thanks Matthew,

What I need is "bulk processing" of documents. I currently run LO in headless 
mode and open the documents in read-only format (macros disabled) hoping that 
would improve performance. To answer to your points: no interactiveness and 
high throughput to scrape document content.

Your suggestion of running a pool of LO instances seems to be implemented by 
the oodaemon (https://sourceforge.net/projects/oodaemon/) that I mentioned 
earlier, but the project seems quite dated.

Cheers,
Jens


> On Oct 20, 2017, at 13:24, Matthew J. Francis  wrote:
> 
> As I mentioned before, while a single LO process can serve multiple clients 
> simultaneously, and with low latency for starting a request, it will likely 
> struggle to fully utilise all the threads of a modern CPU.
> 
> I believe you still haven't mentioned what the specific use case you're 
> trying to achieve is - what are its requirements for interactiveness and/or 
> throughput? (i.e. is it an interactive process that will primarily require 
> low latency, a bulk process that requires high overall throughput but may not 
> mind if individual requests are delayed for a short time, or something that 
> requires both low request latency and high throughput?)
> 
> If you need both the lowest request latency and the highest throughput on a 
> single machine, you may need to try adopting a hybrid model - start a pool of 
> independent LO instances of an appropriate size for your number of CPU 
> threads, then feed them jobs one at a time each. There is definitely no 
> canned answer for this, so you would have to do your own benchmarking and 
> tuning to find the optimum pool size for the resources of your local machine.
> 
> Regards
> Matthew Francis

--
Jens Tröger
http://savage.light-speed.de/

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


Re: How to run multiple instances of Writer simultaneously?

2017-10-19 Thread Kaganski Mike
Hi,

On 10/19/2017 1:01 AM, Jens Tröger wrote:
> It seems to me that spawning multiple Writer instances as individual 
> processes (using Python’s subprocess) and then shutting one process down 
> kills the other as well. What vital resources are being shared here, and what 
> is the recommended way of spawning multiple Writers (i.e. opening multiple 
> documents) simultaneously? There’s more information in the forum’s post.


Maybe the real question is how to close a document without forcing 
soffice process (which is shared in your case among all open documents) 
shutdown?

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


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

2017-10-19 Thread Julien Nabet
 vcl/inc/printerinfomanager.hxx |4 ++--
 vcl/unx/generic/printer/printerinfomanager.cxx |   22 +++---
 2 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit c16804de78b1cf1ad906eaacbcc7c51d35218d8a
Author: Julien Nabet 
Date:   Wed Oct 18 22:39:33 2017 +0200

Replace list by unordered_set for m_aAlternateFiles (vcl)

Change-Id: I66ea61972fed87245b33dfe355eff58d23041120
Reviewed-on: https://gerrit.libreoffice.org/43520
Reviewed-by: Noel Grandin 
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/vcl/inc/printerinfomanager.hxx b/vcl/inc/printerinfomanager.hxx
index 3fe420150cea..315d7253ae8b 100644
--- a/vcl/inc/printerinfomanager.hxx
+++ b/vcl/inc/printerinfomanager.hxx
@@ -21,9 +21,9 @@
 #define INCLUDED_VCL_PRINTERINFOMANAGER_HXX
 
 #include 
-#include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -90,7 +90,7 @@ protected:
 OUString m_aFile;
 // details other config files that have this printer
 // in case of removal all have to be removed
-std::list< OUString > m_aAlternateFiles;
+std::unordered_set< OUString, OUStringHash > m_aAlternateFiles;
 // group in m_aFile containing the printer
 // this must be unique over all configuration files
 // it usually should be the printer name
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx 
b/vcl/unx/generic/printer/printerinfomanager.cxx
index 842f11deea22..ac5779a6ae57 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -463,7 +463,7 @@ void PrinterInfoManager::initialize()
 if( find_it != m_aPrinters.end() )
 {
 aPrinter.m_aAlternateFiles = 
find_it->second.m_aAlternateFiles;
-aPrinter.m_aAlternateFiles.push_front( 
find_it->second.m_aFile );
+aPrinter.m_aAlternateFiles.emplace( 
find_it->second.m_aFile );
 }
 m_aPrinters[ aPrinterName ] = aPrinter;
 }
@@ -627,10 +627,9 @@ bool PrinterInfoManager::writePrinterConfig()
 {
 rofiles[ it->second.m_aFile ] = 1;
 // update alternate file list
-// the remove operation ensures uniqueness of each 
alternate
-it->second.m_aAlternateFiles.remove( it->second.m_aFile );
-it->second.m_aAlternateFiles.remove( files.begin()->first 
);
-it->second.m_aAlternateFiles.push_front( 
it->second.m_aFile );
+// be sure m_aAlternateFiles doesn't contain the m_aFile 
value
+it->second.m_aAlternateFiles.erase( files.begin()->first );
+it->second.m_aAlternateFiles.emplace( it->second.m_aFile );
 // update file
 it->second.m_aFile = files.begin()->first;
 }
@@ -770,11 +769,13 @@ bool PrinterInfoManager::removePrinter( const OUString& 
rPrinterName, bool bChec
 bSuccess = false;
 else
 {
-for( std::list< OUString >::const_iterator file_it = 
it->second.m_aAlternateFiles.begin();
-file_it != it->second.m_aAlternateFiles.end() && bSuccess; 
++file_it )
+for (auto const& file : it->second.m_aAlternateFiles)
 {
-if( ! checkWriteability( *file_it ) )
+if( ! checkWriteability(file) )
+{
 bSuccess = false;
+break;
+}
 }
 }
 if( bSuccess && ! bCheckOnly )
@@ -783,10 +784,9 @@ bool PrinterInfoManager::removePrinter( const OUString& 
rPrinterName, bool bChec
 Config aConfig( it->second.m_aFile );
 aConfig.DeleteGroup( it->second.m_aGroup );
 aConfig.Flush();
-for( std::list< OUString >::const_iterator file_it = 
it->second.m_aAlternateFiles.begin();
-file_it != it->second.m_aAlternateFiles.end() && bSuccess; 
++file_it )
+for (auto const& file : it->second.m_aAlternateFiles)
 {
-Config aAltConfig( *file_it );
+Config aAltConfig( file );
 aAltConfig.DeleteGroup( it->second.m_aGroup );
 aAltConfig.Flush();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Takeshi Abe
 include/svtools/treelistbox.hxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit ba9e09be72a6bd5709fcc51f5dc3cb70b3b80540
Author: Takeshi Abe 
Date:   Thu Oct 19 18:11:02 2017 +0900

Kill unused SV_LBOX_DD_FORMAT

Change-Id: I242339aa7a3f7c12b84cdcd97fe670491a0217a5
Reviewed-on: https://gerrit.libreoffice.org/43541
Tested-by: Jenkins 
Reviewed-by: Takeshi Abe 

diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index d9e4feb76cf0..a9048ab0c705 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -772,8 +772,6 @@ public:
 virtual FactoryFunction GetUITestFactory() const override;
 };
 
-#define SV_LBOX_DD_FORMAT "SV_LBOX_DD_FORMAT"
-
 class SvInplaceEdit2
 {
 Link aCallBackHdl;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: How to run multiple instances of Writer simultaneously?

2017-10-19 Thread Matthew J. Francis

On 20/10/2017 10:04, Jens Tröger wrote:


Also, I have performance concerns for this approach: loading and running 
through just two documents simultaneously seemed to be unproportionally slow!?


As I mentioned before, while a single LO process can serve multiple 
clients simultaneously, and with low latency for starting a request, it 
will likely struggle to fully utilise all the threads of a modern CPU.


I believe you still haven't mentioned what the specific use case you're 
trying to achieve is - what are its requirements for interactiveness 
and/or throughput? (i.e. is it an interactive process that will 
primarily require low latency, a bulk process that requires high overall 
throughput but may not mind if individual requests are delayed for a 
short time, or something that requires both low request latency and high 
throughput?)


If you need both the lowest request latency and the highest throughput 
on a single machine, you may need to try adopting a hybrid model - start 
a pool of independent LO instances of an appropriate size for your 
number of CPU threads, then feed them jobs one at a time each. There is 
definitely no canned answer for this, so you would have to do your own 
benchmarking and tuning to find the optimum pool size for the resources 
of your local machine.


Regards
Matthew Francis
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: How to run multiple instances of Writer simultaneously?

2017-10-19 Thread Jens Tröger
Thank you everybody for your feedback, that was very helpful. Here’s my current 
working implementation:

- Spawn the soffice process which will function as a “server”

customenvdir = tempfile.TemporaryDirectory()
p = subprocess.Popen("soffice 
--accept=\"pipe,name=SOME_PIPE;url;StarOffice.ServiceManager\" --headless 
--invisible")

- Terminate the soffice process when I need to

p.terminate()   
   
# I assume that the pipe will be cleaned up as well?
if customenvdir:
   
cleanup_tmp(customenvdir)   


- Having soffice running, I can connect to it as usual:

try:
local = uno.getComponentContext()   

resolver = 
local.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver",
 local)
context = 
resolver.resolve("uno:pipe,name=SOME_PIPE;url;StarOffice.ComponentContext")
desktop = 
context.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop", 
context)
document = desktop.loadComponentFromURL("file://…", "_blank", 0, None)
controller = document.getCurrentController()

except: 

pass # Handle

- When done with the document, "close" it down but leave the soffice process 
untouched and available for more. Here, I am not sure about the other resources 
that were allocated when documents are being loaded:

# controller.?? 

if document:
   
# https://forum.openoffice.org/en/forum/viewtopic.php?f=25&t=75367  

if has_interface(document, "com.sun.star.util.XCloseable"): 
   
document.close(True)
   
else:   

document.dispose()  
   
# desktop.terminate()   
   
# context.??
   
# resolver.??   
   
# local.??  
   

As Tor suspected, I noticed that desktop.terminate() removes access to the pipe 
so that others can not open documents anymore. However, it doesn't seem to 
terminate the soffice process itself.

Also, I have performance concerns for this approach: loading and running 
through just two documents simultaneously seemed to be unproportionally slow!?

Thank you!
Jens

--
Jens Tröger
http://savage.light-speed.de/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-10-19 Thread Vasily Melenchuk
 sw/qa/extras/ooxmlexport/data/tdf107111.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx|   13 +
 sw/source/filter/ww8/ww8atr.cxx  |1 +
 3 files changed, 14 insertions(+)

New commits:
commit 8743a4172e5a168992f36e408c5db688a959000c
Author: Vasily Melenchuk 
Date:   Tue Oct 10 16:42:38 2017 +0300

tdf#107111: DOCX export: restore HideTabLeader... attribute after TOX

Previously m_bHideTabLeaderAndPageNumbers value was not restored after TOX
finish and so causing visibility problems with following hyperlinks.

Change-Id: I4ba5ce1f70e05d706d17d60e1a33a62995701f9e
Reviewed-on: https://gerrit.libreoffice.org/43310
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf107111.docx 
b/sw/qa/extras/ooxmlexport/data/tdf107111.docx
new file mode 100644
index ..f89436fda754
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf107111.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 6ca5705eb4a0..96026740894b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -1103,6 +1103,19 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103090, "tdf103090.odt")
 CPPUNIT_ASSERT_EQUAL(expectedFieldName, fieldName);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf107111, "tdf107111.docx")
+{
+xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+if (!pXmlDoc)
+return;
+
+// Ensure that hyperlink and its properties are in place.
+assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:hyperlink/w:r/w:rPr", 1);
+
+// Ensure that hyperlink properties do not contain .
+assertXPath(pXmlDoc, 
"/w:document/w:body/w:p[5]/w:hyperlink/w:r/w:rPr/w:webHidden", 0);
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf90789, "tdf90789.docx")
 {
 uno::Reference xShape(getShape(1), 
uno::UNO_QUERY_THROW);
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 4ab9b76c778f..9ebe781599d2 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2281,6 +2281,7 @@ void AttributeOutputBase::EndTOX( const SwSection& 
rSect,bool bCareEnd )
 }
 }
 GetExport( ).m_bInWriteTOX = false;
+GetExport( ).m_bHideTabLeaderAndPageNumbers = false;
 if (bCareEnd)
 OnTOXEnding();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Caolán McNamara
 sot/source/sdstor/stgstrms.cxx |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 312a8a32a579160fd1665ab10dc37bd73c89961a
Author: Caolán McNamara 
Date:   Thu Oct 19 17:11:37 2017 +0100

ofz+ubsan: runtime error: left shift cannot be represented in type

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

diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index 1f7f0769f0ce..0933ba7d265e 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -71,10 +71,12 @@ rtl::Reference< StgPage > StgFAT::GetPhysPage( sal_Int32 
nByteOff )
 
 sal_Int32 StgFAT::GetNextPage( sal_Int32 nPg )
 {
-if( nPg >= 0 )
+if (nPg >= 0)
 {
-  rtl::Reference< StgPage > pPg = GetPhysPage( nPg << 2 );
-  nPg = pPg.is() ? StgCache::GetFromPage( pPg, m_nOffset >> 2 ) : STG_EOF;
+if (nPg > (SAL_MAX_INT32 >> 2))
+return STG_EOF;
+rtl::Reference< StgPage > pPg = GetPhysPage( nPg << 2 );
+nPg = pPg.is() ? StgCache::GetFromPage( pPg, m_nOffset >> 2 ) : 
STG_EOF;
 }
 return nPg;
 }
___
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/libreoffice-6.0.0.0.alpha1-buildfix1'

2017-10-19 Thread Christian Lohmaier
Tag 'libreoffice-6.0.0.0.alpha1-buildfix1' created by Christian Lohmaier 
 at 2017-10-19 21:53 +

Tag libreoffice-6.0.0.0.alpha1-buildfix1
-BEGIN PGP SIGNATURE-

iQIcBAABAgAGBQJZ6R7YAAoJEPQ0oe+v7q6jmnQQAINCVsTcmJMHiNYzeI2SCkNY
yez0s0p5wKsgmdPDfk5KpLjDoC+Y+bkps56AZC38O/m+c6WwqpjV5ZDaEFGpYITs
QTJ8xqNeEW+bYC992tUzj2Ao1O74H2q8+Yh0a6Uq1rCCdLMIAVfixQzrwteI2h6X
P32W6kwClbls2G6Up03tfJYGSNilb+jkUrpGPOSCO4uc2RgEJXizUcbGOAfUHWKf
lCxC/o0/dSLI2GFmZ7UujtLYJGHjr6IwIzghf5HpZwBhWfB6Xpj8NZVBBJDZnQ/F
ZRJvYzIX0abCV3KXZvtu0YzzwcXXT1/JPjaE+XP/xT2t2E9N9SYv3x5Iy6byhT+H
UK9siJh245aNrSD3Q8ZtKHIQwOFywWpZHPsO7EpywY5mxMg0qSCncUvjZhBfIVis
b2drjR4tm198Ou0b+2boz+2stVgzfNKn6k4o9qLVsORnDtJiqV/URNhOB6W90yeA
iYpwJPU+xw6yGHsVNyIHpKbnu1b5MtNyyZaITD7CFrTl7KRomFsydBmgI43CxL0V
Eq9NG8ojWvpmc3t45q6IzkHP6N2R4YhpA97B2NddzskWsBJB/dmoPEZdkaW6zQIA
zGQhBW818mZPLHFH/4L0EFoOekPjqE7L0hbh12ISg6QocCpWpQUyM8AmpHjTYcYR
itneftVtctHdAKXJlYvY
=fpEc
-END PGP SIGNATURE-

Changes since libreoffice-6.0.0.0.alpha1:
Christian Lohmaier (1):
  Version 6.0.0.0.alpha1, tag libreoffice-6.0.0.0.alpha1-buildfix1

---
 dictionaries |2 +-
 helpcontent2 |2 +-
 translations |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] translations.git: Changes to 'refs/tags/libreoffice-6.0.0.0.alpha1-buildfix1'

2017-10-19 Thread Christian Lohmaier
Tag 'libreoffice-6.0.0.0.alpha1-buildfix1' created by Christian Lohmaier 
 at 2017-10-19 21:53 +

Tag libreoffice-6.0.0.0.alpha1-buildfix1
-BEGIN PGP SIGNATURE-

iQIcBAABAgAGBQJZ6R7VAAoJEPQ0oe+v7q6jgogP/RZRkhI1f4INnEXPenc55vRO
dxLKxV1dp+mcNRq/R4Ld62BmJGla/vSbsLFFa6/YpnVsNW134+tcxpuk0K4chNJ3
SgguWoDmOHOJxPKdI4bQYqdQhE9XEUZqsvXQfKnbtPNVK8pBgiieqGb5b6LAOoce
A6+O3bHjyTrn+6iq/AfrLIqxFhcaj6KTkh1dLfY3RaoptshyAKVntk/MO1l/dBGn
u1vIM8QVwAHRisIB3x5cyEnYYoakTg2GL9wAS2iPvWgMSV2gV+vAV8DEAy7B3K0S
LLPrtPIulzHaqsGJqFwR3Ch0d7w427q7WSIzt48DTX7+VKgLDZ2B1+Fr8Gbrrung
UynaGg5CsWeJNwXGP70WuzM7B4J0S0P+DtOCworcZqmndeGmxcO5tPdeRR0qdyYs
PV1cBLZgI5MLaZXGujvHepkECfTxdYdjDyA7HxzrIiJUXRmoEjaU0KAYLsExIcHM
igZ2nx1EjJOdJWknMdafY/GK1N8FhfZiMD9TOkjiF/0o0Tguyf7O5ADayJFn87kd
oaxlI5duYS2lk7qlr3a859l0wa4RJcuTDjqocpI+KJPdL7IYQ/8uMYjPRKBuXghC
QoRHagpW94zssJbTMzm+wzViCvzAK2BOg+OPXlQq0eQ/Q4FjtdSiLCaL6TKnfP48
7sM9Szqm1wgHP/y3B5eq
=Xskl
-END PGP SIGNATURE-

Changes since libreoffice-6.0.0.0.alpha1-1:
---
 0 files changed
---
___
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/libreoffice-6.0.0.0.alpha1-buildfix1'

2017-10-19 Thread Christian Lohmaier
Tag 'libreoffice-6.0.0.0.alpha1-buildfix1' created by Christian Lohmaier 
 at 2017-10-19 21:53 +

Tag libreoffice-6.0.0.0.alpha1-buildfix1
-BEGIN PGP SIGNATURE-

iQIcBAABAgAGBQJZ6R7OAAoJEPQ0oe+v7q6j4RAP/05ADtZGRTT4a4b0slZzK4hA
4eJTbTmEJZJyDMRW/RkL2xcijC51Htumf4A6SvL/n9Rre2n8N22roWQMryfw+0rX
aoru+HhK4MusoBCTkGI3jMSw1TtUHFQz2x6l7kSfQhsppbeJ5kCqzChhnDN09xmi
olm1428sQZNvVO+LLDjRlwG+tLNYp+2t/1urt7vNF3W5CeboCDb34UR/cTDHYPWF
/tqKgpr4VR7+8F0YwYoaOAzguNmMZ5zQjIAqkCR2zjd/hHgT4ola3sVTN5FX6lO4
c0pywat5fE+g44ONtcar3sulFMlYIUrtOyQhe/M21ol1Mw2MTgRyDRS1wSWvkX3G
nnrtqBZdH1KcKxaXGpuBcR7V584S5SENbjOtPLLjq4fvUp5SrATG2w6beUmsdg78
vJyCUy7N0bcMSjvU4qqqa/GTpCmDXwBMY71XNqTLaYlfE0Nm9nUjL0uqyY6RIb/u
fo0IpMGAgrMM40l/cVPIjsCGqchDg3eioQ+yOAYFnLiKT2cFzRkc+cq7z0ATOeyD
DzJdb26OGmcUvdgJD6sBLJdJs3PoeyQx9bzmtwReKIKzcjL0OFO/t1qrBSFf6WbF
xfBQw0ffod4c/XIU6ukYsYVhYW4TqWI2IPsVL71pZtwQBpk8iFWy0ACROAZd1IoV
aB2WKGnp9uLP6uH7ON/F
=Fc9x
-END PGP SIGNATURE-

Changes since libreoffice-6.0.0.0.alpha1:
Christian Lohmaier (1):
  Version 6.0.0.0.alpha1, tag libreoffice-6.0.0.0.alpha1-buildfix1

---
 0 files changed
---
___
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/libreoffice-6.0.0.0.alpha1-buildfix1'

2017-10-19 Thread Christian Lohmaier
Tag 'libreoffice-6.0.0.0.alpha1-buildfix1' created by Christian Lohmaier 
 at 2017-10-19 21:53 +

Tag libreoffice-6.0.0.0.alpha1-buildfix1
-BEGIN PGP SIGNATURE-

iQIcBAABAgAGBQJZ6R7SAAoJEPQ0oe+v7q6jKuQP/jxvtyDJfJNoh0yay+ArM1S/
93R5u9Gysnbqvf9kUHdjHmoJyKA5jaXjJYzFQhIuVnU4thw1hhgMdhnll+gD6swo
b+4D12SOZyo4MwT429T65IGUf1XJSyFdX61mhVM8lAOZEP0nWbq8xIElqjrAvee7
dgiWMzvKlGXwUAE6WLSJu0fx/Dh0s4/+x/VqI4k8L+Ca8REwbpwVlGxz2fi/fWTd
Nzd42hrk3FcVQ0pqk6rnRDmQZihjfRm6n5zowBgYNbe6Z1gJFrAmSFfLz/qkvPi6
+CIq9Aectgwqw00i3CCTrvAgJpWC54Rr7U0lpF2UXiBY4iQXxL/M9i7/X+MCJ+Ts
e0JU4kntwQfbw+0q6qhQH6hGrcfYGTIjc2276Il/aShcHcu3bDy3sxfrJH+vZLnG
D+gyNYGrQTatpryv+4ksfWQ6ECi6HZFYwpq1IvFeXg70pxZ111HW9MqSVDzalX53
YX0dbetVB4BYWqt9HRdqFIQkrf11w4umGXuBe06SxNJZeNmtR4wj7tEskML7Y8ka
M78SQI9o/iK/dBonxpZlmyAkUIU2hkubtvIkcCju08fcb3qcIRSqLK1vErFAVURk
nHv7Ekhivz5MSgWtYi+HZuQ/FzhqubCldj9KkkZPOWx9E9JgoouiHX/Ez3aQrz2O
Jo1uEdbCQyUBrwBL+/vF
=UhOO
-END PGP SIGNATURE-

Changes since libreoffice-6.0.0.0.alpha1:
Christian Lohmaier (1):
  Version 6.0.0.0.alpha1, tag libreoffice-6.0.0.0.alpha1-buildfix1

---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Serge Krot
 sw/qa/extras/ooxmlexport/ooxmlexport8.cxx |   10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 143c482b3189cb084fbdf5e6f78f15b43f099e24
Author: Serge Krot 
Date:   Thu Oct 19 17:44:37 2017 +0200

sw: enable ooxml export tests also for Win32

* seems they work fine these days
* also removed magic number from fdo69649 test in favour of getting the
  value straight from the document

Change-Id: Ife9d96eb413740b56b771df0d23e590f44f9452f
Reviewed-on: https://gerrit.libreoffice.org/43568
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index 03fd2fbc7103..e7f7c9ccfdc1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -117,8 +117,6 @@ protected:
 }
 };
 
-#if !defined(_WIN32)
-
 DECLARE_OOXMLEXPORT_TEST(testN751054, "n751054.docx")
 {
 text::TextContentAnchorType eValue = 
getProperty(getShape(1), "AnchorType");
@@ -1368,8 +1366,10 @@ DECLARE_OOXMLEXPORT_TEST(testFdo69649, "fdo69649.docx")
 xTextCursor->gotoRange(xTextRange->getStart(),false);
 xTextCursor->gotoRange(xTextRange->getEnd(),true);
 OUString aTocString(xTextCursor->getString());
-aTocString = aTocString.copy(256);
-CPPUNIT_ASSERT(aTocString.startsWithIgnoreAsciiCase( "Heading 15.1:\t15" ) 
);
+
+// heading 15 on the 15th page
+aTocString = aTocString.copy(aTocString.indexOf("Heading 15.1:\t") + 
strlen("Heading 15.1:\t"));
+CPPUNIT_ASSERT(aTocString.startsWithIgnoreAsciiCase( "15" ) );
 }
 
 DECLARE_OOXMLEXPORT_TEST(testFdo73389,"fdo73389.docx")
@@ -1891,8 +1891,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf87924, "tdf87924.docx")
 CPPUNIT_ASSERT_EQUAL(static_cast(0), 
aGeometry["TextPreRotateAngle"].get());
 }
 
-#endif
-
 DECLARE_OOXMLEXPORT_TEST(testIndents, "indents.docx")
 {
 //expected left margin and first line indent values
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: libgltf, glTF models, collada etc ?

2017-10-19 Thread Tor Lillqvist
> is this whole 3d model feature still something we still actually want
> to have ? It seems to me to be of marginal utility.
>

If you would ask me, which you shouldn't, I'd say let's kill it, and the
collada stuff, too.

--tml
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-10-19 Thread Stephan Bergmann
 slideshow/source/engine/effectrewinder.cxx |2 +-
 slideshow/source/inc/basecontainernode.hxx |6 +++---
 slideshow/source/inc/basenode.hxx  |6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit db90b1aa477baacf8cb85384343aba171b91eb5c
Author: Stephan Bergmann 
Date:   Thu Oct 19 15:58:04 2017 +0200

Move slideshow include files to common include directory

...that are included from various places.  Change done in preparation of
loplugin:includeform.

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

diff --git a/slideshow/source/engine/effectrewinder.cxx 
b/slideshow/source/engine/effectrewinder.cxx
index 96ba0e048281..cdf1a02f7685 100644
--- a/slideshow/source/engine/effectrewinder.cxx
+++ b/slideshow/source/engine/effectrewinder.cxx
@@ -22,7 +22,7 @@
 #include "eventqueue.hxx"
 #include "usereventqueue.hxx"
 #include "mouseeventhandler.hxx"
-#include "animationnodes/basecontainernode.hxx"
+#include "basecontainernode.hxx"
 #include "delayevent.hxx"
 
 #include 
diff --git a/slideshow/source/engine/animationnodes/basecontainernode.hxx 
b/slideshow/source/inc/basecontainernode.hxx
similarity index 93%
rename from slideshow/source/engine/animationnodes/basecontainernode.hxx
rename to slideshow/source/inc/basecontainernode.hxx
index 3d6e568d5e0f..6338fb026c7c 100644
--- a/slideshow/source/engine/animationnodes/basecontainernode.hxx
+++ b/slideshow/source/inc/basecontainernode.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SLIDESHOW_SOURCE_ENGINE_ANIMATIONNODES_BASECONTAINERNODE_HXX
-#define INCLUDED_SLIDESHOW_SOURCE_ENGINE_ANIMATIONNODES_BASECONTAINERNODE_HXX
+#ifndef INCLUDED_SLIDESHOW_SOURCE_INC_BASECONTAINERNODE_HXX
+#define INCLUDED_SLIDESHOW_SOURCE_INC_BASECONTAINERNODE_HXX
 
 #include "basenode.hxx"
 
@@ -96,6 +96,6 @@ typedef ::std::shared_ptr< BaseContainerNode > 
BaseContainerNodeSharedPtr;
 } // namespace interface
 } // namespace presentation
 
-#endif // INCLUDED_SLIDESHOW_SOURCE_ENGINE_ANIMATIONNODES_BASECONTAINERNODE_HXX
+#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/slideshow/source/engine/animationnodes/basenode.hxx 
b/slideshow/source/inc/basenode.hxx
similarity index 97%
rename from slideshow/source/engine/animationnodes/basenode.hxx
rename to slideshow/source/inc/basenode.hxx
index 495e03f9ee5c..9798aa11a171 100644
--- a/slideshow/source/engine/animationnodes/basenode.hxx
+++ b/slideshow/source/inc/basenode.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_SLIDESHOW_SOURCE_ENGINE_ANIMATIONNODES_BASENODE_HXX
-#define INCLUDED_SLIDESHOW_SOURCE_ENGINE_ANIMATIONNODES_BASENODE_HXX
+#ifndef INCLUDED_SLIDESHOW_SOURCE_INC_BASENODE_HXX
+#define INCLUDED_SLIDESHOW_SOURCE_INC_BASENODE_HXX
 
 #include 
 #include 
@@ -205,6 +205,6 @@ typedef ::std::shared_ptr< BaseNode > BaseNodeSharedPtr;
 } // namespace internal
 } // namespace slideshow
 
-#endif // INCLUDED_SLIDESHOW_SOURCE_ENGINE_ANIMATIONNODES_BASENODE_HXX
+#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Stephan Bergmann
 sd/Library_sdfilt.mk   |1 +
 sd/source/filter/ppt/pptin.cxx |6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 8d3b8dd0b273f670baceaebdf4f66050e259c929
Author: Stephan Bergmann 
Date:   Thu Oct 19 15:53:38 2017 +0200

Make Library_sdfilt find Library_sd include files via -I

...instead of through ../../... paths.  Change done in preparation of
loplugin:includeform.

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

diff --git a/sd/Library_sdfilt.mk b/sd/Library_sdfilt.mk
index de9d938809c0..ec85ffc53853 100644
--- a/sd/Library_sdfilt.mk
+++ b/sd/Library_sdfilt.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_Library_Library,sdfilt))
 $(eval $(call gb_Library_set_include,sdfilt,\
 $$(INCLUDE) \
 -I$(SRCDIR)/sd/inc \
+-I$(SRCDIR)/sd/source/ui/inc \
 ))
 
 ifneq ($(strip $(dbg_anim_log)$(DBG_ANIM_LOG)),)
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index dea57ff7ea75..3ee02d93f1b1 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -74,9 +74,9 @@
 #include "customshowlist.hxx"
 #include "sddll.hxx"
 
-#include "../../ui/inc/DrawDocShell.hxx"
-#include "../../ui/inc/FrameView.hxx"
-#include "../../ui/inc/optsitem.hxx"
+#include "DrawDocShell.hxx"
+#include "FrameView.hxx"
+#include "optsitem.hxx"
 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Stephan Bergmann
 sd/source/ui/inc/tools/IconCache.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2d06146bcb2ae172feaf50e6d0c1f551607a4df9
Author: Stephan Bergmann 
Date:   Thu Oct 19 15:51:26 2017 +0200

Make include file found through -Isd/source/ui/inc

...instead of implicitly next to the including file, in preparation of
loplugin:includeform

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

diff --git a/sd/source/ui/inc/tools/IconCache.hxx 
b/sd/source/ui/inc/tools/IconCache.hxx
index 3d08778b9fb8..27192040dcd8 100644
--- a/sd/source/ui/inc/tools/IconCache.hxx
+++ b/sd/source/ui/inc/tools/IconCache.hxx
@@ -21,7 +21,7 @@
 #define INCLUDED_SD_SOURCE_UI_INC_TOOLS_ICONCACHE_HXX
 
 #include 
-#include "SdGlobalResourceContainer.hxx"
+#include "tools/SdGlobalResourceContainer.hxx"
 #include 
 
 namespace sd {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: lotuswordpro/inc

2017-10-19 Thread Stephan Bergmann
 lotuswordpro/inc/xfilter/xfcellstyle.hxx|2 +-
 lotuswordpro/inc/xfilter/xfcolor.hxx|2 +-
 lotuswordpro/inc/xfilter/xfdrawgroup.hxx|2 +-
 lotuswordpro/inc/xfilter/xfdrawpolygon.hxx  |2 +-
 lotuswordpro/inc/xfilter/xffloatframe.hxx   |2 +-
 lotuswordpro/inc/xfilter/xffontfactory.hxx  |2 +-
 lotuswordpro/inc/xfilter/xffooterstyle.hxx  |4 ++--
 lotuswordpro/inc/xfilter/xfframe.hxx|2 +-
 lotuswordpro/inc/xfilter/xfframestyle.hxx   |2 +-
 lotuswordpro/inc/xfilter/xfheaderstyle.hxx  |4 ++--
 lotuswordpro/inc/xfilter/xfimage.hxx|2 +-
 lotuswordpro/inc/xfilter/xfimagestyle.hxx   |4 ++--
 lotuswordpro/inc/xfilter/xfindex.hxx|2 +-
 lotuswordpro/inc/xfilter/xfpagemaster.hxx   |2 +-
 lotuswordpro/inc/xfilter/xfparastyle.hxx|2 +-
 lotuswordpro/inc/xfilter/xfsectionstyle.hxx |2 +-
 lotuswordpro/inc/xfilter/xfstylemanager.hxx |2 +-
 lotuswordpro/inc/xfilter/xftable.hxx|4 ++--
 lotuswordpro/inc/xfilter/xftablestyle.hxx   |2 +-
 lotuswordpro/inc/xfilter/xftextboxstyle.hxx |2 +-
 20 files changed, 24 insertions(+), 24 deletions(-)

New commits:
commit 5d0f517e3a7e1f199f8ed068e9107efa308a1885
Author: Stephan Bergmann 
Date:   Tue Oct 17 18:00:56 2017 +0200

Make include files found through -Ilotuswordpro/inc

...instead of implicitly next to the including file, in preparation of
loplugin:includeform

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

diff --git a/lotuswordpro/inc/xfilter/xfcellstyle.hxx 
b/lotuswordpro/inc/xfilter/xfcellstyle.hxx
index c2d631859f8e..ead57146a8da 100644
--- a/lotuswordpro/inc/xfilter/xfcellstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfcellstyle.hxx
@@ -66,7 +66,7 @@
 
 #include "xfilter/xfstyle.hxx"
 #include "xfilter/xfcolor.hxx"
-#include "xfmargins.hxx"
+#include "xfilter/xfmargins.hxx"
 #include "xfilter/xfpadding.hxx"
 #include "xfilter/xfshadow.hxx"
 
diff --git a/lotuswordpro/inc/xfilter/xfcolor.hxx 
b/lotuswordpro/inc/xfilter/xfcolor.hxx
index d095e68dae0f..dcc7ea047e35 100644
--- a/lotuswordpro/inc/xfilter/xfcolor.hxx
+++ b/lotuswordpro/inc/xfilter/xfcolor.hxx
@@ -60,7 +60,7 @@
 #ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCOLOR_HXX
 #define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFCOLOR_HXX
 
-#include "xfglobal.hxx"
+#include "xfilter/xfglobal.hxx"
 
 /**
  * @brief
diff --git a/lotuswordpro/inc/xfilter/xfdrawgroup.hxx 
b/lotuswordpro/inc/xfilter/xfdrawgroup.hxx
index be3ca3f17899..3874ec1f713b 100644
--- a/lotuswordpro/inc/xfilter/xfdrawgroup.hxx
+++ b/lotuswordpro/inc/xfilter/xfdrawgroup.hxx
@@ -61,7 +61,7 @@
 #define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWGROUP_HXX
 
 #include "xfilter/xfdrawobj.hxx"
-#include "xfframe.hxx"
+#include "xfilter/xfframe.hxx"
 #include "xfilter/xfcontentcontainer.hxx"
 
 /**
diff --git a/lotuswordpro/inc/xfilter/xfdrawpolygon.hxx 
b/lotuswordpro/inc/xfilter/xfdrawpolygon.hxx
index 2d3a4509a284..929f21072375 100644
--- a/lotuswordpro/inc/xfilter/xfdrawpolygon.hxx
+++ b/lotuswordpro/inc/xfilter/xfdrawpolygon.hxx
@@ -60,7 +60,7 @@
 #ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWPOLYGON_HXX
 #define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWPOLYGON_HXX
 
-#include "xfdrawpolyline.hxx"
+#include "xfilter/xfdrawpolyline.hxx"
 #include 
 
 /**
diff --git a/lotuswordpro/inc/xfilter/xffloatframe.hxx 
b/lotuswordpro/inc/xfilter/xffloatframe.hxx
index 812de6335383..9f01e551d8d4 100644
--- a/lotuswordpro/inc/xfilter/xffloatframe.hxx
+++ b/lotuswordpro/inc/xfilter/xffloatframe.hxx
@@ -60,7 +60,7 @@
 #ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFLOATFRAME_HXX
 #define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFLOATFRAME_HXX
 
-#include "xfframe.hxx"
+#include "xfilter/xfframe.hxx"
 #include 
 
 /**
diff --git a/lotuswordpro/inc/xfilter/xffontfactory.hxx 
b/lotuswordpro/inc/xfilter/xffontfactory.hxx
index ff357ba186dc..47bc5db7b561 100644
--- a/lotuswordpro/inc/xfilter/xffontfactory.hxx
+++ b/lotuswordpro/inc/xfilter/xffontfactory.hxx
@@ -64,7 +64,7 @@
 
 #include 
 
-#include "xfglobal.hxx"
+#include "xfilter/xfglobal.hxx"
 #include "xfilter/xffont.hxx"
 #include 
 
diff --git a/lotuswordpro/inc/xfilter/xffooterstyle.hxx 
b/lotuswordpro/inc/xfilter/xffooterstyle.hxx
index 1e633fd442be..b3cc2a1a7d7c 100644
--- a/lotuswordpro/inc/xfilter/xffooterstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xffooterstyle.hxx
@@ -60,8 +60,8 @@
 #ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFOOTERSTYLE_HXX
 #define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFFOOTERSTYLE_HXX
 
-#include "xfheaderstyle.hxx"
-#include "xfmargins.hxx"
+#include "xfilter/xfheaderstyle.hxx"
+#include "xfilter/xfmargins.hxx"
 
 class XFFooterStyle : public XFHeaderStyle
 {
diff --git a/lotuswordpro/inc/xfilter/xfframe.hxx 
b/lotuswordpro/inc/xfilter/xfframe.hxx
index a651e4cbdbad..b67fac5f6c2f 100644
--- a/lotuswordpro/inc/xfilter/xfframe.hxx
+++ b/lotuswordpro/inc/xfilt

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

2017-10-19 Thread Stephan Bergmann
 xmloff/inc/SchXMLAutoStylePoolP.hxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 67ef6aaf371e51ce24ac30cb4c0f01bf8c9fbdde
Author: Stephan Bergmann 
Date:   Tue Oct 17 16:20:44 2017 +0200

Move SchXMLAutoStylePoolP.hxx next to SchXMLExport.hxx including it

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

diff --git a/xmloff/source/chart/SchXMLAutoStylePoolP.hxx 
b/xmloff/inc/SchXMLAutoStylePoolP.hxx
similarity index 89%
rename from xmloff/source/chart/SchXMLAutoStylePoolP.hxx
rename to xmloff/inc/SchXMLAutoStylePoolP.hxx
index fd769c6a302c..ee0aecde6cc8 100644
--- a/xmloff/source/chart/SchXMLAutoStylePoolP.hxx
+++ b/xmloff/inc/SchXMLAutoStylePoolP.hxx
@@ -16,8 +16,8 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLAUTOSTYLEPOOLP_HXX
-#define INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLAUTOSTYLEPOOLP_HXX
+#ifndef INCLUDED_XMLOFF_INC_SCHXMLAUTOSTYLEPOOLP_HXX
+#define INCLUDED_XMLOFF_INC_SCHXMLAUTOSTYLEPOOLP_HXX
 
 #include 
 
@@ -41,6 +41,6 @@ public:
 virtual ~SchXMLAutoStylePoolP() override;
 };
 
-#endif // INCLUDED_XMLOFF_SOURCE_CHART_SCHXMLAUTOSTYLEPOOLP_HXX
+#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/LibreOfficeKit

2017-10-19 Thread Stephan Bergmann
 include/LibreOfficeKit/LibreOfficeKit.hxx   |4 ++--
 include/LibreOfficeKit/LibreOfficeKitInit.h |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit e19c4b54d129db356d44ede66aba51c789d2445f
Author: Stephan Bergmann 
Date:   Tue Oct 17 14:47:21 2017 +0200

Consistently use #include  in include/LibreOfficeKit

Some of the include files there had used

  #include "..."

while others had used

  #include 

for references among those include files.  In preparation for
loplugin:includeform, consolidate on the latter (even if that's clearly a
misuse of the <...> form).

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

diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKit/LibreOfficeKit.hxx
index d4e891af218a..9e897c5ffb85 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -12,8 +12,8 @@
 
 #include 
 
-#include "LibreOfficeKit.h"
-#include "LibreOfficeKitInit.h"
+#include 
+#include 
 
 /*
  * The reasons this C++ code is not as pretty as it could be are:
diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h 
b/include/LibreOfficeKit/LibreOfficeKitInit.h
index f9610f1f02fc..9642411ce367 100644
--- a/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -10,7 +10,7 @@
 #ifndef INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITINIT_H
 #define INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITINIT_H
 
-#include "LibreOfficeKit.h"
+#include 
 
 #ifdef __cplusplus
 extern "C"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/kde5' - configure.ac vcl/unx

2017-10-19 Thread Katarina Behrens
Rebased ref, commits from common ancestor:
commit f8151b9fa3b743fb05b23f042b75ea20afa49510
Author: Katarina Behrens 
Date:   Thu Oct 19 22:25:49 2017 +0200

Fix glib detection for KF5

Change-Id: Ibd25502384cd248f1070d26266222e18fb9e2e47

diff --git a/configure.ac b/configure.ac
index a14fded670a9..892d77b917bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11014,10 +11014,21 @@ int main(int argc, char **argv) {
if (KCOREADDONS_VERSION_MAJOR == 5 && KCOREADDONS_VERSION_MINOR >= 0) 
return 0;
else return 1;
 }
-   ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old])],[])
+]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE5 version too old])],[])
 CXXFLAGS=$save_CXXFLAGS
 AC_LANG_POP([C++])
 
+# Glib is needed for properly handling Qt event loop with Qt's Glib 
integration enabled.
+# Sets also KF5_GLIB_CFLAGS/KF5_GLIB_LIBS if successful.
+PKG_CHECK_MODULES(KF5_GLIB,[glib-2.0 >= 2.4],
+[
+KF5_HAVE_GLIB=TRUE
+AC_DEFINE(KF5_HAVE_GLIB,1)
+KF5_GLIB_CFLAGS=$(printf '%s' "$KF5_GLIB_CFLAGS" | sed -e 
"s/-I/${ISYSTEM?}/g")
+FilterLibs "${KF5_GLIB_LIBS}"
+KF5_GLIB_LIBS="${filteredlibs}"
+],
+AC_MSG_WARN([[No Glib found, KDE5 support will not use native file 
pickers!]]))
 fi
 AC_SUBST(KF5_CFLAGS)
 AC_SUBST(KF5_LIBS)
diff --git a/vcl/unx/kde5/KDE5XLib.cxx b/vcl/unx/kde5/KDE5XLib.cxx
index d9b8e747f3c8..32a80ad8644a 100644
--- a/vcl/unx/kde5/KDE5XLib.cxx
+++ b/vcl/unx/kde5/KDE5XLib.cxx
@@ -397,7 +397,7 @@ uno::Reference< ui::dialogs::XFilePicker2 > 
KDE5XLib::createFilePicker(
 SalYieldMutexReleaser aReleaser;
 return Q_EMIT createFilePickerSignal( xMSF );
 }
-return uno::Reference< ui::dialogs::XFilePicker2 >( new KDE4FilePicker( 
xMSF ) );
+//return uno::Reference< ui::dialogs::XFilePicker2 >( new KDE4FilePicker( 
xMSF ) );
 #else
 (void)xMSF;
 return NULL;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Serge Krot
 sw/qa/extras/ooxmlimport/data/tdf87533_bidi.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |   32 +
 writerfilter/source/dmapper/StyleSheetTable.cxx  |   42 ++-
 3 files changed, 66 insertions(+), 8 deletions(-)

New commits:
commit f3c37b7d72fd6f0a426bf9a40ee2202dac04f486
Author: Serge Krot 
Date:   Thu Sep 28 12:53:30 2017 +0200

tdf#87533 Fixed initialization of writing mode for paragraph

During parsing of the docx the paragraph without w:bidi
should take this value from style or from default paragraph properties,

Change-Id: Ie33f0d1cd3551c4053a47e6faf7dcac71765db65

tdf#87533 explicitly set writing mode value based on default properties

Change-Id: I3fcf514a901f0630d749ba0ddb6361d6db3ce1b5
Reviewed-on: https://gerrit.libreoffice.org/42895
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/sw/qa/extras/ooxmlimport/data/tdf87533_bidi.docx 
b/sw/qa/extras/ooxmlimport/data/tdf87533_bidi.docx
new file mode 100644
index ..11e6511cac19
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf87533_bidi.docx 
differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index a47b4e80290f..0f0a9aa0540a 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1325,6 +1325,38 @@ DECLARE_OOXMLIMPORT_TEST(testTdf108806, "tdf108806.docx")
 paragraph->getString());
 }
 
+DECLARE_OOXMLIMPORT_TEST(testTdf87533_bidi, "tdf87533_bidi.docx")
+{
+// "w:bidi" (specified inside Default paragraph properties) should not be 
ignored
+const OUString writingMode = "WritingMode"; 
//getPropertyName(PROP_WRITING_MODE);
+
+// check: "Default Style" master-style has RTL
+{
+const uno::Reference 
xPropertySet(getStyles("PageStyles")->getByName("Default Style"), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(text::WritingMode2::RL_TB), 
getProperty(xPropertySet, writingMode));
+}
+
+// check: "Standard" master-style has RTL
+{
+const uno::Reference 
xPropertySet(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(text::WritingMode2::RL_TB), 
getProperty(xPropertySet, writingMode));
+}
+
+// check: style of the first paragraph has RTL
+// it has missing usage of the  => this property should be taken 
from style
+{
+const uno::Reference xPara(getParagraph(1), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(text::WritingMode2::RL_TB), 
getProperty(xPara, writingMode));
+}
+
+// check: style of the first paragraph has LTR
+// it has 
+{
+const uno::Reference xPara(getParagraph(2), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(text::WritingMode2::LR_TB), 
getProperty(xPara, writingMode));
+}
+}
+
 DECLARE_OOXMLIMPORT_TEST(testVmlAdjustments, "vml-adjustments.docx")
 {
 uno::Reference xPropertySet(getShape(1), 
uno::UNO_QUERY);
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx 
b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 1e8ab405f408..9ae7d1df6e41 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -1029,10 +1029,33 @@ void StyleSheetTable::ApplyStyleSheets( const 
FontTablePtr& rFontTable )
 pEntry->pProperties->Insert(PROP_PARA_WIDOWS, aTwo, 
false);
 pEntry->pProperties->Insert(PROP_PARA_ORPHANS, aTwo, 
false);
 
-// Left-to-right direction if not already set
-pEntry->pProperties->Insert(PROP_WRITING_MODE, 
uno::makeAny( sal_Int16(text::WritingMode_LR_TB) ), false);
-// Left alignment if not already set
-pEntry->pProperties->Insert(PROP_PARA_ADJUST, 
uno::makeAny( sal_Int16(style::ParagraphAdjust_LEFT) ), false);
+// tdf#87533 explicitly set writing mode value based 
on default paragraph properties
+// specified inside styles.xml: 

+{
+const PropertyMapPtr & propertyMap = 
m_pImpl->m_pDefaultParaProps;
+
+boost::optional writingMode;
+if (propertyMap && (writingMode = 
propertyMap->getProperty(PROP_WRITING_MODE)))
+{
+pEntry->pProperties->Insert(PROP_WRITING_MODE, 
writingMode->second, false);
+}
+else
+{
+// Left-to-right direction if not already set
+pEntry->pProperties->Insert(PROP_WRITING_MODE, 
uno::makeAny(sal_Int16(text::WritingMode_LR_TB)), false);
+}
+
+boost::optional para

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

2017-10-19 Thread Serge Krot
 writerfilter/source/dmapper/DomainMapper.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f89dcfd3ce8b0ea788589247fb8c1124af51d30d
Author: Serge Krot 
Date:   Wed Sep 27 21:20:03 2017 +0200

related tdf#87533: handle LN_EG_SectPrContents_bidi correctly

Change-Id: I90d220550d24fb964cf4e528a1f506033f05de95
Reviewed-on: https://gerrit.libreoffice.org/42896
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 2e19432a9b56..af3579441047 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1519,7 +1519,10 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const 
PropertyMapPtr& rContext )
 break;
 case NS_ooxml::LN_EG_SectPrContents_bidi:
 if (pSectionContext != nullptr)
-pSectionContext->Insert(PROP_WRITING_MODE, uno::makeAny( 
sal_Int16(text::WritingMode2::RL_TB) ));
+{
+const sal_Int16 writingMode = (nIntValue != 0) ? 
sal_Int16(text::WritingMode2::RL_TB) : sal_Int16(text::WritingMode2::LR_TB);
+pSectionContext->Insert(PROP_WRITING_MODE, 
uno::makeAny(writingMode));
+}
 break;
 case NS_ooxml::LN_EG_RPrBase_highlight:
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/kde5' - 2 commits - configure.ac vcl/unx

2017-10-19 Thread Katarina Behrens
 configure.ac  |   13 +-
 vcl/unx/kde5/KDE5XLib.cxx |2 
 vcl/unx/kde5/tst_exclude_socket_notifiers.hxx |   55 --
 3 files changed, 47 insertions(+), 23 deletions(-)

New commits:
commit cb713717c2ea37929b357f5109b33830e7a88fc4
Author: Katarina Behrens 
Date:   Thu Oct 19 22:25:49 2017 +0200

Fix glib detection for KF5

Change-Id: Ibd25502384cd248f1070d26266222e18fb9e2e47

diff --git a/configure.ac b/configure.ac
index a14fded670a9..8dfb29bb82f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11014,10 +11014,21 @@ int main(int argc, char **argv) {
if (KCOREADDONS_VERSION_MAJOR == 5 && KCOREADDONS_VERSION_MINOR >= 0) 
return 0;
else return 1;
 }
-   ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old])],[])
+]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE5 version too old])],[])
 CXXFLAGS=$save_CXXFLAGS
 AC_LANG_POP([C++])
 
+# Glib is needed for properly handling Qt event loop with Qt's Glib 
integration enabled.
+# Sets also KDE4_GLIB_CFLAGS/KDE4_GLIB_LIBS if successful.
+PKG_CHECK_MODULES(KF5_GLIB,[glib-2.0 >= 2.4],
+[
+KF5_HAVE_GLIB=TRUE
+AC_DEFINE(KF5_HAVE_GLIB,1)
+KF5_GLIB_CFLAGS=$(printf '%s' "$KF5_GLIB_CFLAGS" | sed -e 
"s/-I/${ISYSTEM?}/g")
+FilterLibs "${KF5_GLIB_LIBS}"
+KF5_GLIB_LIBS="${filteredlibs}"
+],
+AC_MSG_WARN([[No Glib found, KDE4 support will not use native file 
pickers!]]))
 fi
 AC_SUBST(KF5_CFLAGS)
 AC_SUBST(KF5_LIBS)
diff --git a/vcl/unx/kde5/KDE5XLib.cxx b/vcl/unx/kde5/KDE5XLib.cxx
index d9b8e747f3c8..32a80ad8644a 100644
--- a/vcl/unx/kde5/KDE5XLib.cxx
+++ b/vcl/unx/kde5/KDE5XLib.cxx
@@ -397,7 +397,7 @@ uno::Reference< ui::dialogs::XFilePicker2 > 
KDE5XLib::createFilePicker(
 SalYieldMutexReleaser aReleaser;
 return Q_EMIT createFilePickerSignal( xMSF );
 }
-return uno::Reference< ui::dialogs::XFilePicker2 >( new KDE4FilePicker( 
xMSF ) );
+//return uno::Reference< ui::dialogs::XFilePicker2 >( new KDE4FilePicker( 
xMSF ) );
 #else
 (void)xMSF;
 return NULL;
commit ea016225d58f4e6b11b5e198b43a23b9fdbe9882
Author: Katarina Behrens 
Date:   Thu Oct 19 22:25:07 2017 +0200

Thinko, copied the wrong file initially

Change-Id: Ic8c257c3adda91164ef34513caaaedc097367e5f

diff --git a/vcl/unx/kde5/tst_exclude_socket_notifiers.hxx 
b/vcl/unx/kde5/tst_exclude_socket_notifiers.hxx
index c07ca895a9dc..d0acafede239 100644
--- a/vcl/unx/kde5/tst_exclude_socket_notifiers.hxx
+++ b/vcl/unx/kde5/tst_exclude_socket_notifiers.hxx
@@ -23,45 +23,58 @@
 
 #include 
 #include 
+#include 
+#include 
 
-const QEvent::Type eventType = QEvent::User;
-
-class TestExcludePostedEvents
+class TestExcludeSocketNotifiers
 : public QObject
 {
 Q_OBJECT
 public:
-TestExcludePostedEvents();
-virtual bool event( QEvent* e ) override;
-bool processed;
+TestExcludeSocketNotifiers( const int* pipes );
+virtual ~TestExcludeSocketNotifiers() override;
+bool received;
+public slots:
+void slotReceived();
+private:
+const int* pipes;
 };
 
-TestExcludePostedEvents::TestExcludePostedEvents()
-: processed( false )
+TestExcludeSocketNotifiers::TestExcludeSocketNotifiers( const int* thePipes )
+: received( false )
+, pipes( thePipes )
+{
+}
+
+TestExcludeSocketNotifiers::~TestExcludeSocketNotifiers()
 {
+close( pipes[ 0 ] );
+close( pipes[ 1 ] );
 }
 
-bool TestExcludePostedEvents::event( QEvent* e )
+void TestExcludeSocketNotifiers::slotReceived()
 {
-if( e->type() == eventType )
-processed = true;
-return QObject::event( e );
+received = true;
 }
 
 #define QVERIFY(a) \
 if (!a) return 1;
 
-static int tst_excludePostedEvents()
+static int tst_processEventsExcludeSocket()
 {
-TestExcludePostedEvents test;
-QCoreApplication::postEvent( &test, new QEvent( eventType ));
+int pipes[ 2 ];
+if( pipe( pipes ) < 0 )
+return 1;
+TestExcludeSocketNotifiers test( pipes );
+QSocketNotifier notifier( pipes[ 0 ], QSocketNotifier::Read );
+QObject::connect( ¬ifier, SIGNAL( activated( int )), &test, SLOT( 
slotReceived()));
+char dummy = 'a';
+if( 1 != write( pipes[ 1 ], &dummy, 1 ) )
+return 1;
 QEventLoop loop;
-loop.processEvents(QEventLoop::ExcludeUserInputEvents
-| QEventLoop::ExcludeSocketNotifiers
-//| QEventLoop::WaitForMoreEvents
-| QEventLoop::X11ExcludeTimers);
-QVERIFY( !test.processed );
+loop.processEvents( QEventLoop::ExcludeSocketNotifiers );
+QVERIFY( !test.received );
 loop.processEvents();
-QVERIFY( test.processed );
+QVERIFY( test.received );
 return 0;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/li

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

2017-10-19 Thread Laurent BP
 svl/source/numbers/zforscan.cxx |  265 +---
 1 file changed, 196 insertions(+), 69 deletions(-)

New commits:
commit 80c0a7300b9e185cd77f754abbad31422826662c
Author: Laurent BP 
Date:   Sun Oct 8 20:05:34 2017 +0200

tdf#33689 Accept English syntax keywords in format strings

If keyword does not correspond to any keyword in language
used, then English keywords are tested
Test done only if language may use localized keywords

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

diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 79212d271461..2dcde18fe2b2 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -38,6 +38,70 @@ using namespace svt;
 
 const sal_Unicode cNoBreakSpace = 0xA0;
 const sal_Unicode cNarrowNoBreakSpace = 0x202F;
+namespace
+{
+const ::std::vector sEnglishKeyword =
+{ // Syntax keywords in English (USA)
+//! All keywords MUST be UPPERCASE! In same order as NfKeywordTable
+"",// NF_KEY_NONE 0
+"E",   // NF_KEY_E Exponent
+"AM/PM",   // NF_KEY_AMPM AM/PM
+"A/P", // NF_KEY_AP AM/PM short
+"M",   // NF_KEY_MI Minute
+"MM",  // NF_KEY_MMI Minute 02
+"M",   // NF_KEY_M month(!)
+"MM",  // NF_KEY_MM month 02 (!)
+"MMM", // NF_KEY_MMM month short name
+"",// NF_KEY_ month long name
+"H",   // NF_KEY_H hour
+"HH",  // NF_KEY_HH hour 02
+"S",   // NF_KEY_S Second
+"SS",  // NF_KEY_SS Second 02
+"Q",   // NF_KEY_Q Quarter short 'Q'
+"QQ",  // NF_KEY_QQ Quarter long
+"D",   // NF_KEY_D day of month
+"DD",  // NF_KEY_DD day of month 02
+"DDD", // NF_KEY_DDD day of week short
+"",// NF_KEY_ day of week long
+"YY",  // NF_KEY_YY year two digits
+"",// NF_KEY_ year four digits
+"NN",  // NF_KEY_NN Day of week short
+"",// NF_KEY_ Day of week long incl. separator
+"CCC", // NF_KEY_CCC Currency abbreviation
+"GENERAL", // NF_KEY_GENERAL General / Standard
+"NNN", // NF_KEY_NNN Day of week long
+"WW",  // NF_KEY_WW Week of year
+"M",   // NF_KEY_M first letter of month name
+"",// NF_KEY_UNUSED4,
+"",// NF_KEY_UNUSED5, // was quarter word, not used anymore 
from SRC631 on (26.04.01)
+"TRUE",// NF_KEY_TRUE boolean true
+"FALSE",   // NF_KEY_FALSE boolean false
+"BOOLEAN", // NF_KEY_BOOLEAN boolean
+"COLOR",   // NF_KEY_COLOR color
+// colours
+"BLACK",   // NF_KEY_BLACK
+"BLUE",// NF_KEY_BLUE
+"GREEN",   // NF_KEY_GREEN
+"CYAN",// NF_KEY_CYAN
+"RED", // NF_KEY_RED
+"MAGENTA", // NF_KEY_MAGENTA
+"BROWN",   // NF_KEY_BROWN
+"GREY",// NF_KEY_GREY
+"YELLOW",  // NF_KEY_YELLOW
+"WHITE",   // NF_KEY_WHITE
+// preset new calendar keywords
+"AAA", // NF_KEY_AAA
+"",// NF_KEY_
+"E",   // NF_KEY_EC
+"EE",  // NF_KEY_EEC
+"G",   // NF_KEY_G
+"GG",  // NF_KEY_GG
+"GGG", // NF_KEY_GGG
+"R",   // NF_KEY_R
+"RR",  // NF_KEY_RR
+"t" // NF_KEY_THAI_T Thai T modifier, speciality of Thai Excel, only used 
with Thai locale and converted to [NatNum1]
+};
+}
 
 ImpSvNumberformatScan::ImpSvNumberformatScan( SvNumberFormatter* pFormatterP )
 : maNullDate( 30, 12, 1899)
@@ -49,21 +113,21 @@ ImpSvNumberformatScan::ImpSvNumberformatScan( 
SvNumberFormatter* pFormatterP )
 xNFC = css::i18n::NumberFormatMapper::create( 
pFormatter->GetComponentContext() );
 bConvertMode = false;
 bConvertSystemToSystem = false;
-//! All keywords MUST be UPPERCASE!
-sKeyword[NF_KEY_E] = "E";// Exponent
-sKeyword[NF_KEY_AMPM] =  "AM/PM";// AM/PM
-sKeyword[NF_KEY_AP] ="A/P";  // AM/PM short
-sKeyword[NF_KEY_MI] ="M";// Minute
-sKeyword[NF_KEY_MMI] =   "MM";   // Minute 02
-sKeyword[NF_KEY_S] = "S";// Second
-sKeyword[NF_KEY_SS] ="SS";   // Second 02
-sKeyword[NF_KEY_Q] = "Q";// Quarter short 'Q'
-sKeyword[NF_KEY_QQ] ="QQ";   // Quarter long
-sKeyword[NF_KEY_NN] ="NN";   // Day of week short
-sKeyword[NF_KEY_NNN] =   "NNN";  // Day of week long
-sKeyword[NF_KEY_] =  ""; // Day of week long incl. separator
-sKeyword[NF_KEY_WW] ="WW";   // Week of year
-sKeyword[NF_KEY_CCC] =   "CCC";  // Currency abbreviation
+
+sKeyword[NF_KEY_E] = sEnglishKeyword[NF_KEY_E];// Exponent
+sKeyword[NF_KEY_AMPM] =  sEnglishKeyword[NF_KEY_AMPM]; // AM/PM
+sKeyword[NF_KEY_AP] =sEnglishKeyword[NF_KEY_AP];   // AM/PM short
+sKeyword[N

[Libreoffice-commits] core.git: config_host/config_global.h.in config_host.mk.in configure.ac sal/rtl sc/qa

2017-10-19 Thread Mike Kaganski
 config_host.mk.in|1 
 config_host/config_global.h.in   |1 
 configure.ac |   10 
 sal/rtl/math.cxx |   53 
 sc/qa/unit/data/functions/mathematical/fods/mod.fods | 1256 +++
 5 files changed, 592 insertions(+), 729 deletions(-)

New commits:
commit 334a9f16cd1d1f9694f885c759903a41aa3d4833
Author: Mike Kaganski 
Date:   Wed Oct 18 07:53:21 2017 +0300

tdf#113211: fix calculations with big integers

... and munbers with few fractional bits

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

diff --git a/config_host.mk.in b/config_host.mk.in
index 8442f07425f0..f602bbc0802d 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -238,6 +238,7 @@ export HAMCREST_JAR=@HAMCREST_JAR@
 export HAVE_GCC_AVX=@HAVE_GCC_AVX@
 export HAVE_GCC_STACK_PROTECTOR_STRONG=@HAVE_GCC_STACK_PROTECTOR_STRONG@
 export HAVE_GCC_BUILTIN_ATOMIC=@HAVE_GCC_BUILTIN_ATOMIC@
+export HAVE_GCC_BUILTIN_FFS=@HAVE_GCC_BUILTIN_FFS@
 export HAVE_GCC_FINLINE_LIMIT=@HAVE_GCC_FINLINE_LIMIT@
 export HAVE_GCC_FNO_DEFAULT_INLINE=@HAVE_GCC_FNO_DEFAULT_INLINE@
 export HAVE_GCC_FNO_ENFORCE_EH_SPECS=@HAVE_GCC_FNO_ENFORCE_EH_SPECS@
diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in
index 850792479644..0a7912e6dd69 100644
--- a/config_host/config_global.h.in
+++ b/config_host/config_global.h.in
@@ -14,6 +14,7 @@ Any change in this header will cause a rebuild of almost 
everything.
 
 #define HAVE_CXX14_CONSTEXPR 0
 #define HAVE_GCC_BUILTIN_ATOMIC 0
+#define HAVE_GCC_BUILTIN_FFS 0
 /* _Pragma */
 #define HAVE_GCC_PRAGMA_OPERATOR 0
 #define HAVE_GCC_DEPRECATED_MESSAGE 0
diff --git a/configure.ac b/configure.ac
index ac8dbc52463d..a330547d2b21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5795,6 +5795,15 @@ if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
 AC_MSG_RESULT([no])
 fi
 
+AC_MSG_CHECKING([whether $CC supports __builtin_ffs])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return __builtin_ffs(1); 
]])],[HAVE_GCC_BUILTIN_FFS=TRUE],[])
+if test "$HAVE_GCC_BUILTIN_FFS" = "TRUE"; then
+AC_MSG_RESULT([yes])
+AC_DEFINE(HAVE_GCC_BUILTIN_FFS)
+else
+AC_MSG_RESULT([no])
+fi
+
 AC_MSG_CHECKING([whether $CC supports 
__attribute__((deprecated(message)))])
 save_CFLAGS=$CFLAGS
 CFLAGS="$CFLAGS -Werror"
@@ -5943,6 +5952,7 @@ fi
 AC_SUBST(HAVE_GCC_AVX)
 AC_SUBST(HAVE_GCC_STACK_PROTECTOR_STRONG)
 AC_SUBST(HAVE_GCC_BUILTIN_ATOMIC)
+AC_SUBST(HAVE_GCC_BUILTIN_FFS)
 
 dnl ===
 dnl Identify the C++ library
diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx
index 338f40d1469f..32121b34b2f1 100644
--- a/sal/rtl/math.cxx
+++ b/sal/rtl/math.cxx
@@ -37,6 +37,10 @@
 #include 
 #include 
 
+#if !HAVE_GCC_BUILTIN_FFS && !defined _WIN32
+#include 
+#endif
+
 static int const n10Count = 16;
 static double const n10s[2][n10Count] = {
 { 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8,
@@ -169,6 +173,47 @@ bool isRepresentableInteger(double fAbsValue)
 return false;
 }
 
+// Returns 1-based index of least significant bit in a number, or zero if 
number is zero
+int findFirstSetBit(unsigned n)
+{
+#if HAVE_GCC_BUILTIN_FFS
+return __builtin_ffs(n);
+#elif defined _WIN32
+unsigned long pos;
+unsigned char bNonZero = _BitScanForward(&pos, n);
+return (bNonZero == 0) ? 0 : pos + 1;
+#else
+return ffs(n);
+#endif
+}
+
+/** Returns number of binary bits for fractional part of the number
+Expects a proper non-negative double value, not +-INF, not NAN
+ */
+int getBitsInFracPart(double fAbsValue)
+{
+assert(rtl::math::isFinite(fAbsValue) && fAbsValue >= 0.0);
+if (fAbsValue == 0.0)
+return 0;
+auto pValParts = reinterpret_cast< const sal_math_Double * >(&fAbsValue);
+int nExponent = pValParts->inf_parts.exponent - 1023;
+if (nExponent >= 52)
+return 0; // All bits in fraction are in integer part of the number
+int nLeastSignificant = findFirstSetBit(pValParts->inf_parts.fraction_lo);
+if (nLeastSignificant == 0)
+{
+nLeastSignificant = findFirstSetBit(pValParts->inf_parts.fraction_hi);
+if (nLeastSignificant == 0)
+nLeastSignificant = 53; // the implied leading 1 is the least 
significant
+else
+nLeastSignificant += 32;
+}
+int nFracSignificant = 53 - nLeastSignificant;
+int nBitsInFracPart = nFracSignificant - nExponent;
+
+return nBitsInFracPart > 0 ? nBitsInFracPart : 0;
+}
+
 template< typename T >
 inline void doubleToString(typename T::String ** pResult,
sal_Int32 * pResultCapacity, sal_Int32 
nResultOffset,
@@ -1136,7 +1181,8 @@ double SAL_CALL rtl_math_pow10Exp(double fValue, int 

Re: How to run multiple instances of Writer simultaneously?

2017-10-19 Thread Kaganski Mike
On 10/19/2017 10:05 AM, Jens Tröger wrote:
> Hi Mike,
> 
> That would be a good answer to have, because finding documentation on this 
> topic is tricky. Here is how I currently handle this in Python:
> 
>  pipe = …
>  p = subprocess.Popen("/…/soffice --accept='pipe,name=" + pipe + 
> ";url;StarOffice.ServiceManager' --headless --invisible", shell=True)
>  # Wait for the pipe to become available.
>  local = uno.getComponentContext()
>  resolver = 
> local.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver”,
>  local)
>  context = resolver.resolve("uno:pipe,name=" + pipe + 
> ";urp;StarOffice.ComponentContext")
>  desktop = 
> context.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop",
>  context)
>  # Load the document
>  docfile = …
>  document = desktop.loadComponentFromURL("file://" + docfile, "_blank", 
> 0, props)
> 
> This creates a new office process and open the Writer document and connects 
> to it. Note the absence of the custom user installation (for performance 
> reasons)! Once I’m done with it, then:
> 
>  document.close(True) # or if XCloseable doesn’t exist: document.dispose()

Wouldn't that be enough? Why do you need other cleanup?
Supposedly having the soffice process ready for other incoming requests 
would not harm the server operation, and closing the document should 
have released any document-specific resources allocated.

>  desktop.terminate()
>  # context.??
>  # resolver.??
>  # local.??
>  p.terminate()
> 
> The termination of the process p seems to destroy the other running soffice 
> process. Hence using custom user installations with 
> -env:UserInstallation=/tmp/random-dir but that just prolongs the process 
> creation noticeably!
> 
> Thanks!
> Jens
> 
> 
>> On Oct 19, 2017, at 16:48, Kaganski Mike  wrote:
>> Hi,
>>
>> Maybe the real question is how to close a document without forcing
>> soffice process (which is shared in your case among all open documents)
>> shutdown?
>>
>> -- 
>> Best regards,
>> Mike Kaganski
>>
> 
> --
> Jens Tröger
> http://savage.light-speed.de/
> 

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


[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - vcl/source

2017-10-19 Thread Michael Meeks
 vcl/source/opengl/OpenGLContext.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5396ddfb01539424c3aef02bbdea3c5c3152a4ce
Author: Michael Meeks 
Date:   Wed Oct 18 15:24:44 2017 +0100

tdf#113225 - reset framebuffer count when resetting OpenGLContext

Otherwise we can fail to allocate a new one when we need it post reset.


http://crashreport.libreoffice.org/stats/crash_details/e4f26191-15d5-441a-868f-9ada21ef4424

Change-Id: Icc5ec6c51338e18a0a1bc890f56670e8fe9c73ea
Reviewed-on: https://gerrit.libreoffice.org/43508
Tested-by: Jenkins 
Reviewed-by: Michael Meeks 
(cherry picked from commit 856d734ee1665b6aa7304847c3a923af09066016)
Reviewed-on: https://gerrit.libreoffice.org/43551
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/opengl/OpenGLContext.cxx 
b/vcl/source/opengl/OpenGLContext.cxx
index fc12d88617ff..57216f9827a2 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -422,6 +422,7 @@ void OpenGLContext::reset()
 delete pFramebuffer;
 pFramebuffer = pPrevFramebuffer;
 }
+mnFramebufferCount = 0;
 mpFirstFramebuffer = nullptr;
 mpLastFramebuffer = nullptr;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Thorsten Behrens
 xmlsecurity/source/gpg/SecurityEnvironment.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 561d25301bf2a04a2cd34f1674a792167cf5f43b
Author: Thorsten Behrens 
Date:   Wed Oct 18 14:23:37 2017 +0200

gpg4libre fix tdf#113190 don't show expired/invalid keys

Change-Id: I30485bc97d3d287bd867b50398927eabe018914b
Reviewed-on: https://gerrit.libreoffice.org/43502
Reviewed-by: Eike Rathke 
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 
(cherry picked from commit 087a90e27b7219e8c1aaa880b39376c94a0dcaae)
Reviewed-on: https://gerrit.libreoffice.org/43503
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/xmlsecurity/source/gpg/SecurityEnvironment.cxx 
b/xmlsecurity/source/gpg/SecurityEnvironment.cxx
index a90ef15a1640..24e23a8f2f11 100644
--- a/xmlsecurity/source/gpg/SecurityEnvironment.cxx
+++ b/xmlsecurity/source/gpg/SecurityEnvironment.cxx
@@ -76,7 +76,7 @@ Sequence< Reference < XCertificate > > 
SecurityEnvironmentGpg::getPersonalCertif
 GpgME::Key k = m_ctx->nextKey(err);
 if (err)
 break;
-if (!k.isInvalid()) {
+if (!k.isRevoked() && !k.isExpired() && !k.isDisabled() && 
!k.isInvalid()) {
 // We can't create CertificateImpl here as 
CertificateImpl::setCertificate uses GpgME API
 // which interrupts our key listing here. So first get the keys 
from GpgME, then create the CertificateImpls
 keyList.push_back(k);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Maxim Monastirsky
 vcl/unx/gtk/gtksalframe.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 2c41e9924120ec2e399de9b4d8248f25712ae400
Author: Maxim Monastirsky 
Date:   Thu Oct 19 19:43:03 2017 +0300

tdf#106163 tdf#112830 Mirror mouse enter/leave for gtk2

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

diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
index 27b8f3158c62..59e2b21ad31b 100644
--- a/vcl/unx/gtk/gtksalframe.cxx
+++ b/vcl/unx/gtk/gtksalframe.cxx
@@ -2860,6 +2860,9 @@ gboolean GtkSalFrame::signalCrossing( GtkWidget*, 
GdkEventCrossing* pEvent, gpoi
 aEvent.mnCode   = GetMouseModCode( pEvent->state );
 aEvent.mnButton = 0;
 
+if (AllSettings::GetLayoutRTL())
+aEvent.mnX = pThis->maGeometry.nWidth-1-aEvent.mnX;
+
 pThis->CallCallback( (pEvent->type == GDK_ENTER_NOTIFY) ? 
SalEvent::MouseMove : SalEvent::MouseLeave, &aEvent );
 
 return true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Caolán McNamara
 sw/source/filter/ww8/ww8scan.cxx |   14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 02d4421687c1dba797153d9b71c01cf98d1537fb
Author: Caolán McNamara 
Date:   Thu Oct 19 13:06:07 2017 +0100

ofz+ubsan: signed integer overflow

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

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 61d4ff7b2908..240ebbc3057e 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -39,7 +39,7 @@
 #include 
 #include 
 #include 
-
+#include 
 #include 
 
 #include 
@@ -1495,8 +1495,18 @@ WW8_FC WW8ScannerBase::WW8Cp2Fc(WW8_CP nCpPos, bool* 
pIsUnicode,
 return nRet;
 }
 
+if (*pIsUnicode)
+{
+const bool bFail = o3tl::checked_multiply(nCpPos, 2, nCpPos);
+if (bFail)
+{
+SAL_WARN("sw.ww8", "broken offset, ignoring");
+return WW8_CP_MAX;
+}
+}
+
 // No complex file
-return m_pWw8Fib->m_fcMin + nCpPos * (*pIsUnicode ? 2 : 1);
+return m_pWw8Fib->m_fcMin + nCpPos;
 }
 
 //  class WW8ScannerBase
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Noel Grandin
 sd/inc/drawdoc.hxx |   21 +
 sd/source/core/drawdoc.cxx |   28 ++--
 sd/source/core/drawdoc4.cxx|8 +++-
 sd/source/filter/ppt/pptin.cxx |4 ++--
 sd/source/ui/docshell/docshel2.cxx |4 ++--
 sd/source/ui/docshell/docshell.cxx |   11 ---
 sd/source/ui/unoidl/unomodel.cxx   |   16 +---
 7 files changed, 39 insertions(+), 53 deletions(-)

New commits:
commit d54e58616600330e8eb9ba7d5f4598f3b674d643
Author: Noel Grandin 
Date:   Thu Oct 19 11:33:14 2017 +0200

use std::unique_ptr in SdDrawDocument

Change-Id: Id02cf2615b7697df589f612d21219200d3fab082
Reviewed-on: https://gerrit.libreoffice.org/43542
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index fc04e2ce2b30..703c3ef8c467 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -139,13 +139,17 @@ public:
 SAL_DLLPRIVATE bool getDocReadOnly() const { return bReadOnly; }
 private:
 OUStringmsDocAccTitle;
-SdOutliner* mpOutliner;  ///< local outliner for outline mode
-SdOutliner* mpInternalOutliner;  ///< internal outliner for creation 
of text objects
+std::unique_ptr
+mpOutliner;  ///< local outliner for outline 
mode
+std::unique_ptr
+mpInternalOutliner;  ///< internal outliner for 
creation of text objects
 Timer*  mpWorkStartupTimer;
 Idle*   mpOnlineSpellingIdle;
 sd::ShapeList*  mpOnlineSpellingList;
-SvxSearchItem*  mpOnlineSearchItem;
-std::vector maFrameViewList;
+std::unique_ptr
+mpOnlineSearchItem;
+std::vector>
+maFrameViewList;
 SdCustomShowList*   mpCustomShowList;
 ::sd::DrawDocShell* mpDocSh;
 SdTransferable *mpCreatingTransferable;
@@ -171,7 +175,8 @@ private:
 ::sd::DrawDocShellRef   mxAllocedDocShRef;   // => AllocModel()
 boolmbAllocDocSh;   // => AllocModel()
 DocumentTypemeDocType;
-CharClass*  mpCharClass;
+std::unique_ptr
+mpCharClass;
 
 ::std::unique_ptr mpDrawPageListWatcher;
 ::std::unique_ptr mpMasterPageListWatcher;
@@ -415,7 +420,7 @@ public:
 
 SAL_DLLPRIVATE sal_uLong   GetLinkCount();
 
-SAL_DLLPRIVATE std::vector& GetFrameViewList() { return 
maFrameViewList; }
+SAL_DLLPRIVATE std::vector>& 
GetFrameViewList() { return maFrameViewList; }
 SdCustomShowList* GetCustomShowList(bool bCreate = false);
 
 SAL_DLLPRIVATE voidNbcSetChanged(bool bFlag);
@@ -434,7 +439,7 @@ public:
 SAL_DLLPRIVATE boolIsNewOrLoadCompleted() const {return 
mbNewOrLoadCompleted; }
 
 SAL_DLLPRIVATE ::sd::FrameView* GetFrameView(sal_uLong nPos) {
-return nPos < maFrameViewList.size() ? maFrameViewList[nPos] : 
nullptr; }
+return nPos < maFrameViewList.size() ? maFrameViewList[nPos].get() : 
nullptr; }
 
 /** deprecated*/
 SAL_DLLPRIVATE static SdAnimationInfo* GetAnimationInfo(SdrObject* 
pObject);
@@ -444,7 +449,7 @@ public:
 SAL_DLLPRIVATE static SdIMapInfo*  GetIMapInfo( SdrObject const * pObject 
);
 SAL_DLLPRIVATE static IMapObject*  GetHitIMapObject( SdrObject* pObject, 
const Point& rWinPoint );
 
-SAL_DLLPRIVATE CharClass*  GetCharClass() const { return 
mpCharClass; }
+SAL_DLLPRIVATE CharClass*  GetCharClass() const { return 
mpCharClass.get(); }
 
 SAL_DLLPRIVATE voidRestoreLayerNames();
 
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 54b2474008b9..18a94687b7c9 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -233,7 +233,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, 
SfxObjectShell* pDrDocSh)
 
 LanguageType eRealLanguage = MsLangId::getRealLanguage( meLanguage );
 LanguageTag aLanguageTag( eRealLanguage);
-mpCharClass = new CharClass( aLanguageTag );
+mpCharClass.reset(new CharClass( aLanguageTag ));
 
 // If the current application language is a language that uses 
right-to-left text...
 LanguageType eRealCTLLanguage = 
Application::GetSettings().GetLanguageTag().getLanguageType();
@@ -373,8 +373,7 @@ SdDrawDocument::~SdDrawDocument()
 }
 
 StopOnlineSpelling();
-delete mpOnlineSearchItem;
-mpOnlineSearchItem = nullptr;
+mpOnlineSearchItem.reset();
 
 CloseBookmarkDoc();
 SetAllocDocSh(false);
@@ -393,9 +392,7 @@ SdDrawDocument::~SdDrawDocument()
 pLinkManager = nullptr;
 }
 
-std::vector::iterator pIter;
-for ( pIter = maFrameViewList.begin(); pIter != maFrameViewList.end(); 
++pIter )
-delete *pIter;
+maFrameViewList.clear();
 
 if (mpCustomShowList)
 {
@@ -410,14 +407,9 @@ SdDrawDocument::~SdDrawDocument()
 mpCustomShowLi

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

2017-10-19 Thread Szymon Kłos
 include/oox/drawingml/clrscheme.hxx |   33 
 include/oox/export/utils.hxx|2 
 include/oox/ppt/presentationfragmenthandler.hxx |1 
 oox/source/export/drawingml.cxx |2 
 oox/source/ppt/presentationfragmenthandler.cxx  |   76 +
 sd/qa/unit/data/pptx/accent-color.pptx  |binary
 sd/qa/unit/export-tests-ooxml2.cxx  |   19 ++
 sd/source/filter/eppt/epptooxml.hxx |4 
 sd/source/filter/eppt/pptx-epptooxml.cxx|  193 ++--
 9 files changed, 285 insertions(+), 45 deletions(-)

New commits:
commit 98133504fde1e1b235c39e4bb3b72bb2ee0b7819
Author: Szymon Kłos 
Date:   Tue Oct 17 22:14:38 2017 +0200

PPTX export: remember color schemes in theme

Remember color scheme from loaded pptx file
or use default values.

Change-Id: Icb69c51603afc5f332c20c75e4ed5f659f4b5614
Reviewed-on: https://gerrit.libreoffice.org/43470
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 

diff --git a/include/oox/drawingml/clrscheme.hxx 
b/include/oox/drawingml/clrscheme.hxx
index ccb1517e44eb..ccf918d7ba74 100644
--- a/include/oox/drawingml/clrscheme.hxx
+++ b/include/oox/drawingml/clrscheme.hxx
@@ -28,9 +28,42 @@
 
 #include 
 #include 
+#include 
 
 namespace oox { namespace drawingml {
 
+enum PredefinedClrSchemeId {
+//dk1,
+//lt1,
+dk2 = 0,
+lt2,
+accent1,
+accent2,
+accent3,
+accent4,
+accent5,
+accent6,
+hlink,
+folHlink,
+Count
+};
+
+static std::map PredefinedClrNames =
+{
+//{ dk1,  "dk1" },
+//{ lt1, "lt1" },
+{ dk2, "dk2" },
+{ lt2, "lt2" },
+{ accent1, "accent1" },
+{ accent2, "accent2" },
+{ accent3, "accent3" },
+{ accent4, "accent4" },
+{ accent5, "accent5" },
+{ accent6, "accent6" },
+{ hlink, "hlink" },
+{ folHlink, "folHlink" }
+};
+
 class ClrMap
 {
 std::map < sal_Int32, sal_Int32 > maClrMap;
diff --git a/include/oox/export/utils.hxx b/include/oox/export/utils.hxx
index 6bca2edcbd16..74e78a37da33 100644
--- a/include/oox/export/utils.hxx
+++ b/include/oox/export/utils.hxx
@@ -28,7 +28,7 @@ inline OString I32S_(sal_Int32 x) { return 
OString::number(x); }
 inline OString I32SHEX_(sal_Int32 x)
 {
 OString aStr = OString::number(x, 16);
-if (aStr.getLength() % 2 != 0)
+while (aStr.getLength() < 6)
 aStr = OString("0") + aStr;
 return aStr.getStr();
 }
diff --git a/include/oox/ppt/presentationfragmenthandler.hxx 
b/include/oox/ppt/presentationfragmenthandler.hxx
index aeda119cd2f1..637e70643be7 100644
--- a/include/oox/ppt/presentationfragmenthandler.hxx
+++ b/include/oox/ppt/presentationfragmenthandler.hxx
@@ -53,6 +53,7 @@ protected:
 private:
 
 void importSlide(sal_uInt32 nSlide, bool bFirstSlide, bool bImportNotes);
+void saveThemeToGrabBag(oox::drawingml::ThemePtr pThemePtr, const 
OUString& sTheme);
 
 std::vector< OUString > maSlideMasterVector;
 std::vector< OUString > maSlidesVector;
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 306e884fc0f3..953c16467596 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2943,7 +2943,7 @@ void DrawingML::WriteStyleProperties( sal_Int32 nTokenId, 
const Sequence< Proper
 aProperties[i].Value >>= aTransformations;
 }
 mpFS->startElementNS( XML_a, nTokenId, XML_idx, I32S( nIdx ), FSEND );
-WriteColor( sSchemeClr, aTransformations );
+WriteColor(sSchemeClr, aTransformations);
 mpFS->endElementNS( XML_a, nTokenId );
 }
 else
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx 
b/oox/source/ppt/presentationfragmenthandler.cxx
index 07433617b612..f78e75c1bc00 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -64,6 +64,22 @@ using namespace ::com::sun::star::xml::sax;
 
 namespace oox { namespace ppt {
 
+static std::map PredefinedClrTokens =
+{
+//{ dk1, XML_dk1 },
+//{ lt1, XML_lt1 },
+{ dk2, XML_dk2 },
+{ lt2, XML_lt2 },
+{ accent1, XML_accent1 },
+{ accent2, XML_accent2 },
+{ accent3, XML_accent3 },
+{ accent4, XML_accent4 },
+{ accent5, XML_accent5 },
+{ accent6, XML_accent6 },
+{ hlink, XML_hlink },
+{ folHlink, XML_folHlink }
+};
+
 PresentationFragmentHandler::PresentationFragmentHandler( XmlFilterBase& 
rFilter, const OUString& rFragmentPath ) throw()
 : FragmentHandler2( rFilter, rFragmentPath )
 , mpTextListStyle( new TextListStyle )
@@ -143,6 +159,65 @@ void ResolveTextFields( XmlFilterBase const & rFilter )
 }
 }
 
+void PresentationFragmentHandler::saveThemeToGrabBag(oox::drawingml::ThemePtr 
pThemePtr, const OUString& sTheme)
+{
+if (!pThemePtr)
+return;
+
+try
+{
+uno::Reference xDocProps(getFilter().getModel(), 
uno::UNO_QUERY);
+if (xDocProps.is())
+{
+

[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - bridges/Library_cpp_uno.mk

2017-10-19 Thread Stephan Bergmann
 bridges/Library_cpp_uno.mk |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 8b66ed9ca46249d61e0e3dbd83af26f0dc027c01
Author: Stephan Bergmann 
Date:   Thu Oct 19 15:29:38 2017 +0200

Again, no -fstack-protector-strong for gcc3_linux_aarch64/cpp2uno.cxx

8d12e4ec8b843d59661a12a7a92bfec7e4473e0f "No -fstack-protect-strong for
gcc3_linux_aarch64/cpp2uno.cxx vtableSlotCall" had done that in the past (so
that setting up the x0/x1 return registers in vtableSlotCall is not 
clobbered
by the stack protector code), but gbuild details have apparently changed in 
the
meantime, so that gb_CXXFLAGS_COMMON's -fstack-protector-strong now ends up 
on
the compiler command line before what is covered by 
gb_Library_add_cxxobjects's
argument, so didn't get subst'ed to -fstack-protector.  That caused Flathub
aarch64 builds to fail in CustomTarget_testtools/uno_test.

However, if both -fstack-protector-strong and -fstack-protector are present 
on
the command line, the second apparently wins, so use that hack for now.
(-fstack-protector-strong is only available since GCC 4.9, but 
-fstack-protector
is already available in our current baseline GCC 4.8.1, and even for a 
build on
that baseline it wouldn't hurt if cpp2uno.cxx was explicitly built with
-fstack-protector even if none of the other files were built with
-fstack-protector-strong.)

Change-Id: I9d78d2e5b08b7c0a4adb1531b482cd43617886f7
(cherry picked from commit dddb527db1562f30a2a2b20338dfc8458086a4a9)
Reviewed-on: https://gerrit.libreoffice.org/43564
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index 01ee21f848fe..62d26448937b 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -37,9 +37,8 @@ bridge_exception_objects := abi callvirtualfunction uno2cpp
 
 $(eval $(call gb_Library_add_cxxobjects,$(gb_CPPU_ENV)_uno, \
 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/cpp2uno, \
-$(subst -fstack-protector-strong,-fstack-protector, \
-$(gb_LinkTarget_EXCEPTIONFLAGS) \
-$(call gb_LinkTarget__get_cxxflags,$(gb_CPPU_ENV)_uno)) \
+$(gb_LinkTarget_EXCEPTIONFLAGS) \
+$(call gb_LinkTarget__get_cxxflags,$(gb_CPPU_ENV)_uno) -fstack-protector \
 ))
 endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: officecfg/registry

2017-10-19 Thread Cheng-Chia Tseng
 officecfg/registry/data/org/openoffice/VCL.xcu |   54 -
 1 file changed, 27 insertions(+), 27 deletions(-)

New commits:
commit 278bdbca318defa3bb862e0422cff2492ef46705
Author: Cheng-Chia Tseng 
Date:   Thu Oct 5 16:58:09 2017 +0800

tdf#112879 Update to Chinese (traditional) to reflect current norms

Change-Id: Id439e3c4e8fc6e5d05026e43132460840a68aff1
Reviewed-on: https://gerrit.libreoffice.org/43163
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu 
b/officecfg/registry/data/org/openoffice/VCL.xcu
index 11a74dcb30d6..e47e4134a449 100644
--- a/officecfg/registry/data/org/openoffice/VCL.xcu
+++ b/officecfg/registry/data/org/openoffice/VCL.xcu
@@ -275,89 +275,89 @@
 
 
   
-文泉驛等寬微米黑;細明體;MingLiU;Cumberland 
AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida 
Typewriter;Monaco;Monospaced
+思源黑體 
HW;細明體;MingLiU;文泉驛等寬微米黑;Liberation Mono;Cumberland 
AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida 
Typewriter;Monaco;Monospaced
   
   
-文泉驛微米黑;黑體-繁;Heiti TC;儷黑 Pro;LiHei 
Pro;微軟正黑體;新細明體;PMingLiU;MingLiU;Ming;Arial Unicode MS;Lucida 
Sans Unicode;Tahoma
+思源黑體;蘋方-繁;PingFang TC;儷黑 Pro;LiHei 
Pro;微軟正黑體;文泉驛微米黑;Hei;新細明體;PMingLiU;Ming;Andale 
Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma
   
   
-文泉驛微米黑;黑體-繁;Heiti TC;儷黑 Pro;LiHei 
Pro;微軟正黑體;新細明體;PMingLiU;MingLiU;Ming;Arial Unicode MS;Lucida 
Sans Unicode;Tahoma
+思源黑體;蘋方-繁;PingFang TC;儷黑 Pro;LiHei 
Pro;微軟正黑體;文泉驛微米黑;Hei;新細明體;PMingLiU;Ming;Andale 
Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma
   
   
-文泉驛微米黑;黑體-繁;Heiti TC;儷黑 Pro;LiHei 
Pro;微軟正黑體;新細明體;MingLiU;Ming;PMingLiU;Arial Unicode MS;Lucida 
Sans Unicode;Tahoma
+思源黑體;蘋方-繁;PingFang TC;儷黑 Pro;LiHei 
Pro;微軟正黑體;文泉驛微米黑;Hei;新細明體;PMingLiU;Ming;Andale 
Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma
   
   
-文泉驛微米黑;黑體-繁;Heiti TC;儷黑 Pro;LiHei 
Pro;微軟正黑體;新細明體;PMingLiU;MingLiU;Ming;Arial Unicode MS;Lucida 
Sans Unicode;Tahoma
+思源黑體;蘋方-繁;PingFang TC;儷黑 Pro;LiHei 
Pro;微軟正黑體;文泉驛微米黑;Hei;新細明體;PMingLiU;Ming;Andale 
Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma
   
   
-AR PL UMing TW;儷宋 Pro;LiSong Pro;黑體-繁;Heiti TC;儷黑 
Pro;LiHei Pro;新細明體;PMingLiU;MingLiU;Ming;Arial Unicode MS;Lucida Sans 
Unicode;Tahoma
+思源宋體;宋體-繁;Songti TC;儷宋 Pro;LiSong 
Pro;新細明體;PMingLiU;AR PL UMing TW;Ming;Song;Sung;Andale Sans UI;Arial 
Unicode MS;Lucida Sans Unicode;Tahoma
   
   
-文泉驛等寬微米黑;細明體;MingLiU;Cumberland 
AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida 
Typewriter;Monaco;Monospaced
+思源黑體 
HW;細明體;MingLiU;文泉驛等寬微米黑;Liberation Mono;Cumberland 
AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida 
Typewriter;Monaco;Monospaced
   
   
-文泉驛等寬微米黑;細明體;MingLiU;Cumberland 
AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida 
Typewriter;Monaco;Monospaced
+思源黑體 
HW;細明體;MingLiU;文泉驛等寬微米黑;Liberation Mono;Cumberland 
AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida 
Typewriter;Monaco;Monospaced
   
   
-文泉驛微米黑;黑體-繁;Heiti TC;儷黑 Pro;LiHei 
Pro;微軟正黑體;新細明體;PMingLiU;Kai;Arial Unicode 
MS;Ming;gnu-unifont;Interface User;Geneva;Tahoma;Dialog;Albany 
AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Helmet;Interface System;Sans 
Serif
+思源黑體;蘋方-繁;PingFang TC;儷黑 Pro;LiHei 
Pro;微軟正黑體;文泉驛微米黑;Hei;新細明體;PMingLiU;Andale Sans 
UI;Arial Unicode MS;Ming;gnu-unifont;Interface User;WarpSans;Geneva;Tahoma;MS 
Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans 
L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif
   
 
 
   
-文泉驛等寬微米黑;細明體;MingLiU;Cumberland 
AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida 
Typewriter;Monaco;Monospaced
+思源黑體 
HW;細明體;MingLiU;文泉驛等寬微米黑;Liberation Mono;Cumberland 
AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida 
Typewriter;Monaco;Monospaced
   
   
-文泉驛微米黑;黑體-繁;Heiti TC;儷黑 Pro;LiHei 
Pro;微軟正黑體;新細明體;

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

2017-10-19 Thread Noel Grandin
 sw/source/core/doc/docfld.cxx |   25 -
 sw/source/core/inc/docfld.hxx |7 ---
 2 files changed, 12 insertions(+), 20 deletions(-)

New commits:
commit ed3d2e9863c11a36756466d907fa7fa8ecb726d0
Author: Noel Grandin 
Date:   Thu Oct 19 14:49:08 2017 +0200

use std::unique_ptr in SwDocUpdateField

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

diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index dcbc666ccfde..90c44f70ab60 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -776,7 +776,7 @@ void SwDocUpdateField::InsDelFieldInFieldLst( bool bIns, 
const SwTextField& rFie
 {
 if( !bIns ) // if list is present and deleted
 return; // don't do a thing
-pFieldSortLst = new SetGetExpFields;
+pFieldSortLst.reset(new SetGetExpFields);
 }
 
 if( bIns )  // insert anew:
@@ -805,8 +805,7 @@ void SwDocUpdateField::MakeFieldList( SwDoc& rDoc, bool 
bAll, int eGetMode )
 void SwDocUpdateField::MakeFieldList_( SwDoc& rDoc, int eGetMode )
 {
 // new version: walk all fields of the attribute pool
-delete pFieldSortLst;
-pFieldSortLst = new SetGetExpFields;
+pFieldSortLst.reset(new SetGetExpFields);
 
 // consider and unhide sections
 // with hide condition, only in mode GETFLD_ALL ()
@@ -1104,8 +1103,8 @@ void SwDocUpdateField::InsertFieldType( const 
SwFieldType& rType )
 if( !pFnd )
 {
 SwCalcFieldType* pNew = new SwCalcFieldType( sFieldName, &rType );
-pNew->pNext.reset( aFieldTypeTable[ n ] );
-aFieldTypeTable[ n ] = pNew;
+pNew->pNext.reset( aFieldTypeTable[ n ].release() );
+aFieldTypeTable[ n ].reset(pNew);
 }
 }
 }
@@ -1134,14 +1133,13 @@ void SwDocUpdateField::RemoveFieldType( const 
SwFieldType& rType )
 SwHash* pFnd = Find( sFieldName, GetFieldTypeTable(), TBLSZ, &n );
 if( pFnd )
 {
-if( aFieldTypeTable[ n ] == pFnd )
+if( aFieldTypeTable[ n ].get() == pFnd )
 {
-aFieldTypeTable[ n ] = 
static_cast(pFnd->pNext.release());
-delete pFnd;
+aFieldTypeTable[ n 
].reset(static_cast(pFnd->pNext.release()));
 }
 else
 {
-SwHash* pPrev = aFieldTypeTable[ n ];
+SwHash* pPrev = aFieldTypeTable[ n ].get();
 while( pPrev->pNext.get() != pFnd )
 pPrev = pPrev->pNext.get();
 pPrev->pNext = std::move(pFnd->pNext);
@@ -1152,23 +1150,16 @@ void SwDocUpdateField::RemoveFieldType( const 
SwFieldType& rType )
 }
 
 SwDocUpdateField::SwDocUpdateField(SwDoc* pDoc)
-: pFieldSortLst(nullptr)
-, nNodes(0)
+: nNodes(0)
 , nFieldLstGetMode(0)
 , pDocument(pDoc)
 , bInUpdateFields(false)
 , bFieldsDirty(false)
-
 {
-memset( aFieldTypeTable, 0, sizeof( aFieldTypeTable ) );
 }
 
 SwDocUpdateField::~SwDocUpdateField()
 {
-delete pFieldSortLst;
-
-for(SwCalcFieldType* p : aFieldTypeTable)
-delete p;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/docfld.hxx b/sw/source/core/inc/docfld.hxx
index 5410ed76f52a..9979d557a8ee 100644
--- a/sw/source/core/inc/docfld.hxx
+++ b/sw/source/core/inc/docfld.hxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class SwTextField;
 class SwIndex;
@@ -131,8 +132,8 @@ const int GETFLD_EXPAND = 2;
 
 class SwDocUpdateField
 {
-SetGetExpFields* pFieldSortLst;// current field list for calculation
-SwCalcFieldType*  aFieldTypeTable[ TBLSZ ];
+std::unique_ptr pFieldSortLst;// current field list 
for calculation
+std::unique_ptr aFieldTypeTable[ TBLSZ ];
 
 sal_uLong nNodes;   // if the node count is different
 sal_uInt8 nFieldLstGetMode;
@@ -149,7 +150,7 @@ public:
 SwDocUpdateField(SwDoc* pDocument);
 ~SwDocUpdateField();
 
-const SetGetExpFields* GetSortLst() const { return pFieldSortLst; }
+const SetGetExpFields* GetSortLst() const { return pFieldSortLst.get(); }
 
 void MakeFieldList( SwDoc& rDoc, bool bAll, int eGetMode );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Stephan Bergmann
 idlc/source/parser.y |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7855c29b4d40a64b73ad30c3f1f94a81cd61bf7a
Author: Stephan Bergmann 
Date:   Mon Oct 16 20:42:56 2017 +0200

loplugin:includeform: manual changes to idlc/source/parser.y

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

diff --git a/idlc/source/parser.y b/idlc/source/parser.y
index 1c1a27a67806..1e873853b46e 100644
--- a/idlc/source/parser.y
+++ b/idlc/source/parser.y
@@ -44,11 +44,11 @@
 #include 
 #include 
 
-#include "aststructinstance.hxx"
+#include 
 
 #include "attributeexceptions.hxx"
 
-#include "rtl/strbuf.hxx"
+#include 
 #include 
 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: avmedia/Library_avmediavlc.mk avmedia/source

2017-10-19 Thread Stephan Bergmann
 avmedia/Library_avmediavlc.mk  |1 +
 avmedia/source/vlc/inc/wrapper/Common.hxx  |4 ++--
 avmedia/source/vlc/inc/wrapper/EventHandler.hxx|6 +++---
 avmedia/source/vlc/inc/wrapper/EventManager.hxx|6 +++---
 avmedia/source/vlc/inc/wrapper/Instance.hxx|4 ++--
 avmedia/source/vlc/inc/wrapper/Media.hxx   |4 ++--
 avmedia/source/vlc/inc/wrapper/Player.hxx  |4 ++--
 avmedia/source/vlc/inc/wrapper/ThreadsafeQueue.hxx |6 +++---
 avmedia/source/vlc/inc/wrapper/Wrapper.hxx |   18 +-
 avmedia/source/vlc/wrapper/Common.cxx  |2 +-
 avmedia/source/vlc/wrapper/EventHandler.cxx|2 +-
 avmedia/source/vlc/wrapper/EventManager.cxx|4 ++--
 avmedia/source/vlc/wrapper/Instance.cxx|2 +-
 avmedia/source/vlc/wrapper/Media.cxx   |6 +++---
 avmedia/source/vlc/wrapper/Player.cxx  |6 +++---
 15 files changed, 38 insertions(+), 37 deletions(-)

New commits:
commit 931decd0e908dae1b3780c56a58ca1f4d858729c
Author: Stephan Bergmann 
Date:   Thu Oct 12 23:35:40 2017 +0200

Move vlc/wrapper include files to common include directory

...that are inclued from both vlc and vlc/wrapper.  Change done in 
preparation
of loplugin:inlcudeform.

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

diff --git a/avmedia/Library_avmediavlc.mk b/avmedia/Library_avmediavlc.mk
index 0ee5cd2d0d46..3db43315e67e 100644
--- a/avmedia/Library_avmediavlc.mk
+++ b/avmedia/Library_avmediavlc.mk
@@ -14,6 +14,7 @@ $(eval $(call 
gb_Library_set_componentfile,avmediavlc,avmedia/source/vlc/avmedia
 $(eval $(call gb_Library_set_include,avmediavlc,\
 $$(INCLUDE) \
 -I$(SRCDIR)/avmedia/source/inc \
+-I$(SRCDIR)/avmedia/source/vlc/inc \
 ))
 
 $(eval $(call gb_Library_use_custom_headers,avmediavlc,\
diff --git a/avmedia/source/vlc/wrapper/Common.hxx 
b/avmedia/source/vlc/inc/wrapper/Common.hxx
similarity index 77%
rename from avmedia/source/vlc/wrapper/Common.hxx
rename to avmedia/source/vlc/inc/wrapper/Common.hxx
index f4984b6b1482..6935eca96bc7 100644
--- a/avmedia/source/vlc/wrapper/Common.hxx
+++ b/avmedia/source/vlc/inc/wrapper/Common.hxx
@@ -7,8 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_AVMEDIA_SOURCE_VLC_WRAPPER_COMMON_HXX
-#define INCLUDED_AVMEDIA_SOURCE_VLC_WRAPPER_COMMON_HXX
+#ifndef INCLUDED_AVMEDIA_SOURCE_VLC_INC_WRAPPER_COMMON_HXX
+#define INCLUDED_AVMEDIA_SOURCE_VLC_INC_WRAPPER_COMMON_HXX
 
 namespace avmedia
 {
diff --git a/avmedia/source/vlc/wrapper/EventHandler.hxx 
b/avmedia/source/vlc/inc/wrapper/EventHandler.hxx
similarity index 85%
rename from avmedia/source/vlc/wrapper/EventHandler.hxx
rename to avmedia/source/vlc/inc/wrapper/EventHandler.hxx
index e9d8cc224294..0315b809507d 100644
--- a/avmedia/source/vlc/wrapper/EventHandler.hxx
+++ b/avmedia/source/vlc/inc/wrapper/EventHandler.hxx
@@ -7,12 +7,12 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_AVMEDIA_SOURCE_VLC_WRAPPER_EVENTHANDLER_HXX
-#define INCLUDED_AVMEDIA_SOURCE_VLC_WRAPPER_EVENTHANDLER_HXX
+#ifndef INCLUDED_AVMEDIA_SOURCE_VLC_INC_WRAPPER_EVENTHANDLER_HXX
+#define INCLUDED_AVMEDIA_SOURCE_VLC_INC_WRAPPER_EVENTHANDLER_HXX
 
 #include 
 #include 
-#include "ThreadsafeQueue.hxx"
+#include "wrapper/ThreadsafeQueue.hxx"
 
 namespace avmedia
 {
diff --git a/avmedia/source/vlc/wrapper/EventManager.hxx 
b/avmedia/source/vlc/inc/wrapper/EventManager.hxx
similarity index 89%
rename from avmedia/source/vlc/wrapper/EventManager.hxx
rename to avmedia/source/vlc/inc/wrapper/EventManager.hxx
index 85939877cb42..eb4f2980284a 100644
--- a/avmedia/source/vlc/wrapper/EventManager.hxx
+++ b/avmedia/source/vlc/inc/wrapper/EventManager.hxx
@@ -7,11 +7,11 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_AVMEDIA_SOURCE_VLC_WRAPPER_EVENTMANAGER_HXX
-#define INCLUDED_AVMEDIA_SOURCE_VLC_WRAPPER_EVENTMANAGER_HXX
+#ifndef INCLUDED_AVMEDIA_SOURCE_VLC_INC_WRAPPER_EVENTMANAGER_HXX
+#define INCLUDED_AVMEDIA_SOURCE_VLC_INC_WRAPPER_EVENTMANAGER_HXX
 
 #include 
-#include "Player.hxx"
+#include "wrapper/Player.hxx"
 
 struct libvlc_event_manager_t;
 struct libvlc_event_t;
diff --git a/avmedia/source/vlc/wrapper/Instance.hxx 
b/avmedia/source/vlc/inc/wrapper/Instance.hxx
similarity index 88%
rename from avmedia/source/vlc/wrapper/Instance.hxx
rename to avmedia/source/vlc/inc/wrapper/Instance.hxx
index 241caf6d94e3..f2e8c9c8ef0e 100644
--- a/avmedia/source/vlc/wrapper/Instance.hxx
+++ b/avmedia/source/vlc/inc/wrapper/Instance.hxx
@@ -7,8 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_AVMEDIA_SOURCE_VLC_WRAPPER_INSTANCE_HXX
-#define INCLUDED_AVMEDIA_SOURCE_VLC_WRAPPER_INSTANCE_HXX
+#ifndef INCLUDED_AVMEDIA_SO

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

2017-10-19 Thread Stephan Bergmann
 unoidl/source/sourceprovider-parser.y |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 96e68b9949b86afd3006415c733a2a710e8817f3
Author: Stephan Bergmann 
Date:   Thu Oct 12 15:39:00 2017 +0200

loplugin:includeform: manual changes to 
unoidl/source/sourceprovider-parser.y

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

diff --git a/unoidl/source/sourceprovider-parser.y 
b/unoidl/source/sourceprovider-parser.y
index c491d23daea8..b558a4ccfc29 100644
--- a/unoidl/source/sourceprovider-parser.y
+++ b/unoidl/source/sourceprovider-parser.y
@@ -14,7 +14,7 @@
 
 %{
 
-#include "sal/config.h"
+#include 
 
 #include 
 #include 
@@ -26,7 +26,7 @@
 #include 
 #include 
 
-#include 
+#include "sourceprovider-parser-requires.hxx"
 
 %}
 
@@ -52,9 +52,9 @@
 
 %{
 
-#include "osl/file.h"
-#include "osl/thread.h"
-#include "sal/log.hxx"
+#include 
+#include 
+#include 
 
 #include "sourceprovider-scanner.hxx"
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Stephan Bergmann
 include/vcl/IDialogRenderable.hxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 245fda4189cab7b8ec33ca23de1d7ea3f6fa5a1e
Author: Stephan Bergmann 
Date:   Thu Oct 12 15:36:44 2017 +0200

Remove self-include

...that was probably added by accident with
0f58e974a7d6a88491a97ea3d0f30755ec330253 "lokdialog: Better dialog rendering
API"

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

diff --git a/include/vcl/IDialogRenderable.hxx 
b/include/vcl/IDialogRenderable.hxx
index 02e959ea6fad..3fd6b6c93bd8 100644
--- a/include/vcl/IDialogRenderable.hxx
+++ b/include/vcl/IDialogRenderable.hxx
@@ -16,8 +16,6 @@
 #include 
 #include 
 
-#include "IDialogRenderable.hxx"
-
 #include 
 
 namespace vcl
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Eike Rathke
 sc/source/ui/app/inputhdl.cxx |   16 
 sc/source/ui/app/inputwin.cxx |8 +---
 sc/source/ui/inc/inputhdl.hxx |9 +++--
 3 files changed, 20 insertions(+), 13 deletions(-)

New commits:
commit 8112af3361fdf15fcf5d3177cd967e1d8d97d5f3
Author: Eike Rathke 
Date:   Thu Oct 19 19:23:01 2017 +0200

Resolves: tdf#113179 merge language attributes early, tdf#108795 follow-up

Merging attributes from table to top EditEngine has to be done
before colorizing with the range finder, as the resulting merged
default item set *overwrites* the items set.

Change-Id: I6561201de11344161f61d7d4cf6a7b79d76ba493

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 5a0436f6a745..f8231e731a11 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2011,7 +2011,8 @@ void ScInputHandler::RemoveRangeFinder()
 DeleteRangeFinder(); // Deletes the list and the labels on the table
 }
 
-bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool 
bInputActivated )
+bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool 
bInputActivated,
+ScEditEngineDefaulter* pTopEngine )
 {
 bool bNewTable = false;
 
@@ -2132,6 +2133,13 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, 
bool bFromCommand, bool bIn
 }
 }
 
+if (pTopEngine)
+{
+// Necessary to sync SvxAutoCorrect behavior. This has to be
+// done before InitRangeFinder() below.
+MergeLanguageAttributes( *pTopEngine);
+}
+
 //  UpdateSpellSettings enables online spelling if needed
 //  -> also call if attributes are unchanged
 UpdateSpellSettings( true ); // uses pLastPattern
@@ -2263,7 +2271,7 @@ bool ScInputHandler::DataChanging( sal_Unicode cTyped, 
bool bFromCommand )
 bInOwnChange = true; // disable ModifyHdl (reset in DataChanged)
 
 if ( eMode == SC_INPUT_NONE )
-return StartTable( cTyped, bFromCommand, false );
+return StartTable( cTyped, bFromCommand, false, nullptr );
 else
 return false;
 }
@@ -2479,7 +2487,7 @@ void ScInputHandler::InvalidateAttribs()
 
 // --- public methods 
 
-void ScInputHandler::SetMode( ScInputMode eNewMode, const OUString* pInitText )
+void ScInputHandler::SetMode( ScInputMode eNewMode, const OUString* pInitText, 
ScEditEngineDefaulter* pTopEngine )
 {
 if ( eMode == eNewMode )
 return;
@@ -2510,7 +2518,7 @@ void ScInputHandler::SetMode( ScInputMode eNewMode, const 
OUString* pInitText )
 {
 if (eOldMode == SC_INPUT_NONE) // not if switching between modes
 {
-if (StartTable(0, false, eMode == SC_INPUT_TABLE))
+if (StartTable(0, false, eMode == SC_INPUT_TABLE, pTopEngine))
 {
 if (pActiveViewSh)
 pActiveViewSh->GetViewData().GetDocShell()->PostEditView( 
mpEditEngine.get(), aCursorPos );
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index dca31015375a..92e7db4dd5a3 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1108,13 +1108,7 @@ void ScTextWnd::StartEditEngine()
 
 ScInputHandler* pHdl = mpViewShell->GetInputHandler();
 if (pHdl)
-{
-bool bStarting = !pHdl->IsEditMode();
-pHdl->SetMode(SC_INPUT_TOP);
-if (bStarting)
-// necessary to sync SvxAutoCorrect behavior
-pHdl->MergeLanguageAttributes( *mpEditEngine);
-}
+pHdl->SetMode(SC_INPUT_TOP, nullptr, mpEditEngine.get());
 
 SfxViewFrame* pViewFrm = SfxViewFrame::Current();
 if (pViewFrm)
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index c470792fa662..9457f42577e6 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -131,9 +131,13 @@ private:
  *   for text or number.
  * @param bInputActivated true if the cell input mode is activated (via
  *F2), false otherwise.
+ * @param pTopEngine top window input line EditEngine. If not nullptr then
+ *   some default attributes are merged to it from the
+ *   table EditEngine.
  * @return true if the new edit mode has been started.
  */
-boolStartTable( sal_Unicode cTyped, bool bFromCommand, bool 
bInputActivated );
+boolStartTable( sal_Unicode cTyped, bool bFromCommand, bool 
bInputActivated,
+ScEditEngineDefaulter* pTopEngine );
 voidRemoveSelection();
 voidUpdateFormulaMode();
 static void InvalidateAttribs();
@@ -171,7 +175,8 @@ public:
 ScInputHandler();
 ~ScInputHandler();
 
-void SetMode( ScInputMode eNew

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

2017-10-19 Thread Tamás Zolnai
 sc/qa/unit/data/ods/pivottable_no_columns_layout.ods |binary
 sc/qa/unit/subsequent_filters-test.cxx   |   30 +++
 sc/source/core/data/dpoutputgeometry.cxx |2 -
 sc/source/filter/xml/xmldpimp.cxx|1 
 4 files changed, 32 insertions(+), 1 deletion(-)

New commits:
commit 291874c09c4bcde61f2c6808f2df6079f38d74e0
Author: Tamás Zolnai 
Date:   Thu Oct 19 15:11:41 2017 +0200

tdf#113268: Pivot table: Missing popup button after opening a ODS

Wrong row number was calculated here. This ++nCurRow is usefull
only when headerlayout flag is set. It's a MSO compatibility flag
so it's not there by default in LO created tables.

Change-Id: Id7989d898f2647f1ba45ed95e0aa615e3b4fa311
Reviewed-on: https://gerrit.libreoffice.org/43552
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 

diff --git a/sc/qa/unit/data/ods/pivottable_no_columns_layout.ods 
b/sc/qa/unit/data/ods/pivottable_no_columns_layout.ods
new file mode 100755
index ..e6ddca7299fc
Binary files /dev/null and 
b/sc/qa/unit/data/ods/pivottable_no_columns_layout.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index 459a85d4377b..12363205ed41 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -247,6 +247,7 @@ public:
 void testPageScalingXLSX();
 void testActiveXCheckboxXLSX();
 void testTdf112501();
+void testPivotTableNoColumnsLayout();
 #ifdef UNX
 void testUnicodeFileNameGnumeric();
 #endif
@@ -378,6 +379,7 @@ public:
 CPPUNIT_TEST(testPageScalingXLSX);
 CPPUNIT_TEST(testActiveXCheckboxXLSX);
 CPPUNIT_TEST(testTdf112501);
+CPPUNIT_TEST(testPivotTableNoColumnsLayout);
 #ifdef UNX
 CPPUNIT_TEST(testUnicodeFileNameGnumeric);
 #endif
@@ -4116,6 +4118,34 @@ void ScFiltersTest::testTdf112501()
 }
 }
 
+void ScFiltersTest::testPivotTableNoColumnsLayout()
+{
+// tdf#113268 - Pivot table: Missing popup button after opening a pivot 
table from ODS
+ScDocShellRef xDocSh = loadDoc("pivottable_no_columns_layout.", 
FORMAT_ODS);
+CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.is());
+ScDocument& rDoc = xDocSh->GetDocument();
+
+// There should be exactly 2 pivot tables
+ScDPCollection* pDPs = rDoc.GetDPCollection();
+CPPUNIT_ASSERT_EQUAL(static_cast(2), pDPs->GetCount());
+
+// Check first pivot table's popup button (headerlayout flag)
+{
+const ScPatternAttr* pPattern = rDoc.GetPattern(0, 1, 1);
+const SfxPoolItem& rPoolItem = pPattern->GetItem(ATTR_MERGE_FLAG);
+const ScMergeFlagAttr& rMergeFlag = static_cast(rPoolItem);
+CPPUNIT_ASSERT(rMergeFlag.GetValue() & ScMF::ButtonPopup);
+}
+
+// Check second pivot table's popup button
+{
+const ScPatternAttr* pPattern = rDoc.GetPattern(3, 0, 1);
+const SfxPoolItem& rPoolItem = pPattern->GetItem(ATTR_MERGE_FLAG);
+const ScMergeFlagAttr& rMergeFlag = static_cast(rPoolItem);
+CPPUNIT_ASSERT(rMergeFlag.GetValue() & ScMF::ButtonPopup);
+}
+}
+
 
 ScFiltersTest::ScFiltersTest()
   : ScBootstrapFixture( "sc/qa/unit/data" )
diff --git a/sc/source/core/data/dpoutputgeometry.cxx 
b/sc/source/core/data/dpoutputgeometry.cxx
index 8d3ec1c09589..c4878f5127a4 100644
--- a/sc/source/core/data/dpoutputgeometry.cxx
+++ b/sc/source/core/data/dpoutputgeometry.cxx
@@ -239,7 +239,7 @@ ScDPOutputGeometry::getFieldButtonType(const ScAddress& 
rPos) const
 
 nCurRow += static_cast(nColumnFields);
 }
-else
+else if (mbHeaderLayout)
 ++nCurRow;
 
 if (nRowFields)
diff --git a/sc/source/filter/xml/xmldpimp.cxx 
b/sc/source/filter/xml/xmldpimp.cxx
index 73108271cc95..d4186f8a0c5d 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -330,6 +330,7 @@ void ScXMLDataPilotTableContext::SetButtons()
 aGeometry.setPageFieldCount(mnPageFieldCount);
 aGeometry.setDataFieldCount(mnDataFieldCount);
 aGeometry.setDataLayoutType(toFieldType(mnDataLayoutType));
+aGeometry.setHeaderLayout(bHeaderGridLayout);
 
 std::vector aRowDims, aColDims, aPageDims;
 
pDPSave->GetAllDimensionsByOrientation(sheet::DataPilotFieldOrientation_ROW, 
aRowDims);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Tamás Zolnai
 sc/source/filter/excel/xepivotxml.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c9a584af6d640bfd88797e1ccd0a7695ffbf6c99
Author: Tamás Zolnai 
Date:   Thu Oct 19 15:13:54 2017 +0200

It's a simple assignment

Change-Id: I7b85a5ce93685013c28c9cb8047093fe7403da53
Reviewed-on: https://gerrit.libreoffice.org/43553
Reviewed-by: Tamás Zolnai 
Tested-by: Tamás Zolnai 

diff --git a/sc/source/filter/excel/xepivotxml.cxx 
b/sc/source/filter/excel/xepivotxml.cxx
index b5eacfad9bf3..57a52aabee22 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -735,7 +735,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( 
XclExpXmlStream& rStrm, const ScDP
 
 bool bDimInTabularMode = false;
 if(pDim->GetLayoutInfo())
-bDimInTabularMode |= (pDim->GetLayoutInfo()->LayoutMode == 
sheet::DataPilotFieldLayoutMode::TABULAR_LAYOUT);
+bDimInTabularMode = (pDim->GetLayoutInfo()->LayoutMode == 
sheet::DataPilotFieldLayoutMode::TABULAR_LAYOUT);
 
 sheet::DataPilotFieldOrientation eOrient = pDim->GetOrientation();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] translations.git: source/es source/jv source/kok source/lt source/om source/pt-BR source/sa-IN source/sat source/sid source/sk source/vi

2017-10-19 Thread Christian Lohmaier
 source/es/svtools/messages.po  
|1 +
 source/jv/basctl/messages.po   
|1 +
 source/kok/scp2/source/gnome.po
|3 +--
 source/kok/swext/mediawiki/src/registry/data/org/openoffice/Office/Custom.po   
|2 +-
 source/lt/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver.po
|2 +-
 source/om/mysqlc/source.po 
|1 -
 source/pt-BR/svtools/messages.po   
|1 +
 source/sa-IN/swext/mediawiki/src/registry/data/org/openoffice/Office/Custom.po 
|2 +-
 source/sat/scp2/source/gnome.po
|3 +--
 source/sat/scp2/source/onlineupdate.po 
|2 +-
 source/sid/helpcontent2/source/text/swriter/01.po  
|6 ++
 source/sk/svtools/messages.po  
|1 +
 source/vi/swext/mediawiki/src.po   
|2 +-
 13 files changed, 13 insertions(+), 14 deletions(-)

New commits:
commit 0703aea9337413756face54c3d7a89cc4a539a33
Author: Christian Lohmaier 
Date:   Thu Oct 19 17:30:26 2017 +0200

make msgfmt happy re 'msgid' and 'msgstr' entries do not both end with '\n'

Change-Id: Ib323bb112dac8da86f9ca062c1376f8f7d34e608

diff --git a/source/es/svtools/messages.po b/source/es/svtools/messages.po
index f0d538c4d27..547e290589d 100644
--- a/source/es/svtools/messages.po
+++ b/source/es/svtools/messages.po
@@ -957,6 +957,7 @@ msgstr ""
 "\n"
 "Recomendamos que no confíe en el contenido del documento actual.\n"
 "Se ha desactivado la ejecución de macros para este documento.\n"
+" "
 
 #: errtxt.hrc:126
 msgctxt "RID_ERRHDL"
diff --git a/source/jv/basctl/messages.po b/source/jv/basctl/messages.po
index 8cc1b610802..169658483d0 100644
--- a/source/jv/basctl/messages.po
+++ b/source/jv/basctl/messages.po
@@ -705,6 +705,7 @@ msgstr ""
 " $(ARG1)\n"
 "\n"
 "Ganti jeneng dialogé kanggo njāgā dialog saiki utāwā tumpuki dialog sing 
wis ānā.\n"
+" "
 
 #: strings.hrc:96
 msgctxt "RID_STR_DLGIMP_MISMATCH_ADD"
diff --git a/source/kok/scp2/source/gnome.po b/source/kok/scp2/source/gnome.po
index bcd75937021..a38f805d4df 100644
--- a/source/kok/scp2/source/gnome.po
+++ b/source/kok/scp2/source/gnome.po
@@ -32,5 +32,4 @@ msgid "System integration of %PRODUCTNAME %PRODUCTVERSION 
into Gnome Desktop Env
 msgstr ""
 " नॉम डेस्कटॉप वातावरणान %PRODUCTNAME 
%PRODUCTVERSION चे व्यवस्था इंटीग्रेशन 
.Gnome Mezavoilen vatavoronnant %PRODUCTNAME %PRODUCTVERSION chem Vyevosta \n"
 " Okhonddotay.\n"
-" नॉम डेस्कटॉप वातावरणान %PRODUCTNAME 
%PRODUCTVERSION चे व्यवस्था इंटीग्रेशन 
\n"
-" .\n"
+" नॉम डेस्कटॉप वातावरणान %PRODUCTNAME 
%PRODUCTVERSION चे व्यवस्था इंटीग्रेशन 
."
diff --git 
a/source/kok/swext/mediawiki/src/registry/data/org/openoffice/Office/Custom.po 
b/source/kok/swext/mediawiki/src/registry/data/org/openoffice/Office/Custom.po
index 5b01c6938f6..43f3dccd3f2 100644
--- 
a/source/kok/swext/mediawiki/src/registry/data/org/openoffice/Office/Custom.po
+++ 
b/source/kok/swext/mediawiki/src/registry/data/org/openoffice/Office/Custom.po
@@ -321,4 +321,4 @@ msgstr ""
 "विकी अनुच्छेद '$एआरजी1' 
माथाळ्याखाला अस्तितत्वांत 
आसा.

सद्याचो अनुच्छेद 
तुज्या अनुच्छेदांत तुका बदल 
करुंक जाय?'$ARG1'  mhatallem aschem wiki lekhon edolluch 
ostitvant \n"
 " asa..

Prostut lekhona sovem tujem lekhon bodlunk zai?

\n"
 "विकी अनुच्छेद '$एआरजी1' 
माथाळ्याखाला अस्तितत्वांत 
आसा.

सद्याचो \n"
-" अनुच्छेद तुज्या अ
नुच्छेदांत तुका बदल करुंक 
जाय?\n"
+" अनुच्छेद तुज्या अ
नुच्छेदांत तुका बदल करुंक 
जाय?"
diff --git a/source/lt/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver.po 
b/source/lt/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver.po
index f24e192b0df..7a50673125c 100644
--- a/source/lt/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver.po
+++ b/source/lt/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver.po
@@ -30,4 +30,4 @@ msgctxt ""
 "extdesc\n"
 "description.text"
 msgid "This extension integrates into Calc and offers new Solver engines to 
use for optimizing nonlinear programming models.\n"
-msgstr "Šis plėti

[Libreoffice-commits] core.git: translations

2017-10-19 Thread Christian Lohmaier
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 376fa15154f501841b321359fefc8accc957f9da
Author: Christian Lohmaier 
Date:   Thu Oct 19 17:30:26 2017 +0200

Updated core
Project: translations  0703aea9337413756face54c3d7a89cc4a539a33

make msgfmt happy re 'msgid' and 'msgstr' entries do not both end with '\n'

Change-Id: Ib323bb112dac8da86f9ca062c1376f8f7d34e608

diff --git a/translations b/translations
index dedc237384aa..0703aea93374 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit dedc237384aa088b21796e0eb6d23501e00aaf89
+Subproject commit 0703aea9337413756face54c3d7a89cc4a539a33
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


libgltf, glTF models, collada etc ?

2017-10-19 Thread Caolán McNamara
So we have support for glTF models in LibreOffice. There's is then the
bug tdf#103884 that they don't work under gtk3. One reason they don't
work in gtk3 is because gtk3 opengl support is restricted to the core
profile and libgltf uses a few of the older non-core things.

e.g. would need these fixes...
https://gerrit.libreoffice.org/#/c/41994/
https://gerrit.libreoffice.org/#/c/41998/

There's still some other problems that need fixing, but before spending
any more effort on this...

is this whole 3d model feature still something we still actually want
to have ? It seems to me to be of marginal utility.


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


[Libreoffice-commits] core.git: vcl/Executable_ww2fuzzer.mk vcl/workben

2017-10-19 Thread Caolán McNamara
 vcl/Executable_ww2fuzzer.mk |1 
 vcl/workben/ww2fuzzer.cxx   |   55 
 2 files changed, 55 insertions(+), 1 deletion(-)

New commits:
commit bea5f123f68acec84ba12d17938e25b7e112a43b
Author: Caolán McNamara 
Date:   Thu Oct 19 15:12:23 2017 +0100

shrink ww2 fuzzer

Change-Id: Id30693b2e0cd260bf5ee7d22e8c701b4566e54d6

diff --git a/vcl/Executable_ww2fuzzer.mk b/vcl/Executable_ww2fuzzer.mk
index 02acbdfc64ea..bd6f95fa3ecb 100644
--- a/vcl/Executable_ww2fuzzer.mk
+++ b/vcl/Executable_ww2fuzzer.mk
@@ -34,7 +34,6 @@ $(eval $(call gb_Executable_use_libraries,ww2fuzzer,\
 $(eval $(call gb_Executable_use_static_libraries,ww2fuzzer,\
 findsofficepath \
 ulingu \
-fuzzer_writer \
 fuzzerstubs \
 ))
 
diff --git a/vcl/workben/ww2fuzzer.cxx b/vcl/workben/ww2fuzzer.cxx
index fc6f4e6d2c17..422f729911ae 100644
--- a/vcl/workben/ww2fuzzer.cxx
+++ b/vcl/workben/ww2fuzzer.cxx
@@ -11,6 +11,61 @@
 #include 
 #include "commonfuzzer.hxx"
 
+#include 
+#include 
+
+extern "C" {
+void * unoxml_component_getFactory( const char* , void* , void* );
+void * i18npool_component_getFactory( const char* , void* , void* );
+void * emfio_component_getFactory( const char* , void* , void* );
+
+void * com_sun_star_comp_framework_Desktop_get_implementation( void *, void * 
);
+void * com_sun_star_i18n_LocaleDataImpl_get_implementation( void *, void * );
+void * com_sun_star_i18n_BreakIterator_Unicode_get_implementation( void *, 
void * );
+void * com_sun_star_i18n_BreakIterator_get_implementation( void *, void * );
+void * SfxDocumentMetaData_get_implementation( void *, void * );
+void * com_sun_star_i18n_CharacterClassification_Unicode_get_implementation( 
void *, void * );
+void * com_sun_star_i18n_CharacterClassification_get_implementation( void *, 
void * );
+void * com_sun_star_i18n_NativeNumberSupplier_get_implementation( void *, void 
* );
+void * com_sun_star_i18n_NumberFormatCodeMapper_get_implementation( void *, 
void * );
+void * com_sun_star_comp_graphic_GraphicProvider_get_implementation( void *, 
void * );
+void * IndexedPropertyValuesContainer_get_implementation( void *, void * );
+}
+
+const lib_to_factory_mapping *
+lo_get_factory_map(void)
+{
+static lib_to_factory_mapping map[] = {
+{ "libunoxmllo.a", unoxml_component_getFactory },
+{ "libi18npoollo.a", i18npool_component_getFactory },
+{ "libemfiolo.a", emfio_component_getFactory },
+{ 0, 0 }
+};
+
+return map;
+}
+
+const lib_to_constructor_mapping *
+lo_get_constructor_map(void)
+{
+static lib_to_constructor_mapping map[] = {
+{ "com_sun_star_comp_framework_Desktop_get_implementation", 
com_sun_star_comp_framework_Desktop_get_implementation },
+{ "com_sun_star_i18n_LocaleDataImpl_get_implementation", 
com_sun_star_i18n_LocaleDataImpl_get_implementation },
+{ "com_sun_star_i18n_BreakIterator_Unicode_get_implementation", 
com_sun_star_i18n_BreakIterator_Unicode_get_implementation },
+{ "com_sun_star_i18n_BreakIterator_get_implementation", 
com_sun_star_i18n_BreakIterator_get_implementation },
+{ "SfxDocumentMetaData_get_implementation", 
SfxDocumentMetaData_get_implementation },
+{ 
"com_sun_star_i18n_CharacterClassification_Unicode_get_implementation", 
com_sun_star_i18n_CharacterClassification_Unicode_get_implementation },
+{ "com_sun_star_i18n_CharacterClassification_get_implementation", 
com_sun_star_i18n_CharacterClassification_get_implementation },
+{ "com_sun_star_i18n_NativeNumberSupplier_get_implementation", 
com_sun_star_i18n_NativeNumberSupplier_get_implementation },
+{ "com_sun_star_i18n_NumberFormatCodeMapper_get_implementation", 
com_sun_star_i18n_NumberFormatCodeMapper_get_implementation },
+{ "com_sun_star_comp_graphic_GraphicProvider_get_implementation", 
com_sun_star_comp_graphic_GraphicProvider_get_implementation },
+{ "IndexedPropertyValuesContainer_get_implementation", 
IndexedPropertyValuesContainer_get_implementation },
+{ 0, 0 }
+};
+
+return map;
+}
+
 extern "C" bool TestImportWW2(SvStream &rStream);
 
 extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Caolán McNamara
 sw/source/filter/ww8/ww8scan.cxx |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 989f3a031235faa0356dddc9c29b0b23947447c5
Author: Caolán McNamara 
Date:   Thu Oct 19 11:18:21 2017 +0100

ofz+ubsan: signed integer overflow

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

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 44451b82a357..61d4ff7b2908 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2062,9 +2062,13 @@ bool WW8PLCFspecial::GetData(long nInIdx, WW8_CP& rPos, 
void*& rpValue) const
 WW8PLCF::WW8PLCF(SvStream& rSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
 WW8_CP nStartPos) : pPLCF_PosArray(nullptr), nIdx(0), nStru(nStruct)
 {
-OSL_ENSURE( nPLCF, "WW8PLCF: nPLCF is zero!" );
-
-nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
+if (nPLCF < 0)
+{
+SAL_WARN("sw.ww8", "broken WW8PLCF, ignoring");
+nPLCF = 0;
+}
+else
+nIMax = (nPLCF - 4) / (4 + nStruct);
 
 ReadPLCF(rSt, nFilePos, nPLCF);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] translations.git: Changes to 'refs/tags/libreoffice-6.0.0.0.alpha1'

2017-10-19 Thread Xisco Fauli
Tag 'libreoffice-6.0.0.0.alpha1' created by Xisco Fauli  
at 2017-10-19 13:34 +

Tag libreoffice-6.0.0.0.alpha1
-BEGIN PGP SIGNATURE-

iQIcBAABCAAGBQJZ6KnTAAoJEPQ0oe+v7q6jcowP/3og1JY6YLt166oKJedTwyIL
1i4ybjQbt/LMbdkCuIPAHKoXZqFuGIdh2ghhwWUMBvBKYyRy92s3Ou0NV/SxoXC2
eS/dDVysDlvzmtZML3U59nEdhWoRheDRzOslovft+SSzSB13dveDSxwDJtxtFueH
9zBUhdGDc5nxaDFKd8hUfe0zgFb7FG1ELi4T9aYWpBHiw9hoVIVsQ0GM1b0+JihS
dRQRod2eWjQV/r4++HfEhMzYiOA9U53RQbXYXY5boTNnctjUT5hov0sX+flAdgAW
Jaq+LvbihK8o2MMFX04pWmLvk800XqtjqobQINcqkm460giiO2j0tiY8R62zEWjN
m/6z8q4s8eC6GFo6v+qhM+P3ZFQ8S1QPOY8hX+aoS+DgGTLsvCHilHLBXRXSK7Hn
4VUuIoNi+hba3RxwYfiRpivMds2/kjAioMEnZKXKnYlQfl9dZayoNq7HLOjqHWwS
pNWEtJA4bo16tAyUUnOtLmVlF5Wov2kXfY82iExcE1azQwOFnsMgtimfCGFQpWhA
oW8qSVHYAACwn9f+RrIVUHG5dwWYTnwouD/JK5AICca9Fm/wQVGf+s0c34RVLSDk
Xp394GZjXnDYCnzGKQLIcV0+RzOMqx9hvo/KeYLite8ZRPpOwSDMUhzTekxYPVQB
/muxmUeyqj9GZgvDJkGN
=n312
-END PGP SIGNATURE-

Changes since libreoffice-5-4-branch-point-14:
---
 0 files changed
---
___
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/libreoffice-6.0.0.0.alpha1'

2017-10-19 Thread Xisco Fauli
Tag 'libreoffice-6.0.0.0.alpha1' created by Xisco Fauli  
at 2017-10-19 13:34 +

Tag libreoffice-6.0.0.0.alpha1
-BEGIN PGP SIGNATURE-

iQIbBAABCAAGBQJZ6KnTAAoJEPQ0oe+v7q6jaHgP9i3KCO1hPlINOWW3oAXh0zqX
HWm1eFO4oIx0KmyBT4hEoyaXcHeIRvnP9oVbGRT/2WQFzu3pMLRiWRvQCriaDs8U
YIy20tsSUe43L8B6k2W669ZQtM12nDc/0cVN5ZR20PYzF8WNa1DB7OyYQTKSWVd9
WLh3tqCZi0L6TyyY/qWsW17+gv8qybtrAB6ZsGsBDQ6/aH0Hi7ahZi7GHnSCLiGm
a4xnDWDYqU6qwivonIKaD5OJuGKnn9goIIkLeYpQj/jBK+0nSLd/Hc6Si0MVbhZy
NzRp1lqQN5yeMxqIQp3alDR1QVQZPJjCj20YkuPMdHl0TDrBDSK/oxb7SulJoxRr
ujQ6/Dcbjg6+n6zTCpWgBHW04SubOVvFivLqzcl0sHOvjrgQdvyxS11qrdYRxEJO
MV2/EpK3FL6UuRQjFrPN/bTgedRLhY22ycNo8L0iDPTnGi/sTHnHvtF57vEsJbV3
lyhDKR+zP5r9vpAMn1vKWMa4R6V7myjFjwU3IW2ZyuUsONsIINqvgTyymJjJYIzd
JPRJk2tMMUPOMWbJB5enWFBtUH8kOLHPc+wOTp15pZAKo66njabt5cgJp29d2Rgh
krXcjEp2hpFZues/GKiKpwyXfFlhEg5o2Mq5Adhd7FhbqDcgEtehRZz6D/Pba3yv
5r+BaWdcA7B7Y/wM7tU=
=J0Ck
-END PGP SIGNATURE-

Changes since libreoffice-5-4-branch-point-6020:
---
 0 files changed
---
___
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/libreoffice-6.0.0.0.alpha1'

2017-10-19 Thread Xisco Fauli
Tag 'libreoffice-6.0.0.0.alpha1' created by Xisco Fauli  
at 2017-10-19 13:34 +

Tag libreoffice-6.0.0.0.alpha1
-BEGIN PGP SIGNATURE-

iQIcBAABCAAGBQJZ6KnTAAoJEPQ0oe+v7q6jMtYP/2K8XBoRJeSMz7t4/P0Ug/X9
k1Us4hk0w21lxznOKof6L7MVnMpjX9eqw9ME7RS5CADq8uuU186JQLZdvGGQ7pCH
AFDSFur8hHIUbkWi59D9OuIiy9g+DkxsTCvIeNhjF2uXRW2TuUmjp5rl7+GBzdYp
fCSgV+m4U+pyI7OBbGR/BvOo3ArG6I1IitFG1opmCv4mgw+VFfSiATypKeiL1uux
aoBEY8RAkg2/UZeQhKwzUTWQyORK0VoUTCcpYBkqg58ThE/tJbk3LTRn4xBkpQzZ
ux4X1xVyDZkZE/sr5RP1sNLshW7AHw0lwi6oOiK3nW67SoTe3Qwd0YhMFJnBptWp
y3Ky7HhoRiUwY4jbuFtTogusUpjtmqvOclpX7TvxGIcLHBQtDgixB33K0qyyuOpk
LBWUHPORyvwYcOdspWc2z6D/A9trRpNXkJs3kZXg6gqIUTR4xfN2CvRRryYeEGC0
0f4CMts3fIfhikWTrM2lPABKNVLAop1EAD/pQ4g4QhU/+EkVkCFJ/o2+cGLmqVf8
/9LG2X0mHr7CpaJ+RPYgfwWe8Vbi46HDxV1hh8H0eX0m2RAkCfXxpsXEhokxPUy+
ex/XHAO+dBCAgiDyNYfbPAjgE3SpepXDfcIT/grAOR6frUCyNsiNCT+3N0F3WCgs
3ULzFAfifhlDVirdSboW
=1Dy6
-END PGP SIGNATURE-

Changes since libreoffice-5-4-branch-point-151:
---
 0 files changed
---
___
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/libreoffice-6.0.0.0.alpha1'

2017-10-19 Thread Xisco Fauli
Tag 'libreoffice-6.0.0.0.alpha1' created by Xisco Fauli  
at 2017-10-19 13:34 +

Tag libreoffice-6.0.0.0.alpha1
-BEGIN PGP SIGNATURE-

iQIcBAABCAAGBQJZ6KnPAAoJEPQ0oe+v7q6jZdsP/icLcK16mlSg2Qj3IRH/u1Hr
iP7yvQxopyLQcrhQO04FB1esv0MmzMDp3yj20mFPabnGSyoSilTnV0wo/Su9xJ0x
9AC71RTTS1KeQUnAfwrmy5ivh4HjkJCeqjKU/MOE2NDJB8DRdc0g4Qq9kNQWKiNx
90s5XEDnlfQMwVXU8o0vqFS2b1xZn6RDGwyZ0L1gzQ1qrTMiy21qtuRYPnTBySjQ
iwaStzaWFcFPh4jJG6itOmqdp4oa/bBau0v7ra7r56AKnyY6jZOfm+83HFfYKMhs
Kyb18LFrxi7pL3h/qARvOC1TOpxtjnJVG2APuSm/SVbIQZR9afUlyKXqCPEnyQbM
PSWh6GUgmP0PNrnxtinSwATzCd+QYvMA67ISHK6io621gVRfHHVbVVKxycIRTuic
MxtgBKbqSsdjF9jiN+6PEBQgnJ8BscQsQcnSa5vXmeppgKok9jtwF73FQh/CeOa9
W5SMHtKy4NRogc87QVCNabOut+YEdS95JR6a8eWRKP2jsovartkxso+qjbENhCsf
v4eZNEgHjI5ymqoMqXjXU/BiShlNd6+bHnmzsUf0R6aNigyitNyurb1KUiPLUBVz
cr1a8IiHQ+KP2huFq0x7b6YmUmWE9MzrduyriNX8oyy6I4gj79dovwgBiobUiWLx
auYyWRc4jnA+QXZEolj7
=jNr4
-END PGP SIGNATURE-

Changes since libreoffice-5-4-branch-point-12:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configure.ac

2017-10-19 Thread Xisco Fauli
 configure.ac |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7bc2f1bde3a41737582532fd786b95749f98b37e
Author: Xisco Fauli 
Date:   Thu Oct 19 15:38:09 2017 +0200

bump product version to 6.0.0.0.alpha1+

Change-Id: Ic7c4f406e60774c435f8d41aaf54bc56126193f3

diff --git a/configure.ac b/configure.ac
index 335d7de9334a..ac8dbc52463d 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([LibreOffice],[6.0.0.0.alpha0+],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.0.0.0.alpha1+],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
@@ -2641,7 +2641,7 @@ if test $_os = Darwin -o $_os = iOS; then
 if test $_os = iOS; then
 if test "$enable_ios_simulator" = "yes"; then
 useos=iphonesimulator
-else 
+else
 useos=iphoneos
 fi
 MACOSX_SDK_PATH=`xcrun --sdk ${useos} --show-sdk-path 2> /dev/null`
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bridges/Library_cpp_uno.mk

2017-10-19 Thread Stephan Bergmann
 bridges/Library_cpp_uno.mk |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit dddb527db1562f30a2a2b20338dfc8458086a4a9
Author: Stephan Bergmann 
Date:   Thu Oct 19 15:29:38 2017 +0200

Again, no -fstack-protector-strong for gcc3_linux_aarch64/cpp2uno.cxx

8d12e4ec8b843d59661a12a7a92bfec7e4473e0f "No -fstack-protect-strong for
gcc3_linux_aarch64/cpp2uno.cxx vtableSlotCall" had done that in the past (so
that setting up the x0/x1 return registers in vtableSlotCall is not 
clobbered
by the stack protector code), but gbuild details have apparently changed in 
the
meantime, so that gb_CXXFLAGS_COMMON's -fstack-protector-strong now ends up 
on
the compiler command line before what is covered by 
gb_Library_add_cxxobjects's
argument, so didn't get subst'ed to -fstack-protector.  That caused Flathub
aarch64 builds to fail in CustomTarget_testtools/uno_test.

However, if both -fstack-protector-strong and -fstack-protector are present 
on
the command line, the second apparently wins, so use that hack for now.
(-fstack-protector-strong is only available since GCC 4.9, but 
-fstack-protector
is already available in our current baseline GCC 4.8.1, and even for a 
build on
that baseline it wouldn't hurt if cpp2uno.cxx was explicitly built with
-fstack-protector even if none of the other files were built with
-fstack-protector-strong.)

Change-Id: I9d78d2e5b08b7c0a4adb1531b482cd43617886f7

diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index 801667790fef..22ce084178b6 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -34,9 +34,8 @@ bridge_exception_objects := abi callvirtualfunction uno2cpp
 
 $(eval $(call gb_Library_add_cxxobjects,$(gb_CPPU_ENV)_uno, \
 bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/cpp2uno, \
-$(subst -fstack-protector-strong,-fstack-protector, \
-$(gb_LinkTarget_EXCEPTIONFLAGS) \
-$(call gb_LinkTarget__get_cxxflags,$(gb_CPPU_ENV)_uno)) \
+$(gb_LinkTarget_EXCEPTIONFLAGS) \
+$(call gb_LinkTarget__get_cxxflags,$(gb_CPPU_ENV)_uno) -fstack-protector \
 ))
 endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: How to run multiple instances of Writer simultaneously?

2017-10-19 Thread Matthew J. Francis

On 19/10/2017 17:09, Jens Tröger wrote:

Thanks Matthew!

That’s close to what I’m using. However, would you mind sharing your “close 
document” code, as well as shutting down the soffice process?

In that context, it looks like you’re using the soffice process as the server? How 
about projects like listed in this question: 
https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=75523  What about 
scalability as per this question: 
https://forum.openoffice.org/en/forum/viewtopic.php?f=6&t=74002

Thank you,
Jens


Well, in the context of the previously included code, cleanup was a 
matter of:


  os.killpg(os.getpgid(proc.pid), signal.SIGKILL)
  shutil.rmtree (tempDir)

which is I think not what you want - it was purely used to run a test, 
then terminated with prejudice when the result was known.


Something like you mentioned earlier should be sufficient to make the 
instance (one soffice.bin and wrapper script) go away cleanly in the 
normal case:


  document.close(True)
  desktop.terminate()


Whether running a persistent server process instead would suit your 
needs better is something you'll have to test with your actual use case. 
Without knowing exactly what it is you're trying to achieve, I can only 
speculate in general terms:
On the one hand, running everything through a persistent LO instance as 
server will give you reasonably low latency if it's something time 
sensitive, but it may struggle to make use of the ample threads of 
modern processors if there are many parallel requests to service; on the 
other hand, running everything on individual, isolated instances means 
you will incur a relatively high fixed cost for each startup (even with 
cached user profiles, it will still take some time to load a whole new 
LO), but may ultimately scale to use CPU resources better if each 
individual transaction is fairly long running and CPU intensive.


Regards
Matthew Francis
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-10-19 Thread Caolán McNamara
 sw/source/filter/ww8/ww8scan.cxx |   18 ++
 1 file changed, 10 insertions(+), 8 deletions(-)

New commits:
commit 289839b758f2f065e0420fd8f885b6743de71736
Author: Caolán McNamara 
Date:   Thu Oct 19 09:06:27 2017 +0100

ofz+ubsan: signed integer overflow

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

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 446976f9ce35..44451b82a357 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -5399,26 +5399,28 @@ bool WW8Fib::GetBaseCp(ManTypes nType, WW8_CP * cp) 
const
 assert(cp != nullptr);
 WW8_CP nOffset = 0;
 
-switch( nType )
+switch (nType)
 {
-default:
 case MAN_TXBX_HDFT:
+if (m_ccpTxbx < 0) {
+return false;
+}
 nOffset = m_ccpTxbx;
 SAL_FALLTHROUGH;
 case MAN_TXBX:
-if (m_ccpEdn > std::numeric_limits::max() - nOffset) {
+if (m_ccpEdn < 0 || m_ccpEdn > std::numeric_limits::max() 
- nOffset) {
 return false;
 }
 nOffset += m_ccpEdn;
 SAL_FALLTHROUGH;
 case MAN_EDN:
-if (m_ccpAtn > std::numeric_limits::max() - nOffset) {
+if (m_ccpAtn < 0 || m_ccpAtn > std::numeric_limits::max() 
- nOffset) {
 return false;
 }
 nOffset += m_ccpAtn;
 SAL_FALLTHROUGH;
 case MAN_AND:
-if (m_ccpMcr > std::numeric_limits::max() - nOffset) {
+if (m_ccpMcr < 0 || m_ccpMcr > std::numeric_limits::max() 
- nOffset) {
 return false;
 }
 nOffset += m_ccpMcr;
@@ -5431,19 +5433,19 @@ bool WW8Fib::GetBaseCp(ManTypes nType, WW8_CP * cp) 
const
 
 case MAN_MACRO:
 */
-if (m_ccpHdr > std::numeric_limits::max() - nOffset) {
+if (m_ccpHdr < 0 || m_ccpHdr > std::numeric_limits::max() 
- nOffset) {
 return false;
 }
 nOffset += m_ccpHdr;
 SAL_FALLTHROUGH;
 case MAN_HDFT:
-if (m_ccpFootnote > std::numeric_limits::max() - nOffset) {
+if (m_ccpFootnote < 0 || m_ccpFootnote > 
std::numeric_limits::max() - nOffset) {
 return false;
 }
 nOffset += m_ccpFootnote;
 SAL_FALLTHROUGH;
 case MAN_FTN:
-if (m_ccpText > std::numeric_limits::max() - nOffset) {
+if (m_ccpText < 0 || m_ccpText > 
std::numeric_limits::max() - nOffset) {
 return false;
 }
 nOffset += m_ccpText;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Michael Meeks
 vcl/source/opengl/OpenGLContext.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 856d734ee1665b6aa7304847c3a923af09066016
Author: Michael Meeks 
Date:   Wed Oct 18 15:24:44 2017 +0100

tdf#113225 - reset framebuffer count when resetting OpenGLContext

Otherwise we can fail to allocate a new one when we need it post reset.


http://crashreport.libreoffice.org/stats/crash_details/e4f26191-15d5-441a-868f-9ada21ef4424

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

diff --git a/vcl/source/opengl/OpenGLContext.cxx 
b/vcl/source/opengl/OpenGLContext.cxx
index d5ade0408fc5..b49774171a38 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -404,6 +404,7 @@ void OpenGLContext::reset()
 delete pFramebuffer;
 pFramebuffer = pPrevFramebuffer;
 }
+mnFramebufferCount = 0;
 mpFirstFramebuffer = nullptr;
 mpLastFramebuffer = nullptr;
 }
___
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

2017-10-19 Thread Tamás Zolnai
 sc/qa/unit/data/xlsx/pivottable_tabular_mode.xlsx |binary
 sc/qa/unit/subsequent_export-test.cxx |   20 +++
 sc/source/filter/excel/xepivotxml.cxx |   57 --
 3 files changed, 64 insertions(+), 13 deletions(-)

New commits:
commit 8cf0b4b4cd748094889a6a9ac6883dd457113b74
Author: Tamás Zolnai 
Date:   Thu Oct 19 10:43:31 2017 +0200

tdf#113159: Pivot table: tabular mode is converted to oultine mode

... after RT XLSX in Calc

Change-Id: I9725ca55aed973133db1d5fe47463575148e00b8
Reviewed-on: https://gerrit.libreoffice.org/43537
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 

diff --git a/sc/qa/unit/data/xlsx/pivottable_tabular_mode.xlsx 
b/sc/qa/unit/data/xlsx/pivottable_tabular_mode.xlsx
new file mode 100755
index ..0bcfe1742d95
Binary files /dev/null and b/sc/qa/unit/data/xlsx/pivottable_tabular_mode.xlsx 
differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 72fe254d850c..ee8e33433bab 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -228,6 +228,7 @@ public:
 void testPivotTableErrorItemFilterXLSX();
 void testPivotTableOutlineModeXLSX();
 void testPivotTableDuplicatedMemberFilterXLSX();
+void testPivotTableTabularModeXLSX();
 
 CPPUNIT_TEST_SUITE(ScExportTest);
 CPPUNIT_TEST(test);
@@ -350,6 +351,7 @@ public:
 CPPUNIT_TEST(testPivotTableErrorItemFilterXLSX);
 CPPUNIT_TEST(testPivotTableOutlineModeXLSX);
 CPPUNIT_TEST(testPivotTableDuplicatedMemberFilterXLSX);
+CPPUNIT_TEST(testPivotTableTabularModeXLSX);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -5286,6 +5288,24 @@ void 
ScExportTest::testPivotTableDuplicatedMemberFilterXLSX()
 assertXPath(pTable, 
"/x:pivotTableDefinition/x:pivotFields/x:pivotField[5]/x:items", "count", "21");
 }
 
+void ScExportTest::testPivotTableTabularModeXLSX()
+{
+ScDocShellRef xShell = loadDoc("pivottable_tabular_mode.", FORMAT_XLSX);
+CPPUNIT_ASSERT(xShell.is());
+
+std::shared_ptr pXPathFile = 
ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
+xmlDocPtr pTable = XPathHelper::parseExport(pXPathFile, m_xSFactory, 
"xl/pivotTables/pivotTable1.xml");
+CPPUNIT_ASSERT(pTable);
+
+// In tabular mode both outline and compact flag should be false
+assertXPath(pTable, "/x:pivotTableDefinition", "outline", "0");
+assertXPath(pTable, "/x:pivotTableDefinition", "outlineData", "0");
+assertXPath(pTable, "/x:pivotTableDefinition", "compact", "0");
+assertXPath(pTable, "/x:pivotTableDefinition", "compactData", "0");
+assertXPath(pTable, 
"/x:pivotTableDefinition/x:pivotFields/x:pivotField[1]", "compact", "0");
+assertXPath(pTable, 
"/x:pivotTableDefinition/x:pivotFields/x:pivotField[1]", "outline", "0");
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/source/filter/excel/xepivotxml.cxx 
b/sc/source/filter/excel/xepivotxml.cxx
index 99510d85835a..b5eacfad9bf3 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -20,6 +20,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
@@ -613,7 +614,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( 
XclExpXmlStream& rStrm, const ScDP
 // Dimension order here is significant as they specify the order of
 // appearance in each axis.
 const ScDPSaveData::DimsType& rDims = rSaveData.GetDimensions();
-
+bool bTabularMode = false;
 for (const auto & i : rDims)
 {
 const ScDPSaveDimension& rDim = *i;
@@ -655,6 +656,8 @@ void XclExpXmlPivotTables::SavePivotTableXml( 
XclExpXmlStream& rStrm, const ScDP
 default:
 ;
 }
+if(rDim.GetLayoutInfo())
+bTabularMode |= (rDim.GetLayoutInfo()->LayoutMode == 
sheet::DataPilotFieldLayoutMode::TABULAR_LAYOUT);
 }
 
 sax_fastparser::FSHelperPtr& pPivotStrm = rStrm.GetCurrentStream();
@@ -672,8 +675,8 @@ void XclExpXmlPivotTables::SavePivotTableXml( 
XclExpXmlStream& rStrm, const ScDP
 XML_useAutoFormatting, ToPsz10(false),
 XML_itemPrintTitles, ToPsz10(true),
 XML_indent, ToPsz10(false),
-XML_outline, ToPsz10(true),
-XML_outlineData, ToPsz10(true),
+XML_outline, ToPsz10(!bTabularMode),
+XML_outlineData, ToPsz10(!bTabularMode),
 XML_compact, ToPsz10(false),
 XML_compactData, ToPsz10(false),
 FSEND);
@@ -730,25 +733,51 @@ void XclExpXmlPivotTables::SavePivotTableXml( 
XclExpXmlStream& rStrm, const ScDP
 continue;
 }
 
+bool bDimInTabularMode = false;
+if(pDim->GetLayoutInfo())
+bDimInTabularMode |= (pDim->GetLayoutInfo()->LayoutMode == 
sheet::DataPilotFieldLayoutMode::TABULAR_LAYOUT);
+
 sheet::DataPilotFieldOrientation eOrient = pDim->GetOrientation();
 
 if (eOrient == sheet::DataPilotFieldOrientation_HIDD

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

2017-10-19 Thread Michael Stahl
 sw/source/core/txtnode/thints.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit c79da868c0b02b1b1333c3b805899bb4ce867f6a
Author: Michael Stahl 
Date:   Thu Oct 19 14:01:33 2017 +0200

sw: fix odd condition in SwpHints::MergePortions()

All of the RES_CHRATR_* items are poolable, hence we have
(pItem1 != pItem2) == (pItem1->Which() != pItem2->Which() || *pItem1 != 
*pItem2)

Move the redundant check to an assert() so we notice in case
somebody adds a new non-poolable RES_CHRATR.

Thanks to ccsheller for pointing me to this condition.

Change-Id: I9e0634946b8bede3f483bb8997f69de05beae64c

diff --git a/sw/source/core/txtnode/thints.cxx 
b/sw/source/core/txtnode/thints.cxx
index 71fbe12ba888..3d33f5bf1f5a 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -2782,10 +2782,9 @@ bool SwpHints::MergePortions( SwTextNode& rNode )
  pItem1 = iter1.NextItem(),
  pItem2 = iter2.NextItem())
 {
-if (pItem1 != pItem2 ||
-pItem1->Which() != pItem2->Which() ||
-*pItem1 != *pItem2)
+if (pItem1 != pItem2) // all are poolable
 {
+assert(IsInvalidItem(pItem1) || 
IsInvalidItem(pItem2) || pItem1->Which() != pItem2->Which() || *pItem1 != 
*pItem2);
 eMerge = DIFFER;
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Caolán McNamara
 svx/source/accessibility/AccessibleShape.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit a2cd7c7a1015abe17b46cd40ae4bf5b3296d62e7
Author: Caolán McNamara 
Date:   Wed Oct 18 11:05:20 2017 +0100

Resolves: tdf#109282: a11y crash in use after dispose

calc, chart in tab 3 with a11y enabled, select chart
switch to tab 1, crash cause mpParent has been deleted, IsDisposed
is correctly set, but shape accesses parent anyway

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

diff --git a/svx/source/accessibility/AccessibleShape.cxx 
b/svx/source/accessibility/AccessibleShape.cxx
index de059e9bb7fd..ffc2a6bc5f2e 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -408,7 +408,9 @@ uno::Reference SAL_CALL
 ::osl::MutexGuard aGuard (maMutex);
 Reference xStateSet;
 
-if (IsDisposed())
+bool bDisposed = IsDisposed();
+
+if (bDisposed)
 {
 // Return a minimal state set that only contains the DEFUNC state.
 xStateSet = AccessibleContextBase::getAccessibleStateSet ();
@@ -459,7 +461,7 @@ uno::Reference SAL_CALL
 xStateSet.set( new ::utl::AccessibleStateSetHelper (*pStateSet));
 }
 }
-if (mpParent && mpParent->IsDocumentSelAll())
+if (!bDisposed && mpParent && mpParent->IsDocumentSelAll())
 {
 ::utl::AccessibleStateSetHelper* pStateSet =
 static_cast< ::utl::AccessibleStateSetHelper*>(xStateSet.get());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: translations

2017-10-19 Thread Christian Lohmaier
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fecffa63ef07a80d5094abcc2ffce5d8f73e54f5
Author: Christian Lohmaier 
Date:   Thu Oct 19 13:24:14 2017 +0200

Updated core
Project: translations  dedc237384aa088b21796e0eb6d23501e00aaf89

update templates for 6.0.0 alpha1

Change-Id: Ie5bf8ab575cb94b341c277daa0cd9f6f2f6871f0

diff --git a/translations b/translations
index 639342ecb833..dedc237384aa 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 639342ecb83334102cb3659a5894643ac64d7327
+Subproject commit dedc237384aa088b21796e0eb6d23501e00aaf89
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: offapi/com

2017-10-19 Thread Michael Stahl
 offapi/com/sun/star/drawing/TextFitToSizeType.idl |   16 
 1 file changed, 12 insertions(+), 4 deletions(-)

New commits:
commit a612c2feb38dbe78aa388f7d95baa12c6e821880
Author: Michael Stahl 
Date:   Thu Oct 19 13:30:38 2017 +0200

offapi: clarify TextFitToSizeType documentation some more

Change-Id: I1912676423c0e85fa21f87bf28c2a4f6a13c5565

diff --git a/offapi/com/sun/star/drawing/TextFitToSizeType.idl 
b/offapi/com/sun/star/drawing/TextFitToSizeType.idl
index e70a63c9ae82..25693f67901b 100644
--- a/offapi/com/sun/star/drawing/TextFitToSizeType.idl
+++ b/offapi/com/sun/star/drawing/TextFitToSizeType.idl
@@ -32,8 +32,9 @@ published enum TextFitToSizeType
 */
 NONE,
 
-/** The font is scaled up or down proportionally to fit the
-size of the shape.  This may scale anisotropically.
+/** The rendered glyph bitmaps are scaled up or down
+proportionally to fit the size of the shape.
+This may scale anisotropically.
 No AutoGrow and no Auto line-breaks in this case.
 */
 PROPORTIONAL,
@@ -41,11 +42,18 @@ published enum TextFitToSizeType
 /** Like PROPORTIONAL, but each line of text
 is separately scaled proportionally to fit the width.
 No AutoGrow and no Auto line-breaks in this case.
+
+@note This is actually only implemented on fontwork
+  custom shapes, and the only supported option
+  (other than NONE) on fontwork shapes.
+  Why this is in this enum and not a value of
+  com.sun.star.drawing.TextHorizontalAdjust
+  is anybody's guess.
 */
 ALLLINES,
 
-/** The font is scaled down (never up!) isotropically to fit the
-available space.  Auto line-breaks will keep working.
+/** The font size is scaled down (never up!) isotropically to
+fit the available space.  Auto line-breaks will keep working.
 */
 AUTOFIT
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Caolán McNamara
 sw/source/filter/ww8/ww8scan.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 0f6494082983773431c84a3fcfd38db93d6afdae
Author: Caolán McNamara 
Date:   Thu Oct 19 09:41:35 2017 +0100

ofz+ubsan: signed integer overflow

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

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index b3bdaa01bcca..446976f9ce35 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2081,7 +2081,13 @@ WW8PLCF::WW8PLCF(SvStream& rSt, WW8_FC nFilePos, 
sal_Int32 nPLCF, int nStruct,
 WW8_CP nStartPos, sal_Int32 nPN, sal_Int32 ncpN): pPLCF_PosArray(nullptr), 
nIdx(0),
 nStru(nStruct)
 {
-nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
+if (nPLCF < 0)
+{
+SAL_WARN("sw.ww8", "broken WW8PLCF, ignoring");
+nIMax = SAL_MAX_INT32;
+}
+else
+nIMax = (nPLCF - 4) / (4 + nStruct);
 
 if( nIMax >= ncpN )
 ReadPLCF(rSt, nFilePos, nPLCF);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Stephan Bergmann
 vcl/source/filter/jpeg/jpegc.cxx |  607 ---
 1 file changed, 321 insertions(+), 286 deletions(-)

New commits:
commit 5355e3a4c12e37dd9dba980517645fbc4df5fbf8
Author: Stephan Bergmann 
Date:   Wed Oct 18 13:02:28 2017 +0200

Avoid throwing C++ exception across libjpeg C frames

It causes trouble at least for (non-debug) 32-bit ARM Flatpak builds, where
CppunitTest_vcl_filters_test aborts with an uncaught 
css::uno::RuntimeException.

This is a partial revert of 6889fa826eef6bd1074d77507818e71dfe8ba152 "rework
jpeg error handling to throw rather than setjmp to avoid leaks", switching 
back
to setjmp/longjmp but trying to keep the leaks fixed by introducing any 
relevant
local variables before the setjmps.

Change-Id: Ia5984528ea98be1c89a21aee800b247120f88a89
Reviewed-on: https://gerrit.libreoffice.org/43494
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit cfbb8b5090537e79ba70e250ddee86d53facbe15)
Reviewed-on: https://gerrit.libreoffice.org/43534
Reviewed-by: Miklos Vajna 

diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index 4305f065ed54..86dd30b71c7e 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -21,6 +21,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -37,12 +38,28 @@ extern "C" {
 #include 
 #include 
 
+#ifdef _MSC_VER
+#pragma warning(push, 1) /* disable to __declspec(align()) aligned warning */
+#pragma warning (disable: 4324)
+#endif
+
+struct ErrorManagerStruct
+{
+jpeg_error_mgr pub;
+jmp_buf setjmp_buffer;
+};
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
 extern "C" void errorExit (j_common_ptr cinfo)
 {
 char buffer[JMSG_LENGTH_MAX];
 (*cinfo->err->format_message) (cinfo, buffer);
 SAL_WARN("vcl.filter", "fatal failure reading JPEG: " << buffer);
-throw css::uno::RuntimeException(OUString(buffer, strlen(buffer), 
RTL_TEXTENCODING_ASCII_US));
+ErrorManagerStruct * error = reinterpret_cast(cinfo->err);
+longjmp(error->setjmp_buffer, 1);
 }
 
 extern "C" void outputMessage (j_common_ptr cinfo)
@@ -55,226 +72,239 @@ extern "C" void outputMessage (j_common_ptr cinfo)
 class JpegDecompressOwner
 {
 public:
-JpegDecompressOwner(jpeg_decompress_struct &cinfo) : m_cinfo(cinfo)
+void set(jpeg_decompress_struct *cinfo)
 {
+m_cinfo = cinfo;
 }
 ~JpegDecompressOwner()
 {
-jpeg_destroy_decompress(&m_cinfo);
+if (m_cinfo != nullptr)
+{
+jpeg_destroy_decompress(m_cinfo);
+}
 }
 private:
-jpeg_decompress_struct &m_cinfo;
+jpeg_decompress_struct *m_cinfo = nullptr;
 };
 
 class JpegCompressOwner
 {
 public:
-JpegCompressOwner(jpeg_compress_struct &cinfo) : m_cinfo(cinfo)
+void set(jpeg_compress_struct *cinfo)
 {
+m_cinfo = cinfo;
 }
 ~JpegCompressOwner()
 {
-jpeg_destroy_compress(&m_cinfo);
+if (m_cinfo != nullptr)
+{
+jpeg_destroy_compress(m_cinfo);
+}
 }
 private:
-jpeg_compress_struct &m_cinfo;
+jpeg_compress_struct *m_cinfo = nullptr;
 };
 
 void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines,
Size const & previewSize, GraphicFilterImportFlags nImportFlags,
Bitmap::ScopedWriteAccess* ppAccess )
 {
-try
+jpeg_decompress_struct cinfo;
+ErrorManagerStruct jerr;
+
+JpegDecompressOwner aOwner;
+std::unique_ptr pScopedAccess;
+std::vector pScanLineBuffer;
+std::vector pCYMKBuffer;
+
+if ( setjmp( jerr.setjmp_buffer ) )
+{
+return;
+}
+
+cinfo.err = jpeg_std_error( &jerr.pub );
+jerr.pub.error_exit = errorExit;
+jerr.pub.output_message = outputMessage;
+
+jpeg_create_decompress( &cinfo );
+aOwner.set(&cinfo);
+jpeg_svstream_src( &cinfo, pInputStream );
+SourceManagerStruct *source = 
reinterpret_cast(cinfo.src);
+jpeg_read_header( &cinfo, TRUE );
+
+cinfo.scale_num = 1;
+cinfo.scale_denom = 1;
+cinfo.output_gamma = 1.0;
+cinfo.raw_data_out = FALSE;
+cinfo.quantize_colors = FALSE;
+
+/* change scale for preview import */
+long nPreviewWidth = previewSize.Width();
+long nPreviewHeight = previewSize.Height();
+if( nPreviewWidth || nPreviewHeight )
 {
-jpeg_decompress_struct cinfo;
-jpeg_error_mgr jerr;
-
-cinfo.err = jpeg_std_error( &jerr );
-jerr.error_exit = errorExit;
-jerr.output_message = outputMessage;
-
-jpeg_create_decompress( &cinfo );
-JpegDecompressOwner aOwner(cinfo);
-jpeg_svstream_src( &cinfo, pInputStream );
-SourceManagerStruct *source = 
reinterpret_cast(cinfo.src);
-jpeg_read_header( &cinfo, TRUE );
-
-cinfo.scale_num = 1;
-cinfo.scale_denom = 1;
-cinfo.output_gamma = 1.0;
-cinfo.raw_data

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

2017-10-19 Thread Caolán McNamara
 solenv/gbuild/platform/unittest-failed-WNT.sh |4 
 vcl/inc/helpwin.hxx   |1 -
 vcl/source/app/help.cxx   |   12 +---
 3 files changed, 5 insertions(+), 12 deletions(-)

New commits:
commit 660b12e47d3aedb8fcf2ed2c50f8175d351a51aa
Author: Caolán McNamara 
Date:   Wed Oct 18 12:43:43 2017 +0100

tdf#112830 measure test with ApplySettings applied

and don't invalidate on first view

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

diff --git a/vcl/inc/helpwin.hxx b/vcl/inc/helpwin.hxx
index c2d068c1c79e..09fed59b7138 100644
--- a/vcl/inc/helpwin.hxx
+++ b/vcl/inc/helpwin.hxx
@@ -47,7 +47,6 @@ private:
 virtual void Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle&) override;
 virtual void RequestHelp( const HelpEvent& rHEvt ) override;
 virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
-virtual void StateChanged(StateChangedType nType) override;
 
 virtual OUString GetText() const override;
 void ImplShow();
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index e2410e596b62..a1d909eb6eed 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -281,17 +281,6 @@ HelpTextWindow::HelpTextWindow( vcl::Window* pParent, 
const OUString& rText, sal
 maHideTimer.SetDebugName( "vcl::HelpTextWindow maHideTimer" );
 }
 
-void HelpTextWindow::StateChanged(StateChangedType nType)
-{
-FloatingWindow::StateChanged(nType);
-if (nType == StateChangedType::InitShow)
-{
-ApplySettings(*this);
-SetHelpText(maHelpText);
-Invalidate();
-}
-}
-
 void HelpTextWindow::ApplySettings(vcl::RenderContext& rRenderContext)
 {
 const StyleSettings& rStyleSettings = 
rRenderContext.GetSettings().GetStyleSettings();
@@ -334,6 +323,7 @@ void HelpTextWindow::dispose()
 void HelpTextWindow::SetHelpText( const OUString& rHelpText )
 {
 maHelpText = rHelpText;
+ApplySettings(*this);
 if ( mnHelpWinStyle == HELPWINSTYLE_QUICK && maHelpText.getLength() < 
HELPTEXTMAXLEN)
 {
 Size aSize;
commit 516efc23377452f4a3950289a3977a7bb68ba188
Author: Tamás Zolnai 
Date:   Wed Oct 18 19:33:37 2017 +0200

Let's have this additional info also for WIN builds

Change-Id: Ie641f7005980585501f2de1ed83f1cd27549b2bb
Reviewed-on: https://gerrit.libreoffice.org/43536
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 

diff --git a/solenv/gbuild/platform/unittest-failed-WNT.sh 
b/solenv/gbuild/platform/unittest-failed-WNT.sh
index 55b583d1108d..d5df28ce186c 100755
--- a/solenv/gbuild/platform/unittest-failed-WNT.sh
+++ b/solenv/gbuild/platform/unittest-failed-WNT.sh
@@ -23,6 +23,10 @@ make $1Test_$2 CPPUNITTRACE=TRUE # which is a shortcut for 
the following line
 make $1Test_$2 CPPUNITTRACE="'$DEVENV' /debugexe" # for interactive debugging 
in Visual Studio
 make $1Test_$2 CPPUNITTRACE="drmemory -free_max_frames 20" # for memory 
checking (install Dr.Memory first, and put it to your PATH)
 
+You can limit the execution to just one particular test by:
+
+make $1Test_$2 CPPUNIT_TEST_NAME="testXYZ" ...above mentioned params...
+
 EOF
 
 exit 1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Miklos Vajna
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |   53 ++---
 1 file changed, 42 insertions(+), 11 deletions(-)

New commits:
commit f1cd64ec65253c1f84500b0af89c5b2990374a5d
Author: Miklos Vajna 
Date:   Thu Oct 19 09:08:32 2017 +0200

CppunitTest_vcl_pdfexport: now we can assert the path segments

Instead of the bounding box workaround before commit
5352dfbbe22b59983e1b91366908724138b9783a (pdfium: update to 3235,
2017-10-12).

Also stop using the deprecated FPDFPage_CountObject().

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

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index fecdee085f31..a904a5dc638d 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -250,7 +250,7 @@ void PdfExportTest::testTdf105461()
 CPPUNIT_ASSERT(mpPdfPage);
 
 // Make sure there is a filled rectangle inside.
-int nPageObjectCount = FPDFPage_CountObject(mpPdfPage);
+int nPageObjectCount = FPDFPage_CountObjects(mpPdfPage);
 int nYellowPathCount = 0;
 for (int i = 0; i < nPageObjectCount; ++i)
 {
@@ -306,7 +306,7 @@ void PdfExportTest::testTdf107868()
 CPPUNIT_ASSERT(mpPdfPage);
 
 // Make sure there is no filled rectangle inside.
-int nPageObjectCount = FPDFPage_CountObject(mpPdfPage);
+int nPageObjectCount = FPDFPage_CountObjects(mpPdfPage);
 int nWhitePathCount = 0;
 for (int i = 0; i < nPageObjectCount; ++i)
 {
@@ -703,7 +703,7 @@ void PdfExportTest::testTdf108963()
 CPPUNIT_ASSERT(mpPdfPage);
 
 // Make sure there is a filled rectangle inside.
-int nPageObjectCount = FPDFPage_CountObject(mpPdfPage);
+int nPageObjectCount = FPDFPage_CountObjects(mpPdfPage);
 int nYellowPathCount = 0;
 for (int i = 0; i < nPageObjectCount; ++i)
 {
@@ -716,14 +716,45 @@ void PdfExportTest::testTdf108963()
 if (RGB_COLORDATA(nRed, nGreen, nBlue) == COL_YELLOW)
 {
 ++nYellowPathCount;
-float fLeft = 0, fBottom = 0, fRight = 0, fTop = 0;
-FPDFPageObj_GetBounds(pPdfPageObject, &fLeft, &fBottom, &fRight, 
&fTop);
-int nWidth = fRight - fLeft;
-int nHeight = fTop - fBottom;
-// This was 37 and 20, i.e. the bounding rectangle was much smaller
-// as the highlight polygon wasn't rotated.
-CPPUNIT_ASSERT_EQUAL(42, nWidth);
-CPPUNIT_ASSERT_EQUAL(39, nHeight);
+// The path described a yellow rectangle, but it was not rotated.
+int nSegments = FPDFPath_CountSegments(pPdfPageObject);
+CPPUNIT_ASSERT_EQUAL(5, nSegments);
+FPDF_PATHSEGMENT pSegment = 
FPDFPath_GetPathSegment(pPdfPageObject, 0);
+CPPUNIT_ASSERT_EQUAL(FPDF_SEGMENT_MOVETO, 
FPDFPathSegment_GetType(pSegment));
+float fX = 0;
+float fY = 0;
+FPDFPathSegment_GetPoint(pSegment, &fX, &fY);
+CPPUNIT_ASSERT_EQUAL(static_cast(245.4), fX);
+CPPUNIT_ASSERT_EQUAL(static_cast(244.2), fY);
+CPPUNIT_ASSERT(!FPDFPathSegment_GetClose(pSegment));
+
+pSegment = FPDFPath_GetPathSegment(pPdfPageObject, 1);
+CPPUNIT_ASSERT_EQUAL(FPDF_SEGMENT_LINETO, 
FPDFPathSegment_GetType(pSegment));
+FPDFPathSegment_GetPoint(pSegment, &fX, &fY);
+CPPUNIT_ASSERT_EQUAL(static_cast(275.1), fX);
+CPPUNIT_ASSERT_EQUAL(static_cast(267.6), fY);
+CPPUNIT_ASSERT(!FPDFPathSegment_GetClose(pSegment));
+
+pSegment = FPDFPath_GetPathSegment(pPdfPageObject, 2);
+CPPUNIT_ASSERT_EQUAL(FPDF_SEGMENT_LINETO, 
FPDFPathSegment_GetType(pSegment));
+FPDFPathSegment_GetPoint(pSegment, &fX, &fY);
+CPPUNIT_ASSERT_EQUAL(static_cast(287.5), fX);
+CPPUNIT_ASSERT_EQUAL(static_cast(251.8), fY);
+CPPUNIT_ASSERT(!FPDFPathSegment_GetClose(pSegment));
+
+pSegment = FPDFPath_GetPathSegment(pPdfPageObject, 3);
+CPPUNIT_ASSERT_EQUAL(FPDF_SEGMENT_LINETO, 
FPDFPathSegment_GetType(pSegment));
+FPDFPathSegment_GetPoint(pSegment, &fX, &fY);
+CPPUNIT_ASSERT_EQUAL(static_cast(257.8), fX);
+CPPUNIT_ASSERT_EQUAL(static_cast(228.4), fY);
+CPPUNIT_ASSERT(!FPDFPathSegment_GetClose(pSegment));
+
+pSegment = FPDFPath_GetPathSegment(pPdfPageObject, 4);
+CPPUNIT_ASSERT_EQUAL(FPDF_SEGMENT_LINETO, 
FPDFPathSegment_GetType(pSegment));
+FPDFPathSegment_GetPoint(pSegment, &fX, &fY);
+CPPUNIT_ASSERT_EQUAL(static_cast(245.4), fX);
+CPPUNIT_ASSERT_EQUAL(static_cast(244.2), fY);
+CPPUNIT_ASSERT(FPDFPathSegment_GetClose(pSegment));
 }
 }
 
___
Libreoffice-co

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

2017-10-19 Thread Noel Grandin
 hwpfilter/source/hbox.cxx  |   29 -
 hwpfilter/source/hbox.h|   12 ++--
 hwpfilter/source/hwpfile.cxx   |   35 +++
 hwpfilter/source/hwpfile.h |1 +
 hwpfilter/source/hwpreader.cxx |   36 ++--
 5 files changed, 60 insertions(+), 53 deletions(-)

New commits:
commit b462fa972e27d9c1510ee547e95f3e9062e4579d
Author: Noel Grandin 
Date:   Wed Oct 18 15:53:53 2017 +0200

use std::unique_ptr in hwpfilter

Change-Id: I3aa6e1342f975420b19e9e21058a0331ed2d71e0
Reviewed-on: https://gerrit.libreoffice.org/43525
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/hwpfilter/source/hbox.cxx b/hwpfilter/source/hbox.cxx
index ec042a86dbfe..87f3ef0c9db6 100644
--- a/hwpfilter/source/hbox.cxx
+++ b/hwpfilter/source/hbox.cxx
@@ -347,18 +347,6 @@ TxtBox::TxtBox()
 
 TxtBox::~TxtBox()
 {
-for (auto& entry : plists)
-{
-for (auto const& para : entry)
-{
-delete para;
-}
-}
-
-for (auto const& para : caption)
-{
-delete para;
-}
 }
 
 // picture(11)
@@ -382,11 +370,6 @@ Picture::~Picture()
 {
 if( pictype == PICTYPE_DRAW && picinfo.picdraw.hdo )
 delete static_cast(picinfo.picdraw.hdo);
-
-for (auto const& para : caption)
-{
-delete para;
-}
 }
 
 
@@ -394,30 +377,18 @@ Picture::~Picture()
 // hidden(15)
 Hidden::~Hidden()
 {
-for (auto const& para : plist)
-{
-delete para;
-}
 }
 
 
 // header/footer(16)
 HeaderFooter::~HeaderFooter()
 {
-for (auto const& para : plist)
-{
-delete para;
-}
 }
 
 
 // footnote(17)
 Footnote::~Footnote()
 {
-for (auto const& para : plist)
-{
-delete para;
-}
 }
 
 
diff --git a/hwpfilter/source/hbox.h b/hwpfilter/source/hbox.h
index e95698943f8c..d934c9bf6622 100644
--- a/hwpfilter/source/hbox.h
+++ b/hwpfilter/source/hbox.h
@@ -363,12 +363,12 @@ struct TxtBox: public FBox
 /**
  * Paragraph list
  */
-std::vector> plists;
+std::vector>> plists;
 
 /**
  * Caption
  */
-std::vector caption;
+std::vector> caption;
 
 TxtBox();
 virtual ~TxtBox() override;
@@ -625,7 +625,7 @@ struct Picture: public FBox
 PicDefpicinfo;
 char  reserved3[9];
 
-std::vector caption;
+std::vector> caption;
 /**
  * It's for the Drawing object
  */
@@ -668,7 +668,7 @@ struct Hidden: public HBox
 hchar dummy;
 
 unsigned char info[8];// h, next, dummy
-std::vector plist;
+std::vector> plist;
 
 Hidden();
 virtual ~Hidden() override;
@@ -697,7 +697,7 @@ struct HeaderFooter: public HBox
 /**
  * Paragraph list of header or footer
  */
-std::vector plist;
+std::vector> plist;
 
 HeaderFooter();
 virtual ~HeaderFooter() override;
@@ -730,7 +730,7 @@ struct Footnote: public HBox
 /**
  * Paragraph list of Footnote objects
  */
-std::vector plist;
+std::vector> plist;
 
 Footnote();
 virtual ~Footnote() override;
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx
index 2bb3350fc4a5..a93e03f3023a 100644
--- a/hwpfilter/source/hwpfile.cxx
+++ b/hwpfilter/source/hwpfile.cxx
@@ -267,6 +267,41 @@ bool HWPFile::ReadParaList(std::vector < HWPPara* > 
&aplist, unsigned char flag)
 return true;
 }
 
+bool HWPFile::ReadParaList(std::vector< std::unique_ptr > &aplist, 
unsigned char flag)
+{
+std::unique_ptr spNode( new HWPPara );
+unsigned char tmp_etcflag;
+unsigned char prev_etcflag = 0;
+while (spNode->Read(*this, flag))
+{
+ if( !(spNode->etcflag & 0x04) ){
+  tmp_etcflag = spNode->etcflag;
+  spNode->etcflag = prev_etcflag;
+  prev_etcflag = tmp_etcflag;
+ }
+if (spNode->nch && spNode->reuse_shape)
+{
+if (!aplist.empty()){
+ spNode->pshape = aplist.back()->pshape;
+}
+else{
+ spNode->nch = 0;
+ spNode->reuse_shape = 0;
+}
+}
+spNode->pshape->pagebreak = spNode->etcflag;
+if (spNode->nch)
+AddParaShape(spNode->pshape);
+
+if (!aplist.empty())
+aplist.back()->SetNext(spNode.get());
+aplist.push_back(std::move(spNode));
+spNode.reset( new HWPPara );
+}
+
+return true;
+}
+
 void HWPFile::TagsRead()
 {
 while (true)
diff --git a/hwpfilter/source/hwpfile.h b/hwpfilter/source/hwpfile.h
index fee55b75a91c..cb6074c4f869 100644
--- a/hwpfilter/source/hwpfile.h
+++ b/hwpfilter/source/hwpfile.h
@@ -160,6 +160,7 @@ class DLLEXPORT HWPFile
 /**
  * Reads main paragraph list
  */
+bool ReadParaList(std::vector> &aplist, 
unsigned char flag = 0);
 bool ReadParaList(std::vector &aplist, unsigned char flag = 
0);
 /**
  * Sets if the stream is compressed
diff --git a/hwpfilter/source/hwpread

Re: How to run multiple instances of Writer simultaneously?

2017-10-19 Thread Jens Tröger
Thanks Matthew!

That’s close to what I’m using. However, would you mind sharing your “close 
document” code, as well as shutting down the soffice process?

In that context, it looks like you’re using the soffice process as the server? 
How about projects like listed in this question: 
https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=75523  What about 
scalability as per this question: 
https://forum.openoffice.org/en/forum/viewtopic.php?f=6&t=74002

Thank you,
Jens


> On Oct 19, 2017, at 18:26, Matthew Francis  wrote:
> 
> On 19 October 2017 at 15:05, Jens Tröger  wrote:
>> The termination of the process p seems to destroy the other running soffice 
>> process. Hence using custom user installations with 
>> -env:UserInstallation=/tmp/random-dir but that just prolongs the process 
>> creation noticeably!
> 
> One alternative to allowing LO to create a new user installation each
> time (which will indeed be slow) is to create a fresh user
> installation once, save it somewhere as a template, then make a new
> copy of the template directory each time - a file level copy should be
> considerably faster.
> You can accomplish this simply in Python using shutil.copytree()
> 
> Some sample code appended below - this is hacked out from a previous
> project, and may or may not represent best practice as to how to do
> this, but does work.
> 
> Regards
> Matthew Francis
> 
> 
> #!/usr/bin/python3
> 
> import os
> import re
> import shutil
> import subprocess
> import tempfile
> import time
> import uno
> import uuid
> 
> from com.sun.star.connection import NoConnectException
> 
> sofficePath = '/usr/bin/soffice'
> tempDir = tempfile.mkdtemp()
> 
> # Restore cached profile if available
> userProfile = tempDir + '/profile'
> cacheDir = os.getenv('XDG_CACHE_DIR', os.environ['HOME'] + '/.cache')
> + '/lo_profile_cache'
> if os.path.isdir(cacheDir):
>shutil.copytree(cacheDir, userProfile)
>profileCached = True
> else:
>os.mkdir(userProfile)
>profileCached = False
> 
> # Launch LibreOffice server
> pipeName = uuid.uuid4().hex
> args = [
>sofficePath,
>'-env:UserInstallation=file://' + userProfile,
>'--pidfile=' + tempDir + '/soffice.pid',
>'--accept=pipe,name=' + pipeName + ';urp;',
>'--norestore',
>'--invisible'
> ]
> sofficeEnvironment = os.environ
> sofficeEnvironment['TMPDIR'] = tempDir
> proc = subprocess.Popen(args, env=sofficeEnvironment, preexec_fn=os.setsid)
> 
> # Open connection to server
> for i in range(100):
>try:
>localContext = uno.getComponentContext()
>resolver =
> localContext.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver",
> localContext)
>context =
> resolver.resolve("uno:pipe,name=%s;urp;StarOffice.ComponentContext" %
> pipeName)
>break
>except NoConnectException:
>time.sleep(0.1)
>if i == 99:
>raise
> 
> # Cache profile if required
> if not profileCached:
>shutil.copytree(userProfile, cacheDir)
> 
> 
> desktop = 
> context.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop",
> context)
> desktop.loadComponentFromURL('private:factory/swriter', 'blank', 0, ())
> 
> # ... clean up temporary directory when done (omitted)
> 

--
Jens Tröger
http://savage.light-speed.de/

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


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

2017-10-19 Thread Noel Grandin
 include/svx/unoprov.hxx|3 ++-
 svx/source/unodraw/unoprov.cxx |6 ++
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 3991cd38484883b8544be908b6834564345fd0f1
Author: Noel Grandin 
Date:   Wed Oct 18 13:32:59 2017 +0200

use std::unique_ptr in SvxUnoPropertyMapProvider

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

diff --git a/include/svx/unoprov.hxx b/include/svx/unoprov.hxx
index 7d2651c6bfd8..8a2d7d977f51 100644
--- a/include/svx/unoprov.hxx
+++ b/include/svx/unoprov.hxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 class SvxItemPropertySet;
@@ -84,7 +85,7 @@ public:
 class SVX_DLLPUBLIC SvxUnoPropertyMapProvider
 {
 SfxItemPropertyMapEntry const * aMapArr[SVXMAP_END];
-SvxItemPropertySet* aSetArr[SVXMAP_END];
+std::unique_ptr aSetArr[SVXMAP_END];
 public:
 SvxUnoPropertyMapProvider();
 ~SvxUnoPropertyMapProvider();
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index abe266261ec6..ff8a6f48cd1d 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -902,8 +902,6 @@ SvxUnoPropertyMapProvider::SvxUnoPropertyMapProvider()
 
 SvxUnoPropertyMapProvider::~SvxUnoPropertyMapProvider()
 {
-for(SvxItemPropertySet* p : aSetArr)
-delete p;
 }
 
 
@@ -949,8 +947,8 @@ const SfxItemPropertyMapEntry* 
SvxUnoPropertyMapProvider::GetMap(sal_uInt16 nPro
 const SvxItemPropertySet* SvxUnoPropertyMapProvider::GetPropertySet(sal_uInt16 
nPropertyId, SfxItemPool& rPool)
 {
 if( !aSetArr[nPropertyId] )
-aSetArr[nPropertyId] = new SvxItemPropertySet( GetMap( nPropertyId ), 
rPool );
-return aSetArr[nPropertyId];
+aSetArr[nPropertyId].reset(new SvxItemPropertySet( GetMap( nPropertyId 
), rPool ));
+return aSetArr[nPropertyId].get();
 }
 
 /** maps the vcl MapUnit enum to a API constant MeasureUnit.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Tor Lillqvist
 sc/source/core/tool/stringutil.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 049fc31e5557eada26a39bf8a06bfdb8f1cbb205
Author: Tor Lillqvist 
Date:   Wed Oct 18 13:24:44 2017 +0300

Fix assertion to check the right thing

We want to assert that the token separator character is not one of the
quote pair characters.

Change-Id: Ic6114238f4a45a4f1ed7d255e7e9da3519479148

diff --git a/sc/source/core/tool/stringutil.cxx 
b/sc/source/core/tool/stringutil.cxx
index afcbe7412474..72f579fd384a 100644
--- a/sc/source/core/tool/stringutil.cxx
+++ b/sc/source/core/tool/stringutil.cxx
@@ -348,7 +348,7 @@ bool ScStringUtil::parseSimpleNumber(
 sal_Int32 ScStringUtil::GetQuotedTokenCount(const OUString &rIn, const 
OUString& rQuotedPairs, sal_Unicode cTok )
 {
 assert( !(rQuotedPairs.getLength()%2) );
-assert( rQuotedPairs.indexOf(cTok) );
+assert( rQuotedPairs.indexOf(cTok) == -1 );
 
 // empty string: TokenCount is 0 per definition
 if ( rIn.isEmpty() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Jan-Marek Glogowski
 sfx2/source/sidebar/SidebarController.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 26074f8ffacd817825a6e61d39dc9e7d27b1f3c2
Author: Jan-Marek Glogowski 
Date:   Tue Oct 17 19:52:58 2017 +0200

tdf#99537 set expand for re-used sidebar panels

When re-using a panel, reset the expand state from the stored
state in the PanelContexDescriptor.

Change-Id: I00851982bbd36cacdc57459bb6e5be9fcc719e81
Reviewed-on: https://gerrit.libreoffice.org/43466
Tested-by: Jenkins 
Reviewed-by: Yousuf Philips 
Tested-by: Yousuf Philips 
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit ce2e94a98f5fc85bef7623a0227b3a95d8093288)
Reviewed-on: https://gerrit.libreoffice.org/43481
Reviewed-by: Katarina Behrens 

diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index 9b6eab64dd97..66850a562021 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -619,6 +619,7 @@ void SidebarController::CreatePanels(const ::rtl::OUString& 
rDeckId, const Conte
 if (pPanel != nullptr)
 {
 aNewPanels[nWriteIndex] = pPanel;
+pPanel->SetExpanded( rPanelContexDescriptor.mbIsInitiallyVisible );
 ++nWriteIndex;
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: How to run multiple instances of Writer simultaneously?

2017-10-19 Thread Matthew Francis
On 19 October 2017 at 16:26, Matthew Francis  wrote:
> Some sample code appended below - this is hacked out from a previous
> project, and may or may not represent best practice as to how to do
> this, but does work.

... and the same code as a github gist, because I should know better
than to paste wide code in an email

https://gist.github.com/mjayfrancis/164e8956113b7119b4e71cb8d4bd41ed
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: How to run multiple instances of Writer simultaneously?

2017-10-19 Thread Matthew Francis
On 19 October 2017 at 15:05, Jens Tröger  wrote:
> The termination of the process p seems to destroy the other running soffice 
> process. Hence using custom user installations with 
> -env:UserInstallation=/tmp/random-dir but that just prolongs the process 
> creation noticeably!

One alternative to allowing LO to create a new user installation each
time (which will indeed be slow) is to create a fresh user
installation once, save it somewhere as a template, then make a new
copy of the template directory each time - a file level copy should be
considerably faster.
You can accomplish this simply in Python using shutil.copytree()

Some sample code appended below - this is hacked out from a previous
project, and may or may not represent best practice as to how to do
this, but does work.

Regards
Matthew Francis


#!/usr/bin/python3

import os
import re
import shutil
import subprocess
import tempfile
import time
import uno
import uuid

from com.sun.star.connection import NoConnectException

sofficePath = '/usr/bin/soffice'
tempDir = tempfile.mkdtemp()

# Restore cached profile if available
userProfile = tempDir + '/profile'
cacheDir = os.getenv('XDG_CACHE_DIR', os.environ['HOME'] + '/.cache')
+ '/lo_profile_cache'
if os.path.isdir(cacheDir):
shutil.copytree(cacheDir, userProfile)
profileCached = True
else:
os.mkdir(userProfile)
profileCached = False

# Launch LibreOffice server
pipeName = uuid.uuid4().hex
args = [
sofficePath,
'-env:UserInstallation=file://' + userProfile,
'--pidfile=' + tempDir + '/soffice.pid',
'--accept=pipe,name=' + pipeName + ';urp;',
'--norestore',
'--invisible'
]
sofficeEnvironment = os.environ
sofficeEnvironment['TMPDIR'] = tempDir
proc = subprocess.Popen(args, env=sofficeEnvironment, preexec_fn=os.setsid)

# Open connection to server
for i in range(100):
try:
localContext = uno.getComponentContext()
resolver =
localContext.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver",
localContext)
context =
resolver.resolve("uno:pipe,name=%s;urp;StarOffice.ComponentContext" %
pipeName)
break
except NoConnectException:
time.sleep(0.1)
if i == 99:
raise

# Cache profile if required
if not profileCached:
shutil.copytree(userProfile, cacheDir)


desktop = 
context.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop",
context)
desktop.loadComponentFromURL('private:factory/swriter', 'blank', 0, ())

# ... clean up temporary directory when done (omitted)
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-10-19 Thread Noel Grandin
 lotuswordpro/inc/xfilter/xfliststyle.hxx   |3 
 lotuswordpro/source/filter/xfilter/xfliststyle.cxx |   75 +++--
 2 files changed, 30 insertions(+), 48 deletions(-)

New commits:
commit f47804d56270ef4f0ee000bb6a1dfb45fa9bc4ac
Author: Noel Grandin 
Date:   Wed Oct 18 15:54:05 2017 +0200

use std::unique_ptr in lotuswordpro

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

diff --git a/lotuswordpro/inc/xfilter/xfliststyle.hxx 
b/lotuswordpro/inc/xfilter/xfliststyle.hxx
index c51ef7079664..fd993c322ea0 100644
--- a/lotuswordpro/inc/xfilter/xfliststyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfliststyle.hxx
@@ -64,6 +64,7 @@
 #include "xfilter/xfstyle.hxx"
 #include "xfilter/xfnumfmt.hxx"
 #include "unicode/utypes.h"
+#include 
 #include 
 
 class IXFStream;
@@ -214,7 +215,7 @@ public:
 virtual voidToXml(IXFStream *pStrm) override;
 
 private:
-XFListLevel *m_pListLevels[10];
+std::unique_ptr m_pListLevels[10];
 };
 
 inline void XFListLevel::SetListlevelType(enumXFListLevel type)
diff --git a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx 
b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
index 78463a943c56..844f65bd1a5b 100644
--- a/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfliststyle.cxx
@@ -156,12 +156,12 @@ XFListStyle::XFListStyle()
 
 for( int i=0; i<10; i++ )
 {
-m_pListLevels[i] = new XFListlevelNumber();
+m_pListLevels[i].reset(new XFListlevelNumber());
 m_pListLevels[i]->SetListlevelType(enumXFListLevelNumber);
 m_pListLevels[i]->SetMinLabelWidth(0.499);
 m_pListLevels[i]->SetIndent(0.501*(i+1));
 m_pListLevels[i]->SetLevel(i+1);
-static_cast(m_pListLevels[i])->SetNumFmt(nf);
+static_cast(m_pListLevels[i].get())->SetNumFmt(nf);
 }
 }
 
@@ -172,16 +172,16 @@ XFListStyle::XFListStyle(const XFListStyle& 
other):XFStyle(other)
 const enumXFListLevel type = other.m_pListLevels[i]->m_eListType;
 if( type == enumXFListLevelNumber )
 {
-XFListlevelNumber *pNum = 
static_cast(other.m_pListLevels[i]);
-m_pListLevels[i] = new XFListlevelNumber(*pNum);
+XFListlevelNumber *pNum = 
static_cast(other.m_pListLevels[i].get());
+m_pListLevels[i].reset(new XFListlevelNumber(*pNum));
 }
 else if( type == enumXFListLevelBullet )
 {
-XFListLevelBullet *pBullet = 
static_cast(other.m_pListLevels[i]);
-m_pListLevels[i] = new XFListLevelBullet(*pBullet);
+XFListLevelBullet *pBullet = 
static_cast(other.m_pListLevels[i].get());
+m_pListLevels[i].reset(new XFListLevelBullet(*pBullet));
 }
 else
-m_pListLevels[i] = nullptr;
+m_pListLevels[i].reset();
 }
 }
 
@@ -192,45 +192,39 @@ XFListStyle& XFListStyle::operator=(const XFListStyle& 
other)
 const enumXFListLevel type = other.m_pListLevels[i]->m_eListType;
 if( type == enumXFListLevelNumber )
 {
-XFListlevelNumber *pNum = 
static_cast(m_pListLevels[i]);
-m_pListLevels[i] = new XFListlevelNumber(*pNum);
+XFListlevelNumber *pNum = 
static_cast(m_pListLevels[i].get());
+m_pListLevels[i].reset(new XFListlevelNumber(*pNum));
 }
 else if( type == enumXFListLevelBullet )
 {
-XFListLevelBullet *pBullet = 
static_cast(m_pListLevels[i]);
-m_pListLevels[i] = new XFListLevelBullet(*pBullet);
+XFListLevelBullet *pBullet = 
static_cast(m_pListLevels[i].get());
+m_pListLevels[i].reset(new XFListLevelBullet(*pBullet));
 }
 else
-m_pListLevels[i] = nullptr;
+m_pListLevels[i].reset();
 }
 return *this;
 }
 
 XFListStyle::~XFListStyle()
 {
-for(XFListLevel* p : m_pListLevels)
-{
-delete p;
-}
 }
 
 voidXFListStyle::SetDisplayLevel(sal_Int32 level, sal_Int16 nDisplayLevel)
 {
 assert(level>=1&&level<=10);
 
-XFListLevel *pLevel = m_pListLevels[level-1];
+XFListLevel *pLevel = m_pListLevels[level-1].get();
 if( !pLevel )
 {
-pLevel = new XFListlevelNumber();
+m_pListLevels[level-1].reset(new XFListlevelNumber());
+pLevel = m_pListLevels[level-1].get();
 pLevel->SetListlevelType(enumXFListLevelNumber);
 pLevel->SetLevel(level+1);
 pLevel->SetMinLabelWidth(0.499);
 pLevel->SetIndent(0.501*(level+1));
-pLevel->SetDisplayLevel(nDisplayLevel);
-m_pListLevels[level-1] = pLevel;
 }
-else
-pLevel->SetDisplayLevel(nDisplayLevel);
+pLevel->SetDisplayLevel(nDisplayLevel);
 }
 
 voidXFListStyle::SetListPosition(sal_Int32 level,
@@ -242,25 +236,18 @@ voidXFListStyle::SetListPosition(sal_Int32 leve

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

2017-10-19 Thread Caolán McNamara
 sw/source/filter/ww8/ww8scan.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit f9ffe96b84044e28c58b48d57662c7db3d50bcc0
Author: Caolán McNamara 
Date:   Wed Oct 18 21:25:24 2017 +0100

ofz+ubsan: signed integer overflow

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

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index b3fdcd08ce04..b3bdaa01bcca 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -3654,6 +3654,14 @@ void WW8PLCFx_SubDoc::GetSprms(WW8PLCFxDesc* p)
 return;
 }
 
+if (p->nCp2OrIdx < 0 || p->nCp2OrIdx > p->nSprmsLen)
+{
+SAL_WARN("sw.ww8", "Document has invalid Cp or Idx, ignoring it");
+p->nEndPos = p->nStartPos = WW8_CP_MAX;
+p->nSprmsLen = 0;
+return;
+}
+
 p->nSprmsLen -= p->nCp2OrIdx;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Caolán McNamara
 sw/source/filter/ww8/ww8par.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 40d663adac040a419b3ac3a303958ba49bc8712e
Author: Caolán McNamara 
Date:   Wed Oct 18 17:05:27 2017 +0100

ofz+ubsan: downcast does not point to SwTextFormatColl

sw/source/filter/ww8/ww8par.cxx:1654:20: runtime error: downcast of address 
0x12e4a730 which does not point to an object of type 'const 
SwTextFormatColl'
0x12e4a730: note: object is of type 'SwCharFormat'

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

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index ad8c23f0312f..2eff10a2af13 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1645,19 +1645,19 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const 
sal_uInt8* pData, short nLen)
 
 SvxTabStopItem aAttr(0, 0, SvxTabAdjust::Default, RES_PARATR_TABSTOP);
 
-const SwTextFormatColl* pSty = nullptr;
+const SwFormat * pSty = nullptr;
 sal_uInt16 nTabBase;
 if (m_pAktColl && m_nAktColl < m_vColl.size()) // StyleDef
 {
 nTabBase = m_vColl[m_nAktColl].m_nBase;
 if (nTabBase < m_vColl.size())  // Based On
-pSty = static_cast(m_vColl[nTabBase].m_pFormat);
+pSty = m_vColl[nTabBase].m_pFormat;
 }
 else
 { // Text
 nTabBase = m_nAktColl;
 if (m_nAktColl < m_vColl.size())
-pSty = static_cast(m_vColl[m_nAktColl].m_pFormat);
+pSty = m_vColl[m_nAktColl].m_pFormat;
 //TODO: figure out else here
 }
 
@@ -1687,7 +1687,7 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const 
sal_uInt8* pData, short nLen)
 // current one (prevent loop)
 aLoopWatch.insert(reinterpret_cast(pSty));
 if (nTabBase < m_vColl.size())
-pSty = static_cast(m_vColl[nTabBase].m_pFormat);
+pSty = m_vColl[nTabBase].m_pFormat;
 //TODO figure out the else branch
 
 if (aLoopWatch.find(reinterpret_cast(pSty)) !=
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-10-19 Thread Julien Nabet
 sfx2/source/doc/Metadatable.cxx |   40 
 1 file changed, 20 insertions(+), 20 deletions(-)

New commits:
commit 66a33ea9ef0ede9c90714455e6ad46197425f075
Author: Julien Nabet 
Date:   Fri Oct 13 21:34:24 2017 +0200

Replace list by vector in Metadatable (sfx2)

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

diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index 2879e12e1131..90258798ead6 100644
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
@@ -412,11 +412,11 @@ template< typename T >
 // Document XML ID Registry (_Impl)
 
 /// element list
-typedef ::std::list< Metadatable* > XmlIdList_t;
+typedef ::std::vector< Metadatable* > XmlIdVector_t;
 
 /// Idref -> (content.xml element list, styles.xml element list)
 typedef std::unordered_map< OUString,
-::std::pair< XmlIdList_t, XmlIdList_t >, OUStringHash > XmlIdMap_t;
+::std::pair< XmlIdVector_t, XmlIdVector_t >, OUStringHash > XmlIdMap_t;
 
 /// pointer hash template
 template struct PtrHash
@@ -446,17 +446,17 @@ struct XmlIdRegistryDocument::XmlIdRegistry_Impl
 Metadatable* LookupElement(const OUString & i_rStreamName,
 const OUString & i_rIdref) const;
 
-const XmlIdList_t * LookupElementList(
+const XmlIdVector_t * LookupElementVector(
 const OUString & i_rStreamName,
 const OUString & i_rIdref) const;
 
-  XmlIdList_t * LookupElementList(
+  XmlIdVector_t * LookupElementVector(
 const OUString & i_rStreamName,
 const OUString & i_rIdref)
 {
-return const_cast(
+return const_cast(
 const_cast(this)
-->LookupElementList(i_rStreamName, i_rIdref));
+->LookupElementVector(i_rStreamName, i_rIdref));
 }
 
 XmlIdMap_t m_XmlIdMap;
@@ -470,9 +470,9 @@ rmIter(XmlIdMap_t & i_rXmlIdMap, XmlIdMap_t::iterator 
const& i_rIter,
 {
 if (i_rIter != i_rXmlIdMap.end())
 {
-XmlIdList_t & rList( isContentFile(i_rStream)
+XmlIdVector_t & rVector( isContentFile(i_rStream)
 ? i_rIter->second.first : i_rIter->second.second );
-rList.remove(&const_cast(i_rObject));
+rVector.erase(std::remove(rVector.begin(), rVector.end(), 
&const_cast(i_rObject)));
 if (i_rIter->second.first.empty() && i_rIter->second.second.empty())
 {
 i_rXmlIdMap.erase(i_rIter);
@@ -481,8 +481,8 @@ rmIter(XmlIdMap_t & i_rXmlIdMap, XmlIdMap_t::iterator 
const& i_rIter,
 }
 
 
-const XmlIdList_t *
-XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupElementList(
+const XmlIdVector_t *
+XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupElementVector(
 const OUString & i_rStreamName,
 const OUString & i_rIdref) const
 {
@@ -511,10 +511,10 @@ XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupElement(
 throw lang::IllegalArgumentException("illegal XmlId", nullptr, 0);
 }
 
-const XmlIdList_t * pList( LookupElementList(i_rStreamName, i_rIdref) );
+const XmlIdVector_t * pList( LookupElementVector(i_rStreamName, i_rIdref) 
);
 if (pList)
 {
-const XmlIdList_t::const_iterator iter(
+const XmlIdVector_t::const_iterator iter(
 ::std::find_if(pList->begin(), pList->end(),
 [](Metadatable* item)->bool {
 return !(item->IsInUndo() || item->IsInClipboard());
@@ -559,7 +559,7 @@ 
XmlIdRegistryDocument::XmlIdRegistry_Impl::TryInsertMetadatable(
 OSL_ENSURE(isContentFile(i_rStreamName) || isStylesFile(i_rStreamName),
 "invalid stream");
 
-XmlIdList_t * pList( LookupElementList(i_rStreamName, i_rIdref) );
+XmlIdVector_t * pList( LookupElementVector(i_rStreamName, i_rIdref) );
 if (pList)
 {
 if (pList->empty())
@@ -577,7 +577,7 @@ 
XmlIdRegistryDocument::XmlIdRegistry_Impl::TryInsertMetadatable(
 return !(item->IsInUndo() || item->IsInClipboard());
 } ) )
 {
-pList->push_front( &i_rObject );
+pList->insert(pList->begin(), &i_rObject );
 return true;
 }
 else
@@ -589,8 +589,8 @@ 
XmlIdRegistryDocument::XmlIdRegistry_Impl::TryInsertMetadatable(
 else
 {
 m_XmlIdMap.insert(::std::make_pair(i_rIdref, bContent
-? ::std::make_pair( XmlIdList_t( 1, &i_rObject ), XmlIdList_t() )
-: ::std::make_pair( XmlIdList_t(), XmlIdList_t( 1, &i_rObject ) 
)));
+? ::std::make_pair( XmlIdVector_t( 1, &i_rObject ), 
XmlIdVector_t() )
+: ::std::make_pair( XmlIdVector_t(), XmlIdVector_t( 1, &i_rObject 
) )));
 return true;
 }
 }
@@ -735,8 +735,8 @@ 
XmlIdRegistryDocument::RegisterMetadatableAndCreateID(Metadatable & i_rObject)
 OSL_ENSURE(m_pImpl->m_X

[Libreoffice-commits] core.git: cui/source oox/source slideshow/source svx/source udkapi/com

2017-10-19 Thread Andrea Gelmini
 cui/source/dialogs/about.cxx |2 
 oox/source/drawingml/textfield.cxx   |2 
 slideshow/source/engine/transitions/transitionfactorytab.cxx |  334 +--
 slideshow/source/inc/transitioninfo.hxx  |4 
 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx |2 
 udkapi/com/sun/star/io/XObjectInputStream.idl|2 
 6 files changed, 173 insertions(+), 173 deletions(-)

New commits:
commit e8b5510a697f25f72a2171b307fb8ae5f21121ec
Author: Andrea Gelmini 
Date:   Wed Oct 18 16:21:52 2017 +0200

Fix typos

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

diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index ea46ac3f8807..4342bcf495f6 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -201,7 +201,7 @@ void AboutDialog::SetLogo()
 bool bOldAntiAliasSetting = aDrawOpt.IsAntiAliasing();
 aDrawOpt.SetAntiAliasing(true);
 
-// load svg logo, specify desired width, scale height isotrophically
+// load svg logo, specify desired width, scale height isotropically
 if (SfxApplication::loadBrandSvg("flat_logo", aLogoBitmap, nWidth) &&
 !aLogoBitmap.IsEmpty())
 {
diff --git a/oox/source/drawingml/textfield.cxx 
b/oox/source/drawingml/textfield.cxx
index f3f8c08beabd..9311a67e44e7 100644
--- a/oox/source/drawingml/textfield.cxx
+++ b/oox/source/drawingml/textfield.cxx
@@ -48,7 +48,7 @@ TextField::TextField()
 
 namespace {
 
-/** instanciate the textfields. Because of semantics difference between
+/** instantiate the textfields. Because of semantics difference between
  * OpenXML and OpenOffice, some OpenXML field might cause two fields to be 
created.
  * @param aFields the created fields. The list is empty if no field has been 
created.
  * @param xModel the model
diff --git a/slideshow/source/engine/transitions/transitionfactorytab.cxx 
b/slideshow/source/engine/transitions/transitionfactorytab.cxx
index 760d2a7fdb4e..629474d446cb 100644
--- a/slideshow/source/engine/transitions/transitionfactorytab.cxx
+++ b/slideshow/source/engine/transitions/transitionfactorytab.cxx
@@ -58,7 +58,7 @@ static const TransitionInfo lcl_transitionInfo[] =
 1.0, // no scaling
 TransitionInfo::ReverseMethod::FlipX,
 false, // 'out' by subtraction
-false // scale isotrophically to target size
+false // scale isotropically to target size
 },
 {
 // mapped to BarWipePolyPolygon:
@@ -70,7 +70,7 @@ static const TransitionInfo lcl_transitionInfo[] =
 1.0, // no scaling
 TransitionInfo::ReverseMethod::FlipY,
 false, // 'out' by subtraction
-false // scale isotrophically to target size
+false // scale isotropically to target size
 },
 
 {
@@ -83,7 +83,7 @@ static const TransitionInfo lcl_transitionInfo[] =
 1.0, // no scaling
 TransitionInfo::ReverseMethod::FlipY,
 true, // 'out' by parameter sweep inversion
-false // scale isotrophically to target size
+false // scale isotropically to target size
 },
 {
 // mapped to BarWipePolyPolygon(nBars=5):
@@ -95,7 +95,7 @@ static const TransitionInfo lcl_transitionInfo[] =
 1.0, // no scaling
 TransitionInfo::ReverseMethod::FlipX,
 true, // 'out' by parameter sweep inversion
-false // scale isotrophically to target size
+false // scale isotropically to target size
 },
 
 {
@@ -108,7 +108,7 @@ static const TransitionInfo lcl_transitionInfo[] =
 1.0, // no scaling
 TransitionInfo::ReverseMethod::Ignore, // possible via bottomRight
 true, // 'out' by parameter sweep inversion
-false // scale isotrophically to target size
+false // scale isotropically to target size
 },
 {
 // mapped to BoxWipe:
@@ -120,7 +120,7 @@ static const TransitionInfo lcl_transitionInfo[] =
 1.0, // no scaling
 TransitionInfo::ReverseMethod::Ignore, // possible via bottomLeft
 true, // 'out' by parameter sweep inversion
-false // scale isotrophically to target size
+false // scale isotropically to target size
 },
 {
 // mapped to BoxWipe:
@@ -132,7 +132,7 @@ static const TransitionInfo lcl_transitionInfo[] =
 1.0, // no scaling
 TransitionInfo::ReverseMethod::Ignore, // possible via topLeft
 true, // 'out' by parameter sweep inversion
-false // scale isotrophically to target size
+false // scale isotropically to target size
 },
 {
 // mapped to BoxWipe:
@@ -144,7 +144,7 @@ static const TransitionInfo lcl_transitionInfo[] =
 1.0, // no scaling
 TransitionInfo::ReverseMethod::Ignore, // possible via topRight
 true, // 'out' by 

Re: Linker warning about shared_ptr on Mac, when compiling for iOS.

2017-10-19 Thread Alexander Thurgood
Le 18/10/2017 à 19:11, Jan Iversen a écrit :

Hi Jan,

FWIW, I have seen this too in the standard OSX LO build, but have so far
ignored it, as it doesn't seem to affect the build outcome or LO's
behaviour (at least not in any way that I have encountered).


Alex

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


Re: How to run multiple instances of Writer simultaneously?

2017-10-19 Thread Tor Lillqvist
> This creates a new office process


Are you sure it does? If you already have a soffice.bin running, does this
indeed start a new one, or connect to the existing one?


> desktop.terminate()
>

If there indeed is just one soffice.bin process running (this is on Windows
or Linux, right?), I suspect this will terminate it.

Also, you keep talking about "soffice process", but the real LibreOffice
process is called "soffice.bin" (on Windows and Linux; on macOS it indeed
is called "soffice"). The "soffice" (or "soffice.exe" on Windows) program
is just a thin wrapper that starts soffice.bin when necessary.

--tml
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: How to run multiple instances of Writer simultaneously?

2017-10-19 Thread Jens Tröger
Hi Mike,

That would be a good answer to have, because finding documentation on this 
topic is tricky. Here is how I currently handle this in Python:

pipe = …
p = subprocess.Popen("/…/soffice --accept='pipe,name=" + pipe + 
";url;StarOffice.ServiceManager' --headless --invisible", shell=True)
# Wait for the pipe to become available.
local = uno.getComponentContext() 
resolver = 
local.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver”,
 local)
context = resolver.resolve("uno:pipe,name=" + pipe + 
";urp;StarOffice.ComponentContext")
desktop = 
context.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop", 
context)
# Load the document
docfile = …
document = desktop.loadComponentFromURL("file://" + docfile, "_blank", 0, 
props)

This creates a new office process and open the Writer document and connects to 
it. Note the absence of the custom user installation (for performance reasons)! 
Once I’m done with it, then:

document.close(True) # or if XCloseable doesn’t exist: document.dispose()
desktop.terminate() 
 
# context.??
 
# resolver.??   
 
# local.??  
 
p.terminate()   
 

The termination of the process p seems to destroy the other running soffice 
process. Hence using custom user installations with 
-env:UserInstallation=/tmp/random-dir but that just prolongs the process 
creation noticeably!

Thanks!
Jens


> On Oct 19, 2017, at 16:48, Kaganski Mike  wrote:
> Hi,
> 
> Maybe the real question is how to close a document without forcing 
> soffice process (which is shared in your case among all open documents) 
> shutdown?
> 
> -- 
> Best regards,
> Mike Kaganski
> 

--
Jens Tröger
http://savage.light-speed.de/

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


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

2017-10-19 Thread Noel Grandin
 sc/source/ui/inc/preview.hxx  |2 +-
 sc/source/ui/view/preview.cxx |   26 --
 2 files changed, 13 insertions(+), 15 deletions(-)

New commits:
commit 0ad8447d3199e1c1d1f7d6ddabc9b4cded99c2d6
Author: Noel Grandin 
Date:   Wed Oct 18 20:50:02 2017 +0200

dyncolcontainer: convert nRight to std::vector

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

diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx
index e0f14b8f069f..4bcb5139838f 100644
--- a/sc/source/ui/inc/preview.hxx
+++ b/sc/source/ui/inc/preview.hxx
@@ -82,7 +82,7 @@ private:
 boolmbHasEmptyRangeTable:1; /// we have at least one sheet 
with empty print range (print range set to '- none -').
 
 ScRange aPageArea;
-longnRight[ MAXCOL+1 ];
+std::vector mvRight;
 longnLeftPosition;
 longmnScale;
 SCCOL   nColNumberButttonDown;
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 985a8c92adb9..077877beee44 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -134,9 +134,6 @@ ScPreview::ScPreview( vcl::Window* pParent, ScDocShell* 
pDocSh, ScPreviewShell*
 SetHelpId( HID_SC_WIN_PREVIEW );
 
 SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
-
-for (SCCOL i=0; i<=MAXCOL; i++)
-nRight[i] = 0;  // initialized with actual positions 
when markers are drawn
 }
 
 ScPreview::~ScPreview()
@@ -434,6 +431,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* 
pFillLocation )
 tools::Rectangle aRectCellPosition;
 tools::Rectangle aRectPosition;
 pLocationData->GetMainCellRange( aPageArea, aPixRect );
+mvRight.resize(aPageArea.aEnd.Col()+1);
 if( !bLayoutRTL )
 {
 pLocationData->GetCellPosition( aPageArea.aStart, 
aRectPosition );
@@ -441,7 +439,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* 
pFillLocation )
 for( SCCOL i = aPageArea.aStart.Col(); i <= 
aPageArea.aEnd.Col(); i++ )
 {
 pLocationData->GetCellPosition( ScAddress( 
i,aPageArea.aStart.Row(),aPageArea.aStart.Tab()),aRectCellPosition );
-nRight[i] = aRectCellPosition.Right();
+mvRight[i] = aRectCellPosition.Right();
 }
 }
 else
@@ -450,11 +448,11 @@ void ScPreview::DoPrint( ScPreviewLocationData* 
pFillLocation )
 nLeftPosition = aRectPosition.Right()+1;
 
 pLocationData->GetCellPosition( 
aPageArea.aStart,aRectCellPosition );
-nRight[ aPageArea.aEnd.Col() ] = aRectCellPosition.Left();
+mvRight[ aPageArea.aEnd.Col() ] = aRectCellPosition.Left();
 for( SCCOL i = aPageArea.aEnd.Col(); i > 
aPageArea.aStart.Col(); i-- )
 {
 pLocationData->GetCellPosition( ScAddress( 
i,aPageArea.aEnd.Row(),aPageArea.aEnd.Tab()),aRectCellPosition );
-nRight[ i-1 ] = nRight[ i ] + aRectCellPosition.Right() - 
aRectCellPosition.Left() + 1;
+mvRight[ i-1 ] = mvRight[ i ] + aRectCellPosition.Right() 
- aRectCellPosition.Left() + 1;
 }
 }
 }
@@ -565,8 +563,8 @@ void ScPreview::DoPrint( ScPreviewLocationData* 
pFillLocation )
 Point aColumnTop = LogicToPixel( Point( 0, -aOffset.Y() ) 
,aMMMode );
 SetLineColor( COL_BLACK );
 SetFillColor( COL_BLACK );
-DrawRect( tools::Rectangle( Point( nRight[i] - 2, 
aColumnTop.Y() ),Point( nRight[i] + 2 , 4 + aColumnTop.Y()) ));
-DrawLine( Point( nRight[i], aColumnTop.Y() ), Point( 
nRight[i],  10 + aColumnTop.Y()) );
+DrawRect( tools::Rectangle( Point( mvRight[i] - 2, 
aColumnTop.Y() ),Point( mvRight[i] + 2 , 4 + aColumnTop.Y()) ));
+DrawLine( Point( mvRight[i], aColumnTop.Y() ), Point( 
mvRight[i],  10 + aColumnTop.Y()) );
 }
 SetMapMode( aMMMode );
 }
@@ -1027,7 +1025,7 @@ void ScPreview::MouseButtonDown( const MouseEvent& rMEvt )
 SCCOL i = 0;
 for( i = aPageArea.aStart.Col(); i<= aPageArea.aEnd.Col(); i++ )
 {
-if( aNowPt.X() < nRight[i] + 2 && aNowPt.X() > nRight[i] - 2 )
+if( aNowPt.X() < mvRight[i] + 2 && aNowPt.X() > mvRight[i] - 2 )
 {
 nColNumberButttonDown = i;
 break;
@@ -1040,7 +1038,7 @@ void ScPreview::MouseButtonDown( const MouseEvent& rMEvt )
 if( nColNumberButttonDown == aPageArea.aStart.Col() )
 DrawInvert( PixelToLogic( Point( nLeftPosition, 0 ),aMMMode ).X() 
,PointerStyle::HSplit );
 else
-DrawInvert( PixelToLogic( Point( nRight[ nColNumb

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

2017-10-19 Thread Noel Grandin
 editeng/source/lookuptree/Trie.cxx |   45 +
 1 file changed, 12 insertions(+), 33 deletions(-)

New commits:
commit 856df6d40690500453092419b2c71e91e2c5de25
Author: Noel Grandin 
Date:   Wed Oct 18 11:29:15 2017 +0200

use std::unique_ptr in TrieNode

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

diff --git a/editeng/source/lookuptree/Trie.cxx 
b/editeng/source/lookuptree/Trie.cxx
index b661d6d81010..0badcd99703c 100644
--- a/editeng/source/lookuptree/Trie.cxx
+++ b/editeng/source/lookuptree/Trie.cxx
@@ -22,12 +22,10 @@ struct TrieNode final
 
 sal_Unicode mCharacter;
 boolmMarker;
-std::vector  mChildren;
-TrieNode*   mLatinArray[LATIN_ARRAY_SIZE];
-
+std::vector>  mChildren;
+std::unique_ptr mLatinArray[LATIN_ARRAY_SIZE];
 
 explicit TrieNode(sal_Unicode aCharacter = '\0');
-~TrieNode();
 
 void  markWord();
 TrieNode* findChild(sal_Unicode aCharacter);
@@ -41,26 +39,12 @@ TrieNode::TrieNode(sal_Unicode aCharacter) :
 mCharacter(aCharacter),
 mMarker(false)
 {
-for (TrieNode* & i : mLatinArray)
+for (auto & i : mLatinArray)
 {
 i = nullptr;
 }
 }
 
-TrieNode::~TrieNode()
-{
-vector::iterator iNode;
-for(iNode = mChildren.begin(); iNode != mChildren.end(); ++iNode)
-{
-delete *iNode;
-}
-
-for (TrieNode* i : mLatinArray)
-{
-delete i;
-}
-}
-
 void TrieNode::markWord()
 {
 mMarker = true;
@@ -71,11 +55,11 @@ void TrieNode::addNewChild(TrieNode* pChild)
 if (pChild->mCharacter >= 'a' &&
 pChild->mCharacter <= 'z')
 {
-mLatinArray[pChild->mCharacter - u'a'] = pChild;
+mLatinArray[pChild->mCharacter - u'a'].reset(pChild);
 }
 else
 {
-mChildren.push_back(pChild);
+mChildren.push_back(std::unique_ptr(pChild));
 }
 }
 
@@ -84,16 +68,13 @@ TrieNode* TrieNode::findChild(sal_Unicode aInputCharacter)
 if (aInputCharacter >= 'a' &&
 aInputCharacter <= 'z')
 {
-return mLatinArray[aInputCharacter - u'a'];
+return mLatinArray[aInputCharacter - u'a'].get();
 }
 
-vector::iterator iNode;
-
-for(iNode = mChildren.begin(); iNode != mChildren.end(); ++iNode)
+for(auto const & pCurrent : mChildren)
 {
-TrieNode* pCurrent = *iNode;
 if ( pCurrent->mCharacter == aInputCharacter )
-return pCurrent;
+return pCurrent.get();
 }
 
 return nullptr;
@@ -102,19 +83,17 @@ TrieNode* TrieNode::findChild(sal_Unicode aInputCharacter)
 void TrieNode::collectSuggestions(const OUString& sPath, vector& 
rSuggestionList)
 {
 // first traverse nodes for alphabet characters
-for (TrieNode* pCurrent : mLatinArray)
+for (auto const & pCurrent : mLatinArray)
 {
 if (pCurrent != nullptr)
-collectSuggestionsForCurrentNode(pCurrent, sPath, rSuggestionList);
+collectSuggestionsForCurrentNode(pCurrent.get(), sPath, 
rSuggestionList);
 }
 
 // traverse nodes for other characters
-vector::iterator iNode;
-for(iNode = mChildren.begin(); iNode != mChildren.end(); ++iNode)
+for(auto const & pCurrent : mChildren)
 {
-TrieNode* pCurrent = *iNode;
 if (pCurrent != nullptr)
-collectSuggestionsForCurrentNode(pCurrent, sPath, rSuggestionList);
+collectSuggestionsForCurrentNode(pCurrent.get(), sPath, 
rSuggestionList);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: config_host/config_gpgme.h.in configure.ac xmlsecurity/source

2017-10-19 Thread David Tardon
 config_host/config_gpgme.h.in  |   16 
 configure.ac   |2 ++
 xmlsecurity/source/gpg/CertificateImpl.cxx |9 +++--
 3 files changed, 25 insertions(+), 2 deletions(-)

New commits:
commit 8c9cfba67711d0c3902f9bba444b68c7415d4f98
Author: David Tardon 
Date:   Thu Oct 19 09:04:33 2017 +0200

fix build with system gpgme

Change-Id: I00e6d6ce476adbd22bcfb4eb55d4db4194f4bc92

diff --git a/config_host/config_gpgme.h.in b/config_host/config_gpgme.h.in
new file mode 100644
index ..50f9edd8f8a0
--- /dev/null
+++ b/config_host/config_gpgme.h.in
@@ -0,0 +1,16 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * 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/.
+ */
+
+/* Configuration for gpgme++.
+ */
+
+// Defined if gpgme supports exporting minimal key.
+#define GPGME_CAN_EXPORT_MINIMAL_KEY 0
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configure.ac b/configure.ac
index 85b603060e3a..335d7de9334a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10242,6 +10242,7 @@ if test "$_os" = "Linux"; then
 else
 AC_MSG_RESULT([internal])
 BUILD_TYPE="$BUILD_TYPE LIBGPGERROR LIBASSUAN GPGMEPP"
+AC_DEFINE([GPGME_CAN_EXPORT_MINIMAL_KEY])
 
 GPG_ERROR_CFLAGS="-I${WORKDIR}/UnpackedTarball/libgpg-error/src"
 GPG_ERROR_LIBS="-L${WORKDIR}/UnpackedTarball/libgpg-error/src/.libs 
-lgpg-error"
@@ -12353,6 +12354,7 @@ AC_CONFIG_HEADERS([config_host/config_firebird.h])
 AC_CONFIG_HEADERS([config_host/config_folders.h])
 AC_CONFIG_HEADERS([config_host/config_gio.h])
 AC_CONFIG_HEADERS([config_host/config_global.h])
+AC_CONFIG_HEADERS([config_host/config_gpgme.h])
 AC_CONFIG_HEADERS([config_host/config_java.h])
 AC_CONFIG_HEADERS([config_host/config_lgpl.h])
 AC_CONFIG_HEADERS([config_host/config_libepubgen.h])
diff --git a/xmlsecurity/source/gpg/CertificateImpl.cxx 
b/xmlsecurity/source/gpg/CertificateImpl.cxx
index 6d06b24c3a2a..16eeda80441f 100644
--- a/xmlsecurity/source/gpg/CertificateImpl.cxx
+++ b/xmlsecurity/source/gpg/CertificateImpl.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+
 #include "CertificateImpl.hxx"
 
 #include 
@@ -215,8 +217,11 @@ void CertificateImpl::setCertificate(GpgME::Context* ctx, 
const GpgME::Key& key)
 ctx->setArmor(false); // caller will base64-encode anyway
 GpgME::Error err = ctx->exportPublicKeys(
 key.primaryFingerprint(),
-data_out,
-officecfg::Office::Common::Security::OpenPGP::MinimalKeyExport::get());
+data_out
+#if GPGME_CAN_EXPORT_MINIMAL_KEY
+, officecfg::Office::Common::Security::OpenPGP::MinimalKeyExport::get()
+#endif
+);
 
 if (err)
 throw RuntimeException("The GpgME library failed to retrieve the 
public key");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits