summaryrefslogtreecommitdiff
path: root/xmloff/source/text/XMLTextFrameContext.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2009-08-27 11:59:20 +0000
committerVladimir Glazounov <vg@openoffice.org>2009-08-27 11:59:20 +0000
commitbca12756a58b79d27fd4c607e6d922bd5ba7da50 (patch)
treed6025d6acfd61542d444d394bd78819f748c8f02 /xmloff/source/text/XMLTextFrameContext.cxx
parentc0033d1ddadee302880a4527f9a91198ccb35e75 (diff)
CWS-TOOLING: integrate CWS sw32a11y01
2009-08-27 10:11:46 +0200 hde r275457 : new testcase i103265 2009-08-27 08:24:31 +0200 hde r275454 : new testcase i103265 2009-08-27 08:23:05 +0200 hde r275453 : new document for testcase i103265 2009-08-26 13:43:33 +0200 hde r275421 : added new autotest 2009-08-26 13:36:28 +0200 hde r275420 : added new autotest 2009-08-18 15:41:18 +0200 od r275113 : #i104300# method <SwEditWin::RequestHelp(..)> - improve help tip for hyperlinks to cross-reference bookmarks. 2009-08-10 15:18:41 +0200 od r274816 : #i73249# method <SwFrameShell::Execute(..)> - no update of fly frame manager on dialog "Title and Description" 2009-08-10 14:24:15 +0200 od r274813 : #i92125# correction of end of file - missing newline end 2009-08-10 14:10:14 +0200 od r274811 : #i92125# correction of end of file - newline missing 2009-08-10 14:00:30 +0200 od r274808 : #i92125# - correct end of file - new line missing 2009-08-10 09:12:30 +0200 od r274794 : CWS-TOOLING: rebase CWS sw32a11y01 to trunk@274622 (milestone: DEV300:m54) 2009-08-07 15:52:59 +0200 od r274775 : #i73249# minor adjustment due to compiler warning 2009-08-07 15:40:38 +0200 od r274774 : #i92125# method <MarkManager::deleteMarks(..)> - do not delete cross-reference bookmark, if deletion occurs inside a certain node 2009-08-06 12:53:05 +0200 od r274717 : #i92125# method <MarkManager::deleteMarks(..) - no move of position for cross-reference bookmark, if move occurs inside certain node. 2009-08-06 12:50:27 +0200 od r274716 : #i92125# method <SwUndoSaveCntnt::DelCntntIndex(..)> - keep cross-reference bookmarks, if deletion occurs inside a certain node. 2009-08-06 09:53:29 +0200 od r274705 : #i103265# method <SwTOXPara::GetURL()> - For outline and template entries create link to bookmark. The bookmark of type CROSSREF_HEADING_BOOKMARK is created, if needed 2009-07-22 13:57:04 +0200 od r274236 : #i73249# adjustment for export of svg:title and svg:description 2009-07-22 13:51:58 +0200 od r274234 : #i73249# adjust and enhance import/export of svg:title and svg:description for Writer's text frames, graphics and embedded objects 2009-07-21 10:26:27 +0200 od r274168 : #i73249# implement support for attributes Title and Description for text frames, graphics and embedded objects in Writer - core, UNO-API, undo/redo and UI 2009-07-21 10:05:15 +0200 od r274164 : #i73249# new optional properties Title and Description as basis frame properties in text documents 2009-07-13 12:19:54 +0200 od r273928 : #i73249# Implementation of Undo/Redo of drawing object's name, title and description
Diffstat (limited to 'xmloff/source/text/XMLTextFrameContext.cxx')
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx128
1 files changed, 99 insertions, 29 deletions
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index c53885e73187..eee8f862f802 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -124,44 +124,45 @@ inline XMLTextFrameContextHyperlink_Impl::XMLTextFrameContextHyperlink_Impl(
{
}
-class XMLTextFrameDescContext_Impl : public SvXMLImportContext
+// --> OD 2009-07-22 #i73249#
+class XMLTextFrameTitleOrDescContext_Impl : public SvXMLImportContext
{
- OUString& rDesc;
+ OUString& mrTitleOrDesc;
public:
TYPEINFO();
- XMLTextFrameDescContext_Impl( SvXMLImport& rImport, sal_uInt16 nPrfx,
- const ::rtl::OUString& rLName,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
- OUString& rD );
- virtual ~XMLTextFrameDescContext_Impl();
+ XMLTextFrameTitleOrDescContext_Impl( SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ OUString& rTitleOrDesc );
+ virtual ~XMLTextFrameTitleOrDescContext_Impl();
virtual void Characters( const OUString& rText );
};
-TYPEINIT1( XMLTextFrameDescContext_Impl, SvXMLImportContext );
+TYPEINIT1( XMLTextFrameTitleOrDescContext_Impl, SvXMLImportContext );
-XMLTextFrameDescContext_Impl::XMLTextFrameDescContext_Impl(
+XMLTextFrameTitleOrDescContext_Impl::XMLTextFrameTitleOrDescContext_Impl(
SvXMLImport& rImport,
- sal_uInt16 nPrfx, const OUString& rLName,
- const Reference< XAttributeList > &,
- OUString& rD ) :
- SvXMLImportContext( rImport, nPrfx, rLName ),
- rDesc( rD )
+ sal_uInt16 nPrfx,
+ const OUString& rLName,
+ OUString& rTitleOrDesc )
+ : SvXMLImportContext( rImport, nPrfx, rLName )
+ , mrTitleOrDesc( rTitleOrDesc )
{
}
-XMLTextFrameDescContext_Impl::~XMLTextFrameDescContext_Impl()
+XMLTextFrameTitleOrDescContext_Impl::~XMLTextFrameTitleOrDescContext_Impl()
{
}
-void XMLTextFrameDescContext_Impl::Characters( const OUString& rText )
+void XMLTextFrameTitleOrDescContext_Impl::Characters( const OUString& rText )
{
- rDesc += rText;
+ mrTitleOrDesc += rText;
}
+// <--
// ------------------------------------------------------------------------
@@ -385,7 +386,11 @@ class XMLTextFrameContext_Impl : public SvXMLImportContext
const ::rtl::OUString sAnchorPageNo;
const ::rtl::OUString sGraphicURL;
const ::rtl::OUString sGraphicFilter;
- const ::rtl::OUString sAlternativeText;
+ // --> OD 2009-07-22 #i73249#
+// const ::rtl::OUString sAlternativeText;
+ const ::rtl::OUString sTitle;
+ const ::rtl::OUString sDescription;
+ // <--
const ::rtl::OUString sFrameStyleName;
const ::rtl::OUString sGraphicRotation;
const ::rtl::OUString sTextBoxServiceName;
@@ -461,6 +466,9 @@ public:
const ::rtl::OUString& rName,
const ::rtl::OUString& rTargetFrameName,
sal_Bool bMap );
+ // --> OD 2009-07-22 #i73249#
+ void SetTitle( const ::rtl::OUString& rTitle );
+ // <--
void SetDesc( const ::rtl::OUString& rDesc );
::com::sun::star::text::TextContentAnchorType GetAnchorType() const { return eAnchorType; }
@@ -829,7 +837,11 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl(
, sAnchorPageNo(RTL_CONSTASCII_USTRINGPARAM("AnchorPageNo"))
, sGraphicURL(RTL_CONSTASCII_USTRINGPARAM("GraphicURL"))
, sGraphicFilter(RTL_CONSTASCII_USTRINGPARAM("GraphicFilter"))
-, sAlternativeText(RTL_CONSTASCII_USTRINGPARAM("AlternativeText"))
+// --> OD 2009-07-22 #i73249#
+//, sAlternativeText(RTL_CONSTASCII_USTRINGPARAM("AlternativeText"))
+, sTitle(RTL_CONSTASCII_USTRINGPARAM("Title"))
+, sDescription(RTL_CONSTASCII_USTRINGPARAM("Description"))
+// <--
, sFrameStyleName(RTL_CONSTASCII_USTRINGPARAM("FrameStyleName"))
, sGraphicRotation(RTL_CONSTASCII_USTRINGPARAM("GraphicRotation"))
, sTextBoxServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextFrame"))
@@ -1262,18 +1274,31 @@ void XMLTextFrameContext_Impl::SetHyperlink( const OUString& rHRef,
}
}
+// --> OD 2009-07-22 #i73249#
+void XMLTextFrameContext_Impl::SetTitle( const OUString& rTitle )
+{
+ if ( xPropSet.is() )
+ {
+ Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
+ if( xPropSetInfo->hasPropertyByName( sTitle ) )
+ {
+ xPropSet->setPropertyValue( sTitle, makeAny( rTitle ) );
+ }
+ }
+}
+
void XMLTextFrameContext_Impl::SetDesc( const OUString& rDesc )
{
if ( xPropSet.is() )
{
- Reference< XPropertySetInfo > xPropSetInfo =
- xPropSet->getPropertySetInfo();
- if( xPropSetInfo->hasPropertyByName( sAlternativeText ) )
+ Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
+ if( xPropSetInfo->hasPropertyByName( sDescription ) )
{
- xPropSet->setPropertyValue( sAlternativeText, makeAny( rDesc ) );
+ xPropSet->setPropertyValue( sDescription, makeAny( rDesc ) );
}
}
}
+// <--
//-----------------------------------------------------------------------------------------------------
@@ -1312,6 +1337,10 @@ XMLTextFrameContext::XMLTextFrameContext(
: SvXMLImportContext( rImport, nPrfx, rLName )
, m_xAttrList( new SvXMLAttributeList( xAttrList ) )
, m_pHyperlink( 0 )
+// --> OD 2009-07-22 #i73249#
+, m_sTitle()
+, m_sDesc()
+// <--
, m_eDefaultAnchorType( eATyp )
// --> OD 2006-03-10 #i51726#
, m_HasAutomaticStyleWithoutParentStyle( sal_False )
@@ -1374,9 +1403,20 @@ void XMLTextFrameContext::EndElement()
{
pImpl->CreateIfNotThere();
- // alternative text
+ // --> OD 2009-07-22 #i73249#
+// // alternative text
+// if( m_sDesc.getLength() )
+// pImpl->SetDesc( m_sDesc );
+ // svg:title
+ if( m_sTitle.getLength() )
+ {
+ pImpl->SetTitle( m_sTitle );
+ }
if( m_sDesc.getLength() )
+ {
pImpl->SetDesc( m_sDesc );
+ }
+ // <--
if( m_pHyperlink )
{
@@ -1494,10 +1534,40 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext(
// the child is a writer frame
if( XML_NAMESPACE_SVG == p_nPrefix )
{
- bool bOld = SvXMLImport::OOo_2x >= GetImport().getGeneratorVersion();
- if( IsXMLToken( rLocalName, bOld ? XML_DESC : XML_TITLE ) )
- pContext = new XMLTextFrameDescContext_Impl( GetImport(), p_nPrefix, rLocalName,
- xAttrList, m_sDesc );
+ // --> OD 2009-07-22 #i73249#
+// bool bOld = SvXMLImport::OOo_2x >= GetImport().getGeneratorVersion();
+// if( IsXMLToken( rLocalName, bOld ? XML_DESC : XML_TITLE ) )
+// pContext = new XMLTextFrameDescContext_Impl( GetImport(), p_nPrefix, rLocalName,
+// xAttrList, m_sDesc );
+ const bool bOld = SvXMLImport::OOo_2x >= GetImport().getGeneratorVersion();
+ if ( bOld )
+ {
+ if ( IsXMLToken( rLocalName, XML_DESC ) )
+ {
+ pContext = new XMLTextFrameTitleOrDescContext_Impl( GetImport(),
+ p_nPrefix,
+ rLocalName,
+ m_sTitle );
+ }
+ }
+ else
+ {
+ if( IsXMLToken( rLocalName, XML_TITLE ) )
+ {
+ pContext = new XMLTextFrameTitleOrDescContext_Impl( GetImport(),
+ p_nPrefix,
+ rLocalName,
+ m_sTitle );
+ }
+ else if ( IsXMLToken( rLocalName, XML_DESC ) )
+ {
+ pContext = new XMLTextFrameTitleOrDescContext_Impl( GetImport(),
+ p_nPrefix,
+ rLocalName,
+ m_sDesc );
+ }
+ }
+ // <--
}
else if( XML_NAMESPACE_DRAW == p_nPrefix )
{