View Issue Details

IDProjectCategoryView StatusLast Update
0017325ScribusGeneralpublic2024-12-08 11:41
Reporternitramr Assigned Tonitramr  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformDesktop PCOSUbuntuOS Version24.10 64-bit
Product Version1.7.0.svn 
Target Version1.7.0Fixed in Version1.7.0.svn 
Summary0017325: Table of Content: "Style of TOC Entry" style combobox show wrong style name
DescriptionThe "Style of TOC Entry" is displayed incorrectly if the selected "included style" does not yet have an assigned style via the Entry properties.

In the document itself, the "Default" style is used instead, but this is not displayed in the TOC settings.
Steps To ReproduceThe "Style of TOC Entry" is displayed incorrectly if the selected "included style" does not yet have an assigned style via the entry properties.

In the document itself, the "Default" style is used instead, but this is not displayed in the TOC settings.

1. Open the document in the appendix
2. On page 2, the last two entries are not yet correctly formatted
3. Open the TOC settings: File -> Document setup -> Table of Contents
4. Select H1 (you can see entry style is "toc")
5. Select H5 (you can see entry is still "toc" but should be "default style")

Because of the incorrectly displayed name, you cannot set the style to "toc".
TagsNo tags attached.
PatchYes

Activities

nitramr

2024-12-01 21:17

developer  

toc_2024-12-01_01.patch (865 bytes)   
Index: scribus/ui/prefs_tableofcontents.cpp
===================================================================
--- scribus/ui/prefs_tableofcontents.cpp	(Revision 26452)
+++ scribus/ui/prefs_tableofcontents.cpp	(Arbeitskopie)
@@ -637,7 +637,7 @@
 	if (i >= 0)
 		tocEntryStyleComboBox->setCurrentIndex(i);
 	else
-		qDebug() << "Style for TOC Entry not found";
+		tocEntryStyleComboBox->setCurrentIndex(0); // Should display "default paragraph style"
 	if (localToCSetupVector[numSelected].entryData[curr].pageLocation == NotShown)
 		setCurrentComboItem(tocEntryNumberPlacementComboBox, trStrPNNotShown);
 	else if (localToCSetupVector[numSelected].entryData[curr].pageLocation == Beginning)
@@ -659,6 +659,7 @@
 	int curr = styleListWidget->currentRow();
 	if (curr < 0)
 		return;
+
 	localToCSetupVector[numSelected].entryData[curr].styleForText = style;
 }
 

