[Libreoffice-commits] .: 3 commits - sc/Library_vbaobj.mk sc/source svtools/inc svtools/Library_svt.mk svtools/Package_inc.mk vbahelper/inc vbahelper/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Aug 26 01:50:36 PDT 2012
sc/Library_vbaobj.mk | 4 -
sc/source/ui/vba/vbarange.cxx | 12 ---
sc/source/ui/vba/vbaworksheet.cxx | 4 -
svtools/Library_svt.mk | 1
svtools/Package_inc.mk | 1
svtools/inc/bindablecontrolhelper.hxx | 61 --------------------
svtools/inc/svtools/bindablecontrolhelper.hxx | 61 ++++++++++++++++++++
vbahelper/inc/vbahelper/vbahelper.hxx | 24 -------
vbahelper/source/msforms/vbabutton.cxx | 4 +
vbahelper/source/msforms/vbacontrol.cxx | 18 -----
vbahelper/source/msforms/vbaframe.cxx | 4 +
vbahelper/source/msforms/vbalabel.cxx | 4 -
vbahelper/source/msforms/vbapages.cxx | 1
vbahelper/source/msforms/vbatextbox.cxx | 2
vbahelper/source/msforms/vbatogglebutton.cxx | 6 +
vbahelper/source/msforms/vbauserform.cxx | 1
vbahelper/source/vbahelper/vbacommandbar.cxx | 3
vbahelper/source/vbahelper/vbacommandbarcontrol.cxx | 1
vbahelper/source/vbahelper/vbadialogbase.cxx | 21 ------
vbahelper/source/vbahelper/vbadialogsbase.cxx | 3
vbahelper/source/vbahelper/vbahelper.cxx | 37 ------------
vbahelper/source/vbahelper/vbalineformat.cxx | 17 +++++
vbahelper/source/vbahelper/vbapictureformat.cxx | 1
vbahelper/source/vbahelper/vbashape.cxx | 19 +-----
24 files changed, 117 insertions(+), 193 deletions(-)
New commits:
commit 44dc8746f3d521b73123522f345d0f676622c2b3
Author: Noel Power <noel.power at suse.com>
Date: Fri Aug 24 20:46:27 2012 +0100
remove VBA_OOBUILD_HACK and friends
Change-Id: I5c21a407bcae1b668976b94a757d564120973b1a
diff --git a/sc/Library_vbaobj.mk b/sc/Library_vbaobj.mk
index 14eec79..e8a667a 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 7caa0e8..34578e3 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 d7fac72..a2e7384 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 080704c..77c3031 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 a970653..7648085 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/bindablecontrolhelper.hxx
deleted file mode 100644
index e53af10..0000000
--- a/svtools/inc/bindablecontrolhelper.hxx
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef SVTOOLS_INC_BINDABLECONTROL_HXX
-#define SVTOOLS_INC_BINDABLECONTROL_HXX
-
-#include "svtools/svtdllapi.h"
-
-#include <com/sun/star/frame/XModel.hpp>
-//........................................................................
-namespace svt
-{
-//........................................................................
-
- //====================================================================
- //= GraphicAccess
- //====================================================================
- /** helper class for obtaining streams (which also can be used with the ImageProducer)
- from a resource
- */
- class BindableControlHelper
- {
- private:
- BindableControlHelper(); // never implemented
-
- public:
- SVT_DLLPUBLIC static void ApplyListSourceAndBindableData( const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& xModel, const com::sun::star::uno::Reference< com::sun::star::uno::XInterface >& rObj, const rtl::OUString& rsCtrlSource, const rtl::OUString& rsRowSource );
- };
-
-//........................................................................
-} // namespace svt
-//........................................................................
-
-#endif // SVTOOLS_INC_BINDABLECONTROL_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/inc/svtools/bindablecontrolhelper.hxx b/svtools/inc/svtools/bindablecontrolhelper.hxx
new file mode 100644
index 0000000..e53af10
--- /dev/null
+++ b/svtools/inc/svtools/bindablecontrolhelper.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SVTOOLS_INC_BINDABLECONTROL_HXX
+#define SVTOOLS_INC_BINDABLECONTROL_HXX
+
+#include "svtools/svtdllapi.h"
+
+#include <com/sun/star/frame/XModel.hpp>
+//........................................................................
+namespace svt
+{
+//........................................................................
+
+ //====================================================================
+ //= GraphicAccess
+ //====================================================================
+ /** helper class for obtaining streams (which also can be used with the ImageProducer)
+ from a resource
+ */
+ class BindableControlHelper
+ {
+ private:
+ BindableControlHelper(); // never implemented
+
+ public:
+ SVT_DLLPUBLIC static void ApplyListSourceAndBindableData( const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& xModel, const com::sun::star::uno::Reference< com::sun::star::uno::XInterface >& rObj, const rtl::OUString& rsCtrlSource, const rtl::OUString& rsRowSource );
+ };
+
+//........................................................................
+} // namespace svt
+//........................................................................
+
+#endif // SVTOOLS_INC_BINDABLECONTROL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index b042599..6b1b5bb 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
commit 6573690587f63f6402e24e2db2e986570a2490f0
Author: Noel Power <noel.power at suse.com>
Date: Fri Aug 24 15:48:44 2012 +0100
mark methods as stub where appropriate
Hopefully this will allow us to track methods we don't or can't implement ( although we let them actually exectute )
Change-Id: I53c74054ffea6cfa8e45aa4583f51c03f33991ee
diff --git a/vbahelper/source/msforms/vbabutton.cxx b/vbahelper/source/msforms/vbabutton.cxx
index 22f6986..eb028e7 100644
--- a/vbahelper/source/msforms/vbabutton.cxx
+++ b/vbahelper/source/msforms/vbabutton.cxx
@@ -71,15 +71,18 @@ sal_Bool SAL_CALL ScVbaButton::getCancel() throw (uno::RuntimeException)
void SAL_CALL ScVbaButton::setCancel( sal_Bool /*bCancel*/ ) throw (uno::RuntimeException)
{
+ // #STUB
}
sal_Bool SAL_CALL ScVbaButton::getDefault() throw (uno::RuntimeException)
{
+ // #STUB
return sal_False;
}
void SAL_CALL ScVbaButton::setDefault( sal_Bool /*bDefault*/ ) throw (uno::RuntimeException)
{
+ // #STUB
}
sal_Int32 SAL_CALL ScVbaButton::getBackColor() throw (uno::RuntimeException)
@@ -99,6 +102,7 @@ sal_Int32 SAL_CALL ScVbaButton::getForeColor() throw (uno::RuntimeException)
void SAL_CALL ScVbaButton::setForeColor( sal_Int32 /*nForeColor*/ ) throw (uno::RuntimeException)
{
+ // #STUB
}
uno::Reference< msforms::XNewFont > SAL_CALL ScVbaButton::getFont() throw (uno::RuntimeException)
diff --git a/vbahelper/source/msforms/vbaframe.cxx b/vbahelper/source/msforms/vbaframe.cxx
index 82b763d..ee39e99 100644
--- a/vbahelper/source/msforms/vbaframe.cxx
+++ b/vbahelper/source/msforms/vbaframe.cxx
@@ -62,17 +62,20 @@ sal_Int32 SAL_CALL ScVbaFrame::getSpecialEffect() throw (uno::RuntimeException)
::sal_Int32 SAL_CALL ScVbaFrame::getForeColor() throw (::com::sun::star::uno::RuntimeException)
{
+ // #STUB
return 0;
}
void SAL_CALL ScVbaFrame::setForeColor( ::sal_Int32 /*_forecolor*/ ) throw (::com::sun::star::uno::RuntimeException)
{
+ // #STUB
return;
}
void SAL_CALL ScVbaFrame::setSpecialEffect( sal_Int32 /*nSpecialEffect*/ ) throw (uno::RuntimeException)
{
+ // #STUB
}
sal_Int32 SAL_CALL ScVbaFrame::getBorderStyle() throw (uno::RuntimeException)
@@ -82,6 +85,7 @@ sal_Int32 SAL_CALL ScVbaFrame::getBorderStyle() throw (uno::RuntimeException)
void SAL_CALL ScVbaFrame::setBorderStyle( sal_Int32 /*nBorderStyle*/ ) throw (uno::RuntimeException)
{
+ // #STUB
}
uno::Reference< msforms::XNewFont > SAL_CALL ScVbaFrame::getFont() throw (uno::RuntimeException)
diff --git a/vbahelper/source/msforms/vbalabel.cxx b/vbahelper/source/msforms/vbalabel.cxx
index d7a0d5e..4c9a723 100644
--- a/vbahelper/source/msforms/vbalabel.cxx
+++ b/vbahelper/source/msforms/vbalabel.cxx
@@ -60,14 +60,14 @@ ScVbaLabel::setValue( const uno::Any& _value ) throw (::com::sun::star::uno::Run
rtl::OUString SAL_CALL
ScVbaLabel::getAccelerator() throw (css::uno::RuntimeException)
{
- //FIXME: seems not support?
+ // #STUB
return rtl::OUString();
}
void SAL_CALL
ScVbaLabel::setAccelerator( const rtl::OUString& /*_accelerator*/ ) throw (::com::sun::star::uno::RuntimeException)
{
- //FIXME: seems not support?
+ // #STUB
}
uno::Reference< msforms::XNewFont > SAL_CALL ScVbaLabel::getFont() throw (uno::RuntimeException)
diff --git a/vbahelper/source/msforms/vbapages.cxx b/vbahelper/source/msforms/vbapages.cxx
index df43847..ba1ef2b 100644
--- a/vbahelper/source/msforms/vbapages.cxx
+++ b/vbahelper/source/msforms/vbapages.cxx
@@ -47,6 +47,7 @@ ScVbaPages::getServiceImplName()
uno::Reference< container::XEnumeration > SAL_CALL
ScVbaPages::createEnumeration() throw (uno::RuntimeException)
{
+ // #STUB
return uno::Reference< container::XEnumeration >();
}
diff --git a/vbahelper/source/msforms/vbatextbox.cxx b/vbahelper/source/msforms/vbatextbox.cxx
index 0703693..45edf35 100644
--- a/vbahelper/source/msforms/vbatextbox.cxx
+++ b/vbahelper/source/msforms/vbatextbox.cxx
@@ -122,6 +122,7 @@ sal_Int32 SAL_CALL ScVbaTextBox::getSpecialEffect() throw (uno::RuntimeException
void SAL_CALL ScVbaTextBox::setSpecialEffect( sal_Int32 /*nSpecialEffect*/ ) throw (uno::RuntimeException)
{
+ // #STUB
}
sal_Int32 SAL_CALL ScVbaTextBox::getBorderStyle() throw (uno::RuntimeException)
@@ -131,6 +132,7 @@ sal_Int32 SAL_CALL ScVbaTextBox::getBorderStyle() throw (uno::RuntimeException)
void SAL_CALL ScVbaTextBox::setBorderStyle( sal_Int32 /*nBorderStyle*/ ) throw (uno::RuntimeException)
{
+ // #STUB
}
sal_Int32 SAL_CALL ScVbaTextBox::getTextLength() throw (uno::RuntimeException)
diff --git a/vbahelper/source/msforms/vbatogglebutton.cxx b/vbahelper/source/msforms/vbatogglebutton.cxx
index 7d6ded2..f80aa40 100644
--- a/vbahelper/source/msforms/vbatogglebutton.cxx
+++ b/vbahelper/source/msforms/vbatogglebutton.cxx
@@ -100,20 +100,24 @@ void SAL_CALL ScVbaToggleButton::setAutoSize( sal_Bool bAutoSize ) throw (uno::R
sal_Bool SAL_CALL ScVbaToggleButton::getCancel() throw (uno::RuntimeException)
{
+ // #STUB
return sal_False;
}
void SAL_CALL ScVbaToggleButton::setCancel( sal_Bool /*bCancel*/ ) throw (uno::RuntimeException)
{
+ // #STUB
}
sal_Bool SAL_CALL ScVbaToggleButton::getDefault() throw (uno::RuntimeException)
{
+ // #STUB
return sal_False;
}
void SAL_CALL ScVbaToggleButton::setDefault( sal_Bool /*bDefault*/ ) throw (uno::RuntimeException)
{
+ // #STUB
}
sal_Int32 SAL_CALL ScVbaToggleButton::getBackColor() throw (uno::RuntimeException)
@@ -128,11 +132,13 @@ void SAL_CALL ScVbaToggleButton::setBackColor( sal_Int32 nBackColor ) throw (uno
sal_Int32 SAL_CALL ScVbaToggleButton::getForeColor() throw (uno::RuntimeException)
{
+ // #STUB
return 0;
}
void SAL_CALL ScVbaToggleButton::setForeColor( sal_Int32 /*nForeColor*/ ) throw (uno::RuntimeException)
{
+ // #STUB
}
uno::Reference< msforms::XNewFont > SAL_CALL ScVbaToggleButton::getFont() throw (uno::RuntimeException)
diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx
index e2c4dc6..b8775ea 100644
--- a/vbahelper/source/msforms/vbauserform.cxx
+++ b/vbahelper/source/msforms/vbauserform.cxx
@@ -158,6 +158,7 @@ void SAL_CALL ScVbaUserForm::setVisible( sal_Bool bVisible ) throw (uno::Runtime
void SAL_CALL
ScVbaUserForm::RePaint( ) throw (uno::RuntimeException)
{
+ // #STUB
// do nothing
}
diff --git a/vbahelper/source/vbahelper/vbacommandbar.cxx b/vbahelper/source/vbahelper/vbacommandbar.cxx
index bafeba9..7a641eb 100644
--- a/vbahelper/source/vbahelper/vbacommandbar.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbar.cxx
@@ -211,11 +211,13 @@ void SAL_CALL VbaDummyCommandBar::setName( const ::rtl::OUString& _name ) throw
::sal_Bool SAL_CALL VbaDummyCommandBar::getVisible() throw (uno::RuntimeException)
{
+ // #STUB
return sal_True;
}
void SAL_CALL VbaDummyCommandBar::setVisible( ::sal_Bool /*_visible*/ ) throw (uno::RuntimeException)
{
+ // #STUB
}
::sal_Bool SAL_CALL VbaDummyCommandBar::getEnabled() throw (uno::RuntimeException)
@@ -233,6 +235,7 @@ void SAL_CALL VbaDummyCommandBar::setEnabled( sal_Bool _enabled ) throw (uno::Ru
void SAL_CALL VbaDummyCommandBar::Delete( ) throw (script::BasicErrorException, uno::RuntimeException)
{
// no-op
+ // #STUB
}
uno::Any SAL_CALL VbaDummyCommandBar::Controls( const uno::Any& aIndex ) throw (script::BasicErrorException, uno::RuntimeException)
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
index 228fba6..2c7c50d 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
@@ -133,6 +133,7 @@ ScVbaCommandBarControl::setEnabled( sal_Bool _enabled ) throw (uno::RuntimeExcep
ScVbaCommandBarControl::getBeginGroup() throw (css::uno::RuntimeException)
{
// TODO: need to check if the item before this item is of type 'separator'
+ //#STUB
return sal_False;
}
diff --git a/vbahelper/source/vbahelper/vbadialogsbase.cxx b/vbahelper/source/vbahelper/vbadialogsbase.cxx
index e26751c..f96672b 100644
--- a/vbahelper/source/vbahelper/vbadialogsbase.cxx
+++ b/vbahelper/source/vbahelper/vbadialogsbase.cxx
@@ -24,13 +24,14 @@ using namespace ::com::sun::star;
::sal_Int32
VbaDialogsBase::getCount() throw (uno::RuntimeException)
{
- //#TODO #FIXEME
+ //#STUB
return 0;
}
uno::Any
VbaDialogsBase::Item( const uno::Any& /* &aItem */) throw (uno::RuntimeException)
{
+ //#STUB
return uno::Any();
}
diff --git a/vbahelper/source/vbahelper/vbalineformat.cxx b/vbahelper/source/vbahelper/vbalineformat.cxx
index 4a84e38..e87edb9 100644
--- a/vbahelper/source/vbahelper/vbalineformat.cxx
+++ b/vbahelper/source/vbahelper/vbalineformat.cxx
@@ -126,59 +126,74 @@ ScVbaLineFormat::setBeginArrowheadStyle( sal_Int32 _beginarrowheadstyle ) throw
sal_Int32 SAL_CALL
ScVbaLineFormat::getBeginArrowheadLength() throw (uno::RuntimeException)
{
+ // #STUB
+ // force error
throw uno::RuntimeException( rtl::OUString("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
}
void SAL_CALL
ScVbaLineFormat::setBeginArrowheadLength( sal_Int32 /*_beginarrowheadlength*/ ) throw (uno::RuntimeException)
{
+ // #STUB
+ // force error
throw uno::RuntimeException( rtl::OUString("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
}
sal_Int32 SAL_CALL
ScVbaLineFormat::getBeginArrowheadWidth() throw (uno::RuntimeException)
{
+ // #STUB
+ // force error
throw uno::RuntimeException( rtl::OUString("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
}
void SAL_CALL
ScVbaLineFormat::setBeginArrowheadWidth( sal_Int32 /*_beginarrowheadwidth*/ ) throw (uno::RuntimeException)
{
+ // #STUB
+ // force error
throw uno::RuntimeException( rtl::OUString("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
}
sal_Int32 SAL_CALL
ScVbaLineFormat::getEndArrowheadStylel() throw (uno::RuntimeException)
{
+ // #STUB
return 0;
}
void SAL_CALL
ScVbaLineFormat::setEndArrowheadStylel( sal_Int32 /*_endarrowheadstylel*/ ) throw (uno::RuntimeException)
{
+ // #STUB
}
sal_Int32 SAL_CALL
ScVbaLineFormat::getEndArrowheadLength() throw (uno::RuntimeException)
{
+ // #STUB
+ // force error
throw uno::RuntimeException( rtl::OUString("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
}
void SAL_CALL
ScVbaLineFormat::setEndArrowheadLength( sal_Int32 /*_endarrowheadlength*/ ) throw (uno::RuntimeException)
{
+ // #STUB
throw uno::RuntimeException( rtl::OUString("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
}
sal_Int32 SAL_CALL
ScVbaLineFormat::getEndArrowheadWidth() throw (uno::RuntimeException)
{
+ // #STUB
throw uno::RuntimeException( rtl::OUString("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
}
void SAL_CALL
ScVbaLineFormat::setEndArrowheadWidth( sal_Int32 /*_endarrowheadwidth*/ ) throw (uno::RuntimeException)
{
+ // #STUB
throw uno::RuntimeException( rtl::OUString("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
}
@@ -269,6 +284,8 @@ ScVbaLineFormat::setStyle( sal_Int16 /*_style */) throw (uno::RuntimeException)
//Therefore we do not set the LineStyle, because it maybe is already set
//to Dashed or Single Line. Setting the 'Visible' or 'DashStyle' properties
//will be done with the according methods.
+
+ // #STUB
}
sal_Int32 SAL_CALL
diff --git a/vbahelper/source/vbahelper/vbapictureformat.cxx b/vbahelper/source/vbahelper/vbapictureformat.cxx
index 1ba62da..2ffdff1 100644
--- a/vbahelper/source/vbahelper/vbapictureformat.cxx
+++ b/vbahelper/source/vbahelper/vbapictureformat.cxx
@@ -104,7 +104,6 @@ ScVbaPictureFormat::IncrementContrast( double increment ) throw (uno::RuntimeExc
{
double nContrast = getContrast();
nContrast += increment;
- //VBA, minz at cn.ibm.com.
if( nContrast < 0 )
{
nContrast = 0.0;
diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx
index 33846d3..679290b 100644
--- a/vbahelper/source/vbahelper/vbashape.cxx
+++ b/vbahelper/source/vbahelper/vbashape.cxx
@@ -56,15 +56,6 @@ ScVbaShape::ScVbaShape( const uno::Reference< XHelperInterface >& xParent, const
ScVbaShape::~ScVbaShape()
{
- // dtor must never ever throw
- /*try
- {
- removeShapeListener();
- removeShapesListener();
- }
- catch( uno::Exception& )
- {
- }*/
}
void SAL_CALL
@@ -268,6 +259,7 @@ ScVbaShape::setTop( double _top ) throw (uno::RuntimeException)
sal_Bool SAL_CALL
ScVbaShape::getVisible() throw (uno::RuntimeException)
{
+ // #STUB
//UNO Shapes are always visible
return sal_True;
}
@@ -275,6 +267,7 @@ ScVbaShape::getVisible() throw (uno::RuntimeException)
void SAL_CALL
ScVbaShape::setVisible( sal_Bool /*_visible*/ ) throw (uno::RuntimeException)
{
+ // #STUB
//UNO Shapes are always visible
}
@@ -513,27 +506,27 @@ void SAL_CALL ScVbaShape::Copy() throw (uno::RuntimeException)
sal_Bool SAL_CALL
ScVbaShape::getLockAspectRatio() throw (uno::RuntimeException)
{
- // FIXME:
+ // #STUB
return sal_False;
}
void SAL_CALL
ScVbaShape::setLockAspectRatio( sal_Bool /*_lockaspectratio*/ ) throw (uno::RuntimeException)
{
- // FIXME:
+ // #STUB
}
sal_Bool SAL_CALL
ScVbaShape::getLockAnchor() throw (uno::RuntimeException)
{
- // FIXME:
+ // #STUB
return sal_True;
}
void SAL_CALL
ScVbaShape::setLockAnchor( sal_Bool /*_lockanchor*/ ) throw (uno::RuntimeException)
{
- // FIXME:
+ // #STUB
}
sal_Int32 SAL_CALL
commit dd91af40e384226e577f5a4b96b48e293cf31fa3
Author: Noel Power <noel.power at suse.com>
Date: Fri Aug 24 14:59:01 2012 +0100
clean up unnecessary non working implementations
Change-Id: I4cbc0fbf17aa80db4b19df630d6f18f97b9f6982
diff --git a/vbahelper/inc/vbahelper/vbahelper.hxx b/vbahelper/inc/vbahelper/vbahelper.hxx
index 42f7ea2..d1d15f5 100644
--- a/vbahelper/inc/vbahelper/vbahelper.hxx
+++ b/vbahelper/inc/vbahelper/vbahelper.hxx
@@ -27,10 +27,6 @@
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/awt/XControl.hpp>
#include <com/sun/star/awt/XDevice.hpp>
-#include <com/sun/star/frame/XDispatchResultListener.hpp>
-#include <com/sun/star/frame/DispatchResultEvent.hpp>
-#include <com/sun/star/frame/DispatchResultState.hpp>
-#include <com/sun/star/lang/EventObject.hpp>
#include <com/sun/star/awt/XUnitConversion.hpp>
#include <basic/basmgr.hxx>
#include <basic/sberrors.hxx>
@@ -77,7 +73,7 @@ namespace ooo
VBAHELPER_DLLPUBLIC css::uno::Reference< css::script::XTypeConverter > getTypeConverter( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException);
VBAHELPER_DLLPUBLIC void dispatchRequests( const css::uno::Reference< css::frame::XModel>& xModel, const rtl::OUString& aUrl );
- VBAHELPER_DLLPUBLIC void dispatchRequests (const css::uno::Reference< css::frame::XModel>& xModel, const rtl::OUString & aUrl, const css::uno::Sequence< css::beans::PropertyValue >& sProps, const css::uno::Reference< css::frame::XDispatchResultListener >& rListener = css::uno::Reference< css::frame::XDispatchResultListener >(), const sal_Bool bSilent = sal_True );
+ VBAHELPER_DLLPUBLIC void dispatchRequests (const css::uno::Reference< css::frame::XModel>& xModel, const rtl::OUString & aUrl, const css::uno::Sequence< css::beans::PropertyValue >& sProps );
VBAHELPER_DLLPUBLIC void dispatchExecute(SfxViewShell* pView, sal_uInt16 nSlot, SfxCallMode nCall = SFX_CALLMODE_SYNCHRON );
VBAHELPER_DLLPUBLIC sal_Int32 OORGBToXLRGB( sal_Int32 );
VBAHELPER_DLLPUBLIC sal_Int32 XLRGBToOORGB( sal_Int32 );
@@ -252,24 +248,6 @@ public:
static void exception( const css::uno::Exception& ex ) throw( css::script::BasicErrorException );
};
-class VBAHELPER_DLLPUBLIC VBADispatchListener : public cppu::WeakImplHelper1< css::frame::XDispatchResultListener >
-{
-private:
- css::uno::Any m_Result;
- sal_Bool m_State;
-
-public:
- VBADispatchListener();
- ~VBADispatchListener();
-
- css::uno::Any getResult() { return m_Result; }
- sal_Bool getState() { return m_State; }
-
- // XDispatchResultListener
- virtual void SAL_CALL dispatchFinished( const css::frame::DispatchResultEvent& aEvent ) throw ( css::uno::RuntimeException );
- virtual void SAL_CALL disposing( const css::lang::EventObject& aEvent ) throw ( css::uno::RuntimeException );
-};
-
} // vba
} // ooo
diff --git a/vbahelper/source/vbahelper/vbadialogbase.cxx b/vbahelper/source/vbahelper/vbadialogbase.cxx
index 3b5bfe0..48dcc03 100644
--- a/vbahelper/source/vbahelper/vbadialogbase.cxx
+++ b/vbahelper/source/vbahelper/vbadialogbase.cxx
@@ -25,7 +25,6 @@ using namespace ::com::sun::star;
sal_Bool SAL_CALL VbaDialogBase::Show() throw ( uno::RuntimeException )
{
rtl::OUString aURL;
- sal_Bool bSuccess = sal_False;
if ( m_xModel.is() )
{
aURL = mapIndexToName( mnIndex );
@@ -35,25 +34,9 @@ sal_Bool SAL_CALL VbaDialogBase::Show() throw ( uno::RuntimeException )
uno::Reference< XInterface > () );
uno::Sequence< beans::PropertyValue > dispatchProps(0);
- if ( aURL == ".uno:PrinterSetup" )
- {
- dispatchProps.realloc(1);
- dispatchProps[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VBADialogResultRequest" ) );
- dispatchProps[0].Value <<= (sal_Bool) sal_True;
- }
+ dispatchRequests( m_xModel, aURL, dispatchProps );
- VBADispatchListener *pNotificationListener = new VBADispatchListener();
- uno::Reference< frame::XDispatchResultListener > rListener = pNotificationListener;
- dispatchRequests( m_xModel, aURL, dispatchProps, rListener, sal_False );
-
- bSuccess = pNotificationListener->getState();
- uno::Any aResult = pNotificationListener->getResult();
- if ( bSuccess )
- {
- if ( aResult.getValueTypeClass() == uno::TypeClass_BOOLEAN )
- aResult >>= bSuccess;
- }
}
- return bSuccess;
+ return sal_True;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 68b8a9b..ff9681d 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -144,7 +144,7 @@ void dispatchExecute(SfxViewShell* pViewShell, sal_uInt16 nSlot, SfxCallMode nCa
}
void
-dispatchRequests (const uno::Reference< frame::XModel>& xModel, const rtl::OUString & aUrl, const uno::Sequence< beans::PropertyValue >& sProps, const uno::Reference< frame::XDispatchResultListener >& rListener, const sal_Bool bSilent )
+dispatchRequests (const uno::Reference< frame::XModel>& xModel, const rtl::OUString & aUrl, const uno::Sequence< beans::PropertyValue >& sProps )
{
util::URL url;
url.Complete = aUrl;
@@ -172,7 +172,6 @@ dispatchRequests (const uno::Reference< frame::XModel>& xModel, const rtl::OUStr
}
uno::Reference<frame::XDispatch> xDispatcher = xDispatchProvider->queryDispatch(url,emptyString,0);
- uno::Reference< frame::XNotifyingDispatch > xNotifyingDispatcher( xDispatcher, uno::UNO_QUERY );
uno::Sequence<beans::PropertyValue> dispatchProps(1);
@@ -188,20 +187,10 @@ dispatchRequests (const uno::Reference< frame::XModel>& xModel, const rtl::OUStr
*pDest = *pSrc;
}
- if ( bSilent )
- {
- (*pDest).Name = rtl::OUString( "Silent" );
- (*pDest).Value <<= (sal_Bool)sal_True;
- }
-
- if ( !rListener.is() && xDispatcher.is() )
+ if ( xDispatcher.is() )
{
xDispatcher->dispatch( url, dispatchProps );
}
- else if ( rListener.is() && xNotifyingDispatcher.is() )
- {
- xNotifyingDispatcher->dispatchWithNotification( url, dispatchProps, rListener );
- }
}
void
@@ -1167,28 +1156,6 @@ double Millimeter::getInPoints(int _hmm)
return points;
}
-// Listener for XNotifyingDispatch
-VBADispatchListener::VBADispatchListener() : m_State( sal_False )
-{
-}
-
-// Listener for XNotifyingDispatch
-VBADispatchListener::~VBADispatchListener()
-{
-}
-
-// Listener for XNotifyingDispatch
-void SAL_CALL VBADispatchListener::dispatchFinished( const frame::DispatchResultEvent& aEvent ) throw ( uno::RuntimeException )
-{
- m_Result = aEvent.Result;
- m_State = ( aEvent.State == frame::DispatchResultState::SUCCESS ) ? sal_True : sal_False;
-}
-
-// Listener for XNotifyingDispatch
-void SAL_CALL VBADispatchListener::disposing( const lang::EventObject& /*aEvent*/ ) throw( uno::RuntimeException )
-{
-}
-
uno::Reference< XHelperInterface > getVBADocument( const uno::Reference< frame::XModel >& xModel )
{
uno::Reference< XHelperInterface > xIf;
More information about the Libreoffice-commits
mailing list