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

2018-03-24 Thread Mark Hung
 sw/qa/extras/odfexport/odfexport.cxx |3 +++
 xmloff/source/text/txtprhdl.cxx  |9 +
 xmloff/source/text/txtprmap.cxx  |6 --
 3 files changed, 8 insertions(+), 10 deletions(-)

New commits:
commit 1401f5fbc8427178371b2d6add11510e06e6414f
Author: Mark Hung 
Date:   Fri Mar 9 22:41:34 2018 +0800

xmloff: export ruby-position in a more compatible way.

Export both style:ruby-position and loext:ruby-position.
The later one only allows "above" and "below", obeying
ODF standard while the former one allows "inter-character",
which is added lately. Also use ODFVER_012_EXT_COMPAT
so that loext:ruby-position isn't exported only in
extended mode.

Change-Id: I7b9208f289f8253a835b2f7751549206361274e0
Reviewed-on: https://gerrit.libreoffice.org/51007
Tested-by: Jenkins 
Reviewed-by: Mark Hung 

diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index 9d1c60811f78..7566ec25ad6e 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -1921,7 +1921,10 @@ DECLARE_ODFEXPORT_TEST(testReferenceLanguage, 
"referencelanguage.odt")
 DECLARE_ODFEXPORT_TEST(testRubyPosition, "ruby-position.odt")
 {
 if (xmlDocPtr pXmlDoc = parseExport("content.xml"))
+{
 assertXPath(pXmlDoc, 
"//style:style[@style:family='ruby']/style:ruby-properties[@loext:ruby-position='inter-character']",
 1);
+assertXPath(pXmlDoc, 
"//style:style[@style:family='ruby']/style:ruby-properties[@style:ruby-position='below']",
 1);
+}
 }
 
 DECLARE_ODFEXPORT_TEST(testBulletAsImage, "BulletAsImage.odt")
diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx
index 482dd4f02aee..4ca595d30691 100644
--- a/xmloff/source/text/txtprhdl.cxx
+++ b/xmloff/source/text/txtprhdl.cxx
@@ -209,13 +209,6 @@ static SvXMLEnumMapEntry const 
pXML_RubyPosition_Enum[] =
 { XML_TOKEN_INVALID,0 }
 };
 
-static SvXMLEnumMapEntry const pXML_RubyIsAbove_Enum[] =
-{
-{ XML_ABOVE,RubyPosition::ABOVE},
-{ XML_BELOW,RubyPosition::BELOW},
-{ XML_TOKEN_INVALID,0 }
-};
-
 static SvXMLEnumMapEntry const pXML_FontRelief_Enum[] =
 {
 { XML_NONE, FontRelief::NONE},
@@ -1309,7 +1302,7 @@ static const XMLPropertyHandler *GetPropertyHandler
 pHdl = new XMLConstantsPropertyHandler( pXML_RubyPosition_Enum, 
XML_TOKEN_INVALID );
 break;
 case XML_TYPE_TEXT_RUBY_IS_ABOVE:
-pHdl = new XMLConstantsPropertyHandler( pXML_RubyIsAbove_Enum, 
XML_TOKEN_INVALID );
+pHdl = new XMLNamedBoolPropertyHdl(::xmloff::token::XML_ABOVE, 
::xmloff::token::XML_BELOW);
 break;
 // OD 2004-05-05 #i28701#
 case XML_TYPE_WRAP_INFLUENCE_ON_POSITION:
diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
index ae484f236f5b..99693da63e21 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -65,6 +65,8 @@ using namespace ::xmloff::token;
 // ruby properties
 #define MR_E( a, p, l, t, c ) \
 M_E_( a, p, l, (t|XML_TYPE_PROP_RUBY), c )
+#define MR_EV( a, p, l, t, c, v ) \
+M_EV_( a, p, l, (t|XML_TYPE_PROP_RUBY), c, v )
 
 // cell properties
 #define MC_E( a, p, l, t, c ) \
@@ -964,8 +966,8 @@ XMLPropertyMapEntry const aXMLSectionPropMap[] =
 XMLPropertyMapEntry const aXMLRubyPropMap[] =
 {
 MR_E( "RubyAdjust", STYLE, RUBY_ALIGN, XML_TYPE_TEXT_RUBY_ADJUST, 0 ),
-MR_E( "RubyPosition",STYLE, RUBY_POSITION, 
XML_TYPE_TEXT_RUBY_IS_ABOVE, 0 ),
-MR_E( "RubyPosition",   LO_EXT, RUBY_POSITION, XML_TYPE_TEXT_RUBY_POSITION 
| MID_FLAG_MERGE_PROPERTY, 0 ),
+MR_E( "RubyIsAbove",STYLE, RUBY_POSITION, XML_TYPE_TEXT_RUBY_IS_ABOVE, 
0 ),
+MR_EV( "RubyPosition",   LO_EXT, RUBY_POSITION, 
XML_TYPE_TEXT_RUBY_POSITION, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT),
 M_END()
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Testing UNO API service properties

2018-03-24 Thread Jens Carl

Hello List,

This related to my efforts to convert the Java UNO API tests to C++.

UNO API service passes properties in two ways as beans::XPropertySet or 
Sequence.


beans::XPropertySet is easy to test with the provided methods 
getPropertyValue() and setPropertyValue().


Sequence are little more problematic, because you 
have to iterate over the sequence and depending of .Name execute the 
tests fitting the property type.


Also because it's a Sequence you can change the .Value despite in some 
cases the property is marked read-only. See 
https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/sheet/FunctionDescription.idl.


In general is the intended behaviour, when a UNO API service passes the 
properties as Sequence, that values are read-only?
Regardless that it's possible to change .Value. I so far didn't find 
anything in code that point to something happens when I change a .Value.


Cheers,

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


Re: GSoC'18 Application

2018-03-24 Thread Tomaž Vajngerl

Hi,

On 15. 03. 2018 03:06, Mert Tümer wrote:

Hello,

My name is Mert, I am a university student and i want to be in GSoC'18 
with LibreOffice. I have been working on the Android Viewer for 2 
years and i have submitted bunch of patches since I started working on 
it until today. I mentioned my candidacy before and i was asked to 
submit a c++ code too, which i did. Again today i felt that I need to 
mention it again because students' application period started.

Please consider my application.
Thank you!

Sorry for the late reply.

I looked at your proposal today and it is a little vague. Can you please 
write a plan and a timeline what bugs you want to solve and in what way 
or what you want to work on (could be your own ideas or bugs/features 
you find they are lacking) in the time of GSoC. As you finalized your 
proposal I suggest you write it in a different document and send the 
link here as I think you can't modify that anymore.
PS: link to my contributions: https://gerrit.libreoffice.org/#/q/mert 


Regards,
Mert Tümer

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


CppCheck Report Update

2018-03-24 Thread cppcheck.libreoff...@gmail.com

A new cppcheck report is available at : 
http://dev-builds.libreoffice.org/cppcheck_reports/master/


Note:
The script generating this report was run at :
2018-25-03_03:22:19 with user buildslave at host vm140 as 
/home/buildslave/source/dev-tools/cppcheck/cppcheck-report.sh -s 
/home/buildslave/source/libo-core -c /home/buildslave/source/cppcheck -w 
/home/buildslave/tmp/www

It can be found and improved here:

https://gerrit.libreoffice.org/gitweb?p=dev-tools.git;a=blob;f=cppcheck/cppcheck-report.sh


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


[Libreoffice-commits] core.git: helpcontent2

2018-03-24 Thread Adolfo Jayme Barrientos
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1fbe46cf08f525e78016feef83f4c38b79b337ba
Author: Adolfo Jayme Barrientos 
Date:   Sat Mar 24 16:05:52 2018 -0600

Updated core
Project: help  a86659f64cb346127159064202d9b6d3513ffe3e

tdf#97622 Update help text to match new behavior

Change-Id: I973ef76893f353317d8412fd3c26599b9fdaf9cf

diff --git a/helpcontent2 b/helpcontent2
index 4740109668b5..a86659f64cb3 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 4740109668b5d2bbf67caef82fb38364abbc38bb
+Subproject commit a86659f64cb346127159064202d9b6d3513ffe3e
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2018-03-24 Thread Adolfo Jayme Barrientos
 source/text/shared/01/05020700.xhp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a86659f64cb346127159064202d9b6d3513ffe3e
Author: Adolfo Jayme Barrientos 
Date:   Sat Mar 24 16:05:52 2018 -0600

tdf#97622 Update help text to match new behavior

Change-Id: I973ef76893f353317d8412fd3c26599b9fdaf9cf

diff --git a/source/text/shared/01/05020700.xhp 
b/source/text/shared/01/05020700.xhp
index e97210b9a..704afad4b 100644
--- a/source/text/shared/01/05020700.xhp
+++ b/source/text/shared/01/05020700.xhp
@@ -49,9 +49,9 @@
 Allow hanging punctuation
 Prevents commas and periods from 
breaking the line. Instead, these characters are added to the end of the line, 
even in the page margin.
 
-Apply spacing between Asian, Latin and Complex text
+Apply spacing between Asian and non-Asian text
 
-Inserts a space between Asian, 
Latin and complex characters.
+Inserts a space between 
ideographic and alphabetic text.
 
 Enabling Asian language support
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-24 Thread Khaled Hosny
 cui/uiconfig/ui/asiantypography.ui |2 +-
 sw/source/core/text/itrform2.cxx   |4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 7024f73e088b741a3024f6934d04620d7ed73de4
Author: Khaled Hosny 
Date:   Tue Mar 13 13:08:14 2018 +0200

tdf#97622: Apply Asian spacing only to Asian text

The option “Apply spacing between Asian, Latin and complex text” (which
is on by default) should only apply the extra spacing if one side of the
text is Asian since that is the requirement of CJK typography, but
Writer seems to apply it to any script change (e.g. between CTL and
Western).

This matches the behaviour in edit engine wich was changed back in 2002
in commit e314e1b8aa3f1d98f2b33ce3f546d07eafa0f799.

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

diff --git a/cui/uiconfig/ui/asiantypography.ui 
b/cui/uiconfig/ui/asiantypography.ui
index 55e41bec2eb6..fad6ecf9c977 100644
--- a/cui/uiconfig/ui/asiantypography.ui
+++ b/cui/uiconfig/ui/asiantypography.ui
@@ -54,7 +54,7 @@
 
 
   
-Apply spacing between Asian, Latin 
and complex text
+Apply spacing between Asian and 
non-Asian text
 True
 True
 False
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index fd91902a920c..7fc2ae4005df 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -606,7 +606,9 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf 
)
 // to 20% of the fontheight.
 sal_Int32 nTmp = rInf.GetIdx() + pPor->GetLen();
 if( nTmp == m_pScriptInfo->NextScriptChg( nTmp - 1 ) &&
-nTmp != rInf.GetText().getLength() )
+nTmp != rInf.GetText().getLength() &&
+(m_pScriptInfo->ScriptType(nTmp - 1) == 
css::i18n::ScriptType::ASIAN ||
+ m_pScriptInfo->ScriptType(nTmp) == 
css::i18n::ScriptType::ASIAN) )
 {
 const sal_uInt16 nDist = 
static_cast(rInf.GetFont()->GetHeight()/5);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-24 Thread Andrea Gelmini
 svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx|4 ++--
 svx/source/customshapes/EnhancedCustomShape2d.cxx |2 +-
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx|2 +-
 sw/qa/uitest/writer_tests/insertFootEndnote.py|2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 4e2e1d04d8f9a38d76c259bb21fbf53b1088b813
Author: Andrea Gelmini 
Date:   Sat Mar 24 12:36:28 2018 +0100

Fix typos

Change-Id: I6c515e716b232fecfe1750b806f0a5624f648de5

diff --git a/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx 
b/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx
index e165344b26c1..a9d86cb34481 100644
--- a/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx
@@ -42,10 +42,10 @@ namespace drawinglayer
 
 // OperationSmiley: Added to be able to define a FillGeometry 
different from local
 // geometry. It is ignored when empty and/or equal to 
UnitPolyPolygon.
-// If used and there is a fill, object's geomery 
(maUnitPolyPolygon) will be filled,
+// If used and there is a fill, the object's geometry 
(maUnitPolyPolygon) will be filled,
 // but UnitDefinitionPolyPolygon will be used to define the 
FillStyle. Thus when
 // using the 'same' UnitDefinitionPolyPolygon for multiple 
definitions,
-// all filled stuff using it will fit seamless together.
+// all filled stuff using it will fit seamlessly together.
 // 'same' is in quotes since it is a UnitPolygon, so being 
relative to the
 // unit polygon of the local geometry (UnitPolyPolygon). The 
definition is complete
 // when applying the also given transfomation (maTransform)
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx 
b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 5ed79db32897..2386b5887d8f 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2318,7 +2318,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool 
bLineGeometryNeededOnly )
 
 // OperationSmiley: when we have access to the 
SdrObjCustomShape and the
 // CustomShape is built with more than a single filled 
Geometry, use it
-// to define that all helper geometites defined here 
(SdrObjects currently)
+// to define that all helper geometries defined here 
(SdrObjects currently)
 // will use the same FillGeometryDefinition (from the 
referenced SdrObjCustomShape).
 // This will all same-filled objects look like filled 
smoothly with the same style.
 pObj->setFillGeometryDefiningShape(&mrSdrObjCustomShape);
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 4ed36e31040c..14e03fbced9d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -284,7 +284,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf107035, "tdf107035.docx")
 DECLARE_OOXMLEXPORT_TEST(testTdf112118_DOCX, "tdf112118.docx")
 {
 // The resulting left margin width (2081) differs from its DOC counterpart 
from ww8export2.cxx,
-// because DOCX import does two conversions between mm/100 and twips on 
the route, loosing one
+// because DOCX import does two conversions between mm/100 and twips on 
the route, losing one
 // twip on the road and arriving with a value that is 2 mm/100 less. I 
don't see an obvious way
 // to avoid that.
 struct {
diff --git a/sw/qa/uitest/writer_tests/insertFootEndnote.py 
b/sw/qa/uitest/writer_tests/insertFootEndnote.py
index 690096cd9271..397e98e5ff40 100644
--- a/sw/qa/uitest/writer_tests/insertFootEndnote.py
+++ b/sw/qa/uitest/writer_tests/insertFootEndnote.py
@@ -27,7 +27,7 @@ class insertFootEndnote(UITestCase):
 self.assertEqual(document.Footnotes.getCount(), 1)
 self.xUITest.executeCommand(".uno:Undo")
 self.assertEqual(document.Footnotes.getCount(), 0)
-#Automatic - Endtnote
+#Automatic - Endnote
 
self.ui_test.execute_dialog_through_command(".uno:InsertFootnoteDialog")
 xDialog = self.xUITest.getTopFocusWindow()
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Google Summer of Code '18

2018-03-24 Thread Nick Thanda
Hi,
My name is Nickson Thanda and I'm a final year student at Queen Mary, 
University of London studying Computer Science.

I'm interested in applying for the 100 project cuts projects that . I'm 
currently working on of the issues. (tdf#113925) and I have a submitted a patch 
to gerrit which is waiting to be reviewed ( 
https://gerrit.libreoffice.org/#/c/51470/)

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


[Libreoffice-commits] libcdr.git: 8 commits - src/lib

2018-03-24 Thread David Tardon
 src/lib/CDRContentCollector.cpp  |   13 --
 src/lib/CDRContentCollector.h|3 
 src/lib/CDRDocument.cpp  |   11 +-
 src/lib/CDROutputElementList.cpp |  179 +++
 src/lib/CDROutputElementList.h   |7 -
 src/lib/CDRParser.cpp|4 
 src/lib/CDRParser.h  |7 -
 src/lib/CDRPath.cpp  |  168 +---
 src/lib/CDRPath.h|9 +
 src/lib/libcdr_utils.h   |7 +
 10 files changed, 164 insertions(+), 244 deletions(-)

New commits:
commit 517dbbed46ee34710d0346dbe84c9fbe6a426e7d
Author: David Tardon 
Date:   Sat Mar 24 17:22:15 2018 +0100

drop unused headers

Change-Id: I44a999f25ea14a73737019350d40dd4ebb982854

diff --git a/src/lib/CDRParser.h b/src/lib/CDRParser.h
index 4bb79d6..242736d 100644
--- a/src/lib/CDRParser.h
+++ b/src/lib/CDRParser.h
@@ -10,8 +10,6 @@
 #ifndef __CDRPARSER_H__
 #define __CDRPARSER_H__
 
-#include 
-#include 
 #include 
 #include 
 #include 
commit 7c9f013d8924407c88515533a1a5703282b075dc
Author: David Tardon 
Date:   Sat Mar 24 17:21:45 2018 +0100

use unique_ptr

Change-Id: I8954729882f578f59ec15bef193737736281a940

diff --git a/src/lib/CDRDocument.cpp b/src/lib/CDRDocument.cpp
index 96f652e..73a9527 100644
--- a/src/lib/CDRDocument.cpp
+++ b/src/lib/CDRDocument.cpp
@@ -117,7 +117,7 @@ CDRAPI bool 
libcdr::CDRDocument::parse(librevenge::RVNGInputStream *input_, libr
   input->seek(0, librevenge::RVNG_SEEK_SET);
   CDRParserState ps;
   CDRStylesCollector stylesCollector(ps);
-  CDRParser stylesParser(std::vector(), 
&stylesCollector);
+  CDRParser 
stylesParser(std::vector>(), 
&stylesCollector);
   if (version >= 300)
 retVal = stylesParser.parseRecords(input.get());
   else
@@ -128,7 +128,7 @@ CDRAPI bool 
libcdr::CDRDocument::parse(librevenge::RVNGInputStream *input_, libr
   {
 input->seek(0, librevenge::RVNG_SEEK_SET);
 CDRContentCollector contentCollector(ps, painter);
-CDRParser contentParser(std::vector(), 
&contentCollector);
+CDRParser 
contentParser(std::vector>(), 
&contentCollector);
 if (version >= 300)
   retVal = contentParser.parseRecords(input.get());
 else
@@ -144,7 +144,6 @@ CDRAPI bool 
libcdr::CDRDocument::parse(librevenge::RVNGInputStream *input_, libr
   }
 
   librevenge::RVNGInputStream *tmpInput = input_;
-  std::vector dataStreams;
   try
   {
 std::vector dataFiles;
@@ -179,6 +178,7 @@ CDRAPI bool 
libcdr::CDRDocument::parse(librevenge::RVNGInputStream *input_, libr
 }
   }
 }
+std::vector> dataStreams;
 dataStreams.reserve(dataFiles.size());
 for (const auto &dataFile : dataFiles)
 {
@@ -186,7 +186,8 @@ CDRAPI bool 
libcdr::CDRDocument::parse(librevenge::RVNGInputStream *input_, libr
   streamName += dataFile;
   CDR_DEBUG_MSG(("Extracting stream: %s\n", streamName.c_str()));
   tmpInput->seek(0, librevenge::RVNG_SEEK_SET);
-  dataStreams.push_back(tmpInput->getSubStreamByName(streamName.c_str()));
+  std::unique_ptr 
strm(tmpInput->getSubStreamByName(streamName.c_str()));
+  dataStreams.push_back(std::move(strm));
 }
 if (!input)
   input.reset(tmpInput, CDRDummyDeleter());
@@ -223,8 +224,6 @@ CDRAPI bool 
libcdr::CDRDocument::parse(librevenge::RVNGInputStream *input_, libr
   {
 retVal = false;
   }
-  for (auto &dataStream : dataStreams)
-delete dataStream;
   return retVal;
 }
 
diff --git a/src/lib/CDRParser.cpp b/src/lib/CDRParser.cpp
index 4e7956e..e58fbca 100644
--- a/src/lib/CDRParser.cpp
+++ b/src/lib/CDRParser.cpp
@@ -157,7 +157,7 @@ void normalizeAngle(double &angle)
 
 } // anonymous namespace
 
-libcdr::CDRParser::CDRParser(const std::vector 
&externalStreams, libcdr::CDRCollector *collector)
+libcdr::CDRParser::CDRParser(const 
std::vector> &externalStreams, 
libcdr::CDRCollector *collector)
   : CommonParser(collector), m_externalStreams(externalStreams),
 m_fonts(), m_fillStyles(), m_lineStyles(), m_arrows(), m_version(0), 
m_waldoOutlId(0), m_waldoFillId(0) {}
 
@@ -2427,7 +2427,7 @@ bool 
libcdr::CDRParser::_redirectX6Chunk(librevenge::RVNGInputStream **input, un
 if (streamNumber < m_externalStreams.size())
 {
   unsigned streamOffset = readU32(*input);
-  *input = m_externalStreams[streamNumber];
+  *input = m_externalStreams[streamNumber].get();
   if (*input)
   {
 (*input)->seek(streamOffset, librevenge::RVNG_SEEK_SET);
diff --git a/src/lib/CDRParser.h b/src/lib/CDRParser.h
index 8ce7887..4bb79d6 100644
--- a/src/lib/CDRParser.h
+++ b/src/lib/CDRParser.h
@@ -12,6 +12,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -27,7 +28,7 @@ class CDRCollector;
 class CDRParser : protected CommonParser
 {
 public:
-  explicit CDRParser(const std::vector 
&externalStreams, CDRCollector *collector);
+  explicit CDRParser(const 
std::vector> 

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

2018-03-24 Thread Caolán McNamara
 include/vcl/weld.hxx  |   10 ++
 vcl/source/app/salvtables.cxx |   32 
 vcl/unx/gtk3/gtk3gtkinst.cxx  |   34 ++
 3 files changed, 76 insertions(+)

New commits:
commit a541c989f07fd7cf908915a9f005d32aca6cd953
Author: Caolán McNamara 
Date:   Fri Mar 23 09:41:42 2018 +

hook up focus events

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

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 0cdf21d06ed4..d6234273b703 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -24,6 +24,13 @@ class DialogController;
 
 class VCL_DLLPUBLIC Widget
 {
+protected:
+Link m_aFocusInHdl;
+Link m_aFocusOutHdl;
+
+void signal_focus_in() { return m_aFocusInHdl.Call(*this); }
+void signal_focus_out() { return m_aFocusOutHdl.Call(*this); }
+
 public:
 virtual void set_sensitive(bool sensitive) = 0;
 virtual bool get_sensitive() const = 0;
@@ -59,6 +66,9 @@ public:
 
 virtual void set_accessible_name(const OUString& rName) = 0;
 
+virtual void connect_focus_in(const Link& rLink) = 0;
+virtual void connect_focus_out(const Link& rLink) = 0;
+
 virtual Container* weld_parent() const = 0;
 
 virtual ~Widget() {}
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 47e0037c81c9..9cfe42eb9376 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -179,6 +179,10 @@ class SalInstanceWidget : public virtual weld::Widget
 {
 private:
 VclPtr m_xWidget;
+
+DECL_LINK(FocusInHdl, Control&, void);
+DECL_LINK(FocusOutHdl, Control&, void);
+
 bool m_bTakeOwnership;
 
 public:
@@ -305,10 +309,28 @@ public:
 m_xWidget->SetAccessibleName(rName);
 }
 
+virtual void connect_focus_in(const Link& rLink) override
+{
+assert(!m_aFocusInHdl.IsSet());
+dynamic_cast(*m_xWidget).SetGetFocusHdl(LINK(this, 
SalInstanceWidget, FocusInHdl));
+m_aFocusInHdl = rLink;
+}
+
+virtual void connect_focus_out(const Link& rLink) override
+{
+assert(!m_aFocusOutHdl.IsSet());
+dynamic_cast(*m_xWidget).SetLoseFocusHdl(LINK(this, 
SalInstanceWidget, FocusOutHdl));
+m_aFocusOutHdl = rLink;
+}
+
 virtual weld::Container* weld_parent() const override;
 
 virtual ~SalInstanceWidget() override
 {
+if (m_aFocusInHdl.IsSet())
+   
dynamic_cast(*m_xWidget).SetGetFocusHdl(Link());
+if (m_aFocusOutHdl.IsSet())
+
dynamic_cast(*m_xWidget).SetLoseFocusHdl(Link());
 if (m_bTakeOwnership)
 m_xWidget.disposeAndClear();
 }
@@ -324,6 +346,16 @@ public:
 }
 };
 
+IMPL_LINK_NOARG(SalInstanceWidget, FocusInHdl, Control&, void)
+{
+signal_focus_in();
+}
+
+IMPL_LINK_NOARG(SalInstanceWidget, FocusOutHdl, Control&, void)
+{
+signal_focus_out();
+}
+
 class SalInstanceContainer : public SalInstanceWidget, public virtual 
weld::Container
 {
 private:
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 6d1c3eebb7e9..947d1cc2f1da 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1178,11 +1178,27 @@ protected:
 GtkWidget* m_pWidget;
 private:
 bool m_bTakeOwnership;
+gulong m_nFocusInSignalId;
+gulong m_nFocusOutSignalId;
+
+static void signalFocusIn(GtkWidget*, GdkEvent*, gpointer widget)
+{
+GtkInstanceWidget* pThis = static_cast(widget);
+pThis->signal_focus_in();
+}
+
+static void signalFocusOut(GtkWidget*, GdkEvent*, gpointer widget)
+{
+GtkInstanceWidget* pThis = static_cast(widget);
+pThis->signal_focus_out();
+}
 
 public:
 GtkInstanceWidget(GtkWidget* pWidget, bool bTakeOwnership)
 : m_pWidget(pWidget)
 , m_bTakeOwnership(bTakeOwnership)
+, m_nFocusInSignalId(0)
+, m_nFocusOutSignalId(0)
 {
 }
 
@@ -1348,8 +1364,26 @@ public:
 return GTK_WINDOW(gtk_widget_get_toplevel(m_pWidget));
 }
 
+virtual void connect_focus_in(const Link& rLink) override
+{
+assert(!m_aFocusInHdl.IsSet());
+m_nFocusInSignalId = g_signal_connect(m_pWidget, "focus-in-event", 
G_CALLBACK(signalFocusIn), this);
+m_aFocusInHdl = rLink;
+}
+
+virtual void connect_focus_out(const Link& rLink) override
+{
+assert(!m_aFocusOutHdl.IsSet());
+m_nFocusOutSignalId = g_signal_connect(m_pWidget, "focus-out-event", 
G_CALLBACK(signalFocusOut), this);
+m_aFocusOutHdl = rLink;
+}
+
 virtual ~GtkInstanceWidget() override
 {
+if (m_nFocusInSignalId)
+g_signal_handler_disconnect(m_pWidget, m_nFocusInSignalId);
+if (m_nFocusOutSignalId)
+g_signal_handler_disconnect(m_pWidget, m_nFocusOutSignalId);
   

Re: GSoC project on LibreOffice Online Admin

2018-03-24 Thread Pranav Kant
Hi Kunal,

On 24/03/18 19:56, Kunal Gehlot wrote:
> Hello, 
> I am Kunal Gehlot, from India. I'm a first year Engineering student and am
> relatively new to development and coding. I would like to talk to you about
> developing on Admin console as a GSoC project. 

Your first step should be to build LibreOffice and then its Online component.
And then open a document and being able to see it reflected in the admin
console. There's some information here that might be useful to you, if you
haven't already built and run Online.

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

Please don't hesitate to ask further. You can either hang out on
#libreoffice-dev on freenode or ask questions on our mailing list (CCed). Happy
to help you cross that first hurdle :)

> I could not find much information on the plan but I see there's an abandoned
> history view development and admin console needs to be simplified by merging 
> two
> sets of codes. I am thinking of working in that direction and would like to
> learn more on the topic.

I would suggest you to first start looking at some of the easy hacks (look for
the link above) - after buildling Online successfully - to get your hands dirty
with the relevant code. It's also important for us to be able to consider you
for GSoC.

Resurrecting the history view is one of the tasks in the 'Online Admin' project
and it's one of the least prioritized tasks. We would want to make you work on
new features instead. So, all the points above the history view on the wiki page
you saw are the ones that should be on your radar. Please play a little with the
admin console first to be able to get a more clear idea of what exactly those
tasks are. Happy to answer any specific questions thereafter that comes to your
mind :)

-- 
Regards,
Pranav



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


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

2018-03-24 Thread dennisroczek
 swext/mediawiki/help/wikiformats.xhp |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit fe1c13d4ba288e45acdba5bc01b0ef81da08f125
Author: dennisroczek 
Date:   Sat Mar 24 13:29:19 2018 +0100

remove notice about cite.php

The extension Cite is distributed with MediaWiki 1.21 (released May 2013) 
and is integrated in core since MediaWiki 1.25. No need to keep that notice any 
longer.

Change-Id: I8a91fbb45bc6f410b551c206177d63c584349c37
Reviewed-on: https://gerrit.libreoffice.org/51795
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/swext/mediawiki/help/wikiformats.xhp 
b/swext/mediawiki/help/wikiformats.xhp
index 6026c0d46d84..6e463778fb94 100644
--- a/swext/mediawiki/help/wikiformats.xhp
+++ b/swext/mediawiki/help/wikiformats.xhp
@@ -27,7 +27,7 @@
 
 
 
- 
+
 MediaWiki Formats
 The following 
list gives an overview of the text formats that the Wiki Publisher can upload 
to the wiki server.
 The 
OpenDocument format used by Writer and the MediaWiki format are quite 
different. Only a subset of all features can be transformed from one format to 
the other.
@@ -44,8 +44,6 @@
 A paragraph 
style with a fixed-width font is transformed as pre-formatted text. 
Pre-formatted text is shown on the wiki with a border around the 
text.
 Character styles
 Character 
styles modify the appearance of parts of a paragraph. The transformation 
supports bold, italics, bold/italics, subscript and superscript. All 
fixed-width fonts are transformed into the wiki typewriter style.
-Footnotes
-Note: The 
transformation uses the new style of footnotes with  and 
 tags that requires the Cite.php extension to be installed 
into MediaWiki. If those tags are shown as plain text in the transformation 
result, ask the wiki administrator to install this extension.
 Images
 Images cannot 
be exported by a transformation producing a single file of wiki text. However, 
if the image is already uploaded to the target wiki domain (e. g., Wikimedia 
Commons), then the transformation produces a valid image tag that includes the 
image. Image captions are also supported.
 Tables
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-24 Thread Stephan Bergmann
 ucb/source/ucp/file/filglob.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 9906c6d2a55b6f8a27903f0ef08aa8949d7a71c2
Author: Stephan Bergmann 
Date:   Fri Mar 23 18:11:11 2018 +0100

rhbz#1559633: Treat EPERM same as EACCES when opening files

For example, Linux open(2) with O_RDWR fails with EPERM if the file is 
flagged
as FS_IMMUTABLE_FL.  (And there is an #ifdef IOS "Horrible hack" block in
openFilePath in sal/osl/unx/file.cxx that is apparently a workaround for a
similar scenario where open returns EPERM instead of EACCES on iOS, and 
which
can probably be removed again after this commit.)

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

diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx
index fce29672b555..56b581e5477f 100644
--- a/ucb/source/ucp/file/filglob.cxx
+++ b/ucb/source/ucp/file/filglob.cxx
@@ -310,6 +310,7 @@ namespace fileaccess {
 case FileBase::E_ROFS:
 // #i4735# handle ROFS transparently as ACCESS_DENIED
 case FileBase::E_ACCES:
+case FileBase::E_PERM:
 // permission denied
 ioErrorCode = IOErrorCode_ACCESS_DENIED;
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits