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

2018-01-12 Thread Noel Grandin
 emfio/source/reader/emfreader.cxx |2 
 emfio/source/reader/wmfreader.cxx |2 
 include/tools/poly.hxx|6 
 svx/source/dialog/contwnd.cxx |2 
 tools/inc/poly.h  |   38 ++--
 tools/source/generic/poly2.cxx|  311 +++---
 6 files changed, 90 insertions(+), 271 deletions(-)

New commits:
commit d7d9edb27e0e512fac6b5618bfd369cafc6edc1e
Author: Noel Grandin 
Date:   Thu Jan 11 16:01:44 2018 +0200

loplugin:useuniqueptr in PolyPolygon

Also
- convert to o3tl::cow_wrapper
- drop the second param to the constructor and just
  let vector use it's own resize logic
- bump MAX_POLYGONS from 0x3FF0 to 0x so that the
  ios2met filter can load it's files properly.

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

diff --git a/emfio/source/reader/emfreader.cxx 
b/emfio/source/reader/emfreader.cxx
index ea557ea88663..8e9b6b5d12f1 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -595,7 +595,7 @@ namespace emfio
 if ( mpInputStream->good() && ( nGesPoints * (sizeof(T)+sizeof(T)) ) 
<= ( nEndPos - mpInputStream->Tell() ) )
 {
 // Get polygon points
-tools::PolyPolygon aPolyPoly(nPoly, nPoly);
+tools::PolyPolygon aPolyPoly(nPoly);
 for (sal_uInt32 i = 0; i < nPoly && mpInputStream->good(); ++i)
 {
 const sal_uInt16 nPointCount(aPoints[i]);
diff --git a/emfio/source/reader/wmfreader.cxx 
b/emfio/source/reader/wmfreader.cxx
index e20576c0e9af..21f0bd21bc95 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -393,7 +393,7 @@ namespace emfio
 // Number of points of each polygon. Determine total 
number of points
 std::unique_ptr xPolygonPointCounts(new 
sal_uInt16[nPolyCount]);
 sal_uInt16* pnPoints = xPolygonPointCounts.get();
-tools::PolyPolygon aPolyPoly(nPolyCount, nPolyCount);
+tools::PolyPolygon aPolyPoly(nPolyCount);
 sal_uInt16 nPoints = 0;
 for (sal_uInt16 a = 0; a < nPolyCount && 
mpInputStream->good(); ++a)
 {
diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx
index a1351aa299a2..1a0926ecfff3 100644
--- a/include/tools/poly.hxx
+++ b/include/tools/poly.hxx
@@ -60,7 +60,7 @@ enum class PolyFlags : sal_uInt8
 
 class SvStream;
 class ImplPolygon;
-class ImplPolyPolygon;
+struct ImplPolyPolygon;
 namespace tools { class PolyPolygon; }
 
 namespace basegfx
@@ -189,7 +189,7 @@ public:
 class SAL_WARN_UNUSED TOOLS_DLLPUBLIC PolyPolygon
 {
 private:
-ImplPolyPolygon*mpImplPolyPolygon;
+o3tl::cow_wrapper  mpImplPolyPolygon;
 
 enum class PolyClipOp {
 INTERSECT,
@@ -198,7 +198,7 @@ private:
 TOOLS_DLLPRIVATE void  ImplDoOperation( const tools::PolyPolygon& 
rPolyPoly, tools::PolyPolygon& rResult, PolyClipOp nOperation ) const;
 
 public:
-PolyPolygon( sal_uInt16 nInitSize = 16, sal_uInt16 
nResize = 16 );
+PolyPolygon( sal_uInt16 nInitSize = 16 );
 PolyPolygon( const tools::Polygon& rPoly );
 PolyPolygon( const tools::PolyPolygon& rPolyPoly );
 ~PolyPolygon();
diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx
index 9ae5d524a1fb..bcaff23e30e0 100644
--- a/svx/source/dialog/contwnd.cxx
+++ b/svx/source/dialog/contwnd.cxx
@@ -235,7 +235,7 @@ void ContourWindow::Paint(vcl::RenderContext& 
rRenderContext, const tools::Recta
 
 if (aWorkRect.Left() != aWorkRect.Right() && aWorkRect.Top() != 
aWorkRect.Bottom())
 {
-tools::PolyPolygon _aPolyPoly(2, 2);
+tools::PolyPolygon _aPolyPoly(2);
 rTarget.Push(PushFlags::FILLCOLOR);
 _aPolyPoly.Insert(tools::Rectangle(Point(), GetGraphicSize()));
 _aPolyPoly.Insert(aWorkRect);
diff --git a/tools/inc/poly.h b/tools/inc/poly.h
index e59123f06473..88da80ca1615 100644
--- a/tools/inc/poly.h
+++ b/tools/inc/poly.h
@@ -53,27 +53,37 @@ public:
 boolImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon 
const * pInitPoly = nullptr );
 };
 
-#define MAX_POLYGONS((sal_uInt16)0x3FF0)
+#define MAX_POLYGONSSAL_MAX_UINT16
 
 namespace tools {
 class Polygon;
 }
 
-class SAL_WARN_UNUSED ImplPolyPolygon
+struct ImplPolyPolygon
 {
-public:
-tools::Polygon** mpPolyAry;
-sal_uInt32  mnRefCount;
-sal_uInt16  mnCount;
-sal_uInt16  mnSize;
-sal_uInt16  mnResize;
+std::vector mvPolyAry;
+
+ImplPolyPolygon( sal_uInt16 nInitSize )
+{
+   if ( !nInitSize )
+nInitSize = 1;
+   mvPolyAry.reserve(nInitSize);
+

[Libreoffice-commits] core.git: 2 commits - ios/CustomTarget_iOS_prelink.mk ios/CustomTarget_iOS_setup.mk

2018-01-12 Thread jan Iversen
 ios/CustomTarget_iOS_prelink.mk |7 ++-
 ios/CustomTarget_iOS_setup.mk   |4 ++--
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit dacb12d219fd060504553bf29e8536bdb747c930
Author: jan Iversen 
Date:   Fri Jan 12 18:26:21 2018 +0100

iOS, split .a and .dylib generation

Added new dependency/action

Change-Id: I378bc517e74e1569f81c9c7154be154021f1df3c

diff --git a/ios/CustomTarget_iOS_prelink.mk b/ios/CustomTarget_iOS_prelink.mk
index d7834cac50b3..0534264d416c 100644
--- a/ios/CustomTarget_iOS_prelink.mk
+++ b/ios/CustomTarget_iOS_prelink.mk
@@ -42,7 +42,9 @@ IOSPREBUILD: FORCE
 
 
 
-$(IOSKIT).dylib: IOSPREBUILD $(WORKDIR)/ios $(call 
gb_StaticLibrary_get_target,iOS_kitBridge) $(IOSLIBS)
+$(IOSKIT).a: IOSPREBUILD $(WORKDIR)/ios $(call 
gb_StaticLibrary_get_target,iOS_kitBridge) \
+   $(IOSLIBS)
+   $(call gb_Output_announce,iOS prelink object,$(true),LNK,2)
$(IOSLD) -r -ios_version_min $(IOS_DEPLOYMENT_VERSION) \
-syslibroot $(MACOSX_SDK_PATH) \
-arch `echo $(CPUNAME) |  tr '[:upper:]' '[:lower:]'` \
@@ -51,6 +53,9 @@ $(IOSKIT).dylib: IOSPREBUILD $(WORKDIR)/ios $(call 
gb_StaticLibrary_get_target,i
$(IOSLIBS)
$(AR) -r $(IOSKIT).a $(IOSOBJ)
 
+
+$(IOSKIT).dylib: $(IOSKIT).a
+   $(call gb_Output_announce,iOS dylib,$(true),LNK,2)
$(IOSCLANG) -dynamiclib 
-mios-simulator-version-min=$(IOS_DEPLOYMENT_VERSION) \
-arch `echo $(CPUNAME) |  tr '[:upper:]' '[:lower:]'` \
-isysroot $(MACOSX_SDK_PATH) \
commit b61791533edca81551fcc7948ea7202d9ba6e5c4
Author: jan Iversen 
Date:   Sat Jan 13 05:40:29 2018 +0100

iOS, Correct BRAND_* in rc

Wrong BRAND_BASE_DIR and BRAND_INI_DIR reference.

Change-Id: I85295a9de3807a60d0afb05c160be9acae2e4aec

diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk
index e159e2433fd2..20b58c7623e5 100644
--- a/ios/CustomTarget_iOS_setup.mk
+++ b/ios/CustomTarget_iOS_setup.mk
@@ -68,8 +68,8 @@ $(IOSGEN)/native-code.h: $(WORKDIR)/ios 
$(BUILDDIR)/config_host.mk \
 
# Set up fundamentalrc, unorc, bootstraprc and versionrc.
(echo '[Bootstrap]' \
-&& echo 'BRAND_BASE_DIR=$$APP_DATA_DIR/..' \
-&& echo 'BRAND_INI_DIR=$$APP_DATA_DIR' \
+&& echo 'BRAND_BASE_DIR=file://$$APP_DATA_DIR' \
+&& echo 'BRAND_INI_DIR=file:://$$APP_DATA_DIR' \
 && echo 'BRAND_SHARE_SUBDIR=$(LIBO_SHARE_FOLDER)' \
 && echo '##BRAND_SHARE_RESOURCE_SUBDIR=$(LIBO_SHARE_RESOURCE_FOLDER)' \
 && echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/share/registry 
' \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Justin Luth
 writerfilter/source/dmapper/StyleSheetTable.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 60c84cd52b291f7cfa4f44366bf021f34ef230f6
Author: Justin Luth 
Date:   Wed Jan 10 17:45:45 2018 +0300

remove unused include XChapterNumberingSupplier.hpp

The code moved to NumberingManager.cxx I believe.

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

diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx 
b/writerfilter/source/dmapper/StyleSheetTable.cxx
index d09ecfffb5e5..54a85958f11e 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -30,7 +30,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Justin Luth
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 5f25cfde82013d34276ed0ac12d4c2879888db7b
Author: Justin Luth 
Date:   Thu Jan 4 17:01:59 2018 +0300

unused variable: DomainMapper_Impl::PushAnnotation() pTopContext

unused even on the day when the function was created in 2009:
CWS-TOOLING: integrate CWS os124.

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

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 4b84edb98b66..5f514dc67709 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1858,7 +1858,6 @@ void DomainMapper_Impl::PushAnnotation()
 {
 try
 {
-PropertyMapPtr pTopContext = GetTopContext();
 m_bIsInComments = true;
 if (!GetTextFactory().is())
 return;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Thorsten Behrens
 include/com/sun/star/uno/Sequence.hxx |   79 ++
 1 file changed, 79 insertions(+)

New commits:
commit 37b4b3ea042ab380106f4eca001b605d79980296
Author: Thorsten Behrens 
Date:   Thu Jan 11 23:14:11 2018 +0100

provide uno::Sequence with ostream output operator

Alongside Anys and other UNO data types, you can now also stream
out Sequences, e.g. in SAL_INFO or SAL_DEBUG statements.

Example code:

uno::Sequence aBuffer...
SAL_DEBUG("my buffer: " << aBuffer);

Would yield:

debug:: my buffer: 0xb6, 0x61, 0xa8, ...

Change-Id: I03b0789372c44a4dd057625824862f43b1b8dfdc
Reviewed-on: https://gerrit.libreoffice.org/47779
Reviewed-by: Stephan Bergmann 
Tested-by: Thorsten Behrens 

diff --git a/include/com/sun/star/uno/Sequence.hxx 
b/include/com/sun/star/uno/Sequence.hxx
index 7fe9f0bda64f..64f84ffc7bc3 100644
--- a/include/com/sun/star/uno/Sequence.hxx
+++ b/include/com/sun/star/uno/Sequence.hxx
@@ -23,6 +23,10 @@
 
 #include 
 #include 
+#if defined LIBO_INTERNAL_ONLY
+# include 
+# include 
+#endif
 
 #include "osl/interlck.h"
 #include "com/sun/star/uno/Sequence.h"
@@ -200,6 +204,81 @@ inline ::com::sun::star::uno::Sequence< sal_Int8 > 
SAL_CALL toUnoSequence(
 return * reinterpret_cast< const ::com::sun::star::uno::Sequence< sal_Int8 
> * >( &rByteSequence );
 }
 
+#if defined LIBO_INTERNAL_ONLY
+
+/// @cond INTERNAL
+
+namespace uno_detail {
+
+template< typename value_t, typename charT, typename traits >
+void sequence_output_elems( std::basic_ostream &os, const 
value_t *pAry, sal_Int32 nLen, std::true_type )
+{
+// for integral types, use hex notation
+auto const flags = os.setf(std::ios_base::hex);
+for(sal_Int32 i=0; i 1 )
+os << "0x" << *pAry++;
+os.setf(flags);
+}
+
+template< typename value_t, typename charT, typename traits >
+void sequence_output_elems( std::basic_ostream &os, const 
value_t *pAry, sal_Int32 nLen, std::false_type )
+{
+// every other type: rely on their own ostream operator<<
+for(sal_Int32 i=0; i 1 )
+os << *pAry++;
+}
+
+template< typename value_t, typename charT, typename traits >
+void sequence_output_bytes( std::basic_ostream &os, const 
value_t *pAry, sal_Int32 nLen )
+{
+// special case bytes - ostream operator<< outputs those as char
+// values, but we need raw ints here
+auto const flags = os.setf(std::ios_base::hex);
+for(sal_Int32 i=0; i 1 )
+os << "0x" << (0xFF & +*pAry++);
+os.setf(flags);
+}
+
+template
+struct negation : std::integral_constant { };
+
+}
+
+/**
+   Support for Sequence in std::ostream (and thus in CPPUNIT_ASSERT or SAL_INFO
+   macros, for example).
+
+   @since LibreOffice 6.1
+*/
+template< typename value_t, typename charT, typename traits >
+inline typename std::enable_if>::value, std::basic_ostream>::type 
&operator<<(std::basic_ostream &os, css::uno::Sequence < value_t 
> &v)
+{
+const value_t *pAry = v.getConstArray();
+sal_Int32 nLen = v.getLength();
+uno_detail::sequence_output_elems(os, pAry, nLen, 
std::is_integral());
+return os;
+}
+
+template< typename value_t, typename charT, typename traits >
+inline typename std::enable_if::value, 
std::basic_ostream>::type &operator<<(std::basic_ostream &os, css::uno::Sequence < value_t > &v)
+{
+// specialisation for signed bytes
+const sal_Int8 *pAry = v.getConstArray();
+sal_Int32 nLen = v.getLength();
+uno_detail::sequence_output_bytes(os, pAry, nLen);
+return os;
+}
+
+/// @endcond
+
+#endif
+
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Miklos Vajna
 sw/inc/doc.hxx  |   11 ---
 sw/source/core/doc/docnew.cxx   |4 +---
 sw/source/core/docnode/ndtbl.cxx|   10 ++
 sw/source/core/unocore/unostyle.cxx |3 +++
 sw/source/uibase/app/docstyle.cxx   |   23 +--
 5 files changed, 35 insertions(+), 16 deletions(-)

New commits:
commit 53ef918a6839c8d587dec1bb635e6b39397c53d0
Author: Miklos Vajna 
Date:   Fri Jan 12 17:08:31 2018 +0100

sw: lazy load table autoformats for style purposes

Commit b7138e03ebc8a33258c099c5cf6015970646a40e (GSoC Writer Table
Styles; Import bugfix, 2016-07-26) changed the SwDoc ctor to always load
the table autoformats, which is expensive for simple documents. Avoid
the load in the ctor by switching to lazy-load and adding a way to count
the number of styles without loading the autoformats when there would be
none.

(mpTableStyles -> m_pTableStyles was only necessary to see if there is
access outside GetTableStyles() to this member, but there were not any.)

Times for 100 hello world inputs: 3863 -> 2753 ms is spent in XHTML-load + 
ODT
export + close (71% of original).

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

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 1a680165d9e7..da91f08d4375 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -323,7 +323,7 @@ class SW_DLLPUBLIC SwDoc final
 css::uno::Reference 
m_xTemplateToProjectCache;
 
 /// Table styles (autoformats that are applied with table changes).
-std::unique_ptr mpTableStyles;
+std::unique_ptr m_pTableStyles;
 /// Cell Styles not assigned to a Table Style
 std::unique_ptr mpCellStyles;
 private:
@@ -1235,8 +1235,13 @@ public:
 bool GetTableAutoFormat( const SwSelBoxes& rBoxes, SwTableAutoFormat& rGet 
);
 
 /// Return the available table styles.
-SwTableAutoFormatTable& GetTableStyles() { return *mpTableStyles.get(); }
-const SwTableAutoFormatTable& GetTableStyles() const { return 
*mpTableStyles.get(); }
+SwTableAutoFormatTable& GetTableStyles();
+const SwTableAutoFormatTable& GetTableStyles() const
+{
+return const_cast(this)->GetTableStyles();
+}
+/// Counts table styles without triggering lazy-load of them.
+bool HasTableStyles() const { return m_pTableStyles != nullptr; }
 // Create a new table style. Tracked by Undo.
 SwTableAutoFormat* MakeTableStyle(const OUString& rName, bool bBroadcast = 
false);
 // Delete table style named rName. Tracked by undo.
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 2fae0c3597d4..ec41a235f125 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -257,7 +257,7 @@ SwDoc::SwDoc()
 mpStyleAccess( nullptr ),
 mpLayoutCache( nullptr ),
 mpGrammarContact(createGrammarContact()),
-mpTableStyles(new SwTableAutoFormatTable),
+m_pTableStyles(nullptr),
 mpCellStyles(new SwCellStyleTable),
 m_pXmlIdRegistry(),
 mReferenceCount(0),
@@ -373,8 +373,6 @@ SwDoc::SwDoc()
 }
 mnRsidRoot = mnRsid;
 
-mpTableStyles->Load();
-
 getIDocumentState().ResetModified();
 }
 
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index cb10bdb711f7..69dc8686084b 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -3865,6 +3865,16 @@ bool SwDoc::GetTableAutoFormat( const SwSelBoxes& 
rBoxes, SwTableAutoFormat& rGe
 return true;
 }
 
+SwTableAutoFormatTable& SwDoc::GetTableStyles()
+{
+if (!m_pTableStyles)
+{
+m_pTableStyles.reset(new SwTableAutoFormatTable);
+m_pTableStyles->Load();
+}
+return *m_pTableStyles.get();
+}
+
 OUString SwDoc::GetUniqueTableName() const
 {
 if( IsInMailMerge())
diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index d7d3eb9b3fc2..b83289107d26 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -695,6 +695,9 @@ sal_Int32 lcl_GetCountOrName(const 
SwDoc& rDoc, OUString
 template<>
 sal_Int32 lcl_GetCountOrName(const SwDoc& rDoc, 
OUString* pString, sal_Int32 nIndex)
 {
+if (!rDoc.HasTableStyles())
+return 0;
+
 const auto pAutoFormats = &rDoc.GetTableStyles();
 const sal_Int32 nCount = pAutoFormats->size();
 if (0 <= nIndex && nIndex < nCount)
diff --git a/sw/source/uibase/app/docstyle.cxx 
b/sw/source/uibase/app/docstyle.cxx
index a43fc90265dd..dbb7f0316241 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -3039,18 +3039,21 @@ SfxStyleSheetBase*  SwStyleSheetIterator::First()
 nSearchFamily == SfxStyleFamily::All )
 {
 const auto& aTableTemplateMap = 
SwTableAutoFormat::GetTableTemplateMap();
-const SwTableAutoFormatTable& rTableStyle

[Libreoffice-commits] core.git: 6 commits - comphelper/source include/comphelper include/rtl include/test officecfg/registry package/inc package/source sfx2/source sw/qa uui/source

2018-01-12 Thread Michael Stahl
 comphelper/source/misc/docpasswordhelper.cxx   |2 
 comphelper/source/misc/storagehelper.cxx   |   13 ++
 include/comphelper/storagehelper.hxx   |1 
 include/rtl/digest.h   |   63 +
 include/test/testinteractionhandler.hxx|   11 ++
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   15 ---
 package/inc/EncryptionData.hxx |5 -
 package/inc/ZipPackageStream.hxx   |5 -
 package/source/zipapi/ZipFile.cxx  |   11 ++
 package/source/zipapi/sha1context.cxx  |   52 +-
 package/source/zipapi/sha1context.hxx  |   26 -
 package/source/zippackage/ZipPackage.cxx   |2 
 package/source/zippackage/ZipPackageStream.cxx |   32 --
 sfx2/source/dialog/filedlghelper.cxx   |   21 
 sfx2/source/doc/objstor.cxx|   15 ---
 sw/qa/extras/inc/swmodeltestbase.hxx   |   17 ++-
 sw/qa/extras/odfexport/data/sha1_correct.odt   |binary
 sw/qa/extras/odfexport/data/sha1_wrong.odt |binary
 sw/qa/extras/odfexport/odfexport.cxx   |   10 ++
 uui/source/iahndl-authentication.cxx   |3 
 20 files changed, 248 insertions(+), 56 deletions(-)

New commits:
commit efc06e9bb696110350ab3e14344de53db992280e
Author: Michael Stahl 
Date:   Fri Jan 12 22:44:43 2018 +0100

tdf#114939 sal: deprecate rtl_digest_*SHA* and rtl_digest_PBKDF2

Document the disaster but don't fix it so this implementation can be
used to import existing documents with bad SHA1 hashes.

Change-Id: I4f3648dd0987392ef49dc149a9213bcafcefb202

diff --git a/include/rtl/digest.h b/include/rtl/digest.h
index 7e225e18d0ea..6652038874fe 100644
--- a/include/rtl/digest.h
+++ b/include/rtl/digest.h
@@ -288,11 +288,18 @@ SAL_DLLPUBLIC rtlDigestError SAL_CALL rtl_digest_MD5 (
 FIPS PUB 180 (Superseded by FIPS PUB 180-1)
   Secure Hash Standard
 
+@deprecated The implementation is buggy and generates incorrect results
+for 52 <= (len % 64) <= 55; use only for bug-compatibility.
+
 @see rtl_digest_create()
  */
 SAL_DLLPUBLIC rtlDigest SAL_CALL rtl_digest_createSHA (void) 
SAL_THROW_EXTERN_C();
 
 /** Destroy a SHA digest handle.
+
+@deprecated The implementation is buggy and generates incorrect results
+for 52 <= (len % 64) <= 55; use only for bug-compatibility.
+
 @see rtl_digest_destroy()
  */
 SAL_DLLPUBLIC void SAL_CALL rtl_digest_destroySHA (
@@ -301,6 +308,10 @@ SAL_DLLPUBLIC void SAL_CALL rtl_digest_destroySHA (
 
 
 /** Update a SHA digest with given data.
+
+@deprecated The implementation is buggy and generates incorrect results
+for 52 <= (len % 64) <= 55; use only for bug-compatibility.
+
 @see rtl_digest_update()
  */
 SAL_DLLPUBLIC rtlDigestError SAL_CALL rtl_digest_updateSHA (
@@ -309,6 +320,10 @@ SAL_DLLPUBLIC rtlDigestError SAL_CALL rtl_digest_updateSHA 
(
 ) SAL_THROW_EXTERN_C();
 
 /** Finalize a SHA digest and retrieve the digest value.
+
+@deprecated The implementation is buggy and generates incorrect results
+for 52 <= (len % 64) <= 55; use only for bug-compatibility.
+
 @see rtl_digest_get()
  */
 SAL_DLLPUBLIC rtlDigestError SAL_CALL rtl_digest_getSHA (
@@ -321,6 +336,9 @@ SAL_DLLPUBLIC rtlDigestError SAL_CALL rtl_digest_getSHA (
 This function performs an optimized call sequence on a
 single data buffer, avoiding digest creation and destruction.
 
+@deprecated The implementation is buggy and generates incorrect results
+for 52 <= (len % 64) <= 55; use only for bug-compatibility.
+
 @see rtl_digest_updateSHA()
 @see rtl_digest_getSHA()
 
@@ -349,11 +367,18 @@ SAL_DLLPUBLIC rtlDigestError SAL_CALL rtl_digest_SHA (
 FIPS PUB 180-1 (Supersedes FIPS PUB 180)
   Secure Hash Standard
 
+@deprecated The implementation is buggy and generates incorrect results
+for 52 <= (len % 64) <= 55; use only for bug-compatibility.
+
 @see rtl_digest_create()
  */
 SAL_DLLPUBLIC rtlDigest SAL_CALL rtl_digest_createSHA1 (void) 
SAL_THROW_EXTERN_C();
 
 /** Destroy a SHA1 digest handle.
+
+@deprecated The implementation is buggy and generates incorrect results
+for 52 <= (len % 64) <= 55; use only for bug-compatibility.
+
 @see rtl_digest_destroy()
  */
 SAL_DLLPUBLIC void SAL_CALL rtl_digest_destroySHA1 (
@@ -361,6 +386,10 @@ SAL_DLLPUBLIC void SAL_CALL rtl_digest_destroySHA1 (
 ) SAL_THROW_EXTERN_C();
 
 /** Update a SHA1 digest with given data.
+
+@deprecated The implementation is buggy and generates incorrect results
+for 52 <= (len % 64) <= 55; use only for bug-compatibility.
+
 @see rtl_digest_update()
 

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

2018-01-12 Thread Zdeněk Crhonek
 sw/qa/uitest/writer_tests/tdf93068.py |   37 ++
 1 file changed, 37 insertions(+)

New commits:
commit 42e90b44ee9de1c5e0b324e492949ff6f345461b
Author: Zdeněk Crhonek 
Date:   Thu Dec 21 20:59:54 2017 +0100

uitest for tdf#93068

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

diff --git a/sw/qa/uitest/writer_tests/tdf93068.py 
b/sw/qa/uitest/writer_tests/tdf93068.py
new file mode 100644
index ..94a5484d46e6
--- /dev/null
+++ b/sw/qa/uitest/writer_tests/tdf93068.py
@@ -0,0 +1,37 @@
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+from uitest.framework import UITestCase
+import time
+from uitest.uihelper.common import get_state_as_dict, type_text
+
+class tdf93068(UITestCase):
+
+def test_tdf93068(self):
+
+self.ui_test.create_doc_in_start_center("writer")
+
+xWriterDoc = self.xUITest.getTopFocusWindow()
+xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+self.ui_test.execute_dialog_through_command(".uno:FontDialog")
+xFontDlg = self.xUITest.getTopFocusWindow()
+xOKBtn = xFontDlg.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+
+self.ui_test.execute_dialog_through_command(".uno:FontDialog")
+xFontDlg = self.xUITest.getTopFocusWindow()
+xCancBtn = xFontDlg.getChild("cancel")
+xCancBtn.executeAction("CLICK", tuple())
+
+self.ui_test.execute_dialog_through_command(".uno:FontDialog")
+xFontDlg = self.xUITest.getTopFocusWindow()
+xDiscardBtn = xFontDlg.getChild("reset")
+xDiscardBtn.executeAction("CLICK", tuple())
+xOKBtn = xFontDlg.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+
+self.ui_test.close_doc()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Caolán McNamara
 sd/source/filter/ppt/pptin.cxx |   12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 069e727e1049eaaeb1cbbd7fdd14d8d47abc1f8b
Author: Caolán McNamara 
Date:   Fri Jan 12 20:44:25 2018 +

ofz#5274 Out-of-memory

Change-Id: I3e69f5e2be848933a43d09c620dafd946486e731

diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 0b64546358d7..ef16cadef0d6 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -1953,15 +1953,21 @@ OUString ImplSdPPTImport::ReadSound(sal_uInt32 
nSoundRef) const
 INetURLObject aGalleryUserSound( 
aGalleryDir.getToken( nTokenCount - 1, ';' ) );
 
 aGalleryUserSound.Append( aRetval );
+const auto nRemainingSize = 
rStCtrl.remainingSize();
 sal_uInt32 nSoundDataLen = aSoundDataRecHd.nRecLen;
-std::unique_ptr pBuf( new sal_uInt8[ 
nSoundDataLen ] );
+if (nSoundDataLen > nRemainingSize)
+{
+SAL_WARN("filter.ms", "sound data len longer 
than remaining stream size");
+nSoundDataLen = nRemainingSize;
+}
+std::vector aBuf(nSoundDataLen);
 
-rStCtrl.ReadBytes(pBuf.get(), nSoundDataLen);
+rStCtrl.ReadBytes(aBuf.data(), nSoundDataLen);
 SvStream* pOStm = 
::utl::UcbStreamHelper::CreateStream( aGalleryUserSound.GetMainURL( 
INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE | StreamMode::TRUNC );
 
 if( pOStm )
 {
-pOStm->WriteBytes(pBuf.get(), nSoundDataLen);
+pOStm->WriteBytes(aBuf.data(), nSoundDataLen);
 
 if( pOStm->GetError() == ERRCODE_NONE )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Henry Castro
 loleaflet/src/control/Control.Menubar.js |   27 +--
 loleaflet/unocommands.js |3 +++
 2 files changed, 28 insertions(+), 2 deletions(-)

New commits:
commit 703861538ff2bddb157a4836c995154390df31aa
Author: Henry Castro 
Date:   Fri Jan 12 21:45:45 2018 +0100

loleaflet: add Header/Footer menu

Change-Id: Iabbb3e2a8eadadae2446b572f0e411491af9db4f
Reviewed-on: https://gerrit.libreoffice.org/47829
Reviewed-by: Henry Castro 
Tested-by: Henry Castro 

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index c863eeec..ba9b9b30 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -63,6 +63,9 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:InsertGraphic', 'text'), id: 
'insertgraphic', type: 'action'},
{name: _UNO('.uno:InsertAnnotation', 'text'), 
id: 'insertcomment', type: 'action'},
{type: 'separator'},
+   {name: _UNO('.uno:InsertHeaderFooterMenu', 
'text'), type: 'menu', menu: [
+   {uno: '.uno:InsertPageHeader'},
+   {uno: '.uno:InsertPageFooter'}]},
{uno: '.uno:InsertFootnote'},
{uno: '.uno:InsertEndnote'},
{type: 'separator'},
@@ -683,6 +686,27 @@ L.Control.Menubar = L.Control.extend({
}
},
 
+   _sendCommand: function (item) {
+   var unoCommand = $(item).data('uno');
+   if (unoCommand == '.uno:InsertPageHeader' || unoCommand == 
'.uno:InsertPageFooter') {
+   if (map['stateChangeHandler'].getItemValue(unoCommand) 
=== 'true') {
+   vex.dialog.confirm({
+   message: (unoCommand.endsWith('Header') 
? _('Are you sure you want to delete the header?') :
+   _('Are you sure you want to 
delete the footer?')),
+   callback: function(value) {
+   if (value) {
+   
map.sendUnoCommand(unoCommand + '?On:bool=false');
+   }
+   }
+   });
+   } else {
+   map.sendUnoCommand(unoCommand + 
'?On:bool=true');
+   }
+   } else {
+   map.sendUnoCommand(unoCommand);
+   }
+   },
+
_onDeleteSlide: function(e) {
if (e) {
map.deletePage();
@@ -693,8 +717,7 @@ L.Control.Menubar = L.Control.extend({
var self = e.data.self;
var type = $(item).data('type');
if (type === 'unocommand') {
-   var unoCommand = $(item).data('uno');
-   map.sendUnoCommand(unoCommand);
+   self._sendCommand(item);
} else if (type === 'action') {
self._executeAction(item);
}
diff --git a/loleaflet/unocommands.js b/loleaflet/unocommands.js
index fade3dc0..706c7c6a 100644
--- a/loleaflet/unocommands.js
+++ b/loleaflet/unocommands.js
@@ -89,11 +89,14 @@ var unoCommandsArray = {
InsertFootnote:{text:{menu:_('~Footnote'),},},
InsertGraphic:{global:{context:_('Insert 
Image'),menu:_('~Image...'),},},
InsertHardHyphen:{global:{menu:_('Non-br~eaking hyphen'),},},
+   InsertHeaderFooterMenu:{text:{menu:_('He~ader and Footer'),},},
InsertIndexesEntry:{text:{menu:_('~Index Entry...'),},},
InsertLRM:{global:{menu:_('~Left-to-right mark'),},},
InsertMenu:{global:{menu:_('~Insert'),},},
InsertNeutralParagraph:{text:{menu:_('Insert Unnumbered Entry'),},},
InsertNonBreakingSpace:{global:{menu:_('~Non-breaking space'),},},
+   InsertPageFooter:{text:{menu:_('Foote~r'),},},
+   InsertPageHeader:{text:{menu:_('He~ader'),},},
InsertPagebreak:{text:{menu:_('~Page Break'),},},
InsertRLM:{global:{menu:_('~Right-to-left mark'),},},
InsertRows:{presentation:{menu:_('Insert 
Row'),},spreadsheet:{menu:_('Rows ~Above'),},text:{menu:_('Insert Row'),},},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Miklos Vajna
 include/sfx2/sfxsids.hrc   |3 ++-
 sfx2/qa/cppunit/misc/hello.odt |binary
 sfx2/qa/cppunit/test_misc.cxx  |   38 ++
 sfx2/sdi/sfx.sdi   |2 +-
 sfx2/source/appl/appuno.cxx|1 +
 sfx2/source/doc/objstor.cxx|   11 +++
 6 files changed, 53 insertions(+), 2 deletions(-)

New commits:
commit a746f20cae91a87b8263342fb558a12f2f0d50b2
Author: Miklos Vajna 
Date:   Fri Jan 12 14:32:21 2018 +0100

sfx2 store: add API to allow disabling thumbnails only for a single save

This is similar to the
officecfg::Office::Common::Save::Document::GenerateThumbnail config
setting, but here we allow configuring this at a per-save basis, not
persistently.

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

diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 81d4d45cbe9d..6fbdaa4f281e 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -244,8 +244,9 @@
 #define SID_TEMPLATE_MANAGER(SID_SFX_START + 1727)
 #define SID_TOOLBAR_MODE(SID_SFX_START + 1728)
 #define SID_NO_FILE_SYNC(SID_SFX_START + 1729)
+#define SID_NO_THUMBNAIL(SID_SFX_START + 1730)
 
-//  SID_SFX_free_START  (SID_SFX_START + 1730)
+//  SID_SFX_free_START  (SID_SFX_START + 1731)
 //  SID_SFX_free_END(SID_SFX_START + 3999)
 
 #define SID_OPEN_NEW_VIEW   (SID_SFX_START + 520)
diff --git a/sfx2/qa/cppunit/misc/hello.odt b/sfx2/qa/cppunit/misc/hello.odt
new file mode 100644
index ..23ce6a4db9af
Binary files /dev/null and b/sfx2/qa/cppunit/misc/hello.odt differ
diff --git a/sfx2/qa/cppunit/test_misc.cxx b/sfx2/qa/cppunit/test_misc.cxx
index e3cbd8d4748c..5f36b438f089 100644
--- a/sfx2/qa/cppunit/test_misc.cxx
+++ b/sfx2/qa/cppunit/test_misc.cxx
@@ -20,11 +20,17 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
+#include 
 
 #include 
+#include 
+#include 
+#include 
 
 
 using namespace ::com::sun::star;
@@ -34,10 +40,13 @@ namespace {
 
 class MiscTest
 : public test::BootstrapFixture
+, public unotest::MacrosTest
 , public XmlTestTools
 {
 public:
+virtual void setUp() override;
 void testODFCustomMetadata();
+void testNoThumbnail();
 
 virtual void registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx) override
 {
@@ -52,11 +61,19 @@ public:
 
 CPPUNIT_TEST_SUITE(MiscTest);
 CPPUNIT_TEST(testODFCustomMetadata);
+CPPUNIT_TEST(testNoThumbnail);
 CPPUNIT_TEST_SUITE_END();
 
 private:
 };
 
+void MiscTest::setUp()
+{
+m_xContext = comphelper::getProcessComponentContext();
+mxDesktop.set(frame::Desktop::create(m_xContext));
+SfxApplication::GetOrCreate();
+}
+
 void MiscTest::testODFCustomMetadata()
 {
 uno::Reference const xProps(
@@ -86,6 +103,27 @@ void MiscTest::testODFCustomMetadata()
 aTempFile.EnableKillingFile();
 }
 
+void MiscTest::testNoThumbnail()
+{
+// Load a document.
+const OUString 
aURL(m_directories.getURLFromSrc("/sfx2/qa/cppunit/misc/hello.odt"));
+uno::Reference xComponent
+= loadFromDesktop(aURL, "com.sun.star.text.TextDocument");
+CPPUNIT_ASSERT(xComponent.is());
+
+// Save it with the NoThumbnail option and assert that it has no thumbnail.
+uno::Reference xStorable(xComponent, uno::UNO_QUERY);
+CPPUNIT_ASSERT(xStorable.is());
+utl::TempFile aTempFile;
+uno::Sequence aProperties(
+comphelper::InitPropertySequence({ { "NoThumbnail", uno::makeAny(true) 
} }));
+xStorable->storeToURL(aTempFile.GetURL(), aProperties);
+uno::Reference xZipFile
+= packages::zip::ZipFileAccess::createWithURL(m_xContext, 
aTempFile.GetURL());
+CPPUNIT_ASSERT(!xZipFile->hasByName("Thumbnails/thumbnail.png"));
+
+xComponent->dispose();
+}
 
 CPPUNIT_TEST_SUITE_REGISTRATION(MiscTest);
 
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index a366a271edb5..0ddf3653c3c0 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3557,7 +3557,7 @@ SfxVoidItem SaveAll SID_SAVEDOCS
 
 
 SfxStringItem SaveAs SID_SAVEASDOC
-(SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName 
SID_FILTER_NAME,SfxStringItem Password SID_PASSWORD,SfxBoolItem 
PasswordInteraction SID_PASSWORDINTERACTION,SfxStringItem FilterOptions 
SID_FILE_FILTEROPTIONS,SfxStringItem VersionComment 
SID_DOCINFO_COMMENTS,SfxStringItem VersionAuthor SID_DOCINFO_AUTHOR,SfxBoolItem 
Overwrite SID_OVERWRITE,SfxBoolItem Unpacked SID_UNPACK,SfxBoolItem SaveTo 
SID_SAVETO,SfxBoolItem NoFileSync SID_NO_FILE_SYNC)
+(SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName 
SID_FILTER_NAME,SfxStringItem Password SID_PASSWORD,SfxBoolItem 
PasswordInteraction SID_PASSWORDINTERACTION,SfxStringItem FilterOptions 
SID_FILE_FILTEROPTIONS,SfxStrin

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

2018-01-12 Thread Andras Timar
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f75d60501ba887b5ad4a7924be70264b27eecec7
Author: Andras Timar 
Date:   Fri Jan 12 20:39:55 2018 +0100

Updated core
Project: translations  5c8037b1eea42c23f7b20d203ace7c0317c55d7e

Translation of backported features (from libreoffice-6-0)

Change-Id: I1ef20c918746008f5dee1ea2d24f9f56637b8143

diff --git a/translations b/translations
index 26e56860d3b6..5c8037b1eea4 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 26e56860d3b6e3f61823efdb7e0e4ec667f37c24
+Subproject commit 5c8037b1eea42c23f7b20d203ace7c0317c55d7e
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Stephan Bergmann
 compilerplugins/clang/cstylecast.cxx |  440 ++-
 compilerplugins/clang/test/cstylecast.cxx|   63 +++
 compilerplugins/clang/unnecessaryparen.cxx   |  104 ++
 solenv/CompilerTest_compilerplugins_clang.mk |1 
 4 files changed, 595 insertions(+), 13 deletions(-)

New commits:
commit cab0427cadddb3aaf1349c66f2fa13a4234ba4b2
Author: Stephan Bergmann 
Date:   Wed Jan 10 15:55:22 2018 +0100

Enable loplugin:cstylecast for some more cases

...mostly of C-style casts among arithmetic types, and automatically rewrite
those into either static_cast or a functional cast (which should have 
identical
semantics, but where the latter probably looks better for simple cases like
casting a literal to a specific type, as in "sal_Int32(0)" vs.
"static_cast(0)").

The main benefit of reducing the amount of C-style casts across the code 
base
further is so that other plugins (that have not been taught about the 
complex
semantics of C-style cast) can pick those up (cf. the various recent
"loplugin:redundantcast" commits, which address those findings after this
improved loplugin:cstylecast has been run).  Also, I found some places where
a C-style cast has probably been applied only to the first part of a larger
expression in error (because it's easy to forget parentheses in cases like
"(sal_uInt16)VOPT_CLIPMARKS+1"); I'll follow up on those individually.

The improved loplugin:cstylecast is careful to output either "(performs:
static_cast)" or "(performs: functional cast)", so that
compilerplugins/clang/test/cstylecast.cxx can check that the plugin would
automatically rewrite to one or the other form.

To allow fully-automatic rewriting, this also required 
loplugin:unnecessaryparen
to become a rewriting plugin, at least for the parens-around-cast case 
(where
"((foo)bar)" first gets rewritten to "(static_cast(bar))", then to
"static_cast(bar)".  Rewriting could probably be added to other cases 
of
loplugin:unnecessaryparen in the future, too.

(The final version of this patch would even have been able to cope with
361dd2576a09fbda83f3ce9a26ecb590c38f74e3 "Replace some C-style casts in ugly
macros with static_cast", so that manual change would not have been 
necessary
after all.)

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

diff --git a/compilerplugins/clang/cstylecast.cxx 
b/compilerplugins/clang/cstylecast.cxx
index bf8e2fb00809..f09ce81a2987 100644
--- a/compilerplugins/clang/cstylecast.cxx
+++ b/compilerplugins/clang/cstylecast.cxx
@@ -7,8 +7,10 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include "plugin.hxx"
 
@@ -82,11 +84,89 @@ QualType resolvePointers(QualType type) {
 return type;
 }
 
+bool isLiteralLike(Expr const * expr) {
+expr = expr->IgnoreParenImpCasts();
+if (isa(expr) || isa(expr) || 
isa(expr)
+|| isa(expr) || isa(expr)
+|| isa(expr) || isa(expr))
+{
+return true;
+}
+if (auto const e = dyn_cast(expr)) {
+auto const d = e->getDecl();
+if (isa(d)) {
+return true;
+}
+if (auto const v = dyn_cast(d)) {
+if (d->getType().isConstQualified()) {
+if (auto const init = v->getAnyInitializer()) {
+return isLiteralLike(init);
+}
+}
+}
+return false;
+}
+if (auto const e = dyn_cast(expr)) {
+auto const k = e->getKind();
+return k == UETT_SizeOf || k == UETT_AlignOf;
+}
+if (auto const e = dyn_cast(expr)) {
+auto const k = e->getOpcode();
+if (k == UO_Plus || k == UO_Minus || k == UO_Not || k == UO_LNot) {
+return isLiteralLike(e->getSubExpr());
+}
+return false;
+}
+if (auto const e = dyn_cast(expr)) {
+auto const k = e->getOpcode();
+if (k == BO_Mul || k == BO_Div || k == BO_Rem || k == BO_Add || k == 
BO_Sub || k == BO_Shl
+|| k == BO_Shr || k == BO_And || k == BO_Xor || k == BO_Or)
+{
+return isLiteralLike(e->getLHS()) && isLiteralLike(e->getRHS());
+}
+return false;
+}
+if (auto const e = dyn_cast(expr)) {
+auto const t = e->getTypeAsWritten();
+return (t->isArithmeticType() || t->isEnumeralType())
+&& isLiteralLike(e->getSubExprAsWritten());
+}
+return false;
+}
+
+bool canBeUsedForFunctionalCast(TypeSourceInfo const * info) {
+// Must be  or , lets 
approximate that here:
+assert(info != nullptr);
+auto const type = info->getType();
+if (type.hasLocalQualifiers()) {
+return false;
+}
+if (auto const t = dyn_cast(type)) {
+if (!(

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

2018-01-12 Thread Caolán McNamara
 sc/source/core/tool/interpr7.cxx |9 +
 1 file changed, 9 insertions(+)

New commits:
commit 3271e8b90f5d522fdfe1de46b77e7f67cdaa75af
Author: Caolán McNamara 
Date:   Wed Jan 10 14:27:35 2018 +

limit WEBSERVICE to http[s] protocols

and like excel...

'For protocols that aren’t supported, such as ftp:// or file://, WEBSERVICE
returns the #VALUE! error value.'

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

diff --git a/sc/source/core/tool/interpr7.cxx b/sc/source/core/tool/interpr7.cxx
index b92bf8cccf22..863664cc5309 100644
--- a/sc/source/core/tool/interpr7.cxx
+++ b/sc/source/core/tool/interpr7.cxx
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -247,6 +248,14 @@ void ScInterpreter::ScWebservice()
 return;
 }
 
+INetURLObject aObj(aURI, INetProtocol::File);
+INetProtocol eProtocol = aObj.GetProtocol();
+if (eProtocol != INetProtocol::Http && eProtocol != 
INetProtocol::Https)
+{
+PushError( FormulaError::NoValue );
+return;
+}
+
 uno::Reference< ucb::XSimpleFileAccess3 > xFileAccess( 
ucb::SimpleFileAccess::create( comphelper::getProcessComponentContext() ), 
uno::UNO_QUERY );
 if(!xFileAccess.is())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Caolán McNamara
 sc/source/ui/docshell/arealink.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 06a2ffe863501e8bef88cd0201bd5e8d73e92242
Author: Caolán McNamara 
Date:   Fri Jan 12 10:48:59 2018 +

VclPtr, missing dispose

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

diff --git a/sc/source/ui/docshell/arealink.cxx 
b/sc/source/ui/docshell/arealink.cxx
index 2b01cddb41c7..5c0bd1ecdda6 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -88,7 +88,7 @@ void ScAreaLink::Edit(vcl::Window* pParent, const 
Link& /* rEn
 ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
 OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
 
-VclPtr pDlg = 
pFact->CreateScLinkedAreaDlg(pParent);
+ScopedVclPtr 
pDlg(pFact->CreateScLinkedAreaDlg(pParent));
 OSL_ENSURE(pDlg, "Dialog create fail!");
 pDlg->InitFromOldLink( aFileName, aFilterName, aOptions, aSourceArea, 
GetRefreshDelay() );
 pImpl->m_pDialog = pDlg;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Caolán McNamara
 sc/source/ui/docshell/arealink.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dc2a2bd172762e95ebc66d58ba04b2071d00d0b1
Author: Caolán McNamara 
Date:   Fri Jan 12 10:48:59 2018 +

VclPtr, missing dispose

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

diff --git a/sc/source/ui/docshell/arealink.cxx 
b/sc/source/ui/docshell/arealink.cxx
index 95fc79d8ed01..ce6ba04c5e8d 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -88,7 +88,7 @@ void ScAreaLink::Edit(vcl::Window* pParent, const 
Link& /* rEn
 ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
 OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
 
-VclPtr pDlg = 
pFact->CreateScLinkedAreaDlg(pParent);
+ScopedVclPtr 
pDlg(pFact->CreateScLinkedAreaDlg(pParent));
 OSL_ENSURE(pDlg, "Dialog create fail!");
 pDlg->InitFromOldLink( aFileName, aFilterName, aOptions, aSourceArea, 
GetRefreshDelay() );
 pImpl->m_pDialog = pDlg;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Caolán McNamara
 sc/source/core/tool/interpr7.cxx |9 +
 1 file changed, 9 insertions(+)

New commits:
commit a916fc0c0e0e8b10cb4158fa0fa173fe205d434a
Author: Caolán McNamara 
Date:   Wed Jan 10 14:27:35 2018 +

limit WEBSERVICE to http[s] protocols

and like excel...

'For protocols that aren’t supported, such as ftp:// or file://, WEBSERVICE
returns the #VALUE! error value.'

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

diff --git a/sc/source/core/tool/interpr7.cxx b/sc/source/core/tool/interpr7.cxx
index 738447ea16dd..025b1ba0a3d0 100644
--- a/sc/source/core/tool/interpr7.cxx
+++ b/sc/source/core/tool/interpr7.cxx
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -247,6 +248,14 @@ void ScInterpreter::ScWebservice()
 return;
 }
 
+INetURLObject aObj(aURI, INetProtocol::File);
+INetProtocol eProtocol = aObj.GetProtocol();
+if (eProtocol != INetProtocol::Http && eProtocol != 
INetProtocol::Https)
+{
+PushError( FormulaError::NoValue );
+return;
+}
+
 uno::Reference< ucb::XSimpleFileAccess3 > xFileAccess( 
ucb::SimpleFileAccess::create( comphelper::getProcessComponentContext() ), 
uno::UNO_QUERY );
 if(!xFileAccess.is())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: ios/CustomTarget_iOS_setup.mk

2018-01-12 Thread jan Iversen
 ios/CustomTarget_iOS_setup.mk |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a5eea680720dd8f3c78143ac635dafdf09b5dd14
Author: jan Iversen 
Date:   Fri Jan 12 17:05:59 2018 +0100

iOS, add .py dependency to native-code.h

Change-Id: I165d59228c2b273d758d1222dce8e653bdca0039

diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk
index 9b7986cfda46..e159e2433fd2 100644
--- a/ios/CustomTarget_iOS_setup.mk
+++ b/ios/CustomTarget_iOS_setup.mk
@@ -36,7 +36,8 @@ $(WORKDIR)/ios:
 
 #- Generate dynamic files  ---
 $(IOSGEN)/native-code.h: $(WORKDIR)/ios $(BUILDDIR)/config_host.mk \
- $(SRCDIR)/ios/CustomTarget_iOS_setup.mk
+ $(SRCDIR)/ios/CustomTarget_iOS_setup.mk \
+$(SRCDIR)/solenv/bin/native-code.py
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ENV,2)
 
# generate file with call declarations
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Caolán McNamara
 cui/source/dialogs/linkdlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 69fac8ac09a5777d8d74eb72822410a5a02536c2
Author: Caolán McNamara 
Date:   Fri Jan 12 10:23:31 2018 +

show something for the link name if there is no link body

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

diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 6d61767457a5..b9edcfbf5518 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -628,7 +628,7 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, 
sal_uLong nPos, bool
 
 if( aFileName.getLength() > aTxt.getLength() )
 aTxt = aFileName;
-else if( aTxt.indexOf( aFileName, aTxt.getLength() - aFileName.getLength() 
) == -1 )
+else if (!aFileName.isEmpty() && aTxt.indexOf(aFileName, aTxt.getLength() 
- aFileName.getLength()) == -1)
 // filename not in string
 aTxt = aFileName;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp

2018-01-12 Thread Michael Meeks
 wsd/DocumentBroker.cpp |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 9335f6ff128b56876f5e7ef37b7983baa4d5b152
Author: Michael Meeks 
Date:   Fri Jan 12 16:16:56 2018 +

Warn if we exit with a modified document around.

Change-Id: Ie38ab49c66358f674e14820a6ffa993c25aa9e92

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index d2d627a3..97ef771f 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -298,6 +298,13 @@ void DocumentBroker::pollThread()
 _poll->continuePolling() << ", ShutdownRequestFlag: " << 
ShutdownRequestFlag <<
 ", TerminationFlag: " << TerminationFlag << ", closeReason: " << 
_closeReason << ". Flushing socket.");
 
+if (_isModified)
+{
+std::stringstream state;
+dumpState(state);
+LOG_ERR("DocumentBroker stopping although modified " << state.str());
+}
+
 // Flush socket data first.
 const int flushTimeoutMs = POLL_TIMEOUT_MS * 2; // ~1000ms
 const auto flushStartTime = std::chrono::steady_clock::now();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Stephan Bergmann
 cppuhelper/source/shlib.cxx |8 
 1 file changed, 8 deletions(-)

New commits:
commit 7f063b77da6db00806d9e6c60239a59d75ae3cee
Author: Stephan Bergmann 
Date:   Fri Jan 12 10:23:49 2018 +0100

Revert "Print the important failure messages on iOS even in a non-debug 
build"

This reverts commit ab07f81d0b5ffc4297d5f15d2458c5cc9217800f.

> Jan 12 10:21:35  tml_, is ab07f81d0b5ffc4297d5f15d2458c5cc9217800f
>  still relevant? (one could imagine that if one wants such debug output 
during
> development in a non-debug build, one could build with --enable-sal-log?)
> Jan 12 10:22:01  I have no idea what's relevant on iOS any longer
> Jan 12 10:22:26  ... but my gut feeling would be no, can be removed
> Jan 12 10:23:14  the rationale in the commit message sounds a bit 
thin
> Jan 12 10:24:02  surely one should test an ap well enough before
>  submitting, to verify that it isn't possible to get it to try to invoke a
>  constructor that isn't included

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

diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index e78071bb4774..52d8af821474 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -266,10 +266,6 @@ void cppuhelper::detail::loadSharedLibComponentFactory(
 }
 if (fp == 0) {
 SAL_WARN("cppuhelper", "unknown factory name \"" << name << "\"");
-#if defined IOS && !defined SAL_LOG_WARN
-// If the above SAL_WARN expanded to nothing, print to stderr...
-fprintf(stderr, "Unknown factory name %s\n", 
OUStringToOString(name, RTL_TEXTENCODING_UTF8).getStr());
-#endif
 throw css::loader::CannotActivateFactoryException(
 "unknown factory name \"" + name + "\"",
 css::uno::Reference());
@@ -290,10 +286,6 @@ void cppuhelper::detail::loadSharedLibComponentFactory(
 }
 }
 SAL_WARN("cppuhelper", "unknown constructor name \"" << constructor << 
"\"");
-#if defined IOS && !defined SAL_LOG_WARN
-// If the above SAL_WARN expanded to nothing, print to stderr...
-fprintf(stderr, "Unknown constructor name %s\n", 
OUStringToOString(constructor, RTL_TEXTENCODING_UTF8).getStr());
-#endif
 throw css::loader::CannotActivateFactoryException(
 "unknown constructor name \"" + constructor + "\"",
 css::uno::Reference());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: is _lo_get_constructor_map and _lo_get_factory_map processor dependent ?

2018-01-12 Thread jan iversen
> Definitions for those functions are generated by bin/native-code.py.  I
> do see uses of that (and of the generated native-code.h) in module ios
> (but have no further insight into that module).


Thanks that helps, I have seen native_code.h being generated when I do
fresh build, so it seems to be
a missing dependency or native-code.py have been changed.

Will take a look at that.
rgds
jan i

>
> --
Sent from My iPad, sorry for any misspellings.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-01-12 Thread Caolán McNamara
 sfx2/uiconfig/ui/linkeditdialog.ui |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 5f0b043e075b47fac7a42f2b5b39fc4f888be11a
Author: Caolán McNamara 
Date:   Fri Jan 12 09:58:20 2018 +

no button has default focus

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

diff --git a/sfx2/uiconfig/ui/linkeditdialog.ui 
b/sfx2/uiconfig/ui/linkeditdialog.ui
index 22fbce8eec58..d8bd427aa176 100644
--- a/sfx2/uiconfig/ui/linkeditdialog.ui
+++ b/sfx2/uiconfig/ui/linkeditdialog.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -21,6 +21,8 @@
 False
 True
 True
+True
+True
 True
 True
   
@@ -197,5 +199,8 @@
   ok
   cancel
 
+
+  
+
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Caolán McNamara
 sc/Library_sc.mk  |1 
 sc/inc/document.hxx   |2 
 sc/inc/documentlinkmgr.hxx|6 -
 sc/source/core/data/formulacell.cxx   |4 -
 sc/source/core/inc/webservicelink.hxx |   49 +
 sc/source/core/tool/interpr7.cxx  |  105 -
 sc/source/core/tool/webservicelink.cxx|  106 ++
 sc/source/ui/docshell/docsh4.cxx  |2 
 sc/source/ui/docshell/documentlinkmgr.cxx |   20 -
 sc/source/ui/view/tabvwsh4.cxx|2 
 10 files changed, 252 insertions(+), 45 deletions(-)

New commits:
commit 93ea7cb6b5ab3c9b964b2b38e8f4a3bde71dbadf
Author: Caolán McNamara 
Date:   Thu Jan 11 20:43:28 2018 +

handle ocWebservice similarly to ocDde

might have too much in here seeing as we don't need to worry about
ocWebservice calling into itself

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

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 890cafe689c2..9e1432c0a8c3 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -277,6 +277,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 sc/source/core/tool/unitconv \
 sc/source/core/tool/userlist \
 sc/source/core/tool/viewopti \
+sc/source/core/tool/webservicelink \
 sc/source/core/tool/zforauto \
 sc/source/filter/xml/datastreamimport \
 sc/source/filter/xml/XMLCalculationSettingsContext \
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 28d815a748aa..b83aadc30a60 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -500,7 +500,7 @@ private:
 // for detective update, is set for each change of a formula
 boolbDetectiveDirty;
 
-boolbLinkFormulaNeedingCheck; // valid only after loading, 
for ocDde
+boolbLinkFormulaNeedingCheck; // valid only after loading, 
for ocDde and ocWebservice
 
 CharCompressTypenAsianCompression;
 sal_uInt8   nAsianKerning;
diff --git a/sc/inc/documentlinkmgr.hxx b/sc/inc/documentlinkmgr.hxx
index d5d801a4aeb2..86dba66f2d3d 100644
--- a/sc/inc/documentlinkmgr.hxx
+++ b/sc/inc/documentlinkmgr.hxx
@@ -55,9 +55,9 @@ public:
 bool idleCheckLinks();
 
 bool hasDdeLinks() const;
-bool hasDdeOrOleLinks() const;
+bool hasDdeOrOleOrWebServiceLinks() const;
 
-bool updateDdeOrOleLinks(vcl::Window* pWin);
+bool updateDdeOrOleOrWebServiceLinks(vcl::Window* pWin);
 
 void updateDdeLink( const OUString& rAppl, const OUString& rTopic, const 
OUString& rItem );
 
@@ -65,7 +65,7 @@ public:
 
 void disconnectDdeLinks();
 private:
-bool hasDdeOrOleLinks(bool bDde, bool bOle) const;
+bool hasDdeOrOleOrWebServiceLinks(bool bDde, bool bOle, bool bWebService) 
const;
 };
 
 }
diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index 813f74f29655..7c52d3ff9c29 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1358,9 +1358,9 @@ void ScFormulaCell::CompileXML( 
sc::CompileFormulaContext& rCxt, ScProgress& rPr
 bChanged = true;
 }
 
-//  After loading, it must be known if ocDde is in any formula
+//  After loading, it must be known if ocDde/ocWebservice is in any formula
 //  (for external links warning, CompileXML is called at the end of 
loading XML file)
-if (!pDocument->HasLinkFormulaNeedingCheck() && pCode->HasOpCodeRPN(ocDde))
+if (!pDocument->HasLinkFormulaNeedingCheck() && 
(pCode->HasOpCodeRPN(ocDde) || pCode->HasOpCodeRPN(ocWebservice)))
 pDocument->SetLinkFormulaNeedingCheck(true);
 
 //volatile cells must be added here for import
diff --git a/sc/source/core/inc/webservicelink.hxx 
b/sc/source/core/inc/webservicelink.hxx
new file mode 100644
index ..e61ebfdb4347
--- /dev/null
+++ b/sc/source/core/inc/webservicelink.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SC_SOURCE_CORE_INC_WEBSERVICE_HXX
+#define INCLUDED_SC_SOURCE_CORE_INC_WEBSERVICE_HXX
+
+#include 
+#include 
+#include 
+#include 
+
+class ScDocument;
+
+class ScWebServiceLink : public ::sfx2::SvBaseLink, public SvtBroadcaster
+{
+private:
+ScDocument* pDoc;
+OUString aURL; // connection/ link data
+bool bHasResult; // is set aResult is useful
+OUString aResult;
+
+public:
+ScWebServiceLink(ScDocument* pD, const OUString& rURL);
+virtual ~ScWebServiceLink() override;
+

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

2018-01-12 Thread Caolán McNamara
 sc/inc/document.hxx |5 +
 sc/qa/unit/ucalc.cxx|1 +
 sc/source/core/data/documen2.cxx|1 +
 sc/source/core/data/formulacell.cxx |5 +
 sc/source/core/tool/interpr2.cxx|8 +++-
 sc/source/ui/docshell/docsh4.cxx|2 ++
 sc/source/ui/view/tabvwsh4.cxx  |2 +-
 7 files changed, 22 insertions(+), 2 deletions(-)

New commits:
commit dabcc069de794f38a04625cbc1cb5f70dcd3dff9
Author: Caolán McNamara 
Date:   Thu Jan 11 16:59:50 2018 +

Better handle ScDde formulas with missing dde-link entries

typically each ScDde formula has a matching table:dde-link which
results in a ScDdeLink getting inserted during the load. If that dde-link
is missing then no ScDdeLink exists and ScDde() will create a new one 
without
cached content. So detect that ScDde is used in the freshing loaded ods
and defer fetching new content until the right time.

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

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 3d13fd4d649f..28d815a748aa 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -500,6 +500,8 @@ private:
 // for detective update, is set for each change of a formula
 boolbDetectiveDirty;
 
+boolbLinkFormulaNeedingCheck; // valid only after loading, 
for ocDde
+
 CharCompressTypenAsianCompression;
 sal_uInt8   nAsianKerning;
 
@@ -1988,6 +1990,9 @@ public:
 boolIsDetectiveDirty() const { return bDetectiveDirty; }
 voidSetDetectiveDirty(bool bSet) { bDetectiveDirty = bSet; }
 
+boolHasLinkFormulaNeedingCheck() const  { return 
bLinkFormulaNeedingCheck; }
+voidSetLinkFormulaNeedingCheck(bool bSet)   { 
bLinkFormulaNeedingCheck = bSet; }
+
 voidSetRangeOverflowType(ErrCode nType)  { nRangeOverflowType 
= nType; }
 boolHasRangeOverflow() const { return 
nRangeOverflowType != ERRCODE_NONE; }
 SC_DLLPUBLIC const ErrCode& GetRangeOverflowType() const{ return 
nRangeOverflowType; }
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 36572e564cb5..175564916e20 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -6548,6 +6548,7 @@ void Test::testEmptyCalcDocDefaults()
 CPPUNIT_ASSERT_EQUAL( false, m_pDoc->IdleCalcTextWidth() );
 CPPUNIT_ASSERT_EQUAL( true, m_pDoc->IsIdleEnabled() );
 CPPUNIT_ASSERT_EQUAL( false, m_pDoc->IsDetectiveDirty() );
+CPPUNIT_ASSERT_EQUAL( false, m_pDoc->HasLinkFormulaNeedingCheck() );
 CPPUNIT_ASSERT_EQUAL( false, 
m_pDoc->IsChartListenerCollectionNeedsUpdate() );
 
 CPPUNIT_ASSERT_EQUAL( false, m_pDoc->HasRangeOverflow() );
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index bd0f72e76658..4e8e83614d5d 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -203,6 +203,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, 
SfxObjectShell* pDocShell ) :
 bInDtorClear( false ),
 bExpandRefs( false ),
 bDetectiveDirty( false ),
+bLinkFormulaNeedingCheck( false ),
 nAsianCompression(CharCompressType::Invalid),
 nAsianKerning(SC_ASIANKERNING_INVALID),
 bPastingDrawFromOtherDoc( false ),
diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index efab5fa09cf3..813f74f29655 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1358,6 +1358,11 @@ void ScFormulaCell::CompileXML( 
sc::CompileFormulaContext& rCxt, ScProgress& rPr
 bChanged = true;
 }
 
+//  After loading, it must be known if ocDde is in any formula
+//  (for external links warning, CompileXML is called at the end of 
loading XML file)
+if (!pDocument->HasLinkFormulaNeedingCheck() && pCode->HasOpCodeRPN(ocDde))
+pDocument->SetLinkFormulaNeedingCheck(true);
+
 //volatile cells must be added here for import
 if( pCode->IsRecalcModeAlways() || pCode->IsRecalcModeForced() ||
 pCode->IsRecalcModeOnLoad() || pCode->IsRecalcModeOnLoadOnce() )
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 5464d9b6c778..ab07afe355e0 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -2780,8 +2780,14 @@ void ScInterpreter::ScDde()
 pBindings->Invalidate( SID_LINKS ); // 
Link-Manager enabled
 }
 
+//if the document was just loaded, but the ScDdeLink entry was 
missing, then
+//don't update this link until the links are updated in response 
to the users
+//decision
+if (!pDok->HasLinkFormulaNeedingCheck())
+{

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

2018-01-12 Thread Stephan Bergmann
 sc/source/ui/navipi/navipi.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit efb5faa2255d0b18705e908a46d403cbe26d25d0
Author: Stephan Bergmann 
Date:   Thu Jan 11 17:20:02 2018 +0100

Add back initialization of ScNavigatorSettings::maExpandedVec

...lost with 2ea92be9973e6892727eae37ae958863702b3658 "convert SC_CONVERT
constants to scoped enum".  And indeed, e.g., opening the document from
 through 
steps 1
and 2 in a UBSan build reports a use of an uninitialized (bad-valued) bool 
in
ScNavigatorSettings::IsExpanded.

Change-Id: If0dfadc6bd8033e61e334f59b3028ab005a892cd
Reviewed-on: https://gerrit.libreoffice.org/47767
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 
(cherry picked from commit fbec01b7af438fc7409c875e59be7483772b53a2)
Reviewed-on: https://gerrit.libreoffice.org/47785
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index b980f8354ebe..e84c61e056dc 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -435,6 +435,7 @@ ScNavigatorSettings::ScNavigatorSettings()
 : mnRootSelected(ScContentId::ROOT)
 , mnChildSelected(SC_CONTENT_NOCHILD)
 {
+maExpandedVec.fill(false);
 }
 
 SFX_IMPL_CHILDWINDOWCONTEXT( ScNavigatorDialogWrapper, SID_NAVIGATOR )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


FOSDEM Wiki Page

2018-01-12 Thread Italo Vignoli
I have created a wiki page with FOSDEM related information, which is
very important especially for the social dinner on Saturday (as we have
a maximum capacity of 100 people). You are kindly requested to register
ASAP, as this year we will not accept last minute reservations (we are
sourcing the food, so we have to plan it carefully).

https://wiki.documentfoundation.org/Events/2018/FOSDEM

Please forward the wiki page address to the relevant people, if they are
not subscribed to this list.

Thanks, Italo

-- 
Italo Vignoli - it...@italovignoli.com
mobile/signal +39.348.5653829 - skype italovignoli
hangout/jabber italo.vign...@gmail.com
GPG Key ID - 0xAAB8D5C0
DB75 1534 3FD0 EA5F 56B5 FDA6 DE82 934C AAB8 D5C0
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-01-12 Thread Jochen Nitschke
 sc/inc/token.hxx  |3 ++-
 sc/source/core/tool/token.cxx |2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 6267b56f2dfcbcf5a6b30698e3ead68ce1b724e7
Author: Jochen Nitschke 
Date:   Wed Jan 10 22:11:08 2018 +0100

move implementation of ScMatrixCellResultToken copy-constructor

from header to source file.

Revert "no matching function for call to 'intrusive_ptr_add_ref'"

This reverts commit a49be6bd585ac4610cbf04ca3525f2d90a770367.

Also reverts small part of
commit fd3fc84e590fc84f62ce3bace668fe40a25f54b5

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

diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx
index 065fb2affccd..5658dd0889ce 100644
--- a/sc/inc/token.hxx
+++ b/sc/inc/token.hxx
@@ -28,7 +28,6 @@
 #include "refdata.hxx"
 #include 
 #include "scdllapi.h"
-#include "scmatrix.hxx"
 #include 
 #include 
 #include "calcmacros.hxx"
@@ -44,6 +43,7 @@ struct RangeMatrix;
 }
 
 class ScJumpMatrix;
+class ScMatrix;
 
 typedef ::std::vector< ScComplexRefData > ScRefList;
 
@@ -299,6 +299,7 @@ protected:
 formula::FormulaConstTokenRef xUpperLeft;
 public:
 ScMatrixCellResultToken( const ScConstMatrixRef& pMat, const 
formula::FormulaToken* pUL );
+ScMatrixCellResultToken( const ScMatrixCellResultToken& );
 virtual ~ScMatrixCellResultToken() override;
 virtual double  GetDouble() const override;
 virtual svl::SharedString GetString() const override;
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 9921df0517f2..6028ac2e1ab0 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1010,6 +1010,8 @@ bool ScEmptyCellToken::operator==( const FormulaToken& r 
) const
 ScMatrixCellResultToken::ScMatrixCellResultToken( const ScConstMatrixRef& 
pMat, const formula::FormulaToken* pUL ) :
 FormulaToken(formula::svMatrixCell), xMatrix(pMat), xUpperLeft(pUL) {}
 
+ScMatrixCellResultToken::ScMatrixCellResultToken( const 
ScMatrixCellResultToken& ) = default;
+
 double  ScMatrixCellResultToken::GetDouble() const  { return 
xUpperLeft->GetDouble(); }
 
 ScMatrixCellResultToken::~ScMatrixCellResultToken() {}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Caolán McNamara
 lotuswordpro/inc/lwpfrib.hxx|4 
 lotuswordpro/source/filter/lwpchangemgr.cxx |2 ++
 lotuswordpro/source/filter/lwpfrib.cxx  |   18 +-
 3 files changed, 23 insertions(+), 1 deletion(-)

New commits:
commit b39f962e0be52f0d8380e1662f88a2f627fbfb89
Author: Caolán McNamara 
Date:   Fri Jan 12 09:43:41 2018 +

ofz#5254 Bad-cast

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

diff --git a/lotuswordpro/inc/lwpfrib.hxx b/lotuswordpro/inc/lwpfrib.hxx
index 4e824c0002f4..6ff3cad39a98 100644
--- a/lotuswordpro/inc/lwpfrib.hxx
+++ b/lotuswordpro/inc/lwpfrib.hxx
@@ -97,6 +97,7 @@ public:
 OUString GetEditor();
 XFColor GetHighlightColor();
 protected:
+std::map* m_pFribMap;
 LwpPara* m_pPara;
 LwpFrib* m_pNext;
 sal_uInt8 m_nFribType;
@@ -119,6 +120,9 @@ public:
 REV_INSERT =0,
 REV_DELETE = 1,
 };
+
+void Register(std::map* pFribMap);
+void Deregister();
 private:
 static void ReadModifiers(LwpObjectStream* pObjStrm,ModifierInfo* 
pModInfo);
 protected:
diff --git a/lotuswordpro/source/filter/lwpchangemgr.cxx 
b/lotuswordpro/source/filter/lwpchangemgr.cxx
index e08ee979869d..c04241aaccb4 100644
--- a/lotuswordpro/source/filter/lwpchangemgr.cxx
+++ b/lotuswordpro/source/filter/lwpchangemgr.cxx
@@ -89,6 +89,7 @@ LwpChangeMgr::LwpChangeMgr()
 m_pFribMap = &m_DocFribMap;
 m_ChangeList.clear();
 }
+
 LwpChangeMgr::~LwpChangeMgr()
 {
 m_pFribMap=nullptr;
@@ -102,6 +103,7 @@ void LwpChangeMgr::AddChangeFrib(LwpFrib* pFrib)
 m_nCounter++;
 OUString sID = "ct"+ OUString::number(m_nCounter);
 m_pFribMap->insert(std::pair(pFrib,sID));
+pFrib->Register(m_pFribMap);
 }
 
 OUString LwpChangeMgr::GetChangeID(LwpFrib* pFrib)
diff --git a/lotuswordpro/source/filter/lwpfrib.cxx 
b/lotuswordpro/source/filter/lwpfrib.cxx
index f9b3ad759d3c..919b257be043 100644
--- a/lotuswordpro/source/filter/lwpfrib.cxx
+++ b/lotuswordpro/source/filter/lwpfrib.cxx
@@ -87,7 +87,8 @@
 
 
 LwpFrib::LwpFrib(LwpPara* pPara)
-: m_pPara(pPara)
+: m_pFribMap(nullptr)
+, m_pPara(pPara)
 , m_pNext(nullptr)
 , m_nFribType(0)
 , m_pModifiers(nullptr)
@@ -100,6 +101,7 @@ LwpFrib::LwpFrib(LwpPara* pPara)
 
 LwpFrib::~LwpFrib()
 {
+Deregister();
 }
 
 LwpFrib* LwpFrib::CreateFrib(LwpPara* pPara, LwpObjectStream* pObjStrm, 
sal_uInt8 fribtag,sal_uInt8 editID)
@@ -447,4 +449,18 @@ XFColor LwpFrib::GetHighlightColor()
 return pGlobal->GetHighlightColor(m_nEditor);
 }
 
+void LwpFrib::Register(std::map* pFribMap)
+{
+m_pFribMap = pFribMap;
+}
+
+void LwpFrib::Deregister()
+{
+if (m_pFribMap)
+{
+m_pFribMap->erase(this);
+m_pFribMap = nullptr;
+}
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Miklos Vajna
 filter/source/msfilter/msdffimp.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8eb014b45961376b3c9a01eb2b24b9620c00f777
Author: Miklos Vajna 
Date:   Fri Jan 12 08:38:53 2018 +0100

filter: fix 32bit build

Change-Id: I8959e745c0560806a6512285db7c19e4cb454bac

diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index a54ee36f8c0f..f0c98eb30faa 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3862,7 +3862,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, 
SfxItemSet& rSet, cons
 nContrast = 0;
 else
 {
-if (o3tl::checked_multiply(nContrast, 101, nContrast))  //100 
+ 1 to round
+if (o3tl::checked_multiply(nContrast, 101, 
nContrast))  //100 + 1 to round
 {
 SAL_WARN("filter.ms", "bad Contrast value:" << nContrast);
 nContrast = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Pranav Kant
 include/LibreOfficeKit/LibreOfficeKitEnums.h |6 +++---
 libreofficekit/source/gtk/lokdocview.cxx |   23 +++
 2 files changed, 26 insertions(+), 3 deletions(-)

New commits:
commit 70f874b18dcbfc9c0469f5e6ec03502e9fa3183d
Author: Pranav Kant 
Date:   Thu Dec 21 13:20:26 2017 +0530

lokdocview: Handle INVALIDATE_HEADER cb

With this calc gtktiledviewer or any other lok client shouldn't crash
anymore when a new view is opened.

And while at it, update documentation of callbacks.

Change-Id: I436c3b424dd4e2e6b8c312b0d3ba43d7006e944b
(cherry picked from commit 71cd37fad9792038279969c82e0cb209df06f024)
Reviewed-on: https://gerrit.libreoffice.org/46952
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h 
b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 300b71bb01ff..6169a53afd3c 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -498,14 +498,14 @@ typedef enum
  * The column/row header is no more valid because of a column/row insertion
  * or a similar event. Clients must query a new column/row header set.
  *
- * The payload says if we are invalidating a row or column header.
+ * The payload says if we are invalidating a row or column header. So,
+ * payload values can be: "row", "column", "all".
  */
 LOK_CALLBACK_INVALIDATE_HEADER = 33,
 /**
- * The text content of the address field in Calc.
+ * The text content of the address field in Calc. Eg: "A7"
  */
 LOK_CALLBACK_CELL_ADDRESS = 34
-
 }
 LibreOfficeKitCallbackType;
 
diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index 08e40736e6f8..d753632a9868 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -276,6 +276,7 @@ enum
 TEXT_SELECTION,
 PASSWORD_REQUIRED,
 COMMENT,
+INVALIDATE_HEADER,
 
 LAST_SIGNAL
 };
@@ -429,6 +430,8 @@ callbackTypeToString (int nType)
 return "LOK_CALLBACK_REDLINE_TABLE_SIZE_CHANGED";
 case LOK_CALLBACK_REDLINE_TABLE_ENTRY_MODIFIED:
 return "LOK_CALLBACK_REDLINE_TABLE_ENTRY_MODIFIED";
+case LOK_CALLBACK_INVALIDATE_HEADER:
+return "LOK_CALLBACK_INVALIDATE_HEADER";
 case LOK_CALLBACK_COMMENT:
 return "LOK_CALLBACK_COMMENT";
 }
@@ -1420,6 +1423,9 @@ callback (gpointer pData)
 case LOK_CALLBACK_COMMENT:
 g_signal_emit(pCallback->m_pDocView, doc_view_signals[COMMENT], 0, 
pCallback->m_aPayload.c_str());
 break;
+case LOK_CALLBACK_INVALIDATE_HEADER:
+g_signal_emit(pCallback->m_pDocView, 
doc_view_signals[INVALIDATE_HEADER], 0, pCallback->m_aPayload.c_str());
+break;
 default:
 g_assert(false);
 break;
@@ -3206,6 +3212,23 @@ static void lok_doc_view_class_init (LOKDocViewClass* 
pClass)
  g_cclosure_marshal_generic,
  G_TYPE_NONE, 1,
  G_TYPE_STRING);
+
+/**
+ * The column/row header is no more valid because of a column/row insertion
+ * or a similar event. Clients must query a new column/row header set.
+ *
+ * The payload says if we are invalidating a row or column header. So,
+ * payload values can be: "row", "column", "all".
+ */
+doc_view_signals[INVALIDATE_HEADER] =
+g_signal_new("invalidate-header",
+ G_TYPE_FROM_CLASS(pGObjectClass),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ nullptr, nullptr,
+ g_cclosure_marshal_generic,
+ G_TYPE_NONE, 1,
+ G_TYPE_STRING);
 }
 
 SAL_DLLPUBLIC_EXPORT GtkWidget*
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Miklos Vajna
 package/inc/ZipPackage.hxx   |1 +
 package/source/xstor/xfactory.cxx|7 +++
 package/source/xstor/xstorage.cxx|4 +++-
 package/source/zippackage/ZipPackage.cxx |4 +++-
 sfx2/source/doc/docfile.cxx  |9 +
 5 files changed, 23 insertions(+), 2 deletions(-)

New commits:
commit 16a522361698ea53ab253d67e31cb51802210d71
Author: Miklos Vajna 
Date:   Thu Jan 11 17:11:06 2018 +0100

ODT export: handle NoFileSync store option

SfxMedium already had a m_bDisableFileSync member; if the medium has a
storage, then forward this flag to it, so at the end
SwitchablePersistenceStream::waitForCompletion() (and the called
fileaccess::XStream_impl::waitForCompletion()) does not call
osl_syncFile(), either.

Times for 100 hello world inputs: 12594 -> 5281 ms is spent in XHTML-load + 
ODT
export + close (42% of original).

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

diff --git a/package/inc/ZipPackage.hxx b/package/inc/ZipPackage.hxx
index f46eb33b0172..1cb3ba7836f5 100644
--- a/package/inc/ZipPackage.hxx
+++ b/package/inc/ZipPackage.hxx
@@ -99,6 +99,7 @@ class ZipPackage final : public cppu::WeakImplHelper
 const css::uno::Reference < css::uno::XComponentContext > m_xContext;
 
 std::unique_ptr m_pZipFile;
+bool m_bDisableFileSync = false;
 
 bool isLocalFile() const;
 
diff --git a/package/source/xstor/xfactory.cxx 
b/package/source/xstor/xfactory.cxx
index 58cff685cd06..1feb44a84e21 100644
--- a/package/source/xstor/xfactory.cxx
+++ b/package/source/xstor/xfactory.cxx
@@ -223,6 +223,13 @@ uno::Reference< uno::XInterface > SAL_CALL 
OStorageFactory::createInstanceWithAr
 else
 throw lang::IllegalArgumentException( THROW_WHERE, 
uno::Reference< uno::XInterface >(), 1 );
 }
+else if (aDescr[nInd].Name == "NoFileSync")
+{
+// Forward NoFileSync to the storage.
+aPropsToSet.realloc(++nNumArgs);
+aPropsToSet[nNumArgs - 1].Name = aDescr[nInd].Name;
+aPropsToSet[nNumArgs - 1].Value = aDescr[nInd].Value;
+}
 else
 OSL_FAIL( "Unacceptable property, will be ignored!" );
 }
diff --git a/package/source/xstor/xstorage.cxx 
b/package/source/xstor/xstorage.cxx
index 66678d7c378d..21567b8eb2a5 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -429,8 +429,10 @@ void OStorage_Impl::OpenOwnPackage()
 for ( sal_Int32 aInd = 0; aInd < m_xProperties.getLength(); aInd++ 
)
 {
 if ( m_xProperties[aInd].Name == "RepairPackage"
-  || m_xProperties[aInd].Name == "ProgressHandler" )
+  || m_xProperties[aInd].Name == "ProgressHandler"
+  || m_xProperties[aInd].Name == "NoFileSync" )
 {
+// Forward these to the package.
 beans::NamedValue aNamedValue( m_xProperties[aInd].Name,
 m_xProperties[aInd].Value 
);
 aArguments.realloc( ++nArgNum );
diff --git a/package/source/zippackage/ZipPackage.cxx 
b/package/source/zippackage/ZipPackage.cxx
index 3ea75dc409d4..ffb9cf1e8775 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -681,6 +681,8 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< 
Any >& aArguments )
 aNamedValue.Value >>= m_bAllowRemoveOnInsert;
 m_xRootFolder->setRemoveOnInsertMode_Impl( 
m_bAllowRemoveOnInsert );
 }
+else if (aNamedValue.Name == "NoFileSync")
+aNamedValue.Value >>= m_bDisableFileSync;
 
 // for now the progress handler is not used, probably it will 
never be
 // if ( aNamedValue.Name == "ProgressHandler" )
@@ -1253,7 +1255,7 @@ uno::Reference< io::XInputStream > 
ZipPackage::writeTempFile()
 // in case the stream is based on a file it will implement the 
following interface
 // the call should be used to be sure that the contents are 
written to the file system
 uno::Reference< io::XAsyncOutputMonitor > asyncOutputMonitor( 
xTempOut, uno::UNO_QUERY );
-if ( asyncOutputMonitor.is() )
+if (asyncOutputMonitor.is() && !m_bDisableFileSync)
 asyncOutputMonitor->waitForCompletion();
 
 // no need to postpone switching to the new stream since the 
target was written directly
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 92f0665110af..865fc60a0b71 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/do

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

2018-01-12 Thread Pranav Kant
 libreofficekit/source/gtk/lokdocview.cxx |   42 ++-
 1 file changed, 20 insertions(+), 22 deletions(-)

New commits:
commit 4ed5f5b28aaaf4522b71f32fb2f9f6a960dbff69
Author: Pranav Kant 
Date:   Thu Dec 21 12:47:52 2017 +0530

lokdocview: use std::string where possible

This also prevents an invalid memory access: we were storing the pointer
to a temporary in the struct and then using it after temporary was gone.

Change-Id: I2b6d9df16bc24b222095ccbf45c9f0bd9c86ed65
(cherry picked from commit 9d2e0d60c0381a4bb23fada14c80e032b68bf2a8)
Reviewed-on: https://gerrit.libreoffice.org/46951
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index d753632a9868..ac050be82962 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -77,9 +77,9 @@ struct ViewRectangles
 /// Private struct used by this GObject type
 struct LOKDocViewPrivateImpl
 {
-const gchar* m_aLOPath;
-const gchar* m_pUserProfileURL;
-const gchar* m_aDocPath;
+std::string m_aLOPath;
+std::string m_aUserProfileURL;
+std::string m_aDocPath;
 std::string m_aRenderingArguments;
 gdouble m_nLoadProgress;
 gboolean m_bIsLoading;
@@ -193,10 +193,7 @@ struct LOKDocViewPrivateImpl
 std::map m_aViewLockRectangles;
 
 LOKDocViewPrivateImpl()
-: m_aLOPath(nullptr),
-m_pUserProfileURL(nullptr),
-m_aDocPath(nullptr),
-m_nLoadProgress(0),
+: m_nLoadProgress(0),
 m_bIsLoading(false),
 m_bCanZoomIn(true),
 m_bCanZoomOut(true),
@@ -1763,7 +1760,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
 if (priv->m_bEdit && priv->m_bCursorVisible && 
!isEmptyRectangle(priv->m_aVisibleCursor) && 
priv->m_aTextSelectionRectangles.empty())
 {
 // Have a cursor, but no selection: we need the middle handle.
-gchar* handleMiddlePath = g_strconcat (priv->m_aLOPath, 
CURSOR_HANDLE_DIR, "handle_image_middle.png", nullptr);
+gchar* handleMiddlePath = g_strconcat (priv->m_aLOPath.c_str(), 
CURSOR_HANDLE_DIR, "handle_image_middle.png", nullptr);
 if (!priv->m_pHandleMiddle)
 {
 priv->m_pHandleMiddle = 
cairo_image_surface_create_from_png(handleMiddlePath);
@@ -1791,7 +1788,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
 if (!isEmptyRectangle(priv->m_aTextSelectionStart))
 {
 // Have a start position: we need a start handle.
-gchar* handleStartPath = g_strconcat (priv->m_aLOPath, 
CURSOR_HANDLE_DIR, "handle_image_start.png", nullptr);
+gchar* handleStartPath = g_strconcat (priv->m_aLOPath.c_str(), 
CURSOR_HANDLE_DIR, "handle_image_start.png", nullptr);
 if (!priv->m_pHandleStart)
 {
 priv->m_pHandleStart = 
cairo_image_surface_create_from_png(handleStartPath);
@@ -1803,7 +1800,7 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
 if (!isEmptyRectangle(priv->m_aTextSelectionEnd))
 {
 // Have a start position: we need an end handle.
-gchar* handleEndPath = g_strconcat (priv->m_aLOPath, 
CURSOR_HANDLE_DIR, "handle_image_end.png", nullptr);
+gchar* handleEndPath = g_strconcat (priv->m_aLOPath.c_str(), 
CURSOR_HANDLE_DIR, "handle_image_end.png", nullptr);
 if (!priv->m_pHandleEnd)
 {
 priv->m_pHandleEnd = 
cairo_image_surface_create_from_png(handleEndPath);
@@ -2234,7 +2231,7 @@ openDocumentInThread (gpointer data)
 }
 
 priv->m_pOffice->pClass->registerCallback(priv->m_pOffice, 
globalCallbackWorker, pDocView);
-priv->m_pDocument = priv->m_pOffice->pClass->documentLoad( 
priv->m_pOffice, priv->m_aDocPath );
+priv->m_pDocument = priv->m_pOffice->pClass->documentLoad( 
priv->m_pOffice, priv->m_aDocPath.c_str() );
 if ( !priv->m_pDocument )
 {
 char *pError = priv->m_pOffice->pClass->getError( priv->m_pOffice );
@@ -2497,16 +2494,17 @@ static void lok_doc_view_set_property (GObject* object, 
guint propId, const GVal
 switch (propId)
 {
 case PROP_LO_PATH:
-priv->m_aLOPath = g_value_dup_string (value);
+priv->m_aLOPath = g_value_get_string (value);
 break;
 case PROP_LO_POINTER:
 priv->m_pOffice = 
static_cast(g_value_get_pointer(value));
 break;
 case PROP_USER_PROFILE_URL:
-priv->m_pUserProfileURL = g_value_dup_string(value);
+if (const gchar* pUserProfile = g_value_get_string(value))
+priv->m_aUserProfileURL = pUserProfile;
 break;
 case PROP_DOC_PATH:
-priv->m_aDocPath = g_value_dup_string (value);
+priv->m_aDocPath = g_value_get_string (value);
 break;
 case PROP_DOC_POINTER:
 priv->m_pDocument = 
static_cast(g_value_get_pointer(value));
@@ -2558,16 +

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

2018-01-12 Thread Stephan Bergmann
 include/tools/stream.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ef22c4a0a99be5d2903fb9e9d09fc852cd791173
Author: Stephan Bergmann 
Date:   Fri Jan 12 09:42:05 2018 +0100

new[] vs. delete mismatch

...after e57a036939e27ecd173ace691689e26a6a33df8e "loplugin:useuniqueptr in
tools,stoc,unotools"

Change-Id: Ifb9a3a5f37895aa75edc7f4e90e8cfe47d79bca7

diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index cb211ddba607..bcc22137174a 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -144,7 +144,7 @@ private:
 sal_uInt64  m_nActPos;
 
 // buffer management
-std::unique_ptr
+std::unique_ptr
 m_pRWBuf; ///< Points to read/write buffer
 sal_uInt8*  m_pBufPos;///< m_pRWBuf + m_nBufActualPos
 sal_uInt16  m_nBufSize;   ///< Allocated size of buffer
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread Miklos Vajna
 include/filter/msfilter/mstoolbar.hxx |   15 ---
 1 file changed, 15 deletions(-)

New commits:
commit 2cd6c4fb990a01ce476bf2e077836945ef59516c
Author: Miklos Vajna 
Date:   Thu Jan 11 23:15:22 2018 +0100

filter: fix dbglevel=2 build of msfilter

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

diff --git a/include/filter/msfilter/mstoolbar.hxx 
b/include/filter/msfilter/mstoolbar.hxx
index 076ec6567738..6b2f923247dd 100644
--- a/include/filter/msfilter/mstoolbar.hxx
+++ b/include/filter/msfilter/mstoolbar.hxx
@@ -148,9 +148,6 @@ class MSFILTER_DLLPUBLIC TBCGeneralInfo  : public TBBase
 public:
 TBCGeneralInfo();
 bool Read(SvStream &rS) override;
-#if OSL_DEBUG_LEVEL > 1
-virtual void Print( FILE* ) override;
-#endif
 void ImportToolBarControlData( CustomToolBarImportHelper&, std::vector< 
css::beans::PropertyValue >& );
 OUString const & CustomText() { return customText.getString(); }
 };
@@ -178,9 +175,6 @@ class MSFILTER_DLLPUBLIC TBCMenuSpecific : public TBBase
 public:
 TBCMenuSpecific();
 bool Read(SvStream &rS) override;
-#if OSL_DEBUG_LEVEL > 1
-virtual void Print( FILE* ) override;
-#endif
 OUString Name();
 };
 
@@ -198,9 +192,6 @@ public:
 TBCCDData();
 virtual ~TBCCDData() override;
 bool Read(SvStream &rS) override;
-#if OSL_DEBUG_LEVEL > 1
-virtual void Print( FILE* ) override;
-#endif
 };
 
 class TBCComboDropdownSpecific : public TBBase
@@ -209,9 +200,6 @@ class TBCComboDropdownSpecific : public TBBase
 public:
 TBCComboDropdownSpecific( const TBCHeader& header );
 bool Read(SvStream &rS) override;
-#if OSL_DEBUG_LEVEL > 1
-virtual void Print( FILE* ) override;
-#endif
 };
 
 class TBCBSpecific :  public TBBase
@@ -225,9 +213,6 @@ class TBCBSpecific :  public TBBase
 public:
 TBCBSpecific();
 bool Read(SvStream &rS) override;
-#if OSL_DEBUG_LEVEL > 1
-virtual void Print( FILE* ) override;
-#endif
 // #TODO just add a getGraphic member here
 TBCBitMap* getIcon();
 TBCBitMap* getIconMask();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: is _lo_get_constructor_map and _lo_get_factory_map processor dependent ?

2018-01-12 Thread Stephan Bergmann

On 01/11/2018 09:29 PM, jan iversen wrote:
During today (updated master early evening) I started getting strange 
linker errors:


When linking for ARM64 with or without debug I get:

Undefined symbols for architecture arm64:

   "_lo_get_constructor_map", referenced from:

       cppuhelper::detail::loadSharedLibComponentFactory(rtl::OUString 
const&, rtl::OUString const&, rtl::OUString const&, rtl::OUString 
const&, rtl::OUString const&, 
com::sun::star::uno::Reference 
const&, std::__1::function(com::sun::star::uno::XComponentContext*, 
com::sun::star::uno::Sequence const&)>*, 
com::sun::star::uno::Reference*) in Kit.o


   "_lo_get_factory_map", referenced from:

       cppuhelper::detail::loadSharedLibComponentFactory(rtl::OUString 
const&, rtl::OUString const&, rtl::OUString const&, rtl::OUString 
const&, rtl::OUString const&, 
com::sun::star::uno::Reference 
const&, std::__1::function(com::sun::star::uno::XComponentContext*, 
com::sun::star::uno::Sequence const&)>*, 
com::sun::star::uno::Reference*)



When I link for X86_64 it works fine.


Definitions for those functions are generated by bin/native-code.py.  I 
do see uses of that (and of the generated native-code.h) in module ios 
(but have no further insight into that module).

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


[Libreoffice-commits] online.git: loolkitconfig.xcu

2018-01-12 Thread Pranav Kant
 loolkitconfig.xcu |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 57387bf2b42caca704b3df30045d33e295f202ea
Author: Pranav Kant 
Date:   Fri Jan 12 18:39:34 2018 +0530

loolkitconfig.xcu: /home is only available in debug builds, not release

... so the problem as mentioned in
831c79c0acbca6a7053080061b14381640c4abb7 was only fixed for debug
builds.

Change-Id: I549a4765af558a7969e5a96717b36612bd89f22b

diff --git a/loolkitconfig.xcu b/loolkitconfig.xcu
index ae2cd1ed..a80508aa 100644
--- a/loolkitconfig.xcu
+++ b/loolkitconfig.xcu
@@ -11,6 +11,6 @@
 false
 
 
-file:///home
+file:///tmp
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-12 Thread jan Iversen
 include/LibreOfficeKit/LibreOfficeKitInit.h |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 2a80ce62d373d734db26741858b4bee1c3994564
Author: jan Iversen 
Date:   Fri Jan 12 14:03:55 2018 +0100

Repair windows build break.

Forgot to isolate extern declaration, mac/linux had no problem,
but windows breaks.

Change-Id: Ib09119661225193d9cfb1cd9118b78cf7d9bd2f4

diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h 
b/include/LibreOfficeKit/LibreOfficeKitInit.h
index f33a9868cf26..69316f524130 100644
--- a/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -244,8 +244,10 @@ typedef LibreOfficeKit *(LokHookFunction2)( const char 
*install_path, const char
 
 typedef int (LokHookPreInit)  ( const char *install_path, const 
char *user_profile_url );
 
+#if defined(IOS)
 extern __attribute__ ((visibility("default")))
 LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const 
char* user_profile_path);
+#endif
 
 static LibreOfficeKit *lok_init_2( const char *install_path,  const char 
*user_profile_url )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/vmiklos/mm-embedding-5.0' - 0 commits -

2018-01-12 Thread Unknown
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Makefile.in solenv/gbuild

2018-01-12 Thread Stephan Bergmann
 Makefile.in|1 +
 solenv/gbuild/SdiTarget.mk |1 +
 2 files changed, 2 insertions(+)

New commits:
commit 777a05b09c79661191181f002db3a3cb9e14c6e0
Author: Stephan Bergmann 
Date:   Fri Jan 12 10:03:55 2018 +0100

Support `make SdiTarget_...`

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

diff --git a/Makefile.in b/Makefile.in
index 08476e14fd49..006c98c3f41a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -152,6 +152,7 @@ gbuild_TARGETS := AllLangHelp \
Pyuno \
PythonTest \
Rdb \
+   SdiTarget \
StaticLibrary \
UIConfig \
UITest \
diff --git a/solenv/gbuild/SdiTarget.mk b/solenv/gbuild/SdiTarget.mk
index c76ef691d696..5821ed8950bf 100644
--- a/solenv/gbuild/SdiTarget.mk
+++ b/solenv/gbuild/SdiTarget.mk
@@ -69,6 +69,7 @@ ifeq ($(gb_FULLDEPS),$(true))
 -include $(call gb_SdiTarget_get_dep_target,$(1))
 $(call gb_SdiTarget_get_dep_target,$(1)) :| $(dir $(call 
gb_SdiTarget_get_dep_target,$(1))).dir
 endif
+$(call gb_Helper_make_userfriendly_targets,$(1),SdiTarget)
 endef
 
 define gb_SdiTarget_set_include
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - loleaflet/dist

2018-01-12 Thread Pranav Kant
 loleaflet/dist/loleaflet.css |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 6335fa68613248ab16bc50f2c47d88e8b824b900
Author: Pranav Kant 
Date:   Fri Jan 12 18:19:50 2018 +0530

loleaflet: Don't allow selecting the dialog canvas

Change-Id: I8c88183f0fbb29b5cd815240105153b71c5eb2ce

diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css
index c158f0f5..b4974c54 100644
--- a/loleaflet/dist/loleaflet.css
+++ b/loleaflet/dist/loleaflet.css
@@ -352,4 +352,9 @@ body {
 cursor: default;
 display: block; /* required to remove all borders around canvas 
element */
 caret-color: transparent; /* firefox shows a caret otherwise on 
top-left of the canvas */
+user-select: none;
+-moz-user-select: none;
+-khtml-user-select: none;
+-webkit-user-select: none;
+-o-user-select: none;
 }
commit f44639eca485b5d4fd4a8211075500f61259263b
Author: Pranav Kant 
Date:   Fri Jan 12 18:14:16 2018 +0530

loleaflet: hide the caret on dialog canvas

Otherwise, on firefox, when the dialog canvas has the focus, a caret
different from the one overlayed by LOK, is shown.

Change-Id: Ie38aae59f01a3811becca0bcf50c9d7d240bfa9b

diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css
index 5230e2df..c158f0f5 100644
--- a/loleaflet/dist/loleaflet.css
+++ b/loleaflet/dist/loleaflet.css
@@ -351,4 +351,5 @@ body {
 .lokdialog_canvas {
 cursor: default;
 display: block; /* required to remove all borders around canvas 
element */
+caret-color: transparent; /* firefox shows a caret otherwise on 
top-left of the canvas */
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - desktop/source include/LibreOfficeKit ios/source

2018-01-12 Thread jan Iversen
 desktop/source/lib/init.cxx |2 +-
 include/LibreOfficeKit/LibreOfficeKitInit.h |   19 +++
 ios/source/LibreOfficeKit.c |6 --
 3 files changed, 12 insertions(+), 15 deletions(-)

New commits:
commit e25d7cc9052cddbaed24cea8a2ea88d8d785d083
Author: jan Iversen 
Date:   Fri Jan 12 13:11:33 2018 +0100

iOS, removed hook reference

Change-Id: I9a9d9613313ac8d0e611f4d7f766c42ab71963e1

diff --git a/ios/source/LibreOfficeKit.c b/ios/source/LibreOfficeKit.c
index e9344ca89a2c..b403b356d171 100644
--- a/ios/source/LibreOfficeKit.c
+++ b/ios/source/LibreOfficeKit.c
@@ -18,12 +18,6 @@
 #include "native-code.h"
 
 
-// Force reference to libreofficekit_hook
-extern __attribute__((used))
-LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* 
user_profile_path);
-static __attribute__((used))
-LibreOfficeKit *(*foop)(const char *, const char *) = libreofficekit_hook_2;
-
 // pointers to our instance
 static LibreOfficeKit* kit;
 static LibreOfficeKitDocument* document;
commit 162ea65aae8addf606d62bd4cace5c9246002964
Author: jan Iversen 
Date:   Fri Jan 12 13:08:59 2018 +0100

iOS, stop trying to do dynamic load in init()

LibreOfficeKit, tries traditionally to load a dylib, and
locate the symbols, for iOS this is already linked to a
single Kit.o.

Code is changed to a simple call

Change-Id: Ie94a447260cb3007e7e2b56c1b67896ad40d79d3

diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h 
b/include/LibreOfficeKit/LibreOfficeKitInit.h
index a0c111a9e0e2..f33a9868cf26 100644
--- a/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -68,7 +68,6 @@ extern "C"
 {
 (void)pPath;
 }
-#endif // IOS
 
 static void *lok_dlsym(void *Hnd, const char *pName)
 {
@@ -79,6 +78,7 @@ extern "C"
 {
 return dlclose(Hnd);
 }
+#endif // IOS
 
 
 #else
@@ -165,12 +165,12 @@ extern "C"
 }
 #endif
 
+#if !defined(IOS)
 static void *lok_dlopen( const char *install_path, char ** _imp_lib )
 {
 char *imp_lib;
 void *dlhandle;
 
-#if !defined(IOS)
 size_t partial_length, imp_lib_size;
 struct stat dir_st;
 
@@ -233,14 +233,10 @@ static void *lok_dlopen( const char *install_path, char 
** _imp_lib )
 return NULL;
 }
 }
-#else
-(void)install_path;
-imp_lib = strdup("the app executable");
-dlhandle = RTLD_MAIN_ONLY;
-#endif
 *_imp_lib = imp_lib;
 return dlhandle;
 }
+#endif
 
 typedef LibreOfficeKit *(LokHookFunction)( const char *install_path);
 
@@ -248,10 +244,14 @@ typedef LibreOfficeKit *(LokHookFunction2)( const char 
*install_path, const char
 
 typedef int (LokHookPreInit)  ( const char *install_path, const 
char *user_profile_url );
 
+extern __attribute__ ((visibility("default")))
+LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const 
char* user_profile_path);
+
 static LibreOfficeKit *lok_init_2( const char *install_path,  const char 
*user_profile_url )
 {
-char *imp_lib;
+#if !defined(IOS)
 void *dlhandle;
+char *imp_lib;
 LokHookFunction *pSym;
 LokHookFunction2 *pSym2;
 
@@ -288,6 +288,9 @@ static LibreOfficeKit *lok_init_2( const char 
*install_path,  const char *user_p
 // dlhandle is "leaked"
 // coverity[leaked_storage]
 return pSym2( install_path, user_profile_url );
+#else
+return libreofficekit_hook_2( install_path, user_profile_url );
+#endif
 }
 
 static
commit 433063362df51e4b3e128f3c913070629793f148
Author: jan Iversen 
Date:   Fri Jan 12 13:06:37 2018 +0100

iOS, correct rc file name

the rc is called fundamentalrc and not sofficerc

Now it is getting loaded.

Change-Id: Id0aab9609f8499e194b21e2d8afa74525a5a1c62

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 7b97d1beeca0..99c3f997ae68 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3438,7 +3438,7 @@ static bool initialize_uno(const OUString& aAppProgramURL)
 {
 #ifdef IOS
 // For iOS we already hardcode the inifile as "rc" in the .app directory.
-rtl::Bootstrap::setIniFilename(aAppProgramURL + "/" 
SAL_CONFIGFILE("soffice"));
+rtl::Bootstrap::setIniFilename(aAppProgramURL + "/" 
SAL_CONFIGFILE("fundamental"));
 xContext = cppu::defaultBootstrap_InitialComponentContext(aAppProgramURL + 
"/rc");
 #elif defined MACOSX
 rtl::Bootstrap::setIniFilename(aAppProgramURL + "/../Resources/" 
SAL_CONFIGFILE("soffice"));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: is _lo_get_constructor_map and _lo_get_factory_map processor dependent ?

2018-01-12 Thread Miklos Vajna
Hi,

On Thu, Jan 11, 2018 at 08:29:41PM +, jan iversen  
wrote:
> Undefined symbols for architecture arm64:
> 
>   "_lo_get_constructor_map", referenced from:

Did you forgot to include the result of solenv/bin/native-code.py in
the linker input?

Regards,

Miklos


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