[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - 2 commits - editeng/source
matteocam
matteo.campanelli at gmail.com
Wed Jul 16 08:49:03 PDT 2014
editeng/source/editeng/impedit3.cxx | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
New commits:
commit b35084ea925d92f9f61b976c8f4aa3eadcd4c091
Author: matteocam <matteo.campanelli at gmail.com>
Date: Wed Jul 16 17:47:54 2014 +0200
IsPageOverflow discards null heights/widths
Change-Id: I87bd97c38b333d2ebffc2ee07c833fa0235233e0
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 4edb36d..ad7e465 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -356,11 +356,16 @@ void ImpEditEngine::FormatFullDoc()
bool IsPageOverflow(const sal_uInt32 aStatus, bool isVertical,
const Size aPrevPaperSize, const Size aPaperSize)
{
- const bool bGrowX=(aStatus & EE_STAT_TEXTWIDTHCHANGED) !=0;
- const bool bGrowY=(aStatus & EE_STAT_TEXTHEIGHTCHANGED) !=0;
+ const bool bTextGrowX=(aStatus & EE_STAT_TEXTWIDTHCHANGED) !=0;
+ const bool bTextGrowY=(aStatus & EE_STAT_TEXTHEIGHTCHANGED) !=0;
- return ( bGrowY && !isVertical && aPaperSize.Height() > aPrevPaperSize.Height() ) ||
- ( bGrowX && isVertical && aPaperSize.Width() > aPrevPaperSize.Width() );
+ const bPageExpansionX = ( aPrevPaperSize.Width() != 0 ) && // XXX
+ ( aPaperSize.Width() > aPrevPaperSize.Width() );
+ const bPageExpansionY = ( aPrevPaperSize.Height() != 0 ) && // XXX
+ ( aPaperSize.Height() > aPrevPaperSize.Height() );
+
+ return ( bTextGrowY && !isVertical && bPageExpansionY ) ||
+ ( bTextGrowX && isVertical && bPageExpansionX );
}
commit 5cad1ca513097dae9193471cb958f10c20174978
Author: matteocam <matteo.campanelli at gmail.com>
Date: Wed Jul 16 17:40:15 2014 +0200
Debugging output for IsPageOverflow in CheckAutoPageSize
Change-Id: I76beebca2e907364b0270661a162514c22466824
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 1ad910a..4edb36d 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -359,8 +359,8 @@ bool IsPageOverflow(const sal_uInt32 aStatus, bool isVertical,
const bool bGrowX=(aStatus & EE_STAT_TEXTWIDTHCHANGED) !=0;
const bool bGrowY=(aStatus & EE_STAT_TEXTHEIGHTCHANGED) !=0;
- return ( bGrowY && isVertical && aPaperSize.Height() > aPrevPaperSize.Height() ) ||
- ( bGrowX && !isVertical && aPaperSize.Width() > aPrevPaperSize.Width() );
+ return ( bGrowY && !isVertical && aPaperSize.Height() > aPrevPaperSize.Height() ) ||
+ ( bGrowX && isVertical && aPaperSize.Width() > aPrevPaperSize.Width() );
}
More information about the Libreoffice-commits
mailing list