summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-01-09 15:41:13 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-01-09 15:41:13 +0100
commit2f3bc785e675b40003b06f549a00775322f0b7fd (patch)
treeef1bd147e5a2adde8cbd8a8efe6983505f4f57cc /sc
parente88309519accfbde8f19d1ce36b657707683bb61 (diff)
New loplugin:externvar: sc
Change-Id: I6f9df997a957a1fa49161add2adafe228d036a30
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/drwlayer.hxx2
-rw-r--r--sc/inc/global.hxx5
-rw-r--r--sc/source/core/data/column3.cxx2
-rw-r--r--sc/source/core/data/documen7.cxx2
-rw-r--r--sc/source/core/data/table4.cxx2
-rw-r--r--sc/source/core/tool/autoform.cxx2
-rw-r--r--sc/source/core/tool/cellform.cxx3
-rw-r--r--sc/source/filter/xml/editattributemap.cxx2
-rw-r--r--sc/source/ui/inc/drawview.hxx2
-rw-r--r--sc/source/ui/inc/viewfunc.hxx3
-rw-r--r--sc/source/ui/undo/undotab.cxx2
-rw-r--r--sc/source/ui/unoobj/targuno.cxx2
-rw-r--r--sc/source/ui/vba/service.cxx28
-rw-r--r--sc/source/ui/vba/service.hxx43
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx5
-rw-r--r--sc/source/ui/vba/vbahyperlink.cxx7
-rw-r--r--sc/source/ui/vba/vbarange.cxx5
-rw-r--r--sc/source/ui/vba/vbawindow.cxx5
-rw-r--r--sc/source/ui/vba/vbaworkbook.cxx5
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx5
-rw-r--r--sc/source/ui/view/gridwin.cxx7
-rw-r--r--sc/source/ui/view/select.cxx2
-rw-r--r--sc/source/ui/view/tabview4.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx2
-rw-r--r--sc/source/ui/view/viewfun7.cxx2
25 files changed, 79 insertions, 68 deletions
diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx
index 65b9eba774b5..fa31f6f43afd 100644
--- a/sc/inc/drwlayer.hxx
+++ b/sc/inc/drwlayer.hxx
@@ -216,6 +216,8 @@ protected:
virtual css::uno::Reference< css::uno::XInterface > createUnoModel() override;
};
+extern bool bDrawIsInUndo; // somewhere as member!
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index c6bbb839093f..e7bb9362df92 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -31,6 +31,7 @@
class Bitmap;
class SfxItemSet;
+class SfxViewShell;
class Color;
struct ScCalcConfig;
enum class SvtScriptType;
@@ -897,6 +898,10 @@ struct ScConsolidateParam
void SetAreas ( ScArea* const* ppAreas, sal_uInt16 nCount );
};
+extern SfxViewShell* pScActiveViewShell;
+extern sal_uInt16 nScClickMouseModifier;
+extern sal_uInt16 nScFillModeMouseModifier;
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index f736aa0c27bf..dd332880c269 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -65,8 +65,6 @@
using ::com::sun::star::i18n::LocaleDataItem;
-// Err527 Workaround
-extern const ScFormulaCell* pLastFormulaTreeTop; // in cellform.cxx
using namespace formula;
void ScColumn::Broadcast( SCROW nRow )
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index 9ea2a2ead368..282e1a53514f 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -41,8 +41,6 @@
#include "globstr.hrc"
-extern const ScFormulaCell* pLastFormulaTreeTop; // cellform.cxx Err527 WorkAround
-
void ScDocument::StartListeningArea(
const ScRange& rRange, bool bGroupListening, SvtListener* pListener )
{
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 81cfd9c277b0..aa7e44251c9f 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -68,8 +68,6 @@
#define D_MAX_LONG_ (double) 0x7fffffff
-extern sal_uInt16 nScFillModeMouseModifier; // global.cxx
-
namespace {
short lcl_DecompValueString( OUString& rValue, sal_Int32& nVal, sal_uInt16* pMinDigits = nullptr )
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 4552389a5012..6d48398f8c7c 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -41,8 +41,6 @@
* be synchronized with Writer's SwTableAutoFmtTbl sw/source/core/doc/tblafmt.cxx
*/
-const sal_Char *linker_dummy = "";
-
static const sal_Char sAutoTblFmtName[] = "autotbl.fmt";
// till SO5PF
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index dab0d2db5fc3..06019ea20bde 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -30,9 +30,6 @@
#include "sc.hrc"
#include <editutil.hxx>
-// Err527 Workaround
-const ScFormulaCell* pLastFormulaTreeTop = nullptr;
-
void ScCellFormat::GetString( ScRefCellValue& rCell, sal_uLong nFormat, OUString& rString,
Color** ppColor, SvNumberFormatter& rFormatter, const ScDocument* pDoc,
bool bNullVals, bool bFormula, bool bUseStarFormat )
diff --git a/sc/source/filter/xml/editattributemap.cxx b/sc/source/filter/xml/editattributemap.cxx
index 3a2dec744893..fdb009cbde56 100644
--- a/sc/source/filter/xml/editattributemap.cxx
+++ b/sc/source/filter/xml/editattributemap.cxx
@@ -13,7 +13,7 @@
#include <editeng/memberids.hrc>
#include <xmloff/xmlnmspe.hxx>
-ScXMLEditAttributeMap::Entry aEntries[] = {
+ScXMLEditAttributeMap::Entry const aEntries[] = {
{ XML_NAMESPACE_FO, "color", "CharColor", EE_CHAR_COLOR, 0 },
{ XML_NAMESPACE_STYLE, "font-charset", "CharFontCharSet", EE_CHAR_FONTINFO, MID_FONT_CHAR_SET },
diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx
index 7fd17358516f..7111ddf9daf5 100644
--- a/sc/source/ui/inc/drawview.hxx
+++ b/sc/source/ui/inc/drawview.hxx
@@ -158,6 +158,8 @@ public:
SfxViewShell* GetSfxViewShell() const override;
};
+extern Point aDragStartDiff;
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 30f402625405..59f7af27de2c 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -353,6 +353,9 @@ private:
SCCOL nEndCol, SCROW nEndRow, sal_uLong nCount );
};
+extern bool bPasteIsDrop;
+extern bool bPasteIsMove;
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 5ace37ef7dff..9aee17310d91 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -51,8 +51,6 @@
#include <utility>
#include <vector>
-extern bool bDrawIsInUndo; // somewhere as member!
-
using namespace com::sun::star;
using ::std::unique_ptr;
using ::std::vector;
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index 3180a137da08..8a270a261c34 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -39,7 +39,7 @@
using namespace ::com::sun::star;
-sal_uInt16 nTypeResIds[SC_LINKTARGETTYPE_COUNT] =
+sal_uInt16 const nTypeResIds[SC_LINKTARGETTYPE_COUNT] =
{
SCSTR_CONTENT_TABLE, // SC_LINKTARGETTYPE_SHEET
SCSTR_CONTENT_RANGENAME, // SC_LINKTARGETTYPE_RANGENAME
diff --git a/sc/source/ui/vba/service.cxx b/sc/source/ui/vba/service.cxx
index 9c52d0915e94..1a27ae7b86c6 100644
--- a/sc/source/ui/vba/service.cxx
+++ b/sc/source/ui/vba/service.cxx
@@ -19,6 +19,8 @@
#include <cppuhelper/implementationentry.hxx>
#include <comphelper/servicedecl.hxx>
+#include <service.hxx>
+
// component exports
using namespace ::com::sun::star;
@@ -26,32 +28,6 @@ using namespace ::com::sun::star::uno;
namespace sdecl = comphelper::service_decl;
-// reference service helper(s)
-namespace range
-{
-extern sdecl::ServiceDecl const serviceDecl;
-}
-namespace workbook
-{
-extern sdecl::ServiceDecl const serviceDecl;
-}
-namespace worksheet
-{
-extern sdecl::ServiceDecl const serviceDecl;
-}
-namespace window
-{
-extern sdecl::ServiceDecl const serviceDecl;
-}
-namespace hyperlink
-{
-extern sdecl::ServiceDecl const serviceDecl;
-}
-namespace application
-{
-extern sdecl::ServiceDecl const serviceDecl;
-}
-
extern "C"
{
SAL_DLLPUBLIC_EXPORT void * SAL_CALL vbaobj_component_getFactory(
diff --git a/sc/source/ui/vba/service.hxx b/sc/source/ui/vba/service.hxx
new file mode 100644
index 000000000000..5735551508e5
--- /dev/null
+++ b/sc/source/ui/vba/service.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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/.
+ */
+
+#ifndef INCLUDED_SC_SOURCE_UI_VBA_SERVICE_HXX
+#define INCLUDED_SC_SOURCE_UI_VBA_SERVICE_HXX
+
+#include <sal/config.h>
+
+namespace comphelper { namespace service_decl { class ServiceDecl; } }
+
+namespace application {
+extern comphelper::service_decl::ServiceDecl const serviceDecl;
+}
+
+namespace hyperlink {
+extern comphelper::service_decl::ServiceDecl const serviceDecl;
+}
+
+namespace range {
+extern comphelper::service_decl::ServiceDecl const serviceDecl;
+}
+
+namespace window {
+extern comphelper::service_decl::ServiceDecl const serviceDecl;
+}
+
+namespace workbook {
+extern comphelper::service_decl::ServiceDecl const serviceDecl;
+}
+
+namespace worksheet {
+extern comphelper::service_decl::ServiceDecl const serviceDecl;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 146ef3ab9d99..c9d55cd73272 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -35,6 +35,7 @@
#include <ooo/vba/excel/XlMousePointer.hpp>
#include <ooo/vba/office/MsoShapeType.hpp>
+#include "service.hxx"
#include "vbaapplication.hxx"
#include "vbaworkbooks.hxx"
#include "vbaworkbook.hxx"
@@ -1334,8 +1335,8 @@ ScVbaApplication::getServiceNames()
namespace application
{
namespace sdecl = comphelper::service_decl;
-sdecl::vba_service_class_<ScVbaApplication, sdecl::with_args<false> > serviceImpl;
-extern sdecl::ServiceDecl const serviceDecl(
+sdecl::vba_service_class_<ScVbaApplication, sdecl::with_args<false> > const serviceImpl;
+sdecl::ServiceDecl const serviceDecl(
serviceImpl,
"ScVbaApplication",
"ooo.vba.excel.Application" );
diff --git a/sc/source/ui/vba/vbahyperlink.cxx b/sc/source/ui/vba/vbahyperlink.cxx
index 0958fef78550..d9451e31b7a7 100644
--- a/sc/source/ui/vba/vbahyperlink.cxx
+++ b/sc/source/ui/vba/vbahyperlink.cxx
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include "service.hxx"
#include "vbahyperlink.hxx"
#include <vbahelper/helperdecl.hxx>
#include <com/sun/star/container/XIndexAccess.hpp>
@@ -224,8 +227,8 @@ void ScVbaHyperlink::setUrlComponents( const UrlComponents& rUrlComp ) throw (un
namespace hyperlink
{
namespace sdecl = comphelper::service_decl;
-sdecl::vba_service_class_<ScVbaHyperlink, sdecl::with_args<true> > serviceImpl;
-extern sdecl::ServiceDecl const serviceDecl(
+sdecl::vba_service_class_<ScVbaHyperlink, sdecl::with_args<true> > const serviceImpl;
+sdecl::ServiceDecl const serviceDecl(
serviceImpl,
"ScVbaHyperlink",
"ooo.vba.excel.Hyperlink" );
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 54b5891822e1..fe1247debdaf 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -135,6 +135,7 @@
#include <globstr.hrc>
#include <unonames.hxx>
+#include "service.hxx"
#include "vbaapplication.hxx"
#include "vbafont.hxx"
#include "vbacomment.hxx"
@@ -5589,8 +5590,8 @@ ScVbaRange::hasError() throw (uno::RuntimeException, std::exception)
namespace range
{
namespace sdecl = comphelper::service_decl;
-sdecl::vba_service_class_<ScVbaRange, sdecl::with_args<true> > serviceImpl;
-extern sdecl::ServiceDecl const serviceDecl(
+sdecl::vba_service_class_<ScVbaRange, sdecl::with_args<true> > const serviceImpl;
+sdecl::ServiceDecl const serviceDecl(
serviceImpl,
"SvVbaRange",
"ooo.vba.excel.Range" );
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index de36e6daff9e..985dfc87ab9c 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <vbahelper/helperdecl.hxx>
+#include "service.hxx"
#include "vbawindow.hxx"
#include "vbaworksheets.hxx"
#include "vbaworksheet.hxx"
@@ -898,8 +899,8 @@ ScVbaWindow::getServiceNames()
namespace window
{
namespace sdecl = comphelper::service_decl;
-sdecl::vba_service_class_<ScVbaWindow, sdecl::with_args<true> > serviceImpl;
-extern sdecl::ServiceDecl const serviceDecl(
+sdecl::vba_service_class_<ScVbaWindow, sdecl::with_args<true> > const serviceImpl;
+sdecl::ServiceDecl const serviceDecl(
serviceImpl,
"ScVbaWindow",
"ooo.vba.excel.Window" );
diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx
index d7a0e6a00ab6..a732f0f87858 100644
--- a/sc/source/ui/vba/vbaworkbook.cxx
+++ b/sc/source/ui/vba/vbaworkbook.cxx
@@ -34,6 +34,7 @@
#include <ooo/vba/excel/XApplication.hpp>
#include "scextopt.hxx"
+#include "service.hxx"
#include "vbaworksheet.hxx"
#include "vbaworksheets.hxx"
#include "vbaworkbook.hxx"
@@ -416,8 +417,8 @@ ScVbaWorkbook::getSomething(const uno::Sequence<sal_Int8 >& rId ) throw(css::uno
namespace workbook
{
namespace sdecl = comphelper::service_decl;
-sdecl::vba_service_class_<ScVbaWorkbook, sdecl::with_args<true> > serviceImpl;
-extern sdecl::ServiceDecl const serviceDecl(
+sdecl::vba_service_class_<ScVbaWorkbook, sdecl::with_args<true> > const serviceImpl;
+sdecl::ServiceDecl const serviceDecl(
serviceImpl,
"ScVbaWorkbook",
"ooo.vba.excel.Workbook" );
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 7aaec25242d1..ff021a8c8eec 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -84,6 +84,7 @@
#include "drwlayer.hxx"
#include "tabprotection.hxx"
#include "scextopt.hxx"
+#include "service.hxx"
#include "vbaoutline.hxx"
#include "vbarange.hxx"
#include "vbacomments.hxx"
@@ -1098,8 +1099,8 @@ ScVbaWorksheet::getSomething(const uno::Sequence<sal_Int8 > & rId) throw(uno::Ru
namespace worksheet
{
namespace sdecl = comphelper::service_decl;
-sdecl::vba_service_class_<ScVbaWorksheet, sdecl::with_args<true> > serviceImpl;
-extern sdecl::ServiceDecl const serviceDecl(
+sdecl::vba_service_class_<ScVbaWorksheet, sdecl::with_args<true> > const serviceImpl;
+sdecl::ServiceDecl const serviceDecl(
serviceImpl,
"ScVbaWorksheet",
"ooo.vba.excel.Worksheet" );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index edd5d24637e3..578fd2a84486 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -162,10 +162,6 @@ enum ScFilterBoxMode
SC_FILTERBOX_PAGEFIELD
};
-extern SfxViewShell* pScActiveViewShell; // global.cxx
-extern sal_uInt16 nScClickMouseModifier; // global.cxx
-extern sal_uInt16 nScFillModeMouseModifier; // global.cxx
-
struct ScGridWindow::MouseEventState
{
bool mbActivatePart;
@@ -3505,9 +3501,6 @@ static ScRange lcl_MakeDropRange( SCCOL nPosX, SCROW nPosY, SCTAB nTab, const Sc
return ScRange( nCol1, nRow1, nTab, nCol2, nRow2, nTab );
}
-extern bool bPasteIsDrop; // viewfun4 -> move to header
-extern bool bPasteIsMove; // viewfun7 -> move to header
-
sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if ( rEvt.mbLeaving )
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index 8f1f92d5fdb1..714b99129ff3 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -36,8 +36,6 @@
#define SC_SELENG_REFMODE_UPDATE_INTERVAL_MIN 65
#endif
-extern sal_uInt16 nScFillModeMouseModifier; // global.cxx
-
using namespace com::sun::star;
static Point aSwitchPos; //! Member
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index fdc633dfaa2e..3196b29c646e 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -29,8 +29,6 @@
#include "formulacell.hxx"
#include "dociter.hxx"
-extern sal_uInt16 nScFillModeMouseModifier; // global.cxx
-
// --- Referenz-Eingabe / Fill-Cursor
void ScTabView::HideTip()
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index de54fd3ff512..5425f76a73d0 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -102,8 +102,6 @@
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <comphelper/lok.hxx>
-extern SfxViewShell* pScActiveViewShell; // global.cxx
-
using namespace com::sun::star;
void ScTabViewShell::Activate(bool bMDI)
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index 9f9fe22f25e4..af59f931450a 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -49,8 +49,6 @@
#include "dragdata.hxx"
#include <gridwin.hxx>
-extern Point aDragStartDiff;
-
bool bPasteIsMove = false;
using namespace com::sun::star;