diff options
Diffstat (limited to 'patches/vba/vba-fix-Range-Insert-CopyOrigin.diff')
-rw-r--r-- | patches/vba/vba-fix-Range-Insert-CopyOrigin.diff | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/patches/vba/vba-fix-Range-Insert-CopyOrigin.diff b/patches/vba/vba-fix-Range-Insert-CopyOrigin.diff deleted file mode 100644 index 75839f419..000000000 --- a/patches/vba/vba-fix-Range-Insert-CopyOrigin.diff +++ /dev/null @@ -1,33 +0,0 @@ ---- sc/source/ui/vba/vbarange.cxx 2009-04-27 18:35:48.000000000 +0100 -+++ sc/source/ui/vba/vbarange.cxx 2009-04-27 19:41:46.000000000 +0100 -@@ -4340,8 +4340,10 @@ ScVbaRange::AutoFilter( const uno::Any& - } - - void SAL_CALL --ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& /*CopyOrigin*/ ) throw (uno::RuntimeException) -+ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& CopyOrigin ) throw (uno::RuntimeException) - { -+ sal_Bool bCopyOrigin = sal_True; -+ CopyOrigin >>= bCopyOrigin; - // It appears ( from the web ) that the undocumented CopyOrigin - // param should contain member of enum XlInsertFormatOrigin - // which can have values xlFormatFromLeftOrAbove or xlFormatFromRightOrBelow -@@ -4373,8 +4375,17 @@ ScVbaRange::Insert( const uno::Any& Shif - mode = sheet::CellInsertMode_RIGHT; - } - RangeHelper thisRange( mxRange ); -+ table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress(); - uno::Reference< sheet::XCellRangeMovement > xCellRangeMove( thisRange.getSpreadSheet(), uno::UNO_QUERY_THROW ); -- xCellRangeMove->insertCells( thisRange.getCellRangeAddressable()->getRangeAddress(), mode ); -+ xCellRangeMove->insertCells( thisAddress, mode ); -+ if ( bCopyOrigin ) -+ { -+ // After the insert ( this range ) actually has moved -+ ScRange aRange( static_cast< SCCOL >( thisAddress.StartColumn ), static_cast< SCROW >( thisAddress.StartRow ), static_cast< SCTAB >( thisAddress.Sheet ), static_cast< SCCOL >( thisAddress.EndColumn ), static_cast< SCROW >( thisAddress.EndRow ), static_cast< SCTAB >( thisAddress.Sheet ) ); -+ uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getDocShellFromRange( mxRange ) , aRange ) ); -+ uno::Reference< excel::XRange > xVbaRange( new ScVbaRange( getParent(), mxContext, xRange, mbIsRows, mbIsColumns ) ); -+ xVbaRange->PasteSpecial( uno::Any(), uno::Any(), uno::Any(), uno::Any() ); -+ } - } - - void SAL_CALL |