[Libreoffice-commits] core.git: store/source svgio/inc svgio/source svl/source svtools/inc svtools/source

2016-07-29 Thread Noel Grandin
 store/source/lockbyte.cxx |4 ++--
 svgio/inc/svgstyleattributes.hxx  |2 +-
 svgio/source/svgreader/svgstyleattributes.cxx |2 +-
 svl/source/items/stylepool.cxx|4 ++--
 svl/source/numbers/zforfind.hxx   |2 +-
 svl/source/numbers/zformat.cxx|2 +-
 svtools/inc/roadmap.hxx   |2 +-
 svtools/source/config/miscopt.cxx |   12 ++--
 svtools/source/contnr/fileview.cxx|4 ++--
 svtools/source/contnr/imivctl.hxx |   14 +++---
 svtools/source/contnr/imivctl1.cxx|   12 ++--
 svtools/source/contnr/ivctrl.cxx  |6 +++---
 svtools/source/contnr/treelistbox.cxx |2 +-
 svtools/source/dialogs/roadmapwizard.cxx  |3 ++-
 svtools/source/inc/iconviewimpl.hxx   |2 +-
 svtools/source/inc/svimpbox.hxx   |2 +-
 svtools/source/misc/langtab.cxx   |4 ++--
 svtools/source/table/tablecontrol_impl.cxx|4 ++--
 svtools/source/uno/treecontrolpeer.cxx|2 +-
 svtools/source/uno/treecontrolpeer.hxx|2 +-
 20 files changed, 44 insertions(+), 43 deletions(-)

New commits:
commit 27319418ed7601fa62993e39894bb8f8902a88d0
Author: Noel Grandin 
Date:   Wed Jul 27 14:25:48 2016 +0200

loplugin:countusersofdefaultparams in store..svtools

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

diff --git a/store/source/lockbyte.cxx b/store/source/lockbyte.cxx
index a446a45..65ac5c3 100644
--- a/store/source/lockbyte.cxx
+++ b/store/source/lockbyte.cxx
@@ -813,13 +813,13 @@ template< class T > struct ResourceHolder
 T m_value;
 
 explicit ResourceHolder (T const & value = T()) : m_value (value) {}
-~ResourceHolder() { reset(); }
+~ResourceHolder() { reset(T()); }
 
 T & get() { return m_value; }
 T const & get() const { return m_value; }
 
 void set (T const & value) { m_value = value; }
-void reset (T const & value = T())
+void reset (T const & value)
 {
 T tmp (m_value);
 if (tmp != value)
diff --git a/svgio/inc/svgstyleattributes.hxx b/svgio/inc/svgstyleattributes.hxx
index ea9c6c2..ba8cb55 100644
--- a/svgio/inc/svgstyleattributes.hxx
+++ b/svgio/inc/svgstyleattributes.hxx
@@ -465,7 +465,7 @@ namespace svgio
 const SvgMarkerNode* accessMarkerEndXLink() const;
 
 // BaselineShift
-void setBaselineShift(const BaselineShift aBaselineShift = 
BaselineShift_Baseline) { maBaselineShift = aBaselineShift; }
+void setBaselineShift(const BaselineShift aBaselineShift) { 
maBaselineShift = aBaselineShift; }
 BaselineShift getBaselineShift() const { return maBaselineShift; }
 void setBaselineShiftNumber(const SvgNumber& rBaselineShift = 
SvgNumber()) { maBaselineShiftNumber = rBaselineShift; }
 SvgNumber getBaselineShiftNumber() const;
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx 
b/svgio/source/svgreader/svgstyleattributes.cxx
index 3366ce0..9fc8b23 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -1951,7 +1951,7 @@ namespace svgio
 else
 {
 // no BaselineShift or inherit (which is 
automatically)
-setBaselineShift();
+setBaselineShift(BaselineShift_Baseline);
 }
 }
 break;
diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx
index 6df2501..8ac1e4f 100644
--- a/svl/source/items/stylepool.cxx
+++ b/svl/source/items/stylepool.cxx
@@ -69,7 +69,7 @@ namespace {
 void setItemSet( const SfxItemSet& rSet ){ maItemSet.push_back( 
std::shared_ptr( rSet.Clone() ) ); }
 // #i86923#
 Node* findChildNode( const SfxPoolItem& rItem,
- const bool bIsItemIgnorable = false );
+ const bool bIsItemIgnorable );
 Node* nextItemSet( Node* pLast,
const bool bSkipUnusedItemSet,
const bool bSkipIgnorable );
@@ -396,7 +396,7 @@ std::shared_ptr StylePoolImpl::insertItemSet( 
const SfxItemSet& rSet
 if ( !xFoundIgnorableItems.get() ||
  (xFoundIgnorableItems->Put( *pItem ) == nullptr ) )
 {
-pCurNode = pCurNode->findChildNode( *pItem );
+pCurNode = pCurNode->findChildNode( *pItem, false );
 }
 pItem = aIter.NextItem();
 }
diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx
index 5f62e28..ba24b87 100644
--- a/svl/source/numbers/zforfind.hxx
+++ b/svl/source/numbers/zforfind.hxx
@@ -46,7 +46,7 @@ public:

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

2016-07-29 Thread Miklos Vajna
 include/sfx2/viewsh.hxx |1 +
 sfx2/source/view/viewsh.cxx |8 
 sw/inc/view.hxx |2 ++
 sw/source/core/text/xmldump.cxx |   12 +---
 sw/source/uibase/uiview/viewprt.cxx |   10 ++
 5 files changed, 30 insertions(+), 3 deletions(-)

New commits:
commit 73c8bc849c0024d5d81ab0370cffa6aa24b56d22
Author: Miklos Vajna 
Date:   Thu Jul 28 20:58:12 2016 +0200

sw layout xml dump: mention SfxViewShell addresses

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

diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 56888ca..a665913 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -333,6 +333,7 @@ public:
 bool isTiledSearching() 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 1bac0ac5..2108633 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -85,6 +85,7 @@
 #include 
 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -1501,6 +1502,13 @@ int SfxViewShell::getPart() const
 return 0;
 }
 
