diff --git a/sc/source/ui/vba/makefile.mk b/sc/source/ui/vba/makefile.mk index ba50cbad9abd..3719e08e3546 100644 --- a/sc/source/ui/vba/makefile.mk +++ b/sc/source/ui/vba/makefile.mk @@ -31,7 +31,7 @@ PRJNAME=sc TARGET=vbaobj ENABLE_EXCEPTIONS=TRUE VISIBILITY_HIDDEN=TRUE -CDEFS+=-DVBA_OOBUILD_HACK + # --- Settings ----------------------------------------------------- .INCLUDE : settings.mk @@ -41,6 +41,9 @@ DLLPRE = dummy: @echo "not building vba..." .ENDIF + +CDEFS+=-DVBA_OOBUILD_HACK + .IF "$(L10N_framework)"=="" INCPRE=$(INCCOM)$/$(TARGET) diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index c161aa195807..f612e9f13da2 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -5390,10 +5390,10 @@ ScVbaRange::AutoFill( const uno::Reference< excel::XRange >& Destination, const // default to include the number of Rows in the source range; SCCOLROW nSourceCount = ( sourceRange.aEnd.Row() - sourceRange.aStart.Row() ) + 1; + SCCOLROW nCount = 0; if ( sourceRange != destRange ) { - SCCOLROW nCount = 0; // Find direction of fill, vertical or horizontal if ( sourceRange.aStart == destRange.aStart ) {