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

2016-09-27 Thread Noel Grandin
 editeng/source/editeng/editattr.cxx |   10 +++
 editeng/source/editeng/editattr.hxx |2 +
 editeng/source/editeng/editdoc.cxx  |   51 
 editeng/source/editeng/editdoc.hxx  |9 +-
 editeng/source/editeng/editobj.cxx  |   14 +
 editeng/source/editeng/impedit4.cxx |   40 +---
 6 files changed, 104 insertions(+), 22 deletions(-)

New commits:
commit 5af110e20bbf3df91750e1173382ef442476603f
Author: Noel Grandin 
Date:   Tue Sep 27 13:52:00 2016 +0200

variable name and indentation improvement

Change-Id: Ia3a97b08e1280e3665a56cdbb25ad07687dc7040

diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index d30d025..c994c40 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1222,18 +1222,18 @@ EditSelection ImpEditEngine::InsertTextObject( const 
EditTextObject& rTextObject
 bUsePortionInfo = true;
 }
 
-bool bConvertItems = false;
+bool bConvertMetricOfItems = false;
 MapUnit eSourceUnit = MapUnit(), eDestUnit = MapUnit();
 if (rTextObject.mpImpl->HasMetric())
 {
 eSourceUnit = (MapUnit)rTextObject.mpImpl->GetMetric();
 eDestUnit = (MapUnit)aEditDoc.GetItemPool().GetMetric( DEF_METRIC );
 if ( eSourceUnit != eDestUnit )
-bConvertItems = true;
+bConvertMetricOfItems = true;
 }
 
 // Before, paragraph count was of type sal_uInt16 so if nContents exceeded
-// 0x this wouldn't had worked anyway, given that nPara is used to
+// 0x this wouldn't have worked anyway, given that nPara is used to
 // number paragraphs and is fearlessly incremented.
 sal_Int32 nContents = 
static_cast(rTextObject.mpImpl->GetContents().size());
 SAL_WARN_IF( nContents < 0, "editeng", "ImpEditEngine::InsertTextObject - 
contents overflow " << nContents);
@@ -1271,7 +1271,7 @@ EditSelection ImpEditEngine::InsertTextObject( const 
EditTextObject& rTextObject
 // already in the flow
 DBG_ASSERT( rX.GetEnd() <= aPaM.GetNode()->Len(), 
"InsertBinTextObject: Attribute too large!" );
 EditCharAttrib* pAttr;
-if ( !bConvertItems )
+if ( !bConvertMetricOfItems )
 pAttr = MakeCharAttrib( aEditDoc.GetItemPool(), 
*(rX.GetItem()), rX.GetStart()+nStartPos, rX.GetEnd()+nStartPos );
 else
 {
@@ -1307,24 +1307,22 @@ EditSelection ImpEditEngine::InsertTextObject( const 
EditTextObject& rTextObject
 bool bParaAttribs = false;
 if ( bNewContent || ( ( n > 0 ) && ( n < (nContents-1) ) ) )
 {
+// only style and ParaAttribs when new paragraph, or
+// completely internal ...
+bParaAttribs = pC->GetParaAttribs().Count() != 0;
+if ( GetStyleSheetPool() && pC->GetStyle().getLength() )
 {
-// only style and ParaAttribs when new paragraph, or
-// completely internal ...
-bParaAttribs = pC->GetParaAttribs().Count() != 0;
-if ( GetStyleSheetPool() && pC->GetStyle().getLength() )
-{
-SfxStyleSheet* pStyle = 
static_cast(GetStyleSheetPool()->Find( pC->GetStyle(), 
pC->GetFamily() ));
-DBG_ASSERT( pStyle, "InsertBinTextObject - Style not 
found!" );
-SetStyleSheet( nPara, pStyle );
-}
-if ( !bConvertItems )
-SetParaAttribs( aEditDoc.GetPos( aPaM.GetNode() ), 
pC->GetParaAttribs() );
-else
-{
-SfxItemSet aAttribs( GetEmptyItemSet() );
-ConvertAndPutItems( aAttribs, pC->GetParaAttribs(), 
&eSourceUnit, &eDestUnit );
-SetParaAttribs( aEditDoc.GetPos( aPaM.GetNode() ), 
aAttribs );
-}
+SfxStyleSheet* pStyle = 
static_cast(GetStyleSheetPool()->Find( pC->GetStyle(), 
pC->GetFamily() ));
+DBG_ASSERT( pStyle, "InsertBinTextObject - Style not found!" );
+SetStyleSheet( nPara, pStyle );
+}
+if ( !bConvertMetricOfItems )
+SetParaAttribs( aEditDoc.GetPos( aPaM.GetNode() ), 
pC->GetParaAttribs() );
+else
+{
+SfxItemSet aAttribs( GetEmptyItemSet() );
+ConvertAndPutItems( aAttribs, pC->GetParaAttribs(), 
&eSourceUnit, &eDestUnit );
+SetParaAttribs( aEditDoc.GetPos( aPaM.GetNode() ), aAttribs );
 }
 if ( bNewContent && bUsePortionInfo )
 {
commit 678bdd064af207a7b90e3e44d652eb59be7db61f
Author: Noel Grandin 
Date:   Tue Sep 27 13:51:40 2016 +0200

extend dumpAsXml to EditDoc

Change-Id: I71464b20c5897a2af3b4069f7f0963ef55dcd8c4

diff

[Libreoffice-commits] core.git: offapi/com officecfg/files.mk officecfg/registry postprocess/CustomTarget_registry.mk

2016-09-27 Thread Stephan Bergmann
 offapi/com/sun/star/util/PathSubstitution.idl|5 
 officecfg/files.mk   |1 
 officecfg/registry/schema/org/openoffice/Office/Substitution.xcs |   78 
--
 postprocess/CustomTarget_registry.mk |1 
 4 files changed, 1 insertion(+), 84 deletions(-)

New commits:
commit 62b2d8ff356e7ac74dc0a66f1630e704af270356
Author: Stephan Bergmann 
Date:   Wed Sep 28 08:22:58 2016 +0200

tdf#102630: [API CHANGE] Remove /org.openoffice.Office/Substitution tree

...from configuration (see issue for details).  Also, remove mention of that
configuration tree from the documentation of the css.util.PathSubstitution 
UNO
service.

Change-Id: Ia0373bc7d19e650b7954b7dbb934a578c96fcab5

diff --git a/offapi/com/sun/star/util/PathSubstitution.idl 
b/offapi/com/sun/star/util/PathSubstitution.idl
index da82700..4d71971 100644
--- a/offapi/com/sun/star/util/PathSubstitution.idl
+++ b/offapi/com/sun/star/util/PathSubstitution.idl
@@ -35,10 +35,7 @@ module com {  module sun {  module star {  module  util {
 Path variables are not case sensitive and are always provided as a 
UCB-compliant URLs
 (for example: "file:///c:/temp" or "file:///usr/install"). This is 
mandatory to support an
 optional remote file system.
-A user defined list of path variables is supported. This list is 
stored in the Office
-configuration file (org/openoffice/Office/Substitution.xml). Please 
have a look at the
-schema definition file which configuration structure this file 
uses.
-There is also a set of variables that have pre-defined values:
+There is a set of variables that have pre-defined values:
 
 
 \$(inst)
diff --git a/officecfg/files.mk b/officecfg/files.mk
index adbce6b..4e34aef 100644
--- a/officecfg/files.mk
+++ b/officecfg/files.mk
@@ -47,7 +47,6 @@ officecfg_XCSFILES := \
 Office/ReportDesign \
 Office/Scripting \
 Office/Security \
-Office/Substitution \
 Office/TabBrowse \
 Office/TableWizard \
 Office/TypeDetection \
diff --git a/officecfg/registry/schema/org/openoffice/Office/Substitution.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Substitution.xcs
deleted file mode 100644
index 82333e4..000
--- a/officecfg/registry/schema/org/openoffice/Office/Substitution.xcs
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-http://openoffice.org/2001/registry"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; oor:name="Substitution" 
oor:package="org.openoffice.Office" xml:lang="en-US">
-  
-Stores rules for user-defined path variables called SharePoint. 
These rules are evaluated when a user-defined path variable must be substituted 
with a real path.
-  
-  
-
-  
-Maps a share point to an existing path or to another share point 
defined in the Directory property.
-  
-  
-
-  Specifies a physical directory location that is stored as a 
valid encoded file URL or with other path variables.
-
-  
-  
-
-  Specifies the operating system required for this share point 
mapping. As a result, system dependent settings can be defined.
-
-
-  
-Specifies the operating system required for this share point 
mapping. As a result, system dependent settings can be defined.
-  
-
-
-  
-Specifies the name of the host for which the Directory 
property setting is valid. You can use the '*' wildcard for the name.
-  
-
-
-  
-Specifies the dns domain for which the Directory property 
variable is valid. You can use the '*' wildcard for the domain.
-  
-
-
-  
-Specifies the yellow pages or NIS domain for which the 
Directory property variable is valid. You can use the '*' wildcard for the 
name.
-  
-
-
-  
-Specifies the NT domain for which the Directory property 
variable is valid. You can use the '*' wildcard for the domain.
-  
-
-  
-
-
-  
-Specifies the path variable name. The name is case-sensitive and 
must be defined with ASCII characters. The name is used as a placeholder within 
path settings and can be substituted during runtime with a path defined in one 
of the defined mappings.
-  
-
-  
-  
-
-  
-Specifies a table of SharePoints that are used as path variables 
(placeholder) within path settings.
-  
-
-  
-
diff --git a/postprocess/CustomTarget_registry.mk 
b/postprocess/CustomTarget_registry.mk
index b472323..5fa06e6 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -159,7 +159,6 @@ postprocess_FILES_main := \
$(postprocess_XCS)/Office/Recovery.xcs \
  

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

2016-09-27 Thread Jaskaran Singh
 sc/source/filter/inc/orcusinterface.hxx |1 +
 sc/source/filter/orcus/interface.cxx|7 +--
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 43e9abd29cc3a9246a3d2789024c6c252974c9e3
Author: Jaskaran Singh 
Date:   Tue Sep 27 20:52:25 2016 +0530

Add functionality to set parent cell style

Change-Id: I829a39f5b013f14a867c509052a5719a878a3a81
Reviewed-on: https://gerrit.libreoffice.org/29325
Tested-by: Jenkins 
Reviewed-by: Jaskaran singh 

diff --git a/sc/source/filter/inc/orcusinterface.hxx 
b/sc/source/filter/inc/orcusinterface.hxx
index e467b85..28b214d 100644
--- a/sc/source/filter/inc/orcusinterface.hxx
+++ b/sc/source/filter/inc/orcusinterface.hxx
@@ -366,6 +366,7 @@ private:
 struct cell_style
 {
 OUString maName;
+OUString maParentName;
 size_t mnXFId;
 size_t mnBuiltInId;
 
diff --git a/sc/source/filter/orcus/interface.cxx 
b/sc/source/filter/orcus/interface.cxx
index a94b6f7..8b08c1b 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -947,6 +947,7 @@ ScOrcusStyles::xf::xf():
 }
 
 ScOrcusStyles::cell_style::cell_style():
+maParentName("Default"),
 mnXFId(0),
 mnBuiltInId(0)
 {
@@ -1550,9 +1551,10 @@ void ScOrcusStyles::set_cell_style_builtin(size_t index)
 maCurrentCellStyle.mnBuiltInId = index;
 }
 
-void ScOrcusStyles::set_cell_style_parent_name(const char* /*s*/, size_t /*n*/)
+void ScOrcusStyles::set_cell_style_parent_name(const char* s, size_t n)
 {
-// place holder
+OUString aParentName(s, n, RTL_TEXTENCODING_UTF8);
+maCurrentCellStyle.maParentName = aParentName;
 }
 
 size_t ScOrcusStyles::commit_cell_style()
@@ -1570,6 +1572,7 @@ size_t ScOrcusStyles::commit_cell_style()
 
 ScStyleSheetPool* pPool = mrDoc.GetStyleSheetPool();
 SfxStyleSheetBase& rBase = pPool->Make(maCurrentCellStyle.maName, 
SfxStyleFamily::Para);
+rBase.SetParent(maCurrentCellStyle.maParentName);
 SfxItemSet& rSet = rBase.GetItemSet();
 
 xf& rXf = maCellStyleXfs[maCurrentCellStyle.mnXFId];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/ChildSession.cpp loolwsd/LOOLSession.hpp

2016-09-27 Thread Ashod Nakashian
 loolwsd/ChildSession.cpp |  167 +--
 loolwsd/LOOLSession.hpp  |6 +
 2 files changed, 97 insertions(+), 76 deletions(-)

New commits:
commit 71dfb9f7b73f6e87a6dd9cd928560522fc6a6b1f
Author: Ashod Nakashian 
Date:   Tue Sep 27 22:05:02 2016 -0400

loolwsd: localise locking in ChildSession

Avoid using the static mutex and instead use
the loKitDocument mutex when accessing the
latter. The static mutex is used only when
accessing the document manager. That is,
only when loading and unloading a document.

For ChildSession members that may
be accessed from both the callback and
incoming web-socket, guard them with the
member mutex.

Finally, move any local data manipulation
outside of locks altogether.

Change-Id: I046906bc6ed7e0b38c309f97836b38e27f9bfc8e
Reviewed-on: https://gerrit.libreoffice.org/29336
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/ChildSession.cpp b/loolwsd/ChildSession.cpp
index 094de82..b1556a5 100644
--- a/loolwsd/ChildSession.cpp
+++ b/loolwsd/ChildSession.cpp
@@ -345,10 +345,6 @@ bool ChildSession::sendFontRendering(const char* 
/*buffer*/, int /*length*/, Str
 return false;
 }
 
-std::unique_lock lock(Mutex);
-
-_loKitDocument->setView(_viewId);
-
 URI::decode(font, decodedFont);
 std::string response = "renderfont: " + Poco::cat(std::string(" "), 
tokens.begin() + 1, tokens.end()) + "\n";
 
@@ -358,7 +354,16 @@ bool ChildSession::sendFontRendering(const char* 
/*buffer*/, int /*length*/, Str
 
 Timestamp timestamp;
 int width, height;
-unsigned char* ptrFont = _loKitDocument->renderFont(decodedFont.c_str(), 
&width, &height);
+unsigned char* ptrFont = nullptr;
+
+{
+auto lock(_loKitDocument->getLock());
+
+_loKitDocument->setView(_viewId);
+
+ptrFont = _loKitDocument->renderFont(decodedFont.c_str(), &width, 
&height);
+}
+
 Log::trace("renderFont [" + font + "] rendered in " + 
std::to_string(timestamp.elapsed()/1000.) + "ms");
 
 if (!ptrFont ||
@@ -374,11 +379,15 @@ bool ChildSession::sendFontRendering(const char* 
/*buffer*/, int /*length*/, Str
 
 bool ChildSession::getStatus(const char* /*buffer*/, int /*length*/)
 {
-std::unique_lock lock(Mutex);
+std::string status;
+{
+auto lock(_loKitDocument->getLock());
 
-_loKitDocument->setView(_viewId);
+_loKitDocument->setView(_viewId);
+
+status = LOKitHelper::documentStatus(_loKitDocument->get());
+}
 
-const auto status = LOKitHelper::documentStatus(_loKitDocument->get());
 if (status.empty())
 {
 Log::error("Failed to get document status.");
@@ -399,7 +408,7 @@ bool ChildSession::getCommandValues(const char* /*buffer*/, 
int /*length*/, Stri
 return false;
 }
 
-std::unique_lock lock(Mutex);
+auto lock(_loKitDocument->getLock());
 
 _loKitDocument->setView(_viewId);
 
@@ -427,11 +436,14 @@ bool ChildSession::getCommandValues(const char* 
/*buffer*/, int /*length*/, Stri
 
 bool ChildSession::getPartPageRectangles(const char* /*buffer*/, int 
/*length*/)
 {
-std::unique_lock lock(Mutex);
+char* partPage = nullptr;
+{
+auto lock(_loKitDocument->getLock());
 
-_loKitDocument->setView(_viewId);
+_loKitDocument->setView(_viewId);
+partPage = _loKitDocument->getPartPageRectangles();
+}
 
-char* partPage = _loKitDocument->getPartPageRectangles();
 sendTextFrame("partpagerectangles: " + std::string(partPage));
 std::free(partPage);
 return true;
@@ -451,7 +463,7 @@ bool ChildSession::clientZoom(const char* /*buffer*/, int 
/*length*/, StringToke
 return false;
 }
 
-std::unique_lock lock(Mutex);
+auto lock(_loKitDocument->getLock());
 
 _loKitDocument->setView(_viewId);
 
@@ -476,7 +488,7 @@ bool ChildSession::clientVisibleArea(const char* 
/*buffer*/, int /*length*/, Str
 return false;
 }
 
-std::unique_lock lock(Mutex);
+auto lock(_loKitDocument->getLock());
 
 _loKitDocument->setView(_viewId);
 
@@ -513,11 +525,13 @@ bool ChildSession::downloadAs(const char* /*buffer*/, int 
/*length*/, StringToke
 const Poco::Path filenameParam(name);
 const auto url = JAILED_DOCUMENT_ROOT + tmpDir + "/" + 
filenameParam.getFileName();
 
-std::unique_lock lock(Mutex);
+{
+auto lock(_loKitDocument->getLock());
 
-_loKitDocument->saveAs(url.c_str(),
-format.size() == 0 ? nullptr :format.c_str(),
-filterOptions.size() == 0 ? nullptr : filterOptions.c_str());
+_loKitDocument->saveAs(url.c_str(),
+format.size() == 0 ? nullptr :format.c_str(),
+filterOptions.size() == 0 ? nullptr : filterOptions.c_str());
+}
 
 sendTextFrame("downloadas: jail=" + _jailId + " dir=" + tmpDir + " name=" 
+ name +
   " port=" + std::

[Libreoffice-commits] online.git: loolwsd/LOOLSession.cpp

2016-09-27 Thread Ashod Nakashian
 loolwsd/LOOLSession.cpp |   32 +---
 1 file changed, 17 insertions(+), 15 deletions(-)

New commits:
commit dfeae15038e29197abc26caed1fc237c3b8dabab
Author: Ashod Nakashian 
Date:   Tue Sep 27 22:04:13 2016 -0400

loolwsd: accessing the WS should be thread-safe

Change-Id: I490e9b720024b93099ca63d66e840db2c1931720
Reviewed-on: https://gerrit.libreoffice.org/29335
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLSession.cpp b/loolwsd/LOOLSession.cpp
index 6b37618..1af3ddb 100644
--- a/loolwsd/LOOLSession.cpp
+++ b/loolwsd/LOOLSession.cpp
@@ -66,7 +66,9 @@ LOOLSession::LOOLSession(const std::string& id, const Kind 
kind,
 {
 // Only a post request can have a null ws.
 if (_kind != Kind::ToClient)
-assert(_ws);
+{
+assert(_ws && "Expected valid web-socket but got null.");
+}
 }
 
 LOOLSession::~LOOLSession()
@@ -75,18 +77,18 @@ LOOLSession::~LOOLSession()
 
 bool LOOLSession::sendTextFrame(const char* buffer, const int length)
 {
-if (!_ws || _ws->poll(Poco::Timespan(0), Socket::SelectMode::SELECT_ERROR))
-{
-Log::error(getName() + ": Bad socket while sending [" + 
getAbbreviatedMessage(buffer, length) + "].");
-return false;
-}
-
 Log::trace(getName() + ": Send: " + getAbbreviatedMessage(buffer, length));
 try
 {
 std::unique_lock lock(_mutex);
 
-if ( length > SMALL_MESSAGE_SIZE )
+if (!_ws || _ws->poll(Poco::Timespan(0), 
Socket::SelectMode::SELECT_ERROR))
+{
+Log::error(getName() + ": Bad socket while sending [" + 
getAbbreviatedMessage(buffer, length) + "].");
+return false;
+}
+
+if (length > SMALL_MESSAGE_SIZE)
 {
 const std::string nextmessage = "nextmessage: size=" + 
std::to_string(length);
 _ws->sendFrame(nextmessage.data(), nextmessage.size());
@@ -107,18 +109,18 @@ bool LOOLSession::sendTextFrame(const char* buffer, const 
int length)
 
 bool LOOLSession::sendBinaryFrame(const char *buffer, int length)
 {
-if (!_ws || _ws->poll(Poco::Timespan(0), Socket::SelectMode::SELECT_ERROR))
-{
-Log::error(getName() + ": Bad socket while sending binary frame of " + 
std::to_string(length) + " bytes.");
-return false;
-}
-
 Log::trace(getName() + ": Send: " + std::to_string(length) + " bytes");
 try
 {
 std::unique_lock lock(_mutex);
 
-if ( length > SMALL_MESSAGE_SIZE )
+if (!_ws || _ws->poll(Poco::Timespan(0), 
Socket::SelectMode::SELECT_ERROR))
+{
+Log::error(getName() + ": Bad socket while sending binary frame of 
" + std::to_string(length) + " bytes.");
+return false;
+}
+
+if (length > SMALL_MESSAGE_SIZE)
 {
 const std::string nextmessage = "nextmessage: size=" + 
std::to_string(length);
 _ws->sendFrame(nextmessage.data(), nextmessage.size());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/LOOLSession.hpp

2016-09-27 Thread Ashod Nakashian
 loolwsd/LOOLSession.hpp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4c7b015b68f6942d994d3351c1594fd29580dad1
Author: Ashod Nakashian 
Date:   Tue Sep 27 21:17:55 2016 -0400

loolwsd: use atomics for potentially shared flags

Change-Id: I36e34159cca24e2c3d99eaf4d4f36f3e008cb6ce
Reviewed-on: https://gerrit.libreoffice.org/29334
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLSession.hpp b/loolwsd/LOOLSession.hpp
index 79b4e1a..b745226 100644
--- a/loolwsd/LOOLSession.hpp
+++ b/loolwsd/LOOLSession.hpp
@@ -146,9 +146,9 @@ private:
 std::shared_ptr _ws;
 
 /// True if we have been disconnected.
-bool _disconnected;
+std::atomic _disconnected;
 /// True if the user is active, otherwise false (switched tabs).
-bool _isActive;
+std::atomic _isActive;
 
 std::chrono::steady_clock::time_point _lastActivityTime;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-27 Thread Kohei Yoshida
 dev/null |binary
 sc/qa/unit/data/xlsx/pivot-table/shared-group-field.xlsx |binary
 sc/qa/unit/subsequent_filters-test.cxx   |   17 +--
 3 files changed, 15 insertions(+), 2 deletions(-)

New commits:
commit 3d9231dd4945dcd6c3d53ba11152049d382b975f
Author: Kohei Yoshida 
Date:   Tue Sep 27 22:11:18 2016 -0400

Add a bit more checking on the internal pivot table states.

Change-Id: I8be8f510cecab8ec8aa07f2f81795bbfdf727a26

diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index 7f8b614..8ef4a8c 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -2070,7 +2070,6 @@ void ScFiltersTest::testPivotTableSharedGroupXLSX()
 ScDocShellRef xDocSh = loadDoc("pivot-table/shared-group-field.", 
FORMAT_XLSX);
 CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.Is());
 ScDocument& rDoc = xDocSh->GetDocument();
-rDoc.CalcAll();
 
 // Check whether right group names are imported for both tables
 // First table
@@ -2089,6 +2088,20 @@ void ScFiltersTest::testPivotTableSharedGroupXLSX()
 CPPUNIT_ASSERT_EQUAL(OUString("17"), rDoc.GetString(ScAddress(0,16,0)));
 CPPUNIT_ASSERT_EQUAL(OUString("18"), rDoc.GetString(ScAddress(0,17,0)));
 
+// There should be exactly 2 pivot tables and 1 cache.
+ScDPCollection* pDPs = rDoc.GetDPCollection();
+CPPUNIT_ASSERT_EQUAL(static_cast(2), pDPs->GetCount());
+
+ScDPCollection::SheetCaches& rSheetCaches = pDPs->GetSheetCaches();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), rSheetCaches.size());
+
+const ScDPCache* pCache = 
rSheetCaches.getExistingCache(ScRange(0,0,1,13,18,1));
+CPPUNIT_ASSERT_MESSAGE("Pivot cache is expected for A1:N19 on the second 
sheet.", pCache);
+CPPUNIT_ASSERT_EQUAL(static_cast(14), pCache->GetFieldCount());
+
+// TODO : Look into this and find out why it fails.
+// CPPUNIT_ASSERT_EQUAL(static_cast(1), 
pCache->GetGroupFieldCount());
+
 xDocSh->DoClose();
 }
 
commit 57d925dede88d870a20f6ec469a26bf6961658ce
Author: Kohei Yoshida 
Date:   Tue Sep 27 21:18:22 2016 -0400

Let's keep the naming style of test document consistent.

Change-Id: Ib832509bc4c4daa5eddb9a8e1a341a5892436455

diff --git a/sc/qa/unit/data/xlsx/pivot-table/shared_group.xlsx 
b/sc/qa/unit/data/xlsx/pivot-table/shared-group-field.xlsx
similarity index 100%
rename from sc/qa/unit/data/xlsx/pivot-table/shared_group.xlsx
rename to sc/qa/unit/data/xlsx/pivot-table/shared-group-field.xlsx
diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index 3195fa8..7f8b614 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -2067,7 +2067,7 @@ void ScFiltersTest::testGetPivotDataXLS()
 
 void ScFiltersTest::testPivotTableSharedGroupXLSX()
 {
-ScDocShellRef xDocSh = loadDoc("pivot-table/shared_group.", FORMAT_XLSX);
+ScDocShellRef xDocSh = loadDoc("pivot-table/shared-group-field.", 
FORMAT_XLSX);
 CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.Is());
 ScDocument& rDoc = xDocSh->GetDocument();
 rDoc.CalcAll();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Looking for partner in evaluation project of an LO-based automated user interface

2016-09-27 Thread aptares
Hi all,

 

YOU - have an automated routine (JAVA / Cpp) which requires data processing in a document for intermediate or final storage and are ready and have ressources to test what we provide you

WE  - will provide you with a dynamic link library which processes your data into a document format for further use or final storage according your needs (to be defined).

 


GOAL: Production of a running routine for evaluation and present evaluation experiences and results, e.g. in an open source / libreoffice event.


REQUIRED STEPS:

  --  definition of interface and document outcome / use (BOTH)

  --  coding of DLL (WE)

  --  implementation and testing of DLL (YOU)

  --  publishing of evaluation results (BOTH)

 

Interested parties please send contact per PM. 

 

Kind regards

Andy
 

 

 

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


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

2016-09-27 Thread Eike Rathke
 sc/source/core/data/bcaslot.cxx |   12 +++-
 sc/source/core/inc/bcaslot.hxx  |2 +-
 2 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit b325f332409ec72d8c5906c64d635e9f083ebfdd
Author: Eike Rathke 
Date:   Tue Sep 27 21:55:45 2016 +0200

sc-perf: remove one more unnecessary call to TrackFormulas()

... when leaving bulk broadcast.

Change-Id: I3d456094ecc7759ed3e58af7901d544126c30b27

diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 2051f2c..3689062 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -1098,10 +1098,12 @@ void ScBroadcastAreaSlotMachine::LeaveBulkBroadcast()
 if (--nInBulkBroadcast == 0)
 {
 ScBroadcastAreasBulk().swap( aBulkBroadcastAreas);
-BulkBroadcastGroupAreas();
+bool bBroadcasted = BulkBroadcastGroupAreas();
 // Trigger the "final" tracking.
 if (pDoc->IsTrackFormulasPending())
 pDoc->FinalTrackFormulas();
+else if (bBroadcasted)
+pDoc->TrackFormulas();
 }
 }
 }
@@ -1125,10 +1127,10 @@ void ScBroadcastAreaSlotMachine::InsertBulkGroupArea( 
ScBroadcastArea* pArea, co
 pSet->set(rRange, true);
 }
 
-void ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas()
+bool ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas()
 {
 if (m_BulkGroupAreas.empty())
-return;
+return false;
 
 sc::BulkDataHint aHint(*pDoc);
 
@@ -1156,8 +1158,8 @@ void ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas()
 }
 
 m_BulkGroupAreas.clear();
-if (bBroadcasted)
-pDoc->TrackFormulas();
+
+return bBroadcasted;
 }
 
 size_t ScBroadcastAreaSlotMachine::RemoveBulkArea( const ScBroadcastArea* 
pArea )
diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx
index a7d020b..9ff6b97 100644
--- a/sc/source/core/inc/bcaslot.hxx
+++ b/sc/source/core/inc/bcaslot.hxx
@@ -323,7 +323,7 @@ public:
 
 void InsertBulkGroupArea( ScBroadcastArea* pArea, const ScRange& rRange );
 void RemoveBulkGroupArea( ScBroadcastArea* pArea );
-void BulkBroadcastGroupAreas();
+bool BulkBroadcastGroupAreas();
 
 /// @return: how many removed
 size_t  RemoveBulkArea( const ScBroadcastArea* p );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-27 Thread Tamás Zolnai
 sc/qa/unit/data/xlsx/pivot-table/shared_group.xlsx |binary
 sc/qa/unit/subsequent_filters-test.cxx |   29 +
 2 files changed, 29 insertions(+)

New commits:
commit 049d2ffd329f88934a92b72e4ec650ea46bf8c61
Author: Tamás Zolnai 
Date:   Wed Sep 28 07:38:22 2016 +0200

Test the case for pivot tables sharing a group

Fixed with 3b64a198568d5b2bb14066581aca112cc6182fd7

Change-Id: Ideea06ea95f6c565e1487f2b27ef249c38c5d4dd

diff --git a/sc/qa/unit/data/xlsx/pivot-table/shared_group.xlsx 
b/sc/qa/unit/data/xlsx/pivot-table/shared_group.xlsx
new file mode 100644
index 000..2bc5cdd
Binary files /dev/null and b/sc/qa/unit/data/xlsx/pivot-table/shared_group.xlsx 
differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index 4b53e2d..3195fa8 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -200,6 +200,7 @@ public:
 void testPivotTableNamedRangeSourceODS();
 void testPivotTableSharedCacheGroupODS();
 void testGetPivotDataXLS();
+void testPivotTableSharedGroupXLSX();
 
 void testFormulaDependency();
 
@@ -305,6 +306,7 @@ public:
 CPPUNIT_TEST(testPivotTableNamedRangeSourceODS);
 CPPUNIT_TEST(testPivotTableSharedCacheGroupODS);
 CPPUNIT_TEST(testGetPivotDataXLS);
+CPPUNIT_TEST(testPivotTableSharedGroupXLSX);
 CPPUNIT_TEST(testRowHeightODS);
 CPPUNIT_TEST(testFormulaDependency);
 CPPUNIT_TEST(testRichTextContentODS);
@@ -2063,6 +2065,33 @@ void ScFiltersTest::testGetPivotDataXLS()
 xDocSh->DoClose();
 }
 
+void ScFiltersTest::testPivotTableSharedGroupXLSX()
+{
+ScDocShellRef xDocSh = loadDoc("pivot-table/shared_group.", FORMAT_XLSX);
+CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.Is());
+ScDocument& rDoc = xDocSh->GetDocument();
+rDoc.CalcAll();
+
+// Check whether right group names are imported for both tables
+// First table
+CPPUNIT_ASSERT_EQUAL(OUString("Csoport1"), 
rDoc.GetString(ScAddress(0,2,0)));
+CPPUNIT_ASSERT_EQUAL(OUString("Csoport2"), 
rDoc.GetString(ScAddress(0,3,0)));
+CPPUNIT_ASSERT_EQUAL(OUString("Csoport3"), 
rDoc.GetString(ScAddress(0,4,0)));
+CPPUNIT_ASSERT_EQUAL(OUString("16"), rDoc.GetString(ScAddress(0,5,0)));
+CPPUNIT_ASSERT_EQUAL(OUString("17"), rDoc.GetString(ScAddress(0,6,0)));
+CPPUNIT_ASSERT_EQUAL(OUString("18"), rDoc.GetString(ScAddress(0,7,0)));
+
+// Second table
+CPPUNIT_ASSERT_EQUAL(OUString("Csoport1"), 
rDoc.GetString(ScAddress(0,12,0)));
+CPPUNIT_ASSERT_EQUAL(OUString("Csoport2"), 
rDoc.GetString(ScAddress(0,13,0)));
+CPPUNIT_ASSERT_EQUAL(OUString("Csoport3"), 
rDoc.GetString(ScAddress(0,14,0)));
+CPPUNIT_ASSERT_EQUAL(OUString("16"), rDoc.GetString(ScAddress(0,15,0)));
+CPPUNIT_ASSERT_EQUAL(OUString("17"), rDoc.GetString(ScAddress(0,16,0)));
+CPPUNIT_ASSERT_EQUAL(OUString("18"), rDoc.GetString(ScAddress(0,17,0)));
+
+xDocSh->DoClose();
+}
+
 void ScFiltersTest::testRowHeightODS()
 {
 ScDocShellRef xDocSh = loadDoc("row-height-import.", FORMAT_ODS);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] test-files.git: loperf_suites/calc loperf_suites/calc_suite.cfg loperf/tdf102694.xlsx

2016-09-27 Thread Tamás Zolnai
 loperf/tdf102694.xlsx|binary
 loperf_suites/calc/tdf102694.cfg |2 ++
 loperf_suites/calc_suite.cfg |2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 0dad6217ad3772f0b8f4afb1f6d8d246c6ce6f76
Author: Tamás Zolnai 
Date:   Wed Sep 28 07:16:07 2016 +0200

Add performance test for tdf#102694

diff --git a/loperf/tdf102694.xlsx b/loperf/tdf102694.xlsx
new file mode 100644
index 000..2bc5cdd
Binary files /dev/null and b/loperf/tdf102694.xlsx differ
diff --git a/loperf_suites/calc/tdf102694.cfg b/loperf_suites/calc/tdf102694.cfg
new file mode 100644
index 000..17dad87
--- /dev/null
+++ b/loperf_suites/calc/tdf102694.cfg
@@ -0,0 +1,2 @@
+test_doc="tdf102694.xlsx"
+test_actions="load"
diff --git a/loperf_suites/calc_suite.cfg b/loperf_suites/calc_suite.cfg
index c194882..9c2d1f2 100644
--- a/loperf_suites/calc_suite.cfg
+++ b/loperf_suites/calc_suite.cfg
@@ -4,4 +4,4 @@ suite_docs_dir="../loperf" # relative path here are relative to 
the dirname of t
 suite_tests_dir="calc"
 suite_work_dir="${TMPDIR:-/tmp}/suite_calc"
 suite_logs_dir="$HOME/suite_logs" # will be created as needed
-suite_tests="multi_line_cells_ods multi_line_cells_xlsx numbers_ods 
numbers_xls numbers_xlsx big_file_ods formula_compiler_ods tdf90659 tdf100709 
tdf53698"
+suite_tests="multi_line_cells_ods multi_line_cells_xlsx numbers_ods 
numbers_xls numbers_xlsx big_file_ods formula_compiler_ods tdf90659 tdf100709 
tdf53698 tdf102694"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - loleaflet/dist loleaflet/main.js loleaflet/src loolwsd/FileServer.cpp

2016-09-27 Thread Henry Castro
 loleaflet/dist/loleaflet.html|1 
 loleaflet/main.js|2 
 loleaflet/src/control/Control.Attribution.js |   56 +--
 loleaflet/src/layer/Layer.js |8 ---
 loleaflet/src/map/Map.js |   10 +++-
 loleaflet/src/map/handler/Map.Keyboard.js|3 +
 loolwsd/FileServer.cpp   |   10 
 7 files changed, 25 insertions(+), 65 deletions(-)

New commits:
commit 0ccbf8b2358a3fdfd939bb76d787de2d5e755594
Author: Henry Castro 
Date:   Tue Sep 27 15:54:20 2016 -0400

loolwsd: bccu#2022, User warning on hitting limit

diff --git a/loolwsd/FileServer.cpp b/loolwsd/FileServer.cpp
index d56824f..3337c04 100644
--- a/loolwsd/FileServer.cpp
+++ b/loolwsd/FileServer.cpp
@@ -39,6 +39,15 @@
 #include "FileServer.hpp"
 #include "LOOLWSD.hpp"
 
+/* CODE */
+#define LOOLWSD_CODE "This development build is limited to %d documents, and 
%d connections - to avoid the impression that it is suitable for deployment in 
large enterprises. To find out more about deploying and scaling %s checkout - 
%s."
+
+/* PRODUCT */
+#define LOOLWSD_PRODUCT "LibreOffice Online"
+
+/* PRODUCT URL */
+#define LOOLWSD_URL 
"https://wiki.documentfoundation.org/Development/LibreOffice_Online";
+
 using Poco::FileInputStream;
 using Poco::Net::HTMLForm;
 using Poco::Net::HTTPRequest;
@@ -242,6 +251,7 @@ void 
FileServerRequestHandler::preprocessFile(HTTPServerRequest& request, HTTPSe
 Poco::replaceInPlace(preprocess, std::string("%ACCESS_TOKEN_TTL%"), 
accessTokenTtl);
 Poco::replaceInPlace(preprocess, std::string("%HOST%"), host);
 Poco::replaceInPlace(preprocess, std::string("%VERSION%"), 
std::string(LOOLWSD_VERSION_HASH));
+Poco::replaceInPlace(preprocess, std::string("%CODE%"), 
Poco::format(LOOLWSD_CODE, MAX_SESSIONS, MAX_SESSIONS, 
std::string(LOOLWSD_PRODUCT), std::string(LOOLWSD_URL), 
std::string(LOOLWSD_URL)));
 
 response.setContentType("text/html");
 response.setContentLength(preprocess.length());
commit c3568a6a41ee4c1d03e258eaba9344c34e164b41
Author: Henry Castro 
Date:   Tue Sep 27 17:21:43 2016 -0400

loleaflet: refactor L.Control.Attribution.js

diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html
index ff3edca..bf1794b 100644
--- a/loleaflet/dist/loleaflet.html
+++ b/loleaflet/dist/loleaflet.html
@@ -56,6 +56,7 @@
 
   window.host = '%HOST%';
   window.access_token = '%ACCESS_TOKEN%';
+  window.attribution = '%CODE%';
 
  
 
diff --git a/loleaflet/main.js b/loleaflet/main.js
index cb53fb7..226a55b 100644
--- a/loleaflet/main.js
+++ b/loleaflet/main.js
@@ -93,7 +93,7 @@ var map = L.map('map', {
 timestamp: timestamp,
 documentContainer: 'document-container',
 debug: debugMode
-});
+}, attribution);
 // toolbar.js (loaded in 

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

2016-09-27 Thread Caolán McNamara
 cui/source/tabpages/border.cxx |   10 --
 cui/uiconfig/ui/borderpage.ui  |   20 +---
 2 files changed, 17 insertions(+), 13 deletions(-)

New commits:
commit b466bd9292de9755270b19153c41aed12e204761
Author: Caolán McNamara 
Date:   Tue Sep 27 21:29:18 2016 +0100

Resolves: tdf#101475 adjacent cells text is still too wide

this still isn't brilliant I guess

Change-Id: I18b6647133329afa85826a8014f839986a9b68de

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index e66d30c..d061a48 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -137,16 +137,6 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, 
const SfxItemSet& rCore
 get(m_pMergeAdjacentBordersCB, "mergeadjacent");
 get(m_pRemoveAdjcentCellBordersCB, "rmadjcellborders");
 
-//tdf#99963, we need height-for-width support here, but for now we can
-//bodge it
-Size aPrefSize(m_pRemoveAdjcentCellBordersCB->get_preferred_size());
-Size 
aSize(m_pRemoveAdjcentCellBordersCB->CalcMinimumSize(36*approximate_char_width()));
-if (aPrefSize.Width() > aSize.Width())
-{
-m_pRemoveAdjcentCellBordersCB->set_width_request(aSize.Width());
-m_pRemoveAdjcentCellBordersCB->set_height_request(aSize.Height());
-}
-
 if ( GetDPIScaleFactor() > 1 )
 {
 for (short i = 0; i < aBorderImgLst.GetImageCount(); i++)
diff --git a/cui/uiconfig/ui/borderpage.ui b/cui/uiconfig/ui/borderpage.ui
index 29b810c..c783d26 100644
--- a/cui/uiconfig/ui/borderpage.ui
+++ b/cui/uiconfig/ui/borderpage.ui
@@ -103,8 +103,22 @@
   
 
 
-  
-Remove 
border from adjacent cells
+  
+True
+False
+0
+_Adjacent 
Cells:
+True
+rmadjcellborders
+  
+  
+0
+4
+  
+
+
+  
+Remove 
border
 True
 True
 False
@@ -113,7 +127,7 @@
   
   
 0
-4
+5
   
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: swext/mediawiki

2016-09-27 Thread Adolfo Jayme Barrientos
 swext/mediawiki/help/wiki.xhp |   31 ++-
 swext/mediawiki/help/wikiaccount.xhp  |6 +++---
 swext/mediawiki/help/wikiformats.xhp  |   28 ++--
 swext/mediawiki/help/wikisend.xhp |7 +++
 swext/mediawiki/help/wikisettings.xhp |4 ++--
 5 files changed, 36 insertions(+), 40 deletions(-)

New commits:
commit b65c618f2d9c29838f5ed3cfe9cff4e34dea977e
Author: Adolfo Jayme Barrientos 
Date:   Tue Sep 27 15:05:45 2016 -0500

MediaWiki export help: “WikiMedia” → “MediaWiki”; minor 
copyediting

Why is “wiki” always capitalized? It’s not a proper name.

Change-Id: I55941f192e149dc93a6576e5ca21edac78299cb4

diff --git a/swext/mediawiki/help/wiki.xhp b/swext/mediawiki/help/wiki.xhp
index fe46c36..56f0bd2 100644
--- a/swext/mediawiki/help/wiki.xhp
+++ b/swext/mediawiki/help/wiki.xhp
@@ -33,7 +33,7 @@
 extensions;MediaWiki
 
 Wiki Publisher
-By using the Wiki Publisher you can upload your 
current Writer text document to a MediaWiki server. After uploading, all Wiki 
users can read your document on the Wiki.
+By using the Wiki Publisher you can upload your current Writer text 
document to a MediaWiki server. After uploading, all wiki users can read your 
document on the wiki.
 
 Choose File - Send - To 
MediaWiki to upload the current Writer document to a MediaWiki 
server.
 System Requirements
@@ -42,11 +42,11 @@
 Java Runtime Environment
 
 
-A 
Wiki account on a supported http://www.mediawiki.org/wiki/MediaWiki";>MediaWiki 
server
+A wiki account 
on a supported http://www.mediawiki.org/wiki/MediaWiki";>MediaWiki 
server
 
 
 Installing Wiki Publisher
-Before you use the Wiki Publisher, ensure that %PRODUCTNAME uses a 
Java Runtime Environment (JRE). To check the status of the JRE, choose Tools - Options - %PRODUCTNAME - Advanced. Ensure that 
"Use a Java runtime environment" is marked and that a Java runtime folder is 
selected in the big listbox. If no JRE was activated, then activate a JRE 1.4 
or later and restart %PRODUCTNAME.
+Before you use 
the Wiki Publisher, ensure that %PRODUCTNAME uses a Java Runtime Environment 
(JRE). To check the status of the JRE, choose Tools - 
Options - %PRODUCTNAME - Advanced. Ensure that “Use a Java runtime 
environment” is checked and that a Java runtime folder is selected in the big 
listbox. If no JRE was activated, then activate a JRE of version 1.4 or later 
and restart %PRODUCTNAME.
 To Connect to a Wiki
 Note: You can store your user name and password for all respective 
dialogs inside %PRODUCTNAME. The password will be stored in a secure way, where 
access is maintained by a master password. To enable the master password, 
choose Tools - Options - %PRODUCTNAME - 
Security.
 Note: If you connect to the web using a proxy server, enter the 
proxy information to Tools - Options - Internet - 
Proxy, and restart the software.
@@ -58,30 +58,30 @@
 In 
the Options dialog, 
click Add.
 
 
-In 
the MediaWiki 
dialog, enter the account information for the Wiki.
+In the MediaWiki dialog, enter 
the account information for the wiki.
 
 
 
 
-In 
the URL textbox, enter the address of a Wiki that you want to connect 
to.
+In the URL 
text box, enter the address of a wiki that you want to connect to.
 You 
can copy the URL from a web browser and paste it into the textbox.
 
 
-In 
the Username box, enter your user ID for your Wiki account.
-If 
the Wiki allows anonymous write access, you can leave the Username and Password 
boxes empty.
+In the 
Username box, enter your user ID for your wiki account.
+If the wiki 
allows anonymous write access, you can leave the Username and Password boxes 
empty.
 
 
-In 
the Password box, enter the password for your Wiki account, then click 
OK.
+In the 
Password box, enter the password for your wiki account, then click 
OK.
 
 
-Optionally enable "Save password" to save the password between 
sessions. A master password is used to maintain access to all saved passwords. 
Choose Tools - Options - %PRODUCTNAME - Security 
to enable the master password. "Save password" is unavailable when the master 
password is not enabled.
+Optionally 
enable “Save password” to save the password between sessions. A master 
password is used to maintain access to all saved passwords. Choose Tools - Options - %PRODUCTNAME - Security to enable the 
master password. “Save password” is unavailable when the master password is 
not enabled.
 To Create a New Wiki Page
 
 
 Open a Writer document.
 
 
-Write the content of the Wiki page. You can use formatting like text 
formats, headings, footnotes, and more. See the list of supported 
formats.
+Write the 
content of the wiki page. You can use formatting such as text formats, 
headings, footnotes, and more. See the list of supported 
formats.
 
 
 Choose File - Send - To 
MediaWiki.
@@ -90,19 +90,16 @@
 In 
the Send to MediaWiki 
dialog, specify the settings for your entry.
 
 
-
-MediaWiki server: Select 

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

2016-09-27 Thread Caolán McNamara
 svx/source/dialog/frmsel.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f20996450e409406f4f55f9eb7ca9bfe1e455c35
Author: Caolán McNamara 
Date:   Tue Sep 27 20:47:16 2016 +0100

Resolves: tdf#101884 keyboard navigation in User defined border control

Change-Id: I92ea37754f057c560d19b41f814a1d649ea74876

diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 1a2fe8a..26719c9 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -1176,6 +1176,7 @@ void FrameSelector::KeyInput( const KeyEvent& rKEvt )
 DeselectAllBorders();
 SelectBorder( eBorder );
 }
+bHandled = true;
 }
 }
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - loleaflet/dist loleaflet/src loolwsd/ClientSession.cpp loolwsd/protocol.txt

2016-09-27 Thread László Németh
 loleaflet/dist/leaflet.css   |   20 +-
 loleaflet/src/core/Socket.js |5 +
 loleaflet/src/layer/tile/CalcTileLayer.js|6 +
 loleaflet/src/layer/tile/ImpressTileLayer.js |6 +
 loleaflet/src/layer/tile/TileLayer.js|   82 +++
 loleaflet/src/layer/tile/WriterTileLayer.js  |7 +-
 loleaflet/src/map/handler/Map.Keyboard.js|8 ++
 loolwsd/ClientSession.cpp|6 +
 loolwsd/protocol.txt |4 +
 9 files changed, 124 insertions(+), 20 deletions(-)

New commits:
commit 459b5e585c36fd4a281d730e45d2a4be95982f37
Author: László Németh 
Date:   Tue Sep 27 20:29:10 2016 +0200

loleaflet: show latency and other data in tile debugging mode

- show best, average, worst, last times of
  - server ping round trip
  - times between key press and invalidation message
  - tile based and total tile update latencies

- show data of the last five invalidation:
  - tilecombine messages, if they exist
  - otherwise the invalidation message
  - border of the last five invalidation rectangles

- visual fixes:
  - more transparent red color for better text typing
  - small letters over tiles with transparent background
  - black attribution text instead of gray + bottomleft position

diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css
index 2febea3..41c7abd 100644
--- a/loleaflet/dist/leaflet.css
+++ b/loleaflet/dist/leaflet.css
@@ -410,7 +410,7 @@ a.leaflet-control-buttons:hover:first-child {
 .leaflet-control-attribution,
 .leaflet-control-scale-line {
padding: 0 5px;
-   color: #333;
+   color: #000;
}
 .leaflet-control-attribution a {
text-decoration: none;
@@ -566,18 +566,30 @@ a.leaflet-control-buttons:hover:first-child {
pointer-events: none;
}
 
+.debug .leaflet-popup-content-wrapper {
+   padding: 1px;
+   text-align: left;
+   border-radius: 0px;
+   }
+
 .debug .leaflet-popup-content {
margin: 1px 1px;
-   font: 28px/24px Tahoma, Verdana, sans-serif;
+   font: 9px/8px Tahoma, Verdana, sans-serif;
line-height: 1;
background: rgba(0, 0, 0, 0);
pointer-events: none;
}
 
-.debug .leaflet-popup-content-wrapper,
+.debug .leaflet-popup-content-wrapper {
+   background: rgba(255, 255, 255, 0.6);
+   color: #000;
+   box-shadow: none;
+   pointer-events: none;
+   }
+
 .debug .leaflet-popup-tip {
background: rgba(255, 255, 255, 0);
-   color: #f70;
+   color: #000;
box-shadow: none;
pointer-events: none;
}
diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index e9a64f5..73c54fb 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -188,6 +188,11 @@ L.Socket = L.Class.extend({
else if (textMsg.startsWith('error:') && !this._map._docLayer) {
this.fail = true;
}
+   else if (textMsg === 'pong' && this._map._docLayer && 
this._map._docLayer._debug) {
+   var times = this._map._docLayer._debugTimePING;
+   var timeText = 
this._map._docLayer._debugSetTimes(times, +new Date() - times.date);
+   this._map._docLayer._debugDataPING.setPrefix('Server 
ping time: ' + timeText);
+   }
else if (textMsg.startsWith('statusindicator:')) {
//FIXME: We should get statusindicator when saving too, 
no?
this._map.showBusy(_('Connecting...'), false);
diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js 
b/loleaflet/src/layer/tile/CalcTileLayer.js
index a493c7c..c14cd5f 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -34,7 +34,7 @@ L.CalcTileLayer = L.TileLayer.extend({
var offset = new L.Point(command.width, command.height);
var bottomRightTwips = topLeftTwips.add(offset);
if (this._debug) {
-   this._debugAddInvalidationRectangle(topLeftTwips, 
bottomRightTwips);
+   this._debugAddInvalidationRectangle(topLeftTwips, 
bottomRightTwips, textMsg);
}
var invalidBounds = new L.Bounds(topLeftTwips, 
bottomRightTwips);
var visibleTopLeft = 
this._latLngToTwips(this._map.getBounds().getNorthWest());
@@ -69,7 +69,9 @@ L.CalcTileLayer = L.TileLayer.extend({
needsNewTiles = true;
if (this._debug && 
this._tiles[key]._debugTile) {

this._tiles[key]._debugTile.setStyle({fillOpacity: 0.5});
+   
this._tiles[key]._debugTime.date = +new Date();
 

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

2016-09-27 Thread Eike Rathke
 sc/inc/document.hxx  |7 +++
 sc/source/core/data/bcaslot.cxx  |3 +++
 sc/source/core/data/documen2.cxx |4 +++-
 sc/source/core/data/documen7.cxx |   20 
 4 files changed, 33 insertions(+), 1 deletion(-)

New commits:
commit 5c841052abdf082b4cbe06784cfdd76f11fafef2
Author: Eike Rathke 
Date:   Tue Sep 27 19:40:31 2016 +0200

sc-perf: avoid repeated TrackFormulas() during bulk broadcast, tdf#87101 
rel.

Multiple callers involved. Most significantly ScDocument::Broadcast()
calls ScDocument::TrackFormulas() individually. Track/collect pending
formula cells at the end of the bulk broadcast instead, which gives an
instructions read speedup by factor 6 for the broadcast, and an overall
speedup in the scenario for inserting the rows by factor ~2 wall clock
time.

ScDocument::InsertRows()
Before, Ir Incl: 282,227,033,656
 After, Ir Incl:  66,307,994,805

With cycle detection:

ScDocument::TrackFormulas()
Before:
Ir Incl  Ir Self
 66,981,644,959   11,913,444,899

After:
Ir Incl  Ir Self
 10,819,556,0731,973,232,494

Change-Id: I85fe8b03ecb52cffaa6fa14354b3cc3467ecc111

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 79e5b83..757b878 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -478,6 +478,9 @@ private:
 
 std::unique_ptr m_pIconSetBitmapMap;
 
+boolmbTrackFormulasPending  : 1;
+boolmbFinalTrackFormulas: 1;
+
 public:
 bool IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBoder);
 void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, 
bool &pbLeftEdge);
@@ -2078,6 +2081,10 @@ public:
 voidAppendToFormulaTrack( ScFormulaCell* pCell );
 voidRemoveFromFormulaTrack( ScFormulaCell* pCell );
 voidTrackFormulas( sal_uInt32 nHintId = 
SC_HINT_DATACHANGED );
+voidSetTrackFormulasPending() { mbTrackFormulasPending = 
true; }
+boolIsTrackFormulasPending() const { return 
mbTrackFormulasPending; }
+voidFinalTrackFormulas();
+boolIsFinalTrackFormulas() const { return 
mbFinalTrackFormulas; }
 boolIsInFormulaTree( ScFormulaCell* pCell ) const;
 boolIsInFormulaTrack( ScFormulaCell* pCell ) const;
 HardRecalcState GetHardRecalcState() { return eHardRecalcState; }
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 73b5ee6..2051f2c 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -1099,6 +1099,9 @@ void ScBroadcastAreaSlotMachine::LeaveBulkBroadcast()
 {
 ScBroadcastAreasBulk().swap( aBulkBroadcastAreas);
 BulkBroadcastGroupAreas();
+// Trigger the "final" tracking.
+if (pDoc->IsTrackFormulasPending())
+pDoc->FinalTrackFormulas();
 }
 }
 }
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 534a788..fa481a3 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -216,7 +216,9 @@ ScDocument::ScDocument( ScDocumentMode eMode, 
SfxObjectShell* pDocShell ) :
 mbStreamValidLocked( false ),
 mbUserInteractionEnabled(true),
 mnNamedRangesLockCount(0),
-mbUseEmbedFonts(false)
+mbUseEmbedFonts(false),
+mbTrackFormulasPending(false),
+mbFinalTrackFormulas(false)
 {
 SetStorageGrammar( formula::FormulaGrammar::GRAM_STORAGE_DEFAULT);
 
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index 1a61323..d64b286 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -535,6 +535,21 @@ bool ScDocument::IsInFormulaTrack( ScFormulaCell* pCell ) 
const
 return pCell->GetPreviousTrack() || pFormulaTrack == pCell;
 }
 
+void ScDocument::FinalTrackFormulas()
+{
+mbTrackFormulasPending = false;
+mbFinalTrackFormulas = true;
+{
+ScBulkBroadcast aBulk( GetBASM());
+// Collect all pending formula cells in bulk.
+TrackFormulas();
+}
+// A final round not in bulk to track all remaining formula cells and their
+// dependents that were collected during ScBulkBroadcast dtor.
+TrackFormulas();
+mbFinalTrackFormulas = false;
+}
+
 /*
 The first is broadcasted,
 the ones that are created through this are appended to the Track by Notify.
@@ -543,6 +558,11 @@ bool ScDocument::IsInFormulaTrack( ScFormulaCell* pCell ) 
const
  */
 void ScDocument::TrackFormulas( sal_uInt32 nHintId )
 {
+if (pBASM->IsInBulkBroadcast() && !IsFinalTrackFormulas() && nHintId == 
SC_HINT_DATACHANGED)
+{
+SetTrackFormulasPending();
+return;
+}
 
 if ( pFormulaTrack )
 {
__

[Bug 80196] standardize color palette using mathematically generated colors

2016-09-27 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=80196

--- Comment #32 from Heiko Tietze  ---
(In reply to Cor Nouws from comment #30)
> Maybe an idea to ping people that worked on the various previous changes?

Pinged Christoph and KJ. Not sure who else (Astron perhaps, but at least Tin
Man has changed priorities; talked to him in Brno).

(In reply to Regina Henschel from comment #31)
> Having an "html"-palette is not bad and the names are not "strangely", see
> the definitions in
> https://www.w3.org/TR/css3-color/, section 4.3. Extended color keywords

When I stated 'unnamed' the text is "10-255-76" or "100%24%4%" or "255,44,76".
The X11 colors are nice, thanks for the reference.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] online.git: 3 commits - loolwsd/test

2016-09-27 Thread Jan Holesovsky
 loolwsd/test/UnitAdmin.cpp  |4 
 loolwsd/test/httpwstest.cpp |2 +-
 loolwsd/test/run_unit.sh.in |2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit feb359e3a9ec2ede45659927b53a277a4a15824e
Author: Jan Holesovsky 
Date:   Tue Sep 27 19:27:15 2016 +0200

CPPUNIT_ASSERT_EQUAL.

Change-Id: Ifb0fe46101e243b5f562fb6a63ea350b42f445c0

diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp
index ab27da3..640938b 100644
--- a/loolwsd/test/httpwstest.cpp
+++ b/loolwsd/test/httpwstest.cpp
@@ -228,7 +228,7 @@ void HTTPWSTest::testBadRequest()
 session->setKeepAlive(true);
 session->sendRequest(request);
 session->receiveResponse(response);
-CPPUNIT_ASSERT(response.getStatus() == 
Poco::Net::HTTPResponse::HTTPResponse::HTTP_SERVICE_UNAVAILABLE);
+
CPPUNIT_ASSERT_EQUAL(Poco::Net::HTTPResponse::HTTPResponse::HTTP_SERVICE_UNAVAILABLE,
 response.getStatus());
 }
 catch (const Poco::Exception& exc)
 {
commit 26bec64e2061b3878f0454d5dedfdbac43200f2b
Author: Jan Holesovsky 
Date:   Tue Sep 27 18:18:23 2016 +0200

Make the advice about gdb actually useful.

Change-Id: I5b95c79cce5c3b30b3d07210ec7b7a04fdb3067d

diff --git a/loolwsd/test/run_unit.sh.in b/loolwsd/test/run_unit.sh.in
index 404e011..764c258 100755
--- a/loolwsd/test/run_unit.sh.in
+++ b/loolwsd/test/run_unit.sh.in
@@ -99,7 +99,7 @@ else # newer unit tests.
 cat "$tst_log"
 echo "="
 echo "Test failed on unit: $tst re-run with:"
-echo "   $ gdb ${abs_top_builddir}/loolwsd 
--o:sys_template_path=\"$systemplate_path\" \\"
+echo "   $ gdb --args ${abs_top_builddir}/loolwsd 
--o:sys_template_path=\"$systemplate_path\" \\"
 echo " --o:lo_template_path=\"$lo_path\" \\"
 echo " --o:child_root_path=\"$jails_path\" \\"
 echo " --o:storage.filesystem[@allow]=true \\"
commit bfbc56f0456c0db5306b63d845c5882d8372fc4a
Author: Jan Holesovsky 
Date:   Tue Sep 27 18:08:34 2016 +0200

JWT token generation does not work without SSL, disable the appropriate 
tests.

Change-Id: Id25a6507ea11a1e3cfacc8b833d4fd404eaeae27

diff --git a/loolwsd/test/UnitAdmin.cpp b/loolwsd/test/UnitAdmin.cpp
index f43c316..36bebfc 100644
--- a/loolwsd/test/UnitAdmin.cpp
+++ b/loolwsd/test/UnitAdmin.cpp
@@ -412,8 +412,11 @@ public:
 
 // Register tests here.
 _tests.push_back(&UnitAdmin::testIncorrectPassword);
+#if ENABLE_SSL
 _tests.push_back(&UnitAdmin::testCorrectPassword);
+#endif
 _tests.push_back(&UnitAdmin::testWebSocketWithoutAuthToken);
+#if ENABLE_SSL
 _tests.push_back(&UnitAdmin::testWebSocketWithIncorrectAuthToken);
 _tests.push_back(&UnitAdmin::testAddDocNotify);
 _tests.push_back(&UnitAdmin::testUsersCount);
@@ -421,6 +424,7 @@ public:
 // FIXME make this one reliable, and enable again 
_tests.push_back(&UnitAdmin::testRmDocNotify);
 _tests.push_back(&UnitAdmin::testUsersCount);
 _tests.push_back(&UnitAdmin::testDocCount);
+#endif
 }
 
 // Runs tests sequentially in _tests
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 80196] standardize color palette using mathematically generated colors

2016-09-27 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=80196

Regina Henschel  changed:

   What|Removed |Added

 CC||rb.hensc...@t-online.de

--- Comment #31 from Regina Henschel  ---
Having an "html"-palette is not bad and the names are not "strangely", see the
definitions in
https://www.w3.org/TR/css3-color/, section 4.3. Extended color keywords

But we need to verify, that the values and names are really exactly as
standardized in CSS (and SVG). And they should not be translated, because they
are keywords.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2016-09-27 Thread Markus Mohrhard
 sc/qa/unit/subsequent_export-test.cxx |   24 
 sc/source/filter/xml/xmlexprt.cxx |6 ++
 2 files changed, 30 insertions(+)

New commits:
commit 7cf54c0c27e2f6d764164ea880b87163f45a
Author: Markus Mohrhard 
Date:   Tue Sep 27 18:36:52 2016 +0200

add test for tdf#101843

Change-Id: I90bd5e8042e3157286774c97d2ea3c109da2b658

diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index ac1f035..0b78c56 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -174,6 +174,8 @@ public:
 void testEscapeCharInNumberFormatXLSX();
 void testNatNumInNumberFormatXLSX();
 
+void testHiddenRepeatedRowsODS();
+
 CPPUNIT_TEST_SUITE(ScExportTest);
 CPPUNIT_TEST(test);
 CPPUNIT_TEST(testPasswordExport);
@@ -255,6 +257,8 @@ public:
 CPPUNIT_TEST(testEscapeCharInNumberFormatXLSX);
 CPPUNIT_TEST(testNatNumInNumberFormatXLSX);
 
+CPPUNIT_TEST(testHiddenRepeatedRowsODS);
+
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -3655,6 +3659,26 @@ void ScExportTest::testNatNumInNumberFormatXLSX()
 xDocSh->DoClose();
 }
 
+void ScExportTest::testHiddenRepeatedRowsODS()
+{
+ScDocShellRef xDocSh = loadDoc("empty.", FORMAT_ODS);
+CPPUNIT_ASSERT( xDocSh.Is() );
+
+{
+ScDocument& rDoc = xDocSh->GetDocument();
+rDoc.SetRowHidden(0, 20, 0, true);
+}
+
+xDocSh = saveAndReload( &(*xDocSh), FORMAT_ODS);  // Convert [NatNum5] to 
[DBNum2] in Chinese
+ScDocument& rDoc = xDocSh->GetDocument();
+SCROW nFirstRow = 0;
+SCROW nLastRow = 0;
+bool bHidden = rDoc.RowHidden(0, 0, &nFirstRow, &nLastRow);
+CPPUNIT_ASSERT(bHidden);
+CPPUNIT_ASSERT_EQUAL((SCROW)0, nFirstRow);
+CPPUNIT_ASSERT_EQUAL((SCROW)20, nLastRow);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
commit 7e7f6b0a056b51a425934f63745ae5c9fed2e51f
Author: Markus Mohrhard 
Date:   Tue Sep 27 18:17:11 2016 +0200

tdf#101843, ensure repeated rows set the hidden/filtered flag correctly

Change-Id: I759107eeb074698d5e4987c76005788aee33287d

diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index 8a0931c..4853373 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -1439,9 +1439,15 @@ void ScXMLExport::OpenRow(const sal_Int32 nTable, const 
sal_Int32 nStartRow, con
 if (pDoc)
 {
 if (nRow > nEndRowHidden)
+{
 bPrevHidden = rRowAttr.rowHidden(nTable, nRow, 
nEndRowHidden);
+bHidden = bPrevHidden;
+}
 if (nRow > nEndRowFiltered)
+{
 bPrevFiltered = rRowAttr.rowFiltered(nTable, nRow, 
nEndRowFiltered);
+bFiltered = bPrevFiltered;
+}
 }
 
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-27 Thread Stephan Bergmann
 framework/source/services/substitutepathvars.cxx |  560 ---
 1 file changed, 560 deletions(-)

New commits:
commit 47f7e30f3584cbccd02cf3748399079778facd0d
Author: Stephan Bergmann 
Date:   Tue Sep 27 18:10:32 2016 +0200

tdf#102630: [API CHANGE] Remove SharePoints support from PathSubstitution

...apparently unused and broken (see issue)

Change-Id: Ic20d287b59d3317fecdba03a3edf8f51611c91ba

diff --git a/framework/source/services/substitutepathvars.cxx 
b/framework/source/services/substitutepathvars.cxx
index 4d02998..b26dc9d 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -61,103 +61,6 @@ using namespace framework;
 
 namespace {
 
-// Must be zero value based
-enum EnvironmentType
-{
-ET_HOST = 0 ,
-ET_YPDOMAIN ,
-ET_DNSDOMAIN,
-ET_NTDOMAIN ,
-ET_OS   ,
-ET_UNKNOWN  ,
-ET_COUNT
-};
-
-// Must be zero value based
-enum OperatingSystem
-{
-OS_WINDOWS = 0,
-OS_UNIX ,
-OS_SOLARIS  ,
-OS_LINUX,
-OS_UNKNOWN  ,
-OS_COUNT
-};
-
-struct SubstituteRule
-{
-SubstituteRule()
-: aEnvType(ET_UNKNOWN)
-{}
-
-SubstituteRule( const OUString& aVarName,
-const OUString& aValue,
-const css::uno::Any& aVal,
-EnvironmentType aType )
-: aSubstVariable(aVarName)
-, aSubstValue(aValue)
-, aEnvValue(aVal)
-, aEnvType(aType)
-{}
-
-OUStringaSubstVariable;
-OUStringaSubstValue;
-css::uno::Any   aEnvValue;
-EnvironmentType aEnvType;
-};
-
-typedef std::unordered_map
-SubstituteVariables;
-
-typedef std::vector< SubstituteRule > SubstituteRuleVector;
-class SubstitutePathVariables_Impl : public utl::ConfigItem
-{
-public:
-SubstitutePathVariables_Impl();
-virtual ~SubstitutePathVariables_Impl() override;
-
-static OperatingSystem GetOperatingSystemFromString( const OUString& );
-static EnvironmentType GetEnvTypeFromString( const OUString& );
-
-void   GetSharePointsRules( SubstituteVariables& 
aSubstVarMap );
-
-/** is called from the ConfigManager before application ends or from 
the
-PropertyChangeListener if the sub tree broadcasts changes. */
-virtual void Notify( const css::uno::Sequence< OUString >& 
aPropertyNames ) override;
-
-private:
-
-virtual void ImplCommit() override;
-
-// Wrapper methods for low-level functions
-const OUString&GetYPDomainName();
-const OUString&GetDNSDomainName();
-const OUString&GetNTDomainName();
-const OUString&GetHostName();
-
-bool  FilterRuleSet(const SubstituteRuleVector& aRuleSet, 
SubstituteRule& aActiveRule);
-
-void  ReadSharePointsFromConfiguration(css::uno::Sequence< OUString >& 
aSharePointsSeq);
-void  ReadSharePointRuleSetFromConfiguration(const OUString& 
aSharePointName,
-  const OUString& aSharePointNodeName,
-  SubstituteRuleVector& aRuleSet);
-
-// Stored values for domains and host
-bool  m_bYPDomainRetrieved;
-OUString  m_aYPDomain;
-bool  m_bDNSDomainRetrieved;
-OUString  m_aDNSDomain;
-bool  m_bNTDomainRetrieved;
-OUString  m_aNTDomain;
-bool  m_bHostRetrieved;
-OUString  m_aHost;
-
-const OUStringm_aSharePointsNodeName;
-const OUStringm_aDirPropertyName;
-const OUStringm_aEnvPropertyName;
-const OUStringm_aLevelSep;
-};
-
 enum PreDefVariable
 {
 PREDEFVAR_INST,
@@ -238,18 +141,6 @@ struct ReSubstFixedVarOrder
 }
 };
 
-struct ReSubstUserVarOrder
-{
-sal_Int32   nVarValueLength;
-OUString   aVarName;
-
-bool operator< ( const ReSubstUserVarOrder& aUserVarOrder ) const
-{
-// Reverse operator< to have high to low ordering
-return ( nVarValueLength > aUserVarOrder.nVarValueLength );
-}
-};
-
 typedef ::cppu::WeakComponentImplHelper<
 css::util::XStringSubstitution,
 css::lang::XServiceInfo > SubstitutePathVariables_BASE;
@@ -257,8 +148,6 @@ typedef ::cppu::WeakComponentImplHelper<
 class SubstitutePathVariables : private cppu::BaseMutex,
 public SubstitutePathVariables_BASE
 {
-friend class SubstitutePathVariables_Impl;
-
 public:
 explicit SubstitutePathVariables(const css::uno::Reference< 
css::uno::XComponentContext >& xContext);
 virtual ~SubstitutePathVariables() override;
@@ -314,408 +203,16 @@ private:
 VarNameToIndexMap;
 
 VarNameToIndexMapm_aPreDefVarMap; // Mapping from 
pre-def variable names to enum for array access
-Substit

[Bug 80196] standardize color palette using mathematically generated colors

2016-09-27 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=80196

Cor Nouws  changed:

   What|Removed |Added

 CC||c...@nouenoff.nl

--- Comment #30 from Cor Nouws  ---
(In reply to Heiko Tietze from comment #29)

> So my suggestion is:
> [...]

Maybe an idea to ping people that worked on the various previous changes?

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] online.git: loolwsd/test

2016-09-27 Thread Jan Holesovsky
 loolwsd/test/Makefile.am   |1 +
 loolwsd/test/UnitAdmin.cpp |5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit dd9aeb8637e9505e752b066474372fc93ad20b8d
Author: Jan Holesovsky 
Date:   Tue Sep 27 17:38:17 2016 +0200

Use cppunit macros.

Change-Id: Ie56113a95dfc07b39f64a7ed0ce50efb1fa7081b

diff --git a/loolwsd/test/Makefile.am b/loolwsd/test/Makefile.am
index ab0918c..6bd6d73 100644
--- a/loolwsd/test/Makefile.am
+++ b/loolwsd/test/Makefile.am
@@ -35,6 +35,7 @@ test_LDADD = $(CPPUNIT_LIBS)
 # unit test modules:
 unit_fuzz_la_SOURCES = UnitFuzz.cpp
 unit_admin_la_SOURCES = UnitAdmin.cpp
+unit_admin_la_LIBADD = $(CPPUNIT_LIBS)
 unit_admin_la_CPPFLAGS = -DTDOC=\"$(top_srcdir)/test/data\"
 unit_fonts_la_SOURCES = UnitFonts.cpp
 unit_timeout_la_SOURCES = UnitTimeout.cpp
diff --git a/loolwsd/test/UnitAdmin.cpp b/loolwsd/test/UnitAdmin.cpp
index af78344..f43c316 100644
--- a/loolwsd/test/UnitAdmin.cpp
+++ b/loolwsd/test/UnitAdmin.cpp
@@ -9,7 +9,6 @@
 
 #include "config.h"
 
-#include 
 #include 
 #include 
 
@@ -102,9 +101,9 @@ private:
 response.getCookies(cookies);
 
 // For now we only set one cookie
-assert(cookies.size() == 1);
+CPPUNIT_ASSERT_EQUAL(1, static_cast(cookies.size()));
 // and it is jwt=
-assert(cookies[0].getName() == "jwt");
+CPPUNIT_ASSERT_EQUAL(std::string("jwt"), cookies[0].getName());
 
 // Check cookie properties
 std::string cookiePath = cookies[0].getPath();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/liblangtag

2016-09-27 Thread Stephan Bergmann
 external/liblangtag/clang-cl.patch.0 |   21 +
 1 file changed, 21 insertions(+)

New commits:
commit 0901c29d522f03c29c60fcda537918c2bf9eda63
Author: Stephan Bergmann 
Date:   Tue Sep 27 17:30:23 2016 +0200

Adapt external/liblangtag/clang-cl.patch.0 to liblangtag 0.6.1

Change-Id: Idf75ffa042c4858ef9bea99d603adb691b295139

diff --git a/external/liblangtag/clang-cl.patch.0 
b/external/liblangtag/clang-cl.patch.0
index cbc22a26..94348b6 100755
--- a/external/liblangtag/clang-cl.patch.0
+++ b/external/liblangtag/clang-cl.patch.0
@@ -18,3 +18,24 @@
  #  define LT_GNUC_NULL_TERMINATED \
__attribute__((__sentinel__))
  #else /* !__GNUC__ */
+@@ -220,17 +220,17 @@
+  *
+  * See the GNU C documentation for more details.
+  */
+-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
++#if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 
1))
+ #define LT_GNUC_DEPRECATED __attribute__((__deprecated__))
+ #else
+ #define LT_GNUC_DEPRECATED
+ #endif
+-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
++#if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 
5))
+ #define LT_GNUC_DEPRECATED_FOR(f) __attribute__((deprecated("Use " #f " 
instead")))
+ #else
+ #define LT_GNUC_DEPRECATED_FOR(f) LT_GNUC_DEPRECATED
+ #endif
+-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
++#if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 
6))
+ #define LT_GNUC_BEGIN_IGNORE_DEPRECATIONS \
+   _Pragma ("GCC diagnostic push") \
+   _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-27 Thread Caolán McNamara
 vcl/source/window/menu.cxx   |   25 +--
 vcl/source/window/menufloatingwindow.cxx |   49 ++-
 vcl/source/window/menufloatingwindow.hxx |4 +-
 3 files changed, 42 insertions(+), 36 deletions(-)

New commits:
commit 1aaba02fafe0b9131c2cdeba3fb4ad9924da81be
Author: Caolán McNamara 
Date:   Tue Sep 27 16:09:57 2016 +0100

this should always be empty now

Change-Id: I5849ce78407675150ca1fd96388a4569bcd14f4a

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 183d331..4fca315 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -3096,15 +3096,9 @@ sal_uInt16 PopupMenu::ImplExecute( const 
VclPtr& pW, const Rectangl
 if (pWin->IsDisposed())
 return 0;
 
-// Restore focus (could already have been
-// restored in Select)
 xFocusId = pWin->GetFocusId();
-if ( xFocusId != nullptr )
-{
-pWin->SetFocusId( nullptr );
-pSVData->maWinData.mbNoDeactivate = false;
-}
-pWin->ImplEndPopupMode( FloatWinPopupEndFlags::NONE, xFocusId );
+assert(xFocusId == nullptr && "Focus should already be restored by 
MenuFloatingWindow::End");
+pWin->ImplEndPopupMode(FloatWinPopupEndFlags::NONE, xFocusId);
 
 if ( nSelectedId )  // then clean up .. ( otherwise done by TH )
 {
commit 4da7971812b0a53ba80f7d9c29851c527488067d
Author: Caolán McNamara 
Date:   Tue Sep 27 15:33:54 2016 +0100

Resolves: tdf#102177 focus not restored from context menus

the problem being that the attempt to restore the focus in the document in 
the
floatingwindow tear down is blocked because the menus have set that window 
as
modal so the focus isn't set.

The attempt to set the focus in the floatingwindow teardown causes the
SavedFocus in the menufloatingwindow to be dropped, so the extra layer of 
code
to restore focus after modality is removed doesn't do anything

this is fallout from...

commit dd46727b99d4bb5135451aa7e5e1bdb197373843
Author: Caolán McNamara 
Date:   Tue Apr 5 15:27:38 2016 +0100

Resolves: tdf#87120 no keyboard navigation inside floating windows

which allows the focus to "truly" enter the menus, triggering the
floatingwindow attempt, which fails but blocks the menufloatingwindow 
attempt

easiest thing seems to make the restoring modality, and then restore focus,
something that MenuFloatingWindow does before it finishes

Change-Id: I97a4ac71419dcb04709e4667586d8343e89ddbeb

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index a93811d..183d331 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -3043,12 +3043,6 @@ sal_uInt16 PopupMenu::ImplExecute( const 
VclPtr& pW, const Rectangl
 
 pWin->SetFocusId( xFocusId );
 pWin->SetOutputSizePixel( aSz );
-// #102158# menus must never grab the focus, otherwise
-// they will be closed immediately
-// from now on focus grabbing is only prohibited automatically if
-// FloatWinPopupFlags::GrabFocus was set (which is done below), because 
some
-// floaters (like floating toolboxes) may grab the focus
-// pWin->GrabFocus();
 if ( GetItemCount() )
 {
 SalMenu* pMenu = ImplGetSalMenu();
@@ -3098,15 +3092,8 @@ sal_uInt16 PopupMenu::ImplExecute( const 
VclPtr& pW, const Rectangl
 }
 if ( bRealExecute )
 {
-pW->ImplIncModalCount();
-
 pWin->Execute();
-
-SAL_WARN_IF(  pW->IsDisposed(), "vcl", "window for popup died, modal 
count incorrect !" );
-if( ! pW->IsDisposed() )
-pW->ImplDecModalCount();
-
-if ( pWin->IsDisposed() )
+if (pWin->IsDisposed())
 return 0;
 
 // Restore focus (could already have been
diff --git a/vcl/source/window/menufloatingwindow.cxx 
b/vcl/source/window/menufloatingwindow.cxx
index f4adcf0..aeb97dc 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -272,13 +272,13 @@ IMPL_LINK_NOARG_TYPED(MenuFloatingWindow, PopupEnd, 
FloatingWindow*, void)
 Menu* pM = pMenu;
 if ( bInExecute )
 {
+End();
 if ( pActivePopup )
 {
 //SAL_WARN_IF( pActivePopup->ImplGetWindow(), "vcl", "PopupEnd, 
obwohl pActivePopup MIT Window!" );
 KillActivePopup(); // should be ok to just remove it
 //pActivePopup->bCanceled = true;
 }
-bInExecute = false;
 pMenu->bInCallback = true;
 pMenu->Deactivate();
 pMenu->bInCallback = false;
@@ -388,15 +388,44 @@ void MenuFloatingWindow::EnableScrollMenu( bool b )
 InitMenuClipRegion(*this);
 }
 
+void MenuFloatingWindow::Start()
+{
+if (bInExecute)
+return;
+bInExecute = true;
+if (GetParent())
+GetParent()->ImplIncModalCount();
+}
+
+void MenuFloatingWin

[Bug 80196] standardize color palette using mathematically generated colors

2016-09-27 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=80196

Heiko Tietze  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #29 from Heiko Tietze  ---
Back to NEW, we need a decision here. I like the idea of mathematically
generated colors. But we should also think about cleaning up what we have. 

* cmyk: 216 unnamed colors in tiny steps that looks like a replacement for the
rgb input
* gallery: 61 colors w. gray scale, yellow to red, pink to violett, light blue
to dark blue, green, brown/ocker; unnamed
* html: 131 colors similar to "gallery" but finer grained; strangely named like
"ghostwhite F8F8FF 248.248.255"
* libreoffice: the branding colors + black & white; with (improvable) names
* palette: 77 darker red, green and blue colors; unnamed
* scribus: 545 named colors, guess for compatibility
* standard: Symphony based palette in 10x12 colors plus "nice", pale and chart
colors; well named
* tango: 27 named colors from tango
* web: 232 unnamed greenish, reddish and blueish colors
(document, + user, + recently used)

(named = "Red" instead of "255,0,0")

So my suggestion is:
* remove cmyk, gallery, html, palette, web
* add this "tonal" palette here, when the names are improved (design only
easyhack), but also add Breeze colors
(https://community.kde.org/KDE_Visual_Design_Group/HIG/Color)

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] online.git: loolwsd/MessageQueue.hpp loolwsd/test

2016-09-27 Thread Jan Holesovsky
 loolwsd/MessageQueue.hpp   |2 ++
 loolwsd/test/WhiteBoxTests.cpp |   14 ++
 2 files changed, 16 insertions(+)

New commits:
commit da061317ffe3fc0cb6c322d75c865b986329845b
Author: Jan Holesovsky 
Date:   Tue Sep 27 17:03:39 2016 +0200

Trivial tilecombine unit test for TileQueue.

Fails with any of 137e677eb0d6af1996701b2bd1b27a6eb3822613 or
fb0e041232c9e8c345600eede619a0ca9a947741 reverted.

Change-Id: Ib025e5d943eef1306e89167260ad352b0ecaf65b

diff --git a/loolwsd/MessageQueue.hpp b/loolwsd/MessageQueue.hpp
index 1dee715..1127454 100644
--- a/loolwsd/MessageQueue.hpp
+++ b/loolwsd/MessageQueue.hpp
@@ -21,6 +21,8 @@
 */
 class MessageQueue
 {
+friend class WhiteBoxTests;
+
 public:
 
 typedef std::vector Payload;
diff --git a/loolwsd/test/WhiteBoxTests.cpp b/loolwsd/test/WhiteBoxTests.cpp
index 15c5b27..a05460e 100644
--- a/loolwsd/test/WhiteBoxTests.cpp
+++ b/loolwsd/test/WhiteBoxTests.cpp
@@ -13,6 +13,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 /// WhiteBox unit-tests.
@@ -23,12 +24,14 @@ class WhiteBoxTests : public CPPUNIT_NS::TestFixture
 CPPUNIT_TEST(testLOOLProtocolFunctions);
 CPPUNIT_TEST(testRegexListMatcher);
 CPPUNIT_TEST(testRegexListMatcher_Init);
+CPPUNIT_TEST(testTileQueue);
 
 CPPUNIT_TEST_SUITE_END();
 
 void testLOOLProtocolFunctions();
 void testRegexListMatcher();
 void testRegexListMatcher_Init();
+void testTileQueue();
 };
 
 void WhiteBoxTests::testLOOLProtocolFunctions()
@@ -144,6 +147,17 @@ void WhiteBoxTests::testRegexListMatcher_Init()
 CPPUNIT_ASSERT(matcher.match("192.168.."));
 }
 
+void WhiteBoxTests::testTileQueue()
+{
+std::unique_ptr queue(new TileQueue());
+
+queue->put("tilecombine part=0 width=256 height=256 tileposx=0,3840,7680 
tileposy=0,0,0 tilewidth=3840 tileheight=3840");
+queue->put("tilecombine part=0 width=256 height=256 tileposx=0,3840 
tileposy=0,0 tilewidth=3840 tileheight=3840");
+
+// the tilecombine's get merged, resulting in 3 "tile" messages
+CPPUNIT_ASSERT_EQUAL(3, static_cast(queue->_queue.size()));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(WhiteBoxTests);
 
 /* 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] online.git: loolwsd/Util.hpp

2016-09-27 Thread Miklos Vajna
 loolwsd/Util.hpp |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 27f541549c933168d7ab0404e521ecfc17684151
Author: Miklos Vajna 
Date:   Tue Sep 27 17:07:52 2016 +0200

Util: add missing include

diff --git a/loolwsd/Util.hpp b/loolwsd/Util.hpp
index 1f59627..8d9fab9 100644
--- a/loolwsd/Util.hpp
+++ b/loolwsd/Util.hpp
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define LOK_USE_UNSTABLE_API
 #include 
@@ -193,7 +194,7 @@ namespace Util
 {
 // Not performance critical to warrant caching.
 Poco::RegularExpression re(value, 
Poco::RegularExpression::RE_CASELESS);
-Poco::RegularExpression::Match reMatch{};
+Poco::RegularExpression::Match reMatch;
 
 // Must be a full match.
 if (re.match(subject, reMatch) && reMatch.offset == 0 && 
reMatch.length == subject.size())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-5-1' - 3 commits - filter/Library_pdffilter.mk filter/source filter/uiconfig include/vcl officecfg/registry sc/source vcl/source

2016-09-27 Thread Katarina Behrens
Rebased ref, commits from common ancestor:
commit 260d341f17f052d6a44fc1f68b3d5c198b1dbd49
Author: Katarina Behrens 
Date:   Wed Apr 6 23:06:37 2016 +0200

PDF export of cell formulas now configurable in UI

Of course, only in Calc. I had to make filter/pdf depend
on svxcore (because of ColorListBox) but little harm done,
other filters in this dir depend on it already too

Conflicts:
filter/source/pdf/impdialog.cxx
filter/uiconfig/ui/pdfgeneralpage.ui

Change-Id: Id5bf99fdc738aea073bf5315e37ed5002ab0f926

diff --git a/filter/Library_pdffilter.mk b/filter/Library_pdffilter.mk
index 6de7d34..a3151ee 100644
--- a/filter/Library_pdffilter.mk
+++ b/filter/Library_pdffilter.mk
@@ -36,6 +36,7 @@ $(eval $(call gb_Library_use_custom_headers,pdffilter,\
 
 $(eval $(call gb_Library_use_libraries,pdffilter,\
svt \
+   svxcore \
sfx \
tk \
vcl \
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index f1c86a8..9a4a622 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -25,7 +25,12 @@
 #include 
 #include 
 #include 
+#include 
 #include "sfx2/passwd.hxx"
+#include 
+#include 
+#include 
+#include 
 #include "svtools/miscopt.hxx"
 
 #include "comphelper/storagehelper.hxx"
@@ -73,6 +78,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, 
Sequence< PropertyValue >
 mnGeneralPageId(0),
 mbIsPresentation( false ),
 mbIsWriter( false ),
+mbIsSpreadsheet( false ),
 
 mbSelectionPresent( false ),
 mbUseCTLFont( false ),
@@ -82,6 +88,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, 
Sequence< PropertyValue >
 mnMaxImageResolution( 300 ),
 mbUseTaggedPDF( false ),
 mbExportNotes( true ),
+mbExportFormulaAnnotation( false ),
 mbViewPDF( false ),
 mbExportNotesPages( false ),
 mbUseTransitionEffects( false ),
@@ -94,6 +101,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, 
Sequence< PropertyValue >
 mbExportBookmarks( true ),
 mbExportHiddenSlides ( false),
 mnOpenBookmarkLevels( -1 ),
+mnAnnotColor( -1 ),
 
 mbHideViewerToolbar( false ),
 mbHideViewerMenubar( false ),
@@ -175,6 +183,8 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, 
Sequence< PropertyValue >
 mbIsPresentation = true;
 if ( xInfo->supportsService( 
"com.sun.star.text.GenericTextDocument" ) )
 mbIsWriter = true;
+if ( xInfo->supportsService( 
"com.sun.star.sheet.SpreadsheetDocument" ) )
+mbIsSpreadsheet = true;
 }
 }
 catch(const RuntimeException &)
@@ -194,6 +204,8 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, 
Sequence< PropertyValue >
 if ( mbIsPresentation )
 mbExportNotesPages = maConfigItem.ReadBool( "ExportNotesPages", false 
);
 mbExportNotes = maConfigItem.ReadBool( "ExportNotes", false );
+mbExportFormulaAnnotation = maConfigItem.ReadBool( 
"ExportFormulaAsAnnotation", false );
+mnAnnotColor = maConfigItem.ReadInt32( "FormulaAnnotationHighlightColor", 
-1 );
 mbViewPDF = maConfigItem.ReadBool( "ViewPDFAfterExport", false );
 
 mbExportBookmarks = maConfigItem.ReadBool( "ExportBookmarks", true );
@@ -396,6 +408,7 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
 if ( mbIsPresentation )
 maConfigItem.WriteBool( "ExportNotesPages", mbExportNotesPages );
 maConfigItem.WriteBool( "ExportNotes", mbExportNotes );
+maConfigItem.WriteBool( "ExportFormulaAsAnnotation", 
mbExportFormulaAnnotation );
 maConfigItem.WriteBool( "ViewPDFAfterExport", mbViewPDF );
 
 maConfigItem.WriteBool( "ExportBookmarks", mbExportBookmarks );
@@ -428,6 +441,7 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
 maConfigItem.WriteInt32( "PageLayout", mnPageLayout );
 maConfigItem.WriteBool( "FirstPageOnLeft", mbFirstPageLeft );
 maConfigItem.WriteInt32( "OpenBookmarkLevels", mnOpenBookmarkLevels );
+maConfigItem.WriteInt32( "FormulaAnnotationHighlightColor", mnAnnotColor );
 
 maConfigItem.WriteBool( "ExportLinksRelativeFsys", 
mbExportRelativeFsysLinks );
 maConfigItem.WriteInt32("PDFViewSelection", mnViewPDFMode );
@@ -516,6 +530,8 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage(vcl::Window* 
pParent, const SfxItemSe
 , mbExportFormFieldsUserSelection(false)
 , mbIsPresentation(false)
 , mbIsWriter(false)
+, mbIsSpreadsheet(false)
+
 , mpaParent(nullptr)
 {
 get(mpRbAll, "all");
@@ -543,6 +559,12 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage(vcl::Window* 
pParent, const SfxItemSe
 get(mpCbExportHiddenSlides, "hiddenpages");
 get(mpCbExportNotes, "comments");
 get(mpCbExportNotesPages, "notes");
+
+get(mpFormulaFrame, "formulaframe");
+get(mpCbExportFormulaAnnotations, "formulas");
+get(mpFtAnnotColor, "annotation_label");
+get(mpLbAnnotColor, "annotation_color");
+
 

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

2016-09-27 Thread Caolán McNamara
 vcl/source/window/floatwin.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 65fc486f7e28ec02ed481265dcaa30d09eaadc6c
Author: Caolán McNamara 
Date:   Tue Sep 27 15:53:23 2016 +0100

ImplEndPopupModeHdl takes no argument

Change-Id: I2e4a498bb9c4d5e887f55d38cdae6c6aeef44a4d

diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 68d44be..137944e 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -628,7 +628,7 @@ void FloatingWindow::ImplCallPopupModeEnd()
 
 // call Handler asynchronously.
 if ( mpImplData && !mnPostId )
-mnPostId = Application::PostUserEvent( LINK( this, FloatingWindow, 
ImplEndPopupModeHdl ), mxPrevFocusWin, true );
+mnPostId = Application::PostUserEvent(LINK(this, FloatingWindow, 
ImplEndPopupModeHdl));
 }
 
 void FloatingWindow::PopupModeEnd()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/Util.hpp

2016-09-27 Thread Ashod Nakashian
 loolwsd/Util.hpp |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 56924299c9318e9022fe248e0538c053e3732847
Author: Ashod Nakashian 
Date:   Tue Sep 27 10:59:29 2016 -0400

loolwsd: restore Poco regex and old initialization

Unfortunately, std::regex is not well supported by old
compilers, namely gcc 4.8 doesn't seem to pass tests.

In addition, newer gcc versions, such as 5.2, don't like
{0,0} initialization.

For now we agreed on restoring the original Poco regex
and the old initialization of {}. When we move to
newer gcc, we can revert this commit so we get std::regex.

This commit reverts the following 3 commits:

Revert "Util: fix -Werror=shadow"
This reverts commit 01c6cb40ef3c4718b8074288e790b47b545fefbe.

Revert "loolwsd: replace Poco regex with std"
This reverts commit 1fdb4bf8626ffa67c7732fe55f0cccf733894c15.

Revert "Fix gcc-4.8 build"
This reverts commit 92ff2789976d2b6d3dc0056f87026431108c1584.

Change-Id: I04912055d1143a2aeebb8d853c4d0c7fe74a40cc
Reviewed-on: https://gerrit.libreoffice.org/29324
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/Util.hpp b/loolwsd/Util.hpp
index 3aab0ad..1f59627 100644
--- a/loolwsd/Util.hpp
+++ b/loolwsd/Util.hpp
@@ -187,18 +187,16 @@ namespace Util
 }
 
 // Not a perfect match, try regex.
-const int length = subject.size();
 for (const auto& value : set)
 {
 try
 {
 // Not performance critical to warrant caching.
-std::regex re(value, std::regex::icase);
-std::smatch smatch;
+Poco::RegularExpression re(value, 
Poco::RegularExpression::RE_CASELESS);
+Poco::RegularExpression::Match reMatch{};
 
 // Must be a full match.
-if (std::regex_match(subject, smatch, re) &&
-smatch.position() == 0 && smatch.length() == length)
+if (re.match(subject, reMatch) && reMatch.offset == 0 && 
reMatch.length == subject.size())
 {
 return true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-5-0' - 3 commits - filter/Library_pdffilter.mk filter/source filter/uiconfig include/vcl officecfg/registry sc/source vcl/source

2016-09-27 Thread Katarina Behrens
 filter/Library_pdffilter.mk|1 
 filter/source/pdf/impdialog.cxx|   76 ++
 filter/source/pdf/impdialog.hxx|   23 ++-
 filter/uiconfig/ui/pdfgeneralpage.ui   |   73 +-
 include/vcl/pdfextoutdevdata.hxx   |1 
 include/vcl/pdfwriter.hxx  |1 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   14 +
 sc/source/ui/view/output2.cxx  |   39 +
 vcl/source/gdi/pdfextoutdevdata.cxx|   21 ++
 vcl/source/gdi/pdfwriter.cxx   |5 
 vcl/source/gdi/pdfwriter_impl.cxx  |   93 +
 vcl/source/gdi/pdfwriter_impl.hxx  |4 
 12 files changed, 340 insertions(+), 11 deletions(-)

New commits:
commit 732a2ea84e7c9c04314f3b59596f0f457bf8bb9a
Author: Katarina Behrens 
Date:   Wed Apr 6 23:06:37 2016 +0200

PDF export of cell formulas now configurable in UI

Of course, only in Calc. I had to make filter/pdf depend
on svxcore (because of ColorListBox) but little harm done,
other filters in this dir depend on it already too

Change-Id: Id5bf99fdc738aea073bf5315e37ed5002ab0f926

diff --git a/filter/Library_pdffilter.mk b/filter/Library_pdffilter.mk
index 6de7d34..a3151ee 100644
--- a/filter/Library_pdffilter.mk
+++ b/filter/Library_pdffilter.mk
@@ -36,6 +36,7 @@ $(eval $(call gb_Library_use_custom_headers,pdffilter,\
 
 $(eval $(call gb_Library_use_libraries,pdffilter,\
svt \
+   svxcore \
sfx \
tk \
vcl \
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 89a1351..b775805 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -25,7 +25,12 @@
 #include 
 #include 
 #include 
+#include 
 #include "sfx2/passwd.hxx"
+#include 
+#include 
+#include 
+#include 
 #include "svtools/miscopt.hxx"
 
 #include "comphelper/storagehelper.hxx"
@@ -75,6 +80,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, 
Sequence< PropertyValue >
 mnGeneralPageId(0),
 mbIsPresentation( false ),
 mbIsWriter( false ),
+mbIsSpreadsheet( false ),
 
 mbSelectionPresent( false ),
 mbUseCTLFont( false ),
@@ -84,6 +90,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, 
Sequence< PropertyValue >
 mnMaxImageResolution( 300 ),
 mbUseTaggedPDF( false ),
 mbExportNotes( true ),
+mbExportFormulaAnnotation( false ),
 mbViewPDF( false ),
 mbExportNotesPages( false ),
 mbUseTransitionEffects( false ),
@@ -95,6 +102,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, 
Sequence< PropertyValue >
 mbExportBookmarks( true ),
 mbExportHiddenSlides ( false),
 mnOpenBookmarkLevels( -1 ),
+mnAnnotColor( -1 ),
 
 mbHideViewerToolbar( false ),
 mbHideViewerMenubar( false ),
@@ -176,6 +184,8 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, 
Sequence< PropertyValue >
 mbIsPresentation = true;
 if ( xInfo->supportsService( 
"com.sun.star.text.GenericTextDocument" ) )
 mbIsWriter = true;
+if ( xInfo->supportsService( 
"com.sun.star.sheet.SpreadsheetDocument" ) )
+mbIsSpreadsheet = true;
 }
 }
 catch(const RuntimeException &)
@@ -195,6 +205,8 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, 
Sequence< PropertyValue >
 if ( mbIsPresentation )
 mbExportNotesPages = maConfigItem.ReadBool( "ExportNotesPages", false 
);
 mbExportNotes = maConfigItem.ReadBool( "ExportNotes", false );
+mbExportFormulaAnnotation = maConfigItem.ReadBool( 
"ExportFormulaAsAnnotation", false );
+mnAnnotColor = maConfigItem.ReadInt32( "FormulaAnnotationHighlightColor", 
-1 );
 mbViewPDF = maConfigItem.ReadBool( "ViewPDFAfterExport", false );
 
 mbExportBookmarks = maConfigItem.ReadBool( "ExportBookmarks", true );
@@ -397,6 +409,7 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
 if ( mbIsPresentation )
 maConfigItem.WriteBool( "ExportNotesPages", mbExportNotesPages );
 maConfigItem.WriteBool( "ExportNotes", mbExportNotes );
+maConfigItem.WriteBool( "ExportFormulaAsAnnotation", 
mbExportFormulaAnnotation );
 maConfigItem.WriteBool( "ViewPDFAfterExport", mbViewPDF );
 
 maConfigItem.WriteBool( "ExportBookmarks", mbExportBookmarks );
@@ -428,6 +441,7 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
 maConfigItem.WriteInt32( "PageLayout", mnPageLayout );
 maConfigItem.WriteBool( "FirstPageOnLeft", mbFirstPageLeft );
 maConfigItem.WriteInt32( "OpenBookmarkLevels", mnOpenBookmarkLevels );
+maConfigItem.WriteInt32( "FormulaAnnotationHighlightColor", mnAnnotColor );
 
 maConfigItem.WriteBool( "ExportLinksRelativeFsys", 
mbExportRelativeFsysLinks );

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

2016-09-27 Thread Thorsten Behrens
New branch 'feature/cib_contract101' available with the following commits:
commit d215d0003ce3c75a6c0b2e729b2fa7eab30b7762
Author: Thorsten Behrens 
Date:   Thu Jul 28 02:31:50 2016 +0200

Revert "tdf#59454 RTF import: handle section break right before a table"

This reverts commit e57752170e604c85a6fe8aeaa38784796e00bab1.

Conflicts:
sw/qa/extras/rtfimport/rtfimport.cxx

Change-Id: Ifb8234338ed2854c1716d7690e9218792eb7730c

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


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

2016-09-27 Thread Caolán McNamara
 vcl/source/window/menufloatingwindow.cxx |   18 ++
 1 file changed, 6 insertions(+), 12 deletions(-)

New commits:
commit 0d56cc15803965a1be6991a3630076f7ccf67817
Author: Caolán McNamara 
Date:   Tue Sep 27 15:18:28 2016 +0100

detangle code that now looks silly since...

commit 9b7dfb10641ba7978ffcbd1db0507163411ae027
Author: Caolán McNamara 
Date:   Thu Jun 9 16:52:21 2016 +0100

EndSaveFocus does nothing on the !bRestore case

removed the code that made it look like it made sense

Change-Id: I2e7280fd6643e86d65cba04c8302be099d6f3d0e

diff --git a/vcl/source/window/menufloatingwindow.cxx 
b/vcl/source/window/menufloatingwindow.cxx
index 715398d..f4adcf0 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -395,7 +395,6 @@ void MenuFloatingWindow::Execute()
 pSVData->maAppData.mpActivePopupMenu = 
static_cast(pMenu.get());
 
 bInExecute = true;
-//  bCallingSelect = false;
 
 while ( bInExecute )
 Application::Yield();
@@ -405,19 +404,14 @@ void MenuFloatingWindow::Execute()
 
 void MenuFloatingWindow::StopExecute()
 {
-VclPtr xFocusId;
-// restore focus
-// (could have been restored in Select)
-if ( xSaveFocusId != nullptr )
+VclPtr xFocusId(xSaveFocusId);
+// restore focus (could have been restored in Select)
+if (xFocusId != nullptr)
 {
-xFocusId = xSaveFocusId;
-if ( xFocusId != nullptr )
-{
-xSaveFocusId = nullptr;
-ImplGetSVData()->maWinData.mbNoDeactivate = false;
-}
+xSaveFocusId = nullptr;
+ImplGetSVData()->maWinData.mbNoDeactivate = false;
 }
-ImplEndPopupMode( FloatWinPopupEndFlags::NONE, xFocusId );
+ImplEndPopupMode(FloatWinPopupEndFlags::NONE, xFocusId);
 
 aHighlightChangedTimer.Stop();
 bInExecute = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-27 Thread Caolán McNamara
 vcl/source/window/menufloatingwindow.cxx |6 +++---
 vcl/source/window/menufloatingwindow.hxx |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 95a6d24ed7a231c42ccd608fb93cbed989a62e3a
Author: Caolán McNamara 
Date:   Tue Sep 27 15:14:46 2016 +0100

the only place the default xFocusId arg isn't used...

the argument is (effectively) equal to the default

Change-Id: I26fcd43d2bc8e37e6887c244f728e3231328e34e

diff --git a/vcl/source/window/menufloatingwindow.cxx 
b/vcl/source/window/menufloatingwindow.cxx
index 66bb23d..715398d 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -403,8 +403,9 @@ void MenuFloatingWindow::Execute()
 pSVData->maAppData.mpActivePopupMenu = nullptr;
 }
 
-void MenuFloatingWindow::StopExecute( VclPtr xFocusId )
+void MenuFloatingWindow::StopExecute()
 {
+VclPtr xFocusId;
 // restore focus
 // (could have been restored in Select)
 if ( xSaveFocusId != nullptr )
@@ -461,7 +462,6 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* 
pThisOnly )
 void MenuFloatingWindow::EndExecute()
 {
 Menu* pStart = pMenu ? pMenu->ImplGetStartMenu() : nullptr;
-VclPtr xFocusId;
 
 // if started elsewhere, cleanup there as well
 MenuFloatingWindow* pCleanUpFrom = this;
@@ -478,7 +478,7 @@ void MenuFloatingWindow::EndExecute()
 Menu* pM = pMenu;
 sal_uInt16 nItem = nHighlightedItem;
 
-pCleanUpFrom->StopExecute( xFocusId );
+pCleanUpFrom->StopExecute();
 
 if ( nItem != ITEMPOS_INVALID && pM )
 {
diff --git a/vcl/source/window/menufloatingwindow.hxx 
b/vcl/source/window/menufloatingwindow.hxx
index 8ffd7be..9b508bb 100644
--- a/vcl/source/window/menufloatingwindow.hxx
+++ b/vcl/source/window/menufloatingwindow.hxx
@@ -108,7 +108,7 @@ public:
 sal_uInt16 GetScrollerHeight() const   { return nScrollerHeight; }
 
 void Execute();
-void StopExecute( VclPtr xFocusId = nullptr );
+void StopExecute();
 void EndExecute();
 void EndExecute( sal_uInt16 nSelectId );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 5 commits - framework/source

2016-09-27 Thread Stephan Bergmann
 framework/source/services/substitutepathvars.cxx |  107 ++-
 1 file changed, 49 insertions(+), 58 deletions(-)

New commits:
commit 120d8fc75c164555058d63ef7dca8bfbd8316a5a
Author: Stephan Bergmann 
Date:   Tue Sep 27 15:45:20 2016 +0200

Use FixedVariable::bAbsPath to check for special path vars

Change-Id: I526c45ecf3c7e21b87c16eef5047707f74da7668

diff --git a/framework/source/services/substitutepathvars.cxx 
b/framework/source/services/substitutepathvars.cxx
index cd6bead..4d02998 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -1091,9 +1091,7 @@ throw ( RuntimeException )
 if ( nPos >= 0 )
 {
 bool bMatch = true;
-if ( i.eVariable == PREDEFVAR_USERNAME ||
- i.eVariable == PREDEFVAR_LANGID ||
- i.eVariable == PREDEFVAR_VLANG )
+if ( !aFixedVarTable[i.eVariable].bAbsPath )
 {
 // Special path variables as they can occur in the middle 
of a path. Only match if they
 // describe a whole directory and not only a substring of 
a directory!
commit 02f114096d56f717da4b1665b1d2d3a9dac20f4e
Author: Stephan Bergmann 
Date:   Tue Sep 27 15:39:28 2016 +0200

Remove redundant FixedVariable::nEnumValue

Change-Id: I39a2a65e06cdf421786fbbfedecad604fcb3abd2

diff --git a/framework/source/services/substitutepathvars.cxx 
b/framework/source/services/substitutepathvars.cxx
index 833c6d4..cd6bead 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -184,6 +184,40 @@ enum PreDefVariable
 PREDEFVAR_COUNT
 };
 
+struct FixedVariable
+{
+const char* pVarName;
+boolbAbsPath;
+};
+
+// Table with all fixed/predefined variables supported.
+static const FixedVariable aFixedVarTable[PREDEFVAR_COUNT] =
+{
+{ "$(inst)", true  }, // PREDEFVAR_INST
+{ "$(prog)", true  }, // PREDEFVAR_PROG
+{ "$(user)", true  }, // PREDEFVAR_USER
+{ "$(work)", true  }, // PREDEFVAR_WORK, special variable
+  //  (transient)
+{ "$(home)", true  }, // PREDEFVAR_HOME
+{ "$(temp)", true  }, // PREDEFVAR_TEMP
+{ "$(path)", true  }, // PREDEFVAR_PATH
+{ "$(username)", false }, // PREDEFVAR_USERNAME
+{ "$(langid)",   false }, // PREDEFVAR_LANGID
+{ "$(vlang)",false }, // PREDEFVAR_VLANG
+{ "$(instpath)", true  }, // PREDEFVAR_INSTPATH
+{ "$(progpath)", true  }, // PREDEFVAR_PROGPATH
+{ "$(userpath)", true  }, // PREDEFVAR_USERPATH
+{ "$(insturl)",  true  }, // PREDEFVAR_INSTURL
+{ "$(progurl)",  true  }, // PREDEFVAR_PROGURL
+{ "$(userurl)",  true  }, // PREDEFVAR_USERURL
+{ "$(workdirurl)",   true  }, // PREDEFVAR_WORKDIRURL, special variable
+  //  (transient) and don't use for
+  //  resubstitution
+{ "$(baseinsturl)",  true  }, // PREDEFVAR_BASEINSTURL
+{ "$(userdataurl)",  true  }, // PREDEFVAR_USERDATAURL
+{ "$(brandbaseurl)", true  }  // PREDEFVAR_BRANDBASEURL
+};
+
 struct PredefinedPathVariables
 {
 // Predefined variables supported by substitute variables
@@ -288,13 +322,6 @@ private:
 css::uno::Reference< css::uno::XComponentContext > m_xContext;
 };
 
-struct FixedVariable
-{
-const char* pVarName;
-PreDefVariable  nEnumValue;
-boolbAbsPath;
-};
-
 struct TableEntry
 {
 const char* pOSString;
@@ -339,31 +366,6 @@ static const sal_Int16 aEnvPrioTable[ET_COUNT] =
 99, // ET_UNKNOWN
 };
 
-// Table with all fixed/predefined variables supported.
-static const FixedVariable aFixedVarTable[] =
-{
-{ "$(inst)",PREDEFVAR_INST, true  },
-{ "$(prog)",PREDEFVAR_PROG, true  },
-{ "$(user)",PREDEFVAR_USER, true  },
-{ "$(work)",PREDEFVAR_WORK, true  },  // Special 
variable (transient)!
-{ "$(home)",PREDEFVAR_HOME, true  },
-{ "$(temp)",PREDEFVAR_TEMP, true  },
-{ "$(path)",PREDEFVAR_PATH, true  },
-{ "$(username)",PREDEFVAR_USERNAME, false },
-{ "$(langid)",  PREDEFVAR_LANGID,   false },
-{ "$(vlang)",   PREDEFVAR_VLANG,false },
-{ "$(instpath)",PREDEFVAR_INSTPATH, true  },
-{ "$(progpath)",PREDEFVAR_PROGPATH, true  },
-{ "$(userpath)",PREDEFVAR_USERPATH, true  },
-{ "$(insturl)", PREDEFVAR_INSTURL,  true  },
-{ "$(progurl)", PREDEFVAR_PROGURL,  true  },
-{ "$(userurl)", PREDEFVAR_USERURL,  true  },
-{ "$(workdirurl)",  PREDEFVAR_WORKDIRURL,   true  },  // Special variable 
(transient) and don't use for resubstitution!

[Libreoffice-commits] core.git: Branch 'feature/cib_contract57' - 27 commits - basic/source configure.ac download.lst embeddedobj/source external/expat external/lcms2 external/libxml2 framework/source

2016-09-27 Thread Thorsten Behrens
 basic/source/sbx/sbxscan.cxx|7 
 configure.ac|2 
 download.lst|9 
 embeddedobj/source/msole/olecomponent.cxx   |   17 
 external/expat/CVE-2015-1283-refix.patch.1  |   37 
 external/expat/CVE-2016-0718-v2-2-1.patch.1 |  755 
++
 external/expat/UnpackedTarball_expat.mk |4 
 external/expat/expat-2.1.0.patch|   13 
 external/lcms2/0001-Added-an-extra-check-to-MLU-bounds.patch.1  |   25 
 external/lcms2/UnpackedTarball_lcms2.mk |1 
 external/libxml2/ExternalPackage_xml2.mk|2 
 framework/source/services/autorecovery.cxx  |   13 
 i18npool/qa/cppunit/test_breakiterator.cxx  |   16 
 i18npool/source/breakiterator/breakiterator_unicode.cxx |2 
 lotuswordpro/qa/cppunit/data/fail/recurse-3.lwp |binary
 lotuswordpro/source/filter/xfilter/xfcell.hxx   |2 
 lotuswordpro/source/filter/xfilter/xftable.cxx  |7 
 starmath/source/node.cxx|3 
 sw/qa/core/data/rtf/pass/tabbox-1.rtf   |binary
 sw/source/core/docnode/ndtbl.cxx|2 
 wizards/com/sun/star/wizards/table/FieldFormatter.java  |   14 
 writerfilter/qa/cppunittests/rtftok/data/fail/destinationtest-1.rtf |binary
 writerfilter/qa/cppunittests/rtftok/data/fail/destinationtest-2.rtf |binary
 writerfilter/qa/cppunittests/rtftok/data/fail/nopropertyset-1.rtf   |binary
 writerfilter/qa/cppunittests/rtftok/data/fail/popstate-1.rtf|binary
 writerfilter/qa/cppunittests/rtftok/data/fail/popstate-2.rtf|1 
 writerfilter/qa/cppunittests/rtftok/data/fail/propheight-1.rtf  |binary
 writerfilter/qa/cppunittests/rtftok/data/fail/tablemanager-5.rtf|binary
 writerfilter/qa/cppunittests/rtftok/data/fail/tablemanager-6.rtf|binary
 writerfilter/qa/cppunittests/rtftok/data/fail/tablemanager-7.rtf|binary
 writerfilter/qa/cppunittests/rtftok/data/fail/topcontext-2.rtf  |binary
 writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-1.rtf|binary
 writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-4.rtf|binary
 writerfilter/qa/cppunittests/rtftok/testrtftok.cxx  |4 
 writerfilter/source/dmapper/DomainMapper.cxx|   16 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx   |   32 
 writerfilter/source/dmapper/DomainMapper_Impl.hxx   |9 
 writerfilter/source/dmapper/PropertyMap.cxx |2 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx  |   51 
 writerfilter/source/rtftok/rtfdocumentimpl.hxx  |   37 
 40 files changed, 1002 insertions(+), 81 deletions(-)

New commits:
commit 229ad2273401a350c5788f40e4ebe1377e98ac97
Author: Thorsten Behrens 
Date:   Tue Sep 27 14:51:13 2016 +0200

bump custom version to 5.0.8.0.0+

Change-Id: Ib6152c6f3af744e2208119a61783357ce47ca8d6

diff --git a/configure.ac b/configure.ac
index 1c175c0..c42327b 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],[5.0.7.0.0+],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[5.0.8.0.0+],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
commit 07b0835dac3243b8863e11b3a4d5240c9861686e
Author: Caolán McNamara 
Date:   Thu Sep 22 21:11:56 2016 +0100

Resolves: tdf#101971 OleLoad under structured exception guards

sample pptx crashes down in the depths of (apparently pre-installed on
32bit Windows 10) Flash.ocx

Change-Id: I4e083d492e56e72df47b2c172d7f07f0e39b82ea
Reviewed-on: https://gerrit.libreoffice.org/29199
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 
(cherry picked from commit 373b44a2fcbe78e8a3ff14cd410826af151a6adf)
Reviewed-on: https://gerrit.libreoffice.org/29213
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit dafcb32f09c3acea8e2fa12e1d39261b13c740db)

diff --git a/embeddedobj/source/msole/olecomponent.cxx 
b/embeddedobj/source/msole/olecomponent.cxx
index edafa43..682ef5a 100644
--- a/embeddedobj/source/msole/olecomponent.cxx
+++ b/embeddedobj/source/msole/olecomponent.cxx
@@ -715,6 +715,19 @@ sal_Bool OleComponent::InitializeObject_Impl()
 return sal_True;
 }
 
+namespace
+{
+HRESULT OleLoadSeh(LPSTORAGE pIStorage

[Libreoffice-commits] online.git: 2 commits - loolwsd/Log.cpp loolwsd/TileCache.cpp loolwsd/Util.cpp loolwsd/Util.hpp

2016-09-27 Thread Tor Lillqvist
 loolwsd/Log.cpp   |3 +
 loolwsd/TileCache.cpp |   14 +++
 loolwsd/Util.cpp  |   96 ++
 loolwsd/Util.hpp  |   14 +++
 4 files changed, 120 insertions(+), 7 deletions(-)

New commits:
commit 891b942e7c1c4f41bfd138ece008d44d2ee87756
Author: Tor Lillqvist 
Date:   Tue Sep 27 15:48:32 2016 +0300

Handle disk full situations more gracefully

Introduce new API in our Util namespace to save data to a file
safely. The data is written to a temporary file in the same directory
and after that has succeeded, it is renamed atomicaly to the intended
name. If any step of the saving fails, neither the temporay file or
the intended target (if one exists before) is left behind.

Also add an API intended to alert the sysadmin in cases where their
attention and action are required. This is not yet properly
implemented. See FIXME comment for discussion.

diff --git a/loolwsd/TileCache.cpp b/loolwsd/TileCache.cpp
index 232ca2b..1f9694c 100644
--- a/loolwsd/TileCache.cpp
+++ b/loolwsd/TileCache.cpp
@@ -151,11 +151,12 @@ void TileCache::saveTileAndNotify(const TileDesc& tile, 
const char *data, const
 // Save to disk.
 const auto cachedName = (tileBeingRendered ? 
tileBeingRendered->getCacheName()
: cacheFileName(tile));
+
+// Ignore if we can't save the tile, things will work anyway, but slower. 
An error indication
+// supposed to reach a sysadmin has been produced in that case.
 const auto fileName = _cacheDir + "/" + cachedName;
-Log::trace() << "Saving cache tile: " << fileName << Log::end;
-std::fstream outStream(fileName, std::ios::out);
-outStream.write(data, size);
-outStream.close();
+if (Util::saveDataToFileSafely(fileName, data, size, 
Poco::Message::PRIO_CRITICAL))
+Log::trace() << "Saved cache tile: " << fileName << Log::end;
 
 // Notify subscribers, if any.
 if (tileBeingRendered)
@@ -274,9 +275,8 @@ void TileCache::saveRendering(const std::string& name, 
const std::string& dir, c
 
 const std::string fileName = dirName + "/" + name;
 
-std::fstream outStream(fileName, std::ios::out);
-outStream.write(data, size);
-outStream.close();
+// Is failing to save a font as important as failing to save cached tiles?
+Util::saveDataToFileSafely(fileName, data, size, 
Poco::Message::PRIO_CRITICAL);
 }
 
 std::unique_ptr TileCache::lookupRendering(const std::string& 
name, const std::string& dir)
diff --git a/loolwsd/Util.cpp b/loolwsd/Util.cpp
index 0d137c4..3f25ae4 100644
--- a/loolwsd/Util.cpp
+++ b/loolwsd/Util.cpp
@@ -19,8 +19,11 @@
 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -33,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -102,6 +106,17 @@ namespace rng
 }
 }
 
+namespace
+{
+void alertSysadminOrLogNormally(const std::string& message, const 
std::string& tag, Poco::Message::Priority priority)
+{
+if (priority <= Poco::Message::PRIO_CRITICAL)
+Util::alertSysadminWithoutSpamming(message, tag, 6);
+else
+Log::error(message + " Removing.");
+}
+}
+
 namespace Util
 {
 std::string encodeId(const unsigned number, const int padding)
@@ -142,6 +157,87 @@ namespace Util
 return std::getenv("DISPLAY") != nullptr;
 }
 
+bool saveDataToFileSafely(std::string fileName, const char *data, size_t 
size, Poco::Message::Priority priority)
+{
+const auto tempFileName = fileName + ".temp";
+std::fstream outStream(tempFileName, std::ios::out);
+
+// If we can't create the file properly, just remove it
+if (!outStream.good())
+{
+alertSysadminOrLogNormally("Creating " + tempFileName + " failed, 
disk full?", "diskfull?", priority);
+// Try removing both just in case
+std::remove(tempFileName.c_str());
+std::remove(fileName.c_str());
+return false;
+}
+else
+{
+outStream.write(data, size);
+if (!outStream.good())
+{
+alertSysadminOrLogNormally("Writing to " + tempFileName + " 
failed, disk full?", "diskfull?", priority);
+outStream.close();
+std::remove(tempFileName.c_str());
+std::remove(fileName.c_str());
+return false;
+}
+else
+{
+outStream.close();
+if (!outStream.good())
+{
+alertSysadminOrLogNormally("Closing " + tempFileName + " 
failed, disk full?", "diskfull?", priority);
+std::remove(tempFileName.c_str());
+std::remove(fileName.c_str());
+return false;
+}
+else
+   

[Libreoffice-commits] online.git: 3 commits - loolwsd/configure.ac loolwsd/Log.cpp loolwsd/LOOLForKit.cpp loolwsd/LOOLWSD.cpp loolwsd/loolwsd.xml.in

2016-09-27 Thread Jan Holesovsky
 loolwsd/LOOLForKit.cpp |   10 +-
 loolwsd/LOOLWSD.cpp|9 ++---
 loolwsd/Log.cpp|   18 +++---
 loolwsd/configure.ac   |   18 ++
 loolwsd/loolwsd.xml.in |6 +++---
 5 files changed, 43 insertions(+), 18 deletions(-)

New commits:
commit 0409243683621da95e1b0598cc1c839233345a6e
Author: Jan Holesovsky 
Date:   Tue Sep 27 14:30:45 2016 +0200

Log either to file or the console, not to both.

Change-Id: Iac1e74d0624c2bbac4ffaf99b11488f02e626a2a

diff --git a/loolwsd/LOOLForKit.cpp b/loolwsd/LOOLForKit.cpp
index f1408cd..376b91f 100644
--- a/loolwsd/LOOLForKit.cpp
+++ b/loolwsd/LOOLForKit.cpp
@@ -198,7 +198,15 @@ int main(int argc, char** argv)
 }
 
 // Initialization
-Log::initialize("frk", getenv("LOOL_LOGLEVEL"), getenv("LOOL_LOGCOLOR"));
+const bool logToFile = getenv("LOOL_LOGFILE");
+const auto logFilename = getenv("LOOL_LOGFILENAME");
+std::map logProperties;
+if (logToFile && logFilename)
+{
+logProperties["path"] = std::string(logFilename);
+}
+
+Log::initialize("frk", getenv("LOOL_LOGLEVEL"), getenv("LOOL_LOGCOLOR"), 
logToFile, logProperties);
 
 Util::setTerminationSignals();
 Util::setFatalSignals();
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 12654db..1c4d4a7 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1514,8 +1514,11 @@ void LOOLWSD::initialize(Application& self)
 
 ServerApplication::initialize(self);
 
-Log::warn("Launch this in your browser:");
-Log::warn(lcl_getLaunchURI());
+#if ENABLE_DEBUG
+std::cerr << "\nLaunch this in your browser:\n\n" <<
+lcl_getLaunchURI() <<
+"\n\nFull log is available in: " << LOOLWSD_LOGFILE << std::endl;
+#endif
 }
 
 void LOOLWSD::initializeSSL()
diff --git a/loolwsd/Log.cpp b/loolwsd/Log.cpp
index 498b881..8575b49 100644
--- a/loolwsd/Log.cpp
+++ b/loolwsd/Log.cpp
@@ -126,24 +126,20 @@ namespace Log
 strncpy(LogPrefix, oss.str().c_str(), sizeof(LogPrefix));
 
 // Configure the logger.
-AutoPtr channel = (withColor
-? static_cast(new 
Poco::ColorConsoleChannel())
-: static_cast(new 
Poco::ConsoleChannel()));
+AutoPtr channel;
 
 if (logToFile)
 {
-auto splitterChannel(new SplitterChannel());
-splitterChannel->addChannel(channel);
-
-AutoPtr rotatedFileChannel(new 
FileChannel("loolwsd.log"));
+channel = static_cast(new 
FileChannel("loolwsd.log"));
 for (const auto& pair : config)
 {
-rotatedFileChannel->setProperty(pair.first, pair.second);
+channel->setProperty(pair.first, pair.second);
 }
-
-splitterChannel->addChannel(rotatedFileChannel);
-channel = splitterChannel;
 }
+else if (withColor)
+channel = static_cast(new 
Poco::ColorConsoleChannel());
+else
+channel = static_cast(new Poco::ConsoleChannel());
 
 auto& logger = Poco::Logger::create(Source.name, channel, 
Poco::Message::PRIO_TRACE);
 
diff --git a/loolwsd/configure.ac b/loolwsd/configure.ac
index da761de..b5f18f4 100644
--- a/loolwsd/configure.ac
+++ b/loolwsd/configure.ac
@@ -115,7 +115,7 @@ if test "$enable_debug" = "yes"; then
ENABLE_DEBUG=true
LOOLWSD_LOGLEVEL="trace"
LOOLWSD_LOG_TO_FILE="true"
-   LOOLWSD_LOGFILE="loolwsd.log"
+   LOOLWSD_LOGFILE="/tmp/loolwsd.log"
debug_msg="low security debugging mode"
 else
 AC_DEFINE([ENABLE_DEBUG],0,[Whether to compile in some extra debugging 
support code and disable some security pieces])
@@ -128,6 +128,7 @@ if test -n "$with_logfile" ; then
LOOLWSD_LOGFILE="$with_logfile"
 fi
 AC_SUBST(LOOLWSD_LOGFILE)
+AC_DEFINE_UNQUOTED([LOOLWSD_LOGFILE],["$LOOLWSD_LOGFILE"],[Pathname of the 
logfile.])
 
 MAX_DOCUMENTS=10
 AS_IF([test -n "$with_max_documents"],
commit 0cb07b22e371c60d2013d12d0c9afc814181305f
Author: Jan Holesovsky 
Date:   Tue Sep 27 13:40:44 2016 +0200

Set less verbose logging for non-debug builds.

For debugging builds, use a logfile instead of the console.

Change-Id: I0d5654a568115c054c7439fe1358f5613dc432bf

diff --git a/loolwsd/configure.ac b/loolwsd/configure.ac
index bb41235..da761de 100644
--- a/loolwsd/configure.ac
+++ b/loolwsd/configure.ac
@@ -60,6 +60,10 @@ AC_ARG_WITH([lo-path],
 AS_HELP_STRING([--with-lo-path=],
[Path to a working installation directory or 
instdir of LibreOffice]))
 
+AC_ARG_WITH([logfile],
+AS_HELP_STRING([--with-logfile=],
+   [Path to the location of the logfile.]))
+
 AC_ARG_WITH([poco-includes],
 AS_HELP_STRING([--with-poco-includes=],
[Path to the "include" directory with the Poco 
headers]))
@@ -102,15 +106,28 @@ AS_IF([test "$enable_debug" = yes -a -n 
"

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

2016-09-27 Thread Szymon Kłos
 sfx2/source/notebookbar/PriorityHBox.cxx |   16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 9b8e77e2936d3dc44450a68a80de39658d69cd17
Author: Szymon Kłos 
Date:   Tue Sep 27 13:50:35 2016 +0200

tdf#101249 fixed crash after inserting OLE object 2

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

diff --git a/sfx2/source/notebookbar/PriorityHBox.cxx 
b/sfx2/source/notebookbar/PriorityHBox.cxx
index 6071b7e..307bad5 100644
--- a/sfx2/source/notebookbar/PriorityHBox.cxx
+++ b/sfx2/source/notebookbar/PriorityHBox.cxx
@@ -42,6 +42,8 @@ private:
 bool m_bInitialized;
 long m_nNeededWidth;
 
+ScopedVclPtr m_pSystemWindow;
+
 std::vector m_aSortedChilds;
 
 public:
@@ -59,10 +61,10 @@ public:
 
 virtual void dispose() override
 {
-if (m_bInitialized && SfxViewFrame::Current())
+if (m_pSystemWindow)
 {
-SystemWindow* pSystemWindow = 
SfxViewFrame::Current()->GetFrame().GetSystemWindow();
-pSystemWindow->RemoveEventListener(LINK(this, PriorityHBox, 
WindowEventListener));
+m_pSystemWindow->RemoveEventListener(LINK(this, PriorityHBox, 
WindowEventListener));
+m_pSystemWindow.clear();
 }
 VclHBox::dispose();
 }
@@ -99,14 +101,14 @@ public:
 {
 m_bInitialized = true;
 
-SystemWindow* pSystemWindow = 
SfxViewFrame::Current()->GetFrame().GetSystemWindow();
-if (pSystemWindow)
+m_pSystemWindow = 
SfxViewFrame::Current()->GetFrame().GetSystemWindow();
+if (m_pSystemWindow)
 {
-pSystemWindow->AddEventListener(LINK(this, PriorityHBox, 
WindowEventListener));
+m_pSystemWindow->AddEventListener(LINK(this, PriorityHBox, 
WindowEventListener));
 
 CalcNeededWidth();
 
-long nWidth = pSystemWindow->GetSizePixel().Width();
+long nWidth = m_pSystemWindow->GetSizePixel().Width();
 SetSizePixel(Size(nWidth, GetSizePixel().Height()));
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-27 Thread Noel Grandin
 compilerplugins/clang/constantparam.cxx |1 
 compilerplugins/clang/countusersofdefaultparams.cxx |1 
 compilerplugins/clang/plugin.cxx|   61 ++--
 compilerplugins/clang/plugin.hxx|2 
 compilerplugins/clang/singlevalfields.cxx   |1 
 compilerplugins/clang/unuseddefaultparams.cxx   |1 
 compilerplugins/clang/unusedenumvalues.cxx  |1 
 compilerplugins/clang/unusedfields.cxx  |1 
 compilerplugins/clang/unusedmethods.cxx |1 
 9 files changed, 42 insertions(+), 28 deletions(-)

New commits:
commit 3468dab9ff02ecdf5d0806a00e15b9b579c8dc35
Author: Noel Grandin 
Date:   Tue Sep 27 10:00:03 2016 +0200

clang plugins: do "dotdot" normalisation

which fixes some false positives

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

diff --git a/compilerplugins/clang/constantparam.cxx 
b/compilerplugins/clang/constantparam.cxx
index 61428ac..c517e59 100644
--- a/compilerplugins/clang/constantparam.cxx
+++ b/compilerplugins/clang/constantparam.cxx
@@ -137,6 +137,7 @@ void ConstantParam::addToCallSet(const FunctionDecl* 
functionDecl, int paramInde
 aInfo.callValue = callValue;
 
 aInfo.sourceLocation = filename.str() + ":" + 
std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc));
+normalizeDotDotInFilePath(aInfo.sourceLocation);
 
 callSet.insert(aInfo);
 }
diff --git a/compilerplugins/clang/countusersofdefaultparams.cxx 
b/compilerplugins/clang/countusersofdefaultparams.cxx
index a425cfc..b6323d0 100644
--- a/compilerplugins/clang/countusersofdefaultparams.cxx
+++ b/compilerplugins/clang/countusersofdefaultparams.cxx
@@ -130,6 +130,7 @@ void CountUsersOfDefaultParams::niceName(const 
FunctionDecl* functionDecl, MyFun
 }
 
 aInfo.sourceLocation = locationToString(functionDecl->getLocation());
+normalizeDotDotInFilePath(aInfo.sourceLocation);
 }
 
 bool CountUsersOfDefaultParams::VisitCallExpr(const CallExpr * callExpr) {
diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx
index 9f13ee7..3507371 100644
--- a/compilerplugins/clang/plugin.cxx
+++ b/compilerplugins/clang/plugin.cxx
@@ -55,34 +55,7 @@ bool Plugin::ignoreLocation( SourceLocation loc )
 return true;
 }
 std::string s(bufferName);
-for (std::string::size_type i = 0;;) {
-i = s.find("/.", i);
-if (i == std::string::npos) {
-break;
-}
-if (i + 2 == s.length() || s[i + 2] == '/') {
-s.erase(i, 2); // [AAA]/.[/CCC] -> [AAA][/CCC]
-} else if (s[i + 2] == '.'
-   && (i + 3 == s.length() || s[i + 3] == '/'))
-{
-if (i == 0) { // /..[/CCC] -> /..[/CCC]
-break;
-}
-auto j = s.rfind('/', i - 1);
-if (j == std::string::npos) {
-// BBB/..[/CCC] -> BBB/..[/CCC] (instead of BBB/../CCC ->
-// CCC, to avoid wrong ../../CCC -> CCC; relative paths
-// shouldn't happen anyway, and even if they did, wouldn't
-// match against WORKDIR anyway, as WORKDIR should be
-// absolute):
-break;
-}
-s.erase(j, i + 3 - j); // AAA/BBB/..[/CCC] -> AAA[/CCC]
-i = j;
-} else {
-i += 2;
-}
-}
+normalizeDotDotInFilePath(s);
 if (strncmp(s.c_str(), WORKDIR, strlen(WORKDIR)) == 0) {
 return true;
 }
@@ -93,6 +66,38 @@ bool Plugin::ignoreLocation( SourceLocation loc )
 return true;
 }
 
+void Plugin::normalizeDotDotInFilePath( std::string & s )
+{
+for (std::string::size_type i = 0;;) {
+i = s.find("/.", i);
+if (i == std::string::npos) {
+break;
+}
+if (i + 2 == s.length() || s[i + 2] == '/') {
+s.erase(i, 2); // [AAA]/.[/CCC] -> [AAA][/CCC]
+} else if (s[i + 2] == '.'
+   && (i + 3 == s.length() || s[i + 3] == '/'))
+{
+if (i == 0) { // /..[/CCC] -> /..[/CCC]
+break;
+}
+auto j = s.rfind('/', i - 1);
+if (j == std::string::npos) {
+// BBB/..[/CCC] -> BBB/..[/CCC] (instead of BBB/../CCC ->
+// CCC, to avoid wrong ../../CCC -> CCC; relative paths
+// shouldn't happen anyway, and even if they did, wouldn't
+// match against WORKDIR anyway, as WORKDIR should be
+// absolute):
+break;
+}
+s.erase(j, i + 3 - j); // AAA/BBB/..[/CCC] -> AAA[/CCC]
+i = j;
+} else {

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

2016-09-27 Thread Samuel Mehrbrodt
 sw/qa/extras/rtfimport/data/tdf90697.rtf |   73 ---
 sw/qa/extras/rtfimport/rtfimport.cxx |7 --
 2 files changed, 80 deletions(-)

New commits:
commit 7c3cb23136229c748984b49847af6f729ce3e6ba
Author: Samuel Mehrbrodt 
Date:   Tue Sep 27 11:52:16 2016 +

Revert "tdf#90697 unit test for rtf import"

b/c of crash in dbgutil build

This reverts commit 298571e2e10f5a925abc3cb75940dbef5701b583.

Change-Id: I41e6e9d17809e416813b4ee4032f38d3278b4103
Reviewed-on: https://gerrit.libreoffice.org/29319
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/sw/qa/extras/rtfimport/data/tdf90697.rtf 
b/sw/qa/extras/rtfimport/data/tdf90697.rtf
deleted file mode 100644
index 2e49379..000
--- a/sw/qa/extras/rtfimport/data/tdf90697.rtf
+++ /dev/null
@@ -1,73 +0,0 @@
-{\rtf1\ansi\ansicpg1252\uc1\deff0\deflang1031\deflangfe1031
-{\fonttbl
-{\f1\froman\fprq2 Times;}
-{\f2\fmodern\fprq1 Courier;}
-{\f3\froman\fprq2{\*\panose 0200050606020003}Liberation Serif;}
-{\f4\froman\fprq2{\*\panose 0200090307020003}Liberation Sans;}
-}
-{\colortbl;
-\red0\green0\blue0;
-\red0\green0\blue255;
-\red0\green255\blue255;
-\red0\green255\blue0;
-\red255\green0\blue255;
-\red255\green0\blue0;
-\red255\green255\blue0;
-\red255\green255\blue255;
-\red0\green0\blue128;
-\red0\green128\blue128;
-\red0\green128\blue0;
-\red128\green0\blue128;
-\red128\green0\blue0;
-\red128\green128\blue0;
-\red128\green128\blue128;
-\red192\green192\blue192;
-\red224\green224\blue224;
-\red208\green239\blue151;
-}
-{\stylesheet{\widctlpar\adjustright\fs20\cgrid\snext0 Normal;}
-{\*\cs10\additive Default Paragraph Font;}}
-{\info{\title V9.4 SAS System Output}{\author SAS Version 9.4}{\operator 
sastrust}{\version1}}
-\widowctrl\ftnbj\aenddoc\formshade\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\fet0
-\paperw11904\paperh16837\margl1077\margr850\margt567\margb567
-\sectd\linex0\endnhere\pgwsxn11904\pghsxn16837\pgnrestart\pgnstarts1\sbknone
-
-\headery567\footery567\marglsxn1077\margrsxn850\margtsxn567\margbsxn567
-{\*\bkmkstart IDX}{\*\bkmkend IDX}
-
-
-\pard\plain\fs20\cf1\ql\f1{{\fs22\f3}}
-{\par}
-
-
-\pard\par\pard\sect\sectd\linex0\endnhere\pgwsxn11904\pghsxn16837\sbknone
-
-\headery567\footery567\marglsxn1077\margrsxn850\margtsxn567\margbsxn567
-{\*\bkmkstart IDX1}{\*\bkmkend IDX1}
-{\header\pard\plain\qr\pvmrg\phmrg\posxr\posy0{
-}}
-
-\trowd\trkeep\trql\trgaph0
-\pard\plain\intbl\sb0\sa0\sl-21\fs2\cf1\ql\f2{\cell}
-\cltxlrtb\clvertalt\cellx10
-{\row}
-
-\pard\plain\fs20\cf1\ql\f1{{\fs24\f3 {\line}{\line}{\line}{\line}}}
-{\par}
-\pard\par\pard\sect\sectd\linex0\endnhere\pgwsxn11904\pghsxn16837\sbknone
-
-\headery567\footery567\marglsxn1077\margrsxn850\margtsxn567\margbsxn567
-{\*\bkmkstart IDX2}{\*\bkmkend IDX2}
-{\header\pard\plain\qr\pvmrg\phmrg\posxr\posy0{
-}}
-
-\trowd\trkeep\trql\trgaph0
-\pard\plain\intbl\sb0\sa0\sl-21\fs2\cf1\ql\f2{\cell}
-\cltxlrtb\clvertalt\cellx10
-{\row}
-
-
-
-\pard\plain\fs20\cf1\ql\f1{{\fs24\f3 
{\line}{\line}{\line}{\line}{\line}{\line}{\line}}}
-{\par}
-}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx 
b/sw/qa/extras/rtfimport/rtfimport.cxx
index 0b307d7..f66c2f0 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -2706,13 +2706,6 @@ DECLARE_RTFIMPORT_TEST(testTdf44986, "tdf44986.rtf")
 CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty< 
uno::Sequence >(xTableRows->getByIndex(0), 
"TableColumnSeparators").getLength());
 }
 
-DECLARE_RTFIMPORT_TEST(testTdf90697, "tdf90697.rtf")
-{
-// We want section breaks to be seen as section breaks, not as page breaks,
-// so this document should have only one page, not three.
-CPPUNIT_ASSERT_EQUAL(1, getPages());
-}
-
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* 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/sfx2 sfx2/source sw/qa sw/source

2016-09-27 Thread Miklos Vajna
 include/sfx2/viewsh.hxx|2 +
 sfx2/source/view/viewsh.cxx|5 ++
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   47 +++--
 sw/source/uibase/docvw/SidebarWin.cxx  |6 +++
 4 files changed, 58 insertions(+), 2 deletions(-)

New commits:
commit 45fa73f87258f51bf37c92052723c4b99c49dc2d
Author: Miklos Vajna 
Date:   Tue Sep 27 13:24:38 2016 +0200

sw: avoid emitting invalid cursor pos during end text edit of comment

A comment text edit (provided by editeng) works with relative twip
coordinates, conversion of the cursor position to absolute twips happens
in ImpEditView::ShowCursor(), provided that the pOutWin member has a map
mode origin that respresents the offset correctly.

This is not true during SwSidebarWin::DeactivatePostIt(), the map mode
origin is already reset back to 0, so just don't emit callbacks during
shutdown, the sw body text cursor will be shown later anyway.

Change-Id: I02c15bb9fad99db8e43fd2f37df770dd165be788

diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 27744e3..6583801 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -331,6 +331,8 @@ public:
 void setTiledSearching(bool bTiledSearching);
 /// Set if we are doing tiled painting.
 void setTiledPainting(bool bTiledPainting);
+/// Get if we are doing tiled painting.
+bool getTiledPainting() const;
 /// See lok::Document::getPart().
 virtual int getPart() const;
 virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const;
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 4a851bf..dacd236 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1508,6 +1508,11 @@ void SfxViewShell::setTiledPainting(bool bTiledPainting)
 pImpl->m_bTiledPainting = bTiledPainting;
 }
 
+bool SfxViewShell::getTiledPainting() const
+{
+return pImpl->m_bTiledPainting;
+}
+
 int SfxViewShell::getPart() const
 {
 return 0;
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 1e1a6bb..47beefc 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -75,6 +75,7 @@ public:
 void testCreateViewGraphicSelection();
 void testCreateViewTextSelection();
 void testRedlineColors();
+void testCommentEndTextEdit();
 
 CPPUNIT_TEST_SUITE(SwTiledRenderingTest);
 CPPUNIT_TEST(testRegisterCallback);
@@ -114,10 +115,11 @@ public:
 CPPUNIT_TEST(testCreateViewGraphicSelection);
 CPPUNIT_TEST(testCreateViewTextSelection);
 CPPUNIT_TEST(testRedlineColors);
+CPPUNIT_TEST(testCommentEndTextEdit);
 CPPUNIT_TEST_SUITE_END();
 
 private:
-SwXTextDocument* createDoc(const char* pName);
+SwXTextDocument* createDoc(const char* pName = nullptr);
 static void callback(int nType, const char* pPayload, void* pData);
 void callbackImpl(int nType, const char* pPayload);
 Rectangle m_aInvalidation;
@@ -147,7 +149,10 @@ SwTiledRenderingTest::SwTiledRenderingTest()
 
 SwXTextDocument* SwTiledRenderingTest::createDoc(const char* pName)
 {
-load(DATA_DIRECTORY, pName);
+if (!pName)
+loadURL("private:factory/swriter", nullptr);
+else
+load(DATA_DIRECTORY, pName);
 
 SwXTextDocument* pTextDocument = 
dynamic_cast(mxComponent.get());
 CPPUNIT_ASSERT(pTextDocument);
@@ -621,6 +626,7 @@ class ViewCallback
 {
 public:
 bool m_bOwnCursorInvalidated;
+bool m_bOwnCursorAtOrigin;
 Rectangle m_aOwnCursor;
 bool m_bViewCursorInvalidated;
 Rectangle m_aViewCursor;
@@ -635,6 +641,7 @@ public:
 
 ViewCallback()
 : m_bOwnCursorInvalidated(false),
+  m_bOwnCursorAtOrigin(false),
   m_bViewCursorInvalidated(false),
   m_bOwnSelectionSet(false),
   m_bViewSelectionSet(false),
@@ -673,6 +680,8 @@ public:
 m_aOwnCursor.setY(aSeq[1].toInt32());
 m_aOwnCursor.setWidth(aSeq[2].toInt32());
 m_aOwnCursor.setHeight(aSeq[3].toInt32());
+if (m_aOwnCursor.getX() == 0 && m_aOwnCursor.getY() == 0)
+m_bOwnCursorAtOrigin = true;
 }
 break;
 case LOK_CALLBACK_INVALIDATE_VIEW_CURSOR:
@@ -1460,6 +1469,40 @@ void SwTiledRenderingTest::testRedlineColors()
 comphelper::LibreOfficeKit::setActive(false);
 }
 
+void SwTiledRenderingTest::testCommentEndTextEdit()
+{
+// Create a document, type a character and remember the cursor position.
+comphelper::LibreOfficeKit::setActive();
+SwXTextDocument* pXTextDocument = createDoc();
+ViewCallback aView1;
+
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback,
 &aView1);
+pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'x', 0);
+pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'x', 0);
+Rectangle aBodyCu

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

2016-09-27 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/base.fods | 2129 +++
 1 file changed, 2129 insertions(+)

New commits:
commit d3ab1f8499a5e7040ff6bdf85b951bb9a3d6ac40
Author: Zdeněk Crhonek 
Date:   Thu Sep 22 20:27:13 2016 +0200

add BASE test case

Change-Id: I40ca3d8b2851bd2ccbf2826eb7ccf80abbf80b7e
Reviewed-on: https://gerrit.libreoffice.org/29193
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/base.fods 
b/sc/qa/unit/data/functions/fods/base.fods
new file mode 100644
index 000..eedaa09
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/base.fods
@@ -0,0 +1,2129 @@
+
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-05-23T19:52:21.032366237P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/3287bc2f91438085b7604773d5e0346fc3c3f452
+ 
+  
+   0
+   0
+   36415
+   41345
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   80
+   60
+   true
+   false
+  
+  
+   3
+   28
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   80
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 80
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ en
+ US
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   rgH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAzwAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkE0AElucHV0U2xvdDpUcmF5MQBEdXBsZXg6Tm9uZQAAEgBDT01QQVRfRFVQTEVYX01PREUPAER1cGxleE1vZGU6Ok9mZg==
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   
+  
+  
+   £
+
+   
+  
+  
+   -
+   £
+
+   
+   
+  
+  
+   £
+
+   
+  
+  
+   -
+   £

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

2016-09-27 Thread Michael Stahl
 configure.ac |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 16c0807d75cfd9ecbca9c703ed0eadda80529aab
Author: Michael Stahl 
Date:   Tue Sep 27 11:53:56 2016 +0200

configure: reject Apple JDK

Since commit 32bc8ddbf335dd26019edcf12758643b4cff9913 the jvmfwk rejects
Apple JDK and while the Java code builds fine with it, various tests such as
CppunitTest_dbaccess_hsqldb_test fail if it is the only installed JRE.

The simplest way to avoid the problem is to not allow building with
Apple JDK.

Change-Id: I5701e38cffded4596ac94608867a038ff76f75ec

diff --git a/configure.ac b/configure.ac
index 10c987b..e02559d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7100,6 +7100,13 @@ _ACEOF
 
 # now check if $JAVA_HOME is really valid
 if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
+case "${JAVA_HOME}" in
+/Library/Java/JavaVirtualMachines/*)
+;;
+*)
+AC_MSG_ERROR([JDK in $JAVA_HOME cannot be used in CppUnit 
tests - install Oracle JDK])
+;;
+esac
 if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
 JAVA_HOME_OK="NO"
 fi
commit 9a5b10544a11df3c0b08532a9143cd9adced4a4d
Author: Michael Stahl 
Date:   Tue Sep 27 11:32:08 2016 +0200

configure: non-working ant is an error, not a warning

For example ant 1.8.4 doesn't work with JDK 1.8.

Change-Id: I709fd0591c330cbfe6542976eb2fa0c3aec1e63f

diff --git a/configure.ac b/configure.ac
index 9622255..10c987b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11928,9 +11928,7 @@ EOF
 echo "configure: Ant test failed" >&5
 cat conftest.java >&5
 cat conftest.xml >&5
-AC_MSG_WARN([Ant does not work - Some Java projects will not 
build!])
-ANT_HOME=""
-add_warning "Ant does not work - Some Java projects will not 
build!"
+AC_MSG_ERROR([Ant does not work - Some Java projects will not 
build!])
 fi
 rm -f conftest* core core.* *.core
 fi
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-27 Thread Stephan Bergmann
 embeddedobj/source/msole/olevisual.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 91af7e0ee6e6a526af2b6564a3cfd313e1eac1f0
Author: Stephan Bergmann 
Date:   Tue Sep 27 11:48:58 2016 +0200

SAL_WARN in case bBackToLoaded failed

Change-Id: I3ee3801ae36b7394a97f46e76116cfd11c74de2d

diff --git a/embeddedobj/source/msole/olevisual.cxx 
b/embeddedobj/source/msole/olevisual.cxx
index 891de44..6d4d467 100644
--- a/embeddedobj/source/msole/olevisual.cxx
+++ b/embeddedobj/source/msole/olevisual.cxx
@@ -241,8 +241,11 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( 
sal_Int64 nAspect )
 {
 changeState(embed::EmbedStates::LOADED);
 }
-catch( const uno::Exception& )
+catch( const uno::Exception& e )
 {
+SAL_WARN(
+"embeddedobj.ole",
+"ignoring Exception " << e.Message);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-27 Thread Markus Mohrhard
 sc/source/core/data/colorscale.cxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit 6d66c353fb7ea7d47af2404e7e66cef0f6a690c3
Author: Markus Mohrhard 
Date:   Tue Sep 27 00:11:32 2016 +0200

tdf#101104 this paranoid safety check actually causes a bug

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

diff --git a/sc/source/core/data/colorscale.cxx 
b/sc/source/core/data/colorscale.cxx
index 42904e1..f71aa96 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -994,10 +994,6 @@ ScIconSetInfo* ScIconSetFormat::GetIconSetInfo(const 
ScAddress& rAddr) const
 double nMin = GetMinValue();
 double nMax = GetMaxValue();
 
-// this check is for safety
-if(nMin > nMax)
-return nullptr;
-
 sal_Int32 nIndex = 0;
 const_iterator itr = begin();
 ++itr;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - 2 commits - framework/source sc/source

2016-09-27 Thread Markus Mohrhard
 framework/source/services/substitutepathvars.cxx |3 ++-
 sc/source/core/data/colorscale.cxx   |4 
 2 files changed, 2 insertions(+), 5 deletions(-)

New commits:
commit d9d85d6c989e848922841d6ce36ab3f4dad054dd
Author: Markus Mohrhard 
Date:   Tue Sep 27 00:11:32 2016 +0200

tdf#101104 this paranoid safety check actually causes a bug

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

diff --git a/sc/source/core/data/colorscale.cxx 
b/sc/source/core/data/colorscale.cxx
index 6df2b18..e85fd9f 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -953,10 +953,6 @@ ScIconSetInfo* ScIconSetFormat::GetIconSetInfo(const 
ScAddress& rAddr) const
 double nMin = GetMinValue();
 double nMax = GetMaxValue();
 
-// this check is for safety
-if(nMin > nMax)
-return nullptr;
-
 sal_Int32 nIndex = 0;
 const_iterator itr = begin();
 ++itr;
commit eb637b3195f0099e6e21361d625d7292fb484329
Author: Stephan Bergmann 
Date:   Tue Sep 27 09:18:11 2016 +0200

tdf#101898: Only re-substitute whole segments with $(username)

...otherwise, if $(username) happens to be "user", it will endlessly re-
substitute inside a (already partly re-substituted) URL of the form

  $(user)/...

Regression introduced with 16fb0d3d0f68708c183c53bd18660a23970b77fe 
"tdf#98407
PathSubstitution: Add substitution for $(username)".

Change-Id: I1c8b64f383fdfd97fa5edc192e9ca4b46944d6f1
(cherry picked from commit 653e0ccc4e6230f28dd4c553dc7e9482beafa3cd)
Reviewed-on: https://gerrit.libreoffice.org/29314
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/framework/source/services/substitutepathvars.cxx 
b/framework/source/services/substitutepathvars.cxx
index 6263417..902a520 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -1095,7 +1095,8 @@ throw ( RuntimeException )
 if ( nPos >= 0 )
 {
 bool bMatch = true;
-if ( i->eVariable == PREDEFVAR_LANGID ||
+if ( i->eVariable == PREDEFVAR_USERNAME ||
+ i->eVariable == PREDEFVAR_LANGID ||
  i->eVariable == PREDEFVAR_VLANG )
 {
 // Special path variables as they can occur in the middle 
of a path. Only match if they
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: reportdesign/inc reportdesign/source reportdesign/uiconfig reportdesign/UIConfig_dbreport.mk

2016-09-27 Thread Caolán McNamara
 reportdesign/UIConfig_dbreport.mk  |1 
 reportdesign/inc/RptResId.hrc  |   12 -
 reportdesign/source/ui/dlg/AddField.cxx|  133 +
 reportdesign/source/ui/dlg/CondFormat.cxx  |1 
 reportdesign/source/ui/dlg/CondFormat.hrc  |   28 
 reportdesign/source/ui/dlg/CondFormat.src  |   87 -
 reportdesign/source/ui/dlg/Condition.cxx   |1 
 reportdesign/source/ui/inc/AddField.hxx|   13 +-
 reportdesign/source/ui/report/report.src   |5 
 reportdesign/uiconfig/dbreport/ui/floatingfield.ui |  127 
 10 files changed, 172 insertions(+), 236 deletions(-)

New commits:
commit 50cacaea4d8f2a27ea4d9e626dbb518a57eb9ffc
Author: Caolán McNamara 
Date:   Tue Sep 27 09:47:00 2016 +0100

convert floating add field to .ui format

Change-Id: Ica9adc19f370d6340d2f5fac552cf1b995b390e0

diff --git a/reportdesign/UIConfig_dbreport.mk 
b/reportdesign/UIConfig_dbreport.mk
index ffad8f3..5b8b4d4 100644
--- a/reportdesign/UIConfig_dbreport.mk
+++ b/reportdesign/UIConfig_dbreport.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/dbreport,\
reportdesign/uiconfig/dbreport/ui/condformatdialog \
reportdesign/uiconfig/dbreport/ui/conditionwin \
reportdesign/uiconfig/dbreport/ui/datetimedialog \
+   reportdesign/uiconfig/dbreport/ui/floatingfield \
reportdesign/uiconfig/dbreport/ui/floatingnavigator \
reportdesign/uiconfig/dbreport/ui/floatingsort \
reportdesign/uiconfig/dbreport/ui/pagedialog \
diff --git a/reportdesign/inc/RptResId.hrc b/reportdesign/inc/RptResId.hrc
index f12f0a7..7e57bba 100644
--- a/reportdesign/inc/RptResId.hrc
+++ b/reportdesign/inc/RptResId.hrc
@@ -202,7 +202,7 @@
 #define RID_ERR_NO_COMMAND  (RID_STRING_START + 151)
 #define RID_ERR_NO_OBJECTS  (RID_STRING_START + 152)
 #define RID_STR_AREA(RID_STRING_START + 153)
-#define RID_STR_INSERT  (RID_STRING_START + 154)
+// free
 #define RID_STR_UNDO_SHRINK (RID_STRING_START + 155)
 #define RID_STR_F_COUNTER   (RID_STRING_START + 156)
 #define RID_STR_F_ACCUMULATION  (RID_STRING_START + 157)
@@ -218,18 +218,8 @@
 #define RID_MENU_REPORT ( RID_MENU_START + 0 )
 #define RID_GROUPSROWPOPUPMENU  ( RID_MENU_START + 1 )
 #define RID_MENU_NAVIGATOR  ( RID_MENU_START + 2 )
-#define RID_TB_SORTING  ( RID_MENU_START + 3 )
 
-// free
 #define RID_SVXIMGLIST_RPTEXPL  (RID_IMAGELIST_START + 4)
-// free
-#define IMG_ADDFIELD_DLG_SC (RID_IMAGELIST_START + 8)
-// free
-#define IMG_ADDFIELD_DLG_LC (RID_IMAGELIST_START + 10)
-// free
-
-#define ADDFIELD_FL_HELP_SEPARATOR  (RID_IMAGELIST_START +  12)
-#define ADDFIELD_HELP_FIELD (RID_IMAGELIST_START +  13)
 
 // untyped 
-
 #define RID_STR_BOOL(RID_UNTYPED_START +  0 )
diff --git a/reportdesign/source/ui/dlg/AddField.cxx 
b/reportdesign/source/ui/dlg/AddField.cxx
index a88ac17..a09ba36 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -35,7 +35,6 @@
 #include 
 #include "helpids.hrc"
 #include "RptResId.hrc"
-#include "CondFormat.hrc"
 #include "ModuleHelper.hxx"
 #include "uistrings.hrc"
 #include "ColumnInfo.hxx"
@@ -64,7 +63,7 @@ class OAddFieldWindowListBox: public SvTreeListBox
 VclPtrm_pTabWin;
 
 public:
-explicit OAddFieldWindowListBox( OAddFieldWindow* _pParent );
+explicit OAddFieldWindowListBox(Window* pParent, OAddFieldWindow* 
pFieldWindow);
 virtual ~OAddFieldWindowListBox() override;
 virtual void dispose() override;
 
@@ -100,9 +99,9 @@ uno::Sequence< beans::PropertyValue > 
OAddFieldWindowListBox::getSelectedFieldDe
 // class OAddFieldWindowListBox
 
 
-OAddFieldWindowListBox::OAddFieldWindowListBox( OAddFieldWindow* _pParent )
-:SvTreeListBox( _pParent, WB_TABSTOP|WB_BORDER|WB_SORT )
-,m_pTabWin( _pParent )
+OAddFieldWindowListBox::OAddFieldWindowListBox(Window *pParent, 
OAddFieldWindow* pFieldWindow)
+: SvTreeListBox(pParent, WB_TABSTOP|WB_BORDER|WB_SORT)
+, m_pTabWin(pFieldWindow)
 {
 SetHelpId( HID_RPT_FIELD_SEL );
 SetSelectionMode(SelectionMode::Multiple);
@@ -147,26 +146,24 @@ void OAddFieldWindowListBox::StartDrag( sal_Int8 
/*_nAction*/, const Point& /*_r
 pDataContainer->StartDrag( this, DND_ACTION_COPYMOVE | DND_ACTION_LINK );
 }
 
-// class OAddFieldWindow
-
-
-OAddFieldWindow::OAddFieldWindow(vcl::Window* pParent
- ,const uno::Reference< beans::XPropertySet >& 
_xRowSet
- )
-:FloatingWindow(pParent, WinBits(WB_STDMODELESS|WB_SIZEABLE))

[Libreoffice-commits] online.git: loolwsd/LOOLWSD.cpp loolwsd/README.vars loolwsd/test

2016-09-27 Thread Tor Lillqvist
 loolwsd/LOOLWSD.cpp   |2 +-
 loolwsd/README.vars   |5 -
 loolwsd/test/test.cpp |2 +-
 3 files changed, 2 insertions(+), 7 deletions(-)

New commits:
commit db1733e70d8c67c05c9936d529d806bee97a9437
Author: Tor Lillqvist 
Date:   Tue Sep 27 12:38:43 2016 +0300

We don't need to check LOOL_NO_LOGCOLOR any more

Since 429cc9d49be497ca57f7f4a2103581baff547185, we use colour only
when stderr is going to a terminal.

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index abc2d06..5c81d42 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1400,7 +1400,7 @@ void LOOLWSD::initialize(Application& self)
 
 const auto logLevel = getConfigValue(conf, "logging.level", 
"trace");
 setenv("LOOL_LOGLEVEL", logLevel.c_str(), true);
-const auto withColor = !std::getenv("LOOL_NO_LOGCOLOR") && 
getConfigValue(conf, "logging.color", true);
+const auto withColor = getConfigValue(conf, "logging.color", true);
 if (withColor)
 {
 setenv("LOOL_LOGCOLOR", "1", true);
diff --git a/loolwsd/README.vars b/loolwsd/README.vars
index d78b553..305b9ea 100644
--- a/loolwsd/README.vars
+++ b/loolwsd/README.vars
@@ -16,11 +16,6 @@ LOOL_NO_AUTOSAVE
 if set avoids automatic saving of the document being
 edited.
 
-LOOL_NO_LOGCOLOR
-if set avoids use of colour escape sequences in the logging
-output when it is redirected. When stderr is going to a
-terminal colour is always used.
-
 SLEEPFORDEBUGGER
 sleep  seconds in the broken process after starting in
 order to allow a 'sudo gdb' session to 'attach ' to them.
diff --git a/loolwsd/test/test.cpp b/loolwsd/test/test.cpp
index 60d694f..d0404dd 100644
--- a/loolwsd/test/test.cpp
+++ b/loolwsd/test/test.cpp
@@ -72,7 +72,7 @@ bool filterTests(CPPUNIT_NS::TestRunner& runner, 
CPPUNIT_NS::Test* testRegistry)
 
 int main(int /*argc*/, char** /*argv*/)
 {
-Log::initialize("tst", "trace", !std::getenv("LOOL_NO_LOGCOLOR"), false);
+Log::initialize("tst");
 
 
 CPPUNIT_NS::TestResult controller;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/Log.cpp

2016-09-27 Thread Jan Holesovsky
 loolwsd/Log.cpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 429cc9d49be497ca57f7f4a2103581baff547185
Author: Jan Holesovsky 
Date:   Tue Sep 27 11:30:26 2016 +0200

Only use color output if we are not redirected to a file.

Change-Id: I494a6bcfa4505d28e0f028c3e8de955c18bb58dd

diff --git a/loolwsd/Log.cpp b/loolwsd/Log.cpp
index c146af5..8f0059d 100644
--- a/loolwsd/Log.cpp
+++ b/loolwsd/Log.cpp
@@ -126,7 +126,7 @@ namespace Log
 strncpy(LogPrefix, oss.str().c_str(), sizeof(LogPrefix));
 
 // Configure the logger.
-AutoPtr channel = (isatty(fileno(stderr)) || withColor
+AutoPtr channel = (isatty(fileno(stderr)) && withColor
 ? static_cast(new 
Poco::ColorConsoleChannel())
 : static_cast(new 
Poco::ConsoleChannel()));
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-27 Thread Caolán McNamara
 embeddedobj/source/msole/olevisual.cxx |   16 
 1 file changed, 16 insertions(+)

New commits:
commit e6fc195ae8a59d665395149ea5f06749c4c6a596
Author: Caolán McNamara 
Date:   Fri Sep 23 17:10:18 2016 +0100

Resolves: tdf#98946 too many running MathTypes...

causes mathtype to display a warning dialog, so
try restoring them back to loaded after loading
them in order to get their preferred size

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

diff --git a/embeddedobj/source/msole/olevisual.cxx 
b/embeddedobj/source/msole/olevisual.cxx
index 0445c09..891de44 100644
--- a/embeddedobj/source/msole/olevisual.cxx
+++ b/embeddedobj/source/msole/olevisual.cxx
@@ -203,6 +203,8 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( 
sal_Int64 nAspect )
 awt::Size aSize;
 aGuard.clear();
 
+bool bBackToLoaded = false;
+
 sal_Bool bSuccess = sal_False;
 if ( getCurrentState() == embed::EmbedStates::LOADED )
 {
@@ -211,6 +213,9 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( 
sal_Int64 nAspect )
 // try to switch the object to RUNNING state and request 
the value again
 try {
 changeState( embed::EmbedStates::RUNNING );
+// the links should be switched back to loaded state 
to avoid too
+// many open MathType instances
+bBackToLoaded = true;
 }
 catch( const uno::Exception& )
 {
@@ -230,6 +235,17 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( 
sal_Int64 nAspect )
 {
 }
 
+if (bBackToLoaded)
+{
+try
+{
+changeState(embed::EmbedStates::LOADED);
+}
+catch( const uno::Exception& )
+{
+}
+}
+
 if ( !bSuccess )
 {
 try
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-27 Thread Caolán McNamara
 sd/source/core/drawdoc3.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 19c191a0a92b6ae9ca86aa4ee7afb887fd42a209
Author: Caolán McNamara 
Date:   Mon Sep 19 12:24:02 2016 +0100

Related: rhbz#1353069 don't clear XATTR_FILL* from stylesheet if...

This is similar to de4908eb4d2f1f2ce38a37eea18a9efc4a0073b1 where

the master page is not the sole owner. Which happens when copying
and pasting slides which bring along a duplicate master page to
an already existing one, and the attempt to remove the duplicate
strips the fill properties from the shared stylesheet in use by
the other

regression from...

commit b876bbe2cacce8af379b10d82da6c7e7d229b361
Author: David Tardon 
Date:   Tue Apr 26 09:17:11 2016 +0200

rbhz#1326602 avoid exp. bg bitmaps from deleted slides

Change-Id: I0a3a34ade2ad8464b1edb67a6e28dab45c761a2c
(cherry picked from commit 914d72ee1edb351e4975a516240a38696f619217)
Reviewed-on: https://gerrit.libreoffice.org/29020
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index a86bdbd..0673299 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -1245,6 +1245,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* 
pMasterPage, bool bOnl
 {
 // Do not delete master pages that have their precious flag set
 bool bDeleteMaster = !pMaster->IsPrecious();
+bool bSoleOwnerOfStyleSheet = true;
 OUString aLayoutName = pMaster->GetLayoutName();
 
 if(bOnlyDuplicatePages )
@@ -1259,6 +1260,10 @@ void 
SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
 {
 // duplicate page found -> remove it
 bDeleteMaster = true;
+
+const SfxStyleSheet* pRefSheet = 
pMaster->getSdrPageProperties().GetStyleSheet();
+const SfxStyleSheet* pTestSheet = 
pMPg->getSdrPageProperties().GetStyleSheet();
+bSoleOwnerOfStyleSheet = pRefSheet != pTestSheet;
 }
 }
 }
@@ -1292,7 +1297,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* 
pMasterPage, bool bOnl
 delete pNotesMaster;
 
 if( bUndo )
-
AddUndo(GetSdrUndoFactory().CreateUndoDeletePage(*pMaster));
+AddUndo(GetSdrUndoFactory().CreateUndoDeletePage(*pMaster, 
bSoleOwnerOfStyleSheet));
 
 RemoveMasterPage( pMaster->GetPageNum() );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - editeng/source

2016-09-27 Thread Caolán McNamara
 editeng/source/misc/svxacorr.cxx |   18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

New commits:
commit 3d83d4eb6bf3ed8f0fc52d2edd327a6a931a7f47
Author: Caolán McNamara 
Date:   Wed Sep 21 20:34:32 2016 +0100

Resolves: tdf#83037 <-->  corrected into ← →  instead of ↔

don't use - as a word separator except for breaking up
a compound word for the purposes of tdf#55693, e.g.
TEst-TEst autocorrected to Test-Test)

Change-Id: Ie52a16af0b5838d1ba0de9c5f9c30dcab05c3bc7
(cherry picked from commit 0bfefc0b396bd61cc5f508bf86afc12cfadaa483)
Reviewed-on: https://gerrit.libreoffice.org/29190
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 1fe52ca..b363614 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -228,7 +228,15 @@ bool SvxAutoCorrect::IsAutoCorrectChar( sal_Unicode cChar )
 cChar == '*'  || cChar == '_'  || cChar == '%' ||
 cChar == '.'  || cChar == ','  || cChar == ';' ||
 cChar == ':'  || cChar == '?' || cChar == '!' ||
-cChar == '/'  || cChar == '-';
+cChar == '/';
+}
+
+namespace
+{
+bool IsCompoundWordDelimChar(sal_Unicode cChar)
+{
+return  cChar == '-' || SvxAutoCorrect::IsAutoCorrectChar(cChar);
+}
 }
 
 bool SvxAutoCorrect::NeedsHardspaceAutocorr( sal_Unicode cChar )
@@ -368,7 +376,7 @@ bool SvxAutoCorrect::FnCapitalStartWord( SvxAutoCorrDoc& 
rDoc, const OUString& r
 // Find all compound word delimiters
 for (sal_Int32 n = nSttPos; n < nEndPos; ++n)
 {
-if (IsAutoCorrectChar(rTxt[ n ]))
+if (IsCompoundWordDelimChar(rTxt[ n ]))
 {
 aDelimiters.push_back( n + 1 ); // Get position of char after 
delimiter
 }
@@ -379,7 +387,7 @@ bool SvxAutoCorrect::FnCapitalStartWord( SvxAutoCorrDoc& 
rDoc, const OUString& r
 // char will not be included in rTxt.
 // If the last AutoCorrect char was not a newline, then the AutoCorrect
 // character will be the last character in rTxt.
-if (!IsAutoCorrectChar(rTxt[nEndPos-1]))
+if (!IsCompoundWordDelimChar(rTxt[nEndPos-1]))
 aDelimiters.push_back(nEndPos);
 
 // Iterate through the word and all words that compose it.
@@ -1319,10 +1327,6 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& 
rDoc, const OUString& rTxt,
 OUString aPara;
 OUString* pPara = IsAutoCorrFlag(CapitalStartSentence) ? &aPara : 
nullptr;
 
-// since LibO 4.1, '-' is a word separator
-// fdo#67742 avoid "--" to be replaced by "–" if next is "-"
-if( rTxt.endsWith( "---" ) )
-break;
 bool bChgWord = rDoc.ChgAutoCorrWord( nCapLttrPos, nInsPos,
 *this, pPara );
 if( !bChgWord )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/test

2016-09-27 Thread Tor Lillqvist
 loolwsd/test/run_unit.sh.in |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit f437ffa47eb1f37c72f44d6a16e97713f94dc5ed
Author: Tor Lillqvist 
Date:   Tue Sep 27 12:07:18 2016 +0300

Bin pointless non-informative copy-pasta

(A cppunit-based test program already itself outputs what tests in it
failed, if any.)

diff --git a/loolwsd/test/run_unit.sh.in b/loolwsd/test/run_unit.sh.in
index cd5253a..404e011 100755
--- a/loolwsd/test/run_unit.sh.in
+++ b/loolwsd/test/run_unit.sh.in
@@ -76,9 +76,6 @@ if test "z$tst" == "z"; then
 echo ":test-result: PASS run_test.sh" >> $oldpath/$test_output
 retval=0
  else
- echo "="
-echo "Test failed on unit:"
- echo "="
 echo ":test-result: FAIL run_test.sh" >> $oldpath/$test_output
 retval=1
  fi
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sc/source

2016-09-27 Thread Caolán McNamara
 sc/source/ui/Accessibility/AccessibleCsvControl.cxx |   33 +---
 sc/source/ui/inc/AccessibleCsvControl.hxx   |9 +
 2 files changed, 38 insertions(+), 4 deletions(-)

New commits:
commit b744b427966644df4464af4ef99b01410ff12380
Author: Caolán McNamara 
Date:   Mon Sep 26 16:26:40 2016 +0100

Resolves: rhbz#1378521 csv dialog a11y returns a new accessible on every 
query

the gtk a11y rather assumes that the a11y things "belong" to the matching
widget/component and those owners will dispose them, so follow that pattern
here and dispose the a11y objects when the parent is disposed

to reproduce, enable a11y, load a csv, click once in the first column
of the preview area and cancel the dialog and close libreoffice

Reviewed-on: https://gerrit.libreoffice.org/29301
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit f626fd5f897796451685c06ce5f397a90aeaa8e6)

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

diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx 
b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index 61d32ee..39ab0c4 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -865,6 +865,15 @@ ScAccessibleCsvGrid::~ScAccessibleCsvGrid()
 implDispose();
 }
 
+void ScAccessibleCsvGrid::disposing()
+{
+SolarMutexGuard aGuard;
+for (XAccessibleSet::iterator aI = maAccessibleChildren.begin(); aI != 
maAccessibleChildren.end(); ++aI)
+aI->second->dispose();
+maAccessibleChildren.clear();
+ScAccessibleCsvControl::disposing();
+}
+
 // XAccessibleComponent ---
 
 Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleAtPoint( 
const css::awt::Point& rPoint )
@@ -882,7 +891,7 @@ Reference< XAccessible > SAL_CALL 
ScAccessibleCsvGrid::getAccessibleAtPoint( con
 lcl_GetApiColumn( rGrid.GetColumnFromX( rPoint.X ) ) : 0;
 sal_Int32 nRow = (rPoint.Y >= rGrid.GetHdrHeight()) ?
 (rGrid.GetLineFromY( rPoint.Y ) - rGrid.GetFirstVisLine() + 1) : 0;
-xRet = implCreateCellObj( nRow, nColumn );
+xRet = getAccessibleCell(nRow, nColumn);
 }
 return xRet;
 }
@@ -912,13 +921,30 @@ sal_Int32 SAL_CALL 
ScAccessibleCsvGrid::getAccessibleChildCount() throw( Runtime
 return implGetCellCount();
 }
 
+Reference ScAccessibleCsvGrid::getAccessibleCell(sal_Int32 nRow, 
sal_Int32 nColumn)
+{
+sal_Int32 nIndex = implGetIndex(nRow, nColumn);
+
+XAccessibleSet::iterator aI = maAccessibleChildren.lower_bound(nIndex);
+if (aI != maAccessibleChildren.end() && 
!(maAccessibleChildren.key_comp()(nIndex, aI->first)))
+{
+// key already exists
+return Reference(aI->second.get());
+}
+// key does not exist
+rtl::Reference xNew = implCreateCellObj(nRow, 
nColumn);
+maAccessibleChildren.insert(aI, XAccessibleSet::value_type(nIndex, xNew));
+return Reference(xNew.get());
+}
+
 Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleChild( 
sal_Int32 nIndex )
 throw( IndexOutOfBoundsException, RuntimeException, std::exception )
 {
 SolarMutexGuard aGuard;
 ensureAlive();
 ensureValidIndex( nIndex );
-return implCreateCellObj( implGetRow( nIndex ), implGetColumn( nIndex ) );
+
+return getAccessibleCell(implGetRow(nIndex), implGetColumn(nIndex));
 }
 
 Reference< XAccessibleRelationSet > SAL_CALL 
ScAccessibleCsvGrid::getAccessibleRelationSet()
@@ -1066,7 +1092,7 @@ Reference< XAccessible > SAL_CALL 
ScAccessibleCsvGrid::getAccessibleCellAt( sal_
 SolarMutexGuard aGuard;
 ensureAlive();
 ensureValidPosition( nRow, nColumn );
-return implCreateCellObj( nRow, nColumn );
+return getAccessibleCell(nRow, nColumn);
 }
 
 Reference< XAccessible > SAL_CALL ScAccessibleCsvGrid::getAccessibleCaption()
@@ -1235,7 +1261,6 @@ Sequence< sal_Int8 > SAL_CALL 
ScAccessibleCsvGrid::getImplementationId() throw(
 void ScAccessibleCsvGrid::SendFocusEvent( bool bFocused )
 {
 ScAccessibleCsvControl::SendFocusEvent( bFocused );
-
 AccessibleEventObject aEvent;
 aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
 aEvent.Source = Reference< XAccessible >( this );
diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx 
b/sc/source/ui/inc/AccessibleCsvControl.hxx
index 9b8838f..ea8553a 100644
--- a/sc/source/ui/inc/AccessibleCsvControl.hxx
+++ b/sc/source/ui/inc/AccessibleCsvControl.hxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include "AccessibleContextBase.hxx"
+#include 
 
 class ScCsvControl;
 namespace utl { class AccessibleStateSetHelper; }
@@ -285,10 +286,16 @@ class ScAccessibleCsvGrid : public 
ScAccessibleCsvControl, public ScAccessibleCs
 {
 protected:
 typ

[Libreoffice-commits] core.git: icon-themes/galaxy officecfg/registry sw/inc sw/qa sw/sdi sw/source sw/uiconfig

2016-09-27 Thread Miklos Vajna
 icon-themes/galaxy/cmd/lc_smallcaps.png  |binary
 icon-themes/galaxy/cmd/sc_smallcaps.png  |binary
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |8 ++
 sw/inc/cmdid.h   |1 
 sw/qa/extras/uiwriter/uiwriter.cxx   |   20 
+
 sw/sdi/_textsh.sdi   |6 +
 sw/sdi/swriter.sdi   |   18 

 sw/source/uibase/shells/txtattr.cxx  |   37 
++
 sw/uiconfig/swriter/toolbar/textobjectbar.xml|1 
 9 files changed, 91 insertions(+)

New commits:
commit d378cd2f766eeb1fd1c98f62c9ae6b5b59fd00f1
Author: Miklos Vajna 
Date:   Tue Sep 27 09:11:25 2016 +0200

tdf#87914 sw: add an initial .uno:SmallCaps command

- handle it in SwTextShell (for normal Writer text)
- simple icon in the galaxy theme

Change-Id: Ib8f11dbca28b19a2fc0411c92d9f0b4b052277bb

diff --git a/icon-themes/galaxy/cmd/lc_smallcaps.png 
b/icon-themes/galaxy/cmd/lc_smallcaps.png
new file mode 100644
index 000..7ef20ce
Binary files /dev/null and b/icon-themes/galaxy/cmd/lc_smallcaps.png differ
diff --git a/icon-themes/galaxy/cmd/sc_smallcaps.png 
b/icon-themes/galaxy/cmd/sc_smallcaps.png
new file mode 100644
index 000..eaf4101
Binary files /dev/null and b/icon-themes/galaxy/cmd/sc_smallcaps.png differ
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index eecbb0a..6ec9141 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -3871,6 +3871,14 @@
   9
 
   
+  
+
+  Small capitals
+
+
+  9
+
+  
   
 
   ~Distribution...
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 7223028..284bcfb 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -311,6 +311,7 @@
 #define FN_AUTOFORMAT_REDLINE_APPLY (FN_FORMAT + 6 ) /* apply autoformat with 
Redlining */
 #define FN_SET_SUPER_SCRIPT (FN_FORMAT + 11) /* superscript */
 #define FN_SET_SUB_SCRIPT   (FN_FORMAT + 12) /* subscript */
+#define FN_SET_SMALL_CAPS   (FN_FORMAT + 13) /* small caps */
 
 #define FN_FORMAT_PAGE_SETTING_DLG  (FN_FORMAT + 42)  /*  */
 #define FN_NUM_FORMAT_TABLE_DLG (FN_FORMAT + 45)  /* number format in 
table */
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index d6deb9d..6792919 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -11,6 +11,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -199,6 +200,7 @@ public:
 void testTdf88453();
 void testTdf88453Table();
 void testClassificationPaste();
+void testSmallCaps();
 void testTdf98987();
 void testTdf99004();
 void testTdf84695();
@@ -307,6 +309,7 @@ public:
 CPPUNIT_TEST(testTdf88453);
 CPPUNIT_TEST(testTdf88453Table);
 CPPUNIT_TEST(testClassificationPaste);
+CPPUNIT_TEST(testSmallCaps);
 CPPUNIT_TEST(testTdf98987);
 CPPUNIT_TEST(testTdf99004);
 CPPUNIT_TEST(testTdf84695);
@@ -3710,6 +3713,23 @@ void SwUiWriterTest::testClassificationPaste()
 xSourceComponent->dispose();
 }
 
+void SwUiWriterTest::testSmallCaps()
+{
+// Create a document, add some characters and select them.
+createDoc();
+SwDoc* pDoc = createDoc();
+SwDocShell* pDocShell = pDoc->GetDocShell();
+SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+pWrtShell->Insert("text");
+pWrtShell->SelAll();
+
+// Dispatch the command to make them formatted small capitals.
+lcl_dispatchCommand(mxComponent, ".uno:SmallCaps", {});
+
+// This was css::style::CaseMap::NONE as the shell didn't handle the 
command.
+CPPUNIT_ASSERT_EQUAL(css::style::CaseMap::SMALLCAPS, 
getProperty(getRun(getParagraph(1), 1), "CharCaseMap"));
+}
+
 void SwUiWriterTest::testTdf98987()
 {
 createDoc("tdf98987.docx");
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
index a6991e8..88a1f9c 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -1442,6 +1442,12 @@ interface BaseText
 StateMethod = GetAttrState ;
 DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
 ]
+FN_SET_SMALL_CAPS
+[
+ExecMethod = ExecCharAttr ;
+StateMethod = GetAttrState ;
+DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+]
 SID_ATTR_CHAR_CASEMAP // status(final|play)
 [
 ExecMethod = ExecTextCtrl;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index c5c6568..93c18fa 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -5737,6 +5737,24 @@ SfxBoolItem SuperScript FN_

[Libreoffice-commits] online.git: loolwsd/MessageQueue.cpp

2016-09-27 Thread Tor Lillqvist
 loolwsd/MessageQueue.cpp |   29 +++--
 1 file changed, 15 insertions(+), 14 deletions(-)

New commits:
commit 79229481427f70e8335cc8d4ca179f07660b5efa
Author: Tor Lillqvist 
Date:   Mon Sep 26 20:13:50 2016 +0300

Get rid of some fragile string literal length counts

Basically, instead of foo.compare(0, 3, "bar") use
LOOLProtocol::getFirstToken(foo)!="bar". Using a separate length of a
string literal is very fragile, it is easy to get the length wrong, or
forget to change it in case the string changes. See
137e677eb0d6af1996701b2bd1b27a6eb3822613.

It isn't entirely sure to me whether was is kept in a message queue
follows LOOL protocol message syntax, but it seems to be so in
practice, so we can use LOOLProtocol::getFirstToken().

Also, calls like msg.compare(0, 4, "tile") add undocumented implicit
requirements that the token in question must be unique as an initial
substring of the first tokens of all messages. It actually isn't,
there is also "tilecombine". But in this case, that was taken care of
by checking for "tilecombine" first. Ugh. Whether that was by accident
or design is hard to say, but at least there was no comment indicating
intentionality.

We still have lots of similar fragile mis-use of std::string::find().

diff --git a/loolwsd/MessageQueue.cpp b/loolwsd/MessageQueue.cpp
index 4e33fe0..b9059cb 100644
--- a/loolwsd/MessageQueue.cpp
+++ b/loolwsd/MessageQueue.cpp
@@ -13,8 +13,9 @@
 
 #include 
 
-#include 
+#include 
 #include 
+#include 
 
 using Poco::StringTokenizer;
 
@@ -76,8 +77,9 @@ void MessageQueue::clear_impl()
 void TileQueue::put_impl(const Payload& value)
 {
 const auto msg = std::string(value.data(), value.size());
+const std::string firstToken = LOOLProtocol::getFirstToken(value);
 
-if (msg.compare(0, 11, "canceltiles") == 0)
+if (firstToken == "canceltiles")
 {
 Log::trace("Processing " + msg);
 Log::trace() << "Before canceltiles have " << _queue.size() << " in 
queue." << Log::end;
@@ -104,7 +106,7 @@ void TileQueue::put_impl(const Payload& value)
 Log::trace() << "After canceltiles have " << _queue.size() << " in 
queue." << Log::end;
 return;
 }
-else if (msg.compare(0, 11, "tilecombine") == 0)
+else if (firstToken == "tilecombine")
 {
 // Breakup tilecombine and deduplicate (we are re-combining the tiles
 // in the get_impl() again)
@@ -119,7 +121,7 @@ void TileQueue::put_impl(const Payload& value)
 }
 return;
 }
-else if (msg.compare(0, 4, "tile") == 0)
+else if (firstToken == "tile")
 {
 removeDuplicate(msg);
 
@@ -135,8 +137,12 @@ void TileQueue::put_impl(const Payload& value)
 
 void TileQueue::removeDuplicate(const std::string& tileMsg)
 {
-assert(tileMsg.compare(0, 4, "tile") == 0);
+assert(LOOLProtocol::getFirstToken(tileMsg) == "tile");
 
+// FIXME: This looks rather fragile; but OTOH if I understand correctly 
this doesn't handle
+// input from clients, but strings we have created ourselves here in C++ 
code, so probably we
+// can be sure that the "ver" parameter is always in such a location that 
this does what we
+// mean.
 const std::string newMsg = tileMsg.substr(0, tileMsg.find(" ver"));
 
 for (size_t i = 0; i < _queue.size(); ++i)
@@ -155,11 +161,6 @@ void TileQueue::removeDuplicate(const std::string& tileMsg)
 
 bool TileQueue::priority(const std::string& tileMsg)
 {
-if (tileMsg.compare(0, 5, "tile ") != 0)
-{
-return false;
-}
-
 auto tile = TileDesc::parse(tileMsg); //FIXME: Expensive, avoid.
 
 for (int view : _viewOrder)
@@ -179,7 +180,8 @@ MessageQueue::Payload TileQueue::get_impl()
 
 auto msg = std::string(front.data(), front.size());
 
-if (msg.compare(0, 5, "tile ") != 0 || msg.find("id=") != 
std::string::npos)
+std::string id;
+if (LOOLProtocol::getFirstToken(msg) != "tile" || 
LOOLProtocol::getTokenStringFromMessage(msg, "id", id))
 {
 // Don't combine non-tiles or tiles with id.
 Log::trace() << "MessageQueue res: " << msg << Log::end;
@@ -198,7 +200,7 @@ MessageQueue::Payload TileQueue::get_impl()
 // avoid starving - stop the search when we reach a non-tile,
 // otherwise we may keep growing the queue of unhandled stuff (both
 // tiles and non-tiles)
-if (prio.compare(0, 5, "tile ") != 0)
+if (LOOLProtocol::getFirstToken(prio) != "tile")
 break;
 
 if (priority(prio))
@@ -221,8 +223,7 @@ MessageQueue::Payload TileQueue::get_impl()
 {
 auto& it = _queue[i];
 msg = std::string(it.data(), it.size());
-if (msg.compare(0, 5, "tile ") != 0 ||
-msg.find("id=") != std::string::npos)
+if (LOOLProtocol::getFirstToken(msg) != "tile" || 
LOOLProtocol::getTokenStringFromMessage(msg, "id", id))
 {
 /

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - 5 commits - desktop/qa sc/qa sw/qa sw/source

2016-09-27 Thread Miklos Vajna
 desktop/qa/desktop_lib/test_desktop_lib.cxx  |   48 ++-
 sc/qa/unit/tiledrendering/tiledrendering.cxx |4 +-
 sw/qa/extras/uiwriter/uiwriter.cxx   |   25 ++
 sw/source/core/crsr/viscrs.cxx   |   10 +
 sw/source/core/txtnode/ndtxt.cxx |   26 ++
 5 files changed, 109 insertions(+), 4 deletions(-)

New commits:
commit 69e7adc64ae3834213896f73c286848b1108d32a
Author: Miklos Vajna 
Date:   Mon Sep 26 17:51:17 2016 +0200

CppunitTest_sw_uiwriter: avoid SfxLokHelper

It assumes that the process has only a single document opened
(createView() creates a new window on the frame returned by
SfxViewFrame::First()), while it's possible that in this test an other
testcase forgot to dispose its component.

This way testCursorWindows() depends less on other testcases, and
ideally all testcases should be entirely independent of each other.

Reviewed-on: https://gerrit.libreoffice.org/29300
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 
(cherry picked from commit c8968b12f9ae88f592d8a8d17cdecfae8aa8722e)

Conflicts:
sw/qa/extras/uiwriter/uiwriter.cxx

Change-Id: I35decb0b69aeebd3984f4da4386c696a63fe3e04

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index cb55d49..208efa4 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -88,7 +88,8 @@
 #include 
 #include 
 #include 
-#include 
+#include 
+#include 
 
 static const char* DATA_DIRECTORY = "/sw/qa/extras/uiwriter/data/";
 
@@ -3408,7 +3409,7 @@ void SwUiWriterTest::testCursorWindows()
 SwWrtShell* pWrtShell1 = pDocShell->GetWrtShell();
 
 // Create a second view and type something.
-SfxLokHelper::createView();
+
pDocShell->GetViewShell()->GetViewFrame()->GetDispatcher()->Execute(SID_NEWWINDOW,
 SfxCallMode::SYNCHRON | SfxCallMode::RECORD);
 SwWrtShell* pWrtShell2 = pDocShell->GetWrtShell();
 OUString aText("foo");
 pWrtShell2->Insert(aText);
commit c102627a72d1650a19affd20b76ae74bb1b13de4
Author: Miklos Vajna 
Date:   Mon Sep 26 14:31:54 2016 +0200

CppunitTest_sw_rtfimport: fix ASan/UBSan build failure

pDocShell->GetWrtShell() can be nullptr, even if pDocShell is not.

(cherry picked from commit 56cda453daf71a368f316cb559e3e1f529e1c4fa)

Conflicts:
sw/source/core/txtnode/ndtxt.cxx

Change-Id: I2d60475abe545c2dbb13ede74d2d65432a3c93a7

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index e4eaef8..22f9ef3 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1165,21 +1165,24 @@ void SwTextNode::Update(
 // The cursors of other shells shouldn't be moved, either.
 if (SwDocShell* pDocShell = GetDoc()->GetDocShell())
 {
-for (SwViewShell& rShell : 
pDocShell->GetWrtShell()->GetRingContainer())
+if (pDocShell->GetWrtShell())
 {
-auto pWrtShell = dynamic_cast(&rShell);
-if (!pWrtShell || pWrtShell == pDocShell->GetWrtShell())
-continue;
+for (SwViewShell& rShell : 
pDocShell->GetWrtShell()->GetRingContainer())
+{
+auto pWrtShell = dynamic_cast(&rShell);
+if (!pWrtShell || pWrtShell == pDocShell->GetWrtShell())
+continue;
 
-SwShellCursor* pCursor = pWrtShell->_GetCursor();
-if (!pCursor)
-continue;
+SwShellCursor* pCursor = pWrtShell->_GetCursor();
+if (!pCursor)
+continue;
 
-SwIndex& rIndex = 
const_cast(pCursor->Start()->nContent);
-if (&pCursor->Start()->nNode.GetNode() == this && 
rIndex.GetIndex() == rPos.GetIndex())
-{
-// The cursor position of this other shell is exactly our 
insert position.
-rIndex.Assign(&aTmpIdxReg, rIndex.GetIndex());
+SwIndex& rIndex = 
const_cast(pCursor->Start()->nContent);
+if (&pCursor->Start()->nNode.GetNode() == this && 
rIndex.GetIndex() == rPos.GetIndex())
+{
+// The cursor position of this other shell is exactly 
our insert position.
+rIndex.Assign(&aTmpIdxReg, rIndex.GetIndex());
+}
 }
 }
 }
commit 9eea58e8027fa8c17bbeaf43141d29db966c5d2a
Author: Miklos Vajna 
Date:   Mon Sep 26 14:18:17 2016 +0200

sw lok: fix cursor position after inserting a comment

Make sure SwVisibleCursor::SetPosAndShow() doesn't emit LOK callbacks
till a comment window is active.

Need to invoke the unit test from desktop/, as the sw tests have the
status bar disabled.

(cherry pi

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

2016-09-27 Thread Stephan Bergmann
 framework/source/services/substitutepathvars.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit bae1e2aa636f144fe01cb8d9721e54525fed8b2c
Author: Stephan Bergmann 
Date:   Tue Sep 27 09:52:59 2016 +0200

Add note

Change-Id: I68af0bcfd6700ee40f2d0879e57de9d66c62c983

diff --git a/framework/source/services/substitutepathvars.cxx 
b/framework/source/services/substitutepathvars.cxx
index de2b9ca..dd1747a 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -1102,6 +1102,13 @@ throw ( RuntimeException )
 {
 // Special path variables as they can occur in the middle 
of a path. Only match if they
 // describe a whole directory and not only a substring of 
a directory!
+// (Ideally, all substitutions should stick to syntactical
+// boundaries within the given URL, like not covering only
+// part of a URL path segment; however, at least when 
saving
+// an Impress document, one URL that is passed in is of the
+// form , re-substituted to
+// <$(inst)/share/palette%3B$(user)/config/standard.sob>.)
 const sal_Unicode* pStr = aURL.getStr();
 
 if ( nPos > 0 )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/Util.hpp

2016-09-27 Thread Miklos Vajna
 loolwsd/Util.hpp |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 01c6cb40ef3c4718b8074288e790b47b545fefbe
Author: Miklos Vajna 
Date:   Tue Sep 27 09:48:06 2016 +0200

Util: fix -Werror=shadow

gcc-4.8 still doesn't allow using the same name for a member function
and a local variable.

Change-Id: I9c327331b5c3460ec0e6d986a0543b17ba92c7ac

diff --git a/loolwsd/Util.hpp b/loolwsd/Util.hpp
index f038005..fb1bd43 100644
--- a/loolwsd/Util.hpp
+++ b/loolwsd/Util.hpp
@@ -180,11 +180,11 @@ namespace Util
 {
 // Not performance critical to warrant caching.
 std::regex re(value, std::regex::icase);
-std::smatch match;
+std::smatch smatch;
 
 // Must be a full match.
-if (std::regex_match(subject, match, re) &&
-match.position() == 0 && match.length() == length)
+if (std::regex_match(subject, smatch, re) &&
+smatch.position() == 0 && smatch.length() == length)
 {
 return true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/LOOLKit.cpp

2016-09-27 Thread Miklos Vajna
 loolwsd/LOOLKit.cpp |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit fed97b97a795f0b4794f37bd5d47e4a81e311b54
Author: Miklos Vajna 
Date:   Tue Sep 27 09:46:24 2016 +0200

LOOLKit: remove unused unsing declarations

Change-Id: I6a0efca4dd87694aaa3d32500a56c3a5d246b028

diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 0b03fed..e926056 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -68,7 +68,6 @@
 
 typedef int (LokHookPreInit)  (const char *install_path, const char 
*user_profile_path);
 
-using Poco::AutoPtr;
 using Poco::Exception;
 using Poco::File;
 using Poco::JSON::Array;
@@ -79,8 +78,6 @@ using Poco::Net::HTTPRequest;
 using Poco::Net::HTTPResponse;
 using Poco::Net::NetException;
 using Poco::Net::WebSocket;
-using Poco::Notification;
-using Poco::NotificationQueue;
 using Poco::Path;
 using Poco::Process;
 using Poco::Runnable;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-27 Thread Stephan Bergmann
 framework/source/services/substitutepathvars.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 653e0ccc4e6230f28dd4c553dc7e9482beafa3cd
Author: Stephan Bergmann 
Date:   Tue Sep 27 09:18:11 2016 +0200

tdf#101898: Only re-substitute whole segments with $(username)

...otherwise, if $(username) happens to be "user", it will endlessly re-
substitute inside a (already partly re-substituted) URL of the form

  $(user)/...

Regression introduced with 16fb0d3d0f68708c183c53bd18660a23970b77fe 
"tdf#98407
PathSubstitution: Add substitution for $(username)".

Change-Id: I1c8b64f383fdfd97fa5edc192e9ca4b46944d6f1

diff --git a/framework/source/services/substitutepathvars.cxx 
b/framework/source/services/substitutepathvars.cxx
index 5130ae3..de2b9ca 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -1096,7 +1096,8 @@ throw ( RuntimeException )
 if ( nPos >= 0 )
 {
 bool bMatch = true;
-if ( i->eVariable == PREDEFVAR_LANGID ||
+if ( i->eVariable == PREDEFVAR_USERNAME ||
+ i->eVariable == PREDEFVAR_LANGID ||
  i->eVariable == PREDEFVAR_VLANG )
 {
 // Special path variables as they can occur in the middle 
of a path. Only match if they
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-09-27 Thread Tor Lillqvist
 filter/source/xsltdialog/typedetectionimport.cxx |   21 -
 1 file changed, 8 insertions(+), 13 deletions(-)

New commits:
commit 6d6668bb22a063cabb86bc601603d205522ae865
Author: Tor Lillqvist 
Date:   Tue Sep 27 10:00:38 2016 +0300

Actually, just get rid of these file-local const variables

Use string literals instead.

Follow-up to b7dfa4d6625d066f5507420089434cb7ac29c968.

Change-Id: I364c792d69c052b0d581490f425b2543172c62d8

diff --git a/filter/source/xsltdialog/typedetectionimport.cxx 
b/filter/source/xsltdialog/typedetectionimport.cxx
index cb2111a..37ac428 100644
--- a/filter/source/xsltdialog/typedetectionimport.cxx
+++ b/filter/source/xsltdialog/typedetectionimport.cxx
@@ -34,11 +34,6 @@ using namespace com::sun::star::xml::sax;
 using namespace com::sun::star;
 using namespace std;
 
-static const char  sNode[] =  "node" ;
-static const char sName[] = "oor:name" ;
-static const char sUIName[] = "UIName" ;
-static const char sData[] = "Data" ;
-
 TypeDetectionImporter::TypeDetectionImporter()
 {
 }
@@ -138,9 +133,9 @@ filter_info_impl* 
TypeDetectionImporter::createFilterForNode( Node * pNode )
 filter_info_impl* pFilter = new filter_info_impl;
 
 pFilter->maFilterName = pNode->maName;
-pFilter->maInterfaceName = pNode->maPropertyMap[sUIName];
+pFilter->maInterfaceName = pNode->maPropertyMap["UIName"];
 
-OUString aData = pNode->maPropertyMap[sData];
+OUString aData = pNode->maPropertyMap["Data"];
 
 sal_Unicode aComma(',');
 
@@ -169,7 +164,7 @@ filter_info_impl* 
TypeDetectionImporter::createFilterForNode( Node * pNode )
 Node* pTypeNode = findTypeNode( pFilter->maType );
 if( pTypeNode )
 {
-OUString aTypeUserData( pTypeNode->maPropertyMap[sData] );
+OUString aTypeUserData( pTypeNode->maPropertyMap["Data"] );
 
 pFilter->maDocType = getSubdata( 2, aComma, aTypeUserData );
 pFilter->maExtension = getSubdata( 4, aComma, aTypeUserData );
@@ -236,9 +231,9 @@ void SAL_CALL TypeDetectionImporter::startElement( const 
OUString& aName, const
 }
 else if( maStack.top() == e_Root )
 {
-if( aName == sNode )
+if( aName == "node" )
 {
-OUString aNodeName( xAttribs->getValueByName( sName ) );
+OUString aNodeName( xAttribs->getValueByName( "oor:name" ) );
 
 if( aNodeName == "Filters" )
 {
@@ -252,9 +247,9 @@ void SAL_CALL TypeDetectionImporter::startElement( const 
OUString& aName, const
 }
 else if( (maStack.top() == e_Filters) || (maStack.top() == e_Types) )
 {
-if( aName == sNode )
+if( aName == "node" )
 {
-maNodeName = xAttribs->getValueByName( sName );
+maNodeName = xAttribs->getValueByName( "oor:name" );
 
 eNewState = (maStack.top() == e_Filters) ? e_Filter : e_Type;
 }
@@ -263,7 +258,7 @@ void SAL_CALL TypeDetectionImporter::startElement( const 
OUString& aName, const
 {
 if( aName == "prop" )
 {
-maPropertyName = xAttribs->getValueByName( sName );
+maPropertyName = xAttribs->getValueByName( "oor:name" );
 eNewState = e_Property;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits