[Libreoffice-commits] .: 2 commits - patches/dev300
Tor Lillqvist
tml at kemper.freedesktop.org
Mon Oct 25 02:12:01 PDT 2010
patches/dev300/oox-pptx-export-hyperlinks.diff | 133 -------------------------
patches/dev300/pptx-the-rest-from-git.diff | 8 -
2 files changed, 141 deletions(-)
New commits:
commit 83a64bcd6649938b30128b7dbfc25ba47b778842
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Mon Oct 25 12:10:35 2010 +0300
Drop oox-pptx-export-hyperlinks.diff as it is now in the repo
diff --git a/patches/dev300/oox-pptx-export-hyperlinks.diff b/patches/dev300/oox-pptx-export-hyperlinks.diff
deleted file mode 100644
index 2e93fea..0000000
--- a/patches/dev300/oox-pptx-export-hyperlinks.diff
+++ /dev/null
@@ -1,133 +0,0 @@
----
- oox/inc/oox/export/drawingml.hxx | 4 +-
- oox/source/export/drawingml.cxx | 41 +++++++++++++++++++++++++++++++------
- 2 files changed, 36 insertions(+), 9 deletions(-)
-
-diff --git oox/inc/oox/export/drawingml.hxx oox/inc/oox/export/drawingml.hxx
-index da5865a..b9ebc0b 100644
---- oox/inc/oox/export/drawingml.hxx
-+++ oox/inc/oox/export/drawingml.hxx
-@@ -52,7 +52,7 @@ protected:
- bool GetPropertyAndState( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet,
- ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState > rXPropState,
- String aName, ::com::sun::star::beans::PropertyState& eState );
-- const char* GetFieldType( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > rRun );
-+ const char* GetFieldType( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > rRun, sal_Bool& bIsField );
-
- rtl::OUString WriteImage( const rtl::OUString& rURL );
-
-@@ -91,7 +91,7 @@ public:
- void WriteParagraphNumbering( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet,
- sal_Int16 nLevel );
- void WriteRun( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > rRun );
-- void WriteRunProperties( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > rRun );
-+ void WriteRunProperties( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > rRun, sal_Bool bIsField );
-
- void WritePresetShape( const char* pShape );
- void WritePresetShape( const char* pShape, MSO_SPT eShapeType, sal_Bool bPredefinedHandlesUsed, sal_Int32 nAdjustmentsWhichNeedsToBeConverted, const ::com::sun::star::beans::PropertyValue& rProp );
-diff --git oox/source/export/drawingml.cxx oox/source/export/drawingml.cxx
-index 1e4a9a0..679dfdd 100644
---- oox/source/export/drawingml.cxx
-+++ oox/source/export/drawingml.cxx
-@@ -613,7 +613,7 @@ void DrawingML::WriteShapeTransformation( Reference< XShape > rXShape, sal_Bool
- WriteTransformation( Rectangle( Point( aPos.X, aPos.Y ), Size( aSize.Width, aSize.Height ) ), bFlipH, bFlipV, nRotation );
- }
-
--void DrawingML::WriteRunProperties( Reference< XTextRange > rRun )
-+void DrawingML::WriteRunProperties( Reference< XTextRange > rRun, sal_Bool bIsField )
- {
- Reference< XPropertySet > rXPropSet( rRun, UNO_QUERY );
- Reference< XPropertyState > rXPropState( rRun, UNO_QUERY );
-@@ -778,10 +778,33 @@ void DrawingML::WriteRunProperties( Reference< XTextRange > rRun )
- FSEND );
- }
-
-+ if( bIsField ) {
-+ Reference< XTextField > rXTextField;
-+ GET( rXTextField, TextField );
-+ if( rXTextField.is() )
-+ rXPropSet.set( rXTextField, UNO_QUERY );
-+ }
-+
-+ // field properties starts here
-+ if( GETA( URL ) ) {
-+ OUString sURL;
-+
-+ mAny >>= sURL;
-+ if( sURL.getLength() ) {
-+ OUString sRelId = mpFB->addRelation( mpFS->getOutputStream(),
-+ US( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" ),
-+ sURL, US( "External" ) );
-+
-+ mpFS->singleElementNS( XML_a, XML_hlinkClick,
-+ FSNS( XML_r,XML_id ), USS( sRelId ),
-+ FSEND );
-+ }
-+ }
-+
- mpFS->endElementNS( XML_a, XML_rPr );
- }
-
--const char* DrawingML::GetFieldType( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > rRun )
-+const char* DrawingML::GetFieldType( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > rRun, sal_Bool& bIsField )
- {
- const char* sType = NULL;
- Reference< XPropertySet > rXPropSet( rRun, UNO_QUERY );
-@@ -796,6 +819,7 @@ const char* DrawingML::GetFieldType( ::com::sun::star::uno::Reference< ::com::su
- Reference< XTextField > rXTextField;
- GET( rXTextField, TextField );
- if( rXTextField.is() ) {
-+ bIsField = sal_True;
- rXPropSet.set( rXTextField, UNO_QUERY );
- if( rXPropSet.is() ) {
- String aFieldKind( rXTextField->getPresentation( TRUE ) );
-@@ -803,6 +827,10 @@ const char* DrawingML::GetFieldType( ::com::sun::star::uno::Reference< ::com::su
- if( aFieldKind == S( "Page" ) ) {
- return "slidenum";
- }
-+ // else if( aFieldKind == S( "URL" ) ) {
-+ // do not return here
-+ // and make URL field text run with hyperlink property later
-+ // }
- }
- }
- }
-@@ -848,13 +876,13 @@ void DrawingML::GetUUID( OStringBuffer& rBuffer )
- void DrawingML::WriteRun( Reference< XTextRange > rRun )
- {
- const char* sFieldType;
-- bool bIsField = false;
-+ sal_Bool bIsField = sal_False;
- OUString sText = rRun->getString();
-
- if( sText.getLength() < 1)
- return;
-
-- if( ( sFieldType = GetFieldType( rRun ) ) ) {
-+ if( ( sFieldType = GetFieldType( rRun, bIsField ) ) ) {
- OStringBuffer sUUID(39);
-
- GetUUID( sUUID );
-@@ -862,17 +890,16 @@ void DrawingML::WriteRun( Reference< XTextRange > rRun )
- XML_id, sUUID.getStr(),
- XML_type, sFieldType,
- FSEND );
-- bIsField = true;
- } else
- mpFS->startElementNS( XML_a, XML_r, FSEND );
-
-- WriteRunProperties( rRun );
-+ WriteRunProperties( rRun, bIsField );
-
- mpFS->startElementNS( XML_a, XML_t, FSEND );
- mpFS->writeEscaped( sText );
- mpFS->endElementNS( XML_a, XML_t );
-
-- if( bIsField )
-+ if( sFieldType )
- mpFS->endElementNS( XML_a, XML_fld );
- else
- mpFS->endElementNS( XML_a, XML_r );
---
-1.7.0.1
-
commit 2141e14864aea1eb14f911f12af20f0395518895
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Mon Oct 25 12:06:23 2010 +0300
Make pptx-the-rest-from-git.diff apply again
diff --git a/patches/dev300/pptx-the-rest-from-git.diff b/patches/dev300/pptx-the-rest-from-git.diff
index f306f15..0a1dcfb 100644
--- a/patches/dev300/pptx-the-rest-from-git.diff
+++ b/patches/dev300/pptx-the-rest-from-git.diff
@@ -81,14 +81,6 @@ diff --git oox/source/export/shapes.cxx oox/source/export/shapes.cxx
index 7dafac4..1c351a5 100644
--- oox/source/export/shapes.cxx
+++ oox/source/export/shapes.cxx
-@@ -89,6 +89,7 @@ using ::com::sun::star::text::XText;
- using ::com::sun::star::text::XTextContent;
- using ::com::sun::star::text::XTextField;
- using ::com::sun::star::text::XTextRange;
-+using ::oox::core::XmlFilterBase;
- using ::rtl::OString;
- using ::rtl::OStringBuffer;
- using ::rtl::OUString;
@@ -357,11 +358,11 @@ namespace oox { namespace drawingml {
if ( GETA(propName) ) \
mAny >>= variable;
More information about the Libreoffice-commits
mailing list