toc_2024-12-01_01.patch (865 bytes)   
test.sla (30,020 bytes)   
<?xml version="1.0" encoding="UTF-8"?>
<SCRIBUSUTF8NEW Version="1.7.0.svn">
    <DOCUMENT ANZPAGES="3" PAGEWIDTH="595.275590551181" PAGEHEIGHT="841.889763779528" BORDERLEFT="39.9996850393701" BORDERRIGHT="39.9996850393701" BORDERTOP="39.9996850393701" BORDERBOTTOM="39.9996850393701" PRESET="2" BleedTop="0" BleedLeft="0" BleedRight="0" BleedBottom="0" ORIENTATION="0" PAGESIZE="IsoA_A04" FIRSTNUM="1" BOOK="1" AUTOSPALTEN="1" ABSTSPALTEN="11" UNITS="1" DFONT="Arial Regular" DSIZE="12" DCOL="1" DGAP="0" TabFill="" TabWidth="36" TextDistLeft="0" TextDistRight="0" TextDistBottom="0" TextDistTop="0" FirstLineOffset="1" AUTHOR="" COMMENTS="" KEYWORDS="" PUBLISHER="" DOCDATE="" DOCTYPE="" DOCFORMAT="" DOCIDENT="" DOCSOURCE="" DOCLANGINFO="" DOCRELATION="" DOCCOVER="" DOCRIGHTS="" DOCCONTRIB="" TITLE="" SUBJECT="" VHOCH="33" VHOCHSC="66" VTIEF="33" VTIEFSC="66" VKAPIT="75" BASEGRID="14.4" BASEO="0" AUTOL="100" UnderlinePos="-1" UnderlineWidth="-1" StrikeThruPos="-1" StrikeThruWidth="-1" GROUPC="1" HCMS="0" DPSo="0" DPSFo="0" DPuse="0" DPgam="0" DPbla="1" DPPr="ISO Coated v2 300% (basICColor)" DPIn="sRGB display profile (ICC v2.2)" DPInCMYK="ISO Coated v2 300% (basICColor)" DPIn2="sRGB display profile (ICC v2.2)" DPIn3="ISO Coated v2 300% (basICColor)" DISc="1" DIIm="0" ALAYER="0" LANGUAGE="en_US" AUTOMATIC="1" AUTOCHECK="0" GUIDELOCK="0" SnapToGuides="1" SnapToGrid="0" SnapToElement="0" MINGRID="20.0012598425197" MAJGRID="100.00062992126" SHOWGRID="0" SHOWGUIDES="1" showcolborders="1" SHOWFRAME="1" SHOWControl="0" SHOWLAYERM="0" SHOWMARGIN="1" SHOWBASE="0" SHOWPICT="1" SHOWLINK="0" rulerMode="1" showrulers="1" showBleed="1" rulerXoffset="0" rulerYoffset="0" GuideRad="10" GRAB="4" POLYC="4" POLYF="0.502045814642449" POLYR="0" POLYIR="0" POLYCUR="0" POLYOCUR="0" POLYS="0" arcStartAngle="30" arcSweepAngle="300" spiralStartAngle="0" spiralEndAngle="1080" spiralFactor="1.2" AutoSave="1" AutoSaveTime="600000" AutoSaveCount="1" AutoSaveKeep="0" AUtoSaveInDocDir="1" AutoSaveDir="" ScratchBottom="508.030866141732" ScratchLeft="1000.00062992126" ScratchRight="1000.00062992126" ScratchTop="508.030866141732" GapHorizontal="0" GapVertical="141.732283464567" StartArrow="0" EndArrow="0" PEN="Black" BRUSH="None" PENLINE="Black" PENTEXT="Black" StrokeText="Black" TextBackGround="None" TextLineColor="None" TextBackGroundShade="100" TextLineShade="100" TextPenShade="100" TextStrokeShade="100" STIL="1" STILLINE="1" WIDTH="1" WIDTHLINE="1" PENSHADE="100" LINESHADE="100" BRUSHSHADE="100" CPICT="None" PICTSHADE="100" CSPICT="None" PICTSSHADE="100" PICTSCX="1" PICTSCY="1" PSCALE="1" PASPECT="1" EmbeddedPath="0" HalfRes="1" dispX="10.0006299212598" dispY="10.0006299212598" constrain="15" MINORC="#00ff00" MAJORC="#00ff00" GuideC="#000080" BaseC="#c0c0c0" renderStack="2 0 4 1 3" GridType="0" PAGEC="#ffffff" MARGC="#0000ff" RANDF="0" currentProfile="PDF 1.4" calligraphicPenFillColor="Black" calligraphicPenLineColor="Black" calligraphicPenFillColorShade="100" calligraphicPenLineColorShade="100" calligraphicPenLineWidth="1" calligraphicPenAngle="0" calligraphicPenWidth="10" calligraphicPenStyle="1">
        <CheckProfile Name="PDF 1.3" ignoreErrors="0" autoCheck="1" checkGlyphs="1" checkOrphans="1" checkOverflow="1" checkPictures="1" checkPartFilledImageFrames="0" checkResolution="1" checkTransparency="1" minResolution="144" maxResolution="2400" checkAnnotations="0" checkRasterPDF="1" checkForGIF="1" ignoreOffLayers="0" checkNotCMYKOrSpot="0" checkDeviceColorsAndOutputIntent="0" checkFontNotEmbedded="1" checkFontIsOpenType="1" checkAppliedMasterDifferentSide="1" checkEmptyTextFrames="1"/>
        <CheckProfile Name="PDF 1.4" ignoreErrors="0" autoCheck="1" checkGlyphs="1" checkOrphans="1" checkOverflow="1" checkPictures="1" checkPartFilledImageFrames="0" checkResolution="1" checkTransparency="0" minResolution="144" maxResolution="2400" checkAnnotations="0" checkRasterPDF="1" checkForGIF="1" ignoreOffLayers="0" checkNotCMYKOrSpot="0" checkDeviceColorsAndOutputIntent="0" checkFontNotEmbedded="1" checkFontIsOpenType="1" checkAppliedMasterDifferentSide="1" checkEmptyTextFrames="1"/>
        <CheckProfile Name="PDF 1.5" ignoreErrors="0" autoCheck="1" checkGlyphs="1" checkOrphans="1" checkOverflow="1" checkPictures="1" checkPartFilledImageFrames="0" checkResolution="1" checkTransparency="0" minResolution="144" maxResolution="2400" checkAnnotations="0" checkRasterPDF="1" checkForGIF="1" ignoreOffLayers="0" checkNotCMYKOrSpot="0" checkDeviceColorsAndOutputIntent="0" checkFontNotEmbedded="1" checkFontIsOpenType="1" checkAppliedMasterDifferentSide="1" checkEmptyTextFrames="1"/>
        <CheckProfile Name="PDF 1.6" ignoreErrors="0" autoCheck="1" checkGlyphs="1" checkOrphans="1" checkOverflow="1" checkPictures="1" checkPartFilledImageFrames="0" checkResolution="1" checkTransparency="0" minResolution="144" maxResolution="2400" checkAnnotations="0" checkRasterPDF="1" checkForGIF="1" ignoreOffLayers="0" checkNotCMYKOrSpot="0" checkDeviceColorsAndOutputIntent="0" checkFontNotEmbedded="1" checkFontIsOpenType="0" checkAppliedMasterDifferentSide="1" checkEmptyTextFrames="1"/>
        <CheckProfile Name="PDF/X-1a" ignoreErrors="0" autoCheck="1" checkGlyphs="1" checkOrphans="1" checkOverflow="1" checkPictures="1" checkPartFilledImageFrames="0" checkResolution="1" checkTransparency="1" minResolution="144" maxResolution="2400" checkAnnotations="1" checkRasterPDF="1" checkForGIF="1" ignoreOffLayers="0" checkNotCMYKOrSpot="1" checkDeviceColorsAndOutputIntent="0" checkFontNotEmbedded="1" checkFontIsOpenType="1" checkAppliedMasterDifferentSide="1" checkEmptyTextFrames="1"/>
        <CheckProfile Name="PDF/X-3" ignoreErrors="0" autoCheck="1" checkGlyphs="1" checkOrphans="1" checkOverflow="1" checkPictures="1" checkPartFilledImageFrames="0" checkResolution="1" checkTransparency="1" minResolution="144" maxResolution="2400" checkAnnotations="1" checkRasterPDF="1" checkForGIF="1" ignoreOffLayers="0" checkNotCMYKOrSpot="0" checkDeviceColorsAndOutputIntent="1" checkFontNotEmbedded="1" checkFontIsOpenType="1" checkAppliedMasterDifferentSide="1" checkEmptyTextFrames="1"/>
        <CheckProfile Name="PDF/X-4" ignoreErrors="0" autoCheck="1" checkGlyphs="1" checkOrphans="1" checkOverflow="1" checkPictures="1" checkPartFilledImageFrames="0" checkResolution="1" checkTransparency="0" minResolution="144" maxResolution="2400" checkAnnotations="1" checkRasterPDF="1" checkForGIF="1" ignoreOffLayers="0" checkNotCMYKOrSpot="0" checkDeviceColorsAndOutputIntent="1" checkFontNotEmbedded="1" checkFontIsOpenType="0" checkAppliedMasterDifferentSide="1" checkEmptyTextFrames="1"/>
        <CheckProfile Name="PostScript" ignoreErrors="0" autoCheck="1" checkGlyphs="1" checkOrphans="1" checkOverflow="1" checkPictures="1" checkPartFilledImageFrames="0" checkResolution="1" checkTransparency="1" minResolution="144" maxResolution="2400" checkAnnotations="0" checkRasterPDF="1" checkForGIF="1" ignoreOffLayers="0" checkNotCMYKOrSpot="0" checkDeviceColorsAndOutputIntent="0" checkFontNotEmbedded="0" checkFontIsOpenType="0" checkAppliedMasterDifferentSide="1" checkEmptyTextFrames="1"/>
        <COLOR NAME="Black" SPACE="CMYK" C="0" M="0" Y="0" K="100"/>
        <COLOR NAME="Blue" SPACE="RGB" R="0" G="0" B="255"/>
        <COLOR NAME="Cool Black" SPACE="CMYK" C="60" M="0" Y="0" K="100"/>
        <COLOR NAME="Cyan" SPACE="CMYK" C="100" M="0" Y="0" K="0"/>
        <COLOR NAME="Green" SPACE="RGB" R="0" G="255" B="0"/>
        <COLOR NAME="Magenta" SPACE="CMYK" C="0" M="100" Y="0" K="0"/>
        <COLOR NAME="Red" SPACE="RGB" R="255" G="0" B="0"/>
        <COLOR NAME="Registration" SPACE="CMYK" C="100" M="100" Y="100" K="100" Register="1"/>
        <COLOR NAME="Rich Black" SPACE="CMYK" C="60" M="40" Y="40" K="100"/>
        <COLOR NAME="Warm Black" SPACE="CMYK" C="0" M="60" Y="29.8039215686275" K="100"/>
        <COLOR NAME="White" SPACE="CMYK" C="0" M="0" Y="0" K="0"/>
        <COLOR NAME="Yellow" SPACE="CMYK" C="0" M="0" Y="100" K="0"/>
        <HYPHEN/>
        <CHARSTYLE CNAME="Default Character Style" DefaultStyle="1" FONT="Crimson Pro Regular" FONTSIZE="12" FONTFEATURES="-clig" FEATURES="inherit" FCOLOR="Black" FSHADE="100" HyphenWordMin="3" SCOLOR="Black" BGCOLOR="None" BGSHADE="100" SSHADE="100" TXTSHX="5" TXTSHY="-5" TXTOUT="1" TXTULP="-0.1" TXTULW="-0.1" TXTSTP="-0.1" TXTSTW="-0.1" SCALEH="100" SCALEV="100" BASEO="0" KERN="0" LANGUAGE="en_US"/>
        <STYLE NAME="Default Paragraph Style" DefaultStyle="1" ALIGN="0" DIRECTION="0" LINESPMode="0" LINESP="18" INDENT="0" RMARGIN="0" FIRST="0" VOR="0" NACH="0" ParagraphEffectOffset="0" DROP="0" DROPLIN="2" Bullet="0" Numeration="0" HyphenConsecutiveLines="2" BCOLOR="None" BSHADE="100" CPARENT="Default Character Style"/>
        <STYLE NAME="H1" PARENT="Default Paragraph Style" LINESP="42" VOR="16" NACH="10" CPARENT="Default Character Style" FONTSIZE="36"/>
        <STYLE NAME="H2" PARENT="Default Paragraph Style" LINESP="34" VOR="16" NACH="8" CPARENT="Default Character Style" FONTSIZE="30"/>
        <STYLE NAME="H3" PARENT="Default Paragraph Style" LINESP="28" VOR="16" NACH="6" CPARENT="Default Character Style" FONTSIZE="25"/>
        <STYLE NAME="H4" PARENT="Default Paragraph Style" LINESP="24" VOR="14" NACH="6" CPARENT="Default Character Style" FONTSIZE="21"/>
        <STYLE NAME="H5" PARENT="Default Paragraph Style" LINESP="20" VOR="12" NACH="4" CPARENT="Default Character Style" FONTSIZE="17"/>
        <STYLE NAME="H6" PARENT="Default Paragraph Style" LINESP="16" VOR="10" NACH="2" CPARENT="Default Character Style" FONT="Crimson Pro SemiBold" FONTSIZE="14" FONTFEATURES="-clig"/>
        <STYLE NAME="Small" PARENT="Default Paragraph Style" CPARENT="Default Character Style" FONTSIZE="10"/>
        <STYLE NAME="Toc" PARENT="Default Paragraph Style" CPARENT="Default Character Style">
            <Tabs Type="4" Pos="496.062992125984" Fill="."/>
        </STYLE>
        <STYLE LINESPMode="0" LINESP="18" KERN="0"/>
        <TableStyle NAME="Default Table Style" DefaultStyle="1" FillColor="None" FillShade="100">
            <TableBorderLeft>
                <TableBorderLine Width="1" PenStyle="1" Color="Black" Shade="100"/>
            </TableBorderLeft>
            <TableBorderRight>
                <TableBorderLine Width="1" PenStyle="1" Color="Black" Shade="100"/>
            </TableBorderRight>
            <TableBorderTop>
                <TableBorderLine Width="1" PenStyle="1" Color="Black" Shade="100"/>
            </TableBorderTop>
            <TableBorderBottom>
                <TableBorderLine Width="1" PenStyle="1" Color="Black" Shade="100"/>
            </TableBorderBottom>
        </TableStyle>
        <CellStyle NAME="Default Cell Style" DefaultStyle="1" FillColor="None" FillShade="100" LeftPadding="1" RightPadding="1" TopPadding="1" BottomPadding="1"/>
        <LAYERS NUMMER="0" LEVEL="0" NAME="Background" SICHTBAR="1" DRUCKEN="1" EDIT="1" SELECT="0" FLOW="1" TRANS="1" BLEND="0" OUTL="0" LAYERC="#000000"/>
        <Printer firstUse="1" toFile="0" useAltPrintCommand="0" outputSeparations="0" useSpotColors="1" useColor="1" mirrorH="0" mirrorV="0" useICC="0" doGCR="0" doClip="0" setDevParam="0" useDocBleeds="1" cropMarks="0" bleedMarks="0" registrationMarks="0" colorMarks="0" includePDFMarks="1" PSLevel="3" PrintEngine="3" markLength="20.0013" markOffset="0" BleedTop="0" BleedLeft="0" BleedRight="0" BleedBottom="0" printer="File" filename="" separationName="All" printerCommand=""/>
        <PDF firstUse="1" Thumbnails="0" Articles="0" Bookmarks="0" Compress="1" CMethod="0" Quality="0" EmbedPDF="0" MirrorH="0" MirrorV="0" Clip="0" rangeSel="0" rangeTxt="" RotateDeg="0" PresentMode="0" RecalcPic="0" FontEmbedding="0" Grayscale="0" RGBMode="1" UseProfiles="0" UseProfiles2="0" Binding="0" PicRes="300" Resolution="300" Version="14" Intent="1" Intent2="0" SolidP="sRGB display profile (ICC v2.2)" ImageP="sRGB display profile (ICC v2.2)" PrintP="ISO Coated v2 300% (basICColor)" InfoString="" BTop="0" BLeft="0" BRight="0" BBottom="0" useDocBleeds="0" cropMarks="0" bleedMarks="0" registrationMarks="0" colorMarks="0" docInfoMarks="0" markLength="20.0012598425197" markOffset="0" ImagePr="0" PassOwner="" PassUser="" Permissions="-4" Encrypt="0" UseLayers="0" UseLpi="0" UseSpotColors="1" doMultiFile="0" displayBookmarks="0" displayFullscreen="0" displayLayers="0" displayThumbs="0" hideMenuBar="0" hideToolBar="0" fitWindow="0" openAfterExport="0" PageLayout="0" openAction="">
            <LPI Color="" Frequency="0" Angle="0" SpotFunction="0"/>
            <LPI Color="Black" Frequency="133" Angle="45" SpotFunction="3"/>
            <LPI Color="Cyan" Frequency="133" Angle="105" SpotFunction="3"/>
            <LPI Color="Magenta" Frequency="133" Angle="75" SpotFunction="3"/>
            <LPI Color="Yellow" Frequency="133" Angle="90" SpotFunction="3"/>
        </PDF>
        <DocItemAttributes/>
        <Indexes/>
        <TablesOfContents>
            <TableOfContents Name="Main TOC" ToCSource="Style" ItemAttributeName="None" FrameName="toc" ListNonPrinting="0" Style="None" NumberPlacement="End">
                <StyleInTOC StyleName="H1" TOCStyle="Toc" RemoveLineBreaks="1" NumberPlacement="End"/>
                <StyleInTOC StyleName="H2" TOCStyle="Toc" RemoveLineBreaks="1" NumberPlacement="End"/>
                <StyleInTOC StyleName="H3" TOCStyle="Toc" RemoveLineBreaks="1" NumberPlacement="End"/>
                <StyleInTOC StyleName="H4" TOCStyle="Toc" RemoveLineBreaks="1" NumberPlacement="End"/>
                <StyleInTOC StyleName="H5" TOCStyle="" RemoveLineBreaks="1" NumberPlacement="End"/>
                <StyleInTOC StyleName="H6" TOCStyle="" RemoveLineBreaks="1" NumberPlacement="End"/>
            </TableOfContents>
        </TablesOfContents>
        <NotesStyles>
            <notesStyle Name="Default" Start="1" Endnotes="0" Type="Type_1_2_3" Range="0" Prefix="" Suffix=")" AutoHeight="1" AutoWidth="1" AutoRemove="1" AutoWeld="1" SuperNote="1" SuperMaster="1" MarksStyle="" NotesStyle=""/>
        </NotesStyles>
        <OpticalMarginSets>
            <Set Id="preset_0" Type="preset" Name="Default">
                <Rules>
                    <Rule Left="0" Right="0.5" Unit="7" Characters="U+003A,U+003B,U+2013,U+2033"/>
                    <Rule Left="0" Right="0.75" Unit="7" Characters="U+002C,U+002D,U+002E,U+2010,U+2032"/>
                    <Rule Left="0.25" Right="0.25" Unit="7" Characters="U+2014"/>
                    <Rule Left="0.5" Right="0" Unit="7" Characters="U+2036"/>
                    <Rule Left="0.5" Right="0.5" Unit="7" Characters="U+0022,U+0028,U+0029,U+005B,U+005D,U+00AB,U+00BB,U+201C,U+201D,U+201E,U+201F"/>
                    <Rule Left="0.75" Right="0" Unit="7" Characters="U+2035"/>
                    <Rule Left="0.75" Right="0.75" Unit="7" Characters="U+0027,U+002A,U+0060,U+007E,U+00B4,U+2018,U+2019,U+201A,U+201B,U+2039,U+203A"/>
                </Rules>
            </Set>
        </OpticalMarginSets>
        <PageSets>
            <Set Name="Single Page" FirstPage="0" Rows="1" Columns="1"/>
            <Set Name="Facing Pages" FirstPage="1" Rows="1" Columns="2">
                <PageNames Name="Left Page"/>
                <PageNames Name="Right Page"/>
            </Set>
            <Set Name="3-Fold" FirstPage="0" Rows="1" Columns="3">
                <PageNames Name="Left Page"/>
                <PageNames Name="Middle"/>
                <PageNames Name="Right Page"/>
            </Set>
            <Set Name="4-Fold" FirstPage="0" Rows="1" Columns="4">
                <PageNames Name="Left Page"/>
                <PageNames Name="Middle Left"/>
                <PageNames Name="Middle Right"/>
                <PageNames Name="Right Page"/>
            </Set>
            <Set Name="Single Page" FirstPage="0" Rows="1" Columns="1"/>
            <Set Name="Facing Pages" FirstPage="1" Rows="1" Columns="2">
                <PageNames Name="Left Page"/>
                <PageNames Name="Right Page"/>
            </Set>
            <Set Name="3-Fold" FirstPage="0" Rows="1" Columns="3">
                <PageNames Name="Left Page"/>
                <PageNames Name="Middle"/>
                <PageNames Name="Right Page"/>
            </Set>
            <Set Name="4-Fold" FirstPage="0" Rows="1" Columns="4">
                <PageNames Name="Left Page"/>
                <PageNames Name="Middle Left"/>
                <PageNames Name="Middle Right"/>
                <PageNames Name="Right Page"/>
            </Set>
        </PageSets>
        <Sections>
            <Section Number="0" Name="Section 1" From="0" To="2" Type="Type_1_2_3" Start="1" Reversed="0" Active="1" FillChar="0" FieldWidth="0"/>
        </Sections>
        <MASTERPAGE PAGEXPOS="1000.00062992126" PAGEYPOS="508.030866141732" PAGEWIDTH="595.275590551181" PAGEHEIGHT="841.889763779528" BORDERLEFT="39.9996850393701" BORDERRIGHT="39.9996850393701" BORDERTOP="39.9996850393701" BORDERBOTTOM="39.9996850393701" NUM="0" NAM="Normal Left" MNAM="" Size="IsoA_A04" Orientation="0" LEFT="1" PRESET="2" VerticalGuides="" HorizontalGuides="" AGhorizontalAutoGap="0" AGverticalAutoGap="0" AGhorizontalAutoCount="0" AGverticalAutoCount="0" AGhorizontalAutoRefer="0" AGverticalAutoRefer="0" AGSelection="0 0 0 0" pageEffectDuration="1" pageViewDuration="1" effectType="0" Dm="0" M="0" Di="0"/>
        <MASTERPAGE PAGEXPOS="1000.00062992126" PAGEYPOS="508.030866141732" PAGEWIDTH="595.275590551181" PAGEHEIGHT="841.889763779528" BORDERLEFT="39.9996850393701" BORDERRIGHT="39.9996850393701" BORDERTOP="39.9996850393701" BORDERBOTTOM="39.9996850393701" NUM="1" NAM="Normal Right" MNAM="" Size="IsoA_A04" Orientation="0" LEFT="0" PRESET="2" VerticalGuides="" HorizontalGuides="" AGhorizontalAutoGap="0" AGverticalAutoGap="0" AGhorizontalAutoCount="0" AGverticalAutoCount="0" AGhorizontalAutoRefer="0" AGverticalAutoRefer="0" AGSelection="0 0 0 0" pageEffectDuration="1" pageViewDuration="1" effectType="0" Dm="0" M="0" Di="0"/>
        <PAGE PAGEXPOS="1595.27622047244" PAGEYPOS="508.030866141732" PAGEWIDTH="595.275590551181" PAGEHEIGHT="841.889763779528" BORDERLEFT="39.9996850393701" BORDERRIGHT="39.9996850393701" BORDERTOP="39.9996850393701" BORDERBOTTOM="39.9996850393701" NUM="0" NAM="" MNAM="Normal Right" Size="IsoA_A04" Orientation="0" LEFT="0" PRESET="2" VerticalGuides="" HorizontalGuides="" AGhorizontalAutoGap="0" AGverticalAutoGap="0" AGhorizontalAutoCount="0" AGverticalAutoCount="0" AGhorizontalAutoRefer="0" AGverticalAutoRefer="0" AGSelection="0 0 0 0" pageEffectDuration="1" pageViewDuration="1" effectType="0" Dm="0" M="0" Di="0"/>
        <PAGE PAGEXPOS="1000.00062992126" PAGEYPOS="1491.65291338583" PAGEWIDTH="595.275590551181" PAGEHEIGHT="841.889763779528" BORDERLEFT="39.9996850393701" BORDERRIGHT="39.9996850393701" BORDERTOP="39.9996850393701" BORDERBOTTOM="39.9996850393701" NUM="1" NAM="" MNAM="Normal Left" Size="IsoA_A04" Orientation="0" LEFT="0" PRESET="2" VerticalGuides="" HorizontalGuides="" AGhorizontalAutoGap="0" AGverticalAutoGap="0" AGhorizontalAutoCount="0" AGverticalAutoCount="0" AGhorizontalAutoRefer="0" AGverticalAutoRefer="0" AGSelection="0 0 0 0" pageEffectDuration="1" pageViewDuration="1" effectType="0" Dm="0" M="0" Di="0"/>
        <PAGE PAGEXPOS="1595.27622047244" PAGEYPOS="1491.65291338583" PAGEWIDTH="595.275590551181" PAGEHEIGHT="841.889763779528" BORDERLEFT="39.9996850393701" BORDERRIGHT="39.9996850393701" BORDERTOP="39.9996850393701" BORDERBOTTOM="39.9996850393701" NUM="2" NAM="" MNAM="Normal Right" Size="IsoA_A04" Orientation="0" LEFT="0" PRESET="2" VerticalGuides="" HorizontalGuides="" AGhorizontalAutoGap="0" AGverticalAutoGap="0" AGhorizontalAutoCount="0" AGverticalAutoCount="0" AGhorizontalAutoRefer="0" AGverticalAutoRefer="0" AGSelection="0 0 0 0" pageEffectDuration="1" pageViewDuration="1" effectType="0" Dm="0" M="0" Di="0"/>
        <PAGEOBJECT XPOS="1040.00031496063" YPOS="1531.6525984252" OwnPage="1" ItemID="446685838" PTYPE="4" WIDTH="515.276220472441" HEIGHT="689.977625128381" FRTYPE="0" CLIPEDIT="0" PWIDTH="1" PLINEART="1" ANNAME="toc" LOCALSCX="1" LOCALSCY="1" LOCALX="0" LOCALY="0" LOCALROT="0" PICART="1" SCALETYPE="1" RATIO="1" COLUMNS="1" COLGAP="0" AUTOTEXT="0" EXTRA="0" TEXTRA="0" BEXTRA="0" REXTRA="0" VAlign="0" FLOP="1" PLTSHOW="0" BASEOF="0" textPathType="0" textPathFlipped="0" path="M0 0 L515.276 0 L515.276 689.978 L0 689.978 L0 0 Z" copath="M0 0 L515.276 0 L515.276 689.978 L0 689.978 L0 0 Z" gXpos="1040.00031496063" gYpos="1531.6525984252" gWidth="0" gHeight="0" LAYER="0" NEXTITEM="-1" BACKITEM="-1">
            <StoryText>
                <DefaultStyle/>
                <ITEXT CH="Lorem ipsum dolorsit amet"/>
                <tab/>
                <ITEXT CH="3"/>
                <para PARENT="Toc"/>
                <ITEXT CH="Lorem ipsum dolorsit amet"/>
                <tab/>
                <ITEXT CH="3"/>
                <para PARENT="Toc"/>
                <ITEXT CH="Nulla facilisijhkdjfgh"/>
                <tab/>
                <ITEXT CH="3"/>
                <para PARENT="Toc"/>
                <ITEXT CH="Fusce sollicitudin laoreetdiam"/>
                <tab/>
                <ITEXT CH="3"/>
                <para PARENT="Toc"/>
                <ITEXT CH="Utg nec metus quisHgg"/>
                <tab/>
                <ITEXT CH="3"/>
                <para LINESPMode="0" LINESP="18" KERN="0"/>
                <ITEXT CH="Nam iaculis blanditpurus"/>
                <tab/>
                <ITEXT CH="3"/>
                <para LINESPMode="0" LINESP="18" KERN="0"/>
            </StoryText>
        </PAGEOBJECT>
        <PAGEOBJECT XPOS="1635.27590551181" YPOS="1531.6525984252" OwnPage="2" ItemID="175458519" PTYPE="4" WIDTH="515.276220472441" HEIGHT="761.890393700788" FRTYPE="0" CLIPEDIT="0" PWIDTH="1" PLINEART="1" LOCALSCX="1" LOCALSCY="1" LOCALX="0" LOCALY="0" LOCALROT="0" PICART="1" SCALETYPE="1" RATIO="1" COLUMNS="1" COLGAP="0" AUTOTEXT="0" EXTRA="0" TEXTRA="0" BEXTRA="0" REXTRA="0" VAlign="0" FLOP="0" PLTSHOW="0" BASEOF="0" textPathType="0" textPathFlipped="0" path="M0 0 L515.276 0 L515.276 761.89 L0 761.89 L0 0 Z" copath="M0 0 L515.276 0 L515.276 761.89 L0 761.89 L0 0 Z" gXpos="1635.27590551181" gYpos="1531.6525984252" gWidth="0" gHeight="0" LAYER="0" NEXTITEM="-1" BACKITEM="-1">
            <StoryText>
                <DefaultStyle FONT="Crimson Pro Regular"/>
                <ITEXT CH="Lorem ipsum dolor"/>
                <breakline/>
                <ITEXT CH="sit amet"/>
                <para PARENT="H1"/>
                <ITEXT CH="Consectetuer adipiscing elit. Ut a sapien. Aliquam aliquet purus molestie dolor. Integer quis eros ut erat posuere dictum. Curabitur dignissim. "/>
                <para PARENT="Default Paragraph Style"/>
                <ITEXT CH="Lorem ipsum dolor"/>
                <breakline/>
                <ITEXT CH="sit amet"/>
                <para PARENT="H2"/>
                <ITEXT CH="Consectetuer adipiscing elit. Ut a sapien. Aliquam aliquet purus molestie dolor. Integer quis eros ut erat posuere dictum. Curabitur dignissim. Integer orci. Fusce vulputate lacus at ipsum. Quisque in libero nec mi laoreet volutpat. Aliquam adipiscing, mauris non dictum aliquam, arcu risus dapibus diam, nec sollicitudin quam erat quis ligula. Aenean massa nulla, volutpat eu, accumsan et, fringilla eget, odio. Nulla placerat porta justo. Nulla vitae turpis. Praesent lacus."/>
                <para/>
                <ITEXT CH="Nulla facilisi"/>
                <breakline/>
                <ITEXT CH="jhkdjfgh"/>
                <para PARENT="H3"/>
                <ITEXT CH="Nam varius ante dignissim arcu. Suspendisse molestie dignissim neque. Suspendisse leo ipsum, rutrum cursus, malesuada id, dapibus sed, urna."/>
                <para/>
                <ITEXT CH="Fusce sollicitudin laoreet"/>
                <breakline/>
                <ITEXT CH="diam"/>
                <para PARENT="H4"/>
                <ITEXT CH="Mauris eu quam eget nulla fermentum adipiscing. In hac habitasse platea dictumst. Morbi ut odio vitae eros luctus luctus. Ut diam. Phasellus ullamcorper arcu vitae wisi. Pellentesque urna odio, varius eget, dignissim quis, vehicula placerat, nunc."/>
                <para/>
                <ITEXT CH="Utg nec metus quis"/>
                <breakline/>
                <ITEXT CH="Hgg"/>
                <para PARENT="H5"/>
                <ITEXT CH="Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas tortor metus, pellentesqurabitur interdum posuere risus. Duis egestas, ipsum sit amet molestie tincidunt, ligula libero pretium risus, non faucibus tellus felis mattis sapien. Ut eu velit at massa auctor mattis. Nam tristique velit quis nisl."/>
                <para/>
                <ITEXT CH="Nam iaculis blandit"/>
                <breakline/>
                <ITEXT CH="purus"/>
                <para PARENT="H6"/>
                <ITEXT CH="Mauris odio nibh, hendrerit id, cursus vel, sagittis a, dolor. Nullam turpis lacus, ultrices vel, sagittis vitae, dapibus vel, elit. Suspendisse auctor, sapien et suscipit tempor, turpis enim consequat sem, eu dictum nunc lorem at massa. Pellentesque scelerisque purus. Etiam sed enim. Maecenas sed tortor id turpis consequat consequat. Curabitur fringilla. Sed risus wisi, dictum a, sagittis nec, luctus ac, neque. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed nibh neque, aliquam ut, sagittis id, gravida et, est. Aenean consectetuer pretium enim. Aenean tellus quam, condimentum a, adipiscing et, lacinia vel, ante. Praesent faucibus dignissim enim. Aliquam tincidunt. Mauris leo ante, condimentum eget, vestibulum sit amet, fringilla eget, diam. Nam ultricies ullamcorper nibh. Etiam neque. Ut posuere laoreet pede."/>
                <para/>
                <ITEXT CH="Suspendisse potenti. Cras ut mi sit amet quam consequat consequat. Aenean ut lectus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse vel sapien. Nullam non turpis. Pellentesque elementum pharetra ligula. In rhoncus. Aliquam vel enim consequat sem aliquet hendrerit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam felis."/>
                <para/>
                <ITEXT CH="Suspendisse nibh. Nunc vulputate leo id urna. Donec dictum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse dictum, magna consectetuer hendrerit volutpat, sapien felis faucibus justo, ac dictum lacus pede in metus. Nam commodo. Sed consequat, leo pretium sagittis congue, ante nunc laoreet nisl, ac aliquam risus tellus commodo elit. Cras at elit. Pellentesque suscipit erat vitae mauris. Sed iaculis eros vitae mauris. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse id ante et elit accumsan semper. Sed et nibh eget purus scelerisque volutpat. Sed mi. Proin tellus felis, tincidunt eget, dictum et, adipiscing et, urna. Cras accumsan diam sed turpis. Etiam sollicitudin lacus."/>
                <para/>
                <ITEXT CH="Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque vel erat eget diam consectetuer iaculis. Cras ante velit, suscipit et, porta tempus, dignissim quis, magna. Vivamus viverra, turpis nec rhoncus ultricies, diam turpis eleifend nisl, a eleifend ante felis ac sapien. Integer bibendum. Suspendisse in mi non neque bibendum convallis. Suspendisse potenti. Sed sit amet purus at felis adipiscing aliquam. Vivamus et nisl sit amet mauris aliquet molestie. Integer tortor massa, aliquam a, lacinia nonummy, sagittis nec, eros. Nunc non mauris id eros venenatis adipiscing. Cras et lectus ut nisl pharetra ornare. Proin leo risus, elementum eget, ultrices vitae, molestie sed, erat. Curabitur et lectus in tellus egestas hendrerit. Sed dapibus ipsum. Quisque sit amet ligula. Suspendisse odio dolor, semper id, feugiat quis, sodales id, mauris. Curabitur id ligula ac libero malesuada pharetra."/>
                <para/>
                <ITEXT CH="Vivamus neque velit, ornare vitae, tempor vel, ultrices et, wisi. Cras pede. Phasellus nunc turpis, cursus non, rhoncus vitae, sollicitudin vel, velit. Vivamus suscipit lorem sed felis. Vestibulum vestibulum ultrices turpis. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent ornare nulla nec justo. Sed nec risus ac risus fermentum vestibulum. Etiam viverra viverra sem. Etiam molestie mi quis metus hendrerit tristique."/>
                <para/>
                <ITEXT CH="Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut a sapien. Aliquam aliquet purus molestie dolor. Integer quis eros ut erat posuere dictum. Curabitur dignissim. Integer orci. Fusce vulputate lacus at ipsum. Quisque in libero nec mi laoreet volutpat. Aliquam eros pede, scelerisque quis, tristique cursus, placerat convallis, velit. Nam condimentum. Nulla ut mauris. Curabitur adipiscing, mauris non dictum aliquam, arcu risus dapibus diam, nec sollicitudin quam erat quis ligula. Aenean massa nulla, volutpat eu, accumsan et, fringilla eget, odio. Nulla placerat porta justo. Nulla vitae turpis. Praesent lacus."/>
                <para/>
                <ITEXT CH="Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas tortor metus, pellentesque nec, vehicula vitae, suscipit sed, quam. Aenean scelerisque sodales tortor. Sed purus. Curabitur turpis est, bibendum tristique, porttitor tempor, pulvinar vitae, tortor. Nullam malesuada dapibus orci. Vivamus aliquet tempus velit. Curabitur interdum posuere risus. Duis egestas, ipsum sit amet molestie tincidunt, ligula libero pretium risus, non faucibus tellus felis mattis sapien. Ut eu velit at massa auctor mattis. Nam tristique velit quis nisl."/>
                <trail/>
            </StoryText>
        </PAGEOBJECT>
    </DOCUMENT>
