[Libreoffice-commits] core.git: 6 commits - vcl/Library_vclplug_qt5.mk vcl/qt5

2018-01-07 Thread Noel Grandin
 vcl/Library_vclplug_qt5.mk   |2 -
 vcl/qt5/Qt5Bitmap.cxx|   16 ++--
 vcl/qt5/Qt5Bitmap.hxx|2 -
 vcl/qt5/Qt5Data.cxx  |   13 ++---
 vcl/qt5/Qt5Data.hxx  |3 +-
 vcl/qt5/Qt5Frame.cxx |   44 -
 vcl/qt5/Qt5Graphics.cxx  |   28 +
 vcl/qt5/Qt5Graphics.hxx  |2 -
 vcl/qt5/Qt5Graphics_Controls.cxx |   28 +++--
 vcl/qt5/Qt5Graphics_GDI.cxx  |   51 ++-
 vcl/qt5/Qt5Graphics_Text.cxx |   24 +-
 vcl/qt5/Qt5Instance.cxx  |2 -
 vcl/qt5/Qt5Object.cxx|4 +--
 13 files changed, 110 insertions(+), 109 deletions(-)

New commits:
commit 6c9adeed6186e7a65facffc6cb93277686f1b6e4
Author: Noel Grandin 
Date:   Mon Jan 8 09:44:05 2018 +0200

set_warnings_not_errors not necessary in qt5 plugin anymore

Change-Id: I8ed8c07ce5b34d6a03a2ec9a5f9782cd506529e5

diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk
index fba78d738883..68758028d662 100644
--- a/vcl/Library_vclplug_qt5.mk
+++ b/vcl/Library_vclplug_qt5.mk
@@ -19,8 +19,6 @@
 
 $(eval $(call gb_Library_Library,vclplug_qt5))
 
-$(eval $(call gb_Library_set_warnings_not_errors,vclplug_qt5))
-
 $(eval $(call gb_Library_use_custom_headers,vclplug_qt5,vcl/qt5))
 
 $(eval $(call gb_Library_set_include,vclplug_qt5,\
commit 93dae42fd4e5c7425cd0dfa945acd2fa0512d27f
Author: Noel Grandin 
Date:   Mon Jan 8 09:43:42 2018 +0200

loplugin:useuniqueptr in qt5

Change-Id: Ic7135e6ca3be7848fa39cd442d6dd716ea090713

diff --git a/vcl/qt5/Qt5Data.cxx b/vcl/qt5/Qt5Data.cxx
index 7d529964eed9..5c5a341df208 100644
--- a/vcl/qt5/Qt5Data.cxx
+++ b/vcl/qt5/Qt5Data.cxx
@@ -27,20 +27,13 @@
 Qt5Data::Qt5Data(SalInstance* pInstance)
 : GenericUnixSalData(SAL_DATA_QT5, pInstance)
 {
-for (QCursor*& rpCsr : m_aCursors)
-rpCsr = nullptr;
-
 ImplSVData* pSVData = ImplGetSVData();
 
 // draw toolbars on separate lines
 pSVData->maNWFData.mbDockingAreaSeparateTB = true;
 }
 
-Qt5Data::~Qt5Data()
-{
-for (QCursor*& rpCsr : m_aCursors)
-delete rpCsr;
-}
+Qt5Data::~Qt5Data() {}
 
 static QCursor* getQCursorFromXBM(const unsigned char* pBitmap, const unsigned 
char* pMask,
   int nWidth, int nHeight, int nXHot, int 
nYHot)
@@ -184,7 +177,7 @@ QCursor& Qt5Data::getCursor(PointerStyle ePointerStyle)
 SAL_WARN("vcl.qt5", "pointer " << static_cast(ePointerStyle) 
<< "not implemented");
 }
 
-m_aCursors[ePointerStyle] = pCursor;
+m_aCursors[ePointerStyle].reset(pCursor);
 }
 
 return *m_aCursors[ePointerStyle];
diff --git a/vcl/qt5/Qt5Data.hxx b/vcl/qt5/Qt5Data.hxx
index a63d243b6967..f8cf4fb05e6a 100644
--- a/vcl/qt5/Qt5Data.hxx
+++ b/vcl/qt5/Qt5Data.hxx
@@ -23,12 +23,13 @@
 
 #include 
 #include 
+#include 
 
 class QCursor;
 
 class Qt5Data : public GenericUnixSalData
 {
-o3tl::enumarray m_aCursors;
+o3tl::enumarray> m_aCursors;
 
 public:
 explicit Qt5Data(SalInstance* pInstance);
diff --git a/vcl/qt5/Qt5Graphics.cxx b/vcl/qt5/Qt5Graphics.cxx
index 411dfd7543b8..23249c5799c6 100644
--- a/vcl/qt5/Qt5Graphics.cxx
+++ b/vcl/qt5/Qt5Graphics.cxx
@@ -44,12 +44,7 @@ Qt5Graphics::Qt5Graphics( Qt5Frame *pFrame, QImage *pQImage )
 ResetClipRegion();
 }
 
-Qt5Graphics::~Qt5Graphics()
-{
-// release the text styles
-for (int i = 0; i < MAX_FALLBACK; ++i)
-delete m_pTextStyle[i];
-}
+Qt5Graphics::~Qt5Graphics() {}
 
 void Qt5Graphics::ChangeQImage(QImage* pQImage)
 {
diff --git a/vcl/qt5/Qt5Graphics.hxx b/vcl/qt5/Qt5Graphics.hxx
index 6e8332356d49..a9a71c64b5e2 100644
--- a/vcl/qt5/Qt5Graphics.hxx
+++ b/vcl/qt5/Qt5Graphics.hxx
@@ -49,7 +49,7 @@ class Qt5Graphics : public SalGraphics
 
 PhysicalFontCollection* m_pFontCollection;
 const Qt5FontFace* m_pFontData[MAX_FALLBACK];
-Qt5Font* m_pTextStyle[MAX_FALLBACK];
+std::unique_ptr m_pTextStyle[MAX_FALLBACK];
 SalColor m_aTextColor;
 
 Qt5Graphics(Qt5Frame* pFrame, QImage* pQImage);
diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx
index ec07d50e4af6..8d25e97df786 100644
--- a/vcl/qt5/Qt5Graphics_Text.cxx
+++ b/vcl/qt5/Qt5Graphics_Text.cxx
@@ -39,8 +39,7 @@ void Qt5Graphics::SetFont(const FontSelectPattern* pReqFont, 
int nFallbackLevel)
 {
 if (!m_pTextStyle[i])
 break;
-delete m_pTextStyle[i];
-m_pTextStyle[i] = nullptr;
+m_pTextStyle[i].reset();
 }
 
 if (!pReqFont)
@@ -49,7 +48,7 @@ void Qt5Graphics::SetFont(const FontSelectPattern* pReqFont, 
int nFallbackLevel)
 else
 {
 m_pFontData[nFallbackLevel] = static_cast(pReqFont->mpFontData);
-m_pTextStyle[nFallbackLevel] = new Qt5Font(*pReqFont);
+m_pTextStyle[nFallbackLevel].reset(new Qt5Font(*pReqFont));
 }
 }
 
commit 4f3c5db4dfacfad32ef207193a21c96e1d39da

Possui Nível Superior? "Habilitar-se" em uma das 16 Licenciaturas em 12 meses com 50% de desconto! Solicite já seu cupom.

2018-01-07 Thread Instituto Faseb

Seu cliente de e-mail não pode ler este e-mail.
Para visualizá-lo on-line, por favor, clique aqui:
http://painel.educasebnews.com/fase/display.php?M=265696&C=c113bc4a4a724751d92172fb8ebe9c10&S=16&L=7&N=13


Para parar de receber nossos
Emails:http://painel.educasebnews.com/fase/unsubscribe.php?M=265696&C=c113bc4a4a724751d92172fb8ebe9c10&L=7&N=16
\Nkt-Marketer
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-01-07 Thread Mike Kaganski
 sw/qa/extras/ooxmlexport/data/tdf114882.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx   |5 +++
 sw/source/filter/ww8/docxattributeoutput.cxx |   40 ++-
 sw/source/filter/ww8/docxattributeoutput.hxx |   26 ++---
 sw/source/filter/ww8/docxexport.cxx  |   30 
 5 files changed, 49 insertions(+), 52 deletions(-)

New commits:
commit 4f65853df16a599fe81576bbccbca6ea78488d54
Author: Mike Kaganski 
Date:   Sun Jan 7 23:53:02 2018 +0300

tdf#114882: don't try to close SDT when processing inner objects

Change-Id: Ib7e59e1a6c82d2d35a8466312a2571f76f2338b7
Reviewed-on: https://gerrit.libreoffice.org/47546
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf114882.docx 
b/sw/qa/extras/ooxmlexport/data/tdf114882.docx
new file mode 100644
index ..8663f6b15557
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf114882.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 00c362340ce5..46e31f89b6c8 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -197,6 +197,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf113399, "tdf113399.doc")
 CPPUNIT_ASSERT_EQUAL(static_cast(0), nPaddingValue);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf114882, "tdf114882.docx")
+{
+// fastserializer must not fail assertion because of mismatching elements
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 3f6b78ef6932..fbcc5e634f2d 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -494,10 +494,10 @@ void DocxAttributeOutput::EndParagraph( 
ww8::WW8TableNodeInfoInner::Pointer_t pT
otherwise the StartParagraph function will use the 
previous existing
table reference attributes since the variable is being 
shared.
 */
-DocxTableExportContext aDMLTableExportContext;
-pushToTableExportContext(aDMLTableExportContext);
-m_rExport.SdrExporter().writeDMLTextFrame(&aFrame, 
m_anchorId++);
-popFromTableExportContext(aDMLTableExportContext);
+{
+DocxTableExportContext aDMLTableExportContext(*this);
+m_rExport.SdrExporter().writeDMLTextFrame(&aFrame, 
m_anchorId++);
+}
 m_pSerializer->endElementNS(XML_mc, XML_Choice);
 SetAlternateContentChoiceOpen( false );
 
@@ -508,10 +508,10 @@ void DocxAttributeOutput::EndParagraph( 
ww8::WW8TableNodeInfoInner::Pointer_t pT
 //reset the tableReference.
 
 m_pSerializer->startElementNS(XML_mc, XML_Fallback, FSEND);
-DocxTableExportContext aVMLTableExportContext;
-pushToTableExportContext(aVMLTableExportContext);
-m_rExport.SdrExporter().writeVMLTextFrame(&aFrame);
-popFromTableExportContext(aVMLTableExportContext);
+{
+DocxTableExportContext aVMLTableExportContext(*this);
+m_rExport.SdrExporter().writeVMLTextFrame(&aFrame);
+}
 m_rExport.m_pTableInfo = pOldTableInfo;
 
 m_pSerializer->endElementNS(XML_mc, XML_Fallback);
@@ -579,12 +579,10 @@ void DocxAttributeOutput::EndParagraph( 
ww8::WW8TableNodeInfoInner::Pointer_t pT
 {
 for ( const auto & pFrame : aFramePrTextbox )
 {
-DocxTableExportContext aTableExportContext;
-pushToTableExportContext(aTableExportContext);
+DocxTableExportContext aTableExportContext(*this);
 m_pCurrentFrame = pFrame.get();
 m_rExport.SdrExporter().writeOnlyTextOfFrame(pFrame.get());
 m_pCurrentFrame = nullptr;
-popFromTableExportContext(aTableExportContext);
 }
 aFramePrTextbox.clear();
 }
@@ -5310,7 +5308,6 @@ void DocxAttributeOutput::WritePostponedCustomShape()
 if (!m_pPostponedCustomShape)
 return;
 
-bool bStartedParaSdt = m_bStartedParaSdt;
 for( const auto & rPostponedDrawing : *m_pPostponedCustomShape)
 {
 if ( IsAlternateContentChoiceOpen() )
@@ -5318,7 +5315,6 @@ void DocxAttributeOutput::WritePostponedCustomShape()
 else
 
m_rExport.SdrExporter().writeDMLAndVMLDrawing(rPostponedDrawing.object, 
*rPostponedDrawing.frame, m_anchorId++);
 }
-m_bStartedParaSdt = bStartedParaSdt;
 m_pPostponedCustomShape.reset(nullptr);
 }
 
@@ -5331,7 +5327,6 @@ void DocxAttributeOutput::WritePostponedDMLDrawing()
 std::unique_ptr< std::vector > 
pPostponedDMLDrawings(m_pPostponedDMLDrawings.release());

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

2018-01-07 Thread Ashod Nakashian
 kit/ForKit.cpp  |   16 ++--
 wsd/LOOLWSD.cpp |   19 ---
 wsd/LOOLWSD.hpp |1 +
 3 files changed, 31 insertions(+), 5 deletions(-)

New commits:
commit 94781ec6d989b7f96ac606faeee0fd7fa6fa3bea
Author: Ashod Nakashian 
Date:   Sun Jan 7 22:34:28 2018 -0500

wsd: log at trace level until first child is forked

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

diff --git a/kit/ForKit.cpp b/kit/ForKit.cpp
index e399c116..48e4ebb5 100644
--- a/kit/ForKit.cpp
+++ b/kit/ForKit.cpp
@@ -52,6 +52,7 @@ static bool NoCapsForKit = false;
 #endif
 static bool DisplayVersion = false;
 static std::string UnitTestLibrary;
+static std::string LogLevel;
 static std::atomic ForkCounter(0);
 
 static std::map childJails;
@@ -245,6 +246,12 @@ static int createLibreOfficeKit(const std::string& 
childRoot,
 
 LOG_DBG("Forking a loolkit process with jailId: " << jailId << ".");
 
+if (LogLevel != "trace")
+{
+LOG_INF("Setting log-level to [" << LogLevel << "].");
+Log::logger().setLevel(LogLevel);
+}
+
 const Process::PID pid = fork();
 if (!pid)
 {
@@ -376,7 +383,12 @@ int main(int argc, char** argv)
 logProperties["path"] = std::string(logFilename);
 }
 
-Log::initialize("frk", logLevel ? logLevel : "", logColor != nullptr, 
logToFile, logProperties);
+Log::initialize("frk", "trace", logColor != nullptr, logToFile, 
logProperties);
+LogLevel = logLevel ? logLevel : "trace";
+if (LogLevel != "trace")
+{
+LOG_INF("Setting log-level to [trace] and delaying setting to 
requested [" << LogLevel << "].");
+}
 
 std::string childRoot;
 std::string loSubPath;
@@ -478,7 +490,7 @@ int main(int argc, char** argv)
 }
 
 // Setup & check environment
-std::string layers(
+const std::string layers(
 "xcsxcu:${BRAND_BASE_DIR}/share/registry "
 "res:${BRAND_BASE_DIR}/share/registry "
 
"bundledext:${${BRAND_BASE_DIR}/program/lounorc:BUNDLED_EXTENSIONS_USER}/registry/com.sun.star.comp.deployment.configuration.PackageRegistryBackend/configmgr.ini
 "
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 99174cca..b3336f01 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -562,6 +562,7 @@ std::string LOOLWSD::FileServerRoot;
 std::string LOOLWSD::LOKitVersion;
 std::string LOOLWSD::ConfigFile = LOOLWSD_CONFIGDIR "/loolwsd.xml";
 std::string LOOLWSD::ConfigDir = LOOLWSD_CONFIGDIR "/conf.d";
+std::string LOOLWSD::LogLevel = "trace";
 Util::RuntimeConstant LOOLWSD::SSLEnabled;
 Util::RuntimeConstant LOOLWSD::SSLTermination;
 std::set LOOLWSD::EditFileExtensions;
@@ -716,8 +717,9 @@ void LOOLWSD::initialize(Application& self)
 // Allow UT to manipulate before using configuration values.
 UnitWSD::get().configure(config());
 
-const auto logLevel = getConfigValue(conf, "logging.level", 
"trace");
-setenv("LOOL_LOGLEVEL", logLevel.c_str(), true);
+// Set the log-level after complete initialization to force maximum 
details at startup.
+LogLevel = getConfigValue(conf, "logging.level", "trace");
+setenv("LOOL_LOGLEVEL", LogLevel.c_str(), true);
 const auto withColor = getConfigValue(conf, "logging.color", true) 
&& isatty(fileno(stderr));
 if (withColor)
 {
@@ -755,7 +757,12 @@ void LOOLWSD::initialize(Application& self)
 }
 }
 
-Log::initialize("wsd", logLevel, withColor, logToFile, logProperties);
+// Log at trace level until we complete the initialization.
+Log::initialize("wsd", "trace", withColor, logToFile, logProperties);
+if (LogLevel != "trace")
+{
+LOG_INF("Setting log-level to [trace] and delaying setting to 
requested [" << LogLevel << "].");
+}
 
 #if ENABLE_SSL
 LOOLWSD::SSLEnabled.set(getConfigValue(conf, "ssl.enable", true));
@@ -2713,6 +2720,12 @@ int LOOLWSD::innerMain()
 }
 #endif
 
+if (LogLevel != "trace")
+{
+LOG_INF("Setting log-level to [" << LogLevel << "].");
+Log::logger().setLevel(LogLevel);
+}
+
 // Start the server.
 srv.start(ClientPortNumber);
 
diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp
index 40a32b73..9e388a6c 100644
--- a/wsd/LOOLWSD.hpp
+++ b/wsd/LOOLWSD.hpp
@@ -55,6 +55,7 @@ public:
 static std::string ServerName;
 static std::string FileServerRoot;
 static std::string LOKitVersion;
+static std::string LogLevel;
 static std::atomic NumConnections;
 static bool TileCachePersistent;
 static std::unique_ptr TraceDumper;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Markus Mohrhard
 uitest/demo_ui/edit.py   |4 ++--
 uitest/uitest/uihelper/common.py |3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit dbf83d315acc454b576355f2e5bd8412586827ac
Author: Markus Mohrhard 
Date:   Sun Jan 7 20:07:42 2018 +0100

uitest: add a shared helper method for selecting text

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

diff --git a/uitest/demo_ui/edit.py b/uitest/demo_ui/edit.py
index 6da14333a4d5..48ada3b1d15e 100644
--- a/uitest/demo_ui/edit.py
+++ b/uitest/demo_ui/edit.py
@@ -8,7 +8,7 @@
 from libreoffice.uno.propertyvalue import mkPropertyValues
 
 from uitest.framework import UITestCase
-from uitest.uihelper.common import type_text, get_state_as_dict
+from uitest.uihelper.common import type_text, get_state_as_dict, select_text
 
 import time
 
@@ -44,7 +44,7 @@ class EditTest(UITestCase):
 type_text(xEdit, "otherChars")
 self.assertEqual("siotherCharsgeName", 
get_state_as_dict(xEdit)["Text"])
 
-xEdit.executeAction("SELECT", mkPropertyValues({"FROM": "2", "TO": 
"12"}))
+select_text(xEdit, from_pos="2", to="12")
 self.assertEqual("otherChars", 
get_state_as_dict(xEdit)["SelectedText"])
 
 xAddBtn = xAddNameDlg.getChild("cancel")
diff --git a/uitest/uitest/uihelper/common.py b/uitest/uitest/uihelper/common.py
index a83230b5a723..5056ef764983 100644
--- a/uitest/uitest/uihelper/common.py
+++ b/uitest/uitest/uihelper/common.py
@@ -16,4 +16,7 @@ def type_text(ui_object, text):
 def select_pos(ui_object, pos):
 ui_object.executeAction("SELECT", mkPropertyValues({"POS": pos}))
 
+def select_text(ui_object, from_pos, to):
+ui_object.executeAction("SELECT", mkPropertyValues({"FROM": from_pos, 
"TO": to}))
+
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Markus Mohrhard
 include/oox/export/chartexport.hxx |1 +
 include/oox/export/drawingml.hxx   |3 +++
 oox/source/export/chartexport.cxx  |   22 ++
 oox/source/export/drawingml.cxx|   10 +++---
 4 files changed, 33 insertions(+), 3 deletions(-)

New commits:
commit 38df2698123d52461679b4bedadd693b23cb4794
Author: Markus Mohrhard 
Date:   Thu Dec 28 21:12:18 2017 +0100

support exporting of hatch for chart background, tdf#114180

It seems that the hatch properties can not easily be exported. MSO
just knows some hard-coded patterns.

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

diff --git a/include/oox/export/chartexport.hxx 
b/include/oox/export/chartexport.hxx
index 4ac5ee10bb2b..6d336f9a863b 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -139,6 +139,7 @@ private:
 void exportFill( const css::uno::Reference< css::beans::XPropertySet >& 
xPropSet );
 void exportGradientFill( const css::uno::Reference< 
css::beans::XPropertySet >& xPropSet );
 void exportBitmapFill( const css::uno::Reference< css::beans::XPropertySet 
>& xPropSet );
+void exportHatch(const css::uno::Reference& 
xPropSet);
 void exportDataTable( );
 
 void exportAreaChart( const css::uno::Reference< css::chart2::XChartType 
>& xChartType );
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 14bd8eae4664..c8faa08001fd 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -187,6 +188,8 @@ public:
 void WriteBlipFill( const css::uno::Reference< css::beans::XPropertySet >& 
rXPropSet,
  const OUString& sURLPropName, sal_Int32 nXmlNamespace 
);
 void WritePattFill( const css::uno::Reference< css::beans::XPropertySet >& 
rXPropSet );
+void WritePattFill(const css::uno::Reference& 
rXPropSet,
+const css::drawing::Hatch& rHatch);
 void WriteSrcRect( const css::uno::Reference< css::beans::XPropertySet >&, 
const OUString& );
 void WriteOutline( const css::uno::Reference< css::beans::XPropertySet >& 
rXPropSet );
 void WriteStretch( const css::uno::Reference< css::beans::XPropertySet >& 
rXPropSet, const OUString& rURL );
diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index 83b96fb0f518..23a6b1a95d3a 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1244,11 +1244,33 @@ void ChartExport::exportFill( const Reference< 
XPropertySet >& xPropSet )
 case FillStyle_BITMAP :
 exportBitmapFill( xPropSet );
 break;
+case FillStyle_HATCH:
+exportHatch(xPropSet);
+break;
 default:
 WriteFill( xPropSet );
 }
 }
 
+void ChartExport::exportHatch( const Reference< XPropertySet >& xPropSet )
+{
+if (!xPropSet.is())
+return;
+
+if (GetProperty(xPropSet, "FillHatchName"))
+{
+OUString aHatchName;
+mAny >>= aHatchName;
+uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), 
uno::UNO_QUERY );
+uno::Reference< container::XNameAccess > xHatchTable( 
xFact->createInstance("com.sun.star.drawing.HatchTable"), uno::UNO_QUERY );
+uno::Any rValue = xHatchTable->getByName(aHatchName);
+css::drawing::Hatch aHatch;
+rValue >>= aHatch;
+WritePattFill(xPropSet, aHatch);
+}
+
+}
+
 void ChartExport::exportBitmapFill( const Reference< XPropertySet >& xPropSet )
 {
 if( xPropSet.is() )
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index bb60a5697c57..34dabd7802c9 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1185,11 +1185,16 @@ void DrawingML::WritePattFill( const Reference< 
XPropertySet >& rXPropSet )
 {
 drawing::Hatch aHatch;
 mAny >>= aHatch;
+WritePattFill(rXPropSet, aHatch);
+}
+}
 
-mpFS->startElementNS( XML_a , XML_pattFill, XML_prst, 
GetHatchPattern(aHatch), FSEND );
+void DrawingML::WritePattFill(const Reference& rXPropSet, const 
css::drawing::Hatch& rHatch)
+{
+mpFS->startElementNS( XML_a , XML_pattFill, XML_prst, 
GetHatchPattern(rHatch), FSEND );
 
 mpFS->startElementNS( XML_a , XML_fgClr, FSEND );
-WriteColor(aHatch.Color);
+WriteColor(rHatch.Color);
 mpFS->endElementNS( XML_a , XML_fgClr );
 
 sal_uInt32 nColor = COL_WHITE;
@@ -1215,7 +1220,6 @@ void DrawingML::WritePattFill( const Reference< 
XPropertySet >& rXPropSet )
 mpFS->endElementNS( XML_a , XML_bgClr );
 
 mpFS->endElementNS( XML_a , XML_pattFill );
-}
 }
 
 void DrawingML::WriteSrcRect( const Reference< XPropertySet >& rXProp

[Libreoffice-commits] core.git: icon-themes/sifr icon-themes/sifr_dark icon-themes/sifr_svg

2018-01-07 Thread Matthias Freund
 icon-themes/sifr/cmd/32/entirecell.png  |binary
 icon-themes/sifr/cmd/lc_entirecell.png  |binary
 icon-themes/sifr/cmd/sc_entirecell.png  |binary
 icon-themes/sifr_dark/cmd/32/entirecell.png |binary
 icon-themes/sifr_dark/cmd/lc_entirecell.png |binary
 icon-themes/sifr_dark/cmd/sc_entirecell.png |binary
 icon-themes/sifr_svg/cmd/32/entirecell.svg  |   33 +++-
 icon-themes/sifr_svg/cmd/lc_entirecell.svg  |6 +
 icon-themes/sifr_svg/cmd/sc_entirecell.svg  |6 +
 9 files changed, 16 insertions(+), 29 deletions(-)

New commits:
commit d436c4eaeb86a485bcc0206a15f9166063f5fe3e
Author: Matthias Freund 
Date:   Sun Jan 7 21:16:13 2018 +0100

tdf#75256 Sifr new entirecell icons

Change-Id: If1270a7f2910178d2755e462ad28d000e6bf549a
Reviewed-on: https://gerrit.libreoffice.org/47551
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/icon-themes/sifr/cmd/32/entirecell.png 
b/icon-themes/sifr/cmd/32/entirecell.png
new file mode 100644
index ..339a1cc895b2
Binary files /dev/null and b/icon-themes/sifr/cmd/32/entirecell.png differ
diff --git a/icon-themes/sifr/cmd/lc_entirecell.png 
b/icon-themes/sifr/cmd/lc_entirecell.png
new file mode 100644
index ..7c1655e08118
Binary files /dev/null and b/icon-themes/sifr/cmd/lc_entirecell.png differ
diff --git a/icon-themes/sifr/cmd/sc_entirecell.png 
b/icon-themes/sifr/cmd/sc_entirecell.png
new file mode 100644
index ..fdd14baae4f0
Binary files /dev/null and b/icon-themes/sifr/cmd/sc_entirecell.png differ
diff --git a/icon-themes/sifr_dark/cmd/32/entirecell.png 
b/icon-themes/sifr_dark/cmd/32/entirecell.png
new file mode 100644
index ..9b0e6a3cb558
Binary files /dev/null and b/icon-themes/sifr_dark/cmd/32/entirecell.png differ
diff --git a/icon-themes/sifr_dark/cmd/lc_entirecell.png 
b/icon-themes/sifr_dark/cmd/lc_entirecell.png
new file mode 100644
index ..560c55ee6683
Binary files /dev/null and b/icon-themes/sifr_dark/cmd/lc_entirecell.png differ
diff --git a/icon-themes/sifr_dark/cmd/sc_entirecell.png 
b/icon-themes/sifr_dark/cmd/sc_entirecell.png
new file mode 100644
index ..c6cf5ff929cc
Binary files /dev/null and b/icon-themes/sifr_dark/cmd/sc_entirecell.png differ
diff --git a/icon-themes/sifr_svg/cmd/32/entirecell.svg 
b/icon-themes/sifr_svg/cmd/32/entirecell.svg
index 4529e747a44e..10d49172c3af 100644
--- a/icon-themes/sifr_svg/cmd/32/entirecell.svg
+++ b/icon-themes/sifr_svg/cmd/32/entirecell.svg
@@ -1,31 +1,6 @@
 http://www.w3.org/2000/svg";>
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
-  
-  
-  
-  
-  
- 
- 
- 
- 
- 
- 
- 
- 
- 
+ 
+ 
+ 
+ 
 
diff --git a/icon-themes/sifr_svg/cmd/lc_entirecell.svg 
b/icon-themes/sifr_svg/cmd/lc_entirecell.svg
new file mode 100644
index ..4e4ac7a62be6
--- /dev/null
+++ b/icon-themes/sifr_svg/cmd/lc_entirecell.svg
@@ -0,0 +1,6 @@
+http://www.w3.org/2000/svg";>
+ 
+ 
+ 
+ 
+
diff --git a/icon-themes/sifr_svg/cmd/sc_entirecell.svg 
b/icon-themes/sifr_svg/cmd/sc_entirecell.svg
new file mode 100644
index ..cee62efc6380
--- /dev/null
+++ b/icon-themes/sifr_svg/cmd/sc_entirecell.svg
@@ -0,0 +1,6 @@
+http://www.w3.org/2000/svg";>
+ 
+ 
+ 
+ 
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Markus Mohrhard
 uitest/demo_ui/edit.py |   26 +-
 1 file changed, 25 insertions(+), 1 deletion(-)

New commits:
commit 02df8d4a7f9d35da1b8cb56dbb18e8e0effeec1e
Author: Markus Mohrhard 
Date:   Sun Jan 7 20:04:21 2018 +0100

uitest: add demo showing how to select text in Edit

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

diff --git a/uitest/demo_ui/edit.py b/uitest/demo_ui/edit.py
index 135a72447ea7..6da14333a4d5 100644
--- a/uitest/demo_ui/edit.py
+++ b/uitest/demo_ui/edit.py
@@ -8,7 +8,9 @@
 from libreoffice.uno.propertyvalue import mkPropertyValues
 
 from uitest.framework import UITestCase
-from uitest.uihelper.common import type_text
+from uitest.uihelper.common import type_text, get_state_as_dict
+
+import time
 
 class EditTest(UITestCase):
 
@@ -28,4 +30,26 @@ class EditTest(UITestCase):
 
 self.ui_test.close_doc()
 
+def test_select_text(self):
+
+self.ui_test.create_doc_in_start_center("calc")
+
+self.ui_test.execute_modeless_dialog_through_command(".uno:AddName")
+xAddNameDlg = self.xUITest.getTopFocusWindow()
+
+xEdit = xAddNameDlg.getChild("edit")
+
+type_text(xEdit, "simpleRangeName")
+xEdit.executeAction("SELECT", mkPropertyValues({"FROM": "2", "TO": 
"9"}))
+type_text(xEdit, "otherChars")
+self.assertEqual("siotherCharsgeName", 
get_state_as_dict(xEdit)["Text"])
+
+xEdit.executeAction("SELECT", mkPropertyValues({"FROM": "2", "TO": 
"12"}))
+self.assertEqual("otherChars", 
get_state_as_dict(xEdit)["SelectedText"])
+
+xAddBtn = xAddNameDlg.getChild("cancel")
+self.ui_test.close_dialog_through_button(xAddBtn)
+
+self.ui_test.close_doc()
+
 # 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: sd/uiconfig

2018-01-07 Thread Laurent BP
 sd/uiconfig/sdraw/ui/copydlg.ui |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 2453c5a62cd2c4364d0258f7488ab23b83b5478b
Author: Laurent BP 
Date:   Thu Jan 4 14:00:04 2018 +0100

UI Duplicate dlg: enable negative angle

Duplicate dlg (Shift+F3) should accept negative angle
and angle between 359° and 360°

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

diff --git a/sd/uiconfig/sdraw/ui/copydlg.ui b/sd/uiconfig/sdraw/ui/copydlg.ui
index 8ba01c9f8aa3..4bb5f4195a8b 100644
--- a/sd/uiconfig/sdraw/ui/copydlg.ui
+++ b/sd/uiconfig/sdraw/ui/copydlg.ui
@@ -11,14 +11,15 @@
 10
   
   
-359
+-360
+360
 1
 10
   
   
 -100
 100
-0.10001
+0.1
 1
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Yousuf Philips
 sd/uiconfig/simpress/ui/slidetransitionspanel.ui |   16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 0e5070b97fc0e2314af235809d2ebe37075ef188
Author: Yousuf Philips 
Date:   Wed Jan 3 18:51:32 2018 +0400

tdf#113880 improve slide transition sidebar deck

* added padding around transition list control
* make controls in 'modify transition' accessible
* correct alignment of variant label

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

diff --git a/sd/uiconfig/simpress/ui/slidetransitionspanel.ui 
b/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
index 75a38cb89cc3..78c8f4dac49c 100644
--- a/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
+++ b/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
@@ -2,6 +2,7 @@
 
 
   
+  
   
 True
 False
@@ -30,7 +31,12 @@
 False
 True
 True
-
+6
+6
+6
+
+  
+
   
   
 False
@@ -69,6 +75,8 @@
 False
 end
 Duration:
+True
+transition_duration:0.00sec
 0
   
   
@@ -83,7 +91,6 @@
 True
 Select the 
speed of Slide Transition.
 True
-adjustment1
   
   
 1
@@ -96,6 +103,8 @@
 False
 end
 Sound:
+True
+sound_list
   
   
 0
@@ -136,7 +145,10 @@
   
 True
 False
+end
 Variant:
+True
+variant_list
   
   
 0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Fwd: [Libreoffice-commits] core.git: toolkit/Module_toolkit.mk

2018-01-07 Thread Markus Mohrhard
Hey Michael,

see the referenced commit. I disabled the test for now as it seems that
there are a number of problems. Maybe you can have a look at them.

Regards,
Markus

-- Forwarded message --
From: Markus Mohrhard 
Date: Sun, Jan 7, 2018 at 10:17 PM
Subject: [Libreoffice-commits] core.git: toolkit/Module_toolkit.mk
To: libreoffice-comm...@lists.freedesktop.org


 toolkit/Module_toolkit.mk |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 43dd63898c145ebeb918f1d6ce094cf5c68548c8
Author: Markus Mohrhard 
Date:   Sun Jan 7 22:15:13 2018 +0100

disable toolkit unit conversion test for now

There seems to be a bunch of problems:

On OSX the test crashes when no display can be found:
https://ci.libreoffice.org/job/lo_gerrit/25298/Config=
macosx_clang_dbgutil/console

On windows the position seems to be wrong on some boxes, e.g.:
D:/lode/dev/core/toolkit/qa/cppunit/UnitConversion.cxx(149) : error :
Assertion
Test name: `anonymous namespace'::ToolkitTest::testXUnitConversion
equality assertion failed
- Expected: 100
- Actual  : 72
- Window pos wrong

Change-Id: Id100817cf9024986f790c2bfbf2ddaefcd2dd080

diff --git a/toolkit/Module_toolkit.mk b/toolkit/Module_toolkit.mk
index b5e4bdee01b4..74a9d5d78ffc 100644
--- a/toolkit/Module_toolkit.mk
+++ b/toolkit/Module_toolkit.mk
@@ -23,9 +23,9 @@ $(eval $(call gb_Module_add_targets,toolkit,\
 Library_tk \
 ))

-$(eval $(call gb_Module_add_check_targets,toolkit,\
-CppunitTest_toolkit \
-))
+#$(eval $(call gb_Module_add_check_targets,toolkit,\
+#CppunitTest_toolkit \
+#))

 ifneq ($(OOO_JUNIT_JAR),)
 $(eval $(call gb_Module_add_subsequentcheck_targets,toolkit,\
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: toolkit/Module_toolkit.mk

2018-01-07 Thread Markus Mohrhard
 toolkit/Module_toolkit.mk |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 43dd63898c145ebeb918f1d6ce094cf5c68548c8
Author: Markus Mohrhard 
Date:   Sun Jan 7 22:15:13 2018 +0100

disable toolkit unit conversion test for now

There seems to be a bunch of problems:

On OSX the test crashes when no display can be found:

https://ci.libreoffice.org/job/lo_gerrit/25298/Config=macosx_clang_dbgutil/console

On windows the position seems to be wrong on some boxes, e.g.:
D:/lode/dev/core/toolkit/qa/cppunit/UnitConversion.cxx(149) : error : 
Assertion
Test name: `anonymous namespace'::ToolkitTest::testXUnitConversion
equality assertion failed
- Expected: 100
- Actual  : 72
- Window pos wrong

Change-Id: Id100817cf9024986f790c2bfbf2ddaefcd2dd080

diff --git a/toolkit/Module_toolkit.mk b/toolkit/Module_toolkit.mk
index b5e4bdee01b4..74a9d5d78ffc 100644
--- a/toolkit/Module_toolkit.mk
+++ b/toolkit/Module_toolkit.mk
@@ -23,9 +23,9 @@ $(eval $(call gb_Module_add_targets,toolkit,\
 Library_tk \
 ))
 
-$(eval $(call gb_Module_add_check_targets,toolkit,\
-CppunitTest_toolkit \
-))
+#$(eval $(call gb_Module_add_check_targets,toolkit,\
+#CppunitTest_toolkit \
+#))
 
 ifneq ($(OOO_JUNIT_JAR),)
 $(eval $(call gb_Module_add_subsequentcheck_targets,toolkit,\
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - set_soenv.in

2018-01-07 Thread Don Lewis
 set_soenv.in |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit d364c5bb7211ec60fadf8e065b2a1ffa830493fa
Author: Don Lewis 
Date:   Sun Jan 7 19:51:56 2018 +

Use $CC_PATH (with the trailing slash removed) instead of $COMPATH

when setting $PATH.  The latter has the trailing /bin removed from
the path to the compiler executable and results in /usr being
incorrectly added to $PATH.

Remove an older, FreeBSD-specific workaround.

diff --git a/set_soenv.in b/set_soenv.in
index b8e19203b58b..a68924f65467 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -359,7 +359,7 @@ elsif ( $platform =~ m/kfreebsd/ )
 elsif ( $platform =~ m/freebsd/ ) 
 { $BIG_SVX= "TRUE";
   $COM= "@COM_IS@";
-  $COMPATH= '@COMPATH@' . '/bin'; 
+  $COMPATH= '@COMPATH@'; 
   $CVER   = "C300";
   $GUI= "UNX";
   $GUIBASE= "unx";
@@ -1134,8 +1134,10 @@ if ($platform =~ 
m/linux|netbsd|odf1|freebsd|aix|solaris/)
} else {
   @javaBits = (); 
}
+   my $ccdir = "@CC_PATH@";
+   $ccdir =~ s/\/$//;
$PATH  = GetCorrectPath ($PATH,
-$COMPATH, $CC,
+$ccdir, $CC,
 $PERL_PATH, 'perl',
 @javaBits);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Crash test update

2018-01-07 Thread Crashtest VM
New crashtest update available at 
http://dev-builds.libreoffice.org/crashtest/a0e136d2cbb3784ddfcbddcfed5d784c8e4c9a64/


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: svtools/source

2018-01-07 Thread Markus Mohrhard
 svtools/source/uitest/uiobject.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 7d87e9063b401b56749fcb7ec8a7d16a6f462ee5
Author: Markus Mohrhard 
Date:   Sun Jan 7 19:46:08 2018 +0100

uitest: add more properties to SvSimpleTableContainer state map

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

diff --git a/svtools/source/uitest/uiobject.cxx 
b/svtools/source/uitest/uiobject.cxx
index 327f107f5f66..99eac13cabc5 100644
--- a/svtools/source/uitest/uiobject.cxx
+++ b/svtools/source/uitest/uiobject.cxx
@@ -179,7 +179,11 @@ StringMap SimpleTableUIObject::get_state()
 {
 StringMap aMap = TreeListUIObject::get_state();
 
-aMap["ColumnCount"] = OUString::number(mxTable->TabCount());
+aMap["ColumnCount"] = OUString::number(mxTable->GetColumnCount());
+aMap["RowCount"] = OUString::number(mxTable->GetRowCount());
+aMap["SelectedRowCount"] = 
OUString::number(mxTable->GetSelectedRowCount());
+aMap["SelectedColumnCount"] = 
OUString::number(mxTable->GetSelectedColumnCount());
+aMap["EntryCount"] = OUString::number(mxTable->GetEntryCount());
 
 return aMap;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Caolán McNamara
 sax/source/fastparser/fastparser.cxx |  154 +--
 1 file changed, 76 insertions(+), 78 deletions(-)

New commits:
commit 19110ae6255dd17d2dbbff82f44c55c266273c64
Author: Caolán McNamara 
Date:   Wed Nov 29 21:18:11 2017 +

ofz: always free with xmlFreeParserCtxt

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

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

diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index eb15b19e94be..bbe7748b149a 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -735,6 +735,27 @@ sal_Int32 FastSaxParserImpl::GetTokenWithContextNamespace( 
sal_Int32 nNamespaceT
 return FastToken::DONTKNOW;
 }
 
+namespace
+{
+class ParserCleanup
+{
+private:
+FastSaxParserImpl& m_rParser;
+Entity& m_rEntity;
+public:
+ParserCleanup(FastSaxParserImpl& rParser, Entity& rEntity)
+: m_rParser(rParser)
+, m_rEntity(rEntity)
+{
+}
+~ParserCleanup()
+{
+//xmlFreeParserCtxt accepts a null arg
+xmlFreeParserCtxt(m_rEntity.mpParser);
+m_rParser.popEntity();
+}
+};
+}
 /***
 *
 * parseStream does Parser-startup initializations. The FastSaxParser::parse() 
method does
@@ -760,103 +781,80 @@ void FastSaxParserImpl::parseStream(const InputSource& 
maStructSource)
 
 pushEntity( entity );
 Entity& rEntity = getEntity();
-try
+ParserCleanup aEnsureFree(*this, rEntity);
+
+// start the document
+if( rEntity.mxDocumentHandler.is() )
 {
-// start the document
-if( rEntity.mxDocumentHandler.is() )
-{
-Reference< XLocator > xLoc( mxDocumentLocator.get() );
-rEntity.mxDocumentHandler->setDocumentLocator( xLoc );
-rEntity.mxDocumentHandler->startDocument();
-}
+Reference< XLocator > xLoc( mxDocumentLocator.get() );
+rEntity.mxDocumentHandler->setDocumentLocator( xLoc );
+rEntity.mxDocumentHandler->startDocument();
+}
 
-rEntity.mbEnableThreads = 
(rEntity.maStructSource.aInputStream->available() > 1);
+rEntity.mbEnableThreads = 
(rEntity.maStructSource.aInputStream->available() > 1);
 
-if (rEntity.mbEnableThreads)
-{
-rtl::Reference xParser;
-xParser = new ParserThread(this);
-xParser->launch();
-bool done = false;
-do {
-rEntity.maConsumeResume.wait();
-rEntity.maConsumeResume.reset();
-
-osl::ResettableMutexGuard aGuard(rEntity.maEventProtector);
-while (!rEntity.maPendingEvents.empty())
-{
-if (rEntity.maPendingEvents.size() <= 
Entity::mnEventLowWater)
-rEntity.maProduceResume.set(); // start producer again
+if (rEntity.mbEnableThreads)
+{
+rtl::Reference xParser;
+xParser = new ParserThread(this);
+xParser->launch();
+bool done = false;
+do {
+rEntity.maConsumeResume.wait();
+rEntity.maConsumeResume.reset();
+
+osl::ResettableMutexGuard aGuard(rEntity.maEventProtector);
+while (!rEntity.maPendingEvents.empty())
+{
+if (rEntity.maPendingEvents.size() <= Entity::mnEventLowWater)
+rEntity.maProduceResume.set(); // start producer again
 
-EventList *pEventList = rEntity.maPendingEvents.front();
-rEntity.maPendingEvents.pop();
-aGuard.clear(); // unlock
+EventList *pEventList = rEntity.maPendingEvents.front();
+rEntity.maPendingEvents.pop();
+aGuard.clear(); // unlock
 
-if (!consume(pEventList))
-done = true;
+if (!consume(pEventList))
+done = true;
 
-aGuard.reset(); // lock
+aGuard.reset(); // lock
 
-if ( rEntity.maPendingEvents.size() <= 
Entity::mnEventLowWater )
+if ( rEntity.maPendingEvents.size() <= Entity::mnEventLowWater 
)
+{
+aGuard.clear();
+for (auto aEventIt = pEventList->maEvents.begin();
+aEventIt != pEventList->maEvents.end(); ++aEventIt)
 {
-aGuard.clear();
-for (auto aEventIt = pEventList->maEvents.begin();
-aEventIt != pEventList->maEvent

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

2018-01-07 Thread Caolán McNamara
 sax/source/fastparser/fastparser.cxx |  156 +--
 1 file changed, 77 insertions(+), 79 deletions(-)

New commits:
commit bd04d7be1f89600623c148a7837a694c1df388d7
Author: Caolán McNamara 
Date:   Wed Nov 29 21:18:11 2017 +

ofz: always free with xmlFreeParserCtxt

Change-Id: I90aed11ae0a29a0e9fc725b297e10a7ed30c9942
Reviewed-on: https://gerrit.libreoffice.org/45533
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 5591aa360874c9133d046eeaa1c315df1a441bc4)
Reviewed-on: https://gerrit.libreoffice.org/47538
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index 8c0286656764..1aa8811366ea 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -730,6 +730,27 @@ sal_Int32 FastSaxParserImpl::GetTokenWithContextNamespace( 
sal_Int32 nNamespaceT
 return FastToken::DONTKNOW;
 }
 
+namespace
+{
+class ParserCleanup
+{
+private:
+FastSaxParserImpl& m_rParser;
+Entity& m_rEntity;
+public:
+ParserCleanup(FastSaxParserImpl& rParser, Entity& rEntity)
+: m_rParser(rParser)
+, m_rEntity(rEntity)
+{
+}
+~ParserCleanup()
+{
+//xmlFreeParserCtxt accepts a null arg
+xmlFreeParserCtxt(m_rEntity.mpParser);
+m_rParser.popEntity();
+}
+};
+}
 /***
 *
 * parseStream does Parser-startup initializations. The FastSaxParser::parse() 
method does
@@ -755,104 +776,81 @@ void FastSaxParserImpl::parseStream(const InputSource& 
maStructSource)
 
 pushEntity( entity );
 Entity& rEntity = getEntity();
-try
+ParserCleanup aEnsureFree(*this, rEntity);
+
+// start the document
+if( rEntity.mxDocumentHandler.is() )
 {
-// start the document
-if( rEntity.mxDocumentHandler.is() )
-{
-Reference< XLocator > xLoc( mxDocumentLocator.get() );
-rEntity.mxDocumentHandler->setDocumentLocator( xLoc );
-rEntity.mxDocumentHandler->startDocument();
-}
+Reference< XLocator > xLoc( mxDocumentLocator.get() );
+rEntity.mxDocumentHandler->setDocumentLocator( xLoc );
+rEntity.mxDocumentHandler->startDocument();
+}
 
-rEntity.mbEnableThreads = 
rEntity.maStructSource.aInputStream->available() > 1
-&& !getenv("SAX_DISABLE_THREADS");
+rEntity.mbEnableThreads = rEntity.maStructSource.aInputStream->available() 
> 1
+&& !getenv("SAX_DISABLE_THREADS");
 
-if (rEntity.mbEnableThreads)
-{
-rtl::Reference xParser;
-xParser = new ParserThread(this);
-xParser->launch();
-bool done = false;
-do {
-rEntity.maConsumeResume.wait();
-rEntity.maConsumeResume.reset();
-
-osl::ResettableMutexGuard aGuard(rEntity.maEventProtector);
-while (!rEntity.maPendingEvents.empty())
-{
-if (rEntity.maPendingEvents.size() <= 
Entity::mnEventLowWater)
-rEntity.maProduceResume.set(); // start producer again
+if (rEntity.mbEnableThreads)
+{
+rtl::Reference xParser;
+xParser = new ParserThread(this);
+xParser->launch();
+bool done = false;
+do {
+rEntity.maConsumeResume.wait();
+rEntity.maConsumeResume.reset();
+
+osl::ResettableMutexGuard aGuard(rEntity.maEventProtector);
+while (!rEntity.maPendingEvents.empty())
+{
+if (rEntity.maPendingEvents.size() <= Entity::mnEventLowWater)
+rEntity.maProduceResume.set(); // start producer again
 
-std::unique_ptr xEventList = 
std::move(rEntity.maPendingEvents.front());
-rEntity.maPendingEvents.pop();
-aGuard.clear(); // unlock
+std::unique_ptr xEventList = 
std::move(rEntity.maPendingEvents.front());
+rEntity.maPendingEvents.pop();
+aGuard.clear(); // unlock
 
-if (!consume(*xEventList))
-done = true;
+if (!consume(*xEventList))
+done = true;
 
-aGuard.reset(); // lock
+aGuard.reset(); // lock
 
-if ( rEntity.maPendingEvents.size() <= 
Entity::mnEventLowWater )
+if ( rEntity.maPendingEvents.size() <= Entity::mnEventLowWater 
)
+{
+aGuard.clear();
+for (auto aEventIt = xEventList->maEvents.begin();
+aEventIt != xEventList->maEvents.end(); ++aEventIt)
 {
-aGuard.clear();
-  

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

2018-01-07 Thread Caolán McNamara
 filter/source/graphicfilter/ios2met/ios2met.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 0a3380ae54e9c33aa4773c6d9878b99b9636dabf
Author: Caolán McNamara 
Date:   Sun Jan 7 20:27:27 2018 +

ofz: fail early

Change-Id: I86790efea5ad4a12578477301959704fb09d67b6

diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx 
b/filter/source/graphicfilter/ios2met/ios2met.cxx
index b737ac664d14..faf82a7569ed 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -887,6 +887,8 @@ void OS2METReader::ReadRelLine(bool bGivenPos, sal_uInt16 
nOrderLen)
 if (bCoord32) nOrderLen-=8; else nOrderLen-=4;
 }
 else aP0=aAttr.aCurPos;
+if (nOrderLen > pOS2MET->remainingSize())
+throw css::uno::Exception("attempt to read past end of input", 
nullptr);
 nPolySize=nOrderLen/2;
 if (nPolySize==0) return;
 tools::Polygon aPolygon(nPolySize);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Caolán McNamara
 sw/source/filter/html/htmltab.cxx |   64 +++---
 sw/source/filter/html/swhtml.hxx  |2 +
 2 files changed, 35 insertions(+), 31 deletions(-)

New commits:
commit 6d05e0945054459ed04d50ae16731f933be48664
Author: Caolán McNamara 
Date:   Sun Jan 7 15:21:28 2018 +

ofz#5007 Null-dereference READ

Change-Id: I830483071ce481fd14b0d1227c90e492e125f35e
Reviewed-on: https://gerrit.libreoffice.org/47537
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index 59cc59c64e5f..1f44e0bd138c 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -5042,6 +5042,37 @@ namespace
 };
 }
 
+void SwHTMLParser::DeleteSection(SwStartNode* pSttNd)
+{
+//if section to be deleted contains a pending m_pMarquee, it will be 
deleted
+//so clear m_pMarquee pointer if that's the case
+SwFrameFormat* pObjectFormat = m_pMarquee ? ::FindFrameFormat(m_pMarquee) 
: nullptr;
+FrameDeleteWatch aWatch(pObjectFormat);
+
+//similarly for footnotes
+if (m_pFootEndNoteImpl)
+{
+SwNodeIndex aSttIdx(*pSttNd), aEndIdx(*pSttNd->EndOfSectionNode());
+
m_pFootEndNoteImpl->aTextFootnotes.erase(std::remove_if(m_pFootEndNoteImpl->aTextFootnotes.begin(),
+m_pFootEndNoteImpl->aTextFootnotes.end(), IndexInRange(aSttIdx, 
aEndIdx)), m_pFootEndNoteImpl->aTextFootnotes.end());
+if (m_pFootEndNoteImpl->aTextFootnotes.empty())
+{
+delete m_pFootEndNoteImpl;
+m_pFootEndNoteImpl = nullptr;
+}
+}
+
+m_xDoc->getIDocumentContentOperations().DeleteSection(pSttNd);
+
+if (pObjectFormat)
+{
+if (aWatch.WasDeleted())
+m_pMarquee = nullptr;
+else
+pObjectFormat->Remove(&aWatch);
+}
+}
+
 std::shared_ptr SwHTMLParser::BuildTable(SvxAdjust eParentAdjust,
 bool bIsParentHead,
 bool bHasParentSection,
@@ -5256,7 +5287,7 @@ std::shared_ptr 
SwHTMLParser::BuildTable(SvxAdjust eParentAdjust,
 // The section isn't needed anymore
 m_pPam->SetMark();
 m_pPam->DeleteMark();
-m_xDoc->getIDocumentContentOperations().DeleteSection( 
const_cast(pCapStNd) );
+DeleteSection(const_cast(pCapStNd));
 m_xTable->SetCaption( nullptr, false );
 }
 
@@ -5305,37 +5336,8 @@ std::shared_ptr 
SwHTMLParser::BuildTable(SvxAdjust eParentAdjust,
 {
 m_pPam->SetMark();
 m_pPam->DeleteMark();
-
-SwStartNode* pSttNd = const_cast(pCapStNd);
-
-//if section to be deleted contains a pending m_pMarquee, it will 
be deleted
-//so clear m_pMarquee pointer if that's the case
-SwFrameFormat* pObjectFormat = m_pMarquee ? 
::FindFrameFormat(m_pMarquee) : nullptr;
-FrameDeleteWatch aWatch(pObjectFormat);
-
-//similarly for footnotes
-if (m_pFootEndNoteImpl)
-{
-SwNodeIndex aSttIdx(*pSttNd), 
aEndIdx(*pSttNd->EndOfSectionNode());
-
m_pFootEndNoteImpl->aTextFootnotes.erase(std::remove_if(m_pFootEndNoteImpl->aTextFootnotes.begin(),
-m_pFootEndNoteImpl->aTextFootnotes.end(), 
IndexInRange(aSttIdx, aEndIdx)), m_pFootEndNoteImpl->aTextFootnotes.end());
-if (m_pFootEndNoteImpl->aTextFootnotes.empty())
-{
-delete m_pFootEndNoteImpl;
-m_pFootEndNoteImpl = nullptr;
-}
-}
-
-m_xDoc->getIDocumentContentOperations().DeleteSection(pSttNd);
+DeleteSection(const_cast(pCapStNd));
 xCurTable->SetCaption( nullptr, false );
-
-if (pObjectFormat)
-{
-if (aWatch.WasDeleted())
-m_pMarquee = nullptr;
-else
-pObjectFormat->Remove(&aWatch);
-}
 }
 }
 
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 92d090bcddc9..e16394053623 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -661,6 +661,8 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
 // tags realized via character styles
 void NewCharFormat( HtmlTokenId nToken );
 
+void DeleteSection(SwStartNode* pSttNd);
+
 // 
 public:
 static SvxNumType GetNumType( const OUString& rStr, SvxNumType eDfltType );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Caolán McNamara
 lotuswordpro/source/filter/lwptoc.cxx |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 19f0a4cb75e0430502d003fa00ff47801912af03
Author: Caolán McNamara 
Date:   Sun Jan 7 15:06:59 2018 +

ofz#5012 Direct-leak

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

diff --git a/lotuswordpro/source/filter/lwptoc.cxx 
b/lotuswordpro/source/filter/lwptoc.cxx
index 4e94e7aac4b2..38a41e580f9c 100644
--- a/lotuswordpro/source/filter/lwptoc.cxx
+++ b/lotuswordpro/source/filter/lwptoc.cxx
@@ -261,25 +261,25 @@ void  LwpTocSuperLayout::XFConvert(XFContentContainer* 
pCont)
  */
 void  LwpTocSuperLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 
nStart, sal_Int32 nEnd, bool bAll)
 {
-if(m_pFrame)
+if (m_pFrame)
 {
-XFFrame* pXFFrame = nullptr;
+rtl::Reference xXFFrame;
 if(nEnd < nStart)
 {
-pXFFrame = new XFFrame();
+xXFFrame.set(new XFFrame);
 }
 else
 {
-pXFFrame = new XFFloatFrame(nStart, nEnd, bAll);
+xXFFrame.set(new XFFloatFrame(nStart, nEnd, bAll));
 }
 
-m_pFrame->Parse(pXFFrame, static_cast(nStart));
+m_pFrame->Parse(xXFFrame.get(), static_cast(nStart));
 
 //parse table, and add table to frame or TOC
 LwpTableLayout * pTableLayout = GetTableLayout();
 if (pTableLayout)
 {
-XFContentContainer * pTableContainer = pXFFrame;
+XFContentContainer* pTableContainer = xXFFrame.get();
 // if *this is a TOCSuperTableLayout and it's located in a cell
 // add the frame to upper level and add TOCSuperTableLayout into 
the frame
 rtl::Reference xContainer(GetContainerLayout());
@@ -288,13 +288,13 @@ void  
LwpTocSuperLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 nSt
 if (xContainer->IsCell())
 {
 pTableContainer = pCont; // TOC contain table directly
-pXFFrame->Add(pCont);
-m_pCont->Add(pXFFrame);
+xXFFrame->Add(pCont);
+m_pCont->Add(xXFFrame.get());
 }
 else
 {
 //add frame to the container
-pCont->Add(pXFFrame);
+pCont->Add(xXFFrame.get());
 }
 pTableLayout->XFConvert(pTableContainer);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Caolán McNamara
 lotuswordpro/source/filter/lwppagelayout.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 9dad387df78f4043ca0c718f27ed06006fa7128a
Author: Caolán McNamara 
Date:   Sun Jan 7 15:14:34 2018 +

ofz#4979 Divide-by-zero

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

diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx 
b/lotuswordpro/source/filter/lwppagelayout.cxx
index 193bdbbedb69..8ee43071bb95 100644
--- a/lotuswordpro/source/filter/lwppagelayout.cxx
+++ b/lotuswordpro/source/filter/lwppagelayout.cxx
@@ -288,9 +288,13 @@ void LwpPageLayout::ParseFootNoteSeparator(XFPageMaster * 
pm1)
 enumXFAlignType eAlignType = enumXFAlignStart;
 if(rFootnoteSep.GetIndent() > 0)
 {
+const double fMarginWidth = GetMarginWidth();
+if (fMarginWidth == 0.0)
+throw o3tl::divide_by_zero();
+
 //SODC don't support indent
-sal_uInt32 nIndentPercent =  
static_cast(100*LwpTools::ConvertFromUnitsToMetric(rFootnoteSep.GetIndent())/GetMarginWidth());
-if(nIndentPercent + nLengthPercent >= 100)
+sal_uInt32 nIndentPercent =  
static_cast(100*LwpTools::ConvertFromUnitsToMetric(rFootnoteSep.GetIndent())
 / fMarginWidth);
+if (nIndentPercent + nLengthPercent >= 100)
 eAlignType = enumXFAlignEnd;
 }
 if(aColor.IsValidColor())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Caolán McNamara
 tools/source/generic/bigint.cxx |   12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 44b938040f312def227c9ed72d1f83811cf67f1a
Author: Caolán McNamara 
Date:   Sat Jan 6 21:01:32 2018 +

ofz#4995 Integer-overflow

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

diff --git a/tools/source/generic/bigint.cxx b/tools/source/generic/bigint.cxx
index 883e3804617d..e4afdb6be55e 100644
--- a/tools/source/generic/bigint.cxx
+++ b/tools/source/generic/bigint.cxx
@@ -51,17 +51,19 @@ void BigInt::MakeBigInt( const BigInt& rVal )
 }
 else
 {
-sal_Int32 nTmp = rVal.nVal;
-
-nVal   = rVal.nVal;
+nVal = rVal.nVal;
 bIsBig = true;
-if ( nTmp < 0 )
+sal_uInt32 nTmp;
+if (nVal < 0)
 {
 bIsNeg = true;
-nTmp = -nTmp;
+nTmp = -static_cast(nVal);
 }
 else
+{
 bIsNeg = false;
+nTmp = nVal;
+}
 
 nNum[0] = (sal_uInt16)(nTmp & 0xL);
 nNum[1] = (sal_uInt16)(nTmp >> 16);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Stephan Bergmann
 configure.ac |   24 +---
 1 file changed, 17 insertions(+), 7 deletions(-)

New commits:
commit 7df57f6993cab4ba0f1fccce92394c4dfe46f067
Author: Stephan Bergmann 
Date:   Fri Jan 5 17:20:11 2018 +0100

Find JDK 9 on Windows

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

diff --git a/configure.ac b/configure.ac
index ce7598305e54..7ef4a6c6a334 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6563,13 +6563,23 @@ if test "$ENABLE_JAVA" != ""; then
 fi
 
 if test -z "$with_jdk_home"; then
-for ver in 1.8 1.7 1.6; do
-reg_get_value "$bitness" 
"HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Development Kit/$ver/JavaHome"
-if test -n "$regvalue"; then
-_jdk_home=$regvalue
-break
-fi
-done
+dnl See 
 section "Windows Registry Key Changes":
+reg_get_value "$bitness" 
"HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/CurrentVersion"
+if test -n "$regvalue"; then
+ver=$regvalue
+reg_get_value "$bitness" 
"HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/$ver/JavaHome"
+_jdk_home=$regvalue
+fi
+if test -z "$with_jdk_home"; then
+for ver in 1.8 1.7 1.6; do
+reg_get_value "$bitness" 
"HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Development Kit/$ver/JavaHome"
+if test -n "$regvalue"; then
+_jdk_home=$regvalue
+break
+fi
+done
+fi
 if test -f "$_jdk_home/lib/jvm.lib" -a -f 
"$_jdk_home/bin/java.exe"; then
 with_jdk_home="$_jdk_home"
 howfound="found automatically"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - wizards/com

2018-01-07 Thread Julien Nabet
 wizards/com/sun/star/wizards/common/strings.hrc |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 0e2cd1b44cf1794ac93aa59b6ec103276e40ae46
Author: Julien Nabet 
Date:   Sun Jan 7 01:19:18 2018 +0100

tdf#114873: localize Letter, fax and agenda wizards

Since we use contextual messages, we need to concatenate:
- context
- EOT character
- the message itself
see https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html

A priori, regression from 00657aef09d854c74fb426a935a3e8b1fc390bb0

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

diff --git a/wizards/com/sun/star/wizards/common/strings.hrc 
b/wizards/com/sun/star/wizards/common/strings.hrc
index fc43b334342c..46a2097c25cd 100644
--- a/wizards/com/sun/star/wizards/common/strings.hrc
+++ b/wizards/com/sun/star/wizards/common/strings.hrc
@@ -20,7 +20,13 @@ gettext.bindtextdomain('wiz', unohelper.fileUrlToSystemPath(
 gettext.textdomain('wiz')
 
 def NC_(context, string):
-return gettext.gettext(string)
+# Contextual strings are stored with the concatenation of
+# the context, a EOT byte, and the original string, instead of the 
original string
+# see https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html
+ret = gettext.gettext(context + chr(4) + string)
+if ret.find(chr(4)) == -1:
+return ret
+return string
 
 # common section
 RID_COMMON_START_0  = NC_("RID_COMMON_START_0", "The 
directory '%1' could not be created.There may not be enough space left on 
your hard disk.")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread jan Iversen
 ios/CustomTarget_iOS_prelink.mk |   27 +--
 1 file changed, 13 insertions(+), 14 deletions(-)

New commits:
commit 2d28107c294e72e69fa0ce4fc20bad9e11ef1118
Author: jan Iversen 
Date:   Sun Jan 7 17:19:27 2018 +0100

iOS, create both static and dylib.

for now the dylib is experimental.

Change-Id: Id32e90a61b9695c0a73554db80b072a98234a9f5

diff --git a/ios/CustomTarget_iOS_prelink.mk b/ios/CustomTarget_iOS_prelink.mk
index 4ced2da31977..a50a1209630b 100644
--- a/ios/CustomTarget_iOS_prelink.mk
+++ b/ios/CustomTarget_iOS_prelink.mk
@@ -11,8 +11,10 @@ IOSOBJ = $(WORKDIR)/CObject/ios/Kit.o
 
 ifeq ($(ENABLE_DEBUG),TRUE)
 IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME)_debug.dylib
+IOSKIT2 = $(SRCDIR)/ios/generated/libKit_$(CPUNAME)_debug.a
 else
-IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME).a
+IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME).dylib
+IOSKIT2 = $(SRCDIR)/ios/generated/libKit_$(CPUNAME).a
 endif
 
 
@@ -29,9 +31,15 @@ $(call gb_CustomTarget_get_target,ios/iOS_prelink): $(IOSKIT)
 FORCE:
 
 
-$(IOSKIT): $(IOSOBJ)
-   $(SRCDIR)/bin/lo-all-static-libs > $(SRCDIR)/ios/generated/lib.list
-ifeq ($(ENABLE_DEBUG),TRUE)
+$(IOSKIT):
+   $(IOSLD) -r -ios_version_min 11.2 \
+   -syslibroot $(MACOSX_SDK_PATH) \
+   -arch `echo $(CPUNAME) |  tr '[:upper:]' '[:lower:]'` \
+   -o $(IOSOBJ) \
+   $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \
+   `$(SRCDIR)/bin/lo-all-static-libs`
+   $(AR) -r $(IOSKIT2) $(IOSOBJ)
+
$(IOSLD) -dylib -ios_version_min $(IOS_DEPLOYMENT_VERSION) \
-syslibroot $(MACOSX_SDK_PATH) \
-arch `echo $(CPUNAME) |  tr '[:upper:]' '[:lower:]'` \
@@ -51,21 +59,12 @@ ifeq ($(ENABLE_DEBUG),TRUE)
$(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \
`$(SRCDIR)/bin/lo-all-static-libs` \
-o $(IOSKIT)
-else
-   $(IOSLD) -r -ios_version_min 11.2 \
-   -syslibroot $(MACOSX_SDK_PATH) \
-   -arch `echo $(CPUNAME) |  tr '[:upper:]' '[:lower:]'` \
-   -o $(IOSOBJ) \
-   $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \
-   `$(SRCDIR)/bin/lo-all-static-libs`
-   $(AR) -r $(IOSKIT) $(IOSOBJ)
-endif
 
 
 
 #- clean ios  -
 $(call gb_CustomTarget_get_clean_target,ios/iOS_prelink):
-   rm $(IOSKIT)
+   rm -f $(IOSKIT) $(IOSKIT2)
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Markus Mohrhard
 vcl/source/uitest/uiobject.cxx |   15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)

New commits:
commit 89289fd5df60e73aa5c96c72b94d5b0bef302ef2
Author: Markus Mohrhard 
Date:   Sun Jan 7 14:24:02 2018 +0100

uitest: port the selection code from multi line edit to normal edit

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

diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 56373981be74..65a6a09fad43 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -631,15 +631,22 @@ void EditUIObject::execute(const OUString& rAction,
 mxEdit->KeyInput(*itr);
 }
 }
-else if (rParameters.find("SELECTION") != rParameters.end())
-{
-// TODO: moggi: add code
-}
 else
 {
 bHandled = false;
 }
 }
+else if (rAction == "SELECT")
+{
+if (rParameters.find("FROM") != rParameters.end() &&
+rParameters.find("TO") != rParameters.end())
+{
+long nMin = rParameters.find("FROM")->second.toInt32();
+long nMax = rParameters.find("TO")->second.toInt32();
+Selection aSelection(nMin, nMax);
+mxEdit->SetSelection(aSelection);
+}
+}
 else
 {
 bHandled = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Markus Mohrhard
 include/vcl/uitest/uiobject.hxx |   21 ++
 include/vcl/vclmedit.hxx|   46 +++
 vcl/source/edit/vclmedit.cxx|   52 +++
 vcl/source/uitest/uiobject.cxx  |   58 
 4 files changed, 135 insertions(+), 42 deletions(-)

New commits:
commit e66a0d7095260c62b067541a0c47ce5c07074f18
Author: Markus Mohrhard 
Date:   Sun Jan 7 14:23:31 2018 +0100

uitest: add support for GtkTextView/VclMultiLineEdit

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

diff --git a/include/vcl/uitest/uiobject.hxx b/include/vcl/uitest/uiobject.hxx
index de413107903e..0493cbc19c98 100644
--- a/include/vcl/uitest/uiobject.hxx
+++ b/include/vcl/uitest/uiobject.hxx
@@ -192,6 +192,27 @@ protected:
 virtual OUString get_name() const override;
 };
 
+class UITEST_DLLPUBLIC MultiLineEditUIObject : public WindowUIObject
+{
+VclPtr mxEdit;
+
+public:
+
+MultiLineEditUIObject(const VclPtr& xEdit);
+virtual ~MultiLineEditUIObject() override;
+
+virtual void execute(const OUString& rAction,
+const StringMap& rParameters) override;
+
+virtual StringMap get_state() override;
+
+static std::unique_ptr create(vcl::Window* pWindow);
+
+protected:
+
+virtual OUString get_name() const override;
+};
+
 // TODO: moggi: maybe let it inherit from the button case
 class UITEST_DLLPUBLIC CheckBoxUIObject : public WindowUIObject
 {
diff --git a/include/vcl/vclmedit.hxx b/include/vcl/vclmedit.hxx
index 03f0b5667968..7caf3662aa0e 100644
--- a/include/vcl/vclmedit.hxx
+++ b/include/vcl/vclmedit.hxx
@@ -31,6 +31,47 @@ class Timer;
 class ExtTextEngine;
 class TextView;
 
+class TextWindow : public vcl::Window
+{
+private:
+VclPtrmxParent;
+ExtTextEngine*  mpExtTextEngine;
+TextView*   mpExtTextView;
+
+boolmbInMBDown;
+boolmbFocusSelectionHide;
+boolmbIgnoreTab;
+boolmbActivePopup;
+boolmbSelectOnTab;
+
+public:
+explicitTextWindow(Edit* pParent);
+virtual ~TextWindow() override;
+virtual voiddispose() override;
+
+ExtTextEngine*  GetTextEngine() const { return mpExtTextEngine; }
+TextView*   GetTextView() const { return mpExtTextView; }
+
+virtual voidMouseMove( const MouseEvent& rMEvt ) override;
+virtual voidMouseButtonDown( const MouseEvent& rMEvt ) override;
+virtual voidMouseButtonUp( const MouseEvent& rMEvt ) override;
+virtual voidKeyInput( const KeyEvent& rKEvent ) override;
+
+virtual voidCommand( const CommandEvent& rCEvt ) override;
+
+virtual voidPaint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect) override;
+virtual voidResize() override;
+
+virtual voidGetFocus() override;
+virtual voidLoseFocus() override;
+
+voidSetAutoFocusHide( bool bAutoHide ) { mbFocusSelectionHide 
= bAutoHide; }
+
+voidSetIgnoreTab( bool bIgnore ) { mbIgnoreTab = bIgnore; }
+
+voidDisableSelectionOnFocus() { mbSelectOnTab = false; }
+};
+
 class VCL_DLLPUBLIC VclMultiLineEdit : public Edit
 {
 friend class VCLXAccessibleEdit;
@@ -55,8 +96,8 @@ protected:
 voidImplInitSettings( bool bBackground );
 static WinBits  ImplInitStyle( WinBits nStyle );
 
-ExtTextEngine*  GetTextEngine() const;
 TextView*   GetTextView() const;
+ExtTextEngine*  GetTextEngine() const;
 ScrollBar*  GetVScrollBar() const;
 
 virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
@@ -133,6 +174,9 @@ public:
 
 voidEnableCursor( bool bEnable );
 
+TextWindow* GetTextWindow();
+virtual FactoryFunction GetUITestFactory() const override;
+
 virtual bool set_property(const OString &rKey, const OUString &rValue) 
override;
 };
 
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index de34176ea07e..66fb2b058d72 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -26,52 +26,12 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 #include 
 
-class TextWindow : public vcl::Window
-{
-private:
-VclPtrmxParent;
-ExtTextEngine*  mpExtTextEngine;
-TextView*   mpExtTextView;
-
-boolmbInMBDown;
-boolmbFocusSelectionHide;
-boolmbIgnoreTab;
-boolmbActivePopup;
-boolmbSelectOnTab;
-
-public:
-explicitTextWindow(Edit* pParent);
-virtual ~TextWindow() override;
-virtual voiddispose() override;
-
-ExtTextEngine*  GetTextEngine() const { return mpExtTextEngine; }
-TextView*   GetTextView() const { return mpExtTextView; }
-
-virtual voidMouse

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

2018-01-07 Thread Caolán McNamara
 include/tools/bigint.hxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 8d52646747cc70a6c01174cb1a168ece4c95ac68
Author: Caolán McNamara 
Date:   Sun Jan 7 14:58:04 2018 +

coverity#1427248 Operands don't affect result

and

coverity#1427249 Operands don't affect result

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

diff --git a/include/tools/bigint.hxx b/include/tools/bigint.hxx
index b8079a2ccd28..8692bd2e7787 100644
--- a/include/tools/bigint.hxx
+++ b/include/tools/bigint.hxx
@@ -147,8 +147,8 @@ inline BigInt::operator sal_uInt16() const
 
 inline BigInt::operator sal_Int32() const
 {
-if ( !bIsBig && nVal >= SAL_MIN_INT32 && nVal <= SAL_MAX_INT32 )
-return (sal_Int32)nVal;
+if (!bIsBig)
+return nVal;
 assert(false && "out of range");
 return 0;
 }
@@ -165,8 +165,8 @@ inline BigInt::operator sal_uInt32() const
 inline BigInt::operator long() const
 {
 // Clamp to int32 since long is int32 on Windows.
-if ( !bIsBig && nVal >= SAL_MIN_INT32 && nVal <= SAL_MAX_INT32 )
-return (long)nVal;
+if (!bIsBig)
+return nVal;
 assert(false && "out of range");
 return 0;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Caolán McNamara
 wizards/com/sun/star/wizards/common/strings.hrc |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 150267f9d1b17b1f4e1443e92dc5247632755e5f
Author: Caolán McNamara 
Date:   Sun Jan 7 16:32:58 2018 +

Related: tdf#114873 if fallback returned as result, drop context

Change-Id: I82676e4a0b3dee33e248b3ba81e99f949ee9227a

diff --git a/wizards/com/sun/star/wizards/common/strings.hrc 
b/wizards/com/sun/star/wizards/common/strings.hrc
index 21110de96fed..46a2097c25cd 100644
--- a/wizards/com/sun/star/wizards/common/strings.hrc
+++ b/wizards/com/sun/star/wizards/common/strings.hrc
@@ -23,7 +23,10 @@ def NC_(context, string):
 # Contextual strings are stored with the concatenation of
 # the context, a EOT byte, and the original string, instead of the 
original string
 # see https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html
-return gettext.gettext(context + chr(4) + string)
+ret = gettext.gettext(context + chr(4) + string)
+if ret.find(chr(4)) == -1:
+return ret
+return string
 
 # common section
 RID_COMMON_START_0  = NC_("RID_COMMON_START_0", "The 
directory '%1' could not be created.There may not be enough space left on 
your hard disk.")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Caolán McNamara
 emfio/source/reader/emfreader.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d297703d298ee57073c9a65485810b02827a6e8f
Author: Caolán McNamara 
Date:   Sat Jan 6 20:26:40 2018 +

ofz#4980 bail early with 0 points

even if start is 1 of 0

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

diff --git a/emfio/source/reader/emfreader.cxx 
b/emfio/source/reader/emfreader.cxx
index e4f89420b930..52e86618bd0c 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -494,7 +494,7 @@ namespace emfio
 {
 bool bRecordOk = nPoints <= SAL_MAX_UINT16;
 SAL_WARN_IF(!bRecordOk, "emfio", "polygon record has more polygons 
than we can handle");
-if (!bRecordOk)
+if (!bRecordOk || !nPoints)
 return tools::Polygon();
 
 auto nRemainingSize = std::min(nNextPos - mpInputStream->Tell(), 
mpInputStream->remainingSize());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Caolán McNamara
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 384c16ab3f76ce0e2733b0176be379585aa7a7ba
Author: Caolán McNamara 
Date:   Sun Jan 7 14:52:39 2018 +

coverity#1427250 Dereference null return value

Change-Id: I2925ed9d7b74f931b4adba08b069b9ef99d16589
Reviewed-on: https://gerrit.libreoffice.org/47532
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index f724761842a7..1ff6bafb7e18 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -804,6 +804,7 @@ DECLARE_OOXMLEXPORT_TEST(testParagraphWithComments, 
"paragraphWithComments.docx"
 DECLARE_OOXMLEXPORT_TEST(testTdf104707_urlComment, "tdf104707_urlComment.odt")
 {
 xmlDocPtr pXmlComm = parseExport("word/comments.xml");
+CPPUNIT_ASSERT(pXmlComm);
 CPPUNIT_ASSERT_EQUAL( 
OUString("https://bugs.documentfoundation.org/show_bug.cgi?id=104707";), 
getXPathContent(pXmlComm,"/w:comments/w:comment/w:p/w:hyperlink/w:r/w:t") );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Julien Nabet
 wizards/com/sun/star/wizards/common/strings.hrc |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 1a029665ee6902b477c79cdfd08dc3896868c3bf
Author: Julien Nabet 
Date:   Sun Jan 7 01:19:18 2018 +0100

tdf#114873: localize Letter, fax and agenda wizards

Since we use contextual messages, we need to concatenate:
- context
- EOT character
- the message itself
see https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html

A priori, regression from 00657aef09d854c74fb426a935a3e8b1fc390bb0

Change-Id: Ie3e781e30ce09f0121afff2f0eb0769b1fbd2114
Reviewed-on: https://gerrit.libreoffice.org/47521
Tested-by: Jenkins 
Reviewed-by: Jean-Baptiste Faure 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/wizards/com/sun/star/wizards/common/strings.hrc 
b/wizards/com/sun/star/wizards/common/strings.hrc
index fc43b334342c..21110de96fed 100644
--- a/wizards/com/sun/star/wizards/common/strings.hrc
+++ b/wizards/com/sun/star/wizards/common/strings.hrc
@@ -20,7 +20,10 @@ gettext.bindtextdomain('wiz', unohelper.fileUrlToSystemPath(
 gettext.textdomain('wiz')
 
 def NC_(context, string):
-return gettext.gettext(string)
+# Contextual strings are stored with the concatenation of
+# the context, a EOT byte, and the original string, instead of the 
original string
+# see https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html
+return gettext.gettext(context + chr(4) + string)
 
 # common section
 RID_COMMON_START_0  = NC_("RID_COMMON_START_0", "The 
directory '%1' could not be created.There may not be enough space left on 
your hard disk.")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Ahmed GHANMI
 fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx |   20 
 fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx |3 +-
 2 files changed, 18 insertions(+), 5 deletions(-)

New commits:
commit 25206db2aa65430a13a3fe3274c86cc7652c328f
Author: Ahmed GHANMI 
Date:   Thu Nov 30 15:25:01 2017 +0100

tdf#113070: Fix master document issue

In fpicker module we don't treat template listbox "LISTBOX_TEMPLATE" element
selected in "impl_sta_GetControlValue" function. In order to fix this issue
we added a sequence "gitems" which save items added in template listbox
while creating the ODM creation graphic interface. Also we added a section
in impl_sta_GetControlValue function to get user selection from template
listbox and the get the item from gitems and we return
the value.

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

diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx 
b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
index 35be52b6101a..c359915f4e8d 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
@@ -1072,11 +1072,10 @@ void 
VistaFilePickerImpl::impl_sta_SetControlValue(const RequestRef& rRequest)
 
 case css::ui::dialogs::ControlActions::ADD_ITEMS :
 {
-css::uno::Sequence< OUString > lItems;
-   aValue >>= lItems;
-for (::sal_Int32 i=0; i>= m_lItems;
+for (::sal_Int32 i=0; iAddControlItem(nId, i, 
o3tl::toW(sItem.getStr()));
 }
 }
@@ -1130,6 +1129,19 @@ void VistaFilePickerImpl::impl_sta_GetControlValue(const 
RequestRef& rRequest)
 aValue <<= bool(bValue);
 }
 break;
+case css::ui::dialogs::ExtendedFilePickerElementIds::LISTBOX_VERSION:
+case css::ui::dialogs::ExtendedFilePickerElementIds::LISTBOX_TEMPLATE:
+case 
css::ui::dialogs::ExtendedFilePickerElementIds::LISTBOX_IMAGE_TEMPLATE:
+{
+DWORDbValue = 0;
+HRESULT hResult = iCustom->GetSelectedControlItem(nId, 
&bValue);
+if ( SUCCEEDED(hResult) )
+{
+const OUString& sItem = m_lItems[bValue];
+aValue = css::uno::makeAny(OUString(sItem.getStr()));
+}
+}
+break;
 }
 
 if (aValue.hasValue())
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx 
b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
index 5161d787e767..01efd0f58c72 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
@@ -103,7 +103,8 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
 {
 public:
 
-
+// Workaround made to get input in Template Listbox
+css::uno::Sequence< OUString > m_lItems;
 /** used for marshalling requests.
  *  Will be used to map requests to the right implementations.
  */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Eike Rathke
 sc/source/core/tool/token.cxx |   13 +
 1 file changed, 13 insertions(+)

New commits:
commit 02a60985b4a7333f1af6ba46021b56e641355589
Author: Eike Rathke 
Date:   Wed Dec 20 19:44:51 2017 +0100

Exclude more special OpCode values from vectorization

Namely those that have some reference assigned.

Change-Id: Icd5f79612295f13d552a256233b8f1298e3e5359
(cherry picked from commit b34c0cd9ada297e9565b1a93fcaa2a96333e1881)
Reviewed-on: https://gerrit.libreoffice.org/46861
Tested-by: Eike Rathke 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 7a9db36dbb1a..562d03f62394 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1604,6 +1604,19 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
 // Named expression would need "recursive" handling of its
 // token array for vector state in
 // ScFormulaCell::InterpretFormulaGroup() and below.
+
+case ocTableRef:
+// May result in a single cell or range reference, depending on
+// context.
+
+case ocColRowName:
+// The associated reference is the name cell with which to
+// create the implicit intersection.
+
+case ocColRowNameAuto:
+// Auto column/row names lead to references computed in
+// interpreter.
+
 SAL_INFO("sc.opencl", "opcode " << 
formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp)
 << " disables vectorisation for formula group");
 meVectorState = FormulaVectorDisabledByOpCode;
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Maxim Monastirsky
 sc/source/ui/view/tabview3.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 081a544b92ab7adbdfe29d56d91019556ffc07c9
Author: Maxim Monastirsky 
Date:   Thu Nov 30 21:49:34 2017 +0200

tdf#113980 Refresh row/column buttons state after selection change

Change-Id: I21684ffe83d7b924e1d83c853ed4846e0db53c3b
Reviewed-on: https://gerrit.libreoffice.org/45614
Tested-by: Jenkins 
Reviewed-by: Maxim Monastirsky 
(cherry picked from commit 4b65a67caacee1ef0b31219d55bfe0cc6032c9f3)
Reviewed-on: https://gerrit.libreoffice.org/47026
Reviewed-by: Markus Mohrhard 

diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 6e93f5f5756a..69bc8035b421 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -535,6 +535,8 @@ void ScTabView::SelectionChanged()
 rBindings.Invalidate( FID_INS_CELL );
 rBindings.Invalidate( FID_INS_CELLSDOWN );
 rBindings.Invalidate( FID_INS_CELLSRIGHT );
+rBindings.Invalidate( SID_ROW_OPERATIONS );
+rBindings.Invalidate( SID_COLUMN_OPERATIONS );
 
 rBindings.Invalidate( FID_CHG_COMMENT );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Eike Rathke
 sc/source/core/tool/token.cxx |   16 
 1 file changed, 16 insertions(+)

New commits:
commit 174822c33c8d35d514fbb713e6a22d20559bb034
Author: Eike Rathke 
Date:   Sun Dec 17 00:46:07 2017 +0100

Related: tdf#114251 disable ocName named expressions for vectorization

Recursive checking of their token arrays would be needed.

This solves the slowness in the non-threading case of tdf#114251
because no arrays are generated for the named ranges, which is
rather a lucky workaround than a solution.

The wrong handling of range references in general (array where
scalar is expected, no implicit intersection) still persists.

Change-Id: I57385bd95efa584108d93d724921285c97a91a45
Reviewed-on: https://gerrit.libreoffice.org/46623
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit 3193e78aba75c5b38d2683d9fd8593820048e8b9)
Reviewed-on: https://gerrit.libreoffice.org/46669
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 027786958ceb..7a9db36dbb1a 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1595,6 +1595,22 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
 SAL_INFO("sc.core.formulagroup", "opcode " << 
formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp)
 << " disables S/W interpreter for formula group");
 meVectorState = FormulaVectorDisabledNotInSoftwareSubset;
 }
+else
+{
+// All the rest, special commands, separators, error codes, ...
+switch (eOp)
+{
+case ocName:
+// Named expression would need "recursive" handling of its
+// token array for vector state in
+// ScFormulaCell::InterpretFormulaGroup() and below.
+SAL_INFO("sc.opencl", "opcode " << 
formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp)
 << " disables vectorisation for formula group");
+meVectorState = FormulaVectorDisabledByOpCode;
+break;
+default:
+;   // nothing
+}
+}
 }
 
 bool ScTokenArray::ImplGetReference( ScRange& rRange, const ScAddress& rPos, 
bool bValidOnly ) const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Jochen Nitschke
 chart2/source/view/axes/Tickmarks.cxx  |   21 ++---
 chart2/source/view/axes/VCartesianAxis.cxx |   26 +-
 2 files changed, 23 insertions(+), 24 deletions(-)

New commits:
commit 5ecffcb48140eb055e71b0d8905d693036e61bc6
Author: Jochen Nitschke 
Date:   Tue Jun 6 11:19:50 2017 +0200

tdf#108031 Area chart labels not rotated

This fixes recognition of x-axis or y-axis when the coordinate system
is rotated (3D-view). So the labels are rotated correctly.

Change-Id: Iaacfec943f3885c58e99a55585714a79f1d0d9d5
Reviewed-on: https://gerrit.libreoffice.org/38355
Reviewed-by: Jochen Nitschke 
Tested-by: Jochen Nitschke 
(cherry picked from commit 38bf5f69663f64434a3a0a74e02c1a23f876b677)
Reviewed-on: https://gerrit.libreoffice.org/47016
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/chart2/source/view/axes/Tickmarks.cxx 
b/chart2/source/view/axes/Tickmarks.cxx
index c3d98df7456c..2d4c3244cc97 100644
--- a/chart2/source/view/axes/Tickmarks.cxx
+++ b/chart2/source/view/axes/Tickmarks.cxx
@@ -172,13 +172,28 @@ TickFactory2D::~TickFactory2D()
 
 bool TickFactory2D::isHorizontalAxis() const
 {
-return ( m_aAxisStartScreenPosition2D.getY() == 
m_aAxisEndScreenPosition2D.getY() );
+// check trivial cases:
+if ( m_aAxisStartScreenPosition2D.getY() == 
m_aAxisEndScreenPosition2D.getY() )
+return true;
+if ( m_aAxisStartScreenPosition2D.getX() == 
m_aAxisEndScreenPosition2D.getX() )
+return false;
+
+// for skew axes compare angle with horizontal vector
+double fInclination = 
std::abs(B2DVector(m_aAxisEndScreenPosition2D-m_aAxisStartScreenPosition2D).angle(B2DVector(1.0,
 0.0)));
+return fInclination < F_PI4 || fInclination > (F_PI-F_PI4);
 }
 bool TickFactory2D::isVerticalAxis() const
 {
-return ( m_aAxisStartScreenPosition2D.getX() == 
m_aAxisEndScreenPosition2D.getX() );
+// check trivial cases:
+if ( m_aAxisStartScreenPosition2D.getX() == 
m_aAxisEndScreenPosition2D.getX() )
+return true;
+if ( m_aAxisStartScreenPosition2D.getY() == 
m_aAxisEndScreenPosition2D.getY() )
+return false;
+
+// for skew axes compare angle with vertical vector
+double fInclination = 
std::abs(B2DVector(m_aAxisEndScreenPosition2D-m_aAxisStartScreenPosition2D).angle(B2DVector(0.0,
 -1.0)));
+return fInclination < F_PI4 || fInclination > (F_PI-F_PI4);
 }
-
 //static
 sal_Int32 TickFactory2D::getTickScreenDistance( TickIter& rIter )
 {
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx 
b/chart2/source/view/axes/VCartesianAxis.cxx
index 3ff5cd913cfb..89bd3536d2ce 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -105,25 +105,13 @@ Reference< drawing::XShape > createSingleLabel(
 
 bool lcl_doesShapeOverlapWithTickmark( const Reference< drawing::XShape >& 
xShape
, double fRotationAngleDegree
-   , const basegfx::B2DVector& rTickScreenPosition
-   , bool bIsHorizontalAxis, bool bIsVerticalAxis )
+   , const basegfx::B2DVector& rTickScreenPosition )
 {
 if(!xShape.is())
 return false;
 
 ::basegfx::B2IRectangle aShapeRect = 
BaseGFXHelper::makeRectangle(xShape->getPosition(),AbstractShapeFactory::getSizeAfterRotation(
 xShape, fRotationAngleDegree ));
 
-if( bIsVerticalAxis )
-{
-return ( (rTickScreenPosition.getY() >= aShapeRect.getMinY())
-&& (rTickScreenPosition.getY() <= aShapeRect.getMaxY()) );
-}
-if( bIsHorizontalAxis )
-{
-return ( (rTickScreenPosition.getX() >= aShapeRect.getMinX())
-&& (rTickScreenPosition.getX() <= aShapeRect.getMaxX()) );
-}
-
 basegfx::B2IVector aPosition(
 static_cast( rTickScreenPosition.getX() )
 , static_cast( rTickScreenPosition.getY() ) );
@@ -745,8 +733,7 @@ bool VCartesianAxis::createTextShapes(
 
 if( lcl_doesShapeOverlapWithTickmark( 
pLastVisibleNeighbourTickInfo->xTextShape
, rAxisLabelProperties.fRotationAngleDegree
-   , pTickInfo->aTickScreenPosition
-   , bIsHorizontalAxis, bIsVerticalAxis ) )
+   , pTickInfo->aTickScreenPosition ) )
 {
 // This tick overlaps with its neighbor.  Try to stagger (if
 // auto staggering is allowed) to avoid overlapping.
@@ -760,8 +747,7 @@ bool VCartesianAxis::createTextShapes(
 if( !pLastVisibleNeighbourTickInfo ||
 !lcl_doesShapeOverlapWithTickmark( 
pLastVisibleNeighbourTickInfo->xTextShape
 , rAxisLabelProperties.fRotationAngleDegree
-, pTickInfo->aTickScreenPosition
-, bIsHorizontalAxis, bIsVerticalAxis ) )
+, pTickInfo->aTickS

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

2018-01-07 Thread Jochen Nitschke
 chart2/source/view/axes/Tickmarks.cxx  |   21 ++---
 chart2/source/view/axes/VCartesianAxis.cxx |   26 +-
 2 files changed, 23 insertions(+), 24 deletions(-)

New commits:
commit e328b25e634035cf3810061579d33623846173c0
Author: Jochen Nitschke 
Date:   Tue Jun 6 11:19:50 2017 +0200

tdf#108031 Area chart labels not rotated

This fixes recognition of x-axis or y-axis when the coordinate system
is rotated (3D-view). So the labels are rotated correctly.

Change-Id: Iaacfec943f3885c58e99a55585714a79f1d0d9d5
Reviewed-on: https://gerrit.libreoffice.org/38355
Reviewed-by: Jochen Nitschke 
Tested-by: Jochen Nitschke 
(cherry picked from commit 38bf5f69663f64434a3a0a74e02c1a23f876b677)
Reviewed-on: https://gerrit.libreoffice.org/47015
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/chart2/source/view/axes/Tickmarks.cxx 
b/chart2/source/view/axes/Tickmarks.cxx
index 95f967b3b215..3d6d25a044bf 100644
--- a/chart2/source/view/axes/Tickmarks.cxx
+++ b/chart2/source/view/axes/Tickmarks.cxx
@@ -172,13 +172,28 @@ TickFactory2D::~TickFactory2D()
 
 bool TickFactory2D::isHorizontalAxis() const
 {
-return ( m_aAxisStartScreenPosition2D.getY() == 
m_aAxisEndScreenPosition2D.getY() );
+// check trivial cases:
+if ( m_aAxisStartScreenPosition2D.getY() == 
m_aAxisEndScreenPosition2D.getY() )
+return true;
+if ( m_aAxisStartScreenPosition2D.getX() == 
m_aAxisEndScreenPosition2D.getX() )
+return false;
+
+// for skew axes compare angle with horizontal vector
+double fInclination = 
std::abs(B2DVector(m_aAxisEndScreenPosition2D-m_aAxisStartScreenPosition2D).angle(B2DVector(1.0,
 0.0)));
+return fInclination < F_PI4 || fInclination > (F_PI-F_PI4);
 }
 bool TickFactory2D::isVerticalAxis() const
 {
-return ( m_aAxisStartScreenPosition2D.getX() == 
m_aAxisEndScreenPosition2D.getX() );
+// check trivial cases:
+if ( m_aAxisStartScreenPosition2D.getX() == 
m_aAxisEndScreenPosition2D.getX() )
+return true;
+if ( m_aAxisStartScreenPosition2D.getY() == 
m_aAxisEndScreenPosition2D.getY() )
+return false;
+
+// for skew axes compare angle with vertical vector
+double fInclination = 
std::abs(B2DVector(m_aAxisEndScreenPosition2D-m_aAxisStartScreenPosition2D).angle(B2DVector(0.0,
 -1.0)));
+return fInclination < F_PI4 || fInclination > (F_PI-F_PI4);
 }
-
 //static
 sal_Int32 TickFactory2D::getTickScreenDistance( TickIter& rIter )
 {
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx 
b/chart2/source/view/axes/VCartesianAxis.cxx
index c53f890a07a6..9493102a93c4 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -104,25 +104,13 @@ Reference< drawing::XShape > createSingleLabel(
 
 bool lcl_doesShapeOverlapWithTickmark( const Reference< drawing::XShape >& 
xShape
, double fRotationAngleDegree
-   , const basegfx::B2DVector& rTickScreenPosition
-   , bool bIsHorizontalAxis, bool bIsVerticalAxis )
+   , const basegfx::B2DVector& rTickScreenPosition )
 {
 if(!xShape.is())
 return false;
 
 ::basegfx::B2IRectangle aShapeRect = 
BaseGFXHelper::makeRectangle(xShape->getPosition(),AbstractShapeFactory::getSizeAfterRotation(
 xShape, fRotationAngleDegree ));
 
-if( bIsVerticalAxis )
-{
-return ( (rTickScreenPosition.getY() >= aShapeRect.getMinY())
-&& (rTickScreenPosition.getY() <= aShapeRect.getMaxY()) );
-}
-if( bIsHorizontalAxis )
-{
-return ( (rTickScreenPosition.getX() >= aShapeRect.getMinX())
-&& (rTickScreenPosition.getX() <= aShapeRect.getMaxX()) );
-}
-
 basegfx::B2IVector aPosition(
 static_cast( rTickScreenPosition.getX() )
 , static_cast( rTickScreenPosition.getY() ) );
@@ -744,8 +732,7 @@ bool VCartesianAxis::createTextShapes(
 
 if( lcl_doesShapeOverlapWithTickmark( 
pLastVisibleNeighbourTickInfo->xTextShape
, rAxisLabelProperties.fRotationAngleDegree
-   , pTickInfo->aTickScreenPosition
-   , bIsHorizontalAxis, bIsVerticalAxis ) )
+   , pTickInfo->aTickScreenPosition ) )
 {
 // This tick overlaps with its neighbor.  Try to stagger (if
 // auto staggering is allowed) to avoid overlapping.
@@ -759,8 +746,7 @@ bool VCartesianAxis::createTextShapes(
 if( !pLastVisibleNeighbourTickInfo ||
 !lcl_doesShapeOverlapWithTickmark( 
pLastVisibleNeighbourTickInfo->xTextShape
 , rAxisLabelProperties.fRotationAngleDegree
-, pTickInfo->aTickScreenPosition
-, bIsHorizontalAxis, bIsVerticalAxis ) )
+, pTickInfo->aTickS

[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - download.lst external/libebook solenv/flatpak-manifest.in writerperfect/Library_wpftwriter.mk

2018-01-07 Thread David Tardon
 download.lst   
 |4 
 
external/libebook/0001-lrf-compute-color-interpolation-coeff.-correctly.patch.1 
|   25 -
 external/libebook/ExternalProject_libebook.mk  
 |8 -
 external/libebook/UnpackedTarball_libebook.mk  
 |3 
 external/libebook/libebook-msvc.patch.1
 |   46 ++
 external/libebook/ubsan.patch  
 |   11 --
 solenv/flatpak-manifest.in 
 |6 -
 writerperfect/Library_wpftwriter.mk
 |1 
 8 files changed, 57 insertions(+), 47 deletions(-)

New commits:
commit db8062401624efdf5c8de6940fd210f3254a2214
Author: David Tardon 
Date:   Tue Jan 2 13:56:54 2018 +0100

upload libe-book 0.1.3

Change-Id: I8862e7f4d2dcb007295028b9ec7be04e58ebafd3
Reviewed-on: https://gerrit.libreoffice.org/47264
Tested-by: Jenkins 
Reviewed-by: David Tardon 
(cherry picked from commit 86994e1c25bb5a2d0f97d17328457fa6dfd2f288)
Reviewed-on: https://gerrit.libreoffice.org/47483
Reviewed-by: Michael Stahl 
Reviewed-by: Markus Mohrhard 

diff --git a/download.lst b/download.lst
index 945fa24b65a8..8dade701d629 100644
--- a/download.lst
+++ b/download.lst
@@ -31,8 +31,8 @@ export CT2N_SHA256SUM := 
71b238efd2734be9800af07566daea8d6685aeed28db5eb5fa0e645
 export CT2N_TARBALL := 
1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt
 export CURL_SHA256SUM := 
7ce35f207562674e71dbada6891b37e3f043c1e7a82915cb9c2a17ad3a9d659b
 export CURL_TARBALL := curl-7.57.0.tar.gz
-export EBOOK_SHA256SUM := 
b710a57c633205b933015474d0ac0862253d1c52114d535dd09b20939a0d1850
-export EBOOK_TARBALL := libe-book-0.1.2.tar.bz2
+export EBOOK_SHA256SUM := 
7e8d8ff34f27831aca3bc6f9cc532c2f90d2057c778963b884ff3d1e34dfe1f9
+export EBOOK_TARBALL := libe-book-0.1.3.tar.xz
 export EPOXY_SHA256SUM := 
1d8668b0a259c709899e1c4bab62d756d9002d546ce4f59c9665e2fc5f001a64
 export EPOXY_TARBALL := libepoxy-1.3.1.tar.bz2
 export EPM_SHA256SUM := 
b3fc4c5445de6c9a801504a3ea3efb2d4ea9d5a622c9427e716736e7713ddb91
diff --git 
a/external/libebook/0001-lrf-compute-color-interpolation-coeff.-correctly.patch.1
 
b/external/libebook/0001-lrf-compute-color-interpolation-coeff.-correctly.patch.1
deleted file mode 100644
index dba57ac64a67..
--- 
a/external/libebook/0001-lrf-compute-color-interpolation-coeff.-correctly.patch.1
+++ /dev/null
@@ -1,25 +0,0 @@
-From 584c9bcfed7295e5e0a9d5caafb32a5020b74300 Mon Sep 17 00:00:00 2001
-From: David Tardon 
-Date: Mon, 12 Jan 2015 17:10:07 +0100
-Subject: [PATCH] lrf: compute color interpolation coeff. correctly
-

- src/lib/LRFCollector.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/lib/LRFCollector.cpp b/src/lib/LRFCollector.cpp
-index 1c02593..3fbee2e 100644
 a/src/lib/LRFCollector.cpp
-+++ b/src/lib/LRFCollector.cpp
-@@ -50,7 +50,7 @@ const LRFColor combine(const LRFColor &fg, const LRFColor 
&bg)
- {
-   assert(0 == bg.a);
- 
--  const double a = fg.a / 255.0;
-+  const double a = 1 - fg.a / 255.0;
- 
-   const double r = (1 - a) * bg.r + a * fg.r;
-   const double g = (1 - a) * bg.g + a * fg.g;
--- 
-2.1.0
-
diff --git a/external/libebook/ExternalProject_libebook.mk 
b/external/libebook/ExternalProject_libebook.mk
index 476aac285b3a..bac09b699b12 100644
--- a/external/libebook/ExternalProject_libebook.mk
+++ b/external/libebook/ExternalProject_libebook.mk
@@ -18,12 +18,12 @@ $(eval $(call gb_ExternalProject_register_targets,libebook,\
 $(eval $(call gb_ExternalProject_use_externals,libebook,\
boost_headers \
icu \
+   liblangtag \
libxml2 \
revenge \
zlib \
 ))
 
-# TODO: remove the generators/stream empty vars on libe-book update
 $(call gb_ExternalProject_get_state_target,libebook,build) :
$(call gb_ExternalProject_run,build,\
export PKG_CONFIG="" \
@@ -39,11 +39,11 @@ $(call gb_ExternalProject_get_state_target,libebook,build) :
--disable-werror \
--disable-weffc \
CXXFLAGS="$(gb_CXXFLAGS) $(if 
$(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS))" \
-   CPPFLAGS="$(CPPFLAGS) $(ICU_UCHAR_TYPE) 
$(BOOST_CPPFLAGS) \
-   -DBOOST_ERROR_CODE_HEADER_ONLY 
-DBOOST_SYSTEM_NO_DEPRECATED" \
+   CPPFLAGS="$(CPPFLAGS) $(ICU_UCHAR_TYPE) 
$(BOOST_CPPFLAGS)" \
+   LANGTAG_CFLAGS="$(LIBLANGTAG_CFLAGS)" \
+   LANGTAG_LIBS="$(LIBLANGTAG_LIBS)" \
XML_CFLAGS="$(LIBXML_CFLAGS)" \
XML_LIBS="$(LIBXML_LIBS)" \
-   REVENGE_GENERATORS_CFLAGS=' ' REVENGE_GENERATORS_LIBS=' 
' REVENGE_STREAM_CFLAGS=' ' REVE

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

2018-01-07 Thread Michael Meeks
 package/source/zipapi/XUnbufferedStream.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 0435aa08f4f6504dee6065ea6e4a55fbb07b8f77
Author: Michael Meeks 
Date:   Fri Jan 5 12:18:18 2018 +

tdf#114819 - include the synthetic encrpytion header into the size.

Change-Id: I090347046725a1ebb7a36f465654c29f7443d20d
Reviewed-on: https://gerrit.libreoffice.org/47467
Tested-by: Jenkins 
Reviewed-by: Michael Meeks 
(cherry picked from commit dc885c071b71e6f6f76bedaecf7f0b1a81dd1d57)
Reviewed-on: https://gerrit.libreoffice.org/47499
Reviewed-by: jan iversen 
Tested-by: Markus Mohrhard 
Reviewed-by: Markus Mohrhard 

diff --git a/package/source/zipapi/XUnbufferedStream.cxx 
b/package/source/zipapi/XUnbufferedStream.cxx
index 1e219b698871..162bab6d7580 100644
--- a/package/source/zipapi/XUnbufferedStream.cxx
+++ b/package/source/zipapi/XUnbufferedStream.cxx
@@ -102,6 +102,7 @@ XUnbufferedStream::XUnbufferedStream(
 sal_Int8 * pHeader = maHeader.getArray();
 ZipFile::StaticFillHeader( rData, rEntry.nSize, aMediaType, pHeader );
 mnHeaderToRead = static_cast < sal_Int16 > ( maHeader.getLength() );
+mnZipSize += mnHeaderToRead;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Caolán McNamara
 vcl/source/filter/wmf/enhwmf.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d3789ea2fb2981d82447418dd5e2e5c7f7cec4d1
Author: Caolán McNamara 
Date:   Sat Jan 6 20:26:40 2018 +

ofz#4980 bail early with 0 points

even if start is 1 of 0

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

diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 22125d747dbe..438fd7af5949 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -513,7 +513,7 @@ tools::Polygon EnhWMFReader::ReadPolygon(sal_uInt32 
nStartIndex, sal_uInt32 nPoi
 {
 bool bRecordOk = nPoints <= SAL_MAX_UINT16;
 SAL_WARN_IF(!bRecordOk, "vcl.emf", "polygon record has more polygons than 
we can handle");
-if (!bRecordOk)
+if (!bRecordOk || !nPoints)
 return tools::Polygon();
 
 tools::Polygon aPolygon(nPoints);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Markus Mohrhard
 svtools/source/uitest/uiobject.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 5055134598ea29e687ce86c3252bedded24f8c3a
Author: Markus Mohrhard 
Date:   Sun Jan 7 13:46:43 2018 +0100

uitest: support selecting and deselecting of tree list entries

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

diff --git a/svtools/source/uitest/uiobject.cxx 
b/svtools/source/uitest/uiobject.cxx
index b8fb2fc5fdc7..327f107f5f66 100644
--- a/svtools/source/uitest/uiobject.cxx
+++ b/svtools/source/uitest/uiobject.cxx
@@ -117,6 +117,14 @@ void TreeListEntryUIObject::execute(const OUString& 
rAction, const StringMap& /*
 {
 mxTreeList->Expand(mpEntry);
 }
+else if (rAction == "SELECT")
+{
+mxTreeList->Select(mpEntry);
+}
+else if (rAction == "DESELECT")
+{
+mxTreeList->Select(mpEntry, false);
+}
 else if (rAction == "CLICK")
 {
 if (!isCheckBoxList(mxTreeList))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re[2]: Bug 83260

2018-01-07 Thread Yemelyanenko Fyodor
I gone deeper in this issue, and it not depends on Track changes Show/Hide.
Undo has RedlinesGuard, which sets show/hide to value, that been when Undo 
action created. So Undo works fine and I not going to purge Undo stack.

I think the problem is created by sw::DocumentRedlineManager::CompressRedlines 
(https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/DocumentRedlineManager.cxx#1792).
 As name states it compress redlines (merges two neighbor redlines if they have 
same author, type, second redline starts where first ends 
second.mark==first.point and so on). During compression it modifies indexes and 
Undo crushes LO.

Now I’m investigating CompresRedlines further. I think it can be changed so it 
merges only two neighbor redlines in the same node and not merge cross-node. Or 
maybe it should be completely removed, as it only merges redlines if they’ve 
been created in the same minute! 
(https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/docredln.cxx#946)
So chances that two redlines will be merged are very low.


-- Исходное сообщение --
От: "Miklos Vajna" mailto:vmik...@collabora.co.uk>>
Кому: 
libreoffice@lists.freedesktop.org
Отправлено: 05.01.2018 18:35:12
Тема: Re: Bug 83260

Hi,

On Thu, Jan 04, 2018 at 09:45:14AM +0800, "Matthew J. Francis" 
mailto:mjay.fran...@gmail.com>> wrote:
 I use tracked changes on a regular basis, and would much rather this be
 treated as "maybe difficult but important to get right" than "too hard, so
 don't bother"

Perhaps a middle ground is to give up undo/redo only for the subset when
we know we would crash anyway? And sure, if somebody has the
time/motivation to look at the root cause of the crash (currently I
don't), that's even better.

Regards,

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


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

2018-01-07 Thread Tamás Zolnai
 sw/source/core/crsr/crsrsh.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 0b8713ea0c0290ed2a4d711f44bf9a19b214bb62
Author: Tamás Zolnai 
Date:   Sat Jan 6 20:56:04 2018 +0100

tdf#114872: Broken selection from other user

For desktop LO cursor update is restricted to the active
view, but for LO online the users's selection is shown also
from other views.

Change-Id: Ia9bc8854ee570a9a22c183bf27f941ecf0b8e4d9
Reviewed-on: https://gerrit.libreoffice.org/47520
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 

diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 48d2aabaa3ed..bffde7e0a90e 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1829,7 +1829,10 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, 
bool bIdleEnd )
 if( m_pBlockCursor )
 RefreshBlockCursor();
 
-if( !bIdleEnd && m_bHasFocus && !m_bBasicHideCursor )
+// We should not restrict cursor update to the active view when using LOK
+bool bCheckFocus = m_bHasFocus || comphelper::LibreOfficeKit::isActive();
+
+if( !bIdleEnd && bCheckFocus && !m_bBasicHideCursor )
 {
 if( m_pTableCursor )
 m_pTableCursor->SwSelPaintRects::Show();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 5 commits - basic/Library_sb.mk ios/CustomTarget_iOS_prelink.mk svx/source sw/source vcl/source

2018-01-07 Thread jan Iversen
 basic/Library_sb.mk |2 +-
 ios/CustomTarget_iOS_prelink.mk |   30 +++---
 svx/source/svdraw/svdomedia.cxx |   10 ++
 svx/source/unodraw/unoshap4.cxx |   30 ++
 sw/source/uibase/app/swmodule.cxx   |2 ++
 vcl/source/opengl/OpenGLContext.cxx |4 
 6 files changed, 74 insertions(+), 4 deletions(-)

New commits:
commit 54cd9ab0e1051f78a5d23bfbeeaf400abfccafcc
Author: jan Iversen 
Date:   Sun Jan 7 14:17:00 2018 +0100

iOS, first step towards use of .dylib

.dylib will shorten the swift link time with factors.

Change-Id: Icfbc649f058988580005fe66eb8c03d7b242fe2d

diff --git a/ios/CustomTarget_iOS_prelink.mk b/ios/CustomTarget_iOS_prelink.mk
index 1d1e54f703a2..4ced2da31977 100644
--- a/ios/CustomTarget_iOS_prelink.mk
+++ b/ios/CustomTarget_iOS_prelink.mk
@@ -1,4 +1,4 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#  -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
 #
 # This file is part of the LibreOffice project.
 #
@@ -10,7 +10,7 @@ IOSLD = 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoo
 IOSOBJ = $(WORKDIR)/CObject/ios/Kit.o
 
 ifeq ($(ENABLE_DEBUG),TRUE)
-IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME)_debug.a
+IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME)_debug.dylib
 else
 IOSKIT = $(SRCDIR)/ios/generated/libKit_$(CPUNAME).a
 endif
@@ -28,7 +28,30 @@ $(call gb_CustomTarget_get_target,ios/iOS_prelink): $(IOSKIT)
 .PHONY: FORCE
 FORCE:
 
-$(IOSKIT): $(call gb_StaticLibrary_get_target,iOS_kitBridge) FORCE
+
+$(IOSKIT): $(IOSOBJ)
+   $(SRCDIR)/bin/lo-all-static-libs > $(SRCDIR)/ios/generated/lib.list
+ifeq ($(ENABLE_DEBUG),TRUE)
+   $(IOSLD) -dylib -ios_version_min $(IOS_DEPLOYMENT_VERSION) \
+   -syslibroot $(MACOSX_SDK_PATH) \
+   -arch `echo $(CPUNAME) |  tr '[:upper:]' '[:lower:]'` \
+   -framework CoreFoundation \
+   -framework CoreGraphics \
+   -framework CoreText \
+   -lc++ \
+   -lobjc \
+   -lz \
+   -liconv \
+   -lpthread \
+   -objc_abi_version 2 \
+   -rpath  @executable_path/Frameworks \
+   -rpath  @loader_path/Frameworks \
+   -export_dynamic \
+   -no_deduplicate \
+   $(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \
+   `$(SRCDIR)/bin/lo-all-static-libs` \
+   -o $(IOSKIT)
+else
$(IOSLD) -r -ios_version_min 11.2 \
-syslibroot $(MACOSX_SDK_PATH) \
-arch `echo $(CPUNAME) |  tr '[:upper:]' '[:lower:]'` \
@@ -36,6 +59,7 @@ $(IOSKIT): $(call gb_StaticLibrary_get_target,iOS_kitBridge) 
FORCE
$(WORKDIR)/CObject/ios/source/LibreOfficeKit.o \
`$(SRCDIR)/bin/lo-all-static-libs`
$(AR) -r $(IOSKIT) $(IOSOBJ)
+endif
 
 
 
commit 1807d095b48889ce2b3a88d807124e51a38c73c2
Author: jan Iversen 
Date:   Sun Jan 7 14:16:06 2018 +0100

vcl, added checks for HAVE_FEATURE_OPENGL

missing HAVE_FEATURE_OPENGL caused link errors

Change-Id: I1c44f9c9f729f351b6acf17ae60cd855b69394db

diff --git a/vcl/source/opengl/OpenGLContext.cxx 
b/vcl/source/opengl/OpenGLContext.cxx
index 958c59925db2..886c8fbe80d3 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -32,6 +32,8 @@
 
 #include 
 
+#include 
+
 using namespace com::sun::star;
 
 #define MAX_FRAMEBUFFER_COUNT 30
@@ -505,8 +507,10 @@ rtl::Reference 
OpenGLContext::getVCLContext(bool bMakeIfNecessary
 if (pDefWindow)
 {
 // create our magic fallback window context.
+#if HAVE_FEATURE_OPENGL
 xContext = pDefWindow->GetGraphics()->GetOpenGLContext();
 assert(xContext.is());
+#endif
 }
 else
 xContext = pContext;
commit 54982d5fea21d9e81e1561a74fd341ddb0570c91
Author: jan Iversen 
Date:   Sun Jan 7 13:16:25 2018 +0100

svx, check HAVE_FEATURE_AVMEDIA

unoshap4.cxx did not obey HAVE_FEATURE_AVMEDIA.

Change-Id: Id41cddd0a74c43819adc0b64c0dd84ae9d4f54ed

diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index 974cf3b56300..bece1c68cece 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -308,8 +308,10 @@ void 
SdrMediaObj::SetInputStream(uno::Reference const& xStream
 if (bSuccess)
 {
 m_xImpl->m_pTempFile.reset(new MediaTempFile(tempFileURL));
+#if HAVE_FEATURE_AVMEDIA
 m_xImpl->m_MediaProperties.setURL(
 m_xImpl->m_LastFailedPkgURL, tempFileURL, "");
+#endif
 }
 m_xImpl->m_LastFailedPkgURL.clear(); // once only
 }
@@ -378,12 +380,16 @@ void SdrMediaObj::mediaPropertiesChanged( const 
::avmedia::MediaItem& rNewProper
 {
 m_xImpl->m_pTempFile.reset(
 new MediaTempFile(tempFileURL));
+#if HAVE_FEATURE_AVMEDIA
 m_xImpl->m_MediaProperties.setURL(url, tem

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

2018-01-07 Thread Julien Nabet
 connectivity/source/drivers/odbc/OResultSet.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1572c3bde7fd30fc2e019ec3d7c6c629343b18e9
Author: Julien Nabet 
Date:   Sat Jan 6 21:20:02 2018 +0100

tdf#114495 ODBC: clear row status buffer *before* we throw away the 
statement

Change-Id: I898e9d0e3e2cf1ed41489231d1cd761171bfcea4
Reviewed-on: https://gerrit.libreoffice.org/47514
(cherry picked from commit 964cc98794941dbf7dccce526c4fa88c16b3a26c)
Reviewed-on: https://gerrit.libreoffice.org/47525
Reviewed-by: Lionel Elie Mamane 
Tested-by: Jenkins 

diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx 
b/connectivity/source/drivers/odbc/OResultSet.cxx
index 8c8ccc7e28fb..40ca6d72c237 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -164,7 +164,6 @@ OResultSet::OResultSet(SQLHANDLE _pStatementHandle 
,OStatement_Base* pStmt) :
 
 OResultSet::~OResultSet()
 {
-setStmtOption(SQL_ATTR_ROW_STATUS_PTR, 
nullptr);
 }
 
 void OResultSet::construct()
@@ -182,6 +181,7 @@ void OResultSet::disposing()
 ::osl::MutexGuard aGuard(m_aMutex);
 releaseBuffer();
 
+setStmtOption(SQL_ATTR_ROW_STATUS_PTR, 
nullptr);
 m_xStatement.clear();
 m_xMetaData.clear();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-07 Thread Szymon Kłos
 editeng/qa/unit/core-test.cxx |   92 ++
 1 file changed, 92 insertions(+)

New commits:
commit 2bd27176356c1c670fde1a59d3ffafd10ad0e4ee
Author: Szymon Kłos 
Date:   Wed Jan 3 11:25:23 2018 +0100

tdf#114628 unit test for line spacing

* two cases 60% and 150% line spacing

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

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index c23e94a0f60f..6f527440fcca 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -30,6 +31,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 
@@ -48,6 +51,9 @@ public:
 virtual void setUp() override;
 virtual void tearDown() override;
 
+/// Test text portions position when percentage line spacing is set
+void testLineSpacing();
+
 void testConstruction();
 
 /// Test UNO service class that implements text field items.
@@ -94,6 +100,7 @@ public:
 DECL_STATIC_LINK( Test, CalcFieldValueHdl, EditFieldInfo*, void );
 
 CPPUNIT_TEST_SUITE(Test);
+CPPUNIT_TEST(testLineSpacing);
 CPPUNIT_TEST(testConstruction);
 CPPUNIT_TEST(testUnoTextFields);
 CPPUNIT_TEST(testAutocorrect);
@@ -133,6 +140,91 @@ void Test::tearDown()
 test::BootstrapFixture::tearDown();
 }
 
+void Test::testLineSpacing()
+{
+// Create EditEngine's instance
+EditEngine aEditEngine(mpItemPool);
+
+if(aEditEngine.GetRefDevice()->GetDPIY() != 96
+|| aEditEngine.GetRefDevice()->GetDPIScaleFactor() != 1.0)
+return;
+
+// Get EditDoc for current EditEngine's instance
+EditDoc &rDoc = aEditEngine.GetEditDoc();
+
+// Initially no text should be there
+CPPUNIT_ASSERT_EQUAL(sal_uLong(0), rDoc.GetTextLen());
+CPPUNIT_ASSERT_EQUAL(OUString(), rDoc.GetParaAsString(sal_Int32(0)));
+
+// Set initial text
+OUString aText = "This is multi-line paragraph";
+
+sal_Int32 aTextLen = aText.getLength();
+aEditEngine.SetText(aText);
+
+// Assert changes - text insertion
+CPPUNIT_ASSERT_EQUAL(sal_uLong(aTextLen), rDoc.GetTextLen());
+CPPUNIT_ASSERT_EQUAL(aText, rDoc.GetParaAsString(sal_Int32(0)));
+
+// Get ItemSet for line spacing - 60%
+std::unique_ptr pSet(new 
SfxItemSet(aEditEngine.GetEmptyItemSet()));
+SvxLineSpacingItem aLineSpacing(LINE_SPACE_DEFAULT_HEIGHT, EE_PARA_SBL);
+aLineSpacing.SetPropLineSpace(60);
+pSet->Put(aLineSpacing);
+
+// Set font
+SvxFontItem aFont(EE_CHAR_FONTINFO);
+aFont.SetFamilyName("Liberation Sans");
+pSet->Put(aFont);
+SvxFontHeightItem aFontSize(240, 100, EE_CHAR_FONTHEIGHT);
+pSet->Put(aFontSize);
+
+CPPUNIT_ASSERT_EQUAL(static_cast(3), pSet->Count());
+
+// Select all paragraphs and set spacing
+ESelection aSelection(0, 0, 0, aTextLen);
+aEditEngine.QuickSetAttribs(*pSet, aSelection);
+
+// Force multiple lines
+aEditEngine.SetPaperSize(Size(1000, 6000));
+CPPUNIT_ASSERT_EQUAL((sal_Int32)4, aEditEngine.GetLineCount(0));
+
+// Assert changes
+ParaPortion* pParaPortion = aEditEngine.GetParaPortions()[0];
+ContentNode* const pNode = pParaPortion->GetNode();
+const SvxLineSpacingItem& rLSItem = 
pNode->GetContentAttribs().GetItem(EE_PARA_SBL);
+CPPUNIT_ASSERT_EQUAL(SvxInterLineSpaceRule::Prop, 
rLSItem.GetInterLineSpaceRule());
+CPPUNIT_ASSERT_EQUAL((sal_uInt16)60, rLSItem.GetPropLineSpace());
+
+// Check the first line
+ParagraphInfos aInfo = aEditEngine.GetParagraphInfos(0);
+CPPUNIT_ASSERT_EQUAL((sal_uInt16)122, aInfo.nFirstLineMaxAscent);
+CPPUNIT_ASSERT_EQUAL((sal_uInt16)153, 
(sal_uInt16)aEditEngine.GetLineHeight(0));
+
+// Prepare second case - 150%
+std::unique_ptr pSet2(new 
SfxItemSet(aEditEngine.GetEmptyItemSet()));
+SvxLineSpacingItem aLineSpacing2(LINE_SPACE_DEFAULT_HEIGHT, EE_PARA_SBL);
+aLineSpacing2.SetPropLineSpace(150);
+pSet2->Put(aLineSpacing2);
+pSet2->Put(aFont);
+pSet2->Put(aFontSize);
+
+CPPUNIT_ASSERT_EQUAL(static_cast(3), pSet2->Count());
+
+// Select all paragraphs and set spacing
+aEditEngine.QuickSetAttribs(*pSet2, aSelection);
+
+// Assert changes
+const SvxLineSpacingItem& rLSItem2 = 
pNode->GetContentAttribs().GetItem(EE_PARA_SBL);
+CPPUNIT_ASSERT_EQUAL(SvxInterLineSpaceRule::Prop, 
rLSItem2.GetInterLineSpaceRule());
+CPPUNIT_ASSERT_EQUAL((sal_uInt16)150, rLSItem2.GetPropLineSpace());
+
+// Check the first line
+ParagraphInfos aInfo2 = aEditEngine.GetParagraphInfos(0);
+CPPUNIT_ASSERT_EQUAL((sal_uInt16)269, aInfo2.nFirstLineMaxAscent);
+CPPUNIT_ASSERT_EQUAL((sal_uInt16)382, 
(sal_uInt16)aEditEngine.GetLineHeight(0));
+}
+
 void Test::testConstruction()
 {
 EditEngine aEngine(mpItemPoo

[Libreoffice-commits] core.git: include/test include/tools test/Library_test.mk test/source tools/source

2018-01-07 Thread Tomaž Vajngerl
 include/test/mtfxmldump.hxx |6 -
 include/test/primitive2dxmldump.hxx |7 --
 include/test/xmlwriter.hxx  |   49 ---
 include/tools/XmlWriter.hxx |2 
 test/Library_test.mk|1 
 test/source/mtfxmldump.cxx  |   18 ++---
 test/source/primitive2dxmldump.cxx  |7 --
 test/source/xmlwriter.cxx   |  117 
 tools/source/xml/XmlWriter.cxx  |6 +
 9 files changed, 26 insertions(+), 187 deletions(-)

New commits:
commit e1fb3d95ac6d58b60448981e82d90621cad7fea5
Author: Tomaž Vajngerl 
Date:   Sun Jan 7 12:05:53 2018 +0900

Remove XmlWriter in test module and use tools::XmlWriter

Change-Id: I0a0e07a6a71ed95d783d35b7d94b857074ec3450
Reviewed-on: https://gerrit.libreoffice.org/47523
Tested-by: Jenkins 
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/test/mtfxmldump.hxx b/include/test/mtfxmldump.hxx
index 38087d6f8f3a..b55de95258db 100644
--- a/include/test/mtfxmldump.hxx
+++ b/include/test/mtfxmldump.hxx
@@ -12,20 +12,20 @@
 
 #include 
 #include 
-
 #include 
 #include 
 #include 
 #include 
 
-class XmlWriter;
+namespace tools { class XmlWriter; }
+
 enum class MetaActionType;
 
 class OOO_DLLPUBLIC_TEST MetafileXmlDump final
 {
 o3tl::enumarray maFilter;
 
-void writeXml(const GDIMetaFile& rMetaFile, XmlWriter& rWriter);
+void writeXml(const GDIMetaFile& rMetaFile, tools::XmlWriter& rWriter);
 
 public:
 MetafileXmlDump();
diff --git a/include/test/primitive2dxmldump.hxx 
b/include/test/primitive2dxmldump.hxx
index 80ef271ee720..5acf6ecd 100644
--- a/include/test/primitive2dxmldump.hxx
+++ b/include/test/primitive2dxmldump.hxx
@@ -12,18 +12,17 @@
 
 #include 
 #include 
-#include 
-
 #include 
 #include 
-
 #include 
 
+namespace tools { class XmlWriter; }
+
 class OOO_DLLPUBLIC_TEST Primitive2dXmlDump final
 {
 private:
 std::vector maFilter;
-void decomposeAndWrite(const 
drawinglayer::primitive2d::Primitive2DContainer& rPrimitive2DSequence, 
XmlWriter& rWriter);
+void decomposeAndWrite(const 
drawinglayer::primitive2d::Primitive2DContainer& rPrimitive2DSequence, 
tools::XmlWriter& rWriter);
 
 public:
 Primitive2dXmlDump();
diff --git a/include/test/xmlwriter.hxx b/include/test/xmlwriter.hxx
deleted file mode 100644
index 96a5314d8d48..
--- a/include/test/xmlwriter.hxx
+++ /dev/null
@@ -1,49 +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/.
- */
-
-#ifndef INCLUDED_TEST_XMLWRITER_HXX
-#define INCLUDED_TEST_XMLWRITER_HXX
-
-#include 
-
-#include 
-#include 
-#include 
-
-class SvStream;
-
-class OOO_DLLPUBLIC_TEST XmlWriter final
-{
-private:
-SvStream* mpStream;
-xmlTextWriterPtr mpWriter;
-
-public:
-XmlWriter(SvStream* pStream);
-~XmlWriter();
-
-void startDocument();
-void endDocument();
-
-void element(const OString& sTagName);
-
-void startElement(const OString& sTagName);
-void endElement();
-
-void attribute(const OString& sTagName, const OString& aValue);
-void attribute(const OString& sTagName, const OUString& aValue);
-void attribute(const OString& sTagName, sal_Int32 aNumber);
-
-void content(const OString& aValue);
-void content(const OUString& aValue);
-};
-
-#endif // INCLUDED_TEST_XMLWRITER_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/tools/XmlWriter.hxx b/include/tools/XmlWriter.hxx
index 15a3a0013912..8224df417f1b 100644
--- a/include/tools/XmlWriter.hxx
+++ b/include/tools/XmlWriter.hxx
@@ -49,6 +49,8 @@ public:
 
 void content(const OString& sValue);
 void content(const OUString& sValue);
+
+void element(const OString& sName);
 };
 
 } // end tools namespace
diff --git a/test/Library_test.mk b/test/Library_test.mk
index 957ffc0d97e0..c3fcdd020f1b 100644
--- a/test/Library_test.mk
+++ b/test/Library_test.mk
@@ -45,7 +45,6 @@ $(eval $(call gb_Library_add_exception_objects,test,\
 test/source/xmltesttools \
 test/source/htmltesttools \
 test/source/mtfxmldump \
-test/source/xmlwriter \
 test/source/primitive2dxmldump \
 test/source/screenshot_test \
 ))
diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx
index 5cb4402ee4d8..cd21df3ff71e 100644
--- a/test/source/mtfxmldump.cxx
+++ b/test/source/mtfxmldump.cxx
@@ -9,7 +9,7 @@
 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 #include 
@@ -350,31 +350,31 @@ OUString hex32(sal_uInt32 nNumber)
 return OUString::createFromAscii(ss.str().c_str());
 }
 
-void writePoint(XmlWriter& rWriter, Point const& rPoint)
+void writePoint(tools::XmlWriter& rWriter, Point const& rPoint)
 {
 rWriter.attribute("x",

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

2018-01-07 Thread Lionel Elie Mamane
 connectivity/source/inc/java/sql/Connection.hxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 27da558d7c1fe45b58d0bcc28b961fabbc5f2f1a
Author: Lionel Elie Mamane 
Date:   Sun Jan 7 07:53:05 2018 +0100

fixup tdf#104986 move named parameters substitution into generic layer

remove now unused class member

Change-Id: I30ffcf60833580a5f0029fa4efef80507d7918df
Reviewed-on: https://gerrit.libreoffice.org/47524
Reviewed-by: Lionel Elie Mamane 
Tested-by: Jenkins 

diff --git a/connectivity/source/inc/java/sql/Connection.hxx 
b/connectivity/source/inc/java/sql/Connection.hxx
index 117d502b2c5e..bab9329dfb1c 100644
--- a/connectivity/source/inc/java/sql/Connection.hxx
+++ b/connectivity/source/inc/java/sql/Connection.hxx
@@ -52,7 +52,6 @@ namespace connectivity
 jclass  m_Driver_theClass;
 java::sql::ConnectionLog
 m_aLogger;
-boolm_bParameterSubstitution;
 boolm_bIgnoreDriverPrivileges;
 boolm_bIgnoreCurrency;
 css::uno::Any   m_aCatalogRestriction;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits