connectivity/source/parse/sqlbison.y | 3 ++- editeng/source/misc/svxacorr.cxx | 24 ++++++++++++++++++------ extras/CustomTarget_autocorr.mk | 2 +- extras/Package_autocorr.mk | 2 +- include/editeng/svxacorr.hxx | 5 +++-- sc/source/core/data/column2.cxx | 8 ++++++-- sw/qa/extras/rtfimport/data/fdo73241.rtf | 8 ++++++++ sw/qa/extras/rtfimport/rtfimport.cxx | 6 ++++++ sw/qa/extras/ww8import/ww8import.cxx | 2 +- sw/source/core/edit/acorrect.cxx | 2 +- writerfilter/source/resourcemodel/Fraction.cxx | 6 ++++-- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 4 ++++ 12 files changed, 55 insertions(+), 17 deletions(-)
New commits: commit 50172a3b64df11cb14bc56de23889c8ee60cdfa5 Author: Julien Nabet <[email protected]> Date: Wed Jun 18 21:08:03 2014 +0200 Resolves fdo#79276 Add fallback system for autocorrection of French variants 1) Replace the creation of acor_fr-FR.dat by acor_fr.dat since there's no specific for variants of fr 2) Add a fallback system to use it Reviewed-on: https://gerrit.libreoffice.org/9825 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> Conflicts: editeng/source/misc/svxacorr.cxx include/editeng/svxacorr.hxx sw/source/core/edit/acorrect.cxx Change-Id: Ia3e11fff0f266839dc148077b50c1b2f798d1c50 Reviewed-on: https://gerrit.libreoffice.org/10065 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index f0501f3..12413ee 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1560,7 +1560,7 @@ sal_Bool SvxAutoCorrect::CreateLanguageFile( const LanguageTag& rLanguageTag, sa { OSL_ENSURE(pLangTable->find(rLanguageTag) == pLangTable->end(), "Language already exists "); - OUString sUserDirFile( GetAutoCorrFileName( rLanguageTag, sal_True, sal_False )); + OUString sUserDirFile( GetAutoCorrFileName( rLanguageTag, true, false, false )); OUString sShareDirFile( sUserDirFile ); SvxAutoCorrectLanguageListsPtr pLists = 0; @@ -1583,10 +1583,15 @@ sal_Bool SvxAutoCorrect::CreateLanguageFile( const LanguageTag& rLanguageTag, sa aLastFileTable.erase(nFndPos); } } - else if( ( FStatHelper::IsDocument( sUserDirFile ) || - FStatHelper::IsDocument( sShareDirFile = - GetAutoCorrFileName( rLanguageTag, sal_False, sal_False ) ) ) || - ( sShareDirFile = sUserDirFile, bNewFile )) + else if( + ( FStatHelper::IsDocument( sUserDirFile ) || + FStatHelper::IsDocument( sShareDirFile = + GetAutoCorrFileName( rLanguageTag, false, false, false ) ) || + FStatHelper::IsDocument( sShareDirFile = + GetAutoCorrFileName( rLanguageTag, false, false, true) ) + ) || + ( sShareDirFile = sUserDirFile, bNewFile ) + ) { pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile, sUserDirFile ); LanguageTag aTmp(rLanguageTag); // this insert() needs a non-const reference @@ -1902,9 +1907,16 @@ sal_Bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang, } OUString SvxAutoCorrect::GetAutoCorrFileName( const LanguageTag& rLanguageTag, - sal_Bool bNewFile, sal_Bool bTst ) const + bool bNewFile, bool bTst, bool bUnlocalized ) const { OUString sRet, sExt( rLanguageTag.getBcp47() ); + if (bUnlocalized) + { + // we don't want variant, so we'll take "fr" instead of "fr-CA" for example + ::std::vector< OUString > vecFallBackStrings = rLanguageTag.getFallbackStrings(false); + if (!vecFallBackStrings.empty()) + sExt = vecFallBackStrings[0]; + } sExt = "_" + sExt + ".dat"; if( bNewFile ) diff --git a/extras/CustomTarget_autocorr.mk b/extras/CustomTarget_autocorr.mk index 66d32f6..ddafa02 100644 --- a/extras/CustomTarget_autocorr.mk +++ b/extras/CustomTarget_autocorr.mk @@ -23,7 +23,7 @@ extras_AUTOCORR_LANGS := \ es:es-ES \ fa:fa-IR \ fi:fi-FI \ - fr:fr-FR \ + fr:fr \ ga-IE:ga-IE \ hr:hr-HR \ hu:hu-HU \ diff --git a/extras/Package_autocorr.mk b/extras/Package_autocorr.mk index e42e3d1..8c71a60 100644 --- a/extras/Package_autocorr.mk +++ b/extras/Package_autocorr.mk @@ -23,7 +23,7 @@ $(eval $(call gb_Package_add_files,extras_autocorr,$(LIBO_SHARE_FOLDER)/autocorr acor_es-ES.dat \ acor_fa-IR.dat \ acor_fi-FI.dat \ - acor_fr-FR.dat \ + acor_fr.dat \ acor_ga-IE.dat \ acor_hr-HR.dat \ acor_hu-HU.dat \ diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx index 82b76ce..0f99d2d 100644 --- a/include/editeng/svxacorr.hxx +++ b/include/editeng/svxacorr.hxx @@ -329,8 +329,9 @@ public: // Query/Set the name of the AutoCorrect file // the default is "autocorr.dat" OUString GetAutoCorrFileName( const LanguageTag& rLanguageTag /* = LANGUAGE_SYSTEM */ , - sal_Bool bNewFile = sal_False, - sal_Bool bTstUserExist = sal_False ) const; + bool bNewFile = false, + bool bTstUserExist = false, + bool bUnlocalized = false ) const; // Query/Set the current settings of AutoCorrect long GetFlags() const { return nFlags; } diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index d8f1980..96a00b1 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -340,7 +340,7 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos, } else { - SwTextBlocks aTBlks( rACorrect.GetAutoCorrFileName( aLanguageTag, sal_False, sal_True )); + SwTextBlocks aTBlks( rACorrect.GetAutoCorrFileName( aLanguageTag, false, true, false )); sal_uInt16 nPos = aTBlks.GetIndex( pFnd->GetShort() ); if( USHRT_MAX != nPos && aTBlks.BeginGetDoc( nPos ) ) { commit 5ee59d4a5c3826ebfe4b798eb624de653904e115 Author: Miklos Vajna <[email protected]> Date: Sat Jul 5 13:01:38 2014 +0200 fdo#73241 RTF import: ignore page break in tables (cherry picked from commit fdc235126d6d73f47a5b56d453e1d3db8ba3e816) Conflicts: sw/qa/extras/rtfimport/rtfimport.cxx writerfilter/source/rtftok/rtfdocumentimpl.cxx Change-Id: Ibee9fec0f421b4c2ff3d45c861bc3fcfc97cbf15 Reviewed-on: https://gerrit.libreoffice.org/10093 Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> diff --git a/sw/qa/extras/rtfimport/data/fdo73241.rtf b/sw/qa/extras/rtfimport/data/fdo73241.rtf new file mode 100644 index 0000000..b919e25 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/fdo73241.rtf @@ -0,0 +1,8 @@ +{\rtf1 +\pard\plain Before.\par +\trowd \cellx4703\cellx9514\pard\plain\intbl +{\page First cell\cell Second cell\cell } +\pard\plain \intbl +{\trowd \cellx4703\cellx9514\row } +\pard\plain After.\par +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 6cd3776..4843e9f 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -1667,6 +1667,12 @@ DECLARE_RTFIMPORT_TEST(testFontOverride, "font-override.rtf") CPPUNIT_ASSERT_EQUAL(OUString("Arial"), getProperty<OUString>(getRun(getParagraph(1), 1), "CharFontName")); } +DECLARE_RTFIMPORT_TEST(testFdo73241, "fdo73241.rtf") +{ + // This was 2, page break in table wasn't ignored. + CPPUNIT_ASSERT_EQUAL(1, getPages()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index dd14ca5..66abe80 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2193,6 +2193,10 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) break; case RTF_PAGE: { + // Ignore page breaks inside tables. + if (m_aStates.top().pCurrentBuffer == &m_aTableBufferStack.back()) + break; + // If we're inside a continous section, we should send a section break, not a page one. RTFValue::Pointer_t pBreak = m_aStates.top().aSectionSprms.find(NS_sprm::LN_SBkc); // Unless we're on a title page. commit a997c5fa1b7a82f1b7d494bbc80857a2bbb89142 Author: Michael Meeks <[email protected]> Date: Sat Jul 5 22:13:44 2014 +0100 fdo#80813 - avoid FMR by re-fetch pattern after a potential re-calculation. Change-Id: Ib197f4cd74cd2c444a5f7c207fe2e5be14eea65d Reviewed-on: https://gerrit.libreoffice.org/10095 Reviewed-by: Markus Mohrhard <[email protected]> Tested-by: Markus Mohrhard <[email protected]> diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 18aee24..63c5e0f 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -131,11 +131,15 @@ long ScColumn::GetNeededSize( return 0; } - // conditional formatting + // conditional formatting const SfxItemSet* pCondSet = pDocument->GetCondResult( nCol, nRow, nTab ); - // line break? + // fdo#80813 - fetching conditional result (GetCondResult) above can cause + // a re-calculate which can delete and re-set the pattern we fetched. + if (!rOptions.pPattern) + pPattern = pAttrArray->GetPattern( nRow ); + // line break? const SfxPoolItem* pCondItem; SvxCellHorJustify eHorJust; if (pCondSet && commit 30ff578d04c0e7eef6a7bbbf20f6405895ba14d5 Author: Michael Stahl <[email protected]> Date: Fri Jul 4 00:29:55 2014 +0200 fdo#76803: writerfilter: fix image wrap polygon import again The division in Fraction::init() should be a signed one, to prevent a change in sign, e.g., -220869/9 = +477194047. (regression from f8307e5ae11e8235fa1fb88ed52625bf9c650dc2) Change-Id: Icbbd1721144ff42c53ae71312641bd601ba60762 (cherry picked from commit dcbac37efebb9877a72f7c9914b63d60f46a5656) Reviewed-on: https://gerrit.libreoffice.org/10079 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/writerfilter/source/resourcemodel/Fraction.cxx b/writerfilter/source/resourcemodel/Fraction.cxx index 1f24bb3..ba76985 100644 --- a/writerfilter/source/resourcemodel/Fraction.cxx +++ b/writerfilter/source/resourcemodel/Fraction.cxx @@ -79,9 +79,11 @@ Fraction::~Fraction() void Fraction::init(sal_Int32 nNumerator, sal_Int32 nDenominator) { - sal_uInt32 nGCD = gcd(abs(nNumerator), abs(nDenominator)); + // fdo#41068 pass non-negative numbers to gcd + sal_Int32 const nGCD = gcd(abs(nNumerator), abs(nDenominator)); - mnNumerator = nNumerator/ nGCD; + // fdo#76803 do signed division + mnNumerator = nNumerator / nGCD; mnDenominator = nDenominator / nGCD; } commit e9ab855e43a3889df3d29b8bb6c849ad44801bbb Author: Matúš Kukan <[email protected]> Date: Wed Jun 25 09:45:07 2014 +0200 error: no matching function for call to 'assertEquals' Change-Id: I0b87c2abeec30e9e4eab3ce488a5828b8a5b475d (cherry picked from commit 4a3b0e544dbc45a3972006a2ead75492d6876f95) Signed-off-by: Michael Stahl <[email protected]> diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx index db1ca82..09467cd 100644 --- a/sw/qa/extras/ww8import/ww8import.cxx +++ b/sw/qa/extras/ww8import/ww8import.cxx @@ -275,7 +275,7 @@ DECLARE_WW8IMPORT_TEST(testBnc875715, "bnc875715.doc") uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY); // Was incorrectly set as -1270. - CPPUNIT_ASSERT_EQUAL(0, getProperty<sal_Int32>(xSections->getByIndex(0), "SectionLeftMargin")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xSections->getByIndex(0), "SectionLeftMargin")); } #endif commit 08a0c1d6901c3e849d31f2fca2d3b63f83a59c2a Author: Lionel Elie Mamane <[email protected]> Date: Thu Jul 3 15:42:40 2014 +0200 JOINs are left-associative Change-Id: I24fdd2ce9bb87cc52a7c84ec8cd300bc13b11461 Reviewed-on: https://gerrit.libreoffice.org/10059 Tested-by: Norbert Thiebaud <[email protected]> Reviewed-by: Norbert Thiebaud <[email protected]> diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y index 6e7b973..3484b0d 100644 --- a/connectivity/source/parse/sqlbison.y +++ b/connectivity/source/parse/sqlbison.y @@ -123,7 +123,8 @@ using namespace connectivity; %token <pParseNode> SQL_TOKEN_GRANT SQL_TOKEN_GROUP SQL_TOKEN_HAVING SQL_TOKEN_IN SQL_TOKEN_INDICATOR SQL_TOKEN_INNER SQL_TOKEN_INTEGER SQL_TOKEN_INTO SQL_TOKEN_IS SQL_TOKEN_INTERSECT -%token <pParseNode> SQL_TOKEN_JOIN SQL_TOKEN_KEY SQL_TOKEN_LEADING SQL_TOKEN_LIKE SQL_TOKEN_LOCAL SQL_TOKEN_LOWER +%left <pParseNode> SQL_TOKEN_JOIN +%token <pParseNode> SQL_TOKEN_KEY SQL_TOKEN_LEADING SQL_TOKEN_LIKE SQL_TOKEN_LOCAL SQL_TOKEN_LOWER %token <pParseNode> SQL_TOKEN_MAX SQL_TOKEN_MIN SQL_TOKEN_NATURAL SQL_TOKEN_NCHAR SQL_TOKEN_NULL SQL_TOKEN_NUMERIC %token <pParseNode> SQL_TOKEN_OCTET_LENGTH SQL_TOKEN_OF SQL_TOKEN_ON SQL_TOKEN_OPTION SQL_TOKEN_ORDER SQL_TOKEN_OUTER
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
