[Libreoffice-commits] .: Branch 'integration/dev300_m98' - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Thu Feb 10 23:10:43 PST 2011


 sc/source/ui/vba/vbarange.cxx |  577 +-----------------------------------------
 1 file changed, 23 insertions(+), 554 deletions(-)

New commits:
commit e593f9ecd6200c0616a5fd30767ba7d06e8054a5
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Fri Feb 11 02:10:13 2011 -0500

    Somehow I managed to not resolve the conflict on this file...

diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index b9369dc..74c1c9b 100755
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -540,27 +540,17 @@ public:
     {
         uno::Reference< beans::XPropertySet > xNumberProps = getNumberProps();
         sal_Int16 nType = ::comphelper::getINT16(
-<<<<<<< HEAD
             xNumberProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Type" )) ) );
-=======
-            xNumberProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Type" ) ) ) );
->>>>>>> staging/premerge/dev300_m98
         return nType;
     }
 
     bool setNumberFormat( const rtl::OUString& rFormat )
     {
-<<<<<<< HEAD
         lang::Locale aLocale;
         uno::Reference< beans::XPropertySet > xNumProps = getNumberProps();
         xNumProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Locale" )) ) >>= aLocale;
         sal_Int32 nNewIndex = mxFormats->queryKey(rFormat, aLocale, false );
         if ( nNewIndex == -1 ) // format not defined
-=======
-        // #163288# treat "General" as "Standard" format
-        sal_Int32 nNewIndex = 0;
-        if( !rFormat.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "General" ) ) )
->>>>>>> staging/premerge/dev300_m98
         {
             lang::Locale aLocale;
             uno::Reference< beans::XPropertySet > xNumProps = getNumberProps();
@@ -577,11 +567,7 @@ public:
     {
         uno::Reference< beans::XPropertySet > xNumberProps = getNumberProps();
         lang::Locale aLocale;
-<<<<<<< HEAD
         xNumberProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Locale" )) ) >>= aLocale;
-=======
-        xNumberProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Locale" ) ) ) >>= aLocale;
->>>>>>> staging/premerge/dev300_m98
         uno::Reference<util::XNumberFormatTypes> xTypes( mxFormats, uno::UNO_QUERY );
         if ( xTypes.is() )
         {
@@ -884,16 +870,10 @@ protected:
         double aDblValue = 0.0;
         if ( aValue >>= sFormula )
         {
-<<<<<<< HEAD
             // convert to GRAM_PODF_A1 style grammar because XCell::setFormula
             // always compile it in that grammar. Perhaps
             // css.sheet.FormulaParser should be used in future to directly
             // pass formula tokens when that API stabilizes.
-=======
-            // convert to CONV_OOO style formula string because XCell::setFormula
-            // always compile it in CONV_OOO style.  Perhaps css.sheet.FormulaParser
-            // should be used in future to directly pass formula tokens.
->>>>>>> staging/premerge/dev300_m98
             if ( m_eGrammar != formula::FormulaGrammar::GRAM_PODF_A1 && ( sFormula.trim().indexOf('=') == 0 ) )
             {
                 uno::Reference< uno::XInterface > xIf( xCell, uno::UNO_QUERY_THROW );
@@ -901,11 +881,7 @@ protected:
                 if ( pUnoRangesBase )
                 {
                     ScRangeList aCellRanges = pUnoRangesBase->GetRangeList();
-<<<<<<< HEAD
                     ScCompiler aCompiler( m_pDoc, aCellRanges.front()->aStart );
-=======
-                    ScCompiler aCompiler( m_pDoc, aCellRanges.First()->aStart );
->>>>>>> staging/premerge/dev300_m98
                     aCompiler.SetGrammar(m_eGrammar);
                     // compile the string in the format passed in
                     aCompiler.CompileString( sFormula );
@@ -949,11 +925,7 @@ public:
             pUnoRangesBase )
         {
             ScRangeList aCellRanges = pUnoRangesBase->GetRangeList();
-<<<<<<< HEAD
             ScCompiler aCompiler( m_pDoc, aCellRanges.front()->aStart );
-=======
-            ScCompiler aCompiler( m_pDoc, aCellRanges.First()->aStart );
->>>>>>> staging/premerge/dev300_m98
             aCompiler.SetGrammar(formula::FormulaGrammar::GRAM_DEFAULT);
             aCompiler.CompileString( sVal );
             // set desired convention
@@ -1000,11 +972,7 @@ public:
 
 };
 
-<<<<<<< HEAD
 const static rtl::OUString sNA(RTL_CONSTASCII_USTRINGPARAM("#N/A"));
-=======
-const static rtl::OUString sNA = rtl::OUString::createFromAscii("#N/A");
->>>>>>> staging/premerge/dev300_m98
 
 class Dim1ArrayValueSetter : public ArrayVisitor
 {
@@ -1148,11 +1116,7 @@ public:
 
     uno::Reference< sheet::XSheetCellCursor > getSheetCellCursor() throw ( uno::RuntimeException )
     {
-<<<<<<< HEAD
         return  uno::Reference< sheet::XSheetCellCursor >( getSpreadSheet()->createCursorByRange( getSheetCellRange() ), uno::UNO_QUERY_THROW );
-=======
-        return 	uno::Reference< sheet::XSheetCellCursor >( getSpreadSheet()->createCursorByRange( getSheetCellRange() ), uno::UNO_QUERY_THROW );
->>>>>>> staging/premerge/dev300_m98
     }
 
     static uno::Reference< excel::XRange > createRangeFromRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference<uno::XComponentContext >& xContext,
@@ -1275,21 +1239,13 @@ getRangeForName( const uno::Reference< uno::XComponentContext >& xContext, const
     // Single range
     if ( aCellRanges.size() == 1 )
     {
-<<<<<<< HEAD
         uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pDocSh, *aCellRanges.front() ) );
-=======
-        uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pDocSh, *aCellRanges.First() ) );
->>>>>>> staging/premerge/dev300_m98
         uno::Reference< XHelperInterface > xFixThisParent = excel::getUnoSheetModuleObj( xRange );
         return new ScVbaRange( xFixThisParent, xContext, xRange );
     }
     uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pDocSh, aCellRanges ) );
 
-<<<<<<< HEAD
     uno::Reference< XHelperInterface > xFixThisParent = excel::getUnoSheetModuleObj( xRanges );
-=======
-    uno::Reference< XHelperInterface > xFixThisParent = excel::getUnoSheetModuleObj( xRanges ); 
->>>>>>> staging/premerge/dev300_m98
     return new ScVbaRange( xFixThisParent, xContext, xRanges );
 }
 
@@ -1301,7 +1257,6 @@ template< typename RangeType >
 inline table::CellRangeAddress lclGetRangeAddress( const uno::Reference< RangeType >& rxCellRange ) throw (uno::RuntimeException)
 {
     return uno::Reference< sheet::XCellRangeAddressable >( rxCellRange, uno::UNO_QUERY_THROW )->getRangeAddress();
-<<<<<<< HEAD
 }
 
 void lclClearRange( const uno::Reference< table::XCellRange >& rxCellRange ) throw (uno::RuntimeException)
@@ -1373,79 +1328,6 @@ void lclExpandAndMerge( const uno::Reference< table::XCellRange >& rxCellRange,
     }
 }
 
-=======
-}
-
-void lclClearRange( const uno::Reference< table::XCellRange >& rxCellRange ) throw (uno::RuntimeException)
-{
-    using namespace ::com::sun::star::sheet::CellFlags;
-    sal_Int32 nFlags = VALUE | DATETIME | STRING | ANNOTATION | FORMULA | HARDATTR | STYLES | EDITATTR | FORMATTED;
-    uno::Reference< sheet::XSheetOperation > xSheetOperation( rxCellRange, uno::UNO_QUERY_THROW );
-    xSheetOperation->clearContents( nFlags );
-}
-
-uno::Reference< sheet::XSheetCellRange > lclExpandToMerged( const uno::Reference< table::XCellRange >& rxCellRange, bool bRecursive ) throw (uno::RuntimeException)
-{
-    uno::Reference< sheet::XSheetCellRange > xNewCellRange( rxCellRange, uno::UNO_QUERY_THROW );
-    uno::Reference< sheet::XSpreadsheet > xSheet( xNewCellRange->getSpreadsheet(), uno::UNO_SET_THROW );
-    table::CellRangeAddress aNewAddress = lclGetRangeAddress( xNewCellRange );
-    table::CellRangeAddress aOldAddress;
-    // expand as long as there are new merged ranges included
-    do
-    {
-        aOldAddress = aNewAddress;
-        uno::Reference< sheet::XSheetCellCursor > xCursor( xSheet->createCursorByRange( xNewCellRange ), uno::UNO_SET_THROW );
-        xCursor->collapseToMergedArea();
-        xNewCellRange.set( xCursor, uno::UNO_QUERY_THROW );
-        aNewAddress = lclGetRangeAddress( xNewCellRange );
-    }
-    while( bRecursive && (aOldAddress != aNewAddress) );
-    return xNewCellRange;
-}
-
-uno::Reference< sheet::XSheetCellRangeContainer > lclExpandToMerged( const uno::Reference< sheet::XSheetCellRangeContainer >& rxCellRanges, bool bRecursive ) throw (uno::RuntimeException)
-{
-    if( !rxCellRanges.is() )
-        throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Missing cell ranges object" ) ), uno::Reference< uno::XInterface >() );
-    sal_Int32 nCount = rxCellRanges->getCount();
-    if( nCount < 1 )
-        throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Missing cell ranges object" ) ), uno::Reference< uno::XInterface >() );
-
-    ScRangeList aScRanges;
-    for( sal_Int32 nIndex = 0; nIndex < nCount; ++nIndex )
-    {
-        uno::Reference< table::XCellRange > xRange( rxCellRanges->getByIndex( nIndex ), uno::UNO_QUERY_THROW );
-        table::CellRangeAddress aRangeAddr = lclGetRangeAddress( lclExpandToMerged( xRange, bRecursive ) );
-        ScRange aScRange;
-        ScUnoConversion::FillScRange( aScRange, aRangeAddr );
-        aScRanges.Append( aScRange );
-    }
-    return new ScCellRangesObj( getDocShellFromRanges( rxCellRanges ), aScRanges );
-}
-
-void lclExpandAndMerge( const uno::Reference< table::XCellRange >& rxCellRange, bool bMerge ) throw (uno::RuntimeException)
-{
-    uno::Reference< util::XMergeable > xMerge( lclExpandToMerged( rxCellRange, true ), uno::UNO_QUERY_THROW );
-    // Calc cannot merge over merged ranges, always unmerge first
-    xMerge->merge( sal_False );
-    if( bMerge )
-    {
-        // clear all contents of the covered cells (not the top-left cell)
-        table::CellRangeAddress aRangeAddr = lclGetRangeAddress( rxCellRange );
-        sal_Int32 nLastColIdx = aRangeAddr.EndColumn - aRangeAddr.StartColumn;
-        sal_Int32 nLastRowIdx = aRangeAddr.EndRow - aRangeAddr.StartRow;
-        // clear cells of top row, right of top-left cell
-        if( nLastColIdx > 0 )
-            lclClearRange( rxCellRange->getCellRangeByPosition( 1, 0, nLastColIdx, 0 ) );
-        // clear all rows below top row
-        if( nLastRowIdx > 0 )
-            lclClearRange( rxCellRange->getCellRangeByPosition( 0, 1, nLastColIdx, nLastRowIdx ) );
-        // merge the range
-        xMerge->merge( sal_True );
-    }
-}
-
->>>>>>> staging/premerge/dev300_m98
 util::TriState lclGetMergedState( const uno::Reference< table::XCellRange >& rxCellRange ) throw (uno::RuntimeException)
 {
     /*  1) Check if range is completely inside one single merged range. To do
@@ -1467,11 +1349,7 @@ util::TriState lclGetMergedState( const uno::Reference< table::XCellRange >& rxC
         of a merged range is part of this range are not covered. */
     ScRange aScRange;
     ScUnoConversion::FillScRange( aScRange, aRangeAddr );
-<<<<<<< HEAD
     bool bHasMerged = excel::GetDocumentFromRange( rxCellRange )->HasAttrib( aScRange, HASATTR_MERGED | HASATTR_OVERLAPPED );
-=======
-    bool bHasMerged = getDocumentFromRange( rxCellRange )->HasAttrib( aScRange, HASATTR_MERGED | HASATTR_OVERLAPPED );
->>>>>>> staging/premerge/dev300_m98
     return bHasMerged ? util::TriState_INDETERMINATE : util::TriState_NO;
 }
 
@@ -1615,12 +1493,7 @@ ScVbaRange::ScVbaRange( const uno::Reference< XHelperInterface >& xParent, const
 
 {
     uno::Reference< container::XIndexAccess >  xIndex( mxRanges, uno::UNO_QUERY_THROW );
-<<<<<<< HEAD
     m_Areas  = new ScVbaRangeAreas( xParent, mxContext, xIndex, mbIsRows, mbIsColumns );
-=======
-    m_Areas	 = new ScVbaRangeAreas( xParent, mxContext, xIndex, mbIsRows, mbIsColumns );
->>>>>>> staging/premerge/dev300_m98
-
 }
 
 ScVbaRange::~ScVbaRange()
@@ -1739,13 +1612,8 @@ ScVbaRange::getValue() throw (uno::RuntimeException)
 }
 
 
-<<<<<<< HEAD
-void
-ScVbaRange::setValue(  const uno::Any  &aValue,  ValueSetter& valueSetter ) throw (uno::RuntimeException)
-=======
 void 
 ScVbaRange::setValue( const uno::Any& aValue, ValueSetter& valueSetter, bool bFireEvent ) throw (uno::RuntimeException)
->>>>>>> staging/premerge/dev300_m98
 {
     uno::TypeClass aClass = aValue.getValueTypeClass();
     if ( aClass == uno::TypeClass_SEQUENCE )
@@ -1795,14 +1663,10 @@ ScVbaRange::setValue( const uno::Any  &aValue ) throw (uno::RuntimeException)
         return;
     }
     CellValueSetter valueSetter( aValue );
-<<<<<<< HEAD
-    setValue( aValue, valueSetter );
+    setValue( aValue, valueSetter, true );
 
     // Fires the range change event.
     lcl_NotifyRangeChanges( getScDocShell()->GetModel(), getCellRangesBase() );
-=======
-    setValue( aValue, valueSetter, true );
->>>>>>> staging/premerge/dev300_m98
 }
 
 void SAL_CALL