+void SfxViewShell::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+xmlTextWriterStartElement(pWriter, BAD_CAST("sfxViewShell"));
+xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
+xmlTextWriterEndElement(pWriter);
+}
+
 bool SfxViewShell::KeyInput( const KeyEvent &rKeyEvent )
 
 /*  [Description]
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index c9cccd0..38f7c6c 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -645,6 +645,8 @@ public:
 static SvxSearchItem* GetSearchItem() { return m_pSrchItem; }
 /// See SfxViewShell::getPart().
 int getPart() const override;
+/// See SfxViewShell::dumpAsXml().
+void dumpAsXml(struct _xmlTextWriter* pWriter) const override;
 };
 
 inline long SwView::GetXScroll() const
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 8085036..e97ba35 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 class XmlPortionDumper:public SwPortionHandler
@@ -293,9 +294,14 @@ void SwFrame::dumpAsXml( xmlTextWriterPtr writer ) const
 if (IsRootFrame())
 {
 const SwRootFrame* pRootFrame = static_cast(this);
-xmlTextWriterStartElement(writer, BAD_CAST("shells"));
-for (SwViewShell& rViewShell : 
pRootFrame->GetCurrShell()->GetRingContainer())
-rViewShell.dumpAsXml(writer);
+xmlTextWriterStartElement(writer, BAD_CAST("sfxViewShells"));
+SwView* pView = static_cast(SfxViewShell::GetFirst(true, 
checkSfxViewShell));
+while (pView)
+{
+if (pView->GetObjectShell() == 
pRootFrame->GetCurrShell()->GetSfxViewShell()->GetObjectShell())
+pView->dumpAsXml(writer);
+pView = static_cast(SfxViewShell::GetNext(*pView, 
true, checkSfxViewShell));
+}
 xmlTextWriterEndElement(writer);
 }
 
diff --git a/sw/source/uibase/uiview/viewprt.cxx 
b/sw/source/uibase/uiview/viewprt.cxx
index 852b510..1b727c8 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -258,6 +259,15 @@ int SwView::getPart() const
 return nPage - 1;
 }
 
+void SwView::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+xmlTextWriterStartElement(pWriter, BAD_CAST("swView"));
+SfxViewShell::dumpAsXml(pWriter);
+if (m_pWrtShell)
+m_pWrtShell->dumpAsXml(pWriter);
+xmlTextWriterEndElement(pWriter);
+}
+
 // Create page printer/additions for SwView and SwPagePreview
 
 VclPtr CreatePrintOptionsPage( vcl::Window *pParent,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Miklos Vajna
 external/libxmlsec/UnpackedTarball_xmlsec.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 73cd9c480c681d076e837aa7ba1ea706de3f3d0e
Author: Miklos Vajna 
Date:   Thu Jul 28 23:20:55 2016 +0200

xmlsec: xmlsec1-keyinfo-revert.patch.1 is not needed on WNT

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

diff --git a/external/libxmlsec/UnpackedTarball_xmlsec.mk 
b/external/libxmlsec/UnpackedTarball_xmlsec.mk
index 9de7c2f..902a16c 100644
--- a/external/libxmlsec/UnpackedTarball_xmlsec.mk
+++ b/external/libxmlsec/UnpackedTarball_xmlsec.mk
@@ -18,7 +18,9 @@ xmlsec_patches += xmlsec1-win32-fix-undeclared.patch.1
 xmlsec_patches += xmlsec1-vc.patch.1
 xmlsec_patches += xmlsec1-1.2.14_fix_extern_c.patch.1
 xmlsec_patches += xmlsec1-customkeymanage.patch.1
+ifneq ($(OS),WNT)
 xmlsec_patches += xmlsec1-keyinfo-revert.patch.1
+endif
 
 $(eval $(call gb_UnpackedTarball_UnpackedTarball,xmlsec))
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Giuseppe Castagno
 ucb/source/ucp/webdav-neon/webdavcontent.cxx |  196 ---
 ucb/source/ucp/webdav-neon/webdavcontent.hxx |6 
 2 files changed, 126 insertions(+), 76 deletions(-)

New commits:
commit 6ab2cabeae02b6beb3c33238773ba075f41c4bb9
Author: Giuseppe Castagno 
Date:   Sun Jan 10 16:46:19 2016 +0100

tdf#101094 (8) OPTIONS: Add options check in Content::resourceTypeForLocks

Change-Id: Ia1bcc1be9e61626da2d60ea679d4b6e7e114ac9f
Reviewed-on: https://gerrit.libreoffice.org/27661
Tested-by: Jenkins 
Reviewed-by: Giuseppe Castagno 

diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx 
b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index f91a50c..3c40ad8 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -2782,7 +2782,8 @@ void Content::destroy( bool bDeletePhysical )
 
 // returns the resource type, to be checked for locks
 Content::ResourceType Content::resourceTypeForLocks(
-  const uno::Reference< ucb::XCommandEnvironment >& Environment )
+const uno::Reference< ucb::XCommandEnvironment >& Environment,
+const std::unique_ptr< DAVResourceAccess > & rResAccess)
 {
 ResourceType eResourceTypeForLocks = UNKNOWN;
 {
@@ -2814,12 +2815,6 @@ Content::ResourceType Content::resourceTypeForLocks(
 if ( eResourceTypeForLocks == UNKNOWN )
 {
 // resource type for lock/unlock operations still unknown, need to ask 
the server
-std::unique_ptr< DAVResourceAccess > xResAccess;
-
-xResAccess.reset( new DAVResourceAccess(
-  m_xContext,
-  m_rSessionFactory,
-  rURL ) );
 
 const OUString aScheme(
 rURL.copy( 0, rURL.indexOf( ':' ) ).toAsciiLowerCase() );
@@ -2830,89 +2825,125 @@ Content::ResourceType Content::resourceTypeForLocks(
 }
 else
 {
-try
+DAVOptions aDAVOptions;
+getResourceOptions( Environment, aDAVOptions, rResAccess );
+if( aDAVOptions.isClass1() ||
+aDAVOptions.isClass2() ||
+aDAVOptions.isClass3() )
 {
-// we need only DAV:supportedlock
-std::vector< DAVResource > resources;
-std::vector< OUString > aPropNames;
-uno::Sequence< beans::Property > aProperties( 1 );
-aProperties[ 0 ].Name = DAVProperties::SUPPORTEDLOCK;
-
-ContentProperties::UCBNamesToDAVNames( aProperties, aPropNames 
);
-xResAccess->PROPFIND( DAVZERO, aPropNames, resources, 
Environment );
-
-// only one resource should be returned
-if ( resources.size() == 1 )
+// this is at least a DAV, lock to be confirmed
+// class 2 is needed for full lock support
+// see
+// 
+eResourceTypeForLocks = DAV_NOLOCK;
+if( aDAVOptions.isClass2() )
 {
-// we may have received a bunch of other properties
-// (some servers seems to do so)
-// but we need only supported lock for this check
-// all returned properties are in
-// resources.properties[n].Name/.Value
+// ok, possible lock, check for it
+try
+{
+// we need only DAV:supportedlock
+std::vector< DAVResource > resources;
+std::vector< OUString > aPropNames;
+uno::Sequence< beans::Property > aProperties( 1 );
+aProperties[ 0 ].Name = DAVProperties::SUPPORTEDLOCK;
 
-std::vector< DAVPropertyValue >::iterator it;
+ContentProperties::UCBNamesToDAVNames( aProperties, 
aPropNames );
+rResAccess->PROPFIND( DAVZERO, aPropNames, resources, 
Environment );
 
-for ( it = resources[0].properties.begin();
-  it != resources[0].properties.end(); ++it)
-{
-if ( (*it).Name ==  DAVProperties::SUPPORTEDLOCK )
+bool wasSupportedlockFound = false;
+
+// only one resource should be returned
+if ( resources.size() == 1 )
 {
-uno::Sequence< ucb::LockEntry > aSupportedLocks;
-if ( (*it).Value >>= aSupportedLocks )
+// we may have received a bunch of other properties
+// (some servers seems to do so)
+// but we need only supported lock for this check
+// all returned properties are

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

2016-07-29 Thread Miklos Vajna
 loolwsd/Auth.hpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e36649c13b6534983988861d8cb5d2068597c16c
Author: Miklos Vajna 
Date:   Fri Jul 29 09:14:13 2016 +0200

Auth: clean up unnecessary value parameters

Change-Id: Ia797171880ea1dd790d67a150f198c8306354045

diff --git a/loolwsd/Auth.hpp b/loolwsd/Auth.hpp
index f4e10a1..889de73 100644
--- a/loolwsd/Auth.hpp
+++ b/loolwsd/Auth.hpp
@@ -31,7 +31,7 @@ public:
 class JWTAuth: public AuthBase
 {
 public:
-JWTAuth(const std::string keyPath, const std::string name, const 
std::string sub, const std::string aud)
+JWTAuth(const std::string& keyPath, const std::string& name, const 
std::string& sub, const std::string& aud)
 : _name(name),
   _sub(sub),
   _aud(aud),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Caolán McNamara
 writerfilter/qa/cppunittests/rtftok/data/pass/destinationtest-1.rtf |binary
 writerfilter/source/rtftok/rtfdocumentimpl.cxx  |6 
+++---
 writerfilter/source/rtftok/rtfdocumentimpl.hxx  |6 
++
 3 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 0dd22165346f4296718656d17ae98ebbfe563719
Author: Caolán McNamara 
Date:   Fri Jul 29 08:48:22 2016 +0100

fftester: null DestinationText

Change-Id: Icdd71733c4e9f4b36e6e957e4dea772087890faa

diff --git 
a/writerfilter/qa/cppunittests/rtftok/data/pass/destinationtest-1.rtf 
b/writerfilter/qa/cppunittests/rtftok/data/pass/destinationtest-1.rtf
new file mode 100644
index 000..63465b0
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/rtftok/data/pass/destinationtest-1.rtf differ
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 45be8a6..e3cd2b9 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1213,7 +1213,7 @@ void RTFDocumentImpl::text(OUString& rString)
 rString = rString.copy(0, rString.getLength() - 1);
 bEnd = true;
 }
-m_aStates.top().pDestinationText->append(rString);
+m_aStates.top().appendDestinationText(rString);
 if (bEnd)
 {
 // always clear, necessary in case of group-less fonttable
@@ -1319,7 +1319,7 @@ void RTFDocumentImpl::text(OUString& rString)
 case Destination::TOCENTRY:
 case Destination::PROPNAME:
 case Destination::STATICVAL:
-m_aStates.top().pDestinationText->append(rString);
+m_aStates.top().appendDestinationText(rString);
 break;
 default:
 bRet = false;
@@ -1348,7 +1348,7 @@ void RTFDocumentImpl::text(OUString& rString)
 // Don't return earlier, a bookmark start has to be in a paragraph group.
 if (m_aStates.top().eDestination == Destination::BOOKMARKSTART)
 {
-m_aStates.top().pDestinationText->append(rString);
+m_aStates.top().appendDestinationText(rString);
 return;
 }
 
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index c8a28d3..152f5a6 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -282,6 +282,12 @@ public:
 /// point to the buffer of the current destination
 OUStringBuffer* pDestinationText;
 
+void appendDestinationText(const OUString &rString)
+{
+if (pDestinationText)
+pDestinationText->append(rString);
+}
+
 /// Index of the current style.
 int nCurrentStyleIndex;
 /// Index of the current character style.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Caolán McNamara
 dev/null|binary
 writerfilter/qa/cppunittests/rtftok/data/fail/destinationtest-1.rtf |binary
 writerfilter/qa/cppunittests/rtftok/data/fail/destinationtest-2.rtf |binary
 writerfilter/source/rtftok/rtfdocumentimpl.cxx  |   39 
+-
 4 files changed, 20 insertions(+), 19 deletions(-)

New commits:
commit f9ae1b31f7791fba71f74af126cc061a048e12f8
Author: Caolán McNamara 
Date:   Fri Jul 29 09:18:16 2016 +0100

fftester: another null DestinationText

Change-Id: I84bf3788ac092c491d7c5a9f86421f1cf9f3e814

diff --git 
a/writerfilter/qa/cppunittests/rtftok/data/pass/destinationtest-1.rtf 
b/writerfilter/qa/cppunittests/rtftok/data/fail/destinationtest-1.rtf
similarity index 100%
rename from writerfilter/qa/cppunittests/rtftok/data/pass/destinationtest-1.rtf
rename to writerfilter/qa/cppunittests/rtftok/data/fail/destinationtest-1.rtf
diff --git 
a/writerfilter/qa/cppunittests/rtftok/data/fail/destinationtest-2.rtf 
b/writerfilter/qa/cppunittests/rtftok/data/fail/destinationtest-2.rtf
new file mode 100644
index 000..f0152b0
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/rtftok/data/fail/destinationtest-2.rtf differ
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index e3cd2b9..909dc86 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -190,26 +190,27 @@ static util::DateTime lcl_getDateTime(RTFParserState& 
aState)
   aState.nDay, aState.nMonth, aState.nYear, false);
 }
 
-static void lcl_DestinationToMath(OUStringBuffer& rDestinationText, 
oox::formulaimport::XmlStreamBuilder& rMathBuffer, bool& rMathNor)
+static void lcl_DestinationToMath(OUStringBuffer* pDestinationText, 
oox::formulaimport::XmlStreamBuilder& rMathBuffer, bool& rMathNor)
 {
-OUString aStr = rDestinationText.makeStringAndClear();
-if (!aStr.isEmpty())
+if (!pDestinationText)
+return;
+OUString aStr = pDestinationText->makeStringAndClear();
+if (aStr.isEmpty())
+return;
+rMathBuffer.appendOpeningTag(M_TOKEN(r));
+if (rMathNor)
 {
-rMathBuffer.appendOpeningTag(M_TOKEN(r));
-if (rMathNor)
-{
-rMathBuffer.appendOpeningTag(M_TOKEN(rPr));
-// Same as M_TOKEN(lit)
-rMathBuffer.appendOpeningTag(M_TOKEN(nor));
-rMathBuffer.appendClosingTag(M_TOKEN(nor));
-rMathBuffer.appendClosingTag(M_TOKEN(rPr));
-rMathNor = false;
-}
-rMathBuffer.appendOpeningTag(M_TOKEN(t));
-rMathBuffer.appendCharacters(aStr);
-rMathBuffer.appendClosingTag(M_TOKEN(t));
-rMathBuffer.appendClosingTag(M_TOKEN(r));
+rMathBuffer.appendOpeningTag(M_TOKEN(rPr));
+// Same as M_TOKEN(lit)
+rMathBuffer.appendOpeningTag(M_TOKEN(nor));
+rMathBuffer.appendClosingTag(M_TOKEN(nor));
+rMathBuffer.appendClosingTag(M_TOKEN(rPr));
+rMathNor = false;
 }
+rMathBuffer.appendOpeningTag(M_TOKEN(t));
+rMathBuffer.appendCharacters(aStr);
+rMathBuffer.appendClosingTag(M_TOKEN(t));
+rMathBuffer.appendClosingTag(M_TOKEN(r));
 }
 
 RTFDocumentImpl::RTFDocumentImpl(uno::Reference const& 
xContext,
@@ -1768,7 +1769,7 @@ RTFError RTFDocumentImpl::pushState()
 m_aStates.top().eRunType = RTFParserState::RunType::LOCH;
 
 if (m_aStates.top().eDestination == Destination::MR)
-lcl_DestinationToMath(*m_aStates.top().pDestinationText, 
m_aMathBuffer, m_bMathNor);
+lcl_DestinationToMath(m_aStates.top().pDestinationText, 
m_aMathBuffer, m_bMathNor);
 m_aStates.push(m_aStates.top());
 }
 m_aStates.top().aDestinationText.setLength(0); // was copied: always reset!
@@ -2463,7 +2464,7 @@ RTFError RTFDocumentImpl::popState()
 }
 break;
 case Destination::MR:
-lcl_DestinationToMath(*m_aStates.top().pDestinationText, 
m_aMathBuffer, m_bMathNor);
+lcl_DestinationToMath(m_aStates.top().pDestinationText, m_aMathBuffer, 
m_bMathNor);
 break;
 case Destination::MF:
 m_aMathBuffer.appendClosingTag(M_TOKEN(f));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - 4 commits - include/sfx2 libreofficekit/qa sfx2/source sw/inc sw/qa sw/source

2016-07-29 Thread Miklos Vajna
 include/sfx2/viewsh.hxx |1 
 libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx |   17 -
 sfx2/source/view/viewsh.cxx |8 
 sw/inc/view.hxx |2 +
 sw/qa/extras/tiledrendering/tiledrendering.cxx  |   36 
 sw/source/core/text/xmldump.cxx |   12 +-
 sw/source/uibase/shells/basesh.cxx  |   20 ++-
 sw/source/uibase/uiview/viewprt.cxx |   10 +
 8 files changed, 94 insertions(+), 12 deletions(-)

New commits:
commit 5f86e619ce2e6a02e5ea23ef778f7062d30f2931
Author: Miklos Vajna 
Date:   Thu Jul 28 20:58:12 2016 +0200

sw layout xml dump: mention SfxViewShell addresses

Change-Id: I2e5c8102684494fd3d7c1c70971a09d0c940a124
Reviewed-on: https://gerrit.libreoffice.org/27637
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 
(cherry picked from commit 73c8bc849c0024d5d81ab0370cffa6aa24b56d22)

diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index afee970..d0bbbf0 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -333,6 +333,7 @@ public:
 bool isTiledSearching() 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 92d3f1a..8210d88 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -85,6 +85,7 @@
 #include 
 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -1648,6 +1649,13 @@ int SfxViewShell::getPart() const
 return 0;
 }
 
+void SfxViewShell::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+xmlTextWriterStartElement(pWriter, BAD_CAST("sfxViewShell"));
+xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
+xmlTextWriterEndElement(pWriter);
+}
+
 bool SfxViewShell::KeyInput( const KeyEvent &rKeyEvent )
 
 /*  [Description]
diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index f422ced..ff40f2c 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -651,6 +651,8 @@ public:
 static SvxSearchItem* GetSearchItem() { return m_pSrchItem; }
 /// See SfxViewShell::getPart().
 int getPart() const override;
+/// See SfxViewShell::dumpAsXml().
+void dumpAsXml(struct _xmlTextWriter* pWriter) const override;
 };
 
 inline long SwView::GetXScroll() const
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index f3b7a8e..a300087 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 class XmlPortionDumper:public SwPortionHandler
@@ -297,9 +298,14 @@ void SwFrame::dumpAsXml( xmlTextWriterPtr writer ) const
 if (IsRootFrame())
 {
 const SwRootFrame* pRootFrame = static_cast(this);
-xmlTextWriterStartElement(writer, BAD_CAST("shells"));
-for (SwViewShell& rViewShell : 
pRootFrame->GetCurrShell()->GetRingContainer())
-rViewShell.dumpAsXml(writer);
+xmlTextWriterStartElement(writer, BAD_CAST("sfxViewShells"));
+SwView* pView = static_cast(SfxViewShell::GetFirst(true, 
checkSfxViewShell));
+while (pView)
+{
+if (pView->GetObjectShell() == 
pRootFrame->GetCurrShell()->GetSfxViewShell()->GetObjectShell())
+pView->dumpAsXml(writer);
+pView = static_cast(SfxViewShell::GetNext(*pView, 
true, checkSfxViewShell));
+}
 xmlTextWriterEndElement(writer);
 }
 
diff --git a/sw/source/uibase/uiview/viewprt.cxx 
b/sw/source/uibase/uiview/viewprt.cxx
index 8d12214..ddcefec 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -258,6 +259,15 @@ int SwView::getPart() const
 return nPage - 1;
 }
 
+void SwView::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+xmlTextWriterStartElement(pWriter, BAD_CAST("swView"));
+SfxViewShell::dumpAsXml(pWriter);
+if (m_pWrtShell)
+m_pWrtShell->dumpAsXml(pWriter);
+xmlTextWriterEndElement(pWriter);
+}
+
 // Create page printer/additions for SwView and SwPagePreview
 
 VclPtr CreatePrintOptionsPage( vcl::Window *pParent,
commit d50ef086b87dbfb28db1fc9f9e76fa33eadfaf35
Author: Miklos Vajna 
Date:   Thu Jul 28 12:47:29 2016 +0200

tdf#101168 sw: fix missing repaint on undo with multiple windows

Need to lock / unlock all view shells, not just the current one.

Change-Id: I754214a202c6bbb74daac6f933481cb3fe7b9dbb
Reviewed-on: https://gerrit.libreoffice.org/27620
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 
(cherry picked from commit 1e21c32a2f81b4ae5302

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

2016-07-29 Thread Noel Grandin
 include/sfx2/emojicontrol.hxx|2 +-
 sfx2/source/control/emojicontrol.cxx |2 +-
 sfx2/source/control/emojiview.cxx|4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 9da4c9bc711dd0b78889b51f8cd0043626f06af8
Author: Noel Grandin 
Date:   Fri Jul 29 09:41:54 2016 +0200

loplugin:staticmethods

Change-Id: If32319c1d93756d633f07a21c76e0107181704b0

diff --git a/include/sfx2/emojicontrol.hxx b/include/sfx2/emojicontrol.hxx
index 48c2aa5..7bf5df9 100644
--- a/include/sfx2/emojicontrol.hxx
+++ b/include/sfx2/emojicontrol.hxx
@@ -38,7 +38,7 @@ private:
 FILTER_CATEGORY getCurrentFilter();
 
 DECL_LINK_TYPED(ActivatePageHdl, TabControl*, void);
-DECL_LINK_TYPED(InsertHdl, ThumbnailViewItem*, void);
+DECL_STATIC_LINK_TYPED(SfxEmojiControl, InsertHdl, ThumbnailViewItem*, 
void);
 
 VclPtr   mpTabControl;
 VclPtrmpEmojiView;
diff --git a/sfx2/source/control/emojicontrol.cxx 
b/sfx2/source/control/emojicontrol.cxx
index 77487c2..79bda2b 100644
--- a/sfx2/source/control/emojicontrol.cxx
+++ b/sfx2/source/control/emojicontrol.cxx
@@ -153,7 +153,7 @@ IMPL_LINK_NOARG_TYPED(SfxEmojiControl, ActivatePageHdl, 
TabControl*, void)
 mpEmojiView->filterItems(ViewFilter_Category(getCurrentFilter()));
 }
 
-IMPL_LINK_TYPED(SfxEmojiControl, InsertHdl, ThumbnailViewItem*, pItem, void)
+IMPL_STATIC_LINK_TYPED(SfxEmojiControl, InsertHdl, ThumbnailViewItem*, pItem, 
void)
 {
 OUStringBuffer sHexText = "";
 sHexText.appendUtf32(OUString(pItem->getTitle()).toUInt32(16));
commit 8ff6ba3da87a6ae8c36e8c9e44e66147c4dfb4e1
Author: Noel Grandin 
Date:   Fri Jul 29 09:40:01 2016 +0200

loplugin:cstylecast

Change-Id: I3adb510be10b12953e2889d0d3b74402479194ee

diff --git a/sfx2/source/control/emojiview.cxx 
b/sfx2/source/control/emojiview.cxx
index c9f2e29..6f60086 100644
--- a/sfx2/source/control/emojiview.cxx
+++ b/sfx2/source/control/emojiview.cxx
@@ -128,11 +128,11 @@ void EmojiView::Populate ()
 node prop = value.child(paramVal);
 
 //get values of parameters in AppendItem() function
-if(paramVal == (const char*) "unicode")
+if(paramVal == "unicode")
 {
 sTitle = 
OUString::createFromAscii(prop.string_value().get());
 }
-else if(paramVal == (const char*)"category")
+else if(paramVal == "category")
 {
 sCategory = 
OUString::createFromAscii(prop.string_value().get());
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Help with an old regression in text rendering needed

2016-07-29 Thread Milos Sramek
Thank you, Caolán, for your suggestions.


The first thing I've tried was to compile the current version with and
without harfbuzz using
./autogen.sh --with-harfbuzz=no
The result was the same (bad).

I am, however, not sure if harfbuzz was really switched off, since in
config.log I can see

$ ./configure --with-harfbuzz=no
--srcdir=/mnt/data/milos/sbox/libreoffice.git --enable-option-checking=fatal
but later
configure:30367: checking which harfbuzz to use
configure:30468: result: internal

and later also
-I/usr/include/harfbuzz
-lharfbuzz -lharfbuzz-icu

I've tried to investigate it bit deeper:

revision mentioned:
bff8fa9 - (2013-05-06 11:08:29 +0200) Enable HarfBuzz by default -
Khaled Hosny

The last good revision according to my bibisection
f0393d7 - (2013-05-06 16:54:53 +0200) [harfbuzz] Fix text width
calculation, 3rd try - Khaled Hosny

The first bad revision according to my bibisection
48ad2f6 - (2013-05-06 12:48:23 +0200) fdo#46808, Convert some code to
getProcessComponentContext

So, they really are from the same day.

I unfortunately cannot compile these revisions, maybe because my
compiter is too new (gcc version 5.4.0 20160609 (Ubuntu
5.4.0-6ubuntu1~16.04.1)). I happens because of std::auto_ptr:
/workdir/unxlngx6.pro/UnpackedTarball/boost/boost/smart_ptr/scoped_ptr.hpp:66:31:
warning: ‘template class std::auto_ptr’ is deprecated
[-Wdeprecated-declarations]
 
How should I use the -Wdeprecated-declarations switch?

thanks
Milos



On 2016-07-20 18:27, Caolán McNamara wrote:
> On Wed, 2016-07-20 at 08:55 +0200, Milos Sramek wrote:
>> Hi,
>>
>> In Brno I would like to present my tools for automated detection and
>> bibisection of interoperability problems between LO an MS Office. My
>> method is currently of limited utility, because there is a problem
>> with
>> rendering of plain text, which affects most documents and overshadows
>> other bugs.
>>
>> I managed to localized the problem by bibisection. I also wanted to
>> investigate it more deeply, but was unable to compile that version.
>> Thus, I would need help from you :).
>>
>> The problem resides in that the text layout changed (as bibisected
>> using  bibisect-43all):
> You don't state the platform you were working on. Was it Linux, if so
> then probably "bff8fa97e16f0f06fddc5545ea36c8bd2b18a580: Enable
> HarfBuzz by default" is what changed during that period.
>
> With text layout there's the vcl level stuff, which is now backed by
> harfbuzz on Linux, and different things on the other platforms.
> Typically we have had "little" differences between out platforms when
> it comes to text layout already. There's a GSOC underway to experiment
> with using harfbuzz on all platforms. In this stack of code different
> features enabled/disabled in the underlying fontconfig can cause other
> differences too.
>
> I presume you've ensured the same fonts are available to LibreOffice as
> MSOffice otherwise you'd not have gotten this far anyway I guess.
>
> There's also some extra "wiggling" of glyphs that writer does on top of
> all this. I never could quite figure out what writer does there or why
> it does it, but that adds some extra variability to things.
>
> I could never get an exact pixel-to-pixel match in the past (ages ago,
> before the harfbuzz rework) so I guess this was also a "slightly-fuzzy" 
> approach in the close-match case.
>
> Maybe there's some way to try disabling kerning in the harfbuzz layer
> to see if that makes a difference in any way.
>
> C.
>
> as an aside, if I was going down the road again of investigating our
> differences in layout vs msoffice I'd probably try getting harfbuzz up
> and running under windows LibreOffice and then see what the differences
> there were between LibreOffice/MSOffice after throwing out all the
> mysterious writer adjustment code. Possibly creating some ultra-dumb
> font that is plain black blocks or something like that.
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice


-- 
email & jabber: sramek.mi...@gmail.com

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


Re: Possibly broken master branch with Android Viwer

2016-07-29 Thread Miklos Vajna
Hi Mert,

On Thu, Jul 28, 2016 at 01:04:12PM +, Mert Tümer  
wrote:
> I am working on Android Viewer for a while. I know that most of you
> are not Android Viewer developer but my problem is about build
> process. I think current master branch is broken. When i try to build
> libreoffice with "with-distro=LibreOfficeAndorid" i am getting error
> like this;

It was indeed broken, the Android tinderbox is now back and is green.
Anything newer than 05676088e23a7da470ba5e574ddf03a29fb11c9a should
build again.

My autogen.input only contains:


--enable-werror
--with-distro=LibreOfficeAndroid


Regards,

Miklos


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


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

2016-07-29 Thread Caolán McNamara
 sdext/source/pdfimport/wrapper/wrapper.cxx |7 ---
 1 file changed, 7 deletions(-)

New commits:
commit 2a66c02553bbcfbb9e646c39ec291fb2eefbf6bb
Author: Caolán McNamara 
Date:   Fri Jul 29 09:57:19 2016 +0100

Resolves: tdf#84121 wrong password passed to xpdfimport

regression from...

commit eb276d11a652601f743d69ada7a38016bd97d73e
Author: Fridrich Å trba 
Date:   Mon Jul 8 14:01:17 2013 +0200

fdo#38878: Upgrading internal xpdf -> poppler

before this the hashed _OOO_pdfi_Credentials_ was used
in the removed OOoImportSecurityhandler::authorize

but after this the hashed password continued to be
passed through stdin, while the unhashed password
was the required data.

Change-Id: Iadc8a372abcfab514f724dd95f05776e5153d007

diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx 
b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 4db5b31..e15ba17 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -961,13 +961,6 @@ static bool checkEncryption( const OUString&   
i_rPa
 OSL_TRACE( "password: %s", bAuthenticated ? "matches" 
: "does not match" );
 bSuccess = bAuthenticated;
 }
-if( bAuthenticated )
-{
-OUStringBuffer aBuf( 128 );
-aBuf.append( "_OOO_pdfi_Credentials_" );
-aBuf.append( pPDFFile->getDecryptionKey() );
-io_rPwd = aBuf.makeStringAndClear();
-}
 }
 else if( i_xIHdl.is() )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Caolán McNamara
 uui/source/iahndl-authentication.cxx |   26 --
 1 file changed, 12 insertions(+), 14 deletions(-)

New commits:
commit 4b73aff7d2e4af7d3a1359df52133cd2c59058c5
Author: Caolán McNamara 
Date:   Fri Jul 29 10:08:25 2016 +0100

VclPtr: password prompts never dispose

Change-Id: I917e5457be6de152b39e91ad41b6ed196dfe3e45

diff --git a/uui/source/iahndl-authentication.cxx 
b/uui/source/iahndl-authentication.cxx
index 9855df9..a0a0377 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -516,13 +516,12 @@ executePasswordDialog(
 {
 if (bIsSimplePasswordRequest)
 {
-VclPtr< PasswordDialog > pDialog(
-VclPtr::Create( pParent, nMode, 
xManager.get(), aDocName,
-bIsPasswordToModify, bIsSimplePasswordRequest ) );
-pDialog->SetMinLen(0);
+ScopedVclPtrInstance xDialog(pParent, nMode, 
xManager.get(), aDocName,
+bIsPasswordToModify, bIsSimplePasswordRequest);
+xDialog->SetMinLen(0);
 
-rInfo.SetResult( pDialog->Execute() == RET_OK ? 
ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL );
-rInfo.SetPassword( pDialog->GetPassword() );
+rInfo.SetResult(xDialog->Execute() == RET_OK ? 
ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL);
+rInfo.SetPassword(xDialog->GetPassword());
 }
 else
 {
@@ -540,14 +539,13 @@ executePasswordDialog(
 }
 else // enter password or reenter password
 {
-VclPtr< PasswordDialog > pDialog(
-VclPtr::Create( pParent, nMode, 
xManager.get(), aDocName,
-bIsPasswordToModify, bIsSimplePasswordRequest ) );
-pDialog->SetMinLen(0);
-
-rInfo.SetResult( pDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK 
: ERRCODE_BUTTON_CANCEL );
-rInfo.SetPassword( bIsPasswordToModify ? OUString() : 
pDialog->GetPassword() );
-rInfo.SetPasswordToModify( bIsPasswordToModify ? 
pDialog->GetPassword() : OUString() );
+ScopedVclPtrInstance xDialog(pParent, nMode, 
xManager.get(), aDocName,
+bIsPasswordToModify, bIsSimplePasswordRequest);
+xDialog->SetMinLen(0);
+
+rInfo.SetResult(xDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : 
ERRCODE_BUTTON_CANCEL);
+rInfo.SetPassword(bIsPasswordToModify ? OUString() : 
xDialog->GetPassword());
+rInfo.SetPasswordToModify(bIsPasswordToModify ? 
xDialog->GetPassword() : OUString());
 }
 }
 catch (std::bad_alloc const &)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Caolán McNamara
 svx/source/stbctrls/pszctrl.cxx |   17 -
 1 file changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 3a0aad2f5de3c78d0a3f0d6977903fbd41aa1d8f
Author: Caolán McNamara 
Date:   Fri Jul 29 10:49:27 2016 +0100

Related: tdf#90450 don't overwrite text in size/pos statusbar item

there still isn't enough space for it in writer, but at least
what is there can be read.

I'd love to get this info out of the status bar and into some
overlay shown in the selection when moving the object.

Change-Id: I688690a57253d3774c06f5edcb0931503c6d2ac6

diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index a071173..0f27306 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -377,9 +377,12 @@ void SvxPosSizeStatusBarControl::Paint( const 
UserDrawEvent& rUsrEvt )
 OUString aStr = GetMetricStr_Impl( pImpl->aPos.X());
 aStr += " / ";
 aStr += GetMetricStr_Impl( pImpl->aPos.Y());
-pDev->DrawRect(
-Rectangle( aPnt, Point( nSizePosX, rRect.Bottom() ) ) );
-pDev->DrawText( aPnt, aStr );
+Rectangle aRect(aPnt, Point(nSizePosX, rRect.Bottom()));
+pDev->DrawRect(aRect);
+vcl::Region aOrigRegion(pDev->GetClipRegion());
+pDev->SetClipRegion(vcl::Region(aRect));
+pDev->DrawText(aPnt, aStr);
+pDev->SetClipRegion(aOrigRegion);
 
 // draw the size, when available
 aPnt.X() = nSizePosX;
@@ -393,8 +396,12 @@ void SvxPosSizeStatusBarControl::Paint( const 
UserDrawEvent& rUsrEvt )
 aStr = GetMetricStr_Impl( pImpl->aSize.Width() );
 aStr += " x ";
 aStr += GetMetricStr_Impl( pImpl->aSize.Height() );
-pDev->DrawRect( Rectangle( aDrwPnt, rRect.BottomRight() ) );
-pDev->DrawText( aPnt, aStr );
+aRect = Rectangle(aDrwPnt, rRect.BottomRight());
+pDev->DrawRect(aRect);
+aOrigRegion = pDev->GetClipRegion();
+pDev->SetClipRegion(vcl::Region(aRect));
+pDev->DrawText(aPnt, aStr);
+pDev->SetClipRegion(aOrigRegion);
 }
 else
 pDev->DrawRect( Rectangle( aPnt, rRect.BottomRight() ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Caolán McNamara
 cui/uiconfig/ui/effectspage.ui |   20 
 1 file changed, 20 insertions(+)

New commits:
commit b3b7669e7fb74b04d925f21a7f0b048434eeffa3
Author: Caolán McNamara 
Date:   Fri Jul 29 10:58:17 2016 +0100

Resolves: tdf#96677 effects page didn't link labels to what they labelled

Change-Id: I29503324f221c42208267f4f0d36922e89119fdd

diff --git a/cui/uiconfig/ui/effectspage.ui b/cui/uiconfig/ui/effectspage.ui
index ae64cf0..1e9171c 100644
--- a/cui/uiconfig/ui/effectspage.ui
+++ b/cui/uiconfig/ui/effectspage.ui
@@ -216,6 +216,8 @@
 True
 False
 Font color:
+True
+fontcolorlb
 0
   
   
@@ -228,6 +230,8 @@
 True
 False
 Effects:
+True
+effectslb
 0
   
   
@@ -240,6 +244,8 @@
 True
 False
 Relief:
+True
+relieflb
 0
   
   
@@ -252,6 +258,8 @@
 True
 False
 Overlining:
+True
+overlinelb
 0
   
   
@@ -264,6 +272,8 @@
 True
 False
 Strikethrough:
+True
+strikeoutlb
 0
   
   
@@ -276,6 +286,8 @@
 True
 False
 Underlining:
+True
+underlinelb
 0
   
   
@@ -288,6 +300,8 @@
 True
 False
 Overline 
color:
+True
+overlinecolorlb
 0
   
   
@@ -300,6 +314,8 @@
 True
 False
 Underline 
color:
+True
+underlinecolorlb
 0
   
   
@@ -478,6 +494,8 @@
 True
 False
 Position:
+True
+positionlb
 0
   
   
@@ -490,6 +508,8 @@
 True
 False
 Emphasis mark:
+True
+emphasislb
 0
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Michael Stahl
 comphelper/source/misc/asyncnotification.cxx  |  128 +-
 dbaccess/source/core/dataaccess/documenteventnotifier.cxx |   24 +-
 include/comphelper/asyncnotification.hxx  |   72 ++-
 vcl/source/app/svmain.cxx |5 
 4 files changed, 202 insertions(+), 27 deletions(-)

New commits:
commit a2095b151409f0fb57aa8feaa4c6282f84040245
Author: Michael Stahl 
Date:   Tue Jul 26 23:42:36 2016 +0200

comphelper,vcl: let DeInitVCL() join some AsyncEventNotifier threads

comphelper::AsyncEventNotifier is an amazing class that dispatches
events in separate threads, no doubt implemented during times of
exuberant optimism about the tractability of shared-state
multi-threading.

Unfortunately the authors forgot to think about how all those awesome
threads will be joined, so if they are somehow blocked, then it may well
happen that the events are dispatched when the main thread is already in
DeInitVCL, and the objects required for the dispatching already smell
somewhat funny.

This happens quite reproducibly when changing dbaccess' ModelMethodGuard
to lock the SolarMutex too, then CppunitTest_dbaccess_RowSetClones
crashes in DeInitVCL() because one AsyncEventNotifier thread was blocked
until then by SolarMutexGuard, and this test never Yields once its
document is loaded.

Try to fix this by joining the "DocumentEventNotifier" threads from
DeInitVCL() itself.

Since there's no rtl::WeakReference to go with rtl::Reference, refactor
the AsyncEventNotifier and create a new AsyncEventNotifierAutoJoin
that has to be used with std::shared_ptr and std::weak_ptr.

Change-Id: I50a0749795acb04b0776e543f7125767b697ea35
Reviewed-on: https://gerrit.libreoffice.org/27581
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/comphelper/source/misc/asyncnotification.cxx 
b/comphelper/source/misc/asyncnotification.cxx
index 85643e2..e13be28 100644
--- a/comphelper/source/misc/asyncnotification.cxx
+++ b/comphelper/source/misc/asyncnotification.cxx
@@ -21,10 +21,12 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -76,6 +78,9 @@ namespace comphelper
 ::osl::ConditionaPendingActions;
 EventQueue  aEvents;
 boolbTerminate;
+// only used for AsyncEventNotifierAutoJoin
+char const* name;
+std::shared_ptr pKeepThisAlive;
 
 EventNotifierImpl()
 :bTerminate( false )
@@ -83,18 +88,18 @@ namespace comphelper
 }
 };
 
-AsyncEventNotifier::AsyncEventNotifier(char const * name):
-Thread(name), m_xImpl(new EventNotifierImpl)
+AsyncEventNotifierBase::AsyncEventNotifierBase()
+: m_xImpl(new EventNotifierImpl)
 {
 }
 
 
-AsyncEventNotifier::~AsyncEventNotifier()
+AsyncEventNotifierBase::~AsyncEventNotifierBase()
 {
 }
 
 
-void AsyncEventNotifier::removeEventsForProcessor( const ::rtl::Reference< 
IEventProcessor >& _xProcessor )
+void AsyncEventNotifierBase::removeEventsForProcessor( const 
::rtl::Reference< IEventProcessor >& _xProcessor )
 {
 ::osl::MutexGuard aGuard( m_xImpl->aMutex );
 
@@ -103,7 +108,7 @@ namespace comphelper
 }
 
 
-void SAL_CALL AsyncEventNotifier::terminate()
+void SAL_CALL AsyncEventNotifierBase::terminate()
 {
 ::osl::MutexGuard aGuard( m_xImpl->aMutex );
 
@@ -115,7 +120,7 @@ namespace comphelper
 }
 
 
-void AsyncEventNotifier::addEvent( const AnyEventRef& _rEvent, const 
::rtl::Reference< IEventProcessor >& _xProcessor )
+void AsyncEventNotifierBase::addEvent( const AnyEventRef& _rEvent, const 
::rtl::Reference< IEventProcessor >& _xProcessor )
 {
 ::osl::MutexGuard aGuard( m_xImpl->aMutex );
 
@@ -128,7 +133,7 @@ namespace comphelper
 }
 
 
-void AsyncEventNotifier::execute()
+void AsyncEventNotifierBase::execute()
 {
 for (;;)
 {
@@ -160,6 +165,115 @@ namespace comphelper
 }
 }
 
+AsyncEventNotifier::AsyncEventNotifier(char const* name)
+: salhelper::Thread(name)
+{
+}
+
+AsyncEventNotifier::~AsyncEventNotifier()
+{
+}
+
+void AsyncEventNotifier::execute()
+{
+return AsyncEventNotifierBase::execute();
+}
+
+void AsyncEventNotifier::terminate()
+{
+return AsyncEventNotifierBase::terminate();
+}
+
+struct theNotifiersMutex : public rtl::Static {};
+static std::vector> g_Notifiers;
+
+void JoinAsyncEventNotifiers()
+{
+std::vector> notifiers;
+{
+::osl::MutexGuard g(theNotifiersMutex::get());
+notifiers = g_Notifiers;
+}
+for (std::weak_ptr const& wNotifier : 
notifiers)
+{
+std::shared_ptr const pNotifier(
+   

Firebird - weekly status update

2016-07-29 Thread Bunth Tamás
Hi,

The external Firebird 3.0 now builds on Windows.
https://gerrit.libreoffice.org/27642/
Although I got an error when compiling the firebird driver:
error C1083: Cannot open include file: 'ibase.h': No such file or directory.

After I make it work, I'm going to continue with Mac OS. Probably it
is the easier one.

Regards,
Tamás Bunth
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2016-07-29 Thread Caolán McNamara
 vcl/source/window/dlgctrl.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1d81d868d2e9988c124e68c4906ba50036615ffe
Author: Caolán McNamara 
Date:   Fri Jul 29 11:24:31 2016 +0100

strangely misplaced modeline

Change-Id: I4c8dabbd2eeac2e3edb72a426687af8692c77497

diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index e51088f..3cb40ab 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -1116,7 +1116,7 @@ KeyEvent Window::GetActivationKey() const
 
 } /* namespace vcl */
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */sal_Unicode getAccel( const 
OUString& rStr )
+sal_Unicode getAccel( const OUString& rStr )
 {
 sal_Unicode nChar = 0;
 sal_Int32 nPos = 0;
@@ -1131,4 +1131,4 @@ KeyEvent Window::GetActivationKey() const
 return nChar;
 }
 
-
+/* 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: ucb/source

2016-07-29 Thread Giuseppe Castagno
 ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx |   26 ++-
 1 file changed, 16 insertions(+), 10 deletions(-)

New commits:
commit be47f60b51c053c6329637e829ce16e2e90610fe
Author: Giuseppe Castagno 
Date:   Mon Jan 11 16:35:34 2016 +0100

tdf#101094 (9) OPTIONS: Add options check in Content::getProperties

Change-Id: I1937d51158f67055ed4bbeb60dafbf8ffee090ae
Reviewed-on: https://gerrit.libreoffice.org/27667
Tested-by: Jenkins 
Reviewed-by: Giuseppe Castagno 

diff --git a/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx 
b/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
index 3a2e566..4dd8f41 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
@@ -312,18 +312,24 @@ uno::Sequence< beans::Property > Content::getProperties(
 if ( !bTransient )
 {
 // Obtain all properties supported for this resource from server.
-try
+DAVOptions aDAVOptions;
+getResourceOptions( xEnv, aDAVOptions, xResAccess );
+// only Class 1 is needed for PROPFIND
+if ( aDAVOptions.isClass1() )
 {
-std::vector< DAVResourceInfo > props;
-xResAccess->PROPFIND( DAVZERO, props, xEnv );
+try
+{
+std::vector< DAVResourceInfo > props;
+xResAccess->PROPFIND( DAVZERO, props, xEnv );
 
-// Note: vector always contains exactly one resource info, because
-//   we used a depth of DAVZERO for PROPFIND.
-aPropSet.insert( (*props.begin()).properties.begin(),
- (*props.begin()).properties.end() );
-}
-catch ( DAVException const & )
-{
+// Note: vector always contains exactly one resource info, 
because
+//   we used a depth of DAVZERO for PROPFIND.
+aPropSet.insert( (*props.begin()).properties.begin(),
+ (*props.begin()).properties.end() );
+}
+catch ( DAVException const & )
+{
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

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

New commits:
commit 9a40590d0ca45a587717b3931a5eed8c2c2c6f1b
Author: Caolán McNamara 
Date:   Fri Jul 29 12:20:25 2016 +0100

this 0x4000 means KEY_MOD2

Change-Id: Id260c776241cfa5af35c51ccee7ba6942a353f8d

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index f6d460d..1df5038 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1801,7 +1801,7 @@ void Window::KeyInput( const KeyEvent& rKEvt )
 if (cod.GetCode () >= 0x200 && cod.GetCode () <= 0x219)
 {
 if (!accel) return;
-if (autoacc && cod.GetModifier () != 0x4000) return;
+if (autoacc && cod.GetModifier () != KEY_MOD2) return;
 }
 
 NotifyEvent aNEvt( MouseNotifyEvent::KEYINPUT, this, &rKEvt );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Eike Rathke
 sc/source/ui/inc/viewdata.hxx  |2 ++
 sc/source/ui/view/viewdata.cxx |   15 ++-
 2 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 4b90c9dc83d96908d3732d95e75c2f71d0f5d988
Author: Eike Rathke 
Date:   Fri Jul 29 13:30:07 2016 +0200

move range detection to ScViewData::SelectionFillDOOM()

Change-Id: Ic5205428136fc323affed8d956d6ee0434d43988

diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 7c1c098..141e758 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -356,6 +356,8 @@ public:
 
 /// Disallow paste on Ctrl+A all selected. We'd go DOOM.
 boolSelectionForbidsPaste();
+/// Determine DOOM condition, i.e. from selected range.
+static bool SelectionFillDOOM( const ScRange& rRange );
 
 voidSetFillMode( SCCOL nStartCol, SCROW nStartRow, SCCOL 
nEndCol, SCROW nEndRow );
 voidSetDragMode( SCCOL nStartCol, SCROW nStartRow, SCCOL 
nEndCol, SCROW nEndRow,
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index d07f711..dc31056 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -856,14 +856,19 @@ bool ScViewData::IsMultiMarked()
 
 bool ScViewData::SelectionForbidsPaste()
 {
-SCCOL nCol1, nCol2;
-SCROW nRow1, nRow2;
-SCTAB nTab1, nTab2;
-ScMarkType eMarkType = GetSimpleArea( nCol1, nRow1, nTab1, nCol2, nRow2, 
nTab2);
+ScRange aSelRange( ScAddress::UNINITIALIZED );
+ScMarkType eMarkType = GetSimpleArea( aSelRange);
+return eMarkType != SC_MARK_MULTI && SelectionFillDOOM( aSelRange);
+}
+
+// static
+bool ScViewData::SelectionFillDOOM( const ScRange& rRange )
+{
 /* TODO: it is still possible to select one row less than the entire sheet
  * and fool around. We could narrow this down to some "sane" value, just
  * what would be sane? At least this helps against the Ctrl+A cases. */
-return eMarkType != SC_MARK_MULTI && nCol1 == 0 && nCol2 == MAXCOL && 
nRow1 == 0 && nRow2 == MAXROW;
+return  rRange.aStart.Col() == 0 && rRange.aEnd.Col() == MAXCOL &&
+rRange.aStart.Row() == 0 && rRange.aEnd.Row() == MAXROW;
 }
 
 void ScViewData::SetFillMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, 
SCROW nEndRow )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Miklos Vajna
 compilerplugins/clang/badstatics.cxx |3 ---
 include/sfx2/viewsh.hxx  |1 +
 sfx2/source/view/lokhelper.cxx   |   29 ++---
 sfx2/source/view/viewimp.hxx |2 ++
 sfx2/source/view/viewsh.cxx  |9 +
 5 files changed, 18 insertions(+), 26 deletions(-)

New commits:
commit 389d4d414291879b9097658080e405a06dc0c1fc
Author: Miklos Vajna 
Date:   Fri Jul 29 11:47:22 2016 +0200

sfx2: introduce SfxViewShell::GetViewShellId()

This is quite similar to SwFrame::GetFrameId(), i.e. it assigns a
numeric identifier to each instance to help debugging, as those
identifiers are stable accross runs.

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

diff --git a/compilerplugins/clang/badstatics.cxx 
b/compilerplugins/clang/badstatics.cxx
index 7f09dbc..12e6b93 100644
--- a/compilerplugins/clang/badstatics.cxx
+++ b/compilerplugins/clang/badstatics.cxx
@@ -150,9 +150,6 @@ public:
 // ScAddInAsync* keys if that set is not empty at exit
 || name == "g_aWindowList"
 //vcl/unx/gtk/a11y/atkutil.cxx, asserted empty at exit
-|| name=="aViewMap"
-// sfx2/source/view/lokhelper.cxx, not owning, leaked by
-// (mis-)design
) // these variables appear unproblematic
 {
 return true;
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index a665913..f6e5777 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -334,6 +334,7 @@ public:
 /// See lok::Document::getPart().
 virtual int getPart() const;
 virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const;
+sal_uInt32 GetViewShellId() const;
 };
 
 
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 09d78cf..856a007 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -17,42 +17,24 @@
 
 #include 
 
-namespace
-{
-
-/// Assigns a view ID to a view shell.
-int shellToView(SfxViewShell* pViewShell)
-{
-// Deleted view shells are not removed from this map, so view IDs are not
-// reused when deleting, then creating a view.
-static std::map aViewMap;
-auto it = aViewMap.find(pViewShell);
-if (it != aViewMap.end())
-return it->second;
-
-int nViewId = aViewMap.size();
-aViewMap[pViewShell] = nViewId;
-return nViewId;
-}
-}
-
 int SfxLokHelper::createView()
 {
 SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst();
 SfxRequest aRequest(pViewFrame, SID_NEWWINDOW);
 pViewFrame->ExecView_Impl(aRequest);
 
-return shellToView(SfxViewShell::Current());
+return SfxViewShell::Current()->GetViewShellId();
 }
 
 void SfxLokHelper::destroyView(int nId)
 {
+unsigned nViewShellId = nId;
 SfxViewShellArr_Impl& rViewArr = SfxGetpApp()->GetViewShells_Impl();
 
 for (std::size_t i = 0; i < rViewArr.size(); ++i)
 {
 SfxViewShell* pViewShell = rViewArr[i];
-if (shellToView(pViewShell) == nId)
+if (pViewShell->GetViewShellId() == nViewShellId)
 {
 SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
 SfxRequest aRequest(pViewFrame, SID_CLOSEWIN);
@@ -64,12 +46,13 @@ void SfxLokHelper::destroyView(int nId)
 
 void SfxLokHelper::setView(int nId)
 {
+unsigned nViewShellId = nId;
 SfxViewShellArr_Impl& rViewArr = SfxGetpApp()->GetViewShells_Impl();
 
 for (std::size_t i = 0; i < rViewArr.size(); ++i)
 {
 SfxViewShell* pViewShell = rViewArr[i];
-if (shellToView(pViewShell) == nId)
+if (pViewShell->GetViewShellId() == nViewShellId)
 {
 if (pViewShell == SfxViewShell::Current())
 return;
@@ -86,7 +69,7 @@ int SfxLokHelper::getView(SfxViewShell* pViewShell)
 {
 if (!pViewShell)
 pViewShell = SfxViewShell::Current();
-return shellToView(pViewShell);
+return pViewShell->GetViewShellId();
 }
 
 std::size_t SfxLokHelper::getViews()
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index fa3e680..95fdf82 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -62,6 +62,8 @@ struct SfxViewShell_Impl
 void* m_pLibreOfficeKitViewData;
 /// Set if we are in the middle of a tiled search.
 bool m_bTiledSearching;
+static sal_uInt32 m_nLastViewShellId;
+const sal_uInt32 m_nViewShellId;
 
 explicit SfxViewShell_Impl(SfxViewShellFlags const nFlags);
 ~SfxViewShell_Impl();
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 2108633..6ffd253 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -238,6 +238,8 @@ public:
 size_t size() const { return maData.size(); }
 };
 
+sal_uInt32 SfxViewShell_Impl::m_nLastViewSh

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

2016-07-29 Thread Giuseppe Castagno
 ucb/qa/cppunit/webdav/webdav_options.cxx |   28 ++
 ucb/source/ucp/webdav-neon/DAVTypes.cxx  |   80 ++-
 ucb/source/ucp/webdav-neon/DAVTypes.hxx  |   24 +
 3 files changed, 131 insertions(+), 1 deletion(-)

New commits:
commit b641d83bb9f8adba1a487ca0e04d7151f96c3eea
Author: Giuseppe Castagno 
Date:   Sun Jan 10 10:05:02 2016 +0100

tdf#101094 (10) OPTIONS: Add a simple options cache class

Added behavioral unit tests as well.

Change-Id: I30f84c8f814d3460a421428ebe0d2fbc32c5c433
Reviewed-on: https://gerrit.libreoffice.org/27668
Tested-by: Jenkins 
Reviewed-by: Giuseppe Castagno 

diff --git a/ucb/qa/cppunit/webdav/webdav_options.cxx 
b/ucb/qa/cppunit/webdav/webdav_options.cxx
index dd7ad24..7c0ec7b 100644
--- a/ucb/qa/cppunit/webdav/webdav_options.cxx
+++ b/ucb/qa/cppunit/webdav/webdav_options.cxx
@@ -29,12 +29,15 @@ namespace
 void DAVTypesCheckReset( webdav_ucp::DAVOptions aDavType );
 void DAVTypesTest();
 
+void DAVOptsCacheTests();
+
 // Change the following lines only, if you add, remove or rename
 // member functions of the current class,
 // because these macros are need by auto register mechanism.
 
 CPPUNIT_TEST_SUITE( webdav_opts_test );
 CPPUNIT_TEST( DAVTypesTest );
+CPPUNIT_TEST( DAVOptsCacheTests );
 CPPUNIT_TEST_SUITE_END();
 };  // class webdav_local_test
 
@@ -247,6 +250,31 @@ namespace
 CPPUNIT_ASSERT_EQUAL( false , aDavOpt == aDavOptTarget );
 }
 
+void webdav_opts_test::DAVOptsCacheTests()
+{
+// define a local cache to test
+webdav_ucp::DAVOptionsCache aDAVOptsCache;
+// the value to cache
+webdav_ucp::DAVOptions aDavOpt;
+// the returned value to test
+webdav_ucp::DAVOptions aDavOptCached;
+// init the values
+OUString aAllowedMethods = 
"OPTIONS,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,PUT,LOCK,UNLOCK";
+OUString aURL = "http://a%20fake%20url/to%20test/another-url";;
+OUString aRedirectedURL = 
"http://a%20fake%20url/to%20test/another-url/redirected";;
+aDavOpt.setURL( aURL );
+aDavOpt.setRedirectedURL( aRedirectedURL );
+aDavOpt.setResourceFound();
+aDavOpt.setClass1();
+aDavOpt.setClass2();
+aDavOpt.setClass3();
+aDavOpt.setAllowedMethods( aAllowedMethods );
+// add to cache
+aDAVOptsCache.addDAVOptions( aDavOpt, 3 );
+CPPUNIT_ASSERT_EQUAL( true ,aDAVOptsCache.getDAVOptions( aURL, 
aDavOptCached ) );
+CPPUNIT_ASSERT_EQUAL( true , aDavOpt == aDavOptCached );
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION( webdav_opts_test );
 }   // namespace rtl_random
 
diff --git a/ucb/source/ucp/webdav-neon/DAVTypes.cxx 
b/ucb/source/ucp/webdav-neon/DAVTypes.cxx
index 1fbf84d..c0eb4ea 100644
--- a/ucb/source/ucp/webdav-neon/DAVTypes.cxx
+++ b/ucb/source/ucp/webdav-neon/DAVTypes.cxx
@@ -17,7 +17,7 @@
 using namespace webdav_ucp;
 using namespace com::sun::star;
 
-// DAVCapabilities implementation
+// DAVOptions implementation
 
 DAVOptions::DAVOptions() :
 m_isResourceFound( false ),
@@ -64,4 +64,82 @@ bool DAVOptions::operator==( const DAVOptions& rOpts ) const
 }
 
 
+// DAVOptionsCache implementation
+
+DAVOptionsCache::DAVOptionsCache()
+{
+}
+
+
+DAVOptionsCache::~DAVOptionsCache()
+{
+}
+
+
+bool DAVOptionsCache::getDAVOptions( const OUString & rURL, DAVOptions & 
rDAVOptions )
+{
+osl::MutexGuard aGuard( m_aMutex );
+OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( NeonUri::unescape( 
rURL ) ) );
+normalizeURLLastChar( aEncodedUrl );
+
+// search the URL in the static map
+DAVOptionsMap::iterator it;
+it = m_aTheCache.find( aEncodedUrl );
+if ( it == m_aTheCache.end() )
+return false;
+else
+{
+// check if the capabilities are stale, before restoring
+TimeValue t1;
+osl_getSystemTime( &t1 );
+if ( (*it).second.getStaleTime() < t1.Seconds )
+{
+// if stale, remove from cache, do not restore
+removeDAVOptions( rURL );
+return false;
+// return false instead
+}
+rDAVOptions = (*it).second;
+return true;
+}
+}
+
+
+void DAVOptionsCache::removeDAVOptions( const OUString & rURL )
+{
+osl::MutexGuard aGuard( m_aMutex );
+OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( NeonUri::unescape( 
rURL ) ) );
+normalizeURLLastChar( aEncodedUrl );
+
+DAVOptionsMap::iterator it;
+it = m_aTheCache.find( aEncodedUrl );
+if ( it != m_aTheCache.end() )
+{
+m_aTheCache.erase( it );
+}
+}
+
+
+void DAVOptionsCache::addDAVOptions( DAVOptions & rDAVOptions, const 
sal_uInt32 nLifeTime )
+{
+osl::MutexGuard aGuard( m_aMutex );
+
+OUString aURL( rDAVOptions.getURL() );
+
+OUString 

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

2016-07-29 Thread Caolán McNamara
 vcl/unx/gtk3/gtk3gtkframe.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit a840b2526b8b8e44991bef2eb7b6ba44a1a90d3a
Author: Caolán McNamara 
Date:   Fri Jul 29 12:44:19 2016 +0100

only map GDK_SUPER_MASK to KEY_MOD3 and not GDK_META_MASK

on wayland I'm getting a GDK_MOD1_MASK and a GDK_META_MASK
on pressing the left alt. The check for KEY_MOD2 in
Window::KeyInput trips up with the extra KEY_MOD3 bit set
so the auto mnemonic underlines don't appear on pressing
left alt under wayland

Lets map only GDK_SUPER_MASK to KEY_MOD3

Change-Id: I1e9cc9fc095f5edfa7ad7c71440232c6de1ecf04

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index c09a5ca..09a422b 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -121,10 +121,7 @@ static sal_uInt16 GetKeyModCode( guint state )
 nCode |= KEY_MOD1;
 if( (state & GDK_MOD1_MASK) )
 nCode |= KEY_MOD2;
-
-// Map Meta/Super keys to MOD3 modifier on all Unix systems
-// except Mac OS X
-if ( (state & GDK_META_MASK ) || ( state & GDK_SUPER_MASK ) )
+if( (state & GDK_SUPER_MASK) )
 nCode |= KEY_MOD3;
 return nCode;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2016-07-29 Thread Ashod Nakashian
 loleaflet/src/map/Map.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b04f29b6796bf18a0297e04dccb76e6fbc027b36
Author: Ashod Nakashian 
Date:   Fri Jul 29 07:58:00 2016 -0400

loleaflet: dim the UI after 30 seconds of losing focus

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

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 6c94b31..3d9346f 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -767,7 +767,7 @@ L.Map = L.Evented.extend({
map._docLayer._onMessage('textselection:', null);
map._socket.sendMessage('userinactive');
 
-   }, 10 * 1000);
+   }, 30 * 1000); // Dim in 30 seconds.
},
 
_onLostFocus: function () {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-1-0' - loleaflet/src

2016-07-29 Thread Ashod Nakashian
 loleaflet/src/map/Map.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d991cc89d59a7f4891e45c0f40adb0fb31e4672e
Author: Ashod Nakashian 
Date:   Fri Jul 29 07:58:00 2016 -0400

loleaflet: dim the UI after 30 seconds of losing focus

Change-Id: I28239eb92e758b45d10e260c7a8f616062b22839
Reviewed-on: https://gerrit.libreoffice.org/27681
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit b04f29b6796bf18a0297e04dccb76e6fbc027b36)
Reviewed-on: https://gerrit.libreoffice.org/27683

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 3cbbf59..981734b 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -763,7 +763,7 @@ L.Map = L.Evented.extend({
map._docLayer._onMessage('textselection:', null);
map._socket.sendMessage('userinactive');
 
-   }, 10 * 1000);
+   }, 30 * 1000); // Dim in 30 seconds.
},
 
_onLostFocus: function () {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Help with an old regression in text rendering needed

2016-07-29 Thread Caolán McNamara
On Fri, 2016-07-29 at 10:34 +0200, Milos Sramek wrote:
> Thank you, Caolán, for your suggestions.
> 
> 
> The first thing I've tried was to compile the current version with
> and without harfbuzz using
> ./autogen.sh --with-harfbuzz=no
> The result was the same (bad).
> 
> I am, however, not sure if harfbuzz was really switched off

Yeah, you can't turn off harfbuzz under Linux, the option is only to
enable turning it *on* for other platforms since it became the only
implementation under Linux.

> I've tried to investigate it bit deeper:
> 
> revision mentioned:
> bff8fa9 - (2013-05-06 11:08:29 +0200) Enable HarfBuzz by default -
> Khaled Hosny
> 
> The last good revision according to my bibisection
> f0393d7 - (2013-05-06 16:54:53 +0200) [harfbuzz] Fix text width
> calculation, 3rd try - Khaled Hosny

Note that the very next commit after f0393d7 is actually bff8fa9, so
you can probably short circuit bisecting and jump straight
between bff8fa9 and f0393d7

> The first bad revision according to my bibisection
> 48ad2f6 - (2013-05-06 12:48:23 +0200) fdo#46808, Convert some code to
> getProcessComponentContext
> 
> So, they really are from the same day.



> I unfortunately cannot compile these revisions, maybe because my
> compiter is too new (gcc version 5.4.0 20160609 (Ubuntu
> 5.4.0-6ubuntu1~16.04.1)). I happens because of std::auto_ptr:
> /workdir/unxlngx6.pro/UnpackedTarball/boost/boost/smart_ptr/scoped_pt
> r.hpp:66:31:
> warning: ‘template class std::auto_ptr’ is deprecated
> [-Wdeprecated-declarations]

That's only a warning. So unless you have used --enable-werror to makes
warnings fatal then that warning shouldn't be a problem. But seeing as
f0393d7 built, presumably bff8fa9 (because its the next commit) builds
as well for comparison.

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


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

2016-07-29 Thread Ashod Nakashian
 loolwsd/FileServer.cpp |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit a5716da8f88a1ae79a227e2649d95b83e77f7cdd
Author: Ashod Nakashian 
Date:   Fri Jul 29 08:42:43 2016 -0400

loolwsd: fail gracefully on invalid file requests

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

diff --git a/loolwsd/FileServer.cpp b/loolwsd/FileServer.cpp
index eef1b48..a18ee17 100644
--- a/loolwsd/FileServer.cpp
+++ b/loolwsd/FileServer.cpp
@@ -211,9 +211,17 @@ void 
FileServerRequestHandler::preprocessFile(HTTPServerRequest& request, HTTPSe
 
 const auto host = (LOOLWSD::isSSLEnabled() ? "wss://" : "ws://") + 
(LOOLWSD::ServerName.empty() ? request.getHost() : LOOLWSD::ServerName);
 const auto path = Poco::Path(LOOLWSD::FileServerRoot, 
getRequestPathname(request));
-
 Log::debug("Preprocessing file: " + path.toString());
 
+if (!Poco::File(path).exists())
+{
+Log::error("File [" + path.toString() + "] does not exist.");
+response.setStatusAndReason(HTTPResponse::HTTP_NOT_FOUND);
+response.setContentLength(0); // TODO return some 404 page?
+response.send();
+return;
+}
+
 std::string preprocess;
 FileInputStream file(path.toString());
 StreamCopier::copyToString(file, preprocess);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


single installation 'regression'

2016-07-29 Thread Caolán McNamara
On Thu, 2016-07-28 at 16:18 +0100, Michael Meeks wrote:
>     * ~Component   count net * all regressions
...
>   Installation -   1 (+0)
>                 + http://tdf.io/allregressions

Just to take a brief look at one of the two categories which have just
a single regression claimed for them then we have

https://bugs.documentfoundation.org/show_bug.cgi?id=69066
for Windows installation woes (apparently) with explorer extensions.
This one is a typical 50 comment trainwreck which may no longer be the
original problem at this point.

Comment #6 suggests that if the warning appears and is ignored, then
there will be a prompt to reboot to continue at the end.

Is there a route to detect during the install that the warning is about
Windows Explorer and auto-ignore it, i.e. just skip it and move
straight to requiring a reboot afterwards if the problem is Windows
Explorer ? Or is that outside of our control.

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


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

2016-07-29 Thread Miklos Vajna
 include/svl/undo.hxx |2 ++
 svl/source/undo/undo.cxx |5 +
 2 files changed, 7 insertions(+)

New commits:
commit 7494466e43daa4d071224f401267e2b6fd4222aa
Author: Miklos Vajna 
Date:   Fri Jul 29 13:58:07 2016 +0200

svl: add SfxUndoAction::GetViewShellId()

In preparation of a Writer version that overrides this and remembers
which view shell introduced which action.

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

diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx
index 59adae4..6966472 100644
--- a/include/svl/undo.hxx
+++ b/include/svl/undo.hxx
@@ -59,6 +59,8 @@ public:
 virtual OUStringGetComment() const;
 virtual OUStringGetRepeatComment(SfxRepeatTarget&) const;
 virtual sal_uInt16  GetId() const;
+/// ID of the view shell that created this undo action.
+virtual sal_Int32 GetViewShellId() const;
 virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const;
 
 private:
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index 4b0dda7..2de9194 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -72,6 +72,10 @@ sal_uInt16 SfxUndoAction::GetId() const
 return 0;
 }
 
+sal_Int32 SfxUndoAction::GetViewShellId() const
+{
+return -1;
+}
 
 OUString SfxUndoAction::GetRepeatComment(SfxRepeatTarget&) const
 {
@@ -125,6 +129,7 @@ void SfxUndoAction::dumpAsXml(xmlTextWriterPtr pWriter) 
const
 xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
 xmlTextWriterWriteAttribute(pWriter, BAD_CAST("symbol"), 
BAD_CAST(typeid(*this).name()));
 xmlTextWriterWriteAttribute(pWriter, BAD_CAST("comment"), 
BAD_CAST(GetComment().toUtf8().getStr()));
+xmlTextWriterWriteAttribute(pWriter, BAD_CAST("viewShellId"), 
BAD_CAST(OString::number(GetViewShellId()).getStr()));
 xmlTextWriterEndElement(pWriter);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Miklos Vajna
 connectivity/qa/connectivity/commontools/FValue_test.cxx |   64 +++
 connectivity/qa/connectivity/mork/DriverTest.cxx |8 -
 2 files changed, 36 insertions(+), 36 deletions(-)

New commits:
commit 410382a423018faeac1b47400f930bef62be3e46
Author: Miklos Vajna 
Date:   Fri Jul 29 13:41:34 2016 +0200

connectivity: fix loplugin:cppunitassertequals warnings

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

diff --git a/connectivity/qa/connectivity/commontools/FValue_test.cxx 
b/connectivity/qa/connectivity/commontools/FValue_test.cxx
index 1db73c6..c90fa58 100644
--- a/connectivity/qa/connectivity/commontools/FValue_test.cxx
+++ b/connectivity/qa/connectivity/commontools/FValue_test.cxx
@@ -87,7 +87,7 @@ void FValueTest::test_Bool()
 std::cerr << "src_Bool: " << src_Bool << std::endl;
 std::cerr << "trg_Bool: " << trg_Bool << std::endl;
 
-CPPUNIT_ASSERT_MESSAGE("bool conversion to ORowSetValue didn't work", 
src_Bool == trg_Bool);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("bool conversion to ORowSetValue didn't 
work", trg_Bool, src_Bool);
 
 Any any_Bool = v.makeAny();
 ORowSetValue t;
@@ -96,7 +96,7 @@ void FValueTest::test_Bool()
 
 std::cerr << "trg_Bool: " << trg_Bool << std::endl;
 
-CPPUNIT_ASSERT_MESSAGE("bool conversion from Any didn't work", src_Bool == 
trg_Bool);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("bool conversion from Any didn't work", 
trg_Bool, src_Bool);
 }
 
 void FValueTest::test_Int8()
@@ -108,7 +108,7 @@ void FValueTest::test_Int8()
 std::cerr << "src_salInt8: " << static_cast(src_salInt8) << 
std::endl;
 std::cerr << "trg_salInt8: " << static_cast(trg_salInt8) << 
std::endl;
 
-CPPUNIT_ASSERT_MESSAGE("sal_Int8 conversion to ORowSetValue didn't work", 
src_salInt8 == trg_salInt8);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8 conversion to ORowSetValue didn't 
work", trg_salInt8, src_salInt8);
 
 Any any_Int8 = v.makeAny();
 ORowSetValue t;
@@ -117,7 +117,7 @@ void FValueTest::test_Int8()
 
 std::cerr << "trg_salInt8: " << static_cast(trg_salInt8) << 
std::endl;
 
-CPPUNIT_ASSERT_MESSAGE("sal_Int8 conversion from Any didn't work", 
src_salInt8 == trg_salInt8);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int8 conversion from Any didn't work", 
trg_salInt8, src_salInt8);
 }
 
 void FValueTest::test_uInt8()
@@ -129,7 +129,7 @@ void FValueTest::test_uInt8()
 std::cerr << "src_saluInt8: " << static_cast(src_saluInt8) << 
std::endl;
 std::cerr << "trg_saluInt8: " << static_cast(trg_saluInt8) << 
std::endl;
 
-CPPUNIT_ASSERT_MESSAGE("sal_uInt8 conversion to ORowSetValue didn't work", 
src_saluInt8 == trg_saluInt8);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt8 conversion to ORowSetValue didn't 
work", trg_saluInt8, src_saluInt8);
 
 Any any_uInt8 = v.makeAny();
 ORowSetValue t;
@@ -138,7 +138,7 @@ void FValueTest::test_uInt8()
 
 std::cerr << "trg_saluInt8: " << static_cast(trg_saluInt8) << 
std::endl;
 
-CPPUNIT_ASSERT_MESSAGE("sal_uInt8 conversion from Any didn't work", 
src_saluInt8 == trg_saluInt8);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt8 conversion from Any didn't work", 
trg_saluInt8, src_saluInt8);
 }
 
 void FValueTest::test_Int16()
@@ -150,14 +150,14 @@ void FValueTest::test_Int16()
 std::cerr << "src_salInt16: " << src_salInt16 << std::endl;
 std::cerr << "trg_salInt16: " << trg_salInt16 << std::endl;
 
-CPPUNIT_ASSERT_MESSAGE("sal_Int16 conversion to ORowSetValue didn't work", 
src_salInt16 == trg_salInt16);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16 conversion to ORowSetValue didn't 
work", trg_salInt16, src_salInt16);
 
 Any any_Int16 = v.makeAny();
 ORowSetValue t;
 t.fill(any_Int16);
 trg_salInt16 = t.getInt16();
 
-CPPUNIT_ASSERT_MESSAGE("sal_Int16 conversion from Any didn't work", 
src_salInt16 == trg_salInt16);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_Int16 conversion from Any didn't work", 
trg_salInt16, src_salInt16);
 }
 
 void FValueTest::test_uInt16()
@@ -169,14 +169,14 @@ void FValueTest::test_uInt16()
 std::cerr << "src_saluInt16: " << src_saluInt16 << std::endl;
 std::cerr << "trg_saluInt16: " << trg_saluInt16 << std::endl;
 
-CPPUNIT_ASSERT_MESSAGE("sal_uInt16 conversion to ORowSetValue didn't 
work", src_saluInt16 == trg_saluInt16);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16 conversion to ORowSetValue didn't 
work", trg_saluInt16, src_saluInt16);
 
 Any any_uInt16 = v.makeAny();
 ORowSetValue t;
 t.fill(any_uInt16);
 trg_saluInt16 = t.getUInt16();
 
-CPPUNIT_ASSERT_MESSAGE("sal_uInt16 conversion from Any didn't work", 
src_saluInt16 == trg_saluInt16);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("sal_uInt16 conversion from Any didn't work", 
trg_saluInt16, src_saluInt16);
 }
 
 void FValueTest::test_Int32()
@@ -188,14 +188,14 @@ void FValueTest::test_Int32()
 std::cerr << "src_salInt32: " << 

Minutes of the Design Hangout: 2016-Jul-29

2016-07-29 Thread Heiko Tietze
Date: 2016-July-29
Present:  Olivier, Jay, Heiko, Susobhan, Kendy

Easy hacks and extensions
  - nothing new

Google Summer of Code

  * Sidebar Improvements (Susobhan)
  + Removed duplicate code from Media toolbar and Media Playback panel - 
https://gerrit.libreoffice.org/#/c/27363/
  + Working on adding checkbox for Styles Preview for Styles and Formatting 
- patch should be up by Saturday
  + Please check why 5.3 crashes when the sidebar's context menu is being 
closed 
(configuration menu button 
https://wiki.documentfoundation.org/Design/SideBar)

   * Notebookbar (Szymon, Kendy, Samuel)
+ Several issues solved (empty tabs, window resizing etc.)

Enhancements and proposals
+ Font substitution (Heiko)
  + https://bugs.documentfoundation.org/show_bug.cgi?id=94327
https://bugs.documentfoundation.org/show_bug.cgi?id=96872
https://bugs.documentfoundation.org/show_bug.cgi?id=78186
  + First of all have a better information (Jay)
  + It's in tools > options because admins may set it company wide (Kendy)
  + Provide means to install missing fonts directly, perhaps (Kendy)

+ Publish Layer/Group blog post? (Heiko)
  + Proof-reading first (Jay)




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


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

2016-07-29 Thread Eike Rathke
 sc/source/ui/docshell/docfunc.cxx |5 +
 sc/source/ui/view/cellsh.cxx  |   11 +++
 sc/source/ui/view/cellsh1.cxx |6 ++
 3 files changed, 22 insertions(+)

New commits:
commit c729ee7622b1d54b2dc82b1807c68899efeab6d7
Author: Eike Rathke 
Date:   Fri Jul 29 15:02:12 2016 +0200

Resolves: tdf#60056 disallow Fill when entire sheet is selected

Change-Id: I866f84d72c27be962dbad8f8e4dcb345aa336bff

diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index 1f4ed8d..cdaedc2 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -4604,6 +4604,11 @@ bool ScDocFunc::FillAuto( ScRange& rRange, const 
ScMarkData* pTabMark, FillDir e
 return false;
 }
 
+// FID_FILL_... slots should already had been disabled, check here for API
+// calls, no message.
+if (ScViewData::SelectionFillDOOM( aDestArea))
+return false;
+
 WaitObject aWait( ScDocShell::GetActiveDialogParent() );
 
 ScDocument* pUndoDoc = nullptr;
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 7379cdb..8b0a138 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -129,6 +129,8 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
 case FID_FILL_TO_BOTTOM:// fill to top / bottom
 {
 bDisable = !bSimpleArea || (nRow1 == 0 && nRow2 == 0);
+if (!bDisable && GetViewData()->SelectionForbidsPaste())
+bDisable = true;
 if ( !bDisable && bEditable )
 {   // do not damage matrix
 bDisable = pDoc->HasSelectedBlockMatrixFragment(
@@ -139,6 +141,8 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
 case FID_FILL_TO_TOP:
 {
 bDisable = (!bSimpleArea) || (nRow1 == MAXROW && nRow2 == 
MAXROW);
+if (!bDisable && GetViewData()->SelectionForbidsPaste())
+bDisable = true;
 if ( !bDisable && bEditable )
 {   // do not damage matrix
 bDisable = pDoc->HasSelectedBlockMatrixFragment(
@@ -149,6 +153,8 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
 case FID_FILL_TO_RIGHT: // fill to left / right
 {
 bDisable = !bSimpleArea || (nCol1 == 0 && nCol2 == 0);
+if (!bDisable && GetViewData()->SelectionForbidsPaste())
+bDisable = true;
 if ( !bDisable && bEditable )
 {   // do not damage matrix
 bDisable = pDoc->HasSelectedBlockMatrixFragment(
@@ -159,6 +165,8 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
 case FID_FILL_TO_LEFT:
 {
 bDisable = (!bSimpleArea) || (nCol1 == MAXCOL && nCol2 == 
MAXCOL);
+if (!bDisable && GetViewData()->SelectionForbidsPaste())
+bDisable = true;
 if ( !bDisable && bEditable )
 {   // do not damage matrix
 bDisable = pDoc->HasSelectedBlockMatrixFragment(
@@ -185,6 +193,9 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
 else
 bDisable = (!bSimpleArea) || (nCol1 == nCol2 && nRow1 == 
nRow2);
 
+if (!bDisable && GetViewData()->SelectionForbidsPaste())
+bDisable = true;
+
 if ( !bDisable && bEditable && nWhich == FID_FILL_SERIES )
 {   // do not damage matrix
 bDisable = pDoc->HasSelectedBlockMatrixFragment(
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 797bf86..10a3430 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -527,6 +527,12 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 
 case FID_FILL_SERIES:
 {
+if (GetViewData()->SelectionForbidsPaste())
+// Slot should be already disabled, but in case it wasn't
+// don't even attempt to do the evaluation and popup a
+// dialog.
+break;
+
 SCCOL nStartCol;
 SCROW nStartRow;
 SCTAB nStartTab;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Eike Rathke
 sc/source/ui/view/cellsh.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 77327759c9053da493430ee01b4d7fe98c174574
Author: Eike Rathke 
Date:   Fri Jul 29 15:19:31 2016 +0200

disallow Random Number when entire sheet is selected, tdf#60056 related

Change-Id: Ie9e229c3d3e5a5a7e3f3e90ebd181471927bd452

diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 8b0a138..c3b69da 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -176,6 +176,8 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
 break;
 
 case SID_RANDOM_NUMBER_GENERATOR_DIALOG:
+bDisable = !bSimpleArea || 
GetViewData()->SelectionForbidsPaste();
+break;
 case SID_SAMPLING_DIALOG:
 case SID_DESCRIPTIVE_STATISTICS_DIALOG:
 case SID_ANALYSIS_OF_VARIANCE_DIALOG:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Christian Lohmaier
New branch 'feature/fixes28' available with the following commits:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Caolán McNamara
 sc/source/core/tool/interpr2.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit fa293f7d6792a2beab048461c8a067e9ca980bb8
Author: Caolán McNamara 
Date:   Fri Jul 29 12:52:19 2016 +0100

use div() instead of /0 to content ubsan

for the same reason as...

commit fb2c146752074b132d665e40343a08dcb2e6672e
Author: Eike Rathke 
Date:   Mon Jul 25 13:32:17 2016 +0200

use div() instead of /0 to content ubsan

While we do handle double floating point division by 0 at least on
IEEE754 systems, ubsan builds mock about.

Change-Id: I2c96b63a4af3cb2e8483a1d0f2da91ea82da227c

diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 9c8f5e3..1723059 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -1872,11 +1872,11 @@ double ScInterpreter::ScGetRmz(double fRate, double 
fNper, double fPv,
 else
 {
 if (bPayInAdvance) // payment in advance
-fPayment = (fFv + fPv * exp( fNper * ::rtl::math::log1p(fRate) ) ) 
* fRate /
-(::rtl::math::expm1( (fNper + 1) * ::rtl::math::log1p(fRate) ) 
- fRate);
+fPayment = div((fFv + fPv * exp( fNper * ::rtl::math::log1p(fRate) 
) ) * fRate,
+(::rtl::math::expm1( (fNper + 1) * ::rtl::math::log1p(fRate) ) 
- fRate));
 else  // payment in arrear
-fPayment = (fFv + fPv * exp(fNper * ::rtl::math::log1p(fRate) ) ) 
* fRate /
-::rtl::math::expm1( fNper * ::rtl::math::log1p(fRate) );
+fPayment = div((fFv + fPv * exp(fNper * ::rtl::math::log1p(fRate) 
) ) * fRate,
+::rtl::math::expm1( fNper * ::rtl::math::log1p(fRate) ));
 }
 return -fPayment;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Caolán McNamara
 vcl/source/window/menuitemlist.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit ee79a2dd7ea60e902cab3a9203e307b8a78fee23
Author: Caolán McNamara 
Date:   Fri Jul 29 14:33:22 2016 +0100

Resolves: tdf#101169 crash using column menu in base

Change-Id: Ia4ce895d3562b29db648a7b568121a2867088493

diff --git a/vcl/source/window/menuitemlist.cxx 
b/vcl/source/window/menuitemlist.cxx
index 954615a..44757a4 100644
--- a/vcl/source/window/menuitemlist.cxx
+++ b/vcl/source/window/menuitemlist.cxx
@@ -41,6 +41,7 @@ MenuItemData::~MenuItemData()
 }
 if( pSalMenuItem )
 ImplGetSVData()->mpDefInst->DestroyMenuItem( pSalMenuItem );
+pSubMenu.disposeAndClear();
 }
 
 MenuItemList::~MenuItemList()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Help with an old regression in text rendering needed

2016-07-29 Thread Khaled Hosny
On Wed, Jul 20, 2016 at 08:55:01AM +0200, Milos Sramek wrote:
> 
> The problem is demonstrated by the attached files, which show pixel
> overlays of documents rendered in LO a MSOffice. There are some
> differences visible also in the 'good' file, but these are much bigger
> in the 'bad' one where they lead to different wrapping in the second
> paragraph.
> 
> The files shows also another problem, different line spacing. This was
> perhaps inherited from OOO.
> 
> The problem is perhaps not that important for users, but for my testing
> it is a blocker

So there are two issue here, different line spacing (which shows up in
both versions) and different character spacing.

Unless you are specifically testing the line spacing, you can use fixed
line spacing to work around the first issue by avoiding the automatic
line spacing which depends on font metrics that are often interpreted
differently. I’m pretty sure LibreOffice is using the right font
metrics, but MS Office might be using the wrong ones (which is often the
case with old Windows applications) for backward compatibility. If you
can provide a test document and the specific fonts used I can give it a
look and see what is the possible source of difference.

Different character spacing can possibly be a kerning issue, this can be
tests by using a long string of characters with no kerning ('s or 's
etc., but it depends on the font) and see if we still get differences.

Regards,
Khaled


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


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

2016-07-29 Thread Giuseppe Castagno
 officecfg/registry/schema/org/openoffice/Inet.xcs |   32 +++
 ucb/source/ucp/webdav-neon/webdavcontent.cxx  |   37 ++
 ucb/source/ucp/webdav-neon/webdavcontent.hxx  |   17 ++
 3 files changed, 86 insertions(+)

New commits:
commit 2c0b4ff238f39b5fcce09c7d36e80ac1e7cb713e
Author: Giuseppe Castagno 
Date:   Sun Jan 10 17:32:53 2016 +0100

tdf#101094 (11): Add WebDAV options cache configuration param.

Added in officecfg five new properties to be able to set
cache lifetime if needed.

The new properties are available in advanced, expert configuration only,
in org.openoffice.Inet.Settings.

Default values are as follows (value is in seconds):
OptsCacheLifeImplWeb = 300
when the web resource is Web only, implementing OPTIONS.
Min. 0 sec (no caching) max. 3600 sec (1h).

OptsCacheLifeDAV = 60
when the web resource is WebDAV.
Min. 0 sec (no caching) max. 3600 sec (1h).

OptsCacheLifeDAVLocked = 600
when the web resource is WebDAV and it's locked by
this LO instance (e.g. lock store has a lock to it).
Min. 0 sec (no caching) max. 3600 sec (1h).

OptsCacheLifeNotImpl = 3600
when the web resource does not implement OPTIONS method.
Min. 0 sec (no caching) max. 43200 sec (12h).

OptsCacheLifeNotFound = 15
when the requested web resource is not found on server.
Min. 0 sec (no caching) max. 30 sec.

Change-Id: I719b97645e1d91a29134820b77678fd88fcb9ac2
Reviewed-on: https://gerrit.libreoffice.org/27684
Tested-by: Jenkins 
Reviewed-by: Giuseppe Castagno 

diff --git a/officecfg/registry/schema/org/openoffice/Inet.xcs 
b/officecfg/registry/schema/org/openoffice/Inet.xcs
index f5dcc6a..76d5d2e 100644
--- a/officecfg/registry/schema/org/openoffice/Inet.xcs
+++ b/officecfg/registry/schema/org/openoffice/Inet.xcs
@@ -163,6 +163,38 @@
 
60
   
+  
+  
+
+  Specifies the Web/DAV resource OPTIONS cache lifetime, when 
the web resource is Web only, implementing OPTIONS. Time in seconds. Min. 0 sec 
(no caching) max. 3600 sec (1h), default to 300 (5m).
+
+   300
+  
+  
+
+  Specifies the Web/DAV resource OPTIONS cache lifetime, when 
the web resource is WebDAV. Time in seconds. Min. 0 sec (no caching) max. 3600 
sec (1h), default to 60 (1m).
+
+   60
+  
+  
+
+  Specifies the Web/DAV resource OPTIONS cache lifetime, when 
the web resource is WebDAV and the resource is locked. Time in seconds. Min. 0 
sec (no caching) max. 3600 sec (1h), default to 600 (10m).
+
+   600
+  
+  
+
+  Specifies the Web/DAV resource OPTIONS cache lifetime, when 
the web resource does not implement OPTIONS method. Time in seconds. Min. 0 sec 
(no caching) max. 43200 sec (12h), default to 3600 (1h)
+
+   3600
+  
+  
+
+  Specifies the Web/DAV resource OPTIONS cache lifetime, when 
the web resource is not found on server. Time in seconds. Min. 0 sec (no 
caching) max. 30 sec, default to 15 (15 sec).
+
+   15
+  
+  
 
   
 
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx 
b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 3c40ad8..8c84f5d 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -38,6 +38,7 @@
 #include "osl/doublecheckedlocking.h"
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -92,6 +93,12 @@
 using namespace com::sun::star;
 using namespace webdav_ucp;
 
+// Static value, to manage a simple OPTIONS cache
+// Key is the URL, element is the DAVOptions resulting from an OPTIONS call.
+// Cached DAVOptions have a lifetime that depends on the errors received or 
not received
+// and on the value of received options.
+static DAVOptionsCache aStaticDAVOptionsCache;
+
 
 // Content Implementation.
 
@@ -114,6 +121,7 @@ Content::Content(
 {
 try
 {
+initOptsCacheLifeTime();
 m_xResAccess.reset( new DAVResourceAccess(
 rxContext,
 rSessionFactory,
@@ -147,6 +155,7 @@ Content::Content(
 {
 try
 {
+initOptsCacheLifeTime();
 m_xResAccess.reset( new DAVResourceAccess(
 rxContext, rSessionFactory, Identifier->getContentIdentifier() ) );
 }
@@ -165,6 +174,34 @@ Content::~Content()
 }
 
 
+void Content::initOptsCacheLifeTime()
+{
+// see description in
+// officecfg/registry/schema/org/openoffice/Inet.xcs
+// for use of these filed values.
+sal_uInt32 nAtime;
+nAtime = officecfg::Inet::Settings::OptsCacheLifeImplWeb::get( m_xContext 
);
+m_nOptsCacheLifeImplWeb = std::max( sal_uInt32( 0 ),
+std::min( nAtime, sal_u

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

2016-07-29 Thread Christian Lohmaier
New branch 'feature/fixes29' available with the following commits:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Caolán McNamara
 sd/source/ui/func/fuoltext.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 94165d249e5de53f52ce38140312e341f9fb5cbf
Author: Caolán McNamara 
Date:   Fri Jul 29 14:49:56 2016 +0100

assert from unsorted sid array

Change-Id: I9f4d6274581bc800c8404fcbbe2369aa42d05302

diff --git a/sd/source/ui/func/fuoltext.cxx b/sd/source/ui/func/fuoltext.cxx
index 271909e..9ae6b61 100644
--- a/sd/source/ui/func/fuoltext.cxx
+++ b/sd/source/ui/func/fuoltext.cxx
@@ -72,12 +72,12 @@ static sal_uInt16 SidArray[] = {
 SID_SET_SUPER_SCRIPT,
 SID_SET_SUB_SCRIPT,
 SID_HYPERLINK_GETLINK,
+SID_PARASPACE_INCREASE,
+SID_PARASPACE_DECREASE,
 SID_STATUS_PAGE,
 SID_STATUS_LAYOUT,
 SID_EXPAND_PAGE,
 SID_SUMMARY_PAGE,
-SID_PARASPACE_INCREASE,
-SID_PARASPACE_DECREASE,
 0 };
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Caolán McNamara
 svtools/source/contnr/svimpbox.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 6da9e55fb68f937d14944d347381d619ccef220a
Author: Caolán McNamara 
Date:   Fri Jul 29 15:18:42 2016 +0100

this NOCOMMAND is never defined

Change-Id: I6a2ae90182eaeb534176dd0a2591bfe0c2242a5c

diff --git a/svtools/source/contnr/svimpbox.cxx 
b/svtools/source/contnr/svimpbox.cxx
index 14fd092..ccf9e66 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -3048,14 +3048,12 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
 }
 }
 }
-#ifndef NOCOMMAND
 else
 {
 const Point& rPos = rCEvt.GetMousePosPixel();
 if( rPos.X() < aOutputSize.Width() && rPos.Y() < aOutputSize.Height() )
 aSelEng.Command( rCEvt );
 }
-#endif
 }
 
 void SvImpLBox::BeginScroll()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Caolán McNamara
 svtools/source/contnr/treelistbox.cxx |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit a32c0828f6f73710d5473bc1cb093519a2a31133
Author: Caolán McNamara 
Date:   Fri Jul 29 15:26:01 2016 +0100

Related: tdf#99324 accel underlines don't appear in options dialog

Change-Id: I47cb6df2118ea86dea7225842dcdc4c1dafc439f

diff --git a/svtools/source/contnr/treelistbox.cxx 
b/svtools/source/contnr/treelistbox.cxx
index 1dda5b5..4754c51 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -3436,13 +3436,14 @@ void SvTreeListBox::SetHighlightRange( sal_uInt16 
nStart, sal_uInt16 nEnd)
 pImpl->RecalcFocusRect();
 }
 
-void SvTreeListBox::Command( const CommandEvent& rCEvt )
+void SvTreeListBox::Command(const CommandEvent& rCEvt)
 {
-// FIXME gnumake2 resync to DEV300_m84
-pImpl->Command( rCEvt );
+pImpl->Command(rCEvt);
+//pass at least alt press/release to parent impl
+if (rCEvt.GetCommand() == CommandEventId::ModKeyChange)
+Control::Command(rCEvt);
 }
 
-
 void SvTreeListBox::RemoveParentKeepChildren( SvTreeListEntry* pParent )
 {
 DBG_ASSERT(pParent,"RemoveParentKeepChildren:No Parent");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Caolán McNamara
 svtools/source/contnr/ivctrl.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit bb01247f71a46fb7cae18b51516096adfd059bbc
Author: Caolán McNamara 
Date:   Fri Jul 29 15:28:34 2016 +0100

Related: tdf#99324 accel underlines don't appear in hyperlink dialog

Change-Id: Ib16b239c88b1d1157fc18bc62b5f01c52e896a48

diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx
index 7c35e4a..9291c60 100644
--- a/svtools/source/contnr/ivctrl.cxx
+++ b/svtools/source/contnr/ivctrl.cxx
@@ -238,9 +238,13 @@ WinBits SvtIconChoiceCtrl::GetStyle() const
 {
 return _pImpl->GetStyle();
 }
-void SvtIconChoiceCtrl::Command( const CommandEvent& rCEvt )
+
+void SvtIconChoiceCtrl::Command(const CommandEvent& rCEvt)
 {
 _pImpl->Command( rCEvt );
+//pass at least alt press/release to parent impl
+if (rCEvt.GetCommand() == CommandEventId::ModKeyChange)
+Control::Command(rCEvt);
 }
 
 #ifdef DBG_UTIL
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Rishabh Kumar
 include/svx/PaletteManager.hxx |2 -
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   10 ++
 svx/source/tbxctrls/PaletteManager.cxx |   20 -
 3 files changed, 30 insertions(+), 2 deletions(-)

New commits:
commit 7f262a41017685709c288b57c8f03244e8c6149e
Author: Rishabh Kumar 
Date:   Fri Jul 29 18:39:46 2016 +0530

[GSoC] Fix recent colors in color popup widget

Save recent colors in user configuration.

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

diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx
index 09adc36..c8eb922 100644
--- a/include/svx/PaletteManager.hxx
+++ b/include/svx/PaletteManager.hxx
@@ -52,7 +52,7 @@ class PaletteManager
 std::vector> m_Palettes;
 
 std::function maColorSelectFunction;
-
+css::uno::Reference < css::uno::XComponentContext > m_context;
 public:
 PaletteManager();
 ~PaletteManager();
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 2d9ea8c..5edc96c 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -3406,6 +3406,16 @@
 
   
 
+
+  
+Contains recent colors and custom colors
+  
+  
+
+  List of Recent colors
+
+   
  
+
 
   
 Contains settings that specify the common help settings.
diff --git a/svx/source/tbxctrls/PaletteManager.cxx 
b/svx/source/tbxctrls/PaletteManager.cxx
index 55123aa..e14c172 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -30,6 +30,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 PaletteManager::PaletteManager() :
 
mnMaxRecentColors(Application::GetSettings().GetStyleSettings().GetColorValueSetColumnCount()),
@@ -38,7 +40,8 @@ PaletteManager::PaletteManager() :
 mnColorCount(0),
 mpBtnUpdater(nullptr),
 mLastColor(COL_AUTO),
-maColorSelectFunction(PaletteManager::DispatchColorCommand)
+maColorSelectFunction(PaletteManager::DispatchColorCommand),
+m_context(comphelper::getProcessComponentContext())
 {
 SfxObjectShell* pDocSh = SfxObjectShell::Current();
 if(pDocSh)
@@ -134,6 +137,13 @@ void PaletteManager::ReloadColorSet(SvxColorValueSet 
&rColorSet)
 
 void PaletteManager::ReloadRecentColorSet(SvxColorValueSet& rColorSet)
 {
+maRecentColors.clear();
+css::uno::Sequence< sal_Int32 > 
Colorlist(officecfg::Office::Common::UserColors::RecentColor::get());
+for(int i = 0;i < Colorlist.getLength();i++)
+{
+Color aColor( Colorlist[i] );
+maRecentColors.push_back( aColor );
+}
 rColorSet.Clear();
 int nIx = 1;
 for(std::deque::const_iterator it = maRecentColors.begin();
@@ -217,6 +227,14 @@ void PaletteManager::AddRecentColor(const Color& 
rRecentColor)
 maRecentColors.push_front( rRecentColor );
 if( maRecentColors.size() > mnMaxRecentColors )
 maRecentColors.pop_back();
+css::uno::Sequence< sal_Int32 > aColorList(maRecentColors.size());
+for(sal_uInt16 i = 0;i < maRecentColors.size();i++)
+{
+aColorList[i] = (int)maRecentColors[i].GetColor();
+}
+std::shared_ptr 
batch(comphelper::ConfigurationChanges::create(m_context));
+officecfg::Office::Common::UserColors::RecentColor::set(aColorList, batch);
+batch->commit();
 }
 
 void PaletteManager::SetBtnUpdater(svx::ToolboxButtonColorUpdater* pBtnUpdater)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Giuseppe Castagno
 ucb/source/ucp/webdav-neon/webdavcontent.cxx |  173 +--
 1 file changed, 110 insertions(+), 63 deletions(-)

New commits:
commit 37ada6f457e19b6ee2d2adb0b0ab3acb20705b51
Author: Giuseppe Castagno 
Date:   Sun Jan 10 17:43:12 2016 +0100

tdf#101094 (12) OPTIONS: Add options cache ctrl in getResourceOptions

Change-Id: If4f53e8efc51e5ec33747dfcbe8f4294bbd6160b
Reviewed-on: https://gerrit.libreoffice.org/27685
Tested-by: Jenkins 
Reviewed-by: Giuseppe Castagno 

diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx 
b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 8c84f5d..78a09b9 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -3700,78 +3700,125 @@ void Content::getResourceOptions(
 const std::unique_ptr< DAVResourceAccess > & rResAccess )
 throw ( css::uno::Exception, std::exception )
 {
-try
-{
-rResAccess->OPTIONS( rDAVOptions, xEnv );
-// IMPORTANT:the correctly implemented server will answer without 
errors, even if the resource is not present
-}
-catch ( DAVException const & e )
+OUString aRedirURL;
+OUString aTargetURL = rResAccess->getURL();
+// first check if in cache, if not, then send method to server
+if ( !aStaticDAVOptionsCache.getDAVOptions( aTargetURL, rDAVOptions ) )
 {
-rResAccess->resetUri();
-
-switch( e.getError() )
+try
 {
-case DAVException::DAV_HTTP_TIMEOUT:
-case DAVException::DAV_HTTP_CONNECT:
-{
-// something bad happened to the connection
-// not same as not found, this instead happens when the server 
does'n exist or does'n aswer at all
-// probably a new bit stating 'timed out' should be added to 
opts var?
-// in any case abort the command
-cancelCommandExecution( e, xEnv );
-// unreachable
-}
-break;
-case DAVException::DAV_HTTP_AUTH:
-{
-SAL_WARN( "ucb.ucp.webdav", "OPTIONS - DAVException 
Authentication error for URL <" << m_xIdentifier->getContentIdentifier() << ">" 
);
-// - the remote site is a WebDAV with special configuration: 
read/only for read operations
-//   and read/write for write operations, the user is not 
allowed to lock/write and
-//   she cancelled the credentials request.
-//   this is not actually an error, it means only that for 
current user this is a standard web,
-//   though possibly DAV enabled
+rResAccess->OPTIONS( rDAVOptions, xEnv );
+// IMPORTANT:the correctly implemented server will answer without 
errors, even if the resource is not present
+sal_uInt32 nLifeTime = ( rDAVOptions.isClass1() ||
+ rDAVOptions.isClass2() ||
+ rDAVOptions.isClass3() ) ?
+m_nOptsCacheLifeDAV : // a WebDAV site
+m_nOptsCacheLifeImplWeb;  // a site implementing OPTIONS but
+ // it's not DAV
+// check if redirected
+aRedirURL = rResAccess->getURL();
+if( aRedirURL == aTargetURL)
+{ // no redirection
+aRedirURL.clear();
 }
-break;
-case DAVException::DAV_HTTP_ERROR:
+// cache this URL's option
+rDAVOptions.setURL( aTargetURL );
+rDAVOptions.setRedirectedURL( aRedirURL );
+aStaticDAVOptionsCache.addDAVOptions( rDAVOptions,
+  nLifeTime );
+}
+catch ( DAVException const & e )
+{
+// first, remove from cache, will be added if needed, depending on 
the error received
+aStaticDAVOptionsCache.removeDAVOptions( aTargetURL );
+rResAccess->resetUri();
+
+rDAVOptions.setURL( aTargetURL );
+rDAVOptions.setRedirectedURL( aRedirURL );
+switch( e.getError() )
 {
-switch( e.getStatus() )
+case DAVException::DAV_HTTP_TIMEOUT:
+case DAVException::DAV_HTTP_CONNECT:
 {
-case SC_FORBIDDEN:
-{
-SAL_WARN( "ucb.ucp.webdav","OPTIONS - Forbidden for 
URL <" << m_xIdentifier->getContentIdentifier() << ">" );
-rDAVOptions.setResourceFound(); // means it exists, 
but it's not DAV
-}
-break;
-case SC_BAD_REQUEST:
-{
-SAL_WARN( "ucb.ucp.webdav","OPTIONS - Bad request for 
URL <" << m_xIdentifier->getContentIdentifier() << ">" );
-rDAVOptions.setResourc

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

2016-07-29 Thread Caolán McNamara
 include/vcl/accel.hxx|3 +++
 vcl/source/window/syswin.cxx |   14 +++---
 2 files changed, 10 insertions(+), 7 deletions(-)

New commits:
commit f305b882868a03295f1b3108976d14354fa1553c
Author: Caolán McNamara 
Date:   Fri Jul 29 15:44:06 2016 +0100

unhook the alt handling thing from SystemWindow

so it could be used from things that aren't dialogs

Change-Id: I649c5a05ad9c0634be9cef2bbe16a4643e58fc12

diff --git a/include/vcl/accel.hxx b/include/vcl/accel.hxx
index 7db25e4..295e2db 100644
--- a/include/vcl/accel.hxx
+++ b/include/vcl/accel.hxx
@@ -28,6 +28,7 @@
 
 class ImplAccelData;
 class ImplAccelEntry;
+class CommandEvent;
 
 class VCL_DLLPUBLIC Accelerator : public Resource
 {
@@ -79,6 +80,8 @@ public:
 voidSetSelectHdl( const Link& rLink 
) { maSelectHdl = rLink; }
 
 Accelerator&operator=( const Accelerator& rAccel );
+
+static bool ToggleMnemonicsOnHierarchy(const CommandEvent& 
rCEvent, vcl::Window *pWindow);
 };
 
 #endif // INCLUDED_VCL_ACCEL_HXX
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 8e8e5fb..836bca9 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -129,14 +129,14 @@ void ImplHandleControlAccelerator( vcl::Window* pWindow, 
bool bShow )
 }
 }
 
-bool SystemWindow::ImplHandleCmdEvent( const CommandEvent& rCEvent )
+bool Accelerator::ToggleMnemonicsOnHierarchy(const CommandEvent& rCEvent, 
vcl::Window *pWindow)
 {
 if (rCEvent.GetCommand() == CommandEventId::ModKeyChange)
 {
-const CommandModKeyData *pCData = rCEvent.GetModKeyData ();
-bool bShowAccel =  pCData && pCData->IsMod2();
+const CommandModKeyData *pCData = rCEvent.GetModKeyData();
+const bool bShowAccel =  pCData && pCData->IsMod2();
 
-Window *pGetChild = firstLogicalChildOfParent(this);
+vcl::Window *pGetChild = firstLogicalChildOfParent(pWindow);
 while (pGetChild)
 {
 if ( pGetChild->GetType() == WINDOW_TABCONTROL )
@@ -144,7 +144,7 @@ bool SystemWindow::ImplHandleCmdEvent( const CommandEvent& 
rCEvent )
  // find currently shown tab page
  TabControl* pTabControl = static_cast( pGetChild 
);
  TabPage* pTabPage = pTabControl->GetTabPage( 
pTabControl->GetCurPageId() );
- vcl::Window* pTabPageChild =  firstLogicalChildOfParent( 
pTabPage );
+ vcl::Window* pTabPageChild = firstLogicalChildOfParent( 
pTabPage );
 
  // and go through its children
  while ( pTabPageChild )
@@ -155,7 +155,7 @@ bool SystemWindow::ImplHandleCmdEvent( const CommandEvent& 
rCEvent )
 }
 
 ImplHandleControlAccelerator( pGetChild, bShowAccel );
-pGetChild = nextLogicalChildOfParent(this, pGetChild);
+pGetChild = nextLogicalChildOfParent(pWindow, pGetChild);
 }
 return true;
 }
@@ -187,7 +187,7 @@ bool SystemWindow::Notify( NotifyEvent& rNEvt )
 return true;
 if (rNEvt.GetType() == MouseNotifyEvent::COMMAND)
 {
-if (ImplHandleCmdEvent( *rNEvt.GetCommandEvent()))
+if 
(Accelerator::ToggleMnemonicsOnHierarchy(*rNEvt.GetCommandEvent(), this))
 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/collabora/cp-5.1' - 2 commits - instsetoo_native/util solenv/bin

2016-07-29 Thread Tor Lillqvist
 instsetoo_native/util/openoffice.lst.in |2 +-
 solenv/bin/ooinstall|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bb521b96c4d60c7f672df7bb301a2d5908af52f3
Author: Tor Lillqvist 
Date:   Fri Jul 29 19:03:50 2016 +0300

s/LibreOffice/Collabora Office/ for the product name in one more place

Otherwise I get: ERROR: Product Collabora Office not defined in
/Users/tml/lo/co-5.1/instsetoo_native/util/openoffice.lst at
/Users/tml/lo/co-5.1/solenv/bin/modules/installer/ziplist.pm line 150.

Change-Id: Ibd38e8f081c883ceb393896c0ac35c9be0260847

diff --git a/instsetoo_native/util/openoffice.lst.in 
b/instsetoo_native/util/openoffice.lst.in
index b858b29..505c1a4 100644
--- a/instsetoo_native/util/openoffice.lst.in
+++ b/instsetoo_native/util/openoffice.lst.in
@@ -39,7 +39,7 @@ Globals
 }
 }
 
-LibreOffice
+Collabora Office
 {
 Settings
 {
commit 21b32773c75d68e926d693e8be931b2ca96f4d89
Author: Tor Lillqvist 
Date:   Fri Jul 29 18:59:45 2016 +0300

Quote the product name as it might contain spaces

Otherwise we get "ERROR: unknown parameter: Office" for a product
called Collabora Office, for instance.

Change-Id: Iec99a3eb0848c34861be03ab6036aed707b20ac4

diff --git a/solenv/bin/ooinstall b/solenv/bin/ooinstall
index f9034cd..d5aa342 100755
--- a/solenv/bin/ooinstall
+++ b/solenv/bin/ooinstall
@@ -93,7 +93,7 @@ system ("cd $ENV{SRC_ROOT}/instsetoo_native/util ; " .
 "perl " .
 (scalar keys(%DB::sub) ? "-d " : "") .
 "-w $ENV{SRCDIR}/solenv/bin/make_installer.pl " .
-"-f $ENV{BUILDDIR}/instsetoo_native/util/openoffice.lst -l $langs -p 
$ENV{PRODUCTNAME}" . " " .
+"-f $ENV{BUILDDIR}/instsetoo_native/util/openoffice.lst -l $langs -p 
\"$ENV{PRODUCTNAME}\"" . " " .
 "-u $tmp_dir " .
 "-buildid $BUILD $destdir $strip $msi " .
 "-simple $path") && die "Failed to install: $!";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Caolán McNamara
 sfx2/source/dialog/backingwindow.cxx |   18 +-
 sfx2/source/dialog/backingwindow.hxx |1 +
 2 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 1203bf57dea230cd6de7bb5fe359d8fcd3e033dc
Author: Caolán McNamara 
Date:   Fri Jul 29 16:29:03 2016 +0100

Related: tdf#99324 get backingwindow to honour auto mnemonic on mod key 
change

Change-Id: I533232729db4a6ad5812d18bb63c36f7401066c0

diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index 24f3bf0..6059ca1 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -163,8 +163,19 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
 
 // init background
 SetBackground();
+
+GetParent()->AddEventListener(LINK(this, BackingWindow, 
WindowEventListener));
 }
 
+IMPL_LINK_TYPED(BackingWindow, WindowEventListener, VclWindowEvent&, rEvent, 
void)
+{
+if (rEvent.GetId() != VCLEVENT_WINDOW_COMMAND)
+return;
+CommandEvent* pCmdEvt = static_cast(rEvent.GetData());
+if (pCmdEvt->GetCommand() != CommandEventId::ModKeyChange)
+return;
+Accelerator::ToggleMnemonicsOnHierarchy(*pCmdEvt, this);
+}
 
 BackingWindow::~BackingWindow()
 {
@@ -173,6 +184,7 @@ BackingWindow::~BackingWindow()
 
 void BackingWindow::dispose()
 {
+GetParent()->RemoveEventListener(LINK(this, BackingWindow, 
WindowEventListener));
 // deregister drag&drop helper
 if (mxDropTargetListener.is())
 {
@@ -405,7 +417,7 @@ void BackingWindow::Paint(vcl::RenderContext& 
rRenderContext, const Rectangle&)
   *pVDev.get());
 }
 
-bool BackingWindow::PreNotify( NotifyEvent& rNEvt )
+bool BackingWindow::PreNotify(NotifyEvent& rNEvt)
 {
 if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
 {
@@ -462,6 +474,10 @@ bool BackingWindow::PreNotify( NotifyEvent& rNEvt )
 if ((aCommand != "vnd.sun.star.findbar:FocusToFindbar") && pEvt && 
mpAccExec->execute(rKeyCode))
 return true;
 }
+else if (rNEvt.GetType() == MouseNotifyEvent::COMMAND)
+{
+Accelerator::ToggleMnemonicsOnHierarchy(*rNEvt.GetCommandEvent(), 
this);
+}
 
 return Window::PreNotify( rNEvt );
 }
diff --git a/sfx2/source/dialog/backingwindow.hxx 
b/sfx2/source/dialog/backingwindow.hxx
index abb68e9..2a12b84 100644
--- a/sfx2/source/dialog/backingwindow.hxx
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -106,6 +106,7 @@ class BackingWindow : public vcl::Window, public 
VclBuilderContainer
 DECL_LINK_TYPED(CreateContextMenuHdl, ThumbnailViewItem*, void);
 DECL_LINK_TYPED(OpenTemplateHdl, ThumbnailViewItem*, void);
 DECL_LINK_TYPED(EditTemplateHdl, ThumbnailViewItem*, void);
+DECL_LINK_TYPED(WindowEventListener, VclWindowEvent&, void);
 
 void initControls();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Eike Rathke
 sc/source/ui/view/viewdata.cxx |   15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

New commits:
commit 5cf5975cef114870268bee792e44570ddfdaafe8
Author: Eike Rathke 
Date:   Fri Jul 29 18:18:01 2016 +0200

limit SelectionFillDOOM to 24117248 cells, tdf#60021 tdf#60056 related

Change-Id: Idabf5e51b7f423d7d58094ad1caef166728c3bed

diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index dc31056..f87fda6 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -864,11 +864,16 @@ bool ScViewData::SelectionForbidsPaste()
 // static
 bool ScViewData::SelectionFillDOOM( const ScRange& rRange )
 {
-/* TODO: it is still possible to select one row less than the entire sheet
- * and fool around. We could narrow this down to some "sane" value, just
- * what would be sane? At least this helps against the Ctrl+A cases. */
-return  rRange.aStart.Col() == 0 && rRange.aEnd.Col() == MAXCOL &&
-rRange.aStart.Row() == 0 && rRange.aEnd.Row() == MAXROW;
+// Assume that more than 23 full columns (23M cells) will not be
+// successful.. Even with only 10 bytes per cell that would already be
+// 230MB, formula cells would be 100 bytes and more per cell.
+// rows * columns > 23m => rows > 23m / columns
+// to not overflow in case number of available columns or rows would be
+// arbitrarily increased.
+// We could refine this and take some actual cell size into account,
+// evaluate available memory and what not, but..
+const sal_Int32 kMax = 23 * 1024 * 1024;// current MAXROWCOUNT is 
1024*1024=1048576
+return (rRange.aEnd.Row() - rRange.aStart.Row() + 1) > (kMax / 
(rRange.aEnd.Col() - rRange.aStart.Col() + 1));
 }
 
 void ScViewData::SetFillMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, 
SCROW nEndRow )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Giuseppe Castagno
 ucb/qa/cppunit/webdav/webdav_options.cxx |8 
 ucb/source/ucp/webdav-neon/DAVTypes.cxx  |3 +++
 ucb/source/ucp/webdav-neon/DAVTypes.hxx  |7 +++
 ucb/source/ucp/webdav-neon/NeonSession.cxx   |   12 
 ucb/source/ucp/webdav-neon/webdavcontent.cxx |   26 +-
 5 files changed, 55 insertions(+), 1 deletion(-)

New commits:
commit dfb714183f31d8a235797ef1ad3c517966ed4985
Author: Giuseppe Castagno 
Date:   Sun Jul 24 12:12:35 2016 +0200

tdf#101094 (13) OPTIONS: Options cache removal: LOCK, UNLOCK

Change-Id: Ib5e52973252b3af7b0fbe440806eb1e669670299
Reviewed-on: https://gerrit.libreoffice.org/27686
Tested-by: Jenkins 
Reviewed-by: Giuseppe Castagno 

diff --git a/ucb/qa/cppunit/webdav/webdav_options.cxx 
b/ucb/qa/cppunit/webdav/webdav_options.cxx
index 7c0ec7b..6c89623 100644
--- a/ucb/qa/cppunit/webdav/webdav_options.cxx
+++ b/ucb/qa/cppunit/webdav/webdav_options.cxx
@@ -58,6 +58,7 @@ namespace
 CPPUNIT_ASSERT_EQUAL( false, aDavType.isClass1() );
 CPPUNIT_ASSERT_EQUAL( false, aDavType.isClass2() );
 CPPUNIT_ASSERT_EQUAL( false, aDavType.isClass3() );
+CPPUNIT_ASSERT_EQUAL( false, aDavType.isLocked() );
 CPPUNIT_ASSERT_EQUAL( true, aDavType.getAllowedMethods().isEmpty() );
 CPPUNIT_ASSERT_EQUAL( false, aDavType.isLockAllowed() );
 CPPUNIT_ASSERT_EQUAL( true, aDavType.getURL().isEmpty() );
@@ -191,6 +192,7 @@ namespace
 CPPUNIT_ASSERT_EQUAL( false, aDavOpt.isClass1() );
 CPPUNIT_ASSERT_EQUAL( false, aDavOpt.isClass2() );
 CPPUNIT_ASSERT_EQUAL( false, aDavOpt.isClass3() );
+CPPUNIT_ASSERT_EQUAL( false, aDavOpt.isLocked() );
 CPPUNIT_ASSERT_EQUAL( true, aDavOpt.getAllowedMethods().isEmpty() );
 CPPUNIT_ASSERT_EQUAL( false, aDavOpt.isLockAllowed() );
 CPPUNIT_ASSERT_EQUAL( true, aDavOpt.getURL().isEmpty() );
@@ -204,6 +206,7 @@ namespace
 aDavOpt.setClass1();
 aDavOpt.setClass2();
 aDavOpt.setClass3();
+aDavOpt.setLocked();
 aDavOpt.setAllowedMethods( aAllowedMethods );
 aDavOpt.setStaleTime( 1234567 );
 aDavOpt.setURL( aURL );
@@ -230,6 +233,11 @@ namespace
 aDavOpt.setClass3( false );
 CPPUNIT_ASSERT_EQUAL( true , aDavOpt == aDavOptTarget );
 
+aDavOpt.setLocked();
+CPPUNIT_ASSERT_EQUAL( false , aDavOpt == aDavOptTarget );
+aDavOpt.setLocked( false );
+CPPUNIT_ASSERT_EQUAL( true , aDavOpt == aDavOptTarget );
+
 aDavOpt.setResourceFound();
 CPPUNIT_ASSERT_EQUAL( false , aDavOpt == aDavOptTarget );
 aDavOpt.setResourceFound( false );
diff --git a/ucb/source/ucp/webdav-neon/DAVTypes.cxx 
b/ucb/source/ucp/webdav-neon/DAVTypes.cxx
index c0eb4ea..2f4feb3 100644
--- a/ucb/source/ucp/webdav-neon/DAVTypes.cxx
+++ b/ucb/source/ucp/webdav-neon/DAVTypes.cxx
@@ -24,6 +24,7 @@ DAVOptions::DAVOptions() :
 m_isClass1( false ),
 m_isClass2( false ),
 m_isClass3( false ),
+m_isLocked( false ),
 m_aAllowedMethods(),
 m_nStaleTime( 0 ),
 m_sURL(),
@@ -37,6 +38,7 @@ DAVOptions::DAVOptions( const DAVOptions & rOther ) :
 m_isClass1( rOther.m_isClass1 ),
 m_isClass2( rOther.m_isClass2 ),
 m_isClass3( rOther.m_isClass3 ),
+m_isLocked( rOther.m_isLocked ),
 m_aAllowedMethods( rOther.m_aAllowedMethods ),
 m_nStaleTime( rOther.m_nStaleTime ),
 m_sURL( rOther.m_sURL ),
@@ -57,6 +59,7 @@ bool DAVOptions::operator==( const DAVOptions& rOpts ) const
 m_isClass1 == rOpts.m_isClass1 &&
 m_isClass2 == rOpts.m_isClass2 &&
 m_isClass3 == rOpts.m_isClass3 &&
+m_isLocked == rOpts.m_isLocked &&
 m_aAllowedMethods == rOpts.m_aAllowedMethods &&
 m_nStaleTime == rOpts.m_nStaleTime &&
 m_sURL == rOpts.m_sURL &&
diff --git a/ucb/source/ucp/webdav-neon/DAVTypes.hxx 
b/ucb/source/ucp/webdav-neon/DAVTypes.hxx
index f9bbb1f..6dbdd20 100644
--- a/ucb/source/ucp/webdav-neon/DAVTypes.hxx
+++ b/ucb/source/ucp/webdav-neon/DAVTypes.hxx
@@ -81,6 +81,9 @@ namespace webdav_ucp
 boolm_isClass1;
 boolm_isClass2;
 boolm_isClass3;
+// Internally used to maintain locked stated of the resource, only
+// if it's a Class 2 resource
+boolm_isLocked;
 // contains the methods allowed on this resource
 OUStringm_aAllowedMethods;
 
@@ -122,11 +125,15 @@ namespace webdav_ucp
 bool isLockAllowed() { return ( m_aAllowedMethods.indexOf( "LOCK" ) != 
-1 ); };
 bool isUnlockAllowed() { return ( m_aAllowedMethods.indexOf( "UNLOCK" 
) != -1 ); };
 
+void setLocked( bool locked = true ) { m_isLocked = locked; } ;
+bool isLocked() { return m_isLocked; };
+
 void reset() {
 m_isResourceFound = false;
 m_isClass1 = false;
 m_isClass2 = false;
 m_isClass3 = false;
+m_isLocked =

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

2016-07-29 Thread Giuseppe Castagno
 ucb/source/ucp/webdav-neon/webdavcontent.cxx |   12 
 1 file changed, 12 insertions(+)

New commits:
commit e0eb85785b68867f1476553723dbfc6dc407106b
Author: Giuseppe Castagno 
Date:   Mon Jan 11 11:11:19 2016 +0100

tdf#101094 (14) OPTIONS: Options cache removal: PUT

Change-Id: I251bbb101b4be851deaab66cbe4e10ff1fa3376e
Reviewed-on: https://gerrit.libreoffice.org/27691
Tested-by: Jenkins 
Reviewed-by: Giuseppe Castagno 

diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx 
b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 81c015c..67d21ab 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -2422,6 +2422,8 @@ void Content::insert(
 
 aURL += aEscapedTitle;
 
+// save the URL to clean cache
+OUStringaTargetUrl = aURL;
 try
 {
 xResAccess->setURL( aURL );
@@ -2431,6 +2433,9 @@ void Content::insert(
 else
 {
 xResAccess->PUT( xInputStream, Environment );
+// remove options from cache, PUT may change it
+// it will be refreshed when needed
+aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl );
 }
 // no error , set the resourcetype to unknown type
 // the resource may have transitioned from NOT FOUND or UNKNOWN to 
something else
@@ -2441,6 +2446,7 @@ void Content::insert(
 }
 catch ( DAVException const & except )
 {
+aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl );
 if ( bCollection )
 {
 if ( except.getStatus() == SC_METHOD_NOT_ALLOWED )
@@ -2528,12 +2534,18 @@ void Content::insert(
 // Unreachable
 }
 
+// save the URL since it may change due to redirection
+OUStringaTargetUrl = xResAccess->getURL();
 try
 {
 xResAccess->PUT( xInputStream, Environment );
+// remove options from cache, PUT may change it
+// it will be refreshed when needed
+aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl );
 }
 catch ( DAVException const & e )
 {
+aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl );
 cancelCommandExecution( e, Environment, true );
 // Unreachable
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Winfried Donkers
 sc/qa/unit/data/functions/fods/Functions_Excel_2016.fods | 1174 +++
 sc/source/core/tool/interpr8.cxx |   16 
 2 files changed, 632 insertions(+), 558 deletions(-)

New commits:
commit 3ee2cae3a36e5d052e02c3f7b226dc3b79bd2ebc
Author: Winfried Donkers 
Date:   Fri Jul 29 09:16:34 2016 +0200

tdf#97831 follow up : remove unused arguments from stack

Intention:
Make e.g. [1+SWITCH(1;1;1;6)] work. Without this fix, the result is
7 but should be 2.

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

diff --git a/sc/qa/unit/data/functions/fods/Functions_Excel_2016.fods 
b/sc/qa/unit/data/functions/fods/Functions_Excel_2016.fods
index bb526b2..eb51715 100644
--- a/sc/qa/unit/data/functions/fods/Functions_Excel_2016.fods
+++ b/sc/qa/unit/data/functions/fods/Functions_Excel_2016.fods
@@ -1,13 +1,13 @@
 
 
 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-02T17:35:29nl-NL2016-06-15T11:45:50.28041404433PT2H34M2SLibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/0f258538b842e3a8639efc8c2c7afc16a1b0819e
+ 
2016-05-02T17:35:29nl-NL2016-07-29T12:52:54.35360479634PT2H36M54SLibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/eccf9a9095093a1771c5a2a5c4d235a36e64257c
  
   
0
0
26597
-   26190
+   27093

 
  view1
@@ -28,10 +28,11 @@
100
60
true
+   false
   
   
-   7
-   55
+   3
+   32
0
2
0
@@ -40,11 +41,12 @@
0
0
0
-   32
+   17
0
100
60
true
+   false
   
   
0
@@ -62,10 +64,11 @@
100
60
true
+   false
   
  
  Sheet2
- 926
+ 1210
  0
  100
  60
@@ -86,6 +89,7 @@
  1
  1
  true
+ false
 

   
@@ -132,7 +136,7 @@
true
1
true
-   iwH+/3Bybl9BbGdlbWVlbgAAQ1VQUzpwcm5fQWxnZW1lZW4WAAMAsQAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9cHJuX0FsZ2VtZWVuCm9yaWVudGF0aW9uPVBvcnRyYWl0CmNvcGllcz0xCmNvbGxhdGU9ZmFsc2UKbWFyZ2luZGFqdXN0bWVudD0wLDAsMCwwCmNvbG9yZGVwdGg9MjQKcHNsZXZlbD0wCnBkZmRldmljZT0xCmNvbG9yZGV2aWNlPTAKUFBEQ29udGV4RGF0YQpQYWdlU2l6ZTpBNAAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   qAH+/3Bybl9BbGdlbWVlbgAAQ1VQUzpwcm5fQWxnZW1lZW4WAAMAzgAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9cHJuX0FsZ2VtZWVuCm9yaWVudGF0aW9uPVBvcnRyYWl0CmNvcGllcz0xCmNvbGxhdGU9ZmFsc2UKbWFyZ2luZGFqdXN0bWVudD0wLDAsMCwwCmNvbG9yZGVwdGg9MjQKcHNsZXZlbD0wCnBkZmRldmljZT0xCmNvbG9yZGV2aWNlPTAKUFBEQ29udGV4RGF0YQpJbnB1dFNsb3Q6UEY3MDBBAER1cGxleDpOb25lAFBhZ2VTaXplOkE0AAASAENPTVBBVF9EVVBMRVhfTU9ERQoARFVQTEVYX09GRg==
true
0
   
@@ -501,51 +505,51 @@
   
  

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

2016-07-29 Thread Miklos Vajna
 sw/inc/undobj.hxx   |8 +++-
 sw/source/core/doc/doc.cxx  |4 ++--
 sw/source/core/doc/docbm.cxx|2 +-
 sw/source/core/doc/docdraw.cxx  |8 
 sw/source/core/doc/docfmt.cxx   |2 +-
 sw/source/core/doc/docftn.cxx   |4 ++--
 sw/source/core/doc/doclay.cxx   |4 ++--
 sw/source/core/doc/docnum.cxx   |2 +-
 sw/source/core/docnode/ndtbl.cxx|4 ++--
 sw/source/core/inc/SwUndoTOXChange.hxx  |4 +++-
 sw/source/core/inc/UndoAttribute.hxx|7 ---
 sw/source/core/inc/UndoBookmark.hxx |4 +++-
 sw/source/core/inc/UndoDraw.hxx |   11 ++-
 sw/source/core/inc/UndoInsert.hxx   |4 +++-
 sw/source/core/inc/UndoNumbering.hxx|2 +-
 sw/source/core/inc/UndoTable.hxx|4 ++--
 sw/source/core/undo/SwUndoField.cxx |2 +-
 sw/source/core/undo/SwUndoFmt.cxx   |   12 ++--
 sw/source/core/undo/SwUndoPageDesc.cxx  |7 ---
 sw/source/core/undo/SwUndoTOXChange.cxx |4 ++--
 sw/source/core/undo/unattr.cxx  |   32 
 sw/source/core/undo/unbkmk.cxx  |6 +++---
 sw/source/core/undo/undel.cxx   |2 +-
 sw/source/core/undo/undobj.cxx  |   22 +-
 sw/source/core/undo/undobj1.cxx |4 ++--
 sw/source/core/undo/undoflystrattr.cxx  |2 +-
 sw/source/core/undo/undraw.cxx  |   22 +++---
 sw/source/core/undo/unfmco.cxx  |2 +-
 sw/source/core/undo/unins.cxx   |   13 +++--
 sw/source/core/undo/unmove.cxx  |4 ++--
 sw/source/core/undo/unnum.cxx   |   23 +--
 sw/source/core/undo/unoutl.cxx  |2 +-
 sw/source/core/undo/unovwr.cxx  |4 ++--
 sw/source/core/undo/unredln.cxx |6 +++---
 sw/source/core/undo/unsect.cxx  |6 +++---
 sw/source/core/undo/unsort.cxx  |4 ++--
 sw/source/core/undo/unspnd.cxx  |2 +-
 sw/source/core/undo/untbl.cxx   |   32 
 sw/source/core/undo/untblk.cxx  |2 +-
 39 files changed, 164 insertions(+), 125 deletions(-)

New commits:
commit d60708c5116b4c48b30b94095aafd3e77de46f6a
Author: Miklos Vajna 
Date:   Fri Jul 29 17:58:19 2016 +0200

sw undo: implement SfxUndoAction::GetViewShellId() interface

With this, it's possible to tell which view shell created which undo
actions. It's visible only in the doc model xml dump only, though.

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

diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index 79d890c..14e099f 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -49,6 +49,7 @@ class SwUndo
 {
 SwUndoId const m_nId;
 sal_uInt16 nOrigRedlineMode;
+sal_Int32 m_nViewShellId;
 
 protected:
 bool bCacheComment;
@@ -81,6 +82,8 @@ public: // should not be public, but ran into trouble in 
untbl.cxx
 virtual void RedoImpl( ::sw::UndoRedoContext & ) = 0;
 
 private:
+/// Try to obtain the view shell ID of the current view.
+static sal_Int32 CreateViewShellId(const SwDoc* pDoc);
 // SfxUndoAction
 virtual void Undo() override;
 virtual void Redo() override;
@@ -90,7 +93,7 @@ private:
 virtual bool CanRepeat(SfxRepeatTarget &) const override;
 
 public:
-SwUndo(SwUndoId const nId);
+SwUndo(SwUndoId const nId, const SwDoc* pDoc);
 virtual ~SwUndo();
 
 /**
@@ -104,6 +107,9 @@ public:
 */
 virtual OUString GetComment() const override;
 
+/// See SfxUndoAction::GetViewShellId().
+sal_Int32 GetViewShellId() const override;
+
 // UndoObject remembers which mode was turned on.
 // In Undo/Redo/Repeat this remembered mode is switched on.
 sal_uInt16 GetRedlineMode() const { return nOrigRedlineMode; }
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 63075b8..9d7c40d 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1651,7 +1651,7 @@ void SwDoc::AppendUndoForInsertFromDB( const SwPaM& rPam, 
bool bIsTable )
 const SwTableNode* pTableNd = 
rPam.GetPoint()->nNode.GetNode().FindTableNode();
 if( pTableNd )
 {
-SwUndoCpyTable* pUndo = new SwUndoCpyTable;
+SwUndoCpyTable* pUndo = new SwUndoCpyTable(this);
 pUndo->SetTableSttIdx( pTableNd->GetIndex() );
 GetIDocumentUndoRedo().AppendUndo( pUndo );
 }
@@ -1670,7 +1670,7 @@ void SwDoc::ChgTOX(SwTOXBase & rTOX, const SwTOXBase & 
rNew)
 {
 GetIDocumentUndoRedo().DelAllUndoObj();
 
-SwUndo * pUndo = new SwUndoTOXChange(&rTOX, rNew);
+SwUndo * pUndo = new SwUndoTOXChange(this, &rTOX, rNew);
 
 GetIDocumentUndoRedo().AppendUndo(pUndo);
 }
diff --git a

[Libreoffice-commits] core.git: sc/CppunitTest_sc_opencl_test.mk

2016-07-29 Thread Markus Mohrhard
 sc/CppunitTest_sc_opencl_test.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 8590ab7e8603097de01467c8148828e98f6d0e3b
Author: Markus Mohrhard 
Date:   Fri Jul 29 17:41:43 2016 +0200

add missing uui dependency for opencl test

Change-Id: I897e5ae6ed0fea89c1f1b9e30bd6cc6505318a17
Reviewed-on: https://gerrit.libreoffice.org/27692
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/sc/CppunitTest_sc_opencl_test.mk b/sc/CppunitTest_sc_opencl_test.mk
index ee1d050..ff0532e 100644
--- a/sc/CppunitTest_sc_opencl_test.mk
+++ b/sc/CppunitTest_sc_opencl_test.mk
@@ -97,6 +97,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_opencl_test,\
 ucb/source/core/ucb1 \
 ucb/source/ucp/file/ucpfile1 \
 ucb/source/ucp/tdoc/ucptdoc1 \
+   uui/util/uui \
 unotools/util/utl \
 unoxml/source/rdf/unordf \
 unoxml/source/service/unoxml \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Giuseppe Castagno
 ucb/source/ucp/webdav-neon/webdavcontent.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 1596379bc00a32bc3b4e76a53aa884112b21764b
Author: Giuseppe Castagno 
Date:   Wed Jan 27 17:04:56 2016 +0100

tdf#101094 (15) OPTIONS: Options cache removal: MKCOL

Change-Id: I752ab44b88935da75198d27f8b490f97c863408f
Reviewed-on: https://gerrit.libreoffice.org/27694
Tested-by: Jenkins 
Reviewed-by: Giuseppe Castagno 

diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx 
b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 67d21ab..b00655e 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -2429,7 +2429,10 @@ void Content::insert(
 xResAccess->setURL( aURL );
 
 if ( bCollection )
+{
 xResAccess->MKCOL( Environment );
+aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl );
+}
 else
 {
 xResAccess->PUT( xInputStream, Environment );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Giuseppe Castagno
 ucb/source/ucp/webdav-neon/webdavcontent.cxx |   21 +
 1 file changed, 17 insertions(+), 4 deletions(-)

New commits:
commit 2359e5a002f4df58548803320991064e6a6d968c
Author: Giuseppe Castagno 
Date:   Wed Jan 27 17:35:36 2016 +0100

tdf#101094 (16) OPTIONS: Options cache removal: MOVE

Change-Id: I7a610003295aa174d655f1e847e6d9a19d84a197
Reviewed-on: https://gerrit.libreoffice.org/27695
Tested-by: Jenkins 
Reviewed-by: Giuseppe Castagno 

diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx 
b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index b00655e..beb5e1c 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -1908,14 +1908,18 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
 uno::Reference< ucb::XContentIdentifier > xNewId
 = new ::ucbhelper::ContentIdentifier( aNewURL );
 
+NeonUri sourceURI( xIdentifier->getContentIdentifier() );
+NeonUri targetURI( xNewId->getContentIdentifier() );
+
 try
 {
-NeonUri sourceURI( xIdentifier->getContentIdentifier() );
-NeonUri targetURI( xNewId->getContentIdentifier() );
 targetURI.SetScheme( sourceURI.GetScheme() );
 
 xResAccess->MOVE(
 sourceURI.GetPath(), targetURI.GetURI(), false, xEnv );
+aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
+aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
+
 // @@@ Should check for resources that could not be moved
 // (due to source access or target overwrite) and send
 // this information through the interaction handler.
@@ -1949,6 +1953,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
 }
 catch ( DAVException const & e )
 {
+aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
+aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
 // Do not set new title!
 aNewTitle.clear();
 
@@ -2578,11 +2584,12 @@ void Content::transfer(
 xResAccess.reset( new DAVResourceAccess( *m_xResAccess.get() ) );
 }
 
+NeonUri sourceURI( rArgs.SourceURL );
+NeonUri targetURI( xIdentifier->getContentIdentifier() );
+
 OUString aTargetURI;
 try
 {
-NeonUri sourceURI( rArgs.SourceURL );
-NeonUri targetURI( xIdentifier->getContentIdentifier() );
 aTargetURI = targetURI.GetPathBaseNameUnescaped();
 
 // Check source's and target's URL scheme
@@ -2703,6 +2710,8 @@ void Content::transfer(
 rArgs.NameClash
 == ucb::NameClash::OVERWRITE,
 Environment );
+aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
+aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
 
 if ( xSource.is() )
 {
@@ -2749,10 +2758,14 @@ void Content::transfer(
 }
 catch ( ucb::IllegalIdentifierException const & )
 {
+aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
+aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
 // queryContent
 }
 catch ( DAVException const & e )
 {
+aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
+aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
 // [RFC 2518] - WebDAV
 // 412 (Precondition Failed) - The server was unable to maintain
 // the liveness of the properties listed in the propertybehavior
___
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-07-29 Thread Winfried Donkers
 sc/source/core/tool/interpr8.cxx |   16 
 1 file changed, 16 insertions(+)

New commits:
commit e43e2886effea42658f4bc3b69f46cc70c9251e0
Author: Winfried Donkers 
Date:   Fri Jul 29 09:16:34 2016 +0200

tdf#97831 follow up : remove unused arguments from stack

Intention:
Make e.g. [1+SWITCH(1;1;1;6)] work. Without this fix, the result is
7 but should be 2.

Reviewed-on: https://gerrit.libreoffice.org/27664
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit 3ee2cae3a36e5d052e02c3f7b226dc3b79bd2ebc)

 Conflicts:
sc/qa/unit/data/functions/fods/Functions_Excel_2016.fods

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

diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index b62fb59..972b125 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -1897,7 +1897,15 @@ void ScInterpreter::ScIfs_MS()
 //push result :
 FormulaTokenRef xToken( PopToken() );
 if ( xToken )
+{
+// Remove unused arguments of IFS from the stack before pushing the 
result.
+while ( nParamCount > 1 )
+{
+Pop();
+nParamCount--;
+}
 PushTempToken( xToken.get() );
+}
 else
 PushError( errUnknownStackVariable );
 }
@@ -2000,7 +2008,15 @@ void ScInterpreter::ScSwitch_MS()
 // push result
 FormulaTokenRef xToken( PopToken() );
 if ( xToken )
+{
+// Remove unused arguments of SWITCH from the stack before pushing the 
result.
+while ( nParamCount > 1 )
+{
+Pop();
+nParamCount--;
+}
 PushTempToken( xToken.get() );
+}
 else
 PushError( errUnknownStackVariable );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Giuseppe Castagno
 ucb/source/ucp/webdav-neon/webdavcontent.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit bedae6b06c51c641c38fa7dd3e25dd2aaafb30cf
Author: Giuseppe Castagno 
Date:   Wed Jan 27 17:41:30 2016 +0100

tdf#101094 (17) OPTIONS: Options cache removal: COPY

Change-Id: Ifa60eabd0a31b66074d79b30a5be7d497585f602
4a2c233261211b13ed06d05278bf42e446330487
Reviewed-on: https://gerrit.libreoffice.org/27696
Tested-by: Jenkins 
Reviewed-by: Giuseppe Castagno 

diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx 
b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index beb5e1c..b515ea0 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -858,6 +858,8 @@ void Content::addProperty( const 
ucb::PropertyCommandArgument& aCmdArg,
 osl::Guard< osl::Mutex > aGuard( m_aMutex );
 m_xResAccess.reset( new DAVResourceAccess( *xResAccess.get() ) );
 }
+// TODO PLACEHOLDER:
+// remove target URL options from cache, since PROPPATCH may change 
them
 
 // Notify propertyset info change listeners.
 beans::PropertySetInfoChangeEvent evt(
@@ -1869,6 +1871,8 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
 {
 // Set property values at server.
 xResAccess->PROPPATCH( aProppatchValues, xEnv );
+// TODO PLACEHOLDER:
+// remove target URL options from cache, since PROPPATCH may 
change it
 
 std::vector< ProppatchValue >::const_iterator it
 = aProppatchValues.begin();
@@ -2739,6 +2743,8 @@ void Content::transfer(
 rArgs.NameClash
 == ucb::NameClash::OVERWRITE,
 Environment );
+aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
+aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
 
 // DAV resources store all additional props on server!
 //  // Copy own and all children's Additional Core Properties.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Winfried Donkers
 scaddins/source/analysis/financial.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5c78a453bce458afef45ec998b6dd7142f4877b9
Author: Winfried Donkers 
Date:   Thu Jul 28 12:45:08 2016 +0200

Make Calc Add-In function RECEIVED behave like Excel and Gnumeric.

EXcel and Gnumeric demand that Maturity > Settlement, Calc now does too.

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

diff --git a/scaddins/source/analysis/financial.cxx 
b/scaddins/source/analysis/financial.cxx
index 6b4a6fd..7a38d58 100644
--- a/scaddins/source/analysis/financial.cxx
+++ b/scaddins/source/analysis/financial.cxx
@@ -79,7 +79,7 @@ double SAL_CALL AnalysisAddIn::getAccrintm( const 
css::uno::Reference< css::bean
 double SAL_CALL AnalysisAddIn::getReceived( const css::uno::Reference< 
css::beans::XPropertySet >& xOpt,
 sal_Int32 nSettle, sal_Int32 nMat, double fInvest, double fDisc, const 
css::uno::Any& rOB ) throw( css::uno::RuntimeException, 
css::lang::IllegalArgumentException, std::exception )
 {
-if( fInvest <= 0.0 || fDisc <= 0.0 )
+if( fInvest <= 0.0 || fDisc <= 0.0 || nSettle >= nMat )
 throw css::lang::IllegalArgumentException();
 
 double fRet = fInvest / ( 1.0 - ( fDisc * GetYearDiff( GetNullDate( xOpt 
), nSettle, nMat, getDateMode( xOpt, rOB ) ) ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - 11 commits - i18npool/qa i18npool/source include/opencl opencl/source readlicense_oo/license sc/source sd/inc sd/qa sd/source svgio/s

2016-07-29 Thread Caolán McNamara
 i18npool/qa/cppunit/test_breakiterator.cxx   |   16 
 i18npool/source/breakiterator/breakiterator_unicode.cxx  |2 
 include/opencl/openclwrapper.hxx |2 
 opencl/source/openclwrapper.cxx  |   37 
 readlicense_oo/license/CREDITS.fodt  | 2605 
+-
 sc/source/core/data/formulacell.cxx  |5 
 sc/source/core/opencl/op_statistical.cxx |   17 
 sc/source/core/opencl/op_statistical.hxx |1 
 sc/source/core/opencl/opinlinefun_statistical.cxx|  175 
 sd/inc/EffectMigration.hxx   |2 
 sd/qa/unit/data/sxi/ooo41061-1.sxi   |binary
 sd/qa/unit/export-tests.cxx  |   26 
 sd/qa/unit/sdmodeltestbase.hxx   |3 
 sd/source/core/EffectMigration.cxx   |   25 
 sd/source/ui/docshell/docshel4.cxx   |3 
 svgio/source/svgreader/svgimagenode.cxx  |2 
 svl/source/numbers/zforscan.cxx  |   10 
 sw/source/core/layout/flowfrm.cxx|4 
 vcl/opengl/opengl_blacklist_windows.xml  |3 
 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/pass/tablemanager-1.rtf |binary
 writerfilter/qa/cppunittests/rtftok/testrtftok.cxx   |4 
 writerfilter/source/dmapper/DomainMapper.cxx |3 
 writerfilter/source/rtftok/rtfdocumentimpl.hxx   |   31 
 25 files changed, 1479 insertions(+), 1498 deletions(-)

New commits:
commit f6e08a1440a6c1b7f3b5aede21f3c9bf4b58cc2c
Author: Caolán McNamara 
Date:   Thu Jul 28 13:58:33 2016 +0100

fftester: throw on empty stack access

rather than spend the rest of my life protecting each one

Change-Id: I181df33b052a0303f072ce0252d98562231569e2
(cherry picked from commit 2710211eb2333cafdb894742a8fa73fb02dc513b)

fftester: empty states stack

Change-Id: I05dfffced9a8677650a46b43f65a29e9b21c5524
(cherry picked from commit 5de2d02806669812d43e7f23db58ab7a16373ce6)

Related: tdf#75757 remove inheritance from std::deque

Change-Id: Ia50ea146052c2014ea16474186e2d15ce93581c1
(cherry picked from commit 7a887df4db129ac5222fd4068173b5a06d107a59)
Reviewed-on: https://gerrit.libreoffice.org/27640
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 
(cherry picked from commit 3e0fad77595438e1d36b94bfd6c17d8de8f8ceb0)

diff --git a/writerfilter/qa/cppunittests/rtftok/data/fail/popstate-1.rtf 
b/writerfilter/qa/cppunittests/rtftok/data/fail/popstate-1.rtf
new file mode 100644
index 000..0418917
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/rtftok/data/fail/popstate-1.rtf differ
diff --git a/writerfilter/qa/cppunittests/rtftok/data/fail/popstate-2.rtf 
b/writerfilter/qa/cppunittests/rtftok/data/fail/popstate-2.rtf
new file mode 100644
index 000..273bb13
--- /dev/null
+++ b/writerfilter/qa/cppunittests/rtftok/data/fail/popstate-2.rtf
@@ -0,0 +1 @@
+\\rttt\noTidqtpúúëdôp{\"pb18}\€p{\"ptxtbr }
diff --git a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx 
b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
index 8c31f92..b84f434 100644
--- a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
+++ b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
@@ -74,6 +74,10 @@ bool RtfTest::load(const OUString&,
 }
 throw;
 }
+catch (const std::exception&)
+{
+return false;
+}
 }
 
 void RtfTest::test()
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index d1f261d..393074a 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -310,19 +310,42 @@ public:
 };
 
 /// An RTF stack is similar to std::stack, except that it has an operator[].
-struct RTFStack : public std::deque
+struct RTFStack
 {
+private:
+std::deque m_Impl;
+public:
 RTFParserState& top()
 {
-return back();
+if (m_Impl.empty())
+throw std::out_of_range("empty rtf state stack");
+return m_Impl.back();
 }
 void pop()
 {
-return pop_back();
+if (m_Impl.empty())
+throw std::out_of_range("empty rtf state stack");
+return m_Impl.pop_back();
 }
 void push(RTFParserState const& rState)
 {
-return push_back(rState);
+return m_Impl.push_back(rState);
+}
+bool empty() const
+{
+return m_Impl.empty();
+}
+size_t size() const
+{
+  

[Libreoffice-commits] core.git: download.lst external/curl

2016-07-29 Thread Caolán McNamara
 download.lst  |4 +--
 external/curl/ExternalPackage_curl.mk |2 -
 external/curl/UnpackedTarball_curl.mk |1 
 external/curl/curl-7.26.0_win-proxy.patch |   34 +++---
 external/curl/curl-freebsd.patch.1|   32 
 5 files changed, 20 insertions(+), 53 deletions(-)

New commits:
commit c772c8fd273d73af4734ce0ed1b4bb082dc1886c
Author: Caolán McNamara 
Date:   Fri Jul 29 09:02:58 2016 +0100

bump curl to 7.50.0

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

diff --git a/download.lst b/download.lst
index bd34039..6f716d0 100644
--- a/download.lst
+++ b/download.lst
@@ -24,8 +24,8 @@ export COLLADA2GLTF_TARBALL := 
4b87018f7fff1d054939d19920b751a0-collada2gltf-mas
 export CPPUNIT_MD5SUM := d1c6bdd5a76c66d2c38331e2d287bc01
 export CPPUNIT_TARBALL := cppunit-1.13.2.tar.gz
 export CT2N_TARBALL := 
1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt
-export CURL_MD5SUM := 11bddbb452a8b766b932f859aaeeed39
-export CURL_TARBALL := curl-7.43.0.tar.bz2
+export CURL_MD5SUM := 03940d7d4fcea1521fbbf07c1cf16f5e
+export CURL_TARBALL := curl-7.50.0.tar.gz
 export DBGHELP_DLL := 13fbc2e8b37ddf28181dd6d8081c2b8e-dbghelp.dll
 export EBOOK_MD5SUM := 6b48eda57914e6343efebc9381027b78
 export EBOOK_TARBALL := libe-book-0.1.2.tar.bz2
diff --git a/external/curl/ExternalPackage_curl.mk 
b/external/curl/ExternalPackage_curl.mk
index ed55892..2de52db 100644
--- a/external/curl/ExternalPackage_curl.mk
+++ b/external/curl/ExternalPackage_curl.mk
@@ -22,7 +22,7 @@ $(eval $(call 
gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.4.dyli
 else ifeq ($(OS),AIX)
 $(eval $(call 
gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so,lib/.libs/libcurl.so.4))
 else
-$(eval $(call 
gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so.4,lib/.libs/libcurl.so.4.3.0))
+$(eval $(call 
gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so.4,lib/.libs/libcurl.so.4.4.0))
 endif
 
 endif # $(DISABLE_DYNLOADING)
diff --git a/external/curl/UnpackedTarball_curl.mk 
b/external/curl/UnpackedTarball_curl.mk
index 154263c..4cde155 100644
--- a/external/curl/UnpackedTarball_curl.mk
+++ b/external/curl/UnpackedTarball_curl.mk
@@ -18,7 +18,6 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,curl,\
 ))
 
 $(eval $(call gb_UnpackedTarball_add_patches,curl,\
-   external/curl/curl-freebsd.patch.1 \
external/curl/curl-msvc.patch.1 \
external/curl/curl-msvc-schannel.patch.1 \
external/curl/curl-7.26.0_mingw.patch \
diff --git a/external/curl/curl-7.26.0_win-proxy.patch 
b/external/curl/curl-7.26.0_win-proxy.patch
index 81ccc65..dff1e37 100644
--- a/external/curl/curl-7.26.0_win-proxy.patch
+++ b/external/curl/curl-7.26.0_win-proxy.patch
@@ -1,18 +1,18 @@
 --- curl-7.26.0/lib/Makefile.vc10
 +++ misc/build/curl-7.26.0/lib/Makefile.vc10
-@@ -116,7 +116,7 @@ LFLAGS = /nologo /machine:$(MACHINE)
- SSLLIBS  = libeay32.lib ssleay32.lib
+@@ -118,7 +118,7 @@
+ WINSSLLIBS   = crypt32.lib
  ZLIBLIBSDLL  = zdll.lib
  ZLIBLIBS = zlib.lib
 -WINLIBS  = ws2_32.lib wldap32.lib advapi32.lib
-+WINLIBS  = ws2_32.lib wldap32.lib advapi32.lib winhttp.lib
++WINLIBS  = ws2_32.lib wldap32.lib advapi32.lib winhttp.lib crypt32.lib
  CFLAGS   = $(CFLAGS) $(EXCFLAGS)
  
  CFGSET   = FALSE
 --- curl-7.26.0/lib/url.c
 +++ misc/build/curl-7.26.0/lib/url.c
-@@ -80,6 +80,10 @@ void idn_free (void *ptr);
- int curl_win32_idn_to_ascii(const char *in, char **out);
+@@ -78,6 +78,10 @@
+ bool curl_win32_idn_to_ascii(const char *in, char **out);
  #endif  /* USE_LIBIDN */
  
 +#ifdef _WIN32
@@ -22,20 +22,20 @@
  #include "urldata.h"
  #include "netrc.h"
  
-@@ -4111,6 +4115,21 @@ static bool check_noproxy(const char* name, const char* 
no_proxy)
+@@ -4586,6 +4590,21 @@
return FALSE;
  }
  
 +#ifdef _WIN32
-+static char* wstrToCstr( LPWSTR wStr )
++static char* wstrToCstr(LPWSTR wStr)
 +{
 +  int bufSize;
 +  char* out = NULL;
 +  if(wStr != NULL) {
 +bufSize = WideCharToMultiByte(
-+  CP_ACP,  0, wStr, -1, NULL, 0, NULL, NULL );
-+out = ( char* )malloc( bufSize * sizeof(char));
-+WideCharToMultiByte( CP_ACP, 0, wStr, -1, out, bufSize, NULL, NULL );
++  CP_ACP,  0, wStr, -1, NULL, 0, NULL, NULL);
++out = (char*)malloc(bufSize * sizeof(char));
++WideCharToMultiByte(CP_ACP, 0, wStr, -1, out, bufSize, NULL, NULL);
 +  }
 +  return out;
 +}
@@ -44,7 +44,7 @@
  /
  * Detect what (if any) proxy to use. Remember that this selects a host
  * name and is not limited to HTTP proxies only.
-@@ -4119,6 +4138,7 @@ static bool check_noproxy(const char* name, const char* 
no_proxy)
+@@ -4594,6 +4613,7 @@
  static char *detect_proxy(struct connectdata *conn)
  

[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 67/579b01b47d10f5b835dcb7f8bcce415ff9e221

2016-07-29 Thread Caolán McNamara
 67/579b01b47d10f5b835dcb7f8bcce415ff9e221 |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 2d74e655b77d0cdd87a5e5ef3f33a64e9e8d4d9f
Author: Caolán McNamara 
Date:   Fri Jul 29 21:06:06 2016 +0100

Notes added by 'git notes add'

diff --git a/67/579b01b47d10f5b835dcb7f8bcce415ff9e221 
b/67/579b01b47d10f5b835dcb7f8bcce415ff9e221
new file mode 100644
index 000..7566547
--- /dev/null
+++ b/67/579b01b47d10f5b835dcb7f8bcce415ff9e221
@@ -0,0 +1 @@
+prefer: c772c8fd273d73af4734ce0ed1b4bb082dc1886c
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Winfried Donkers
 sc/source/core/inc/interpre.hxx  |2 +-
 sc/source/core/tool/interpr2.cxx |   26 +-
 2 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 1ca11b55aecb18f9dcca1e9678910dc2e7593623
Author: Winfried Donkers 
Date:   Thu Jul 28 10:20:35 2016 +0200

tdf#101166 treat argument PayType for Calc function RATE as boolean.

Excel and Gnumeric treat this argument as boolean.
Financially, payment at beginning or at end of period are the only
existing options, i.e. there no other feasible options.

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

diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index e8f6185..33386b7 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -760,7 +760,7 @@ static double ScGetZw(double fZins, double fZzr, double 
fRmz,
 void ScFV();
 void ScNper();
 static bool RateIteration(double fNper, double fPayment, double fPv,
-double fFv, double fPayType, double& fGuess);
+double fFv, bool bPayType, double& fGuess);
 void ScRate();
 double ScGetCompoundInterest(double fZins, double fZr, double fZzr, double fBw,
  double fZw, bool bPayInAdvance, double& fRmz);
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 1723059..a8d632f 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -1970,7 +1970,7 @@ void ScInterpreter::ScNper()
 }
 
 bool ScInterpreter::RateIteration( double fNper, double fPayment, double fPv,
-   double fFv, double fPayType, double & 
fGuess )
+   double fFv, bool bPayType, double & fGuess )
 {
 // See also #i15090#
 // Newton-Raphson method: x(i+1) = x(i) - f(x(i)) / f'(x(i))
@@ -1983,9 +1983,12 @@ bool ScInterpreter::RateIteration( double fNper, double 
fPayment, double fPv,
 const sal_uInt16 nIterationsMax = 150;
 sal_uInt16 nCount = 0;
 const double fEpsilonSmall = 1.0E-14;
-// convert any fPayType situation to fPayType == zero situation
-fFv = fFv - fPayment * fPayType;
-fPv = fPv + fPayment * fPayType;
+if ( bPayType )
+{
+// payment at beginning of each period
+fFv = fFv - fPayment;
+fPv = fPv + fPayment;
+}
 if (fNper == ::rtl::math::round( fNper ))
 { // Nper is an integer value
 fX = fGuess;
@@ -2070,8 +2073,8 @@ void ScInterpreter::ScRate()
 {
 double fPv, fPayment, fNper;
 // defaults for missing arguments, see ODFF spec
-double fFv = 0, fPayType = 0, fGuess = 0.1, fOrigGuess = 0.1;
-bool bValid = true;
+double fFv = 0, fGuess = 0.1, fOrigGuess = 0.1;
+bool bPayType = false, bValid = true;
 bool bDefaultGuess = true;
 nFuncFmtType = css::util::NumberFormat::PERCENT;
 sal_uInt8 nParamCount = GetByte();
@@ -2083,7 +2086,7 @@ void ScInterpreter::ScRate()
 bDefaultGuess = false;
 }
 if (nParamCount >= 5)
-fPayType = GetDouble();
+bPayType = GetBool();
 if (nParamCount >= 4)
 fFv = GetDouble();
 fPv = GetDouble();
@@ -2094,10 +2097,7 @@ void ScInterpreter::ScRate()
 PushIllegalArgument();
 return;
 }
-// other values for fPayType might be meaningful,
-// ODFF spec is not clear yet, enable statement if you want only 0 and 1
-//if (fPayType != 0.0) fPayType = 1.0;
-bValid = RateIteration(fNper, fPayment, fPv, fFv, fPayType, fGuess);
+bValid = RateIteration(fNper, fPayment, fPv, fFv, bPayType, fGuess);
 if (!bValid)
 {
 /* TODO: try also for specified guess values, not only default? As is,
@@ -2115,11 +2115,11 @@ void ScInterpreter::ScRate()
 for (int nStep = 2; nStep <= 10 && !bValid; ++nStep)
 {
 fGuess = fX * nStep;
-bValid = RateIteration( fNper, fPayment, fPv, fFv, fPayType, 
fGuess);
+bValid = RateIteration( fNper, fPayment, fPv, fFv, bPayType, 
fGuess);
 if (!bValid)
 {
 fGuess = fX / nStep;
-bValid = RateIteration( fNper, fPayment, fPv, fFv, 
fPayType, fGuess);
+bValid = RateIteration( fNper, fPayment, fPv, fFv, 
bPayType, fGuess);
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Caolán McNamara
 writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-2.rtf |binary
 writerfilter/source/dmapper/DomainMapper.cxx |3 ++-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|7 +--
 3 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit d00fc303bca7765762a602531b7d3b40ce8f1740
Author: Caolán McNamara 
Date:   Fri Jul 29 21:24:26 2016 +0100

fftester: another empty table manager stack

Change-Id: If3148cb6e16cff4aad28c4f86467c66ed04bcd05

diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-2.rtf 
b/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-2.rtf
new file mode 100644
index 000..58328ed
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-2.rtf differ
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 2db5af3..f6e5116 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2920,7 +2920,8 @@ void DomainMapper::lcl_endShape( )
 // empty paragraph at the end of the shape text will cause problems: if
 // the shape text ends with a table, the extra paragraph will be
 // handled as an additional row of the ending table.
-m_pImpl->getTableManager().endTable();
+if (m_pImpl->hasTableManager())
+m_pImpl->getTableManager().endTable();
 
 lcl_endParagraphGroup();
 m_pImpl->PopShapeContext( );
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 5f6e05d..1d22fa4 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2013,8 +2013,11 @@ void DomainMapper_Impl::UpdateEmbeddedShapeProps(const 
uno::Reference< drawing::
 
 void DomainMapper_Impl::PopShapeContext()
 {
-getTableManager().endLevel();
-popTableManager();
+if (hasTableManager())
+{
+getTableManager().endLevel();
+popTableManager();
+}
 if ( m_aAnchoredStack.size() > 0 )
 {
 // For OLE object replacement shape, the text append context was 
already removed
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Caolán McNamara
 writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-3.rtf |binary
 writerfilter/source/dmapper/DomainMapper.cxx |6 +++---
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 4e58115b2d7f80450b40e27187e45e3ac9babde0
Author: Caolán McNamara 
Date:   Fri Jul 29 21:29:03 2016 +0100

fftester: some more table manager stack checks

Change-Id: Ic8dd72da175fee656889910b55d31ea161b944cc

diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-3.rtf 
b/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-3.rtf
new file mode 100644
index 000..9fd5892
Binary files /dev/null and 
b/writerfilter/qa/cppunittests/rtftok/data/pass/tablemanager-3.rtf differ
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index f6e5116..6ca8528 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -213,7 +213,7 @@ DomainMapper::~DomainMapper()
 
 void DomainMapper::lcl_attribute(Id nName, Value & val)
 {
-if (m_pImpl->getTableManager().attribute(nName, val))
+if (m_pImpl->hasTableManager() && 
m_pImpl->getTableManager().attribute(nName, val))
 return;
 
 static const int nSingleLineSpacing = 240;
@@ -414,7 +414,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
 else
 aSpacing.Height = 
sal_Int16(ConversionHelper::convertTwipToMM100( nIntValue ));
 
-if( m_pImpl->getTableManager().isInCell() )
+if (m_pImpl->hasTableManager() && 
m_pImpl->getTableManager().isInCell())
 {
 // direct formatting is applied for table cell data
 TablePropertyMapPtr pTblCellWithDirectFormatting(new 
TablePropertyMap);
@@ -443,7 +443,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
 aSpacing.Mode = style::LineSpacingMode::FIX;
 }
 
-if( m_pImpl->getTableManager().isInCell() )
+if (m_pImpl->hasTableManager() && 
m_pImpl->getTableManager().isInCell())
 {
 // If the table manager got the line rule after
 // ooxml::CT_Spacing_line, then it should get the rule
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Eike Rathke
 sc/source/ui/inc/viewdata.hxx  |7 +--
 sc/source/ui/view/cellsh.cxx   |   16 
 sc/source/ui/view/cellsh1.cxx  |2 +-
 sc/source/ui/view/viewdata.cxx |2 +-
 sc/source/ui/view/viewfun3.cxx |2 +-
 5 files changed, 16 insertions(+), 13 deletions(-)

New commits:
commit bb442b7ee6bf93f791cfef007c3e9375afde8655
Author: Eike Rathke 
Date:   Fri Jul 29 22:44:06 2016 +0200

rename SelectionForbidsPaste() to SelectionForbidsCellFill()

... which is more appropriate for what it does now.

Change-Id: If82420485e945598cf267b00bba2de69477671eb

diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 141e758..1e717cc 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -354,8 +354,11 @@ public:
 
 boolIsMultiMarked();
 
-/// Disallow paste on Ctrl+A all selected. We'd go DOOM.
-boolSelectionForbidsPaste();
+/** Disallow cell fill (Paste,Fill,...) on Ctrl+A all
+selected or another high amount of selected cells.
+We'd go DOOM.
+ */
+boolSelectionForbidsCellFill();
 /// Determine DOOM condition, i.e. from selected range.
 static bool SelectionFillDOOM( const ScRange& rRange );
 
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index c3b69da..9f060ef 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -129,7 +129,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
 case FID_FILL_TO_BOTTOM:// fill to top / bottom
 {
 bDisable = !bSimpleArea || (nRow1 == 0 && nRow2 == 0);
-if (!bDisable && GetViewData()->SelectionForbidsPaste())
+if (!bDisable && GetViewData()->SelectionForbidsCellFill())
 bDisable = true;
 if ( !bDisable && bEditable )
 {   // do not damage matrix
@@ -141,7 +141,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
 case FID_FILL_TO_TOP:
 {
 bDisable = (!bSimpleArea) || (nRow1 == MAXROW && nRow2 == 
MAXROW);
-if (!bDisable && GetViewData()->SelectionForbidsPaste())
+if (!bDisable && GetViewData()->SelectionForbidsCellFill())
 bDisable = true;
 if ( !bDisable && bEditable )
 {   // do not damage matrix
@@ -153,7 +153,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
 case FID_FILL_TO_RIGHT: // fill to left / right
 {
 bDisable = !bSimpleArea || (nCol1 == 0 && nCol2 == 0);
-if (!bDisable && GetViewData()->SelectionForbidsPaste())
+if (!bDisable && GetViewData()->SelectionForbidsCellFill())
 bDisable = true;
 if ( !bDisable && bEditable )
 {   // do not damage matrix
@@ -165,7 +165,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
 case FID_FILL_TO_LEFT:
 {
 bDisable = (!bSimpleArea) || (nCol1 == MAXCOL && nCol2 == 
MAXCOL);
-if (!bDisable && GetViewData()->SelectionForbidsPaste())
+if (!bDisable && GetViewData()->SelectionForbidsCellFill())
 bDisable = true;
 if ( !bDisable && bEditable )
 {   // do not damage matrix
@@ -176,7 +176,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
 break;
 
 case SID_RANDOM_NUMBER_GENERATOR_DIALOG:
-bDisable = !bSimpleArea || 
GetViewData()->SelectionForbidsPaste();
+bDisable = !bSimpleArea || 
GetViewData()->SelectionForbidsCellFill();
 break;
 case SID_SAMPLING_DIALOG:
 case SID_DESCRIPTIVE_STATISTICS_DIALOG:
@@ -195,7 +195,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
 else
 bDisable = (!bSimpleArea) || (nCol1 == nCol2 && nRow1 == 
nRow2);
 
-if (!bDisable && GetViewData()->SelectionForbidsPaste())
+if (!bDisable && GetViewData()->SelectionForbidsCellFill())
 bDisable = true;
 
 if ( !bDisable && bEditable && nWhich == FID_FILL_SERIES )
@@ -223,7 +223,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
 case SID_PASTE_ONLY_VALUE:
 case SID_PASTE_ONLY_TEXT:
 case SID_PASTE_ONLY_FORMULA:
-bDisable = GetViewData()->SelectionForbidsPaste();
+bDisable = GetViewData()->SelectionForbidsCellFill();
 break;
 
 case FID_INS_ROW:
@@ -511,7 +511,7 @@ bool checkDestRanges(ScViewData& rViewData)
 return false;
 }
 
-if (rViewData.SelectionForbidsPaste())
+if (rViewData.SelectionForbidsCellFill())
   

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

2016-07-29 Thread Henry Castro
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   43 +++
 sc/sdi/scalc.sdi |4 +-
 sc/source/ui/view/cellsh3.cxx|   31 ++-
 3 files changed, 74 insertions(+), 4 deletions(-)

New commits:
commit ff051403381ca85724fec4f7bd2363141fa675f6
Author: Henry Castro 
Date:   Fri Jul 29 15:00:49 2016 -0400

sc lok: add parameters for column/row resize

Change-Id: I189178b6060c229dd8d93b6fdee7d4d81354ced5
Reviewed-on: https://gerrit.libreoffice.org/27701
Tested-by: Jenkins 
Reviewed-by: Henry Castro 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 314febc..093fa18 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -60,6 +60,7 @@ public:
 void testTextViewSelection();
 void testDocumentSizeChanged();
 void testViewLock();
+void testColRowResize();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnSelections);
@@ -71,6 +72,7 @@ public:
 CPPUNIT_TEST(testTextViewSelection);
 CPPUNIT_TEST(testDocumentSizeChanged);
 CPPUNIT_TEST(testViewLock);
+CPPUNIT_TEST(testColRowResize);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -539,6 +541,47 @@ void ScTiledRenderingTest::testViewLock()
 comphelper::LibreOfficeKit::setActive(false);
 }
 
+void ScTiledRenderingTest::testColRowResize()
+{
+comphelper::LibreOfficeKit::setActive();
+ScModelObj* pModelObj = createDoc("sort-range.ods");
+ScDocShell* pDocSh = dynamic_cast< ScDocShell* >( 
pModelObj->GetEmbeddedObject() );
+CPPUNIT_ASSERT(pDocSh);
+
+ScTabViewShell* pViewShell = pDocSh->GetBestViewShell(false);
+CPPUNIT_ASSERT(pViewShell);
+
+
pViewShell->registerLibreOfficeKitViewCallback(&ScTiledRenderingTest::callback, 
this);
+
+uno::Sequence aArgs(2);
+ScDocument& rDoc = pDocSh->GetDocument();
+// Col 3, Tab 0
+int nOldWidth = rDoc.GetColWidth(static_cast(2), 
static_cast(0), false);
+
+aArgs[0].Name = OUString::fromUtf8("Column");
+aArgs[0].Value <<= static_cast(3);
+aArgs[1].Name = OUString::fromUtf8("Width");
+aArgs[1].Value <<= static_cast(nOldWidth + 100);
+comphelper::dispatchCommand(".uno:ColumnWidth", aArgs);
+
+int nNewWidth = rDoc.GetColWidth(static_cast(2), 
static_cast(0), false);
+CPPUNIT_ASSERT(nNewWidth > nOldWidth);
+
+// Row 5, Tab 0
+int nOldHeight = rDoc.GetRowHeight(static_cast(4), 
static_cast(0), false);
+
+aArgs[0].Name = OUString::fromUtf8("Row");
+aArgs[0].Value <<= static_cast(5);
+aArgs[1].Name = OUString::fromUtf8("Height");
+aArgs[1].Value <<= static_cast(nOldHeight + 100);
+comphelper::dispatchCommand(".uno:RowHeight", aArgs);
+
+int nNewHeight = rDoc.GetRowHeight(static_cast(4), 
static_cast(0), false);
+CPPUNIT_ASSERT(nNewHeight > nOldHeight);
+
+comphelper::LibreOfficeKit::setActive(false);
+}
+
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(ScTiledRenderingTest);
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index d55eca4..77a582b 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -721,7 +721,7 @@ SfxInt16Item Column SID_RANGE_COL
 
 
 SfxUInt16Item ColumnWidth FID_COL_WIDTH
-
+(SfxUInt16Item Column FN_PARAM_1,SfxUInt16Item Width FN_PARAM_2)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
@@ -4432,7 +4432,7 @@ SfxInt32Item Row SID_RANGE_ROW
 
 
 SfxUInt16Item RowHeight FID_ROW_HEIGHT
-
+(SfxUInt16Item Row FN_PARAM_1,SfxUInt16Item Height FN_PARAM_2)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index f88cb6c..d9141fe 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -43,6 +43,7 @@
 #include "editable.hxx"
 #include "markdata.hxx"
 #include "scabstdlg.hxx"
+#include "columnspanset.hxx"
 
 #include 
 
@@ -538,7 +539,20 @@ void ScCellShell::Execute( SfxRequest& rReq )
 
 case FID_ROW_HEIGHT:
 {
-if ( pReqArgs )
+const SfxPoolItem* pRow;
+const SfxPoolItem* pHeight;
+
+if ( pReqArgs && pReqArgs->HasItem( FN_PARAM_1, &pRow ) &&
+ pReqArgs->HasItem( FN_PARAM_2, &pHeight ) )
+{
+std::vector aRanges;
+SCCOLROW nRow = static_cast(pRow)->GetValue() - 1;
+sal_uInt16 nHeight = static_cast(pHeight)->GetValue();
+
+aRanges.push_back(sc::ColRowSpan(nRow, nRow));
+pTabViewShell->SetWidthOrHeight(false, aRanges, 
SC_SIZE_DIRECT, nHeight);
+}
+else if ( pReqArgs )
 {
 const SfxUInt16Item&  rUInt16Item = static_cast(pReqArgs->Get( FID_ROW_HEIGHT ));
 
@@ -621,7 +635,20 @@ void ScCellShell::Execute( SfxRequest& rReq )
 
 case FID_COL_WIDTH:

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

2016-07-29 Thread Giuseppe Castagno
 ucb/source/ucp/webdav-neon/webdavcontent.cxx |   32 +++
 1 file changed, 32 insertions(+)

New commits:
commit a5fc27e0575eab115de3714ae07fcac7481f4daf
Author: Giuseppe Castagno 
Date:   Mon Jul 25 12:56:27 2016 +0200

tdf#101094 (18) OPTIONS: Update OPTIONS cache lifetime if not found

Change-Id: I1b37bba50cd41ab5eeb960927148cf6b005f3fd4
Reviewed-on: https://gerrit.libreoffice.org/27698
Tested-by: Jenkins 
Reviewed-by: Giuseppe Castagno 

diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx 
b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index b515ea0..01eba4e 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -2109,6 +2109,7 @@ uno::Any Content::open(
 if ( xDataSink.is() )
 {
 // PULL: wait for client read
+OUString aTargetURL =  m_xIdentifier->getContentIdentifier();
 try
 {
 std::unique_ptr< DAVResourceAccess > xResAccess;
@@ -2148,6 +2149,21 @@ uno::Any Content::open(
 }
 catch ( DAVException const & e )
 {
+// check if error is SC_NOT_FOUND
+// if URL resource not found, set the corresponding 
resource
+// element in option cache and update the cache lifetime 
accordingly
+if( e.getStatus() == SC_NOT_FOUND )
+{
+DAVOptions aDAVOptions;
+if( aStaticDAVOptionsCache.getDAVOptions( aTargetURL, 
aDAVOptions ) )
+{
+// get redirected url
+aDAVOptions.setResourceFound( false );
+aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+  
m_nOptsCacheLifeNotFound );
+}
+}
+
 cancelCommandExecution( e, xEnv );
 // Unreachable
 }
@@ -3688,6 +3704,22 @@ Content::ResourceType Content::getResourceType(
 *networkAccessAllowed = *networkAccessAllowed
 && shouldAccessNetworkAfterException(e);
 }
+if ( e.getStatus() == SC_NOT_FOUND )
+{
+// arrives here if OPTIONS is still cached for a resource 
prevously available
+// operate on the OPTIONS cache:
+// if OPTIONS was not found, do nothing
+// else OPTIONS returned on a resource not existent  
(example a server that allows lock on null resource) set
+// not found and adjust lifetime accordingly
+DAVOptions aDAVOptionsInner;
+if( aStaticDAVOptionsCache.getDAVOptions( rURL, 
aDAVOptionsInner ) )
+{
+// get redirected url
+aDAVOptionsInner.setResourceFound( false );
+aStaticDAVOptionsCache.addDAVOptions( aDAVOptionsInner,
+  
m_nOptsCacheLifeNotFound );
+}
+}
 // if the two net events below happen, something
 // is going on to the connection so break the command flow
 if ( ( e.getError() == DAVException::DAV_HTTP_TIMEOUT ) ||
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Muhammet Kara
 sc/inc/sc.hrc  |   14 -
 sc/source/ui/src/scstring.src  |   61 +++--
 sc/source/ui/unoobj/docuno.cxx |   25 ++--
 3 files changed, 70 insertions(+), 30 deletions(-)

New commits:
commit a3e57b44b26db382b7fe3004aa0211e26c07e6db
Author: Muhammet Kara 
Date:   Fri Jul 29 17:28:47 2016 +0300

tdf#91665 l10n: Replace string list by separate strings in ScPrintUIOptions

String lists are sometimes (mis)used to group unrelated items;
the advantage(?) being that only one identifier needs to be defined
for the whole group. The items are then referenced by index,
which is rather fragile when they are used in different parts of UI.
String lists like this one should be replaced by separate strings.

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

diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index ba1ccb4..f413f7f 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -826,6 +826,18 @@
 #define SCSTR_AUTHOR(STR_START + 113)
 #define SCSTR_UNIT  (STR_START + 114)
 
+// print options
+#define SCSTR_PRINTOPT_PAGES(STR_START + 120)
+#define SCSTR_PRINTOPT_SUPPRESSEMPTY(STR_START + 121)
+#define SCSTR_PRINTOPT_PRNTCONTENT  (STR_START + 122)
+#define SCSTR_PRINTOPT_ALLSHEETS(STR_START + 123)
+#define SCSTR_PRINTOPT_SELECTEDSHEETS   (STR_START + 124)
+#define SCSTR_PRINTOPT_SELECTEDCELLS(STR_START + 125)
+#define SCSTR_PRINTOPT_FROMWHICH(STR_START + 126)
+#define SCSTR_PRINTOPT_ALLPAGES (STR_START + 127)
+#define SCSTR_PRINTOPT_PAGES_   (STR_START + 128)
+#define SCSTR_PRINTOPT_PRODNAME (STR_START + 129)
+
 // accessibility
 
 // CSV import
@@ -886,7 +898,7 @@
 #define SCSTR_FORMULA_AUTOCORRECTION(STR_START + 214)
 
 #define SCSTR_RENAMEOBJECT  (STR_START + 215)
-#define SCSTR_PRINT_OPTIONS (STR_START + 216)
+//free slot
 #define SCSTR_WARN_ME_IN_FUTURE_CHECK   (STR_START + 217)
 
 // header of search result dialog
diff --git a/sc/source/ui/src/scstring.src b/sc/source/ui/src/scstring.src
index 2da99e2..fab1ebd 100644
--- a/sc/source/ui/src/scstring.src
+++ b/sc/source/ui/src/scstring.src
@@ -703,21 +703,54 @@ String SCSTR_MOREBTN_FEWEROPTIONS
 Text [ en-US ] = "Fewer ~Options";
 };
 
-StringArray SCSTR_PRINT_OPTIONS
+String SCSTR_PRINTOPT_PAGES
 {
-ItemList [en-US] =
-{
-< "Pages"; >;
-< "~Suppress output of empty pages"; >;
-< "Print content"; >;
-< "~All sheets"; >;
-< "~Selected sheets"; >;
-< "Selected cells"; >;
-< "From which print"; >;
-< "All ~pages"; >;
-< "Pa~ges"; >;
-< "%PRODUCTNAME %s"; >;
-};
+Text [ en-US ] = "Pages";
+};
+
+String SCSTR_PRINTOPT_SUPPRESSEMPTY
+{
+Text [ en-US ] = "~Suppress output of empty pages";
+};
+
+String SCSTR_PRINTOPT_PRNTCONTENT
+{
+Text [ en-US ] = "Print content";
+};
+
+String SCSTR_PRINTOPT_ALLSHEETS
+{
+Text [ en-US ] = "~All sheets";
+};
+
+String SCSTR_PRINTOPT_SELECTEDSHEETS
+{
+Text [ en-US ] = "~Selected sheets";
+};
+
+String SCSTR_PRINTOPT_SELECTEDCELLS
+{
+Text [ en-US ] = "Selected cells";
+};
+
+String SCSTR_PRINTOPT_FROMWHICH
+{
+Text [ en-US ] = "From which print";
+};
+
+String SCSTR_PRINTOPT_ALLPAGES
+{
+Text [ en-US ] = "All ~pages";
+};
+
+String SCSTR_PRINTOPT_PAGES_
+{
+Text [ en-US ] = "Pa~ges";
+};
+
+String SCSTR_PRINTOPT_PRODNAME
+{
+Text [ en-US ] = "%PRODUCTNAME %s";
 };
 
 String SCSTR_WARN_ME_IN_FUTURE_CHECK
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 4ce35d1..442ad4c 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -242,11 +242,6 @@ ScPrintUIOptions::ScPrintUIOptions()
 sal_Int32 nContent = rPrintOpt.GetAllSheets() ? 0 : 1;
 bool bSuppress = rPrintOpt.GetSkipEmpty();
 
-ResStringArray aStrings( ScResId( SCSTR_PRINT_OPTIONS ) );
-OSL_ENSURE( aStrings.Count() >= 10, "resource incomplete" );
-if( aStrings.Count() < 10 ) // bad resource ?
-return;
-
 sal_Int32 nNumProps= 9, nIdx = 0;
 
 m_aUIProperties.resize(nNumProps);
@@ -257,34 +252,34 @@ ScPrintUIOptions::ScPrintUIOptions()
 
 // create Section for spreadsheet (results in an extra tab page in dialog)
 SvtModuleOptions aOpt;
-OUString aAppGroupname( aStrings.GetString( 9 ) );
+OUString aAppGroupname( SC_RESSTR( SCSTR_PRINTOPT_PRODNAME ) );
 aAppGroupname = aAppGroupname.replaceFirst( "%s", aOpt.GetModuleName( 
SvtModuleOptions::EModule::CALC ) );
 m_aUIProperties[nIdx++].Value = setGroupControlOpt("tabcontrol-page2", 
aAppGroupname, OUString());
 
 // show subgroup for pages
-m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("pages", 
OUString(aStrings.GetString(0))

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

2016-07-29 Thread Giuseppe Castagno
 ucb/source/ucp/webdav-neon/DAVTypes.cxx  |   29 ++
 ucb/source/ucp/webdav-neon/DAVTypes.hxx  |   15 +++
 ucb/source/ucp/webdav-neon/webdavcontent.cxx |   54 +++
 3 files changed, 83 insertions(+), 15 deletions(-)

New commits:
commit 7f32fddb445ef1c1e17f9028f252c21dd83e03af
Author: Giuseppe Castagno 
Date:   Tue Jul 26 11:36:24 2016 +0200

tdf#101094 (19) OPTIONS: Add mechanism to manage not found Web URL: GET

Change-Id: Ie3da55d230631c50968b00cdea176f30051abf37
Reviewed-on: https://gerrit.libreoffice.org/27699
Tested-by: Jenkins 
Reviewed-by: Giuseppe Castagno 

diff --git a/ucb/source/ucp/webdav-neon/DAVTypes.cxx 
b/ucb/source/ucp/webdav-neon/DAVTypes.cxx
index 2f4feb3..8613bda 100644
--- a/ucb/source/ucp/webdav-neon/DAVTypes.cxx
+++ b/ucb/source/ucp/webdav-neon/DAVTypes.cxx
@@ -145,4 +145,33 @@ void DAVOptionsCache::addDAVOptions( DAVOptions & 
rDAVOptions, const sal_uInt32
 }
 
 
+bool DAVOptionsCache::isResourceFound( const OUString & rURL )
+{
+osl::MutexGuard aGuard( m_aMutex );
+OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( NeonUri::unescape( 
rURL ) ) );
+normalizeURLLastChar( aEncodedUrl );
+
+DAVOptionsMap::iterator it;
+it = m_aTheCache.find( aEncodedUrl );
+if ( it != m_aTheCache.end() )
+{
+// first check for stale
+TimeValue t1;
+osl_getSystemTime( &t1 );
+if( (*it).second.getStaleTime() < t1.Seconds )
+{
+m_aTheCache.erase( it );
+return true; // to force again OPTIONS method
+}
+
+// check if the resource was present on server
+return (*it).second.isResourceFound();
+}
+// this value is needed because some web server don't implement
+// OPTIONS method, so the resource is considered found,
+// until detected otherwise
+return true;
+}
+
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/ucb/source/ucp/webdav-neon/DAVTypes.hxx 
b/ucb/source/ucp/webdav-neon/DAVTypes.hxx
index 6dbdd20..b1a97c2 100644
--- a/ucb/source/ucp/webdav-neon/DAVTypes.hxx
+++ b/ucb/source/ucp/webdav-neon/DAVTypes.hxx
@@ -158,6 +158,21 @@ namespace webdav_ucp
 void removeDAVOptions( const OUString & rURL );
 void addDAVOptions( DAVOptions & rDAVOptions, const sal_uInt32 
nLifeTime );
 
+/** Check if the DAV options cached value was found
+by the last OPTIONS method call.
+If the cached value is found stale, it is removed.
+
+@param OUString
+   the resource URL
+
+@return bool
+true if resource was found or if the Web resource DAV 
options
+are not present (meaning the resource should be checked for
+presence anyway)
+false if resource was not found
+*/
+bool isResourceFound( const OUString & rURL );
+
 private:
 
 /// remove the last '/' in aUrl, if it exists
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx 
b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 01eba4e..902bc76 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -2126,26 +2126,50 @@ uno::Any Content::open(
 DAVResource aResource;
 std::vector< OUString > aHeaders;
 
-uno::Reference< io::XInputStream > xIn
-= xResAccess->GET( aHeaders, aResource, xEnv );
-m_bDidGetOrHead = true;
-
+// check if the resource was present on the server
+if( aStaticDAVOptionsCache.isResourceFound( aTargetURL ) )
 {
-osl::MutexGuard aGuard( m_aMutex );
+uno::Reference< io::XInputStream > xIn
+= xResAccess->GET( aHeaders, aResource, xEnv );
+m_bDidGetOrHead = true;
 
-// cache headers.
-if ( !m_xCachedProps.get())
-m_xCachedProps.reset(
-new CachableContentProperties( 
ContentProperties( aResource ) ) );
-else
-m_xCachedProps->addProperties(
-aResource.properties );
+{
+osl::MutexGuard aGuard( m_aMutex );
 
-m_xResAccess.reset(
-new DAVResourceAccess( *xResAccess.get() ) );
+// cache headers.
+if ( !m_xCachedProps.get())
+m_xCachedProps.reset(
+new CachableContentProperties( 
ContentProperties( aResource ) ) );
+else
+m_

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

2016-07-29 Thread Mohammed Abdul Azeem
 sax/source/fastparser/fastparser.cxx |   50 +--
 1 file changed, 42 insertions(+), 8 deletions(-)

New commits:
commit 916a11d26cb74da9dd534e07b35737def6cbf54a
Author: Mohammed Abdul Azeem 
Date:   Thu Jul 28 23:10:12 2016 +0530

GSoC - moving FastAttributeList::clear to consumer thread:

this shares the load of clearing the attributes list with
the consumer when producer is busy.

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

diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index ab324a1..8fa9223 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -70,7 +70,11 @@ struct Entity;
 typedef std::unordered_map< OUString, sal_Int32,
 OUStringHash > NamespaceMap;
 
-typedef std::vector EventList;
+struct EventList
+{
+std::vector maEvents;
+bool mbIsAttributesEmpty;
+};
 
 enum CallbackType { INVALID, START_ELEMENT, END_ELEMENT, CHARACTERS, DONE, 
EXCEPTION };
 
@@ -531,7 +535,7 @@ EventList* Entity::getEventList()
 if (!mpProducedEvents)
 {
 mpProducedEvents = new EventList();
-mpProducedEvents->resize(mnEventListSize);
+mpProducedEvents->maEvents.resize(mnEventListSize);
 mnProducedEventsSize = 0;
 }
 }
@@ -544,7 +548,7 @@ Event& Entity::getEvent( CallbackType aType )
 return maSharedEvent;
 
 EventList* pEventList = getEventList();
-Event& rEvent = (*pEventList)[mnProducedEventsSize++];
+Event& rEvent = pEventList->maEvents[mnProducedEventsSize++];
 rEvent.maType = aType;
 return rEvent;
 }
@@ -783,6 +787,24 @@ void FastSaxParserImpl::parseStream(const InputSource& 
maStructSource)
 done = true;
 
 aGuard.reset(); // lock
+
+if ( rEntity.maPendingEvents.size() <= 
rEntity.mnEventLowWater )
+{
+aGuard.clear();
+for (auto aEventIt = pEventList->maEvents.begin();
+aEventIt != pEventList->maEvents.end(); ++aEventIt)
+{
+if (aEventIt->mxAttributes.is())
+{
+aEventIt->mxAttributes->clear();
+if( rEntity.mxNamespaceHandler.is() )
+aEventIt->mxDeclAttributes->clear();
+}
+pEventList->mbIsAttributesEmpty = true;
+}
+aGuard.reset();
+}
+
 rEntity.maUsedEvents.push(pEventList);
 }
 } while (!done);
@@ -926,8 +948,9 @@ void FastSaxParserImpl::produce( bool bForceFlush )
 bool FastSaxParserImpl::consume(EventList *pEventList)
 {
 Entity& rEntity = getEntity();
-for (EventList::iterator aEventIt = pEventList->begin();
- aEventIt != pEventList->end(); ++aEventIt)
+pEventList->mbIsAttributesEmpty = false;
+for (auto aEventIt = pEventList->maEvents.begin();
+ aEventIt != pEventList->maEvents.end(); ++aEventIt)
 {
 switch ((*aEventIt).maType)
 {
@@ -1042,17 +1065,28 @@ void FastSaxParserImpl::callbackStartElement(const 
xmlChar *localName , const xm
 }
 
 // create attribute map and process namespace instructions
-Event& rEvent = getEntity().getEvent( START_ELEMENT );
+Event& rEvent = rEntity.getEvent( START_ELEMENT );
+bool bIsAttributesEmpty = false;
+if ( rEntity.mbEnableThreads )
+bIsAttributesEmpty = rEntity.getEventList()->mbIsAttributesEmpty;
+
 if (rEvent.mxAttributes.is())
-rEvent.mxAttributes->clear();
+{
+if( !bIsAttributesEmpty )
+rEvent.mxAttributes->clear();
+}
 else
 rEvent.mxAttributes.set(
 new FastAttributeList( rEntity.mxTokenHandler,
rEntity.mpTokenHandler ) );
+
 if( rEntity.mxNamespaceHandler.is() )
 {
 if (rEvent.mxDeclAttributes.is())
-rEvent.mxDeclAttributes->clear();
+{
+if( !bIsAttributesEmpty )
+rEvent.mxDeclAttributes->clear();
+}
 else
 rEvent.mxDeclAttributes.set(
 new FastAttributeList( rEntity.mxTokenHandler,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Arul Michael
 sc/source/core/data/table3.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 88a5f7d56f9e6040450fb959ce8d091a50edcfde
Author: Arul Michael 
Date:   Fri Jul 29 17:14:46 2016 +0530

tdf#88793 EDITING, subtotals don't apply formatting

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

diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index efe0c27..6da1c7c 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2142,9 +2142,10 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
 aArr.AddOpCode( ocStop );
 ScFormulaCell* pCell = new ScFormulaCell(
 pDocument, ScAddress(nResCols[nResult], iEntry->nDestRow, 
nTab), aArr);
+if ( rParam.bIncludePattern )
+pCell->SetNeedNumberFormat(true);
 
 SetFormulaCell(nResCols[nResult], iEntry->nDestRow, pCell);
-
 if ( nResCols[nResult] != nGroupCol[iEntry->nGroupNo] )
 {
 ApplyStyle( nResCols[nResult], iEntry->nDestRow, *pStyle );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[ANN] LibreOffice 5.1.5 RC2 available

2016-07-29 Thread Christian Lohmaier
Dear Community,

The Document Foundation is pleased to announce the second release
candidate of LibreOffice 5.1.5. The upcoming 5.1.5 will be the fifth
bugfix release of our fresh 5.1 line. Please be aware that LibreOffice
5.1.5 RC2 has not been flagged as ready for production use yet,
however feel free to give it a try instead of 5.0.6 or 5.1.4.

A work-in-progress list of new features in LibreOffice 5.1 can be
found at https://wiki.documentfoundation.org/ReleaseNotes/5.1

The release is available for Windows, Linux and Mac OS X from our QA
builds download page at

  http://www.libreoffice.org/download/pre-releases/

Windows builds are also provided in 64bit version.

Developers and QA might also be interested in the symbol server for
windows debug information (see
https://wiki.documentfoundation.org/How_to_get_a_backtrace_with_WinDbg
for details)

Should you find bugs, please report them to our Bugzilla:

  https://bugs.documentfoundation.org

A good way to assess the release candidate quality is to run some
specific manual tests on it, our TCM wiki page has more details:

 
http://wiki.documentfoundation.org/QA/Testing/Regression_Tests#Full_Regression_Test

For other ways to get involved with this exciting project - you can
e.g. contribute code:

  http://www.libreoffice.org/community/developers/

translate LibreOffice to your language:

  http://wiki.documentfoundation.org/LibreOffice_Localization_Guide

or help with funding our operations:

  http://donate.libreoffice.org/

A list of known issues and fixed bugs compared to 5.1.5 rc1 is
available from our wiki:

  http://wiki.documentfoundation.org/Releases/5.1.5/RC2

Let us close again with a BIG Thank You! to all of you having
contributed to the LibreOffice project - this release would not have
been possible without your help.

On behalf of the Community,

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


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

2016-07-29 Thread Rishabh Kumar
 svx/source/tbxctrls/PaletteManager.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 74a017e27d04be13f072d03cab3a623a6b6d43ae
Author: Rishabh Kumar 
Date:   Sat Jul 30 09:22:45 2016 +0530

Use static_cast for type casting and fix loop variant size

Change-Id: Icc41693730ec8a68e3f3d68adff57fee02b7a689
Reviewed-on: https://gerrit.libreoffice.org/27714
Tested-by: Jenkins 
Reviewed-by: Rishabh Kumar 

diff --git a/svx/source/tbxctrls/PaletteManager.cxx 
b/svx/source/tbxctrls/PaletteManager.cxx
index e14c172..74a87f7 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -228,9 +228,9 @@ void PaletteManager::AddRecentColor(const Color& 
rRecentColor)
 if( maRecentColors.size() > mnMaxRecentColors )
 maRecentColors.pop_back();
 css::uno::Sequence< sal_Int32 > aColorList(maRecentColors.size());
-for(sal_uInt16 i = 0;i < maRecentColors.size();i++)
+for(sal_uInt32 i = 0;i < maRecentColors.size();i++)
 {
-aColorList[i] = (int)maRecentColors[i].GetColor();
+aColorList[i] = static_cast(maRecentColors[i].GetColor());
 }
 std::shared_ptr 
batch(comphelper::ConfigurationChanges::create(m_context));
 officecfg::Office::Common::UserColors::RecentColor::set(aColorList, batch);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-07-29 Thread Justin Luth
 writerfilter/source/dmapper/PropertyMap.cxx |   21 +++--
 1 file changed, 11 insertions(+), 10 deletions(-)

New commits:
commit 4a6329badc9c8679945d1a1ec225e26e15d7bfd2
Author: Justin Luth 
Date:   Fri Jul 29 22:03:55 2016 +0300

docx - inherit FollowPage before FirstPage

GetPageStyle(bTitlePage == true) will check if the follow exists.
If not, it will create a new style - which defeats the purpose
of inheriting from the previous section if this section didn't define
a new follow.

Change-Id: I235bc9b7bc35c9875295733313a6452ba8896c4f
Reviewed-on: https://gerrit.libreoffice.org/27700
Tested-by: Jenkins 
Reviewed-by: Justin Luth 

diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index 094e2b4..f36c150 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1126,17 +1126,8 @@ throw ( css::beans::UnknownPropertyException,
 
 // if no new styles have been created for this section, inherit from the 
previous section,
 // otherwise apply this section's settings to the new style.
+// Ensure that FollowPage is inherited first - otherwise GetPageStyle may 
auto-create a follow when checking FirstPage.
 SectionPropertyMap* pLastContext = rDM_Impl.GetLastSectionContext();
-if( pLastContext && m_sFirstPageStyleName.isEmpty() )
-m_sFirstPageStyleName =  pLastContext->GetPageStyleName( 
/*bFirst=*/true );
-else
-{
-HandleMarginsHeaderFooter( /*bFirst=*/true, rDM_Impl );
-GetPageStyle( xPageStyles, xTextFactory, /*bFirst=*/true );
-if( rDM_Impl.IsNewDoc() && m_aFirstPageStyle.is() )
-ApplyProperties_( m_aFirstPageStyle );
-}
-
 if( pLastContext && m_sFollowPageStyleName.isEmpty() )
 m_sFollowPageStyleName = pLastContext->GetPageStyleName();
 else
@@ -1147,6 +1138,16 @@ throw ( css::beans::UnknownPropertyException,
 ApplyProperties_( m_aFollowPageStyle );
 }
 
+if( pLastContext && m_sFirstPageStyleName.isEmpty() )
+m_sFirstPageStyleName =  pLastContext->GetPageStyleName( 
/*bFirst=*/true );
+else
+{
+HandleMarginsHeaderFooter( /*bFirst=*/true, rDM_Impl );
+GetPageStyle( xPageStyles, xTextFactory, /*bFirst=*/true );
+if( rDM_Impl.IsNewDoc() && m_aFirstPageStyle.is() )
+ApplyProperties_( m_aFirstPageStyle );
+}
+
 GetPageStyle( xPageStyles, xTextFactory, /*bFirst=*/true );
 // Chain m_aFollowPageStyle to be after m_aFirstPageStyle
 m_aFirstPageStyle->setPropertyValue( "FollowStyle", 
uno::makeAny(m_sFollowPageStyleName) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits