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

2018-01-09 Thread Miklos Vajna
 sw/qa/extras/ooxmlexport/data/tdf114703.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx   |   12 +
 writerfilter/source/dmapper/NumberingManager.cxx |   28 +--
 writerfilter/source/dmapper/NumberingManager.hxx |8 +++---
 4 files changed, 32 insertions(+), 16 deletions(-)

New commits:
commit a6ec829055ab0b9d223979ae5f90d158d5549db1
Author: Miklos Vajna 
Date:   Mon Jan 8 22:59:21 2018 +0100

tdf#114703 DOCX import: apply num defaults only to abstract nums

Numbering definitions have two levels: abstract ones and overrides. The
full definition is a merge of the two. Make sure that when defaults are
added to the numbering level properties, these are only added for
abstract ones, otherwise overriding e.g. the start value of a level will
also pull in other, unwanted default properties.

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf114703.docx 
b/sw/qa/extras/ooxmlexport/data/tdf114703.docx
new file mode 100644
index ..116b56a2b42f
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf114703.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 46e31f89b6c8..fcb662e93286 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -202,6 +202,18 @@ DECLARE_OOXMLEXPORT_TEST(testTdf114882, "tdf114882.docx")
 // fastserializer must not fail assertion because of mismatching elements
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf114703, "tdf114703.docx")
+{
+uno::Reference xRules
+= getProperty>(
+getStyles("NumberingStyles")->getByName("WWNum1"), 
"NumberingRules");
+// This was 0, level override "default" replaced the non-default value from
+// the abstract level.
+CPPUNIT_ASSERT_EQUAL(
+static_cast(-1000),
+
comphelper::SequenceAsHashMap(xRules->getByIndex(0))["FirstLineIndent"].get());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx 
b/writerfilter/source/dmapper/NumberingManager.cxx
index 809717e62659..273501e6ccc6 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -191,9 +191,9 @@ sal_Int16 ListLevel::GetParentNumbering( const OUString& 
sText, sal_Int16 nLevel
 return nParentNumbering;
 }
 
-uno::Sequence< beans::PropertyValue > ListLevel::GetProperties( )
+uno::Sequence ListLevel::GetProperties(bool bDefaults)
 {
-uno::Sequence< beans::PropertyValue > aLevelProps = GetLevelProperties( );
+uno::Sequence aLevelProps = 
GetLevelProperties(bDefaults);
 if ( m_pParaStyle.get( ) )
 AddParaProperties( &aLevelProps );
 return aLevelProps;
@@ -233,7 +233,7 @@ uno::Sequence< beans::PropertyValue > 
ListLevel::GetCharStyleProperties( )
 return comphelper::containerToSequence(rProperties);
 }
 
-uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( )
+uno::Sequence ListLevel::GetLevelProperties(bool 
bDefaults)
 {
 const sal_Int16 aWWToUnoAdjust[] =
 {
@@ -286,7 +286,8 @@ uno::Sequence< beans::PropertyValue > 
ListLevel::GetLevelProperties( )
 }
 }
 
-aNumberingProperties.push_back(lcl_makePropVal(PROP_LISTTAB_STOP_POSITION, 
m_nTabstop));
+if (bDefaults || m_nTabstop != 0)
+
aNumberingProperties.push_back(lcl_makePropVal(PROP_LISTTAB_STOP_POSITION, 
m_nTabstop));
 
 //TODO: handling of nFLegal?
 //TODO: nFNoRestart lower levels do not restart when higher levels are 
incremented, like:
@@ -299,7 +300,8 @@ uno::Sequence< beans::PropertyValue > 
ListLevel::GetLevelProperties( )
 //TODO: sRGBXchNums; array of inherited numbers
 
 //  nXChFollow; following character 0 - tab, 1 - space, 2 - nothing
-aNumberingProperties.push_back(lcl_makePropVal(PROP_LEVEL_FOLLOW, 
m_nXChFollow));
+if (bDefaults || m_nXChFollow != SvxNumberFormat::LISTTAB)
+aNumberingProperties.push_back(lcl_makePropVal(PROP_LEVEL_FOLLOW, 
m_nXChFollow));
 
 PropertyIds const aReadIds[] =
 {
@@ -310,7 +312,7 @@ uno::Sequence< beans::PropertyValue > 
ListLevel::GetLevelProperties( )
 boost::optional aProp = getProperty(rReadId);
 if (aProp)
 aNumberingProperties.emplace_back( getPropertyName(aProp->first), 
0, aProp->second, beans::PropertyState_DIRECT_VALUE );
-else if (rReadId == PROP_FIRST_LINE_INDENT)
+else if (rReadId == PROP_FIRST_LINE_INDENT && bDefaults)
 // Writer default is -360 twips, Word default seems to be 0.
 aNumberingProperties.emplace_back("FirstLineIndent", 0, 
uno::makeAny(static_cast(0)), beans::PropertyState_DIRECT_VALUE);
 }
@@ -424,7 +426,7 @@ void Abst

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

2018-01-09 Thread Miklos Vajna
 sfx2/source/doc/docfile.cxx |   39 +++
 1 file changed, 23 insertions(+), 16 deletions(-)

New commits:
commit 2157a3536f97ff5ae7c82611a801fef7e3708983
Author: Miklos Vajna 
Date:   Mon Jan 8 16:49:25 2018 +0100

sfx2 store: try rename before copying

Rename is cheaper then copying the content over manually, so try that
first.

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

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 3ca1d1a2d2f9..2e4ac54ba75c 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1721,29 +1721,36 @@ void SfxMedium::TransactedTransferForFS_Impl( const 
INetURLObject& aSource,
 
 try
 {
-if( bOverWrite && ::utl::UCBContentHelper::IsDocument( 
aDest.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
+OUString aSourceMainURL = 
aSource.GetMainURL(INetURLObject::DecodeMechanism::NONE);
+OUString aDestMainURL = 
aDest.GetMainURL(INetURLObject::DecodeMechanism::NONE);
+if (comphelper::isFileUrl(aDestMainURL) && 
osl::File::move(aSourceMainURL, aDestMainURL) == osl::FileBase::E_None)
+bResult = true;
+else
 {
-if( pImpl->m_aBackupURL.isEmpty() )
-DoInternalBackup_Impl( aOriginalContent );
+if (bOverWrite && 
::utl::UCBContentHelper::IsDocument(aDestMainURL))
+{
+if( pImpl->m_aBackupURL.isEmpty() )
+DoInternalBackup_Impl( aOriginalContent );
 
-if( !pImpl->m_aBackupURL.isEmpty() )
+if( !pImpl->m_aBackupURL.isEmpty() )
+{
+Reference< XInputStream > aTempInput = 
aTempCont.openStream();
+bTransactStarted = true;
+aOriginalContent.setPropertyValue( "Size", 
uno::makeAny( (sal_Int64)0 ) );
+aOriginalContent.writeStream( aTempInput, 
bOverWrite );
+bResult = true;
+}
+else
+{
+pImpl->m_eError = ERRCODE_SFX_CANTCREATEBACKUP;
+}
+}
+else
 {
 Reference< XInputStream > aTempInput = 
aTempCont.openStream();
-bTransactStarted = true;
-aOriginalContent.setPropertyValue( "Size", 
uno::makeAny( (sal_Int64)0 ) );
 aOriginalContent.writeStream( aTempInput, bOverWrite );
 bResult = true;
 }
-else
-{
-pImpl->m_eError = ERRCODE_SFX_CANTCREATEBACKUP;
-}
-}
-else
-{
-Reference< XInputStream > aTempInput = 
aTempCont.openStream();
-aOriginalContent.writeStream( aTempInput, bOverWrite );
-bResult = true;
 }
 }
 catch ( const css::ucb::CommandAbortedException& )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Miklos Vajna
 sfx2/source/doc/docfile.cxx |   13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 5259ab8104cfba60c40748ed0cd59d93df038c5b
Author: Miklos Vajna 
Date:   Mon Jan 8 15:53:58 2018 +0100

sfx2 store: create temp files next to local files

This way it's more likely that we can do a cheap rename instead of a
copy in SfxMedium::Commit().

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

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 27fe78208317..3ca1d1a2d2f9 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -3385,7 +3385,18 @@ void SfxMedium::CreateTempFile( bool bReplace )
 pImpl->m_aName.clear();
 }
 
-pImpl->pTempFile = new ::utl::TempFile();
+OUString aLogicBase;
+if (comphelper::isFileUrl(pImpl->m_aLogicName))
+{
+// Try to create the temp file in the same directory.
+sal_Int32 nOffset = pImpl->m_aLogicName.lastIndexOf("/");
+if (nOffset != -1)
+aLogicBase = pImpl->m_aLogicName.copy(0, nOffset);
+if (aLogicBase == "file://")
+// Doesn't make sense.
+aLogicBase.clear();
+}
+pImpl->pTempFile = new ::utl::TempFile(aLogicBase.isEmpty() ? nullptr : 
&aLogicBase);
 pImpl->pTempFile->EnableKillingFile();
 pImpl->m_aName = pImpl->pTempFile->GetFileName();
 OUString aTmpURL = pImpl->pTempFile->GetURL();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Andras Timar
 loleaflet/src/control/Control.Menubar.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 63c647de9af699551875b6d8f3460bf3ae4d4ac7
Author: Andras Timar 
Date:   Tue Jan 9 09:36:35 2018 +0100

Only show checkmarks in Language -> For selection menu

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

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index f9fe3daa..741f7341 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -541,7 +541,7 @@ L.Control.Menubar = L.Control.extend({
} else {

$(aItem).removeClass('disabled');
}
-   if 
(unoCommand.indexOf('.uno:LanguageStatus') !== -1) {
+   if 
(unoCommand.indexOf('.uno:LanguageStatus?Language:string=Current_') !== -1) {
var lang = 
map['stateChangeHandler'].getItemValue('.uno:LanguageStatus');
var data = 
decodeURIComponent($(aItem).data('uno'));
if (data.indexOf(lang) !== -1) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Mike Kaganski
 sw/source/core/doc/doc.cxx |  105 -
 1 file changed, 56 insertions(+), 49 deletions(-)

New commits:
commit f73df3fa98258fb5208a1295c0ae5c56d3c0b315
Author: Mike Kaganski 
Date:   Sun Dec 24 00:28:30 2017 +0300

tdf#114663: consider left/right page numbers when not printing blanks

Commit 3c1a343f6936f1dcefdf79a677f8c26ce29676e6 made it possible
to use document pages' sequential number (unaffected by automatically
inserted blank pages) in Pages input box when not printing blank
pages. But the implementation didn't take into account the case when
only left/right pages were printed. In this case, it treated the
unprinted right/left pages same way as automatic blanks, i.e.,
excluded they from page numbering, so that e.g. when user entered
10-20 (when selected even pages), actually printed 11 pages from
tenth even page (#20 in original document) till twenteeth even page
(#40). Expected result (familiar from other applications, and worked
before the commit) is to print 6 pages with even numbers, that are
in the pages range 10-20 of original document (10,12,14,16,18,20).

Now we consistently use StringRangeEnumerator::getRangesFromString
after converting user input with page numbers conditionally referring
either physical pages, or pages without blanks, to equivalent range
string referring physical pages. This preprocessing of range string
also ensures correct enumerating later (when StringRangeEnumerator
is created based on this string, e.g., for processing of PostIts).

Change-Id: I2381699bc4c37841bf9ce789cdad03141dd72255
Reviewed-on: https://gerrit.libreoffice.org/47030
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
(cherry picked from commit 230d3d6602e80fad0ceb700da35fc0c1db28f110)
Reviewed-on: https://gerrit.libreoffice.org/47053
Reviewed-by: Miklos Vajna 

diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 2d45bac285f0..e9cdbc8b1174 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -640,6 +640,46 @@ static sal_Int32 lcl_GetPaperBin( const SwPageFrame 
*pStartFrame )
 return nRes;
 }
 
+namespace
+{
+// tdf#:114663 Translates a range string from user input (with page numbering 
possibly not
+// taking blank pages into account) to equivalent string which references 
physical page numbers.
+// rUIPages2PhyPagesMap must contain a contiguous sequence of UI page numbers
+OUString UIPages2PhyPages(const OUString& rUIPageRange, const std::map< 
sal_Int32, sal_Int32 >& rUIPages2PhyPagesMap)
+{
+if (rUIPages2PhyPagesMap.empty())
+return OUString();
+auto iMin = rUIPages2PhyPagesMap.begin();
+const sal_Int32 nUIPageMin = iMin->first, nPhyPageMin = iMin->second;
+auto iMax = rUIPages2PhyPagesMap.rbegin();
+const sal_Int32 nUIPageMax = iMax->first, nPhyPageMax = iMax->second;
+OUStringBuffer aOut(rUIPageRange.getLength());
+OUStringBuffer aNumber(16);
+const sal_Unicode* pInput = rUIPageRange.getStr();
+while (*pInput)
+{
+while (*pInput >= '0' && *pInput <= '9')
+aNumber.append(*pInput++);
+if (!aNumber.isEmpty())
+{
+sal_Int32 nNumber = aNumber.makeStringAndClear().toInt32();
+if (nNumber < nUIPageMin)
+nNumber = nPhyPageMin-1;
+else if (nNumber > nUIPageMax)
+nNumber = nPhyPageMax+1;
+else
+nNumber = rUIPages2PhyPagesMap.at(nNumber);
+aOut.append(nNumber);
+}
+
+while (*pInput && (*pInput < '0' || *pInput > '9'))
+aOut.append(*pInput++);
+}
+
+return aOut.makeStringAndClear();
+}
+}
+
 void SwDoc::CalculatePagesForPrinting(
 const SwRootFrame& rLayout,
 /* out */ SwRenderData &rData,
@@ -659,16 +699,19 @@ void SwDoc::CalculatePagesForPrinting(
 
 std::map< sal_Int32, sal_Int32 > &rPrinterPaperTrays = 
rData.GetPrinterPaperTrays();
 std::set< sal_Int32 > &rValidPages = rData.GetValidPagesSet();
+// Map page numbers from user input (possibly ignoring blanks) to physical 
page numbers
+std::map< sal_Int32, sal_Int32 > aUIPages2PhyPagesMap;
 rValidPages.clear();
 
-sal_Int32 nPageNum = 1;
+sal_Int32 nPageNum = 1, nUIPageNum = 1;
 const SwPageFrame *pStPage = dynamic_cast( 
rLayout.Lower() );
 while (pStPage && nPageNum <= nDocPageCount)
 {
+const bool bNonEmptyPage = pStPage->getFrameArea().Height() != 0;
 const bool bPrintThisPage =
 ( (bPrintRightPages && pStPage->OnRightPage()) ||
   (bPrintLeftPages && !pStPage->OnRightPage()) ) &&
-( bPrintEmptyPages || pStPage->getFrameArea().Height() );
+( bPrintEmptyPages || bNonEmptyPage );
 
 if (bPrintThisPage)
 {
@@ -676,6 +719,10 @@ void SwDoc::CalculatePagesForPrinting(
 rPrinterPaperTrays[ nPageNum

Re[2]: Bug 83260

2018-01-09 Thread Yemelyanenko Fyodor
I tried, and got single redline with all my text.
Such case like typing new text is cared by 
sw::DocumentRedlineManager::AppendRedline, which has lengthy code for any 
possible situation (like typing inside deleted text, adding to existing 
redline, etc.) It also calls CompresRedlines at the end, but many 
"compressions" are done by sw::DocumentRedlineManager::AppendRedline, so 
CompresRedlines doesn't do much

I think that the best solution for bug in question is to remove call to 
CompresRedlines from Undo/Redo. So Undo/Redo won't compress redlines and change 
indexes.
I don't like to change CompresRedlines as it called by AppendRedline and from 
several other places.
For me such solution can be safest.

PS Its funny, that if you type some text in single paragraph with change 
tracking = ON, you'll get new redline every single minute, even if you type 
continuously :-) This is by design, as AppendRedline calls CanCombine which 
only allows combining those text, which has been typed during single minute 
(https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/DocumentRedlineManager.cxx#861)

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

Hi,

On Sat, Jan 06, 2018 at 01:20:05AM +, Yemelyanenko Fyodor 
mailto:fyodo...@hotmail.com>> wrote:
 Now I’m investigating CompresRedlines further. I think it can be
 changed so it merges only two neighbor redlines in the same node and
 not merge cross-node. Or maybe it should be completely removed, as it
 only merges redlines if they’ve been created in the same minute!
 
(https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/docredln.cxx#946)
 So chances that two redlines will be merged are very low.

Did you try typing "asdf" into a document without that merging enabled?
I think 4 redlines are created without this "merge changes from the same
minute" mechanism.

Regards,

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


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - solenv/gbuild

2018-01-09 Thread Michael Stahl
 solenv/gbuild/platform/com_MSC_class.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 90f1421d014543d9d78124cb406cb006102b0bd8
Author: Michael Stahl 
Date:   Mon Jan 8 12:33:55 2018 +0100

gbuild: MSVC: invoke MSASM with /safeseh

BinScope complains that the sblo.dll lacks SAFESEH flag.

Change-Id: If2b4b6592eac37542c3e2745d90a8e432b8da2e2
(cherry picked from commit e8f2ca76037eed4c10c9851682c7f6856c7fb0de)
Reviewed-on: https://gerrit.libreoffice.org/47585
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/solenv/gbuild/platform/com_MSC_class.mk 
b/solenv/gbuild/platform/com_MSC_class.mk
index 0916c2fd1fd9..27a0aec80c4b 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -95,7 +95,7 @@ define gb_AsmObject__command
 $(call gb_Output_announce,$(2),$(true),ASM,3)
 $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) $(dir $(4)) && \
-   "$(ML_EXE)" /c /Cp $(gb_AFLAGS) -D$(COM) /Fo$(1) $(3)) && \
+   "$(ML_EXE)" /safeseh /c /Cp $(gb_AFLAGS) -D$(COM) /Fo$(1) $(3)) && \
echo "$(1) : $(3)" > $(4)
 endef
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - external/coinmp

2018-01-09 Thread Michael Stahl
 external/coinmp/windows.build.patch.1 |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit baf8708ace3e0f2f6fb3cd1bc22f73e3bd1adf50
Author: Michael Stahl 
Date:   Mon Jan 8 12:20:04 2018 +0100

coinmp: link with /DYNAMICBASE

No idea why this would be explicitly disabled.

Change-Id: I1e06544ae4ae579de578560ce66e310da659ccb4
(cherry picked from commit b0471fc84a065faf2aa38925c486b40b185ffa58)
Reviewed-on: https://gerrit.libreoffice.org/47583
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/external/coinmp/windows.build.patch.1 
b/external/coinmp/windows.build.patch.1
index e2e292e3ff28..2bd0526ac2c4 100644
--- a/external/coinmp/windows.build.patch.1
+++ b/external/coinmp/windows.build.patch.1
@@ -1966,7 +1966,7 @@ diff -urN 
coinmp.org/CoinMP/MSVisualStudio/v9/CoinMP/CoinMP.vcxproj coinmp/CoinM
 +  
..\..\..\..\CoinMP\src\CoinMP.def
 +  true
 +  Windows
-+  false
++  true
 +  
 +  MachineX86
 +
@@ -1987,7 +1987,7 @@ diff -urN 
coinmp.org/CoinMP/MSVisualStudio/v9/CoinMP/CoinMP.vcxproj coinmp/CoinM
 +  Windows
 +  true
 +  true
-+  false
++  true
 +  
 +  MachineX86
 +
@@ -2012,7 +2012,7 @@ diff -urN 
coinmp.org/CoinMP/MSVisualStudio/v9/CoinMP/CoinMP.vcxproj coinmp/CoinM
 +  
..\..\..\..\CoinMP\src\CoinMP.def
 +  true
 +  Windows
-+  false
++  true
 +  
 +  MachineX64
 +
@@ -2036,7 +2036,7 @@ diff -urN 
coinmp.org/CoinMP/MSVisualStudio/v9/CoinMP/CoinMP.vcxproj coinmp/CoinM
 +  Windows
 +  true
 +  true
-+  false
++  true
 +  
 +  MachineX64
 +
@@ -2273,7 +2273,7 @@ diff -urN 
coinmp.org/CoinMP/MSVisualStudio/v9/unitTest/unitTest.vcxproj coinmp/C
 +
 +  true
 +  Console
-+  false
++  true
 +  
 +  MachineX86
 +
@@ -2293,7 +2293,7 @@ diff -urN 
coinmp.org/CoinMP/MSVisualStudio/v9/unitTest/unitTest.vcxproj coinmp/C
 +  Console
 +  true
 +  true
-+  false
++  true
 +  
 +  MachineX86
 +
@@ -2317,7 +2317,7 @@ diff -urN 
coinmp.org/CoinMP/MSVisualStudio/v9/unitTest/unitTest.vcxproj coinmp/C
 +
 +  true
 +  Console
-+  false
++  true
 +  
 +  MachineX64
 +
@@ -2340,7 +2340,7 @@ diff -urN 
coinmp.org/CoinMP/MSVisualStudio/v9/unitTest/unitTest.vcxproj coinmp/C
 +  Console
 +  true
 +  true
-+  false
++  true
 +  
 +  MachineX64
 +
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - external/openssl

2018-01-09 Thread Michael Stahl
 external/openssl/UnpackedTarball_openssl.mk |1 +
 external/openssl/opensslwnt_safeseh.patch   |   23 +++
 2 files changed, 24 insertions(+)

New commits:
commit e90788e6ce5dc5459139f4ef03dc11b8af930772
Author: Michael Stahl 
Date:   Mon Jan 8 12:31:39 2018 +0100

openssl: MSVC build: link and run MSASM with /SAFESEH

Actually the assembler requires lowercase /safeseh, oddly enough.

Change-Id: I1569409a2d6358282a7463ea996a6b1615e6ed8c
(cherry picked from commit 8f3ca0831993f7d687d7fc0feb1abe0c67a413bd)
Reviewed-on: https://gerrit.libreoffice.org/47584
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/external/openssl/UnpackedTarball_openssl.mk 
b/external/openssl/UnpackedTarball_openssl.mk
index 5845e31a436a..719b8b0e5842 100644
--- a/external/openssl/UnpackedTarball_openssl.mk
+++ b/external/openssl/UnpackedTarball_openssl.mk
@@ -14,6 +14,7 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,openssl,$(OPENSSL_TARBALL),,openssl
 $(eval $(call gb_UnpackedTarball_add_patches,openssl,\
external/openssl/openssllnx.patch \
external/openssl/opensslwnt.patch \
+   $(if $(filter 
INTEL,$(CPUNAME)),external/openssl/opensslwnt_safeseh.patch) \
external/openssl/openssl-1.0.1h-win64.patch.1 \
external/openssl/opensslsol.patch \
external/openssl/opensslios.patch \
diff --git a/external/openssl/opensslwnt_safeseh.patch 
b/external/openssl/opensslwnt_safeseh.patch
new file mode 100644
index ..f2eafab5b9ed
--- /dev/null
+++ b/external/openssl/opensslwnt_safeseh.patch
@@ -0,0 +1,23 @@
+use /safeseh in 32-bit MSVC builds; this is not required for 64-bit
+
+diff -ru openssl.orig/util/mk1mf.pl openssl/util/mk1mf.pl
+--- a/openssl.orig/util/mk1mf.pl   2016-03-03 20:22:21.043924505 +0100
 b/openssl/util/mk1mf.pl2016-03-03 20:34:45.015901171 +0100
+@@ -488,7 +493,7 @@
+ SRC_D=$src_dir
+ 
+ LINK_CMD=$link
+-LFLAGS=$lflags
++LFLAGS=$lflags /SAFESEH
+ RSC=$rsc \$(SOLARINC)
+ 
+ # The output directory for everything interesting
+@@ -511,7 +516,7 @@
+ MKDIR=$mkdir
+ MKLIB=$bin_dir$mklib
+ MLFLAGS=$mlflags
+-ASM=$bin_dir$asm
++ASM=$bin_dir$asm /safeseh
+ 
+ # FIPS validated module and support file locations
+ 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - solenv/gcc-wrappers

2018-01-09 Thread Michael Stahl
 solenv/gcc-wrappers/wrapper.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 513b7d3b854727564e9424d9b6b861df630131ac
Author: Michael Stahl 
Date:   Mon Jan 8 12:34:59 2018 +0100

gcc-wrappers: recognise -ggdb.* in addition to -g as debug flag

Firebird uses -ggdb.  This causes it to have 2 PDB files, however
this isn't sufficient to make BinScope happy, more investigation
needed.

(cherry picked from commit d6b91568d22b9019ddf098f3c3072de25eb1c268)

gcc-wrappers: always pass -debug to linker
... like gbuild does; this causes a PDB file to be created, which
is required by BinScope.  Stops complaints about firebird's DLLs,
which are apparently the only DLLs linked with gcc-wrapper.
(cherry picked from commit 471b844915cc3d7036cb0fd88b40eeb049f5b54d)

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

diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx
index 800687ad65a6..b156c89dc220 100644
--- a/solenv/gcc-wrappers/wrapper.cxx
+++ b/solenv/gcc-wrappers/wrapper.cxx
@@ -97,7 +97,8 @@ string processccargs(vector rawargs) {
 
 // apparently these must be at the end
 // otherwise configure tests may fail
-string linkargs(" -link");
+// note: always use -debug so a PDB file is created
+string linkargs(" -link -debug");
 
 for(vector::iterator i = rawargs.begin(); i != rawargs.end(); ++i) 
{
 args.append(" ");
@@ -127,7 +128,7 @@ string processccargs(vector rawargs) {
 exit(1);
 }
 }
-else if(*i == "-g") {
+else if(*i == "-g" || !(*i).compare(0,5,"-ggdb")) {
 args.append("-Zi");
 args.append(" -FS");
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Caolán McNamara
 vcl/source/fontsubset/cff.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 088df374f01a28c06c4602f33fea2b717bf403f5
Author: Caolán McNamara 
Date:   Mon Jan 8 16:42:46 2018 +

tdf#114704 use of float as intermediate causes out by one on large offsets

table offset integer value of 21281769 is correctly read, but on cast to 
float
it is represented as 21281768 and we're off by one when cast back to integer
later

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

diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 00b6492ad34c..284242882274 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -31,7 +31,7 @@ typedef long long S64;
 
 typedef sal_Int32 GlyphWidth;
 
-typedef float RealType;
+typedef double RealType;
 typedef RealType ValType;
 #include 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Caolán McNamara
 vcl/source/fontsubset/cff.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c597c5f12db1b76e55c6f110b231cf181959fa61
Author: Caolán McNamara 
Date:   Mon Jan 8 17:00:05 2018 +

route cff typedefs to our sal ones

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

diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 284242882274..286c13e411ce 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -19,21 +19,21 @@
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
 
 #include 
 
-typedef unsigned char U8;
-typedef unsigned short U16;
-typedef long long S64;
+typedef sal_uInt8 U8;
+typedef sal_uInt16 U16;
+typedef sal_Int64 S64;
 
 typedef sal_Int32 GlyphWidth;
 
 typedef double RealType;
 typedef RealType ValType;
-#include 
 
 static const char* pStringIds[] = {
 /*0*/   ".notdef",  "space","exclam",   "quotedbl",
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Caolán McNamara
 tools/source/generic/bigint.cxx |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 71da7445e50eadfce261fcd2f82d16cbaa017041
Author: Caolán McNamara 
Date:   Mon Jan 8 09:58:31 2018 +

ofz#5000 Integer-overflow

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

diff --git a/tools/source/generic/bigint.cxx b/tools/source/generic/bigint.cxx
index cda2be1843d7..6fa9a2c472f0 100644
--- a/tools/source/generic/bigint.cxx
+++ b/tools/source/generic/bigint.cxx
@@ -330,21 +330,21 @@ void BigInt::DivLong( const BigInt& rB, BigInt& rErg ) 
const
 
 for (j = aTmpA.nLen - 1; j >= nLenB; j--)
 { // guess divisor
-sal_Int32 nTmp = ( (sal_Int32)aTmpA.nNum[j] << 16 ) + aTmpA.nNum[j - 
1];
+sal_uInt32 nTmp = ( (sal_uInt32)aTmpA.nNum[j] << 16 ) + aTmpA.nNum[j - 
1];
 if (aTmpA.nNum[j] == aTmpB.nNum[nLenB1])
 nQ = 0x;
 else
-nQ = (sal_uInt16)(((sal_uInt32)nTmp) / aTmpB.nNum[nLenB1]);
+nQ = (sal_uInt16)(nTmp / aTmpB.nNum[nLenB1]);
 
 if ( ((sal_uInt32)aTmpB.nNum[nLenB1 - 1] * nQ) >
-sal_uInt32)nTmp) - (sal_uInt32)aTmpB.nNum[nLenB1] * nQ) << 16) 
+ aTmpA.nNum[j - 2])
+((nTmp - (sal_uInt32)aTmpB.nNum[nLenB1] * nQ) << 16) + 
aTmpA.nNum[j - 2])
 nQ--;
 // Start division
 nK = 0;
 for (i = 0; i < nLenB; i++)
 {
-nTmp = (sal_Int32)aTmpA.nNum[j - nLenB + i]
-   - ((sal_Int32)aTmpB.nNum[i] * nQ)
+nTmp = (sal_uInt32)aTmpA.nNum[j - nLenB + i]
+   - ((sal_uInt32)aTmpB.nNum[i] * nQ)
- nK;
 aTmpA.nNum[j - nLenB + i] = (sal_uInt16)nTmp;
 nK = (sal_uInt16) (nTmp >> 16);
@@ -397,21 +397,21 @@ void BigInt::ModLong( const BigInt& rB, BigInt& rErg ) 
const
 
 for (j = aTmpA.nLen - 1; j >= nLenB; j--)
 { // Guess divisor
-sal_Int32 nTmp = ( (sal_Int32)aTmpA.nNum[j] << 16 ) + aTmpA.nNum[j - 
1];
+sal_uInt32 nTmp = ( (sal_uInt32)aTmpA.nNum[j] << 16 ) + aTmpA.nNum[j - 
1];
 if (aTmpA.nNum[j] == aTmpB.nNum[nLenB1])
 nQ = 0x;
 else
-nQ = (sal_uInt16)(((sal_uInt32)nTmp) / aTmpB.nNum[nLenB1]);
+nQ = (sal_uInt16)(nTmp / aTmpB.nNum[nLenB1]);
 
 if ( ((sal_uInt32)aTmpB.nNum[nLenB1 - 1] * nQ) >
-sal_uInt32)nTmp) - aTmpB.nNum[nLenB1] * nQ) << 16) + 
aTmpA.nNum[j - 2])
+((nTmp - aTmpB.nNum[nLenB1] * nQ) << 16) + aTmpA.nNum[j - 2])
 nQ--;
 // Start division
 nK = 0;
 for (i = 0; i < nLenB; i++)
 {
-nTmp = (sal_Int32)aTmpA.nNum[j - nLenB + i]
-   - ((sal_Int32)aTmpB.nNum[i] * nQ)
+nTmp = (sal_uInt32)aTmpA.nNum[j - nLenB + i]
+   - ((sal_uInt32)aTmpB.nNum[i] * nQ)
- nK;
 aTmpA.nNum[j - nLenB + i] = (sal_uInt16)nTmp;
 nK = (sal_uInt16) (nTmp >> 16);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Andras Timar
 loleaflet/src/control/Control.Menubar.js |   42 ++-
 loleaflet/unocommands.js |1 
 2 files changed, 5 insertions(+), 38 deletions(-)

New commits:
commit f9bf3f61ea74656aa4d9647bc976ce5cfd07199c
Author: Andras Timar 
Date:   Tue Jan 9 10:17:02 2018 +0100

Format - Page... dialog instead of custom Page menus

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

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 741f7341..8c13ba45 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -157,18 +157,10 @@ L.Control.Menubar = L.Control.extend({
{uno: '.uno:FontDialog'},
{uno: '.uno:ParagraphDialog'},
{uno: '.uno:OutlineBullet'},
+   {uno: '.uno:PageDialog'},
{type: 'separator'},
-   {uno: '.uno:ResetAttributes'},
-   {name: _('Page'), type: 'menu', menu: [
-   {name: 'A4, ' + _('Portrait'), type: 
'action', id: 'a4portrait'},
-   {name: 'A4, ' + _('Landscape'), type: 
'action', id: 'a4landscape'},
-   {name: 'A5, ' + _('Portrait'), type: 
'action', id: 'a5portrait'},
-   {name: 'A5, ' + _('Landscape'), type: 
'action', id: 'a5landscape'},
-   {name: 'Letter, ' + _('Portrait'), 
type: 'action', id: 'letterportrait'},
-   {name: 'Letter, ' + _('Landscape'), 
type: 'action', id: 'letterlandscape'},
-   {name: 'Legal, ' + _('Portrait'), type: 
'action', id: 'legalportrait'},
-   {name: 'Legal, ' + _('Landscape'), 
type: 'action', id: 'legallandscape'}]}]
-   },
+   {uno: '.uno:ResetAttributes'}
+   ]},
{name: _UNO('.uno:TableMenu', 'text'), type: 'menu', 
menu: [
{name: _UNO('.uno:TableInsertMenu', 'text'), 
type: 'menu', menu: [
{uno: '.uno:InsertRowsBefore'},
@@ -658,35 +650,9 @@ L.Control.Menubar = L.Control.extend({
map.fire('postMessage', {msgId: 'close', args: 
{EverModified: map._everModified, Deprecated: true}});
map.fire('postMessage', {msgId: 'UI_Close', args: 
{EverModified: map._everModified}});
map.remove();
-   }
-   else if (id === 'repair') {
+   } else if (id === 'repair') {
map._socket.sendMessage('commandvalues 
command=.uno:DocumentRepair');
-   } else if (id === 'a4portrait') {
-   map.sendUnoCommand('.uno:AttributePageSize 
{"AttributePageSize.Width":{"type":"long", "value": 
"21000"},"AttributePageSize.Height":{"type":"long", "value": "29700"}}');
-   map.sendUnoCommand('.uno:AttributePage 
{"AttributePage.Landscape":{"type":"boolean", "value": "false"}}');
-   } else if (id === 'a4landscape') {
-   map.sendUnoCommand('.uno:AttributePageSize 
{"AttributePageSize.Height":{"type":"long", "value": 
"21000"},"AttributePageSize.Width":{"type":"long", "value": "29700"}}');
-   map.sendUnoCommand('.uno:AttributePage 
{"AttributePage.Landscape":{"type":"boolean", "value": "true"}}');
-   } else if (id === 'a5portrait') {
-   map.sendUnoCommand('.uno:AttributePageSize 
{"AttributePageSize.Width":{"type":"long", "value": 
"14800"},"AttributePageSize.Height":{"type":"long", "value": "21000"}}');
-   map.sendUnoCommand('.uno:AttributePage 
{"AttributePage.Landscape":{"type":"boolean", "value": "false"}}');
-   } else if (id === 'a5landscape') {
-   map.sendUnoCommand('.uno:AttributePageSize 
{"AttributePageSize.Height":{"type":"long", "value": 
"14800"},"AttributePageSize.Width":{"type":"long", "value": "21000"}}');
-   map.sendUnoCommand('.uno:AttributePage 
{"AttributePage.Landscape":{"type":"boolean", "value": "true"}}');
-   } else if (id === 'letterportrait') {
-   map.sendUnoCommand('.uno:AttributePageSize 
{"AttributePageSize.Width":{"type":"long", "value": 
"21950"},"AttributePageSize.Height":{"type":"long", "value": "27940"}}');
-   map.sendUnoCommand('.uno:AttributePage 
{"AttributePage.Landscape":{"type":"boolean", "value": "false"}}');
-   } else if (id === 'letterlandscap

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

2018-01-09 Thread Andras Timar
 loleaflet/src/control/Control.Menubar.js |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 78a2990f967ecbad2189135f622b2b874731055d
Author: Andras Timar 
Date:   Tue Jan 9 10:45:53 2018 +0100

Put checkmark if spell checking language 'None' is selected

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

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 8c13ba45..907120da 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -538,6 +538,8 @@ L.Control.Menubar = L.Control.extend({
var data = 
decodeURIComponent($(aItem).data('uno'));
if (data.indexOf(lang) !== -1) {

$(aItem).addClass('lo-menu-item-checked');
+   } else if 
(data.indexOf('LANGUAGE_NONE') !== -1 && lang === '[None]') {
+   
$(aItem).addClass('lo-menu-item-checked');
} else {

$(aItem).removeClass('lo-menu-item-checked');
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Jan Holesovsky
 loleaflet/src/control/Toolbar.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit be59061b6d29ae37ec530aee55f02b103d8988b0
Author: Jan Holesovsky 
Date:   Tue Jan 9 11:47:34 2018 +0100

loleaflet: The document name must not contain spaces.

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

diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 0c8e7fd6..29c89e97 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -73,7 +73,7 @@ L.Map.include({
 
this.showBusy(_('Downloading...'), false);
this._socket.sendMessage('downloadas ' +
-   'name=' + name + ' ' +
+   'name=' + encodeURIComponent(name) + ' ' +
'id=' + id + ' ' +
'format=' + format + ' ' +
'options=' + options);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3-0' - loleaflet/src

2018-01-09 Thread Jan Holesovsky
 loleaflet/src/control/Toolbar.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 05715547d9548e300e26f60aa671d9fb965dbead
Author: Jan Holesovsky 
Date:   Tue Jan 9 11:47:34 2018 +0100

loleaflet: The document name must not contain spaces.

Change-Id: Icd6815c5644d42c009bb003cecc100527f6ee0a4
Reviewed-on: https://gerrit.libreoffice.org/47648
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 337188a0..6d5e7ae9 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -73,7 +73,7 @@ L.Map.include({
 
this.showBusy(_('Downloading...'), false);
this._socket.sendMessage('downloadas ' +
-   'name=' + name + ' ' +
+   'name=' + encodeURIComponent(name) + ' ' +
'id=' + id + ' ' +
'format=' + format + ' ' +
'options=' + options);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/src

2018-01-09 Thread Jan Holesovsky
 loleaflet/src/control/Toolbar.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit aba8c09a29ff0ad1cdcf0ea3b5689e0d09db842e
Author: Jan Holesovsky 
Date:   Tue Jan 9 11:47:34 2018 +0100

loleaflet: The document name must not contain spaces.

Change-Id: Icd6815c5644d42c009bb003cecc100527f6ee0a4
Reviewed-on: https://gerrit.libreoffice.org/47649
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 337188a0..6d5e7ae9 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -73,7 +73,7 @@ L.Map.include({
 
this.showBusy(_('Downloading...'), false);
this._socket.sendMessage('downloadas ' +
-   'name=' + name + ' ' +
+   'name=' + encodeURIComponent(name) + ' ' +
'id=' + id + ' ' +
'format=' + format + ' ' +
'options=' + options);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 2 commits - 09/2d339debd3b567e6bc4f5f659fbf0103eaf3e5 43/7a537883088da583bef724d744b9481c684228

2018-01-09 Thread Caolán McNamara
 09/2d339debd3b567e6bc4f5f659fbf0103eaf3e5 |1 +
 43/7a537883088da583bef724d744b9481c684228 |1 +
 2 files changed, 2 insertions(+)

New commits:
commit 3d3b2a80287cb85f514cb976bbcfda31f82917f0
Author: Caolán McNamara 
Date:   Tue Jan 9 10:52:29 2018 +

Notes added by 'git notes add'

diff --git a/09/2d339debd3b567e6bc4f5f659fbf0103eaf3e5 
b/09/2d339debd3b567e6bc4f5f659fbf0103eaf3e5
new file mode 100644
index ..8ebbe55237b1
--- /dev/null
+++ b/09/2d339debd3b567e6bc4f5f659fbf0103eaf3e5
@@ -0,0 +1 @@
+ignore: obsolete
commit 2aa62041933eae41e90b1f8e3b7c5bc7d0841385
Author: Caolán McNamara 
Date:   Tue Jan 9 10:52:17 2018 +

Notes added by 'git notes add'

diff --git a/43/7a537883088da583bef724d744b9481c684228 
b/43/7a537883088da583bef724d744b9481c684228
new file mode 100644
index ..0d12c933bfa9
--- /dev/null
+++ b/43/7a537883088da583bef724d744b9481c684228
@@ -0,0 +1 @@
+prefer: 77d3777c8934171a9557a96872d020cf12443fb9
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 06/4e99cea6e96decb0fd508e930580fccb4c33bc

2018-01-09 Thread Caolán McNamara
 06/4e99cea6e96decb0fd508e930580fccb4c33bc |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f77b5a40ab3b5c64a1d7c67059713637849094be
Author: Caolán McNamara 
Date:   Tue Jan 9 10:53:18 2018 +

Notes added by 'git notes add'

diff --git a/06/4e99cea6e96decb0fd508e930580fccb4c33bc 
b/06/4e99cea6e96decb0fd508e930580fccb4c33bc
new file mode 100644
index ..8ebbe55237b1
--- /dev/null
+++ b/06/4e99cea6e96decb0fd508e930580fccb4c33bc
@@ -0,0 +1 @@
+ignore: obsolete
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - d3/64c5bb7211ec60fadf8e065b2a1ffa830493fa

2018-01-09 Thread Caolán McNamara
 d3/64c5bb7211ec60fadf8e065b2a1ffa830493fa |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7dcad5fee6ef2a791f858cbeed56fc4cdb31c9c2
Author: Caolán McNamara 
Date:   Tue Jan 9 10:52:59 2018 +

Notes added by 'git notes add'

diff --git a/d3/64c5bb7211ec60fadf8e065b2a1ffa830493fa 
b/d3/64c5bb7211ec60fadf8e065b2a1ffa830493fa
new file mode 100644
index ..8ebbe55237b1
--- /dev/null
+++ b/d3/64c5bb7211ec60fadf8e065b2a1ffa830493fa
@@ -0,0 +1 @@
+ignore: obsolete
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - ee/e1fb3486915a9182b5f24f9dd9c0fe8a8b959e

2018-01-09 Thread Caolán McNamara
 ee/e1fb3486915a9182b5f24f9dd9c0fe8a8b959e |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 9218dc688abd8b6019bed9ddd6d17166b70bd869
Author: Caolán McNamara 
Date:   Tue Jan 9 10:53:39 2018 +

Notes added by 'git notes add'

diff --git a/ee/e1fb3486915a9182b5f24f9dd9c0fe8a8b959e 
b/ee/e1fb3486915a9182b5f24f9dd9c0fe8a8b959e
new file mode 100644
index ..8ebbe55237b1
--- /dev/null
+++ b/ee/e1fb3486915a9182b5f24f9dd9c0fe8a8b959e
@@ -0,0 +1 @@
+ignore: obsolete
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: tools/map.cpp

2018-01-09 Thread Michael Meeks
 tools/map.cpp |   60 +-
 1 file changed, 47 insertions(+), 13 deletions(-)

New commits:
commit 8ec2738095cce45d54accc0f20afb4915f7b2f79
Author: Michael Meeks 
Date:   Tue Jan 9 09:21:29 2018 +

loolmap: re-work string dumping and scan for C strings.

Change-Id: I32b496cb83538477be8088285868bbb3236b146a

diff --git a/tools/map.cpp b/tools/map.cpp
index b72ab336..7522e103 100644
--- a/tools/map.cpp
+++ b/tools/map.cpp
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -127,8 +128,8 @@ struct AddrSpace {
 }
 void printStats()
 {
-char prefixes[] = { 'S', 'U', 'c' };
-for (int i = 0; i < 2; ++i)
+char prefixes[] = { 'S', 'U', 'C' };
+for (int i = 0; i < 3; ++i)
 {
 printf("%cStrings  :%20lld, %lld chars\n",
prefixes[i], (addr_t)_strings[i]._count,
@@ -166,7 +167,8 @@ struct AddrSpace {
 int step = isUnicode ? 2 : 1;
 for (size_t j = i; j < i + len*step && j < data.size(); j += step)
 {
-if (isascii(data[j]) && !iscntrl(data[j]))
+if (isascii(data[j]) && !iscntrl(data[j]) &&
+(step == 1 || data[j+1] == 0))
 str += static_cast(data[j]);
 else
 return false;
@@ -174,30 +176,49 @@ struct AddrSpace {
 return true;
 }
 
+bool isCStringAtOffset(const std::vector &data, size_t i,
+   std::string &str)
+{
+str = "C_";
+for (size_t j = i; j < data.size(); j++)
+{
+if (isascii(data[j]) && !iscntrl(data[j]))
+str += static_cast(data[j]);
+else
+return data[j] == '\0' && str.length() > 7;
+}
+return false;
+}
+
 void scanForSalStrings(Map &map, const std::vector &data)
 {
 for (size_t i = 0; i < data.size() - 24; i += 4)
 {
 const uint32_t *p = reinterpret_cast(&data[i]);
 uint32_t len;
+std::string str;
 if ((p[0] & 0xff) < 0x1000 && // plausible max ref-count
 (len = p[1]) < 0x100 && // plausible max string length
 len <= (data.size() - i) &&
-len > 0)
+len > 2)
 {
-std::string str;
 bool isUnicode = data[i+1] == 0 && data[i+3] == 0;
 if (isStringAtOffset(data, i + 8, len, isUnicode, str))
 {
 StringData &sdata = _strings[isUnicode ? 1 : 0];
 sdata._count ++;
 sdata._chars += len;
-if (DumpStrings)
-printf("string address 0x%.8llx %s\n",
-   map._start + i, str.c_str());
 _addrToStr[map._start + i] = str;
+i += ((4 + str.length() * (isUnicode ? 2 : 1)) >>2 ) * 4;
 }
-i += 8;
+}
+if ((i%8 == 0) && isCStringAtOffset(data, i, str))
+{
+StringData &sdata = _strings[2];
+sdata._count ++;
+sdata._chars += str.length();
+_addrToStr[map._start + i] = str;
+i += (str.length() >> 2) * 4;
 }
 }
 }
@@ -205,8 +226,6 @@ struct AddrSpace {
 void scanMapsForStrings()
 {
 int mem_fd = openPid(_proc_id, "mem");
-if (DumpStrings)
-printf("String dump:\n");
 for (auto &map : _maps)
 {
 std::vector data;
@@ -218,8 +237,6 @@ struct AddrSpace {
 
 scanForSalStrings(map, data);
 }
-if (DumpStrings)
-printf("String dump ends.\n");
 close (mem_fd);
 }
 };
@@ -437,6 +454,23 @@ static void dump_unshared(unsigned proc_id, unsigned 
parent_id,
 printf ("\tRLE sharing bitmap:\n%s\n", &compressed[0]);
 
 dumpPages(proc_id, parent_id, type, vunshared, space);
+
+std::unordered_set unShared;
+for (auto addr : vunshared)
+unShared.insert(addr);
+
+if (DumpStrings)
+{
+printf("String dump:\n");
+for (auto addr : space._addrToStr)
+{
+if (DumpAll ||
+unShared.find((addr.first & ~0x1fff)) != unShared.end())
+printf("0x%.16llx %s\n", addr.first, addr.second.c_str());
+}
+
+printf("String dump ends.\n");
+}
 }
 
 static void total_smaps(unsigned proc_id, unsigned parent_id,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Michael Meeks
 sw/source/core/layout/paintfrm.cxx |   41 -
 1 file changed, 32 insertions(+), 9 deletions(-)

New commits:
commit 195ad7f4a780320f47f68b8a7dc381f8e2d492cc
Author: Michael Meeks 
Date:   Tue Jan 9 10:14:21 2018 +

tdf#114480 - Revert "Writer page shadow - avoid scaling ..."

Unfortunately, when rendering tiles this gives garbage borders in
odd places unexpectedly.

This reverts commit 268d019c4b05f37e99e1da85472dc9255f186a27.

Change-Id: I0071d05469cf8b7859b79c035c4239e4089b2de2
Reviewed-on: https://gerrit.libreoffice.org/47642
Tested-by: Jenkins 
Reviewed-by: Jan Holesovsky 

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index e2187a1da863..4024f341defc 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -5876,6 +5876,7 @@ bool SwPageFrame::IsLeftShadowNeeded() const
 }
 
 enum PaintArea {LEFT, RIGHT, TOP, BOTTOM};
+#define BORDER_TILE_SIZE 512
 
 /// Wrapper around pOut->DrawBitmapEx.
 static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& 
aPoint, const Size& aSize, const BitmapEx& rBitmapEx, PaintArea eArea)
@@ -5897,14 +5898,24 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 pOut->SetLineColor();
 pOut->DrawRect(pOut->PixelToLogic(aRect));
 
-Size aOutSize = pOut->PixelToLogic(aSize);
-Point aOutPoint = pOut->PixelToLogic(aPoint);
+// Tiled render if necessary
+tools::Rectangle aComplete(aPoint, aSize);
+Size aTileSize(BORDER_TILE_SIZE, BORDER_TILE_SIZE);
+
+long iterX = eArea != RIGHT && eArea != LEFT ? BORDER_TILE_SIZE : 0;
+long iterY = eArea == RIGHT || eArea == LEFT ? BORDER_TILE_SIZE : 0;
+
+for (tools::Rectangle aTile = tools::Rectangle(aPoint, aTileSize); true; 
aTile.Move(iterX, iterY))
+{
+tools::Rectangle aRender = aComplete.GetIntersection(aTile);
+if (aRender.IsEmpty())
+break;
+pOut->DrawBitmapEx(pOut->PixelToLogic(aRender.TopLeft()),
+   pOut->PixelToLogic(aRender.GetSize()),
+   Point(0, 0), aRender.GetSize(),
+   rBitmapEx);
+}
 
-pOut->DrawTransformedBitmapEx(
-basegfx::utils::createScaleTranslateB2DHomMatrix(
-aOutSize.Width(), aOutSize.Height(),
-aOutPoint.X(), aOutPoint.Y()),
-rBitmapEx);
 }
 
 /**
@@ -6016,6 +6027,9 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 {
 const long nWidth = aPageRightShadow.GetSizePixel().Width();
 const long nHeight = aPagePxRect.Height() - 2 * (mnShadowPxWidth - 
1);
+if (aPageRightShadow.GetSizePixel().Height() < BORDER_TILE_SIZE)
+aPageRightShadow.Scale(Size(nWidth, BORDER_TILE_SIZE), 
BmpScaleFlag::Fast);
+
 lcl_paintBitmapExToRect(pOut,
 Point(aPaintRect.Right() + mnShadowPxWidth, 
aPagePxRect.Top() + mnShadowPxWidth - 1),
 Size(nWidth, nHeight),
@@ -6034,6 +6048,9 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 {
 const long nWidth = aPageLeftShadow.GetSizePixel().Width();
 const long nHeight = aPagePxRect.Height() - 2 * (mnShadowPxWidth - 
1);
+if (aPageLeftShadow.GetSizePixel().Height() < BORDER_TILE_SIZE)
+aPageLeftShadow.Scale(Size(nWidth, BORDER_TILE_SIZE), 
BmpScaleFlag::Fast);
+
 lcl_paintBitmapExToRect(pOut,
 Point(lLeft, aPagePxRect.Top() + mnShadowPxWidth - 1),
 Size(nWidth, nHeight),
@@ -6043,16 +6060,22 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 
 // Bottom shadow
 const long nBottomHeight = aPageBottomShadow.GetSizePixel().Height();
+if (aPageBottomShadow.GetSizePixel().Width() < BORDER_TILE_SIZE)
+aPageBottomShadow.Scale(Size(BORDER_TILE_SIZE, nBottomHeight), 
BmpScaleFlag::Fast);
+
 lcl_paintBitmapExToRect(pOut,
 Point(aPaintRect.Left(), aPagePxRect.Bottom() + 2),
-Size(aPaintRect.Width() - 1, nBottomHeight),
+Size(aPaintRect.Width(), nBottomHeight),
 aPageBottomShadow, BOTTOM);
 
 // Top shadow
 const long nTopHeight = aPageTopShadow.GetSizePixel().Height();
+if (aPageTopShadow.GetSizePixel().Width() < BORDER_TILE_SIZE)
+aPageTopShadow.Scale(Size(BORDER_TILE_SIZE, nTopHeight), 
BmpScaleFlag::Fast);
+
 lcl_paintBitmapExToRect(pOut,
 Point(aPaintRect.Left(), aPagePxRect.Top() - mnShadowPxWidth),
-Size(aPaintRect.Width() - 1, nTopHeight),
+Size(aPaintRect.Width(), nTopHeight),
 aPageTopShadow, TOP);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.

[Libreoffice-commits] online.git: tools/map.cpp

2018-01-09 Thread Michael Meeks
 tools/map.cpp |   24 +++-
 1 file changed, 15 insertions(+), 9 deletions(-)

New commits:
commit 9af34dd15c92c3fb4d42706f4e47203c72d35382
Author: Michael Meeks 
Date:   Tue Jan 9 11:47:28 2018 +

loolmap: configurable width for hex dumping.

Change-Id: Id53426b84362a8a34bcbb116c6567d9264241b3c

diff --git a/tools/map.cpp b/tools/map.cpp
index 7522e103..f3773501 100644
--- a/tools/map.cpp
+++ b/tools/map.cpp
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -34,6 +35,7 @@ typedef unsigned long long addr_t;
 bool DumpHex = false;
 bool DumpAll = false;
 bool DumpStrings = false;
+int  DumpWidth = 32;
 
 #define MAP_SIZE 20
 #define PATH_SIZE 1000 // No harm in having it much larger than strictly 
necessary. Avoids compiler warning.
@@ -152,7 +154,7 @@ struct AddrSpace {
 Map map;
 map._start = start;
 map._end = end;
-map._name = std::string(name);
+map._name = std::string(name, 0, strlen(name) - 1);
 _maps.push_back(map);
 }
 
@@ -248,7 +250,7 @@ static void dumpDiff(const AddrSpace &space,
 {
 assert(pageData.size() == parentData.size());
 
-const unsigned int width = 32;
+const unsigned int width = DumpWidth;
 
 for (unsigned int i = 0; i < pageData.size(); i += width)
 {
@@ -356,14 +358,14 @@ static void dumpPages(unsigned proc_id, unsigned 
parent_id, const char *type, co
 
 if (DumpHex)
 {
-printf ("%s page: 0x%.8llx (%d/%d) - touched: %d - %s - from %s\n",
+printf ("\n%s page: 0x%.8llx (%d/%d) - touched: %d - %s - from 
%s\n",
 type, page, (int)++cnt, (int)pages.size(), touched,
 style, space.findName(page).c_str());
 
 if (touched == 0)
 {
 std::stringstream pageStr;
-Util::dumpHex(pageStr, "", "", pageData, false);
+Util::dumpHex(pageStr, "", "", pageData, false, DumpWidth);
 printf("%s", pageStr.str().c_str());
 }
 else
@@ -514,7 +516,7 @@ static void total_smaps(unsigned proc_id, unsigned 
parent_id,
 if (!name)
 name = strchr(buffer, '/');
 if (!name)
-name = "[anon]";
+name = "[anon]\n";
 space.insert(start, end, name);
 for (addr_t p = start; p < end; p += 0x1000)
 pushTo->push_back(p);
@@ -613,7 +615,6 @@ int main(int argc, char **argv)
 const char *appOrPid = nullptr;
 
 setlocale (LC_ALL, "");
-getopt(argc, argv, ""); // FIXME: Should use this properly.
 
 for (int i = 1; i < argc; ++i)
 {
@@ -626,6 +627,10 @@ int main(int argc, char **argv)
 DumpAll = true;
 else if (strstr(arg, "--strings"))
 DumpStrings = true;
+else if (strstr(arg, "--width"))
+{
+DumpWidth = std::max((int)pow(2, 
round(log(atoi(argv[++i]))/log(2))), 8);
+}
 else
 appOrPid = arg;
 }
@@ -636,9 +641,10 @@ int main(int argc, char **argv)
 {
 fprintf(stderr, "Usage: loolmap --hex \n");
 fprintf(stderr, "Dump memory map information for a given process\n");
-fprintf(stderr, "--hex Hex dump relevant page contents and 
diff to parent process\n");
-fprintf(stderr, "--strings Print all detected strings\n");
-fprintf(stderr, "--all Hex dump all writable pages whether 
touched or not\n");
+fprintf(stderr, "--hex   Hex dump relevant page contents 
and diff to parent process\n");
+fprintf(stderr, "--strings   Print all detected strings\n");
+fprintf(stderr, "--all   Hex dump all writable pages 
whether touched or not\n");
+fprintf(stderr, "--width  Define width of hex dump in 
bytes, rounded to a power of 2\n");
 return 0;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Ashod Nakashian
 kit/ForKit.cpp |   17 ++---
 kit/Kit.cpp|   14 +-
 2 files changed, 23 insertions(+), 8 deletions(-)

New commits:
commit 95af839fd9183aa0ccb41ec6c13838739d90c819
Author: Ashod Nakashian 
Date:   Mon Jan 8 23:56:15 2018 -0500

wsd: trace first child's startup activity

To help debug early failure, log the first
child's statup at trace-level.

Change-Id: I8a6c8fe535bbc971174c0d950a2243460f81a2c7
Reviewed-on: https://gerrit.libreoffice.org/47628
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/kit/ForKit.cpp b/kit/ForKit.cpp
index 48e4ebb5..798126fa 100644
--- a/kit/ForKit.cpp
+++ b/kit/ForKit.cpp
@@ -246,12 +246,6 @@ static int createLibreOfficeKit(const std::string& 
childRoot,
 
 LOG_DBG("Forking a loolkit process with jailId: " << jailId << ".");
 
-if (LogLevel != "trace")
-{
-LOG_INF("Setting log-level to [" << LogLevel << "].");
-Log::logger().setLevel(LogLevel);
-}
-
 const Process::PID pid = fork();
 if (!pid)
 {
@@ -526,7 +520,8 @@ int main(int argc, char** argv)
 LOG_INF("Preinit stage OK.");
 
 // We must have at least one child, more are created dynamically.
-// Ask this first child to send version information to master process
+// Ask this first child to send version information to master process and 
trace startup.
+::setenv("LOOL_TRACE_STARTUP", "1", 1);
 Process::PID forKitPid = createLibreOfficeKit(childRoot, sysTemplate, 
loTemplate, loSubPath, true);
 if (forKitPid < 0)
 {
@@ -534,6 +529,14 @@ int main(int argc, char** argv)
 std::_Exit(Application::EXIT_SOFTWARE);
 }
 
+// No need to trace subsequent children.
+::unsetenv("LOOL_TRACE_STARTUP");
+if (LogLevel != "trace")
+{
+LOG_INF("Setting log-level to [" << LogLevel << "].");
+Log::logger().setLevel(LogLevel);
+}
+
 CommandDispatcher commandDispatcher(0);
 LOG_INF("ForKit process is ready.");
 
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index dba54ecb..8bb4864c 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -1934,8 +1934,14 @@ void lokit_main(const std::string& childRoot,
 logProperties["path"] = std::string(logFilename);
 }
 
-Log::initialize("kit", logLevel ? logLevel : "", logColor != nullptr, 
logToFile, logProperties);
 Util::rng::reseed();
+const std::string LogLevel = logLevel ? logLevel : "trace";
+const bool bTraceStartup = (std::getenv("LOOL_TRACE_STARTUP") != nullptr);
+Log::initialize("kit", bTraceStartup ? "trace" : logLevel, logColor != 
nullptr, logToFile, logProperties);
+if (bTraceStartup && LogLevel != "trace")
+{
+LOG_INF("Setting log-level to [trace] and delaying setting to 
requested [" << LogLevel << "].");
+}
 
 assert(!childRoot.empty());
 assert(!sysTemplate.empty());
@@ -2146,6 +2152,12 @@ void lokit_main(const std::string& childRoot,
 
 auto queue = std::make_shared();
 
+if (bTraceStartup && LogLevel != "trace")
+{
+LOG_INF("Setting log-level to [" << LogLevel << "].");
+Log::logger().setLevel(LogLevel);
+}
+
 const std::string socketName = "child_ws_" + pid;
 IoUtil::SocketProcessor(ws, socketName,
 [&socketName, &ws, &loKit, &jailId, &queue](const 
std::vector& data)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Andras Timar
 loleaflet/src/control/Control.Menubar.js |   16 +++-
 loleaflet/unocommands.js |1 +
 2 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 480b6ed0b5a5cab10cece80536752229b5acbe90
Author: Andras Timar 
Date:   Tue Jan 9 13:06:35 2018 +0100

Add File - Properties... menu

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

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 907120da..f9a1f6aa 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -23,8 +23,10 @@ L.Control.Menubar = L.Control.extend({
{name: _('PDF Document (.pdf)'), id: 
'downloadas-pdf', type: 'action'},
{name: _('ODF text document (.odt)'), 
id: 'downloadas-odt', type: 'action'},
{name: _('Microsoft Word 2003 (.doc)'), 
id: 'downloadas-doc', type: 'action'},
-   {name: _('Microsoft Word (.docx)'), id: 
'downloadas-docx', type: 'action'}]}]
-   },
+   {name: _('Microsoft Word (.docx)'), id: 
'downloadas-docx', type: 'action'}]},
+   {type: 'separator'},
+   {uno: '.uno:SetDocumentProperties'}
+   ]},
{name: _UNO('.uno:EditMenu', 'text'), type: 'menu', 
menu: [
{uno: '.uno:Undo'},
{uno: '.uno:Redo'},
@@ -211,8 +213,10 @@ L.Control.Menubar = L.Control.extend({
{name: _('PDF Document (.pdf)'), id: 
'downloadas-pdf', type: 'action'},
{name: _('ODF presentation (.odp)'), 
id: 'downloadas-odp', type: 'action'},
{name: _('Microsoft Powerpoint 2003 
(.ppt)'), id: 'downloadas-ppt', type: 'action'},
-   {name: _('Microsoft Powerpoint 
(.pptx)'), id: 'downloadas-pptx', type: 'action'}]}]
-   },
+   {name: _('Microsoft Powerpoint 
(.pptx)'), id: 'downloadas-pptx', type: 'action'}]},
+   {type: 'separator'},
+   {uno: '.uno:SetDocumentProperties'}
+   ]},
{name: _UNO('.uno:EditMenu', 'presentation'), type: 
'menu', menu: [
{uno: '.uno:Undo'},
{uno: '.uno:Redo'},
@@ -286,7 +290,9 @@ L.Control.Menubar = L.Control.extend({
{name: _('PDF Document (.pdf)'), id: 
'downloadas-pdf', type: 'action'},
{name: _('ODF spreadsheet (.ods)'), id: 
'downloadas-ods', type: 'action'},
{name: _('Microsoft Excel 2003 
(.xls)'), id: 'downloadas-xls', type: 'action'},
-   {name: _('Microsoft Excel (.xlsx)'), 
id: 'downloadas-xlsx', type: 'action'}]}
+   {name: _('Microsoft Excel (.xlsx)'), 
id: 'downloadas-xlsx', type: 'action'}]},
+   {type: 'separator'},
+   {uno: '.uno:SetDocumentProperties'}
]},
{name: _UNO('.uno:EditMenu', 'spreadsheet'), type: 
'menu', menu: [
{uno: '.uno:Undo'},
diff --git a/loleaflet/unocommands.js b/loleaflet/unocommands.js
index 62d300ff..8ed093ad 100644
--- a/loleaflet/unocommands.js
+++ b/loleaflet/unocommands.js
@@ -177,6 +177,7 @@ var unoCommandsArray = {
SetAnchorToFrame:{text:{menu:_('To ~Frame'),},},
SetAnchorToPage:{spreadsheet:{menu:_('To P~age'),},text:{menu:_('To 
P~age'),},},
SetAnchorToPara:{text:{menu:_('To ~Paragraph'),},},
+   SetDocumentProperties:{global:{menu:_('Propert~ies...'),},},
SetLanguageAllTextMenu:{global:{menu:_('For All Text'),},},
SetLanguageParagraphMenu:{global:{menu:_('For Paragraph'),},},
SetLanguageSelectionMenu:{global:{menu:_('For Selection'),},},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Michael Meeks
 sw/source/core/layout/paintfrm.cxx |   41 -
 1 file changed, 32 insertions(+), 9 deletions(-)

New commits:
commit 1c1653e4d6520aa8fbe5d3dc8a94cfb9330916cf
Author: Michael Meeks 
Date:   Tue Jan 9 10:14:21 2018 +

tdf#114480 - Revert "Writer page shadow - avoid scaling ..."

Unfortunately, when rendering tiles this gives garbage borders in
odd places unexpectedly.

This reverts commit 268d019c4b05f37e99e1da85472dc9255f186a27.

Change-Id: I0071d05469cf8b7859b79c035c4239e4089b2de2

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 30872d45e6f4..c4edfba5a5b0 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -5652,6 +5652,7 @@ bool SwPageFrame::IsLeftShadowNeeded() const
 }
 
 enum PaintArea {LEFT, RIGHT, TOP, BOTTOM};
+#define BORDER_TILE_SIZE 512
 
 /// Wrapper around pOut->DrawBitmapEx.
 static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& 
aPoint, const Size& aSize, const BitmapEx& rBitmapEx, PaintArea eArea)
@@ -5673,14 +5674,24 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 pOut->SetLineColor();
 pOut->DrawRect(pOut->PixelToLogic(aRect));
 
-Size aOutSize = pOut->PixelToLogic(aSize);
-Point aOutPoint = pOut->PixelToLogic(aPoint);
+// Tiled render if necessary
+tools::Rectangle aComplete(aPoint, aSize);
+Size aTileSize(BORDER_TILE_SIZE, BORDER_TILE_SIZE);
+
+long iterX = eArea != RIGHT && eArea != LEFT ? BORDER_TILE_SIZE : 0;
+long iterY = eArea == RIGHT || eArea == LEFT ? BORDER_TILE_SIZE : 0;
+
+for (tools::Rectangle aTile = tools::Rectangle(aPoint, aTileSize); true; 
aTile.Move(iterX, iterY))
+{
+tools::Rectangle aRender = aComplete.GetIntersection(aTile);
+if (aRender.IsEmpty())
+break;
+pOut->DrawBitmapEx(pOut->PixelToLogic(aRender.TopLeft()),
+   pOut->PixelToLogic(aRender.GetSize()),
+   Point(0, 0), aRender.GetSize(),
+   rBitmapEx);
+}
 
-pOut->DrawTransformedBitmapEx(
-basegfx::utils::createScaleTranslateB2DHomMatrix(
-aOutSize.Width(), aOutSize.Height(),
-aOutPoint.X(), aOutPoint.Y()),
-rBitmapEx);
 }
 
 /**
@@ -5792,6 +5803,9 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 {
 const long nWidth = aPageRightShadow.GetSizePixel().Width();
 const long nHeight = aPagePxRect.Height() - 2 * (mnShadowPxWidth - 
1);
+if (aPageRightShadow.GetSizePixel().Height() < BORDER_TILE_SIZE)
+aPageRightShadow.Scale(Size(nWidth, BORDER_TILE_SIZE), 
BmpScaleFlag::Fast);
+
 lcl_paintBitmapExToRect(pOut,
 Point(aPaintRect.Right() + mnShadowPxWidth, 
aPagePxRect.Top() + mnShadowPxWidth - 1),
 Size(nWidth, nHeight),
@@ -5810,6 +5824,9 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 {
 const long nWidth = aPageLeftShadow.GetSizePixel().Width();
 const long nHeight = aPagePxRect.Height() - 2 * (mnShadowPxWidth - 
1);
+if (aPageLeftShadow.GetSizePixel().Height() < BORDER_TILE_SIZE)
+aPageLeftShadow.Scale(Size(nWidth, BORDER_TILE_SIZE), 
BmpScaleFlag::Fast);
+
 lcl_paintBitmapExToRect(pOut,
 Point(lLeft, aPagePxRect.Top() + mnShadowPxWidth - 1),
 Size(nWidth, nHeight),
@@ -5819,16 +5836,22 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext 
*pOut, const Point& aPoin
 
 // Bottom shadow
 const long nBottomHeight = aPageBottomShadow.GetSizePixel().Height();
+if (aPageBottomShadow.GetSizePixel().Width() < BORDER_TILE_SIZE)
+aPageBottomShadow.Scale(Size(BORDER_TILE_SIZE, nBottomHeight), 
BmpScaleFlag::Fast);
+
 lcl_paintBitmapExToRect(pOut,
 Point(aPaintRect.Left(), aPagePxRect.Bottom() + 2),
-Size(aPaintRect.Width() - 1, nBottomHeight),
+Size(aPaintRect.Width(), nBottomHeight),
 aPageBottomShadow, BOTTOM);
 
 // Top shadow
 const long nTopHeight = aPageTopShadow.GetSizePixel().Height();
+if (aPageTopShadow.GetSizePixel().Width() < BORDER_TILE_SIZE)
+aPageTopShadow.Scale(Size(BORDER_TILE_SIZE, nTopHeight), 
BmpScaleFlag::Fast);
+
 lcl_paintBitmapExToRect(pOut,
 Point(aPaintRect.Left(), aPagePxRect.Top() - mnShadowPxWidth),
-Size(aPaintRect.Width() - 1, nTopHeight),
+Size(aPaintRect.Width(), nTopHeight),
 aPageTopShadow, TOP);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Mark Hung
 editeng/source/editeng/editundo.cxx |4 +++-
 editeng/source/editeng/impedit.hxx  |2 +-
 editeng/source/editeng/impedit2.cxx |7 ---
 3 files changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 7d10477aa54536aeeb190d25979234ab732c1bcf
Author: Mark Hung 
Date:   Sun Dec 31 21:04:59 2017 +0800

tdf#99524 - allow backward connect paragraph to undo.

When pressing backspace, two paragaphs connected. The first paragraph
get the style of the second paragraph. However the ParaAttribsChanged()
doesn't update Outliner's nDepth because it is not in undo. So it create
incorrect undo information when user press enter later.

And during undo, the nDepth isn't updated because there is a check
to compare the number of paragraphs, so SetParaAttribs needs to be
called after ParagraphInserted.

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

diff --git a/editeng/source/editeng/editundo.cxx 
b/editeng/source/editeng/editundo.cxx
index 6beb8617be28..13f066dafc02 100644
--- a/editeng/source/editeng/editundo.cxx
+++ b/editeng/source/editeng/editundo.cxx
@@ -253,7 +253,6 @@ void EditUndoConnectParas::Undo()
 GetEditEngine()->SetCallParaInsertedOrDeleted(false);
 
 EditPaM aPaM = GetEditEngine()->SplitContent(nNode, nSepPos);
-GetEditEngine()->SetParaAttribs( nNode, aLeftParaAttribs );
 
 GetEditEngine()->SetCallParaInsertedOrDeleted( bCall );
 if (GetEditEngine()->IsCallParaInsertedOrDeleted())
@@ -262,6 +261,9 @@ void EditUndoConnectParas::Undo()
 GetEditEngine()->SetParaAttribs( nNode+1, aRightParaAttribs );
 }
 
+// Calling SetParaAttribs is effective only after ParagraphInserted
+GetEditEngine()->SetParaAttribs( nNode, aLeftParaAttribs );
+
 if (GetEditEngine()->GetStyleSheetPool())
 {
 if ( !aLeftStyleName.isEmpty() )
diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index 698f16b60f3e..30694a1e5c1d 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -543,7 +543,7 @@ private:
 
 
 voidCursorMoved( const ContentNode* pPrevNode );
-voidParaAttribsChanged( ContentNode const * pNode );
+voidParaAttribsChanged( ContentNode const * pNode, bool 
bIgnoreUndoCheck = false );
 voidTextModified();
 voidCalcHeight( ParaPortion* pPortion );
 
diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index 8f2336c21b3b..f837b2a57cac 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -731,7 +731,7 @@ void ImpEditEngine::TextModified()
 }
 
 
-void ImpEditEngine::ParaAttribsChanged( ContentNode const * pNode )
+void ImpEditEngine::ParaAttribsChanged( ContentNode const * pNode, bool 
bIgnoreUndoCheck )
 {
 assert(pNode && "ParaAttribsChanged: Which one?");
 
@@ -743,7 +743,8 @@ void ImpEditEngine::ParaAttribsChanged( ContentNode const * 
pNode )
 pPortion->MarkSelectionInvalid( 0 );
 
 sal_Int32 nPara = aEditDoc.GetPos( pNode );
-pEditEngine->ParaAttribsChanged( nPara );
+if ( bIgnoreUndoCheck || pEditEngine->IsInUndo() )
+pEditEngine->ParaAttribsChanged( nPara );
 
 ParaPortion* pNextPortion = GetParaPortions().SafeGetObject( nPara+1 );
 // => is formatted again anyway, if Invalid.
@@ -2261,7 +2262,7 @@ EditPaM ImpEditEngine::ImpConnectParagraphs( ContentNode* 
pLeft, ContentNode* pR
 pLeft->GetCharAttribs().GetDefFont() = 
pRight->GetCharAttribs().GetDefFont();
 }
 
-ParaAttribsChanged( pLeft );
+ParaAttribsChanged( pLeft, true );
 
 // First search for Portions since pRight is gone after ConnectParagraphs.
 ParaPortion* pLeftPortion = FindParaPortion( pLeft );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: officecfg/registry

2018-01-09 Thread Yousuf Philips
 officecfg/registry/data/org/openoffice/VCL.xcu |   54 -
 1 file changed, 27 insertions(+), 27 deletions(-)

New commits:
commit 847d20b3466a6358396c923e9b4754cbdd53863a
Author: Yousuf Philips 
Date:   Sun Dec 31 04:18:32 2017 +0400

tdf#114768: Update default font list for Traditional Chinese

* Add Noto Sans/Serif CJK as alias for Source Han Sans/Serif
* Order lists into open source, mac, windows and fallback
* Add missing english names for localized names
* Trim list of fallback fonts

Change-Id: I7eb0b5bd54eb4625d6d605a2bc649c48411462ab
Reviewed-on: https://gerrit.libreoffice.org/47191
Reviewed-by: Cheng-Chia Tseng 
Tested-by: Jenkins 
Reviewed-by: Mark Hung 

diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu 
b/officecfg/registry/data/org/openoffice/VCL.xcu
index d759ef68509f..ab30b58d755d 100644
--- a/officecfg/registry/data/org/openoffice/VCL.xcu
+++ b/officecfg/registry/data/org/openoffice/VCL.xcu
@@ -275,89 +275,89 @@
 
 
   
-思源黑體 
HW;細明體;MingLiU;文泉驛等寬微米黑;Liberation Mono;Cumberland 
AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida 
Typewriter;Monaco;Monospaced
+思源黑體 HW;Source Han Sans HW;Noto Sans Mono CJK 
TC;細明體;MingLiU;Liberation Mono;Menlo;Courier New;Monospaced
   
   
-思源黑體;蘋方-繁;PingFang TC;儷黑 Pro;LiHei 
Pro;微軟正黑體;文泉驛微米黑;Hei;新細明體;PMingLiU;Ming;Andale 
Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma
+思源黑體;Source Han Sans;Noto Sans CJK 
TC;蘋方-繁;PingFang TC;儷黑 Pro;LiHei Pro;微軟正黑體;Microsoft 
JhengHei;新細明體;PMingLiU;Arial Unicode MS;Liberation Sans;Tahoma
   
   
-思源黑體;蘋方-繁;PingFang TC;儷黑 Pro;LiHei 
Pro;微軟正黑體;文泉驛微米黑;Hei;新細明體;PMingLiU;Ming;Andale 
Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma
+思源黑體;Source Han Sans;Noto Sans CJK 
TC;蘋方-繁;PingFang TC;儷黑 Pro;LiHei Pro;微軟正黑體;Microsoft 
JhengHei;新細明體;PMingLiU;Arial Unicode MS;Liberation Sans;Tahoma
   
   
-思源黑體;蘋方-繁;PingFang TC;儷黑 Pro;LiHei 
Pro;微軟正黑體;文泉驛微米黑;Hei;新細明體;PMingLiU;Ming;Andale 
Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma
+思源黑體;Source Han Sans;Noto Sans CJK 
TC;蘋方-繁;PingFang TC;儷黑 Pro;LiHei Pro;微軟正黑體;Microsoft 
JhengHei;新細明體;PMingLiU;Arial Unicode MS;Liberation Sans;Tahoma
   
   
-思源黑體;蘋方-繁;PingFang TC;儷黑 Pro;LiHei 
Pro;微軟正黑體;文泉驛微米黑;Hei;新細明體;PMingLiU;Ming;Andale 
Sans UI;Arial Unicode MS;Lucida Sans Unicode;Tahoma
+思源黑體;Source Han Sans;Noto Sans CJK 
TC;蘋方-繁;PingFang TC;儷黑 Pro;LiHei Pro;微軟正黑體;Microsoft 
JhengHei;新細明體;PMingLiU;Arial Unicode MS;Liberation Sans;Tahoma
   
   
-思源宋體;宋體-繁;Songti TC;儷宋 Pro;LiSong 
Pro;新細明體;PMingLiU;AR PL UMing TW;Ming;Song;Sung;Andale Sans UI;Arial 
Unicode MS;Lucida Sans Unicode;Tahoma
+思源宋體;Source Han Serif;Noto Serif CJK 
TC;宋體-繁;Songti TC;儷宋 Pro;LiSong Pro;新細明體;PMingLiU;Arial 
Unicode MS;Liberation Sans;Tahoma
   
   
-思源黑體 
HW;細明體;MingLiU;文泉驛等寬微米黑;Liberation Mono;Cumberland 
AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida 
Typewriter;Monaco;Monospaced
+思源黑體 HW;Source Han Sans HW;Noto Sans Mono CJK 
TC;細明體;MingLiU;Liberation Mono;Menlo;Courier New;Monospaced
   
   
-思源黑體 
HW;細明體;MingLiU;文泉驛等寬微米黑;Liberation Mono;Cumberland 
AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida 
Typewriter;Monaco;Monospaced
+思源黑體 HW;Source Han Sans HW;Noto Sans Mono CJK 
TC;細明體;MingLiU;Liberation Mono;Menlo;Courier New;Monospaced
   
   
-思源黑體;蘋方-繁;PingFang TC;儷黑 Pro;LiHei 
Pro;微軟正黑體;文泉驛微米黑;Hei;新細明體;PMingLiU;Andale Sans 
UI;Arial Unicode MS;Ming;gnu-unifont;Interface User;WarpSans;Geneva;Tahoma;MS 
Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans 
L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif
+思源黑體;Source Han Sans;Noto Sans CJK 
TC;蘋方-繁;PingFang TC;儷黑 Pro;LiHei Pro;微軟正黑體;Microsoft 
JhengHei;新細明體;PMingLiU;Segoe UI;Tahoma;San Francisco;Lucida Grande;Sans 
Serif
   
 
 
   
-思源黑體 
HW;細明體;MingLiU;文泉驛等寬微米黑;Liberation Mono;Cumberland 
AMT;Cumberland;Courier New;Nimbus Mono L;Courier;Lucida Sans Typewriter;Lucida 
Typewriter;Monaco;Monospaced
+思源黑體 HW;Source Han Sans HW;Noto Sans Mono CJK 
TC;細明體;MingLiU;Liberation Mono;Menlo;Courier 

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

2018-01-09 Thread Bartosz Kosiorek
 chart2/qa/extras/chart2export.cxx  |   15 +
 include/oox/export/chartexport.hxx |5 +--
 oox/source/export/chartexport.cxx  |   60 +
 3 files changed, 59 insertions(+), 21 deletions(-)

New commits:
commit 84392651d2731cce91c3b2e144bed4ac07e4ddf1
Author: Bartosz Kosiorek 
Date:   Wed Jan 3 23:27:16 2018 +0100

tdf#114173 Preserve size of chart legend during xlsx export

During export chart into .xlsx file,
the information about size of legend was not saved.
Example of proper size:


another issue was hardcoded "layoutTarget" which
was always "inner":

also properties regarding default text style was not preserved:



















With this patch all these issues was resolved, and in case
of layoutTarget "outer", the field is not availble at all,
according to specification.

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

diff --git a/chart2/qa/extras/chart2export.cxx 
b/chart2/qa/extras/chart2export.cxx
index b68f969cb90b..6764935a91cc 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -1407,6 +1407,7 @@ void Chart2ExportTest::testTitleManualLayoutXLSX()
 load("/chart2/qa/extras/data/xlsx/", "title_manual_layout.xlsx");
 xmlDocPtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
 CPPUNIT_ASSERT(pXmlDoc);
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:layoutTarget", 0);
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:xMode", "val", "edge");
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:yMode", "val", "edge");
 
@@ -1428,6 +1429,7 @@ void Chart2ExportTest::testPlotAreaManualLayoutXLSX()
 xmlDocPtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
 CPPUNIT_ASSERT(pXmlDoc);
 
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:layoutTarget", 
"val", "inner");
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:xMode", "val", 
"edge");
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:yMode", "val", 
"edge");
 
@@ -1456,6 +1458,7 @@ void Chart2ExportTest::testLegendManualLayoutXLSX()
 xmlDocPtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
 CPPUNIT_ASSERT(pXmlDoc);
 
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:layoutTarget", 0);
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:xMode", "val", 
"edge");
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:yMode", "val", 
"edge");
 
@@ -1467,6 +1470,18 @@ void Chart2ExportTest::testLegendManualLayoutXLSX()
 double nY = aYVal.toDouble();
 CPPUNIT_ASSERT(nY > 0 && nY < 1);
 CPPUNIT_ASSERT(nX != nY);
+
+OUString aWVal = getXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:w", "val");
+double nW = aWVal.toDouble();
+CPPUNIT_ASSERT(nW > 0 && nW < 1);
+
+OUString aHVal = getXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:h", "val");
+double nH = aHVal.toDouble();
+CPPUNIT_ASSERT(nH > 0 && nH < 1);
+CPPUNIT_ASSERT(nH != nW);
+
+// Make sure that default text font size is preserved after export
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:legend/c:txPr/a:p/a:pPr/a:defRPr", "sz", "900");
 }
 
 void Chart2ExportTest::testAxisCharacterPropertiesXLSX()
diff --git a/include/oox/export/chartexport.hxx 
b/include/oox/export/chartexport.hxx
index 6d336f9a863b..0c59b1b5a713 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -134,7 +134,8 @@ private:
   css::chart::XChartDocument >& rChartDoc );
 void exportTitle( const css::uno::Reference<
   css::drawing::XShape >& xShape );
-void exportPlotArea( );
+void exportPlotArea( const css::uno::Reference<
+ css::chart::XChartDocument >& rChartDoc );
 void exportPlotAreaShapeProps( const css::uno::Reference< 
css::beans::XPropertySet >& xPropSet  );
 void exportFill( const css::uno::Reference< css::beans::XPropertySet 

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

2018-01-09 Thread Caolán McNamara
 sw/source/filter/html/htmltab.cxx |   31 +++
 1 file changed, 15 insertions(+), 16 deletions(-)

New commits:
commit a79bcb2c4615be6ef53635ed52bab0b7655a2d4a
Author: Caolán McNamara 
Date:   Tue Jan 9 09:32:07 2018 +

doesn't have to be dynamically allocated

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

diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index 1f44e0bd138c..b84f5c2fccbb 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -270,7 +270,7 @@ typedef std::vector> 
HTMLTableCells;
 
 class HTMLTableRow
 {
-std::unique_ptr m_xCells;   ///< cells of the row
+HTMLTableCells m_aCells;///< cells of the row
 
 bool bIsEndOfGroup : 1;
 
@@ -756,8 +756,7 @@ std::unique_ptr 
HTMLTableCell::CreateLayoutInfo()
 }
 
 HTMLTableRow::HTMLTableRow(sal_uInt16 const nCells)
-: m_xCells(new HTMLTableCells),
-bIsEndOfGroup(false),
+: bIsEndOfGroup(false),
 nHeight(0),
 nEmptyRows(0),
 eAdjust(SvxAdjust::End),
@@ -766,10 +765,10 @@ HTMLTableRow::HTMLTableRow(sal_uInt16 const nCells)
 {
 for( sal_uInt16 i=0; ipush_back(o3tl::make_unique());
+m_aCells.push_back(o3tl::make_unique());
 }
 
-OSL_ENSURE(nCells == m_xCells->size(),
+OSL_ENSURE(nCells == m_aCells.size(),
 "wrong Cell count in new HTML table row");
 }
 
@@ -781,9 +780,9 @@ inline void HTMLTableRow::SetHeight( sal_uInt16 nHght )
 
 inline HTMLTableCell *HTMLTableRow::GetCell( sal_uInt16 nCell ) const
 {
-OSL_ENSURE( nCell < m_xCells->size(),
+OSL_ENSURE( nCell < m_aCells.size(),
 "invalid cell index in HTML table row" );
-return m_xCells->at(nCell).get();
+return m_aCells.at(nCell).get();
 }
 
 void HTMLTableRow::Expand( sal_uInt16 nCells, bool bOneCell )
@@ -791,34 +790,34 @@ void HTMLTableRow::Expand( sal_uInt16 nCells, bool 
bOneCell )
 // This row will be filled with a single cell if bOneCell is set.
 // This will only work for rows that don't allow adding cells!
 
-sal_uInt16 nColSpan = nCells - m_xCells->size();
-for (sal_uInt16 i = m_xCells->size(); i < nCells; ++i)
+sal_uInt16 nColSpan = nCells - m_aCells.size();
+for (sal_uInt16 i = m_aCells.size(); i < nCells; ++i)
 {
 std::unique_ptr pCell(new HTMLTableCell);
 if( bOneCell )
 pCell->SetColSpan( nColSpan );
 
-m_xCells->push_back(std::move(pCell));
+m_aCells.push_back(std::move(pCell));
 nColSpan--;
 }
 
-OSL_ENSURE(nCells == m_xCells->size(),
+OSL_ENSURE(nCells == m_aCells.size(),
 "wrong Cell count in expanded HTML table row");
 }
 
 void HTMLTableRow::Shrink( sal_uInt16 nCells )
 {
-OSL_ENSURE(nCells < m_xCells->size(), "number of cells too large");
+OSL_ENSURE(nCells < m_aCells.size(), "number of cells too large");
 
 #if OSL_DEBUG_LEVEL > 0
- sal_uInt16 const nEnd = m_xCells->size();
+ sal_uInt16 const nEnd = m_aCells.size();
 #endif
 // The colspan of empty cells at the end has to be fixed to the new
 // number of cells.
 sal_uInt16 i=nCells;
 while( i )
 {
-HTMLTableCell *pCell = (*m_xCells)[--i].get();
+HTMLTableCell *pCell = m_aCells[--i].get();
 if( !pCell->GetContents() )
 {
 #if OSL_DEBUG_LEVEL > 0
@@ -833,7 +832,7 @@ void HTMLTableRow::Shrink( sal_uInt16 nCells )
 #if OSL_DEBUG_LEVEL > 0
 for( i=nCells; iGetRowSpan() == 1,
 "RowSpan of to be deleted cell is wrong" );
 OSL_ENSURE( pCell->GetColSpan() == nEnd - i,
@@ -842,7 +841,7 @@ void HTMLTableRow::Shrink( sal_uInt16 nCells )
 }
 #endif
 
-m_xCells->erase(m_xCells->begin() + nCells, m_xCells->end());
+m_aCells.erase(m_aCells.begin() + nCells, m_aCells.end());
 }
 
 HTMLTableColumn::HTMLTableColumn():
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - sw/inc sw/source xmloff/source

2018-01-09 Thread Bernhard Widl
 sw/inc/cmdid.h |2 +
 sw/inc/crsrsh.hxx  |5 ++
 sw/inc/unoprnms.hxx|2 +
 sw/source/core/crsr/crbm.cxx   |   25 
 sw/source/core/unocore/unobkm.cxx  |   74 -
 sw/source/core/unocore/unomap1.cxx |2 +
 sw/source/ui/misc/bookmark.cxx |2 -
 xmloff/source/text/txtparae.cxx|   24 
 8 files changed, 133 insertions(+), 3 deletions(-)

New commits:
commit b3226f8133ef28a0cc7328e419e0bf54abd3fda1
Author: Bernhard Widl 
Date:   Fri Dec 22 17:39:15 2017 +0100

tdf#101856 create bookmarks w/ new hidden/condition attrs, and save as odt

Change-Id: Ib1df7a4c1477693aa2d0ec067635cdcbd393cebd
Reviewed-on: https://gerrit.libreoffice.org/47598
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 09cd1f48513c..36a93cef8ba7 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -814,6 +814,8 @@
 #define FN_PARAM_PAM(FN_PARAM2+27) /* Point and Mark */
 #define FN_TEXT_BOX (FN_PARAM2+28) /* TextBox Property*/
 #define FN_PARAM_IGNORE_PROTECTED   (FN_PARAM2+29) /* Ignore protected 
areas */
+#define FN_BOOKMARK_HIDDEN  (FN_PARAM2+30) /* Hidden Property of 
bookmarks*/
+#define FN_BOOKMARK_CONDITION   (FN_PARAM2+31) /* Condition Property 
of bookmarks*/
 
 // Status: not more than 19!
 #define FN_STAT_PAGE(FN_STAT + 1)
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 89c90a965cfd..8195259686eb 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -549,6 +549,11 @@ public:
 const OUString& rName,
 const OUString& rShortName,
 IDocumentMarkAccess::MarkType eMark = 
IDocumentMarkAccess::MarkType::BOOKMARK);
+::sw::mark::IMark* SetBookmark(
+const vcl::KeyCode&,
+const OUString& rName,
+bool rHide,
+const OUString& rCondition);
 bool GotoMark( const ::sw::mark::IMark* const pMark );// sets 
CurrentCursor.SPoint
 bool GotoMark( const ::sw::mark::IMark* const pMark, bool bAtStart );
 bool GoNextBookmark(); // true, if there was one
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 63589f273ce5..c700ee3bb468 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -331,6 +331,8 @@
 #define UNO_NAME_IS_GLOBAL_DOCUMENT_SECTION "IsGlobalDocumentSection"
 #define UNO_NAME_TEXT_FIELD "TextField"
 #define UNO_NAME_BOOKMARK "Bookmark"
+#define UNO_NAME_BOOKMARK_HIDDEN "BookmarkHidden"
+#define UNO_NAME_BOOKMARK_CONDITION "BookmarkCondition"
 #define UNO_NAME_TEXT_TABLE "TextTable"
 #define UNO_NAME_CELL "Cell"
 #define UNO_NAME_TEXT_FRAME "TextFrame"
diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx
index 946af35c5cae..eff58b1f8ad6 100644
--- a/sw/source/core/crsr/crbm.cxx
+++ b/sw/source/core/crsr/crbm.cxx
@@ -99,6 +99,31 @@ namespace
 }
 // set CurrentCursor.SPoint
 
+// at CurrentCursor.SPoint
+::sw::mark::IMark* SwCursorShell::SetBookmark(
+const vcl::KeyCode& rCode,
+const OUString& rName,
+bool rHide,
+const OUString& rCondition)
+{
+StartAction();
+::sw::mark::IMark* pMark = getIDocumentMarkAccess()->makeMark(
+*GetCursor(),
+rName,
+IDocumentMarkAccess::MarkType::BOOKMARK, sw::mark::InsertMode::New);
+::sw::mark::IBookmark* pBookmark = dynamic_cast< ::sw::mark::IBookmark* 
>(pMark);
+if (pBookmark)
+{
+pBookmark->SetKeyCode(rCode);
+pBookmark->SetShortName(OUString());
+pBookmark->Hide(rHide);
+pBookmark->SetHideCondition(rCondition);
+}
+EndAction();
+return pMark;
+}
+// set CurrentCursor.SPoint
+
 bool SwCursorShell::GotoMark(const ::sw::mark::IMark* const pMark, bool 
bAtStart)
 {
 // watch Cursor-Moves
diff --git a/sw/source/core/unocore/unobkm.cxx 
b/sw/source/core/unocore/unobkm.cxx
index feca7d3cdee8..bfd4bedc3975 100644
--- a/sw/source/core/unocore/unobkm.cxx
+++ b/sw/source/core/unocore/unobkm.cxx
@@ -52,13 +52,16 @@ public:
 ::comphelper::OInterfaceContainerHelper2  m_EventListeners;
 SwDoc * m_pDoc;
 ::sw::mark::IMark * m_pRegisteredBookmark;
-OUString m_sMarkName;
+OUStringm_sMarkName;
+boolm_bHidden;
+OUStringm_HideCondition;
 
 Impl(   SwDoc *const pDoc, ::sw::mark::IMark *const /*pBookmark*/)
 : SwClient()
 , m_EventListeners(m_Mutex)
 , m_pDoc(pDoc)
 , m_pRegisteredBookmark(nullptr)
+, m_bHidden(false)
 {
 // DO NOT registerInMark here! (because SetXBookmark would delete 
rThis)
 }
@@ -106,6 +109,14 @@ void SwXBookmark::Impl::registerInMark(SwXBookmark & rThis,
 else if (m_pRegisteredBookmark)
 {
 m_sMarkName = m_pRegisteredBookmark->GetName();
+
+// the following applies only to b

[Libreoffice-commits] core.git: Branch 'distro/collabora/cd-5.3' - vcl/headless

2018-01-09 Thread Ashod Nakashian
 vcl/headless/svpgdi.cxx |   21 +
 1 file changed, 17 insertions(+), 4 deletions(-)

New commits:
commit 67db4fe90e4c6e038b06bd3597fd876322cf8e48
Author: Ashod Nakashian 
Date:   Sun Jan 7 21:11:31 2018 -0500

vcl: mask must alwasy be argb32 even when we can use rgb24

Change-Id: I932669fc5ead7de60561d769dd21d2c35c1f957d
Reviewed-on: https://gerrit.libreoffice.org/47564
Tested-by: Jenkins 
Reviewed-by: Andras Timar 
(cherry picked from commit acb43c0b8efbfb841e7b40603d75a8432eb21f21)
Reviewed-on: https://gerrit.libreoffice.org/47626
Tested-by: Andras Timar 

diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index e928961055c3..42799ae12785 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -226,12 +226,16 @@ namespace
 class SourceHelper
 {
 public:
-explicit SourceHelper(const SalBitmap& rSourceBitmap)
+explicit SourceHelper(const SalBitmap& rSourceBitmap, const bool 
bForceARGB32 = false)
+#ifdef HAVE_CAIRO_FORMAT_RGB24_888
+: m_bForceARGB32(bForceARGB32)
+#endif
 {
 const SvpSalBitmap& rSrcBmp = static_cast(rSourceBitmap);
 #ifdef HAVE_CAIRO_FORMAT_RGB24_888
-if (rSrcBmp.GetBitCount() != 32 && rSrcBmp.GetBitCount() != 24)
+if ((rSrcBmp.GetBitCount() != 32 && rSrcBmp.GetBitCount() != 24) 
|| bForceARGB32)
 #else
+(void)bForceARGB32;
 if (rSrcBmp.GetBitCount() != 32)
 #endif
 {
@@ -272,13 +276,22 @@ namespace
 
 unsigned char *mask_data = cairo_image_surface_get_data(source);
 
-cairo_format_t nFormat = cairo_image_surface_get_format(source);
+const cairo_format_t nFormat = 
cairo_image_surface_get_format(source);
+#ifdef HAVE_CAIRO_FORMAT_RGB24_888
+if (!m_bForceARGB32)
+assert(nFormat == CAIRO_FORMAT_RGB24_888 && "Expected 
RGB24_888 image");
+else
+#endif
 assert(nFormat == CAIRO_FORMAT_ARGB32 && "need to implement 
CAIRO_FORMAT_A1 after all here");
+
 rStride = cairo_format_stride_for_width(nFormat, 
cairo_image_surface_get_width(source));
 
 return mask_data;
 }
 private:
+#ifdef HAVE_CAIRO_FORMAT_RGB24_888
+const bool m_bForceARGB32;
+#endif
 SvpSalBitmap aTmpBmp;
 cairo_surface_t* source;
 
@@ -1230,7 +1243,7 @@ void SvpSalGraphics::drawMask( const SalTwoRect& rTR,
 {
 /** creates an image from the given rectangle, replacing all black pixels
  *  with nMaskColor and make all other full transparent */
-SourceHelper aSurface(rSalBitmap);
+SourceHelper aSurface(rSalBitmap, true); // The mask is argb32
 sal_Int32 nStride;
 unsigned char *mask_data = aSurface.getBits(nStride);
 for (sal_Int32 y = rTR.mnSrcY ; y < rTR.mnSrcY + rTR.mnSrcHeight; ++y)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Jens Carl
 offapi/com/sun/star/sheet/SpreadsheetViewSettings.idl |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit ca25acdb1cd0a4ef8e9954908aed9e1867fddf9d
Author: Jens Carl 
Date:   Tue Jan 9 07:51:32 2018 +

offapi: Mark property "HideSpellMarks" as deprecated.

The functionality of the property was removed in 2008
(see commit e675e98a9bb1ae81f93486b80f5bf2f84b570e25).

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

diff --git a/offapi/com/sun/star/sheet/SpreadsheetViewSettings.idl 
b/offapi/com/sun/star/sheet/SpreadsheetViewSettings.idl
index 2ba99d5a9f62..9dc5b853f61d 100644
--- a/offapi/com/sun/star/sheet/SpreadsheetViewSettings.idl
+++ b/offapi/com/sun/star/sheet/SpreadsheetViewSettings.idl
@@ -134,18 +134,22 @@ published service SpreadsheetViewSettings
 
 
 /** disables the display of marks from online spelling.
+
+@deprecated
  */
 [property] boolean HideSpellMarks;
 
+
 /** This property defines the zoom type for the document.
 
 @see com::sun::star::view::DocumentZoomType
 */
 [property] short ZoomType;
 
-/** Defines the zoom value to use.
-Valid only if the ZoomType is set to
-com::sun::star::view::DocumentZoomType::BY_VALUE.
+
+/** Defines the zoom value to use.
+Valid only if the ZoomType is set to
+com::sun::star::view::DocumentZoomType::BY_VALUE.
 */
 [property] short ZoomValue;
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Stephan Bergmann
 wizards/com/sun/star/wizards/common/Configuration.py |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit a51cb7fb81139f5f8f013c53a154078ef36032f0
Author: Stephan Bergmann 
Date:   Mon Jan 8 14:31:58 2018 +0100

tdf#114881: Re-introduce ConfigurationUpdateAccess

...which had accidentally been removed completely from this part of
cb2550750386f51ef7a46a8a664a4ab9de614f8d "Drop lazywrite property, which is
silently ignored by configmgr anyway"

Change-Id: Ibacacc7b04bbd0a0cc819530594dd042329b366f
Reviewed-on: https://gerrit.libreoffice.org/47600
Reviewed-by: Julien Nabet 
Tested-by: Jenkins 
(cherry picked from commit 2f9aea0c1aa77a88a3dbfcc668dc410f983f3460)
Reviewed-on: https://gerrit.libreoffice.org/47621
Reviewed-by: Michael Stahl 

diff --git a/wizards/com/sun/star/wizards/common/Configuration.py 
b/wizards/com/sun/star/wizards/common/Configuration.py
index 95816ca6c071..e63d20827542 100644
--- a/wizards/com/sun/star/wizards/common/Configuration.py
+++ b/wizards/com/sun/star/wizards/common/Configuration.py
@@ -34,7 +34,10 @@ class Configuration(object):
 
 args.append(aPathArgument)
 
-sView = "com.sun.star.configuration.ConfigurationAccess"
+if updateable:
+sView = "com.sun.star.configuration.ConfigurationUpdateAccess"
+else:
+sView = "com.sun.star.configuration.ConfigurationAccess"
 
 return oConfigProvider.createInstanceWithArguments(sView, tuple(args))
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Caolán McNamara
 vcl/source/fontsubset/cff.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7f9a8481f76fc45ff682b654484c1ac311820dfe
Author: Caolán McNamara 
Date:   Mon Jan 8 16:42:46 2018 +

tdf#114704 use of float as intermediate causes out by one on large offsets

table offset integer value of 21281769 is correctly read, but on cast to 
float
it is represented as 21281768 and we're off by one when cast back to integer
later

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

diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index f7d3cdd3d8ca..3eabfc5faf2e 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -31,7 +31,7 @@ typedef long long S64;
 
 typedef sal_Int32 GlyphWidth;
 
-typedef float RealType;
+typedef double RealType;
 typedef RealType ValType;
 #include 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Caolán McNamara
 vcl/source/fontsubset/cff.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4e96c457f08368843d32337a9a2d9ccefa62839e
Author: Caolán McNamara 
Date:   Mon Jan 8 16:42:46 2018 +

tdf#114704 use of float as intermediate causes out by one on large offsets

table offset integer value of 21281769 is correctly read, but on cast to 
float
it is represented as 21281768 and we're off by one when cast back to integer
later

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

diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 00b6492ad34c..284242882274 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -31,7 +31,7 @@ typedef long long S64;
 
 typedef sal_Int32 GlyphWidth;
 
-typedef float RealType;
+typedef double RealType;
 typedef RealType ValType;
 #include 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - distro-configs/LibreOfficeFlatpak.conf Makefile.in solenv/bin solenv/flatpak-manifest.in

2018-01-09 Thread Stephan Bergmann
 Makefile.in|   17 +
 distro-configs/LibreOfficeFlatpak.conf |1 +
 solenv/bin/assemble-flatpak.sh |2 +-
 solenv/flatpak-manifest.in |2 +-
 4 files changed, 8 insertions(+), 14 deletions(-)

New commits:
commit 8ebc1d2df3bb60ac79d963db384b528bb359264e
Author: Stephan Bergmann 
Date:   Mon Jan 8 10:40:32 2018 +0100

Let flatpak-builder build .Debug extension

Includes a revert of 58891d589bd8da700f135b098dd50833277c65dc "Add 
distro-pack-
install-strip target to be used by dev-tools' flatpak/build.sh".

Change-Id: Ie2ba18bc13471b46e8d5f41868bae5aee17ff25f
Reviewed-on: https://gerrit.libreoffice.org/47599
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 0ba869fc5c13a29599fda7eb976b2e7959706e04)
Reviewed-on: https://gerrit.libreoffice.org/47618
Reviewed-by: Michael Stahl 

diff --git a/Makefile.in b/Makefile.in
index afaa9085cbad..768861f2bcf6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -9,7 +9,7 @@
 
 gb_Top_MODULE_CHECK_TARGETS := slowcheck unitcheck subsequentcheck perfcheck 
uicheck screenshot
 
-.PHONY : all check-if-root bootstrap gbuild build build-non-l10n-only 
build-l10n-only check clean clean-build clean-host test-install distclean 
distro-pack-install distro-pack-install-strip docs download etags fetch 
get-submodules id install install-gdb-printers install-strip tags debugrun help 
showmodules translations packageinfo internal.clean 
$(gb_Top_MODULE_CHECK_TARGETS)
+.PHONY : all check-if-root bootstrap gbuild build build-non-l10n-only 
build-l10n-only check clean clean-build clean-host test-install distclean 
distro-pack-install docs download etags fetch get-submodules id install 
install-gdb-printers install-strip tags debugrun help showmodules translations 
packageinfo internal.clean $(gb_Top_MODULE_CHECK_TARGETS)
 
 MAKECMDGOALS?=all
 build_goal:=$(if $(filter build check,$(MAKECMDGOALS)),all)\
@@ -382,18 +382,11 @@ else
@exit 1
 endif
 
-define gb_Top_DistroPackInstall
-$(SRCDIR)/bin/distro-install-clean-up
-$(SRCDIR)/bin/distro-install-desktop-integration
-$(SRCDIR)/bin/distro-install-sdk
-$(SRCDIR)/bin/distro-install-file-lists
-endef
-
 distro-pack-install: install
-   $(gb_Top_DistroPackInstall)
-
-distro-pack-install-strip: install-strip
-   $(gb_Top_DistroPackInstall)
+   $(SRCDIR)/bin/distro-install-clean-up
+   $(SRCDIR)/bin/distro-install-desktop-integration
+   $(SRCDIR)/bin/distro-install-sdk
+   $(SRCDIR)/bin/distro-install-file-lists
 
 install-package-%:
$(MAKE) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
diff --git a/distro-configs/LibreOfficeFlatpak.conf 
b/distro-configs/LibreOfficeFlatpak.conf
index bb6b12b567c4..60312c31c8f5 100644
--- a/distro-configs/LibreOfficeFlatpak.conf
+++ b/distro-configs/LibreOfficeFlatpak.conf
@@ -1,5 +1,6 @@
 --disable-odk
 --enable-release-build
+--enable-symbols
 --with-ant-home=/run/build/libreoffice/ant
 --with-extra-buildid=Flatpak version
 --with-jdk-home=/usr/lib/sdk/openjdk9/jvm/openjdk-9
diff --git a/solenv/bin/assemble-flatpak.sh b/solenv/bin/assemble-flatpak.sh
index e678b9894b86..3eade815b11b 100755
--- a/solenv/bin/assemble-flatpak.sh
+++ b/solenv/bin/assemble-flatpak.sh
@@ -8,7 +8,7 @@
 #
 
 # Assemble Flatpak app files and metadata under /app/, copying from the
-# installation tree generated by 'make distro-pack-install-strip' (at
+# installation tree generated by 'make distro-pack-install' (at
 # $PREFIXDIR):
 
 set -e
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index eed6a529b18d..25c34377dd88 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -510,7 +510,7 @@
 "build-commands": [
 "./autogen.sh --prefix=/run/build/libreoffice/inst 
--with-distro=LibreOfficeFlatpak",
 "make",
-"make distro-pack-install-strip",
+"make distro-pack-install",
 "make cmd cmd='$(SRCDIR)/solenv/bin/assemble-flatpak.sh'"
 ]
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Caolán McNamara
 sw/source/ui/index/swuiidxmrk.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 513a21c1d635ea5b830f6b075b2a951ca1c94eff
Author: Caolán McNamara 
Date:   Mon Jan 8 12:20:11 2018 +

Resolves: tdf#114728 wrong entries in bibliographic entry dialog

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

diff --git a/sw/source/ui/index/swuiidxmrk.cxx 
b/sw/source/ui/index/swuiidxmrk.cxx
index 61249f585796..6c2561065cff 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -1502,7 +1502,8 @@ 
SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(vcl::Window* pParent,
 {
 pTypeListBox = VclPtr::Create(bLeft ? pLeft : pRight, 
WB_DROPDOWN|WB_BORDER|WB_VCENTER);
 for (int j = 0; j < AUTH_TYPE_END; j++)
-pTypeListBox->InsertEntry(SwResId(STR_AUTH_FIELD_ARY[j]));
+
pTypeListBox->InsertEntry(SwAuthorityFieldType::GetAuthTypeName(static_cast(j)));
+pTypeListBox->EnableAutoSize(true);
 if(!pFields[aCurInfo.nToxField].isEmpty())
 {
 
pTypeListBox->SelectEntryPos(pFields[aCurInfo.nToxField].toInt32());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Andras Timar
 loleaflet/po/templates/loleaflet-ui.pot |   78 +---
 1 file changed, 32 insertions(+), 46 deletions(-)

New commits:
commit 548f6bd160b27a2318a37d6f3756e3a7bfa141b8
Author: Andras Timar 
Date:   Tue Jan 9 15:55:58 2018 +0100

loleaflet: updated UI pot

Change-Id: I4b97b87177c9993a11fccf5d504858e36f8594ad

diff --git a/loleaflet/po/templates/loleaflet-ui.pot 
b/loleaflet/po/templates/loleaflet-ui.pot
index f9452123..ca960428 100644
--- a/loleaflet/po/templates/loleaflet-ui.pot
+++ b/loleaflet/po/templates/loleaflet-ui.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-01-03 13:18+0100\n"
+"POT-Creation-Date: 2018-01-09 15:54+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME \n"
 "Language-Team: LANGUAGE \n"
@@ -360,7 +360,7 @@ msgstr ""
 msgid "Last sheet"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:647 src/control/Control.Menubar.js:273
+#: dist/toolbar/toolbar.js:647 src/control/Control.Menubar.js:269
 msgid "Fullscreen presentation"
 msgstr ""
 
@@ -376,8 +376,8 @@ msgstr ""
 msgid "No users"
 msgstr ""
 
-#: dist/toolbar/toolbar.js:690 src/control/Control.Menubar.js:57
-#: src/control/Control.Menubar.js:241
+#: dist/toolbar/toolbar.js:690 src/control/Control.Menubar.js:59
+#: src/control/Control.Menubar.js:237
 msgid "Reset zoom"
 msgstr ""
 
@@ -587,18 +587,18 @@ msgstr ""
 msgid "Jump to state"
 msgstr ""
 
-#: src/control/Control.Menubar.js:21 src/control/Control.Menubar.js:217
-#: src/control/Control.Menubar.js:292
+#: src/control/Control.Menubar.js:21 src/control/Control.Menubar.js:211
+#: src/control/Control.Menubar.js:288
 msgid "See revision history"
 msgstr ""
 
-#: src/control/Control.Menubar.js:22 src/control/Control.Menubar.js:218
-#: src/control/Control.Menubar.js:293
+#: src/control/Control.Menubar.js:22 src/control/Control.Menubar.js:212
+#: src/control/Control.Menubar.js:289
 msgid "Download as"
 msgstr ""
 
-#: src/control/Control.Menubar.js:23 src/control/Control.Menubar.js:219
-#: src/control/Control.Menubar.js:294
+#: src/control/Control.Menubar.js:23 src/control/Control.Menubar.js:213
+#: src/control/Control.Menubar.js:290
 msgid "PDF Document (.pdf)"
 msgstr ""
 
@@ -614,87 +614,73 @@ msgstr ""
 msgid "Microsoft Word (.docx)"
 msgstr ""
 
-#: src/control/Control.Menubar.js:31 src/control/Control.Menubar.js:227
-#: src/control/Control.Menubar.js:302
+#: src/control/Control.Menubar.js:33 src/control/Control.Menubar.js:223
+#: src/control/Control.Menubar.js:300
 msgid "Repair"
 msgstr ""
 
-#: src/control/Control.Menubar.js:114
+#: src/control/Control.Menubar.js:116
 msgid "Text orientation"
 msgstr ""
 
-#: src/control/Control.Menubar.js:162
-msgid "Page"
-msgstr ""
-
-#: src/control/Control.Menubar.js:163 src/control/Control.Menubar.js:165
-#: src/control/Control.Menubar.js:167 src/control/Control.Menubar.js:169
-msgid "Portrait"
-msgstr ""
-
-#: src/control/Control.Menubar.js:164 src/control/Control.Menubar.js:166
-#: src/control/Control.Menubar.js:168 src/control/Control.Menubar.js:170
-msgid "Landscape"
-msgstr ""
-
-#: src/control/Control.Menubar.js:197 src/control/Control.Menubar.js:199
-#: src/control/Control.Menubar.js:201 src/control/Control.Menubar.js:278
-#: src/control/Control.Menubar.js:359
+#: src/control/Control.Menubar.js:191 src/control/Control.Menubar.js:193
+#: src/control/Control.Menubar.js:195 src/control/Control.Menubar.js:274
+#: src/control/Control.Menubar.js:364
 msgid "None (Do not check spelling)"
 msgstr ""
 
-#: src/control/Control.Menubar.js:206 src/control/Control.Menubar.js:281
-#: src/control/Control.Menubar.js:362
+#: src/control/Control.Menubar.js:200 src/control/Control.Menubar.js:277
+#: src/control/Control.Menubar.js:367
 msgid "Keyboard shortcuts"
 msgstr ""
 
-#: src/control/Control.Menubar.js:207 src/control/Control.Menubar.js:282
-#: src/control/Control.Menubar.js:363
+#: src/control/Control.Menubar.js:201 src/control/Control.Menubar.js:278
+#: src/control/Control.Menubar.js:368
 msgid "About"
 msgstr ""
 
-#: src/control/Control.Menubar.js:209 src/control/Control.Menubar.js:284
-#: src/control/Control.Menubar.js:365
+#: src/control/Control.Menubar.js:203 src/control/Control.Menubar.js:280
+#: src/control/Control.Menubar.js:370
 msgid "Close document"
 msgstr ""
 
-#: src/control/Control.Menubar.js:220
+#: src/control/Control.Menubar.js:214
 msgid "ODF presentation (.odp)"
 msgstr ""
 
-#: src/control/Control.Menubar.js:221
+#: src/control/Control.Menubar.js:215
 msgid "Microsoft Powerpoint 2003 (.ppt)"
 msgstr ""
 
-#: src/control/Control.Menubar.js:222
+#: src/control/Control.Menubar.js:216
 msgid "Microsoft Powerpoint (.pptx)"
 msgstr ""
 
-#: src/control/Control.Menubar.js:295
+#: src/control/Control.Menubar.js:291
 msgid "ODF spreadsheet (.ods)"
 msgstr ""
 
-#: src/control/Control.Menubar.js:296
+#: src/control/Control.Menubar.js:292
 msgid "Microsoft Excel 2003 (.xls)"
 msgstr ""
 
-#

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

2018-01-09 Thread Miklos Vajna
 sw/qa/extras/ooxmlexport/data/tdf114703.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx   |   12 +
 writerfilter/source/dmapper/NumberingManager.cxx |   28 +--
 writerfilter/source/dmapper/NumberingManager.hxx |8 +++---
 4 files changed, 32 insertions(+), 16 deletions(-)

New commits:
commit d9fcc98c2d7d072d1a99c7c8b59806715a393a4f
Author: Miklos Vajna 
Date:   Mon Jan 8 22:59:21 2018 +0100

tdf#114703 DOCX import: apply num defaults only to abstract nums

Numbering definitions have two levels: abstract ones and overrides. The
full definition is a merge of the two. Make sure that when defaults are
added to the numbering level properties, these are only added for
abstract ones, otherwise overriding e.g. the start value of a level will
also pull in other, unwanted default properties.

(cherry picked from commit a6ec829055ab0b9d223979ae5f90d158d5549db1)

Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport11.cxx

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf114703.docx 
b/sw/qa/extras/ooxmlexport/data/tdf114703.docx
new file mode 100644
index ..116b56a2b42f
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf114703.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index a5f808f070b3..700c69b225c3 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -136,6 +136,18 @@ DECLARE_OOXMLEXPORT_TEST(testTdf113399, "tdf113399.doc")
 CPPUNIT_ASSERT_EQUAL(static_cast(0), nPaddingValue);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf114703, "tdf114703.docx")
+{
+uno::Reference xRules
+= getProperty>(
+getStyles("NumberingStyles")->getByName("WWNum1"), 
"NumberingRules");
+// This was 0, level override "default" replaced the non-default value from
+// the abstract level.
+CPPUNIT_ASSERT_EQUAL(
+static_cast(-1000),
+
comphelper::SequenceAsHashMap(xRules->getByIndex(0))["FirstLineIndent"].get());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx 
b/writerfilter/source/dmapper/NumberingManager.cxx
index 809717e62659..273501e6ccc6 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -191,9 +191,9 @@ sal_Int16 ListLevel::GetParentNumbering( const OUString& 
sText, sal_Int16 nLevel
 return nParentNumbering;
 }
 
-uno::Sequence< beans::PropertyValue > ListLevel::GetProperties( )
+uno::Sequence ListLevel::GetProperties(bool bDefaults)
 {
-uno::Sequence< beans::PropertyValue > aLevelProps = GetLevelProperties( );
+uno::Sequence aLevelProps = 
GetLevelProperties(bDefaults);
 if ( m_pParaStyle.get( ) )
 AddParaProperties( &aLevelProps );
 return aLevelProps;
@@ -233,7 +233,7 @@ uno::Sequence< beans::PropertyValue > 
ListLevel::GetCharStyleProperties( )
 return comphelper::containerToSequence(rProperties);
 }
 
-uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( )
+uno::Sequence ListLevel::GetLevelProperties(bool 
bDefaults)
 {
 const sal_Int16 aWWToUnoAdjust[] =
 {
@@ -286,7 +286,8 @@ uno::Sequence< beans::PropertyValue > 
ListLevel::GetLevelProperties( )
 }
 }
 
-aNumberingProperties.push_back(lcl_makePropVal(PROP_LISTTAB_STOP_POSITION, 
m_nTabstop));
+if (bDefaults || m_nTabstop != 0)
+
aNumberingProperties.push_back(lcl_makePropVal(PROP_LISTTAB_STOP_POSITION, 
m_nTabstop));
 
 //TODO: handling of nFLegal?
 //TODO: nFNoRestart lower levels do not restart when higher levels are 
incremented, like:
@@ -299,7 +300,8 @@ uno::Sequence< beans::PropertyValue > 
ListLevel::GetLevelProperties( )
 //TODO: sRGBXchNums; array of inherited numbers
 
 //  nXChFollow; following character 0 - tab, 1 - space, 2 - nothing
-aNumberingProperties.push_back(lcl_makePropVal(PROP_LEVEL_FOLLOW, 
m_nXChFollow));
+if (bDefaults || m_nXChFollow != SvxNumberFormat::LISTTAB)
+aNumberingProperties.push_back(lcl_makePropVal(PROP_LEVEL_FOLLOW, 
m_nXChFollow));
 
 PropertyIds const aReadIds[] =
 {
@@ -310,7 +312,7 @@ uno::Sequence< beans::PropertyValue > 
ListLevel::GetLevelProperties( )
 boost::optional aProp = getProperty(rReadId);
 if (aProp)
 aNumberingProperties.emplace_back( getPropertyName(aProp->first), 
0, aProp->second, beans::PropertyState_DIRECT_VALUE );
-else if (rReadId == PROP_FIRST_LINE_INDENT)
+else if (rReadId == PROP_FIRST_LINE_INDENT && bDefaults)
 // Writer default is -360 twips, Word default seems to be 0.
 aNumberingProperties.emplac

[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - svtools/CppunitTest_svtools_html.mk svtools/qa svtools/source

2018-01-09 Thread Miklos Vajna
 svtools/CppunitTest_svtools_html.mk |1 
 svtools/qa/unit/testHtmlReader.cxx  |   70 
 svtools/source/svhtml/parhtml.cxx   |3 +
 3 files changed, 73 insertions(+), 1 deletion(-)

New commits:
commit bf3940fc88e732a498598f0df61eafd63bbd5ce3
Author: Miklos Vajna 
Date:   Wed Dec 13 14:46:26 2017 +0100

Related: tdf#114428 svtools HTML import: avoid XML declaration in body text

Just ignore it for now.

Change-Id: Idf82af611370d957c6704cce250941a8a0b90637
Reviewed-on: https://gerrit.libreoffice.org/46388
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 
(cherry picked from commit 3fe64261b5658e28e2c0a1630cf878f066f77f0c)
Reviewed-on: https://gerrit.libreoffice.org/47589
Reviewed-by: Michael Stahl 

diff --git a/svtools/CppunitTest_svtools_html.mk 
b/svtools/CppunitTest_svtools_html.mk
index e3e56e4d9949..6fbca2c06442 100644
--- a/svtools/CppunitTest_svtools_html.mk
+++ b/svtools/CppunitTest_svtools_html.mk
@@ -14,6 +14,7 @@ $(eval $(call 
gb_CppunitTest_use_external,svtools_html,boost_headers))
 $(eval $(call gb_CppunitTest_use_sdk_api,svtools_html))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,svtools_html, \
+svtools/qa/unit/testHtmlReader \
 svtools/qa/unit/testHtmlWriter \
 ))
 
diff --git a/svtools/qa/unit/testHtmlReader.cxx 
b/svtools/qa/unit/testHtmlReader.cxx
new file mode 100644
index ..151976eabc9d
--- /dev/null
+++ b/svtools/qa/unit/testHtmlReader.cxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace
+{
+/// Subclass of HTMLParser that can sense the import result.
+class TestHTMLParser : public HTMLParser
+{
+public:
+TestHTMLParser(SvStream& rStream);
+virtual void NextToken(HtmlTokenId nToken) override;
+
+OUString m_aDocument;
+};
+
+TestHTMLParser::TestHTMLParser(SvStream& rStream)
+: HTMLParser(rStream)
+{
+}
+
+void TestHTMLParser::NextToken(HtmlTokenId nToken)
+{
+if (nToken == HtmlTokenId::TEXTTOKEN)
+m_aDocument += aToken;
+}
+
+/// Tests HTMLParser.
+class Test : public CppUnit::TestFixture
+{
+public:
+void testTdf114428();
+
+CPPUNIT_TEST_SUITE(Test);
+CPPUNIT_TEST(testTdf114428);
+CPPUNIT_TEST_SUITE_END();
+};
+
+void Test::testTdf114428()
+{
+SvMemoryStream aStream;
+OString aDocument("\nhello");
+aStream.WriteBytes(aDocument.getStr(), aDocument.getLength());
+aStream.Seek(0);
+
+tools::SvRef xParser = new TestHTMLParser(aStream);
+xParser->CallParser();
+
+// This was ' hello', XML declaration
+// was not ignored.
+CPPUNIT_ASSERT_EQUAL(OUString("hello"), xParser->m_aDocument.trim());
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(Test);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/svhtml/parhtml.cxx 
b/svtools/source/svhtml/parhtml.cxx
index 1eb82b6bb788..1b08446abf4b 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -1022,7 +1022,8 @@ HtmlTokenId HTMLParser::GetNextToken_()
 bOffState = true;
 nNextCh = GetNextChar();
 }
-if( rtl::isAsciiAlpha( nNextCh ) || '!'==nNextCh )
+// Assume 'https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cd-5.3' - configure.ac

2018-01-09 Thread Andras Timar
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 315b4ac6699f9a2aeaaf1b8e873dd471e74b9b83
Author: Andras Timar 
Date:   Tue Jan 9 15:59:46 2018 +

Bump version to 5.3-28

Change-Id: I173be2a85622dec9fbe3ec5201d3e855192263d0

diff --git a/configure.ac b/configure.ac
index 99869d5b210b..88253f149cea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([Collabora Office],[5.3.10.27],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[5.3.10.28],[],[],[https://collaboraoffice.com/])
 
 AC_PREREQ([2.59])
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Caolán McNamara
 lotuswordpro/source/filter/lwpstory.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit e285d2fcf557c79c3dff46a10ec619ae5e227ab6
Author: Caolán McNamara 
Date:   Tue Jan 9 13:57:24 2018 +

ofz: avoid loop

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

diff --git a/lotuswordpro/source/filter/lwpstory.cxx 
b/lotuswordpro/source/filter/lwpstory.cxx
index 19a1de7bf08e..48ef04d5af60 100644
--- a/lotuswordpro/source/filter/lwpstory.cxx
+++ b/lotuswordpro/source/filter/lwpstory.cxx
@@ -107,7 +107,10 @@ void LwpStory::XFConvert(XFContentContainer* pCont)
 
 //Get the xfcontainer for the next para
 pParaCont = xPara->GetXFContainer();
-xPara.set(dynamic_cast(xPara->GetNext().obj().get()));
+rtl::Reference 
xNext(dynamic_cast(xPara->GetNext().obj().get()));
+if (xPara == xNext)
+throw std::runtime_error("loop in conversion");
+xPara = xNext;
 }
 
 //process frame which anchor is to cell after converter all the para
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] libmspub.git: 4 commits - src/lib

2018-01-09 Thread David Tardon
 src/lib/MSPUBCollector.cpp |2 +-
 src/lib/MSPUBParser.cpp|   14 +-
 src/lib/MSPUBTypes.h   |   12 ++--
 3 files changed, 16 insertions(+), 12 deletions(-)

New commits:
commit 796f5e1f01b1a654964dfd8551cb1eaaa3a51287
Author: David Tardon 
Date:   Tue Jan 9 17:05:28 2018 +0100

ofz#4951 do not shift signed value

Change-Id: I6c2a48589fe6a585ce37c57a59d06c7e5ef31b25

diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp
index 8a4ada7..30b6e7d 100644
--- a/src/lib/MSPUBParser.cpp
+++ b/src/lib/MSPUBParser.cpp
@@ -2032,7 +2032,7 @@ std::shared_ptr MSPUBParser::getNewFill(const 
std::map> 16 : 0;
+short fillFocus = ptr_fillFocus ? int((*ptr_fillFocus << 16) >> 16) : 0;
 angle = ptr_angle ? *ptr_angle : 0;
 angle >>= 16; //it's actually only 16 bits
 // Don't try to figure out what sense the following switch statement makes.
commit 035c728fc49b86c68bf8c8db9a13be1590c04b1a
Author: David Tardon 
Date:   Tue Jan 9 16:55:21 2018 +0100

ofz#4916 fix division by 0

Change-Id: I629399bb0790b27e71bea9cd89485ecd471830d8

diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp
index 1b1be01..8a4ada7 100644
--- a/src/lib/MSPUBParser.cpp
+++ b/src/lib/MSPUBParser.cpp
@@ -1952,7 +1952,11 @@ void 
MSPUBParser::parseEscherShape(librevenge::RVNGInputStream *input, const Esc
   {
 input->seek(cAnchor.contentsOffset, librevenge::RVNG_SEEK_SET);
 int coordSystemWidth = thisParentCoordinateSystem.m_xe - 
thisParentCoordinateSystem.m_xs;
+if (coordSystemWidth == 0)
+  coordSystemWidth = 1;
 int coordSystemHeight = thisParentCoordinateSystem.m_ye - 
thisParentCoordinateSystem.m_ys;
+if (coordSystemHeight == 0)
+  coordSystemHeight = 1;
 int groupWidth = parentGroupAbsoluteCoord.m_xe - 
parentGroupAbsoluteCoord.m_xs;
 int groupHeight = parentGroupAbsoluteCoord.m_ye - 
parentGroupAbsoluteCoord.m_ys;
 double widthScale = (double)groupWidth / coordSystemWidth;
commit ab9002c37b6be82e572c354281de9c7d5e636a61
Author: David Tardon 
Date:   Tue Jan 9 16:48:38 2018 +0100

avoid undef. behavior casting arbitrary int to enum

Just pass the values around as unsigned ints and use the enums as
constant sets. The previous code doesn't add any extra type safety
anyway.

Change-Id: I914e136136a97cbf411fad7e1bedbbb79a7c49d2

diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp
index 8a307eb..1b1be01 100644
--- a/src/lib/MSPUBParser.cpp
+++ b/src/lib/MSPUBParser.cpp
@@ -2387,7 +2387,7 @@ bool 
MSPUBParser::parseContentChunkReference(librevenge::RVNGInputStream *input,
 {
   //input should be at block.dataOffset + 4 , that is, at the beginning of the 
list of sub-blocks
   MSPUB_DEBUG_MSG(("Parsing chunk reference 0x%x\n", m_lastSeenSeqNum));
-  MSPUBContentChunkType type = UNKNOWN_CHUNK;
+  unsigned type = UNKNOWN_CHUNK;
   unsigned long offset = 0;
   unsigned parentSeqNum = 0;
   bool seenType = false;
@@ -2399,7 +2399,7 @@ bool 
MSPUBParser::parseContentChunkReference(librevenge::RVNGInputStream *input,
 //FIXME: Warn if multiple of these blocks seen.
 if (subBlock.id == CHUNK_TYPE)
 {
-  type = (MSPUBContentChunkType)subBlock.data;
+  type = subBlock.data;
   seenType = true;
 }
 else if (subBlock.id == CHUNK_OFFSET)
@@ -2498,8 +2498,8 @@ MSPUBBlockInfo 
MSPUBParser::parseBlock(librevenge::RVNGInputStream *input, bool
 {
   MSPUBBlockInfo info;
   info.startPosition = input->tell();
-  info.id = (MSPUBBlockID)readU8(input);
-  info.type = (MSPUBBlockType)readU8(input);
+  info.id = readU8(input);
+  info.type = readU8(input);
   info.dataOffset = input->tell();
   int len = getBlockDataLength(info.type);
   bool varLen = len < 0;
diff --git a/src/lib/MSPUBTypes.h b/src/lib/MSPUBTypes.h
index 04219d0..d44d020 100644
--- a/src/lib/MSPUBTypes.h
+++ b/src/lib/MSPUBTypes.h
@@ -77,9 +77,9 @@ struct EscherContainerInfo
 
 struct MSPUBBlockInfo
 {
-  MSPUBBlockInfo() : id((MSPUBBlockID)0), type((MSPUBBlockType)0), 
startPosition(0), dataOffset(0), dataLength(0), data(0), stringData() { }
-  MSPUBBlockID id;
-  MSPUBBlockType type;
+  MSPUBBlockInfo() : id(0), type(0), startPosition(0), dataOffset(0), 
dataLength(0), data(0), stringData() { }
+  unsigned id;
+  unsigned type;
   unsigned long startPosition;
   unsigned long dataOffset;
   unsigned long dataLength;
@@ -89,10 +89,10 @@ struct MSPUBBlockInfo
 
 struct ContentChunkReference
 {
-  ContentChunkReference() : type(UNKNOWN_CHUNK), offset(0), end(0), seqNum(0), 
parentSeqNum(0) { }
-  ContentChunkReference(MSPUBContentChunkType t, unsigned long o, unsigned 
long e, unsigned sn, unsigned psn) :
+  ContentChunkReference() : type(0), offset(0), end(0), seqNum(0), 
parentSeqNum(0) { }
+  ContentChunkReference(unsigned t, unsigned long o, unsigned long e, unsigned 
sn, unsigned psn) :
 type(t), offset(o), end(e), seqNum

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

2018-01-09 Thread Bartosz Kosiorek
 chart2/qa/extras/chart2export.cxx  |   15 +
 include/oox/export/chartexport.hxx |5 +--
 oox/source/export/chartexport.cxx  |   60 +
 3 files changed, 59 insertions(+), 21 deletions(-)

New commits:
commit 836d2b4d47ff4cedf81ecf6b02a5b2b4963329bd
Author: Bartosz Kosiorek 
Date:   Wed Jan 3 23:27:16 2018 +0100

tdf#114173 Preserve size of chart legend during xlsx export

During export chart into .xlsx file,
the information about size of legend was not saved.
Example of proper size:


another issue was hardcoded "layoutTarget" which
was always "inner":

also properties regarding default text style was not preserved:



















With this patch all these issues was resolved, and in case
of layoutTarget "outer", the field is not availble at all,
according to specification.

Change-Id: I2c9b7a112bdd911542b5273e660222d7fefa2d88
Reviewed-on: https://gerrit.libreoffice.org/47358
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 
(cherry picked from commit 84392651d2731cce91c3b2e144bed4ac07e4ddf1)
Reviewed-on: https://gerrit.libreoffice.org/47656
Tested-by: Jenkins 

diff --git a/chart2/qa/extras/chart2export.cxx 
b/chart2/qa/extras/chart2export.cxx
index 67aa996c89d5..fed9f5996916 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -1405,6 +1405,7 @@ void Chart2ExportTest::testTitleManualLayoutXLSX()
 load("/chart2/qa/extras/data/xlsx/", "title_manual_layout.xlsx");
 xmlDocPtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
 CPPUNIT_ASSERT(pXmlDoc);
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:layoutTarget", 0);
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:xMode", "val", "edge");
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:title/c:layout/c:manualLayout/c:yMode", "val", "edge");
 
@@ -1426,6 +1427,7 @@ void Chart2ExportTest::testPlotAreaManualLayoutXLSX()
 xmlDocPtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
 CPPUNIT_ASSERT(pXmlDoc);
 
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:layoutTarget", 
"val", "inner");
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:xMode", "val", 
"edge");
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:yMode", "val", 
"edge");
 
@@ -1454,6 +1456,7 @@ void Chart2ExportTest::testLegendManualLayoutXLSX()
 xmlDocPtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
 CPPUNIT_ASSERT(pXmlDoc);
 
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:layout/c:manualLayout/c:layoutTarget", 0);
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:xMode", "val", 
"edge");
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:yMode", "val", 
"edge");
 
@@ -1465,6 +1468,18 @@ void Chart2ExportTest::testLegendManualLayoutXLSX()
 double nY = aYVal.toDouble();
 CPPUNIT_ASSERT(nY > 0 && nY < 1);
 CPPUNIT_ASSERT(nX != nY);
+
+OUString aWVal = getXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:w", "val");
+double nW = aWVal.toDouble();
+CPPUNIT_ASSERT(nW > 0 && nW < 1);
+
+OUString aHVal = getXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:legend/c:layout/c:manualLayout/c:h", "val");
+double nH = aHVal.toDouble();
+CPPUNIT_ASSERT(nH > 0 && nH < 1);
+CPPUNIT_ASSERT(nH != nW);
+
+// Make sure that default text font size is preserved after export
+assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:legend/c:txPr/a:p/a:pPr/a:defRPr", "sz", "900");
 }
 
 void Chart2ExportTest::testAxisCharacterPropertiesXLSX()
diff --git a/include/oox/export/chartexport.hxx 
b/include/oox/export/chartexport.hxx
index cebc4f41ca4d..755661f5ddd7 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -134,7 +134,8 @@ private:
   css::chart::XChartDocument >& rChartDoc );
 void exportTitle( const css::uno::Reference<
   css::drawing::XShape >& xShape );
-void exportPlotArea( );
+void exportPlotArea( const css::uno::Reference<
+ css::chart::XChartDocument >& rChartDoc );
 void exportPlotAreaShap

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

2018-01-09 Thread Caolán McNamara
 sw/source/filter/html/htmltab.cxx |  133 +++---
 1 file changed, 67 insertions(+), 66 deletions(-)

New commits:
commit 559e707f5052115613fa9736f0c8db85d1d8bc31
Author: Caolán McNamara 
Date:   Tue Jan 9 09:55:13 2018 +

can return reference instead of pointer

Change-Id: I0a4eb44cb3b546d23e722d2621c310b14dd602e5

diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index b84f5c2fccbb..47d31ac8ad54 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -290,7 +290,7 @@ public:
 inline void SetHeight( sal_uInt16 nHeight );
 sal_uInt16 GetHeight() const { return nHeight; }
 
-inline HTMLTableCell *GetCell( sal_uInt16 nCell ) const;
+inline HTMLTableCell& GetCell(sal_uInt16 nCell) const;
 
 void SetAdjust( SvxAdjust eAdj ) { eAdjust = eAdj; }
 SvxAdjust GetAdjust() const { return eAdjust; }
@@ -522,7 +522,7 @@ public:
 ~HTMLTable();
 
 // Identifying of a cell
-inline HTMLTableCell *GetCell( sal_uInt16 nRow, sal_uInt16 nCell ) const;
+inline HTMLTableCell& GetCell(sal_uInt16 nRow, sal_uInt16 nCell) const;
 
 // set/determine caption
 inline void SetCaption( const SwStartNode *pStNd, bool bTop );
@@ -778,11 +778,11 @@ inline void HTMLTableRow::SetHeight( sal_uInt16 nHght )
 nHeight = nHght;
 }
 
-inline HTMLTableCell *HTMLTableRow::GetCell( sal_uInt16 nCell ) const
+inline HTMLTableCell& HTMLTableRow::GetCell(sal_uInt16 nCell) const
 {
 OSL_ENSURE( nCell < m_aCells.size(),
 "invalid cell index in HTML table row" );
-return m_aCells.at(nCell).get();
+return *m_aCells.at(nCell);
 }
 
 void HTMLTableRow::Expand( sal_uInt16 nCells, bool bOneCell )
@@ -1090,7 +1090,7 @@ const std::shared_ptr& 
HTMLTable::CreateLayoutInfo()
 HTMLTableRow *const pRow = (*m_pRows)[i].get();
 for( sal_uInt16 j=0; jSetCell(pRow->GetCell(j)->CreateLayoutInfo(), i, j);
+m_xLayoutInfo->SetCell(pRow->GetCell(j).CreateLayoutInfo(), i, j);
 SwHTMLTableLayoutCell* pLayoutCell = m_xLayoutInfo->GetCell(i, j );
 
 if( bExportable )
@@ -1121,10 +1121,12 @@ void HTMLTable::FixRowSpan( sal_uInt16 nRow, sal_uInt16 
nCol,
 const HTMLTableCnts *pCnts )
 {
 sal_uInt16 nRowSpan=1;
-HTMLTableCell *pCell;
-while (pCell=GetCell(nRow,nCol), pCell->GetContents().get() == pCnts)
+while (true)
 {
-pCell->SetRowSpan( nRowSpan );
+HTMLTableCell& rCell = GetCell(nRow, nCol);
+if (rCell.GetContents().get() != pCnts)
+break;
+rCell.SetRowSpan(nRowSpan);
 if (m_xLayoutInfo)
 m_xLayoutInfo->GetCell(nRow,nCol)->SetRowSpan(nRowSpan);
 
@@ -1137,7 +1139,7 @@ void HTMLTable::ProtectRowSpan( sal_uInt16 nRow, 
sal_uInt16 nCol, sal_uInt16 nRo
 {
 for( sal_uInt16 i=0; iSetProtected();
+GetCell(nRow+i,nCol).SetProtected();
 if (m_xLayoutInfo)
 m_xLayoutInfo->GetCell(nRow+i,nCol)->SetProtected();
 }
@@ -1152,13 +1154,13 @@ const SwStartNode* HTMLTable::GetPrevBoxStartNode( 
sal_uInt16 nRow, sal_uInt16 n
 {
 // always the predecessor cell
 if( nCol>0 )
-pPrevCnts = GetCell( 0, nCol-1 )->GetContents().get();
+pPrevCnts = GetCell(0, nCol - 1).GetContents().get();
 else
 return m_pPrevStartNode;
 }
 else if( USHRT_MAX==nRow && USHRT_MAX==nCol )
 // contents of preceding cell
-pPrevCnts = GetCell( m_nRows-1, m_nCols-1 )->GetContents().get();
+pPrevCnts = GetCell(m_nRows - 1, m_nCols - 1).GetContents().get();
 else
 {
 sal_uInt16 i;
@@ -1169,9 +1171,9 @@ const SwStartNode* HTMLTable::GetPrevBoxStartNode( 
sal_uInt16 nRow, sal_uInt16 n
 while( i )
 {
 i--;
-if( 1 == pPrevRow->GetCell(i)->GetRowSpan() )
+if( 1 == pPrevRow->GetCell(i).GetRowSpan() )
 {
-pPrevCnts = GetCell(nRow,i)->GetContents().get();
+pPrevCnts = GetCell(nRow, i).GetContents().get();
 break;
 }
 }
@@ -1183,14 +1185,14 @@ const SwStartNode* HTMLTable::GetPrevBoxStartNode( 
sal_uInt16 nRow, sal_uInt16 n
 while( !pPrevCnts && i )
 {
 i--;
-pPrevCnts = pPrevRow->GetCell(i)->GetContents().get();
+pPrevCnts = pPrevRow->GetCell(i).GetContents().get();
 }
 }
 }
 OSL_ENSURE( pPrevCnts, "No previous filled cell found" );
 if( !pPrevCnts )
 {
-pPrevCnts = GetCell(0,0)->GetContents().get();
+pPrevCnts = GetCell(0, 0).GetContents().get();
 if( !pPrevCnts )
 return m_pPrevStartNode;
 }
@@ -1268,9 +1270,9 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
 if( pBox->GetSttNd() )
 {
 // Determine background color/graphic
-const HTMLTableCe

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

2018-01-09 Thread Caolán McNamara
 lotuswordpro/source/filter/bencont.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 0a48a327f6d9b82fa044519b433bf5d68b1dd0fc
Author: Caolán McNamara 
Date:   Tue Jan 9 16:17:26 2018 +

ofz#5157 Direct-leak

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

diff --git a/lotuswordpro/source/filter/bencont.cxx 
b/lotuswordpro/source/filter/bencont.cxx
index 86a47bf4949e..11df27e810d5 100644
--- a/lotuswordpro/source/filter/bencont.cxx
+++ b/lotuswordpro/source/filter/bencont.cxx
@@ -326,6 +326,7 @@ void LtcBenContainer::CreateGraphicStream(SvStream * 
&pStream, const char *pObje
 
 pMemStream = new SvMemoryStream(pBuf, nLen, StreamMode::READ);
 assert(pMemStream != nullptr);
+pMemStream->ObjectOwnsMemory(true);
 
 pStream = pMemStream;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Caolán McNamara
 filter/source/msfilter/svdfppt.cxx |   18 ++
 1 file changed, 6 insertions(+), 12 deletions(-)

New commits:
commit fee2ccddfc228675662e1afe97e41eb66076cb26
Author: Caolán McNamara 
Date:   Tue Jan 9 16:27:15 2018 +

i <= 5 is nonsense here

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

diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index f7e3da573eff..5f0b33973bb9 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -3322,21 +3322,15 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& 
rMan, SvStream& rSt, const
 {
 sal_uInt16 nDepth = 0, i = 0;
 rSt.ReadUInt16( nDepth );
-if ( i <= 5 )
+auto nHdEndRecPos = DffPropSet::SanitizeEndPos(rSt, 
aHd.GetRecEndFilePos());
+while ( ( rSt.GetError() == ERRCODE_NONE ) && ( 
rSt.Tell() < nHdEndRecPos ) && ( i < nDepth ) )
 {
-auto nHdEndRecPos = 
DffPropSet::SanitizeEndPos(rSt, aHd.GetRecEndFilePos());
-while ( ( rSt.GetError() == ERRCODE_NONE ) && ( 
rSt.Tell() < nHdEndRecPos ) && ( i < nDepth ) )
-{
-bStyles = true;
-ReadPPTExtParaLevel( rSt, aExtParaSheet[ 
(TSS_Type)aHd.nRecInstance ].aExtParaLevel[ i++ ] );
-}
-#ifdef DBG_UTIL
-if ( rSt.Tell() != aHd.GetRecEndFilePos() )
-OSL_FAIL( "PPTExParaProv::PPTExParaProv - 
error reading PPT_PST_ExtendedParagraphMasterAtom (SJ)" );
-#endif
+bStyles = true;
+ReadPPTExtParaLevel( rSt, aExtParaSheet[ 
(TSS_Type)aHd.nRecInstance ].aExtParaLevel[ i++ ] );
 }
 #ifdef DBG_UTIL
-else OSL_FAIL( "PPTExParaProv::PPTExParaProv - depth 
is greater than 5 (SJ)" );
+if ( rSt.Tell() != aHd.GetRecEndFilePos() )
+OSL_FAIL( "PPTExParaProv::PPTExParaProv - error 
reading PPT_PST_ExtendedParagraphMasterAtom (SJ)" );
 #endif
 }
 #ifdef DBG_UTIL
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Michael Stahl
 sax/source/fastparser/fastparser.cxx |   33 ++---
 1 file changed, 30 insertions(+), 3 deletions(-)

New commits:
commit 3b81d36d58172695021e3109d2490b937c3908b3
Author: Michael Stahl 
Date:   Fri Jan 5 15:36:59 2018 +0100

ofz#4392 sax: guard access to Entity::maSavedException with mutex

The problem here is presumably that the parser thread reports a
low-level SAX exception and the main thread reports a high-level filter
exception at the same time, so both threads modify maSavedException
concurrently.

Reviewed-on: https://gerrit.libreoffice.org/47478
Reviewed-by: Michael Meeks 
Tested-by: Jenkins 
(cherry picked from commit 2a88f62ac01daa72b6287a8cedccfb78579a6067)

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

diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index bbe7748b149a..a8d915cbd117 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -174,6 +174,7 @@ struct Entity : public ParserData
 // resource leaks), therefore any exception thrown by a UNO callback
 // must be saved somewhere until the C-XmlParser is stopped.
 css::uno::Any   maSavedException;
+osl::Mutex maSavedExceptionMutex;
 void saveException( const Any & e );
 void throwException( const ::rtl::Reference< FastLocatorImpl > 
&xDocumentLocator,
  bool mbDuringParse );
@@ -586,12 +587,20 @@ void Entity::throwException( const ::rtl::Reference< 
FastLocatorImpl > &xDocumen
  bool mbDuringParse )
 {
 // Error during parsing !
+Any savedException;
+{
+osl::MutexGuard g(maSavedExceptionMutex);
+if (maSavedException.hasValue())
+{
+savedException.setValue(&maSavedException, 
cppu::UnoType::get());
+}
+}
 SAXParseException aExcept(
 lclGetErrorMessage( mpParser,
 xDocumentLocator->getSystemId(),
 xDocumentLocator->getLineNumber() ),
 Reference< XInterface >(),
-Any( &maSavedException, 
cppu::UnoType::get() ),
+savedException,
 xDocumentLocator->getPublicId(),
 xDocumentLocator->getSystemId(),
 xDocumentLocator->getLineNumber(),
@@ -623,7 +632,15 @@ void Entity::saveException( const Any & e )
 // for XComponent; and yet expect to continue parsing.
 SAL_WARN("sax", "Unexpected exception from XML parser "
 << e.get().Message);
-maSavedException = e;
+osl::MutexGuard g(maSavedExceptionMutex);
+if (maSavedException.hasValue())
+{
+SAL_INFO("sax.fastparser", "discarding exception, already have one");
+}
+else
+{
+maSavedException = e;
+}
 }
 
 } // namespace
@@ -842,6 +859,8 @@ void FastSaxParserImpl::parseStream(const InputSource& 
maStructSource)
 deleteUsedEvents();
 
 // callbacks used inside XML_Parse may have caught an exception
+// No need to lock maSavedExceptionMutex here because parser
+// thread is joined.
 if( rEntity.maSavedException.hasValue() )
 rEntity.throwException( mxDocumentLocator, true );
 }
@@ -1050,8 +1069,16 @@ void FastSaxParserImpl::parse()
 }
 
 // callbacks used inside XML_Parse may have caught an exception
-if( !bContinue || rEntity.maSavedException.hasValue() )
+if (!bContinue)
+{
 rEntity.throwException( mxDocumentLocator, true );
+}
+osl::ClearableMutexGuard g(rEntity.maSavedExceptionMutex);
+if (rEntity.maSavedException.hasValue())
+{
+g.clear();
+rEntity.throwException( mxDocumentLocator, true );
+}
 } while( nRead > 0 );
 rEntity.getEvent( DONE );
 if( rEntity.mbEnableThreads )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Infra call on Tue, Jan 16 at 17:30 UTC

2018-01-09 Thread Guilhem Moulin
Hi there,

The next infra call will take place at `date -d 'Tue Jan 16 17:30:00 UTC 2018'`
(18:30:00 Berlin time).

See https://pad.documentfoundation.org/p/infra for details; agenda TBA.

See you there!
Cheers,
-- 
Guilhem.


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


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

2018-01-09 Thread Miklos Vajna
 sfx2/source/doc/docfile.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a50e1b6d9ddbd4fd7b0597a5eb69f9bf2aab5d07
Author: Miklos Vajna 
Date:   Tue Jan 9 17:19:25 2018 +0100

sfx2 store: avoid custom parent for tempfiles during load

Hopefully this fixes:

shutil.Error:

[('/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/sw/qa/extras/rtfexport/data/testTdf74795__Import_7fmlh7.tmp',

'/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/tempdir/gbuild53mqa9vx/sw/qa/extras/rtfexport/data/testTdf74795__Import_7fmlh7.tmp',
"[Errno 2] No such file or directory:

'/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/sw/qa/extras/rtfexport/data/testTdf74795__Import_7fmlh7.tmp'")]

from PythonTest_solenv_python at
,
given that we now set a custom parent for temp files backing up output
streams only, not input ones.

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

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 2e4ac54ba75c..59dd5307877c 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -3393,9 +3393,9 @@ void SfxMedium::CreateTempFile( bool bReplace )
 }
 
 OUString aLogicBase;
-if (comphelper::isFileUrl(pImpl->m_aLogicName))
+if (comphelper::isFileUrl(pImpl->m_aLogicName) && !pImpl->m_pInStream)
 {
-// Try to create the temp file in the same directory.
+// Try to create the temp file in the same directory when storing.
 sal_Int32 nOffset = pImpl->m_aLogicName.lastIndexOf("/");
 if (nOffset != -1)
 aLogicBase = pImpl->m_aLogicName.copy(0, nOffset);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread David Tardon
 download.lst  |4 ++--
 external/libpagemaker/ExternalProject_libpagemaker.mk |3 +--
 solenv/flatpak-manifest.in|6 +++---
 3 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 449b0fe2ebdc04b3e7be547b151bef97acbb14ea
Author: David Tardon 
Date:   Mon Jan 8 20:30:43 2018 +0100

upload libpagemaker 0.0.4

Change-Id: Idc4b7eaa3331ee3831f7d27ca3e23c30b8c9
Reviewed-on: https://gerrit.libreoffice.org/47615
Tested-by: Jenkins 
Reviewed-by: David Tardon 
(cherry picked from commit 3164e193c2bd1b224231caab3b9306d5f10d9f85)
Reviewed-on: https://gerrit.libreoffice.org/47678
Reviewed-by: Michael Stahl 

diff --git a/download.lst b/download.lst
index 2eb621658abe..f96ddba2582d 100644
--- a/download.lst
+++ b/download.lst
@@ -186,8 +186,8 @@ export ORCUS_SHA256SUM := 
d7041ef455bb78db66b4ba7876af1b3d0fa377b9444e3ef72ceacc
 export ORCUS_TARBALL := liborcus-0.13.1.tar.gz
 export OWNCLOUD_ANDROID_LIB_SHA256SUM := 
b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb
 export OWNCLOUD_ANDROID_LIB_TARBALL := 
owncloud-android-library-0.9.4-no-binary-deps.tar.gz
-export PAGEMAKER_SHA256SUM := 
3b5de037692f8e156777a75e162f6b110fa24c01749e4a66d7eb83f364e52a33
-export PAGEMAKER_TARBALL := libpagemaker-0.0.3.tar.bz2
+export PAGEMAKER_SHA256SUM := 
66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
+export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz
 export PDFIUM_SHA256SUM := 
7dc0d33fc24b1612865f5e173d48800ba3f2db891c57e3f92b9d2ce56ffeb72f
 export PDFIUM_TARBALL := pdfium-3235.tar.bz2
 export PIXMAN_SHA256SUM := 
21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e
diff --git a/external/libpagemaker/ExternalProject_libpagemaker.mk 
b/external/libpagemaker/ExternalProject_libpagemaker.mk
index 852b6e846dd9..91e494402cc1 100644
--- a/external/libpagemaker/ExternalProject_libpagemaker.mk
+++ b/external/libpagemaker/ExternalProject_libpagemaker.mk
@@ -34,8 +34,7 @@ $(call 
gb_ExternalProject_get_state_target,libpagemaker,build) :
--disable-weffc \
$(if 
$(verbose),--disable-silent-rules,--enable-silent-rules) \
CXXFLAGS="$(gb_CXXFLAGS) $(if 
$(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS))" \
-   CPPFLAGS="$(CPPFLAGS) $(BOOST_CPPFLAGS) \
-   -DBOOST_ERROR_CODE_HEADER_ONLY 
-DBOOST_SYSTEM_NO_DEPRECATED" \
+   CPPFLAGS="$(CPPFLAGS) $(BOOST_CPPFLAGS)" \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM)) \
&& $(MAKE) \
)
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 25c34377dd88..0f212badf2a2 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -254,10 +254,10 @@
 "dest-filename": 
"external/tarballs/libodfgen-0.1.6.tar.bz2"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/libpagemaker-0.0.3.tar.bz2";,
-"sha256": 
"3b5de037692f8e156777a75e162f6b110fa24c01749e4a66d7eb83f364e52a33",
+"url": 
"https://dev-www.libreoffice.org/src/libpagemaker-0.0.4.tar.xz";,
+"sha256": 
"66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d",
 "type": "file",
-"dest-filename": 
"external/tarballs/libpagemaker-0.0.3.tar.bz2"
+"dest-filename": 
"external/tarballs/libpagemaker-0.0.4.tar.xz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/librevenge-0.0.4.tar.bz2";,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Caolán McNamara
 filter/source/msfilter/svdfppt.cxx |   26 +++---
 1 file changed, 11 insertions(+), 15 deletions(-)

New commits:
commit ea2f3e285f680820e960c1cb1756a93cfe8ff262
Author: Caolán McNamara 
Date:   Tue Jan 9 16:27:15 2018 +

ofz#5154 limit depth to max legal depth

i <= 5 was nonsense here

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

diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index f1b8c65759d6..b0d9107dbf39 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -3328,22 +3328,17 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& 
rMan, SvStream& rSt, const
 if ( aHd.nRecInstance < PPT_STYLESHEETENTRYS )
 {
 sal_uInt16 nDepth = 0, i = 0;
-rSt.ReadUInt16( nDepth );
-if ( i <= 5 )
+rSt.ReadUInt16(nDepth);
+nDepth = std::min(nDepth, nMaxPPTLevels);
+auto nHdEndRecPos = DffPropSet::SanitizeEndPos(rSt, 
aHd.GetRecEndFilePos());
+while ( ( rSt.GetError() == ERRCODE_NONE ) && ( 
rSt.Tell() < nHdEndRecPos ) && ( i < nDepth ) )
 {
-auto nHdEndRecPos = 
DffPropSet::SanitizeEndPos(rSt, aHd.GetRecEndFilePos());
-while ( ( rSt.GetError() == ERRCODE_NONE ) && ( 
rSt.Tell() < nHdEndRecPos ) && ( i < nDepth ) )
-{
-bStyles = true;
-ReadPPTExtParaLevel( rSt, aExtParaSheet[ 
(TSS_Type)aHd.nRecInstance ].aExtParaLevel[ i++ ] );
-}
-#ifdef DBG_UTIL
-if ( rSt.Tell() != aHd.GetRecEndFilePos() )
-OSL_FAIL( "PPTExParaProv::PPTExParaProv - 
error reading PPT_PST_ExtendedParagraphMasterAtom (SJ)" );
-#endif
+bStyles = true;
+ReadPPTExtParaLevel( rSt, aExtParaSheet[ 
(TSS_Type)aHd.nRecInstance ].aExtParaLevel[ i++ ] );
 }
 #ifdef DBG_UTIL
-else OSL_FAIL( "PPTExParaProv::PPTExParaProv - depth 
is greater than 5 (SJ)" );
+if ( rSt.Tell() != aHd.GetRecEndFilePos() )
+OSL_FAIL( "PPTExParaProv::PPTExParaProv - error 
reading PPT_PST_ExtendedParagraphMasterAtom (SJ)" );
 #endif
 }
 #ifdef DBG_UTIL
@@ -3422,8 +3417,9 @@ bool PPTNumberFormatCreator::ImplGetExtNumberFormat( 
SdrPowerPointImport const &
 }
 
 if ( ( nBuFlags & 0x0380 ) != 0x0380 )  // merge style sheet
-{   // we have to read the master attributes
-if ( pParaProv && ( nLevel < 5 ) )
+{
+// we have to read the master attributes
+if (pParaProv && nLevel < nMaxPPTLevels)
 {
 if ( pParaProv->bStyles )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Szymon Kłos
 sd/qa/unit/data/pptx/tdf114848.pptx  |binary
 sd/qa/unit/export-tests-ooxml2.cxx   |   15 +++
 sd/source/filter/eppt/pptx-epptooxml.cxx |3 +++
 3 files changed, 18 insertions(+)

New commits:
commit f890d79bb2bc82cd05b80eeb83b22971ed618817
Author: Szymon Kłos 
Date:   Fri Jan 5 18:12:08 2018 +0100

tdf#114848 Don't save empty themes

Change-Id: I7136f5c0bc884a2f9ea945b4e0bc093a5ef2d8df
Reviewed-on: https://gerrit.libreoffice.org/47481
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/47617
Tested-by: Xisco Faulí 
Reviewed-by: Michael Stahl 

diff --git a/sd/qa/unit/data/pptx/tdf114848.pptx 
b/sd/qa/unit/data/pptx/tdf114848.pptx
new file mode 100644
index ..5b8b6c3fad7f
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf114848.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index 9722d2de9b36..c998c45c6709 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -110,6 +110,7 @@ public:
 void testGroupsPosition();
 void testGroupsRotatedPosition();
 void testAccentColor();
+void testTdf114848();
 
 CPPUNIT_TEST_SUITE(SdOOXMLExportTest2);
 
@@ -141,6 +142,7 @@ public:
 CPPUNIT_TEST(testGroupsPosition);
 CPPUNIT_TEST(testGroupsRotatedPosition);
 CPPUNIT_TEST(testAccentColor);
+CPPUNIT_TEST(testTdf114848);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -893,6 +895,19 @@ void SdOOXMLExportTest2::testAccentColor()
 assertXPath(pXmlDocTheme2, 
"/a:theme/a:themeElements/a:clrScheme/a:accent6/a:srgbClr", "val", "deb340");
 }
 
+void SdOOXMLExportTest2::testTdf114848()
+{
+::sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf114848.pptx"), 
PPTX);
+utl::TempFile tempFile;
+xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+xDocShRef->DoClose();
+
+xmlDocPtr pXmlDocTheme1 = parseExport(tempFile, "ppt/theme/theme1.xml");
+assertXPath(pXmlDocTheme1, 
"/a:theme/a:themeElements/a:clrScheme/a:dk2/a:srgbClr", "val", "1f497d");
+xmlDocPtr pXmlDocTheme2 = parseExport(tempFile, "ppt/theme/theme2.xml");
+assertXPath(pXmlDocTheme2, 
"/a:theme/a:themeElements/a:clrScheme/a:dk2/a:srgbClr", "val", "1f497d");
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index a49fa7dc4948..b74e449083a7 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -,6 +,9 @@ bool PowerPointExport::WriteColorSchemes(FSHelperPtr pFS, 
const OUString& rTheme
 
 aGrabBag.getValue(rThemePath) >>= aCurrentTheme;
 
+if (!aCurrentTheme.getLength())
+return false;
+
 // Order is important
 for (int nId = PredefinedClrSchemeId::dk2; nId != 
PredefinedClrSchemeId::Count; nId++)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Szymon Kłos
 sd/qa/unit/data/pptx/tdf114848.pptx  |binary
 sd/qa/unit/export-tests-ooxml2.cxx   |   15 +++
 sd/source/filter/eppt/pptx-epptooxml.cxx |3 +++
 3 files changed, 18 insertions(+)

New commits:
commit ebfe25077040210771b6cfe6ec60e49a8e14de2a
Author: Szymon Kłos 
Date:   Fri Jan 5 18:12:08 2018 +0100

tdf#114848 Don't save empty themes

Change-Id: I7136f5c0bc884a2f9ea945b4e0bc093a5ef2d8df
Reviewed-on: https://gerrit.libreoffice.org/47481
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/47576
Tested-by: Xisco Faulí 
Reviewed-by: Michael Stahl 

diff --git a/sd/qa/unit/data/pptx/tdf114848.pptx 
b/sd/qa/unit/data/pptx/tdf114848.pptx
new file mode 100644
index ..5b8b6c3fad7f
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf114848.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index dc314491de03..e7937342e539 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -123,6 +123,7 @@ public:
 void testGroupsPosition();
 void testGroupsRotatedPosition();
 void testAccentColor();
+void testTdf114848();
 
 CPPUNIT_TEST_SUITE(SdOOXMLExportTest2);
 
@@ -171,6 +172,7 @@ public:
 CPPUNIT_TEST(testGroupsPosition);
 CPPUNIT_TEST(testGroupsRotatedPosition);
 CPPUNIT_TEST(testAccentColor);
+CPPUNIT_TEST(testTdf114848);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -1300,6 +1302,19 @@ void SdOOXMLExportTest2::testAccentColor()
 assertXPath(pXmlDocTheme2, 
"/a:theme/a:themeElements/a:clrScheme/a:accent6/a:srgbClr", "val", "deb340");
 }
 
+void SdOOXMLExportTest2::testTdf114848()
+{
+::sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf114848.pptx"), 
PPTX);
+utl::TempFile tempFile;
+xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+xDocShRef->DoClose();
+
+xmlDocPtr pXmlDocTheme1 = parseExport(tempFile, "ppt/theme/theme1.xml");
+assertXPath(pXmlDocTheme1, 
"/a:theme/a:themeElements/a:clrScheme/a:dk2/a:srgbClr", "val", "1f497d");
+xmlDocPtr pXmlDocTheme2 = parseExport(tempFile, "ppt/theme/theme2.xml");
+assertXPath(pXmlDocTheme2, 
"/a:theme/a:themeElements/a:clrScheme/a:dk2/a:srgbClr", "val", "1f497d");
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 8e722aa6e90b..c5c3ca580101 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -2604,6 +2604,9 @@ bool PowerPointExport::WriteColorSchemes(FSHelperPtr pFS, 
const OUString& rTheme
 
 aGrabBag.getValue(rThemePath) >>= aCurrentTheme;
 
+if (!aCurrentTheme.getLength())
+return false;
+
 // Order is important
 for (int nId = PredefinedClrSchemeId::dk2; nId != 
PredefinedClrSchemeId::Count; nId++)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - vcl/headless

2018-01-09 Thread Ashod Nakashian
 vcl/headless/svpgdi.cxx |   21 +
 1 file changed, 17 insertions(+), 4 deletions(-)

New commits:
commit 5434a69f40fb2f89916f3a0c7c4eab3c739df59f
Author: Ashod Nakashian 
Date:   Sun Jan 7 21:11:31 2018 -0500

vcl: mask must alwasy be argb32 even when we can use rgb24

Change-Id: I932669fc5ead7de60561d769dd21d2c35c1f957d
Reviewed-on: https://gerrit.libreoffice.org/47564
Tested-by: Jenkins 
Reviewed-by: Andras Timar 
(cherry picked from commit acb43c0b8efbfb841e7b40603d75a8432eb21f21)
Reviewed-on: https://gerrit.libreoffice.org/47627
Tested-by: Andras Timar 

diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index e928961055c3..42799ae12785 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -226,12 +226,16 @@ namespace
 class SourceHelper
 {
 public:
-explicit SourceHelper(const SalBitmap& rSourceBitmap)
+explicit SourceHelper(const SalBitmap& rSourceBitmap, const bool 
bForceARGB32 = false)
+#ifdef HAVE_CAIRO_FORMAT_RGB24_888
+: m_bForceARGB32(bForceARGB32)
+#endif
 {
 const SvpSalBitmap& rSrcBmp = static_cast(rSourceBitmap);
 #ifdef HAVE_CAIRO_FORMAT_RGB24_888
-if (rSrcBmp.GetBitCount() != 32 && rSrcBmp.GetBitCount() != 24)
+if ((rSrcBmp.GetBitCount() != 32 && rSrcBmp.GetBitCount() != 24) 
|| bForceARGB32)
 #else
+(void)bForceARGB32;
 if (rSrcBmp.GetBitCount() != 32)
 #endif
 {
@@ -272,13 +276,22 @@ namespace
 
 unsigned char *mask_data = cairo_image_surface_get_data(source);
 
-cairo_format_t nFormat = cairo_image_surface_get_format(source);
+const cairo_format_t nFormat = 
cairo_image_surface_get_format(source);
+#ifdef HAVE_CAIRO_FORMAT_RGB24_888
+if (!m_bForceARGB32)
+assert(nFormat == CAIRO_FORMAT_RGB24_888 && "Expected 
RGB24_888 image");
+else
+#endif
 assert(nFormat == CAIRO_FORMAT_ARGB32 && "need to implement 
CAIRO_FORMAT_A1 after all here");
+
 rStride = cairo_format_stride_for_width(nFormat, 
cairo_image_surface_get_width(source));
 
 return mask_data;
 }
 private:
+#ifdef HAVE_CAIRO_FORMAT_RGB24_888
+const bool m_bForceARGB32;
+#endif
 SvpSalBitmap aTmpBmp;
 cairo_surface_t* source;
 
@@ -1230,7 +1243,7 @@ void SvpSalGraphics::drawMask( const SalTwoRect& rTR,
 {
 /** creates an image from the given rectangle, replacing all black pixels
  *  with nMaskColor and make all other full transparent */
-SourceHelper aSurface(rSalBitmap);
+SourceHelper aSurface(rSalBitmap, true); // The mask is argb32
 sal_Int32 nStride;
 unsigned char *mask_data = aSurface.getBits(nStride);
 for (sal_Int32 y = rTR.mnSrcY ; y < rTR.mnSrcY + rTR.mnSrcHeight; ++y)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Caolán McNamara
 filter/source/msfilter/svdfppt.cxx |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 76db55774571af5139bce79f595903a2657b7f46
Author: Caolán McNamara 
Date:   Tue Jan 9 16:31:05 2018 +

ofz#5154 limit depth to max legal depth

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

diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 5f0b33973bb9..32674f5ccf5e 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -3321,7 +3321,8 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& 
rMan, SvStream& rSt, const
 if ( aHd.nRecInstance < PPT_STYLESHEETENTRYS )
 {
 sal_uInt16 nDepth = 0, i = 0;
-rSt.ReadUInt16( nDepth );
+rSt.ReadUInt16(nDepth);
+nDepth = std::min(nDepth, nMaxPPTLevels);
 auto nHdEndRecPos = DffPropSet::SanitizeEndPos(rSt, 
aHd.GetRecEndFilePos());
 while ( ( rSt.GetError() == ERRCODE_NONE ) && ( 
rSt.Tell() < nHdEndRecPos ) && ( i < nDepth ) )
 {
@@ -3409,8 +3410,9 @@ bool PPTNumberFormatCreator::ImplGetExtNumberFormat( 
SdrPowerPointImport const &
 }
 
 if ( ( nBuFlags & 0x0380 ) != 0x0380 )  // merge style sheet
-{   // we have to read the master attributes
-if ( pParaProv && ( nLevel < 5 ) )
+{
+// we have to read the master attributes
+if (pParaProv && nLevel < nMaxPPTLevels)
 {
 if ( pParaProv->bStyles )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Caolán McNamara
 sw/source/filter/html/htmltab.cxx |   59 +++---
 1 file changed, 30 insertions(+), 29 deletions(-)

New commits:
commit 9aa6cbab9d1f6172796f0557d8048c9f0a65b2e2
Author: Caolán McNamara 
Date:   Tue Jan 9 10:12:05 2018 +

just use a simpler vector

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

diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index 47d31ac8ad54..83aff1e95e19 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -266,7 +266,7 @@ public:
 };
 
 // Row of a HTML table
-typedef std::vector> HTMLTableCells;
+typedef std::vector HTMLTableCells;
 
 class HTMLTableRow
 {
@@ -290,7 +290,11 @@ public:
 inline void SetHeight( sal_uInt16 nHeight );
 sal_uInt16 GetHeight() const { return nHeight; }
 
-inline HTMLTableCell& GetCell(sal_uInt16 nCell) const;
+const HTMLTableCell& GetCell(sal_uInt16 nCell) const;
+HTMLTableCell& GetCell(sal_uInt16 nCell)
+{
+return const_cast(const_cast(*this).GetCell(nCell));
+}
 
 void SetAdjust( SvxAdjust eAdj ) { eAdjust = eAdj; }
 SvxAdjust GetAdjust() const { return eAdjust; }
@@ -522,7 +526,11 @@ public:
 ~HTMLTable();
 
 // Identifying of a cell
-inline HTMLTableCell& GetCell(sal_uInt16 nRow, sal_uInt16 nCell) const;
+const HTMLTableCell& GetCell(sal_uInt16 nRow, sal_uInt16 nCell) const;
+HTMLTableCell& GetCell(sal_uInt16 nRow, sal_uInt16 nCell)
+{
+return const_cast(const_cast(*this).GetCell(nRow, nCell));
+}
 
 // set/determine caption
 inline void SetCaption( const SwStartNode *pStNd, bool bTop );
@@ -755,20 +763,16 @@ std::unique_ptr 
HTMLTableCell::CreateLayoutInfo()
   bRelWidth, bNoWrap));
 }
 
-HTMLTableRow::HTMLTableRow(sal_uInt16 const nCells)
-: bIsEndOfGroup(false),
+HTMLTableRow::HTMLTableRow(sal_uInt16 const nCells) :
+m_aCells(nCells),
+bIsEndOfGroup(false),
 nHeight(0),
 nEmptyRows(0),
 eAdjust(SvxAdjust::End),
 eVertOri(text::VertOrientation::TOP),
 bBottomBorder(false)
 {
-for( sal_uInt16 i=0; i());
-}
-
-OSL_ENSURE(nCells == m_aCells.size(),
+assert(nCells == m_aCells.size() &&
 "wrong Cell count in new HTML table row");
 }
 
@@ -778,11 +782,11 @@ inline void HTMLTableRow::SetHeight( sal_uInt16 nHght )
 nHeight = nHght;
 }
 
-inline HTMLTableCell& HTMLTableRow::GetCell(sal_uInt16 nCell) const
+const HTMLTableCell& HTMLTableRow::GetCell(sal_uInt16 nCell) const
 {
 OSL_ENSURE( nCell < m_aCells.size(),
 "invalid cell index in HTML table row" );
-return *m_aCells.at(nCell);
+return m_aCells.at(nCell);
 }
 
 void HTMLTableRow::Expand( sal_uInt16 nCells, bool bOneCell )
@@ -793,12 +797,10 @@ void HTMLTableRow::Expand( sal_uInt16 nCells, bool 
bOneCell )
 sal_uInt16 nColSpan = nCells - m_aCells.size();
 for (sal_uInt16 i = m_aCells.size(); i < nCells; ++i)
 {
-std::unique_ptr pCell(new HTMLTableCell);
-if( bOneCell )
-pCell->SetColSpan( nColSpan );
-
-m_aCells.push_back(std::move(pCell));
-nColSpan--;
+m_aCells.emplace_back();
+if (bOneCell)
+m_aCells.back().SetColSpan(nColSpan);
+--nColSpan;
 }
 
 OSL_ENSURE(nCells == m_aCells.size(),
@@ -817,14 +819,14 @@ void HTMLTableRow::Shrink( sal_uInt16 nCells )
 sal_uInt16 i=nCells;
 while( i )
 {
-HTMLTableCell *pCell = m_aCells[--i].get();
-if( !pCell->GetContents() )
+HTMLTableCell& rCell = m_aCells[--i];
+if (!rCell.GetContents())
 {
 #if OSL_DEBUG_LEVEL > 0
-OSL_ENSURE( pCell->GetColSpan() == nEnd - i,
+OSL_ENSURE( rCell.GetColSpan() == nEnd - i,
 "invalid col span for empty cell at row end" );
 #endif
-pCell->SetColSpan( nCells-i);
+rCell.SetColSpan( nCells-i);
 }
 else
 break;
@@ -832,12 +834,12 @@ void HTMLTableRow::Shrink( sal_uInt16 nCells )
 #if OSL_DEBUG_LEVEL > 0
 for( i=nCells; iGetRowSpan() == 1,
+HTMLTableCell& rCell = m_aCells[i];
+OSL_ENSURE( rCell.GetRowSpan() == 1,
 "RowSpan of to be deleted cell is wrong" );
-OSL_ENSURE( pCell->GetColSpan() == nEnd - i,
+OSL_ENSURE( rCell.GetColSpan() == nEnd - i,
 "ColSpan of to be deleted cell is wrong" );
-OSL_ENSURE( !pCell->GetContents(), "To be deleted cell has content" );
+OSL_ENSURE( !rCell.GetContents(), "To be deleted cell has content" );
 }
 #endif
 
@@ -1932,8 +1934,7 @@ sal_uInt16 HTMLTable::GetBorderWidth( const 
SvxBorderLine& rBLine,
 return nBorderWidth;
 }
 
-inline HTMLTableCell& HTMLTable::GetCell(sal_uInt16 nRow,
- 

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

2018-01-09 Thread Caolán McNamara
 sw/source/filter/html/htmltab.cxx |  123 ++
 1 file changed, 59 insertions(+), 64 deletions(-)

New commits:
commit cbebd5333e1978f0a7ca90b923e42c7bac956fdd
Author: Caolán McNamara 
Date:   Tue Jan 9 10:19:34 2018 +

don't need to dynamically allocate these

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

diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index 83aff1e95e19..50da2a0587c9 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -376,8 +376,8 @@ class HTMLTable
 SdrObjects *m_pResizeDrawObjects;// SDR objects
 std::vector *m_pDrawObjectPrcWidths;   // column of draw 
object and its rel. width
 
-HTMLTableRows *m_pRows; ///< table rows
-HTMLTableColumns *m_pColumns;   ///< table columns
+HTMLTableRows m_aRows; ///< table rows
+HTMLTableColumns m_aColumns;   ///< table columns
 
 sal_uInt16 m_nRows;   // number of rows
 sal_uInt16 m_nCols;   // number of columns
@@ -905,8 +905,6 @@ void HTMLTable::InitCtor( const HTMLTableOptions *pOptions )
 m_pResizeDrawObjects = nullptr;
 m_pDrawObjectPrcWidths = nullptr;
 
-m_pRows = new HTMLTableRows;
-m_pColumns = new HTMLTableColumns;
 m_nRows = 0;
 m_nCurrentRow = 0; m_nCurrentColumn = 0;
 
@@ -1047,7 +1045,7 @@ HTMLTable::HTMLTable( SwHTMLParser* pPars, HTMLTable 
*pTopTab,
 InitCtor( pOptions );
 
 for( sal_uInt16 i=0; ipush_back(o3tl::make_unique());
+m_aColumns.push_back(o3tl::make_unique());
 
 m_pParser->RegisterHTMLTable(this);
 }
@@ -1059,9 +1057,6 @@ HTMLTable::~HTMLTable()
 delete m_pResizeDrawObjects;
 delete m_pDrawObjectPrcWidths;
 
-delete m_pRows;
-delete m_pColumns;
-
 delete m_pContext;
 
 // pLayoutInfo has either already been deleted or is now owned by SwTable
@@ -1073,7 +1068,7 @@ const std::shared_ptr& 
HTMLTable::CreateLayoutInfo()
 
 sal_uInt16 nBorderWidth = GetBorderWidth( m_aBorderLine, true );
 sal_uInt16 nLeftBorderWidth =
-(*m_pColumns)[0]->bLeftBorder ? GetBorderWidth(m_aLeftBorderLine, 
true) : 0;
+m_aColumns[0]->bLeftBorder ? GetBorderWidth(m_aLeftBorderLine, true) : 
0;
 sal_uInt16 nRightBorderWidth =
 m_bRightBorder ? GetBorderWidth( m_aRightBorderLine, true ) : 0;
 
@@ -1089,7 +1084,7 @@ const std::shared_ptr& 
HTMLTable::CreateLayoutInfo()
 sal_uInt16 i;
 for( i=0; iSetCell(pRow->GetCell(j).CreateLayoutInfo(), i, j);
@@ -1108,7 +1103,7 @@ const std::shared_ptr& 
HTMLTable::CreateLayoutInfo()
 m_xLayoutInfo->SetExportable( bExportable );
 
 for( i=0; iSetColumn( (*m_pColumns)[i]->CreateLayoutInfo(), i );
+m_xLayoutInfo->SetColumn( m_aColumns[i]->CreateLayoutInfo(), i );
 
 return m_xLayoutInfo;
 }
@@ -1166,7 +1161,7 @@ const SwStartNode* HTMLTable::GetPrevBoxStartNode( 
sal_uInt16 nRow, sal_uInt16 n
 else
 {
 sal_uInt16 i;
-HTMLTableRow *const pPrevRow = (*m_pRows)[nRow-1].get();
+HTMLTableRow *const pPrevRow = m_aRows[nRow-1].get();
 
 // maybe a cell in the current row
 i = nCol;
@@ -1267,7 +1262,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
 sal_uInt32 nNumFormat = 0;
 double nValue = 0.0;
 
-HTMLTableColumn *const pColumn = (*m_pColumns)[nCol].get();
+HTMLTableColumn *const pColumn = m_aColumns[nCol].get();
 
 if( pBox->GetSttNd() )
 {
@@ -1283,7 +1278,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
 // since the line is gonna be GC-ed (correctly).
 if( nRowSpan > 1 || (this != m_pTopTable && nRowSpan==m_nRows) )
 {
-pBGBrushItem = (*m_pRows)[nRow]->GetBGBrush().get();
+pBGBrushItem = m_aRows[nRow]->GetBGBrush().get();
 if( !pBGBrushItem && this != m_pTopTable )
 {
 pBGBrushItem = GetBGBrush().get();
@@ -1294,9 +1289,9 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
 }
 
 bTopLine = 0==nRow && m_bTopBorder && bFirstPara;
-if ((*m_pRows)[nRow+nRowSpan-1]->bBottomBorder && bLastPara)
+if (m_aRows[nRow+nRowSpan-1]->bBottomBorder && bLastPara)
 {
-nEmptyRows = (*m_pRows)[nRow+nRowSpan-1]->GetEmptyRows();
+nEmptyRows = m_aRows[nRow+nRowSpan-1]->GetEmptyRows();
 if( nRow+nRowSpan == m_nRows )
 bLastBottomLine = true;
 else
@@ -1366,7 +1361,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
 }
 bSet = true;
 }
-if (((*m_pColumns)[nCol])->bLeftBorder)
+if ((m_aColumns[nCol])->bLeftBorder)
 {
 const SvxBorderLine& rBorderLine =
 0==nCol ? m_aL

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

2018-01-09 Thread Caolán McNamara
 sw/source/filter/html/htmltab.cxx |  147 ++
 1 file changed, 71 insertions(+), 76 deletions(-)

New commits:
commit bac55d08211662b4efec8d3b477e8831b109e8e3
Author: Caolán McNamara 
Date:   Tue Jan 9 10:31:55 2018 +

just use a simple vector

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

diff --git a/sw/source/filter/html/htmltab.cxx 
b/sw/source/filter/html/htmltab.cxx
index 50da2a0587c9..a92bd2212ab6 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -360,9 +360,9 @@ public:
 };
 
 // HTML table
-typedef std::vector> HTMLTableRows;
+typedef std::vector HTMLTableRows;
 
-typedef std::vector> HTMLTableColumns;
+typedef std::vector HTMLTableColumns;
 
 typedef std::vector SdrObjects;
 
@@ -1019,6 +1019,7 @@ HTMLTable::HTMLTable( SwHTMLParser* pPars, HTMLTable 
*pTopTab,
   bool bParHead,
   bool bHasParentSec, bool bHasToFlw,
   const HTMLTableOptions *pOptions ) :
+m_aColumns(pOptions->nCols),
 m_nCols( pOptions->nCols ),
 m_nFilledColumns( 0 ),
 m_nCellPadding( pOptions->nCellPadding ),
@@ -1043,10 +1044,6 @@ HTMLTable::HTMLTable( SwHTMLParser* pPars, HTMLTable 
*pTopTab,
 m_bFirstCell( !pTopTab )
 {
 InitCtor( pOptions );
-
-for( sal_uInt16 i=0; i());
-
 m_pParser->RegisterHTMLTable(this);
 }
 
@@ -1068,7 +1065,7 @@ const std::shared_ptr& 
HTMLTable::CreateLayoutInfo()
 
 sal_uInt16 nBorderWidth = GetBorderWidth( m_aBorderLine, true );
 sal_uInt16 nLeftBorderWidth =
-m_aColumns[0]->bLeftBorder ? GetBorderWidth(m_aLeftBorderLine, true) : 
0;
+m_aColumns[0].bLeftBorder ? GetBorderWidth(m_aLeftBorderLine, true) : 
0;
 sal_uInt16 nRightBorderWidth =
 m_bRightBorder ? GetBorderWidth( m_aRightBorderLine, true ) : 0;
 
@@ -1084,10 +1081,10 @@ const std::shared_ptr& 
HTMLTable::CreateLayoutInfo()
 sal_uInt16 i;
 for( i=0; iSetCell(pRow->GetCell(j).CreateLayoutInfo(), i, j);
+m_xLayoutInfo->SetCell(rRow.GetCell(j).CreateLayoutInfo(), i, j);
 SwHTMLTableLayoutCell* pLayoutCell = m_xLayoutInfo->GetCell(i, j );
 
 if( bExportable )
@@ -1103,7 +1100,7 @@ const std::shared_ptr& 
HTMLTable::CreateLayoutInfo()
 m_xLayoutInfo->SetExportable( bExportable );
 
 for( i=0; iSetColumn( m_aColumns[i]->CreateLayoutInfo(), i );
+m_xLayoutInfo->SetColumn(m_aColumns[i].CreateLayoutInfo(), i);
 
 return m_xLayoutInfo;
 }
@@ -1161,14 +1158,14 @@ const SwStartNode* HTMLTable::GetPrevBoxStartNode( 
sal_uInt16 nRow, sal_uInt16 n
 else
 {
 sal_uInt16 i;
-HTMLTableRow *const pPrevRow = m_aRows[nRow-1].get();
+const HTMLTableRow& rPrevRow = m_aRows[nRow-1];
 
 // maybe a cell in the current row
 i = nCol;
 while( i )
 {
 i--;
-if( 1 == pPrevRow->GetCell(i).GetRowSpan() )
+if( 1 == rPrevRow.GetCell(i).GetRowSpan() )
 {
 pPrevCnts = GetCell(nRow, i).GetContents().get();
 break;
@@ -1182,7 +1179,7 @@ const SwStartNode* HTMLTable::GetPrevBoxStartNode( 
sal_uInt16 nRow, sal_uInt16 n
 while( !pPrevCnts && i )
 {
 i--;
-pPrevCnts = pPrevRow->GetCell(i).GetContents().get();
+pPrevCnts = rPrevRow.GetCell(i).GetContents().get();
 }
 }
 }
@@ -1262,7 +1259,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
 sal_uInt32 nNumFormat = 0;
 double nValue = 0.0;
 
-HTMLTableColumn *const pColumn = m_aColumns[nCol].get();
+const HTMLTableColumn& rColumn = m_aColumns[nCol];
 
 if( pBox->GetSttNd() )
 {
@@ -1278,7 +1275,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
 // since the line is gonna be GC-ed (correctly).
 if( nRowSpan > 1 || (this != m_pTopTable && nRowSpan==m_nRows) )
 {
-pBGBrushItem = m_aRows[nRow]->GetBGBrush().get();
+pBGBrushItem = m_aRows[nRow].GetBGBrush().get();
 if( !pBGBrushItem && this != m_pTopTable )
 {
 pBGBrushItem = GetBGBrush().get();
@@ -1289,9 +1286,9 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
 }
 
 bTopLine = 0==nRow && m_bTopBorder && bFirstPara;
-if (m_aRows[nRow+nRowSpan-1]->bBottomBorder && bLastPara)
+if (m_aRows[nRow+nRowSpan-1].bBottomBorder && bLastPara)
 {
-nEmptyRows = m_aRows[nRow+nRowSpan-1]->GetEmptyRows();
+nEmptyRows = m_aRows[nRow+nRowSpan-1].GetEmptyRows();
 if( nRow+nRowSpan == m_nRows )
 bLastBottomLine = true;
 else
@@ -1306,7 +1303,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
 if( nC

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

2018-01-09 Thread Michael Stahl
 sax/source/fastparser/fastparser.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d76c305b41fa65febde6a77605396ce0b681ce2c
Author: Michael Stahl 
Date:   Tue Jan 9 21:42:26 2018 +0100

sax: fix loplugin:sallogareas

The wrong revision of https://gerrit.libreoffice.org/47542
was pushed.

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

diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index a8d915cbd117..ab2ab0dc63f3 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -635,7 +635,7 @@ void Entity::saveException( const Any & e )
 osl::MutexGuard g(maSavedExceptionMutex);
 if (maSavedException.hasValue())
 {
-SAL_INFO("sax.fastparser", "discarding exception, already have one");
+SAL_INFO("sax", "discarding exception, already have one");
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Caolán McNamara
 sw/source/filter/html/swhtml.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 337243fd28ce49d71108a9a16b885adf612384bc
Author: Caolán McNamara 
Date:   Tue Jan 9 20:49:30 2018 +

ofz#5193 Negative-size-param

Change-Id: I8c3cf71e4d7ad15d61e5aff738ebc6d326574635

diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index e16394053623..1be17ff43d78 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -418,8 +418,8 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
 SwViewShell   *m_pActionViewShell;  // SwViewShell, where StartAction 
was called
 SwNodeIndex *m_pSttNdIdx;
 
-std::shared_ptr m_xTable; // current "outermost" table
 std::vector m_aTables;
+std::shared_ptr m_xTable; // current "outermost" table
 SwHTMLForm_Impl *m_pFormImpl;   // current form
 SdrObject   *m_pMarquee;// current marquee
 SwField *m_pField;  // current field
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Caolán McNamara
 filter/source/msfilter/svdfppt.cxx |   26 +++---
 1 file changed, 11 insertions(+), 15 deletions(-)

New commits:
commit ee6165a184b9ac7f004f2086adb669b5a31575cf
Author: Caolán McNamara 
Date:   Tue Jan 9 16:27:15 2018 +

ofz#5154 limit depth to max legal depth

i <= 5 was nonsense here

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

diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 43449eb59337..eb083340d6a0 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -3327,22 +3327,17 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& 
rMan, SvStream& rSt, const
 if ( aHd.nRecInstance < PPT_STYLESHEETENTRYS )
 {
 sal_uInt16 nDepth = 0, i = 0;
-rSt.ReadUInt16( nDepth );
-if ( i <= 5 )
+rSt.ReadUInt16(nDepth);
+nDepth = std::min(nDepth, nMaxPPTLevels);
+auto nHdEndRecPos = DffPropSet::SanitizeEndPos(rSt, 
aHd.GetRecEndFilePos());
+while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < 
nHdEndRecPos ) && ( i < nDepth ) )
 {
-auto nHdEndRecPos = 
DffPropSet::SanitizeEndPos(rSt, aHd.GetRecEndFilePos());
-while ( ( rSt.GetError() == 0 ) && ( rSt.Tell() < 
nHdEndRecPos ) && ( i < nDepth ) )
-{
-bStyles = true;
-ReadPPTExtParaLevel( rSt, aExtParaSheet[ 
(TSS_Type)aHd.nRecInstance ].aExtParaLevel[ i++ ] );
-}
-#ifdef DBG_UTIL
-if ( rSt.Tell() != aHd.GetRecEndFilePos() )
-OSL_FAIL( "PPTExParaProv::PPTExParaProv - 
error reading PPT_PST_ExtendedParagraphMasterAtom (SJ)" );
-#endif
+bStyles = true;
+ReadPPTExtParaLevel( rSt, aExtParaSheet[ 
(TSS_Type)aHd.nRecInstance ].aExtParaLevel[ i++ ] );
 }
 #ifdef DBG_UTIL
-else OSL_FAIL( "PPTExParaProv::PPTExParaProv - depth 
is greater than 5 (SJ)" );
+if ( rSt.Tell() != aHd.GetRecEndFilePos() )
+OSL_FAIL( "PPTExParaProv::PPTExParaProv - error 
reading PPT_PST_ExtendedParagraphMasterAtom (SJ)" );
 #endif
 }
 #ifdef DBG_UTIL
@@ -3421,8 +3416,9 @@ bool PPTNumberFormatCreator::ImplGetExtNumberFormat( 
SdrPowerPointImport& rManag
 }
 
 if ( ( nBuFlags & 0x0380 ) != 0x0380 )  // merge style sheet
-{   // we have to read the master attributes
-if ( pParaProv && ( nLevel < 5 ) )
+{
+// we have to read the master attributes
+if (pParaProv && nLevel < nMaxPPTLevels)
 {
 if ( pParaProv->bStyles )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd.xml.in net/ServerSocket.hpp net/Socket.cpp net/Socket.hpp wsd/LOOLWSD.cpp

2018-01-09 Thread Michael Meeks
 loolwsd.xml.in   |4 +++
 net/ServerSocket.hpp |   25 ++
 net/Socket.cpp   |   56 +++
 net/Socket.hpp   |9 ++--
 wsd/LOOLWSD.cpp  |   48 ++-
 5 files changed, 111 insertions(+), 31 deletions(-)

New commits:
commit a1ee97c222d60bbb81c597327e2b5ff89e903970
Author: Michael Meeks 
Date:   Tue Jan 9 14:02:02 2018 +

Add IPv6 support, and configuration option.

Default to listening on both IPv44 and IPv6 for public interfaces.

Change-Id: Ib04e3bf65e7dcf2a798d381297b15ee9c56e9259

diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index 754aa6c3..1609c7bc 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -60,6 +60,10 @@
 
 
 
+
+  all
+
+
 
 true
 false
diff --git a/net/ServerSocket.hpp b/net/ServerSocket.hpp
index 4d4bb353..7ae7e714 100644
--- a/net/ServerSocket.hpp
+++ b/net/ServerSocket.hpp
@@ -27,27 +27,20 @@ public:
 class ServerSocket : public Socket
 {
 public:
-ServerSocket(SocketPoll& clientPoller, std::shared_ptr 
sockFactory) :
+ServerSocket(Socket::Type type, SocketPoll& clientPoller, 
std::shared_ptr sockFactory) :
+Socket(type),
+_type(type),
 _clientPoller(clientPoller),
 _sockFactory(std::move(sockFactory))
 {
 }
 
+enum Type { Local, Public };
+
 /// Binds to a local address (Servers only).
 /// Does not retry on error.
-/// Returns true on success only.
-bool bind(const Poco::Net::SocketAddress& address)
-{
-// Enable address reuse to avoid stalling after
-// recycling, when previous socket is TIME_WAIT.
-//TODO: Might be worth refactoring out.
-const int reuseAddress = 1;
-constexpr unsigned int len = sizeof(reuseAddress);
-::setsockopt(getFD(), SOL_SOCKET, SO_REUSEADDR, &reuseAddress, len);
-
-const int rc = ::bind(getFD(), address.addr(), address.length());
-return rc == 0;
-}
+/// Returns true only on success.
+bool bind(Type type, int port);
 
 /// Listen to incoming connections (Servers only).
 /// Does not retry on error.
@@ -55,6 +48,9 @@ public:
 bool listen(const int backlog = 64)
 {
 const int rc = ::listen(getFD(), backlog);
+
+if (rc)
+LOG_SYS("Failed to listen");
 return rc == 0;
 }
 
@@ -107,6 +103,7 @@ public:
 }
 
 private:
+Socket::Type _type;
 SocketPoll& _clientPoller;
 std::shared_ptr _sockFactory;
 };
diff --git a/net/Socket.cpp b/net/Socket.cpp
index eb2f19fb..d0a791ec 100644
--- a/net/Socket.cpp
+++ b/net/Socket.cpp
@@ -28,6 +28,12 @@ int SocketPoll::DefaultPollTimeoutMs = 5000;
 std::atomic SocketPoll::InhibitThreadChecks(false);
 std::atomic Socket::InhibitThreadChecks(false);
 
+int Socket::createSocket(Socket::Type type)
+{
+int domain = type == Type::IPv4 ? AF_INET : AF_INET6;
+return socket(domain, SOCK_STREAM | SOCK_NONBLOCK, 0);
+}
+
 // help with initialization order
 namespace {
 std::vector &getWakeupsArray()
@@ -183,6 +189,56 @@ void SocketPoll::dumpState(std::ostream& os)
 i->dumpState(os);
 }
 
+/// Returns true on success only.
+bool ServerSocket::bind(Type type, int port)
+{
+// Enable address reuse to avoid stalling after
+// recycling, when previous socket is TIME_WAIT.
+//TODO: Might be worth refactoring out.
+const int reuseAddress = 1;
+constexpr unsigned int len = sizeof(reuseAddress);
+::setsockopt(getFD(), SOL_SOCKET, SO_REUSEADDR, &reuseAddress, len);
+
+int rc;
+
+if (_type == Socket::Type::IPv4)
+{
+struct sockaddr_in addrv4;
+std::memset(&addrv4, 0, sizeof(addrv4));
+addrv4.sin_family = AF_INET;
+addrv4.sin_port = htons(port);
+if (type == Type::Public)
+addrv4.sin_addr.s_addr = type == htonl(INADDR_ANY);
+else
+addrv4.sin_addr.s_addr = type == htonl(INADDR_LOOPBACK);
+
+rc = ::bind(getFD(), (const sockaddr *)&addrv4, sizeof(addrv4));
+}
+else
+{
+struct sockaddr_in6 addrv6;
+std::memset(&addrv6, 0, sizeof(addrv6));
+addrv6.sin6_family = AF_INET6;
+addrv6.sin6_port = htons(port);
+if (type == Type::Public)
+addrv6.sin6_addr = in6addr_any;
+else
+addrv6.sin6_addr = in6addr_loopback;
+
+int ipv6only = _type == Socket::Type::All ? 0 : 1;
+if (::setsockopt(getFD(), IPPROTO_IPV6, IPV6_V6ONLY, (char*)&ipv6only, 
sizeof(ipv6only)) == -1)
+LOG_SYS("Failed set ipv6 socket to %d" << ipv6only);
+
+rc = ::bind(getFD(), (const sockaddr *)&addrv6, sizeof(addrv6));
+}
+
+if (rc)
+LOG_SYS("Failed to bind to: " << (_type == Socket::Type::IPv4 ? "IPv4" 
: "IPv6") << " port: " << port);
+
+return rc == 0;
+}
+
+
 namespace HttpHelper
 {
 void sendUncompressedFileContent(cons

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

2018-01-09 Thread Stephan Bergmann
 sw/inc/dbmgr.hxx|6 +++---
 sw/source/uibase/dbui/dbmgr.cxx |   16 
 2 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit a707dc29ece936f5f03a905b253a2af7cf67440f
Author: Stephan Bergmann 
Date:   Tue Jan 9 18:00:04 2018 +0100

Avoid clash with ERROR macro from wingdi.h on Windows

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

diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 932d3c165eed..555d4dc9079f 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -243,7 +243,7 @@ class SW_DLLPUBLIC SwDBManager
 
 enum class MergeStatus
 {
-OK = 0, CANCEL, ERROR
+Ok = 0, Cancel, Error
 };
 
 MergeStatus m_aMergeStatus; ///< current / last merge status
@@ -304,8 +304,8 @@ public:
 boolMerge( const SwMergeDescriptor& rMergeDesc );
 voidMergeCancel();
 
-bool IsMergeOk() { return MergeStatus::OK == m_aMergeStatus; };
-bool IsMergeError()  { return MergeStatus::ERROR  <= m_aMergeStatus; };
+bool IsMergeOk() { return MergeStatus::Ok == m_aMergeStatus; };
+bool IsMergeError()  { return MergeStatus::Error  <= m_aMergeStatus; };
 
 static std::shared_ptr PerformMailMerge(SwView 
const * pView);
 
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index bd7e3f82ee14..2beeaa439bb7 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -791,7 +791,7 @@ void SwDBManager::GetColumnNames(ListBox* pListBox,
 }
 
 SwDBManager::SwDBManager(SwDoc* pDoc)
-: m_aMergeStatus( MergeStatus::OK )
+: m_aMergeStatus( MergeStatus::Ok )
 , bInitDBFields(false)
 , bInMerge(false)
 , bMergeSilent(false)
@@ -1094,7 +1094,7 @@ public:
 uno::Reference< mail::XMailMessage>, const OUString& ) override
 {
 osl::MutexGuard aGuard( m_rDBManager.pImpl->m_aAllEmailSendMutex );
-m_rDBManager.m_aMergeStatus = MergeStatus::ERROR;
+m_rDBManager.m_aMergeStatus = MergeStatus::Error;
 m_rDBManager.pImpl->m_xLastMessage.clear();
 xMailDispatcher->stop();
 }
@@ -1221,7 +1221,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
 }
 const bool bIsPDFexport = pStoreToFilter && 
pStoreToFilter->GetFilterName() == "writer_pdf_Export";
 
-m_aMergeStatus = MergeStatus::OK;
+m_aMergeStatus = MergeStatus::Ok;
 
 // in case of creating a single resulting file this has to be created here
 SwView*   pTargetView = rMergeDescriptor.pMailMergeConfigItem ?
@@ -1374,7 +1374,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
 if( !aTempFile->IsValid() )
 {
 ErrorHandler::HandleError( ERRCODE_IO_NOTSUPPORTED );
-m_aMergeStatus = MergeStatus::ERROR;
+m_aMergeStatus = MergeStatus::Error;
 }
 }
 
@@ -1496,7 +1496,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
   &rMergeDescriptor.aSaveToFilterData, 
bIsPDFexport,
   xWorkDocSh, *pWorkShell, &sFileURL ) )
 {
-m_aMergeStatus = MergeStatus::ERROR;
+m_aMergeStatus = MergeStatus::Error;
 }
 
 // back to the MM DB manager
@@ -1606,7 +1606,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
 pStoreToFilterOptions, &rMergeDescriptor.aSaveToFilterData,
 bIsPDFexport, xTargetDocShell.get(), *pTargetShell ) )
 {
-m_aMergeStatus = MergeStatus::ERROR;
+m_aMergeStatus = MergeStatus::Error;
 }
 }
 else if( IsMergeOk() && bMT_PRINTER )
@@ -1669,8 +1669,8 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
 
 void SwDBManager::MergeCancel()
 {
-if (m_aMergeStatus < MergeStatus::CANCEL)
-m_aMergeStatus = MergeStatus::CANCEL;
+if (m_aMergeStatus < MergeStatus::Cancel)
+m_aMergeStatus = MergeStatus::Cancel;
 }
 
 IMPL_LINK( SwDBManager, PrtCancelHdl, Button *, pButton, void )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Stephan Bergmann
 svx/source/gengal/gengal.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a5070d17b3db7ddebd6555f05f155709583b0a90
Author: Stephan Bergmann 
Date:   Tue Jan 9 18:00:56 2018 +0100

-Werror,-Wformat (clang-cl)

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

diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index fc8568b9d3cd..5d6803f53365 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -122,7 +122,7 @@ static void createTheme( const OUString& aThemeName, const 
OUString& aGalleryURL
 fprintf( stderr, "Failed to import '%s'\n",
  OUStringToOString( 
aIter->GetMainURL(INetURLObject::DecodeMechanism::NONE), RTL_TEXTENCODING_UTF8 
).getStr() );
 else
-fprintf( stderr, "Imported file '%s' (%u)\n",
+fprintf( stderr, "Imported file '%s' (%" SAL_PRIuUINT32 ")\n",
  OUStringToOString( 
aIter->GetMainURL(INetURLObject::DecodeMechanism::NONE), RTL_TEXTENCODING_UTF8 
).getStr(),
  pGalTheme->GetObjectCount() );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Stephan Bergmann
 fpicker/source/win32/filepicker/FilterContainer.cxx |2 +-
 shell/source/win32/ooofilereader/contentreader.cxx  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b4860abacf24d7b7397b7b8d6f954c9c0ce90d5c
Author: Stephan Bergmann 
Date:   Tue Jan 9 18:02:24 2018 +0100

loplugin:unnecessaryparen (clang-cl)

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

diff --git a/fpicker/source/win32/filepicker/FilterContainer.cxx 
b/fpicker/source/win32/filepicker/FilterContainer.cxx
index 9545251d073f..e518aef377ee 100644
--- a/fpicker/source/win32/filepicker/FilterContainer.cxx
+++ b/fpicker/source/win32/filepicker/FilterContainer.cxx
@@ -80,7 +80,7 @@ bool CFilterContainer::delFilter( const OUString& aName )
 sal_Int32 pos = getFilterTagPos( aName );
 if ( pos > -1 )
 {
-m_vFilters.erase( ( m_vFilters.begin() + pos ) );
+m_vFilters.erase( m_vFilters.begin() + pos );
 m_bIterInitialized = false;
 }
 
diff --git a/shell/source/win32/ooofilereader/contentreader.cxx 
b/shell/source/win32/ooofilereader/contentreader.cxx
index 97a88f1d8a65..af6bb81df648 100644
--- a/shell/source/win32/ooofilereader/contentreader.cxx
+++ b/shell/source/win32/ooofilereader/contentreader.cxx
@@ -111,7 +111,7 @@ ITag* CContentReader::chooseTagReader( const std::wstring& 
tag_name, const XmlTa
 assert( !m_TagBuilderStack.empty() );
 ITag* pTagBuilder = m_TagBuilderStack.top();
 
-return ( pTagBuilder->getTagAttribute(CONTENT_TEXT_STYLENAME) );
+return pTagBuilder->getTagAttribute(CONTENT_TEXT_STYLENAME);
 }
 
 /** add chunk into Chunk Buffer.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Stephan Bergmann
 sc/inc/token.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a49be6bd585ac4610cbf04ca3525f2d90a770367
Author: Stephan Bergmann 
Date:   Tue Jan 9 18:03:25 2018 +0100

no matching function for call to 'intrusive_ptr_add_ref'

...with clang-cl, in instantiation of member function
'boost::intrusive_ptr::intrusive_ptr' requested at
sc/inc/token.hxx(291,20):
class SC_DLLPUBLIC ScMatrixCellResultToken : public formula::FormulaToken

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

diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx
index 92827a2cb512..065fb2affccd 100644
--- a/sc/inc/token.hxx
+++ b/sc/inc/token.hxx
@@ -28,6 +28,7 @@
 #include "refdata.hxx"
 #include 
 #include "scdllapi.h"
+#include "scmatrix.hxx"
 #include 
 #include 
 #include "calcmacros.hxx"
@@ -43,7 +44,6 @@ struct RangeMatrix;
 }
 
 class ScJumpMatrix;
-class ScMatrix;
 
 typedef ::std::vector< ScComplexRefData > ScRefList;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/gen-boost-headers external/boost

2018-01-09 Thread Stephan Bergmann
 bin/gen-boost-headers  |1 +
 external/boost/include/boost/algorithm/string.hpp  |1 +
 external/boost/include/boost/algorithm/string/case_conv.hpp|1 +
 external/boost/include/boost/algorithm/string/classification.hpp   |1 +
 external/boost/include/boost/algorithm/string/predicate.hpp|1 +
 external/boost/include/boost/algorithm/string/split.hpp|1 +
 external/boost/include/boost/any.hpp   |1 +
 external/boost/include/boost/archive/iterators/base64_from_binary.hpp  |1 +
 external/boost/include/boost/archive/iterators/binary_from_base64.hpp  |1 +
 external/boost/include/boost/archive/iterators/remove_whitespace.hpp   |1 +
 external/boost/include/boost/archive/iterators/transform_width.hpp |1 +
 external/boost/include/boost/asio.hpp  |1 +
 external/boost/include/boost/assign.hpp|1 +
 external/boost/include/boost/bind.hpp  |1 +
 external/boost/include/boost/cast.hpp  |1 +
 external/boost/include/boost/circular_buffer.hpp   |1 +
 external/boost/include/boost/config.hpp|1 +
 external/boost/include/boost/container/deque.hpp   |1 +
 external/boost/include/boost/cstdint.hpp   |1 +
 external/boost/include/boost/current_function.hpp  |1 +
 external/boost/include/boost/date_time.hpp |1 +
 external/boost/include/boost/date_time/posix_time/posix_time.hpp   |1 +
 external/boost/include/boost/enable_shared_from_this.hpp   |1 +
 external/boost/include/boost/exception/diagnostic_information.hpp  |1 +
 external/boost/include/boost/filesystem.hpp|1 +
 external/boost/include/boost/filesystem/path.hpp   |1 +
 external/boost/include/boost/foreach.hpp   |1 +
 external/boost/include/boost/format.hpp|1 +
 external/boost/include/boost/function.hpp  |1 +
 external/boost/include/boost/functional/hash.hpp   |1 +
 external/boost/include/boost/fusion/adapted/std_pair.hpp   |1 +
 external/boost/include/boost/fusion/include/adapt_struct.hpp   |1 +
 external/boost/include/boost/intrusive/circular_list_algorithms.hpp|1 +
 external/boost/include/boost/intrusive_ptr.hpp |1 +
 external/boost/include/boost/io/ios_state.hpp  |1 +
 external/boost/include/boost/iostreams/device/file_descriptor.hpp  |1 +
 external/boost/include/boost/iostreams/filter/gzip.hpp |1 +
 external/boost/include/boost/iostreams/filtering_stream.hpp|1 +
 external/boost/include/boost/iterator/iterator_facade.hpp  |1 +
 external/boost/include/boost/lexical_cast.hpp  |1 +
 external/boost/include/boost/locale.hpp|1 +
 external/boost/include/boost/locale/gnu_gettext.hpp|1 +
 external/boost/include/boost/logic/tribool.hpp |1 +
 external/boost/include/boost/make_shared.hpp   |1 +
 external/boost/include/boost/math/common_factor_rt.hpp |1 +
 external/boost/include/boost/math/constants/constants.hpp  |1 +
 external/boost/include/boost/math/special_functions/expm1.hpp  |1 +
 external/boost/include/boost/math/special_functions/log1p.hpp  |1 +
 external/boost/include/boost/math/special_functions/sinc.hpp   |1 +
 external/boost/include/boost/multi_array.hpp   |1 +
 external/boost/include/boost/multi_index/composite_key.hpp |1 +
 external/boost/include/boost/multi_index/identity.hpp  |1 +
 external/boost/include/boost/multi_index/mem_fun.hpp   |1 +
 external/boost/include/boost/multi_index/ordered_index.hpp |1 +
 external/boost/include/boost/multi_index/random_access_index.hpp   |1 +
 external/boost/include/boost/multi_index_container.hpp |1 +
 external/boost/include/boost/noncopyable.hpp   |1 +
 external/boost/include/boost/none.hpp  |1 +
 external/boost/include/boost/numeric/conversion/cast.hpp   |1 +
 external/boost/include/boost/operators.hpp |1 +
 external/boost/include/boost/optional.hpp  |1 +
 external/boost/include/boost/optional/optional.hpp   

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

2018-01-09 Thread Stephan Bergmann
 extensions/source/scanner/scanwin.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit b3ef638cb25c2d09112f58b182fdb0e458e3dfa8
Author: Stephan Bergmann 
Date:   Tue Jan 9 18:09:10 2018 +0100

Various loplugin (clang-cl)

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

diff --git a/extensions/source/scanner/scanwin.cxx 
b/extensions/source/scanner/scanwin.cxx
index 56a45b2dcf73..02ce3425d01a 100644
--- a/extensions/source/scanner/scanwin.cxx
+++ b/extensions/source/scanner/scanwin.cxx
@@ -431,7 +431,7 @@ void ImpTwain::ImplXfer()
 if( nCurState == 6 )
 {
 TW_IMAGEINFOaInfo;
-HANDLE  hDIB = 0;
+HANDLE  hDIB = nullptr;
 longnWidth, nHeight, nXRes, nYRes;
 
 if( PFUNC( &aAppIdent, &aSrcIdent, DG_IMAGE, DAT_IMAGEINFO, MSG_GET, 
&aInfo ) == TWRC_SUCCESS )
@@ -463,13 +463,13 @@ void ImpTwain::ImplXfer()
 pBIH->biXPelsPerMeter = FRound( fFactor * nXRes );
 pBIH->biYPelsPerMeter = FRound( fFactor * nYRes );
 
-GlobalUnlock( reinterpret_cast((sal_IntPtr) 
hDIB) );
+GlobalUnlock( static_cast(hDIB) );
 }
 
-mrMgr.SetData( reinterpret_cast((sal_IntPtr) hDIB) 
);
+mrMgr.SetData( static_cast(hDIB) );
 }
 else
-GlobalFree( reinterpret_cast((sal_IntPtr) hDIB) );
+GlobalFree( static_cast(hDIB) );
 
 nCurState = 7;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Stephan Bergmann
 compilerplugins/clang/unusedfields.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 17b9ef3858ea8c5ab01abfe767da0b99d3d7d717
Author: Stephan Bergmann 
Date:   Tue Jan 9 18:10:57 2018 +0100

Don't build off-by-default loplugin:unusedfields on Windows for now

...due to missing sys/file.h

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

diff --git a/compilerplugins/clang/unusedfields.cxx 
b/compilerplugins/clang/unusedfields.cxx
index 4454a0d28b04..17ec24bc5c8e 100644
--- a/compilerplugins/clang/unusedfields.cxx
+++ b/compilerplugins/clang/unusedfields.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#if !defined _WIN32 //TODO, #include 
+
 #include 
 #include 
 #include 
@@ -989,4 +991,6 @@ loplugin::Plugin::Registration< UnusedFields > 
X("unusedfields", false);
 
 }
 
+#endif
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-09 Thread Stephan Bergmann
 compilerplugins/clang/test/passstuffbyref.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit cc033ec70ad91180c9d5c8ee081be933973f1f07
Author: Stephan Bergmann 
Date:   Tue Jan 9 18:20:50 2018 +0100

Don't use non-Windows sys/time.h

(The comment what the test wants to check quotes noelgrandin on 
#libreoffice-
dev.)

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

diff --git a/compilerplugins/clang/test/passstuffbyref.cxx 
b/compilerplugins/clang/test/passstuffbyref.cxx
index f6277b4bbf07..3f0efb1d106e 100644
--- a/compilerplugins/clang/test/passstuffbyref.cxx
+++ b/compilerplugins/clang/test/passstuffbyref.cxx
@@ -8,7 +8,6 @@
  */
 
 #include 
-#include 
 #include 
 #include 
 
@@ -57,10 +56,11 @@ struct S2 {
 
 // no warning expected
 
-timeval &operator -= ( timeval &t1, const timeval &t2 );
-timeval operator-( const timeval &t1, const timeval &t2 )
+// Don't flag stuff where the local var is hidden behind a self-returning 
operation like -=:
+S2 &operator -= ( S2 &t1, const S2 &t2 );
+S2 operator-( const S2 &t1, const S2 &t2 )
 {
-timeval t0 = t1;
+S2 t0 = t1;
 return t0 -= t2;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2018-01-09 Thread Olivier Hallot
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8c15140f92a0dff2aa7cc9e1f8bb5d8a0df34bf8
Author: Olivier Hallot 
Date:   Tue Jan 9 12:44:59 2018 -0200

Updated core
Project: help  2c7cfc527a05ef757ab3ecfd6ab5a2582a104680

Add Content-Security-Policies in new Help pages

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

diff --git a/helpcontent2 b/helpcontent2
index 03d3affe4966..2c7cfc527a05 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 03d3affe49661345c23168f1f7b59e781753b08c
+Subproject commit 2c7cfc527a05ef757ab3ecfd6ab5a2582a104680
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: help3xsl/help.html help3xsl/index2.html help3xsl/index.html help3xsl/online_transform.xsl

2018-01-09 Thread Olivier Hallot
 help3xsl/help.html|1 
 help3xsl/index.html   |1 
 help3xsl/index2.html  |   83 +-
 help3xsl/online_transform.xsl |1 
 4 files changed, 45 insertions(+), 41 deletions(-)

New commits:
commit 2c7cfc527a05ef757ab3ecfd6ab5a2582a104680
Author: Olivier Hallot 
Date:   Tue Jan 9 12:44:59 2018 -0200

Add Content-Security-Policies in new Help pages

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

diff --git a/help3xsl/help.html b/help3xsl/help.html
index 8dc4e67c2..015f75357 100644
--- a/help3xsl/help.html
+++ b/help3xsl/help.html
@@ -9,6 +9,7 @@
 
 
 
+
 
 
 
diff --git a/help3xsl/index.html b/help3xsl/index.html
index 9300f1b86..fcaa9bdda 100644
--- a/help3xsl/index.html
+++ b/help3xsl/index.html
@@ -8,6 +8,7 @@
 -->
 
 
+