</SCRIBUSUTF8NEW>
test.sla (30,020 bytes)   

nitramr

2024-12-02 18:15

developer   ~0051699

I figured out, when I rename a paragraph style in style manager, it doesn't update the names of the style in the ToC vector data.

The patch below includes the optimized change of the patch above + the renaming fix.
toc_2024-12-02_01.patch (2,257 bytes)   
Index: scribus/scribusdoc.cpp
===================================================================
--- scribus/scribusdoc.cpp	(Revision 26452)
+++ scribus/scribusdoc.cpp	(Arbeitskopie)
@@ -1253,7 +1253,27 @@
 		else
 			m_docCellStyles[i].replaceNamedResources(newNames);
 	}
+	// Replace in ToC
+	for (int i = 0; i < tocSetups().count(); ++i)
+	{
+		// Replace ToC style of included style
+		for (int j = 0; j < tocSetups()[i].entryData.count(); ++j)
+		{
+			QString styleToFind = tocSetups()[i].entryData[j].styleToFind;
+			if (newNames.styles().contains(styleToFind))
+				tocSetups()[i].entryData[j].styleToFind = newNames.styles().value(styleToFind);
 
+			QString styleForText = tocSetups()[i].entryData[j].styleForText;
+
+			if (styleForText.isEmpty())
+				continue;
+
+			if (newNames.styles().contains(styleForText))
+				tocSetups()[i].entryData[j].styleForText = newNames.styles().value(styleForText);
+
+		}
+	}
+
 	QHash<QString,ScPattern>::Iterator it = docPatterns.begin();
 	while (it != docPatterns.end())
 	{
Index: scribus/ui/prefs_tableofcontents.cpp
===================================================================
--- scribus/ui/prefs_tableofcontents.cpp	(Revision 26452)
+++ scribus/ui/prefs_tableofcontents.cpp	(Arbeitskopie)
@@ -633,11 +633,10 @@
 	QSignalBlocker sigBlocker1(tocEntryStyleComboBox);
 	QSignalBlocker sigBlocker2(tocEntryNumberPlacementComboBox);
 	QSignalBlocker sigBlocker3(tocEntryRemoveLineBreaksCheckBox);
-	int i = tocEntryStyleComboBox->findText(localToCSetupVector[numSelected].entryData[curr].styleForText);
-	if (i >= 0)
-		tocEntryStyleComboBox->setCurrentIndex(i);
-	else
-		qDebug() << "Style for TOC Entry not found";
+
+	int i = qMax(tocEntryStyleComboBox->findText(localToCSetupVector[numSelected].entryData[curr].styleForText), 0);
+	tocEntryStyleComboBox->setCurrentIndex(i);
+
 	if (localToCSetupVector[numSelected].entryData[curr].pageLocation == NotShown)
 		setCurrentComboItem(tocEntryNumberPlacementComboBox, trStrPNNotShown);
 	else if (localToCSetupVector[numSelected].entryData[curr].pageLocation == Beginning)
@@ -659,6 +658,7 @@
 	int curr = styleListWidget->currentRow();
 	if (curr < 0)
 		return;
+
 	localToCSetupVector[numSelected].entryData[curr].styleForText = style;
 }
 

toc_2024-12-02_01.patch (2,257 bytes)   

ale

2024-12-03 18:21

manager   ~0051700

again, i would wish that scribus would not use user defined / user visible names internally...

can we have it as a goal for scribus 1.8?

Issue History

Date Modified Username Field Change
2024-12-01 21:17 nitramr New Issue
2024-12-01 21:17 nitramr Status new => assigned
2024-12-01 21:17 nitramr Assigned To => cbradney
2024-12-01 21:17 nitramr File Added: toc_2024-12-01_01.patch
2024-12-01 21:17 nitramr File Added: test.sla
2024-12-01 21:18 nitramr Summary Table of Content: Displayed style => Table of Content: "Style of TOC Entry" style combobox show wrong style name
2024-12-02 18:15 nitramr Note Added: 0051699
2024-12-02 18:15 nitramr File Added: toc_2024-12-02_01.patch
2024-12-03 18:21 ale Note Added: 0051700
2024-12-04 20:27 cbradney Assigned To cbradney => nitramr
2024-12-04 20:27 cbradney Status assigned => resolved
2024-12-04 20:27 cbradney Resolution open => fixed
2024-12-04 20:27 cbradney Fixed in Version => 1.7.0.svn
2024-12-08 11:41 cbradney Status resolved => closed