@@ -1810,14 +1674,10 @@ ScVbaRange::Clear() throw (uno::RuntimeException)
 {
     using namespace ::com::sun::star::sheet::CellFlags;
     sal_Int32 nFlags = VALUE | DATETIME | STRING | FORMULA | HARDATTR | EDITATTR | FORMATTED;
-<<<<<<< HEAD
-    ClearContents( nFlags );
+    ClearContents( nFlags, true );
 
     // Fires the range change event.
     lcl_NotifyRangeChanges( getScDocShell()->GetModel(), getCellRangesBase() );
-=======
-    ClearContents( nFlags, true );
->>>>>>> staging/premerge/dev300_m98
 }
 
 //helper ClearContent
@@ -1836,11 +1696,7 @@ ScVbaRange::ClearContents( sal_Int32 nFlags, bool bFireEvent ) throw (uno::Runti
             uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny(index), uno::Any() ), uno::UNO_QUERY_THROW );
             ScVbaRange* pRange = getImplementation( xRange );
             if ( pRange )
-<<<<<<< HEAD
-                pRange->ClearContents( nFlags );
-=======
                 pRange->ClearContents( nFlags, false ); // do not fire for single ranges
->>>>>>> staging/premerge/dev300_m98
         }
         // fire change event for the entire range list
         if( bFireEvent ) fireChangeEvent();
@@ -1862,37 +1718,24 @@ ScVbaRange::ClearComments() throw (uno::RuntimeException)
 void SAL_CALL
 ScVbaRange::ClearContents() throw (uno::RuntimeException)
 {
-<<<<<<< HEAD
-    sal_Int32 nClearFlags = ( sheet::CellFlags::VALUE |
-        sheet::CellFlags::STRING |  sheet::CellFlags::DATETIME |
-        sheet::CellFlags::FORMULA );
-    ClearContents( nClearFlags );
+    using namespace ::com::sun::star::sheet::CellFlags;
+    sal_Int32 nFlags = VALUE | STRING | DATETIME | FORMULA;
+    ClearContents( nFlags, true );
 
     // Fires the range change event.
     lcl_NotifyRangeChanges( getScDocShell()->GetModel(), getCellRangesBase() );
-=======
-    using namespace ::com::sun::star::sheet::CellFlags;
-    sal_Int32 nFlags = VALUE | STRING |  DATETIME | FORMULA;
-    ClearContents( nFlags, true );
->>>>>>> staging/premerge/dev300_m98
 }
 
 void SAL_CALL
 ScVbaRange::ClearFormats() throw (uno::RuntimeException)
 {
-<<<<<<< HEAD
-    //FIXME: need to check if we need to combine sheet::CellFlags::FORMATTED
-    sal_Int32 nClearFlags = sheet::CellFlags::HARDATTR | sheet::CellFlags::FORMATTED | sheet::CellFlags::EDITATTR;
-    ClearContents( nClearFlags );
-
-    // Fires the range change event.
-    lcl_NotifyRangeChanges( getScDocShell()->GetModel(), getCellRangesBase() );
-=======
     //FIXME: need to check if we need to combine FORMATTED
     using namespace ::com::sun::star::sheet::CellFlags;
     sal_Int32 nFlags = HARDATTR | FORMATTED | EDITATTR;
     ClearContents( nFlags, false );
->>>>>>> staging/premerge/dev300_m98
+
+    // Fires the range change event.
+    lcl_NotifyRangeChanges( getScDocShell()->GetModel(), getCellRangesBase() );
 }
 
 void
@@ -1907,14 +1750,10 @@ ScVbaRange::setFormulaValue( const uno::Any& rFormula, formula::FormulaGrammar::
         return;
     }
     CellFormulaValueSetter formulaValueSetter( rFormula, getScDocument(), eGram );
-<<<<<<< HEAD
-    setValue( rFormula, formulaValueSetter );
+    setValue( rFormula, formulaValueSetter, bFireEvent );
 
     // Fires the range change event.
     lcl_NotifyRangeChanges( getScDocShell()->GetModel(), getCellRangesBase() );
-=======
-    setValue( rFormula, formulaValueSetter, bFireEvent );
->>>>>>> staging/premerge/dev300_m98
 }
 
 uno::Any
@@ -1937,13 +1776,8 @@ ScVbaRange::getFormulaValue( formula::FormulaGrammar::Grammar eGram ) throw (uno
 void
 ScVbaRange::setFormula(const uno::Any &rFormula ) throw (uno::RuntimeException)
 {
-<<<<<<< HEAD
-    // #FIXME converting "=$a$1" e.g. CONV_XL_A1 -> CONV_OOO                            // results in "=$a$1:a1", temporalily disable conversion
-    setFormulaValue( rFormula,formula::FormulaGrammar::GRAM_NATIVE_XL_A1 );;
-=======
     // #FIXME converting "=$a$1" e.g. CONV_XL_A1 -> CONV_OOO                        	// results in "=$a$1:a1", temporalily disable conversion
     setFormulaValue( rFormula,formula::FormulaGrammar::GRAM_NATIVE_XL_A1, true );
->>>>>>> staging/premerge/dev300_m98
 }
 
 uno::Any
@@ -2162,12 +1996,8 @@ ScVbaRange::Offset( const ::uno::Any &nRowOff, const uno::Any &nColOff ) throw (
         return new ScVbaRange( mxParent, mxContext, xRanges );
     }
     // normal range
-<<<<<<< HEAD
     uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), *aCellRanges.front() ) );
-=======
-    uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), *aCellRanges.First() ) );
->>>>>>> staging/premerge/dev300_m98
-    return new ScVbaRange( mxParent, mxContext, xRange  );
+    return new ScVbaRange( mxParent, mxContext, xRange );
 }
 
 uno::Reference< excel::XRange >
@@ -2188,11 +2018,7 @@ ScVbaRange::CurrentRegion() throw (uno::RuntimeException)
         helper.getSheetCellCursor();
     xSheetCellCursor->collapseToCurrentRegion();
     uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable(xSheetCellCursor, uno::UNO_QUERY_THROW);
-<<<<<<< HEAD
     return RangeHelper::createRangeFromRange( mxParent, mxContext, helper.getCellRangeFromSheet(), xCellRangeAddressable );
-=======
-    return RangeHelper::createRangeFromRange( mxParent, mxContext, helper.getCellRangeFromSheet(), xCellRangeAddressable );	
->>>>>>> staging/premerge/dev300_m98
 }
 
 uno::Reference< excel::XRange >
@@ -2212,11 +2038,7 @@ ScVbaRange::CurrentArray() throw (uno::RuntimeException)
         helper.getSheetCellCursor();
     xSheetCellCursor->collapseToCurrentArray();
     uno::Reference< sheet::XCellRangeAddressable > xCellRangeAddressable(xSheetCellCursor, uno::UNO_QUERY_THROW);
-<<<<<<< HEAD
     return RangeHelper::createRangeFromRange( mxParent, mxContext, helper.getCellRangeFromSheet(), xCellRangeAddressable );
-=======
-    return RangeHelper::createRangeFromRange( mxParent, mxContext, helper.getCellRangeFromSheet(), xCellRangeAddressable );	
->>>>>>> staging/premerge/dev300_m98
 }
 
 uno::Any
@@ -2429,11 +2251,6 @@ ScVbaRange::CellsHelper( const uno::Reference< ov::XHelperInterface >& xParent,
     uno::Any aRowIndexAny = nRowIndex;
     if ( aRowIndexAny.getValueTypeClass() == uno::TypeClass_INTERFACE )
     {
-<<<<<<< HEAD
-=======
-        uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( xContext );
-        uno::Any aConverted;
->>>>>>> staging/premerge/dev300_m98
         try
         {
             aRowIndexAny = getDefaultPropByIntrospection( aRowIndexAny );
@@ -2451,7 +2268,6 @@ ScVbaRange::CellsHelper( const uno::Reference< ov::XHelperInterface >& xParent,
         }
         catch( uno::Exception& ) {} // silence any errors
     }
-<<<<<<< HEAD
 
     uno::Any aColumnAny = nColumnIndex;
 
@@ -2492,19 +2308,11 @@ ScVbaRange::CellsHelper( const uno::Reference< ov::XHelperInterface >& xParent,
        }
     }
     RangeHelper thisRange( mxRange );
-=======
-                                                                                                                       
-    RangeHelper thisRange( xRange );
->>>>>>> staging/premerge/dev300_m98
     table::CellRangeAddress thisRangeAddress =  thisRange.getCellRangeAddressable()->getRangeAddress();
     uno::Reference< table::XCellRange > xSheetRange = thisRange.getCellRangeFromSheet();
     if( !bIsIndex && !bIsColumnIndex ) // .Cells
         // #FIXE needs proper parent ( Worksheet )
-<<<<<<< HEAD
-        return uno::Reference< excel::XRange >( new ScVbaRange( mxParent, mxContext, mxRange ) );
-=======
         return uno::Reference< excel::XRange >( new ScVbaRange( xParent, xContext, xRange ) );
->>>>>>> staging/premerge/dev300_m98
 
     sal_Int32 nIndex = --nRow;
     if( bIsIndex && !bIsColumnIndex ) // .Cells(n)
@@ -2521,13 +2329,8 @@ ScVbaRange::CellsHelper( const uno::Reference< ov::XHelperInterface >& xParent,
     else
         --nColumn;
     nRow = nRow + thisRangeAddress.StartRow;
-<<<<<<< HEAD
-    nColumn =  nColumn + thisRangeAddress.StartColumn;
-    return new ScVbaRange( mxParent, mxContext, xSheetRange->getCellRangeByPosition( nColumn, nRow,                                        nColumn, nRow ) );
-=======
     nColumn =  nColumn + thisRangeAddress.StartColumn;	
     return new ScVbaRange( xParent, xContext, xSheetRange->getCellRangeByPosition( nColumn, nRow,                                        nColumn, nRow ) );
->>>>>>> staging/premerge/dev300_m98
 }
 
 void
@@ -2556,11 +2359,7 @@ ScVbaRange::Select() throw (uno::RuntimeException)
         }
         catch( uno::Exception& )
         {
-<<<<<<< HEAD
         }
-=======
-        }		
->>>>>>> staging/premerge/dev300_m98
     }
 }
 
@@ -2600,22 +2399,14 @@ ScVbaRange::Activate() throw (uno::RuntimeException)
     RangeHelper thisRange( xCellRange );
     uno::Reference< sheet::XCellRangeAddressable > xThisRangeAddress = thisRange.getCellRangeAddressable();
     table::CellRangeAddress thisRangeAddress = xThisRangeAddress->getRangeAddress();
-<<<<<<< HEAD
-        uno::Reference< frame::XModel > xModel;
-=======
-        uno::Reference< frame::XModel > xModel;	
->>>>>>> staging/premerge/dev300_m98
-        ScDocShell* pShell = getScDocShell();
-
-        if ( pShell )
-            xModel = pShell->GetModel();
-
-        if ( !xModel.is() )
-<<<<<<< HEAD
-            throw uno::RuntimeException();
-=======
-            throw uno::RuntimeException(); 
->>>>>>> staging/premerge/dev300_m98
+    uno::Reference< frame::XModel > xModel;
+    ScDocShell* pShell = getScDocShell();
+
+    if ( pShell )
+        xModel = pShell->GetModel();
+
+    if ( !xModel.is() )
+        throw uno::RuntimeException();
 
     // get current selection
     uno::Reference< sheet::XCellRangeAddressable > xRange( xModel->getCurrentSelection(), ::uno::UNO_QUERY);
@@ -2693,11 +2484,7 @@ ScVbaRange::Rows(const uno::Any& aIndex ) throw (uno::RuntimeException)
     if ( m_Areas->getCount() > 1 )
         return new ScVbaRange(  mxParent, mxContext, mxRanges, true );
     return new ScVbaRange(  mxParent, mxContext, mxRange, true );
-<<<<<<< HEAD
 }
-=======
-}	
->>>>>>> staging/premerge/dev300_m98
 
 uno::Reference< excel::XRange >
 ScVbaRange::Columns(const uno::Any& aIndex ) throw (uno::RuntimeException)
@@ -2737,11 +2524,7 @@ ScVbaRange::Columns(const uno::Any& aIndex ) throw (uno::RuntimeException)
     // Columns() - no params
     uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), aRange ) );
     return new ScVbaRange( mxParent, mxContext, xRange, false, true  );
-<<<<<<< HEAD
 }
-=======
-}	
->>>>>>> staging/premerge/dev300_m98
 
 void
 ScVbaRange::setMergeCells( const uno::Any& aIsMerged ) throw (script::BasicErrorException, uno::RuntimeException)
@@ -2749,7 +2532,6 @@ ScVbaRange::setMergeCells( const uno::Any& aIsMerged ) throw (script::BasicError
     bool bMerge = extractBoolFromAny( aIsMerged );
 
     if( mxRanges.is() )
-<<<<<<< HEAD
     {
         sal_Int32 nCount = mxRanges->getCount();
 
@@ -2794,52 +2576,6 @@ ScVbaRange::getMergeCells() throw (script::BasicErrorException, uno::RuntimeExce
             if( eMerged != util::TriState_NO )
                 return aNULL();
         }
-=======
-    {
-        sal_Int32 nCount = mxRanges->getCount();
-
-        // VBA does nothing (no error) if the own ranges overlap somehow
-        ::std::vector< table::CellRangeAddress > aList;
-        for( sal_Int32 nIndex = 0; nIndex < nCount; ++nIndex )
-        {
-            uno::Reference< sheet::XCellRangeAddressable > xRangeAddr( mxRanges->getByIndex( nIndex ), uno::UNO_QUERY_THROW );
-            table::CellRangeAddress aAddress = xRangeAddr->getRangeAddress();
-            for( ::std::vector< table::CellRangeAddress >::const_iterator aIt = aList.begin(), aEnd = aList.end(); aIt != aEnd; ++aIt )
-                if( ScUnoConversion::Intersects( *aIt, aAddress ) )
-                    return;
-            aList.push_back( aAddress );
-        }
-
-        // (un)merge every range after it has been extended to intersecting merged ranges from sheet
-        for( sal_Int32 nIndex = 0; nIndex < nCount; ++nIndex )
-        {
-            uno::Reference< table::XCellRange > xRange( mxRanges->getByIndex( nIndex ), uno::UNO_QUERY_THROW );
-            lclExpandAndMerge( xRange, bMerge );
-        }
-        return;
-    }
-
-    // otherwise, merge single range
-    lclExpandAndMerge( mxRange, bMerge );
-}
-                                                                                                                             
-uno::Any
-ScVbaRange::getMergeCells() throw (script::BasicErrorException, uno::RuntimeException)
-{
-    if( mxRanges.is() )
-    {
-        sal_Int32 nCount = mxRanges->getCount();
-        for( sal_Int32 nIndex = 0; nIndex < nCount; ++nIndex )
-        {
-            uno::Reference< table::XCellRange > xRange( mxRanges->getByIndex( nIndex ), uno::UNO_QUERY_THROW );
-            util::TriState eMerged = lclGetMergedState( xRange );
-            /*  Excel always returns NULL, if one range of the range list is
-                partly or completely merged. Even if all ranges are completely
-                merged, the return value is still NULL. */
-            if( eMerged != util::TriState_NO )
-                return aNULL();
-        }
->>>>>>> staging/premerge/dev300_m98
         // no range is merged anyhow, return false
         return uno::Any( false );
     }
@@ -2875,17 +2611,11 @@ ScVbaRange::Copy(const ::uno::Any& Destination) throw (uno::RuntimeException)
     }
     else
     {
-<<<<<<< HEAD
         ScRange aRange;
         RangeHelper thisRange( mxRange );
         ScUnoConversion::FillScRange( aRange, thisRange.getCellRangeAddressable()->getRangeAddress() );
         uno::Reference< frame::XModel > xModel = excel::GetModelFromRange( mxRange );
         excel::implnCopyRange( xModel, aRange );
-=======
-        uno::Reference< frame::XModel > xModel = getModelFromRange( mxRange );
-        Select();
-        excel::implnCopy( xModel );
->>>>>>> staging/premerge/dev300_m98
     }
 }
 
@@ -2907,13 +2637,9 @@ ScVbaRange::Cut(const ::uno::Any& Destination) throw (uno::RuntimeException)
         uno::Reference< sheet::XCellRangeAddressable > xSource( mxRange, uno::UNO_QUERY);
         xMover->moveRange( xDestination->getCellAddress(), xSource->getRangeAddress() );
     }
-<<<<<<< HEAD
-    else {
-        uno::Reference< frame::XModel > xModel = excel::GetModelFromRange( mxRange );
-=======
+    else
     {
-        uno::Reference< frame::XModel > xModel = getModelFromRange( mxRange );
->>>>>>> staging/premerge/dev300_m98
+        uno::Reference< frame::XModel > xModel = excel::GetModelFromRange( mxRange );
         Select();
         excel::implnCut( xModel );
     }
@@ -3147,21 +2873,13 @@ ScVbaRange::Range( const uno::Any &Cell1, const uno::Any &Cell2, bool bForceUseI
             xCellRange = new ScCellRangeObj( getScDocShell(), aNew );
         }
     }
-<<<<<<< HEAD
 
-=======
-        
->>>>>>> staging/premerge/dev300_m98
     return new ScVbaRange( mxParent, mxContext, xCellRange );
 
 }
 
 // Allow access to underlying openoffice uno api ( useful for debugging
-<<<<<<< HEAD
 // with openoffice basic )
-=======
-// with openoffice basic ) 
->>>>>>> staging/premerge/dev300_m98
 uno::Any SAL_CALL ScVbaRange::getCellRange(  ) throw (uno::RuntimeException)
 {
     uno::Any aAny;
@@ -3172,22 +2890,14 @@ uno::Any SAL_CALL ScVbaRange::getCellRange(  ) throw (uno::RuntimeException)
     return aAny;
 }
 
-<<<<<<< HEAD
 uno::Any ScVbaRange::getCellRange( const uno::Reference< excel::XRange >& rxRange ) throw (uno::RuntimeException)
-=======
-/*static*/ uno::Any ScVbaRange::getCellRange( const uno::Reference< excel::XRange >& rxRange ) throw (uno::RuntimeException)
->>>>>>> staging/premerge/dev300_m98
 {
     if( ScVbaRange* pVbaRange = getImplementation( rxRange ) )
         return pVbaRange->getCellRange();
     throw uno::RuntimeException();
 }
 
-<<<<<<< HEAD
 static USHORT
-=======
-static USHORT 
->>>>>>> staging/premerge/dev300_m98
 getPasteFlags (sal_Int32 Paste)
 {
     USHORT nFlags = IDF_NONE;
@@ -3245,19 +2955,13 @@ ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, cons
 {
     if ( m_Areas->getCount() > 1 )
         throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("That command cannot be used on multiple selections" ) ), uno::Reference< uno::XInterface >() );
-<<<<<<< HEAD
-        ScDocShell* pShell = getScDocShell();
 
-        uno::Reference< frame::XModel > xModel( ( pShell ? pShell->GetModel() : NULL ), uno::UNO_QUERY_THROW );
-    uno::Reference< view::XSelectionSupplier > xSelection( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
-=======
-        ScDocShell* pShell = getScDocShell(); 
+    ScDocShell* pShell = getScDocShell();
   
-        uno::Reference< frame::XModel > xModel( ( pShell ? pShell->GetModel() : NULL ), uno::UNO_QUERY_THROW );
+    uno::Reference< frame::XModel > xModel( ( pShell ? pShell->GetModel() : NULL ), uno::UNO_QUERY_THROW );
     uno::Reference< view::XSelectionSupplier > xSelection( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
     // save old selection
     uno::Reference< uno::XInterface > xSel( xModel->getCurrentSelection() );
->>>>>>> staging/premerge/dev300_m98
     // select this range
     xSelection->select( uno::makeAny( mxRange ) );
     // set up defaults
@@ -3278,11 +2982,8 @@ ScVbaRange::PasteSpecial( const uno::Any& Paste, const uno::Any& Operation, cons
     USHORT nFlags = getPasteFlags(nPaste);
     USHORT nFormulaBits = getPasteFormulaBits(nOperation);
     excel::implnPasteSpecial(pShell->GetModel(), nFlags,nFormulaBits,bSkipBlanks,bTranspose);
-<<<<<<< HEAD
-=======
     // restore selection
     xSelection->select( uno::makeAny( xSel ) );
->>>>>>> staging/premerge/dev300_m98
 }
 
 uno::Reference< excel::XRange >
@@ -3309,17 +3010,10 @@ ScVbaRange::getEntireColumnOrRow( bool bColumn ) throw (uno::RuntimeException)
     if ( aCellRanges.size() > 1 ) // Multi-Area
     {
         uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( pUnoRangesBase->GetDocShell(), aCellRanges ) );
-<<<<<<< HEAD
 
         return new ScVbaRange( mxParent, mxContext, xRanges, !bColumn, bColumn );
     }
     uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), *aCellRanges.front() ) );
-=======
-        
-        return new ScVbaRange( mxParent, mxContext, xRanges, !bColumn, bColumn );
-    }
-    uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( pUnoRangesBase->GetDocShell(), *aCellRanges.First() ) );
->>>>>>> staging/premerge/dev300_m98
     return new ScVbaRange( mxParent, mxContext, xRange, !bColumn, bColumn  );
 }
 
@@ -3341,7 +3035,6 @@ ScVbaRange::AddComment( const uno::Any& Text ) throw (uno::RuntimeException)
     // if there is already a comment in the top-left cell then throw
     if( getComment().is() )
         throw uno::RuntimeException();
-<<<<<<< HEAD
 
     // workaround: Excel allows to create empty comment, Calc does not
     ::rtl::OUString aNoteText;
@@ -3350,16 +3043,6 @@ ScVbaRange::AddComment( const uno::Any& Text ) throw (uno::RuntimeException)
     if( aNoteText.getLength() == 0 )
         aNoteText = ::rtl::OUString( sal_Unicode( ' ' ) );
 
-=======
-    
-    // workaround: Excel allows to create empty comment, Calc does not
-    ::rtl::OUString aNoteText;
-    if( Text.hasValue() && !(Text >>= aNoteText) )
-        throw uno::RuntimeException();
-    if( aNoteText.getLength() == 0 )
-        aNoteText = ::rtl::OUString( sal_Unicode( ' ' ) );
-
->>>>>>> staging/premerge/dev300_m98
     // try to create a new annotation
     table::CellRangeAddress aRangePos = lclGetRangeAddress( mxRange );
     table::CellAddress aNotePos( aRangePos.Sheet, aRangePos.StartColumn, aRangePos.StartRow );
@@ -3543,11 +3226,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& After, const uno::Any& L
     rtl::OUString sWhat;
     sal_Int32 nWhat = 0;
     double fWhat = 0.0;
-<<<<<<< HEAD
 
-=======
-    
->>>>>>> staging/premerge/dev300_m98
     // string.
     if( What >>= sWhat )
     {
@@ -3977,7 +3656,6 @@ ScVbaRange::End( ::sal_Int32 Direction )  throw (uno::RuntimeException)
         return xRange->End( Direction );
     }
 
-<<<<<<< HEAD
     table::CellAddress aAddress = getLeftUpperCellAddress();
     SCTAB nTab = aAddress.Sheet;
     SCCOL nCurX = aAddress.Column;
@@ -4012,74 +3690,6 @@ ScVbaRange::End( ::sal_Int32 Direction )  throw (uno::RuntimeException)
     {
         pDoc->FindAreaPos( nNewX, nNewY, nTab, nMoveX, nMoveY );
     }
-=======
-    
-    // #FIXME #TODO
-    // euch! found my orig implementation sucked, so 
-    // trying this even suckier one ( really need to use/expose code in
-    // around  ScTabView::MoveCursorArea(), thats the bit that calcutes
-    // where the cursor should go ) 
-    // Main problem with this method is the ultra hacky attempt to preserve
-    // the ActiveCell, there should be no need to go to these extreems
-    
-    // Save ActiveCell pos ( to restore later )
-    uno::Any aDft;
-    uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
-    rtl::OUString sActiveCell = xApplication->getActiveCell()->Address(aDft, aDft, aDft, aDft, aDft );
-
-    // position current cell upper left of this range
-    Cells( uno::makeAny( (sal_Int32) 1 ), uno::makeAny( (sal_Int32) 1 ) )->Select();
-
-        uno::Reference< frame::XModel > xModel = getModelFromRange( mxRange );
-
-    SfxViewFrame* pViewFrame = excel::getViewFrame( xModel );
-    if ( pViewFrame )
-    {
-        SfxAllItemSet aArgs( SFX_APP()->GetPool() );
-        // Hoping this will make sure this slot is called
-        // synchronously
-        SfxBoolItem sfxAsync( SID_ASYNCHRON, sal_False );
-        aArgs.Put( sfxAsync, sfxAsync.Which() );
-        SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
-
-        USHORT nSID = 0;
-    
-        switch( Direction )
-        {
-            case excel::XlDirection::xlDown:
-                nSID = SID_CURSORBLKDOWN;
-                break;
-            case excel::XlDirection::xlUp:
-                nSID = SID_CURSORBLKUP;
-                break;
-            case excel::XlDirection::xlToLeft:
-                nSID = SID_CURSORBLKLEFT;
-                break;
-            case excel::XlDirection::xlToRight:
-                nSID = SID_CURSORBLKRIGHT;
-                break;
-            default:
-                throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ": Invalid ColumnIndex" ) ), uno::Reference< uno::XInterface >() ); 
-        }
-        if ( pDispatcher )
-        {
-            pDispatcher->Execute( nSID, (SfxCallMode)SFX_CALLMODE_SYNCHRON, aArgs );
-        }
-    }
-
-    // result is the ActiveCell		
-    rtl::OUString sMoved =	xApplication->getActiveCell()->Address(aDft, aDft, aDft, aDft, aDft );
-
-    // restore old ActiveCell		
-    uno::Any aVoid;
-
-    uno::Reference< excel::XRange > xOldActiveCell( xApplication->getActiveSheet()->Range( uno::makeAny( sActiveCell ), aVoid ), uno::UNO_QUERY_THROW );
-    xOldActiveCell->Select();
-
-    uno::Reference< excel::XRange > resultCell;
-    
-    resultCell.set( xApplication->getActiveSheet()->Range( uno::makeAny( sMoved ), aVoid ), uno::UNO_QUERY_THROW );
->>>>>>> staging/premerge/dev300_m98
 
     ScRange aNewRange( (SCCOL)nNewX, (SCROW)nNewY, nTab, (SCCOL)nNewX, (SCROW)nNewY, nTab );
     uno::Reference< table::XCellRange > xCellRange( new ScCellRangeObj( getScDocShell(), aNewRange ) );
@@ -4123,17 +3733,10 @@ ScVbaRange::Delete( const uno::Any& Shift ) throw (uno::RuntimeException)
         }
         return;
     }
-<<<<<<< HEAD
     sheet::CellDeleteMode mode = sheet::CellDeleteMode_NONE ;
     RangeHelper thisRange( mxRange );
     table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
     if ( Shift.hasValue() )
-=======
-    sheet::CellDeleteMode mode = sheet::CellDeleteMode_NONE ; 
-    RangeHelper thisRange( mxRange );
-    table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
-    if ( Shift.hasValue() )		
->>>>>>> staging/premerge/dev300_m98
     {
         sal_Int32 nShift = 0;
         Shift >>= nShift;
@@ -4160,13 +3763,7 @@ ScVbaRange::Delete( const uno::Any& Shift ) throw (uno::RuntimeException)
             mode = sheet::CellDeleteMode_LEFT;
     }
     uno::Reference< sheet::XCellRangeMovement > xCellRangeMove( thisRange.getSpreadSheet(), uno::UNO_QUERY_THROW );
-<<<<<<< HEAD
     xCellRangeMove->removeRange( thisAddress, mode );
-
-=======
-    xCellRangeMove->removeRange( thisAddress, mode ); 
-    
->>>>>>> staging/premerge/dev300_m98
 }
 
 //XElementAccess
@@ -4207,8 +3804,6 @@ ScVbaRange::getDefaultMethodName(  ) throw (uno::RuntimeException)
     return sName;
 }
 
-
-<<<<<<< HEAD
 uno::Reference< awt::XDevice >
 getDeviceFromDoc( const uno::Reference< frame::XModel >& xModel ) throw( uno::RuntimeException )
 {
@@ -4218,8 +3813,6 @@ getDeviceFromDoc( const uno::Reference< frame::XModel >& xModel ) throw( uno::Ru
     return xDevice;
 }
 
-=======
->>>>>>> staging/premerge/dev300_m98
 // returns calc internal col. width ( in points )
 double
 ScVbaRange::getCalcColWidth( const table::CellRangeAddress& rAddress) throw (uno::RuntimeException)
@@ -4242,7 +3835,6 @@ ScVbaRange::getCalcRowHeight( const table::CellRangeAddress& rAddress ) throw (u
 }
 
 // return Char Width in points
-<<<<<<< HEAD
 double getDefaultCharWidth( const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException )
 {
     const static rtl::OUString sDflt( RTL_CONSTASCII_USTRINGPARAM("Default"));
@@ -4266,18 +3858,6 @@ double getDefaultCharWidth( const uno::Reference< frame::XModel >& xModel ) thro
     double nCharWidth = nCharPixelWidth /  nPixelsPerMeter;
     nCharWidth = nCharWidth * (double)56700;// in twips
     return lcl_TwipsToPoints( (USHORT)nCharWidth );
-=======
-double getDefaultCharWidth( ScDocShell* pDocShell )
-{
-    ScDocument* pDoc = pDocShell->GetDocument();
-    OutputDevice* pRefDevice = pDoc->GetRefDevice();
-    ScPatternAttr* pAttr = pDoc->GetDefPattern();
-    ::Font aDefFont;
-    pAttr->GetFont( aDefFont, SC_AUTOCOL_BLACK, pRefDevice );
-    pRefDevice->SetFont( aDefFont );
-    long nCharWidth = pRefDevice->GetTextWidth( String( '0' ) );        // 1/100th mm
-    return lcl_hmmToPoints( nCharWidth );
->>>>>>> staging/premerge/dev300_m98
 }
 
 uno::Any SAL_CALL
@@ -4337,18 +3917,12 @@ ScVbaRange::setColumnWidth( const uno::Any& _columnwidth ) throw (uno::RuntimeEx
         ScDocShell* pDocShell = getScDocShell();
         if ( pDocShell )
         {
-<<<<<<< HEAD
                 uno::Reference< frame::XModel > xModel = pDocShell->GetModel();
                 if ( xModel.is() )
                 {
 
             nColWidth = ( nColWidth * getDefaultCharWidth( xModel ) );
             RangeHelper thisRange( mxRange );
-=======
-            if ( nColWidth != 0.0 )
-                nColWidth = ( nColWidth + fExtraWidth ) * getDefaultCharWidth( pDocShell );
-            RangeHelper thisRange( mxRange );	
->>>>>>> staging/premerge/dev300_m98
             table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
             USHORT nTwips = lcl_pointsToTwips( nColWidth );
 
@@ -4356,16 +3930,8 @@ ScVbaRange::setColumnWidth( const uno::Any& _columnwidth ) throw (uno::RuntimeEx
             SCCOLROW nColArr[2];
             nColArr[0] = thisAddress.StartColumn;
             nColArr[1] = thisAddress.EndColumn;
-<<<<<<< HEAD
             aFunc.SetWidthOrHeight( TRUE, 1, nColArr, thisAddress.Sheet, SC_SIZE_ORIGINAL,
                                                                                 nTwips, TRUE, TRUE );
-
-=======
-            // #163561# use mode SC_SIZE_DIRECT: hide for width 0, show for other values
-            aFunc.SetWidthOrHeight( TRUE, 1, nColArr, thisAddress.Sheet, SC_SIZE_DIRECT,
-                                                                                nTwips, TRUE, TRUE );		
-            
->>>>>>> staging/premerge/dev300_m98
         }
 }
 
@@ -4526,14 +4092,8 @@ ScVbaRange::setRowHeight( const uno::Any& _rowheight) throw (uno::RuntimeExcepti
     SCCOLROW nRowArr[2];
     nRowArr[0] = thisAddress.StartRow;
     nRowArr[1] = thisAddress.EndRow;
-<<<<<<< HEAD
     aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, thisAddress.Sheet, SC_SIZE_ORIGINAL,
-                                                                        nTwips, TRUE, TRUE );
-=======
-    // #163561# use mode SC_SIZE_DIRECT: hide for height 0, show for other values
-    aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, thisAddress.Sheet, SC_SIZE_DIRECT,
-                                                                        nTwips, TRUE, TRUE );		
->>>>>>> staging/premerge/dev300_m98
+                            nTwips, TRUE, TRUE );
 }
 
 uno::Any SAL_CALL
@@ -4553,29 +4113,17 @@ ScVbaRange::getPageBreak() throw (uno::RuntimeException)
         uno::Reference< frame::XModel > xModel = pShell->GetModel();
         if ( xModel.is() )
         {
-<<<<<<< HEAD
             ScDocument* pDoc = excel::GetDocumentFromRange( mxRange );
 
-=======
-            ScDocument* pDoc =  getDocumentFromRange( mxRange );
-            
->>>>>>> staging/premerge/dev300_m98
             ScBreakType nBreak = BREAK_NONE;
             if ( !bColumn )
                 nBreak = pDoc->HasRowBreak(thisAddress.StartRow, thisAddress.Sheet);
             else
                 nBreak = pDoc->HasColBreak(thisAddress.StartColumn, thisAddress.Sheet);
-<<<<<<< HEAD
 
             if (nBreak & BREAK_PAGE)
                 nPageBreak = excel::XlPageBreak::xlPageBreakAutomatic;
 
-=======
-                
-            if (nBreak & BREAK_PAGE)
-                nPageBreak = excel::XlPageBreak::xlPageBreakAutomatic;
-                
->>>>>>> staging/premerge/dev300_m98
             if (nBreak & BREAK_MANUAL)
                 nPageBreak = excel::XlPageBreak::xlPageBreakManual;
         }
@@ -4688,11 +4236,7 @@ ScVbaRange::getWorksheet() throw (uno::RuntimeException)
         RangeHelper rHelper(xRange);
         // parent should be Thisworkbook
            xSheet.set( new ScVbaWorksheet( uno::Reference< XHelperInterface >(), mxContext,rHelper.getSpreadSheet(),pDocShell->GetModel()) );
-<<<<<<< HEAD
     }
-=======
-    }	
->>>>>>> staging/premerge/dev300_m98
     return xSheet;
 }
 
@@ -4722,11 +4266,7 @@ ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xC
     {
         const static rtl::OUString sNamedRanges( RTL_CONSTASCII_USTRINGPARAM("NamedRanges"));
         uno::Reference< beans::XPropertySet > xPropSet( getCurrentExcelDoc(xContext), uno::UNO_QUERY_THROW );
-<<<<<<< HEAD
 
-=======
-        
->>>>>>> staging/premerge/dev300_m98
         uno::Reference< container::XNameAccess > xNamed( xPropSet->getPropertyValue( sNamedRanges ), uno::UNO_QUERY_THROW );
         uno::Reference< sheet::XCellRangeReferrer > xReferrer;
         try
@@ -4747,15 +4287,6 @@ ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xC
             }
         }
     }
-<<<<<<< HEAD
-=======
-    uno::Reference< sheet::XSpreadsheetView > xView( getCurrentExcelDoc(xContext)->getCurrentController(), uno::UNO_QUERY );
-    uno::Reference< table::XCellRange > xSheetRange( xView->getActiveSheet(), uno::UNO_QUERY_THROW ); 
-    ScVbaRange* pRange = new ScVbaRange( excel::getUnoSheetModuleObj( xSheetRange ), xContext, xSheetRange );
-    uno::Reference< excel::XRange > xVbSheetRange( pRange );
-    return pRange->Range( Cell1, Cell2, true ); 
-}
->>>>>>> staging/premerge/dev300_m98
 
     // Add these codes for supporting shortcut: Application.Range(Range1, Range2), Range1 or Range2 is not the range of current active sheet.
     // If Range1 and Range2 are not in current active sheet, we should not use the active sheet, but use the sheet of Range1 and Range2.
@@ -5023,7 +4554,6 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
 
         uno::Reference< beans::XPropertySet > xDBRangeProps( xDataBaseRange, uno::UNO_QUERY_THROW );
         // set autofilt
-<<<<<<< HEAD
         xDBRangeProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoFilter") ), uno::Any(sal_True) );
         // set header
         uno::Reference< beans::XPropertySet > xFiltProps( xDataBaseRange->getFilterDescriptor(), uno::UNO_QUERY_THROW );
@@ -5032,12 +4562,6 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
 
         bHasColHeader = pDoc->HasColHeader(  static_cast< SCCOL >( autoFiltAddress.StartColumn ), static_cast< SCROW >( autoFiltAddress.StartRow ), static_cast< SCCOL >( autoFiltAddress.EndColumn ), static_cast< SCROW >( autoFiltAddress.EndRow ), static_cast< SCTAB >( autoFiltAddress.Sheet ) ) ? sal_True : sal_False;
         xFiltProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ContainsHeader") ), uno::Any( bHasColHeader ) );
-=======
-        xDBRangeProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("AutoFilter") ), uno::Any(sal_True) ); 
-        // set header (autofilter always need column headers)
-        uno::Reference< beans::XPropertySet > xFiltProps( xDataBaseRange->getFilterDescriptor(), uno::UNO_QUERY_THROW );
-        xFiltProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ContainsHeader") ), uno::Any( sal_True ) );
->>>>>>> staging/premerge/dev300_m98
     }
 
 
@@ -5062,7 +4586,6 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
         throw uno::RuntimeException();
     // Use the normal uno api, sometimes e.g. when you want to use ALL as the filter
     // we can't use refresh as the uno interface doesn't have a concept of ALL
-<<<<<<< HEAD
     // in this case we just call the core calc functionality -
     bool bAll = false;
     uno::Reference< script::XTypeConverter > xConverter = getTypeConverter( mxContext );
@@ -5079,11 +4602,6 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
         }
     }
     if ( bIsValidFieldValue )
-=======
-    // in this case we just call the core calc functionality - 
-    bool bAll = false;
-    if ( ( Field >>= nField )  )
->>>>>>> staging/premerge/dev300_m98
     {
         uno::Reference< sheet::XSheetFilterDescriptor2 > xDesc(
                 xDataBaseRange->getFilterDescriptor(), uno::UNO_QUERY );
@@ -5230,13 +4748,8 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
     }
 }
 
-<<<<<<< HEAD
 void SAL_CALL
 ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& CopyOrigin ) throw (uno::RuntimeException)
-=======
-void SAL_CALL 
-ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& /* CopyOrigin */ ) throw (uno::RuntimeException)
->>>>>>> staging/premerge/dev300_m98
 {
     sal_Bool bCopyOrigin = sal_True;
     CopyOrigin >>= bCopyOrigin;
@@ -5271,7 +4784,6 @@ ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& /* CopyOrigin */ ) th
             mode = sheet::CellInsertMode_RIGHT;
     }
     RangeHelper thisRange( mxRange );
-<<<<<<< HEAD
     table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();
     uno::Reference< sheet::XCellRangeMovement > xCellRangeMove( thisRange.getSpreadSheet(), uno::UNO_QUERY_THROW );
     xCellRangeMove->insertCells( thisAddress, mode );
@@ -5281,21 +4793,6 @@ ScVbaRange::Insert( const uno::Any& Shift, const uno::Any& /* CopyOrigin */ ) th
         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( excel::GetDocShellFromRange( mxRange ) , aRange ) );
         uno::Reference< excel::XRange > xVbaRange( new ScVbaRange( mxParent, mxContext, xRange, mbIsRows, mbIsColumns ) );
-=======
-    table::CellRangeAddress thisAddress = thisRange.getCellRangeAddressable()->getRangeAddress();	
-    uno::Reference< sheet::XCellRangeMovement > xCellRangeMove( thisRange.getSpreadSheet(), uno::UNO_QUERY_THROW );	
-    xCellRangeMove->insertCells( thisAddress, mode );
-
-    // Paste from clipboard only if the clipboard content was copied via VBA, and not already pasted via VBA again.
-    // "Insert" behavior should not depend on random clipboard content previously copied by the user.
-    ScTransferObj* pClipObj = ScTransferObj::GetOwnClipboard( NULL );
-    if ( pClipObj && pClipObj->GetUseInApi() )
-    {
-        // 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( mxParent, mxContext, xRange, mbIsRows, mbIsColumns ) );	
->>>>>>> staging/premerge/dev300_m98
         xVbaRange->PasteSpecial( uno::Any(), uno::Any(), uno::Any(), uno::Any() );
     }
 }
@@ -5578,11 +5075,7 @@ ScVbaRange::Hyperlinks( const uno::Any& aIndex ) throw (uno::RuntimeException)
     /*  The range object always returns a new Hyperlinks object containing a
         fixed list of existing hyperlinks in the range.
         See vbahyperlinks.hxx for more details. */
-<<<<<<< HEAD
 
-=======
-        
->>>>>>> staging/premerge/dev300_m98
     // get the global hyperlink object of the sheet (sheet should always be the parent of a Range object)
     uno::Reference< excel::XWorksheet > xWorksheet( getParent(), uno::UNO_QUERY_THROW );
     uno::Reference< excel::XHyperlinks > xSheetHlinks( xWorksheet->Hyperlinks( uno::Any() ), uno::UNO_QUERY_THROW );
@@ -5683,20 +5176,12 @@ uno::Any SAL_CALL ScVbaRange::getPrefixCharacter() throw (uno::RuntimeException)
         character, if the cell is right-aligned; a circumflex character, if the
         cell is centered; a backslash character, if the cell is set to filled;
         or an empty string, if nothing of the above.
-<<<<<<< HEAD
 
-=======
-        
->>>>>>> staging/premerge/dev300_m98
         If a range or a list of ranges contains texts with leading apostroph
         character as well as other cells, this function returns an empty
         string.
      */
-<<<<<<< HEAD
 
-=======
-     
->>>>>>> staging/premerge/dev300_m98
     if( mxRange.is() )
         return lclGetPrefixVariant( lclGetPrefixChar( mxRange ) );
     if( mxRanges.is() )
@@ -5754,11 +5239,7 @@ void ScVbaRange::setShowDetail(const uno::Any& aShowDetail) throw ( css::uno::Ru
     // In MSO VBA, the specified range must be a single summary column or row in an outline. otherwise throw exception
     if( m_Areas->getCount() > 1 )
         throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can not set Range.ShowDetail attribute ")), uno::Reference< uno::XInterface >() );
-<<<<<<< HEAD
 
-=======
-    
->>>>>>> staging/premerge/dev300_m98
     bool bShowDetail = extractBoolFromAny( aShowDetail );
 
     RangeHelper helper( mxRange );
@@ -6315,11 +5796,7 @@ ScVbaRange::PreviousNext( bool bIsPrevious )
     refRange.aEnd.SetTab( nTab );
 
     uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getScDocShell() , refRange ) );
-<<<<<<< HEAD
 
-=======
-    
->>>>>>> staging/premerge/dev300_m98
     return new ScVbaRange( mxParent, mxContext, xRange );
 }
 
@@ -6403,19 +5880,11 @@ ScVbaRange::SpecialCells( const uno::Any& _oType, const uno::Any& _oValue) throw
                 // Single range
                 if ( aCellRanges.size() == 1 )
                 {
-<<<<<<< HEAD
                     uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getScDocShell(), *aCellRanges.front() ) );
                     return new ScVbaRange( mxParent, mxContext, xRange );
                 }
                 uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( getScDocShell(), aCellRanges ) );
 
-=======
-                    uno::Reference< table::XCellRange > xRange( new ScCellRangeObj( getScDocShell(), *aCellRanges.First() ) );
-                    return new ScVbaRange( mxParent, mxContext, xRange );
-                }
-                uno::Reference< sheet::XSheetCellRangeContainer > xRanges( new ScCellRangesObj( getScDocShell(), aCellRanges ) );
-     
->>>>>>> staging/premerge/dev300_m98
                 return new ScVbaRange( mxParent, mxContext, xRanges );
             }
             else if ( bIsSingleCell )


More information about the Libreoffice-commits mailing list