New loplugin:inlinevisible to flag inline functions marked DLLEXPORT
...which does not make sense. On Linux and Mac OS X, they potentially end up exported from multiple libs (weakly, though), while on Windows the potentially even end up not emitted at all, which could cause link errors. Change-Id: I092c9ba39e686c17b6e91581cdd4753f1c4d582f
This commit is contained in:
53
compilerplugins/clang/inlinevisible.cxx
Normal file
53
compilerplugins/clang/inlinevisible.cxx
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/* -*- 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/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include "clang/AST/Attr.h"
|
||||||
|
#include "clang/Sema/SemaInternal.h" // warn_unused_function
|
||||||
|
|
||||||
|
#include "compat.hxx"
|
||||||
|
#include "plugin.hxx"
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
class InlineVisible:
|
||||||
|
public RecursiveASTVisitor<InlineVisible>, public loplugin::Plugin
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit InlineVisible(InstantiationData const & data): Plugin(data) {}
|
||||||
|
|
||||||
|
void run() override
|
||||||
|
{ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
|
||||||
|
|
||||||
|
bool VisitFunctionDecl(FunctionDecl const * decl);
|
||||||
|
};
|
||||||
|
|
||||||
|
bool InlineVisible::VisitFunctionDecl(FunctionDecl const * decl) {
|
||||||
|
if (!ignoreLocation(decl) && decl->isInlineSpecified()) {
|
||||||
|
VisibilityAttr * attr = decl->getAttr<VisibilityAttr>();
|
||||||
|
if (attr != nullptr && attr->getVisibility() == VisibilityAttr::Default)
|
||||||
|
{
|
||||||
|
report(
|
||||||
|
DiagnosticsEngine::Warning,
|
||||||
|
("Function explicitly declared both inline and "
|
||||||
|
" visibility=default"),
|
||||||
|
decl->getLocation())
|
||||||
|
<< decl->getSourceRange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
loplugin::Plugin::Registration<InlineVisible> X("inlinevisible");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@@ -198,56 +198,56 @@ namespace basegfx
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
BASEGFX_DLLPUBLIC inline B2ITuple operator+(const B2ITuple& rTupA, const B2ITuple& rTupB)
|
inline B2ITuple operator+(const B2ITuple& rTupA, const B2ITuple& rTupB)
|
||||||
{
|
{
|
||||||
B2ITuple aSum(rTupA);
|
B2ITuple aSum(rTupA);
|
||||||
aSum += rTupB;
|
aSum += rTupB;
|
||||||
return aSum;
|
return aSum;
|
||||||
}
|
}
|
||||||
|
|
||||||
BASEGFX_DLLPUBLIC inline B2ITuple operator-(const B2ITuple& rTupA, const B2ITuple& rTupB)
|
inline B2ITuple operator-(const B2ITuple& rTupA, const B2ITuple& rTupB)
|
||||||
{
|
{
|
||||||
B2ITuple aSub(rTupA);
|
B2ITuple aSub(rTupA);
|
||||||
aSub -= rTupB;
|
aSub -= rTupB;
|
||||||
return aSub;
|
return aSub;
|
||||||
}
|
}
|
||||||
|
|
||||||
BASEGFX_DLLPUBLIC inline B2ITuple operator/(const B2ITuple& rTupA, const B2ITuple& rTupB)
|
inline B2ITuple operator/(const B2ITuple& rTupA, const B2ITuple& rTupB)
|
||||||
{
|
{
|
||||||
B2ITuple aDiv(rTupA);
|
B2ITuple aDiv(rTupA);
|
||||||
aDiv /= rTupB;
|
aDiv /= rTupB;
|
||||||
return aDiv;
|
return aDiv;
|
||||||
}
|
}
|
||||||
|
|
||||||
BASEGFX_DLLPUBLIC inline B2ITuple operator*(const B2ITuple& rTupA, const B2ITuple& rTupB)
|
inline B2ITuple operator*(const B2ITuple& rTupA, const B2ITuple& rTupB)
|
||||||
{
|
{
|
||||||
B2ITuple aMul(rTupA);
|
B2ITuple aMul(rTupA);
|
||||||
aMul *= rTupB;
|
aMul *= rTupB;
|
||||||
return aMul;
|
return aMul;
|
||||||
}
|
}
|
||||||
|
|
||||||
BASEGFX_DLLPUBLIC inline B2ITuple operator*(const B2ITuple& rTup, sal_Int32 t)
|
inline B2ITuple operator*(const B2ITuple& rTup, sal_Int32 t)
|
||||||
{
|
{
|
||||||
B2ITuple aNew(rTup);
|
B2ITuple aNew(rTup);
|
||||||
aNew *= t;
|
aNew *= t;
|
||||||
return aNew;
|
return aNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
BASEGFX_DLLPUBLIC inline B2ITuple operator*(sal_Int32 t, const B2ITuple& rTup)
|
inline B2ITuple operator*(sal_Int32 t, const B2ITuple& rTup)
|
||||||
{
|
{
|
||||||
B2ITuple aNew(rTup);
|
B2ITuple aNew(rTup);
|
||||||
aNew *= t;
|
aNew *= t;
|
||||||
return aNew;
|
return aNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
BASEGFX_DLLPUBLIC inline B2ITuple operator/(const B2ITuple& rTup, sal_Int32 t)
|
inline B2ITuple operator/(const B2ITuple& rTup, sal_Int32 t)
|
||||||
{
|
{
|
||||||
B2ITuple aNew(rTup);
|
B2ITuple aNew(rTup);
|
||||||
aNew /= t;
|
aNew /= t;
|
||||||
return aNew;
|
return aNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
BASEGFX_DLLPUBLIC inline B2ITuple operator/(sal_Int32 t, const B2ITuple& rTup)
|
inline B2ITuple operator/(sal_Int32 t, const B2ITuple& rTup)
|
||||||
{
|
{
|
||||||
B2ITuple aNew(t, t);
|
B2ITuple aNew(t, t);
|
||||||
B2ITuple aTmp(rTup);
|
B2ITuple aTmp(rTup);
|
||||||
|
@@ -253,13 +253,13 @@ namespace detail
|
|||||||
|
|
||||||
@return rBuf;
|
@return rBuf;
|
||||||
*/
|
*/
|
||||||
COMPHELPER_DLLPUBLIC inline OStringBuffer& truncateToLength(
|
inline OStringBuffer& truncateToLength(
|
||||||
OStringBuffer& rBuffer, sal_Int32 nLength) SAL_THROW(())
|
OStringBuffer& rBuffer, sal_Int32 nLength) SAL_THROW(())
|
||||||
{
|
{
|
||||||
return detail::truncateToLength(rBuffer, nLength);
|
return detail::truncateToLength(rBuffer, nLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
COMPHELPER_DLLPUBLIC inline OUStringBuffer& truncateToLength(
|
inline OUStringBuffer& truncateToLength(
|
||||||
OUStringBuffer& rBuffer, sal_Int32 nLength) SAL_THROW(())
|
OUStringBuffer& rBuffer, sal_Int32 nLength) SAL_THROW(())
|
||||||
{
|
{
|
||||||
return detail::truncateToLength(rBuffer, nLength);
|
return detail::truncateToLength(rBuffer, nLength);
|
||||||
@@ -294,14 +294,14 @@ namespace detail
|
|||||||
|
|
||||||
@return rBuf;
|
@return rBuf;
|
||||||
*/
|
*/
|
||||||
COMPHELPER_DLLPUBLIC inline OStringBuffer& padToLength(
|
inline OStringBuffer& padToLength(
|
||||||
OStringBuffer& rBuffer, sal_Int32 nLength,
|
OStringBuffer& rBuffer, sal_Int32 nLength,
|
||||||
sal_Char cFill = '\0') SAL_THROW(())
|
sal_Char cFill = '\0') SAL_THROW(())
|
||||||
{
|
{
|
||||||
return detail::padToLength(rBuffer, nLength, cFill);
|
return detail::padToLength(rBuffer, nLength, cFill);
|
||||||
}
|
}
|
||||||
|
|
||||||
COMPHELPER_DLLPUBLIC inline OUStringBuffer& padToLength(
|
inline OUStringBuffer& padToLength(
|
||||||
OUStringBuffer& rBuffer, sal_Int32 nLength,
|
OUStringBuffer& rBuffer, sal_Int32 nLength,
|
||||||
sal_Unicode cFill = '\0') SAL_THROW(())
|
sal_Unicode cFill = '\0') SAL_THROW(())
|
||||||
{
|
{
|
||||||
@@ -433,32 +433,32 @@ COMPHELPER_DLLPUBLIC bool isdigitAsciiString(const OString &rString);
|
|||||||
*/
|
*/
|
||||||
COMPHELPER_DLLPUBLIC bool isdigitAsciiString(const OUString &rString);
|
COMPHELPER_DLLPUBLIC bool isdigitAsciiString(const OUString &rString);
|
||||||
|
|
||||||
COMPHELPER_DLLPUBLIC inline bool isdigitAscii(sal_Unicode c)
|
inline bool isdigitAscii(sal_Unicode c)
|
||||||
{
|
{
|
||||||
return ((c >= '0') && (c <= '9'));
|
return ((c >= '0') && (c <= '9'));
|
||||||
}
|
}
|
||||||
|
|
||||||
COMPHELPER_DLLPUBLIC inline bool isxdigitAscii(sal_Unicode c)
|
inline bool isxdigitAscii(sal_Unicode c)
|
||||||
{
|
{
|
||||||
return isdigitAscii(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
|
return isdigitAscii(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
|
||||||
}
|
}
|
||||||
|
|
||||||
COMPHELPER_DLLPUBLIC inline bool islowerAscii(sal_Unicode c)
|
inline bool islowerAscii(sal_Unicode c)
|
||||||
{
|
{
|
||||||
return ((c >= 'a') && (c <= 'z'));
|
return ((c >= 'a') && (c <= 'z'));
|
||||||
}
|
}
|
||||||
|
|
||||||
COMPHELPER_DLLPUBLIC inline bool isupperAscii(sal_Unicode c)
|
inline bool isupperAscii(sal_Unicode c)
|
||||||
{
|
{
|
||||||
return ((c >= 'A') && (c <= 'Z'));
|
return ((c >= 'A') && (c <= 'Z'));
|
||||||
}
|
}
|
||||||
|
|
||||||
COMPHELPER_DLLPUBLIC inline bool isalphaAscii(sal_Unicode c)
|
inline bool isalphaAscii(sal_Unicode c)
|
||||||
{
|
{
|
||||||
return islowerAscii(c) || isupperAscii(c);
|
return islowerAscii(c) || isupperAscii(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
COMPHELPER_DLLPUBLIC inline bool isalnumAscii(sal_Unicode c)
|
inline bool isalnumAscii(sal_Unicode c)
|
||||||
{
|
{
|
||||||
return isalphaAscii(c) || isdigitAscii(c);
|
return isalphaAscii(c) || isdigitAscii(c);
|
||||||
}
|
}
|
||||||
|
@@ -44,7 +44,7 @@ class FixedLine;
|
|||||||
//and SfxDockingWindow, where it is changed into a UniqueId and cleared
|
//and SfxDockingWindow, where it is changed into a UniqueId and cleared
|
||||||
//This reverses the clear of the HelpId
|
//This reverses the clear of the HelpId
|
||||||
|
|
||||||
SFX2_DLLPUBLIC inline void reverseUniqueHelpIdHack(Window &rWindow)
|
inline void reverseUniqueHelpIdHack(Window &rWindow)
|
||||||
{
|
{
|
||||||
if (rWindow.GetHelpId().isEmpty())
|
if (rWindow.GetHelpId().isEmpty())
|
||||||
rWindow.SetHelpId(rWindow.GetUniqueId());
|
rWindow.SetHelpId(rWindow.GetUniqueId());
|
||||||
|
@@ -274,12 +274,12 @@ public:
|
|||||||
bool IsDouble( ) const { return (0 != m_nRate1) && (0 != m_nRate2); }
|
bool IsDouble( ) const { return (0 != m_nRate1) && (0 != m_nRate2); }
|
||||||
};
|
};
|
||||||
|
|
||||||
SVT_DLLPUBLIC inline Color sameColor( Color rMain )
|
inline Color sameColor( Color rMain )
|
||||||
{
|
{
|
||||||
return rMain;
|
return rMain;
|
||||||
}
|
}
|
||||||
|
|
||||||
SVT_DLLPUBLIC inline Color sameDistColor( Color /*rMain*/, Color rDefault )
|
inline Color sameDistColor( Color /*rMain*/, Color rDefault )
|
||||||
{
|
{
|
||||||
return rDefault;
|
return rDefault;
|
||||||
}
|
}
|
||||||
|
@@ -502,7 +502,7 @@ TOOLS_DLLPUBLIC OString read_uInt8s_ToOString(SvStream& rStrm,
|
|||||||
sal_Size nUnits);
|
sal_Size nUnits);
|
||||||
|
|
||||||
/// Attempt to read nUnits 8bit units to an OUString
|
/// Attempt to read nUnits 8bit units to an OUString
|
||||||
TOOLS_DLLPUBLIC inline OUString read_uInt8s_ToOUString(SvStream& rStrm,
|
inline OUString read_uInt8s_ToOUString(SvStream& rStrm,
|
||||||
sal_Size nUnits, rtl_TextEncoding eEnc)
|
sal_Size nUnits, rtl_TextEncoding eEnc)
|
||||||
{
|
{
|
||||||
return OStringToOUString(read_uInt8s_ToOString(rStrm, nUnits), eEnc);
|
return OStringToOUString(read_uInt8s_ToOString(rStrm, nUnits), eEnc);
|
||||||
@@ -516,14 +516,14 @@ TOOLS_DLLPUBLIC OUString read_uInt16s_ToOUString(SvStream& rStrm,
|
|||||||
/// Attempt to read a pascal-style length (of type prefix) prefixed sequence of
|
/// Attempt to read a pascal-style length (of type prefix) prefixed sequence of
|
||||||
/// 16bit units to an OUString, returned OString's length is number of
|
/// 16bit units to an OUString, returned OString's length is number of
|
||||||
/// units successfully read.
|
/// units successfully read.
|
||||||
TOOLS_DLLPUBLIC inline OUString read_uInt16_lenPrefixed_uInt16s_ToOUString(SvStream& rStrm)
|
inline OUString read_uInt16_lenPrefixed_uInt16s_ToOUString(SvStream& rStrm)
|
||||||
{
|
{
|
||||||
sal_uInt16 nUnits = 0;
|
sal_uInt16 nUnits = 0;
|
||||||
rStrm.ReadUInt16( nUnits );
|
rStrm.ReadUInt16( nUnits );
|
||||||
return read_uInt16s_ToOUString(rStrm, nUnits);
|
return read_uInt16s_ToOUString(rStrm, nUnits);
|
||||||
}
|
}
|
||||||
|
|
||||||
TOOLS_DLLPUBLIC inline OUString read_uInt32_lenPrefixed_uInt16s_ToOUString(SvStream& rStrm)
|
inline OUString read_uInt32_lenPrefixed_uInt16s_ToOUString(SvStream& rStrm)
|
||||||
{
|
{
|
||||||
sal_uInt32 nUnits = 0;
|
sal_uInt32 nUnits = 0;
|
||||||
rStrm.ReadUInt32( nUnits );
|
rStrm.ReadUInt32( nUnits );
|
||||||
@@ -535,7 +535,7 @@ TOOLS_DLLPUBLIC inline OUString read_uInt32_lenPrefixed_uInt16s_ToOUString(SvStr
|
|||||||
TOOLS_DLLPUBLIC sal_Size write_uInt16s_FromOUString(SvStream& rStrm,
|
TOOLS_DLLPUBLIC sal_Size write_uInt16s_FromOUString(SvStream& rStrm,
|
||||||
const OUString& rStr, sal_Size nUnits);
|
const OUString& rStr, sal_Size nUnits);
|
||||||
|
|
||||||
TOOLS_DLLPUBLIC inline sal_Size write_uInt16s_FromOUString(SvStream& rStrm,
|
inline sal_Size write_uInt16s_FromOUString(SvStream& rStrm,
|
||||||
const OUString& rStr)
|
const OUString& rStr)
|
||||||
{
|
{
|
||||||
return write_uInt16s_FromOUString(rStrm, rStr, rStr.getLength());
|
return write_uInt16s_FromOUString(rStrm, rStr, rStr.getLength());
|
||||||
@@ -567,21 +567,21 @@ TOOLS_DLLPUBLIC OUString read_zeroTerminated_uInt8s_ToOUString(SvStream& rStrm,
|
|||||||
/// Attempt to read a pascal-style length (of type prefix) prefixed sequence of
|
/// Attempt to read a pascal-style length (of type prefix) prefixed sequence of
|
||||||
/// 8bit units to an OString, returned OString's length is number of units
|
/// 8bit units to an OString, returned OString's length is number of units
|
||||||
/// successfully read.
|
/// successfully read.
|
||||||
TOOLS_DLLPUBLIC inline OString read_uInt16_lenPrefixed_uInt8s_ToOString(SvStream& rStrm)
|
inline OString read_uInt16_lenPrefixed_uInt8s_ToOString(SvStream& rStrm)
|
||||||
{
|
{
|
||||||
sal_uInt16 nUnits = 0;
|
sal_uInt16 nUnits = 0;
|
||||||
rStrm.ReadUInt16( nUnits );
|
rStrm.ReadUInt16( nUnits );
|
||||||
return read_uInt8s_ToOString(rStrm, nUnits);
|
return read_uInt8s_ToOString(rStrm, nUnits);
|
||||||
}
|
}
|
||||||
|
|
||||||
TOOLS_DLLPUBLIC inline OString read_uInt8_lenPrefixed_uInt8s_ToOString(SvStream& rStrm)
|
inline OString read_uInt8_lenPrefixed_uInt8s_ToOString(SvStream& rStrm)
|
||||||
{
|
{
|
||||||
sal_uInt8 nUnits = 0;
|
sal_uInt8 nUnits = 0;
|
||||||
rStrm.ReadUChar( nUnits );
|
rStrm.ReadUChar( nUnits );
|
||||||
return read_uInt8s_ToOString(rStrm, nUnits);
|
return read_uInt8s_ToOString(rStrm, nUnits);
|
||||||
}
|
}
|
||||||
|
|
||||||
TOOLS_DLLPUBLIC inline OString read_uInt32_lenPrefixed_uInt8s_ToOString(SvStream& rStrm)
|
inline OString read_uInt32_lenPrefixed_uInt8s_ToOString(SvStream& rStrm)
|
||||||
{
|
{
|
||||||
sal_uInt32 nUnits = 0;
|
sal_uInt32 nUnits = 0;
|
||||||
rStrm.ReadUInt32( nUnits );
|
rStrm.ReadUInt32( nUnits );
|
||||||
@@ -590,13 +590,13 @@ TOOLS_DLLPUBLIC inline OString read_uInt32_lenPrefixed_uInt8s_ToOString(SvStream
|
|||||||
|
|
||||||
/// Attempt to read a pascal-style length (of type prefix) prefixed sequence of
|
/// Attempt to read a pascal-style length (of type prefix) prefixed sequence of
|
||||||
/// 8bit units to an OUString
|
/// 8bit units to an OUString
|
||||||
TOOLS_DLLPUBLIC inline OUString read_uInt16_lenPrefixed_uInt8s_ToOUString(SvStream& rStrm,
|
inline OUString read_uInt16_lenPrefixed_uInt8s_ToOUString(SvStream& rStrm,
|
||||||
rtl_TextEncoding eEnc)
|
rtl_TextEncoding eEnc)
|
||||||
{
|
{
|
||||||
return OStringToOUString(read_uInt16_lenPrefixed_uInt8s_ToOString(rStrm), eEnc);
|
return OStringToOUString(read_uInt16_lenPrefixed_uInt8s_ToOString(rStrm), eEnc);
|
||||||
}
|
}
|
||||||
|
|
||||||
TOOLS_DLLPUBLIC inline OUString read_uInt8_lenPrefixed_uInt8s_ToOUString(SvStream& rStrm,
|
inline OUString read_uInt8_lenPrefixed_uInt8s_ToOUString(SvStream& rStrm,
|
||||||
rtl_TextEncoding eEnc)
|
rtl_TextEncoding eEnc)
|
||||||
{
|
{
|
||||||
return OStringToOUString(read_uInt8_lenPrefixed_uInt8s_ToOString(rStrm), eEnc);
|
return OStringToOUString(read_uInt8_lenPrefixed_uInt8s_ToOString(rStrm), eEnc);
|
||||||
@@ -604,13 +604,13 @@ TOOLS_DLLPUBLIC inline OUString read_uInt8_lenPrefixed_uInt8s_ToOUString(SvStrea
|
|||||||
|
|
||||||
/// Attempt to write a prefixed sequence of nUnits 8bit units from an OString,
|
/// Attempt to write a prefixed sequence of nUnits 8bit units from an OString,
|
||||||
/// returned value is number of bytes written
|
/// returned value is number of bytes written
|
||||||
TOOLS_DLLPUBLIC inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const OString& rStr,
|
inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const OString& rStr,
|
||||||
sal_Size nUnits)
|
sal_Size nUnits)
|
||||||
{
|
{
|
||||||
return rStrm.Write(rStr.getStr(), nUnits);
|
return rStrm.Write(rStr.getStr(), nUnits);
|
||||||
}
|
}
|
||||||
|
|
||||||
TOOLS_DLLPUBLIC inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const OString& rStr)
|
inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const OString& rStr)
|
||||||
{
|
{
|
||||||
return write_uInt8s_FromOString(rStrm, rStr, rStr.getLength());
|
return write_uInt8s_FromOString(rStrm, rStr, rStr.getLength());
|
||||||
}
|
}
|
||||||
@@ -624,7 +624,7 @@ TOOLS_DLLPUBLIC sal_Size write_uInt16_lenPrefixed_uInt8s_FromOString(SvStream& r
|
|||||||
/// Attempt to write a pascal-style length (of type prefix) prefixed sequence
|
/// Attempt to write a pascal-style length (of type prefix) prefixed sequence
|
||||||
/// of 8bit units from an OUString, returned value is number of bytes written
|
/// of 8bit units from an OUString, returned value is number of bytes written
|
||||||
/// (including byte-count of prefix)
|
/// (including byte-count of prefix)
|
||||||
TOOLS_DLLPUBLIC inline sal_Size write_uInt16_lenPrefixed_uInt8s_FromOUString(SvStream& rStrm,
|
inline sal_Size write_uInt16_lenPrefixed_uInt8s_FromOUString(SvStream& rStrm,
|
||||||
const OUString &rStr,
|
const OUString &rStr,
|
||||||
rtl_TextEncoding eEnc)
|
rtl_TextEncoding eEnc)
|
||||||
{
|
{
|
||||||
|
@@ -757,13 +757,13 @@ VCL_DLLPUBLIC Window* prevLogicalChildOfParent(Window *pTopLevel, Window *pChild
|
|||||||
//Returns true is the Window has a single child which is a container
|
//Returns true is the Window has a single child which is a container
|
||||||
VCL_DLLPUBLIC bool isLayoutEnabled(const Window *pWindow);
|
VCL_DLLPUBLIC bool isLayoutEnabled(const Window *pWindow);
|
||||||
|
|
||||||
VCL_DLLPUBLIC inline bool isContainerWindow(const Window &rWindow)
|
inline bool isContainerWindow(const Window &rWindow)
|
||||||
{
|
{
|
||||||
WindowType eType = rWindow.GetType();
|
WindowType eType = rWindow.GetType();
|
||||||
return (eType == WINDOW_CONTAINER || eType == WINDOW_SCROLLWINDOW);
|
return (eType == WINDOW_CONTAINER || eType == WINDOW_SCROLLWINDOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
VCL_DLLPUBLIC inline bool isContainerWindow(const Window *pWindow)
|
inline bool isContainerWindow(const Window *pWindow)
|
||||||
{
|
{
|
||||||
return pWindow && isContainerWindow(*pWindow);
|
return pWindow && isContainerWindow(*pWindow);
|
||||||
}
|
}
|
||||||
|
@@ -44,12 +44,12 @@ namespace psp
|
|||||||
|
|
||||||
|
|
||||||
// parses the first double in the string; decimal is '.' only
|
// parses the first double in the string; decimal is '.' only
|
||||||
VCL_DLLPUBLIC inline double StringToDouble( const OUString& rStr )
|
inline double StringToDouble( const OUString& rStr )
|
||||||
{
|
{
|
||||||
return rtl::math::stringToDouble(rStr, sal_Unicode('.'), sal_Unicode(0));
|
return rtl::math::stringToDouble(rStr, sal_Unicode('.'), sal_Unicode(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
VCL_DLLPUBLIC inline double StringToDouble(const OString& rStr)
|
inline double StringToDouble(const OString& rStr)
|
||||||
{
|
{
|
||||||
return rtl::math::stringToDouble(rStr, '.', static_cast<sal_Char>(0));
|
return rtl::math::stringToDouble(rStr, '.', static_cast<sal_Char>(0));
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,7 @@ namespace psp
|
|||||||
// fills a character buffer with the string representation of a double
|
// fills a character buffer with the string representation of a double
|
||||||
// the buffer has to be long enough (e.g. 128 bytes)
|
// the buffer has to be long enough (e.g. 128 bytes)
|
||||||
// returns the string len
|
// returns the string len
|
||||||
VCL_DLLPUBLIC inline int getValueOfDouble( char* pBuffer, double f, int nPrecision = 0)
|
inline int getValueOfDouble( char* pBuffer, double f, int nPrecision = 0)
|
||||||
{
|
{
|
||||||
OString aStr( rtl::math::doubleToString( f, rtl_math_StringFormat_G, nPrecision, '.', true ) );
|
OString aStr( rtl::math::doubleToString( f, rtl_math_StringFormat_G, nPrecision, '.', true ) );
|
||||||
int nLen = aStr.getLength();
|
int nLen = aStr.getLength();
|
||||||
|
@@ -359,7 +359,7 @@ void ImplFreeEventHookData();
|
|||||||
bool ImplCallPreNotify( NotifyEvent& rEvt );
|
bool ImplCallPreNotify( NotifyEvent& rEvt );
|
||||||
|
|
||||||
extern VCL_PLUGIN_PUBLIC ImplSVData* pImplSVData;
|
extern VCL_PLUGIN_PUBLIC ImplSVData* pImplSVData;
|
||||||
inline VCL_PLUGIN_PUBLIC ImplSVData* ImplGetSVData() { return pImplSVData; }
|
inline ImplSVData* ImplGetSVData() { return pImplSVData; }
|
||||||
VCL_PLUGIN_PUBLIC void ImplHideSplash();
|
VCL_PLUGIN_PUBLIC void ImplHideSplash();
|
||||||
|
|
||||||
bool ImplInitAccessBridge();
|
bool ImplInitAccessBridge();
|
||||||
|
Reference in New Issue
Block a user