summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2012-08-24 20:46:27 +0100
committerNoel Power <noel.power@suse.com>2012-08-26 09:49:24 +0100
commit44dc8746f3d521b73123522f345d0f676622c2b3 (patch)
treed15b49ee6e23701fe0f1bbfc1c624ae0988aedf8
parent6573690587f63f6402e24e2db2e986570a2490f0 (diff)
remove VBA_OOBUILD_HACK and friends
Change-Id: I5c21a407bcae1b668976b94a757d564120973b1a
-rw-r--r--sc/Library_vbaobj.mk4
-rw-r--r--sc/source/ui/vba/vbarange.cxx12
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx4
-rw-r--r--svtools/Library_svt.mk1
-rw-r--r--svtools/Package_inc.mk1
-rw-r--r--svtools/inc/svtools/bindablecontrolhelper.hxx (renamed from svtools/inc/bindablecontrolhelper.hxx)0
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx18
7 files changed, 2 insertions, 38 deletions
diff --git a/sc/Library_vbaobj.mk b/sc/Library_vbaobj.mk
index 14eec798c719..e8a667a7bb39 100644
--- a/sc/Library_vbaobj.mk
+++ b/sc/Library_vbaobj.mk
@@ -32,10 +32,6 @@ $(eval $(call gb_Library_set_include,vbaobj,\
$(eval $(call gb_Library_set_componentfile,vbaobj,sc/util/vbaobj))
-$(eval $(call gb_Library_add_defs,vbaobj,\
- -DVBA_OOBUILD_HACK \
-))
-
$(eval $(call gb_Library_use_api,vbaobj,\
offapi \
oovbaapi \
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 7caa0e84a919..34578e3c6f6f 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -2954,11 +2954,7 @@ getPasteFlags (sal_Int32 Paste)
nFlags = IDF_FORMULA;break;
case excel::XlPasteType::xlPasteFormulasAndNumberFormats :
case excel::XlPasteType::xlPasteValues:
-#ifdef VBA_OOBUILD_HACK
nFlags = ( IDF_VALUE | IDF_DATETIME | IDF_STRING | IDF_SPECIAL_BOOLEAN ); break;
-#else
- nFlags = ( IDF_VALUE | IDF_DATETIME | IDF_STRING ); break;
-#endif
case excel::XlPasteType::xlPasteValuesAndNumberFormats:
nFlags = IDF_VALUE | IDF_ATTRIB; break;
case excel::XlPasteType::xlPasteColumnWidths:
@@ -3566,17 +3562,13 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
if ( nOrientation == excel::XlSortOrientation::xlSortRows )
bIsSortColumns = sal_True;
sal_Int16 nHeader = 0;
-#ifdef VBA_OOBUILD_HACK
nHeader = aSortParam.nCompatHeader;
-#endif
sal_Bool bContainsHeader = false;
if ( Header.hasValue() )
{
nHeader = ::comphelper::getINT16( Header );
-#ifdef VBA_OOBUILD_HACK
aSortParam.nCompatHeader = nHeader;
-#endif
}
if ( nHeader == excel::XlYesNoGuess::xlGuess )
@@ -3587,9 +3579,7 @@ ScVbaRange::Sort( const uno::Any& Key1, const uno::Any& Order1, const uno::Any&
nHeader = excel::XlYesNoGuess::xlYes;
else
nHeader = excel::XlYesNoGuess::xlNo;
-#ifdef VBA_OOBUILD_HACK
aSortParam.nCompatHeader = nHeader;
-#endif
}
if ( nHeader == excel::XlYesNoGuess::xlYes )
@@ -5574,12 +5564,10 @@ ScVbaRange::AutoFill( const uno::Reference< excel::XRange >& Destination, const
break;
}
}
-#ifdef VBA_OOBUILD_HACK
double fEndValue = MAXDOUBLE;
ScDocShell* pDocSh = excel::GetDocShellFromRange( mxRange );
pDocSh->GetDocFunc().FillAuto( aSourceRange, NULL, eDir, eCmd, eDateCmd,
nCount, fStep, fEndValue, sal_True, sal_True );
-#endif
}
sal_Bool SAL_CALL
ScVbaRange::GoalSeek( const uno::Any& Goal, const uno::Reference< excel::XRange >& ChangingCell ) throw (uno::RuntimeException)
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index d7fac723ccfa..a2e738475743 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -960,7 +960,6 @@ ScVbaWorksheet::Spinners( const uno::Any& /*rIndex*/ ) throw (uno::RuntimeExcept
void SAL_CALL
ScVbaWorksheet::ShowDataForm( ) throw (uno::RuntimeException)
{
-#ifdef VBA_OOBUILD_HACK
uno::Reference< frame::XModel > xModel( getModel(), uno::UNO_QUERY_THROW );
ScTabViewShell* pTabViewShell = excel::getBestViewShell( xModel );
@@ -971,9 +970,6 @@ ScVbaWorksheet::ShowDataForm( ) throw (uno::RuntimeException)
OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->Execute();
-#else
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
-#endif
}
uno::Any SAL_CALL
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index 080704c80bdc..77c3031007c0 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -183,6 +183,7 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
svtools/source/java/javacontext \
svtools/source/java/javainteractionhandler \
svtools/source/misc/acceleratorexecute \
+ svtools/source/misc/bindablecontrolhelper \
svtools/source/misc/chartprettypainter \
svtools/source/misc/cliplistener \
svtools/source/misc/dialogclosedlistener \
diff --git a/svtools/Package_inc.mk b/svtools/Package_inc.mk
index a970653dabd0..76480858b0f6 100644
--- a/svtools/Package_inc.mk
+++ b/svtools/Package_inc.mk
@@ -39,6 +39,7 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibletableprovide
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/addresstemplate.hxx,svtools/addresstemplate.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/apearcfg.hxx,svtools/apearcfg.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/asynclink.hxx,svtools/asynclink.hxx))
+$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/bindablecontrolhelper.hxx,svtools/bindablecontrolhelper.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/borderhelper.hxx,svtools/borderhelper.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/brwbox.hxx,svtools/brwbox.hxx))
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/brwhead.hxx,svtools/brwhead.hxx))
diff --git a/svtools/inc/bindablecontrolhelper.hxx b/svtools/inc/svtools/bindablecontrolhelper.hxx
index e53af10eaa68..e53af10eaa68 100644
--- a/svtools/inc/bindablecontrolhelper.hxx
+++ b/svtools/inc/svtools/bindablecontrolhelper.hxx
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index b0425993d77d..6b1b5bba68c9 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -36,9 +36,7 @@
#include <com/sun/star/form/XChangeListener.hpp>
#include <ooo/vba/XControlProvider.hpp>
#include <ooo/vba/msforms/fmMousePointer.hpp>
-#ifdef VBA_OOBUILD_HACK
#include <svtools/bindablecontrolhelper.hxx>
-#endif
#include "vbacontrol.hxx"
#include "vbacombobox.hxx"
#include "vbabutton.hxx"
@@ -281,7 +279,6 @@ ScVbaControl::getControlSource() throw (uno::RuntimeException)
// #FIXME I *hate* having these upstream differences
// but this is necessary until I manage to upstream other
// dependant parts
-#ifdef VBA_OOBUILD_HACK
rtl::OUString sControlSource;
uno::Reference< form::binding::XBindableValue > xBindable( m_xProps, uno::UNO_QUERY );
if ( xBindable.is() )
@@ -301,26 +298,18 @@ ScVbaControl::getControlSource() throw (uno::RuntimeException)
}
}
return sControlSource;
-#else
- throw uno::RuntimeException( rtl::OUString( "getControlSource not supported" ), uno::Reference< uno::XInterface >()); // not supported
-#endif
}
void SAL_CALL
ScVbaControl::setControlSource( const rtl::OUString& _controlsource ) throw (uno::RuntimeException)
{
-#ifdef VBA_OOBUILD_HACK
rtl::OUString sEmpty;
svt::BindableControlHelper::ApplyListSourceAndBindableData( m_xModel, m_xProps, _controlsource, sEmpty );
-#else
- throw uno::RuntimeException( rtl::OUString( "setControlSource not supported " ).concat( _controlsource ), uno::Reference< uno::XInterface >()); // not supported
-#endif
}
rtl::OUString SAL_CALL
ScVbaControl::getRowSource() throw (uno::RuntimeException)
{
-#ifdef VBA_OOBUILD_HACK
rtl::OUString sRowSource;
uno::Reference< form::binding::XListEntrySink > xListSink( m_xProps, uno::UNO_QUERY );
if ( xListSink.is() )
@@ -341,20 +330,13 @@ ScVbaControl::getRowSource() throw (uno::RuntimeException)
}
}
return sRowSource;
-#else
- throw uno::RuntimeException( rtl::OUString( "getRowSource not supported" ), uno::Reference< uno::XInterface >()); // not supported
-#endif
}
void SAL_CALL
ScVbaControl::setRowSource( const rtl::OUString& _rowsource ) throw (uno::RuntimeException)
{
-#ifdef VBA_OOBUILD_HACK
rtl::OUString sEmpty;
svt::BindableControlHelper::ApplyListSourceAndBindableData( m_xModel, m_xProps, sEmpty, _rowsource );
-#else
- throw uno::RuntimeException( rtl::OUString( "setRowSource not supported " ).concat( _rowsource ), uno::Reference< uno::XInterface >()); // not supported
-#endif
}
rtl::OUString SAL_CALL