configure.ac | 2 - sd/source/ui/dlg/animobjs.cxx | 10 +++--- sw/qa/extras/ooxmlimport/data/hello.docx |binary sw/qa/extras/ooxmlimport/data/tdf94374.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 30 ++++++++++++++++++ vcl/generic/app/gensys.cxx | 18 +--------- wizards/com/sun/star/wizards/db/SQLQueryComposer.java | 26 +++++++++++++-- wizards/com/sun/star/wizards/ui/FilterComponent.java | 4 +- writerfilter/source/filter/WriterFilter.cxx | 3 + xmloff/source/style/xmlnumfe.cxx | 3 + xmloff/source/style/xmlnumfi.cxx | 2 - 11 files changed, 70 insertions(+), 28 deletions(-)
New commits: commit 6064a8b601a4d3ee6e4bbe598d7ee50712d300e4 Author: Andras Timar <[email protected]> Date: Thu Nov 5 22:04:43 2015 +0100 Bump to version 5.0-8 Change-Id: I74bc0ee02279152bec9ecc54b0d948a6978fa6c8 diff --git a/configure.ac b/configure.ac index 83412c0..335068e 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl in order to create a configure script. # several non-alphanumeric characters, those are split off and used only for the # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea. -AC_INIT([Collabora Office],[5.0.10.7],[],[],[https://CollaboraOffice.com/]) +AC_INIT([Collabora Office],[5.0.10.8],[],[],[https://CollaboraOffice.com/]) AC_PREREQ([2.59]) commit 5f919351aed1b0e80fd10a33ee3ac08b3697efff Author: Armin Le Grand <[email protected]> Date: Tue Nov 3 12:25:13 2015 +0100 tdf#95298: corrected some out-of-bound accesses to array the index variable m_FrameList used to reference the current frame uses the state EMTY_FRAMELIST to mark as invalid, which is the max integer number. Thus all usages have to be secured to not use m_FrameList if set to EMPTY_FRAMELIST. This was missing in some places. the max integer number. Thus all usages have to be secured to not use m_FrameList if set to EMPTY_FRAMELIST. This was missing in some places. Reviewed-on: https://gerrit.libreoffice.org/19753 Tested-by: Jenkins <[email protected]> Reviewed-by: Katarina Behrens <[email protected]> Cherry-picked from f0cef70cd4164342b218fbee34bf57eedc22c998 Change-Id: Ie1cf4ae2cb79d821f634ec78b621a2647abc61a8 Reviewed-on: https://gerrit.libreoffice.org/19787 Tested-by: Jenkins <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> (cherry picked from commit 6b3b080f8cedc1b496022b18e477af0c7361fba3) diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 0b033f9..5c66014 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -430,7 +430,8 @@ IMPL_LINK( AnimationWindow, ClickRemoveBitmapHdl, void *, pBtn ) SdPage* pPage = pMyDoc->GetSdPage(0, PK_STANDARD); SdrObject* pObject; - if (pBtn == m_pBtnRemoveBitmap) + // tdf#95298 check m_nCurrentFrame for EMPTY_FRAMELIST to avoid out-of-bound array access + if (pBtn == m_pBtnRemoveBitmap && EMPTY_FRAMELIST != m_nCurrentFrame) { delete m_FrameList[m_nCurrentFrame].first; delete m_FrameList[m_nCurrentFrame].second; @@ -449,8 +450,8 @@ IMPL_LINK( AnimationWindow, ClickRemoveBitmapHdl, void *, pBtn ) if (m_nCurrentFrame >= m_FrameList.size()) { - assert(m_FrameList.empty()); - m_nCurrentFrame = EMPTY_FRAMELIST; + // tdf#95298 last frame was deleted, try to use the one before it or go on empty state + m_nCurrentFrame = m_FrameList.empty() ? EMPTY_FRAMELIST : m_FrameList.size() - 1; } } else // delete everything @@ -539,7 +540,8 @@ IMPL_LINK_NOARG(AnimationWindow, ModifyTimeHdl) void AnimationWindow::UpdateControl(bool const bDisableCtrls) { - if (!m_FrameList.empty()) + // tdf#95298 check m_nCurrentFrame for EMPTY_FRAMELIST to avoid out-of-bound array access + if (!m_FrameList.empty() && EMPTY_FRAMELIST != m_nCurrentFrame) { BitmapEx aBmp(*m_FrameList[m_nCurrentFrame].first); commit 3458c7844b3ed8fcb3dcc92dc31ce66d2fc498e3 Author: Lionel Elie Mamane <[email protected]> Date: Wed Oct 28 17:41:44 2015 +0100 base new query wizard: fix confusion between display name and field name Change-Id: I75354ffea2daede55b34e4cf3321d57196be3d9b Reviewed-on: https://gerrit.libreoffice.org/19652 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> (cherry picked from commit c7a520868ecf6d5de48dc3964a7bccab3fa480c3) diff --git a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java index 0a30846..c9c9400 100644 --- a/wizards/com/sun/star/wizards/db/SQLQueryComposer.java +++ b/wizards/com/sun/star/wizards/db/SQLQueryComposer.java @@ -77,7 +77,7 @@ public class SQLQueryComposer int iAggregate = CurDBMetaData.getAggregateIndex(CurDBMetaData.FieldColumns[i].getDisplayFieldName()); if (iAggregate > -1) { - sSelectClause += CurDBMetaData.AggregateFieldNames[iAggregate][1] + "(" + getComposedAliasFieldName(CurDBMetaData.AggregateFieldNames[iAggregate][0]) + ")"; + sSelectClause += CurDBMetaData.AggregateFieldNames[iAggregate][1] + "(" + getComposedAliasDisplayName(CurDBMetaData.AggregateFieldNames[iAggregate][0]) + ")"; if (_baddAliasFieldNames) { sSelectClause += getAliasFieldNameClause(CurDBMetaData.AggregateFieldNames[iAggregate][0]); @@ -85,7 +85,7 @@ public class SQLQueryComposer } else { - sSelectClause += getComposedAliasFieldName(CurDBMetaData.FieldColumns[i].getDisplayFieldName()); + sSelectClause += getComposedAliasDisplayName(CurDBMetaData.FieldColumns[i].getDisplayFieldName()); if (_baddAliasFieldNames) { sSelectClause += getAliasFieldNameClause(CurDBMetaData.FieldColumns[i].getDisplayFieldName()); @@ -182,7 +182,7 @@ public class SQLQueryComposer { sOrder += ", "; } - sOrder += CurDBMetaData.AggregateFieldNames[iAggregate][1] + "(" + getComposedAliasFieldName(CurDBMetaData.AggregateFieldNames[iAggregate][0]) + ")"; + sOrder += CurDBMetaData.AggregateFieldNames[iAggregate][1] + "(" + getComposedAliasDisplayName(CurDBMetaData.AggregateFieldNames[iAggregate][0]) + ")"; sOrder += " " + CurDBMetaData.getSortFieldNames()[i][1]; m_queryComposer.setOrder(sOrder); } @@ -311,7 +311,7 @@ public class SQLQueryComposer } } - private String getComposedAliasFieldName(String _fieldname) + private String getComposedAliasDisplayName(String _fieldname) { FieldColumn CurFieldColumn = CurDBMetaData.getFieldColumnByDisplayName(_fieldname); final String curCommandName = CurFieldColumn.getCommandName(); @@ -329,6 +329,24 @@ public class SQLQueryComposer return quoteName(curAliasName) + "." + quoteName(curFieldName); } + private String getComposedAliasFieldName(String _fieldname) + { + FieldColumn CurFieldColumn = CurDBMetaData.getFieldColumnByFieldName(_fieldname); + final String curCommandName = CurFieldColumn.getCommandName(); + final String curFieldName = CurFieldColumn.getFieldName(); + CommandName curComposedCommandName = getComposedCommandByDisplayName(curCommandName); + if (curComposedCommandName == null) + { + //return _fieldname; + if ( curCommandName.length() > 0 ) + return quoteName(curCommandName) + "." + quoteName(curFieldName); + else + return quoteName(curFieldName); + } + String curAliasName = curComposedCommandName.getAliasName(); + return quoteName(curAliasName) + "." + quoteName(curFieldName); + } + private CommandName getComposedCommandByAliasName(String _AliasName) { if (composedCommandNames != null) diff --git a/wizards/com/sun/star/wizards/ui/FilterComponent.java b/wizards/com/sun/star/wizards/ui/FilterComponent.java index ab6fa7a..38af3bc 100644 --- a/wizards/com/sun/star/wizards/ui/FilterComponent.java +++ b/wizards/com/sun/star/wizards/ui/FilterComponent.java @@ -119,7 +119,7 @@ public class FilterComponent String sControlNameSuffix = sIncSuffix + "_" + getIndexNumber(sControlName); XListBox xCurFieldListBox = UnoRuntime.queryInterface(XListBox.class, CurUnoDialog.xDlgContainer.getControl(sControlName)); String CurDisplayFieldName = xCurFieldListBox.getSelectedItem(); - FieldColumn CurFieldColumn = new FieldColumn(oQueryMetaData, CurDisplayFieldName); + FieldColumn CurFieldColumn = oQueryMetaData.getFieldColumnByDisplayName(CurDisplayFieldName); String sControlNameTextValue = "txtValue" + sControlNameSuffix; XControl xValueControl = CurUnoDialog.xDlgContainer.getControl(sControlNameTextValue); @@ -303,7 +303,7 @@ public class FilterComponent String FieldName; if (_CurDBMetaData != null) { - FieldColumn CurDBFieldColumn = _CurDBMetaData.getFieldColumnByDisplayName(_filtercondition.Name); + FieldColumn CurDBFieldColumn = _CurDBMetaData.getFieldColumnByFieldName(_filtercondition.Name); FieldName = CurDBFieldColumn.getFieldTitle(); } else commit 99f256296fc8121eb02422e58bd0718f1ccbe397 Author: Laurent Balland-Poirier <[email protected]> Date: Wed Oct 28 16:17:23 2015 +0100 tdf#93296 dashes in decimal part => 0 min decimal places During import, as well during export, "0.--" must be considered as 0 min decimal places Change-Id: I33d06dd95c0678660bc0bb222972f82ef54f2c6e Reviewed-on: https://gerrit.libreoffice.org/19647 Reviewed-by: Eike Rathke <[email protected]> Tested-by: Eike Rathke <[email protected]> (cherry picked from commit 3f970cf247ad96d1663462acb0be7f1c767d1ebf) Reviewed-on: https://gerrit.libreoffice.org/19781 (cherry picked from commit 18be99af0b2a9ad6d7303ba6e594774b4292c316) diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 6c9d360..0d160ad 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -1206,7 +1206,10 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt if ( bExpFound && pElemStr ) nExpDigits += pElemStr->getLength(); else if ( !bDecDashes && pElemStr && (*pElemStr)[0] == '-' ) + { bDecDashes = true; + nMinDecimals = 0; + } else if ( !bInInteger && pElemStr ) { for ( sal_Int32 i = pElemStr->getLength()-1; i >= 0 && (*pElemStr)[i] == '#'; i-- ) diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index e9e25f4..4b01d13 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1021,7 +1021,7 @@ SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( SvXMLImport& rImport, } if ( aNumInfo.nMinDecimalDigits == -1) { - if ( bVarDecimals ) + if ( bVarDecimals || aNumInfo.bDecReplace ) aNumInfo.nMinDecimalDigits = 0; else aNumInfo.nMinDecimalDigits = aNumInfo.nDecimals; commit 832e2019a9c45b1e605a87dcfec2143f03bde97f Author: Miklos Vajna <[email protected]> Date: Mon Oct 19 09:21:02 2015 +0200 tdf#94374 DOCX import: allow insert -> object -> document (cherry picked from commit 50d48709af3406eb270e5357f5d2cc6a218337a9) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: I977930d59ef1ae9ae8bd2dfa9a7f3816c46d982c Reviewed-on: https://gerrit.libreoffice.org/19758 Tested-by: Jenkins <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> (cherry picked from commit 36fa2b8cf538baee272bf91da3d6cda2da6a392c) diff --git a/sw/qa/extras/ooxmlimport/data/hello.docx b/sw/qa/extras/ooxmlimport/data/hello.docx new file mode 100644 index 0000000..d5d8d43 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/hello.docx differ diff --git a/sw/qa/extras/ooxmlimport/data/tdf94374.docx b/sw/qa/extras/ooxmlimport/data/tdf94374.docx new file mode 100644 index 0000000..d5d8d43 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf94374.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 1668def..8a186ef 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -66,6 +66,8 @@ #include <com/sun/star/style/PageStyleLayout.hpp> #include <com/sun/star/style/ParagraphAdjust.hpp> #include <com/sun/star/util/DateTime.hpp> +#include <com/sun/star/document/XFilter.hpp> +#include <com/sun/star/document/XImporter.hpp> #include <vcl/bmpacc.hxx> #include <vcl/svapp.hxx> #include <unotest/assertion_traits.hxx> @@ -75,6 +77,7 @@ #include <swtypes.hxx> #include <tools/datetimeutils.hxx> #include <oox/drawingml/drawingmltypes.hxx> +#include <unotools/streamwrap.hxx> #include <bordertest.hxx> @@ -96,6 +99,24 @@ public: if (OString(filename) == "smartart.docx" || OString(filename) == "strict-smartart.docx" || OString(filename) == "fdo87488.docx") SvtFilterOptions::Get().SetSmartArt2Shape(false); } +protected: + /// Copy&paste helper. + bool paste(const OUString& rFilename, const uno::Reference<text::XTextRange>& xTextRange) + { + uno::Reference<document::XFilter> xFilter(m_xSFactory->createInstance("com.sun.star.comp.Writer.WriterFilter"), uno::UNO_QUERY_THROW); + uno::Reference<document::XImporter> xImporter(xFilter, uno::UNO_QUERY_THROW); + xImporter->setTargetDocument(mxComponent); + uno::Sequence<beans::PropertyValue> aDescriptor(3); + aDescriptor[0].Name = "InputStream"; + SvStream* pStream = utl::UcbStreamHelper::CreateStream(getURLFromSrc("/sw/qa/extras/ooxmlimport/data/") + rFilename, StreamMode::READ); + uno::Reference<io::XStream> xStream(new utl::OStreamWrapper(*pStream)); + aDescriptor[0].Value <<= xStream; + aDescriptor[1].Name = "InsertMode"; + aDescriptor[1].Value <<= sal_True; + aDescriptor[2].Name = "TextInsertModeRange"; + aDescriptor[2].Value <<= xTextRange; + return xFilter->filter(aDescriptor); + } }; class FailTest : public Test @@ -2806,6 +2827,15 @@ DECLARE_OOXMLIMPORT_TEST(testTdf89165, "tdf89165.docx") // This must not hang in layout } +DECLARE_OOXMLIMPORT_TEST(testTdf94374, "hello.docx") +{ + uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); + uno::Reference<text::XTextRange> xText(xTextDocument->getText(), uno::UNO_QUERY); + uno::Reference<text::XTextRange> xEnd = xText->getEnd(); + // This failed: it wasn't possible to insert a DOCX document into an existing Writer one. + CPPUNIT_ASSERT(paste("tdf94374.docx", xEnd)); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx index a2f289a..546b852 100644 --- a/writerfilter/source/filter/WriterFilter.cxx +++ b/writerfilter/source/filter/WriterFilter.cxx @@ -171,8 +171,9 @@ sal_Bool WriterFilter::filter(const uno::Sequence< beans::PropertyValue >& aDesc return sal_False; writerfilter::dmapper::SourceDocumentType eType = writerfilter::dmapper::SourceDocumentType::OOXML; + uno::Reference<text::XTextRange> xInsertTextRange = aMediaDesc.getUnpackedValueOrDefault("TextInsertModeRange", uno::Reference<text::XTextRange>()); writerfilter::Stream::Pointer_t pStream( - writerfilter::dmapper::DomainMapperFactory::createMapper(m_xContext, xInputStream, m_xDstDoc, bRepairStorage, eType, uno::Reference<text::XTextRange>(), aMediaDesc)); + writerfilter::dmapper::DomainMapperFactory::createMapper(m_xContext, xInputStream, m_xDstDoc, bRepairStorage, eType, xInsertTextRange, aMediaDesc)); //create the tokenizer and domain mapper writerfilter::ooxml::OOXMLStream::Pointer_t pDocStream = writerfilter::ooxml::OOXMLDocumentFactory::createStream(m_xContext, xInputStream, bRepairStorage); uno::Reference<task::XStatusIndicator> xStatusIndicator = aMediaDesc.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_STATUSINDICATOR(), uno::Reference<task::XStatusIndicator>()); commit 55066180e80b77cdf8520b11cc60dec73c6e0d58 Author: Andras Timar <[email protected]> Date: Thu Nov 5 21:58:31 2015 +0100 Collabora Office: hackish fix of repaint problem of vcl widgets Change-Id: Ib0eaba0767ff18d03464ba7d1ec1ffdd2ba3ca78 diff --git a/vcl/generic/app/gensys.cxx b/vcl/generic/app/gensys.cxx index 0bd02ee..f4edf1f 100644 --- a/vcl/generic/app/gensys.cxx +++ b/vcl/generic/app/gensys.cxx @@ -191,21 +191,9 @@ const char* SalGenericSystem::getFrameResName() const char* SalGenericSystem::getFrameClassName() { - static OStringBuffer aClassName; - if( aClassName.isEmpty() ) - { - OUString aIni, aProduct; - rtl::Bootstrap::get( "BRAND_BASE_DIR", aIni ); - aIni += "/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( "bootstrap" ); - rtl::Bootstrap aBootstrap( aIni ); - aBootstrap.getFrom( "ProductKey", aProduct ); - - if( !aProduct.isEmpty() ) - aClassName.append( OUStringToOString( aProduct, osl_getThreadTextEncoding() ) ); - else - aClassName.append( OUStringToOString( utl::ConfigManager::getProductName(), osl_getThreadTextEncoding())); - } - return aClassName.getStr(); + // Someone somewhere hard coded LibreOffice. If frame class name is not LibreOffice, strange repaint + // problems occur with edit boxes, dropdown list boxes, etc. + return "LibreOffice"; } #endif
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
