[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : phil
Repository : xara
Revision : 1488
Date : Thu Jul 20 16:31:36 BST 2006
Changed paths:
M /Trunk/XaraLX/Kernel/bmpcomp.cpp
M /Trunk/XaraLX/Kernel/bmplist.cpp
M /Trunk/XaraLX/Kernel/ngitem.cpp
M /Trunk/XaraLX/Kernel/nodetxtl.cpp
M /Trunk/XaraLX/Kernel/nodetxtl.h
M /Trunk/XaraLX/wxOil/ftfonts.cpp
MartinW's fix for incorrect tab formatting and other tweaks.
Diff:
Index: Trunk/XaraLX/Kernel/bmplist.cpp
===================================================================
--- Trunk/XaraLX/Kernel/bmplist.cpp (revision 1487)
+++ Trunk/XaraLX/Kernel/bmplist.cpp (revision 1488)
@@ -126,8 +126,6 @@
//#include "will2.h"
-#include "nodetxtl.h"
-
#include "bmpcomp.h"
//#include "nodecach.h" // for CacheCompound specific tests in cleaning up GlobalList
Index: Trunk/XaraLX/Kernel/nodetxtl.cpp
===================================================================
--- Trunk/XaraLX/Kernel/nodetxtl.cpp (revision 1487)
+++ Trunk/XaraLX/Kernel/nodetxtl.cpp (revision 1488)
@@ -775,15 +775,15 @@
MILLIPOINT PhysicalRightMargin = pStoryInfo->StoryWidth - pStoryInfo->RightPathIndent;
BOOL WordWrapping = pStoryInfo->WordWrapping;
MILLIPOINT RightMargin = PhysicalRightMargin - mRightMargin;
- MILLIPOINT LeftMargin = PhysicalLeftMargin + GetEffectiveLeftMargin();
+ MILLIPOINT LeftIndent = GetEffectiveLeftMargin();
// if word wrapping, and not text at a point, and undoably 'do'ing op, word wrap the line
MILLIPOINT WrapWidth = 0;
if (WordWrapping)
- WrapWidth = RightMargin - LeftMargin; // will be 0 if text at a point
+ WrapWidth = RightMargin - PhysicalLeftMargin; // will be 0 if text at a point
if (WrapWidth!=0 && pStoryInfo->WordWrap)
{
- if (!this->Wrap(pStoryInfo->pUndoOp, WrapWidth))
+ if (!this->Wrap(pStoryInfo->pUndoOp, WrapWidth, LeftIndent))
return FALSE;
}
else if (WrapWidth != 0)
@@ -791,7 +791,7 @@
// when called during undo (i.e., WordWrap = FALSE) and the story is word wrapping,
// we do not want to wrap, but we still need to make sure that each tab gets its width
// set correctly, otherwise PositionCharsInLine will not do the right thing
- FindBreakChar(WrapWidth, FALSE);
+ FindBreakChar(WrapWidth, FALSE, LeftIndent);
}
// if line affected in any way, reposition chars in line
@@ -1160,7 +1160,9 @@
}
/********************************************************************************************
-> VisibleTextNode* TextLine::FindBreakChar(MILLIPOINT FitWidth)
+> VisibleTextNode* TextLine::FindBreakChar(MILLIPOINT FitWidth, BOOL SetCharPositions,
+ MILLIPOINT Indent, MILLIPOINT CharPosOffset,
+ MILLIPOINT ExtraOnChars, MILLIPOINT ExtraOnSpaces)
Author: Martin Wuerthner <xara@xxxxxxxxxxxxxxx>
(based on routine by Ed_Cornes <camelotdev@xxxxxxxx> created 15/7/96)
@@ -1307,9 +1309,9 @@
Purpose: Word wrap the line
********************************************************************************************/
-BOOL TextLine::Wrap(UndoableOperation* pUndoOp, MILLIPOINT WrapWidth)
+BOOL TextLine::Wrap(UndoableOperation* pUndoOp, MILLIPOINT WrapWidth, MILLIPOINT Indent)
{
- VisibleTextNode* pBreakChar = this->FindBreakChar(WrapWidth, FALSE);
+ VisibleTextNode* pBreakChar = this->FindBreakChar(WrapWidth, FALSE, Indent);
if (pBreakChar==NULL)
return FALSE;
Index: Trunk/XaraLX/Kernel/bmpcomp.cpp
===================================================================
--- Trunk/XaraLX/Kernel/bmpcomp.cpp (revision 1487)
+++ Trunk/XaraLX/Kernel/bmpcomp.cpp (revision 1488)
@@ -128,8 +128,6 @@
#include "sgliboil.h"
//#include "will2.h"
-#include "nodetxtl.h"
-
#include "expbmp.h" // ExportedBitmaps handling class
#include "impbmp.h" // ImportedBitmaps handling class
//#include "camfiltr.h" // BaseCamelotFilter - version 2 native filter - in camtypes.h [AUTOMATICALLY REMOVED]
Index: Trunk/XaraLX/Kernel/nodetxtl.h
===================================================================
--- Trunk/XaraLX/Kernel/nodetxtl.h (revision 1487)
+++ Trunk/XaraLX/Kernel/nodetxtl.h (revision 1488)
@@ -324,9 +324,9 @@
MILLIPOINT LastDescentLine, BOOL FirstLine);
BOOL SetCharMatrices(MILLIPOINT LinePos);
BOOL FitTextToPath(TextStoryInfo* pPathInfo, MILLIPOINT LinePos);
- BOOL Wrap(UndoableOperation* pUndoOp, MILLIPOINT WrapWidth);
+ BOOL Wrap(UndoableOperation* pUndoOp, MILLIPOINT WrapWidth, MILLIPOINT Indent);
VisibleTextNode* FindBreakChar(MILLIPOINT FitWidth, BOOL SetCharPositions,
- MILLIPOINT Indent = 0, MILLIPOINT CharPosOffset = 0,
+ MILLIPOINT Indent, MILLIPOINT CharPosOffset = 0,
MILLIPOINT ExtraOnChars = 0, MILLIPOINT ExtraOnSpaces = 0);
TextLine* FindFirstLineOfParagraph();
Index: Trunk/XaraLX/Kernel/ngitem.cpp
===================================================================
--- Trunk/XaraLX/Kernel/ngitem.cpp (revision 1487)
+++ Trunk/XaraLX/Kernel/ngitem.cpp (revision 1488)
@@ -128,8 +128,6 @@
#include "fontman.h" // fonts
//#include "txtattr.h" - in camtypes.h [AUTOMATICALLY REMOVED]
-#include "nodetxts.h"
-#include "nodetxtl.h"
#include "nodetext.h"
//#include "doccolor.h" // colours - in camtypes.h [AUTOMATICALLY REMOVED]
Index: Trunk/XaraLX/wxOil/ftfonts.cpp
===================================================================
--- Trunk/XaraLX/wxOil/ftfonts.cpp (revision 1487)
+++ Trunk/XaraLX/wxOil/ftfonts.cpp (revision 1488)
@@ -466,6 +466,8 @@
// we need to pass a ENUMLOGFONT structure to the kernel
// we can pass pointers to transient structures - the kernel copies the data if it is the
// best match so far
+ // We can only handle names that have less than 64 characters - see MyFontEnumerator::OnFacename
+ if (font.length() > 63) return TRUE;
String_64 OurFontName = font;
ENUMLOGFONT OurEnumLogFont;
OurEnumLogFont.elfLogFont.FaceName = font;
Xara