[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - xmlsecurity/inc xmlsecurity/Library_xmlsecurity.mk xmlsecurity/qa xmlsecurity/source

2016-12-01 Thread Miklos Vajna
 xmlsecurity/Library_xmlsecurity.mk|1 
 xmlsecurity/inc/sigstruct.hxx |3 
 xmlsecurity/qa/unit/pdfsigning/data/cr-comment.pdf| 4480 ++
 xmlsecurity/qa/unit/pdfsigning/data/dict-bool.pdf |binary
 xmlsecurity/qa/unit/pdfsigning/data/good-non-detached.pdf |binary
 xmlsecurity/qa/unit/pdfsigning/data/no-eof.pdf|binary
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |   68 
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx|3 
 xmlsecurity/source/pdfio/pdfdocument.cxx  |  257 
 9 files changed, 4794 insertions(+), 18 deletions(-)

New commits:
commit 1a567a548bc369551abdfcb4016dcd8d1ae0b85e
Author: Miklos Vajna 
Date:   Wed Nov 30 17:00:58 2016 +0100

xmlsecurity PDF verify: various fixes

This is a combination of 6 commits:

1) xmlsecurity PDF verify: look for the signingCertificateV2 attribute

This is a required part of the PAdES spec, but so far we only wrote it.
As a start just expose if the attribute exists or not.

(cherry picked from commit bef9ba5e062b340b1835db94620f7ea4fa0b123b)

2) xmlsecurity: don't write unchanged signatures back to the file

It's not useful, OTOH it can happen that something goes wrong and the
result does not match the original.

One situation when this can happen is when non-XAdES signatures are
read, but the checkbox to write XAdES signature is enabled.

(cherry picked from commit 7226ee0586191a495f427c2adbde68b1a47d2dbc)

3) xmlsecurity PDF verify: support non-detached signatures

And a couple of other changes to accept the bugdoc from
.

(cherry picked from commit 055fd58711d57af4d96214aebd71b713303d5527)

4) xmlsecurity PDF verify: tolerate missing %%EOF in incremental updates

This is broken, but work it around to avoid an infinite loop.

(cherry picked from commit 0233ff952372e9a15edf92beccba463d74c46c33)

5) xmlsecurity PDF verify: CR is also a terminator of a comment

If we skip to the first NL, then we start tokenizing some XML as PDF
data and soon error out due to an unexpected keyword.

(cherry picked from commit 9b526a43e10a565875c879063f6df4bfe2ba9a80)

6) xmlsecurity PDF verify: handle boolean type as dictionary value

This caused not finding the length of a stream -> could not actually
verify signature.

(cherry picked from commit c623a9f846c713b19a0d58337af4f4354aeffa6e)

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

diff --git a/xmlsecurity/Library_xmlsecurity.mk 
b/xmlsecurity/Library_xmlsecurity.mk
index 487011f..b84c691 100644
--- a/xmlsecurity/Library_xmlsecurity.mk
+++ b/xmlsecurity/Library_xmlsecurity.mk
@@ -81,6 +81,7 @@ $(eval $(call gb_Library_add_defs,xmlsecurity,\
 ))
 $(eval $(call gb_Library_use_externals,xmlsecurity,\
 nss3 \
+plc4 \
 ))
 endif # BUILD_TYPE=DESKTOP
 endif
diff --git a/xmlsecurity/inc/sigstruct.hxx b/xmlsecurity/inc/sigstruct.hxx
index ab455d5..c217352 100644
--- a/xmlsecurity/inc/sigstruct.hxx
+++ b/xmlsecurity/inc/sigstruct.hxx
@@ -104,12 +104,15 @@ struct SignatureInformation
 css::uno::Sequence aSignatureBytes;
 /// For PDF: digest format, from css::xml::crypto::DigestID
 sal_Int32 nDigestID;
+/// For PDF: has id-aa-signingCertificateV2 as a signed attribute.
+bool bHasSigningCertificate;
 
 SignatureInformation( sal_Int32 nId )
 {
 nSecurityId = nId;
 nStatus = css::xml::crypto::SecurityOperationStatus_UNKNOWN;
 nDigestID = 0;
+bHasSigningCertificate = false;
 }
 };
 
diff --git a/xmlsecurity/qa/unit/pdfsigning/data/cr-comment.pdf 
b/xmlsecurity/qa/unit/pdfsigning/data/cr-comment.pdf
new file mode 100644
index 000..b1aae07
--- /dev/null
+++ b/xmlsecurity/qa/unit/pdfsigning/data/cr-comment.pdf
@@ -0,0 +1,4480 @@
+%PDF-1.4
%âãÏÓ
+1 0 obj
<>>>
endobj
2 0 obj
<>stream
+
+
+   http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
+  http://ns.adobe.com/xap/1.0/mm/";
+xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#";
+xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#";
+xmlns:stMfs="http://ns.adobe.com/xap/1.0/sType/ManifestItem#";>
+ 
uuid:e7f483a2-dbf7-4046-8848-508b776dd738
+ 
xmp.did:89321C534E266811A613EDAC20FB34D2
+ 
adobe:docid:indd:924fbc79-cadb-11de-af61-e97e2740acd1
+ proof:pdf
+ 
+
xmp.iid:88321C534E266811A613EDAC20FB34D2
+
adobe:docid:indd:924fbc79-cadb-11de-af61-e97e2740acd1
+
adobe:docid:indd:924fbc79-cadb-11de-af61-e97e2740acd1
+default
+

[Libreoffice-commits] online.git: common/Session.cpp common/UnitHTTP.hpp

2016-12-01 Thread Miklos Vajna
 common/Session.cpp  |1 -
 common/UnitHTTP.hpp |1 -
 2 files changed, 2 deletions(-)

New commits:
commit dd1dbaa7370c8d71d03499dc5ea160301ee3160e
Author: Miklos Vajna 
Date:   Fri Dec 2 08:16:40 2016 +0100

common: clean up redundant initializers for members

Change-Id: I7ee177acdc2521bc5b2d9fd0b0d3fa4947d6f2e2

diff --git a/common/Session.cpp b/common/Session.cpp
index 36bf79c..e1a3f36 100644
--- a/common/Session.cpp
+++ b/common/Session.cpp
@@ -60,7 +60,6 @@ LOOLSession::LOOLSession(const std::string& id, const Kind 
kind,
 _isActive(true),
 _lastActivityTime(std::chrono::steady_clock::now()),
 _isCloseFrame(false),
-_mutex(),
 _docPassword(""),
 _haveDocPassword(false),
 _isDocPasswordProtected(false)
diff --git a/common/UnitHTTP.hpp b/common/UnitHTTP.hpp
index 7765e47..e70af89 100644
--- a/common/UnitHTTP.hpp
+++ b/common/UnitHTTP.hpp
@@ -74,7 +74,6 @@ public:
 UnitHTTPServerRequest(UnitHTTPServerResponse& inResponse,
   const std::string& uri) :
 _response(inResponse),
-_clientAddress(),
 _serverAddress(MasterPortNumber)
 {
 setURI(uri);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


New Defects reported by Coverity Scan for LibreOffice

2016-12-01 Thread scan-admin

Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

4 new defect(s) introduced to LibreOffice found with Coverity Scan.
8 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent 
build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 4 of 4 defect(s)


** CID 1396676:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/unoobj/styleuno.cxx: 956 in ScStyleObj::ScStyleObj(ScDocShell *, 
SfxStyleFamily, const rtl::OUString &)()



*** CID 1396676:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/unoobj/styleuno.cxx: 956 in ScStyleObj::ScStyleObj(ScDocShell *, 
SfxStyleFamily, const rtl::OUString &)()
950 aStyleName( rName )
951 {
952 //  pDocShell ist Null, wenn per ServiceProvider erzeugt
953 
954 if (pDocShell)
955 pDocShell->GetDocument().AddUnoObject(*this);
>>> CID 1396676:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "pStyle_cached" is not initialized in this 
>>> constructor nor in any functions that it calls.
956 }
957 
958 void ScStyleObj::InitDoc( ScDocShell* pNewDocSh, const OUString& 
rNewName )
959 {
960 if ( pNewDocSh && !pDocShell )
961 {

** CID 1396675:  Null pointer dereferences  (NULL_RETURNS)
/vcl/unx/generic/fontmanager/fontmanager.cxx: 972 in 
psp::PrintFontManager::getFontFaceNumber(int) const()



*** CID 1396675:  Null pointer dereferences  (NULL_RETURNS)
/vcl/unx/generic/fontmanager/fontmanager.cxx: 972 in 
psp::PrintFontManager::getFontFaceNumber(int) const()
966 }
967 
968 int PrintFontManager::getFontFaceNumber( fontID nFontID ) const
969 {
970 int nRet = 0;
971 PrintFont* pFont = getFont( nFontID );
>>> CID 1396675:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a null pointer "pFont".
972 nRet = pFont->m_nCollectionEntry;
973 if (nRet < 0)
974 nRet = 0;
975 return nRet;
976 }
977 

** CID 1396674:(DEADCODE)
/vcl/unx/generic/print/genpspgraphics.cxx: 608 in 
GenPspGraphics::DrawTextLayout(const CommonSalLayout &)()
/vcl/unx/generic/print/genpspgraphics.cxx: 619 in 
GenPspGraphics::DrawTextLayout(const CommonSalLayout &)()



*** CID 1396674:(DEADCODE)
/vcl/unx/generic/print/genpspgraphics.cxx: 608 in 
GenPspGraphics::DrawTextLayout(const CommonSalLayout &)()
602 long nUnitsPerPixel = rLayout.GetUnitsPerPixel();
603 const sal_Unicode* pText = nullptr;
604 int nMinCharPos = 0;
605 int nMaxCharPos = 0;
606 for( int nStart = 0;; )
607 {
>>> CID 1396674:(DEADCODE)
>>> Execution cannot reach the expression "aCharPosAry" inside this 
>>> statement: "nGlyphCount = rLayout->GetN...".
608 int nGlyphCount = rLayout.GetNextGlyphs( nMaxGlyphs, aGlyphAry, 
aPos, nStart, aWidthAry, pText ? aCharPosAry : nullptr );
609 if( !nGlyphCount )
610 break;
611 
612 DeviceCoordinate nXOffset = 0;
613 for( int i = 0; i < nGlyphCount; ++i )
/vcl/unx/generic/print/genpspgraphics.cxx: 619 in 
GenPspGraphics::DrawTextLayout(const CommonSalLayout &)()
613 for( int i = 0; i < nGlyphCount; ++i )
614 {
615 nXOffset += aWidthAry[ i ];
616 aIdxAry[ i ] = nXOffset / nUnitsPerPixel;
617 sal_GlyphId aGlyphId = aGlyphAry[i] & (GF_IDXMASK | 
GF_ROTMASK);
618 if( pText )
>>> CID 1396674:(DEADCODE)
>>> Execution cannot reach the expression "aUnicodes[i]" inside this 
>>> statement: "aUnicodes[i] = ((aCharPosAr...".
619 aUnicodes[i] = (aCharPosAry[i] >= nMinCharPos && 
aCharPosAry[i] <= nMaxCharPos) ? pText[ aCharPosAry[i] ] : 0;
620 else
621 aUnicodes[i] = 0;
622 aGlyphAry[i] = aGlyphId;
623 }
624 

** CID 1396673:  Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/shells/annotsh.cxx: 1537 in 
SwAnnotationShell::ExecUndo(SfxRequest &)()



*** CID 1396673:  Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/shells/annotsh.cxx: 1537 in 
SwAnnotationShell::ExecUndo(SfxRequest &)()
1531 
1532 break;
1533 }
1534 
1535 case SID_REDO:
1536 {
>>> CID 1396673:  Error handling issues  (CHECKED_RETURN)
>>> Calling "GetFirstRedoInfo" without checking return value (as is done 
>>> elsewhere 5 out of 6 times).
1537 

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

2016-12-01 Thread Julien Nabet
 xmloff/source/draw/shapeimport.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 793ca1688ffa07b377d9e93b6ed0aa34cb0df30d
Author: Julien Nabet 
Date:   Thu Dec 1 21:16:45 2016 +0100

Remove dup line in aGroupShapeElemTokenMap (xmloff)

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

diff --git a/xmloff/source/draw/shapeimport.cxx 
b/xmloff/source/draw/shapeimport.cxx
index 121ab34..2016393 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -189,7 +189,6 @@ const SvXMLTokenMap& 
XMLShapeImportHelper::GetGroupShapeElemTokenMap()
 { XML_NAMESPACE_DR3D,   XML_SCENE,  
XML_TOK_GROUP_3DSCENE   },
 
 { XML_NAMESPACE_DRAW,   XML_FRAME,  
XML_TOK_GROUP_FRAME },
-{ XML_NAMESPACE_DRAW,   XML_CUSTOM_SHAPE,   
XML_TOK_GROUP_CUSTOM_SHAPE  },
 
 { XML_NAMESPACE_DRAW,   XML_CUSTOM_SHAPE,   
XML_TOK_GROUP_CUSTOM_SHAPE  },
 { XML_NAMESPACE_OFFICE, XML_ANNOTATION, 
XML_TOK_GROUP_ANNOTATION},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Julien Nabet
 sw/source/core/doc/DocumentFieldsManager.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 12c75e0c3393044438bfa2c92c3f9b29d443021e
Author: Julien Nabet 
Date:   Fri Dec 2 07:25:20 2016 +0100

-Werror=maybe-uninitialized

Change-Id: I28804bb7b668d5c92bd61a8539860e2a8dddf8de
Reviewed-on: https://gerrit.libreoffice.org/31522
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx 
b/sw/source/core/doc/DocumentFieldsManager.cxx
index 1053a9c..85e28a8 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -595,8 +595,10 @@ void DocumentFieldsManager::UpdateTableFields( 
SfxPoolItem* pHt )
 // table where &m_rDoc field is located
 const SwTableNode* pTableNd;
 const SwTextNode& rTextNd = 
pFormatField->GetTextField()->GetTextNode();
-if( !rTextNd.GetNodes().IsDocNodes() ||
-nullptr == ( pTableNd = rTextNd.FindTableNode() ) )
+if(!rTextNd.GetNodes().IsDocNodes())
+continue;
+pTableNd = rTextNd.FindTableNode();
+if (pTableNd == nullptr)
 continue;
 
 switch( pUpdateField->m_eFlags )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: basegfx/source desktop/source oox/inc oox/source

2016-12-01 Thread Noel Grandin
 basegfx/source/inc/hommatrixtemplate.hxx  |8 
+---
 desktop/source/deployment/registry/configuration/dp_configuration.cxx |6 
+--
 desktop/source/deployment/registry/dp_backend.cxx |   14 
+++
 desktop/source/deployment/registry/inc/dp_backend.h   |6 
+--
 desktop/source/deployment/registry/sfwk/dp_sfwk.cxx   |6 
+--
 oox/inc/drawingml/textspacing.hxx |   20 
+-
 oox/source/drawingml/textparagraphpropertiescontext.cxx   |   12 
+++---
 oox/source/drawingml/textspacingcontext.cxx   |4 +-
 8 files changed, 35 insertions(+), 41 deletions(-)

New commits:
commit 1517caa433b001968643ebcdca01c53bf76034d2
Author: Noel Grandin 
Date:   Thu Dec 1 14:18:28 2016 +0200

convert some anonymous enums to scoped

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

diff --git a/basegfx/source/inc/hommatrixtemplate.hxx 
b/basegfx/source/inc/hommatrixtemplate.hxx
index f9b3e22..08c5b53 100644
--- a/basegfx/source/inc/hommatrixtemplate.hxx
+++ b/basegfx/source/inc/hommatrixtemplate.hxx
@@ -37,10 +37,8 @@ namespace basegfx
 return 0.0;
 }
 
-template < unsigned int RowSize_ > class ImplMatLine
+template < sal_uInt16 RowSize > class ImplMatLine
 {
-enum { RowSize = RowSize_ };
-
 double  mfValue[RowSize];
 
 public:
@@ -74,10 +72,8 @@ namespace basegfx
 }
 };
 
-template < unsigned int RowSize_ > class ImplHomMatrixTemplate
+template < sal_uInt16 RowSize > class ImplHomMatrixTemplate
 {
-enum { RowSize = RowSize_ };
-
 ImplMatLine< RowSize >  maLine[RowSize - 
1];
 ImplMatLine< RowSize >* mpLine;
 
diff --git 
a/desktop/source/deployment/registry/configuration/dp_configuration.cxx 
b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 81ef958..b274786 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -710,20 +710,20 @@ void BackendImpl::PackageImpl::processPackage_(
 }
 //No need for live-deployment for bundled extension, because OOo
 //restarts after installation
-if (that->m_eContext != CONTEXT_BUNDLED
+if (that->m_eContext != Context::Bundled
 && !startup)
 {
 if (m_isSchema)
 {
 css::configuration::Update::get(
 that->m_xComponentContext)->insertExtensionXcsFile(
-that->m_eContext == CONTEXT_SHARED, 
expandUnoRcUrl(url));
+that->m_eContext == Context::Shared, 
expandUnoRcUrl(url));
 }
 else
 {
 css::configuration::Update::get(
 that->m_xComponentContext)->insertExtensionXcuFile(
-that->m_eContext == CONTEXT_SHARED, 
expandUnoRcUrl(url));
+that->m_eContext == Context::Shared, 
expandUnoRcUrl(url));
 }
 }
 that->addToConfigmgrIni( m_isSchema, true, url, xCmdEnv );
diff --git a/desktop/source/deployment/registry/dp_backend.cxx 
b/desktop/source/deployment/registry/dp_backend.cxx
index 4b81c5e..7393d9b 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -76,7 +76,7 @@ PackageRegistryBackend::PackageRegistryBackend(
 Reference const & xContext )
 : t_BackendBase( getMutex() ),
   m_xComponentContext( xContext ),
-  m_eContext( CONTEXT_UNKNOWN ),
+  m_eContext( Context::Unknown ),
   m_readOnly( false )
 {
 assert(xContext.is());
@@ -89,17 +89,17 @@ PackageRegistryBackend::PackageRegistryBackend(
 m_readOnly = *readOnly;
 
 if ( m_context == "user" )
-m_eContext = CONTEXT_USER;
+m_eContext = Context::User;
 else if ( m_context == "shared" )
-m_eContext = CONTEXT_SHARED;
+m_eContext = Context::Shared;
 else if ( m_context == "bundled" )
-m_eContext = CONTEXT_BUNDLED;
+m_eContext = Context::Bundled;
 else if ( m_context == "tmp" )
-m_eContext = CONTEXT_TMP;
+m_eContext = Context::Tmp;
 else if (m_context.matchIgnoreAsciiCase("vnd.sun.star.tdoc:/"))
-m_eContext = CONTEXT_DOCUMENT;
+m_eContext = Context::Document;
 else
-m_eContext = CONTEXT_UNKNOWN;
+m_eContext = Context::Unknown;
 }
 
 
diff --git a/desktop/source/deployment/registry/i

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

2016-12-01 Thread Noel Grandin
 xmloff/inc/txtfldi.hxx   |   43 ---
 xmloff/inc/txtvfldi.hxx  |   39 ---
 xmloff/source/draw/XMLImageMapContext.cxx|   41 ---
 xmloff/source/draw/sdxmlexp.cxx  |8 
 xmloff/source/draw/ximppage.cxx  |3 
 xmloff/source/draw/ximpshap.cxx  |6 
 xmloff/source/forms/elementimport.cxx|2 
 xmloff/source/forms/formcellbinding.cxx  |2 
 xmloff/source/table/XMLTableImport.cxx   |3 
 xmloff/source/text/XMLAutoMarkFileContext.cxx|5 
 xmloff/source/text/XMLAutoMarkFileContext.hxx|3 
 xmloff/source/text/XMLFootnoteImportContext.cxx  |3 
 xmloff/source/text/XMLFootnoteImportContext.hxx  |2 
 xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx |   33 --
 xmloff/source/text/XMLIndexAlphabeticalSourceContext.hxx |   12 
 xmloff/source/text/XMLIndexBibliographyEntryContext.cxx  |4 
 xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx   |8 
 xmloff/source/text/XMLIndexObjectSourceContext.cxx   |   15 -
 xmloff/source/text/XMLIndexObjectSourceContext.hxx   |6 
 xmloff/source/text/XMLIndexSimpleEntryContext.cxx|4 
 xmloff/source/text/XMLIndexSimpleEntryContext.hxx|2 
 xmloff/source/text/XMLIndexSourceBaseContext.cxx |6 
 xmloff/source/text/XMLIndexSourceBaseContext.hxx |4 
 xmloff/source/text/XMLIndexSpanEntryContext.cxx  |4 
 xmloff/source/text/XMLIndexTOCContext.cxx|6 
 xmloff/source/text/XMLIndexTOCContext.hxx|3 
 xmloff/source/text/XMLIndexTOCSourceContext.cxx  |   12 
 xmloff/source/text/XMLIndexTOCSourceContext.hxx  |5 
 xmloff/source/text/XMLIndexTOCStylesContext.cxx  |3 
 xmloff/source/text/XMLIndexTOCStylesContext.hxx  |2 
 xmloff/source/text/XMLIndexTabStopEntryContext.cxx   |8 
 xmloff/source/text/XMLIndexTableSourceContext.cxx|9 
 xmloff/source/text/XMLIndexTableSourceContext.hxx|4 
 xmloff/source/text/XMLIndexTemplateContext.cxx   |   31 --
 xmloff/source/text/XMLIndexTemplateContext.hxx   |   26 --
 xmloff/source/text/XMLIndexTitleTemplateContext.cxx  |6 
 xmloff/source/text/XMLIndexTitleTemplateContext.hxx  |4 
 xmloff/source/text/XMLIndexUserSourceContext.cxx |   24 -
 xmloff/source/text/XMLIndexUserSourceContext.hxx |9 
 xmloff/source/text/XMLLineNumberingExport.cxx|   35 --
 xmloff/source/text/XMLLineNumberingExport.hxx|   12 
 xmloff/source/text/XMLRedlineExport.cxx  |   89 ++-
 xmloff/source/text/XMLRedlineExport.hxx  |   22 -
 xmloff/source/text/XMLSectionExport.cxx  |  182 +--
 xmloff/source/text/XMLSectionExport.hxx  |   62 -
 xmloff/source/text/XMLSectionImportContext.cxx   |   21 -
 xmloff/source/text/XMLSectionImportContext.hxx   |8 
 xmloff/source/text/XMLSectionSourceDDEImportContext.cxx  |   16 -
 xmloff/source/text/XMLSectionSourceDDEImportContext.hxx  |5 
 xmloff/source/text/XMLTextFrameContext.cxx   |   97 ++-
 xmloff/source/text/XMLTextNumRuleInfo.cxx|   50 +---
 xmloff/source/text/XMLTextNumRuleInfo.hxx|   25 --
 xmloff/source/text/txtfldi.cxx   |  113 +++--
 xmloff/source/text/txtparae.cxx  |4 
 xmloff/source/text/txtparai.cxx  |   50 +---
 xmloff/source/text/txtvfldi.cxx  |  101 ++--
 56 files changed, 348 insertions(+), 954 deletions(-)

New commits:
commit 06eb947c1651cb623cd60d81b08281de4cc6a86b
Author: Noel Grandin 
Date:   Thu Dec 1 10:51:35 2016 +0200

inline some constant strings in xmloff (part1)

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

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index f818242..cc457c1 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -851,8 +851,6 @@ protected:
 /** import page variable fields () */
 class XMLPageVarGetFieldImportContext : public XMLTextFieldImportContext
 {
-const OUString sPropertyNumberingType;
-
 OUString sNumberFormat;
 OUString sLetterSync;
 
@@ -878,9 +876,6 @@ protected:
 /** import page variable fields () */
 class XMLPageVarSetFieldImportContext : public XMLTextFieldImportContext
 {
-const OUString sPropertyOn;
-const OUString sPropertyOffset;
-
 sal_Int16 nAdjust;
 bool bActive;
 
@@ -904,10 +899,6 @@ protected:
 /** import macro fields () */
 class XMLMacroFieldImportContext : public XMLTextFieldImportContext
 {
-const OUString 

Re: Requiring HarfBuzz 0.9.42?

2016-12-01 Thread Khaled Hosny
On Mon, Nov 28, 2016 at 03:27:18PM +0200, Khaled Hosny wrote:
> I currently have code that depends on a feature and new API introduced
> in HarfBuzz 0.9.42. The API use is behind a build time check, but the
> code elsewhere really assumes the behaviour enabled by this API. So
> technically we can use lower HarfBuzz versions, but practically the
> result will be wrong in many cases.
> 
> Would it be OK to raise the required HarfBuzz version from 0.9.3 to
> 0.9.42 (both master and 5.3 are affected)?
> 
> Actually, checking HarfBuzz’s NEWS, looks like we will need at least
> 1.0.3 as there have been few bug fixes for the related functionality
> between 0.9.42 and 1.0.3.

As no one objected, here we go https://gerrit.libreoffice.org/#/c/31521,
and will cherry-pick to 5.3 afterwards.

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


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

2016-12-01 Thread Julien Nabet
 sw/source/core/attr/cellatr.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 9e9f52ad17a73f353b372bcdc9971443b961d39a
Author: Julien Nabet 
Date:   Thu Dec 1 22:39:58 2016 +0100

-Werror=maybe-uninitialized

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

diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx
index 9a99b65..6a0401b 100644
--- a/sw/source/core/attr/cellatr.cxx
+++ b/sw/source/core/attr/cellatr.cxx
@@ -115,8 +115,10 @@ void SwTableBoxFormula::ChangeState( const SfxPoolItem* 
pItem )
 // detect table that contains this attribute
 const SwTableNode* pTableNd;
 const SwNode* pNd = GetNodeOfFormula();
-if( pNd && &pNd->GetNodes() == &pNd->GetDoc()->GetNodes() &&
-nullptr != ( pTableNd = pNd->FindTableNode() ))
+if (!pNd || &pNd->GetNodes() != &pNd->GetDoc()->GetNodes())
+return;
+pTableNd = pNd->FindTableNode();
+if( pTableNd != nullptr )
 {
 switch( pUpdateField->m_eFlags )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Khaled Hosny
 vcl/unx/generic/fontmanager/helper.cxx |  114 -
 1 file changed, 114 deletions(-)

New commits:
commit 01dcaa31f44aaf684cdfaff8af73aeafbbbd0aa3
Author: Khaled Hosny 
Date:   Fri Dec 2 03:08:15 2016 +0200

Unused code

Change-Id: I975f118f4bcfaed338509966240c553c51a9184e
Reviewed-on: https://gerrit.libreoffice.org/31518
Tested-by: Jenkins 
Reviewed-by: Khaled Hosny 

diff --git a/vcl/unx/generic/fontmanager/helper.cxx 
b/vcl/unx/generic/fontmanager/helper.cxx
index 17d74d2..84f87e7 100644
--- a/vcl/unx/generic/fontmanager/helper.cxx
+++ b/vcl/unx/generic/fontmanager/helper.cxx
@@ -235,120 +235,6 @@ OUString const & psp::getFontPath()
 return aPath;
 }
 
-bool psp::convertPfbToPfa( ::osl::File& rInFile, ::osl::File& rOutFile )
-{
-static const unsigned char hexDigits[] =
-{
-'0', '1', '2', '3', '4', '5', '6', '7',
-'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
-};
-
-bool bSuccess = true;
-bool bEof = false;
-unsigned char buffer[256];
-sal_uInt64 nSize(0);
-rInFile.getSize(nSize);
-
-while( bSuccess && ! bEof )
-{
-sal_uInt64 nRead;
-// read leading bytes
-bEof = ((0 != rInFile.read( buffer, 6, nRead)) || (nRead != 6));
-if( bEof )
-break;
-unsigned int nType = buffer[ 1 ];
-unsigned int nBytesToRead = buffer[2] | buffer[3] << 8 | buffer[4] << 
16 | buffer[5] << 24;
-if( buffer[0] != 0x80 ) // test for pfb magic number
-{
-// this might be a pfa font already
-if( ! rInFile.read( buffer+6, 9, nRead ) && nRead == 9 &&
-( ! std::strncmp( reinterpret_cast(buffer), 
"%!FontType1-", 12 ) ||
-  ! std::strncmp( reinterpret_cast(buffer), 
"%!PS-AdobeFont-", 15 ) ) )
-{
-sal_uInt64 nWrite = 0;
-if( rOutFile.write( buffer, 15, nWrite ) || nWrite != 15 )
-bSuccess = false;
-while( bSuccess &&
-   ! rInFile.read( buffer, sizeof( buffer ), nRead ) &&
-   nRead != 0 )
-{
-if( rOutFile.write( buffer, nRead, nWrite ) ||
-nWrite != nRead )
-bSuccess = false;
-}
-bEof = true;
-}
-else
-bSuccess = false;
-}
-else if( nType == 1 || nType == 2 )
-{
-sal_uInt64 nOrgPos(0);
-rInFile.getPos(nOrgPos);
-nBytesToRead = std::min(nBytesToRead, nSize - nOrgPos);
-
-std::unique_ptr pBuffer(new unsigned 
char[nBytesToRead+1]);
-pBuffer[nBytesToRead] = 0;
-
-if( ! rInFile.read( pBuffer.get(), nBytesToRead, nRead ) && nRead 
== nBytesToRead )
-{
-if( nType == 1 )
-{
-// ascii data, convert dos lineends( \r\n ) and
-// m_ac lineends( \r ) to \n
-std::unique_ptr pWriteBuffer(new unsigned 
char[ nBytesToRead ]);
-unsigned int nBytesToWrite = 0;
-for( unsigned int i = 0; i < nBytesToRead; i++ )
-{
-if( pBuffer[i] != '\r' )
-pWriteBuffer[ nBytesToWrite++ ] = pBuffer[i];
-else if( pBuffer[ i+1 ] == '\n' )
-{
-i++;
-pWriteBuffer[ nBytesToWrite++ ] = '\n';
-}
-else
-pWriteBuffer[ nBytesToWrite++ ] = '\n';
-}
-if( rOutFile.write( pWriteBuffer.get(), nBytesToWrite, 
nRead ) || nRead != nBytesToWrite )
-bSuccess = false;
-}
-else
-{
-// binary data
-unsigned int nBuffer = 0;
-for( unsigned int i = 0; i < nBytesToRead && bSuccess; i++ 
)
-{
-buffer[ nBuffer++ ] = hexDigits[ pBuffer[ i ] >> 4 ];
-buffer[ nBuffer++ ] = hexDigits[ pBuffer[ i ] & 15 ];
-if( nBuffer >= 80 )
-{
-buffer[ nBuffer++ ] = '\n';
-if( rOutFile.write( buffer, nBuffer, nRead ) || 
nRead != nBuffer )
-bSuccess = false;
-nBuffer = 0;
-}
-}
-if( nBuffer > 0 && bSuccess )
-{
-buffer[ nBuffer++ ] = '\n';
-if( rOutFile.write( buffer, nBuffer, nRead ) || nRead 
!= nBuffer )
-bSuccess = false;
-}
-

[Libreoffice-commits] core.git: uitest/uitest

2016-12-01 Thread Markus Mohrhard
 uitest/uitest/framework.py |9 +
 1 file changed, 9 insertions(+)

New commits:
commit fa5af9196bf9fbebf194f7fff09b779cb5c3d0fb
Author: Markus Mohrhard 
Date:   Fri Dec 2 01:19:11 2016 +0100

uitest: prevent deadlock when the test fails

when the test fails it was possible that the terminate call was
trying to close all the  open windows which could show the query close
dialog. The new approach is to close all remaining documents in
tearDown.

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

diff --git a/uitest/uitest/framework.py b/uitest/uitest/framework.py
index be58b12..7d4a78d 100644
--- a/uitest/uitest/framework.py
+++ b/uitest/uitest/framework.py
@@ -31,6 +31,15 @@ class UITestCase(unittest.TestCase):
 def tearDown(self):
 t = time.time() - self.startTime
 print("Execution time for %s: %.3f" % (self.id(), t))
+if self.xContext is not None:
+desktop = self.ui_test.get_desktop()
+components = desktop.getComponents()
+for component in components:
+try:
+component.close(False)
+except Exception as e:
+print(e)
+
 self.connection.tearDown()
 
 # 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: uitest/test_main.py

2016-12-01 Thread Markus Mohrhard
 uitest/test_main.py |4 
 1 file changed, 4 insertions(+)

New commits:
commit 50962f29295e72bce0c45aef8fb3df9a291f22c0
Author: Markus Mohrhard 
Date:   Fri Oct 28 13:07:02 2016 -0700

provide a way to limit the UI tests through env

Change-Id: If0af462f20f3541a183e00732944b0650d94639d
Reviewed-on: https://gerrit.libreoffice.org/31512
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/uitest/test_main.py b/uitest/test_main.py
index 498e45d..fabb868 100644
--- a/uitest/test_main.py
+++ b/uitest/test_main.py
@@ -66,8 +66,12 @@ def get_test_case_classes_of_module(module):
 return [ c for c in classes if issubclass(c, UITestCase) ]
 
 def add_tests_for_file(test_file, test_suite):
+test_name_limit = os.environ.get('UITEST_TEST_NAME', '')
 test_loader = unittest.TestLoader()
 module_name = os.path.splitext(os.path.split(test_file)[1])[0]
+if len(test_name_limit) > 0 and not 
test_name_limit.startswith(module_name):
+return
+
 loader = importlib.machinery.SourceFileLoader(module_name, test_file)
 mod = loader.load_module()
 classes = get_test_case_classes_of_module(mod)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Mike Kaganski
 oox/source/core/fragmenthandler2.cxx   |1 
 oox/source/core/xmlfilterbase.cxx  |5 +
 oox/source/token/namespaces-strict.txt |1 
 oox/source/token/namespaces.hxx.tail   |1 
 oox/source/token/namespaces.txt|1 
 oox/source/token/tokens.txt|1 
 sc/qa/unit/bugfix-test.cxx |   50 +-
 sc/qa/unit/data/xlsx/tdf104310-2.xlsx  |binary
 sc/source/filter/inc/worksheetfragment.hxx |   41 +++
 sc/source/filter/oox/worksheetfragment.cxx |   77 +
 10 files changed, 155 insertions(+), 23 deletions(-)

New commits:
commit ce17ebb69500530c978767b1389c9e8341acb9bf
Author: Mike Kaganski 
Date:   Fri Dec 2 03:31:22 2016 +0300

tdf#104310: Accept x12ac lists and fallbacks in dataValidations

Change-Id: I42cf20fcfe3ec03ebd09923be509a9d11e0b40da
Reviewed-on: https://gerrit.libreoffice.org/31516
Tested-by: Jenkins 
Reviewed-by: Kohei Yoshida 

diff --git a/oox/source/core/fragmenthandler2.cxx 
b/oox/source/core/fragmenthandler2.cxx
index 9a708d5..ba3f880 100644
--- a/oox/source/core/fragmenthandler2.cxx
+++ b/oox/source/core/fragmenthandler2.cxx
@@ -76,6 +76,7 @@ bool FragmentHandler2::prepareMceContext( sal_Int32 nElement, 
const AttributeLis
 {
 "p14",
 "p15",
+"x12ac",
 };
 
 if (std::find(aSupportedNS.begin(), aSupportedNS.end(), 
aRequires) != aSupportedNS.end())
diff --git a/oox/source/core/xmlfilterbase.cxx 
b/oox/source/core/xmlfilterbase.cxx
index fae720f..952bf5e 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -146,7 +146,10 @@ struct NamespaceIds: public rtl::StaticWithInit<
 {"http://schemas.microsoft.com/office/powerpoint/2010/main";,
  NMSP_p14},
 {"http://schemas.microsoft.com/office/powerpoint/2012/main";,
- NMSP_p15}};
+ NMSP_p15},
+{"http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac";,
+ NMSP_x12ac},
+};
 }
 };
 
diff --git a/oox/source/token/namespaces-strict.txt 
b/oox/source/token/namespaces-strict.txt
index f9a4633..0f606f7 100644
--- a/oox/source/token/namespaces-strict.txt
+++ b/oox/source/token/namespaces-strict.txt
@@ -83,6 +83,7 @@ p14 
http://schemas.microsoft.com/office/powerpoint/2010/main
 # MSO 2012/2013 extensions 
-
 
 p15 
http://schemas.microsoft.com/office/powerpoint/2012/main
+x12ac   
http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac
 
 # extlst namespaces
 
diff --git a/oox/source/token/namespaces.hxx.tail 
b/oox/source/token/namespaces.hxx.tail
index 89f8c1c..17770dc 100644
--- a/oox/source/token/namespaces.hxx.tail
+++ b/oox/source/token/namespaces.hxx.tail
@@ -46,6 +46,7 @@ inline sal_Int32 getNamespace( sal_Int32 nToken ) { return 
nToken & NMSP_MASK; }
 #define R_TOKEN( token )OOX_TOKEN( officeRel, token )
 #define VML_TOKEN( token )  OOX_TOKEN( vml, token )
 #define VMLX_TOKEN( token ) OOX_TOKEN( vmlExcel, token )
+#define X12AC_TOKEN( token )OOX_TOKEN( x12ac, token )
 #define XDR_TOKEN( token )  OOX_TOKEN( dmlSpreadDr, token )
 #define XLS_TOKEN( token )  OOX_TOKEN( xls, token )
 #define XLS14_TOKEN( token )OOX_TOKEN( xls14Lst, token )
diff --git a/oox/source/token/namespaces.txt b/oox/source/token/namespaces.txt
index 7920572..4b6f49a 100644
--- a/oox/source/token/namespaces.txt
+++ b/oox/source/token/namespaces.txt
@@ -83,6 +83,7 @@ p14 
http://schemas.microsoft.com/office/powerpoint/2010/main
 # MSO 2012/2013 extensions 
-
 
 p15 
http://schemas.microsoft.com/office/powerpoint/2012/main
+x12ac   
http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac
 
 # extlst namespaces
 
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
index b113c84..6d4fcb8 100644
--- a/oox/source/token/tokens.txt
+++ b/oox/source/token/tokens.txt
@@ -5781,6 +5781,7 @@ writeProtection
 wsDr
 wsp
 x
+x12ac
 x14
 xAlign
 xIllusions
diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx
index 9b7f2b7..3499109 100644
--- a/sc/qa/unit/bugfix-test.cxx
+++ b/sc/qa/unit/bugfix-test.cxx
@@ -242,20 +242,42 @@ void ScFiltersTest::testRhbz1390776()
 
 void ScFiltersTest::testTdf104310()
 {
-ScDocShellRef xDocSh = loadDoc("tdf104310.", FORMAT_XLSX);
-ScDocument& rDoc = xDocSh->GetDocument();
-
-const ScValidationData* pData = rDoc.GetValidationEntry(1);
-CPPUNIT_ASSERT(pData);
-
-// Make sure the list is correct.
-std::vector aList;
-pData->FillSelectionList(aList, ScAddress(0, 1, 0));
-CPPUNIT_ASSERT_EQUAL(size_t(5), aList.size());
-for (size_t i = 0; i < 5; ++i)
-  

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

2016-12-01 Thread Takeshi Abe
 starmath/inc/node.hxx|   24 
 starmath/source/node.cxx |   36 ++--
 2 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit 7d1be94484fa99bbfbaa0261cc243778a70b298e
Author: Takeshi Abe 
Date:   Thu Dec 1 18:55:58 2016 +0900

starmath: Prefix members of SmTextNode

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

diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 52532c9..e3067b7 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -376,16 +376,16 @@ public:
  */
 class SmTextNode : public SmVisibleNode
 {
-OUString   aText;
-sal_uInt16  nFontDesc;
+OUString   maText;
+sal_uInt16 mnFontDesc;
 /** Index within text where the selection starts
  * @remarks Only valid if SmNode::IsSelected() is true
  */
-sal_Int32  nSelectionStart;
+sal_Int32  mnSelectionStart;
 /** Index within text where the selection ends
  * @remarks Only valid if SmNode::IsSelected() is true
  */
-sal_Int32  nSelectionEnd;
+sal_Int32  mnSelectionEnd;
 
 protected:
 SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, sal_uInt16 
nFontDescP );
@@ -393,12 +393,12 @@ protected:
 public:
 SmTextNode(const SmToken &rNodeToken, sal_uInt16 nFontDescP );
 
-sal_uInt16  GetFontDesc() const { return nFontDesc; }
-voidSetText(const OUString &rText) { aText = rText; }
-const OUString &GetText() const { return aText; }
+sal_uInt16  GetFontDesc() const { return mnFontDesc; }
+voidSetText(const OUString &rText) { maText = rText; }
+const OUString &GetText() const { return maText; }
 /** Change the text of this node, including the underlying token */
 voidChangeText(const OUString &rText) {
-aText = rText;
+maText = rText;
 SmToken token = GetToken();
 token.aText = rText;
 SetToken(token); //TODO: Merge this with AdjustFontDesc for better 
performance
@@ -409,15 +409,15 @@ public:
 /** Index within GetText() where the selection starts
  * @remarks Only valid of SmNode::IsSelected() is true
  */
-sal_Int32   GetSelectionStart() const {return nSelectionStart;}
+sal_Int32   GetSelectionStart() const {return mnSelectionStart;}
 /** Index within GetText() where the selection end
  * @remarks Only valid of SmNode::IsSelected() is true
  */
-sal_Int32   GetSelectionEnd() const {return nSelectionEnd;}
+sal_Int32   GetSelectionEnd() const {return mnSelectionEnd;}
 /** Set the index within GetText() where the selection starts */
-voidSetSelectionStart(sal_Int32 index) {nSelectionStart = 
index;}
+voidSetSelectionStart(sal_Int32 index) {mnSelectionStart = 
index;}
 /** Set the index within GetText() where the selection end */
-voidSetSelectionEnd(sal_Int32 index) {nSelectionEnd = 
index;}
+voidSetSelectionEnd(sal_Int32 index) {mnSelectionEnd = 
index;}
 
 virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell) 
override;
 virtual void Arrange(OutputDevice &rDev, const SmFormat &rFormat) override;
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 4ca990f..023f523 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2037,17 +2037,17 @@ void SmRectangleNode::Arrange(OutputDevice &rDev, const 
SmFormat &/*rFormat*/)
 
 SmTextNode::SmTextNode( SmNodeType eNodeType, const SmToken &rNodeToken, 
sal_uInt16 nFontDescP )
 : SmVisibleNode(eNodeType, rNodeToken)
-, nFontDesc(nFontDescP)
-, nSelectionStart(0)
-, nSelectionEnd(0)
+, mnFontDesc(nFontDescP)
+, mnSelectionStart(0)
+, mnSelectionEnd(0)
 {
 }
 
 SmTextNode::SmTextNode( const SmToken &rNodeToken, sal_uInt16 nFontDescP )
 : SmVisibleNode(NTEXT, rNodeToken)
-, nFontDesc(nFontDescP)
-, nSelectionStart(0)
-, nSelectionEnd(0)
+, mnFontDesc(nFontDescP)
+, mnSelectionStart(0)
+, mnSelectionEnd(0)
 {
 }
 
@@ -2061,7 +2061,7 @@ void SmTextNode::Prepare(const SmFormat &rFormat, const 
SmDocShell &rDocShell)
 if (TTEXT == GetToken().eType)
 SetRectHorAlign( RectHorAlign::Left );
 
-aText = GetToken().aText;
+maText = GetToken().aText;
 GetFont() = rFormat.GetFont(GetFontDesc());
 
 if (IsItalic( GetFont() ))
@@ -2088,7 +2088,7 @@ void SmTextNode::Arrange(OutputDevice &rDev, const 
SmFormat &rFormat)
 SmTmpDevice aTmpDev (rDev, true);
 aTmpDev.SetFont(GetFont());
 
-SmRect::operator = (SmRect(aTmpDev, &rFormat, aText, 
GetFont().GetBorderWidth()));
+SmRect::operator = (SmRect(aTmpDev, &rFormat, maText, 
GetFont().GetBorderWidth()));
 }
 
 void SmTextNode::Crea

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

2016-12-01 Thread Khaled Hosny
 vcl/inc/unx/fontmanager.hxx |2 -
 vcl/inc/unx/geninst.h   |1 
 vcl/unx/generic/fontmanager/fontmanager.cxx |   13 ---
 vcl/unx/generic/fontmanager/fontsubst.cxx   |   52 +++-
 4 files changed, 7 insertions(+), 61 deletions(-)

New commits:
commit ff8a29d01afef082741871c7ac40f635a5e2bfad
Author: Khaled Hosny 
Date:   Fri Dec 2 02:50:26 2016 +0200

Always use FontConfig in UNX

I know Solaris is a snowflake, but it is 2016 already and I think it can
handle FontConfig such fine.

As for the undocumented envvar, lets pretend it never existed because
that is what undocumented feature are. Anyway, it was introduced for
https://bz.apache.org/ooo/show_bug.cgi?id=85483 which is long obsolete
already.

Change-Id: Ib50f129a3828ed2ee5167178c6ff2467d2c8d96c
Reviewed-on: https://gerrit.libreoffice.org/31517
Tested-by: Jenkins 
Reviewed-by: Khaled Hosny 

diff --git a/vcl/inc/unx/fontmanager.hxx b/vcl/inc/unx/fontmanager.hxx
index 01419dc..9c05f43 100644
--- a/vcl/inc/unx/fontmanager.hxx
+++ b/vcl/inc/unx/fontmanager.hxx
@@ -159,8 +159,6 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
 fontID  m_nNextFontID;
 std::unordered_map< fontID, PrintFont* >m_aFonts;
 std::unordered_map< int, FontFamily >   m_aFamilyTypes;
-std::list< OString >m_aFontDirectories;
-std::vector< int >  m_aPrivateFontDirectories;
 utl::MultiAtomProvider* m_pAtoms;
 // for speeding up findFontFileID
 std::unordered_map< OString, std::set< fontID >, OStringHash >
diff --git a/vcl/inc/unx/geninst.h b/vcl/inc/unx/geninst.h
index 060f751..5a9786f 100644
--- a/vcl/inc/unx/geninst.h
+++ b/vcl/inc/unx/geninst.h
@@ -109,7 +109,6 @@ public:
 
 // prolly belongs somewhere else ... just a font help
 static void RegisterFontSubstitutors( PhysicalFontCollection* 
pFontCollection );
-static int  FetchFontSubstitutionFlags();
 
 protected:
 static void configurePspInfoPrinter( PspSalInfoPrinter* pInfoPrinter,
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx 
b/vcl/unx/generic/fontmanager/fontmanager.cxx
index ce06a65..cd414f7 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -722,11 +722,6 @@ bool PrintFontManager::analyzeSfntFile( PrintFont* pFont ) 
const
 return bSuccess;
 }
 
-static bool AreFCSubstitutionsEnabled()
-{
-return (SalGenericInstance::FetchFontSubstitutionFlags() & 3) == 0;
-}
-
 void PrintFontManager::initialize()
 {
 #ifdef CALLGRIND_COMPILE
@@ -742,8 +737,6 @@ void PrintFontManager::initialize()
 delete (*it).second;
 m_nNextFontID = 1;
 m_aFonts.clear();
-m_aFontDirectories.clear();
-m_aPrivateFontDirectories.clear();
 }
 
 #if OSL_DEBUG_LEVEL > 1
@@ -768,7 +761,6 @@ void PrintFontManager::initialize()
 if( !rSalPrivatePath.isEmpty() )
 {
 OString aPath = OUStringToOString( rSalPrivatePath, aEncoding );
-const bool bAreFCSubstitutionsEnabled = AreFCSubstitutionsEnabled();
 sal_Int32 nIndex = 0;
 do
 {
@@ -782,10 +774,7 @@ void PrintFontManager::initialize()
 // and fontconfig-based substitutions are enabled
 // then trying to use these app-specific fonts doesn't make sense
 if( !addFontconfigDir( aToken ) )
-if( bAreFCSubstitutionsEnabled )
-continue;
-m_aFontDirectories.push_back( aToken );
-m_aPrivateFontDirectories.push_back( getDirectoryAtom( aToken, 
true ) );
+continue;
 } while( nIndex >= 0 );
 }
 
diff --git a/vcl/unx/generic/fontmanager/fontsubst.cxx 
b/vcl/unx/generic/fontmanager/fontsubst.cxx
index c362948..2f050c8 100644
--- a/vcl/unx/generic/fontmanager/fontsubst.cxx
+++ b/vcl/unx/generic/fontmanager/fontsubst.cxx
@@ -43,55 +43,15 @@ public:
 bool FindFontSubstitute( FontSelectPattern&, OUString& rMissingCodes ) 
const override;
 };
 
-int SalGenericInstance::FetchFontSubstitutionFlags()
-{
-// init font substitution defaults
-int nDisableBits = 0;
-#ifdef SOLARIS
-nDisableBits = 1; // disable "font fallback" here on default
-#endif
-// apply the environment variable if any
-const char* pEnvStr = ::getenv( "SAL_DISABLE_FC_SUBST" );
-if( pEnvStr )
-{
-if( (*pEnvStr >= '0') && (*pEnvStr <= '9') )
-nDisableBits = (*pEnvStr - '0');
-else
-nDisableBits = ~0U; // no specific bits set: disable all
-}
-return nDisableBits;
-}
-
 void SalGenericInstance::RegisterFontSubstitutors( PhysicalFontCollection* 
pFontCollection )
 {
-// init font substitution defaults
-int nDisableBits = 0;
-#ifdef SOLARIS
-nDisableBits = 1; // disable "font fallback" here on default
-#endif
-// a

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

2016-12-01 Thread Markus Mohrhard
 vcl/source/window/dialog.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 2c3f95d5810521483f990030e0529bbf37fa90f0
Author: Markus Mohrhard 
Date:   Sat Nov 12 19:29:21 2016 -0800

remove unnecessary vertical whitespace

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

diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 194a11b..688cfb5 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -898,8 +898,6 @@ short Dialog::Execute()
 
 VclPtr xWindow = this;
 
-
-
 css::uno::Reference< css::uno::XComponentContext > xContext(
 comphelper::getProcessComponentContext() );
 css::uno::Reference 
xEventBroadcaster(css::frame::theGlobalEventBroadcaster::get(xContext), 
css::uno::UNO_QUERY_THROW);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Khaled Hosny
 vcl/Library_vcl.mk  |1 
 vcl/inc/unx/fontcache.hxx   |   88 ---
 vcl/inc/unx/fontmanager.hxx |7 
 vcl/unx/generic/fontmanager/fontcache.cxx   |  625 
 vcl/unx/generic/fontmanager/fontconfig.cxx  |   34 -
 vcl/unx/generic/fontmanager/fontmanager.cxx |   58 --
 vcl/unx/generic/fontmanager/helper.cxx  |2 
 7 files changed, 11 insertions(+), 804 deletions(-)

New commits:
commit babf6d5e53516e80e8e3f2485796ebfaeb20e9c1
Author: Khaled Hosny 
Date:   Fri Dec 2 02:14:21 2016 +0200

Drop font cache on UNX

On my system reading the ~400 fonts I have takes ~0.07 seconds, which
does not really justify all this complexity. We don’t have such cache on
other platforms as well.

It might have been slower in the past with all PFB and AFM parsing, but
this is gone already.

Killing this ugly fontmanager over engineering one piece at a time.

Change-Id: I41fe3db48dc3de0cf8939c2120403f7d243d6096
Reviewed-on: https://gerrit.libreoffice.org/31511
Tested-by: Jenkins 
Reviewed-by: Khaled Hosny 

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 435e8cf..759d903 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -540,7 +540,6 @@ vcl_headless_freetype_code=\
 vcl/unx/generic/glyphs/freetype_glyphcache \
 vcl/unx/generic/glyphs/glyphcache \
 vcl/unx/generic/fontmanager/fontsubst \
-vcl/unx/generic/fontmanager/fontcache \
 vcl/unx/generic/fontmanager/fontconfig \
 vcl/unx/generic/fontmanager/fontmanager \
 vcl/unx/generic/fontmanager/helper \
diff --git a/vcl/inc/unx/fontcache.hxx b/vcl/inc/unx/fontcache.hxx
deleted file mode 100644
index 4332d41..000
--- a/vcl/inc/unx/fontcache.hxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_VCL_INC_UNX_FONTCACHE_HXX
-#define INCLUDED_VCL_INC_UNX_FONTCACHE_HXX
-
-#include 
-#include 
-#include 
-
-#include "unx/fontmanager.hxx"
-
-namespace psp
-{
-
-class VCL_PLUGIN_PUBLIC FontCache
-{
-struct FontDir;
-friend struct FontDir;
-struct FontFile;
-friend struct FontFile;
-
-struct FontFile
-{
-std::list< PrintFontManager::PrintFont* >  m_aEntry;
-};
-
-typedef std::unordered_map< OString, FontFile, OStringHash > FontDirMap;
-struct FontDir
-{
-sal_Int64   m_nTimestamp;
-boolm_bNoFiles;
-boolm_bUserOverrideOnly;
-FontDirMap  m_aEntries;
-
-FontDir() : m_nTimestamp(0), m_bNoFiles(false), m_bUserOverrideOnly( 
false ) {}
-};
-
-typedef std::unordered_map< int, FontDir > FontCacheData;
-FontCacheData   m_aCache;
-OUStringm_aCacheFile;
-boolm_bDoFlush;
-
-void read();
-void clearCache();
-
-static void copyPrintFont( const PrintFontManager::PrintFont* pFrom, 
PrintFontManager::PrintFont* pTo );
-static bool equalsPrintFont( const PrintFontManager::PrintFont* pLeft, 
PrintFontManager::PrintFont* pRight );
-static PrintFontManager::PrintFont* clonePrintFont( const 
PrintFontManager::PrintFont* pFont );
-
-void createCacheDir( int nDirID );
-public:
-FontCache();
-~FontCache();
-
-bool getFontCacheFile( int nDirID, const OString& rFile, std::list< 
PrintFontManager::PrintFont* >& rNewFonts ) const;
-void updateFontCacheEntry( const PrintFontManager::PrintFont*, bool bFlush 
);
-
-// returns false for non cached directory
-// a cached but empty directory will return true but not append anything
-bool listDirectory( const OString& rDir, std::list< 
PrintFontManager::PrintFont* >& rNewFonts ) const;
-// returns true for directories that contain only user overridden fonts
-bool scanAdditionalFiles( const OString& rDir );
-
-void flush();
-};
-
-} // namespace psp
-
-#endif // INCLUDED_VCL_INC_UNX_FONTCACHE_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/fontmanager.hxx b/vcl/inc/unx/fontmanager.hxx
index 86d946a..01419dc 100644
--- a/vcl/inc/unx/fontmanage

-Og in dbgutil builds

2016-12-01 Thread Markus Mohrhard
Hey,

seems that the Og change has quite some negative consequences for the
debugging experience.

Normally in dbgutil builds all the variables were available and none of
them would be optimized away. I just started debugging and already had a
number of gdb messages telling me that the variable has been optimized
away. I never experienced the same problem before in a dbgutil build.

Does anyone else see this problem?

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


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

2016-12-01 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/database/fods/daverage.fods | 1543 +++
 sc/qa/unit/data/functions/database/fods/dcount.fods   | 2943 ++
 sc/qa/unit/data/functions/database/fods/dcounta.fods  | 1494 +++
 sc/qa/unit/data/functions/database/fods/dget.fods | 1633 
 sc/qa/unit/data/functions/database/fods/dproduct.fods | 1515 +++
 sc/qa/unit/data/functions/database/fods/dstdev.fods   | 1457 +++
 sc/qa/unit/data/functions/database/fods/dstdevp.fods  | 1357 ++
 sc/qa/unit/data/functions/database/fods/dsum.fods | 3629 ++
 sc/qa/unit/data/functions/database/fods/dvar.fods | 1686 
 sc/qa/unit/data/functions/database/fods/dvarp.fods| 1663 
 sc/qa/unit/data/functions/fods/daverage.fods  | 1543 ---
 sc/qa/unit/data/functions/fods/dcount.fods| 2943 --
 sc/qa/unit/data/functions/fods/dcounta.fods   | 1494 ---
 sc/qa/unit/data/functions/fods/dget.fods  | 1633 
 sc/qa/unit/data/functions/fods/dproduct.fods  | 1515 ---
 sc/qa/unit/data/functions/fods/dstdev.fods| 1457 ---
 sc/qa/unit/data/functions/fods/dstdevp.fods   | 1357 --
 sc/qa/unit/data/functions/fods/dsum.fods  | 3629 --
 sc/qa/unit/data/functions/fods/dvar.fods  | 1686 
 sc/qa/unit/data/functions/fods/dvarp.fods | 1663 
 20 files changed, 18920 insertions(+), 18920 deletions(-)

New commits:
commit 33f5bc54aaa7fe7aa9335726e30f9c349155e04d
Author: Zdeněk Crhonek 
Date:   Thu Dec 1 18:28:34 2016 +0100

sc test functions - move database functions to the new directory

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

diff --git a/sc/qa/unit/data/functions/fods/daverage.fods 
b/sc/qa/unit/data/functions/database/fods/daverage.fods
similarity index 100%
rename from sc/qa/unit/data/functions/fods/daverage.fods
rename to sc/qa/unit/data/functions/database/fods/daverage.fods
diff --git a/sc/qa/unit/data/functions/fods/dcount.fods 
b/sc/qa/unit/data/functions/database/fods/dcount.fods
similarity index 100%
rename from sc/qa/unit/data/functions/fods/dcount.fods
rename to sc/qa/unit/data/functions/database/fods/dcount.fods
diff --git a/sc/qa/unit/data/functions/fods/dcounta.fods 
b/sc/qa/unit/data/functions/database/fods/dcounta.fods
similarity index 100%
rename from sc/qa/unit/data/functions/fods/dcounta.fods
rename to sc/qa/unit/data/functions/database/fods/dcounta.fods
diff --git a/sc/qa/unit/data/functions/fods/dget.fods 
b/sc/qa/unit/data/functions/database/fods/dget.fods
similarity index 100%
rename from sc/qa/unit/data/functions/fods/dget.fods
rename to sc/qa/unit/data/functions/database/fods/dget.fods
diff --git a/sc/qa/unit/data/functions/fods/dproduct.fods 
b/sc/qa/unit/data/functions/database/fods/dproduct.fods
similarity index 100%
rename from sc/qa/unit/data/functions/fods/dproduct.fods
rename to sc/qa/unit/data/functions/database/fods/dproduct.fods
diff --git a/sc/qa/unit/data/functions/fods/dstdev.fods 
b/sc/qa/unit/data/functions/database/fods/dstdev.fods
similarity index 100%
rename from sc/qa/unit/data/functions/fods/dstdev.fods
rename to sc/qa/unit/data/functions/database/fods/dstdev.fods
diff --git a/sc/qa/unit/data/functions/fods/dstdevp.fods 
b/sc/qa/unit/data/functions/database/fods/dstdevp.fods
similarity index 100%
rename from sc/qa/unit/data/functions/fods/dstdevp.fods
rename to sc/qa/unit/data/functions/database/fods/dstdevp.fods
diff --git a/sc/qa/unit/data/functions/fods/dsum.fods 
b/sc/qa/unit/data/functions/database/fods/dsum.fods
similarity index 100%
rename from sc/qa/unit/data/functions/fods/dsum.fods
rename to sc/qa/unit/data/functions/database/fods/dsum.fods
diff --git a/sc/qa/unit/data/functions/fods/dvar.fods 
b/sc/qa/unit/data/functions/database/fods/dvar.fods
similarity index 100%
rename from sc/qa/unit/data/functions/fods/dvar.fods
rename to sc/qa/unit/data/functions/database/fods/dvar.fods
diff --git a/sc/qa/unit/data/functions/fods/dvarp.fods 
b/sc/qa/unit/data/functions/database/fods/dvarp.fods
similarity index 100%
rename from sc/qa/unit/data/functions/fods/dvarp.fods
rename to sc/qa/unit/data/functions/database/fods/dvarp.fods
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Stephan Bergmann
 compilerplugins/clang/checkconfigmacros.cxx |2 ++
 compilerplugins/clang/mergeclasses.cxx  |1 +
 compilerplugins/clang/stringstatic.cxx  |2 ++
 3 files changed, 5 insertions(+)

New commits:
commit 51b502bb53347e8117dce101ec7c2c1052ac9620
Author: Stephan Bergmann 
Date:   Thu Dec 1 23:42:09 2016 +0100

Missing include

Change-Id: I6af48e37b1b796a1680447ff972de8b5f5623d26

diff --git a/compilerplugins/clang/checkconfigmacros.cxx 
b/compilerplugins/clang/checkconfigmacros.cxx
index 3d6dc98..8557559 100644
--- a/compilerplugins/clang/checkconfigmacros.cxx
+++ b/compilerplugins/clang/checkconfigmacros.cxx
@@ -9,6 +9,8 @@
  *
  */
 
+#include 
+
 #include "compat.hxx"
 #include "plugin.hxx"
 
diff --git a/compilerplugins/clang/mergeclasses.cxx 
b/compilerplugins/clang/mergeclasses.cxx
index fa4eb3c..a3ba0cc 100644
--- a/compilerplugins/clang/mergeclasses.cxx
+++ b/compilerplugins/clang/mergeclasses.cxx
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include "plugin.hxx"
diff --git a/compilerplugins/clang/stringstatic.cxx 
b/compilerplugins/clang/stringstatic.cxx
index 823fc7b..9bcb372 100644
--- a/compilerplugins/clang/stringstatic.cxx
+++ b/compilerplugins/clang/stringstatic.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+
 #include "check.hxx"
 #include "plugin.hxx"
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Michael Stahl
 sfx2/source/doc/SfxDocumentMetaData.cxx |   49 
 svl/source/items/aeitem.cxx |6 +--
 svl/source/items/cenumitm.cxx   |6 +--
 svl/source/items/cintitem.cxx   |   16 +-
 sw/source/core/view/viewsh.cxx  |6 +++
 5 files changed, 39 insertions(+), 44 deletions(-)

New commits:
commit 002c1f7223a0363f848d37062a0043d63255ad94
Author: Michael Stahl 
Date:   Thu Dec 1 22:56:21 2016 +0100

tdf#101464 fix SwAccessibleMap::mpEvents assertions switching PrintPreview

The problem here is that when switching to the print preview, there are
2 view shells, SwEditShell::UpdateTable() is called and the first one
does some layouting in ImplEndAction(); this creates a11y events for the
2nd print preview one (see loops in SwViewShellImp::Invalidate*) and
stores them in the SwAccessibleMap since there is an Action going on;
then SwViewShell::ImplEndAction() for the print preview shell is called
but it returns early without sending out the events, so they remain
until the ~SwAccessibleMap asserts about them.

Change-Id: Ie1c6b82fc5f2cdb2998d514a632295ad07e97517

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 83a58af..2d362a2 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -235,6 +235,12 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
 {
 mbPaintWorks = true;
 UISizeNotify();
+// tdf#101464 print preview may generate events if another view shell
+// performs layout...
+if (IsPreview() && Imp()->IsAccessible())
+{
+Imp()->FireAccessibleEvents();
+}
 return;
 }
 
commit 745fe08e187ef623486b54e3036075748e789339
Author: Michael Stahl 
Date:   Thu Dec 1 15:29:05 2016 +0100

svl: convert some legacy DBG_ASSERT

Change-Id: I8fc4d849e434e245d871dc2d2eef42713e1359bb

diff --git a/svl/source/items/aeitem.cxx b/svl/source/items/aeitem.cxx
index c4f9f11..6ad2c76 100644
--- a/svl/source/items/aeitem.cxx
+++ b/svl/source/items/aeitem.cxx
@@ -93,13 +93,13 @@ sal_uInt16 SfxAllEnumItem::GetValueCount() const
 
 OUString SfxAllEnumItem::GetValueTextByPos( sal_uInt16 nPos ) const
 {
-DBG_ASSERT( pValues && nPos < pValues->size(), "enum overflow" );
+assert(pValues && nPos < pValues->size());
 return (*pValues)[nPos].aText;
 }
 
 sal_uInt16 SfxAllEnumItem::GetValueByPos( sal_uInt16 nPos ) const
 {
-DBG_ASSERT( pValues && nPos < pValues->size(), "enum overflow" );
+assert(pValues && nPos < pValues->size());
 return (*pValues)[nPos].nValue;
 }
 
@@ -192,7 +192,7 @@ bool SfxAllEnumItem::IsEnabled( sal_uInt16 nValue ) const
 void SfxAllEnumItem::RemoveValue( sal_uInt16 nValue )
 {
 sal_uInt16 nPos = GetPosByValue(nValue);
-DBG_ASSERT( nPos != USHRT_MAX, "removing value not in enum" );
+assert(nPos != USHRT_MAX);
 pValues->erase( pValues->begin() + nPos );
 }
 
diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx
index e31ce2c..187eb73 100644
--- a/svl/source/items/cenumitm.cxx
+++ b/svl/source/items/cenumitm.cxx
@@ -65,7 +65,7 @@ bool SfxEnumItemInterface::PutValue(const css::uno::Any& rVal,
 SetEnumValue(sal_uInt16(nTheValue));
 return true;
 }
-OSL_FAIL("SfxEnumItemInterface::PutValue(): Wrong type");
+SAL_WARN("svl.items", "SfxEnumItemInterface::PutValue(): Wrong type");
 return false;
 }
 
@@ -141,7 +141,7 @@ void SfxEnumItem::SetEnumValue(sal_uInt16 const nTheValue)
 
 void SfxEnumItem::SetValue(sal_uInt16 const nTheValue)
 {
-DBG_ASSERT(GetRefCount() == 0, "SfxEnumItem::SetValue(): Pooled item");
+assert(GetRefCount() == 0 && "SfxEnumItem::SetValue(): Pooled item");
 m_nValue = nTheValue;
 }
 
@@ -199,7 +199,7 @@ bool SfxBoolItem::PutValue(const css::uno::Any& rVal, 
sal_uInt8)
 m_bValue = bTheValue;
 return true;
 }
-OSL_FAIL("SfxBoolItem::PutValue(): Wrong type");
+SAL_WARN("svl.items", "SfxBoolItem::PutValue(): Wrong type");
 return false;
 }
 
diff --git a/svl/source/items/cintitem.cxx b/svl/source/items/cintitem.cxx
index a6c73d0..bb5aaea 100644
--- a/svl/source/items/cintitem.cxx
+++ b/svl/source/items/cintitem.cxx
@@ -57,7 +57,7 @@ bool CntByteItem::PutValue(const css::uno::Any& rVal, 
sal_uInt8)
 return true;
 }
 
-OSL_FAIL( "CntByteItem::PutValue - Wrong type!" );
+SAL_WARN("svl.items", "CntByteItem::PutValue - Wrong type!");
 return false;
 }
 
@@ -123,12 +123,12 @@ bool CntUInt16Item::PutValue(const css::uno::Any& rVal, 
sal_uInt8)
 sal_Int32 nValue = 0;
 if (rVal >>= nValue)
 {
-DBG_ASSERT( nValue <= USHRT_MAX, "Overflow in UInt16 value!");
-m_nValue = (sal_uInt16)nValue;
+SAL_WARN_IF(nValue > USHRT_MAX, "svl.items", "Overflow in UInt16 
value!");
+m_nValue = static_cast(nValue);
 return true;
 }
 
-OSL_FAIL( 

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

2016-12-01 Thread Noel Grandin
 connectivity/source/drivers/mork/MorkParser.cxx |   14 +++---
 connectivity/source/drivers/mork/MorkParser.hxx |2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 036603d72fd74607a6033118a7d395c4ad7f4907
Author: Noel Grandin 
Date:   Thu Dec 1 13:52:46 2016 +0200

convert nowParsing_ constants to scoped enum

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

diff --git a/connectivity/source/drivers/mork/MorkParser.cxx 
b/connectivity/source/drivers/mork/MorkParser.cxx
index 9a4b895..c2b931e 100644
--- a/connectivity/source/drivers/mork/MorkParser.cxx
+++ b/connectivity/source/drivers/mork/MorkParser.cxx
@@ -62,7 +62,7 @@ MorkParser::MorkParser() :
 morkPos_(0),
 nextAddValueId_(0x7fff),
 defaultTableId_(1),
-nowParsing_(NPValues)
+nowParsing_(NP::Values)
 {
 }
 
@@ -91,7 +91,7 @@ void MorkParser::initVars()
 {
 error_ = NoError;
 morkPos_ = 0;
-nowParsing_ = NPValues;
+nowParsing_ = NP::Values;
 currentCells_ = nullptr;
 nextAddValueId_ = 0x7fff;
 }
@@ -185,7 +185,7 @@ bool MorkParser::parseDict()
 {
 char cur = nextChar();
 bool Result = true;
-nowParsing_ = NPValues;
+nowParsing_ = NP::Values;
 
 while ( Result && cur != '>' && cur )
 {
@@ -198,7 +198,7 @@ bool MorkParser::parseDict()
 
 if ( morkData_.substr( morkPos_ - 1, strlen( 
MorkDictColumnMeta ) ) == MorkDictColumnMeta )
 {
-nowParsing_ = NPColumns;
+nowParsing_ = NP::Columns;
 morkPos_ += strlen( MorkDictColumnMeta ) - 1;
 }
 
@@ -324,12 +324,12 @@ bool MorkParser::parseCell()
 // Apply column and text
 int ColumnId = strtoul(Column.c_str(), nullptr, 16);
 
-if ( NPRows != nowParsing_ )
+if ( NP::Rows != nowParsing_ )
 {
 // Dicts
 if ( "" != Text )
 {
-if ( nowParsing_ == NPColumns )
+if ( nowParsing_ == NP::Columns )
 {
 columns_[ ColumnId ] = Text;
 }
@@ -488,7 +488,7 @@ bool MorkParser::parseRow( int TableId, int TableScope )
 bool Result = true;
 std::string TextId;
 int Id = 0, Scope = 0;
-nowParsing_ = NPRows;
+nowParsing_ = NP::Rows;
 
 char cur = nextChar();
 
diff --git a/connectivity/source/drivers/mork/MorkParser.hxx 
b/connectivity/source/drivers/mork/MorkParser.hxx
index 6b5088c..fcbdd6a 100644
--- a/connectivity/source/drivers/mork/MorkParser.hxx
+++ b/connectivity/source/drivers/mork/MorkParser.hxx
@@ -141,7 +141,7 @@ protected: // Data
 int defaultTableId_;
 
 // Indicates entity is being parsed
-enum { NPColumns, NPValues, NPRows } nowParsing_;
+enum class NP { Columns, Values, Rows } nowParsing_;
 
 private:
 MorkParser(const MorkParser &) = delete;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Noel Grandin
 svx/source/form/fmshell.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 69c3e6bf84d87c072d39660e9451c656c317bead
Author: Noel Grandin 
Date:   Thu Dec 1 14:56:33 2016 +0200

fix bug in FmFormShell::GetState

Found when attempting an enum conversion.

Not sure what effect this will have, it was introduced with

commit a0c7b2bc4511da87c776b92aaa77ba7680542fa1
Author: Oliver Bolte 
Date:   Tue Nov 16 10:24:21 2004 +
INTEGRATION: CWS eforms2 (1.48.52); FILE MERGED

which pushed a whole bunch of stuff together.

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

diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 2b21ee7..9aa9986 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -1027,7 +1027,7 @@ void FmFormShell::GetState(SfxItemSet &rSet)
 rSet.DisableItem( nWhich );
 else
 {
-if ( !GetImpl()->canConvertCurrentSelectionToControl( 
OBJ_FM_FIXEDTEXT ) )
+if ( !GetImpl()->canConvertCurrentSelectionToControl( 
SID_FM_CONVERTTO_FIXEDTEXT ) )
 // if it cannot be converted to a fixed text, it is no 
single control
 rSet.DisableItem( nWhich );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Stephan Bergmann
 unotools/source/config/pathoptions.cxx |   17 +
 1 file changed, 17 insertions(+)

New commits:
commit 7f9338f4b8dc1e112d4268868bcc651764969645
Author: Stephan Bergmann 
Date:   Tue Nov 29 15:01:21 2016 +0100

Allow extensions to provide color palettes

Until now, .oxt extensions cannot provide additional color palettes (.soc 
files,
see e.g. Draw's "Format - Area... - Area - Color - Colors - Palette:" 
drop-down
list).  There are two ways how this feature could be added:

Either add a new file-entry media-type to extensions' META-INF/manifest.xml 
and
add support for that in the code.

Or leverage the existing code, which reads the configuration set
/org.openoffice.Office.Paths/Paths/Palette/InternalPaths, where each set 
element
denotes a directory, and scans those directories for .soc files.  So an
extension would include an .xcu file adding such a path (using %origin% to
denote a directory within the .oxt file itself) and a directory with one or 
more
.soc files.

For simplicity, this commit uses the second way.  The only problem with the
existing code is that extension configuration data using %origin% is 
rewritten
to vnd.sun.star.expand URIs which the palette-scanning code does not 
support.
So extend SvtPathOptions_Impl::GetPath's PATH_PALETTE case to expand such 
URIs.
(The choice of doing it in SvtPathOptions is somewhat arbitrary; there 
would be
other, more generic places where it might make sense to do such expansion, 
but
which would also carry a higher risk of regressions.)

 contains an example of 
such an
extension (with a LibreOffice-minimal-version of "LibreOffice 5.3", assuming
this commit will be backported to upcoming LO 5.3).

Some drawbacks of going this way are:

* No control over where extension palettes appear in the palette drop-down
  lists.  (But those lists appear to be sorted in some random order, 
anyway?)

* Commit on future support of the .soc file format (which, however, is XML) 
and
  the /org.openoffice.Office.Paths/Paths/Palette/InternalPaths 
configuration set
  in a backward-compatible way.  (But any other way of implementing this 
feature
  would also need a similar commitment.)

* Somewhat odd, indirect approach where an extension specifies a directory
  filled with .soc files, instead of specifying the .soc files diretly.

* With the current palette-management code, live extension addition/removal 
is
  not immediately reflected in all places that offer palette drop-down 
lists.
  (But this should be fixable, and would be an issue with other approaches,
  too.)

Change-Id: I68b30127d61764d1b5349f1f2af9c712828bee3e
(cherry picked from commit e2ea7bb3a6b681822a247e8c277694f921c92273)
Reviewed-on: https://gerrit.libreoffice.org/31501
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/unotools/source/config/pathoptions.cxx 
b/unotools/source/config/pathoptions.cxx
index 7b64c91..d905245 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -32,6 +32,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -237,6 +238,22 @@ const OUString& SvtPathOptions_Impl::GetPath( 
SvtPathOptions::Paths ePath )
 osl::FileBase::getSystemPathFromFileURL( aPathValue, aResult );
 aPathValue = aResult;
 }
+else if (ePath == SvtPathOptions::PATH_PALETTE)
+{
+auto ctx = comphelper::getProcessComponentContext();
+OUStringBuffer buf;
+for (sal_Int32 i = 0;;)
+{
+buf.append(
+comphelper::getExpandedUri(
+ctx, aPathValue.getToken(0, ';', i)));
+if (i == -1) {
+break;
+}
+buf.append(';');
+}
+aPathValue = buf.makeStringAndClear();
+}
 
 m_aPathArray[ ePath ] = aPathValue;
 return m_aPathArray[ ePath ];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Caolán McNamara
 xmloff/source/text/txtparae.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 09b856289c44c0fe792082b681d48cf5ee70d808
Author: Caolán McNamara 
Date:   Thu Dec 1 21:15:00 2016 +

crashtesting: a gadzillion failures on export to odp

e.g. fdo35235-1.odp

Change-Id: I259cdc9ed073be2ad7d5208cd943d4f193f09c16
(cherry picked from commit f1c08d6503442ec257aa8535dfbe3743c743e4a0)

diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index d25e527..12a7103 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -1643,6 +1643,9 @@ void XMLTextParagraphExport::exportText(
 GetExport().GetShapeExport(); // make sure the graphics styles family
   // is added
 Reference < XEnumerationAccess > xEA( rText, UNO_QUERY );
+if( ! xEA.is() )
+return;
+
 Reference < XEnumeration > xParaEnum(xEA->createEnumeration());
 Reference < XPropertySet > xPropertySet( rText, UNO_QUERY );
 Reference < XTextSection > xBaseSection;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Caolán McNamara
 vcl/unx/generic/gdi/gdiimpl.cxx |   13 ++---
 1 file changed, 2 insertions(+), 11 deletions(-)

New commits:
commit 8cc096b2f43f02186da55050f357e7439350538b
Author: Caolán McNamara 
Date:   Wed Nov 30 14:47:23 2016 +

ditch old SAL_DO_NOT_USE_INVERT50 env var

Change-Id: I1b23db2335827cab6f1b98b40103b0508928b66e

diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index ed7b377..4e367a6 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -377,17 +377,8 @@ GC X11SalGraphicsImpl::GetInvert50GC()
   | GCFillStyle
   | GCStipple;
 
-char* pEnv = getenv( "SAL_DO_NOT_USE_INVERT50" );
-if( pEnv && ! strcasecmp( pEnv, "true" ) )
-{
-values.fill_style = FillSolid;
-nValueMask &= ~ GCStipple;
-}
-else
-{
-values.fill_style   = FillStippled;
-values.stipple  = mrParent.GetDisplay()->GetInvert50( 
mrParent.m_nXScreen );
-}
+values.fill_style   = FillStippled;
+values.stipple  = mrParent.GetDisplay()->GetInvert50( 
mrParent.m_nXScreen );
 
 mpInvert50GC = XCreateGC( mrParent.GetXDisplay(), 
mrParent.GetDrawable(),
   nValueMask,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Caolán McNamara
 xmloff/source/text/txtparae.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit f1c08d6503442ec257aa8535dfbe3743c743e4a0
Author: Caolán McNamara 
Date:   Thu Dec 1 21:15:00 2016 +

crashtesting: a gadzillion failures on export to odp

e.g. fdo35235-1.odp

Change-Id: I259cdc9ed073be2ad7d5208cd943d4f193f09c16

diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 8e515c4..0ba5f9d 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -1643,6 +1643,9 @@ void XMLTextParagraphExport::exportText(
 GetExport().GetShapeExport(); // make sure the graphics styles family
   // is added
 Reference < XEnumerationAccess > xEA( rText, UNO_QUERY );
+if( ! xEA.is() )
+return;
+
 Reference < XEnumeration > xParaEnum(xEA->createEnumeration());
 Reference < XPropertySet > xPropertySet( rText, UNO_QUERY );
 Reference < XTextSection > xBaseSection;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: minutes of ESC call ...

2016-12-01 Thread Xisco Fauli

Hello,

I've just created the event for FOSDEM and now I see it as 'undifined' 
in the events section. Is that correct and enough for the event creation?


Regards

El 01/12/16 a les 19:32, Michael Meeks ha escrit:

* Present:
 + Thorsten, Stephan, Heiko, Björn, Olivier, Kendy,
   janI, Caolán, Michael S, Jan-Marek, Eike, Sophie,
   Miklos, Xisco, Andras (left 16:25), Christian, Michael M

* Completed Action Items:
 + marked osl::Condition deprecated (Michael)
  
* Pending Action Items:

 + poke at MSDN licenses (Michael)
 + ask Tamás Bunth how he feels about Firebird default (Lionel)
 + move git-dm to gerrit (Norbert)
  
* Release Engineering update (Christian)

 + 5.2.4.1 status (Cloph)
 + tagged, and announced  for early testing
 + RC2 in two weeks
 + 5.3.0 Beta1 & branch
 + Late features:
  + separating images and icons for help modules (Olivier, Bubli)
 + misc. PDF signing / embedding bits (Miklos)
 + most probably finished the next week
 + Firebird by default ? (Lionel)
 => suggest to enable this on master for 5.4
 + 5.3.0 Beta2 the next week (Cloph)
 + bugfixes + update of the translation templates
 
 + Android & iOS Remote (Cloph)

 + tinderbox breakage, fixed
 + preparing a new build based on the branch-off tag -> app-store 
tomorrow.
 + updated the application icon, and released the new version
 + online (Michael)
+ branched for -5-3
  
* FOSDEM talks

  + https://penta.fosdem.org/submission/FOSDEM17/event/new
https://penta.fosdem.org/user/new_account/FOSDEM17 if you don’t have 
account yet
  + DEADLINE is Monday!
  + 20 minutes sessions is fine! :-)
  + who is going  ?
  + Xisco: interoperability regression testing
  + Kendy: Something wrt. Online
  + Andras: ???
  + Bjoern: IDE integration (already submitted), SwClient/Modify 
Horrorshow (possibly)
  + Stephan: Extensions
  + cloph: no topic yet
  + Heiko: Contextual groups Notebookbar
  + Olivier: XHP in your browser
   + caolan: gtk3 and wayland status
   + Eike: ?
  + Thorsten/Bubli/Samuel/Armin: TBD tomorrow
  + Michael: “threading nightmares”

* Documentation (Olivier)
  + important patch from Bubli that need to go in 5.3
  + separating images and icons for help modules
   + https://gerrit.libreoffice.org/#/c/30958/
   + https://gerrit.libreoffice.org/#/c/30959/
  + why not just push it ? (Michael)
+ will mark tons of strings as modified in pootle (Thorsten)
+ unless we can avoid touching the strings ? (Olivier)
+ perhaps a script; but script neeeds writing (Sophie)
+ somewhat less motivated to push for 5.3 here (Thorsten)
+ do we really need this in 5.3 ?
+ will be screenshots (Olivier)
+ unlikely help authors will need the screen-shotting 
for 5-3- (Thorsten)
=> defer and script properly for master; re-visit next week.
+ Cloph has script templates
+ but needs examples of the changes to the UI 
files.
AI: + provide information for cloph on what the change is 
(Olivier)
   + Several patches into help by Gabor Kelemen,
  + janitoring Math deleted features
   + New chapters of books to be revised
   + Brazilians finished Getting started Guide 5.0, will publish next week
   + So far we have issues with translations;
templates for PT_br are not up-loaded.
It is included (Sophie)
  
* UX Update (Heiko)

   + Bugzilla (topicUI) statistics
 257(257) (topicUI) bugs open, 494(494) (needsUXEval) needs to be evaluated 
by the UXteam
+ Updates:
BZ changes   1 week   1 month3 months   12 months
 added  7(1) 21(5)  65(0)  492(5)
 commented 54(9)235(41)987(51)2825(64)
   removed  0(0)  1(-1) 26(0)   30(0)
  resolved  7(7) 16(-23)   112(2)  128(6)
+ top 10 contributors:
  Heiko Tietze made 55 changes in 1 month, and 525 changes in 1 year
  Yousuf Philips made 14 changes in 1 month, and 408 changes in 1 year
  *UNKNOWN* made 13 changes in 1 month, and 13 changes in 1 year
  *UNKNOWN* made 13 changes in 1 month, and 103 changes in 1 year
  Samuel Mehrbrodt made 10 changes in 1 month, and 47 changes in 1 year
  Rene Engelhard made 10 changes in 1 month, and 10 changes in 1 year
  Tor Lillqvist made 8 changes in 1 month, and 9 changes in 1 year
  *UNKNOWN* made 8 changes in 1 month, and 18 changes in 1 year
  Björn Michaelsen made

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

2016-12-01 Thread Miklos Vajna
 xmlsecurity/qa/unit/pdfsigning/data/small.pdf |binary
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |2 ++
 xmlsecurity/source/pdfio/pdfdocument.cxx  |6 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit c4cb8b5d1460bbf080366817d26c08685490d541
Author: Miklos Vajna 
Date:   Thu Dec 1 17:31:41 2016 +0100

xmlsecurity PDF verify: avoid seeking before the start of the stream

Happened when the doc was smaller than 1024 bytes.

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

diff --git a/xmlsecurity/qa/unit/pdfsigning/data/small.pdf 
b/xmlsecurity/qa/unit/pdfsigning/data/small.pdf
new file mode 100644
index 000..6067545
Binary files /dev/null and b/xmlsecurity/qa/unit/pdfsigning/data/small.pdf 
differ
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx 
b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index 6e5e476..fae2a71 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -394,6 +394,8 @@ void PDFSigningTest::testTokenize()
 OUStringLiteral("name-bracket.pdf"),
 // %%EOF at the end wasn't followed by a newline.
 OUStringLiteral("noeol.pdf"),
+// File that's intentionally smaller than 1024 bytes.
+OUStringLiteral("small.pdf"),
 };
 
 for (const auto& rName : aNames)
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx 
b/xmlsecurity/source/pdfio/pdfdocument.cxx
index 3adf025..fd36477 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -1392,7 +1392,11 @@ size_t PDFDocument::FindStartXRef(SvStream& rStream)
 // Find the "startxref" token, somewhere near the end of the document.
 std::vector aBuf(1024);
 rStream.Seek(STREAM_SEEK_TO_END);
-rStream.SeekRel(static_cast(-1) * aBuf.size());
+if (rStream.Tell() > aBuf.size())
+rStream.SeekRel(static_cast(-1) * aBuf.size());
+else
+// The document is really short, then just read it from the start.
+rStream.Seek(0);
 size_t nBeforePeek = rStream.Tell();
 size_t nSize = rStream.ReadBytes(aBuf.data(), aBuf.size());
 rStream.Seek(nBeforePeek);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Miklos Vajna
 xmlsecurity/qa/unit/pdfsigning/data/noeol.pdf |binary
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |2 +
 xmlsecurity/source/pdfio/pdfdocument.cxx  |   42 --
 3 files changed, 41 insertions(+), 3 deletions(-)

New commits:
commit b1f91c0a04dd751d4f6cb8352bcbaa16c9388285
Author: Miklos Vajna 
Date:   Thu Dec 1 15:30:25 2016 +0100

xmlsecurity PDF verify: handle no EOL at EOF

From a comment's point of view, EOF is just a terminator, similar to \r
or \n.

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

diff --git a/xmlsecurity/qa/unit/pdfsigning/data/noeol.pdf 
b/xmlsecurity/qa/unit/pdfsigning/data/noeol.pdf
new file mode 100644
index 000..d870f89
Binary files /dev/null and b/xmlsecurity/qa/unit/pdfsigning/data/noeol.pdf 
differ
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx 
b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index 945bfd3..6e5e476 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -392,6 +392,8 @@ void PDFSigningTest::testTokenize()
 OUStringLiteral("cr-comment.pdf"),
 // ']' in a name token was mishandled.
 OUStringLiteral("name-bracket.pdf"),
+// %%EOF at the end wasn't followed by a newline.
+OUStringLiteral("noeol.pdf"),
 };
 
 for (const auto& rName : aNames)
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx 
b/xmlsecurity/source/pdfio/pdfdocument.cxx
index 1c949b1..3adf025 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -1009,7 +1009,10 @@ bool PDFDocument::Tokenize(SvStream& rStream, 
TokenizeMode eMode, std::vector< s
 rElements.push_back(std::unique_ptr(pComment));
 rStream.SeekRel(-1);
 if (!rElements.back()->Read(rStream))
+{
+SAL_WARN("xmlsecurity.pdfio", "PDFDocument::Tokenize: 
PDFCommentElement::Read() failed");
 return false;
+}
 if (eMode == TokenizeMode::EOF_TOKEN && !m_aEOFs.empty() && 
m_aEOFs.back() == rStream.Tell())
 {
 // Found EOF and partial parsing requested, we're done.
@@ -1030,7 +1033,10 @@ bool PDFDocument::Tokenize(SvStream& rStream, 
TokenizeMode eMode, std::vector< s
 else
 rElements.push_back(std::unique_ptr(new 
PDFHexStringElement()));
 if (!rElements.back()->Read(rStream))
+{
+SAL_WARN("xmlsecurity.pdfio", "PDFDocument::Tokenize: 
PDFDictionaryElement::Read() failed");
 return false;
+}
 break;
 }
 case '>':
@@ -1039,7 +1045,10 @@ bool PDFDocument::Tokenize(SvStream& rStream, 
TokenizeMode eMode, std::vector< s
 --nDictionaryDepth;
 rStream.SeekRel(-1);
 if (!rElements.back()->Read(rStream))
+{
+SAL_WARN("xmlsecurity.pdfio", "PDFDocument::Tokenize: 
PDFEndDictionaryElement::Read() failed");
 return false;
+}
 break;
 }
 case '[':
@@ -1055,7 +1064,10 @@ bool PDFDocument::Tokenize(SvStream& rStream, 
TokenizeMode eMode, std::vector< s
 }
 rStream.SeekRel(-1);
 if (!rElements.back()->Read(rStream))
+{
+SAL_WARN("xmlsecurity.pdfio", "PDFDocument::Tokenize: 
PDFArrayElement::Read() failed");
 return false;
+}
 break;
 }
 case ']':
@@ -1064,7 +1076,10 @@ bool PDFDocument::Tokenize(SvStream& rStream, 
TokenizeMode eMode, std::vector< s
 pArray = nullptr;
 rStream.SeekRel(-1);
 if (!rElements.back()->Read(rStream))
+{
+SAL_WARN("xmlsecurity.pdfio", "PDFDocument::Tokenize: 
PDFEndArrayElement::Read() failed");
 return false;
+}
 break;
 }
 case '/':
@@ -1073,7 +1088,10 @@ bool PDFDocument::Tokenize(SvStream& rStream, 
TokenizeMode eMode, std::vector< s
 rElements.push_back(std::unique_ptr(pNameElement));
 rStream.SeekRel(-1);
 if (!pNameElement->Read(rStream))
+{
+SAL_WARN("xmlsecurity.pdfio", "PDFDocument::Tokenize: 
PDFNameElement::Read() failed");
 return false;
+}
 if (pObject && pObjectKey && pObjectKey->GetValue() == "Type" && 
pNameElement->GetValue() == "ObjStm")
 pObjectStream = pObject;
 else
@@ -1085,7 +1103,10 @@ bool PDFDocument::Tokenize(SvStream& rStream, 
TokenizeMode eMode, std::vector< s
 rElements.push_back(std::unique_ptr(new 
PDFLiteralStringElement()));
 rStream.SeekRel(-1);
 if (!rElements.back()->Read(rStream))
+   

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

2016-12-01 Thread Miklos Vajna
 xmlsecurity/inc/sigstruct.hxx|3 
 xmlsecurity/qa/unit/pdfsigning/data/name-bracket.pdf | 2241 +++
 xmlsecurity/qa/unit/pdfsigning/data/partial.pdf  |binary
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx|   13 
 xmlsecurity/source/helper/pdfsignaturehelper.cxx |1 
 xmlsecurity/source/pdfio/pdfdocument.cxx |   25 
 6 files changed, 2272 insertions(+), 11 deletions(-)

New commits:
commit cdf2ae1b6611976816fa60aae370893657c622d0
Author: Miklos Vajna 
Date:   Thu Dec 1 15:05:19 2016 +0100

xmlsecurity PDF verify: fix reading names containing ']'

Also fix parsing '<< /Foo [ /Bar ] >>'.

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

diff --git a/xmlsecurity/qa/unit/pdfsigning/data/name-bracket.pdf 
b/xmlsecurity/qa/unit/pdfsigning/data/name-bracket.pdf
new file mode 100644
index 000..ac15279
--- /dev/null
+++ b/xmlsecurity/qa/unit/pdfsigning/data/name-bracket.pdf
@@ -0,0 +1,2241 @@
+%PDF-1.7
+%öäüß
+1 0 obj
+<<
+/Metadata 2 0 R
+/Outlines 3 0 R
+/OutputIntents [4 0 R]
+/PageLabels 5 0 R
+/Pages 6 0 R
+/Type /Catalog
+/Extensions <<
+/ESIC <<
+/BaseVersion /1.7
+/ExtensionLevel 2
+>>
+/LTUd <<
+/BaseVersion /1.7
+/ExtensionLevel 1
+>>
+>>
+>>
+endobj
+7 0 obj
+<<
+/Author (Petras)
+/CreationDate (D:20120616164408+03'00')
+/Creator (PScript5.dll Version 5.2.2)
+/ModDate (D:20120616164534+03'00')
+/Producer (Acrobat Distiller 10.1.3 \(Windows\))
+/Title (Untitled - Notepad)
+>>
+endobj
+2 0 obj
+<<
+/Type /Metadata
+/Subtype /XML
+/Length 8 0 R
+>>
+stream
+
+
+  http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
+http://www.aiim.org/pdfa/ns/extension/";
+xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#";
+xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#";
+xmlns:pdfaType="http://www.aiim.org/pdfa/ns/type#";
+xmlns:pdfaField="http://www.aiim.org/pdfa/ns/field#";>
+  
+
+  
+PDF-LT-V1.0 elektroninio dokumento metaduomenų 
plėtinio schema
+
http://archyvai.lt/pdf-ltud/2011/metadata/
+LTUd
+
+  
+
+  standardVersion
+  closed Choice of 
Text
+  internal
+  Elektroninio dokumento 
specifikacijos identifikatorius (pvz., PDF-LT-V1.0)
+
+
+  authors
+  seq Entity
+  external
+  Dokumento sudarytojas 
(-ai)
+
+
+  recipients
+  seq Entity
+  external
+  Dokumento adresatas 
(-ai)
+
+
+  instanceIdentifier
+  Text
+  external
+  Dokumento egzemplioriaus 
identifikatorius
+
+
+  originalRegistrations
+  seq 
Registration
+  external
+  Originalaus dokumento registracija 
(-os) kopijoje
+
+
+  originalReceptions
+  seq 
Registration
+  external
+  Gauto originalaus dokumento 
registracija (-os) kopijoje
+
+
+  originalReceivers
+  seq Entity
+  external
+  Originalaus dokumento gavėjas 
(-ai) kopijoje
+
+
+  registration
+  Registration
+  external
+  Sudaryto dokumento 
registracija
+
+
+  reception
+  Registration
+  external
+  Gauto dokumento 
registracija
+
+
+  receiver
+  Entity
+  external
+  Dokumento 
gavėjas
+
+  
+
+
+  
+
+  Asmuo (sudarytojas, adresatas, 
gavėjas)
+  
http://archyvai.lt/pdf-ltud/2011/metadata/Entity/
+  LTUdEnt
+  Entity
+  
+
+  
+individual
+Boolean
+Požymis: fizinis (taip) ar 
juridinis (ne) asmuo
+  
+  
+name
+Text
+Juridinio asmens pavadinimas 
arba fizinio asmens vardas ir pavardė
+  
+  
+code
+Text
+Juridinio ar fizinio asmens 
k

[Libreoffice-commits] core.git: configure.ac include/vcl vcl/inc vcl/Library_vcl.mk vcl/quartz vcl/source vcl/unx vcl/win

2016-12-01 Thread Khaled Hosny
 configure.ac   |7 
 include/vcl/fontcapabilities.hxx   |1 
 vcl/Library_vcl.mk |1 
 vcl/inc/salglyphid.hxx |3 
 vcl/inc/sallayout.hxx  |3 
 vcl/inc/sft.hxx|5 
 vcl/inc/unx/freetype_glyphcache.hxx|   30 --
 vcl/inc/unx/glyphcache.hxx |   12 
 vcl/quartz/salgdi.cxx  |   19 -
 vcl/quartz/salgdicommon.cxx|   12 
 vcl/source/fontsubset/gsub.cxx |  342 -
 vcl/source/fontsubset/gsub.h   |   38 --
 vcl/source/fontsubset/sft.cxx  |   32 --
 vcl/source/gdi/pdffontcache.cxx|   13 
 vcl/source/gdi/pdfwriter_impl.cxx  |8 
 vcl/source/gdi/sallayout.cxx   |   39 --
 vcl/unx/generic/glyphs/freetype_glyphcache.cxx |  142 --
 vcl/unx/generic/print/genpspgraphics.cxx   |2 
 vcl/win/gdi/salfont.cxx|   26 -
 19 files changed, 23 insertions(+), 712 deletions(-)

New commits:
commit dacd0e94199f154cac5875ec06430df6947e251b
Author: Khaled Hosny 
Date:   Thu Dec 1 08:27:01 2016 +0200

Unused code

Change-Id: Idfc964930c242d752a78cd109d75d809bce4de11
Reviewed-on: https://gerrit.libreoffice.org/31470
Tested-by: Jenkins 
Reviewed-by: Khaled Hosny 

diff --git a/configure.ac b/configure.ac
index 082b311..e941aeb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7943,13 +7943,6 @@ if test  "$test_freetype" = "yes"; then
 FilterLibs "${FREETYPE_LIBS}"
 FREETYPE_LIBS="${filteredlibs}"
 SYSTEM_FREETYPE=TRUE
-_save_libs="$LIBS"
-_save_cflags="$CFLAGS"
-LIBS="$LIBS $FREETYPE_LIBS"
-CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
-AC_CHECK_FUNC(FT_Face_GetCharVariantIndex, 
AC_DEFINE(HAVE_FT_FACE_GETCHARVARIANTINDEX), [])
-LIBS="$_save_libs"
-CFLAGS="$_save_cflags"
 fi
 AC_SUBST(FREETYPE_CFLAGS)
 AC_SUBST(FREETYPE_LIBS)
diff --git a/include/vcl/fontcapabilities.hxx b/include/vcl/fontcapabilities.hxx
index c4b58c0..165a964 100644
--- a/include/vcl/fontcapabilities.hxx
+++ b/include/vcl/fontcapabilities.hxx
@@ -198,7 +198,6 @@ namespace vcl
 {
 boost::optional> 
oUnicodeRange;
 boost::optional> 
oCodePageRange;
-std::vector< sal_uInt32 > maGSUBScriptTags;
 };
 }
 
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index ce9b6c0..435e8cf 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -388,7 +388,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/font/font \
 vcl/source/fontsubset/cff \
 vcl/source/fontsubset/fontsubset \
-vcl/source/fontsubset/gsub \
 vcl/source/fontsubset/list \
 vcl/source/fontsubset/sft \
 vcl/source/fontsubset/ttcr \
diff --git a/vcl/inc/salglyphid.hxx b/vcl/inc/salglyphid.hxx
index c449e1b..dbfd95e 100644
--- a/vcl/inc/salglyphid.hxx
+++ b/vcl/inc/salglyphid.hxx
@@ -26,7 +26,6 @@ typedef sal_uInt32 sal_GlyphId;
 #define GF_NONE 0x
 #define GF_FLAGMASK 0xFF80
 #define GF_IDXMASK  ~GF_FLAGMASK
-#define GF_ISCHAR   0x0080
 #define GF_ROTL 0x0100
 
 #ifdef _WIN32
@@ -39,8 +38,6 @@ typedef sal_uInt32 sal_GlyphId;
 
 #define GF_ROTR 0x0300
 #define GF_ROTMASK  0x0300
-#define GF_UNHINTED 0x0400
-#define GF_GSUB 0x0800
 #define GF_FONTMASK 0xF000
 #define GF_FONTSHIFT 28
 
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index effb646..3df4921 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -120,9 +120,6 @@ protected:
 // For nice SAL_INFO logging of ImplLayoutArgs values
 std::ostream &operator <<(std::ostream& s, ImplLayoutArgs &rArgs);
 
-// helper functions often used with ImplLayoutArgs
-int GetVerticalFlags( sal_UCS4 );
-
 // all positions/widths are in font units
 // one exception: drawposition is in pixel units
 
diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx
index fe50a95..91c13a3 100644
--- a/vcl/inc/sft.hxx
+++ b/vcl/inc/sft.hxx
@@ -269,7 +269,6 @@ namespace vcl
 int VCL_DLLPUBLIC OpenTTFontFile(const char *fname, sal_uInt32 facenum, 
TrueTypeFont** ttf);
 #endif
 
-void getTTScripts(std::vector< sal_uInt32 > &rScriptTags, const unsigned 
char* pTable, size_t nLength);
 bool getTTCoverage(
 boost::optional> & 
rUnicodeCoverage,
 boost::optional> & 
rCodePageCoverage,
@@ -444,12 +443,10 @@ namespace vcl
  *
  * @param ttf pointer to the TrueTypeFont structure
  * @param ch  Unicode (UCS-2) character
- * @param bvertical   flag to function that we want to find the vertical
- *GlobalSUBstitution attribute
  * @return glyph ID, if the character is missing in the font, the return value 
is 0.
  * @ingroup sft
  */
-sal_uInt16 MapChar(TrueTypeFont *ttf, sal_uInt16 ch, bool bvertical);
+sal_uInt16 MapChar(TrueTypeFont *ttf, sal

Crash test update

2016-12-01 Thread Crashtest VM
New crashtest update available at 
http://dev-builds.libreoffice.org/crashtest/bef9ba5e062b340b1835db94620f7ea4fa0b123b/


exportCrashes.csv
Description: Binary data


importCrash.csv
Description: Binary data


validationErrors.csv
Description: Binary data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: comphelper/source desktop/source include/comphelper package/source

2016-12-01 Thread Michael Meeks
 comphelper/source/misc/threadpool.cxx |  266 +-
 desktop/source/app/app.cxx|4 
 include/comphelper/threadpool.hxx |   47 +++--
 package/source/zipapi/ZipOutputStream.cxx |1 
 4 files changed, 152 insertions(+), 166 deletions(-)

New commits:
commit aa68c99d88fd7abe08c4aee5206c859a0cdba38e
Author: Michael Meeks 
Date:   Thu Dec 1 11:14:24 2016 +

tdf#104126 - comphelper thread-pool, use reliable std::condition_variable.

The existing osl::Condition is an API and reliability disaster area.

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

diff --git a/comphelper/source/misc/threadpool.cxx 
b/comphelper/source/misc/threadpool.cxx
index 0fda264..6329143 100644
--- a/comphelper/source/misc/threadpool.cxx
+++ b/comphelper/source/misc/threadpool.cxx
@@ -10,11 +10,14 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
+#include 
 
 namespace comphelper {
 
@@ -26,30 +29,27 @@ static thread_local bool gbIsWorkerThread;
 // used to group thread-tasks for waiting in waitTillDone()
 class COMPHELPER_DLLPUBLIC ThreadTaskTag
 {
-osl::Mutex mMutex;
-std::size_t mnTasksWorking;
-osl::Condition maTasksComplete;
+std::mutex maMutex;
+sal_Int32 mnTasksWorking;
+std::condition_variable maTasksComplete;
 
 public:
 ThreadTaskTag();
-bool   isDone();
-void   waitUntilDone();
-void   onTaskWorkerDone();
-void   onTaskPushed();
+bool isDone();
+void waitUntilDone();
+void onTaskWorkerDone();
+void onTaskPushed();
 };
 
 
 class ThreadPool::ThreadWorker : public salhelper::Thread
 {
-ThreadPool*mpPool;
-osl::Condition maNewWork;
-bool   mbWorking;
+ThreadPool *mpPool;
 public:
 
 explicit ThreadWorker( ThreadPool *pPool ) :
 salhelper::Thread("thread-pool"),
-mpPool( pPool ),
-mbWorking( false )
+mpPool( pPool )
 {
 }
 
@@ -58,74 +58,20 @@ public:
 #if defined DBG_UTIL && defined LINUX
 gbIsWorkerThread = true;
 #endif
-while ( ThreadTask * pTask = waitForWork() )
-{
-std::shared_ptr pTag(pTask->getTag());
-try {
-pTask->doWork();
-}
-catch (const std::exception &e)
-{
-SAL_WARN("comphelper", "exception in thread worker while 
calling doWork(): " << e.what());
-}
-catch (const css::uno::Exception &e)
-{
-SAL_WARN("comphelper", "exception in thread worker while 
calling doWork(): " << e.Message);
-}
-delete pTask;
-pTag->onTaskWorkerDone();
-}
-}
-
-ThreadTask *waitForWork()
-{
-ThreadTask *pRet = nullptr;
+std::unique_lock< std::mutex > aGuard( mpPool->maMutex );
 
-osl::ResettableMutexGuard aGuard( mpPool->maGuard );
-
-pRet = mpPool->popWork();
-
-while( !pRet )
+while( !mpPool->mbTerminate )
 {
-if (mbWorking)
-mpPool->stopWork();
-mbWorking = false;
-maNewWork.reset();
-
-if( mpPool->mbTerminate )
-break;
-
-aGuard.clear(); // unlock
-
-maNewWork.wait();
-
-aGuard.reset(); // lock
+ThreadTask *pTask = mpPool->popWorkLocked( aGuard, true );
+if( pTask )
+{
+aGuard.unlock();
 
-pRet = mpPool->popWork();
-}
+pTask->execAndDelete();
 
-if (pRet)
-{
-if (!mbWorking)
-mpPool->startWork();
-mbWorking = true;
+aGuard.lock();
+}
 }
-
-return pRet;
-}
-
-// Why a condition per worker thread - you may ask.
-//
-// Unfortunately the Windows synchronisation API that we wrap
-// is horribly inadequate cf.
-//http://www.cs.wustl.edu/~schmidt/win32-cv-1.html
-// The existing osl::Condition API should only ever be used
-// between one producer and one consumer thread to avoid the
-// lost wakeup problem.
-
-void signalNewWork()
-{
-maNewWork.set();
 }
 };
 
@@ -133,19 +79,18 @@ ThreadPool::ThreadPool( sal_Int32 nWorkers ) :
 mnThreadsWorking( 0 ),
 mbTerminate( false )
 {
+std::unique_lock< std::mutex > aGuard( maMutex );
+
 for( sal_Int32 i = 0; i < nWorkers; i++ )
 maWorkers.push_back( new ThreadWorker( this ) );
 
-maTasksComplete.set();
-
-osl::MutexGuard aGuard( maGuard );
 for(rtl::Reference & rpWorker : maWorkers)
 rpWorker->launch();
 }
 
 ThreadPool::~ThreadPool()
 {
-waitAndCleanupWorkers();
+shutdown();
 }
 

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

2016-12-01 Thread Henry Castro
 loleaflet/src/control/Control.CharacterMap.js |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 09923cc10bd7829ec89ef218157c116bec34b154
Author: Henry Castro 
Date:   Thu Dec 1 14:29:58 2016 -0400

loleaflet: remove invalid fonts

Change-Id: Ie0383d01f6040d00c630c0aab6b9a6d079d3

diff --git a/loleaflet/src/control/Control.CharacterMap.js 
b/loleaflet/src/control/Control.CharacterMap.js
index c79f371..42210fe 100644
--- a/loleaflet/src/control/Control.CharacterMap.js
+++ b/loleaflet/src/control/Control.CharacterMap.js
@@ -461,6 +461,9 @@ L.Control.CharacterMap = L.Control.extend({
option.innerHTML = 
this.unicodeBlocks[list[iterator]].name;
}, this);
this._onUnicodeSubsetChange();
+   } else {
+   
L.DomUtil.remove(this._fontNames.options[this._fontNames.selectedIndex]);
+   this._onFontNamesChange();
}
},
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


minutes of ESC call ...

2016-12-01 Thread Michael Meeks
* Present:
+ Thorsten, Stephan, Heiko, Björn, Olivier, Kendy,
  janI, Caolán, Michael S, Jan-Marek, Eike, Sophie,
  Miklos, Xisco, Andras (left 16:25), Christian, Michael M

* Completed Action Items:
+ marked osl::Condition deprecated (Michael)
 
* Pending Action Items:
+ poke at MSDN licenses (Michael)
+ ask Tamás Bunth how he feels about Firebird default (Lionel)
+ move git-dm to gerrit (Norbert)
 
* Release Engineering update (Christian)
+ 5.2.4.1 status (Cloph)
+ tagged, and announced  for early testing
+ RC2 in two weeks
+ 5.3.0 Beta1 & branch
+ Late features:
  + separating images and icons for help modules (Olivier, Bubli)
+ misc. PDF signing / embedding bits (Miklos)
+ most probably finished the next week
+ Firebird by default ? (Lionel)
=> suggest to enable this on master for 5.4
+ 5.3.0 Beta2 the next week (Cloph)
+ bugfixes + update of the translation templates

+ Android & iOS Remote (Cloph)
+ tinderbox breakage, fixed
+ preparing a new build based on the branch-off tag -> app-store 
tomorrow.
+ updated the application icon, and released the new version
+ online (Michael)
+ branched for -5-3
 
* FOSDEM talks
 + https://penta.fosdem.org/submission/FOSDEM17/event/new
   https://penta.fosdem.org/user/new_account/FOSDEM17 if you don’t have 
account yet
 + DEADLINE is Monday!
 + 20 minutes sessions is fine! :-)
 + who is going  ?
 + Xisco: interoperability regression testing
 + Kendy: Something wrt. Online
 + Andras: ???
 + Bjoern: IDE integration (already submitted), SwClient/Modify 
Horrorshow (possibly)
 + Stephan: Extensions
 + cloph: no topic yet
 + Heiko: Contextual groups Notebookbar
 + Olivier: XHP in your browser
   + caolan: gtk3 and wayland status
   + Eike: ?
 + Thorsten/Bubli/Samuel/Armin: TBD tomorrow
 + Michael: “threading nightmares”

* Documentation (Olivier)
 + important patch from Bubli that need to go in 5.3
 + separating images and icons for help modules
  + https://gerrit.libreoffice.org/#/c/30958/
  + https://gerrit.libreoffice.org/#/c/30959/
 + why not just push it ? (Michael)
+ will mark tons of strings as modified in pootle (Thorsten)
+ unless we can avoid touching the strings ? (Olivier)
+ perhaps a script; but script neeeds writing (Sophie)
+ somewhat less motivated to push for 5.3 here (Thorsten)
+ do we really need this in 5.3 ?
+ will be screenshots (Olivier)
+ unlikely help authors will need the screen-shotting 
for 5-3- (Thorsten)
=> defer and script properly for master; re-visit next week.
+ Cloph has script templates
+ but needs examples of the changes to the UI 
files.
AI: + provide information for cloph on what the change is 
(Olivier)
  + Several patches into help by Gabor Kelemen, 
 + janitoring Math deleted features
  + New chapters of books to be revised 
  + Brazilians finished Getting started Guide 5.0, will publish next week
  + So far we have issues with translations;
templates for PT_br are not up-loaded.
It is included (Sophie)
 
* UX Update (Heiko)
  + Bugzilla (topicUI) statistics
257(257) (topicUI) bugs open, 494(494) (needsUXEval) needs to be evaluated 
by the UXteam
   + Updates:
   BZ changes   1 week   1 month3 months   12 months  
added  7(1) 21(5)  65(0)  492(5)  
commented 54(9)235(41)987(51)2825(64) 
  removed  0(0)  1(-1) 26(0)   30(0)  
 resolved  7(7) 16(-23)   112(2)  128(6)  
   + top 10 contributors:
 Heiko Tietze made 55 changes in 1 month, and 525 changes in 1 year
 Yousuf Philips made 14 changes in 1 month, and 408 changes in 1 year
 *UNKNOWN* made 13 changes in 1 month, and 13 changes in 1 year
 *UNKNOWN* made 13 changes in 1 month, and 103 changes in 1 year
 Samuel Mehrbrodt made 10 changes in 1 month, and 47 changes in 1 year
 Rene Engelhard made 10 changes in 1 month, and 10 changes in 1 year
 Tor Lillqvist made 8 changes in 1 month, and 9 changes in 1 year
 *UNKNOWN* made 8 changes in 1 month, and 18 changes in 1 year
 Björn Michaelsen made 7 changes in 1 month, and 26 changes in 1 year
 V Stuart Foote made 6 changes in 1 month, and 198 changes in 1 year
  + hot topics
   + concerns wrt. The new landing page layout for Help
 + happy to improve look & UK (Olivier)
 + if content stays the same, no p

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

2016-12-01 Thread Mike Kaganski
 sc/qa/unit/bugfix-test.cxx |   76 ++
 sc/qa/unit/data/xlsx/tdf104310.xlsx|binary
 sc/source/filter/inc/worksheetfragment.hxx |   36 -
 sc/source/filter/oox/extlstcontext.cxx |8 -
 sc/source/filter/oox/worksheetfragment.cxx |  203 -
 5 files changed, 199 insertions(+), 124 deletions(-)

New commits:
commit 0afbe8d5ca17c4e24bb49272dc6711925f82f5d5
Author: Mike Kaganski 
Date:   Thu Dec 1 07:38:32 2016 +0300

tdf#104310: Accept also x14-style dataValidations

See https://msdn.microsoft.com/en-us/library/dd921584

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

diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx
index 649eba9..9b7f2b7 100644
--- a/sc/qa/unit/bugfix-test.cxx
+++ b/sc/qa/unit/bugfix-test.cxx
@@ -7,66 +7,10 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "drwlayer.hxx"
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include "validat.hxx"
-#include "formulacell.hxx"
-#include "userdat.hxx"
-#include "dpobject.hxx"
-#include "dpsave.hxx"
-#include "stlsheet.hxx"
-#include "docfunc.hxx"
-#include "markdata.hxx"
-#include "colorscale.hxx"
-#include "olinetab.hxx"
-#include "patattr.hxx"
-#include "scitems.hxx"
-#include "docsh.hxx"
-#include "editutil.hxx"
-#include "cellvalue.hxx"
-#include "attrib.hxx"
-#include "dpshttab.hxx"
 #include "tabvwsh.hxx"
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include 
-
 #include "helper/qahelper.hxx"
-#include "helper/shared_test_impl.hxx"
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -91,6 +35,7 @@ public:
 void testTdf88821_2();
 void testTdf103960();
 void testRhbz1390776();
+void testTdf104310();
 
 CPPUNIT_TEST_SUITE(ScFiltersTest);
 CPPUNIT_TEST(testTdf64229);
@@ -104,6 +49,7 @@ public:
 CPPUNIT_TEST(testTdf88821_2);
 CPPUNIT_TEST(testTdf103960);
 CPPUNIT_TEST(testRhbz1390776);
+CPPUNIT_TEST(testTdf104310);
 CPPUNIT_TEST_SUITE_END();
 private:
 uno::Reference m_xCalcComponent;
@@ -294,6 +240,24 @@ void ScFiltersTest::testRhbz1390776()
 xDocSh->DoClose();
 }
 
+void ScFiltersTest::testTdf104310()
+{
+ScDocShellRef xDocSh = loadDoc("tdf104310.", FORMAT_XLSX);
+ScDocument& rDoc = xDocSh->GetDocument();
+
+const ScValidationData* pData = rDoc.GetValidationEntry(1);
+CPPUNIT_ASSERT(pData);
+
+// Make sure the list is correct.
+std::vector aList;
+pData->FillSelectionList(aList, ScAddress(0, 1, 0));
+CPPUNIT_ASSERT_EQUAL(size_t(5), aList.size());
+for (size_t i = 0; i < 5; ++i)
+CPPUNIT_ASSERT_DOUBLES_EQUAL(double(i+1), aList[i].GetValue(), 1e-8);
+
+xDocSh->DoClose();
+}
+
 ScFiltersTest::ScFiltersTest()
   : ScBootstrapFixture( "/sc/qa/unit/data" )
 {
diff --git a/sc/qa/unit/data/xlsx/tdf104310.xlsx 
b/sc/qa/unit/data/xlsx/tdf104310.xlsx
new file mode 100644
index 000..95570d3
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf104310.xlsx differ
diff --git a/sc/source/filter/inc/worksheetfragment.hxx 
b/sc/source/filter/inc/worksheetfragment.hxx
index 0cd02b3..2fb52cb 100644
--- a/sc/source/filter/inc/worksheetfragment.hxx
+++ b/sc/source/filter/inc/worksheetfragment.hxx
@@ -25,7 +25,25 @@
 namespace oox {
 namespace xls {
 
-class DataValidationsContext : public WorksheetContextBase
+class DataValidationsContext_Base {
+public:
+   DataValidationsContext_Base() {}
+void   SetSqref(const OUString& rChars) { mSqref = 
rChars; }
+void   SetFormula1(const OUString& rChars) { 
mFormula1 = rChars; }
+void   SetFormula2(const OUString& rChars) { 
mFormula2 = rChars; }
+void   SetValidation(::oox::xls::WorksheetHelper& 
rTarget);
+/** Imports the dataValidation element containing data validation 
settings. */
+void   importDataValidation(const AttributeList& 
rAttribs);
+/** Imports the DATAVALIDATION record containing data validation settings. 
*/
+static voidimportDataValidation(SequenceInputStream& 
rStrm, ::oox::xls::WorksheetHelper& rTarget);
+private:
+::std::unique_ptr< ValidationModel > mxValModel;
+OUString mSqref;
+OUString mFormula1;
+OUString mFormula2;
+};
+
+class DataValidationsContext : public WorksheetContextBase, private 
DataValidationsContext_Base
 {
 public:
 ex

[Libreoffice-commits] core.git: svx/sdi sw/uiconfig

2016-12-01 Thread Muhammet Kara
 svx/sdi/svx.sdi   |2 +-
 sw/uiconfig/swriter/toolbar/textobjectbar.xml |2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 83b7e1f424a3fb0963b064e77d973e5f655fac1a
Author: Muhammet Kara 
Date:   Thu Dec 1 13:39:16 2016 +0300

Add toolbar button for page orientation

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

diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 2e8b2f6..99a8bc0 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -6242,7 +6242,7 @@ SvxPageItem Orientation SID_ATTR_PAGE_ORIENTATION
 
 AccelConfig = FALSE,
 MenuConfig = FALSE,
-ToolBoxConfig = FALSE,
+ToolBoxConfig = TRUE,
 GroupId = GID_FORMAT;
 ]
 
diff --git a/sw/uiconfig/swriter/toolbar/textobjectbar.xml 
b/sw/uiconfig/swriter/toolbar/textobjectbar.xml
index 43e80fd..70619e3 100644
--- a/sw/uiconfig/swriter/toolbar/textobjectbar.xml
+++ b/sw/uiconfig/swriter/toolbar/textobjectbar.xml
@@ -76,6 +76,8 @@
  
  
  
+ 
+ 
  
  
  
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Jean-Tiare Le Bigot
 chart2/qa/extras/chart2import.cxx|   17 -
 chart2/source/tools/InternalDataProvider.cxx |7 ++-
 2 files changed, 14 insertions(+), 10 deletions(-)

New commits:
commit 18b3138a7ac4da823e41640bed8a4707029b8fb0
Author: Jean-Tiare Le Bigot 
Date:   Mon Nov 28 09:09:55 2016 +0100

tdf#102621: import empty chart cells as NaN instead of 0

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

diff --git a/chart2/qa/extras/chart2import.cxx 
b/chart2/qa/extras/chart2import.cxx
index b508f3e..be36047 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -25,7 +25,6 @@
 
 #include 
 
-
 class Chart2ImportTest : public ChartTest
 {
 public:
@@ -413,13 +412,13 @@ void Chart2ImportTest::testPPTXSparseChartSeries()
 
 std::vector > aValues = 
getDataSeriesYValuesFromChartType(xCT);
 CPPUNIT_ASSERT_EQUAL(size_t(2), aValues.size());
-CPPUNIT_ASSERT_EQUAL(0.0,  aValues[0][0]);
+CPPUNIT_ASSERT( rtl::math::isNan( aValues[0][0] ) );
 CPPUNIT_ASSERT_EQUAL(2.5,  aValues[0][1]);
 CPPUNIT_ASSERT_EQUAL(3.5,  aValues[0][2]);
-CPPUNIT_ASSERT_EQUAL(0.0,  aValues[0][3]);
+CPPUNIT_ASSERT( rtl::math::isNan( aValues[0][3] ) );
 CPPUNIT_ASSERT_EQUAL(-2.4, aValues[1][0]);
-CPPUNIT_ASSERT_EQUAL(0.0,  aValues[1][1]);
-CPPUNIT_ASSERT_EQUAL(0.0,  aValues[1][2]);
+CPPUNIT_ASSERT( rtl::math::isNan( aValues[1][1] ) );
+CPPUNIT_ASSERT( rtl::math::isNan( aValues[1][2] ) );
 CPPUNIT_ASSERT_EQUAL(-2.8, aValues[1][3]);
 }
 
@@ -1169,17 +1168,17 @@ void Chart2ImportTest::testInternalDataProvider() {
 // Parse empty first and last
 xDataSeq = rxDataProvider->createDataSequenceByValueArray("values-y", 
"{\"\";42;42;\"\"}");
 xSequence = xDataSeq->getData();
-CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(0)),  xSequence[0]);
+CPPUNIT_ASSERT( rtl::math::isNan( *static_cast(xSequence[0].getValue(;
 CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[1]);
 CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[2]);
-CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(0)),  xSequence[3]);
+CPPUNIT_ASSERT( rtl::math::isNan( *static_cast(xSequence[3].getValue(;
 
 // Parse empty middle
 xDataSeq = rxDataProvider->createDataSequenceByValueArray("values-y", 
"{42;\"\";\"\";42}");
 xSequence = xDataSeq->getData();
 CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[0]);
-CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(0)),  xSequence[1]);
-CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(0)),  xSequence[2]);
+CPPUNIT_ASSERT( rtl::math::isNan( *static_cast(xSequence[1].getValue())) );
+CPPUNIT_ASSERT( rtl::math::isNan( *static_cast(xSequence[2].getValue())) );
 CPPUNIT_ASSERT_EQUAL(uno::Any(sal_Int32(42)), xSequence[3]);
 
 // Parse mixed types, numeric only role
diff --git a/chart2/source/tools/InternalDataProvider.cxx 
b/chart2/source/tools/InternalDataProvider.cxx
index ef6facd..9f5f318 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -573,7 +573,12 @@ InternalDataProvider::createDataSequenceFromArray( const 
OUString& rArrayStr, co
 std::vector aValues;
 aValues.reserve(aRawElems.size());
 for (OUString & aRawElem : aRawElems)
-aValues.push_back(aRawElem.toDouble());
+{
+if (aRawElem.isEmpty())
+aValues.push_back(NAN);
+else
+aValues.push_back(aRawElem.toDouble());
+}
 sal_Int32 n = m_aInternalData.appendColumn();
 
 m_aInternalData.setColumnValues(n, aValues);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: common/Common.hpp common/IoUtil.cpp

2016-12-01 Thread Miklos Vajna
 common/Common.hpp |2 +-
 common/IoUtil.cpp |1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 721003512ee31068c20776e8b67d249c4453747c
Author: Miklos Vajna 
Date:   Thu Dec 1 18:15:46 2016 +0100

IoUtil: avoid multiplying at int precision, then comparing to long

Here:

if (payload.capacity() > READ_BUFFER_SIZE * 4)

Change-Id: I12e090d03b471b7394a4898d5e1a74992182051e

diff --git a/common/Common.hpp b/common/Common.hpp
index ba14fed..a0a7568 100644
--- a/common/Common.hpp
+++ b/common/Common.hpp
@@ -26,7 +26,7 @@ constexpr int WS_SEND_TIMEOUT_MS = 1000;
 /// Pipe and Socket read buffer size.
 /// Should be large enough for ethernet packets
 /// which can be 1500 bytes long.
-constexpr int READ_BUFFER_SIZE = 64 * 1024;
+constexpr long READ_BUFFER_SIZE = 64 * 1024;
 
 /// Size beyond which messages will be sent preceded with
 /// 'nextmessage' frame to let the receiver know in advance
diff --git a/common/IoUtil.cpp b/common/IoUtil.cpp
index 32238f3..b9b91cd 100644
--- a/common/IoUtil.cpp
+++ b/common/IoUtil.cpp
@@ -80,6 +80,7 @@ void SocketProcessor(const std::shared_ptr& ws,
 {
 payload.resize(payload.capacity());
 n = -1; // In case receiveFrame throws we log dropped data.
+(void)n;
 n = ws->receiveFrame(payload.data(), payload.size(), flags);
 payload.resize(std::max(n, 0));
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Thorsten Behrens
New branch 'feature/cib_contract116' available with the following commits:
commit 106fe5c1a408b7293af9f76e09426e0ac5ed4057
Author: Thorsten Behrens 
Date:   Thu Dec 1 18:05:23 2016 +0100

bump patch version

Change-Id: I436549a9306412a38d2190ce872a12d25f8f52f0

commit 18524c838c041297f01b4ed94f57ccef83563a39
Author: Markus Mohrhard 
Date:   Tue Sep 27 18:17:11 2016 +0200

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

Change-Id: I759107eeb074698d5e4987c76005788aee33287d
(cherry picked from commit 7e7f6b0a056b51a425934f63745ae5c9fed2e51f)
Reviewed-on: https://gerrit.libreoffice.org/29327
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 3b0a57d6de5931fcbd554a11cb9abdd09c34a735)

___
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-2-0' - kit/ChildSession.cpp

2016-12-01 Thread Henry Castro
 kit/ChildSession.cpp |   18 +-
 1 file changed, 13 insertions(+), 5 deletions(-)

New commits:
commit 800bc6befe96596471941ce9be35ce0ea6a76a2f
Author: Henry Castro 
Date:   Tue Nov 29 20:22:23 2016 -0400

kit: render font failure if and only if fails encode PNG

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

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 4e65d3a..dc825cd 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -362,6 +362,7 @@ bool ChildSession::loadDocument(const char * /*buffer*/, 
int /*length*/, StringT
 bool ChildSession::sendFontRendering(const char* /*buffer*/, int /*length*/, 
StringTokenizer& tokens)
 {
 std::string font, text, decodedFont, decodedChar;
+bool bSuccess;
 
 if (tokens.count() < 3 ||
 !getTokenString(tokens[1], "font", font))
@@ -404,15 +405,22 @@ bool ChildSession::sendFontRendering(const char* 
/*buffer*/, int /*length*/, Str
 
 LOG_TRC("renderFont [" << font << "] rendered in " << 
(timestamp.elapsed()/1000.) << "ms");
 
-if (!ptrFont ||
-!png::encodeBufferToPNG(ptrFont, width, height, output, 
LOK_TILEMODE_RGBA))
+if (!ptrFont)
 {
-std::free(ptrFont);
-return sendTextFrame("error: cmd=renderfont kind=failure");
+return sendTextFrame(output.data(), output.size());
+}
+
+if (png::encodeBufferToPNG(ptrFont, width, height, output, 
LOK_TILEMODE_RGBA))
+{
+bSuccess = sendTextFrame(output.data(), output.size());
+}
+else
+{
+bSuccess = sendTextFrame("error: cmd=renderfont kind=failure");
 }
 
 std::free(ptrFont);
-return sendTextFrame(output.data(), output.size());
+return bSuccess;
 }
 
 bool ChildSession::getStatus(const char* /*buffer*/, int /*length*/)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Caolán McNamara
 sw/source/core/doc/doc.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit ceab440bf2bb4d414e5bac65c385167901d5a983
Author: Caolán McNamara 
Date:   Tue Nov 15 10:22:59 2016 +

Resolves: tdf#103313 idles never get to complete postit shell formatting

Change-Id: Ic01628bca8c306c48277ffbc84d334d1922a248b
Reviewed-on: https://gerrit.libreoffice.org/30864
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit 3690218b1f5073db8407a58f1b45a97d3d6fe7cd)
Reviewed-on: https://gerrit.libreoffice.org/31446

diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index e3ae223..36b7772 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -840,6 +840,12 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
 
 // format post-it doc to get correct number of pages
 rData.m_pPostItShell->CalcLayout();
+
+SwRootFrame* pPostItRoot = rData.m_pPostItShell->GetLayout();
+//tdf#103313 print dialog maxes out cpu as Idles never get to
+//complete this postitshell's desire to complete formatting
+pPostItRoot->ResetIdleFormat();
+
 const sal_Int32 nPostItDocPageCount = 
rData.m_pPostItShell->GetPageCount();
 
 if (nPostItMode == SwPostItMode::Only || nPostItMode == 
SwPostItMode::EndDoc)
@@ -856,7 +862,7 @@ void SwDoc::UpdatePagesForPrintingWithPostItData(
 // now we just need to add the post-it pages to be printed to the
 // end of the vector of pages to print
 sal_Int32 nPageNum = 0;
-const SwPageFrame * pPageFrame = 
static_cast(rData.m_pPostItShell->GetLayout()->Lower());
+const SwPageFrame * pPageFrame = 
static_cast(pPostItRoot->Lower());
 while( pPageFrame && nPageNum < nPostItDocPageCount )
 {
 ++nPageNum;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Michael Stahl
 solenv/gbuild/platform/com_GCC_defs.mk |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 6982598524491ee087e69c149eaa958af91b1999
Author: Michael Stahl 
Date:   Mon Nov 28 17:22:16 2016 +0100

gbuild: replace -O0 with -Og for GCC --enable-debug/dbgutil builds

With Fedora 25 GCC 6.2.1 and my usual config (except without
--with-package-format since that is slowest now) on commit
086631af59636cd9a6a45b747a1bc59b4b547794 i get with CCACHE_DISABLE=1:

With -O0:

"make check"
44490.70user 3127.01system 1:15:23elapsed 1052%CPU (0avgtext+0avgdata 
2541312maxresident)k

"make check", incremental
7368.19user 153.98system 15:30.06elapsed 808%CPU (0avgtext+0avgdata 
510200maxresident)k

"make CppunitTest_sc_functions_test"
272.13user 0.65system 4:33.47elapsed 99%CPU (0avgtext+0avgdata 
258884maxresident)k

With -Og:

"make check"
46076.01user 3170.91system 1:16:19elapsed 1075%CPU (0avgtext+0avgdata 
2613716maxresident)k

"make check", incremental
5478.33user 157.07system 11:50.42elapsed 793%CPU (0avgtext+0avgdata 
454980maxresident)k

"make CppunitTest_sc_functions_test"
188.48user 0.62system 3:09.59elapsed 99%CPU (0avgtext+0avgdata 
259096maxresident)k

So we now have so many tests that the time taken by GCC doing optimization
is brought back via the tests finishing faster, particularly if we
assume a non-negligible ccache hit rate for developers in practice.

Add this to gb_DEBUG_CFLAGS instead of gb_COMPILERNOOPTFLAGS because
presumably the bridges code that uses gb_COMPILERNOOPTFLAGS really wants
-O0; the gb_DEBUG_CFLAGS is added later so -Og overrides -O0.

It is an open question how well debugging in gdb actually works with
-Og, some experimentation is needed; "man gcc" claims:

   If you are not using some other optimization option, consider using 
-Og
   with -g.  With no -O option at all, some compiler passes that collect
   information useful for debugging do not run at all, so that -Og may
   result in a better debugging experience.

Change-Id: I103499f398b69397cf5aa9993a242680966ce999
Reviewed-on: https://gerrit.libreoffice.org/31334
Reviewed-by: Norbert Thiebaud 
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/solenv/gbuild/platform/com_GCC_defs.mk 
b/solenv/gbuild/platform/com_GCC_defs.mk
index 6b697fc..2512533 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -186,7 +186,9 @@ ifeq ($(HAVE_GCC_FNO_DEFAULT_INLINE),TRUE)
 FNO_DEFAULT_INLINE=-fno-default-inline
 endif
 
-gb_DEBUG_CFLAGS := $(FINLINE_LIMIT0) $(FNO_INLINE)
+# note: this overrides -O0 from the gb_COMPILERNOOPTFLAGS with -Og if
+# available, so that the former remains no-optimization for when that is needed
+gb_DEBUG_CFLAGS := $(if $(HAVE_GCC_OG),-Og) $(FINLINE_LIMIT0) $(FNO_INLINE)
 gb_DEBUG_CXXFLAGS := $(FNO_DEFAULT_INLINE)
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: config_host.mk.in configure.ac

2016-12-01 Thread Luke Deller
 config_host.mk.in |1 +
 configure.ac  |   15 +++
 2 files changed, 16 insertions(+)

New commits:
commit d6a1ba29a512aec9b4aa3d0ab4bd6b92aea7fef4
Author: Luke Deller 
Date:   Wed Jan 14 23:48:36 2015 +1100

enable optimization (-Og) with --enable-debug

gcc-4.8 introduced a new optimization level -Og which enables
optimizations that do not interfere with debugging.

When configured with --enable-debug, use -Og rather than -O0
if available.

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

diff --git a/config_host.mk.in b/config_host.mk.in
index 9bf9d69..9181748 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -244,6 +244,7 @@ export 
HAVE_GCC_FNO_ENFORCE_EH_SPECS=@HAVE_GCC_FNO_ENFORCE_EH_SPECS@
 export HAVE_GCC_FNO_INLINE=@HAVE_GCC_FNO_INLINE@
 export HAVE_GCC_FNO_SIZED_DEALLOCATION=@HAVE_GCC_FNO_SIZED_DEALLOCATION@
 export HAVE_GCC_GGDB2=@HAVE_GCC_GGDB2@
+export HAVE_GCC_OG=@HAVE_GCC_OG@
 export HAVE_GCC_PRAGMA_OPERATOR=@HAVE_GCC_PRAGMA_OPERATOR@
 export HAVE_GNUMAKE_FILE_FUNC=@HAVE_GNUMAKE_FILE_FUNC@
 export HAVE_LD_BSYMBOLIC_FUNCTIONS=@HAVE_LD_BSYMBOLIC_FUNCTIONS@
diff --git a/configure.ac b/configure.ac
index 77fefaa1..082b311 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3733,6 +3733,7 @@ fi
 HAVE_GCC_GGDB2=
 HAVE_GCC_FINLINE_LIMIT=
 HAVE_GCC_FNO_INLINE=
+HAVE_GCC_OG=
 if test "$GCC" = "yes"; then
 AC_MSG_CHECKING([whether $CC supports -ggdb2])
 if test -n "$CLANGVER" -a 0"$CLANGVER" -le 30100; then
@@ -3782,10 +3783,24 @@ if test "$GCC" = "yes"; then
 else
 AC_MSG_RESULT([no])
 fi
+
+AC_MSG_CHECKING([whether $CC supports -Og])
+# Note that clang-3.1 reports a real error for this option
+# so we do not need a special case for clang<=3.1 as above.
+save_CFLAGS=$CFLAGS
+CFLAGS="$CFLAGS -Werror -Og"
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_OG=TRUE 
],[])
+CFLAGS=$save_CFLAGS
+if test "$HAVE_GCC_OG" = "TRUE"; then
+AC_MSG_RESULT([yes])
+else
+AC_MSG_RESULT([no])
+fi
 fi
 AC_SUBST(HAVE_GCC_GGDB2)
 AC_SUBST(HAVE_GCC_FINLINE_LIMIT)
 AC_SUBST(HAVE_GCC_FNO_INLINE)
+AC_SUBST(HAVE_GCC_OG)
 
 dnl ===
 dnl  Test the gcc version
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Miklos Vajna
 xmlsecurity/qa/unit/pdfsigning/data/dict-bool.pdf |binary
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |2 ++
 xmlsecurity/source/pdfio/pdfdocument.cxx  |   12 +++-
 3 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit c623a9f846c713b19a0d58337af4f4354aeffa6e
Author: Miklos Vajna 
Date:   Thu Dec 1 13:41:37 2016 +0100

xmlsecurity PDF verify: handle boolean type as dictionary value

This caused not finding the length of a stream -> could not actually
verify signature.

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

diff --git a/xmlsecurity/qa/unit/pdfsigning/data/dict-bool.pdf 
b/xmlsecurity/qa/unit/pdfsigning/data/dict-bool.pdf
new file mode 100644
index 000..cd87f71
Binary files /dev/null and b/xmlsecurity/qa/unit/pdfsigning/data/dict-bool.pdf 
differ
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx 
b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index c10752b..1ecbb22 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -357,6 +357,8 @@ void PDFSigningTest::testGood()
 {
 // We failed to determine if this is good or bad.
 OUStringLiteral("good-non-detached.pdf"),
+// Boolean value for dictionary key caused read error.
+OUStringLiteral("dict-bool.pdf"),
 };
 
 for (const auto& rName : aNames)
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx 
b/xmlsecurity/source/pdfio/pdfdocument.cxx
index 34a7474..b19a043 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -2122,7 +2122,7 @@ bool PDFDocument::ValidateSignature(SvStream& rStream, 
PDFObjectElement* pSignat
 auto pSubFilter = 
dynamic_cast(pValue->Lookup("SubFilter"));
 if (!pSubFilter || (pSubFilter->GetValue() != "adbe.pkcs7.detached" && 
pSubFilter->GetValue() != "adbe.pkcs7.sha1" && pSubFilter->GetValue() != 
"ETSI.CAdES.detached"))
 {
-SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ValidateSignature: no or 
unsupported sub-filter");
+SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ValidateSignature: 
unsupported sub-filter: '"SetKeyOffset(aName, nNameOffset);
+aName.clear();
+continue;
+}
+
 auto pHexString = 
dynamic_cast(rElements[i].get());
 if (pHexString)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - Repository.mk scp2/source solenv/gbuild

2016-12-01 Thread Matúš Kukan
 Repository.mk|1 +
 scp2/source/ooo/file_ooo.scp |   11 ---
 scp2/source/ooo/module_ooo.scp   |1 -
 solenv/gbuild/AllLangResTarget.mk|6 --
 solenv/gbuild/UIConfig.mk|4 
 solenv/gbuild/extensions/post_PackageInfo.mk |2 +-
 6 files changed, 10 insertions(+), 15 deletions(-)

New commits:
commit 0b66adec8f3a3e03499d5a3cb1db7008a391e61e
Author: Matúš Kukan 
Date:   Thu Dec 1 14:47:31 2016 +0100

tdf#90753: AutoInstall gengal with filelist feature

Change-Id: Ic72fb18eccb54b24f4205d997585cee753965b10

diff --git a/Repository.mk b/Repository.mk
index 33bf6d0..bcf63d4 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -845,6 +845,7 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
package_dtd \
sd_web \
sfx2_emojiconfig \
+   $(call gb_Helper_optional,DESKTOP,$(if $(filter-out MACOSX 
WNT,$(OS)),svx_gengal)) \
$(if $(USING_X11),vcl_fontunxppds) \
$(if $(filter $(OS),MACOSX),vcl_osxres) \
xmloff_dtd \
diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp
index df88a71..a3e5a67 100644
--- a/scp2/source/ooo/file_ooo.scp
+++ b/scp2/source/ooo/file_ooo.scp
@@ -27,17 +27,6 @@
 
 #include "macros.inc"
 
-#if defined UNX && !defined MACOSX
-
-File gid_File_Script_Gengal
-BIN_FILE_BODY;
-Dir = gid_Brand_Dir_Program;
-Styles = (PACKED);
-Name = "gengal";
-End
-
-#endif
-
 #if defined UNX && ! defined ENABLE_MACOSX_SANDBOX
 File gid_File_Bin_Senddoc
 BIN_FILE_BODY;
diff --git a/scp2/source/ooo/module_ooo.scp b/scp2/source/ooo/module_ooo.scp
index 4287904..210f4e5 100644
--- a/scp2/source/ooo/module_ooo.scp
+++ b/scp2/source/ooo/module_ooo.scp
@@ -24,7 +24,6 @@ Module gid_Module_Root
 InstallOrder = "20";
 MOD_NAME_DESC(MODULE_ROOT_OSL);
 Files = (gid_File_Bin_Senddoc,
- gid_File_Script_Gengal,
  gid_File_Txt_Pagein_Common,
  gid_File_Txt_Pagein_Calc,
  gid_File_Txt_Pagein_Draw,
commit 39a4ca4072059b707a5368d8d215249e06258032
Author: Matúš Kukan 
Date:   Wed Nov 30 20:16:12 2016 +0100

tdf#97803: gbuild: Check that resource targets are registered

And replace gb_AllLangResTarget_ALLTARGETS with
gb_AllLangResTarget_REGISTERED which should have
the same content and is already used.

This actually helped to find a problem, fixed in
52d409f0d657f314a53f945c9ffb5b8025bea034

Change-Id: Iae551d7be221c5655dee1bc9ad273c8822d45178

diff --git a/solenv/gbuild/AllLangResTarget.mk 
b/solenv/gbuild/AllLangResTarget.mk
index 905fee4..3462a54 100644
--- a/solenv/gbuild/AllLangResTarget.mk
+++ b/solenv/gbuild/AllLangResTarget.mk
@@ -329,9 +329,11 @@ $(call gb_AllLangResTarget_get_target,%) :
 
 gb_ResTarget_get_install_target = 
$(INSTROOT)/$(LIBO_SHARE_RESOURCE_FOLDER)/$(1).res
 
-gb_AllLangResTarget_ALLTARGETS :=
 define gb_AllLangResTarget_AllLangResTarget
-gb_AllLangResTarget_ALLTARGETS += $(1)
+ifeq (,$$(filter $(1),$$(gb_AllLangResTarget_REGISTERED)))
+$$(eval $$(call gb_Output_info,Currently known AllLangResTargets are: $(sort 
$(gb_AllLangResTarget_REGISTERED)),ALL))
+$$(eval $$(call gb_Output_error,AllLangResTarget $(1) must be registered in 
Repository.mk))
+endif
 $(foreach lang,$(gb_AllLangResTarget_LANGS),\
$(call gb_ResTarget_ResTarget,$(1)$(lang),$(1),$(lang)))
 
diff --git a/solenv/gbuild/UIConfig.mk b/solenv/gbuild/UIConfig.mk
index 7f81418..55446a3 100644
--- a/solenv/gbuild/UIConfig.mk
+++ b/solenv/gbuild/UIConfig.mk
@@ -200,6 +200,10 @@ gb_UIConfig_get_zipname_for_lang = UIConfig/$(1)/$(2)
 #
 # gb_UIConfig_UIConfig modulename
 define gb_UIConfig_UIConfig
+ifeq (,$$(filter $(1),$$(gb_UIConfig_REGISTERED)))
+$$(eval $$(call gb_Output_info,Currently known UI configs are: $(sort 
$(gb_UIConfig_REGISTERED)),ALL))
+$$(eval $$(call gb_Output_error,UIConfig $(1) must be registered in 
Repository.mk))
+endif
 $(call gb_UIConfig_get_imagelist_target,$(1)) : UI_IMAGELISTS :=
 
 $(call gb_PackageSet_PackageSet_internal,$(call 
gb_UIConfig_get_packagesetname,$(1)))
diff --git a/solenv/gbuild/extensions/post_PackageInfo.mk 
b/solenv/gbuild/extensions/post_PackageInfo.mk
index b3d3cfc..1b05e9c 100644
--- a/solenv/gbuild/extensions/post_PackageInfo.mk
+++ b/solenv/gbuild/extensions/post_PackageInfo.mk
@@ -72,7 +72,7 @@ endef
 define gb_PackageInfo_emit_l10n_for_one_lang
 @touch $(foreach suf,executables libraries 
files,$(gb_PackageInfo_get_target)/l10n-$(1).$(suf))
 $(if $(filter-out qtz en-US,$(1)),$(foreach packagedir,$(patsubst 
%/,%,$(gb_AllLangPackage_ALLDIRS)),$(call 
gb_PackageInfo_emit_l10n_for_one_alllangpackage,$(packagedir),$(1
-$(if $(filter $(gb_AllLangResTarget_LANGS),$(1)),$(foreach 
target,$(gb_AllLangResTarget_ALLTARGETS),$(call 
gb_PackageInfo_emit_l10n_for_one_resource,$(target),$(1
+$(if $(filter $(gb_AllLangResTarget_LANGS),$(1)),$(foreach 
target,$(gb_AllLa

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

2016-12-01 Thread Stephan Bergmann
 comphelper/source/misc/threadpool.cxx |   18 ++
 1 file changed, 10 insertions(+), 8 deletions(-)

New commits:
commit 5a20ff53d908b90e7c805316c61b00149dab9f58
Author: Stephan Bergmann 
Date:   Thu Dec 1 12:35:36 2016 +0100

Fix race in ThreadTaskTag

Assume T0 calls ThreadPool::pushTask twice, then ThreadPool::waitUntilDone:

T0 calls ThreadTaskTag::onTaskPushed:
  mnTasksWorking = 1, maTasksComplete.reset

T1 runs the 1st task to completion and calls 
ThreadTaskTag::onTaskWorkerDone:
  mnTasksWorking = 0; suspended...

T0 calls ThreadTaskTag::onTaskPushed:
  mnTaskWorking = 1, maTasksComplete.reset

T1 continues in the call to ThreadTaskTag::onTaskWorkerDone:
  ..., maTasksComplete.set

T0 calls ThreadTaskTag::waitUntilDone and immediately returns

T2 only now starts to run the 2nd task

Change-Id: Ic29101a4791fca2a1a4d54b559f10ff706e8a20d
(cherry picked from commit d36b3bcb7e08f7f73709b7afe9b8f9ec22a0fcd2)
Reviewed-on: https://gerrit.libreoffice.org/31485
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/comphelper/source/misc/threadpool.cxx 
b/comphelper/source/misc/threadpool.cxx
index f399274..286fbf6 100644
--- a/comphelper/source/misc/threadpool.cxx
+++ b/comphelper/source/misc/threadpool.cxx
@@ -26,8 +26,9 @@ static thread_local bool gbIsWorkerThread;
 // used to group thread-tasks for waiting in waitTillDone()
 class COMPHELPER_DLLPUBLIC ThreadTaskTag
 {
-oslInterlockedCount  mnTasksWorking;
-osl::Condition   maTasksComplete;
+osl::Mutex mMutex;
+std::size_t mnTasksWorking;
+osl::Condition maTasksComplete;
 
 public:
 ThreadTaskTag();
@@ -305,17 +306,18 @@ ThreadTaskTag::ThreadTaskTag() : mnTasksWorking(0)
 
 void ThreadTaskTag::onTaskPushed()
 {
-oslInterlockedCount n = osl_atomic_increment(&mnTasksWorking);
-assert( n < 65536 ); // sanity checking
-(void)n; // avoid -Wunused-variable in release build
+osl::MutexGuard g(mMutex);
+assert( mnTasksWorking < 65535 ); // sanity checking
+++mnTasksWorking;
 maTasksComplete.reset();
 }
 
 void ThreadTaskTag::onTaskWorkerDone()
 {
-sal_Int32 nCount = osl_atomic_decrement(&mnTasksWorking);
-assert(nCount >= 0);
-if (nCount == 0)
+osl::MutexGuard g(mMutex);
+assert(mnTasksWorking > 0);
+--mnTasksWorking;
+if (mnTasksWorking == 0)
 maTasksComplete.set();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Stephan Bergmann
 include/vcl/bitmapfilter.hxx   |   27 -
 include/vcl/bitmapscalesuper.hxx   |   41 -
 vcl/inc/BitmapScaleConvolution.hxx |2 -
 vcl/inc/bitmapfilter.hxx   |   27 +
 vcl/inc/bitmapscalesuper.hxx   |   41 +
 vcl/source/bitmap/bitmapfilter.cxx |2 -
 vcl/source/bitmap/bitmapscalesuper.cxx |2 -
 vcl/source/gdi/bitmap3.cxx |2 -
 8 files changed, 72 insertions(+), 72 deletions(-)

New commits:
commit 4f7280e4cc34a284b91473cefcb179f04a1d7a08
Author: Stephan Bergmann 
Date:   Thu Dec 1 16:02:12 2016 +0100

BitmapFilter, BitmapScaleSuper only used within vcl

Change-Id: Ia8a1207a584b599f01c47b658692d3eeae52cb3a

diff --git a/vcl/inc/BitmapScaleConvolution.hxx 
b/vcl/inc/BitmapScaleConvolution.hxx
index 032772f..e18c71f 100644
--- a/vcl/inc/BitmapScaleConvolution.hxx
+++ b/vcl/inc/BitmapScaleConvolution.hxx
@@ -20,7 +20,7 @@
 #ifndef INCLUDED_VCL_BITMAPSCALECONVOLUTION_HXX
 #define INCLUDED_VCL_BITMAPSCALECONVOLUTION_HXX
 
-#include 
+#include 
 
 namespace vcl
 {
diff --git a/include/vcl/bitmapfilter.hxx b/vcl/inc/bitmapfilter.hxx
similarity index 78%
rename from include/vcl/bitmapfilter.hxx
rename to vcl/inc/bitmapfilter.hxx
index c23bd7f..66dc4cc 100644
--- a/include/vcl/bitmapfilter.hxx
+++ b/vcl/inc/bitmapfilter.hxx
@@ -8,12 +8,12 @@
  *
  */
 
-#ifndef INCLUDED_VCL_BITMAPFILTER_HXX
-#define INCLUDED_VCL_BITMAPFILTER_HXX
+#ifndef INCLUDED_VCL_INC_BITMAPFILTER_HXX
+#define INCLUDED_VCL_INC_BITMAPFILTER_HXX
 
 #include 
 
-class VCL_DLLPUBLIC BitmapFilter
+class BitmapFilter
 {
 public:
  BitmapFilter();
@@ -22,6 +22,6 @@ public:
 virtual bool filter(Bitmap& rBitmap) = 0;
 };
 
-#endif // INCLUDED_VCL_BITMAPFILTER_HXX
+#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/bitmapscalesuper.hxx b/vcl/inc/bitmapscalesuper.hxx
similarity index 84%
rename from include/vcl/bitmapscalesuper.hxx
rename to vcl/inc/bitmapscalesuper.hxx
index ad817b5..bbdf59a 100644
--- a/include/vcl/bitmapscalesuper.hxx
+++ b/vcl/inc/bitmapscalesuper.hxx
@@ -17,12 +17,12 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_BITMAPSCALESUPER_HXX
-#define INCLUDED_VCL_BITMAPSCALESUPER_HXX
+#ifndef INCLUDED_VCL_INC_BITMAPSCALESUPER_HXX
+#define INCLUDED_VCL_INC_BITMAPSCALESUPER_HXX
 
-#include 
+#include 
 
-class VCL_DLLPUBLIC BitmapScaleSuper : public BitmapFilter
+class BitmapScaleSuper : public BitmapFilter
 {
 public:
 BitmapScaleSuper(const double& rScaleX, const double& 
rScaleY);
@@ -36,6 +36,6 @@ private:
 
 };
 
-#endif // INCLUDED_VCL_BITMAPSCALESUPER_HXX
+#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/bitmap/bitmapfilter.cxx 
b/vcl/source/bitmap/bitmapfilter.cxx
index c04f341..34ff09f 100644
--- a/vcl/source/bitmap/bitmapfilter.cxx
+++ b/vcl/source/bitmap/bitmapfilter.cxx
@@ -8,7 +8,7 @@
  *
  */
 
-#include 
+#include 
 
 BitmapFilter::BitmapFilter()
 {}
diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx 
b/vcl/source/bitmap/bitmapscalesuper.cxx
index ff01aae..ae540e5 100644
--- a/vcl/source/bitmap/bitmapscalesuper.cxx
+++ b/vcl/source/bitmap/bitmapscalesuper.cxx
@@ -18,7 +18,7 @@
  */
 
 #include 
-#include 
+#include 
 
 #include 
 #include 
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index fcf3751..faaa653 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -23,7 +23,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #if HAVE_FEATURE_OPENGL
 #include 
@@ -34,6 +33,7 @@
 #include "impoctree.hxx"
 #include "impvect.hxx"
 
+#include 
 #include "octree.hxx"
 #include "BitmapScaleConvolution.hxx"
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Henry Castro
 loleaflet/src/control/Control.CharacterMap.js |   83 +-
 1 file changed, 57 insertions(+), 26 deletions(-)

New commits:
commit 539e239242b2a4fa244b0d06480623df815bba12
Author: Henry Castro 
Date:   Wed Nov 30 21:08:16 2016 -0400

loleaflet: limit Unicode character ranges

There are very big ranges, that's probably not common use for final users

diff --git a/loleaflet/src/control/Control.CharacterMap.js 
b/loleaflet/src/control/Control.CharacterMap.js
index 3ec35ee..c79f371 100644
--- a/loleaflet/src/control/Control.CharacterMap.js
+++ b/loleaflet/src/control/Control.CharacterMap.js
@@ -39,9 +39,11 @@ L.Control.CharacterMap = L.Control.extend({
{ name: _('Myanmar'),   start: 
0x1000, end: 0x109F }, /*UBLOCK_MYANMAR=28*/
{ name: _('Basic Georgian'),start: 
0x10A0, end: 0x10FF }, /*UBLOCK_GEORGIAN=29*/
{ name: _('Hangul Jamo'),   start: 
0x1100, end: 0x11FF }, /*UBLOCK_HANGUL_JAMO=30*/
-   { name: _('Ethiopic'),  start: 
0x1200, end: 0x137F }, /*UBLOCK_ETHIOPIC=31*/
+   //{ name: _('Ethiopic'),start: 
0x1200, end: 0x137F }, /*UBLOCK_ETHIOPIC=31*/
+   { name: _('Ethiopic'),  start: 
0x1200, end: 0x12FF }, /*UBLOCK_ETHIOPIC=31*/
{ name: _('Cherokee'),  start: 
0x13A0, end: 0x13FF }, /*UBLOCK_CHEROKEE=32*/
-   { name: _('Canadian Aboriginal Syllables'), start: 
0x1400, end: 0x167F }, /*UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS=33*/
+   //{ name: _('Canadian Aboriginal Syllables'),   start: 
0x1400, end: 0x167F }, /*UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS=33*/
+   { name: _('Canadian Aboriginal Syllables'), start: 
0x1400, end: 0x14FF }, /*UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS=33*/
{ name: _('Ogham'), start: 
0x1680, end: 0x169F }, /*UBLOCK_OGHAM=34*/
{ name: _('Runic'), start: 
0x16A0, end: 0x16FF }, /*UBLOCK_RUNIC=35*/
{ name: _('Khmer'), start: 
0x1780, end: 0x17FF }, /*UBLOCK_KHMER=36*/
@@ -78,18 +80,28 @@ L.Control.CharacterMap = L.Control.extend({
{ name: _('Bopomofo Extended'), start: 
0x31A0, end: 0x31BF }, /*UBLOCK_BOPOMOFO_EXTENDED=67*/
{ name: _('Enclosed CJK Letters and Months'),   start: 
0x3200, end: 0x32FF }, /*UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS=68*/
{ name: _('CJK Compatibility'), start: 
0x3300, end: 0x33FF }, /*UBLOCK_CJK_COMPATIBILITY=69*/
-   { name: _('CJK Unified Ideographs Extension A'),start: 
0x3400, end: 0x4DB5 }, /*UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A=70*/
-   { name: _('CJK Unified Ideographs'),start: 
0x4E00, end: 0x9FFF }, /*UBLOCK_CJK_UNIFIED_IDEOGRAPHS=71*/
-   { name: _('Yi Syllables'),  start: 
0xA000, end: 0xA48F }, /*UBLOCK_YI_SYLLABLES=72*/
+   //{ name: _('CJK Unified Ideographs Extension A'),  start: 
0x3400, end: 0x4DB5 }, /*UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A=70*/
+   { name: _('CJK Unified Ideographs Extension A'),start: 
0x3400, end: 0x34FF }, /*UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A=70*/
+   //{ name: _('CJK Unified Ideographs'),  start: 
0x4E00, end: 0x9FFF }, /*UBLOCK_CJK_UNIFIED_IDEOGRAPHS=71*/
+   { name: _('CJK Unified Ideographs'),start: 
0x4E00, end: 0x4EFF }, /*UBLOCK_CJK_UNIFIED_IDEOGRAPHS=71*/
+
+   { name: _('Yi Syllables'),  start: 
0xA000, end: 0xA0FF }, /*UBLOCK_YI_SYLLABLES=72*/
+   //{ name: _('Yi Syllables'),start: 
0xA000, end: 0xA48F }, /*UBLOCK_YI_SYLLABLES=72*/
{ name: _('Yi Radicals'),   start: 
0xA490, end: 0xA4CF }, /*UBLOCK_YI_RADICALS=73*/
-   { name: _('Hangul'),start: 
0xAC00, end: 0xD7AF }, /*UBLOCK_HANGUL_SYLLABLES=74*/
-   { name: _('High Surrogates'),   start: 
0xD800, end: 0xDB7F }, /*UBLOCK_HIGH_SURROGATES =75*/
+   //{ name: _('Hangul'),  start: 
0xAC00, end: 0xD7AF }, /*UBLOCK_HANGUL_SYLLABLES=74*/
+   { name: _('Hangul'),start: 
0xAC00, end: 0xACFF }, /*UBLOCK_HANGUL_SYLLABLES=74*/
+   //{ name: _('High Surrogates'), start: 
0xD800, end: 0xDB7F }, /*UBLOCK_HIGH_SURROGATES =75*/
+   { name: _('High Surrogat

Re: I'm new

2016-12-01 Thread marius adrian popa
First step is to download LibreOffice and get it build.

We have made a step by step guide on how to proceed:
https://wiki.documentfoundation.org/Development/GetInvolved

On Wed, Nov 30, 2016 at 11:46 AM, Dragos Petrescu <
petrescudragos1...@gmail.com> wrote:

> Hi,
>
> I'm new here and I'd like to get involved. I know C, Java and Android. I
> am computer science student but kind of new to the open source community.
> Can anyone tell me where can i start?
>
> Thanks,
> Dragos Petrescu
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2016-12-01 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/mode.fods | 4150 +++
 1 file changed, 4150 insertions(+)

New commits:
commit 6c1e4d46298cf240c2487f29955fe13df53e67f4
Author: Zdeněk Crhonek 
Date:   Wed Nov 30 22:02:40 2016 +0100

add MODE test case

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

diff --git a/sc/qa/unit/data/functions/fods/mode.fods 
b/sc/qa/unit/data/functions/fods/mode.fods
new file mode 100644
index 000..aee5a05
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/mode.fods
@@ -0,0 +1,4150 @@
+
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-11-30T22:02:07.653559384P0D1LibreOfficeDev/5.3.0.0.alpha1$Linux_X86_64
 
LibreOffice_project/883024d657fb45c7da459017d2f936aac5644bfb
+ 
+  
+   0
+   0
+   47452
+   14393
+   
+
+ view1
+ 
+  
+   2
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+  
+   4
+   10
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   75
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 75
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ true
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ de
+ DE
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   lgH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAtwAIAFZUAAAkbQAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhClBhZ2VTaXplOkxldHRlcgAAEgBDT01QQVRfRFVQTEVYX01PREUPAER1cGxleE1vZGU6Ok9mZg==
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+
+   
+
+  
+  
+
+   (
+   
+   )
+  
+  
+
+   -
+   
+
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   -
+   
+
+   Kč
+   
+  
+  
+   
+
+   Kč
+  
+  
+   -
+   
+
+   Kč
+   
+  
+  
+   
+
+   Kč
+  
+  
+   

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

2016-12-01 Thread Miklos Vajna
 xmlsecurity/qa/unit/pdfsigning/data/cr-comment.pdf | 4480 +
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx  |2 
 xmlsecurity/source/pdfio/pdfdocument.cxx   |2 
 3 files changed, 4483 insertions(+), 1 deletion(-)

New commits:
commit 9b526a43e10a565875c879063f6df4bfe2ba9a80
Author: Miklos Vajna 
Date:   Thu Dec 1 11:33:53 2016 +0100

xmlsecurity PDF verify: CR is also a terminator of a comment

If we skip to the first NL, then we start tokenizing some XML as PDF
data and soon error out due to an unexpected keyword.

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

diff --git a/xmlsecurity/qa/unit/pdfsigning/data/cr-comment.pdf 
b/xmlsecurity/qa/unit/pdfsigning/data/cr-comment.pdf
new file mode 100644
index 000..b1aae07
--- /dev/null
+++ b/xmlsecurity/qa/unit/pdfsigning/data/cr-comment.pdf
@@ -0,0 +1,4480 @@
+%PDF-1.4
%âãÏÓ
+1 0 obj
<>>>
endobj
2 0 obj
<>stream
+
+
+   http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
+  http://ns.adobe.com/xap/1.0/mm/";
+xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#";
+xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#";
+xmlns:stMfs="http://ns.adobe.com/xap/1.0/sType/ManifestItem#";>
+ 
uuid:e7f483a2-dbf7-4046-8848-508b776dd738
+ 
xmp.did:89321C534E266811A613EDAC20FB34D2
+ 
adobe:docid:indd:924fbc79-cadb-11de-af61-e97e2740acd1
+ proof:pdf
+ 
+
xmp.iid:88321C534E266811A613EDAC20FB34D2
+
adobe:docid:indd:924fbc79-cadb-11de-af61-e97e2740acd1
+
adobe:docid:indd:924fbc79-cadb-11de-af61-e97e2740acd1
+default
+ 
+ 
+
+   
+  saved
+  
xmp.iid:E4B6ED806F256811A613EDAC20FB34D2
+  2010-06-27T11:39:47-07:00
+  Adobe InDesign 6.0
+  /
+   
+   
+  saved
+  
xmp.iid:E5B6ED806F256811A613EDAC20FB34D2
+  2010-06-27T11:39:47-07:00
+  Adobe InDesign 6.0
+  /metadata
+   
+   
+  saved
+  
xmp.iid:E6B6ED806F256811A613EDAC20FB34D2
+  2010-06-27T11:44:22-07:00
+  Adobe InDesign 6.0
+  /
+   
+   
+  saved
+  
xmp.iid:80321C534E266811A613EDAC20FB34D2
+  2010-06-27T11:46:03-07:00
+  Adobe InDesign 6.0
+  /
+   
+   
+  saved
+  
xmp.iid:81321C534E266811A613EDAC20FB34D2
+  2010-06-27T11:48-07:00
+  Adobe InDesign 6.0
+  /
+   
+   
+  saved
+  
xmp.iid:82321C534E266811A613EDAC20FB34D2
+  2010-06-27T11:49:01-07:00
+  Adobe InDesign 6.0
+  /
+   
+   
+  saved
+  
xmp.iid:83321C534E266811A613EDAC20FB34D2
+  2010-06-27T11:52:39-07:00
+  Adobe InDesign 6.0
+  /
+   
+   
+  saved
+  
xmp.iid:84321C534E266811A613EDAC20FB34D2
+  2010-06-27T11:58:06-07:00
+  Adobe InDesign 6.0
+  /
+   
+   
+  saved
+  
xmp.iid:85321C534E266811A613EDAC20FB34D2
+  2010-06-27T11:59:50-07:00
+  Adobe InDesign 6.0
+  /
+   
+   
+  saved
+  
xmp.iid:88321C534E266811A613EDAC20FB34D2
+  2010-06-27T12:03:27-07:00
+  Adobe InDesign 6.0
+  /metadata
+   
+   
+  saved
+  
xmp.iid:89321C534E266811A613EDAC20FB34D2
+  2010-06-27T12:03:27-07:00
+  Adobe InDesign 6.0
+  /
+   
+   
+  saved
+  
xmp.iid:4A27385D5F266811A613EDAC20FB34D2
+  2010-06-27T13:48:01-07:00
+  Adobe InDesign 6.0
+  /
+   
+   
+  saved
+  
xmp.iid:4B27385D5F266811A613EDAC20FB34D2
+  2010-06-27T13:50:54-07:00
+  Adobe InDesign 6.0
+  /
+   
+   
+  saved
+  
xmp.iid:4C27385D5F266811A613EDAC20FB34D2
+  2010-06-27T13:54-07:00
+  Adobe InDesign 6.0
+  /
+   
+   
+  

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

2016-12-01 Thread Miklos Vajna
 xmlsecurity/qa/unit/pdfsigning/data/no-eof.pdf |binary
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx  |   20 
 xmlsecurity/source/pdfio/pdfdocument.cxx   |   12 
 3 files changed, 28 insertions(+), 4 deletions(-)

New commits:
commit 0233ff952372e9a15edf92beccba463d74c46c33
Author: Miklos Vajna 
Date:   Thu Dec 1 09:42:45 2016 +0100

xmlsecurity PDF verify: tolerate missing %%EOF in incremental updates

This is broken, but work it around to avoid an infinite loop.

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

diff --git a/xmlsecurity/qa/unit/pdfsigning/data/no-eof.pdf 
b/xmlsecurity/qa/unit/pdfsigning/data/no-eof.pdf
new file mode 100644
index 000..9ae7e23
Binary files /dev/null and b/xmlsecurity/qa/unit/pdfsigning/data/no-eof.pdf 
differ
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx 
b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index 5b88c71..f22a7c6 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -68,6 +68,8 @@ public:
 void testSigningCertificateAttribute();
 /// Test that we accept files which are supposed to be good.
 void testGood();
+/// Test that we don't crash / loop while tokenizing these files.
+void testTokenize();
 
 CPPUNIT_TEST_SUITE(PDFSigningTest);
 CPPUNIT_TEST(testPDFAdd);
@@ -81,6 +83,7 @@ public:
 CPPUNIT_TEST(testPDFPAdESGood);
 CPPUNIT_TEST(testSigningCertificateAttribute);
 CPPUNIT_TEST(testGood);
+CPPUNIT_TEST(testTokenize);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -366,6 +369,23 @@ void PDFSigningTest::testGood()
 #endif
 }
 
+void PDFSigningTest::testTokenize()
+{
+const std::initializer_list aNames =
+{
+// We looped on this broken input.
+OUStringLiteral("no-eof.pdf"),
+};
+
+for (const auto& rName : aNames)
+{
+SvFileStream aStream(m_directories.getURLFromSrc(DATA_DIRECTORY) + 
rName, StreamMode::READ);
+xmlsecurity::pdfio::PDFDocument aDocument;
+// Just make sure the tokenizer finishes without an error, don't look 
at the signature.
+CPPUNIT_ASSERT(aDocument.Read(aStream));
+}
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(PDFSigningTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx 
b/xmlsecurity/source/pdfio/pdfdocument.cxx
index e3e89a0..86aff1e 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -1228,8 +1228,12 @@ bool PDFDocument::Tokenize(SvStream& rStream, 
TokenizeMode eMode, std::vector< s
 }
 else if (aKeyword == "trailer")
 {
-m_pTrailer = new PDFTrailerElement(*this);
-
rElements.push_back(std::unique_ptr(m_pTrailer));
+auto pTrailer = new PDFTrailerElement(*this);
+// When reading till the first EOF token only, remember
+// just the first trailer token.
+if (eMode != TokenizeMode::EOF_TOKEN || !m_pTrailer)
+m_pTrailer = pTrailer;
+rElements.push_back(std::unique_ptr(pTrailer));
 }
 else if (aKeyword == "startxref")
 {
@@ -1680,9 +1684,9 @@ void PDFDocument::ReadXRef(SvStream& rStream)
 return;
 }
 
-if (aNumberOfEntries.GetValue() <= 0)
+if (aNumberOfEntries.GetValue() < 0)
 {
-SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ReadXRef: expected one 
or more entries");
+SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ReadXRef: expected 
zero or more entries");
 return;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Eike Rathke
 editeng/source/editeng/impedit.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit b35bfc7c10a5e06d68340db22486f6682247d8df
Author: Eike Rathke 
Date:   Wed Nov 30 14:47:58 2016 +0100

Resolves: tdf#104152 suppress notifications from EditEngine during Paste

Broadcast once at the end instead to notify a11y.

(cherry picked from commit 7c20d0174c59d46b11fc5029fe3fc0c00f5dc6d0)

 Conflicts:
editeng/source/editeng/impedit.cxx

Change-Id: I12383b6efbbb2b149f0d73c67d8576fcc050b253
Reviewed-on: https://gerrit.libreoffice.org/31425
Tested-by: Jenkins 
Reviewed-by: Kohei Yoshida 
Reviewed-by: Eike Rathke 

diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index 59f20a4..13d98c0 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1440,9 +1440,14 @@ void ImpEditView::Paste( css::uno::Reference< 
css::datatransfer::clipboard::XCli
 }
 else
 {
+// Prevent notifications of paragraph inserts et al that would 
trigger
+// a11y to format content in a half-ready state when obtaining
+// paragraphs. Collect and broadcast when done instead.
+pEditEngine->pImpEditEngine->EnterBlockNotifications();
 aSel = pEditEngine->InsertText(
 xDataObj, OUString(), aSel.Min(),
 bUseSpecial && 
pEditEngine->GetInternalEditStatus().AllowPasteSpecial());
+pEditEngine->pImpEditEngine->LeaveBlockNotifications();
 }
 
 aPasteOrDropInfos.nEndPara = pEditEngine->GetEditDoc().GetPos( 
aSel.Max().GetNode() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'ref/for/master'

2016-12-01 Thread Michael Meeks
New branch 'ref/for/master' available with the following commits:
commit 1d146c31507e14d8cf11592941b2b67873e14ccc
Author: Michael Meeks 
Date:   Thu Dec 1 11:14:24 2016 +

tdf#104126 - comphelper thread-pool, use reliable std::condition_variable.

The existing osl::Condition is an API and reliability disaster area.

Change-Id: I3be84e1c6a83e58c43c40c9c8720790d923a6694

___
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-2-0' - loleaflet/src

2016-12-01 Thread Pranav Kant
 loleaflet/src/map/handler/Map.Keyboard.js |   16 
 1 file changed, 16 deletions(-)

New commits:
commit c865dd799c0e22cb89c5d2a9b4f4bce57ebbc227
Author: Pranav Kant 
Date:   Thu Dec 1 16:45:06 2016 +0530

loleaflet: Don't handle pageup/dn separately on 'keyup'

... as we handle it already during 'keydown' by sending keyboard
event to core which changes the slide for us.

Change-Id: Id61584ffa0ec5ff3aca098e3dcade664c306c6c3
Reviewed-on: https://gerrit.libreoffice.org/31475
Reviewed-by: pranavk 
Tested-by: pranavk 
(cherry picked from commit 15781a465584c380a86a79e6a7cba853126032f8)
Reviewed-on: https://gerrit.libreoffice.org/31476
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loleaflet/src/map/handler/Map.Keyboard.js 
b/loleaflet/src/map/handler/Map.Keyboard.js
index 2d5fb06..62e61db 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -268,22 +268,6 @@ L.Map.Keyboard = L.Handler.extend({
}
}
 
-   // Change slides with PgUp/PgDown in Presentation
-   if (this._map.getDocType() === 'presentation' && !this.modifier 
&& e.type === 'keyup') {
-   var _keyCode = e.originalEvent.keyCode;
-   if (_keyCode === this.keyCodes.pageUp || _keyCode === 
this.keyCodes.pageDown) {
-   e.originalEvent.preventDefault();
-   e.originalEvent.stopPropagation();
-
-   if (_keyCode === this.keyCodes.pageUp) {
-   this._map.setPart('prev');
-   }
-   else if (_keyCode === this.keyCodes.pageDown) {
-   this._map.setPart('next');
-   }
-   }
-   }
-
var charCode = e.originalEvent.charCode;
var keyCode = e.originalEvent.keyCode;
 
___
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-2-0' - wsd/LOOLWSD.cpp

2016-12-01 Thread Jan Holesovsky
 wsd/LOOLWSD.cpp |2 --
 1 file changed, 2 deletions(-)

New commits:
commit ecba38d06b11e406241a451416c1193dfbc4459d
Author: Jan Holesovsky 
Date:   Thu Dec 1 12:32:26 2016 +0100

Revert "loolwsd: alertAllUsersInternal expects lock to be taken"

Unfortunately this brings back the deadlock that
51c88c5fb79c5db146a08f5ef2d9a4fe6d095caa fixed :-(

This reverts commit da3b1b208aefc734c856492db1078e1804702b4e.

Change-Id: If48c0b3ddebf3fb366786d90cb35c3c22963b1a1
Reviewed-on: https://gerrit.libreoffice.org/31482
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index f433637..6b143a4 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -291,8 +291,6 @@ static void forkChildren(const int number)
 if (!fs.empty())
 {
 LOG_WRN("File system of " << fs << " dangerously low on disk 
space");
-
-std::unique_lock DocBrokersLock(DocBrokersMutex);
 alertAllUsersInternal("error: cmd=internal kind=diskfull");
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Stephan Bergmann
 comphelper/source/misc/threadpool.cxx |   18 ++
 1 file changed, 10 insertions(+), 8 deletions(-)

New commits:
commit d36b3bcb7e08f7f73709b7afe9b8f9ec22a0fcd2
Author: Stephan Bergmann 
Date:   Thu Dec 1 12:35:36 2016 +0100

Fix race in ThreadTaskTag

Assume T0 calls ThreadPool::pushTask twice, then ThreadPool::waitUntilDone:

T0 calls ThreadTaskTag::onTaskPushed:
  mnTasksWorking = 1, maTasksComplete.reset

T1 runs the 1st task to completion and calls 
ThreadTaskTag::onTaskWorkerDone:
  mnTasksWorking = 0; suspended...

T0 calls ThreadTaskTag::onTaskPushed:
  mnTaskWorking = 1, maTasksComplete.reset

T1 continues in the call to ThreadTaskTag::onTaskWorkerDone:
  ..., maTasksComplete.set

T0 calls ThreadTaskTag::waitUntilDone and immediately returns

T2 only now starts to run the 2nd task

Change-Id: Ic29101a4791fca2a1a4d54b559f10ff706e8a20d

diff --git a/comphelper/source/misc/threadpool.cxx 
b/comphelper/source/misc/threadpool.cxx
index 346c171..0fda264 100644
--- a/comphelper/source/misc/threadpool.cxx
+++ b/comphelper/source/misc/threadpool.cxx
@@ -26,8 +26,9 @@ static thread_local bool gbIsWorkerThread;
 // used to group thread-tasks for waiting in waitTillDone()
 class COMPHELPER_DLLPUBLIC ThreadTaskTag
 {
-oslInterlockedCount  mnTasksWorking;
-osl::Condition   maTasksComplete;
+osl::Mutex mMutex;
+std::size_t mnTasksWorking;
+osl::Condition maTasksComplete;
 
 public:
 ThreadTaskTag();
@@ -302,17 +303,18 @@ ThreadTaskTag::ThreadTaskTag() : mnTasksWorking(0)
 
 void ThreadTaskTag::onTaskPushed()
 {
-oslInterlockedCount n = osl_atomic_increment(&mnTasksWorking);
-assert( n < 65536 ); // sanity checking
-(void)n; // avoid -Wunused-variable in release build
+osl::MutexGuard g(mMutex);
+assert( mnTasksWorking < 65535 ); // sanity checking
+++mnTasksWorking;
 maTasksComplete.reset();
 }
 
 void ThreadTaskTag::onTaskWorkerDone()
 {
-sal_Int32 nCount = osl_atomic_decrement(&mnTasksWorking);
-assert(nCount >= 0);
-if (nCount == 0)
+osl::MutexGuard g(mMutex);
+assert(mnTasksWorking > 0);
+--mnTasksWorking;
+if (mnTasksWorking == 0)
 maTasksComplete.set();
 }
 
___
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-2-0' - kit/ChildSession.cpp

2016-12-01 Thread Jan Holesovsky
 kit/ChildSession.cpp |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 6b2e21129a0de2a1fe36f36da522738d051a0950
Author: Jan Holesovsky 
Date:   Thu Dec 1 12:25:16 2016 +0100

Don't send setpart: to text documents, it will always jump to the 1st page.

Change-Id: I809f2ba493329174a33f99d63eec2c60b38acb05
Reviewed-on: https://gerrit.libreoffice.org/31480
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index e12f5e3..4e65d3a 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -109,8 +109,11 @@ bool ChildSession::_handleInput(const char *buffer, int 
length)
 // Notify all views about updated view info
 _docManager.notifyViewInfo(viewIds);
 
-sendTextFrame("curpart: part=" + std::to_string(curPart));
-sendTextFrame("setpart: part=" + std::to_string(curPart));
+if (getLOKitDocument()->getDocumentType() != LOK_DOCTYPE_TEXT)
+{
+sendTextFrame("curpart: part=" + std::to_string(curPart));
+sendTextFrame("setpart: part=" + std::to_string(curPart));
+}
 
 //TODO: Is the order of these important?
 for (const auto& pair : _lastDocEvents)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Jan Holesovsky
 wsd/LOOLWSD.cpp |2 --
 1 file changed, 2 deletions(-)

New commits:
commit e277935b1e40ef5cf5f9be3a7599c1471b845495
Author: Jan Holesovsky 
Date:   Thu Dec 1 12:32:26 2016 +0100

Revert "loolwsd: alertAllUsersInternal expects lock to be taken"

Unfortunately this brings back the deadlock that
51c88c5fb79c5db146a08f5ef2d9a4fe6d095caa fixed :-(

This reverts commit da3b1b208aefc734c856492db1078e1804702b4e.

Change-Id: If48c0b3ddebf3fb366786d90cb35c3c22963b1a1

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 860e7a3..3e56c67 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -291,8 +291,6 @@ static void forkChildren(const int number)
 if (!fs.empty())
 {
 LOG_WRN("File system of " << fs << " dangerously low on disk 
space");
-
-std::unique_lock DocBrokersLock(DocBrokersMutex);
 alertAllUsersInternal("error: cmd=internal kind=diskfull");
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: kit/ChildSession.cpp

2016-12-01 Thread Jan Holesovsky
 kit/ChildSession.cpp |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 2b13cfa1a7f4b7b3f472b1e7c36c3a6b9606e134
Author: Jan Holesovsky 
Date:   Thu Dec 1 12:25:16 2016 +0100

Don't send setpart: to text documents, it will always jump to the 1st page.

Change-Id: I809f2ba493329174a33f99d63eec2c60b38acb05

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 038a649..dc825cd 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -109,8 +109,11 @@ bool ChildSession::_handleInput(const char *buffer, int 
length)
 // Notify all views about updated view info
 _docManager.notifyViewInfo(viewIds);
 
-sendTextFrame("curpart: part=" + std::to_string(curPart));
-sendTextFrame("setpart: part=" + std::to_string(curPart));
+if (getLOKitDocument()->getDocumentType() != LOK_DOCTYPE_TEXT)
+{
+sendTextFrame("curpart: part=" + std::to_string(curPart));
+sendTextFrame("setpart: part=" + std::to_string(curPart));
+}
 
 //TODO: Is the order of these important?
 for (const auto& pair : _lastDocEvents)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Stephan Bergmann
 sal/qa/osl/condition/osl_Condition.cxx |5 -
 sal/qa/osl/pipe/osl_Pipe.cxx   |3 ---
 2 files changed, 8 deletions(-)

New commits:
commit 659210773abff4dd4a5937c7995af5c0981e9020
Author: Stephan Bergmann 
Date:   Thu Dec 1 12:19:19 2016 +0100

loplugin:unnecessaryoverride (dtors) in sal

Change-Id: I498bb634f2a5800f5effab99227aa4699ed91aae

diff --git a/sal/qa/osl/condition/osl_Condition.cxx 
b/sal/qa/osl/condition/osl_Condition.cxx
index ec254ee..8ee37b2 100644
--- a/sal/qa/osl/condition/osl_Condition.cxx
+++ b/sal/qa/osl/condition/osl_Condition.cxx
@@ -39,11 +39,6 @@ public:
 //get the Condition to operate
 ConditionThread( ::osl::Condition& Con, ConditionType tType): m_MyCon( Con 
), m_MyType( tType ) { }
 
-virtual ~ConditionThread( ) override
-{
-// LLA: do not throw in DTors!
-// LLA: CPPUNIT_ASSERT_MESSAGE( "#ConditionThread does not shutdown 
properly.\n", sal_False == this -> isRunning( ) );
-}
 protected:
 ::osl::Condition& m_MyCon;
 ConditionType m_MyType;
diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx
index 3e72763..988df00 100644
--- a/sal/qa/osl/pipe/osl_Pipe.cxx
+++ b/sal/qa/osl/pipe/osl_Pipe.cxx
@@ -736,9 +736,6 @@ namespace osl_StreamPipe
 sal_Char buf[256];
 Pipe_DataSink_Thread( ) { }
 
-virtual ~Pipe_DataSink_Thread( ) override
-{
-}
 protected:
 void SAL_CALL run( ) override
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Pranav Kant
 loleaflet/src/map/handler/Map.Keyboard.js |   16 
 1 file changed, 16 deletions(-)

New commits:
commit 15781a465584c380a86a79e6a7cba853126032f8
Author: Pranav Kant 
Date:   Thu Dec 1 16:45:06 2016 +0530

loleaflet: Don't handle pageup/dn separately on 'keyup'

... as we handle it already during 'keydown' by sending keyboard
event to core which changes the slide for us.

Change-Id: Id61584ffa0ec5ff3aca098e3dcade664c306c6c3
Reviewed-on: https://gerrit.libreoffice.org/31475
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/loleaflet/src/map/handler/Map.Keyboard.js 
b/loleaflet/src/map/handler/Map.Keyboard.js
index 2d5fb06..62e61db 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -268,22 +268,6 @@ L.Map.Keyboard = L.Handler.extend({
}
}
 
-   // Change slides with PgUp/PgDown in Presentation
-   if (this._map.getDocType() === 'presentation' && !this.modifier 
&& e.type === 'keyup') {
-   var _keyCode = e.originalEvent.keyCode;
-   if (_keyCode === this.keyCodes.pageUp || _keyCode === 
this.keyCodes.pageDown) {
-   e.originalEvent.preventDefault();
-   e.originalEvent.stopPropagation();
-
-   if (_keyCode === this.keyCodes.pageUp) {
-   this._map.setPart('prev');
-   }
-   else if (_keyCode === this.keyCodes.pageDown) {
-   this._map.setPart('next');
-   }
-   }
-   }
-
var charCode = e.originalEvent.charCode;
var keyCode = e.originalEvent.keyCode;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - external/Module_external.mk Repository.mk solenv/gbuild

2016-12-01 Thread Matúš Kukan
 Repository.mk  |2 +-
 external/Module_external.mk|7 ---
 solenv/gbuild/Helper.mk|4 +++-
 solenv/gbuild/Module.mk|2 ++
 solenv/gbuild/extensions/pre_BuildTools.mk |3 +++
 5 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit c3bec2919fda97f37127c3656314a1441f19ce5a
Author: Matúš Kukan 
Date:   Wed Nov 30 14:36:51 2016 +0100

gbuild: Prevent wrong use of gb_Helper_optional_for_host

It's empty, unless gb_Side=build.
This fixes commit 1193443b15b0e38cbfb41573b31acf9a8d90ce2c
which removed icons used in our open dialog from image zip files.

Also, include 985e93ecb44aef97995099d4fd5915afd3cab282
"fix cross-toolset: gb_Helper_optional_for_host can't contain 'newline'"

Reviewed-on: https://gerrit.libreoffice.org/31419
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit 52d409f0d657f314a53f945c9ffb5b8025bea034)

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

diff --git a/Repository.mk b/Repository.mk
index 48ce934..8030cf5 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -918,7 +918,7 @@ $(eval $(call gb_Helper_register_resources,\
eur \
for \
forui \
-   $(call gb_Helper_optional_for_host,DESKTOP,fps_office) \
+   $(call gb_Helper_optional,DESKTOP,fps_office) \
frm \
fwe \
gal \
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 3b54b52..1dbf97b 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -101,13 +101,6 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,XSLTML,xsltml) \
$(call gb_Helper_optional,ZLIB,zlib) \
$(call gb_Helper_optional,ZMF,libzmf) \
-   $(call gb_Helper_optional_for_host,DESKTOP, \
-   $(if $(WITH_GALLERY_BUILD), \
-   $(call gb_Helper_optional,HARFBUZZ,harfbuzz) \
-   $(call gb_Helper_optional,LCMS2,lcms2) \
-   $(call gb_Helper_optional,NSS,nss) \
-   ) \
-   ) \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/Helper.mk b/solenv/gbuild/Helper.mk
index 4e914d1..c3677c0 100644
--- a/solenv/gbuild/Helper.mk
+++ b/solenv/gbuild/Helper.mk
@@ -299,7 +299,9 @@ endef
 endif
 
 define gb_Helper_optional_for_host
-$(if $(filter $(1),$(BUILD_TYPE_FOR_HOST)),$(2))
+$(if $(filter build,$(gb_Side)), \
+   $(if $(filter $(1),$(BUILD_TYPE_FOR_HOST)),$(2)), \
+   $(call gb_Output_error,gb_Helper_optional_for_host: Use only when 
gb_Side=build))
 endef
 
 define gb_Helper_print_on_error
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index eb558a8..6af2b5c 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -144,10 +144,12 @@ $(call gb_Module_get_target,%) :
 
 all : build $(if $(CROSS_COMPILING),,unitcheck $(if 
$(gb_PARTIAL_BUILD),,slowcheck))
 
+ifeq ($(gb_Side),build)
 build-tools : $(gb_BUILD_TOOLS)
$(call gb_Output_announce,loaded tools: $(gb_BUILD_TOOLS),$(true),ALL,6)
$(call gb_Output_announce_title,build-tools done.)
$(call gb_Output_announce_bell)
+endif
 
 build :
$(call gb_Output_announce,top level modules: $(foreach 
module,$(filter-out deliverlog $(WORKDIR)/bootstrap,$^),$(notdir 
$(module))),$(true),ALL,6)
diff --git a/solenv/gbuild/extensions/pre_BuildTools.mk 
b/solenv/gbuild/extensions/pre_BuildTools.mk
index f387df6..5daf671 100644
--- a/solenv/gbuild/extensions/pre_BuildTools.mk
+++ b/solenv/gbuild/extensions/pre_BuildTools.mk
@@ -8,6 +8,7 @@
 #
 
 # Tools we need to build for cross-compiling
+ifeq ($(gb_Side),build)
 gb_BUILD_TOOLS = \
$(foreach executable, \
bestreversemap \
@@ -44,4 +45,6 @@ gb_BUILD_TOOLS = \
,$(call gb_ExternalExecutable_get_dependencies,$(executable))) \
$(INSTROOT)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
 
+endif
+
 # vim: set noet sw=4 ts=4:
___
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-2-0' - loleaflet/src

2016-12-01 Thread Pranav Kant
 loleaflet/src/map/handler/Map.Keyboard.js |   36 ++
 1 file changed, 27 insertions(+), 9 deletions(-)

New commits:
commit 776cbcc6563c9b3a8433673b0e296af8fbf2809c
Author: Pranav Kant 
Date:   Thu Dec 1 15:07:30 2016 +0530

tdf#98484: Fix double-space in chrome when IME enabled

We regressed on chrome with
47699cd9084e4562dd7983f6c4d48cef74b6ba0b as 'textInput' event
clubbed with 'keypress' event started emitting double-spaces.

Tweak the hack to keep IME working on chrome while not regressing
when it is not enabled.

Change-Id: I0901724bf2db1794078fef3eb7283663b6f6a13b
Reviewed-on: https://gerrit.libreoffice.org/31469
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 
(cherry picked from commit 2c7f7e8b699401d0b2c374235c353fdf438aeb0e)
Reviewed-on: https://gerrit.libreoffice.org/31474
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/src/map/handler/Map.Keyboard.js 
b/loleaflet/src/map/handler/Map.Keyboard.js
index 2a35423..2d5fb06 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -235,6 +235,7 @@ L.Map.Keyboard = L.Handler.extend({
var alt = e.originalEvent.altKey ? this.keyModifier.alt : 0;
var cmd = e.originalEvent.metaKey ? this.keyModifier.ctrl : 0;
var location = e.originalEvent.location;
+   this._keyHandled = this._keyHandled || false;
this.modifier = shift | ctrl | alt | cmd;
 
// On Windows, pressing AltGr = Alt + Ctrl
@@ -286,13 +287,6 @@ L.Map.Keyboard = L.Handler.extend({
var charCode = e.originalEvent.charCode;
var keyCode = e.originalEvent.keyCode;
 
-   // Hack for making space work in chrome when IME is enabled
-   // Chrome doesn't fire compositionend event when IME is enabled 
and user presses .
-   // However, it sends 'textInput' event in such a case. treat it 
like 'compositionend' events
-   if (e.type === 'textInput' && e.originalEvent.data === ' ') {
-   e.type = 'compositionend';
-   }
-
if (e.type === 'compositionend') {
var compCharCodes = [];
for (var i = 0; i < e.originalEvent.data.length; i++) {
@@ -313,8 +307,13 @@ L.Map.Keyboard = L.Handler.extend({
if (this._map._permission === 'edit') {
docLayer._resetPreFetching();
 
-   if (e.type === 'keydown' && 
this.handleOnKeyDown[keyCode] && charCode === 0) {
-   docLayer._postKeyboardEvent('input', charCode, 
unoKeyCode);
+   if (e.type === 'keydown') {
+   this._keyHandled = false;
+   this._bufferedTextInputEvent = null;
+
+   if (this.handleOnKeyDown[keyCode] && charCode 
=== 0) {
+   docLayer._postKeyboardEvent('input', 
charCode, unoKeyCode);
+   }
}
else if ((e.type === 'keypress' || e.type === 
'compositionend') &&
(!this.handleOnKeyDown[keyCode] || charCode !== 
0)) {
@@ -334,9 +333,28 @@ L.Map.Keyboard = L.Handler.extend({
} else {
docLayer._postKeyboardEvent('input', 
charCode, unoKeyCode);
}
+
+   this._keyHandled = true;
+   }
+   else if (e.type === 'textInput') {
+   // Store the textInput event
+   this._bufferedTextInputEvent = e;
}
else if (e.type === 'keyup') {
+   // Hack for making space work in chrome when 
IME is enabled
+   // Chrome doesn't fire compositionend event or 
keypress when
+   // IME is enabled *and* user presses .
+   // However, it sends 'textInput' event in such 
a case.
+   // Use the buffered textInput event if its the 
space key and has not been
+   // handled already by 'keypress' or 
'compositionend' events above
+   if (!this._keyHandled && 
this._bufferedTextInputEvent && e.originalEvent.key === 
this._bufferedTextInputEvent.originalEvent.data) {
+   charCode = e.originalEvent.keyCode;
+   docLayer._postKeyboardEvent('input', 
charCode, 0);
+   }
docLayer._postKeyboardEvent('up', charCode, 
unoKeyCode);
+
+ 

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

2016-12-01 Thread Justin Luth
 sw/source/core/layout/frmtool.cxx |   16 
 1 file changed, 4 insertions(+), 12 deletions(-)

New commits:
commit feacae8571d003c60960d852e835a17ef722265c
Author: Justin Luth 
Date:   Wed Nov 2 15:15:55 2016 +0300

there is a function for that: CalcLineSpace(xx, bEvenIfNoLine)

Change-Id: Ideeb031f20611bd9d2a01343bc75e1d0510ad6e9
Reviewed-on: https://gerrit.libreoffice.org/30513
Reviewed-by: Justin Luth 
Tested-by: Justin Luth 
(cherry picked from commit 5d9d0f3c979732ade57b9c4c4960dd030ffdc9f9)
Signed-off-by: Michael Meeks 
Reviewed-on: https://gerrit.libreoffice.org/31467
Tested-by: Jenkins 

diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index 70c1409..a490ba7 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1985,36 +1985,28 @@ long SwBorderAttrs::CalcLeft( const SwFrame *pCaller ) 
const
 
 void SwBorderAttrs::CalcTopLine_()
 {
-m_nTopLine = (m_bBorderDist && !m_rBox.GetTop())
-? m_rBox.GetDistance  (SvxBoxItemLine::TOP)
-: m_rBox.CalcLineSpace(SvxBoxItemLine::TOP);
+m_nTopLine = m_rBox.CalcLineSpace( SvxBoxItemLine::TOP, 
/*bEvenIfNoLine*/true );
 m_nTopLine = m_nTopLine + 
m_rShadow.CalcShadowSpace(SvxShadowItemSide::TOP);
 m_bTopLine = false;
 }
 
 void SwBorderAttrs::CalcBottomLine_()
 {
-m_nBottomLine = (m_bBorderDist && !m_rBox.GetBottom())
-? m_rBox.GetDistance  (SvxBoxItemLine::BOTTOM)
-: m_rBox.CalcLineSpace(SvxBoxItemLine::BOTTOM);
+m_nBottomLine = m_rBox.CalcLineSpace( SvxBoxItemLine::BOTTOM, true );
 m_nBottomLine = m_nBottomLine + 
m_rShadow.CalcShadowSpace(SvxShadowItemSide::BOTTOM);
 m_bBottomLine = false;
 }
 
 void SwBorderAttrs::CalcLeftLine_()
 {
-m_nLeftLine = (m_bBorderDist && !m_rBox.GetLeft())
-? m_rBox.GetDistance  (SvxBoxItemLine::LEFT)
-: m_rBox.CalcLineSpace(SvxBoxItemLine::LEFT);
+m_nLeftLine = m_rBox.CalcLineSpace( SvxBoxItemLine::LEFT, true );
 m_nLeftLine = m_nLeftLine + 
m_rShadow.CalcShadowSpace(SvxShadowItemSide::LEFT);
 m_bLeftLine = false;
 }
 
 void SwBorderAttrs::CalcRightLine_()
 {
-m_nRightLine = (m_bBorderDist && !m_rBox.GetRight())
-? m_rBox.GetDistance  (SvxBoxItemLine::RIGHT)
-: m_rBox.CalcLineSpace(SvxBoxItemLine::RIGHT);
+m_nRightLine = m_rBox.CalcLineSpace(SvxBoxItemLine::RIGHT, true );
 m_nRightLine = m_nRightLine + 
m_rShadow.CalcShadowSpace(SvxShadowItemSide::RIGHT);
 m_bRightLine = false;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Pranav Kant
 loleaflet/src/map/handler/Map.Keyboard.js |   36 ++
 1 file changed, 27 insertions(+), 9 deletions(-)

New commits:
commit 2c7f7e8b699401d0b2c374235c353fdf438aeb0e
Author: Pranav Kant 
Date:   Thu Dec 1 15:07:30 2016 +0530

tdf#98484: Fix double-space in chrome when IME enabled

We regressed on chrome with
47699cd9084e4562dd7983f6c4d48cef74b6ba0b as 'textInput' event
clubbed with 'keypress' event started emitting double-spaces.

Tweak the hack to keep IME working on chrome while not regressing
when it is not enabled.

Change-Id: I0901724bf2db1794078fef3eb7283663b6f6a13b
Reviewed-on: https://gerrit.libreoffice.org/31469
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loleaflet/src/map/handler/Map.Keyboard.js 
b/loleaflet/src/map/handler/Map.Keyboard.js
index 2a35423..2d5fb06 100644
--- a/loleaflet/src/map/handler/Map.Keyboard.js
+++ b/loleaflet/src/map/handler/Map.Keyboard.js
@@ -235,6 +235,7 @@ L.Map.Keyboard = L.Handler.extend({
var alt = e.originalEvent.altKey ? this.keyModifier.alt : 0;
var cmd = e.originalEvent.metaKey ? this.keyModifier.ctrl : 0;
var location = e.originalEvent.location;
+   this._keyHandled = this._keyHandled || false;
this.modifier = shift | ctrl | alt | cmd;
 
// On Windows, pressing AltGr = Alt + Ctrl
@@ -286,13 +287,6 @@ L.Map.Keyboard = L.Handler.extend({
var charCode = e.originalEvent.charCode;
var keyCode = e.originalEvent.keyCode;
 
-   // Hack for making space work in chrome when IME is enabled
-   // Chrome doesn't fire compositionend event when IME is enabled 
and user presses .
-   // However, it sends 'textInput' event in such a case. treat it 
like 'compositionend' events
-   if (e.type === 'textInput' && e.originalEvent.data === ' ') {
-   e.type = 'compositionend';
-   }
-
if (e.type === 'compositionend') {
var compCharCodes = [];
for (var i = 0; i < e.originalEvent.data.length; i++) {
@@ -313,8 +307,13 @@ L.Map.Keyboard = L.Handler.extend({
if (this._map._permission === 'edit') {
docLayer._resetPreFetching();
 
-   if (e.type === 'keydown' && 
this.handleOnKeyDown[keyCode] && charCode === 0) {
-   docLayer._postKeyboardEvent('input', charCode, 
unoKeyCode);
+   if (e.type === 'keydown') {
+   this._keyHandled = false;
+   this._bufferedTextInputEvent = null;
+
+   if (this.handleOnKeyDown[keyCode] && charCode 
=== 0) {
+   docLayer._postKeyboardEvent('input', 
charCode, unoKeyCode);
+   }
}
else if ((e.type === 'keypress' || e.type === 
'compositionend') &&
(!this.handleOnKeyDown[keyCode] || charCode !== 
0)) {
@@ -334,9 +333,28 @@ L.Map.Keyboard = L.Handler.extend({
} else {
docLayer._postKeyboardEvent('input', 
charCode, unoKeyCode);
}
+
+   this._keyHandled = true;
+   }
+   else if (e.type === 'textInput') {
+   // Store the textInput event
+   this._bufferedTextInputEvent = e;
}
else if (e.type === 'keyup') {
+   // Hack for making space work in chrome when 
IME is enabled
+   // Chrome doesn't fire compositionend event or 
keypress when
+   // IME is enabled *and* user presses .
+   // However, it sends 'textInput' event in such 
a case.
+   // Use the buffered textInput event if its the 
space key and has not been
+   // handled already by 'keypress' or 
'compositionend' events above
+   if (!this._keyHandled && 
this._bufferedTextInputEvent && e.originalEvent.key === 
this._bufferedTextInputEvent.originalEvent.data) {
+   charCode = e.originalEvent.keyCode;
+   docLayer._postKeyboardEvent('input', 
charCode, 0);
+   }
docLayer._postKeyboardEvent('up', charCode, 
unoKeyCode);
+
+   this._keyHandled = true;
+   this._bufferedTextInputEvent = null;
}
if (keyCode === 9) {

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

2016-12-01 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 93025ceff17deae243dca1e19ffd21d106410854
Author: Ashod Nakashian 
Date:   Wed Nov 30 20:23:14 2016 -0500

loolwsd: alertAllUsersInternal expects lock to be taken

Change-Id: I50a4d0edd500043c52c28aba3e61ba2a892c102d
(cherry picked from commit 3c1f7b82144fe978a2fdef9cd1fbf6fcd859c9b5)
Reviewed-on: https://gerrit.libreoffice.org/31454
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 6b143a4..f433637 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -291,6 +291,8 @@ static void forkChildren(const int number)
 if (!fs.empty())
 {
 LOG_WRN("File system of " << fs << " dangerously low on disk 
space");
+
+std::unique_lock DocBrokersLock(DocBrokersMutex);
 alertAllUsersInternal("error: cmd=internal kind=diskfull");
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/protocol.txt

2016-12-01 Thread Pranav Kant
 wsd/protocol.txt |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit a0be903cd7b89d8ca7e51333fa7b3414c8c8fd73
Author: Pranav Kant 
Date:   Tue Nov 29 15:03:27 2016 +0530

Document wopi: protocol message

Change-Id: I3a082a264a6081e8225a7820ec78d85f27aea404
Reviewed-on: https://gerrit.libreoffice.org/31380
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/wsd/protocol.txt b/wsd/protocol.txt
index b6d55ef..d8f1231 100644
--- a/wsd/protocol.txt
+++ b/wsd/protocol.txt
@@ -384,7 +384,11 @@ wopi: 
  capabilities/information for loleaflet to act accordingly.
 
  Properties mentioned:
- PostMessageOrigin: See WOPI specs for more information
+ + PostMessageOrigin: See WOPI specs for more information
+ + HideSaveOption: (boolean): If loleaflet should hide the save options
+ + HidePrintOption: (boolean): If loleaflet should hide print options
+ + HideExportOption: (boolean): If loleaflet should hide the export options
+   this implies 'Download as' options in file menu
 
 child -> parent
 ===
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Ashod Nakashian
 desktop/qa/desktop_lib/test_desktop_lib.cxx |   29 
 desktop/source/lib/init.cxx |   16 ---
 2 files changed, 42 insertions(+), 3 deletions(-)

New commits:
commit 10030e3f7937971e5ae2510df8606c19e1036252
Author: Ashod Nakashian 
Date:   Thu Dec 1 00:53:11 2016 -0500

Lok: correct tile invalidation merging

Rectangles that are empty (i.e. IsEmpty() returns true)
were incorrectly considered to mean equivalent to "EMPTY".
The latter means full-area, while the former mean zero-area.

This fixes the issue by restrict full-area to rectangles
with 2 billion units on the each side (roughly INT_MAX) or
more, and using this new check rather than IsEmpty().

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

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index d38a6a0..ad7cf92 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -98,6 +98,7 @@ public:
 void testContextMenuWriter();
 void testContextMenuImpress();
 void testNotificationCompression();
+void testTileInvalidationCompression();
 void testPartInInvalidation();
 void testRedlineWriter();
 void testTrackChanges();
@@ -131,6 +132,7 @@ public:
 CPPUNIT_TEST(testContextMenuWriter);
 CPPUNIT_TEST(testContextMenuImpress);
 CPPUNIT_TEST(testNotificationCompression);
+CPPUNIT_TEST(testTileInvalidationCompression);
 CPPUNIT_TEST(testPartInInvalidation);
 CPPUNIT_TEST(testRedlineWriter);
 CPPUNIT_TEST(testTrackChanges);
@@ -1137,6 +1139,33 @@ void DesktopLOKTest::testNotificationCompression()
 CPPUNIT_ASSERT_EQUAL(std::string("1"), std::get<1>(notifs[i++]));
 }
 
+void DesktopLOKTest::testTileInvalidationCompression()
+{
+LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
+std::vector> notifs;
+std::unique_ptr handler(new 
CallbackFlushHandler(pDocument, callbackCompressionTest, ¬ifs));
+
+comphelper::LibreOfficeKit::setPartInInvalidation(true);
+comphelper::ScopeGuard aGuard([]()
+{
+comphelper::LibreOfficeKit::setPartInInvalidation(false);
+});
+
+handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0");
+handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 2147483767, 
2147483767, 0");
+handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, 239, 239, 0");
+handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "-121, -121, 300, 300, 0");
+handler->queue(LOK_CALLBACK_INVALIDATE_TILES, "0, 0, -32767, -32767, 0");
+
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(static_cast(1), notifs.size());
+
+size_t i = 0;
+CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_INVALIDATE_TILES, 
(int)std::get<0>(notifs[i]));
+CPPUNIT_ASSERT_EQUAL(std::string("0, 0, 2147483767, 2147483767, 0"), 
std::get<1>(notifs[i++]));
+}
+
 void DesktopLOKTest::testPartInInvalidation()
 {
 LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 3bbf88b..cce6117 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -355,11 +355,20 @@ struct RectangleAndPart
 return ss.str().c_str();
 }
 
+/// Infinite Rectangle is when both dimensions are >= 2e7.
+// ~2 billion twips is INT_MAX, which is full-area.
+bool isInfinite() const
+{
+return m_aRectangle.GetWidth() >= 2e7 &&
+   m_aRectangle.GetHeight() >= 2e7;
+}
+
 static RectangleAndPart Create(const std::string& rPayload)
 {
 RectangleAndPart aRet;
 if (rPayload.find("EMPTY") == 0) // payload starts with "EMPTY"
 {
+aRet.m_aRectangle = Rectangle(0, 0, INT_MAX, INT_MAX);
 if (comphelper::LibreOfficeKit::isPartInInvalidation())
 aRet.m_nPart = std::stol(rPayload.substr(6));
 
@@ -678,9 +687,9 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
 {
 RectangleAndPart rcOld = RectangleAndPart::Create(pos->second);
 RectangleAndPart rcNew = RectangleAndPart::Create(payload);
-if (rcOld.m_aRectangle.IsEmpty() && rcOld.m_nPart == rcNew.m_nPart)
+if (rcOld.isInfinite() && rcOld.m_nPart == rcNew.m_nPart)
 {
-//SAL_WARN("lok", "Skipping queue [" + std::to_string(type) + 
"]: [" + payload + "] since all tiles need to be invalidated.");
+SAL_WARN("lok", "Skipping queue [" << type << "]: [" << 
payload << "] since all tiles need to be invalidated.");
 return;
 }
 }
@@ -767,8 +776,9 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
 {
 RectangleAndPart rcNew = Rectangl

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

2016-12-01 Thread Stephan Bergmann
 sc/source/ui/unoobj/textuno.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 8bd3d06d974fbd301665630e3c5396db9c9e30d9
Author: Stephan Bergmann 
Date:   Thu Dec 1 11:02:39 2016 +0100

Throw RuntimeException with message

...seen JunitTest_sc_unoapi_4 fail once in
sc.ScHeaderFooterTextCursor::com::sun::star::text::XTextRange with an empty
RuntimeException when calling some remote getString.

Change-Id: Id631feffce810b40825fe0fa49d8f1846f045033

diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index ddf83ee..9487ae7 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -332,7 +332,8 @@ OUString SAL_CALL ScHeaderFooterTextObj::getString() 
throw(uno::RuntimeException
 
 uno::Reference xContentObj = 
aTextData.GetContentObj();
 if (!xContentObj.is())
-throw css::uno::RuntimeException("");
+throw css::uno::RuntimeException(
+"ScHeaderFooterTextObj::getString: no ContentObj");
 
 rtl::Reference pObj = 
ScHeaderFooterContentObj::getImplementation(xContentObj);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-12-01 Thread Miklos Vajna
 xmlsecurity/qa/unit/pdfsigning/data/good-non-detached.pdf |binary
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |   23 
 xmlsecurity/source/pdfio/pdfdocument.cxx  |   26 --
 3 files changed, 38 insertions(+), 11 deletions(-)

New commits:
commit 055fd58711d57af4d96214aebd71b713303d5527
Author: Miklos Vajna 
Date:   Thu Dec 1 10:02:49 2016 +0100

xmlsecurity PDF verify: support non-detached signatures

And a couple of other changes to accept the bugdoc from
.

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

diff --git a/xmlsecurity/qa/unit/pdfsigning/data/good-non-detached.pdf 
b/xmlsecurity/qa/unit/pdfsigning/data/good-non-detached.pdf
new file mode 100644
index 000..8e5b215
Binary files /dev/null and 
b/xmlsecurity/qa/unit/pdfsigning/data/good-non-detached.pdf differ
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx 
b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index 8932d6f..5b88c71 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -64,7 +64,10 @@ public:
 void testPDF14LOWin();
 /// Test a PAdES document, signed by LO on Linux.
 void testPDFPAdESGood();
+/// Test writing a PAdES signature.
 void testSigningCertificateAttribute();
+/// Test that we accept files which are supposed to be good.
+void testGood();
 
 CPPUNIT_TEST_SUITE(PDFSigningTest);
 CPPUNIT_TEST(testPDFAdd);
@@ -77,6 +80,7 @@ public:
 CPPUNIT_TEST(testPDF14LOWin);
 CPPUNIT_TEST(testPDFPAdESGood);
 CPPUNIT_TEST(testSigningCertificateAttribute);
+CPPUNIT_TEST(testGood);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -343,6 +347,25 @@ void PDFSigningTest::testSigningCertificateAttribute()
 CPPUNIT_ASSERT(rInformation.bHasSigningCertificate);
 }
 
+void PDFSigningTest::testGood()
+{
+#ifndef _WIN32
+const std::initializer_list aNames =
+{
+// We failed to determine if this is good or bad.
+OUStringLiteral("good-non-detached.pdf"),
+};
+
+for (const auto& rName : aNames)
+{
+std::vector aInfos = 
verify(m_directories.getURLFromSrc(DATA_DIRECTORY) + rName, 1, 
/*rExpectedSubFilter=*/OString());
+CPPUNIT_ASSERT(!aInfos.empty());
+SignatureInformation& rInformation = aInfos[0];
+
CPPUNIT_ASSERT_EQUAL(xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED, 
rInformation.nStatus);
+}
+#endif
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(PDFSigningTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx 
b/xmlsecurity/source/pdfio/pdfdocument.cxx
index 2092369..e3e89a0 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -1552,7 +1552,7 @@ void PDFDocument::ReadXRefStream(SvStream& rStream)
 nLineLength += aW[i];
 }
 
-if (nLineLength - 1 != nColumns)
+if (nPredictor > 1 && nLineLength - 1 != nColumns)
 {
 SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ReadXRefStream: 
/DecodeParms/Columns is inconsistent with /W");
 return;
@@ -1573,7 +1573,7 @@ void PDFDocument::ReadXRefStream(SvStream& rStream)
 size_t nIndex = nFirstObject + nEntry;
 
 aStream.ReadBytes(aOrigLine.data(), aOrigLine.size());
-if (aOrigLine[0] + 10 != nPredictor)
+if (nPredictor > 1 && aOrigLine[0] + 10 != nPredictor)
 {
 SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ReadXRefStream: 
in-stream predictor is inconsistent with /DecodeParms/Predictor for object #" 
<< nIndex);
 return;
@@ -2116,7 +2116,7 @@ bool PDFDocument::ValidateSignature(SvStream& rStream, 
PDFObjectElement* pSignat
 }
 
 auto pSubFilter = 
dynamic_cast(pValue->Lookup("SubFilter"));
-if (!pSubFilter || (pSubFilter->GetValue() != "adbe.pkcs7.detached" && 
pSubFilter->GetValue() != "ETSI.CAdES.detached"))
+if (!pSubFilter || (pSubFilter->GetValue() != "adbe.pkcs7.detached" && 
pSubFilter->GetValue() != "adbe.pkcs7.sha1" && pSubFilter->GetValue() != 
"ETSI.CAdES.detached"))
 {
 SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ValidateSignature: no or 
unsupported sub-filter");
 return false;
@@ -2415,15 +2415,19 @@ bool PDFDocument::ValidateSignature(SvStream& rStream, 
PDFObjectElement* pSignat
 SECItem* pContentInfoContentData = 
pCMSSignedData->contentInfo.content.data;
 if (pContentInfoContentData && pContentInfoContentData->data)
 {
-SAL_WARN("xmlsecurity.pdfio", "PDFDocument::ValidateSignature: 
expected nullptr content info");
-return false;
+// Not a detached signature.
+if (!memcmp(pActualResultBuffer, pContentInfoContentData->da

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

2016-12-01 Thread Miklos Vajna
 xmlsecurity/inc/framework/saxeventkeeperimpl.hxx|  322 
 xmlsecurity/source/framework/saxeventkeeperimpl.cxx |5 
 xmlsecurity/source/framework/saxeventkeeperimpl.hxx |  321 ---
 xmlsecurity/source/framework/xsec_framework.cxx |2 
 xmlsecurity/source/helper/xsecctl.cxx   |   29 -
 5 files changed, 333 insertions(+), 346 deletions(-)

New commits:
commit 7920ba294b7785accc9785c284b46ce28e5a0b05
Author: Miklos Vajna 
Date:   Thu Dec 1 08:36:41 2016 +0100

xmlsecurity: instantiate SAXEventKeeperImpl directly in XSecController

Going via UNO for a class in the same module is an overkill.

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

diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.hxx 
b/xmlsecurity/inc/framework/saxeventkeeperimpl.hxx
similarity index 97%
rename from xmlsecurity/source/framework/saxeventkeeperimpl.hxx
rename to xmlsecurity/inc/framework/saxeventkeeperimpl.hxx
index 214575d..73615a3 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.hxx
+++ b/xmlsecurity/inc/framework/saxeventkeeperimpl.hxx
@@ -17,8 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_XMLSECURITY_SOURCE_FRAMEWORK_SAXEVENTKEEPERIMPL_HXX
-#define INCLUDED_XMLSECURITY_SOURCE_FRAMEWORK_SAXEVENTKEEPERIMPL_HXX
+#ifndef INCLUDED_XMLSECURITY_INC_FRAMEWORK_SAXEVENTKEEPERIMPL_HXX
+#define INCLUDED_XMLSECURITY_INC_FRAMEWORK_SAXEVENTKEEPERIMPL_HXX
 
 #include 
 #include 
@@ -30,15 +30,16 @@
 #include 
 #include 
 #include 
+#include "xsecfwdllapi.h"
 #include 
 
-#include "buffernode.hxx"
-#include "elementmark.hxx"
-#include "elementcollector.hxx"
+class BufferNode;
+class ElementMark;
+class ElementCollector;
 
 #include 
 
-class SAXEventKeeperImpl : public cppu::WeakImplHelper
+class XSECFW_DLLPUBLIC SAXEventKeeperImpl : public cppu::WeakImplHelper
 <
 css::xml::crypto::sax::XSecuritySAXEventKeeper,
 css::xml::crypto::sax::XReferenceResolvedBroadcaster,
diff --git a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx 
b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
index ebe6823..e14bc1f 100644
--- a/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
+++ b/xmlsecurity/source/framework/saxeventkeeperimpl.cxx
@@ -18,7 +18,10 @@
  */
 
 
-#include "saxeventkeeperimpl.hxx"
+#include "framework/saxeventkeeperimpl.hxx"
+#include "buffernode.hxx"
+#include "elementmark.hxx"
+#include "elementcollector.hxx"
 #include 
 #include 
 #include 
diff --git a/xmlsecurity/source/framework/xsec_framework.cxx 
b/xmlsecurity/source/framework/xsec_framework.cxx
index f05b95e..bfe132e 100644
--- a/xmlsecurity/source/framework/xsec_framework.cxx
+++ b/xmlsecurity/source/framework/xsec_framework.cxx
@@ -26,7 +26,7 @@
 #include "encryptorimpl.hxx"
 #include "signaturecreatorimpl.hxx"
 #include "framework/signatureverifierimpl.hxx"
-#include "saxeventkeeperimpl.hxx"
+#include "framework/saxeventkeeperimpl.hxx"
 #include "xmlencryptiontemplateimpl.hxx"
 #include "xmlsignaturetemplateimpl.hxx"
 
diff --git a/xmlsecurity/source/helper/xsecctl.cxx 
b/xmlsecurity/source/helper/xsecctl.cxx
index bc9adbe..641de5e 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -20,6 +20,7 @@
 
 #include "xsecctl.hxx"
 #include "documentsignaturehelper.hxx"
+#include "framework/saxeventkeeperimpl.hxx"
 #include 
 #include 
 
@@ -47,13 +48,6 @@ namespace cssxc = com::sun::star::xml::crypto;
 namespace cssxs = com::sun::star::xml::sax;
 using namespace com::sun::star;
 
-/* bridge component names */
-#define XMLSIGNATURE_COMPONENT "com.sun.star.xml.crypto.XMLSignature"
-#define XMLDOCUMENTWRAPPER_COMPONENT 
"com.sun.star.xml.wrapper.XMLDocumentWrapper"
-
-/* xml security framework components */
-#define SAXEVENTKEEPER_COMPONENT "com.sun.star.xml.crypto.sax.SAXEventKeeper"
-
 XSecController::XSecController( const 
cssu::Reference& rxCtx )
 : mxCtx(rxCtx)
 , m_nNextSecurityId(1)
@@ -117,15 +111,11 @@ void XSecController::createXSecComponent( )
  *
  *   FUNCTION
  *  Creates xml security components, including:
- *  1. an xml signature bridge component ( Java based or C based)
- *  2. an XMLDocumentWrapper component ( Java based or C based)
+ *  1. an xml signature bridge component
+ *  2. an XMLDocumentWrapper component
  *  3. a SAXEventKeeper component
  
**/
 {
-OUString sSAXEventKeeper( SAXEVENTKEEPER_COMPONENT );
-OUString sXMLSignature( XMLSIGNATURE_COMPONENT );
-OUString sXMLDocument( XMLDOCUMENTWRAPPER_COMPONENT );
-
 /*
  * marks all security components are not available.
  */
@@ -137,7 +127,7 @@ void XSecController::createXSecComponent( )
 cssu::Reference< cssl::XMultiComponentFactory > xMCF( 
mxCtx->getServiceManager() );
 
 m_xXMLSi

Re: gtk3, wayland, opengl, glew and epoxy

2016-12-01 Thread Michael Meeks
Hi Caolan,

On 29/11/16 12:20, Caolán McNamara wrote:
> locally I have our opengl slideshow transitions working[1] under gtk3
> on wayland and I'd like to merge this to master.

Nice work =)

> Is there any objection to the principle of dropping glew in favour of
> epoxy, or do I need to go down a more complicated conditional approach.

I think quite the opposite; from what I recall in contrast to glew
libepoxy is a full de-coupling of the OGL-ness on all platforms; ie. it
is not necessary to link libGL-ness into any of our binaries.

That is great news for removing much of:

commit 96c1ae1d8e78ae8b9bd7d4001645cad24d62b720
Author: Oliver Specht 
Date:   Wed Mar 23 13:40:13 2016 +0100

fix headless build

disables OpenGL and glew usage, lets --without-gui do what
--without-x did before and disables X related test


Into cleaner run-time checks; and removing that whole conditional
compilation thing for GL - which would be a nice cleanup.

Good stuff,

Michael.

-- 
michael.me...@collabora.com <><, Pseudo Engineer, itinerant idiot
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: New to LibreOffice

2016-12-01 Thread Jan Iversen
Welcome.

First step is to download LibreOffice and get it build.

We have made a step by step guide on how to proceed:

https://wiki.documentfoundation.org/Development/GetInvolved 


rgds
jan I.

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


Re: Atishay Jain License statement

2016-12-01 Thread Jan Iversen
WELCOME
Thanks for your license statement.

We suggest you add yourself to our wiki (remark this is not a demand)
https://wiki.documentfoundation.org/Development/Developers

If you want help to get started or have any questions, then please contact me. 
I am here to help you (and others) in getting their first patch submitted.

LibreOffice is a very big program and getting it built, setting up gerrit, and 
getting the first patch right can be a bit challenging, therefore do not 
hesitate to email me if you want help.

We have made a step by step guide to help you get started:
https://wiki.documentfoundation.org/Development/GetInvolved

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


Re: Vidhey PV

2016-12-01 Thread Jan Iversen
Duplicate ?

> On 28 Nov 2016, at 05:39, monu7210 .  wrote:
> 
> All of my past & future contributions to LibreOffice may be
> licensed under the MPLv2/LGPLv3+ dual license.
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice

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


Re: vidhey license statement

2016-12-01 Thread Jan Iversen
WELCOME
Thanks for your license statement.

We suggest you add yourself to our wiki (remark this is not a demand)
https://wiki.documentfoundation.org/Development/Developers

If you want help to get started or have any questions, then please contact me. 
I am here to help you (and others) in getting their first patch submitted.

LibreOffice is a very big program and getting it built, setting up gerrit, and 
getting the first patch right can be a bit challenging, therefore do not 
hesitate to email me if you want help.

We have made a step by step guide to help you get started:
https://wiki.documentfoundation.org/Development/GetInvolved

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


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

2016-12-01 Thread Khaled Hosny
 vcl/inc/win/salgdi.h  |   39 
 vcl/inc/win/winlayout.hxx |  161 --
 vcl/win/gdi/salfont.cxx   |  129 -
 vcl/win/gdi/salgdi.cxx|5 
 vcl/win/gdi/winlayout.cxx | 3173 +-
 5 files changed, 132 insertions(+), 3375 deletions(-)

New commits:
commit 6c436ba09cb35235ce6f4065cf74c9a6ff14a4bd
Author: Khaled Hosny 
Date:   Thu Dec 1 03:33:30 2016 +0200

Kill old Windows layout engines

Change-Id: I33f8322a6371150698bf926165fb6dddb9d4092c
Reviewed-on: https://gerrit.libreoffice.org/31452
Tested-by: Jenkins 
Reviewed-by: Khaled Hosny 

diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 8471699..d3a7185 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -74,27 +74,16 @@ public:
 
 BYTEGetCharSet() const  { return meWinCharSet; 
}
 BYTEGetPitchAndFamily() const   { return 
mnPitchAndFamily; }
-boolSupportsCJK() const { return 
mbHasCJKSupport; }
-boolSupportsArabic() const  { return 
mbHasArabicSupport; }
 
 FontCharMapRef  GetFontCharMap() const;
 bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const;
-const Ucs2SIntMap* GetEncodingVector() const { return mpEncodingVector; }
-void SetEncodingVector( const Ucs2SIntMap* pNewVec ) const
-{
-if( mpEncodingVector )
-delete mpEncodingVector;
-mpEncodingVector = pNewVec;
-}
+
 private:
 sal_IntPtr  mnId;
 
 // some members that are initalized lazily when the font gets selected 
into a HDC
-mutable boolmbHasCJKSupport;
-mutable boolmbHasArabicSupport;
 mutable boolmbFontCapabilitiesRead;
 mutable FontCharMapRef  mxUnicodeMap;
-mutable const Ucs2SIntMap*  mpEncodingVector;
 mutable vcl::FontCapabilities   maFontCapabilities;
 
 BYTEmeWinCharSet;
@@ -105,14 +94,8 @@ private:
 voidReadCmapTable( HDC ) const;
 voidGetFontCapabilities( HDC hDC ) const;
 
-voidReadGsubTable( HDC ) const;
-
-mutable std::unordered_set  maGsubTable;
-mutable boolmbGsubRead;
 mutable hb_font_t*  mpHbFont;
 public:
-boolHasGSUBstitutions( HDC ) const;
-boolIsGSUBstituted( sal_UCS4 ) const;
 hb_font_t*  GetHbFont() const { return mpHbFont; }
 voidSetHbFont( hb_font_t* pHbFont ) const { mpHbFont = 
pHbFont; }
 };
@@ -168,9 +151,6 @@ class WinSalGraphics : public SalGraphics
 friend class WinOpenGLSalGraphicsImpl;
 friend class ScopedFont;
 friend class OpenGLCompatibleDC;
-friend class WinLayout;
-friend class SimpleWinLayout;
-friend class UniscribeLayout;
 
 protected:
 std::unique_ptr mpImpl;
@@ -196,9 +176,6 @@ private:
 COLORREFmnTextColor;// TextColor
 RGNDATA*mpClipRgnData;  // ClipRegion-Data
 RGNDATA*mpStdClipRgnData;   // Cache 
Standard-ClipRegion-Data
-boolmbFontKernInit; // FALSE: FontKerns must be 
queried
-KERNINGPAIR*mpFontKernPairs;// Kerning Pairs of the 
current Font
-sal_uIntPtr mnFontKernPairCount;// Number of Kerning Pairs of 
the current Font
 int mnPenWidth; // Linienbreite
 
 LogicalFontInstance* GetWinFontEntry(int nFallbackLevel);
@@ -321,9 +298,6 @@ protected:
 private:
 // local helpers
 
-// get kernign pairs of the current font
-sal_uLong   GetKernPairs();
-
 static void DrawTextLayout(const CommonSalLayout&, HDC, bool 
bUseDWrite);
 
 public:
@@ -427,17 +401,6 @@ voidImplGetLogFontFromFontSelect( HDC, const 
FontSelectPattern*,
 
 #define MAX_64KSALPOINTSsal_uInt16)0x)-8)/sizeof(POINTS))
 
-// #102411# Win's GCP mishandles kerning => we need to do it ourselves
-// SalGraphicsData::mpFontKernPairs is sorted by
-inline bool ImplCmpKernData( const KERNINGPAIR& a, const KERNINGPAIR& b )
-{
-if( a.wFirst < b.wFirst )
-return true;
-if( a.wFirst > b.wFirst )
-return false;
-return (a.wSecond < b.wSecond);
-}
-
 // called extremely often from just one spot => inline
 inline bool WinFontFace::HasChar( sal_uInt32 cChar ) const
 {
diff --git a/vcl/inc/win/winlayout.hxx b/vcl/inc/win/winlayout.hxx
index ff57506..d339df3 100644
--- a/vcl/inc/win/winlayout.hxx
+++ b/vcl/inc/win/winlayout.hxx
@@ -35,7 +35,6 @@
 typedef std::unordered_map IntMap;
 
 class WinFontInstance;
-struct VisualItem;
 
 namespace
 {
@@ -53,7 +52,6 @@ struct OpenGLGlyphDrawElement
 int mnBaselineOffset;
 int mnHeight;
 bool mbVertical;
-bool mbRealGlyphIndices;
 
 int getExtraSpace() const
 {

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

2016-12-01 Thread Muthu Subramanian
 sd/qa/unit/data/pptx/tdf103477.pptx |binary
 sd/qa/unit/import-tests.cxx |   17 +
 2 files changed, 17 insertions(+)

New commits:
commit 6e5e55c29eee285e56fe7f9708e9faf3ad62eec2
Author: Muthu Subramanian 
Date:   Sun Oct 30 23:49:51 2016 +0530

tdf#103477 Add unit test

Change-Id: Ic960da6a479523a9255357d5f4cede212ff9c6a2
Reviewed-on: https://gerrit.libreoffice.org/30404
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/sd/qa/unit/data/pptx/tdf103477.pptx 
b/sd/qa/unit/data/pptx/tdf103477.pptx
new file mode 100644
index 000..0ee9646
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf103477.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 22bb3b7..fd58d72 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -131,6 +131,7 @@ public:
 void testTdf103876();
 void testTdf104015();
 void testTdf104201();
+void testTdf103477();
 
 CPPUNIT_TEST_SUITE(SdImportTest);
 
@@ -187,6 +188,7 @@ public:
 CPPUNIT_TEST(testTdf103876);
 CPPUNIT_TEST(testTdf104015);
 CPPUNIT_TEST(testTdf104201);
+CPPUNIT_TEST(testTdf103477);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -1617,6 +1619,21 @@ void SdImportTest::testTdf104201()
 pObj->GetMergedItem(XATTR_FILLCOLOR));
 CPPUNIT_ASSERT_EQUAL(ColorData(0x00FF00), 
rColorItem.GetColorValue().GetColor());
 }
+}
+
+void SdImportTest::testTdf103477()
+{
+sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf103477.pptx"), 
PPTX);
+
+const SdrPage *pPage = GetPage( 1, xDocShRef );
+
+SdrTextObj *pTxtObj = dynamic_cast( pPage->GetObj(6) );
+CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr );
+
+const EditTextObject& aEdit = 
pTxtObj->GetOutlinerParaObject()->GetTextObject();
+const SvxNumBulletItem *pNumFmt = dynamic_cast( 
aEdit.GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET) );
+CPPUNIT_ASSERT(pNumFmt);
+CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's color is wrong!", 
sal_uInt32(0x00), 
pNumFmt->GetNumRule()->GetLevel(1).GetBulletColor().GetColor());
 
 xDocShRef->DoClose();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: extras/Package_palettes.mk extras/source

2016-12-01 Thread V Stuart Foote
 extras/Package_palettes.mk  |2 
 extras/source/palettes/tonal.soc|  123 
 extras/source/palettes/tonal_column.soc |  123 
 3 files changed, 124 insertions(+), 124 deletions(-)

New commits:
commit 98419425080f58880f2d0d85749a4a55e8abb40b
Author: V Stuart Foote 
Date:   Fri Nov 25 15:16:31 2016 -0600

tdf#80196 - another attempt at renaming to tonal.soc and adjusting names

now for 5.4.0 master and dropping abreviations

Change-Id: I72dbbab2688709e8266be93b40040c4c6c970d55
Reviewed-on: https://gerrit.libreoffice.org/31217
Reviewed-by: Heiko Tietze 
Reviewed-by: jan iversen 
Tested-by: jan iversen 

diff --git a/extras/Package_palettes.mk b/extras/Package_palettes.mk
index ed1f820..71600e2 100644
--- a/extras/Package_palettes.mk
+++ b/extras/Package_palettes.mk
@@ -29,7 +29,7 @@ $(eval $(call 
gb_Package_add_files,extras_palettes,$(LIBO_SHARE_FOLDER)/palette,
standard.sop \
styles.sod \
tango.soc \
-   tonal_column.soc \
+   tonal.soc \
web.soc \
 ))
 
diff --git a/extras/source/palettes/tonal_column.soc 
b/extras/source/palettes/tonal.soc
similarity index 68%
rename from extras/source/palettes/tonal_column.soc
rename to extras/source/palettes/tonal.soc
index 1740160..ad4872c 100644
--- a/extras/source/palettes/tonal_column.soc
+++ b/extras/source/palettes/tonal.soc
@@ -13,49 +13,49 @@
 
 
 
-
-
-
+
+
+
 
-
-
-
-
-
-
-
+
+
+
+
+
+
+
 
-
-
-
+
+
+
 
-
-
-
+
+
+
 
-
-
-
+
+
+
 
 
-
+
 
 
 
-
+
 
 
 
-
+
 
 
 
 
 
 
-
+
 
-
+
 
 
 
@@ -65,9 +65,9 @@
 
 
 
-
+
 
-
+
 
 
 
@@ -77,9 +77,9 @@
 
 
 
-
+
 
-
+
 
 
 
@@ -89,9 +89,9 @@
 
 
 
-
+
 
-
+
 
 
 
@@ -101,9 +101,9 @@
 
 
 
-
+
 
-
+
 
 
 
@@ -113,9 +113,9 @@
 
 
 
-
+
 
-
+
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits