Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
e220dde9
Kaydet (Commit)
e220dde9
authored
Ock 11, 2002
tarafından
Christian Lippka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#92487# add style:list-style for graphic shape styles
üst
877d9bf1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
150 additions
and
89 deletions
+150
-89
XMLShapeStyleContext.cxx
xmloff/source/draw/XMLShapeStyleContext.cxx
+76
-35
sdpropls.cxx
xmloff/source/draw/sdpropls.cxx
+11
-17
sdpropls.hxx
xmloff/source/draw/sdpropls.hxx
+3
-3
shapeexport.cxx
xmloff/source/draw/shapeexport.cxx
+3
-3
xmlaustp.cxx
xmloff/source/style/xmlaustp.cxx
+57
-31
No files found.
xmloff/source/draw/XMLShapeStyleContext.cxx
Dosyayı görüntüle @
e220dde9
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: XMLShapeStyleContext.cxx,v $
* $RCSfile: XMLShapeStyleContext.cxx,v $
*
*
* $Revision: 1.
7
$
* $Revision: 1.
8
$
*
*
* last change: $Author:
thb $ $Date: 2001-07-24 17:06:07
$
* last change: $Author:
cl $ $Date: 2002-01-11 12:18:09
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -68,6 +68,10 @@
...
@@ -68,6 +68,10 @@
#include "XMLShapePropertySetContext.hxx"
#include "XMLShapePropertySetContext.hxx"
#endif
#endif
#ifndef _XMLOFF_CONTEXTID_HXX_
#include "contextid.hxx"
#endif
#ifndef _COM_SUN_STAR_DRAWING_XCONTROLSHAPE_HPP_
#ifndef _COM_SUN_STAR_DRAWING_XCONTROLSHAPE_HPP_
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
#endif
#endif
...
@@ -88,6 +92,10 @@
...
@@ -88,6 +92,10 @@
#include "xmltoken.hxx"
#include "xmltoken.hxx"
#endif
#endif
#ifndef _XMLOFF_XMLERROR_HXX
#include "xmlerror.hxx"
#endif
#include "sdpropls.hxx"
#include "sdpropls.hxx"
using
namespace
::
rtl
;
using
namespace
::
rtl
;
...
@@ -107,7 +115,8 @@ XMLShapeStyleContext::XMLShapeStyleContext(
...
@@ -107,7 +115,8 @@ XMLShapeStyleContext::XMLShapeStyleContext(
const
uno
::
Reference
<
xml
::
sax
::
XAttributeList
>&
xAttrList
,
const
uno
::
Reference
<
xml
::
sax
::
XAttributeList
>&
xAttrList
,
SvXMLStylesContext
&
rStyles
,
SvXMLStylesContext
&
rStyles
,
sal_uInt16
nFamily
)
sal_uInt16
nFamily
)
:
XMLPropStyleContext
(
rImport
,
nPrfx
,
rLName
,
xAttrList
,
rStyles
,
nFamily
)
:
XMLPropStyleContext
(
rImport
,
nPrfx
,
rLName
,
xAttrList
,
rStyles
,
nFamily
),
m_bIsNumRuleAlreadyConverted
(
sal_False
)
{
{
}
}
...
@@ -121,6 +130,10 @@ void XMLShapeStyleContext::SetAttribute( sal_uInt16 nPrefixKey, const ::rtl::OUS
...
@@ -121,6 +130,10 @@ void XMLShapeStyleContext::SetAttribute( sal_uInt16 nPrefixKey, const ::rtl::OUS
{
{
m_sControlDataStyleName
=
rValue
;
m_sControlDataStyleName
=
rValue
;
}
}
else
if
(
(
XML_NAMESPACE_STYLE
==
nPrefixKey
)
&&
IsXMLToken
(
rLocalName
,
::
xmloff
::
token
::
XML_LIST_STYLE_NAME
)
)
{
m_sListStyleName
=
rValue
;
}
else
else
{
{
XMLPropStyleContext
::
SetAttribute
(
nPrefixKey
,
rLocalName
,
rValue
);
XMLPropStyleContext
::
SetAttribute
(
nPrefixKey
,
rLocalName
,
rValue
);
...
@@ -155,9 +168,68 @@ SvXMLImportContext *XMLShapeStyleContext::CreateChildContext(
...
@@ -155,9 +168,68 @@ SvXMLImportContext *XMLShapeStyleContext::CreateChildContext(
void
XMLShapeStyleContext
::
FillPropertySet
(
const
Reference
<
beans
::
XPropertySet
>
&
rPropSet
)
void
XMLShapeStyleContext
::
FillPropertySet
(
const
Reference
<
beans
::
XPropertySet
>
&
rPropSet
)
{
{
if
(
!
m_bIsNumRuleAlreadyConverted
)
{
m_bIsNumRuleAlreadyConverted
=
sal_True
;
// for compatibility to beta files, search for CTF_SD_NUMBERINGRULES_NAME to
// import numbering rules from the style:properties element
const
UniReference
<
XMLPropertySetMapper
>&
rMapper
=
GetStyles
()
->
GetImportPropertyMapper
(
GetFamily
()
)
->
getPropertySetMapper
();
::
std
::
vector
<
XMLPropertyState
>
&
rProperties
=
GetProperties
();
::
std
::
vector
<
XMLPropertyState
>::
iterator
end
(
rProperties
.
end
()
);
::
std
::
vector
<
XMLPropertyState
>::
iterator
property
;
// first, look for the old format, where we had a text:list-style-name
// attribute in the style:properties element
for
(
property
=
rProperties
.
begin
();
property
!=
end
;
property
++
)
{
// find properties with context
if
(
rMapper
->
GetEntryContextId
(
property
->
mnIndex
)
==
CTF_SD_NUMBERINGRULES_NAME
)
break
;
}
// if we did not find an old list-style-name in the properties, and we need one
// because we got a style:list-style attribute in the style-style element
// we generate one
if
(
(
property
==
end
)
&&
(
0
!=
m_sListStyleName
.
getLength
()
)
)
{
sal_Int32
nIndex
=
rMapper
->
FindEntryIndex
(
CTF_SD_NUMBERINGRULES_NAME
);
DBG_ASSERT
(
-
1
!=
nIndex
,
"can't find numbering rules property entry, can't set numbering rule!"
);
XMLPropertyState
aNewState
(
nIndex
);
rProperties
.
push_back
(
aNewState
);
end
=
rProperties
.
end
();
property
=
end
-
1
;
}
// so, if we have an old or a new list style name, we set its value to
// a numbering rule
if
(
property
!=
end
)
{
if
(
0
==
m_sListStyleName
.
getLength
()
)
{
property
->
maValue
>>=
m_sListStyleName
;
}
const
SvxXMLListStyleContext
*
pListStyle
=
GetImport
().
GetTextImport
()
->
FindAutoListStyle
(
m_sListStyleName
);
DBG_ASSERT
(
pListStyle
,
"list-style not found for shape style"
);
if
(
pListStyle
)
{
uno
::
Reference
<
container
::
XIndexReplace
>
xNumRule
(
pListStyle
->
CreateNumRule
(
GetImport
().
GetModel
()
)
);
pListStyle
->
FillUnoNumRule
(
xNumRule
,
NULL
/* const SvI18NMap * ??? */
);
property
->
maValue
<<=
xNumRule
;
}
else
{
property
->
mnIndex
=
-
1
;
}
}
}
XMLPropStyleContext
::
FillPropertySet
(
rPropSet
);
XMLPropStyleContext
::
FillPropertySet
(
rPropSet
);
#ifndef SVX_LIGHT
if
(
m_sControlDataStyleName
.
getLength
())
if
(
m_sControlDataStyleName
.
getLength
())
{
// we had a data-style-name attribute
{
// we had a data-style-name attribute
...
@@ -174,40 +246,9 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet
...
@@ -174,40 +246,9 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet
}
}
}
}
}
}
#endif // #ifndef SVX_LIGHT
}
}
void
XMLShapeStyleContext
::
Finish
(
sal_Bool
bOverwrite
)
void
XMLShapeStyleContext
::
Finish
(
sal_Bool
bOverwrite
)
{
{
const
UniReference
<
XMLPropertySetMapper
>&
rMapper
=
GetStyles
()
->
GetImportPropertyMapper
(
GetFamily
()
)
->
getPropertySetMapper
();
::
std
::
vector
<
XMLPropertyState
>
&
rProperties
=
GetProperties
();
std
::
vector
<
XMLPropertyState
>::
iterator
end
(
rProperties
.
end
()
);
for
(
std
::
vector
<
XMLPropertyState
>::
iterator
property
=
rProperties
.
begin
();
property
!=
end
;
property
++
)
{
// find properties with context
// to prevent writing this property set mnIndex member to -1
if
(
rMapper
->
GetEntryContextId
(
property
->
mnIndex
)
==
CTF_NUMBERINGRULES_NAME
)
{
OUString
sName
;
if
(
property
->
maValue
>>=
sName
)
{
uno
::
Reference
<
container
::
XIndexReplace
>
xNumRule
;
const
SvxXMLListStyleContext
*
pListStyle
=
GetImport
().
GetTextImport
()
->
FindAutoListStyle
(
sName
);
DBG_ASSERT
(
pListStyle
,
"list-style not found for shape style"
);
if
(
pListStyle
)
{
xNumRule
=
pListStyle
->
CreateNumRule
(
GetImport
().
GetModel
()
);
pListStyle
->
FillUnoNumRule
(
xNumRule
,
NULL
/* const SvI18NMap * ??? */
);
}
property
->
maValue
<<=
xNumRule
;
}
break
;
}
}
}
}
xmloff/source/draw/sdpropls.cxx
Dosyayı görüntüle @
e220dde9
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: sdpropls.cxx,v $
* $RCSfile: sdpropls.cxx,v $
*
*
* $Revision: 1.5
6
$
* $Revision: 1.5
7
$
*
*
* last change: $Author: cl $ $Date: 200
1-11-19 14:44:3
9 $
* last change: $Author: cl $ $Date: 200
2-01-11 12:18:0
9 $
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -284,7 +284,7 @@ const XMLPropertyMapEntry aXMLSDProperties[] =
...
@@ -284,7 +284,7 @@ const XMLPropertyMapEntry aXMLSDProperties[] =
MAP
(
"TextRightDistance"
,
XML_NAMESPACE_FO
,
XML_PADDING_RIGHT
,
XML_TYPE_MEASURE
|
MID_FLAG_MULTI_PROPERTY
,
0
),
// exists in SW, too
MAP
(
"TextRightDistance"
,
XML_NAMESPACE_FO
,
XML_PADDING_RIGHT
,
XML_TYPE_MEASURE
|
MID_FLAG_MULTI_PROPERTY
,
0
),
// exists in SW, too
MAP
(
"TextWritingMode"
,
XML_NAMESPACE_DRAW
,
XML_WRITING_MODE
,
XML_SD_TYPE_WRITINGMODE
,
CTF_WRITINGMODE
),
MAP
(
"TextWritingMode"
,
XML_NAMESPACE_DRAW
,
XML_WRITING_MODE
,
XML_SD_TYPE_WRITINGMODE
,
CTF_WRITINGMODE
),
MAP
(
"NumberingRules"
,
XML_NAMESPACE_TEXT
,
XML_LIST_STYLE
,
XML_SD_TYPE_NUMBULLET
|
MID_FLAG_ELEMENT_ITEM
,
CTF_NUMBERINGRULES
),
MAP
(
"NumberingRules"
,
XML_NAMESPACE_TEXT
,
XML_LIST_STYLE
,
XML_SD_TYPE_NUMBULLET
|
MID_FLAG_ELEMENT_ITEM
,
CTF_NUMBERINGRULES
),
MAP
(
"NumberingRules"
,
XML_NAMESPACE_TEXT
,
XML_LIST_STYLE_NAME
,
XML_TYPE_STRING
,
CTF_NUMBERINGRULES_NAME
),
MAP
(
"NumberingRules"
,
XML_NAMESPACE_TEXT
,
XML_LIST_STYLE_NAME
,
XML_TYPE_STRING
,
CTF_
SD_
NUMBERINGRULES_NAME
),
// shadow attributes
// shadow attributes
MAP
(
"Shadow"
,
XML_NAMESPACE_DRAW
,
XML_SHADOW
,
XML_SD_TYPE_SHADOW
,
0
),
MAP
(
"Shadow"
,
XML_NAMESPACE_DRAW
,
XML_SHADOW
,
XML_SD_TYPE_SHADOW
,
0
),
...
@@ -1079,7 +1079,7 @@ XMLShapeExportPropertyMapper::XMLShapeExportPropertyMapper( const UniReference<
...
@@ -1079,7 +1079,7 @@ XMLShapeExportPropertyMapper::XMLShapeExportPropertyMapper( const UniReference<
msCDATA
(
GetXMLToken
(
XML_CDATA
)),
msCDATA
(
GetXMLToken
(
XML_CDATA
)),
msTrue
(
GetXMLToken
(
XML_TRUE
)),
msTrue
(
GetXMLToken
(
XML_TRUE
)),
msFalse
(
GetXMLToken
(
XML_FALSE
)),
msFalse
(
GetXMLToken
(
XML_FALSE
)),
mbIsInAutoStyles
(
sal_
Fals
e
)
mbIsInAutoStyles
(
sal_
Tru
e
)
{
{
}
}
...
@@ -1138,21 +1138,14 @@ void XMLShapeExportPropertyMapper::ContextFilter(
...
@@ -1138,21 +1138,14 @@ void XMLShapeExportPropertyMapper::ContextFilter(
property
->
mnIndex
=
-
1
;
property
->
mnIndex
=
-
1
;
}
}
break
;
break
;
case
CTF_NUMBERINGRULES_NAME
:
case
CTF_
SD_
NUMBERINGRULES_NAME
:
{
{
if
(
mbIsInAutoStyles
)
// this property is not exported in the style:properties element
{
// because its an XIndexAccess and not a string.
uno
::
Reference
<
container
::
XIndexReplace
>
xNumRule
;
// This will be handled in SvXMLAutoStylePoolP::exportStyleAttributes
if
(
property
->
maValue
>>=
xNumRule
)
// This is suboptimal
{
if
(
!
mbIsInAutoStyles
)
const
OUString
sName
=
((
XMLTextListAutoStylePool
*
)
&
mrExport
.
GetTextParagraphExport
()
->
GetListAutoStylePool
())
->
Add
(
xNumRule
);
property
->
maValue
<<=
sName
;
}
}
else
{
property
->
mnIndex
=
-
1
;
property
->
mnIndex
=
-
1
;
}
}
}
break
;
break
;
case
CTF_WRITINGMODE
:
case
CTF_WRITINGMODE
:
...
@@ -1528,3 +1521,4 @@ void XMLPageExportPropertyMapper::handleElementItem(
...
@@ -1528,3 +1521,4 @@ void XMLPageExportPropertyMapper::handleElementItem(
}
}
#endif // #ifndef SVX_LIGHT
#endif // #ifndef SVX_LIGHT
xmloff/source/draw/sdpropls.hxx
Dosyayı görüntüle @
e220dde9
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: sdpropls.hxx,v $
* $RCSfile: sdpropls.hxx,v $
*
*
* $Revision: 1.2
5
$
* $Revision: 1.2
6
$
*
*
* last change: $Author:
dvo $ $Date: 2001-10-25 20:57:02
$
* last change: $Author:
cl $ $Date: 2002-01-11 12:18:09
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -173,7 +173,7 @@ extern const XMLPropertyMapEntry aXMLSDPresPageProps[];
...
@@ -173,7 +173,7 @@ extern const XMLPropertyMapEntry aXMLSDPresPageProps[];
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
#define CTF_NUMBERINGRULES 1000
#define CTF_NUMBERINGRULES 1000
#define CTF_NUMBERINGRULES_NAME
1001
//#define CTF_NUMBERINGRULES_NAME
1001
#define CTF_WRITINGMODE 1002
#define CTF_WRITINGMODE 1002
#define CTF_REPEAT_OFFSET_X 1003
#define CTF_REPEAT_OFFSET_X 1003
#define CTF_REPEAT_OFFSET_Y 1004
#define CTF_REPEAT_OFFSET_Y 1004
...
...
xmloff/source/draw/shapeexport.cxx
Dosyayı görüntüle @
e220dde9
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: shapeexport.cxx,v $
* $RCSfile: shapeexport.cxx,v $
*
*
* $Revision: 1.4
7
$
* $Revision: 1.4
8
$
*
*
* last change: $Author: cl $ $Date: 200
1-11-30 14:12:36
$
* last change: $Author: cl $ $Date: 200
2-01-11 12:18:09
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -839,7 +839,6 @@ SvXMLExportPropertyMapper* XMLShapeExport::CreateShapePropMapper(
...
@@ -839,7 +839,6 @@ SvXMLExportPropertyMapper* XMLShapeExport::CreateShapePropMapper(
new
XMLShapeExportPropertyMapper
(
xMapper
,
new
XMLShapeExportPropertyMapper
(
xMapper
,
(
XMLTextListAutoStylePool
*
)
&
rExport
.
GetTextParagraphExport
()
->
GetListAutoStylePool
(),
(
XMLTextListAutoStylePool
*
)
&
rExport
.
GetTextParagraphExport
()
->
GetListAutoStylePool
(),
rExport
);
rExport
);
((
XMLShapeExportPropertyMapper
*
)
pResult
)
->
SetAutoStyles
(
sal_True
);
// chain text attributes
// chain text attributes
return
pResult
;
return
pResult
;
}
}
...
@@ -1036,6 +1035,7 @@ void XMLShapeExport::ExportGraphicDefaults()
...
@@ -1036,6 +1035,7 @@ void XMLShapeExport::ExportGraphicDefaults()
// construct PropertySetMapper
// construct PropertySetMapper
UniReference
<
SvXMLExportPropertyMapper
>
xPropertySetMapper
(
CreateShapePropMapper
(
rExport
)
);
UniReference
<
SvXMLExportPropertyMapper
>
xPropertySetMapper
(
CreateShapePropMapper
(
rExport
)
);
((
XMLShapeExportPropertyMapper
*
)
xPropertySetMapper
.
get
())
->
SetAutoStyles
(
sal_False
);
// chain text attributes
// chain text attributes
xPropertySetMapper
->
ChainExportMapper
(
XMLTextParagraphExport
::
CreateParaExtPropMapper
(
rExport
));
xPropertySetMapper
->
ChainExportMapper
(
XMLTextParagraphExport
::
CreateParaExtPropMapper
(
rExport
));
...
...
xmloff/source/style/xmlaustp.cxx
Dosyayı görüntüle @
e220dde9
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: xmlaustp.cxx,v $
* $RCSfile: xmlaustp.cxx,v $
*
*
* $Revision: 1.1
4
$
* $Revision: 1.1
5
$
*
*
* last change: $Author:
dvo $ $Date: 2001-10-25 20:57:03
$
* last change: $Author:
cl $ $Date: 2002-01-11 12:14:05
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -60,6 +60,10 @@
...
@@ -60,6 +60,10 @@
************************************************************************/
************************************************************************/
#ifndef _COM_SUN_STAR_CONTAINER_XINDEXREPLACE_HPP_
#include <com/sun/star/container/XIndexReplace.hpp>
#endif
#ifndef _TOOLS_DEBUG_HXX
#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
#include <tools/debug.hxx>
#endif
#endif
...
@@ -82,6 +86,10 @@
...
@@ -82,6 +86,10 @@
#include "xmlexp.hxx"
#include "xmlexp.hxx"
#endif
#endif
#ifndef _XMLOFF_XMLTEXTLISTAUTOSTYLEPOOL_HXX
#include "XMLTextListAutoStylePool.hxx"
#endif
#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX
#ifndef _XMLOFF_PAGEMASTERSTYLEMAP_HXX
#include "PageMasterStyleMap.hxx"
#include "PageMasterStyleMap.hxx"
#endif
#endif
...
@@ -112,14 +120,14 @@ void SvXMLAutoStylePoolP::exportStyleAttributes(
...
@@ -112,14 +120,14 @@ void SvXMLAutoStylePoolP::exportStyleAttributes(
#endif
#endif
)
const
)
const
{
{
if
(
XML_STYLE_FAMILY_SD_GRAPHICS_ID
==
nFamily
)
if
(
(
XML_STYLE_FAMILY_SD_GRAPHICS_ID
==
nFamily
)
||
(
XML_STYLE_FAMILY_SD_PRESENTATION_ID
==
nFamily
)
)
{
// it's a graphics style
{
// it's a graphics style
UniReference
<
XMLPropertySetMapper
>
aPropertyMapper
=
rPropExp
.
getPropertySetMapper
();
UniReference
<
XMLPropertySetMapper
>
aPropertyMapper
=
rPropExp
.
getPropertySetMapper
();
DBG_ASSERT
(
aPropertyMapper
.
is
(),
"SvXMLAutoStylePoolP::exportStyleAttributes: invalid property set mapper!"
);
DBG_ASSERT
(
aPropertyMapper
.
is
(),
"SvXMLAutoStylePoolP::exportStyleAttributes: invalid property set mapper!"
);
#ifdef DBG_UTIL
sal_Bool
bFoundControlShapeDataStyle
=
sal_False
;
sal_Bool
bFoundControlShapeDataStyle
=
sal_False
;
#endif
sal_Bool
bFoundNumberingRulesName
=
sal_False
;
for
(
vector
<
XMLPropertyState
>::
const_iterator
pProp
=
rProperties
.
begin
();
for
(
vector
<
XMLPropertyState
>::
const_iterator
pProp
=
rProperties
.
begin
();
pProp
!=
rProperties
.
end
();
pProp
!=
rProperties
.
end
();
++
pProp
++
pProp
...
@@ -127,36 +135,54 @@ void SvXMLAutoStylePoolP::exportStyleAttributes(
...
@@ -127,36 +135,54 @@ void SvXMLAutoStylePoolP::exportStyleAttributes(
{
{
if
(
pProp
->
mnIndex
>
-
1
)
if
(
pProp
->
mnIndex
>
-
1
)
{
// it's a valid property
{
// it's a valid property
if
(
CTF_SD_CONTROL_SHAPE_DATA_STYLE
==
aPropertyMapper
->
GetEntryContextId
(
pProp
->
mnIndex
))
switch
(
aPropertyMapper
->
GetEntryContextId
(
pProp
->
mnIndex
)
)
{
// it's the control shape data style property
{
case
CTF_SD_CONTROL_SHAPE_DATA_STYLE
:
{
// it's the control shape data style property
if
(
bFoundControlShapeDataStyle
)
{
DBG_ERROR
(
"SvXMLAutoStylePoolP::exportStyleAttributes: found two properties with the ControlShapeDataStyle context id!"
);
// already added the attribute for the first occurence
break
;
}
// obtain the data style name
::
rtl
::
OUString
sControlDataStyleName
;
pProp
->
maValue
>>=
sControlDataStyleName
;
DBG_ASSERT
(
sControlDataStyleName
.
getLength
(),
"SvXMLAutoStylePoolP::exportStyleAttributes: invalid property value for the data style name!"
);
// add the attribute
GetExport
().
AddAttribute
(
aPropertyMapper
->
GetEntryNameSpace
(
pProp
->
mnIndex
),
aPropertyMapper
->
GetEntryXMLName
(
pProp
->
mnIndex
),
sControlDataStyleName
);
#ifdef DBG_UTIL
// check if there is another property with the special context id we're handling here
if
(
bFoundControlShapeDataStyle
)
bFoundControlShapeDataStyle
=
sal_True
;
break
;
}
case
CTF_SD_NUMBERINGRULES_NAME
:
{
{
DBG_ERROR
(
"SvXMLAutoStylePoolP::exportStyleAttributes: found two properties with the ControlShapeDataStyle context id!"
);
if
(
bFoundNumberingRulesName
)
// already added the attribute for the first occurence
{
DBG_ERROR
(
"SvXMLAutoStylePoolP::exportStyleAttributes: found two properties with the numbering rules name context id!"
);
// already added the attribute for the first occurence
break
;
}
uno
::
Reference
<
container
::
XIndexReplace
>
xNumRule
;
pProp
->
maValue
>>=
xNumRule
;
if
(
xNumRule
.
is
()
&&
(
xNumRule
->
getCount
()
>
0
)
)
{
const
OUString
sName
(((
XMLTextListAutoStylePool
*
)
&
GetExport
().
GetTextParagraphExport
()
->
GetListAutoStylePool
())
->
Add
(
xNumRule
));
GetExport
().
AddAttribute
(
XML_NAMESPACE_STYLE
,
XML_LIST_STYLE_NAME
,
sName
);
}
bFoundNumberingRulesName
=
sal_True
;
break
;
break
;
}
}
#endif
// obtain the data style name
::
rtl
::
OUString
sControlDataStyleName
;
pProp
->
maValue
>>=
sControlDataStyleName
;
DBG_ASSERT
(
sControlDataStyleName
.
getLength
(),
"SvXMLAutoStylePoolP::exportStyleAttributes: invalid property value for the data style name!"
);
// add the attribute
GetExport
().
AddAttribute
(
aPropertyMapper
->
GetEntryNameSpace
(
pProp
->
mnIndex
),
aPropertyMapper
->
GetEntryXMLName
(
pProp
->
mnIndex
),
sControlDataStyleName
);
#ifdef DBG_UTIL
// in a non-pro version, check if there is another property with the special context id we're handling here
bFoundControlShapeDataStyle
=
sal_True
;
continue
;
#else
// in a pro version, just leave the loop
break
;
#endif
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment