switching long to a 64-bit type on 64-bit windows

(*) create a rewriting plugin to do most of the work, heavily
    based on the fakebool plugin
(*) but there are still a number of "long"s in the codebase
    that will need to be done by hand
(*) the plugin needs lots of handholding, due to needing to
    add #include and update macros

Change-Id: I8184d7000ca482c0469514bb73178c3a1123b1e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104203
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel
2020-10-26 07:35:36 +01:00
committed by Noel Grandin
parent 62fa5bb8c1
commit 4fbd638605
284 changed files with 2852 additions and 2272 deletions
+556
View File
@@ -0,0 +1,556 @@
/* -*- 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 <algorithm>
#include <cassert>
#include <limits>
#include <map>
#include <string>
#include <iostream>
#include "clang/AST/Attr.h"
#include "clang/Basic/Builtins.h"
#include "check.hxx"
#include "compat.hxx"
#include "plugin.hxx"
namespace
{
bool isLong(QualType type)
{
type = type.getNonReferenceType();
// ignore sal_Int64
if (type->getAs<TypedefType>())
return false;
// some parts of the STL have ::difference_type => long
if (type->getAs<AutoType>() || type->getAs<DecltypeType>())
return false;
if (type->isSpecificBuiltinType(BuiltinType::Kind::Long))
return true;
auto arrayType = type->getAsArrayTypeUnsafe();
if (arrayType)
return isLong(arrayType->getElementType());
if (type->isPointerType())
return isLong(type->getPointeeType());
return false;
}
enum class OverrideKind
{
NO,
YES,
MAYBE
};
OverrideKind getOverrideKind(FunctionDecl const* decl)
{
CXXMethodDecl const* m = dyn_cast<CXXMethodDecl>(decl);
if (m == nullptr)
return OverrideKind::NO;
if (m->size_overridden_methods() != 0 || m->hasAttr<OverrideAttr>())
return OverrideKind::YES;
if (!dyn_cast<CXXRecordDecl>(m->getDeclContext())->hasAnyDependentBases())
return OverrideKind::NO;
return OverrideKind::MAYBE;
}
class ToolsLong : public loplugin::FilteringRewritePlugin<ToolsLong>
{
public:
explicit ToolsLong(loplugin::InstantiationData const& data)
: loplugin::FilteringRewritePlugin<ToolsLong>(data)
{
}
virtual void run() override;
bool VisitCStyleCastExpr(CStyleCastExpr* expr);
bool VisitCXXStaticCastExpr(CXXStaticCastExpr* expr);
bool VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr* expr);
bool WalkUpFromParmVarDecl(ParmVarDecl const* decl);
bool VisitParmVarDecl(ParmVarDecl const* decl);
bool WalkUpFromVarDecl(VarDecl const* decl);
bool VisitVarDecl(VarDecl const* decl);
bool WalkUpFromFieldDecl(FieldDecl const* decl);
bool VisitFieldDecl(FieldDecl const* decl);
bool WalkUpFromFunctionDecl(FunctionDecl const* decl);
bool VisitFunctionDecl(FunctionDecl const* decl);
private:
bool rewrite(SourceLocation location);
bool isExcludedFile(SourceLocation spellingLocation) const;
/** sort by the reverse of source order, so we can do replacing from the end of the file backwards,
which means we reduce the chances of having overlapping changes. */
template <class T>
std::vector<std::pair<T, bool>> reverseSourceOrder(std::map<T, bool> const& map) const
{
std::vector<std::pair<T, bool>> vec(map.begin(), map.end());
std::sort(vec.begin(), vec.end(),
[&](std::pair<T, bool> const& lhs, std::pair<T, bool> const& rhs) {
return compiler.getSourceManager().getCharacterData(
compat::getBeginLoc(lhs.first))
> compiler.getSourceManager().getCharacterData(
compat::getBeginLoc(rhs.first));
});
return vec;
}
std::map<VarDecl const*, bool> varDecls_;
std::map<FieldDecl const*, bool> fieldDecls_;
std::map<ParmVarDecl const*, bool> parmVarDecls_;
std::map<FunctionDecl const*, bool> functionDecls_;
std::map<CXXStaticCastExpr const*, bool> staticCasts_;
std::map<CXXFunctionalCastExpr const*, bool> functionalCasts_;
};
void ToolsLong::run()
{
if (!compiler.getLangOpts().CPlusPlus)
return;
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
for (auto const& dcl : reverseSourceOrder(varDecls_))
{
auto const decl = dcl.first;
SourceLocation loc{ compat::getBeginLoc(decl) };
TypeSourceInfo* tsi = decl->getTypeSourceInfo();
if (tsi != nullptr)
{
SourceLocation l{ compiler.getSourceManager().getExpansionLoc(
tsi->getTypeLoc().getBeginLoc()) };
SourceLocation end{ compiler.getSourceManager().getExpansionLoc(
tsi->getTypeLoc().getEndLoc()) };
assert(l.isFileID() && end.isFileID());
if (l == end || compiler.getSourceManager().isBeforeInTranslationUnit(l, end))
{
for (;;)
{
unsigned n = Lexer::MeasureTokenLength(l, compiler.getSourceManager(),
compiler.getLangOpts());
std::string s{ compiler.getSourceManager().getCharacterData(l), n };
if (s == "long")
{
loc = l;
break;
}
if (l == end)
{
break;
}
l = l.getLocWithOffset(std::max<unsigned>(n, 1));
}
}
}
if (!rewrite(loc))
{
report(DiagnosticsEngine::Warning, "VarDecl, use \"tools::Long\" instead of %0", loc)
<< decl->getType().getLocalUnqualifiedType() << decl->getSourceRange();
}
}
for (auto const& dcl : reverseSourceOrder(fieldDecls_))
{
auto const decl = dcl.first;
SourceLocation loc{ compat::getBeginLoc(decl) };
TypeSourceInfo* tsi = decl->getTypeSourceInfo();
if (tsi != nullptr)
{
SourceLocation l{ compiler.getSourceManager().getExpansionLoc(
tsi->getTypeLoc().getBeginLoc()) };
SourceLocation end{ compiler.getSourceManager().getExpansionLoc(
tsi->getTypeLoc().getEndLoc()) };
assert(l.isFileID() && end.isFileID());
if (l == end || compiler.getSourceManager().isBeforeInTranslationUnit(l, end))
{
for (;;)
{
unsigned n = Lexer::MeasureTokenLength(l, compiler.getSourceManager(),
compiler.getLangOpts());
std::string s{ compiler.getSourceManager().getCharacterData(l), n };
if (s == "long")
{
loc = l;
break;
}
if (l == end)
{
break;
}
l = l.getLocWithOffset(std::max<unsigned>(n, 1));
}
}
}
if (!rewrite(loc))
{
report(DiagnosticsEngine::Warning, "FieldDecl, use \"tools::Long\" instead of %0", loc)
<< decl->getType().getLocalUnqualifiedType() << decl->getSourceRange();
}
}
for (auto const& dcl : reverseSourceOrder(parmVarDecls_))
{
auto const decl = dcl.first;
SourceLocation loc{ compat::getBeginLoc(decl) };
TypeSourceInfo* tsi = decl->getTypeSourceInfo();
if (tsi != nullptr)
{
SourceLocation l{ compiler.getSourceManager().getExpansionLoc(
tsi->getTypeLoc().getBeginLoc()) };
SourceLocation end{ compiler.getSourceManager().getExpansionLoc(
tsi->getTypeLoc().getEndLoc()) };
assert(l.isFileID() && end.isFileID());
if (l == end || (compiler.getSourceManager().isBeforeInTranslationUnit(l, end)))
{
for (;;)
{
unsigned n = Lexer::MeasureTokenLength(l, compiler.getSourceManager(),
compiler.getLangOpts());
std::string s{ compiler.getSourceManager().getCharacterData(l), n };
if (s == "long")
{
loc = l;
break;
}
if (l == end)
{
break;
}
l = l.getLocWithOffset(std::max<unsigned>(n, 1));
}
}
}
FunctionDecl const* f = dyn_cast_or_null<FunctionDecl>(decl->getDeclContext());
if (f)
f = f->getCanonicalDecl();
OverrideKind k = f ? getOverrideKind(f) : OverrideKind::NO;
if (k == OverrideKind::MAYBE || !rewrite(loc))
{
report(DiagnosticsEngine::Warning,
("ParmVarDecl, use \"tools::Long\" instead of"
" %0%1"),
loc)
<< decl->getType().getNonReferenceType().getLocalUnqualifiedType()
<< (k == OverrideKind::MAYBE ? (" (unless this member function overrides a"
" dependent base member function, even"
" though it is not marked 'override')")
: "")
<< decl->getSourceRange();
}
}
for (auto const& dcl : functionDecls_)
{
auto const decl = dcl.first;
SourceLocation loc{ compat::getBeginLoc(decl) };
SourceLocation l{ compiler.getSourceManager().getExpansionLoc(loc) };
SourceLocation end{ compiler.getSourceManager().getExpansionLoc(
decl->getNameInfo().getLoc()) };
assert(l.isFileID() && end.isFileID());
if (compiler.getSourceManager().isBeforeInTranslationUnit(l, end))
{
while (l != end)
{
unsigned n = Lexer::MeasureTokenLength(l, compiler.getSourceManager(),
compiler.getLangOpts());
std::string s{ compiler.getSourceManager().getCharacterData(l), n };
if (s == "long")
{
loc = l;
break;
}
l = l.getLocWithOffset(std::max<unsigned>(n, 1));
}
}
if (rewrite(loc))
continue;
report(DiagnosticsEngine::Warning, "use \"tools::Long\" instead of %0 as return type%1",
loc)
<< decl->getReturnType().getNonReferenceType().getLocalUnqualifiedType()
<< (getOverrideKind(decl) == OverrideKind::MAYBE
? (" (unless this member function overrides a dependent"
" base member function, even though it is not marked"
" 'override')")
: "")
<< decl->getSourceRange();
}
for (auto const& dcl : staticCasts_)
{
auto const expr = dcl.first;
SourceLocation loc{ compat::getBeginLoc(expr) };
TypeSourceInfo* tsi = expr->getTypeInfoAsWritten();
if (tsi != nullptr)
{
SourceLocation l{ compiler.getSourceManager().getExpansionLoc(
tsi->getTypeLoc().getBeginLoc()) };
SourceLocation end{ compiler.getSourceManager().getExpansionLoc(
tsi->getTypeLoc().getEndLoc()) };
assert(l.isFileID() && end.isFileID());
if (l == end || compiler.getSourceManager().isBeforeInTranslationUnit(l, end))
{
for (;;)
{
unsigned n = Lexer::MeasureTokenLength(l, compiler.getSourceManager(),
compiler.getLangOpts());
std::string s{ compiler.getSourceManager().getCharacterData(l), n };
if (s == "long")
{
loc = l;
break;
}
if (l == end)
{
break;
}
l = l.getLocWithOffset(std::max<unsigned>(n, 1));
}
}
}
if (!rewrite(loc))
{
report(DiagnosticsEngine::Warning, "CXXStaticCastExpr, suspicious cast from %0 to %1",
compat::getBeginLoc(expr))
<< expr->getSubExpr()->IgnoreParenImpCasts()->getType() << expr->getType()
<< expr->getSourceRange();
}
}
for (auto const& dcl : functionalCasts_)
{
auto const expr = dcl.first;
SourceLocation loc{ compat::getBeginLoc(expr) };
TypeSourceInfo* tsi = expr->getTypeInfoAsWritten();
if (tsi != nullptr)
{
SourceLocation l{ compiler.getSourceManager().getExpansionLoc(
tsi->getTypeLoc().getBeginLoc()) };
SourceLocation end{ compiler.getSourceManager().getExpansionLoc(
tsi->getTypeLoc().getEndLoc()) };
assert(l.isFileID() && end.isFileID());
if (l == end || compiler.getSourceManager().isBeforeInTranslationUnit(l, end))
{
for (;;)
{
unsigned n = Lexer::MeasureTokenLength(l, compiler.getSourceManager(),
compiler.getLangOpts());
std::string s{ compiler.getSourceManager().getCharacterData(l), n };
if (s == "long")
{
loc = l;
break;
}
if (l == end)
{
break;
}
l = l.getLocWithOffset(std::max<unsigned>(n, 1));
}
}
}
if (!rewrite(loc))
{
report(DiagnosticsEngine::Warning,
"CXXFunctionalCastExpr, suspicious cast from %0 to %1",
compat::getBeginLoc(expr))
<< expr->getSubExpr()->IgnoreParenImpCasts()->getType() << expr->getType()
<< expr->getSourceRange();
}
}
}
bool ToolsLong::VisitCStyleCastExpr(CStyleCastExpr* expr)
{
if (ignoreLocation(expr))
return true;
if (isExcludedFile(compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(expr))))
return true;
auto const k = isLong(expr->getType());
if (!k)
return true;
SourceLocation loc{ compat::getBeginLoc(expr) };
while (compiler.getSourceManager().isMacroArgExpansion(loc))
loc = compiler.getSourceManager().getImmediateMacroCallerLoc(loc);
report(DiagnosticsEngine::Warning, "CStyleCastExpr, suspicious cast from %0 to %1",
compat::getBeginLoc(expr))
<< expr->getSubExpr()->IgnoreParenImpCasts()->getType() << expr->getType()
<< expr->getSourceRange();
return true;
}
bool ToolsLong::VisitCXXStaticCastExpr(CXXStaticCastExpr* expr)
{
if (ignoreLocation(expr))
return true;
if (isExcludedFile(compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(expr))))
return true;
auto const k = isLong(expr->getType());
if (!k)
return true;
staticCasts_.insert({ expr, k });
return true;
}
bool ToolsLong::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr* expr)
{
if (ignoreLocation(expr))
return true;
if (isExcludedFile(compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(expr))))
return true;
auto const k = isLong(expr->getType());
if (!k)
return true;
functionalCasts_.insert({ expr, k });
return true;
}
bool ToolsLong::WalkUpFromParmVarDecl(ParmVarDecl const* decl) { return VisitParmVarDecl(decl); }
bool ToolsLong::VisitParmVarDecl(ParmVarDecl const* decl)
{
if (ignoreLocation(decl))
return true;
if (isExcludedFile(compiler.getSourceManager().getSpellingLoc(decl->getLocation())))
return true;
auto const fbk = isLong(decl->getType());
if (!fbk)
return true;
FunctionDecl const* f = dyn_cast<FunctionDecl>(decl->getDeclContext());
if (f) // e.g.: typedef sal_Bool (* FuncPtr )( sal_Bool );
{
auto canonicalF = f->getCanonicalDecl();
if (canonicalF->isDeletedAsWritten() && isa<CXXConversionDecl>(canonicalF))
return true;
// Only rewrite declarations in include files if a definition is
// also seen, to avoid compilation of a definition (in a main file
// only processed later) to fail with a "mismatch" error before the
// rewriter had a chance to act upon the definition (but use the
// heuristic of assuming pure virtual functions do not have
// definitions):
bool ok = canonicalF->isDefined() || canonicalF->isPure()
|| compiler.getSourceManager().isInMainFile(
compiler.getSourceManager().getSpellingLoc(f->getNameInfo().getLoc()));
if (!ok)
return true;
}
parmVarDecls_.insert({ decl, fbk });
return true;
}
bool ToolsLong::WalkUpFromVarDecl(VarDecl const* decl) { return VisitVarDecl(decl); }
bool ToolsLong::VisitVarDecl(VarDecl const* decl)
{
if (ignoreLocation(decl))
return true;
if (isExcludedFile(compiler.getSourceManager().getSpellingLoc(decl->getLocation())))
return true;
auto k = isLong(decl->getType());
if (!k)
return true;
varDecls_.insert({ decl, k });
return true;
}
bool ToolsLong::WalkUpFromFieldDecl(FieldDecl const* decl) { return VisitFieldDecl(decl); }
bool ToolsLong::VisitFieldDecl(FieldDecl const* decl)
{
if (ignoreLocation(decl))
return true;
if (isExcludedFile(compiler.getSourceManager().getSpellingLoc(decl->getLocation())))
return true;
auto k = isLong(decl->getType());
if (!k)
return true;
TagDecl const* td = dyn_cast<TagDecl>(decl->getDeclContext());
if (td == nullptr)
{
//TODO: ObjCInterface
return true;
}
fieldDecls_.insert({ decl, k });
return true;
}
bool ToolsLong::WalkUpFromFunctionDecl(FunctionDecl const* decl) { return VisitFunctionDecl(decl); }
bool ToolsLong::VisitFunctionDecl(FunctionDecl const* decl)
{
if (ignoreLocation(decl))
return true;
if (isExcludedFile(compiler.getSourceManager().getSpellingLoc(decl->getLocation())))
return true;
auto const fbk = isLong(decl->getReturnType());
if (!fbk)
return true;
if (decl->isDeletedAsWritten() && isa<CXXConversionDecl>(decl))
return true;
if (decl->isPure() || decl->isDefined()
|| compiler.getSourceManager().isInMainFile(
compiler.getSourceManager().getSpellingLoc(decl->getNameInfo().getLoc())))
{
functionDecls_.insert({ decl, fbk });
}
return true;
}
bool ToolsLong::rewrite(SourceLocation location)
{
if (rewriter != nullptr)
{
SourceLocation loc{ compiler.getSourceManager().getExpansionLoc(location) };
unsigned n
= Lexer::MeasureTokenLength(loc, compiler.getSourceManager(), compiler.getLangOpts());
if (std::string(compiler.getSourceManager().getCharacterData(loc), n) == "long")
{
return replaceText(loc, n, "tools::Long");
}
}
return false;
}
bool ToolsLong::isExcludedFile(SourceLocation spellingLocation) const
{
if (isInUnoIncludeFile(spellingLocation))
return true;
auto f = getFilenameOfLocation(spellingLocation);
return loplugin::hasPathnamePrefix(f, SRCDIR "/include/cppu/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/include/cppuhelper/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/include/registry/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/include/osl/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/include/rtl/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/include/sal/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/include/salhelper/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/include/typelib/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/include/LibreOfficeKit/") // TODO
|| loplugin::hasPathnamePrefix(f, SRCDIR "/bridges/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/codemaker/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/configmgr/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/cppu/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/cppuhelper/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/external/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/libreofficekit/") // TODO
|| loplugin::hasPathnamePrefix(f, SRCDIR "/registry/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/rtl/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/sal/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/salhelper/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/soltools/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/unoidl/")
|| loplugin::hasPathnamePrefix(f, SRCDIR "/workdir/");
}
loplugin::Plugin::Registration<ToolsLong> X("toolslong", true);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@@ -202,7 +202,8 @@ TextSimplePortionPrimitive2D::TextSimplePortionPrimitive2D(
const basegfx::B2DHomMatrix& rNewTransform, const OUString& rText, sal_Int32 nTextPosition,
sal_Int32 nTextLength, const std::vector<double>& rDXArray,
const attribute::FontAttribute& rFontAttribute, const css::lang::Locale& rLocale,
const basegfx::BColor& rFontColor, bool bFilled, long nWidthToFill, const Color& rTextFillColor)
const basegfx::BColor& rFontColor, bool bFilled, tools::Long nWidthToFill,
const Color& rTextFillColor)
: BufferedDecompositionPrimitive2D()
, maTextTransform(rNewTransform)
, maText(rText)
@@ -2331,10 +2331,10 @@ VclMetafileProcessor2D::CreateBufferDevice(const basegfx::B2DRange& rCandidateRa
constexpr double fMaxQuadratPixels = 500000;
basegfx::B2DRange aViewRange(rCandidateRange);
aViewRange.transform(maCurrentTransformation);
rRectLogic = tools::Rectangle(static_cast<long>(std::floor(aViewRange.getMinX())),
static_cast<long>(std::floor(aViewRange.getMinY())),
static_cast<long>(std::ceil(aViewRange.getMaxX())),
static_cast<long>(std::ceil(aViewRange.getMaxY())));
rRectLogic = tools::Rectangle(static_cast<tools::Long>(std::floor(aViewRange.getMinX())),
static_cast<tools::Long>(std::floor(aViewRange.getMinY())),
static_cast<tools::Long>(std::ceil(aViewRange.getMaxX())),
static_cast<tools::Long>(std::ceil(aViewRange.getMaxY())));
const tools::Rectangle aRectPixel(mpOutputDevice->LogicToPixel(rRectLogic));
rSizePixel = aRectPixel.GetSize();
const double fViewVisibleArea(rSizePixel.getWidth() * rSizePixel.getHeight());
@@ -1045,10 +1045,11 @@ void VclPixelProcessor2D::processGlowPrimitive2D(const primitive2d::GlowPrimitiv
bitmapRange.intersect(viewRange);
if (!bitmapRange.isEmpty())
{
const tools::Rectangle aRect(static_cast<long>(std::floor(bitmapRange.getMinX())),
static_cast<long>(std::floor(bitmapRange.getMinY())),
static_cast<long>(std::ceil(bitmapRange.getMaxX())),
static_cast<long>(std::ceil(bitmapRange.getMaxY())));
const tools::Rectangle aRect(
static_cast<tools::Long>(std::floor(bitmapRange.getMinX())),
static_cast<tools::Long>(std::floor(bitmapRange.getMinY())),
static_cast<tools::Long>(std::ceil(bitmapRange.getMaxX())),
static_cast<tools::Long>(std::ceil(bitmapRange.getMaxY())));
BitmapEx bmpEx = mpOutputDevice->GetBitmapEx(aRect.TopLeft(), aRect.GetSize());
mpOutputDevice->SetAntialiasing(aPrevAA);
@@ -1106,10 +1107,11 @@ void VclPixelProcessor2D::processSoftEdgePrimitive2D(
bitmapRange.intersect(viewRange);
if (!bitmapRange.isEmpty())
{
const tools::Rectangle aRect(static_cast<long>(std::floor(bitmapRange.getMinX())),
static_cast<long>(std::floor(bitmapRange.getMinY())),
static_cast<long>(std::ceil(bitmapRange.getMaxX())),
static_cast<long>(std::ceil(bitmapRange.getMaxY())));
const tools::Rectangle aRect(
static_cast<tools::Long>(std::floor(bitmapRange.getMinX())),
static_cast<tools::Long>(std::floor(bitmapRange.getMinY())),
static_cast<tools::Long>(std::ceil(bitmapRange.getMaxX())),
static_cast<tools::Long>(std::ceil(bitmapRange.getMaxY())));
BitmapEx bitmap = mpOutputDevice->GetBitmapEx(aRect.TopLeft(), aRect.GetSize());
AlphaMask aMask = bitmap.GetAlpha();
@@ -1155,10 +1157,10 @@ void VclPixelProcessor2D::processShadowPrimitive2D(const primitive2d::ShadowPrim
process(rCandidate);
const tools::Rectangle aRect(static_cast<long>(std::floor(aRange.getMinX())),
static_cast<long>(std::floor(aRange.getMinY())),
static_cast<long>(std::ceil(aRange.getMaxX())),
static_cast<long>(std::ceil(aRange.getMaxY())));
const tools::Rectangle aRect(static_cast<tools::Long>(std::floor(aRange.getMinX())),
static_cast<tools::Long>(std::floor(aRange.getMinY())),
static_cast<tools::Long>(std::ceil(aRange.getMaxX())),
static_cast<tools::Long>(std::ceil(aRange.getMaxY())));
BitmapEx bitmapEx = mpOutputDevice->GetBitmapEx(aRect.TopLeft(), aRect.GetSize());
@@ -290,7 +290,8 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
sal_Int32 nPos = rTextCandidate.getTextPosition();
sal_Int32 nLen = rTextCandidate.getTextLength();
long* pDXArray = !aTransformedDXArray.empty() ? aTransformedDXArray.data() : nullptr;
tools::Long* pDXArray
= !aTransformedDXArray.empty() ? aTransformedDXArray.data() : nullptr;
if (rTextCandidate.isFilled())
{
@@ -299,12 +300,12 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
rTextCandidate.getTextTransform().decompose(aOldFontScaling, aOldTranslate,
fOldRotate, fOldShearX);
long nWidthToFill = static_cast<long>(
tools::Long nWidthToFill = static_cast<tools::Long>(
rTextCandidate.getWidthToFill() * aFontScaling.getX() / aOldFontScaling.getX());
long nWidth
tools::Long nWidth
= mpOutputDevice->GetTextArray(rTextCandidate.getText(), pDXArray, 0, 1);
long nChars = 2;
tools::Long nChars = 2;
if (nWidth)
nChars = nWidthToFill / nWidth;
+1 -1
View File
@@ -1844,7 +1844,7 @@ namespace wmfemfhelper
{
// prepare DXArray (if used)
std::vector< double > aDXArray;
long* pDXArray = pA->GetDXArray();
tools::Long* pDXArray = pA->GetDXArray();
if(pDXArray)
{
+1 -1
View File
@@ -47,7 +47,7 @@ class CUI_DLLPUBLIC SvxShowText final : public weld::CustomWidgetController
private:
ScopedVclPtr<VirtualDevice> m_xVirDev;
OUString m_sText;
long mnY;
tools::Long mnY;
bool mbCenter;
vcl::Font m_aFont;
@@ -27,6 +27,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <rtl/ustring.hxx>
#include <tools/color.hxx>
#include <tools/long.hxx>
#include <basegfx/color/bcolor.hxx>
#include <com/sun/star/lang/Locale.hpp>
#include <vector>
@@ -119,7 +120,7 @@ private:
bool mbFilled;
// the width to fill
long mnWidthToFill;
tools::Long mnWidthToFill;
/// The fill color of the text
Color maTextFillColor;
@@ -141,7 +142,7 @@ public:
const attribute::FontAttribute& rFontAttribute,
const css::lang::Locale& rLocale,
const basegfx::BColor& rFontColor, bool bFilled = false,
long nWidthToFill = 0,
tools::Long nWidthToFill = 0,
const Color& rTextFillColor = COL_TRANSPARENT);
/** get text outlines as polygons and their according ObjectTransformation. Handles all
@@ -161,7 +162,7 @@ public:
const basegfx::BColor& getFontColor() const { return maFontColor; }
const Color& getTextFillColor() const { return maTextFillColor; }
bool isFilled() const { return mbFilled; }
long getWidthToFill() const { return mnWidthToFill; }
tools::Long getWidthToFill() const { return mnWidthToFill; }
/// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
+2 -2
View File
@@ -165,8 +165,8 @@ protected:
TemplateViewItem *maSelectedItem;
long mnThumbnailWidth;
long mnThumbnailHeight;
tools::Long mnThumbnailWidth;
tools::Long mnThumbnailHeight;
Point maPosition; //store the point of click event
+4 -3
View File
@@ -25,6 +25,7 @@
#include <com/sun/star/uno/Reference.hxx>
#include <rtl/ref.hxx>
#include <svx/svxdllapi.h>
#include <tools/long.hxx>
namespace com::sun::star {
namespace accessibility { class XAccessible; }
@@ -110,7 +111,7 @@ public:
@return
If there are no children a 0 is returned.
*/
long GetChildCount() const throw ();
tools::Long GetChildCount() const throw ();
/** Return the requested accessible child or throw and
IndexOutOfBoundsException if the given index is invalid.
@@ -127,10 +128,10 @@ public:
*/
css::uno::Reference<
css::accessibility::XAccessible>
GetChild (long nIndex);
GetChild (tools::Long nIndex);
/// @throws css::lang::IndexOutOfBoundsException
/// @throws css::uno::RuntimeException
css::uno::Reference< css::drawing::XShape> GetChildShape (long nIndex);
css::uno::Reference< css::drawing::XShape> GetChildShape (tools::Long nIndex);
/** Update the child manager. Take care of a modified set of children
and modified visible area. This method can optimize the update
+1 -1
View File
@@ -31,7 +31,7 @@ public:
virtual std::unique_ptr<sfx2::StylePreviewRenderer> CreateStylePreviewRenderer(
OutputDevice& rOutputDev, SfxStyleSheetBase* pStyle,
long nMaxHeight) override;
tools::Long nMaxHeight) override;
};
} // end namespace svx
+2 -1
View File
@@ -21,6 +21,7 @@
#define INCLUDED_SVX_IACCESSIBLEPARENT_HXX
#include <com/sun/star/uno/Reference.hxx>
#include <tools/long.hxx>
namespace accessibility { class AccessibleControlShape; }
namespace com::sun::star::accessibility { class XAccessible; }
@@ -80,7 +81,7 @@ public:
virtual bool ReplaceChild (
AccessibleShape* pCurrentChild,
const css::uno::Reference< css::drawing::XShape >& _rxShape,
const long _nIndex,
const tools::Long _nIndex,
const AccessibleShapeTreeInfo& _rShapeTreeInfo
) = 0;
//Add this method to support Form Controls
+3 -3
View File
@@ -38,7 +38,7 @@ class SVXCORE_DLLPUBLIC PaletteManager
sal_uInt16 mnNumOfPalettes;
sal_uInt16 mnCurrentPalette;
long mnColorCount;
tools::Long mnColorCount;
svx::ToolboxButtonColorUpdaterBase* mpBtnUpdater;
XColorListRef pColorList;
@@ -62,8 +62,8 @@ public:
OUString GetPaletteName();
OUString GetSelectedPalettePath();
long GetColorCount() const;
long GetRecentColorCount() const;
tools::Long GetColorCount() const;
tools::Long GetRecentColorCount() const;
void AddRecentColor(const Color& rRecentColor, const OUString& rColorName, bool bFront = true);
void SetBtnUpdater(svx::ToolboxButtonColorUpdaterBase* pBtnUpdater);
+3 -2
View File
@@ -24,6 +24,7 @@
#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
#include <tools/long.hxx>
#include <unordered_map>
#include <vector>
@@ -178,7 +179,7 @@ private:
Returns the slot id of the shape with the given service name or
0 when the service name is not known.
*/
SVX_DLLPRIVATE long GetSlotId (const OUString& aServiceName) const;
SVX_DLLPRIVATE tools::Long GetSlotId (const OUString& aServiceName) const;
/** Determine the slot id of the specified shape type. With this id
internal methods can access the associated type descriptor.
@@ -188,7 +189,7 @@ private:
Returns the slot id of the shape with the given service name or
0 when the service name is not known.
*/
SVX_DLLPRIVATE long GetSlotId (const css::uno::Reference<
SVX_DLLPRIVATE tools::Long GetSlotId (const css::uno::Reference<
css::drawing::XShape>& rxShape) const;
};
+4 -4
View File
@@ -129,10 +129,10 @@ protected:
rtl::Reference<svx::SvxShowCharSetAcc> m_xAccessible;
uno::Reference< uno::XComponentContext > mxContext;
long nX;
long nY;
long m_nXGap;
long m_nYGap;
tools::Long nX;
tools::Long nY;
tools::Long m_nXGap;
tools::Long m_nYGap;
bool bDrag;
sal_Int32 nSelectedIndex;
+4 -4
View File
@@ -54,8 +54,8 @@ private:
tools::Rectangle maRect;
bool mbEnabled;
OutputDevice& mrParent;
long mnCenterX;
long mnCenterY;
tools::Long mnCenterX;
tools::Long mnCenterY;
};
/** This control allows to input a rotation angle, visualized by a dial.
@@ -141,8 +141,8 @@ private:
sal_Int32 mnAngle;
sal_Int32 mnInitialAngle;
sal_Int32 mnOldAngle;
long mnCenterX;
long mnCenterY;
tools::Long mnCenterX;
tools::Long mnCenterY;
bool mbNoRot;
explicit DialControl_Impl(OutputDevice& rReference);
+7 -7
View File
@@ -194,16 +194,16 @@ public:
virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override;
a11yrelationset get_accessible_relation_set() const { return GetDrawingArea()->get_accessible_relation_set(); }
static long GetSquares() { return nSquares ; }
long GetWidth() const { return aRectSize.getWidth() ; }
long GetHeight() const { return aRectSize.getHeight() ; }
static tools::Long GetSquares() { return nSquares ; }
tools::Long GetWidth() const { return aRectSize.getWidth() ; }
tools::Long GetHeight() const { return aRectSize.getHeight() ; }
//Device Pixel .
long ShowPosition( const Point &pt);
tools::Long ShowPosition( const Point &pt);
long PointToIndex(const Point &pt) const;
Point IndexToPoint(long nIndex) const ;
long GetFocusPosIndex() const ;
tools::Long PointToIndex(const Point &pt) const;
Point IndexToPoint(tools::Long nIndex) const ;
tools::Long GetFocusPosIndex() const ;
//Keyboard function for key input and focus handling function
virtual bool KeyInput( const KeyEvent& rKEvt ) override;
virtual void GetFocus() override;
+1 -1
View File
@@ -149,7 +149,7 @@ protected:
virtual void Command(const CommandEvent& rEvt) override;
virtual VclPtr<BrowserHeader> imp_CreateHeaderBar(BrowseBox* pParent) override;
virtual long QueryMinimumRowHeight() override;
virtual tools::Long QueryMinimumRowHeight() override;
virtual void RowHeightChanged() override;
virtual void ColumnResized(sal_uInt16 nId) override;
virtual void ColumnMoved(sal_uInt16 nId) override;
+4 -4
View File
@@ -80,10 +80,10 @@ class SAL_WARN_UNUSED SvxFontWorkDialog final : public SfxDockingWindow
OString m_sLastAdjustTbxId;
OString m_sLastShadowTbxId;
long nSaveShadowX;
long nSaveShadowY;
long nSaveShadowAngle;
long nSaveShadowSize;
tools::Long nSaveShadowX;
tools::Long nSaveShadowY;
tools::Long nSaveShadowAngle;
tools::Long nSaveShadowSize;
SvxFontWorkControllerItem* pCtrlItems[CONTROLLER_COUNT];
+16 -16
View File
@@ -207,22 +207,22 @@ public:
/** Sets an additional left width for the merged range that contains (nCol,nRow).
@descr Useful to handle merged ranges that are not completely part of the array.
@precond The merged range must be at the left border of the array. */
void SetAddMergedLeftSize( size_t nCol, size_t nRow, long nAddSize );
void SetAddMergedLeftSize( size_t nCol, size_t nRow, tools::Long nAddSize );
/** Sets an additional right width for the merged range that contains (nCol,nRow).
@descr Useful to handle merged ranges that are not completely part of the array.
@precond The merged range must be at the right border of the array. */
void SetAddMergedRightSize( size_t nCol, size_t nRow, long nAddSize );
void SetAddMergedRightSize( size_t nCol, size_t nRow, tools::Long nAddSize );
/** Sets an additional top height for the merged range that contains (nCol,nRow).
@descr Useful to handle merged ranges that are not completely part of the array.
@precond The merged range must be at the top border of the array. */
void SetAddMergedTopSize( size_t nCol, size_t nRow, long nAddSize );
void SetAddMergedTopSize( size_t nCol, size_t nRow, tools::Long nAddSize );
/** Sets an additional bottom height for the merged range that contains (nCol,nRow).
@descr Useful to handle merged ranges that are not completely part of the array.
@precond The merged range must be at the bottom border of the array. */
void SetAddMergedBottomSize( size_t nCol, size_t nRow, long nAddSize );
void SetAddMergedBottomSize( size_t nCol, size_t nRow, tools::Long nAddSize );
/** Returns true, if the cell (nCol,nRow) is part of a merged range. */
bool IsMerged( size_t nCol, size_t nRow ) const;
@@ -250,44 +250,44 @@ public:
// cell coordinates
/** Sets the X output coordinate of the left column. */
void SetXOffset( long nXOffset );
void SetXOffset( tools::Long nXOffset );
/** Sets the Y output coordinate of the top row. */
void SetYOffset( long nYOffset );
void SetYOffset( tools::Long nYOffset );
/** Sets the output width of the specified column. */
void SetColWidth( size_t nCol, long nWidth );
void SetColWidth( size_t nCol, tools::Long nWidth );
/** Sets the output height of the specified row. */
void SetRowHeight( size_t nRow, long nHeight );
void SetRowHeight( size_t nRow, tools::Long nHeight );
/** Sets the same output width for all columns. */
void SetAllColWidths( long nWidth );
void SetAllColWidths( tools::Long nWidth );
/** Sets the same output height for all rows. */
void SetAllRowHeights( long nHeight );
void SetAllRowHeights( tools::Long nHeight );
/** Returns the X output coordinate of the left border of the specified column.
@descr The column index <array-width> returns the X output coordinate
of the right array border. */
long GetColPosition( size_t nCol ) const;
tools::Long GetColPosition( size_t nCol ) const;
/** Returns the Y output coordinate of the top border of the specified row.
@descr The row index <array-height> returns the Y output coordinate
of the bottom array border. */
long GetRowPosition( size_t nRow ) const;
tools::Long GetRowPosition( size_t nRow ) const;
/** Returns the output width of the specified range of columns. */
long GetColWidth( size_t nFirstCol, size_t nLastCol ) const;
tools::Long GetColWidth( size_t nFirstCol, size_t nLastCol ) const;
/** Returns the output height of the specified range of rows. */
long GetRowHeight( size_t nFirstRow, size_t nLastRow ) const;
tools::Long GetRowHeight( size_t nFirstRow, size_t nLastRow ) const;
/** Returns the output width of the entire array. */
long GetWidth() const;
tools::Long GetWidth() const;
/** Returns the output height of the entire array. */
long GetHeight() const;
tools::Long GetHeight() const;
/** Returns the output range of the cell (nCol,nRow).
Returns total output range of merged ranges, if bExpandMerged is true. */
+2 -2
View File
@@ -121,7 +121,7 @@ public:
/** Returns true, if all visible frame borders have equal widths.
@descr Ignores hidden and "don't care" frame borders. On success,
returns the width in the passed parameter. */
bool GetVisibleWidth( long& rnWidth, SvxBorderLineStyle& rnStyle ) const;
bool GetVisibleWidth( tools::Long& rnWidth, SvxBorderLineStyle& rnStyle ) const;
/** Returns true, if all visible frame borders have equal color.
@descr Ignores hidden and "don't care" frame borders. On success,
returns the color in the passed parameter. */
@@ -149,7 +149,7 @@ public:
void SelectAllVisibleBorders();
/** Sets the passed line widths to all selected frame borders (in twips). */
void SetStyleToSelection( long nWidth, SvxBorderLineStyle nStyle );
void SetStyleToSelection( tools::Long nWidth, SvxBorderLineStyle nStyle );
/** Sets the passed color to all selected frame borders. */
void SetColorToSelection( const Color& rColor );
+17 -17
View File
@@ -295,7 +295,7 @@ private:
// (with respect to the data source capabilities)
// defaults to (insert | update | delete)
sal_uInt16 m_nLastColId;
long m_nLastRowId;
tools::Long m_nLastRowId;
bool m_bDesignMode : 1; // default = sal_False
bool m_bRecordCountFinal : 1;
@@ -312,14 +312,14 @@ protected:
bool m_bUpdating : 1; // are any updates being executed right now?
protected:
virtual bool SeekRow(long nRow) override;
virtual void VisibleRowsChanged( long nNewTopRow, sal_uInt16 nNumRows) override;
virtual bool SeekRow(tools::Long nRow) override;
virtual void VisibleRowsChanged( tools::Long nNewTopRow, sal_uInt16 nNumRows) override;
virtual void PaintCell(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId) const override;
virtual RowStatus GetRowStatus(long nRow) const override;
virtual bool CursorMoving(long nNewRow, sal_uInt16 nNewCol) override;
virtual RowStatus GetRowStatus(tools::Long nRow) const override;
virtual bool CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol) override;
virtual void CursorMoved() override;
virtual void ArrangeControls(sal_uInt16& nX, sal_uInt16 nY) override;
virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId) override;
virtual sal_uInt32 GetTotalCellWidth(tools::Long nRow, sal_uInt16 nColId) override;
virtual void Command(const CommandEvent& rEvt) override;
virtual bool PreNotify(NotifyEvent& rEvt) override;
virtual void KeyInput(const KeyEvent& rEvt) override;
@@ -327,7 +327,7 @@ protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
virtual void Select() override;
virtual ::svt::CellController* GetController(long nRow, sal_uInt16 nCol) override;
virtual ::svt::CellController* GetController(tools::Long nRow, sal_uInt16 nCol) override;
virtual void CellModified() override;
virtual bool SaveModified() override;
@@ -374,7 +374,7 @@ protected:
// DragSourceHelper overridables
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override;
void executeRowContextMenu( long _nRow, const Point& _rPreferredPos );
void executeRowContextMenu( tools::Long _nRow, const Point& _rPreferredPos );
public:
DbGridControl(
@@ -397,7 +397,7 @@ public:
@return
the text out of the cell
*/
virtual OUString GetCellText(long _nRow, sal_uInt16 _nColId) const override;
virtual OUString GetCellText(tools::Long _nRow, sal_uInt16 _nColId) const override;
void RemoveRows(bool bNewCursor);
@@ -437,7 +437,7 @@ public:
void SetFilterMode(bool bMode);
bool IsFilterMode() const {return m_bFilterMode;}
bool IsFilterRow(long nRow) const {return m_bFilterMode && nRow == 0;}
bool IsFilterRow(tools::Long nRow) const {return m_bFilterMode && nRow == 0;}
void EnableNavigationBar(bool bEnable);
bool HasNavigationBar() const {return m_bNavigationBar;}
@@ -472,9 +472,9 @@ public:
// is the current line being updated
bool IsUpdating() const {return m_bUpdating;}
void RowRemoved( long nRow, long nNumRows = 1, bool bDoPaint = true );
void RowInserted( long nRow, long nNumRows = 1, bool bDoPaint = true );
void RowModified( long nRow );
void RowRemoved( tools::Long nRow, tools::Long nNumRows = 1, bool bDoPaint = true );
void RowInserted( tools::Long nRow, tools::Long nNumRows = 1, bool bDoPaint = true );
void RowModified( tools::Long nRow );
void resetCurrentRow();
@@ -560,12 +560,12 @@ public:
CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId ) override;
protected:
void RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor);
bool SeekCursor(long nRow, bool bAbsolute = false);
void RecalcRows(tools::Long nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor);
bool SeekCursor(tools::Long nRow, bool bAbsolute = false);
void RemoveColumns(); // cleaning of own structures
void AdjustRows();
sal_Int32 AlignSeekCursor();
bool SetCurrent(long nNewRow);
bool SetCurrent(tools::Long nNewRow);
OUString GetCurrentRowCellText(DbGridColumn const * pCol,const DbGridRowRef& _rRow) const;
virtual void DeleteSelectedRows();
@@ -575,7 +575,7 @@ protected:
bool IsCurrentAppending() const;
// empty row for insertion
bool IsInsertionRow(long nRow) const;
bool IsInsertionRow(tools::Long nRow) const;
void SetSeekPos(sal_Int32 nPos) {m_nSeekPos = nPos;}
sal_Int32 GetCurrentPos() const {return m_nCurrentPos;}
+3 -3
View File
@@ -41,10 +41,10 @@ class SVX_DLLPUBLIC NumSettings_Impl
SvxNumType nNumberType;
short nParentNumbering;
SvxNumberFormat::LabelFollowedBy eLabelFollowedBy;
long nTabValue;
tools::Long nTabValue;
SvxAdjust eNumAlign;
long nNumAlignAt;
long nNumIndentAt;
tools::Long nNumAlignAt;
tools::Long nNumIndentAt;
OUString sPrefix;
OUString sSuffix;
OUString sBulletChar;
+1 -1
View File
@@ -116,7 +116,7 @@ public:
// which is vertical to the screen, plus a shift of the scene.
// This means that also the scene (E3dScene) must define this
// routine as virtual in its class.
virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
// get wireframe polygon for local object. No transform is applied.
basegfx::B3DPolyPolygon CreateWireframe() const;
+36 -36
View File
@@ -32,24 +32,24 @@ private:
Size aWinSize;
Size aSize;
long nTop;
long nBottom;
long nLeft;
long nRight;
tools::Long nTop;
tools::Long nBottom;
tools::Long nLeft;
tools::Long nRight;
bool bResetBackground;
bool bFrameDirection;
SvxFrameDirection nFrameDirection;
long nHdLeft;
long nHdRight;
long nHdDist;
long nHdHeight;
tools::Long nHdLeft;
tools::Long nHdRight;
tools::Long nHdDist;
tools::Long nHdHeight;
long nFtLeft;
long nFtRight;
long nFtDist;
long nFtHeight;
tools::Long nFtLeft;
tools::Long nFtRight;
tools::Long nFtDist;
tools::Long nFtHeight;
drawinglayer::attribute::SdrAllFillAttributesHelperPtr maHeaderFillAttributes;
drawinglayer::attribute::SdrAllFillAttributesHelperPtr maFooterFillAttributes;
@@ -103,35 +103,35 @@ public:
return aSize;
}
void SetTop(long nNew) { nTop = nNew; }
void SetBottom(long nNew) { nBottom = nNew; }
void SetLeft(long nNew) { nLeft = nNew; }
void SetRight(long nNew) { nRight = nNew; }
void SetTop(tools::Long nNew) { nTop = nNew; }
void SetBottom(tools::Long nNew) { nBottom = nNew; }
void SetLeft(tools::Long nNew) { nLeft = nNew; }
void SetRight(tools::Long nNew) { nRight = nNew; }
long GetTop() const { return nTop; }
long GetBottom() const { return nBottom; }
long GetLeft() const { return nLeft; }
long GetRight() const { return nRight; }
tools::Long GetTop() const { return nTop; }
tools::Long GetBottom() const { return nBottom; }
tools::Long GetLeft() const { return nLeft; }
tools::Long GetRight() const { return nRight; }
void SetHdLeft(long nNew) { nHdLeft = nNew; }
void SetHdRight(long nNew) { nHdRight = nNew; }
void SetHdDist(long nNew) { nHdDist = nNew; }
void SetHdHeight(long nNew) { nHdHeight = nNew; }
void SetHdLeft(tools::Long nNew) { nHdLeft = nNew; }
void SetHdRight(tools::Long nNew) { nHdRight = nNew; }
void SetHdDist(tools::Long nNew) { nHdDist = nNew; }
void SetHdHeight(tools::Long nNew) { nHdHeight = nNew; }
long GetHdLeft() const { return nHdLeft; }
long GetHdRight() const { return nHdRight; }
long GetHdDist() const { return nHdDist; }
long GetHdHeight() const { return nHdHeight; }
tools::Long GetHdLeft() const { return nHdLeft; }
tools::Long GetHdRight() const { return nHdRight; }
tools::Long GetHdDist() const { return nHdDist; }
tools::Long GetHdHeight() const { return nHdHeight; }
void SetFtLeft(long nNew) { nFtLeft = nNew; }
void SetFtRight(long nNew) { nFtRight = nNew; }
void SetFtDist(long nNew) { nFtDist = nNew; }
void SetFtHeight(long nNew) { nFtHeight = nNew; }
void SetFtLeft(tools::Long nNew) { nFtLeft = nNew; }
void SetFtRight(tools::Long nNew) { nFtRight = nNew; }
void SetFtDist(tools::Long nNew) { nFtDist = nNew; }
void SetFtHeight(tools::Long nNew) { nFtHeight = nNew; }
long GetFtLeft() const { return nFtLeft; }
long GetFtRight() const { return nFtRight; }
long GetFtDist() const { return nFtDist; }
long GetFtHeight() const { return nFtHeight; }
tools::Long GetFtLeft() const { return nFtLeft; }
tools::Long GetFtRight() const { return nFtRight; }
tools::Long GetFtDist() const { return nFtDist; }
tools::Long GetFtHeight() const { return nFtHeight; }
void SetUsage(SvxPageUsage eU) { eUsage = eU; }
SvxPageUsage GetUsage() const { return eUsage; }
+4 -4
View File
@@ -39,8 +39,8 @@ class SVX_DLLPUBLIC SvxParaPrevWindow final : public weld::CustomWidgetControlle
Size aSize;
// indentation
long nLeftMargin;
long nRightMargin;
tools::Long nLeftMargin;
tools::Long nRightMargin;
short nFirstLineOffset;
// distances
sal_uInt16 nUpper;
@@ -63,11 +63,11 @@ public:
{
nFirstLineOffset = nNew;
}
void SetLeftMargin( long nNew )
void SetLeftMargin( tools::Long nNew )
{
nLeftMargin = nNew;
}
void SetRightMargin( long nNew )
void SetRightMargin( tools::Long nNew )
{
nRightMargin = nNew;
}
+1 -1
View File
@@ -29,7 +29,7 @@ class SVX_DLLPUBLIC SvxPosSizeStatusBarControl final : public SfxStatusBarContro
{
private:
std::unique_ptr<SvxPosSizeStatusBarControl_Impl> pImpl;
SVX_DLLPRIVATE OUString GetMetricStr_Impl( long nVal );
SVX_DLLPRIVATE OUString GetMetricStr_Impl( tools::Long nVal );
public:
SFX_DECL_STATUSBAR_CONTROL();
+4 -4
View File
@@ -57,8 +57,8 @@ class SvxRubyDialog : public SfxModelessDialogController
friend class RubyPreview;
long nLastPos;
long nCurrentEdit;
tools::Long nLastPos;
tools::Long nCurrentEdit;
bool bModified;
SfxBindings* pBindings;
rtl::Reference<SvxRubyData_Impl> m_pImpl;
@@ -117,8 +117,8 @@ class SvxRubyDialog : public SfxModelessDialogController
void Update();
virtual void Close() override;
long GetLastPos() const {return nLastPos;}
void SetLastPos(long nSet) {nLastPos = nSet;}
tools::Long GetLastPos() const {return nLastPos;}
void SetLastPos(tools::Long nSet) {nLastPos = nSet;}
bool IsModified() const {return bModified;}
void SetModified(bool bSet) {bModified = bSet;}
+43 -43
View File
@@ -101,16 +101,16 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
bool bAppSetNullOffset :1;
bool bHorz :1;
long lLogicNullOffset; // in logic coordinates
long lAppNullOffset; // in logic coordinates
long lInitialDragPos;
tools::Long lLogicNullOffset; // in logic coordinates
tools::Long lAppNullOffset; // in logic coordinates
tools::Long lInitialDragPos;
SvxRulerSupportFlags nFlags;
SvxRulerDragFlags nDragType;
sal_uInt16 nDefTabType;
sal_uInt16 nTabCount;
sal_uInt16 nTabBufSize;
long lDefTabDist;
long lTabPos;
tools::Long lDefTabDist;
tools::Long lTabPos;
std::vector<RulerTab> mpTabs; // tab positions in pixel
std::vector<RulerIndent> mpIndents; // paragraph margins in pixel
@@ -118,9 +118,9 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
std::vector<RulerBorder> mpObjectBorders;
SfxBindings* pBindings;
long nDragOffset;
long nMaxLeft;
long nMaxRight;
tools::Long nDragOffset;
tools::Long nMaxLeft;
tools::Long nMaxRight;
bool bValid;
bool bListening;
bool bActive;
@@ -129,8 +129,8 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
bool mbSnapping;
void StartListening_Impl();
long GetCorrectedDragPos(bool bLeft = true, bool bRight = true );
void DrawLine_Impl(long &lTabPos, int, bool Horizontal);
tools::Long GetCorrectedDragPos(bool bLeft = true, bool bRight = true );
void DrawLine_Impl(tools::Long &lTabPos, int, bool Horizontal);
sal_uInt16 GetObjectBordersOff(sal_uInt16 nIdx) const;
// page borders or surrounding frame
@@ -162,44 +162,44 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
void UpdateObject();
// Convert position to stick to ruler ticks
long MakePositionSticky(long rValue, long aPointOfReference, bool aSnapToFrameMargin = true) const;
tools::Long MakePositionSticky(tools::Long rValue, tools::Long aPointOfReference, bool aSnapToFrameMargin = true) const;
long PixelHAdjust(long lPos, long lPos2) const;
long PixelVAdjust(long lPos, long lPos2) const;
long PixelAdjust(long lPos, long lPos2) const;
tools::Long PixelHAdjust(tools::Long lPos, tools::Long lPos2) const;
tools::Long PixelVAdjust(tools::Long lPos, tools::Long lPos2) const;
tools::Long PixelAdjust(tools::Long lPos, tools::Long lPos2) const;
long ConvertHPosPixel(long lPos) const;
long ConvertVPosPixel(long lPos) const;
long ConvertHSizePixel(long lSize) const;
long ConvertVSizePixel(long lSize) const;
tools::Long ConvertHPosPixel(tools::Long lPos) const;
tools::Long ConvertVPosPixel(tools::Long lPos) const;
tools::Long ConvertHSizePixel(tools::Long lSize) const;
tools::Long ConvertVSizePixel(tools::Long lSize) const;
long ConvertPosPixel(long lPos) const;
long ConvertSizePixel(long lSize) const;
tools::Long ConvertPosPixel(tools::Long lPos) const;
tools::Long ConvertSizePixel(tools::Long lSize) const;
long ConvertHPosLogic(long lPos) const;
long ConvertVPosLogic(long lPos) const;
long ConvertHSizeLogic(long lSize) const;
long ConvertVSizeLogic(long lSize) const;
tools::Long ConvertHPosLogic(tools::Long lPos) const;
tools::Long ConvertVPosLogic(tools::Long lPos) const;
tools::Long ConvertHSizeLogic(tools::Long lSize) const;
tools::Long ConvertVSizeLogic(tools::Long lSize) const;
long ConvertPosLogic(long lPos) const;
long ConvertSizeLogic(long lSize) const;
tools::Long ConvertPosLogic(tools::Long lPos) const;
tools::Long ConvertSizeLogic(tools::Long lSize) const;
long RoundToCurrentMapMode(long lValue) const;
tools::Long RoundToCurrentMapMode(tools::Long lValue) const;
long GetFirstLineIndent() const;
long GetLeftIndent() const;
long GetRightIndent() const;
long GetLogicRightIndent() const;
tools::Long GetFirstLineIndent() const;
tools::Long GetLeftIndent() const;
tools::Long GetRightIndent() const;
tools::Long GetLogicRightIndent() const;
long GetLeftFrameMargin() const;
long GetRightFrameMargin() const;
tools::Long GetLeftFrameMargin() const;
tools::Long GetRightFrameMargin() const;
void CalcMinMax();
void EvalModifier();
void DragMargin1();
//adjust the left margin either after DragMargin1() or after DragBorders()
void AdjustMargin1(long lDiff);
void AdjustMargin1(tools::Long lDiff);
void DragMargin2();
void DragIndents();
void DragTabs();
@@ -212,10 +212,10 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
void ApplyBorders();
void ApplyObject();
long GetFrameLeft() const;
tools::Long GetFrameLeft() const;
long GetLeftMin() const;
long GetRightMax() const;
tools::Long GetLeftMin() const;
tools::Long GetRightMax() const;
DECL_LINK( TabMenuSelect, Menu *, bool );
DECL_LINK( MenuSelect, Menu *, bool );
@@ -226,7 +226,7 @@ class SVX_DLLPUBLIC SvxRuler: public Ruler, public SfxListener
MoveLeft,
MoveRight
};
void UpdateParaContents_Impl(long lDiff, UpdateType);
void UpdateParaContents_Impl(tools::Long lDiff, UpdateType);
protected:
virtual void Command( const CommandEvent& rCEvt ) override;
@@ -253,7 +253,7 @@ protected:
sal_uInt16 GetActRightColumn (
bool bForceDontConsiderHidden = false,
sal_uInt16 nAct=USHRT_MAX ) const;
long CalcPropMaxRight(sal_uInt16 nCol = USHRT_MAX) const;
tools::Long CalcPropMaxRight(sal_uInt16 nCol = USHRT_MAX) const;
public:
@@ -262,10 +262,10 @@ public:
virtual ~SvxRuler() override;
virtual void dispose() override;
void SetDefTabDist(long);
void SetDefTabDist(tools::Long);
// set/get NullOffset in logic units
void SetNullOffsetLogic(long lOff);
void SetNullOffsetLogic(tools::Long lOff);
void SetActive(bool bOn = true);
@@ -276,8 +276,8 @@ public:
//#i24363# tab stops relative to indent
void SetTabsRelativeToIndent( bool bRel );
void SetValues(RulerChangeType type, long value);
long GetPageWidth() const;
void SetValues(RulerChangeType type, tools::Long value);
tools::Long GetPageWidth() const;
};
#endif
+47 -47
View File
@@ -26,8 +26,8 @@
class SVX_DLLPUBLIC SvxLongLRSpaceItem final : public SfxPoolItem
{
long mlLeft; // nLeft or the negative first-line indentation
long mlRight; // the unproblematic right edge
tools::Long mlLeft; // nLeft or the negative first-line indentation
tools::Long mlRight; // the unproblematic right edge
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
@@ -44,19 +44,19 @@ class SVX_DLLPUBLIC SvxLongLRSpaceItem final : public SfxPoolItem
public:
static SfxPoolItem* CreateDefault();
SvxLongLRSpaceItem(long lLeft, long lRight, sal_uInt16 nId);
SvxLongLRSpaceItem(tools::Long lLeft, tools::Long lRight, sal_uInt16 nId);
SvxLongLRSpaceItem();
long GetLeft() const { return mlLeft;}
long GetRight() const { return mlRight;}
void SetLeft(long lArgLeft);
void SetRight(long lArgRight);
tools::Long GetLeft() const { return mlLeft;}
tools::Long GetRight() const { return mlRight;}
void SetLeft(tools::Long lArgLeft);
void SetRight(tools::Long lArgRight);
};
class SVX_DLLPUBLIC SvxLongULSpaceItem final : public SfxPoolItem
{
long mlLeft; // nLeft or the negative first-line indentation
long mlRight; // the unproblematic right edge
tools::Long mlLeft; // nLeft or the negative first-line indentation
tools::Long mlRight; // the unproblematic right edge
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
@@ -73,20 +73,20 @@ class SVX_DLLPUBLIC SvxLongULSpaceItem final : public SfxPoolItem
public:
static SfxPoolItem* CreateDefault();
SvxLongULSpaceItem(long lUpper, long lLower, sal_uInt16 nId);
SvxLongULSpaceItem(tools::Long lUpper, tools::Long lLower, sal_uInt16 nId);
SvxLongULSpaceItem();
long GetUpper() const { return mlLeft;}
long GetLower() const { return mlRight;}
void SetUpper(long lArgLeft);
void SetLower(long lArgRight);
tools::Long GetUpper() const { return mlLeft;}
tools::Long GetLower() const { return mlRight;}
void SetUpper(tools::Long lArgLeft);
void SetLower(tools::Long lArgRight);
};
class SVX_DLLPUBLIC SvxPagePosSizeItem final : public SfxPoolItem
{
Point aPos;
long lWidth;
long lHeight;
tools::Long lWidth;
tools::Long lHeight;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
@@ -103,31 +103,31 @@ private:
const SvxPagePosSizeItem& operator=(const SvxPagePosSizeItem &) = delete;
public:
static SfxPoolItem* CreateDefault();
SvxPagePosSizeItem(const Point &rPos, long lWidth, long lHeight);
SvxPagePosSizeItem(const Point &rPos, tools::Long lWidth, tools::Long lHeight);
SvxPagePosSizeItem();
const Point &GetPos() const { return aPos; }
long GetWidth() const { return lWidth; }
long GetHeight() const { return lHeight; }
tools::Long GetWidth() const { return lWidth; }
tools::Long GetHeight() const { return lHeight; }
};
struct SVX_DLLPUBLIC SvxColumnDescription
{
long nStart; /* Start of the column */
long nEnd; /* End of the column */
tools::Long nStart; /* Start of the column */
tools::Long nEnd; /* End of the column */
bool bVisible; /* Visibility */
long nEndMin; //min. possible position of end
long nEndMax; //max. possible position of end
tools::Long nEndMin; //min. possible position of end
tools::Long nEndMax; //max. possible position of end
SvxColumnDescription(long start, long end, bool bVis);
SvxColumnDescription(tools::Long start, tools::Long end, bool bVis);
SvxColumnDescription(long start, long end,
long endMin, long endMax, bool bVis);
SvxColumnDescription(tools::Long start, tools::Long end,
tools::Long endMin, tools::Long endMax, bool bVis);
bool operator==(const SvxColumnDescription &rCmp) const;
bool operator!=(const SvxColumnDescription &rCmp) const;
long GetWidth() const;
tools::Long GetWidth() const;
};
template<typename charT, typename traits>
@@ -144,8 +144,8 @@ class SVX_DLLPUBLIC SvxColumnItem final : public SfxPoolItem
{
std::vector<SvxColumnDescription> aColumns; // Column array
long nLeft; // Left edge for the table
long nRight; // Right edge for the table; for columns always
tools::Long nLeft; // Left edge for the table
tools::Long nRight; // Right edge for the table; for columns always
// equal to the surrounding frame
sal_uInt16 nActColumn; // the current column
bool bTable; // table?
@@ -177,13 +177,13 @@ public:
sal_uInt16 Count() const;
void Append(const SvxColumnDescription& rDesc);
void SetLeft(long aLeft);
void SetRight(long aRight);
void SetLeft(tools::Long aLeft);
void SetRight(tools::Long aRight);
sal_uInt16 GetActColumn() const { return nActColumn;}
bool IsFirstAct() const;
bool IsLastAct() const;
long GetLeft() const { return nLeft;}
long GetRight() const { return nRight;}
tools::Long GetLeft() const { return nLeft;}
tools::Long GetRight() const { return nRight;}
bool IsTable() const { return bTable;}
bool CalcOrtho() const;
void SetOrtho(bool bVal);
@@ -192,10 +192,10 @@ public:
class SVX_DLLPUBLIC SvxObjectItem final : public SfxPoolItem
{
long nStartX; /* Start in x direction */
long nEndX; /* End in x direction */
long nStartY; /* Start in y direction */
long nEndY; /* End in y direction */
tools::Long nStartX; /* Start in x direction */
tools::Long nEndX; /* End in x direction */
tools::Long nStartY; /* Start in y direction */
tools::Long nEndY; /* End in y direction */
bool bLimits; /* boundary limit control by the application */
virtual bool operator==( const SfxPoolItem& ) const override;
@@ -213,18 +213,18 @@ class SVX_DLLPUBLIC SvxObjectItem final : public SfxPoolItem
public:
static SfxPoolItem* CreateDefault();
SvxObjectItem(long nStartX, long nEndX,
long nStartY, long nEndY);
SvxObjectItem(tools::Long nStartX, tools::Long nEndX,
tools::Long nStartY, tools::Long nEndY);
long GetStartX() const { return nStartX;}
long GetEndX() const { return nEndX;}
long GetStartY() const { return nStartY;}
long GetEndY() const { return nEndY;}
tools::Long GetStartX() const { return nStartX;}
tools::Long GetEndX() const { return nEndX;}
tools::Long GetStartY() const { return nStartY;}
tools::Long GetEndY() const { return nEndY;}
void SetStartX(long lValue);
void SetEndX(long lValue);
void SetStartY(long lValue);
void SetEndY(long lValue);
void SetStartX(tools::Long lValue);
void SetEndX(tools::Long lValue);
void SetStartY(tools::Long lValue);
void SetEndY(tools::Long lValue);
};
#endif
+1 -1
View File
@@ -137,7 +137,7 @@ public:
virtual void NbcSetTransform(const basegfx::B3DHomMatrix& rMatrix) override;
virtual void SetTransform(const basegfx::B3DHomMatrix& rMatrix) override;
virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
void RotateScene(const Point& rRef, double sn, double cs);
// TakeObjName...() is for the display in the UI, for example "3 frames selected".
+1 -1
View File
@@ -22,7 +22,7 @@
#include <svx/sdmetitm.hxx>
#include <svx/svddef.hxx>
inline SdrMetricItem makeSdrEckenradiusItem(long nRadius) {
inline SdrMetricItem makeSdrEckenradiusItem(tools::Long nRadius) {
return SdrMetricItem(SDRATTR_ECKENRADIUS, nRadius);
}
+1 -1
View File
@@ -32,7 +32,7 @@ public:
SdrMetricItem(sal_uInt16 nId, sal_Int32 nVal): SfxInt32Item(nId,nVal) {}
virtual SdrMetricItem* Clone(SfxItemPool* pPool=nullptr) const override;
virtual bool HasMetrics() const override;
virtual void ScaleMetrics(long nMul, long nDiv) override;
virtual void ScaleMetrics(tools::Long nMul, tools::Long nDiv) override;
virtual bool GetPresentation(SfxItemPresentation ePres,
MapUnit eCoreMetric,
+2 -2
View File
@@ -22,11 +22,11 @@
#include <svx/sdmetitm.hxx>
#include <svx/svddef.hxx>
inline SdrMetricItem makeSdrShadowXDistItem(long nDist) {
inline SdrMetricItem makeSdrShadowXDistItem(tools::Long nDist) {
return SdrMetricItem(SDRATTR_SHADOWXDIST, nDist);
}
inline SdrMetricItem makeSdrShadowYDistItem(long nDist) {
inline SdrMetricItem makeSdrShadowYDistItem(tools::Long nDist) {
return SdrMetricItem(SDRATTR_SHADOWYDIST, nDist);
}
+1 -1
View File
@@ -28,7 +28,7 @@ public:
SdrTextAniAmountItem(sal_Int16 nVal=0): SfxInt16Item(SDRATTR_TEXT_ANIAMOUNT,nVal) {}
virtual SdrTextAniAmountItem* Clone(SfxItemPool* pPool=nullptr) const override;
virtual bool HasMetrics() const override;
virtual void ScaleMetrics(long nMul, long nDiv) override;
virtual void ScaleMetrics(tools::Long nMul, tools::Long nDiv) override;
virtual bool GetPresentation(SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, OUString& rText, const IntlWrapper&) const override;
};
+4 -4
View File
@@ -22,19 +22,19 @@
#include <svx/sdmetitm.hxx>
#include <svx/svddef.hxx>
inline SdrMetricItem makeSdrTextLeftDistItem(long mnHeight) {
inline SdrMetricItem makeSdrTextLeftDistItem(tools::Long mnHeight) {
return SdrMetricItem(SDRATTR_TEXT_LEFTDIST, mnHeight);
}
inline SdrMetricItem makeSdrTextRightDistItem(long mnHeight) {
inline SdrMetricItem makeSdrTextRightDistItem(tools::Long mnHeight) {
return SdrMetricItem(SDRATTR_TEXT_RIGHTDIST, mnHeight);
}
inline SdrMetricItem makeSdrTextUpperDistItem(long mnHeight) {
inline SdrMetricItem makeSdrTextUpperDistItem(tools::Long mnHeight) {
return SdrMetricItem(SDRATTR_TEXT_UPPERDIST, mnHeight);
}
inline SdrMetricItem makeSdrTextLowerDistItem(long mnHeight) {
inline SdrMetricItem makeSdrTextLowerDistItem(tools::Long mnHeight) {
return SdrMetricItem(SDRATTR_TEXT_LOWERDIST, mnHeight);
}
+4 -4
View File
@@ -22,19 +22,19 @@
#include <svx/sdmetitm.hxx>
#include <svx/svddef.hxx>
inline SdrMetricItem makeSdrTextMinFrameHeightItem(long mnHeight) {
inline SdrMetricItem makeSdrTextMinFrameHeightItem(tools::Long mnHeight) {
return SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT, mnHeight);
}
inline SdrMetricItem makeSdrTextMaxFrameHeightItem(long mnHeight) {
inline SdrMetricItem makeSdrTextMaxFrameHeightItem(tools::Long mnHeight) {
return SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT, mnHeight);
}
inline SdrMetricItem makeSdrTextMinFrameWidthItem(long mnWidth) {
inline SdrMetricItem makeSdrTextMinFrameWidthItem(tools::Long mnWidth) {
return SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH, mnWidth);
};
inline SdrMetricItem makeSdrTextMaxFrameWidthItem(long mnWidth) {
inline SdrMetricItem makeSdrTextMaxFrameWidthItem(tools::Long mnWidth) {
return SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH, mnWidth);
}
@@ -49,7 +49,7 @@ public:
virtual ~LinePropertyPanelBase() override;
virtual void dispose() override;
void SetWidth(long nWidth);
void SetWidth(tools::Long nWidth);
void SetWidthIcon(int n);
void SetWidthIcon();
+2 -2
View File
@@ -38,7 +38,7 @@ public:
LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rParent);
~LineWidthPopup();
void SetWidthSelect (long lValue, bool bValuable, MapUnit eMapUnit);
void SetWidthSelect (tools::Long lValue, bool bValuable, MapUnit eMapUnit);
weld::Container* getTopLevel() const { return m_xTopLevel.get(); }
@@ -49,7 +49,7 @@ private:
MapUnit m_eMapUnit;
bool m_bVSFocus;
bool m_bCustom;
long m_nCustomWidth;
tools::Long m_nCustomWidth;
Image m_aIMGCus;
Image m_aIMGCusGray;
+2 -2
View File
@@ -145,8 +145,8 @@ public:
void NextPoint();
void PrevPoint();
bool CheckMinMoved(const Point& rPnt);
long GetDX() const { return GetNow().X()-GetPrev().X(); }
long GetDY() const { return GetNow().Y()-GetPrev().Y(); }
tools::Long GetDX() const { return GetNow().X()-GetPrev().X(); }
tools::Long GetDY() const { return GetNow().Y()-GetPrev().Y(); }
Fraction GetXFact() const;
Fraction GetYFact() const;
+2 -2
View File
@@ -229,8 +229,8 @@ inline const tools::Rectangle& SdrDragMethod::GetMarkedRect() const
class SVXCORE_DLLPUBLIC SdrDragMove : public SdrDragMethod
{
private:
long nBestXSnap;
long nBestYSnap;
tools::Long nBestXSnap;
tools::Long nBestYSnap;
bool bXSnapped;
bool bYSnapped;
+5 -5
View File
@@ -212,13 +212,13 @@ public:
void MoveMarkedObj(const Size& rSiz, bool bCopy=false);
void ResizeMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy=false);
void ResizeMultMarkedObj(const Point& rRef, const Fraction& xFact, const Fraction& yFact, const bool bWdh, const bool bHgt);
long GetMarkedObjRotate() const;
void RotateMarkedObj(const Point& rRef, long nAngle, bool bCopy=false);
tools::Long GetMarkedObjRotate() const;
void RotateMarkedObj(const Point& rRef, tools::Long nAngle, bool bCopy=false);
void MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool bCopy=false);
void MirrorMarkedObjHorizontal();
void MirrorMarkedObjVertical();
long GetMarkedObjShear() const;
void ShearMarkedObj(const Point& rRef, long nAngle, bool bVShear=false, bool bCopy=false);
tools::Long GetMarkedObjShear() const;
void ShearMarkedObj(const Point& rRef, tools::Long nAngle, bool bVShear=false, bool bCopy=false);
void CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookMode eMode, bool bVertical, bool bNoContortion, bool bCopy=false);
void DistortMarkedObj(const tools::Rectangle& rRef, const XPolygon& rDistortedRect, bool bNoContortion, bool bCopy=false);
@@ -227,7 +227,7 @@ public:
void SetAllMarkedRect(const tools::Rectangle& rRect) { SetMarkedObjRect(rRect); }
void MoveAllMarked(const Size& rSiz, bool bCopy=false) { MoveMarkedObj(rSiz,bCopy); }
void ResizeAllMarked(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { ResizeMarkedObj(rRef,xFact,yFact); }
void RotateAllMarked(const Point& rRef, long nAngle) { RotateMarkedObj(rRef,nAngle); }
void RotateAllMarked(const Point& rRef, tools::Long nAngle) { RotateMarkedObj(rRef,nAngle); }
void MirrorAllMarkedHorizontal() { MirrorMarkedObjHorizontal(); }
void MirrorAllMarkedVertical() { MirrorMarkedObjVertical(); }
void CopyMarked() { CopyMarkedObj(); }
+1 -1
View File
@@ -77,7 +77,7 @@ public:
void MoveMarkedGluePoints (const Size& rSiz, bool bCopy);
void ResizeMarkedGluePoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy);
void RotateMarkedGluePoints(const Point& rRef, long nAngle, bool bCopy);
void RotateMarkedGluePoints(const Point& rRef, tools::Long nAngle, bool bCopy);
};
#endif // INCLUDED_SVX_SVDGLEV_HXX
+8 -8
View File
@@ -104,12 +104,12 @@ public:
void Invalidate(vcl::Window& rWin, const SdrObject* pObj) const;
Point GetAbsolutePos(const SdrObject& rObj) const;
void SetAbsolutePos(const Point& rNewPos, const SdrObject& rObj);
long GetAlignAngle() const;
void SetAlignAngle(long nAngle);
static long EscDirToAngle(SdrEscapeDirection nEsc);
static SdrEscapeDirection EscAngleToDir(long nAngle);
void Rotate(const Point& rRef, long nAngle, double sn, double cs, const SdrObject* pObj);
void Mirror(const Point& rRef1, const Point& rRef2, long nAngle, const SdrObject* pObj);
tools::Long GetAlignAngle() const;
void SetAlignAngle(tools::Long nAngle);
static tools::Long EscDirToAngle(SdrEscapeDirection nEsc);
static SdrEscapeDirection EscAngleToDir(tools::Long nAngle);
void Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs, const SdrObject* pObj);
void Mirror(const Point& rRef1, const Point& rRef2, tools::Long nAngle, const SdrObject* pObj);
void Shear (const Point& rRef, double tn, bool bVShear, const SdrObject* pObj);
};
@@ -137,9 +137,9 @@ public:
void Invalidate(vcl::Window& rWin, const SdrObject* pObj) const;
// temp for transformations on the reference object
void SetReallyAbsolute(bool bOn, const SdrObject& rObj);
void Rotate(const Point& rRef, long nAngle, double sn, double cs, const SdrObject* pObj);
void Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs, const SdrObject* pObj);
void Mirror(const Point& rRef1, const Point& rRef2, const SdrObject* pObj);
void Mirror(const Point& rRef1, const Point& rRef2, long nAngle, const SdrObject* pObj);
void Mirror(const Point& rRef1, const Point& rRef2, tools::Long nAngle, const SdrObject* pObj);
void Shear (const Point& rRef, double tn, bool bVShear, const SdrObject* pObj);
};
+2 -2
View File
@@ -143,7 +143,7 @@ protected:
SdrHdlKind eKind;
long nRotationAngle; // turn handle or mousepointer
tools::Long nRotationAngle; // turn handle or mousepointer
sal_uInt32 nObjHdlNum; // required by MarkView
sal_uInt32 nPolyNum; // Polygonpoint
sal_uInt32 nPPntNum; // Point number of the polygon
@@ -207,7 +207,7 @@ public:
void SetSelected(bool bJa=true);
void Set1PixMore(bool bJa=true);
void SetRotationAngle(long n);
void SetRotationAngle(tools::Long n);
bool IsCornerHdl() const { return eKind==SdrHdlKind::UpperLeft || eKind==SdrHdlKind::UpperRight || eKind==SdrHdlKind::LowerLeft || eKind==SdrHdlKind::LowerRight; }
bool IsVertexHdl() const { return eKind==SdrHdlKind::Upper || eKind==SdrHdlKind::Lower || eKind==SdrHdlKind::Left || eKind==SdrHdlKind::Right; }
+6 -6
View File
@@ -232,10 +232,10 @@ public:
// including PresObj's in higher derivations
virtual void adaptSizeAndBorderForAllPages(
const Size& rNewSize,
long nLeft = 0,
long nRight = 0,
long nUpper = 0,
long nLower = 0);
tools::Long nLeft = 0,
tools::Long nRight = 0,
tools::Long nUpper = 0,
tools::Long nLower = 0);
protected:
virtual css::uno::Reference< css::uno::XInterface > createUnoModel();
@@ -384,8 +384,8 @@ public:
void SetUIUnit(FieldUnit eUnit, const Fraction& rScale);
static OUString GetUnitString(FieldUnit eUnit);
OUString GetMetricString(long nVal, bool bNoUnitChars = false, sal_Int32 nNumDigits = -1) const;
static OUString GetAngleString(long nAngle);
OUString GetMetricString(tools::Long nVal, bool bNoUnitChars = false, sal_Int32 nNumDigits = -1) const;
static OUString GetAngleString(tools::Long nAngle);
static OUString GetPercentString(const Fraction& rVal);
// RecalcPageNums is ordinarily only called by the Page.
+3 -3
View File
@@ -168,16 +168,16 @@ public:
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const override;
virtual void Move(const Size& rSiz) override;
virtual void Shear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
virtual void Shear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual void SetSnapRect(const tools::Rectangle& rRect) override;
virtual void SetLogicRect(const tools::Rectangle& rRect) override;
virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false ) override;
virtual void NbcMove(const Size& rSiz) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
virtual void NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
+8 -8
View File
@@ -589,16 +589,16 @@ public:
virtual void NbcMove (const Size& rSiz);
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
virtual void NbcCrop (const basegfx::B2DPoint& rRef, double fxFact, double fyFact);
virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs);
virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs);
virtual void NbcMirror(const Point& rRef1, const Point& rRef2);
virtual void NbcShear (const Point& rRef, long nAngle, double tn, bool bVShear);
virtual void NbcShear (const Point& rRef, tools::Long nAngle, double tn, bool bVShear);
virtual void Move (const Size& rSiz);
virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative = true);
virtual void Crop (const basegfx::B2DPoint& rRef, double fxFact, double fyFact);
virtual void Rotate(const Point& rRef, long nAngle, double sn, double cs);
virtual void Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs);
virtual void Mirror(const Point& rRef1, const Point& rRef2);
virtual void Shear (const Point& rRef, long nAngle, double tn, bool bVShear);
virtual void Shear (const Point& rRef, tools::Long nAngle, double tn, bool bVShear);
/// The relative position of a SdrObject is the distance of the upper
/// left corner of the logic bounding rectangle (SnapRect) to the anchor.
@@ -631,8 +631,8 @@ public:
virtual void AdjustToMaxRect( const tools::Rectangle& rMaxRect, bool bShrinkOnly = false );
// rotation and shear angle
virtual long GetRotateAngle() const;
virtual long GetShearAngle(bool bVertical = false) const;
virtual tools::Long GetRotateAngle() const;
virtual tools::Long GetShearAngle(bool bVertical = false) const;
/// snap to special points of an Object (polygon points, center of circle)
virtual sal_uInt32 GetSnapPointCount() const;
@@ -729,7 +729,7 @@ public:
// to be set temporarily when transforming related object(?)
void SetGlueReallyAbsolute(bool bOn);
void NbcRotateGluePoints(const Point& rRef, long nAngle, double sn, double cs);
void NbcRotateGluePoints(const Point& rRef, tools::Long nAngle, double sn, double cs);
void NbcMirrorGluePoints(const Point& rRef1, const Point& rRef2);
void NbcShearGluePoints (const Point& rRef, double tn, bool bVShear);
@@ -964,7 +964,7 @@ protected:
void ImpForcePlusData();
OUString GetMetrStr(long nVal) const;
OUString GetMetrStr(tools::Long nVal) const;
/// A derived class must override these 3 methods if it has own geometric
/// data that must be saved for Undo.
+10 -10
View File
@@ -32,8 +32,8 @@ namespace sdr::properties {
class SdrCircObjGeoData final : public SdrTextObjGeoData
{
public:
long nStartAngle;
long nEndAngle;
tools::Long nStartAngle;
tools::Long nEndAngle;
};
enum class SdrCircKind { Full, Section, Cut, Arc };
@@ -51,10 +51,10 @@ private:
virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override;
SdrCircKind meCircleKind;
long nStartAngle;
long nEndAngle;
tools::Long nStartAngle;
tools::Long nEndAngle;
SVX_DLLPRIVATE basegfx::B2DPolygon ImpCalcXPolyCirc(const SdrCircKind eKind, const tools::Rectangle& rRect1, long nStart, long nEnd) const;
SVX_DLLPRIVATE basegfx::B2DPolygon ImpCalcXPolyCirc(const SdrCircKind eKind, const tools::Rectangle& rRect1, tools::Long nStart, tools::Long nEnd) const;
SVX_DLLPRIVATE static void ImpSetCreateParams(SdrDragStat& rStat);
SVX_DLLPRIVATE void ImpSetAttrToCircInfo(); // copy values from pool
SVX_DLLPRIVATE void ImpSetCircInfoToAttr(); // copy values into pool
@@ -86,8 +86,8 @@ public:
SdrModel& rSdrModel,
SdrCircKind eNewKind,
const tools::Rectangle& rRect,
long nNewStartAngle,
long nNewEndWink);
tools::Long nNewStartAngle,
tools::Long nNewEndWink);
SdrCircKind GetCircleKind() const { return meCircleKind; }
@@ -129,7 +129,7 @@ public:
virtual void NbcMove(const Size& aSiz) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
virtual void NbcShear (const Point& rRef, long nAngle, double tn, bool bVShear) override;
virtual void NbcShear (const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
private:
@@ -137,8 +137,8 @@ private:
virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
public:
long GetStartAngle() const { return nStartAngle; }
long GetEndAngle() const { return nEndAngle; }
tools::Long GetStartAngle() const { return nStartAngle; }
tools::Long GetEndAngle() const { return nEndAngle; }
};
+9 -9
View File
@@ -84,8 +84,8 @@ public:
Point aMiddleLine;
// Following values are set by ImpCalcEdgeTrack
long nAngle1; // exit angle at Obj1
long nAngle2; // exit angle at Obj2
tools::Long nAngle1; // exit angle at Obj1
tools::Long nAngle2; // exit angle at Obj2
sal_uInt16 nObj1Lines; // 1..3
sal_uInt16 nObj2Lines; // 1..3
sal_uInt16 nMiddleLine; // 0xFFFF=none, otherwise point number of the beginning of the line
@@ -102,8 +102,8 @@ public:
Point& ImpGetLineOffsetPoint(SdrEdgeLineCode eLineCode);
sal_uInt16 ImpGetPolyIdx(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const;
bool ImpIsHorzLine(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const;
void ImpSetLineOffset(SdrEdgeLineCode eLineCode, const XPolygon& rXP, long nVal);
long ImpGetLineOffset(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const;
void ImpSetLineOffset(SdrEdgeLineCode eLineCode, const XPolygon& rXP, tools::Long nVal);
tools::Long ImpGetLineOffset(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const;
};
@@ -171,11 +171,11 @@ public:
protected:
virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
static XPolygon ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, const tools::Rectangle& rRect, const Point& rCenter);
static XPolygon ImpCalcObjToCenter(const Point& rStPt, tools::Long nEscAngle, const tools::Rectangle& rRect, const Point& rCenter);
void ImpRecalcEdgeTrack(); // recalculation of the connection track
XPolygon ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& rCon1, SdrObjConnection& rCon2, SdrEdgeInfoRec* pInfo) const;
XPolygon ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const tools::Rectangle& rBoundRect1, const tools::Rectangle& rBewareRect1,
const Point& rPt2, long nAngle2, const tools::Rectangle& rBoundRect2, const tools::Rectangle& rBewareRect2,
XPolygon ImpCalcEdgeTrack(const Point& rPt1, tools::Long nAngle1, const tools::Rectangle& rBoundRect1, const tools::Rectangle& rBewareRect1,
const Point& rPt2, tools::Long nAngle2, const tools::Rectangle& rBoundRect2, const tools::Rectangle& rBewareRect2,
sal_uIntPtr* pnQuality, SdrEdgeInfoRec* pInfo) const;
static bool ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrObjConnection& rCon, const SdrEdgeObj* pThis, OutputDevice* pOut=nullptr);
static SdrEscapeDirection ImpCalcEscAngle(SdrObject const * pObj, const Point& aPt2);
@@ -242,9 +242,9 @@ public:
virtual void NbcResize(const Point& rRefPnt, const Fraction& aXFact, const Fraction& aYFact) override;
// #i54102# added rotate, mirror and shear support
virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
virtual void NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
// #102344# Added missing implementation
virtual void NbcSetAnchorPos(const Point& rPnt) override;
+6 -6
View File
@@ -79,14 +79,14 @@ public:
virtual bool BegCreate(SdrDragStat& rStat) override;
virtual long GetRotateAngle() const override;
virtual long GetShearAngle(bool bVertical = false) const override;
virtual tools::Long GetRotateAngle() const override;
virtual tools::Long GetShearAngle(bool bVertical = false) const override;
virtual void Move(const Size& rSiz) override;
virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative = true) override;
virtual void Rotate(const Point& rRef, long nAngle, double sn, double cs) override;
virtual void Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void Mirror(const Point& rRef1, const Point& rRef2) override;
virtual void Shear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
virtual void Shear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual void SetAnchorPos(const Point& rPnt) override;
virtual void SetRelativePos(const Point& rPnt) override;
virtual void SetSnapRect(const tools::Rectangle& rRect) override;
@@ -94,9 +94,9 @@ public:
virtual void NbcMove(const Size& rSiz) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
virtual void NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual void NbcSetAnchorPos(const Point& rPnt) override;
virtual void NbcSetRelativePos(const Point& rPnt) override;
virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
+3 -3
View File
@@ -113,10 +113,10 @@ public:
virtual void NbcMove(const Size& rSiz) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
virtual long GetRotateAngle() const override;
virtual void NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual tools::Long GetRotateAngle() const override;
virtual void RecalcSnapRect() override;
virtual sal_uInt32 GetSnapPointCount() const override;
+2 -2
View File
@@ -108,9 +108,9 @@ public:
virtual void NbcMove(const Size& aSize) override;
virtual void NbcResize(const Point& rRefPnt, const Fraction& aXFact, const Fraction& aYFact) override;
virtual void NbcRotate(const Point& rRefPnt, long nAngle, double fSin, double fCos) override;
virtual void NbcRotate(const Point& rRefPnt, tools::Long nAngle, double fSin, double fCos) override;
virtual void NbcMirror(const Point& rRefPnt1, const Point& rRefPnt2) override;
virtual void NbcShear(const Point& rRefPnt, long nAngle, double fTan, bool bVShear) override;
virtual void NbcShear(const Point& rRefPnt, tools::Long nAngle, double fTan, bool bVShear) override;
virtual sal_uInt32 GetSnapPointCount() const override;
virtual Point GetSnapPoint(sal_uInt32 i) const override;
+3 -3
View File
@@ -50,7 +50,7 @@ protected:
std::unique_ptr<XPolygon> mpXPoly;
protected:
XPolygon ImpCalcXPoly(const tools::Rectangle& rRect1, long nRad1) const;
XPolygon ImpCalcXPoly(const tools::Rectangle& rRect1, tools::Long nRad1) const;
void SetXPolyDirty();
/// Subclasses should override RecalcXPoly() by creating an XPolygon
@@ -112,9 +112,9 @@ public:
virtual void NbcMove(const Size& rSiz) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
virtual void NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual SdrGluePoint GetVertexGluePoint(sal_uInt16 nNum) const override;
virtual SdrGluePoint GetCornerGluePoint(sal_uInt16 nNum) const override;
+14 -14
View File
@@ -293,7 +293,7 @@ protected:
virtual SdrObjGeoData* NewGeoData() const override;
virtual void SaveGeoData(SdrObjGeoData& rGeo) const override;
virtual void RestGeoData(const SdrObjGeoData& rGeo) override;
void NbcSetEckenradius(long nRad);
void NbcSetEckenradius(tools::Long nRad);
// #115391# new method for SdrObjCustomShape and SdrTextObj to correctly handle and set
// SdrTextMinFrameWidthItem and SdrTextMinFrameHeightItem based on all settings, necessities
@@ -399,13 +399,13 @@ public:
const GeoStat& GetGeoStat() const { return aGeo; }
// get corner radius
long GetEckenradius() const;
tools::Long GetEckenradius() const;
virtual bool IsAutoGrowHeight() const;
long GetMinTextFrameHeight() const;
long GetMaxTextFrameHeight() const;
tools::Long GetMinTextFrameHeight() const;
tools::Long GetMaxTextFrameHeight() const;
virtual bool IsAutoGrowWidth() const;
long GetMinTextFrameWidth() const;
long GetMaxTextFrameWidth() const;
tools::Long GetMinTextFrameWidth() const;
tools::Long GetMaxTextFrameWidth() const;
css::drawing::TextFitToSizeType GetFitToSize() const;
const tools::Rectangle &GetGeoRect() const;
@@ -426,13 +426,13 @@ public:
SdrTextVertAdjust GetTextVerticalAdjust() const;
/** Left inner spacing to borders */
long GetTextLeftDistance() const;
tools::Long GetTextLeftDistance() const;
/** Right inner spacing to borders */
long GetTextRightDistance() const;
tools::Long GetTextRightDistance() const;
/** Top inner spacing to borders */
long GetTextUpperDistance() const;
tools::Long GetTextUpperDistance() const;
/** Bottom inner spacing to borders */
long GetTextLowerDistance() const;
tools::Long GetTextLowerDistance() const;
SdrTextAniKind GetTextAniKind() const;
SdrTextAniDirection GetTextAniDirection() const;
@@ -454,8 +454,8 @@ public:
virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override;
virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
virtual const tools::Rectangle& GetLogicRect() const override;
virtual long GetRotateAngle() const override;
virtual long GetShearAngle(bool bVertical = false) const override;
virtual tools::Long GetRotateAngle() const override;
virtual tools::Long GetShearAngle(bool bVertical = false) const override;
virtual sal_uInt32 GetSnapPointCount() const override;
virtual Point GetSnapPoint(sal_uInt32 i) const override;
@@ -478,9 +478,9 @@ public:
virtual void NbcMove(const Size& rSiz) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
virtual void NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual bool HasTextEdit() const override;
// returns true if TextEditMode started
+6 -6
View File
@@ -100,15 +100,15 @@ public:
virtual void NbcMove(const Size& rSiz) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double cs) override;
virtual void NbcRotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void NbcMirror(const Point& rRef1, const Point& rRef2) override;
virtual void NbcShear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
virtual void NbcShear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual void Move(const Size& rSiz) override;
virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bUnsetRelative = true) override;
virtual void Rotate(const Point& rRef, long nAngle, double sn, double cs) override;
virtual void Rotate(const Point& rRef, tools::Long nAngle, double sn, double cs) override;
virtual void Mirror(const Point& rRef1, const Point& rRef2) override;
virtual void Shear(const Point& rRef, long nAngle, double tn, bool bVShear) override;
virtual void Shear(const Point& rRef, tools::Long nAngle, double tn, bool bVShear) override;
virtual void RecalcSnapRect() override;
virtual const tools::Rectangle& GetSnapRect() const override;
@@ -119,8 +119,8 @@ public:
virtual void SetLogicRect(const tools::Rectangle& rRect) override;
virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
virtual long GetRotateAngle() const override;
virtual long GetShearAngle(bool bVertical = false) const override;
virtual tools::Long GetRotateAngle() const override;
virtual tools::Long GetShearAngle(bool bVertical = false) const override;
virtual sal_uInt32 GetSnapPointCount() const override;
virtual Point GetSnapPoint(sal_uInt32 i) const override;
+1 -1
View File
@@ -66,7 +66,7 @@ public:
void MoveMarkedPoints(const Size& rSiz);
void ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
void RotateMarkedPoints(const Point& rRef, long nAngle);
void RotateMarkedPoints(const Point& rRef, tools::Long nAngle);
// This probably creates an arbitrary amount of new objects
void RipUpAtMarkedPoints() override;
+7 -7
View File
@@ -104,8 +104,8 @@ protected:
Fraction aSnapWdtY;
sal_uInt16 nMagnSizPix;
long nSnapAngle;
long nEliminatePolyPointLimitAngle;
tools::Long nSnapAngle;
tools::Long nEliminatePolyPointLimitAngle;
SdrCrookMode eCrookMode;
@@ -158,7 +158,7 @@ public:
// SdrSnap::YSNAPPED or SdrSnap::XYSNAPPED
SdrSnap SnapPos(Point& rPnt, const SdrPageView* pPV) const;
Point GetSnapPos(const Point& rPnt, const SdrPageView* pPV) const;
void CheckSnap(const Point& rPt, long& nBestXSnap, long& nBestYSnap, bool& bXSnapped, bool& bYSnapped) const;
void CheckSnap(const Point& rPt, tools::Long& nBestXSnap, tools::Long& nBestYSnap, bool& bXSnapped, bool& bYSnapped) const;
// All attitudes to snap are persistent.
bool IsSnapEnabled() const { return bSnapEnab; }
@@ -220,8 +220,8 @@ public:
// persistent.
void SetAngleSnapEnabled(bool bOn) { bAngleSnapEnab=bOn; }
bool IsAngleSnapEnabled() const { return bAngleSnapEnab; }
void SetSnapAngle(long nAngle) { nSnapAngle=nAngle; }
long GetSnapAngle() const { return nSnapAngle; }
void SetSnapAngle(tools::Long nAngle) { nSnapAngle=nAngle; }
tools::Long GetSnapAngle() const { return nSnapAngle; }
// different effects from Ortho (depending on the context):
// - Create
@@ -280,8 +280,8 @@ public:
// if its adjacent lines are almost a solid line.
void SetEliminatePolyPoints(bool bOn) { bEliminatePolyPoints=bOn; }
bool IsEliminatePolyPoints() const { return bEliminatePolyPoints; }
void SetEliminatePolyPointLimitAngle(long nAngle) { nEliminatePolyPointLimitAngle=nAngle; }
long GetEliminatePolyPointLimitAngle() const { return nEliminatePolyPointLimitAngle; }
void SetEliminatePolyPointLimitAngle(tools::Long nAngle) { nEliminatePolyPointLimitAngle=nAngle; }
tools::Long GetEliminatePolyPointLimitAngle() const { return nEliminatePolyPointLimitAngle; }
};
#endif // INCLUDED_SVX_SVDSNPV_HXX
+17 -17
View File
@@ -113,8 +113,8 @@ inline void ResizePoint(Point& rPnt, const Point& rRef, const Fraction& xFract,
inline void RotatePoint(Point& rPnt, const Point& rRef, double sn, double cs)
{
long dx=rPnt.X()-rRef.X();
long dy=rPnt.Y()-rRef.Y();
tools::Long dx=rPnt.X()-rRef.X();
tools::Long dy=rPnt.Y()-rRef.Y();
rPnt.setX(FRound(rRef.X()+dx*cs+dy*sn));
rPnt.setY(FRound(rRef.Y()+dy*cs-dx*sn));
}
@@ -136,11 +136,11 @@ inline double GetCrookAngle(Point& rPnt, const Point& rCenter, const Point& rRad
{
double nAngle;
if (bVertical) {
long dy=rPnt.Y()-rCenter.Y();
tools::Long dy=rPnt.Y()-rCenter.Y();
nAngle=static_cast<double>(dy)/static_cast<double>(rRad.Y());
rPnt.setY(rCenter.Y());
} else {
long dx=rCenter.X()-rPnt.X();
tools::Long dx=rCenter.X()-rPnt.X();
nAngle=static_cast<double>(dx)/static_cast<double>(rRad.X());
rPnt.setX(rCenter.X());
}
@@ -159,19 +159,19 @@ inline double GetCrookAngle(Point& rPnt, const Point& rCenter, const Point& rRad
* @return the returned value is in the range of -180.00..179.99 deg
* and is in 1/100 deg units
*/
SVXCORE_DLLPUBLIC long GetAngle(const Point& rPnt);
SVXCORE_DLLPUBLIC tools::Long GetAngle(const Point& rPnt);
long NormAngle18000(long a); /// Normalize angle to -180.00..179.99
tools::Long NormAngle18000(tools::Long a); /// Normalize angle to -180.00..179.99
SVXCORE_DLLPUBLIC long NormAngle36000(long a); /// Normalize angle to 0.00..359.99
SVXCORE_DLLPUBLIC tools::Long NormAngle36000(tools::Long a); /// Normalize angle to 0.00..359.99
sal_uInt16 GetAngleSector(long nAngle); /// Determine sector within the cartesian coordinate system
sal_uInt16 GetAngleSector(tools::Long nAngle); /// Determine sector within the cartesian coordinate system
/**
* Calculates the length of (0,0) via a^2 + b^2 = c^2
* In order to avoid overflows, we ignore some decimal places.
*/
long GetLen(const Point& rPnt);
tools::Long GetLen(const Point& rPnt);
/**
* The transformation of a rectangle into a polygon, by
@@ -213,8 +213,8 @@ long GetLen(const Point& rPnt);
class GeoStat { // Geometric state for a rect
public:
long nRotationAngle;
long nShearAngle;
tools::Long nRotationAngle;
tools::Long nShearAngle;
double nTan; // tan(nShearAngle)
double nSin; // sin(nRotationAngle)
double nCos; // cos(nRotationAngle)
@@ -232,7 +232,7 @@ void OrthoDistance4(const Point& rPt0, Point& rPt, bool bBigOrtho);
// Multiplication and subsequent division
// Calculation and intermediate values are in BigInt
SVXCORE_DLLPUBLIC long BigMulDiv(long nVal, long nMul, long nDiv);
SVXCORE_DLLPUBLIC tools::Long BigMulDiv(tools::Long nVal, tools::Long nMul, tools::Long nDiv);
class FrPair {
Fraction aX;
@@ -240,8 +240,8 @@ class FrPair {
public:
FrPair(const Fraction& rBoth) : aX(rBoth),aY(rBoth) {}
FrPair(const Fraction& rX, const Fraction& rY) : aX(rX),aY(rY) {}
FrPair(long nMul, long nDiv) : aX(nMul,nDiv),aY(nMul,nDiv) {}
FrPair(long xMul, long xDiv, long yMul, long yDiv): aX(xMul,xDiv),aY(yMul,yDiv) {}
FrPair(tools::Long nMul, tools::Long nDiv) : aX(nMul,nDiv),aY(nMul,nDiv) {}
FrPair(tools::Long xMul, tools::Long xDiv, tools::Long yMul, tools::Long yDiv): aX(xMul,xDiv),aY(yMul,yDiv) {}
const Fraction& X() const { return aX; }
const Fraction& Y() const { return aY; }
Fraction& X() { return aX; }
@@ -273,8 +273,8 @@ inline bool IsInch(FieldUnit eU) {
}
class SVXCORE_DLLPUBLIC SdrFormatter {
long nMul_;
long nDiv_;
tools::Long nMul_;
tools::Long nDiv_;
short nComma_;
bool bDirty;
MapUnit eSrcMU;
@@ -291,7 +291,7 @@ public:
, eDstMU(eDst)
{
}
OUString GetStr(long nVal) const;
OUString GetStr(tools::Long nVal) const;
static OUString GetUnitStr(MapUnit eUnit);
static OUString GetUnitStr(FieldUnit eUnit);
};
+4 -4
View File
@@ -146,8 +146,8 @@ class AbstractFmInputRecordNoDialog :public VclAbstractDialog
protected:
virtual ~AbstractFmInputRecordNoDialog() override = default;
public:
virtual void SetValue(long dNew) = 0;
virtual long GetValue() const = 0;
virtual void SetValue(tools::Long dNew) = 0;
virtual tools::Long GetValue() const = 0;
};
class AbstractSvxNewDictionaryDialog :public VclAbstractDialog
@@ -287,7 +287,7 @@ protected:
public:
virtual bool IsHorizontal() const = 0;
virtual bool IsProportional() const = 0;
virtual long GetCount() const = 0;
virtual tools::Long GetCount() const = 0;
virtual void SetSplitVerticalByDefault() = 0;
};
@@ -440,7 +440,7 @@ public:
virtual VclPtr<SfxAbstractTabDialog> CreateSvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrModel& rModel )=0;
virtual VclPtr<SvxAbstractSplitTableDialog> CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, long nMaxVertical) = 0;
virtual VclPtr<SvxAbstractSplitTableDialog> CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, tools::Long nMaxVertical) = 0;
virtual std::shared_ptr<SvxAbstractNewTableDialog> CreateSvxNewTableDialog(weld::Window* pParent) = 0;
+2 -2
View File
@@ -67,7 +67,7 @@ public:
class SVXCORE_DLLPUBLIC SdrCaptionEscRelItem: public SfxInt32Item {
public:
SdrCaptionEscRelItem(long nEscRel=5000): SfxInt32Item(SDRATTR_CAPTIONESCREL,nEscRel) {}
SdrCaptionEscRelItem(tools::Long nEscRel=5000): SfxInt32Item(SDRATTR_CAPTIONESCREL,nEscRel) {}
virtual ~SdrCaptionEscRelItem() override;
virtual SdrCaptionEscRelItem* Clone(SfxItemPool* pPool=nullptr) const override;
@@ -86,7 +86,7 @@ public:
class SdrCaptionEscAbsItem: public SdrMetricItem {
public:
SdrCaptionEscAbsItem(long nEscAbs=0): SdrMetricItem(SDRATTR_CAPTIONESCABS,nEscAbs) {}
SdrCaptionEscAbsItem(tools::Long nEscAbs=0): SdrMetricItem(SDRATTR_CAPTIONESCABS,nEscAbs) {}
virtual SdrCaptionEscAbsItem* Clone(SfxItemPool*) const override
{
return new SdrCaptionEscAbsItem(*this);
+1 -1
View File
@@ -28,7 +28,7 @@
*/
class SdrCaptionGapItem final : public SdrMetricItem {
public:
SdrCaptionGapItem(long nGap=0) : SdrMetricItem(SDRATTR_CAPTIONGAP,nGap) {}
SdrCaptionGapItem(tools::Long nGap=0) : SdrMetricItem(SDRATTR_CAPTIONGAP,nGap) {}
virtual SdrCaptionGapItem* Clone(SfxItemPool*) const override
{
return new SdrCaptionGapItem(*this);
+2 -2
View File
@@ -22,11 +22,11 @@
#include <svx/svddef.hxx>
#include <svx/sdangitm.hxx>
inline SdrAngleItem makeSdrCircStartAngleItem(long nAngle) {
inline SdrAngleItem makeSdrCircStartAngleItem(tools::Long nAngle) {
return SdrAngleItem(SDRATTR_CIRCSTARTANGLE, nAngle);
}
inline SdrAngleItem makeSdrCircEndAngleItem(long nAngle) {
inline SdrAngleItem makeSdrCircEndAngleItem(tools::Long nAngle) {
return SdrAngleItem(SDRATTR_CIRCENDANGLE, nAngle);
}
+1 -1
View File
@@ -30,7 +30,7 @@
*/
class SVXCORE_DLLPUBLIC SdrCaptionLineLenItem: public SdrMetricItem {
public:
SdrCaptionLineLenItem(long nLineLen=0): SdrMetricItem(SDRATTR_CAPTIONLINELEN,nLineLen) {}
SdrCaptionLineLenItem(tools::Long nLineLen=0): SdrMetricItem(SDRATTR_CAPTIONLINELEN,nLineLen) {}
virtual ~SdrCaptionLineLenItem() override;
virtual SdrCaptionLineLenItem* Clone(SfxItemPool* pPool=nullptr) const override;
+3 -3
View File
@@ -31,15 +31,15 @@ public:
}
};
inline SdrMetricItem makeSdrEdgeLine1DeltaItem(long nVal) {
inline SdrMetricItem makeSdrEdgeLine1DeltaItem(tools::Long nVal) {
return SdrMetricItem(SDRATTR_EDGELINE1DELTA, nVal);
}
inline SdrMetricItem makeSdrEdgeLine2DeltaItem(long nVal) {
inline SdrMetricItem makeSdrEdgeLine2DeltaItem(tools::Long nVal) {
return SdrMetricItem(SDRATTR_EDGELINE2DELTA, nVal);
}
inline SdrMetricItem makeSdrEdgeLine3DeltaItem(long nVal) {
inline SdrMetricItem makeSdrEdgeLine3DeltaItem(tools::Long nVal) {
return SdrMetricItem(SDRATTR_EDGELINE3DELTA, nVal);
}
+6 -6
View File
@@ -25,7 +25,7 @@
class SVXCORE_DLLPUBLIC SdrEdgeNode1HorzDistItem: public SdrMetricItem {
public:
SdrEdgeNode1HorzDistItem(long nVal): SdrMetricItem(SDRATTR_EDGENODE1HORZDIST,nVal) {}
SdrEdgeNode1HorzDistItem(tools::Long nVal): SdrMetricItem(SDRATTR_EDGENODE1HORZDIST,nVal) {}
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
virtual SdrEdgeNode1HorzDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
@@ -33,7 +33,7 @@ public:
class SVXCORE_DLLPUBLIC SdrEdgeNode1VertDistItem: public SdrMetricItem {
public:
SdrEdgeNode1VertDistItem(long nVal): SdrMetricItem(SDRATTR_EDGENODE1VERTDIST,nVal) {}
SdrEdgeNode1VertDistItem(tools::Long nVal): SdrMetricItem(SDRATTR_EDGENODE1VERTDIST,nVal) {}
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
virtual SdrEdgeNode1VertDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
@@ -41,7 +41,7 @@ public:
class SVXCORE_DLLPUBLIC SdrEdgeNode2HorzDistItem: public SdrMetricItem {
public:
SdrEdgeNode2HorzDistItem(long nVal): SdrMetricItem(SDRATTR_EDGENODE2HORZDIST,nVal) {}
SdrEdgeNode2HorzDistItem(tools::Long nVal): SdrMetricItem(SDRATTR_EDGENODE2HORZDIST,nVal) {}
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
virtual SdrEdgeNode2HorzDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
@@ -49,7 +49,7 @@ public:
class SVXCORE_DLLPUBLIC SdrEdgeNode2VertDistItem: public SdrMetricItem {
public:
SdrEdgeNode2VertDistItem(long nVal): SdrMetricItem(SDRATTR_EDGENODE2VERTDIST,nVal) {}
SdrEdgeNode2VertDistItem(tools::Long nVal): SdrMetricItem(SDRATTR_EDGENODE2VERTDIST,nVal) {}
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
virtual SdrEdgeNode2VertDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
@@ -57,13 +57,13 @@ public:
class SdrEdgeNode1GlueDistItem: public SdrMetricItem {
public:
SdrEdgeNode1GlueDistItem(long nVal=0): SdrMetricItem(SDRATTR_EDGENODE1GLUEDIST,nVal) {}
SdrEdgeNode1GlueDistItem(tools::Long nVal=0): SdrMetricItem(SDRATTR_EDGENODE1GLUEDIST,nVal) {}
virtual SdrEdgeNode1GlueDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
};
class SdrEdgeNode2GlueDistItem: public SdrMetricItem {
public:
SdrEdgeNode2GlueDistItem(long nVal=0): SdrMetricItem(SDRATTR_EDGENODE2GLUEDIST,nVal) {}
SdrEdgeNode2GlueDistItem(tools::Long nVal=0): SdrMetricItem(SDRATTR_EDGENODE2GLUEDIST,nVal) {}
virtual SdrEdgeNode2GlueDistItem* Clone(SfxItemPool* pPool=nullptr) const override;
};
+5 -5
View File
@@ -36,27 +36,27 @@
// gab between dimension line and document reference edge (norm=8mm)
// can be dragged on the handles of the arrowheads
inline SdrMetricItem makeSdrMeasureLineDistItem(long nVal) {
inline SdrMetricItem makeSdrMeasureLineDistItem(tools::Long nVal) {
return SdrMetricItem(SDRATTR_MEASURELINEDIST, nVal);
}
// overhang of dimension help line to dimension line (norm=2mm)
inline SdrMetricItem makeSdrMeasureHelplineOverhangItem(long nVal) {
inline SdrMetricItem makeSdrMeasureHelplineOverhangItem(tools::Long nVal) {
return SdrMetricItem(SDRATTR_MEASUREHELPLINEOVERHANG, nVal);
}
// gab between dimension line and document reference edge
// dimension help lines shell not touch the object
inline SdrMetricItem makeSdrMeasureHelplineDistItem(long nVal) {
inline SdrMetricItem makeSdrMeasureHelplineDistItem(tools::Long nVal) {
return SdrMetricItem(SDRATTR_MEASUREHELPLINEDIST, nVal);
}
// overlength of the help lines can be dragged at the round handles,
// which are under the reference points by default
inline SdrMetricItem makeSdrMeasureHelpline1LenItem(long nVal) {
inline SdrMetricItem makeSdrMeasureHelpline1LenItem(tools::Long nVal) {
return SdrMetricItem(SDRATTR_MEASUREHELPLINE1LEN, nVal);
}
inline SdrMetricItem makeSdrMeasureHelpline2LenItem(long nVal) {
inline SdrMetricItem makeSdrMeasureHelpline2LenItem(tools::Long nVal) {
return SdrMetricItem(SDRATTR_MEASUREHELPLINE2LEN, nVal);
}
+1 -1
View File
@@ -42,7 +42,7 @@ public:
//Angle of the text in 1/100deg. 0=horizontal; read from left to right. (n.i.)
class SdrMeasureTextFixedAngleItem: public SdrAngleItem {
public:
SdrMeasureTextFixedAngleItem(long nVal=0): SdrAngleItem(SDRATTR_MEASURETEXTFIXEDANGLE,nVal) {}
SdrMeasureTextFixedAngleItem(tools::Long nVal=0): SdrAngleItem(SDRATTR_MEASURETEXTFIXEDANGLE,nVal) {}
virtual ~SdrMeasureTextFixedAngleItem() override;
virtual SdrMeasureTextFixedAngleItem* Clone(SfxItemPool* pPool=nullptr) const override;
+2 -2
View File
@@ -26,7 +26,7 @@
class SVXCORE_DLLPUBLIC XFillBmpSizeXItem final : public SfxMetricItem
{
public:
XFillBmpSizeXItem( long nSizeX = 0 );
XFillBmpSizeXItem( tools::Long nSizeX = 0 );
SVX_DLLPRIVATE virtual XFillBmpSizeXItem* Clone( SfxItemPool* pPool = nullptr ) const override;
@@ -42,7 +42,7 @@ public:
class SVXCORE_DLLPUBLIC XFillBmpSizeYItem final : public SfxMetricItem
{
public:
XFillBmpSizeYItem( long nSizeY = 0 );
XFillBmpSizeYItem( tools::Long nSizeY = 0 );
SVX_DLLPRIVATE virtual XFillBmpSizeYItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+1 -1
View File
@@ -50,7 +50,7 @@ public:
MapUnit ePresMetric,
OUString &rText, const IntlWrapper& ) const override;
virtual bool HasMetrics() const override;
virtual void ScaleMetrics(long nMul, long nDiv) override;
virtual void ScaleMetrics(tools::Long nMul, tools::Long nDiv) override;
const XHatch& GetHatchValue() const { return aHatch;} // GetValue -> GetHatchValue
+1 -1
View File
@@ -33,7 +33,7 @@ class SVXCORE_DLLPUBLIC XFormTextDistanceItem final : public SfxMetricItem
{
public:
static SfxPoolItem* CreateDefault();
XFormTextDistanceItem(long nDist = 0);
XFormTextDistanceItem(tools::Long nDist = 0);
virtual XFormTextDistanceItem* Clone(SfxItemPool* pPool = nullptr) const override;
};
+2 -2
View File
@@ -34,7 +34,7 @@ class SVXCORE_DLLPUBLIC XFormTextShadowXValItem final : public SfxMetricItem
public:
static SfxPoolItem* CreateDefault();
XFormTextShadowXValItem(long nVal = 0);
XFormTextShadowXValItem(tools::Long nVal = 0);
virtual XFormTextShadowXValItem* Clone(SfxItemPool* pPool = nullptr) const override;
};
@@ -48,7 +48,7 @@ class SVXCORE_DLLPUBLIC XFormTextShadowYValItem final : public SfxMetricItem
{
public:
static SfxPoolItem* CreateDefault();
XFormTextShadowYValItem(long nVal = 0);
XFormTextShadowYValItem(tools::Long nVal = 0);
virtual XFormTextShadowYValItem* Clone(SfxItemPool* pPool = nullptr) const override;
};
+1 -1
View File
@@ -34,7 +34,7 @@ class SVXCORE_DLLPUBLIC XFormTextStartItem final : public SfxMetricItem
public:
static SfxPoolItem* CreateDefault();
XFormTextStartItem(long nStart = 0);
XFormTextStartItem(tools::Long nStart = 0);
virtual XFormTextStartItem* Clone(SfxItemPool* pPool = nullptr) const override;
};
+5 -4
View File
@@ -22,6 +22,7 @@
#include <tools/color.hxx>
#include <tools/degree.hxx>
#include <tools/long.hxx>
#include <svx/svxdllapi.h>
#include <com/sun/star/drawing/HatchStyle.hpp>
@@ -32,24 +33,24 @@ class SVXCORE_DLLPUBLIC XHatch final
{
css::drawing::HatchStyle eStyle;
Color aColor;
long nDistance;
tools::Long nDistance;
Degree10 nAngle;
public:
XHatch() : eStyle(css::drawing::HatchStyle_SINGLE), nDistance(0), nAngle(0) {}
XHatch(const Color& rCol, css::drawing::HatchStyle eStyle = css::drawing::HatchStyle_SINGLE,
long nDistance = 20, Degree10 nAngle = Degree10(0));
tools::Long nDistance = 20, Degree10 nAngle = Degree10(0));
bool operator==(const XHatch& rHatch) const;
void SetHatchStyle(css::drawing::HatchStyle eNewStyle) { eStyle = eNewStyle; }
void SetColor(const Color& rColor) { aColor = rColor; }
void SetDistance(long nNewDistance) { nDistance = nNewDistance; }
void SetDistance(tools::Long nNewDistance) { nDistance = nNewDistance; }
void SetAngle(Degree10 nNewAngle) { nAngle = nNewAngle; }
css::drawing::HatchStyle GetHatchStyle() const { return eStyle; }
const Color& GetColor() const { return aColor; }
long GetDistance() const { return nDistance; }
tools::Long GetDistance() const { return nDistance; }
Degree10 GetAngle() const { return nAngle; }
};
+1 -1
View File
@@ -52,7 +52,7 @@ public:
MapUnit ePresMetric,
OUString &rText, const IntlWrapper& ) const override;
virtual bool HasMetrics() const override;
virtual void ScaleMetrics(long nMul, long nDiv) override;
virtual void ScaleMetrics(tools::Long nMul, tools::Long nDiv) override;
const XDash& GetDashValue() const { return aDash;}
void SetDashValue(const XDash& rNew) { aDash = rNew; Detach(); } // SetValue -> SetDashValue
+1 -1
View File
@@ -31,7 +31,7 @@
class SVXCORE_DLLPUBLIC XLineEndWidthItem final : public SfxMetricItem
{
public:
XLineEndWidthItem(long nWidth = LINE_END_WIDTH_DEFAULT);
XLineEndWidthItem(tools::Long nWidth = LINE_END_WIDTH_DEFAULT);
virtual XLineEndWidthItem* Clone(SfxItemPool* pPool = nullptr) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+1 -1
View File
@@ -30,7 +30,7 @@
class SVXCORE_DLLPUBLIC XLineStartWidthItem final : public SfxMetricItem
{
public:
XLineStartWidthItem(long nWidth = LINE_START_WIDTH_DEFAULT);
XLineStartWidthItem(tools::Long nWidth = LINE_START_WIDTH_DEFAULT);
virtual XLineStartWidthItem* Clone(SfxItemPool* pPool = nullptr) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+1 -1
View File
@@ -29,7 +29,7 @@ class SVXCORE_DLLPUBLIC XLineWidthItem final : public SfxMetricItem
{
public:
static SfxPoolItem* CreateDefault();
XLineWidthItem(long nWidth = 0);
XLineWidthItem(tools::Long nWidth = 0);
virtual XLineWidthItem* Clone(SfxItemPool* pPool = nullptr) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
+5 -5
View File
@@ -47,8 +47,8 @@ class SVXCORE_DLLPUBLIC XPolygon final
// auxiliary functions for Bezier conversion
void SubdivideBezier(sal_uInt16 nPos, bool bCalcFirst, double fT);
void GenBezArc(const Point& rCenter, long nRx, long nRy,
long nXHdl, long nYHdl, sal_uInt16 nStart, sal_uInt16 nEnd,
void GenBezArc(const Point& rCenter, tools::Long nRx, tools::Long nRy,
tools::Long nXHdl, tools::Long nYHdl, sal_uInt16 nStart, sal_uInt16 nEnd,
sal_uInt16 nQuad, sal_uInt16 nFirst);
static bool CheckAngles(sal_uInt16& nStart, sal_uInt16 nEnd, sal_uInt16& nA1, sal_uInt16& nA2);
@@ -57,8 +57,8 @@ public:
XPolygon( const XPolygon& );
XPolygon( XPolygon&& );
XPolygon( const tools::Polygon& rPoly );
XPolygon( const tools::Rectangle& rRect, long nRx = 0, long nRy = 0 );
XPolygon( const Point& rCenter, long nRx, long nRy,
XPolygon( const tools::Rectangle& rRect, tools::Long nRx = 0, tools::Long nRy = 0 );
XPolygon( const Point& rCenter, tools::Long nRx, tools::Long nRy,
sal_uInt16 nStartAngle = 0, sal_uInt16 nEndAngle = 3600,
bool bClose = true );
@@ -72,7 +72,7 @@ public:
void Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags );
void Insert( sal_uInt16 nPos, const XPolygon& rXPoly );
void Remove( sal_uInt16 nPos, sal_uInt16 nCount );
void Move( long nHorzMove, long nVertMove );
void Move( tools::Long nHorzMove, tools::Long nVertMove );
tools::Rectangle GetBoundRect() const;
const Point& operator[]( sal_uInt16 nPos ) const;
+36 -36
View File
@@ -164,8 +164,8 @@ protected:
bool mbEmbedInDocument;
XPropertyList(XPropertyListType t, const OUString& rPath, const OUString& rReferer);
bool isValidIdx(long nIndex) const;
virtual BitmapEx CreateBitmapForUI(long nIndex) = 0;
bool isValidIdx(tools::Long nIndex) const;
virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) = 0;
public:
XPropertyList(const XPropertyList&) = delete;
@@ -173,15 +173,15 @@ public:
virtual ~XPropertyList() override;
XPropertyListType Type() const { return meType; }
long Count() const;
tools::Long Count() const;
void Insert(std::unique_ptr<XPropertyEntry> pEntry, long nIndex = std::numeric_limits<long>::max());
void Replace(std::unique_ptr<XPropertyEntry> pEntry, long nIndex);
void Remove(long nIndex);
void Insert(std::unique_ptr<XPropertyEntry> pEntry, tools::Long nIndex = std::numeric_limits<long>::max());
void Replace(std::unique_ptr<XPropertyEntry> pEntry, tools::Long nIndex);
void Remove(tools::Long nIndex);
XPropertyEntry* Get(long nIndex) const;
long GetIndex(const OUString& rName) const;
BitmapEx GetUiBitmap(long nIndex) const;
XPropertyEntry* Get(tools::Long nIndex) const;
tools::Long GetIndex(const OUString& rName) const;
BitmapEx GetUiBitmap(tools::Long nIndex) const;
const OUString& GetName() const { return maName; }
void SetName(const OUString& rString);
@@ -237,15 +237,15 @@ public:
class SVXCORE_DLLPUBLIC XColorList : public XPropertyList
{
protected:
virtual BitmapEx CreateBitmapForUI(long nIndex) override;
virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
public:
XColorList(const OUString& rPath, const OUString& rReferer)
: XPropertyList(XPropertyListType::Color, rPath, rReferer) {}
void Replace(long nIndex, std::unique_ptr<XColorEntry> pEntry);
XColorEntry* GetColor(long nIndex) const;
long GetIndexOfColor( const Color& rColor) const;
void Replace(tools::Long nIndex, std::unique_ptr<XColorEntry> pEntry);
XColorEntry* GetColor(tools::Long nIndex) const;
tools::Long GetIndexOfColor( const Color& rColor) const;
virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
virtual bool Create() override;
@@ -256,13 +256,13 @@ public:
class SVXCORE_DLLPUBLIC XLineEndList : public XPropertyList
{
protected:
virtual BitmapEx CreateBitmapForUI(long nIndex) override;
virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
public:
XLineEndList(const OUString& rPath, const OUString& rReferer);
virtual ~XLineEndList() override;
XLineEndEntry* GetLineEnd(long nIndex) const;
XLineEndEntry* GetLineEnd(tools::Long nIndex) const;
virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
virtual bool Create() override;
@@ -277,14 +277,14 @@ private:
protected:
static BitmapEx ImpCreateBitmapForXDash(const XDash* pDash);
virtual BitmapEx CreateBitmapForUI(long nIndex) override;
virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
public:
XDashList(const OUString& rPath, const OUString& rReferer);
virtual ~XDashList() override;
void Replace(std::unique_ptr<XDashEntry> pEntry, long nIndex);
XDashEntry* GetDash(long nIndex) const;
void Replace(std::unique_ptr<XDashEntry> pEntry, tools::Long nIndex);
XDashEntry* GetDash(tools::Long nIndex) const;
virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
virtual bool Create() override;
@@ -303,16 +303,16 @@ public:
class SVXCORE_DLLPUBLIC XHatchList : public XPropertyList
{
private:
BitmapEx CreateBitmap(long nIndex, const Size& rSize) const;
BitmapEx CreateBitmap(tools::Long nIndex, const Size& rSize) const;
protected:
virtual BitmapEx CreateBitmapForUI(long nIndex) override;
virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
public:
XHatchList(const OUString& rPath, const OUString& rReferer);
virtual ~XHatchList() override;
void Replace(std::unique_ptr<XHatchEntry> pEntry, long nIndex);
XHatchEntry* GetHatch(long nIndex) const;
BitmapEx GetBitmapForPreview(long nIndex, const Size& rSize);
void Replace(std::unique_ptr<XHatchEntry> pEntry, tools::Long nIndex);
XHatchEntry* GetHatch(tools::Long nIndex) const;
BitmapEx GetBitmapForPreview(tools::Long nIndex, const Size& rSize);
virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
virtual bool Create() override;
@@ -321,18 +321,18 @@ public:
class SVXCORE_DLLPUBLIC XGradientList : public XPropertyList
{
private:
BitmapEx CreateBitmap(long nIndex, const Size& rSize) const;
BitmapEx CreateBitmap(tools::Long nIndex, const Size& rSize) const;
protected:
virtual BitmapEx CreateBitmapForUI(long nIndex) override;
virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
public:
XGradientList(const OUString& rPath, const OUString& rReferer);
virtual ~XGradientList() override;
void Replace(std::unique_ptr<XGradientEntry> pEntry, long nIndex);
XGradientEntry* GetGradient(long nIndex) const;
BitmapEx GetBitmapForPreview(long nIndex, const Size& rSize);
void Replace(std::unique_ptr<XGradientEntry> pEntry, tools::Long nIndex);
XGradientEntry* GetGradient(tools::Long nIndex) const;
BitmapEx GetBitmapForPreview(tools::Long nIndex, const Size& rSize);
virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
virtual bool Create() override;
@@ -341,17 +341,17 @@ public:
class SVXCORE_DLLPUBLIC XBitmapList : public XPropertyList
{
private:
BitmapEx CreateBitmap( long nIndex, const Size& rSize ) const;
BitmapEx CreateBitmap( tools::Long nIndex, const Size& rSize ) const;
protected:
virtual BitmapEx CreateBitmapForUI(long nIndex) override;
virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
public:
XBitmapList(const OUString& rPath, const OUString& rReferer)
: XPropertyList(XPropertyListType::Bitmap, rPath, rReferer) {}
XBitmapEntry* GetBitmap(long nIndex) const;
BitmapEx GetBitmapForPreview(long nIndex, const Size& rSize);
XBitmapEntry* GetBitmap(tools::Long nIndex) const;
BitmapEx GetBitmapForPreview(tools::Long nIndex, const Size& rSize);
virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
virtual bool Create() override;
@@ -360,17 +360,17 @@ public:
class SVXCORE_DLLPUBLIC XPatternList : public XPropertyList
{
private:
BitmapEx CreateBitmap( long nIndex, const Size& rSize ) const;
BitmapEx CreateBitmap( tools::Long nIndex, const Size& rSize ) const;
protected:
virtual BitmapEx CreateBitmapForUI(long nIndex) override;
virtual BitmapEx CreateBitmapForUI(tools::Long nIndex) override;
public:
XPatternList(const OUString& rPath, const OUString& rReferer)
: XPropertyList(XPropertyListType::Pattern, rPath, rReferer) {}
XBitmapEntry* GetBitmap(long nIndex) const;
BitmapEx GetBitmapForPreview(long nIndex, const Size& rSize);
XBitmapEntry* GetBitmap(tools::Long nIndex) const;
BitmapEx GetBitmapForPreview(tools::Long nIndex, const Size& rSize);
virtual css::uno::Reference< css::container::XNameContainer > createInstance() override;
virtual bool Create() override;
+2 -2
View File
@@ -31,8 +31,8 @@ private:
struct SvxZoomSliderControl_Impl;
std::unique_ptr<SvxZoomSliderControl_Impl> mxImpl;
sal_uInt16 Offset2Zoom( long nOffset ) const;
long Zoom2Offset( sal_uInt16 nZoom ) const;
sal_uInt16 Offset2Zoom( tools::Long nOffset ) const;
tools::Long Zoom2Offset( sal_uInt16 nZoom ) const;
void repaintAndExecute();
void forceRepaint() const;
+2 -1
View File
@@ -16,6 +16,7 @@
#include <com/sun/star/uno/Reference.hxx>
#include <test/testdllapi.hxx>
#include <tools/long.hxx>
namespace apitest {
@@ -23,7 +24,7 @@ class OOO_DLLPUBLIC_TEST XSheetAnnotations
{
public:
virtual css::uno::Reference< css::uno::XInterface > init() = 0;
virtual css::uno::Reference< css::sheet::XSheetAnnotations> getAnnotations(long nIndex) = 0;
virtual css::uno::Reference< css::sheet::XSheetAnnotations> getAnnotations(tools::Long nIndex) = 0;
// XSheetAnnotations
void testIndex();
+2 -1
View File
@@ -31,6 +31,7 @@
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <osl/mutex.hxx>
#include <toolkit/helper/listenermultiplexer.hxx>
#include <tools/long.hxx>
#include <cppuhelper/weakref.hxx>
#include <cppuhelper/implbase9.hxx>
#include <com/sun/star/util/XModeChangeBroadcaster.hpp>
@@ -42,7 +43,7 @@ struct UnoControlComponentInfos
{
bool bVisible;
bool bEnable;
long nX, nY, nWidth, nHeight;
tools::Long nX, nY, nWidth, nHeight;
sal_uInt16 nFlags;
float nZoomX, nZoomY;
+1 -1
View File
@@ -71,7 +71,7 @@ bool ViewFilter_Application::operator () (const ThumbnailViewItem *pItem)
return true;
}
void TemplateLocalView::updateThumbnailDimensions(long itemMaxSize)
void TemplateLocalView::updateThumbnailDimensions(tools::Long itemMaxSize)
{
mnThumbnailWidth = itemMaxSize;
mnThumbnailHeight = itemMaxSize;
+9 -9
View File
@@ -394,18 +394,18 @@ void ThumbnailView::CalculateItemPositions(bool bScrollBarUsed)
mbHasVisibleItems = true;
long nFullSteps = (mnLines > mnVisLines) ? mnLines - mnVisLines + 1 : 1;
tools::Long nFullSteps = (mnLines > mnVisLines) ? mnLines - mnVisLines + 1 : 1;
long nItemHeightOffset = mnItemHeight + nVItemSpace;
long nHiddenLines = static_cast<long>((nFullSteps - 1) * nScrollRatio);
tools::Long nItemHeightOffset = mnItemHeight + nVItemSpace;
tools::Long nHiddenLines = static_cast<tools::Long>((nFullSteps - 1) * nScrollRatio);
// calculate offsets
long nStartX = nHItemSpace;
long nStartY = nVItemSpace;
tools::Long nStartX = nHItemSpace;
tools::Long nStartY = nVItemSpace;
// calculate and draw items
long x = nStartX;
long y = nStartY - ((nFullSteps - 1) * nScrollRatio - nHiddenLines) * nItemHeightOffset;
tools::Long x = nStartX;
tools::Long y = nStartY - ((nFullSteps - 1) * nScrollRatio - nHiddenLines) * nItemHeightOffset;
// draw items
// Unless we are scrolling (via scrollbar) we just use the precalculated
@@ -483,8 +483,8 @@ void ThumbnailView::CalculateItemPositions(bool bScrollBarUsed)
mxScrolledWindow->vadjustment_set_upper(mnLines * gnFineness);
mxScrolledWindow->vadjustment_set_page_size(mnVisLines * gnFineness);
if (!bScrollBarUsed)
mxScrolledWindow->vadjustment_set_value(static_cast<long>(mnFirstLine)*gnFineness);
long nPageSize = mnVisLines;
mxScrolledWindow->vadjustment_set_value(static_cast<tools::Long>(mnFirstLine)*gnFineness);
tools::Long nPageSize = mnVisLines;
if ( nPageSize < 1 )
nPageSize = 1;
mxScrolledWindow->vadjustment_set_page_increment(nPageSize*gnFineness);
+1 -1
View File
@@ -36,7 +36,7 @@ class CommonStylePreviewRenderer final : public sfx2::StylePreviewRenderer
public:
CommonStylePreviewRenderer(const SfxObjectShell& rShell, OutputDevice& rOutputDev,
SfxStyleSheetBase* pStyle, long nMaxHeight);
SfxStyleSheetBase* pStyle, tools::Long nMaxHeight);
virtual ~CommonStylePreviewRenderer() override;
virtual bool recalculate() override;
+4 -4
View File
@@ -24,7 +24,7 @@
class SdrAllPositionXItem: public SdrMetricItem {
public:
SdrAllPositionXItem(long nPosX=0): SdrMetricItem(SDRATTR_ALLPOSITIONX,nPosX) {}
SdrAllPositionXItem(tools::Long nPosX=0): SdrMetricItem(SDRATTR_ALLPOSITIONX,nPosX) {}
virtual SdrAllPositionXItem* Clone(SfxItemPool*) const override
{
return new SdrAllPositionXItem(*this);
@@ -33,7 +33,7 @@ public:
class SdrAllPositionYItem: public SdrMetricItem {
public:
SdrAllPositionYItem(long nPosY=0): SdrMetricItem(SDRATTR_ALLPOSITIONY,nPosY) {}
SdrAllPositionYItem(tools::Long nPosY=0): SdrMetricItem(SDRATTR_ALLPOSITIONY,nPosY) {}
virtual SdrAllPositionYItem* Clone(SfxItemPool*) const override
{
return new SdrAllPositionYItem(*this);
@@ -42,7 +42,7 @@ public:
class SdrAllSizeWidthItem: public SdrMetricItem {
public:
SdrAllSizeWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_ALLSIZEWIDTH,nWdt) {}
SdrAllSizeWidthItem(tools::Long nWdt=0): SdrMetricItem(SDRATTR_ALLSIZEWIDTH,nWdt) {}
virtual SdrAllSizeWidthItem* Clone(SfxItemPool*) const override
{
return new SdrAllSizeWidthItem(*this);
@@ -51,7 +51,7 @@ public:
class SdrAllSizeHeightItem: public SdrMetricItem {
public:
SdrAllSizeHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_ALLSIZEHEIGHT,nHgt) {}
SdrAllSizeHeightItem(tools::Long nHgt=0): SdrMetricItem(SDRATTR_ALLSIZEHEIGHT,nHgt) {}
virtual SdrAllSizeHeightItem* Clone(SfxItemPool*) const override
{
return new SdrAllSizeHeightItem(*this);
+1 -1
View File
@@ -34,7 +34,7 @@
class SdrCaptionAngleItem final : public SdrAngleItem {
public:
SdrCaptionAngleItem(long nAngle=0): SdrAngleItem(SDRATTR_CAPTIONANGLE,nAngle) {}
SdrCaptionAngleItem(tools::Long nAngle=0): SdrAngleItem(SDRATTR_CAPTIONANGLE,nAngle) {}
virtual SdrCaptionAngleItem* Clone(SfxItemPool*) const override
{
return new SdrCaptionAngleItem(*this);
+2 -2
View File
@@ -24,7 +24,7 @@
class SdrLogicSizeWidthItem: public SdrMetricItem {
public:
SdrLogicSizeWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_LOGICSIZEWIDTH,nWdt) {}
SdrLogicSizeWidthItem(tools::Long nWdt=0): SdrMetricItem(SDRATTR_LOGICSIZEWIDTH,nWdt) {}
virtual SdrLogicSizeWidthItem* Clone(SfxItemPool*) const override
{
return new SdrLogicSizeWidthItem(*this);
@@ -33,7 +33,7 @@ public:
class SdrLogicSizeHeightItem: public SdrMetricItem {
public:
SdrLogicSizeHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_LOGICSIZEHEIGHT,nHgt) {}
SdrLogicSizeHeightItem(tools::Long nHgt=0): SdrMetricItem(SDRATTR_LOGICSIZEHEIGHT,nHgt) {}
virtual SdrLogicSizeHeightItem* Clone(SfxItemPool*) const override
{
return new SdrLogicSizeHeightItem(*this);
+1 -1
View File
@@ -26,7 +26,7 @@
// Only of the measure arrows are on the outside
class SdrMeasureOverhangItem: public SdrMetricItem {
public:
SdrMeasureOverhangItem(long nVal): SdrMetricItem(SDRATTR_MEASUREOVERHANG,nVal) {}
SdrMeasureOverhangItem(tools::Long nVal): SdrMetricItem(SDRATTR_MEASUREOVERHANG,nVal) {}
virtual SdrMeasureOverhangItem* Clone(SfxItemPool*) const override
{
return new SdrMeasureOverhangItem(*this);
+1 -1
View File
@@ -38,7 +38,7 @@ public:
// Angle in 1/100deg from viewpoint of the user.
class SdrMeasureTextAutoAngleViewItem final : public SdrAngleItem {
public:
SdrMeasureTextAutoAngleViewItem(long nVal=31500): SdrAngleItem(SDRATTR_MEASURETEXTAUTOANGLEVIEW,nVal) {}
SdrMeasureTextAutoAngleViewItem(tools::Long nVal=31500): SdrAngleItem(SDRATTR_MEASURETEXTAUTOANGLEVIEW,nVal) {}
virtual SdrMeasureTextAutoAngleViewItem* Clone(SfxItemPool*) const override
{
return new SdrMeasureTextAutoAngleViewItem(*this);
+4 -4
View File
@@ -24,7 +24,7 @@
class SdrOnePositionXItem: public SdrMetricItem {
public:
SdrOnePositionXItem(long nPosX=0): SdrMetricItem(SDRATTR_ONEPOSITIONX,nPosX) {}
SdrOnePositionXItem(tools::Long nPosX=0): SdrMetricItem(SDRATTR_ONEPOSITIONX,nPosX) {}
virtual SdrOnePositionXItem* Clone(SfxItemPool*) const override
{
return new SdrOnePositionXItem(*this);
@@ -33,7 +33,7 @@ public:
class SdrOnePositionYItem: public SdrMetricItem {
public:
SdrOnePositionYItem(long nPosY=0): SdrMetricItem(SDRATTR_ONEPOSITIONY,nPosY) {}
SdrOnePositionYItem(tools::Long nPosY=0): SdrMetricItem(SDRATTR_ONEPOSITIONY,nPosY) {}
virtual SdrOnePositionYItem* Clone(SfxItemPool*) const override
{
return new SdrOnePositionYItem(*this);
@@ -42,7 +42,7 @@ public:
class SdrOneSizeWidthItem: public SdrMetricItem {
public:
SdrOneSizeWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_ONESIZEWIDTH,nWdt) {}
SdrOneSizeWidthItem(tools::Long nWdt=0): SdrMetricItem(SDRATTR_ONESIZEWIDTH,nWdt) {}
virtual SdrOneSizeWidthItem* Clone(SfxItemPool*) const override
{
return new SdrOneSizeWidthItem(*this);
@@ -51,7 +51,7 @@ public:
class SdrOneSizeHeightItem: public SdrMetricItem {
public:
SdrOneSizeHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_ONESIZEHEIGHT,nHgt) {}
SdrOneSizeHeightItem(tools::Long nHgt=0): SdrMetricItem(SDRATTR_ONESIZEHEIGHT,nHgt) {}
virtual SdrOneSizeHeightItem* Clone(SfxItemPool*) const override
{
return new SdrOneSizeHeightItem(*this);
+1 -1
View File
@@ -24,7 +24,7 @@
class SdrShearAngleItem: public SdrAngleItem {
public:
SdrShearAngleItem(long nAngle=0): SdrAngleItem(SDRATTR_SHEARANGLE,nAngle) {}
SdrShearAngleItem(tools::Long nAngle=0): SdrAngleItem(SDRATTR_SHEARANGLE,nAngle) {}
virtual SdrShearAngleItem* Clone(SfxItemPool*) const override
{
return new SdrShearAngleItem(*this);
+4 -4
View File
@@ -24,7 +24,7 @@
class SdrTransformRef1XItem: public SdrMetricItem {
public:
SdrTransformRef1XItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF1X,nHgt) {}
SdrTransformRef1XItem(tools::Long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF1X,nHgt) {}
virtual SdrTransformRef1XItem* Clone(SfxItemPool*) const override
{
return new SdrTransformRef1XItem(*this);
@@ -33,7 +33,7 @@ public:
class SdrTransformRef1YItem: public SdrMetricItem {
public:
SdrTransformRef1YItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF1Y,nHgt) {}
SdrTransformRef1YItem(tools::Long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF1Y,nHgt) {}
virtual SdrTransformRef1YItem* Clone(SfxItemPool*) const override
{
return new SdrTransformRef1YItem(*this);
@@ -42,7 +42,7 @@ public:
class SdrTransformRef2XItem: public SdrMetricItem {
public:
SdrTransformRef2XItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF2X,nHgt) {}
SdrTransformRef2XItem(tools::Long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF2X,nHgt) {}
virtual SdrTransformRef2XItem* Clone(SfxItemPool*) const override
{
return new SdrTransformRef2XItem(*this);
@@ -51,7 +51,7 @@ public:
class SdrTransformRef2YItem: public SdrMetricItem {
public:
SdrTransformRef2YItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF2Y,nHgt) {}
SdrTransformRef2YItem(tools::Long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF2Y,nHgt) {}
virtual SdrTransformRef2YItem* Clone(SfxItemPool*) const override
{
return new SdrTransformRef2YItem(*this);
+2 -2
View File
@@ -104,7 +104,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testViewBoxLeftTop)
awt::Rectangle aBoundRectLR;
xShapeLRProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRectLR;
// difference should be zero, but allow some rounding errors
CPPUNIT_ASSERT_LESS(static_cast<long>(3), labs(aFrameRectLR.X - aBoundRectLR.X));
CPPUNIT_ASSERT_LESS(static_cast<tools::Long>(3), labs(aFrameRectLR.X - aBoundRectLR.X));
// Get the shape "topbottom". Error was, that the identifier "top" was always set to zero, thus
// the path was outside the frame rectangle for a viewBox having a positive "top" value.
@@ -116,7 +116,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testViewBoxLeftTop)
awt::Rectangle aBoundRectTB;
xShapeTBProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRectTB;
// difference should be zero, but allow some rounding errors
CPPUNIT_ASSERT_LESS(static_cast<long>(3), labs(aFrameRectTB.Y - aBoundRectTB.Y));
CPPUNIT_ASSERT_LESS(static_cast<tools::Long>(3), labs(aFrameRectTB.Y - aBoundRectTB.Y));
}
CPPUNIT_TEST_FIXTURE(CustomshapesTest, testAccuracyCommandX)
+3 -3
View File
@@ -49,17 +49,17 @@ ChildrenManager::~ChildrenManager()
SAL_INFO("svx", "~ChildrenManager");
}
long ChildrenManager::GetChildCount() const throw ()
tools::Long ChildrenManager::GetChildCount() const throw ()
{
return mpImpl->GetChildCount();
}
css::uno::Reference<XAccessible> ChildrenManager::GetChild (long nIndex)
css::uno::Reference<XAccessible> ChildrenManager::GetChild (tools::Long nIndex)
{
return mpImpl->GetChild (nIndex);
}
css::uno::Reference<css::drawing::XShape> ChildrenManager::GetChildShape(long nIndex)
css::uno::Reference<css::drawing::XShape> ChildrenManager::GetChildShape(tools::Long nIndex)
{
return mpImpl->GetChildShape(nIndex);
}
@@ -109,13 +109,13 @@ void ChildrenManagerImpl::Init()
}
long ChildrenManagerImpl::GetChildCount() const throw ()
tools::Long ChildrenManagerImpl::GetChildCount() const throw ()
{
return maVisibleChildren.size();
}
css::uno::Reference<css::drawing::XShape> ChildrenManagerImpl::GetChildShape(long nIndex)
css::uno::Reference<css::drawing::XShape> ChildrenManagerImpl::GetChildShape(tools::Long nIndex)
{
uno::Reference<XAccessible> xAcc = GetChild(nIndex);
auto I = std::find_if(maVisibleChildren.begin(), maVisibleChildren.end(),
@@ -129,7 +129,7 @@ css::uno::Reference<css::drawing::XShape> ChildrenManagerImpl::GetChildShape(lon
yet in the cache.
*/
uno::Reference<XAccessible>
ChildrenManagerImpl::GetChild (long nIndex)
ChildrenManagerImpl::GetChild (tools::Long nIndex)
{
// Check whether the given index is valid.
if (nIndex < 0 || o3tl::make_unsigned(nIndex) >= maVisibleChildren.size())
@@ -710,7 +710,7 @@ void ChildrenManagerImpl::ViewForwarderChanged()
bool ChildrenManagerImpl::ReplaceChild (
AccessibleShape* pCurrentChild,
const css::uno::Reference< css::drawing::XShape >& _rxShape,
const long /*_nIndex*/,
const tools::Long /*_nIndex*/,
const AccessibleShapeTreeInfo& _rShapeTreeInfo)
{
// Iterate over the visible children. If one of them has an already
@@ -116,11 +116,11 @@ public:
@return
If there are no children a 0 is returned.
*/
long GetChildCount() const throw ();
tools::Long GetChildCount() const throw ();
/// @throws css::uno::RuntimeException
/// @throws css::lang::IndexOutOfBoundsException
css::uno::Reference<css::drawing::XShape> GetChildShape(long nIndex);
css::uno::Reference<css::drawing::XShape> GetChildShape(tools::Long nIndex);
/** Return the requested accessible child or throw and
IndexOutOfBoundsException if the given index is invalid.
@param nIndex
@@ -135,7 +135,7 @@ public:
Throws an IndexOutOfBoundsException if the index is not valid.
*/
css::uno::Reference<css::accessibility::XAccessible>
GetChild (long nIndex);
GetChild (tools::Long nIndex);
/** Return the requested accessible child.
@param aChildDescriptor
@@ -256,7 +256,7 @@ public:
virtual bool ReplaceChild (
AccessibleShape* pCurrentChild,
const css::uno::Reference< css::drawing::XShape >& _rxShape,
const long _nIndex,
const tools::Long _nIndex,
const AccessibleShapeTreeInfo& _rShapeTreeInfo
) override;
@@ -162,7 +162,7 @@ void DescriptionGenerator::AddColor (const OUString& sPropertyName)
try
{
long nValue(0);
tools::Long nValue(0);
if (mxSet.is())
{
uno::Any aValue = mxSet->getPropertyValue (sPropertyName);
@@ -187,7 +187,7 @@ void DescriptionGenerator::AddInteger (const OUString& sPropertyName)
if (mxSet.is())
{
uno::Any aValue = mxSet->getPropertyValue (sPropertyName);
long nValue = 0;
tools::Long nValue = 0;
aValue >>= nValue;
msDescription.append (nValue);
}
@@ -621,7 +621,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::deselectAccessibleChild( sal_Int32
}
// internals
void SvxGraphCtrlAccessibleContext::checkChildIndexOnSelection( long nIndex )
void SvxGraphCtrlAccessibleContext::checkChildIndexOnSelection( tools::Long nIndex )
{
if( nIndex < 0 || nIndex >= getSelectedAccessibleChildCount() )
throw lang::IndexOutOfBoundsException();

Some files were not shown because too many files have changed in this diff Show More