cui/source/dialogs/sdrcelldlg.cxx | 7 ++++--- cui/source/inc/border.hxx | 1 + cui/source/tabpages/border.cxx | 5 ++++- formula/source/core/api/token.cxx | 7 ++++++- include/formula/FormulaCompiler.hxx | 6 +++--- include/formula/token.hxx | 9 +++++++-- sc/source/core/inc/interpre.hxx | 2 +- sc/source/ui/namedlg/namedefdlg.cxx | 1 + svx/source/table/tablecontroller.cxx | 2 +- 9 files changed, 28 insertions(+), 12 deletions(-)
New commits: commit 5c99b24143d094cbde671b9f593ee7945b074cfd Author: Eike Rathke <er...@redhat.com> Date: Fri Jun 13 10:50:27 2014 +0200 resolved fdo#79957 propagate ForceArray through jump tokens ForceArray parameters weren't propagated and enforced to array arguments on svJump tokens (FormulaJumpToken), namely IF, CHOOSE, IFERROR and IFNA. (cherry picked from commit c9d037e5e8e5850e9c69372580e7a506b573fc2a) Conflicts: include/formula/token.hxx Change-Id: Icf9074f11b826655a52858d778d9a0122d207aa4 Reviewed-on: https://gerrit.libreoffice.org/9767 Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index 3777d09..e933a34 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -275,11 +275,16 @@ bool FormulaFAPToken::operator==( const FormulaToken& r ) const { return FormulaByteToken::operator==( r ) && pOrigToken == r.GetFAPOrigToken(); } + + short* FormulaJumpToken::GetJump() const { return pJump; } +bool FormulaJumpToken::HasForceArray() const { return bHasForceArray; } +void FormulaJumpToken::SetForceArray( bool b ) { bHasForceArray = b; } bool FormulaJumpToken::operator==( const FormulaToken& r ) const { return FormulaToken::operator==( r ) && pJump[0] == r.GetJump()[0] && - memcmp( pJump+1, r.GetJump()+1, pJump[0] * sizeof(short) ) == 0; + memcmp( pJump+1, r.GetJump()+1, pJump[0] * sizeof(short) ) == 0 && + bHasForceArray == r.HasForceArray(); } FormulaJumpToken::~FormulaJumpToken() { diff --git a/include/formula/FormulaCompiler.hxx b/include/formula/FormulaCompiler.hxx index 591103a..e2d6edd 100644 --- a/include/formula/FormulaCompiler.hxx +++ b/include/formula/FormulaCompiler.hxx @@ -356,9 +356,9 @@ private: static inline void ForceArrayOperator( FormulaTokenRef& rCurr, const FormulaTokenRef& rPrev ) { - if ( rPrev && rPrev->HasForceArray() && - rCurr->GetType() == svByte && rCurr->GetOpCode() != ocPush - && !rCurr->HasForceArray() ) + if ( rPrev && rPrev->HasForceArray() && rCurr->GetOpCode() != ocPush && + (rCurr->GetType() == svByte || rCurr->GetType() == svJump) && + !rCurr->HasForceArray() ) rCurr->SetForceArray( true); } diff --git a/include/formula/token.hxx b/include/formula/token.hxx index 002cefb..f09fbae 100644 --- a/include/formula/token.hxx +++ b/include/formula/token.hxx @@ -356,15 +356,18 @@ class FORMULA_DLLPUBLIC FormulaJumpToken : public FormulaToken { private: short* pJump; + bool bHasForceArray; public: FormulaJumpToken( OpCode e, short* p ) : - FormulaToken( formula::svJump , e) + FormulaToken( formula::svJump , e), + bHasForceArray( false) { pJump = new short[ p[0] + 1 ]; memcpy( pJump, p, (p[0] + 1) * sizeof(short) ); } FormulaJumpToken( const FormulaJumpToken& r ) : - FormulaToken( r ) + FormulaToken( r ), + bHasForceArray( r.bHasForceArray) { pJump = new short[ r.pJump[0] + 1 ]; memcpy( pJump, r.pJump, (r.pJump[0] + 1) * sizeof(short) ); @@ -373,6 +376,8 @@ public: virtual short* GetJump() const; virtual bool operator==( const formula::FormulaToken& rToken ) const; virtual FormulaToken* Clone() const { return new FormulaJumpToken(*this); } + virtual bool HasForceArray() const; + virtual void SetForceArray( bool b ); }; diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index aa2dd73..d082648 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -867,7 +867,7 @@ public: inline void ScInterpreter::MatrixDoubleRefToMatrix() { - if ( bMatrixFormula && GetStackType() == formula::svDoubleRef ) + if ( (bMatrixFormula || pCur->HasForceArray()) && GetStackType() == formula::svDoubleRef ) { GetTokenMatrixMap(); // make sure it exists, create if not. PopDoubleRefPushMatrix(); commit b7b7741627dfe0ec4374a47a59a478e64a93f10d Author: Markus Mohrhard <markus.mohrh...@collabora.co.uk> Date: Tue Jun 10 18:13:46 2014 +0200 document must be set modified when range name is defined, fdo#79451 Change-Id: I382bef9b95d40a1abac993795e8da540b5aa5d18 (cherry picked from commit 1c8babfdb0808318bbaa94e911c819456a65337e) Reviewed-on: https://gerrit.libreoffice.org/9804 Reviewed-by: Muthu Subramanian K <muthus...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> Tested-by: Andras Timar <andras.ti...@collabora.com> diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx index 62e13fd..c97605d 100644 --- a/sc/source/ui/namedlg/namedefdlg.cxx +++ b/sc/source/ui/namedlg/namedefdlg.cxx @@ -243,6 +243,7 @@ void ScNameDefDlg::AddPushed() if (nTab != -1) mpDoc->SetStreamValid(nTab, false); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) ); + mpDocShell->SetDocumentModified(); Close(); } else commit bc472d12dbbbd187cb05e49cfde1ba434d7c7367 Author: Matúš Kukan <matus.ku...@collabora.com> Date: Tue Jun 3 14:11:39 2014 +0200 bnc#882627: Allow to edit spacing to contents even with no borders visible. SfxItemSet::MergeValue changes some items from SFX_ITEM_DEFAULT state to SFX_ITEM_SET which I think is a bug but this patch avoids the problem too. The issue was: visible changes in some tables, after changing e.g. borders spacing, because the cells had wrong SfxItemSet after the process. (cherry picked from commit b1d8df61b47e84bf0de64342556049673dd9c543) Signed-off-by: Andras Timar <andras.ti...@collabora.com> Conflicts: cui/source/dialogs/sdrcelldlg.cxx cui/source/inc/border.hxx cui/source/inc/sdrcelldlg.hxx cui/source/tabpages/border.cxx svx/source/table/tablecontroller.cxx Change-Id: I676b211e1a4a1d7341c385d63503aa740718ed5d diff --git a/cui/source/dialogs/sdrcelldlg.cxx b/cui/source/dialogs/sdrcelldlg.cxx index 2a2a982..547f7b1 100644 --- a/cui/source/dialogs/sdrcelldlg.cxx +++ b/cui/source/dialogs/sdrcelldlg.cxx @@ -62,9 +62,10 @@ void SvxFormatCellsDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) ( (SvxAreaTabPage&) rPage ).SetPos( 0 ); ( (SvxAreaTabPage&) rPage ).Construct(); ( (SvxAreaTabPage&) rPage ).ActivatePage( mrOutAttrs ); - - break; - + break; + case RID_SVXPAGE_BORDER: + ( (SvxBorderTabPage&) rPage ).SetTableMode(); + break; default: SfxTabDialog::PageCreated( nId, rPage ); break; diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx index 8f66e5d..f4a4c2a 100644 --- a/cui/source/inc/border.hxx +++ b/cui/source/inc/border.hxx @@ -50,6 +50,7 @@ public: void HideShadowControls(); virtual void PageCreated (SfxAllItemSet aSet); + void SetTableMode(); protected: virtual int DeactivatePage( SfxItemSet* pSet = 0 ); virtual void DataChanged( const DataChangedEvent& rDCEvt ); diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 8c43623..a8d8686 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -1194,6 +1194,9 @@ void SvxBorderTabPage::PageCreated (SfxAllItemSet aSet) HideShadowControls(); } -// ============================================================================ +void SvxBorderTabPage::SetTableMode() +{ + nSWMode = SW_BORDER_MODE_TABLE; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index a1bf2a9..a926891 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -735,7 +735,7 @@ void SvxTableController::onFormatTable( SfxRequest& rReq ) SvxBoxInfoItem aBoxInfoItem( static_cast< const SvxBoxInfoItem& >( aNewAttr.Get( SDRATTR_TABLE_BORDER_INNER ) ) ); - MergeAttrFromSelectedCells(aNewAttr, sal_False); + MergeAttrFromSelectedCells(aNewAttr, sal_True); FillCommonBorderAttrFromSelectedCells( aBoxItem, aBoxInfoItem ); aNewAttr.Put( aBoxItem ); aNewAttr.Put( aBoxInfoItem );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits