Kaydet (Commit) 71e13c13 authored tarafından Christian Lippka's avatar Christian Lippka

#96027# added support for linked pages

üst 0f055c04
<!-- <!--
$Id: drawing.mod,v 1.70 2001-11-15 17:07:26 cl Exp $ $Id: drawing.mod,v 1.71 2001-12-17 15:54:45 cl Exp $
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
...@@ -510,6 +510,10 @@ ...@@ -510,6 +510,10 @@
<!ATTLIST draw:page draw:master-page-name %styleName; #REQUIRED> <!ATTLIST draw:page draw:master-page-name %styleName; #REQUIRED>
<!ATTLIST draw:page presentation:presentation-page-layout-name %styleName; #IMPLIED> <!ATTLIST draw:page presentation:presentation-page-layout-name %styleName; #IMPLIED>
<!ATTLIST draw:page draw:id %nonNegativeInteger; #IMPLIED> <!ATTLIST draw:page draw:id %nonNegativeInteger; #IMPLIED>
<!ATTLIST draw:page xlink:href %uriReference; #IMPLIED>
<!ATTLIST draw:page xlink:type (simple) #IMPLIED>
<!ATTLIST draw:page xlink:show (replace) #IMPLIED>
<!ATTLIST draw:page xlink:actuate (onRequest) #IMPLIED>
<!-- Presentation notes --> <!-- Presentation notes -->
<!ELEMENT presentation:notes (%shapes;)*> <!ELEMENT presentation:notes (%shapes;)*>
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: sdxmlexp.cxx,v $ * $RCSfile: sdxmlexp.cxx,v $
* *
* $Revision: 1.78 $ * $Revision: 1.79 $
* *
* last change: $Author: cl $ $Date: 2001-11-27 14:14:16 $ * last change: $Author: cl $ $Date: 2001-12-17 15:51:30 $
* *
* 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
...@@ -1773,6 +1773,32 @@ void SdXMLExport::_ExportContent() ...@@ -1773,6 +1773,32 @@ void SdXMLExport::_ExportContent()
AddAttribute(XML_NAMESPACE_PRESENTATION, XML_PRESENTATION_PAGE_LAYOUT_NAME, maDrawPagesAutoLayoutNames[nPageInd+1]); AddAttribute(XML_NAMESPACE_PRESENTATION, XML_PRESENTATION_PAGE_LAYOUT_NAME, maDrawPagesAutoLayoutNames[nPageInd+1]);
} }
uno::Reference< beans::XPropertySet > xProps( xDrawPage, uno::UNO_QUERY );
if( xProps.is() )
{
OUString aBookmarkURL;
xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "BookmarkURL" ) ) ) >>= aBookmarkURL;
if( aBookmarkURL.getLength() )
{
sal_Int32 nIndex = aBookmarkURL.lastIndexOf( (sal_Unicode)'#' );
if( nIndex != -1 )
{
OUString aFileName( aBookmarkURL.copy( 0, nIndex ) );
OUString aBookmarkName( aBookmarkURL.copy( nIndex+1 ) );
aBookmarkURL = GetRelativeReference( aFileName );
aBookmarkURL += OUString( (sal_Unicode)'#' );
aBookmarkURL += aBookmarkName;
}
AddAttribute ( XML_NAMESPACE_XLINK, XML_HREF, aBookmarkURL);
AddAttribute ( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
AddAttribute ( XML_NAMESPACE_XLINK, XML_SHOW, XML_REPLACE );
AddAttribute ( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONREQUEST );
}
}
// write page // write page
SvXMLElementExport aDPG(*this, XML_NAMESPACE_DRAW, XML_PAGE, sal_True, sal_True); SvXMLElementExport aDPG(*this, XML_NAMESPACE_DRAW, XML_PAGE, sal_True, sal_True);
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: sdxmlimp.cxx,v $ * $RCSfile: sdxmlimp.cxx,v $
* *
* $Revision: 1.33 $ * $Revision: 1.34 $
* *
* last change: $Author: cl $ $Date: 2001-11-08 15:40:58 $ * last change: $Author: cl $ $Date: 2001-12-17 15:51:30 $
* *
* 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
...@@ -216,7 +216,8 @@ static __FAR_DATA SvXMLTokenMapEntry aDrawPageAttrTokenMap[] = ...@@ -216,7 +216,8 @@ static __FAR_DATA SvXMLTokenMapEntry aDrawPageAttrTokenMap[] =
{ XML_NAMESPACE_DRAW, XML_STYLE_NAME, XML_TOK_DRAWPAGE_STYLE_NAME }, { XML_NAMESPACE_DRAW, XML_STYLE_NAME, XML_TOK_DRAWPAGE_STYLE_NAME },
{ XML_NAMESPACE_DRAW, XML_MASTER_PAGE_NAME, XML_TOK_DRAWPAGE_MASTER_PAGE_NAME }, { XML_NAMESPACE_DRAW, XML_MASTER_PAGE_NAME, XML_TOK_DRAWPAGE_MASTER_PAGE_NAME },
{ XML_NAMESPACE_PRESENTATION, XML_PRESENTATION_PAGE_LAYOUT_NAME, XML_TOK_DRAWPAGE_PAGE_LAYOUT_NAME }, { XML_NAMESPACE_PRESENTATION, XML_PRESENTATION_PAGE_LAYOUT_NAME, XML_TOK_DRAWPAGE_PAGE_LAYOUT_NAME },
{ XML_NAMESPACE_DRAW, XML_ID, XML_TOK_DRAWPAGE_ID }, { XML_NAMESPACE_DRAW, XML_ID, XML_TOK_DRAWPAGE_ID },
{ XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_DRAWPAGE_HREF },
XML_TOKEN_MAP_END XML_TOKEN_MAP_END
}; };
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: sdxmlimp_impl.hxx,v $ * $RCSfile: sdxmlimp_impl.hxx,v $
* *
* $Revision: 1.18 $ * $Revision: 1.19 $
* *
* last change: $Author: thb $ $Date: 2001-10-24 15:22:21 $ * last change: $Author: cl $ $Date: 2001-12-17 15:51:30 $
* *
* 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
...@@ -175,7 +175,8 @@ enum SdXMLDrawPageAttrTokenMap ...@@ -175,7 +175,8 @@ enum SdXMLDrawPageAttrTokenMap
XML_TOK_DRAWPAGE_STYLE_NAME, XML_TOK_DRAWPAGE_STYLE_NAME,
XML_TOK_DRAWPAGE_MASTER_PAGE_NAME, XML_TOK_DRAWPAGE_MASTER_PAGE_NAME,
XML_TOK_DRAWPAGE_PAGE_LAYOUT_NAME, XML_TOK_DRAWPAGE_PAGE_LAYOUT_NAME,
XML_TOK_DRAWPAGE_ID XML_TOK_DRAWPAGE_ID,
XML_TOK_DRAWPAGE_HREF
}; };
enum SdXMLDrawPageElemTokenMap enum SdXMLDrawPageElemTokenMap
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: ximpbody.cxx,v $ * $RCSfile: ximpbody.cxx,v $
* *
* $Revision: 1.17 $ * $Revision: 1.18 $
* *
* last change: $Author: cl $ $Date: 2001-09-28 08:48:46 $ * last change: $Author: cl $ $Date: 2001-12-17 15:51:30 $
* *
* 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
...@@ -171,6 +171,12 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport, ...@@ -171,6 +171,12 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
sal_Int32 nId; sal_Int32 nId;
if( SvXMLUnitConverter::convertNumber( nId, sValue ) ) if( SvXMLUnitConverter::convertNumber( nId, sValue ) )
nPageId = nId; nPageId = nId;
break;
}
case XML_TOK_DRAWPAGE_HREF:
{
maHREF = sValue;
break;
} }
} }
} }
...@@ -298,6 +304,26 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport, ...@@ -298,6 +304,26 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
} }
} }
if( maHREF.getLength() )
{
uno::Reference< beans::XPropertySet > xProps( xDrawPage, uno::UNO_QUERY );
if( xProps.is() )
{
sal_Int32 nIndex = maHREF.lastIndexOf( (sal_Unicode)'#' );
if( nIndex != -1 )
{
OUString aFileName( maHREF.copy( 0, nIndex ) );
OUString aBookmarkName( maHREF.copy( nIndex+1 ) );
maHREF = GetImport().GetAbsoluteReference( aFileName );
maHREF += OUString( (sal_Unicode)'#' );
maHREF += aBookmarkName;
}
xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "BookmarkURL" ) ), uno::makeAny( maHREF ) );
}
}
SetLayout(); SetLayout();
DeleteAllShapes(); DeleteAllShapes();
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: ximpbody.hxx,v $ * $RCSfile: ximpbody.hxx,v $
* *
* $Revision: 1.5 $ * $Revision: 1.6 $
* *
* last change: $Author: cl $ $Date: 2001-05-28 13:32:20 $ * last change: $Author: cl $ $Date: 2001-12-17 15:51:30 $
* *
* 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
...@@ -86,6 +86,7 @@ class SdXMLDrawPageContext : public SdXMLGenericPageContext ...@@ -86,6 +86,7 @@ class SdXMLDrawPageContext : public SdXMLGenericPageContext
rtl::OUString maName; rtl::OUString maName;
rtl::OUString maStyleName; rtl::OUString maStyleName;
rtl::OUString maMasterPageName; rtl::OUString maMasterPageName;
rtl::OUString maHREF;
public: public:
SdXMLDrawPageContext( SdXMLImport& rImport, USHORT nPrfx, SdXMLDrawPageContext( SdXMLImport& rImport, USHORT nPrfx,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment