[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - 2 commits - sc/source
sc/source/filter/excel/xecontent.cxx | 14 -- sc/source/filter/inc/xecontent.hxx |3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) New commits: commit 8e33e95500c2f5edc91e853024a5c0fff285fcce Author: Noel Power noel.po...@suse.com Date: Mon Jun 24 11:47:55 2013 +0100 fix for bnc#823935 Change-Id: Id62e1f4845bfbc610f73499881dc33d3d955923b diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 36cd383..ce22d55 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -395,6 +395,12 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot rRoot, const SvxURLField rU mxRepr.reset( new String( aFileName ) ); msTarget = XclXmlUtils::ToOUString( aLink ); +if( eProtocol == INET_PROT_SMB ) +{ +// ooxml expects the file:/// part appended ( or at least +// ms2007 does, ms2010 is more tolerant ) +msTarget = file:/// + msTarget; +} } else if( eProtocol != INET_PROT_NOT_VALID ) { commit b8b4f455ef20929a0c5838772d120ed86f10e259 Author: Noel Power noel.po...@suse.com Date: Fri Jun 21 15:46:08 2013 +0100 write display attr of hyperlink only if value is different from stringtable Change-Id: Iff6f16d6cdb539ad80ef01e91db51613e95053d1 diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 5a46ad5..36cd383 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -335,7 +335,8 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot rRoot, const SvxURLField rU XclExpRecord( EXC_ID_HLINK ), maScPos( rScPos ), mxVarData( new SvMemoryStream ), -mnFlags( 0 ) +mnFlags( 0 ), +mbSetDisplay( true ) { const String rUrl = rUrlField.GetURL(); const String rRepr = rUrlField.GetRepresentation(); @@ -498,6 +499,7 @@ void XclExpHyperlink::WriteEmbeddedData( XclExpStream rStrm ) void XclExpHyperlink::SaveXml( XclExpXmlStream rStrm ) { +OString sTmp = XclXmlUtils::ToOString( maScPos ); OUString sId = !msTarget.isEmpty() ? rStrm.addRelation( rStrm.GetCurrentStream()-getOutputStream(), XclXmlUtils::ToOUString( http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink; ), msTarget, true ) : OUString(); @@ -510,7 +512,9 @@ void XclExpHyperlink::SaveXml( XclExpXmlStream rStrm ) ? XclXmlUtils::ToOString( *mxTextMark ).getStr() : NULL, // OOXTODO: XML_tooltip,from record HLinkTooltip 800h wzTooltip -XML_display,XclXmlUtils::ToOString( *mxRepr ).getStr(), +XML_display,mbSetDisplay + ? XclXmlUtils::ToOString( *mxRepr ).getStr() + : NULL, FSEND ); } diff --git a/sc/source/filter/inc/xecontent.hxx b/sc/source/filter/inc/xecontent.hxx index 1328a40..cf746de 100644 --- a/sc/source/filter/inc/xecontent.hxx +++ b/sc/source/filter/inc/xecontent.hxx @@ -109,6 +109,7 @@ public: virtual voidSaveXml( XclExpXmlStream rStrm ); virtual voidWriteEmbeddedData( XclExpStream rStrm ); +voidSetDisplay( bool bDisplay ) { mbSetDisplay = bDisplay; } private: /** Builds file name from the passed file URL. Tries to convert to relative file name. @param rnLevel (out-param) The parent directory level. @@ -119,7 +120,6 @@ private: /** Writes the body of the HLINK record. */ virtual voidWriteBody( XclExpStream rStrm ); - private: typedef boost::scoped_ptr StringStringPtr; typedef boost::scoped_ptr SvStream SvStreamPtr; @@ -130,6 +130,7 @@ private: sal_uInt32 mnFlags;/// Option flags. XclExpStringRef mxTextMark; /// Location within mxRepr ::rtl::OUString msTarget; /// Target URL +boolmbSetDisplay; /// True if display attribute it written }; typedef XclExpRecordList XclExpHyperlink XclExpHyperlinkList; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - 2 commits - sc/source
sc/source/ui/vba/vbarange.cxx | 22 ++ sc/source/ui/vba/vbawindow.cxx | 83 +++-- sc/source/ui/vba/vbawindow.hxx |2 3 files changed, 78 insertions(+), 29 deletions(-) New commits: commit 21431fa2231de5493235b276b5a1d007708f8099 Author: Noel Power noel.po...@suse.com Date: Tue May 28 17:33:33 2013 +0100 some Worksheet.Change support Change-Id: I91203e74d54adba17a20ef7b7d835d9ac49855be (cherry picked from commit 20d792d6379600df8b56a2735f9dd1cb63967e4d) diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index ef1adde..c9eb427 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -1832,6 +1832,7 @@ ScVbaRange::fillSeries( sheet::FillDirection nFillDirection, sheet::FillMode nFi uno::Reference sheet::XCellSeries xCellSeries(mxRange, uno::UNO_QUERY_THROW ); xCellSeries-fillSeries( nFillDirection, nFillMode, nFillDateMode, fStep, fEndValue ); +fireChangeEvent(); } void @@ -3094,7 +3095,28 @@ ScVbaRange::Replace( const ::rtl::OUString What, const ::rtl::OUString Replace // OOo.org afaik uno::Reference util::XSearchDescriptor xSearch( xDescriptor, uno::UNO_QUERY ); +uno::Reference container::XIndexAccess xIndexAccess = xReplace-findAll( xSearch ); xReplace-replaceAll( xSearch ); +if ( xIndexAccess.is() xIndexAccess-getCount() 0 ) +{ +for ( sal_Int32 i = 0; i xIndexAccess-getCount(); ++i ) +{ +uno::Reference table::XCellRange xCellRange( xIndexAccess-getByIndex( i ), uno::UNO_QUERY ); +if ( xCellRange.is() ) +{ +uno::Reference excel::XRange xRange( new ScVbaRange( mxParent, mxContext, xCellRange ) ); +uno::Reference container::XEnumerationAccess xEnumAccess( xRange, uno::UNO_QUERY_THROW ); +uno::Reference container::XEnumeration xEnum = xEnumAccess-createEnumeration(); +while ( xEnum-hasMoreElements() ) +{ +uno::Reference excel::XRange xNextRange( xEnum-nextElement(), uno::UNO_QUERY_THROW ); +ScVbaRange* pRange = dynamic_cast ScVbaRange * ( xNextRange.get() ); +if ( pRange ) +pRange-fireChangeEvent(); +} +} +} +} } return sal_True; // always } commit 0ec9b950b1dd0f21891de322597659d794ec2b38 Author: Pedro Giffuni p...@apache.org Date: Mon Aug 13 17:05:00 2012 + i106278 - Window.ActiveSheet,Window.FreezePanes,Window.Split, Window.View not working correctly. Patch by: lihuiibm Reviewed by:Chen Peng (cherry picked from commit b1edc65b2ad18720fefb5ba769f2c6f8c46623d6) diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index 925394c..775d4e2 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -597,25 +597,33 @@ ScVbaWindow::getFreezePanes() throw (uno::RuntimeException) } void SAL_CALL -ScVbaWindow::setFreezePanes( ::sal_Bool /*_bFreezePanes*/ ) throw (uno::RuntimeException) +ScVbaWindow::setFreezePanes( ::sal_Bool _bFreezePanes ) throw (uno::RuntimeException) { uno::Reference sheet::XViewPane xViewPane( getController(), uno::UNO_QUERY_THROW ); uno::Reference sheet::XViewSplitable xViewSplitable( xViewPane, uno::UNO_QUERY_THROW ); uno::Reference sheet::XViewFreezable xViewFreezable( xViewPane, uno::UNO_QUERY_THROW ); -if( xViewSplitable-getIsWindowSplit() ) +if( _bFreezePanes ) { -// if there is a split we freeze at the split -sal_Int32 nColumn = getSplitColumn(); -sal_Int32 nRow = getSplitRow(); -xViewFreezable-freezeAtPosition( nColumn, nRow ); +if( xViewSplitable-getIsWindowSplit() ) +{ +// if there is a split we freeze at the split +sal_Int32 nColumn = getSplitColumn(); +sal_Int32 nRow = getSplitRow(); +xViewFreezable-freezeAtPosition( nColumn, nRow ); +} +else +{ +// otherwise we freeze in the center of the visible sheet +table::CellRangeAddress aCellRangeAddress = xViewPane-getVisibleRange(); +sal_Int32 nColumn = aCellRangeAddress.StartColumn + (( aCellRangeAddress.EndColumn - aCellRangeAddress.StartColumn )/2 ); +sal_Int32 nRow = aCellRangeAddress.StartRow + (( aCellRangeAddress.EndRow - aCellRangeAddress.StartRow )/2 ); +xViewFreezable-freezeAtPosition( nColumn, nRow ); +} } else { -// otherwise we freeze in the center of the visible sheet -table::CellRangeAddress aCellRangeAddress = xViewPane-getVisibleRange(); -sal_Int32 nColumn = aCellRangeAddress.StartColumn + ((