ooo-build r15192 - in trunk: . patches/dev300
- From: kyoshida svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r15192 - in trunk: . patches/dev300
- Date: Wed, 28 Jan 2009 04:28:11 +0000 (UTC)
Author: kyoshida
Date: Wed Jan 28 04:28:11 2009
New Revision: 15192
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15192&view=rev
Log:
2009-01-27 Kohei Yoshida <kyoshida novell com>
* patches/dev300/vba-get-nonfiltered-range-selection-m39.diff:
* patches/dev300/vba-get-nonfiltered-range-selection.diff:
* patches/dev300/apply: adjusted for dev300-m40.
Added:
trunk/patches/dev300/vba-get-nonfiltered-range-selection-m39.diff (props changed)
- copied unchanged from r15189, /trunk/patches/dev300/vba-get-nonfiltered-range-selection.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
trunk/patches/dev300/vba-get-nonfiltered-range-selection.diff
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Wed Jan 28 04:28:11 2009
@@ -1911,10 +1911,17 @@
vba-support-export-palette.diff, i#68900
+[ VBAObjects <= dev300-m39 ]
+# always get non-filtered range selection when querying for current selection
+# address.
+vba-get-nonfiltered-range-selection-m39.diff, n#415002, kohei
+
+[ VBAObjects > dev300-m39 ]
# always get non-filtered range selection when querying for current selection
# address.
vba-get-nonfiltered-range-selection.diff, n#415002, kohei
+[ VBAObjects ]
vba-allow-ranges-for-cell-functions.diff
vba-error-object.diff
Modified: trunk/patches/dev300/vba-get-nonfiltered-range-selection.diff
==============================================================================
--- trunk/patches/dev300/vba-get-nonfiltered-range-selection.diff (original)
+++ trunk/patches/dev300/vba-get-nonfiltered-range-selection.diff Wed Jan 28 04:28:11 2009
@@ -1,8 +1,8 @@
diff --git sc/inc/unonames.hxx sc/inc/unonames.hxx
-index 73b3744..b2c45ac 100644
+index 38369c4..83c8eac 100644
--- sc/inc/unonames.hxx
+++ sc/inc/unonames.hxx
-@@ -523,6 +523,7 @@
+@@ -528,6 +528,7 @@
#define SC_UNO_ZOOMTYPE "ZoomType"
#define SC_UNO_ZOOMVALUE "ZoomValue"
#define SC_UNO_UPDTEMPL "UpdateFromTemplate"
@@ -11,7 +11,7 @@
#define SC_UNO_ALLOWPRINTJOBCANCEL "AllowPrintJobCancel"
diff --git sc/inc/viewuno.hxx sc/inc/viewuno.hxx
-index 9dfdc83..54671f2 100644
+index 6d72b24..8278da9 100644
--- sc/inc/viewuno.hxx
+++ sc/inc/viewuno.hxx
@@ -198,6 +198,7 @@ private:
@@ -23,10 +23,10 @@
ScViewPaneObj* GetObjectByIndex_Impl(USHORT nIndex) const;
INT16 GetZoom(void) const;
diff --git sc/source/ui/unoobj/viewuno.cxx sc/source/ui/unoobj/viewuno.cxx
-index 3f48d35..8399e8e 100644
+index 760431f..75def7e 100644
--- sc/source/ui/unoobj/viewuno.cxx
+++ sc/source/ui/unoobj/viewuno.cxx
-@@ -544,7 +544,8 @@ ScTabViewObj::ScTabViewObj() :
+@@ -468,7 +468,8 @@ void SAL_CALL ScViewPaneObj::release() throw()
//UNUSED2008-05 aPropSet( lcl_GetViewOptPropertyMap() ),
//UNUSED2008-05 aMouseClickHandlers( 0 ),
//UNUSED2008-05 aActivationListeners( 0 ),
@@ -36,7 +36,7 @@
//UNUSED2008-05 {
//UNUSED2008-05 }
-@@ -554,7 +555,8 @@ ScTabViewObj::ScTabViewObj( ScTabViewShell* pViewSh ) :
+@@ -478,7 +479,8 @@ ScTabViewObj::ScTabViewObj( ScTabViewShell* pViewSh ) :
aPropSet( lcl_GetViewOptPropertyMap() ),
aMouseClickHandlers( 0 ),
aActivationListeners( 0 ),
@@ -46,7 +46,7 @@
{
//! Listening oder so
}
-@@ -971,6 +973,15 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException)
+@@ -883,6 +885,15 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException)
ScRange aRange;
ScMarkType eMarkType = pViewData->GetSimpleArea(aRange);
@@ -62,7 +62,7 @@
if ( nTabs == 1 && (eMarkType == SC_MARK_SIMPLE) )
{
if (aRange.aStart == aRange.aEnd)
-@@ -1815,6 +1826,12 @@ void SAL_CALL ScTabViewObj::setPropertyValue(
+@@ -1728,6 +1739,12 @@ void SAL_CALL ScTabViewObj::setPropertyValue(
ScUnoGuard aGuard;
String aString(aPropertyName);
@@ -75,7 +75,7 @@
ScTabViewShell* pViewSh = GetViewShell();
if (pViewSh)
{
-@@ -1937,6 +1954,12 @@ uno::Any SAL_CALL ScTabViewObj::getPropertyValue( const rtl::OUString& aProperty
+@@ -1848,6 +1865,12 @@ uno::Any SAL_CALL ScTabViewObj::getPropertyValue( const rtl::OUString& aProperty
String aString(aPropertyName);
uno::Any aRet;
@@ -89,103 +89,90 @@
if (pViewSh)
{
diff --git sc/source/ui/vba/vbaapplication.cxx sc/source/ui/vba/vbaapplication.cxx
-index 6ccb8e1..b451440 100644
+index f126f57..431090c 100644
--- sc/source/ui/vba/vbaapplication.cxx
+++ sc/source/ui/vba/vbaapplication.cxx
@@ -84,10 +84,16 @@
-
- #include "convuno.hxx"
- #include "cellsuno.hxx"
-+#include "miscuno.hxx"
-+#include "unonames.hxx"
- #include "docsh.hxx"
-
- using namespace ::ooo::vba;
- using namespace ::com::sun::star;
-+using ::com::sun::star::uno::Reference;
-+using ::com::sun::star::uno::UNO_QUERY_THROW;
-+using ::com::sun::star::uno::UNO_QUERY;
-+using ::rtl::OUString;
-
- // Enable our own join detection for Intersection and Union
- // should be more efficient than using ScRangeList::Join ( because
-@@ -151,33 +157,53 @@ uno::Any SAL_CALL
- ScVbaApplication::getSelection() throw (uno::RuntimeException)
- {
- OSL_TRACE("** ScVbaApplication::getSelection() ** ");
-- uno::Reference< lang::XServiceInfo > xServiceInfo( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
-- rtl::OUString sImpementaionName = xServiceInfo->getImplementationName();
-- if( sImpementaionName.equalsIgnoreAsciiCaseAscii("com.sun.star.drawing.SvxShapeCollection") )
-+
-+ Reference< view::XSelectionSupplier > xSelSupp( getCurrentDocument()->getCurrentController(), UNO_QUERY_THROW );
-+ Reference< beans::XPropertySet > xPropSet( xSelSupp, UNO_QUERY_THROW );
-+ OUString aPropName = OUString::createFromAscii( SC_UNO_FILTERED_RANGE_SELECTION );
-+ uno::Any aOldVal = xPropSet->getPropertyValue( aPropName );
-+ uno::Any any;
-+ any <<= sal_False;
-+ xPropSet->setPropertyValue( aPropName, any );
-+ uno::Reference< uno::XInterface > aSelection = ScUnoHelpFunctions::AnyToInterface(
-+ xSelSupp->getSelection() );
-+ xPropSet->setPropertyValue( aPropName, aOldVal );
-+
-+ if (!aSelection.is())
-+ {
-+ throw uno::RuntimeException(
-+ rtl::OUString::createFromAscii("failed to obtain current selection"),
-+ uno::Reference< uno::XInterface >() );
-+ }
-+
-+ uno::Reference< lang::XServiceInfo > xServiceInfo( aSelection, uno::UNO_QUERY_THROW );
-+ rtl::OUString sImplementationName = xServiceInfo->getImplementationName();
-+
-+ if( sImplementationName.equalsIgnoreAsciiCaseAscii("com.sun.star.drawing.SvxShapeCollection") )
- {
-- uno::Reference< drawing::XShapes > xShapes( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
-+ uno::Reference< drawing::XShapes > xShapes( aSelection, uno::UNO_QUERY_THROW );
- uno::Reference< container::XIndexAccess > xIndexAccess( xShapes, uno::UNO_QUERY_THROW );
- uno::Reference< drawing::XShape > xShape( xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW );
-- // if ScVbaShape::getType( xShape ) == office::MsoShapeType::msoAutoShape
-- // and the uno object implements the com.sun.star.drawing.Text service
-- // return a textboxshape object
-- if ( ScVbaShape::getType( xShape ) == office::MsoShapeType::msoAutoShape )
-- {
-- uno::Reference< lang::XServiceInfo > xShapeServiceInfo( xShape, uno::UNO_QUERY_THROW );
-- if ( xShapeServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.Text" ) ) ) )
-- {
-- return uno::makeAny( uno::Reference< msforms::XTextBoxShape >(new ScVbaTextBoxShape( mxContext, xShape, xShapes, getCurrentDocument() ) ) );
-- }
-- }
-+ // if ScVbaShape::getType( xShape ) == office::MsoShapeType::msoAutoShape
-+ // and the uno object implements the com.sun.star.drawing.Text service
-+ // return a textboxshape object
-+ if ( ScVbaShape::getType( xShape ) == office::MsoShapeType::msoAutoShape )
-+ {
-+ uno::Reference< lang::XServiceInfo > xShapeServiceInfo( xShape, uno::UNO_QUERY_THROW );
-+ if ( xShapeServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.Text" ) ) ) )
-+ {
-+ return uno::makeAny( uno::Reference< msforms::XTextBoxShape >(new ScVbaTextBoxShape( mxContext, xShape, xShapes, getCurrentDocument() ) ) );
-+ }
-+ }
- return uno::makeAny( uno::Reference< msforms::XShape >(new ScVbaShape( this, mxContext, xShape, xShapes, ScVbaShape::getType( xShape ) ) ) );
- }
- else if( xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRange")) ||
- xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRanges")))
- {
-- uno::Reference< table::XCellRange > xRange( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
-+ uno::Reference< table::XCellRange > xRange( aSelection, ::uno::UNO_QUERY);
- if ( !xRange.is() )
- {
-- uno::Reference< sheet::XSheetCellRangeContainer > xRanges( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
-+ uno::Reference< sheet::XSheetCellRangeContainer > xRanges( aSelection, ::uno::UNO_QUERY);
- if ( xRanges.is() )
- return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( this, mxContext, xRanges ) ) );
-
-@@ -186,7 +212,7 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
- }
- else
- {
-- throw uno::RuntimeException( sImpementaionName + rtl::OUString::createFromAscii(" donot be surpported"), uno::Reference< uno::XInterface >() );
-+ throw uno::RuntimeException( sImplementationName + rtl::OUString::createFromAscii(" not surpported"), uno::Reference< uno::XInterface >() );
- }
- }
-
+
+ #include "convuno.hxx"
+ #include "cellsuno.hxx"
++#include "miscuno.hxx"
++#include "unonames.hxx"
+ #include "docsh.hxx"
+
+ using namespace ::ooo::vba;
+ using namespace ::com::sun::star;
++using ::com::sun::star::uno::Reference;
++using ::com::sun::star::uno::UNO_QUERY_THROW;
++using ::com::sun::star::uno::UNO_QUERY;
++using ::rtl::OUString;
+
+ // Enable our own join detection for Intersection and Union
+ // should be more efficient than using ScRangeList::Join ( because
+@@ -155,11 +161,31 @@ uno::Any SAL_CALL
+ ScVbaApplication::getSelection() throw (uno::RuntimeException)
+ {
+ OSL_TRACE("** ScVbaApplication::getSelection() ** ");
+- uno::Reference< lang::XServiceInfo > xServiceInfo( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
+- rtl::OUString sImpementaionName = xServiceInfo->getImplementationName();
+- if( sImpementaionName.equalsIgnoreAsciiCaseAscii("com.sun.star.drawing.SvxShapeCollection") )
++
++ Reference< view::XSelectionSupplier > xSelSupp( getCurrentDocument()->getCurrentController(), UNO_QUERY_THROW );
++ Reference< beans::XPropertySet > xPropSet( xSelSupp, UNO_QUERY_THROW );
++ OUString aPropName = OUString::createFromAscii( SC_UNO_FILTERED_RANGE_SELECTION );
++ uno::Any aOldVal = xPropSet->getPropertyValue( aPropName );
++ uno::Any any;
++ any <<= sal_False;
++ xPropSet->setPropertyValue( aPropName, any );
++ uno::Reference< uno::XInterface > aSelection = ScUnoHelpFunctions::AnyToInterface(
++ xSelSupp->getSelection() );
++ xPropSet->setPropertyValue( aPropName, aOldVal );
++
++ if (!aSelection.is())
++ {
++ throw uno::RuntimeException(
++ rtl::OUString::createFromAscii("failed to obtain current selection"),
++ uno::Reference< uno::XInterface >() );
++ }
++
++ uno::Reference< lang::XServiceInfo > xServiceInfo( aSelection, uno::UNO_QUERY_THROW );
++ rtl::OUString sImplementationName = xServiceInfo->getImplementationName();
++
++ if( sImplementationName.equalsIgnoreAsciiCaseAscii("com.sun.star.drawing.SvxShapeCollection") )
+ {
+- uno::Reference< drawing::XShapes > xShapes( getCurrentDocument()->getCurrentSelection(), uno::UNO_QUERY_THROW );
++ uno::Reference< drawing::XShapes > xShapes( aSelection, uno::UNO_QUERY_THROW );
+ uno::Reference< container::XIndexAccess > xIndexAccess( xShapes, uno::UNO_QUERY_THROW );
+ uno::Reference< drawing::XShape > xShape( xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW );
+ // if ScVbaShape::getType( xShape ) == office::MsoShapeType::msoAutoShape
+@@ -170,7 +196,7 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
+ uno::Reference< lang::XServiceInfo > xShapeServiceInfo( xShape, uno::UNO_QUERY_THROW );
+ if ( xShapeServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.Text" ) ) ) )
+ {
+- return uno::makeAny( uno::Reference< msforms::XTextBoxShape >(new ScVbaTextBoxShape( mxContext, xShape, xShapes, getCurrentDocument() ) ) );
++ return uno::makeAny( uno::Reference< msforms::XTextBoxShape >(new ScVbaTextBoxShape( mxContext, xShape, xShapes, getCurrentDocument() ) ) );
+ }
+ }
+ return uno::makeAny( uno::Reference< msforms::XShape >(new ScVbaShape( this, mxContext, xShape, xShapes, ScVbaShape::getType( xShape ) ) ) );
+@@ -178,10 +204,10 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
+ else if( xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRange")) ||
+ xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRanges")))
+ {
+- uno::Reference< table::XCellRange > xRange( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
++ uno::Reference< table::XCellRange > xRange( aSelection, ::uno::UNO_QUERY);
+ if ( !xRange.is() )
+ {
+- uno::Reference< sheet::XSheetCellRangeContainer > xRanges( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
++ uno::Reference< sheet::XSheetCellRangeContainer > xRanges( aSelection, ::uno::UNO_QUERY);
+ if ( xRanges.is() )
+ return uno::makeAny( uno::Reference< excel::XRange >( new ScVbaRange( this, mxContext, xRanges ) ) );
+
+@@ -190,7 +216,7 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
+ }
+ else
+ {
+- throw uno::RuntimeException( sImpementaionName + rtl::OUString::createFromAscii(" donot be surpported"), uno::Reference< uno::XInterface >() );
++ throw uno::RuntimeException( sImplementationName + rtl::OUString::createFromAscii(" not surpported"), uno::Reference< uno::XInterface >() );
+ }
+ }
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]