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

2017-12-07 Thread Pranav Kant
 loleaflet/src/control/Control.Menubar.js |   35 +--
 1 file changed, 15 insertions(+), 20 deletions(-)

New commits:
commit 446c3f64257862f3e3750fa6663a02db3b5ea121
Author: Pranav Kant 
Date:   Wed Dec 6 17:19:46 2017 +0530

Remove special type, 'dialog', from Menubar items

Treat all commands as UNO commands only. I see no advantange of keeping
a separate 'dialog' type if all dialogs are opened by UNO Commands only.
There was a need earlier before we had a separate "created" callback,
but this is unnecessary now.

(cherry-picked from 8ac82593ec19322f21a3e8118c8d8cb1c464357f)

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

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index c4ef8b41..5a77aea5 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -35,19 +35,19 @@ L.Control.Menubar = L.Control.extend({
{name: _('Paste'), type: 'unocommand', uno: 
'.uno:Paste'},
{name: _('Select all'), type: 'unocommand', 
uno: '.uno:SelectAll'},
{type: 'separator'},
-   {name: _('Find & Replace...'), id: 
'.uno:SearchDialog', type: 'dialog'},
+   {name: _('Find & Replace...'), uno: 
'.uno:SearchDialog', type: 'unocommand'},
{type: 'separator'},
{name: _('Track Changes'), type: 'menu', menu: [
{name: _('Record'), type: 'unocommand', 
uno: '.uno:TrackChanges'},
{name: _('Show'), type: 'unocommand', 
uno: '.uno:ShowTrackedChanges'},
{type: 'separator'},
-   {name: _('Manage Changes...'), id: 
'.uno:AcceptTrackedChanges', type: 'dialog'},
+   {name: _('Manage Changes...'), uno: 
'.uno:AcceptTrackedChanges', type: 'unocommand'},
{name: _('Accept All'), type: 
'unocommand', uno: '.uno:AcceptAllTrackedChanges'},
{name: _('Reject All'), type: 
'unocommand', uno: '.uno:RejectAllTrackedChanges'},
{name: _('Previous'), type: 
'unocommand', uno: '.uno:PreviousTrackedChange'},
{name: _('Next'), type: 'unocommand', 
uno: '.uno:NextTrackedChange'}
]},
-   {name: _('Edit Style...'), id: 
'.uno:EditStyle', type: 'dialog'},
+   {name: _('Edit Style...'), uno: 
'.uno:EditStyle', type: 'unocommand'},
]},
{name: _('View'), id: 'view', type: 'menu', menu: [
{name: _('Full screen'), id: 'fullscreen', 
type: 'action'},
@@ -69,7 +69,7 @@ L.Control.Menubar = L.Control.extend({
{name: _('Page break'), type: 'unocommand', 
uno: '.uno:InsertPageBreak'},
{name: _('Column break'), type: 'unocommand', 
uno: '.uno:InsertColumnBreak'},
{type: 'separator'},
-   {name: _('Hyperlink...'), id: 
'.uno:HyperlinkDialog', type: 'dialog'},
+   {name: _('Hyperlink...'), uno: 
'.uno:HyperlinkDialog', type: 'unocommand'},
{name: _('Special character...'), id: 
'specialcharacter', type: 'action'},
{name: _('Formatting mark'), type: 'menu', 
menu: [
{name: _('Non-breaking space'), type: 
'unocommand', uno: '.uno:InsertNonBreakingSpace'},
@@ -79,7 +79,7 @@ L.Control.Menubar = L.Control.extend({
{name: _('No-width no break'), type: 
'unocommand', uno: '.uno:InsertZWNBSP'},
{name: _('Left-to-right mark'), type: 
'unocommand', uno: '.uno:InsertLRM'},
{name: _('Right-to-left mark'), type: 
'unocommand', uno: '.uno:InsertRLM'}]},
-   {name: _('Index Entry...'), id: 
'.uno:InsertIndexesEntry', type: 'dialog'}
+   {name: _('Index Entry...'), uno: 
'.uno:InsertIndexesEntry', type: 'unocommand'}
]
},
{name: _('Format'), type: 'menu', menu: [
@@ -151,9 +151,9 @@ L.Control.Menubar = L.Control.extend({
{name: _('To previous paragraph in 
level'), type: 'unocommand', uno: '.uno:JumpUpThisLevel'},
{nam

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

2017-12-07 Thread Pranav Kant
 loleaflet/src/control/Control.Menubar.js |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 53eab227d20970540bcd18bb204e18edc32a3da1
Author: Pranav Kant 
Date:   Wed Dec 6 17:03:55 2017 +0530

Add elipsis to dialogs in menubar

And change 'Spelling & Grammar' to 'Spelling...' to match with latest
desktop UI names.

(cherry-picked from 13144cbc8f0c543e51ee7e53b5fd7f750390d241)

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

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 51aeacf5..c4ef8b41 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -35,7 +35,7 @@ L.Control.Menubar = L.Control.extend({
{name: _('Paste'), type: 'unocommand', uno: 
'.uno:Paste'},
{name: _('Select all'), type: 'unocommand', 
uno: '.uno:SelectAll'},
{type: 'separator'},
-   {name: _('Find & Replace'), id: 
'.uno:SearchDialog', type: 'dialog'},
+   {name: _('Find & Replace...'), id: 
'.uno:SearchDialog', type: 'dialog'},
{type: 'separator'},
{name: _('Track Changes'), type: 'menu', menu: [
{name: _('Record'), type: 'unocommand', 
uno: '.uno:TrackChanges'},
@@ -69,7 +69,7 @@ L.Control.Menubar = L.Control.extend({
{name: _('Page break'), type: 'unocommand', 
uno: '.uno:InsertPageBreak'},
{name: _('Column break'), type: 'unocommand', 
uno: '.uno:InsertColumnBreak'},
{type: 'separator'},
-   {name: _('Hyperlink'), id: 
'.uno:HyperlinkDialog', type: 'dialog'},
+   {name: _('Hyperlink...'), id: 
'.uno:HyperlinkDialog', type: 'dialog'},
{name: _('Special character...'), id: 
'specialcharacter', type: 'action'},
{name: _('Formatting mark'), type: 'menu', 
menu: [
{name: _('Non-breaking space'), type: 
'unocommand', uno: '.uno:InsertNonBreakingSpace'},
@@ -184,10 +184,10 @@ L.Control.Menubar = L.Control.extend({
{name: _('Cell'), type: 'unocommand', 
uno: '.uno:EntireCell'}]},
{name: _('Merge cells'), type: 'unocommand', 
uno: '.uno:MergeCells'},
{type: 'separator'},
-   {name: _('Properties'), id: '.uno:TableDialog', 
type: 'dialog'}
+   {name: _('Properties...'), id: 
'.uno:TableDialog', type: 'dialog'}
]},
{name: _('Tools'), id: 'tools', type: 'menu', menu: [
-   {name: _('Spelling and Grammar'), id: 
'.uno:SpellingAndGrammarDialog', type: 'dialog'},
+   {name: _('Spelling...'), id: 
'.uno:SpellingAndGrammarDialog', type: 'dialog'},
{name: _('Automatic spell checking'), type: 
'unocommand', uno: '.uno:SpellOnline'},
{name: _('Language for selection'), type: 
'menu', menu: [
{name: _('None (Do not check 
spelling)'), id: 'noneselection', type: 'unocommand', uno: 
'.uno:LanguageStatus?Language:string=Current_LANGUAGE_NONE'}]},
@@ -195,7 +195,7 @@ L.Control.Menubar = L.Control.extend({
{name: _('None (Do not check 
spelling)'), id: 'noneparagraph', type: 'unocommand', uno: 
'.uno:LanguageStatus?Language:string=Paragraph_LANGUAGE_NONE'}]},
{name: _('Language for entire document'), type: 
'menu', menu: [
{name: _('None (Do not check 
spelling)'), id: 'nonelanguage', type: 'unocommand', uno: 
'.uno:LanguageStatus?Language:string=Default_LANGUAGE_NONE'}]},
-   {name: _('Word count'), id: 
'.uno:WordCountDialog', type: 'dialog'}
+   {name: _('Word Count...'), id: 
'.uno:WordCountDialog', type: 'dialog'}
]},
{name: _('Help'), id: 'help', type: 'menu', menu: [
{name: _('Keyboard shortcuts'), id: 
'keyboard-shortcuts', type: 'action'},
@@ -226,7 +226,7 @@ L.Control.Menubar = L.Control.extend({
{name: _('Paste'), type: 'unocommand', uno: 
'.uno:Paste'},
{name: _('Select all'), type: 'unocommand', 
uno: '.uno:SelectAll'},
{type: 'separator'},
-   

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

2017-12-07 Thread Tamás Zolnai
 cui/source/dialogs/cuicharmap.cxx|4 
 sc/inc/textuno.hxx   |2 
 sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx |8 -
 sc/source/ui/app/uiitems.cxx |   52 ---
 sc/source/ui/dbgui/asciiopt.cxx  |   16 ---
 sc/source/ui/docshell/externalrefmgr.cxx |3 
 sc/source/ui/inc/areasave.hxx|2 
 sc/source/ui/inc/asciiopt.hxx|1 
 sc/source/ui/inc/cellmergeoption.hxx |1 
 sc/source/ui/inc/uiitems.hxx |   10 --
 sc/source/ui/undo/areasave.cxx   |   13 --
 sc/source/ui/unoobj/chart2uno.cxx|   30 --
 sc/source/ui/unoobj/textuno.cxx  |   12 --
 sc/source/ui/view/cellmergeoption.cxx|   10 --
 14 files changed, 2 insertions(+), 162 deletions(-)

New commits:
commit 2432c550d203053214310a23630f89baecdff6cc
Author: Tamás Zolnai 
Date:   Fri Dec 8 04:01:02 2017 +0100

Update recent characters only when the selected character is inserted

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

diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 31c259188431..c01af450b5f8 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -631,9 +631,9 @@ void SvxCharacterMap::insertCharToDoc(const OUString& 
sGlyph)
 aArgs[1].Name = "FontName";
 aArgs[1].Value <<= aFont.GetFamilyName();
 comphelper::dispatchCommand(".uno:InsertSymbol", aArgs);
-}
 
-updateRecentCharacterList(sGlyph, aFont.GetFamilyName());
+updateRecentCharacterList(sGlyph, aFont.GetFamilyName());
+}
 }
 
 
commit 818f9e4017d16d6a48265638393dec4f9ed30649
Author: Jochen Nitschke 
Date:   Tue Dec 5 19:08:39 2017 +0100

clang-tidy modernize-use-equals-default in sc/source/ui

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

diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx
index 0d72c9b95008..c88a2831261d 100644
--- a/sc/inc/textuno.hxx
+++ b/sc/inc/textuno.hxx
@@ -220,7 +220,6 @@ class ScCellTextCursor : public SvxUnoTextCursor
 rtl::Reference mxTextObj;
 
 public:
-ScCellTextCursor(const ScCellTextCursor& rOther);
 ScCellTextCursor(ScCellObj& rText);
 virtual ~ScCellTextCursor() throw() override;
 
@@ -271,7 +270,6 @@ private:
 css::uno::Reference< css::text::XText > xParentText;
 
 public:
-ScDrawTextCursor(const ScDrawTextCursor& rOther);
 ScDrawTextCursor( const css::uno::Reference< 
css::text::XText >& xParent,
 const SvxUnoTextBase& rText );
 virtual  ~ScDrawTextCursor() throw() override;
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx 
b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 203058d7cc11..e5bb6a38389a 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -559,20 +559,12 @@ struct ScShapeChild
 : mnRangeId(0)
 {
 }
-ScShapeChild(const ScShapeChild& rOld);
 ~ScShapeChild();
 mutable rtl::Reference< ::accessibility::AccessibleShape > mpAccShape;
 css::uno::Reference< css::drawing::XShape > mxShape;
 sal_Int32 mnRangeId;
 };
 
-ScShapeChild::ScShapeChild(const ScShapeChild& rOld)
-:
-mpAccShape(rOld.mpAccShape),
-mxShape(rOld.mxShape),
-mnRangeId(rOld.mnRangeId)
-{}
-
 ScShapeChild::~ScShapeChild()
 {
 if (mpAccShape.is())
diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx
index a28e02234ad0..dd0f4eb27f79 100644
--- a/sc/source/ui/app/uiitems.cxx
+++ b/sc/source/ui/app/uiitems.cxx
@@ -137,17 +137,6 @@ ScSortItem::ScSortItem( sal_uInt16  nWhichP,
 if ( pSortData ) theSortData = *pSortData;
 }
 
-ScSortItem::ScSortItem( const ScSortItem& rItem ) :
-SfxPoolItem ( rItem ),
-pViewData   ( rItem.pViewData ),
-theSortData ( rItem.theSortData )
-{
-}
-
-ScSortItem::~ScSortItem()
-{
-}
-
 bool ScSortItem::operator==( const SfxPoolItem& rItem ) const
 {
 assert(SfxPoolItem::operator==(rItem));
@@ -272,17 +261,6 @@ ScSubTotalItem::ScSubTotalItem( sal_uInt16 
 nWhichP,
 if ( pSubTotalData ) theSubTotalData = *pSubTotalData;
 }
 
-ScSubTotalItem::ScSubTotalItem( const ScSubTotalItem& rItem ) :
-SfxPoolItem ( rItem ),
-pVi

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

2017-12-07 Thread Jochen Nitschke
 sc/source/ui/view/tabvwsha.cxx |   17 -
 1 file changed, 8 insertions(+), 9 deletions(-)

New commits:
commit 4c84edef794294e2341aaa6da775100d6ac285ba
Author: Jochen Nitschke 
Date:   Thu Dec 7 23:31:11 2017 +0100

simplify construction of a const vector

Change-Id: I9860e6dc113df6d2d95f75df647a54bd8c9a5c1d
Reviewed-on: https://gerrit.libreoffice.org/46054
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 861ced08b5a6..64aee60e6b09 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -481,15 +481,14 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& 
rReq, const OString &rName
 pOldSet->MergeRange(SID_ATTR_BORDER_STYLES, SID_ATTR_BORDER_DEFAULT_WIDTH);
 
 // We only allow these border line types.
-std::vector aBorderStyles;
-aBorderStyles.reserve(5);
-aBorderStyles.push_back(table::BorderLineStyle::SOLID);
-aBorderStyles.push_back(table::BorderLineStyle::DOTTED);
-aBorderStyles.push_back(table::BorderLineStyle::DASHED);
-aBorderStyles.push_back(table::BorderLineStyle::FINE_DASHED);
-aBorderStyles.push_back(table::BorderLineStyle::DASH_DOT);
-aBorderStyles.push_back(table::BorderLineStyle::DASH_DOT_DOT);
-aBorderStyles.push_back(table::BorderLineStyle::DOUBLE_THIN);
+const std::vector aBorderStyles{
+table::BorderLineStyle::SOLID,
+table::BorderLineStyle::DOTTED,
+table::BorderLineStyle::DASHED,
+table::BorderLineStyle::FINE_DASHED,
+table::BorderLineStyle::DASH_DOT,
+table::BorderLineStyle::DASH_DOT_DOT,
+table::BorderLineStyle::DOUBLE_THIN };
 
 SfxIntegerListItem aBorderStylesItem(SID_ATTR_BORDER_STYLES, 
aBorderStyles);
 pOldSet->Put(aBorderStylesItem);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-12-07 Thread Noel Grandin
 include/svl/zforlist.hxx|3 -
 svl/source/numbers/zforlist.cxx |   83 +++-
 2 files changed, 34 insertions(+), 52 deletions(-)

New commits:
commit cecaa5974775cfbb2884c7bdd6e9c497c52f14ad
Author: Noel Grandin 
Date:   Thu Dec 7 15:27:19 2017 +0200

use std::unique_ptr in SvNumberFormatter

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

diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index 5b84d0078408..f45ec7f0bc0f 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -34,6 +34,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 class Date;
@@ -804,7 +805,7 @@ public:
 private:
 css::uno::Reference< css::uno::XComponentContext > m_xContext;
 LanguageTag maLanguageTag;
-SvNumberFormatTable aFTable;// Table of format keys to format 
entries
+std::map> aFTable;
// Table of format keys to format entries
 typedef std::map DefaultFormatKeysMap;
 DefaultFormatKeysMap aDefaultFormatKeys; // Table of default standard to 
format keys
 SvNumberFormatTable* pFormatTable;  // For the UI dialog
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index bfa23d2f5f58..8d9152b4d00f 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -277,8 +277,7 @@ SvNumberFormatter::~SvNumberFormatter()
 }
 }
 
-for (SvNumberFormatTable::iterator it = aFTable.begin(); it != 
aFTable.end(); ++it)
-delete it->second;
+aFTable.clear();
 delete pFormatTable;
 delete pCharClass;
 delete pStringScanner;
@@ -445,10 +444,9 @@ void SvNumberFormatter::ReplaceSystemCL( LanguageType 
eOldLanguage )
 sal_uInt32 nKey;
 
 // remove old builtin formats
-SvNumberFormatTable::iterator it = aFTable.find( nCLOffset );
+auto it = aFTable.find( nCLOffset );
 while ( it != aFTable.end() && (nKey = it->first) >= nCLOffset && nKey <= 
nMaxBuiltin )
 {
-delete it->second;
 it = aFTable.erase(it);
 }
 
@@ -456,7 +454,7 @@ void SvNumberFormatter::ReplaceSystemCL( LanguageType 
eOldLanguage )
 SvNumberFormatTable aOldTable;
 while ( it != aFTable.end() && (nKey = it->first) >= nCLOffset && nKey < 
nNextCL )
 {
-aOldTable[ nKey ] = it->second;
+aOldTable[ nKey ] = it->second.release();
 it = aFTable.erase(it);
 }
 
@@ -501,9 +499,8 @@ void SvNumberFormatter::ReplaceSystemCL( LanguageType 
eOldLanguage )
 pNewEntry->SetType( css::util::NumberFormat::DEFINED );
 }
 
-if ( aFTable.insert( make_pair( nKey, pNewEntry.get()) ).second )
+if ( aFTable.emplace( nKey, std::move(pNewEntry) ).second )
 {
-pNewEntry.release();
 bCheck = true;
 }
 }
@@ -615,13 +612,12 @@ bool SvNumberFormatter::PutEntry(OUString& rString,
 {
 SAL_WARN( "svl.numbers", "SvNumberFormatter::PutEntry: too 
many formats for CL");
 }
-else if (!aFTable.insert(make_pair( nPos+1,p_Entry.get())).second)
+else if (!aFTable.emplace( nPos+1, std::move(p_Entry)).second)
 {
 SAL_WARN( "svl.numbers", "SvNumberFormatter::PutEntry: dup 
position");
 }
 else
 {
-p_Entry.release();
 bCheck = true;
 nKey = nPos+1;
 pStdFormat->SetLastInsertKey((sal_uInt16) (nKey-CLOffset), 
SvNumberformat::FormatterPrivateAccess());
@@ -749,7 +745,6 @@ sal_uInt32 SvNumberFormatter::GetIndexPuttingAndConverting( 
OUString & rString,
 void SvNumberFormatter::DeleteEntry(sal_uInt32 nKey)
 {
 ::osl::MutexGuard aGuard( GetMutex() );
-delete aFTable[nKey];
 aFTable.erase(nKey);
 }
 
@@ -900,7 +895,7 @@ sal_uInt32 SvNumberFormatter::ImpIsEntry(const OUString& 
rString,
  LanguageType eLnge)
 {
 sal_uInt32 res = NUMBERFORMAT_ENTRY_NOT_FOUND;
-SvNumberFormatTable::const_iterator it = aFTable.find( nCLOffset);
+auto it = aFTable.find( nCLOffset);
 while ( res == NUMBERFORMAT_ENTRY_NOT_FOUND &&
 it != aFTable.end() && it->second->GetLanguage() == eLnge )
 {
@@ -1051,13 +1046,13 @@ SvNumberFormatTable& SvNumberFormatter::GetEntryTable(
 // (e.g. currency) => has to be done before collecting formats.
 sal_uInt32 nDefaultIndex = GetStandardFormat( eType, ActLnge );
 
-SvNumberFormatTable::iterator it = aFTable.find( CLOffset);
+auto it = aFTable.find( CLOffset);
 
 if (eType == css::util::NumberFormat::ALL)
 {
 while (it != aFTable.end() && it->second->GetLanguage() == ActLnge)
 {   // copy all entries to output table
-(*pFormatTable)[ it->first ] = it->second;
+ 

[Libreoffice-commits] core.git: include/test qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sc/qa test/Library_subsequenttest.mk test/source

2017-12-07 Thread Jens Carl
 include/test/sheet/xdatapilotfield.hxx  |   34 
+
 qadevOOo/Jar_OOoRunner.mk   |1 
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldObj.csv |1 
 qadevOOo/tests/java/ifc/sheet/_XDataPilotField.java |   61 
--
 sc/qa/extras/scdatapilotfieldobj.cxx|   20 ++-
 test/Library_subsequenttest.mk  |1 
 test/source/sheet/xdatapilotfield.cxx   |   40 
++
 7 files changed, 91 insertions(+), 67 deletions(-)

New commits:
commit 7345bef0f354673e2fd3127b8fc707eae4c936ed
Author: Jens Carl 
Date:   Fri Dec 8 03:36:00 2017 +

tdf#45904 Move _XDataPilotField Java test to C++

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

diff --git a/include/test/sheet/xdatapilotfield.hxx 
b/include/test/sheet/xdatapilotfield.hxx
new file mode 100644
index ..6622b71bcfbd
--- /dev/null
+++ b/include/test/sheet/xdatapilotfield.hxx
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_TEST_SHEET_XDATAPILOTFIELD_HXX
+#define INCLUDED_TEST_SHEET_XDATAPILOTFIELD_HXX
+
+#include 
+#include 
+
+#include 
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XDataPilotField
+{
+public:
+virtual css::uno::Reference init() = 0;
+
+void testGetItems();
+
+protected:
+~XDataPilotField() {}
+};
+}
+
+#endif // INCLUDED_TEST_SHEET_XDATAPILOTFIELD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 539a24e803e4..bf717ebb1f37 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -596,7 +596,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/ifc/sheet/_XConsolidatable \
 qadevOOo/tests/java/ifc/sheet/_XConsolidationDescriptor \
 qadevOOo/tests/java/ifc/sheet/_XDatabaseRanges \
-qadevOOo/tests/java/ifc/sheet/_XDataPilotField \
 qadevOOo/tests/java/ifc/sheet/_XDDELink \
 qadevOOo/tests/java/ifc/sheet/_XDocumentAuditing \
 qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster \
diff --git 
a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldObj.csv
index c5efdd130e60..de2cb74f71ba 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotFieldObj.csv
@@ -7,4 +7,3 @@
 
"ScDataPilotFieldObj";"com::sun::star::beans::XPropertySet";"removePropertyChangeListener()"
 
"ScDataPilotFieldObj";"com::sun::star::beans::XPropertySet";"addVetoableChangeListener()"
 
"ScDataPilotFieldObj";"com::sun::star::beans::XPropertySet";"removeVetoableChangeListener()"
-"ScDataPilotFieldObj";"com::sun::star::sheet::XDataPilotField#optional";"getItems()"
diff --git a/qadevOOo/tests/java/ifc/sheet/_XDataPilotField.java 
b/qadevOOo/tests/java/ifc/sheet/_XDataPilotField.java
deleted file mode 100644
index 54ed131a5c52..
--- a/qadevOOo/tests/java/ifc/sheet/_XDataPilotField.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-package ifc.sheet;
-
-import com.sun.star.container.XIndexAccess;
-import com.sun.star.sheet.XDataPilotField;
-
-import lib.MultiMethodTest;
-
-
-public class _XDataPilotField extends MultiMethodTest {
-public XDataPilotField oObj = null;
-
-public void _getItems() {
-XIndexAccess xIA = oObj.getItems();
-tRes.tested("getItems()", checkIndexAccess(xIA));
-}
-
-/**
- * calls the method getCount at the IndexAccess, returns true is it is >0
- * and getByIndex(

[Libreoffice-commits] core.git: include/test qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sc/CppunitTest_sc_datapilottablesobj.mk sc/Module_sc.mk sc/qa test/Library_subsequenttest.mk test/

2017-12-07 Thread Jens Carl
 include/test/sheet/xdatapilottables.hxx  |   35 ++
 qadevOOo/Jar_OOoRunner.mk|1 
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotTablesObj.csv |3 
 qadevOOo/tests/java/ifc/sheet/_XDataPilotTables.java |  149 
--
 sc/CppunitTest_sc_datapilottablesobj.mk  |  105 
+++
 sc/Module_sc.mk  |1 
 sc/qa/extras/scdatapilottablesobj.cxx|  134 

 test/Library_subsequenttest.mk   |1 
 test/source/sheet/xdatapilottables.cxx   |   54 +++
 9 files changed, 330 insertions(+), 153 deletions(-)

New commits:
commit 87d636a14be35468ecef7b6f95c6754d24bb6e94
Author: Jens Carl 
Date:   Fri Dec 8 01:00:24 2017 +

tdf#45904 Move _XDataPilotTables Java tests to C++

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

diff --git a/include/test/sheet/xdatapilottables.hxx 
b/include/test/sheet/xdatapilottables.hxx
new file mode 100644
index ..f1d3671647d6
--- /dev/null
+++ b/include/test/sheet/xdatapilottables.hxx
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_TEST_SHEET_XDATAPILOTTABLES_HXX
+#define INCLUDED_TEST_SHEET_XDATAPILOTTABLES_HXX
+
+#include 
+#include 
+
+#include 
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XDataPilotTables
+{
+public:
+virtual css::uno::Reference init() = 0;
+virtual css::uno::Reference getXSpreadsheet() = 0;
+
+void testXDataPilotTables();
+
+protected:
+~XDataPilotTables() {}
+};
+}
+
+#endif // INCLUDED_TEST_SHEET_XDATAPILOTTABLES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 5751f1cb8ef9..539a24e803e4 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -597,7 +597,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/ifc/sheet/_XConsolidationDescriptor \
 qadevOOo/tests/java/ifc/sheet/_XDatabaseRanges \
 qadevOOo/tests/java/ifc/sheet/_XDataPilotField \
-qadevOOo/tests/java/ifc/sheet/_XDataPilotTables \
 qadevOOo/tests/java/ifc/sheet/_XDDELink \
 qadevOOo/tests/java/ifc/sheet/_XDocumentAuditing \
 qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster \
diff --git 
a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotTablesObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotTablesObj.csv
index 3fa9eccc6dda..fe555ba2cbc1 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotTablesObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScDataPilotTablesObj.csv
@@ -5,7 +5,4 @@
 "ScDataPilotTablesObj";"com::sun::star::container::XIndexAccess";"getByIndex()"
 
"ScDataPilotTablesObj";"com::sun::star::container::XElementAccess";"getElementType()"
 
"ScDataPilotTablesObj";"com::sun::star::container::XElementAccess";"hasElements()"
-"ScDataPilotTablesObj";"com::sun::star::sheet::XDataPilotTables";"createDataPilotDescriptor()"
-"ScDataPilotTablesObj";"com::sun::star::sheet::XDataPilotTables";"insertNewByName()"
-"ScDataPilotTablesObj";"com::sun::star::sheet::XDataPilotTables";"removeByName()"
 
"ScDataPilotTablesObj";"com::sun::star::container::XEnumerationAccess";"createEnumeration()"
diff --git a/qadevOOo/tests/java/ifc/sheet/_XDataPilotTables.java 
b/qadevOOo/tests/java/ifc/sheet/_XDataPilotTables.java
deleted file mode 100644
index 820bd4413340..
--- a/qadevOOo/tests/java/ifc/sheet/_XDataPilotTables.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-

[Libreoffice-commits] core.git: Branch 'private/kohei/excel-2003-xml-orcus-filter' - 2 commits - sc/inc sc/source

2017-12-07 Thread Kohei Yoshida
 sc/inc/document.hxx |1 -
 sc/inc/documentimport.hxx   |1 +
 sc/source/core/data/document.cxx|9 -
 sc/source/core/data/documentimport.cxx  |5 +
 sc/source/filter/orcus/interface.cxx|   12 +++-
 sc/source/filter/orcus/orcusfiltersimpl.cxx |   13 ++---
 6 files changed, 23 insertions(+), 18 deletions(-)

New commits:
commit 117b51101eaefc6ee14a193982927e812f60e803
Author: Kohei Yoshida 
Date:   Thu Dec 7 22:24:12 2017 -0500

Remove unused method.

Change-Id: Idc7919f04898b0298d6448d2dd84222b211cf5db

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 3096dc7aa5df..5c1b93763d1c 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -870,7 +870,6 @@ public:
 bool bNamesValid = false );
 SC_DLLPUBLIC bool   DeleteTabs( SCTAB nTab, SCTAB nSheets );
 SC_DLLPUBLIC bool   DeleteTab( SCTAB nTab );
-SC_DLLPUBLIC void   ClearTabs();
 SC_DLLPUBLIC bool   RenameTab( SCTAB nTab, const OUString& rName,
bool bExternalDocument = false );
 boolMoveTab( SCTAB nOldPos, SCTAB nNewPos, 
ScProgress* pProgress = nullptr );
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 2151269a1612..f286a88782ab 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -783,15 +783,6 @@ bool ScDocument::DeleteTab( SCTAB nTab )
 return bValid;
 }
 
-void ScDocument::ClearTabs()
-{
-for (auto& it: maTabs)
-{
-delete it;
-}
-maTabs.clear();
-}
-
 bool ScDocument::DeleteTabs( SCTAB nTab, SCTAB nSheets )
 {
 bool bValid = false;
commit 86b0685583480714f6431b73ae1017fe31ec8d85
Author: Kohei Yoshida 
Date:   Thu Dec 7 21:58:16 2017 -0500

Take into account the fact that ScDocument already has one sheet.

ScDocument already has one sheet upon creation, so we need to avoid
appending sheet when the request is for the first sheet.

Change-Id: Ie5526d6791e545f5faa0bf3f16988351c09e94c8

diff --git a/sc/inc/documentimport.hxx b/sc/inc/documentimport.hxx
index 00496cdaac2b..03f415c381cc 100644
--- a/sc/inc/documentimport.hxx
+++ b/sc/inc/documentimport.hxx
@@ -87,6 +87,7 @@ public:
 SCTAB getSheetIndex(const OUString& rName) const;
 SCTAB getSheetCount() const;
 bool appendSheet(const OUString& rName);
+void setSheetName(SCTAB nTab, const OUString& rName);
 
 void setOriginDate(sal_uInt16 nYear, sal_uInt16 nMonth, sal_uInt16 nDay);
 
diff --git a/sc/source/core/data/documentimport.cxx 
b/sc/source/core/data/documentimport.cxx
index c46f1b09c95d..c41e134558bf 100644
--- a/sc/source/core/data/documentimport.cxx
+++ b/sc/source/core/data/documentimport.cxx
@@ -167,6 +167,11 @@ bool ScDocumentImport::appendSheet(const OUString& rName)
 return true;
 }
 
+void ScDocumentImport::setSheetName(SCTAB nTab, const OUString& rName)
+{
+mpImpl->mrDoc.SetTabNameOnLoad(nTab, rName);
+}
+
 void ScDocumentImport::setOriginDate(sal_uInt16 nYear, sal_uInt16 nMonth, 
sal_uInt16 nDay)
 {
 if (!mpImpl->mrDoc.pDocOptions)
diff --git a/sc/source/filter/orcus/interface.cxx 
b/sc/source/filter/orcus/interface.cxx
index 50b009cae3b9..d321954c7741 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -85,9 +85,19 @@ ScOrcusFactory::ScOrcusFactory(ScDocument& rDoc) :
 mnProgress(0) {}
 
 orcus::spreadsheet::iface::import_sheet* ScOrcusFactory::append_sheet(
-orcus::spreadsheet::sheet_t /*sheet_index*/, const char* sheet_name, 
size_t sheet_name_length)
+orcus::spreadsheet::sheet_t sheet_index, const char* sheet_name, size_t 
sheet_name_length)
 {
 OUString aTabName(sheet_name, sheet_name_length, RTL_TEXTENCODING_UTF8);
+
+if (sheet_index == 0)
+{
+// The calc document initializes with one sheet already present.
+assert(maDoc.getSheetCount() == 1);
+maDoc.setSheetName(0, aTabName);
+maSheets.push_back(o3tl::make_unique(maDoc, 0, *this));
+return maSheets.back().get();
+}
+
 if (!maDoc.appendSheet(aTabName))
 return nullptr;
 
diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx 
b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index fbbdd0b64e53..8683749fdd7c 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -55,7 +55,7 @@ uno::Reference 
getStatusIndicator(const SfxMedium& rMedi
 return xStatusIndicator;
 }
 
-bool loadFileContent(ScDocument& rDoc, SfxMedium& rMedium, 
orcus::iface::import_filter& filter)
+bool loadFileContent(SfxMedium& rMedium, orcus::iface::import_filter& filter)
 {
 SvStream* pStream = rMedium.GetInStream();
 pStream->Seek(0);
@@ -72,7 +72,6 @@ bool loadFileContent(ScDocument& rDoc, SfxMedium& rMedium, 
orcus::iface::import_
 
 

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

2017-12-07 Thread Paul Trojahn
 include/oox/export/drawingml.hxx   |2 +-
 oox/source/export/drawingml.cxx|   12 +++-
 oox/source/export/shapes.cxx   |7 ++-
 sd/qa/unit/data/odp/tdf68759.odp   |binary
 sd/qa/unit/export-tests-ooxml2.cxx |   21 +
 5 files changed, 35 insertions(+), 7 deletions(-)

New commits:
commit baa205c001540b5dbc795cd876e661549d432ac1
Author: Paul Trojahn 
Date:   Thu Nov 30 15:17:04 2017 +0100

tdf#68759 PPTX: Export IsMirrored

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

diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 2e0625c43ed9..276e18d0bcc2 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -197,7 +197,7 @@ public:
 void WriteBlipMode( const css::uno::Reference< css::beans::XPropertySet >& 
rXPropSet, const OUString& rURL );
 
 void WriteShapeTransformation(const css::uno::Reference< 
css::drawing::XShape >& rXShape,
-  sal_Int32 nXmlNamespace, bool bFlipH = false, bool bFlipV = 
false, bool bSuppressRotation = false, bool bSuppressFlipping = false );
+  sal_Int32 nXmlNamespace, bool bFlipH = false, bool bFlipV = 
false, bool bSuppressRotation = false, bool bSuppressFlipping = false, bool 
bFlippedBeforeRotation = false);
 void WriteTransformation(const tools::Rectangle& rRectangle,
   sal_Int32 nXmlNamespace, bool bFlipH = false, bool bFlipV = 
false, sal_Int32 nRotation = 0, bool bIsGroupShape = false);
 
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index d243a4f99d13..1ec05fa2a2e9 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1286,7 +1286,7 @@ void DrawingML::WriteTransformation(const 
tools::Rectangle& rRect,
 mpFS->endElementNS( nXmlNamespace, XML_xfrm );
 }
 
-void DrawingML::WriteShapeTransformation( const Reference< XShape >& rXShape, 
sal_Int32 nXmlNamespace, bool bFlipH, bool bFlipV, bool bSuppressRotation, bool 
bSuppressFlipping )
+void DrawingML::WriteShapeTransformation( const Reference< XShape >& rXShape, 
sal_Int32 nXmlNamespace, bool bFlipH, bool bFlipV, bool bSuppressRotation, bool 
bSuppressFlipping, bool bFlippedBeforeRotation )
 {
 SAL_INFO("oox.shape",  "write shape transformation");
 
@@ -1294,6 +1294,11 @@ void DrawingML::WriteShapeTransformation( const 
Reference< XShape >& rXShape, sa
 awt::Point aPos = rXShape->getPosition();
 awt::Size aSize = rXShape->getSize();
 
+bool bFlipHWrite = bFlipH && !bSuppressFlipping;
+bool bFlipVWrite = bFlipV && !bSuppressFlipping;
+bFlipH = bFlipH && !bFlippedBeforeRotation;
+bFlipV = bFlipV && !bFlippedBeforeRotation;
+
 bool bPositiveY = true;
 bool bPositiveX = true;
 
@@ -1345,14 +1350,11 @@ void DrawingML::WriteShapeTransformation( const 
Reference< XShape >& rXShape, sa
 if(bFlipH != bFlipV)
 nRotation = nRotation * -1 + 36000;
 
-if(bSuppressFlipping)
-bFlipH = bFlipV = false;
-
 uno::Reference xServiceInfo(rXShape, 
uno::UNO_QUERY_THROW);
 bool bIsGroupShape = (xServiceInfo.is() && 
xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"));
 
 WriteTransformation(tools::Rectangle(Point(aPos.X, aPos.Y), 
Size(aSize.Width, aSize.Height)), nXmlNamespace,
-bFlipH, bFlipV, 
OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY(nRotation), bIsGroupShape);
+bFlipHWrite, bFlipVWrite, 
OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY(nRotation), bIsGroupShape);
 }
 
 void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, 
bool bIsField, sal_Int32 nElement, bool bCheckDirect,
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index a80809c663e2..b2a07a2f4ca4 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1186,7 +1186,12 @@ void ShapeExport::WriteGraphicObjectShapePart( const 
Reference< XShape >& xShape
 
 // visual shape properties
 pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
-WriteShapeTransformation( xShape, XML_a );
+bool bFlipH = false;
+if( xShapeProps->getPropertySetInfo()->hasPropertyByName("IsMirrored") )
+{
+xShapeProps->getPropertyValue("IsMirrored") >>= bFlipH;
+}
+WriteShapeTransformation( xShape, XML_a, bFlipH, false, false, false, true 
);
 WritePresetShape( "rect" );
 // graphic object can come with the frame (bnc#654525)
 WriteOutline( xShapeProps );
diff --git a/sd/qa/unit/data/odp/tdf68759.odp b/sd/qa/unit/data/odp/tdf68759.odp
new file mode 100644
index ..db3e51e97637
Binary files /dev/null and b/sd/qa/unit/data/odp/tdf68759.odp differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx 
b/sd/qa/unit/export-tests-ooxml2.cxx
index dc314491de03..2a380b3fc7ab 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/

[Libreoffice-commits] core.git: Branch 'private/kohei/excel-2003-xml-orcus-filter' - 2 commits - sc/source

2017-12-07 Thread Kohei Yoshida
 sc/source/filter/orcus/orcusfiltersimpl.cxx |  121 +++-
 1 file changed, 34 insertions(+), 87 deletions(-)

New commits:
commit 2649c42b657fe16bd3d6645ca3b3dd8f320156bc
Author: Kohei Yoshida 
Date:   Thu Dec 7 21:34:40 2017 -0500

All the other orcus-based filters should take the same code path.

Change-Id: Iac96c6eb842a769d70c3f39830cbdb0e1ee93dc8

diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx 
b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index 1773caa22330..fbbdd0b64e53 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -96,21 +96,9 @@ bool ScOrcusFiltersImpl::importCSV(ScDocument& rDoc, 
SfxMedium& rMedium) const
 {
 ScOrcusFactory aFactory(rDoc);
 aFactory.setStatusIndicator(getStatusIndicator(rMedium));
-OString aSysPath = toSystemPath(rMedium.GetName());
-const char* path = aSysPath.getStr();
 
-try
-{
-orcus::orcus_csv filter(&aFactory);
-filter.read_file(path);
-}
-catch (const std::exception&)
-{
-rDoc.InsertTab(SC_TAB_APPEND, "Foo");
-rDoc.SetString(0, 0, 0, "Failed to load!!!");
-return false;
-}
-return true;
+orcus::orcus_csv filter(&aFactory);
+return loadFileContent(rDoc, rMedium, filter);
 }
 
 bool ScOrcusFiltersImpl::importGnumeric(ScDocument& rDoc, SfxMedium& rMedium) 
const
@@ -135,42 +123,18 @@ bool ScOrcusFiltersImpl::importXLSX(ScDocument& rDoc, 
SfxMedium& rMedium) const
 {
 ScOrcusFactory aFactory(rDoc);
 aFactory.setStatusIndicator(getStatusIndicator(rMedium));
-OString aSysPath = toSystemPath(rMedium.GetName());
-const char* path = aSysPath.getStr();
-
-try
-{
-orcus::orcus_xlsx filter(&aFactory);
-filter.read_file(path);
-}
-catch (const std::exception& e)
-{
-SAL_WARN("sc", "Unable to load xlsx file! " << e.what());
-return false;
-}
 
-return true;
+orcus::orcus_xlsx filter(&aFactory);
+return loadFileContent(rDoc, rMedium, filter);
 }
 
 bool ScOrcusFiltersImpl::importODS(ScDocument& rDoc, SfxMedium& rMedium) const
 {
 ScOrcusFactory aFactory(rDoc);
 aFactory.setStatusIndicator(getStatusIndicator(rMedium));
-OString aSysPath = toSystemPath(rMedium.GetName());
-const char* path = aSysPath.getStr();
-
-try
-{
-orcus::orcus_ods filter(&aFactory);
-filter.read_file(path);
-}
-catch (const std::exception& e)
-{
-SAL_WARN("sc", "Unable to load ods file! " << e.what());
-return false;
-}
 
-return true;
+orcus::orcus_ods filter(&aFactory);
+return loadFileContent(rDoc, rMedium, filter);
 }
 
 bool ScOrcusFiltersImpl::importODS_Styles(ScDocument& rDoc, OUString& aPath) 
const
commit b5cfd3584b94e4562ac77d30e9fe3b0ba8cb6b3e
Author: Kohei Yoshida 
Date:   Thu Dec 7 21:27:20 2017 -0500

Remove code duplicates.

Change-Id: I424e5999ef2ec6e71f6b6361ed91079b8d949555

diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx 
b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index 6fc115bdce29..1773caa22330 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -55,6 +55,35 @@ uno::Reference 
getStatusIndicator(const SfxMedium& rMedi
 return xStatusIndicator;
 }
 
+bool loadFileContent(ScDocument& rDoc, SfxMedium& rMedium, 
orcus::iface::import_filter& filter)
+{
+SvStream* pStream = rMedium.GetInStream();
+pStream->Seek(0);
+static const size_t nReadBuffer = 1024*32;
+OStringBuffer aBuffer((int(nReadBuffer)));
+size_t nRead = 0;
+do
+{
+char pData[nReadBuffer];
+nRead = pStream->ReadBytes(pData, nReadBuffer);
+aBuffer.append(static_cast(pData), nRead);
+}
+while (nRead == nReadBuffer);
+
+try
+{
+rDoc.ClearTabs();
+filter.read_stream(aBuffer.getStr(), aBuffer.getLength());
+}
+catch (const std::exception& e)
+{
+SAL_WARN("sc", "Unable to load file via orcus filter! " << e.what());
+return false;
+}
+
+return true;
+}
+
 }
 
 OString ScOrcusFiltersImpl::toSystemPath(const OUString& rPath)
@@ -88,64 +117,18 @@ bool ScOrcusFiltersImpl::importGnumeric(ScDocument& rDoc, 
SfxMedium& rMedium) co
 {
 ScOrcusFactory aFactory(rDoc);
 aFactory.setStatusIndicator(getStatusIndicator(rMedium));
-SvStream* pStream = rMedium.GetInStream();
-pStream->Seek(0);
-static const size_t nReadBuffer = 1024*32;
-OStringBuffer aBuffer((int(nReadBuffer)));
-size_t nRead = 0;
-do
-{
-char pData[nReadBuffer];
-nRead = pStream->ReadBytes(pData, nReadBuffer);
-aBuffer.append(static_cast(pData), nRead);
-}
-while (nRead == nReadBuffer);
-
-try
-{
-rDoc.ClearTabs();
-orcus::orcus_gnumeric filter(&aFactory);
-filter.read_stream(aBuffer.getStr(), aBuffer.getLength());
-}
-cat

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

2017-12-07 Thread Eike Rathke
 sc/source/ui/unoobj/chart2uno.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2f4832a31d1e81ffbe043d9bb1d0816a03b8d137
Author: Eike Rathke 
Date:   Fri Dec 8 00:04:31 2017 +0100

Key must be sal_uInt32 instead of sal_Int16 SCCOL, tdf#113861 follow-up

FormulaTokenMapMap key is bit masked left shifted tab value plus
column value.

And as FormulaTokenMap key was changed from sal_uInt32 to SCROW
(which is correct), use that type when assigning.

Change-Id: I4c76330378e64cb7dc06a956cbf2c23f4428b658
(cherry picked from commit 78a3f7e10e650bc464202dacd131f9c3b0ddfcdf)
Reviewed-on: https://gerrit.libreoffice.org/46061
Reviewed-by: Eike Rathke 
Tested-by: Jenkins 

diff --git a/sc/source/ui/unoobj/chart2uno.cxx 
b/sc/source/ui/unoobj/chart2uno.cxx
index 4728efe7ae3c..f42fd4f1fff6 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -242,7 +242,7 @@ vector TokenTable::getAllRanges() const
 }
 
 typedef std::map FormulaTokenMap;
-typedef std::map FormulaTokenMapMap;
+typedef std::map FormulaTokenMapMap;
 
 class Chart2PositionMap
 {
@@ -805,7 +805,7 @@ void Chart2Positioner::createPositionMap()
 FormulaTokenMap* pFirstCol = pCols->begin()->second;
 for (FormulaTokenMap::const_iterator it1 = pFirstCol->begin(); it1 
!= pFirstCol->end(); ++it1)
 {
-sal_uInt32 nKey = it1->first;
+SCROW nKey = it1->first;
 for (FormulaTokenMapMap::const_iterator it2 = pCols->begin(); 
it2 != pCols->end(); ++it2)
 {
 pCol = it2->second;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-12-07 Thread Caolán McNamara
 sc/source/ui/unoobj/chart2uno.cxx |   20 +---
 1 file changed, 13 insertions(+), 7 deletions(-)

New commits:
commit 83c1260a70b5b440522a1e9b88eb82456896c270
Author: Caolán McNamara 
Date:   Mon Dec 4 15:24:20 2017 +

assert on export of fdo69698-1.ods to pdf

since...

commit 3af8a4faf5e20ccae2386052697713da160afb16
Date:   Wed Nov 15 13:10:40 2017 +0300

tdf#113861: Less aggressive expansion of chart headers.

In this example

nAllColCount is 3, nAllRowCount is 5, the columns available are 0, 1, 4 and 
the
rows are 20, 21, 22, 25, 26. So I assume, comparing to the original version,
that its not the actual row and column we want, but the index of the 
row/column
into the range provided

Change-Id: I568c561a8c5f0b2ee84590293bed8e302d5dda75
Reviewed-on: https://gerrit.libreoffice.org/45811
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 2074a3785371692dcfb86f45204f3707cbac1eec)
Reviewed-on: https://gerrit.libreoffice.org/45944
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/sc/source/ui/unoobj/chart2uno.cxx 
b/sc/source/ui/unoobj/chart2uno.cxx
index 71c3c96f83c0..4728efe7ae3c 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -290,18 +290,24 @@ Chart2PositionMap::Chart2PositionMap(SCCOL nAllColCount,  
SCROW nAllRowCount,
 {
 //check whether there is more than one text column or row that should 
be added to the headers
 SCROW nMaxHeaderRow = nAllRowCount;
-for ( const auto & rCol : rCols )
+SCCOL nCol = 0;
+for (auto it = rCols.begin(); it != rCols.end(); ++it, ++nCol)
 {
 // Skip header columns
-if ( rCol.first < nHeaderColCount )
+if (nCol < nHeaderColCount)
 continue;
 
+const auto& rCol = *it;
+
 bool bFoundValuesInCol = false;
 bool bFoundAnythingInCol = false;
-for ( const auto & rCell : *rCol.second )
+SCROW nRow = 0;
+for (auto it2 = rCol.second->begin(); it2 != rCol.second->end(); 
++it2, ++nRow)
 {
+const auto& rCell = *it2;
+
 // Skip header rows
-if (rCell.first < nHeaderRowCount || !rCell.second)
+if (nRow < nHeaderRowCount || !rCell.second)
 continue;
 
 ScRange aRange;
@@ -319,7 +325,7 @@ Chart2PositionMap::Chart2PositionMap(SCCOL nAllColCount,  
SCROW nAllRowCount,
 {
 // Found some numeric data
 bFoundValuesInCol = true;
-nMaxHeaderRow = std::min(nMaxHeaderRow, nRow1);
+nMaxHeaderRow = std::min(nMaxHeaderRow, nRow);
 break;
 }
 if ( pDoc->HasData( nCol1, nRow1, nTab1 ) )
@@ -330,11 +336,11 @@ Chart2PositionMap::Chart2PositionMap(SCCOL nAllColCount,  
SCROW nAllRowCount,
 else
 {
 // If cell is empty, it belongs to data
-nMaxHeaderRow = std::min(nMaxHeaderRow, nRow1);
+nMaxHeaderRow = std::min(nMaxHeaderRow, nRow);
 }
 }
 
-if (nHeaderColCount && !bFoundValuesInCol && bFoundAnythingInCol 
&& rCol.first == nHeaderColCount)
+if (nHeaderColCount && !bFoundValuesInCol && bFoundAnythingInCol 
&& nCol == nHeaderColCount)
 {
 // There is no values in row, but some data. And this column 
is next to header
 // So lets put it to header
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Updating Spanish dictionary in Gerrit

2017-12-07 Thread Ricardo Palomares Martínez
Hi,

When we released version 2.2 of Spanish Dictionary in RLA-ES
(https://github.com/sbosio/rla-es/), we had some problems uploading
the extension to the LO extensions site (because we used to upload
more than 20 OXT as part of each new version, which was no longer
feasible after LO extensions website revamp), and, in the end, I
forgot to update the general OXT in LO repository.

It has been a long time since our last release and it is time to push
a new version, although it will take some weeks to sort and prepare
the new version. In the meantime, I'd like to push the current last
release to LO repository. I'm following our own how-to, which involves
typing this in the LO dictionaries repository:

gitdir=$(git rev-parse --git-dir); scp -p -P 29418
gerritu...@gerrit.libreoffice.org:hooks/commit-msg ${gitdir}/hooks/

replacing the .aff and .dic files (no changes in the other dictionary
files), commit the changes and write to this list.

However, I have a link in our how-to to
https://wiki.documentfoundation.org/Development/Dictionaries and that
page no longer exists, so I wonder if the procedure is still valid, or
something has changed and, due to it, I have stopped before committing
the changes. I have a Gerrit user (RickieES) and my local clone of
dictionaries has been brought up to date before following the above
steps. Is it still OK if I commit and push the changes and write it here?

TIA

-- 
Ricardo Palomares (RickieES)
https://github.com/RickieES
https://sourceforge.net/u/rpalomares/profile
http://stackoverflow.com/users/1185157/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] translations.git: Changes to 'refs/tags/libreoffice-6.0.0.0.beta2'

2017-12-07 Thread Christian Lohmaier
Tag 'libreoffice-6.0.0.0.beta2' created by Christian Lohmaier 
 at 2017-12-07 23:26 +

Tag libreoffice-6.0.0.0.beta2
-BEGIN PGP SIGNATURE-

iQIcBAABAgAGBQJaKc4qAAoJEPQ0oe+v7q6j/8wQAJh0PbMHJ024UZawdVpACYG2
JeZAvKjcaoEd1sI82YoOLJI38tUVKuXfV6PEbVtFFdW0eyd4RzNiO4o4koqqk5dR
p+2f6GrD+hivbNBKz6ePRPWnkiCQdI/E5hH3eX8qQTTrDResbNa6bmq181JHbFU9
0kM6PSGsmGQzNGDbGjj3Fjef2zrXauN9otMGXj6aNOEyxy6PbzSdYdr7JNqoJXKf
efyi9bggfkzS5BM99/0/TaZLe8+LYwVdEn+98ujMj1hHomPozqxNhwLFBWCQdjLP
y9PkoAJ+XR+1z1ZAkTY0015jwmK3K5Ral8inIK7QbJTAg8tykIPNNCoaYvDradyi
Cu6iajdnPtlhJc/VbbGbQji72QdlTTnpY7+4m1StHHEvzKc4j1bnyHbUZftkiWpo
Z4knnOkyt5BUCCE8/h87kluzqW0M+bWYUNe1vkwTk25GvPEmYCC9g/MvkDmkeXws
BK8LsfJwTc4yjSecd/lOFLJUaeFyGWTFodDiW0ZUMkY1UUTVzfbPhTx2dD6KZre2
w0AiaEDklJ/Y41rtkU68DcWYnL5wOEJ9JE5cMIzLVIJSBgFXje0y50n1CbnNTD36
lBawvmOx4HibXQxhaErspOQJqXz9SC7M3Bjy36WFi2F+SbY9YsFjmbBwxVWZFZIk
JTenaNp1B2YBsA1RFXQT
=E2Up
-END PGP SIGNATURE-

Changes since libreoffice-6-0-branch-point-4:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/tags/libreoffice-6.0.0.0.beta2'

2017-12-07 Thread Christian Lohmaier
Tag 'libreoffice-6.0.0.0.beta2' created by Christian Lohmaier 
 at 2017-12-07 23:26 +

Tag libreoffice-6.0.0.0.beta2
-BEGIN PGP SIGNATURE-

iQIcBAABAgAGBQJaKc4tAAoJEPQ0oe+v7q6jWtIQANIrT8SFrjo2MaBtjKnXHU5Q
OzLZG9xlpmfYtd4bVF1LUwIzQ3T/sz5LDPxiRrjunwR+9G6luYRgoyw0xEe1BuM5
5BpVlIBxA70bWyhvlRaNk0y5xsH/PXjfB/BubSQ6ptTz89zR4Zos2jfBWJjNQ1aH
4O0JMv4ej4ugbCJzzSNkCrg8NGQ9KqGLFWjAHEZEV9LAq4b+QGsNHB9SGgnkx/FP
5VHfhBiP5b3701RMv17DoicC7uik9tM0XuQrohSyBal5KiVmGsS2imQ1ecraKZEk
hoZ2mSIJ8OK3/3qm2gHverGnPxrOIu04Ikds4bPo4qZqbk6k0jrSsJm4MeqAQ1mE
4eaSEIrA+MwqxIX59lW1aBjoJnT0iPKAFMtrm46T+44j8ZQURtMaEXmnNeO+7TFS
H30Hn0qhCKP3+3lK+Q6Gi0Gj6il8f5kSTMLu6m2Q9sqq1ZA7Tx9hCqivkC46Fk0i
4Se5a5+YCgmYAXIBf5waVhEawwG4iyLNk5qpsm8197G5tX7FgekHStrf9oEGKofZ
N+EgeDQKDZbsbrWMbHQEDMhgjm+54NidhzuImepPCdPfcrbxtGkS8r9+ZZ0UTvCN
iulwr23+MIitT33fSDXYuF/mH4q3k9nL4VD2GGXwBvViijF/2S3NDds4+7sZpUYK
b1Pw05VLzNtWNdKRSlww
=EYKt
-END PGP SIGNATURE-

Changes since libreoffice-6-0-branch-point-144:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dictionaries.git: Changes to 'refs/tags/libreoffice-6.0.0.0.beta2'

2017-12-07 Thread Christian Lohmaier
Tag 'libreoffice-6.0.0.0.beta2' created by Christian Lohmaier 
 at 2017-12-07 23:26 +

Tag libreoffice-6.0.0.0.beta2
-BEGIN PGP SIGNATURE-

iQIcBAABAgAGBQJaKc4jAAoJEPQ0oe+v7q6jWdEP/RuDh5CQMBnBhyiCoApKHFkY
QiCF0xMSUQo3jQTksCmAHmFwTFsxgKNNl0fRVa6Qh/2rItJYUdfh4wzDR3myoYj8
KkSHwGeVOOOrz6OYxXyRy8qx+gsX7WUttgrRFdI3Mm+6+ti5uQQ8kjy+KqNbSnbk
+JJxGQjgg91jrIO8E6ed/Qo6Yvq3f/HyBDzwkADp1edKSiznPNaXurDOIjf9d66A
2Tn8euF2enguJJdAjhrJl+dCcYoeCl2+mGUU3VSGdtfKaD+TKyP7048sF9qEMMj6
JweLtVUujKNBDE01N55CIxDnv4BhxmewtDvY3m9QBw0kH3X/lmrL/cXkNg6F3oxx
47au5Zviy9OOFA929g8GAWuVrXHYcBD6X4bap+f14QJOHEDXGKmKCkD3aHmd3yxn
58m5WszB5yMGQpklNsnQ+1lgsS6cyb069CwgWqabpBpBjE9h0ch9dZKP1vbM5Mn/
Zgv/gpvgckKN9bq47cZUEX4OuA08ULLuXou/ueQSCOyXtzIR4esifB4qJduH8hpX
6T2J4gy7rvRIjy7M2Owr/vHctccqjdoEx6Cmo/BdGIJSvmeYgPcbpNyKy/ZjDmPB
RTwcnQkwJJg8T7VXlXGUvknPXZ5DoM+Z1SCsMvd0rC+q68H9pAXvBM4lENwdRGTW
TyEuxOTQ1xyhFUQSslNr
=+BC7
-END PGP SIGNATURE-

Changes since libreoffice-6-0-branch-point-1:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Changes to 'refs/tags/libreoffice-6.0.0.0.beta2'

2017-12-07 Thread Christian Lohmaier
Tag 'libreoffice-6.0.0.0.beta2' created by Christian Lohmaier 
 at 2017-12-07 23:26 +

Tag libreoffice-6.0.0.0.beta2
-BEGIN PGP SIGNATURE-

iQIcBAABAgAGBQJaKc4nAAoJEPQ0oe+v7q6jTMoP/1nvJk2WYviJW7u77ZHav5DN
Ry+T8JTYRUBGyBBfeSycvc3JovcnQQrjtW0jinMuB/huYVfI2RZgS3olnwkTHmr9
ZnY4afhMtIoK9/zu459++DxNI1MsyDmeuKJxfG+4rJkEURUbvCn8o8mDVjQPh/G6
+gLE8d4Lap8h2GE18cvCe/ZPIEq9Y/OH2GzTYGdPQMaRuBPR9n4z1a3ytqlT
KuSm1fZ3/GqOm4xkhVpK1eVsm/O8PVrdzd2Qnu80IsqmdmQKGlxX31SA9QzcYMkc
lRCrKJDbcpsmK5oXHS/5WeM7L9jmWOAXsXC5Z3IpYrecdL7qHRochyamrbk6kW8E
iCbxtLOz4ag2fuqRaR3fmt9WjiHwYI9Gf11ZY7w1GwZFT9zsKfBxzlKGSx+Y0Gma
ZSEoH6BtioZxalXAStKi4YCVDaylCs6J4O6hxHTDnksCSu+vq2G/b1Xti2M2aBVQ
NVEaB0aLpf7sQPGTp8+X1pu8QisZG7Ozh+ci2BS69WlTLaeB+aw7vm07ag4LbyP0
W4xiRR+0aKZInzrJR+oEFy44l7A8WALwzUNl8vFAnAZY9ljQIDZdS0zuiVjFdMi+
nl+8jm6gIW+aB0SHx/l8/G0iWZmHd3u89DL1IPJxSMZ7UOGv3Sw0wddnwt/4Sfnz
Gt3Zgkm/eFHCRejUZTnG
=LO4U
-END PGP SIGNATURE-

Changes since libreoffice-6-0-branch-point-12:
---
 0 files changed
---
___
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' - configure.ac

2017-12-07 Thread Christian Lohmaier
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit abf26b0168dd19ff3f8a8656e92b23c9d49ea61e
Author: Christian Lohmaier 
Date:   Fri Dec 8 00:27:22 2017 +0100

bump product version to 6.0.0.0.beta2+

Change-Id: I01c100673afa24e44c97b94bf2597ed7e8cb0c8d

diff --git a/configure.ac b/configure.ac
index e5afc95810aa..768a32c6c30f 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([LibreOffice],[6.0.0.0.beta1+],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.0.0.0.beta2+],[],[],[http://documentfoundation.org/])
 
 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: Branch 'libreoffice-6-0' - setup_native/source

2017-12-07 Thread heiko tietze
 setup_native/source/packinfo/DS_Store  |binary
 setup_native/source/packinfo/DS_Store_Dev  |binary
 setup_native/source/packinfo/osxdndinstall.png |binary
 3 files changed

New commits:
commit 2e368c5946ba1e608ff263e5892b10d02c90275b
Author: heiko tietze 
Date:   Thu Dec 7 17:01:05 2017 +0100

macOS installer bitmap for master

Change-Id: I64f75cf6da59de1238a90cb8a07b911b07baccfb
Reviewed-on: https://gerrit.libreoffice.org/46030
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 
(cherry picked from commit 12b389e838743dec662c70c4772553a96ad4f9ac)
Reviewed-on: https://gerrit.libreoffice.org/46059

diff --git a/setup_native/source/packinfo/DS_Store 
b/setup_native/source/packinfo/DS_Store
index d519d7367040..7a4a354c9715 100644
Binary files a/setup_native/source/packinfo/DS_Store and 
b/setup_native/source/packinfo/DS_Store differ
diff --git a/setup_native/source/packinfo/DS_Store_Dev 
b/setup_native/source/packinfo/DS_Store_Dev
index 2a6fcf9d71e5..5d914b18e6fa 100644
Binary files a/setup_native/source/packinfo/DS_Store_Dev and 
b/setup_native/source/packinfo/DS_Store_Dev differ
diff --git a/setup_native/source/packinfo/osxdndinstall.png 
b/setup_native/source/packinfo/osxdndinstall.png
index d5f40b3804dd..d12836f0a6a9 100644
Binary files a/setup_native/source/packinfo/osxdndinstall.png and 
b/setup_native/source/packinfo/osxdndinstall.png differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-12-07 Thread heiko tietze
 setup_native/source/packinfo/DS_Store  |binary
 setup_native/source/packinfo/DS_Store_Dev  |binary
 setup_native/source/packinfo/osxdndinstall.png |binary
 3 files changed

New commits:
commit 12b389e838743dec662c70c4772553a96ad4f9ac
Author: heiko tietze 
Date:   Thu Dec 7 17:01:05 2017 +0100

macOS installer bitmap for master

Change-Id: I64f75cf6da59de1238a90cb8a07b911b07baccfb
Reviewed-on: https://gerrit.libreoffice.org/46030
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/setup_native/source/packinfo/DS_Store 
b/setup_native/source/packinfo/DS_Store
index d519d7367040..7a4a354c9715 100644
Binary files a/setup_native/source/packinfo/DS_Store and 
b/setup_native/source/packinfo/DS_Store differ
diff --git a/setup_native/source/packinfo/DS_Store_Dev 
b/setup_native/source/packinfo/DS_Store_Dev
index 2a6fcf9d71e5..5d914b18e6fa 100644
Binary files a/setup_native/source/packinfo/DS_Store_Dev and 
b/setup_native/source/packinfo/DS_Store_Dev differ
diff --git a/setup_native/source/packinfo/osxdndinstall.png 
b/setup_native/source/packinfo/osxdndinstall.png
index d5f40b3804dd..d12836f0a6a9 100644
Binary files a/setup_native/source/packinfo/osxdndinstall.png and 
b/setup_native/source/packinfo/osxdndinstall.png differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/CppunitTest_sc_chart2dataprovider.mk sc/inc sc/Module_sc.mk sc/qa

2017-12-07 Thread Eike Rathke
 dev/null|binary
 sc/CppunitTest_sc_chart2dataprovider.mk |  122 
 sc/Module_sc.mk |1 
 sc/inc/chart2uno.hxx|2 
 sc/qa/unit/chart2dataprovider.cxx   |  122 
 5 files changed, 1 insertion(+), 246 deletions(-)

New commits:
commit 7a9bd8f3345e680bfbefe949da1bd1fbcc38b615
Author: Eike Rathke 
Date:   Fri Dec 8 01:18:58 2017 +0200

Revert "tdf#113861: Unittest for chart datatable labels expansion"

This reverts commit 51cdf6248dbdf7a5dcddd2128bbb8f889cec25d6.

It breaks all Linux debug builds.
To be investigated.

Change-Id: Ic0cd080e249aff80b73f2338ab5aae4b32f97793
Reviewed-on: https://gerrit.libreoffice.org/46058
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/sc/CppunitTest_sc_chart2dataprovider.mk 
b/sc/CppunitTest_sc_chart2dataprovider.mk
deleted file mode 100644
index 7ef131b7f147..
--- a/sc/CppunitTest_sc_chart2dataprovider.mk
+++ /dev/null
@@ -1,122 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_CppunitTest_CppunitTest,sc_chart2dataprovider))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sc_chart2dataprovider, \
-sc/qa/unit/chart2dataprovider \
-))
-
-$(eval $(call gb_CppunitTest_use_externals,sc_chart2dataprovider, \
-   boost_headers \
-   mdds_headers \
-   libxml2 \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,sc_chart2dataprovider, \
-basegfx \
-comphelper \
-cppu \
-cppuhelper \
-drawinglayer \
-editeng \
-for \
-forui \
-i18nlangtag \
-msfilter \
-oox \
-sal \
-salhelper \
-sax \
-sb \
-sc \
-scqahelper \
-sfx \
-sot \
-subsequenttest \
-svl \
-svt \
-svx \
-svxcore \
-   test \
-tk \
-tl \
-ucbhelper \
-   unotest \
-utl \
-vbahelper \
-vcl \
-xo \
-   $(gb_UWINAPI) \
-))
-
-$(eval $(call gb_CppunitTest_set_include,sc_chart2dataprovider,\
--I$(SRCDIR)/sc/source/ui/inc \
--I$(SRCDIR)/sc/inc \
-$$(INCLUDE) \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,sc_chart2dataprovider))
-
-$(eval $(call gb_CppunitTest_use_ure,sc_chart2dataprovider))
-$(eval $(call gb_CppunitTest_use_vcl,sc_chart2dataprovider))
-
-$(eval $(call gb_CppunitTest_use_components,sc_chart2dataprovider,\
-   basic/util/sb \
-chart2/source/chartcore \
-chart2/source/controller/chartcontroller \
-comphelper/util/comphelp \
-configmgr/source/configmgr \
-dbaccess/util/dba \
-embeddedobj/util/embobj \
-eventattacher/source/evtatt \
-filter/source/config/cache/filterconfig1 \
-forms/util/frm \
-framework/util/fwk \
-i18npool/source/search/i18nsearch \
-i18npool/util/i18npool \
-linguistic/source/lng \
-oox/util/oox \
-package/source/xstor/xstor \
-package/util/package2 \
-sax/source/expatwrap/expwrap \
-scaddins/source/analysis/analysis \
-scaddins/source/datefunc/date \
-sc/util/sc \
-sc/util/scfilt \
-sfx2/util/sfx \
-sot/util/sot \
-svl/util/svl \
-svl/source/fsstor/fsstorage \
-svtools/util/svt \
-toolkit/util/tk \
-ucb/source/core/ucb1 \
-ucb/source/ucp/file/ucpfile1 \
-ucb/source/ucp/tdoc/ucptdoc1 \
-unotools/util/utl \
-unoxml/source/rdf/unordf \
-unoxml/source/service/unoxml \
-uui/util/uui \
-xmloff/util/xo \
-xmlsecurity/util/xmlsecurity \
-))
-
-ifeq ($(OS),WNT)
-$(eval $(call gb_CppunitTest_use_components,sc_chart2dataprovider,\
-xmlsecurity/util/xsec_xmlsec.windows \
-))
-else
-$(eval $(call gb_CppunitTest_use_components,sc_chart2dataprovider,\
-xmlsecurity/util/xsec_xmlsec \
-))
-endif
-
-$(eval $(call gb_CppunitTest_use_configuration,sc_chart2dataprovider))
-
-# vim: set noet sw=4 ts=4:
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index dc60e9d1d049..ae9a2c4e89af 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -144,7 +144,6 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sc,\
CppunitTest_sc_headerfootercontentobj \
CppunitTest_sc_recentfunctionsobj \
CppunitTest_sc_functionlistobj \
-   CppunitTest_sc_chart2dataprovider \
 ))
 
 $(eval $(call gb_Module_add_perfcheck_targets,sc,\
diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx
index fb19a502a4c9..795561b642fa 100644
--- a/sc/inc/chart2uno.hxx
+++ b/sc/inc/chart2uno.hxx
@@ -53,7 +53,7 @@
 class ScDocument;
 
 // DataProvider
-class SC_DLLPUBLIC ScChart2DataProvider : public
+class ScChart2DataProvider : public
 ::cppu::WeakImplHelper<
 

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

2017-12-07 Thread Julien Nabet
 sw/source/uibase/shells/textsh1.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 447c052d5c074f923fb04e086c9da0340eecb6bd
Author: Julien Nabet 
Date:   Thu Dec 7 22:23:02 2017 +0100

Disabled slot with Put leaks entry (textsh1/sw)

Same as 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=21dde7a09e2cfe7b48d2fec1edc7a94fa94af5c3

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

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 246d2958f212..7a83cc9408c6 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1415,18 +1415,18 @@ void SwTextShell::GetState( SfxItemSet &rSet )
 LanguageType nLang = rSh.GetCurLang();
 LanguageTag aLanguageTag( nLang);
 lang::Locale aLocale( aLanguageTag.getLocale());
-OUString aLangText( aLanguageTag.getBcp47() );
-
-// set word and locale to look up as status value
-OUString aStatusVal = aText + "#" + aLangText;
-
-rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
 
 // disable "Thesaurus" context menu entry if there is nothing to 
look up
 uno::Reference< linguistic2::XThesaurus >  xThes( ::GetThesaurus() 
);
 if (aText.isEmpty() ||
 !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( 
aLocale ))
 rSet.DisableItem( SID_THES );
+else
+{
+// set word and locale to look up as status value
+OUString aStatusVal = aText + "#" + aLanguageTag.getBcp47();
+rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
+}
 }
 break;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-12-07 Thread Eike Rathke
 sc/source/ui/unoobj/chart2uno.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 78a3f7e10e650bc464202dacd131f9c3b0ddfcdf
Author: Eike Rathke 
Date:   Fri Dec 8 00:04:31 2017 +0100

Key must be sal_uInt32 instead of sal_Int16 SCCOL, tdf#113861 follow-up

FormulaTokenMapMap key is bit masked left shifted tab value plus
column value.

And as FormulaTokenMap key was changed from sal_uInt32 to SCROW
(which is correct), use that type when assigning.

Change-Id: I4c76330378e64cb7dc06a956cbf2c23f4428b658

diff --git a/sc/source/ui/unoobj/chart2uno.cxx 
b/sc/source/ui/unoobj/chart2uno.cxx
index 4728efe7ae3c..f42fd4f1fff6 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -242,7 +242,7 @@ vector TokenTable::getAllRanges() const
 }
 
 typedef std::map FormulaTokenMap;
-typedef std::map FormulaTokenMapMap;
+typedef std::map FormulaTokenMapMap;
 
 class Chart2PositionMap
 {
@@ -805,7 +805,7 @@ void Chart2Positioner::createPositionMap()
 FormulaTokenMap* pFirstCol = pCols->begin()->second;
 for (FormulaTokenMap::const_iterator it1 = pFirstCol->begin(); it1 
!= pFirstCol->end(); ++it1)
 {
-sal_uInt32 nKey = it1->first;
+SCROW nKey = it1->first;
 for (FormulaTokenMapMap::const_iterator it2 = pCols->begin(); 
it2 != pCols->end(); ++it2)
 {
 pCol = it2->second;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


pre-init / strings ...

2017-12-07 Thread Michael Meeks
Hi there,

Its been a long while since I discussed a patch on the dev list - 
perhaps gerrit killed this pleasure for the most part. But - lets try it. 
Please reply-to-all, so I can respond in a timely way :-)

Anyhow - the appended is perhaps worth some discussion. I just fwd. 
ported it blind from our 5.3 branch; I hope the intention is at least 
reasonably clear (although the extern "C" stuff is a mess to get around some 
hard to explain internal linking oddness).

The basic problem is this - LOOL pre-initializes LibreOffice before 
forking to ensure that lots of the memory is shared copy-on-write between it 
and the child processes. That works reasonably well, but unfortunately - when 
we re-use strings from that corpus - we tend to touch the ref-counts, which 
causes lots of page dirtying.

I've written a tool 'loolmap' that shows that - and dumps the memory 
that is not-shared with the parent process loading a trivial 'hello world' 
document into writer (from my master). The patch turns our base-line memory use 
for that from 17.6Mb to 14.1Mb - so saving around 3.5Mb per document; quite a 
win over a hundred documents eg. So its reasonably useful.

There are however some questions:

* a new sal entry point [!] - I guess it is hard to avoid this.

* should rtl_arena_foreach be public ?
+ perhaps - but it should be precise first; that would
  be far easier if the slab allocator was in fact a slab
  allocator - but could be done anyway.
+ currently it mashes the free-lists that are stored inside
  free blocks - so should be the last thing called before not
  using that arena anymore (matching the pre-init use-case 
nicely)

* are rtl_uString's -really- -that- big that they're worth saving ?
+ here is a loolmap dump of just two:

0x  20 00 00 00 00 00 00 00  02 00 00 00 05 00 00 00  4b 00 45 00 59 00 5f 
00  55 00 00 00 6f 72 6b 63  |  ...K.E.Y._.U...orkc
0x0020  20 00 00 00 00 00 00 00  02 00 00 00 05 00 00 00  4b 00 45 00 59 00 5f 
00  56 00 00 00 05 00 03 6a  |  ...K.E.Y._.V..j
 A. 64 bits of memory 'size'| B. ref-cnt| C. str-len | KE Y _   
   V   | random memory  |

+ so yes, we really do waste a chunk of RAM here, hence the 
TODO - in the patch, but then a slow but more efficient packing will save only 
a few Mb of RAM per-server rather than per-process: where the real wins are.

* can we do better on strings ?
+ it seems to me that storing the length of the memory block in 
64bits before, and then the length in chars in the immutable string in the 
middle is rather unfortunate.
+ unfortunately - OUStringBuffer mutates that length, and the 
current patch serves both OString and OUString with the same code.
+ we -could- use rtl_uStringBuffer_makeStringAndClear's 
inspired pCapacity pointer to get the previous size, and do something clever
=> that's more work though.

* can we do better with the mhu slab allocator ?
+ yes, make it a real slab allocator; if we have the size at 
free time, we should be able to have a simple bit-mask for the allocated blocks 
at an offset defined by the size of the objects in the slab.
=> this would also help for the rtl_arena_foreach being precise 
& perhaps usefully public.
+ it would mean we could allocate smaller than 32byte blocks of 
memory too.

Anyhow - thoughts appreciated; I'd like to get something that does 
something like this into master at some stage =)

ATB,

Michael.

>From d59e7909d15a150756e134719045e4fca07a48e7 Mon Sep 17 00:00:00 2001
From: Michael Meeks 
Date: Thu, 7 Dec 2017 21:19:09 +
Subject: [PATCH] sal: add pre-initialization scheme for allocations.

This saves several megabytes of dirtied pages for each LOK
client of Online.

Change-Id: I425a2e7896879f0a64d71fcc0655e9e1fa1256aa
---
 desktop/source/lib/init.cxx|  7 +
 include/rtl/alloc.h| 17 ++
 sal/qa/rtl/alloc/rtl_alloc.cxx | 70 ++
 sal/rtl/alloc_arena.cxx| 30 ++
 sal/rtl/alloc_arena.hxx|  8 +
 sal/rtl/alloc_cache.cxx| 20 
 sal/rtl/strimp.cxx | 68 
 sal/rtl/strimp.hxx |  6 
 sal/rtl/string.cxx |  6 ++--
 sal/rtl/strtmpl.cxx|  4 +--
 sal/rtl/ustring.cxx|  8 ++---
 sal/util/sal.map   |  5 +++
 12 files changed, 240 insertions(+), 9 deletions(-)

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index c4b922c75332..ae59c4b87d07 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3564,6 +3564,9 @@ static int lo_i

Crash test update

2017-12-07 Thread Crashtest VM
New crashtest update available at 
http://dev-builds.libreoffice.org/crashtest/ae17566542777ad55620f7d03b3dbf559a51da3f/


exportCrashes.csv
Description: Binary data


importCrash.csv
Description: Binary data


validationErrors.csv
Description: Binary data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - translations

2017-12-07 Thread Christian Lohmaier
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 796d7938e9e09837ca29bd8e757f63294e04650d
Author: Christian Lohmaier 
Date:   Thu Dec 7 22:21:48 2017 +0100

Updated core
Project: translations  624987b5ec5daaf270b065048dcf11f487edfd4d

update translations for 6.0 beta2

and force-fix errors using pocheck

Change-Id: I47e8da2f3c05fe79e9d5f79b5e1be051f479d567

diff --git a/translations b/translations
index fe37599d40a3..624987b5ec5d 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit fe37599d40a361181db11cf98bb1fb29d5c70f12
+Subproject commit 624987b5ec5daaf270b065048dcf11f487edfd4d
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-12-07 Thread Julien Nabet
 l10ntools/source/pocheck.cxx |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 96829f75aa29411060a60c45f9553be3722b5247
Author: Julien Nabet 
Date:   Thu Dec 7 20:40:18 2017 +0100

Replace list by vector in pocheck (l10ntools)

+ use for range loops which included std::list while at it.

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

diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx
index fbf42689082f..dc56014b083a 100644
--- a/l10ntools/source/pocheck.cxx
+++ b/l10ntools/source/pocheck.cxx
@@ -9,7 +9,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -21,7 +20,7 @@ static void checkStyleNames(const OString& aLanguage)
 {
 std::map aLocalizedStyleNames;
 std::map aLocalizedNumStyleNames;
-std::list repeatedEntries;
+std::vector repeatedEntries;
 
 OString aPoPath = OString(getenv("SRC_ROOT")) +
   "/translations/source/" +
@@ -106,8 +105,9 @@ static void checkStyleNames(const OString& aLanguage)
 aPoInput.readEntry(aPoEntry);
 if( aPoInput.eof() )
 break;
-for ( std::list::iterator it=repeatedEntries.begin(); 
it!=repeatedEntries.end(); ++it) {
-if (it->getMsgId() == aPoEntry.getMsgId() && it->getGroupId() == 
aPoEntry.getGroupId()) {
+for (auto const& repeatedEntry : repeatedEntries)
+{
+if (repeatedEntry.getMsgId() == aPoEntry.getMsgId() && 
repeatedEntry.getGroupId() == aPoEntry.getGroupId()) {
 bError = true;
 break;
 }
@@ -135,7 +135,7 @@ static void checkFunctionNames(const OString& aLanguage)
 std::map aLocalizedFunctionNames;
 std::map aLocalizedCoreFunctionNames;
 
-std::list repeatedEntries;
+std::vector repeatedEntries;
 
 OString aPoPaths[4];
 OUString aPoPathURL;
@@ -324,9 +324,9 @@ static void checkFunctionNames(const OString& aLanguage)
 aPoInput.readEntry(aPoEntry);
 if( aPoInput.eof() )
 break;
-for ( std::list::iterator it=repeatedEntries.begin(); 
it!=repeatedEntries.end(); ++it)
+for (auto const& repeatedEntry : repeatedEntries)
 {
-if (it->getMsgId() == aPoEntry.getMsgId() && it->getGroupId() 
== aPoEntry.getGroupId())
+if (repeatedEntry.getMsgId() == aPoEntry.getMsgId() && 
repeatedEntry.getGroupId() == aPoEntry.getGroupId())
 {
 bError = true;
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-12-07 Thread Andrea Gelmini
 vcl/source/gdi/CommonSalLayout.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9536b678c3829c3578ea41e23efdb0319d79288f
Author: Andrea Gelmini 
Date:   Thu Dec 7 00:33:50 2017 +0100

Fix typo

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

diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index 2f110b138a8a..76147a201eb8 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -869,7 +869,7 @@ void CommonSalLayout::ApplyDXArray(ImplLayoutArgs& rArgs)
 
 // Id this glyph is Kashida-justifiable, then mark this as a Kashida
 // position. Since this must be a RTL glyph, we mark the last glyph in
-// the cluster not the fisrt as this would be the base glyph.
+// the cluster not the first as this would be the base glyph.
 // nDiff > 1 to ignore rounding errors.
 if (bKashidaJustify && m_GlyphItems[i].AllowKashida() && nDiff > 1)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: officecfg/registry qadevOOo/tests sw/inc sw/qa sw/source sw/uiconfig

2017-12-07 Thread Yousuf Philips
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |8 

 qadevOOo/tests/java/ifc/style/_ParagraphProperties.java |8 

 qadevOOo/tests/java/mod/_sw/SwXParagraph.java   |2 +-
 sw/inc/poolfmt.hxx  |   10 
+-
 sw/inc/strings.hrc  |   10 
+-
 sw/qa/python/check_styles.py|2 +-
 sw/source/core/doc/SwStyleNameMapper.cxx|   10 
+-
 sw/source/ui/vba/vbastyles.cxx  |   10 
+-
 sw/uiconfig/sglobal/menubar/menubar.xml |4 ++--
 sw/uiconfig/swriter/menubar/menubar.xml |4 ++--
 sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui|4 ++--
 sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui   |4 ++--
 12 files changed, 38 insertions(+), 38 deletions(-)

New commits:
commit 74c527abc0f3b5aa0fa179401ad05a79dc889973
Author: Yousuf Philips 
Date:   Tue Dec 5 13:54:29 2017 +0400

tdf#106988 New names for the new numbering styles

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

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index d9225d631776..08127c537ee1 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -3121,7 +3121,7 @@
   11
 
   
-  
+  
 
   Number List
 
@@ -3134,13 +3134,13 @@
   Number List Style
 
 
-  .uno:StyleApply?Style:string=Numbering 
1&FamilyName:string=NumberingStyles
+  .uno:StyleApply?Style:string=Numbering 
123&FamilyName:string=NumberingStyles
 
 
   11
 
   
-  
+  
 
   Roman List
 
@@ -3153,7 +3153,7 @@
   Roman List Style
 
 
-  .uno:StyleApply?Style:string=Numbering 
4&FamilyName:string=NumberingStyles
+  .uno:StyleApply?Style:string=Numbering 
IVX&FamilyName:string=NumberingStyles
 
 
   11
diff --git a/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java 
b/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java
index 570e7b307ca6..d1f134b9f258 100644
--- a/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java
+++ b/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java
@@ -102,16 +102,16 @@ import com.sun.star.xml.AttributeData;
 public class _ParagraphProperties extends MultiPropertyTest {
 /**
  * Custom tester for numbering style properties. Switches between
- * 'Numbering 1' and 'Numbering 2' styles.
+ * 'Numbering 123' and 'Numbering ABC' styles.
  */
 protected PropertyTester NumberingStyleTester = new PropertyTester() {
 @Override
 protected Object getNewValue(String propName, Object oldValue)
   throws java.lang.IllegalArgumentException {
-if ((oldValue != null) && (oldValue.equals("Numbering 1"))) {
-return "Numbering 2";
+if ((oldValue != null) && (oldValue.equals("Numbering 123"))) {
+return "Numbering ABC";
 } else {
-return "Numbering 1";
+return "Numbering 123";
 }
 }
 };
diff --git a/qadevOOo/tests/java/mod/_sw/SwXParagraph.java 
b/qadevOOo/tests/java/mod/_sw/SwXParagraph.java
index 165e270454ef..c32d63b28527 100644
--- a/qadevOOo/tests/java/mod/_sw/SwXParagraph.java
+++ b/qadevOOo/tests/java/mod/_sw/SwXParagraph.java
@@ -196,7 +196,7 @@ public class SwXParagraph extends TestCase {
 
 portP = UnoRuntime.queryInterface(XPropertySet.class, port);
 paraP = UnoRuntime.queryInterface(XPropertySet.class, para);
-paraP.setPropertyValue("NumberingStyleName","Numbering 4");
+paraP.setPropertyValue("NumberingStyleName","Numbering IVX");
 nRules = paraP.getPropertyValue("NumberingRules");
 
 
diff --git a/sw/inc/poolfmt.hxx b/sw/inc/poolfmt.hxx
index 2ef34a0a9fa5..025ea9fc0b89 100644
--- a/sw/inc/poolfmt.hxx
+++ b/sw/inc/poolfmt.hxx
@@ -187,11 +187,11 @@ RES_POOLPAGE_END
 enum RES_POOL_NUMRULE_TYPE
 {
 RES_POOLNUMRULE_BEGIN = POOLGRP_NUMRULE,
-RES_POOLNUMRULE_NUM1 = RES_POOLNUMRULE_BEGIN,   ///< NumRule Numbering 1.
-RES_POOLNUMRULE_NUM2,   ///< NumRule Numbering 2.
-RES_POOLNUMRULE_NUM3,   ///< NumRule Numbering 3.
-RES_POOLNUMRULE_NUM4,   ///< NumRule Numbering 4.
-RES_POOLNUMRULE_NUM5,

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

2017-12-07 Thread Caolán McNamara
 sw/source/core/tox/ToxTextGenerator.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 534fd9aacd3eea10070a3ee88fc654eb9791aa24
Author: Caolán McNamara 
Date:   Wed Dec 6 17:05:24 2017 +

table of objects crashes on first update with object in document

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

diff --git a/sw/source/core/tox/ToxTextGenerator.cxx 
b/sw/source/core/tox/ToxTextGenerator.cxx
index 2aa7f657d82d..9acb74b6a772 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -303,8 +303,8 @@ ToxTextGenerator::HandleTextToken(const SwTOXSortTabBase& 
source, SwAttrPool& po
 if( source.aTOXSources.empty() )
 return result;
 
-const SwTextNode* pSrc = source.aTOXSources.at(0).pNd->GetTextNode();
-if (!pSrc->HasHints()) {
+const SwTextNode* pSrc = source.aTOXSources.front().pNd->GetTextNode();
+if (!pSrc || !pSrc->HasHints()) {
 return result;
 }
 const SwpHints& hints = pSrc->GetSwpHints();
___
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

2017-12-07 Thread Caolán McNamara
 sw/source/core/tox/ToxTextGenerator.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c4973602128209b8e39e26462c9e73a3bafe9ec1
Author: Caolán McNamara 
Date:   Wed Dec 6 17:05:24 2017 +

table of objects crashes on first update with object in document

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

diff --git a/sw/source/core/tox/ToxTextGenerator.cxx 
b/sw/source/core/tox/ToxTextGenerator.cxx
index 61b664e70c09..3742fd1e3cd0 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -303,8 +303,8 @@ ToxTextGenerator::HandleTextToken(const SwTOXSortTabBase& 
source, SwAttrPool& po
 if( source.aTOXSources.empty() )
 return result;
 
-const SwTextNode* pSrc = source.aTOXSources.at(0).pNd->GetTextNode();
-if (!pSrc->HasHints()) {
+const SwTextNode* pSrc = source.aTOXSources.front().pNd->GetTextNode();
+if (!pSrc || !pSrc->HasHints()) {
 return result;
 }
 const SwpHints& hints = pSrc->GetSwpHints();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/commonfuzzer.mk

2017-12-07 Thread Caolán McNamara
 vcl/commonfuzzer.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1bac5cde6d1e8878111325abb20c42ef660f3626
Author: Caolán McNamara 
Date:   Thu Dec 7 20:52:34 2017 +

fix fuzzer build

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

diff --git a/vcl/commonfuzzer.mk b/vcl/commonfuzzer.mk
index 06aa0be9a4eb..664e31e554c7 100644
--- a/vcl/commonfuzzer.mk
+++ b/vcl/commonfuzzer.mk
@@ -22,6 +22,7 @@ fuzzer_externals = \
 cairo \
 fontconfig \
 freetype \
+gpgmepp \
 icui18n \
 icuuc \
 icudata \
@@ -44,7 +45,6 @@ fuzzer_core_libraries = \
 avmedia \
 basegfx \
 canvastools \
-comphelper \
 configmgr \
 cppcanvas \
 dbtools \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-12-07 Thread Caolán McNamara
 sc/source/filter/xml/xmlcondformat.cxx |   17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

New commits:
commit 05f97ef127ec6ee0cc159fc74b4fecc34d9c684c
Author: Caolán McNamara 
Date:   Thu Dec 7 16:37:13 2017 +

coverity#1425723 silence 'Wrapper object use after free'

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

diff --git a/sc/source/filter/xml/xmlcondformat.cxx 
b/sc/source/filter/xml/xmlcondformat.cxx
index 1d2cab79dd76..4925563b1502 100644
--- a/sc/source/filter/xml/xmlcondformat.cxx
+++ b/sc/source/filter/xml/xmlcondformat.cxx
@@ -325,7 +325,16 @@ void SAL_CALL 
ScXMLConditionalFormatContext::endFastElement( sal_Int32 /*nElemen
 }
 }
 }
+}
+
+sal_uLong nIndex = pDoc->AddCondFormat(pFormat.release(), nTab);
+ScConditionalFormat* pInsertedFormat = 
pDoc->GetCondFormList(nTab)->GetFormat(nIndex);
+assert(pInsertedFormat && pInsertedFormat->GetKey() == nIndex);
 
+mrParent.mvCondFormatData.push_back( { pInsertedFormat, nTab } );
+
+if (bEligibleForCache)
+{
 // Not found in cache, replace oldest cache entry
 sal_Int64 nOldestAge = -1;
 size_t nIndexOfOldest = 0;
@@ -337,17 +346,11 @@ void SAL_CALL 
ScXMLConditionalFormatContext::endFastElement( sal_Int32 /*nElemen
 nIndexOfOldest = (&aCacheEntry - &mrParent.maCache.front());
 }
 }
-mrParent.maCache[nIndexOfOldest].mpFormat = pFormat.get();
+mrParent.maCache[nIndexOfOldest].mpFormat = pInsertedFormat;
 mrParent.maCache[nIndexOfOldest].mbSingleRelativeReference = 
bSingleRelativeReference;
 mrParent.maCache[nIndexOfOldest].mpTokens.reset(pTokens);
 mrParent.maCache[nIndexOfOldest].mnAge = 0;
 }
-
-sal_uLong nIndex = pDoc->AddCondFormat(pFormat.get(), nTab);
-(void) nIndex; // Avoid 'unused variable' warning when assert() expands to 
empty
-assert(pFormat->GetKey() == nIndex);
-
-mrParent.mvCondFormatData.push_back( { pFormat.release(), nTab } );
 }
 
 ScXMLConditionalFormatContext::~ScXMLConditionalFormatContext()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Let failed Jenkins builds set Verified: -1 in Gerrit?

2017-12-07 Thread Michael Stahl
On 01.12.2017 18:27, Norbert Thiebaud wrote:
> On Fri, Dec 1, 2017 at 1:32 AM, David Ostrovsky  wrote:
>> On Thu Nov 30 08:25:40 UTC 2017, Stephan Bergmann wrote:
>>
>>> Does "(with a help of maintainers)" imply that there are change
>>> owners who could not override a VRFY-1 from Jenkins themselves?
>>
>> Yes. I believe that "registered users" group members will not be
>> able to remove VRFY-1 vote.
> 
> I do not know of anyway, anyone can remove it using the ui, short of
> impersonating jenkins' user.
> 
> the only available way to remove the -1 is to rebase the patch, since
> hte -1 is bound to the particular patcheset version...
> then hope that jenkins will not put another -1, or at least quickly
> +2/+1 the rebased patch and submit... neither are desirable.
> 
> hence the choice of +1/0 rather than +1/-1 for jenkins.

so if the problem is that a -1 vote would block "submit" until it is
removed, and it can (because we don't want to give "admin" privs to
everyone) only be removed by the user that added the -1 vote, we could
add a "verified: -2" as a possible value that is never automatically
set, but only manually by somebody reviewing the build logs.

only the -2 would block "submit", the -1 could be overruled because it's
not the lowest value.

> For all practical purpose: 0 means jenkins has not yet try or was not
> successful.
> to submit one would have to manually add a verify +1. to do that you
> need to go the the change view, and jenkins activity or lack thereof
> is pretty apparent there.
> 
> I suspect the intent is to quicky avoid changeset that failed
> jenkins... but then whether the change set has failed or has not yet
> been built, what is the difference wrt to avoiding going in the
> details of the change ?
> from a review perspective no verification or failed verification means
> the same thing: not ready

on the other hand i agree with Norbert that there isn't all that much
benefit to be gained over the status quo.

mainly the benefit would be that you could see on the search page which
changes have finished build logs that need investigating, those would be
the "verified: -1" ones.

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


Re: Let failed Jenkins builds set Verified: -1 in Gerrit?

2017-12-07 Thread Eike Rathke
Hi,

On Friday, 2017-12-01 11:27:02 -0600, Norbert Thiebaud wrote:

> On Fri, Dec 1, 2017 at 1:32 AM, David Ostrovsky  wrote:
> > On Thu Nov 30 08:25:40 UTC 2017, Stephan Bergmann wrote:
> >>Does "(with a help of maintainers)" imply that there are change
> >>owners who could not override a VRFY-1 from Jenkins themselves?
> >
> > Yes. I believe that "registered users" group members will not be
> > able to remove VRFY-1 vote.
> 
> I do not know of anyway, anyone can remove it using the ui, short of
> impersonating jenkins' user.
> 
> the only available way to remove the -1 is to rebase the patch, since
> hte -1 is bound to the particular patcheset version...
> then hope that jenkins will not put another -1, or at least quickly
> +2/+1 the rebased patch and submit... neither are desirable.
> 
> hence the choice of +1/0 rather than +1/-1 for jenkins.

Wouldn't it be possible to have the Verify field be a set of -2/-1/0/+1,
with -2 being the sticky denial value, and let Jenkins set only -1 or +1?

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Care about Free Software, support the FSFE https://fsfe.org/support/?erack


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


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - 13 commits - comphelper/Library_comphelper.mk comphelper/source cui/source external/gpgmepp fpicker/source include/sal offapi/com offapi/UnoA

2017-12-07 Thread Thorsten Behrens
 comphelper/Library_comphelper.mk|1 
 comphelper/source/misc/storagehelper.cxx|  118 +++-
 cui/source/options/optgenrl.cxx |   22 +
 external/gpgmepp/ExternalProject_gpgmepp.mk |5 
 fpicker/source/office/OfficeControlAccess.cxx   |1 
 fpicker/source/win32/filepicker/VistaFilePicker.cxx |2 
 fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx |8 
 fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx |1 
 fpicker/source/win32/misc/resourceprovider.cxx  |3 
 include/sal/log-areas.dox   |1 
 offapi/UnoApi_offapi.mk |1 
 offapi/com/sun/star/embed/XEncryptionProtectedStorage.idl   |   31 ++
 offapi/com/sun/star/security/XDocumentDigitalSignatures.idl |2 
 offapi/com/sun/star/xml/crypto/GPGSEInitializer.idl |   37 ++
 package/inc/PackageConstants.hxx|1 
 package/inc/ZipPackage.hxx  |1 
 package/source/manifest/ManifestDefines.hxx |   13 
 package/source/manifest/ManifestExport.cxx  |  175 +++-
 package/source/xstor/xstorage.cxx   |   60 
 package/source/xstor/xstorage.hxx   |1 
 package/source/zippackage/ZipPackage.cxx|   25 +
 sfx2/source/dialog/filedlghelper.cxx|   22 +
 vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx|4 
 vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx|1 
 vcl/unx/gtk/fpicker/resourceprovider.cxx|1 
 vcl/unx/kde4/KDE4FilePicker.cxx |6 
 xmlsecurity/inc/certificatechooser.hxx  |2 
 xmlsecurity/inc/gpg/SEInitializer.hxx   |   22 +
 xmlsecurity/qa/unit/signing/data/badDsigGPG.odt |binary
 xmlsecurity/qa/unit/signing/data/badStreamGPG.odt   |binary
 xmlsecurity/qa/unit/signing/data/goodGPG.odt|binary
 xmlsecurity/qa/unit/signing/data/pubring.gpg|binary
 xmlsecurity/qa/unit/signing/data/random_seed|2 
 xmlsecurity/qa/unit/signing/data/secring.gpg|binary
 xmlsecurity/qa/unit/signing/data/trustdb.gpg|binary
 xmlsecurity/qa/unit/signing/data/untrustedGoodGPG.odt   |binary
 xmlsecurity/qa/unit/signing/signing.cxx |   91 ++
 xmlsecurity/source/component/documentdigitalsignatures.cxx  |   32 +-
 xmlsecurity/source/component/documentdigitalsignatures.hxx  |4 
 xmlsecurity/source/dialogs/certificatechooser.cxx   |   38 +-
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx  |   14 
 xmlsecurity/source/gpg/CertificateImpl.cxx  |6 
 xmlsecurity/source/gpg/SEInitializer.cxx|   39 ++
 xmlsecurity/source/xmlsec/xsec_xmlsec.cxx   |7 
 xmlsecurity/util/xsec_xmlsec.component  |3 
 45 files changed, 735 insertions(+), 68 deletions(-)

New commits:
commit fcc949fc94dc05c0562701dab58eb3ad6f1c2962
Author: Thorsten Behrens 
Date:   Thu Dec 7 19:38:10 2017 +0100

comphelper: fix windows build

Change-Id: I3241426674050c027e1b000b33fb284525a58cbb
(cherry picked from commit a9a4c26ed1365ffa089654fefc8fa2f29862b6c7)

diff --git a/comphelper/source/misc/storagehelper.cxx 
b/comphelper/source/misc/storagehelper.cxx
index 7fa46554b595..36641485fe2e 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -494,7 +494,7 @@ uno::Sequence< beans::NamedValue > 
OStorageHelper::CreateGpgPackageEncryptionDat
 // ctx is setup now, let's encrypt the lot!
 GpgME::Data plain(
 reinterpret_cast(aVector.getConstArray()),
-aVector.getLength(), false);
+size_t(aVector.getLength()), false);
 GpgME::Data cipher;
 
 GpgME::EncryptionResult crypt_res = ctx->encrypt(
commit 6e0d97d09c3cf387fe63aab679905c8845f6d1eb
Author: Thorsten Behrens 
Date:   Thu Dec 7 18:18:47 2017 +0100

gpg4libre: handle unavailable gpg crypto tools more gracefully

Change-Id: I58af9d38ea8d202d2bda64cdf45204646ac9fd29
(cherry picked from commit ed50a0a2ce51584fa3a8fba0094220a4bf25c650)

diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx 
b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index 9d1244973de7..dd7de2c3bafe 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -349,7 +349,7 @@ DocumentDigitalSignatures::ImplVerifySignatures(
 rSigInfo.CertificateStatus = 
css::security::CertificateValidity::INVALID;
 }
 }
-else // GPG
+ 

Re: Association between ToC index object and its paragraph content

2017-12-07 Thread Jens Tröger
Two things.  First, I had to call update() on the ToC document index
object in order to get all links in the document.  Second, calling
update() _duplicated_ each and every entry in the ToC which looks like a
bug to me (LO 5.3.6.1)…

I’m still curious though: iterating over the paragraphs, is there any
other indication than the par’s name that the par is in fact part of the
ToC index object?  

Cheers,
Jens


On Thu, Dec 07, 2017 at 07:40:35PM +1000, Jens Tröger wrote:
> Thanks Miklos,
> 
> Actually, what I find odd is that I don’t see any `text.HyperLinkURL` 
> attributes with internal references—all text portions in paragraphs of the 
> ToC are empty strings.
> 
> Yet, the document does have a ToC index object, but I somehow I can’t 
> associate that object with the text paragraphs of the ToC lines, nor with the 
> bookmarks scattered throughout the document. Or vice versa…
> 
> Cheers,
> Jens
> 
> 
> > On Dec 7, 2017, at 18:58, Miklos Vajna  wrote:
> > Let's say you have a ToC, then a Heading 1 paragraphs, Foo.
> > 
> > Then the ToC refers to hidden RefHeading bookmark for Foo. You can see
> > this reference at an UNO API level. Basic code for this:
> > 
> > oParas = ThisComponent.Text.createEnumeration
> > oPara = oParas.nextElement ' Table of Contents
> > oPara = oParas.nextElement ' Foo
> > oPortions = oPara.createEnumeration
> > oPortion = oPortions.nextElement
> > xray oPortion.HyperlinkURL ' gives #__RefHeading___Toc...
> > 
> > If you want to see the bookmarks the ToC refers to, it's similar:
> > 
> > ...
> > oPara = oParas.nextElement ' Foo
> > oPortions = oPara.createEnumeration
> > oPortion = oPortions.nextElement
> > xray oPortion.TextPortionType ' gives Bookmark
> > xray oPortion.Bookmark.Name ' gives #__RefHeading___Toc...
> > 
> > In most cases if you see some information serialized into ODT, then you
> > can assume the same information is available via the UNO API. You can
> > always read (most of) the ODT filter in xmloff/ to see what exact UNO
> > API is used to write a given ODT markup.
> > 
> > Regards,
> > Miklos
> 

-- 
Jens Tröger
http://savage.light-speed.de/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-12-07 Thread Thorsten Behrens
 comphelper/source/misc/storagehelper.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a9a4c26ed1365ffa089654fefc8fa2f29862b6c7
Author: Thorsten Behrens 
Date:   Thu Dec 7 19:38:10 2017 +0100

comphelper: fix windows build

Change-Id: I3241426674050c027e1b000b33fb284525a58cbb

diff --git a/comphelper/source/misc/storagehelper.cxx 
b/comphelper/source/misc/storagehelper.cxx
index 7fa46554b595..36641485fe2e 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -494,7 +494,7 @@ uno::Sequence< beans::NamedValue > 
OStorageHelper::CreateGpgPackageEncryptionDat
 // ctx is setup now, let's encrypt the lot!
 GpgME::Data plain(
 reinterpret_cast(aVector.getConstArray()),
-aVector.getLength(), false);
+size_t(aVector.getLength()), false);
 GpgME::Data cipher;
 
 GpgME::EncryptionResult crypt_res = ctx->encrypt(
___
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' - sc/CppunitTest_sc_chart2dataprovider.mk sc/inc sc/Module_sc.mk sc/qa

2017-12-07 Thread Vasily Melenchuk
 sc/CppunitTest_sc_chart2dataprovider.mk|  122 +
 sc/Module_sc.mk|1 
 sc/inc/chart2uno.hxx   |2 
 sc/qa/unit/chart2dataprovider.cxx  |  122 +
 sc/qa/unit/data/ods/chart2dataprovider.ods |binary
 5 files changed, 246 insertions(+), 1 deletion(-)

New commits:
commit e996e61bc98751d4a4ad86920486777fdbccb6a9
Author: Vasily Melenchuk 
Date:   Wed Nov 29 16:29:52 2017 +0300

tdf#113861: Unittest for chart datatable labels expansion

Reviewed-on: https://gerrit.libreoffice.org/45670
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
(cherry picked from commit 51cdf6248dbdf7a5dcddd2128bbb8f889cec25d6)

Conflicts:
sc/Module_sc.mk

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

diff --git a/sc/CppunitTest_sc_chart2dataprovider.mk 
b/sc/CppunitTest_sc_chart2dataprovider.mk
new file mode 100644
index ..7ef131b7f147
--- /dev/null
+++ b/sc/CppunitTest_sc_chart2dataprovider.mk
@@ -0,0 +1,122 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,sc_chart2dataprovider))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sc_chart2dataprovider, \
+sc/qa/unit/chart2dataprovider \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sc_chart2dataprovider, \
+   boost_headers \
+   mdds_headers \
+   libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sc_chart2dataprovider, \
+basegfx \
+comphelper \
+cppu \
+cppuhelper \
+drawinglayer \
+editeng \
+for \
+forui \
+i18nlangtag \
+msfilter \
+oox \
+sal \
+salhelper \
+sax \
+sb \
+sc \
+scqahelper \
+sfx \
+sot \
+subsequenttest \
+svl \
+svt \
+svx \
+svxcore \
+   test \
+tk \
+tl \
+ucbhelper \
+   unotest \
+utl \
+vbahelper \
+vcl \
+xo \
+   $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sc_chart2dataprovider,\
+-I$(SRCDIR)/sc/source/ui/inc \
+-I$(SRCDIR)/sc/inc \
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,sc_chart2dataprovider))
+
+$(eval $(call gb_CppunitTest_use_ure,sc_chart2dataprovider))
+$(eval $(call gb_CppunitTest_use_vcl,sc_chart2dataprovider))
+
+$(eval $(call gb_CppunitTest_use_components,sc_chart2dataprovider,\
+   basic/util/sb \
+chart2/source/chartcore \
+chart2/source/controller/chartcontroller \
+comphelper/util/comphelp \
+configmgr/source/configmgr \
+dbaccess/util/dba \
+embeddedobj/util/embobj \
+eventattacher/source/evtatt \
+filter/source/config/cache/filterconfig1 \
+forms/util/frm \
+framework/util/fwk \
+i18npool/source/search/i18nsearch \
+i18npool/util/i18npool \
+linguistic/source/lng \
+oox/util/oox \
+package/source/xstor/xstor \
+package/util/package2 \
+sax/source/expatwrap/expwrap \
+scaddins/source/analysis/analysis \
+scaddins/source/datefunc/date \
+sc/util/sc \
+sc/util/scfilt \
+sfx2/util/sfx \
+sot/util/sot \
+svl/util/svl \
+svl/source/fsstor/fsstorage \
+svtools/util/svt \
+toolkit/util/tk \
+ucb/source/core/ucb1 \
+ucb/source/ucp/file/ucpfile1 \
+ucb/source/ucp/tdoc/ucptdoc1 \
+unotools/util/utl \
+unoxml/source/rdf/unordf \
+unoxml/source/service/unoxml \
+uui/util/uui \
+xmloff/util/xo \
+xmlsecurity/util/xmlsecurity \
+))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_CppunitTest_use_components,sc_chart2dataprovider,\
+xmlsecurity/util/xsec_xmlsec.windows \
+))
+else
+$(eval $(call gb_CppunitTest_use_components,sc_chart2dataprovider,\
+xmlsecurity/util/xsec_xmlsec \
+))
+endif
+
+$(eval $(call gb_CppunitTest_use_configuration,sc_chart2dataprovider))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index 26f967d7b267..d8561753f376 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -98,6 +98,7 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sc,\
CppunitTest_sc_check_data_pilot_field \
CppunitTest_sc_check_data_pilot_table \
CppunitTest_sc_viewpaneobj \
+   CppunitTest_sc_chart2dataprovider \
 ))
 
 $(eval $(call gb_Module_add_perfcheck_targets,sc,\
diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx
index 3d2a61fe33af..3765db35596e 100644
--- a/sc/inc/chart2uno.hxx
+++ b/sc/inc/chart2uno.hxx
@@ -54,7 +54,7 @@
 class ScDocument;
 
 // DataProvider
-class ScChart2DataProvider : public
+class

[Libreoffice-commits] core.git: desktop/source include/sfx2 include/svl include/svx sc/qa sc/source sd/qa sd/source sfx2/sdi sfx2/source svl/source svx/source sw/qa sw/source

2017-12-07 Thread Henry Castro
 desktop/source/lib/init.cxx|3 -
 include/sfx2/sfxsids.hrc   |2 
 include/svl/hint.hxx   |1 
 include/svl/undo.hxx   |   10 +++-
 include/svx/sdrundomanager.hxx |5 ++
 sc/qa/unit/tiledrendering/tiledrendering.cxx   |   51 +
 sc/source/core/data/document.cxx   |5 +-
 sd/qa/unit/tiledrendering/tiledrendering.cxx   |   51 +
 sd/source/ui/docshell/docshell.cxx |5 +-
 sfx2/sdi/docslots.sdi  |4 +
 sfx2/sdi/sfx.sdi   |   19 +
 sfx2/source/control/unoctitm.cxx   |3 -
 sfx2/source/doc/objserv.cxx|9 
 sfx2/source/view/viewfrm.cxx   |6 ++
 svl/source/undo/undo.cxx   |   39 +++
 svx/source/svdraw/sdrundomanager.cxx   |   16 +++
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   48 +++
 sw/source/core/inc/UndoManager.hxx |3 +
 sw/source/core/undo/docundo.cxx|8 +++
 19 files changed, 279 insertions(+), 9 deletions(-)

New commits:
commit 6fd6e3c1d36d67002967f56e47255e360f4b08c1
Author: Henry Castro 
Date:   Sat Jun 17 13:52:15 2017 -0400

lokit: add .uno:DocumentRepair command

Change-Id: I5b13ea6f4785bc91c29111fa63c4a1b0ea9b2660
Reviewed-on: https://gerrit.libreoffice.org/38908
Tested-by: Jenkins 
Reviewed-by: Henry Castro 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2ea79a076e9a..51bcd2e34afb 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1747,7 +1747,8 @@ static void doc_iniUnoCommands ()
 OUString(".uno:FontDialog"),
 OUString(".uno:ParagraphDialog"),
 OUString(".uno:OutlineBullet"),
-OUString(".uno:InsertIndexesEntry")
+OUString(".uno:InsertIndexesEntry"),
+OUString(".uno:DocumentRepair")
 };
 
 util::URL aCommandURL;
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 043902f5b26a..7bac74572f8f 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -119,7 +119,7 @@
 #define SID_FILE_FILTEROPTIONS  (SID_SFX_START + 527)
 #define SID_RELOAD  (SID_SFX_START + 508)
 #define SID_PRINTDOCDIRECT  (SID_SFX_START + 509)
-// free (SID_SFX_START + 510)
+#define SID_DOC_REPAIR  (SID_SFX_START + 510)
 #define SID_DOC_SERVICE (SID_SFX_START + 511)
 #define SID_PLUGIN_MODE (SID_SFX_START + 827)
 #define SID_EXPORTDOC   (SID_SFX_START + 829)
diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index bce91f5462ae..4cee3ba569a9 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -35,6 +35,7 @@ enum class SfxHintId {
 ColorsChanged,
 LanguageChanged,
 RedlineChanged,
+DocumentRepair,
 
 // VCL text hints
 TextParaInserted,
diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx
index 7791d4a4b333..b0ee7e21f657 100644
--- a/include/svl/undo.hxx
+++ b/include/svl/undo.hxx
@@ -293,6 +293,7 @@ namespace svl
 /// adds a new listener to be notified about changes in the 
UndoManager's state
 virtual voidAddUndoListener( SfxUndoListener& i_listener ) 
= 0;
 virtual voidRemoveUndoListener( SfxUndoListener& 
i_listener ) = 0;
+virtual boolIsEmptyActions() const = 0;
};
 }
 
@@ -343,6 +344,8 @@ public:
 virtual boolIsUndoEnabled() const override;
 virtual voidAddUndoListener( SfxUndoListener& i_listener ) 
override;
 virtual voidRemoveUndoListener( SfxUndoListener& i_listener ) 
override;
+virtual boolIsEmptyActions() const override;
+
 
 /** marks the current top-level element of the Undo stack, and returns a 
unique ID for it
 */
@@ -379,6 +382,7 @@ protected:
 undo actions on the then-current level are removed, too. This is 
continued until the top level is reached.
 */
 voidClearAllLevels();
+virtual void EmptyActionsChanged();
 
 private:
 size_t  ImplLeaveListAction( const bool i_merge, 
::svl::undo::impl::UndoManagerGuard& i_guard );
@@ -391,8 +395,10 @@ private:
 boolImplIsInListAction_Lock() const;
 voidImplEnableUndo_Lock( bool const i_enable );
 
-bool ImplUndo( SfxUndoContext* i_contextOrNull );
-bool ImplRedo( SfxUndoContext* i_contextOrNull );
+boolImplUndo( SfxUndoContext* i_contextOrNull );
+boolImplRedo( SfxUndoContext* i_contextOrNull );
+voidImplCheckEmptyActions();
+inline  boolImplIsEmptyActions() const;
 
 friend class ::svl::undo::impl::LockGuard;
 };
diff --git a/include/svx/sdrundomanage

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

2017-12-07 Thread Henry Castro
 loleaflet/dist/toolbar/toolbar.js |   13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 595f28c067194602e27c209c3268a8976c1ec250
Author: Henry Castro 
Date:   Wed Jun 28 17:06:12 2017 -0400

loleaflet: .uno:DocumentRepair state is reported by LOKit

Change-Id: I457c607055bfde8ec68c81cf3b9b2f5a80a4b345
Reviewed-on: https://gerrit.libreoffice.org/39376
Reviewed-by: Henry Castro 
Tested-by: Henry Castro 

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index 865a6efe..8012efa9 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -1314,6 +1314,13 @@ map.on('commandstatechanged', function (e) {
state = toLocalePattern('Slide %1 of %2', 'Slide (\\d+) of 
(\\d+)', state, '%1', '%2');
updateToolbarItem(statusbar, 'PageStatus', 
$('#PageStatus').html(state ? state : 
' ').parent().html());
}
+   else if (commandName === '.uno:DocumentRepair') {
+   if (state === 'true') {
+   toolbar.enable('repair');
+   } else {
+   toolbar.disable('repair');
+   }
+   }
 
var id = unoCmdToToolbarId(commandName);
if (state === 'true') {
@@ -1340,12 +1347,6 @@ map.on('commandstatechanged', function (e) {
toolbarUpMore.disable(id);
}
}
-
-   if (id === 'undo' || id === 'redo') {
-   if (!toolbar.get('undo').disabled || 
!toolbar.get('redo').disabled) {
-   toolbar.enable('repair');
-   }
-   }
 });
 
 map.on('search', function (e) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 10 commits - comphelper/Library_comphelper.mk comphelper/source external/gpgmepp fpicker/source include/sal offapi/com package/inc package/source sfx2/source vcl/unx xm

2017-12-07 Thread Thorsten Behrens
 comphelper/Library_comphelper.mk|1 
 comphelper/source/misc/storagehelper.cxx|  118 +++-
 external/gpgmepp/ExternalProject_gpgmepp.mk |5 
 fpicker/source/office/OfficeControlAccess.cxx   |1 
 fpicker/source/win32/filepicker/VistaFilePicker.cxx |2 
 fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx |8 
 fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx |1 
 fpicker/source/win32/misc/resourceprovider.cxx  |3 
 include/sal/log-areas.dox   |1 
 offapi/com/sun/star/embed/XEncryptionProtectedStorage.idl   |   31 ++
 offapi/com/sun/star/security/XDocumentDigitalSignatures.idl |2 
 package/inc/PackageConstants.hxx|1 
 package/inc/ZipPackage.hxx  |1 
 package/source/manifest/ManifestDefines.hxx |   13 
 package/source/manifest/ManifestExport.cxx  |  175 +++-
 package/source/xstor/xstorage.cxx   |   60 
 package/source/xstor/xstorage.hxx   |1 
 package/source/zippackage/ZipPackage.cxx|   25 +
 sfx2/source/dialog/filedlghelper.cxx|   22 +
 vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx|4 
 vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx|1 
 vcl/unx/gtk/fpicker/resourceprovider.cxx|1 
 vcl/unx/kde4/KDE4FilePicker.cxx |6 
 xmlsecurity/inc/certificatechooser.hxx  |2 
 xmlsecurity/source/component/documentdigitalsignatures.cxx  |   32 +-
 xmlsecurity/source/component/documentdigitalsignatures.hxx  |4 
 xmlsecurity/source/dialogs/certificatechooser.cxx   |   38 +-
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx  |   14 
 xmlsecurity/source/gpg/CertificateImpl.cxx  |6 
 29 files changed, 514 insertions(+), 65 deletions(-)

New commits:
commit ed50a0a2ce51584fa3a8fba0094220a4bf25c650
Author: Thorsten Behrens 
Date:   Thu Dec 7 18:18:47 2017 +0100

gpg4libre: handle unavailable gpg crypto tools more gracefully

Change-Id: I58af9d38ea8d202d2bda64cdf45204646ac9fd29

diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx 
b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index 9d1244973de7..dd7de2c3bafe 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -349,7 +349,7 @@ DocumentDigitalSignatures::ImplVerifySignatures(
 rSigInfo.CertificateStatus = 
css::security::CertificateValidity::INVALID;
 }
 }
-else // GPG
+else if (xGpgSecEnv.is()) // GPG
 {
 // TODO not ideal to retrieve cert by keyID, might
 // collide, or PGPKeyID format might change - can't we
commit 1e12447f7ea601e158808290f4f67d84efba06e2
Author: Thorsten Behrens 
Date:   Thu Dec 7 14:31:36 2017 +0100

gpg4libre: return key fingerprint / hashes including null character

Change-Id: I6b32444bab6848e2b5ddec02fd949c71114a66b2

diff --git a/xmlsecurity/source/gpg/CertificateImpl.cxx 
b/xmlsecurity/source/gpg/CertificateImpl.cxx
index 16eeda80441f..c831011ca50e 100644
--- a/xmlsecurity/source/gpg/CertificateImpl.cxx
+++ b/xmlsecurity/source/gpg/CertificateImpl.cxx
@@ -158,7 +158,7 @@ Sequence< sal_Int8 > SAL_CALL 
CertificateImpl::getSHA1Thumbprint()
 // This is mapped to the fingerprint for gpg
 const char* keyId = m_pKey.primaryFingerprint();
 return comphelper::arrayToSequence(
-keyId, strlen(keyId));
+keyId, strlen(keyId)+1);
 }
 
 Sequence CertificateImpl::getSHA256Thumbprint()
@@ -167,7 +167,7 @@ Sequence CertificateImpl::getSHA256Thumbprint()
 // SHA1 actually)
 const char* keyId = m_pKey.primaryFingerprint();
 return comphelper::arrayToSequence(
-keyId, strlen(keyId));
+keyId, strlen(keyId)+1);
 }
 
 Sequence< sal_Int8 > SAL_CALL CertificateImpl::getMD5Thumbprint()
@@ -175,7 +175,7 @@ Sequence< sal_Int8 > SAL_CALL 
CertificateImpl::getMD5Thumbprint()
 // This is mapped to the shorter keyID for gpg
 const char* keyId = m_pKey.keyID();
 return comphelper::arrayToSequence(
-keyId, strlen(keyId));
+keyId, strlen(keyId)+1);
 }
 
 CertificateKind SAL_CALL CertificateImpl::getCertificateKind()
commit 626e73eafe953b102107031721a0b145fb713e9d
Author: Thorsten Behrens 
Date:   Thu Dec 7 05:11:15 2017 +0100

gpg4libre: permit multi-select encrypt cert

And pass down all necessary parameters everywhere

Change-Id: I152b9d84c0e35be9e5193a9a6f67de9fb86133b0

diff --git a/comphelper/source/misc/storagehelper.cxx 
b/comphelper/source/misc/storagehelper.cxx
index a05fb1358f3f..7fa4

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

2017-12-07 Thread Henry Castro
 desktop/source/lib/init.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 45a27e55d418422cf61ea3d4eed8eb5a6e309c90
Author: Henry Castro 
Date:   Thu Dec 7 08:49:12 2017 -0400

lok: discard name languages not registered

there is a STR_ARR_SVT_LANGUAGE_TABLE table that all language names are 
registered

But not all, like locale "es"

{ LANGUAGE_SPANISH_LATIN_AMERICA,   "es", ""  , k0 }

Avoid that names until get registered appropriately

Change-Id: I148f2c30f72c82c978f5e9a1e977bf4b5e923a9c
Reviewed-on: https://gerrit.libreoffice.org/46027
Tested-by: Jenkins 
Reviewed-by: Henry Castro 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 94afb956ebc7..2ea79a076e9a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2582,10 +2582,15 @@ static char* getLanguages(const char* pCommand)
 boost::property_tree::ptree aTree;
 aTree.put("commandName", pCommand);
 boost::property_tree::ptree aValues;
+boost::property_tree::ptree aChild;
+OUString sLanguage;
 for ( sal_Int32 itLocale = 0; itLocale < aLocales.getLength(); itLocale++ )
 {
-boost::property_tree::ptree aChild;
-aChild.put("", 
SvtLanguageTable::GetLanguageString(LanguageTag::convertToLanguageType(aLocales[itLocale])).toUtf8());
+sLanguage = 
SvtLanguageTable::GetLanguageString(LanguageTag::convertToLanguageType(aLocales[itLocale]));
+if (sLanguage.startsWith("{") && sLanguage.endsWith("}"))
+continue;
+
+aChild.put("", sLanguage.toUtf8());
 aValues.push_back(std::make_pair("", aChild));
 }
 aTree.add_child("commandValues", aValues);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/CppunitTest_sc_chart2dataprovider.mk sc/inc sc/Module_sc.mk sc/qa

2017-12-07 Thread Vasily Melenchuk
 sc/CppunitTest_sc_chart2dataprovider.mk|  122 +
 sc/Module_sc.mk|1 
 sc/inc/chart2uno.hxx   |2 
 sc/qa/unit/chart2dataprovider.cxx  |  122 +
 sc/qa/unit/data/ods/chart2dataprovider.ods |binary
 5 files changed, 246 insertions(+), 1 deletion(-)

New commits:
commit 51cdf6248dbdf7a5dcddd2128bbb8f889cec25d6
Author: Vasily Melenchuk 
Date:   Wed Nov 29 16:29:52 2017 +0300

tdf#113861: Unittest for chart datatable labels expansion

Change-Id: Icfa10b1e75c801a9a025c0173bd8a34e362f049e
Reviewed-on: https://gerrit.libreoffice.org/45670
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/sc/CppunitTest_sc_chart2dataprovider.mk 
b/sc/CppunitTest_sc_chart2dataprovider.mk
new file mode 100644
index ..7ef131b7f147
--- /dev/null
+++ b/sc/CppunitTest_sc_chart2dataprovider.mk
@@ -0,0 +1,122 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,sc_chart2dataprovider))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sc_chart2dataprovider, \
+sc/qa/unit/chart2dataprovider \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sc_chart2dataprovider, \
+   boost_headers \
+   mdds_headers \
+   libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sc_chart2dataprovider, \
+basegfx \
+comphelper \
+cppu \
+cppuhelper \
+drawinglayer \
+editeng \
+for \
+forui \
+i18nlangtag \
+msfilter \
+oox \
+sal \
+salhelper \
+sax \
+sb \
+sc \
+scqahelper \
+sfx \
+sot \
+subsequenttest \
+svl \
+svt \
+svx \
+svxcore \
+   test \
+tk \
+tl \
+ucbhelper \
+   unotest \
+utl \
+vbahelper \
+vcl \
+xo \
+   $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sc_chart2dataprovider,\
+-I$(SRCDIR)/sc/source/ui/inc \
+-I$(SRCDIR)/sc/inc \
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,sc_chart2dataprovider))
+
+$(eval $(call gb_CppunitTest_use_ure,sc_chart2dataprovider))
+$(eval $(call gb_CppunitTest_use_vcl,sc_chart2dataprovider))
+
+$(eval $(call gb_CppunitTest_use_components,sc_chart2dataprovider,\
+   basic/util/sb \
+chart2/source/chartcore \
+chart2/source/controller/chartcontroller \
+comphelper/util/comphelp \
+configmgr/source/configmgr \
+dbaccess/util/dba \
+embeddedobj/util/embobj \
+eventattacher/source/evtatt \
+filter/source/config/cache/filterconfig1 \
+forms/util/frm \
+framework/util/fwk \
+i18npool/source/search/i18nsearch \
+i18npool/util/i18npool \
+linguistic/source/lng \
+oox/util/oox \
+package/source/xstor/xstor \
+package/util/package2 \
+sax/source/expatwrap/expwrap \
+scaddins/source/analysis/analysis \
+scaddins/source/datefunc/date \
+sc/util/sc \
+sc/util/scfilt \
+sfx2/util/sfx \
+sot/util/sot \
+svl/util/svl \
+svl/source/fsstor/fsstorage \
+svtools/util/svt \
+toolkit/util/tk \
+ucb/source/core/ucb1 \
+ucb/source/ucp/file/ucpfile1 \
+ucb/source/ucp/tdoc/ucptdoc1 \
+unotools/util/utl \
+unoxml/source/rdf/unordf \
+unoxml/source/service/unoxml \
+uui/util/uui \
+xmloff/util/xo \
+xmlsecurity/util/xmlsecurity \
+))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_CppunitTest_use_components,sc_chart2dataprovider,\
+xmlsecurity/util/xsec_xmlsec.windows \
+))
+else
+$(eval $(call gb_CppunitTest_use_components,sc_chart2dataprovider,\
+xmlsecurity/util/xsec_xmlsec \
+))
+endif
+
+$(eval $(call gb_CppunitTest_use_configuration,sc_chart2dataprovider))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index ae9a2c4e89af..dc60e9d1d049 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -144,6 +144,7 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sc,\
CppunitTest_sc_headerfootercontentobj \
CppunitTest_sc_recentfunctionsobj \
CppunitTest_sc_functionlistobj \
+   CppunitTest_sc_chart2dataprovider \
 ))
 
 $(eval $(call gb_Module_add_perfcheck_targets,sc,\
diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx
index 795561b642fa..fb19a502a4c9 100644
--- a/sc/inc/chart2uno.hxx
+++ b/sc/inc/chart2uno.hxx
@@ -53,7 +53,7 @@
 class ScDocument;
 
 // DataProvider
-class ScChart2DataProvider : public
+class SC_DLLPUBLIC ScChart2DataProvider : public
 ::cppu::WeakImplHelper<
 css::chart2::data::XDataProvider,
 css::chart2::data::XSheetDataProvider,
diff --git a/sc/qa/unit/chart2dataprovider.cxx

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

2017-12-07 Thread Ulrich Gemkow
 sc/source/filter/excel/excform.cxx |   24 
 sc/source/filter/excel/impop.cxx   |   30 +++---
 2 files changed, 27 insertions(+), 27 deletions(-)

New commits:
commit febc90fec11279d5ea14635418af207047977651
Author: Ulrich Gemkow 
Date:   Tue Dec 5 22:57:13 2017 +0100

Translate german variable name

Change-Id: Ic43d47cfeac01c263422fcf8d596d62826f6981b
Reviewed-on: https://gerrit.libreoffice.org/45915
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/sc/source/filter/excel/excform.cxx 
b/sc/source/filter/excel/excform.cxx
index 2a74af0c7463..1fec63a82401 100644
--- a/sc/source/filter/excel/excform.cxx
+++ b/sc/source/filter/excel/excform.cxx
@@ -193,17 +193,17 @@ ExcelToSc::~ExcelToSc()
 {
 }
 
-void ExcelToSc::GetDummy( const ScTokenArray*& pErgebnis )
+void ExcelToSc::GetDummy( const ScTokenArray*& pResult )
 {
 aPool.Store( OUString("Dummy()") );
 aPool >> aStack;
-pErgebnis = aPool[ aStack.Get() ];
+pResult = aPool[ aStack.Get() ];
 }
 
 // if bAllowArrays is false stream seeks to first byte after 
 // otherwise it will seek to the first byte after the additional content (eg
 // inline arrays) following 
-ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, 
std::size_t nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT )
+ConvErr ExcelToSc::Convert( const ScTokenArray*& pResult, XclImpStream& aIn, 
std::size_t nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT )
 {
 RootData&   rR = GetOldRoot();
 sal_uInt8   nOp, nLen;
@@ -229,7 +229,7 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, 
XclImpStream& aIn, s
 {
 aPool.Store( OUString("-/-") );
 aPool >> aStack;
-pErgebnis = aPool[ aStack.Get() ];
+pResult = aPool[ aStack.Get() ];
 return ConvErr::OK;
 }
 
@@ -867,24 +867,24 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& 
pErgebnis, XclImpStream& aIn, s
 {
 aPool << ocBad;
 aPool >> aStack;
-pErgebnis = aPool[ aStack.Get() ];
+pResult = aPool[ aStack.Get() ];
 eRet = ConvErr::Ni;
 }
 else if( aIn.GetRecPos() != nEndPos )
 {
 aPool << ocBad;
 aPool >> aStack;
-pErgebnis = aPool[ aStack.Get() ];
+pResult = aPool[ aStack.Get() ];
 eRet = ConvErr::Count;
 }
 else if( bArrayFormula )
 {
-pErgebnis = nullptr;
+pResult = nullptr;
 eRet = ConvErr::OK;
 }
 else
 {
-pErgebnis = aPool[ aStack.Get() ];
+pResult = aPool[ aStack.Get() ];
 eRet = ConvErr::OK;
 }
 
@@ -1706,13 +1706,13 @@ const ScTokenArray* ExcelToSc::GetBoolErr( XclBoolError 
eType )
 
 aPool >> aStack;
 
-const ScTokenArray* pErgebnis = aPool[ aStack.Get() ];
+const ScTokenArray* pResult = aPool[ aStack.Get() ];
 if( nError != FormulaError::NONE )
-const_cast(pErgebnis)->SetCodeError( nError );
+const_cast(pResult)->SetCodeError( nError );
 
-const_cast(pErgebnis)->SetExclusiveRecalcModeNormal();
+const_cast(pResult)->SetExclusiveRecalcModeNormal();
 
-return pErgebnis;
+return pResult;
 }
 
 bool ExcelToSc::ReadSharedFormulaPosition( XclImpStream& rStrm, SCCOL& rCol, 
SCROW& rRow )
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index f830148594ea..e61eb7a4ba79 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -533,7 +533,7 @@ void ImportExcel::Array25()
 nFormLen = aIn.ReaduInt16();
 }
 
-const ScTokenArray* pErgebnis = nullptr;
+const ScTokenArray* pResult = nullptr;
 
 if (ValidColRow(nLastCol, nLastRow))
 {
@@ -541,16 +541,16 @@ void ImportExcel::Array25()
 
 pFormConv->Reset( ScAddress( static_cast(nFirstCol),
 static_cast(nFirstRow), GetCurrScTab() ) );
-pFormConv->Convert(pErgebnis, maStrm, nFormLen, true);
+pFormConv->Convert(pResult, maStrm, nFormLen, true);
 
-SAL_WARN_IF(!pErgebnis, "sc", "*ImportExcel::Array25(): ScTokenArray 
is NULL!");
+SAL_WARN_IF(!pResult, "sc", "*ImportExcel::Array25(): ScTokenArray is 
NULL!");
 }
 
-if (pErgebnis)
+if (pResult)
 {
 ScDocumentImport& rDoc = GetDocImport();
 ScRange aArrayRange(nFirstCol, nFirstRow, GetCurrScTab(), nLastCol, 
nLastRow, GetCurrScTab());
-rDoc.setMatrixCells(aArrayRange, *pErgebnis, 
formula::FormulaGrammar::GRAM_ENGLISH_XL_A1);
+rDoc.setMatrixCells(aArrayRange, *pResult, 
formula::FormulaGrammar::GRAM_ENGLISH_XL_A1);
 }
 }
 
@@ -840,7 +840,7 @@ void ImportExcel::Shrfmla()
 
 // read mark is now on the formula
 
-const ScTokenArray* pErgebnis;
+const ScTokenArray* pResult;
 
 // The shared range in this record is erroneous more than half the time.
 // Don't ever rely on it. Use the one from the formula cell above.
@@ -

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

2017-12-07 Thread Zdeněk Crhonek
 basic/qa/vba_tests/error.vb |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 00b644e88c9bd202e3794ad1387eb58674ea882f
Author: Zdeněk Crhonek 
Date:   Tue Dec 5 23:23:37 2017 +0100

VBA test - error() function

Change-Id: Ia667342f9112932c71df593f08371d3c35255b19
Reviewed-on: https://gerrit.libreoffice.org/45917
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/basic/qa/vba_tests/error.vb b/basic/qa/vba_tests/error.vb
index fd96f80b14d0..e36661253be2 100644
--- a/basic/qa/vba_tests/error.vb
+++ b/basic/qa/vba_tests/error.vb
@@ -6,7 +6,7 @@ Dim result As String
 
 Function doUnitTest() As String
 result = verify_testError()
-If failCount <> 0 And passCount > 0 Then
+If failCount <> 0 or passCount = 0 Then
 doUnitTest = result
 Else
 doUnitTest = "OK"
@@ -27,9 +27,9 @@ Function verify_testError() As String
 testName = "Test Error function"
 On Error GoTo errorHandler
 
-date2 = Error(62)   
'https://help.libreoffice.org/3.3/Basic/Error_Function_Runtime
-date1 = "Input past end of file"
-TestLog_ASSERT date1 = date2, "the return Error is: " & date1
+date2 = Error(11)   
'https://help.libreoffice.org/Basic/Error_Function_Runtime
+date1 = "Division by zero."
+TestLog_ASSERT date1 = date2, "the return Error is: " & date2
 
 result = result & Chr$(10) & "Tests passed: " & passCount & Chr$(10) & 
"Tests failed: " & failCount & Chr$(10)
 verify_testError = result
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'feature/gpg4libre-6-0'

2017-12-07 Thread Thorsten Behrens
New branch 'feature/gpg4libre-6-0' available with the following commits:
commit ac761ccb088deeb5f363a648feadde327d59a1ea
Author: Thorsten Behrens 
Date:   Thu Dec 7 14:31:36 2017 +0100

gpg4libre: return key fingerprint / hashes including null character

Change-Id: I6b32444bab6848e2b5ddec02fd949c71114a66b2

commit a50c1c1b34a01dc2d8ffa59aa4421bc4906fd236
Author: Thorsten Behrens 
Date:   Thu Dec 7 05:11:15 2017 +0100

gpg4libre: permit multi-select encrypt cert

And pass down all necessary parameters everywhere

Change-Id: I152b9d84c0e35be9e5193a9a6f67de9fb86133b0

commit 500e70db59c62c1f553d9a7bdd15f0433a6d1cbc
Author: Thorsten Behrens 
Date:   Thu Dec 7 05:08:37 2017 +0100

gpg4libre: pass proper debug flags down to gpgmepp

Change-Id: Ide3f6e9fa218bcd26deaadbbdbed0c8905e66db9

commit 76424657952de9adc3ca61e99c9b671e55cb36b0
Author: Thorsten Behrens 
Date:   Wed Dec 6 15:20:54 2017 +0100

gpg4libre: add KDE4 fpicker gpg crypt chechbox

Change-Id: Iba8fb0e0ac732f36cd1d880884bde1121e6b1eab

commit 51b789c74208910f6b1d89b37fd73a28523cc2e3
Author: Thorsten Behrens 
Date:   Mon Dec 4 02:22:09 2017 +0100

gpg4libre: add gtk fpicker gpg crypt chechbox

Change-Id: I27b494530a2b61eb37c4a9f7c3e1f9845f045e66

commit 0718a369d11b623bd979b0b2d31bfbd0a738f117
Author: Thorsten Behrens 
Date:   Thu Nov 23 23:28:13 2017 +0100

gpg4libre: add gpg encrypt checbox to win32 filepicker

Change-Id: Ia6315e8b1f04228984afd2fbca3c059df9589497

commit e3434bc6b2dc641e7dec365782784526cc9c0a43
Author: Thorsten Behrens 
Date:   Thu Nov 23 22:18:09 2017 +0100

gpg4libre: find keymanager executable on Windows

Change-Id: If93c06ad90d708b0fbaf476bda6fdb902bd77b1e

commit 688eefd6b21154b18ea3652e52fcbcd653e455ef
Author: Thorsten Behrens 
Date:   Sun Aug 20 03:38:05 2017 +0200

gpg4libre: [API CHANGE] add storage helper for GPG encryption data

OpenPGP encryption needs to pass down slightly different meta data
to package / zip storage.

Change-Id: Idba9ad7a821cb33070cf5e5a0f79ae55db99b276

commit ee0f1c7971ff06969ee3e6fd567e202377c5d616
Author: Thorsten Behrens 
Date:   Fri Aug 18 21:34:11 2017 +0200

gpg4libre: add manifest entries for gpg encryption

Change-Id: I71bd7e2c6c73d997fa1ed5bb36fdc2873daca10c

commit 9895830b4f00cf54cea64e9b6db46fc627db6222
Author: Thorsten Behrens 
Date:   Wed Dec 6 14:02:25 2017 +0100

gpg4libre: add unit tests for ODF signing feature

Since this requires a working gpg setup, limit to linux for the
moment. If you need to add signatures or redo them, run LibreOffice
from a shell with env var
GNUPGHOME=/xmlsecurity/qa/unit/signing/data/ set.

For editing keys, gpg2 also accepts a
--homedir=/xmlsecurity/qa/unit/signing/data/ option

Change-Id: I59e5b563098b19d05c8c2db32537241bc835fc80
Reviewed-on: https://gerrit.libreoffice.org/45950
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 6da58b0e842b81669e5076c2c00dddf67a5616e1)

commit c7fa2da1532d9f140cb9018b0a62c62228c67ba1
Author: Katarina Behrens 
Date:   Wed Nov 29 23:07:47 2017 +0100

Restore GPG SEInitializer service

user config now needs it to collect user's private GPG keys

Change-Id: Ia4ad4133b621160cf37281750cafa9f3c5c3c231
Reviewed-on: https://gerrit.libreoffice.org/45562
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 1c58b047d117bb087abc571b74c06cdf7499b1a0)

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-12-07 Thread Yousuf Philips
 sw/inc/app.hrc |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 9e2b4bc6c4ade65788a0763dadf85f1e8be2b2d3
Author: Yousuf Philips 
Date:   Wed Dec 6 15:57:45 2017 +0400

tdf#114275 Use 'All Styles' for all style types

Change-Id: I3a43d5cc3f19e789686afae47b7ffb223305971e
Reviewed-on: https://gerrit.libreoffice.org/45939
Tested-by: Jenkins 
Reviewed-by: Yousuf Philips 

diff --git a/sw/inc/app.hrc b/sw/inc/app.hrc
index fdb9f6f11f98..352bab8ecfbc 100644
--- a/sw/inc/app.hrc
+++ b/sw/inc/app.hrc
@@ -44,7 +44,7 @@ const std::pair RID_PARAGRAPHSTYLEFAMILY[] =
 
 const std::pair RID_CHARACTERSTYLEFAMILY[] =
 {
-{ NC_("RID_CHARACTERSTYLEFAMILY", "All") , 
SFXSTYLEBIT_ALL_VISIBLE },
+{ NC_("RID_CHARACTERSTYLEFAMILY", "All Styles")  , 
SFXSTYLEBIT_ALL_VISIBLE },
 { NC_("RID_CHARACTERSTYLEFAMILY", "Hidden Styles")   , SFXSTYLEBIT_HIDDEN  
  },
 { NC_("RID_CHARACTERSTYLEFAMILY", "Applied Styles")  , SFXSTYLEBIT_USED
  },
 { NC_("RID_CHARACTERSTYLEFAMILY", "Custom Styles")   , SFXSTYLEBIT_USERDEF 
  },
@@ -53,7 +53,7 @@ const std::pair RID_CHARACTERSTYLEFAMILY[] =
 
 const std::pair RID_FRAMESTYLEFAMILY[] =
 {
-{ NC_("RID_FRAMESTYLEFAMILY", "All") , SFXSTYLEBIT_ALL_VISIBLE 
},
+{ NC_("RID_FRAMESTYLEFAMILY", "All Styles")  , SFXSTYLEBIT_ALL_VISIBLE 
},
 { NC_("RID_FRAMESTYLEFAMILY", "Hidden Styles")   , SFXSTYLEBIT_HIDDEN},
 { NC_("RID_FRAMESTYLEFAMILY", "Applied Styles")  , SFXSTYLEBIT_USED  },
 { NC_("RID_FRAMESTYLEFAMILY", "Custom Styles")   , SFXSTYLEBIT_USERDEF   },
@@ -62,7 +62,7 @@ const std::pair RID_FRAMESTYLEFAMILY[] =
 
 const std::pair RID_PAGESTYLEFAMILY[] =
 {
-{ NC_("RID_PAGESTYLEFAMILY", "All") , SFXSTYLEBIT_ALL_VISIBLE 
},
+{ NC_("RID_PAGESTYLEFAMILY", "All Styles")  , SFXSTYLEBIT_ALL_VISIBLE 
},
 { NC_("RID_PAGESTYLEFAMILY", "Hidden Styles")   , SFXSTYLEBIT_HIDDEN},
 { NC_("RID_PAGESTYLEFAMILY", "Applied Styles")  , SFXSTYLEBIT_USED  },
 { NC_("RID_PAGESTYLEFAMILY", "Custom Styles")   , SFXSTYLEBIT_USERDEF   },
@@ -71,7 +71,7 @@ const std::pair RID_PAGESTYLEFAMILY[] =
 
 const std::pair RID_LISTSTYLEFAMILY[] =
 {
-{ NC_("RID_LISTSTYLEFAMILY", "All") , SFXSTYLEBIT_ALL_VISIBLE 
},
+{ NC_("RID_LISTSTYLEFAMILY", "All Styles")  , SFXSTYLEBIT_ALL_VISIBLE 
},
 { NC_("RID_LISTSTYLEFAMILY", "Hidden Styles")   , SFXSTYLEBIT_HIDDEN},
 { NC_("RID_LISTSTYLEFAMILY", "Applied Styles")  , SFXSTYLEBIT_USED  },
 { NC_("RID_LISTSTYLEFAMILY", "Custom Styles")   , SFXSTYLEBIT_USERDEF   },
@@ -80,7 +80,7 @@ const std::pair RID_LISTSTYLEFAMILY[] =
 
 const std::pair RID_TABLESTYLEFAMILY[] =
 {
-{ NC_("RID_TABLESTYLEFAMILY", "All") , SFXSTYLEBIT_ALL_VISIBLE 
},
+{ NC_("RID_TABLESTYLEFAMILY", "All Styles")  , SFXSTYLEBIT_ALL_VISIBLE 
},
 { NC_("RID_TABLESTYLEFAMILY", "Hidden Styles")   , SFXSTYLEBIT_HIDDEN},
 { NC_("RID_TABLESTYLEFAMILY", "Applied Styles")  , SFXSTYLEBIT_USED  },
 { NC_("RID_TABLESTYLEFAMILY", "Custom Styles")   , SFXSTYLEBIT_USERDEF   },
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Minutes of ESC call 2017-12-07

2017-12-07 Thread Jan Holesovsky
* Present:
+ Eike, Kendy, Thorsten, Stephan, Xisco, Heiko, Caolán, Miklos, Milian

* Completed Action Items:
+ Submit FOSDEM papers – deadline is Wed [!] (All)
+ get Michael access to vm174 (Christian)
+ find data for x86 / Linux downloads with view to removing for 6.0 (Cloph)
[ 40-50% are 32bit, cannot drop it for the near future;
  also the update will be checking the platform too ]

* Pending Action Items:
+ come up with a list of retiring committers to mail (Norbert)

* Release Engineering update (Christian)
+ 6.0 Beta 2
+ about to tag later today
+ issue with Mac: Impress/Draw not working (?)
+ fixed by Stephan
+ thank you! (Thorsten, Clop, ...)
+ late features
+ gpg4libre branch
 + will be around for testing (Thorsten)
+ HTML help pieces (Olivier, Cloph)
   [ Shinnok is progressing with the scripts ]
+ missing piece from customization GSoC (Heiko)
   [ fully working now, integrated into 6.0 ]
+ Calc / threading UI setting (Michael)
   + 5.4.4 RC1 status
   + tagged, built, on the mirrors
   + 5.4.4 RC2 …
   + next week
   + Android
   + rendering fix integrated
   + problems on ARM – crashes in native code; fine on Intel
   + unsure if a build problem, or general one
   + Online

* FOSDEM / Brussels, 3 & 4 February 2018
   + Submitted papers: **deadline extended to Wed 6th**
   + https://penta.fosdem.org/submission/FOSDEM18 
   + Talks submitted
   + Caolan – Native Dialogs talk
   + Kendy – Online dialog tunneling
   + Miklos – ePUB talk
   + Samuel – Submitted
   + Christian – a dashboard talk.
   + Olivier – Converging documentation
   + Stephan – submitted
   + Michael S – still planning. ?
   + Muhammet Kara - Customization 
   + Regina - 
   + more most welcome ...

* Documentation (Olivier)
+ NewHelp
+ Mode cleanup of build scripts by shinnok
+ New Help Pages:
+ On more BASIC and VBA functions (ohallot)
+ on Calc's Data->Forms (ohallot)
+ Contents fixes by M. Kara, G. Kelemen
+ Guides
+ More updates in for 6.0 releaseNewHelp

* Testing Jitsi for ESC calls (Michael)
   + https://meet.jit.si/TDFESC
   + how is it ?
   + Microphone problem 
 (issue with laptop though, won’t use headphone one Cloph)
 using android app usually, but crashes for ESC/today
   + Works for me pretty well (Miklos, Kendy, Thorsten)
   + probably better bandwidth / load / … (?)
   + Use Firefox, not Chrome (Xisco)
   + Video went blank (Stephan)
   + will try another browser
   + let’s try the next week again (Eike)

* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
258(258) (topicUI) bugs open, 366(366) (needsUXEval) needs to be 
evaluated by the UXteam
+ Updates:
BZ changes   1 week1 month3 months   12 months
 added  6(0)  18(2)  46(-1) 115(-3)
 commented 35(-30)   182(-46)   620(-12)   2313(-109)
   removed  0(0)   0(0)   4(0)   19(0)
  resolved  5(0)  19(-3) 56(2)  245(2)
+ top 10 contributors:
  Philips, Yousuf made 66 changes in 1 month, and 802 changes in 1 year
  Tietze, Heiko made 60 changes in 1 month, and 1095 changes in 1 year
  Zolnai, Tamás made 54 changes in 1 month, and 134 changes in 1 year
  Faulí Tarazona, Xisco made 52 changes in 1 month, and 395 changes in 
1 y
  Dieter Praas made 40 changes in 1 month, and 90 changes in 1 year
  Thomas Lendo made 28 changes in 1 month, and 432 changes in 1 year
  Buovjaga made 16 changes in 1 month, and 267 changes in 1 year
  Christian Lehmann made 16 changes in 1 month, and 20 changes in 1 year
  Henschel, Regina made 16 changes in 1 month, and 126 changes in 1 year
  Krot, Serge made 14 changes in 1 month, and 14 changes in 1 year

+ several topics discussed yesterday, but nothing really of ESC
  importance (Heiko)
+ when features are disabled or not
+ not a good solution

* Crash Hunting (Caolan)
+ 17 import failure, 91 export failures
+ one outstanding issue
+ think this is fixed, wailing results of next run
+ 10 (-9) coverity
+ 42 (+2) fuzzers * 3 sanitizers+engine combos (asan+libfuzzer,
ubsan+libfuzzer, asan+afl)
+ latest is mml, mathtype and (writer) html next
+ leaves calc html import as the last one

* Crash Reporter (Xisco)
+ http://crashreport.libreoffice.org/stats/version/5.3.6.1
+ 1764 (last 7 days) (down)
+ http://crashreport.libreoffice.org/stats/version/5.3.7.2
+ 793 (last 7 days) (up)
+ http://crashreport.libreoffice.org/stats/version/5.4.2.2
  + 2766 (last 7 days ) (up)
+ http://crashreport.libreoffice.

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

2017-12-07 Thread Yousuf Philips
 sw/uiconfig/swriter/menubar/menubar.xml |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 58e6ef08271f51486e37edeaa287a6d54b2b9720
Author: Yousuf Philips 
Date:   Thu Dec 7 02:48:43 2017 +0400

tdf91781 Small reorganization and shrinking of the form menu

Change-Id: Icaad5b6769da227f7ec3b13c6d793e6464e2ffc9
Reviewed-on: https://gerrit.libreoffice.org/45999
Tested-by: Jenkins 
Reviewed-by: Yousuf Philips 

diff --git a/sw/uiconfig/swriter/menubar/menubar.xml 
b/sw/uiconfig/swriter/menubar/menubar.xml
index 1f7366733f59..d8ec9694ecc1 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -631,7 +631,7 @@
   
 
   
-  
+  
   
   
   
@@ -644,21 +644,21 @@
   
   
   
-  
-  
   
 
+  
   
-  
+  
   
+  
 
   
   
+  
+  
   
   
   
-  
-  
   
   
   
@@ -668,8 +668,8 @@
   
   
   
+  
   
-  
 
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-12-07 Thread Armin Le Grand
 include/svx/framelink.hxx   |   35 
 svx/source/dialog/framelink.cxx |2 
 sw/inc/sw_primitivetypes2d.hxx  |1 
 sw/source/core/access/accfrmobj.cxx |2 
 sw/source/core/doc/notxtfrm.cxx |2 
 sw/source/core/draw/dflyobj.cxx |2 
 sw/source/core/edit/autofmt.cxx |2 
 sw/source/core/inc/cellfrm.hxx  |2 
 sw/source/core/inc/flyfrm.hxx   |2 
 sw/source/core/inc/frame.hxx|   31 
 sw/source/core/inc/ftnfrm.hxx   |6 
 sw/source/core/inc/layfrm.hxx   |2 
 sw/source/core/inc/notxtfrm.hxx |2 
 sw/source/core/inc/ptqueue.hxx  |4 
 sw/source/core/inc/rootfrm.hxx  |2 
 sw/source/core/inc/tabfrm.hxx   |2 
 sw/source/core/inc/txtfrm.hxx   |4 
 sw/source/core/layout/calcmove.cxx  |   30 
 sw/source/core/layout/dbg_lay.cxx   |2 
 sw/source/core/layout/findfrm.cxx   |2 
 sw/source/core/layout/flyincnt.cxx  |5 
 sw/source/core/layout/ftnfrm.cxx|4 
 sw/source/core/layout/layact.cxx|   16 
 sw/source/core/layout/newfrm.cxx|  114 -
 sw/source/core/layout/pagechg.cxx   |3 
 sw/source/core/layout/paintfrm.cxx  |  946 
+++---
 sw/source/core/layout/sectfrm.cxx   |2 
 sw/source/core/layout/ssfrm.cxx |7 
 sw/source/core/layout/tabfrm.cxx|4 
 sw/source/core/layout/trvlfrm.cxx   |   12 
 sw/source/core/layout/unusedf.cxx   |4 
 sw/source/core/layout/wsfrm.cxx |   13 
 sw/source/core/objectpositioning/tolayoutanchoredobjectposition.cxx |2 
 sw/source/core/text/frmpaint.cxx|   10 
 sw/source/core/text/itrcrsr.cxx |4 
 sw/source/core/text/porfly.cxx  |2 
 sw/source/core/text/pormulti.cxx|2 
 sw/source/core/text/txtfrm.cxx  |2 
 sw/source/core/txtnode/txtedt.cxx   |8 
 sw/source/core/view/viewpg.cxx  |2 
 sw/source/core/view/viewsh.cxx  |   12 
 sw/source/core/view/vprint.cxx  |6 
 42 files changed, 497 insertions(+), 820 deletions(-)

New commits:
commit 731a7ff12cb96b5996d20dd9203ca28d4487aeeb
Author: Armin Le Grand 
Date:   Tue Dec 5 19:35:20 2017 +0100

SwFrameBorder: Converted BorderRectangle functionality

to primitive usage, added a SwBorderRectanglePrimitive2D
which now encapsulates the four Styles and the transformation
of a single BorderLineRectangle. This is a preparation for
later buffered primitive usage at SwFrame level

Change-Id: I6689b94fe996ead8142553e8442e151e53d10e8a

diff --git a/sw/inc/sw_primitivetypes2d.hxx b/sw/inc/sw_primitivetypes2d.hxx
index 4ded8572088b..44509820f72c 100644
--- a/sw/inc/sw_primitivetypes2d.hxx
+++ b/sw/inc/sw_primitivetypes2d.hxx
@@ -25,6 +25,7 @@
 #define PRIMITIVE2D_ID_SWVIRTFLYDRAWOBJPRIMITIVE2D  (PRIMITIVE2D_ID_RANGE_SW| 
0)
 #define PRIMITIVE2D_ID_SWSIDEBARANCHORPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 
1)
 #define PRIMITIVE2D_ID_SWSIDEBARSHADOWPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 
2)
+#define PRIMITIVE2D_ID_SWBORDERRECTANGLERIMITIVE(PRIMITIVE2D_ID_RANGE_SW| 
3)
 
 #endif // INCLUDED_SW_INC_SW_PRIMITIVETYPES2D_HXX
 
diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index e6350e131984..30872d45e6f4 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -62,6 +62,8 @@
 #include 
 #include 
 #include 
+#include 
+
 #include 
 #include 
 #include 
@@ -232,7 +234,6 @@ public:
 };
 
 // Default zoom factor
-const static double aMinDistScale = 0.73;
 const static double aEdgeScale = 0.5;
 
 //To optimize the expensive RetouchColor determination
@@ -1180,42 +1181,6 @@ void SwAlignRect( SwRect &rRect, const SwViewShell *pSh, 
const vcl::RenderContex

Re: Let failed Jenkins builds set Verified: -1 in Gerrit?

2017-12-07 Thread Norbert Thiebaud
On Tue, Dec 5, 2017 at 1:16 AM, David Ostrovsky  wrote:
>
> RTFM: [1]? Quoting:
>
> "
> *Remove Reviewer*
>
> This category permits users to remove other users from the list of
> reviewers on a change.
> [...]
> Project owners and site administrators can always remove any reviewer
> (even without having the Remove Reviewer access right assigned).
>
> Users without this access right can only remove themselves from the
> reviewer list on a change.
> "
>
> Also note, that the ancient/legacy Gerrit version @LibreOffice
> has a major design bug/missing feature: [2] there is now way to
> remove a vote. Only the whole reviewer, with all votes can
> be wiped out.

I'm sorry but it is completely un-obvious that removing a 'reviewer'
from the list would wipe out the history of that reviewer.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Repository.mk

2017-12-07 Thread David Tardon
 Repository.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 66cb8e415ecb1482cd8aad3fe7b040132e555e91
Author: David Tardon 
Date:   Thu Dec 7 15:51:04 2017 +0100

fix build

Change-Id: I036538ab9df3dc3f9e3ace9df6b3ed89f6bb75b2

diff --git a/Repository.mk b/Repository.mk
index f895573b2416..4257bd26b799 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -907,7 +907,7 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
$(if $(filter $(OS),MACOSX),vcl_osxres) \
xmloff_dtd \
xmlscript_dtd \
-   $(if $(ENABLE_HTMLHELP),,xmlhelp_helpxsl) \
+   xmlhelp_helpxsl \
$(if $(ENABLE_JAVA),\
scripting_java \
scripting_java_jars \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-12-07 Thread Eike Rathke
 sc/source/ui/view/notemark.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 454d75e907b9e9e478f81388374ae09fb55f5c1c
Author: Eike Rathke 
Date:   Thu Dec 7 13:03:59 2017 +0100

Assert pDrawView even to spot bad usage

Change-Id: Id33df9548085f8ab5cea684b4bed7c779c63
Reviewed-on: https://gerrit.libreoffice.org/46023
Reviewed-by: Eike Rathke 
Tested-by: Jenkins 

diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index b92e7c278b70..47c9db0dacf5 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -108,6 +108,8 @@ IMPL_LINK_NOARG(ScNoteMarker, TimeHdl, Timer *, void)
 // Need to include grid offset: GetCurrentBoundRect is 
removing it
 // but we need to know actual rect position
 aRect += mxObject->GetGridOffset();
+
+assert(pDrawView && "this ended up with a wrong rectangle");
 }
 
 // Insert page so that the model recognise it and also deleted
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gpg4libre2' - 3 commits - comphelper/source package/source sfx2/source xmlsecurity/source

2017-12-07 Thread Thorsten Behrens
 comphelper/source/misc/storagehelper.cxx   |   13 +--
 package/source/manifest/ManifestExport.cxx |   21 
 sfx2/source/dialog/filedlghelper.cxx   |   22 +++--
 xmlsecurity/source/component/documentdigitalsignatures.cxx |8 
 xmlsecurity/source/gpg/CertificateImpl.cxx |6 +--
 5 files changed, 54 insertions(+), 16 deletions(-)

New commits:
commit 0ee502ecf168132330619d7a409aa209423e983b
Author: Thorsten Behrens 
Date:   Thu Dec 7 14:40:34 2017 +0100

fixup manifest writing

Change-Id: I0c62e00cfe281efaaf863585944b9d2f561a4405

diff --git a/package/source/manifest/ManifestExport.cxx 
b/package/source/manifest/ManifestExport.cxx
index 02ea5a016270..5cf87334ca62 100644
--- a/package/source/manifest/ManifestExport.cxx
+++ b/package/source/manifest/ManifestExport.cxx
@@ -261,13 +261,13 @@ ManifestExport::ManifestExport( uno::Reference< 
xml::sax::XDocumentHandler > con
 pNValue->Value >>= aCipherValue;
 }
 
-if (!aPgpKeyID.hasElements() && !aPgpKeyPacket.hasElements() 
&& !aCipherValue.hasElements() )
+if (aPgpKeyID.hasElements() && aCipherValue.hasElements() )
 {
 //  manifest:encrypted-key & children - one for each 
recipient
 xHandler->startElement( sEncryptedKeyElement, nullptr );
 xHandler->ignorableWhitespace ( sWhiteSpace );
 
-// TODO: this should rather be configurable
+// TODO: the algorithm should rather be configurable
 pNewAttrList->AddAttribute ( sAlgorithmAttribute, 
sCdataAttribute,
  
"http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"; );
 xHandler->startElement( sEncryptionMethodElement, 
xNewAttrList );
@@ -286,11 +286,15 @@ ManifestExport::ManifestExport( uno::Reference< 
xml::sax::XDocumentHandler > con
 xHandler->endElement( sPgpKeyIDElement );
 xHandler->ignorableWhitespace ( sWhiteSpace );
 
-xHandler->startElement( sPGPKeyPacketElement, nullptr );
-::sax::Converter::encodeBase64(aBuffer, aPgpKeyPacket);
-xHandler->characters( aBuffer.makeStringAndClear() );
-xHandler->endElement( sPGPKeyPacketElement );
-xHandler->ignorableWhitespace ( sWhiteSpace );
+// key packet is optional
+if (aPgpKeyPacket.hasElements())
+{
+xHandler->startElement( sPGPKeyPacketElement, nullptr 
);
+::sax::Converter::encodeBase64(aBuffer, aPgpKeyPacket);
+xHandler->characters( aBuffer.makeStringAndClear() );
+xHandler->endElement( sPGPKeyPacketElement );
+xHandler->ignorableWhitespace ( sWhiteSpace );
+}
 
 xHandler->endElement( sPgpDataElement );
 xHandler->ignorableWhitespace ( sWhiteSpace );
@@ -448,6 +452,9 @@ ManifestExport::ManifestExport( uno::Reference< 
xml::sax::XDocumentHandler > con
 pNewAttrList->AddAttribute ( sKeyDerivationNameAttribute,
  sCdataAttribute,
  sPGP_Name );
+// no start-key-generation needed, our session key has
+// max size already
+bStoreStartKeyGeneration = false;
 }
 else
 {
commit d664cecb69a6f28cf06d2dcfb1ecd3801b1f5769
Author: Thorsten Behrens 
Date:   Thu Dec 7 14:31:36 2017 +0100

return key fingerprint / hashes including null character

Change-Id: I6b32444bab6848e2b5ddec02fd949c71114a66b2

diff --git a/xmlsecurity/source/gpg/CertificateImpl.cxx 
b/xmlsecurity/source/gpg/CertificateImpl.cxx
index 16eeda80441f..c831011ca50e 100644
--- a/xmlsecurity/source/gpg/CertificateImpl.cxx
+++ b/xmlsecurity/source/gpg/CertificateImpl.cxx
@@ -158,7 +158,7 @@ Sequence< sal_Int8 > SAL_CALL 
CertificateImpl::getSHA1Thumbprint()
 // This is mapped to the fingerprint for gpg
 const char* keyId = m_pKey.primaryFingerprint();
 return comphelper::arrayToSequence(
-keyId, strlen(keyId));
+keyId, strlen(keyId)+1);
 }
 
 Sequence CertificateImpl::getSHA256Thumbprint()
@@ -167,7 +167,7 @@ Sequence CertificateImpl::getSHA256Thumbprint()
 // SHA1 actually)
 const char* keyId = m_pKey.primaryFingerprint();
 return comphelper::arrayToSequence(
-keyId, strlen(keyId));
+keyId, strlen(keyId)+1);
 }
 
 Sequence< sal_Int8 > SAL_CALL CertificateImpl::getMD5Thumbprint()
@@ -175,7 +175,7 @@ Sequence< sal_Int8 > SAL_CALL 
CertificateImpl::getMD5Thumbprint()
 // This is mapped to the shorter keyID for

[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - 8 commits - desktop/qa filter/CppunitTest_filter_priority.mk filter/source framework/Library_fwe.mk framework/source in

2017-12-07 Thread Samuel Mehrbrodt
 desktop/qa/desktop_lib/test_desktop_lib.cxx  |   58 +--
 filter/CppunitTest_filter_priority.mk|1 
 filter/source/config/cache/typedetection.cxx |   12 +++-
 filter/source/config/cache/typedetection.hxx |   41 +++-
 framework/Library_fwe.mk |2 
 framework/source/dispatch/closedispatcher.cxx|2 
 framework/source/loadenv/loadenv.cxx |   36 +++---
 include/comphelper/propertysequence.hxx  |   18 +++
 include/tools/errinf.hxx |5 +
 include/vcl/dialog.hxx   |2 
 sfx2/Library_sfx.mk  |1 
 sfx2/inc/preventduplicateinteraction.hxx |   21 
 sfx2/source/appl/appopen.cxx |6 +-
 sfx2/source/appl/preventduplicateinteraction.cxx |   25 +++--
 sw/source/core/frmedt/fetab.cxx  |   20 +++
 tools/source/ref/errinf.cxx  |7 +-
 uui/source/iahndl.cxx|   10 ++-
 vcl/source/window/dialog.cxx |2 
 vcl/source/window/msgbox.cxx |4 -
 19 files changed, 212 insertions(+), 61 deletions(-)

New commits:
commit 6709e2d08a7bf9f8e3956e1e16a56149e78b995c
Author: Samuel Mehrbrodt 
Date:   Tue Dec 5 15:46:22 2017 +0100

Rename InitAnySequence -> InitAnyPropertySequence

partial cherry-pick of c23cc5d7551a0ed0e3dad2d33dd00b38643456a1

Change-Id: Idb266d42c5f9fb09f04b13e78c037f5df9c32079

diff --git a/include/comphelper/propertysequence.hxx 
b/include/comphelper/propertysequence.hxx
index 6af3bb389929..d6c00775a968 100644
--- a/include/comphelper/propertysequence.hxx
+++ b/include/comphelper/propertysequence.hxx
@@ -14,7 +14,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 namespace comphelper
@@ -40,14 +39,14 @@ namespace comphelper
 ///
 /// This is particularly useful for creation of sequences that are later
 /// unwrapped using comphelper::SequenceAsHashMap.
-inline css::uno::Sequence< css::uno::Any > InitAnySequence(
+inline css::uno::Sequence< css::uno::Any > InitAnyPropertySequence(
 ::std::initializer_list< ::std::pair< OUString, css::uno::Any > > 
vInit)
 {
 css::uno::Sequence 
vResult{static_cast(vInit.size())};
 size_t nCount{0};
 for(const auto& aEntry : vInit)
 {
-vResult[nCount] <<= css::beans::NamedValue(aEntry.first, 
aEntry.second);
+vResult[nCount] <<= css::beans::PropertyValue(aEntry.first, -1, 
aEntry.second, css::beans::PropertyState_DIRECT_VALUE);
 ++nCount;
 }
 return vResult;
commit 8c3d3507a0a630925b5b0ccb8bee57790aab208d
Author: Jan Holesovsky 
Date:   Wed Jul 19 08:35:26 2017 +0200

comphelper: Allow initializer lists for Sequences of NamedValues.

This is particularly useful for creation of sequences that are later
unwrapped using comphelper::SequenceAsHashMap.

Eg.

uno::Sequence aArguments(comphelper::InitAnySequence(
{
{"SomethingNamed", uno::makeAny(true)},
}));

Reference 
xExporter(aFactory->createInstanceWithArguments(..., aArguments), UNO_QUERY);

and in the implementation where the arguments are consumed:

comphelper::SequenceAsHashMap aArgumentsMap(rArguments);
mbSomething = aArgumentsMap.getUnpackedValueOrDefault("SomethingNamed", 
false);

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

diff --git a/include/comphelper/propertysequence.hxx 
b/include/comphelper/propertysequence.hxx
index 28561a6904d7..6af3bb389929 100644
--- a/include/comphelper/propertysequence.hxx
+++ b/include/comphelper/propertysequence.hxx
@@ -14,10 +14,12 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 namespace comphelper
 {
+/// Init list for property sequences.
 inline css::uno::Sequence< css::beans::PropertyValue > 
InitPropertySequence(
 ::std::initializer_list< ::std::pair< OUString, css::uno::Any > > 
vInit)
 {
@@ -33,6 +35,23 @@ namespace comphelper
 }
 return vResult;
 }
+
+/// Init list for property sequences that wrap the NamedValues in Anys.
+///
+/// This is particularly useful for creation of sequences that are later
+/// unwrapped using comphelper::SequenceAsHashMap.
+inline css::uno::Sequence< css::uno::Any > InitAnySequence(
+::std::initializer_list< ::std::pair< OUString, css::uno::Any > > 
vInit)
+{
+css::uno::Sequence 
vResult{static_cast(vInit.size())};
+size_t nCount{0};
+for(const auto& aEntry : vInit)
+{
+vResult[nCount] <<= css::beans::NamedValue(aEntry.first, 
aEntry.second);
+++nCount;
+}
+return vRes

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

2017-12-07 Thread Julien Nabet
 sc/source/ui/view/tabview3.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit c195e84385c8917fab6f2091cab24d33f1e2bc6f
Author: Julien Nabet 
Date:   Tue Dec 5 22:01:26 2017 +0100

tdf#114228: fix crash when deleting sheet in specific case

1. Create a brand new ods file
2. Select L12 (so cursor is obviously on sheet1 L12)
3. Create a brand new sheet (and cursor is on sheet2 A1)
4. Delete sheet2

It crashes with gtk3, see 
https://bugs.documentfoundation.org/attachment.cgi?id=138199
As indicated in 
https://bugs.documentfoundation.org/show_bug.cgi?id=114228#c5 the tab number
is wrong
Reporting cursor management later in ScTabView::SetTabNo prevents from the 
crash

Change-Id: Iea307267d2cdcf1c01f7e72f45b6a68aeef26fa1
Reviewed-on: https://gerrit.libreoffice.org/45977
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 

diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 226eb8d91d4c..c90ea34daaae 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1810,8 +1810,6 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool 
bExtendSelection, bool bSa
 // UpdateShow before SetCursor, so that UpdateAutoFillMark finds the 
correct
 // window  (is called from SetCursor)
 UpdateShow();
-aViewData.ResetOldCursor();
-SetCursor( aViewData.GetCurX(), aViewData.GetCurY(), true );
 
 SfxBindings& rBindings = aViewData.GetBindings();
 ScMarkData& rMark = aViewData.GetMarkData();
@@ -1867,6 +1865,9 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool 
bExtendSelection, bool bSa
 UpdateVisibleRange();
 
 aViewData.GetViewShell()->WindowChanged();  // if the active 
window has changed
+aViewData.ResetOldCursor();
+SetCursor( aViewData.GetCurX(), aViewData.GetCurY(), true );
+
 if ( !bUnoRefDialog )
 aViewData.GetViewShell()->DisconnectAllClients();   // important 
for floating frames
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-12-07 Thread Aditya Dewan
 loleaflet/src/control/Ruler.js |   44 +++--
 loleaflet/src/map/Map.js   |3 +-
 2 files changed, 31 insertions(+), 16 deletions(-)

New commits:
commit a508d5b490fa246174ed9754cb93ecaef3880452
Author: Aditya Dewan 
Date:   Wed Dec 6 20:05:44 2017 +0530

Disable interactive ruler for readonly docs

Change-Id: I7982387d5dd913dd5e4ca5ff5d188ad0eed00fa6
Reviewed-on: https://gerrit.libreoffice.org/45962
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/loleaflet/src/control/Ruler.js b/loleaflet/src/control/Ruler.js
index 22453cee..68ccbfd0 100644
--- a/loleaflet/src/control/Ruler.js
+++ b/loleaflet/src/control/Ruler.js
@@ -24,6 +24,7 @@ L.Control.Ruler = L.Control.extend({
map.on('rulerupdate', this._updateOptions, this);
map.on('docsize', this._updatePaintTimer, this);
map.on('scrolloffset resize', this._fixOffset, this);
+   map.on('updatepermission', this._changeInteractions, this);
this._map = map;
 
return this._initLayout();
@@ -34,6 +35,22 @@ L.Control.Ruler = L.Control.extend({
this.options.timer = setTimeout(L.bind(this._updateBreakPoints, 
this), 300);
},
 
+   _changeInteractions: function(e) {
+   if (e.perm === 'edit') {
+   this._lMarginDrag.style.cursor = 'e-resize';
+   this._rMarginDrag.style.cursor = 'w-resize';
+
+   L.DomEvent.on(this._rMarginDrag, 'mousedown', 
this._initiateDrag, this);
+   L.DomEvent.on(this._lMarginDrag, 'mousedown', 
this._initiateDrag, this);
+   }
+   else {
+   this._lMarginDrag.style.cursor = 'default';
+   this._rMarginDrag.style.cursor = 'default';
+
+   L.DomEvent.off(this._rMarginDrag, 'mousedown', 
this._initiateDrag, this);
+   L.DomEvent.off(this._lMarginDrag, 'mousedown', 
this._initiateDrag, this);
+   }
+   },
 
_initLayout: function() {
this._rWrapper = L.DomUtil.create('div', 'loleaflet-ruler 
leaflet-bar leaflet-control leaflet-control-custom');
@@ -112,28 +129,25 @@ L.Control.Ruler = L.Control.extend({
this._lMarginMarker = L.DomUtil.create('div', 
classMargin + ' ' + leftComp, this._rFace);
this._rMarginMarker =  L.DomUtil.create('div', 
classMargin + ' ' + rightComp, this._rFace);
 
-   if (this.options.interactive) {
-   this._lMarginDrag = L.DomUtil.create('div', 
classDraggable + ' ' + leftComp, this._rMarginWrapper);
-   this._lToolTip = L.DomUtil.create('div', 
lToolTip, this._lMarginDrag)
-   this._rMarginDrag = L.DomUtil.create('div', 
classDraggable + ' ' + rightComp, this._rMarginWrapper);
-   this._rToolTip = L.DomUtil.create('div', 
rToolTip, this._rMarginDrag)
-   this._lMarginDrag.style.cursor = 'e-resize';
-   this._rMarginDrag.style.cursor = 'w-resize';
-   this._lMarginDrag.title = leftMarginStr;
-   this._rMarginDrag.title = rightMarginStr;
-   }
+   this._lMarginDrag = L.DomUtil.create('div', 
classDraggable + ' ' + leftComp, this._rMarginWrapper);
+   this._lToolTip = L.DomUtil.create('div', lToolTip, 
this._lMarginDrag)
+   this._rMarginDrag = L.DomUtil.create('div', 
classDraggable + ' ' + rightComp, this._rMarginWrapper);
+   this._rToolTip = L.DomUtil.create('div', rToolTip, 
this._rMarginDrag)
+   this._lMarginDrag.title = leftMarginStr;
+   this._rMarginDrag.title = rightMarginStr;
}
 
this._lMarginMarker.style.width = 
(DraggableConvertRatio*lMargin) + 'px';
this._rMarginMarker.style.width = 
(DraggableConvertRatio*rMargin) + 'px';
+   this._lMarginDrag.style.width = (DraggableConvertRatio*lMargin) 
+ 'px';
+   this._rMarginDrag.style.width = (DraggableConvertRatio*rMargin) 
+ 'px';
 
if (this.options.interactive) {
-   this._lMarginDrag.style.width = 
(DraggableConvertRatio*lMargin) + 'px';
-   this._rMarginDrag.style.width = 
(DraggableConvertRatio*rMargin) + 'px';
+   this._changeInteractions({perm:'edit'});
+   }
+   else {
+   this._changeInteractions({perm:'readonly'});
}
-
-   L.DomEvent.on(this._rMarginDrag, 'mousedown', 
this._initiateDrag, this);
-   L.DomEvent.on(this._lMarginDrag, 'mousedown', 
this._initiateDrag, this);
},
 
  

[Libreoffice-commits] core.git: config_host.mk.in configure.ac

2017-12-07 Thread David Tardon
 config_host.mk.in |1 +
 configure.ac  |7 +++
 2 files changed, 8 insertions(+)

New commits:
commit d21267b50321749e894f4cb792b14b832ccbd7a3
Author: David Tardon 
Date:   Thu Dec 7 13:45:31 2017 +0100

allow to build online help too

Change-Id: I9b26f952dc681893b25712451535f4b539fd615d

diff --git a/config_host.mk.in b/config_host.mk.in
index 2281a90d891c..5a71f572258b 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -246,6 +246,7 @@ export 
HAVE_LD_BSYMBOLIC_FUNCTIONS=@HAVE_LD_BSYMBOLIC_FUNCTIONS@
 export HAVE_LD_HASH_STYLE=@HAVE_LD_HASH_STYLE@
 export HAVE_POSIX_FALLOCATE=@HAVE_POSIX_FALLOCATE@
 export HELP_COMMON_ONLY=@HELP_COMMON_ONLY@
+export HELP_ONLINE=@HELP_ONLINE@
 export HOST_PLATFORM=@host@
 export HSQLDB_JAR=@HSQLDB_JAR@
 export HSQLDB_USE_JDBC_4_1=@HSQLDB_USE_JDBC_4_1@
diff --git a/configure.ac b/configure.ac
index 91437559fbde..e2833c8bb7af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1866,6 +1866,7 @@ AC_ARG_WITH(help,
   Usage: --with-helpbuild the old local help
  --without-help no local help (default)
  --with-help=html   build the new HTML local 
help
+ --with-help=online build the new HTML online 
help
  --with-help=common bundle common files for 
the local
 help but do not build the 
whole help
 ],
@@ -4604,6 +4605,11 @@ if test -n "$with_help" -a "$with_help" != "no" -a $_os 
!= iOS -a $_os != Androi
 ENABLE_HTMLHELP=TRUE
 AC_MSG_RESULT([HTML])
 ;;
+"online")
+ENABLE_HTMLHELP=TRUE
+HELP_ONLINE=TRUE
+AC_MSG_RESULT([HTML])
+;;
 *)
 SCPDEFS="$SCPDEFS -DWITH_HELP"
 AC_MSG_RESULT([yes])
@@ -4614,6 +4620,7 @@ else
 fi
 AC_SUBST([ENABLE_HTMLHELP])
 AC_SUBST(HELP_COMMON_ONLY)
+AC_SUBST([HELP_ONLINE])
 
 dnl Test whether to include MySpell dictionaries
 dnl ===
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: CustomTarget_html.mk

2017-12-07 Thread David Tardon
 CustomTarget_html.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6dbfefa1bae14ab217abc5847d4a886a5755
Author: David Tardon 
Date:   Thu Dec 7 13:45:16 2017 +0100

allow to build online help too

Change-Id: Ib926dc2cd815a8d7e43c7cdcbccecd6c65f11980

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index 4335e9949..4c45dc44f 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -101,7 +101,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/html.text : \
$(call gb_ExternalExecutable_get_command,xsltproc) \
--stringparam fileTree '/' \
--stringparam Language $* \
-   --stringparam local 'yes' \
+   --stringparam local $(if 
$(HELP_ONLINE),'no','yes') \
--stringparam root `pwd`/ \
--stringparam productversion $(PRODUCTVERSION) \
-o $(dir $@)$${xhp%.xhp}.html \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-12-07 Thread David Tardon
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3dacb5a430b879f22266c06f47d6b78502cb1af2
Author: David Tardon 
Date:   Thu Dec 7 13:45:16 2017 +0100

Updated core
Project: help  6dbfefa1bae14ab217abc5847d4a886a5755

allow to build online help too

Change-Id: Ib926dc2cd815a8d7e43c7cdcbccecd6c65f11980

diff --git a/helpcontent2 b/helpcontent2
index ba16363fee28..6dbfefa1bae1 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit ba16363fee2832acf3a33c718fa60cfb5aa67fc8
+Subproject commit 6dbfefa1bae14ab217abc5847d4a886a5755
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: config_host.mk.in configure.ac Repository.mk solenv/gbuild

2017-12-07 Thread David Tardon
 Repository.mk|2 +-
 config_host.mk.in|1 +
 configure.ac |   17 +
 solenv/gbuild/AllLangHelp.mk |8 
 solenv/gbuild/HelpTarget.mk  |   35 ++-
 5 files changed, 57 insertions(+), 6 deletions(-)

New commits:
commit c9904bdd5bf2645c9723a8135c5fbceadb6b9aed
Author: David Tardon 
Date:   Tue Dec 5 12:43:30 2017 +0100

allow to build only HTML help

Change-Id: I4debf079be228e5ce5fae5f1a153f78800407a59

diff --git a/Repository.mk b/Repository.mk
index 4257bd26b799..f895573b2416 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -907,7 +907,7 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
$(if $(filter $(OS),MACOSX),vcl_osxres) \
xmloff_dtd \
xmlscript_dtd \
-   xmlhelp_helpxsl \
+   $(if $(ENABLE_HTMLHELP),,xmlhelp_helpxsl) \
$(if $(ENABLE_JAVA),\
scripting_java \
scripting_java_jars \
diff --git a/config_host.mk.in b/config_host.mk.in
index 804d18766ad3..2281a90d891c 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -134,6 +134,7 @@ export ENABLE_GTK3=@ENABLE_GTK3@
 export ENABLE_GTK=@ENABLE_GTK@
 export ENABLE_GTK_PRINT=@ENABLE_GTK_PRINT@
 export ENABLE_HEADLESS=@ENABLE_HEADLESS@
+export ENABLE_HTMLHELP=@ENABLE_HTMLHELP@
 export ENABLE_JAVA=@ENABLE_JAVA@
 export ENABLE_KDE4=@ENABLE_KDE4@
 export ENABLE_LPSOLVE=@ENABLE_LPSOLVE@
diff --git a/configure.ac b/configure.ac
index e8d1f6a9bfa7..91437559fbde 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1863,8 +1863,9 @@ AC_ARG_WITH(help,
  can be used to bundle only the common part, .e.g help-specific icons.
  This is useful when you build the helpcontent separately.])
 [
-  Usage: --with-helpbuild the entire local help
+  Usage: --with-helpbuild the old local help
  --without-help no local help (default)
+ --with-help=html   build the new HTML local 
help
  --with-help=common bundle common files for 
the local
 help but do not build the 
whole help
 ],
@@ -4594,16 +4595,24 @@ HELP_COMMON_ONLY=FALSE
 if test -n "$with_help" -a "$with_help" != "no" -a $_os != iOS -a $_os != 
Android; then
 BUILD_TYPE="$BUILD_TYPE HELP"
 GIT_NEEDED_SUBMODULES="helpcontent2 $GIT_NEEDED_SUBMODULES"
-if test "$with_help" = "common" ; then
+case "$with_help" in
+"common")
 HELP_COMMON_ONLY=TRUE
 AC_MSG_RESULT([common only])
-else
+;;
+"html")
+ENABLE_HTMLHELP=TRUE
+AC_MSG_RESULT([HTML])
+;;
+*)
 SCPDEFS="$SCPDEFS -DWITH_HELP"
 AC_MSG_RESULT([yes])
-fi
+;;
+esac
 else
 AC_MSG_RESULT([no])
 fi
+AC_SUBST([ENABLE_HTMLHELP])
 AC_SUBST(HELP_COMMON_ONLY)
 
 dnl Test whether to include MySpell dictionaries
diff --git a/solenv/gbuild/AllLangHelp.mk b/solenv/gbuild/AllLangHelp.mk
index dca6c7090b07..bf1732521cdb 100644
--- a/solenv/gbuild/AllLangHelp.mk
+++ b/solenv/gbuild/AllLangHelp.mk
@@ -25,11 +25,15 @@ $(dir $(call gb_AllLangHelp_get_target,%))%/.dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
 
 $(call gb_AllLangHelp_get_target,%) :
+ifeq ($(ENABLE_HTMLHELP),)
$(call gb_Output_announce,$*,$(true),ALH,5)
+endif
touch $@
 
 $(call gb_AllLangHelp_get_clean_target,%) :
+ifeq ($(ENABLE_HTMLHELP),)
$(call gb_Output_announce,$*,$(false),ALH,5)
+endif
$(call gb_Helper_abbreviate_dirs,\
rm -f $(call gb_AllLangHelp_get_target,$*) \
)
@@ -40,9 +44,13 @@ $(call gb_HelpTarget_HelpTarget,$(3),$(1),$(2))
 $(call gb_HelpTarget_set_helpdir,$(3),$(gb_AllLangHelp_HELPDIR))
 
 $(call gb_AllLangHelp_get_target,$(1)) : $(call gb_HelpTarget_get_target,$(3))
+ifeq ($(ENABLE_HTMLHELP),)
 $(call gb_AllLangHelp_get_target,$(1)) : $(call gb_Package_get_target,$(call 
gb_HelpTarget_get_packagename,$(3)))
+endif
 $(call gb_AllLangHelp_get_clean_target,$(1)) : $(call 
gb_HelpTarget_get_clean_target,$(3))
+ifeq ($(ENABLE_HTMLHELP),)
 $(call gb_AllLangHelp_get_clean_target,$(1)) : $(call 
gb_Package_get_clean_target,$(call gb_HelpTarget_get_packagename,$(3)))
+endif
 
 endef
 
diff --git a/solenv/gbuild/HelpTarget.mk b/solenv/gbuild/HelpTarget.mk
index bbcd86d36dcd..58bb552c6694 100644
--- a/solenv/gbuild/HelpTarget.mk
+++ b/solenv/gbuild/HelpTarget.mk
@@ -542,7 +542,7 @@ $(if $(call gb_HelpTarget__is_default_lang,$(1)) \
 endef
 
 define gb_HelpTarget__command
-$(call gb_Output_announce,$(2),$(true),HLP,4)
+$(if $(ENABLE_HTMLHELP),,$(call gb_Output_announce,$(2),$(true),HLP,4))
 touch $@
 endef
 
@@ -567,7 +567,9 @@ $(call gb_HelpTarget_get_target,%) :
 
 .PHONY : $(call gb_HelpTarget_get_clean_target,%)
 $(call gb_HelpTarget_get_clean_target,%) :
+ifeq ($(ENABLE_HTMLHELP),)
$(call g

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - sw/qa sw/source

2017-12-07 Thread Szymon Kłos
 sw/qa/extras/uiwriter/uiwriter.cxx |4 
 sw/source/core/edit/edfcol.cxx |7 ---
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 29bbc24dd4c5c541c45c0584754c6635edd1f15c
Author: Szymon Kłos 
Date:   Mon Dec 4 12:45:11 2017 +0100

tdf#113037 Watermark centered in DOC

Reviewed-on: https://gerrit.libreoffice.org/45804
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 58784b89c22c6d63fff18fea0aa6636a1370044c)

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

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 55d14a9efd54..d022e2fb26c6 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -927,6 +927,10 @@ void SwUiWriterTest::testWatermarkPosition()
 
 // Check if Watermark is inside a page
 CPPUNIT_ASSERT_MESSAGE(aMessage.str(), nPageHeight >= rRect.Bottom());
+
+// Check if Watermark is centered
+CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::CENTER, 
getProperty(xShape, "HoriOrient"));
+CPPUNIT_ASSERT_EQUAL(text::VertOrientation::CENTER, 
getProperty(xShape, "VertOrient"));
 }
 }
 
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 1f14403f475b..e8c4c6bc6c04 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -469,7 +469,6 @@ void lcl_placeWatermarkInHeader(const SfxWatermarkItem& 
rWatermark,
 xPropertySet->setPropertyValue(UNO_NAME_FILLCOLOR, 
uno::makeAny(static_cast(nColor)));
 xPropertySet->setPropertyValue(UNO_NAME_FILLSTYLE, 
uno::makeAny(drawing::FillStyle_SOLID));
 xPropertySet->setPropertyValue(UNO_NAME_FILL_TRANSPARENCE, 
uno::makeAny(nTransparency));
-xPropertySet->setPropertyValue(UNO_NAME_HORI_ORIENT_RELATION, 
uno::makeAny(static_cast(text::RelOrientation::PAGE_PRINT_AREA)));
 xPropertySet->setPropertyValue(UNO_NAME_LINESTYLE, 
uno::makeAny(drawing::LineStyle_NONE));
 xPropertySet->setPropertyValue(UNO_NAME_OPAQUE, uno::makeAny(false));
 xPropertySet->setPropertyValue(UNO_NAME_TEXT_AUTOGROWHEIGHT, 
uno::makeAny(false));
@@ -477,13 +476,12 @@ void lcl_placeWatermarkInHeader(const SfxWatermarkItem& 
rWatermark,
 xPropertySet->setPropertyValue(UNO_NAME_TEXT_MINFRAMEHEIGHT, 
uno::makeAny(nFrameHeight));
 xPropertySet->setPropertyValue(UNO_NAME_TEXT_MINFRAMEWIDTH, 
uno::makeAny(nWidth));
 xPropertySet->setPropertyValue(UNO_NAME_TEXT_WRAP, 
uno::makeAny(text::WrapTextMode_THROUGHT));
+xPropertySet->setPropertyValue(UNO_NAME_HORI_ORIENT_RELATION, 
uno::makeAny(static_cast(text::RelOrientation::PAGE_PRINT_AREA)));
 xPropertySet->setPropertyValue(UNO_NAME_VERT_ORIENT_RELATION, 
uno::makeAny(static_cast(text::RelOrientation::PAGE_PRINT_AREA)));
 xPropertySet->setPropertyValue(UNO_NAME_CHAR_FONT_NAME, 
uno::makeAny(sFont));
 xPropertySet->setPropertyValue(UNO_NAME_CHAR_HEIGHT, 
uno::makeAny(WATERMARK_AUTO_SIZE));
 xPropertySet->setPropertyValue(UNO_NAME_TEXT_UPPERDIST, 
uno::makeAny(sal_Int32(nFrameHeight - nHeight)));
 xPropertySet->setPropertyValue("Transformation", 
uno::makeAny(aMatrix));
-xPropertySet->setPropertyValue(UNO_NAME_HORI_ORIENT, 
uno::makeAny(static_cast(text::HoriOrientation::CENTER)));
-xPropertySet->setPropertyValue(UNO_NAME_VERT_ORIENT, 
uno::makeAny(static_cast(text::VertOrientation::CENTER)));
 
 uno::Reference xTextRange(xShape, uno::UNO_QUERY);
 xTextRange->setString(rWatermark.GetText());
@@ -512,6 +510,9 @@ void lcl_placeWatermarkInHeader(const SfxWatermarkItem& 
rWatermark,
 xPropertySet->getPropertyValue("Transformation") >>= aMatrix;
 xPropertySet->setPropertyValue("Transformation", 
uno::makeAny(aMatrix));
 
+xPropertySet->setPropertyValue(UNO_NAME_HORI_ORIENT, 
uno::makeAny(static_cast(text::HoriOrientation::CENTER)));
+xPropertySet->setPropertyValue(UNO_NAME_VERT_ORIENT, 
uno::makeAny(static_cast(text::VertOrientation::CENTER)));
+
 uno::Reference xNamed(xShape, uno::UNO_QUERY);
 xNamed->setName(sWatermark);
 xLockable->removeActionLock();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: CustomTarget_html.mk GeneratedPackage_html_media.mk GeneratedPackage_html.mk help3xsl/get_hid2file.sh Module_helpcontent2.mk Package_html.mk Package_html_static.mk

2017-12-07 Thread David Tardon
 CustomTarget_html.mk   |  170 +
 GeneratedPackage_html.mk   |   18 
 GeneratedPackage_html_media.mk |   18 
 Module_helpcontent2.mk |   10 ++
 Package_html.mk|   25 ++
 Package_html_static.mk |   26 ++
 help3xsl/get_hid2file.sh   |3 
 7 files changed, 268 insertions(+), 2 deletions(-)

New commits:
commit ba16363fee2832acf3a33c718fa60cfb5aa67fc8
Author: David Tardon 
Date:   Thu Nov 23 19:39:38 2017 +0100

move generation of HTML help to gbuild

Change-Id: Ic38ee7b9a3ee4a45bede9d494f717d833e53d69f

diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
new file mode 100644
index 0..4335e9949
--- /dev/null
+++ b/CustomTarget_html.mk
@@ -0,0 +1,170 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,helpcontent2/help3xsl))
+
+# HACK!!
+html_TREE_MODULES := sbasic scalc schart shared simpress smath swriter
+html_TEXT_MODULES := $(html_TREE_MODULES) sdatabase sdraw
+html_BMARK_MODULES := scalc:CALC schart:CHART swriter:WRITER sdraw:DRAW 
simpress:IMPRESS smath:MATH sbasic:BASIC shared:SHARED 
shared/explorer/database:BASE
+
+$(eval $(call gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
+   hid2file.js \
+   $(foreach lang,$(gb_HELP_LANGS),\
+   $(lang)/bookmarks.js \
+   $(lang)/contents.js \
+   $(lang)/html.text \
+   $(foreach 
module,$(html_TREE_MODULES),$(module)/$(lang)/contents.part) \
+   $(foreach module,$(html_BMARK_MODULES),$(firstword $(subst :, 
,$(module)))/$(lang)/bookmarks.part) \
+   ) \
+))
+
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
+   $(SRCDIR)/helpcontent2/help3xsl/get_url.xsl \
+   $(call gb_ExternalExecutable_get_dependencies,xsltproc)
+   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
+   $(call gb_Helper_abbreviate_dirs,\
+   ( \
+   echo 'var map={' \
+   && find $(SRCDIR)/helpcontent2/source/text -type f 
-name '*.xhp' \
+   | while read xhp; do \
+   $(call 
gb_ExternalExecutable_get_command,xsltproc) $< $$xhp \
+   | $(gb_AWK) 'NF' \
+   ; done \
+   && echo '};' \
+   ) > $@ \
+   )
+
+define html_gen_contents_html_dep
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
$(call gb_HelpTarget__get_treefile,$(1),$(3))
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
TREE_FILE := $(call gb_HelpTarget__get_treefile,$(1),$(3))
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.part : 
LANG := $(2)
+
+endef
+
+define html_gen_contents_dep
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/contents.js : \
+   $(foreach module,$(html_TREE_MODULES),\
+   $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(module)/$(1)/contents.part)
+$(foreach module,$(html_TREE_MODULES),$(call 
html_gen_contents_html_dep,$(module)/$(1),$(1),helpcontent2/source/auxiliary/$(module)))
+
+endef
+
+$(eval $(foreach lang,$(gb_HELP_LANGS),$(call html_gen_contents_dep,$(lang
+
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.js :
+   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CAT,2)
+   $(call gb_Helper_abbreviate_dirs,\
+   ( \
+   echo 
"document.getElementById(\"Contents\").innerHTML='\\" \
+   && cat $(filter %.part,$^) | $(gb_AWK) 'NF' \
+   && echo "';" \
+   ) > $@ \
+   )
+
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/contents.part : \
+   $(SRCDIR)/helpcontent2/help3xsl/get_tree.xsl \
+   $(call gb_ExternalExecutable_get_dependencies,xsltproc)
+   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),XSL,1)
+   $(call gb_Helper_abbreviate_dirs,\
+   $(call gb_ExternalExecutable_get_command,xsltproc) \
+   --stringparam lang $(LANG) \
+   --stringparam productversion $(PRODUCTVERSION) \
+   -o $@ \
+   $(SRCDIR)/helpcontent2/help3xsl/get_tree.xsl \
+   $(TREE_FILE) \
+   )
+
+define html_gen_html_dep
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/html.text : \
+   $(foreach module,$(html_TEXT_MODULES),$(call 
gb_HelpTranslateTarget_get_target,$(module)/$(1)))
+
+endef
+
+$(eval

[Libreoffice-commits] core.git: helpcontent2

2017-12-07 Thread David Tardon
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 706429497eae9597aca5c2578045cb9b63762b3e
Author: David Tardon 
Date:   Thu Nov 23 19:39:38 2017 +0100

Updated core
Project: help  ba16363fee2832acf3a33c718fa60cfb5aa67fc8

move generation of HTML help to gbuild

Change-Id: Ic38ee7b9a3ee4a45bede9d494f717d833e53d69f

diff --git a/helpcontent2 b/helpcontent2
index fb2f695bb4ad..ba16363fee28 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit fb2f695bb4ad8ed6a9eeef0e155526df169796f3
+Subproject commit ba16363fee2832acf3a33c718fa60cfb5aa67fc8
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: tests sc_array_functions_test fail due to floating point precision

2017-12-07 Thread Eike Rathke
Hi Milton,

On Saturday, 2017-12-02 02:47:03 -0500, Milton Vandersloot wrote:

> I've also opened the other test documents in 
> sc/qa/unit/data/functions/array/fods/ using LibreOffice. The documents which 
> fail are linest.fods and also logest.fods. The others succeed.

If your build completed ignoring these tests (i.e. produced a usable
office under ./instdir/), could you please open the failing documents
and tell us the cell addresses on the second sheet where tests fail and
the actual values they produced?

Thanks
  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Care about Free Software, support the FSFE https://fsfe.org/support/?erack


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


[Libreoffice-commits] core.git: Repository.mk

2017-12-07 Thread David Tardon
 Repository.mk |4 
 1 file changed, 4 insertions(+)

New commits:
commit 253667523270b3a50464a6ef1e353267de38a2e9
Author: David Tardon 
Date:   Mon Nov 27 10:11:50 2017 +0100

move generation of HTML help to gbuild

Change-Id: I3b13e6e29a0436ce18532ab4ef131229aa640d9b

diff --git a/Repository.mk b/Repository.mk
index b2714c5f6e22..4257bd26b799 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -793,6 +793,10 @@ $(eval $(call gb_Helper_register_packages, \
test_unittest \
cli_basetypes_copy \
extras_wordbook \
+   $(if $(ENABLE_HTMLHELP),\
+   helpcontent2_html_static \
+   helpcontent2_html \
+   ) \
instsetoo_native_setup \
$(if $(ENABLE_OOENV),instsetoo_native_ooenv) \
postprocess_registry \
___
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' - filter/source oox/source sw/qa sw/source

2017-12-07 Thread Szymon Kłos
 filter/source/msfilter/msdffimp.cxx   |   17 ++---
 oox/source/vml/vmlshape.cxx   |   15 +--
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx |3 ++-
 sw/source/core/edit/edfcol.cxx|   29 -
 4 files changed, 37 insertions(+), 27 deletions(-)

New commits:
commit b66435c3fcff5eb198f0037067294c1203ebcd76
Author: Szymon Kłos 
Date:   Thu Nov 30 18:26:11 2017 +0100

tdf#113037 Unify Watermark in DOC & DOCX

* use correct font for calculations

Reviewed-on: https://gerrit.libreoffice.org/45698
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 923ca4efe2095998e3da75c372cd7d716db9abb3)

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

diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index 36a3f59c3787..b32c3d926f90 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "viscache.hxx"
 
 // SvxItem-Mapping. Is needed to successfully include the SvxItem-Header
@@ -4411,16 +4412,18 @@ SdrObject* SvxMSDffManager::ImportShape( const 
DffRecordHeader& rHd, SvStream& r
 aSet.Put(makeSdrTextAutoGrowWidthItem(false));
 
 double fRatio = 0;
-OutputDevice* pOut = Application::GetDefaultDevice();
-vcl::Font aFont( pOut->GetFont() );
+VclPtr pDevice = 
VclPtr::Create();
+vcl::Font aFont = pDevice->GetFont();
 aFont.SetFamilyName( aFontName );
-Rectangle aBoundingRect;
-pOut->GetTextBoundRect( aBoundingRect, aObjectText );
+aFont.SetFontSize( Size( 0, 96 ) );
+pDevice->SetFont( aFont );
 
-OUString aObjName = GetPropertyString(DFF_Prop_wzName, 
rSt);
-if ( aBoundingRect.GetWidth() && aObjData.eShapeType 
== mso_sptTextPlainText && aObjName.match( "PowerPlusWaterMarkObject" ) )
+auto nTextWidth = pDevice->GetTextWidth( aObjectText );
+OUString aObjName = GetPropertyString( 
DFF_Prop_wzName, rSt );
+if ( nTextWidth && aObjData.eShapeType == 
mso_sptTextPlainText
+&& aObjName.match( "PowerPlusWaterMarkObject" ) )
 {
-fRatio = (double)aBoundingRect.GetHeight() / 
aBoundingRect.GetWidth();
+fRatio = (double)pDevice->GetTextHeight() / 
nTextWidth;
 sal_Int32 nNewHeight = fRatio * 
aObjData.aBoundRect.getWidth();
 sal_Int32 nPaddingY = 
aObjData.aBoundRect.getHeight() - nNewHeight;
 
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index a9d31b26c82d..d82076315acb 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -22,6 +22,7 @@
 
 #include "oox/vml/vmlshape.hxx"
 #include 
+#include 
 
 #include 
 #include 
@@ -1134,15 +1135,17 @@ sal_Int32 lcl_correctWatermarkRect( awt::Rectangle& 
rShapeRect, const OUString&
 {
 sal_Int32 nPaddingY = 0;
 double fRatio = 0;
-OutputDevice* pOut = Application::GetDefaultDevice();
-vcl::Font aFont( pOut->GetFont() );
+VclPtr pDevice = VclPtr::Create();
+vcl::Font aFont = pDevice->GetFont();
 aFont.SetFamilyName( sFont );
+aFont.SetFontSize( Size( 0, 96 ) );
+pDevice->SetFont( aFont );
 
-Rectangle aBoundingRect;
-pOut->GetTextBoundRect( aBoundingRect, sText );
-if( aBoundingRect.GetWidth() )
+auto nTextWidth = pDevice->GetTextWidth( sText );
+if( nTextWidth )
 {
-fRatio = (double)aBoundingRect.GetHeight() / aBoundingRect.GetWidth();
+fRatio = pDevice->GetTextHeight();
+fRatio /= nTextWidth;
 
 sal_Int32 nNewHeight = fRatio * rShapeRect.Width;
 nPaddingY = rShapeRect.Height - nNewHeight;
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 9740bc954397..97a5098d2373 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -614,8 +614,9 @@ DECLARE_OOXMLEXPORT_TEST(testWatermarkSize, 
"watermark.docx")
 // Rounding errors
 sal_Int32 nDifference = 5198 - nTotalHeight;
 std::stringstream ss;
-ss << "Difference: " << nDifference;
+ss << "Difference: " << nDifference << " TotalHeight: " << nTotalHeight;
 CPPUNIT_ASSERT_MESSAGE(ss.str(), nDifference <= 4);
+CPPUNIT_ASSERT_MESSAGE(ss.str(), nDifference >= -4);
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source

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

2017-12-07 Thread Caolán McNamara
 lotuswordpro/source/filter/lwplayout.cxx |   15 ---
 lotuswordpro/source/filter/lwplayout.hxx |1 +
 2 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit b08c480ea439c3496f5a8f10c154af3f183f0049
Author: Caolán McNamara 
Date:   Thu Dec 7 08:56:44 2017 +

ofz#4548 infinite regress in GetUsePrinterSettings

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

diff --git a/lotuswordpro/source/filter/lwplayout.cxx 
b/lotuswordpro/source/filter/lwplayout.cxx
index cdaa7ab7dfa3..30ec9d0a4805 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -81,6 +81,7 @@ LwpVirtualLayout::LwpVirtualLayout(LwpObjectHeader const 
&objHdr, LwpSvStream* p
 , m_bGettingIsProtected(false)
 , m_bGettingMarginsValue(false)
 , m_bGettingExtMarginsValue(false)
+, m_bGettingUsePrinterSettings(false)
 , m_nAttributes(0)
 , m_nAttributes2(0)
 , m_nAttributes3(0)
@@ -1405,19 +1406,27 @@ XFBGImage* LwpMiddleLayout::GetXFBGImage()
 */
 bool LwpMiddleLayout::GetUsePrinterSettings()
 {
+if (m_bGettingUsePrinterSettings)
+throw std::runtime_error("recursion in layout");
+m_bGettingUsePrinterSettings = true;
+
+bool bRet = false;
+
 if(m_nOverrideFlag & OVER_SIZE)
 {
-return (m_nAttributes3 & STYLE3_USEPRINTERSETTINGS) != 0;
+bRet = (m_nAttributes3 & STYLE3_USEPRINTERSETTINGS) != 0;
 }
 else
 {
 rtl::Reference xBase(GetBasedOnStyle());
 if (LwpMiddleLayout* pLay = 
dynamic_cast(xBase.get()))
 {
-return pLay->GetUsePrinterSettings();
+bRet = pLay->GetUsePrinterSettings();
 }
 }
-return false;
+
+m_bGettingUsePrinterSettings = false;
+return bRet;
 }
 
 //Check whether there are contents in the layout
diff --git a/lotuswordpro/source/filter/lwplayout.hxx 
b/lotuswordpro/source/filter/lwplayout.hxx
index efff5f62fd07..cd84af5b380b 100644
--- a/lotuswordpro/source/filter/lwplayout.hxx
+++ b/lotuswordpro/source/filter/lwplayout.hxx
@@ -226,6 +226,7 @@ protected:
 bool m_bGettingIsProtected;
 bool m_bGettingMarginsValue;
 bool m_bGettingExtMarginsValue;
+bool m_bGettingUsePrinterSettings;
 sal_uInt32 m_nAttributes;
 sal_uInt32 m_nAttributes2;
 sal_uInt32 m_nAttributes3;
___
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' - oox/source sw/qa

2017-12-07 Thread Szymon Kłos
 oox/source/export/vmlexport.cxx  |   18 ++-
 oox/source/vml/vmlshape.cxx  |   68 ++-
 sw/qa/extras/ooxmlexport/data/watermark.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx|   17 ++
 4 files changed, 101 insertions(+), 2 deletions(-)

New commits:
commit 3e4e3ee3dba7fa65263e71da0bc0091d4e950d33
Author: Szymon Kłos 
Date:   Thu Nov 2 19:53:53 2017 +0100

tdf#113037 DOCX Watermark correct ratio

Import and export Watermark with padding like MSO does.
Shape is scaled to save correct ratio.

Reviewed-on: https://gerrit.libreoffice.org/44319
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 
(cherry picked from commit a3a917748892a6a3194ebfc4db64cfd764cc054a)

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

diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index cf6e5d6234f2..bc2f377f0fd5 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include "rtl/bootstrap.hxx"
+#include 
 #include 
 #include 
 
@@ -393,7 +394,22 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, 
const Rectangle& rRect
 if ( m_nShapeType == ESCHER_ShpInst_Line )
 AddLineDimensions( rRect );
 else
-AddRectangleDimensions( *m_pShapeStyle, rRect );
+{
+if ( IsWaterMarkShape( m_pSdrObject->GetName() ) )
+{
+// Watermark need some padding to be compatible with MSO
+long nPaddingY = 0;
+const SfxItemSet& rSet = m_pSdrObject->GetMergedItemSet();
+if ( const SdrMetricItem* pItem = static_cast( rSet.GetItem( SDRATTR_TEXT_UPPERDIST ) ) )
+nPaddingY += pItem->GetValue();
+
+Rectangle aRect( rRect );
+aRect.setHeight( aRect.getHeight() + nPaddingY );
+AddRectangleDimensions( *m_pShapeStyle, aRect );
+}
+else
+AddRectangleDimensions( *m_pShapeStyle, rRect );
+}
 
 // properties
 bool bAlreadyWritten[ 0xFFF ];
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 814835fae503..a9d31b26c82d 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -66,6 +66,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using ::com::sun::star::beans::XPropertySet;
 using ::com::sun::star::uno::Any;
@@ -1101,12 +1102,77 @@ CustomShape::CustomShape( Drawing& rDrawing ) :
 {
 }
 
+static OUString lcl_getFontFamily( const oox::OptValue& rStyle )
+{
+OUString sFont = "";
+
+if( rStyle.has() )
+{
+OUString aStyle = rStyle.get( OUString() );
+
+sal_Int32 nIndex = 0;
+while( nIndex >= 0 )
+{
+OUString aName;
+if( ConversionHelper::separatePair( aName, sFont, aStyle.getToken( 
0, ';', nIndex ), ':' ) )
+{
+if( aName == "font-family" )
+{
+// remove " (first, and last character)
+if( sFont.getLength() > 2 )
+sFont = sFont.copy( 1, sFont.getLength() - 2 );
+}
+}
+}
+}
+
+return sFont;
+}
+
+/// modifies rShapeRect's height and returns difference
+sal_Int32 lcl_correctWatermarkRect( awt::Rectangle& rShapeRect, const 
OUString& sFont, const OUString& sText )
+{
+sal_Int32 nPaddingY = 0;
+double fRatio = 0;
+OutputDevice* pOut = Application::GetDefaultDevice();
+vcl::Font aFont( pOut->GetFont() );
+aFont.SetFamilyName( sFont );
+
+Rectangle aBoundingRect;
+pOut->GetTextBoundRect( aBoundingRect, sText );
+if( aBoundingRect.GetWidth() )
+{
+fRatio = (double)aBoundingRect.GetHeight() / aBoundingRect.GetWidth();
+
+sal_Int32 nNewHeight = fRatio * rShapeRect.Width;
+nPaddingY = rShapeRect.Height - nNewHeight;
+rShapeRect.Height = nNewHeight;
+}
+
+return nPaddingY;
+}
+
 Reference< XShape > CustomShape::implConvertAndInsert( const Reference< 
XShapes >& rxShapes, const awt::Rectangle& rShapeRect ) const
 {
+awt::Rectangle aShapeRect( rShapeRect );
+
+// Add padding for Watermark like Word does
+sal_Int32 nPaddingY = 0;
+if( getShapeName().match( "PowerPlusWaterMarkObject" ) && 
maTypeModel.maTextpathModel.moString.has() )
+{
+OUString sText = maTypeModel.maTextpathModel.moString.get();
+OUString sFont = lcl_getFontFamily( 
maTypeModel.maTextpathModel.moStyle );
+nPaddingY = lcl_correctWatermarkRect( aShapeRect, sFont, sText );
+}
+
 // try to create a custom shape
-Reference< XShape > xShape = SimpleShape::implConvertAndInsert( rxShapes, 
rShapeRect );
+Reference< XShape > xShape = SimpleShape::implConvertAndInsert( rxShapes, 
aShapeRect );
 if( xShape.is() ) try
 {
+ 

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

2017-12-07 Thread Eike Rathke
 sc/source/core/data/document.cxx |2 -
 shell/Library_localebe.mk|1 
 shell/source/backends/localebe/localebackend.cxx |   34 ++-
 3 files changed, 29 insertions(+), 8 deletions(-)

New commits:
commit bfe2fb8ceed6643574010bf7b40f04d149f0fd6d
Author: Eike Rathke 
Date:   Wed Dec 6 13:21:50 2017 +0100

Handle conversion from glibc locale to BCP 47 language tag

The backend's ImplGetLocale() didn't handle variants, so
ca_ES@valencia ended up as ca-ES instead of ca-ES-valencia, which
made a difference with for example the UI language being set to
Default resulting in only ca instead of ca-valencia, which then
is also written to /org.openoffice.Setup/L10N/ooLocale during
startup and obtained later.

This only for the *iX branch, no idea if and what could be
adjusted for Windows or MacOSX.

Change-Id: I050f6f643571ccdc669fb91b06f3bb516f96e8d5
Reviewed-on: https://gerrit.libreoffice.org/45946
Reviewed-by: Eike Rathke 
Tested-by: Jenkins 
(cherry picked from commit c2bd06120b932bf3757f19bdf8c8d9ee8a31f557)
Reviewed-on: https://gerrit.libreoffice.org/45980

diff --git a/shell/Library_localebe.mk b/shell/Library_localebe.mk
index 7c4931b2ce39..b8d8aba8f15c 100644
--- a/shell/Library_localebe.mk
+++ b/shell/Library_localebe.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_Library_use_libraries,localebe1,\
cppu \
cppuhelper \
sal \
+   i18nlangtag \
 ))
 
 $(eval $(call 
gb_Library_set_componentfile,localebe1,shell/source/backends/localebe/localebe1))
diff --git a/shell/source/backends/localebe/localebackend.cxx 
b/shell/source/backends/localebe/localebackend.cxx
index 7ff388a1f26d..3392bb73cfc0 100644
--- a/shell/source/backends/localebe/localebackend.cxx
+++ b/shell/source/backends/localebe/localebackend.cxx
@@ -28,6 +28,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 
@@ -184,16 +186,19 @@ static css::beans::Optional 
ImplGetLocale(char const * category)
 
 const char *cp;
 const char *uscore = nullptr;
+const char *end = nullptr;
 
 // locale string have the format lang[_ctry][.encoding][@modifier]
-// we are only interested in the first two items, so we handle
-// '.' and '@' as string end.
+// Let LanguageTag handle all conversion, but do a sanity and length check
+// first.
+// For the fallback we are only interested in the first two items, so we
+// handle '.' and '@' as string end for that.
 for (cp = locale; *cp; cp++)
 {
-if (*cp == '_')
+if (*cp == '_' && !uscore)
 uscore = cp;
-if (*cp == '.' || *cp == '@')
-break;
+if ((*cp == '.' || *cp == '@') && !end)
+end = cp;
 if (!rtl::isAscii(static_cast(*cp))) {
 SAL_INFO("shell", "locale env var with non-ASCII content");
 return {false, {}};
@@ -205,16 +210,31 @@ static css::beans::Optional 
ImplGetLocale(char const * category)
 return {false, {}};
 }
 
+// This is a tad awkward.. but the easiest way to obtain what we're
+// actually interested in. For example this also converts
+// "ca_ES.UTF-8@valencia" to "ca-ES-valencia".
+const OString aLocaleStr(locale);
+const LanguageType nLang = MsLangId::convertUnxByteStringToLanguage( 
aLocaleStr);
+if (nLang != LANGUAGE_DONTKNOW)
+{
+const OUString aLangTagStr( LanguageTag::convertToBcp47( nLang));
+return {true, css::uno::Any(aLangTagStr)};
+}
+
+// As a fallback, strip encoding and modifier and return just a
+// language-country combination and let the caller handle unknowns.
 OUStringBuffer aLocaleBuffer;
+if (!end)
+end = cp;
 if( uscore != nullptr )
 {
 aLocaleBuffer.appendAscii(locale, uscore++ - locale);
 aLocaleBuffer.append("-");
-aLocaleBuffer.appendAscii(uscore, cp - uscore);
+aLocaleBuffer.appendAscii(uscore, end - uscore);
 }
 else
 {
-aLocaleBuffer.appendAscii(locale, cp - locale);
+aLocaleBuffer.appendAscii(locale, end - locale);
 }
 
 return {true, css::uno::Any(aLocaleBuffer.makeStringAndClear())};
commit d17dfb3dc1cc7fd91ede9a58337d89e38fd3b022
Author: Eike Rathke 
Date:   Wed Dec 6 20:08:08 2017 +0100

Prevent out-of-bounds access, tdf#114228 related

Such document access should be validated, specifically if it's
called from accessibility.

Change-Id: I67fa14c7fb1bf3885fc009428b981149f3f448fb
Reviewed-on: https://gerrit.libreoffice.org/45978
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit 7265e75f8b34cc1043b972478e8b49950f86)
Reviewed-on: https://gerrit.libreoffice.org/45979
Tested-by: Jenkins 

diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 2151269a1612..2d1834d57cd9 100644
--- a/sc/source/core/

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

2017-12-07 Thread Eike Rathke
 sc/source/ui/view/notemark.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 0f4a9e338cab2f09541e61530b4cdd9fde47c33a
Author: Eike Rathke 
Date:   Thu Dec 7 12:58:10 2017 +0100

Check pDrawView

Change-Id: I88351676e7a11800b84b64afc57f91dddaed8eb6

diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index 5189426378e1..b92e7c278b70 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -101,7 +101,8 @@ IMPL_LINK_NOARG(ScNoteMarker, TimeHdl, Timer *, void)
 mxObject = ScNoteUtil::CreateTempCaption( *pDoc, aDocPos, *pPage, 
aUserText, aVisRect, bLeft );
 if( mxObject )
 {
-pDrawView->SyncForGrid(mxObject.get());
+if (pDrawView)
+pDrawView->SyncForGrid(mxObject.get());
 aRect = mxObject->GetCurrentBoundRect();
 
 // Need to include grid offset: GetCurrentBoundRect is 
removing it
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-12-07 Thread Eike Rathke
 sc/source/ui/inc/notemark.hxx  |2 +-
 sc/source/ui/view/notemark.cxx |6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 2f7c589e6f26b8af8872c594249cb83bc1a98bba
Author: Eike Rathke 
Date:   Thu Dec 7 12:54:31 2017 +0100

aDrawView -> pDrawView

Change-Id: I2e0a3157ae00a248c3a92d6bb8ab1ed61b72b1a9

diff --git a/sc/source/ui/inc/notemark.hxx b/sc/source/ui/inc/notemark.hxx
index 967b8d4962e4..e42233e7558d 100644
--- a/sc/source/ui/inc/notemark.hxx
+++ b/sc/source/ui/inc/notemark.hxx
@@ -46,7 +46,7 @@ private:
 boolbByKeyboard;
 
 tools::Rectangle   aRect;
-ScDrawView* aDrawView;
+ScDrawView* pDrawView;
 SdrModel*   pModel;
 ScCaptionPtrmxObject;
 boolbVisible;
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index e76941626af3..5189426378e1 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -37,7 +37,7 @@
 
 ScNoteMarker::ScNoteMarker( vcl::Window* pWin, vcl::Window* pRight, 
vcl::Window* pBottom, vcl::Window* pDiagonal,
 ScDocument* pD, const ScAddress& aPos, const 
OUString& rUser,
-const MapMode& rMap, bool bLeftEdge, bool bForce, 
bool bKeyboard, ScDrawView *pDrawView) :
+const MapMode& rMap, bool bLeftEdge, bool bForce, 
bool bKeyboard, ScDrawView *pDrawViewP) :
 pWindow( pWin ),
 pRightWin( pRight ),
 pBottomWin( pBottom ),
@@ -48,7 +48,7 @@ ScNoteMarker::ScNoteMarker( vcl::Window* pWin, vcl::Window* 
pRight, vcl::Window*
 aMapMode( rMap ),
 bLeft( bLeftEdge ),
 bByKeyboard( bKeyboard ),
-aDrawView ( pDrawView ),
+pDrawView ( pDrawViewP ),
 pModel( nullptr ),
 bVisible( false )
 {
@@ -101,7 +101,7 @@ IMPL_LINK_NOARG(ScNoteMarker, TimeHdl, Timer *, void)
 mxObject = ScNoteUtil::CreateTempCaption( *pDoc, aDocPos, *pPage, 
aUserText, aVisRect, bLeft );
 if( mxObject )
 {
-aDrawView->SyncForGrid(mxObject.get());
+pDrawView->SyncForGrid(mxObject.get());
 aRect = mxObject->GetCurrentBoundRect();
 
 // Need to include grid offset: GetCurrentBoundRect is 
removing it
___
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' - filter/source sw/qa sw/source

2017-12-07 Thread Szymon Kłos
 filter/source/msfilter/msdffimp.cxx   |8 
 sw/qa/extras/ww8export/ww8export2.cxx |6 +-
 sw/source/core/edit/edfcol.cxx|   20 +++-
 3 files changed, 24 insertions(+), 10 deletions(-)

New commits:
commit fec53ea4c33b012ef76d971d0b154d766c8e5759
Author: Szymon Kłos 
Date:   Thu Nov 2 17:22:03 2017 +0100

tdf#113037 create Watermark with correct ratio

Reviewed-on: https://gerrit.libreoffice.org/44228
Tested-by: Jenkins 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 1e6abe31eb8f7c12c725f7e1267a7cedfcd3d157)

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

diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index 98427c6ebab6..36a3f59c3787 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -4414,13 +4414,13 @@ SdrObject* SvxMSDffManager::ImportShape( const 
DffRecordHeader& rHd, SvStream& r
 OutputDevice* pOut = Application::GetDefaultDevice();
 vcl::Font aFont( pOut->GetFont() );
 aFont.SetFamilyName( aFontName );
-auto nTextWidth = pOut->GetTextWidth( aObjectText );
+Rectangle aBoundingRect;
+pOut->GetTextBoundRect( aBoundingRect, aObjectText );
 
 OUString aObjName = GetPropertyString(DFF_Prop_wzName, 
rSt);
-if ( nTextWidth && aObjData.eShapeType == 
mso_sptTextPlainText && aObjName.match("PowerPlusWaterMarkObject"))
+if ( aBoundingRect.GetWidth() && aObjData.eShapeType 
== mso_sptTextPlainText && aObjName.match( "PowerPlusWaterMarkObject" ) )
 {
-fRatio = aFont.GetFontSize().Height();
-fRatio /= nTextWidth;
+fRatio = (double)aBoundingRect.GetHeight() / 
aBoundingRect.GetWidth();
 sal_Int32 nNewHeight = fRatio * 
aObjData.aBoundRect.getWidth();
 sal_Int32 nPaddingY = 
aObjData.aBoundRect.getHeight() - nNewHeight;
 
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx 
b/sw/qa/extras/ww8export/ww8export2.cxx
index fb58fbcb47dc..5ef42cae4886 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -21,6 +21,7 @@
 #include 
 
 #include 
+#include 
 
 class Test : public SwModelTestBase
 {
@@ -112,7 +113,10 @@ DECLARE_WW8EXPORT_TEST(testTdf91687, "tdf91687.doc")
 uno::Reference xWatermark = getShape(1);
 uno::Reference xWatermarkProperties(xWatermark, 
uno::UNO_QUERY);
 
-CPPUNIT_ASSERT_EQUAL((sal_Int32)5172, xWatermark->getSize().Height);
+sal_Int32 nHeight = 0;
+xWatermarkProperties->getPropertyValue(UNO_NAME_TEXT_UPPERDIST) >>= 
nHeight;
+
+CPPUNIT_ASSERT_EQUAL((sal_Int32)5172, xWatermark->getSize().Height + 
nHeight);
 CPPUNIT_ASSERT_EQUAL((sal_Int32)18105, xWatermark->getSize().Width);
 }
 
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 2201ada112c3..4df109045209 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -396,14 +396,22 @@ void lcl_placeWatermarkInHeader(const SfxWatermarkItem& 
rWatermark,
 
 // Calc the ratio.
 double fRatio = 0;
+double fRatioFrame = 0;
 OutputDevice* pOut = Application::GetDefaultDevice();
 vcl::Font aFont(pOut->GetFont());
 aFont.SetFamilyName(sFont);
-auto nTextWidth = pOut->GetTextWidth(rWatermark.GetText());
-if (nTextWidth)
+
+Rectangle aBoundingRect;
+pOut->GetTextBoundRect(aBoundingRect, rWatermark.GetText());
+if (aBoundingRect.GetWidth())
 {
-fRatio = aFont.GetFontSize().Height();
-fRatio /= nTextWidth;
+fRatio = (double)aBoundingRect.GetHeight() / 
aBoundingRect.GetWidth();
+auto nTextWidth = pOut->GetTextWidth(rWatermark.GetText());
+if (nTextWidth)
+{
+fRatioFrame = aFont.GetFontSize().Height();
+fRatioFrame /= nTextWidth;
+}
 }
 
 // Calc the size.
@@ -428,7 +436,8 @@ void lcl_placeWatermarkInHeader(const SfxWatermarkItem& 
rWatermark,
 xPageStyle->getPropertyValue(UNO_NAME_BOTTOM_MARGIN) >>= 
nBottomMargin;
 nWidth = aSize.Height - nTopMargin - nBottomMargin;
 }
-sal_Int32 nHeight = nWidth * fRatio;
+sal_Int32 nHeight = fRatio * nWidth;
+sal_Int32 nFrameHeight = fRatioFrame * nWidth;
 
 // Create and insert the shape.
 uno::Reference 
xShape(xMultiServiceFactory->createInstance(aShapeServiceName), uno::UNO_QUERY);
@@ -468,6 +477,7 @@ void lcl_placeWatermarkInHeader(const SfxWatermar

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

2017-12-07 Thread Eike Rathke
 sc/source/ui/docshell/docfunc.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 0d1e0bda6a59f8c87981f87ebc7b89876a00cfb5
Author: Eike Rathke 
Date:   Thu Dec 7 12:48:43 2017 +0100

Remember ScViewData* and further check ScDrawView*

Follow-up on

commit 3809655e6d554dbc6c74b11597c540c4a62d4c09
Date:   Thu Dec 7 00:06:36 2017 +0100

sc: don't crash on loading comments

Seems filters call ShowNote before a view is set or something.
Fixup for 2c50ad2a57c1b2313f39b8132ac5e80a45fd.

This "best current view" looks a bit fragile anyway..

Change-Id: I7012e4d0e10128b21ece304507b204976a9e03db

diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index 939c54614d78..430da19d4fa8 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1216,8 +1216,12 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool 
bShow )
 
 ScTabView::OnLOKNoteStateChanged(pNote);
 
-if (ScDocShell::GetViewData())
-
ScDocShell::GetViewData()->GetScDrawView()->SyncForGrid(pNote->GetCaption());
+if (ScViewData* pViewData = ScDocShell::GetViewData())
+{
+if (ScDrawView* pDrawView = pViewData->GetScDrawView())
+pDrawView->SyncForGrid( pNote->GetCaption());
+}
+
 rDocShell.SetDocumentModified();
 
 return true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/SwFrameBorder' - 56 commits - basctl/source basegfx/source basic/source chart2/source compilerplugins/clang connectivity/source cppcanvas/source cppuhel

2017-12-07 Thread Armin Le Grand
Rebased ref, commits from common ancestor:
commit 8b0527ffa953a1050a19cd6cc0b6e98c771e3a17
Author: Armin Le Grand 
Date:   Tue Dec 5 19:35:20 2017 +0100

SwFrameBorder: Converted BorderRectangle functionality

to primitive usage, added a SwBorderRectanglePrimitive2D
which now encapsulates the four Styles and the transformation
of a single BorderLineRectangle. This is a preparation for
later buffered primitive usage at SwFrame level

Change-Id: I6689b94fe996ead8142553e8442e151e53d10e8a

diff --git a/sw/inc/sw_primitivetypes2d.hxx b/sw/inc/sw_primitivetypes2d.hxx
index 4ded8572088b..44509820f72c 100644
--- a/sw/inc/sw_primitivetypes2d.hxx
+++ b/sw/inc/sw_primitivetypes2d.hxx
@@ -25,6 +25,7 @@
 #define PRIMITIVE2D_ID_SWVIRTFLYDRAWOBJPRIMITIVE2D  (PRIMITIVE2D_ID_RANGE_SW| 
0)
 #define PRIMITIVE2D_ID_SWSIDEBARANCHORPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 
1)
 #define PRIMITIVE2D_ID_SWSIDEBARSHADOWPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 
2)
+#define PRIMITIVE2D_ID_SWBORDERRECTANGLERIMITIVE(PRIMITIVE2D_ID_RANGE_SW| 
3)
 
 #endif // INCLUDED_SW_INC_SW_PRIMITIVETYPES2D_HXX
 
diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index e6350e131984..30872d45e6f4 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -62,6 +62,8 @@
 #include 
 #include 
 #include 
+#include 
+
 #include 
 #include 
 #include 
@@ -232,7 +234,6 @@ public:
 };
 
 // Default zoom factor
-const static double aMinDistScale = 0.73;
 const static double aEdgeScale = 0.5;
 
 //To optimize the expensive RetouchColor determination
@@ -1180,42 +1181,6 @@ void SwAlignRect( SwRect &rRect, const SwViewShell *pSh, 
const vcl::RenderContex
 }
 
 /**
- * Helper for twip adjustments on pixel base
- *
- * This method compares the x- or y-pixel position of two twip-points.
- * If the x-/y-pixel positions are the same, the x-/y-pixel position of
- * the second twip point is adjusted by a given amount of pixels
-*/
-static void lcl_CompPxPosAndAdjustPos( const vcl::RenderContext&  _rOut,
-const Point& _rRefPt,
-Point&   _rCompPt,
-const bool  _bChkXPos,
-const sal_Int8   _nPxAdjustment )
-{
-const Point aRefPxPt = _rOut.LogicToPixel( _rRefPt );
-Point aCompPxPt = _rOut.LogicToPixel( _rCompPt );
-
-if ( _bChkXPos )
-{
-if ( aCompPxPt.X() == aRefPxPt.X() )
-{
-aCompPxPt.X() += _nPxAdjustment ;
-const Point aAdjustedCompPt = _rOut.PixelToLogic( aCompPxPt );
-_rCompPt.X() = aAdjustedCompPt.X();
-}
-}
-else
-{
-if ( aCompPxPt.Y() == aRefPxPt.Y() )
-{
-aCompPxPt.Y() += _nPxAdjustment ;
-const Point aAdjustedCompPt = _rOut.PixelToLogic( aCompPxPt );
-_rCompPt.Y() = aAdjustedCompPt.Y();
-}
-}
-}
-
-/**
  * Method to pixel-align rectangle for drawing graphic object
  *
  * Because we are drawing graphics from the left-top-corner in conjunction
@@ -1261,13 +1226,6 @@ static long lcl_AlignHeight( const long nHeight, 
SwPaintProperties const & prope
 return nHeight;
 }
 
-static long lcl_MinHeightDist( const long nDist, SwPaintProperties const & 
properties )
-{
-if ( properties.aSScaleX < aMinDistScale || properties.aSScaleY < 
aMinDistScale )
-return nDist;
-return ::lcl_AlignHeight( std::max( nDist, properties.nSMinDistPixelH ), 
properties);
-}
-
 /**
  * Calculate PrtArea plus surrounding plus shadow
  */
@@ -4490,298 +4448,254 @@ void SwFrame::PaintBorderLine( const SwRect& rRect,
 gProp.pSLines->AddLineRect( aOut, pColor, nStyle, pTab, nSubCol, gProp 
);
 }
 
-/**
- * @note Only all lines once or all lines twice!
- *
- * OD 29.04.2003 #107169# - method called for left and right border rectangles.
- * For a printer output device perform adjustment for non-overlapping top and
- * bottom border rectangles. Thus, add parameter <_bPrtOutputDev> to indicate
- * printer output device.
- * NOTE: For printer output device left/right border rectangle <_iorRect>
- *has to be already non-overlapping the outer top/bottom border 
rectangle.
- */
-static void lcl_SubTopBottom( SwRect&  _iorRect,
-   const SvxBoxItem&_rBox,
-   const SwBorderAttrs& _rAttrs,
-   const SwFrame& _rFrame,
-   const SwRectFn&  _rRectFn,
-   const bool   _bPrtOutputDev,
-   SwPaintProperties const & properties )
+namespace drawinglayer
 {
-const bool bCnt = _rFrame.IsContentFrame();
-if ( _rBox.GetTop() && _rBox.GetTop()->GetInWidth() &&
- ( !bCnt || _rAttrs.GetTopLine( _rFrame ) )
-   )
+namespace primitive2d
  

Re: rtl_random_createPool explicit seeding with systemTime considered redundant?

2017-12-07 Thread Michael Stahl
On 07.12.2017 02:59, Thorsten Behrens wrote:
> Hi Stephan, dear fellow hackers,
> 
> there's a chunk of places in the code, where (cargo-culted?) a random
> pool gets fed with current system time, presumably to seed it with
> enough entropy:
> 
> TimeValue aTime;
> osl_getSystemTime( &aTime );
> rtlRandomPool aRandomPool = rtl_random_createPool ();
> rtl_random_addBytes ( aRandomPool, &aTime, 8 );
> 
> Then again, initPool() in sal/rtl/random.cxx already does the same, so
> that really looks redundant?

yes, definitely.

tbh i'd want to remove initPool, which is just a fallback path, as well
and just abort if osl_get_system_random_data fails; if you don't have
/dev/urandom you can always fall back on the standard text editor ed(1).


-- 
DDJ: You've mentioned Edsger Dijkstra. What do you think of his work?
DK:  His great strength is that he is uncompromising. It would make
 him physically ill to think of programming in C++.

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


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

2017-12-07 Thread Pranav Kant
 cui/source/dialogs/iconcdlg.cxx |2 +-
 include/sfx2/basedlgs.hxx   |1 +
 sfx2/source/dialog/basedlgs.cxx |   22 ++
 3 files changed, 24 insertions(+), 1 deletion(-)

New commits:
commit 7bcb9a8416d61bdd3c7fc345f87de5aa8c3054f9
Author: Pranav Kant 
Date:   Tue Nov 28 16:59:26 2017 +0530

lokdialog: Make hyperlink dialog work

Change-Id: Ifd8c721b001b09ddab8d4fe06ae6818980d6ee76

diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 41475c00233b..ce3d292b97b0 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -245,7 +245,7 @@ void IconChoiceDialog::dispose()
 m_pHelpBtn.clear();
 m_pResetBtn.clear();
 m_pTabContainer.clear();
-ModalDialog::dispose();
+SfxModalDialog::dispose();
 }
 
 /**
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index 6fdb41784ade..db885c7173a2 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -75,6 +75,7 @@ public:
 virtual short   Execute() override;
 const SfxItemSet*   GetOutputItemSet() const { return pOutputSet; }
 const SfxItemSet*   GetInputItemSet() const { return pInputSet; }
+voidStateChanged( StateChangedType nStateChange ) override;
 };
 
 // class SfxModelessDialog --
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 1de5c4fb2f79..f44ed4c15446 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -206,6 +206,28 @@ void SfxModalDialog::CreateOutputItemSet( const 
SfxItemSet& rSet )
 }
 
 
+void SfxModalDialog::StateChanged( StateChangedType nType )
+{
+if (comphelper::LibreOfficeKit::isActive() && nType == 
StateChangedType::InitShow)
+{
+// There are some dialogs, like Hyperlink dialog, which inherit from
+// SfxModalDialog even though they are modeless, i.e., their Execute 
method
+// isn't called.
+if (!GetLOKNotifier())
+{
+SetLOKNotifier(SfxViewShell::Current());
+const Size aSize = GetOptimalSize();
+std::vector aItems;
+aItems.emplace_back(std::make_pair("type", "dialog"));
+aItems.emplace_back(std::make_pair("size", aSize.toString()));
+SfxViewShell::Current()->notifyWindow(GetLOKWindowId(), "created", 
aItems);
+}
+}
+
+ModalDialog::StateChanged(nType);
+}
+
+
 void SfxModelessDialog::StateChanged( StateChangedType nStateChange )
 {
 if ( nStateChange == StateChangedType::InitShow )
___
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' - sc/source

2017-12-07 Thread Szymon Kłos
 sc/source/ui/docshell/docsh4.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0f685ee5a0913cab5826eec737f25328fabf256d
Author: Szymon Kłos 
Date:   Wed Dec 6 20:43:22 2017 +0100

Windows build fix - uninitialized variable

docsh4.cxx(1186) : warning C4701: potentially uninitialized local variable 
'eLang' used

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

diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index aaf28e094dea..7fa1b98b6664 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1132,7 +1132,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
 
 if ( !aLangText.isEmpty() )
 {
-LanguageType eLang, eLatin, eCjk, eCtl;
+LanguageType eLang = LANGUAGE_NONE, eLatin, eCjk, eCtl;
 const OUString aDocLangPrefix("Default_");
 const OUString aNoLang("LANGUAGE_NONE");
 const OUString aResetLang("RESET_LANGUAGES");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/SwFrameBorder' - sw/source

2017-12-07 Thread Armin Le Grand
 sw/source/core/layout/paintfrm.cxx |   43 -
 1 file changed, 43 deletions(-)

New commits:
commit be96114514c6824e563ea7e7aa5983b38be017d5
Author: Armin Le Grand 
Date:   Thu Dec 7 11:30:52 2017 +0100

SwFrameBorder: Clang fixes II

Change-Id: Ic63d2dcaa05146b600b2c843895c9fac6e46db54

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 09f2f4280758..d726b06d9310 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1182,42 +1182,6 @@ void SwAlignRect( SwRect &rRect, const SwViewShell *pSh, 
const vcl::RenderContex
 }
 
 /**
- * Helper for twip adjustments on pixel base
- *
- * This method compares the x- or y-pixel position of two twip-points.
- * If the x-/y-pixel positions are the same, the x-/y-pixel position of
- * the second twip point is adjusted by a given amount of pixels
-*/
-static void lcl_CompPxPosAndAdjustPos( const vcl::RenderContext&  _rOut,
-const Point& _rRefPt,
-Point&   _rCompPt,
-const bool  _bChkXPos,
-const sal_Int8   _nPxAdjustment )
-{
-const Point aRefPxPt = _rOut.LogicToPixel( _rRefPt );
-Point aCompPxPt = _rOut.LogicToPixel( _rCompPt );
-
-if ( _bChkXPos )
-{
-if ( aCompPxPt.X() == aRefPxPt.X() )
-{
-aCompPxPt.X() += _nPxAdjustment ;
-const Point aAdjustedCompPt = _rOut.PixelToLogic( aCompPxPt );
-_rCompPt.X() = aAdjustedCompPt.X();
-}
-}
-else
-{
-if ( aCompPxPt.Y() == aRefPxPt.Y() )
-{
-aCompPxPt.Y() += _nPxAdjustment ;
-const Point aAdjustedCompPt = _rOut.PixelToLogic( aCompPxPt );
-_rCompPt.Y() = aAdjustedCompPt.Y();
-}
-}
-}
-
-/**
  * Method to pixel-align rectangle for drawing graphic object
  *
  * Because we are drawing graphics from the left-top-corner in conjunction
@@ -1263,13 +1227,6 @@ static long lcl_AlignHeight( const long nHeight, 
SwPaintProperties const & prope
 return nHeight;
 }
 
-static long lcl_MinHeightDist( const long nDist, SwPaintProperties const & 
properties )
-{
-if ( properties.aSScaleX < aMinDistScale || properties.aSScaleY < 
aMinDistScale )
-return nDist;
-return ::lcl_AlignHeight( std::max( nDist, properties.nSMinDistPixelH ), 
properties);
-}
-
 /**
  * Calculate PrtArea plus surrounding plus shadow
  */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/clang connectivity/source cppu/qa dtrans/source filter/source forms/source framework/inc i18npool/inc i18npool/source i18nutil/source include/comphelper

2017-12-07 Thread Noel Grandin
 compilerplugins/clang/salcall.cxx  |   23 -
 connectivity/source/inc/OColumn.hxx|8 ++--
 connectivity/source/inc/OTypeInfo.hxx  |8 ++--
 connectivity/source/inc/TKeyValue.hxx  |8 ++--
 connectivity/source/inc/TSkipDeletedSet.hxx|8 ++--
 connectivity/source/inc/TSortIndex.hxx |8 ++--
 connectivity/source/inc/file/fanalyzer.hxx |8 ++--
 connectivity/source/inc/file/fcode.hxx |8 ++--
 connectivity/source/inc/file/fcomp.hxx |8 ++--
 cppu/qa/test_reference.cxx |2 -
 dtrans/source/cnttype/mcnttype.cxx |2 -
 dtrans/source/cnttype/mcnttype.hxx |2 -
 filter/source/xsltfilter/LibXSLTTransformer.hxx|2 -
 forms/source/component/EventThread.hxx |4 +-
 forms/source/xforms/binding.cxx|2 -
 forms/source/xforms/binding.hxx|2 -
 framework/inc/dispatch/popupmenudispatcher.hxx |2 -
 i18npool/inc/breakiteratorImpl.hxx |2 -
 i18npool/inc/cclass_unicode.hxx|2 -
 i18npool/inc/inputsequencechecker.hxx  |2 -
 i18npool/inc/transliteration_Ignore.hxx|2 -
 i18npool/source/characterclassification/cclass_unicode.cxx |2 -
 i18npool/source/inputchecker/inputsequencechecker.cxx  |2 -
 i18npool/source/transliteration/transliteration_Ignore.cxx |2 -
 i18nutil/source/utility/unicode.cxx|   18 +-
 include/comphelper/interfacecontainer2.hxx |8 ++--
 include/connectivity/FValue.hxx|8 ++--
 include/connectivity/sqliterator.hxx   |8 ++--
 include/connectivity/sqlscan.hxx   |8 ++--
 include/i18nutil/unicode.hxx   |   18 +-
 include/oox/ppt/timenodelistcontext.hxx|2 -
 include/sfx2/filedlghelper.hxx |2 -
 include/svx/fmgridif.hxx   |   20 +--
 include/svx/unomod.hxx |2 -
 include/svx/unoshape.hxx   |4 +-
 include/toolkit/awt/vclxwindows.hxx|2 -
 lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx  |6 +--
 lingucomponent/source/hyphenator/hyphen/hyphenimp.hxx  |6 +--
 lingucomponent/source/thesaurus/libnth/nthesimp.cxx|6 +--
 lingucomponent/source/thesaurus/libnth/nthesimp.hxx|6 +--
 linguistic/source/spelldsp.cxx |2 -
 linguistic/source/spelldsp.hxx |2 -
 pyuno/inc/pyuno.hxx|4 +-
 salhelper/source/timer.cxx |2 -
 sfx2/source/dialog/filedlghelper.cxx   |2 -
 sfx2/source/doc/doctemplateslocal.cxx  |4 +-
 sfx2/source/doc/doctemplateslocal.hxx  |4 +-
 svl/source/passwordcontainer/passwordcontainer.cxx |2 -
 svl/source/passwordcontainer/passwordcontainer.hxx |2 -
 svx/source/unodraw/unomod.cxx  |2 -
 svx/source/unodraw/unoshape.cxx|4 +-
 sw/inc/unoframe.hxx|   12 +++---
 sw/inc/unotxdoc.hxx|4 +-
 sw/source/core/unocore/unoframe.cxx|   12 +++---
 sw/source/uibase/uno/unotxdoc.cxx  |4 +-
 toolkit/source/awt/vclxwindows.cxx |2 -
 ucb/source/cacher/cachedcontentresultset.cxx   |4 +-
 ucb/source/cacher/cachedcontentresultsetstub.cxx   |6 +--
 ucb/source/cacher/cachedcontentresultsetstub.hxx   |6 +--
 ucb/source/ucp/file/filtask.cxx|   20 +--
 ucb/source/ucp/file/filtask.hxx|   20 +--
 ucb/source/ucp/file/prov.cxx   |2 -
 ucb/source/ucp/file/prov.hxx   |2 -
 unotools/source/config/eventcfg.cxx|4 +-
 xmlhelp/source/cxxhelp/inc/tvfactory.hxx   |2 -
 xmlhelp/source/treeview/tvfactory.cxx  |2 -
 xmlsecurity/source/component/certificatecontainer.hxx  |2 -
 67 files changed, 199 insertions(+), 178 deletions(-)

New commits:
commit dd0dceb51122b4e8e969f848d9f046e91962d254
Author: Noel Grandin 
Date:   Wed Dec 6 08:59:44 2017 +0200

loplugin:salcall handle static methods

Change-Id: Id6820a

[Libreoffice-commits] core.git: solenv/clang-format

2017-12-07 Thread Miklos Vajna
 solenv/clang-format/README|   35 +++
 solenv/clang-format/blacklist |2 --
 2 files changed, 35 insertions(+), 2 deletions(-)

New commits:
commit caf1eb15838729e05a70d2fcb8de6834394b5764
Author: Miklos Vajna 
Date:   Thu Dec 7 09:09:35 2017 +0100

solenv: add clang-format documentation

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

diff --git a/solenv/clang-format/README b/solenv/clang-format/README
new file mode 100644
index ..602dfc6eb254
--- /dev/null
+++ b/solenv/clang-format/README
@@ -0,0 +1,35 @@
+Style enforcing code.
+
+== How to reproduce the binaries at  ==
+
+- Linux:
+
+  - Built from source on openSUSE Leap 42.3
+  - get 
+  - get   and extract 
this as tools/clang/ in the LLVM source code
+  - mkdir workdir; cd workdir; cmake -G 'Unix Makefiles' 
-DCMAKE_INSTALL_PREFIX=$PWD/../instdir -DCMAKE_BUILD_TYPE=Release ..; make -j8 
clang-format
+  - this produces a binary that is dynamically linked, but all LLVM/clang libs 
are linked in statically
+
+- macOS:
+
+  - 
 
provides a portable binary already
+
+- Windows:
+
+  -  provides a portable 
binary already
+
+== Directory contents ==
+
+- blacklist: list of existing files not to be formatted:
+
+  - if you rename a file mentioned in this list, please update the entry (and
+keep the file sorted)
+
+- check-last-commit: this is used during gerrit / jenkins verification
+
+- ClangFormat.pm: shared code between the git hook and these scripts
+
+- generate-style-blacklist: was used to generate `blacklist`
+
+- reformat-formatted-files: run this script in case the style config changes or
+  clang-format version is updated
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 272dc4e5c295..202f3ecfde84 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -8292,8 +8292,6 @@ io/test/stm/testfactreg.cxx
 io/test/stm/testfactreg.hxx
 io/test/testcomponent.cxx
 io/test/testconnection.cxx
-ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.c
-ios/LibreOfficeKit/LibreOfficeKit/LibreOfficeKit.h
 ios/LibreOfficeLight/LibreOfficeLight/dummyLOkit.c
 ios/LibreOfficeLight/LibreOfficeLight/lokit-Bridging-Header.h
 ios/source/LibreOfficeKit.c
___
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' - writerfilter/source

2017-12-07 Thread tagezi
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx |   25 +---
 1 file changed, 22 insertions(+), 3 deletions(-)

New commits:
commit 89853de3231e92a17a646acb7f99584220fadad8
Author: tagezi 
Date:   Wed Dec 6 21:23:37 2017 +0200

tdf#104650 Creating guard to reset status indicator

Change-Id: Ic1e79badedc031a588c0b07958002ad7c558ba82
Reviewed-on: https://gerrit.libreoffice.org/45987
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
(cherry picked from commit 58e4b36ace484f2743a3b9919d830c175464b05d)
Reviewed-on: https://gerrit.libreoffice.org/46006

diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx 
b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index 44552eee5e5f..b905d8968a15 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -417,8 +417,30 @@ void OOXMLDocumentImpl::resolveFooter(Stream & rStream,
  }
 }
 
+namespace {
+// Ensures that the indicator is reset after exiting OOXMLDocumentImpl::resolve
+class StatusIndicatorGuard{
+public:
+explicit 
StatusIndicatorGuard(css::uno::Reference& 
xStatusIndicator)
+:mxStatusIndicator(xStatusIndicator)
+{
+}
+
+~StatusIndicatorGuard()
+{
+if (mxStatusIndicator.is())
+mxStatusIndicator->end();
+}
+
+private:
+css::uno::Reference mxStatusIndicator;
+};
+}
+
 void OOXMLDocumentImpl::resolve(Stream & rStream)
 {
+StatusIndicatorGuard aStatusIndicatorGuard(mxStatusIndicator);
+
 if 
(utl::MediaDescriptor(maMediaDescriptor).getUnpackedValueOrDefault("ReadGlossaries",
 false))
 {
 resolveFastSubStream(rStream, OOXMLStream::GLOSSARY);
@@ -515,9 +537,6 @@ void OOXMLDocumentImpl::resolve(Stream & rStream)
 "OOXMLDocumentImpl::resolve(): non-UNO exception");
 }
 }
-
-if (mxStatusIndicator.is())
-mxStatusIndicator->end();
 }
 
 void OOXMLDocumentImpl::incrementProgress()
___
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' - sc/source

2017-12-07 Thread Caolán McNamara
 sc/source/ui/unoobj/chart2uno.cxx |   20 +---
 1 file changed, 13 insertions(+), 7 deletions(-)

New commits:
commit 59fdcff85389456a5710bd101dbf2b01c70c2b02
Author: Caolán McNamara 
Date:   Mon Dec 4 15:24:20 2017 +

assert on export of fdo69698-1.ods to pdf

since...

commit 3af8a4faf5e20ccae2386052697713da160afb16
Date:   Wed Nov 15 13:10:40 2017 +0300

tdf#113861: Less aggressive expansion of chart headers.

In this example

nAllColCount is 3, nAllRowCount is 5, the columns available are 0, 1, 4 and 
the
rows are 20, 21, 22, 25, 26. So I assume, comparing to the original version,
that its not the actual row and column we want, but the index of the 
row/column
into the range provided

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

diff --git a/sc/source/ui/unoobj/chart2uno.cxx 
b/sc/source/ui/unoobj/chart2uno.cxx
index 10577d92dbfc..9e6cc81cb0f2 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -292,18 +292,24 @@ Chart2PositionMap::Chart2PositionMap(SCCOL nAllColCount,  
SCROW nAllRowCount,
 {
 //check whether there is more than one text column or row that should 
be added to the headers
 SCROW nMaxHeaderRow = nAllRowCount;
-for ( const auto & rCol : rCols )
+SCCOL nCol = 0;
+for (auto it = rCols.begin(); it != rCols.end(); ++it, ++nCol)
 {
 // Skip header columns
-if ( rCol.first < nHeaderColCount )
+if (nCol < nHeaderColCount)
 continue;
 
+const auto& rCol = *it;
+
 bool bFoundValuesInCol = false;
 bool bFoundAnythingInCol = false;
-for ( const auto & rCell : *rCol.second )
+SCROW nRow = 0;
+for (auto it2 = rCol.second->begin(); it2 != rCol.second->end(); 
++it2, ++nRow)
 {
+const auto& rCell = *it2;
+
 // Skip header rows
-if (rCell.first < nHeaderRowCount || !rCell.second)
+if (nRow < nHeaderRowCount || !rCell.second)
 continue;
 
 ScRange aRange;
@@ -321,7 +327,7 @@ Chart2PositionMap::Chart2PositionMap(SCCOL nAllColCount,  
SCROW nAllRowCount,
 {
 // Found some numeric data
 bFoundValuesInCol = true;
-nMaxHeaderRow = std::min(nMaxHeaderRow, nRow1);
+nMaxHeaderRow = std::min(nMaxHeaderRow, nRow);
 break;
 }
 if ( pDoc->HasData( nCol1, nRow1, nTab1 ) )
@@ -332,11 +338,11 @@ Chart2PositionMap::Chart2PositionMap(SCCOL nAllColCount,  
SCROW nAllRowCount,
 else
 {
 // If cell is empty, it belongs to data
-nMaxHeaderRow = std::min(nMaxHeaderRow, nRow1);
+nMaxHeaderRow = std::min(nMaxHeaderRow, nRow);
 }
 }
 
-if (nHeaderColCount && !bFoundValuesInCol && bFoundAnythingInCol 
&& rCol.first == nHeaderColCount)
+if (nHeaderColCount && !bFoundValuesInCol && bFoundAnythingInCol 
&& nCol == nHeaderColCount)
 {
 // There is no values in row, but some data. And this column 
is next to header
 // So lets put it to header
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-12-07 Thread Pranav Kant
 vcl/source/window/floatwin.cxx |   20 ++--
 1 file changed, 14 insertions(+), 6 deletions(-)

New commits:
commit 03fa6b15439938044fa95eb9b0584d16cf23db88
Author: Pranav Kant 
Date:   Wed Dec 6 23:11:33 2017 +0530

lokdialog: sc: Prevent assert when invoking autopopup filter dialog

We set the notifier in sc, so don't try to set it again in vcl.

Change-Id: Ic7ab3d0030532a4e8630aa7e9266d32057373a65

diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index d45707d60aec..d6890e4823cc 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -608,15 +608,23 @@ void FloatingWindow::StateChanged( StateChangedType nType 
)
 {
 if (IsVisible())
 {
-const vcl::ILibreOfficeKitNotifier* pNotifier = 
pParent->GetLOKNotifier();
-SetLOKNotifier(pNotifier);
-
 std::vector aItems;
-aItems.emplace_back(std::make_pair("type", "child"));
-aItems.emplace_back(std::make_pair("parentId", 
OString::number(pParent->GetLOKWindowId(;
+if (pParent == this)
+{
+// we are a toplevel window, let's so far pretend to be a
+// dialog - but maybe we'll need a separate type for this
+// later
+aItems.emplace_back(std::make_pair("type", "dialog"));
+}
+else
+{
+SetLOKNotifier(pParent->GetLOKNotifier());
+aItems.emplace_back(std::make_pair("type", "child"));
+aItems.emplace_back(std::make_pair("parentId", 
OString::number(pParent->GetLOKWindowId(;
+}
 aItems.emplace_back(std::make_pair("size", 
GetSizePixel().toString()));
 aItems.emplace_back(std::make_pair("position", 
mpImplData->maPos.toString()));
-pNotifier->notifyWindow(GetLOKWindowId(), "created", aItems);
+GetLOKNotifier()->notifyWindow(GetLOKWindowId(), "created", 
aItems);
 }
 else if (!IsVisible())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gpg4libre2' - comphelper/source

2017-12-07 Thread Thorsten Behrens
 comphelper/source/misc/storagehelper.cxx |   24 +++-
 1 file changed, 15 insertions(+), 9 deletions(-)

New commits:
commit 0f5bee1600928674d0d78b79617b9453f7639998
Author: Thorsten Behrens 
Date:   Thu Dec 7 10:56:59 2017 +0100

fixup windows build

Change-Id: I51c0a0a2d5ec3903332e4f981d08b78b2cac015e

diff --git a/comphelper/source/misc/storagehelper.cxx 
b/comphelper/source/misc/storagehelper.cxx
index e81f1f7e3dac..a05fb1358f3f 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -54,11 +54,13 @@
 #include 
 #include 
 
-#include 
-#include 
-#include 
-#include 
-#include 
+#if GPGME_HAVE_GPGME
+# include 
+# include 
+# include 
+# include 
+# include 
+#endif
 
 using namespace ::com::sun::star;
 
@@ -428,6 +430,7 @@ uno::Sequence< beans::NamedValue > 
OStorageHelper::CreatePackageEncryptionData(
 
 uno::Sequence< beans::NamedValue > 
OStorageHelper::CreateGpgPackageEncryptionData()
 {
+#if GPGME_HAVE_GPGME
 // generate session key
 // 
 
@@ -468,7 +471,6 @@ uno::Sequence< beans::NamedValue > 
OStorageHelper::CreateGpgPackageEncryptionDat
 if (ctx == nullptr)
 throw uno::RuntimeException("The GpgME library failed to initialize 
for the OpenPGP protocol.");
 ctx->setArmor(false);
-ctx->setKeyListMode(GPGME_KEYLIST_MODE_LOCAL);
 
 // TODO: add self-encryption key from user config
 const uno::Reference< security::XCertificate >* 
pCerts=xSignCertificates.getConstArray();
@@ -476,7 +478,7 @@ uno::Sequence< beans::NamedValue > 
OStorageHelper::CreateGpgPackageEncryptionDat
 {
 uno::Sequence < sal_Int8 > aKeyID;
 if (pCerts->is())
-aKeyID = (*pCerts)->getSHA1Thumbprint();
+aKeyID = (*pCerts)->getSHA256Thumbprint();
 
 std::vector keys;
 keys.push_back(
@@ -490,8 +492,9 @@ uno::Sequence< beans::NamedValue > 
OStorageHelper::CreateGpgPackageEncryptionDat
 aVector.getLength(), false);
 GpgME::Data cipher;
 
-GpgME::EncryptionResult crypt_res = ctx->encrypt(keys, plain,
-   cipher, 
GpgME::Context::NoCompress);
+GpgME::EncryptionResult crypt_res = ctx->encrypt(
+keys, plain,
+cipher, GpgME::Context::NoCompress);
 
 off_t result = cipher.seek(0,SEEK_SET);
 (void) result;
@@ -530,6 +533,9 @@ uno::Sequence< beans::NamedValue > 
OStorageHelper::CreateGpgPackageEncryptionDat
 aContainer[1].Value <<= aEncryptionData;
 
 return aContainer;
+#else
+return uno::Sequence< beans::NamedValue >();
+#endif
 }
 
 bool OStorageHelper::IsValidZipEntryFileName( const OUString& aName, bool 
bSlashAllowed )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Association between ToC index object and its paragraph content

2017-12-07 Thread Jens Tröger
Thanks Miklos,

Actually, what I find odd is that I don’t see any `text.HyperLinkURL` 
attributes with internal references—all text portions in paragraphs of the ToC 
are empty strings.

Yet, the document does have a ToC index object, but I somehow I can’t associate 
that object with the text paragraphs of the ToC lines, nor with the bookmarks 
scattered throughout the document. Or vice versa…

Cheers,
Jens


> On Dec 7, 2017, at 18:58, Miklos Vajna  wrote:
> Let's say you have a ToC, then a Heading 1 paragraphs, Foo.
> 
> Then the ToC refers to hidden RefHeading bookmark for Foo. You can see
> this reference at an UNO API level. Basic code for this:
> 
> oParas = ThisComponent.Text.createEnumeration
> oPara = oParas.nextElement ' Table of Contents
> oPara = oParas.nextElement ' Foo
> oPortions = oPara.createEnumeration
> oPortion = oPortions.nextElement
> xray oPortion.HyperlinkURL ' gives #__RefHeading___Toc...
> 
> If you want to see the bookmarks the ToC refers to, it's similar:
> 
> ...
> oPara = oParas.nextElement ' Foo
> oPortions = oPara.createEnumeration
> oPortion = oPortions.nextElement
> xray oPortion.TextPortionType ' gives Bookmark
> xray oPortion.Bookmark.Name ' gives #__RefHeading___Toc...
> 
> In most cases if you see some information serialized into ODT, then you
> can assume the same information is available via the UNO API. You can
> always read (most of) the ODT filter in xmloff/ to see what exact UNO
> API is used to write a given ODT markup.
> 
> Regards,
> Miklos

--
Jens Tröger
http://savage.light-speed.de/

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


Re: tests sc_array_functions_test fail due to floating point precision

2017-12-07 Thread Stephan Bergmann

On 12/02/2017 08:47 AM, Milton Vandersloot wrote:

functions_test.cxx:43:Assertion
Test name: ArrayFunctionsTest::testArrayFormulasFODS
double equality assertion failed
- Expected: 1
- Actual  : 0
- Delta   : 1e-14


The issue seems to be (again) floating point precision. Indeed, I've compiled 
LibreOffice with FMA (fused multiply-add) instructions, if I disable them, i.e. 
passing -ffp-contract=off to GCC, then the tests succeed. Note that FMA has 
slightly different floating point precision than ordinary plus and mult [0, 1].


What is ultimately missing, I think, is a spec what the acceptable 
results of calculations in Calc are, and tests written so that they 
check whether or not the calculated results are in the acceptable ranges.

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


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

2017-12-07 Thread Caolán McNamara
 vcl/workben/commonfuzzer.hxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit a3fdcc1a8cee8485ad0a3777c0652aee4568517b
Author: Caolán McNamara 
Date:   Thu Dec 7 09:09:35 2017 +

incomplete type Graphic

Change-Id: I471d43be4b34f3bdb3db5b5ff316ff0a414c8996

diff --git a/vcl/workben/commonfuzzer.hxx b/vcl/workben/commonfuzzer.hxx
index ec1d22948cfb..9b6f5728572c 100644
--- a/vcl/workben/commonfuzzer.hxx
+++ b/vcl/workben/commonfuzzer.hxx
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Association between ToC index object and its paragraph content

2017-12-07 Thread Miklos Vajna
Hi Jens,

On Thu, Dec 07, 2017 at 06:04:08AM +0100, Jens Tröger 
 wrote:
> While walking all paragraphs of a Writer document and visiting their text
> content, I come across text portions (the Heading N) which have Bookmarks
> whose name is something like “_Toc263250771”. However, when I walk the 
> paragraphs and text portions that actually make up the ToC of the document
> itself, I see no indication or reference to these bookmarks.

Let's say you have a ToC, then a Heading 1 paragraphs, Foo.

Then the ToC refers to hidden RefHeading bookmark for Foo. You can see
this reference at an UNO API level. Basic code for this:

oParas = ThisComponent.Text.createEnumeration
oPara = oParas.nextElement ' Table of Contents
oPara = oParas.nextElement ' Foo
oPortions = oPara.createEnumeration
oPortion = oPortions.nextElement
xray oPortion.HyperlinkURL ' gives #__RefHeading___Toc...

If you want to see the bookmarks the ToC refers to, it's similar:

...
oPara = oParas.nextElement ' Foo
oPortions = oPara.createEnumeration
oPortion = oPortions.nextElement
xray oPortion.TextPortionType ' gives Bookmark
xray oPortion.Bookmark.Name ' gives #__RefHeading___Toc...

In most cases if you see some information serialized into ODT, then you
can assume the same information is available via the UNO API. You can
always read (most of) the ODT filter in xmloff/ to see what exact UNO
API is used to write a given ODT markup.

Regards,

Miklos


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


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

2017-12-07 Thread Andras Timar
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 28607477bb25edd08c42a7a1a2040a65000126de
Author: Andras Timar 
Date:   Wed Dec 6 12:25:14 2017 +0100

add ... to Word Count command, because it opens a dialog

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

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index fb87ee73b526..d9225d631776 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -2685,7 +2685,7 @@
   
   
 
-  ~Word Count
+  ~Word Count...
 
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-12-07 Thread Yousuf Philips
 sd/inc/strings.hrc|2 ++
 sd/source/ui/sidebar/SlideBackground.cxx  |6 +++---
 sd/uiconfig/simpress/ui/sidebarslidebackground.ui |6 +++---
 3 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit c5505f5a22917c339af4e4c840a6a1ae20e2503f
Author: Yousuf Philips 
Date:   Wed Dec 6 18:01:03 2017 +0400

tdf#89466 Fix minor localization bugs

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

diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index 924bc5acdc42..52b5d6796cdd 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -280,7 +280,9 @@
 #define STR_PAGE_NAME   NC_("STR_PAGE_NAME", 
"Page" )
 #define STR_SLIDE_NAME  NC_("STR_SLIDE_NAME", 
"Slide" )
 #define STR_MASTERSLIDE_NAME
NC_("STR_MASTERSLIDE_NAME", "Master Slide")
+#define STR_MASTERSLIDE_LABEL   
NC_("STR_MASTERSLIDE_LABEL", "Master Slide:")
 #define STR_MASTERPAGE_NAME 
NC_("STR_MASTERPAGE_NAME", "Master Page")
+#define STR_MASTERPAGE_LABEL
NC_("STR_MASTERPAGE_LABEL", "Master Page:")
 #define STR_NOTES   NC_("STR_NOTES", 
"(Notes)" )
 #define STR_HANDOUT NC_("STR_HANDOUT", 
"Handouts" )
 #define STR_PRESOBJ_MPTITLE 
NC_("STR_PRESOBJ_MPTITLE", "Click to edit the title text format" )
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx 
b/sd/source/ui/sidebar/SlideBackground.cxx
index 8b2e15dc7671..9c94a208b2cb 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -239,7 +239,7 @@ void SlideBackground::HandleContextChange(
 
 if ( IsImpress() )
 {
-mpMasterLabel->SetText(SdResId(STR_MASTERSLIDE_NAME));
+mpMasterLabel->SetText(SdResId(STR_MASTERSLIDE_LABEL));
 mpMarginSelectBox->Hide();
 
 if ( maContext == maImpressMasterContext )
@@ -294,7 +294,7 @@ void SlideBackground::HandleContextChange(
 }
 else if ( IsDraw() )
 {
-mpMasterLabel->SetText(SdResId(STR_MASTERPAGE_NAME));
+mpMasterLabel->SetText(SdResId(STR_MASTERPAGE_LABEL));
 }
 }
 
@@ -558,7 +558,7 @@ IMPL_LINK(SlideBackground, EventMultiplexerListener,
 }
 else if ( maContext == maImpressNotesContext )
 {
-mpMasterLabel->SetText(SdResId(STR_MASTERSLIDE_NAME));
+mpMasterLabel->SetText(SdResId(STR_MASTERSLIDE_LABEL));
 ViewShell* pMainViewShell = 
mrBase.GetMainViewShell().get();
 
 if (pMainViewShell)
diff --git a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui 
b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui
index 70bccb25c7c8..55783273dfe7 100644
--- a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui
+++ b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui
@@ -194,7 +194,7 @@
 True
 False
 end
-Orientation: 
+Orientation:
   
   
 0
@@ -209,7 +209,7 @@
 True
 
   
-Master Slide
+Master View
 True
 True
 True
@@ -264,7 +264,7 @@
 True
 False
 end
-Margin: 
+Margin:
   
   
 0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gpg4libre2' - package/source

2017-12-07 Thread Thorsten Behrens
 package/source/zippackage/ZipPackageStream.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit a5c16516be328b537225c2cfeca1a59e10b329d3
Author: Thorsten Behrens 
Date:   Thu Dec 7 09:21:12 2017 +0100

fixup package for clang errors

Change-Id: I15022f8675bb297cb806f4c830148fc6f7b93881

diff --git a/package/source/zippackage/ZipPackageStream.cxx 
b/package/source/zippackage/ZipPackageStream.cxx
index c87d000f21f5..160dfa8d310f 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -518,9 +518,6 @@ bool ZipPackageStream::saveChild(
 const OUString sStartKeyAlgProperty  ("StartKeyAlgorithm");
 const OUString sDigestAlgProperty("DigestAlgorithm");
 const OUString sDerivedKeySizeProperty  ("DerivedKeySize");
-const OUString sPgpKeyIDProperty( "KeyId" );
-const OUString sPgpKeyPacketProperty( "KeyPacket" );
-const OUString sCipherValueProperty ( "CipherValue" );
 
 uno::Sequence < beans::PropertyValue > aPropSet (PKG_SIZE_NOENCR_MNFST);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits