You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2014/12/26 10:15:36 UTC

[Issue 125968] New: Error: duplicate style name if display nam contain spaces (Debug Output)

https://issues.apache.org/ooo/show_bug.cgi?id=125968

          Issue ID: 125968
        Issue Type: DEFECT
           Summary: Error: duplicate style name if display nam contain
                    spaces (Debug Output)
           Product: General
           Version: 4.1.1
          Hardware: All
                OS: Windows, all
            Status: CONFIRMED
          Severity: normal
          Priority: P3
         Component: code
          Assignee: issues@openoffice.apache.org
          Reporter: oliver.brinzing@gmx.de

Created attachment 84316
  --> https://issues.apache.org/ooo/attachment.cgi?id=84316&action=edit
duplicate_style_error

step to reproduce:
- open attached file with a debug version of aoo4.1.1.

Debug Output
-------------------
Error: duplicate style name
>From File c:/build_tmp/aoo-4.1.1/main/xmloff/source/core/xmlimp.cxx at Line
1467
Abort ? (Yes=abort / No=ignore / Cancel=core dump)

the file contains a paragraph and graphic style with name "X X":

<style:style style:name="X_20_X" style:display-name="X X"
style:family="paragraph" 
                  style:parent-style-name="Standard"/>
<style:style style:name="X_20_X" style:display-name="X X"
style:family="graphic"/>

void SvXMLImport::AddStyleDisplayName( sal_uInt16 nFamily,  const OUString&
rName,
                                   const OUString& rDisplayName )
{
    if( !mpStyleMap )
    {
               [...]
    }

    StyleMap::key_type aKey( nFamily, rName );
    StyleMap::value_type aValue( aKey, rDisplayName );
    ::std::pair<StyleMap::iterator,bool> aRes( mpStyleMap->insert( aValue ) );
    OSL_ENSURE( aRes.second, "duplicate style name" );
}


the problem seems to be the space in display name "X X", same file with "XX"
will work.

-- 
You are receiving this mail because:
You are the assignee for the issue.
You are watching all issue changes.