r16968 by jghali - merge trunk revisions up to r16967

scribus-commit scribus-commit at lists.scribus.net
Sun Nov 6 22:52:15 UTC 2011


Author: jghali
Date: Sun Nov  6 22:52:15 2011
New Revision: 16968

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16968
Log:
merge trunk revisions up to r16967

Added:
    branches/ScribusOIF/doc/en/color6.html
      - copied unchanged from r16967, trunk/Scribus/doc/en/color6.html
    branches/ScribusOIF/doc/en/editorial.html
      - copied unchanged from r16967, trunk/Scribus/doc/en/editorial.html
    branches/ScribusOIF/doc/en/images/dtp-studio.png
      - copied unchanged from r16967, trunk/Scribus/doc/en/images/dtp-studio.png
    branches/ScribusOIF/doc/en/images/file-error1.png
      - copied unchanged from r16967, trunk/Scribus/doc/en/images/file-error1.png
    branches/ScribusOIF/doc/en/images/file-error2.png
      - copied unchanged from r16967, trunk/Scribus/doc/en/images/file-error2.png
    branches/ScribusOIF/doc/en/images/file-error3.png
      - copied unchanged from r16967, trunk/Scribus/doc/en/images/file-error3.png
    branches/ScribusOIF/doc/en/toolbox19.html
      - copied unchanged from r16967, trunk/Scribus/doc/en/toolbox19.html
    branches/ScribusOIF/resources/icons/LinkTextFrame.png
      - copied unchanged from r16967, trunk/Scribus/resources/icons/LinkTextFrame.png
    branches/ScribusOIF/scribus/ui/weldedit.cpp
      - copied unchanged from r16967, trunk/Scribus/scribus/ui/weldedit.cpp
    branches/ScribusOIF/scribus/ui/weldedit.h
      - copied unchanged from r16967, trunk/Scribus/scribus/ui/weldedit.h
    branches/ScribusOIF/scribus/ui/weldeditbase.ui
      - copied unchanged from r16967, trunk/Scribus/scribus/ui/weldeditbase.ui
Modified:
    branches/ScribusOIF/doc/en/about1.html
    branches/ScribusOIF/doc/en/cms.html
    branches/ScribusOIF/doc/en/color1.html
    branches/ScribusOIF/doc/en/color2.html
    branches/ScribusOIF/doc/en/color3.html
    branches/ScribusOIF/doc/en/color5.html
    branches/ScribusOIF/doc/en/color8.html
    branches/ScribusOIF/doc/en/fileproblems.html
    branches/ScribusOIF/doc/en/images/pdfxintent.png
    branches/ScribusOIF/doc/en/importbitmap1.html
    branches/ScribusOIF/doc/en/importhints1.html
    branches/ScribusOIF/doc/en/menu.xml
    branches/ScribusOIF/doc/en/pdfexport3.html
    branches/ScribusOIF/doc/en/pdflavor.html
    branches/ScribusOIF/doc/en/pdfx3.html
    branches/ScribusOIF/doc/en/psd.html
    branches/ScribusOIF/doc/en/settings1.html
    branches/ScribusOIF/doc/en/specs.html
    branches/ScribusOIF/scribus/CMakeLists.txt
    branches/ScribusOIF/scribus/actionmanager.cpp
    branches/ScribusOIF/scribus/canvas.cpp
    branches/ScribusOIF/scribus/canvasmode.cpp
    branches/ScribusOIF/scribus/canvasmode_drawbezier.cpp
    branches/ScribusOIF/scribus/canvasmode_drawcalligraphic.cpp
    branches/ScribusOIF/scribus/canvasmode_drawfreehand.cpp
    branches/ScribusOIF/scribus/canvasmode_edit.cpp
    branches/ScribusOIF/scribus/canvasmode_editmeshpatch.cpp
    branches/ScribusOIF/scribus/canvasmode_editweldpoint.cpp
    branches/ScribusOIF/scribus/canvasmode_editweldpoint.h
    branches/ScribusOIF/scribus/canvasmode_framelinks.cpp
    branches/ScribusOIF/scribus/canvasmode_nodeedit.cpp
    branches/ScribusOIF/scribus/canvasmode_normal.cpp
    branches/ScribusOIF/scribus/gtfont.cpp
    branches/ScribusOIF/scribus/pageitem.cpp
    branches/ScribusOIF/scribus/pageitem.h
    branches/ScribusOIF/scribus/pageitem_osgframe.cpp
    branches/ScribusOIF/scribus/pageitem_textframe.cpp
    branches/ScribusOIF/scribus/pdflib_core.cpp
    branches/ScribusOIF/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
    branches/ScribusOIF/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
    branches/ScribusOIF/scribus/plugins/fileloader/scribus134format/scribus134format.h
    branches/ScribusOIF/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
    branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.h
    branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    branches/ScribusOIF/scribus/plugins/gettext/htmlim/htmlreader.cpp
    branches/ScribusOIF/scribus/plugins/gettext/htmlim/htmlreader.h
    branches/ScribusOIF/scribus/plugins/import/ai/importai.cpp
    branches/ScribusOIF/scribus/plugins/import/cgm/importcgm.cpp
    branches/ScribusOIF/scribus/plugins/import/cvg/importcvg.cpp
    branches/ScribusOIF/scribus/plugins/import/drw/importdrw.cpp
    branches/ScribusOIF/scribus/plugins/import/oodraw/oodrawimp.cpp
    branches/ScribusOIF/scribus/plugins/import/pct/importpct.cpp
    branches/ScribusOIF/scribus/plugins/import/pdf/importpdf.cpp
    branches/ScribusOIF/scribus/plugins/import/pdf/slaoutput.cpp
    branches/ScribusOIF/scribus/plugins/import/ps/importps.cpp
    branches/ScribusOIF/scribus/plugins/import/shape/importshape.cpp
    branches/ScribusOIF/scribus/plugins/import/sml/importsml.cpp
    branches/ScribusOIF/scribus/plugins/import/svg/svgplugin.cpp
    branches/ScribusOIF/scribus/plugins/import/wmf/wmfimport.cpp
    branches/ScribusOIF/scribus/plugins/import/wpg/importwpg.cpp
    branches/ScribusOIF/scribus/plugins/import/xar/importxar.cpp
    branches/ScribusOIF/scribus/plugins/import/xfig/importxfig.cpp
    branches/ScribusOIF/scribus/plugins/scriptplugin/cmdmani.cpp
    branches/ScribusOIF/scribus/plugins/scriptplugin/cmdmisc.cpp
    branches/ScribusOIF/scribus/plugins/scriptplugin/cmdobj.cpp
    branches/ScribusOIF/scribus/plugins/scriptplugin/cmdpage.cpp
    branches/ScribusOIF/scribus/plugins/scriptplugin/cmdtext.cpp
    branches/ScribusOIF/scribus/plugins/scriptplugin/cmdutil.cpp
    branches/ScribusOIF/scribus/plugins/scriptplugin/cmdutil.h
    branches/ScribusOIF/scribus/plugins/tools/pathfinder/pathfinder.cpp
    branches/ScribusOIF/scribus/plugins/tools/pathstroker/pathstroker.cpp
    branches/ScribusOIF/scribus/pslib.cpp
    branches/ScribusOIF/scribus/scimgdataloader_ps.cpp
    branches/ScribusOIF/scribus/scpage.cpp
    branches/ScribusOIF/scribus/scribus.cpp
    branches/ScribusOIF/scribus/scribusXml.cpp
    branches/ScribusOIF/scribus/scribusdoc.cpp
    branches/ScribusOIF/scribus/scribusdoc.h
    branches/ScribusOIF/scribus/scribusview.cpp
    branches/ScribusOIF/scribus/sctextstruct.cpp
    branches/ScribusOIF/scribus/ui/about.cpp
    branches/ScribusOIF/scribus/ui/charselect.cpp
    branches/ScribusOIF/scribus/ui/checkDocument.cpp
    branches/ScribusOIF/scribus/ui/cpalette.cpp
    branches/ScribusOIF/scribus/ui/extimageprops.cpp
    branches/ScribusOIF/scribus/ui/gradientpreview.cpp
    branches/ScribusOIF/scribus/ui/outlinepalette.cpp
    branches/ScribusOIF/scribus/ui/picstatus.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_xyz.h
    branches/ScribusOIF/scribus/ui/propertiespalette_xyzbase.ui
    branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
    branches/ScribusOIF/scribus/ui/storyeditor.cpp
    branches/ScribusOIF/scribus/ui/storyeditor.h
    branches/ScribusOIF/scribus/util_math.cpp
    branches/ScribusOIF/scribus/util_math.h
    branches/ScribusOIF/win32/vc9/scribus-main/Scribus.vcproj

Modified: branches/ScribusOIF/doc/en/about1.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/about1.html
==============================================================================
--- branches/ScribusOIF/doc/en/about1.html (original)
+++ branches/ScribusOIF/doc/en/about1.html Sun Nov  6 22:52:15 2011
@@ -77,11 +77,11 @@
 
 <p><b>François Lanctôt:</b> Translator of the original documentation to French.</p>
 
-<p><b>Eirik Øverby:</b> Continues to mainatin our servers.</p>
+<p><b>Eirik Øverby:</b> Continues to maintain our servers.</p>
 
 <p><b>Gora Mohanty:</b> Wrote the spellcheck plug-in.</p>
 
-<p><b>Elvis Stansvik:</b> Wrote the “Search” for the Document Outline and implemented tables in 1.5svn.</p>
+<p><b>Elvis Stansvik:</b> Wrote the “Search” feature for the Document Outline and implemented tables in 1.5svn.</p>
 
 <p><b>Tomas Mecir:</b> Orphans and widows control implementation and other improvements in 1.5svn.</p>
 
@@ -89,7 +89,7 @@
 
 <p><b>Cezary Grabski:</b> Lots of fixes and improvements to the text system, as well as other useful enhancements.</p>
 
-<p><b>Marcus Holland-Moritz:</b> Performance improvents for documents with large images.</p>
+<p><b>Marcus Holland-Moritz:</b> Performance improvements for documents with large images.</p>
 
 <p><b>Christian Töpp</b></p>
 

Modified: branches/ScribusOIF/doc/en/cms.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/cms.html
==============================================================================
--- branches/ScribusOIF/doc/en/cms.html (original)
+++ branches/ScribusOIF/doc/en/cms.html Sun Nov  6 22:52:15 2011
@@ -27,8 +27,8 @@
 <p><strong>What are color or device profiles?</strong></p>
 
 <p><strong>ICC</strong> or <strong>ICM</strong> profiles are a special type of file which describes the color characteristic of a device like a scanner, monitor or printer – basically any device which can create, display or manipulate the color of a digital image, hence the name <b>device profiles</b>.</p>
-<p>There also color profiles which are known as <strong>device independent</strong> or <strong>working space</strong> profiles. These special files can be thought of as translators which are used to convert from one type of color profile to another.</p>
-<p>An ICC or ICM file is a set of tables which describes the mathematical values by which devices measure and describe color. Fortunately, these are set by <a href="http://www.color.org ">open international standards</a> and work the same way on Mac OS X, OS/2, eCS, Windows, Linux or UNIX.</p>
+<p>There are also color profiles which are known as <strong>device independent</strong> or <strong>working space</strong> profiles. These special files can be thought of as “translators” who convert color data from one type of color profile to another.</p>
+<p>An ICC or ICM file is a set of tables that contain the mathematical values by which devices measure and describe color. Fortunately, these profiles follow an <a href="http://www.color.org ">open and international standard</a> and work the same way on Mac OS X, OS/2, eCS, Windows, Linux or UNIX.</p>
 
 
 <h3>Activating Color Management</h3>
@@ -44,8 +44,8 @@
 <li><b>Linux/UNIX:</b> <code>/usr/share/color/icc</code> (system) and <code>/home/username/.color/icc</code> (user).</li>
 <li><b>Mac OS X:</b> <code>/Library/ColorSync/Profiles</code>.</li>
 <li><b>Windows:</b>: <code>C:\WINNT\system32\spool\drivers\color</code> (Windows 2000) and <code>C:\Windows\system32\spool\drivers\color</code> (Windows XP, Vista, 7).<br>
-<i>Note that on 64-bit Windows systems, some 32-bit programs may not find the profiles under the <code>system32</code> directory because they are searching for them under <code>C:\Windows\SysWOW64</code>, which is a folder that contains files needed for compatibility of 32-bit programs (This is not a typo: the folder with a “32” in its name is for 64-bit files, the one with “64” in it is for 32-bit files!). If you are running a 32-bit program on a 64-bit version of Windows and your color profiles aren’t available, you should also copy them to <code>C:\Windows\SysWOW64\spool\drivers\color</code></i>.</li>
-<li><b>OS/2 and eComStation:</b> <code>X:\scribus\lib\scribus\profiles</code>. <br>
+<i>Note that on 64-bit Windows systems, some 32-bit programs may not find the profiles in the <code>system32</code> directory because they are searching for them under <code>C:\Windows\SysWOW64</code>, which is a folder that contains files needed for compatibility of 32-bit programs (This is not a typo: the folder with a “32” in its name is for 64-bit files, the one with “64” in it is for 32-bit files!). If you are running a 32-bit program on a 64-bit version of Windows and your color profiles aren’t available, you should also copy them to <code>C:\Windows\SysWOW64\spool\drivers\color</code></i>.</li>
+<li><b>OS/2 and eComStation:</b> <code>X:\scribus-directory\lib\scribus\profiles</code>. <br>
 <i>Note that there is no system-wide color management available on OS/2 and eComStation, so every program that uses color management, like Scribus or GIMP, needs the profiles in its own directory. However, it’s possible to create a single directory that comprises all profiles and then set this directory as an additional source for profiles, e.g.</i> <code>X:\ICC</code>. <i>In Scribus you can add this path in the “General” tab of the <a href="settings1.html#1">Preferences</a>.</i></li>
 </ul>
 

Modified: branches/ScribusOIF/doc/en/color1.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/color1.html
==============================================================================
--- branches/ScribusOIF/doc/en/color1.html (original)
+++ branches/ScribusOIF/doc/en/color1.html Sun Nov  6 22:52:15 2011
@@ -42,7 +42,7 @@
     <tr valign=top>
       <td><img src="images/rgb.png"></td>
       <td> </td>
-      <td><b>RGB Colors</b>: These colours are defined in the RGB color model. Every color is described by the three primary colors red, green and 	blue.</td>
+      <td><b>RGB Colors</b>: These colors are defined in the RGB color model. Every color is described by the three primary colors red, green and 	blue.</td>
     </tr>
     <tr valign=top>
       <td><img src="images/cmyk.png" align="top"></td>

Modified: branches/ScribusOIF/doc/en/color2.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/color2.html
==============================================================================
--- branches/ScribusOIF/doc/en/color2.html (original)
+++ branches/ScribusOIF/doc/en/color2.html Sun Nov  6 22:52:15 2011
@@ -6,7 +6,7 @@
 <body>
 <h2>Editing and Managing Solid Colors (2)</h2>
 <h3>Changing the Default Color Palette</h3>
-<p>To change the default colour palette, make sure that no Scribus document is open. Then open the Color Manager (<i>Edit > Colors</i>):</p>
+<p>To change the default color palette, make sure that no Scribus document is open. Then open the Color Manager (<i>Edit > Colors</i>):</p>
 
 <table width="100%"><tr><td align="center"><img src="images/colrs-mgt1.png" title="Scribus Color Manager" alt="Scribus Color Manager" /></td></tr></table><br/>
 

Modified: branches/ScribusOIF/doc/en/color3.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/color3.html
==============================================================================
--- branches/ScribusOIF/doc/en/color3.html (original)
+++ branches/ScribusOIF/doc/en/color3.html Sun Nov  6 22:52:15 2011
@@ -6,7 +6,7 @@
 <body>
 <h2>Color Palettes in Scribus (1): Open Source Palettes</h2>
 <p>Note that all color palettes described here and in subsequent sections include three basic colors: 100% CMYK Black (C: 100, M: 100, Y: 100, K: 100), 100% CMYK White (C: 0, M: 0, Y: 0, K: 0), and the <a href="color1.html">Registration Color</a>. These will not be counted as separate colors in the tables.</p>
-<p>It is also important to note that no physical reference (color fan, color chips) exists for the colors in the palettes listed on this page, so that verification of color correctness is impossible. To ensure a maximum of color reliability, make sure that <a href="cms.html">color management</a> is set up correctly and activated, and that the right profiles have been selected.</p><br>
+<p>It is also important to note that no physical reference (color fan, color chips) exists for the colors in the palettes listed on this page so verification of color correctness is impossible.</p><br>
 <table border="1">
   <tbody>
     <tr valign=top>
@@ -31,45 +31,45 @@
       <td>No</td>
     </tr>
    <tr valign=top>
-      <td><b>Scribus Fedora</b></td>
+      <td><b>Fedora RGB</b></td>
       <td>A set of named RGB colors that are mandatory for publications of the <a href="http://fedoraproject.org/wiki/Logo/UsageGuidelines">Fedora Linux distribution</a>. </td>
       <td>50</td>
       <td>RGB</td>
       <td>No</td>
     </tr>
     <tr valign=top>
-      <td><b>Scribus Gnome</b></td>
+      <td><b>Gnome</b></td>
       <td>A set of named RGB colors that are mandatory for <a href="http://developer.gnome.org/hig-book/3.0/design-color.html.en">Gnome</a> desktop applications. </td>
       <td>32</td>
       <td>RGB</td>
       <td>No</td>
     </tr>
    <tr valign=top>
-      <td><b>Scribus LibreOffice</b></td>
+      <td><b>LibreOffice</b></td>
       <td>A set of named RGB colors used for project “branding” by <a href="http://wiki.documentfoundation.org/Marketing/Branding#Colors">LibreOffice</a>. </td>
       <td>30</td>
       <td>RGB</td>
       <td>No</td>
     </tr>
     <tr valign=top>
-      <td><b>Scribus OpenOffice</b></td>
+      <td><b>OpenOffice.org (CMYK)</b></td>
       <td>A set of CMYK colors based on the “CMYK” palette found in <a href="http://en.openoffice.org">OpenOffice.org</a>.</td>
       <td>94</td>
       <td>CMYK</td>
       <td>No</td>
     </tr>
    <tr valign=top>
-      <td><b>Scribus OpenSUSE</b></td>
+      <td><b>OpenSUSE</b></td>
       <td>A set of named RGB colors that are mandatory for publications of the <a href="http://en.opensuse.org/openSUSE:Artwork_guidelines#Colors">OpenSUSE Linux distribution</a>.</td>
       <td>15</td>
-      <td>CMYK</td>
+      <td>RGB</td>
       <td>No</td>
     </tr>
    <tr valign=top>
-      <td><b>Scribus Oxygen</b></td>
+      <td><b>Oxygen</b></td>
       <td>A set of named RGB colors used in KDE 4’s <a href="http://techbase.kde.org/Projects/Oxygen/Style#Color_Usage">Oxygen</a> desktop theme.</td>
       <td>126</td>
-      <td>CMYK</td>
+      <td>RGB</td>
       <td>No</td>
     </tr>
     <tr valign=top>
@@ -80,48 +80,13 @@
       <td>No</td>
     </tr>
     <tr>
-      <td><b>Scribus SVG</b></td>
+      <td><b>SVG</b></td>
       <td>A set of RGB colors based on the named colors defined in the <a href="http://www.w3.org/TR/css3-color/#svg-color">SVG specification</a>.</td>
       <td>149</td>
       <td>RGB</td>
       <td>No</td>
     </tr>
-   <tr>
-      <td><b>Scribus Ubuntu (RGB)</b></td>
-      <td>A set of named RGB colors that are mandatory for publications of the <a href="http://design.canonical.com/the-toolkit/ubuntu-brand-guidelines/">Ubuntu Linux distribution</a>.</td>
-      <td>4</td>
-      <td>RGB</td>
-      <td>No</td>
-    </tr>
-   <tr>
-      <td><b>Scribus Ubuntu (CMYK)</b></td>
-      <td>A set of named CMYK colors that are mandatory for publications of the <a href="http://design.canonical.com/the-toolkit/ubuntu-brand-guidelines/">Ubuntu Linux distribution</a>.</td>
-      <td>4</td>
-      <td>RGB</td>
-      <td>No</td>
-    </tr>
-    <tr valign=top>
-      <td><b>Scribus X11</b></td>
-      <td>A set of RGB colors based on the named colors from <a href="http://www.xfree86.org/current/X.7.html#toc10">X-Window</a>.</td>
-      <td>550</td>
-      <td>RGB</td>
-      <td>No</td>
-    </tr>
-    <tr valign=top>
-      <td><b>Scribus X11 Grey</b></td>
-      <td>A set of grayscale shades based on the named shades from X-Window.</td>
-      <td>110</td>
-      <td>RGB</td>
-      <td>No</td>
-    </tr>
-	<tr>
-      <td><b>Scribus Xfig</b></td>
-      <td>A set of the named RGB colors used by <a href="http://www.xfig.org/">Xfig</a>.</td>
-      <td>32</td>
-      <td>RGB</td>
-      <td>No</td>
-    </tr>
-    <tr valign=top>
+  <tr>
       <td><b>Tango</b></td>
       <td>A set of the RGB colors used in the <a href="http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines">Tango icon project</a> for Free desktops. Since Scribus uses the Tango icon set, this color set may also be interesting for Scribus-related projects.</td>
       <td>68</td>
@@ -129,7 +94,41 @@
       <td>No</td>
     </tr>
   </tbody>
+   <tr>
+      <td><b>Ubuntu (RGB)</b></td>
+      <td>A set of named RGB colors that are mandatory for publications of the <a href="http://design.canonical.com/the-toolkit/ubuntu-brand-guidelines/">Ubuntu Linux distribution</a>.</td>
+      <td>4</td>
+      <td>RGB</td>
+      <td>No</td>
+    </tr>
+   <tr>
+      <td><b>Ubuntu (CMYK)</b></td>
+      <td>A set of named CMYK colors that are mandatory for publications of the <a href="http://design.canonical.com/the-toolkit/ubuntu-brand-guidelines/">Ubuntu Linux distribution</a>.</td>
+      <td>4</td>
+      <td>RGB</td>
+      <td>No</td>
+    </tr>
+    <tr valign=top>
+      <td><b>X11</b></td>
+      <td>A set of RGB colors based on the named colors from <a href="http://www.xfree86.org/current/X.7.html#toc10">X-Window</a>.</td>
+      <td>550</td>
+      <td>RGB</td>
+      <td>No</td>
+    </tr>
+    <tr valign=top>
+      <td><b>X11 Grey</b></td>
+      <td>A set of grayscale shades based on the named shades from X-Window.</td>
+      <td>110</td>
+      <td>RGB</td>
+      <td>No</td>
+    </tr>
+	<tr>
+      <td><b>Xfig</b></td>
+      <td>A set of the named RGB colors used by <a href="http://www.xfig.org/">Xfig</a>.</td>
+      <td>32</td>
+      <td>RGB</td>
+      <td>No</td>
+    </tr>
 </table>
-
 </body>
 </html>

Modified: branches/ScribusOIF/doc/en/color5.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/color5.html
==============================================================================
--- branches/ScribusOIF/doc/en/color5.html (original)
+++ branches/ScribusOIF/doc/en/color5.html Sun Nov  6 22:52:15 2011
@@ -5,7 +5,7 @@
 </head>
 <body>
 <h2>Color Palettes in Scribus (3): Resene® Colors</h2>
-<p><a href="http://www.resene.co.nz">Resene Paints Limited</a> is a New Zealand-based color vendor, and as the name suggests, concentrates on coatings, paints and other colors for interior design, with its main markets in the Pacific region, especially Australia and New Zealand. The focus on areas other than printing doesn’t mean that the color sets are useless in Scribus – quite the contrary. If they were, the Scribus Team wouldn’t bother including them in the first place. First of all it should be noted that in many cases a close matching between corporate or organizational colors on different levels is required, from coatings to print products. Second, Resene, just like other color manufacturers, provides color charts, which allow for easily verifying colors with a printer. Third, there is the aesthetic facet of Resene palettes, as they consist of carefully chosen and lively colors that can add to the appeal of your layout.</p>
+<p><a href="http://www.resene.co.nz">Resene Paints Limited</a> is a New Zealand-based color vendor, and as the name suggests, concentrates on coatings, paints and other colors for interior design, with its main markets in the Pacific region, especially Australia and New Zealand. The focus on areas other than printing doesn’t mean that the color sets are useless in Scribus – quite the contrary. If they were, the Scribus Team wouldn’t bother including them in the first place. First of all it should be noted that in many cases a close matching between corporate or organizational colors on different levels is required, from coatings to print products. Second, Resene, just like other color manufacturers, provides color charts, which allow for easily verifying colors with a printer. Third, there is the aesthetic facet of Resene palettes, as they consist of carefully chosen and lively colors that can add to the appeal of your layout.</p><br>
 
 <table width="100%"><tr><td align="center"><img src="images/resene-pal.png" title="Resene® Colors in the Scribus Color Manager" alt="Resene® Colors in the Scribus Color Manager" /></td></tr></table><br/>
 
@@ -15,6 +15,5 @@
 <h4>Updates</h4>
 <p>Resene color collections are updated on a regular basis, and thanks to an arrangement with the company, Scribus users will receive updated versions of the palettes with every new Scribus release. As you have already learned, this won’t affect documents that use older palette versions, since they are <a href="color1.html">stored in the documents themselves</a>, from which they can be imported into your current file. If you, for whatever reason, need to use an older Resene color set, perhaps even a palette that pre-dates the inclusion of Resene palettes in Scribus, you can <a href="http://www.resene.co.nz/comn/services/cad_colour_books.htm">download</a> the palette as an AutoCAD color book file (*.acb) and use <a href="toolbox17.html">Swatchbooker</a> to convert it into a Scribus XML palette file.</p>
 
-<p><i><b>Note that all Resene palettes are <a href="color2.html">locked</a> by default and cannot be edited.</b></i></p>
 </body>
 </html>

Modified: branches/ScribusOIF/doc/en/color8.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/color8.html
==============================================================================
--- branches/ScribusOIF/doc/en/color8.html (original)
+++ branches/ScribusOIF/doc/en/color8.html Sun Nov  6 22:52:15 2011
@@ -30,7 +30,7 @@
       <td>No</td>
     </tr>
     <tr>
-      <td>Standardised Rock Colours</td>
+      <td>Standardised Rock Colors</td>
       <td>This is a color set that is often used as a reference for rock colors in geography and geology. It should only be used in geological or similar publications.</td>
       <td>26</td>
       <td>RGB</td>

Modified: branches/ScribusOIF/doc/en/fileproblems.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/fileproblems.html
==============================================================================
--- branches/ScribusOIF/doc/en/fileproblems.html (original)
+++ branches/ScribusOIF/doc/en/fileproblems.html Sun Nov  6 22:52:15 2011
@@ -9,31 +9,67 @@
 <h3>Damaged Files</h3>
 
 <h4>Parsing Errors</h4>
+<p>One of the major reasons for a damaged file (any file, not just Scribus files) is an interrupted saving procedure, e.g. a power failure or a system crash while the program was writing the data to the storage medium (like a hard drive or a USB stick). Other reasons can be file system errors or a damaged storage medium. Since Scribus SLA (and the older SCD) files are Plain Text XML-based files, these files can also be damaged by users themselves if they open and edit the files in a text editor. </p>
+<p>No matter what the reason for a damage to a particular file may be, the result will be that Scribus can’t “parse” (i.e., in very general terms, read and interpret) the file’s content, e.g. due to missing XML tags or invalid data. In such a case, Scribus will display a warning that indicates the line number of the file in which it stumbled across the error:</p>
+
+<table width="100%"><tr><td align="center"><img src="images/file-error3.png" title="Indicator for a parsing error" alt="Indicator for a parsing error"/></td></tr></table>
+
+<p>To fix damaged SLA and SCD files, a simple text editor is sufficient. For practical reasons, however, it’s recommended that the text editor provide a little more features than, for instance, Notepad on Windows. At the very least, the text editor should be able to show line numbers and support XML syntax highlighting. In case you are unfamiliar with XML concepts like tags etc., you can file a <a href="bugreport.html">bug report</a> and upload the damaged file to the bugtracker. In general, you can expect the file to be fixed by the developers within 48 hours. Be aware, though, that fixing a file by the developers need not mean that all content can be restored, as not all of it may have been written to the storage medium before the error occured. Thus, repairing a file may only result in a file that can be opened by Scribus again.</p>
 
 <h4>Other File Errors</h4>
-
+<p>While it’s relatively easy to repair SLA and SCD files, things are more complicated if you’ve been saving a compressed version (SLA.GZ or SCD.GZ). In such a case you will have to use a tool that can either repair a damaged gzip archive or, if the latter is impossible, retrieve as much of the archive’s content as possible.</p>
 
 <h3>Documents Created with Another Version of Scribus</h3>
 
 <h4>Files Created with an Earlier Version of Scribus</h4>
+<p>When you open a file created with an earlier version of Scribus, you will see a warning that you may or may not want to ignore. You can ignore it if you are sure that the file won’t have to be opened in an earlier version again, e.g. if you created the file yourself and simply upgraded to a newer Scribus version. If you’re working in a team, you should <b>always</b> make sure that all team members use the same version of Scribus.</p>
 
-<h4>Files Created with a Later Version of Scribus</h4>
+<table width="100%"><tr><td align="center"><img src="images/file-error2.png" title="Warning about file format backward incompatibilty" alt="Warning about file format backward incompatibilty"/></td></tr></table>
 
+<p>But what if you ignored the warning or saved the file inadvertently, knowing that your partner has to or wants to use an earlier version? Saving back to an older file format version isn’t possible. What you can do in such a case is to <i>group</i> all items on every page and then copy each group to the Scrapbook, page by page. You can then send your Scrapbook to the person that uses the older version, because the Scrapbook format didn’t change between versions. Be aware, though, that <i>linked text frames</i> on different pages cannot be re-created this way: You’ll have to re-link them in the earlier version.</p>
+<p>While every newer version of Scribus can open files created in older versions, including SCD and SCD.GZ files saved by early 0.x versions from more than a decade ago, you should <b>always</b> check the text layout, because the Scribus text layout algorithms have changed significantly over time. This measure of caution is especially important with older file versions, but it is recommended to always check the text layout if you open the file on another computer or after a font upgrade. While Scribus always does a <a href="fonts2.html">font check</a> during startup, it does not check for different font versions when it opens a file. Thus, different font versions or fonts with the same PostScript font name, but from different vendors/sources may result in broken text layout, e.g. unintended text overflow.</p>
+<table border="1" align="center">
+  <tbody>
+    <tr>
+      <td><span style="color: red;"><i><b>A special note about files created with Scribus versions 1.3.5 to 1.4 Release Candidate 5:</b> An important fix to the text layout engine in Scribus 1.4 Release Candidate 6 may cause significant text layout changes in text frames with certain text layout features (e.g. First Line Offset) applied, so re-formatting of text may be necessary in files created in versions prior to 1.4RC6.</i></span></td>
+    </tr>
+  </tbody>
+</table>
+
+
+<h4>Files Created with a Later Version of Scribus or Non-Scribus Files</h4>
+<p>Files created in later versions of Scribus cannot be opened by earlier ones. This is even true when both versions use the same file format, e.g. 1.3.9 and 1.4.0. Trying to open a file created in a later version with an earlier one will result in the following warning. This warning will also be displayed if you open a SLA, SLA.GZ, SCD or SCD.GZ file that is no Scribus file at all (there may be other programs that use these file extensions). The same goes, of course, for other file formats that can be opened by Scribus directly.</p>
+
+<table width="100%"><tr><td align="center"><img src="images/file-error1.png" title="Indicator for a file that has been created with a later version or that isn’t a Scribus file at all" alt="Indicator for a file that has been created with a later version or that isn’t a Scribus file at all"/></td></tr></table>
+<p>If you, for one reason or the other, can’t use the latest stable release of Scribus, and your version supports the same file format, you can open the SLA file in a text editor and replace the Scribus version in the file header:</p>
+<p>Example:</p>
+<p><code><?xml version="1.0" encoding="UTF-8"?><br>
+<SCRIBUSUTF8NEW Version="1.4.0"></code></p>
+<p>can be changed to:</p>
+<p><code><?xml version="1.0" encoding="UTF-8"?><br>
+<SCRIBUSUTF8NEW Version="1.3.9"></code></p>
+<p>Be aware, though, that you do so at your own risk, especially if you consider the changes made to the text layout engine since 1.4RC6.</p>
 <h3>Safety Measures</h3>
-
+<p>It may sound like a platitude, but every program and every operating system can crash, which means you may lose some or all of your work. Likewise, no computer is expected to run flawlessly forever and, like all material things, will cease working one day. Thus, the timeless hint “save your file regularly” also applies to Scribus. Fortunately, Scribus allows for automating the saving procedure to let you concentrate on your layout.</p>
 <h4>Autosave</h4>
-
-<h4>Backup Files</h4>
+<p>To let Scribus save your results in regular intervals, you can activate “Autosave” and set the interval in the <a href="settings1.html#2">Document section</a> of the Document Setup/Preferences. In addition to automatically saving your Scribus document, Scribus also creates a copy of the document. The copy’s file name consists of the original file name extended by the extension “.autosave”. Thus, the “autosave” copy of <code>myfile.sla</code> will be stored as <code>myfile.sla.autosave</code>. Should a SLA file have been damaged, you can always remove the “.autosave” extension and then open the “autosaved” version in Scribus. This procedure will give you the latest automatically saved version of your Scribus document.</p>
+<h4>Emergency Backup Files</h4>
 
 <h3>Other Potential Sources for Errors</h3>
 
+<h4>Missing Images</h4>
+<p>Images you have loaded into an <a href="WwImages.html">image frame</a> will not be stored in your Scribus file. Instead, Scribus will save the path to the image relative the the Scribus file. When you open the Scribus file, Scribus will search for the image(s) used in the document in the paths stored in the file and the directory where the Scribus file itself is located. If you have moved either the Scribus file or the image(s) to another directory, Scribus probably won’t find the image(s) and display empty image frames. You can then use <i>Extras > Manage Images</i> to let scribus search for the new location of the image(s).</p>
+<p>If you plan to exchange Scribus files with images between computers, you should always use <i>File > Collect for Output</i> to make sure all images are included.</p>
+<p>Note that bitmap <a href="WwFill.html">patterns</a> will also have to be treated like regular images.</p>
+
 <h4>File Substitutions</h4>
-
-<h4>Missing Images</h4>
+<p>Scribus not only saves the paths to images but also paths to other file types used in connection with your documents. These are fonts and color profiles. Upon opening a file, you will be asked to substitute both file types. See the <a href="fonts1.html">font</a> and <a href="cms.html">color management</a> chapters for more information. Note that substituting fonts and/or color profiles may have consequences for your layout or color correctness. To avoid potential errors, you are advised to export these resources with your Scribus document by using <i>File > Collect for Output</i>.</p>
 
 <h4>Render Frames</h4>
+<p>Since the content of <a href="WwRenderframes.html">Render Frames</a> will be rendered anew each time you open a file, you have to make sure that third party applications used for rendering content are installed and configured correctly if you are exchanging files between computers and/or platforms. Otherwise, the frames will remain empty.</p>
 
 <h4>Settings/Preferences</h4>
+<p>If, for no obvious reasons, a Scribus installation that used to work without any issues suddenly starts to behave strangely or doesn’t work at all, the reason may be damaged <a href="settings1.html#20">Preferences</a> files. In case you are encountering any strange behavior of Scribus you can try to <b>rename</b> the hidden <code>.scribus</code> directory that contains these files and start Scribus anew. The program will then create new configuration files from scratch. This may or may not solve the issue. If it doesn’t, the reason for your problem is probably unrelated to Scribus, e.g. a hardware issue or compatibility issues after an update of other components of your system, like a Windows update or a Qt4 update under Linux/UNIX. In such a case you can delete the newly created <code>./scribus</code> directory and restore the previously renamed folder. Of course this won’t solve your problem, but at least you don’t lose your previous default settings that way.</p>
 <!--<hr>
 See also:
 <ul>

Modified: branches/ScribusOIF/doc/en/images/pdfxintent.png
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/images/pdfxintent.png
==============================================================================
Binary files - no diff available.

Modified: branches/ScribusOIF/doc/en/importbitmap1.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/importbitmap1.html
==============================================================================
--- branches/ScribusOIF/doc/en/importbitmap1.html (original)
+++ branches/ScribusOIF/doc/en/importbitmap1.html Sun Nov  6 22:52:15 2011
@@ -2,8 +2,9 @@
 <head>
 	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
 	<title>Importing Bitmap Files</title>
+</head>
+<body>
 <h2>Importing Bitmap Files</h2>
-<p></p>
 <h3>Supported Bitmap Formats</h3>
 <p>Scribus supports a broad range of bitmap formats, but you should avoid most of them for serious print jobs. These formats are (in alphabetical order):</p>
 <ul>

Modified: branches/ScribusOIF/doc/en/importhints1.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/importhints1.html
==============================================================================
--- branches/ScribusOIF/doc/en/importhints1.html (original)
+++ branches/ScribusOIF/doc/en/importhints1.html Sun Nov  6 22:52:15 2011
@@ -61,6 +61,6 @@
 <li>Users saving from Adobe Illustrator 9.0 or later are urged to either export to EPS versions compatible with Illustrator version 7 or less <b>or</b> use Illustrator’s native AI format for import into Scribus. Why? Illustrator 9+ actually uses PDF as a native format and embeds quite a bit of Adobe-specific data in an EPS, which can cause issues when importing. Scribus is not alone with this issue.</li>
 </ul>
 <h3>Special EPS files</h3>
-<p>Some EPS files cannot be opened by Scribus at all, despite being 100% compliant to the specification. These files serve special purposes and may not have any image contents at all. For example, colour palette files from commercial vendors are often shipped as EPS files, because these palettes can be read by most graphics programs, including Scribus. Their only content is a list of colors. Other examples are symbol or pattern libraries for Adobe Illustrator. The content of these files will be loaded into the respective resource dialogs in Illustrator, but it can’t be accessed directly by most other programs, including Scribus.</p>
+<p>Some EPS files cannot be opened by Scribus at all, despite being 100% compliant to the specification. These files serve special purposes and may not have any image contents at all. For example, color palette files from commercial vendors are often shipped as EPS files, because these palettes can be read by most graphics programs, including Scribus. Their only content is a list of colors. Other examples are symbol or pattern libraries for Adobe Illustrator. The content of these files will be loaded into the respective resource dialogs in Illustrator, but it can’t be accessed directly by most other programs, including Scribus.</p>
 </body>
 </html>

Modified: branches/ScribusOIF/doc/en/menu.xml
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/menu.xml
==============================================================================
--- branches/ScribusOIF/doc/en/menu.xml (original)
+++ branches/ScribusOIF/doc/en/menu.xml Sun Nov  6 22:52:15 2011
@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <menu>
 	<area text="Welcome" file="index.html">
-		<submenuitem text="Readme First" file="readme.html"/>
+		<submenuitem text="New in Scribus 1.4" file="readme.html"/>
+		<submenuitem text="Specifications" file="specs.html"/>
 	</area>
 	<area text="Documentation" file="intro.html">
 		<submenuitem text="Introduction" file="documentation.html">
+			<submenuitem text="Editorial Notes" file="editorial.html"/>
 			<submenuitem text="About the Team" file="about1.html"/>
-			<submenuitem text="Specifications" file="specs.html"/>
 		</submenuitem>
 		<submenuitem text="Installation" file="install.html">
 			<submenuitem text="Debian" file="install-dpkg.html"/>
@@ -49,6 +50,7 @@
 			<submenuitem text="Open Source Color Sets" file="color3.html" />
 			<submenuitem text="National Color Standards" file="color4.html" />
 			<submenuitem text="Resene Color Sets" file="color5.html" />
+			<submenuitem text="dtp studio Color Sets" file="color6.html" />
 			<submenuitem text="Special Purpose Colors" file="color8.html" />
 		</submenuitem>
 		<submenuitem text="Importing" file="importhints.html">

Modified: branches/ScribusOIF/doc/en/pdfexport3.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/pdfexport3.html
==============================================================================
--- branches/ScribusOIF/doc/en/pdfexport3.html (original)
+++ branches/ScribusOIF/doc/en/pdfexport3.html Sun Nov  6 22:52:15 2011
@@ -3,27 +3,26 @@
 	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
 	<title>PDF Export for Screen/Web</title>
 </head>
-<ul>
 <h2>PDF Export for Screen/Web</h2>
 
-<p>Recommended settings and hints:</p>
+<b>Recommended settings and hints:</b>
 
 <ul>
 <li>Down-sample all images to 72–96 dpi.</li>
 <li>Reduce the number of font faces to the minimum needed (see below).</li>
 <li>Choose the lowest quality setting for compression that has acceptable on-screen viewing results (you may have to experiment to see what’s acceptable for you).</li>
 <li>You can often substitute Arial for Helvetica, as some viewers may have this as an included font.</li>
-<li>Avoid importing EPS or PDFs into your document – instead, convert them to a low-resolution PNG with GSview, Inkscape or GIMP, then place them in your Scribus document. Why? They will render faster on your screen and often make for a smaller file size.</li>
+<li>Avoid importing EPS bitmap files or PDFs into your document – instead, convert them to a low-resolution PNG with GSview, Inkscape or GIMP, then place them in your Scribus document. Why? They will render faster on your screen and often make for a smaller file size.</li>
 <li>If possible, replace bitmap images with vector artwork. Vector artwork is far more compact in terms of size in PDF.</li>
 <li>Avoid using the Nimbus fonts. Adobe Reader does a poor job of substituting them by using its included fonts.</li>
 <li>Unless transparency in artwork is needed, select PDF 1.3 output for the greatest compatibility with other users.</li>
-<li>Always use “Screen/Web” as your output target in the PDF Export dialog. The exception is files with only black/white or greyscale content. In such a case you can also choose “Greyscale,” which will reduce the file size even further.</li>
+<li><b>Always</b> use “Screen/Web” as your output target in the PDF Export dialog. The exception is files with only black/white or grayscale content. In such a case you can also choose “Grayscale,” which will reduce the file size even further.</li>
 </ul>
 <p>When addressing PDF optimization for websites, there are two issues:</p>
 <ul>
 <li>If space is really an issue, it will help not to embed fonts and to use only the “standard 14 fonts,” which all PDF readers should be able to display reliably. These fonts include regular, bold, italic and bold italic variants of Courier, Helvetica, and Times, as well as “Symbol” and “Zapf Dingbats” (or equivalents).</li>
 </br>
-<li>The second is the perceived download time when the PDF is visible in the viewer or a browser plug-in. Ghostscript has a command line utility called <strong> pdfopt</strong>,  which can “linearize” a PDF and allow a PDF reader to display the first page of the PDF while loading subsequent pages in the background. This is very useful for longer documents. Note that this tool does not shrink the PDF, but actually may increase the size, as it undoes the non-linear way objects are stored in a PDF file. See the <a href="toolbox5.html">Ghostscript</a> documentation for details.</li>
+<li>The second is the perceived download time when the PDF is visible in the viewer or a browser plug-in. Ghostscript has a command line utility called <code> pdfopt</code>,  which can “linearize” a PDF and allow a PDF reader to display the first page of the PDF while loading subsequent pages in the background. This is very useful for longer documents. Note that this tool does not shrink the PDF, but actually may increase the size, as it undoes the non-linear way objects are stored in a PDF file. See the <a href="toolbox5.html">Ghostscript</a> documentation for details.</li>
 </ul>
 </body>
 </html>

Modified: branches/ScribusOIF/doc/en/pdflavor.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/pdflavor.html
==============================================================================
--- branches/ScribusOIF/doc/en/pdflavor.html (original)
+++ branches/ScribusOIF/doc/en/pdflavor.html Sun Nov  6 22:52:15 2011
@@ -6,14 +6,14 @@
 <body>
 <h2>PDF Flavors</h2>
 
-<p>Given the number of PDF “flavors” and the technical background, some may be tempted to call PDF merely a collective noun for a number of separate file formats, all of which are derivatives another format called PostScript. We cannot provide a complete technical overview over the PDF specification(s) and their relations to PostScript here, but a few notes may help to guide you through the jungle of versions and subsets.</p>
+<p>Given the number of PDF “flavors” and the technical background, some may be tempted to call PDF merely a collective noun for a number of separate file formats, all of which are derivatives of another format called PostScript. We cannot provide a complete technical overview over the PDF specification(s) and their relations to PostScript here, but a few notes may help to guide you through the jungle of versions and subsets.</p>
 
 <h3>PDF and PostScript</h3>
-<p>While it’s true that PDF is based on <a href="importhints1.html">PostScript</a>, it needs to be said that PDF, other than PostScript, is not a programming language. PDF and PostScript describe pages and their content using the same technology (“Adobe imaging model”), so conversion of the <i>visual</i> content between both formats works flawlessly. However, the PDF specification adds other layers of content that go beyond mere representation of graphical data on a printed page, like interactive features or scripting, which are not available in PostScript.</p>
+<p>While it’s true that PDF is based on <a href="importhints1.html">PostScript</a>, it needs to be said that PDF, other than PostScript, is not a programming language. PDF and PostScript describe pages and their content using the same technology (“Adobe imaging model”), so conversion of the <i>visual</i> content between both formats works flawlessly. However, the PDF specification adds other layers of content that go beyond mere representation of graphical data on a printed page, like interactive features or scripting, none of which are available in PostScript.</p>
 
 <h3>What is The Difference Between PDF Versions 1.0 to PDF 1.7?</h3>
 
-<p>Answering that question brings up many questions, but the most important thing you should be aware of is that a higher version is not necessarily a “better” PDF and in some cases can work against you.</p>
+<p>Answering that question brings up many new questions, but the most important thing you should be aware of is that a higher version is not necessarily a “better” PDF and in some cases can work against you.</p>
 <p>Each version parallels the release of a major version of Adobe Acrobat. Here’s a short overview:</p>
 <ul>
 <li><b>PDF 1.0:</b> Acrobat 1.0 – obsolete now. Not supported by Scribus.</li>
@@ -26,9 +26,9 @@
 <li><b>PDF 1.7:</b> Acrobat 8.0 – Refinements and enhancements to 3D embedding, interactive and other features, mostly unrelated to Scribus and/or commercial printing.</li>
 </ul>
 
-<h3>What about other kinds of PDF, like PDF-X and PDF-A?</h3>
+<h3>What about other kinds of PDF, like PDF-X or PDF-A?</h3>
 <p>The PDF format’s feature set continues to grow with every version, but not every feature is acceptable in all use-cases. Thus, workgroups at the International Standardization Organization (ISO) defined subsets of the PDF feature set, among them PDF/A or PDF/X. The purpose of PDF/A is long-term storage and accessibility of documents, i.e. the content of PDF/A files needs to be read or extracted in years, decades, perhaps centuries to come. This is, of course, different from PDF files created for commercial printing, whose main purpose is to reliably store visually important data like colors and typgraphically refined text. Below you can see the PDF export dialog in LibreOffice, an application suite which produces all kinds of “office” documents that are not suited for commercial printing:</p>
-<table width="100%"><tr><td align="center"><img src="images/pdfx1a-lo.png" alt="PDF/X-1a Export in LibreOffice" title="PDF/X-1a Export in LibreOffice" /></a></td></tr></table>
+<table width="100%"><tr><td align="center"><img src="images/pdfx1a-lo.png" alt="PDF/X-1a Export in LibreOffice" title="PDF/X-1a Export in LibreOffice" /></td></tr></table>
 <p>While there are some similarities in terms of features, there are also major differences, especially in the “General” tab. As you can see, the first option here is “PDF/A-1a,” an option that’s not available in Scribus, because creating documents for long-term storage is none of its major purposes (yet). You can also see that selecting “PDF/A-1a” enables or disables other features automatically (“Tagged PDF” and “Embed standard fonts” enabled, “Create PDF form” disabled). Similarly, Scribus will enable/disable some export features when you choose <a href="pdfx3.html">PDF/X-3</a> as output destination.</p>
 <p>In addition to PDF/A and PDF/X, several other PDF subsets are being developed as international standards, for instance PDF/E for engineering documents (including the embedding of 3D objects) or PDF/UA (= universal access) for visually impaired users. See the website of <a href="http://www.aiim.org/">the Association for Information and Image Management, International</a> for more information.</p>
 

Modified: branches/ScribusOIF/doc/en/pdfx3.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/pdfx3.html
==============================================================================
--- branches/ScribusOIF/doc/en/pdfx3.html (original)
+++ branches/ScribusOIF/doc/en/pdfx3.html Sun Nov  6 22:52:15 2011
@@ -25,10 +25,9 @@
 <table width="100%"><tr><td align="center"><img src="images/pdfx3-1.png" alt="PDF Create Dialog General Tab" /></td></tr></table>
 <p>Next, select the “Color” tab, as shown below:</p>
 <table width="100%"><tr><td align="center"><img src="images/pdfxcolor.png" alt="PDF Create Dialog Color Tab" /></td></tr></table>
-<p>Note that in the “Color” tab the general output target is greyed out. This is because in a PDF/X-3 workflow color space conversion to the printing device is supposed to happen as late as possible, which means it will be the printer who will do the final conversion, not you.</p>
+<p>Note that in the “Color” tab the general output target is grayed out. This is because in a PDF/X-3 workflow color space conversion to the printing device is supposed to happen as late as possible, which means it will be the printer who will do the final conversion, not you.</p>
 <p>Next, select the “Pre-Press” tab, as shown below:</p>
-<table width="100%"><tr><td align="center"><img src="images/pdfxintent.png" alt="PDF Create Dialog 
-PDF/X-3 Tab" /></td></tr></table>
+<table width="100%"><tr><td align="center"><img src="images/pdfxintent.png" alt="PDF Create Dialog PDF/X-3 Tab" /></td></tr></table>
 <p>This is where you  embed in the PDF the intended press condition, which is defined by the ICC color profile. It’s probably the most important choice in terms of color profiles, as it affects color throughout the whole workflow. You can also put in a short note about the document, which can be useful later on. <strong>This field cannot be left blank – as the PDF/X-3 specification requires it. Scribus will disable the “Save” button if the field is empty.</strong> You can also add other pre-press features like color bars or printing marks, but you should only do so if your printing company asks for them.<p>
 <p>Note: Because of the strict requirements of PDF/X-3, some PDF features are disabled, including encryption and presentation effects; all fonts are automatically embedded or subset. Likewise, annotations and transparency won’t be exported.</p>
 
@@ -45,7 +44,7 @@
 
 <h3>How Do I Test and Certify that Scribus PDF Files are Truly PDF/X-3 Compliant?</h3>
 <ol>
-<li><a href="http://callas.de/en/">Callas Software</a> has provided a free of charge PDF Inspektor plug-in for Adobe Acrobat. This plug-in checks the PDF and produces a detailed report on every fact of the PDF file, including meta informations on the file and a detailed listing of images and other PDF objects.</li>
+<li><a href="http://callas.de/en/">Callas Software</a> has provided a gratis PDF Inspektor plug-in for Adobe Acrobat. This plug-in checks the PDF and produces a detailed report on every fact of the PDF file, including meta informations on the file and a detailed listing of images and other PDF objects.</li>
 <li>Some specialist PDF software including Enfocus PitStop Pro and the full version of PDF Inspektor can perform detailed pre-flight checks on PDF. Acrobat Professional can also verify and pre-flight PDF/X files.</li>
 <li>Another option is the <a href="m www.altonatestsuite.com">Altona Suite</a>.</li>
 </ol>

Modified: branches/ScribusOIF/doc/en/psd.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/psd.html
==============================================================================
--- branches/ScribusOIF/doc/en/psd.html (original)
+++ branches/ScribusOIF/doc/en/psd.html Sun Nov  6 22:52:15 2011
@@ -7,7 +7,7 @@
 <h2>Working with Photoshop® Files</h2>
 
 <h3>Overview</h3>
-<p>Adobe Photoshop is one of the world’s best known software applications and widely used in professional graphics, both in print and for web graphics. While there are some great open source graphics applications like GIMP or Krita, sometimes Photoshop is still the only application that can be used in certain cases – especially in the pre-press world.</p>
+<p>Adobe Photoshop is one of the world’s best known software applications and widely used in professional graphics, both in print and for web graphics. While there are some great Open Source bitmap editing applications like GIMP or Krita, sometimes Photoshop is still the only application that can be used in certain cases – especially in the pre-press world.</p>
 
 <p>One of the sources of its power is the native PSD file format. A PSD file can not only hold image data, but is more of a large container which can include metadata, camera info, text, vector artwork, and more. Most other programs and formats only handle a small subset of its capabilities. </p>
 <h3>PSD Import</h3>
@@ -21,7 +21,7 @@
 <li>Alpha transparency is supported.</li>
 <li>Scribus will import PSD files with normal layers and will display the individual layers in the <i>Extended Image Properties</i> dialog, which is avialable from the Context Menu.</li> 
 <li>Clipping paths in PSD files will be recognized and can be used for text flow.</li>
-<li>Blending modes which are in the image file can be used to affect the way the image displays and prints. It’ also possible to modify blending or to apply other modes between PSD layers. This won’t affect the original file.</li>
+<li>Blending modes in the PSD file can be used to affect the way the image displays and prints. It’s also possible to modify blending or to apply other modes between PSD layers. This won’t affect the original file.</li>
 <li>In almost all cases Scribus will automatically detect the file encoding, whether it is ASCII, Binary or Binary with JPEG.</li>
 <!--<li>Scribus will handle both PSD and TIFF files, no matter what byte order is used – PPC Mac/SPARC or PC. If Scribus is run from the command line, you may see harmless error messages about tags in wrong order. Ignore them. </li>-->
 </ul>
@@ -32,8 +32,13 @@
 </ul>
 <h3>Specialties</h3>
 <ul>
-<li>DCS (Desktop Color Separations) 1.x/2.0 files are a special flavor of EPS saved in Photoshop and are imported natively – much like a PSD file – and complete with ICC profile support. Image quality should be close to or equivalent to the native PSD file. Vector masks are also detected and can be used to control the display within <i>Extended Image Properties</i>. DCS files can also be saved from QuarkXPress®, but this flavor will be imported using Ghostscript as a filter for the time being. This is partly because the way QuarkXPress® exports them does not conform to the DCS specifications properly.</li>
-<li>Scribus can detect Duotones, Tritones and Quadtones in PSD and Photoshop EPS files and import them. The difference between both formats is that you need to import the spot colors from the EPS separately via <i>Edit > Colors > Import</i>. If you import a PSD file, you can directly manipulate each of the spot colors within it via the <i>Image Effects</i> dialog, which is available from the Context Menu. In most cases, Scribus will detect the image as Duo-, Tri- or Quadtone and automatically import the colors from the PSD file.</li></ul><br>
+<li>DCS (Desktop Color Separations) 1.0/2.0 files are a special flavor of <a href="importhints1.html">EPS</a> saved in Photoshop and are imported natively – much like a PSD file – and complete with ICC profile support. Image quality should be close to or equivalent to the native PSD file. Vector masks are also detected and can be used to control the display within <i>Extended Image Properties</i>. DCS files can also be saved from QuarkXPress®, but this flavor will be imported using Ghostscript as a filter for the time being. This is partly because the way QuarkXPress® exports them does not conform to the DCS specifications properly.<br>
+<i>Additional Hints for DCS Import:</i></li>
+<ol>
+<li><i>Image Effects cannot be applied to DCS files for technical reasons.</i></li>
+<li><i>Before importing a DCS, make sure that the DCS “master file” (file extension *.eps) and the files for each separation (file extension *.C, *.M, *.Y, *.K respectively, plus one file for every spot color) are located in the <b>same</b> directory. Otherwise, Scribus cannot import the image correctly, and color shifts will occur.</i></li>
+</ol>
+<li>Scribus can detect Duotones, Tritones and Quadtones in PSD and Photoshop EPS files and import them. The difference between both formats is that you need to import the spot colors from the EPS separately via <i>Edit > Colors > Import</i>. If you import a PSD file, you can directly manipulate each of the spot colors within it via the <i>Image Effects</i> dialog, which is available from the Context Menu. In most cases, Scribus will detect the image as Duo-, Tri- or Quadtone and automatically import spot colors from the PSD file.</li></ul><br>
 <table width="100%">
 <tr><td align="center"><img src="images/duotone-imp.png" /></td></tr>
 <tr><td align="center"><img src="images/duotone-imp2.png" /></td></tr>
@@ -43,9 +48,9 @@
 <h3>Recommendations</h3>
 <ul>
 <li>If you do have the original PSD file of an image, by all means use it.</li>
-<li>Enable embedding the correct ICC profile within Photoshop. This is done via <i>Image > Mode > Convert to Profile </i>.</li>
+<li>Enable embedding the correct ICC profile within Photoshop. This is done via <i>Image > Mode > Convert to Profile</i>.</li>
 <li>Avoid using text layers. Scribus has very powerful text effect tools of its own and will export them as vectors, not as a bitmap, resulting in higher print quality. This advice is good for any bitmap editing application.</li>
-<li>Similarly, avoid vector artwork in bitmap files. Scribus has versatile vector drawing tools and will give you more reliable results in printing.</li>
+<li>Similarly, avoid vector artwork in PSD files. Scribus has versatile vector drawing tools and will give you more reliable results in printing.</li>
 <li>Scribus <i>can</i> handle CMYK JPEGs from Photoshop, complete with ICC profile support, but in general, it is preferable to use PSD or TIFF, as few other applications understand CMYK JPEG.</li>
 <li>Likewise, Scribus supports clipping paths in JPEGs stored by Photoshop.</li>
 <li>If you are using adjustment layers or effects layers, save a copy of your PSD and flatten the layers before importing the file into Scribus. This will not only shrink the file, but ensure that there are no issues with import into Scribus. </li>

Modified: branches/ScribusOIF/doc/en/settings1.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/settings1.html
==============================================================================
--- branches/ScribusOIF/doc/en/settings1.html (original)
+++ branches/ScribusOIF/doc/en/settings1.html Sun Nov  6 22:52:15 2011
@@ -5,8 +5,13 @@
 </head>
 <body>
 <h2>Document Settings and Preferences</h2>
-Under the <em>File</em> heading on the menu bar, you will find two related selections, <strong>Document Setup</strong> and <strong>Preferences</strong>. Each of these produces a dialog used for changing various default settings and other behavior in Scribus. <strong>Document Setup</strong> will refer to the document being edited, and changes made for that document will be saved with the document and apply when it is reopened. If you have no document open, you cannot select this dialog.
-<p><strong>Preferences</strong> in general changes settings for any future documents. It will be available whether or not you have any documents open. The following descriptions will primarily apply to Preferences, but we will point out differences compared with Document Setup as we go.
+<p>Under the <em>File</em> heading on the menu bar, you will find two related entries, <strong>Document Setup</strong> and <strong>Preferences</strong>. Each of these brings up a dialog used for changing various default settings and other behavior in Scribus:</p>
+<ul>
+<li><strong>Document Setup</strong> will refer to the document being edited, and changes made for that document will be saved with the document and apply when it is re-opened. If you have no document open, you cannot select this dialog.</li>
+<li><strong>Preferences</strong> in general changes settings for any future documents. It will be available whether or not you have any documents open. The following descriptions will primarily apply to Preferences, but we will point out differences compared with Document Setup as we go.</li>
+</ul>
+<br>
+<br>
 <table cellpadding="5">
 <tr><td width="200" valign="top"><ul>
 <li><a href="#1"><strong>General</strong></a></li>
@@ -37,32 +42,32 @@
 </ul></td></tr>
 </table>
 <h3><a name="1"></a>General (not present in Document Setup)</h3>
-<p>You may have started up Scribus in a particular <strong>Language</strong> – here we expect to see the system default language, but you can override that setting, which will remain on future startups until you change again. 
-<p>The <strong>Theme</strong> will be whatever your main system theme is when none is selected, but otherwise your choices depend on your operating system and its themes. You can also change Scribus fonts as seen here. The various other settings are straightforward, and experimentation will be your guide.
-<p>The various Paths are the default locations Scribus will use for these operations. The path for Scripts is where Scribus looks when you choose <em>Scripts > Execute Script</em> from the menu.
+<p>You may have started up Scribus in a particular <strong>Language</strong> – here we expect to see the system default language, but you can override that setting, which will remain on future startups until you change again.</p>
+<p>The <strong>Theme</strong> will be whatever your main system theme is when none is selected, but otherwise your choices depend on your operating system or desktop environment and its available themes (if any). You can also change the size of the font used in the user interface. The various other settings are straightforward, and experimentation will be your guide.</p>
+<p>The various “paths” are the default locations Scribus will use. The path for scripts is where Scribus looks when you choose <em>Scripts > Execute Script</em> from the menu bar.</p>
 <table width="90%"><tr><td align="center"><img src="images/prefs_general.png" align="center" alt="Preferences: General" title="General Preferences" width="680"/></td></tr></table>
 <h3><a name="2"></a>Document</h3>
-In Preferences, the various settings here will be those that you see when you open a new document (<em>File > New</em>). In Document Settings, they will change the current document. The <strong>Page Size</strong> section should be easily understandable, with a large selection of standard sizes to choose from, in addition to <em>Custom</em>. The <strong>Document Layout</strong> choices have been the source of confusion for some. These simply apply to the relative placement of pages on your screen, and each will have the size as indicated, not some subdivision of it. <em>Double Sided</em> would typically be chosen for a book-like layout, and thus the First Page selector at the bottom allows the initial page to be Right or Left. This helps you use the appropriate <a href="pagetemplate1.html">Master Page</a> layout.
+<p>In Preferences, the various settings here will be those that you see when you create a new document (<em>File > New</em>). In the Document Setup, they will change the current document. The <strong>Page Size</strong> section should be easily understandable, with a large selection of standard sizes to choose from, in addition to <em>Custom</em>. The <strong>Document Layout</strong> choices have been the source of confusion for some. These simply apply to the relative placement of pages on your screen, and each will have the size as indicated, not some subdivision of it. <em>Double Sided</em> would typically be chosen for a book-like layout, and thus the First Page selector at the bottom allows the initial page to be Right or Left. This helps you use the appropriate <a href="pagetemplate1.html">Master Page</a> layout.</p>
 <table width="90%"><tr><td align="center"><img src="images/prefs_document.png" align="center" alt="Default Document Settings" title="Default Document Settings"  width="680" /></td><td width="275"><img src="images/prefs_document1.png" width="250"><p>Here is an example of Double Sided, Right Page as the first (also happens to be two-column). If you print these on a local printer, they will print as individual pages.</td></tr></table>
-<p><strong>Preset Layouts</strong> will be available for anything other than Single Page layout. What these represent are some time-honored ways to set the margins of the page, many based on some mathematical approach related to the dimensions of the page. Below we see the contrast of these various methods – these are all right pages of a double-sided layout.
+<p><strong>Preset Layouts</strong> will be available for anything other than Single Page layout. What these represent are some time-honored ways to set the margins of the page, many based on some mathematical approach related to the dimensions of the page. Below we see the contrast of these various methods – these are all right pages of a double-sided layout.</p>
 <p><table cellpadding="3"><tr>
 <td align="center"><img src="images/prefs_gutenberg.png"><p>Gutenberg</td><td align="center"><img src="images/prefs_magazine.png"><p>Magazine</td><td align="center"><img src="images/prefs_fibonacci.png"><p>Fibonacci</td><td align="center"><img src="images/prefs_goldenmean.png"><p>Golden Mean</td><td align="center"><img src="images/prefs_9parts.png"><p>Nine Parts</td>
 </tr></table>
 <h3><a name="3"></a>Guides</h3>
-<p>Although labeled <strong>Guides</strong>, there are many other settings here, mostly related. Guides can either show above or below your content. <strong>Snapping: Snap Distance</strong> applies when <em>Page > Snap to Guides</em> or <em>Page > Snap to Grid</em> has been selected. <strong>Grab Radius</strong> has to do with the size of the virtual space for grabbing and dragging a frame's handles. As the tooltips indicate, you must shut down and restart Scribus for these to take effect when they are changed.
-This panel sets the default distances and colors, as well as the snap to settings. <strong>Baseline Grids</strong> is the set of horizontal guides which forces text in multiple columns to align horizontally, as shown below. Settings for the distances for baselines are in Paragraph Styles, as well as the next panel <strong>Typography</strong></p>
+<p>Although labeled <strong>Guides</strong>, there are many other settings here, mostly related. Guides can either show above or below your content. <strong>Snapping: Snap Distance</strong> applies when <em>Page > Snap to Guides</em> or <em>Page > Snap to Grid</em> has been selected. <strong>Grab Radius</strong> has to do with the size of the virtual space for grabbing and dragging a frame’s handles. As the tooltips indicate, you must shut down and restart Scribus for these to take effect when they are changed.</p>
+<p>This panel sets the default distances and colors, as well as the snap to settings. <strong>Baseline Grids</strong> is the set of horizontal guides which forces text in multiple columns to align horizontally, as shown below. Settings for the distances for baselines are in Paragraph Styles, as well as the next panel <strong>Typography</strong></p>
 
 <table width="90%"><tr><td align="center"><img src="images/prefs_guides.png" alt="Guides and Baseline Grid Settings" align="middle" title="Guides and Baseline Grid Settings" /></td></tr></table>
 <table width="80%"><tr><td valign="top">By default, Guides and Margins will show, but can be changed here, along with the color of each. Major and Minor Grids do not show by default – here we have changed the default colors so you can easily see the difference in the screenshot to the right, with page edges shown in red, margins in blue, major grid light green, and minor grid in light magenta.
-<p>Finally, at the bottom of the dialog we can choose to show the Baseline Grid by default, and adjust its default settings.
+<p>Finally, at the bottom of the dialog we can choose to show the baseline grid by default, and adjust its default settings.</p>
 <p>Find out more about the baseline grid in <a href="WwText.html#10">Working with Text</a>.</td>
 <td><img src="images/prefs_guides1.png"></td>
 </tr>
 </table>
 
 <h3><a name="4"></a>Typography</h3>
-<p>Here are the default settings for various typographic features – subscript, superscript, automatic line spacing and scaling of small capitals.
-<p>In addition, the amount of automatic linespacing can be adjusted relative to the size of the font. <em>Note that the 20% is in addition to the space required for the next line of text, so that the total space from one baseline to the next would be 120% of the font size.</em>
+<p>Here are the default settings for various typographic features – subscript, superscript, automatic line spacing and scaling of small capitals.</p>
+<p>In addition, the amount of automatic linespacing can be adjusted relative to the size of the font. <em>Note that the 20% is in addition to the space required for the next line of text, so that the total space from one baseline to the next would be 120% of the font size.</em></p>
 <p><table width="90%"><tr><td align="center"><img src="images/prefs_typog.png" align="center" alt="Typography Tab Panel"/></td></tr></table>
 
 <h3><a name="5"></a>Tools</h3>
@@ -82,15 +87,15 @@
 <p>Hyphenation details are described here: <a href="hyphenator.html">Hyphenation in Scribus</a>.</p>
 
 <h3><a name="7"></a>Fonts</h3>
-<p>Selecting and installing fonts correctly is one of the most important configuration items with Scribus and an extensive set of notes is here: <a href="fonts1.html">Fonts and Scribus</a>. If there is one part of the documentation you really must read, it is this one.</p>
+<p>Selecting and installing fonts correctly is one of the most important configuration items with Scribus, and an extensive set of notes is here: <a href="fonts1.html">Fonts and Scribus</a>. If there is one part of the documentation you really must read, it is this one.</p>
 
 <h3><a name="8"></a>Preflight Verifier</h3>
-Preflight verification (checking for errors) is automatic when exporting to PDF, and also can be chosen separately from the toolbar. Here are the default settings for various items you wish to have checked. You would be ill-advised to check <em>Ignore all errors</em> – an error discovered after commercial printing could prove to be costly.
+<p>Preflight verification (checking for errors) is automatic when exporting to PDF, and also can be chosen separately from the toolbar. Here are the default settings for various items you wish to have checked. You would be ill-advised to check <em>Ignore all errors</em> – an error discovered after commercial printing could prove to be costly.</p>
 <p><table width="90%"><tr><td align="center"><img src="images/prefs_preflight.png"></td></tr>
 </table>
 
 <h3><a name="9"></a>Color Management</h3>
-<p>There are detailed notes on <a href="cms.html"> Color Management under Scribus</a> and <a href="moncal.html">Creating a Monitor Profile with Littlecms</a>. MacOSX and Windows users can use commercially available tools like Monaco's Color Tools,  Eye-One, Adobe Gamma and Scribus can use them along side other color savvy applications. MacOSX users can use any of the profiles available to Color Sync. Scribus will automatically discover any system profiles installed.</p>
+<p>There are detailed notes on <a href="cms.html"> Color Management under Scribus</a> and <a href="moncal.html">Creating a Monitor Profile with Littlecms</a>. Mac OS X and Windows users can use commercially available tools like Monaco’s Color Tools or  Eye-One, and Scribus can use them alongside other color savvy applications.</p>
 <table width="90%"><tr><td align="center"><img src="images/prefs_colormgmt.png" alt="Color Management Preferences" title="Color Management Preferences" width="680" /></td></tr></table>
 <p><em>Note: You will not be able to export to PDF/X-3 if color management is not enabled, and the Preferences settings for this format will likewise not be available.</em></p>
 
@@ -103,6 +108,7 @@
 <tr><td align="center"><img src="images/prefs_pdfexport1.png" alt="PDF Export Preferences" title="PDF Export Preferences"/></td></tr></table>
 
 <h3><a name="11"></a>Documents Item Attributes</h3>
+<p>Aside from storing additional information about a given item, this feature is currently most useful in connection with the creation of a table of contents.</p>
 <h3>Table of Contents and Indexes</h3>
 <p>These two subdialogs relate to each other. One use of these features is explained here: <a href="http://wiki.scribus.net/index.php/Creating_a_Table_of_Contents">http://wiki.scribus.net/index.php/Creating_a_Table_of_Contents</a></p>
 
@@ -110,50 +116,57 @@
 
 <table width="90%"><tr><td align="center"><img src="images/prefs_keyboard.png" alt="Setting the Keyboard Shortcuts  for Scribus" title="Setting the Keyboard Shortcuts for Scribus"/></td></tr></table>
 
-<p>Here you see the various default keyboard shortcuts, which are editable, and many others can be assigned. These are stored in the <tt>.scribus/scribus14.rc</tt> file. Moreover, once customized, you can export them into a separate XML file which can be exported and saved separately, along with making it portable to other machines. The default file suffix is .ksxml. The XML is a unicode file and should not have issues being transported across platforms, with the only caveat that Macs have an option and command meta key, where Linux and Windows share common keyboards.</p>
+<p>Here you see the various default keyboard shortcuts, which are editable, and many others can be assigned. Moreover, once customized, you can export them into a separate XML file that can be exported and saved separately, along with making it portable to other machines. The default file suffix is .ksxml. This is a Unicode file and should not have issues being transported across platforms, with the only caveat that Macs have an option and command meta key, where Linux, UNIX, OS/2, eComStation and Windows share common keyboards.</p>
 
 <h3><a name="13"></a>Scrapbook</h3>
-<p>With scrapbooks, you can <em>right button</em> drag and drop frequently used items, including pictures, images and text files for quick placement. Scrapbooks can be saved with a file or independently of a document, as a separate scrapbook which can be loaded use with many different Documents. Separate scrapbooks are kept with a <code>.scs</code> designation. This panel sets the defaults for the thumbnail size in the scrapbook palette and if scrapbooks should be saved automatically when changed.</p>
-<h3><a name="14"></a>Display (not all of these available in Document Settings)</h3>
+<p>With Scrapbooks, you can <em>right button</em> drag and drop frequently used items, including pictures, images and text files for quick placement. Scrapbooks can be saved with a file or independently of a document, as a separate Scrapbook which can be loaded use with many different Documents. Separate Scrapbooks are kept with a <code>.scs</code> designation. This panel sets the defaults for the thumbnail preview size of items in the Scrapbook palette and whether Scrapbooks should be saved automatically when changed.</p>
+<h3><a name="14"></a>Display (not all of these are available in Document Settings)</h3>
 <p>Most of these are pretty straightforward. Depending on the size of your screen, you can use this to adjust the rescale and rearrange your workspace. If you have plenty of space, you may want to adjust the display to accurately reflect your document size by default. Remember, you can adjust the magnification settings in <em>Tools > Zoom</em>.</p>
 
 <table width="90%"><tr><td align="center"><img src="images/prefs_display.png" alt="Display Settings" title="Display Settings" /></td></tr></table>
 
-<p>The Colors tab allows for customization of the colors used for various screen features, such as marking the margins, grids, and guides. In Document Settings only Fill Color is available. It's also worth mentioning here that the Fill Color only has to do with the <em>appearance</em> of the document background and is not printed or exported to PDF.
+<p>The Colors tab allows for customization of the colors used for various screen features, such as marking the margins, grids, and guides. In Document Settings only Fill Color is available. It’s also worth mentioning here that the Fill Color only has to do with the <em>appearance</em> of the document background and is not printed or exported to PDF.
 <h3><a name="15"></a>External Tools</h3>
-<p>This panel enables you to change the default settings for the location of Ghostscript and your preferred image editing tool. If you have installed Ghostscript on Windows before installing Scribus, it is usually automatically detected.If you receive an error message on Windows indicating EPS files cannot be used. This is where the settings can be changed to allow Scribus to find the correct location of Ghostscript.</p>
-<p><strong>On Linux and Windows:</strong></p>
+<p>This panel enables you to change the default settings for the location of Ghostscript and other external programs. If you have installed Ghostscript before installing Scribus, it is usually detected automatically. If you receive an error message indicating that EPS files cannot be used, this is where the settings can be changed to allow Scribus to find the correct location of Ghostscript.</p>
+<h4>Ghostscript</h4>
+<p><strong>Linux, UNIX, OS/2, eComStation and Windows:</strong></p>
 <table width="90%"><tr><td align="center"><img src="images/prefs_exttools.png" alt="External Tools Settings" title="External Tools Settings" width="680" /></td></tr></table>
-<p>This particular screenshot comes from Linux, but Windows will have all of these same settings. If you do need to search for Ghostscript in Windows, the particular executable you need (for 32-bit) is named <tt>gswin32c.exe</tt> <em>not</em> <tt>gswin32.exe</tt>. Some additional information about Ghostscript can be found in <a href="toolbox7.html" title="Advanced Setup of Ghostscript">Advanced Ghostscript.</a></p>
-<p>You are not restricted to using Gimp for image editing, and could use any available image editor such as Cinepaint, Krita, or even Photoshop. 
-<p>Although it was formerly necessary to close Gimp after editing, this is no longer necessary. If Gimp is already running, you will either need to close it to have the image file automatically loaded to Gimp, or get the file using Gimp's Open dialog.
-<p><strong>On MacOSX</strong></p>
+<p>This particular screenshot comes from Linux and is also applicable to other UNIX systems. See the <a href="readme-win32.html">Windows</a>, <a href="readme-os2.html">OS/2 and eComStation</a> specific information for these operating systems. Some additional information about Ghostscript can be found in <a href="toolbox7.html">Advanced Ghostscript.</a></p>
+<p><strong>Mac OS X</strong></p>
 <table width="100%"><tr><td align="center"><img src="images/prefs-mac-1.png" alt="External Tools Settings" title="External Tools Settings" /></td></tr></table>
-<p>Above are the recommended settings, provided you are using GIMP and/or if you have installed the Ghostscript.framework from <a href="http://aqua.scribus.net">http://aqua.scribus.net</a>.</p>
+<p>Above are the recommended settings, provided you have correctly installed the <a href="readme-macosx.html">Ghostscript framework</a>.</p>
+<h4>Other External Tools</h4>
+<p><strong>Image Processing Tool</strong></p>
+<p>You are not restricted to using GIMP for image editing, and could use any available image editor such as Krita, or even Photoshop. However, GIMP is set as the default application, as it’s the most popular Open Source image editing software.
+<p><strong>Web Browser</strong></p>
+<p>Here you can set the path to the executable file of the browser that will be used if you click an external link in the Help Browser or select an external source from the <i>Help</i> menu.</p>
+<p><strong>Render Frames</strong></p>
+<p>See <a href="WwRenderframes.html">Working with Render Frames</a>.</p>
 
 
 <h3><a name="16"></a>Miscellaneous</h3>
 <table width="80%"><tr><td align="center"><img src="images/prefs_misc.png" title="Miscellaneous Settings"></td></tr></table>
 <h3><a name="17"></a>Plugins</h3>
-<p>This is an informational display about the various plugins you have at your disposal, how to activate them, and where their libraries are located.
+<p>This is an informational display about the various plug-ins you have at your disposal, how to use them, and where their libraries are located.
 
 <h3><a name="18"></a>Short Words</h3>
 <img src="images/prefs_shortwords.png">
-<p>Short Words is a plug-in to assist adding non breaking spaces to short words like Mr. and measurements like km. It may not be immediately obvious, but there to two kinds of these spaces, placed either before (for something like kg) or after (for something like Mr.). Directly edit in this panel and save.  Details on configuration and use are here: <a href="short-words.html">Short Words in Scribus</a>. </p>
+<p>Short Words is a plug-in to assist with adding non-breaking spaces to abbreviations like Mr. and measurements like km. Details on configuration and use are here: <a href="short-words.html">Short Words in Scribus</a>. </p>
 
 <h3><a name="19"></a>Scripter</h3>
-If the Scripter plugin is activated at startup, you will not need to make any changes here to use the included Python scripts.
-<p>Scripter Extensions are special scripter module or scripts which are loaded at startup to modify the abilities of the python scripter plug-in within Scribus. Details are here: <a href="scripter-extensions.html">Scripter Extensions Howto</a>. The console tab is for choosing syntax highlighting colors within the scripter console.</p>
+<p>If the <a href="scripter1.html">Scripter plug-in</a> is activated at startup, you will not need to make any changes here to use the included Python scripts.</p>
+<p>Scripter Extensions are special Scripter module or scripts which are loaded at startup to modify the abilities of the Python Scripter plug-in within Scribus. Details are <a href="scripter-extensions.html">here</a>. The Console tab is for choosing syntax highlighting colors within the Scripter Console.</p>
 <h3><a name="20"></a>Document Information (available in Document Settings but not in Preferences)</h3>
-There are a number of informational elements which can be saved with your file. Those that will be accessible and display in Properties in Adobe Reader (9.x) are Title, Author, and Keywords.
-<h4>Where Are the Preferences Files ?</h4>
-<p>Scribus' preferences are kept in a hidden directory <code>.scribus</code>. The location of which is as follows:
+See the section on <a href="docinfo.html">Document Information</a>.
+<h3>Where Are the Preferences Files?</h3>
+<p>Scribus’ preferences are kept in a hidden directory <code>.scribus</code>, the location of which is as follows:
 <ul>
 <li><strong>Linux/UNIX:</strong> <code>/home/username/.scribus</code></li>
-<li><strong>MacOSX:</strong> <code>User/username/.scribus</code></li>
-<li><strong>Windows:</strong> <code>Documents and Settings/username/.scribus</code></li>
+<li><strong>Mac OS X:</strong> <code>User/username/.scribus</code></li>
+<li><strong>OS/2 and eComStation</strong>: <code>X:\SCRIBUS-1.4.x-OS2-date\scribus\.scribus</code></li>
+<li><strong>Windows:</strong> <code>C:\Documents and Settings/username/.scribus</code></li>
 </ul>
- Within the directory is a <code>.scribus14.rc</code> file, a <code>scribusfont.rc</code> file which preserves your font preferences and a <code>prefs14.xml</code>. These files are stored in XML format, so you can inspect its contents with a text editor. If you have installed the scripter plug-in, there will also be a <code>scripter.rc</code> file which lists most recently used scripts. There might also be several directories, which are configuration or history files. If you are troubleshooting starting Scribus, <strong>rename</strong>, do not delete these files and directories. If you rename the directory, on re-starting Scribus, the launch time will be somewhat longer, as Scribus creates a cache of installed fonts. On the second re-start of Scribus, it will be much quicker. </p>
+<p>Within the directory are a <code>.scribus14.rc</code> file, a <code>scribusfont.rc</code> file (which preserves your font preferences) and a <code>prefs14.xml</code> file. These files are stored in XML format, so you can inspect and edit their contents with a text editor. If you have installed Python, there will also be a <code>scripter.rc</code> file that lists most recently used scripts. There are also several other directories, most which are comprised of configuration or history files. If you are encountering any issues with a previously working Scribus installation, <strong>renaming</strong>, not deleting, the <code>.scribus</code> directory may be a good idea. </p>
 
 <hr>
 <p>See also</p>
@@ -165,6 +178,5 @@
 <li><a href="color2.html">Managing Colors</a></li>
 <li><a href="WwRenderframes.html">Working with Render Frames</a></li>
 </ul>
-</p>
 </body>
 </html>

Modified: branches/ScribusOIF/doc/en/specs.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/doc/en/specs.html
==============================================================================
--- branches/ScribusOIF/doc/en/specs.html (original)
+++ branches/ScribusOIF/doc/en/specs.html Sun Nov  6 22:52:15 2011
@@ -1,112 +1,520 @@
 <html>
 <head>
 	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-	<title>Scribus Specifications</title>
+	<title>Scribus 1.4 Data Sheet</title>
 </head>
 <body>
-<h2>Scribus Specifications</h2>
-<h3>Summary:</h3>
-<p>Scribus is an Open Source, cross-platform desktop publishing (DTP) program. Originally developed on Linux, Scribus also runs natively on *BSD, Mac OS X 10.5 or later, OS/2 Warp 4, eComStation and Windows 2000 or later. The goal of the Scribus Team is to enable beginners to create professional-grade page layout and output, without limiting the advanced requirements of professional designers.</p>
-<h3>General:</h3>
-<ul>
-	<li>Scribus uses an XML-based file format, so that Scribus files (SLA) can be easily edited with a text editor or manipulated via Scripts (Perl, Python etc.).</li>
-	<li>Frames that can be edited more flexibly than in most other DTP programs.</li>
-	<li>Master Pages and Page Palettes allow for easy page management</li>
-	<li>Document-wide layers: Items can be moved between layers, and it's possible to apply blend modes and transparency to individual layers. </li>	
-	<li>Object linking, grouping, moving, locking, resizing and converting between different object types.</li>
-	<li>A sophisticated Scrapbook allows for easy sharing of design objects (such as text blocks, logo images, backgrounds etc.) between documents or via a network.</li>
-	<li>Render Frames allow for importing LaTeX formulas and other markup content directly into frames, as well as editing the markup code in an integrated editor.</li>
-</ul>
-<h3>Import Filters:</h3>
-<ul>
-	<li><b>Text:</b> Open Document Text (ODT), OpenOffice.org Writer 1 (SXW), HTML, MS Word (DOC), Comma Separated Values (CSV) and Plain Text in various encodings.</li>
-	<li><b>Bitmap Images:</b> Encapsulated PostScript (EPS), Graphics Interchange Format (GIF), JPEG, Portable Networks Graphic (PNG), Photoshop Document (PSD), Tagged Image File Format (TIFF), Windows/OS/2 bitmap (BMP), and X PixMap (XPM).</li>
-	<li><b>Vector Formats:</b> Adobe Illustrator (AI), Calamus Vector Graphics (CVG), Dia Shapes (SHAPE), Encapsulated PostScript (EPS), Kivio Stencils (SML), OpenDocument Graphics (ODG), OpenOffice.org Draw 1 (SXD), Macintosh PICT File (PICT), PostScript (PS), Scalable Vector Graphics (SVG, SVGZ), Windows Metafile (WMF) and Xfig (FIG).</li>
-	<li><b>Color Swatches:</b> Adobe Illustrator (AI), Encapsulated PostScript (EPS), GIMP Palette (GPL), OpenOffice.org Swatch (SOC) and PostScript (PS).</li>
-	<li><b>Other:</b> Almost all supported vector formats can also be opened as documents. In addition, there is an experimental PDF filter that can open some PDF files directly. PDF files can also be imported into image frames.</li>
-</ul>
-<h3>Typography</h3>
-<ul>
-<li>Paragraph and Character Styles with numerous paragraph and text style options</li>
-<li>Integrated versatile Style Manager for managing Paragraph, Character and Line Styles.</li>
-<li>Style inheritance.</li>
-<li>Sophisticated type handling including manual kerning of type, optical margins and word and glyph spacing options.</li>
-<li>Various line spacing options, including basline grid and first line offset.</li>
-<li>Full support for Type 1, TrueType and OpenType fonts.</li>
-<li>Integrated font preview and font management.</li>
-<li>Various options for text flow around objects.</li>
-<li>Configurable hyphenator.</li>
-<li> Short Words plug-in to avoid undesirable line breaks.</li>
-</ul>
-<h3>Text Editing</h3>
-<ul>
-<li>Integrated Text Editor for quick text editing.</li>
-<li>Search and Replace for text and text formatting.</li>
-<li>Spell checker.</li>
-<li>Flexible page numbering options.</li>
-</ul>
-<h3>Image Editing</h3>
-<ul>
-<li>Non-destructive image effects for all supported image files.</li>
-<li>Extensive support for Photoshop PSD and layered TIFF files. Layer blending modes and clipping paths are supported. Photoshop Duo, Tri and Quadtones are similarly well supported. 16-bit TIFF and PSD support is in testing.</li>
-<li>Support for DCS (Desktop Color Separations) files.</li>
-<li>An option to start an image editor of choice (e.g. GIMP, Krita, Photoshop) from within Scribus.</li>
-</ul>
-<h3>Vector Editing</h3>
-<ul>
-<li>All imported vector drawings can be edited with the help of Scribus's own set of vector tools.</li>
-<li>Scribus is shipped with a considerable set of default shapes.</li>
-<li>A versatile set of path and transform tools, comparable only to specialized vector drawing programs.</li>
-<li>Integrated line editor.</li>
-<li>Gradients, transparency and blend modes for vector items.</li>
-<li>Support for bitmap and vector patterns.</li>
-<li>PostScript barcode generator.</li>
-</ul>
-<h3>Color</h3>
-<ul>
-<li>ICC color management, including previews of images and embedding ICC profiles in PDF documents for accurate screen to print color. Scribus supports the proposed OpenICC specification for profiles.</li>
-<li>Emulation of various kinds of color blindness.</li>
-<li>Creation of color harmonies with the Color Wheel.</li>
-<li>Support for spot colors.</li>
-<li>A Search and Replace feature for solid colours.</li>
-<li>A large collection of color swatches, including those from commercial vendors.</li>
-</ul>
-<h3>Professional Publishing Features:</h3>
-<ul>
-	<li>Creation of CMYK color PostScript separations.</li>
-	<li>Creation of RGB, CMYK and Greyscale PDF files.</li>
-	<li>Full support for Level 2 PostScript output, a very large subset of Level 3 and support for PDF 1.4/1.5 features including transparency, gradients and 128 bit security.</li>
-	<li>Full Compliance with PDF/X-3.</li>
-	<li>Supports font embedding and subsetting in both PostScript and PDF export.</li>
-	<li>Advanced pre-press features, like bleed and printing marks</li> 
-	<li>Creation of PDF forms, including nearly all PDF field types, and JavaScript actions.</li>
-	<li>Creation of PDF presentations, including presentation effects.</li>
-</ul>
+<h2>Scribus 1.4 Data Sheet</h2><br>
 
-<h3>Ease of use features:</h3>
-<ul>
-	<li>Online Help Browser with extensive and continually updated documentation in English, French and German.</li>
-	<li>User-configurable keyboard shortcuts.</li>
-	<li>Ability to run in 27 different languages without recompilation or application re-start.</li>
-	<li>Detailed and flexible user preferences for document and application default settings.</li>
-	<li>A continually updated set of templates, especially created for new users to reach quick results and to get accustomed to Scribus.</li>
-	<li>A set of useful scripts, including a calendar wizard.</li>
-	<li>A flexible Undo/Redo system.</li>
-	<li>Easy precision placement of items on a page, including guides, multiple duplicate, align and distribute etc.</li>
-</ul>
+<body text="#000000">
+<table frame=VOID cellspacing=0 cols=2 rules=NONE border=0>
+	
+	<tbody>
+		<tr>
+			<td height=42 align=LEFT valign=TOP bgcolor="#CCCCCC"><b>Supported Operating Systems</b></td>
+			<td align=LEFT bgcolor="#CCCCCC">Linux, FreeBSD, NetBSD, OpenBSD, Solaris, OpenSolaris, Nexenta, Mac OS X 10.5 or later, OS/2 Warp 4, eComStation 1 or later, Windows 2000 or later</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP><b>UI Languages</b></td>
+			<td align=LEFT sdval="25" sdnum="1031;">25</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC"><b>Import Filters</b></td>
+			<td align=LEFT bgcolor="#CCCCCC"></td>
+		</tr>
+		<tr>
+			<td height=46 align=LEFT valign=TOP>Text</td>
+			<td align=LEFT>Open Document Text (ODT), OpenOffice.org Writer 1 (SXW), HTML, MS Word (DOC), Comma Separated Values (CSV), Plain Text in various encodings. </td>
+		</tr>
+		<tr>
+			<td height=84 align=LEFT valign=TOP bgcolor="#CCCCCC">Bitmap</td>
+			<td align=LEFT bgcolor="#CCCCCC">Desktop Color Separations (DCS), Encapsulated PostScript (EPS), Graphics Interchange Format (GIF), JPEG, Portable Networks Graphic (PNG), Photoshop Document (PSD), Tagged Image File Format (TIFF), Windows/OS/2 Bitmap (BMP),  X PixMap (XPM)</td>
+		</tr>
+		<tr>
+			<td height=103 align=LEFT valign=TOP>Vector</td>
+			<td align=LEFT>Adobe Illustrator (AI), Calamus Vector Graphics (CVG), Dia Shapes (SHAPE), Encapsulated PostScript (EPS), Kivio Stencils (SML), OpenDocument Graphics (ODG), OpenOffice.org Draw (SXD), Macintosh PICT File (PICT), PostScript (PS), Scalable Vector Graphics (SVG, SVGZ), Scribus Objects (SCE), Windows Metafile (WMF), Xfig (FIG)</td>
+		</tr>
+		<tr>
+			<td height=46 align=LEFT valign=TOP bgcolor="#CCCCCC">Color Palettes</td>
+			<td align=LEFT bgcolor="#CCCCCC">Adobe Illustrator (AI), Encapsulated PostScript (EPS), GIMP Palette (GPL), OpenDocument Swatch (SOC), PostScript (PS), Scribus Palette (XML)</td>
+		</tr>
+		<tr>
+			<td height=46 align=LEFT valign=TOP>Other</td>
+			<td align=LEFT>PDF (direct opening and import into image frames), Scribus Unicode Glyph Palette (UCP)</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC"><b>Export Filters:</b></td>
+			<td align=LEFT bgcolor="#CCCCCC"></td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>PDF:</td>
+			<td align=LEFT>1.3, 1.4, 1.5, X-3</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">PostScript:</td>
+			<td align=LEFT bgcolor="#CCCCCC">Level 2, 3</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Vector:</td>
+			<td align=LEFT>Encapsulated PostScript (EPS), Scalable Vector Graphics (SVG, SVGZ)</td>
+		</tr>
+		<tr>
+			<td height=42 align=LEFT valign=TOP bgcolor="#CCCCCC">Bitmap:</td>
+			<td align=LEFT bgcolor="#CCCCCC">BMP, BW, EPS, ICO, JP2, JPEG, PCX, PIC, PNG, PPM, RGB, RGBA, SGI, TGA, TIFF, XBM, XPM, XV</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Text:</td>
+			<td align=LEFT>Plain Text</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC"><b>Native File Formats</b></td>
+			<td align=LEFT bgcolor="#CCCCCC">SLA (XML-based Plain Text), SLA.GZ (Compressed SLA)</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP><b>Layout/Page Management</b></td>
+			<td align=LEFT></td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Preset Margin Layouts</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Master Pages</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Grids/Guides</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓/✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Page Palette</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Layers</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Page Import</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Flexible Page Numbering</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Individual Page Layout/Dimensions</td>
+			<td align=LEFT>✓/✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Table of Contents</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Bookmarks</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC"><b>Text/Typography</b></td>
+			<td align=LEFT bgcolor="#CCCCCC"></td>
+		</tr>
+		<tr>
+			<td height=19 align=LEFT valign=TOP>Paragraph/Character Styles</td>
+			<td align=LEFT>✓/✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Style Manager</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Glyph Scaling</td>
+			<td align=LEFT>Manual/Automatic</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Character/Word Tracking</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓/✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Glyph Extension</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Optical Margins</td>
+			<td align=LEFT bgcolor="#CCCCCC">Left, Right</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Drop Caps</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">First Line Offset</td>
+			<td align=LEFT bgcolor="#CCCCCC">Maximum Ascent, Font Ascent, Line Spacing</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Baseline Grid</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Indent/Tabulators</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓/✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Columns/Text Distance from Frame</td>
+			<td align=LEFT>✓/✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Text Flow around Objects</td>
+			<td align=LEFT bgcolor="#CCCCCC">Automatic/Flexible</td>
+		</tr>
+		<tr>
+			<td height=46 align=LEFT valign=TOP>Hyphenation Control</td>
+			<td align=LEFT>Language-based, Consecutive Hyphenations, Smallest Word, Exception List, Ignore List</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Spellcheck</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓<sup>1</sup></td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Linebreak Control for Abbreviations</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Inline Objects</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Supported Font Formats</td>
+			<td align=LEFT>Type 1 (Mac and PC), TrueType, OpenType</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Font Management</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Font Previewer</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Control Characters</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Integrated Text Editor (Story Editor)</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Glyph Collections</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Tables</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Text along Path</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP><b>Bitmap Images</b></td>
+			<td align=LEFT></td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">RGB/CMYK/Spot Color</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓/✓/✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Support for Embedded Clipping Paths</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Support for Layers/Blend Modes</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓/✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Non-destructive Image Effects</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Image Manager</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>EXIF Support</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Configurable Preview Resolution</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=46 align=LEFT valign=TOP>Assignment of Color Profiles to Individual Image Frames</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Launcher for External Image Editor</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP><b>Vector Graphics</b></td>
+			<td align=LEFT></td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Import as Vector</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Import as Image</td>
+			<td align=LEFT>✓<sup>2</sup></td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Color Import</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Drawing Tools</td>
+			<td align=LEFT>Straight Lines, Bézier Curves, Freehand Lines, Shape Library</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Line Styles/Line Style Editor</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓/✓</td>
+		</tr>
+		<tr>
+			<td height=46 align=LEFT valign=TOP>Path Tools</td>
+			<td align=LEFT>Lens Effects, Mesh Distortion, Path Along Path, Connect Paths, Cut Polygon, Boolean Path Operations, Path from Stroke, Subdivide Path</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Text Import</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓<sup>3</sup></td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP><b>Object Handling</b></td>
+			<td align=LEFT></td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Duplicate/Multiple Duplicate/Transform</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓/✓/✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Editable Frame Shapes</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Property-based Multiple Select</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Undo/Redo</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Action Manager</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Object Browser</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Align/Distribute/Mirror/Rotate</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓/✓/✓/✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Scratch Space around Pages</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Configurable Rulers</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Scrapbook for Reuseable Objects</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Measuring Tool</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=46 align=LEFT valign=TOP>Fill</td>
+			<td align=LEFT>Solid Colors, Gradients (Horizontal, Vertical, Diagonal, Cross, Radial), Patterns (Bitmap and Vector)</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Color Palette Management</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=46 align=LEFT valign=TOP>Solid/Spot Color Palettes</td>
+			<td align=LEFT>Open Source Palettes, National/Government Standards, Resene® Colors, Crayola® Colors, GCMI Colors, dtp studio collection</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Frame Type Conversion</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Transparency/Blend Modes</td>
+			<td align=LEFT>✓/✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Grouping/Locking/Combining of Objects</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓/✓/✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Support for Traditional Measuring Units</td>
+			<td align=LEFT>Cicero, Pica</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC"><b>Pre-Press/Printing</b></td>
+			<td align=LEFT bgcolor="#CCCCCC"></td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>RGB/CMYK/Spot Colors</td>
+			<td align=LEFT>✓/✓/✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Color Management</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Printer Emulation on Screen</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Out-of-Gamut Warning</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Emulation of Color Blindness</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Knockout/Overprinting</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓/✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Color Separations</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Printing Marks</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Print/Separation Preview</td>
+			<td align=LEFT>✓/✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Display of Ink Coverage</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Under Color Removal</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Document Bleed</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Font Embedding Control</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Preflight Verifier</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Collect for Output</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC"><b>Scripting</b></td>
+			<td align=LEFT bgcolor="#CCCCCC"></td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Supported Languages</td>
+			<td align=LEFT>Python</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Scripting Console</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Ready-to-Use Scripts via UI</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Sample Scripts</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP><b>Other Features</b></td>
+			<td align=LEFT></td>
+		</tr>
+		<tr>
+			<td height=46 align=LEFT valign=TOP bgcolor="#CCCCCC">Render Frames to Render Markup Languages Inside Scribus</td>
+			<td align=LEFT bgcolor="#CCCCCC">Pre-configured for LaTeX, Lilypond, Gnuplot, GraphViz, POV-Ray</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>PDF-Forms</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">PDF JavaScript</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>PDF Presentations</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">PDF Encryption</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>PDF/EPS Embedding in PDF Files</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Color Wheel to Create Color Harmonies</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Barcode Generator</td>
+			<td align=LEFT>✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Dublin Core Metadata Support</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP><b>Documentation/Support</b></td>
+			<td align=LEFT></td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Tooltips</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Integrated Help/<br>Searchable/Bookmarks</td>
+			<td align=LEFT>✓/✓/✓</td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP bgcolor="#CCCCCC">Printed Manual</td>
+			<td align=LEFT bgcolor="#CCCCCC">✓<sup>4</sup></td>
+		</tr>
+		<tr>
+			<td height=24 align=LEFT valign=TOP>Templates</td>
+			<td align=LEFT>✓</td>
+		</tr>
+</tbody>
+</table>
+<hr>
+<p><sup>1</sup> Not available on OS/2, eComStation and Windows.</p>
+<p><sup>2</sup> EPS and PostScript only.</p>
+<p><sup>3</sup> AI and EPS only.</p>
+<p><sup>4</sup> For the previous version. An update is being worked on.</p>
+<hr>
+<p><b>License</b>: <a href="scribuscopyright.html">GPL 2 with exceptions</a></p>
+</body>
 
-
-<h3>Architecture:</h3>
-<ul>
-	<li>The current version of Scribus is being developed with Qt 4.x.</li>
-	<li>Plug-in support and API (C++) including import and export plug-ins. </li>
-	<li>Powerful Python scripting plug-in for extending Scribus functions and automating tasks, as well as calling external applications within Scribus.</li>
-</ul>
-<h3>Target Usage:</h3>
-<ul>
-	<li>Layouts for newsletters, corporate stationery, posters, training manuals, technical documentation, business cards and other documents which need flexible layout and/or sophisticated image handling, as well as precise typography controls and image sizing not available in current word processors.</li>
-	<li>Users needing the ability to output to professional quality image setting equipment, as well as re-purposing for internal printing, web-distributed PDFs or presentations.</li>
-	<li>Users needing to create interactive PDF forms, including CGI/PHP form submission via PDF, or PDF presentations.</li>
-</ul>
-</body>
 </html>

Modified: branches/ScribusOIF/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/CMakeLists.txt
==============================================================================
--- branches/ScribusOIF/scribus/CMakeLists.txt (original)
+++ branches/ScribusOIF/scribus/CMakeLists.txt Sun Nov  6 22:52:15 2011
@@ -171,6 +171,7 @@
   ui/helpbrowsernavigation.ui
   ui/unicodesearch.ui
   ui/useprintermarginsdialog.ui
+  ui/weldeditbase.ui
 #  ${SCRIBUS_ITEMSETTERS_UI_SRC}
   ${SCRIBUS_OSG_UI_SRC}
 )
@@ -190,6 +191,7 @@
   canvasmode_editpolygon.h
   canvasmode_editspiral.h
   canvasmode_edittable.h
+  canvasmode_editweldpoint.h
   canvasmode_measurements.h
   canvasmode_normal.h
   chartablemodel.h
@@ -477,6 +479,7 @@
   ui/unicodesearch.h
   ui/useprintermarginsdialog.h
   ui/vruler.h
+  ui/weldedit.h
 #  ${SCRIBUS_ITEMSETTERS_CLASS}
   ${SCRIBUS_OSG_CLASS}
 )
@@ -918,6 +921,7 @@
   ui/unicodesearch.cpp
   ui/vruler.cpp
   ui/useprintermarginsdialog.cpp
+  ui/weldedit.cpp
 #  ${SCRIBUS_ITEMSETTERS_SRC}
   ${SCRIBUS_OSG_SRC}
   ${SCRIBUS_GMAGICK_SRC}

Modified: branches/ScribusOIF/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/actionmanager.cpp
==============================================================================
--- branches/ScribusOIF/scribus/actionmanager.cpp (original)
+++ branches/ScribusOIF/scribus/actionmanager.cpp Sun Nov  6 22:52:15 2011
@@ -509,6 +509,8 @@
 	name="itemsUnWeld";
 	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
 	name="itemWeld";
+	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
+	name="itemEditWeld";
 	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
 
 	connect( (*scrActions)["itemDuplicate"], SIGNAL(triggered()), mainWindow, SLOT(duplicateItem()) );
@@ -1124,6 +1126,7 @@
 	disconnect( (*scrActions)["extrasDeHyphenateText"], 0, 0, 0 );
 	disconnect( (*scrActions)["itemsUnWeld"], 0, 0, 0);
 	disconnect( (*scrActions)["itemWeld"], 0, 0, 0);
+	disconnect( (*scrActions)["itemEditWeld"], 0, 0, 0);
 
 
 }
@@ -1159,6 +1162,7 @@
 	connect( (*scrActions)["itemAdjustImageToFrame"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_AdjustImagetoFrameSize()) );
 	connect( (*scrActions)["itemsUnWeld"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_UnWeld()) );
 	connect( (*scrActions)["itemWeld"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_Weld()) );
+	connect( (*scrActions)["itemEditWeld"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_EditWeld()) );
 
 }
 
@@ -1484,6 +1488,7 @@
 	(*scrActions)["itemConvertToTextFrame"]->setTexts( tr("&Text Frame"));
 	(*scrActions)["itemsUnWeld"]->setTexts( tr("Unweld items"));
 	(*scrActions)["itemWeld"]->setTexts( tr("Weld items"));
+	(*scrActions)["itemEditWeld"]->setTexts( tr("Edit weld item"));
 
 	//Insert Menu
 	(*scrActions)["insertFrame"]->setTexts( tr("&Frames..."));
@@ -1964,7 +1969,8 @@
 		<< "itemCombinePolygons" 
 		<< "itemSplitPolygons"
 		<< "itemsUnWeld"
-		<< "itemWeld";
+		<< "itemWeld"
+		<< "itemEditWeld";
 	//Insert
 	++itmenu;
 	itmenu->second

Modified: branches/ScribusOIF/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/canvas.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvas.cpp (original)
+++ branches/ScribusOIF/scribus/canvas.cpp Sun Nov  6 22:52:15 2011
@@ -557,7 +557,8 @@
 	int indice = qMin(index, m_doc->Items->count());
 	if (index < 0 || indice < 0)
 		return NULL;
-	
+
+	int itemid = m_doc->Items->indexOf(item);
 	QRectF baseRect(item->getBoundingRect());
 	int itemLevel = m_doc->layerLevelFromID(item->LayerID);
 	if (itemLevel < 0)
@@ -566,10 +567,11 @@
 	for(index = indice - 1; index >= 0; --index)
 	{
 		PageItem* item1 = m_doc->Items->at(index);
+		int item1id = m_doc->Items->indexOf(item1);
 		int level = m_doc->layerLevelFromID(item1->LayerID);
 		if ((item != item1) && (level >= 0) && (level <= itemLevel))
 		{
-			if ((level == itemLevel) && (item1->ItemNr > item->ItemNr))
+			if ((level == itemLevel) && (item1id > itemid))
 				continue;
 			QRectF uRect(item1->getBoundingRect());
 			if(baseRect.intersects(uRect))

Modified: branches/ScribusOIF/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/canvasmode.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode.cpp Sun Nov  6 22:52:15 2011
@@ -320,81 +320,81 @@
 		
 		// FIXME when more than 1 item is selected, first Rect is drew normally (<10ms here)
 		// but followings are damn long - pm 
-		for (uint a=0; a<docSelectionCount; ++a)
+		for (uint a = 0; a < docSelectionCount; ++a)
 		{
 			currItem = m_doc->m_Selection->itemAt(a);
-// 			qDebug()<<"It"<<currItem->xPos()<< currItem->yPos();
-			
 			psx->save();
 			psx->setPen(m_pen["selection"]);
 			psx->setBrush(m_brush["selection"]);
 			double lineAdjust(psx->pen().width()/m_canvas->scale());
 			double x, y, w, h;
-			w = currItem->visualWidth();
-			h = currItem->visualHeight();
-			if (currItem->rotation() != 0)
-			{
-				psx->setRenderHint(QPainter::Antialiasing);
-				psx->translate(currItem->xPos(), currItem->yPos());
-				psx->rotate(currItem->rotation());
-				x = currItem->asLine() ? 0 : (currItem->visualXPos() - currItem->xPos() - lineAdjust);
-				y = currItem->asLine() ? (h / -2.0) : (currItem->visualYPos() - currItem->yPos() - lineAdjust);
+			if (currItem->Parent != NULL)
+			{
+				QTransform t = currItem->getCombinedTransform();
+				psx->setTransform(t, true);
+				w = currItem->visualWidth();
+				h = currItem->visualHeight();
+			//	x = currItem->asLine() ? 0 : (currItem->visualXPos() - currItem->xPos() - lineAdjust);
+			//	y = currItem->asLine() ? (h / -2.0) : (currItem->visualYPos() - currItem->yPos() - lineAdjust);
+			//	w = currItem->width();
+			//	h = currItem->height();
+				x = -lineAdjust;
+				y = -lineAdjust;
+				psx->setPen(m_pen["selection-group-inside"]);
+				psx->setBrush(m_brush["selection-group-inside"]);
+				psx->drawRect(QRectF(x, y, w, h));
 			}
 			else
 			{
-				psx->translate(currItem->visualXPos(), currItem->visualYPos());
-				x = currItem->asLine() ? 0 : -lineAdjust;
-				y = currItem->asLine() ? 0 : -lineAdjust;
-			}
-			
-//			tt.start();
-			psx->drawRect(QRectF(x, y, w, h));
-//			tu << QString::number(tt.elapsed());
-			if(drawHandles && !currItem->locked())
-			{
-				psx->setBrush(m_brush["handle"]);
-				psx->setPen(m_pen["handle"]);
-				if(currItem->asLine())
+				if (currItem->rotation() != 0)
 				{
 					psx->setRenderHint(QPainter::Antialiasing);
-					psx->drawEllipse(QRectF(x+w-markWidth, y+h/2.0-markWidth, 2* markWidth,2* markWidth));
-// 					psx->setBrush(Qt::blue); // sometimes we forget which is what :)
-					psx->drawEllipse(QRectF(x-markWidth, y+h/2.0-markWidth, 2* markWidth, 2* markWidth));
+					psx->translate(currItem->xPos(), currItem->yPos());
+					psx->rotate(currItem->rotation());
+					x = currItem->asLine() ? 0 : (currItem->visualXPos() - currItem->xPos() - lineAdjust);
+					y = currItem->asLine() ? (h / -2.0) : (currItem->visualYPos() - currItem->yPos() - lineAdjust);
 				}
 				else
 				{
-					psx->drawRect(QRectF(x+w-markWidth, y+h-markWidth, markWidth, markWidth));
-					psx->drawRect(QRectF(x+w/2 - halfMarkWidth, y+h-markWidth, markWidth, markWidth));
-					psx->drawRect(QRectF(x+w/2 - halfMarkWidth, y, markWidth, markWidth));
-					psx->drawRect(QRectF(x+w-markWidth, y+h/2 - halfMarkWidth, markWidth, markWidth));
-					psx->drawRect(QRectF(x+w-markWidth, y, markWidth, markWidth));
-					psx->drawRect(QRectF(x, y, markWidth, markWidth));
-					psx->drawRect(QRectF(x, y+h/2 - halfMarkWidth, markWidth, markWidth));
-					psx->drawRect(QRectF(x, y+h-markWidth, markWidth, markWidth));
-				}
-			}
-			if (currItem->isWelded())
-			{
-				psx->setPen(QPen(Qt::yellow, 8.0 / m_canvas->scale(), Qt::SolidLine, Qt::RoundCap, Qt::MiterJoin));
-				for (int i = 0 ; i <  currItem->weldList.count(); i++)
+					psx->translate(currItem->visualXPos(), currItem->visualYPos());
+					x = currItem->asLine() ? 0 : -lineAdjust;
+					y = currItem->asLine() ? 0 : -lineAdjust;
+				}
+				w = currItem->visualWidth();
+				h = currItem->visualHeight();
+				psx->drawRect(QRectF(x, y, w, h));
+				if(drawHandles && !currItem->locked())
 				{
-					PageItem::weldingInfo wInf =  currItem->weldList.at(i);
-					psx->drawPoint(QPointF(wInf.weldPoint.x(), wInf.weldPoint.y()));
+					psx->setBrush(m_brush["handle"]);
+					psx->setPen(m_pen["handle"]);
+					if(currItem->asLine())
+					{
+						psx->setRenderHint(QPainter::Antialiasing);
+						psx->drawEllipse(QRectF(x+w-markWidth, y+h/2.0-markWidth, 2* markWidth,2* markWidth));
+	// 					psx->setBrush(Qt::blue); // sometimes we forget which is what :)
+						psx->drawEllipse(QRectF(x-markWidth, y+h/2.0-markWidth, 2* markWidth, 2* markWidth));
+					}
+					else
+					{
+						psx->drawRect(QRectF(x+w-markWidth, y+h-markWidth, markWidth, markWidth));
+						psx->drawRect(QRectF(x+w/2 - halfMarkWidth, y+h-markWidth, markWidth, markWidth));
+						psx->drawRect(QRectF(x+w/2 - halfMarkWidth, y, markWidth, markWidth));
+						psx->drawRect(QRectF(x+w-markWidth, y+h/2 - halfMarkWidth, markWidth, markWidth));
+						psx->drawRect(QRectF(x+w-markWidth, y, markWidth, markWidth));
+						psx->drawRect(QRectF(x, y, markWidth, markWidth));
+						psx->drawRect(QRectF(x, y+h/2 - halfMarkWidth, markWidth, markWidth));
+						psx->drawRect(QRectF(x, y+h-markWidth, markWidth, markWidth));
+					}
 				}
-				//draw marker for weld point
-			/*	psx->setBrush(m_brush["outline"]);
-				psx->setPen(m_pen["outline"]);
-				double weldX = x, weldY = y;
-				if (currItem->myWeldPoint == topCenter || currItem->myWeldPoint == centerCenter || currItem->myWeldPoint == bottomCenter)
-					weldX += w /2 - halfMarkWidth;
-				else if (currItem->myWeldPoint == topRight  || currItem->myWeldPoint == centerRight || currItem->myWeldPoint == bottomRight)
-					weldX += w - markWidth;
-
-				if (currItem->myWeldPoint == centerLeft  || currItem->myWeldPoint == centerCenter || currItem->myWeldPoint == centerRight)
-					weldY += h/2 - halfMarkWidth;
-				else if (currItem->myWeldPoint == bottomLeft  || currItem->myWeldPoint == bottomCenter || currItem->myWeldPoint == bottomRight)
-					weldY += h - markWidth;
-				psx->drawRect(QRectF(weldX, weldY, markWidth, markWidth));*/
+				if (currItem->isWelded())
+				{
+					psx->setPen(QPen(Qt::yellow, 8.0 / m_canvas->scale(), Qt::SolidLine, Qt::RoundCap, Qt::MiterJoin));
+					for (int i = 0 ; i <  currItem->weldList.count(); i++)
+					{
+						PageItem::weldingInfo wInf =  currItem->weldList.at(i);
+						psx->drawPoint(QPointF(wInf.weldPoint.x(), wInf.weldPoint.y()));
+					}
+				}
 			}
 			
 			psx->restore();
@@ -675,6 +675,9 @@
 		case modeEyeDropper:
 			qApp->changeOverrideCursor(QCursor(loadIcon("colorpickercursor.png"), 0, 32));
 			break;
+		case modeLinkFrames:
+			qApp->changeOverrideCursor(QCursor(loadIcon("LinkTextFrame.png"), 0, 32));
+			break;
 		case modeMeasurementTool:
 		case modeEditGradientVectors:
 		case modeEditMeshGradient:
@@ -944,7 +947,7 @@
 			if (m_doc->SubMode != -1)
 			{
 				m_view->Deselect(false);
-				m_doc->Items->removeAt(currItem->ItemNr);
+				m_doc->Items->removeOne(currItem);
 			}
 			else
 				m_view->Deselect(false);
@@ -1234,7 +1237,7 @@
 								currItem->moveImageXYOffsetBy(resizeBy / currItem->imageXScale(), 0);
 							}
 							currItem->Sizing = false;
-							m_doc->SizeItem(currItem->width()+resizeBy, currItem->height(), currItem->ItemNr);
+							m_doc->SizeItem(currItem->width()+resizeBy, currItem->height(), currItem);
 						}
 					}
 					currItem->update();
@@ -1296,7 +1299,7 @@
 								currItem->moveImageXYOffsetBy(resizeBy / currItem->imageXScale(), 0);
 							}
 							currItem->Sizing = false;
-							m_doc->SizeItem(currItem->width() + resizeBy, currItem->height(), currItem->ItemNr);
+							m_doc->SizeItem(currItem->width() + resizeBy, currItem->height(), currItem);
 						}
 					}
 					currItem->update();
@@ -1358,7 +1361,7 @@
 								currItem->moveImageXYOffsetBy(0, resizeBy / currItem->imageYScale());
 							}
 							currItem->Sizing = false;
-							m_doc->SizeItem(currItem->width(), currItem->height() + resizeBy, currItem->ItemNr);
+							m_doc->SizeItem(currItem->width(), currItem->height() + resizeBy, currItem);
 						}
 					}
 					currItem->update();
@@ -1420,7 +1423,7 @@
 								currItem->moveImageXYOffsetBy(0, resizeBy / currItem->imageYScale());
 							}
 							currItem->Sizing = false;
-							m_doc->SizeItem(currItem->width(), currItem->height() + resizeBy, currItem->ItemNr);
+							m_doc->SizeItem(currItem->width(), currItem->height() + resizeBy, currItem);
 						}
 					}
 					currItem->update();

Modified: branches/ScribusOIF/scribus/canvasmode_drawbezier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/canvasmode_drawbezier.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_drawbezier.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_drawbezier.cpp Sun Nov  6 22:52:15 2011
@@ -86,13 +86,13 @@
 	if (currItem->PoLine.size() < 4)
 	{
 //		emit DelObj(m_doc->currentPage->pageNr(), currItem->ItemNr);
-		m_doc->Items->removeAt(currItem->ItemNr);
+		m_doc->Items->removeOne(currItem);
 		m_doc->m_Selection->removeFirst();
 		//emit HaveSel(-1);
 	}
 	else
 	{
-		m_doc->SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem->ItemNr, false, false);
+		m_doc->SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem, false, false);
 //		currItem->setPolyClip(qRound(qMax(currItem->lineWidth() / 2.0, 1)));
 		m_doc->AdjustItemSize(currItem);
 		currItem->ContourLine = currItem->PoLine.copy();
@@ -338,7 +338,7 @@
 		currItem->PoLine.translate(0, -npf2.y());
 		m_doc->MoveItem(0, npf2.y(), currItem);
 	}
-	m_doc->SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem->ItemNr, false, false, false);
+	m_doc->SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem, false, false, false);
 	currItem->setPolyClip(qRound(qMax(currItem->lineWidth() / 2, 1.0)));
 	m_canvas->newRedrawPolygon();
 }
@@ -397,7 +397,7 @@
 		}
 		else
 		{
-			m_doc->SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem->ItemNr, false, false, false);
+			m_doc->SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem, false, false, false);
 			m_doc->AdjustItemSize(currItem);
 			currItem->Sizing = ssiz;
 			currItem->ContourLine = currItem->PoLine.copy();

Modified: branches/ScribusOIF/scribus/canvasmode_drawcalligraphic.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/canvasmode_drawcalligraphic.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_drawcalligraphic.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_drawcalligraphic.cpp Sun Nov  6 22:52:15 2011
@@ -272,7 +272,7 @@
 			currItem->setXYPos(tp2.x(), tp2.y(), true);
 			currItem->PoLine.translate(-tp2.x(), -tp2.y());
 			FPoint tp(getMaxClipF(&currItem->PoLine));
-			m_doc->SizeItem(tp.x(), tp.y(), currItem->ItemNr, false, false, false);
+			m_doc->SizeItem(tp.x(), tp.y(), currItem, false, false, false);
 			m_doc->AdjustItemSize(currItem);
 			m_doc->m_Selection->clear();
 			m_doc->m_Selection->addItem(currItem);
@@ -320,7 +320,7 @@
 	//Commit drag created items to undo manager.
 	if (m_doc->m_Selection->itemAt(0)!=NULL)
 	{
-		m_doc->itemAddCommit(m_doc->m_Selection->itemAt(0)->ItemNr);
+		m_doc->itemAddCommit(m_doc->m_Selection->itemAt(0));
 	}
 	//Make sure the Zoom spinbox and page selector dont have focus if we click on the canvas
 	m_view->zoomSpinBox->clearFocus();

Modified: branches/ScribusOIF/scribus/canvasmode_drawfreehand.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/canvasmode_drawfreehand.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_drawfreehand.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_drawfreehand.cpp Sun Nov  6 22:52:15 2011
@@ -266,7 +266,7 @@
 			currItem->setXYPos(tp2.x(), tp2.y(), true);
 			currItem->PoLine.translate(-tp2.x(), -tp2.y());
 			FPoint tp(getMaxClipF(&currItem->PoLine));
-			m_doc->SizeItem(tp.x(), tp.y(), currItem->ItemNr, false, false, false);
+			m_doc->SizeItem(tp.x(), tp.y(), currItem, false, false, false);
 			m_doc->AdjustItemSize(currItem);
 			m_doc->m_Selection->clear();
 			m_doc->m_Selection->addItem(currItem);
@@ -311,7 +311,7 @@
 	//Commit drag created items to undo manager.
 	if (m_doc->m_Selection->itemAt(0)!=NULL)
 	{
-		m_doc->itemAddCommit(m_doc->m_Selection->itemAt(0)->ItemNr);
+		m_doc->itemAddCommit(m_doc->m_Selection->itemAt(0));
 	}
 	//Make sure the Zoom spinbox and page selector dont have focus if we click on the canvas
 	m_view->zoomSpinBox->clearFocus();

Modified: branches/ScribusOIF/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/canvasmode_edit.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_edit.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_edit.cpp Sun Nov  6 22:52:15 2011
@@ -912,7 +912,7 @@
 	//Commit drag created items to undo manager.
 	if (m_doc->m_Selection->itemAt(0)!=NULL)
 	{
-		m_doc->itemAddCommit(m_doc->m_Selection->itemAt(0)->ItemNr);
+		m_doc->itemAddCommit(m_doc->m_Selection->itemAt(0));
 	}
 	//Make sure the Zoom spinbox and page selector dont have focus if we click on the canvas
 	m_view->zoomSpinBox->clearFocus();

Modified: branches/ScribusOIF/scribus/canvasmode_editmeshpatch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/canvasmode_editmeshpatch.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_editmeshpatch.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_editmeshpatch.cpp Sun Nov  6 22:52:15 2011
@@ -326,6 +326,14 @@
 		return;
 	m_keyRepeat = true;
 	e->accept();
+
+	if (e->key() == Qt::Key_Escape)
+	{
+		// Go back to normal mode.
+		m_view->requestMode(modeNormal);
+		return;
+	}
+
 	Qt::KeyboardModifiers buttonModifiers = e->modifiers();
 	if ((!m_view->zoomSpinBox->hasFocus()) && (!m_view->pageSelector->hasFocus()))
 	{

Modified: branches/ScribusOIF/scribus/canvasmode_editweldpoint.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/canvasmode_editweldpoint.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_editweldpoint.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_editweldpoint.cpp Sun Nov  6 22:52:15 2011
@@ -66,6 +66,7 @@
 {
 	Mxp = Myp = -1;
 	selectedPoint = -1;
+	editWeldMode = true;
 }
 
 inline bool CanvasMode_EditWeldPoint::GetItem(PageItem** pi)
@@ -143,6 +144,12 @@
 	{
 		m_view->update();
 	}
+	ModeDialog = new WeldEditDialog(m_ScMW);
+	ModeDialog->show();
+	connect(ModeDialog, SIGNAL(endEdit()), this, SLOT(endEditing()));
+	connect(ModeDialog, SIGNAL(paletteShown(bool)), this, SLOT(endEditing(bool)));
+	connect(ModeDialog, SIGNAL(modeMoveWeld()), this, SLOT(setWeldMode()));
+	connect(ModeDialog, SIGNAL(modeMoveObject()), this, SLOT(setObjectMode()));
 }
 
 void CanvasMode_EditWeldPoint::deactivate(bool forGesture)
@@ -150,8 +157,32 @@
 	m_view->redrawMarker->hide();
 	selectedPoint = -1;
 	weldToList.clear();
-}
-
+	disconnect(ModeDialog, SIGNAL(paletteShown(bool)), this, SLOT(endEditing(bool)));
+	ModeDialog->close();
+	delete ModeDialog;
+}
+
+void CanvasMode_EditWeldPoint::endEditing(bool active)
+{
+	if (!active)
+		endEditing();
+}
+
+void CanvasMode_EditWeldPoint::endEditing()
+{
+	m_view->requestMode(modeNormal);
+}
+
+void CanvasMode_EditWeldPoint::setWeldMode()
+{
+	editWeldMode = true;
+}
+
+void CanvasMode_EditWeldPoint::setObjectMode()
+{
+	editWeldMode = false;
+}
+
 void CanvasMode_EditWeldPoint::keyPressEvent(QKeyEvent *e)
 {
 	if (selectedPoint < 0)
@@ -161,6 +192,14 @@
 		return;
 	m_keyRepeat = true;
 	e->accept();
+
+	if (e->key() == Qt::Key_Escape)
+	{
+		// Go back to normal mode.
+		m_view->requestMode(modeNormal);
+		return;
+	}
+
 	Qt::KeyboardModifiers buttonModifiers = e->modifiers();
 	if ((!m_view->zoomSpinBox->hasFocus()) && (!m_view->pageSelector->hasFocus()))
 	{
@@ -245,8 +284,16 @@
 			}
 			if (isMoving)
 			{
-				currItem->weldList[selectedPoint].weldPoint += FPoint(moveX, moveY);
-				currItem->moveWelded(moveX, moveY, selectedPoint);
+				if (editWeldMode)
+				{
+					currItem->weldList[selectedPoint].weldPoint += FPoint(moveX, moveY);
+				}
+				else
+				{
+					currItem->setXYPos(currItem->xPos() + moveX, currItem->yPos() + moveY, true);
+					currItem->setRedrawBounding();
+					currItem->OwnPage = m_doc->OnPage(currItem);
+				}
 			}
 			if (doUpdate)
 			{
@@ -312,20 +359,26 @@
 	m_canvas->displayXYHUD(m->globalPos(), npf.x(), npf.y());
 	if (m_canvas->m_viewMode.m_MouseButtonPressed && m_view->moveTimerElapsed())
 	{
-		if (selectedPoint != -1)
-		{
-			m_canvas->displayXYHUD(m->globalPos(), npf.x(), npf.y());
-			FPoint mp, mp_orig;
-			mp_orig = currItem->weldList[selectedPoint].weldPoint;
-			mp = mp_orig - npx;
-			double xx = mp.x();
-			double yy = mp.y();
-			snapToEdgePoints(xx, yy);
-			currItem->weldList[selectedPoint].weldPoint = FPoint(xx, yy);
-			xx = mp_orig.x() - xx;
-			yy = mp_orig.y() - yy;
-			currItem->moveWelded(-npx.x(), -npx.y(), selectedPoint);
-		}
+		if (editWeldMode)
+		{
+			if (selectedPoint != -1)
+			{
+				m_canvas->displayXYHUD(m->globalPos(), npf.x(), npf.y());
+				FPoint mp, mp_orig;
+				mp_orig = currItem->weldList[selectedPoint].weldPoint;
+				mp = mp_orig - npx;
+				double xx = mp.x();
+				double yy = mp.y();
+				snapToEdgePoints(xx, yy);
+				currItem->weldList[selectedPoint].weldPoint = FPoint(xx, yy);
+			}
+		}
+		else
+		{
+			currItem->setXYPos(currItem->xPos() - npx.x(), currItem->yPos() - npx.y(), true);
+			currItem->setRedrawBounding();
+			currItem->OwnPage = m_doc->OnPage(currItem);
+		}
 		m_doc->regionsChanged()->update(getUpdateRect());
 	}
 	Mxp = npfN.x();

Modified: branches/ScribusOIF/scribus/canvasmode_editweldpoint.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/canvasmode_editweldpoint.h
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_editweldpoint.h (original)
+++ branches/ScribusOIF/scribus/canvasmode_editweldpoint.h Sun Nov  6 22:52:15 2011
@@ -28,6 +28,7 @@
 
 #include "canvasmode.h"
 #include "fpointarray.h"
+#include "ui/weldedit.h"
 
 class PageItem;
 class PageItem_TextFrame;
@@ -39,6 +40,7 @@
 
 class CanvasMode_EditWeldPoint :  public CanvasMode
 {
+	Q_OBJECT
 public:
 	explicit CanvasMode_EditWeldPoint(ScribusView* view);
 	virtual ~CanvasMode_EditWeldPoint() {}
@@ -69,6 +71,13 @@
 	bool m_keyRepeat;
 	PageItem *currItem;
 	QList<PageItem*> weldToList;
+	WeldEditDialog* ModeDialog;
+	bool editWeldMode;
+private slots:
+	void endEditing(bool active);
+	void endEditing();
+	void setWeldMode();
+	void setObjectMode();
 };
 
 #endif

Modified: branches/ScribusOIF/scribus/canvasmode_framelinks.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/canvasmode_framelinks.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_framelinks.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_framelinks.cpp Sun Nov  6 22:52:15 2011
@@ -192,13 +192,14 @@
 				if (currItem->nextInChain() == 0 && bb->prevInChain() == 0 && currItem != bblast)
 				{
 					currItem->link(bb);
+					int cid = m_doc->Items->indexOf(currItem);
+					int bid = m_doc->Items->indexOf(bb);
 					// CB We need to do this because we draw in the order of the item list
 					// Which is also item number list.. but #3488: we must also renumber the items
-					if (bb->ItemNr < currItem->ItemNr)
+					if (bid < cid)
 					{
-						m_doc->Items->insert(currItem->ItemNr+1, bb);
-						bb = m_doc->Items->takeAt(bb->ItemNr);
-						m_doc->renumberItemsInListOrder();
+						m_doc->Items->insert(cid+1, bb);
+						bb = m_doc->Items->takeAt(bid);
 					}
 					// m_view->updateContents();
 					// link calls PageItem::update	

Modified: branches/ScribusOIF/scribus/canvasmode_nodeedit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/canvasmode_nodeedit.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_nodeedit.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_nodeedit.cpp Sun Nov  6 22:52:15 2011
@@ -644,7 +644,7 @@
 	//Commit drag created items to undo manager.
 	if (m_doc->m_Selection->itemAt(0)!=NULL)
 	{
-		m_doc->itemAddCommit(m_doc->m_Selection->itemAt(0)->ItemNr);
+		m_doc->itemAddCommit(m_doc->m_Selection->itemAt(0));
 	}
 	//Make sure the Zoom spinbox and page selector dont have focus if we click on the canvas
 	m_view->zoomSpinBox->clearFocus();
@@ -882,7 +882,7 @@
 					{
 						cli.putPoints(0, EndInd-StartInd, Clip, StartInd);
 						int z = m_doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, currItem->xPos(), currItem->yPos(), currItem->width(), currItem->height(), currItem->lineWidth(), currItem->fillColor(), currItem->lineColor(), true);
-						PageItem* bb = m_doc->Items->at(z);
+						PageItem* bb = m_doc->Items->takeAt(z);
 						if (m_doc->nodeEdit.isContourLine)
 							bb->ContourLine.resize(0);
 						else
@@ -908,10 +908,9 @@
 								bb->PoLine.putPoints(0, Clip.size()-EndInd-4, Clip, EndInd+4);
 						}
 						bb->setRotation(currItem->rotation());
+						bb->ClipEdited = true;
+						m_doc->Items->insert(m_doc->Items->indexOf(currItem), bb);
 						m_doc->AdjustItemSize(bb);
-						bb->ClipEdited = true;
-						PageItem *bx = m_doc->Items->takeAt(bb->ItemNr);
-						m_doc->Items->insert(bb->ItemNr-1, bx);
 					}
 					currItem->PoLine = cli.copy();
 				}

Modified: branches/ScribusOIF/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/canvasmode_normal.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_normal.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_normal.cpp Sun Nov  6 22:52:15 2011
@@ -387,7 +387,7 @@
 				m_doc->DraggedElem = currItem;
 				m_doc->DragElements.clear();
 				for (int dre=0; dre<m_doc->m_Selection->count(); ++dre)
-					m_doc->DragElements.append(m_doc->m_Selection->itemAt(dre)->ItemNr);
+					m_doc->DragElements.append(m_doc->m_Selection->itemAt(dre));
 				ScriXmlDoc *ss = new ScriXmlDoc();
 				ScElemMimeData* md = new ScElemMimeData();
 				md->setScribusElem(ss->WriteElem(m_doc, m_doc->m_Selection));
@@ -1088,7 +1088,7 @@
 	//Commit drag created items to undo manager.
 	if (m_doc->m_Selection->itemAt(0)!=NULL)
 	{
-		m_doc->itemAddCommit(m_doc->m_Selection->itemAt(0)->ItemNr);
+		m_doc->itemAddCommit(m_doc->m_Selection->itemAt(0));
 	}
 	//Make sure the Zoom spinbox and page selector dont have focus if we click on the canvas
 	m_view->zoomSpinBox->clearFocus();

Modified: branches/ScribusOIF/scribus/gtfont.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/gtfont.cpp
==============================================================================
--- branches/ScribusOIF/scribus/gtfont.cpp (original)
+++ branches/ScribusOIF/scribus/gtfont.cpp Sun Nov  6 22:52:15 2011
@@ -77,7 +77,7 @@
 	slant       = "";
 	width       = "";
 	append      = "";
-	size        = 12;
+	size        = 120;
 	color       = "Black";
 	shade       = 100;
 	strokeColor = "Black";

Modified: branches/ScribusOIF/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/pageitem.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem.cpp Sun Nov  6 22:52:15 2011
@@ -141,7 +141,6 @@
 	textPathFlipped(other.textPathFlipped),
 	ClipEdited(other.ClipEdited),
 	FrameType(other.FrameType),
-	ItemNr(other.ItemNr),
 	Frame(other.Frame),
 	OwnPage(other.OwnPage),
 	oldOwnPage(other.oldOwnPage),
@@ -180,7 +179,7 @@
 	OldB2(other.OldB2),
 	OldH2(other.OldH2),
 	Sizing(other.Sizing),
-	toPixmap(other.toPixmap),
+//	toPixmap(other.toPixmap),
 	LayerID(other.LayerID),
 	ScaleType(other.ScaleType),
 	AspectRatio(other.AspectRatio),
@@ -354,7 +353,7 @@
 		tempImageFile = NULL;
 		isInlineImage = false;
 	}
-
+	Parent = NULL;
 	textLayout = new TextLayout(&itemText, this);
 	unWeld();
 }
@@ -382,6 +381,7 @@
 	m_SizeLocked(false),
 	textFlowModeVal(TextFlowDisabled)
 {
+	Parent = NULL;
 	m_Doc = pa;
 	QString tmp;
 	BackBox = 0;
@@ -595,7 +595,7 @@
 	inPdfArticle = false;
 	isRaster = false;
 	Sizing = false;
-	toPixmap = false;
+//	toPixmap = false;
 	UseEmbedded = true;
 	IRender = Intent_Relative_Colorimetric;
 	EmProfile = "";
@@ -2057,8 +2057,6 @@
 
 QImage PageItem::DrawObj_toImage(double maxSize)
 {
-	QList<PageItem*> emG;
-	emG.clear();
 	double minx =  std::numeric_limits<double>::max();
 	double miny =  std::numeric_limits<double>::max();
 	double maxx = -std::numeric_limits<double>::max();
@@ -2069,13 +2067,55 @@
 	miny = qMin(miny, y1);
 	maxx = qMax(maxx, x2);
 	maxy = qMax(maxy, y2);
-	gXpos = xPos() - minx;
-	gYpos = yPos() - miny;
-	gWidth = maxx - minx;
-	gHeight = maxy - miny;
-	double sc = maxSize / qMax(gWidth, gHeight);
-	emG.append(this);
-	return DrawObj_toImage(emG, sc);
+	double igXpos = xPos() - minx;
+	double igYpos = yPos() - miny;
+	double igWidth = maxx - minx;
+	double igHeight = maxy - miny;
+	double sc = maxSize / qMax(igWidth, igHeight);
+	bool savedFlag = m_Doc->guidesPrefs().framesShown;
+	m_Doc->guidesPrefs().framesShown = false;
+	QImage retImg = QImage(qRound(igWidth * sc), qRound(igHeight * sc), QImage::Format_ARGB32_Premultiplied);
+	retImg.fill( qRgba(0, 0, 0, 0) );
+	ScPainter *painter = new ScPainter(&retImg, retImg.width(), retImg.height(), 1, 0);
+	painter->setZoomFactor(sc);
+	painter->save();
+	painter->translate(igXpos, igYpos);
+	isEmbedded = true;
+	invalidateLayout();
+	DrawObj(painter, QRectF());
+	isEmbedded = false;
+	painter->restore();
+	if (isTableItem)
+	{
+		painter->save();
+		painter->translate(igXpos, igYpos);
+		painter->rotate(rotation());
+		isEmbedded = true;
+		invalidateLayout();
+		if ((lineColor() != CommonStrings::None) && (lineWidth() != 0.0))
+		{
+			QColor tmp;
+			SetQColor(&tmp, lineColor(), lineShade());
+			if ((TopLine) || (RightLine) || (BottomLine) || (LeftLine))
+			{
+				painter->setPen(tmp, lineWidth(), PLineArt, Qt::SquareCap, PLineJoin);
+				if (TopLine)
+					painter->drawLine(FPoint(0.0, 0.0), FPoint(width(), 0.0));
+				if (RightLine)
+					painter->drawLine(FPoint(width(), 0.0), FPoint(width(), height()));
+				if (BottomLine)
+					painter->drawLine(FPoint(width(), height()), FPoint(0.0, height()));
+				if (LeftLine)
+					painter->drawLine(FPoint(0.0, height()), FPoint(0.0, 0.0));
+			}
+		}
+		isEmbedded = false;
+		painter->restore();
+	}
+	painter->end();
+	delete painter;
+	m_Doc->guidesPrefs().framesShown = savedFlag;
+	return retImg;
 }
 
 QImage PageItem::DrawObj_toImage(QList<PageItem*> &emG, double scaling)
@@ -4055,11 +4095,10 @@
 	{
 		QRectF baseRect(getBoundingRect());
 		QList<PageItem*>* items = OnMasterPage.isEmpty() ? &m_Doc->DocItems : &m_Doc->MasterItems;
-		for(int idx = items->count()-1; idx >= 0 ; --idx)
-		{
-			if ((items->at(idx) == this) && (!allItems))
-				break;
-			if(idx != static_cast<int>(ItemNr)) // avoids itself
+		if (!allItems)
+		{
+			int ids = items->indexOf(this) - 1;
+			for(int idx = ids; idx >= 0 ; --idx)
 			{
 				if(items->at(idx)->asTextFrame()) // do not bother with no text frames
 				{
@@ -4067,6 +4106,23 @@
 					if(baseRect.intersects(uRect))
 					{
 						items->at(idx)->update();
+					}
+				}
+			}
+		}
+		else
+		{
+			for(int idx = items->count() - 1; idx >= 0 ; --idx)
+			{
+				if(items->at(idx) != this) // avoids itself
+				{
+					if(items->at(idx)->asTextFrame()) // do not bother with no text frames
+					{
+						QRectF uRect(items->at(idx)->getBoundingRect());
+						if(baseRect.intersects(uRect))
+						{
+							items->at(idx)->update();
+						}
 					}
 				}
 			}
@@ -4716,7 +4772,8 @@
 		textFlowModeVal = newMode;
 	
 	QList<PageItem*> pList;
-	for(int idx = ItemNr-1; idx >= 0 ; --idx)
+	int id = m_Doc->Items->indexOf(this) - 1;
+	for(int idx = id; idx >= 0 ; --idx)
 	{
 		pList << m_Doc->Items->at(idx);
 	}
@@ -5492,6 +5549,39 @@
 	return result;
 }
 
+QTransform PageItem::getCombinedTransform()
+{
+	QTransform result;
+	if (Parent != NULL)
+	{
+		QList<PageItem*> itList;
+		PageItem* ite = this;
+		while (ite->Parent != NULL)
+		{
+			itList.prepend(ite);
+			ite = ite->Parent;
+		}
+		result.translate(ite->xPos(), ite->yPos());
+		result.rotate(ite->rotation());
+		if (ite->isGroup())
+			result.scale(ite->width() / ite->groupWidth, ite->height() / ite->groupHeight);
+		for (int aa = 0; aa < itList.count(); aa++)
+		{
+			ite = itList.at(aa);
+			result.translate(ite->gXpos, ite->gYpos);
+			result.rotate(ite->rotation());
+			if (ite->isGroup())
+				result.scale(ite->width() / ite->groupWidth, ite->height() / ite->groupHeight);
+		}
+	}
+	else
+	{
+		result.translate(Xpos, Ypos);
+		result.rotate(Rot);
+	}
+	return result;
+}
+
 QRectF PageItem::getBoundingRect() const
 {
 	double x,y,x2,y2;
@@ -6500,7 +6590,9 @@
 	int y = qRound(floor(BoundingY - Oldm_lineWidth / 2.0 - 5) * viewScale);
 	int w = qRound(ceil(BoundingW + Oldm_lineWidth + 10) * viewScale);
 	int h = qRound(ceil(BoundingH + Oldm_lineWidth + 10) * viewScale);
-	QRect ret = QRect(x, y, w, h);
+	QRect ret = QRect(0, 0, w - x, h - y);
+	QTransform t = getCombinedTransform();
+	ret = t.mapRect(ret);
 	ret.translate(qRound(-m_Doc->minCanvasCoordinate.x() * viewScale), qRound(-m_Doc->minCanvasCoordinate.y() * viewScale));
 	return ret;
 }

Modified: branches/ScribusOIF/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/pageitem.h
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.h (original)
+++ branches/ScribusOIF/scribus/pageitem.h Sun Nov  6 22:52:15 2011
@@ -334,6 +334,7 @@
 	QTransform getGroupTransform() const;
 	void getTransform(QTransform& mat) const;
 	QTransform getTransform() const;
+	QTransform getCombinedTransform();
 	/**
 	 * @brief Check if a QPoint is within the items boundaries
 	 * No coordinates transformation is performed
@@ -470,8 +471,6 @@
 	bool ClipEdited;
 	// Don't know exactly what this is, but it's not the same as itemType
 	int FrameType;
-  /** Interne Item-Nummer */
-	uint ItemNr;
   /** Internal unique Item-Number, used for the undo system */
 	uint uniqueNr;
   /** Hat Element Rahmen? FIXME: still used? - in DrawObject_Post */
@@ -545,6 +544,7 @@
 	PageItem* nextInChain() { return NextBox; }
 	const PageItem* prevInChain() const { return BackBox; }
 	const PageItem* nextInChain() const { return NextBox; }
+	PageItem *Parent;
 
 	bool testLinkCandidate(PageItem* nextFrame);
 	void unlink();
@@ -565,7 +565,7 @@
 	double OldB2;
 	double OldH2;
 	bool Sizing;
-	bool toPixmap;
+//	bool toPixmap;
 	int  LayerID;
 	bool ScaleType;
 	bool AspectRatio;

Modified: branches/ScribusOIF/scribus/pageitem_osgframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/pageitem_osgframe.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem_osgframe.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem_osgframe.cpp Sun Nov  6 22:52:15 2011
@@ -104,7 +104,7 @@
 	if (PictureIsAvailable)
 	{
 		image.save(Pfile, "PNG");
-		m_Doc->LoadPict(Pfile, ItemNr, true);
+		m_Doc->loadPict(Pfile, this, true);
 	}
 	else
 	{
@@ -113,7 +113,7 @@
 		QString imgName = getLongPathName(tempImageFile->fileName());
 		tempImageFile->close();
 		image.save(imgName, "PNG");
-		m_Doc->LoadPict(imgName, ItemNr);
+		m_Doc->loadPict(imgName, this);
 	}
 	setImageScalingMode(false, true);
 }

Modified: branches/ScribusOIF/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/pageitem_textframe.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem_textframe.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem_textframe.cpp Sun Nov  6 22:52:15 2011
@@ -36,6 +36,7 @@
 #include "commonstrings.h"
 #include "hyphenator.h"
 #include "pageitem.h"
+#include "pageitem_group.h"
 #include "pageitem_textframe.h"
 #include "prefsmanager.h"
 #include "scpage.h"
@@ -134,17 +135,24 @@
 		ScPage* Dp=0;
 		PageItem* docItem=0;
 		int LayerLevItem;
+		QList<PageItem*> thisList;
 		if (!OnMasterPage.isEmpty())
 		{
 			if ((savedOwnPage == -1) || (savedOwnPage >= signed(m_Doc->Pages->count())))
 				return result;
 			Mp = m_Doc->MasterPages.at(m_Doc->MasterNames[OnMasterPage]);
 			Dp = m_Doc->Pages->at(savedOwnPage);
+			if (Parent != NULL)
+				thisList = this->asGroupFrame()->groupItemList;
+			else
+				thisList = m_Doc->MasterItems;
+			int thisid = thisList.indexOf(this);
 			for (int a = 0; a < m_Doc->MasterItems.count(); ++a)
 			{
 				docItem = m_Doc->MasterItems.at(a);
+				int did = m_Doc->MasterItems.indexOf(docItem);
 				LayerLevItem = m_Doc->layerLevelFromID(docItem->LayerID);
-				if (((docItem->ItemNr > ItemNr) && (docItem->LayerID == LayerID)) || (LayerLevItem > LayerLev && m_Doc->layerFlow(docItem->LayerID)))
+				if (((did > thisid) && (docItem->LayerID == LayerID)) || (LayerLevItem > LayerLev && m_Doc->layerFlow(docItem->LayerID)))
 				{
 					if (docItem->textFlowAroundObject())
 						result = result.subtracted(itemShape(docItem, Mp->xOffset() - Dp->xOffset(), Mp->yOffset() - Dp->yOffset()));
@@ -168,11 +176,17 @@
 		} // if (!OnMasterPage.isEmpty())
 		else
 		{
+			int thisid = 0;
+			if (Parent != NULL)
+				thisid = this->asGroupFrame()->groupItemList.indexOf(this);
+			else
+				thisid = m_Doc->Items->indexOf(this);
 			for (uint a = 0; a < docItemsCount; ++a)
 			{
 				docItem = m_Doc->Items->at(a);
+				int did = m_Doc->Items->indexOf(docItem);
 				LayerLevItem = m_Doc->layerLevelFromID(docItem->LayerID);
-				if (((docItem->ItemNr > ItemNr) && (docItem->LayerID == LayerID)) || (LayerLevItem > LayerLev && m_Doc->layerFlow(docItem->LayerID)))
+				if (((did > thisid) && (docItem->LayerID == LayerID)) || (LayerLevItem > LayerLev && m_Doc->layerFlow(docItem->LayerID)))
 				{
 					if (docItem->textFlowAroundObject())
 						result = result.subtracted(itemShape(docItem, 0, 0));

Modified: branches/ScribusOIF/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/pdflib_core.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pdflib_core.cpp (original)
+++ branches/ScribusOIF/scribus/pdflib_core.cpp Sun Nov  6 22:52:15 2011
@@ -943,97 +943,26 @@
 	size_t ar = sizeof(tmpf) / sizeof(*tmpf);
 	for (uint ax = 0; ax < ar; ++ax)
 		ind2PDFabr[ax] = tmpf[ax];
+	QList<PageItem*> allItems;
 	for (int c = 0; c < doc.FrameItems.count(); ++c)
 	{
 		pgit = doc.FrameItems.at(c);
-		if ((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText))
-		{
-			if (pgit->isAnnotation())
-			{
-				int annotType  = pgit->annotation().Type();
-				bool mustEmbed = ((annotType >= 2) && (annotType <= 6) && (annotType != 4));
-				if (pgit->annotation().Type() == 4)
-					StdFonts.insert("/ZapfDingbats", "");
-				if (pgit->itemText.length() > 0 || mustEmbed)
-				{
-					if (Options.Version < PDFOptions::PDFVersion_14)
-						StdFonts.insert(ind2PDFabr[pgit->annotation().Font()], "");
-					ReallyUsed.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), DocFonts[pgit->itemText.defaultStyle().charStyle().font().replacementName()]);
-				}
-			}
-			for (uint e = 0; e < static_cast<uint>(pgit->itemText.length()); ++e)
-			{
-				ReallyUsed.insert(pgit->itemText.charStyle(e).font().replacementName(), DocFonts[pgit->itemText.charStyle(e).font().replacementName()]);
-			}
-		}
-	}
-	for (int c = 0; c < doc.MasterItems.count(); ++c)
-	{
-		pgit = doc.MasterItems.at(c);
-		if ((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText))
-		{
-			if (pgit->isAnnotation())
-			{
-				int annotType  = pgit->annotation().Type();
-				bool mustEmbed = ((annotType >= 2) && (annotType <= 6) && (annotType != 4));
-				if (pgit->annotation().Type() == 4)
-					StdFonts.insert("/ZapfDingbats", "");
-				if (pgit->itemText.length() > 0 || mustEmbed)
-				{
-					if (Options.Version < PDFOptions::PDFVersion_14)
-						StdFonts.insert(ind2PDFabr[pgit->annotation().Font()], "");
-					ReallyUsed.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), DocFonts[pgit->itemText.defaultStyle().charStyle().font().replacementName()]);
-				}
-			}
-			for (uint e = 0; e < static_cast<uint>(pgit->itemText.length()); ++e)
-			{
-				ReallyUsed.insert(pgit->itemText.charStyle(e).font().replacementName(), DocFonts[pgit->itemText.charStyle(e).font().replacementName()]);
-			}
-		}
-	}
-	for (int d = 0; d < doc.Items->count(); ++d)
-	{
-		pgit = doc.Items->at(d);
-		if ((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText))
-		{
-			if (pgit->isAnnotation())
-			{
-				int annotType  = pgit->annotation().Type();
-				bool mustEmbed = ((annotType >= 2) && (annotType <= 6) && (annotType != 4));
-				if (pgit->annotation().Type() == 4)
-					StdFonts.insert("/ZapfDingbats", "");
-				if (pgit->itemText.length() > 0 || mustEmbed)
-				{
-					if (Options.Version < PDFOptions::PDFVersion_14)
-						StdFonts.insert(ind2PDFabr[pgit->annotation().Font()], "");
-					ReallyUsed.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), DocFonts[pgit->itemText.defaultStyle().charStyle().font().replacementName()]);
-				}
-			}
-			// TODO - search fonts based on items textPosition, will be faster
-			for (uint e = 0; e < static_cast<uint>(pgit->itemText.length()); ++e)
-			{
-				ReallyUsed.insert(pgit->itemText.charStyle(e).font().replacementName(), DocFonts[pgit->itemText.charStyle(e).font().replacementName()]);
-			}
-		}
-	}
-/*	if (Options.docInfoMarks)
-	{
-		StdFonts.insert("/Helvetica", "");
-	} */
-	QStringList patterns = doc.getPatternDependencyList(doc.getUsedPatterns());
-	for (int c = 0; c < patterns.count(); ++c)
-	{
-		ScPattern pa = doc.docPatterns[patterns[c]];
-		for (int o = 0; o < pa.items.count(); o++)
-		{
-			pgit = pa.items.at(o);
+		if (pgit->isGroup())
+			allItems = pgit->asGroupFrame()->getItemList();
+		else
+			allItems.append(pgit);
+		for (int ii = 0; ii < allItems.count(); ii++)
+		{
+			pgit = allItems.at(ii);
 			if ((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText))
 			{
 				if (pgit->isAnnotation())
 				{
+					int annotType  = pgit->annotation().Type();
+					bool mustEmbed = ((annotType >= 2) && (annotType <= 6) && (annotType != 4));
 					if (pgit->annotation().Type() == 4)
 						StdFonts.insert("/ZapfDingbats", "");
-					if (pgit->itemText.length() > 0)
+					if (pgit->itemText.length() > 0 || mustEmbed)
 					{
 						if (Options.Version < PDFOptions::PDFVersion_14)
 							StdFonts.insert(ind2PDFabr[pgit->annotation().Font()], "");
@@ -1043,6 +972,109 @@
 				for (uint e = 0; e < static_cast<uint>(pgit->itemText.length()); ++e)
 				{
 					ReallyUsed.insert(pgit->itemText.charStyle(e).font().replacementName(), DocFonts[pgit->itemText.charStyle(e).font().replacementName()]);
+				}
+			}
+		}
+	}
+	for (int c = 0; c < doc.MasterItems.count(); ++c)
+	{
+		pgit = doc.MasterItems.at(c);
+		if (pgit->isGroup())
+			allItems = pgit->asGroupFrame()->getItemList();
+		else
+			allItems.append(pgit);
+		for (int ii = 0; ii < allItems.count(); ii++)
+		{
+			pgit = allItems.at(ii);
+			if ((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText))
+			{
+				if (pgit->isAnnotation())
+				{
+					int annotType  = pgit->annotation().Type();
+					bool mustEmbed = ((annotType >= 2) && (annotType <= 6) && (annotType != 4));
+					if (pgit->annotation().Type() == 4)
+						StdFonts.insert("/ZapfDingbats", "");
+					if (pgit->itemText.length() > 0 || mustEmbed)
+					{
+						if (Options.Version < PDFOptions::PDFVersion_14)
+							StdFonts.insert(ind2PDFabr[pgit->annotation().Font()], "");
+						ReallyUsed.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), DocFonts[pgit->itemText.defaultStyle().charStyle().font().replacementName()]);
+					}
+				}
+				for (uint e = 0; e < static_cast<uint>(pgit->itemText.length()); ++e)
+				{
+					ReallyUsed.insert(pgit->itemText.charStyle(e).font().replacementName(), DocFonts[pgit->itemText.charStyle(e).font().replacementName()]);
+				}
+			}
+		}
+	}
+	for (int d = 0; d < doc.Items->count(); ++d)
+	{
+		pgit = doc.Items->at(d);
+		if (pgit->isGroup())
+			allItems = pgit->asGroupFrame()->getItemList();
+		else
+			allItems.append(pgit);
+		for (int ii = 0; ii < allItems.count(); ii++)
+		{
+			pgit = allItems.at(ii);
+			if ((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText))
+			{
+				if (pgit->isAnnotation())
+				{
+					int annotType  = pgit->annotation().Type();
+					bool mustEmbed = ((annotType >= 2) && (annotType <= 6) && (annotType != 4));
+					if (pgit->annotation().Type() == 4)
+						StdFonts.insert("/ZapfDingbats", "");
+					if (pgit->itemText.length() > 0 || mustEmbed)
+					{
+						if (Options.Version < PDFOptions::PDFVersion_14)
+							StdFonts.insert(ind2PDFabr[pgit->annotation().Font()], "");
+						ReallyUsed.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), DocFonts[pgit->itemText.defaultStyle().charStyle().font().replacementName()]);
+					}
+				}
+				for (uint e = 0; e < static_cast<uint>(pgit->itemText.length()); ++e)
+				{
+					ReallyUsed.insert(pgit->itemText.charStyle(e).font().replacementName(), DocFonts[pgit->itemText.charStyle(e).font().replacementName()]);
+				}
+			}
+		}
+	}
+/*	if (Options.docInfoMarks)
+	{
+		StdFonts.insert("/Helvetica", "");
+	} */
+	QStringList patterns = doc.getPatternDependencyList(doc.getUsedPatterns());
+	for (int c = 0; c < patterns.count(); ++c)
+	{
+		ScPattern pa = doc.docPatterns[patterns[c]];
+		for (int o = 0; o < pa.items.count(); o++)
+		{
+			pgit = pa.items.at(o);
+			if (pgit->isGroup())
+				allItems = pgit->asGroupFrame()->getItemList();
+			else
+				allItems.append(pgit);
+			for (int ii = 0; ii < allItems.count(); ii++)
+			{
+				pgit = allItems.at(ii);
+				if ((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText))
+				{
+					if (pgit->isAnnotation())
+					{
+						if (pgit->annotation().Type() == 4)
+							StdFonts.insert("/ZapfDingbats", "");
+						if (pgit->itemText.length() > 0)
+						{
+							if (Options.Version < PDFOptions::PDFVersion_14)
+								StdFonts.insert(ind2PDFabr[pgit->annotation().Font()], "");
+							ReallyUsed.insert(pgit->itemText.defaultStyle().charStyle().font().replacementName(), DocFonts[pgit->itemText.defaultStyle().charStyle().font().replacementName()]);
+						}
+					}
+					for (uint e = 0; e < static_cast<uint>(pgit->itemText.length()); ++e)
+					{
+						ReallyUsed.insert(pgit->itemText.charStyle(e).font().replacementName(), DocFonts[pgit->itemText.charStyle(e).font().replacementName()]);
+					}
 				}
 			}
 		}
@@ -2612,7 +2644,7 @@
 					PutDoc("\n/Filter /FlateDecode");
 				PutDoc(" >>\nstream\n"+EncStream(Content, templateObject)+"\nendstream\nendobj\n");
 				int pIndex   = doc.MasterPages.indexOf((ScPage* const) pag) + 1;
-				QString name = QString("master_page_obj_%1_%2").arg(pIndex).arg(ite->ItemNr);
+				QString name = QString("master_page_obj_%1_%2").arg(pIndex).arg(qHash(ite));
 				Seite.XObjects[name] = templateObject;
 			}
 			if (((Options.Version == PDFOptions::PDFVersion_15) || (Options.Version == PDFOptions::PDFVersion_X4)) && (Options.useLayers))
@@ -3160,7 +3192,7 @@
 				continue;
 			if ((!pag->pageName().isEmpty()) && (ite->OwnPage != static_cast<int>(pag->pageNr())) && (ite->OwnPage != -1))
 				continue;
-			QString name = QString("/master_page_obj_%1_%2").arg(mPageIndex).arg(ite->ItemNr);
+			QString name = QString("/master_page_obj_%1_%2").arg(mPageIndex).arg(qHash(ite));
 			if (! ite->asTextFrame())
 				PutPage(name+" Do\n");
 			else
@@ -3426,6 +3458,23 @@
 		QMap<QString,int>::Iterator it3t;
 		for (it3t = Transpar.begin(); it3t != Transpar.end(); ++it3t)
 			PutDoc("/"+it3t.key()+" "+QString::number(it3t.value())+" 0 R\n");
+		PutDoc(">>\n");
+	}
+	if ((ICCProfiles.count() != 0) || (spotMap.count() != 0))
+	{
+		PutDoc("/ColorSpace << \n");
+		QMap<QString,ICCD>::Iterator it3c;
+		if (ICCProfiles.count() != 0)
+		{
+			for (it3c = ICCProfiles.begin(); it3c != ICCProfiles.end(); ++it3c)
+				PutDoc("/"+it3c.value().ResName+" "+QString::number(it3c.value().ResNum)+" 0 R\n");
+		}
+		QMap<QString,SpotC>::Iterator it3sc;
+		if (spotMap.count() != 0)
+		{
+			for (it3sc = spotMap.begin(); it3sc != spotMap.end(); ++it3sc)
+				PutDoc("/"+it3sc.value().ResName+" "+QString::number(it3sc.value().ResNum)+" 0 R\n");
+		}
 		PutDoc(">>\n");
 	}
 	PutDoc(">>\n");

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/fileloader/scribus12format/scribus12format.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/fileloader/scribus12format/scribus12format.cpp Sun Nov  6 22:52:15 2011
@@ -189,6 +189,7 @@
 	double h = Buffer->Height;
 	double pw = Buffer->Pwidth;
 	int z = 0;
+	PageItem *currItem = NULL;
 	switch (Buffer->PType)
 	{
 	// OBSOLETE CR 2005-02-06
@@ -199,21 +200,22 @@
 	case PageItem::ImageFrame:
 		z = m_Doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, x, y, w, h, 1, m_Doc->prefsData().itemToolPrefs.imageFillColor, CommonStrings::None, true);
 //		undoManager->setUndoEnabled(false);
-		m_Doc->Items->at(z)->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
-		m_Doc->Items->at(z)->setImageXYOffset(Buffer->LocalX, Buffer->LocalY);
-		m_Doc->Items->at(z)->setImageRotation(Buffer->LocalRot);
-		m_Doc->Items->at(z)->Pfile = Buffer->Pfile;
-		m_Doc->Items->at(z)->IProfile = Buffer->IProfile;
-		m_Doc->Items->at(z)->EmProfile = Buffer->EmProfile;
-		m_Doc->Items->at(z)->IRender = Buffer->IRender;
-		m_Doc->Items->at(z)->UseEmbedded = Buffer->UseEmbedded;
-		if (!m_Doc->Items->at(z)->Pfile.isEmpty())
-			m_Doc->LoadPict(m_Doc->Items->at(z)->Pfile, z);
-		m_Doc->Items->at(z)->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
-		m_Doc->Items->at(z)->setImageShown(Buffer->PicArt);
-		m_Doc->Items->at(z)->ScaleType = Buffer->ScaleType;
-		m_Doc->Items->at(z)->AspectRatio = Buffer->AspectRatio;
-		m_Doc->Items->at(z)->setLineWidth(Buffer->Pwidth);
+		currItem = m_Doc->Items->at(z);
+		currItem->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
+		currItem->setImageXYOffset(Buffer->LocalX, Buffer->LocalY);
+		currItem->setImageRotation(Buffer->LocalRot);
+		currItem->Pfile = Buffer->Pfile;
+		currItem->IProfile = Buffer->IProfile;
+		currItem->EmProfile = Buffer->EmProfile;
+		currItem->IRender = Buffer->IRender;
+		currItem->UseEmbedded = Buffer->UseEmbedded;
+		if (!currItem->Pfile.isEmpty())
+			m_Doc->loadPict(currItem->Pfile, currItem);
+		currItem->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
+		currItem->setImageShown(Buffer->PicArt);
+		currItem->ScaleType = Buffer->ScaleType;
+		currItem->AspectRatio = Buffer->AspectRatio;
+		currItem->setLineWidth(Buffer->Pwidth);
 //		undoManager->setUndoEnabled(true);
 		break;
 	// OBSOLETE CR 2005-02-06
@@ -229,21 +231,22 @@
 		else
 			z = m_Doc->itemAdd(PageItem::TextFrame, PageItem::Unspecified, x, y, w, h, pw, CommonStrings::None, Buffer->Pcolor, true);
 //		undoManager->setUndoEnabled(false);
+		currItem = m_Doc->Items->at(z);
 		if ((Buffer->m_isAnnotation) && (Buffer->m_annotation.UseIcons()))
 		{
-			m_Doc->Items->at(z)->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
-			m_Doc->Items->at(z)->setImageXYOffset(Buffer->LocalX, Buffer->LocalY);
-			m_Doc->Items->at(z)->setImageRotation(Buffer->LocalRot);
-			m_Doc->Items->at(z)->Pfile = Buffer->Pfile;
-			m_Doc->Items->at(z)->Pfile2 = Buffer->Pfile2;
-			m_Doc->Items->at(z)->Pfile3 = Buffer->Pfile3;
-			m_Doc->Items->at(z)->IProfile = Buffer->IProfile;
-			m_Doc->Items->at(z)->EmProfile = Buffer->EmProfile;
-			m_Doc->Items->at(z)->IRender = Buffer->IRender;
-			m_Doc->Items->at(z)->UseEmbedded = Buffer->UseEmbedded;
-			m_Doc->LoadPict(m_Doc->Items->at(z)->Pfile, z);
-			m_Doc->Items->at(z)->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
-			m_Doc->Items->at(z)->setImageShown(Buffer->PicArt);
+			currItem->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
+			currItem->setImageXYOffset(Buffer->LocalX, Buffer->LocalY);
+			currItem->setImageRotation(Buffer->LocalRot);
+			currItem->Pfile = Buffer->Pfile;
+			currItem->Pfile2 = Buffer->Pfile2;
+			currItem->Pfile3 = Buffer->Pfile3;
+			currItem->IProfile = Buffer->IProfile;
+			currItem->EmProfile = Buffer->EmProfile;
+			currItem->IRender = Buffer->IRender;
+			currItem->UseEmbedded = Buffer->UseEmbedded;
+			m_Doc->loadPict(currItem->Pfile, currItem);
+			currItem->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
+			currItem->setImageShown(Buffer->PicArt);
 		}
 		if (!Buffer->itemText.isEmpty())
 		{
@@ -308,15 +311,15 @@
 				nstyle.setStrikethruOffset(it == wt.end() ? -1 : (*it).toInt());
 				it++;
 				nstyle.setStrikethruWidth(it == wt.end() ? -1 : (*it).toInt());
-				uint pos = m_Doc->Items->at(z)->itemText.length();
-				m_Doc->Items->at(z)->itemText.insertChars(pos, ch);
+				uint pos = currItem->itemText.length();
+				currItem->itemText.insertChars(pos, ch);
 				if (ch == SpecialChars::PARSEP && cab > 0) {
 					ParagraphStyle pstyle;
 					pstyle.setParent(m_Doc->paragraphStyles()[cab].name());
-					m_Doc->Items->at(z)->itemText.applyStyle(pos, pstyle);
+					currItem->itemText.applyStyle(pos, pstyle);
 				}
 				else {
-					m_Doc->Items->at(z)->itemText.applyCharStyle(pos, 1, nstyle);
+					currItem->itemText.applyCharStyle(pos, 1, nstyle);
 				}
 			}
 		}
@@ -345,7 +348,7 @@
 			pstyle.charStyle().setUnderlineWidth(Buffer->TxtUnderWidth);
 			pstyle.charStyle().setStrikethruOffset(Buffer->TxtStrikePos);
 			pstyle.charStyle().setStrikethruWidth(Buffer->TxtStrikeWidth);
-			m_Doc->Items->at(z)->itemText.setDefaultStyle(pstyle);
+			currItem->itemText.setDefaultStyle(pstyle);
 		}
 //		undoManager->setUndoEnabled(true);
 #endif
@@ -378,22 +381,23 @@
 		{
 		z = m_Doc->itemAdd(PageItem::LatexFrame, PageItem::Unspecified, x, y, w, h, 1, m_Doc->prefsData().itemToolPrefs.imageFillColor, CommonStrings::None, true);
 //		undoManager->setUndoEnabled(false);
-		m_Doc->Items->at(z)->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
-		m_Doc->Items->at(z)->setImageXYOffset(Buffer->LocalX, Buffer->LocalY);
-		m_Doc->Items->at(z)->setImageRotation(Buffer->LocalRot);
-		m_Doc->Items->at(z)->Pfile = Buffer->Pfile;
-		m_Doc->Items->at(z)->IProfile = Buffer->IProfile;
-		m_Doc->Items->at(z)->EmProfile = Buffer->EmProfile;
-		m_Doc->Items->at(z)->IRender = Buffer->IRender;
-		m_Doc->Items->at(z)->UseEmbedded = Buffer->UseEmbedded;
-		if (!m_Doc->Items->at(z)->Pfile.isEmpty())
-			m_Doc->LoadPict(m_Doc->Items->at(z)->Pfile, z);
-		m_Doc->Items->at(z)->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
-		m_Doc->Items->at(z)->setImageShown(Buffer->PicArt);
-		m_Doc->Items->at(z)->ScaleType = Buffer->ScaleType;
-		m_Doc->Items->at(z)->AspectRatio = Buffer->AspectRatio;
-		m_Doc->Items->at(z)->setLineWidth(Buffer->Pwidth);
-		PageItem_LatexFrame *latexframe = m_Doc->Items->at(z)->asLatexFrame();
+		currItem = m_Doc->Items->at(z);
+		currItem->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
+		currItem->setImageXYOffset(Buffer->LocalX, Buffer->LocalY);
+		currItem->setImageRotation(Buffer->LocalRot);
+		currItem->Pfile = Buffer->Pfile;
+		currItem->IProfile = Buffer->IProfile;
+		currItem->EmProfile = Buffer->EmProfile;
+		currItem->IRender = Buffer->IRender;
+		currItem->UseEmbedded = Buffer->UseEmbedded;
+		if (!currItem->Pfile.isEmpty())
+			m_Doc->loadPict(currItem->Pfile, currItem);
+		currItem->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
+		currItem->setImageShown(Buffer->PicArt);
+		currItem->ScaleType = Buffer->ScaleType;
+		currItem->AspectRatio = Buffer->AspectRatio;
+		currItem->setLineWidth(Buffer->Pwidth);
+		PageItem_LatexFrame *latexframe = currItem->asLatexFrame();
 		latexframe->setFormula(Buffer->itemText); //itemText seems to be a good choice...
 //		undoManager->setUndoEnabled(true);
 		break;
@@ -402,26 +406,27 @@
 #ifdef HAVE_OSG
 		z = m_Doc->itemAdd(PageItem::OSGFrame, PageItem::Unspecified, x, y, w, h, 1, m_Doc->prefsData().itemToolPrefs.imageFillColor, CommonStrings::None, true);
 //		undoManager->setUndoEnabled(false);
-		m_Doc->Items->at(z)->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
-		m_Doc->Items->at(z)->setImageXYOffset(Buffer->LocalX, Buffer->LocalY);
-		m_Doc->Items->at(z)->setImageRotation(Buffer->LocalRot);
-		m_Doc->Items->at(z)->Pfile = Buffer->Pfile;
-		m_Doc->Items->at(z)->IProfile = Buffer->IProfile;
-		m_Doc->Items->at(z)->EmProfile = Buffer->EmProfile;
-		m_Doc->Items->at(z)->IRender = Buffer->IRender;
-		m_Doc->Items->at(z)->UseEmbedded = Buffer->UseEmbedded;
-		if (!m_Doc->Items->at(z)->Pfile.isEmpty())
-			m_Doc->LoadPict(m_Doc->Items->at(z)->Pfile, z);
-		m_Doc->Items->at(z)->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
-		m_Doc->Items->at(z)->setImageShown(Buffer->PicArt);
-		m_Doc->Items->at(z)->ScaleType = Buffer->ScaleType;
-		m_Doc->Items->at(z)->AspectRatio = Buffer->AspectRatio;
-		m_Doc->Items->at(z)->setLineWidth(Buffer->Pwidth);
+		currItem = m_Doc->Items->at(z);
+		currItem->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
+		currItem->setImageXYOffset(Buffer->LocalX, Buffer->LocalY);
+		currItem->setImageRotation(Buffer->LocalRot);
+		currItem->Pfile = Buffer->Pfile;
+		currItem->IProfile = Buffer->IProfile;
+		currItem->EmProfile = Buffer->EmProfile;
+		currItem->IRender = Buffer->IRender;
+		currItem->UseEmbedded = Buffer->UseEmbedded;
+		if (!currItem->Pfile.isEmpty())
+			m_Doc->loadPict(currItem->Pfile, currItem);
+		currItem->setImageXYScale(Buffer->LocalScX, Buffer->LocalScY);
+		currItem->setImageShown(Buffer->PicArt);
+		currItem->ScaleType = Buffer->ScaleType;
+		currItem->AspectRatio = Buffer->AspectRatio;
+		currItem->setLineWidth(Buffer->Pwidth);
 //		undoManager->setUndoEnabled(true);
 #endif
 		break;
 	}
-	PageItem *currItem = m_Doc->Items->at(z);
+	currItem = m_Doc->Items->at(z);
 //	undoManager->setUndoEnabled(false);
 /*FIXME
 	currItem->setLineSpacingMode(Buffer->LineSpMode);
@@ -1075,7 +1080,7 @@
 					if (Neu->isTableItem)
 					{
 						TableItems.append(Neu);
-						TableID.insert(obj.attribute("OwnLINK", "0").toInt(), Neu->ItemNr);
+						TableID.insert(obj.attribute("OwnLINK", "0").toInt(), last);
 					}
 					counter++;
 					OBJ=OBJ.nextSibling();
@@ -1970,7 +1975,7 @@
 					if (Neu->isTableItem)
 					{
 						TableItems.append(Neu);
-						TableID.insert(obj.attribute("OwnLINK", "0").toInt(), Neu->ItemNr);
+						TableID.insert(obj.attribute("OwnLINK", "0").toInt(), counter);
 					}
 					counter++;
 					OBJ=OBJ.nextSibling();

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Sun Nov  6 22:52:15 2011
@@ -189,9 +189,9 @@
 
 	bool newVersion = false;
 
-	QMap<int,int> TableID;
-	QMap<int,int> TableIDM;
-	QMap<int,int> TableIDF;
+	QMap<int,PageItem*> TableID;
+	QMap<int,PageItem*> TableIDM;
+	QMap<int,PageItem*> TableIDF;
 	QList<PageItem*> TableItems;
 	QList<PageItem*> TableItemsM;
 	QList<PageItem*> TableItemsF;
@@ -231,8 +231,6 @@
 	itemRemapM.clear();
 	itemNextM.clear();
 	itemCountM = 0;
-	itemRemapF.clear();
-	itemNextF.clear();
 
 	TableItems.clear();
 	TableID.clear();
@@ -415,12 +413,12 @@
 			if (tagName == "PAGEOBJECT")
 			{
 				if (itemInfo.nextItem != -1)
-					itemNext[itemInfo.item->ItemNr] = itemInfo.nextItem;
+					itemNext[m_Doc->DocItems.count()] = itemInfo.nextItem;
 			}
 			else if (tagName == "MASTEROBJECT")
 			{
 				if (itemInfo.nextItem != -1)
-					itemNextM[itemInfo.item->ItemNr] = itemInfo.nextItem;
+					itemNextM[m_Doc->MasterItems.count()] = itemInfo.nextItem;
 			}
 			/* not sure if we want that...
 			else if (tagName == "FRAMEOBJECT")
@@ -434,23 +432,23 @@
 				if (tagName == "PAGEOBJECT")
 				{
 					TableItems.append(itemInfo.item);
-					TableID.insert(itemInfo.ownLink, itemInfo.item->ItemNr);
+					TableID.insert(itemInfo.ownLink, itemInfo.item);
 				}
 				else if (tagName == "FRAMEOBJECT")
 				{
 					TableItemsF.append(itemInfo.item);
-					TableIDF.insert(itemInfo.ownLink, itemInfo.item->ItemNr);
+					TableIDF.insert(itemInfo.ownLink, itemInfo.item);
 				}
 				else
 				{
 					TableItemsM.append(itemInfo.item);
-					TableIDM.insert(itemInfo.ownLink, itemInfo.item->ItemNr);
+					TableIDM.insert(itemInfo.ownLink, itemInfo.item);
 				}
 			}
 			if (groupStack.count() > 0)
 			{
 				groupStack.top().append(itemInfo.item);
-				while (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
+				while (static_cast<int>(itemInfo.ownNr) == groupStack2.top())
 				{
 					if (tagName == "PAGEOBJECT")
 						groupStackP.push(groupStack.pop());
@@ -468,7 +466,7 @@
 				QList<PageItem*> GroupItems;
 				GroupItems.append(itemInfo.item);
 				groupStack.push(GroupItems);
-				groupStack2.push(itemInfo.groupLastItem + itemInfo.item->ItemNr);
+				groupStack2.push(itemInfo.groupLastItem + itemInfo.ownNr);
 			}
 		}
 		if (tagName == "Pattern")
@@ -502,19 +500,19 @@
 		{
 			PageItem* ta = TableItemsF.at(ttc);
 			if (ta->TopLinkID != -1)
-				ta->TopLink = m_Doc->FrameItems.at(TableIDF[ta->TopLinkID]);
+				ta->TopLink = TableIDF[ta->TopLinkID];
 			else
 				ta->TopLink = 0;
 			if (ta->LeftLinkID != -1)
-				ta->LeftLink = m_Doc->FrameItems.at(TableIDF[ta->LeftLinkID]);
+				ta->LeftLink = TableIDF[ta->LeftLinkID];
 			else
 				ta->LeftLink = 0;
 			if (ta->RightLinkID != -1)
-				ta->RightLink = m_Doc->FrameItems.at(TableIDF[ta->RightLinkID]);
+				ta->RightLink = TableIDF[ta->RightLinkID];
 			else
 				ta->RightLink = 0;
 			if (ta->BottomLinkID != -1)
-				ta->BottomLink = m_Doc->FrameItems.at(TableIDF[ta->BottomLinkID]);
+				ta->BottomLink = TableIDF[ta->BottomLinkID];
 			else
 				ta->BottomLink = 0;
 		}
@@ -525,19 +523,19 @@
 		{
 			PageItem* ta = TableItemsM.at(ttc);
 			if (ta->TopLinkID != -1)
-				ta->TopLink = m_Doc->MasterItems.at(TableIDM[ta->TopLinkID]);
+				ta->TopLink = TableIDM[ta->TopLinkID];
 			else
 				ta->TopLink = 0;
 			if (ta->LeftLinkID != -1)
-				ta->LeftLink = m_Doc->MasterItems.at(TableIDM[ta->LeftLinkID]);
+				ta->LeftLink = TableIDM[ta->LeftLinkID];
 			else
 				ta->LeftLink = 0;
 			if (ta->RightLinkID != -1)
-				ta->RightLink = m_Doc->MasterItems.at(TableIDM[ta->RightLinkID]);
+				ta->RightLink = TableIDM[ta->RightLinkID];
 			else
 				ta->RightLink = 0;
 			if (ta->BottomLinkID != -1)
-				ta->BottomLink = m_Doc->MasterItems.at(TableIDM[ta->BottomLinkID]);
+				ta->BottomLink = TableIDM[ta->BottomLinkID];
 			else
 				ta->BottomLink = 0;
 		}
@@ -548,19 +546,19 @@
 		{
 			PageItem* ta = TableItems.at(ttc);
 			if (ta->TopLinkID != -1)
-				ta->TopLink = m_Doc->Items->at(TableID[ta->TopLinkID]);
+				ta->TopLink = TableID[ta->TopLinkID];
 			else
 				ta->TopLink = 0;
 			if (ta->LeftLinkID != -1)
-				ta->LeftLink = m_Doc->Items->at(TableID[ta->LeftLinkID]);
+				ta->LeftLink = TableID[ta->LeftLinkID];
 			else
 				ta->LeftLink = 0;
 			if (ta->RightLinkID != -1)
-				ta->RightLink = m_Doc->Items->at(TableID[ta->RightLinkID]);
+				ta->RightLink = TableID[ta->RightLinkID];
 			else
 				ta->RightLink = 0;
 			if (ta->BottomLinkID != -1)
-				ta->BottomLink = m_Doc->Items->at(TableID[ta->BottomLinkID]);
+				ta->BottomLink = TableID[ta->BottomLinkID];
 			else
 				ta->BottomLink = 0;
 		}
@@ -636,6 +634,7 @@
 				PageItem* cItem = gpL.at(id);
 				cItem->gXpos = cItem->xPos() - gItem->xPos();
 				cItem->gYpos = cItem->yPos() - gItem->yPos();
+				cItem->Parent = gItem;
 				if (gItem->rotation() != 0)
 				{
 					QTransform ma;
@@ -661,6 +660,7 @@
 				PageItem* cItem = gpL.at(id);
 				cItem->gXpos = cItem->xPos() - gItem->xPos();
 				cItem->gYpos = cItem->yPos() - gItem->yPos();
+				cItem->Parent = gItem;
 				if (gItem->rotation() != 0)
 				{
 					QTransform ma;
@@ -686,6 +686,7 @@
 				PageItem* cItem = gpL.at(id);
 				cItem->gXpos = cItem->xPos() - gItem->xPos();
 				cItem->gYpos = cItem->yPos() - gItem->yPos();
+				cItem->Parent = gItem;
 				if (gItem->rotation() != 0)
 				{
 					QTransform ma;
@@ -700,7 +701,6 @@
 			gItem->groupItemList = gpL;
 		}
 	}
-	m_Doc->renumberItemsInListOrder();
 	
 	// reestablish first/lastAuto
 	m_Doc->FirstAuto = m_Doc->LastAuto;
@@ -1842,14 +1842,14 @@
 
 	if (tagName == "FRAMEOBJECT")
 	{
-		doc->FrameItems.append(doc->Items->takeAt(newItem->ItemNr));
-		newItem->ItemNr = doc->FrameItems.count()-1;
+		doc->FrameItems.append(doc->Items->takeAt(doc->Items->indexOf(newItem)));
 	}
 
 	info.item     = newItem;
 	info.nextItem = attrs.valueAsInt("NEXTITEM", -1);
 	info.ownLink  = newItem->isTableItem ? attrs.valueAsInt("OwnLINK", 0) : 0;
 	info.groupLastItem = 0;
+	info.ownNr = doc->Items->indexOf(newItem);
 
 	info.isGroupFlag = attrs.valueAsBool("isGroupControl", 0);
 	if (info.isGroupFlag)
@@ -2033,7 +2033,7 @@
 	QStack< QList<PageItem*> > groupStack;
 	QStack< QList<PageItem*> > groupStackP;
 	QStack<int> groupStack2;
-	QMap<int,int> TableID2;
+	QMap<int,PageItem*> TableID2;
 	QList<PageItem*> TableItems2;
 
 	pat.setDoc(doc);
@@ -2075,12 +2075,12 @@
 		if (itemInfo.item->isTableItem)
 		{
 			TableItems2.append(itemInfo.item);
-			TableID2.insert(itemInfo.ownLink, itemInfo.item->ItemNr);
+			TableID2.insert(itemInfo.ownLink, itemInfo.item);
 		}
 		if (groupStack.count() > 0)
 		{
 			groupStack.top().append(itemInfo.item);
-			while (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
+			while (static_cast<int>(itemInfo.ownNr) == groupStack2.top())
 			{
 				groupStackP.push(groupStack.pop());
 				groupStack2.pop();
@@ -2093,7 +2093,7 @@
 			QList<PageItem*> GroupItems;
 			GroupItems.append(itemInfo.item);
 			groupStack.push(GroupItems);
-			groupStack2.push(itemInfo.groupLastItem + itemInfo.item->ItemNr);
+			groupStack2.push(itemInfo.groupLastItem + itemInfo.ownNr);
 		}
 	}
 
@@ -2110,19 +2110,19 @@
 		{
 			PageItem* ta = TableItems2.at(ttc);
 			if (ta->TopLinkID != -1)
-				ta->TopLink = m_Doc->Items->at(TableID2[ta->TopLinkID]);
+				ta->TopLink = TableID2[ta->TopLinkID];
 			else
 				ta->TopLink = 0;
 			if (ta->LeftLinkID != -1)
-				ta->LeftLink = m_Doc->Items->at(TableID2[ta->LeftLinkID]);
+				ta->LeftLink = TableID2[ta->LeftLinkID];
 			else
 				ta->LeftLink = 0;
 			if (ta->RightLinkID != -1)
-				ta->RightLink = m_Doc->Items->at(TableID2[ta->RightLinkID]);
+				ta->RightLink = TableID2[ta->RightLinkID];
 			else
 				ta->RightLink = 0;
 			if (ta->BottomLinkID != -1)
-				ta->BottomLink = m_Doc->Items->at(TableID2[ta->BottomLinkID]);
+				ta->BottomLink = TableID2[ta->BottomLinkID];
 			else
 				ta->BottomLink = 0;
 		}
@@ -2138,6 +2138,7 @@
 				PageItem* cItem = gpL.at(id);
 				cItem->gXpos = cItem->xPos() - gItem->xPos();
 				cItem->gYpos = cItem->yPos() - gItem->yPos();
+				cItem->Parent = gItem;
 				if (gItem->rotation() != 0)
 				{
 					QTransform ma;
@@ -2152,7 +2153,6 @@
 			gItem->groupItemList = gpL;
 		}
 	}
-	m_Doc->renumberItemsInListOrder();
 
 	uint itemCount2 = m_Doc->Items->count();
 	if (itemCount2 > itemCount1)
@@ -2166,7 +2166,6 @@
 			newItem->moveBy(pat.xoffset, pat.yoffset, true);
 			newItem->gXpos += pat.xoffset;
 			newItem->gYpos += pat.yoffset;
-			newItem->ItemNr = pat.items.count();
 			pat.items.append(newItem);
 		}
 	}
@@ -2952,7 +2951,7 @@
 			currItem->EmProfile   = attrs.valueAsString("EPROF", "");
 			currItem->IRender     = (eRenderIntent) attrs.valueAsInt("IRENDER" , 1);
 			currItem->UseEmbedded = attrs.valueAsInt("EMBEDDED", 1);
-			doc->LoadPict(currItem->Pfile, z);
+			doc->loadPict(currItem->Pfile, currItem);
 			currItem->setImageXYScale(scx, scy);
 			currItem->setImageShown( attrs.valueAsInt("PICART"));
 /*			currItem->BBoxX = ScCLocale::toDoubleC( obj->attribute("BBOXX"));
@@ -3226,7 +3225,7 @@
 	ScPage* newPage = NULL;
 	
 	QString tmp;
-	QMap<int,int> TableID;
+	QMap<int,PageItem*> TableID;
 	QList<PageItem*> TableItems;
 	QMap<PageItem*, int> groupID;
 	double pageX = 0, pageY = 0;
@@ -3250,8 +3249,6 @@
 	itemRemapM.clear();
 	itemNextM.clear();
 	itemCountM = 0;
-	itemRemapF.clear();
-	itemNextF.clear();
 
 	DoVorl.clear();
 	DoVorl[0] = "0";
@@ -3466,12 +3463,11 @@
 				if (newItem->isTableItem)
 				{
 					TableItems.append(newItem);
-					TableID.insert(itemInfo.ownLink, newItem->ItemNr);
+					TableID.insert(itemInfo.ownLink, newItem);
 				}
 				if (tagName == "FRAMEOBJECT")
 				{
-					m_Doc->FrameItems.append(m_Doc->Items->takeAt(newItem->ItemNr));
-					newItem->ItemNr = m_Doc->FrameItems.count()-1;
+					m_Doc->FrameItems.append(m_Doc->Items->takeAt(m_Doc->Items->indexOf(newItem)));
 				}
 			}
 		}
@@ -3501,19 +3497,19 @@
 		{
 			PageItem* ta = TableItems.at(ttc);
 			if (ta->TopLinkID != -1)
-				ta->TopLink = m_Doc->Items->at(TableID[ta->TopLinkID]);
+				ta->TopLink = TableID[ta->TopLinkID];
 			else
 				ta->TopLink = 0;
 			if (ta->LeftLinkID != -1)
-				ta->LeftLink = m_Doc->Items->at(TableID[ta->LeftLinkID]);
+				ta->LeftLink = TableID[ta->LeftLinkID];
 			else
 				ta->LeftLink = 0;
 			if (ta->RightLinkID != -1)
-				ta->RightLink = m_Doc->Items->at(TableID[ta->RightLinkID]);
+				ta->RightLink = TableID[ta->RightLinkID];
 			else
 				ta->RightLink = 0;
 			if (ta->BottomLinkID != -1)
-				ta->BottomLink = m_Doc->Items->at(TableID[ta->BottomLinkID]);
+				ta->BottomLink = TableID[ta->BottomLinkID];
 			else
 				ta->BottomLink = 0;
 		}

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus134format/scribus134format.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/fileloader/scribus134format/scribus134format.h
==============================================================================
--- branches/ScribusOIF/scribus/plugins/fileloader/scribus134format/scribus134format.h (original)
+++ branches/ScribusOIF/scribus/plugins/fileloader/scribus134format/scribus134format.h Sun Nov  6 22:52:15 2011
@@ -67,11 +67,12 @@
 		class ItemInfo
 		{
 		public:
-			ItemInfo(void) { groupLastItem = nextItem = ownLink = 0; item = NULL; isGroupFlag = false; };
+			ItemInfo(void) { groupLastItem = nextItem = ownLink = ownNr = 0; item = NULL; isGroupFlag = false; };
 			PageItem* item;
 			int groupLastItem;
 			int nextItem;
 			int ownLink;
+			int ownNr;
 			bool isGroupFlag;
 		};
 
@@ -143,8 +144,6 @@
 		QMap<int, int> groupRemap;
 		QMap<int, int> itemRemap;
 		QMap<int, int> itemNext;
-		QMap<int, int> itemRemapF;
-		QMap<int, int> itemNextF;
 		QMap<int, int> itemRemapM;
 		QMap<int, int> itemNextM;
 

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/fileloader/scribus13format/scribus13format.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/fileloader/scribus13format/scribus13format.cpp Sun Nov  6 22:52:15 2011
@@ -925,25 +925,24 @@
 					m_Doc->LastAuto = Neu;
 				if (pg.tagName()=="FRAMEOBJECT")
 				{
-					m_Doc->FrameItems.append(m_Doc->Items->takeAt(Neu->ItemNr));
-					Neu->ItemNr = m_Doc->FrameItems.count()-1;
+					m_Doc->FrameItems.append(m_Doc->Items->takeAt(m_Doc->Items->indexOf(Neu)));
 				}
 				if (Neu->isTableItem)
 				{
 					if (pg.tagName()=="PAGEOBJECT")
 					{
 						TableItems.append(Neu);
-						TableID.insert(pg.attribute("OwnLINK", "0").toInt(), Neu->ItemNr);
+						TableID.insert(pg.attribute("OwnLINK", "0").toInt(), m_Doc->DocItems.indexOf(Neu));
 					}
 					else if (pg.tagName()=="FRAMEOBJECT")
 					{
 						TableItemsF.append(Neu);
-						TableIDF.insert(pg.attribute("OwnLINK", "0").toInt(), Neu->ItemNr);
+						TableIDF.insert(pg.attribute("OwnLINK", "0").toInt(), m_Doc->FrameItems.indexOf(Neu));
 					}
 					else
 					{
 						TableItemsM.append(Neu);
-						TableIDM.insert(pg.attribute("OwnLINK", "0").toInt(), Neu->ItemNr);
+						TableIDM.insert(pg.attribute("OwnLINK", "0").toInt(), m_Doc->MasterItems.indexOf(Neu));
 					}
 				}
 				m_Doc->setMasterPageMode(false);
@@ -1892,7 +1891,7 @@
 			currItem->EmProfile = obj->attribute("EPROF","");
 			currItem->IRender   = (eRenderIntent) obj->attribute("IRENDER", "1").toInt();
 			currItem->UseEmbedded = obj->attribute("EMBEDDED", "1").toInt();
-			doc->LoadPict(currItem->Pfile, z);
+			doc->loadPict(currItem->Pfile, currItem);
 			currItem->setImageXYScale(scx, scy);
 			currItem->setImageShown(obj->attribute("PICART").toInt());
 /*			currItem->BBoxX = obj->attribute("BBOXX").toDouble();
@@ -2409,12 +2408,11 @@
 					if (Neu->isTableItem)
 					{
 						TableItems.append(Neu);
-						TableID.insert(pg.attribute("OwnLINK", "0").toInt(), Neu->ItemNr);
+						TableID.insert(pg.attribute("OwnLINK", "0").toInt(), m_Doc->Items->indexOf(Neu));
 					}
 					if (pg.tagName()=="FRAMEOBJECT")
 					{
-						m_Doc->FrameItems.append(m_Doc->Items->takeAt(Neu->ItemNr));
-						Neu->ItemNr = m_Doc->FrameItems.count()-1;
+						m_Doc->FrameItems.append(m_Doc->Items->takeAt(m_Doc->Items->indexOf(Neu)));
 					}
 				}
 				counter++;

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Sun Nov  6 22:52:15 2011
@@ -180,15 +180,16 @@
 {
 	ParagraphStyle vg;
 	bool newVersion = false;
+	isNewFormat = false;
 	LayerToPaste = toLayer;
 	Xp = Xp_in;
 	Yp = Yp_in;
 //	GrX = 0.0;
 //	GrY = 0.0;
 
-	QMap<int,int> TableID;
-	QMap<int,int> TableIDM;
-	QMap<int,int> TableIDF;
+	QMap<int,PageItem*> TableID;
+	QMap<int,PageItem*> TableIDM;
+	QMap<int,PageItem*> TableIDF;
 	QList<PageItem*> TableItems;
 	QList<PageItem*> TableItemsM;
 	QList<PageItem*> TableItemsF;
@@ -305,32 +306,44 @@
 			success = readObject(m_Doc, reader, itemInfo, fileDir, true);
 			if (!success)
 				break;
+			if (isNewFormat)
+			{
+				if (itemInfo.nextItem != -1)
+					itemNext[itemInfo.itemID] = itemInfo.nextItem;
+				if (itemInfo.item->isTableItem)
+					TableItems.append(itemInfo.item);
+				if (itemInfo.isWeldFlag)
+					WeldItems.append(itemInfo.item);
+			}
+			else
+			{
 			// first of linked chain?
-			if (tagName == "ITEM")
-			{
-				if (itemInfo.nextItem != -1)
-					itemNext[itemInfo.item->ItemNr] = itemInfo.nextItem;
-			}
-			if (itemInfo.item->isTableItem)
-			{
 				if (tagName == "ITEM")
 				{
-					TableItems.append(itemInfo.item);
-					TableID.insert(itemInfo.ownLink, itemInfo.item->ItemNr);
-				}
-			}
-			if (itemInfo.isWeldFlag)
-			{
-				if (tagName == "ITEM")
-				{
-					WeldItems.append(itemInfo.item);
-					WeldID.insert(itemInfo.ownWeld, itemInfo.item);
+					if (itemInfo.nextItem != -1)
+						itemNext[itemInfo.ownNr] = itemInfo.nextItem;
+				}
+				if (itemInfo.item->isTableItem)
+				{
+					if (tagName == "ITEM")
+					{
+						TableItems.append(itemInfo.item);
+						TableID.insert(itemInfo.ownLink, itemInfo.item);
+					}
+				}
+				if (itemInfo.isWeldFlag)
+				{
+					if (tagName == "ITEM")
+					{
+						WeldItems.append(itemInfo.item);
+						WeldID.insert(itemInfo.ownWeld, itemInfo.item);
+					}
 				}
 			}
 			if (groupStack.count() > 0)
 			{
 				groupStack.top().append(itemInfo.item);
-				while (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
+				while (static_cast<int>(itemInfo.ownNr) == groupStack2.top())
 				{
 					if ((tagName == "PAGEOBJECT") || (tagName == "ITEM"))
 						groupStackP.push(groupStack.pop());
@@ -348,7 +361,7 @@
 				QList<PageItem*> GroupItems;
 				GroupItems.append(itemInfo.item);
 				groupStack.push(GroupItems);
-				groupStack2.push(itemInfo.groupLastItem + itemInfo.item->ItemNr);
+				groupStack2.push(itemInfo.groupLastItem + itemInfo.ownNr);
 			}
 		}
 		if (tagName == "Pattern")
@@ -362,103 +375,162 @@
 		setDomParsingError(reader.errorString(), reader.lineNumber(), reader.columnNumber());
 		return false;
 	}
-	if (TableItemsF.count() != 0)
-	{
-		for (int ttc = 0; ttc < TableItemsF.count(); ++ttc)
-		{
-			PageItem* ta = TableItemsF.at(ttc);
-			if (ta->TopLinkID != -1)
-				ta->TopLink = m_Doc->FrameItems.at(TableIDF[ta->TopLinkID]);
-			else
-				ta->TopLink = 0;
-			if (ta->LeftLinkID != -1)
-				ta->LeftLink = m_Doc->FrameItems.at(TableIDF[ta->LeftLinkID]);
-			else
-				ta->LeftLink = 0;
-			if (ta->RightLinkID != -1)
-				ta->RightLink = m_Doc->FrameItems.at(TableIDF[ta->RightLinkID]);
-			else
-				ta->RightLink = 0;
-			if (ta->BottomLinkID != -1)
-				ta->BottomLink = m_Doc->FrameItems.at(TableIDF[ta->BottomLinkID]);
-			else
-				ta->BottomLink = 0;
-		}
-	}
-	if (TableItemsM.count() != 0)
-	{
-		for (int ttc = 0; ttc < TableItemsM.count(); ++ttc)
-		{
-			PageItem* ta = TableItemsM.at(ttc);
-			if (ta->TopLinkID != -1)
-				ta->TopLink = m_Doc->MasterItems.at(TableIDM[ta->TopLinkID]);
-			else
-				ta->TopLink = 0;
-			if (ta->LeftLinkID != -1)
-				ta->LeftLink = m_Doc->MasterItems.at(TableIDM[ta->LeftLinkID]);
-			else
-				ta->LeftLink = 0;
-			if (ta->RightLinkID != -1)
-				ta->RightLink = m_Doc->MasterItems.at(TableIDM[ta->RightLinkID]);
-			else
-				ta->RightLink = 0;
-			if (ta->BottomLinkID != -1)
-				ta->BottomLink = m_Doc->MasterItems.at(TableIDM[ta->BottomLinkID]);
-			else
-				ta->BottomLink = 0;
-		}
-	}
-	if (TableItems.count() != 0)
-	{
-		for (int ttc = 0; ttc < TableItems.count(); ++ttc)
-		{
-			PageItem* ta = TableItems.at(ttc);
-			if (ta->TopLinkID != -1)
-				ta->TopLink = m_Doc->Items->at(TableID[ta->TopLinkID]);
-			else
-				ta->TopLink = 0;
-			if (ta->LeftLinkID != -1)
-				ta->LeftLink = m_Doc->Items->at(TableID[ta->LeftLinkID]);
-			else
-				ta->LeftLink = 0;
-			if (ta->RightLinkID != -1)
-				ta->RightLink = m_Doc->Items->at(TableID[ta->RightLinkID]);
-			else
-				ta->RightLink = 0;
-			if (ta->BottomLinkID != -1)
-				ta->BottomLink = m_Doc->Items->at(TableID[ta->BottomLinkID]);
-			else
-				ta->BottomLink = 0;
-		}
-	}
-	if (WeldItems.count() != 0)
-	{
-		for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
-		{
-			PageItem* ta = WeldItems.at(ttc);
-			for (int i = 0 ; i < ta->weldList.count(); i++)
-			{
-				PageItem::weldingInfo wInf = ta->weldList.at(i);
-				ta->weldList[i].weldItem = WeldID[wInf.weldID];
-			}
-		}
-	}
-	// reestablish textframe links
-	if (itemNext.count() != 0)
-	{
-		QMap<int,int>::Iterator lc;
-		for (lc = itemNext.begin(); lc != itemNext.end(); ++lc)
-		{
-			if (lc.value() >= 0)
-			{
-				PageItem * Its = m_Doc->DocItems.at(lc.key());
-				PageItem * Itn = m_Doc->DocItems.at(lc.value());
-				if (!Its->testLinkCandidate(Itn))
-				{
-					qDebug() << "scribus150format: corruption in linked textframes detected";
-					continue;
-				}
-				Its->link(Itn);
+	if (isNewFormat)
+	{
+		if (TableItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < TableItems.count(); ++ttc)
+			{
+				PageItem* ta = TableItems.at(ttc);
+				if (ta->TopLinkID != -1)
+					ta->TopLink = LinkID[ta->TopLinkID];
+				else
+					ta->TopLink = 0;
+				if (ta->LeftLinkID != -1)
+					ta->LeftLink = LinkID[ta->LeftLinkID];
+				else
+					ta->LeftLink = 0;
+				if (ta->RightLinkID != -1)
+					ta->RightLink = LinkID[ta->RightLinkID];
+				else
+					ta->RightLink = 0;
+				if (ta->BottomLinkID != -1)
+					ta->BottomLink = LinkID[ta->BottomLinkID];
+				else
+					ta->BottomLink = 0;
+			}
+		}
+		if (WeldItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
+			{
+				PageItem* ta = WeldItems.at(ttc);
+				for (int i = 0 ; i < ta->weldList.count(); i++)
+				{
+					PageItem::weldingInfo wInf = ta->weldList.at(i);
+					ta->weldList[i].weldItem = LinkID[wInf.weldID];
+				}
+			}
+		}
+		if (itemNext.count() != 0)
+		{
+			QMap<int,int>::Iterator lc;
+			for (lc = itemNext.begin(); lc != itemNext.end(); ++lc)
+			{
+				if (lc.value() >= 0)
+				{
+					PageItem * Its = LinkID[lc.key()];
+					PageItem * Itn = LinkID[lc.value()];
+					if (!Its->testLinkCandidate(Itn))
+					{
+						qDebug() << "scribus150format: corruption in linked textframes detected";
+						continue;
+					}
+					Its->link(Itn);
+				}
+			}
+		}
+	}
+	else
+	{
+		if (TableItemsF.count() != 0)
+		{
+			for (int ttc = 0; ttc < TableItemsF.count(); ++ttc)
+			{
+				PageItem* ta = TableItemsF.at(ttc);
+				if (ta->TopLinkID != -1)
+					ta->TopLink = TableIDF[ta->TopLinkID];
+				else
+					ta->TopLink = 0;
+				if (ta->LeftLinkID != -1)
+					ta->LeftLink = TableIDF[ta->LeftLinkID];
+				else
+					ta->LeftLink = 0;
+				if (ta->RightLinkID != -1)
+					ta->RightLink = TableIDF[ta->RightLinkID];
+				else
+					ta->RightLink = 0;
+				if (ta->BottomLinkID != -1)
+					ta->BottomLink = TableIDF[ta->BottomLinkID];
+				else
+					ta->BottomLink = 0;
+			}
+		}
+		if (TableItemsM.count() != 0)
+		{
+			for (int ttc = 0; ttc < TableItemsM.count(); ++ttc)
+			{
+				PageItem* ta = TableItemsM.at(ttc);
+				if (ta->TopLinkID != -1)
+					ta->TopLink = TableIDM[ta->TopLinkID];
+				else
+					ta->TopLink = 0;
+				if (ta->LeftLinkID != -1)
+					ta->LeftLink = TableIDM[ta->LeftLinkID];
+				else
+					ta->LeftLink = 0;
+				if (ta->RightLinkID != -1)
+					ta->RightLink = TableIDM[ta->RightLinkID];
+				else
+					ta->RightLink = 0;
+				if (ta->BottomLinkID != -1)
+					ta->BottomLink = TableIDM[ta->BottomLinkID];
+				else
+					ta->BottomLink = 0;
+			}
+		}
+		if (TableItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < TableItems.count(); ++ttc)
+			{
+				PageItem* ta = TableItems.at(ttc);
+				if (ta->TopLinkID != -1)
+					ta->TopLink = TableID[ta->TopLinkID];
+				else
+					ta->TopLink = 0;
+				if (ta->LeftLinkID != -1)
+					ta->LeftLink = TableID[ta->LeftLinkID];
+				else
+					ta->LeftLink = 0;
+				if (ta->RightLinkID != -1)
+					ta->RightLink = TableID[ta->RightLinkID];
+				else
+					ta->RightLink = 0;
+				if (ta->BottomLinkID != -1)
+					ta->BottomLink = TableID[ta->BottomLinkID];
+				else
+					ta->BottomLink = 0;
+			}
+		}
+		if (WeldItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
+			{
+				PageItem* ta = WeldItems.at(ttc);
+				for (int i = 0 ; i < ta->weldList.count(); i++)
+				{
+					PageItem::weldingInfo wInf = ta->weldList.at(i);
+					ta->weldList[i].weldItem = WeldID[wInf.weldID];
+				}
+			}
+		}
+		// reestablish textframe links
+		if (itemNext.count() != 0)
+		{
+			QMap<int,int>::Iterator lc;
+			for (lc = itemNext.begin(); lc != itemNext.end(); ++lc)
+			{
+				if (lc.value() >= 0)
+				{
+					PageItem * Its = m_Doc->DocItems.at(lc.key());
+					PageItem * Itn = m_Doc->DocItems.at(lc.value());
+					if (!Its->testLinkCandidate(Itn))
+					{
+						qDebug() << "scribus150format: corruption in linked textframes detected";
+						continue;
+					}
+					Its->link(Itn);
+				}
 			}
 		}
 	}
@@ -473,6 +545,7 @@
 				PageItem* cItem = gpL.at(id);
 				cItem->gXpos = cItem->xPos() - gItem->xPos();
 				cItem->gYpos = cItem->yPos() - gItem->yPos();
+				cItem->Parent = gItem;
 				if (gItem->rotation() != 0)
 				{
 					QTransform ma;
@@ -498,6 +571,7 @@
 				PageItem* cItem = gpL.at(id);
 				cItem->gXpos = cItem->xPos() - gItem->xPos();
 				cItem->gYpos = cItem->yPos() - gItem->yPos();
+				cItem->Parent = gItem;
 				if (gItem->rotation() != 0)
 				{
 					QTransform ma;
@@ -523,6 +597,7 @@
 				PageItem* cItem = gpL.at(id);
 				cItem->gXpos = cItem->xPos() - gItem->xPos();
 				cItem->gYpos = cItem->yPos() - gItem->yPos();
+				cItem->Parent = gItem;
 				if (gItem->rotation() != 0)
 				{
 					QTransform ma;
@@ -537,7 +612,6 @@
 			gItem->groupItemList = gpL;
 		}
 	}
-	m_Doc->renumberItemsInListOrder();
 	return true;
 }
 
@@ -553,19 +627,16 @@
 	Yp = 0.0;
 	GrX = 0.0;
 	GrY = 0.0;
-
-	QMap<int,int> TableID;
-	QMap<int,int> TableIDM;
-	QMap<int,int> TableIDF;
+	isNewFormat = false;
+
+	QMap<int,PageItem*> TableID;
+	QMap<int,PageItem*> TableIDM;
+	QMap<int,PageItem*> TableIDF;
 	QList<PageItem*> TableItems;
 	QList<PageItem*> TableItemsM;
 	QList<PageItem*> TableItemsF;
 	QMap<int,PageItem*> WeldID;
-//	QMap<int,PageItem*> WeldIDM;
-//	QMap<int,PageItem*> WeldIDF;
 	QList<PageItem*> WeldItems;
-//	QList<PageItem*> WeldItemsM;
-//	QList<PageItem*> WeldItemsF;
 	QStack< QList<PageItem*> > groupStack;
 	QStack< QList<PageItem*> > groupStackF;
 	QStack< QList<PageItem*> > groupStackM;
@@ -605,11 +676,6 @@
 	TableItemsF.clear();
 	TableIDF.clear();
 	WeldItems.clear();
-	WeldID.clear();
-//	WeldItemsM.clear();
-//	WeldIDM.clear();
-//	WeldItemsF.clear();
-//	WeldIDF.clear();
 
 	m_Doc->GroupCounter = 1;
 	m_Doc->LastAuto = 0;
@@ -688,51 +754,56 @@
 			success = readObject(m_Doc, reader, itemInfo, fileDir, false);
 			if (!success) break;
 
-			// first of linked chain?
-			if (tagName == "PAGEOBJECT")
+			if (isNewFormat)
 			{
 				if (itemInfo.nextItem != -1)
-					itemNext[itemInfo.item->ItemNr] = itemInfo.nextItem;
-			}
-			else if (tagName == "MASTEROBJECT")
-			{
-				if (itemInfo.nextItem != -1)
-					itemNextM[itemInfo.item->ItemNr] = itemInfo.nextItem;
-			}
-			/* not sure if we want that...
-			else if (tagName == "FRAMEOBJECT")
-			{
-				if (itemInfo.nextItem != -1)
-					itemNextF[itemInfo.item->ItemNr] = itemInfo.nextItem;
-			}*/
-
-			if (itemInfo.item->isTableItem)
-			{
+					itemNext[itemInfo.itemID] = itemInfo.nextItem;
+				if (itemInfo.item->isTableItem)
+					TableItems.append(itemInfo.item);
+				if (itemInfo.isWeldFlag)
+					WeldItems.append(itemInfo.item);
+			}
+			else
+			{
+				// first of linked chain?
 				if (tagName == "PAGEOBJECT")
 				{
-					TableItems.append(itemInfo.item);
-					TableID.insert(itemInfo.ownLink, itemInfo.item->ItemNr);
-				}
-				else if (tagName == "FRAMEOBJECT")
-				{
-					TableItemsF.append(itemInfo.item);
-					TableIDF.insert(itemInfo.ownLink, itemInfo.item->ItemNr);
-				}
-				else
-				{
-					TableItemsM.append(itemInfo.item);
-					TableIDM.insert(itemInfo.ownLink, itemInfo.item->ItemNr);
-				}
-			}
-			if (itemInfo.isWeldFlag)
-			{
-				WeldItems.append(itemInfo.item);
-				WeldID.insert(itemInfo.ownWeld, itemInfo.item);
+					if (itemInfo.nextItem != -1)
+						itemNext[itemInfo.ownNr] = itemInfo.nextItem;
+				}
+				else if (tagName == "MASTEROBJECT")
+				{
+					if (itemInfo.nextItem != -1)
+						itemNextM[itemInfo.ownNr] = itemInfo.nextItem;
+				}
+				if (itemInfo.item->isTableItem)
+				{
+					if (tagName == "PAGEOBJECT")
+					{
+						TableItems.append(itemInfo.item);
+						TableID.insert(itemInfo.ownLink, itemInfo.item);
+					}
+					else if (tagName == "FRAMEOBJECT")
+					{
+						TableItemsF.append(itemInfo.item);
+						TableIDF.insert(itemInfo.ownLink, itemInfo.item);
+					}
+					else
+					{
+						TableItemsM.append(itemInfo.item);
+						TableIDM.insert(itemInfo.ownLink, itemInfo.item);
+					}
+				}
+				if (itemInfo.isWeldFlag)
+				{
+					WeldItems.append(itemInfo.item);
+					WeldID.insert(itemInfo.ownWeld, itemInfo.item);
+				}
 			}
 			if (groupStack.count() > 0)
 			{
 				groupStack.top().append(itemInfo.item);
-				while (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
+				while (static_cast<int>(itemInfo.ownNr) == groupStack2.top())
 				{
 					if (tagName == "PAGEOBJECT")
 						groupStackP.push(groupStack.pop());
@@ -750,7 +821,7 @@
 				QList<PageItem*> GroupItems;
 				GroupItems.append(itemInfo.item);
 				groupStack.push(GroupItems);
-				groupStack2.push(itemInfo.groupLastItem + itemInfo.item->ItemNr);
+				groupStack2.push(itemInfo.groupLastItem + itemInfo.ownNr);
 			}
 		}
 		if (tagName == "Pattern")
@@ -765,121 +836,180 @@
 		setDomParsingError(reader.errorString(), reader.lineNumber(), reader.columnNumber());
 		return false;
 	}
-	if (TableItemsF.count() != 0)
-	{
-		for (int ttc = 0; ttc < TableItemsF.count(); ++ttc)
-		{
-			PageItem* ta = TableItemsF.at(ttc);
-			if (ta->TopLinkID != -1)
-				ta->TopLink = m_Doc->FrameItems.at(TableIDF[ta->TopLinkID]);
-			else
-				ta->TopLink = 0;
-			if (ta->LeftLinkID != -1)
-				ta->LeftLink = m_Doc->FrameItems.at(TableIDF[ta->LeftLinkID]);
-			else
-				ta->LeftLink = 0;
-			if (ta->RightLinkID != -1)
-				ta->RightLink = m_Doc->FrameItems.at(TableIDF[ta->RightLinkID]);
-			else
-				ta->RightLink = 0;
-			if (ta->BottomLinkID != -1)
-				ta->BottomLink = m_Doc->FrameItems.at(TableIDF[ta->BottomLinkID]);
-			else
-				ta->BottomLink = 0;
-		}
-	}
-	if (TableItemsM.count() != 0)
-	{
-		for (int ttc = 0; ttc < TableItemsM.count(); ++ttc)
-		{
-			PageItem* ta = TableItemsM.at(ttc);
-			if (ta->TopLinkID != -1)
-				ta->TopLink = m_Doc->MasterItems.at(TableIDM[ta->TopLinkID]);
-			else
-				ta->TopLink = 0;
-			if (ta->LeftLinkID != -1)
-				ta->LeftLink = m_Doc->MasterItems.at(TableIDM[ta->LeftLinkID]);
-			else
-				ta->LeftLink = 0;
-			if (ta->RightLinkID != -1)
-				ta->RightLink = m_Doc->MasterItems.at(TableIDM[ta->RightLinkID]);
-			else
-				ta->RightLink = 0;
-			if (ta->BottomLinkID != -1)
-				ta->BottomLink = m_Doc->MasterItems.at(TableIDM[ta->BottomLinkID]);
-			else
-				ta->BottomLink = 0;
-		}
-	}
-	if (TableItems.count() != 0)
-	{
-		for (int ttc = 0; ttc < TableItems.count(); ++ttc)
-		{
-			PageItem* ta = TableItems.at(ttc);
-			if (ta->TopLinkID != -1)
-				ta->TopLink = m_Doc->Items->at(TableID[ta->TopLinkID]);
-			else
-				ta->TopLink = 0;
-			if (ta->LeftLinkID != -1)
-				ta->LeftLink = m_Doc->Items->at(TableID[ta->LeftLinkID]);
-			else
-				ta->LeftLink = 0;
-			if (ta->RightLinkID != -1)
-				ta->RightLink = m_Doc->Items->at(TableID[ta->RightLinkID]);
-			else
-				ta->RightLink = 0;
-			if (ta->BottomLinkID != -1)
-				ta->BottomLink = m_Doc->Items->at(TableID[ta->BottomLinkID]);
-			else
-				ta->BottomLink = 0;
-		}
-	}
-	if (WeldItems.count() != 0)
-	{
-		for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
-		{
-			PageItem* ta = WeldItems.at(ttc);
-			for (int i = 0 ; i < ta->weldList.count(); i++)
-			{
-				PageItem::weldingInfo wInf = ta->weldList.at(i);
-				ta->weldList[i].weldItem = WeldID[wInf.weldID];
-			}
-		}
-	}
-	// reestablish textframe links
-	if (itemNext.count() != 0)
-	{
-		QMap<int,int>::Iterator lc;
-		for (lc = itemNext.begin(); lc != itemNext.end(); ++lc)
-		{
-			if (lc.value() >= 0)
-			{
-				PageItem * Its = m_Doc->DocItems.at(lc.key());
-				PageItem * Itn = m_Doc->DocItems.at(lc.value());
-				if (!Its->testLinkCandidate(Itn))
-				{
-					qDebug() << "scribus150format: corruption in linked textframes detected";
-					continue;
-				}
-				Its->link(Itn);
-			}
-		}
-	}
-	if (itemNextM.count() != 0)
-	{
-		QMap<int,int>::Iterator lc;
-		for (lc = itemNextM.begin(); lc != itemNextM.end(); ++lc)
-		{
-			if (lc.value() >= 0)
-			{
-				PageItem * Its = m_Doc->MasterItems.at(lc.key());
-				PageItem * Itn = m_Doc->MasterItems.at(lc.value());
-				if (!Its->testLinkCandidate(Itn))
-				{
-					qDebug() << "scribus150format: corruption in linked textframes detected";
-					continue;
-				}
-				Its->link(Itn);
+	if (isNewFormat)
+	{
+		if (TableItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < TableItems.count(); ++ttc)
+			{
+				PageItem* ta = TableItems.at(ttc);
+				if (ta->TopLinkID != -1)
+					ta->TopLink = LinkID[ta->TopLinkID];
+				else
+					ta->TopLink = 0;
+				if (ta->LeftLinkID != -1)
+					ta->LeftLink = LinkID[ta->LeftLinkID];
+				else
+					ta->LeftLink = 0;
+				if (ta->RightLinkID != -1)
+					ta->RightLink = LinkID[ta->RightLinkID];
+				else
+					ta->RightLink = 0;
+				if (ta->BottomLinkID != -1)
+					ta->BottomLink = LinkID[ta->BottomLinkID];
+				else
+					ta->BottomLink = 0;
+			}
+		}
+		if (WeldItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
+			{
+				PageItem* ta = WeldItems.at(ttc);
+				for (int i = 0 ; i < ta->weldList.count(); i++)
+				{
+					PageItem::weldingInfo wInf = ta->weldList.at(i);
+					ta->weldList[i].weldItem = LinkID[wInf.weldID];
+				}
+			}
+		}
+		if (itemNext.count() != 0)
+		{
+			QMap<int,int>::Iterator lc;
+			for (lc = itemNext.begin(); lc != itemNext.end(); ++lc)
+			{
+				if (lc.value() >= 0)
+				{
+					PageItem * Its = LinkID[lc.key()];
+					PageItem * Itn = LinkID[lc.value()];
+					if (!Its->testLinkCandidate(Itn))
+					{
+						qDebug() << "scribus150format: corruption in linked textframes detected";
+						continue;
+					}
+					Its->link(Itn);
+				}
+			}
+		}
+	}
+	else
+	{
+		if (TableItemsF.count() != 0)
+		{
+			for (int ttc = 0; ttc < TableItemsF.count(); ++ttc)
+			{
+				PageItem* ta = TableItemsF.at(ttc);
+				if (ta->TopLinkID != -1)
+					ta->TopLink = TableIDF[ta->TopLinkID];
+				else
+					ta->TopLink = 0;
+				if (ta->LeftLinkID != -1)
+					ta->LeftLink = TableIDF[ta->LeftLinkID];
+				else
+					ta->LeftLink = 0;
+				if (ta->RightLinkID != -1)
+					ta->RightLink = TableIDF[ta->RightLinkID];
+				else
+					ta->RightLink = 0;
+				if (ta->BottomLinkID != -1)
+					ta->BottomLink = TableIDF[ta->BottomLinkID];
+				else
+					ta->BottomLink = 0;
+			}
+		}
+		if (TableItemsM.count() != 0)
+		{
+			for (int ttc = 0; ttc < TableItemsM.count(); ++ttc)
+			{
+				PageItem* ta = TableItemsM.at(ttc);
+				if (ta->TopLinkID != -1)
+					ta->TopLink = TableIDM[ta->TopLinkID];
+				else
+					ta->TopLink = 0;
+				if (ta->LeftLinkID != -1)
+					ta->LeftLink = TableIDM[ta->LeftLinkID];
+				else
+					ta->LeftLink = 0;
+				if (ta->RightLinkID != -1)
+					ta->RightLink = TableIDM[ta->RightLinkID];
+				else
+					ta->RightLink = 0;
+				if (ta->BottomLinkID != -1)
+					ta->BottomLink = TableIDM[ta->BottomLinkID];
+				else
+					ta->BottomLink = 0;
+			}
+		}
+		if (TableItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < TableItems.count(); ++ttc)
+			{
+				PageItem* ta = TableItems.at(ttc);
+				if (ta->TopLinkID != -1)
+					ta->TopLink = TableID[ta->TopLinkID];
+				else
+					ta->TopLink = 0;
+				if (ta->LeftLinkID != -1)
+					ta->LeftLink = TableID[ta->LeftLinkID];
+				else
+					ta->LeftLink = 0;
+				if (ta->RightLinkID != -1)
+					ta->RightLink = TableID[ta->RightLinkID];
+				else
+					ta->RightLink = 0;
+				if (ta->BottomLinkID != -1)
+					ta->BottomLink = TableID[ta->BottomLinkID];
+				else
+					ta->BottomLink = 0;
+			}
+		}
+		if (WeldItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
+			{
+				PageItem* ta = WeldItems.at(ttc);
+				for (int i = 0 ; i < ta->weldList.count(); i++)
+				{
+					PageItem::weldingInfo wInf = ta->weldList.at(i);
+					ta->weldList[i].weldItem = WeldID[wInf.weldID];
+				}
+			}
+		}
+		// reestablish textframe links
+		if (itemNext.count() != 0)
+		{
+			QMap<int,int>::Iterator lc;
+			for (lc = itemNext.begin(); lc != itemNext.end(); ++lc)
+			{
+				if (lc.value() >= 0)
+				{
+					PageItem * Its = m_Doc->DocItems.at(lc.key());
+					PageItem * Itn = m_Doc->DocItems.at(lc.value());
+					if (!Its->testLinkCandidate(Itn))
+					{
+						qDebug() << "scribus150format: corruption in linked textframes detected";
+						continue;
+					}
+					Its->link(Itn);
+				}
+			}
+		}
+		if (itemNextM.count() != 0)
+		{
+			QMap<int,int>::Iterator lc;
+			for (lc = itemNextM.begin(); lc != itemNextM.end(); ++lc)
+			{
+				if (lc.value() >= 0)
+				{
+					PageItem * Its = m_Doc->MasterItems.at(lc.key());
+					PageItem * Itn = m_Doc->MasterItems.at(lc.value());
+					if (!Its->testLinkCandidate(Itn))
+					{
+						qDebug() << "scribus150format: corruption in linked textframes detected";
+						continue;
+					}
+					Its->link(Itn);
+				}
 			}
 		}
 	}
@@ -894,6 +1024,7 @@
 				PageItem* cItem = gpL.at(id);
 				cItem->gXpos = cItem->xPos() - gItem->xPos();
 				cItem->gYpos = cItem->yPos() - gItem->yPos();
+				cItem->Parent = gItem;
 				if (gItem->rotation() != 0)
 				{
 					QTransform ma;
@@ -919,6 +1050,7 @@
 				PageItem* cItem = gpL.at(id);
 				cItem->gXpos = cItem->xPos() - gItem->xPos();
 				cItem->gYpos = cItem->yPos() - gItem->yPos();
+				cItem->Parent = gItem;
 				if (gItem->rotation() != 0)
 				{
 					QTransform ma;
@@ -944,6 +1076,7 @@
 				PageItem* cItem = gpL.at(id);
 				cItem->gXpos = cItem->xPos() - gItem->xPos();
 				cItem->gYpos = cItem->yPos() - gItem->yPos();
+				cItem->Parent = gItem;
 				if (gItem->rotation() != 0)
 				{
 					QTransform ma;
@@ -958,7 +1091,6 @@
 			gItem->groupItemList = gpL;
 		}
 	}
-	m_Doc->renumberItemsInListOrder();
 
 	if (m_Doc->Layers.count() == 0)
 		m_Doc->Layers.newLayer( QObject::tr("Background") );
@@ -986,10 +1118,11 @@
 	QMap<int, ScribusDoc::BookMa> bookmarks;
 
 	bool newVersion = false;
-
-	QMap<int,int> TableID;
-	QMap<int,int> TableIDM;
-	QMap<int,int> TableIDF;
+	isNewFormat = false;
+
+	QMap<int,PageItem*> TableID;
+	QMap<int,PageItem*> TableIDM;
+	QMap<int,PageItem*> TableIDF;
 	QList<PageItem*> TableItems;
 	QList<PageItem*> TableItemsM;
 	QList<PageItem*> TableItemsF;
@@ -1038,6 +1171,7 @@
 	TableIDF.clear();
 	WeldItems.clear();
 	WeldID.clear();
+	LinkID.clear();
 
 	m_Doc->GroupCounter = 1;
 	m_Doc->LastAuto = 0;
@@ -1223,50 +1357,56 @@
 				break;
 
 			// first of linked chain?
-			if (tagName == "PAGEOBJECT")
+			if (isNewFormat)
 			{
 				if (itemInfo.nextItem != -1)
-					itemNext[itemInfo.item->ItemNr] = itemInfo.nextItem;
-			}
-			else if (tagName == "MASTEROBJECT")
-			{
-				if (itemInfo.nextItem != -1)
-					itemNextM[itemInfo.item->ItemNr] = itemInfo.nextItem;
-			}
-			/* not sure if we want that...
-			else if (tagName == "FRAMEOBJECT")
-			{
-				if (itemInfo.nextItem != -1)
-					itemNextF[itemInfo.item->ItemNr] = itemInfo.nextItem;
-			}*/
-
-			if (itemInfo.item->isTableItem)
+					itemNext[itemInfo.itemID] = itemInfo.nextItem;
+				if (itemInfo.item->isTableItem)
+					TableItems.append(itemInfo.item);
+				if (itemInfo.isWeldFlag)
+					WeldItems.append(itemInfo.item);
+			}
+			else
 			{
 				if (tagName == "PAGEOBJECT")
 				{
-					TableItems.append(itemInfo.item);
-					TableID.insert(itemInfo.ownLink, itemInfo.item->ItemNr);
-				}
-				else if (tagName == "FRAMEOBJECT")
-				{
-					TableItemsF.append(itemInfo.item);
-					TableIDF.insert(itemInfo.ownLink, itemInfo.item->ItemNr);
-				}
-				else
-				{
-					TableItemsM.append(itemInfo.item);
-					TableIDM.insert(itemInfo.ownLink, itemInfo.item->ItemNr);
-				}
-			}
-			if (itemInfo.isWeldFlag)
-			{
-				WeldItems.append(itemInfo.item);
-				WeldID.insert(itemInfo.ownWeld, itemInfo.item);
+					if (itemInfo.nextItem != -1)
+						itemNext[itemInfo.ownNr] = itemInfo.nextItem;
+				}
+				else if (tagName == "MASTEROBJECT")
+				{
+					if (itemInfo.nextItem != -1)
+						itemNextM[itemInfo.ownNr] = itemInfo.nextItem;
+				}
+				if (itemInfo.item->isTableItem)
+				{
+					if (tagName == "PAGEOBJECT")
+					{
+						TableItems.append(itemInfo.item);
+						TableID.insert(itemInfo.ownLink, itemInfo.item);
+					}
+					else if (tagName == "FRAMEOBJECT")
+					{
+						TableItemsF.append(itemInfo.item);
+						TableIDF.insert(itemInfo.ownLink, itemInfo.item);
+					}
+					else
+					{
+						TableItemsM.append(itemInfo.item);
+						TableIDM.insert(itemInfo.ownLink, itemInfo.item);
+					}
+				}
+
+				if (itemInfo.isWeldFlag)
+				{
+					WeldItems.append(itemInfo.item);
+					WeldID.insert(itemInfo.ownWeld, itemInfo.item);
+				}
 			}
 			if (groupStack.count() > 0)
 			{
 				groupStack.top().append(itemInfo.item);
-				while (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
+				while (static_cast<int>(itemInfo.ownNr) == groupStack2.top())
 				{
 					if (tagName == "PAGEOBJECT")
 						groupStackP.push(groupStack.pop());
@@ -1284,7 +1424,7 @@
 				QList<PageItem*> GroupItems;
 				GroupItems.append(itemInfo.item);
 				groupStack.push(GroupItems);
-				groupStack2.push(itemInfo.groupLastItem + itemInfo.item->ItemNr);
+				groupStack2.push(itemInfo.groupLastItem + itemInfo.ownNr);
 			}
 		}
 		if (tagName == "Pattern")
@@ -1313,84 +1453,179 @@
 		}
 	}
 
-	if (TableItemsF.count() != 0)
-	{
-		for (int ttc = 0; ttc < TableItemsF.count(); ++ttc)
-		{
-			PageItem* ta = TableItemsF.at(ttc);
-			if (ta->TopLinkID != -1)
-				ta->TopLink = m_Doc->FrameItems.at(TableIDF[ta->TopLinkID]);
-			else
-				ta->TopLink = 0;
-			if (ta->LeftLinkID != -1)
-				ta->LeftLink = m_Doc->FrameItems.at(TableIDF[ta->LeftLinkID]);
-			else
-				ta->LeftLink = 0;
-			if (ta->RightLinkID != -1)
-				ta->RightLink = m_Doc->FrameItems.at(TableIDF[ta->RightLinkID]);
-			else
-				ta->RightLink = 0;
-			if (ta->BottomLinkID != -1)
-				ta->BottomLink = m_Doc->FrameItems.at(TableIDF[ta->BottomLinkID]);
-			else
-				ta->BottomLink = 0;
-		}
-	}
-	if (TableItemsM.count() != 0)
-	{
-		for (int ttc = 0; ttc < TableItemsM.count(); ++ttc)
-		{
-			PageItem* ta = TableItemsM.at(ttc);
-			if (ta->TopLinkID != -1)
-				ta->TopLink = m_Doc->MasterItems.at(TableIDM[ta->TopLinkID]);
-			else
-				ta->TopLink = 0;
-			if (ta->LeftLinkID != -1)
-				ta->LeftLink = m_Doc->MasterItems.at(TableIDM[ta->LeftLinkID]);
-			else
-				ta->LeftLink = 0;
-			if (ta->RightLinkID != -1)
-				ta->RightLink = m_Doc->MasterItems.at(TableIDM[ta->RightLinkID]);
-			else
-				ta->RightLink = 0;
-			if (ta->BottomLinkID != -1)
-				ta->BottomLink = m_Doc->MasterItems.at(TableIDM[ta->BottomLinkID]);
-			else
-				ta->BottomLink = 0;
-		}
-	}
-	if (TableItems.count() != 0)
-	{
-		for (int ttc = 0; ttc < TableItems.count(); ++ttc)
-		{
-			PageItem* ta = TableItems.at(ttc);
-			if (ta->TopLinkID != -1)
-				ta->TopLink = m_Doc->Items->at(TableID[ta->TopLinkID]);
-			else
-				ta->TopLink = 0;
-			if (ta->LeftLinkID != -1)
-				ta->LeftLink = m_Doc->Items->at(TableID[ta->LeftLinkID]);
-			else
-				ta->LeftLink = 0;
-			if (ta->RightLinkID != -1)
-				ta->RightLink = m_Doc->Items->at(TableID[ta->RightLinkID]);
-			else
-				ta->RightLink = 0;
-			if (ta->BottomLinkID != -1)
-				ta->BottomLink = m_Doc->Items->at(TableID[ta->BottomLinkID]);
-			else
-				ta->BottomLink = 0;
-		}
-	}
-	if (WeldItems.count() != 0)
-	{
-		for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
-		{
-			PageItem* ta = WeldItems.at(ttc);
-			for (int i = 0 ; i < ta->weldList.count(); i++)
-			{
-				PageItem::weldingInfo wInf = ta->weldList.at(i);
-				ta->weldList[i].weldItem = WeldID[wInf.weldID];
+	if (isNewFormat)
+	{
+		if (TableItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < TableItems.count(); ++ttc)
+			{
+				PageItem* ta = TableItems.at(ttc);
+				if (ta->TopLinkID != -1)
+					ta->TopLink = LinkID[ta->TopLinkID];
+				else
+					ta->TopLink = 0;
+				if (ta->LeftLinkID != -1)
+					ta->LeftLink = LinkID[ta->LeftLinkID];
+				else
+					ta->LeftLink = 0;
+				if (ta->RightLinkID != -1)
+					ta->RightLink = LinkID[ta->RightLinkID];
+				else
+					ta->RightLink = 0;
+				if (ta->BottomLinkID != -1)
+					ta->BottomLink = LinkID[ta->BottomLinkID];
+				else
+					ta->BottomLink = 0;
+			}
+		}
+		if (WeldItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
+			{
+				PageItem* ta = WeldItems.at(ttc);
+				for (int i = 0 ; i < ta->weldList.count(); i++)
+				{
+					PageItem::weldingInfo wInf = ta->weldList.at(i);
+					ta->weldList[i].weldItem = LinkID[wInf.weldID];
+				}
+			}
+		}
+		if (itemNext.count() != 0)
+		{
+			QMap<int,int>::Iterator lc;
+			for (lc = itemNext.begin(); lc != itemNext.end(); ++lc)
+			{
+				if (lc.value() >= 0)
+				{
+					PageItem * Its = LinkID[lc.key()];
+					PageItem * Itn = LinkID[lc.value()];
+					if (!Its->testLinkCandidate(Itn))
+					{
+						qDebug() << "scribus150format: corruption in linked textframes detected";
+						continue;
+					}
+					Its->link(Itn);
+				}
+			}
+		}
+	}
+	else
+	{
+		if (TableItemsF.count() != 0)
+		{
+			for (int ttc = 0; ttc < TableItemsF.count(); ++ttc)
+			{
+				PageItem* ta = TableItemsF.at(ttc);
+				if (ta->TopLinkID != -1)
+					ta->TopLink = TableIDF[ta->TopLinkID];
+				else
+					ta->TopLink = 0;
+				if (ta->LeftLinkID != -1)
+					ta->LeftLink = TableIDF[ta->LeftLinkID];
+				else
+					ta->LeftLink = 0;
+				if (ta->RightLinkID != -1)
+					ta->RightLink = TableIDF[ta->RightLinkID];
+				else
+					ta->RightLink = 0;
+				if (ta->BottomLinkID != -1)
+					ta->BottomLink = TableIDF[ta->BottomLinkID];
+				else
+					ta->BottomLink = 0;
+			}
+		}
+		if (TableItemsM.count() != 0)
+		{
+			for (int ttc = 0; ttc < TableItemsM.count(); ++ttc)
+			{
+				PageItem* ta = TableItemsM.at(ttc);
+				if (ta->TopLinkID != -1)
+					ta->TopLink = TableIDM[ta->TopLinkID];
+				else
+					ta->TopLink = 0;
+				if (ta->LeftLinkID != -1)
+					ta->LeftLink = TableIDM[ta->LeftLinkID];
+				else
+					ta->LeftLink = 0;
+				if (ta->RightLinkID != -1)
+					ta->RightLink = TableIDM[ta->RightLinkID];
+				else
+					ta->RightLink = 0;
+				if (ta->BottomLinkID != -1)
+					ta->BottomLink = TableIDM[ta->BottomLinkID];
+				else
+					ta->BottomLink = 0;
+			}
+		}
+		if (TableItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < TableItems.count(); ++ttc)
+			{
+				PageItem* ta = TableItems.at(ttc);
+				if (ta->TopLinkID != -1)
+					ta->TopLink = TableID[ta->TopLinkID];
+				else
+					ta->TopLink = 0;
+				if (ta->LeftLinkID != -1)
+					ta->LeftLink = TableID[ta->LeftLinkID];
+				else
+					ta->LeftLink = 0;
+				if (ta->RightLinkID != -1)
+					ta->RightLink = TableID[ta->RightLinkID];
+				else
+					ta->RightLink = 0;
+				if (ta->BottomLinkID != -1)
+					ta->BottomLink = TableID[ta->BottomLinkID];
+				else
+					ta->BottomLink = 0;
+			}
+		}
+		if (WeldItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
+			{
+				PageItem* ta = WeldItems.at(ttc);
+				for (int i = 0 ; i < ta->weldList.count(); i++)
+				{
+					PageItem::weldingInfo wInf = ta->weldList.at(i);
+					ta->weldList[i].weldItem = WeldID[wInf.weldID];
+				}
+			}
+		}
+		if (itemNext.count() != 0)
+		{
+			QMap<int,int>::Iterator lc;
+			for (lc = itemNext.begin(); lc != itemNext.end(); ++lc)
+			{
+				if (lc.value() >= 0)
+				{
+					PageItem * Its = m_Doc->DocItems.at(lc.key());
+					PageItem * Itn = m_Doc->DocItems.at(lc.value());
+					if (!Its->testLinkCandidate(Itn))
+					{
+						qDebug() << "scribus150format: corruption in linked textframes detected";
+						continue;
+					}
+					Its->link(Itn);
+				}
+			}
+		}
+		if (itemNextM.count() != 0)
+		{
+			QMap<int,int>::Iterator lc;
+			for (lc = itemNextM.begin(); lc != itemNextM.end(); ++lc)
+			{
+				if (lc.value() >= 0)
+				{
+					PageItem * Its = m_Doc->MasterItems.at(lc.key());
+					PageItem * Itn = m_Doc->MasterItems.at(lc.value());
+					if (!Its->testLinkCandidate(Itn))
+					{
+						qDebug() << "scribus150format: corruption in linked textframes detected";
+						continue;
+					}
+					Its->link(Itn);
+				}
 			}
 		}
 	}
@@ -1411,43 +1646,6 @@
 	if (m_Doc->Layers.count() == 0)
 		m_Doc->Layers.newLayer( QObject::tr("Background") );
 
-	// reestablish textframe links
-	if (itemNext.count() != 0)
-	{
-		QMap<int,int>::Iterator lc;
-		for (lc = itemNext.begin(); lc != itemNext.end(); ++lc)
-		{
-			if (lc.value() >= 0)
-			{
-				PageItem * Its = m_Doc->DocItems.at(lc.key());
-				PageItem * Itn = m_Doc->DocItems.at(lc.value());
-				if (!Its->testLinkCandidate(Itn))
-				{
-					qDebug() << "scribus150format: corruption in linked textframes detected";
-					continue;
-				}
-				Its->link(Itn);
-			}
-		}
-	}
-	if (itemNextM.count() != 0)
-	{
-		QMap<int,int>::Iterator lc;
-		for (lc = itemNextM.begin(); lc != itemNextM.end(); ++lc)
-		{
-			if (lc.value() >= 0)
-			{
-				PageItem * Its = m_Doc->MasterItems.at(lc.key());
-				PageItem * Itn = m_Doc->MasterItems.at(lc.value());
-				if (!Its->testLinkCandidate(Itn))
-				{
-					qDebug() << "scribus150format: corruption in linked textframes detected";
-					continue;
-				}
-				Its->link(Itn);
-			}
-		}
-	}
 	if (groupStackP.count() > 0)
 	{
 		while (groupStackP.count() > 0)
@@ -1459,6 +1657,7 @@
 				PageItem* cItem = gpL.at(id);
 				cItem->gXpos = cItem->xPos() - gItem->xPos();
 				cItem->gYpos = cItem->yPos() - gItem->yPos();
+				cItem->Parent = gItem;
 				if (gItem->rotation() != 0)
 				{
 					QTransform ma;
@@ -1484,6 +1683,7 @@
 				PageItem* cItem = gpL.at(id);
 				cItem->gXpos = cItem->xPos() - gItem->xPos();
 				cItem->gYpos = cItem->yPos() - gItem->yPos();
+				cItem->Parent = gItem;
 				if (gItem->rotation() != 0)
 				{
 					QTransform ma;
@@ -1509,6 +1709,7 @@
 				PageItem* cItem = gpL.at(id);
 				cItem->gXpos = cItem->xPos() - gItem->xPos();
 				cItem->gYpos = cItem->yPos() - gItem->yPos();
+				cItem->Parent = gItem;
 				if (gItem->rotation() != 0)
 				{
 					QTransform ma;
@@ -1523,7 +1724,6 @@
 			gItem->groupItemList = gpL;
 		}
 	}
-	m_Doc->renumberItemsInListOrder();
 	
 	// reestablish first/lastAuto
 	m_Doc->FirstAuto = m_Doc->LastAuto;
@@ -2715,11 +2915,16 @@
 
 	if (tagName == "FRAMEOBJECT")
 	{
-		doc->FrameItems.append(doc->Items->takeAt(newItem->ItemNr));
-		newItem->ItemNr = doc->FrameItems.count()-1;
+		doc->FrameItems.append(doc->Items->takeAt(doc->Items->indexOf(newItem)));
 	}
 
 	info.item     = newItem;
+	isNewFormat = attrs.hasAttribute("ItemID");
+	if (isNewFormat)
+	{
+		LinkID.insert(attrs.valueAsInt("ItemID", 0), newItem);
+		info.itemID = attrs.valueAsInt("ItemID", 0);
+	}
 	info.nextItem = attrs.valueAsInt("NEXTITEM", -1);
 	info.ownLink  = newItem->isTableItem ? attrs.valueAsInt("OwnLINK", 0) : 0;
 	info.groupLastItem = 0;
@@ -2728,6 +2933,7 @@
 		info.groupLastItem = attrs.valueAsInt("groupsLastItem", 0);
 	info.isWeldFlag = attrs.valueAsBool("isWeldItem", 0);
 	info.ownWeld = attrs.valueAsInt("WeldSource", 0);
+	info.ownNr = doc->Items->indexOf(newItem);
 
 	struct ImageLoadRequest loadingInfo;
 #ifdef HAVE_OSG
@@ -2976,6 +3182,7 @@
 				{
 					PageItem* currItem = GroupItems.at(as);
 					newItem->groupItemList.append(currItem);
+					currItem->Parent = newItem;
 				}
 				doc->Items = DItems;
 			}
@@ -3069,6 +3276,7 @@
 	ScXmlStreamAttributes attrs = reader.scAttributes();
 	QString patternName = attrs.valueAsString("Name");
 	bool success = true;
+	isNewFormat = false;
 
 	if (patternName.isEmpty())
 	{
@@ -3079,7 +3287,7 @@
 	QStack< QList<PageItem*> > groupStack;
 	QStack< QList<PageItem*> > groupStackP;
 	QStack<int> groupStack2;
-	QMap<int,int> TableID2;
+	QMap<int,PageItem*> TableID2;
 	QList<PageItem*> TableItems2;
 	QMap<int,PageItem*> WeldID;
 	QList<PageItem*> WeldItems;
@@ -3119,21 +3327,30 @@
 
 		itemInfo.item->OwnPage = ownPage;
 		itemInfo.item->OnMasterPage = "";
-
-		if (itemInfo.item->isTableItem)
-		{
-			TableItems2.append(itemInfo.item);
-			TableID2.insert(itemInfo.ownLink, itemInfo.item->ItemNr);
-		}
-		if (itemInfo.isWeldFlag)
-		{
-			WeldItems.append(itemInfo.item);
-			WeldID.insert(itemInfo.ownWeld, itemInfo.item);
+		if (isNewFormat)
+		{
+			if (itemInfo.item->isTableItem)
+				TableItems2.append(itemInfo.item);
+			if (itemInfo.isWeldFlag)
+				WeldItems.append(itemInfo.item);
+		}
+		else
+		{
+			if (itemInfo.item->isTableItem)
+			{
+				TableItems2.append(itemInfo.item);
+				TableID2.insert(itemInfo.ownLink, itemInfo.item);
+			}
+			if (itemInfo.isWeldFlag)
+			{
+				WeldItems.append(itemInfo.item);
+				WeldID.insert(itemInfo.ownWeld, itemInfo.item);
+			}
 		}
 		if (groupStack.count() > 0)
 		{
 			groupStack.top().append(itemInfo.item);
-			while (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
+			while (static_cast<int>(itemInfo.ownNr) == groupStack2.top())
 			{
 				groupStackP.push(groupStack.pop());
 				groupStack2.pop();
@@ -3146,7 +3363,7 @@
 			QList<PageItem*> GroupItems;
 			GroupItems.append(itemInfo.item);
 			groupStack.push(GroupItems);
-			groupStack2.push(itemInfo.groupLastItem + itemInfo.item->ItemNr);
+			groupStack2.push(itemInfo.groupLastItem + itemInfo.ownNr);
 		}
 	}
 
@@ -3156,38 +3373,79 @@
 	{
 		return false;
 	}
-	if (TableItems2.count() != 0)
-	{
-		for (int ttc = 0; ttc < TableItems2.count(); ++ttc)
-		{
-			PageItem* ta = TableItems2.at(ttc);
-			if (ta->TopLinkID != -1)
-				ta->TopLink = m_Doc->Items->at(TableID2[ta->TopLinkID]);
-			else
-				ta->TopLink = 0;
-			if (ta->LeftLinkID != -1)
-				ta->LeftLink = m_Doc->Items->at(TableID2[ta->LeftLinkID]);
-			else
-				ta->LeftLink = 0;
-			if (ta->RightLinkID != -1)
-				ta->RightLink = m_Doc->Items->at(TableID2[ta->RightLinkID]);
-			else
-				ta->RightLink = 0;
-			if (ta->BottomLinkID != -1)
-				ta->BottomLink = m_Doc->Items->at(TableID2[ta->BottomLinkID]);
-			else
-				ta->BottomLink = 0;
-		}
-	}
-	if (WeldItems.count() != 0)
-	{
-		for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
-		{
-			PageItem* ta = WeldItems.at(ttc);
-			for (int i = 0 ; i < ta->weldList.count(); i++)
-			{
-				PageItem::weldingInfo wInf = ta->weldList.at(i);
-				ta->weldList[i].weldItem = WeldID[wInf.weldID];
+	if (isNewFormat)
+	{
+		if (TableItems2.count() != 0)
+		{
+			for (int ttc = 0; ttc < TableItems2.count(); ++ttc)
+			{
+				PageItem* ta = TableItems2.at(ttc);
+				if (ta->TopLinkID != -1)
+					ta->TopLink = LinkID[ta->TopLinkID];
+				else
+					ta->TopLink = 0;
+				if (ta->LeftLinkID != -1)
+					ta->LeftLink = LinkID[ta->LeftLinkID];
+				else
+					ta->LeftLink = 0;
+				if (ta->RightLinkID != -1)
+					ta->RightLink = LinkID[ta->RightLinkID];
+				else
+					ta->RightLink = 0;
+				if (ta->BottomLinkID != -1)
+					ta->BottomLink = LinkID[ta->BottomLinkID];
+				else
+					ta->BottomLink = 0;
+			}
+		}
+		if (WeldItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
+			{
+				PageItem* ta = WeldItems.at(ttc);
+				for (int i = 0 ; i < ta->weldList.count(); i++)
+				{
+					PageItem::weldingInfo wInf = ta->weldList.at(i);
+					ta->weldList[i].weldItem = LinkID[wInf.weldID];
+				}
+			}
+		}
+	}
+	else
+	{
+		if (TableItems2.count() != 0)
+		{
+			for (int ttc = 0; ttc < TableItems2.count(); ++ttc)
+			{
+				PageItem* ta = TableItems2.at(ttc);
+				if (ta->TopLinkID != -1)
+					ta->TopLink = TableID2[ta->TopLinkID];
+				else
+					ta->TopLink = 0;
+				if (ta->LeftLinkID != -1)
+					ta->LeftLink = TableID2[ta->LeftLinkID];
+				else
+					ta->LeftLink = 0;
+				if (ta->RightLinkID != -1)
+					ta->RightLink = TableID2[ta->RightLinkID];
+				else
+					ta->RightLink = 0;
+				if (ta->BottomLinkID != -1)
+					ta->BottomLink = TableID2[ta->BottomLinkID];
+				else
+					ta->BottomLink = 0;
+			}
+		}
+		if (WeldItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
+			{
+				PageItem* ta = WeldItems.at(ttc);
+				for (int i = 0 ; i < ta->weldList.count(); i++)
+				{
+					PageItem::weldingInfo wInf = ta->weldList.at(i);
+					ta->weldList[i].weldItem = WeldID[wInf.weldID];
+				}
 			}
 		}
 	}
@@ -3202,6 +3460,7 @@
 				PageItem* cItem = gpL.at(id);
 				cItem->gXpos = cItem->xPos() - gItem->xPos();
 				cItem->gYpos = cItem->yPos() - gItem->yPos();
+				cItem->Parent = gItem;
 				if (gItem->rotation() != 0)
 				{
 					QTransform ma;
@@ -3216,7 +3475,6 @@
 			gItem->groupItemList = gpL;
 		}
 	}
-	m_Doc->renumberItemsInListOrder();
 
 	uint itemCount2 = m_Doc->Items->count();
 	if (itemCount2 > itemCount1)
@@ -3230,7 +3488,6 @@
 			newItem->moveBy(pat.xoffset, pat.yoffset, true);
 			newItem->gXpos += pat.xoffset;
 			newItem->gYpos += pat.yoffset;
-			newItem->ItemNr = pat.items.count();
 			pat.items.append(newItem);
 		}
 	}
@@ -3288,8 +3545,11 @@
 
 		int pos = obj->itemText.length();
 		if (ch == SpecialChars::OBJECT) {
-			if (iobj != -1) {
-				obj->itemText.insertObject(pos, doc->FrameItems.at(iobj));
+			if (iobj >= 0) {
+				if (iobj < doc->FrameItems.count())
+					obj->itemText.insertObject(pos, LinkID[iobj]);
+				else
+					qDebug() << QString("scribus150format: invalid inline frame used in text object : %1").arg(iobj);
 			}
 		}
 		else if (ch == SpecialChars::SHYPHEN && pos > 0)
@@ -3764,7 +4024,7 @@
 			currItem->EmProfile   = attrs.valueAsString("EPROF", "");
 			currItem->IRender     = (eRenderIntent) attrs.valueAsInt("IRENDER" , 1);
 			currItem->UseEmbedded = attrs.valueAsInt("EMBEDDED", 1);
-			doc->LoadPict(currItem->Pfile, z);
+			doc->loadPict(currItem->Pfile, currItem);
 			currItem->setImageXYScale(scx, scy);
 			currItem->setImageShown( attrs.valueAsInt("PICART"));
 /*			currItem->BBoxX = ScCLocale::toDoubleC( obj->attribute("BBOXX"));
@@ -4215,7 +4475,7 @@
 	ScPage* newPage = NULL;
 	
 	QString tmp;
-	QMap<int,int> TableID;
+	QMap<int,PageItem*> TableID;
 	QList<PageItem*> TableItems;
 	QMap<int,PageItem*> WeldID;
 	QList<PageItem*> WeldItems;
@@ -4258,6 +4518,7 @@
 
 	bool firstElement = true;
 	bool success = true;
+	isNewFormat = false;
 	
 	ScXmlStreamReader reader(f);
 	ScXmlStreamAttributes attrs;
@@ -4423,19 +4684,6 @@
 			}
 			else
 			{
-				// first of linked chain?
-				if (tagName == "PAGEOBJECT")
-				{
-					itemRemap[itemCount++] = m_Doc->DocItems.count();
-					if (attrs.valueAsInt("NEXTITEM", -1) != -1)
-						itemNext[m_Doc->DocItems.count()] = attrs.valueAsInt("NEXTITEM");
-				}
-				else if (tagName == "MASTEROBJECT")
-				{
-					itemRemapM[itemCountM++] = m_Doc->MasterItems.count();
-					if (attrs.valueAsInt("NEXTITEM", -1) != -1)
-						itemNextM[m_Doc->MasterItems.count()] = attrs.valueAsInt("NEXTITEM");
-				}
 
 				ItemInfo itemInfo;
 				success = readObject(m_Doc, reader, itemInfo, fileDir, true);
@@ -4447,26 +4695,49 @@
 				if (tagName == "PAGEOBJECT")
 					newItem->OnMasterPage = "";
 				newItem->LayerID = layerTrans.value(newItem->LayerID, newItem->LayerID);
-
-				if (newItem->isTableItem)
-				{
-					TableItems.append(newItem);
-					TableID.insert(itemInfo.ownLink, newItem->ItemNr);
-				}
-				if (itemInfo.isWeldFlag)
-				{
-					WeldItems.append(itemInfo.item);
-					WeldID.insert(itemInfo.ownWeld, itemInfo.item);
+				if (isNewFormat)
+				{
+					if (itemInfo.nextItem != -1)
+						itemNext[itemInfo.itemID] = itemInfo.nextItem;
+					if (itemInfo.item->isTableItem)
+						TableItems.append(itemInfo.item);
+					if (itemInfo.isWeldFlag)
+						WeldItems.append(itemInfo.item);
+				}
+				else
+				{
+					// first of linked chain?
+					if (tagName == "PAGEOBJECT")
+					{
+						itemRemap[itemCount++] = m_Doc->DocItems.count();
+						if (attrs.valueAsInt("NEXTITEM", -1) != -1)
+							itemNext[m_Doc->DocItems.count()] = attrs.valueAsInt("NEXTITEM");
+					}
+					else if (tagName == "MASTEROBJECT")
+					{
+						itemRemapM[itemCountM++] = m_Doc->MasterItems.count();
+						if (attrs.valueAsInt("NEXTITEM", -1) != -1)
+							itemNextM[m_Doc->MasterItems.count()] = attrs.valueAsInt("NEXTITEM");
+					}
+					if (newItem->isTableItem)
+					{
+						TableItems.append(newItem);
+						TableID.insert(itemInfo.ownLink, newItem);
+					}
+					if (itemInfo.isWeldFlag)
+					{
+						WeldItems.append(itemInfo.item);
+						WeldID.insert(itemInfo.ownWeld, itemInfo.item);
+					}
 				}
 				if (tagName == "FRAMEOBJECT")
 				{
-					m_Doc->FrameItems.append(m_Doc->Items->takeAt(newItem->ItemNr));
-					newItem->ItemNr = m_Doc->FrameItems.count()-1;
+					m_Doc->FrameItems.append(m_Doc->Items->takeAt(m_Doc->Items->indexOf(newItem)));
 				}
 				if (groupStack.count() > 0)
 				{
 					groupStack.top().append(itemInfo.item);
-					while (static_cast<int>(itemInfo.item->ItemNr) == groupStack2.top())
+					while (static_cast<int>(itemInfo.ownNr) == groupStack2.top())
 					{
 						if (tagName == "PAGEOBJECT")
 							groupStackP.push(groupStack.pop());
@@ -4484,7 +4755,7 @@
 					QList<PageItem*> GroupItems;
 					GroupItems.append(itemInfo.item);
 					groupStack.push(GroupItems);
-					groupStack2.push(itemInfo.groupLastItem + itemInfo.item->ItemNr);
+					groupStack2.push(itemInfo.groupLastItem + itemInfo.ownNr);
 				}
 			}
 		}
@@ -4503,59 +4774,57 @@
 		if (elem < m_Doc->Items->count())
 		{
 			ScribusDoc::BookMa bookmark = it.value();
-			bookmark.PageObject = m_Doc->Items->at(elem);
+			bookmark.PageObject = LinkID[elem];
 			m_Doc->BookMarks.append( bookmark );
 		}
 	}
 
-	if (TableItems.count() != 0)
-	{
-		for (int ttc = 0; ttc < TableItems.count(); ++ttc)
-		{
-			PageItem* ta = TableItems.at(ttc);
-			if (ta->TopLinkID != -1)
-				ta->TopLink = m_Doc->Items->at(TableID[ta->TopLinkID]);
-			else
-				ta->TopLink = 0;
-			if (ta->LeftLinkID != -1)
-				ta->LeftLink = m_Doc->Items->at(TableID[ta->LeftLinkID]);
-			else
-				ta->LeftLink = 0;
-			if (ta->RightLinkID != -1)
-				ta->RightLink = m_Doc->Items->at(TableID[ta->RightLinkID]);
-			else
-				ta->RightLink = 0;
-			if (ta->BottomLinkID != -1)
-				ta->BottomLink = m_Doc->Items->at(TableID[ta->BottomLinkID]);
-			else
-				ta->BottomLink = 0;
-		}
-	}
-	if (WeldItems.count() != 0)
-	{
-//		QList<PageItem*> docList = m_Doc->getAllItems(*m_Doc->Items);
-		for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
-		{
-			PageItem* ta = WeldItems.at(ttc);
-			for (int i = 0 ; i < ta->weldList.count(); i++)
-			{
-				PageItem::weldingInfo wInf = ta->weldList.at(i);
-				ta->weldList[i].weldItem = WeldID[wInf.weldID];
-			}
-		}
-	}
-	// reestablish textframe links
-	if (itemNext.count() != 0 && !Mpage)
-	{
-		QMap<int,int>::Iterator lc;
-		for (lc = itemNext.begin(); lc != itemNext.end(); ++lc)
-		{
-			if (itemRemap[lc.value()] >= 0)
-			{
-				if ((lc.key() < m_Doc->Items->count()) && (itemRemap[lc.value()] < m_Doc->Items->count()))
-				{
-					PageItem * Its = m_Doc->DocItems.at(lc.key());
-					PageItem * Itn = m_Doc->DocItems.at(itemRemap[lc.value()]);
+	if (isNewFormat)
+	{
+		if (TableItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < TableItems.count(); ++ttc)
+			{
+				PageItem* ta = TableItems.at(ttc);
+				if (ta->TopLinkID != -1)
+					ta->TopLink = LinkID[ta->TopLinkID];
+				else
+					ta->TopLink = 0;
+				if (ta->LeftLinkID != -1)
+					ta->LeftLink = LinkID[ta->LeftLinkID];
+				else
+					ta->LeftLink = 0;
+				if (ta->RightLinkID != -1)
+					ta->RightLink = LinkID[ta->RightLinkID];
+				else
+					ta->RightLink = 0;
+				if (ta->BottomLinkID != -1)
+					ta->BottomLink = LinkID[ta->BottomLinkID];
+				else
+					ta->BottomLink = 0;
+			}
+		}
+		if (WeldItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
+			{
+				PageItem* ta = WeldItems.at(ttc);
+				for (int i = 0 ; i < ta->weldList.count(); i++)
+				{
+					PageItem::weldingInfo wInf = ta->weldList.at(i);
+					ta->weldList[i].weldItem = LinkID[wInf.weldID];
+				}
+			}
+		}
+		if (itemNext.count() != 0)
+		{
+			QMap<int,int>::Iterator lc;
+			for (lc = itemNext.begin(); lc != itemNext.end(); ++lc)
+			{
+				if (lc.value() >= 0)
+				{
+					PageItem * Its = LinkID[lc.key()];
+					PageItem * Itn = LinkID[lc.value()];
 					if (!Its->testLinkCandidate(Itn))
 					{
 						qDebug() << "scribus150format: corruption in linked textframes detected";
@@ -4566,23 +4835,83 @@
 			}
 		}
 	}
-	else if (itemNextM.count() != 0 && Mpage)
-	{
-		QMap<int,int>::Iterator lc;
-		for (lc = itemNextM.begin(); lc != itemNextM.end(); ++lc)
-		{
-			if (itemRemapM[lc.value()] >= 0)
-			{
-				if ((lc.key() < m_Doc->MasterItems.count()) && (itemRemapM[lc.value()] < m_Doc->MasterItems.count()))
-				{
-					PageItem * Its = m_Doc->MasterItems.at(lc.key());
-					PageItem * Itn = m_Doc->MasterItems.at(itemRemapM[lc.value()]);
-					if (!Its->testLinkCandidate(Itn))
+	else
+	{
+		if (TableItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < TableItems.count(); ++ttc)
+			{
+				PageItem* ta = TableItems.at(ttc);
+				if (ta->TopLinkID != -1)
+					ta->TopLink = TableID[ta->TopLinkID];
+				else
+					ta->TopLink = 0;
+				if (ta->LeftLinkID != -1)
+					ta->LeftLink = TableID[ta->LeftLinkID];
+				else
+					ta->LeftLink = 0;
+				if (ta->RightLinkID != -1)
+					ta->RightLink = TableID[ta->RightLinkID];
+				else
+					ta->RightLink = 0;
+				if (ta->BottomLinkID != -1)
+					ta->BottomLink = TableID[ta->BottomLinkID];
+				else
+					ta->BottomLink = 0;
+			}
+		}
+		if (WeldItems.count() != 0)
+		{
+			for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
+			{
+				PageItem* ta = WeldItems.at(ttc);
+				for (int i = 0 ; i < ta->weldList.count(); i++)
+				{
+					PageItem::weldingInfo wInf = ta->weldList.at(i);
+					ta->weldList[i].weldItem = WeldID[wInf.weldID];
+				}
+			}
+		}
+		// reestablish textframe links
+		if (itemNext.count() != 0 && !Mpage)
+		{
+			QMap<int,int>::Iterator lc;
+			for (lc = itemNext.begin(); lc != itemNext.end(); ++lc)
+			{
+				if (itemRemap[lc.value()] >= 0)
+				{
+					if ((lc.key() < m_Doc->Items->count()) && (itemRemap[lc.value()] < m_Doc->Items->count()))
 					{
-						qDebug() << "scribus150format: corruption in linked textframes detected";
-						continue;
+						PageItem * Its = m_Doc->DocItems.at(lc.key());
+						PageItem * Itn = m_Doc->DocItems.at(itemRemap[lc.value()]);
+						if (!Its->testLinkCandidate(Itn))
+						{
+							qDebug() << "scribus150format: corruption in linked textframes detected";
+							continue;
+						}
+						Its->link(Itn);
 					}
-					Its->link(Itn);
+				}
+			}
+		}
+		else if (itemNextM.count() != 0 && Mpage)
+		{
+			QMap<int,int>::Iterator lc;
+			for (lc = itemNextM.begin(); lc != itemNextM.end(); ++lc)
+			{
+				if (itemRemapM[lc.value()] >= 0)
+				{
+					if ((lc.key() < m_Doc->MasterItems.count()) && (itemRemapM[lc.value()] < m_Doc->MasterItems.count()))
+					{
+						PageItem * Its = m_Doc->MasterItems.at(lc.key());
+						PageItem * Itn = m_Doc->MasterItems.at(itemRemapM[lc.value()]);
+						if (!Its->testLinkCandidate(Itn))
+						{
+							qDebug() << "scribus150format: corruption in linked textframes detected";
+							continue;
+						}
+						Its->link(Itn);
+					}
 				}
 			}
 		}
@@ -4598,6 +4927,7 @@
 				PageItem* cItem = gpL.at(id);
 				cItem->gXpos = cItem->xPos() - gItem->xPos();
 				cItem->gYpos = cItem->yPos() - gItem->yPos();
+				cItem->Parent = gItem;
 				if (gItem->rotation() != 0)
 				{
 					QTransform ma;
@@ -4623,6 +4953,7 @@
 				PageItem* cItem = gpL.at(id);
 				cItem->gXpos = cItem->xPos() - gItem->xPos();
 				cItem->gYpos = cItem->yPos() - gItem->yPos();
+				cItem->Parent = gItem;
 				if (gItem->rotation() != 0)
 				{
 					QTransform ma;
@@ -4637,7 +4968,6 @@
 			gItem->groupItemList = gpL;
 		}
 	}
-	m_Doc->renumberItemsInListOrder();
 	
 	// reestablish first/lastAuto
 	m_Doc->FirstAuto = m_Doc->LastAuto;

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.h
==============================================================================
--- branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.h (original)
+++ branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.h Sun Nov  6 22:52:15 2011
@@ -74,12 +74,14 @@
 		class ItemInfo
 		{
 		public:
-			ItemInfo(void) { groupLastItem = nextItem = ownLink = ownWeld = 0; item = NULL; isGroupFlag = isWeldFlag = false; };
+			ItemInfo(void) { groupLastItem = nextItem = ownLink = ownWeld = ownNr = itemID = 0; item = NULL; isGroupFlag = isWeldFlag = false; };
 			PageItem* item;
 			int groupLastItem;
 			int nextItem;
 			int ownLink;
 			int ownWeld;
+			int ownNr;
+			int itemID;
 			bool isGroupFlag;
 			bool isWeldFlag;
 		};
@@ -161,6 +163,7 @@
 		QMap<int, int> itemNextF;
 		QMap<int, int> itemRemapM;
 		QMap<int, int> itemNextM;
+		QMap<int,PageItem*> LinkID;
 		QMap<PageItem*, QString> itemsWeld;  //item* and master name
 
 		int itemCount;
@@ -172,6 +175,7 @@
 		double Yp;
 		double GrY;
 		QString clipPath;
+		bool isNewFormat;
 };
 
 extern "C" PLUGIN_API int scribus150format_getPluginAPIVersion();

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Sun Nov  6 22:52:15 2011
@@ -488,7 +488,7 @@
 		docu.writeAttribute("Text",(*itbm).Text);
 		docu.writeAttribute("Aktion",(*itbm).Aktion);
 		docu.writeAttribute("ItemNr", (*itbm).ItemNr);
-		docu.writeAttribute("Element", (*itbm).PageObject->ItemNr);
+		docu.writeAttribute("Element", qHash((*itbm).PageObject));
 		docu.writeAttribute("First", (*itbm).First);
 		docu.writeAttribute("Last", (*itbm).Last);
 		docu.writeAttribute("Prev", (*itbm).Prev);
@@ -1363,7 +1363,7 @@
 				putCStyle(docu, lastStyle);
 			tmpnum.setNum(ch.unicode());
 			docu.writeAttribute("Unicode", tmpnum);
-			docu.writeAttribute("COBJ", item->itemText.object(k).getItem()->ItemNr);
+			docu.writeAttribute("COBJ", qHash(item->itemText.object(k).getItem()));
 		}
 		else if (ch == SpecialChars::PARSEP)	// stores also the paragraphstyle for preceding chars
 			putPStyle(docu, item->itemText.paragraphStyle(k), "para");
@@ -1658,12 +1658,12 @@
 		if (item->asTextFrame() || item->asPathText() || item->asImageFrame())
 		{
 			if (item->nextInChain() != 0)
-				docu.writeAttribute("NEXTITEM", item->nextInChain()->ItemNr);
+				docu.writeAttribute("NEXTITEM", qHash(item->nextInChain()));
 			else
 				docu.writeAttribute("NEXTITEM", -1);
 			
 			if (item->prevInChain() != 0 && items->contains(item->prevInChain()))
-				docu.writeAttribute("BACKITEM", item->prevInChain()->ItemNr);
+				docu.writeAttribute("BACKITEM", qHash(item->prevInChain()));
 			else
 			{
 				docu.writeAttribute("BACKITEM", -1);
@@ -2006,12 +2006,12 @@
 		if (item->isWelded())
 		{
 			docu.writeAttribute("isWeldItem", 1);
-			docu.writeAttribute("WeldSource", item->uniqueNr);
+			docu.writeAttribute("WeldSource", qHash(item));
 			for (int i = 0 ; i <  item->weldList.count(); i++)
 			{
 				PageItem::weldingInfo wInf = item->weldList.at(i);
 				docu.writeEmptyElement("WeldEntry");
-				docu.writeAttribute("Target", wInf.weldItem->uniqueNr);
+				docu.writeAttribute("Target", qHash(wInf.weldItem));
 				docu.writeAttribute("WX", wInf.weldPoint.x());
 				docu.writeAttribute("WY", wInf.weldPoint.y());
 			}
@@ -2026,6 +2026,7 @@
 	QString tmp, tmpy;
 	if (newFormat)
 		docu.writeAttribute("OwnPage", item->OwnPage);
+	docu.writeAttribute("ItemID", qHash(item));
 	docu.writeAttribute("PTYPE",item->realItemType());
 	docu.writeAttribute("WIDTH",item->width());
 	docu.writeAttribute("HEIGHT",item->height());
@@ -2321,22 +2322,22 @@
 		docu.writeAttribute("RightLine", static_cast<int>(item->RightLine));
 		docu.writeAttribute("BottomLine", static_cast<int>(item->BottomLine));
 		if (item->TopLink != 0)
-			docu.writeAttribute("TopLINK", item->TopLink->ItemNr);
+			docu.writeAttribute("TopLINK", qHash(item->TopLink));
 		else
 			docu.writeAttribute("TopLINK", -1);
 		if (item->LeftLink != 0)
-			docu.writeAttribute("LeftLINK", item->LeftLink->ItemNr);
+			docu.writeAttribute("LeftLINK", qHash(item->LeftLink));
 		else
 			docu.writeAttribute("LeftLINK", -1);
 		if (item->RightLink != 0)
-			docu.writeAttribute("RightLINK", item->RightLink->ItemNr);
+			docu.writeAttribute("RightLINK", qHash(item->RightLink));
 		else
 			docu.writeAttribute("RightLINK", -1);
 		if (item->BottomLink != 0)
-			docu.writeAttribute("BottomLINK", item->BottomLink->ItemNr);
+			docu.writeAttribute("BottomLINK", qHash(item->BottomLink));
 		else
 			docu.writeAttribute("BottomLINK", -1);
-		docu.writeAttribute("OwnLINK", item->ItemNr);
+		docu.writeAttribute("OwnLINK", qHash(item));
 	}
 
 	if (item->isTable())

Modified: branches/ScribusOIF/scribus/plugins/gettext/htmlim/htmlreader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/gettext/htmlim/htmlreader.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/gettext/htmlim/htmlreader.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/gettext/htmlim/htmlreader.cpp Sun Nov  6 22:52:15 2011
@@ -47,6 +47,9 @@
 	inH1 = false;
 	inH2 = false;
 	inH3 = false;
+	inH4 = false;
+	inH5 = false;
+	inH6 = false;
 	inA = false;
 	inCode = false;
 	inBody = false;
@@ -79,6 +82,18 @@
 	pstyleli->setName("HTML_li_level-0");
 	listStyles.push_back(pstyleli);
 	nextItemNumbers.push_back(1);
+	pstyleh6 = new gtParagraphStyle(*pstyle);
+	pstyleh6->getFont()->setSize(pstyle->getFont()->getSize() + 2.5);
+	pstyleh6->getFont()->setWeight(BOLD);
+	pstyleh6->setSpaceAbove(2.5);
+	pstyleh6->setSpaceBelow(1.25);
+	pstyleh6->setName("HTML_h6");
+	pstyleh5 = new gtParagraphStyle(*pstyle);
+	pstyleh5->getFont()->setSize(pstyle->getFont()->getSize() + 5);
+	pstyleh5->getFont()->setWeight(BOLD);
+	pstyleh5->setSpaceAbove(5.0);
+	pstyleh5->setSpaceBelow(2.5);
+	pstyleh5->setName("HTML_h5");
 	pstyleh4 = new gtParagraphStyle(*pstyle);
 	pstyleh4->getFont()->setSize(pstyle->getFont()->getSize() + 10);
 	pstyleh4->getFont()->setWeight(BOLD);
@@ -182,6 +197,10 @@
 		inH3 = true;
 	else if (name == "h4")
 		inH4 = true;
+	else if (name == "h5")
+		inH5 = true;
+	else if (name == "h6")
+		inH6 = true;
 	else if ((name == "b") || (name == "strong"))
 		setBoldFont();
 	else if ((name == "i") || (name == "em"))
@@ -287,6 +306,10 @@
 			writer->append(tmp, pstyleh3);
 		else if (inH4)
 			writer->append(tmp, pstyleh4);
+		else if (inH5)
+			writer->append(tmp, pstyleh5);
+		else if (inH6)
+			writer->append(tmp, pstyleh6);
 		else if (inCenter)
 			writer->append(tmp, pstylec);
 		else if (inCode)
@@ -406,22 +429,32 @@
 	else if (name == "h1")
 	{
 		inH1 = false;
-		writer->append("\n");
+		writer->append("\n", pstyleh1);
 	}
 	else if (name == "h2")
 	{
 		inH2 = false;
-		writer->append("\n");
+		writer->append("\n", pstyleh2);
 	}
 	else if (name == "h3")
 	{
 		inH3 = false;
-		writer->append("\n");
+		writer->append("\n", pstyleh3);
 	}
 	else if (name == "h4")
 	{
 		inH4 = false;
-		writer->append("\n");
+		writer->append("\n", pstyleh4);
+	}
+	else if (name == "h5")
+	{
+		inH5 = false;
+		writer->append("\n", pstyleh5);
+	}
+	else if (name == "h6")
+	{
+		inH6 = false;
+		writer->append("\n", pstyleh6);
 	}
 	else if ((name == "b") || (name == "strong"))
 		unSetBoldFont();
@@ -459,6 +492,8 @@
 	pstyleh2->getFont()->toggleEffect(e);
 	pstyleh3->getFont()->toggleEffect(e);
 	pstyleh4->getFont()->toggleEffect(e);
+	pstyleh5->getFont()->toggleEffect(e);
+	pstyleh6->getFont()->toggleEffect(e);
 	pstylecode->getFont()->toggleEffect(e);
 	pstylep->getFont()->toggleEffect(e);
 	pstylepre->getFont()->toggleEffect(e);
@@ -474,6 +509,8 @@
 	pstyleh2->getFont()->setSlant(ITALIC);
 	pstyleh3->getFont()->setSlant(ITALIC);
 	pstyleh4->getFont()->setSlant(ITALIC);
+	pstyleh5->getFont()->setSlant(ITALIC);
+	pstyleh6->getFont()->setSlant(ITALIC);
 	pstylecode->getFont()->setSlant(ITALIC);
 	pstylep->getFont()->setSlant(ITALIC);
 	pstylepre->getFont()->setSlant(ITALIC);
@@ -489,6 +526,8 @@
 	pstyleh2->getFont()->setSlant(defaultSlant);
 	pstyleh3->getFont()->setSlant(defaultSlant);
 	pstyleh4->getFont()->setSlant(defaultSlant);
+	pstyleh5->getFont()->setSlant(defaultSlant);
+	pstyleh6->getFont()->setSlant(defaultSlant);
 	pstylecode->getFont()->setSlant(defaultSlant);
 	pstylep->getFont()->setSlant(defaultSlant);
 	pstylepre->getFont()->setSlant(defaultSlant);
@@ -504,6 +543,8 @@
 	pstyleh2->getFont()->setColor("Blue");
 	pstyleh3->getFont()->setColor("Blue");
 	pstyleh4->getFont()->setColor("Blue");
+	pstyleh5->getFont()->setColor("Blue");
+	pstyleh6->getFont()->setColor("Blue");
 	pstylecode->getFont()->setColor("Blue");
 	pstylep->getFont()->setColor("Blue");
 	pstylepre->getFont()->setColor("Blue");
@@ -519,6 +560,8 @@
 	pstyleh2->getFont()->setColor(defaultColor);
 	pstyleh3->getFont()->setColor(defaultColor);
 	pstyleh4->getFont()->setColor(defaultColor);
+	pstyleh5->getFont()->setColor(defaultColor);
+	pstyleh6->getFont()->setColor(defaultColor);
 	pstylecode->getFont()->setColor(defaultColor);
 	pstylep->getFont()->setColor(defaultColor);
 	pstylepre->getFont()->setColor(defaultColor);
@@ -623,6 +666,8 @@
 	delete pstyleh2;
 	delete pstyleh3;
 	delete pstyleh4;
+	delete pstyleh5;
+	delete pstyleh6;
 	delete pstylecode;
 	delete pstylep;
 	delete pstylepre;

Modified: branches/ScribusOIF/scribus/plugins/gettext/htmlim/htmlreader.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/gettext/htmlim/htmlreader.h
==============================================================================
--- branches/ScribusOIF/scribus/plugins/gettext/htmlim/htmlreader.h (original)
+++ branches/ScribusOIF/scribus/plugins/gettext/htmlim/htmlreader.h Sun Nov  6 22:52:15 2011
@@ -64,6 +64,8 @@
 	gtParagraphStyle *pstyleh2;
 	gtParagraphStyle *pstyleh3;
 	gtParagraphStyle *pstyleh4;
+	gtParagraphStyle *pstyleh5;
+	gtParagraphStyle *pstyleh6;
 	gtParagraphStyle *pstylecode;
 	gtParagraphStyle *pstylep;
 	gtParagraphStyle *pstylepre;
@@ -77,6 +79,8 @@
 	bool inH2;
 	bool inH3;
 	bool inH4;
+	bool inH5;
+	bool inH6;
 	bool inA;
 	bool inCenter;
 	bool inCode;

Modified: branches/ScribusOIF/scribus/plugins/import/ai/importai.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/import/ai/importai.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/ai/importai.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/ai/importai.cpp Sun Nov  6 22:52:15 2011
@@ -497,7 +497,6 @@
 				m_Doc->m_Selection->delaySignalsOn();
 				for (int dre=0; dre<Elements.count(); ++dre)
 				{
-					m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
 					tmpSel->addItem(Elements.at(dre), true);
 				}
 				tmpSel->setGroupRect();
@@ -1439,7 +1438,7 @@
 					QString imgName = getLongPathName(ite->tempImageFile->fileName());
 					ite->tempImageFile->close();
 					ite->isInlineImage = true;
-					m_Doc->LoadPict(imgName, z);
+					m_Doc->loadPict(imgName, ite);
 					if (ite->PictureIsAvailable)
 						ite->setImageXYScale(ite->width() / ite->pixm.width(), ite->height() / ite->pixm.height());
 					ite->setImageFlippedV(true);
@@ -3092,7 +3091,7 @@
 		}
 		TIFFClose(tif);
 	}
-	m_Doc->LoadPict(imgName, z);
+	m_Doc->loadPict(imgName, ite);
 	if (ite->PictureIsAvailable)
 		ite->setImageXYScale(ite->width() / ite->pixm.width(), ite->height() / ite->pixm.height());
 	if (importerFlags & LoadSavePlugin::lfCreateDoc)

Modified: branches/ScribusOIF/scribus/plugins/import/cgm/importcgm.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/import/cgm/importcgm.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/cgm/importcgm.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/cgm/importcgm.cpp Sun Nov  6 22:52:15 2011
@@ -260,7 +260,6 @@
 				m_Doc->m_Selection->delaySignalsOn();
 				for (int dre=0; dre<Elements.count(); ++dre)
 				{
-					m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
 					tmpSel->addItem(Elements.at(dre), true);
 				}
 				tmpSel->setGroupRect();
@@ -1259,7 +1258,7 @@
 		ite->tempImageFile->close();
 		ite->isInlineImage = true;
 		image.save(fileName, "PNG");
-		m_Doc->LoadPict(fileName, z);
+		m_Doc->loadPict(fileName, ite);
 		ite->setImageScalingMode(false, false);
 	}
 	else if (elemID == 10)

Modified: branches/ScribusOIF/scribus/plugins/import/cvg/importcvg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/import/cvg/importcvg.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/cvg/importcvg.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/cvg/importcvg.cpp Sun Nov  6 22:52:15 2011
@@ -257,7 +257,6 @@
 				m_Doc->m_Selection->delaySignalsOn();
 				for (int dre=0; dre<Elements.count(); ++dre)
 				{
-					m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
 					tmpSel->addItem(Elements.at(dre), true);
 				}
 				tmpSel->setGroupRect();
@@ -334,7 +333,7 @@
 bool CvgPlug::convert(QString fn)
 {
 	QString tmp;
-	CurrColorFill = "White";
+	CurrColorFill = "Black";
 	CurrFillShade = 100.0;
 	CurrColorStroke = "Black";
 	CurrStrokeShade = 100.0;
@@ -418,6 +417,7 @@
 	ts >> obX >> obY >> obW >> obH;
 	ts >> colorFill >> colorLine;
 	ts >> fillFlag >> lineWidth;
+	fillFlag = fillFlag & 0x0FFF;
 	qreal scX = obW / 16384.0;
 	qreal scY = obH / 16384.0;
 	parseColor(colorFill, colorLine, color, fillFlag);

Modified: branches/ScribusOIF/scribus/plugins/import/drw/importdrw.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/import/drw/importdrw.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/drw/importdrw.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/drw/importdrw.cpp Sun Nov  6 22:52:15 2011
@@ -274,7 +274,6 @@
 				m_Doc->m_Selection->delaySignalsOn();
 				for (int dre=0; dre<Elements.count(); ++dre)
 				{
-					m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
 					tmpSel->addItem(Elements.at(dre), true);
 				}
 				tmpSel->setGroupRect();
@@ -1222,6 +1221,7 @@
 						popped.groupItem->groupItemList.append(item);
 						item->gXpos = item->xPos() - popped.groupItem->xPos();
 						item->gYpos = item->yPos() - popped.groupItem->yPos();
+						item->Parent = popped.groupItem;
 						if (groupStack.count() > 0)
 							groupStack.top().GElements.removeAll(tmpSel->itemAt(i));
 						Elements.removeAll(tmpSel->itemAt(i));
@@ -1902,7 +1902,6 @@
 					newItem->gWidth = pat.pattern.width();
 					newItem->gHeight = pat.pattern.height();
 					pat.items.append(newItem);
-					newItem->ItemNr = pat.items.count();
 				}
 				patternName = "Pattern_"+newItem->itemName();
 				patternName = patternName.trimmed().simplified().replace(" ", "_");

Modified: branches/ScribusOIF/scribus/plugins/import/oodraw/oodrawimp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/import/oodraw/oodrawimp.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/oodraw/oodrawimp.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/oodraw/oodrawimp.cpp Sun Nov  6 22:52:15 2011
@@ -615,7 +615,6 @@
 			m_Doc->m_Selection->delaySignalsOn();
 			for (int dre=0; dre<Elements.count(); ++dre)
 			{
-				m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
 				tmpSel->addItem(Elements.at(dre), true);
 			}
 			ScriXmlDoc *ss = new ScriXmlDoc();
@@ -676,12 +675,6 @@
 	}
 	if (cElements.count() < 2)
 	{
-//		m_Doc->Items->takeAt(zn);
-//		delete neu;
-		for (int a = 0; a < m_Doc->Items->count(); ++a)
-		{
-			m_Doc->Items->at(a)->ItemNr = a;
-		}
 		for (int gr = 0; gr < cElements.count(); ++gr)
 		{
 			elements.append(cElements.at(gr));

Modified: branches/ScribusOIF/scribus/plugins/import/pct/importpct.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/import/pct/importpct.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/pct/importpct.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/pct/importpct.cpp Sun Nov  6 22:52:15 2011
@@ -260,7 +260,6 @@
 				m_Doc->m_Selection->delaySignalsOn();
 				for (int dre=0; dre<Elements.count(); ++dre)
 				{
-					m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
 					tmpSel->addItem(Elements.at(dre), true);
 				}
 				tmpSel->setGroupRect();
@@ -947,7 +946,7 @@
 						image.save(fileName, "PNG");
 						ite->moveBy(m_Doc->currentPage()->xOffset(), m_Doc->currentPage()->yOffset());
 						finishItem(ite);
-						m_Doc->LoadPict(fileName, z);
+						m_Doc->loadPict(fileName, ite);
 						ite->setImageScalingMode(false, false);
 					}
 //					qDebug() << "End of Pict";
@@ -1770,7 +1769,7 @@
 		image.save(fileName, "PNG");
 		ite->moveBy(m_Doc->currentPage()->xOffset(), m_Doc->currentPage()->yOffset());
 		finishItem(ite);
-		m_Doc->LoadPict(fileName, z);
+		m_Doc->loadPict(fileName, ite);
 		ite->setImageScalingMode(false, false);
 		skipOpcode = false;
 	}
@@ -2122,7 +2121,6 @@
 			newItem->gWidth = pat.pattern.width();
 			newItem->gHeight = pat.pattern.height();
 			pat.items.append(newItem);
-			newItem->ItemNr = pat.items.count();
 		}
 		patternName = "Pattern_"+newItem->itemName();
 		patternName = patternName.trimmed().simplified().replace(" ", "_");

Modified: branches/ScribusOIF/scribus/plugins/import/pdf/importpdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/import/pdf/importpdf.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/pdf/importpdf.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/pdf/importpdf.cpp Sun Nov  6 22:52:15 2011
@@ -220,7 +220,6 @@
 				m_Doc->m_Selection->delaySignalsOn();
 				for (int dre=0; dre<Elements.count(); ++dre)
 				{
-					m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
 					tmpSele->addItem(Elements.at(dre), true);
 				}
 				tmpSele->setGroupRect();

Modified: branches/ScribusOIF/scribus/plugins/import/pdf/slaoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/import/pdf/slaoutput.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/pdf/slaoutput.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/pdf/slaoutput.cpp Sun Nov  6 22:52:15 2011
@@ -1120,7 +1120,7 @@
 			ite->tempImageFile->close();
 			ite->isInlineImage = true;
 			res.save(fileName, "PNG");
-			m_doc->LoadPict(fileName, z);
+			m_doc->loadPict(fileName, ite);
 			ite->setImageScalingMode(false, true);
 			m_doc->AdjustItemSize(ite);
 			m_Elements->append(ite);
@@ -1244,7 +1244,7 @@
 			ite->tempImageFile->close();
 			ite->isInlineImage = true;
 			res.save(fileName, "PNG");
-			m_doc->LoadPict(fileName, z);
+			m_doc->loadPict(fileName, ite);
 			ite->setImageScalingMode(false, true);
 			m_doc->AdjustItemSize(ite);
 			m_Elements->append(ite);
@@ -1359,7 +1359,7 @@
 			ite->tempImageFile->close();
 			ite->isInlineImage = true;
 			img.save(fileName, "PNG");
-			m_doc->LoadPict(fileName, z);
+			m_doc->loadPict(fileName, ite);
 			ite->setImageScalingMode(false, true);
 			m_doc->AdjustItemSize(ite);
 			m_Elements->append(ite);

Modified: branches/ScribusOIF/scribus/plugins/import/ps/importps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/import/ps/importps.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/ps/importps.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/ps/importps.cpp Sun Nov  6 22:52:15 2011
@@ -261,7 +261,6 @@
 				m_Doc->m_Selection->delaySignalsOn();
 				for (int dre=0; dre<Elements.count(); ++dre)
 				{
-					m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
 					tmpSel->addItem(Elements.at(dre), true);
 				}
 				tmpSel->setGroupRect();

Modified: branches/ScribusOIF/scribus/plugins/import/shape/importshape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/import/shape/importshape.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/shape/importshape.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/shape/importshape.cpp Sun Nov  6 22:52:15 2011
@@ -260,7 +260,6 @@
 				m_Doc->m_Selection->delaySignalsOn();
 				for (int dre=0; dre<Elements.count(); ++dre)
 				{
-					m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
 					tmpSel->addItem(Elements.at(dre), true);
 				}
 				tmpSel->setGroupRect();
@@ -611,7 +610,6 @@
 				Selection tmpSelection(m_Doc, false);
 				tmpSelection.addItem(neu);
 				m_Doc->itemSelection_DeleteItem(&tmpSelection);
-				m_Doc->renumberItemsInListOrder();
 			}
 			else
 			{
@@ -651,6 +649,7 @@
 					currItem->gYpos = currItem->yPos() - gy;
 					currItem->gWidth = gw;
 					currItem->gHeight = gh;
+					currItem->Parent = neu;
 					neu->groupItemList.append(currItem);
 					m_Doc->Items->removeAll(currItem);
 					Elements.removeAll(currItem);
@@ -658,7 +657,6 @@
 				neu->setRedrawBounding();
 				neu->setTextFlowMode(PageItem::TextFlowDisabled);
 				m_Doc->GroupCounter++;
-				m_Doc->renumberItemsInListOrder();
 			}
 		}
 		DOC = DOC.nextSibling();

Modified: branches/ScribusOIF/scribus/plugins/import/sml/importsml.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/import/sml/importsml.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/sml/importsml.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/sml/importsml.cpp Sun Nov  6 22:52:15 2011
@@ -258,7 +258,6 @@
 				m_Doc->m_Selection->delaySignalsOn();
 				for (int dre=0; dre<Elements.count(); ++dre)
 				{
-					m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
 					tmpSel->addItem(Elements.at(dre), true);
 				}
 				tmpSel->setGroupRect();
@@ -453,6 +452,17 @@
 		int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, baseX + x, baseY + y, w, h, LineW, CurrColorFill, CurrColorStroke, true);
 		finishItem(elem, m_Doc->Items->at(z));
 	}
+	else if (typ == "RoundRectangle")
+	{
+		double x = ScCLocale::toDoubleC(elem.attribute("x"));
+		double y = ScCLocale::toDoubleC(elem.attribute("y"));
+		double w = ScCLocale::toDoubleC(elem.attribute("w"));
+		double h = ScCLocale::toDoubleC(elem.attribute("h"));
+		int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, baseX + x, baseY + y, w, h, LineW, CurrColorFill, CurrColorStroke, true);
+		m_Doc->Items->at(z)->setCornerRadius(qMax(ScCLocale::toDoubleC(elem.attribute("r1")), ScCLocale::toDoubleC(elem.attribute("r2"))));
+		m_Doc->Items->at(z)->SetFrameRound();
+		finishItem(elem, m_Doc->Items->at(z));
+	}
 	else if (typ == "Ellipse")
 	{
 		double x = ScCLocale::toDoubleC(elem.attribute("x"));
@@ -464,13 +474,19 @@
 	}
 	else if ((typ == "Polygon") || (typ == "ClosedPath"))
 	{
-		int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, baseX, baseY, 10, 10, LineW, CurrColorFill, CurrColorStroke, true);
+		int z;
+		FPoint s = Coords.point(0);
+		FPoint e = Coords.point(Coords.count() - 1);
+		if (s == e)
+			z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, baseX, baseY, 10, 10, LineW, CurrColorFill, CurrColorStroke, true);
+		else
+			z = m_Doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, baseX, baseY, 10, 10, LineW, CurrColorFill, CurrColorStroke, true);
 		m_Doc->Items->at(z)->PoLine = Coords.copy();
 		finishItem(elem, m_Doc->Items->at(z));
 	}
 	else if ((typ == "Bezier") || (typ == "OpenPath") || (typ == "LineArray") || (typ == "Polyline"))
 	{
-		int z = m_Doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, baseX, baseY, 10, 10, LineW, CurrColorFill, CurrColorStroke, true);
+		int	z = m_Doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, baseX, baseY, 10, 10, LineW, CurrColorFill, CurrColorStroke, true);
 		m_Doc->Items->at(z)->PoLine = Coords.copy();
 		finishItem(elem, m_Doc->Items->at(z));
 	}

Modified: branches/ScribusOIF/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/import/svg/svgplugin.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/svg/svgplugin.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/svg/svgplugin.cpp Sun Nov  6 22:52:15 2011
@@ -508,7 +508,6 @@
 			m_Doc->m_Selection->delaySignalsOn();
 			for (int dre=0; dre<Elements.count(); ++dre)
 			{
-				m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
 				tmpSel->addItem(Elements.at(dre), true);
 			}
 			ScriXmlDoc *ss = new ScriXmlDoc();
@@ -1151,10 +1150,6 @@
 			Selection tmpSelection(m_Doc, false);
 			tmpSelection.addItem(neu);
 			m_Doc->itemSelection_DeleteItem(&tmpSelection);
-			for (int a = 0; a < m_Doc->Items->count(); ++a)
-			{
-				m_Doc->Items->at(a)->ItemNr = a;
-			}
 			for (int gr = 0; gr < gElements.count(); ++gr)
 			{
 				GElements.append(gElements.at(gr));
@@ -1212,13 +1207,13 @@
 					currItem->gYpos = currItem->yPos() - gy;
 					currItem->gWidth = gw;
 					currItem->gHeight = gh;
+					currItem->Parent = neu;
 					neu->groupItemList.append(currItem);
 					m_Doc->Items->removeAll(currItem);
 				}
 				neu->setRedrawBounding();
 				neu->setTextFlowMode(PageItem::TextFlowDisabled);
 				m_Doc->GroupCounter++;
-				m_Doc->renumberItemsInListOrder();
 			}
 			else
 			{
@@ -1231,7 +1226,6 @@
 					tmpSelection.addItem(gElements.at(gr));
 				}
 				m_Doc->itemSelection_DeleteItem(&tmpSelection);
-				m_Doc->renumberItemsInListOrder();
 			}
 		}
 		delete( m_gc.pop() );
@@ -1462,7 +1456,7 @@
 	if (!fname.isEmpty())
 	{
 		if (!fname.startsWith("data:"))
-			m_Doc->LoadPict(fname, z);
+			m_Doc->loadPict(fname, ite);
 		else
 		{
 			int startData = fname.indexOf(",");
@@ -1480,7 +1474,7 @@
 			QImage img;
 			img.loadFromData(ba);
 			img.save(fileName, "PNG");
-			m_Doc->LoadPict(fileName, z);
+			m_Doc->loadPict(fileName, ite);
 		}
 	}
 	if (clipPath.size() != 0)

Modified: branches/ScribusOIF/scribus/plugins/import/wmf/wmfimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/import/wmf/wmfimport.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/wmf/wmfimport.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/wmf/wmfimport.cpp Sun Nov  6 22:52:15 2011
@@ -659,7 +659,6 @@
 			m_Doc->m_Selection->delaySignalsOn();
 			for (int dre=0; dre<Elements.count(); ++dre)
 			{
-				m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
 				m_tmpSel->addItem(Elements.at(dre), true);
 			}
 			ScriXmlDoc *ss = new ScriXmlDoc();

Modified: branches/ScribusOIF/scribus/plugins/import/wpg/importwpg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/import/wpg/importwpg.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/wpg/importwpg.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/wpg/importwpg.cpp Sun Nov  6 22:52:15 2011
@@ -403,7 +403,7 @@
 	image.setDotsPerMeterX ((int) (hres / 0.0254));
 	image.setDotsPerMeterY ((int) (vres / 0.0254));
 	image.save(fileName, "PNG");
-	m_Doc->LoadPict(fileName, z);
+	m_Doc->loadPict(fileName, ite);
 	ite->setImageScalingMode(false, false);
 	ite->moveBy(m_Doc->currentPage()->xOffset(), m_Doc->currentPage()->yOffset());
 	finishItem(ite);
@@ -620,7 +620,6 @@
 				m_Doc->m_Selection->delaySignalsOn();
 				for (int dre=0; dre<Elements.count(); ++dre)
 				{
-					m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
 					tmpSel->addItem(Elements.at(dre), true);
 				}
 				tmpSel->setGroupRect();

Modified: branches/ScribusOIF/scribus/plugins/import/xar/importxar.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/import/xar/importxar.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/xar/importxar.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/xar/importxar.cpp Sun Nov  6 22:52:15 2011
@@ -365,7 +365,6 @@
 				m_Doc->m_Selection->delaySignalsOn();
 				for (int dre=0; dre<Elements.count(); ++dre)
 				{
-					m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
 					tmpSel->addItem(Elements.at(dre), true);
 				}
 				tmpSel->setGroupRect();
@@ -1860,7 +1859,6 @@
 			newItem->gWidth = pat.pattern.width();
 			newItem->gHeight = pat.pattern.height();
 			pat.items.append(newItem);
-			newItem->ItemNr = pat.items.count();
 		}
 		QString patternName = patternRef[bref]+"_"+newItem->itemName();
 		patternName = patternName.trimmed().simplified().replace(" ", "_");
@@ -2624,7 +2622,6 @@
 			newItem->gWidth = pat.pattern.width();
 			newItem->gHeight = pat.pattern.height();
 			pat.items.append(newItem);
-			newItem->ItemNr = pat.items.count();
 		}
 		QString patternName = patternRef[bref]+"_"+newItem->itemName();
 		patternName = patternName.trimmed().simplified().replace(" ", "_");
@@ -2695,7 +2692,7 @@
 		ite->tempImageFile->close();
 		ite->isInlineImage = true;
 		image.save(fileName, "PNG");
-		m_Doc->LoadPict(fileName, z);
+		m_Doc->loadPict(fileName, ite);
 		ite->setImageScalingMode(false, false);
 	}
 }
@@ -2776,7 +2773,6 @@
 			newItem->gWidth = pat.pattern.width();
 			newItem->gHeight = pat.pattern.height();
 			pat.items.append(newItem);
-			newItem->ItemNr = pat.items.count();
 		}
 		QString patternName = "Pattern_"+newItem->itemName();
 		patternName = patternName.trimmed().simplified().replace(" ", "_");
@@ -3485,6 +3481,7 @@
 				{
 					PageItem* currItem = Elements.at(a);
 					groupItem->groupItemList.append(currItem);
+					currItem->Parent = groupItem;
 					double x1, x2, y1, y2;
 					currItem->getVisualBoundingRect(&x1, &y1, &x2, &y2);
 					minx = qMin(minx, x1);
@@ -3537,10 +3534,10 @@
 					PageItem* currItem = groupItem->groupItemList.at(a);
 					currItem->gXpos = currItem->xPos() - groupItem->xPos();
 					currItem->gYpos = currItem->yPos() - groupItem->yPos();
+					currItem->Parent = groupItem;
 					m_Doc->Items->removeAll(currItem);
 					Elements.removeAll(currItem);
 				}
-				m_Doc->renumberItemsInListOrder();
 			}
 		}
 	}

Modified: branches/ScribusOIF/scribus/plugins/import/xfig/importxfig.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/import/xfig/importxfig.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/xfig/importxfig.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/xfig/importxfig.cpp Sun Nov  6 22:52:15 2011
@@ -395,7 +395,6 @@
 				m_Doc->m_Selection->delaySignalsOn();
 				for (int dre=0; dre<Elements.count(); ++dre)
 				{
-					m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
 					tmpSel->addItem(Elements.at(dre), true);
 				}
 				tmpSel->setGroupRect();
@@ -1585,7 +1584,6 @@
 			PageItem* ite = itemList.at(elems.at(i));
 			Elements.append(ite);
 			m_Doc->Items->append(ite);
-			ite->ItemNr = m_Doc->Items->count()-1;
 			if ((importerFlags & LoadSavePlugin::lfCreateDoc) && (it > 0))
 				ite->LayerID = currentLayer;
 		}

Modified: branches/ScribusOIF/scribus/plugins/scriptplugin/cmdmani.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/scriptplugin/cmdmani.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/scriptplugin/cmdmani.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/scriptplugin/cmdmani.cpp Sun Nov  6 22:52:15 2011
@@ -30,7 +30,7 @@
 		PyErr_SetString(WrongFrameTypeError, QObject::tr("Target is not an image frame.","python error").toLocal8Bit().constData());
 		return NULL;
 	}
-	ScCore->primaryMainWindow()->doc->LoadPict(QString::fromUtf8(Image), item->ItemNr);
+	ScCore->primaryMainWindow()->doc->loadPict(QString::fromUtf8(Image), item);
 //	Py_INCREF(Py_None);
 //	return Py_None;
 	Py_RETURN_NONE;
@@ -62,7 +62,7 @@
 	ScCore->primaryMainWindow()->view->Deselect();
 	// Select the item, which will also select its group if
 	// there is one.
-	ScCore->primaryMainWindow()->view->SelectItemNr(item->ItemNr);
+	ScCore->primaryMainWindow()->view->SelectItem(item);
 
 	// scale
 	ScCore->primaryMainWindow()->doc->itemSelection_SetImageScale(x, y); //CB why when this is done above?
@@ -104,7 +104,7 @@
 	ScCore->primaryMainWindow()->view->Deselect();
 	// Select the item, which will also select its group if
 	// there is one.
-	ScCore->primaryMainWindow()->view->SelectItemNr(item->ItemNr);
+	ScCore->primaryMainWindow()->view->SelectItem(item);
 
 	// scale
 	double newScaleX = x / item->pixm.imgInfo.xres * 72.0;
@@ -147,7 +147,7 @@
 	ScCore->primaryMainWindow()->view->Deselect();
 	// Select the item, which will also select its group if
 	// there is one.
-	ScCore->primaryMainWindow()->view->SelectItemNr(item->ItemNr);
+	ScCore->primaryMainWindow()->view->SelectItem(item);
 
 	// offset
 	double newOffsetX = x / ((item->imageXScale() != 0.0) ? item->imageXScale() : 1);
@@ -244,7 +244,7 @@
 	ScCore->primaryMainWindow()->view->Deselect();
 	// Select the item, which will also select its group if
 	// there is one.
-	ScCore->primaryMainWindow()->view->SelectItemNr(item->ItemNr);
+	ScCore->primaryMainWindow()->view->SelectItem(item);
 	// Move the item, or items
 	if (ScCore->primaryMainWindow()->doc->m_Selection->count() > 1)
 	{
@@ -281,7 +281,7 @@
 	ScCore->primaryMainWindow()->view->Deselect();
 	// Select the item, which will also select its group if
 	// there is one.
-	ScCore->primaryMainWindow()->view->SelectItemNr(item->ItemNr);
+	ScCore->primaryMainWindow()->view->SelectItem(item);
 	// Move the item, or items
 	if (ScCore->primaryMainWindow()->doc->m_Selection->count() > 1)
 	{
@@ -312,7 +312,7 @@
 	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == NULL)
 		return NULL;
-	ScCore->primaryMainWindow()->doc->RotateItem(item->rotation() - x, item->ItemNr);
+	ScCore->primaryMainWindow()->doc->RotateItem(item->rotation() - x, item);
 //	Py_INCREF(Py_None);
 //	return Py_None;
 	Py_RETURN_NONE;
@@ -329,7 +329,7 @@
 	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == NULL)
 		return NULL;
-	ScCore->primaryMainWindow()->doc->RotateItem(x * -1.0, item->ItemNr);
+	ScCore->primaryMainWindow()->doc->RotateItem(x * -1.0, item);
 //	Py_INCREF(Py_None);
 //	return Py_None;
 	Py_RETURN_NONE;
@@ -346,7 +346,7 @@
 	PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
 	if (item == NULL)
 		return NULL;
-	ScCore->primaryMainWindow()->doc->SizeItem(ValueToPoint(x), ValueToPoint(y), item->ItemNr);
+	ScCore->primaryMainWindow()->doc->SizeItem(ValueToPoint(x), ValueToPoint(y), item);
 //	Py_INCREF(Py_None);
 //	return Py_None;
 	Py_RETURN_NONE;
@@ -418,7 +418,7 @@
 	if (i == NULL)
 		return NULL;
 	ScCore->primaryMainWindow()->view->Deselect();
-	ScCore->primaryMainWindow()->view->SelectItemNr(i->ItemNr);
+	ScCore->primaryMainWindow()->view->SelectItem(i);
 	ScCore->primaryMainWindow()->UnGroupObj();
 //	Py_INCREF(Py_None);
 //	return Py_None;
@@ -442,7 +442,7 @@
 	if (i == NULL)
 		return NULL;
 	ScCore->primaryMainWindow()->view->Deselect();
-	ScCore->primaryMainWindow()->view->SelectItemNr(i->ItemNr);
+	ScCore->primaryMainWindow()->view->SelectItem(i);
 //	int h = ScCore->primaryMainWindow()->view->frameResizeHandle;
 //	ScCore->primaryMainWindow()->view->frameResizeHandle = 1;
 	ScCore->primaryMainWindow()->view->startGroupTransaction(Um::Resize, "", Um::IResize);
@@ -485,7 +485,7 @@
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
-	ScCore->primaryMainWindow()->view->SelectItemNr(i->ItemNr);
+	ScCore->primaryMainWindow()->view->SelectItem(i);
 //	Py_INCREF(Py_None);
 //	return Py_None;
 	Py_RETURN_NONE;
@@ -593,7 +593,7 @@
 	ScCore->primaryMainWindow()->view->Deselect();
 	// Select the item, which will also select its group if
 	// there is one.
-	ScCore->primaryMainWindow()->view->SelectItemNr(item->ItemNr);
+	ScCore->primaryMainWindow()->view->SelectItem(item);
 
 	// flip
 	if (h == 1) {

Modified: branches/ScribusOIF/scribus/plugins/scriptplugin/cmdmisc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/scriptplugin/cmdmisc.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/scriptplugin/cmdmisc.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/scriptplugin/cmdmisc.cpp Sun Nov  6 22:52:15 2011
@@ -206,11 +206,11 @@
 	PageItem *i = GetUniqueItem(QString::fromUtf8(Name));
 	if (i == NULL)
 		return NULL;
-	ScCore->primaryMainWindow()->view->SelectItemNr(i->ItemNr);
-	bool found = false;
-	for (int lam=0; lam < ScCore->primaryMainWindow()->doc->Layers.count(); ++lam)
-	{
-		ScCore->primaryMainWindow()->view->SelectItemNr(i->ItemNr);
+	ScCore->primaryMainWindow()->view->SelectItem(i);
+	bool found = false;
+	for (int lam=0; lam < ScCore->primaryMainWindow()->doc->Layers.count(); ++lam)
+	{
+		ScCore->primaryMainWindow()->view->SelectItem(i);
 		for (int lam=0; lam < ScCore->primaryMainWindow()->doc->Layers.count(); ++lam)
 			if (ScCore->primaryMainWindow()->doc->Layers[lam].Name == QString::fromUtf8(Layer))
 			{

Modified: branches/ScribusOIF/scribus/plugins/scriptplugin/cmdobj.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/scriptplugin/cmdobj.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/scriptplugin/cmdobj.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/scriptplugin/cmdobj.cpp Sun Nov  6 22:52:15 2011
@@ -282,7 +282,7 @@
 		it->PoLine.translate(0, -np2.y());
 		ScCore->primaryMainWindow()->doc->MoveItem(0, np2.y(), it);
 	}
-	ScCore->primaryMainWindow()->doc->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false);
+	ScCore->primaryMainWindow()->doc->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), it, false, false, false);
 	ScCore->primaryMainWindow()->doc->AdjustItemSize(it);
 	if (Name != EMPTY_STRING)
 	{
@@ -364,7 +364,7 @@
 		it->PoLine.translate(0, -np2.y());
 		ScCore->primaryMainWindow()->doc->MoveItem(0, np2.y(), it);
 	}
-	ScCore->primaryMainWindow()->doc->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false);
+	ScCore->primaryMainWindow()->doc->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), it, false, false, false);
 	ScCore->primaryMainWindow()->doc->AdjustItemSize(it);
 	if (Name != EMPTY_STRING)
 	{
@@ -455,7 +455,7 @@
 		it->PoLine.translate(0, -np2.y());
 		ScCore->primaryMainWindow()->doc->MoveItem(0, np2.y(), it);
 	}
-	ScCore->primaryMainWindow()->doc->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false);
+	ScCore->primaryMainWindow()->doc->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), it, false, false, false);
 	ScCore->primaryMainWindow()->doc->AdjustItemSize(it);
 	if (Name != EMPTY_STRING)
 	{
@@ -486,26 +486,25 @@
 //	}
 	//FIXME: Why use GetItem not GetUniqueItem? Maybe use GetUniqueItem and use the exceptions
 	// its sets for us?
-	int i = GetItem(QString::fromUtf8(TextB));
-	int ii = GetItem(QString::fromUtf8(PolyB));
-	if ((i == -1) || (ii == -1))
+	PageItem *i = GetItem(QString::fromUtf8(TextB));
+	PageItem *ii = GetItem(QString::fromUtf8(PolyB));
+	if ((i == NULL) || (ii == NULL))
 	{
 		PyErr_SetString(NotFoundError, QObject::tr("Object not found.","python error").toLocal8Bit().constData());
 		return NULL;
 	}
 	ScCore->primaryMainWindow()->doc->m_Selection->clear();
-	ScCore->primaryMainWindow()->doc->m_Selection->addItem(ScCore->primaryMainWindow()->doc->Items->at(i));
-	ScCore->primaryMainWindow()->doc->m_Selection->addItem(ScCore->primaryMainWindow()->doc->Items->at(ii));
-	PageItem *it = ScCore->primaryMainWindow()->doc->Items->at(i);
+	ScCore->primaryMainWindow()->doc->m_Selection->addItem(i);
+	ScCore->primaryMainWindow()->doc->m_Selection->addItem(ii);
 	ScCore->primaryMainWindow()->view->ToPathText();
-	ScCore->primaryMainWindow()->doc->MoveItem(pageUnitXToDocX(x) - it->xPos(), pageUnitYToDocY(y) - it->yPos(), it);
-	if (Name != EMPTY_STRING)
-	{
-		QString objName = QString::fromUtf8(Name);
-		if (!ItemExists(objName))
-			ScCore->primaryMainWindow()->doc->Items->at(i)->setItemName(objName);
-	}
-	return PyString_FromString(it->itemName().toUtf8());
+	ScCore->primaryMainWindow()->doc->MoveItem(pageUnitXToDocX(x) - i->xPos(), pageUnitYToDocY(y) - i->yPos(), i);
+	if (Name != EMPTY_STRING)
+	{
+		QString objName = QString::fromUtf8(Name);
+		if (!ItemExists(objName))
+			i->setItemName(objName);
+	}
+	return PyString_FromString(i->itemName().toUtf8());
 }
 
 

Modified: branches/ScribusOIF/scribus/plugins/scriptplugin/cmdpage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/scriptplugin/cmdpage.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/scriptplugin/cmdpage.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/scriptplugin/cmdpage.cpp Sun Nov  6 22:52:15 2011
@@ -245,7 +245,7 @@
 			row = Py_BuildValue((char*)"(sii)",
 			                    ScCore->primaryMainWindow()->doc->Items->at(i)->itemName().toUtf8().constData(),
 			                    ScCore->primaryMainWindow()->doc->Items->at(i)->itemType(),
-			                    ScCore->primaryMainWindow()->doc->Items->at(i)->ItemNr
+								ScCore->primaryMainWindow()->doc->Items->at(i)->uniqueNr
 			                   );
 			PyList_SetItem(l, counter, row);
 			counter++;

Modified: branches/ScribusOIF/scribus/plugins/scriptplugin/cmdtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/scriptplugin/cmdtext.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/scriptplugin/cmdtext.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/scriptplugin/cmdtext.cpp Sun Nov  6 22:52:15 2011
@@ -263,10 +263,6 @@
 	Daten.replace(QChar('\n') , SpecialChars::PARSEP);
 	PyMem_Free(Text);
 	currItem->itemText.clear();
-	for (int a = 0; a < ScCore->primaryMainWindow()->doc->FrameItems.count(); ++a)
-	{
-		ScCore->primaryMainWindow()->doc->FrameItems.at(a)->ItemNr = a;
-	}
 	currItem->itemText.insertChars(0, Daten);
 	currItem->invalidateLayout();
 	currItem->Dirty = false;
@@ -644,10 +640,6 @@
 	else
 	{
 		it->itemText.clear();
-		for (int a = 0; a < ScCore->primaryMainWindow()->doc->FrameItems.count(); ++a)
-		{
-			ScCore->primaryMainWindow()->doc->FrameItems.at(a)->ItemNr = a;
-		}
 	}
 //	Py_INCREF(Py_None);
 //	return Py_None;
@@ -992,7 +984,7 @@
 	if (!item->textLayout->isValid())
 		item->layout();
 	ScCore->primaryMainWindow()->view->Deselect(true);
-	ScCore->primaryMainWindow()->view->SelectItemNr(item->ItemNr);
+	ScCore->primaryMainWindow()->view->SelectItem(item);
 	ScCore->primaryMainWindow()->view->TextToPath();
 //	Py_INCREF(Py_None);
 //	return Py_None;

Modified: branches/ScribusOIF/scribus/plugins/scriptplugin/cmdutil.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/scriptplugin/cmdutil.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/scriptplugin/cmdutil.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/scriptplugin/cmdutil.cpp Sun Nov  6 22:52:15 2011
@@ -54,22 +54,22 @@
 	return PointToValue(pageUnitY - ScCore->primaryMainWindow()->doc->currentPage()->yOffset());
 }
 
-int GetItem(QString Name)
+PageItem *GetItem(QString Name)
 {
 	if (!Name.isEmpty())
 	{
 		for (int a = 0; a < ScCore->primaryMainWindow()->doc->Items->count(); a++)
 		{
 			if (ScCore->primaryMainWindow()->doc->Items->at(a)->itemName() == Name)
-				return static_cast<int>(a);
+				return ScCore->primaryMainWindow()->doc->Items->at(a);
 		}
 	}
 	else
 	{
 		if (ScCore->primaryMainWindow()->doc->m_Selection->count() != 0)
-			return ScCore->primaryMainWindow()->doc->m_Selection->itemAt(0)->ItemNr;
-	}
-	return -1;
+			return ScCore->primaryMainWindow()->doc->m_Selection->itemAt(0);
+	}
+	return NULL;
 }
 
 void ReplaceColor(QString col, QString rep)
@@ -241,7 +241,7 @@
 		if (!item)
 			return false;
 		// and select it
-		ScCore->primaryMainWindow()->view->SelectItemNr(item->ItemNr);
+		ScCore->primaryMainWindow()->view->SelectItem(item);
 	}
 	return true;
 }

Modified: branches/ScribusOIF/scribus/plugins/scriptplugin/cmdutil.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/scriptplugin/cmdutil.h
==============================================================================
--- branches/ScribusOIF/scribus/plugins/scriptplugin/cmdutil.h (original)
+++ branches/ScribusOIF/scribus/plugins/scriptplugin/cmdutil.h Sun Nov  6 22:52:15 2011
@@ -27,7 +27,7 @@
 /// \brief Doc units -> page-relative units
 double docUnitYToPageY(double pageUnitY);
 
-int GetItem(QString Name);
+PageItem *GetItem(QString Name);
 void ReplaceColor(QString col, QString rep);
 /*!
  * @brief Returns named PageItem, or selection if name '', or exception and NULL if no item.

Modified: branches/ScribusOIF/scribus/plugins/tools/pathfinder/pathfinder.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/tools/pathfinder/pathfinder.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/tools/pathfinder/pathfinder.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/tools/pathfinder/pathfinder.cpp Sun Nov  6 22:52:15 2011
@@ -147,13 +147,13 @@
 				{
 					newItem = new PageItem_Polygon(*Item2);
 					newItem->setSelected(false);
-					currDoc->Items->insert(Item2->ItemNr, newItem);
+					currDoc->Items->insert(currDoc->Items->indexOf(Item2), newItem);
 				}
 				else
 				{
 					newItem = new PageItem_Polygon(*Item1);
 					newItem->setSelected(false);
-					currDoc->Items->insert(Item1->ItemNr, newItem);
+					currDoc->Items->insert(currDoc->Items->indexOf(Item1), newItem);
 				}
 			}
 			if (dia->keepItem2)
@@ -163,17 +163,15 @@
 				{
 					newItem = new PageItem_Polygon(*Item1);
 					newItem->setSelected(false);
-					currDoc->Items->insert(Item1->ItemNr, newItem);
+					currDoc->Items->insert(currDoc->Items->indexOf(Item1), newItem);
 				}
 				else
 				{
 					newItem = new PageItem_Polygon(*Item2);
 					newItem->setSelected(false);
-					currDoc->Items->insert(Item2->ItemNr, newItem);
+					currDoc->Items->insert(currDoc->Items->indexOf(Item2), newItem);
 				}
 			}
-			if (dia->keepItem1 || dia->keepItem2)
-				currDoc->renumberItemsInListOrder();
 			if (dia->opMode != 4)
 			{
 				PageItem *currItem;
@@ -270,7 +268,6 @@
 						newItem->setRotation(0.0);
 					}
 					currDoc->Items->append(newItem);
-					newItem->ItemNr = currDoc->Items->count()-1;
 					newItem->setSelected(false);
 					points.fromQPainterPath(path);
 					newItem->PoLine = points;

Modified: branches/ScribusOIF/scribus/plugins/tools/pathstroker/pathstroker.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/plugins/tools/pathstroker/pathstroker.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/tools/pathstroker/pathstroker.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/tools/pathstroker/pathstroker.cpp Sun Nov  6 22:52:15 2011
@@ -243,7 +243,6 @@
 						currDoc->Items->append(newItem);
 					}
 					first = false;
-					newItem->ItemNr = currDoc->Items->count()-1;
 					newItem->setLineStyle(Qt::SolidLine);
 					newItem->setFillColor(ml[it].Color);
 					newItem->setFillShade(ml[it].Shade);
@@ -284,7 +283,6 @@
 						arrow.map(arrowTrans);
 						PageItem* newItem = new PageItem_Polygon(*currItem);
 						currDoc->Items->append(newItem);
-						newItem->ItemNr = currDoc->Items->count()-1;
 						newItem->setLineWidth(0);
 						newItem->setLineStyle(Qt::SolidLine);
 						newItem->setCustomLineStyle("");
@@ -325,7 +323,6 @@
 						arrow.map(arrowTrans);
 						PageItem* newItem = new PageItem_Polygon(*currItem);
 						currDoc->Items->append(newItem);
-						newItem->ItemNr = currDoc->Items->count()-1;
 						newItem->setLineWidth(0);
 						newItem->setLineStyle(Qt::SolidLine);
 						newItem->setCustomLineStyle("");

Modified: branches/ScribusOIF/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/pslib.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pslib.cpp (original)
+++ branches/ScribusOIF/scribus/pslib.cpp Sun Nov  6 22:52:15 2011
@@ -1056,11 +1056,11 @@
 		{
 			PutStream("currentfile 1 (%ENDEPSDATA) /SubFileDecode filter /ReusableStreamDecode filter\n");
 			PutStream("%%BeginDocument: " + fi.fileName() + "\n");
-			if (getDouble(QString(tmp.mid(0, 4)), true) == 0xC5D0D3C6)
+			if (getDouble(tmp.mid(0, 4), true) == 0xC5D0D3C6)
 			{
 				char* data = tmp.data();
-				uint startPos = getDouble(QString(tmp.mid(4, 4)), false);
-				uint length = getDouble(QString(tmp.mid(8, 4)), false);
+				uint startPos = getDouble(tmp.mid(4, 4), false);
+				uint length = getDouble(tmp.mid(8, 4), false);
 				PutStream(data+startPos, length, false);
 			}
 			else
@@ -1150,7 +1150,7 @@
 			else
 			{
       				PutStream("%%BeginDocument: " + fi.fileName() + "\n");
-					if (getDouble(QString(tmp.mid(0, 4)), true) == 0xC5D0D3C6)
+					if (getDouble(tmp.mid(0, 4), true) == 0xC5D0D3C6)
 					{
 						char* data = tmp.data();
 						uint startPos = getDouble(tmp.mid(4, 4), false);
@@ -1601,7 +1601,7 @@
 							errorOccured = !PS_ImageData(it, it->Pfile, it->itemName(), it->IProfile, it->UseEmbedded, Ic);
 							if (errorOccured) break;
 						}
-						PS_TemplateStart(QString("mp_obj_%1_%2").arg(ap).arg(it->ItemNr));
+						PS_TemplateStart(QString("mp_obj_%1_%2").arg(ap).arg(qHash(it)));
 						ProcessItem(Doc, Doc->MasterPages.at(ap), it, ap+1, sep, farb, Ic, gcr, true);
 						PS_TemplateEnd();
 					}
@@ -2816,7 +2816,7 @@
 			if (!(ite->asTextFrame()) && !(ite->asImageFrame()))
 			{
 				int mpIndex = Doc->MasterNames[page->MPageNam];
-				PS_UseTemplate(QString("mp_obj_%1_%2").arg(mpIndex).arg(ite->ItemNr));
+				PS_UseTemplate(QString("mp_obj_%1_%2").arg(mpIndex).arg(qHash(ite)));
 			}
 			else if (ite->asImageFrame())
 			{

Modified: branches/ScribusOIF/scribus/scimgdataloader_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/scimgdataloader_ps.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scimgdataloader_ps.cpp (original)
+++ branches/ScribusOIF/scribus/scimgdataloader_ps.cpp Sun Nov  6 22:52:15 2011
@@ -148,7 +148,7 @@
 	{
 		QByteArray tempBuf(9, ' ');
 		f.read(tempBuf.data(), 8);
-		if (getDouble(QString(tempBuf.mid(0, 4)), true) == 0xC5D0D3C6)
+		if (getDouble(tempBuf.mid(0, 4), true) == 0xC5D0D3C6)
 		{
 			startPos = getDouble(tempBuf.mid(4, 4), false);
 			if (doThumbnail)

Modified: branches/ScribusOIF/scribus/scpage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/scpage.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scpage.cpp (original)
+++ branches/ScribusOIF/scribus/scpage.cpp Sun Nov  6 22:52:15 2011
@@ -241,7 +241,6 @@
 		if ((stateCode == 0) || (stateCode == 1))
 			m_Doc->view()->Deselect(true);
 		m_Doc->Items->append(ite);
-		ite->ItemNr = m_Doc->Items->count()-1;
 		if ((stateCode == 0) || (stateCode == 2))
 			update();
 	}
@@ -254,6 +253,7 @@
 	if (!state)
 		return;
 	QList<PageItem*> itemList = state->getItem();
+	int id = state->getInt("ITEMID");
 	if (itemList.count() <= 0) 
 		return;
 	m_Doc->view()->Deselect(true);
@@ -268,9 +268,8 @@
 		for (int i = 0; i < itemList.count(); ++i)
 		{
 			PageItem* ite = itemList.at(i);
-			m_Doc->Items->insert(ite->ItemNr, ite);
-		}
-		m_Doc->renumberItemsInListOrder();
+			m_Doc->Items->insert(id, ite);
+		}
  		update();
 	}
 	else
@@ -304,13 +303,13 @@
 	m_Doc->setMasterPageMode(!oldItem->OnMasterPage.isEmpty());
 	if (isUndo)
 	{
-		m_Doc->Items->replace(newItem->ItemNr, oldItem);
+		m_Doc->Items->replace(m_Doc->Items->indexOf(newItem), oldItem);
 		oldItem->updatePolyClip();
 		m_Doc->AdjustItemSize(oldItem);
 	}
 	else
 	{
-		m_Doc->Items->replace(oldItem->ItemNr, newItem);
+		m_Doc->Items->replace(m_Doc->Items->indexOf(oldItem), newItem);
 	}
 	m_Doc->setMasterPageMode(oldMPMode);
 }

Modified: branches/ScribusOIF/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/scribus.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribus.cpp (original)
+++ branches/ScribusOIF/scribus/scribus.cpp Sun Nov  6 22:52:15 2011
@@ -842,6 +842,7 @@
 
 	scrMenuMgr->addMenuItem(scrActions["itemsUnWeld"], "Item", false);
 	scrMenuMgr->addMenuItem(scrActions["itemWeld"], "Item", false);
+	scrMenuMgr->addMenuItem(scrActions["itemEditWeld"], "Item", false);
 
 	//Insert menu
 	scrMenuMgr->createMenu("Insert", ActionManager::defaultMenuNameEntryTranslated("Insert"));
@@ -1339,7 +1340,7 @@
 					if (doc->SubMode != -1)
 					{
 						view->Deselect(false);
-						doc->Items->removeAt(currItem->ItemNr);
+						doc->Items->removeOne(currItem);
 					}
 					else
 						view->Deselect(false);
@@ -1365,11 +1366,11 @@
 					if (currItem->PoLine.size() < 4)
 					{
 						view->Deselect(false);
-						doc->Items->removeAt(currItem->ItemNr);
+						doc->Items->removeOne(currItem);
 					}
 					else
 					{
-						doc->SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem->ItemNr, false, false);
+						doc->SizeItem(currItem->PoLine.WidthHeight().x(), currItem->PoLine.WidthHeight().y(), currItem, false, false);
 						currItem->setPolyClip(qRound(qMax(currItem->lineWidth() / 2.0, 1.0)));
 						doc->AdjustItemSize(currItem);
 						currItem->ContourLine = currItem->PoLine.copy();
@@ -1383,7 +1384,7 @@
 					if (currItem->Sizing)
 					{
 						view->Deselect(false);
-						doc->Items->removeAt(currItem->ItemNr);
+						doc->Items->removeOne(currItem);
 					}
 					break;
 			}
@@ -2626,24 +2627,24 @@
 	if (SelectedType != -1)
 	{
 		if (docSelectionCount != 0)
-		{
-			PageItem *lowestItem = doc->m_Selection->itemAt(0);
-			for (uint a=0; a < docSelectionCount; ++a)
-			{
-				currItem = doc->m_Selection->itemAt(a);
-				if (currItem->ItemNr < lowestItem->ItemNr)
-					lowestItem = currItem;
-			}
-			currItem = lowestItem;
-			if ((docSelectionCount == 1) && currItem && currItem->asImageFrame())
-				isRaster = currItem->isRaster;
+			currItem = doc->m_Selection->itemAt(0);
+	//	{
+	//		int lowestItem = 999999;
+	//		for (int a = 0; a < doc->m_Selection->count(); ++a)
+	//		{
+	//			currItem = doc->m_Selection->itemAt(a);
+	//			lowestItem = qMin(lowestItem, doc->Items->indexOf(currItem));
+	//		}
+	//		currItem = doc->Items->at(lowestItem);
+	//		if ((docSelectionCount == 1) && currItem && currItem->asImageFrame())
+	//			isRaster = currItem->isRaster;
 //			doc->m_Selection->removeItem(currItem);
 //			doc->m_Selection->prependItem(currItem);
 //			currItem = doc->m_Selection->itemAt(0);
-			assert(currItem);
+	//		assert(currItem);
 //			if (!currItem)
 //				SelectedType=-1;
-		}
+	//	}
 		else
 			SelectedType = -1;
 	}
@@ -3056,14 +3057,11 @@
 	if (docSelectionCount == 1)
 	{
 		PageItem* bx = doc->m_Selection->itemAt(0);
-		if (bx->isWelded())
-			scrActions["itemsUnWeld"]->setEnabled(true);
-		else
-			scrActions["itemsUnWeld"]->setEnabled(false);
+		scrActions["itemsUnWeld"]->setEnabled(bx->isWelded());
+		scrActions["itemEditWeld"]->setEnabled(bx->isWelded());
 	}
 	if (docSelectionCount > 1)
 	{
-//		scrMenuMgr->setMenuEnabled("ItemWeld", true);
 		if (!doc->m_Selection->itemsAreSameType())
 		{
 			scrActions["itemConvertToBezierCurve"]->setEnabled(false);
@@ -3394,7 +3392,7 @@
 			int z = doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, doc->currentPage()->xOffset(), doc->currentPage()->yOffset(), 1, 1, doc->itemToolPrefs().shapeLineWidth, doc->itemToolPrefs().imageFillColor, CommonStrings::None, true);
 			PageItem *b = doc->Items->at(z);
 			b->LayerID = doc->activeLayer();
-			doc->LoadPict(data, b->ItemNr);
+			doc->loadPict(data, b);
 			b->setWidth(static_cast<double>(b->OrigW * 72.0 / b->pixm.imgInfo.xres));
 			b->setHeight(static_cast<double>(b->OrigH * 72.0 / b->pixm.imgInfo.yres));
 			b->OldB2 = b->width();
@@ -4172,7 +4170,7 @@
 				currItem->IRender = doc->cmsSettings().DefaultIntentImages;
 				qApp->changeOverrideCursor( QCursor(Qt::WaitCursor) );
 				qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
-				doc->LoadPict(fileName, currItem->ItemNr, false, true);
+				doc->loadPict(fileName, currItem, false, true);
 				propertiesPalette->imagePal->displayScaleAndOffset(currItem->imageXScale(), currItem->imageYScale(), currItem->imageXOffset(), currItem->imageYOffset());
 				qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
 				view->DrawNew();
@@ -4260,7 +4258,7 @@
 					currItem->isInlineImage = true;
 					currItem->Pfile = fileName;
 					img.save(fileName, "PNG");
-					doc->LoadPict(fileName, currItem->ItemNr, false, true);
+					doc->loadPict(fileName, currItem, false, true);
 					propertiesPalette->imagePal->displayScaleAndOffset(currItem->imageXScale(), currItem->imageYScale(), currItem->imageXOffset(), currItem->imageYOffset());
 					qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
 					view->DrawNew();
@@ -5122,7 +5120,6 @@
 					currItem2->gYpos = currItem2->yPos() - gy;
 					currItem2->gWidth = gw;
 					currItem2->gHeight = gh;
-					currItem2->ItemNr = doc->FrameItems.count();
 					doc->FrameItems.append(currItem2);
 				}
 				int acc = doc->Items->count();

Modified: branches/ScribusOIF/scribus/scribusXml.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/scribusXml.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribusXml.cpp (original)
+++ branches/ScribusOIF/scribus/scribusXml.cpp Sun Nov  6 22:52:15 2011
@@ -167,7 +167,7 @@
 	emG.clear();
 	for (int cor = 0; cor < selection->count(); ++cor)
 	{
-		emMap.insert(selection->itemAt(cor)->ItemNr, selection->itemAt(cor));
+		emMap.insert(doc->Items->indexOf(selection->itemAt(cor)), selection->itemAt(cor));
 	}
 	emG = emMap.values();
 	double selectionWidth = 0;

Modified: branches/ScribusOIF/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/scribusdoc.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribusdoc.cpp (original)
+++ branches/ScribusOIF/scribus/scribusdoc.cpp Sun Nov  6 22:52:15 2011
@@ -4442,9 +4442,8 @@
 	if (newItem==NULL)
 		return -1;
 	Items->append(newItem);
-	newItem->ItemNr = Items->count()-1;
 	//Add in item default values based on itemType and frameType
-	itemAddDetails(itemType, frameType, newItem->ItemNr);
+	itemAddDetails(itemType, frameType, newItem);
 	if (UndoManager::undoEnabled())
 	{
 		ScItemState<PageItem*> *is = new ScItemState<PageItem*>("Create PageItem");
@@ -4465,7 +4464,7 @@
 			activeTransaction = NULL;
 		}
 	}
-	return newItem->ItemNr;
+	return Items->count()-1;
 }
 
 
@@ -4617,9 +4616,8 @@
 }
 
 
-void ScribusDoc::itemAddDetails(const PageItem::ItemType itemType, const PageItem::ItemFrameType frameType, const int itemNumber)
-{
-	PageItem* newItem=Items->at(itemNumber);
+void ScribusDoc::itemAddDetails(const PageItem::ItemType itemType, const PageItem::ItemFrameType frameType, PageItem* newItem)
+{
 	Q_ASSERT(newItem->realItemType()==itemType);
 	switch( itemType )
 	{
@@ -4704,20 +4702,18 @@
 }
 
 
-bool ScribusDoc::itemAddCommit(const int /*itemNumber*/)
+bool ScribusDoc::itemAddCommit(PageItem* item)
 {
 	//TODO use the parameter
 	if (m_itemCreationTransaction && appMode !=  modeDrawBezierLine)
 	{
-		PageItem *createdItem=m_Selection->itemAt(0);
-		if (createdItem!=NULL)
-		{
-			createdItem->checkChanges(true);
+		if (item != NULL)
+		{
+			item->checkChanges(true);
 			QString targetName = Um::ScratchSpace;
-			if (createdItem->OwnPage > -1)
-				targetName = Pages->at(createdItem->OwnPage)->getUName();
-			m_itemCreationTransaction->commit(targetName, createdItem->getUPixmap(),
-								Um::Create + " " + createdItem->getUName(),  "", Um::ICreate);
+			if (item->OwnPage > -1)
+				targetName = Pages->at(item->OwnPage)->getUName();
+			m_itemCreationTransaction->commit(targetName, item->getUPixmap(), Um::Create + " " + item->getUName(),  "", Um::ICreate);
 			delete m_itemCreationTransaction;
 			m_itemCreationTransaction = NULL;
 			if (!isLoading())
@@ -4735,7 +4731,7 @@
 	{
 		if (Items->at(a)->uniqueNr == unique)
 		{
-			ret = Items->at(a)->ItemNr;
+			ret = Items->indexOf(Items->at(a));
 			break;
 		}
 	}
@@ -4752,29 +4748,6 @@
 	}
 	return ret;
 }
-
-void ScribusDoc::updateFrameItems()
-{
-	uint frameItemsCount=FrameItems.count();
-	for (uint a = 0; a < frameItemsCount; ++a)
-		FrameItems.at(a)->ItemNr = a;
-}
-
-
-void ScribusDoc::renumberItemsInListOrder( )
-{
-	m_docUpdater->beginUpdate();
-	m_updateManager.setUpdatesEnabled(false);
-	int itemsCount=Items->count();
-	for (int i = 0; i < itemsCount; ++i)
-	{
-		Items->at(i)->ItemNr = i;
-		Items->at(i)->checkTextFlowInteractions(true);
-	}
-	m_updateManager.setUpdatesEnabled(true);
-	m_docUpdater->endUpdate();
-}
-
 
 void ScribusDoc::rebuildItemLists()
 {
@@ -4782,7 +4755,6 @@
 	QList<PageItem*> newDocItems, newMasterItems;
 	Layers.sort();
 	uint layerCount = this->layerCount();
-	uint itemIndex  = 0, masterIndex = 0;
 	for (uint la = 0; la < layerCount; ++la)
 	{
 		PageItem* currItem;
@@ -4793,7 +4765,6 @@
 			if (currItem->LayerID != layerID)
 				continue;
 			newDocItems.append(currItem);
-			currItem->ItemNr = itemIndex++;
 		}
 		for (int it = 0; it < MasterItems.count(); ++it)
 		{
@@ -4801,7 +4772,6 @@
 			if (currItem->LayerID != layerID)
 				continue;
 			newMasterItems.append(currItem);
-			currItem->ItemNr = masterIndex++;
 		}
 	}
 	DocItems    = newDocItems;
@@ -4820,12 +4790,12 @@
 	automaticTextFrames=atf;
 }
 
-
+/*
 bool ScribusDoc::LoadPict(QString fn, int ItNr, bool reload, bool showMsg )
 {
 	return loadPict(fn, Items->at(ItNr), reload, showMsg);
 }
-
+*/
 
 bool ScribusDoc::loadPict(QString fn, PageItem *pageItem, bool reload, bool showMsg)
 {
@@ -4976,12 +4946,6 @@
 	int retw = -1;
 	if (masterPageMode())
 	{
-/*		int x = static_cast<int>(currentPage()->xOffset());
-		int y = static_cast<int>(currentPage()->yOffset());
-		int w = static_cast<int>(currentPage()->width());
-		int h = static_cast<int>(currentPage()->height());
-		QRect itemRect(qRound(currItem->BoundingX), qRound(currItem->BoundingY), qRound(currItem->BoundingW), qRound(currItem->BoundingH));
-		if (QRect(x, y, w, h).intersects(itemRect)) */
 		double x = currentPage()->xOffset() - docPrefsData.docSetupPrefs.bleeds.Left;
 		double y = currentPage()->yOffset() - docPrefsData.docSetupPrefs.bleeds.Top;
 		double w = currentPage()->width() + docPrefsData.docSetupPrefs.bleeds.Left + docPrefsData.docSetupPrefs.bleeds.Right;
@@ -4990,6 +4954,10 @@
 		double y2 = currItem->BoundingY;
 		double w2 = currItem->BoundingW;
 		double h2 = currItem->BoundingH;
+		QRectF ret = QRectF(0, 0, w2 - x2, h2 - y2);
+		QTransform t = currItem->getCombinedTransform();
+		ret = t.mapRect(ret);
+		ret.getCoords(&x2, &y2, &w2, &h2);
 		if (( qMax( x, x2 ) <= qMin( x+w, x2+w2 ) && qMax( y, y2 ) <= qMin( y+h1, y2+h2 )))
 			retw = currentPage()->pageNr();
 	}
@@ -5008,21 +4976,15 @@
 			double y2 = currItem->BoundingY;
 			double w2 = currItem->BoundingW;
 			double h2 = currItem->BoundingH;
+			QRectF ret = QRectF(0, 0, w2 - x2, h2 - y2);
+			QTransform t = currItem->getCombinedTransform();
+			ret = t.mapRect(ret);
+			ret.getCoords(&x2, &y2, &w2, &h2);
 			if (( qMax( x, x2 ) <= qMin( x+w, x2+w2 ) && qMax( y, y2 ) <= qMin( y+h1, y2+h2 )))
 			{
 				retw = static_cast<int>(a);
 				break;
 			}
-/*			int x = static_cast<int>(Pages->at(a)->xOffset());
-			int y = static_cast<int>(Pages->at(a)->yOffset());
-			int w = static_cast<int>(Pages->at(a)->width());
-			int h = static_cast<int>(Pages->at(a)->height());
-			QRect itemRect(qRound(currItem->BoundingX), qRound(currItem->BoundingY), qRound(currItem->BoundingW), qRound(currItem->BoundingH));
-			if (QRect(x, y, w, h).intersects(itemRect))
-			{
-				retw = static_cast<int>(a);
-				break;
-			} */
 		}
 	}
 	if ((retw == -1) && (currItem->isBookmark))
@@ -5089,6 +5051,10 @@
 			double y2 = currItem->BoundingY;
 			double w2 = currItem->BoundingW;
 			double h2 = currItem->BoundingH;
+			QRectF ret = QRectF(0, 0, w2 - x2, h2 - y2);
+			QTransform t = currItem->getCombinedTransform();
+			ret = t.mapRect(ret);
+			ret.getCoords(&x2, &y2, &w2, &h2);
 			if (( qMax(x1, x2) <= qMin(x1 + w1, x2 + w2) && qMax(y1, y2) <= qMin(y1 + h1, y2 + h2)))
 			{
 				continue;
@@ -5339,8 +5305,8 @@
 	//Take the item to convert from the docs Items list
 //	PageItem *oldItem = Items->take(currItem->ItemNr);
 	// Don't use take as we will insert the new item later at the same position
-	PageItem *oldItem = Items->at(currItem->ItemNr);
-	uint oldItemNr = currItem->ItemNr;
+	PageItem *oldItem = Items->at(Items->indexOf(currItem));
+	uint oldItemNr = Items->indexOf(currItem);
 	//Remove old item from the doc's selection if it was in it
 	bool removedFromSelection=m_Selection->removeItem(oldItem);
 	//Create a new item from the old one
@@ -5491,7 +5457,6 @@
 	//for (uint a = 0; a < Items->count(); ++a)
 	//	Items->at(a)->ItemNr = a;
 //	Items->insert(oldItem->ItemNr, newItem);
-	newItem->ItemNr = oldItemNr;
 	newItem->uniqueNr = oldItem->uniqueNr;
 	Items->replace(oldItemNr, newItem);
 	//FIXME: shouldn't we delete the oldItem ???
@@ -5541,13 +5506,23 @@
 bool ScribusDoc::itemNameExists(const QString checkItemName)
 {
 	bool found = false;
-	uint docItemCount=Items->count();
+	QList<PageItem*> allItems;
+	uint docItemCount = Items->count();
 	for (uint i = 0; i < docItemCount; ++i)
 	{
-		if (checkItemName == Items->at(i)->itemName())
-		{
-			found = true;
-			break;
+		PageItem *currItem = DocItems.at(i);
+		if (currItem->isGroup())
+			allItems = currItem->asGroupFrame()->getItemList();
+		else
+			allItems.append(currItem);
+		for (int ii = 0; ii < allItems.count(); ii++)
+		{
+			if (checkItemName == allItems.at(ii)->itemName())
+			{
+				found = true;
+				break;
+			}
+
 		}
 	}
 	return found;
@@ -5603,7 +5578,6 @@
 		TempPages.append(addedPage);
 		Pages = &TempPages;
 		Items = &docPatterns[symbolName].items;
-		renumberItemsInListOrder();
 		m_Selection->delaySignalsOn();
 		for (int as = 0; as < Items->count(); ++as)
 		{
@@ -5670,7 +5644,6 @@
 				groupItem->setLineTransparency(0);
 				groupItem->asGroupFrame()->adjustXYPosition();
 				GroupCounter++;
-				renumberItemsInListOrder();
 			}
 		}
 		currItem = Items->at(0);
@@ -5682,7 +5655,6 @@
 			for (int a = 1; a < m_ScMW->patternsDependingOnThis.count(); a++)
 			{
 				Items = &docPatterns[m_ScMW->patternsDependingOnThis[a]].items;
-				renumberItemsInListOrder();
 				currItem = Items->at(0);
 				docPatterns[m_ScMW->patternsDependingOnThis[a]].pattern = currItem->DrawObj_toImage(qMax(currItem->gWidth, currItem->gHeight));
 			}
@@ -6342,8 +6314,8 @@
 			currItem = m_Selection->itemAt(c);
 			if (((currItem->isSingleSel) && (currItem->isGroup())) || ((currItem->isSingleSel) && (currItem->isTableItem)))
 				return false;
-			ObjOrder.insert(currItem->ItemNr, c);
 			int d = Items->indexOf(currItem);
+			ObjOrder.insert(d, c);
 			Items->takeAt(d);
 		}
 		QList<uint> Oindex = ObjOrder.values();
@@ -6351,7 +6323,6 @@
 		{
 			Items->prepend(m_Selection->itemAt(Oindex[c]));
 		}
-		renumberItemsInListOrder();
 		return true;
 	}
 	return false;
@@ -6371,8 +6342,8 @@
 			currItem = m_Selection->itemAt(c);
 			if (((currItem->isSingleSel) && (currItem->isGroup())) || ((currItem->isSingleSel) && (currItem->isTableItem)))
 				return false;
-			ObjOrder.insert(currItem->ItemNr, c);
 			int d = Items->indexOf(currItem);
+			ObjOrder.insert(d, c);
 			Items->takeAt(d);
 		}
 		QList<uint> Oindex = ObjOrder.values();
@@ -6380,7 +6351,6 @@
 		{
 			Items->append(m_Selection->itemAt(Oindex[c]));
 		}
-		renumberItemsInListOrder();
 		return true;
 	}
 	return false;
@@ -9556,7 +9526,6 @@
 			}
 			currItem->clearContents();
 		}
-		updateFrameItems();
 		regionsChanged()->update(QRectF());
 		changed();
 	}
@@ -9635,7 +9604,8 @@
 		}
 		if(currItem->textFlowMode() != PageItem::TextFlowDisabled)
 		{
-			for(int tIdx(currItem->ItemNr - 1);tIdx >= 0;--tIdx)
+			int id = Items->indexOf(currItem) - 1;
+			for(int tIdx = id; tIdx >= 0; --tIdx)
 			{
 				if( (Items->at(tIdx)->asTextFrame())
 					&& (!itemSelection->containsItem(Items->at(tIdx)))
@@ -9691,21 +9661,20 @@
 		if (currItem->isBookmark)
 			//CB From view   emit DelBM(currItem);
 			m_ScMW->DelBookMark(currItem);
+		if (UndoManager::undoEnabled() && (selectedItemCount > 0) && !forceDeletion)
+		{
+			ScItemState< QList<PageItem*> > *is = new ScItemState< QList<PageItem*> >(Um::Delete + " " + currItem->getUName(), "", Um::IDelete);
+			is->setItem(delItems);
+			is->set("ITEMID", itemList->indexOf(currItem));
+			is->set("DELETE_ITEM", "delete_item");
+			undoManager->action(Pages->at(0), is, currItem->getUPixmap());
+		}
 		itemList->removeAll(currItem);
 //		if (forceDeletion || !UndoManager::undoEnabled())
 		if (forceDeletion)
 			delete currItem;
 	}
-	if (UndoManager::undoEnabled() && (selectedItemCount > 0) && !forceDeletion)
-	{
-		ScItemState< QList<PageItem*> > *is = new ScItemState< QList<PageItem*> >(Um::Delete + " " + currItem->getUName(), "", Um::IDelete);
-		is->setItem(delItems);
-		is->set("DELETE_ITEM", "delete_item");
-		undoManager->action(Pages->at(0), is, currItem->getUPixmap());
-	}
 	itemSelection->delaySignalsOff();
-	updateFrameItems();
-	renumberItemsInListOrder();
 	if (activeTransaction)
 	{
 		activeTransaction->commit();
@@ -10187,7 +10156,7 @@
 		Object.Objects.clear();
 		currItem->getBoundingRect(&Object.x1, &Object.y1, &Object.x2, &Object.y2);
 		Object.Group = 0;
-		Object.ObjNr = currItem->ItemNr;
+		Object.ObjNr = Items->indexOf(currItem);
 		Object.Objects.append(currItem);
 		AObjects.append(Object);
 	}
@@ -12197,12 +12166,12 @@
 	return retw;
 }
 
-
+/*
 void ScribusDoc::RotateItem(double angle, int ite)
 {
 	RotateItem(angle, Items->at(ite));
 }
-
+*/
 
 void ScribusDoc::RotateItem(double angle, PageItem *currItem)
 {
@@ -12273,12 +12242,12 @@
 	MoveItem(-mxc, -myc, currItem, fromMP);
 }
 
-
+/*
 bool ScribusDoc::SizeItem(double newX, double newY, int ite, bool fromMP, bool DoUpdateClip, bool redraw)
 {
 	return SizeItem(newX, newY, Items->at(ite), fromMP, DoUpdateClip, redraw);
 }
-
+*/
 
 bool ScribusDoc::SizeItem(double newX, double newY, PageItem *pi, bool fromMP, bool DoUpdateClip, bool redraw)
 {
@@ -12422,13 +12391,13 @@
 	return true;
 }
 
-
+/*
 bool ScribusDoc::MoveSizeItem(FPoint newX, FPoint newY, int ite, bool fromMP, bool constrainRotation)
 {
 	PageItem *currItem = Items->at(ite);
 	return MoveSizeItem(newX, newY, currItem, fromMP, constrainRotation);
 }
-
+*/
 bool ScribusDoc::MoveSizeItem(FPoint newX, FPoint newY, PageItem* currItem, bool fromMP, bool constrainRotation)
 {
 	QRectF oldR(currItem->getBoundingRect());
@@ -12854,7 +12823,7 @@
 	double x, y, w, h;
 	uint selectedItemCount = itemSelection->count();
 	itemSelection->getVisualGroupRect(&x, &y, &w, &h);
-	uint lowestItem = 999999;
+	int lowestItem = 999999;
 	for (uint a = 0; a < selectedItemCount; ++a)
 	{
 		currItem = itemSelection->itemAt(a);
@@ -12862,7 +12831,7 @@
 		currItem->gYpos = currItem->yPos() - y;
 		currItem->gWidth = w;
 		currItem->gHeight = h;
-		lowestItem = qMin(lowestItem, currItem->ItemNr);
+		lowestItem = qMin(lowestItem, Items->indexOf(currItem));
 	}
 	double minx =  std::numeric_limits<double>::max();
 	double miny =  std::numeric_limits<double>::max();
@@ -12898,9 +12867,9 @@
 			groupItem->groupItemList.append(Items->takeAt(d));
 		else
 			groupItem->groupItemList.append(currItem);
+		currItem->Parent = groupItem;
 	}
 	groupItem->asGroupFrame()->adjustXYPosition();
-	renumberItemsInListOrder();
 	itemSelection->clear();
 	itemSelection->addItem(groupItem);
 	GroupCounter++;
@@ -12913,11 +12882,11 @@
 		return NULL;
 	PageItem *currItem;
 	uint selectedItemCount = itemList.count();
-	uint lowestItem = 999999;
+	int lowestItem = 999999;
 	for (uint a = 0; a < selectedItemCount; ++a)
 	{
 		currItem = itemList.at(a);
-		lowestItem = qMin(lowestItem, currItem->ItemNr);
+		lowestItem = qMin(lowestItem, Items->indexOf(currItem));
 	}
 	double minx =  std::numeric_limits<double>::max();
 	double miny =  std::numeric_limits<double>::max();
@@ -12956,8 +12925,8 @@
 		currItem->gYpos = currItem->yPos() - miny;
 		currItem->gWidth = maxx - minx;
 		currItem->gHeight = maxy - miny;
-	}
-	renumberItemsInListOrder();
+		currItem->Parent = groupItem;
+	}
 	groupItem->asGroupFrame()->adjustXYPosition();
 	GroupCounter++;
 	itemList.clear();
@@ -12999,8 +12968,8 @@
 		currItem->gYpos = currItem->yPos() - groupItem->yPos();
 		currItem->gWidth = maxx - minx;
 		currItem->gHeight = maxy - miny;
-	}
-	renumberItemsInListOrder();
+		currItem->Parent = groupItem;
+	}
 	GroupCounter++;
 	groupItem->asGroupFrame()->adjustXYPosition();
 	itemList.clear();
@@ -13051,7 +13020,7 @@
 		}
 	}
 	itemSelection->getVisualGroupRect(&x, &y, &w, &h);
-	uint lowestItem = 999999;
+	int lowestItem = 999999;
 	for (uint a=0; a<selectedItemCount; ++a)
 	{
 		currItem = itemSelection->itemAt(a);
@@ -13059,7 +13028,7 @@
 		currItem->gYpos = currItem->yPos() - y;
 		currItem->gWidth = w;
 		currItem->gHeight = h;
-		lowestItem = qMin(lowestItem, currItem->ItemNr);
+		lowestItem = qMin(lowestItem, Items->indexOf(currItem));
 	}
 	double minx =  std::numeric_limits<double>::max();
 	double miny =  std::numeric_limits<double>::max();
@@ -13094,8 +13063,8 @@
 		currItem = itemSelection->itemAt(c);
 		int d = Items->indexOf(currItem);
 		groupItem->groupItemList.append(Items->takeAt(d));
-	}
-	renumberItemsInListOrder();
+		currItem->Parent = groupItem;
+	}
 	groupItem->asGroupFrame()->adjustXYPosition();
 	itemSelection->clear();
 	itemSelection->addItem(groupItem);
@@ -13154,6 +13123,7 @@
 			for (int c = gcount; c >= 0; c--)
 			{
 				PageItem* gItem = currItem->groupItemList.at(c);
+				gItem->Parent = currItem->Parent;
 				gItem->setXYPos(currItem->xPos() + gItem->gXpos, currItem->yPos() + gItem->gYpos, true);
 				list->insert(d, gItem);
 				itemSelection->addItem(currItem->groupItemList.at(gcount - c));
@@ -13172,10 +13142,10 @@
 				rItem->setXYPos(ma.m11() * n.x() + ma.m21() * n.y() + ma.dx(), ma.m22() * n.y() + ma.m12() * n.x() + ma.dy());
 				rItem->rotateBy(currItem->rotation());
 				setRedrawBounding(rItem);
+				rItem->OwnPage = OnPage(rItem);
 			}
 			tempSelection.clear();
 			tempSelection.delaySignalsOff();
-			renumberItemsInListOrder();
 		}
 		setLoading(wasLoad);
 		itemSelection->delaySignalsOff();
@@ -13238,7 +13208,7 @@
 {
 	PageItem *currItem;
 	PageItem *bb;
-	QList<int> toDel;
+	QList<PageItem *> toDel;
 	toDel.clear();
 	uint docSelectionCount = m_Selection->count();
 	if (docSelectionCount > 1)
@@ -13253,7 +13223,7 @@
 		for (uint a = 1; a < docSelectionCount; ++a)
 		{
 			bb = m_Selection->itemAt(a);
-			toDel.append(bb->ItemNr);
+			toDel.append(bb);
 			QTransform ma;
 			ma.translate(bb->xPos(), bb->yPos());
 			ma.rotate(bb->rotation());
@@ -13272,7 +13242,7 @@
 		//FIXME: stop using m_View
 		m_View->Deselect(true);
 		for (int c = 0; c < toDel.count(); ++c)
-			m_View->SelectItemNr(toDel.at(c));
+			m_View->SelectItem(toDel.at(c));
 		m_Selection->delaySignalsOff();
 		itemSelection_DeleteItem();
 		regionsChanged()->update(QRectF());
@@ -13289,7 +13259,7 @@
 		if (!currItem->isPolygon() || currItem->Segments.count() <= 0)
 			continue;
 		uint StartInd = 0;
-		int currItemNr = currItem->ItemNr;
+		int currItemNr = Items->indexOf(currItem);
 		uint EndInd = currItem->PoLine.size();
 		for (uint a = EndInd-1; a > 0; --a)
 		{
@@ -13299,7 +13269,6 @@
 				bb = new PageItem_Polygon(*currItem);
 				currItemNr++;
 				Items->insert(currItemNr, bb);
-				bb->ItemNr = currItemNr;
 				bb->convertTo(PageItem::Polygon);
 				bb->Frame = false;
 				bb->FrameType = 3;
@@ -13320,7 +13289,6 @@
 		currItem->ClipEdited = true;
 	}
 	m_Selection->delaySignalsOff();
-	renumberItemsInListOrder();
 	//FIXME: stop using m_View
 	m_View->Deselect(true);
 	regionsChanged()->update(QRectF());
@@ -13403,11 +13371,11 @@
 					y = currItem->imageYOffset() * currItem->imageYScale();
 					if ((x != 0.0) || (y != 0.0)) // if the image frame has an offset, its assumed that the user wants the image to stay where it is
 					{
-						SizeItem(w, h, currItem->ItemNr);
+						SizeItem(w, h, currItem);
 						MoveItem(x, y, currItem);
 					}
 					else
-						SizeItem(w, h, currItem->ItemNr, true);
+						SizeItem(w, h, currItem, true);
 					currItem->setImageXYOffset(0.0, 0.0);
 				}
 			}
@@ -13685,7 +13653,7 @@
 	{
 		if ((np.x() < 0) && (!isContourLine) && (!(currItem->isGroup() || currItem->isSymbol())))
 		{
-			Doc->SizeItem(currItem->width() - np.x(), currItem->height(), currItem->ItemNr, false, false, false);
+			Doc->SizeItem(currItem->width() - np.x(), currItem->height(), currItem, false, false, false);
 			if (currItem->rotation() != 0)
 			{
 				FPoint npv(np.x(), 0);
@@ -13700,7 +13668,7 @@
 		}
 		if ((np.y() < 0) && (!isContourLine) && (!(currItem->isGroup() || currItem->isSymbol())))
 		{
-			Doc->SizeItem(currItem->width(), currItem->height() - np.y(), currItem->ItemNr, false, false, false);
+			Doc->SizeItem(currItem->width(), currItem->height() - np.y(), currItem, false, false, false);
 			if (currItem->rotation() != 0)
 			{
 				FPoint npv(0, np.y());
@@ -13984,7 +13952,7 @@
 		{
 			currItem->IProfile = profileName;
 			currItem->UseEmbedded = profileName.startsWith("Embedded");
-			LoadPict(currItem->Pfile, currItem->ItemNr, true);
+			loadPict(currItem->Pfile, currItem, true);
 			currItem->update();
 		}
 	}
@@ -14007,7 +13975,7 @@
 		if (currItem && currItem->itemType() == PageItem::ImageFrame)
 		{
 			currItem->IRender = (eRenderIntent) intentIndex;
-			LoadPict(currItem->Pfile, currItem->ItemNr, true);
+			loadPict(currItem->Pfile, currItem, true);
 			currItem->update();
 		}
 	}
@@ -14313,3 +14281,7 @@
 	regionsChanged()->update(QRectF());
 }
 
+void ScribusDoc::itemSelection_EditWeld()
+{
+	m_ScMW->view->requestMode(modeEditWeldPoint);
+}

Modified: branches/ScribusOIF/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/scribusdoc.h
==============================================================================
--- branches/ScribusOIF/scribus/scribusdoc.h (original)
+++ branches/ScribusOIF/scribus/scribusdoc.h Sun Nov  6 22:52:15 2011
@@ -766,32 +766,20 @@
 	 * Only called from ScribusView. Note the undo target is the page, so the undo code remains their for now.
 	 * @return If an item was committed and the view must emit its signal, which needs removing from here, TODO.
 	 */
-	bool itemAddCommit(const int itemNumber);
+	bool itemAddCommit(PageItem* item);
 	
 	/**
 	 * @brief Finalise item creation. Simply split off code from itemAdd
 	 * Only to be called from itemAdd()
 	 */
-	void itemAddDetails(const PageItem::ItemType itemType, const PageItem::ItemFrameType frameType, const int itemNumber);
+	void itemAddDetails(const PageItem::ItemType itemType, const PageItem::ItemFrameType frameType, PageItem* newItem);
 
 	uint getItemNrfromUniqueID(uint unique);
 	//return pointer to item
 	PageItem* getItemFromName(QString name);
 	//itemDelete
 	//itemBlah...
-	
-	/**
-	 * @brief Run this common frame item update code
-	 */
-	void updateFrameItems();
-	/**
-	 * @brief Renumbers the items into the order they are stored in in the lists.
-	 * Utility function used in various places, basically handles keeping items numbered in the way
-	 * they are layered. When layer is a property and not a fuction of storage, this should be removed.
-	 * Depends on the Items pointer pointing to the correct item list (doc, master, etc).
-	 * @sa updateFrameItems();
-	 */
-	void renumberItemsInListOrder();
+
 	/**
 	 * @brief Rebuild item lists taking into account layer order.
 	 * Utility function used in various places, basically handles keeping items numbered in the way
@@ -809,7 +797,7 @@
 	 * @brief Load images into an image frame, moved from the view
 	 * @retval Return false on failure
 	 */
-	bool LoadPict(QString fn, int ItNr, bool reload = false, bool showMsg = false);
+//	bool LoadPict(QString fn, int ItNr, bool reload = false, bool showMsg = false);
 	/**
 	 * 
 	 * @param fn 
@@ -1069,12 +1057,12 @@
 	bool ApplyGuides(double *x, double *y);
 	bool ApplyGuides(FPoint* point);
 	bool MoveItem(double newX, double newY, PageItem* ite, bool fromMP = false);
-	void RotateItem(double win, int ite);
+//	void RotateItem(double win, int ite);
 	void RotateItem(double win, PageItem *currItem);
 	void MoveRotated(PageItem *currItem, FPoint npv, bool fromMP = false);
-	bool SizeItem(double newX, double newY, int ite, bool fromMP = false, bool DoUpdateClip = true, bool redraw = true);
+//	bool SizeItem(double newX, double newY, int ite, bool fromMP = false, bool DoUpdateClip = true, bool redraw = true);
 	bool SizeItem(double newX, double newY, PageItem *pi, bool fromMP = false, bool DoUpdateClip = true, bool redraw = true);
-	bool MoveSizeItem(FPoint newX, FPoint newY, int ite, bool fromMP = false, bool constrainRotation=false);
+//	bool MoveSizeItem(FPoint newX, FPoint newY, int ite, bool fromMP = false, bool constrainRotation=false);
 	bool MoveSizeItem(FPoint newX, FPoint newY, PageItem* currItem, bool fromMP = false, bool constrainRotation = false);
 	void AdjustItemSize(PageItem *currItem, bool includeGroup = false, bool moveInGroup = true);
 	void moveGroup(double x, double y, bool fromMP = false, Selection* customSelection = 0);
@@ -1183,7 +1171,7 @@
 	bool leaveDrag;
 	PageItem *DraggedElem;
 	PageItem *ElemToLink;
-	QList<uint> DragElements;
+	QList<PageItem*> DragElements;
 private:
 	StyleSet<ParagraphStyle> docParagraphStyles;
 	StyleSet<CharStyle> docCharStyles;
@@ -1535,6 +1523,7 @@
 public slots:
 	void itemSelection_UnWeld();
 	void itemSelection_Weld();
+	void itemSelection_EditWeld();
 };
 
 Q_DECLARE_METATYPE(ScribusDoc*);

Modified: branches/ScribusOIF/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/scribusview.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribusview.cpp (original)
+++ branches/ScribusOIF/scribus/scribusview.cpp Sun Nov  6 22:52:15 2011
@@ -946,7 +946,7 @@
 			int z = Doc->itemAdd(PageItem::ImageFrame, PageItem::Unspecified, dropPosDoc.x(), dropPosDoc.y(), 1, 1, Doc->itemToolPrefs().shapeLineWidth, Doc->itemToolPrefs().imageFillColor, CommonStrings::None, true);
 			PageItem *b = Doc->Items->at(z);
 			b->LayerID = Doc->activeLayer();
-			Doc->LoadPict(url.toLocalFile(), b->ItemNr);
+			Doc->loadPict(url.toLocalFile(), b);
 			b->setWidth(static_cast<double>(b->OrigW * 72.0 / b->pixm.imgInfo.xres));
 			b->setHeight(static_cast<double>(b->OrigH * 72.0 / b->pixm.imgInfo.yres));
 			b->OldB2 = b->width();
@@ -964,7 +964,7 @@
 			if (b->itemType() == PageItem::ImageFrame)
 			{
 				if ((fi.exists()) && (img))
-					Doc->LoadPict(url.toLocalFile(), b->ItemNr);
+					Doc->loadPict(url.toLocalFile(), b);
 			}
 			else if (b->itemType() == PageItem::TextFrame)
 			{
@@ -1081,7 +1081,7 @@
 						pmen->addAction( tr("Cancel"));
 						for (int dre=0; dre<Doc->DragElements.count(); ++dre)
 						{
-							if (Doc->Items->at(Doc->DragElements[dre])->locked())
+							if (Doc->DragElements[dre]->locked())
 							{
 								mov->setEnabled(false);
 								break;
@@ -1110,7 +1110,7 @@
 						tmpSelection.copy(*Doc->m_Selection, true);
 						for (int dre=0; dre<Doc->DragElements.count(); ++dre)
 						{
-							tmpSelection.addItem(Doc->Items->at(Doc->DragElements[dre]), true);
+							tmpSelection.addItem(Doc->DragElements[dre], true);
 						}
 						Doc->m_Selection->copy(tmpSelection, false);
 						PageItem* bb;
@@ -1219,6 +1219,8 @@
 					Doc->MoveItem(nx-currItem->xPos(), ny-currItem->yPos(), currItem);
 				}
 			}
+			if ((Doc->m_Selection->count() > 0) && (Doc->appMode != modeNormal))
+				this->requestMode(modeNormal);
 			updateContents();
 		}
 		if (!Doc->masterPageMode())
@@ -1719,7 +1721,8 @@
 		{
 			Doc->m_Selection->addItem(currItem);
 			currItem->isSingleSel = true;
-			updateContents(currItem->getRedrawBounding(m_canvas->scale()));
+			updateContents();
+//			updateContents(currItem->getRedrawBounding(m_canvas->scale()));
 		}
 		else
 		{
@@ -1741,7 +1744,8 @@
 			double x, y, w, h;
 			Doc->m_Selection->getGroupRect(&x, &y, &w, &h);
 			getGroupRectScreen(&x, &y, &w, &h);
-			updateContents(QRect(static_cast<int>(x-5), static_cast<int>(y-5), static_cast<int>(w+10), static_cast<int>(h+10)));
+			updateContents();
+	//		updateContents(QRect(static_cast<int>(x-5), static_cast<int>(y-5), static_cast<int>(w+10), static_cast<int>(h+10)));
 			//CB move in here as the emitAllToGUI will do it otherwise
 			emit ItemGeom();
 			emit HaveSel(currItem->itemType());
@@ -1893,7 +1897,7 @@
 	if (Doc->bringItemSelectionToFront())
 	{
 //		m_ScMW->outlinePalette->BuildTree();
-		emit LevelChanged(Doc->m_Selection->itemAt(0)->ItemNr);
+//		emit LevelChanged(Doc->m_Selection->itemAt(0)->ItemNr);
 		emit DocChanged();
 		m_canvas->m_viewMode.forceRedraw = true;
 		updateContents();
@@ -1917,8 +1921,9 @@
 			currItem = Doc->m_Selection->itemAt(c);
 			if (currItem->isTableItem && currItem->isSingleSel)
 				return;
-			low = qMin(currItem->ItemNr, low);
-			high = qMax(currItem->ItemNr, high);
+			uint id = Doc->Items->indexOf(currItem);
+			low = qMin(id, low);
+			high = qMax(id, high);
 		}
 		if (low == 0)
 			return;
@@ -1933,8 +1938,8 @@
 		for (int c = 0; c < Doc->m_Selection->count(); ++c)
 		{
 			currItem = Doc->m_Selection->itemAt(c);
-			ObjOrder.insert(currItem->ItemNr, c);
 			d = Doc->Items->indexOf(currItem);
+			ObjOrder.insert(d, c);
 			Doc->Items->takeAt(d);
 		}
 		d = Doc->Items->indexOf(b2);
@@ -1944,13 +1949,12 @@
 			Doc->Items->insert(d+1, Doc->m_Selection->itemAt(Oindex[c]));
 		}
 		Doc->m_Selection->clear();
-		Doc->renumberItemsInListOrder();
 //		m_ScMW->outlinePalette->BuildTree();
 		/*if (wasGUISelection)
 			tempSelection.setIsGUISelection(true);*/
 		*Doc->m_Selection=tempSelection;
 		Doc->m_Selection->delaySignalsOff();
-		emit LevelChanged(Doc->m_Selection->itemAt(0)->ItemNr);
+//		emit LevelChanged(Doc->m_Selection->itemAt(0)->ItemNr);
 		emit DocChanged();
 		m_canvas->m_viewMode.forceRedraw = true;
 		updateContents();
@@ -1974,8 +1978,9 @@
 			currItem = Doc->m_Selection->itemAt(c);
 			if (currItem->isTableItem && currItem->isSingleSel)
 				return;
-			low = qMin(currItem->ItemNr, low);
-			high = qMax(currItem->ItemNr, high);
+			uint id = Doc->Items->indexOf(currItem);
+			low = qMin(id, low);
+			high = qMax(id, high);
 		}
 		if (high == static_cast<uint>(Doc->Items->count()-1))
 			return;
@@ -1990,8 +1995,8 @@
 		for (int c = 0; c < Doc->m_Selection->count(); ++c)
 		{
 			currItem = Doc->m_Selection->itemAt(c);
-			ObjOrder.insert(currItem->ItemNr, c);
 			d = Doc->Items->indexOf(currItem);
+			ObjOrder.insert(d, c);
 			Doc->Items->takeAt(d);
 		}
 		QList<uint> Oindex = ObjOrder.values();
@@ -2003,13 +2008,12 @@
 			Doc->Items->insert(d, Doc->m_Selection->itemAt(Oindex[c]));
 		}
 		Doc->m_Selection->clear();
-		Doc->renumberItemsInListOrder();
 //		m_ScMW->outlinePalette->BuildTree();
 		/*if (wasGUISelection)
 			tempSelection.setIsGUISelection(true);*/
 		*Doc->m_Selection=tempSelection;
 		Doc->m_Selection->delaySignalsOff();
-		emit LevelChanged(Doc->m_Selection->itemAt(0)->ItemNr);
+//		emit LevelChanged(Doc->m_Selection->itemAt(0)->ItemNr);
 		emit DocChanged();
 		m_canvas->m_viewMode.forceRedraw = true;
 		updateContents();
@@ -4018,20 +4022,19 @@
 			delItems.append(tmpSelection.takeItem(offset));
 		}
 		tmpSelection.clear();
+		int ind = Doc->Items->indexOf(currItem);
 		if (newGroupedItems.count() > 1)
 		{
 			for (int ag = 0; ag < newGroupedItems.count(); ++ag)
 			{
-				Doc->Items->insert(currItem->ItemNr+1+ag, newGroupedItems.at(ag));
+				Doc->Items->insert(ind+1+ag, newGroupedItems.at(ag));
 				tmpSelection.addItem(newGroupedItems.at(ag));
 			}
-			Doc->renumberItemsInListOrder();
 			Doc->itemSelection_GroupObjects(true, false, &tmpSelection);
 		}
 		else if (newGroupedItems.count() > 0)
 		{
-			Doc->Items->insert(currItem->ItemNr+1, newGroupedItems.at(0));
-			Doc->renumberItemsInListOrder();
+			Doc->Items->insert(ind+1, newGroupedItems.at(0));
 		}
 		int toDeleteItemCount=delItems.count();
 		if (toDeleteItemCount != 0)

Modified: branches/ScribusOIF/scribus/sctextstruct.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/sctextstruct.cpp
==============================================================================
--- branches/ScribusOIF/scribus/sctextstruct.cpp (original)
+++ branches/ScribusOIF/scribus/sctextstruct.cpp Sun Nov  6 22:52:15 2011
@@ -31,7 +31,6 @@
 		if (refs == 0 && item != NULL)
 		{
 			item->doc()->FrameItems.removeAll(item);
-			item->doc()->updateFrameItems();
 			delete item;
 			item = NULL;
 		}

Modified: branches/ScribusOIF/scribus/ui/about.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/ui/about.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/about.cpp (original)
+++ branches/ScribusOIF/scribus/ui/about.cpp Sun Nov  6 22:52:15 2011
@@ -112,8 +112,8 @@
 	buildID = new QLabel( tab );
 	buildID->setAlignment(Qt::AlignCenter);
 	buildID->setTextInteractionFlags(Qt::TextSelectableByMouse);
-	QString BUILD_DAY = "23";
-	QString BUILD_MONTH = CommonStrings::september;
+	QString BUILD_DAY = "3";
+	QString BUILD_MONTH = CommonStrings::november;
 	QString BUILD_YEAR = "2011";
 	QString BUILD_TIME = "";
 	QString BUILD_TZ = "";

Modified: branches/ScribusOIF/scribus/ui/charselect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/ui/charselect.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/charselect.cpp (original)
+++ branches/ScribusOIF/scribus/ui/charselect.cpp Sun Nov  6 22:52:15 2011
@@ -125,7 +125,6 @@
 			ch = QChar(32);
 		m_Item->itemText.insertChars(ch, true);
 	}
-	m_doc->updateFrameItems();
 	m_doc->view()->DrawNew();
 	m_doc->changed();
 // 	delEdit();
@@ -145,7 +144,6 @@
 	if (ch == QChar(9))
 		ch = QChar(32);
 	m_Item->itemText.insertChars(ch, true);
-	m_doc->updateFrameItems();
 	m_doc->view()->DrawNew();
 	m_doc->changed();
 }

Modified: branches/ScribusOIF/scribus/ui/checkDocument.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/ui/checkDocument.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/checkDocument.cpp (original)
+++ branches/ScribusOIF/scribus/ui/checkDocument.cpp Sun Nov  6 22:52:15 2011
@@ -502,11 +502,10 @@
 		// FREE ITEMS **********************************************8888
 		QMap<PageItem*, errorCodes>::Iterator freeItemsErrorsIt;
 		bool hasfreeItems = false;
-		for (freeItemsErrorsIt = doc->docItemErrors.begin();
-			 freeItemsErrorsIt != doc->docItemErrors.end();
-			 ++freeItemsErrorsIt)
+		for (freeItemsErrorsIt = doc->docItemErrors.begin(); freeItemsErrorsIt != doc->docItemErrors.end(); ++freeItemsErrorsIt)
 		{
-			if (freeItemsErrorsIt.key()->OwnPage == -1)
+			if (doc->OnPage(freeItemsErrorsIt.key()) == -1)
+		//	if (freeItemsErrorsIt.key()->OwnPage == -1)
 			{
 				hasfreeItems = true;
 				break;
@@ -518,11 +517,10 @@
 			bool pageGraveError = false;
 			QTreeWidgetItem * freeItem = new QTreeWidgetItem( reportDisplay);//, pagep );
 // 			pagep = page;
-			for (freeItemsErrorsIt = doc->docItemErrors.begin();
-				 freeItemsErrorsIt != doc->docItemErrors.end();
-				 ++freeItemsErrorsIt)
-			{
-				if (freeItemsErrorsIt.key()->OwnPage == -1)
+			for (freeItemsErrorsIt = doc->docItemErrors.begin(); freeItemsErrorsIt != doc->docItemErrors.end(); ++freeItemsErrorsIt)
+			{
+				if (doc->OnPage(freeItemsErrorsIt.key()) == -1)
+			//	if (freeItemsErrorsIt.key()->OwnPage == -1)
 				{
 					hasError = true;
 					QTreeWidgetItem * object = new QTreeWidgetItem(freeItem);

Modified: branches/ScribusOIF/scribus/ui/cpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/ui/cpalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/cpalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/cpalette.cpp Sun Nov  6 22:52:15 2011
@@ -344,25 +344,8 @@
 PageItem* Cpalette::currentItemFromSelection()
 {
 	PageItem *currentItem = NULL;
-
 	if (currentDoc)
-	{
-		if (currentDoc->m_Selection->count() > 1)
-		{
-			uint lowestItem = 999999;
-			for (int a=0; a < currentDoc->m_Selection->count(); ++a)
-			{
-				currentItem = currentDoc->m_Selection->itemAt(a);
-				lowestItem = qMin(lowestItem, currentItem->ItemNr);
-			}
-			currentItem = currentDoc->Items->at(lowestItem);
-		}
-		else if (currentDoc->m_Selection->count() == 1)
-		{
-			currentItem = currentDoc->m_Selection->itemAt(0);
-		}
-	}
-
+		currentItem = currentDoc->m_Selection->itemAt(0);
 	return currentItem;
 }
 

Modified: branches/ScribusOIF/scribus/ui/extimageprops.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/ui/extimageprops.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/extimageprops.cpp (original)
+++ branches/ScribusOIF/scribus/ui/extimageprops.cpp Sun Nov  6 22:52:15 2011
@@ -305,7 +305,7 @@
 	doPreview = false;
 	if (originalInfo.layerInfo.count() != 0)
 		changedLayer();
-	viewWidget->Doc->LoadPict(currentItem->Pfile, currentItem->ItemNr, true);
+	viewWidget->Doc->loadPict(currentItem->Pfile, currentItem, true);
 	if (pathList->count() != 0)
 	{
 		QList<QListWidgetItem *>sel = pathList->selectedItems();
@@ -332,7 +332,7 @@
 void ExtImageProps::leaveCancel()
 {
 	currentItem->pixm.imgInfo = originalInfo;
-	viewWidget->Doc->LoadPict(currentItem->Pfile, currentItem->ItemNr, true);
+	viewWidget->Doc->loadPict(currentItem->Pfile, currentItem, true);
 	currentItem->imageClip = originalImageClip.copy();
 	currentItem->update();
 	reject();
@@ -345,7 +345,7 @@
 	{
 		if (originalInfo.layerInfo.count() != 0)
 			changedLayer();
-		viewWidget->Doc->LoadPict(currentItem->Pfile, currentItem->ItemNr, true);
+		viewWidget->Doc->loadPict(currentItem->Pfile, currentItem, true);
 		if (pathList->count() != 0)
 		{
 			QList<QListWidgetItem *>sel = pathList->selectedItems();
@@ -370,7 +370,7 @@
 	else
 	{
 		currentItem->pixm.imgInfo = originalInfo;
-		viewWidget->Doc->LoadPict(currentItem->Pfile, currentItem->ItemNr, true);
+		viewWidget->Doc->loadPict(currentItem->Pfile, currentItem, true);
 		currentItem->imageClip = originalImageClip.copy();
 		currentItem->update();
 	}
@@ -401,7 +401,7 @@
 	}
 	if (doPreview)
 	{
-		viewWidget->Doc->LoadPict(currentItem->Pfile, currentItem->ItemNr, true);
+		viewWidget->Doc->loadPict(currentItem->Pfile, currentItem, true);
 		currentItem->update();
 	}
 }

Modified: branches/ScribusOIF/scribus/ui/gradientpreview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/ui/gradientpreview.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/gradientpreview.cpp (original)
+++ branches/ScribusOIF/scribus/ui/gradientpreview.cpp Sun Nov  6 22:52:15 2011
@@ -163,12 +163,13 @@
 
 void GradientPreview::mouseReleaseEvent(QMouseEvent *m)
 {
+	QRect insideRect = QRect(10, 43, width()-20, 13);
 	if (isEditable)
 	{
 		QRect fpo;
 		if (m->button() == Qt::LeftButton)
 		{
-			if ((Mpressed) && (ActStop > 0) && (ActStop != static_cast<int>(StopM.count()-1)) && (outside || m->y() > 60))
+			if ((Mpressed) && (ActStop > 0) && (ActStop != static_cast<int>(StopM.count()-1)) && (outside || !insideRect.contains(m->pos())))
 			{
 				onlyselect = false;
 				fill_gradient.removeStop(ActStop);
@@ -233,6 +234,7 @@
 
 void GradientPreview::mouseMoveEvent(QMouseEvent *m)
 {
+	QRect insideRect = QRect(10, 43, width()-20, 13);
 	if (isEditable)
 	{
 		QRect fpo;
@@ -274,7 +276,7 @@
 				onlyselect = false;
 				repaint();
 			}
-			if ((Mpressed) && (outside || m->y() > 60) && (ActStop > 0) && (ActStop != static_cast<int>(StopM.count()-1)))
+			if ((Mpressed) && (outside || !insideRect.contains(m->pos())) && (ActStop > 0) && (ActStop != static_cast<int>(StopM.count()-1)))
 				qApp->changeOverrideCursor(QCursor(loadIcon("DelPoint.png"), 1, 1));
 		}
 	}

Modified: branches/ScribusOIF/scribus/ui/outlinepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/ui/outlinepalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/outlinepalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/outlinepalette.cpp Sun Nov  6 22:52:15 2011
@@ -150,7 +150,6 @@
 							item->PageItemObject->OwnPage = item->DocObject->OnPage(item->PageItemObject);
 							item->DocObject->scMW()->selectItemsFromOutlines(item->PageItemObject, true);
 						}
-						item->DocObject->renumberItemsInListOrder();
 						QList<QTreeWidgetItem*> selList;
 						selList.append(it);
 						selectItems(selList);
@@ -182,7 +181,6 @@
 								item->PageItemObject->OwnPage = item->DocObject->OnPage(item->PageItemObject);
 								item->DocObject->scMW()->selectItemsFromOutlines(item->PageItemObject, true);
 							}
-							item->DocObject->renumberItemsInListOrder();
 							QList<QTreeWidgetItem*> selList;
 							selList.append(it);
 							selectItems(selList);
@@ -878,7 +876,7 @@
 					if (!pgItem->isSelected())
 					{
 						m_MainWindow->closeActiveWindowMasterPageEditor();
-						currDoc->view()->SelectItemNr(pgItem->ItemNr, false, false);
+						currDoc->view()->SelectItem(pgItem, false, false);
 					}
 					break;
 				default:
@@ -1291,6 +1289,7 @@
 			grp->setText(0, pgItem->itemName());
 			setItemIcon(grp, pgItem);
 			grp->setFlags(Qt::ItemIsEditable | Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
+//			grp->setFlags(Qt::ItemIsEnabled);
 		}
 		else
 		{
@@ -1302,6 +1301,7 @@
 			grp->setText(0, pgItem->itemName());
 			grp->setIcon( 0, groupIcon );
 			grp->setFlags(Qt::ItemIsEditable | Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
+//			grp->setFlags(Qt::ItemIsEnabled);
 			parseSubGroup(grp, &pgItem->groupItemList, itemType, a);
 		}
 	}

Modified: branches/ScribusOIF/scribus/ui/picstatus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/ui/picstatus.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/picstatus.cpp (original)
+++ branches/ScribusOIF/scribus/ui/picstatus.cpp Sun Nov  6 22:52:15 2011
@@ -421,7 +421,7 @@
 	bool oldMasterPageMode = m_Doc->masterPageMode();
 	if (masterPageMode != oldMasterPageMode)
 		m_Doc->setMasterPageMode(masterPageMode);
-	m_Doc->LoadPict(newFilePath, currItem->ItemNr, true);
+	m_Doc->loadPict(newFilePath, currItem, true);
 	if (masterPageMode != oldMasterPageMode)
 		m_Doc->setMasterPageMode(oldMasterPageMode);
 	return currItem->PictureIsAvailable;

Modified: branches/ScribusOIF/scribus/ui/propertiespalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/ui/propertiespalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette.cpp Sun Nov  6 22:52:15 2011
@@ -374,20 +374,21 @@
 
 	if (m_doc)
 	{
-		if (m_doc->m_Selection->count() > 1)
-		{
-			uint lowestItem = 999999;
+		currentItem = m_doc->m_Selection->itemAt(0);
+	/*	if (m_doc->m_Selection->count() > 1)
+		{
+			int lowestItem = 999999;
 			for (int a=0; a<m_doc->m_Selection->count(); ++a)
 			{
 				currentItem = m_doc->m_Selection->itemAt(a);
-				lowestItem = qMin(lowestItem, currentItem->ItemNr);
+				lowestItem = qMin(lowestItem, m_doc->Items->indexOf(currentItem));
 			}
 			currentItem = m_doc->Items->at(lowestItem);
 		}
 		else if (m_doc->m_Selection->count() == 1)
 		{
 			currentItem = m_doc->m_Selection->itemAt(0);
-		}
+		} */
 	}
 
 	return currentItem;
@@ -534,7 +535,7 @@
 		int itemType = currItem ? (int) currItem->itemType() : -1;
 		m_haveItem   = (itemType != -1);
 
-		int visID = TabStack->currentIndex();
+//		int visID = TabStack->currentIndex();
 		TabStack->widget(0)->setEnabled(true);
 		TabStack->setItemEnabled(idXYZItem, true);
 		TabStack->setItemEnabled(idColorsItem, true);

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp Sun Nov  6 22:52:15 2011
@@ -134,7 +134,6 @@
 	connect(noResize , SIGNAL(clicked()), this, SLOT(handleLockSize()));
 	connect(doGroup  , SIGNAL(clicked()), this, SLOT(handleGrouping()) );
 	connect(doUnGroup, SIGNAL(clicked()), this, SLOT(handleUngrouping()) );
-	connect(buttonEditWeldPoint, SIGNAL(clicked()), this, SLOT(handleEditWeldPoint()));
 
 	m_haveItem = false;
 	xposSpin->showValue(0);
@@ -142,7 +141,6 @@
 	widthSpin->showValue(0);
 	heightSpin->showValue(0);
 	rotationSpin->showValue(0);
-	buttonEditWeldPoint->setEnabled(false);
 }
 
 void PropertiesPalette_XYZ::setMainWindow(ScribusMainWindow* mw)
@@ -296,7 +294,7 @@
 
 	nameEdit->setText(m_item->itemName());
 	QString tm;
-	levelLabel->setText(tm.setNum(m_item->ItemNr + 1));
+	levelLabel->setText(tm.setNum(m_doc->Items->indexOf(m_item) + 1));
 
 	connect(nameEdit, SIGNAL(Leaved()), this, SLOT(handleNewName()));
 
@@ -411,7 +409,6 @@
 		setEnabled(true);
 	}
 	updateSpinBoxConstants();
-	buttonEditWeldPoint->setEnabled(m_item->isWelded());
 }
 
 void PropertiesPalette_XYZ::handleSelectionChanged()
@@ -517,7 +514,6 @@
 			heightSpin->showValue(0);
 			rotationSpin->showValue(0);
 			levelLabel->setText("  ");
-			buttonEditWeldPoint->setEnabled(false);
 			setEnabled(false);
 			break;
 		case PageItem::ImageFrame:
@@ -1417,7 +1413,6 @@
 	doLock->setToolTip( tr("Lock or unlock the object"));
 	noResize->setToolTip( tr("Lock or unlock the size of the object"));
 	noPrint->setToolTip( tr("Enable or disable exporting of the object"));
-	buttonEditWeldPoint->setToolTip( tr("Edit the welding point of the object"));
 
 	keepFrameWHRatioButton->setToolTip( tr("Keep the aspect ratio"));
 }
@@ -1502,12 +1497,3 @@
 {
 	m_ScMW->UnGroupObj();
 }
-
-
-void PropertiesPalette_XYZ::handleEditWeldPoint()
-{
-	if (buttonEditWeldPoint->isChecked())
-		m_ScMW->view->requestMode(modeEditWeldPoint);
-	else
-		m_ScMW->view->requestMode(modeNormal);
-}

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_xyz.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/ui/propertiespalette_xyz.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_xyz.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_xyz.h Sun Nov  6 22:52:15 2011
@@ -87,7 +87,6 @@
 	void handleNewName();
 	void handleGrouping();
 	void handleUngrouping();
-	void handleEditWeldPoint();
 
 protected slots:
 	//virtual void reject();

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_xyzbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/ui/propertiespalette_xyzbase.ui
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_xyzbase.ui (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_xyzbase.ui Sun Nov  6 22:52:15 2011
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>280</width>
-    <height>352</height>
+    <height>325</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -307,33 +307,6 @@
         </widget>
        </item>
       </layout>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <layout class="QHBoxLayout" name="horizontalLayout_3">
-     <item>
-      <widget class="QToolButton" name="buttonEditWeldPoint">
-       <property name="text">
-        <string>Edit Weld Point</string>
-       </property>
-       <property name="checkable">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer name="horizontalSpacer_2">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
      </item>
     </layout>
    </item>

Modified: branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp Sun Nov  6 22:52:15 2011
@@ -386,7 +386,7 @@
 		int itemCount = m_doc->Items->count();
 		levelSpin->setMinimum(1);
 		levelSpin->setMaximum(itemCount);
-		levelSpin->setValue(m_item->ItemNr + 1);
+		levelSpin->setValue(m_doc->Items->indexOf(m_item) + 1);
 		numObjsLabel->setText( QString("/ %1").arg(itemCount) );
 
 		if ((m_item->itemType() == PageItem::Line) && m_lineMode)

Modified: branches/ScribusOIF/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/ui/storyeditor.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/storyeditor.cpp (original)
+++ branches/ScribusOIF/scribus/ui/storyeditor.cpp Sun Nov  6 22:52:15 2011
@@ -599,25 +599,33 @@
 
 void SEditor::setAlign(int align)
 {
+	QTextCursor tCursor = this->textCursor();
+	setAlign(tCursor, align);
+}
+
+void SEditor::setAlign(QTextCursor& tCursor, int align)
+{
 	++blockContentsChangeHook;
+	QTextBlockFormat blockFormat;
 	switch (align)
 	{
 	case 0:
-		setAlignment(Qt::AlignLeft);
+		blockFormat.setAlignment(Qt::AlignLeft);
 		break;
 	case 1:
-		setAlignment(Qt::AlignCenter);
+		blockFormat.setAlignment(Qt::AlignCenter);
 		break;
 	case 2:
-		setAlignment(Qt::AlignRight);
+		blockFormat.setAlignment(Qt::AlignRight);
 		break;
 	case 3:
 	case 4:
-		setAlignment(Qt::AlignJustify);
+		blockFormat.setAlignment(Qt::AlignJustify);
 		break;
 	default:
 		break;
 	}
+	tCursor.setBlockFormat(blockFormat);
 	--blockContentsChangeHook;
 }
 
@@ -789,37 +797,38 @@
 void SEditor::updateFromChars(int pa)
 {
 	int start = StyledText.startOfParagraph(pa);
-	int end = StyledText.endOfParagraph(pa);
+	int end   = StyledText.endOfParagraph(pa);
 	if (start >= end)
 		return;
 	setUpdatesEnabled(false);
 	int SelStart = start;
-	int SelEnd = 0;
+	int SelEnd   = start;
 	int pos = textCursor().position();
 	textCursor().clearSelection();
-	int Csty = StyledText.charStyle(start).effects();
+	int effects = StyledText.charStyle(start).effects();
 	for (int a = start; a < end; ++a)
 	{
-		if (Csty == StyledText.charStyle(a).effects())
+		if (effects == StyledText.charStyle(a).effects())
 			SelEnd++;
 		else
 		{
 			textCursor().setPosition(SelStart);
 			textCursor().setPosition(SelEnd, QTextCursor::KeepAnchor);
-			setEffects(Csty);
+			setEffects(effects);
 			textCursor().clearSelection();
-			Csty = StyledText.charStyle(a).effects();
+			effects = StyledText.charStyle(a).effects();
 			SelStart = SelEnd;
 			SelEnd++;
 		}
 	}
-	textCursor().setPosition(SelStart);
-	textCursor().setPosition(SelEnd, QTextCursor::KeepAnchor);
-	setEffects(Csty);
-	textCursor().clearSelection();
-	setAlign(StyledText.paragraphStyle(start).alignment());
+	QTextCursor tCursor = textCursor();
+	tCursor.setPosition(SelStart);
+	tCursor.setPosition(SelEnd, QTextCursor::KeepAnchor);
+	setEffects(tCursor, effects);
+	setAlign(tCursor, StyledText.paragraphStyle(start).alignment());
+	tCursor.clearSelection();
 	setUpdatesEnabled(true);
-	QTextCursor tCursor = textCursor();
+	tCursor = textCursor();
 	tCursor.setPosition(pos);
 	setTextCursor(tCursor);
 }
@@ -870,27 +879,32 @@
 	StoredSel = false;
 }
 
-void SEditor::setEffects(int Csty)
+void SEditor::setEffects(int effects)
+{
+	QTextCursor tCursor = textCursor();
+	setEffects(tCursor, effects);
+	//setTextCursor(tCursor);
+}
+
+void SEditor::setEffects(QTextCursor& tCursor, int effects)
 {
 	++blockContentsChangeHook;
 	QTextCharFormat charF;
-	if (Csty & 8)
+	if (effects & 8)
 		charF.setFontUnderline(true);
 	else
 		charF.setFontUnderline(false);
-	if (Csty & 16)
+	if (effects & 16)
 		charF.setFontStrikeOut(true);
 	else
 		charF.setFontStrikeOut(false);
-	if (Csty & 1)
+	if (effects & 1)
 		charF.setVerticalAlignment(QTextCharFormat::AlignSuperScript);
-	else if (Csty & 2)
+	else if (effects & 2)
 		charF.setVerticalAlignment(QTextCharFormat::AlignSubScript);
 	else
 		charF.setVerticalAlignment(QTextCharFormat::AlignNormal);
-	QTextCursor tCursor = textCursor();
 	tCursor.setCharFormat(charF);
-	setTextCursor(tCursor);
 	--blockContentsChangeHook;
 }
 
@@ -1017,17 +1031,6 @@
 	paste();
 }
 
-/*
-Q_3PopupMenu* SEditor::createPopupMenu(const QPoint & pos)
-{
-	Q_3PopupMenu *p = Q_3TextEdit::createPopupMenu(pos);
-	p->removeItemAt(0);
-	p->removeItemAt(0);
-	p->removeItemAt(0);
-	p->removeItemAt(3);
-	return p;
-}
-*/
 void SEditor::SelClipChange()
 {
 	emit PasteAvail();
@@ -2902,7 +2905,6 @@
 	}
 	FrameItemsDel.clear();
 #endif
-	currDoc->updateFrameItems();
 #if 0
 	if (currItem->asTextFrame())
 	{

Modified: branches/ScribusOIF/scribus/ui/storyeditor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/ui/storyeditor.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/storyeditor.h (original)
+++ branches/ScribusOIF/scribus/ui/storyeditor.h Sun Nov  6 22:52:15 2011
@@ -84,7 +84,7 @@
 	SEditor (QWidget* parent, ScribusDoc *docc, StoryEditor* parentSE);
 	~SEditor() {};
 	void setCurrentDocument(ScribusDoc *docc);
-	void setAlign(int style);
+	void setAlign(int align);
 	void saveItemText(PageItem *currItem);
 	void loadItemText(PageItem *currItem);
 	void loadText(QString tx, PageItem *currItem);
@@ -93,7 +93,7 @@
 	void updateSel(const CharStyle& style);
 	void updateSel(const ParagraphStyle& style);
 	void deleteSel();
-	void setEffects(int Csty);
+	void setEffects(int effects);
 	void setColor(bool marker);
 
 	void insertChars(const QString& text);
@@ -144,6 +144,9 @@
 
 	void insertUpdate(int position, int len);
 
+	void setAlign(QTextCursor& tCursor, int style);
+	void setEffects(QTextCursor& tCursor, int effects);
+
 	int  blockContentsChangeHook;
 	void keyPressEvent(QKeyEvent *k);
 	void inputMethodEvent(QInputMethodEvent *event);
@@ -153,7 +156,6 @@
 	virtual bool canInsertFromMimeData( const QMimeData * source ) const;
 	virtual QMimeData * createMimeDataFromSelection () const;
 	virtual void insertFromMimeData ( const QMimeData * source );
-//	Q3PopupMenu* createPopupMenu(const QPoint & pos);
 	StoryEditor* parentStoryEditor;
 
 protected slots:

Modified: branches/ScribusOIF/scribus/util_math.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/util_math.cpp
==============================================================================
--- branches/ScribusOIF/scribus/util_math.cpp (original)
+++ branches/ScribusOIF/scribus/util_math.cpp Sun Nov  6 22:52:15 2011
@@ -31,7 +31,7 @@
 
 
 
-uint getDouble(QString in, bool raw)
+uint getDouble(const QByteArray in, bool raw)
 {
 	QByteArray bb(4, ' ');
 	if (raw)
@@ -41,10 +41,10 @@
 		bb[2] = static_cast<uchar>(QChar(in.at(1)));
 		bb[1] = static_cast<uchar>(QChar(in.at(2)));
 		bb[0] = static_cast<uchar>(QChar(in.at(3)));*/
-		bb = bb.insert(3, in.at(0));
-		bb = bb.insert(2, in.at(1));
-		bb = bb.insert(1, in.at(2));
-		bb = bb.insert(0, in.at(3));
+		bb[3] = in.at(0);
+		bb[2] = in.at(1);
+		bb[1] = in.at(2);
+		bb[0] = in.at(3);
 	}
 	else
 	{
@@ -53,10 +53,10 @@
 // 		bb[1] = static_cast<uchar>(QChar(in.at(1)));
 // 		bb[2] = static_cast<uchar>(QChar(in.at(2)));
 // 		bb[3] = static_cast<uchar>(QChar(in.at(3)));
-		bb = bb.insert(0, in.at(0));
-		bb = bb.insert(1, in.at(1));
-		bb = bb.insert(2, in.at(2));
-		bb = bb.insert(3, in.at(3));
+		bb[0] = in.at(0);
+		bb[1] = in.at(1);
+		bb[2] = in.at(2);
+		bb[3] = in.at(3);
 	}
 	uint ret;
 	ret = bb[0] & 0xff;

Modified: branches/ScribusOIF/scribus/util_math.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/scribus/util_math.h
==============================================================================
--- branches/ScribusOIF/scribus/util_math.h (original)
+++ branches/ScribusOIF/scribus/util_math.h Sun Nov  6 22:52:15 2011
@@ -13,7 +13,7 @@
 #include <cmath>
 #include <vector>
 
-#include <QString>
+#include <QByteArray>
 #include <QPolygon>
 #include <QList>
 #include <QPainterPath>
@@ -36,7 +36,7 @@
 QList<QPainterPath> SCRIBUS_API decomposePath(QPainterPath &path);
 QPainterPath SCRIBUS_API RegularPolygonPath(double w, double h, uint c, bool star, double factor, double rota, double factor2 = 0.0, double innerRot = 0.0, double factor3 = 0.0);
 QPainterPath SCRIBUS_API SpiralPath(double spiralWidth, double spiralHeight, double spiralStartAngle, double spiralEndAngle, double spiralFactor);
-uint SCRIBUS_API getDouble(QString in, bool raw);
+uint SCRIBUS_API getDouble(const QByteArray in, bool raw);
 inline double SCRIBUS_API sind(double);
 inline double SCRIBUS_API cosd(double);
 inline double SCRIBUS_API square(double);

Modified: branches/ScribusOIF/win32/vc9/scribus-main/Scribus.vcproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16968&path=/branches/ScribusOIF/win32/vc9/scribus-main/Scribus.vcproj
==============================================================================
--- branches/ScribusOIF/win32/vc9/scribus-main/Scribus.vcproj (original)
+++ branches/ScribusOIF/win32/vc9/scribus-main/Scribus.vcproj Sun Nov  6 22:52:15 2011
@@ -2330,6 +2330,10 @@
 				RelativePath="..\..\..\scribus\ui\vruler.cpp"
 				>
 			</File>
+			<File
+				RelativePath="..\..\..\scribus\ui\weldedit.cpp"
+				>
+			</File>
 		</Filter>
 		<Filter
 			Name="Header Files"
@@ -2960,6 +2964,20 @@
 			<File
 				RelativePath="..\..\..\scribus\canvasmode_editweldpoint.h"
 				>
+				<FileConfiguration
+					Name="Debug-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
 			</File>
 			<File
 				RelativePath="..\..\..\scribus\canvasmode_eyedropper.h"
@@ -8755,6 +8773,24 @@
 					/>
 				</FileConfiguration>
 			</File>
+			<File
+				RelativePath="..\..\..\scribus\ui\weldedit.h"
+				>
+				<FileConfiguration
+					Name="Debug-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+			</File>
 		</Filter>
 		<Filter
 			Name="Resource Files"
@@ -9326,6 +9362,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\..\scribus\moc_canvasmode_editweldpoint.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\..\scribus\moc_canvasmode_measurements.cpp"
 				>
 			</File>
@@ -10407,6 +10447,10 @@
 			</File>
 			<File
 				RelativePath="..\..\..\scribus\ui\moc_vruler.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\..\scribus\ui\moc_weldedit.cpp"
 				>
 			</File>
 		</Filter>
@@ -10842,12 +10886,16 @@
 				RelativePath="..\..\..\scribus\ui\useprintermarginsdialog.ui"
 				>
 			</File>
+			<File
+				RelativePath="..\..\..\scribus\ui\weldeditbase.ui"
+				>
+			</File>
 		</Filter>
 		<Filter
 			Name="Win-config"
 			>
 			<File
-				RelativePath="win-config.h"
+				RelativePath="..\win-config.h"
 				>
 			</File>
 		</Filter>




More information about the scribus-commit mailing list