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

2019-02-01 Thread Libreoffice Gerrit user
 filter/source/graphicfilter/itiff/itiff.cxx |8 
 vcl/source/filter/jpeg/jpegc.cxx|4 +++-
 2 files changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 28570ba820fb1d5ef30d3f7d3420f6c8136dba56
Author: Caolán McNamara 
AuthorDate: Fri Feb 1 20:46:44 2019 +
Commit: Caolán McNamara 
CommitDate: Sat Feb 2 08:48:19 2019 +0100

ofz#12812 tiff Timeout

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

diff --git a/filter/source/graphicfilter/itiff/itiff.cxx 
b/filter/source/graphicfilter/itiff/itiff.cxx
index 4e121351530d..85dc9d297265 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -1593,6 +1594,13 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & 
rGraphic )
 }
 }
 
+if (bStatus)
+{
+sal_Int32 nResult = 0;
+if (utl::ConfigManager::IsFuzzing() && 
(o3tl::checked_multiply(nImageWidth, nImageLength, nResult) || nResult > 
400))
+bStatus = false;
+}
+
 if ( bStatus )
 {
 maBitmapPixelSize = Size(nImageWidth, nImageLength);
commit 4aac7bc92ab91dadab6ad0bd3324494fbaa84625
Author: Caolán McNamara 
AuthorDate: Thu Jan 31 19:54:42 2019 +
Commit: Caolán McNamara 
CommitDate: Sat Feb 2 08:48:07 2019 +0100

ofz#11203 fuzzing timeout

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

diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index 7c1192eda24b..f6e18a59461c 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -216,7 +217,8 @@ static void ReadJPEG(JpegStuff& rContext, JPEGReader* 
pJPEGReader, void* pInputS
 long nWidth = rContext.cinfo.output_width;
 long nHeight = rContext.cinfo.output_height;
 
-if (nWidth > 2000 && nHeight > 2000 && utl::ConfigManager::IsFuzzing())
+long nResult = 0;
+if (utl::ConfigManager::IsFuzzing() && (o3tl::checked_multiply(nWidth, 
nHeight, nResult) || nResult > 400))
 return;
 
 bool bGray = (rContext.cinfo.output_components == 1);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-02-01 Thread Libreoffice Gerrit user
 include/oox/export/drawingml.hxx |   13 +++--
 oox/source/export/drawingml.cxx  |2 +-
 sw/source/filter/ww8/docxattributeoutput.cxx |2 +-
 sw/source/filter/ww8/docxsdrexport.cxx   |2 +-
 tools/source/generic/gen.cxx |   11 +++
 5 files changed, 13 insertions(+), 17 deletions(-)

New commits:
commit d938920433ed28897f41a2dde89ba296ce89bfd5
Author: Miklos Vajna 
AuthorDate: Fri Feb 1 23:44:38 2019 +0100
Commit: Miklos Vajna 
CommitDate: Sat Feb 2 08:33:46 2019 +0100

oox: OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY() can be a template

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

diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 24adf475be16..fbcc25fb3db1 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -42,12 +42,6 @@
 #include 
 #include 
 
-#ifndef OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY
-// Our rotation is counter-clockwise and is in 100ths of a degree.
-// drawingML rotation is clockwise and is in 6ths of a degree.
-#define OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY(input) 
((2160-input*600)%2160)
-#endif
-
 class Graphic;
 class SdrObjCustomShape;
 
@@ -102,6 +96,13 @@ namespace core {
 
 namespace drawingml {
 
+// Our rotation is counter-clockwise and is in 100ths of a degree.
+// drawingML rotation is clockwise and is in 6ths of a degree.
+template  T ExportRotateClockwisify(T input)
+{
+return ((2160 - input * 600) % 2160);
+}
+
 /// Interface to be implemented by the parent exporter that knows how to 
handle shape text.
 class OOX_DLLPUBLIC DMLTextExport
 {
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index cbc39f946a00..91961155294a 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1493,7 +1493,7 @@ void DrawingML::WriteShapeTransformation( const 
Reference< XShape >& rXShape, sa
 nRotation = nRotation * -1 + 36000;
 
 WriteTransformation(tools::Rectangle(Point(aPos.X, aPos.Y), 
Size(aSize.Width, aSize.Height)), nXmlNamespace,
-bFlipHWrite, bFlipVWrite, 
OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY(nRotation), IsGroupShape( rXShape ));
+bFlipHWrite, bFlipVWrite, ExportRotateClockwisify(nRotation), 
IsGroupShape( rXShape ));
 }
 
 void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, 
bool bIsField, sal_Int32 nElement, bool bCheckDirect,
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 05e5807995a2..46dc2ebfb07c 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4775,7 +4775,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const 
SwGrfNode* pGrfNode, const Size
 if (sal_uInt32 nRot = rSet.Get(RES_GRFATR_ROTATION).GetValue())
 {
 // RES_GRFATR_ROTATION is in 10ths of degree; convert to 100ths 
for macro
-sal_uInt32 mOOXMLRot = 
OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY(nRot*10);
+sal_uInt32 mOOXMLRot = 
oox::drawingml::ExportRotateClockwisify(nRot*10);
 xFrameAttributes->add(XML_rot, OString::number(mOOXMLRot));
 aSize = pGrfNode->GetTwipSize();
 }
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx 
b/sw/source/filter/ww8/docxsdrexport.cxx
index 55b159bbae70..6484fbef9883 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -1588,7 +1588,7 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* 
pParentFrame, int nAncho
 }
 aRotation >>= m_pImpl->getDMLandVMLTextFrameRotation();
 OString sRotation(OString::number(
-
(OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY(m_pImpl->getDMLandVMLTextFrameRotation();
+
oox::drawingml::ExportRotateClockwisify(m_pImpl->getDMLandVMLTextFrameRotation(;
 // Shape properties
 pFS->startElementNS(XML_wps, XML_spPr, FSEND);
 if (m_pImpl->getDMLandVMLTextFrameRotation())
commit 59886618cf8db7842ad4724a56f0f92436d0b3bd
Author: Miklos Vajna 
AuthorDate: Fri Feb 1 23:31:18 2019 +0100
Commit: Miklos Vajna 
CommitDate: Sat Feb 2 08:33:37 2019 +0100

tools: use std::swap() in Rectangle::Justify()

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

diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index 16b81b6ee56f..3593801579ac 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -19,6 +19,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -145,20 +146,14 @@ tools::Rectangle& tools::Rectangle::Intersection( const 
tools::Rectangle& rRec

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

2019-02-01 Thread Libreoffice Gerrit user
 offapi/com/sun/star/awt/Gradient.idl |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 6205aad7f7b01f186af2b6c31b1519ef118f5a43
Author: Miklos Vajna 
AuthorDate: Fri Feb 1 23:50:23 2019 +0100
Commit: Miklos Vajna 
CommitDate: Sat Feb 2 08:33:55 2019 +0100

offapi: XOffset means center for awt::GradientStyle_RADIAL as well

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

diff --git a/offapi/com/sun/star/awt/Gradient.idl 
b/offapi/com/sun/star/awt/Gradient.idl
index f0d479a29e85..caa722a226e8 100644
--- a/offapi/com/sun/star/awt/Gradient.idl
+++ b/offapi/com/sun/star/awt/Gradient.idl
@@ -60,9 +60,9 @@ published struct Gradient
 short Border;
 
 
-/** Specifies the X-coordinate, where the gradient begins,
- *  whatever that means. Possibly means the *center* of the
- *  ELLIPTICAL, SQUARE and RECT style gradients?
+/** Specifies the X-coordinate, where the gradient begins.
+ *  This is effectively the center of the RADIAL, ELLIPTICAL, SQUARE and
+ *  RECT style gradients.
  */
 short XOffset;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-02-01 Thread Libreoffice Gerrit user
 dbaccess/source/filter/hsqldb/parseschema.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit b35a64be6025b59e88231a4dc0f025273adb63c5
Author: Julien Nabet 
AuthorDate: Fri Feb 1 21:11:49 2019 +0100
Commit: Julien Nabet 
CommitDate: Sat Feb 2 07:50:59 2019 +0100

tdf#123020: migration to Firebird fix tablename for indexes

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

diff --git a/dbaccess/source/filter/hsqldb/parseschema.cxx 
b/dbaccess/source/filter/hsqldb/parseschema.cxx
index e04998c80f28..89796e3c06ee 100644
--- a/dbaccess/source/filter/hsqldb/parseschema.cxx
+++ b/dbaccess/source/filter/hsqldb/parseschema.cxx
@@ -74,8 +74,9 @@ public:
 
 OUString getTableName() const
 {
-// SET TABLE 
-return string::split(m_sql, u' ')[2];
+// SET TABLE "" INDEX'...
+// 9 corresponds to nb chars in "SET TABLE"
+return m_sql.copy(m_sql.indexOf("\""), m_sql.lastIndexOf("\"") - 9);
 }
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: WIP migration towards Firebird 3.0.4, cannot find -ltommath

2019-02-01 Thread Julien Nabet

On 01/02/2019 22:48, Terrence Enger wrote:

On Thu, 2019-01-31 at 13:09 -0700, julien2412 wrote:

Hello,

I'm giving a try to migrate Firebird

from 3.0.0 towards 3.0.4

 From what I read, Firebird 4.0 is going to make it easy to handle
dates more like HSQLDB does.

4.0 is still pre-release, and I have not seen a projected date
for release.  Is it a good idea to move to 4.0?


Hello Terrence,

Given the facts that:

- Firebird is now a no more experimental feature in LO

- the number of bugs concerning Firebird in LO bugtrackers

- the lack of Base resources in LO

- the number of LO patches to build Firebird (+ you must take into 
account the different platforms)


- the 4.0 version of Firebird is still beta or even if we wait for the 
stable release, would still be the first one


- the slow rythm of releases in Firebird

I'd prefer sticking to 3.0.X branch of Firebird for the moment.

Of course, it's just my opinion and if someone would bump to 4.0, I 
won't be against it.


Julien

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


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

2019-02-01 Thread Libreoffice Gerrit user
 chart2/source/inc/OPropertySet.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6a815d1b051b0e38611ba4a864ecff3055f81dc5
Author: Andrea Gelmini 
AuthorDate: Thu Jan 31 17:44:50 2019 +
Commit: Julien Nabet 
CommitDate: Sat Feb 2 07:33:45 2019 +0100

Fix typo

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

diff --git a/chart2/source/inc/OPropertySet.hxx 
b/chart2/source/inc/OPropertySet.hxx
index e5f18492a96b..2ee1caa164c8 100644
--- a/chart2/source/inc/OPropertySet.hxx
+++ b/chart2/source/inc/OPropertySet.hxx
@@ -106,7 +106,7 @@ protected:
   sal_Int32 nHandle,
   const css::uno::Any& rValue ) override;
 
-/** The same as setFastProperyValue; nHandle is always valid.
+/** The same as setFastPropertyValue; nHandle is always valid.
 The changes must not be broadcasted in this method.
 
 @attention
@@ -128,7 +128,7 @@ protected:
   const css::uno::Any& rValue ) override;
 
 /**
-   The same as getFastProperyValue, but return the value through rValue and
+   The same as getFastPropertyValue, but return the value through rValue 
and
nHandle is always valid.
 
 @see ::cppu::OPropertySetHelper
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-02-01 Thread Libreoffice Gerrit user
 sw/source/ui/dbui/mmresultdialogs.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 29db6427ea6e3f24fbacfd6ac053231106518749
Author: Aditya 
AuthorDate: Thu Jan 31 04:42:09 2019 +0530
Commit: Mike Kaganski 
CommitDate: Sat Feb 2 06:50:39 2019 +0100

tdf#109120 : Mailmerge filenames starting with 1 (one)

Merged documents when saved as individual documents, the filenames
start from 0. This patch provides a fix for this as it introduces
natural numbering of documents (starting from 1) rather than the
previous 0-based numbering when saving individual merged documents.
e.g. mergedfile_1, mergedfile_2 and so on.

Change-Id: I67275656455788bb5ae935d7d42a349aa0510b36
Reviewed-on: https://gerrit.libreoffice.org/66658
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 

diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx 
b/sw/source/ui/dbui/mmresultdialogs.cxx
index dfde81645aa8..318229fa3104 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -638,7 +638,7 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, 
weld::Button&, void)
 pTargetView->GetWrtShell().EndAction();
 //then save it
 OUString sOutPath = 
aURL.GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
-OUString sCounter = "_" + OUString::number(nDoc);
+OUString sCounter = "_" + OUString::number(nDoc + 1);
 sOutPath = sOutPath.replaceAt( sOutPath.getLength() - 
sExtension.getLength() - 1, 0, sCounter);
 
 while(true)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-02-01 Thread Libreoffice Gerrit user
 sc/source/ui/unoobj/dapiuno.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit e1bcd6150f0ff7c4563fec722491d39498c544a0
Author: Jens Carl 
AuthorDate: Sat Feb 2 02:31:11 2019 +
Commit: Jens Carl 
CommitDate: Sat Feb 2 05:08:49 2019 +0100

Add some comments

Change-Id: Ice9919d7536060a8daac349f08db6c8366ebe392
Reviewed-on: https://gerrit.libreoffice.org/67272
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index b0158f954ece..e9bc8db1be47 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -1677,6 +1677,8 @@ Any SAL_CALL ScDataPilotFieldsObj::getByIndex( sal_Int32 
nIndex )
 return Any( xField );
 }
 
+// XElementAccess
+
 uno::Type SAL_CALL ScDataPilotFieldsObj::getElementType()
 {
 SolarMutexGuard aGuard;
@@ -1689,6 +1691,8 @@ sal_Bool SAL_CALL ScDataPilotFieldsObj::hasElements()
 return ( getCount() != 0 );
 }
 
+// XNameAccess
+
 Any SAL_CALL ScDataPilotFieldsObj::getByName( const OUString& aName )
 {
 SolarMutexGuard aGuard;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-02-01 Thread Libreoffice Gerrit user
 cui/source/tabpages/bbdlg.cxx  |   10 +-
 sw/source/uibase/docvw/HeaderFooterWin.cxx |4 
 2 files changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 5439b1e4d504c9afa71a707743d219222790d6ac
Author: Jim Raykowski 
AuthorDate: Sun Nov 25 17:23:42 2018 -0900
Commit: Jim Raykowski 
CommitDate: Sat Feb 2 05:05:06 2019 +0100

tdf#105225 New background tab page for header and footer Border

and Background dialog

Change-Id: I21979884b89a496ae36d5f1e48763680ae5da817
Reviewed-on: https://gerrit.libreoffice.org/64016
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/cui/source/tabpages/bbdlg.cxx b/cui/source/tabpages/bbdlg.cxx
index a17122b0f66b..c4f77b1e9aa5 100644
--- a/cui/source/tabpages/bbdlg.cxx
+++ b/cui/source/tabpages/bbdlg.cxx
@@ -46,7 +46,7 @@ SvxBorderBackgroundDlg::SvxBorderBackgroundDlg(weld::Window 
*pParent,
 }
 else
 {
-AddTabPage("background", SvxBackgroundTabPage::Create, nullptr );
+AddTabPage("background", SvxBkgTabPage::Create, nullptr );
 }
 }
 
@@ -54,11 +54,11 @@ void SvxBorderBackgroundDlg::PageCreated(const OString& 
rPageId, SfxTabPage& rTa
 {
 if (rPageId == "background")
 {
+SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
 // allow switching between Color/graphic
-if(mbEnableBackgroundSelector)
-{
-static_cast< SvxBackgroundTabPage& >(rTabPage).ShowSelector();
-}
+if (mbEnableBackgroundSelector)
+aSet.Put(SfxUInt32Item(SID_FLAG_TYPE, 
static_cast(SvxBackgroundTabFlags::SHOW_SELECTOR)));
+rTabPage.PageCreated(aSet);
 }
 // inits for Area and Transparency TabPages
 // The selection attribute lists (XPropertyList derivates, e.g. XColorList 
for
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx 
b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index dd658ad3920c..2d1fca27f4f3 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -428,10 +429,13 @@ void SwHeaderFooterWin::ExecuteCommand(const OString& 
rIdent)
 *pPool,
 svl::Items<
 RES_BACKGROUND, RES_SHADOW,
+XATTR_FILL_FIRST, XATTR_FILL_LAST,
 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{});
 
 aSet.Put( pHFFormat->GetAttrSet() );
 
+aSet.Put( pHFFormat->makeBackgroundBrushItem() );
+
 // Create a box info item... needed by the dialog
 SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
 const SfxPoolItem *pBoxInfo;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-02-01 Thread Libreoffice Gerrit user
 cui/source/inc/cuitabarea.hxx|1 +
 cui/source/tabpages/tpbitmap.cxx |   20 ++--
 2 files changed, 19 insertions(+), 2 deletions(-)

New commits:
commit 6850fcef74f7d3d82dc17143dd1befdf250977d7
Author: Jim Raykowski 
AuthorDate: Wed Jan 23 22:13:21 2019 -0900
Commit: Jim Raykowski 
CommitDate: Sat Feb 2 05:03:21 2019 +0100

Fix bitmap not being selected and displayed in bitmap tab page

The background tab page uses SvxBrushItem. Area tab page uses
XFillBitmapItem. setSvxBrushItemAsFillAttributesToTargetSet creates
empty string for XFillBitmapItem name. Bitmap can be identified by
GraphicObject::GetUniqueId. Use this to select bitmap in bitmap tab page
bitmap list.

Change-Id: Ic739c0b462502a986358bf00acfbac01fafd19f7
Reviewed-on: https://gerrit.libreoffice.org/66838
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index b27573d739aa..40ea7ce95592 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -558,6 +558,7 @@ private:
 void ClickBitmapHdl_Impl();
 void CalculateBitmapPresetSize();
 sal_Int32 SearchBitmapList(const OUString& rBitmapName);
+sal_Int32 SearchBitmapList(const GraphicObject& rGraphicObject);
 
 public:
 SvxBitmapTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 39e6b8a2cfa6..d4871d1dbfe0 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -156,9 +156,9 @@ void SvxBitmapTabPage::ActivatePage( const SfxItemSet& rSet 
)
 sal_Int32 nPos( 0 );
 if ( !aItem.isPattern() )
 {
-nPos = SearchBitmapList( aItem.GetName() );
+nPos = SearchBitmapList( aItem.GetGraphicObject() );
 if ( nPos == LISTBOX_ENTRY_NOTFOUND )
-nPos = 0;
+return;
 }
 else
 {
@@ -783,6 +783,22 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, 
weld::Button&, void)
 }
 }
 
+sal_Int32 SvxBitmapTabPage::SearchBitmapList(const GraphicObject& 
rGraphicObject)
+{
+long nCount = m_pBitmapList->Count();
+sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
+
+for(long i = 0;i < nCount;i++)
+{
+if(rGraphicObject.GetUniqueID() == m_pBitmapList->GetBitmap( i 
)->GetGraphicObject().GetUniqueID())
+{
+nPos = i;
+break;
+}
+}
+return nPos;
+}
+
 sal_Int32 SvxBitmapTabPage::SearchBitmapList(const OUString& rBitmapName)
 {
 long nCount = m_pBitmapList->Count();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-02-01 Thread Libreoffice Gerrit user
 sc/qa/extras/scdatapilotfieldsobj.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit cec3fe24dd4569bf04b13e0284823bad129dbb86
Author: Jens Carl 
AuthorDate: Sat Feb 2 00:13:56 2019 +
Commit: Jens Carl 
CommitDate: Sat Feb 2 03:39:38 2019 +0100

Add XServiceInfo tests to ScDataPilotFieldsObj

Change-Id: Ie5463178668389c34ad3bee892aa05f2d262de54
Reviewed-on: https://gerrit.libreoffice.org/67270
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/sc/qa/extras/scdatapilotfieldsobj.cxx 
b/sc/qa/extras/scdatapilotfieldsobj.cxx
index 24c6adfc9db1..05a88a708beb 100644
--- a/sc/qa/extras/scdatapilotfieldsobj.cxx
+++ b/sc/qa/extras/scdatapilotfieldsobj.cxx
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -36,7 +37,8 @@ class ScDataPilotFieldsObj : public CalcUnoApiTest,
  public apitest::XElementAccess,
  public apitest::XEnumerationAccess,
  public apitest::XIndexAccess,
- public apitest::XNameAccess
+ public apitest::XNameAccess,
+ public apitest::XServiceInfo
 {
 public:
 ScDataPilotFieldsObj();
@@ -62,6 +64,11 @@ public:
 CPPUNIT_TEST(testGetElementNames);
 CPPUNIT_TEST(testHasByName);
 
+// XServiceInfo
+CPPUNIT_TEST(testGetImplementationName);
+CPPUNIT_TEST(testGetSupportedServiceNames);
+CPPUNIT_TEST(testSupportsService);
+
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -73,6 +80,7 @@ ScDataPilotFieldsObj::ScDataPilotFieldsObj()
 , XElementAccess(cppu::UnoType::get())
 , XIndexAccess(6)
 , XNameAccess("")
+, XServiceInfo("ScDataPilotFieldsObj", 
"com.sun.star.sheet.DataPilotFields")
 {
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: framework/qa qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sc/qa

2019-02-01 Thread Libreoffice Gerrit user
 framework/qa/complex/api_internal/api.lst|1 
 qadevOOo/Jar_OOoRunner.mk|1 
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv |1 
 qadevOOo/tests/java/mod/_sc/ScDataPilotFieldsObj.java|  149 
--
 sc/qa/extras/scdatapilotfieldsobj.cxx|5 
 sc/qa/unoapi/sc_1.sce|1 
 6 files changed, 5 insertions(+), 153 deletions(-)

New commits:
commit 8e99c1fafb4c5b131ee5dc61102ad799d9f36a72
Author: Jens Carl 
AuthorDate: Sat Feb 2 00:08:28 2019 +
Commit: Jens Carl 
CommitDate: Sat Feb 2 02:40:16 2019 +0100

tdf#45904 Move XEnumerationAccess Java test to C++

Move XEnumerationAccess Java test to C++ for ScDataPilotFieldsObj.

Change-Id: I4b8bf204ccf4229ee5c57c03caef9fa5459e28a8
Reviewed-on: https://gerrit.libreoffice.org/67269
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/framework/qa/complex/api_internal/api.lst 
b/framework/qa/complex/api_internal/api.lst
index 64cfe9d6c7f7..18192bd23b86 100644
--- a/framework/qa/complex/api_internal/api.lst
+++ b/framework/qa/complex/api_internal/api.lst
@@ -79,7 +79,6 @@ job81=sc.ScCellFieldObj
 job85=sc.ScCellSearchObj
 job88=sc.ScDatabaseRangeObj
 job90=sc.ScDataPilotFieldObj
-job91=sc.ScDataPilotFieldsObj
 job98=sc.ScHeaderFieldObj
 job99=sc.ScHeaderFieldsObj
 job126=sc.ScSheetLinkObj
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 61623c302bb1..91f2b3503eec 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -968,7 +968,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupObj \
 qadevOOo/tests/java/mod/_sc/ScDataPilotFieldGroupsObj \
 qadevOOo/tests/java/mod/_sc/ScDataPilotFieldObj \
-qadevOOo/tests/java/mod/_sc/ScDataPilotFieldsObj \
 qadevOOo/tests/java/mod/_sc/ScDataPilotItemObj \
 qadevOOo/tests/java/mod/_sc/ScDataPilotItemsObj \
 qadevOOo/tests/java/mod/_sc/ScDocumentConfiguration \
diff --git 
a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv
deleted file mode 100644
index 7d42ccda9aa6..
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv
+++ /dev/null
@@ -1 +0,0 @@
-"ScDataPilotFieldsObj";"com::sun::star::container::XEnumerationAccess";"createEnumeration()"
diff --git a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldsObj.java 
b/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldsObj.java
deleted file mode 100644
index 1b3d2748f047..
--- a/qadevOOo/tests/java/mod/_sc/ScDataPilotFieldsObj.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package mod._sc;
-
-import java.io.PrintWriter;
-
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-import util.SOfficeFactory;
-
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.lang.XComponent;
-import com.sun.star.sheet.XDataPilotDescriptor;
-import com.sun.star.sheet.XDataPilotTables;
-import com.sun.star.sheet.XDataPilotTablesSupplier;
-import com.sun.star.sheet.XSpreadsheet;
-import com.sun.star.sheet.XSpreadsheetDocument;
-import com.sun.star.sheet.XSpreadsheets;
-import com.sun.star.table.CellAddress;
-import com.sun.star.table.CellRangeAddress;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.Type;
-import com.sun.star.uno.UnoRuntime;
-import com.sun.star.uno.XInterface;
-
-/**
-* Test for object which is represented by service
-* com.sun.star.sheet.DataPilotFields. 
-* Object implements the following interfaces :
-* 
-*   com::sun::star::container::XNameAccess
-*   com::sun::star::container::XElementAccess
-* 
-* @see com.sun.star.sheet.DataPilotFields
-* @see com.sun.star.container.XNameAccess
-* @see com.sun.star.container.XElementAccess
-* @see ifc.container._XNameAccess
-* @see ifc.container._XElementAccess
-*/
-public class ScDataPilotFieldsObj extends TestCase {
-private XSpreadsheetDocument xSheetDoc = null;
-
-/**
-* Creates Spr

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

2019-02-01 Thread Libreoffice Gerrit user
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv |2 --
 sc/qa/extras/scdatapilotfieldsobj.cxx|   10 
++
 2 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 466f1236ac0034918ed07ac3cd37607383dff40f
Author: Jens Carl 
AuthorDate: Sat Feb 2 00:03:19 2019 +
Commit: Jens Carl 
CommitDate: Sat Feb 2 02:39:49 2019 +0100

tdf#45904 Move XElementAccess Java tests for C++

Move XElementAccess Java tests for C++ for ScDataPilotFieldsObj.

Change-Id: Iac23860a9194f45be6cda8f4546605ae69729693
Reviewed-on: https://gerrit.libreoffice.org/67268
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git 
a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv
index 4af41c784e15..7d42ccda9aa6 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv
@@ -1,3 +1 @@
-"ScDataPilotFieldsObj";"com::sun::star::container::XElementAccess";"getElementType()"
-"ScDataPilotFieldsObj";"com::sun::star::container::XElementAccess";"hasElements()"
 
"ScDataPilotFieldsObj";"com::sun::star::container::XEnumerationAccess";"createEnumeration()"
diff --git a/sc/qa/extras/scdatapilotfieldsobj.cxx 
b/sc/qa/extras/scdatapilotfieldsobj.cxx
index 20b2c5359d6c..89b07762e638 100644
--- a/sc/qa/extras/scdatapilotfieldsobj.cxx
+++ b/sc/qa/extras/scdatapilotfieldsobj.cxx
@@ -8,9 +8,13 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 
+#include 
+
+#include 
 #include 
 #include 
 #include 
@@ -28,6 +32,7 @@ using namespace css;
 namespace sc_apitest
 {
 class ScDataPilotFieldsObj : public CalcUnoApiTest,
+ public apitest::XElementAccess,
  public apitest::XIndexAccess,
  public apitest::XNameAccess
 {
@@ -39,6 +44,10 @@ public:
 
 CPPUNIT_TEST_SUITE(ScDataPilotFieldsObj);
 
+// XElementAccess
+CPPUNIT_TEST(testHasElements);
+CPPUNIT_TEST(testGetElementType);
+
 // XIndexAccess
 CPPUNIT_TEST(testGetByIndex);
 CPPUNIT_TEST(testGetCount);
@@ -56,6 +65,7 @@ private:
 
 ScDataPilotFieldsObj::ScDataPilotFieldsObj()
 : CalcUnoApiTest("/sc/qa/extras/testdocuments")
+, XElementAccess(cppu::UnoType::get())
 , XIndexAccess(6)
 , XNameAccess("")
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-02-01 Thread Libreoffice Gerrit user
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv |2 --
 sc/qa/extras/scdatapilotfieldsobj.cxx|   10 
+-
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 070967b25978c388e33860d69a8bf56b46b18f13
Author: Jens Carl 
AuthorDate: Fri Feb 1 23:57:24 2019 +
Commit: Jens Carl 
CommitDate: Sat Feb 2 02:39:23 2019 +0100

tdf#45904 Move XIndexAccess Java tests to C++

Move XIndexAccess Java tests to C++ for ScDataPilotFieldsObj.

Change-Id: I277192a4e43a7ec45d27d93d32cad6b59534be46
Reviewed-on: https://gerrit.libreoffice.org/67267
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git 
a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv
index 8b5162f84c3b..4af41c784e15 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv
@@ -1,5 +1,3 @@
-"ScDataPilotFieldsObj";"com::sun::star::container::XIndexAccess";"getCount()"
-"ScDataPilotFieldsObj";"com::sun::star::container::XIndexAccess";"getByIndex()"
 
"ScDataPilotFieldsObj";"com::sun::star::container::XElementAccess";"getElementType()"
 
"ScDataPilotFieldsObj";"com::sun::star::container::XElementAccess";"hasElements()"
 
"ScDataPilotFieldsObj";"com::sun::star::container::XEnumerationAccess";"createEnumeration()"
diff --git a/sc/qa/extras/scdatapilotfieldsobj.cxx 
b/sc/qa/extras/scdatapilotfieldsobj.cxx
index 363724380b56..20b2c5359d6c 100644
--- a/sc/qa/extras/scdatapilotfieldsobj.cxx
+++ b/sc/qa/extras/scdatapilotfieldsobj.cxx
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 #include 
 
 #include 
@@ -26,7 +27,9 @@
 using namespace css;
 namespace sc_apitest
 {
-class ScDataPilotFieldsObj : public CalcUnoApiTest, public apitest::XNameAccess
+class ScDataPilotFieldsObj : public CalcUnoApiTest,
+ public apitest::XIndexAccess,
+ public apitest::XNameAccess
 {
 public:
 ScDataPilotFieldsObj();
@@ -36,6 +39,10 @@ public:
 
 CPPUNIT_TEST_SUITE(ScDataPilotFieldsObj);
 
+// XIndexAccess
+CPPUNIT_TEST(testGetByIndex);
+CPPUNIT_TEST(testGetCount);
+
 // XNameAccess
 CPPUNIT_TEST(testGetByName);
 CPPUNIT_TEST(testGetElementNames);
@@ -49,6 +56,7 @@ private:
 
 ScDataPilotFieldsObj::ScDataPilotFieldsObj()
 : CalcUnoApiTest("/sc/qa/extras/testdocuments")
+, XIndexAccess(6)
 , XNameAccess("")
 {
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: qadevOOo/objdsc sc/CppunitTest_sc_datapilotfieldsobj.mk sc/Module_sc.mk sc/qa

2019-02-01 Thread Libreoffice Gerrit user
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv |3 
 sc/CppunitTest_sc_datapilotfieldsobj.mk  |   43 +++
 sc/Module_sc.mk  |1 
 sc/qa/extras/scdatapilotfieldsobj.cxx|  108 
++
 4 files changed, 152 insertions(+), 3 deletions(-)

New commits:
commit 3b79e1e35e527b6973bce9c76d2d036f4300ce49
Author: Jens Carl 
AuthorDate: Fri Feb 1 23:50:32 2019 +
Commit: Jens Carl 
CommitDate: Sat Feb 2 02:38:50 2019 +0100

tdf#45904 Move XNameAccess Java tests to C++

Move XNameAccess Java tests to C++ for ScDataPilotFieldsObj.

Change-Id: I29625dcf6aa97e2781752c27e3eedba3ca479501
Reviewed-on: https://gerrit.libreoffice.org/67266
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git 
a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv
index 10e5650ed423..8b5162f84c3b 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldsObj.csv
@@ -1,6 +1,3 @@
-"ScDataPilotFieldsObj";"com::sun::star::container::XNameAccess";"getByName()"
-"ScDataPilotFieldsObj";"com::sun::star::container::XNameAccess";"getElementNames()"
-"ScDataPilotFieldsObj";"com::sun::star::container::XNameAccess";"hasByName()"
 "ScDataPilotFieldsObj";"com::sun::star::container::XIndexAccess";"getCount()"
 "ScDataPilotFieldsObj";"com::sun::star::container::XIndexAccess";"getByIndex()"
 
"ScDataPilotFieldsObj";"com::sun::star::container::XElementAccess";"getElementType()"
diff --git a/sc/CppunitTest_sc_datapilotfieldsobj.mk 
b/sc/CppunitTest_sc_datapilotfieldsobj.mk
new file mode 100644
index ..03dc63afed97
--- /dev/null
+++ b/sc/CppunitTest_sc_datapilotfieldsobj.mk
@@ -0,0 +1,43 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# 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/.
+#
+#*
+
+$(eval $(call gb_CppunitTest_CppunitTest,sc_datapilotfieldsobj))
+
+$(eval $(call gb_CppunitTest_use_external,sc_datapilotfieldsobj,boost_headers))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sc_datapilotfieldsobj, \
+   sc/qa/extras/scdatapilotfieldsobj \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sc_datapilotfieldsobj, \
+   cppu \
+   sal \
+   subsequenttest \
+   test \
+   unotest \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sc_datapilotfieldsobj,\
+   $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,sc_datapilotfieldsobj))
+
+$(eval $(call gb_CppunitTest_use_ure,sc_datapilotfieldsobj))
+$(eval $(call gb_CppunitTest_use_vcl,sc_datapilotfieldsobj))
+
+$(eval $(call gb_CppunitTest_use_components,sc_datapilotfieldsobj,\
+   $(sc_unoapi_common_components) \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sc_datapilotfieldsobj))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index dd41344970f5..dab7c9f5a81f 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -126,6 +126,7 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sc,\
CppunitTest_sc_databaserangeobj) \
CppunitTest_sc_databaserangesobj \
CppunitTest_sc_datapilotfieldobj \
+   CppunitTest_sc_datapilotfieldsobj \
CppunitTest_sc_datapilotitemobj \
CppunitTest_sc_datapilottableobj \
CppunitTest_sc_datapilottablesobj \
diff --git a/sc/qa/extras/scdatapilotfieldsobj.cxx 
b/sc/qa/extras/scdatapilotfieldsobj.cxx
new file mode 100644
index ..363724380b56
--- /dev/null
+++ b/sc/qa/extras/scdatapilotfieldsobj.cxx
@@ -0,0 +1,108 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+using namespace css;
+namespace sc_apitest
+{
+class ScDataPilotFieldsObj : public CalcUnoApiTest, public apitest::XNameAccess
+{
+public:
+ScDataPilotFieldsObj();
+virtual uno::Reference init() override;
+virtual void setUp() override;
+virtual void tearDown() override;
+
+CPPUNIT_TEST_SUITE(ScDataPilotFieldsObj);
+
+// XNameAccess
+CPPUNIT_TES

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

2019-02-01 Thread Libreoffice Gerrit user
 vcl/source/gdi/dibtools.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 8b20ac021d56ed60d09614e82e12538be290264a
Author: Caolán McNamara 
AuthorDate: Fri Feb 1 20:38:42 2019 +
Commit: Caolán McNamara 
CommitDate: Sat Feb 2 00:16:55 2019 +0100

ofz#12828 svm Timeout

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

diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index fd7bb4306076..7070b6783165 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -544,6 +545,12 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& 
rHeader, BitmapWriteAccess& r
 rIStm.ReadUInt32( nBMask );
 }
 
+const long nWidth(rHeader.nWidth);
+const long nHeight(rHeader.nHeight);
+long nResult = 0;
+if (utl::ConfigManager::IsFuzzing() && (o3tl::checked_multiply(nWidth, 
nHeight, nResult) || nResult > 400))
+return false;
+
 if (bRLE)
 {
 if(!rHeader.nSizeImage)
@@ -561,8 +568,6 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, 
BitmapWriteAccess& r
 }
 else
 {
-const long nWidth(rHeader.nWidth);
-const long nHeight(rHeader.nHeight);
 if (nAlignedWidth > rIStm.remainingSize())
 {
 // ofz#11188 avoid timeout
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: size of word/document.xml

2019-02-01 Thread Claude Brisson
Oh no. That's a Micro$oft format... Please moderator, drop my emails and 
forget about me :-)


On 2/1/19 11:31 PM, Claude Brisson wrote:
When I unzip a docx file and browse through the word/document.xml 
file, I see lots of things like:


w:rsidRDefault="" w:rsidRPr="" w14:paraId="004D">


all thorough the file.

Why not just write it like:



with a default value of "0" for missing attributes?

Regards,

  Claude



--
Claude Brisson
Software Architect @ Medinscop
http://claude.brisson.info
(+33) 770 186 013

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


Re: Linker problems with system vs bundled libraries (RPATH vs RUNPATH) / LTO / gold

2019-02-01 Thread Дилян Палаузов
Hello,

my initial understanding of the case “Linker problems with system vs bundled 
libraries (RPATH vs RUNPATH) ” is, that
ld.bfd and ld.gold behave differently, which is exposed by invoking 
--enable-linker=

How do ld.bfd and ld.gold differ, that triggered the problem?

Based on what does ./configure --help print behind --enable-lto: best used with 
“gold”.  Are there any known problems
with ld.bfd?

The "gold as linker" in configure.in/configure.ac comes from commit fc41132306 
back in 2011 and ld.bfd can handle linker
plugins at least since 2015.

The AS_HELP_STRING for --enable-lto says "both gold and lld linkers generally 
use less memory and link faster". 
Compared to what?  It shoud say "compared to ld.bfd".

--enable-lto switches AR, NM and RANLIB to be gcc-ar, gcc-nm and gcc-ranlib, 
but… on some systems the binary is called
gcc-ar-4, for clang you have to use llvm-ar, which on some systems is called 
llvm-ar-5.0.  I am not aware of a single
autoconf project that manages this right; new versions of CMake do.

I propose removing all the LTO extras from LibreOffice.  Competent users are 
supposed to install the linker plugin
liblto_plugin.so and LLVMgold.so in $libdir/bfd-plugins and insert -flto into 
CFLAGS and CXXFLAGS, respectively -flto=6
in LDFLAGS.  Incompetent users don’t have a problem without LTO, as they do not 
know LTO exists.

Regards
  Дилян

On Fri, 2019-02-01 at 21:32 +0100, Michael Stahl wrote:
> On 01.02.19 20:12, Luboš Luňák wrote:
> > On Monday 28 of January 2019, Michael Stahl wrote:
> > > hope this will help:
> > > 
> > > https://gerrit.libreoffice.org/#/c/67012/
> > > 
> > > the idea is we use different symbol version for everything so LO libs
> > > call into bundled library, system libs call into system library.
> > > 
> > > haven't tested it though, just make check runs fine here...
> > 
> >   Yes, that works. But before you do, could you please e.g. add URL of this
> > discussion to the commit message? "unintended hilarity" is a rather poor
> > problem description.
> 
> ... unfortunately it's too late to add anything to the commit message as 
> the patch somehow reviewed and pushed itself.
> 
> well, anybody who knows what a gloriously misguided idea the ELF global 
> namespace is can think of any number of problems that would be fixed by 
> the patch :)
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice

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


Re: Linker problems with system vs bundled libraries (RPATH vs RUNPATH)

2019-02-01 Thread Michael Stahl

On 01.02.19 20:12, Luboš Luňák wrote:

On Monday 28 of January 2019, Michael Stahl wrote:

hope this will help:

https://gerrit.libreoffice.org/#/c/67012/

the idea is we use different symbol version for everything so LO libs
call into bundled library, system libs call into system library.

haven't tested it though, just make check runs fine here...



  Yes, that works. But before you do, could you please e.g. add URL of this
discussion to the commit message? "unintended hilarity" is a rather poor
problem description.


... unfortunately it's too late to add anything to the commit message as 
the patch somehow reviewed and pushed itself.


well, anybody who knows what a gloriously misguided idea the ELF global 
namespace is can think of any number of problems that would be fixed by 
the patch :)

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


Re: Linker problems with system vs bundled libraries (RPATH vs RUNPATH)

2019-02-01 Thread Luboš Luňák
On Monday 28 of January 2019, Michael Stahl wrote:
> hope this will help:
>
> https://gerrit.libreoffice.org/#/c/67012/
>
> the idea is we use different symbol version for everything so LO libs
> call into bundled library, system libs call into system library.
>
> haven't tested it though, just make check runs fine here...


 Yes, that works. But before you do, could you please e.g. add URL of this 
discussion to the commit message? "unintended hilarity" is a rather poor 
problem description.

-- 
 Luboš Luňák
 l.lu...@collabora.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: chart2/qa external/cppunit io/qa test/source

2019-02-01 Thread Libreoffice Gerrit user
 chart2/qa/extras/charttest.hxx  |1 
 external/cppunit/0001-Unconditionally-use-C-11-noreturn.patch.1 |   57 
++
 external/cppunit/UnpackedTarball_cppunit.mk |3 
 io/qa/textinputstream.cxx   |2 
 test/source/xmltesttools.cxx|3 
 5 files changed, 61 insertions(+), 5 deletions(-)

New commits:
commit 07d04fd3ae72dc1c9998f83a4131407ecc39cda9
Author: Stephan Bergmann 
AuthorDate: Fri Feb 1 14:17:42 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 1 19:03:36 2019 +0100

Better fix for missing [[noreturn]] of CPPUNIT_FAIL

This includes a revert of commit 9808486a89c6368f836579f8d8c0dda63fd0063c 
"Avoid
-Werror,-Wimplicit-fallthrough with clang-cl", and also undoes older MSVC
workarounds (that would start to cause "warning C4702: unreachable code" 
now).

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

diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx
index a2b8efd2c427..84d74de2c117 100644
--- a/chart2/qa/extras/charttest.hxx
+++ b/chart2/qa/extras/charttest.hxx
@@ -340,7 +340,6 @@ Reference< chart2::data::XDataSequence > 
getLabelDataSequenceFromDoc(
 }
 
 CPPUNIT_FAIL("no Label sequence found");
-return Reference< chart2::data::XDataSequence > ();
 }
 
 Reference< chart2::data::XDataSequence > getDataSequenceFromDocByRole(
diff --git a/external/cppunit/0001-Unconditionally-use-C-11-noreturn.patch.1 
b/external/cppunit/0001-Unconditionally-use-C-11-noreturn.patch.1
new file mode 100644
index ..70ede229a3e6
--- /dev/null
+++ b/external/cppunit/0001-Unconditionally-use-C-11-noreturn.patch.1
@@ -0,0 +1,57 @@
+From c955b1041b9e3ebe7ee8a620340b78bddc820682 Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann 
+Date: Fri, 1 Feb 2019 13:37:59 +0100
+Subject: [PATCH] Unconditionally use C++11 [[noreturn]]
+
+This helps avoid issues like  "Avoid
+-Werror,-Wimplicit-fallthrough with clang-cl ...where CPPUNIT_FAIL is marked as
+noreturn only for __GNUC__".
+
+Change-Id: Idb33af7375f103f2dd7a7b4c3dbf20ce731b17ad
+---
+ include/cppunit/Asserter.h | 12 +++-
+ 1 file changed, 3 insertions(+), 9 deletions(-)
+
+diff --git a/include/cppunit/Asserter.h b/include/cppunit/Asserter.h
+index 3321b87..dd39ead 100644
+--- a/include/cppunit/Asserter.h
 b/include/cppunit/Asserter.h
+@@ -43,23 +43,17 @@ class Message;
+  * \endcode
+  */
+ 
+-#if defined __GNUC__
+-#   define NORETURN __attribute__((noreturn))
+-#else
+-#   define NORETURN
+-#endif
+-
+ struct Asserter
+ {
+   /*! \brief Throws a Exception with the specified message and location.
+*/
+-  NORETURN static void CPPUNIT_API fail( const Message &message, 
++  [[noreturn]] static void CPPUNIT_API fail( const Message &message, 
+ const SourceLine &sourceLine = SourceLine() );
+ 
+   /*! \brief Throws a Exception with the specified message and location.
+* \deprecated Use fail( Message, SourceLine ) instead.
+*/
+-  NORETURN static void CPPUNIT_API fail( std::string message, 
++  [[noreturn]] static void CPPUNIT_API fail( std::string message, 
+ const SourceLine &sourceLine = SourceLine() );
+ 
+   /*! \brief Throws a Exception with the specified message and location.
+@@ -165,7 +159,7 @@ struct Asserter
+*  what are the differences between the expected 
and actual value.
+* \param shortDescription Short description for the failure message.
+*/
+-  NORETURN static void CPPUNIT_API failNotEqual( std::string expected, 
++  [[noreturn]] static void CPPUNIT_API failNotEqual( std::string expected, 
+ std::string actual, 
+ const SourceLine &sourceLine,
+ const AdditionalMessage 
&additionalMessage = AdditionalMessage(),
+-- 
+2.20.1
+
diff --git a/external/cppunit/UnpackedTarball_cppunit.mk 
b/external/cppunit/UnpackedTarball_cppunit.mk
index 053a6020cd4f..649ba8fc4063 100644
--- a/external/cppunit/UnpackedTarball_cppunit.mk
+++ b/external/cppunit/UnpackedTarball_cppunit.mk
@@ -15,6 +15,8 @@ $(eval $(call 
gb_UnpackedTarball_update_autoconf_configs,cppunit))
 
 # gcc9.patch.0 addressed upstream with  
"Avoid GCC 9
 #  -Wdeprecated-copy":
+# 0001-Unconditionally-use-C-11-noreturn.patch.1 upstream at 

+#  "Unconditionally use C++11 [[noreturn]]"
 $(eval $(call gb_UnpackedTarball_add_patches,cppunit,\
external/cppunit/windows.patch \
external/cppunit/unix.patch \
@@ -22,6 +24,7 @@ $(eval $(call gb_Unpac

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

2019-02-01 Thread Libreoffice Gerrit user
 xmloff/source/forms/elementimport.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ad972aad6ba94c5a8dd0fd1693efdd97a184e9e9
Author: Stephan Bergmann 
AuthorDate: Fri Feb 1 16:46:39 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 1 19:04:33 2019 +0100

Use << instead of + in SAL_WARN_IF

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

diff --git a/xmloff/source/forms/elementimport.cxx 
b/xmloff/source/forms/elementimport.cxx
index d0df9c2b604d..e234ce5cf132 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -889,7 +889,7 @@ namespace xmloff
 SAL_WARN_IF(
 _rPropValue.Name == PROPERTY_EFFECTIVE_VALUE
 ||  _rPropValue.Name == PROPERTY_EFFECTIVE_DEFAULT, "xmloff",
-"OControlImport::implTranslateValueProperty: invalid property 
type/name combination, Any and " + _rPropValue.Name);
+"OControlImport::implTranslateValueProperty: invalid property 
type/name combination, Any and " << _rPropValue.Name);
 
 // Both properties are allowed to have a double or a string value,
 // so first try to convert the string into a number
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/libgpg-error

2019-02-01 Thread Libreoffice Gerrit user
 external/libgpg-error/UnpackedTarball_libgpg-error.mk |2 ++
 external/libgpg-error/clang-cl.patch  |   11 +++
 2 files changed, 13 insertions(+)

New commits:
commit cd202a1cdb73fee4be460f07bb36154ee4e945f0
Author: Stephan Bergmann 
AuthorDate: Fri Feb 1 15:59:29 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 1 19:03:50 2019 +0100

Missing extern in external/libgpg-error (clang-cl)

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

diff --git a/external/libgpg-error/UnpackedTarball_libgpg-error.mk 
b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
index 753f29716e2f..392bc26b640d 100644
--- a/external/libgpg-error/UnpackedTarball_libgpg-error.mk
+++ b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
@@ -13,6 +13,8 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,libgpg-error,$(LIBGPGERROR_TARBALL)
 
 $(eval $(call gb_UnpackedTarball_set_patchlevel,libgpg-error,0))
 
+# clang-cl.patch src/gpgrt-int.h part upstream at 
 "Declaration of
+#  _gpgrt_functions_w32_pollable in src/gpgrt-int.h should be extern"
 $(eval $(call gb_UnpackedTarball_add_patches,libgpg-error, \
$(if $(filter MSC,$(COM)),external/libgpg-error/w32-build-fixes.patch) \
$(if $(filter 
MSC,$(COM)),external/libgpg-error/w32-build-fixes-2.patch.1) \
diff --git a/external/libgpg-error/clang-cl.patch 
b/external/libgpg-error/clang-cl.patch
index d98a948bdf59..ef1447fb61d9 100644
--- a/external/libgpg-error/clang-cl.patch
+++ b/external/libgpg-error/clang-cl.patch
@@ -9,3 +9,14 @@
  # define _GPG_ERR_GCC_VERSION (__GNUC__ * 1 \
 + __GNUC_MINOR__ * 100 \
 + __GNUC_PATCHLEVEL__)
+--- src/gpgrt-int.h
 src/gpgrt-int.h
+@@ -359,7 +359,7 @@
+ 
+ #if _WIN32
+ /* Prototypes for w32-estream.c.  */
+-struct cookie_io_functions_s _gpgrt_functions_w32_pollable;
++extern struct cookie_io_functions_s _gpgrt_functions_w32_pollable;
+ int _gpgrt_w32_pollable_create (void *_GPGRT__RESTRICT *_GPGRT__RESTRICT 
cookie,
+ unsigned int modeflags,
+ struct cookie_io_functions_s next_functions,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Temporarily yielding SolarMutex to another thread

2019-02-01 Thread Luboš Luňák
On Friday 01 of February 2019, Noel Grandin wrote:
> On Fri, 1 Feb 2019 at 17:11, Luboš Luňák  wrote:
> > - Calc threading - the Interpret() call may spawn several threads to
> > compute
>
> This case smells like this functionality should be using a different mutex
> instead of the SolarMutex, then the main thread could hold some kind of
> InterpretMutex, and the child threads could acquire and release the
> SolarMutex as necessary.

 That wouldn't work. As I said, the main thread cannot release SolarMutex at 
that point, since any other thread could acquire it there. And as long as the 
main thread cannot release SolarMutex, no other thread can acquire it, not 
even the child ones. And as long as the child threads cannot own SolarMutex, 
they cannot use all kinds of LO functionality that require it, not just Calc 
code, but anywhere.

> Perhaps the calling thread should pass both an operation and a
> std::function to the clipboard thread, which the clipboard thread can post
> back to the event thread once it's done - kind of a poor mans continuation.

 We have places locking SolarMutex all over the codebase. That'd be such a 
mess to do it from places that the child thread could possibly reach. Playing 
tricks with mutexes would be a nice clean approach compared to that.

> "freed too late" ? sounds like an ownership issue, not a threading issue?

 It's roughly like this: There's SdrModel and some SdrObject instances, which 
refer to the SdrModel. Some SdrObject may get added to clipboard contents. 
Later, when it all is about to get deleted, first all SdrObject instances get 
deleted from whatever may refer to it, which includes resetting clipboard 
contents to something that no longer refers to it. And when all that is done, 
SdrModel is destroyed too.

 Except, Windows clipboard handling decided it would be fun to delay resetting 
clipboard contents, and so one SdrObject actually gets destroyed only later, 
when the clipboard code finally gets to it. SdrObject dtor refers to the no 
longer existing SdrModel, *boom*.

 The way I see it, this is clearly a fault of the Windows clipboard code.

> I'm sure it is possible to get clever with mutexes, but I suspect you'd
> just be setting yourself up for bugs that are even harder to reason about.

 I disagree. Getting clever with mutexes indeed looks very wrong 
theoretically, but in practice it'd be a hack that'd be limited to a small 
scope. Assuming it doesn't deadlock (which should be easy to spot) and 
assuming it doesn't have a performance impact, what else can go wrong in 
practice?

-- 
 Luboš Luňák
 l.lu...@collabora.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Temporarily yielding SolarMutex to another thread

2019-02-01 Thread Noel Grandin
On Fri, 1 Feb 2019 at 17:11, Luboš Luňák  wrote:

> - Calc threading - the Interpret() call may spawn several threads to
> compute
>

This case smells like this functionality should be using a different mutex
instead of the SolarMutex, then the main thread could hold some kind of
InterpretMutex, and the child threads could acquire and release the
SolarMutex as necessary.

Not ideal in terms of overhead, but less likelyhood of something going
wrong in the future.



> - Clipboard handling on Windows - I'm a bit hazy on the technical details,
> but
> if I'm getting it right, OLE requires all clipboard handling to be done by
> one thread, which our clipboard code does by creating a dedicated
> clipboard
> thread. Most clipboard operations ask the clipboard thread to do the job
> and
> block waiting for it,


Perhaps the calling thread should pass both an operation and a
std::function to the clipboard thread, which the clipboard thread can post
back to the event thread once it's done - kind of a poor mans continuation.

> but setting clipboard content is currently
> asynchronous, because decoding the set content requires SolarMutex, and
> again
> trying to acquire it from the clipboard thread would deadlock if the main
> thread holding it would block waiting for the clipboard thread. But the
> current situation with delayed handling can lead to previous clipboard
> contents freed too late, causing a crash.


"freed too late" ? sounds like an ownership issue, not a threading issue?

I'm sure it is possible to get clever with mutexes, but I suspect you'd
just be setting yourself up for bugs that are even harder to reason about.

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


[Libreoffice-commits] mso-dumper.git: pptx-kill-uuid.py

2019-02-01 Thread Libreoffice Gerrit user
 pptx-kill-uuid.py |   35 +++
 1 file changed, 35 insertions(+)

New commits:
commit f4faef33537d96307a198e09ccf1511cf74c7b62
Author: Miklos Vajna 
AuthorDate: Fri Feb 1 16:57:08 2019 +0100
Commit: Miklos Vajna 
CommitDate: Fri Feb 1 17:12:50 2019 +0100

pptx: add script that makes smartart uuids more readable

diff --git a/pptx-kill-uuid.py b/pptx-kill-uuid.py
new file mode 100755
index 000..c930ece
--- /dev/null
+++ b/pptx-kill-uuid.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python3
+#
+# 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/.
+#
+# PowerPoint generates SmartArt streams, like ppt/diagrams/data1.xml containing
+# UUIDs for each  element. This makes it hard to reason about them,
+# referring to numerical identifiers is just easier in notes. This script
+# replaces UUIDs with integers, which is the style used in the OOXML spec as
+# well.
+
+import re
+import sys
+
+
+def main():
+buf = sys.stdin.read()
+
+counter = 0
+while True:
+match = 
re.search("\{[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}\}", 
buf)
+if not match:
+break
+uuid = match.group()
+buf = buf.replace(uuid, str(counter))
+counter += 1
+
+sys.stdout.write(buf)
+
+
+if __name__ == "__main__":
+main()
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Temporarily yielding SolarMutex to another thread

2019-02-01 Thread Luboš Luňák

 Hello,

 does somebody know of a (solution) of a case when it would be useful to make 
another thread temporarily act if it held the SolarMutex? I've recently ran 
into 2 such cases:

- Calc threading - the Interpret() call may spawn several threads to compute 
in parallel a whole formula group. SolarMutex is still held by the main 
thread and the child threads generally try to avoid locking (it's ensured 
beforehand they will operate on distinct data). However, some functionality 
requires SolarMutex and those operations are currently blacklisted for 
threading, since this would deadlock. The main thread cannot release 
SolarMutex just like that in the middle of a computation, another independent 
thread could possibly access a state that's inconsistent at the moment. 
However, the main thread is blocked waiting for its child threads and so 
semantically all those threads "own" the SolarMutex, the child threads are 
there simply to use all CPU cores. I even remember seeing a piece of code 
which simply "silently" (with just a log warning) bails out if it can't 
acquire the SolarMutex.

- Clipboard handling on Windows - I'm a bit hazy on the technical details, but 
if I'm getting it right, OLE requires all clipboard handling to be done by 
one thread, which our clipboard code does by creating a dedicated clipboard 
thread. Most clipboard operations ask the clipboard thread to do the job and 
block waiting for it, but setting clipboard content is currently 
asynchronous, because decoding the set content requires SolarMutex, and again 
trying to acquire it from the clipboard thread would deadlock if the main 
thread holding it would block waiting for the clipboard thread. But the 
current situation with delayed handling can lead to previous clipboard 
contents freed too late, causing a crash. And again, this is really just one 
thread asking another one to do an operation, so again the clipboard thread 
could be semantically considered an owner of SolarMutex during such an 
operation.

 So, has somebody already handled a case like this? And is there a better way 
of handling this than adding some explicit ownership-yield operation to 
SolarMutex? It sounds a bit dirty to do something like that, but I can't 
think of anything better.

-- 
 Luboš Luňák
 l.lu...@collabora.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2019-02-01 Thread Libreoffice Gerrit user
 xmloff/source/forms/elementimport.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c2d808a5ddf89ce40939d166e67dd0271852104f
Author: Noel Grandin 
AuthorDate: Thu Jan 31 17:04:26 2019 +0100
Commit: Noel Grandin 
CommitDate: Fri Feb 1 16:37:17 2019 +0100

fix incorrect OSL_ENSURE

broken in
commit 5e0b52c1893ffe04a68333026afa7a557c48d534
Date:   Thu May 17 14:51:04 2012 +0100
some more ConstAsciiString behind OSL_ENSURE

Also convert to SAL_WARN_IF, and make the error message more useful.

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

diff --git a/xmloff/source/forms/elementimport.cxx 
b/xmloff/source/forms/elementimport.cxx
index 16c24f1df352..d0df9c2b604d 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -886,10 +886,10 @@ namespace xmloff
 if (TypeClass_ANY == aProp.Type.getTypeClass())
 {
 // we have exactly 2 properties where this type class is allowed:
-OSL_ENSURE(
-_rPropValue.Name != PROPERTY_EFFECTIVE_VALUE
-&&  _rPropValue.Name != PROPERTY_EFFECTIVE_DEFAULT,
-"OControlImport::implTranslateValueProperty: invalid property 
type/name combination!");
+SAL_WARN_IF(
+_rPropValue.Name == PROPERTY_EFFECTIVE_VALUE
+||  _rPropValue.Name == PROPERTY_EFFECTIVE_DEFAULT, "xmloff",
+"OControlImport::implTranslateValueProperty: invalid property 
type/name combination, Any and " + _rPropValue.Name);
 
 // Both properties are allowed to have a double or a string value,
 // so first try to convert the string into a number
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-02-01 Thread Libreoffice Gerrit user
 vcl/quartz/salgdi.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 3430192b9c9cc04f7aa46329c84b667f93c9ef39
Author: Noel Grandin 
AuthorDate: Thu Jan 31 16:49:40 2019 +0100
Commit: Noel Grandin 
CommitDate: Fri Feb 1 16:37:31 2019 +0100

remove unnecessary SAL_WARN

none of other backends warn about this

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

diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index 8a7a69890cd5..1331c229166e 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -425,10 +425,7 @@ void AquaSalGraphics::DrawTextLayout(const 
GenericSalLayout& rLayout)
 }
 
 if (aGlyphIds.empty())
-{
-SAL_WARN("vcl.quartz", "aGlyphIds is empty!?");
 return;
-}
 
 assert(aGlyphIds.size() == aGlyphPos.size());
 #if 0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-02-01 Thread Libreoffice Gerrit user
 include/vcl/errinf.hxx |6 --
 1 file changed, 6 deletions(-)

New commits:
commit b94eaae7a3e654b992ee7eea838245c57fea3017
Author: himajin10 
AuthorDate: Fri Feb 1 21:46:48 2019 +0900
Commit: Noel Grandin 
CommitDate: Fri Feb 1 16:33:17 2019 +0100

remove redundant typedef

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

diff --git a/include/vcl/errinf.hxx b/include/vcl/errinf.hxx
index e3d24ab0cc28..7d4f07207f46 100644
--- a/include/vcl/errinf.hxx
+++ b/include/vcl/errinf.hxx
@@ -97,12 +97,6 @@ namespace o3tl
 template<> struct typed_flags : is_typed_flags {};
 }
 
-typedef DialogMask WindowDisplayErrorFunc(
-weld::Window*, DialogMask nMask, const OUString &rErr, const OUString 
&rAction);
-
-typedef void BasicDisplayErrorFunc(
-const OUString &rErr, const OUString &rAction);
-
 class SAL_WARN_UNUSED VCL_DLLPUBLIC ErrorHandler
 {
 friend class ErrorStringFactory;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-02-01 Thread Libreoffice Gerrit user
 dbaccess/source/filter/hsqldb/utils.cxx |   65 +---
 1 file changed, 43 insertions(+), 22 deletions(-)

New commits:
commit 6a736800ac87a6b23a90827aa7b431920a6b9a36
Author: Stephan Bergmann 
AuthorDate: Fri Feb 1 13:28:28 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 1 16:03:23 2019 +0100

Fix conversion of non-BMP chars

...which are apparently encoded as two consecutive \u\u escape 
sequences
representing a UTF-16 surrogate pair

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

diff --git a/dbaccess/source/filter/hsqldb/utils.cxx 
b/dbaccess/source/filter/hsqldb/utils.cxx
index dc869f51217b..fce71b6b6c57 100644
--- a/dbaccess/source/filter/hsqldb/utils.cxx
+++ b/dbaccess/source/filter/hsqldb/utils.cxx
@@ -30,24 +30,24 @@ using namespace dbahsql;
 
 namespace
 {
-//Find ascii escaped unicode
-sal_Int32 lcl_IndexOfUnicode(const OString& rSource, const sal_Int32 nFrom = 0)
+int getHexValue(sal_Unicode c)
 {
-const OString sHexDigits = "0123456789abcdefABCDEF";
-sal_Int32 nIndex = rSource.indexOf("\\u", nFrom);
-if (nIndex == -1)
+if (c >= '0' && c <= '9')
 {
-return -1;
+return c - '0';
 }
-bool bIsUnicode = true;
-for (short nDist = 2; nDist <= 5; ++nDist)
+else if (c >= 'A' && c <= 'F')
 {
-if (sHexDigits.indexOf(rSource[nIndex + nDist]) == -1)
-{
-bIsUnicode = false;
-}
+return c - 'A' + 10;
+}
+else if (c >= 'a' && c <= 'f')
+{
+return c - 'a' + 10;
+}
+else
+{
+return -1;
 }
-return bIsUnicode ? nIndex : -1;
 }
 
 } // unnamed namespace
@@ -55,17 +55,38 @@ sal_Int32 lcl_IndexOfUnicode(const OString& rSource, const 
sal_Int32 nFrom = 0)
 //Convert ascii escaped unicode to utf-8
 OUString utils::convertToUTF8(const OString& original)
 {
-OString sResult = original;
-sal_Int32 nIndex = lcl_IndexOfUnicode(sResult);
-while (nIndex != -1 && nIndex < original.getLength())
+OUString res = OStringToOUString(original, RTL_TEXTENCODING_UTF8);
+for (sal_Int32 i = 0;;)
 {
-const OString sHex = original.copy(nIndex + 2, 4);
-const sal_Unicode cDec = 
static_cast(strtol(sHex.getStr(), nullptr, 16));
-const OString sNewChar = OString(&cDec, 1, RTL_TEXTENCODING_UTF8);
-sResult = sResult.replaceAll("\\u" + sHex, sNewChar);
-nIndex = lcl_IndexOfUnicode(original, nIndex + 1);
+i = res.indexOf("\\u", i);
+if (i == -1)
+{
+break;
+}
+i += 2;
+if (res.getLength() - i >= 4)
+{
+bool escape = true;
+sal_Unicode c = 0;
+for (sal_Int32 j = 0; j != 4; ++j)
+{
+auto const n = getHexValue(res[i + j]);
+if (n == -1)
+{
+escape = false;
+break;
+}
+c = (c << 4) | n;
+}
+if (escape)
+{
+i -= 2;
+res = res.replaceAt(i, 6, OUString(c));
+++i;
+}
+}
 }
-return OStringToOUString(sResult, RTL_TEXTENCODING_UTF8);
+return res;
 }
 
 OUString utils::getTableNameFromStmt(const OUString& sSql)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-02-01 Thread Libreoffice Gerrit user
 AllLangHelp_sbasic.mk|1 
 source/text/sbasic/python/python_session.xhp |  160 +++
 2 files changed, 161 insertions(+)

New commits:
commit ae3c8a0a8a17b5cd3c427d7c62a4832631e18bb2
Author: Alain Romedenne 
AuthorDate: Thu Jan 31 14:51:22 2019 +0100
Commit: Olivier Hallot 
CommitDate: Fri Feb 1 13:25:59 2019 +0100

Add Help page for Python session

Change-Id: I01f1448176f5c95a5151bb3040e9c2ef53fcb7f1
Reviewed-on: https://gerrit.libreoffice.org/67214
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index e8c2c202f..81718f70e 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -375,6 +375,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
 helpcontent2/source/text/sbasic/python/python_platform \
 helpcontent2/source/text/sbasic/python/python_programming \
 helpcontent2/source/text/sbasic/python/python_screen \
+helpcontent2/source/text/sbasic/python/python_session \
 helpcontent2/source/text/sbasic/python/python_shell \
 ))
 
diff --git a/source/text/sbasic/python/python_session.xhp 
b/source/text/sbasic/python/python_session.xhp
new file mode 100644
index 0..e6a49c91e
--- /dev/null
+++ b/source/text/sbasic/python/python_session.xhp
@@ -0,0 +1,160 @@
+
+
+
+
+
+Python_Session : Session 
class
+/text/sbasic/python/python_session.xhp
+
+
+
+
+Session;ComputerName
+Session;SharedScripts
+Session;SharedPythonScripts
+Session;UserProfile
+Session;UserScripts
+Session;UserPythonScripts
+
+Getting session information
+To compute %PRODUCTNAME user 
profile and shared modules system file paths can be performed with Python and 
with Basic language. BeanShell, Java, JavaScript and Python scripts locations 
can be derived from this information.
+Examples:
+With Python shell.
+>>> from  import 
Session
+>>> print(Session.SharedPythonScripts())  # class 
method
+>>> print(Session().UserName)  # object 
property
+>>> input(Session().UserProfile)  # object 
property
+From Tools – Macros - Run Macro... 
menu.
+
+from 
 import Session
+
+def 
demo_session():
+import 
screen_io as ui
+
ui.MsgBox(Session.Share(),title='Installation Share')  # class 
method
+
ui.Print(Session.SharedPythonScripts())  # class method
+s = Session() 
 # instance creation
+
ui.MsgBox(s.UserName,title='Hello')  # object property
+
ui.Print(s.UserPythonScripts)  # object property
+
+g_exportedScripts 
= demo_session,  # public macros
+
+With %PRODUCTNAME Basic.
+
+Sub 
Session_example()
+Dim s As New 
Session ' instance of Platform class
+Print 
"Shared scripts location:", s.SharedScripts
+MsgBox 
s.UserName,,"Hello"
+Print 
s.UserScripts, Chr(13), s.UserPythonScripts
+End Sub ' 
Session_example
+
+Using COM/OLE and Visual Basic Scripting language.
+
+' The 
service manager is always the entry point
+' If there 
is no office running then an office is started up
+Set sm = 
WScript.CreateObject("com.sun.star.ServiceManager")
+' 
PathSubstitution service exhibits information to infer
+' 
/Scripts/python locations from
+Set obj = 
sm.createInstance("com.sun.star.util.PathSubstitution")
+
+MsgBox 
CreateObject("WScript.Network").UserName,, 
"Hello"
+user = 
obj.getSubstituteVariableValue("$(user)")
+MsgBox user 
& "/Scripts",, "User scripts location"
+libO = 
Replace(obj.getSubstituteVariableValue("$(inst)"), 
"program/..", "Share")
+MsgBox libO 
& "/Scripts",, "Shared scripts location"
+
+Python Session class:
+
+import getpass, 
os, os.path, uno
+
+class 
Session():
+
@staticmethod
+def 
substitute(var_name):
+ctx = 
uno.getComponentContext()
+ps = 
ctx.getServiceManager().createInstanceWithContext(
+
'com.sun.star.util.PathSubstitution', ctx)
+return 
ps.getSubstituteVariableValue(var_name)
+
@staticmethod
+def 
Share():
+inst = 
uno.fileUrlToSystemPath(Session.substitute("$(prog)"))
+return 
os.path.normpath(inst.replace('program', 
"Share"))
+
@staticmethod
+def 
SharedScripts():
+return 
''.join([Session.Share(), os.sep, "Scripts"])
+
@staticmethod
+def 
SharedPythonScripts():
+return 
''.join([Session.SharedScripts(), os.sep, 
'python'])
+@property  # 
alternative to '$(username)' variable
+def 
UserName(self): return g

[Libreoffice-commits] core.git: helpcontent2

2019-02-01 Thread Libreoffice Gerrit user
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e9db8eceff48290be72591f7422b4fc45e5752fc
Author: Alain Romedenne 
AuthorDate: Thu Jan 31 14:51:22 2019 +0100
Commit: Gerrit Code Review 
CommitDate: Fri Feb 1 13:25:59 2019 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  - Add Help page for Python session

Change-Id: I01f1448176f5c95a5151bb3040e9c2ef53fcb7f1
Reviewed-on: https://gerrit.libreoffice.org/67214
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index c19fd80def3d..ae3c8a0a8a17 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit c19fd80def3d34e65302f13863aa8aeb88e2de42
+Subproject commit ae3c8a0a8a17b5cd3c427d7c62a4832631e18bb2
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-02-01 Thread Libreoffice Gerrit user
 sw/source/uibase/uiview/view2.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 854dc05d285d4bd5c91bada839f282d1d03dbb52
Author: Stephan Bergmann 
AuthorDate: Fri Feb 1 11:47:20 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 1 13:18:43 2019 +0100

One more "Don't add snap point < MINZOOM"

...similar to a89f535d85bb7d32ccb5196813ba6233f45c0c83 "Don't add snap 
point <
MINZOOM", this time triggered during CppunitTest_smoketest

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

diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index 63cd87a68867..11ba7904f18d 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1458,7 +1458,10 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
 nTmpWidth += aPageSize.Width() + 
pVOpt->GetGapBetweenPages();
 nFac = aWindowSize.Width() * 100 / nTmpWidth;
 nFac = std::min( nFac, nVisPercent );
-aZoomSliderItem.AddSnappingPoint( nFac );
+if (nFac >= MINZOOM)
+{
+aZoomSliderItem.AddSnappingPoint( nFac );
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-02-01 Thread Libreoffice Gerrit user
 test/source/xmltesttools.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 9808486a89c6368f836579f8d8c0dda63fd0063c
Author: Stephan Bergmann 
AuthorDate: Fri Feb 1 12:01:58 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 1 13:12:57 2019 +0100

Avoid -Werror,-Wimplicit-fallthrough with clang-cl

...where CPPUNIT_FAIL is marked as noreturn only for __GNUC__

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

diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx
index 00d156c40ecf..b104599f4b9d 100644
--- a/test/source/xmltesttools.cxx
+++ b/test/source/xmltesttools.cxx
@@ -11,6 +11,7 @@
 
 #include 
 
+#include 
 #include 
 
 namespace {
@@ -96,6 +97,7 @@ OUString XmlTestTools::getXPathContent(xmlDocPtr pXmlDoc, 
const OString& rXPath)
 {
 case XPATH_UNDEFINED:
 CPPUNIT_FAIL("Undefined XPath type");
+O3TL_UNREACHABLE;
 case XPATH_NODESET:
 {
 xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - officecfg/registry

2019-02-01 Thread Libreoffice Gerrit user
 officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1f4ef067619044e3ea05c421590109074dbf62b8
Author: Stephan Bergmann 
AuthorDate: Thu Jan 31 16:16:56 2019 +0100
Commit: Michael Stahl 
CommitDate: Fri Feb 1 12:57:54 2019 +0100

tdf#121780: com.sun.star.comp.sfx2.BackingComp needs to be registered always

...instead of never (as there is no handling of
org/openoffice/Office/ProtocolHandler-start.xcu in
officecfg/Configuration_officecfg.mk).  That install:module="start" 
included in
d930cefbe65d8b7f21100fcbf2ddcd977dd15cb1 "Startcenter: Refresh 
RecentDocsView
when select 'Clear list' menu option" was probably misguided 
cargo-cult-copying
from (meaningful) install:module="impress" that were already present in
officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu.

Change-Id: I03ed0cf84b576597a7b88ee6627a12cedbca4960
Reviewed-on: https://gerrit.libreoffice.org/67224
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit dbc92eab4d1e11fcb1588d80cb118951a180e808)
Reviewed-on: https://gerrit.libreoffice.org/67238
Reviewed-by: Michael Stahl 

diff --git a/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu 
b/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu
index 62f7566875e6..3e64280d514c 100644
--- a/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu
@@ -70,7 +70,7 @@
 vnd.com.sun.star.comp.PresentationMinimizer:*
   
 
-
+
   
 vnd.org.libreoffice.recentdocs:*
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-02-01 Thread Libreoffice Gerrit user
 vcl/inc/win/salvd.h   |3 +-
 vcl/win/gdi/salvd.cxx |   55 +++---
 2 files changed, 28 insertions(+), 30 deletions(-)

New commits:
commit cd520894e7092349f1a7aad07066376bb28571fc
Author: Dmitriy Shilin 
AuthorDate: Sun Jan 20 01:24:02 2019 -0800
Commit: Mike Kaganski 
CommitDate: Fri Feb 1 12:45:38 2019 +0100

tdf#107792 vcl/win: use ScopedGDI in WinSalVirtualDevice

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

diff --git a/vcl/inc/win/salvd.h b/vcl/inc/win/salvd.h
index f4825836036e..4121d2c89979 100644
--- a/vcl/inc/win/salvd.h
+++ b/vcl/inc/win/salvd.h
@@ -21,6 +21,7 @@
 #define INCLUDED_VCL_INC_WIN_SALVD_H
 
 #include 
+#include 
 
 #include 
 
@@ -33,7 +34,7 @@ class WinSalVirtualDevice : public SalVirtualDevice
 {
 private:
 HDC mhLocalDC;  // HDC or 0 for Cache 
Device
-HBITMAP mhBmp;  // Memory Bitmap
+ScopedHBITMAP   mhBmp;  // Memory Bitmap
 HBITMAP mhDefBmp;   // Default Bitmap
 std::unique_ptr mpGraphics; // current VirDev graphics
 WinSalVirtualDevice*mpNext; // next VirDev
diff --git a/vcl/win/gdi/salvd.cxx b/vcl/win/gdi/salvd.cxx
index f0cf1fc9f47b..6dc94f0b12a2 100644
--- a/vcl/win/gdi/salvd.cxx
+++ b/vcl/win/gdi/salvd.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 HBITMAP WinSalVirtualDevice::ImplCreateVirDevBitmap(HDC hDC, long nDX, long 
nDY, sal_uInt16 nBitCount, void **ppData)
 {
@@ -184,8 +185,8 @@ WinSalVirtualDevice::~WinSalVirtualDevice()
 SelectBitmap( mpGraphics->getHDC(), mhDefBmp );
 if( !mbForeignDC )
 DeleteDC( mpGraphics->getHDC() );
-if( mhBmp )
-DeleteBitmap( mhBmp );
+
+mhBmp.reset();
 mpGraphics.reset();
 }
 
@@ -209,35 +210,31 @@ bool WinSalVirtualDevice::SetSize( long nDX, long nDY )
 {
 if( mbForeignDC || !mhBmp )
 return true;// ???
-else
+
+HBITMAP hNewBmp = ImplCreateVirDevBitmap(getHDC(), nDX, nDY, mnBitCount,
+ &o3tl::temporary(nullptr));
+if (!hNewBmp)
 {
-void *pDummy;
-HBITMAP hNewBmp = ImplCreateVirDevBitmap(getHDC(), nDX, nDY, 
mnBitCount, &pDummy);
-if ( hNewBmp )
-{
-mnWidth = nDX;
-mnHeight = nDY;
-
-SelectBitmap( getHDC(), hNewBmp );
-DeleteBitmap( mhBmp );
-mhBmp = hNewBmp;
-
-if (mpGraphics)
-{
-WinOpenGLSalGraphicsImpl *pImpl;
-pImpl = dynamic_cast< WinOpenGLSalGraphicsImpl * 
>(mpGraphics->GetImpl());
-if (pImpl)
-pImpl->Init();
-}
-return true;
-}
-else
-{
-mnWidth = 0;
-mnHeight = 0;
-return false;
-}
+mnWidth = 0;
+mnHeight = 0;
+return false;
 }
+
+mnWidth = nDX;
+mnHeight = nDY;
+
+SelectBitmap(getHDC(), hNewBmp);
+mhBmp.reset(hNewBmp);
+
+if (mpGraphics)
+{
+WinOpenGLSalGraphicsImpl *pImpl;
+pImpl = dynamic_cast< WinOpenGLSalGraphicsImpl * 
>(mpGraphics->GetImpl());
+if (pImpl)
+pImpl->Init();
+}
+
+return true;
 }
 
 /* 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] help.git: help3xsl/online_transform.xsl

2019-02-01 Thread Libreoffice Gerrit user
 help3xsl/online_transform.xsl |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit c19fd80def3d34e65302f13863aa8aeb88e2de42
Author: Olivier Hallot 
AuthorDate: Thu Jan 31 18:27:58 2019 +0100
Commit: Olivier Hallot 
CommitDate: Fri Feb 1 12:11:42 2019 +0100

fix commit 622324ec76e54ea1de99d6cea3debc2389049f5

* SVG images cannot have undefined width and height
* pick'd a mistake in setting generic images width and height

Change-Id: I9f3e62e535c82d624c5c209b0e000784b2765604
Reviewed-on: https://gerrit.libreoffice.org/67234
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 02a166c63..03b20f708 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -94,6 +94,7 @@
 
 
 
+
 
 
 
@@ -851,7 +852,7 @@
 
 
 
-
+
 
 
 
@@ -865,7 +866,7 @@
 
 
 
-
+
 
 
 
@@ -1036,7 +1037,7 @@
 
 
 
-
+
 
 
 
@@ -1197,9 +1198,7 @@
 
 
 
-
-
-
+
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2019-02-01 Thread Libreoffice Gerrit user
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cd5e4e1f99960910f89855ddc3b7bfea0855d4b7
Author: Olivier Hallot 
AuthorDate: Thu Jan 31 18:27:58 2019 +0100
Commit: Gerrit Code Review 
CommitDate: Fri Feb 1 12:11:42 2019 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  - fix commit 622324ec76e54ea1de99d6cea3debc2389049f5

* SVG images cannot have undefined width and height
* pick'd a mistake in setting generic images width and height

Change-Id: I9f3e62e535c82d624c5c209b0e000784b2765604
Reviewed-on: https://gerrit.libreoffice.org/67234
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 622324ec76e5..c19fd80def3d 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 622324ec76e54ea1de99d6cea3debc2389049f58
+Subproject commit c19fd80def3d34e65302f13863aa8aeb88e2de42
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


RE: How do I add a new configuration item to registrymodifications.xcu

2019-02-01 Thread Winfried Donkers
Hi Heiko,


> I wrote a blog post some time ago about how to make a feature optional. It 
> comes from a
> non-developer/layman perspective to encourage people to look into the code. 
> Perhaps it’s 
> a bit helpful. 
> https://design.blog.documentfoundation.org/2018/04/14/easyhacking-how-to-make-a-feature-optional/
>  

Yes, that's helpful, especially for when I want to add the configuration option 
to the Options dialog.
FTB it's just under advanced -expert configuration.

In you blog you say it's surprisingly complex to implement a simple option. 
Well, in you case the framework was already present in module sw. 
In chart2, there is nothing yet and that presents a lot of challenges ;-)

Winfried

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


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

2019-02-01 Thread Libreoffice Gerrit user
 include/o3tl/unreachable.hxx |   39 +++
 sw/source/core/fields/reffld.cxx |   17 +++--
 2 files changed, 46 insertions(+), 10 deletions(-)

New commits:
commit 9935a83143c1d994986035ed89e7c94d1fcb2f4d
Author: Stephan Bergmann 
AuthorDate: Thu Jan 31 17:17:34 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 1 11:58:47 2019 +0100

Introduce O3TL_UNREACHABLE as a better alternative to assert(false)

The code in sw/source/core/fields/reffld.cxx had turned into whack-a-mole:  
MSVC
needed the unreachable default:assert(false); to fall through to init some 
vars
to avoid C4701 ("potentially uninitialized local variable").  But Clang 
(with
!NDEBUG, and an implementation of assert marked as noreturn) reported that 
as
"fallthrough annotation in unreachable code", requiring the #ifdef NDEBUG 
guards
to be added.  And now clang-cl (also with !NDEBUG, but with the MSVC
implementation of assert apparently not marked as noreturn) complained about
"unannotated fall-through between switch labels", which wold require the 
#ifdef
NDEBUG guards to be removed again.

O3TL_UNREACHABLE (inspired by LLVM's llvm_unreachable and underyling
LLVM_BUILTIN_UNREACHABLE) hopefully improves on that for all compilers 
involved.
For non-MSVC (i.e., Clang or GCC) it assumes that __builtin_unreachable is
supported (which it is at least for GCC 7, which is our current baseline per
README.md).

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

diff --git a/include/o3tl/unreachable.hxx b/include/o3tl/unreachable.hxx
new file mode 100644
index ..bc33d34b534e
--- /dev/null
+++ b/include/o3tl/unreachable.hxx
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_O3TL_UNREACHABLE_HXX
+#define INCLUDED_O3TL_UNREACHABLE_HXX
+
+#include 
+
+#include 
+
+// A better replacement for assert(false) to indicate a place in the code that 
should not be
+// reachable.  This should improve on the sometimes poor false-positive 
warnings emitted by
+// compilers when they cannot detect that some condition flagged by 
assert(false) cannot occur,
+// either because assert is reduced to a no-op by NDEBUG or because assert is 
not marked as noreturn
+// in the MSVC headers.  This is inspired by LLVM's LLVM_BUILTIN_UNREACHABLE
+// (llvm/include/llvm/Support/Compiler.h).
+
+#if defined _MSC_VER
+#define O3TL_UNREACHABLE_detail __assume(false)
+#else // assuming Clang or GCC with support for:
+#define O3TL_UNREACHABLE_detail __builtin_unreachable()
+#endif
+
+#define O3TL_UNREACHABLE   
\
+do 
\
+{  
\
+assert(false); 
\
+O3TL_UNREACHABLE_detail;   
\
+} while (false)
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 6c015e101783..222feb56728e 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -557,16 +558,14 @@ void SwGetRefField::UpdateField( const SwTextField* 
pFieldTextAttr )
 nEnd = std::min(nStart + 1, nLen);
 break;
 
-default:
-assert(false); // fall through to appease MSVC C4701
-#ifdef NDEBUG
-[[fallthrough]];
-#endif
 // "Reference" (whole Text)
 case REF_CONTENT:
 nStart = 0;
 nEnd = nLen;
 break;
+
+default:
+O3TL_UNREACHABLE;
 }
 break;
 
@@ -601,15 +600,13 @@ void SwGetRefField::UpdateField( const SwTextField* 
pFieldTextAttr )
 }
 return;
 
-default:
-assert(false); // fall through to appease MSVC C4701
-#ifdef NDEBUG
-[[fallthrough]];
-#endif
 case REF_SETREFATTR:
 nStart = nNumStart;
 nEnd = nN

Re: How do I add a new configuration item to registrymodifications.xcu

2019-02-01 Thread Heiko Tietze
I wrote a blog post some time ago about how to make a feature optional. It 
comes from a non-developer/layman perspective to encourage people to look into 
the code. Perhaps it’s a bit helpful. 
https://design.blog.documentfoundation.org/2018/04/14/easyhacking-how-to-make-a-feature-optional/
 

> Am 01.02.2019 um 09:31 schrieb Winfried Donkers :
> 
> Hi Michael,
> 
 utl::ConfigItem is sort of deprecated and you should have a really good
 excuse to use it in new code.
>>> 
>>> I have no better excuse than that it existed in the same component.
>>> Which method should I use instead (or where can I find good examples of 
>>> code to use as guide)?
>> 
>> just "git grep officecfg::" will find lots of examples, there are 
>> headers generated that have a class for every config item and you can 
>> get() and set() it.
> 
> I found sufficient examples to use; so far chart2 (where I'm currently 
> working) does use officecfg:: yet.
> Thanks!
> 
> Winfried
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice

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


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/unx

2019-02-01 Thread Libreoffice Gerrit user
 vcl/unx/gtk3_kde5/kde5_filepicker.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit f8bef86cc88e99b32e223b2bd675959c6d8e46ad
Author: Michael Weghorn 
AuthorDate: Thu Jan 31 09:52:51 2019 +0100
Commit: Thorsten Behrens 
CommitDate: Fri Feb 1 09:32:41 2019 +0100

tdf#123077 gtk3_kde5: Set KFileWidget's custom widget only once

Since the event filter is only used to set the custom
widget in the KFileWidget, it can and needs to be removed
again once this has been done; which also avoids crashes.

(s. https://gerrit.libreoffice.org/#/c/67185/ for more
infos, where the same thing is done for kde5)

Change-Id: I5c719fb17510916b4730ed5c00bb638df2f183e3
Reviewed-on: https://gerrit.libreoffice.org/67184
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit 30cc54a4532a732a0cf6dfe9943521978ff7292f)
Reviewed-on: https://gerrit.libreoffice.org/67204
Reviewed-by: Thorsten Behrens 

diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx 
b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
index 42e278aa3d0e..804aaa67e66a 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
@@ -241,7 +241,11 @@ bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
 {
 KWindowSystem::setMainWindow(w, _winId);
 if (auto* fileWidget = w->findChild({}, 
Qt::FindDirectChildrenOnly))
+{
 fileWidget->setCustomWidget(_extraControls);
+// remove event filter again; the only purpose was to set the 
custom widget here
+qApp->removeEventFilter(this);
+}
 }
 }
 return QObject::eventFilter(o, e);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sw/source

2019-02-01 Thread Libreoffice Gerrit user
 sw/source/core/crsr/crstrvl.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ffccaf2110a25f0b05174e6e9728e4e860c6398b
Author: Michael Stahl 
AuthorDate: Wed Jan 30 12:16:30 2019 +0100
Commit: Thorsten Behrens 
CommitDate: Fri Feb 1 09:31:16 2019 +0100

sw: fix use-after-free in SwCursorShell::MoveFieldType()

Change-Id: Ie272373bcef3459b05dc29bf874ecc3fdfa31d4a
Reviewed-on: https://gerrit.libreoffice.org/67151
Reviewed-by: Michael Stahl 
Tested-by: Jenkins
(cherry picked from commit 1ec8caedace2de2b7e6bf91468301548b54a28a8)
Reviewed-on: https://gerrit.libreoffice.org/67173
Reviewed-by: Thorsten Behrens 

diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index cef97092485c..2586ed6483cf 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -737,8 +737,9 @@ bool SwCursorShell::MoveFieldType(
 
 if( bDelField )
 {
-delete static_cast(&pTextField->GetAttr());
+auto const 
pFormat(static_cast(&pTextField->GetAttr()));
 delete pTextField;
+delete pFormat;
 }
 
 if( it != aSrtLst.end() && isSrch ) // found
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-02-01 Thread Libreoffice Gerrit user
 sw/source/core/crsr/crstrvl.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 56367e1aa96dde131446681fbb8bf6ec694438c5
Author: Michael Stahl 
AuthorDate: Wed Jan 30 12:16:30 2019 +0100
Commit: Thorsten Behrens 
CommitDate: Fri Feb 1 09:30:59 2019 +0100

sw: fix use-after-free in SwCursorShell::MoveFieldType()

Change-Id: Ie272373bcef3459b05dc29bf874ecc3fdfa31d4a
Reviewed-on: https://gerrit.libreoffice.org/67151
Reviewed-by: Michael Stahl 
Tested-by: Jenkins
(cherry picked from commit 1ec8caedace2de2b7e6bf91468301548b54a28a8)
Reviewed-on: https://gerrit.libreoffice.org/67171
Reviewed-by: Thorsten Behrens 

diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 723409bc0255..31aaf8b9374e 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -805,8 +805,9 @@ bool SwCursorShell::MoveFieldType(
 
 if( bDelField )
 {
-delete static_cast(&pTextField->GetAttr());
+auto const 
pFormat(static_cast(&pTextField->GetAttr()));
 delete pTextField;
+delete pFormat;
 }
 
 if( it != aSrtLst.end() && isSrch ) // found
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


RE: How do I add a new configuration item to registrymodifications.xcu

2019-02-01 Thread Winfried Donkers
Hi Michael,

>>> utl::ConfigItem is sort of deprecated and you should have a really good
>>> excuse to use it in new code.
>> 
>> I have no better excuse than that it existed in the same component.
>> Which method should I use instead (or where can I find good examples of code 
>> to use as guide)?
>
> just "git grep officecfg::" will find lots of examples, there are 
> headers generated that have a class for every config item and you can 
> get() and set() it.

I found sufficient examples to use; so far chart2 (where I'm currently working) 
does use officecfg:: yet.
Thanks!

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


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

2019-02-01 Thread Libreoffice Gerrit user
 icon-themes/sifr/cmd/sc_absoluterecord.png   
|binary
 icon-themes/sifr/cmd/sc_arc.png  
|binary
 icon-themes/sifr/cmd/sc_arrowshapes.circular-arrow.png   
|binary
 icon-themes/sifr/cmd/sc_arrowshapes.quad-arrow-callout.png   
|binary
 icon-themes/sifr/cmd/sc_arrowshapes.quad-arrow.png   
|binary
 icon-themes/sifr/cmd/sc_arrowshapes.s-sharped-arrow.png  
|binary
 icon-themes/sifr/cmd/sc_arrowshapes.split-arrow.png  
|binary
 icon-themes/sifr/cmd/sc_arrowshapes.split-round-arrow.png
|binary
 icon-themes/sifr/cmd/sc_calloutshapes.cloud-callout.png  
|binary
 icon-themes/sifr/cmd/sc_calloutshapes.line-callout-1.png 
|binary
 icon-themes/sifr/cmd/sc_calloutshapes.line-callout-2.png 
|binary
 icon-themes/sifr/cmd/sc_calloutshapes.line-callout-3.png 
|binary
 icon-themes/sifr/cmd/sc_calloutshapes.png
|binary
 icon-themes/sifr/cmd/sc_calloutshapes.rectangular-callout.png
|binary
 icon-themes/sifr/cmd/sc_calloutshapes.round-callout.png  
|binary
 icon-themes/sifr/cmd/sc_calloutshapes.round-rectangular-callout.png  
|binary
 icon-themes/sifr/cmd/sc_circle_unfilled.png  
|binary
 icon-themes/sifr/cmd/sc_circlearc.png
|binary
 icon-themes/sifr/cmd/sc_circlecut.png
|binary
 icon-themes/sifr/cmd/sc_circlecut_unfilled.png   
|binary
 icon-themes/sifr/cmd/sc_circlepie.png
|binary
 icon-themes/sifr/cmd/sc_circlepie_unfilled.png   
|binary
 icon-themes/sifr_dark/cmd/sc_absoluterecord.png  
|binary
 icon-themes/sifr_dark/cmd/sc_arc.png 
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.chevron.png 
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.circular-arrow.png  
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.corner-right-arrow.png  
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.down-arrow-callout.png  
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.down-arrow.png  
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.left-arrow-callout.png  
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.left-arrow.png  
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.left-right-arrow-callout.png
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.left-right-arrow.png
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.notched-right-arrow.png 
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.pentagon-right.png  
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.png 
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.quad-arrow-callout.png  
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.quad-arrow.png  
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.right-arrow-callout.png 
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.right-arrow.png 
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.s-sharped-arrow.png 
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.split-arrow.png 
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.split-round-arrow.png   
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.striped-right-arrow.png 
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.up-arrow-callout.png
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.up-arrow.png
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.up-down-arrow-callout.png   
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.up-down-arrow.png   
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.up-right-arrow-callout.png  
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.up-right-arrow.png  
|binary
 icon-themes/sifr_dark/cmd/sc_arrowshapes.up-right-down-arrow.png 
|binary
 icon-themes/sifr_dark/cmd/sc_calloutshapes.cloud-callout.png 
|binary
 icon-themes/sifr_dark/cmd/sc_calloutshapes.line-callout-1.png
|binary
 icon-themes/sifr_dark/cmd/sc_calloutshapes.line-callout-2.png
|binary
 icon-themes/sifr_dark/cmd/sc_calloutshapes.line-callout-3.png
|binary
 icon-themes/sifr_dark/cmd/sc_calloutshapes.png   
|binary
 icon-themes/sifr_dark/cmd/sc_calloutshapes.rectangular-callout.png   
|binary
 icon-themes/sifr_dark/cmd/sc_calloutshapes.round-callout.png 
|binary
 icon-themes/sifr_dark/cmd/sc_calloutshapes.round-rectangular-callout.png 
|binary
 icon-themes/sifr_dark/cmd/sc_circle_unfilled.png 
|binary
 icon-themes/sifr_d

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

2019-02-01 Thread Libreoffice Gerrit user
 vcl/win/gdi/gdiimpl.cxx   |8 
 vcl/win/gdi/salnativewidgets-luna.cxx |4 ++--
 vcl/win/gdi/winlayout.cxx |2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 77c9bcb1af09d20a813cc3a16c50a57ab09eb0b5
Author: Dmitriy Shilin 
AuthorDate: Wed Jan 30 21:40:28 2019 -0800
Commit: Mike Kaganski 
CommitDate: Fri Feb 1 09:14:30 2019 +0100

tdf#122820 vcl/win: do not use un-named C++ objects

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

diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index 432d5add15a5..f4af3a06fecb 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -766,9 +766,9 @@ void WinSalGraphicsImpl::drawMask(const SalTwoRect& rPosAry,
 SalTwoRect  aPosAry = rPosAry;
 const HDC hDC = mrParent.getHDC();
 
-ScopedSelectedHBRUSH(hDC, CreateSolidBrush(RGB(nMaskColor.GetRed(),
-   nMaskColor.GetGreen(),
-   nMaskColor.GetBlue(;
+ScopedSelectedHBRUSH hBrush(hDC, CreateSolidBrush(RGB(nMaskColor.GetRed(),
+  
nMaskColor.GetGreen(),
+  
nMaskColor.GetBlue(;
 
 // WIN/WNT seems to have a minor problem mapping the correct color of the
 // mask to the palette if we draw the DIB directly ==> draw DDB
@@ -1563,7 +1563,7 @@ void WinSalGraphicsImpl::DrawPixelImpl( long nX, long nY, 
COLORREF crColor )
 return;
 }
 
-ScopedSelectedHBRUSH(hDC, CreateSolidBrush(crColor));
+ScopedSelectedHBRUSH hBrush(hDC, CreateSolidBrush(crColor));
 PatBlt(hDC, static_cast(nX), static_cast(nY), int(1), int(1), 
PATINVERT);
 }
 
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx 
b/vcl/win/gdi/salnativewidgets-luna.cxx
index 7f5a33737d15..9066a21ca884 100644
--- a/vcl/win/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/gdi/salnativewidgets-luna.cxx
@@ -459,7 +459,7 @@ static void impl_drawAeroToolbar( HDC hDC, RECT rc, bool 
bHorizontal )
 GdiGradientFill( hDC, vert, 2, g_rect, 1, GRADIENT_FILL_RECT_V );
 
 // and a darker horizontal line under that
-ScopedSelectedHPEN(hDC, CreatePen(PS_SOLID, 1, RGB( 0xb0, 0xb0, 
0xb0)));
+ScopedSelectedHPEN hPen(hDC, CreatePen(PS_SOLID, 1, RGB( 0xb0, 0xb0, 
0xb0)));
 
 MoveToEx( hDC, rc.left, gradient_bottom, nullptr );
 LineTo( hDC, rc.right, gradient_bottom );
@@ -480,7 +480,7 @@ static void impl_drawAeroToolbar( HDC hDC, RECT rc, bool 
bHorizontal )
 to_x = rc.right;
 from_y = to_y = rc.top;
 
-ScopedSelectedHPEN(hDC, CreatePen(PS_SOLID, 1, RGB( 0xb0, 0xb0, 
0xb0)));
+ScopedSelectedHPEN hPen(hDC, CreatePen(PS_SOLID, 1, RGB( 0xb0, 
0xb0, 0xb0)));
 
 MoveToEx( hDC, from_x, from_y, nullptr );
 LineTo( hDC, to_x, to_y );
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 24dbcb1b9815..9b63fc583516 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -368,7 +368,7 @@ hb_font_t* WinFontInstance::ImplInitHbFont()
 {
 // Get the font metrics.
 HDC hDC = m_pGraphics->getHDC();
-ScopedSelectedHFONT(hDC, CreateFontIndirectW(&aLogFont));
+ScopedSelectedHFONT hFont(hDC, CreateFontIndirectW(&aLogFont));
 GetTextMetricsW(hDC, &aFontMetric);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits