[Libreoffice-commits] core.git: Branch 'distro/collabora/lov-4.4' - 9 commits - include/svx package/inc package/source sc/source svx/source sw/source uui/source uui/uiconfig
Caolán McNamara
caolanm at redhat.com
Wed Jun 10 00:36:23 PDT 2015
include/svx/svdundo.hxx | 3
package/inc/ZipOutputEntry.hxx | 4
package/source/zipapi/ZipOutputStream.cxx | 6
package/source/zippackage/ZipPackageStream.cxx | 12
sc/source/core/tool/sharedformula.cxx | 16 -
sc/source/core/tool/token.cxx | 277 ++++++++++--------
sc/source/ui/drawfunc/futext.cxx | 6
sc/source/ui/miscdlgs/scuiautofmt.cxx | 2
svx/source/customshapes/EnhancedCustomShapeEngine.cxx | 2
svx/source/svdraw/svdundo.cxx | 66 ----
sw/source/core/crsr/crsrsh.cxx | 2
uui/source/secmacrowarnings.cxx | 4
uui/source/secmacrowarnings.hxx | 1
uui/uiconfig/ui/macrowarnmedium.ui | 14
14 files changed, 225 insertions(+), 190 deletions(-)
New commits:
commit fe5572489f5f5e91e5778483995f36a6250d4f30
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu May 28 12:26:09 2015 +0100
Resolves: tdf#90960 toggle out of paste-mode on editing an object
otherwise pressing return in the object goes to the
sheet and attempts to paste over the current cell
reproduce with insert->comment in A1, insert some text and
click in e.g. A5, ctrl c, right click on A1 and show comment,
double click on comment to edit, go to end of text and
press enter, either "bad things happen" if a11y is enabled
, or "nothing happens" instead of a new line appearing in
the object
Change-Id: Ie44851cf3394652e1a60eecb59a999889094b3c5
(cherry picked from commit 7b75dc8ccca61988392779d4c61eef15f1211c16)
Reviewed-on: https://gerrit.libreoffice.org/15942
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index 0d76c7e..1915fac 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -735,6 +735,12 @@ void FuText::SetInEditMode(SdrObject* pObj, const Point* pMousePixel,
//!?? ohne uebergebenen Outliner stimmen die Defaults nicht ???!?
if ( pView->SdrBeginTextEdit(pObj, pPV, pWindow, true, pO) )
{
+ // Toggle out of paste mode if we are in it, otherwise
+ // pressing return in this object will instead go to the
+ // sheet and be considered an overwrite-cell instruction
+ pViewShell->GetViewData().SetPasteMode(SC_PASTE_NONE);
+ pViewShell->UpdateCopySourceOverlay();
+
// EditEngine-UndoManager anmelden
pViewShell->SetDrawTextUndo( &pO->GetUndoManager() );
commit 47172ac420571fe3e3802940f2a072997b4a0ae4
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Jun 5 23:56:07 2015 +0200
tdf#91602: sw: prevent recursive layout crash
SwCrsrShell::UpdateCrsr() calls SwTextFrm::GetCharRect(), which does
layout. It happens that a SdrObject is moved around during layout,
which calls SwDrawContact::Changed(), which believes that there is
no layout active because there is no SwLayAction and
ViewShell::EndAction() has already been called, so we get recursive
layout-in-layout action.
(cherry picked from commit 587006cac508616f486aea45e265a170bcccdc87)
tdf#91917 tdf#91602: avoid layout recursion differently
(regression from 587006cac508616f486aea45e265a170bcccdc87)
(cherry picked from commit 238e07ddca879e0951bef6391fdc5c3fc26bded5)
Change-Id: I38e00a7469243088e25aa1a91e3581240b3bbdea
Reviewed-on: https://gerrit.libreoffice.org/16184
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 4c133e4..228c314 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -1742,12 +1742,14 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, bool bIdleEnd )
aTmpState.pSpecialPos = &aSpecialPos;
}
+ ++mnStartAction; // tdf#91602 prevent recursive Action!
if( !pFrm->GetCharRect( m_aCharRect, *pShellCrsr->GetPoint(), &aTmpState ) )
{
Point& rPt = pShellCrsr->GetPtPos();
rPt = m_aCharRect.Center();
pFrm->GetCrsrOfst( pShellCrsr->GetPoint(), rPt, &aTmpState );
}
+ --mnStartAction;
if( !pShellCrsr->HasMark() )
m_aCrsrHeight = aTmpState.aRealHeight;
commit ccc553b769a115604ea3deee7e1f7e595c96472e
Author: Eike Rathke <erack at redhat.com>
Date: Mon Jun 8 15:33:51 2015 +0200
check bounds in RPN tokens, tdf#90694 related and others
Listeners are set up from references in RPN, so check those for bounds
to catch also references resulting from named expressions, database
ranges, tables, ... and references in the token code array that are not
referenced in RPN.
(cherry picked from commit 4baf76ddb39580678cf14019900be78bb9071d7b)
Windows MSVC: cannot specify explicit initializer for arrays
(cherry picked from commit 883ebe0283dc6bdf62f08191dede2a249f777f63)
c42897ba6bb520c931f63e56d0f453ed14cfaa3d
Change-Id: I54770b45818f4c0541a39815278d3271a77b345d
Reviewed-on: https://gerrit.libreoffice.org/16154
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 9500a28..1462a8b 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -113,6 +113,34 @@ namespace
rRef.SetAbsTab(0);
}
+ struct TokenPointerRange
+ {
+ FormulaToken** mpStart;
+ FormulaToken** mpStop;
+
+ TokenPointerRange() : mpStart(NULL), mpStop(NULL) {}
+ TokenPointerRange( FormulaToken** p, sal_uInt16 n ) :
+ mpStart(p), mpStop( p + static_cast<size_t>(n)) {}
+ };
+ struct TokenPointers
+ {
+ TokenPointerRange maPointerRange[2];
+
+ TokenPointers( FormulaToken** pCode, sal_uInt16 nLen, FormulaToken** pRPN, sal_uInt16 nRPN )
+ {
+ maPointerRange[0] = TokenPointerRange( pCode, nLen);
+ maPointerRange[1] = TokenPointerRange( pRPN, nRPN);
+ }
+
+ static bool skipToken( size_t i, const FormulaToken* const * pp )
+ {
+ // Handle all tokens in RPN, and code tokens only if they have a
+ // reference count of 1, which means they are not referenced in
+ // RPN.
+ return i == 0 && (*pp)->GetRef() > 1;
+ }
+ };
+
} // namespace
// Align MemPools on 4k boundaries - 64 bytes (4k is a MUST for OS/2)
@@ -3670,28 +3698,35 @@ void checkBounds(
void ScTokenArray::CheckRelativeReferenceBounds(
const sc::RefUpdateContext& rCxt, const ScAddress& rPos, SCROW nGroupLen, std::vector<SCROW>& rBounds ) const
{
- FormulaToken** p = pCode;
- FormulaToken** pEnd = p + static_cast<size_t>(nLen);
- for (; p != pEnd; ++p)
+ TokenPointers aPtrs( pCode, nLen, pRPN, nRPN);
+ for (size_t j=0; j<2; ++j)
{
- switch ((*p)->GetType())
+ FormulaToken** p = aPtrs.maPointerRange[j].mpStart;
+ FormulaToken** pEnd = aPtrs.maPointerRange[j].mpStop;
+ for (; p != pEnd; ++p)
{
- case svSingleRef:
- {
- formula::FormulaToken* pToken = *p;
- checkBounds(rCxt, rPos, nGroupLen, *pToken->GetSingleRef(), rBounds);
- }
- break;
- case svDoubleRef:
+ if (TokenPointers::skipToken(j,p))
+ continue;
+
+ switch ((*p)->GetType())
{
- formula::FormulaToken* pToken = *p;
- const ScComplexRefData& rRef = *pToken->GetDoubleRef();
- checkBounds(rCxt, rPos, nGroupLen, rRef.Ref1, rBounds);
- checkBounds(rCxt, rPos, nGroupLen, rRef.Ref2, rBounds);
+ case svSingleRef:
+ {
+ formula::FormulaToken* pToken = *p;
+ checkBounds(rCxt, rPos, nGroupLen, *pToken->GetSingleRef(), rBounds);
+ }
+ break;
+ case svDoubleRef:
+ {
+ formula::FormulaToken* pToken = *p;
+ const ScComplexRefData& rRef = *pToken->GetDoubleRef();
+ checkBounds(rCxt, rPos, nGroupLen, rRef.Ref1, rBounds);
+ checkBounds(rCxt, rPos, nGroupLen, rRef.Ref2, rBounds);
+ }
+ break;
+ default:
+ ;
}
- break;
- default:
- ;
}
}
}
@@ -3699,29 +3734,36 @@ void ScTokenArray::CheckRelativeReferenceBounds(
void ScTokenArray::CheckRelativeReferenceBounds(
const ScAddress& rPos, SCROW nGroupLen, const ScRange& rRange, std::vector<SCROW>& rBounds ) const
{
- FormulaToken** p = pCode;
- FormulaToken** pEnd = p + static_cast<size_t>(nLen);
- for (; p != pEnd; ++p)
+ TokenPointers aPtrs( pCode, nLen, pRPN, nRPN);
+ for (size_t j=0; j<2; ++j)
{
- switch ((*p)->GetType())
+ FormulaToken** p = aPtrs.maPointerRange[j].mpStart;
+ FormulaToken** pEnd = aPtrs.maPointerRange[j].mpStop;
+ for (; p != pEnd; ++p)
{
- case svSingleRef:
- {
- formula::FormulaToken* pToken = *p;
- const ScSingleRefData& rRef = *pToken->GetSingleRef();
- checkBounds(rPos, nGroupLen, rRange, rRef, rBounds);
- }
- break;
- case svDoubleRef:
+ if (TokenPointers::skipToken(j,p))
+ continue;
+
+ switch ((*p)->GetType())
{
- formula::FormulaToken* pToken = *p;
- const ScComplexRefData& rRef = *pToken->GetDoubleRef();
- checkBounds(rPos, nGroupLen, rRange, rRef.Ref1, rBounds);
- checkBounds(rPos, nGroupLen, rRange, rRef.Ref2, rBounds);
+ case svSingleRef:
+ {
+ formula::FormulaToken* pToken = *p;
+ const ScSingleRefData& rRef = *pToken->GetSingleRef();
+ checkBounds(rPos, nGroupLen, rRange, rRef, rBounds);
+ }
+ break;
+ case svDoubleRef:
+ {
+ formula::FormulaToken* pToken = *p;
+ const ScComplexRefData& rRef = *pToken->GetDoubleRef();
+ checkBounds(rPos, nGroupLen, rRange, rRef.Ref1, rBounds);
+ checkBounds(rPos, nGroupLen, rRange, rRef.Ref2, rBounds);
+ }
+ break;
+ default:
+ ;
}
- break;
- default:
- ;
}
}
}
@@ -3730,91 +3772,98 @@ void ScTokenArray::CheckExpandReferenceBounds(
const sc::RefUpdateContext& rCxt, const ScAddress& rPos, SCROW nGroupLen, std::vector<SCROW>& rBounds ) const
{
const SCROW nInsRow = rCxt.maRange.aStart.Row();
- const FormulaToken* const * p = pCode;
- const FormulaToken* const * pEnd = p + static_cast<size_t>(nLen);
- for (; p != pEnd; ++p)
+ TokenPointers aPtrs( pCode, nLen, pRPN, nRPN);
+ for (size_t j=0; j<2; ++j)
{
- switch ((*p)->GetType())
+ const FormulaToken* const * p = aPtrs.maPointerRange[j].mpStart;
+ const FormulaToken* const * pEnd = aPtrs.maPointerRange[j].mpStop;
+ for (; p != pEnd; ++p)
{
- case svDoubleRef:
- {
- const formula::FormulaToken* pToken = *p;
- const ScComplexRefData& rRef = *pToken->GetDoubleRef();
- bool bStartRowRelative = rRef.Ref1.IsRowRel();
- bool bEndRowRelative = rRef.Ref2.IsRowRel();
-
- // For absolute references nothing needs to be done, they stay
- // the same for all and if to be expanded the group will be
- // adjusted later.
- if (!bStartRowRelative && !bEndRowRelative)
- break; // switch
-
- ScRange aAbsStart(rRef.toAbs(rPos));
- ScAddress aPos(rPos);
- aPos.IncRow(nGroupLen);
- ScRange aAbsEnd(rRef.toAbs(aPos));
- // References must be at least two rows to be expandable.
- if ((aAbsStart.aEnd.Row() - aAbsStart.aStart.Row() < 1) &&
- (aAbsEnd.aEnd.Row() - aAbsEnd.aStart.Row() < 1))
- break; // switch
-
- // Only need to process if an edge may be touching the
- // insertion row anywhere within the run of the group.
- if (!((aAbsStart.aStart.Row() <= nInsRow && nInsRow <= aAbsEnd.aStart.Row()) ||
- (aAbsStart.aEnd.Row() <= nInsRow && nInsRow <= aAbsEnd.aEnd.Row())))
- break; // switch
-
- SCROW nStartRow = aAbsStart.aStart.Row();
- SCROW nEndRow = aAbsStart.aEnd.Row();
- // Position on first relevant range.
- SCROW nOffset = 0;
- if (nEndRow + 1 < nInsRow)
- {
- if (bEndRowRelative)
- {
- nOffset = nInsRow - nEndRow - 1;
- nEndRow += nOffset;
- if (bStartRowRelative)
- nStartRow += nOffset;
- }
- else // bStartRowRelative==true
- {
- nOffset = nInsRow - nStartRow;
- nStartRow += nOffset;
- // Start is overtaking End, swap.
- bStartRowRelative = false;
- bEndRowRelative = true;
- }
- }
- for (SCROW i = nOffset; i < nGroupLen; ++i)
- {
- bool bSplit = (nStartRow == nInsRow || nEndRow + 1 == nInsRow);
- if (bSplit)
- rBounds.push_back( rPos.Row() + i);
+ if (TokenPointers::skipToken(j,p))
+ continue;
- if (bEndRowRelative)
- ++nEndRow;
- if (bStartRowRelative)
+ switch ((*p)->GetType())
+ {
+ case svDoubleRef:
{
- ++nStartRow;
- if (!bEndRowRelative && nStartRow == nEndRow)
+ const formula::FormulaToken* pToken = *p;
+ const ScComplexRefData& rRef = *pToken->GetDoubleRef();
+ bool bStartRowRelative = rRef.Ref1.IsRowRel();
+ bool bEndRowRelative = rRef.Ref2.IsRowRel();
+
+ // For absolute references nothing needs to be done, they stay
+ // the same for all and if to be expanded the group will be
+ // adjusted later.
+ if (!bStartRowRelative && !bEndRowRelative)
+ break; // switch
+
+ ScRange aAbsStart(rRef.toAbs(rPos));
+ ScAddress aPos(rPos);
+ aPos.IncRow(nGroupLen);
+ ScRange aAbsEnd(rRef.toAbs(aPos));
+ // References must be at least two rows to be expandable.
+ if ((aAbsStart.aEnd.Row() - aAbsStart.aStart.Row() < 1) &&
+ (aAbsEnd.aEnd.Row() - aAbsEnd.aStart.Row() < 1))
+ break; // switch
+
+ // Only need to process if an edge may be touching the
+ // insertion row anywhere within the run of the group.
+ if (!((aAbsStart.aStart.Row() <= nInsRow && nInsRow <= aAbsEnd.aStart.Row()) ||
+ (aAbsStart.aEnd.Row() <= nInsRow && nInsRow <= aAbsEnd.aEnd.Row())))
+ break; // switch
+
+ SCROW nStartRow = aAbsStart.aStart.Row();
+ SCROW nEndRow = aAbsStart.aEnd.Row();
+ // Position on first relevant range.
+ SCROW nOffset = 0;
+ if (nEndRow + 1 < nInsRow)
{
- // Start is overtaking End, swap.
- bStartRowRelative = false;
- bEndRowRelative = true;
+ if (bEndRowRelative)
+ {
+ nOffset = nInsRow - nEndRow - 1;
+ nEndRow += nOffset;
+ if (bStartRowRelative)
+ nStartRow += nOffset;
+ }
+ else // bStartRowRelative==true
+ {
+ nOffset = nInsRow - nStartRow;
+ nStartRow += nOffset;
+ // Start is overtaking End, swap.
+ bStartRowRelative = false;
+ bEndRowRelative = true;
+ }
+ }
+ for (SCROW i = nOffset; i < nGroupLen; ++i)
+ {
+ bool bSplit = (nStartRow == nInsRow || nEndRow + 1 == nInsRow);
+ if (bSplit)
+ rBounds.push_back( rPos.Row() + i);
+
+ if (bEndRowRelative)
+ ++nEndRow;
+ if (bStartRowRelative)
+ {
+ ++nStartRow;
+ if (!bEndRowRelative && nStartRow == nEndRow)
+ {
+ // Start is overtaking End, swap.
+ bStartRowRelative = false;
+ bEndRowRelative = true;
+ }
+ }
+ if (nInsRow < nStartRow || (!bStartRowRelative && nInsRow <= nEndRow))
+ {
+ if (bSplit && (++i < nGroupLen))
+ rBounds.push_back( rPos.Row() + i);
+ break; // for, out of range now
+ }
}
}
- if (nInsRow < nStartRow || (!bStartRowRelative && nInsRow <= nEndRow))
- {
- if (bSplit && (++i < nGroupLen))
- rBounds.push_back( rPos.Row() + i);
- break; // for, out of range now
- }
- }
+ break;
+ default:
+ ;
}
- break;
- default:
- ;
}
}
}
commit b79ed725fc7cfa5dd3de2ba68d7aa69fa4221540
Author: Eike Rathke <erack at redhat.com>
Date: Fri Jun 5 15:51:46 2015 +0200
tdf#90694 reset group area listeners when splitting group
(cherry picked from commit 2f6a06856ad8df0c11a112d1e457b408e9a7af1d)
tdf#90694 reset group area listeners on correct top
Follow-up on 2f6a06856ad8df0c11a112d1e457b408e9a7af1d, rTop is top of
created group, listening needs to be ended on original (previous) group.
(cherry picked from commit 5d6448a5131488eac3a6af16bff06140663c3db4)
1f975a0a6c85e649aa07ce5c6e97bc6e917ff9ce
Change-Id: Ib3e85e1f7e12447fc2998711663ea1e9d1b322e5
Reviewed-on: https://gerrit.libreoffice.org/16104
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/core/tool/sharedformula.cxx b/sc/source/core/tool/sharedformula.cxx
index b1cd80d..84025b9 100644
--- a/sc/source/core/tool/sharedformula.cxx
+++ b/sc/source/core/tool/sharedformula.cxx
@@ -55,12 +55,24 @@ void SharedFormulaUtil::splitFormulaCellGroup(const CellStoreType::position_type
}
xGroup->mnLength = nRow - xGroup->mpTopCell->aPos.Row();
+ ScFormulaCell& rPrevTop = *sc::formula_block::at(*aPos.first->data, aPos.second - xGroup->mnLength);
+
+#if USE_FORMULA_GROUP_LISTENER
+ // At least group area listeners will have to be adapted. As long as
+ // there's no update mechanism and no separated handling of group area and
+ // other listeners, all listeners of this group's top cell are to be reset.
+ if (nLength2)
+ {
+ rPrevTop.EndListeningTo( rPrevTop.GetDocument(), NULL, ScAddress( ScAddress::UNINITIALIZED));
+ rPrevTop.SetNeedsListening(true);
+ }
+#endif
+
if (xGroup->mnLength == 1)
{
// The top group consists of only one cell. Ungroup this.
ScFormulaCellGroupRef xNone;
- ScFormulaCell& rPrev = *sc::formula_block::at(*aPos.first->data, aPos.second-1);
- rPrev.SetCellGroup(xNone);
+ rPrevTop.SetCellGroup(xNone);
}
// Apply the lower group object to the lower cells.
commit 62dfa279c2628ccb41c453cc22bf61881bbf6ef6
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun May 31 15:17:19 2015 +0200
tdf#91726: AutoFormat: Crash when using an existing name
Add a test to check if name already exists
Change-Id: Ie23de04c0b747f58ab61a6e498bf212bf38b346a
Reviewed-on: https://gerrit.libreoffice.org/16000
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 3807946b5515e943169da907866c93b52a2b3f19)
Reviewed-on: https://gerrit.libreoffice.org/16056
diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index b55b722..0829363 100644
--- a/sc/source/ui/miscdlgs/scuiautofmt.cxx
+++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx
@@ -211,7 +211,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, AddHdl)
{
aFormatName = pDlg->GetInputString();
- if ( !aFormatName.isEmpty() && !aFormatName.equals(aStrStandard) )
+ if ( !aFormatName.isEmpty() && !aFormatName.equals(aStrStandard) && pFormat->find(aFormatName) == pFormat->end() )
{
ScAutoFormatData* pNewData
= new ScAutoFormatData( *pSelFmtData );
commit b8f424345cad5f5efa7b2c1d5c166ece89771f51
Author: David Tardon <dtardon at redhat.com>
Date: Wed Jan 28 09:18:51 2015 +0100
tdf#78854 do not crash when undoing layout change
It turns out that the ordinal number adjustment that was added for
fdo#34548 is no longer necessary.
Change-Id: I2c491a008500b6a269b6f05a2a72f5aa70edecb2
(cherry picked from commit c0117fcb3dbd6c2a8d5e7679ee8d6fb29264ff6b)
Reviewed-on: https://gerrit.libreoffice.org/16152
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx
index c3e4861..f72c676 100644
--- a/include/svx/svdundo.hxx
+++ b/include/svx/svdundo.hxx
@@ -242,9 +242,6 @@ protected:
SdrView* pView; // To be able to re-create the selection for a
SdrPageView* pPageView; // for a ObjDel, Undo
sal_uInt32 nOrdNum;
- // It's possible that the object is re-assigned during a Undo/Redo.
- // The object is deleted in the dtor, if bOwner==TRUE
- ObjListListener* m_pListener;
protected:
SdrUndoObjList(SdrObject& rNewObj, bool bOrdNumDirect = false);
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index bde9c51..b901845 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -679,73 +679,11 @@ OUString SdrUndoGeoObj::GetComment() const
-class SdrUndoObjList::ObjListListener : public SfxListener
-{
-public:
- ObjListListener(SdrUndoObjList& rThat, SdrObject& rObject, SfxBroadcaster& rBroadcaster);
- virtual ~ObjListListener();
-
-private:
- virtual void Notify(SfxBroadcaster& rBroadcaster, const SfxHint& rHint) SAL_OVERRIDE;
-
-private:
- SdrUndoObjList& m_rThat;
- SdrObject& m_rObject;
- SfxBroadcaster* m_pBroadcaster;
-};
-
-SdrUndoObjList::ObjListListener::ObjListListener(SdrUndoObjList& rThat, SdrObject& rObject, SfxBroadcaster& rBroadcaster)
- : m_rThat(rThat)
- , m_rObject(rObject)
- , m_pBroadcaster(&rBroadcaster)
-{
- StartListening(*m_pBroadcaster);
-}
-
-SdrUndoObjList::ObjListListener::~ObjListListener()
-{
- if (m_pBroadcaster)
- EndListening(*m_pBroadcaster);
-}
-
-void SdrUndoObjList::ObjListListener::Notify(SfxBroadcaster&, const SfxHint& rHint)
-{
- const SdrHint* const pSdrHint(dynamic_cast<const SdrHint*>(&rHint));
- if (pSdrHint)
- {
- if (pSdrHint->GetObject() == &m_rObject)
- {
- switch (pSdrHint->GetKind())
- {
- case HINT_OBJCHG :
- if (IsListening(*m_pBroadcaster))
- {
- const sal_uInt32 nNewOrdNum(m_rObject.GetOrdNum());
- if (nNewOrdNum != m_rThat.GetOrdNum())
- m_rThat.SetOrdNum(nNewOrdNum);
- }
- break;
- case HINT_OBJREMOVED :
- SAL_WARN_IF(!IsListening(*m_pBroadcaster), "svx.sdr", "Object is not in any list");
- EndListening(*m_pBroadcaster);
- break;
- case HINT_OBJINSERTED :
- SAL_WARN_IF(IsListening(*m_pBroadcaster), "svx.sdr", "Object is already in a list");
- StartListening(*m_pBroadcaster);
- break;
- default :
- break;
- }
- }
- }
-}
-
SdrUndoObjList::SdrUndoObjList(SdrObject& rNewObj, bool bOrdNumDirect)
: SdrUndoObj(rNewObj)
, bOwner(false)
, pView(NULL)
, pPageView(NULL)
- , m_pListener(NULL)
{
pObjList=pObj->GetObjList();
if (bOrdNumDirect)
@@ -756,16 +694,12 @@ SdrUndoObjList::SdrUndoObjList(SdrObject& rNewObj, bool bOrdNumDirect)
{
nOrdNum=pObj->GetOrdNum();
}
-
- m_pListener = new ObjListListener(*this, *pObj, *pObj->GetModel());
}
SdrUndoObjList::~SdrUndoObjList()
{
SolarMutexGuard aGuard;
- delete m_pListener;
-
if (pObj!=NULL && IsOwner())
{
// Attribute have to go back to the regular Pool
commit b39b0a26677cf168a950829ab1ee326f938de985
Author: Andras Timar <andras.timar at collabora.com>
Date: Thu May 14 10:32:26 2015 +0200
tdf#91697 make hardcoded string localizable
Reviewed-on: https://gerrit.libreoffice.org/15727
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit bf6a14e0ba4eb2a47da0146379ec905089ab3a6c)
Conflicts:
uui/source/secmacrowarnings.cxx
uui/source/secmacrowarnings.hxx
Change-Id: Ie0bc8e8bd5e0770b85130496359e64358e34c836
Reviewed-on: https://gerrit.libreoffice.org/16130
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx
index 935ecf6..308e3fe 100644
--- a/uui/source/secmacrowarnings.cxx
+++ b/uui/source/secmacrowarnings.cxx
@@ -73,6 +73,7 @@ MacroWarning::MacroWarning( vcl::Window* _pParent, bool _bWithSignatures, ResMgr
get(mpSymbolImg, "symbolImage");
get(mpDocNameFI, "docNameLabel");
get(mpDescr1FI, "descr1Label");
+ get(mpDescr1aFI, "descr1aLabel");
get(mpSignsFI, "signsLabel");
get(mpViewSignsBtn, "viewSignsButton");
get(mpDescr2FI, "descr2Label");
@@ -176,7 +177,8 @@ void MacroWarning::InitControls()
}
else
{
- mpDescr1FI->SetText("The document contains document macros.");
+ mpDescr1FI->Hide();
+ mpDescr1aFI->Show();
mpSignsFI->Hide();
mpViewSignsBtn->Hide();
mpAlwaysTrustCB->Hide();
diff --git a/uui/source/secmacrowarnings.hxx b/uui/source/secmacrowarnings.hxx
index 84daaad..679321a 100644
--- a/uui/source/secmacrowarnings.hxx
+++ b/uui/source/secmacrowarnings.hxx
@@ -47,6 +47,7 @@ private:
FixedImage* mpSymbolImg;
FixedText* mpDocNameFI;
FixedText* mpDescr1FI;
+ FixedText* mpDescr1aFI;
FixedText* mpSignsFI;
PushButton* mpViewSignsBtn;
FixedText* mpDescr2FI;
diff --git a/uui/uiconfig/ui/macrowarnmedium.ui b/uui/uiconfig/ui/macrowarnmedium.ui
index 70b2f86..08460a0 100644
--- a/uui/uiconfig/ui/macrowarnmedium.ui
+++ b/uui/uiconfig/ui/macrowarnmedium.ui
@@ -129,6 +129,20 @@
</packing>
</child>
<child>
+ <object class="GtkLabel" id="descr1aLabel">
+ <property name="visible">False</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="hexpand">True</property>
+ <property name="label" translatable="yes">The document contains document macros.</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
commit f8a1ad1a1c2a04550cdc81f6f9b699e84a4f2562
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu May 21 15:12:10 2015 +0100
tdf#91095 svx: avoid unconditional SdrObject -> SdrObjCustomShape static_cast
Change-Id: I5ed86633e909c13f14ee382b4d9ec8f9c264df1d
(cherry picked from commit 23cba1f55f1937c27c2a1bc27f9d3fd7b1ef1b47)
Reviewed-on: https://gerrit.libreoffice.org/16178
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index 2d26c30..f10eb61 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -273,7 +273,7 @@ Reference< drawing::XShape > SAL_CALL EnhancedCustomShapeEngine::render()
throw ( RuntimeException, std::exception )
{
Reference< drawing::XShape > xShape;
- SdrObject* pSdrObjCustomShape( GetSdrObjectFromXShape( mxShape ) );
+ SdrObject* pSdrObjCustomShape( PTR_CAST( SdrObjCustomShape, GetSdrObjectFromXShape( mxShape ) ) );
if ( pSdrObjCustomShape )
{
// retrieving the TextPath property to check if feature is enabled
commit 38c3b0627e5ace4766aa6ae2144d08cdac47483e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 5 11:45:36 2015 +0100
uncaught exceptions in parallel deflate threads on re-export of HTB23106 odgs
Change-Id: Ib6aef478b8dcf1c7a7262ab60eef4d44da0de632
(cherry picked from commit 05661623c7e328c536814354bafd8294de0e9ee0)
(cherry picked from commit 56b5b8aac8729a37814f82b83ebba0d16f87e407)
Reviewed-on: https://gerrit.libreoffice.org/16096
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/package/inc/ZipOutputEntry.hxx b/package/inc/ZipOutputEntry.hxx
index 48e33eb..2a5aa04 100644
--- a/package/inc/ZipOutputEntry.hxx
+++ b/package/inc/ZipOutputEntry.hxx
@@ -42,6 +42,7 @@ class ZipOutputEntry
::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XCipherContext > m_xCipherContext;
::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XDigestContext > m_xDigestContext;
+ ::css::uno::Any m_aParallelDeflateException;
CRC32 m_aCRC;
ZipEntry *m_pCurrentEntry;
@@ -62,6 +63,9 @@ public:
ZipPackageStream* getZipPackageStream() { return m_pCurrentStream; }
bool isEncrypt() { return m_bEncryptCurrentEntry; }
+ void setParallelDeflateException(const ::css::uno::Any &rAny) { m_aParallelDeflateException = rAny; }
+ ::css::uno::Any getParallelDeflateException() const { return m_aParallelDeflateException; }
+
void closeEntry();
void write(const css::uno::Sequence< sal_Int8 >& rBuffer);
diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx
index 9c56f45..a885340 100644
--- a/package/source/zipapi/ZipOutputStream.cxx
+++ b/package/source/zipapi/ZipOutputStream.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
#include <comphelper/storagehelper.hxx>
+#include <cppuhelper/exc_hlp.hxx>
#include <osl/diagnose.h>
#include <osl/time.h>
@@ -101,6 +102,11 @@ void ZipOutputStream::finish()
m_rSharedThreadPool.waitUntilEmpty();
for (size_t i = 0; i < m_aEntries.size(); i++)
{
+ //Any exceptions thrown in the threads were caught and stored for now
+ ::css::uno::Any aCaughtException(m_aEntries[i]->getParallelDeflateException());
+ if (aCaughtException.hasValue())
+ ::cppu::throwException(aCaughtException);
+
writeLOC(m_aEntries[i]->getZipEntry(), m_aEntries[i]->isEncrypt());
sal_Int32 nRead;
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index c34ba01..bd3ab20 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -46,6 +46,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/seekableinput.hxx>
#include <comphelper/storagehelper.hxx>
+#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
@@ -471,8 +472,15 @@ public:
private:
virtual void doWork() SAL_OVERRIDE
{
- deflateZipEntry(mpEntry, mxInStream);
- mxInStream.clear();
+ try
+ {
+ deflateZipEntry(mpEntry, mxInStream);
+ mxInStream.clear();
+ }
+ catch (const uno::Exception&)
+ {
+ mpEntry->setParallelDeflateException(::cppu::getCaughtException());
+ }
}
};
More information about the Libreoffice-commits
mailing list