avmedia/source/framework/modeltools.cxx | 3 basctl/source/basicide/moduldl2.cxx | 10 basic/source/uno/namecont.cxx | 17 bin/unpack-sources | 10 chart2/source/controller/dialogs/res_ErrorBar.cxx | 20 chart2/source/controller/inc/res_ErrorBar.hxx | 2 configure.ac | 27 connectivity/source/commontools/DateConversion.cxx | 6 connectivity/source/parse/sqlbison.y | 8 cppuhelper/source/servicemanager.cxx | 1 dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk | 119 dbaccess/CppunitTest_dbaccess_nolib_save.mk | 119 dbaccess/Module_dbaccess.mk | 2 dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java | 2 dbaccess/qa/extras/empty-stdlib-save.cxx | 145 dbaccess/qa/extras/nolib-save.cxx | 135 dbaccess/source/core/api/RowSet.cxx | 2 dbaccess/source/ui/querydesign/QueryDesignView.cxx | 2 dbaccess/uiconfig/ui/specialsettingspage.ui | 2 download.lst | 8 external/coinmp/UnpackedTarball_coinmp.mk | 1 external/coinmp/coinmp-msvc-disable-sse2.patch.1 | 10 external/collada2gltf/StaticLibrary_collada2gltf.mk | 1 external/collada2gltf/UnpackedTarball_collada2gltf.mk | 1 external/collada2gltf/patches/kill_c++11_code.patch.1 | 5824 +++++++++++ external/freetype/UnpackedTarball_freetype.mk | 1 external/freetype/freetype-msvc-disable-sse2.patch.1 | 26 external/glew/UnpackedTarball_glew.mk | 1 external/glew/glew-msvc-disable-sse2.patch.1 | 10 external/icu/ExternalProject_icu.mk | 2 external/lcms2/UnpackedTarball_lcms2.mk | 1 external/lcms2/lcms2-msvc-disable-sse2.patch.1 | 10 external/libgltf/UnpackedTarball_libgltf.mk | 1 external/libgltf/libgltf-msvc-disable-sse2.patch.1 | 10 external/libxml2/libxml2-vc10.patch | 2 external/libxmlsec/xmlsec1-vc.patch | 2 external/libxslt/libxslt-vc10.patch | 2 external/nss/ExternalProject_nss.mk | 4 external/nss/nss-linux-x86.patch.0 | 12 external/nss/nss-pem.patch | 17 external/nss/nss.aix.patch | 133 external/nss/nss.patch | 160 external/nss/nss_macosx.patch | 41 external/python3/UnpackedTarball_python3.mk | 1 external/python3/python-msvc-disable-sse2.patch.1 | 12 filter/source/config/fragments/filters/draw8.xcu | 2 filter/source/config/fragments/filters/draw8_template.xcu | 2 filter/source/config/fragments/filters/impress8.xcu | 2 filter/source/config/fragments/filters/impress8_draw.xcu | 2 filter/source/config/fragments/filters/impress8_template.xcu | 2 framework/source/services/substitutepathvars.cxx | 3 i18npool/Library_localedata_euro.mk | 1 i18npool/source/localedata/data/ca_ES_valencia.xml | 43 i18npool/source/localedata/data/es_CR.xml | 17 i18npool/source/localedata/localedata.cxx | 1 i18npool/source/search/textsearch.cxx | 4 officecfg/registry/schema/org/openoffice/Office/Impress.xcs | 2 oox/CustomTarget_generated.mk | 1 oox/source/docprop/ooxmldocpropimport.cxx | 2 oox/source/drawingml/color.cxx | 30 oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 10 oox/source/drawingml/table/tablecell.cxx | 55 oox/source/token/properties.txt | 1 oox/source/vml/vmlshape.cxx | 27 sc/source/core/data/column.cxx | 6 sc/source/core/data/column4.cxx | 7 sc/source/core/data/document10.cxx | 4 sc/source/core/data/formulacell.cxx | 2 sc/source/core/data/table3.cxx | 7 sc/source/core/tool/token.cxx | 2 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 1 sc/source/ui/dbgui/filtdlg.cxx | 5 sc/source/ui/dbgui/validate.cxx | 15 sc/source/ui/docshell/dbdocfun.cxx | 1 sc/source/ui/undo/undoblk3.cxx | 23 sc/source/ui/view/cellsh2.cxx | 2 sc/source/ui/view/tabvwshb.cxx | 5 sc/source/ui/view/viewfun6.cxx | 24 sc/uiconfig/scalc/ui/optformula.ui | 732 - scp2/Module_scp2.mk | 1 sd/qa/unit/data/pptx/bnc584721_4.pptx |binary sd/qa/unit/import-tests.cxx | 53 sd/source/filter/html/pubdlg.cxx | 2 sd/source/ui/controller/slidelayoutcontroller.cxx | 16 sd/source/ui/controller/slidelayoutcontroller.hxx | 4 sd/source/ui/docshell/docshel4.cxx | 22 sd/source/ui/remotecontrol/Server.cxx | 6 sd/source/ui/unoidl/UnoDocumentSettings.cxx | 26 sfx2/source/appl/shutdownicon.cxx | 196 sfx2/source/appl/shutdownicon.hxx | 8 sfx2/source/appl/shutdowniconunx.cxx | 1 sfx2/util/sfx.component | 1 svtools/source/contnr/svimpbox.cxx | 2 svx/Library_svxcore.mk | 1 svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx | 2 svx/source/form/dbtoolsclient.cxx | 3 sw/CppunitTest_sw_ooxmlimport.mk | 1 sw/Library_sw.mk | 1 sw/qa/core/data/ooxml/pass/fdo73608-1.docx |binary sw/qa/core/data/ooxml/pass/fdo73608-2.docx |binary sw/qa/core/data/ooxml/pass/fdo79129.docx |binary sw/qa/core/data/ooxml/pass/fdo79131.docx |binary sw/qa/core/data/rtf/pass/fdo84536.rtf | 16 sw/qa/extras/odfimport/data/fdo79269.odt |binary sw/qa/extras/odfimport/data/fdo79269_header.odt |binary sw/qa/extras/odfimport/odfimport.cxx | 35 sw/qa/extras/ooxmlexport/data/bnc884615-mso-position.docx |binary sw/qa/extras/ooxmlexport/data/fdo78907.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 50 sw/qa/extras/ooxmlimport/data/bnc821804.docx |binary sw/qa/extras/ooxmlimport/data/bnc891663.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 120 sw/qa/extras/rtfimport/data/fdo84679.rtf | 12 sw/qa/extras/rtfimport/rtfimport.cxx | 11 sw/source/core/bastyp/breakit.cxx | 4 sw/source/core/crsr/crstrvl.cxx | 34 sw/source/core/doc/doc.cxx | 49 sw/source/core/text/EnhancedPDFExportHelper.cxx | 6 sw/source/core/txtnode/txtedt.cxx | 6 sw/source/core/uibase/dbui/swdbtoolsclient.cxx | 2 sw/source/core/uibase/docvw/edtwin.cxx | 41 sw/source/core/uibase/docvw/edtwin2.cxx | 17 sw/source/core/uibase/inc/edtwin.hxx | 5 sw/source/core/uibase/inc/view.hxx | 4 sw/source/core/uibase/misc/redlndlg.cxx | 2 sw/source/core/uibase/shells/basesh.cxx | 6 sw/source/core/uibase/shells/textfld.cxx | 1 sw/source/core/unocore/unoredline.cxx | 1 sw/source/core/unocore/unostyle.cxx | 35 sw/source/filter/html/htmlgrin.cxx | 23 sw/source/filter/ww8/docxattributeoutput.cxx | 168 sw/source/filter/ww8/wrtww8.cxx | 8 sw/source/filter/ww8/ww8atr.cxx | 2 sw/source/ui/frmdlg/column.cxx | 7 vcl/generic/glyphs/gcach_ftyp.cxx | 11 vcl/source/gdi/regionband.cxx | 2 vcl/source/outdev/text.cxx | 2 writerfilter/source/dmapper/DomainMapper.cxx | 37 writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 16 writerfilter/source/dmapper/DomainMapper_Impl.cxx | 113 writerfilter/source/dmapper/DomainMapper_Impl.hxx | 25 writerfilter/source/dmapper/GraphicImport.cxx | 8 writerfilter/source/dmapper/PropertyIds.cxx | 1 writerfilter/source/dmapper/PropertyIds.hxx | 1 writerfilter/source/dmapper/PropertyMap.hxx | 18 writerfilter/source/ooxml/model.xml | 10 writerfilter/source/rtftok/rtfdocumentimpl.cxx | 18 writerfilter/source/rtftok/rtfsdrimport.cxx | 5 148 files changed, 8174 insertions(+), 1072 deletions(-)
New commits: commit 88464b4e164cdfa02e059b674c1dfc1b7b59217a Author: Caolán McNamara <[email protected]> Date: Thu Oct 9 11:13:10 2014 +0100 Resolves: fdo#84809 crash when button is too short for text regression from 4c539fac018dfd44cd8db52161a8cb930c627da7 commit 4c539fac018dfd44cd8db52161a8cb930c627da7 Date: Tue Dec 17 05:18:35 2013 -0600 vcl get rid of xub_StrLen and STRING_LEN in outdev3 before this there was a dubious cast which hid the problem Change-Id: I7c01c0f0ac211196a62acaf02297f29ae829403d (cherry picked from commit 3144b8deaf8397d719b7ad7a56b309655a53d90a) Reviewed-on: https://gerrit.libreoffice.org/11871 Reviewed-by: David Tardon <[email protected]> Tested-by: David Tardon <[email protected]> diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index b7bb028..e426368 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -1496,7 +1496,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r long nMaxTextWidth = ImplGetTextLines( aMultiLineInfo, nWidth, aStr, nStyle, _rLayout ); nLines = (sal_Int32)(nHeight/nTextHeight); nFormatLines = aMultiLineInfo.Count(); - if ( !nLines ) + if (nLines <= 0) nLines = 1; if ( nFormatLines > nLines ) { commit e6b7f8d356043e56551a89a1d158cc2939fd2bba Author: Kohei Yoshida <[email protected]> Date: Sat Oct 11 14:18:10 2014 -0400 fdo#80846: Broadcast changes before EndUndo(). EndUndo() calls PostDataChanged(), which renders the recalculated formula cells. Not broadcasting before EndUndo causes some dependent formula cells to not get recalculated. This one unfortunately is not currently unit-testable as this behavior depends on the presence of ScTabViewShell.... Change-Id: I86288608b7f2627cda7c74be27a18029832775ef (cherry picked from commit 424bfaa773e58d6b609ac7f64907db4b542d1315) Reviewed-on: https://gerrit.libreoffice.org/11927 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index 03edabf..6784134 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -170,12 +170,20 @@ void ScUndoDeleteContents::DoChange( const bool bUndo ) SetChangeTrack(); } + if (nFlags & IDF_CONTENTS) + { + // Broadcast only when the content changes. fdo#74687 + if (mpDataSpans) + BroadcastChanges(*mpDataSpans); + else + BroadcastChanges(aRange); + } + ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); if ( !( (pViewShell) && pViewShell->AdjustRowHeight( aRange.aStart.Row(), aRange.aEnd.Row() ) ) ) /*A*/ pDocShell->PostPaint( aRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags ); - pDocShell->PostDataChanged(); if (pViewShell) pViewShell->CellContentChanged(); @@ -188,15 +196,6 @@ void ScUndoDeleteContents::Undo() DoChange( true ); EndUndo(); - if (nFlags & IDF_CONTENTS) - { - // Broadcast only when the content changes. fdo#74687 - if (mpDataSpans) - BroadcastChanges(*mpDataSpans); - else - BroadcastChanges(aRange); - } - HelperNotifyChanges::NotifyIfChangesListeners(*pDocShell, aRange); } @@ -206,10 +205,6 @@ void ScUndoDeleteContents::Redo() DoChange( false ); EndRedo(); - if (nFlags & IDF_CONTENTS) - // Broadcast only when the content changes. fdo#74687 - BroadcastChanges(aRange); - HelperNotifyChanges::NotifyIfChangesListeners(*pDocShell, aRange); } commit 6bf9e1da350944006cf8ea618fac24b04a376367 Author: Kohei Yoshida <[email protected]> Date: Sun Oct 12 10:18:09 2014 -0400 fdo#83901: ROW() and COLUMN() to be properly recalculated on cell move. For cases where ROW or COLUMN references another cell that has shifted. Change-Id: Ic4bef8672dab811ceff6886d9af0388306a66485 (cherry picked from commit 0b29a16d1dcffd75e49bd7ad3da867b0d0ebfa38) Reviewed-on: https://gerrit.libreoffice.org/11934 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 1676e1b..42da658 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -2096,6 +2096,12 @@ class UpdateRefOnNonCopy : std::unary_function<sc::FormulaGroupEntry, void> if (pCode->IsRecalcModeOnRefMove()) aRes.mbValueChanged = true; } + else if (aRes.mbReferenceModified && pCode->IsRecalcModeOnRefMove()) + { + // The cell itself hasn't shifted. But it may have ROW or COLUMN + // referencing another cell that has. + aRes.mbValueChanged = true; + } if (aRes.mbNameModified) recompileTokenArray(*pTop); diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 2059aee..96eb323 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -2758,7 +2758,7 @@ bool ScFormulaCell::UpdateReferenceOnShift( if (bOnRefMove) // Cell may reference itself, e.g. ocColumn, ocRow without parameter - bOnRefMove = (bValChanged || (aPos != aOldPos)); + bOnRefMove = (bValChanged || (aPos != aOldPos) || bRefModified); bool bNewListening = false; bool bInDeleteUndo = false; commit 8b370023c386c07f9ea90bcb66f569c1dcf12e13 Author: Miklos Vajna <[email protected]> Date: Fri Oct 10 16:21:29 2014 +0200 fdo#84679 RTF import: fix paragraph spacing handling in tables Regression from commit 1be0a3fa9ebb22b607c54b47739d4467acfed259 (n#825305: writerfilter RTF import: override style properties like Word, 2014-06-17), we failed to do the proper deduplication in buffered content, like tables. Fix this by adapting RTFDocumentImpl::replayBuffer() to RTFDocumentImpl::checkNeedPap(), which already did the proper deduplication. To be fair, the inconsistency was there earlier since 9f5263c477b82fef5aa9c3e79fb6af92aa049e24 (fdo#44736 RTF import: ignore direct formatting which equals to style, 2012-11-25), but it caused no real harm earlier. (cherry picked from commit e34906d20c9febc420b115fa2a8b171826dea0be) Change-Id: I0673408088d9d83768f0780ea92ece87913d03f3 Reviewed-on: https://gerrit.libreoffice.org/11914 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sw/qa/extras/rtfimport/data/fdo84679.rtf b/sw/qa/extras/rtfimport/data/fdo84679.rtf new file mode 100644 index 0000000..64611be --- /dev/null +++ b/sw/qa/extras/rtfimport/data/fdo84679.rtf @@ -0,0 +1,12 @@ +{\rtf1 +{\stylesheet +{\ql \sa160\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 +\af31507\afs28\alang1054 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 \snext0 \sqformat \spriority0 Normal;} +} +\pard\plain\par +\trowd +\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10\cellx3121 +\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10\cellx6238 +A1\cell A2\cell \row +\pard\plain\par +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 12c6b52..cc51a42 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -1887,6 +1887,17 @@ DECLARE_RTFIMPORT_TEST(testPictureWrapPolygon, "picture-wrap-polygon.rtf") CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(-67)), getProperty<sal_Int32>(getShape(1), "VertOrientPosition")); } +DECLARE_RTFIMPORT_TEST(testFdo84679, "fdo84679.rtf") +{ + // The problem was that the paragraph in A1 had some bottom margin, but it should not. + uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY); + uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY); + uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY); + // This was 282. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraphOfText(1, xCell->getText()), "ParaBottomMargin")); +} + 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 9f35f26..3fdc5ef 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -445,7 +445,9 @@ void RTFDocumentImpl::setNeedSect(bool bNeedSect) writerfilter::Reference<Properties>::Pointer_t RTFDocumentImpl::getProperties(RTFSprms& rAttributes, RTFSprms& rSprms) { - int nStyle = m_aStates.top().nCurrentStyleIndex; + int nStyle = 0; + if (!m_aStates.empty()) + nStyle = m_aStates.top().nCurrentStyleIndex; RTFReferenceTable::Entries_t::iterator it = m_aStyleTableEntries.find(nStyle); if (it != m_aStyleTableEntries.end()) { @@ -1402,10 +1404,9 @@ void RTFDocumentImpl::replayBuffer(RTFBuffer_t& rBuffer, rBuffer.pop_front(); if (boost::get<0>(aTuple) == BUFFER_PROPS) { + // Construct properties via getProperties() and not directly, to take care of deduplication. writerfilter::Reference<Properties>::Pointer_t const pProp( - new RTFReferenceProperties( - boost::get<1>(aTuple)->getAttributes(), - boost::get<1>(aTuple)->getSprms()) + getProperties(boost::get<1>(aTuple)->getAttributes(), boost::get<1>(aTuple)->getSprms()) ); Mapper().props(pProp); } commit 1ef653bdad58f2fde4094f7d648a57b3969a6663 Author: Julien Nabet <[email protected]> Date: Sun Oct 5 21:14:46 2014 +0200 fdo#84073: change ODBC/JDBC escapes to lowercase Change-Id: I19ce3acb9575fbef8273bbd84cb4dc322e101ac8 Reviewed-on: https://gerrit.libreoffice.org/11885 Reviewed-by: Julien Nabet <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx index 1f63db8..1cab87e 100644 --- a/connectivity/source/commontools/DateConversion.cxx +++ b/connectivity/source/commontools/DateConversion.cxx @@ -136,7 +136,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b if ( bOk ) { if (bQuote) - aRet.appendAscii("{TS '"); + aRet.appendAscii("{ts '"); aRet.append(DBTypeConversion::toDateTimeString(aDateTime)); if (bQuote) aRet.appendAscii("'}"); @@ -166,7 +166,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b bOk = _rVal >>= aDate; OSL_VERIFY_RES( bOk, "DBTypeConversion::toSQLString: _rVal is not date!"); if (bQuote) - aRet.appendAscii("{D '"); + aRet.appendAscii("{d '"); aRet.append(DBTypeConversion::toDateString(aDate)); if (bQuote) aRet.appendAscii("'}"); @@ -193,7 +193,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b bOk = _rVal >>= aTime; OSL_VERIFY_RES( bOk,"DBTypeConversion::toSQLString: _rVal is not time!"); if (bQuote) - aRet.appendAscii("{T '"); + aRet.appendAscii("{t '"); aRet.append(DBTypeConversion::toTimeString(aTime)); if (bQuote) aRet.appendAscii("'}"); diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y index 231c9e1..a5b9f2f 100644 --- a/connectivity/source/parse/sqlbison.y +++ b/connectivity/source/parse/sqlbison.y @@ -4638,6 +4638,14 @@ OString OSQLParser::TokenIDToStr(sal_uInt32 nTokenID, const IParseContext* pCont aStr = yytname[YYTRANSLATE(nTokenID)]; if(aStr.startsWith("SQL_TOKEN_")) aStr = aStr.copy(10); + switch( nTokenID ) + { + case SQL_TOKEN_OJ: + case SQL_TOKEN_TS: + case SQL_TOKEN_T: + case SQL_TOKEN_D: + aStr = aStr.toAsciiLowerCase(); + } } return aStr; } diff --git a/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java b/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java index fc9a5a6..8d6eec6 100644 --- a/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java +++ b/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java @@ -51,7 +51,7 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase + " OR ( \"ID\" = 3 AND \"Postal\" = '6' AND \"Address\" = '7' )" + " OR ( \"Address\" = '8' )" + " OR ( \"Postal\" = '9' )" - + " OR ( NOW( ) = {D '2010-01-01' } )"; + + " OR ( NOW( ) = {d '2010-01-01' } )"; private final static String INNERPRODUCTSQUERY = "products (inner)"; diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 1bfb73c..33bab8f 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -1073,7 +1073,7 @@ namespace { // create outer join if ( bUseEscape ) - aStr += "{ OJ "; + aStr += "{ oj "; aStr += aJoin; if ( bUseEscape ) aStr += " }"; diff --git a/dbaccess/uiconfig/ui/specialsettingspage.ui b/dbaccess/uiconfig/ui/specialsettingspage.ui index 3574615..0072f8c 100644 --- a/dbaccess/uiconfig/ui/specialsettingspage.ui +++ b/dbaccess/uiconfig/ui/specialsettingspage.ui @@ -76,7 +76,7 @@ </child> <child> <object class="GtkCheckButton" id="useoj"> - <property name="label" translatable="yes">Use Outer Join syntax '{OJ }'</property> + <property name="label" translatable="yes">Use Outer Join syntax '{oj }'</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> commit f33c632697d59f772a28b6f91a5827eef31bd9aa Author: Caolán McNamara <[email protected]> Date: Thu Oct 9 16:08:22 2014 +0100 Resolves: fdo#65823 crash on negative position in redlined word there is possibly something deeper wrong here I think after all, see 946ea643185af680508a0333f63c086ed3f454a3 Resolves: fdo#84649 as well but for now silence this and I can investigate further later Change-Id: I1323584d1f71c14634d56ad4e4a705496b1bd1c0 (cherry picked from commit d7418f8831acdff907d404c1701870b00e974df6) Reviewed-on: https://gerrit.libreoffice.org/11884 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx index 0e3aeea..9aec54d 100644 --- a/sw/source/core/bastyp/breakit.cxx +++ b/sw/source/core/bastyp/breakit.cxx @@ -105,7 +105,7 @@ sal_uInt16 SwBreakIt::GetRealScriptOfText( const OUString& rTxt, sal_Int32 nPos --nPos; nScript = xBreak->getScriptType( rTxt, nPos ); sal_Int32 nChgPos = 0; - if ( i18n::ScriptType::WEAK == nScript && nPos + 1 < rTxt.getLength() ) + if (i18n::ScriptType::WEAK == nScript && nPos >= 0 && nPos + 1 < rTxt.getLength()) { // A weak character followed by a mark may be meant to combine with // the mark, so prefer the following character's script commit 541ea6a3f2047a4b166ac11380153ae78db5bbce Author: Caolán McNamara <[email protected]> Date: Thu Oct 9 15:40:08 2014 +0100 Resolves: fdo#60904 allow export of VBAProject xModLibContainerExport has a "VBAProject" entry but xDlgLibContainerExport doesn't, so just export the one we do have Change-Id: I15f7794904a5aff7679f2cf9fd654d741fd5cbe3 Reviewed-on: https://gerrit.libreoffice.org/11883 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 598a170..c04bbda 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -1104,8 +1104,14 @@ void LibPage::implExportLib( const OUString& aLibName, const OUString& aTargetUR if ( xModLibContainerExport.is() ) xModLibContainerExport->exportLibrary( aOULibName, aTargetURL, Handler ); - if ( xDlgLibContainerExport.is() ) - xDlgLibContainerExport->exportLibrary( aOULibName, aTargetURL, Handler ); + if (!xDlgLibContainerExport.is()) + return; + Reference<container::XNameAccess> xNameAcc(xDlgLibContainerExport, UNO_QUERY); + if (!xNameAcc.is()) + return; + if (!xNameAcc->hasByName(aOULibName)) + return; + xDlgLibContainerExport->exportLibrary(aOULibName, aTargetURL, Handler); } // Implementation XCommandEnvironment commit cc056e724edab05a19da0f3b1b364d33b33528e9 Author: Caolán McNamara <[email protected]> Date: Thu Oct 9 13:50:20 2014 +0100 Resolves: fdo#82270 Grabbing focus can invalidate the entries Change-Id: Ie9b4f936cebdcf2a37e66abef456c6b0c0e26201 (cherry picked from commit fef9bf4e39b041c7f13e4d1584e3086068e781fc) Reviewed-on: https://gerrit.libreoffice.org/11878 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 79ae60b..d08660d 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -2049,6 +2049,8 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt ) nCurTabPos = FIRST_ENTRY_TAB; nFlags &= (~F_FILLING); pView->GrabFocus(); + //fdo#82270 Grabbing focus can invalidate the entries, re-fetch + pEntry = GetEntry(aPos); // the entry can still be invalid! if( !pEntry || !pView->GetViewData( pEntry )) return; commit 0661b4a5cafcceb6fd57eca1946a1b23427d6d38 Author: Caolán McNamara <[email protected]> Date: Thu Oct 9 10:38:34 2014 +0100 Resolves: fdo#55546 center ellipsis tooltips that don't fit on screen (cherry picked from commit 912ecaf565e68d2ca3fb9584712313e712749f75) Conflicts: sw/source/uibase/docvw/edtwin2.cxx sw/source/uibase/inc/edtwin.hxx Change-Id: Ic44c9032878892fa33c839e5aaac1996e7bed943 Reviewed-on: https://gerrit.libreoffice.org/11874 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/sw/source/core/uibase/docvw/edtwin2.cxx b/sw/source/core/uibase/docvw/edtwin2.cxx index bbcaaf1..9fd7355 100644 --- a/sw/source/core/uibase/docvw/edtwin2.cxx +++ b/sw/source/core/uibase/docvw/edtwin2.cxx @@ -94,6 +94,17 @@ static OUString lcl_GetRedlineHelp( const SwRangeRedline& rRedl, bool bBalloon ) return sBuf.makeStringAndClear(); } +OUString SwEditWin::ClipLongToolTip(const OUString& rTxt) +{ + OUString sDisplayTxt(rTxt); + long nTextWidth = GetTextWidth(sDisplayTxt); + long nMaxWidth = GetDesktopRectPixel().GetWidth() * 2 / 3; + nMaxWidth = PixelToLogic(Size(nMaxWidth, 0)).Width(); + if (nTextWidth > nMaxWidth) + sDisplayTxt = GetEllipsisString(sDisplayTxt, nMaxWidth, TEXT_DRAW_CENTERELLIPSIS); + return sDisplayTxt; +} + void SwEditWin::RequestHelp(const HelpEvent &rEvt) { SwWrtShell &rSh = m_rView.GetWrtShell(); @@ -369,7 +380,8 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) aPt = OutputToScreenPixel( LogicToPixel( aRect.BottomRight() )); aRect.Right() = aPt.X(); aRect.Bottom() = aPt.Y(); - Help::ShowQuickHelp( this, aRect, sTxt, nStyle ); + OUString sDisplayTxt(ClipLongToolTip(sTxt)); + Help::ShowQuickHelp(this, aRect, sDisplayTxt, nStyle); } } @@ -410,7 +422,8 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) sTxt = SW_RESSTR(nTabRes); Size aTxtSize( GetTextWidth(sTxt), GetTextHeight()); Rectangle aRect(rEvt.GetMousePosPixel(), aTxtSize); - Help::ShowQuickHelp(this, aRect, sTxt); + OUString sDisplayTxt(ClipLongToolTip(sTxt)); + Help::ShowQuickHelp(this, aRect, sDisplayTxt); } bContinue = false; } diff --git a/sw/source/core/uibase/inc/edtwin.hxx b/sw/source/core/uibase/inc/edtwin.hxx index aade966..7e5396d 100644 --- a/sw/source/core/uibase/inc/edtwin.hxx +++ b/sw/source/core/uibase/inc/edtwin.hxx @@ -285,6 +285,11 @@ public: void SetUseInputLanguage( bool bNew ); bool IsUseInputLanguage() const { return m_bUseInputLanguage; } + /** fdo#55546 cut very long tooltips to 2/3 of the width of the screen + via center ellipsis + */ + OUString ClipLongToolTip(const OUString& rTxt); + SwFrameControlsManager& GetFrameControlsManager() { return m_aFrameControlsManager; } SwEditWin(Window *pParent, SwView &); commit 973331628e68afa4a48d842ec91fbdf6fd26db5c Author: Lionel Elie Mamane <[email protected]> Date: Mon Oct 6 12:22:03 2014 +0200 fdo#84658 on reexec, cancel modification before resetting IsModification state Change-Id: I878bff4d36ca1c2dd9474c937b03d0b366a6e911 Reviewed-on: https://gerrit.libreoffice.org/11824 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 216e2da..c136c03 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -561,6 +561,8 @@ void ORowSet::freeResources( bool _bComplete ) } m_aClones.clear(); + doCancelModification(); + m_aBookmark = Any(); m_bBeforeFirst = true; m_bAfterLast = false; commit 3a0f341df3faa190bfa19619124c997b6da2fb01 Author: Arkadiusz MiÅkiewicz <[email protected]> Date: Thu Oct 9 23:40:29 2014 +0200 Avoid bashizm in AbsolutePath() function &> is another bashizm. Avoid that since configure is run using POSIX shell. Some POSIX compatible shells like mksh do not understand bash syntax. "cd - &> /dev/null" was causing "cd -" command to go into background which means we never changed back to original directory thus fooling configure script later: config.status: error: cannot find input file: `config_host.mk.in' "&>" was also redirecting stderr which we don't want to do anymore since it hides real and interesting errors. Change-Id: I286a32e6a200afca883b159d9196f606e0fe7063 Reviewed-on: https://gerrit.libreoffice.org/11896 Reviewed-by: Samuel Mehrbrodt <[email protected]> Tested-by: Samuel Mehrbrodt <[email protected]> (cherry picked from commit d5b0697cebd7d66ee90d12f7b893c193ae36eaa6) Reviewed-on: https://gerrit.libreoffice.org/11897 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/configure.ac b/configure.ac index 7607ff4..89027c5 100644 --- a/configure.ac +++ b/configure.ac @@ -72,7 +72,7 @@ AbsolutePath() if test -d "$rel" ; then cd "$rel" || AC_MSG_ERROR([absolute path resolution failed for "$rel".]) absolute_path="$(pwd)" - cd - &> /dev/null + cd - > /dev/null else AC_MSG_ERROR([Failed to resolve absolute path. "$rel" does not exist or is not a directory.]) fi commit 59c99a3b5bfff9b9d0ea29557c5e014ce43a377a Author: Eike Rathke <[email protected]> Date: Thu Oct 9 21:10:35 2014 +0200 InsertCurrentTime: in input mode inherit matching format if set In case a date or time cell format was set, inherit that format for Ctrl+; or Ctrl+: date/time insertion while editing the cell. Change-Id: If13e680fc74ab36611f8c11d992dba4b9c91ddb4 (cherry picked from commit 980fd719648fb5b7cbe93ba23c1ee2f180ffcee8) Reviewed-on: https://gerrit.libreoffice.org/11893 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx index 1af27f9..b65eaf3 100644 --- a/sc/source/ui/view/viewfun6.cxx +++ b/sc/source/ui/view/viewfun6.cxx @@ -268,22 +268,29 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr) const sal_uInt32 nCurNumFormat = rDoc.GetNumberFormat(aCurPos); SvNumberFormatter* pFormatter = rDoc.GetFormatTable(); const SvNumberformat* pCurNumFormatEntry = pFormatter->GetEntry(nCurNumFormat); + const short nCurNumFormatType = (pCurNumFormatEntry ? + (pCurNumFormatEntry->GetType() & ~NUMBERFORMAT_DEFINED) : NUMBERFORMAT_UNDEFINED); if (bInputMode) { double fVal = 0.0; + sal_uInt32 nFormat = 0; switch (nReqFmt) { case NUMBERFORMAT_DATE: { Date aActDate( Date::SYSTEM ); fVal = aActDate - *pFormatter->GetNullDate(); + if (nCurNumFormatType == NUMBERFORMAT_DATE) + nFormat = nCurNumFormat; } break; case NUMBERFORMAT_TIME: { Time aActTime( Time::SYSTEM ); fVal = aActTime.GetTimeInDays(); + if (nCurNumFormatType == NUMBERFORMAT_TIME) + nFormat = nCurNumFormat; } break; default: @@ -294,15 +301,20 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr) { DateTime aActDateTime( DateTime::SYSTEM ); fVal = aActDateTime - DateTime( *pFormatter->GetNullDate()); + if (nCurNumFormatType == NUMBERFORMAT_DATETIME) + nFormat = nCurNumFormat; } break; } - LanguageType nLang = (pCurNumFormatEntry ? pCurNumFormatEntry->GetLanguage() : ScGlobal::eLnge); - sal_uInt32 nFormat = pFormatter->GetStandardFormat( nReqFmt, nLang); - // This would return a more precise format with seconds and 100th - // seconds for a time request. - //nFormat = pFormatter->GetStandardFormat( fVal, nFormat, nReqFmt, nLang); + if (!nFormat) + { + const LanguageType nLang = (pCurNumFormatEntry ? pCurNumFormatEntry->GetLanguage() : ScGlobal::eLnge); + nFormat = pFormatter->GetStandardFormat( nReqFmt, nLang); + // This would return a more precise format with seconds and 100th + // seconds for a time request. + //nFormat = pFormatter->GetStandardFormat( fVal, nFormat, nReqFmt, nLang); + } OUString aString; Color* pColor; pFormatter->GetOutputString( fVal, nFormat, aString, &pColor); @@ -318,8 +330,6 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr) } else { - const short nCurNumFormatType = (pCurNumFormatEntry ? - (pCurNumFormatEntry->GetType() & ~NUMBERFORMAT_DEFINED) : NUMBERFORMAT_UNDEFINED); bool bForceReqFmt = false; const double fCell = rDoc.GetValue( aCurPos); // Combine requested date/time stamp with existing cell time/date, if any. commit 7747835e4c503f64217f8c93b654207cc49441d4 Author: Caolán McNamara <[email protected]> Date: Mon Sep 29 16:58:50 2014 +0100 bump nss from 3.15.3 to 3.16.5 Reviewed-on: https://gerrit.libreoffice.org/11700 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> (cherry picked from commit 726172e3eb8370125b89f853cebb1fb901547ebe) Signed-off-by: Michael Stahl <[email protected]> Conflicts: external/nss/ExternalProject_nss.mk external/nss/nspr-build-config.patch external/nss/nss_macosx.patch Change-Id: I8318982eb1cee1a694dbdd504e0ca106a29d807e diff --git a/download.lst b/download.lst index 9c0de03..6f26f2e 100644 --- a/download.lst +++ b/download.lst @@ -103,7 +103,7 @@ export MWAW_TARBALL := libmwaw-0.3.1.tar.bz2 export MYSQLCPPCONN_TARBALL := 0981bda6548a8c8233ffce2b6e4b2a23-mysql-connector-c++-1.1.0.tar.gz export MYTHES_TARBALL := 46e92b68e31e858512b680b3b61dc4c1-mythes-1.2.3.tar.gz export NEON_TARBALL := ff369e69ef0f0143beb5626164e87ae2-neon-0.29.5.tar.gz -export NSS_TARBALL := 06beb053e257d9e22641339c905c6eba-nss-3.15.3-with-nspr-4.10.2.tar.gz +export NSS_TARBALL := b279551b7638d0e36d1199548124c247-nss-3.16.5-with-nspr-4.10.6.tar.gz export ODFGEN_MD5SUM := c22c83c17cda0754382ada4e116594b7 export ODFGEN_TARBALL := libodfgen-0.1.1.tar.bz2 export OPENCOLLADA_MD5SUM := 4ca8a6ef0afeefc864e9ef21b9f14bd6 diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk index 8fd1085..d88810f 100644 --- a/external/nss/ExternalProject_nss.mk +++ b/external/nss/ExternalProject_nss.mk @@ -16,7 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,nss,\ $(call gb_ExternalProject_get_state_target,nss,configure): $(call gb_ExternalProject_run,configure,\ - $(if $(filter MSC,$(COM)),LIB="$(ILIB)") \ + $(if $(filter MSC,$(COM)),INCLUDE="$(COMPATH)/include" LIB="$(ILIB)") \ nspr/configure --includedir=$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/out/include \ $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ $(if $(filter MSC-X86_64,$(COM)-$(CPUNAME)),--enable-64bit) \ diff --git a/external/nss/nss-linux-x86.patch.0 b/external/nss/nss-linux-x86.patch.0 index e23a786..95a489b 100644 --- a/external/nss/nss-linux-x86.patch.0 +++ b/external/nss/nss-linux-x86.patch.0 @@ -1,10 +1,10 @@ ---- nss/lib/freebl/Makefile -+++ nss/lib/freebl/Makefile -@@ -195,6 +195,7 @@ - ifeq ($(CPU_ARCH),x86) - ASFILES = mpi_x86.s +--- nss/lib/freebl/Makefile 2014-09-29 16:52:50.356265282 +0100 ++++ nss/lib/freebl/Makefile 2014-09-29 16:53:01.823340024 +0100 +@@ -110,6 +110,7 @@ + ifeq (OS2,$(OS_TARGET)) + ASFILES = mpi_x86_os2.s DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE + DEFINES += -DMP_USE_UINT_DIGIT DEFINES += -DMP_ASSEMBLY_DIV_2DX1D + DEFINES += -DMP_USE_UINT_DIGIT -DMP_NO_MP_WORD DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN - # The floating point ECC code doesn't work on Linux x86 (bug 311432). diff --git a/external/nss/nss-pem.patch b/external/nss/nss-pem.patch index c2f34fe..c3f28bc 100644 --- a/external/nss/nss-pem.patch +++ b/external/nss/nss-pem.patch @@ -5230,7 +5230,7 @@ new file mode 100644 index 0000000..1179f2a --- /dev/null +++ b/b/nss/lib/ckfw/pem/rsawrapr.c -@@ -0,0 +1,808 @@ +@@ -0,0 +1,823 @@ +/* + * PKCS#1 encoding and decoding functions. + * This file is believed to contain no code licensed from other parties. @@ -5435,6 +5435,21 @@ index 0000000..1179f2a +} + +/* ++ * RSA block types ++ * ++ * The actual values are important -- they are fixed, *not* arbitrary. ++ * The explicit value assignments are not needed (because C would give ++ * us those same values anyway) but are included as a reminder... ++ */ ++typedef enum { ++ RSA_BlockPrivate0 = 0, /* unused, really */ ++ RSA_BlockPrivate = 1, /* pad for a private-key operation */ ++ RSA_BlockPublic = 2, /* pad for a public-key operation */ ++ RSA_BlockRaw = 4, /* simply justify the block appropriately */ ++ RSA_BlockTotal ++} RSA_BlockType; ++ ++/* + * Format one block of data for public/private key encryption using + * the rules defined in PKCS #1. + */ diff --git a/external/nss/nss.aix.patch b/external/nss/nss.aix.patch index c83ae57..da9aacb 100644 --- a/external/nss/nss.aix.patch +++ b/external/nss/nss.aix.patch @@ -1,16 +1,7 @@ ---- a/a/nspr/configure 2010-08-18 07:23:01.000000000 -0500 -+++ b/b/nspr/configure 2010-08-18 07:33:11.000000000 -0500 -@@ -2973,7 +2973,8 @@ - #define SYSV 1 - EOF - -- DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib' -+ MKSHLIB='$(CCC) -shared $(DSO_LDOPTS) -o $@' -+ DSO_LDOPTS='-Wl,-brtl -Wl,-bnortllib -Wl,-blibpath:/usr/lib:/lib' - ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'` - echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6 - echo "configure:3477: checking for sys/atomic_op.h" >&5 -@@ -3102,7 +3103,6 @@ +diff -ru a/nspr/configure b/nspr/configure +--- a/a/nspr/configure 2014-09-29 16:47:42.984012225 +0100 ++++ b/b/nspr/configure 2014-09-29 16:50:33.907375937 +0100 +@@ -6369,7 +6369,6 @@ AIX_LINK_OPTS='-brtl -bnso -berok' ;; esac @@ -18,9 +9,10 @@ AIX_WRAP='$(DIST)/lib/aixwrap.o' AIX_TMP='./_aix_tmp.o' if test -n "$USE_64"; then ---- a/a/nspr/configure.in 2010-08-18 07:23:01.000000000 -0500 -+++ b/b/nspr/configure.in 2010-08-18 07:32:36.000000000 -0500 -@@ -831,7 +831,8 @@ +diff -ru a/nspr/configure.in b/nspr/configure.in +--- a/a/nspr/configure.in 2014-09-29 16:46:35.257394860 +0100 ++++ b/b/nspr/configure.in 2014-09-29 16:50:33.908375942 +0100 +@@ -1229,7 +1229,8 @@ AC_DEFINE(XP_UNIX) AC_DEFINE(AIX) AC_DEFINE(SYSV) @@ -30,7 +22,7 @@ AC_CHECK_HEADER(sys/atomic_op.h, AC_DEFINE(AIX_HAVE_ATOMIC_OP_H)) case "${target_os}" in aix3.2*) -@@ -871,10 +872,9 @@ +@@ -1269,10 +1270,9 @@ AC_DEFINE(HAVE_SOCKLEN_T) AC_DEFINE(HAVE_FCNTL_FILE_LOCKING) USE_IPV6=1 @@ -42,9 +34,10 @@ AIX_WRAP='$(DIST)/lib/aixwrap.o' AIX_TMP='./_aix_tmp.o' if test -n "$USE_64"; then ---- a/a/nspr/pr/src/Makefile.in 2010-08-18 07:23:04.000000000 -0500 -+++ b/b/nspr/pr/src/Makefile.in 2010-08-18 07:24:49.000000000 -0500 -@@ -110,7 +110,6 @@ +diff -ru a/nspr/pr/src/Makefile.in b/nspr/pr/src/Makefile.in +--- a/a/nspr/pr/src/Makefile.in 2014-09-29 16:46:35.281395079 +0100 ++++ b/b/nspr/pr/src/Makefile.in 2014-09-29 16:50:33.909375948 +0100 +@@ -74,7 +74,6 @@ endif ifeq ($(OS_ARCH),AIX) @@ -52,9 +45,58 @@ OS_LIBS = -lodm -lcfg ifeq ($(CLASSIC_NSPR),1) ifeq ($(OS_RELEASE),4.1) ---- a/a/nss/coreconf/AIX.mk 2010-08-18 07:23:06.000000000 -0500 -+++ b/b/nss/coreconf/AIX.mk 2010-08-18 07:26:26.000000000 -0500 -@@ -62,35 +62,30 @@ +diff -ru a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk +--- a/a/nss/cmd/platlibs.mk 2014-09-29 16:47:42.987012253 +0100 ++++ b/b/nss/cmd/platlibs.mk 2014-09-29 16:50:33.910375955 +0100 +@@ -134,7 +134,7 @@ + $(NULL) + + ifeq ($(OS_ARCH), AIX) +-EXTRA_SHARED_LIBS += -brtl ++EXTRA_SHARED_LIBS += -Wl,-brtl + endif + + # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) +@@ -180,7 +180,7 @@ + $(NULL) + + ifeq ($(OS_ARCH), AIX) +-EXTRA_SHARED_LIBS += -brtl ++EXTRA_SHARED_LIBS += -Wl,-brtl + endif + + # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) +diff -ru a/nss/cmd/shlibsign/Makefile b/nss/cmd/shlibsign/Makefile +--- a/a/nss/cmd/shlibsign/Makefile 2014-09-29 16:46:35.139393785 +0100 ++++ b/b/nss/cmd/shlibsign/Makefile 2014-09-29 16:50:33.910375955 +0100 +@@ -43,6 +43,9 @@ + + endif + ++ifeq ($(OS), AIX) ++EXTRA_SHARED_LIBS += -lpthreads ++endif + + # sign any and all shared libraries that contain the word freebl + ifeq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1) +diff -ru a/nss/cmd/shlibsign/mangle/Makefile b/nss/cmd/shlibsign/mangle/Makefile +--- a/a/nss/cmd/shlibsign/mangle/Makefile 2014-09-29 16:46:35.139393785 +0100 ++++ b/b/nss/cmd/shlibsign/mangle/Makefile 2014-09-29 16:50:33.910375955 +0100 +@@ -43,7 +43,9 @@ + + endif + +- ++ifeq ($(OS), AIX) ++EXTRA_SHARED_LIBS += -lpthreads ++endif + + ####################################################################### + # (5) Execute "global" rules. (OPTIONAL) # +diff -ru a/nss/coreconf/AIX.mk b/nss/coreconf/AIX.mk +--- a/a/nss/coreconf/AIX.mk 2014-09-29 16:46:35.040392883 +0100 ++++ b/b/nss/coreconf/AIX.mk 2014-09-29 16:50:33.909375948 +0100 +@@ -30,35 +30,30 @@ DEFAULT_COMPILER = xlc_r @@ -96,48 +138,3 @@ ifeq ($(USE_64), 1) OS_CFLAGS += -DAIX_64BIT OBJECT_MODE=64 ---- a/a/nss/cmd/platlibs.mk 2010-08-18 07:23:18.000000000 -0500 -+++ b/b/nss/cmd/platlibs.mk 2010-08-18 07:26:48.000000000 -0500 -@@ -136,7 +136,7 @@ - $(NULL) - - ifeq ($(OS_ARCH), AIX) --EXTRA_SHARED_LIBS += -brtl -+EXTRA_SHARED_LIBS += -Wl,-brtl - endif - - # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) -@@ -186,7 +186,7 @@ - $(NULL) - - ifeq ($(OS_ARCH), AIX) --EXTRA_SHARED_LIBS += -brtl -+EXTRA_SHARED_LIBS += -Wl,-brtl - endif - - # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) ---- a/a/nss/cmd/shlibsign/mangle/Makefile 2010-08-18 07:23:20.000000000 -0500 -+++ b/b/nss/cmd/shlibsign/mangle/Makefile 2010-08-18 07:42:44.000000000 -0500 -@@ -75,7 +75,9 @@ - - endif - -- -+ifeq ($(OS), AIX) -+EXTRA_SHARED_LIBS += -lpthreads -+endif - - ####################################################################### - # (5) Execute "global" rules. (OPTIONAL) # ---- a/a/nss/cmd/shlibsign/Makefile 2010-08-18 08:00:17.000000000 -0500 -+++ b/b/nss/cmd/shlibsign/Makefile 2010-08-18 07:55:55.000000000 -0500 -@@ -45,6 +45,9 @@ - - endif - -+ifeq ($(OS), AIX) -+EXTRA_SHARED_LIBS += -lpthreads -+endif - - # sign any and all shared libraries that contain the word freebl - ifeq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1) diff --git a/external/nss/nss.patch b/external/nss/nss.patch index 95a0049..6a01ca8 100644 --- a/external/nss/nss.patch +++ b/external/nss/nss.patch @@ -1,6 +1,7 @@ ---- a/a/nspr/configure 2010-02-08 19:41:35.000000000 +0100 -+++ b/b/nspr/configure 2010-06-11 16:35:54.960188991 +0200 -@@ -3900,7 +3900,7 @@ +diff -ru a/nspr/configure b/nspr/configure +--- a/a/nspr/configure 2014-09-29 16:46:38.427423757 +0100 ++++ b/b/nspr/configure 2014-09-29 16:47:42.984012225 +0100 +@@ -7018,7 +7018,7 @@ PR_MD_CSRCS=linux.c MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' DSO_CFLAGS=-fPIC @@ -9,9 +10,61 @@ _OPTIMIZE_FLAGS=-O2 _DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb, and that # combo is not yet good at debugging inlined ---- a/a/nss/coreconf/FreeBSD.mk 2009-11-23 05:06:29.000000000 -0500 -+++ b/b/nss/coreconf/FreeBSD.mk 2012-08-28 20:27:20.000000000 -0400 -@@ -57,6 +57,7 @@ +diff -ru a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk +--- a/a/nss/cmd/platlibs.mk 2014-09-29 16:46:38.306422654 +0100 ++++ b/b/nss/cmd/platlibs.mk 2014-09-29 16:47:42.987012253 +0100 +@@ -10,17 +10,22 @@ + + ifeq ($(OS_ARCH), SunOS) + ifeq ($(USE_64), 1) +-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64' ++#In OOo we would probable put the executables next to libs ++EXTRA_SHARED_LIBS += -R '$$ORIGIN' + else +-EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps' ++EXTRA_SHARED_LIBS += -R '$$ORIGIN' + endif + endif + ++ifeq ($(OS_ARCH), FreeBSD) ++EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN' ++endif ++ + ifeq ($(OS_ARCH), Linux) + ifeq ($(USE_64), 1) +-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib' ++EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN' + else +-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib' ++EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN' + endif + endif + +diff -ru a/nss/coreconf/arch.mk b/nss/coreconf/arch.mk +--- a/a/nss/coreconf/arch.mk 2014-09-29 16:46:38.175421471 +0100 ++++ b/b/nss/coreconf/arch.mk 2014-09-29 16:47:42.986012244 +0100 +@@ -280,10 +280,15 @@ + # IMPL_STRATEGY may be defined too. + # + +-OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ ++# OBJDIR_NAME is used to build the directory containing the built objects, for ++# example mozilla/dist/Linux2.6_x86_glibc_PTH_DBG.OBJ ++# We need to deliver the contents of that folder into the solver. To make that easier ++# in the makefile we rename this directory to "out". ++#OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ ++OBJDIR_NAME = out + + ifeq (,$(filter-out WIN%,$(OS_TARGET))) +-ifndef BUILD_OPT ++ifdef THIS_HAS_BEEN_DISABLED_TO_GET_out + # + # Define USE_DEBUG_RTL if you want to use the debug runtime library + # (RTL) in the debug build +diff -ru a/nss/coreconf/FreeBSD.mk b/nss/coreconf/FreeBSD.mk +--- a/a/nss/coreconf/FreeBSD.mk 2014-09-29 16:46:38.189421588 +0100 ++++ b/b/nss/coreconf/FreeBSD.mk 2014-09-29 16:47:42.984012225 +0100 +@@ -25,6 +25,7 @@ DSO_CFLAGS = -fPIC DSO_LDOPTS = -shared -Wl,-soname -Wl,$(notdir $@) @@ -19,9 +72,10 @@ # # The default implementation strategy for FreeBSD is pthreads. ---- a/a/nss/coreconf/Linux.mk 2010-01-15 23:19:00.000000000 +0100 -+++ b/b/nss/coreconf/Linux.mk 2010-06-11 16:35:54.981151732 +0200 -@@ -46,8 +46,11 @@ +diff -ru a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk +--- a/a/nss/coreconf/Linux.mk 2014-09-29 16:46:38.189421588 +0100 ++++ b/b/nss/coreconf/Linux.mk 2014-09-29 16:47:42.985012235 +0100 +@@ -16,8 +16,11 @@ IMPL_STRATEGY = _PTH endif @@ -35,7 +89,7 @@ RANLIB = ranlib DEFAULT_COMPILER = gcc -@@ -147,7 +150,7 @@ +@@ -145,7 +148,7 @@ # incorrectly reports undefined references in the libraries we link with, so # we don't use -z defs there. ZDEFS_FLAG = -Wl,-z,defs @@ -44,7 +98,7 @@ LDFLAGS += $(ARCHFLAG) # On Maemo, we need to use the -rpath-link flag for even the standard system -@@ -158,8 +161,13 @@ +@@ -176,8 +179,13 @@ endif endif @@ -58,9 +112,22 @@ # The -rpath '$$ORIGIN' linker option instructs this library to search for its # dependencies in the same directory where it resides. ---- a/a/nss/coreconf/SunOS5.mk 2009-06-11 02:55:32.000000000 +0200 -+++ b/b/nss/coreconf/SunOS5.mk 2010-06-11 16:35:54.985571182 +0200 -@@ -89,8 +89,12 @@ +diff -ru a/nss/coreconf/rules.mk b/nss/coreconf/rules.mk +--- a/a/nss/coreconf/rules.mk 2014-09-29 16:46:38.188421578 +0100 ++++ b/b/nss/coreconf/rules.mk 2014-09-29 16:47:42.986012244 +0100 +@@ -261,7 +261,7 @@ + ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET))) + $(AR) $(subst /,\\,$(OBJS)) + else +- $(AR) $(OBJS) ++ $(AR) cr $@ $(OBJS) + endif + $(RANLIB) $@ + +diff -ru a/nss/coreconf/SunOS5.mk b/nss/coreconf/SunOS5.mk +--- a/a/nss/coreconf/SunOS5.mk 2014-09-29 16:46:38.175421471 +0100 ++++ b/b/nss/coreconf/SunOS5.mk 2014-09-29 16:47:42.985012235 +0100 +@@ -48,8 +48,12 @@ # OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer endif else @@ -75,71 +142,12 @@ ASFLAGS += -Wa,-P OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG) ifndef BUILD_OPT ---- a/a/nss/coreconf/arch.mk 2009-06-05 04:14:49.000000000 +0200 -+++ b/b/nss/coreconf/arch.mk 2010-06-11 16:35:54.990913282 +0200 -@@ -324,10 +324,15 @@ - # IMPL_STRATEGY may be defined too. - # - --OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ -+# OBJDIR_NAME is used to build the directory containing the built objects, for -+# example mozilla/dist/Linux2.6_x86_glibc_PTH_DBG.OBJ -+# We need to deliver the contents of that folder into the solver. To make that easier -+# in the makefile we rename this directory to "out". -+#OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ -+OBJDIR_NAME = out - - ifeq (,$(filter-out WIN%,$(OS_TARGET))) --ifndef BUILD_OPT -+ifdef THIS_HAS_BEEN_DISABLED_TO_GET_out - # - # Define USE_DEBUG_RTL if you want to use the debug runtime library - # (RTL) in the debug build ---- a/a/nss/coreconf/rules.mk -+++ b/b/nss/coreconf/rules.mk -@@ -293,7 +293,7 @@ - ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET))) - $(AR) $(subst /,\\,$(OBJS)) - else -- $(AR) $(OBJS) -+ $(AR) cr $@ $(OBJS) - endif - $(RANLIB) $@ - ---- a/a/nss/Makefile -+++ b/b/nss/Makefile +diff -ru a/nss/Makefile b/nss/Makefile +--- a/a/nss/Makefile 2014-09-29 16:46:38.171421425 +0100 ++++ b/b/nss/Makefile 2014-09-29 16:47:42.987012253 +0100 @@ -1,3 +1,5 @@ +export AR +export RANLIB #! gmake # # This Source Code Form is subject to the terms of the Mozilla Public ---- a/a/nss/cmd/platlibs.mk 2010-02-04 19:59:10.000000000 +0100 -+++ b/b/nss/cmd/platlibs.mk 2010-06-11 16:35:55.004869805 +0200 -@@ -41,17 +41,22 @@ - - ifeq ($(OS_ARCH), SunOS) - ifeq ($(USE_64), 1) --EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1/64:/usr/lib/mps/64' -+#In OOo we would probable put the executables next to libs -+EXTRA_SHARED_LIBS += -R '$$ORIGIN' - else --EXTRA_SHARED_LIBS += -R '$$ORIGIN/../lib:/usr/lib/mps/secv1:/usr/lib/mps' -+EXTRA_SHARED_LIBS += -R '$$ORIGIN' - endif - endif - -+ifeq ($(OS_ARCH), FreeBSD) -+EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN' -+endif -+ - ifeq ($(OS_ARCH), Linux) - ifeq ($(USE_64), 1) --EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib' -+EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN' - else --EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib' -+EXTRA_SHARED_LIBS += -Wl,-z,origin -Wl,-rpath,'$$ORIGIN' - endif - endif - diff --git a/external/nss/nss_macosx.patch b/external/nss/nss_macosx.patch index 853cd34..7c099bc 100644 --- a/external/nss/nss_macosx.patch +++ b/external/nss/nss_macosx.patch @@ -1,19 +1,8 @@ ---- a/a/nss/Makefile 2008-12-03 00:24:39.000000000 +0100 -+++ b/b/nss/Makefile 2009-11-27 13:36:22.662753328 +0100 -@@ -104,6 +104,9 @@ - ifeq ($(OS_TARGET),WIN95) - NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95 - endif -+ifdef MACOS_SDK_DIR -+NSPR_CONFIGURE_OPTS += --with-macos-sdk=$(MACOS_SDK_DIR) -+endif - ifdef USE_DEBUG_RTL - NSPR_CONFIGURE_OPTS += --enable-debug-rtl - endif ---- a/a/nspr/configure -+++ b/b/nspr/configure -@@ -3888,7 +3889,7 @@ - fi +diff -ru a/nspr/configure b/nspr/configure +--- a/a/nspr/configure 2014-09-29 16:50:33.907375937 +0100 ++++ b/b/nspr/configure 2014-09-29 16:51:59.213931947 +0100 +@@ -6577,7 +6579,7 @@ + DSO_CFLAGS=-fPIC - DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names' @@ -21,9 +10,10 @@ _OPTIMIZE_FLAGS=-O2 MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' STRIP="$STRIP -x -S" ---- a/a/nss/coreconf/Darwin.mk -+++ b/b/nss/coreconf/Darwin.mk -@@ -39,8 +39,12 @@ +diff -ru a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk +--- a/a/nss/coreconf/Darwin.mk 2014-09-29 16:50:22.992304799 +0100 ++++ b/b/nss/coreconf/Darwin.mk 2014-09-29 16:51:59.214931953 +0100 +@@ -7,8 +7,12 @@ DEFAULT_COMPILER = gcc @@ -91,3 +81,16 @@ MKSHLIB = $(CC) $(DSO_LDOPTS) $(DARWIN_SDK_SHLIBFLAGS) DLL_SUFFIX = dylib +diff -ru a/nss/Makefile b/nss/Makefile +--- a/a/nss/Makefile 2014-09-29 16:50:22.990304789 +0100 ++++ b/b/nss/Makefile 2014-09-29 16:51:59.207931908 +0100 +@@ -72,6 +72,9 @@ + ifeq ($(OS_TARGET),WIN95) + NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95 + endif ++ifdef MACOS_SDK_DIR ++NSPR_CONFIGURE_OPTS += --with-macos-sdk=$(MACOS_SDK_DIR) ++endif + ifdef USE_DEBUG_RTL + NSPR_CONFIGURE_OPTS += --enable-debug-rtl + endif commit b18f0ba5694df72c9906e2814da83375ddd1a5b3 Author: Matthew J. Francis <[email protected]> Date: Thu Oct 9 13:02:18 2014 +0800 fdo#84810 Avoid calc crash when using Paste Special - Link Change-Id: I52c072578ccc0b9f75a850613056e74d400eb532 Reviewed-on: https://gerrit.libreoffice.org/11867 Reviewed-by: Kohei Yoshida <[email protected]> Tested-by: Kohei Yoshida <[email protected]> (cherry picked from commit 2b6619c597a791775e2d41a68f7e85ef75d1aaa2) Reviewed-on: https://gerrit.libreoffice.org/11875 diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx index e468dd3..baf7314 100644 --- a/sc/source/core/data/document10.cxx +++ b/sc/source/core/data/document10.cxx @@ -76,6 +76,8 @@ bool ScDocument::CopyOneCellFromClip( return false; ScCellValue& rSrcCell = rCxt.getSingleCell(); + const ScPatternAttr* pAttr = pClipDoc->GetPattern(aSrcPos); + rCxt.setSingleCellPattern(pAttr); if (rCxt.isAsLink()) { ScSingleRefData aRef; @@ -89,8 +91,6 @@ bool ScDocument::CopyOneCellFromClip( else { rSrcCell.set(pClipDoc->GetRefCellValue(aSrcPos)); - const ScPatternAttr* pAttr = pClipDoc->GetPattern(aSrcPos); - rCxt.setSingleCellPattern(pAttr); // Check the paste flag to see whether we want to paste this cell. If the // flag says we don't want to paste this cell, we'll return with true. commit e560d2ac1eda68a2bbfdec03e376bff1db8c5499 Author: Katarina Behrens <[email protected]> Date: Thu Jul 17 22:35:46 2014 +0200 fdo#77319: set spinbox value AFTER adjusting no. of decimal places Doing it the other way round truncates the values Change-Id: Ieb14c9d1b9dde496eac24737aced7c8da8ce1346 Reviewed-on: https://gerrit.libreoffice.org/11865 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index 60b4987..8157301 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -93,6 +93,8 @@ ErrorBarResources::ErrorBarResources( VclBuilderContainer* pParent, Dialog * pPa m_eErrorBarType( eType ), m_nConstDecimalDigits( 1 ), m_nConstSpinSize( 1 ), + m_fPlusValue(0.0), + m_fMinusValue(0.0), m_pParentDialog( pParentDialog ), m_pCurrentRangeChoosingField( 0 ), m_bHasInternalDataProvider( true ), @@ -271,6 +273,13 @@ void ErrorBarResources::UpdateControlStates() m_pMfNegative->SetDecimalDigits( m_nConstDecimalDigits ); m_pMfNegative->SetSpinSize( m_nConstSpinSize ); } + + sal_Int32 nPlusValue = static_cast< sal_Int32 >( m_fPlusValue * pow(10.0,m_pMfPositive->GetDecimalDigits()) ); + sal_Int32 nMinusValue = static_cast< sal_Int32 >( m_fMinusValue * pow(10.0,m_pMfNegative->GetDecimalDigits()) ); + + m_pMfPositive->SetValue( nPlusValue ); + m_pMfNegative->SetValue( nMinusValue ); + m_pMfPositive->SetCustomUnitText( aCustomUnit ); m_pMfNegative->SetCustomUnitText( aCustomUnit ); @@ -530,24 +539,19 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) // parameters aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTPLUS, true, &pPoolItem ); m_bPlusUnique = ( aState != SFX_ITEM_DONTCARE ); - double fPlusValue = 0.0; if( aState == SFX_ITEM_SET ) { - fPlusValue = ((const SvxDoubleItem*) pPoolItem)->GetValue(); - sal_Int32 nPlusValue = static_cast< sal_Int32 >( fPlusValue * pow(10.0,m_pMfPositive->GetDecimalDigits()) ); - m_pMfPositive->SetValue( nPlusValue ); + m_fPlusValue = ((const SvxDoubleItem*) pPoolItem)->GetValue(); } aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTMINUS, true, &pPoolItem ); m_bMinusUnique = ( aState != SFX_ITEM_DONTCARE ); if( aState == SFX_ITEM_SET ) { - double fMinusValue = ((const SvxDoubleItem*) pPoolItem)->GetValue(); - sal_Int32 nMinusValue = static_cast< sal_Int32 >( fMinusValue * pow(10.0,m_pMfNegative->GetDecimalDigits()) ); - m_pMfNegative->SetValue( nMinusValue ); + m_fMinusValue = ((const SvxDoubleItem*) pPoolItem)->GetValue(); if( m_eErrorKind != CHERROR_RANGE && - fPlusValue == fMinusValue ) + m_fPlusValue == m_fMinusValue ) m_pCbSyncPosNeg->Check(); } diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx index 7851418..95706bc 100644 --- a/chart2/source/controller/inc/res_ErrorBar.hxx +++ b/chart2/source/controller/inc/res_ErrorBar.hxx @@ -114,6 +114,8 @@ private: tErrorBarType m_eErrorBarType; sal_uInt16 m_nConstDecimalDigits; sal_Int64 m_nConstSpinSize; + double m_fPlusValue; + double m_fMinusValue; Dialog * m_pParentDialog; boost::scoped_ptr< RangeSelectionHelper > m_apRangeSelectionHelper; commit d3a0d61ce9dab37b7e05b4376ed8f940bd1c95c8 Author: LuboÅ¡ LuÅák <[email protected]> Date: Wed Oct 1 13:09:36 2014 +0200 fix docx redline import (bnc#821804) This is a squash of commits b6969634..fd26de3b. Change-Id: I8984001d7f85c00eb9b9943b25b8abb6e2ee28d3 Reviewed-on: https://gerrit.libreoffice.org/11789 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/sw/CppunitTest_sw_ooxmlimport.mk b/sw/CppunitTest_sw_ooxmlimport.mk index 2c4682b..a77787e 100644 --- a/sw/CppunitTest_sw_ooxmlimport.mk +++ b/sw/CppunitTest_sw_ooxmlimport.mk @@ -24,6 +24,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_ooxmlimport, \ unotest \ utl \ sw \ + tl \ vcl \ $(gb_UWINAPI) \ )) diff --git a/sw/qa/extras/ooxmlimport/data/bnc821804.docx b/sw/qa/extras/ooxmlimport/data/bnc821804.docx new file mode 100644 index 0000000..9ec2e07 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/bnc821804.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 07761dd..900a25e 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -54,11 +54,13 @@ #include <com/sun/star/style/CaseMap.hpp> #include <com/sun/star/style/PageStyleLayout.hpp> #include <com/sun/star/style/ParagraphAdjust.hpp> +#include <com/sun/star/util/DateTime.hpp> #include <vcl/svapp.hxx> #include <unotools/fltrcfg.hxx> #include <comphelper/sequenceashashmap.hxx> #include <com/sun/star/text/GraphicCrop.hpp> #include <swtypes.hxx> +#include <tools/datetimeutils.hxx> #include <bordertest.hxx> @@ -2284,6 +2286,115 @@ DECLARE_OOXMLIMPORT_TEST(testBnc891663, "bnc891663.docx") CPPUNIT_ASSERT( textNextRowTop >= imageTop + imageHeight ); } +static OString dateTimeToString( const util::DateTime& dt ) +{ + return DateTimeToOString( DateTime( Date( dt.Day, dt.Month, dt.Year ), Time( dt.Hours, dt.Minutes, dt.Seconds ))); +} + +DECLARE_OOXMLIMPORT_TEST(testBnc821804, "bnc821804.docx") +{ + CPPUNIT_ASSERT_EQUAL( OUString( "TITLE" ), getRun( getParagraph( 1 ), 1 )->getString()); + CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(1), 1), "RedlineType")); + // Redline information (SwXRedlinePortion) are separate "runs" apparently. + CPPUNIT_ASSERT(hasProperty(getRun(getParagraph(1), 2), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(1), 2), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(1), 2), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString("unknown1"),getProperty<OUString>(getRun(getParagraph(1), 2), "RedlineAuthor")); + CPPUNIT_ASSERT_EQUAL(OString("2006-08-29T09:46:00Z"),dateTimeToString(getProperty<util::DateTime>(getRun(getParagraph(1), 2), "RedlineDateTime"))); + // So only the 3rd run is actual text (and the two runs have been merged into one, not sure why, but that shouldn't be a problem). + CPPUNIT_ASSERT_EQUAL(OUString(" (1st run of an insert) (2nd run of an insert)"), getRun(getParagraph(1),3)->getString()); + CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(1), 3), "RedlineType")); + // And the end SwXRedlinePortion of the redline. + CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(1), 4), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(OUString("unknown1"),getProperty<OUString>(getRun(getParagraph(1), 4), "RedlineAuthor")); + CPPUNIT_ASSERT_EQUAL(OString("2006-08-29T09:46:00Z"),dateTimeToString(getProperty<util::DateTime>(getRun(getParagraph(1), 4), "RedlineDateTime"))); + CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(1), 4), "IsStart")); + + CPPUNIT_ASSERT_EQUAL(OUString("Normal text"), getRun(getParagraph(2),1)->getString()); + CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(2), 1), "RedlineType")); + + CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty<OUString>(getRun(getParagraph(3), 1), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(OUString("unknown2"),getProperty<OUString>(getRun(getParagraph(3), 1), "RedlineAuthor")); + CPPUNIT_ASSERT_EQUAL(OString("2006-08-29T09:47:00Z"),dateTimeToString(getProperty<util::DateTime>(getRun(getParagraph(3), 1), "RedlineDateTime"))); + CPPUNIT_ASSERT_EQUAL(OUString("Deleted"), getRun(getParagraph(3),2)->getString()); + + // This is both inserted and formatted, so there are two SwXRedlinePortion "runs". Given that the redlines overlap and Writer core + // doesn't officially expect that (even though it copes, the redline info will be split depending on how Writer deal with it). + CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(4), 1), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(4), 1), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString("ParagraphFormat"),getProperty<OUString>(getRun(getParagraph(4), 2), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(4), 2), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString("Inserted and formatted"), getRun(getParagraph(4),3)->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(4), 4), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(4), 4), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString(" and this is only formatted"), getRun(getParagraph(4),5)->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("ParagraphFormat"),getProperty<OUString>(getRun(getParagraph(4), 6), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(4), 6), "IsStart")); + + CPPUNIT_ASSERT_EQUAL(OUString("Normal text"), getRun(getParagraph(5),1)->getString()); + CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(5), 1), "RedlineType")); + + CPPUNIT_ASSERT_EQUAL(OUString("Format"),getProperty<OUString>(getRun(getParagraph(6), 1), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(6), 1), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString("unknown5"),getProperty<OUString>(getRun(getParagraph(6), 1), "RedlineAuthor")); + CPPUNIT_ASSERT_EQUAL(OString("2006-08-29T10:02:00Z"),dateTimeToString(getProperty<util::DateTime>(getRun(getParagraph(6), 1), "RedlineDateTime"))); + CPPUNIT_ASSERT_EQUAL(OUString("Formatted run"), getRun(getParagraph(6),2)->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("Format"),getProperty<OUString>(getRun(getParagraph(6), 3), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(6), 3), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString(" and normal text here "), getRun(getParagraph(6),4)->getString()); + CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(6), 4), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(6), 5), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(6), 5), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString("unknown6"),getProperty<OUString>(getRun(getParagraph(6), 5), "RedlineAuthor")); + CPPUNIT_ASSERT_EQUAL(OString("2006-08-29T09:48:00Z"),dateTimeToString(getProperty<util::DateTime>(getRun(getParagraph(6), 5), "RedlineDateTime"))); + CPPUNIT_ASSERT_EQUAL(OUString("and inserted again"), getRun(getParagraph(6),6)->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(6), 7), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(6), 7), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString(" and normal text again "), getRun(getParagraph(6),8)->getString()); + CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(6), 8), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(OUString("Format"),getProperty<OUString>(getRun(getParagraph(6), 9), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(6), 9), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString("unknown7"),getProperty<OUString>(getRun(getParagraph(6), 9), "RedlineAuthor")); + CPPUNIT_ASSERT_EQUAL(OUString("and formatted"), getRun(getParagraph(6),10)->getString()); + CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(6), 11), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString(" and normal."), getRun(getParagraph(6),12)->getString()); + CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(6), 12), "RedlineType")); + + CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(7), 1), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(7), 1), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString("unknown8"),getProperty<OUString>(getRun(getParagraph(7), 1), "RedlineAuthor")); + CPPUNIT_ASSERT_EQUAL(OUString("One insert."), getRun(getParagraph(7),2)->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(7), 3), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(7), 3), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(7), 4), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(7), 4), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString("unknown9"),getProperty<OUString>(getRun(getParagraph(7), 4), "RedlineAuthor")); + CPPUNIT_ASSERT_EQUAL(OUString("Second insert."), getRun(getParagraph(7),5)->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("Insert"),getProperty<OUString>(getRun(getParagraph(7), 6), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(7), 6), "IsStart")); + + // Overlapping again. + CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty<OUString>(getRun(getParagraph(8), 1), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(8), 1), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString("ParagraphFormat"),getProperty<OUString>(getRun(getParagraph(8), 2), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(8), 2), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString("Deleted and formatted"), getRun(getParagraph(8),3)->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("Delete"),getProperty<OUString>(getRun(getParagraph(8), 4), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(8), 4), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString(" and this is only formatted"), getRun(getParagraph(8),5)->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("ParagraphFormat"),getProperty<OUString>(getRun(getParagraph(8), 6), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(8), 6), "IsStart")); + + CPPUNIT_ASSERT_EQUAL(OUString("Normal text"), getRun(getParagraph(9),1)->getString()); + CPPUNIT_ASSERT(!hasProperty(getRun(getParagraph(9), 1), "RedlineType")); + + CPPUNIT_ASSERT_EQUAL(OUString("ParagraphFormat"),getProperty<OUString>(getRun(getParagraph(10), 1), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(true,getProperty<bool>(getRun(getParagraph(10), 1), "IsStart")); + CPPUNIT_ASSERT_EQUAL(OUString("This is only formatted."), getRun(getParagraph(10),2)->getString()); + CPPUNIT_ASSERT_EQUAL(OUString("ParagraphFormat"),getProperty<OUString>(getRun(getParagraph(10), 3), "RedlineType")); + CPPUNIT_ASSERT_EQUAL(false,getProperty<bool>(getRun(getParagraph(10), 3), "IsStart")); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/core/uibase/misc/redlndlg.cxx b/sw/source/core/uibase/misc/redlndlg.cxx index d3dc31f..3a062a4 100644 --- a/sw/source/core/uibase/misc/redlndlg.cxx +++ b/sw/source/core/uibase/misc/redlndlg.cxx @@ -338,6 +338,7 @@ OUString SwRedlineAcceptDlg::GetActionText(const SwRangeRedline& rRedln, sal_uIn case nsRedlineType_t::REDLINE_INSERT: return sInserted; case nsRedlineType_t::REDLINE_DELETE: return sDeleted; case nsRedlineType_t::REDLINE_FORMAT: return sFormated; + case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: return sFormated; case nsRedlineType_t::REDLINE_TABLE: return sTableChgd; case nsRedlineType_t::REDLINE_FMTCOLL: return sFmtCollSet; default:;//prevent warning @@ -1092,6 +1093,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl) nResId = STR_REDLINE_DELETED; break; case nsRedlineType_t::REDLINE_FORMAT: + case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: nResId = STR_REDLINE_FORMATED; break; case nsRedlineType_t::REDLINE_TABLE: diff --git a/sw/source/core/uibase/shells/textfld.cxx b/sw/source/core/uibase/shells/textfld.cxx index ce20366..cace5c5 100644 --- a/sw/source/core/uibase/shells/textfld.cxx +++ b/sw/source/core/uibase/shells/textfld.cxx @@ -82,6 +82,7 @@ static OUString& lcl_AppendRedlineStr( OUString& rStr, sal_uInt16 nRedlId ) case nsRedlineType_t::REDLINE_INSERT: nResId = STR_REDLINE_INSERTED; break; case nsRedlineType_t::REDLINE_DELETE: nResId = STR_REDLINE_DELETED; break; case nsRedlineType_t::REDLINE_FORMAT: nResId = STR_REDLINE_FORMATED; break; + case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: nResId = STR_REDLINE_FORMATED; break; case nsRedlineType_t::REDLINE_TABLE: nResId = STR_REDLINE_TABLECHG; break; case nsRedlineType_t::REDLINE_FMTCOLL: nResId = STR_REDLINE_FMTCOLLSET; break; } diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index 314178d..855d11b 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -209,6 +209,7 @@ static OUString lcl_RedlineTypeToOUString(RedlineType_t eType) case nsRedlineType_t::REDLINE_INSERT: sRet = "Insert"; break; case nsRedlineType_t::REDLINE_DELETE: sRet = "Delete"; break; case nsRedlineType_t::REDLINE_FORMAT: sRet = "Format"; break; + case nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT: sRet = "ParagraphFormat"; break; case nsRedlineType_t::REDLINE_TABLE: sRet = "TextTable"; break; case nsRedlineType_t::REDLINE_FMTCOLL:sRet = "Style"; break; } diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index d97f471..90ae6e9 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2169,9 +2169,10 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) } break; case NS_ooxml::LN_endtrackchange: - m_pImpl->RemoveCurrentRedline( ); + m_pImpl->RemoveTopRedline(); break; case NS_ooxml::LN_CT_RPrChange_rPr: + { // Push all the current 'Character' properties to the stack, so that we don't store them // as 'tracked changes' by mistake m_pImpl->PushProperties(CONTEXT_CHARACTER); @@ -2179,19 +2180,19 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) // Resolve all the properties that are under the 'rPrChange'->'rPr' XML node resolveSprmProps(*this, rSprm ); - if (m_pImpl->GetTopContext()) - { - // Get all the properties that were processed in the 'rPrChange'->'rPr' XML node - uno::Sequence< beans::PropertyValue > currentRedlineRevertProperties = m_pImpl->GetTopContext()->GetPropertyValues(); - - // Store these properties in the current redline object - m_pImpl->SetCurrentRedlineRevertProperties( currentRedlineRevertProperties ); - } + // Get all the properties that were processed in the 'rPrChange'->'rPr' XML node + uno::Sequence< beans::PropertyValue > currentRedlineRevertProperties = m_pImpl->GetTopContext()->GetPropertyValues(); // Pop back out the character properties that were on the run m_pImpl->PopProperties(CONTEXT_CHARACTER); + + // Store these properties in the current redline object (do it after the PopProperties() above, since + // otherwise it'd be stored in the content dropped there). + m_pImpl->SetCurrentRedlineRevertProperties( currentRedlineRevertProperties ); + } break; case NS_ooxml::LN_CT_PPrChange_pPr: + { // Push all the current 'Paragraph' properties to the stack, so that we don't store them // as 'tracked changes' by mistake m_pImpl->PushProperties(CONTEXT_PARAGRAPH); @@ -2199,17 +2200,16 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext ) // Resolve all the properties that are under the 'pPrChange'->'pPr' XML node resolveSprmProps(*this, rSprm ); - if (m_pImpl->GetTopContext()) - { - // Get all the properties that were processed in the 'pPrChange'->'pPr' XML node - uno::Sequence< beans::PropertyValue > currentRedlineRevertProperties = m_pImpl->GetTopContext()->GetPropertyValues(); - - // Store these properties in the current redline object - m_pImpl->SetCurrentRedlineRevertProperties( currentRedlineRevertProperties ); - } + // Get all the properties that were processed in the 'pPrChange'->'pPr' XML node + uno::Sequence< beans::PropertyValue > currentRedlineRevertProperties = m_pImpl->GetTopContext()->GetPropertyValues(); // Pop back out the character properties that were on the run m_pImpl->PopProperties(CONTEXT_PARAGRAPH); + + // Store these properties in the current redline object (do it after the PopProperties() above, since + // otherwise it'd be stored in the content dropped there). + m_pImpl->SetCurrentRedlineRevertProperties( currentRedlineRevertProperties ); + } break; case NS_ooxml::LN_object: { @@ -3288,7 +3288,7 @@ void DomainMapper::HandleRedline( Sprm& rSprm ) { sal_uInt32 nSprmId = rSprm.getId(); - m_pImpl->AddNewRedline( ); + m_pImpl->AddNewRedline( nSprmId ); if (nSprmId == NS_ooxml::LN_CT_PPr_pPrChange) { @@ -3328,6 +3328,7 @@ void DomainMapper::HandleRedline( Sprm& rSprm ) default: OSL_FAIL( "redline token other than mod, ins, del or table row" ); break; } m_pImpl->EndParaMarkerChange( ); + m_pImpl->SetCurrentRedlineIsRead(); } } //namespace dmapper diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 23b976b..ffa4bae 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1625,7 +1625,7 @@ void DomainMapper_Impl::PushFootOrEndnote( bool bIsFootnote ) } } -void DomainMapper_Impl::CreateRedline( uno::Reference< text::XTextRange > xRange, RedlineParamsPtr& pRedline ) +void DomainMapper_Impl::CreateRedline( uno::Reference< text::XTextRange > xRange, RedlineParamsPtr pRedline ) { if ( pRedline.get( ) ) { @@ -1679,21 +1679,25 @@ void DomainMapper_Impl::CheckParaMarkerRedline( uno::Reference< text::XTextRange void DomainMapper_Impl::CheckRedline( uno::Reference< text::XTextRange > xRange ) { - vector<RedlineParamsPtr>::iterator pIt = m_aRedlines.top().begin( ); - vector< RedlineParamsPtr > aCleaned; + // Writer core "officially" does not like overlapping redlines, and its UNO interface is stupid enough + // to not prevent that. However, in practice in fact everything appears to work fine (except for the debug warnings + // about redline table corruption, which may possibly be harmless in reality). So leave this as it is, since this + // is a better representation of how the changes happened. If this will ever become a problem, overlapping redlines + // will need to be merged into one, just like doing the changes in the UI does, which will lose some information + // (and so if that happens, it may be better to fix Writer). + // Create the redlines here from lowest (formats) to highest (inserts/removals) priority, since the last one is + // what Writer presents graphically, so this will show deletes as deleted text and not as just formatted text being there. + if( GetTopContextOfType(CONTEXT_PARAGRAPH) != NULL ) + for( std::vector<RedlineParamsPtr>::const_iterator it = GetTopContextOfType(CONTEXT_PARAGRAPH)->Redlines().begin(); + it != GetTopContextOfType(CONTEXT_PARAGRAPH)->Redlines().end(); ++it ) + CreateRedline( xRange, *it ); + if( GetTopContextOfType(CONTEXT_CHARACTER) != NULL ) + for( std::vector<RedlineParamsPtr>::const_iterator it = GetTopContextOfType(CONTEXT_CHARACTER)->Redlines().begin(); + it != GetTopContextOfType(CONTEXT_CHARACTER)->Redlines().end(); ++it ) + CreateRedline( xRange, *it ); + std::vector<RedlineParamsPtr>::iterator pIt = m_aRedlines.top().begin( ); for (; pIt != m_aRedlines.top().end( ); ++pIt ) - { CreateRedline( xRange, *pIt ); - - // Adding the non-mod redlines to the temporary vector - if ( pIt->get( ) ) - { - if (((*pIt)->m_nToken & 0xffff) != OOXML_mod && ((*pIt)->m_nToken & 0xffff) != OOXML_ParagraphFormat) - aCleaned.push_back(*pIt); - } - } - - m_aRedlines.top().swap( aCleaned ); } void DomainMapper_Impl::StartParaMarkerChange( ) @@ -1704,6 +1708,7 @@ void DomainMapper_Impl::StartParaMarkerChange( ) void DomainMapper_Impl::EndParaMarkerChange( ) { m_bIsParaMarkerChange = false; + m_currentRedline.reset(); } @@ -4495,36 +4500,43 @@ bool DomainMapper_Impl::ExecuteFrameConversion() return bRet; } -void DomainMapper_Impl::AddNewRedline( ) +void DomainMapper_Impl::AddNewRedline( sal_uInt32 sprmId ) { RedlineParamsPtr pNew( new RedlineParams ); pNew->m_nToken = OOXML_mod; if ( !m_bIsParaMarkerChange ) { - m_aRedlines.top().push_back( pNew ); + // <w:rPrChange> applies to the whole <w:r>, <w:pPrChange> applies to the whole <w:p>, + // so keep those two in CONTEXT_CHARACTERS and CONTEXT_PARAGRAPH, which will take + // care of their scope (i.e. when they should be used and discarded). + // Let's keep the rest the same way they used to be handled (explictly dropped + // from a global stack by endtrackchange), but quite possibly they should not be handled + // that way either (I don't know). + if( sprmId == NS_ooxml::LN_EG_RPrContent_rPrChange ) + GetTopContextOfType( CONTEXT_CHARACTER )->Redlines().push_back( pNew ); + else if( sprmId == NS_ooxml::LN_CT_PPr_pPrChange ) + GetTopContextOfType( CONTEXT_PARAGRAPH )->Redlines().push_back( pNew ); + else + m_aRedlines.top().push_back( pNew ); } else { - m_pParaMarkerRedline.swap( pNew ); + m_pParaMarkerRedline = pNew; } + // Newly read data will go into this redline. + m_currentRedline = pNew; } -RedlineParamsPtr DomainMapper_Impl::GetTopRedline( ) +void DomainMapper_Impl::SetCurrentRedlineIsRead() { - RedlineParamsPtr pResult; - if ( !m_bIsParaMarkerChange && m_aRedlines.top().size( ) > 0 ) - pResult = m_aRedlines.top().back( ); - else if ( m_bIsParaMarkerChange ) - pResult = m_pParaMarkerRedline; - return pResult; + m_currentRedline.reset(); } sal_Int32 DomainMapper_Impl::GetCurrentRedlineToken( ) { sal_Int32 nToken = 0; - RedlineParamsPtr pCurrent( GetTopRedline( ) ); - if ( pCurrent.get( ) ) - nToken = pCurrent->m_nToken; + assert( m_currentRedline.get()); + nToken = m_currentRedline->m_nToken; return nToken; } @@ -4532,9 +4544,8 @@ void DomainMapper_Impl::SetCurrentRedlineAuthor( const OUString& sAuthor ) { if (!m_xAnnotationField.is()) { - RedlineParamsPtr pCurrent( GetTopRedline( ) ); - if ( pCurrent.get( ) ) - pCurrent->m_sAuthor = sAuthor; + assert( m_currentRedline.get()); + m_currentRedline->m_sAuthor = sAuthor; } else m_xAnnotationField->setPropertyValue("Author", uno::makeAny(sAuthor)); @@ -4550,9 +4561,8 @@ void DomainMapper_Impl::SetCurrentRedlineDate( const OUString& sDate ) { if (!m_xAnnotationField.is()) { - RedlineParamsPtr pCurrent( GetTopRedline( ) ); - if ( pCurrent.get( ) ) - pCurrent->m_sDate = sDate; + assert( m_currentRedline.get()); + m_currentRedline->m_sDate = sDate; } else m_xAnnotationField->setPropertyValue("DateTimeValue", uno::makeAny(ConversionHelper::ConvertDateStringToDateTime(sDate))); @@ -4566,46 +4576,46 @@ void DomainMapper_Impl::SetCurrentRedlineId( sal_Int32 sId ) } else { - RedlineParamsPtr pCurrent( GetTopRedline( ) ); - if ( pCurrent.get( ) ) - pCurrent->m_nId = sId; + // This should be an assert, but somebody had the smart idea to reuse this function also for comments and whatnot, + // and in some cases the id is actually not handled, which may be in fact a bug. + SAL_WARN( "writerfilter", !m_currentRedline.get()); + if( m_currentRedline.get()) + m_currentRedline->m_nId = sId; } } void DomainMapper_Impl::SetCurrentRedlineToken( sal_Int32 nToken ) { - RedlineParamsPtr pCurrent( GetTopRedline( ) ); - if ( pCurrent.get( ) ) - pCurrent->m_nToken = nToken; + assert( m_currentRedline.get()); + m_currentRedline->m_nToken = nToken; } void DomainMapper_Impl::SetCurrentRedlineRevertProperties( const uno::Sequence<beans::PropertyValue>& aProperties ) { - RedlineParamsPtr pCurrent( GetTopRedline( ) ); - if ( pCurrent.get( ) ) - pCurrent->m_aRevertProperties = aProperties; + assert( m_currentRedline.get()); + m_currentRedline->m_aRevertProperties = aProperties; } -void DomainMapper_Impl::RemoveCurrentRedline( ) +// This removes only the last redline stored here, those stored in contexts are automatically removed when +// the context is destroyed. +void DomainMapper_Impl::RemoveTopRedline( ) { - if ( m_aRedlines.top().size( ) > 0 ) - { - m_aRedlines.top().pop_back( ); - } + assert( m_aRedlines.top().size( ) > 0 ); + m_aRedlines.top().pop_back( ); + m_currentRedline.reset(); } void DomainMapper_Impl::ResetParaMarkerRedline( ) { if ( m_pParaMarkerRedline.get( ) ) { - RedlineParamsPtr pEmpty; - m_pParaMarkerRedline.swap( pEmpty ); + m_pParaMarkerRedline.reset(); + m_currentRedline.reset(); } } - void DomainMapper_Impl::ApplySettingsTable() { if (m_pSettingsTable && m_xTextFactory.is()) diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 3f62129..e60eab4 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -243,20 +243,6 @@ struct AnnotationPosition }; typedef boost::unordered_map< sal_Int32, AnnotationPosition > AnnotationPositions_t; -struct RedlineParams -{ - OUString m_sAuthor; - OUString m_sDate; - sal_Int32 m_nId; - sal_Int32 m_nToken; - - /// This can hold properties of runs that had formatted 'track changes' properties - css::uno::Sequence<css::beans::PropertyValue> m_aRevertProperties; -}; -typedef boost::shared_ptr< RedlineParams > RedlineParamsPtr; - - - struct LineNumberSettings { bool bIsOn; @@ -377,6 +363,8 @@ private: // Redline stack std::stack< std::vector< RedlineParamsPtr > > m_aRedlines; + // The redline currently read, may be also stored by a context instead of m_aRedlines. + RedlineParamsPtr m_currentRedline; RedlineParamsPtr m_pParaMarkerRedline; bool m_bIsParaMarkerChange; @@ -449,7 +437,7 @@ public: } void SetDocumentSettingsProperty( const OUString& rPropName, const css::uno::Any& rValue ); - void CreateRedline( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xRange, RedlineParamsPtr& pRedline ); + void CreateRedline( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xRange, RedlineParamsPtr pRedline ); void CheckParaMarkerRedline( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xRange ); @@ -704,9 +692,7 @@ public: ); bool ExecuteFrameConversion(); - void AddNewRedline( ); - - RedlineParamsPtr GetTopRedline( ); + void AddNewRedline( sal_uInt32 sprmId ); sal_Int32 GetCurrentRedlineToken( ); void SetCurrentRedlineAuthor( const OUString& sAuthor ); @@ -714,7 +700,8 @@ public: void SetCurrentRedlineId( sal_Int32 nId ); void SetCurrentRedlineToken( sal_Int32 nToken ); void SetCurrentRedlineRevertProperties( const css::uno::Sequence<css::beans::PropertyValue>& aProperties ); - void RemoveCurrentRedline( ); + void SetCurrentRedlineIsRead(); + void RemoveTopRedline( ); void ResetParaMarkerRedline( ); void SetCurrentRedlineInitials( const OUString& sInitials ); bool IsFirstRun() { return m_bIsFirstRun;} diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index 5c12df2..58487d6 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -71,6 +71,18 @@ enum GrabBagType CHAR_GRAB_BAG }; +struct RedlineParams +{ + OUString m_sAuthor; + OUString m_sDate; + sal_Int32 m_nId; + sal_Int32 m_nToken; + + /// This can hold properties of runs that had formatted 'track changes' properties + css::uno::Sequence<css::beans::PropertyValue> m_aRevertProperties; +}; +typedef boost::shared_ptr< RedlineParams > RedlineParamsPtr; + class PropValue { css::uno::Any m_aValue; @@ -101,6 +113,9 @@ class PropertyMap : public _PropertyMap OUString m_sFootnoteFontName; ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote > m_xFootnote; + + std::vector< RedlineParamsPtr > m_aRedlines; + protected: void Invalidate() { @@ -133,6 +148,9 @@ public: virtual void insertTableProperties( const PropertyMap* ); + const std::vector< RedlineParamsPtr >& Redlines() const { return m_aRedlines; } + std::vector< RedlineParamsPtr >& Redlines() { return m_aRedlines; } + #if OSL_DEBUG_LEVEL > 1 virtual void dumpXml( const TagLogger::Pointer_t pLogger ) const; #endif diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index 36a37f6..b3f25af 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -24263,19 +24263,16 @@ </resource> <resource name="CT_RPrChange" resource="Properties" tag="character"> <element name="rPr" tokenid="ooxml:CT_RPrChange_rPr"/> - <action name="end" action="tokenproperty"/> - <action name="end" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:endtrackchange"/> - <action name="end" action="clearProps"/> </resource> <resource name="CT_ParaRPrChange" resource="Properties" tag="character"> <element name="rPr" tokenid="ooxml:CT_ParaRPrChange_rPr"/> </resource> <resource name="CT_RunTrackChange" resource="Stream" tag="redlines"> <action name="start" action="tokenproperty"/> - <action name="start" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:trackchange"/> + <action name="start" action="sendPropertiesWithId" sendtokenid="ooxml:trackchange"/> <action name="start" action="clearProps"/> <action name="end" action="tokenproperty"/> - <action name="end" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:endtrackchange"/> + <action name="end" action="sendPropertiesWithId" sendtokenid="ooxml:endtrackchange"/> <action name="end" action="clearProps"/> </resource> <resource name="EG_RangeMarkupElements" resource="Properties" tag="redlines"> @@ -24479,6 +24476,7 @@ <element name="checkBox" tokenid="ooxml:CT_FFData_checkBox"/> <element name="ddList" tokenid="ooxml:CT_FFData_ddList"/> <element name="textInput" tokenid="ooxml:CT_FFData_textInput"/> + <!-- TODO: This is possibly wrong and should be sendPropertiesWithId --> <action name="end" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:ffdata"/> <action name="end" action="clearProps"/> </resource> @@ -24934,7 +24932,7 @@ </resource> <resource name="CT_ParaTrackChange" resource="Properties" tag="redline"> <action name="start" action="tokenproperty"/> - <action name="start" action="propagateCharacterPropertiesAsSet" sendtokenid="ooxml:paratrackchange"/> + <action name="start" action="sendPropertiesWithId" sendtokenid="ooxml:paratrackchange"/> <action name="start" action="clearProps"/> </resource> <resource name="ST_RubyAlign" resource="List" generated="yes"> commit 19700fa158e18e7e7c06397ead75f4181bdfb033 Author: Miklos Vajna <[email protected]> Date: Wed Oct 8 07:27:16 2014 +0200 sfx2: missing semicolon Change-Id: Id1c6357c84e03c71136eb92434002e5e0a4b71d7 (cherry picked from commit 86c4762790823c338f018fb2f06c4a5fa4497916) Signed-off-by: Stephan Bergmann <[email protected]> diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index 55e1c5e..1b41f68 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -172,7 +172,7 @@ bool LoadModule() # endif // UNX #else pInitSystray = disabled_initSystray; - pDeInitSystray = disabled_deInitSystray + pDeInitSystray = disabled_deInitSystray; loaded = false; #endif // ENABLE_QUICKSTART_APPLET } commit a10e47245cbfb1b95afad04b768ac4f1c63555cf Author: Christian Lohmaier <[email protected]> Date: Thu Oct 9 03:27:06 2014 +0200 Revert "dos2unix on SSE2 patch files" content need to be dos, otherwise patch fails to apply This reverts commit 089b243c8b48aecfd25c79a70b4209a2399dbafa. diff --git a/external/coinmp/coinmp-msvc-disable-sse2.patch.1 b/external/coinmp/coinmp-msvc-disable-sse2.patch.1 index c099494..0f518d6 100644 --- a/external/coinmp/coinmp-msvc-disable-sse2.patch.1 +++ b/external/coinmp/coinmp-msvc-disable-sse2.patch.1 @@ -1,10 +1,10 @@ --- coinmp/BuildTools/MSVisualStudio/v10/Release.props.orig 2014-10-02 14:22:21.497268171 +0200 +++ coinmp/BuildTools/MSVisualStudio/v10/Release.props 2014-10-02 14:22:30.193267497 +0200 @@ -6,6 +6,7 @@ - <ItemDefinitionGroup> - <ClCompile> - <StringPooling>true</StringPooling> -+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet> - </ClCompile> - </ItemDefinitionGroup> - <ItemGroup /> + <ItemDefinitionGroup> + <ClCompile> + <StringPooling>true</StringPooling> ++ <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet> + </ClCompile> + </ItemDefinitionGroup> + <ItemGroup /> diff --git a/external/lcms2/lcms2-msvc-disable-sse2.patch.1 b/external/lcms2/lcms2-msvc-disable-sse2.patch.1 index 9bfad08..37ef773 100644 --- a/external/lcms2/lcms2-msvc-disable-sse2.patch.1 +++ b/external/lcms2/lcms2-msvc-disable-sse2.patch.1 @@ -1,10 +1,10 @@ --- lcms2/Projects/VC2010/lcms2_DLL/lcms2_DLL.vcxproj.orig 2014-10-02 15:15:40.228020086 +0200 +++ lcms2/Projects/VC2010/lcms2_DLL/lcms2_DLL.vcxproj 2014-10-02 15:15:42.243019930 +0200 @@ -133,6 +133,7 @@ - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> -+ <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet> - <Optimization>Full</Optimization> - <IntrinsicFunctions>true</IntrinsicFunctions> - <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> ++ <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet> + <Optimization>Full</Optimization> + <IntrinsicFunctions>true</IntrinsicFunctions> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> commit 303db6e58e4d25cf5a9ac8edd31950caf6fb7c6d Author: Christian Lohmaier <[email protected]> Date: Thu Oct 9 02:34:19 2014 +0200 bump product version to 4.3.4.0.0+ Change-Id: I8ce476cb1d5e63044f6f4d809ea08409636dcffc diff --git a/configure.ac b/configure.ac index 9a2133f..7607ff4 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl in order to create a configure script. # several non-alphanumeric characters, those are split off and used only for the # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea. -AC_INIT([LibreOffice],[4.3.3.0.0+],[],[],[http://documentfoundation.org/]) +AC_INIT([LibreOffice],[4.3.4.0.0+],[],[],[http://documentfoundation.org/]) AC_PREREQ([2.59]) commit d4979f1d195cb7dd03e34c0ad56067ce319d6009 Author: Caolán McNamara <[email protected]> Date: Tue Oct 7 17:41:32 2014 +0100 Resolves: fdo#84757 1~ instead of ~1 and 10~ instead of 1~0 regression from 3351ebde48a31173c2fea9f7270224017e1f4412 Date: Sat Mar 29 22:22:42 2014 +0100 OUString: remove temporaries and repeated expressions but understandable as it was unreadable goo originally (cherry picked from commit 4289c346de432cc94f05aab78a9464350334b11f) Change-Id: I3ce161bd2628f3a49b14df886ee8d684b248db1c Reviewed-on: https://gerrit.libreoffice.org/11847 Reviewed-by: David Tardon <[email protected]> Tested-by: David Tardon <[email protected]> diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index d32551a..ff71b0b 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -914,16 +914,17 @@ void SwColumnPage::UpdateCols() void SwColumnPage::SetLabels( sal_uInt16 nVis ) { + //insert ~ before the last character, e.g. 1 -> ~1, 10 -> 1~0 const OUString sLbl( '~' ); const OUString sLbl1(OUString::number( nVis + 1 )); - m_pLbl1->SetText(sLbl1 + sLbl); + m_pLbl1->SetText(sLbl1.replaceAt(sLbl1.getLength()-1, 0, sLbl)); const OUString sLbl2(OUString::number( nVis + 2 )); - m_pLbl2->SetText(sLbl2 + sLbl); + m_pLbl2->SetText(sLbl2.replaceAt(sLbl2.getLength()-1, 0, sLbl)); const OUString sLbl3(OUString::number( nVis + 3 )); - m_pLbl3->SetText(sLbl3 + sLbl); + m_pLbl3->SetText(sLbl3.replaceAt(sLbl3.getLength()-1, 0, sLbl)); const OUString sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ; aEd1.SetAccessibleName(sColumnWidth.replaceFirst("%1", sLbl1)); commit f1b0d7209e0728f92a7f3357a06b748004ec0c63 Author: Jan-Marek Glogowski <[email protected]> Date: Thu Aug 7 14:49:36 2014 +0200 fdo#81750 MM: correctly convert inline-edit fields The new inline-editable input fields contain real content in the node, therefore a single SwPaM::Move isn't sufficient to select the field or move after the field. For the input fields we can directly go to the end of the field. Reviewed-on: https://gerrit.libreoffice.org/10834 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> (cherry picked from commit 2579adb13188d276701b1504b4a10bed4d8d4b6f) Conflicts: sw/source/core/doc/doc.cxx Change-Id: Ic1bce415ce45e49456121b6db003ded0733e195c Reviewed-on: https://gerrit.libreoffice.org/11782 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 1c419fe..3079d8e 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -112,6 +112,7 @@ #include <wdocsh.hxx> #include <prtopt.hxx> +#include <wrtsh.hxx> #include <vector> #include <map> @@ -2027,21 +2028,47 @@ bool SwDoc::ConvertFieldsToText() nWhich != RES_REFPAGESETFLD)) { OUString sText = pField->ExpandField(true); - //database fields should not convert their command into text + + // database fields should not convert their command into text if( RES_DBFLD == pCurType->Which() && !static_cast<const SwDBField*>(pField)->IsInitialized()) sText = ""; - //now remove the field and insert the string - SwPaM aPam1(*pTxtFld->GetpTxtNode(), *pTxtFld->GetStart()); - aPam1.Move(); - //insert first to keep the field's attributes + SwPaM aInsertPam(*pTxtFld->GetpTxtNode(), *pTxtFld->GetStart()); + aInsertPam.SetMark(); + + // go to the end of the field + const SwTxtFld *pTxtField = GetTxtFldAtPos( *aInsertPam.End() ); + if (pTxtField && pTxtField->Which() == RES_TXTATR_INPUTFIELD) + { + SwPosition &rEndPos = *aInsertPam.GetPoint(); + rEndPos.nContent = GetDocShell()->GetWrtShell()->EndOfInputFldAtPos( *aInsertPam.End() ); + } + else + { + aInsertPam.Move(); + } + + // first insert the text after field to keep the field's attributes, + // then delete the field if (!sText.isEmpty()) - InsertString( aPam1, sText ); - SwPaM aPam2(*pTxtFld->GetpTxtNode(), *pTxtFld->GetStart()); - aPam2.SetMark(); - aPam2.Move(); - DeleteAndJoin(aPam2);//remove the field - bRet=true; + { + // to keep the position after insert + SwPaM aDelPam( *aInsertPam.GetMark(), *aInsertPam.GetPoint() ); + aDelPam.Move( fnMoveBackward ); + aInsertPam.DeleteMark(); + + InsertString( aInsertPam, sText ); + + aDelPam.Move(); + // finally remove the field + DeleteAndJoin( aDelPam ); + } + else + { + DeleteAndJoin( aInsertPam ); + } + + bRet = true; } } ++aBegin; commit d95a13f4fa83ad21c95d882fc80828a3a8106576 Author: Jan-Marek Glogowski <[email protected]> Date: Fri Aug 8 11:21:14 2014 +0200 Fix input field tab handling When searching for the current field in the field list to find the previous or next one, we check the field start and compare it with the cursor position. But with the new input fields, the cursor can actually be anywhere in the field, so we actually have to search for the start position of the input field at the cursor position. Change-Id: I26526524eccfdbea41c6bf69a460fa64248f50ca Reviewed-on: https://gerrit.libreoffice.org/10837 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> (cherry picked from commit d33db207e27198df7af9fc007d7532ec76c80991) Reviewed-on: https://gerrit.libreoffice.org/11781 diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 80febe1..c9b11c0 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -670,6 +670,8 @@ bool SwCrsrShell::MoveFldType( SwTxtFld * pTxtFld = pTNd->GetFldTxtAttrAt( rPos.nContent.GetIndex(), true ); const bool bDelFld = ( pTxtFld == NULL ); + sal_Int32 nContentOffset = -1; + if( bDelFld ) { // create dummy for the search @@ -680,23 +682,47 @@ bool SwCrsrShell::MoveFldType( mpDoc->IsClipBoard() ); pTxtFld->ChgTxtNode( pTNd ); } + else + { + // the cursor might be anywhere inside the input field, + // but we will be searching for the field start + if (pTxtFld->Which() == RES_TXTATR_INPUTFIELD + && rPos.nContent.GetIndex() != *pTxtFld->GetStart()) + nContentOffset = *pTxtFld->GetStart(); + } + + _SetGetExpFld *pSrch = NULL; + SwIndex *pIndex = NULL; + if( -1 == nContentOffset ) + { + pSrch = new _SetGetExpFld( rPos.nNode, pTxtFld, &rPos.nContent ); + } + else + { + pIndex = new SwIndex( rPos.nNode.GetNode().GetCntntNode(), nContentOffset ); + pSrch = new _SetGetExpFld( rPos.nNode, pTxtFld, pIndex ); + } - _SetGetExpFld aSrch( rPos.nNode, pTxtFld, &rPos.nContent ); if( rPos.nNode.GetIndex() < mpDoc->GetNodes().GetEndOfExtras().GetIndex() ) { // also at collection use only the first frame Point aPt; - aSrch.SetBodyPos( *pTNd->getLayoutFrm( GetLayout(), &aPt, &rPos, false ) ); + pSrch->SetBodyPos( *pTNd->getLayoutFrm( GetLayout(), &aPt, &rPos, false ) ); } - it = aSrtLst.lower_bound( &aSrch ); + it = aSrtLst.lower_bound( pSrch ); + + bool isSrch = (**it == *pSrch); + delete pIndex; + delete pSrch; + if( bDelFld ) { ... etc. - the rest is truncated
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
