[Libreoffice-commits] .: basic/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Oct 4 02:36:15 PDT 2012


 basic/source/inc/date.hxx         |   37 +++++++++++++++++++++++++++++++++++++
 basic/source/runtime/methods.cxx  |    8 +-------
 basic/source/runtime/methods1.cxx |   13 +------------
 basic/source/sbx/sbxscan.cxx      |    8 +-------
 4 files changed, 40 insertions(+), 26 deletions(-)

New commits:
commit af4df7ac089134df888ada3cd36b27a0b62babab
Author: Jack Leigh <leighman at gmx.se>
Date:   Wed Oct 3 16:35:47 2012 +0100

    fdo#48257 collect function prototypes from basic/ into single header file
    
    Change-Id: I1666e64b2b611054e1a713a76575e2f06781f80a

diff --git a/basic/source/inc/date.hxx b/basic/source/inc/date.hxx
new file mode 100644
index 0000000..cd38c89
--- /dev/null
+++ b/basic/source/inc/date.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SBDATE_HXX
+#define _SBDATE_HXX
+
+bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet );
+
+sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam = false, sal_Int16 nFirstDay = 0 );
+
+sal_Int16 implGetDateYear( double aDate );
+sal_Int16 implGetDateMonth( double aDate );
+sal_Int16 implGetDateDay( double aDate );
+
+sal_Int16 implGetHour( double dDate );
+sal_Int16 implGetMinute( double dDate );
+sal_Int16 implGetSecond( double dDate );
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index a90cc0e..054de26 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -63,6 +63,7 @@ using namespace com::sun::star;
 
 #include <comphelper/string.hxx>
 
+#include "date.hxx"
 #include "stdobj.hxx"
 #include <basic/sbstdobj.hxx>
 #include "rtlproto.hxx"
@@ -103,9 +104,6 @@ SbxVariable* getDefaultProp( SbxVariable* pRef );
 
 #ifndef DISABLE_SCRIPTING
 
-// forward decl.
-bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet );
-
 // from source/classes/sbxmod.cxx
 uno::Reference< frame::XModel > getDocumentModel( StarBASIC* );
 
@@ -1701,8 +1699,6 @@ sal_Int16 implGetDateMonth( double aDate )
     return nRet;
 }
 
-sal_Int16 implGetDateYear( double aDate );
-
 // Function to convert date to ISO 8601 date format
 RTLFUNC(CDateToIso)
 {
@@ -1956,8 +1952,6 @@ RTLFUNC(Hour)
     }
 }
 
-sal_Int16 implGetMinute( double dDate );
-
 RTLFUNC(Minute)
 {
     (void)pBasic;
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 3e1d949..4692ca4 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -32,6 +32,7 @@
 #include <vcl/jobset.hxx>
 #include <basic/sbobjmod.hxx>
 
+#include "date.hxx"
 #include "sbintern.hxx"
 #include "runtime.hxx"
 #include "stdobj.hxx"
@@ -57,7 +58,6 @@ using namespace com::sun::star::i18n;
 
 void unoToSbxValue( SbxVariable* pVar, const Any& aValue );
 Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, com::sun::star::beans::Property* pUnoProperty = NULL );
-sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam = false, sal_Int16 nFirstDay = 0 );
 
 static Reference< XCalendar3 > getLocaleCalendar( void )
 {
@@ -1906,17 +1906,6 @@ IntervalInfo* getIntervalInfo( const String& rStringCode )
     return pInfo;
 }
 
-// From methods.cxx
-bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet );
-sal_Int16 implGetDateDay( double aDate );
-sal_Int16 implGetDateMonth( double aDate );
-sal_Int16 implGetDateYear( double aDate );
-
-sal_Int16 implGetHour( double dDate );
-sal_Int16 implGetMinute( double dDate );
-sal_Int16 implGetSecond( double dDate );
-
-
 inline void implGetDayMonthYear( sal_Int16& rnYear, sal_Int16& rnMonth, sal_Int16& rnDay, double dDate )
 {
     rnDay   = implGetDateDay( dDate );
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index bc23523..7ea06b5 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -39,6 +39,7 @@
 #include <svtools/svtools.hrc>
 
 #include "basrid.hxx"
+#include "date.hxx"
 #include "runtime.hxx"
 
 #include <rtl/strbuf.hxx>
@@ -689,13 +690,6 @@ VbaFormatInfo* getFormatInfo( const String& rFmt )
 #define VBAFORMAT_LOWERCASE         "<"
 #define VBAFORMAT_UPPERCASE         ">"
 
-// From methods1.cxx
-sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam = false, sal_Int16 nFirstDay = 0 );
-// from methods.cxx
-sal_Int16 implGetMinute( double dDate );
-sal_Int16 implGetDateYear( double aDate );
-bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet );
-
 void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const
 {
     short nComma = 0;


More information about the Libreoffice-commits mailing list