CppCheck Report Update

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

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


Note:
The script generating this report was run at :
2018-04-11 02:52:36 with user buildslave at host vm140 as 
/home/buildslave/source/dev-tools/cppcheck/cppcheck-report.sh -s 
/home/buildslave/source/libo-core -c /home/buildslave/source/cppcheck -w 
/home/buildslave/tmp/www

It can be found and improved here:

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


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


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

2018-11-03 Thread Libreoffice Gerrit user
 editeng/source/editeng/impedit3.cxx |  196 
 1 file changed, 89 insertions(+), 107 deletions(-)

New commits:
commit ca3b0f8242a11c23f1077117e2e9f779348da831
Author: Mike Kaganski 
AuthorDate: Sun Nov 4 02:10:52 2018 +0300
Commit: Mike Kaganski 
CommitDate: Sun Nov 4 01:41:19 2018 +0100

tdf#120703 VPS: V547 Expression is always true/false

Some convoluted conditions present from the start turn out to be redundant

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

diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index 85ab762eeb65..d339261a5542 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -744,7 +744,6 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, 
sal_uInt32 nStartPosY )
 
 ImplInitLayoutMode( GetRefDevice(), nPara, nIndex );
 
-bool bCalcCharPositions = true;
 std::unique_ptr pBuf(new long[ pNode->Len() ]);
 
 bool bSameLineAgain = false;// For TextRanger, if the height changes.
@@ -798,15 +797,12 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, 
sal_uInt32 nStartPosY )
 // Solution:
 // The line before can only become longer, not smaller
 // => ...
-if ( bCalcCharPositions )
-pLine->GetCharPosArray().clear();
+pLine->GetCharPosArray().clear();
 
 sal_Int32 nTmpPos = nIndex;
 sal_Int32 nTmpPortion = pLine->GetStartPortion();
 long nTmpWidth = 0;
 long nXWidth = nMaxLineWidth;
-if ( nXWidth <= nTmpWidth ) // while has to be looped once
-nXWidth = nTmpWidth+1;
 
 LongDqPtr pTextRanges = nullptr;
 long nTextExtraYOffset = 0;
@@ -1033,84 +1029,80 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, 
sal_uInt32 nStartPosY )
 case EE_FEATURE_FIELD:
 {
 SeekCursor( pNode, nTmpPos+1, aTmpFont );
-sal_Unicode cChar = 0;  // later: NBS?
 aTmpFont.SetPhysFont( GetRefDevice() );
 ImplInitDigitMode(GetRefDevice(), 
aTmpFont.GetLanguage());
 
-OUString aFieldValue = cChar ? OUString(cChar) : 
static_cast(pNextFeature)->GetFieldValue();
-if ( bCalcCharPositions || !pPortion->HasValidSize() )
+OUString aFieldValue = static_cast(pNextFeature)->GetFieldValue();
+// get size, but also DXArray to allow length 
information in line breaking below
+const sal_Int32 nLength(aFieldValue.getLength());
+std::unique_ptr pTmpDXArray(new long[nLength]);
+pPortion->GetSize() = 
aTmpFont.QuickGetTextSize(GetRefDevice(), aFieldValue, 0, 
aFieldValue.getLength(), pTmpDXArray.get());
+
+// So no scrolling for oversized fields
+if ( pPortion->GetSize().Width() > nXWidth )
 {
-// get size, but also DXArray to allow length 
information in line breaking below
-const sal_Int32 nLength(aFieldValue.getLength());
-std::unique_ptr pTmpDXArray(new 
long[nLength]);
-pPortion->GetSize() = 
aTmpFont.QuickGetTextSize(GetRefDevice(), aFieldValue, 0, 
aFieldValue.getLength(), pTmpDXArray.get());
+// create ExtraPortionInfo on-demand, flush 
lineBreaksList
+ExtraPortionInfo *pExtraInfo = 
pPortion->GetExtraInfos();
 
-// So no scrolling for oversized fields
-if ( pPortion->GetSize().Width() > nXWidth )
+if(nullptr == pExtraInfo)
 {
-// create ExtraPortionInfo on-demand, flush 
lineBreaksList
-ExtraPortionInfo *pExtraInfo = 
pPortion->GetExtraInfos();
-
-if(nullptr == pExtraInfo)
-{
-pExtraInfo = new ExtraPortionInfo();
-pExtraInfo->nOrgWidth = nXWidth;
-pPortion->SetExtraInfos(pExtraInfo);
-}
-else
-{
-pExtraInfo->lineBreaksList.clear();
-}
+pExtraInfo = new ExtraPortionInfo();
+pExtraInfo->nOrgWidth = nXWidth;
+pPortion->SetExtraInfos(pExtraInfo);
+}
+else
+

[Libreoffice-commits] core.git: dictionaries

2018-11-03 Thread Libreoffice Gerrit user
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5be2e0016f46ba02c3bd7e2676f4978ebe2f119a
Author: Stanislav Horacek 
AuthorDate: Sat Nov 3 14:34:18 2018 +0100
Commit: Gerrit Code Review 
CommitDate: Sun Nov 4 01:26:19 2018 +0100

Update git submodules

* Update dictionaries from branch 'master'
  - update readme for Czech dictionaries

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

diff --git a/dictionaries b/dictionaries
index 12a05722b1bd..86921a78c42f 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit 12a05722b1bdda6764da7aeb0f87800de4c06153
+Subproject commit 86921a78c42f4fd499d86a226e34ab97e8b85ed5
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: cs_CZ/README_cs.txt cs_CZ/README_en.txt

2018-11-03 Thread Libreoffice Gerrit user
 cs_CZ/README_cs.txt |2 +-
 cs_CZ/README_en.txt |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 86921a78c42f4fd499d86a226e34ab97e8b85ed5
Author: Stanislav Horacek 
AuthorDate: Sat Nov 3 14:34:18 2018 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Nov 4 01:26:19 2018 +0100

update readme for Czech dictionaries

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

diff --git a/cs_CZ/README_cs.txt b/cs_CZ/README_cs.txt
index 2acbbed..da50d33 100644
--- a/cs_CZ/README_cs.txt
+++ b/cs_CZ/README_cs.txt
@@ -1,4 +1,4 @@
-Toto rozšíření obsahuje české slovníky pro OpenOffice.org.
+Toto rozšíření obsahuje české slovníky pro LibreOffice.
 
 Kontrola pravopisu
 --
diff --git a/cs_CZ/README_en.txt b/cs_CZ/README_en.txt
index b419320..2b2582e 100644
--- a/cs_CZ/README_en.txt
+++ b/cs_CZ/README_en.txt
@@ -1,4 +1,4 @@
-The pack contains current versions of all OpenOffice.org Czech dictionares as 
of 2008-05-18.
+The pack contains Czech dictionares for LibreOffice.
 
 Spellchecker
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-03 Thread Libreoffice Gerrit user
 svl/source/fsstor/fsstorage.cxx |   92 ++--
 svl/source/fsstor/fsstorage.hxx |6 +-
 2 files changed, 19 insertions(+), 79 deletions(-)

New commits:
commit e3720db59b23486cab773e6fadf6bf95b089b5d1
Author: Mike Kaganski 
AuthorDate: Sat Nov 3 22:50:52 2018 +0300
Commit: Mike Kaganski 
CommitDate: Sat Nov 3 23:00:09 2018 +0100

tdf#120703 PVS: V547 Expression is always false

Let FSStorage::GetContent() return reference.

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

diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index 360083cf386a..32f88f6c8596 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -132,10 +132,10 @@ bool FSStorage::MakeFolderNoUI( const OUString& rFolder )
 return false;
 }
 
-::ucbhelper::Content* FSStorage::GetContent()
+ucbhelper::Content& FSStorage::GetContent()
 {
 ::osl::MutexGuard aGuard( m_aMutex );
-return &m_pImpl->m_aContent;
+return m_pImpl->m_aContent;
 }
 
 void FSStorage::CopyStreamToSubStream( const OUString& aSourceURL,
@@ -166,11 +166,9 @@ void FSStorage::CopyStreamToSubStream( const OUString& 
aSourceURL,
 xDestOutput->closeOutput();
 }
 
-void FSStorage::CopyContentToStorage_Impl( ::ucbhelper::Content* pContent, 
const uno::Reference< embed::XStorage >& xDest )
+void FSStorage::CopyContentToStorage_Impl(ucbhelper::Content& rContent,
+  const 
uno::Reference& xDest)
 {
-if ( !pContent )
-throw uno::RuntimeException();
-
 // get list of contents of the Content
 // create cursor for access to children
 uno::Sequence< OUString > aProps( 2 );
@@ -180,7 +178,8 @@ void FSStorage::CopyContentToStorage_Impl( 
::ucbhelper::Content* pContent, const
 
 try
 {
-uno::Reference< sdbc::XResultSet > xResultSet = 
pContent->createCursor( aProps, ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS );
+uno::Reference xResultSet
+= rContent.createCursor(aProps, 
::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS);
 uno::Reference< sdbc::XRow > xRow( xResultSet, uno::UNO_QUERY );
 if ( xResultSet.is() )
 {
@@ -203,7 +202,7 @@ void FSStorage::CopyContentToStorage_Impl( 
::ucbhelper::Content* pContent, const
 
 uno::Reference< ucb::XCommandEnvironment > xDummyEnv;
 ::ucbhelper::Content aSourceContent( aSourceURL, 
xDummyEnv, comphelper::getProcessComponentContext() );
-CopyContentToStorage_Impl( &aSourceContent, xSubStorage );
+CopyContentToStorage_Impl( aSourceContent, xSubStorage );
 }
 else
 {
@@ -294,9 +293,6 @@ void SAL_CALL FSStorage::copyToStorage( const 
uno::Reference< embed::XStorage >&
 if ( !xDest.is() || xDest == uno::Reference< uno::XInterface >( 
static_cast< OWeakObject*> ( this ), uno::UNO_QUERY ) )
 throw lang::IllegalArgumentException(); // TODO:
 
-if ( !GetContent() )
-throw io::IOException(); // TODO: error handling
-
 try
 {
 CopyContentToStorage_Impl( GetContent(), xDest );
@@ -338,9 +334,6 @@ uno::Reference< io::XStream > SAL_CALL 
FSStorage::openStreamElement(
 if ( !m_pImpl )
 throw lang::DisposedException();
 
-if ( !GetContent() )
-throw io::IOException(); // TODO: error handling
-
 // TODO/LATER: may need possibility to create folder if it was removed, 
since the folder can not be locked
 INetURLObject aFileURL( m_pImpl->m_aURL );
 aFileURL.Append( aStreamName );
@@ -445,9 +438,6 @@ uno::Reference< embed::XStorage > SAL_CALL 
FSStorage::openStorageElement(
 if ( !m_pImpl )
 throw lang::DisposedException();
 
-if ( !GetContent() )
-throw io::IOException(); // TODO: error handling
-
 if ( ( nStorageMode & embed::ElementModes::WRITE )
   && !( m_pImpl->m_nMode & embed::ElementModes::WRITE ) )
   throw io::IOException(); // TODO: error handling
@@ -531,9 +521,6 @@ uno::Reference< io::XStream > SAL_CALL 
FSStorage::cloneStreamElement( const OUSt
 if ( !m_pImpl )
 throw lang::DisposedException();
 
-if ( !GetContent() )
-throw io::IOException(); // TODO: error handling
-
 // TODO/LATER: may need possibility to create folder if it was removed, 
since the folder can not be locked
 INetURLObject aFileURL( m_pImpl->m_aURL );
 aFileURL.Append( aStreamName );
@@ -624,9 +611,6 @@ sal_Bool SAL_CALL FSStorage::isStreamElement( const 
OUString& aElementName )
 if ( !m_pImpl )
 throw lang::DisposedException();
 
-if ( !GetContent() )
-throw embed::InvalidStorageException(); // TODO: error handling
-
 INetURLObject aURL( m_pImpl->m_aURL );
 aURL.Append( aElementName );
 
@@ -640,9 +624,6 @@ sal_Bool SAL_CAL

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

2018-11-03 Thread Libreoffice Gerrit user
 sw/qa/uitest/table/splitTable.py  |   97 ++
 sw/qa/uitest/writer_tests/data/splitTable.odt |binary
 2 files changed, 97 insertions(+)

New commits:
commit b50d16a88727047c2cdf9eeb4b8b2f5916cab859
Author: Zdeněk Crhonek 
AuthorDate: Fri Nov 2 11:06:19 2018 +0100
Commit: Zdenek Crhonek 
CommitDate: Sat Nov 3 22:35:52 2018 +0100

uitest for Writer Table- Split table

Change-Id: I95a46d206f846b5babaca4152bcf8a8b7aa9
Reviewed-on: https://gerrit.libreoffice.org/62773
Tested-by: Jenkins
Reviewed-by: Zdenek Crhonek 

diff --git a/sw/qa/uitest/table/splitTable.py b/sw/qa/uitest/table/splitTable.py
new file mode 100644
index ..1905616b000f
--- /dev/null
+++ b/sw/qa/uitest/table/splitTable.py
@@ -0,0 +1,97 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_pos
+from uitest.uihelper.calc import enter_text_to_cell
+from libreoffice.calc.document import get_cell_by_position
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, type_text
+import org.libreoffice.unotest
+import pathlib
+
+def get_url_for_data_file(file_name):
+return 
pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
+
+#Writer Split Table
+
+class splitTable(UITestCase):
+def test_split_table(self):
+writer_doc = 
self.ui_test.load_file(get_url_for_data_file("splitTable.odt"))
+document = self.ui_test.get_component()
+xWriterDoc = self.xUITest.getTopFocusWindow()
+xWriterEdit = xWriterDoc.getChild("writer_edit")
+#go to row 2
+self.xUITest.executeCommand(".uno:GoDown")
+self.xUITest.executeCommand(".uno:GoDown")
+#dialog Split table, check Copy heading, OK -> verify 2 tables, 1st 
has 2 rows, second has 5 rows
+self.ui_test.execute_dialog_through_command(".uno:SplitTable")
+xDialog = self.xUITest.getTopFocusWindow()
+
+copyheading = xDialog.getChild("copyheading")
+copyheading.executeAction("CLICK", tuple())
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+self.assertEqual(document.TextTables.getCount(), 2)
+tables = document.getTextTables()
+self.assertEqual(len(tables[0].getRows()), 2)
+self.assertEqual(len(tables[1].getRows()), 5)
+#undo -> verify 1 tables
+self.xUITest.executeCommand(".uno:Undo")
+self.assertEqual(document.TextTables.getCount(), 1)
+
+self.ui_test.close_doc()
+
+#dialog Split table, check Custom heading, OK -> verify 2 tables, 1st 
has 2 rows, second has 4 rows
+writer_doc = 
self.ui_test.load_file(get_url_for_data_file("splitTable.odt"))
+document = self.ui_test.get_component()
+xWriterDoc = self.xUITest.getTopFocusWindow()
+xWriterEdit = xWriterDoc.getChild("writer_edit")
+#go to row 2
+self.xUITest.executeCommand(".uno:GoDown")
+self.xUITest.executeCommand(".uno:GoDown")
+self.ui_test.execute_dialog_through_command(".uno:SplitTable")
+xDialog = self.xUITest.getTopFocusWindow()
+
+customheading = xDialog.getChild("customheading")
+customheading.executeAction("CLICK", tuple())
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+self.assertEqual(document.TextTables.getCount(), 2)
+tables = document.getTextTables()
+self.assertEqual(len(tables[0].getRows()), 2)
+self.assertEqual(len(tables[1].getRows()), 4)
+#undo -> verify 1 tables
+self.xUITest.executeCommand(".uno:Undo")
+self.assertEqual(document.TextTables.getCount(), 1)
+
+self.ui_test.close_doc()
+#dialog Split table, check No heading, OK -> verify 2 tables, 1st has 
2 rows, second has 4 rows
+writer_doc = 
self.ui_test.load_file(get_url_for_data_file("splitTable.odt"))
+document = self.ui_test.get_component()
+xWriterDoc = self.xUITest.getTopFocusWindow()
+xWriterEdit = xWriterDoc.getChild("writer_edit")
+#go to row 2
+self.xUITest.executeCommand(".uno:GoDown")
+self.xUITest.executeCommand(".uno:GoDown")
+self.ui_test.execute_dialog_through_command(".uno:SplitTable")
+xDialog = self.xUITest.getTopFocusWindow()
+
+noheading = xDialog.getChild("noheading")
+noheading.executeAction("CLICK", tuple())
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+self.assertEqual(document.TextTable

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

2018-11-03 Thread Libreoffice Gerrit user
 chart2/source/controller/dialogs/tp_ChartType.cxx |   23 --
 1 file changed, 13 insertions(+), 10 deletions(-)

New commits:
commit 163dd5df9f080a141e201a32c40ff80e1a5d2e34
Author: Mike Kaganski 
AuthorDate: Sat Nov 3 21:49:05 2018 +0300
Commit: Mike Kaganski 
CommitDate: Sat Nov 3 22:02:42 2018 +0100

tdf#120703 PVS: V1023

V1023 A pointer without owner is added to the 
'm_aChartTypeDialogControllerList'
  container by the 'emplace_back' method. A memory leak will occur in 
case
  of an exception.

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

diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx 
b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 75f8a76ff5f8..e80e2303e433 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -28,6 +28,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -654,22 +655,24 @@ ChartTypeTabPage::ChartTypeTabPage(TabPageParent pParent 
, const uno::Reference<
 }
 }
 
-m_aChartTypeDialogControllerList.emplace_back(new 
ColumnChartDialogController() );
-m_aChartTypeDialogControllerList.emplace_back(new 
BarChartDialogController() );
-m_aChartTypeDialogControllerList.emplace_back(new 
PieChartDialogController() );
-m_aChartTypeDialogControllerList.emplace_back(new 
AreaChartDialogController() );
-m_aChartTypeDialogControllerList.emplace_back(new 
LineChartDialogController() );
+
m_aChartTypeDialogControllerList.push_back(o3tl::make_unique());
+
m_aChartTypeDialogControllerList.push_back(o3tl::make_unique());
+
m_aChartTypeDialogControllerList.push_back(o3tl::make_unique());
+
m_aChartTypeDialogControllerList.push_back(o3tl::make_unique());
+
m_aChartTypeDialogControllerList.push_back(o3tl::make_unique());
 if (bEnableComplexChartTypes)
 {
-m_aChartTypeDialogControllerList.emplace_back(new 
XYChartDialogController() );
-m_aChartTypeDialogControllerList.emplace_back(new 
BubbleChartDialogController() );
+
m_aChartTypeDialogControllerList.push_back(o3tl::make_unique());
+m_aChartTypeDialogControllerList.push_back(
+o3tl::make_unique());
 }
-m_aChartTypeDialogControllerList.emplace_back(new 
NetChartDialogController() );
+
m_aChartTypeDialogControllerList.push_back(o3tl::make_unique());
 if (bEnableComplexChartTypes)
 {
-m_aChartTypeDialogControllerList.emplace_back(new 
StockChartDialogController() );
+
m_aChartTypeDialogControllerList.push_back(o3tl::make_unique());
 }
-m_aChartTypeDialogControllerList.emplace_back(new 
CombiColumnLineChartDialogController() );
+m_aChartTypeDialogControllerList.push_back(
+o3tl::make_unique());
 
 for (auto const& elem : m_aChartTypeDialogControllerList)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: extensions/source formula/source sal/osl sc/source svx/source

2018-11-03 Thread Libreoffice Gerrit user
 extensions/source/propctrlr/formlinkdialog.cxx |   13 +++---
 formula/source/core/api/FormulaCompiler.cxx|   10 ++-
 sal/osl/w32/file_url.cxx   |3 --
 sc/source/ui/view/formatsh.cxx |4 +--
 svx/source/form/fmobj.cxx  |5 +--
 svx/source/form/fmshimp.cxx|   32 +++--
 6 files changed, 26 insertions(+), 41 deletions(-)

New commits:
commit d85108355c1802c7aed1ef1d9a19f6c633c4a0f8
Author: Mike Kaganski 
AuthorDate: Sat Nov 3 21:15:48 2018 +0300
Commit: Mike Kaganski 
CommitDate: Sat Nov 3 21:28:24 2018 +0100

tdf#120703 PVS: V547 Expression is always true/false

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

diff --git a/extensions/source/propctrlr/formlinkdialog.cxx 
b/extensions/source/propctrlr/formlinkdialog.cxx
index b9ecb6d92fc7..e52ab453d168 100644
--- a/extensions/source/propctrlr/formlinkdialog.cxx
+++ b/extensions/source/propctrlr/formlinkdialog.cxx
@@ -588,16 +588,11 @@ namespace pcr
 
 try
 {
-bool bEnable = true;
-
 // only show the button when both forms are based on the same data 
source
-if ( bEnable )
-{
-OUString sMasterDS, sDetailDS;
-xMasterFormProps->getPropertyValue( PROPERTY_DATASOURCE ) >>= 
sMasterDS;
-xDetailFormProps->getPropertyValue( PROPERTY_DATASOURCE ) >>= 
sDetailDS;
-bEnable = ( sMasterDS == sDetailDS );
-}
+OUString sMasterDS, sDetailDS;
+xMasterFormProps->getPropertyValue( PROPERTY_DATASOURCE ) >>= 
sMasterDS;
+xDetailFormProps->getPropertyValue( PROPERTY_DATASOURCE ) >>= 
sDetailDS;
+bool bEnable = ( sMasterDS == sDetailDS );
 
 // only show the button when the connection supports relations
 if ( bEnable )
diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index c7b5968c8ddf..09ac290d43af 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -467,14 +467,10 @@ uno::Sequence< sheet::FormulaOpCodeMapEntry > 
FormulaCompiler::OpCodeMap::create
 };
 const size_t nCount = SAL_N_ELEMENTS(aMap);
 // Preallocate vector elements.
-if (aVec.size() < nCount)
-{
-FormulaOpCodeMapEntry aEntry;
-aEntry.Token.OpCode = getOpCodeUnknown();
-aVec.resize( nCount, aEntry);
-} // if (aVec.size() < nCount)
-
 FormulaOpCodeMapEntry aEntry;
+aEntry.Token.OpCode = getOpCodeUnknown();
+aVec.resize(nCount, aEntry);
+
 for (auto& i : aMap)
 {
 size_t nIndex = static_cast< size_t >( i.nOff );
diff --git a/sal/osl/w32/file_url.cxx b/sal/osl/w32/file_url.cxx
index f34b437fefd2..28955cce4f3a 100644
--- a/sal/osl/w32/file_url.cxx
+++ b/sal/osl/w32/file_url.cxx
@@ -166,9 +166,6 @@ DWORD IsValidFilePath(rtl_uString *path, DWORD dwFlags, 
rtl_uString **corrected)
 if ( dwFlags & VALIDATEPATH_ALLOW_RELATIVE )
 dwFlags |= VALIDATEPATH_ALLOW_ELLIPSE;
 
-if ( !lpszPath )
-bValid = false;
-
 DWORD   dwCandidatPathType = PATHTYPE_ERROR;
 
 if ( 0 == rtl_ustr_shortenedCompareIgnoreAsciiCase_WithLength( 
path->buffer, nLength, o3tl::toU(WSTR_LONG_PATH_PREFIX_UNC), 
SAL_N_ELEMENTS(WSTR_LONG_PATH_PREFIX_UNC) - 1, 
SAL_N_ELEMENTS(WSTR_LONG_PATH_PREFIX_UNC) - 1 ) )
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index d931d387af3b..0ee2c0e65925 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -2020,7 +2020,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
 SvtScriptType nScript = SvtScriptType::NONE;  // 
GetSelectionScriptType never returns 0
 if ( rSet.GetItemState( ATTR_FONT ) != SfxItemState::UNKNOWN )
 {
-if (nScript == SvtScriptType::NONE) nScript = 
pTabViewShell->GetSelectionScriptType();
+nScript = pTabViewShell->GetSelectionScriptType();
 ScViewUtil::PutItemScript( rSet, rAttrSet, ATTR_FONT, nScript );
 }
 if ( rSet.GetItemState( ATTR_FONT_HEIGHT ) != SfxItemState::UNKNOWN )
@@ -2237,7 +2237,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
 SvtScriptType nScript = SvtScriptType::NONE;  // 
GetSelectionScriptType never returns 0
 if ( rSet.GetItemState( ATTR_FONT_WEIGHT ) != SfxItemState::UNKNOWN )
 {
-if (nScript == SvtScriptType::NONE) nScript = 
pTabViewShell->GetSelectionScriptType();
+nScript = pTabViewShell->GetSelectionScriptType();
 ScViewUtil::PutItemScript( rSet, rAttrSet, ATTR_FONT_WEIGHT, nScript );
 }
 if ( rSet.GetItemState( ATTR_FONT_POSTURE ) != SfxItemState::UNKNO

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

2018-11-03 Thread Libreoffice Gerrit user
 sc/inc/fielduno.hxx  |2 -
 sc/source/ui/unoobj/fielduno.cxx |   52 +--
 2 files changed, 19 insertions(+), 35 deletions(-)

New commits:
commit 1459ffdffee61f3c4a552a28c5aa43facb3f4fcf
Author: Mike Kaganski 
AuthorDate: Sat Nov 3 20:38:21 2018 +0300
Commit: Mike Kaganski 
CommitDate: Sat Nov 3 21:17:38 2018 +0100

tdf#120703 PVS: V547 Expression is always true/false

Let ScEditFieldObj::getData() return reference.

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

diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx
index 9b6245131c85..70b3aa31639b 100644
--- a/sc/inc/fielduno.hxx
+++ b/sc/inc/fielduno.hxx
@@ -185,7 +185,7 @@ class ScEditFieldObj : public cppu::WeakImplHelper<
 bool mbIsFixed:1;
 
 private:
-SvxFieldData* getData();
+SvxFieldData& getData();
 
 void setPropertyValueURL(const OUString& rName, const css::uno::Any& rVal);
 css::uno::Any getPropertyValueURL(const OUString& rName);
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index a1036dfa8dea..666eb8c7c88e 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -441,11 +441,8 @@ ScHeaderFieldsObj::~ScHeaderFieldsObj()
 {
 lang::EventObject aEvent;
 aEvent.Source = static_cast(this);
-if (mpRefreshListeners)
-{
-mpRefreshListeners->disposeAndClear(aEvent);
-DELETEZ( mpRefreshListeners );
-}
+mpRefreshListeners->disposeAndClear(aEvent);
+DELETEZ(mpRefreshListeners);
 }
 }
 
@@ -579,7 +576,7 @@ void SAL_CALL ScHeaderFieldsObj::removeRefreshListener( 
const uno::Reference(pData);
+SvxURLField& rData = static_cast(getData());
 if (rName == SC_UNONAME_URL)
 {
 if (rVal >>= aStrVal)
-p->SetURL(aStrVal);
+rData.SetURL(aStrVal);
 }
 else if (rName == SC_UNONAME_REPR)
 {
 if (rVal >>= aStrVal)
-p->SetRepresentation(aStrVal);
+rData.SetRepresentation(aStrVal);
 }
 else if (rName == SC_UNONAME_TARGET)
 {
 if (rVal >>= aStrVal)
-p->SetTargetFrame(aStrVal);
+rData.SetTargetFrame(aStrVal);
 }
 else
 throw beans::UnknownPropertyException();
@@ -731,17 +724,14 @@ uno::Any ScEditFieldObj::getPropertyValueURL(const 
OUString& rName)
 }
 else// not inserted yet
 {
-const SvxFieldData* pField = getData();
-if (!pField)
-return aRet;
+const SvxURLField& rURL = static_cast(getData());
 
-const SvxURLField* pURL = static_cast(pField);
 if (rName == SC_UNONAME_URL)
-aRet <<= pURL->GetURL();
+aRet <<= rURL.GetURL();
 else if (rName == SC_UNONAME_REPR)
-aRet <<= pURL->GetRepresentation();
+aRet <<= rURL.GetRepresentation();
 else if (rName == SC_UNONAME_TARGET)
-aRet <<= pURL->GetTargetFrame();
+aRet <<= rURL.GetTargetFrame();
 else
 throw beans::UnknownPropertyException();
 }
@@ -774,9 +764,8 @@ void ScEditFieldObj::setPropertyValueFile(const OUString& 
rName, const uno::Any&
 }
 else
 {
-SvxFieldData* pField = getData();
-SvxExtFileField* pExtFile = static_cast(pField);
-pExtFile->SetFormat(eFormat);
+SvxExtFileField& rExtFile = 
static_cast(getData());
+rExtFile.SetFormat(eFormat);
 }
 }
 
@@ -798,7 +787,7 @@ uno::Any ScEditFieldObj::getPropertyValueFile(const 
OUString& rName)
 aSelection.nStartPara, aSelection.nStartPos, 
text::textfield::Type::EXTENDED_FILE);
 }
 else
-pField = getData();
+pField = &getData();
 
 OSL_ENSURE(pField, "setPropertyValueFile: Field not found");
 if (!pField)
@@ -809,7 +798,6 @@ uno::Any ScEditFieldObj::getPropertyValueFile(const 
OUString& rName)
 sal_Int16 nIntVal = lcl_SvxToUnoFileFormat(eFormat);
 aRet <<= nIntVal;
 
-
 return aRet;
 }
 
@@ -1046,16 +1034,12 @@ void ScEditFieldObj::setPropertyValueSheet(const 
OUString& rName, const uno::Any
 }
 
 // Edit engine instance not yet present.  Store the item data for later 
use.
-SvxFieldData* pData = getData();
-if (!pData)
-throw uno::RuntimeException();
-
-SvxTableField* p = static_cast(pData);
+SvxTableField& r = static_cast(getData());
 if (rName != SC_UNONAME_TABLEPOS)
 throw beans::UnknownPropertyException();
 
 sal_Int32 nTab = rVal.get();
-p->SetTab(nTab);
+r.SetTab(nTab);
 }
 
 ScEditFieldObj::ScEditFieldObj(
@@ -,7 +1095,7 @@ ScEditFieldObj::~ScEditFieldObj()
 SvxFieldItem ScEditFieldObj::CreateFieldItem()
 {
 OSL_ENSURE( !mpEditSource, "CreateFieldItem with inserted field"

[Libreoffice-commits] core.git: canvas/source cui/source dbaccess/source reportdesign/source sc/source sd/source svx/source sw/source vcl/source

2018-11-03 Thread Libreoffice Gerrit user
 canvas/source/directx/dx_bitmapcanvashelper.cxx|   12 -
 cui/source/tabpages/connect.cxx|  119 -
 dbaccess/source/core/dataaccess/documentdefinition.cxx |8 -
 dbaccess/source/ui/control/FieldDescControl.cxx|   26 +--
 reportdesign/source/ui/report/DesignView.cxx   |3 
 sc/source/filter/excel/excform.cxx |5 
 sc/source/ui/view/dbfunc3.cxx  |   35 ++---
 sd/source/ui/docshell/docshel4.cxx |   12 -
 sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx|5 
 sd/source/ui/view/DocumentRenderer.cxx |   15 --
 svx/source/items/customshapeitem.cxx   |   46 ++
 sw/source/core/doc/DocumentRedlineManager.cxx  |   18 +-
 sw/source/core/draw/dview.cxx  |   11 -
 sw/source/filter/ww8/docxattributeoutput.cxx   |   21 ---
 vcl/source/gdi/dibtools.cxx|9 -
 15 files changed, 115 insertions(+), 230 deletions(-)

New commits:
commit 49747ff2337fd1f4a3ee8e16d6328b8dacad99ec
Author: Mike Kaganski 
AuthorDate: Sat Nov 3 15:43:04 2018 +0300
Commit: Mike Kaganski 
CommitDate: Sat Nov 3 20:47:58 2018 +0100

tdf#120703 PVS: V547 Expression is always true/false

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

diff --git a/canvas/source/directx/dx_bitmapcanvashelper.cxx 
b/canvas/source/directx/dx_bitmapcanvashelper.cxx
index d05534bf4bc0..b6d08fbbf8df 100644
--- a/canvas/source/directx/dx_bitmapcanvashelper.cxx
+++ b/canvas/source/directx/dx_bitmapcanvashelper.cxx
@@ -160,9 +160,6 @@ namespace dxcanvas
 ENSURE_OR_THROW( mpTarget,
   "::dxcanvas::BitmapCanvasHelper::getData(): 
disposed" );
 
-if( !mpTarget )
-return uno::Sequence< sal_Int8 >();
-
 bitmapLayout = getMemoryLayout();
 return mpTarget->getData(bitmapLayout,rect);
 }
@@ -176,9 +173,6 @@ namespace dxcanvas
 ENSURE_OR_THROW( mpTarget,
   "::dxcanvas::BitmapCanvasHelper::setData(): 
disposed" );
 
-if( !mpTarget )
-return;
-
 mpTarget->setData(data,bitmapLayout,rect);
 }
 
@@ -191,9 +185,6 @@ namespace dxcanvas
 ENSURE_OR_THROW( mpTarget,
   "::dxcanvas::BitmapCanvasHelper::setPixel(): 
disposed" );
 
-if( !mpTarget )
-return;
-
 mpTarget->setPixel(color,bitmapLayout,pos);
 }
 
@@ -205,9 +196,6 @@ namespace dxcanvas
 ENSURE_OR_THROW( mpTarget,
   "::dxcanvas::BitmapCanvasHelper::getPixel(): 
disposed" );
 
-if( !mpTarget )
-return uno::Sequence< sal_Int8 >();
-
 bitmapLayout = getMemoryLayout();
 return mpTarget->getPixel(bitmapLayout,pos);
 }
diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index 7e9b9385f282..d71bc5623972 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -147,138 +147,84 @@ void SvxConnectionPage::Reset( const SfxItemSet* rAttrs )
 // SdrEdgeNode1HorzDistItem
 if( !pItem )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE1HORZDIST );
-if( pItem )
-{
-long nValue = static_cast( pItem 
)->GetValue();
-SetMetricValue(*m_xMtrFldHorz1, nValue, eUnit);
-}
-else
-m_xMtrFldHorz1->set_text("");
-
+SetMetricValue(*m_xMtrFldHorz1, static_cast(pItem)->GetValue(),
+   eUnit);
 m_xMtrFldHorz1->save_value();
 
 // SdrEdgeNode2HorzDistItem
 pItem = GetItem( *rAttrs, SDRATTR_EDGENODE2HORZDIST );
 if( !pItem )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE2HORZDIST );
-if( pItem )
-{
-long nValue = static_cast( pItem 
)->GetValue();
-SetMetricValue(*m_xMtrFldHorz2, nValue, eUnit);
-}
-else
-m_xMtrFldHorz2->set_text("");
-
+SetMetricValue(*m_xMtrFldHorz2, static_cast(pItem)->GetValue(),
+   eUnit);
 m_xMtrFldHorz2->save_value();
 
 // SdrEdgeNode1VertDistItem
 pItem = GetItem( *rAttrs, SDRATTR_EDGENODE1VERTDIST );
 if( !pItem )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE1VERTDIST );
-if( pItem )
-{
-long nValue = static_cast( pItem 
)->GetValue();
-SetMetricValue(*m_xMtrFldVert1, nValue, eUnit);
-}
-else
-m_xMtrFldVert1->set_text("");
-
+SetMetricValue(*m_xMtrFldVert1, static_cast(pItem)->GetValue(),
+   eUnit);
 m_xMtrFldVert1->save_value();
 
 // SdrEdgeNode2VertDistItem
 pItem = GetItem( *rAttrs, SDRATTR_EDGENODE2VERTDIST );
 if( !pItem )
 pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE2VERTDIST );
-if( pItem )
-{
-long nValue = static_cast( pItem 
)->GetValue();
-  

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

2018-11-03 Thread Libreoffice Gerrit user
 sc/source/ui/app/client.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 0981f1d8c8a8918b5f28bf5605023b07e73b0d44
Author: Mike Kaganski 
AuthorDate: Sat Nov 3 21:30:57 2018 +0300
Commit: Mike Kaganski 
CommitDate: Sat Nov 3 20:39:18 2018 +0100

tdf#120703 PVS: V581

V581 The conditional expressions of the 'if' statements situated alongside
 each other are identical. Check lines: 153, 181.

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

diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index 316e31bf875f..42da11f3d8b4 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -172,10 +172,8 @@ void ScClient::ObjectAreaChanged()
 
 //  set document modified (SdrModel::SetChanged is not used)
 pViewSh->GetViewData().GetDocShell()->SetDrawModified();
+pViewSh->ScrollToObject(pDrawObj);
 }
-
-if (pDrawObj)
-pViewSh->ScrollToObject( pDrawObj );
 }
 
 void ScClient::ViewChanged()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: icon-themes/elementary icon-themes/elementary_svg officecfg/registry

2018-11-03 Thread Libreoffice Gerrit user
 icon-themes/elementary/cmd/32/basicshapes.frame.png |binary
 icon-themes/elementary/cmd/32/columnwidth.png   |binary
 icon-themes/elementary/cmd/32/diagramdata.png   |binary
 icon-themes/elementary/cmd/32/hidecolumn.png|binary
 icon-themes/elementary/cmd/32/hiderow.png   |binary
 icon-themes/elementary/cmd/32/insertenvelope.png|binary
 icon-themes/elementary/cmd/32/leftpanedraw.png  |binary
 icon-themes/elementary/cmd/32/removefiltersort.png  |binary
 icon-themes/elementary/cmd/32/rowheight.png |binary
 icon-themes/elementary/cmd/32/selecttable.png   |binary
 icon-themes/elementary/cmd/32/showcolumn.png|binary
 icon-themes/elementary/cmd/32/showrow.png   |binary
 icon-themes/elementary/cmd/32/showtrackedchanges.png|binary
 icon-themes/elementary/cmd/32/sidebar.png   |binary
 icon-themes/elementary/cmd/32/tableselectall.png|binary
 icon-themes/elementary/cmd/lc_columnwidth.png   |binary
 icon-themes/elementary/cmd/lc_deletecolumns.png |binary
 icon-themes/elementary/cmd/lc_diagramdata.png   |binary
 icon-themes/elementary/cmd/lc_entirecolumn.png  |binary
 icon-themes/elementary/cmd/lc_hidecolumn.png|binary
 icon-themes/elementary/cmd/lc_hiderow.png   |binary
 icon-themes/elementary/cmd/lc_insertenvelope.png|binary
 icon-themes/elementary/cmd/lc_leftpanedraw.png  |binary
 icon-themes/elementary/cmd/lc_outputqualityblackwhite.png   |binary
 icon-themes/elementary/cmd/lc_outputqualitycolor.png|binary
 icon-themes/elementary/cmd/lc_outputqualitygrayscale.png|binary
 icon-themes/elementary/cmd/lc_rowheight.png |binary
 icon-themes/elementary/cmd/lc_sbaexecutesql.png |binary
 icon-themes/elementary/cmd/lc_showcolumn.png|binary
 icon-themes/elementary/cmd/lc_showrow.png   |binary
 icon-themes/elementary/cmd/lc_showtrackedchanges.png|binary
 icon-themes/elementary/cmd/lc_sidebar.png   |binary
 icon-themes/elementary/cmd/lc_square_unfilled.png   |binary
 icon-themes/elementary/cmd/lc_tableselectall.png|binary
 icon-themes/elementary/cmd/sc_circlecut_unfilled.png|binary
 icon-themes/elementary/cmd/sc_columnwidth.png   |binary
 icon-themes/elementary/cmd/sc_dataarearefresh.png   |binary
 icon-themes/elementary/cmd/sc_datafilterspecialfilter.png   |binary
 icon-themes/elementary/cmd/sc_dbnewviewsql.png  |binary
 icon-themes/elementary/cmd/sc_diagramdata.png   |binary
 icon-themes/elementary/cmd/sc_displaymode.png   |binary
 icon-themes/elementary/cmd/sc_ellipsecut_unfilled.png   |binary
 icon-themes/elementary/cmd/sc_hidecolumn.png|binary
 icon-themes/elementary/cmd/sc_hiderow.png   |binary
 icon-themes/elementary/cmd/sc_insertenvelope.png|binary
 icon-themes/elementary/cmd/sc_leftpanedraw.png  |binary
 icon-themes/elementary/cmd/sc_rowheight.png |binary
 icon-themes/elementary/cmd/sc_sbaexecutesql.png |binary
 icon-themes/elementary/cmd/sc_sbanativesql.png  |binary
 icon-themes/elementary/cmd/sc_setminimalcolumnwidth.png |binary
 icon-themes/elementary/cmd/sc_showcolumn.png|binary
 icon-themes/elementary/cmd/sc_showrow.png   |binary
 icon-themes/elementary/cmd/sc_showtrackedchanges.png|binary
 icon-themes/elementary/cmd/sc_square_unfilled.png   |binary
 icon-themes/elementary/cmd/sc_tableselectall.png|binary
 icon-themes/elementary/links.txt|   31 
 icon-themes/elementary/res/baswatr.png  |binary
 icon-themes/elementary_svg/cmd/32/basicshapes.frame.svg |2 
 icon-themes/elementary_svg/cmd/32/columnwidth.svg   |1 
 icon-themes/elementary_svg/cmd/32/diagramdata.svg   |2 
 icon-themes/elementary_svg/cmd/32/hidecolumn.svg|1 
 icon-themes/elementary_svg/cmd/32/hiderow.svg   |1 
 icon-themes/elementary_svg/cmd/32/insertenvelope.svg|2 
 icon-themes/elementary_svg/cmd/32/leftpanedraw.svg  |1 
 icon-themes/elementary_svg/cmd/32/removefiltersort.svg  | 

[Libreoffice-commits] core.git: icon-themes/karasa_jaga

2018-11-03 Thread Libreoffice Gerrit user
 dev/null|binary
 icon-themes/karasa_jaga/chart2/res/dataeditor_icon07.png|binary
 icon-themes/karasa_jaga/cmd/32/columnwidth.png  |binary
 icon-themes/karasa_jaga/cmd/32/dataconsolidate.png  |binary
 icon-themes/karasa_jaga/cmd/32/datasubtotals.png|binary
 icon-themes/karasa_jaga/cmd/32/formatgroup.png  |binary
 icon-themes/karasa_jaga/cmd/32/formatungroup.png|binary
 icon-themes/karasa_jaga/cmd/32/group.png|binary
 icon-themes/karasa_jaga/cmd/32/insertenvelope.png   |binary
 icon-themes/karasa_jaga/cmd/32/mailmergecreatedocuments.png |binary
 icon-themes/karasa_jaga/cmd/32/mailmergeemaildocuments.png  |binary
 icon-themes/karasa_jaga/cmd/32/mailmergeprintdocuments.png  |binary
 icon-themes/karasa_jaga/cmd/32/mailmergesavedocuments.png   |binary
 icon-themes/karasa_jaga/cmd/32/mergecells.png   |binary
 icon-themes/karasa_jaga/cmd/32/name.png |binary
 icon-themes/karasa_jaga/cmd/32/rowheight.png|binary
 icon-themes/karasa_jaga/cmd/32/setminimalcolumnwidth.png|binary
 icon-themes/karasa_jaga/cmd/32/setminimalrowheight.png  |binary
 icon-themes/karasa_jaga/cmd/32/ungroup.png  |binary
 icon-themes/karasa_jaga/cmd/32/validation.png   |binary
 icon-themes/karasa_jaga/cmd/lc_columnwidth.png  |binary
 icon-themes/karasa_jaga/cmd/lc_dataconsolidate.png  |binary
 icon-themes/karasa_jaga/cmd/lc_datasubtotals.png|binary
 icon-themes/karasa_jaga/cmd/lc_formatgroup.png  |binary
 icon-themes/karasa_jaga/cmd/lc_formatungroup.png|binary
 icon-themes/karasa_jaga/cmd/lc_group.png|binary
 icon-themes/karasa_jaga/cmd/lc_insertenvelope.png   |binary
 icon-themes/karasa_jaga/cmd/lc_mailmergecreatedocuments.png |binary
 icon-themes/karasa_jaga/cmd/lc_mailmergeemaildocuments.png  |binary
 icon-themes/karasa_jaga/cmd/lc_mailmergeprintdocuments.png  |binary
 icon-themes/karasa_jaga/cmd/lc_mailmergesavedocuments.png   |binary
 icon-themes/karasa_jaga/cmd/lc_mergecells.png   |binary
 icon-themes/karasa_jaga/cmd/lc_name.png |binary
 icon-themes/karasa_jaga/cmd/lc_rowheight.png|binary
 icon-themes/karasa_jaga/cmd/lc_setminimalcolumnwidth.png|binary
 icon-themes/karasa_jaga/cmd/lc_setminimalrowheight.png  |binary
 icon-themes/karasa_jaga/cmd/lc_ungroup.png  |binary
 icon-themes/karasa_jaga/cmd/lc_validation.png   |binary
 icon-themes/karasa_jaga/cmd/sc_columnwidth.png  |binary
 icon-themes/karasa_jaga/cmd/sc_dataconsolidate.png  |binary
 icon-themes/karasa_jaga/cmd/sc_datasubtotals.png|binary
 icon-themes/karasa_jaga/cmd/sc_formatgroup.png  |binary
 icon-themes/karasa_jaga/cmd/sc_formatungroup.png|binary
 icon-themes/karasa_jaga/cmd/sc_group.png|binary
 icon-themes/karasa_jaga/cmd/sc_hidecolumn.png   |binary
 icon-themes/karasa_jaga/cmd/sc_hiderow.png  |binary
 icon-themes/karasa_jaga/cmd/sc_insertenvelope.png   |binary
 icon-themes/karasa_jaga/cmd/sc_mailmergecreatedocuments.png |binary
 icon-themes/karasa_jaga/cmd/sc_mailmergeemaildocuments.png  |binary
 icon-themes/karasa_jaga/cmd/sc_mailmergeprintdocuments.png  |binary
 icon-themes/karasa_jaga/cmd/sc_mailmergesavedocuments.png   |binary
 icon-themes/karasa_jaga/cmd/sc_mergecells.png   |binary
 icon-themes/karasa_jaga/cmd/sc_name.png |binary
 icon-themes/karasa_jaga/cmd/sc_rowheight.png|binary
 icon-themes/karasa_jaga/cmd/sc_saveacopy.png|binary
 icon-themes/karasa_jaga/cmd/sc_saveastemplate.png   |binary
 icon-themes/karasa_jaga/cmd/sc_savebackground.png   |binary
 icon-themes/karasa_jaga/cmd/sc_setminimalcolumnwidth.png|binary
 icon-themes/karasa_jaga/cmd/sc_setminimalrowheight.png  |binary
 icon-themes/karasa_jaga/cmd/sc_setoptimalcolumnwidth.png|binary
 icon-themes/karasa_jaga/cmd/sc_showcolumn.png   |binary
 icon-themes/karasa_jaga/cmd/sc_showrow.png  |binary
 icon-themes/karasa_jaga/cmd/sc_ungroup.png  |binary
 icon-themes/karasa_jaga/cmd/sc_validation.png   |binary
 icon-themes/karasa_jaga/links.txt   |   36 +++-
 icon-themes/karasa_jaga/sc/res/nc01.png |binary
 66 files changed, 22 insertions(+), 14 deletions(-)

New commits:
commit fd03b130525b9d7683c14939f6eec36895031930
Author: Rizal Muttaqin 
AuthorDate: Sun Nov 4 00:59:53 2018 +0700
Commit: Rizal Muttaqin 
CommitDate: Sat Nov 3 19:37:40 2018 +0100

KJ: Fix for tdf#120300, tdf#120831, tdf#119731, tdf#111950 add Calc's sheet 
context menu, etc

Change-Id: I66cde29f8b64c5212f748930b5575763f54e59bd
Reviewed-on:

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

2018-11-03 Thread Libreoffice Gerrit user
 vcl/osx/salinst.cxx|4 +++-
 vcl/osx/salprn.cxx |4 +++-
 vcl/quartz/salgdiutils.cxx |8 ++--
 vcl/quartz/salvd.cxx   |4 +++-
 4 files changed, 15 insertions(+), 5 deletions(-)

New commits:
commit 074b2e327021c0a65fedf2fe9d327029c8be7a45
Author: Stephan Bergmann 
AuthorDate: Sat Nov 3 18:27:36 2018 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Nov 3 19:35:07 2018 +0100

Still use 'graphicsPort', even if deprecated in macOS 10.14

...macOS 10.9 reportedly doesn't yet support the 'CGContext' replacement, 
see
the comments to 
"loplugin:redundantcast".

This reverts c3c88d6bbe4109fcf1a6d53e947faec775c96e42 
"loplugin:redundantcast"
(whose commit message was rather misleading; the redundantcast warnings were
merely a follow-up to the commit's actual meat, of replacing deprecated 
uses of
'graphicsPort' with 'CGContext'; I had failed to realize that when I 
chunked the
various changes necessary for 10.14 into several individual commits) and 
adds
SAL_WNODEPRECATED_DECLARATIONS_PUSH/POP instead.

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

diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 7886f8efa129..b3797c958f4d 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -948,7 +948,9 @@ NSImage* CreateNSImage( const Image& rImage )
 {
 [pImage lockFocusFlipped:YES];
 NSGraphicsContext* pContext = [NSGraphicsContext currentContext];
-CGContextRef rCGContext = [pContext CGContext];
+SAL_WNODEPRECATED_DECLARATIONS_PUSH // 'graphicsPort' is deprecated: first 
deprecated in macOS 10.14
+CGContextRef rCGContext = static_cast([pContext 
graphicsPort]);
+SAL_WNODEPRECATED_DECLARATIONS_POP
 
 const CGRect aDstRect = { {0, 0}, { 
static_cast(aSize.Width()), static_cast(aSize.Height()) } };
 CGContextDrawImage( rCGContext, aDstRect, xImage );
diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx
index 34f8cbb60e26..d8498ff6a364 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -547,7 +547,9 @@ SalGraphics* AquaSalInfoPrinter::StartPage( ImplJobSetup* 
i_pSetupData, bool i_b
 if( i_bNewJobData && i_pSetupData )
 SetPrinterData( i_pSetupData );
 
-CGContextRef rContext = [[NSGraphicsContext currentContext] CGContext];
+SAL_WNODEPRECATED_DECLARATIONS_PUSH // 'graphicsPort' is deprecated: first 
deprecated in macOS 10.14
+CGContextRef rContext = static_cast([[NSGraphicsContext 
currentContext] graphicsPort]);
+SAL_WNODEPRECATED_DECLARATIONS_POP
 
 SetupPrinterGraphics( rContext );
 
diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx
index 22a2ad041f65..6ef9a2430c29 100644
--- a/vcl/quartz/salgdiutils.cxx
+++ b/vcl/quartz/salgdiutils.cxx
@@ -118,7 +118,9 @@ bool AquaSalGraphics::CheckContext()
 {
 const CGSize aLayerSize = { static_cast(nWidth), 
static_cast(nHeight) };
 NSGraphicsContext* pNSGContext = [NSGraphicsContext 
graphicsContextWithWindow: mpFrame->getNSWindow()];
-CGContextRef xCGContext = [pNSGContext CGContext];
+SAL_WNODEPRECATED_DECLARATIONS_PUSH // 'graphicsPort' is deprecated: first 
deprecated in macOS 10.14
+CGContextRef xCGContext = static_cast([pNSGContext 
graphicsPort]);
+SAL_WNODEPRECATED_DECLARATIONS_POP
 mxLayer = CGLayerCreateWithContext( xCGContext, aLayerSize, 
nullptr );
 SAL_INFO( "vcl.cg", "CGLayerCreateWithContext(" << xCGContext << 
"," << aLayerSize << ",NULL) = " << mxLayer );
 if( mxLayer )
@@ -192,7 +194,9 @@ void AquaSalGraphics::UpdateWindow( NSRect& )
 NSGraphicsContext* pContext = [NSGraphicsContext currentContext];
 if( (mxLayer != nullptr) && (pContext != nullptr) )
 {
-CGContextRef rCGContext = [pContext CGContext];
+SAL_WNODEPRECATED_DECLARATIONS_PUSH // 'graphicsPort' is deprecated: first 
deprecated in macOS 10.14
+CGContextRef rCGContext = static_cast([pContext 
graphicsPort]);
+SAL_WNODEPRECATED_DECLARATIONS_POP
 SAL_INFO( "vcl.cg", "[[NSGraphicsContext currentContext] graphicsPort] 
= " << rCGContext );
 
 CGMutablePathRef rClip = mpFrame->getClipPath();
diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx
index d752a2d84acf..333276678b57 100644
--- a/vcl/quartz/salvd.cxx
+++ b/vcl/quartz/salvd.cxx
@@ -264,7 +264,9 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
 NSGraphicsContext* pNSContext = [NSGraphicsContext 
graphicsContextWithWindow: pNSWindow];
 if( pNSContext )
 {
-xCGContext = [pNSContext CGContext];
+SAL_WNODEPRECATED_DECLARATIONS_PUSH // 'graphicsPort' is deprecated: first 
deprecated in macOS 10.14
+xCGContext = static_cast([pNSContext 
graphicsPo

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - default_images/svx svx/source

2018-11-03 Thread Libreoffice Gerrit user
 default_images/svx/res/frmsel.png |binary
 dev/null  |binary
 svx/source/dialog/frmsel.src  |2 +-
 3 files changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4fc07e4c391c6ae499ce1627845fd18d720f68ae
Author: Matthias Seidel 
AuthorDate: Sat Nov 3 15:08:21 2018 +
Commit: Matthias Seidel 
CommitDate: Sat Nov 3 15:08:21 2018 +

Cleaning up frame selector resources

diff --git a/default_images/svx/res/frmsel.bmp 
b/default_images/svx/res/frmsel.bmp
deleted file mode 100644
index fd22f2b0c6a6..
Binary files a/default_images/svx/res/frmsel.bmp and /dev/null differ
diff --git a/default_images/svx/res/frmsel.png 
b/default_images/svx/res/frmsel.png
new file mode 100644
index ..5f70c833c0fb
Binary files /dev/null and b/default_images/svx/res/frmsel.png differ
diff --git a/svx/source/dialog/frmsel.src b/svx/source/dialog/frmsel.src
index d707f620d908..a6cfe98cd4fd 100644
--- a/svx/source/dialog/frmsel.src
+++ b/svx/source/dialog/frmsel.src
@@ -61,6 +61,6 @@ Resource RID_SVXSTR_BORDER_CONTROL
 };
 };
 
-Bitmap BMP_FRMSEL_ARROWS { File = "frmsel.bmp"; };
+Bitmap BMP_FRMSEL_ARROWS { File = "frmsel.png" ; } ;
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-03 Thread Libreoffice Gerrit user
 writerfilter/source/dmapper/DomainMapper.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 709d75853105e4fd7e5981a37a6dd95e7b9620ee
Author: Mike Kaganski 
AuthorDate: Sat Nov 3 18:57:23 2018 +0300
Commit: Mike Kaganski 
CommitDate: Sat Nov 3 17:56:04 2018 +0100

tdf#120703 PVS: V547 Expression is always false

This resulted from commit 009e3f4841378f13a2764a2c84e147e401b70525
which failed to replace some of numeric sprm ids with mnemonic names.

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

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index d88785b3196a..fce5cfe28b49 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1555,7 +1555,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const 
PropertyMapPtr& rContext )
 uno::Any aStyleVal = 
m_pImpl->GetPropertyFromStyleSheet(ePropertyId);
 if( !aStyleVal.hasValue() )
 {
-nIntValue = 0x83a == nSprmId ?
+nIntValue = NS_ooxml::LN_EG_RPrBase_smallCaps == 
nSprmId ?
 4 : 1;
 }
 else if(aStyleVal.getValueTypeClass() == 
uno::TypeClass_FLOAT )
@@ -1568,7 +1568,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const 
PropertyMapPtr& rContext )
 else if((aStyleVal >>= nStyleValue) ||
 (nStyleValue = 
static_cast(comphelper::getEnumAsINT32(aStyleVal))) >= 0 )
 {
-nIntValue = 0x83a == nSprmId ?
+nIntValue = NS_ooxml::LN_EG_RPrBase_smallCaps == 
nSprmId ?
 nStyleValue ? 0 : 4 :
 nStyleValue ? 0 : 1;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - default_images/res default_images/vcl vcl/source

2018-11-03 Thread Libreoffice Gerrit user
 default_images/res/printeradmin_16.png   |binary
 default_images/res/printeradmin_16_8.png |binary
 default_images/res/printeradmin_32.png   |binary
 default_images/res/printeradmin_32_8.png |binary
 default_images/res/printeradmin_48_8.png |binary
 default_images/vcl/res/checkmono.png |binary
 default_images/vcl/res/radiomono.png |binary
 dev/null |binary
 vcl/source/src/images.src|   38 +++
 9 files changed, 19 insertions(+), 19 deletions(-)

New commits:
commit 08ae88d23ae14916ece612d3096b68969f837b25
Author: Matthias Seidel 
AuthorDate: Sat Nov 3 14:55:02 2018 +
Commit: Matthias Seidel 
CommitDate: Sat Nov 3 14:55:02 2018 +

Cleaning up image resources

diff --git a/default_images/vcl/res/checkmono.bmp 
b/default_images/vcl/res/checkmono.bmp
deleted file mode 100644
index 7e0610d5e9d8..
Binary files a/default_images/vcl/res/checkmono.bmp and /dev/null differ
diff --git a/default_images/vcl/res/checkmono.png 
b/default_images/vcl/res/checkmono.png
new file mode 100644
index ..2fe75777cffb
Binary files /dev/null and b/default_images/vcl/res/checkmono.png differ
diff --git a/default_images/vcl/res/radiomono.bmp 
b/default_images/vcl/res/radiomono.bmp
deleted file mode 100644
index 6c757c34bac8..
Binary files a/default_images/vcl/res/radiomono.bmp and /dev/null differ
diff --git a/default_images/vcl/res/radiomono.png 
b/default_images/vcl/res/radiomono.png
new file mode 100644
index ..f4bbc9f8dae2
Binary files /dev/null and b/default_images/vcl/res/radiomono.png differ
diff --git a/vcl/source/src/images.src b/vcl/source/src/images.src
index 35c5a4d65bfb..ed813e2c4e53 100644
--- a/vcl/source/src/images.src
+++ b/vcl/source/src/images.src
@@ -29,90 +29,90 @@
 
 Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_STDOFFSET)
 {
-File = "check.bmp";
+File = "check.png" ;
 };
 
 
 Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_MONOOFFSET)
 {
-File = "checkmono.bmp";
+File = "checkmono.png" ;
 };
 
 Bitmap (SV_RESID_BITMAP_SCROLLBMP)
 {
-File = "scrbmp.bmp";
+File = "scrbmp.png" ;
 };
 
 Bitmap (SV_RESID_BITMAP_SCROLLMSK)
 {
-File = "scrmsk.bmp";
+File = "scrmsk.png" ;
 };
 
 // ---
 
 Bitmap (SV_RESID_BITMAP_RADIO + SV_RESID_STDOFFSET)
 {
-File = "radio.bmp";
+File = "radio.png" ;
 };
 
 Bitmap (SV_RESID_BITMAP_RADIO + SV_RESID_MONOOFFSET)
 {
-File = "radiomono.bmp";
+File = "radiomono.png" ;
 };
 
 // ---
 
 Bitmap SV_RESID_BITMAP_MSGBOX
 {
-File = "msgbox.png";
+File = "msgbox.png" ;
 };
 
 // ---
 
 Bitmap SV_RESID_BITMAP_MSGBOX_HC
 {
-File = "msgbox_hc.png";
+File = "msgbox_hc.png" ;
 };
 
 // ---
 
 Bitmap SV_RESID_BITMAP_PIN
 {
-File = "pin.bmp";
+File = "pin.png" ;
 };
 
 // ---
 
 Bitmap SV_RESID_BITMAP_CLOSEDOC
 {
-File = "closedoc.bmp";
+File = "closedoc.png" ;
 };
 
 Bitmap SV_RESID_BITMAP_CLOSEDOCHC
 {
-File = "closedochc.bmp";
+File = "closedochc.png" ;
 };
 
 // ---
 
 Bitmap SV_RESID_BITMAP_SPLITHPIN
 {
-File = "splhpin.bmp";
+File = "splhpin.png" ;
 };
 
 Bitmap SV_RESID_BITMAP_SPLITVPIN
 {
-File = "splvpin.bmp";
+File = "splvpin.png" ;
 };
 
 Bitmap SV_RESID_BITMAP_SPLITHARW
 {
-File = "splharw.bmp";
+File = "splharw.png" ;
 };
 
 Bitmap SV_RESID_BITMAP_SPLITVARW
 {
-File = "splvarw.bmp";
+File = "splvarw.png" ;
 };
 
 // ---
@@ -787,21 +787,21 @@ Bitmap (SV_ICON_SMALL_HC_START + SV_ICON_ID_PRINTERADMIN)
 
 Bitmap SV_DISCLOSURE_PLUS
 {
-File = "plus.png";
+File = "plus.png" ;
 };
 
 Bitmap SV_DISCLOSURE_PLUS_HC
 {
-File = "plus_sch.png";
+File = "plus_sch.png" ;
 };
 
 Bitmap SV_DISCLOSURE_MINUS
 {
-File = "minus.png";
+File = "minus.png" ;
 };
 
 Bitmap SV_DISCLOSURE_MINUS_HC
 {
-File = "minus_sch.png";
+File = "minus_sch.png" ;
 };
 
commit 6ebf4c63636a28aada09388c4944276147efc4a0
Author: Matthias Seidel 
AuthorDate: Sat Nov 3 14:20:00 2018 +
Commit: Matthias Seidel 
CommitDate: Sat Nov 3 14:20:00 2018 +

Use flat Orb for printeradmin icon

diff --git a/default_images/res/printeradmin_16.png 
b/default_images/res/printeradmin_16.png
index 399076c9934d..1ea7d9e9f867 100644
Binary files a/default_images/res/printeradmin_16.png and 
b/default_images/res/printeradmin_16.png differ
diff --git a/default_images/res/printeradmin_16_8.png 
b/default_images/res/printeradmin_16_8.png
index 399076c9934d..1ea7d9e9f867 100644
Binary files

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

2018-11-03 Thread Libreoffice Gerrit user
 sw/source/filter/html/htmlflywriter.cxx |6 -
 sw/source/filter/html/htmltabw.cxx  |   10 +--
 sw/source/filter/html/swhtml.cxx|5 -
 sw/source/filter/writer/writer.cxx  |5 -
 sw/source/filter/ww8/WW8FFData.cxx  |9 --
 sw/source/filter/ww8/WW8TableInfo.cxx   |   20 +-
 sw/source/filter/ww8/docxattributeoutput.cxx|   13 ++--
 sw/source/filter/ww8/docxexport.cxx |   10 ---
 sw/source/filter/ww8/docxsdrexport.cxx  |   21 ++
 sw/source/filter/ww8/writerhelper.cxx   |6 -
 sw/source/filter/ww8/wrtw8esh.cxx   |   77 ++--
 sw/source/filter/ww8/wrtw8nds.cxx   |   54 +---
 sw/source/filter/ww8/wrtw8sty.cxx   |   10 +--
 sw/source/filter/ww8/wrtww8.cxx |   61 ---
 sw/source/filter/ww8/wrtww8gr.cxx   |   14 +---
 sw/source/filter/ww8/ww8graf2.cxx   |   21 +-
 sw/source/filter/ww8/ww8par.cxx |   50 +--
 sw/source/filter/ww8/ww8par5.cxx|   23 ++-
 sw/source/filter/ww8/ww8par6.cxx|   10 +--
 sw/source/filter/ww8/ww8toolbar.cxx |   54 +++-
 sw/source/filter/xml/XMLRedlineImportHelper.cxx |5 -
 sw/source/filter/xml/xmlfmte.cxx|   13 +---
 sw/source/filter/xml/xmltble.cxx|2 
 sw/source/filter/xml/xmltbli.cxx|   42 +++--
 sw/source/filter/xml/xmltexti.cxx   |9 --
 25 files changed, 219 insertions(+), 331 deletions(-)

New commits:
commit 4284f618557992fdf12574f8fd014be76ec9fffc
Author: Arkadiy Illarionov 
AuthorDate: Sat Nov 3 15:10:04 2018 +0300
Commit: Noel Grandin 
CommitDate: Sat Nov 3 16:00:36 2018 +0100

Simplify containers iterations in sw/source/filter

Use range-based loop or replace with STL functions.

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

diff --git a/sw/source/filter/html/htmlflywriter.cxx 
b/sw/source/filter/html/htmlflywriter.cxx
index efbb9cce6837..4993f21176a7 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -295,9 +295,9 @@ void SwHTMLWriter::CollectFlyFrames()
 
 SwPosFlyFrames aFlyPos(m_pDoc->GetAllFlyFormats(m_bWriteAll ? nullptr : 
m_pCurrentPam, true));
 
-for(SwPosFlyFrames::const_iterator aIter(aFlyPos.begin()); aIter != 
aFlyPos.end(); ++aIter)
+for(const auto& rpItem : aFlyPos)
 {
-const SwFrameFormat& rFrameFormat = (*aIter)->GetFormat();
+const SwFrameFormat& rFrameFormat = rpItem->GetFormat();
 const SdrObject *pSdrObj = nullptr;
 const SwPosition *pAPos;
 const SwContentNode *pACNd;
@@ -347,7 +347,7 @@ void SwHTMLWriter::CollectFlyFrames()
 if( !m_pHTMLPosFlyFrames )
 m_pHTMLPosFlyFrames.reset(new SwHTMLPosFlyFrames);
 
-m_pHTMLPosFlyFrames->insert( 
o3tl::make_unique(**aIter, pSdrObj, nMode) );
+m_pHTMLPosFlyFrames->insert( 
o3tl::make_unique(*rpItem, pSdrObj, nMode) );
 }
 }
 
diff --git a/sw/source/filter/html/htmltabw.cxx 
b/sw/source/filter/html/htmltabw.cxx
index a2e93d6bd9f8..600d27c5dc72 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -196,10 +196,9 @@ static bool lcl_TableBox_HasTabBorders( const SwTableBox* 
pBox, bool *pBorders )
 
 if( !pBox->GetSttNd() )
 {
-for( SwTableLines::const_iterator it = pBox->GetTabLines().begin();
- it != pBox->GetTabLines().end(); ++it)
+for( const auto& rpLine : pBox->GetTabLines() )
 {
-if ( lcl_TableLine_HasTabBorders( *it, pBorders ) )
+if ( lcl_TableLine_HasTabBorders( rpLine, pBorders ) )
 break;
 }
 }
@@ -220,10 +219,9 @@ static bool lcl_TableLine_HasTabBorders( const 
SwTableLine* pLine, bool *pBorder
 if( *pBorders )
 return false;
 
-for( SwTableBoxes::const_iterator it = pLine->GetTabBoxes().begin();
- it != pLine->GetTabBoxes().end(); ++it)
+for( const auto& rpBox : pLine->GetTabBoxes() )
 {
-if ( lcl_TableBox_HasTabBorders( *it, pBorders ) )
+if ( lcl_TableBox_HasTabBorders( rpBox, pBorders ) )
 break;
 }
 return !*pBorders;
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 879a95e0db9b..042ab0d1563d 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -472,9 +472,8 @@ SwHTMLParser::~SwHTMLParser()
 if( !m_aSetAttrTab.empty() )
 {
 OSL_ENSURE( m_aSetAttrTab.empty(),"There are still attributes on the 
stack" );
-for ( HTMLAttrs::const_iterator it = m_aSetAttrTab.begin();
-  it != m_aSetAttrTab.end(); ++it )
- 

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

2018-11-03 Thread Libreoffice Gerrit user
 desktop/source/lib/init.cxx |   32 
 1 file changed, 32 insertions(+)

New commits:
commit f575cf3320684efe7db9844da89a5ebdb3083498
Author: Tor Lillqvist 
AuthorDate: Sat Nov 3 01:44:16 2018 +0200
Commit: Tor Lillqvist 
CommitDate: Sat Nov 3 15:33:19 2018 +0100

Create a CG bitmap context in doc_paintWindow(), too, for iOS

Just like in doc_paintTile().

Now at least some of the dialogs work in the iOS app, yay.

Change-Id: I10c7eeb1f121ba68a1af723d45575890b1d598da
Reviewed-on: https://gerrit.libreoffice.org/62800
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2496f9285c05..cc49f86e6d85 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2159,6 +2159,9 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis,
 
 #ifdef IOS
 
+// This function is separate only to be used by LibreOfficeLight. If that app 
can be retired, this
+// function's code can be inlined into the iOS part of doc_paintTile().
+
 static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis,
  void* rCGContext,
  const int nCanvasWidth, const int 
nCanvasHeight,
@@ -3572,6 +3575,33 @@ static void doc_paintWindow(LibreOfficeKitDocument* 
/*pThis*/, unsigned nLOKWind
 return;
 }
 
+#if defined(IOS)
+
+CGContextRef cgc = CGBitmapContextCreate(pBuffer, nWidth, nHeight, 8, 
nWidth*4, CGColorSpaceCreateDeviceRGB(), kCGImageAlphaNoneSkipFirst | 
kCGImageByteOrder32Little);
+
+CGContextTranslateCTM(cgc, 0, nHeight);
+CGContextScaleCTM(cgc, 1, -1);
+
+SystemGraphicsData aData;
+aData.rCGContext = cgc;
+
+ScopedVclPtrInstance pDevice(&aData, Size(1, 1), 
DeviceFormat::DEFAULT);
+pDevice->SetBackground(Wallpaper(COL_TRANSPARENT));
+
+pDevice->SetOutputSizePixel(Size(nWidth, nHeight));
+
+MapMode aMapMode(pDevice->GetMapMode());
+aMapMode.SetOrigin(Point(-nX, -nY));
+pDevice->SetMapMode(aMapMode);
+
+comphelper::LibreOfficeKit::setDialogPainting(true);
+pWindow->PaintToDevice(pDevice.get(), Point(0, 0), Size());
+comphelper::LibreOfficeKit::setDialogPainting(false);
+
+CGContextRelease(cgc);
+
+#else
+
 ScopedVclPtrInstance pDevice(nullptr, Size(1, 1), 
DeviceFormat::DEFAULT);
 pDevice->SetBackground(Wallpaper(COL_TRANSPARENT));
 
@@ -3584,6 +3614,8 @@ static void doc_paintWindow(LibreOfficeKitDocument* 
/*pThis*/, unsigned nLOKWind
 comphelper::LibreOfficeKit::setDialogPainting(true);
 pWindow->PaintToDevice(pDevice.get(), Point(0, 0), Size());
 comphelper::LibreOfficeKit::setDialogPainting(false);
+
+#endif
 }
 
 static void doc_postWindow(LibreOfficeKitDocument* /*pThis*/, unsigned 
nLOKWindowId, int nAction)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-03 Thread Libreoffice Gerrit user
 include/vcl/builderfactory.hxx |   16 +---
 1 file changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 617479a003b5f3fa876e371fe16d3a5678f2c501
Author: Tor Lillqvist 
AuthorDate: Sat Nov 3 01:29:25 2018 +0200
Commit: Tor Lillqvist 
CommitDate: Sat Nov 3 15:32:59 2018 +0100

For iOS, do actually export UI builder factory functions

In the DISABLE_DYNLOADING case there is normally no need for functions
marked with SAL_DLLPUBLIC_EXPORT to be exported, as these functions
won't be dynamically looked up anyway. Thus, when DISABLE_DYNLOADING,
SAL_DLLPUBLIC_EXPORT is defined in  to actually mean
__attribute__ ((visibility("hidden"))).

But we do need to export the UI builder factory functions so that the
osl_getFunctionSymbol() in VclBuilder::makeObject() finds them.

(I kinda dislike looking up symbols with dlsym() from the same binary.
We know that the function is there and what its name is, we could just
call it directly. But makeObject() gets the function name as a string,
so we would need a long set of string comparisons to select which
function to call. A bit ugly. Let's see if I can come up with
something elegant enough later.)

Change-Id: Idceaf8c1ed54cd7d372bf4eb85d0428f9b57baeb
Reviewed-on: https://gerrit.libreoffice.org/62799
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/include/vcl/builderfactory.hxx b/include/vcl/builderfactory.hxx
index 4b8801341f49..1b2d01bd918c 100644
--- a/include/vcl/builderfactory.hxx
+++ b/include/vcl/builderfactory.hxx
@@ -13,22 +13,32 @@
 #include 
 #include 
 
+// For iOS, SAL_DLLPUBLIC_EXPORT actually expands to __attribute__
+// ((visibility("hidden"))). (Ditto for other DISABLE_DYNLOADING
+// cases, but let it be as is for them for now.) Undo that trick.
+
+#ifdef IOS
+#define BUILDER_FACTORY_EXPORT __attribute__ ((visibility("default")))
+#else
+#define BUILDER_FACTORY_EXPORT SAL_DLLPUBLIC_EXPORT
+#endif
+
 #define VCL_BUILDER_FACTORY(typeName) \
-extern "C" SAL_DLLPUBLIC_EXPORT void make##typeName(VclPtr & 
rRet, VclPtr & pParent, VclBuilder::stringmap & rMap) \
+extern "C" BUILDER_FACTORY_EXPORT void make##typeName(VclPtr 
& rRet, VclPtr & pParent, VclBuilder::stringmap & rMap) \
 { \
 (void)rMap; \
 rRet = VclPtr::Create(pParent); \
 }
 
 #define VCL_BUILDER_FACTORY_ARGS(typeName,arg1) \
-extern "C" SAL_DLLPUBLIC_EXPORT void make##typeName(VclPtr & 
rRet, VclPtr & pParent, VclBuilder::stringmap & rMap) \
+extern "C" BUILDER_FACTORY_EXPORT void make##typeName(VclPtr 
& rRet, VclPtr & pParent, VclBuilder::stringmap & rMap) \
 { \
 (void)rMap; \
 rRet = VclPtr::Create(pParent,arg1); \
 }
 
 #define VCL_BUILDER_FACTORY_CONSTRUCTOR(typeName,arg2) \
-extern "C" SAL_DLLPUBLIC_EXPORT void make##typeName(VclPtr & 
rRet, VclPtr & pParent, VclBuilder::stringmap & rMap) \
+extern "C" BUILDER_FACTORY_EXPORT void make##typeName(VclPtr 
& rRet, VclPtr & pParent, VclBuilder::stringmap & rMap) \
 { \
 OUString sBorder = BuilderUtils::extractCustomProperty(rMap); \
 WinBits wb = arg2; \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-03 Thread Libreoffice Gerrit user
 svx/source/gallery2/galctrl.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 5b32b3df5d4e19b9515ac4e71958a3cdffdc68a8
Author: Tor Lillqvist 
AuthorDate: Sat Nov 3 01:29:12 2018 +0200
Commit: Tor Lillqvist 
CommitDate: Sat Nov 3 15:32:28 2018 +0100

More !HAVE_FEATURE_AVMEDIA fallout

Change-Id: I5b2c24e555f77199782d60d56086455f04787821
Reviewed-on: https://gerrit.libreoffice.org/62798
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index 3560421cacc7..1a95c134bedb 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -238,6 +238,7 @@ void GalleryPreview::StartDrag( sal_Int8, const Point& )
 
 void GalleryPreview::PreviewMedia( const INetURLObject& rURL )
 {
+#if HAVE_FEATURE_AVMEDIA
 if (rURL.GetProtocol() != INetProtocol::NotValid)
 {
 ::avmedia::MediaFloater* pFloater = avmedia::getMediaFloater();
@@ -251,6 +252,9 @@ void GalleryPreview::PreviewMedia( const INetURLObject& 
rURL )
 if (pFloater)
 pFloater->setURL( rURL.GetMainURL( 
INetURLObject::DecodeMechanism::Unambiguous ), "", true );
 }
+#else
+(void) rURL;
+#endif
 }
 
 static void drawTransparenceBackground(vcl::RenderContext& rOut, const Point& 
rPos, const Size& rSize)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-03 Thread Libreoffice Gerrit user
 desktop/source/lib/init.cxx |   16 
 1 file changed, 16 deletions(-)

New commits:
commit 81765aa741d14dd14eba598d402c138240b23efb
Author: Tor Lillqvist 
AuthorDate: Fri Nov 2 23:39:44 2018 +0200
Commit: Tor Lillqvist 
CommitDate: Sat Nov 3 15:31:46 2018 +0100

On iOS, lok_init_2() links directly to libreofficekit_hook_2()

Thus no need for any special __attribute__ ((visibility("default")))
dance.

Change-Id: I398d588a0165fd616ea0d259bbf2cab1e1a07ccb
Reviewed-on: https://gerrit.libreoffice.org/62796
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index fca76934088c..2496f9285c05 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -4251,19 +4251,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const 
char* pAppPath, const char
 return bInitialized;
 }
 
-// Undo our clever trick of having SAL_DLLPUBLIC_EXPORT actually not
-// meaning what is says in for the DISABLE_DYNLOADING case. See
-// . Normally, when building just one big dylib (Android)
-// or executable (iOS), most of our "public" symbols don't need to be
-// visible outside that resulting dylib/executable. But
-// libreofficekit_hook must be exported for dlsym() to find it,
-// though, at least on iOS.
-
-#if defined(__GNUC__) && defined(DISABLE_DYNLOADING)
-__attribute__ ((visibility("default")))
-#else
 SAL_DLLPUBLIC_EXPORT
-#endif
 LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* 
user_profile_url)
 {
 if (!gImpl)
@@ -4279,11 +4267,7 @@ LibreOfficeKit *libreofficekit_hook_2(const char* 
install_path, const char* user
 return static_cast(gImpl);
 }
 
-#if defined(__GNUC__) && defined(DISABLE_DYNLOADING)
-__attribute__ ((visibility("default")))
-#else
 SAL_DLLPUBLIC_EXPORT
-#endif
 LibreOfficeKit *libreofficekit_hook(const char* install_path)
 {
 return libreofficekit_hook_2(install_path, nullptr);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-11-03 Thread Libreoffice Gerrit user
 include/LibreOfficeKit/LibreOfficeKitInit.h |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit a3eb2aa471bcf0573d373edfa46a6b642fe5cdb1
Author: Tor Lillqvist 
AuthorDate: Fri Nov 2 23:54:38 2018 +0200
Commit: Tor Lillqvist 
CommitDate: Sat Nov 3 15:32:07 2018 +0100

No need to mark libreofficekit_hook_2 with default visibility for iOS

Change-Id: Ib7b54ebed1c66324c79c116bd4d1e08ebaa1eac9
Reviewed-on: https://gerrit.libreoffice.org/62797
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

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


[Libreoffice-commits] core.git: 2 commits - cui/source sfx2/source svx/source sw/Module_sw.mk sw/source vcl/source

2018-11-03 Thread Libreoffice Gerrit user
 cui/source/dialogs/cuigaldlg.cxx  |   11 -
 cui/source/options/treeopt.cxx|2 +
 sfx2/source/dialog/dinfdlg.cxx|   17 ++
 svx/source/gallery2/galctrl.cxx   |3 ++
 sw/Module_sw.mk   |2 -
 sw/source/ui/dialog/swdlgfact.cxx |   40 ++
 sw/source/ui/fldui/fldedt.cxx |4 +++
 sw/source/ui/fldui/fldtdlg.cxx|   11 +
 sw/source/uibase/dialog/swabstdlg.cxx |5 
 sw/source/uibase/shells/basesh.cxx|4 +++
 vcl/source/window/abstdlg.cxx |4 ---
 11 files changed, 88 insertions(+), 15 deletions(-)

New commits:
commit 8f0e74ed6d363c6eee6874872742721ef8ae4a36
Author: Tor Lillqvist 
AuthorDate: Fri Nov 2 23:06:26 2018 +0200
Commit: Tor Lillqvist 
CommitDate: Sat Nov 3 15:31:22 2018 +0100

Handle the case if no digital signature code is implemented (iOS, currently)

Change-Id: I1cf37fccdd3a58d50a015b3fc32c32fba89f2f09
Reviewed-on: https://gerrit.libreoffice.org/62795
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 1a503ca264f3..a22ebdc6087c 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -869,13 +869,20 @@ void SfxDocumentPage::ImplUpdateSignatures()
 SfxMedium* pMedium = pDoc->GetMedium();
 if ( pMedium && !pMedium->GetName().isEmpty() && 
pMedium->GetStorage().is() )
 {
-Reference< security::XDocumentDigitalSignatures > xD(
-
security::DocumentDigitalSignatures::createDefault(comphelper::getProcessComponentContext())
 );
-
+Reference< security::XDocumentDigitalSignatures > xD;
+try
+{
+xD = 
security::DocumentDigitalSignatures::createDefault(comphelper::getProcessComponentContext());
+}
+catch ( const css::uno::DeploymentException& )
+{
+}
 OUString s;
 Sequence< security::DocumentSignatureInformation > aInfos;
-aInfos = xD->verifyDocumentContentSignatures( 
pMedium->GetZipStorageToSign_Impl(),
-uno::Reference< 
io::XInputStream >() );
+
+if ( xD.is() )
+aInfos = xD->verifyDocumentContentSignatures( 
pMedium->GetZipStorageToSign_Impl(),
+  uno::Reference< 
io::XInputStream >() );
 if ( aInfos.getLength() > 1 )
 s = m_aMultiSignedStr;
 else if ( aInfos.getLength() == 1 )
commit 1c39485653d97e26aa3d5b51bf2fd0a1f4e14f0c
Author: Tor Lillqvist 
AuthorDate: Fri Nov 2 22:58:16 2018 +0200
Commit: Tor Lillqvist 
CommitDate: Sat Nov 3 15:31:08 2018 +0100

Start of work in progress on making dialogs work in the iOS app

Build the swui library for non-DESKTOP platforms, too. Handle fallout
for !HAVE_FEATURE_DBCONNECTIVITY and !HAVE_FEATURE_AVMEDIA (both of
which features we for now don't want to bother with in the iOS app).

Make VclAbstractDialogFactory::Create() do its thing also on
non-DESKTOP.

This commit just causes more code to be compiled for the non-DESKTOP
case, dialogs in general surely don't actually work yet in the iOS
app. For instance:

vcl/source/window/builder.cxx:2060: probably need to implement 
sfxlo-CustomPropertiesControl or add a makesfxlo-CustomPropertiesControl 
function

Change-Id: I579efba605f519dcbf407b675be88c7c6ee0f19b
Reviewed-on: https://gerrit.libreoffice.org/62794
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 3bb5d6154677..c6cdada72e37 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 
 #include 
@@ -810,6 +812,7 @@ void TPGalleryThemeProperties::FillFilterList()
 }
 }
 
+#if HAVE_FEATURE_AVMEDIA
 // media filters
 static const char aWildcard[] = "*.";
 ::avmedia::FilterNameVector aFilters;
@@ -839,6 +842,9 @@ void TPGalleryThemeProperties::FillFilterList()
 }
 }
 }
+#else
+(void) nFirstExtFilterPos;
+#endif
 
 // 'All' filters
 OUString aExtensions;
@@ -863,6 +869,7 @@ void TPGalleryThemeProperties::FillFilterList()
 }
 }
 
+#if HAVE_FEATURE_AVMEDIA
 // media filters
 for(std::pair & aFilter : aFilters)
 {
@@ -873,6 +880,7 @@ void TPGalleryThemeProperties::FillFilterList()
 aExtensions += aWildcard + aFilter.second.getToken( 0, ';', nIndex 
);
 }
  }
