[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - editeng/source include/editeng svx/source
matteocam
matteo.campanelli at gmail.com
Thu Aug 7 11:43:06 PDT 2014
editeng/source/editeng/editeng.cxx | 3 +++
editeng/source/editeng/impedit.hxx | 2 +-
editeng/source/editeng/impedit3.cxx | 4 ++--
editeng/source/outliner/outliner.cxx | 9 ++++++++-
include/editeng/editeng.hxx | 1 +
include/editeng/outliner.hxx | 1 +
svx/source/svdraw/svdotxed.cxx | 6 +++++-
7 files changed, 21 insertions(+), 5 deletions(-)
New commits:
commit b687077202c921033a67a867e9ded55aa92e735c
Author: matteocam <matteo.campanelli at gmail.com>
Date: Thu Aug 7 20:22:06 2014 +0200
Reset mnOverflowPara
Change-Id: Ie07ee16d0f181bfedfe1d2459ab6915984235b20
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 6cbac8d..2709740 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2775,6 +2775,9 @@ sal_Int32 EditEngine::GetOverflowingParaNum() const {
return pImpEditEngine->GetOverflowingParaNum();
}
+void EditEngine::ClearOverflowingParaNum() {
+ pImpEditEngine->ClearOverflowingParaNum();
+}
EFieldInfo::EFieldInfo()
{
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 533b47d..426d235 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -466,7 +466,6 @@ private:
// For Chaining
sal_Int32 mnOverflowingPara = -1;
- void SetOverflowingParaNum();
IdleFormattter aIdleFormatter;
@@ -1023,6 +1022,7 @@ public:
sal_Int32 GetOverflowingParaNum() const { return mnOverflowingPara; }
void SetOverflowingParaNum(sal_Int32 nPara) { mnOverflowingPara = nPara; }
+ void ClearOverflowingParaNum() { mnOverflowingPara = -1; }
};
inline EPaM ImpEditEngine::CreateEPaM( const EditPaM& rPaM )
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index e810501..4c27985 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -431,7 +431,7 @@ void ImpEditEngine::FormatDoc()
// XXX: This may not work all the time: imp. edit engine is a shared resource!!
// Can it be that two boxes modify it before it's used?
- UpdateOverflowingPara( nPara );
+ UpdateOverflowingParaNum( nPara );
fprintf(stderr, "[CHAINING] Setting first overflowing para: %d\n", nPara);
}
@@ -4606,7 +4606,7 @@ void ImpEditEngine::ImplExpandCompressedPortions( EditLine* pLine, ParaPortion*
}
}
-void ImpEditEngine::SetOverflowingParaNum(int nPara)
+void ImpEditEngine::UpdateOverflowingParaNum(sal_Int32 nPara)
{
// update if not already updated
if ( mnOverflowingPara == -1 )
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index e4c2614..66d9cd4 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -2131,7 +2131,9 @@ OutlinerParaObject *Outliner::GetNonOverflowingParaObject() const
OutlinerParaObject *Outliner::GetOverflowingParaObject() const
{
if ( pEditEngine->GetOverflowingParaNum() )
- return CreateParaObject( pEditEngine->GetOverflowingParaNum() );
+ return CreateParaObject( pEditEngine->GetOverflowingParaNum() );
+
+ return NULL;
/*
// XXX: returns second paragraph if there is one, first otherwise
if ( GetParagraphCount() >= 2 )
@@ -2141,4 +2143,9 @@ OutlinerParaObject *Outliner::GetOverflowingParaObject() const
*/
}
+void Outliner::ClearOverflowingParaNum()
+{
+ pEditEngine->ClearOverflowingParaNum();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index a66c6d1..33dd8f0 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -596,6 +596,7 @@ public:
bool Redo(EditView* pView);
sal_Int32 GetOverflowingParaNum() const;
+ void ClearOverflowingParaNum();
};
#endif // INCLUDED_EDITENG_EDITENG_HXX
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index b00d8c7..dedc476 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -760,6 +760,7 @@ public:
OutlinerParaObject *GetNonOverflowingParaObject() const;
OutlinerParaObject *GetOverflowingParaObject() const;
+ void ClearOverflowingParaNum();
virtual void DepthChangedHdl();
void SetDepthChangedHdl(const Link& rLink){aDepthChangedHdl=rLink;}
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index 76d3296..b32a8be 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -268,7 +268,11 @@ void SdrTextObj::EndTextEdit(SdrOutliner& rOutl)
// set overflowing text for SdrChainedTextPrimitive2D
pNextText = rOutl.GetOverflowingParaObject();
mpOverflowingText = pNextText;
- //SetOverflowingText( pNextText );
+ // we do not need the bookmark at the overflowing check anymore.
+ rOutl.ClearOverflowingParaNum();
+
+ // TODO: factor the lines of code above in a single function
+
}
else // standard case
{
More information about the Libreoffice-commits
mailing list