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

2018-08-16 Thread Libreoffice Gerrit user
 include/svl/zforlist.hxx   |2 +-
 reportdesign/source/ui/report/ReportController.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 51e73ccb003357d17eab1c6536f3108e36ca5868
Author: Andrea Gelmini 
AuthorDate: Thu Aug 16 23:08:56 2018 +0200
Commit: Julien Nabet 
CommitDate: Fri Aug 17 08:58:08 2018 +0200

Fix typos

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

diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index 8b1574cf8a08..4234bf8a8709 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -227,7 +227,7 @@ enum NfIndexTableOffset
 // (NF_..._START and NF_..._END above) to fill its categories with builtin
 // formats, make new formats known to svx/source/items/numfmtsh.cxx
 // SvxNumberFormatShell::FillEListWithStd_Impl(), otherwise they will not
-// be be listed at all. Yes that is ugly.
+// be listed at all. Yes that is ugly.
 
 NF_FRACTION_3D = NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS,// # ???/???
 NF_FRACTION_2,  // # ?/2
diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 57c38e54109a..0a652766b5b1 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -4185,7 +4185,7 @@ bool 
OReportController::impl_setPropertyAtControls_throw(const char* pUndoResId,
 }
 catch(const UnknownPropertyException& e)
 {
-SAL_WARN("reportdesign", "UnknowPropertyException:" << e);
+SAL_WARN("reportdesign", "UnknownPropertyException:" << e);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 i18nlangtag/qa/cppunit/test_languagetag.cxx |1 +
 i18nlangtag/source/isolang/isolang.cxx  |4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit f000f9f1a5b9a4ef157e09f3104e57f6b8f3239d
Author: Eike Rathke 
AuthorDate: Thu Aug 16 18:53:38 2018 +0200
Commit: Eike Rathke 
CommitDate: Fri Aug 17 08:26:55 2018 +0200

Override [sd-IN] with [sd-Deva-IN]

Deva is not listed as Suppress-Script for sd in

https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry

Also, this seems to be what MS expects, see
https://msdn.microsoft.com/en-us/library/cc233965

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

diff --git a/i18nlangtag/qa/cppunit/test_languagetag.cxx 
b/i18nlangtag/qa/cppunit/test_languagetag.cxx
index 0cfaf76f484c..2a22924e33d5 100644
--- a/i18nlangtag/qa/cppunit/test_languagetag.cxx
+++ b/i18nlangtag/qa/cppunit/test_languagetag.cxx
@@ -744,6 +744,7 @@ bool checkMapping( const OUString& rStr1, const OUString& 
rStr2 )
 if (rStr1 == "crk-Cans-CN" ) return rStr2 == "crk-Cans-CA";
 if (rStr1 == "en-GB-oed"   ) return rStr2 == "en-GB-oxendict";
 if (rStr1 == "es-ES_tradnl") return rStr2 == "es-ES-u-co-trad";
+if (rStr1 == "sd-IN"   ) return rStr2 == "sd-Deva-IN";
 return rStr1 == rStr2;
 }
 
diff --git a/i18nlangtag/source/isolang/isolang.cxx 
b/i18nlangtag/source/isolang/isolang.cxx
index 0570be841736..6ddafafe2c1c 100644
--- a/i18nlangtag/source/isolang/isolang.cxx
+++ b/i18nlangtag/source/isolang/isolang.cxx
@@ -360,7 +360,7 @@ static IsoLanguageCountryEntry const aImplIsoLangEntries[] =
 { LANGUAGE_PUNJABI_PAKISTAN,   "lah", "PK", kSAME },// 
macrolanguage code, earlier preferred 'lah' over 'pa' for Western Panjabi, now 
there is 'pnb'
 { LANGUAGE_PUNJABI_PAKISTAN,"pa", "PK", kSAME },// MS maps 
this to 'pa-Arab-PK', but 'pa'='pan' Eastern Panjabi is not used in PK, only in
 { LANGUAGE_SINDHI_PAKISTAN, "sd", "PK", kSAME },// Arabic 
script
-{ LANGUAGE_SINDHI,  "sd", "IN", k0},// TODO: 
there's Deva(nagari) and Arab(ic) script, MS maps this to 'sd-Deva-IN'
+{ LANGUAGE_SINDHI,  "sd", "IN", kSAME },// 
Devanagari script
 { LANGUAGE_BELARUSIAN,  "be", "BY", k0},
 { LANGUAGE_CATALAN, "ca", "ES", k0},// Spain 
(default)
 { LANGUAGE_CATALAN, "ca", "AD", k0},// Andorra
@@ -721,7 +721,7 @@ static IsoLanguageScriptCountryEntry const 
aImplIsoLangScriptEntries[] =
 { LANGUAGE_YIDDISH, "yi-Hebr", "IL", kSAME },  
 // macrolanguage code; MS, Hebr is suppress-script
 { LANGUAGE_UZBEK_LATIN, "uz-Latn", "UZ", k0},  
 // macrolanguage code
 { LANGUAGE_UZBEK_LATIN_LSO, "uz-Latn", ""  , k0},
-//  { LANGUAGE_SINDHI,  "sd-Deva", "IN", k0},  
 // MS, TODO: see comment above in aImplIsoLangEntries
+{ LANGUAGE_SINDHI,  "sd-Deva", "IN", k0},  
 // MS
 { LANGUAGE_SINDHI_PAKISTAN, "sd-Arab", "PK", k0},  
 // MS
 { LANGUAGE_SINDHI_ARABIC_LSO,   "sd-Arab", ""  , k0},
 { LANGUAGE_CHEROKEE_UNITED_STATES, "chr-Cher", "US", k0},  
 // MS
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: error creating LO installation dmg file using make

2018-08-16 Thread Stephan Bergmann

On 17/08/18 08:25, Stephan Bergmann wrote:

If yours wasn't a from-scratch build, what might help is `make clean`.


(ignore me, you wrote you already did that anyway :)
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-08-16 Thread Libreoffice Gerrit user
 svl/source/numbers/zforscan.cxx |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit a4c9e4539ee82c409add42e68329d4eb1100d62f
Author: Eike Rathke 
AuthorDate: Thu Aug 16 18:00:29 2018 +0200
Commit: Eike Rathke 
CommitDate: Fri Aug 17 08:25:23 2018 +0200

Do not convert YMD date order to YDM and vice versa, tdf#107012 follow-up

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

diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 8ececca57bba..b3589ed7c601 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -2975,7 +2975,11 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 switch (pLoc->getDateOrder())
 {
 case DateOrder::MDY:
-if (IsDateFragment( nDayPos, nMonthPos))
+// Convert only if the actual format is not of YDM
+// order (which would be a completely unusual order
+// anyway, but..), e.g. .DD.MM not to
+// /MM/DD
+if (IsDateFragment( nDayPos, nMonthPos) && 
!IsDateFragment( nYearPos, nDayPos))
 SwapArrayElements( nDayPos, nMonthPos);
 break;
 case DateOrder::YMD:
@@ -2998,7 +3002,10 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& 
rString )
 switch (pLoc->getDateOrder())
 {
 case DateOrder::DMY:
-if (IsDateFragment( nMonthPos, nDayPos))
+// Convert only if the actual format is not of YMD
+// order, e.g. /MM/DD not to .DD.MM
+/* TODO: convert such to DD.MM. instead? */
+if (IsDateFragment( nMonthPos, nDayPos) && 
!IsDateFragment( nYearPos, nMonthPos))
 SwapArrayElements( nMonthPos, nDayPos);
 break;
 case DateOrder::YMD:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: error creating LO installation dmg file using make

2018-08-16 Thread Stephan Bergmann

On 16/08/18 08:47, Stephan Bergmann wrote:

On 16/08/18 05:50, Ch g wrote:

autogen.input:

--enable-dbgutil
#--enable-debug
--disable-ccache
#--disable-cve-tests
--with-jdk-home=/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home 


--with-ant-home=/usr/local/Cellar/ant/1.10.5/libexec
--without-junit
--without-help
--without-myspell-dicts
--without-doxygen
--with-build-version=$(date +"Mac%Y-%m-%d")
--with-distro=LibreOfficeMacOSX
--with-package-format=dmg

command used:

make clean && ./autogen.sh && make -j 4 build-nocheck 2>&1

(I always get CppUnitTest errors without "build-nocheck" for both 
macos 10.13 and ubuntu 16.04.5/18.04.1)



Is "make" with "--with-distro=LibreOfficeMacOSX" and 
"--with-package-format=dmg" the correct way to create LO installation 
dmg file?


Your setup looks correct; beats me why it's failing for you that way. (I 
haven't built macOS packages myself in a while, but can check tonight 
whether any general error has sneaked in there lately.)


Cannot reproduce this (with configure settings not identical but 
somewhat comparable to yours; what I had to do was manually bump the 
-megabytes 1500 to 2000 in the hdiutil call in 
solenv/bin/modules/installer/simplepackage.pm, to avoid "hdiutil: create 
failed - No space left on device" errors).


If yours wasn't a from-scratch build, what might help is `make clean`.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-08-16 Thread Libreoffice Gerrit user
 compilerplugins/clang/returnconstant.cxx |  534 ++-
 1 file changed, 48 insertions(+), 486 deletions(-)

New commits:
commit 42580b440158d37781feed1623720368a4d1b7e0
Author: Noel Grandin 
AuthorDate: Thu Aug 16 11:54:14 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Aug 17 08:24:29 2018 +0200

update loplugin returnconstant

to find more stuff, and return less false positives

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

diff --git a/compilerplugins/clang/returnconstant.cxx 
b/compilerplugins/clang/returnconstant.cxx
index eff3495191fd..a11cff3d11de 100644
--- a/compilerplugins/clang/returnconstant.cxx
+++ b/compilerplugins/clang/returnconstant.cxx
@@ -9,6 +9,8 @@
 
 #include "plugin.hxx"
 #include "check.hxx"
+#include "compat.hxx"
+#include "functionaddress.hxx"
 #include 
 #include 
 #include 
@@ -21,33 +23,40 @@
 */
 namespace
 {
-class ReturnConstant : public RecursiveASTVisitor, public 
loplugin::Plugin
+class ReturnConstant : public loplugin::FunctionAddress
 {
 public:
 explicit ReturnConstant(loplugin::InstantiationData const& data)
-: Plugin(data)
+: loplugin::FunctionAddress(data)
 {
 }
 
 void run() override
 {
-// these files crash clang-3.5 somewhere in the 
isEvaluatable/EvaluateAsXXX stuff
-/*FileID mainFileID = 
compiler.getSourceManager().getMainFileID();
-if 
(strstr(compiler.getSourceManager().getFileEntryForID(mainFileID)->getName(), 
"bootstrapfixture.cxx") != 0) {
-return;
-}
-if 
(strstr(compiler.getSourceManager().getFileEntryForID(mainFileID)->getName(), 
"gtk3gtkinst.cxx") != 0) {
-return;
-}*/
-
 TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+
+for (auto& pair : problemFunctions)
+{
+auto functionDecl = pair.first;
+auto canonicalDecl = functionDecl->getCanonicalDecl();
+if (getFunctionsWithAddressTaken().find(canonicalDecl)
+!= getFunctionsWithAddressTaken().end())
+continue;
+report(DiagnosticsEngine::Warning,
+   "Method only returns a single constant value %0, does it 
make sense?",
+   compat::getBeginLoc(functionDecl))
+<< pair.second << functionDecl->getSourceRange();
+if (functionDecl != functionDecl->getCanonicalDecl())
+report(DiagnosticsEngine::Note, "decl here",
+   compat::getBeginLoc(functionDecl->getCanonicalDecl()))
+<< functionDecl->getCanonicalDecl()->getSourceRange();
+}
 }
 
 bool TraverseCXXMethodDecl(CXXMethodDecl*);
 bool VisitReturnStmt(ReturnStmt const*);
 
 private:
-StringRef getFilename(FunctionDecl const* functionDecl);
 std::string getExprValue(Expr const* arg);
 
 struct Context
@@ -56,174 +65,43 @@ private:
 std::set values;
 };
 std::vector m_functionStack;
+std::vector> problemFunctions;
 };
 
-StringRef ReturnConstant::getFilename(FunctionDecl const* functionDecl)
-{
-SourceLocation spellingLocation = 
compiler.getSourceManager().getSpellingLoc(
-functionDecl->getCanonicalDecl()->getNameInfo().getLoc());
-StringRef name{ compiler.getSourceManager().getFilename(spellingLocation) 
};
-return name;
-}
-
-static bool startsWith(std::string const& rStr, char const* pSubStr)
-{
-return rStr.compare(0, strlen(pSubStr), pSubStr) == 0;
-}
-
 bool ReturnConstant::TraverseCXXMethodDecl(CXXMethodDecl* functionDecl)
 {
 if (ignoreLocation(functionDecl))
-{
 return true;
-}
+if (isInUnoIncludeFile(functionDecl))
+return true;
+
 if (!functionDecl->hasBody())
-{
 return true;
-}
 if (!functionDecl->isThisDeclarationADefinition())
-{
 return true;
-}
-// stuff declared extern-C is almost always used as a some kind of callback
-if (functionDecl->isExternC())
-{
-return true;
-}
 if (functionDecl->isConstexpr())
-{
-return true;
-}
-if (functionDecl->isMain())
-{
-return true;
-}
-
-StringRef aFileName = getFilename(functionDecl);
-
-// various tests in here are empty stubs under Linux
-if (aFileName.startswith(SRCDIR "/sal/qa/"))
-{
-return true;
-}
-// lots of empty stuff here where it looks like someone is still going to 
"fill in the blanks"
-if (aFileName.startswith(SRCDIR "/basegfx/test/"))
-{
-return true;
-}
-// some stuff is just stubs under Linux, although this appears to be a 
SOLARIS-specific hack, so it
-// should probably not even be compiling under Linux.
-if (aFileName == SRCDIR "/setup_native/scripts/source/getuid.c")
-{
-return true;
-}

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

2018-08-16 Thread Libreoffice Gerrit user
 sdext/source/pdfimport/pdfparse/pdfparse.cxx |   30 +--
 1 file changed, 15 insertions(+), 15 deletions(-)

New commits:
commit e4e39a48fd6da85189af278d194e06e42189690d
Author: Noel Grandin 
AuthorDate: Thu Aug 16 12:38:52 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Aug 17 08:24:07 2018 +0200

loplugin:useuniqueptr in PDFGrammar

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

diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx 
b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
index e976e8c3a7f4..c46ff60b373c 100644
--- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 
 // disable warnings again because someone along the line has enabled them
 // (we have  included boost headers, what did you expect?)
@@ -322,7 +323,7 @@ public:
 pContainer->m_aSubElements.emplace_back( pComment );
 }
 
-void insertNewValue( PDFEntry* pNewValue, iteratorT pPos )
+void insertNewValue( std::unique_ptr pNewValue, iteratorT pPos )
 {
 PDFContainer* pContainer = nullptr;
 const char* pMsg = nullptr;
@@ -336,20 +337,20 @@ public:
 if( pObj )
 {
 if( pObj->m_pObject == nullptr )
-pObj->m_pObject = pNewValue;
+pObj->m_pObject = pNewValue.release();
 else
 {
 pMsg = "second value for object";
 pContainer = nullptr;
 }
 }
-else if( dynamic_cast(pNewValue) )
+else if( dynamic_cast(pNewValue.get()) )
 {
 PDFTrailer* pTrailer = 
dynamic_cast(pContainer);
 if( pTrailer )
 {
 if( pTrailer->m_pDict == nullptr )
-pTrailer->m_pDict = 
dynamic_cast(pNewValue);
+pTrailer->m_pDict = 
dynamic_cast(pNewValue.get());
 else
 pContainer = nullptr;
 }
@@ -361,44 +362,43 @@ public:
 }
 }
 if( pContainer )
-pContainer->m_aSubElements.emplace_back( pNewValue );
+pContainer->m_aSubElements.emplace_back( std::move(pNewValue) );
 else
 {
 if( ! pMsg )
 {
-if( dynamic_cast(pNewValue) )
+if( dynamic_cast(pNewValue.get()) )
 pMsg = "array without container";
 else
 pMsg = "value without container";
 }
-delete pNewValue;
 parseError( pMsg, pPos );
 }
 }
 
 void pushName( iteratorT first, iteratorT last )
 {
-insertNewValue( new PDFName(iteratorToString(first,last)), first );
+insertNewValue( 
o3tl::make_unique(iteratorToString(first,last)), first );
 }
 
 void pushDouble( iteratorT first, SAL_UNUSED_PARAMETER iteratorT /*last*/ )
 {
-insertNewValue( new PDFNumber(m_fDouble), first );
+insertNewValue( o3tl::make_unique(m_fDouble), first );
 }
 
 void pushString( iteratorT first, iteratorT last )
 {
-insertNewValue( new PDFString(iteratorToString(first,last)), first );
+insertNewValue( 
o3tl::make_unique(iteratorToString(first,last)), first );
 }
 
 void pushBool( iteratorT first, iteratorT last )
 {
-insertNewValue( new PDFBool( (last-first == 4) ), first );
+insertNewValue( o3tl::make_unique( last-first == 4 ), first );
 }
 
 void pushNull( iteratorT first, SAL_UNUSED_PARAMETER iteratorT )
 {
-insertNewValue( new PDFNull(), first );
+insertNewValue( o3tl::make_unique(), first );
 }
 
 
@@ -443,7 +443,7 @@ public:
 m_aUIntStack.pop_back();
 unsigned int nObject = m_aUIntStack.back();
 m_aUIntStack.pop_back();
-insertNewValue( new PDFObjectRef(nObject,nGeneration), first );
+insertNewValue( o3tl::make_unique(nObject,nGeneration), 
first );
 }
 
 void beginDict( iteratorT first, SAL_UNUSED_PARAMETER iteratorT )
@@ -451,7 +451,7 @@ public:
 PDFDict* pDict = new PDFDict();
 pDict->m_nOffset = first - m_aGlobalBegin;
 
-insertNewValue( pDict, first );
+insertNewValue( std::unique_ptr(pDict), first );
 // will not come here if insertion fails (exception)
 m_aObjectStack.push_back( pDict );
 }
@@ -481,7 +481,7 @@ public:
 PDFArray* pArray = new PDFArray();
 pArray->m_nOffset = first - m_aGlobalBegin;
 
-insertNewValue( pArray, first );
+insertNewValue( std::unique_ptr(pArray), first );
  

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

2018-08-16 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/ww8par.hxx  |2 +-
 sw/source/filter/ww8/ww8par3.cxx |   21 ++---
 2 files changed, 11 insertions(+), 12 deletions(-)

New commits:
commit c751fd0ebd6724fe2b8ee9f308841cabbb002391
Author: Noel Grandin 
AuthorDate: Thu Aug 16 11:44:52 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Aug 17 08:23:36 2018 +0200

loplugin:useuniqueptr in WW8ListManager

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

diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index ccab8afb730a..64c49ba6c5a1 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -162,7 +162,7 @@ private:
 SwDoc&   rDoc;
 const WW8Fib&rFib;
 SvStream&rSt;
-std::vector maLSTInfos;
+std::vector> maLSTInfos;
 std::vector> m_LFOInfos;// D. from PLF LFO, 
sorted exactly like in the WW8 Stream
 sal_uInt16   nUniqueList; // current number for creating unique list 
names
 SprmResult GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms, sal_uInt8 
nLen);
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 9d77bb574592..bda1388f5034 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -451,18 +451,18 @@ private:
 sal_uInt32 mnIdLst;
 public:
 explicit ListWithId(sal_uInt32 nIdLst) : mnIdLst(nIdLst) {}
-bool operator() (const WW8LSTInfo *pEntry) const
+bool operator() (const std::unique_ptr& pEntry) const
 { return (pEntry->nIdLst == mnIdLst); }
 };
 
 // Access via List-Id of LST Entry
 WW8LSTInfo* WW8ListManager::GetLSTByListId( sal_uInt32 nIdLst ) const
 {
-std::vector::const_iterator aResult =
+auto aResult =
 std::find_if(maLSTInfos.begin(),maLSTInfos.end(),ListWithId(nIdLst));
 if (aResult == maLSTInfos.end())
 return nullptr;
-return *aResult;
+return aResult->get();
 }
 
 static void lcl_CopyGreaterEight(OUString &rDest, OUString const &rSrc,
@@ -1216,7 +1216,7 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, 
SwWW8ImplReader& rReader_)
 aLST.bSimpleList || (aBits1 & 0x10));
 
 WW8LSTInfo* pLSTInfo = new WW8LSTInfo(pMyNumRule, aLST);
-maLSTInfos.push_back(pLSTInfo);
+maLSTInfos.emplace_back(pLSTInfo);
 
 nRemainingPlcfLst -= cbLSTF;
 }
@@ -1228,7 +1228,7 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, 
SwWW8ImplReader& rReader_)
 {
 WW8aISet aItemSet;// Character attributes from GrpprlChpx
 
-WW8LSTInfo* pListInfo = maLSTInfos[nList];
+WW8LSTInfo* pListInfo = maLSTInfos[nList].get();
 if( !pListInfo || !pListInfo->pNumRule ) break;
 SwNumRule& rMyNumRule = *pListInfo->pNumRule;
 
@@ -1474,15 +1474,14 @@ WW8ListManager::~WW8ListManager() 
COVERITY_NOEXCEPT_FALSE
  named lists remain in document
  unused automatic lists are removed from document (DelNumRule)
 */
-for(std::vector::iterator aIter = maLSTInfos.begin();
-aIter != maLSTInfos.end(); ++aIter)
+for(auto & rpInfo : maLSTInfos)
 {
-if ((*aIter)->pNumRule && !(*aIter)->bUsedInDoc &&
-(*aIter)->pNumRule->IsAutoRule())
+if (rpInfo->pNumRule && !rpInfo->bUsedInDoc &&
+rpInfo->pNumRule->IsAutoRule())
 {
-rDoc.DelNumRule((*aIter)->pNumRule->GetName());
+rDoc.DelNumRule(rpInfo->pNumRule->GetName());
 }
-delete *aIter;
+rpInfo.reset();
 }
 for (auto aIter = m_LFOInfos.rbegin(); aIter != m_LFOInfos.rend(); ++aIter)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 sw/source/core/layout/objectformatter.cxx |   52 ++
 1 file changed, 11 insertions(+), 41 deletions(-)

New commits:
commit a0f996703ec37c1403eeda27144bebfa1986aea5
Author: Noel Grandin 
AuthorDate: Thu Aug 16 11:38:54 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Aug 17 08:23:16 2018 +0200

loplugin:useuniqueptr in SwPageNumAndTypeOfAnchors

it's a small struct, so just store it inline in the std::vector

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

diff --git a/sw/source/core/layout/objectformatter.cxx 
b/sw/source/core/layout/objectformatter.cxx
index a0621956e730..892ac6a99693 100644
--- a/sw/source/core/layout/objectformatter.cxx
+++ b/sw/source/core/layout/objectformatter.cxx
@@ -44,86 +44,56 @@ class SwPageNumAndTypeOfAnchors
 bool mbAnchoredAtMaster;
 };
 
-std::vector< tEntry* > maObjList;
+std::vector< tEntry > maObjList;
 
 public:
 SwPageNumAndTypeOfAnchors()
 {
 }
-~SwPageNumAndTypeOfAnchors()
-{
-for ( std::vector< tEntry* >::iterator aIter = maObjList.begin();
-  aIter != maObjList.end(); ++aIter )
-{
-delete *aIter;
-}
-maObjList.clear();
-}
 
 void Collect( SwAnchoredObject& _rAnchoredObj )
 {
-tEntry* pNewEntry = new tEntry;
-pNewEntry->mpAnchoredObj = &_rAnchoredObj;
+tEntry aNewEntry;
+aNewEntry.mpAnchoredObj = &_rAnchoredObj;
 // #i33751#, #i34060# - method 
 // is replaced by method . It's return 
value
 // have to be checked.
 SwPageFrame* pPageFrameOfAnchor = 
_rAnchoredObj.FindPageFrameOfAnchor();
 if ( pPageFrameOfAnchor )
 {
-pNewEntry->mnPageNumOfAnchor = 
pPageFrameOfAnchor->GetPhyPageNum();
+aNewEntry.mnPageNumOfAnchor = 
pPageFrameOfAnchor->GetPhyPageNum();
 }
 else
 {
-pNewEntry->mnPageNumOfAnchor = 0;
+aNewEntry.mnPageNumOfAnchor = 0;
 }
 // --> #i26945# - collect type of anchor
 SwTextFrame* pAnchorCharFrame = 
_rAnchoredObj.FindAnchorCharFrame();
 if ( pAnchorCharFrame )
 {
-pNewEntry->mbAnchoredAtMaster = !pAnchorCharFrame->IsFollow();
+aNewEntry.mbAnchoredAtMaster = !pAnchorCharFrame->IsFollow();
 }
 else
 {
-pNewEntry->mbAnchoredAtMaster = true;
+aNewEntry.mbAnchoredAtMaster = true;
 }
-maObjList.push_back( pNewEntry );
+maObjList.push_back( aNewEntry );
 }
 
 SwAnchoredObject* operator[]( sal_uInt32 _nIndex )
 {
-SwAnchoredObject* bRetObj = nullptr;
-
-if ( _nIndex < Count())
-{
-bRetObj = maObjList[_nIndex]->mpAnchoredObj;
-}
-
-return bRetObj;
+return maObjList[_nIndex].mpAnchoredObj;
 }
 
 sal_uInt32 GetPageNum( sal_uInt32 _nIndex ) const
 {
-sal_uInt32 nRetPgNum = 0;
-
-if ( _nIndex < Count())
-{
-nRetPgNum = maObjList[_nIndex]->mnPageNumOfAnchor;
-}
-
-return nRetPgNum;
+return maObjList[_nIndex].mnPageNumOfAnchor;
 }
 
 // --> #i26945#
 bool AnchoredAtMaster( sal_uInt32 _nIndex )
 {
-bool bAnchoredAtMaster( true );
-
-if ( _nIndex < Count())
-{
-bAnchoredAtMaster = maObjList[_nIndex]->mbAnchoredAtMaster;
-}
-
-return bAnchoredAtMaster;
+return maObjList[_nIndex].mbAnchoredAtMaster;
 }
 
 sal_uInt32 Count() const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 sc/source/filter/xml/XMLStylesExportHelper.cxx |   24 +---
 sc/source/filter/xml/XMLStylesExportHelper.hxx |6 +++---
 sc/source/filter/xml/xmlexprt.cxx  |   16 ++--
 3 files changed, 14 insertions(+), 32 deletions(-)

New commits:
commit 1b95eb30f6358a9ebdedee2888be8273120669c8
Author: Noel Grandin 
AuthorDate: Thu Aug 16 11:03:36 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Aug 17 08:22:51 2018 +0200

loplugin:useuniqueptr in ScColumnRowStylesBase

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

diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx 
b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 57accced6e18..dba0fee848f6 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -982,18 +982,11 @@ ScColumnRowStylesBase::ScColumnRowStylesBase()
 
 ScColumnRowStylesBase::~ScColumnRowStylesBase()
 {
-auto i(aStyleNames.begin());
-auto endi(aStyleNames.end());
-while (i != endi)
-{
-delete *i;
-++i;
-}
 }
 
-sal_Int32 ScColumnRowStylesBase::AddStyleName(OUString* pString)
+sal_Int32 ScColumnRowStylesBase::AddStyleName(const OUString & rString)
 {
-aStyleNames.push_back(pString);
+aStyleNames.push_back(rString);
 return aStyleNames.size() - 1;
 }
 
@@ -1002,7 +995,7 @@ sal_Int32 ScColumnRowStylesBase::GetIndexOfStyleName(const 
OUString& rString, co
 sal_Int32 nPrefixLength(rPrefix.getLength());
 OUString sTemp(rString.copy(nPrefixLength));
 sal_Int32 nIndex(sTemp.toInt32());
-if (nIndex > 0 && static_cast(nIndex-1) < aStyleNames.size() && 
*aStyleNames.at(nIndex - 1) == rString)
+if (nIndex > 0 && static_cast(nIndex-1) < aStyleNames.size() && 
aStyleNames.at(nIndex - 1) == rString)
 return nIndex - 1;
 else
 {
@@ -1010,7 +1003,7 @@ sal_Int32 
ScColumnRowStylesBase::GetIndexOfStyleName(const OUString& rString, co
 bool bFound(false);
 while (!bFound && static_cast(i) < aStyleNames.size())
 {
-if (*aStyleNames.at(i) == rString)
+if (aStyleNames.at(i) == rString)
 bFound = true;
 else
 ++i;
@@ -1022,15 +1015,8 @@ sal_Int32 
ScColumnRowStylesBase::GetIndexOfStyleName(const OUString& rString, co
 }
 }
 
-OUString* ScColumnRowStylesBase::GetStyleNameByIndex(const sal_Int32 nIndex)
+OUString& ScColumnRowStylesBase::GetStyleNameByIndex(const sal_Int32 nIndex)
 {
-if ( nIndex < 0 || nIndex >= sal::static_int_cast( 
aStyleNames.size() ) )
-{
-// should no longer happen, use first style then
-OSL_FAIL("GetStyleNameByIndex: invalid index");
-return aStyleNames[0];
-}
-
 return aStyleNames[nIndex];
 }
 
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.hxx 
b/sc/source/filter/xml/XMLStylesExportHelper.hxx
index 6012a5b7e324..478e94d75f7f 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.hxx
@@ -205,16 +205,16 @@ public:
 
 class ScColumnRowStylesBase
 {
-std::vector   aStyleNames;
+std::vector   aStyleNames;
 
 public:
 ScColumnRowStylesBase();
 virtual ~ScColumnRowStylesBase();
 
 virtual void AddNewTable(const sal_Int32 nTable, const sal_Int32 nFields) 
= 0;
-sal_Int32 AddStyleName(OUString* pString);
+sal_Int32 AddStyleName(const OUString & rString);
 sal_Int32 GetIndexOfStyleName(const OUString& rString, const OUString& 
rPrefix);
-OUString* GetStyleNameByIndex(const sal_Int32 nIndex);
+OUString& GetStyleNameByIndex(const sal_Int32 nIndex);
 };
 
 struct ScColumnStyle
diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index 9312936fd3d5..9fffd6a4c637 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -747,7 +747,7 @@ void ScXMLExport::WriteSingleColumn(const sal_Int32 
nRepeatColumns, const sal_In
 const sal_Int32 nIndex, const bool bIsAutoStyle, const bool bIsVisible)
 {
 CheckAttrList();
-AddAttribute(sAttrStyleName, 
*pColumnStyles->GetStyleNameByIndex(nStyleIndex));
+AddAttribute(sAttrStyleName, 
pColumnStyles->GetStyleNameByIndex(nStyleIndex));
 if (!bIsVisible)
 AddAttribute(XML_NAMESPACE_TABLE, XML_VISIBILITY, XML_COLLAPSE);
 if (nRepeatColumns > 1)
@@ -1365,7 +1365,7 @@ void ScXMLExport::WriteRowStartTag(
 const sal_Int32 nIndex, const sal_Int32 nEqualRows,
 bool bHidden, bool bFiltered)
 {
-AddAttribute(sAttrStyleName, *pRowStyles->GetStyleNameByIndex(nIndex));
+AddAttribute(sAttrStyleName, pRowStyles->GetStyleNameByIndex(nIndex));
 if (bHidden)
 {
 if (bFiltered)
@@ -2202,8 +2202,7 @@ void ScXMLExport::AddStyleFromColumn(const 
uno::Reference&
 {
 
GetAutoStylePool()->Regist

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

2018-08-16 Thread Libreoffice Gerrit user
 vcl/inc/unx/salbmp.h   |6 +
 vcl/unx/generic/gdi/salbmp.cxx |   49 ++---
 2 files changed, 14 insertions(+), 41 deletions(-)

New commits:
commit 790a32e2d22e48d5eb3463febf04874d8ae11782
Author: Noel Grandin 
AuthorDate: Wed Aug 15 17:18:25 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Aug 17 08:22:29 2018 +0200

loplugin:useuniqueptr in ImplSalBitmapCache

and dramatically simplify

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

diff --git a/vcl/inc/unx/salbmp.h b/vcl/inc/unx/salbmp.h
index 34c7ff076156..82ed6c3bd724 100644
--- a/vcl/inc/unx/salbmp.h
+++ b/vcl/inc/unx/salbmp.h
@@ -211,14 +211,12 @@ public:
 };
 
 
-struct ImplBmpObj;
+class X11SalBitmap;
 
 class ImplSalBitmapCache
 {
 private:
-typedef ::std::list< ImplBmpObj* > BmpList_impl;
-
-BmpList_implmaBmpList;
+std::vector  maBmpList;
 
 public:
 
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx
index f800a776a6e3..5dcfcef19974 100644
--- a/vcl/unx/generic/gdi/salbmp.cxx
+++ b/vcl/unx/generic/gdi/salbmp.cxx
@@ -1058,14 +1058,6 @@ void ImplSalDDB::ImplDraw(
 }
 
 
-struct ImplBmpObj
-{
-X11SalBitmap*   mpBmp;
-
-ImplBmpObj( X11SalBitmap* pBmp ) :
-mpBmp( pBmp ) {}
-};
-
 ImplSalBitmapCache::ImplSalBitmapCache()
 {
 }
@@ -1077,34 +1069,21 @@ ImplSalBitmapCache::~ImplSalBitmapCache()
 
 void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp )
 {
-ImplBmpObj* pObj = nullptr;
-boolbFound = false;
-
-for(
-BmpList_impl::iterator it = maBmpList.begin();
-(it != maBmpList.end() ) && !bFound ;
-++it
-) {
-pObj = *it;
-if( pObj->mpBmp == pBmp )
-bFound = true;
+for(auto pObj : maBmpList)
+{
+if( pObj == pBmp )
+return;
 }
-
-if( !bFound )
-maBmpList.push_back( new ImplBmpObj( pBmp ) );
+maBmpList.push_back( pBmp );
 }
 
 void ImplSalBitmapCache::ImplRemove( X11SalBitmap const * pBmp )
 {
-for(
-BmpList_impl::iterator it = maBmpList.begin();
-it != maBmpList.end();
-++it
-) {
-if( (*it)->mpBmp == pBmp )
+for( auto it = maBmpList.begin(); it != maBmpList.end(); ++it)
+{
+if( *it == pBmp )
 {
-(*it)->mpBmp->ImplRemovedFromCache();
-delete *it;
+(*it)->ImplRemovedFromCache();
 maBmpList.erase( it );
 break;
 }
@@ -1113,13 +1092,9 @@ void ImplSalBitmapCache::ImplRemove( X11SalBitmap const 
* pBmp )
 
 void ImplSalBitmapCache::ImplClear()
 {
-for(
-BmpList_impl::iterator it = maBmpList.begin();
-it != maBmpList.end();
-++it
-) {
-(*it)->mpBmp->ImplRemovedFromCache();
-delete *it;
+for(auto pObj : maBmpList)
+{
+pObj->ImplRemovedFromCache();
 }
 maBmpList.clear();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 connectivity/source/drivers/file/FNoException.cxx |6 --
 connectivity/source/drivers/file/fanalyzer.cxx|2 
 connectivity/source/drivers/file/fcomp.cxx|   46 +++---
 connectivity/source/drivers/mork/MQueryHelper.hxx |8 ---
 connectivity/source/inc/file/fcomp.hxx|2 
 5 files changed, 26 insertions(+), 38 deletions(-)

New commits:
commit 7125c6798f94a8b7345372ba36dbabd89bab8820
Author: Noel Grandin 
AuthorDate: Thu Aug 16 10:31:35 2018 +0200
Commit: Noel Grandin 
CommitDate: Fri Aug 17 08:22:41 2018 +0200

loplugin:useuniqueptr in connectivity/file

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

diff --git a/connectivity/source/drivers/file/FNoException.cxx 
b/connectivity/source/drivers/file/FNoException.cxx
index dfb080dc4ee3..bd17c4fc85ba 100644
--- a/connectivity/source/drivers/file/FNoException.cxx
+++ b/connectivity/source/drivers/file/FNoException.cxx
@@ -49,10 +49,6 @@ OPredicateInterpreter::~OPredicateInterpreter()
 
 void OPredicateCompiler::Clean()
 {
-for(OCodeList::reverse_iterator aIter = m_aCodeList.rbegin(); aIter != 
m_aCodeList.rend();++aIter)
-{
-delete *aIter;
-}
 m_aCodeList.clear();
 }
 
@@ -61,7 +57,7 @@ void OSQLAnalyzer::bindParameterRow(OValueRefRow const & 
_pRow)
 OCodeList& rCodeList= m_aCompiler->m_aCodeList;
 for (auto const& code : rCodeList)
 {
-OOperandParam* pParam = dynamic_cast(code);
+OOperandParam* pParam = dynamic_cast(code.get());
 if ( pParam )
 pParam->bindValue(_pRow);
 }
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx 
b/connectivity/source/drivers/file/fanalyzer.cxx
index accd53ab6809..15fe2c431b7f 100644
--- a/connectivity/source/drivers/file/fanalyzer.cxx
+++ b/connectivity/source/drivers/file/fanalyzer.cxx
@@ -119,7 +119,7 @@ void OSQLAnalyzer::bindRow(OCodeList& rCodeList,const 
OValueRefRow& _pRow)
 {
 for (auto const& code : rCodeList)
 {
-OOperandAttr* pAttr = dynamic_cast(code);
+OOperandAttr* pAttr = dynamic_cast(code.get());
 if (pAttr)
 {
 pAttr->bindValue(_pRow);
diff --git a/connectivity/source/drivers/file/fcomp.cxx 
b/connectivity/source/drivers/file/fcomp.cxx
index ec6f1622f94a..bdb46456fc38 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -152,10 +152,10 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode const 
* pPredicateNode)
 
 if (SQL_ISTOKEN(pPredicateNode->getChild(1),OR))// 
OR-Operator
 {
-m_aCodeList.push_back(new OOp_OR);
+m_aCodeList.emplace_back(new OOp_OR);
 }
 else if (SQL_ISTOKEN(pPredicateNode->getChild(1),AND))  // 
AND-Operator
-m_aCodeList.push_back(new OOp_AND);
+m_aCodeList.emplace_back(new OOp_AND);
 else
 {
 OSL_FAIL("OPredicateCompiler: Error in Parse Tree");
@@ -164,7 +164,7 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode const * 
pPredicateNode)
 else if (SQL_ISRULE(pPredicateNode,boolean_factor))
 {
 execute(pPredicateNode->getChild(1));
-m_aCodeList.push_back(new OOp_NOT);
+m_aCodeList.emplace_back(new OOp_NOT);
 }
 else if (SQL_ISRULE(pPredicateNode,comparison_predicate))
 {
@@ -188,10 +188,10 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode const 
* pPredicateNode)
 execute(pPredicateNode->getChild(2));   // 
process the right branch
 if (SQL_ISPUNCTUATION(pPredicateNode->getChild(1),"+"))
 {
-m_aCodeList.push_back(new OOp_ADD);
+m_aCodeList.emplace_back(new OOp_ADD);
 }
 else if (SQL_ISPUNCTUATION(pPredicateNode->getChild(1),"-"))
-m_aCodeList.push_back(new OOp_SUB);
+m_aCodeList.emplace_back(new OOp_SUB);
 else
 {
 OSL_FAIL("OPredicateCompiler: Error in Parse Tree num_value_exp");
@@ -203,10 +203,10 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode const 
* pPredicateNode)
 execute(pPredicateNode->getChild(2));   // 
process the right branch
 if (SQL_ISPUNCTUATION(pPredicateNode->getChild(1),"*"))
 {
-m_aCodeList.push_back(new OOp_MUL);
+m_aCodeList.emplace_back(new OOp_MUL);
 }
 else if (SQL_ISPUNCTUATION(pPredicateNode->getChild(1),"/"))
-m_aCodeList.push_back(new OOp_DIV);
+m_aCodeList.emplace_back(new OOp_DIV);
 else
 {
 OSL_FAIL("OPredicateCompiler: Error in Parse Tree num_value_exp");
@@ -261,7 +261,7 @@ void OPredicateCompiler::execute_COMPARE(OSQLParseNode 
const * pPredicateNode)
 
 execute(pPredicateNode->getChild(0));
 execute(pPredicateNode->

Re: Compiler baselines

2018-08-16 Thread Stephan Bergmann

On 24/07/18 14:45, Tor Lillqvist wrote:
I would assume that Visual Studio gently but firmly tries to insist you 
keep updated to the latest release of it anyway, so I don't see any 
reason to not require a relatively recent release. So feel free to 
explicitly do that, if you can figure our how to do it cleanly in 
configure.ac .


 "On Windows, check for at 
least Visual Studio 2017 version 15.7" would implement that.  Lets keep 
it -2 until we actually need it.

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


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

2018-08-16 Thread Libreoffice Gerrit user
 compilerplugins/clang/check.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit f58933829dc6c11a06255ae8d5417dea56264c49
Author: Stephan Bergmann 
AuthorDate: Thu Aug 16 22:15:05 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 17 08:19:48 2018 +0200

Avoid loplugin:redundantcast false positive involving decltype

..with libc++ on macOS:

> 
/Users/stephan/Software/lo2/core/sw/source/core/doc/CntntIdxStore.cxx:238:44: 
error: static_cast from 'decltype(__x.base() - __y.base())' (aka 'long') 
prvalue to 'long' prvalue is redundant [loplugin:redundantcast]
> const MarkEntry aEntry = { static_cast(ppBkmk - 
pMarkAccess->getAllMarksBegin()), false, 
pBkmk->GetMarkPos().nContent.GetIndex() };
>
^~~

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

diff --git a/compilerplugins/clang/check.cxx b/compilerplugins/clang/check.cxx
index 86484d6828cf..acda74adacd6 100644
--- a/compilerplugins/clang/check.cxx
+++ b/compilerplugins/clang/check.cxx
@@ -261,7 +261,7 @@ bool isOkToRemoveArithmeticCast(
 clang::ASTContext & context, clang::QualType t1, clang::QualType t2, const 
clang::Expr* subExpr)
 {
 // Don't warn if the types are arithmetic (in the C++ meaning), and: either
-// at least one is a typedef (and if both are typedefs,they're different),
+// at least one is a typedef or decltype (and if both are, they're 
different),
 // or the sub-expression involves some operation that is likely to change
 // types through promotion, or the sub-expression is an integer literal (so
 // its type generally depends on its value and suffix if any---even with a
@@ -270,7 +270,8 @@ bool isOkToRemoveArithmeticCast(
  || t1->isRealFloatingType())
 && ((t1.getLocalUnqualifiedType() != t2.getLocalUnqualifiedType()
  && (loplugin::TypeCheck(t1).Typedef()
- || loplugin::TypeCheck(t2).Typedef()))
+ || loplugin::TypeCheck(t2).Typedef()
+ || llvm::isa(t1) || 
llvm::isa(t2)))
 || isArithmeticOp(subExpr)
 || 
llvm::isa(subExpr->IgnoreParenImpCasts(
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 vcl/quartz/ctfonts.cxx |2 +-
 vcl/quartz/salbmp.cxx  |6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit d7e087608eba7dc6f966204f0e57e88c2ab37764
Author: Stephan Bergmann 
AuthorDate: Thu Aug 16 22:13:07 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 17 08:19:24 2018 +0200

loplugin:redundantfcast

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

diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index d586a120726a..a78b06550530 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -461,7 +461,7 @@ public:
 if(nIndex < mnPaletteCount)
 return mrPalette[nIndex].GetColor();
 else
-return Color(COL_BLACK);
+return COL_BLACK;
 }
 virtual void WritePixel( Color nColor ) override
 {
@@ -511,7 +511,7 @@ public:
 if(nIndex < mnPaletteCount)
 return mrPalette[nIndex].GetColor();
 else
-return Color(COL_BLACK);
+return COL_BLACK;
 }
 virtual void WritePixel( Color nColor ) override
 {
@@ -556,7 +556,7 @@ public:
 if(nIndex < mnPaletteCount)
 return mrPalette[nIndex].GetColor();
 else
-return Color(COL_BLACK);
+return COL_BLACK;
 }
 virtual void WritePixel( Color nColor ) override
 {
commit 585482133b67d100c0480bfdd924035593985a97
Author: Stephan Bergmann 
AuthorDate: Thu Aug 16 22:12:22 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 17 08:19:13 2018 +0200

loplugin:cstylecast

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

diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index af7cb12970d8..869ece86732f 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -62,7 +62,7 @@ CoreTextStyle::CoreTextStyle(const PhysicalFontFace& rPFF, 
const FontSelectPatte
 // handle font stretching if any
 if( (rFSP.mnWidth != 0) && (rFSP.mnWidth != rFSP.mnHeight) )
 {
-mfFontStretch = (float)rFSP.mnWidth / rFSP.mnHeight;
+mfFontStretch = float(rFSP.mnWidth) / rFSP.mnHeight;
 aMatrix = CGAffineTransformConcat(aMatrix, 
CGAffineTransformMakeScale(mfFontStretch, 1.0F));
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 loleaflet/dist/toolbar/toolbar.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 64f40368457903abc0b1adf0ba92ee8ad744d244
Author: Jan Holesovsky 
AuthorDate: Fri Aug 17 07:33:43 2018 +0200
Commit: Jan Holesovsky 
CommitDate: Fri Aug 17 07:33:43 2018 +0200

Fix jslint error.

Change-Id: I7c02c2cc021bf6c67c2158e324684f3c0c1cecfb

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index c2aa1c137..d9a5e8712 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -998,7 +998,7 @@ map.on('doclayerinit', function () {
{ id: '512', text: _('Sum')},
{ id: '8192', text: _('Selection count')},
{ id: '1', text: _('None')}
-   ]}
+   ]}
]);
 
// Remove irrelevant toolbars
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 loleaflet/src/layer/tile/TileLayer.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c7908cb45636ddad5dfe12f37da7f4d433a4b619
Author: Henry Castro 
AuthorDate: Thu Aug 16 16:17:37 2018 -0400
Commit: Jan Holesovsky 
CommitDate: Fri Aug 17 07:30:23 2018 +0200

loleaflet: auto fit width limit 100%

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

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 09f3dc93d..a5fa6d400 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -2060,7 +2060,7 @@ L.TileLayer = L.GridLayer.extend({
var widthTwips = newSize.x * this._map.options.tileWidthTwips / 
this._tileSize;
var ratio = widthTwips / this._docWidthTwips;
 
-   maxZoom = maxZoom ? maxZoom : this.options.maxZoom;
+   maxZoom = maxZoom ? maxZoom : this._map.options.zoom;
// 'fit width zoom' has no use in spreadsheets, ignore it there
if (this._docType !== 'spreadsheet') {
var crsScale = this._map.options.crs.scale(1);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 sc/source/ui/view/viewfunc.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 30c178dcb3301527ad92bbd245d1525ab77e314e
Author: Julien Nabet 
AuthorDate: Thu Aug 16 19:57:52 2018 +0200
Commit: Julien Nabet 
CommitDate: Fri Aug 17 07:17:01 2018 +0200

Related tdf#118547: don't change protection symbol if nTab == TABLEID_DOC

See Eike's comment in https://gerrit.libreoffice.org/#/c/59035/

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

diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 6533068bcd04..54677815d542 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2541,7 +2541,7 @@ bool ScViewFunc::Unprotect( SCTAB nTab, const OUString& 
rPassword )
 if ( nTab == TABLEID_DOC || rMark.GetSelectCount() <= 1 )
 {
 bChanged = rFunc.Unprotect( nTab, rPassword, false );
-if (bChanged)
+if (bChanged && nTab != TABLEID_DOC)
 SetTabProtectionSymbol(nTab, false);
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 cui/uiconfig/ui/colorpage.ui |1 +
 1 file changed, 1 insertion(+)

New commits:
commit da7040510d5be27ad7b90ffb0c962535f3375358
Author: Maxim Monastirsky 
AuthorDate: Thu Aug 16 18:24:54 2018 +0300
Commit: Maxim Monastirsky 
CommitDate: Fri Aug 17 07:14:57 2018 +0200

tdf#119299 Start with a never scrollbar policy

Similar to 8161d9cf7649e1183e51aaa2525a9c0374205a3d
("Fix initial width of the color palette in welded picker")

Change-Id: I9d9584c8cc41ac5d3ca886a7541fc7874d1ef933
Reviewed-on: https://gerrit.libreoffice.org/59206
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/cui/uiconfig/ui/colorpage.ui b/cui/uiconfig/ui/colorpage.ui
index 411389cd05be..a629ee08c03a 100644
--- a/cui/uiconfig/ui/colorpage.ui
+++ b/cui/uiconfig/ui/colorpage.ui
@@ -244,6 +244,7 @@
 True
 True
 never
+never
 in
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Crash test update

2018-08-16 Thread Crashtest VM
New crashtest update available at 
http://dev-builds.libreoffice.org/crashtest/d4935799284769dd8e5f983fa8f55275391420a3/


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: helpcontent2

2018-08-16 Thread Libreoffice Gerrit user
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 380d0fda99ff664de8443cfc33c7c86bca18134c
Author: Mike Kaganski 
AuthorDate: Tue Jul 24 03:26:09 2018 +0200
Commit: Gerrit Code Review 
CommitDate: Thu Aug 16 23:56:33 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  - Fix excel syntax description

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

diff --git a/helpcontent2 b/helpcontent2
index f0e9b27d338a..f6f00dd19eb2 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit f0e9b27d338a12bb5c7631f3c935ba9969bd7db3
+Subproject commit f6f00dd19eb27c293d147262a18329df60aa6bab
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 source/text/scalc/01/04060109.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f6f00dd19eb27c293d147262a18329df60aa6bab
Author: Mike Kaganski 
AuthorDate: Tue Jul 24 03:26:09 2018 +0200
Commit: Olivier Hallot 
CommitDate: Thu Aug 16 23:56:33 2018 +0200

Fix excel syntax description

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

diff --git a/source/text/scalc/01/04060109.xhp 
b/source/text/scalc/01/04060109.xhp
index e5a72c21d..cffee7eb8 100644
--- a/source/text/scalc/01/04060109.xhp
+++ b/source/text/scalc/01/04060109.xhp
@@ -216,7 +216,7 @@
 Ref represents a reference to a cell or an area (in 
text form) for which to return the contents.
  
 A1 (optional) - if set to 0, the R1C1 notation is 
used. If this parameter is absent or set to another value than 0, the A1 
notation is used.
- If you open 
an Excel spreadsheet that uses indirect addresses calculated from string 
functions, the sheet addresses will not be translated automatically. For 
example, the Excel address in INDIRECT("filename!sheetname"&B1) is not 
converted into the Calc address in 
INDIRECT("filename.sheetname"&B1).UFI: for 
#i34465#
+ If you open 
an Excel spreadsheet that uses indirect addresses calculated from string 
functions, the sheet addresses will not be translated automatically. For 
example, the Excel address in INDIRECT("[filename]sheetname!"&B1) is not 
converted into the Calc address in 
INDIRECT("filename#sheetname."&B1).UFI: for 
#i34465#
  Example
  
 =INDIRECT(A1) equals 100 if A1 contains 
C108 as a reference and cell C108 contains a value of 100.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: connectivity/inc connectivity/source dbaccess/source desktop/source editeng/source filter/source

2018-08-16 Thread Libreoffice Gerrit user
 connectivity/inc/strings.hrc |2 +-
 connectivity/source/drivers/mork/MCatalog.hxx|2 +-
 connectivity/source/inc/hsqldb/HCatalog.hxx  |2 +-
 connectivity/source/inc/mysql/YCatalog.hxx   |2 +-
 dbaccess/source/core/dataaccess/databasedocument.hxx |2 +-
 desktop/source/lib/init.cxx  |2 +-
 editeng/source/editeng/impedit.cxx   |4 ++--
 editeng/source/editeng/impedit.hxx   |2 +-
 editeng/source/editeng/impedit2.cxx  |2 +-
 filter/source/svg/presentation_engine.js |2 +-
 10 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 57abecebc1b6c114b93fea34f133ac4eeb157dc3
Author: Andrea Gelmini 
AuthorDate: Thu Aug 16 13:55:31 2018 +0200
Commit: Jens Carl 
CommitDate: Thu Aug 16 23:50:54 2018 +0200

Fix typo: s/an other/another/g

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

diff --git a/connectivity/inc/strings.hrc b/connectivity/inc/strings.hrc
index d2380e45b92f..129a41826b02 100644
--- a/connectivity/inc/strings.hrc
+++ b/connectivity/inc/strings.hrc
@@ -77,7 +77,7 @@
 #define STR_ONL_ONE_COLUMN_PER_INDEX
NC_("STR_ONL_ONE_COLUMN_PER_INDEX", "The index could not be created. Only one 
column per index is allowed.")
 #define STR_COULD_NOT_CREATE_INDEX_NOT_UNIQUE   
NC_("STR_COULD_NOT_CREATE_INDEX_NOT_UNIQUE", "The index could not be created. 
The values are not unique.")
 #define STR_COULD_NOT_CREATE_INDEX  
NC_("STR_COULD_NOT_CREATE_INDEX", "The index could not be created. An unknown 
error appeared.")
-#define STR_COULD_NOT_CREATE_INDEX_NAME 
NC_("STR_COULD_NOT_CREATE_INDEX_NAME", "The index could not be created. The 
file '$filename$' is used by an other index.")
+#define STR_COULD_NOT_CREATE_INDEX_NAME 
NC_("STR_COULD_NOT_CREATE_INDEX_NAME", "The index could not be created. The 
file '$filename$' is used by another index.")
 #define STR_COULD_NOT_CREATE_INDEX_KEYSIZE  
NC_("STR_COULD_NOT_CREATE_INDEX_KEYSIZE", "The index could not be created. The 
size of the chosen column is too big.")
 #define STR_SQL_NAME_ERROR  NC_("STR_SQL_NAME_ERROR", "The 
name '$name$' doesn't match SQL naming constraints.")
 #define STR_COULD_NOT_DELETE_FILE   
NC_("STR_COULD_NOT_DELETE_FILE", "The file $filename$ could not be deleted.")
diff --git a/connectivity/source/drivers/mork/MCatalog.hxx 
b/connectivity/source/drivers/mork/MCatalog.hxx
index 5f5f817e78c8..1c6f7904f4ef 100644
--- a/connectivity/source/drivers/mork/MCatalog.hxx
+++ b/connectivity/source/drivers/mork/MCatalog.hxx
@@ -25,7 +25,7 @@ namespace connectivity
 {
 namespace mork
 {
-// please don't name the class the same name as in an other namespaces
+// please don't name the class the same name as in another namespaces
 // some compilers have problems with this task as I noticed on windows
 class OConnection;
 class OCatalog : public connectivity::sdbcx::OCatalog
diff --git a/connectivity/source/inc/hsqldb/HCatalog.hxx 
b/connectivity/source/inc/hsqldb/HCatalog.hxx
index f953c9f30ae1..b2aa95c11a2b 100644
--- a/connectivity/source/inc/hsqldb/HCatalog.hxx
+++ b/connectivity/source/inc/hsqldb/HCatalog.hxx
@@ -25,7 +25,7 @@ namespace connectivity
 {
 namespace hsqldb
 {
-// please don't name the class the same name as in an other namespaces
+// please don't name the class the same name as in another namespaces
 // some compilers have problems with this task as I noticed on windows
 class OHCatalog : public connectivity::sdbcx::OCatalog
 {
diff --git a/connectivity/source/inc/mysql/YCatalog.hxx 
b/connectivity/source/inc/mysql/YCatalog.hxx
index d6b465ff8c84..8af6b82c2aa0 100644
--- a/connectivity/source/inc/mysql/YCatalog.hxx
+++ b/connectivity/source/inc/mysql/YCatalog.hxx
@@ -25,7 +25,7 @@ namespace connectivity
 {
 namespace mysql
 {
-// please don't name the class the same name as in an other namespaces
+// please don't name the class the same name as in another namespaces
 // some compilers have problems with this task as I noticed on windows
 class OMySQLCatalog : public connectivity::sdbcx::OCatalog
 {
diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx 
b/dbaccess/source/core/dataaccess/databasedocument.hxx
index e910bff75d3e..df5765855df7 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.hxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.hxx
@@ -196,7 +196,7 @@ class ODatabaseDocument :public ModelDependentComponent 
// ModelDepe
 bool   
 m_bClosing;
 bool

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

2018-08-16 Thread Libreoffice Gerrit user
 include/vcl/outdev.hxx  |8 ++--
 include/vcl/vcllayout.hxx   |2 -
 sw/source/core/txtnode/fntcache.cxx |   40 +++-
 vcl/inc/sallayout.hxx   |2 -
 vcl/source/gdi/CommonSalLayout.cxx  |4 +-
 vcl/source/gdi/sallayout.cxx|4 +-
 vcl/source/outdev/text.cxx  |   72 ++--
 vcl/source/window/status.cxx|   10 +++--
 8 files changed, 75 insertions(+), 67 deletions(-)

New commits:
commit 436b829f5b904d76039db0818cff5dedf1ae89f1
Author: Miklos Vajna 
AuthorDate: Thu Aug 16 17:35:17 2018 +0200
Commit: Miklos Vajna 
CommitDate: Thu Aug 16 23:39:15 2018 +0200

sw: save one vcl layout call in SwFntObj::DrawText()

Pressing a key in Writer used to lay out the relevant string 4 times
(counting GenericSalLayout::LayoutText() invocations), save one of them
by pre-calculating the layout and sharing it between GetTextArray() and
DrawTextArray().

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

diff --git a/sw/source/core/txtnode/fntcache.cxx 
b/sw/source/core/txtnode/fntcache.cxx
index 4d0f59fcc56d..985ffab1c87b 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -54,6 +54,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -96,6 +97,36 @@ long EvalGridWidthAdd( const SwTextGridItem *const pGrid, 
const SwDrawTextInfo &
 return nGridWidthAdd;
 }
 
+/**
+ * Pre-calculates glyph items for the rendered subset of rInf's text, assuming
+ * outdev state does not change between the outdev calls.
+ */
+SalLayoutGlyphs* lcl_CreateLayout(SwDrawTextInfo& rInf, const OUString& rText, 
sal_Int32 nIdx,
+  sal_Int32 nLen, SalLayoutGlyphs& rTextGlyphs)
+{
+// Not the string we want to pre-calculate.
+if (rText != rInf.GetText() || nIdx != rInf.GetIdx() || nLen != 
rInf.GetLen())
+return nullptr;
+
+// Use pre-calculated result.
+if (!rTextGlyphs.empty())
+return &rTextGlyphs;
+
+// Calculate glyph items.
+std::unique_ptr pLayout = rInf.GetOut().ImplLayout(
+rText, nIdx, nLen, Point(0, 0), 0, nullptr, 
SalLayoutFlags::GlyphItemsOnly);
+if (!pLayout)
+return nullptr;
+
+const SalLayoutGlyphs* pGlyphs = pLayout->GetGlyphs();
+if (!pGlyphs)
+return nullptr;
+
+// Remember the calculation result.
+rTextGlyphs = *pGlyphs;
+
+return &rTextGlyphs;
+}
 }
 
 void SwFntCache::Flush( )
@@ -779,6 +810,8 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
 
 vcl::Font* pTmpFont = bUseScrFont ? m_pScrFont : m_pPrtFont;
 
+SalLayoutGlyphs aTextGlyphs;
+
 //  bDirectPrint and bUseScrFont should have these values:
 
 //  Outdev / RefDef  | Printer | VirtPrinter | Window
@@ -1393,8 +1426,10 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
 
 // get screen array
 std::unique_ptr pScrArray(new long[sal_Int32(rInf.GetLen())]);
+SalLayoutGlyphs* pGlyphs = lcl_CreateLayout(rInf, rInf.GetText(), 
sal_Int32(rInf.GetIdx()),
+sal_Int32(rInf.GetLen()), 
aTextGlyphs);
 rInf.GetOut().GetTextArray( rInf.GetText(), pScrArray.get(),
-sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen()));
+sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen()), 
nullptr, pGlyphs);
 
 // OLE: no printer available
 // OSL_ENSURE( pPrinter, "DrawText needs pPrinter" )
@@ -1743,8 +1778,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
 sal_Int32 nTmpIdx = bBullet
 ? (rInf.GetIdx() ? 1 : 0)
 : sal_Int32(rInf.GetIdx());
+pGlyphs = lcl_CreateLayout(rInf, *pStr, nTmpIdx, nLen, 
aTextGlyphs);
 rInf.GetOut().DrawTextArray( aTextOriginPos, *pStr, 
pKernArray.get(),
- nTmpIdx , nLen );
+ nTmpIdx , nLen, 
SalLayoutFlags::NONE, nullptr, pGlyphs );
 if (bBullet)
 {
 rInf.GetOut().Push();
commit c5dc042219e9872937f9fe1cb68f2f03423f398e
Author: Miklos Vajna 
AuthorDate: Thu Aug 16 17:34:49 2018 +0200
Commit: Miklos Vajna 
CommitDate: Thu Aug 16 23:39:04 2018 +0200

vcl: use SalLayoutGlyphs, not SalLayout for pre-computed layout

This means that the pre-computed glyph ids and positions are usable with
multiple dx array or draw base.

So the amount of cached data is smaller, but it can be used in more
situations, most importantly Writer's SwFntObj::DrawText() use-case
(which does GetTextArray() followed by a DrawTextArray(), with different
dx array arguments).

Change-Id: I3bcd1b7a015c2cf9921efa0

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

2018-08-16 Thread Libreoffice Gerrit user
 sc/source/ui/view/viewfunc.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 24a30e5bde07cf168c30adadb417ba002818970b
Author: Julien Nabet 
AuthorDate: Thu Aug 16 19:57:52 2018 +0200
Commit: Julien Nabet 
CommitDate: Thu Aug 16 23:37:07 2018 +0200

Related tdf#118547: don't change protection symbol if nTab == TABLEID_DOC

See Eike's comment in https://gerrit.libreoffice.org/#/c/59035/

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

diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 3ac263c0165e..a940afba1bea 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2551,7 +2551,7 @@ bool ScViewFunc::Unprotect( SCTAB nTab, const OUString& 
rPassword )
 if ( nTab == TABLEID_DOC || rMark.GetSelectCount() <= 1 )
 {
 bChanged = rFunc.Unprotect( nTab, rPassword, false );
-if (bChanged)
+if (bChanged && nTab != TABLEID_DOC)
 SetTabProtectionSymbol(nTab, false);
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] dev-tools.git: esc-reporting/esc-collect.py

2018-08-16 Thread Libreoffice Gerrit user
 esc-reporting/esc-collect.py |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 14a923c94f8b669ac9284de768c61692bc3950db
Author: Xisco Fauli 
AuthorDate: Thu Aug 16 22:51:55 2018 +0200
Commit: Xisco Fauli 
CommitDate: Thu Aug 16 22:53:25 2018 +0200

ESC: json doesn't like backslashes

See author in 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=8055f402dbe6783884a51c8a78f4abcf7adda6c4

diff --git a/esc-reporting/esc-collect.py b/esc-reporting/esc-collect.py
index 2216bf8..e4242d6 100755
--- a/esc-reporting/esc-collect.py
+++ b/esc-reporting/esc-collect.py
@@ -650,7 +650,8 @@ def get_git(cfg):
   os.system('(cd ' + basedir + repo['dir'] + ";git log --pretty=format:'" 
+ useFormat + "') > /tmp/git.log")
   fp = open('/tmp/git.log', encoding='utf-8')
   while True:
-x = fp.readline()
+# Json fails if there's a backslash somewhere in the git log
+x = fp.readline().replace("\\", "/")
 if x is None or x == '':
   break
 row = json.loads(x)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 svx/source/unodraw/unoshape.cxx |   15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 876a433607831f5c82bb952582c151ac653841e7
Author: Caolán McNamara 
AuthorDate: Tue Aug 14 21:05:16 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 22:20:25 2018 +0200

Resolves: tdf#114427 crash when basic used to dispose shape

Change-Id: Ia078a0f4262fbe18b6cf463dbff33df1d4fd0a95
Reviewed-on: https://gerrit.libreoffice.org/59037
Tested-by: Xisco Faulí 
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 1ea93dde6d34..c1fc65092c6d 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1339,37 +1339,38 @@ void SAL_CALL SvxShape::dispose()
 
 if ( HasSdrObject() )
 {
-EndListening( GetSdrObject()->getSdrModelFromSdrObject() );
+SdrObject* pObject = GetSdrObject();
+
+EndListening( pObject->getSdrModelFromSdrObject() );
 bool bFreeSdrObject = false;
 
-if ( GetSdrObject()->IsInserted() && GetSdrObject()->GetPage() )
+if ( pObject->IsInserted() && pObject->GetPage() )
 {
 OSL_ENSURE( HasSdrObjectOwnership(), "SvxShape::dispose: is the 
below code correct?" );
 // normally, we are allowed to free the SdrObject only if we 
have its ownership.
 // Why isn't this checked here?
 
-SdrPage* pPage = GetSdrObject()->GetPage();
+SdrPage* pPage = pObject->GetPage();
 // delete the SdrObject from the page
 const size_t nCount = pPage->GetObjCount();
 for ( size_t nNum = 0; nNum < nCount; ++nNum )
 {
-if ( pPage->GetObj( nNum ) == GetSdrObject() )
+if ( pPage->GetObj( nNum ) == pObject )
 {
-OSL_VERIFY( pPage->RemoveObject( nNum ) == GetSdrObject() 
);
+OSL_VERIFY( pPage->RemoveObject( nNum ) == pObject );
 bFreeSdrObject = true;
 break;
 }
 }
 }
 
-GetSdrObject()->setUnoShape(nullptr);
+pObject->setUnoShape(nullptr);
 
 if ( bFreeSdrObject )
 {
 // in case we have the ownership of the SdrObject, a Free
 // would do nothing. So ensure the ownership is reset.
 mpImpl->mbHasSdrObjectOwnership = false;
-SdrObject* pObject = GetSdrObject();
 SdrObject::Free( pObject );
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 sc/source/ui/dbgui/tpsort.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2d7997886b834efe50f16700c8e9f2675a8f223c
Author: Caolán McNamara 
AuthorDate: Thu Aug 16 15:23:11 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 22:19:44 2018 +0200

data->sort->options->copy sort results to, enter "asd"->ok crashes

Change-Id: If0748d26f8e65b07e98fdda577931348fc479724
Reviewed-on: https://gerrit.libreoffice.org/59187
Tested-by: Xisco Faulí 
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 6009f8b35b4b..1f7a71c249be 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -755,7 +755,7 @@ DeactivateRC ScTabPageSortOptions::DeactivatePage( 
SfxItemSet* pSetP )
 
 if ( !bPosInputOk )
 {
-std::unique_ptr 
xBox(Application::CreateMessageDialog(GetTabDialog()->GetFrameWeld(),
+std::unique_ptr 
xBox(Application::CreateMessageDialog(GetDialogController()->getDialog(),
   VclMessageType::Warning, 
VclButtonsType::Ok,
   
ScResId(STR_INVALID_TABREF)));
 xBox->run();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 oox/source/crypto/Standard2007Engine.cxx |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 61d0be43aab4191344916c41f9cb1ca62c7d
Author: Caolán McNamara 
AuthorDate: Thu Aug 16 17:29:31 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 22:19:13 2018 +0200

ofz: timeout

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

diff --git a/oox/source/crypto/Standard2007Engine.cxx 
b/oox/source/crypto/Standard2007Engine.cxx
index 6dd3e758b641..38c4e03baf15 100644
--- a/oox/source/crypto/Standard2007Engine.cxx
+++ b/oox/source/crypto/Standard2007Engine.cxx
@@ -120,6 +120,16 @@ bool Standard2007Engine::calculateEncryptionKey(const 
OUString& rPassword)
 bool Standard2007Engine::generateEncryptionKey(const OUString& password)
 {
 mKey.clear();
+/*
+KeySize (4 bytes): An unsigned integer that specifies the number of 
bits in the encryption key.
+MUST be a multiple of 8. MUST be one of the values in the following 
table:
+Algorithm   Value   Comment
+Any 0x  Determined by Flags
+RC4 0x0028 – 0x0080 (inclusive) 8-bit 
increments.
+AES 0x0080, 0x00C0, 0x0100  128, 192 or 256-bit
+*/
+if (mInfo.header.keyBits > 8192) // should we strictly enforce the above 
256 bit limit ?
+return false;
 mKey.resize(mInfo.header.keyBits / 8, 0);
 if (mKey.empty())
 return false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 oox/source/ppt/timenode.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 9fe16109167b57ab7e7356f96fcee9ecfeeb1b63
Author: Caolán McNamara 
AuthorDate: Thu Aug 16 15:01:55 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 22:18:30 2018 +0200

ofz#9932 Null-deref

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

diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx
index 854797a9649c..9b77001aaff1 100644
--- a/oox/source/ppt/timenode.cxx
+++ b/oox/source/ppt/timenode.cxx
@@ -205,6 +205,8 @@ namespace oox { namespace ppt {
 OUString sServiceName = getServiceName(nNodeType);
 
 Reference< XAnimationNode > xNode = createAndInsert( rFilter, 
sServiceName, rxNode );
+if (!xNode)
+return;
 setNode(rFilter, xNode, pSlide, rxNode);
 }
 catch( const Exception& e )
@@ -236,7 +238,7 @@ namespace oox { namespace ppt {
 if( !maStCondList.empty() )
 {
 Any aAny = AnimationCondition::convertList( pSlide, 
maStCondList );
- if( aAny.hasValue() )
+if( aAny.hasValue() )
 {
 xNode->setBegin( aAny );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 sw/source/filter/inc/fltshell.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8efdce75d96819d42bae2104169b74d67677c32e
Author: Caolán McNamara 
AuthorDate: Thu Aug 16 17:05:16 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 22:17:57 2018 +0200

std::deque->std::vector

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

diff --git a/sw/source/filter/inc/fltshell.hxx 
b/sw/source/filter/inc/fltshell.hxx
index 9a84dccaa3f3..3b84675a9a30 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -124,7 +124,7 @@ private:
 SwFltControlStack(SwFltControlStack const&) = delete;
 SwFltControlStack& operator=(SwFltControlStack const&) = delete;
 
-typedef std::deque> Entries;
+typedef std::vector> Entries;
 Entries m_Entries;
 
 sal_uLong nFieldFlags;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 vcl/source/gdi/impgraph.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 3cd264bb09c6c14bf9eb769d508d7015c4bdc83b
Author: Tomaž Vajngerl 
AuthorDate: Thu Aug 16 16:46:57 2018 +0200
Commit: Tomaž Vajngerl 
CommitDate: Thu Aug 16 22:08:35 2018 +0200

tdf#117797 guard access to mpSwapFile as it may not be set

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

diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index c0767474a01a..005427b66dce 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1585,7 +1585,8 @@ bool ImpGraphic::ImplSwapIn()
 
 bRet = ImplSwapIn( xIStm.get() );
 xIStm.reset();
-setOriginURL(mpSwapFile->maOriginURL);
+if (mpSwapFile)
+setOriginURL(mpSwapFile->maOriginURL);
 mpSwapFile.reset();
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source editeng/source include/editeng sd/qa sd/source sw/source

2018-08-16 Thread Libreoffice Gerrit user
 cui/source/tabpages/numpages.cxx|4 ++--
 editeng/source/editeng/editdbg.cxx  |2 +-
 editeng/source/items/numitem.cxx|   14 +-
 editeng/source/uno/unonrule.cxx |4 ++--
 include/editeng/numitem.hxx |6 +++---
 sd/qa/unit/export-tests-ooxml1.cxx  |2 +-
 sd/source/core/stlpool.cxx  |2 +-
 sd/source/ui/view/drviews3.cxx  |3 ++-
 sw/source/core/doc/DocumentStylePoolManager.cxx |1 +
 sw/source/core/txtnode/ndtxt.cxx|2 +-
 sw/source/core/unocore/unosett.cxx  |2 +-
 sw/source/filter/html/htmlcss1.cxx  |2 +-
 sw/source/filter/html/htmlnumreader.cxx |2 +-
 sw/source/filter/ww8/rtfattributeoutput.cxx |2 +-
 sw/source/filter/ww8/wrtw8num.cxx   |2 +-
 sw/source/ui/misc/num.cxx   |2 +-
 16 files changed, 29 insertions(+), 23 deletions(-)

New commits:
commit 085933f202cf973782a20a46a60087ff943ad6b9
Author: Stephan Bergmann 
AuthorDate: Thu Aug 16 18:06:22 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 16 21:55:03 2018 +0200

SvxNumberFormat::nFirstLineOffset should have a larger type

...similar to 0d227c96e11d7d03829144183bc66d229e059a4b
"SvxNumberFormat::nAbsLSpace should have a larger type", this time due to:

> Testing 
file:///home/sbergman/lo/core/sd/qa/unit/data/ppt/pass/hang-10.ppt:
[...]
> filter/source/msfilter/svdfppt.cxx:3793:39: runtime error: implicit 
conversion from type 'sal_Int32' (aka 'int') of value -142240 (32-bit, signed) 
to type 'short' changed the value to -11168 (16-bit, signed)
>  #0 in PPTNumberFormatCreator::ImplGetNumberFormat(SdrPowerPointImport 
const&, SvxNumberFormat&) at filter/source/msfilter/svdfppt.cxx:3793:39 
(instdir/program/libmsfilterlo.so +0x79930d)
>  #1 in PPTNumberFormatCreator::GetNumberFormat(SdrPowerPointImport 
const&, SvxNumberFormat&, unsigned int, PPTParaLevel const&, PPTCharLevel 
const&, TSS_Type) at filter/source/msfilter/svdfppt.cxx:3674:5 
(instdir/program/libmsfilterlo.so +0x797bad)
>  #2 in PPTStyleSheet::PPTStyleSheet(DffRecordHeader const&, SvStream&, 
SdrPowerPointImport&, PPTTextParagraphStyleAtomInterpreter const&, 
PPTTextSpecInfo const&) at filter/source/msfilter/svdfppt.cxx:4395:13 
(instdir/program/libmsfilterlo.so +0x7ac27d)
>  #3 in SdrPowerPointImport::SdrPowerPointImport(PowerPointImportParam&, 
rtl::OUString const&) at filter/source/msfilter/svdfppt.cxx:1618:59 
(instdir/program/libmsfilterlo.so +0x74759f)
>  #4 in ImplSdPPTImport::ImplSdPPTImport(SdDrawDocument*, SotStorage&, 
SfxMedium&, PowerPointImportParam&) at sd/source/filter/ppt/pptin.cxx:175:7 
(instdir/program/libsdfiltlo.so +0x5f2be8)
>  #5 in SdPPTImport::SdPPTImport(SdDrawDocument*, SvStream&, SotStorage&, 
SfxMedium&) at sd/source/filter/ppt/pptin.cxx:162:23 
(instdir/program/libsdfiltlo.so +0x5ce2bb)
>  #6 in ImportPPT at sd/source/filter/ppt/pptin.cxx:2760:47 
(instdir/program/libsdfiltlo.so +0x617c79)
>  #7 in SdPPTFilter::Import() at sd/source/filter/sdpptwrp.cxx:106:32 
(instdir/program/libsdlo.so +0x2878233)
>  #8 in sd::DrawDocShell::ConvertFrom(SfxMedium&) at 
sd/source/ui/docshell/docshel4.cxx:474:46 (instdir/program/libsdlo.so 
+0x2e163dc)
>  #9 in SfxObjectShell::DoLoad(SfxMedium*) at 
sfx2/source/doc/objstor.cxx:786:23 (instdir/program/libsfxlo.so +0x2c8c492)
>  #10 in SdFiltersTest::load(rtl::OUString const&, rtl::OUString const&, 
rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at 
sd/qa/unit/filters-test.cxx:75:31 
(workdir/LinkTarget/CppunitTest/libtest_sd_filters_test.so +0x19771)
>  #11 in test::FiltersTest::recursiveScan(test::filterStatus, 
rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, 
SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) at 
unotest/source/cpp/filters-test.cxx:130:20 
(workdir/LinkTarget/CppunitTest/../Library/libunotest.so +0x5724c)
>  #12 in test::FiltersTest::testDir(rtl::OUString const&, rtl::OUString 
const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned 
int, bool) at unotest/source/cpp/filters-test.cxx:155:5 
(workdir/LinkTarget/CppunitTest/../Library/libunotest.so +0x57ec9)
>  #13 in SdFiltersTest::testCVEs() at sd/qa/unit/filters-test.cxx:83:5 
(workdir/LinkTarget/CppunitTest/libtest_sd_filters_test.so +0x19d6d)

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

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 799898390702..0ed2f6b325c9 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -3210,7 +3210,7 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, 
SpinField&, rFld, void )
 

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

2018-08-16 Thread Libreoffice Gerrit user
 basctl/source/basicide/brkdlg.cxx |   19 ---
 basctl/source/basicide/brkdlg.hxx |2 +-
 2 files changed, 13 insertions(+), 8 deletions(-)

New commits:
commit 0bafa88ce38bc9f6735d8118e544aa9232cc840c
Author: Noel Grandin 
AuthorDate: Thu Aug 16 14:02:25 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 21:31:12 2018 +0200

td#f119300 crash in Manage BreakPoints dialog

regression from
commit 4b5699bff586dd923123fbfd949c9bf03e491ed7
loplugin:useuniqueptr in BreakPointList

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

diff --git a/basctl/source/basicide/brkdlg.cxx 
b/basctl/source/basicide/brkdlg.cxx
index 3563e5734118..53be6215bd78 100644
--- a/basctl/source/basicide/brkdlg.cxx
+++ b/basctl/source/basicide/brkdlg.cxx
@@ -24,6 +24,7 @@
 #include 
 
 #include 
+#include 
 
 namespace basctl
 {
@@ -153,8 +154,9 @@ void BreakPointDialog::CheckButtons()
 IMPL_LINK( BreakPointDialog, CheckBoxHdl, Button *, pButton, void )
 {
 ::CheckBox * pChkBx = static_cast<::CheckBox*>(pButton);
-BreakPoint& rBrk = GetSelectedBreakPoint();
-rBrk.bEnabled = pChkBx->IsChecked();
+BreakPoint* pBrk = GetSelectedBreakPoint();
+if (pBrk)
+pBrk->bEnabled = pChkBx->IsChecked();
 }
 
 IMPL_LINK( BreakPointDialog, ComboBoxHighlightHdl, ComboBox&, rBox, void )
@@ -175,8 +177,9 @@ IMPL_LINK( BreakPointDialog, EditModifyHdl, Edit&, rEdit, 
void )
 CheckButtons();
 else if (&rEdit == m_pNumericField)
 {
-BreakPoint& rBrk = GetSelectedBreakPoint();
-rBrk.nStopAfter = rEdit.GetText().toInt32();
+BreakPoint* pBrk = GetSelectedBreakPoint();
+if (pBrk)
+pBrk->nStopAfter = rEdit.GetText().toInt32();
 }
 }
 
@@ -234,10 +237,12 @@ void BreakPointDialog::UpdateFields( BreakPoint const & 
rBrk )
 }
 
 
-BreakPoint& BreakPointDialog::GetSelectedBreakPoint()
+BreakPoint* BreakPointDialog::GetSelectedBreakPoint()
 {
-size_t nEntry = m_pComboBox->GetEntryPos( m_pComboBox->GetText() );
-return m_aModifiedBreakPointList.at( nEntry );
+sal_Int32 nEntry = m_pComboBox->GetEntryPos( m_pComboBox->GetText() );
+if (nEntry == LISTBOX_ENTRY_NOTFOUND)
+return nullptr;
+return &m_aModifiedBreakPointList.at( nEntry );
 }
 
 } // namespace basctl
diff --git a/basctl/source/basicide/brkdlg.hxx 
b/basctl/source/basicide/brkdlg.hxx
index ab797a20699c..f4cd8f684f94 100644
--- a/basctl/source/basicide/brkdlg.hxx
+++ b/basctl/source/basicide/brkdlg.hxx
@@ -46,7 +46,7 @@ class BreakPointDialog final : public ModalDialog
 DECL_LINK( EditModifyHdl, Edit&, void );
 DECL_LINK( ButtonHdl, Button*, void );
 voidUpdateFields( BreakPoint const & rBrk );
-BreakPoint& GetSelectedBreakPoint();
+BreakPoint* GetSelectedBreakPoint();
 
 
 public:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 5 commits - automation/source i18npool/source Module_ooo.mk postprocess/packcomponents Repository.mk solenv/ant xmlhelp/Ant_LuceneHelpWrapper.mk xm

2018-08-16 Thread Libreoffice Gerrit user
Rebased ref, commits from common ancestor:
commit 870f47795d6675d28ea2277e2e7cba64ebcee32b
Author: Matthias Seidel 
AuthorDate: Thu Aug 16 16:08:50 2018 +
Commit: Matthias Seidel 
CommitDate: Thu Aug 16 16:08:50 2018 +

Fixed LongDateDaySeparator

diff --git a/i18npool/source/localedata/data/da_DK.xml 
b/i18npool/source/localedata/data/da_DK.xml
index 9525b3f7a358..2dc62d7c7655 100644
--- a/i18npool/source/localedata/data/da_DK.xml
+++ b/i18npool/source/localedata/data/da_DK.xml
@@ -21,336 +21,336 @@
  *
  ***-->
 
-  
-
-  da
-  Danish
-
-
-  DK
-  Denmark
-
-  
-  
-
-  -
-  .
-  ,
-  :
-  ,
-  ;
-   
-  .
-   
-   
-
-
-  ’
-  ’
-  ”
-  ”
-
-AM
-PM
-metric
-  
-  
-
-  Standard
-
-
-  0
-
-
-  0,00
-
-
-  #.##0
-
-
-  #.##0,00
-
-
-  #.###,00
-
-
-  0,00E+000
-
-
-  0,00E+00
-
-
-  0%
-
-
-  0,00%
-
-
-  [$kr-406] #.##0;[$kr-406] -#.##0
-
-
-  [$kr-406] #.##0,00;[$kr-406] -#.##0,00
-
-
-  [$kr-406] #.##0;[RED][$kr-406] -#.##0
-
-
-  [$kr-406] #.##0,00;[RED][$kr-406] -#.##0,00
-
-
-  #.##0,00 CCC
-
-
-  [$kr-406] #.##0,--;[RED][$kr-406] -#.##0,--
-
-
-  DD-MM-YY
-
-
-  D.  
-
-
-  DD-MM-YY
-
-
-  DD-MM-
-
-
-  D. MMM YY
-
-
-  D. MMM 
-
-
-  D. MMM. 
-
-
-  D.  
-
-
-  D.  
-
-
-  NN D. MMM YY
-
-
-  NN DD-MMM YY
-
-
-  NN D.  
-
-
-  D.  
-
-
-  MM-DD
-
-
-  YY-MM-DD
-  ISO 8601 (EN 28601)
-
-
-  -MM-DD
-  ISO 8601 (EN 28601)
-
-
-  MM-YY
-
-
-  DD-MMM
-
-
-  
-
-
-  QQ YY
-
-
-  WW
-
-
-  TT:MM
-
-
-  TT:MM:SS
-
-
-  TT:MM AM/PM
-
-
-  TT:MM:SS AM/PM
-
-
-  [TT]:MM:SS
-
-
-  MM:SS,00
-
-
-  [TT]:MM:SS,00
-
-
-  DD-MM-YY TT:MM
-
-
-  DD-MM- TT:MM:SS
-
-  
-  
-  
-  
-A-Z Æ Ø 
Å
-0
-1
-2
-f.
-ff.
-  
-  
-
-  
-
-  sun
-  søn
-  søndag
-
-
-  mon
-  man
-  mandag
-
-
-  tue
-  tir
-  tirsdag
-
-
-  wed
-  ons
-  onsdag
-
-
-  thu
-  tor
-  torsdag
-
-
-  fri
-  fre
-  fredag
-
-
-  sat
-  lør
-  lørdag
-
-  
-  
-
-  jan
-  jan
-  januar
-
-
-  feb
-  feb
-  februar
-
-
-  mar
-  mar
-  marts
-
-
-  apr
-  apr
-  april
-
-
-  may
-  maj
-  maj
-
-
-  jun
-  jun
-  juni
-
-
-  jul
-  jul
-  juli
-
-
-  aug
-  aug
-  august
-
-
-  sep
-  sep
-  september
-
-
-  oct
-  okt
-  oktober
-
-
-  nov
-  nov
-  november
-
-
-  dec
-  dec
-  december
-
-  
-  
-
-  bc
-  f.Kr.
-  før Kristus
-
-
-  ad
-  e.Kr.
-  efter Kristus
-
-  
-  
-mon
-  
-  4
-
-  
-  
-
-  DKK
-  kr
-  DKK
-  Dansk krone
-  2
-
-  
-  
-  
-
-  sand
-  falsk
-  1. kvartal
-  2. kvartal
-  3. kvartal
-  4. kvartal
-  over
-  under
-  K1
-  K2
-  K3
-  K4
-
-  
-  
-  
+
+
+da
+Danish
+
+
+DK
+Denmark
+
+
+
+
+-
+.
+,
+:
+,
+;
+ 
+. 
+ 
+ 
+
+
+’
+’
+”
+”
+
+AM
+PM
+metric
+
+
+
+Standard
+
+
+0
+
+
+0,00
+
+
+#.##0
+
+
+#.##0,00
+
+
+#.###,00
+
+
+0,00E

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

2018-08-16 Thread Libreoffice Gerrit user
 sc/source/ui/dbgui/tpsort.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b264c9276888bb952deeec31abe3a77e05dac164
Author: Caolán McNamara 
AuthorDate: Thu Aug 16 15:23:11 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 21:00:56 2018 +0200

data->sort->options->copy sort results to, enter "asd"->ok crashes

Change-Id: If0748d26f8e65b07e98fdda577931348fc479724
Reviewed-on: https://gerrit.libreoffice.org/59186
Tested-by: Xisco Faulí 
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 6009f8b35b4b..1f7a71c249be 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -755,7 +755,7 @@ DeactivateRC ScTabPageSortOptions::DeactivatePage( 
SfxItemSet* pSetP )
 
 if ( !bPosInputOk )
 {
-std::unique_ptr 
xBox(Application::CreateMessageDialog(GetTabDialog()->GetFrameWeld(),
+std::unique_ptr 
xBox(Application::CreateMessageDialog(GetDialogController()->getDialog(),
   VclMessageType::Warning, 
VclButtonsType::Ok,
   
ScResId(STR_INVALID_TABREF)));
 xBox->run();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 loleaflet/dist/toolbar/toolbar.js |   75 --
 1 file changed, 41 insertions(+), 34 deletions(-)

New commits:
commit d03b714b3020d5e4f17e3aab3236575a0d67c7cd
Author: Andras Timar 
AuthorDate: Tue Aug 7 09:48:47 2018 +0200
Commit: Jan Holesovsky 
CommitDate: Thu Aug 16 21:01:02 2018 +0200

loleaflet: Calc: Add handling for multiple selection of status bar functions

Change-Id: I79700615b62dbd44cd06c231466832cf81ac1108
Reviewed-on: https://gerrit.libreoffice.org/58664
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 
(cherry picked from commit 494cb023e5bf63d599bbe2059953ca1633f3c85d)
Reviewed-on: https://gerrit.libreoffice.org/58673
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index 2b921bd2d..c2aa1c137 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -194,13 +194,29 @@ function onClick(e, id, item, subItem) {
w2ui['formulabar'].show('sum', 'function');
}
else if (id.startsWith('StateTableCellMenu') && subItem) {
-   var command = {
-   'StatusBarFunc': {
-   type: 'unsigned short',
-   value: subItem.func
+   e.done(function () {
+   var menu = 
w2ui['toolbar-down'].get('StateTableCellMenu');
+   if (subItem.id === '1') { // 'None' was clicked, remove 
all other options
+   menu.selected = ['1'];
}
-   };
-   map.sendUnoCommand('.uno:StatusBarFunc', command);
+   else { // Something else was clicked, remove the 'None' 
option from the array
+   var index = menu.selected.indexOf('1');
+   if (index > -1) {
+   menu.selected.splice(index, 1);
+   }
+   }
+   var value = 0;
+   for (var it = 0; it < menu.selected.length; it++) {
+   value = +value + parseInt(menu.selected[it]);
+   }
+   var command = {
+   'StatusBarFunc': {
+   type: 'unsigned short',
+   value: value
+   }
+   };
+   map.sendUnoCommand('.uno:StatusBarFunc', command);
+   });
}
 }
 
@@ -683,23 +699,6 @@ function unoCmdToToolbarId(commandname)
return id;
 }
 
-function selectItem(item, func)
-{
-   var index = -1;
-   for (var it = 0; it < item.items.length; it++) {
-   if (item.items[it].func === func) {
-   index = it;
-   break;
-   }
-   }
-
-   if (index !== -1) {
-   item.items[item.current].icon = '';
-   item.items[index].icon = 'selected';
-   item.current = index;
-   }
-}
-
 function onSearch(e) {
var toolbar = w2ui['toolbar-down'];
// conditionally disabling until, we find a solution for tdf#108577
@@ -990,15 +989,15 @@ map.on('doclayerinit', function () {
{type: 'break', id:'break8'},
{type: 'html',  id: 'StateTableCell',
html: ' ' },
-   {type: 'menu', id: 'StateTableCellMenu', caption: '', 
current: 5, items: [
-   { func: '2', text: _('Average'), icon: ''},
-   { func: '8', text: _('CountA'), icon: ''},
-   { func: '4', text: _('Count'), icon: ''},
-   { func: '16', text: _('Maximum'), icon: ''},
-   { func: '32', text: _('Minimum'), icon: ''},
-   { func: '512', text: _('Sum'), icon: 
'selected'},
-   { func: '8192', text: _('Selection count'), 
icon: ''},
-   { func: '1', text: _('None'), icon: ''}
+   {type: 'menu-check', id: 'StateTableCellMenu', caption: 
'', selected: ['2', '512'], items: [
+   { id: '2', text: _('Average')},
+   { id: '8', text: _('CountA')},
+   { id: '4', text: _('Count')},
+   { id: '16', text: _('Maximum')},
+   { id: '32', text: _('Minimum')},
+   { id: '512', text: _('Sum')},
+   { id: '8192', text: _('Selection count')},
+   { id: '1', text: _('None')}
]}
 

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

2018-08-16 Thread Libreoffice Gerrit user
 loleaflet/dist/toolbar/toolbar.js |   19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 289a490300145156ffb9e152c158f2d2ce7736dd
Author: Andras Timar 
AuthorDate: Mon Aug 6 17:43:59 2018 +0200
Commit: Jan Holesovsky 
CommitDate: Thu Aug 16 20:59:20 2018 +0200

loleaflet: fix Calc status bar functions

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

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index c6925cfe3..2b921bd2d 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -70,16 +70,6 @@ function onClick(e, id, item, subItem) {
toolbar = w2ui['presentation-toolbar'];
item = toolbar.get(id);
}
-   else if (item && subItem)
-   {
-   var command = {
-   'StatusBarFunc': {
-   type: 'unsigned short',
-   value: subItem.func
-   }
-   };
-   map.sendUnoCommand('.uno:StatusBarFunc', command);
-   }
else {
throw new Error('unknown id: ' + id);
}
@@ -203,6 +193,15 @@ function onClick(e, id, item, subItem) {
w2ui['formulabar'].hide('acceptformula', 'cancelformula');
w2ui['formulabar'].show('sum', 'function');
}
+   else if (id.startsWith('StateTableCellMenu') && subItem) {
+   var command = {
+   'StatusBarFunc': {
+   type: 'unsigned short',
+   value: subItem.func
+   }
+   };
+   map.sendUnoCommand('.uno:StatusBarFunc', command);
+   }
 }
 
 function setBorders(left, right, bottom, top, horiz, vert) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 loleaflet/src/control/Control.ContextMenu.js |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 735a1d177aba8d5cb311c2715cd966f1ad46a3e6
Author: Andras Timar 
AuthorDate: Fri Aug 3 13:09:16 2018 +0200
Commit: Jan Holesovsky 
CommitDate: Thu Aug 16 20:57:20 2018 +0200

loleaflet: fix l10n of context menus

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

diff --git a/loleaflet/src/control/Control.ContextMenu.js 
b/loleaflet/src/control/Control.ContextMenu.js
index f49e924e4..f0633bdf7 100644
--- a/loleaflet/src/control/Control.ContextMenu.js
+++ b/loleaflet/src/control/Control.ContextMenu.js
@@ -152,8 +152,8 @@ L.Control.ContextMenu = L.Control.extend({
 
isLastItemText = true;
} else if (item.type === 'menu') {
-   itemName = item.text.replace('~', '');
-   if (itemName === 'Paste Special') {
+   itemName = item.text;
+   if (itemName.replace('~', '') === 'Paste 
Special') {
itemName = _('Internal Paste Special');
}
var submenu = 
this._createContextMenuStructure(item);
@@ -163,7 +163,7 @@ L.Control.ContextMenu = L.Control.extend({
}
 
contextMenu[item.command] = {
-   name: _(itemName),
+   name: 
_(itemName).replace(/\(~[A-Za-z]\)/, '').replace('~', ''),
items: submenu
};
isLastItemText = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 loleaflet/dist/toolbar/toolbar.js|   63 
 loleaflet/src/control/Control.DocumentRepair.js  |2 
 loleaflet/src/control/Control.Layers.js  |2 
 loleaflet/src/control/Control.PartsPreview.js|2 
 loleaflet/src/control/Control.Permission.js  |2 
 loleaflet/src/control/Control.Selection.js   |2 
 loleaflet/src/control/Control.Tabs.js|2 
 loleaflet/src/control/Control.js |4 
 loleaflet/src/layer/marker/ClipboardContainer.js |   26 -
 loleaflet/src/layer/tile/TileLayer.js|   56 ++-
 loleaflet/src/map/Map.js |   62 +---
 loleaflet/src/map/handler/Map.Drag.js|   40 +---
 loleaflet/src/map/handler/Map.Keyboard.js|  112 ++-
 loleaflet/src/map/handler/Map.Mouse.js   |2 
 loleaflet/src/map/handler/Map.Tap.js |   70 ++
 15 files changed, 173 insertions(+), 274 deletions(-)

New commits:
commit 4b148695a7ece17875142e1f406edacc79752ac6
Author: Henry Castro 
AuthorDate: Sun Aug 12 21:06:10 2018 -0400
Commit: Jan Holesovsky 
CommitDate: Thu Aug 16 20:28:22 2018 +0200

loleaflet: fix the number of users label from the status bar

Change-Id: I0b7e66c73a335295e5e61510bc0b68fc5c08ca58

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index 512057c79..c6925cfe3 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -28,13 +28,6 @@ function _mobilify() {
statusbar.hide(item.id);
}
});
-
-   nUsers = '%n';
-   oneUser = '1';
-   noUser = '0';
-   updateUserListCount();
-
-   $('#document-name-input').hide();
 }
 
 function resizeToolbar() {
@@ -1070,10 +1063,18 @@ map.on('doclayerinit', function () {
 
break;
}
-   toolbarUp.refresh();
-   statusbar.refresh();
+
if (L.Browser.mobile) {
_mobilify();
+   nUsers = '%n';
+   oneUser = '1';
+   noUser = '0';
+   $('#document-name-input').hide();
+   } else {
+   nUsers = _('%n users');
+   oneUser = _('1 user');
+   noUser = _('0 users');
+   $('#document-name-input').show();
}
 
updateUserListCount();
commit 77160ebcb4af447476b053a62bb0870eb5fb5a71
Author: Henry Castro 
AuthorDate: Wed Aug 8 15:08:09 2018 -0400
Commit: Jan Holesovsky 
CommitDate: Thu Aug 16 20:28:22 2018 +0200

loleaflet: mobile: remove invalid input focus

Change-Id: Ieb29394daac95a7a0666a852e7e375ab6d665429

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 5e8783205..d04c2e817 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -829,7 +829,6 @@ L.Map = L.Evented.extend({
 
vex.dialogID = -1;
this._startInactiveTimer();
-   this.focus();
return vex.close(id);
}
} else {
@@ -838,7 +837,6 @@ L.Map = L.Evented.extend({
}
 
this._startInactiveTimer();
-   this.focus();
return false;
},
 
commit 895390438449837533d0ab1439c7918fb8928751
Author: Henry Castro 
AuthorDate: Wed Aug 8 09:05:50 2018 -0400
Commit: Jan Holesovsky 
CommitDate: Thu Aug 16 20:28:22 2018 +0200

loleaflet: mobile: fix the status bar that loses the input focus

Change-Id: Ia39a33295e3a1c153636e2dd33a232cbe2b399b7

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index 6185cc213..512057c79 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -37,42 +37,13 @@ function _mobilify() {
$('#document-name-input').hide();
 }
 
-function _unmobilify() {
-   var toolbarUp = w2ui['toolbar-up'];
-   var statusbar = w2ui['toolbar-down'];
-
-   toolbarUp.items.forEach(function(item) {
-   if (item.mobile === false && item.hidden) {
-   toolbarUp.show(item.id);
-   }
-   });
-
-   statusbar.items.forEach(function(item) {
-   if (item.mobile === false && item.hidden) {
-   statusbar.show(item.id);
-   }
-   });
-
-   nUsers = _('%n users');
-   oneUser = _('1 user');
-   noUser = _('0 users');
-   updateUserListCount();
-
-   $('#document-name-input').show();
-}
-
 function resizeToolbar() {
-   var toolbarUp = w2ui['toolbar-up'];
-   var statusbar = w2ui['toolbar-down'];
-
-   if ($(window).width() < mobileWidth) {
-   _mobilify();
-   } else {
-   _unmobilify();
+   if ($(window).width() !== map.getSize

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 5 commits - automation/source i18npool/source Module_ooo.mk postprocess/packcomponents Repository.mk solenv/ant xmlhelp/Ant_LuceneHelpWrapper.mk xm

2018-08-16 Thread Libreoffice Gerrit user
Rebased ref, commits from common ancestor:
commit b725796b8c288eff563d9e18f8172f422567e3f6
Author: Matthias Seidel 
AuthorDate: Thu Aug 16 16:08:50 2018 +
Commit: Matthias Seidel 
CommitDate: Thu Aug 16 16:08:50 2018 +

Fixed LongDateDaySeparator

diff --git a/i18npool/source/localedata/data/da_DK.xml 
b/i18npool/source/localedata/data/da_DK.xml
index 9525b3f7a358..2dc62d7c7655 100644
--- a/i18npool/source/localedata/data/da_DK.xml
+++ b/i18npool/source/localedata/data/da_DK.xml
@@ -21,336 +21,336 @@
  *
  ***-->
 
-  
-
-  da
-  Danish
-
-
-  DK
-  Denmark
-
-  
-  
-
-  -
-  .
-  ,
-  :
-  ,
-  ;
-   
-  .
-   
-   
-
-
-  ’
-  ’
-  ”
-  ”
-
-AM
-PM
-metric
-  
-  
-
-  Standard
-
-
-  0
-
-
-  0,00
-
-
-  #.##0
-
-
-  #.##0,00
-
-
-  #.###,00
-
-
-  0,00E+000
-
-
-  0,00E+00
-
-
-  0%
-
-
-  0,00%
-
-
-  [$kr-406] #.##0;[$kr-406] -#.##0
-
-
-  [$kr-406] #.##0,00;[$kr-406] -#.##0,00
-
-
-  [$kr-406] #.##0;[RED][$kr-406] -#.##0
-
-
-  [$kr-406] #.##0,00;[RED][$kr-406] -#.##0,00
-
-
-  #.##0,00 CCC
-
-
-  [$kr-406] #.##0,--;[RED][$kr-406] -#.##0,--
-
-
-  DD-MM-YY
-
-
-  D.  
-
-
-  DD-MM-YY
-
-
-  DD-MM-
-
-
-  D. MMM YY
-
-
-  D. MMM 
-
-
-  D. MMM. 
-
-
-  D.  
-
-
-  D.  
-
-
-  NN D. MMM YY
-
-
-  NN DD-MMM YY
-
-
-  NN D.  
-
-
-  D.  
-
-
-  MM-DD
-
-
-  YY-MM-DD
-  ISO 8601 (EN 28601)
-
-
-  -MM-DD
-  ISO 8601 (EN 28601)
-
-
-  MM-YY
-
-
-  DD-MMM
-
-
-  
-
-
-  QQ YY
-
-
-  WW
-
-
-  TT:MM
-
-
-  TT:MM:SS
-
-
-  TT:MM AM/PM
-
-
-  TT:MM:SS AM/PM
-
-
-  [TT]:MM:SS
-
-
-  MM:SS,00
-
-
-  [TT]:MM:SS,00
-
-
-  DD-MM-YY TT:MM
-
-
-  DD-MM- TT:MM:SS
-
-  
-  
-  
-  
-A-Z Æ Ø 
Å
-0
-1
-2
-f.
-ff.
-  
-  
-
-  
-
-  sun
-  søn
-  søndag
-
-
-  mon
-  man
-  mandag
-
-
-  tue
-  tir
-  tirsdag
-
-
-  wed
-  ons
-  onsdag
-
-
-  thu
-  tor
-  torsdag
-
-
-  fri
-  fre
-  fredag
-
-
-  sat
-  lør
-  lørdag
-
-  
-  
-
-  jan
-  jan
-  januar
-
-
-  feb
-  feb
-  februar
-
-
-  mar
-  mar
-  marts
-
-
-  apr
-  apr
-  april
-
-
-  may
-  maj
-  maj
-
-
-  jun
-  jun
-  juni
-
-
-  jul
-  jul
-  juli
-
-
-  aug
-  aug
-  august
-
-
-  sep
-  sep
-  september
-
-
-  oct
-  okt
-  oktober
-
-
-  nov
-  nov
-  november
-
-
-  dec
-  dec
-  december
-
-  
-  
-
-  bc
-  f.Kr.
-  før Kristus
-
-
-  ad
-  e.Kr.
-  efter Kristus
-
-  
-  
-mon
-  
-  4
-
-  
-  
-
-  DKK
-  kr
-  DKK
-  Dansk krone
-  2
-
-  
-  
-  
-
-  sand
-  falsk
-  1. kvartal
-  2. kvartal
-  3. kvartal
-  4. kvartal
-  over
-  under
-  K1
-  K2
-  K3
-  K4
-
-  
-  
-  
+
+
+da
+Danish
+
+
+DK
+Denmark
+
+
+
+
+-
+.
+,
+:
+,
+;
+ 
+. 
+ 
+ 
+
+
+’
+’
+”
+”
+
+AM
+PM
+metric
+
+
+
+Standard
+
+
+0
+
+
+0,00
+
+
+#.##0
+
+
+#.##0,00
+
+
+#.###,00
+
+
+0,00E

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

2018-08-16 Thread Libreoffice Gerrit user
 compilerplugins/clang/ptrvector.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit f260284c3915fbd84430833f19ad8c053205ebce
Author: Stephan Bergmann 
AuthorDate: Thu Aug 16 15:46:21 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 16 20:22:17 2018 +0200

Adapt loplugin:ptrvector to libc++ (on macOS)

...where it produced false positive

> 
/Users/stephan/Software/lo2/core/UnoControls/source/controls/progressmonitor.cxx:245:21:
 error: do not call operator== on a std container containing a unique_ptr const 
class std::__1::__wrap_iter > *> [loplugin:ptrvector]
> if (itr != maTextlist_Top.end())
> ^

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

diff --git a/compilerplugins/clang/ptrvector.cxx 
b/compilerplugins/clang/ptrvector.cxx
index 40e37e5937c9..ed0893e3558f 100644
--- a/compilerplugins/clang/ptrvector.cxx
+++ b/compilerplugins/clang/ptrvector.cxx
@@ -13,6 +13,8 @@
 #include 
 #include 
 #include 
+
+#include "check.hxx"
 #include "plugin.hxx"
 
 /**
@@ -54,7 +56,10 @@ bool PtrVector::VisitCXXOperatorCallExpr(const 
CXXOperatorCallExpr* expr)
 }
 const Expr* argExpr = expr->getArg(0);
 std::string s = 
argExpr->getType().getDesugaredType(compiler.getASTContext()).getAsString();
-if (s.find("iterator") != std::string::npos) {
+if (s.find("iterator") != std::string::npos
+|| 
(loplugin::TypeCheck(argExpr->getType()).Class("__wrap_iter").Namespace("__1")
+.StdNamespace()))
+{
 return true;
 }
 if (s.find("array") == std::string::npos && s.find("deque") == 
std::string::npos
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/mst/sw_redlinehide_2' - 2 commits - sw/source

2018-08-16 Thread Libreoffice Gerrit user
 sw/source/core/layout/wsfrm.cxx |   25 +++--
 sw/source/core/text/itratr.cxx  |   18 ++
 2 files changed, 29 insertions(+), 14 deletions(-)

New commits:
commit 8a418f283047d3675b5847ed50ec07df879405ca
Author: Michael Stahl 
AuthorDate: Thu Aug 16 18:59:10 2018 +0200
Commit: Michael Stahl 
CommitDate: Thu Aug 16 18:59:10 2018 +0200

sw_redlinehide_2: force SwAttrIter::GetNextAttr to make progress

... and skip over the redline if the start position is at the beginning
of it.

Change-Id: Ib12b459b12d49e1443257ce398963ab3ec64f2a5

diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 82bdc5910d1b..4134c73f1b90 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -442,7 +442,8 @@ static void InsertCharAttrs(SfxPoolItem const** pAttrs, 
SfxItemSet const& rItems
 // if return false: portion ends at start of redline, indexes unchanged
 // if return true: portion end not known (past end of redline), indexes point 
to first hint past end of redline
 bool CanSkipOverRedline(SwRangeRedline const& rRedline,
-size_t & rStartIndex, size_t & rEndIndex)
+size_t & rStartIndex, size_t & rEndIndex,
+bool const isTheAnswerYes)
 {
 size_t nStartIndex(rStartIndex);
 size_t nEndIndex(rEndIndex);
@@ -499,7 +500,7 @@ bool CanSkipOverRedline(SwRangeRedline const& rRedline,
 case RES_TXTATR_CJK_RUBY:
 case RES_TXTATR_INPUTFIELD:
 {
-return false; // always break
+if (!isTheAnswerYes) return false; // always break
 }
 break;
 // these are guaranteed not to overlap
@@ -589,7 +590,7 @@ bool CanSkipOverRedline(SwRangeRedline const& rRedline,
 case RES_TXTATR_CJK_RUBY:
 case RES_TXTATR_INPUTFIELD:
 {
-return false;
+if (!isTheAnswerYes) return false;
 }
 break;
 case RES_TXTATR_AUTOFMT:
@@ -610,7 +611,7 @@ bool CanSkipOverRedline(SwRangeRedline const& rRedline,
 }
 if (!isFound)
 {
-return false;
+if (!isTheAnswerYes) return false;
 }
 }
 SfxItemSet const& rSet((pAttr->Which() == 
RES_TXTATR_CHARFMT)
@@ -646,7 +647,7 @@ bool CanSkipOverRedline(SwRangeRedline const& rRedline,
 // if we didn't find a matching start for any end, then it really ends 
inside
 if (!activeCharFmts.empty())
 {
-return false;
+if (!isTheAnswerYes) return false;
 }
 for (size_t i = 0; i < SAL_N_ELEMENTS(activeCharAttrsStart); ++i)
 {
@@ -654,7 +655,7 @@ bool CanSkipOverRedline(SwRangeRedline const& rRedline,
 //assert(!activeCharAttrsStart[i] || 
activeCharAttrsStart[i]->GetItemPool()->IsItemPoolable(*activeCharAttrsStart[i]));
 if (activeCharAttrsStart[i] != activeCharAttrsEnd[i])
 {
-return false;
+if (!isTheAnswerYes) return false;
 }
 }
 rStartIndex = nStartIndex;
@@ -738,8 +739,9 @@ TextFrameIndex SwAttrIter::GetNextAttr() const
 if (redline.second.first)
 {
 assert(m_pMergedPara);
-if (CanSkipOverRedline(*redline.second.first, nStartIndex, 
nEndIndex))
-{
+if (CanSkipOverRedline(*redline.second.first,
+nStartIndex, nEndIndex, m_nPosition == redline.first))
+{   // if current position is start of the redline, must skip!
 nActRedline += redline.second.second;
 if (&redline.second.first->End()->nNode.GetNode() != 
pTextNode)
 {
commit ec3de4663dbe5462978df2bf63e6fd9b1f1bf6e4
Author: Michael Stahl 
AuthorDate: Thu Aug 16 18:55:08 2018 +0200
Commit: Michael Stahl 
CommitDate: Thu Aug 16 18:55:08 2018 +0200

sw_redlinehide_2: subtlety in UnHideRedlines, delete all flys ...

... even on nodes that have no extents any more because they were all
deleted while the redlines were hidden.

Change-Id: Id6595520b1d5db030c26905b62033db68969532c

diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 1d308a50e937..8bb1b0407f72 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -4302,21 +4302,34 @@ static void UnHideRedlines(SwRootFrame & rLayout,
 // the new text frames don't exist yet, so at this 
point
 // we can only delete the footnote frames so they 
don't
 // point to the merged SwTextFrame any more...
- 

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

2018-08-16 Thread Libreoffice Gerrit user
 filter/source/pdf/pdfexport.cxx|3 +++
 include/vcl/pdfwriter.hxx  |2 +-
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |8 
 vcl/source/gdi/pdfwriter_impl.cxx  |1 +
 4 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit d43e61962c5abdb435eff08c64a5476dfb99028a
Author: Miklos Vajna 
AuthorDate: Thu Aug 16 15:45:00 2018 +0200
Commit: Miklos Vajna 
CommitDate: Thu Aug 16 19:25:54 2018 +0200

PDF export: allow API users to opt in for version 1.6

Don't make it the default yet, though.

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

diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 0df62a459ef3..ed1e0b5ad95c 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -575,6 +575,9 @@ bool PDFExport::Export( const OUString& rFile, const 
Sequence< PropertyValue >&
 mbEncrypt = false;  // no encryption
 xEnc.clear();
 break;
+case 16:
+aContext.Version = vcl::PDFWriter::PDFVersion::PDF_1_6;
+break;
 }
 
 // copy in context the values default in the constructor or set by 
the FilterData sequence of properties
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 3c9afafc8180..8e494d796292 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -103,7 +103,7 @@ public:
 enum class Orientation { Portrait, Inherit };
 
 // in case the below enum is added PDF_1_6 PDF_1_7, please add them just 
after PDF_1_5
-enum class PDFVersion { PDF_1_2, PDF_1_3, PDF_1_4, PDF_1_5, PDF_A_1 
};//i59651, PDF/A-1b & -1a, only -1b implemented for now
+enum class PDFVersion { PDF_1_2, PDF_1_3, PDF_1_4, PDF_1_5, PDF_1_6, 
PDF_A_1 };//i59651, PDF/A-1b & -1a, only -1b implemented for now
 // for the meaning of DestAreaType please look at PDF Reference Manual
 // version 1.4 section 8.2.1, page 475
 enum class DestAreaType { XYZ, FitRectangle };
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index edcd95af9281..cbd42a738c31 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -1412,6 +1412,8 @@ void PdfExportTest::testTdf113143()
 // ReduceImageResolution is on by default and that hides the bug we
 // want to test.
 { "ReduceImageResolution", uno::Any(false) },
+// Set a custom PDF version.
+{ "SelectPdfVersion", uno::makeAny(static_cast(16)) },
 }));
 aMediaDescriptor["FilterData"] <<= aFilterData;
 exportAndParse(aURL, aMediaDescriptor);
@@ -1456,6 +1458,12 @@ void PdfExportTest::testTdf113143()
 
 // This failed, both were 319, now nSmaller is 169.
 CPPUNIT_ASSERT_LESS(nLarger, nSmaller);
+
+// The following check used to fail in the past, header was "%PDF-1.5":
+maMemory.Seek(0);
+OString aExpectedHeader("%PDF-1.6");
+OString aHeader(read_uInt8s_ToOString(maMemory, 
aExpectedHeader.getLength()));
+CPPUNIT_ASSERT_EQUAL(aExpectedHeader, aHeader);
 }
 
 void PdfExportTest::testForcePoint71()
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index cb58e6ce8842..38e1ab075363 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1796,6 +1796,7 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 
nWidth, sal_Int32 nY, sal
 case PDFWriter::PDFVersion::PDF_1_4: aBuffer.append( "1.4" );break;
 default:
 case PDFWriter::PDFVersion::PDF_1_5: aBuffer.append( "1.5" );break;
+case PDFWriter::PDFVersion::PDF_1_6: aBuffer.append( "1.6" );break;
 }
 // append something binary as comment (suggested in PDF Reference)
 aBuffer.append( "\n%\303\244\303\274\303\266\303\237\n" );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/vector/vector-5.4' - filter/source include/vcl vcl/qa vcl/source

2018-08-16 Thread Libreoffice Gerrit user
 filter/source/pdf/pdfexport.cxx|3 +++
 include/vcl/pdfwriter.hxx  |2 +-
 vcl/qa/cppunit/pdfexport/pdfexport.cxx |9 -
 vcl/source/gdi/pdfwriter_impl.cxx  |1 +
 4 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 11531b92eeae8feaa49e74f9992b6c3b781ec8f8
Author: Miklos Vajna 
AuthorDate: Thu Aug 16 15:45:00 2018 +0200
Commit: Miklos Vajna 
CommitDate: Thu Aug 16 18:16:14 2018 +0200

PDF export: allow API users to opt in for version 1.6

Don't make it the default yet, though.

Conflicts:
vcl/qa/cppunit/pdfexport/pdfexport.cxx

Change-Id: Ida56eb25a84bf5425d4879c062c084bb68984d9a

diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 4fdd7a450626..4458f485c613 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -572,6 +572,9 @@ bool PDFExport::Export( const OUString& rFile, const 
Sequence< PropertyValue >&
 mbEncrypt = false;  // no encryption
 xEnc.clear();
 break;
+case 16:
+aContext.Version = vcl::PDFWriter::PDFVersion::PDF_1_6;
+break;
 }
 
 // copy in context the values default in the constructor or set by 
the FilterData sequence of properties
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 78a28231ea10..66004c0c7362 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -105,7 +105,7 @@ public:
 enum class Orientation { Portrait, Inherit };
 
 // in case the below enum is added PDF_1_6 PDF_1_7, please add them just 
after PDF_1_5
-enum class PDFVersion { PDF_1_2, PDF_1_3, PDF_1_4, PDF_1_5, PDF_A_1 
};//i59651, PDF/A-1b & -1a, only -1b implemented for now
+enum class PDFVersion { PDF_1_2, PDF_1_3, PDF_1_4, PDF_1_5, PDF_1_6, 
PDF_A_1 };//i59651, PDF/A-1b & -1a, only -1b implemented for now
 // for the meaning of DestAreaType please look at PDF Reference Manual
 // version 1.4 section 8.2.1, page 475
 enum class DestAreaType { XYZ, FitRectangle };
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 1a88b97e5364..1b2f03ddc089 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -156,7 +156,8 @@ void PdfExportTest::testTdf106059()
 // Explicitly enable the usage of the reference XObject markup.
 uno::Sequence aFilterData =
 {
-comphelper::makePropertyValue("UseReferenceXObject", true)
+comphelper::makePropertyValue("UseReferenceXObject", true),
+comphelper::makePropertyValue("SelectPdfVersion", 
static_cast(16))
 };
 aMediaDescriptor["FilterData"] <<= aFilterData;
 xStorable->storeToURL(aTempFile.GetURL(), 
aMediaDescriptor.getAsConstPropertyValueList());
@@ -181,6 +182,12 @@ void PdfExportTest::testTdf106059()
 // The image is a reference XObject.
 // This dictionary key was missing, so the XObject wasn't a reference one.
 CPPUNIT_ASSERT(pReferenceXObject->Lookup("Ref"));
+
+// The following check used to fail in the past, header was "%PDF-1.5":
+aStream.Seek(0);
+OString aExpectedHeader("%PDF-1.6");
+OString aHeader(read_uInt8s_ToOString(aStream, 
aExpectedHeader.getLength()));
+CPPUNIT_ASSERT_EQUAL(aExpectedHeader, aHeader);
 }
 
 void PdfExportTest::testTdf106693()
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 1cbdd642b504..a742373d3195 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1816,6 +1816,7 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 
nWidth, sal_Int32 nY, sal
 default:
 case PDFWriter::PDFVersion::PDF_1_4: aBuffer.append( "1.4" );break;
 case PDFWriter::PDFVersion::PDF_1_5: aBuffer.append( "1.5" );break;
+case PDFWriter::PDFVersion::PDF_1_6: aBuffer.append( "1.6" );break;
 }
 // append something binary as comment (suggested in PDF Reference)
 aBuffer.append( "\n%\303\244\303\274\303\266\303\237\n" );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: basic/source editeng/source include/svl sc/source sfx2/source svl/qa svl/source svtools/source sw/source xmloff/source

2018-08-16 Thread Libreoffice Gerrit user
 basic/source/runtime/runtime.cxx|4 ++--
 basic/source/sbx/sbxdate.cxx|4 ++--
 basic/source/sbx/sbxscan.cxx|8 
 editeng/source/items/flditem.cxx|2 +-
 include/svl/zforlist.hxx|2 +-
 sc/source/filter/excel/xistyle.cxx  |2 +-
 sc/source/ui/docshell/impex.cxx |2 +-
 sfx2/source/bastyp/sfxhtml.cxx  |2 +-
 svl/qa/unit/svl.cxx |2 +-
 svl/source/numbers/numfmuno.cxx |4 +++-
 svl/source/numbers/zforlist.cxx |   12 ++--
 svl/source/numbers/zformat.cxx  |2 +-
 svl/source/numbers/zforscan.cxx |4 ++--
 svl/source/numbers/zforscan.hxx |6 +++---
 svtools/source/control/fmtfield.cxx |2 +-
 sw/source/core/fields/fldbas.cxx|6 +++---
 sw/source/filter/ww8/ww8par5.cxx|2 +-
 xmloff/source/style/xmlnumfe.cxx|2 +-
 18 files changed, 35 insertions(+), 33 deletions(-)

New commits:
commit 5b8007afdb97d416ee7c22bf9226e927d61e9bd3
Author: Eike Rathke 
AuthorDate: Thu Aug 16 15:50:02 2018 +0200
Commit: Eike Rathke 
CommitDate: Thu Aug 16 18:54:31 2018 +0200

Resolves: tdf#119013 do not over-aggressively reorder date particles

In particular not when reading documents as we don't know what the
original (default/system) locale was when the date format was
created and stored and whether the format's date order actually
matched the locale's ordering.

Regression from

commit 51478cefaa4e265b42e3f67eda0a64767ff3efba
CommitDate: Tue Apr 18 17:01:27 2017 +0200

Resolves: tdf#107012 follow date order of the target locale

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

diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 04f597846b7c..107124d98224 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -438,12 +438,12 @@ std::shared_ptr 
SbiInstance::PrepareNumberFormatter( sal_uInt
 }
 OUString aStr( aDateStr );  // PutandConvertEntry() modifies string!
 pNumberFormatter->PutandConvertEntry( aStr, nCheckPos, nType,
-rnStdDateIdx, LANGUAGE_ENGLISH_US, eLangType );
+rnStdDateIdx, LANGUAGE_ENGLISH_US, eLangType, true);
 nCheckPos = 0;
 aDateStr += " HH:MM:SS";
 aStr = aDateStr;
 pNumberFormatter->PutandConvertEntry( aStr, nCheckPos, nType,
-rnStdDateTimeIdx, LANGUAGE_ENGLISH_US, eLangType );
+rnStdDateTimeIdx, LANGUAGE_ENGLISH_US, eLangType, true);
 return pNumberFormatter;
 }
 
diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx
index abf30c202e7d..1880ba40df78 100644
--- a/basic/source/sbx/sbxdate.cxx
+++ b/basic/source/sbx/sbxdate.cxx
@@ -142,7 +142,7 @@ double ImpGetDate( const SbxValues* p )
 OUString aStr = aDateStr + " HH:MM:SS";
 
 pFormatter->PutandConvertEntry( aStr, nCheckPos, nType,
-nIndex, LANGUAGE_ENGLISH_US, 
eLangType );
+nIndex, LANGUAGE_ENGLISH_US, 
eLangType, true);
 bool bSuccess = pFormatter->IsNumberFormat( *p->pOUString, nIndex, 
nRes );
 if ( bSuccess )
 {
@@ -337,7 +337,7 @@ start:
 nType,
 nIndex,
 LANGUAGE_ENGLISH_US,
-eLangType );
+eLangType, true);
 pFormatter->GetOutputString( n, nIndex, *p->pOUString, &pColor );
 #endif
 break;
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 2b229082f665..156a398a7bcf 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -720,7 +720,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt 
) const
 else
 {
 aFmtStr = OUString::createFromAscii(pInfo->mpOOoFormat);
-pFormatter->PutandConvertEntry( aFmtStr, nCheckPos, nType, 
nIndex, LANGUAGE_ENGLISH, eLangType );
+pFormatter->PutandConvertEntry( aFmtStr, nCheckPos, nType, 
nIndex, LANGUAGE_ENGLISH, eLangType, true);
 }
 pFormatter->GetOutputString( nNumber, nIndex, rRes, &pCol );
 }
@@ -737,7 +737,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt 
) const
 if( floor( nNumber ) != nNumber )
 {
 aFmtStr = "H:MM:SS AM/PM";
-pFormatter->PutandConvertEntry( aFmtStr, nCheckPos, 
nType, nIndex, LANGUAGE_ENGLISH, eLangType );
+pFormatter->PutandConvertEntry( aFmtStr, nCheckPos, 
nType, nIndex, LANGUAGE_ENGLISH, eL

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-3' - 26 commits - common/Rectangle.hpp kit/Kit.cpp loleaflet/src test/TileCacheTests.cpp wsd/ClientSession.cpp wsd/ClientSes

2018-08-16 Thread Libreoffice Gerrit user
 common/Rectangle.hpp |5 
 kit/Kit.cpp  |4 
 loleaflet/src/layer/tile/CalcTileLayer.js|   47 
 loleaflet/src/layer/tile/GridLayer.js|  106 ++
 loleaflet/src/layer/tile/ImpressTileLayer.js |   39 ---
 loleaflet/src/layer/tile/TileLayer.js|   66 +-
 loleaflet/src/layer/tile/WriterTileLayer.js  |   41 
 test/TileCacheTests.cpp  |7 
 wsd/ClientSession.cpp|  271 ++-
 wsd/ClientSession.hpp|   68 ++
 wsd/DocumentBroker.cpp   |  188 ++
 wsd/DocumentBroker.hpp   |1 
 wsd/TestStubs.cpp|   11 +
 wsd/TileCache.cpp|   65 +-
 wsd/TileCache.hpp|9 
 wsd/protocol.txt |5 
 16 files changed, 658 insertions(+), 275 deletions(-)

New commits:
commit 9f017af051a5093300561ad72baad217bdcd73bd
Author: Tamás Zolnai 
AuthorDate: Fri Aug 10 17:48:59 2018 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Aug 15 12:34:21 2018 +0200

Update row by row, instead of column by column

Change-Id: I504cab9509d25eebf3f68c63dd7e18a54f80d865
(cherry picked from commit 6d3a0d03272b9a01fb50254dd2acd67afc6e9ac0)

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 7c4a0e2ed..428e7d0f9 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -1156,13 +1156,13 @@ void ClientSession::handleTileInvalidation(const 
std::string& message,
 intersection._y2 = std::min(invalidateRect._y2, 
_clientVisibleArea._y2);
 if(intersection.isValid()) // Client visible area and invalidated 
rectangle has intersection
 {
-for(int i = std::ceil(intersection._x1 / _tileWidthTwips);
-i <= std::ceil(intersection._x2 / _tileWidthTwips); ++i)
+for(int i = std::ceil(intersection._y1 / _tileHeightTwips);
+i <= std::ceil(intersection._y2 / _tileHeightTwips); ++i)
 {
-for(int j = std::ceil(intersection._y1 / _tileHeightTwips);
-j <= std::ceil(intersection._y2 / _tileHeightTwips); ++j)
+for(int j = std::ceil(intersection._x1 / _tileWidthTwips);
+j <= std::ceil(intersection._x2 / _tileWidthTwips); ++j)
 {
-invalidTiles.emplace_back(TileDesc(part, _tileWidthPixel, 
_tileHeightPixel, i * _tileWidthTwips, j * _tileHeightTwips, _tileWidthTwips, 
_tileHeightTwips, -1, 0, -1, false));
+invalidTiles.emplace_back(TileDesc(part, _tileWidthPixel, 
_tileHeightPixel, j * _tileWidthTwips, i * _tileHeightTwips, _tileWidthTwips, 
_tileHeightTwips, -1, 0, -1, false));
 
 TileWireId oldWireId = 0;
 auto iter = 
_oldWireIds.find(generateTileID(invalidTiles.back()));
commit 83a5c79c2a4bf23d41cda35f480a30eb8e6d653a
Author: Tamás Zolnai 
AuthorDate: Mon Aug 6 16:58:19 2018 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Aug 15 12:34:08 2018 +0200

Store wireId only for tiles inside the visible area

Change-Id: If60015c86bbdd1158c203a7a9c47b3dc877ac6c5
(cherry picked from commit 1a885b9c40449a5d491684c7d66674554deed351)

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 12b2b5eb8..7c4a0e2ed 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -1200,7 +1200,13 @@ void ClientSession::traceTileBySend(const TileDesc& tile)
 }
 else
 {
-_oldWireIds.insert(std::pair(tileID, 
tile.getWireId()));
+// Track only tile inside the visible area
+if(_clientVisibleArea.hasSurface() &&
+   tile.getTilePosX() >= _clientVisibleArea._x1 && tile.getTilePosX() 
<= _clientVisibleArea._x2 &&
+   tile.getTilePosY() >= _clientVisibleArea._y1 && tile.getTilePosY() 
<= _clientVisibleArea._y2)
+{
+_oldWireIds.insert(std::pair(tileID, 
tile.getWireId()));
+}
 }
 
 // Record that the tile is sent
commit e74429276037e7face37c7c25d0f3c37d45b1be9
Author: Tamás Zolnai 
AuthorDate: Mon Aug 6 14:17:45 2018 +0200
Commit: Tamás Zolnai 
CommitDate: Wed Aug 15 12:33:53 2018 +0200

Need to reset wireId map anytime when part number changes

Change-Id: I8309a0a0788587f6daebe9698723df6bc0410039
(cherry picked from commit e35ce41eaa0986ebc6ae497ee5883ede2566b58f)

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index c9fad0456..12b2b5eb8 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -736,10 +736,12 @@ bool ClientSession::handleKitToClientMessage(const char* 
buffer, const int lengt
 if(getTokenInteger(tokens[1], "part", setPart))
 {
 _clientSelectedPart = setPart;
+resetWireIdMap();
 }
 else if (strin

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

2018-08-16 Thread Libreoffice Gerrit user
 sd/qa/unit/export-tests.cxx  |3 ++
 sd/source/filter/eppt/pptx-epptooxml.cxx |   43 ---
 2 files changed, 37 insertions(+), 9 deletions(-)

New commits:
commit 6e03d7ee5734c94d245aea5900c0924fbef2a246
Author: Mark Hung 
AuthorDate: Sun Aug 12 23:29:55 2018 +0800
Commit: Mark Hung 
CommitDate: Thu Aug 16 18:17:16 2018 +0200

tdf#99213 handle iterate container.

Export iterate container as p:par with iterate element, which has
'type' attribute and p:tmAbs element. Note that child animation
node would not have target so it has to use the target of the
iterate container.

Testcase of testTdf113822 is used, PowerPointExport::
WriteAnimationAttributeName is tuned to prevent data loss
there. Deciding an Any is a RGB color by converting
to sal_Int32 doesn't work and has been done
AnimationExporter::convertAnimateValue, so we can remove
them securely and make the roundtrip test case work.

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

diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 0e5b8f563df9..b17fb213c5b1 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -1105,6 +1105,9 @@ void SdExportTest::testTdf113822()
 utl::TempFile tempFile;
 sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf113822underline.pptx"),
 PPTX);
 
+// Was unable to export iterate container (tdf#99213).
+xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+// Was unable to import iterate container (tdf#113822).
 xDocShRef = saveAndReload(xDocShRef.get(), ODP, &tempFile);
 
 xmlDocPtr pXmlDoc = parseExport(tempFile, "content.xml");
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 7b64a3f271a5..69624d1c0752 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -60,6 +60,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -76,6 +77,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1027,14 +1029,7 @@ void PowerPointExport::WriteAnimateTo(const FSHelperPtr& 
pFS, const Any& rValue,
 
 SAL_INFO("sd.eppt", "to attribute name: " << USS(rAttributeName));
 
-sal_uInt32 nColor;
-if (rValue >>= nColor)
-{
-// RGB color
-WriteAnimationProperty(pFS, rValue, XML_to);
-}
-else
-WriteAnimationProperty(pFS, 
AnimationExporter::convertAnimateValue(rValue, rAttributeName), XML_to);
+WriteAnimationProperty(pFS, AnimationExporter::convertAnimateValue(rValue, 
rAttributeName), XML_to);
 }
 
 void PowerPointExport::WriteAnimationAttributeName(const FSHelperPtr& pFS, 
const OUString& rAttributeName)
@@ -1351,7 +1346,10 @@ void 
PowerPointExport::WriteAnimationNodeAnimateInside(const FSHelperPtr& pFS, c
 XML_additive, pAdditive,
 FSEND);
 WriteAnimationNodeCommonPropsStart(pFS, rXNode, true, bMainSeqChild);
-WriteAnimationTarget(pFS, rXAnimate->getTarget());
+
+Reference xIterate(rXNode->getParent(), UNO_QUERY);
+WriteAnimationTarget(pFS, xIterate.is() ?
+xIterate->getTarget() : rXAnimate->getTarget());
 
 Reference xTransform(rXNode, UNO_QUERY);
 
@@ -1687,6 +1685,32 @@ void 
PowerPointExport::WriteAnimationNodeCommonPropsStart(const FSHelperPtr& pFS
 WriteAnimationCondition(pFS, aAny, false, bMainSeqChild, 
XML_endCondLst);
 }
 
+if (rXNode->getType() == AnimationNodeType::ITERATE)
+{
+Reference xIterate(rXNode, UNO_QUERY);
+if (xIterate.is())
+{
+const char *sType = nullptr;
+switch(xIterate->getIterateType())
+{
+case TextAnimationType::BY_PARAGRAPH:
+sType = "el";
+break;
+case TextAnimationType::BY_LETTER:
+sType = "lt";
+break;
+case TextAnimationType::BY_WORD:
+default:
+sType = "wd";
+break;
+
+}
+pFS->startElementNS(XML_p, XML_iterate, XML_type, sType, FSEND);
+pFS->singleElementNS(XML_p, XML_tmAbs, XML_val, 
I32S(xIterate->getIterateInterval() * 1000), FSEND);
+pFS->endElementNS(XML_p, XML_iterate);
+}
+}
+
 Reference< XEnumerationAccess > xEnumerationAccess(rXNode, UNO_QUERY);
 if (xEnumerationAccess.is())
 {
@@ -1794,6 +1818,7 @@ void PowerPointExport::WriteAnimationNode(const 
FSHelperPtr& pFS, const Referenc
 
 switch (rXNode->getType())
 {
+case AnimationNodeType::ITERATE:
 case AnimationNodeType::PAR:
 xmlNodeType = XML_par;
 break;
___

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

2018-08-16 Thread Libreoffice Gerrit user
 svx/source/unodraw/unoshape.cxx |9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 4f2b25c406b3e63b5d15bf90ad29abb3eb9041a1
Author: Caolán McNamara 
AuthorDate: Thu Aug 16 13:31:30 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 17:56:48 2018 +0200

tdf#114427 improve fix, wedo need to free it regardless

Change-Id: I7c35bcd839d7b7b2e8a9ce83f732e14b68ca58eb
Reviewed-on: https://gerrit.libreoffice.org/59172
Tested-by: Xisco Faulí 
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index aea443acb6fa..a61ce3fbc79d 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1357,11 +1357,13 @@ void SAL_CALL SvxShape::dispose()
 mpImpl->maDisposeListeners.disposeAndClear(aEvt);
 mpImpl->maPropertyNotifier.disposing();
 
-bool bFreeSdrObject = false;
 if ( HasSdrObject() )
 {
 SdrObject* pObject = GetSdrObject();
+
 EndListening( pObject->getSdrModelFromSdrObject() );
+bool bFreeSdrObject = false;
+
 if ( pObject->IsInserted() && pObject->getSdrPageFromSdrObject() )
 {
 OSL_ENSURE( HasSdrObjectOwnership(), "SvxShape::dispose: is the 
below code correct?" );
@@ -1381,11 +1383,6 @@ void SAL_CALL SvxShape::dispose()
 }
 }
 }
-}
-
-if ( HasSdrObject() ) //tdf#114427 refetch SdrObject in light of 
RemoveObject
-{
-SdrObject* pObject = GetSdrObject();
 
 pObject->setUnoShape(nullptr);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 sw/source/core/layout/trvlfrm.cxx |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 00faf6dd9957890634db94cfc6b8a1108a62a2d2
Author: Caolán McNamara 
AuthorDate: Thu Aug 16 14:24:46 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 17:52:04 2018 +0200

tdf#119224 start and end are expected to exist for the scope of this 
function

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

diff --git a/sw/source/core/layout/trvlfrm.cxx 
b/sw/source/core/layout/trvlfrm.cxx
index 22273e0173e6..14887a9e274f 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -2040,13 +2040,15 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor)
 
 //First obtain the ContentFrames for the start and the end - those are 
needed
 //anyway.
-SwContentFrame const* pStartFrame = pStartPos->nNode.GetNode().
+SwContentFrame* pStartFrame = pStartPos->nNode.GetNode().
 GetContentNode()->getLayoutFrame( this, &rCursor.GetSttPos(), 
pStartPos );
 
-SwContentFrame const* pEndFrame   = pEndPos->nNode.GetNode().
+SwContentFrame* pEndFrame   = pEndPos->nNode.GetNode().
 GetContentNode()->getLayoutFrame( this, &rCursor.GetEndPos(), pEndPos 
);
 
-OSL_ENSURE( (pStartFrame && pEndFrame), "No ContentFrames found." );
+assert(pStartFrame && pEndFrame && "No ContentFrames found.");
+//tdf#119224 start and end are expected to exist for the scope of this 
function
+SwFrameDeleteGuard aStartFrameGuard(pStartFrame), 
aEndFrameGuard(pEndFrame);
 
 //Do not subtract the FlyFrames in which selected Frames lie.
 SwSortedObjs aSortObjs;
___
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' - reportdesign/source

2018-08-16 Thread Libreoffice Gerrit user
 reportdesign/source/ui/report/ReportController.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 1f7bbcfa7fc55437f11f0d8b93848d9c71f9b3cc
Author: Julien Nabet 
AuthorDate: Sun Aug 12 11:39:04 2018 +0200
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 17:51:07 2018 +0200

tdf#117795: not all elements have ChartFontName property

See bt https://bugs.documentfoundation.org/attachment.cgi?id=144114
In this bugtracker we tried to apply a change of fontname on 
reportdesign::OFixedLine

Change-Id: I60ee5ca9f967fc71939e2f57ecd9de7edd680958
Reviewed-on: https://gerrit.libreoffice.org/58895
Reviewed-by: Julien Nabet 
(cherry picked from commit 3512079dc42a6472136f9c229fc9ea0b0033ebf9)
Reviewed-on: https://gerrit.libreoffice.org/59151
Reviewed-by: Noel Grandin 
Reviewed-by: Lionel Elie Mamane 
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 9b47422943b7..34b86170620a 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -4140,7 +4140,14 @@ bool 
OReportController::impl_setPropertyAtControls_throw(const char* pUndoResId,
 {
 const uno::Reference< beans::XPropertySet > 
xControlModel(*aIter,uno::UNO_QUERY);
 if ( xControlModel.is() )
-xControlModel->setPropertyValue(_sProperty,_aValue);
+try
+{
+xControlModel->setPropertyValue(_sProperty,_aValue);
+}
+catch(const UnknownPropertyException& e)
+{
+SAL_WARN("reportdesign", "UnknowPropertyException:" << e);
+}
 }
 
 return !aSelection.empty();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 wizards/source/access2base/DoCmd.xba |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 9459c5b105e0aad25ccfb875354cfd9c7353cbcb
Author: Jean-Pierre Ledure 
AuthorDate: Mon Aug 13 11:02:06 2018 +0200
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 17:49:17 2018 +0200

Access2Base - Fix Filter arg not applied in OpenForm

The Filter argument was not applied in the OpenForm command
(was simply ignored and could be worked around by user).
Fixed by retrieval of internal DatabaseForm.

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

diff --git a/wizards/source/access2base/DoCmd.xba 
b/wizards/source/access2base/DoCmd.xba
index ad564b72afd9..c640af7c5478 100644
--- a/wizards/source/access2base/DoCmd.xba
+++ b/wizards/source/access2base/DoCmd.xba
@@ -1139,6 +1139,8 @@ Dim sFilter As String, oForm As Object, oFormsCollection 
As Object
Else
sFilter = "(" & pvFilterName & ") And 
(" & pvWhereCondition & ")"
End If
+   Set oFormsCollection = oOpenForm.DrawPage.Forms
+   If oFormsCollection.getCount() > 0 Then Set oForm = 
oFormsCollection.getByIndex(0) Else Set oForm = Nothing
If Not IsNull(oForm) Then
If sFilter <> "" Then
oForm.Filter = oDatabase._ReplaceSquareBrackets(sFilter)
@@ -2651,4 +2653,4 @@ Dim oShell As Object
 
 End Sub'  _ShellExecute   
V0.8.5
 
-
\ No newline at end of file
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 sfx2/source/dialog/mgetempl.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 62191a46cd8ceb73145ede57667304b159f5461e
Author: Xisco Fauli 
AuthorDate: Thu Aug 2 13:41:26 2018 +0200
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 17:48:52 2018 +0200

tdf#119052: hide edit style button in character style

Change-Id: I8ec82865b990ff19ead819c990f442edd7423d66
Reviewed-on: https://gerrit.libreoffice.org/58472
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 
(cherry picked from commit 8e7d6bd5095404337c6e6dab1b9a20f69765ef29)
Reviewed-on: https://gerrit.libreoffice.org/58694
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 1d5275935896..c3c249ada7df 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -147,6 +147,7 @@ 
SfxManageStyleSheetPage::SfxManageStyleSheetPage(TabPageParent pParent, const Sf
 {
 m_xFollowFt->hide();
 m_xFollowLb->hide();
+m_xEditStyleBtn->hide();
 }
 
 if ( pStyle->HasParentSupport() && pPool )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 i18npool/inc/cclass_unicode.hxx   |4 ++--
 i18npool/source/characterclassification/cclass_unicode_parser.cxx |9 
++---
 2 files changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 738aa2cb2352613981d39678404f1b32197f0ad2
Author: Stephan Bergmann 
AuthorDate: Tue Aug 14 13:34:13 2018 +0200
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 17:48:25 2018 +0200

cclass_Unicode::StrChr needs to support non-BMP chars

...as seen with Clang's new -fsanitize=implicit-cast during
CppunitTest_starmath_qa_cppunit:

> i18npool/source/characterclassification/cclass_unicode_parser.cxx:565:46: 
runtime error: implicit conversion from type 'sal_uInt32' (aka 'unsigned int') 
of value 119886 (32-bit, unsigned) to type 'sal_Unicode' (aka 'char16_t') 
changed the value to 54350 (16-bit, unsigned)
>  #0 in i18npool::cclass_Unicode::getFlags(unsigned int) at 
i18npool/source/characterclassification/cclass_unicode_parser.cxx:565:46 
(instdir/program/libi18npoollo.so +0x3ae807)
>  #1 in 
i18npool::cclass_Unicode::parseText(com::sun::star::i18n::ParseResult&, 
rtl::OUString const&, int, int) at 
i18npool/source/characterclassification/cclass_unicode_parser.cxx:712:29 
(instdir/program/libi18npoollo.so +0x3b04c3)
>  #2 in i18npool::cclass_Unicode::parsePredefinedToken(int, rtl::OUString 
const&, int, com::sun::star::lang::Locale const&, int, rtl::OUString const&, 
int, rtl::OUString const&) at 
i18npool/source/characterclassification/cclass_unicode.cxx:275:5 
(instdir/program/libi18npoollo.so +0x3a17ea)
>  #3 in non-virtual thunk to 
i18npool::cclass_Unicode::parsePredefinedToken(int, rtl::OUString const&, int, 
com::sun::star::lang::Locale const&, int, rtl::OUString const&, int, 
rtl::OUString const&) at 
i18npool/source/characterclassification/cclass_unicode.cxx 
(instdir/program/libi18npoollo.so +0x3a18dc)
>  #4 in i18npool::CharacterClassificationImpl::parsePredefinedToken(int, 
rtl::OUString const&, int, com::sun::star::lang::Locale const&, int, 
rtl::OUString const&, int, rtl::OUString const&) at 
i18npool/source/characterclassification/characterclassificationImpl.cxx:118:63 
(instdir/program/libi18npoollo.so +0x3c48ba)
>  #5 in non-virtual thunk to 
i18npool::CharacterClassificationImpl::parsePredefinedToken(int, rtl::OUString 
const&, int, com::sun::star::lang::Locale const&, int, rtl::OUString const&, 
int, rtl::OUString const&) at 
i18npool/source/characterclassification/characterclassificationImpl.cxx 
(instdir/program/libi18npoollo.so +0x3c497c)
>  #6 in CharClass::parsePredefinedToken(int, rtl::OUString const&, int, 
int, rtl::OUString const&, int, rtl::OUString const&) const at 
unotools/source/i18n/charclass.cxx:443:25 (instdir/program/libutllo.so 
+0x904d17)
>  #7 in SmParser::NextToken() at starmath/source/parse.cxx:391:25 
(workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0xa4a3e7)
>  #8 in SmParser::DoTerm(bool) at starmath/source/parse.cxx:1337:13 
(workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0xa5951b)
>  #9 in SmParser::DoPower() at starmath/source/parse.cxx:1285:35 
(workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0xa57d46)
>  #10 in SmParser::DoProduct() at starmath/source/parse.cxx:1105:19 
(workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0xa5685a)
>  #11 in SmParser::DoSum() at starmath/source/parse.cxx:1087:19 
(workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0xa55ebc)
>  #12 in SmParser::DoRelation() at starmath/source/parse.cxx:1069:19 
(workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0xa558dc)
>  #13 in SmParser::DoExpression(bool) at starmath/source/parse.cxx:1043:29 
(workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0xa54ff5)
>  #14 in SmParser::ParseExpression(rtl::OUString const&) at 
starmath/source/parse.cxx:2366:12 
(workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0xa671dc)
>  #15 in (anonymous namespace)::Test::ParseAndCompare(char const*, char 
const*, char const*) at starmath/qa/cppunit/test_nodetotextvisitors.cxx:485:30 
(workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0x5f7ea6)
>  #16 in (anonymous namespace)::Test::testMiscEquivalent() at 
starmath/qa/cppunit/test_nodetotextvisitors.cxx:637:5 
(workdir/LinkTarget/CppunitTest/libtest_starmath_qa_cppunit.so +0x5f2dc8)

Change-Id: Iaf62efd60bd6132e005ab69ce385bbf5c2db5d19
Reviewed-on: https://gerrit.libreoffice.org/58979
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 9b4013ef522fe1faebf76f7f9c624e7e2a90c8c9)
Reviewed-on: https://gerrit.libreoffice.org/58990
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/i18npool/inc/cclass_unicode.hxx b/i18npool/inc/cclass_unicode.hxx
index d962a3216585..cd77cbea275a 100644
--- a/i18npool/inc/cclass_unicode.hxx
+++ b/i18npool/inc/cclass

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

2018-08-16 Thread Libreoffice Gerrit user
 include/vcl/outdev.hxx |5 -
 include/vcl/vcllayout.hxx  |2 +-
 vcl/inc/sallayout.hxx  |4 ++--
 vcl/source/gdi/CommonSalLayout.cxx |9 -
 vcl/source/gdi/sallayout.cxx   |2 +-
 vcl/source/outdev/font.cxx |4 ++--
 vcl/source/outdev/text.cxx |6 --
 7 files changed, 22 insertions(+), 10 deletions(-)

New commits:
commit 46b3a2401d371b20bdbfca6a47c09408259d595f
Author: Miklos Vajna 
AuthorDate: Thu Aug 16 13:51:43 2018 +0200
Commit: Miklos Vajna 
CommitDate: Thu Aug 16 17:32:56 2018 +0200

vcl: support pre-computed glyph items in OutputDevice::ImplLayout()

This allows using the SalLayoutGlyphs obtained from
GenericSalLayout::GetGlyphs() to return early in
GenericSalLayout::LayoutText().

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

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index fe9af36994b8..6a91fd2527e8 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -150,6 +150,8 @@ namespace o3tl
 }
 
 typedef std::vector< tools::Rectangle > MetricVector;
+struct GlyphItem;
+typedef std::vector SalLayoutGlyphs;
 
 // OutputDevice-Types
 
@@ -1328,7 +1330,8 @@ public:
 ImplLayout( const OUString&, sal_Int32 nIndex, 
sal_Int32 nLen,
 const Point& rLogicPos = 
Point(0,0), long nLogicWidth=0,
 const long* pLogicDXArray=nullptr, 
SalLayoutFlags flags = SalLayoutFlags::NONE,
-vcl::TextLayoutCache const* = 
nullptr) const;
+vcl::TextLayoutCache const* = 
nullptr,
+const SalLayoutGlyphs* pGlyphs = 
nullptr) const;
 SAL_DLLPRIVATE ImplLayoutArgs ImplPrepareLayoutArgs( OUString&, const 
sal_Int32 nIndex, const sal_Int32 nLen,
  DeviceCoordinate 
nPixelWidth, const DeviceCoordinate* pPixelDXArray,
  SalLayoutFlags flags 
= SalLayoutFlags::NONE,
diff --git a/include/vcl/vcllayout.hxx b/include/vcl/vcllayout.hxx
index ac61892fb415..735dc4cf748f 100644
--- a/include/vcl/vcllayout.hxx
+++ b/include/vcl/vcllayout.hxx
@@ -131,7 +131,7 @@ public:
 const Point&DrawOffset() const  { return 
maDrawOffset; }
 Point   GetDrawPosition( const Point& rRelative = Point(0,0) ) 
const;
 
-virtual boolLayoutText( ImplLayoutArgs& ) = 0;  // first step of 
layouting
+virtual boolLayoutText( ImplLayoutArgs&, const SalLayoutGlyphs* ) = 0; 
 // first step of layouting
 virtual voidAdjustLayout( ImplLayoutArgs& );// adjusting after 
fallback etc.
 virtual voidInitFont() const {}
 virtual voidDrawText( SalGraphics& ) const = 0;
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index 2aa650a1c75a..a8b9e233f450 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -139,7 +139,7 @@ public:
 explicitMultiSalLayout( std::unique_ptr pBaseLayout );
 voidAddFallback( std::unique_ptr pFallbackLayout,
  ImplLayoutRuns const &, const 
PhysicalFontFace* pFallbackFont );
-boolLayoutText(ImplLayoutArgs&) override;
+boolLayoutText(ImplLayoutArgs&, const SalLayoutGlyphs*) 
override;
 voidAdjustLayout(ImplLayoutArgs&) override;
 voidInitFont() const override;
 
@@ -172,7 +172,7 @@ public:
 ~GenericSalLayout() override;
 
 voidAdjustLayout(ImplLayoutArgs&) final override;
-boolLayoutText(ImplLayoutArgs&) final override;
+boolLayoutText(ImplLayoutArgs&, const SalLayoutGlyphs*) final 
override;
 voidDrawText(SalGraphics&) const final override;
 std::shared_ptr CreateTextLayoutCache(OUString 
const&) const final override;
 SalLayoutGlyphs GetGlyphs() const final override;
diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index 32d8e572156a..fc38b33437e1 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -263,12 +263,19 @@ bool GenericSalLayout::HasVerticalAlternate(sal_UCS4 
aChar, sal_UCS4 aVariationS
 return hb_set_has(mpVertGlyphs, nGlyphIndex) != 0;
 }
 
-bool GenericSalLayout::LayoutText(ImplLayoutArgs& rArgs)
+bool GenericSalLayout::LayoutText(ImplLayoutArgs& rArgs, const 
SalLayoutGlyphs* pGlyphs)
 {
 // No need to touch m_GlyphItems at all for an empty string.
 if (rArgs.mnEndCharPos - rArgs.mnMinCharPos <= 0)
 return true;
 
+if (pGlyphs)
+{
+// Work with pre-computed glyph items.
+m_GlyphItems 

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

2018-08-16 Thread Libreoffice Gerrit user
 vcl/headless/svptext.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit a518d1acf7f2f9952ab1d20f3185615351655ef8
Author: Caolán McNamara 
AuthorDate: Thu Aug 16 13:59:26 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 17:16:29 2018 +0200

skip text layout when fuzzing

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

diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index dbef813cd658..747fffe104f1 100644
--- a/vcl/headless/svptext.cxx
+++ b/vcl/headless/svptext.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -103,6 +104,8 @@ bool SvpSalGraphics::GetGlyphOutline(const GlyphItem& 
rGlyph, basegfx::B2DPolyPo
 
 std::unique_ptr SvpSalGraphics::GetTextLayout( ImplLayoutArgs& 
rArgs, int nFallbackLevel )
 {
+if (utl::ConfigManager::IsFuzzing())
+return nullptr;
 return m_aTextRenderImpl.GetTextLayout(rArgs, nFallbackLevel);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 oox/source/vml/vmlformatting.cxx |2 +-
 sw/source/core/edit/edfcol.cxx   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 308fbd8cdf9ce0fc3921b6c4c58707609b486fb9
Author: Szymon Kłos 
AuthorDate: Thu Aug 16 14:32:19 2018 +0200
Commit: Szymon Kłos 
CommitDate: Thu Aug 16 16:44:09 2018 +0200

tdf#118385 Avoid crash on loading document

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

diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index d2132c0bc8b7..99c95eab372e 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -961,7 +961,7 @@ void TextpathModel::pushToPropMap(ShapePropertyMap& 
rPropMap, const uno::Referen
 if (!moTrim.has() || !moTrim.get())
 {
 OUString sText = moString.get();
-VclPtr pDevice = VclPtr::Create();
+ScopedVclPtrInstance pDevice;
 vcl::Font aFont = pDevice->GetFont();
 aFont.SetFamilyName(sFont);
 aFont.SetFontSize(Size(0, 96));
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 1de00b60633d..43ec52565128 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -1483,7 +1483,7 @@ void lcl_placeWatermarkInHeader(const SfxWatermarkItem& 
rWatermark,
 // Calc the ratio.
 double fRatio = 0;
 
-VclPtr pDevice = VclPtr::Create();
+ScopedVclPtrInstance pDevice;
 vcl::Font aFont = pDevice->GetFont();
 aFont.SetFamilyName(sFont);
 aFont.SetFontSize(Size(0, 96));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 i18npool/source/localedata/data/hu_HU.xml |   30 +-
 1 file changed, 21 insertions(+), 9 deletions(-)

New commits:
commit 61c713bf93a1c585730b97265e2ba7a5a4d09d1d
Author: László Németh 
AuthorDate: Thu Aug 16 13:07:19 2018 +0200
Commit: László Németh 
CommitDate: Thu Aug 16 16:43:10 2018 +0200

tdf#118127 fix date format duplications in Hungarian locale

– by adding and using narrow month names "jan."–"dec." (abbreviated
month names are still Roman numbers for back-compatibility);

– by adding ortographically incorrect, but "interoperable/back-compatible"
  typewriter & Excel format ".M.D.";

– by replacing one of the ". MMM. D." by ". MM. DD.".

Other changes:

– replacing incorrect ". M. D." format with the ortographically
  correct ". MM. DD." format. We keep its long  format for
  back-compatibility. (This system format is visible only on the extra
  page of the Date formatting list, so it's not an annoying duplication.)

– abbreviated eras use non-breaking narrow spaces.

Note: there is also a not so annoying duplication, the "-MM-DD 
HH:MM:SS",
not on the first page of the date list in the dialog window and not in the
XML file, but only on the second page of the date list. For 
back-compatibility,
we keep this format in the XML file.

Change-Id: I4c49d637710295395b75034aa50015a5f3719d89
Reviewed-on: https://gerrit.libreoffice.org/59171
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/i18npool/source/localedata/data/hu_HU.xml 
b/i18npool/source/localedata/data/hu_HU.xml
index 406ef9b124d5..269f1fddf0bc 100644
--- a/i18npool/source/localedata/data/hu_HU.xml
+++ b/i18npool/source/localedata/data/hu_HU.xml
@@ -106,28 +106,28 @@
   # ##0,-- [$Ft-40E];[RED]-# ##0,-- [$Ft-40E]
 
 
-  ". "M". "D.
+  ". "MM". "DD.
 
 
   ". " D.
 
 
-  YY-MM-DD
+  YY.MM.DD.
 
 
-  -MM-DD
+  .MM.DD.
 
 
   YY". "MMM D.
 
 
-  ". "MMM D.
+  ". "MM". "DD.
 
 
   ". "MMM D.
 
 
-  ". " D.
+  ". "M D.
 
 
   ". " D.
@@ -139,7 +139,7 @@
   ". "MMM D., NNN
 
 
-  ". " D., NN
+  ". "M D., NNN
 
 
   ". " D., NNN
@@ -296,7 +296,7 @@
   YY-MM-DD HH:MM
 
 
-  -MM-DD HH:MM:SS
+  .MM.DD. HH:MM:SS
 
   
   
@@ -359,72 +359,84 @@
   jan
   I.
   január
+  jan.
 
 
   feb
   II.
   február
+  febr.
 
 
   mar
   III.
   március
+  márc.
 
 
   apr
   IV.
   április
+  ápr.
 
 
   may
   V.
   május
+  máj.
 
 
   jun
   VI.
   június
+  jún.
 
 
   jul
   VII.
   július
+  júl.
 
 
   aug
   VIII.
   augusztus
+  aug.
 
 
   sep
   IX.
   szeptember
+  szept.
 
 
   oct
   X.
   október
+  okt.
 
 
   nov
   XI.
   november
+  nov.
 
 
   dec
   XII.
   december
+  dec.
 
   
   
 
   bc
-  i. e.
+  i. e.
   i. e.
 
 
   ad
-  i. sz.
+  i. sz.
   i. sz.
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 svtools/source/svrtf/parrtf.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 05cc10da5fe10e712dd6252bbd039856059263af
Author: Caolán McNamara 
AuthorDate: Thu Aug 16 12:29:12 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 16:25:35 2018 +0200

ofz#9691 infinite-loop

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

diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx
index bff4bcacc54e..7360c77ede37 100644
--- a/svtools/source/svrtf/parrtf.cxx
+++ b/svtools/source/svrtf/parrtf.cxx
@@ -174,8 +174,13 @@ int SvRTFParser::GetNextToken_()
 if (!_inSkipGroup) {
 // UPR - overread the group with the ansi
 //   information
-while( '{' != GetNextToken_() )
-;
+int nNextToken;
+do
+{
+nNextToken = GetNextToken_();
+}
+while (nNextToken != '{' && nNextToken != 
sal_Unicode(EOF));
+
 SkipGroup();
 GetNextToken_();  // overread the last bracket
 nRet = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: test/TileCacheTests.cpp

2018-08-16 Thread Libreoffice Gerrit user
 test/TileCacheTests.cpp |   27 ---
 1 file changed, 27 deletions(-)

New commits:
commit 1001f083f13248e2a51c03391f46cc4fef4636f9
Author: Tamás Zolnai 
AuthorDate: Thu Aug 16 16:02:20 2018 +0200
Commit: Tamás Zolnai 
CommitDate: Thu Aug 16 16:02:20 2018 +0200

Remove this test, it just dumps the result instead of assert on that

Change-Id: Id9976d98bbd30cb38cee86b1ff45b96922065d11

diff --git a/test/TileCacheTests.cpp b/test/TileCacheTests.cpp
index dd6fb9714..afff54f55 100644
--- a/test/TileCacheTests.cpp
+++ b/test/TileCacheTests.cpp
@@ -58,7 +58,6 @@ class TileCacheTests : public CPPUNIT_NS::TestFixture
 
 CPPUNIT_TEST(testSimple);
 CPPUNIT_TEST(testSimpleCombine);
-CPPUNIT_TEST(testPerformance);
 CPPUNIT_TEST(testCancelTiles);
 // unstable
 // CPPUNIT_TEST(testCancelTilesMultiView);
@@ -84,7 +83,6 @@ class TileCacheTests : public CPPUNIT_NS::TestFixture
 
 void testSimple();
 void testSimpleCombine();
-void testPerformance();
 void testCancelTiles();
 void testCancelTilesMultiView();
 void testDisconnectMultiView();
@@ -235,31 +233,6 @@ void TileCacheTests::testSimpleCombine()
 CPPUNIT_ASSERT_MESSAGE("did not receive a tile: message as expected", 
!tile2b.empty());
 }
 
-void TileCacheTests::testPerformance()
-{
-std::shared_ptr socket = loadDocAndGetSocket("hello.odt", 
_uri, "performance ");
-
-Poco::Timestamp timestamp;
-for (int x = 0; x < 5; ++x)
-{
-sendTextFrame(socket, "tilecombine part=0 width=256 height=256 
tileposx=0,3840,7680,11520,0,3840,7680,11520 
tileposy=0,0,0,0,3840,3840,3840,3840 tilewidth=3840 tileheight=3840");
-for (int i = 0; i < 8; ++i)
-{
-std::vector tile = getResponseMessage(socket, "tile:", 
"tile-performance ");
-CPPUNIT_ASSERT_MESSAGE("did not receive a tile: message as 
expected", !tile.empty());
-}
-/// Send canceltiles message to clear tiles-on-fly list, otherwise wsd 
waits for tileprocessed messages
-sendTextFrame(socket, "canceltiles");
-}
-
-std::cerr << "Tile rendering roundtrip for 5 x 8 tiles combined: " << 
timestamp.elapsed() / 1000.
-  << " ms. Per-tilecombine: " << timestamp.elapsed() / (1000. * 5)
-  << " ms. Per-tile: " << timestamp.elapsed() / (1000. * 5 * 8) << 
"ms."
-  << std::endl;
-
-socket->shutdown();
-}
-
 void TileCacheTests::testCancelTiles()
 {
 const char* testName = "cancelTiles ";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - configure.ac download.lst external/Module_external.mk external/python33

2018-08-16 Thread Libreoffice Gerrit user
 configure.ac|   33 
 download.lst|7 
 external/Module_external.mk |2 
 external/python33/ExternalPackage_python3.mk|  829 --
 external/python33/ExternalProject_python3.mk|  148 -
 external/python33/GeneratedPackage_python3.mk   |   18 
 external/python33/Makefile  |7 
 external/python33/Module_python33.mk|   24 
 external/python33/README|1 
 external/python33/UnpackedTarball_python3.mk|   61 
 external/python33/clang-cl.patch.0  |   11 
 external/python33/i100492-freebsd.patch.1   |   80 -
 external/python33/python-3.3.0-clang.patch.1|   13 
 external/python33/python-3.3.0-darwin.patch.1   |   85 -
 external/python33/python-3.3.0-gcc-4.8.patch.1  |   15 
 external/python33/python-3.3.0-i42553.patch.2   |   18 
 external/python33/python-3.3.0-msvc-disable.patch.1 |   47 
 external/python33/python-3.3.0-msvc-x64.patch.1 |  289 ---
 external/python33/python-3.3.0-msvc2012.patch.1 |   72 
 external/python33/python-3.3.0-pythreadstate.patch.1|   15 
 external/python33/python-3.3.0-ssl.patch.1  |  208 --
 external/python33/python-3.3.3-aix.patch.1  |  145 -
 external/python33/python-3.3.3-disable-obmalloc.patch.0 |   21 
 external/python33/python-3.3.3-elf-rpath.patch.1|   13 
 external/python33/python-3.3.3-msvc2012-winxp.patch.1   |  117 -
 external/python33/python-3.3.3-py17797.patch.1  |   45 
 external/python33/python-3.3.5-darwin-gnu-xargs.patch.1 |   12 
 external/python33/python-3.3.5-pyexpat-symbols.patch.1  |   28 
 external/python33/python-3.3.5-vs2013.patch.1   |   14 
 external/python33/python-lsan.patch.0   |   19 
 external/python33/python-msvc-disable-sse2.patch.1  |   23 
 external/python33/python-vc2013.patch.1 | 1213 
 external/python33/ubsan.patch.0 |   79 -
 33 files changed, 7 insertions(+), 3705 deletions(-)

New commits:
commit a5f0e613a5b2017c8e9a9373f3c175529d321bb2
Author: David Ostrovsky 
AuthorDate: Sun Jan 22 22:54:44 2017 +0100
Commit: Thorsten Behrens 
CommitDate: Thu Aug 16 15:54:12 2018 +0200

Drop support for MSVC 2013

Reviewed-on: https://gerrit.libreoffice.org/22588
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 84b36c704d73362d4d86dc9e9c0efa0625958347)

Conflicts:
configure.ac
download.lst
external/python33/ExternalPackage_python3.mk
external/python33/ExternalProject_python3.mk
external/python33/Module_python33.mk
external/python33/UnpackedTarball_python3.mk
external/python33/clang-cl.patch.0

Change-Id: Ibf47c9ff7b5fb098e284a58c547b61286264dd80

diff --git a/configure.ac b/configure.ac
index 71775caff9df..00807ded1efe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3299,8 +3299,6 @@ map_vs_year_to_version()
 unset vsversion
 
 case $1 in
-2013)
-vsversion=12.0;;
 2015)
 vsversion=14.0;;
 *)
@@ -3395,7 +3393,7 @@ find_ucrt()
 
 find_msvc()
 {
-# Find Visual C++ 2013/2015
+# Find Visual C++ 2015
 # Args: $1 (optional) : The VS version year
 # Return values: $vctest, $vcyear, $vcnum, $vcnumwithdot
 
@@ -3418,10 +3416,6 @@ find_msvc()
 if test -n "$vctest"; then
 vcnumwithdot=$ver
 case "$vcnumwithdot" in
-12.0)
-vcyear=2013
-vcnum=120
-;;
 14.0)
 vcyear=2015
 vcnum=140
@@ -3447,7 +3441,7 @@ if test "$_os" = "WINNT"; then
 if test -n "$with_visual_studio"; then
 AC_MSG_ERROR([No Visual Studio $with_visual_studio 
installation found])
 else
-AC_MSG_ERROR([No Visual Studio 2013/2015 installation found])
+AC_MSG_ERROR([No Visual Studio 2015 installation found])
 fi
 fi
 
@@ -3515,10 +3509,6 @@ if test "$_os" = "WINNT"; then
 
 # Find the version of devenv.exe
 DEVENV="$VC_PRODUCT_DIR/../Common7/IDE/devenv.exe"
-if test ! -e "$DEVENV" -a "$vcnum" = "120"; then
-# for Visual Studio 2013 Express, fall back
-DEVENV="$VC_PRODUCT_DIR/../Common7/IDE/WDExpress.exe"
-fi
 if test ! -e "$DEVENV"; then
 AC_MSG_ERROR([No devenv.exe found, Visual Studio installation 
broken?])
 fi
@@ -5393,7 +5383,7 @@ find_msms()
 my_msm_file=Microsoft_VC${VCVER}_CRT_x86.msm
 AC_MSG_CHECKING([for $my_msm_file])
 msmdir=
-for ver in 12.0 14.0; do
+for ver in 14.0; do
 reg_get_value_32 
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStu

[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-4-1-6+backports' - 4 commits - download.lst Makefile.fetch python3/i100492-freebsd.patch.1 python3/python-3.3.0-darwin.patch.1 python3/py

2018-08-16 Thread Libreoffice Gerrit user
 Makefile.fetch  |2 
 download.lst|3 
 python3/UnpackedTarball_python3.mk  |   12 --
 python3/i100492-freebsd.patch.1 |   80 -
 python3/python-3.3.0-darwin.patch.1 |   26 
 python3/python-3.3.0-implicit-int.patch.1   |   30 -
 python3/python-3.3.0-msvc-disable.patch.1   |   76 -
 python3/python-3.3.0-msvc-x64.patch.1   |  135 +--
 python3/python-3.3.0-ssl.patch.1|  162 
 python3/python-3.3.3-aix.patch.1|  145 -
 python3/python-3.3.3-msvc2012-winxp.patch.1 |  117 
 python3/python-3.3.3-py17797.patch.1|   73 ++--
 python3/python-3.3.7-py30657.patch.1|   19 +++
 python3/python-msvc-disable-sse2.patch.1|   23 +++
 python3/ubsan.patch.0   |   59 ++
 15 files changed, 273 insertions(+), 689 deletions(-)

New commits:
commit b78c901252ee1cf34b3b7e4f6c0dff2fdeacbbbd
Author: Thorsten Behrens 
AuthorDate: Thu Aug 16 15:36:26 2018 +0200
Commit: Thorsten Behrens 
CommitDate: Thu Aug 16 15:36:26 2018 +0200

python3: Check & prevent integer overflow in PyString_DecodeEscape

Backport from upstream 3.4 / bpo-30657: Fix CVE-2017-1000158

Change-Id: Ic978f7623231ec7e7ca5de992762b17b597ee675

diff --git a/python3/UnpackedTarball_python3.mk 
b/python3/UnpackedTarball_python3.mk
index d012860afb1a..24bfaa673b5f 100644
--- a/python3/UnpackedTarball_python3.mk
+++ b/python3/UnpackedTarball_python3.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
python3/python-3.3.3-msvc2012-winxp.patch.1 \
python3/python-msvc-disable-sse2.patch.1 \
python3/ubsan.patch.0 \
+   python3/python-3.3.7-py30657.patch.1 \
 ))
 
 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
diff --git a/python3/python-3.3.7-py30657.patch.1 
b/python3/python-3.3.7-py30657.patch.1
new file mode 100644
index ..a9d24320f9f6
--- /dev/null
+++ b/python3/python-3.3.7-py30657.patch.1
@@ -0,0 +1,19 @@
+diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
+index 27f406947208..08c91a265adc 100644
+--- a/Objects/bytesobject.c
 b/Objects/bytesobject.c
+@@ -368,7 +368,13 @@ PyObject *PyBytes_DecodeEscape(const char *s,
+ char *p, *buf;
+ const char *end;
+ PyObject *v;
+-Py_ssize_t newlen = recode_encoding ? 4*len:len;
++Py_ssize_t newlen;
++/* Check for integer overflow */
++if (recode_encoding && (len > PY_SSIZE_T_MAX / 4)) {
++PyErr_SetString(PyExc_OverflowError, "string is too large");
++return NULL;
++}
++newlen = recode_encoding ? 4*len:len;
+ v = PyBytes_FromStringAndSize((char *)NULL, newlen);
+ if (v == NULL)
+ return NULL;
commit 9497d77a120ad277af5cde19cecc78645c9e756e
Author: Thorsten Behrens 
AuthorDate: Thu Aug 16 15:23:33 2018 +0200
Commit: Thorsten Behrens 
CommitDate: Thu Aug 16 15:23:33 2018 +0200

python3: update various patches

- take python-3.3.3-msvc2012-winxp.patch.1 from 6.0
- take python-msvc-disable-sse2.patch.1 from 6.0
- take ubsan.patch.0 from 6.0 - longobject.c and listobject.c
  bits apparently fixed upstream already
- update python-3.3.3-py17797.patch.1 from 6.0

Plus remove obsolete VS2008 support, this is cherry-picked from
4ce1cec2a4c98451b8b686f6f7a114a6927f0cae

Change-Id: I1a37e92e9e06a9e66efe6d39234fbe19c2c0c2c6

diff --git a/python3/UnpackedTarball_python3.mk 
b/python3/UnpackedTarball_python3.mk
index 90f1f68d0a98..d012860afb1a 100644
--- a/python3/UnpackedTarball_python3.mk
+++ b/python3/UnpackedTarball_python3.mk
@@ -24,6 +24,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
python3/python-3.3.0-gcc-4.8.patch.1 \
python3/python-3.3.0-pythreadstate.patch.1 \
python3/python-3.3.3-py17797.patch.1 \
+   python3/python-3.3.3-msvc2012-winxp.patch.1 \
+   python3/python-msvc-disable-sse2.patch.1 \
+   python3/ubsan.patch.0 \
 ))
 
 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
diff --git a/python3/python-3.3.3-msvc2012-winxp.patch.1 
b/python3/python-3.3.3-msvc2012-winxp.patch.1
new file mode 100644
index ..2addd4962c07
--- /dev/null
+++ b/python3/python-3.3.3-msvc2012-winxp.patch.1
@@ -0,0 +1,117 @@
+without explicit subsystem set, the linker tries to open a file
+with the name of the comptibility version
+(fatal error LNK1181: cannot open input file ",5.01")
+diff -ur python3.org/PCbuild/_ctypes.vcxproj python3/PCbuild/_ctypes.vcxproj
+--- python3.org/PCbuild/_ctypes.vcxproj2014-05-19 19:06:01.274114800 
+0200
 python3/PCbuild/_ctypes.vcxproj2014-05-19 19:07:13.649079800 +0200
+@@ -174,7 +174,7 @@
+ 
+ 
+   /EXPORT:DllGetClassObject,PRIVATE 
/EXPORT:DllCanUnloadNow,PRIVATE %(Additional

[Libreoffice-commits] core.git: Branch 'private/mst/sw_redlinehide_2' - 5 commits - sw/source

2018-08-16 Thread Libreoffice Gerrit user
 sw/source/core/text/redlnitr.cxx |   16 +---
 sw/source/core/text/txtfrm.cxx   |3 ++-
 sw/source/core/txtnode/ndtxt.cxx |   10 ++
 sw/source/core/undo/undobj.cxx   |   16 ++--
 4 files changed, 35 insertions(+), 10 deletions(-)

New commits:
commit 1fc23737110d2d019a7d1daf9236e703c8a27f60
Author: Michael Stahl 
AuthorDate: Thu Aug 16 15:17:50 2018 +0200
Commit: Michael Stahl 
CommitDate: Thu Aug 16 15:17:50 2018 +0200

sw_redlinehide_2: annoying fixup in CheckParaRedlineMerge()

If the document is edited while redlines are shown, the node merge flags
aren't updated because only CheckParaRedlineMerge() really updates the
flags.

But CheckParaRedlineMerge() knows what the last node of a merge is,
so we can conclude that the next node then isn't merged and needs to
have frames created for it.

Change-Id: Ie9e189a2d9251910c3f5ac98a46867bbe1d91c10

diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index d3b485dc0b94..cd847938b2a3 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -121,6 +121,13 @@ CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & 
rTextNode,
 rTextNode.SetRedlineMergeFlag(SwNode::Merge::None);
 }
 }
+{
+SwNode *const pNextNode(pNode->GetNodes()[pNode->GetIndex() + 1]);
+if (!pNextNode->IsCreateFrameWhenHidingRedlines())
+{   // clear stale flag caused by editing with redlines shown
+pNextNode->SetRedlineMergeFlag(SwNode::Merge::None);
+}
+}
 if (!bHaveRedlines)
 {
 return nullptr;
commit 65bca2ebe49ef06ce93e792ece9e806141787209
Author: Michael Stahl 
AuthorDate: Thu Aug 16 12:55:59 2018 +0200
Commit: Michael Stahl 
CommitDate: Thu Aug 16 15:13:58 2018 +0200

sw: fix 0-length delete redlines in SwUndoSaveSection::SaveSection

The delete redlines aren't restored properly on Undo because they are
squashed into a point by DelBookmarks.

(regression from 6af2caab7271e11d9501fd6a597e05194d33fd10)

Change-Id: I34ea66b5ab0d441c42570e25ea374cb2d0cfc780

diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 74b2f7c7bb27..5afbde167ad2 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -1212,6 +1212,16 @@ void SwUndoSaveSection::SaveSection(
 
 // delete all footnotes, fly frames, bookmarks
 DelContentIndex( *aPam.GetMark(), *aPam.GetPoint() );
+
+// redlines *before* CorrAbs, because DelBookmarks will make them 0-length
+// but *after* DelContentIndex because that also may use FillSaveData (in
+// flys) and that will be restored *after* this one...
+pRedlSaveData.reset( new SwRedlineSaveDatas );
+if (!SwUndo::FillSaveData( aPam, *pRedlSaveData ))
+{
+pRedlSaveData.reset();
+}
+
 {
 // move certain indexes out of deleted range
 SwNodeIndex aSttIdx( aPam.Start()->nNode.GetNode() );
@@ -1220,12 +1230,6 @@ void SwUndoSaveSection::SaveSection(
 SwDoc::CorrAbs( aSttIdx, aEndIdx, SwPosition( aMvStt ), true );
 }
 
-pRedlSaveData.reset( new SwRedlineSaveDatas );
-if( !SwUndo::FillSaveData( aPam, *pRedlSaveData ))
-{
-pRedlSaveData.reset();
-}
-
 nStartPos = rRange.aStart.GetIndex();
 
 --aPam.GetPoint()->nNode;
commit b642ed8fb3151e0dd3c9320ddcb65fa665512f8d
Author: Michael Stahl 
AuthorDate: Thu Aug 16 11:36:50 2018 +0200
Commit: Michael Stahl 
CommitDate: Thu Aug 16 11:36:50 2018 +0200

sqush into fix SplitNode handling of merged frames

Change-Id: Ied95c545cb062432703404401cf1bd3a194028aa

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 00df05638c78..8313a8498219 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -427,6 +427,7 @@ void MoveMergedFlysAndFootnotes(std::vector 
const& rFrames,
 SwTextNode *SwTextNode::SplitContentNode(const SwPosition & rPos,
 std::function const*const 
pContentIndexRestore)
 {
+bool isHide(false);
 SwNode::Merge const eOldMergeFlag(GetRedlineMergeFlag());
 bool parentIsOutline = IsOutline();
 
@@ -551,6 +552,10 @@ SwTextNode *SwTextNode::SplitContentNode(const SwPosition 
& rPos,
 for (SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = 
aIter.Next())
 {
 frames.push_back(pFrame);
+if (pFrame->getRootFrame()->IsHideRedlines())
+{
+isHide = true;
+}
 }
 for (SwTextFrame * pFrame : frames)
 {
@@ -669,6 +674,10 @@ SwTextNode *SwTextNode::SplitContentNode(const SwPosition 
& rPos,
 for (SwTextFrame * pFrame = aIter.First(); pFrame; pFrame = 
aIter.Next())
 {
 frames.push_back(pFrame);
+if (pFrame->getRootFrame()->IsHideRedlines())
+{
+isHide 

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

2018-08-16 Thread Libreoffice Gerrit user
 sw/source/core/doc/doc.cxx |   49 +
 1 file changed, 32 insertions(+), 17 deletions(-)

New commits:
commit c883d5e073d2ac5b2d55126c929d7bf3e6d295e8
Author: Mike Kaganski 
AuthorDate: Thu Aug 16 13:56:07 2018 +0300
Commit: Mike Kaganski 
CommitDate: Thu Aug 16 15:06:22 2018 +0200

tdf#119294: reimplement fix for tdf#118859

When removing paragraphs with mail mere fields, both field type reference
and node reference could get invalid, because field type will be destroyed
when its last field is gone; and node will be destroyed if it is in a fly
with anchor in another node which gets destroyed.

To avoid use-after-delete, we will use an SwClient on field types, thus
detecting if a collected field type got destroyed; iterating over fields
using SwIterator is safe, because removing a node with fields would update
the iterator.

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

diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index ddcb1734f5a7..c98ea37d955a 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -45,6 +45,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -123,7 +124,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -1341,8 +1341,9 @@ void RemoveOrDeleteContents(SwTextNode* pTextNd, 
IDocumentContentOperations& xOp
 xOperations.DelFullPara(aPam);
 }
 }
-// Returns the node pointer which needs to hide, or nullptr if this field does 
not hide a node
-SwTextNode* HandleHidingField(SwFormatField& rFormatField, const SwNodes& 
rNodes)
+// Returns if the data was actually modified
+bool HandleHidingField(SwFormatField& rFormatField, const SwNodes& rNodes,
+   IDocumentContentOperations& xOperations)
 {
 SwTextNode* pTextNd;
 if (rFormatField.GetTextField()
@@ -1350,9 +1351,10 @@ SwTextNode* HandleHidingField(SwFormatField& 
rFormatField, const SwNodes& rNodes
 && pTextNd->GetpSwpHints() && pTextNd->IsHiddenByParaField()
 && &pTextNd->GetNodes() == &rNodes)
 {
-return pTextNd;
+RemoveOrDeleteContents(pTextNd, xOperations);
+return true;
 }
-return nullptr;
+return false;
 }
 }
 
@@ -1391,25 +1393,38 @@ bool SwDoc::RemoveInvisibleContent()
 GetIDocumentUndoRedo().StartUndo( SwUndoId::UI_DELETE_INVISIBLECNTNT, 
nullptr );
 
 {
+class FieldTypeGuard : public SwClient
+{
+public:
+explicit FieldTypeGuard(SwFieldType* pType)
+: SwClient(pType)
+{
+}
+const SwFieldType* get() const
+{
+return static_cast(GetRegisteredIn());
+}
+};
 // Removing some nodes for one SwFieldIds::Database type might remove 
the type from
-// document's field types, or try to remove already removed nodes, 
invalidating iterators.
-// So, we need to create own list of nodes prior to removing them.
-std::set aHiddenNodes;
-for (const auto* pType : *getIDocumentFieldsAccess().GetFieldTypes())
+// document's field types, invalidating iterators. So, we need to 
create own list of
+// matching types prior to processing them.
+std::vector> aHidingFieldTypes;
+for (SwFieldType* pType : *getIDocumentFieldsAccess().GetFieldTypes())
 {
 if (FieldCanHidePara(pType->Which()))
+
aHidingFieldTypes.push_back(o3tl::make_unique(pType));
+}
+for (const auto& pTypeGuard : aHidingFieldTypes)
+{
+if (const SwFieldType* pType = pTypeGuard->get())
 {
 SwIterator aIter(*pType);
-for (auto* pField = aIter.First(); pField; pField = 
aIter.Next())
-if (SwTextNode* pHiddenNode = HandleHidingField(*pField, 
GetNodes()))
-aHiddenNodes.insert(pHiddenNode);
+for (SwFormatField* pFormatField = aIter.First(); pFormatField;
+ pFormatField = aIter.Next())
+bRet |= HandleHidingField(*pFormatField, GetNodes(),
+  getIDocumentContentOperations());
 }
 }
-for (SwTextNode* pHiddenNode : aHiddenNodes)
-{
-bRet = true;
-RemoveOrDeleteContents(pHiddenNode, 
getIDocumentContentOperations());
-}
 }
 
 // Remove any hidden paragraph (hidden text attribute)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: formula/source include/formula include/tools reportdesign/inc sc/inc sc/source solenv/clang-format sw/inc sw/source tools/Library_tl.mk tools/source

2018-08-16 Thread Libreoffice Gerrit user
 formula/source/core/api/token.cxx  |   11 ---
 include/formula/token.hxx  |9 --
 include/tools/mempool.hxx  |   93 -
 reportdesign/inc/pch/precompiled_rptui.hxx |1 
 sc/inc/chgtrack.hxx|8 --
 sc/inc/compiler.hxx|2 
 sc/inc/formulacell.hxx |2 
 sc/inc/token.hxx   |5 -
 sc/source/core/data/formulacell.cxx|2 
 sc/source/core/inc/interpre.hxx|3 
 sc/source/core/tool/chgtrack.cxx   |8 --
 sc/source/core/tool/interpr1.cxx   |3 
 sc/source/core/tool/token.cxx  |8 --
 sc/source/filter/excel/xestyle.cxx |4 -
 sc/source/filter/excel/xetable.cxx |   12 ---
 sc/source/filter/excel/xistyle.cxx |2 
 sc/source/filter/inc/xestyle.hxx   |1 
 sc/source/filter/inc/xetable.hxx   |   13 
 sc/source/filter/inc/xistyle.hxx   |3 
 solenv/clang-format/blacklist  |2 
 sw/inc/frmfmt.hxx  |4 -
 sw/inc/ndhints.hxx |3 
 sw/inc/ndtxt.hxx   |2 
 sw/inc/node.hxx|5 -
 sw/inc/pam.hxx |3 
 sw/inc/pch/precompiled_msword.hxx  |1 
 sw/inc/pch/precompiled_swui.hxx|1 
 sw/inc/pch/precompiled_vbaswobj.hxx|1 
 sw/inc/swatrset.hxx|4 -
 sw/inc/swcrsr.hxx  |2 
 sw/inc/swtable.hxx |3 
 sw/inc/swtblfmt.hxx|9 --
 sw/inc/unocrsr.hxx |2 
 sw/inc/viscrs.hxx  |2 
 sw/source/core/bastyp/swtypes.cxx  |   28 
 sw/source/core/inc/UndoDelete.hxx  |3 
 sw/source/core/inc/UndoInsert.hxx  |3 
 sw/source/core/inc/bodyfrm.hxx |3 
 sw/source/core/inc/cellfrm.hxx |2 
 sw/source/core/inc/colfrm.hxx  |3 
 sw/source/core/inc/fntcache.hxx|3 
 sw/source/core/inc/frmtool.hxx |2 
 sw/source/core/inc/hffrm.hxx   |5 -
 sw/source/core/inc/pagefrm.hxx |3 
 sw/source/core/inc/rowfrm.hxx  |4 -
 sw/source/core/inc/sectfrm.hxx |3 
 sw/source/core/inc/swfntcch.hxx|4 -
 sw/source/core/inc/tabfrm.hxx  |3 
 sw/source/core/inc/txtfrm.hxx  |4 -
 sw/source/core/layout/atrfrm.cxx   |   13 
 sw/source/core/text/porlay.hxx |4 -
 sw/source/core/text/portxt.hxx |6 -
 sw/source/core/text/txtcache.hxx   |3 
 sw/source/core/text/txtinit.cxx|6 -
 sw/source/core/unocore/unocrsr.cxx |2 
 tools/Library_tl.mk|1 
 tools/source/memtools/mempool.cxx  |   52 
 57 files changed, 1 insertion(+), 393 deletions(-)

New commits:
commit 346ba4bedaaa5fa6a7b76687b749959814685846
Author: Noel Grandin 
AuthorDate: Fri Aug 3 19:01:38 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 15:02:27 2018 +0200

remove mempool

we've been using the normal memory allocator instead of the sal slab
allocator ever since
commit bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9
Date:   Wed Nov 15 16:52:44 2017 +0530
Disable custom allocator

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

diff --git a/formula/source/core/api/token.cxx 
b/formula/source/core/api/token.cxx
index aa98a4e56bdb..d66204590e67 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -40,17 +40,6 @@ namespace formula
 {
 using namespace com::sun::star;
 
-// Align MemPools on 4k boundaries - 64 bytes (4k is a MUST for OS/2)
-
-// Need a lot of FormulaDoubleToken
-IMPL_FIXEDMEMPOOL_NEWDEL_DLL( FormulaDoubleToken )
-// Need quite some FormulaTypedDoubleToken
-IMPL_FIXEDMEMPOOL_NEWDEL_DLL( FormulaTypedDoubleToken )
-// Need a lot of FormulaByteToken
-IMPL_FIXEDMEMPOOL_NEWDEL_DLL( FormulaByteToken )
-// Need several FormulaStringToken
-IMPL_FIXEDMEMPOOL_NEWDEL_DLL( FormulaStringToken )
-
 
 // --- helpers --
 
diff --git a/include/formula/token.hxx b/include/formula/token.hxx
index 6d2851e4edfe..bd33935cbf26 100644
--- a/include/formula/token.hxx
+++ b/include/formula/token.hxx
@@ -35,7 +35,6 @@
 #include 
 #include 
 #include 
-#include 
 
 class ScJumpMatrix;
 class ScMatrix;
@@ -258,8 +257,6 @@ public:
 virtual ParamClass  GetInForceArray() const override;
 virtual voidSetInForceArray( ParamClass c ) override;
 virtual bool 

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

2018-08-16 Thread Libreoffice Gerrit user
 include/svx/svdobj.hxx  |3 +
 sd/source/ui/view/sdview.cxx|8 +--
 svx/source/svdraw/svdotextdecomposition.cxx |   59 +++-
 3 files changed, 39 insertions(+), 31 deletions(-)

New commits:
commit 3ec86ad77071af577f37a83a0b1d0389b2204716
Author: Caolán McNamara 
AuthorDate: Thu Aug 16 12:04:48 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 15:00:56 2018 +0200

tdf#119284 bg for automatic not set while editing

refactor and reuse fdo#35779 solution for this case

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

diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 1d112cc3841e..d01031c40112 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -43,6 +43,7 @@ class SfxBroadcaster;
 class Pointer;
 class AutoTimer;
 class OutlinerParaObject;
+class Outliner;
 class SdrOutliner;
 class SdrDragStat;
 class SdrHdl;
@@ -918,6 +919,8 @@ public:
 
 const css::uno::WeakReference< css::uno::XInterface >& getWeakUnoShape() 
const { return maWeakUnoShape; }
 
+void setSuitableOutlinerBg(Outliner& rOutliner) const;
+
 protected:
 tools::RectangleaOutRect; // surrounding rectangle for 
Paint (incl. LineWdt, ...)
 Point   aAnchor;  // anchor position (Writer)
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index bbb5d417422f..527c1e06f2a1 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -715,18 +715,18 @@ bool View::SdrBeginTextEdit(
 
 if (::Outliner* pOL = bReturn ? GetTextEditOutliner() : nullptr)
 {
-if (pObj && pObj->getSdrPageFromSdrObject())
+if (pObj)
 {
-Color aBackground;
 if( pObj->GetObjInventor() == SdrInventor::Default && 
pObj->GetObjIdentifier() == OBJ_TABLE )
 {
+Color aBackground;
 aBackground = GetTextEditBackgroundColor(*this);
+pOL->SetBackgroundColor( aBackground  );
 }
 else
 {
-aBackground = 
pObj->getSdrPageFromSdrObject()->GetPageBackgroundColor(pPV);
+pObj->setSuitableOutlinerBg(*pOL);
 }
-pOL->SetBackgroundColor( aBackground  );
 }
 
 pOL->SetParaInsertedHdl(LINK(this, View, OnParagraphInsertedHdl));
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx 
b/svx/source/svdraw/svdotextdecomposition.cxx
index 70f23a4e5974..5a79e8818b6d 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -852,6 +852,37 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive(
 rTarget = aConverter.getPrimitive2DSequence();
 }
 
+// Resolves: fdo#35779 set background color of this shape as the editeng 
background if there
+// is one. Check the shape itself, then the host page, then that page's master 
page.
+void SdrObject::setSuitableOutlinerBg(::Outliner& rOutliner) const
+{
+const SfxItemSet* pBackgroundFillSet = &GetObjectItemSet();
+
+if (drawing::FillStyle_NONE == 
pBackgroundFillSet->Get(XATTR_FILLSTYLE).GetValue())
+{
+SdrPage* pOwnerPage(getSdrPageFromSdrObject());
+if (pOwnerPage)
+{
+pBackgroundFillSet = 
&pOwnerPage->getSdrPageProperties().GetItemSet();
+
+if (drawing::FillStyle_NONE == 
pBackgroundFillSet->Get(XATTR_FILLSTYLE).GetValue())
+{
+if (!pOwnerPage->IsMasterPage() && 
pOwnerPage->TRG_HasMasterPage())
+{
+pBackgroundFillSet = 
&pOwnerPage->TRG_GetMasterPage().getSdrPageProperties().GetItemSet();
+}
+}
+}
+}
+
+if (drawing::FillStyle_NONE != 
pBackgroundFillSet->Get(XATTR_FILLSTYLE).GetValue())
+{
+Color aColor(rOutliner.GetBackgroundColor());
+GetDraftFillColor(*pBackgroundFillSet, aColor);
+rOutliner.SetBackgroundColor(aColor);
+}
+}
+
 void SdrTextObj::impDecomposeBlockTextPrimitive(
 drawinglayer::primitive2d::Primitive2DContainer& rTarget,
 const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& 
rSdrBlockTextPrimitive,
@@ -882,35 +913,9 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
 rOutliner.SetMinAutoPaperSize(aNullSize);
 rOutliner.SetMaxAutoPaperSize(Size(100,100));
 
-// Resolves: fdo#35779 set background color of this shape as the editeng 
background if there
-// is one. Check the shape itself, then the host page, then that page's 
master page.
 // That color needs to be restored on leaving this method
 Color aOriginalBackColor(rOutliner.GetBackgroundColor());
-const SfxItemSet* pBackgroundFillSet = &GetObjectItemSet();
-
-if (drawing::FillStyle_NONE == 
pBackgroundFi

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

2018-08-16 Thread Libreoffice Gerrit user
 sd/source/ui/view/sdview.cxx |   16 +---
 1 file changed, 5 insertions(+), 11 deletions(-)

New commits:
commit e75a01f4a00fdafad918099b90d1ca79224b4dca
Author: Caolán McNamara 
AuthorDate: Thu Aug 16 11:47:20 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 15:00:42 2018 +0200

these only get used if pOL is non-null

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

diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 4ca098bde258..bbb5d417422f 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -713,11 +713,9 @@ bool View::SdrBeginTextEdit(
 }
 }
 
-if (bReturn)
+if (::Outliner* pOL = bReturn ? GetTextEditOutliner() : nullptr)
 {
-::Outliner* pOL = GetTextEditOutliner();
-
-if( pObj && pObj->getSdrPageFromSdrObject() )
+if (pObj && pObj->getSdrPageFromSdrObject())
 {
 Color aBackground;
 if( pObj->GetObjInventor() == SdrInventor::Default && 
pObj->GetObjIdentifier() == OBJ_TABLE )
@@ -728,15 +726,11 @@ bool View::SdrBeginTextEdit(
 {
 aBackground = 
pObj->getSdrPageFromSdrObject()->GetPageBackgroundColor(pPV);
 }
-if (pOL != nullptr)
-pOL->SetBackgroundColor( aBackground  );
+pOL->SetBackgroundColor( aBackground  );
 }
 
-if (pOL != nullptr)
-{
-pOL->SetParaInsertedHdl(LINK(this, View, OnParagraphInsertedHdl));
-pOL->SetParaRemovingHdl(LINK(this, View, OnParagraphRemovingHdl));
-}
+pOL->SetParaInsertedHdl(LINK(this, View, OnParagraphInsertedHdl));
+pOL->SetParaRemovingHdl(LINK(this, View, OnParagraphRemovingHdl));
 }
 
 if (bMasterPage && bReturn && pOutl)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2018-08-16 Thread Libreoffice Gerrit user
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3fdbd214fbdc4f9d1c8b2b8b09d175538d3c68e6
Author: Jan Holesovsky 
AuthorDate: Thu Aug 16 09:31:10 2018 +0200
Commit: Gerrit Code Review 
CommitDate: Thu Aug 16 14:42:52 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  - Generate the modules dropdown content on demand too.

Change-Id: Ibcbd8faac4f31d41398d8ae98314d83690136ab6
Reviewed-on: https://gerrit.libreoffice.org/59152
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/59153
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index c8a4b91e10c8..f0e9b27d338a 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit c8a4b91e10c89167a272f46966ac9c09bed8e711
+Subproject commit f0e9b27d338a12bb5c7631f3c935ba9969bd7db3
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: help3xsl/help2.js help3xsl/online_transform.xsl

2018-08-16 Thread Libreoffice Gerrit user
 help3xsl/help2.js |   17 +
 help3xsl/online_transform.xsl |   13 ++---
 2 files changed, 19 insertions(+), 11 deletions(-)

New commits:
commit f0e9b27d338a12bb5c7631f3c935ba9969bd7db3
Author: Jan Holesovsky 
AuthorDate: Thu Aug 16 09:31:10 2018 +0200
Commit: Olivier Hallot 
CommitDate: Thu Aug 16 14:42:52 2018 +0200

Generate the modules dropdown content on demand too.

Change-Id: Ibcbd8faac4f31d41398d8ae98314d83690136ab6
Reviewed-on: https://gerrit.libreoffice.org/59152
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/59153
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/help3xsl/help2.js b/help3xsl/help2.js
index 501a754a9..505dcaf8e 100644
--- a/help3xsl/help2.js
+++ b/help3xsl/help2.js
@@ -138,6 +138,23 @@ function existingLang(lang) {
 return 'en-US';
 }
 
+function setupModules(target, lang) {
+var modulesNav = document.getElementById('modules-nav');
+if (!modulesNav.classList.contains('loaded')) {
+var html =
+'Writer' +
+'Calc' +
+'Impress' +
+'Draw' +
+'Base' +
+'Math' +
+'Chart' +
+'Basic';
+modulesNav.innerHTML = html;
+modulesNav.classList.add('loaded');
+}
+}
+
 function setupLanguages(target, page) {
 var langNav = document.getElementById('langs-nav');
 if (!langNav.classList.contains('loaded')) {
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index c98dff418..b3b5ce140 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -174,18 +174,9 @@
 
 
 
-
+
 
-
-Writer
-Calc
-Impress
-Draw
-Base
-Math
-Chart
-Basic
-
+   
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 connectivity/source/commontools/DriversConfig.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit c957c5a4a0d3f621087b6dab468caaa4ed1a3e39
Author: Xisco Faulí 
AuthorDate: Thu Aug 16 10:30:47 2018 +0200
Commit: Miklos Vajna 
CommitDate: Thu Aug 16 14:42:02 2018 +0200

Revert "tdf#118751: Revert "tdf#117081: show Firebird by default""

This reverts commit 88abae93c5e0a030eca36d7e33909ad52e1c71a2.

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

diff --git a/connectivity/source/commontools/DriversConfig.cxx 
b/connectivity/source/commontools/DriversConfig.cxx
index a6b78b0d0330..380fe321930b 100644
--- a/connectivity/source/commontools/DriversConfig.cxx
+++ b/connectivity/source/commontools/DriversConfig.cxx
@@ -18,7 +18,6 @@
  */
 #include 
 #include 
-#include 
 #include 
 
 using namespace connectivity;
@@ -103,8 +102,6 @@ const TInstalledDrivers& 
DriversConfigImpl::getInstalledDrivers(const uno::Refer
 
 if ( m_aInstalled.isValid() )
 {
-SvtMiscOptions aMiscOptions;
-
 const uno::Sequence< OUString > aURLPatterns = 
m_aInstalled.getNodeNames();
 const OUString* pPatternIter = aURLPatterns.getConstArray();
 const OUString* pPatternEnd  = pPatternIter + 
aURLPatterns.getLength();
@@ -112,9 +109,7 @@ const TInstalledDrivers& 
DriversConfigImpl::getInstalledDrivers(const uno::Refer
 {
 TInstalledDriver aInstalledDriver;
 
lcl_readURLPatternNode(m_aInstalled,*pPatternIter,aInstalledDriver);
-if ( !aInstalledDriver.sDriverFactory.isEmpty() &&
- ( aMiscOptions.IsExperimentalMode() ||
-   aInstalledDriver.sDriverFactory != 
"com.sun.star.comp.sdbc.firebird.Driver" ))
+if ( !aInstalledDriver.sDriverFactory.isEmpty() )
 m_aDrivers.emplace(*pPatternIter,aInstalledDriver);
 }
 } // if ( m_aInstalled.isValid() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 editeng/source/items/numitem.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f5f4f6cfc300e923ddf13f1452da829244d10801
Author: Stephan Bergmann 
AuthorDate: Thu Aug 16 11:14:50 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 16 14:37:49 2018 +0200

Adapt cast

...to 0d227c96e11d7d03829144183bc66d229e059a4b "SvxNumberFormat::nAbsLSpace
should have a larger type", from which this was accidentally missing

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

diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 0001e6f1af6f..f85c4aec9855 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -450,7 +450,7 @@ sal_Int32 SvxNumberFormat::GetAbsLSpace() const
 {
 return mePositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
? nAbsLSpace
-   : static_cast( GetFirstLineIndent() + GetIndentAt() );
+   : static_cast( GetFirstLineIndent() + GetIndentAt() );
 }
 short SvxNumberFormat::GetFirstLineOffset() const
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 source/text/simpress/01/05250600.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c8a4b91e10c89167a272f46966ac9c09bed8e711
Author: Andrea Gelmini 
AuthorDate: Wed Aug 15 14:26:15 2018 +0200
Commit: Olivier Hallot 
CommitDate: Thu Aug 16 14:05:47 2018 +0200

Fix typo: s/an other/another/g

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

diff --git a/source/text/simpress/01/05250600.xhp 
b/source/text/simpress/01/05250600.xhp
index f172adb60..d53c02c51 100644
--- a/source/text/simpress/01/05250600.xhp
+++ b/source/text/simpress/01/05250600.xhp
@@ -42,7 +42,7 @@
 
   
 
-Select the 
object(s) that you want to move behind an other object. Right-click and choose 
Arrange - Behind Object, and then click an object in your 
slide.
+Select the 
object(s) that you want to move behind another object. Right-click and choose 
Arrange - Behind Object, and then click an object in your 
slide.
 Arranging objects affects the stacking order of all objects in your 
document. 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2018-08-16 Thread Libreoffice Gerrit user
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 213df3f22afc4d65bf5b426def641fa1d54e8548
Author: Andrea Gelmini 
AuthorDate: Wed Aug 15 14:26:15 2018 +0200
Commit: Gerrit Code Review 
CommitDate: Thu Aug 16 14:05:47 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  - Fix typo: s/an other/another/g

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

diff --git a/helpcontent2 b/helpcontent2
index 9f22fa7cf557..c8a4b91e10c8 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 9f22fa7cf557ef87ec61372c9e7743d04bbd5725
+Subproject commit c8a4b91e10c89167a272f46966ac9c09bed8e711
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: external/breakpad

2018-08-16 Thread Libreoffice Gerrit user
 
external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8cde5d96a2172acfa748235186e700029de62ee1
Author: Stephan Bergmann 
AuthorDate: Thu Aug 16 13:59:43 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 16 13:59:43 2018 +0200

Adapt external/breakpad/0001-Handle-race-between-ExceptionHandler...

to old compilers that default to < C++11.  (Explicitly passing 
CXXFLAGS_CXX11
into ExternalProject_breakpad wouldn't work well for now, as it would cause
-Wregister error with -std=c++17 at
workdir/UnpackedTarball/breakpad/src/common/dwarf/dwarf2reader.cc:878:43.)

Change-Id: I1d04e0f05e36e2f9622991fb477f430a062fee0b

diff --git 
a/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
 
b/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
index a88c2cdd32bb..00762650f5f5 100644
--- 
a/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
+++ 
b/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
@@ -21,7 +21,7 @@ index b895f6d7..4d58e510 100644
bool handled = false;
 -  for (int i = g_handler_stack_->size() - 1; !handled && i >= 0; --i) {
 -handled = (*g_handler_stack_)[i]->HandleSignal(sig, info, uc);
-+  if (g_handler_stack_ != nullptr) {
++  if (g_handler_stack_ != NULL) {
 +for (int i = g_handler_stack_->size() - 1; !handled && i >= 0; --i) {
 +  handled = (*g_handler_stack_)[i]->HandleSignal(sig, info, uc);
 +}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2018-08-16 Thread Libreoffice Gerrit user
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4fa448b79c60f38254be4c4db4942935c992931e
Author: Jan Holesovsky 
AuthorDate: Thu Aug 16 08:58:09 2018 +0200
Commit: Gerrit Code Review 
CommitDate: Thu Aug 16 13:52:05 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  - Translate the language names in JS.

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

diff --git a/helpcontent2 b/helpcontent2
index 7f21cd8b7c02..9f22fa7cf557 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 7f21cd8b7c0296b13472b42a73239691c98c92b6
+Subproject commit 9f22fa7cf557ef87ec61372c9e7743d04bbd5725
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: AllLangPackage_html_lang.mk CustomTarget_html.mk help3xsl/help2.js help3xsl/online_transform.xsl source/text

2018-08-16 Thread Libreoffice Gerrit user
 AllLangPackage_html_lang.mk |1 
 CustomTarget_html.mk|   20 ++
 help3xsl/help2.js   |2 
 help3xsl/online_transform.xsl   |9 -
 source/text/shared/help/browserhelp.xhp |  260 
 5 files changed, 90 insertions(+), 202 deletions(-)

New commits:
commit 9f22fa7cf557ef87ec61372c9e7743d04bbd5725
Author: Jan Holesovsky 
AuthorDate: Thu Aug 16 08:58:09 2018 +0200
Commit: Olivier Hallot 
CommitDate: Thu Aug 16 13:52:05 2018 +0200

Translate the language names in JS.

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

diff --git a/AllLangPackage_html_lang.mk b/AllLangPackage_html_lang.mk
index 9be268d86..d0b436f84 100644
--- a/AllLangPackage_html_lang.mk
+++ b/AllLangPackage_html_lang.mk
@@ -15,6 +15,7 @@ $(eval $(call 
gb_AllLangPackage_add_files,helpcontent2_html_lang,$(LIBO_SHARE_HE
$(foreach lang,$(gb_HELP_LANGS),\
$(lang)/bookmarks.js \
$(lang)/contents.js \
+   $(lang)/langnames.js \
) \
 ))
 
diff --git a/CustomTarget_html.mk b/CustomTarget_html.mk
index ad383a008..00c6c7e2e 100644
--- a/CustomTarget_html.mk
+++ b/CustomTarget_html.mk
@@ -21,6 +21,7 @@ $(eval $(call 
gb_CustomTarget_register_targets,helpcontent2/help3xsl,\
$(lang)/bookmarks.js \
$(lang)/contents.js \
$(lang)/html.text \
+   $(lang)/langnames.js \
$(foreach 
module,$(html_TREE_MODULES),$(module)/$(lang)/contents.part) \
$(foreach module,$(html_BMARK_MODULES),$(firstword $(subst :, 
,$(module)))/$(lang)/bookmarks.part) \
$(foreach 
module,$(html_TEXT_MODULES),filelists/html-help/$(module)/$(lang).filelist) \
@@ -47,6 +48,7 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/hid2file.js : \
) > $@ \
)
 
+# set of installed languages - has to be language independent
 $(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/languages.js : \
$(SRCDIR)/helpcontent2/CustomTarget_html.mk
( \
@@ -55,6 +57,24 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/languages.js : \
echo ']);' \
) > $@
 
+define html_gen_langnames_js_dep
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/$(1)/langnames.js : \
+   $(if $(filter en-US,$(1)),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$(1)))/helpcontent2/source/text/shared/help/browserhelp.xhp
+
+endef
+
+$(eval $(foreach lang,$(gb_HELP_LANGS),$(call 
html_gen_langnames_js_dep,$(lang
+
+# names of the languages - has to be translated, ie. per language
+$(call gb_CustomTarget_get_workdir,helpcontent2/help3xsl)/%/langnames.js : \
+   $(SRCDIR)/helpcontent2/CustomTarget_html.mk
+   ( \
+   echo 'var languageNames = {' ; \
+   grep ']*id="lang_' $(if $(filter 
en-US,$*),$(SRCDIR),$(call 
gb_HelpTranslatePartTarget_get_workdir,$*))/helpcontent2/source/text/shared/help/browserhelp.xhp
 | \
+   sed -e 's/^.*]*>\([^<]*\)<.*$$/"\1": "\2",/' ; \
+   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))
diff --git a/help3xsl/help2.js b/help3xsl/help2.js
index 15a744ddb..501a754a9 100644
--- a/help3xsl/help2.js
+++ b/help3xsl/help2.js
@@ -143,7 +143,7 @@ function setupLanguages(target, page) {
 if (!langNav.classList.contains('loaded')) {
 var html = '';
 languagesSet.forEach(lang => {
-html += '' + lang + '';
+html += '' + ((lang in 
languageNames)? languageNames[lang]: lang) + '';
 });
 langNav.innerHTML = html;
 langNav.classList.add('loaded');
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index f9541ec72..c98dff418 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -152,6 +152,7 @@
 
 
 
+
 
 
 
@@ -190,13 +191,7 @@
 
 
 
-
-
-
+
 
 
 
diff --git a/source/text/shared/help/browserhelp.xhp 
b/source/text/shared/help/browserhelp.xhp
index f6c7ffabc..31179a5a6 100644
--- a/source/text/shared/help/browserhelp.xhp
+++ b/source/text/shared/help/browserhelp.xhp
@@ -26,199 +26,71 @@
 Select 
Module
 Select 
Language
 Search help 
contents
-
-
-English (USA)
-
-
-Amharic
-
-
-  

[Libreoffice-commits] help.git: help3xsl/help2.js help3xsl/online_transform.xsl

2018-08-16 Thread Libreoffice Gerrit user
 help3xsl/help2.js |   12 
 help3xsl/online_transform.xsl |   11 ++-
 2 files changed, 18 insertions(+), 5 deletions(-)

New commits:
commit 7f21cd8b7c0296b13472b42a73239691c98c92b6
Author: Jan Holesovsky 
AuthorDate: Wed Aug 15 10:27:02 2018 +0200
Commit: Olivier Hallot 
CommitDate: Thu Aug 16 13:51:41 2018 +0200

Don't embed links to all the languages into every page.

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

diff --git a/help3xsl/help2.js b/help3xsl/help2.js
index aed610371..15a744ddb 100644
--- a/help3xsl/help2.js
+++ b/help3xsl/help2.js
@@ -137,4 +137,16 @@ function existingLang(lang) {
 
 return 'en-US';
 }
+
+function setupLanguages(target, page) {
+var langNav = document.getElementById('langs-nav');
+if (!langNav.classList.contains('loaded')) {
+var html = '';
+languagesSet.forEach(lang => {
+html += '' + lang + '';
+});
+langNav.innerHTML = html;
+langNav.classList.add('loaded');
+}
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index ec1d30c31..f9541ec72 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -150,7 +150,8 @@
 
 
 
-   
+
+
 
 
 
@@ -187,14 +188,14 @@
 
 
 
-
+
 
-
-
+
+
 
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2018-08-16 Thread Libreoffice Gerrit user
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d46ae4c645d1e6d7f7d3dae7ce3e4c15de10f452
Author: Jan Holesovsky 
AuthorDate: Wed Aug 15 10:27:02 2018 +0200
Commit: Gerrit Code Review 
CommitDate: Thu Aug 16 13:51:41 2018 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  - Don't embed links to all the languages into every page.

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

diff --git a/helpcontent2 b/helpcontent2
index 5ccfc30b1366..7f21cd8b7c02 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 5ccfc30b13663a52686cd040cb574bc0c0dc652c
+Subproject commit 7f21cd8b7c0296b13472b42a73239691c98c92b6
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 include/vcl/outdev.hxx |3 +
 include/vcl/vcllayout.hxx  |   57 -
 vcl/inc/sallayout.hxx  |   55 +--
 vcl/source/gdi/CommonSalLayout.cxx |5 +++
 vcl/source/gdi/sallayout.cxx   |6 +++
 vcl/source/outdev/text.cxx |3 +
 6 files changed, 74 insertions(+), 55 deletions(-)

New commits:
commit 88e601188c6902769e0c8f2ecfd2ade5c4f27703
Author: Miklos Vajna 
AuthorDate: Thu Aug 16 12:13:18 2018 +0200
Commit: Miklos Vajna 
CommitDate: Thu Aug 16 13:50:25 2018 +0200

vcl: introduce a SalLayoutFlags::GlyphItemsOnly

OutputDevice::ImplLayout() does a number of things: first it calls the
expensive SalLayout::LayoutText(), then it does a number of remaing
tweaks to the resulting SalLayout based on the rLogicalPos and pDXArray
parameters.

This means that the resulting layout is not easy to reuse for Writer
purposes, as it typically operates with the same text multiple times,
but with different LogicalPos/DXArray.

Add a new flag that returns the glyph items early, with the hope that
this way the result only depends on the output device state and the
string only, nothing else.

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

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 471d9a39fa0e..fe9af36994b8 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -142,10 +142,11 @@ enum class SalLayoutFlags
 SubstituteDigits= 0x0400,
 KashidaJustification= 0x0800,
 ForFallback = 0x2000,
+GlyphItemsOnly  = 0x4000,
 };
 namespace o3tl
 {
-template<> struct typed_flags : 
is_typed_flags {};
+template<> struct typed_flags : 
is_typed_flags {};
 }
 
 typedef std::vector< tools::Rectangle > MetricVector;
diff --git a/include/vcl/vcllayout.hxx b/include/vcl/vcllayout.hxx
index d9d4e0c42b99..ac61892fb415 100644
--- a/include/vcl/vcllayout.hxx
+++ b/include/vcl/vcllayout.hxx
@@ -21,6 +21,7 @@
 #define INCLUDED_VCL_VCLLAYOUT_HXX
 
 #include 
+#include 
 
 #include 
 #include 
@@ -30,12 +31,65 @@
 class ImplLayoutArgs;
 class PhysicalFontFace;
 class SalGraphics;
-struct GlyphItem;
 namespace vcl
 {
 class TextLayoutCache;
 }
 
+typedef sal_uInt16 sal_GlyphId;
+
+struct VCL_DLLPUBLIC GlyphItem
+{
+int mnFlags;
+int mnCharPos;  // index in string
+int mnCharCount;// number of characters making up this glyph
+
+int mnOrigWidth;// original glyph width
+int mnNewWidth; // width after adjustments
+int mnXOffset;
+
+sal_GlyphId maGlyphId;
+Point   maLinearPos;// absolute position of non rotated string
+
+int mnFallbackLevel;
+
+public:
+GlyphItem(int nCharPos, int nCharCount, sal_GlyphId aGlyphId, 
const Point& rLinearPos,
+long nFlags, int nOrigWidth, int nXOffset )
+:   mnFlags(nFlags)
+,   mnCharPos(nCharPos)
+,   mnCharCount(nCharCount)
+,   mnOrigWidth(nOrigWidth)
+,   mnNewWidth(nOrigWidth)
+,   mnXOffset(nXOffset)
+,   maGlyphId(aGlyphId)
+,   maLinearPos(rLinearPos)
+,   mnFallbackLevel(0)
+{ }
+
+enum {
+IS_IN_CLUSTER = 0x001,
+IS_RTL_GLYPH  = 0x002,
+IS_DIACRITIC  = 0x004,
+IS_VERTICAL   = 0x008,
+IS_SPACING= 0x010,
+ALLOW_KASHIDA = 0x020,
+IS_DROPPED= 0x040,
+IS_CLUSTER_START = 0x080
+};
+
+boolIsInCluster() const { return ((mnFlags & IS_IN_CLUSTER) != 0); 
}
+boolIsRTLGlyph() const  { return ((mnFlags & IS_RTL_GLYPH) != 0); }
+boolIsDiacritic() const { return ((mnFlags & IS_DIACRITIC) != 0); }
+boolIsVertical() const  { return ((mnFlags & IS_VERTICAL) != 0); }
+boolIsSpacing() const   { return ((mnFlags & IS_SPACING) != 0); }
+boolAllowKashida() const{ return ((mnFlags & ALLOW_KASHIDA) != 0); 
}
+boolIsDropped() const   { return ((mnFlags & IS_DROPPED) != 0); }
+boolIsClusterStart() const  { return ((mnFlags & IS_CLUSTER_START) != 
0); }
+};
+
+typedef std::vector SalLayoutGlyphs;
+
 // all positions/widths are in font units
 // one exception: drawposition is in pixel units
 
@@ -105,6 +159,7 @@ public:
 
 virtual std::shared_ptr
 CreateTextLayoutCache(OUString const&) const;
+virtual SalLayoutGlyphs GetGlyphs() const;
 
 protected:
 // used by layout engines
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index 123c339b525a..2aa650a1c75a 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -165,58 +165,6 @@ private:
 boolmbIncomplete;
 };
 
-typedef sal_uInt16 sal_GlyphId;
-
-struct Glyp

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

2018-08-16 Thread Libreoffice Gerrit user
 bridges/source/cpp_uno/msvc_win32_intel/except.cxx  |2 +-
 bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0a99baa1f96b4baf5be7c776c7fb2e5e7c94a351
Author: Stephan Bergmann 
AuthorDate: Thu Aug 16 10:02:44 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 16 13:47:47 2018 +0200

-Werror,-Wmultichar (clang-cl)


(
specifies that, for MSVC, "Multiple characters in the literal fill 
corresponding
bytes as needed from high-order to low-order.")

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

diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx 
b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
index 07db561f1df7..82fcf345cd0d 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
@@ -493,7 +493,7 @@ bool DetectRethrow(void* ppExcept)
 };
 
 constexpr auto PER_IS_MSVC_EH = [](EHExceptionRecord* p) {
-constexpr DWORD EH_EXCEPTION_NUMBER = ('msc' | 0xE000); // The NT 
Exception # that msvcrt uses
+constexpr DWORD EH_EXCEPTION_NUMBER = 0xE06D7363;   // The NT 
Exception # that msvcrt uses ('msc' | 0xE000)
 constexpr DWORD EH_MAGIC_NUMBER1 = 0x19930520;  // latest 
magic # in thrown object
 constexpr DWORD EH_MAGIC_NUMBER2 = 0x19930521;  // latest 
magic # in func info for exception specs
 constexpr DWORD EH_MAGIC_NUMBER3 = 0x19930522;  // latest 
magic #
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx 
b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
index 374fd454ce94..f2e0cdc594a5 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
@@ -808,7 +808,7 @@ bool DetectRethrow(void* ppExcept)
 };
 
 constexpr auto PER_IS_MSVC_EH = [](EHExceptionRecord* p) {
-constexpr DWORD EH_EXCEPTION_NUMBER = ('msc' | 0xE000); // The NT 
Exception # that msvcrt uses
+constexpr DWORD EH_EXCEPTION_NUMBER = 0xE06D7363;   // The NT 
Exception # that msvcrt uses ('msc' | 0xE000)
 constexpr DWORD EH_MAGIC_NUMBER1 = 0x19930520;  // latest 
magic # in thrown object
 constexpr DWORD EH_MAGIC_NUMBER2 = 0x19930521;  // latest 
magic # in func info for exception specs
 constexpr DWORD EH_MAGIC_NUMBER3 = 0x19930522;  // latest 
magic #
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 bridges/source/cpp_uno/msvc_win32_intel/except.cxx  |6 +++---
 bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx |6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit fe500e0472e4fa61506363e4b0b67eca6f490f5b
Author: Stephan Bergmann 
AuthorDate: Thu Aug 16 10:06:23 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 16 13:46:49 2018 +0200

loplugin:reservedid (clang-cl)

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

diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx 
b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
index 7af24e97c868..07db561f1df7 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
@@ -475,7 +475,7 @@ namespace
 // increment __ProcessingThrow, and so does not break following exception 
handling. We rely on the
 // definition of EHExceptionRecord, PER_IS_MSVC_EH and PER_PTHROW, that are 
current as of msvcrt
 // 2017 (14.14.26428).
-bool __DetectRethrow(void* ppExcept)
+bool DetectRethrow(void* ppExcept)
 {
 struct EHExceptionRecord
 {
@@ -513,7 +513,7 @@ bool __DetectRethrow(void* ppExcept)
 EHExceptionRecord* pExcept;
 if (!ppExcept)
 return false;
-pExcept = *(EHExceptionRecord**)ppExcept;
+pExcept = *static_cast(ppExcept);
 if (PER_IS_MSVC_EH(pExcept) && PER_PTHROW(pExcept) == nullptr)
 {
 return true;
@@ -532,7 +532,7 @@ int msci_filterCppException(
 if (pRecord == 0 || pRecord->ExceptionCode != MSVC_ExceptionCode)
 return EXCEPTION_CONTINUE_SEARCH;
 
-const bool rethrow = __DetectRethrow(&pRecord);
+const bool rethrow = DetectRethrow(&pRecord);
 assert(pRecord == pPointers->ExceptionRecord);
 
 if (rethrow && pRecord == pPointers->ExceptionRecord)
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx 
b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
index c03716151bbc..374fd454ce94 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
@@ -789,7 +789,7 @@ namespace
 // increment __ProcessingThrow, and so does not break following exception 
handling. We rely on the
 // definition of EHExceptionRecord, PER_IS_MSVC_EH and PER_PTHROW, that are 
current as of msvcrt
 // 2017 (14.14.26428).
-bool __DetectRethrow(void* ppExcept)
+bool DetectRethrow(void* ppExcept)
 {
 struct EHExceptionRecord
 {
@@ -828,7 +828,7 @@ bool __DetectRethrow(void* ppExcept)
 EHExceptionRecord* pExcept;
 if (!ppExcept)
 return false;
-pExcept = *(EHExceptionRecord**)ppExcept;
+pExcept = *static_cast(ppExcept);
 if (PER_IS_MSVC_EH(pExcept) && PER_PTHROW(pExcept) == nullptr)
 {
 return true;
@@ -851,7 +851,7 @@ int mscx_filterCppException(
 if (pRecord == nullptr || pRecord->ExceptionCode != MSVC_ExceptionCode)
 return EXCEPTION_CONTINUE_SEARCH;
 
-const bool rethrow = __DetectRethrow(&pRecord);
+const bool rethrow = DetectRethrow(&pRecord);
 assert(pRecord == pPointers->ExceptionRecord);
 
 if (rethrow && pRecord == pPointers->ExceptionRecord)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 dbaccess/source/core/api/RowSetBase.cxx|6 --
 dbaccess/source/core/api/RowSetCache.cxx   |6 ++
 dbaccess/source/core/api/RowSetCache.hxx   |4 ++--
 dbaccess/source/ui/inc/RTableConnectionData.hxx|4 ++--
 dbaccess/source/ui/inc/TableWindow.hxx |2 +-
 dbaccess/source/ui/querydesign/TableWindow.cxx |   11 ---
 dbaccess/source/ui/relationdesign/RTableConnectionData.cxx |   10 +++---
 dbaccess/source/ui/relationdesign/RelationTableView.cxx|5 +++--
 8 files changed, 21 insertions(+), 27 deletions(-)

New commits:
commit 78c6a111548eafe636845256a3ec08d5a58b7e67
Author: Noel Grandin 
AuthorDate: Thu Aug 16 12:07:00 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 13:45:58 2018 +0200

loplugin:returnconstant in dbaccess

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

diff --git a/dbaccess/source/core/api/RowSetBase.cxx 
b/dbaccess/source/core/api/RowSetBase.cxx
index e1afe5d21a54..2ad5e37b5412 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -1233,11 +1233,13 @@ void ORowSetBase::positionCache( CursorMoveDirection 
_ePrepareForDirection )
 {
 if ( m_bBeforeFirst )
 {
-bSuccess = m_pCache->beforeFirst();
+m_pCache->beforeFirst();
+bSuccess = true;
 }
 else if ( m_bAfterLast )
 {
-bSuccess = m_pCache->afterLast();
+m_pCache->afterLast();
+bSuccess = true;
 }
 else
 {
diff --git a/dbaccess/source/core/api/RowSetCache.cxx 
b/dbaccess/source/core/api/RowSetCache.cxx
index 12f6e245e514..6180522ff72b 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -687,7 +687,7 @@ bool ORowSetCache::isLast(  )
 return m_nPosition == m_nRowCount;
 }
 
-bool ORowSetCache::beforeFirst(  )
+void ORowSetCache::beforeFirst(  )
 {
 if(!m_bBeforeFirst)
 {
@@ -698,10 +698,9 @@ bool ORowSetCache::beforeFirst(  )
 moveWindow();
 m_aMatrixIter = m_pMatrix->end();
 }
-return true;
 }
 
-bool ORowSetCache::afterLast(  )
+void ORowSetCache::afterLast(  )
 {
 if(!m_bAfterLast)
 {
@@ -719,7 +718,6 @@ bool ORowSetCache::afterLast(  )
 m_nPosition = 0;
 m_aMatrixIter = m_pMatrix->end();
 }
-return true;
 }
 
 bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos, sal_Int32 &_nNewEndPos)
diff --git a/dbaccess/source/core/api/RowSetCache.hxx 
b/dbaccess/source/core/api/RowSetCache.hxx
index 08be66c40108..c00f818a7373 100644
--- a/dbaccess/source/core/api/RowSetCache.hxx
+++ b/dbaccess/source/core/api/RowSetCache.hxx
@@ -172,8 +172,8 @@ namespace dbaccess
 bool isAfterLast(  ) const { return m_bAfterLast;}
 bool isFirst(  );
 bool isLast(  );
-bool beforeFirst(  );
-bool afterLast(  );
+void beforeFirst(  );
+void afterLast(  );
 bool first(  );
 bool last(  );
 sal_Int32 getRow(  );
diff --git a/dbaccess/source/ui/inc/RTableConnectionData.hxx 
b/dbaccess/source/ui/inc/RTableConnectionData.hxx
index dfada694fdfb..5a2836fa124c 100644
--- a/dbaccess/source/ui/inc/RTableConnectionData.hxx
+++ b/dbaccess/source/ui/inc/RTableConnectionData.hxx
@@ -74,9 +74,9 @@ namespace dbaui
 sal_Int32GetDeleteRules() const { return m_nDeleteRules; }
 Cardinality  GetCardinality() const { return m_nCardinality; }
 
-boolIsConnectionPossible();
+voidIsConnectionPossible();
 voidChangeOrientation();
-boolDropRelation();
+voidDropRelation();
 };
 }
 
diff --git a/dbaccess/source/ui/inc/TableWindow.hxx 
b/dbaccess/source/ui/inc/TableWindow.hxx
index a83a54832015..306f9cbcd5ea 100644
--- a/dbaccess/source/ui/inc/TableWindow.hxx
+++ b/dbaccess/source/ui/inc/TableWindow.hxx
@@ -87,7 +87,7 @@ namespace dbaui
 virtual voidDataChanged( const DataChangedEvent& rDCEvt ) override;
 
 // called at FIRST Init
-bool FillListBox();
+void FillListBox();
 // called at EACH Init
 
 virtual void OnEntryDoubleClicked(SvTreeListEntry* /*pEntry*/) { }
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx 
b/dbaccess/source/ui/querydesign/TableWindow.cxx
index d13b2d49f4e5..2567139cd363 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -179,7 +179,7 @@ void OTableWindow::SetPosSizePixel( const Point& rNewPos, 
const Size& rNewSize )
 SetSizePixel( rNewSize );
 }
 
-bool OTableWindow::FillListBox()
+void OTableWindow::FillListBox()
 {
 m_xListBox->Clear();
 if ( !m_pContainerListener.is() )

[Libreoffice-commits] core.git: external/breakpad

2018-08-16 Thread Libreoffice Gerrit user
 
external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
 |   33 ++
 external/breakpad/UnpackedTarball_breakpad.mk  
 |4 +
 2 files changed, 37 insertions(+)

New commits:
commit ac4e861203054479d06a31784a3385fc77d76b35
Author: Stephan Bergmann 
AuthorDate: Thu Aug 16 10:16:43 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 16 13:40:11 2018 +0200

Handle race in external/breakpad

...that hit once in a UBSan build in UITest_calc_tests4:

> soffice.bin: 
/data/sbergman/lo-san/core/include/com/sun/star/uno/Reference.h:420: 
interface_type 
*com::sun::star::uno::Reference::operator->()
 const [interface_type = com::sun::star::xml::crypto::XXMLSecurityContext]: 
Assertion `_pInterface != NULL' failed.
> warn:desktop:11041:11425:desktop/source/app/sofficemain.cxx:82: minidump 
generated: 
/data/sbergman/lo-san/core/workdir/UITest/calc_tests4/user/crash//0585280b-6f1e-fa99-4b711485-60baa6f1.dmp
> src/client/linux/handler/exception_handler.cc:367:34: runtime error: 
member call on null pointer of type 
'std::vector >'
> warn:sal.osl.mutex:11041:11041:sal/osl/unx/mutex.cxx:82: 
pthread_mutex_destroy failed: Device or resource busy
>  #0 in google_breakpad::ExceptionHandler::SignalHandler(int, siginfo_t*, 
void*) at  (instdir/program/libsofficeapp.so +0x963904)
> 
warn:unotools.config:11041:11041:unotools/source/config/configmgr.cxx:169: 
ConfigManager not empty
>  #1  at  (/lib64/libpthread.so.0 +0x11fbf)

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

diff --git 
a/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
 
b/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
new file mode 100644
index ..a88c2cdd32bb
--- /dev/null
+++ 
b/external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
@@ -0,0 +1,33 @@
+From caa6f1ea462d0f0c612b871106e3e309fe0290f5 Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann 
+Date: Thu, 16 Aug 2018 09:04:35 +0200
+Subject: [PATCH] Handle race between ExceptionHandler::SignalHandler and
+ ~ExceptionHandler
+
+...where thread A is blocked locking g_handler_stack_mutex_ in SignalHandler
+while thread B executes ~ExceptionHandler and sets g_handler_stack to null, but
+which thread A didn't expect to be null once it acquired the lock.
+---
+ src/client/linux/handler/exception_handler.cc | 6 --
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/client/linux/handler/exception_handler.cc 
b/src/client/linux/handler/exception_handler.cc
+index b895f6d7..4d58e510 100644
+--- a/src/client/linux/handler/exception_handler.cc
 b/src/client/linux/handler/exception_handler.cc
+@@ -372,8 +372,10 @@ void ExceptionHandler::SignalHandler(int sig, siginfo_t* 
info, void* uc) {
+   }
+ 
+   bool handled = false;
+-  for (int i = g_handler_stack_->size() - 1; !handled && i >= 0; --i) {
+-handled = (*g_handler_stack_)[i]->HandleSignal(sig, info, uc);
++  if (g_handler_stack_ != nullptr) {
++for (int i = g_handler_stack_->size() - 1; !handled && i >= 0; --i) {
++  handled = (*g_handler_stack_)[i]->HandleSignal(sig, info, uc);
++}
+   }
+ 
+   // Upon returning from this signal handler, sig will become unmasked and 
then
+-- 
+2.17.1
+
diff --git a/external/breakpad/UnpackedTarball_breakpad.mk 
b/external/breakpad/UnpackedTarball_breakpad.mk
index e970bd5ad3f3..b70510234e38 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -13,12 +13,16 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,breakpad,0))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,breakpad,$(BREAKPAD_TARBALL)))
 
+# 
external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch
 upstreamed at
+#   
"Handle race between
+#  ExceptionHandler::SignalHandler and ~ExceptionHandler":
 $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
external/breakpad/breakpad-use-correct-http-header.patch.1 \
external/breakpad/breakpad-wshadow.patch.1 \
external/breakpad/breakpad-wshadow2.patch.1 \
external/breakpad/breakpad-stackwalk.patch.1 \
external/breakpad/ucontext.patch \
+   
external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1
 \
 ))
 
 ifeq ($(COM_IS_CLANG),TRUE)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 lotuswordpro/source/filter/lwpgrfobj.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2dc14bee879903bd8824b0ca0ced2d48df7b19f2
Author: Stephan Bergmann 
AuthorDate: Thu Aug 16 10:07:14 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 16 13:37:05 2018 +0200

-Werror,-Wformat (clang-cl)

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

diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx 
b/lotuswordpro/source/filter/lwpgrfobj.cxx
index 26b3b8a52be5..2fc8d2ee3380 100644
--- a/lotuswordpro/source/filter/lwpgrfobj.cxx
+++ b/lotuswordpro/source/filter/lwpgrfobj.cxx
@@ -316,7 +316,7 @@ void LwpGraphicObject::GetBentoNamebyID(LwpObjectID const & 
rMyID, std::string&
 sal_uInt32 nLow = rMyID.GetLow();
 char pTempStr[32];
 rName = std::string("Gr");
-sprintf(pTempStr, "%X,%X", nHigh, nLow);
+sprintf(pTempStr, "%X,%" SAL_PRIXUINT32, nHigh, nLow);
 rName.append(pTempStr);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 sw/qa/extras/ooxmlexport/data/tdf113608_runAwayNumbering.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx|7 +++
 writerfilter/source/dmapper/DomainMapper.cxx  |2 +-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |4 ++--
 writerfilter/source/dmapper/DomainMapper_Impl.hxx |2 +-
 5 files changed, 11 insertions(+), 4 deletions(-)

New commits:
commit 4b432a8c77ae4b5e8305ca69953bc202e7614664
Author: László Németh 
AuthorDate: Wed Aug 15 17:00:28 2018 +0200
Commit: László Németh 
CommitDate: Thu Aug 16 13:02:23 2018 +0200

tdf#113608 DOCX import: don't use numbering of removed paragraphs

to avoid direct numbering of the unnumbered paragraphs later
using numbering of the removed w:r-less paragraph incorrectly.

Test file and clean up by Justin Luth.

Change-Id: I821eed11f96e56e945aa88da03cc84e29322195a
Reviewed-on: https://gerrit.libreoffice.org/59117
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf113608_runAwayNumbering.docx 
b/sw/qa/extras/ooxmlexport/data/tdf113608_runAwayNumbering.docx
new file mode 100644
index ..f31cc8015095
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf113608_runAwayNumbering.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 121c2d798ecb..aba24b3f2d57 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -572,6 +572,13 @@ DECLARE_OOXMLIMPORT_TEST(testTdf104797, "tdf104797.docx")
 CPPUNIT_ASSERT_EQUAL(false,getProperty(getRun(getParagraph(2), 5), 
"IsStart"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf113608_runAwayNumbering, 
"tdf113608_runAwayNumbering.docx")
+{
+// check that an incorrect numbering style is not applied
+// after removing a w:r-less paragraph
+CPPUNIT_ASSERT_EQUAL(OUString(), getProperty(getParagraph(2), 
"NumberingStyleName"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 7df19fb9790f..cfd44ab53dd9 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3360,7 +3360,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, 
size_t len)
 xContext->Erase(PROP_NUMBERING_LEVEL);
 }
 m_pImpl->SetParaSectpr(false);
-
m_pImpl->finishParagraph(m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH));
+
m_pImpl->finishParagraph(m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH), 
bRemove);
 if (bRemove)
 m_pImpl->RemoveLastParagraph();
 }
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 48b43aa52849..5e58dd60f178 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1160,7 +1160,7 @@ static sal_Int32 lcl_getListId(const StyleSheetEntryPtr& 
rEntry, const StyleShee
 return lcl_getListId(pParent, rStyleTable);
 }
 
-void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap )
+void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, 
const bool bRemove )
 {
 if (m_bDiscardHeaderFooter)
 return;
@@ -1183,7 +1183,7 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap )
 const StyleSheetPropertyMap* pStyleSheetProperties = dynamic_cast(pEntry ? pEntry->pProperties.get() : nullptr);
 //apply numbering to paragraph if it was set at the style, but only if the 
paragraph itself
 //does not specify the numbering
-if ( pStyleSheetProperties && pParaContext && 
!pParaContext->isSet(PROP_NUMBERING_RULES) )
+if ( !bRemove && pStyleSheetProperties && pParaContext && 
!pParaContext->isSet(PROP_NUMBERING_RULES) )
 {
 
 sal_Int32 nListId = pEntry ? lcl_getListId(pEntry, 
GetStyleSheetTable()) : -1;
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 6b6755c6fbfd..72a9b56da66e 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -626,7 +626,7 @@ public:
 void setParaSdtEndDeferred(bool bParaSdtEndDeferred);
 bool isParaSdtEndDeferred();
 
-void finishParagraph( const PropertyMapPtr& pPropertyMap );
+void finishParagraph( const PropertyMapPtr& pPropertyMap, const bool 
bRemove = false);
 void appendTextPortion( const OUString& rString, const PropertyMapPtr& 
pPropertyMap );
 void appendTextContent(const 
css::uno::Reference&, const 
css::uno::Sequence&);
 void appendOLE( const OUString& rStreamName, const 
std::shared_ptr& pOleHandler );

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

2018-08-16 Thread Libreoffice Gerrit user
 sfx2/source/sidebar/Tools.cxx |8 +++-
 vcl/source/image/Image.cxx|5 ++---
 2 files changed, 5 insertions(+), 8 deletions(-)

New commits:
commit c876f11689859243ba0945ba5c610ffd3ce3c6d3
Author: Tomaž Vajngerl 
AuthorDate: Wed Aug 15 14:19:53 2018 +0200
Commit: Katarina Behrens 
CommitDate: Thu Aug 16 12:58:16 2018 +0200

tdf#119276 Fix loading of images with internal LO URLs

Change-Id: I30556aba4490bef7f4a6e6b3899cc05f4b6a06d4
Reviewed-on: https://gerrit.libreoffice.org/59104
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 43b7aa5133ce3bfb44c5203aea37fa4474bc3a61)
Reviewed-on: https://gerrit.libreoffice.org/59144
Reviewed-by: Katarina Behrens 

diff --git a/sfx2/source/sidebar/Tools.cxx b/sfx2/source/sidebar/Tools.cxx
index 8571ec09d450..a21b7414c61a 100644
--- a/sfx2/source/sidebar/Tools.cxx
+++ b/sfx2/source/sidebar/Tools.cxx
@@ -55,13 +55,11 @@ Image Tools::GetImage (
 {
 if (rsURL.startsWith(".uno:"))
 {
-const Image 
aPanelImage(vcl::CommandInfoProvider::GetImageForCommand(rsURL, rxFrame));
-return aPanelImage;
+return vcl::CommandInfoProvider::GetImageForCommand(rsURL, 
rxFrame);
 }
-else if (rsURL.startsWith("private:graphicrepository"))
+else
 {
-const Image aPanelImage(rsURL);
-return aPanelImage;
+return Image(rsURL);
 }
 }
 return Image();
diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx
index 7be04691603d..049e3bef5d0d 100644
--- a/vcl/source/image/Image.cxx
+++ b/vcl/source/image/Image.cxx
@@ -67,10 +67,9 @@ Image::Image(const OUString & rFileUrl)
 }
 else
 {
-OUString aPath;
-osl::FileBase::getSystemPathFromFileURL(rFileUrl, aPath);
 Graphic aGraphic;
-if (ERRCODE_NONE == GraphicFilter::LoadGraphic(aPath, IMP_PNG, 
aGraphic))
+
+if (ERRCODE_NONE == GraphicFilter::LoadGraphic(rFileUrl, IMP_PNG, 
aGraphic))
 {
 ImplInit(aGraphic.GetBitmapEx());
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cib_contract935' - desktop/source

2018-08-16 Thread Libreoffice Gerrit user
 desktop/source/app/sofficemain.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit b617d415b0941d16b7152ffa2a264063692afe5f
Author: Vasily Melenchuk 
AuthorDate: Thu Aug 16 13:26:53 2018 +0300
Commit: Vasily Melenchuk 
CommitDate: Thu Aug 16 13:42:49 2018 +0300

google breakpad: use ful memory dump on crash

Change-Id: I65c525a848ed59abd32e214889234333bd64a471

diff --git a/desktop/source/app/sofficemain.cxx 
b/desktop/source/app/sofficemain.cxx
old mode 100644
new mode 100755
index 27b9efa600db..cb3d05dd1d9e
--- a/desktop/source/app/sofficemain.cxx
+++ b/desktop/source/app/sofficemain.cxx
@@ -116,8 +116,9 @@ extern "C" int DESKTOP_DLLPUBLIC soffice_main()
 
 CrashReporter::storeExceptionHandler(&eh);
 #elif defined WNT
-google_breakpad::ExceptionHandler eh(L".", nullptr, dumpCallback, nullptr, 
google_breakpad::ExceptionHandler::HANDLER_ALL);
-
+google_breakpad::ExceptionHandler eh(L".", nullptr, dumpCallback, nullptr,
+ 
google_breakpad::ExceptionHandler::HANDLER_ALL,
+ MiniDumpWithFullMemory, 
(HANDLE)nullptr, nullptr);
 CrashReporter::storeExceptionHandler(&eh);
 #endif
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 4 commits - automation/source Module_ooo.mk postprocess/packcomponents Repository.mk solenv/ant xmlhelp/Ant_LuceneHelpWrapper.mk xmlhelp/inc xmlhel

2018-08-16 Thread Libreoffice Gerrit user
Rebased ref, commits from common ancestor:
commit d61d3a42a96e612c400782a3c973108c6e7edb4f
Author: Damjan Jovanovic 
AuthorDate: Thu Aug 16 05:52:54 2018 +
Commit: Damjan Jovanovic 
CommitDate: Thu Aug 16 05:52:54 2018 +

Add a few forgotten exports.

Patch by: me

diff --git a/automation/source/server/server.cxx 
b/automation/source/server/server.cxx
index cfc6cf821727..ee6cfadc54ca 100644
--- a/automation/source/server/server.cxx
+++ b/automation/source/server/server.cxx
@@ -961,7 +961,7 @@ RemoteControl::~RemoteControl()
 
 static ::osl::Mutex aMutex;
 static RemoteControl* pRemoteControl = 0;
-extern "C" void CreateRemoteControl()
+extern "C" AUTOMATION_DLLPUBLIC void CreateRemoteControl()
 {
 if ( !pRemoteControl )
 {
@@ -971,19 +971,19 @@ extern "C" void CreateRemoteControl()
 }
 }
 
-extern "C" void DestroyRemoteControl()
+extern "C" AUTOMATION_DLLPUBLIC void DestroyRemoteControl()
 {
 ::osl::MutexGuard aGuard( aMutex );
 delete pRemoteControl;
 pRemoteControl = 0;
 }
 
-extern "C" void CreateEventLogger()
+extern "C" AUTOMATION_DLLPUBLIC void CreateEventLogger()
 {
 MacroRecorder::GetMacroRecorder()->SetActionLog();
 }
 
-extern "C" void DestroyEventLogger()
+extern "C" AUTOMATION_DLLPUBLIC void DestroyEventLogger()
 {
 MacroRecorder::GetMacroRecorder()->SetActionLog( sal_False );   // Will 
delete MacroRecorder if necessary
 }
diff --git a/automation/source/server/statemnt.hxx 
b/automation/source/server/statemnt.hxx
index d14820333b3a..25a22547336b 100644
--- a/automation/source/server/statemnt.hxx
+++ b/automation/source/server/statemnt.hxx
@@ -51,6 +51,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class Window;
 class SystemWindow;
@@ -78,7 +79,7 @@ class EditWindow;
 extern "C"
 {
 #endif
-void SAL_CALL osl_TestToolDebugPrint( const sal_Char *pString );
+AUTOMATION_DLLPUBLIC void SAL_CALL osl_TestToolDebugPrint( const sal_Char 
*pString );
 #ifdef __cplusplus
 }
 #endif
commit 8394b85fd149a6f33480f32c29b784cf828eb8ec
Author: Damjan Jovanovic 
AuthorDate: Thu Aug 16 01:05:08 2018 +
Commit: Damjan Jovanovic 
CommitDate: Thu Aug 16 01:05:08 2018 +

On some operating systems, libxslt doesn't automatically link to libxml2,

so we have to link it manually.

Patch by: me

diff --git a/xmlhelp/Library_ucpchelp1.mk b/xmlhelp/Library_ucpchelp1.mk
index 135ddb7926b2..771f1d59eb18 100644
--- a/xmlhelp/Library_ucpchelp1.mk
+++ b/xmlhelp/Library_ucpchelp1.mk
@@ -58,6 +58,7 @@ $(eval $(call gb_Library_add_linked_libs,ucpchelp1,\
 
 $(call gb_Library_use_externals,ucpchelp1,\
expat_utf8 \
+   libxml2 \
libxslt \
 )
 
commit b4d208ee95cfb4c0b7f70acfa86c85110249a172
Author: Damjan Jovanovic 
AuthorDate: Wed Aug 15 18:16:27 2018 +
Commit: Damjan Jovanovic 
CommitDate: Wed Aug 15 18:16:27 2018 +

"stl" is a mandatory library to link to.

Windows always fails to link libraries without it.

Patch by: me

diff --git a/xmlhelp/Library_tvhlp1.mk b/xmlhelp/Library_tvhlp1.mk
index cceae74278d1..2b90a78d76d2 100644
--- a/xmlhelp/Library_tvhlp1.mk
+++ b/xmlhelp/Library_tvhlp1.mk
@@ -46,6 +46,7 @@ $(eval $(call gb_Library_add_linked_libs,tvhlp1,\
 cppu \
 cppuhelper \
 sal \
+stl \
 $(gb_STDLIBS) \
 ))
 
diff --git a/xmlhelp/Library_ucpchelp1.mk b/xmlhelp/Library_ucpchelp1.mk
index d9746a314f75..135ddb7926b2 100644
--- a/xmlhelp/Library_ucpchelp1.mk
+++ b/xmlhelp/Library_ucpchelp1.mk
@@ -51,6 +51,7 @@ $(eval $(call gb_Library_add_linked_libs,ucpchelp1,\
 cppu \
 cppuhelper \
 sal \
+stl \
 ucbhelper \
 $(gb_STDLIBS) \
 ))
commit b8d46d0698c58f9e8ceb931d18927853f545d543
Author: Damjan Jovanovic 
AuthorDate: Wed Aug 15 07:01:42 2018 +
Commit: Damjan Jovanovic 
CommitDate: Wed Aug 15 07:01:42 2018 +

Port main/xmlhelp to gbuild.

Patch by: me

diff --git a/Module_ooo.mk b/Module_ooo.mk
index 67cea532ba17..ff41468b3ef3 100644
--- a/Module_ooo.mk
+++ b/Module_ooo.mk
@@ -103,6 +103,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
 writerfilter \
 x11_extensions \
 xml2cmp \
+xmlhelp \
 xmloff \
 xmlreader \
 xmlscript \
diff --git a/Repository.mk b/Repository.mk
index 066bd2f1b6ff..51efa03c0438 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -153,6 +153,8 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \
 textconversiondlgs \
 ootk \
 tl \
+tvhlp1 \
+ucpchelp1 \
 utl \
 unordf \
 unoxml \
diff --git a/postprocess/packcomponents/makefile.mk 
b/postprocess/packcomponents/makefile.mk
index b8d543148c1a..4c0044c95c58 100644
--- a/postprocess/packcomponents/makefile.mk
+++ b/postprocess/packcomponents/makefile.mk
@@ -141,6 +141,8 @@ my_components = \
 component/unoxml/source/rdf/unordf \
 component/unoxml/source/service/unoxml \
 component/writerfilter/util/writerfilter \
+component/xmlhelp/source/treeview/tvhlp1 \

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

2018-08-16 Thread Libreoffice Gerrit user
 oox/source/drawingml/shape.cxx  |8 
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |   11 ++-
 2 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit a643c8353754c6ce8b318e37cbbc60c3425e9d32
Author: Szymon Kłos 
AuthorDate: Tue Aug 14 13:22:33 2018 +0200
Commit: Szymon Kłos 
CommitDate: Thu Aug 16 12:27:16 2018 +0200

tdf#116350 Better text layout for big shapes

Added some horizontal padding - for bigger shapes
and vertical adjustment for multi-line labels.

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

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 4f11186254f0..e58d54bf863c 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -527,6 +527,14 @@ static inline void lcl_createPresetShape( 
uno::Reference& xShap
 }
 }
 
+// Apply vertical adjustment for text on arc
+SvxShape* pShape = SvxShape::getImplementation(xShape);
+assert(pShape);
+if (rClass == "fontwork-arch-up-curve")
+pShape->GetSdrObject()->SetMergedItem( SdrTextVertAdjustItem( 
SdrTextVertAdjust::SDRTEXTVERTADJUST_BOTTOM ) );
+else if (rClass == "fontwork-arch-down-curve")
+pShape->GetSdrObject()->SetMergedItem( SdrTextVertAdjustItem( 
SdrTextVertAdjust::SDRTEXTVERTADJUST_TOP ) );
+
 // Apply preset shape
 xDefaulter->createCustomShapeDefaults( rClass );
 
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx 
b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 5ce861bc0407..bee68428313a 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -252,6 +252,10 @@ void CalculateHorizontalScalingFactor(
 
 if (nFontSize > 1)
 rFWData.fVerticalTextScaling = static_cast(nFontSize) / 
rFontHeight.GetHeight();
+// Add some padding
+if (rFWData.bScaleX)
+fScalingFactor *= 1.1;
+
 rFWData.fHorizontalTextScaling = fScalingFactor;
 }
 
@@ -531,11 +535,16 @@ bool GetFontWorkOutline(
 }
 else if (rFWData.bScaleX)
 {
+const SdrTextVertAdjust nVertJustify = 
rSdrObjCustomShape.GetMergedItem( SDRATTR_TEXT_VERTADJUST ).GetValue();
+double fFactor = nVertJustify == 
SdrTextVertAdjust::SDRTEXTVERTADJUST_BOTTOM ? -0.5 : ( nVertJustify == 
SdrTextVertAdjust::SDRTEXTVERTADJUST_TOP ? 0.5 : 0 );
+
 std::vector< FWParagraphData >::iterator aParagraphIter( 
aTextAreaIter->vParagraphs.begin() );
 std::vector< FWParagraphData >::const_iterator aParagraphIEnd( 
aTextAreaIter->vParagraphs.end() );
 while ( aParagraphIter != aParagraphIEnd )
 {
 sal_Int32 nHorzDiff = 0;
+sal_Int32 nVertDiff = static_cast( 
rFWData.nSingleLineHeight ) * fFactor * ( aTextAreaIter->vParagraphs.size() - 1 
);
+
 if ( eHorzAdjust == SDRTEXTHORZADJUST_CENTER )
 nHorzDiff = ( rFWData.fHorizontalTextScaling * 
aTextAreaIter->aBoundRect.GetWidth() - aParagraphIter->aBoundRect.GetWidth() ) 
/ 2;
 else if ( eHorzAdjust == SDRTEXTHORZADJUST_RIGHT )
@@ -551,7 +560,7 @@ bool GetFontWorkOutline(
 std::vector< tools::PolyPolygon >::const_iterator 
aOutlineIEnd = aCharacterIter->vOutlines.end();
 while( aOutlineIter != aOutlineIEnd )
 {
-aOutlineIter->Move( nHorzDiff, 0 );
+aOutlineIter->Move( nHorzDiff, nVertDiff );
 ++aOutlineIter;
 }
 ++aCharacterIter;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/sfx2 sc/source sfx2/source starmath/source sw/inc sw/source

2018-08-16 Thread Libreoffice Gerrit user
 include/sfx2/docinsert.hxx  |4 ++--
 sc/source/ui/docshell/docsh4.cxx|2 +-
 sc/source/ui/miscdlgs/instbdlg.cxx  |4 ++--
 sc/source/ui/miscdlgs/linkarea.cxx  |5 +++--
 sfx2/source/doc/docinsert.cxx   |4 ++--
 starmath/source/view.cxx|6 +++---
 sw/inc/view.hxx |2 +-
 sw/source/uibase/inc/uivwimp.hxx|2 +-
 sw/source/uibase/uiview/uivwimp.cxx |2 +-
 sw/source/uibase/uiview/view2.cxx   |   20 +---
 10 files changed, 25 insertions(+), 26 deletions(-)

New commits:
commit 13c78ceb25151b971e28f64d2ab931016eea7408
Author: Noel Grandin 
AuthorDate: Tue Aug 14 16:20:34 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 12:09:05 2018 +0200

pass SfxMedium around by std::unique_ptr

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

diff --git a/include/sfx2/docinsert.hxx b/include/sfx2/docinsert.hxx
index bacf00ec47de..6befefcb31a3 100644
--- a/include/sfx2/docinsert.hxx
+++ b/include/sfx2/docinsert.hxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -29,7 +30,6 @@
 
 namespace sfx2 { class FileDialogHelper; }
 namespace weld { class Window; }
-class SfxMedium;
 class SfxItemSet;
 enum class FileDialogFlags;
 
@@ -66,7 +66,7 @@ public:
 ~DocumentInserter();
 
 voidStartExecuteModal( const 
Link& _rDialogClosedLink );
-SfxMedium*  CreateMedium(char const* pFallbackHack = nullptr);
+std::unique_ptr CreateMedium(char const* pFallbackHack = 
nullptr);
 SfxMediumList*  CreateMediumList();
 };
 
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 3d7b30aec367..155b6794eea6 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -2486,7 +2486,7 @@ IMPL_LINK( ScDocShell, DialogClosedHdl, 
sfx2::FileDialogHelper*, _pFileDlg, void
 if ( ERRCODE_NONE == _pFileDlg->GetError() )
 {
 sal_uInt16 nSlot = m_pImpl->pRequest->GetSlot();
-SfxMedium* pMed = m_pImpl->pDocInserter->CreateMedium();
+std::unique_ptr pMed = 
m_pImpl->pDocInserter->CreateMedium();
 // #i87094# If a .odt was selected pMed is NULL.
 if (pMed)
 {
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx 
b/sc/source/ui/miscdlgs/instbdlg.cxx
index 1c27d79e9398..381722983bab 100644
--- a/sc/source/ui/miscdlgs/instbdlg.cxx
+++ b/sc/source/ui/miscdlgs/instbdlg.cxx
@@ -305,7 +305,7 @@ IMPL_LINK( ScInsertTableDlg, DialogClosedHdl, 
sfx2::FileDialogHelper*, _pFileDlg
 {
 if ( ERRCODE_NONE == _pFileDlg->GetError() )
 {
-SfxMedium* pMed = pDocInserter->CreateMedium();
+std::unique_ptr pMed = pDocInserter->CreateMedium();
 if ( pMed )
 {
 //  ERRCTX_SFX_OPENDOC -> "Error loading document"
@@ -321,7 +321,7 @@ IMPL_LINK( ScInsertTableDlg, DialogClosedHdl, 
sfx2::FileDialogHelper*, _pFileDlg
 
 {
 weld::WaitObject aWait(m_xDialog.get());
-pDocShTables->DoLoad(pMed);
+pDocShTables->DoLoad(pMed.release());
 }
 
 ErrCode nErr = pDocShTables->GetErrorCode();
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx 
b/sc/source/ui/miscdlgs/linkarea.cxx
index 002bf482fd7e..e8eb369d39bc 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -179,7 +179,7 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, 
sfx2::FileDialogHelper*, _pFileDlg,
 if ( _pFileDlg->GetError() != ERRCODE_NONE )
 return;
 
-SfxMedium* pMed = m_xDocInserter->CreateMedium();
+std::unique_ptr pMed = m_xDocInserter->CreateMedium();
 if ( pMed )
 {
 weld::WaitObject aWait(m_xDialog.get());
@@ -207,7 +207,7 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, 
sfx2::FileDialogHelper*, _pFileDlg,
 
 m_pSourceShell = new ScDocShell;
 aSourceRef = m_pSourceShell;
-m_pSourceShell->DoLoad( pMed );
+m_pSourceShell->DoLoad( pMed.get() );
 
 ErrCode nErr = m_pSourceShell->GetErrorCode();
 if (nErr)
@@ -225,6 +225,7 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, 
sfx2::FileDialogHelper*, _pFileDlg,
 
 m_xCbUrl->SetText(EMPTY_OUSTRING);
 }
+pMed.release(); // DoLoad takes ownership
 }
 
 UpdateSourceRanges();
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index ca63af89aa8a..012cbcc02651 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -100,7 +100,7 @@ void DocumentInserter::StartExecuteModal( const 
LinkStartExecuteModal( LINK( this, DocumentInserter, 
DialogClosedHdl ) );
 }
 
-SfxMedium* DocumentInserter::CreateMedium(char const*const pFallbackHack)
+std::unique_ptr DocumentInserter::CreateMedium(char const*const 
pFallbackHack)
 {
 std::uni

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

2018-08-16 Thread Libreoffice Gerrit user
 sw/source/core/layout/pagechg.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit ab8b8fdbb32ad4da5af521b1b982189786bcdcb4
Author: Stephan Bergmann 
AuthorDate: Tue Aug 14 17:21:01 2018 +0200
Commit: Christian Lohmaier 
CommitDate: Thu Aug 16 12:06:25 2018 +0200

tdf#119252: Revert "Remove < USHRT_MAX check that is presumably no longer

...needed"

This reverts commit 4a61006255c67bb6f9ac99107093a424a9de441e, as it turns 
out
to actually break things.  I'm not quite sure how I came across that code 
and
the attempted fix back then, but at least ASan+UBSan `make check` still 
works
after the revert (and UBSan seems the most likely reason I came across 
this).

I know too little about that Writer table layout code to know whether the
original code is actually good, or would need some other fixing, so lets 
just
revert for now.

Change-Id: I1e88372a3b688a5fdd4c1bf88033b51287195799
Reviewed-on: https://gerrit.libreoffice.org/59002
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit d9c312d1917bc039bb0354c8c3f5c9dbbb758cf1)
Reviewed-on: https://gerrit.libreoffice.org/59039
Tested-by: Xisco Faulí 
Reviewed-by: Christian Lohmaier 

diff --git a/sw/source/core/layout/pagechg.cxx 
b/sw/source/core/layout/pagechg.cxx
index 036e3371e97c..ac6c74f4fc57 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1764,10 +1764,10 @@ void SwRootFrame::ImplCalcBrowseWidth()
 SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFrame );
 const SwBorderAttrs &rAttrs = *aAccess.Get();
 const SwFormatHoriOrient &rHori = 
rAttrs.GetAttrSet().GetHoriOrient();
-if ( text::HoriOrientation::FULL != rHori.GetHoriOrient() )
+long nWidth = rAttrs.GetSize().Width();
+if ( nWidth < USHRT_MAX-2000 && //-2k, because USHRT_MAX gets 
missing while trying to resize!
+ text::HoriOrientation::FULL != rHori.GetHoriOrient() )
 {
-long nWidth = rAttrs.GetSize().Width();
-
 const SwHTMLTableLayout *pLayoutInfo =
 static_cast(pFrame)->GetTable()
 ->GetHTMLTableLayout();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 sc/qa/unit/data/xlsx/tdf118990.xlsx   |binary
 sc/qa/unit/subsequent_export-test.cxx |   33 +
 sc/source/filter/excel/xecontent.cxx  |3 ++-
 3 files changed, 35 insertions(+), 1 deletion(-)

New commits:
commit e9e18b5a3a0e9651b7161278a61c6a7ce0b9df0b
Author: Mike Kaganski 
AuthorDate: Wed Aug 15 12:35:30 2018 +0300
Commit: Christian Lohmaier 
CommitDate: Thu Aug 16 12:04:04 2018 +0200

tdf#118990: use full URI for absolute references

Previously (since commit 7eb5e135422f1a5830a44d129300bc3fafb4627d)
only path relative to reference host was stored, and host itself
was dropped. That resulted in URIs like "/share/file.xlsx", even
without scheme. For Windows shares, this broke UNC paths like
"\\HOSTNAME\share\file.xlsx" (which are stored in XLSX by Excel as
"file:///\\HOSTNAME\share\file.xlsx"), and on subsequent import,
this resulted in paths on the same drive as the document (like
"C:\share\file.xlsx").

With this change, we will store "file://HOSTNAME/share/file.xlsx",
which is correctly processed by both LibreOffice and MS Excel.

Change-Id: I3f13aa0b3ae8dc41ec28eaa1416d536469c4562a
Reviewed-on: https://gerrit.libreoffice.org/59064
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 
(cherry picked from commit f24b0ec13c5c8edda5ffb1336b0eb6da173dfc97)
Reviewed-on: https://gerrit.libreoffice.org/59141
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/sc/qa/unit/data/xlsx/tdf118990.xlsx 
b/sc/qa/unit/data/xlsx/tdf118990.xlsx
new file mode 100644
index ..b680edceef0e
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf118990.xlsx differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index f4a1dac54de2..42921737b08a 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -207,6 +207,8 @@ public:
 void testOpenDocumentAsReadOnly();
 void testKeepSettingsOfBlankRows();
 
+void testTdf118990();
+
 CPPUNIT_TEST_SUITE(ScExportTest);
 CPPUNIT_TEST(test);
 CPPUNIT_TEST(testTdf111876);
@@ -314,6 +316,8 @@ public:
 CPPUNIT_TEST(testOpenDocumentAsReadOnly);
 CPPUNIT_TEST(testKeepSettingsOfBlankRows);
 
+CPPUNIT_TEST(testTdf118990);
+
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -4022,6 +4026,35 @@ void ScExportTest::testKeepSettingsOfBlankRows()
 assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row", 2);
 }
 
+void ScExportTest::testTdf118990()
+{
+ScDocShellRef xDocSh = loadDoc("tdf118990.", FORMAT_XLSX);
+CPPUNIT_ASSERT(xDocSh.is());
+xDocSh = saveAndReload(xDocSh.get(), FORMAT_XLSX);
+ScDocument& rDoc = xDocSh->GetDocument();
+
+// TODO: also test A1, which contains a UNC reference to 
\\localhost\share\lookupsource.xlsx,
+// but currently looses "localhost" part when normalized in INetURLObject, 
becoming
+// file:///share/lookupsource.xlsx - which is incorrect, since it points 
to local filesystem
+// and not to Windows network share.
+
+#if defined LINUX // following INetURLObject::setAbsURIRef
+#define TDF118990_SCHEME "smb:"
+#else // for Windows and macOS
+#define TDF118990_SCHEME "file:"
+#endif
+
+ASSERT_FORMULA_EQUAL(rDoc, ScAddress(0, 1, 0),
+ "VLOOKUP(B1,'" TDF118990_SCHEME 
"//192.168.1.1/share/lookupsource.xlsx'#$Sheet1.A1:B5,2)",
+ "Wrong Windows share (using host IP) URL in A2");
+
+ASSERT_FORMULA_EQUAL(rDoc, ScAddress(0, 2, 0),
+ "VLOOKUP(B1,'" TDF118990_SCHEME 
"//NETWORKHOST/share/lookupsource.xlsx'#$Sheet1.A1:B5,2)",
+ "Wrong Windows share (using hostname) URL in A3");
+
+xDocSh->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/source/filter/excel/xecontent.cxx 
b/sc/source/filter/excel/xecontent.cxx
index aa92499f135b..2ab4cc9cc668 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -457,7 +457,8 @@ OUString XclExpHyperlink::BuildFileName(
 sal_uInt16& rnLevel, bool& rbRel, const OUString& rUrl, const 
XclExpRoot& rRoot, bool bEncoded )
 {
 INetURLObject aURLObject( rUrl );
-OUString aDosName( bEncoded ? aURLObject.GetURLPath() : 
aURLObject.getFSysPath( FSysStyle::Dos ) );
+OUString aDosName(bEncoded ? 
aURLObject.GetMainURL(INetURLObject::DecodeMechanism::ToIUri)
+   : aURLObject.getFSysPath(FSysStyle::Dos));
 rnLevel = 0;
 rbRel = rRoot.IsRelUrl();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 sw/qa/extras/layout/data/tdf118058.fodt |   37 
 sw/qa/extras/layout/layout.cxx  |9 +++
 sw/source/core/layout/sectfrm.cxx   |   16 -
 3 files changed, 61 insertions(+), 1 deletion(-)

New commits:
commit 9b01a1a47453300dfda59e3bbacf80e960169654
Author: Miklos Vajna 
AuthorDate: Mon Aug 13 21:03:08 2018 +0200
Commit: Christian Lohmaier 
CommitDate: Thu Aug 16 11:57:42 2018 +0200

tdf#118058 sw, sections in tables: no split for multiple columns

The original use-case was "group a few paragraphs together" for the
split sections inside tables, i.e. it's safe to not split when the
section has multiple columns.

And the multiple columns case would mean that we don't find where to put
the follow section inside a table, resulting in a layout loop.

(cherry picked from commit d2d996db4806e84ae0bf6aef1c285b498f2d2867)

Conflicts:
sw/qa/extras/layout/layout.cxx

Change-Id: Ifab220e582439d2e757b5645f3167b55a051a379
Reviewed-on: https://gerrit.libreoffice.org/58983
Tested-by: Jenkins
Tested-by: Xisco Faulí 
Reviewed-by: Christian Lohmaier 

diff --git a/sw/qa/extras/layout/data/tdf118058.fodt 
b/sw/qa/extras/layout/data/tdf118058.fodt
new file mode 100644
index ..dbdf26bf519f
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf118058.fodt
@@ -0,0 +1,37 @@
+
+
+  
+
+  
+
+  
+  
+
+  
+
+
+  
+
+
+  
+
+  
+
+
+  
+
+
+  
+
+  
+  
+
+  
+
+  
+  
+
+  Para 
1.No. However, you will not be able to 
see the colours produced on a black-and-white 
set.
+
+  
+
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index a3d0950db548..f94239b266e8 100755
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -27,6 +27,7 @@ public:
 void testTdf117245();
 void testTdf109077();
 void testTdf109137();
+void testTdf118058();
 
 CPPUNIT_TEST_SUITE(SwLayoutWriter);
 CPPUNIT_TEST(testTdf116830);
@@ -39,6 +40,7 @@ public:
 CPPUNIT_TEST(testTdf117245);
 CPPUNIT_TEST(testTdf109077);
 CPPUNIT_TEST(testTdf109137);
+CPPUNIT_TEST(testTdf118058);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -228,6 +230,13 @@ void SwLayoutWriter::testTdf109137()
 /*nNumberOfNodes=*/1);
 }
 
+void SwLayoutWriter::testTdf118058()
+{
+SwDoc* pDoc = createDoc("tdf118058.fodt");
+// This resulted in a layout loop.
+pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()->CalcLayout();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwLayoutWriter);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/core/layout/sectfrm.cxx 
b/sw/source/core/layout/sectfrm.cxx
index b12952b0114a..7f8009a5cc44 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -620,7 +620,21 @@ namespace
 return true;
 
 // The frame is in a table, see if the table is in a section.
-return !pFrame->FindTabFrame()->IsInSct();
+bool bRet = !pFrame->FindTabFrame()->IsInSct();
+
+if (bRet)
+{
+// Don't try to split if the frame itself is a section frame with
+// multiple columns.
+if (pFrame->IsSctFrame())
+{
+const SwFrame* pLower = pFrame->GetLower();
+if (pLower && pLower->IsColumnFrame())
+bRet = false;
+}
+}
+
+return bRet;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 oox/source/drawingml/shapecontext.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit a0aea0b22a5ceb31b69407be6b74506194d44134
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 09:16:54 2018 +0100
Commit: Christian Lohmaier 
CommitDate: Thu Aug 16 11:55:57 2018 +0200

ofz#9892 Null-dereference

Change-Id: I8ab1948e5760da365bdddaf45955912a18b20ead
Reviewed-on: https://gerrit.libreoffice.org/59056
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/oox/source/drawingml/shapecontext.cxx 
b/oox/source/drawingml/shapecontext.cxx
index 03ae290cc1ea..21cc6b329ed3 100644
--- a/oox/source/drawingml/shapecontext.cxx
+++ b/oox/source/drawingml/shapecontext.cxx
@@ -100,7 +100,9 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 
aElementToken, const
 }
 case XML_txXfrm:
 {
-mpShapePtr->getTextBody()->getTextProperties().moRotation = 
rAttribs.getInteger( XML_rot );
+const TextBodyPtr& rShapePtr = mpShapePtr->getTextBody();
+if (rShapePtr)
+rShapePtr->getTextProperties().moRotation = rAttribs.getInteger( 
XML_rot );
 return nullptr;
 }
 case XML_cNvSpPr:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/ww8graf.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit ca3038a05188084b012dd3c799494f30bc5c47ef
Author: Caolán McNamara 
AuthorDate: Wed Aug 15 10:27:22 2018 +0100
Commit: Christian Lohmaier 
CommitDate: Thu Aug 16 11:54:53 2018 +0200

ofz#9908 validate no negative editengine selection positions

Change-Id: I37dace2051518224c55756362facd3edba4a9571
Reviewed-on: https://gerrit.libreoffice.org/59059
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 53a3c3289f71..36a4aea53df8 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -581,7 +581,9 @@ namespace
 bool IsValidSel(const EditEngine& rEngine, const ESelection& rSel)
 {
 const auto nParaCount = rEngine.GetParagraphCount();
-return rSel.nStartPara < nParaCount && rSel.nEndPara < nParaCount;
+if (rSel.nStartPara < nParaCount && rSel.nEndPara < nParaCount)
+return rSel.nStartPos >= 0 && rSel.nEndPos >= 0;
+return false;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 sc/source/ui/view/viewfunc.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 99762024dc5a2d5514c517c96c588949e30328b7
Author: Julien Nabet 
AuthorDate: Tue Aug 14 22:01:42 2018 +0200
Commit: Christian Lohmaier 
CommitDate: Thu Aug 16 11:52:48 2018 +0200

Related tdf#118547: Lock mark on protected sheet tab

Fix opposite case, see 
https://bugs.documentfoundation.org/show_bug.cgi?id=118547#c10

Change-Id: I2c4e55f8929b1979e71a4040dfac1ba7cff51aeb
Reviewed-on: https://gerrit.libreoffice.org/59035
Tested-by: Jenkins
Reviewed-by: Julien Nabet 
(cherry picked from commit d064ced9e9db3f924dd954b86c40f21addab1c68)
Reviewed-on: https://gerrit.libreoffice.org/59040
Reviewed-by: Christian Lohmaier 

diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 0b5103924185..6533068bcd04 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -2539,7 +2539,11 @@ bool ScViewFunc::Unprotect( SCTAB nTab, const OUString& 
rPassword )
 bool bUndo (rDoc.IsUndoEnabled());
 
 if ( nTab == TABLEID_DOC || rMark.GetSelectCount() <= 1 )
+{
 bChanged = rFunc.Unprotect( nTab, rPassword, false );
+if (bChanged)
+SetTabProtectionSymbol(nTab, false);
+}
 else
 {
 //  modifying several tabs is handled here
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 filter/source/flash/swfwriter.cxx  |5 +++--
 filter/source/flash/swfwriter.hxx  |5 +
 filter/source/flash/swfwriter1.cxx |2 +-
 sc/source/ui/docshell/olinefun.cxx |4 +---
 sc/source/ui/inc/olinefun.hxx  |2 +-
 sc/source/ui/view/dbfunc3.cxx  |4 ++--
 6 files changed, 9 insertions(+), 13 deletions(-)

New commits:
commit 899fbd617b32771bc8c14effc52a7153465adf5d
Author: Noel Grandin 
AuthorDate: Tue Aug 14 17:11:26 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 11:51:20 2018 +0200

loplugin:returnconstant in ScOutlineDocFunc

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

diff --git a/sc/source/ui/docshell/olinefun.cxx 
b/sc/source/ui/docshell/olinefun.cxx
index 90df8eb475ba..4060625466fa 100644
--- a/sc/source/ui/docshell/olinefun.cxx
+++ b/sc/source/ui/docshell/olinefun.cxx
@@ -637,7 +637,7 @@ bool ScOutlineDocFunc::HideMarkedOutlines( const ScRange& 
rRange, bool bRecord )
 return bDone;
 }
 
-bool ScOutlineDocFunc::ShowOutline( SCTAB nTab, bool bColumns, sal_uInt16 
nLevel, sal_uInt16 nEntry,
+void ScOutlineDocFunc::ShowOutline( SCTAB nTab, bool bColumns, sal_uInt16 
nLevel, sal_uInt16 nEntry,
 bool bRecord, bool bPaint )
 {
 ScDocument& rDoc = rDocShell.GetDocument();
@@ -723,8 +723,6 @@ bool ScOutlineDocFunc::ShowOutline( SCTAB nTab, bool 
bColumns, sal_uInt16 nLevel
 rDocShell.SetDocumentModified();
 
 lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
-
-return true;//! always ???
 }
 
 bool ScOutlineDocFunc::HideOutline( SCTAB nTab, bool bColumns, sal_uInt16 
nLevel, sal_uInt16 nEntry,
diff --git a/sc/source/ui/inc/olinefun.hxx b/sc/source/ui/inc/olinefun.hxx
index 6129cb49801d..89e34eca32c4 100644
--- a/sc/source/ui/inc/olinefun.hxx
+++ b/sc/source/ui/inc/olinefun.hxx
@@ -44,7 +44,7 @@ public:
 boolShowMarkedOutlines( const ScRange& rRange, bool bRecord );
 boolHideMarkedOutlines( const ScRange& rRange, bool bRecord );
 
-boolShowOutline( SCTAB nTab, bool bColumns, sal_uInt16 nLevel, 
sal_uInt16 nEntry,
+voidShowOutline( SCTAB nTab, bool bColumns, sal_uInt16 nLevel, 
sal_uInt16 nEntry,
 bool bRecord, bool bPaint );
 boolHideOutline( SCTAB nTab, bool bColumns, sal_uInt16 nLevel, 
sal_uInt16 nEntry,
 bool bRecord, bool bPaint );
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 008d57eb9f49..f5b1e6b9d670 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -253,9 +253,9 @@ void ScDBFunc::ShowOutline( bool bColumns, sal_uInt16 
nLevel, sal_uInt16 nEntry,
 ScDocShell* pDocSh = GetViewData().GetDocShell();
 ScOutlineDocFunc aFunc(*pDocSh);
 
-bool bOk = aFunc.ShowOutline( nTab, bColumns, nLevel, nEntry, bRecord, 
bPaint );
+aFunc.ShowOutline( nTab, bColumns, nLevel, nEntry, bRecord, bPaint );
 
-if ( bOk && bPaint )
+if ( bPaint )
 UpdateScrollBars(bColumns ? COLUMN_HEADER : ROW_HEADER);
 }
 
commit fbba9324c7df5f459dfe10795021ad3bf77da423
Author: Noel Grandin 
AuthorDate: Tue Aug 14 10:06:13 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 11:51:10 2018 +0200

loplugin:useuniqueptr in swf::Writer

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

diff --git a/filter/source/flash/swfwriter.cxx 
b/filter/source/flash/swfwriter.cxx
index b2e22b9685c0..04b47a640e25 100644
--- a/filter/source/flash/swfwriter.cxx
+++ b/filter/source/flash/swfwriter.cxx
@@ -128,11 +128,12 @@ void ImplCopySvStreamToXOutputStream( SvStream& rIn, 
Reference< XOutputStream >
 
 void Writer::storeTo( Reference< XOutputStream > const &xOutStream )
 {
-for (auto const& font : maFonts)
+for (auto & font : maFonts)
 {
 font->write( *mpFontsStream );
-delete font;
+font.reset();
 }
+maFonts.clear();
 
 // Endtag
 mpMovieStream->WriteUInt16( 0 );
diff --git a/filter/source/flash/swfwriter.hxx 
b/filter/source/flash/swfwriter.hxx
index da781c2cf4da..68c349934ba5 100644
--- a/filter/source/flash/swfwriter.hxx
+++ b/filter/source/flash/swfwriter.hxx
@@ -156,9 +156,6 @@ private:
 std::vector< sal_uInt16 > maGlyphOffsets;
 };
 
-typedef std::vector FontMap;
-
-
 /** this class helps creating flash tags */
 class Tag : public SvMemoryStream
 {
@@ -363,7 +360,7 @@ private:
 private:
 css::uno::Reference< css::i18n::XBreakIterator > mxBreakIterator;
 
-FontMap maFonts;
+std::vector> maFonts;
 
 sal_Int32 mnDocWidth;
 sal_Int32 mnDocHeight;
diff --git a/filter/source/flash/swfwriter1.cxx 
b/filter/source/flash/swfwriter1.cxx
index 882a4794401d..067f238bd31

[Libreoffice-commits] core.git: Makefile.in

2018-08-16 Thread Libreoffice Gerrit user
 Makefile.in |6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 469debe65029cd78423e68ee82f0377714e89d11
Author: Caolán McNamara 
AuthorDate: Thu Aug 16 10:15:00 2018 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 16 10:37:07 2018 +0100

reenable the rest of the fuzzers

Change-Id: I84050caa6f606a4a41724620ac5fe716a2a56fb9

diff --git a/Makefile.in b/Makefile.in
index 3329f269bffb..8cc9357666b9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -486,11 +486,7 @@ $(foreach ide,\
 eclipsecdt,\
 $(eval $(call gb_Top_GbuildToIdeIntegration,$(ide
 
-# disable for now these fuzzers that haven't found anything for months and 
months to reduce output size to get something to fit in available oss-fuzz 
build space
-# Executable_xbmfuzzer Executable_xpmfuzzer Executable_pctfuzzer 
Executable_rasfuzzer Executable_pcdfuzzer
-# Executable_ppmfuzzer Executable_psdfuzzer Executable_pcxfuzzer 
Executable_tgafuzzer Executable_602fuzzer
-# Executable_pngfuzzer Executable_giffuzzer Executable_bmpfuzzer 
Executable_metfuzzer Executable_jpgfuzzer
-fuzzers: Library_sal Library_salhelper Library_reg Library_store 
Library_unoidl codemaker Library_cppu Library_i18nlangtag Library_cppuhelper 
Library_comphelper StaticLibrary_ulingu StaticLibrary_findsofficepath 
Library_tl Library_basegfx Library_canvastools Library_cppcanvas 
Library_dbtools Library_deploymentmisc Library_editeng Library_fwe Library_fwi 
Library_i18nutil Library_localebe1 Library_sax Library_sofficeapp 
Library_ucbhelper Rdb_services udkapi offapi Library_gie Library_icg 
Library_reflection Library_invocadapt Library_bootstrap Library_introspection 
Library_stocservices Library_xmlreader Library_gcc3_uno instsetoo_native 
more_fonts StaticLibrary_boost_locale StaticLibrary_fuzzerstubs 
StaticLibrary_fuzzer_core StaticLibrary_fuzzer_calc StaticLibrary_fuzzer_draw 
StaticLibrary_fuzzer_writer StaticLibrary_fuzzer_math Library_forui 
Library_binaryurp Library_io Library_invocation Library_namingservice 
Library_proxyfac Library_uuresolver Module_ure Executable_pptfuzzer Executa
 ble_cgmfuzzer Executable_ww2fuzzer Executable_ww6fuzzer Executable_ww8fuzzer 
Executable_qpwfuzzer Executable_slkfuzzer Executable_fodtfuzzer 
Executable_fodsfuzzer Executable_fodpfuzzer Executable_xlsfuzzer 
Executable_scrtffuzzer Executable_wksfuzzer Executable_diffuzzer 
Executable_docxfuzzer Executable_xlsxfuzzer Executable_pptxfuzzer 
Executable_htmlfuzzer Executable_rtffuzzer Executable_mmlfuzzer 
Executable_mtpfuzzer Executable_olefuzzer Executable_lwpfuzzer 
Executable_hwpfuzzer Executable_wmffuzzer Executable_dxffuzzer 
Executable_sftfuzzer Executable_svmfuzzer Executable_tiffuzzer 
Executable_epsfuzzer
+fuzzers: Library_sal Library_salhelper Library_reg Library_store 
Library_unoidl codemaker Library_cppu Library_i18nlangtag Library_cppuhelper 
Library_comphelper StaticLibrary_ulingu StaticLibrary_findsofficepath 
Library_tl Library_basegfx Library_canvastools Library_cppcanvas 
Library_dbtools Library_deploymentmisc Library_editeng Library_fwe Library_fwi 
Library_i18nutil Library_localebe1 Library_sax Library_sofficeapp 
Library_ucbhelper Rdb_services udkapi offapi Library_gie Library_icg 
Library_reflection Library_invocadapt Library_bootstrap Library_introspection 
Library_stocservices Library_xmlreader Library_gcc3_uno instsetoo_native 
more_fonts StaticLibrary_boost_locale StaticLibrary_fuzzerstubs 
StaticLibrary_fuzzer_core StaticLibrary_fuzzer_calc StaticLibrary_fuzzer_draw 
StaticLibrary_fuzzer_writer StaticLibrary_fuzzer_math Library_forui 
Library_binaryurp Library_io Library_invocation Library_namingservice 
Library_proxyfac Library_uuresolver Module_ure Executable_pptfuzzer Executa
 ble_cgmfuzzer Executable_ww2fuzzer Executable_ww6fuzzer Executable_ww8fuzzer 
Executable_qpwfuzzer Executable_slkfuzzer Executable_fodtfuzzer 
Executable_fodsfuzzer Executable_fodpfuzzer Executable_xlsfuzzer 
Executable_scrtffuzzer Executable_wksfuzzer Executable_diffuzzer 
Executable_docxfuzzer Executable_xlsxfuzzer Executable_pptxfuzzer 
Executable_htmlfuzzer Executable_rtffuzzer Executable_mmlfuzzer 
Executable_mtpfuzzer Executable_olefuzzer Executable_lwpfuzzer 
Executable_hwpfuzzer Executable_wmffuzzer Executable_dxffuzzer 
Executable_sftfuzzer Executable_svmfuzzer Executable_tiffuzzer 
Executable_epsfuzzer Executable_jpgfuzzer Executable_metfuzzer 
Executable_bmpfuzzer Executable_giffuzzer Executable_pngfuzzer 
Executable_602fuzzer Executable_tgafuzzer Executable_pcxfuzzer 
Executable_psdfuzzer Executable_ppmfuzzer Executable_pcdfuzzer 
Executable_rasfuzzer Executable_pctfuzzer Executable_xpmfuzzer 
Executable_xbmfuzzer
 
 endif # MAKE_RESTARTS
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-08-16 Thread Libreoffice Gerrit user
 sc/source/ui/docshell/dbdocimp.cxx |4 +---
 sc/source/ui/inc/dbdocfun.hxx  |2 +-
 sc/source/ui/unoobj/dispuno.cxx|3 ++-
 3 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 6d29499bd0b854338b7429a6f78b3224ac9f3201
Author: Noel Grandin 
AuthorDate: Tue Aug 14 17:04:04 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Aug 16 11:17:09 2018 +0200

loplugin:returnconstant in ScDBDocFunc

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

diff --git a/sc/source/ui/docshell/dbdocimp.cxx 
b/sc/source/ui/docshell/dbdocimp.cxx
index bfcdda2608af..7fa81368ba04 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -102,7 +102,7 @@ void ScDBDocFunc::ShowInBeamer( const ScImportParam& 
rParam, const SfxViewFrame*
 }
 }
 
-bool ScDBDocFunc::DoImportUno( const ScAddress& rPos,
+void ScDBDocFunc::DoImportUno( const ScAddress& rPos,
 const uno::Sequence& 
aArgs )
 {
 svx::ODataAccessDescriptor aDesc( aArgs );  // includes selection and 
result set
@@ -113,8 +113,6 @@ bool ScDBDocFunc::DoImportUno( const ScAddress& rPos,
 OUString sTarget = pDBData->GetName();
 
 UpdateImport( sTarget, aDesc );
-
-return true;
 }
 
 bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
diff --git a/sc/source/ui/inc/dbdocfun.hxx b/sc/source/ui/inc/dbdocfun.hxx
index 75672a48d6ad..0222fe5bd629 100644
--- a/sc/source/ui/inc/dbdocfun.hxx
+++ b/sc/source/ui/inc/dbdocfun.hxx
@@ -62,7 +62,7 @@ public:
 bool DoImport( SCTAB nTab, const ScImportParam& rParam,
const svx::ODataAccessDescriptor* pDescriptor);  // 
used for selection an existing ResultSet
 
-bool DoImportUno( const ScAddress& rPos,
+void DoImportUno( const ScAddress& rPos,
   const css::uno::Sequence& 
aArgs );
 
 static void ShowInBeamer( const ScImportParam& rParam, const 
SfxViewFrame* pFrame );
diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx
index 0f0d25e3f53f..f8c55cd90de4 100644
--- a/sc/source/ui/unoobj/dispuno.cxx
+++ b/sc/source/ui/unoobj/dispuno.cxx
@@ -219,7 +219,8 @@ void SAL_CALL ScDispatch::dispatch( const util::URL& aURL,
 ScAddress aPos( rViewData.GetCurX(), rViewData.GetCurY(), 
rViewData.GetTabNo() );
 
 ScDBDocFunc aFunc( *rViewData.GetDocShell() );
-bDone = aFunc.DoImportUno( aPos, aArgs );
+aFunc.DoImportUno( aPos, aArgs );
+bDone = true;
 }
 // cURLDocDataSource is never dispatched
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/mst/sw_redlinehide_2' - 4 commits - sw/source

2018-08-16 Thread Libreoffice Gerrit user
 sw/source/core/doc/DocumentRedlineManager.cxx |   18 +++
 sw/source/core/txtnode/ndtxt.cxx  |  125 ++
 2 files changed, 143 insertions(+)

New commits:
commit cd7e089271c4e848f9612412fd843f6e5da00563
Author: Michael Stahl 
AuthorDate: Wed Aug 15 18:52:39 2018 +0200
Commit: Michael Stahl 
CommitDate: Wed Aug 15 18:52:39 2018 +0200

sw_redlinehide_2: JoinNext/JoinPrev may need to recreate MergedPara

Change-Id: I17cde9fab29cf54837904db3c6e64d609aed83b0

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index df87b2a7cd34..00df05638c78 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -814,9 +814,27 @@ void SwTextNode::MoveTextAttr_To_AttrSet()
 
 namespace {
 
-void CheckResetRedlineMergeFlag(SwTextNode & rNode)
+void CheckResetRedlineMergeFlag(SwTextNode & rNode, bool const bRecreateMerged)
 {
-if (rNode.GetRedlineMergeFlag() != SwNode::Merge::None)
+if (bRecreateMerged)
+{
+std::vector frames;
+SwIterator 
aIter(rNode);
+for (SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = 
aIter.Next())
+{
+frames.push_back(pFrame);
+}
+for (SwTextFrame * pFrame : frames)
+{
+SwTextNode & rFirstNode(pFrame->GetMergedPara()
+? *pFrame->GetMergedPara()->pFirstNode
+: rNode);
+assert(rFirstNode.GetIndex() <= rNode.GetIndex());
+pFrame->SetMergedPara(sw::CheckParaRedlineMerge(
+*pFrame, rFirstNode, sw::FrameMode::Existing));
+}
+}
+else if (rNode.GetRedlineMergeFlag() != SwNode::Merge::None)
 {
 SwIterator 
aIter(rNode);
 for (SwTextFrame * pFrame = aIter.First(); pFrame; pFrame = 
aIter.Next())
@@ -922,12 +940,13 @@ SwContentNode *SwTextNode::JoinNext()
 // move all ShellCursor/StackCursor/UnoCursor out of delete range
 pDoc->CorrAbs( aIdx, SwPosition( *this ), nOldLen, true );
 }
+SwNode::Merge const eOldMergeFlag(pTextNode->GetRedlineMergeFlag());
 rNds.Delete(aIdx);
 SetWrong( pList, false );
 SetGrammarCheck( pList3, false );
 SetSmartTags( pList2, false );
 InvalidateNumRule();
-CheckResetRedlineMergeFlag(*this);
+CheckResetRedlineMergeFlag(*this, eOldMergeFlag == 
SwNode::Merge::First);
 }
 else {
 OSL_FAIL( "No TextNode." );
@@ -1017,12 +1036,13 @@ void SwTextNode::JoinPrev()
 // move all ShellCursor/StackCursor/UnoCursor out of delete range
 pDoc->CorrAbs( aIdx, SwPosition( *this ), nLen, true );
 }
+SwNode::Merge const eOldMergeFlag(pTextNode->GetRedlineMergeFlag());
 rNds.Delete(aIdx);
 SetWrong( pList, false );
 SetGrammarCheck( pList3, false );
 SetSmartTags( pList2, false );
 InvalidateNumRule();
-CheckResetRedlineMergeFlag(*this);
+CheckResetRedlineMergeFlag(*this, eOldMergeFlag == 
SwNode::Merge::NonFirst);
 }
 else {
 OSL_FAIL( "No TextNode." );
commit b61da3820ea58664904f244624f475238fded321
Author: Michael Stahl 
AuthorDate: Wed Aug 15 17:15:26 2018 +0200
Commit: Michael Stahl 
CommitDate: Wed Aug 15 17:15:26 2018 +0200

sw_redlinehide_2: SplitContentNode also needs to move flys ...

... and footnotes that are anchored in a node of a merged frame that
follows the one that is being split to the new frames of the existing
node when the existing frames are moved to the new (preceding) node.

Change-Id: I759718c14130e6a3809dc2ca55243f3ff2eec50b

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 726e5a84bdea..df87b2a7cd34 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -364,6 +364,66 @@ static void lcl_ChangeFootnoteRef( SwTextNode &rNode )
 }
 }
 
+namespace {
+
+// check if there are flys on the existing frames (now on "pNode")
+// that need to be moved to the new frames of "this"
+void MoveMergedFlysAndFootnotes(std::vector const& rFrames,
+SwTextNode const& rFirstNode, SwTextNode const& rSecondNode)
+{
+int nLevel(0);
+for (sal_uLong nIndex = rSecondNode.GetIndex() + 1; ; ++nIndex)
+{
+SwNode *const pTmp(rSecondNode.GetNodes()[nIndex]);
+if (pTmp->IsCreateFrameWhenHidingRedlines())
+{
+break;
+}
+else if (pTmp->IsStartNode())
+{
+++nLevel;
+}
+else if (pTmp->IsEndNode())
+{
+--nLevel;
+}
+else if (nLevel == 0
+ && pTmp->GetRedlineMergeFlag() == SwNode::Merge::NonFirst
+ && pTmp->IsTextNode())
+{
+lcl_ChangeFootnoteRef(*pTmp->GetTextNode());
+}
+}
+for (SwTextFrame *const pFrame : rFrames)
+{
+if (SwSortedObjs *const pObjs = pFra

  1   2   >