+#endif
 
 #if defined(_WIN32)
 if (aExtensions.getLength() > 240)
@@ -1007,13 +1015,14 @@ void TPGalleryThemeProperties::DoPreview()
   

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

2018-11-03 Thread Libreoffice Gerrit user
 jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c |   87 
--
 1 file changed, 43 insertions(+), 44 deletions(-)

New commits:
commit 882c7f4a1feb81ed74b4243d884ecc3a954e3bed
Author: Mike Kaganski 
AuthorDate: Sat Nov 3 14:57:29 2018 +0300
Commit: Mike Kaganski 
CommitDate: Sat Nov 3 15:20:43 2018 +0100

tdf#120703 PVS: V547 Expression is always true

This fixes possible leaks from missed pipe releases

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

diff --git 
a/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c 
b/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c
index 5259bbcd5474..9b7806b8a07a 100644
--- a/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c
+++ b/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c
@@ -258,34 +258,36 @@ JNICALL 
Java_com_sun_star_lib_connections_pipe_PipeConnection_closeJNI
 {
 enum {
 START   = 0,
-INMONITOR
+INMONITOR,
+GOTPIPE,
 };
 
-short   state   = START;
-oslPipe npipe;  /* native pipe */
-jclass  tclass; /* this class */
-jfieldIDfid;/* a field identifier */
+short state = START;
+oslPipe   npipe = NULL;  /* native pipe */
+jclasstclass;/* this class */
+jfieldID  fid;   /* a field identifier */
 
 if ((*env)->MonitorEnter(env, obj_this) != 0)
 {
 ThrowException(env,
"java/lang/RuntimeException",
"native pipe cannot synchronize on the object");
-goto error;
+goto cleanup;
 }
 state   = INMONITOR;
 
 /* check connection state */
 npipe   = getPipe(env, obj_this);
 if ((*env)->ExceptionOccurred(env) != NULL)
-goto error;
+goto cleanup;
 if (npipe == NULL)
 {
 ThrowException(env,
"com/sun/star/io/IOException",
"native pipe is not connected");
-goto error;
+goto cleanup;
 }
+state = GOTPIPE;
 
 /* remove the reference to the pipe */
 tclass  = (*env)->GetObjectClass(env, obj_this);
@@ -294,7 +296,7 @@ JNICALL 
Java_com_sun_star_lib_connections_pipe_PipeConnection_closeJNI
 ThrowException(env,
"java/lang/RuntimeException",
"native pipe cannot find class");
-goto error;
+goto cleanup;
 }
 
 fid = (*env)->GetFieldID(env, tclass, "_nPipeHandle", "J");
@@ -303,24 +305,24 @@ JNICALL 
Java_com_sun_star_lib_connections_pipe_PipeConnection_closeJNI
 ThrowException(env,
"java/lang/RuntimeException",
"native pipe cannot find field");
-goto error;
+goto cleanup;
 }
 
 (*env)->SetLongField(env, obj_this, fid, (jlong)0);
 
-/* release the pipe */
-osl_closePipe(npipe);
-osl_releasePipe(npipe);
-
 /* done */
-(*env)->MonitorExit(env, obj_this);
-return;
 
- error:
+ cleanup:
 switch (state)
 {
+case GOTPIPE:
+/* release the pipe */
+osl_closePipe(npipe);
+osl_releasePipe(npipe);
+/* fall-through */
 case INMONITOR:
 (*env)->MonitorExit(env, obj_this);
+/* fall-through */
 case START:
 default:
 break;
@@ -350,10 +352,11 @@ JNICALL 
Java_com_sun_star_lib_connections_pipe_PipeConnection_readJNI
 };
 
 short   state   = START;
-oslPipe npipe;  /* native pipe */
+oslPipe npipe = NULL;   /* native pipe */
 void *  nbuff = NULL;   /* native read buffer */
 jbyteArray  bytes;  /* java read buffer */
 jintnread;  /* number of bytes has been read */
+jintnreturn = -1;   /* actual return value */
 
 /* enter monitor */
 if ((*env)->MonitorEnter(env, obj_this) != 0)
@@ -361,20 +364,20 @@ JNICALL 
Java_com_sun_star_lib_connections_pipe_PipeConnection_readJNI
 ThrowException(env,
"java/lang/RuntimeException",
"native pipe cannot synchronize on the object");
-goto error;
+goto cleanup;
 }
 state = INMONITOR;
 
 /* check connection state */
 npipe   = getPipe(env, obj_this);
 if ((*env)->ExceptionOccurred(env) != NULL)
-goto error;
+goto cleanup;
 if (npipe == NULL)
 {
 ThrowException(env,
"com/sun/star/io/IOException",
"native pipe is not connected");
-goto error;
+goto cleanup;
 }
 
 /* acquire pipe */
@@ -387,7 +390,7 @@ JNICALL 
Java_com_sun_star_lib_connections_pipe_PipeConnection_readJNI
 ThrowException(env,
  

New Defects reported by Coverity Scan for LibreOffice

2018-11-03 Thread scan-admin
Hi,

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

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

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


** CID 1440845:  API usage errors  (INVALIDATE_ITERATOR)
/sw/source/ui/dbui/customizeaddresslistdialog.cxx: 142 in 
SwCustomizeAddressListDialog::UpDownHdl_Impl(weld::Button &)()



*** CID 1440845:  API usage errors  (INVALIDATE_ITERATOR)
/sw/source/ui/dbui/customizeaddresslistdialog.cxx: 142 in 
SwCustomizeAddressListDialog::UpDownHdl_Impl(weld::Button &)()
136 OUString sHeader = m_xNewData->aDBColumnHeaders[nOldPos];
137 
m_xNewData->aDBColumnHeaders.erase(m_xNewData->aDBColumnHeaders.begin() + 
nOldPos);
138 
m_xNewData->aDBColumnHeaders.insert(m_xNewData->aDBColumnHeaders.begin() + 
nPos, sHeader);
139 for (auto& rData : m_xNewData->aDBData)
140 {
141 OUString sData = rData[nOldPos];
>>> CID 1440845:  API usage errors  (INVALIDATE_ITERATOR)
>>> Using invalid iterator "std::vector>> std::allocator >::const_iterator(rData->begin() + nOldPos)".
142 rData.erase(rData.begin() + nOldPos);
143 rData.insert(rData.begin() + nPos, sData);
144 }
145 
146 UpdateButtons();
147 }

** CID 1440844:  Memory - illegal accesses  (UNINIT)



*** CID 1440844:  Memory - illegal accesses  (UNINIT)
/vcl/source/gdi/impglyphitem.cxx: 33 in SalLayoutGlyphs::SalLayoutGlyphs(const 
SalLayoutGlyphs&)()
27 : m_pImpl(nullptr)
28 {
29 }
30 
31 SalLayoutGlyphs::~SalLayoutGlyphs() { delete m_pImpl; }
32 
>>> CID 1440844:  Memory - illegal accesses  (UNINIT)
>>> Using uninitialized value "this->m_pImpl" when calling "operator =".
33 SalLayoutGlyphs::SalLayoutGlyphs(const SalLayoutGlyphs& rOther) { 
operator=(rOther); }
34 
35 SalLayoutGlyphs& SalLayoutGlyphs::operator=(const SalLayoutGlyphs& 
rOther)
36 {
37 delete m_pImpl;
38 m_pImpl = rOther.m_pImpl ? rOther.m_pImpl->clone(*this) : nullptr;

** CID 1440843:  Memory - illegal accesses  (WRAPPER_ESCAPE)
/sot/source/sdstor/stgdir.cxx: 661 in StgDirEntry::Tmp2Strm()()



*** CID 1440843:  Memory - illegal accesses  (WRAPPER_ESCAPE)
/sot/source/sdstor/stgdir.cxx: 661 in StgDirEntry::Tmp2Strm()()
655 return false;
656 }
657 else
658 {
659 m_pStgStrm->SetSize( 0 );
660 delete m_pStgStrm;
>>> CID 1440843:  Memory - illegal accesses  (WRAPPER_ESCAPE)
>>> The internal representation of local "pNewStrm" escapes into 
>>> "this->m_pStgStrm", but is destroyed when it exits scope.
661 m_pStgStrm = pNewStrm.get();
662 pNewStrm->SetEntry( *this );
663 pNewStrm->Pos2Page( m_nPos );
664 pNewStrm.release();
665 delete m_pTmpStrm;
666 delete m_pCurStrm;

** CID 1440842:  API usage errors  (INVALIDATE_ITERATOR)
/sw/source/ui/dbui/customizeaddresslistdialog.cxx: 118 in 
SwCustomizeAddressListDialog::DeleteHdl_Impl(weld::Button &)()



*** CID 1440842:  API usage errors  (INVALIDATE_ITERATOR)
/sw/source/ui/dbui/customizeaddresslistdialog.cxx: 118 in 
SwCustomizeAddressListDialog::DeleteHdl_Impl(weld::Button &)()
112 m_xFieldsLB->select(nPos > m_xFieldsLB->n_children() - 1 ? nPos - 1 
: nPos);
113 
114 //remove the column
115 
m_xNewData->aDBColumnHeaders.erase(m_xNewData->aDBColumnHeaders.begin() + nPos);
116 //remove the data
117 for (auto& rData : m_xNewData->aDBData)
>>> CID 1440842:  API usage errors  (INVALIDATE_ITERATOR)
>>> Using invalid iterator "std::vector>> std::allocator >::const_iterator(rData->begin() + nPos)".
118 rData.erase(rData.begin() + nPos);
119 
120 UpdateButtons();
121 }
122 
123 IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, weld::Button&, 
rButton, void)

** CID 1440841:  Error handling issues  (CHECKED_RETURN)
/vcl/source/outdev/font.cxx: 977 in OutputDevice::GetFontInstance() const()



*** CID 1440841:  Error handling issues  (CHECKED_RETURN)
/vcl/source/outdev/font.cxx: 977 in OutputDevice::GetFontInstance() const()
97

[Libreoffice-commits] core.git: basctl/source basegfx/source chart2/source comphelper/source dbaccess/source oox/source package/source sc/source vcl/source winaccessibility/source

2018-11-03 Thread Libreoffice Gerrit user
 basctl/source/basicide/baside2.cxx|   15 --
 basctl/source/basicide/baside2b.cxx   |   33 +
 basegfx/source/polygon/b2dpolygonclipper.cxx  |8 -
 chart2/source/controller/accessibility/AccessibleBase.cxx |8 -
 chart2/source/model/template/BubbleDataInterpreter.cxx|3 
 chart2/source/view/charttypes/AreaChart.cxx   |   87 ++
 chart2/source/view/charttypes/BubbleChart.cxx |   28 ++--
 chart2/source/view/main/ChartView.cxx |6 
 comphelper/source/misc/backupfilehelper.cxx   |   25 +---
 dbaccess/source/ui/app/AppDetailPageHelper.cxx|   18 --
 oox/source/export/chartexport.cxx |   10 -
 package/source/zipapi/ByteGrabber.cxx |2 
 sc/source/ui/unoobj/cellsuno.cxx  |3 
 vcl/source/bitmap/BitmapScaleSuperFilter.cxx  |7 -
 vcl/source/bitmap/BitmapTools.cxx |8 -
 vcl/source/bitmap/bitmap.cxx  |   10 -
 vcl/source/control/button.cxx |5 
 vcl/source/fontsubset/cff.cxx |3 
 vcl/source/window/brdwin.cxx  |   25 +---
 winaccessibility/source/service/AccObjectWinManager.cxx   |3 
 20 files changed, 119 insertions(+), 188 deletions(-)

New commits:
commit 2a3f5d11522cd69f0ce221cde3a63b7e85e94b53
Author: Mike Kaganski 
AuthorDate: Sat Nov 3 14:55:29 2018 +0300
Commit: Mike Kaganski 
CommitDate: Sat Nov 3 14:13:57 2018 +0100

tdf#120703 PVS: V547 Expression is always true/false

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

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 119f7c6b41a3..3c8efde81a15 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -341,15 +341,12 @@ void ModulWindow::BasicExecute()
 ChooseMacro( uno::Reference< frame::XModel >() );
 return;
 }
-if ( pMethod )
-{
-pMethod->SetDebugFlags( m_aStatus.nBasicFlags );
-BasicDLL::SetDebugMode( true );
-RunMethod( pMethod );
-BasicDLL::SetDebugMode( false );
-// if cancelled during Interactive=false
-BasicDLL::EnableBreak( true );
-}
+pMethod->SetDebugFlags(m_aStatus.nBasicFlags);
+BasicDLL::SetDebugMode(true);
+RunMethod(pMethod);
+BasicDLL::SetDebugMode(false);
+// if cancelled during Interactive=false
+BasicDLL::EnableBreak(true);
 ClearStatus( BASWIN_RUNNINGBASIC );
 }
 else
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 4dc3b0571851..a1ec27c3d636 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -148,13 +148,10 @@ void lcl_SeparateNameAndIndex( const OUString& rVName, 
OUString& rVar, OUString&
 if ( nIndexStart != -1 )
 {
 sal_Int32 nIndexEnd = rVar.indexOf( ')', nIndexStart );
-if ( nIndexStart != -1 )
-{
-rIndex = rVar.copy( nIndexStart+1, nIndexEnd-nIndexStart-1 );
-rVar = rVar.copy( 0, nIndexStart );
-rVar = comphelper::string::stripEnd(rVar, ' ');
-rIndex = comphelper::string::strip(rIndex, ' ');
-}
+rIndex = rVar.copy(nIndexStart + 1, nIndexEnd - nIndexStart - 1);
+rVar = rVar.copy(0, nIndexStart);
+rVar = comphelper::string::stripEnd(rVar, ' ');
+rIndex = comphelper::string::strip(rIndex, ' ');
 }
 
 if ( !rVar.isEmpty() )
@@ -2412,7 +2409,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
 SbxDimArray* pOldArray = pItem->mpArray.get();
 
 bool bArrayChanged = false;
-if( pNewArray != nullptr && pOldArray != nullptr )
+if (pOldArray != nullptr)
 {
 // Compare Array dimensions to see if array has 
changed
 // Can be a copy, so comparing pointers does not 
work
@@ -2439,27 +2436,21 @@ void WatchTreeListBox::UpdateWatches( bool 
bBasicStopped )
 }
 }
 }
-else if( pNewArray == nullptr || pOldArray == nullptr )
+else
 {
 bArrayChanged = true;
 }
-if( pNewArray )
-{
-implEnableChildren( pEntry, true

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - NOTICE NOTICE_category_b readlicense_oo/docs

2018-11-03 Thread Libreoffice Gerrit user
 NOTICE |1 +
 NOTICE_category_b  |   12 ++--
 readlicense_oo/docs/readme.xsl |   10 +-
 3 files changed, 12 insertions(+), 11 deletions(-)

New commits:
commit bbea04f426008b3a9960595ed38e743c70fe5305
Author: Matthias Seidel 
AuthorDate: Sat Nov 3 13:04:56 2018 +
Commit: Matthias Seidel 
CommitDate: Sat Nov 3 13:04:56 2018 +

Shortened ASCII art for H1 to avoid line break on Windows

diff --git a/readlicense_oo/docs/readme.xsl b/readlicense_oo/docs/readme.xsl
index ba3409d67011..3be95373a63b 100644
--- a/readlicense_oo/docs/readme.xsl
+++ b/readlicense_oo/docs/readme.xsl
@@ -22,9 +22,9 @@
 
 http://www.w3.org/1999/XSL/Transform"; version="1.0">
 
- 
-   
-  
+
+
+   



@@ -161,11 +161,11 @@



-   
==
+   
==



-   
==
+   
==



commit 0cf2034366b95c83da7e97cce20d8e0ef045d8cb
Author: Matthias Seidel 
AuthorDate: Sat Nov 3 13:03:52 2018 +
Commit: Matthias Seidel 
CommitDate: Sat Nov 3 13:03:52 2018 +

Removed whitespace

diff --git a/NOTICE b/NOTICE
index 683154a2c989..d7dc0e2a651c 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,3 +1,4 @@
+
 Apache OpenOffice (https://www.openoffice.org)
 Copyright 2011, 2018 The Apache Software Foundation
 
diff --git a/NOTICE_category_b b/NOTICE_category_b
index 066e59d2523d..7f12b624a713 100644
--- a/NOTICE_category_b
+++ b/NOTICE_category_b
@@ -10,17 +10,17 @@ ___
 
 Notices for CoinMP library:
 The Computational Infrastructure for Operations Research COIN_OR
-project developed the CoinMP library (a lightweight API and DLL 
+project developed the CoinMP library (a lightweight API and DLL
 for CLP, CBC, and CGL).
-It includes and depends on 
-- CoinUtils: COIN-OR utilities, utilities, data structures, and 
+It includes and depends on
+- CoinUtils: COIN-OR utilities, utilities, data structures, and
 linear algebra methods for COIN-OR projects
-- CLP: COIN-OR Graph Classes, a collection of network representations 
+- CLP: COIN-OR Graph Classes, a collection of network representations
 and algorithms
 - CBC: COIN-OR Branch and Cut, an LP-based branch-and-cut library
 - CGL: Cut Generator Library, a library of cutting-plane generators
-The source code of these dependencies which are available under 
-license EPL can found at 
+The source code of these dependencies which are available under
+license EPL can found at
 http://www.coin-or.org/download/source/CoinMP/
 
 ___
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: icon-themes/colibre icon-themes/colibre_svg officecfg/registry

2018-11-03 Thread Libreoffice Gerrit user
 icon-themes/colibre/links.txt|9 
 icon-themes/colibre_svg/cmd/sc_renameobject.svg  |   92 
++
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu|   12 +
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |3 
 4 files changed, 116 insertions(+)

New commits:
commit e73bf95c00168bbf7d312cd11c40d0581ebd928e
Author: andreas kainz 
AuthorDate: Fri Nov 2 22:52:05 2018 +0100
Commit: andreas_kainz 
CommitDate: Sat Nov 3 10:24:13 2018 +0100

Colibre icons: add missing calc icons

Change-Id: I66cde29f8b64c5212f748930b5575763f54e59be
Reviewed-on: https://gerrit.libreoffice.org/62793
Tested-by: Jenkins
Reviewed-by: andreas_kainz 

diff --git a/icon-themes/colibre/links.txt b/icon-themes/colibre/links.txt
index 11c6bffbf8a3..3c7d4e838d07 100644
--- a/icon-themes/colibre/links.txt
+++ b/icon-themes/colibre/links.txt
@@ -1743,3 +1743,12 @@ cmd/sc_columnheight.png cmd/sc_setminimalcolumnheight.png
 
 cmd/lc_rowheight.png cmd/lc_setminimalrowheight.png
 cmd/lc_columnheight.png cmd/lc_setminimalcolumnheight.png
+
+# calc toolbar previewbar
+# ==
+cmd/sc_margins.png cmd/sc_pagemargin.png
+cmd/sc_exportasgraphic.png cmd/sc_insertgraphic.png
+cmd/sc_namegroup.png cmd/sc_renameobject.png
+
+cmd/lc_margins.png cmd/lc_pagemargin.png
+cmd/lc_exportasgraphic.png cmd/lc_insertgraphic.png
diff --git a/icon-themes/colibre_svg/cmd/sc_renameobject.svg 
b/icon-themes/colibre_svg/cmd/sc_renameobject.svg
new file mode 100644
index ..bb75a5acaa8e
--- /dev/null
+++ b/icon-themes/colibre_svg/cmd/sc_renameobject.svg
@@ -0,0 +1,92 @@
+
+http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   viewBox="0 0 16 16"
+   version="1.1"
+   id="svg12"
+   sodipodi:docname="sc_renameobject.svg"
+   inkscape:version="0.92.3 (2405546, 2018-03-11)">
+  
+
+  image/svg+xml
+  http://purl.org/dc/dcmitype/StillImage"; />
+
+  
+
+
+
+  
+
+
+
+ />
+ 
+
+
+
+
+
+
+
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 686f8ff1a734..124281b7581b 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -244,6 +244,9 @@
 
   Name...
 
+
+  1
+
   
   
 
@@ -323,6 +326,9 @@
 
   Margins
 
+
+  1
+
   
   
 
@@ -333,6 +339,9 @@
 
   Close Preview
 
+
+  1
+
   
   
 
@@ -2393,6 +2402,9 @@
 
   Export as Image
 
+
+  1
+
   
   
 
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 37bee5994fd7..303bc5866ddb 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -6710,6 +6710,9 @@
 
   Name...
 
+
+  1
+
   
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits