diff options
90 files changed, 571 insertions, 192 deletions
diff --git a/canvas/source/opengl/ogl_canvastools.hxx b/canvas/source/opengl/ogl_canvastools.hxx index 4382258107eb..0378626571d5 100644 --- a/canvas/source/opengl/ogl_canvastools.hxx +++ b/canvas/source/opengl/ogl_canvastools.hxx @@ -26,8 +26,8 @@ namespace oglcanvas void renderComplexPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPoly ); void renderPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPoly ); void setupState( const ::basegfx::B2DHomMatrix& rTransform, - unsigned int eSrcBlend, - unsigned int eDstBlend, + GLenum eSrcBlend, + GLenum eDstBlend, const com::sun::star::rendering::ARGBColor& rColor ); void renderOSD( const std::vector<double>& rNumbers, double scale ); diff --git a/canvas/source/tools/surface.hxx b/canvas/source/tools/surface.hxx index ac45ea1965f1..b941e9d09618 100644 --- a/canvas/source/tools/surface.hxx +++ b/canvas/source/tools/surface.hxx @@ -87,7 +87,7 @@ namespace canvas bool drawRectangularArea( double fAlpha, const ::basegfx::B2DPoint& rPos, - const ::basegfx::B2DRange& rArea, + const ::basegfx::B2DRectangle& rArea, const ::basegfx::B2DHomMatrix& rTransform ); /** Render the surface content to screen. diff --git a/chart2/source/tools/InternalData.cxx b/chart2/source/tools/InternalData.cxx index e82dd86a4bd5..b99578fab118 100644 --- a/chart2/source/tools/InternalData.cxx +++ b/chart2/source/tools/InternalData.cxx @@ -472,7 +472,7 @@ void InternalData::deleteRow( sal_Int32 nAtIndex ) dump(); } -void InternalData::setComplexRowLabels( const vector< vector< uno::Any > >& rNewRowLabels ) +void InternalData::setComplexRowLabels( const tVecVecAny& rNewRowLabels ) { m_aRowLabels = rNewRowLabels; sal_Int32 nNewRowCount = static_cast< sal_Int32 >( m_aRowLabels.size() ); @@ -487,7 +487,7 @@ const InternalData::tVecVecAny& InternalData::getComplexRowLabels() const return m_aRowLabels; } -void InternalData::setComplexColumnLabels( const vector< vector< uno::Any > >& rNewColumnLabels ) +void InternalData::setComplexColumnLabels( const tVecVecAny& rNewColumnLabels ) { m_aColumnLabels = rNewColumnLabels; sal_Int32 nNewColumnCount = static_cast< sal_Int32 >( m_aColumnLabels.size() ); diff --git a/compilerplugins/clang/test/typedefparam.cxx b/compilerplugins/clang/test/typedefparam.cxx new file mode 100644 index 000000000000..ed2f8d7017a3 --- /dev/null +++ b/compilerplugins/clang/test/typedefparam.cxx @@ -0,0 +1,80 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include "tools/solar.h" + +namespace test1 +{ +class Foo +{ + void bar(sal_uIntPtr x); // expected-note {{declaration site here [loplugin:typedefparam]}} + sal_uIntPtr bar(); // expected-note {{declaration site here [loplugin:typedefparam]}} +}; + +void Foo::bar(sal_uLong) +// expected-error@-1 {{function param 0 at definition site does not match function param at declaration site, 'sal_uLong' (aka 'unsigned long') vs 'sal_uIntPtr' (aka 'unsigned long') [loplugin:typedefparam]}} +{ +} + +sal_uLong Foo::bar() +// expected-error@-1 {{function return type at definition site does not match function param at declaration site, 'sal_uLong' (aka 'unsigned long') vs 'sal_uIntPtr' (aka 'unsigned long') [loplugin:typedefparam]}} +{ + return 1; +} +}; + +// Carve out an exception for the "typedef struct S {...} T" idiom we use in the UNO code +namespace test2 +{ +typedef struct Foo +{ + int x; +} FooT; + +void bar(struct Foo*); + +void bar(FooT*){ + // no warning expected +}; +}; +namespace test3 +{ +typedef struct Foo +{ + int x; +} FooT; + +void bar(Foo*); + +void bar(FooT*){ + // no warning expected +}; +}; + +// check method overrides +namespace test4 +{ +struct Struct1 +{ + virtual sal_uIntPtr foo1(); + // expected-note@-1 {{super-class method here [loplugin:typedefparam]}} + virtual void foo2(sal_uIntPtr); + // expected-note@-1 {{super-class method here [loplugin:typedefparam]}} + virtual ~Struct1(); +}; +struct Struct2 : public Struct1 +{ + virtual sal_uLong foo1() override; + // expected-error@-1 {{method return type does not match overridden method 'sal_uLong' (aka 'unsigned long') vs 'sal_uIntPtr' (aka 'unsigned long') [loplugin:typedefparam]}} + virtual void foo2(sal_uLong) override; + // expected-error@-1 {{method param 0 does not match overridden method param 'sal_uLong' (aka 'unsigned long') vs 'sal_uIntPtr' (aka 'unsigned long') [loplugin:typedefparam]}} +}; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/typedefparam.cxx b/compilerplugins/clang/typedefparam.cxx new file mode 100644 index 000000000000..b3fa70f97532 --- /dev/null +++ b/compilerplugins/clang/typedefparam.cxx @@ -0,0 +1,291 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <cassert> +#include <string> +#include <iostream> +#include <fstream> +#include <set> +#include "plugin.hxx" + +/** + Check that parameters at the declaration site and the definition site are the same. + This can be important when refactoring, and can sometimes make a difference when compiling + for platforms with different pointer-sizes (e.g. 32 vs 64 bit) + */ +namespace +{ +class TypedefParam : public loplugin::FilteringRewritePlugin<TypedefParam> +{ +public: + explicit TypedefParam(loplugin::InstantiationData const& data) + : FilteringRewritePlugin(data) + { + } + + virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } + + bool VisitFunctionDecl(FunctionDecl const*); + bool VisitCXXMethodDecl(CXXMethodDecl const*); +}; + +static bool areTypesEqual(QualType lhs, QualType rhs); + +bool TypedefParam::VisitFunctionDecl(FunctionDecl const* functionDecl) +{ + if (ignoreLocation(functionDecl)) + return true; + if (functionDecl->isFunctionTemplateSpecialization()) + return true; + auto canonicalDecl = functionDecl->getCanonicalDecl(); + if (canonicalDecl == functionDecl) + return true; + + for (unsigned i = 0; i < functionDecl->getNumParams(); ++i) + { + ParmVarDecl const* thisParam = functionDecl->getParamDecl(i); + ParmVarDecl const* canonicalParam = canonicalDecl->getParamDecl(i); + if (!areTypesEqual(thisParam->getType(), canonicalParam->getType())) + { + report(DiagnosticsEngine::Warning, + "function param %0 at definition site does not match function param at " + "declaration site, %1 vs %2", + compat::getBeginLoc(functionDecl)) + << i << thisParam->getType() << canonicalParam->getType() + << functionDecl->getSourceRange(); + report(DiagnosticsEngine::Note, "declaration site here", + compat::getBeginLoc(canonicalDecl)) + << canonicalDecl->getSourceRange(); + thisParam->getType()->dump(); + canonicalParam->getType()->dump(); + } + } + + if (!areTypesEqual(functionDecl->getReturnType(), canonicalDecl->getReturnType())) + { + report(DiagnosticsEngine::Warning, + "function return type at definition site does not match function param at " + "declaration site, %0 vs %1", + compat::getBeginLoc(functionDecl)) + << functionDecl->getReturnType() << canonicalDecl->getReturnType() + << functionDecl->getSourceRange(); + report(DiagnosticsEngine::Note, "declaration site here", compat::getBeginLoc(canonicalDecl)) + << canonicalDecl->getSourceRange(); + functionDecl->getReturnType()->dump(); + canonicalDecl->getReturnType()->dump(); + } + return true; +} + +bool TypedefParam::VisitCXXMethodDecl(CXXMethodDecl const* methodDecl) +{ + if (ignoreLocation(methodDecl)) + return true; + if (methodDecl->isFunctionTemplateSpecialization()) + return true; + // only warn on the declaration site + if (methodDecl->getCanonicalDecl() != methodDecl) + return true; + + StringRef aFileName = getFileNameOfSpellingLoc( + compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(methodDecl))); + // seems to be using typedefs as a form of documentation for method params + if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/sw/source/filter/ww8/ww8scan.hxx")) + return true; + // necessary to work around changes in popplers API + if (loplugin::hasPathnamePrefix(aFileName, SRCDIR + "/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx")) + return true; + + for (auto superMethodIt = methodDecl->begin_overridden_methods(); + superMethodIt != methodDecl->end_overridden_methods(); ++superMethodIt) + { + const CXXMethodDecl* superMethodDecl = *superMethodIt; + int i = 0; + for (const ParmVarDecl* superParmVarDecl : superMethodDecl->parameters()) + { + const ParmVarDecl* parmVarDecl = methodDecl->getParamDecl(i); + if (!areTypesEqual(parmVarDecl->getType(), superParmVarDecl->getType())) + { + report(DiagnosticsEngine::Warning, + "method param %0 does not match overridden method param " + "%1 vs %2", + compat::getBeginLoc(methodDecl)) + << i << parmVarDecl->getType() << superParmVarDecl->getType() + << methodDecl->getSourceRange(); + report(DiagnosticsEngine::Note, "super-class method here", + compat::getBeginLoc(superMethodDecl)) + << superMethodDecl->getSourceRange(); + parmVarDecl->getType()->dump(); + superParmVarDecl->getType()->dump(); + } + ++i; + } + + // it is quite normal to override a method and return a more specific pointer/reference type + auto returnType = methodDecl->getReturnType(); + if (!returnType->isPointerType() && !returnType->isReferenceType()) + if (!areTypesEqual(returnType, superMethodDecl->getReturnType())) + { + report(DiagnosticsEngine::Warning, + "method return type does not match overridden method " + "%0 vs %1", + compat::getBeginLoc(methodDecl)) + << methodDecl->getReturnType() << superMethodDecl->getReturnType() + << methodDecl->getSourceRange(); + report(DiagnosticsEngine::Note, "super-class method here", + compat::getBeginLoc(superMethodDecl)) + << superMethodDecl->getSourceRange(); + returnType->dump(); + superMethodDecl->getReturnType()->dump(); + } + } + return true; +} + +static bool areTypesEqual(QualType lhs, QualType rhs) +{ + if (lhs == rhs) + return true; + + // ignore template stuff + if (lhs->isDependentType() || rhs->isDependentType()) + return true; + // there are some places, e.g. chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx + // where just unwrapping these types does not work, so just ignore them + if (isa<SubstTemplateTypeParmType>(lhs) || isa<SubstTemplateTypeParmType>(rhs)) + return true; + + auto lhsType = lhs.getTypePtr(); + auto rhsType = rhs.getTypePtr(); + + // this is the carve-out exception for the "typedef struct S {...} T" idiom we use in the UNO code + if (auto lhsPointer = dyn_cast<clang::PointerType>(lhsType)) + { + if (auto rhsPointer = dyn_cast<clang::PointerType>(rhsType)) + { + auto extractRecordType = [](clang::QualType type) { + auto recordType = dyn_cast<RecordType>(type); + if (recordType) + return recordType; + auto elaboratedType = dyn_cast<ElaboratedType>(type); + if (!elaboratedType) + return static_cast<const clang::RecordType*>(nullptr); + return dyn_cast<RecordType>(elaboratedType->desugar()); + }; + auto containsTypedefToRecord = [](clang::QualType type, RecordType const* recordType) { + TypedefType const* typedefType = dyn_cast<TypedefType>(type); + if (!typedefType) + return false; + auto tmp = typedefType->desugar(); + if (auto elaboratedType = dyn_cast<ElaboratedType>(tmp)) + tmp = elaboratedType->desugar(); + return tmp.getTypePtr() == recordType; + }; + if (auto recordType = extractRecordType(lhsPointer->getPointeeType())) + if (containsTypedefToRecord(rhsPointer->getPointeeType(), recordType)) + return true; + if (auto recordType = extractRecordType(rhsPointer->getPointeeType())) + if (containsTypedefToRecord(lhsPointer->getPointeeType(), recordType)) + return true; + } + } + + if (auto lhsElaborated = dyn_cast<ElaboratedType>(lhsType)) + { + return areTypesEqual(lhsElaborated->getNamedType(), rhs); + } + if (auto rhsElaborated = dyn_cast<ElaboratedType>(rhsType)) + { + return areTypesEqual(lhs, rhsElaborated->getNamedType()); + } + if (auto lhsTemplate = dyn_cast<TemplateSpecializationType>(lhsType)) + { + return areTypesEqual(lhsTemplate->desugar(), rhs); + } + if (auto rhsTemplate = dyn_cast<TemplateSpecializationType>(rhsType)) + { + return areTypesEqual(lhs, rhsTemplate->desugar()); + } + + if (auto lhsLValue = dyn_cast<LValueReferenceType>(lhsType)) + { + auto rhsLValue = dyn_cast<LValueReferenceType>(rhsType); + if (!rhsLValue) + return false; + return areTypesEqual(lhsLValue->getPointeeType(), rhsLValue->getPointeeType()); + } + if (auto lhsRValue = dyn_cast<RValueReferenceType>(lhsType)) + { + auto rhsRValue = dyn_cast<RValueReferenceType>(rhsType); + if (!rhsRValue) + return false; + return areTypesEqual(lhsRValue->getPointeeType(), rhsRValue->getPointeeType()); + } + if (auto lhsPointer = dyn_cast<clang::PointerType>(lhsType)) + { + auto rhsPointer = dyn_cast<clang::PointerType>(rhsType); + if (!rhsPointer) + return false; + return areTypesEqual(lhsPointer->getPointeeType(), rhsPointer->getPointeeType()); + } + if (auto lhsTypedef = dyn_cast<TypedefType>(lhsType)) + { + auto rhsTypedef = dyn_cast<TypedefType>(rhsType); + if (!rhsTypedef) + return false; + // comparing the underlying Decl's here doesn't work, they are not uniqued + if (lhsTypedef->getDecl()->getName() != rhsTypedef->getDecl()->getName()) + return false; + return areTypesEqual(lhsTypedef->desugar(), rhsTypedef->desugar()); + } + if (auto lhsTemplate = dyn_cast<TemplateSpecializationType>(lhsType)) + { + auto rhsTemplate = dyn_cast<TemplateSpecializationType>(rhsType); + if (!rhsTemplate) + return false; + return areTypesEqual(lhsTemplate->desugar(), rhsTemplate->desugar()); + } + if (auto lhsMember = dyn_cast<MemberPointerType>(lhsType)) + { + auto rhsMember = dyn_cast<MemberPointerType>(rhsType); + if (!rhsMember) + return false; + if (lhsMember->getClass() != rhsMember->getClass()) + return true; + return areTypesEqual(lhsMember->getPointeeType(), rhsMember->getPointeeType()); + } + if (auto lhsParen = dyn_cast<ParenType>(lhsType)) + { + auto rhsParen = dyn_cast<ParenType>(rhsType); + if (!rhsParen) + return false; + return areTypesEqual(lhsParen->getInnerType(), rhsParen->getInnerType()); + } + if (dyn_cast<FunctionProtoType>(lhsType)) + { + auto rhsFunction = dyn_cast<FunctionProtoType>(rhsType); + if (!rhsFunction) + return false; + return true; // TODO + } + if (auto lhsDecayed = dyn_cast<DecayedType>(lhsType)) + { + auto rhsDecayed = dyn_cast<DecayedType>(rhsType); + if (!rhsDecayed) + return false; + return areTypesEqual(lhsDecayed->getAdjustedType(), rhsDecayed->getAdjustedType()); + } + return lhsType == rhsType; +} + +loplugin::Plugin::Registration<TypedefParam> X("typedefparam", true); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mysqlc/mysqlc_connection.hxx b/connectivity/source/drivers/mysqlc/mysqlc_connection.hxx index cccbb294e204..0e52e9281f4b 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_connection.hxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_connection.hxx @@ -60,7 +60,6 @@ namespace mysqlc using ::com::sun::star::sdbc::SQLException; using ::com::sun::star::sdbc::SQLWarning; using ::com::sun::star::uno::RuntimeException; -typedef css::uno::Reference<css::container::XNameAccess> my_XNameAccessRef; typedef ::cppu::WeakComponentImplHelper3<css::sdbc::XConnection, css::sdbc::XWarningsSupplier, css::lang::XServiceInfo> @@ -161,9 +160,10 @@ public: sal_Int32 SAL_CALL getTransactionIsolation() override; - my_XNameAccessRef SAL_CALL getTypeMap() override; + css::uno::Reference<css::container::XNameAccess> SAL_CALL getTypeMap() override; - void SAL_CALL setTypeMap(const my_XNameAccessRef& typeMap) override; + void SAL_CALL + setTypeMap(const css::uno::Reference<css::container::XNameAccess>& typeMap) override; // XCloseable void SAL_CALL close() override; // XWarningsSupplier diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx index 647d872c50d8..89e302eb08c7 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx @@ -167,7 +167,8 @@ public: css::uno::Reference<css::io::XInputStream> SAL_CALL getCharacterStream(sal_Int32 column) override; - Any SAL_CALL getObject(sal_Int32 column, const my_XNameAccessRef& typeMap) override; + Any SAL_CALL getObject( + sal_Int32 column, const css::uno::Reference<css::container::XNameAccess>& typeMap) override; css::uno::Reference<css::sdbc::XRef> SAL_CALL getRef(sal_Int32 column) override; css::uno::Reference<css::sdbc::XBlob> SAL_CALL getBlob(sal_Int32 column) override; diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultset.hxx b/connectivity/source/drivers/mysqlc/mysqlc_resultset.hxx index e87a4efef73e..027cc294c153 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_resultset.hxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_resultset.hxx @@ -199,7 +199,8 @@ public: css::uno::Reference<css::io::XInputStream> SAL_CALL getCharacterStream(sal_Int32 column) override; - Any SAL_CALL getObject(sal_Int32 column, const my_XNameAccessRef& typeMap) override; + Any SAL_CALL getObject( + sal_Int32 column, const css::uno::Reference<css::container::XNameAccess>& typeMap) override; css::uno::Reference<css::sdbc::XRef> SAL_CALL getRef(sal_Int32 column) override; css::uno::Reference<css::sdbc::XBlob> SAL_CALL getBlob(sal_Int32 column) override; diff --git a/cppuhelper/source/implementationentry.cxx b/cppuhelper/source/implementationentry.cxx index 2e5891982b8e..ba4e72833f4a 100644 --- a/cppuhelper/source/implementationentry.cxx +++ b/cppuhelper/source/implementationentry.cxx @@ -31,7 +31,7 @@ namespace cppu { sal_Bool component_writeInfoHelper( SAL_UNUSED_PARAMETER void *, void * pRegistryKey, - ImplementationEntry const * entries) + const struct ImplementationEntry entries[]) { bool bRet = false; try @@ -61,8 +61,8 @@ sal_Bool component_writeInfoHelper( void * component_getFactoryHelper( - char const * pImplName, SAL_UNUSED_PARAMETER void *, - SAL_UNUSED_PARAMETER void *, ImplementationEntry const * entries) + sal_Char const * pImplName, SAL_UNUSED_PARAMETER void *, + SAL_UNUSED_PARAMETER void *, const struct ImplementationEntry entries[]) { void * pRet = nullptr; diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 30f5cd6980e7..6f63cb7d45b8 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -101,7 +101,7 @@ namespace svx const OUString& getSecondaryText() const { return m_sSecondaryText; } public: - void Paint( OutputDevice& _rDevice, const ::tools::Rectangle& _rRect, DrawTextFlags _nTextStyle, + void Paint( vcl::RenderContext& _rDevice, const ::tools::Rectangle& _rRect, DrawTextFlags _nTextStyle, ::tools::Rectangle* _pPrimaryLocation, ::tools::Rectangle* _pSecondaryLocation ); }; diff --git a/dbaccess/source/filter/hsqldb/hsqlbinarynode.cxx b/dbaccess/source/filter/hsqldb/hsqlbinarynode.cxx index 89371c735c44..ec5572667dea 100644 --- a/dbaccess/source/filter/hsqldb/hsqlbinarynode.cxx +++ b/dbaccess/source/filter/hsqldb/hsqlbinarynode.cxx @@ -48,7 +48,7 @@ void HsqlBinaryNode::readChildren(HsqlRowInputStream const& input) } std::vector<css::uno::Any> HsqlBinaryNode::readRow(HsqlRowInputStream& input, - const ColumnTypeVector& aColTypes, + const std::vector<ColumnDefinition>& aColTypes, sal_Int32 nIndexCount) { // skip first 4 bytes (size), and index nodes, 16 bytes each diff --git a/dbaccess/source/filter/hsqldb/hsqlimport.cxx b/dbaccess/source/filter/hsqldb/hsqlimport.cxx index b29889c1b6cd..dc5b51cc07ce 100644 --- a/dbaccess/source/filter/hsqldb/hsqlimport.cxx +++ b/dbaccess/source/filter/hsqldb/hsqlimport.cxx @@ -48,12 +48,8 @@ using namespace css::io; using namespace css::uno; using namespace css::sdbc; -using ColumnTypeVector = std::vector<dbahsql::ColumnDefinition>; -using RowVector = std::vector<Any>; -using IndexVector = std::vector<sal_Int32>; - -void lcl_setParams(const RowVector& row, Reference<XParameters> const& xParam, - const ColumnTypeVector& rColTypes) +void lcl_setParams(const std::vector<Any>& row, Reference<XParameters> const& xParam, + const std::vector<dbahsql::ColumnDefinition>& rColTypes) { assert(row.size() == rColTypes.size()); size_t nColIndex = 0; @@ -182,7 +178,8 @@ void lcl_setParams(const RowVector& row, Reference<XParameters> const& xParam, } } -OUString lcl_createInsertStatement(const OUString& sTableName, const ColumnTypeVector& rColTypes) +OUString lcl_createInsertStatement(const OUString& sTableName, + const std::vector<dbahsql::ColumnDefinition>& rColTypes) { assert(rColTypes.size() > 0); OUStringBuffer sql("INSERT INTO "); @@ -221,8 +218,8 @@ HsqlImporter::HsqlImporter(Reference<XConnection>& rConnection, const Reference< m_xStorage.set(rStorage); } -void HsqlImporter::insertRow(const RowVector& xRows, const OUString& sTableName, - const ColumnTypeVector& rColTypes) +void HsqlImporter::insertRow(const std::vector<css::uno::Any>& xRows, const OUString& sTableName, + const std::vector<ColumnDefinition>& rColTypes) { OUString sStatement = lcl_createInsertStatement(sTableName, rColTypes); Reference<XPreparedStatement> xStatement = m_rConnection->prepareStatement(sStatement); @@ -236,8 +233,8 @@ void HsqlImporter::insertRow(const RowVector& xRows, const OUString& sTableName, } void HsqlImporter::processTree(HsqlBinaryNode& rNode, HsqlRowInputStream& rStream, - const ColumnTypeVector& rColTypes, const OUString& sTableName, - sal_Int32 nIndexCount) + const std::vector<ColumnDefinition>& rColTypes, + const OUString& sTableName, sal_Int32 nIndexCount) { rNode.readChildren(rStream); sal_Int32 nNext = rNode.getLeft(); @@ -267,7 +264,7 @@ void HsqlImporter::processTree(HsqlBinaryNode& rNode, HsqlRowInputStream& rStrea * Balance: ? * Left/Right/Parent: File position of the Left/Right/Parent child */ -void HsqlImporter::parseTableRows(const IndexVector& rIndexes, +void HsqlImporter::parseTableRows(const std::vector<sal_Int32>& rIndexes, const std::vector<ColumnDefinition>& rColTypes, const OUString& sTableName) { diff --git a/dbaccess/source/filter/hsqldb/parseschema.cxx b/dbaccess/source/filter/hsqldb/parseschema.cxx index e04998c80f28..be08037b7be5 100644 --- a/dbaccess/source/filter/hsqldb/parseschema.cxx +++ b/dbaccess/source/filter/hsqldb/parseschema.cxx @@ -167,7 +167,7 @@ void SchemaParser::parseSchema() } } -ColumnTypeVector SchemaParser::getTableColumnTypes(const OUString& sTableName) const +std::vector<ColumnDefinition> SchemaParser::getTableColumnTypes(const OUString& sTableName) const { return m_ColumnTypes.at(sTableName); } diff --git a/dbaccess/source/filter/hsqldb/rowinputbinary.cxx b/dbaccess/source/filter/hsqldb/rowinputbinary.cxx index 5a447cacb4f3..24448f627971 100644 --- a/dbaccess/source/filter/hsqldb/rowinputbinary.cxx +++ b/dbaccess/source/filter/hsqldb/rowinputbinary.cxx @@ -134,8 +134,6 @@ using namespace css::io; using namespace boost::posix_time; using namespace boost::gregorian; -typedef std::vector<ColumnDefinition> ColumnTypeVector; - HsqlRowInputStream::HsqlRowInputStream() {} void HsqlRowInputStream::setInputStream(Reference<XInputStream> const& rStream) @@ -239,7 +237,7 @@ bool HsqlRowInputStream::checkNull() return nNull == 0; } -std::vector<Any> HsqlRowInputStream::readOneRow(const ColumnTypeVector& nColTypes) +std::vector<Any> HsqlRowInputStream::readOneRow(const std::vector<ColumnDefinition>& nColTypes) { auto nLen = nColTypes.size(); std::vector<Any> aData; diff --git a/dbaccess/source/ui/misc/charsets.cxx b/dbaccess/source/ui/misc/charsets.cxx index e068c18f98ef..9404d777cea5 100644 --- a/dbaccess/source/ui/misc/charsets.cxx +++ b/dbaccess/source/ui/misc/charsets.cxx @@ -86,7 +86,7 @@ namespace dbaui { } - CharsetDisplayDerefHelper::CharsetDisplayDerefHelper(const CharsetDisplayDerefHelper_Base& _rBase, const OUString& _rDisplayName) + CharsetDisplayDerefHelper::CharsetDisplayDerefHelper(const ::dbtools::CharsetIteratorDerefHelper& _rBase, const OUString& _rDisplayName) :CharsetDisplayDerefHelper_Base(_rBase) ,m_sDisplayName(_rDisplayName) { diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx index f601c8a78187..f67a4e777a96 100644 --- a/hwpfilter/source/hcode.cxx +++ b/hwpfilter/source/hcode.cxx @@ -1206,7 +1206,7 @@ hchar_string hstr2ucsstr(hchar const* hstr) * Convert strings of kchar type, which can contain Korean, English and others * to strings of hchar type of Hangul Word Processor */ -hchar_string kstr2hstr(unsigned char const* src) +hchar_string kstr2hstr(uchar const* src) { hchar_string ret; if (!src) diff --git a/include/canvas/spriteredrawmanager.hxx b/include/canvas/spriteredrawmanager.hxx index 3115fe5d3f84..093f1a32e392 100644 --- a/include/canvas/spriteredrawmanager.hxx +++ b/include/canvas/spriteredrawmanager.hxx @@ -24,6 +24,7 @@ #include <basegfx/point/b2dpoint.hxx> #include <basegfx/vector/b2dvector.hxx> #include <basegfx/range/b2drange.hxx> +#include <basegfx/range/b2drectangle.hxx> #include <vector> #include <algorithm> @@ -359,8 +360,8 @@ namespace canvas bool areSpritesChanged( const UpdateArea& rUpdateArea ) const; - bool isAreaUpdateNotOpaque( const ::basegfx::B2DRange& rUpdateRect, - const AreaComponent& rComponent ) const; + bool isAreaUpdateNotOpaque( const ::basegfx::B2DRectangle& rUpdateRect, + const AreaComponent& rComponent ) const; bool isAreaUpdateOpaque( const UpdateArea& rUpdateArea, ::std::size_t nNumSprites ) const; @@ -378,8 +379,8 @@ namespace canvas @param rUpdateArea Area to check for scroll update optimization */ - bool isAreaUpdateScroll( ::basegfx::B2DRange& o_rMoveStart, - ::basegfx::B2DRange& o_rMoveEnd, + bool isAreaUpdateScroll( ::basegfx::B2DRectangle& o_rMoveStart, + ::basegfx::B2DRectangle& o_rMoveEnd, const UpdateArea& rUpdateArea, ::std::size_t nNumSprites ) const; diff --git a/include/comphelper/listenernotification.hxx b/include/comphelper/listenernotification.hxx index cadb85297d8f..a92ea7ecd04b 100644 --- a/include/comphelper/listenernotification.hxx +++ b/include/comphelper/listenernotification.hxx @@ -216,14 +216,10 @@ namespace comphelper /** is a specialization of OListenerContainer which saves you some additional type casts, by making the required listener and event types template arguments. */ - template< class LISTENER, class EVENT > + template< class ListenerClass, class EventClass > class OListenerContainerBase : public OListenerContainer { public: - typedef LISTENER ListenerClass; - typedef EVENT EventClass; - - public: OListenerContainerBase( ::osl::Mutex& _rMutex ) : OListenerContainer( _rMutex ) { } diff --git a/include/oox/ppt/slidepersist.hxx b/include/oox/ppt/slidepersist.hxx index 9355b7881788..4d4c4d3cf4f8 100644 --- a/include/oox/ppt/slidepersist.hxx +++ b/include/oox/ppt/slidepersist.hxx @@ -96,7 +96,7 @@ public: bool isNotesPage() const { return mbNotes; } void setLayoutValueToken( sal_Int32 nLayoutValueToken ) { mnLayoutValueToken = nLayoutValueToken; } - short getLayoutFromValueToken(); + sal_Int16 getLayoutFromValueToken(); const oox::drawingml::TextListStylePtr& getDefaultTextStyle() const { return maDefaultTextStylePtr; } diff --git a/include/sfx2/sfxbasecontroller.hxx b/include/sfx2/sfxbasecontroller.hxx index d7741b76e8c0..1f834835602a 100644 --- a/include/sfx2/sfxbasecontroller.hxx +++ b/include/sfx2/sfxbasecontroller.hxx @@ -130,7 +130,7 @@ public: virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( const css::util::URL & aURL , const OUString & sTargetFrameName, - FrameSearchFlags eSearchFlags ) override ; + sal_Int32 eSearchFlags ) override ; virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches( const css::uno::Sequence< css::frame::DispatchDescriptor >& seqDescriptor ) override ; diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index 068fe89399c4..6022cb1c8142 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -331,7 +331,7 @@ protected: virtual bool SeekRow( long nRow ) = 0; void DrawCursor(); void PaintData(vcl::Window const & rWin, vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect); - virtual void PaintField(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const = 0; + virtual void PaintField(vcl::RenderContext& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const = 0; // Advice for the subclass: the visible scope of rows has changed. // The subclass is able to announce changes of the model with the // help of the methods RowInserted and RowRemoved. Because of the diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index 01f1298f0ff3..12c754db95ae 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -622,7 +622,7 @@ namespace svt void implCreateActiveAccessible( ); private: - virtual void PaintField(OutputDevice& rDev, const tools::Rectangle& rRect, + virtual void PaintField(vcl::RenderContext& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const override; using Control::ImplInitSettings; SVT_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); diff --git a/include/svtools/table/tablerenderer.hxx b/include/svtools/table/tablerenderer.hxx index ff738c6de623..4e0933686065 100644 --- a/include/svtools/table/tablerenderer.hxx +++ b/include/svtools/table/tablerenderer.hxx @@ -32,6 +32,9 @@ namespace vcl { class Window; } class OutputDevice; class StyleSettings; +namespace vcl { + typedef OutputDevice RenderContext; +}; namespace svt { namespace table @@ -89,7 +92,7 @@ namespace svt { namespace table the style to be used for drawing */ virtual void PaintHeaderArea( - OutputDevice& _rDevice, const tools::Rectangle& _rArea, + vcl::RenderContext& _rDevice, const tools::Rectangle& _rArea, bool _bIsColHeaderArea, bool _bIsRowHeaderArea, const StyleSettings& _rStyle ) = 0; @@ -108,7 +111,7 @@ namespace svt { namespace table the style to be used for drawing */ virtual void PaintColumnHeader( ColPos _nCol, bool _bActive, - OutputDevice& _rDevice, const tools::Rectangle& _rArea, + vcl::RenderContext& _rDevice, const tools::Rectangle& _rArea, const StyleSettings& _rStyle ) = 0; /** prepares a row for painting @@ -143,7 +146,7 @@ namespace svt { namespace table the style to be used for drawing */ virtual void PrepareRow( RowPos _nRow, bool i_hasControlFocus, bool _bSelected, - OutputDevice& _rDevice, const tools::Rectangle& _rRowArea, + vcl::RenderContext& _rDevice, const tools::Rectangle& _rRowArea, const StyleSettings& _rStyle ) = 0; /** paints the header of a row @@ -172,7 +175,7 @@ namespace svt { namespace table the style to be used for drawing */ virtual void PaintRowHeader( bool i_hasControlFocus, bool _bSelected, - OutputDevice& _rDevice, tools::Rectangle const & _rArea, + vcl::RenderContext& _rDevice, tools::Rectangle const & _rArea, StyleSettings const & _rStyle ) = 0; /** paints a certain cell @@ -203,7 +206,7 @@ namespace svt { namespace table */ virtual void PaintCell( ColPos const i_col, bool i_hasControlFocus, bool _bSelected, - OutputDevice& _rDevice, const tools::Rectangle& _rArea, + vcl::RenderContext& _rDevice, const tools::Rectangle& _rArea, const StyleSettings& _rStyle ) = 0; /** draws a cell cursor in the given rectangle diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx index b513f1ab593b..0551f2ad03c8 100644 --- a/include/svx/charmap.hxx +++ b/include/svx/charmap.hxx @@ -71,7 +71,7 @@ public: virtual void RecalculateFont(vcl::RenderContext& rRenderContext); - void SelectCharacter( sal_uInt32 cNew ); + void SelectCharacter( sal_UCS4 cNew ); virtual sal_UCS4 GetSelectCharacter() const; void createContextMenu(); diff --git a/include/svx/galctrl.hxx b/include/svx/galctrl.hxx index 575db968193b..3dba3d9a487d 100644 --- a/include/svx/galctrl.hxx +++ b/include/svx/galctrl.hxx @@ -140,7 +140,7 @@ private: // BrowseBox virtual bool SeekRow( long nRow ) override; - virtual void PaintField( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const override; + virtual void PaintField( vcl::RenderContext& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const override; virtual void DoubleClick( const BrowserMouseEvent& rEvt ) override; virtual void Select() override; virtual sal_Int8 AcceptDrop( const BrowserAcceptDropEvent& rEvt ) override; diff --git a/include/svx/sdrpagewindow.hxx b/include/svx/sdrpagewindow.hxx index 9407c7eed60f..e43279e31e6c 100644 --- a/include/svx/sdrpagewindow.hxx +++ b/include/svx/sdrpagewindow.hxx @@ -20,6 +20,7 @@ #ifndef INCLUDED_SVX_SDRPAGEWINDOW_HXX #define INCLUDED_SVX_SDRPAGEWINDOW_HXX +#include <basegfx/range/b2irectangle.hxx> #include <svx/sdr/overlay/overlaymanager.hxx> #include <svx/svdtypes.hxx> #include <svx/svxdllapi.h> @@ -74,7 +75,7 @@ public: void PrePaint(); void PrepareRedraw(const vcl::Region& rReg); void RedrawAll( sdr::contact::ViewObjectContactRedirector* pRedirector ); - void RedrawLayer( const SdrLayerID* pId, sdr::contact::ViewObjectContactRedirector* pRedirector, basegfx::B2IRange const*); + void RedrawLayer( const SdrLayerID* pId, sdr::contact::ViewObjectContactRedirector* pRedirector, basegfx::B2IRectangle const*); // Invalidate call, used from ObjectContact(OfPageView) in InvalidatePartOfView(...) void InvalidatePageWindow(const basegfx::B2DRange& rRange); diff --git a/include/svx/svdpagv.hxx b/include/svx/svdpagv.hxx index aa6c5b325688..ea376dc8c035 100644 --- a/include/svx/svdpagv.hxx +++ b/include/svx/svdpagv.hxx @@ -32,6 +32,7 @@ #include <memory> #include <vector> #include <basegfx/polygon/b2dpolypolygon.hxx> +#include <basegfx/range/b2irectangle.hxx> namespace vcl { class Region; } @@ -167,7 +168,7 @@ public: void DrawLayer(SdrLayerID nID, OutputDevice* pGivenTarget, sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr, const tools::Rectangle& rRect = tools::Rectangle(), - basegfx::B2IRange const* pPageFrame = nullptr); + basegfx::B2IRectangle const* pPageFrame = nullptr); void DrawPageViewGrid(OutputDevice& rOut, const tools::Rectangle& rRect, Color aColor = COL_BLACK ); tools::Rectangle GetPageRect() const; diff --git a/include/vcl/fontcharmap.hxx b/include/vcl/fontcharmap.hxx index eeb8367ced6c..2a4e1dd08ff1 100644 --- a/include/vcl/fontcharmap.hxx +++ b/include/vcl/fontcharmap.hxx @@ -139,7 +139,7 @@ private: friend class ::OutputDevice; - int findRangeIndex( sal_uInt32 ) const; + int findRangeIndex( sal_UCS4 ) const; FontCharMap( ImplFontCharMapRef const & pIFCMap ); @@ -153,9 +153,9 @@ class VCL_PLUGIN_PUBLIC CmapResult { public: explicit CmapResult( bool bSymbolic = false, - const sal_uInt32* pRangeCodes = nullptr, int nRangeCount = 0 ); + const sal_UCS4* pRangeCodes = nullptr, int nRangeCount = 0 ); - const sal_uInt32* mpRangeCodes; + const sal_UCS4* mpRangeCodes; const int* mpStartGlyphs; const sal_uInt16* mpGlyphIds; int mnRangeCount; diff --git a/oox/source/mathml/import.cxx b/oox/source/mathml/import.cxx index 8fb181996175..5a02f8906955 100644 --- a/oox/source/mathml/import.cxx +++ b/oox/source/mathml/import.cxx @@ -98,7 +98,7 @@ void SAL_CALL LazyMathBufferingContext::characters(OUString const& rChars) } // namespace formulaimport -core::ContextHandlerRef CreateLazyMathBufferingContext( +rtl::Reference<core::ContextHandler> CreateLazyMathBufferingContext( core::ContextHandler const& rParent, drawingml::TextParagraph & rPara) { return new formulaimport::LazyMathBufferingContext(rParent, rPara); diff --git a/sal/osl/unx/mutex.cxx b/sal/osl/unx/mutex.cxx index 72c36f5eb9ab..3f7fda0c7099 100644 --- a/sal/osl/unx/mutex.cxx +++ b/sal/osl/unx/mutex.cxx @@ -69,7 +69,7 @@ oslMutex SAL_CALL osl_createMutex() return pMutex; } -void SAL_CALL osl_destroyMutex(oslMutexImpl *pMutex) +void SAL_CALL osl_destroyMutex(oslMutex pMutex) { SAL_WARN_IF(!pMutex, "sal.osl.mutex", "null pMutex"); @@ -87,7 +87,7 @@ void SAL_CALL osl_destroyMutex(oslMutexImpl *pMutex) } } -sal_Bool SAL_CALL osl_acquireMutex(oslMutexImpl *pMutex) +sal_Bool SAL_CALL osl_acquireMutex(oslMutex pMutex) { SAL_WARN_IF(!pMutex, "sal.osl.mutex", "null pMutex"); @@ -108,7 +108,7 @@ sal_Bool SAL_CALL osl_acquireMutex(oslMutexImpl *pMutex) return false; } -sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutexImpl *pMutex) +sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutex pMutex) { bool result = false; @@ -125,7 +125,7 @@ sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutexImpl *pMutex) return result; } -sal_Bool SAL_CALL osl_releaseMutex(oslMutexImpl *pMutex) +sal_Bool SAL_CALL osl_releaseMutex(oslMutex pMutex) { SAL_WARN_IF(!pMutex, "sal.osl.mutex", "null pMutex"); diff --git a/sal/textenc/tencinfo.cxx b/sal/textenc/tencinfo.cxx index 915f1e27237b..edbbec9c18dd 100644 --- a/sal/textenc/tencinfo.cxx +++ b/sal/textenc/tencinfo.cxx @@ -197,7 +197,7 @@ rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromWindowsCharset( sal_uInt8 nWinC /* ----------------------------------------------------------------------- */ -rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromUnixCharset( const char* pUnixCharset ) +rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromUnixCharset( const sal_Char* pUnixCharset ) { /* See <ftp://ftp.x.org/pub/DOCS/registry>, section 14 ("Font Charset * (Registry and Encoding) Names"). @@ -468,7 +468,7 @@ rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromUnixCharset( const char* pUnixC /* ----------------------------------------------------------------------- */ -rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromMimeCharset( const char* pMimeCharset ) +rtl_TextEncoding SAL_CALL rtl_getTextEncodingFromMimeCharset( const sal_Char* pMimeCharset ) { /* All Identifiers are in lower case and contain only alphanumeric */ /* characters. The function search for the first equal string in */ @@ -788,7 +788,7 @@ sal_uInt8 SAL_CALL rtl_getBestWindowsCharsetFromTextEncoding( rtl_TextEncoding e /* ----------------------------------------------------------------------- */ -const char* SAL_CALL rtl_getBestUnixCharsetFromTextEncoding( rtl_TextEncoding eTextEncoding ) +const sal_Char* SAL_CALL rtl_getBestUnixCharsetFromTextEncoding( rtl_TextEncoding eTextEncoding ) { const ImplTextEncodingData* pData = Impl_getTextEncodingData( eTextEncoding ); if ( pData ) @@ -808,7 +808,7 @@ char const * SAL_CALL rtl_getMimeCharsetFromTextEncoding(rtl_TextEncoding p->mpBestMimeCharset : nullptr; } -const char* SAL_CALL rtl_getBestMimeCharsetFromTextEncoding( rtl_TextEncoding eTextEncoding ) +const sal_Char* SAL_CALL rtl_getBestMimeCharsetFromTextEncoding( rtl_TextEncoding eTextEncoding ) { const ImplTextEncodingData* pData = Impl_getTextEncodingData( eTextEncoding ); if ( pData ) diff --git a/sal/textenc/textcvt.cxx b/sal/textenc/textcvt.cxx index 2d5add0a89e4..3ab1c9aea562 100644 --- a/sal/textenc/textcvt.cxx +++ b/sal/textenc/textcvt.cxx @@ -155,7 +155,7 @@ void SAL_CALL rtl_resetTextToUnicodeContext( rtl_TextToUnicodeConverter hConvert sal_Size SAL_CALL rtl_convertTextToUnicode( rtl_TextToUnicodeConverter hConverter, rtl_TextToUnicodeContext hContext, - const char* pSrcBuf, sal_Size nSrcBytes, + const sal_Char* pSrcBuf, sal_Size nSrcBytes, sal_Unicode* pDestBuf, sal_Size nDestChars, sal_uInt32 nFlags, sal_uInt32* pInfo, sal_Size* pSrcCvtBytes ) @@ -251,7 +251,7 @@ void SAL_CALL rtl_resetUnicodeToTextContext( rtl_UnicodeToTextConverter hConvert sal_Size SAL_CALL rtl_convertUnicodeToText( rtl_UnicodeToTextConverter hConverter, rtl_UnicodeToTextContext hContext, const sal_Unicode* pSrcBuf, sal_Size nSrcChars, - char* pDestBuf, sal_Size nDestBytes, + sal_Char* pDestBuf, sal_Size nDestBytes, sal_uInt32 nFlags, sal_uInt32* pInfo, sal_Size* pSrcCvtChars ) { diff --git a/sc/source/core/data/segmenttree.cxx b/sc/source/core/data/segmenttree.cxx index 4c01deb06172..e7b35ea5dfd5 100644 --- a/sc/source/core/data/segmenttree.cxx +++ b/sc/source/core/data/segmenttree.cxx @@ -53,7 +53,7 @@ public: void removeSegment(SCCOLROW nPos1, SCCOLROW nPos2); void insertSegment(SCCOLROW nPos, SCCOLROW nSize, bool bSkipStartBoundary); - SCROW findLastTrue(ValueType nValue) const; + SCCOLROW findLastTrue(ValueType nValue) const; // range iteration bool getFirst(RangeData& rData); diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index 8abfeb098bdf..6be071381023 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -1458,7 +1458,7 @@ void XclExpComments::SaveXml( XclExpXmlStream& rStrm ) Authors::const_iterator aAuthorsBegin = aAuthors.begin(); for( size_t i = 0; i < nNotes; ++i ) { - XclExpNoteList::RecordRefType xNote = mrNotes.GetRecord( i ); + XclExpRecordList< XclExpNote >::RecordRefType xNote = mrNotes.GetRecord( i ); Authors::const_iterator aAuthor = aAuthors.find( XclXmlUtils::ToOUString( xNote->GetAuthor() ) ); sal_Int32 nAuthorId = distance( aAuthorsBegin, aAuthor ); diff --git a/sc/source/filter/inc/lotrange.hxx b/sc/source/filter/inc/lotrange.hxx index 4fbbd12a9665..ee0253dbffac 100644 --- a/sc/source/filter/inc/lotrange.hxx +++ b/sc/source/filter/inc/lotrange.hxx @@ -94,9 +94,9 @@ private: public: LotusRangeList(); ~LotusRangeList(); - inline sal_uInt16 GetIndex( SCCOL nCol, SCROW nRow ); - inline sal_uInt16 GetIndex( SCCOL nColS, SCROW nRowS, SCCOL nColE, SCROW nRowE ); - sal_uInt16 GetIndex( const LotusRange& ); + inline LR_ID GetIndex( SCCOL nCol, SCROW nRow ); + inline LR_ID GetIndex( SCCOL nColS, SCROW nRowS, SCCOL nColE, SCROW nRowE ); + LR_ID GetIndex( const LotusRange& ); void Append( std::unique_ptr<LotusRange> pLR ); }; diff --git a/sc/source/filter/inc/workbookhelper.hxx b/sc/source/filter/inc/workbookhelper.hxx index b7f09aeef717..7a9dbbda3f36 100644 --- a/sc/source/filter/inc/workbookhelper.hxx +++ b/sc/source/filter/inc/workbookhelper.hxx @@ -125,7 +125,7 @@ public: /** Sets the VBA project storage used to import VBA source code and forms. */ void setVbaProjectStorage( const StorageRef& rxVbaPrjStrg ); /** Sets the index of the current Calc sheet, if filter currently processes a sheet. */ - void setCurrentSheetIndex( sal_Int16 nSheet ); + void setCurrentSheetIndex( SCTAB nSheet ); /** Final conversion after importing the workbook. */ void finalizeWorkbookImport(); void useInternalChartDataTable( bool bInternal ); diff --git a/sc/source/filter/inc/worksheethelper.hxx b/sc/source/filter/inc/worksheethelper.hxx index af88892c02bb..8f135e05ea9c 100644 --- a/sc/source/filter/inc/worksheethelper.hxx +++ b/sc/source/filter/inc/worksheethelper.hxx @@ -175,7 +175,7 @@ public: const WorkbookHelper& rHelper, const ISegmentProgressBarRef& rxProgressBar, WorksheetType eSheetType, - sal_Int16 nSheet ); + SCTAB nSheet ); // horrible accessor for hidden WorksheetGlobals ... static IWorksheetProgress *getWorksheetInterface( const WorksheetGlobalsRef &xRef ); diff --git a/sc/source/filter/inc/xeescher.hxx b/sc/source/filter/inc/xeescher.hxx index 6d30de9b553e..f45ebbf79bcf 100644 --- a/sc/source/filter/inc/xeescher.hxx +++ b/sc/source/filter/inc/xeescher.hxx @@ -365,16 +365,13 @@ private: class XclExpComments : public XclExpRecord { public: - typedef XclExpRecordList< XclExpNote > - XclExpNoteList; - - XclExpComments( SCTAB nTab, XclExpNoteList& rNotes ); + XclExpComments( SCTAB nTab, XclExpRecordList< XclExpNote >& rNotes ); virtual void SaveXml( XclExpXmlStream& rStrm ) override; private: SCTAB const mnTab; - XclExpNoteList& mrNotes; + XclExpRecordList< XclExpNote >& mrNotes; }; // object manager ============================================================= diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx index d2c5de0997ce..331fb28bb9ee 100644 --- a/sc/source/ui/inc/AccessibleCsvControl.hxx +++ b/sc/source/ui/inc/AccessibleCsvControl.hxx @@ -267,7 +267,6 @@ typedef ::cppu::ImplHelper2< class ScAccessibleCsvGrid : public ScAccessibleCsvControl, public ScAccessibleCsvGridImpl { protected: - typedef css::uno::Reference< css::accessibility::XAccessibleTable > XAccessibleTableRef; typedef std::map< sal_Int32, rtl::Reference<ScAccessibleCsvControl> > XAccessibleSet; private: @@ -325,10 +324,10 @@ public: virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) override; /** Returns the row headers as an AccessibleTable. */ - virtual XAccessibleTableRef SAL_CALL getAccessibleRowHeaders() override; + virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleRowHeaders() override; /** Returns the column headers as an AccessibleTable. */ - virtual XAccessibleTableRef SAL_CALL getAccessibleColumnHeaders() override; + virtual css::uno::Reference< css::accessibility::XAccessibleTable > SAL_CALL getAccessibleColumnHeaders() override; /** Returns the selected rows as a sequence. */ virtual css::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows() override; diff --git a/sc/source/ui/inc/colrowba.hxx b/sc/source/ui/inc/colrowba.hxx index fe5e0e24d75a..d231dda5f08a 100644 --- a/sc/source/ui/inc/colrowba.hxx +++ b/sc/source/ui/inc/colrowba.hxx @@ -73,7 +73,7 @@ public: virtual OUString GetEntryText( SCCOLROW nEntryNo ) const override; virtual bool IsMirrored() const override; - virtual SCROW GetHiddenCount( SCROW nEntryNo ) const override; + virtual SCCOLROW GetHiddenCount( SCCOLROW nEntryNo ) const override; virtual void SetEntrySize( SCCOLROW nPos, sal_uInt16 nNewSize ) override; virtual void HideEntries( SCCOLROW nStart, SCCOLROW nEnd ) override; diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx index 0dd142b4e92f..7e807d9a5ad0 100644 --- a/sc/source/ui/inc/dbfunc.hxx +++ b/sc/source/ui/inc/dbfunc.hxx @@ -116,7 +116,7 @@ public: static sal_uInt16 DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, bool bAllCharts ); - void OnLOKShowHideColRow(bool bColumns, SCROW nStartRow); + void OnLOKShowHideColRow(bool bColumns, SCCOLROW nStartRow); }; #endif diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx index 61581d513e7a..8a7c786a9a3e 100644 --- a/sc/source/ui/view/colrowba.cxx +++ b/sc/source/ui/view/colrowba.cxx @@ -360,7 +360,7 @@ OUString ScRowBar::GetDragHelp( long nVal ) return lcl_MetricString( nTwips, ScResId(STR_TIP_HEIGHT) ); } -SCROW ScRowBar::GetHiddenCount( SCROW nEntryNo ) const // override only for rows +SCCOLROW ScRowBar::GetHiddenCount( SCCOLROW nEntryNo ) const // override only for rows { const ScViewData& rViewData = pTabView->GetViewData(); ScDocument* pDoc = rViewData.GetDocument(); diff --git a/scaddins/source/analysis/analysishelper.hxx b/scaddins/source/analysis/analysishelper.hxx index fa189f67da09..5e58a2af8fb1 100644 --- a/scaddins/source/analysis/analysishelper.hxx +++ b/scaddins/source/analysis/analysishelper.hxx @@ -728,7 +728,7 @@ inline ConvertDataClass ConvertData::Class() const return eClass; } -inline ConvertDataLinear::ConvertDataLinear( const sal_Char* p, double fC, double fO, ConvertDataClass e, +inline ConvertDataLinear::ConvertDataLinear( const sal_Char p[], double fC, double fO, ConvertDataClass e, bool bPrefSupport ) : ConvertData( p, fC, e, bPrefSupport ), fOffs( fO ) diff --git a/sd/source/core/sdpage_animations.cxx b/sd/source/core/sdpage_animations.cxx index 379edc9eba4e..cb91df1caf3b 100644 --- a/sd/source/core/sdpage_animations.cxx +++ b/sd/source/core/sdpage_animations.cxx @@ -35,7 +35,7 @@ using namespace ::com::sun::star::presentation; using ::com::sun::star::drawing::XShape; /** returns a helper class to manipulate effects inside the main sequence */ -sd::MainSequencePtr const & SdPage::getMainSequence() +std::shared_ptr< sd::MainSequence > const & SdPage::getMainSequence() { if (nullptr == mpMainSequence) mpMainSequence.reset( new sd::MainSequence( getAnimationNode() ) ); diff --git a/sd/source/ui/sidebar/MasterPagesSelector.hxx b/sd/source/ui/sidebar/MasterPagesSelector.hxx index 744e789fc46b..fa22290a15d6 100644 --- a/sd/source/ui/sidebar/MasterPagesSelector.hxx +++ b/sd/source/ui/sidebar/MasterPagesSelector.hxx @@ -107,7 +107,7 @@ protected: virtual void AssignMasterPageToPageList ( SdPage* pMasterPage, - const ::sd::slidesorter::SharedPageSelection& rPageList); + const std::shared_ptr<std::vector<SdPage*>>& rPageList); virtual void NotifyContainerChangeEvent (const MasterPageContainerChangeEvent& rEvent); diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 154f742b1fc2..33c7ed012f40 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -2401,7 +2401,7 @@ void FileDialogHelper::StartExecuteModal( const Link<FileDialogHelper*,void>& rE mpImpl->implStartExecute(); } -short FileDialogHelper::GetDialogType() const { return mpImpl ? mpImpl->m_nDialogType : 0; } +sal_Int16 FileDialogHelper::GetDialogType() const { return mpImpl ? mpImpl->m_nDialogType : 0; } bool FileDialogHelper::IsPasswordEnabled() const { diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx index 57f73d5c79e3..b3de82cbe6a5 100644 --- a/sfx2/source/dialog/filedlgimpl.hxx +++ b/sfx2/source/dialog/filedlgimpl.hxx @@ -167,7 +167,7 @@ namespace sfx2 // Own methods FileDialogHelper_Impl( FileDialogHelper* _pAntiImpl, - const short nDialogType, + const sal_Int16 nDialogType, FileDialogFlags nFlags, sal_Int16 nDialog, weld::Window* pFrameWeld, diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index c638c8be836a..f3d4fb3024fc 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -437,7 +437,7 @@ bool StyleTreeListBox_Impl::EventNotify( NotifyEvent& rNEvt ) TriState StyleTreeListBox_Impl::NotifyMoving(SvTreeListEntry* pTarget, SvTreeListEntry* pEntry, SvTreeListEntry*& rpNewParent, - sal_uIntPtr& lPos) + sal_uLong& lPos) { if(!pTarget || !pEntry) return TRISTATE_FALSE; diff --git a/sfx2/source/inc/macroloader.hxx b/sfx2/source/inc/macroloader.hxx index 54decff36a37..9e1dfba18ed0 100644 --- a/sfx2/source/inc/macroloader.hxx +++ b/sfx2/source/inc/macroloader.hxx @@ -68,7 +68,7 @@ public: virtual css::uno::Reference < css::frame::XDispatch > SAL_CALL queryDispatch( const css::util::URL& aURL, const OUString& sTargetFrameName, - FrameSearchFlags eSearchFlags ) override; + sal_Int32 eSearchFlags ) override; virtual css::uno::Sequence< css::uno::Reference < css::frame::XDispatch > > SAL_CALL queryDispatches( const css::uno::Sequence < css::frame::DispatchDescriptor >& seqDescriptor ) override; diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index c371fb74e8fd..9ab64b0262a7 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -104,7 +104,7 @@ protected: virtual void ExpandedHdl() override; virtual TriState NotifyMoving( SvTreeListEntry* pTarget, SvTreeListEntry* pEntry, - SvTreeListEntry*& rpNewParent, sal_uIntPtr& rNewChildPos) override; + SvTreeListEntry*& rpNewParent, sal_uLong& rNewChildPos) override; public: StyleTreeListBox_Impl( SfxCommonTemplateDialog_Impl* pParent, WinBits nWinStyle); diff --git a/slideshow/source/engine/transitions/slidechangebase.hxx b/slideshow/source/engine/transitions/slidechangebase.hxx index 9db000fc1106..5cf130b5340a 100644 --- a/slideshow/source/engine/transitions/slidechangebase.hxx +++ b/slideshow/source/engine/transitions/slidechangebase.hxx @@ -132,7 +132,7 @@ protected: */ virtual void prepareForRun( const ViewEntry& rViewEntry, - const cppcanvas::CanvasSharedPtr& rDestinationCanvas ); + const std::shared_ptr<cppcanvas::Canvas>& rDestinationCanvas ); /** Called on derived classes to implement actual slide change. diff --git a/slideshow/source/inc/hslcoloranimation.hxx b/slideshow/source/inc/hslcoloranimation.hxx index 159c1255e47a..e20cbc8024f5 100644 --- a/slideshow/source/inc/hslcoloranimation.hxx +++ b/slideshow/source/inc/hslcoloranimation.hxx @@ -46,7 +46,7 @@ namespace slideshow @param rColor Current animation value. */ - virtual bool operator()( const ValueType& rColor ) = 0; + virtual bool operator()( const HSLColor& rColor ) = 0; /** Request the underlying value for this animation. @@ -58,7 +58,7 @@ namespace slideshow for the underlying value, if the animation has actually been started (via start() call). */ - virtual ValueType getUnderlyingValue() const = 0; + virtual HSLColor getUnderlyingValue() const = 0; }; typedef ::std::shared_ptr< HSLColorAnimation > HSLColorAnimationSharedPtr; diff --git a/slideshow/source/inc/numberanimation.hxx b/slideshow/source/inc/numberanimation.hxx index 71a6bc39e2c8..ab9e9a3939dd 100644 --- a/slideshow/source/inc/numberanimation.hxx +++ b/slideshow/source/inc/numberanimation.hxx @@ -48,7 +48,7 @@ namespace slideshow values will be clipped to the permissible range internally. */ - virtual bool operator()( ValueType x ) = 0; + virtual bool operator()( double x ) = 0; /** Request the underlying value for this animation. @@ -60,7 +60,7 @@ namespace slideshow for the underlying value, if the animation has actually been started (via start() call). */ - virtual ValueType getUnderlyingValue() const = 0; + virtual double getUnderlyingValue() const = 0; }; typedef ::std::shared_ptr< NumberAnimation > NumberAnimationSharedPtr; diff --git a/solenv/CompilerTest_compilerplugins_clang.mk b/solenv/CompilerTest_compilerplugins_clang.mk index b5ec80afed04..7b4acb24ccd9 100644 --- a/solenv/CompilerTest_compilerplugins_clang.mk +++ b/solenv/CompilerTest_compilerplugins_clang.mk @@ -61,6 +61,7 @@ $(eval $(call gb_CompilerTest_add_exception_objects,compilerplugins_clang, \ compilerplugins/clang/test/stringconcat \ compilerplugins/clang/test/stringconstant \ compilerplugins/clang/test/stringloop \ + compilerplugins/clang/test/typedefparam \ compilerplugins/clang/test/unnecessarycatchthrow \ compilerplugins/clang/test/unnecessaryoverride \ compilerplugins/clang/test/unnecessaryoverride-dtor \ diff --git a/svtools/inc/table/gridtablerenderer.hxx b/svtools/inc/table/gridtablerenderer.hxx index e52cb1b47c24..abd3ff7ac161 100644 --- a/svtools/inc/table/gridtablerenderer.hxx +++ b/svtools/inc/table/gridtablerenderer.hxx @@ -67,22 +67,22 @@ namespace svt { namespace table public: // ITableRenderer overridables virtual void PaintHeaderArea( - OutputDevice& _rDevice, const tools::Rectangle& _rArea, + vcl::RenderContext& _rDevice, const tools::Rectangle& _rArea, bool _bIsColHeaderArea, bool _bIsRowHeaderArea, const StyleSettings& _rStyle ) override; virtual void PaintColumnHeader( ColPos _nCol, bool _bActive, - OutputDevice& _rDevice, const tools::Rectangle& _rArea, + vcl::RenderContext& _rDevice, const tools::Rectangle& _rArea, const StyleSettings& _rStyle ) override; virtual void PrepareRow( RowPos _nRow, bool i_hasControlFocus, bool _bSelected, - OutputDevice& _rDevice, const tools::Rectangle& _rRowArea, + vcl::RenderContext& _rDevice, const tools::Rectangle& _rRowArea, const StyleSettings& _rStyle ) override; virtual void PaintRowHeader( bool i_hasControlFocus, bool _bSelected, - OutputDevice& _rDevice, const tools::Rectangle& _rArea, + vcl::RenderContext& _rDevice, const tools::Rectangle& _rArea, const StyleSettings& _rStyle ) override; virtual void PaintCell( ColPos const i_col, bool i_hasControlFocus, bool _bSelected, - OutputDevice& _rDevice, const tools::Rectangle& _rArea, + vcl::RenderContext& _rDevice, const tools::Rectangle& _rArea, const StyleSettings& _rStyle ) override; virtual void ShowCellCursor( vcl::Window& _rView, const tools::Rectangle& _rCursorRect) override; virtual void HideCellCursor( vcl::Window& _rView, const tools::Rectangle& _rCursorRect) override; diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 402f17ea385e..3a6ef091fe3f 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -222,7 +222,7 @@ namespace svt } } - void EditBrowseBox::PaintField( OutputDevice& rDev, const tools::Rectangle& rRect, + void EditBrowseBox::PaintField( vcl::RenderContext& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const { if (nColumnId == HandleColumnId) diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 59acd82d4789..c5a6adf521ca 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -61,7 +61,7 @@ namespace svt { namespace table { } - BitmapEx const & getBitmapFor(OutputDevice const & i_device, long const i_headerHeight, + BitmapEx const & getBitmapFor(vcl::RenderContext const & i_device, long const i_headerHeight, StyleSettings const & i_style, bool const i_sortAscending); private: diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 102e8397dd94..2a9a25c067d8 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -220,7 +220,7 @@ namespace svt { namespace table } - void TableControl::SelectRow( RowPos const i_rowIndex, bool const i_select ) + void TableControl::SelectRow( sal_Int32 const i_rowIndex, bool const i_select ) { ENSURE_OR_RETURN_VOID( ( i_rowIndex >= 0 ) && ( i_rowIndex < m_pImpl->getModel()->getRowCount() ), "TableControl::SelectRow: invalid row index!" ); diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 7c5a8f13ad76..b52a4f4b08ec 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -1727,7 +1727,7 @@ namespace svt { namespace table } - RowPos TableControl_Impl::getCurrentColumn() const + ColPos TableControl_Impl::getCurrentColumn() const { return m_nCurColumn; } diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx index e735cee9db59..defb0e260df1 100644 --- a/svx/inc/svdibrow.hxx +++ b/svx/inc/svdibrow.hxx @@ -55,7 +55,7 @@ friend class ImpItemEdit; virtual long GetRowCount() const override; virtual bool SeekRow(long nRow) override; - virtual void PaintField(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const override; + virtual void PaintField(vcl::RenderContext& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const override; virtual void DoubleClick(const BrowserMouseEvent&) override; virtual void KeyInput(const KeyEvent& rEvt) override; virtual void Select() override; diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index e9bbaed89a6e..b0fa861ed605 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -3897,7 +3897,7 @@ void SAL_CALL FmXCheckBoxCell::removeItemListener( const Reference< css::awt::XI } -void SAL_CALL FmXCheckBoxCell::setState( short n ) +void SAL_CALL FmXCheckBoxCell::setState( sal_Int16 n ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -3909,14 +3909,14 @@ void SAL_CALL FmXCheckBoxCell::setState( short n ) } -short SAL_CALL FmXCheckBoxCell::getState() +sal_Int16 SAL_CALL FmXCheckBoxCell::getState() { ::osl::MutexGuard aGuard( m_aMutex ); if (m_pBox) { UpdateFromColumn(); - return static_cast<short>(m_pBox->GetState()); + return static_cast<sal_Int16>(m_pBox->GetState()); } return TRISTATE_INDET; } diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index b2c137b038cf..c73bb9b01e10 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -594,7 +594,7 @@ namespace svxform } - SvTreeListEntry* NavigatorTree::Insert( FmEntryData* pEntryData, sal_uIntPtr nRelPos ) + SvTreeListEntry* NavigatorTree::Insert( FmEntryData* pEntryData, sal_uLong nRelPos ) { // insert current entry diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx index d1e1be7a8e1d..0dd39a03ce9d 100644 --- a/svx/source/svdraw/svdcrtv.cxx +++ b/svx/source/svdraw/svdcrtv.cxx @@ -378,7 +378,7 @@ void SdrCreateView::SetCurrentObj(sal_uInt16 nIdent, SdrInventor nInvent) } bool SdrCreateView::ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, const Point& rPnt, OutputDevice* pOut, - short nMinMov, const tools::Rectangle& rLogRect, SdrObject* pPreparedFactoryObject) + sal_Int16 nMinMov, const tools::Rectangle& rLogRect, SdrObject* pPreparedFactoryObject) { bool bRet=false; UnmarkAllObj(); diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index 4e3f67431c22..ff07bd88e8ad 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -328,7 +328,7 @@ OUString SdrItemBrowserControl::GetCellText(long _nRow, sal_uInt16 _nColId) cons return sRet; } -void SdrItemBrowserControl::PaintField(OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const +void SdrItemBrowserControl::PaintField(vcl::RenderContext& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId) const { if (nCurrentPaintRow<0 || static_cast<std::size_t>(nCurrentPaintRow)>=aList.size()) { return; diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 2441f6dc778e..7d38f60d1e12 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1268,7 +1268,7 @@ SvxColorWindow::SvxColorWindow(const OUString& rCommand, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow, bool bReuseParentForPicker, - std::function<void(const OUString&, const NamedColor&)> const & aFunction): + ColorSelectFunction const & aFunction): ToolbarPopup( rFrame, pParentWindow, "palette_popup_window", "svx/ui/oldcolorwindow.ui" ), theSlotId( nSlotId ), @@ -1382,7 +1382,7 @@ ColorWindow::ColorWindow(std::shared_ptr<PaletteManager> const & rPaletteManager weld::Window* pParentWindow, weld::MenuButton* pMenuButton, bool bInterimBuilder, - std::function<void(const OUString&, const NamedColor&)> const & aFunction) + ColorSelectFunction const & aFunction) : ToolbarPopupBase(rFrame) , m_xBuilder(bInterimBuilder ? Application::CreateInterimBuilder(pMenuButton, "svx/ui/colorwindow.ui") : Application::CreateBuilder(pMenuButton, "svx/ui/colorwindow.ui")) diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 98895e664963..a732b8b8b669 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -802,7 +802,7 @@ public: void SetAutoUpdateCells( bool bFlag ) { m_bAutoUpdateCells = bFlag; } bool GetShadowCursorPos( const Point& rPt, SwFillMode eFillMode, - SwRect& rRect, short& rOrient ); + SwRect& rRect, sal_Int16& rOrient ); bool SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode ); const SwRangeRedline* SelNextRedline(); diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index e9b3023ce5be..b32263289b2b 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1151,7 +1151,7 @@ public: */ const SwTable* InsertTable( const SwInsertTableOptions& rInsTableOpts, // HeadlineNoBorder const SwPosition& rPos, sal_uInt16 nRows, - sal_uInt16 nCols, short eAdjust, + sal_uInt16 nCols, sal_Int16 eAdjust, const SwTableAutoFormat* pTAFormat = nullptr, const std::vector<sal_uInt16> *pColArr = nullptr, bool bCalledFromShell = false, @@ -1164,7 +1164,7 @@ public: // Create a balanced table out of the selected range. const SwTable* TextToTable( const SwInsertTableOptions& rInsTableOpts, // HeadlineNoBorder, const SwPaM& rRange, sal_Unicode cCh, - short eAdjust, + sal_Int16 eAdjust, const SwTableAutoFormat* ); // text to table conversion - API support diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx index 397887d09429..d446dcddcc51 100644 --- a/sw/inc/swatrset.hxx +++ b/sw/inc/swatrset.hxx @@ -128,6 +128,10 @@ class SwTableBoxNumFormat; class SwTableBoxFormula; class SwTableBoxValue; +namespace vcl { + typedef OutputDevice RenderContext; +}; + class SwAttrPool : public SfxItemPool { private: @@ -318,7 +322,7 @@ public: //Helper for filters to find true lineheight of a font SW_DLLPUBLIC long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentSettingAccess, const SwAttrSet &rSet, - const OutputDevice &rOut, sal_Int16 nScript); + const vcl::RenderContext &rOut, sal_Int16 nScript); #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx index b37c36407a72..dee697c2eed8 100644 --- a/sw/inc/swtypes.hxx +++ b/sw/inc/swtypes.hxx @@ -26,6 +26,7 @@ #include "swdllapi.h" #include <o3tl/typed_flags_set.hxx> #include <i18nlangtag/lang.h> +#include <vcl/outdev.hxx> namespace com { namespace sun { namespace star { namespace linguistic2{ @@ -130,7 +131,7 @@ css::uno::Reference< css::linguistic2::XThesaurus > GetThesaurus(); css::uno::Reference< css::linguistic2::XLinguProperties > GetLinguPropertySet(); // Returns the twip size of this graphic. -SW_DLLPUBLIC Size GetGraphicSizeTwip( const Graphic&, OutputDevice* pOutDev ); +SW_DLLPUBLIC Size GetGraphicSizeTwip( const Graphic&, vcl::RenderContext* pOutDev ); // Separator for jumps to different content types in document. const sal_Unicode cMarkSeparator = '|'; diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx index 30adb4744335..e4f5c2efe713 100644 --- a/sw/source/core/SwNumberTree/SwNumberTree.cxx +++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx @@ -297,7 +297,7 @@ void SwNumberTreeNode::Validate(const SwNumberTreeNode * pNode) const } } -void SwNumberTreeNode::GetNumberVector_(vector<SwNumberTree::tSwNumTreeNumber> & rVector, +void SwNumberTreeNode::GetNumberVector_(SwNumberTree::tNumberVector & rVector, bool bValidate) const { if (mpParent) @@ -675,7 +675,7 @@ SwNumberTree::tSwNumTreeNumber SwNumberTreeNode::GetNumber(bool bValidate) } -vector<SwNumberTree::tSwNumTreeNumber> SwNumberTreeNode::GetNumberVector() const +SwNumberTree::tNumberVector SwNumberTreeNode::GetNumberVector() const { vector<SwNumberTree::tSwNumTreeNumber> aResult; diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 22ff781213dd..9367874f24c5 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -2074,7 +2074,7 @@ SwFrameFormats::~SwFrameFormats() DeleteAndDestroyAll(); } -SwFrameFormats::iterator SwFrameFormats::find( const value_type& x ) const +SwFrameFormats::const_iterator SwFrameFormats::find( const value_type& x ) const { ByTypeAndName::iterator it = m_TypeAndNameIndex.find( boost::make_tuple(x->Which(), x->GetName(), x) ); diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index 0790582777bf..7c76779cd658 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -75,7 +75,7 @@ void AppendAllObjs(const SwFrameFormats* pTable, const SwFrame* pSib); // transparency, saved in the color of the brush item. void DrawGraphic( const SvxBrushItem *, - OutputDevice *, + vcl::RenderContext *, const SwRect &rOrg, const SwRect &rOut, const sal_uInt8 nGrfNum = GRFNUM_NO, @@ -85,11 +85,11 @@ bool DrawFillAttributes( const SwRect& rOriginalLayoutRect, const SwRegionRects& rPaintRegion, const basegfx::utils::B2DClipState& rClipState, - OutputDevice& rOut); + vcl::RenderContext& rOut); // RotGrfFlyFrame: Adapted to rotation void paintGraphicUsingPrimitivesHelper( - OutputDevice & rOutputDevice, + vcl::RenderContext & rOutputDevice, GraphicObject const& rGraphicObj, GraphicAttr const& rGraphicAttr, const basegfx::B2DHomMatrix& rGraphicTransform, @@ -103,7 +103,7 @@ void SwAlignRect( SwRect &rRect, const SwViewShell *pSh, const vcl::RenderContex // method to align graphic rectangle // Created declaration here to avoid <extern> declarations -void SwAlignGrfRect( SwRect *pGrfRect, const OutputDevice &rOut ); +void SwAlignGrfRect( SwRect *pGrfRect, const vcl::RenderContext &rOut ); /** * Paint border around a run of characters using frame painting code. @@ -144,7 +144,7 @@ extern bool bDontCreateObjects; extern bool bSetCompletePaintOnInvalidate; // for table settings via keyboard -long CalcRowRstHeight( SwLayoutFrame *pRow ); +SwTwips CalcRowRstHeight( SwLayoutFrame *pRow ); long CalcHeightWithFlys( const SwFrame *pFrame ); SwPageFrame *InsertNewPage( SwPageDesc &rDesc, SwFrame *pUpper, diff --git a/sw/source/core/inc/paintfrm.hxx b/sw/source/core/inc/paintfrm.hxx index 6f30539e6ffe..b3d4812d6aad 100644 --- a/sw/source/core/inc/paintfrm.hxx +++ b/sw/source/core/inc/paintfrm.hxx @@ -25,8 +25,11 @@ extern Color aGlobalRetoucheColor; class OutputDevice; +namespace vcl { + typedef OutputDevice RenderContext; +}; -void SwCalcPixStatics( OutputDevice const *pOut ); +void SwCalcPixStatics( vcl::RenderContext const *pOut ); #endif // INCLUDED_SW_SOURCE_CORE_INC_PAINTFRM_HXX diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 006b33927a41..3d106bb195c4 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -2076,7 +2076,7 @@ SwRootFrame *SwViewShell::GetLayout() const return mpLayout.get(); } -OutputDevice& SwViewShell::GetRefDev() const +vcl::RenderContext& SwViewShell::GetRefDev() const { OutputDevice* pTmpOut = nullptr; if ( GetWin() && diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index 0e7b6622a260..c42086edb0e8 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -184,7 +184,7 @@ void GetWriter( const OUString& rFltName, const OUString& rBaseURL, WriterRef& x } } -SwRead GetReader( const OUString& rFltName ) +Reader* GetReader( const OUString& rFltName ) { SwRead pRead = nullptr; for( int n = 0; n < MAXFILTER; ++n ) diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index a6fa398d9076..b0ba35346da4 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -452,7 +452,7 @@ public: virtual sal_uInt32 GetIdx() const override; virtual void SetIdx(sal_uInt32 nI) override; virtual bool SeekPos(WW8_CP nCpPos) override; - virtual WW8_FC Where() override; + virtual WW8_CP Where() override; virtual void GetSprms( WW8PLCFxDesc* p ) override; virtual void advance() override; @@ -477,7 +477,7 @@ public: virtual sal_uInt32 GetIdx() const override; virtual void SetIdx(sal_uInt32 nI) override; virtual bool SeekPos(WW8_CP nCpPos) override; - virtual WW8_FC Where() override; + virtual WW8_CP Where() override; virtual long GetNoSprms( WW8_CP& rStart, WW8_CP&, sal_Int32& rLen ) override; virtual void advance() override; WW8_CP CurrentPieceStartFc2Cp( WW8_FC nStartPos ); @@ -680,7 +680,7 @@ public: virtual sal_uInt32 GetIdx() const override; virtual void SetIdx(sal_uInt32 nIdx) override; virtual bool SeekPos(WW8_CP nCpPos) override; - virtual WW8_FC Where() override; + virtual WW8_CP Where() override; virtual void GetSprms( WW8PLCFxDesc* p ) override; virtual void advance() override; SprmResult HasSprm( sal_uInt16 nId ) const; @@ -708,7 +708,7 @@ public: virtual sal_uInt32 GetIdx() const override; virtual void SetIdx(sal_uInt32 nIdx) override; virtual bool SeekPos(WW8_CP nCpPos) override; - virtual WW8_FC Where() override; + virtual WW8_CP Where() override; // returns reference descriptors const void* GetData() const @@ -736,7 +736,7 @@ public: virtual sal_uInt32 GetIdx() const override; virtual void SetIdx(sal_uInt32 nIdx) override; virtual bool SeekPos(WW8_CP nCpPos) override; - virtual WW8_FC Where() override; + virtual WW8_CP Where() override; virtual void GetSprms(WW8PLCFxDesc* p) override; virtual void advance() override; bool StartPosIsFieldStart(); @@ -769,7 +769,7 @@ public: virtual sal_uInt32 GetIdx2() const override; virtual void SetIdx2(sal_uInt32 nIdx) override; virtual bool SeekPos(WW8_CP nCpPos) override; - virtual WW8_FC Where() override; + virtual WW8_CP Where() override; virtual long GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen ) override; virtual void advance() override; const OUString* GetName() const; @@ -806,7 +806,7 @@ public: virtual sal_uInt32 GetIdx2() const override; virtual void SetIdx2(sal_uInt32 nIdx) override; virtual bool SeekPos(WW8_CP nCpPos) override; - virtual WW8_FC Where() override; + virtual WW8_CP Where() override; virtual long GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen ) override; virtual void advance() override; @@ -836,7 +836,7 @@ public: virtual sal_uInt32 GetIdx2() const override; virtual void SetIdx2(sal_uInt32 nIdx) override; virtual bool SeekPos(WW8_CP nCpPos) override; - virtual WW8_FC Where() override; + virtual WW8_CP Where() override; virtual long GetNoSprms(WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen) override; virtual void advance() override; diff --git a/test/source/diff/diff.cxx b/test/source/diff/diff.cxx index 477813259af7..e3f7c115d809 100644 --- a/test/source/diff/diff.cxx +++ b/test/source/diff/diff.cxx @@ -81,7 +81,7 @@ private: void loadToleranceFile(xmlDocPtr xmlTolerance); bool compareAttributes(xmlNodePtr node1, xmlNodePtr node2); - bool compareElements(xmlNodePtr node1, xmlNodePtr node2); + bool compareElements(xmlNode* node1, xmlNode* node2); /// Error message for cppunit that prints out when expected and found are not equal. void cppunitAssertEqual(const xmlChar *expected, const xmlChar *found); diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index d68c09a9eef6..b25cdce8acba 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -220,7 +220,7 @@ void VCLXGraphicControl::ImplSetNewImage() pButton->SetModeImage( GetImage() ); } -void VCLXGraphicControl::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, short Flags ) +void VCLXGraphicControl::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ) { SolarMutexGuard aGuard; @@ -863,7 +863,7 @@ void VCLXCheckBox::setLabel( const OUString& rLabel ) pWindow->SetText( rLabel ); } -void VCLXCheckBox::setState( short n ) +void VCLXCheckBox::setState( sal_Int16 n ) { SolarMutexGuard aGuard; @@ -891,11 +891,11 @@ void VCLXCheckBox::setState( short n ) } } -short VCLXCheckBox::getState() +sal_Int16 VCLXCheckBox::getState() { SolarMutexGuard aGuard; - short nState = -1; + sal_Int16 nState = -1; VclPtr< CheckBox > pCheckBox = GetAs< CheckBox >(); if ( pCheckBox ) { @@ -2956,7 +2956,7 @@ OUString VCLXFixedHyperlink::getURL( ) return aText; } -void VCLXFixedHyperlink::setAlignment( short nAlign ) +void VCLXFixedHyperlink::setAlignment( sal_Int16 nAlign ) { SolarMutexGuard aGuard; @@ -2977,11 +2977,11 @@ void VCLXFixedHyperlink::setAlignment( short nAlign ) } } -short VCLXFixedHyperlink::getAlignment() +sal_Int16 VCLXFixedHyperlink::getAlignment() { SolarMutexGuard aGuard; - short nAlign = 0; + sal_Int16 nAlign = 0; VclPtr< vcl::Window > pWindow = GetWindow(); if ( pWindow ) { @@ -3204,7 +3204,7 @@ OUString VCLXFixedText::getText() return aText; } -void VCLXFixedText::setAlignment( short nAlign ) +void VCLXFixedText::setAlignment( sal_Int16 nAlign ) { SolarMutexGuard aGuard; @@ -3225,11 +3225,11 @@ void VCLXFixedText::setAlignment( short nAlign ) } } -short VCLXFixedText::getAlignment() +sal_Int16 VCLXFixedText::getAlignment() { SolarMutexGuard aGuard; - short nAlign = 0; + sal_Int16 nAlign = 0; VclPtr< vcl::Window > pWindow = GetWindow(); if ( pWindow ) { diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index 2a9c42705b30..50b954452a30 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -1466,14 +1466,14 @@ void UnoCheckBoxControl::setLabel( const OUString& rLabel ) ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_LABEL ), uno::Any(rLabel), true ); } -void UnoCheckBoxControl::setState( short n ) +void UnoCheckBoxControl::setState( sal_Int16 n ) { - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STATE ), uno::Any(static_cast<sal_Int16>(n)), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_STATE ), uno::Any(n), true ); } -short UnoCheckBoxControl::getState() +sal_Int16 UnoCheckBoxControl::getState() { - short nState = 0; + sal_Int16 nState = 0; uno::Any aVal = ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_STATE ) ); aVal >>= nState; return nState; @@ -1646,14 +1646,14 @@ OUString UnoFixedHyperlinkControl::getURL( ) return ImplGetPropertyValue_UString( BASEPROPERTY_URL ); } -void UnoFixedHyperlinkControl::setAlignment( short nAlign ) +void UnoFixedHyperlinkControl::setAlignment( sal_Int16 nAlign ) { - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_ALIGN ), uno::Any(static_cast<sal_Int16>(nAlign)), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_ALIGN ), uno::Any(nAlign), true ); } -short UnoFixedHyperlinkControl::getAlignment() +sal_Int16 UnoFixedHyperlinkControl::getAlignment() { - short nAlign = 0; + sal_Int16 nAlign = 0; if ( mxModel.is() ) { uno::Any aVal = ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_ALIGN ) ); @@ -1839,14 +1839,14 @@ OUString UnoFixedTextControl::getText() return ImplGetPropertyValue_UString( BASEPROPERTY_LABEL ); } -void UnoFixedTextControl::setAlignment( short nAlign ) +void UnoFixedTextControl::setAlignment( sal_Int16 nAlign ) { - ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_ALIGN ), uno::Any(static_cast<sal_Int16>(nAlign)), true ); + ImplSetPropertyValue( GetPropertyName( BASEPROPERTY_ALIGN ), uno::Any(nAlign), true ); } -short UnoFixedTextControl::getAlignment() +sal_Int16 UnoFixedTextControl::getAlignment() { - short nAlign = 0; + sal_Int16 nAlign = 0; if ( mxModel.is() ) { uno::Any aVal = ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_ALIGN ) ); diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx index 03c849655f3f..4adedc9db4af 100644 --- a/unotools/source/config/bootstrap.cxx +++ b/unotools/source/config/bootstrap.cxx @@ -582,7 +582,7 @@ Bootstrap::PathStatus Bootstrap::locateBaseInstallation(OUString& _rURL) return aPathData.status; } -PathStatus Bootstrap::locateUserInstallation(OUString& _rURL) +Bootstrap::PathStatus Bootstrap::locateUserInstallation(OUString& _rURL) { Impl::PathData const& aPathData = data().aUserInstall_; @@ -590,7 +590,7 @@ PathStatus Bootstrap::locateUserInstallation(OUString& _rURL) return aPathData.status; } -PathStatus Bootstrap::locateUserData(OUString& _rURL) +Bootstrap::PathStatus Bootstrap::locateUserData(OUString& _rURL) { OUString const csUserDirItem(BOOTSTRAP_ITEM_USERDIR); @@ -607,7 +607,7 @@ PathStatus Bootstrap::locateUserData(OUString& _rURL) } } -PathStatus Bootstrap::locateBootstrapFile(OUString& _rURL) +Bootstrap::PathStatus Bootstrap::locateBootstrapFile(OUString& _rURL) { Impl::PathData const& aPathData = data().aBootstrapINI_; @@ -615,7 +615,7 @@ PathStatus Bootstrap::locateBootstrapFile(OUString& _rURL) return aPathData.status; } -PathStatus Bootstrap::locateVersionFile(OUString& _rURL) +Bootstrap::PathStatus Bootstrap::locateVersionFile(OUString& _rURL) { Impl::PathData const& aPathData = data().aVersionINI_; diff --git a/vcl/inc/unx/cpdmgr.hxx b/vcl/inc/unx/cpdmgr.hxx index 8e15cb0ba27b..ed1929744163 100644 --- a/vcl/inc/unx/cpdmgr.hxx +++ b/vcl/inc/unx/cpdmgr.hxx @@ -73,8 +73,8 @@ class CPDManager : public PrinterInfoManager virtual void initialize() override; #if ENABLE_DBUS && ENABLE_GIO - static void onNameAcquired(GDBusConnection *connection, const char* name, void* user_data); - static void onNameLost (GDBusConnection *, const char *name, void*); + static void onNameAcquired(GDBusConnection *connection, const gchar* name, gpointer user_data); + static void onNameLost (GDBusConnection *, const gchar *name, gpointer); static void printerAdded (GDBusConnection *connection, const gchar *sender_name, const gchar *object_path, diff --git a/vcl/inc/unx/gtk/glomenu.h b/vcl/inc/unx/gtk/glomenu.h index 5586aa4edce1..a0150a845e3e 100644 --- a/vcl/inc/unx/gtk/glomenu.h +++ b/vcl/inc/unx/gtk/glomenu.h @@ -39,7 +39,7 @@ gint g_lo_menu_get_n_items_from_section (GLOMenu void g_lo_menu_insert (GLOMenu *menu, gint position, - const char *label); + const gchar *label); void g_lo_menu_insert_in_section (GLOMenu *menu, gint section, diff --git a/vcl/source/filter/igif/decode.hxx b/vcl/source/filter/igif/decode.hxx index bdf9e64f8c74..24ba7dbe5701 100644 --- a/vcl/source/filter/igif/decode.hxx +++ b/vcl/source/filter/igif/decode.hxx @@ -57,7 +57,7 @@ public: explicit GIFLZWDecompressor( sal_uInt8 cDataSize ); ~GIFLZWDecompressor(); - sal_uInt8* DecompressBlock( sal_uInt8* pSrc, sal_uInt8 cBufSize, sal_uLong& rCount, bool& rEOI ); + Scanline DecompressBlock( sal_uInt8* pSrc, sal_uInt8 cBufSize, sal_uLong& rCount, bool& rEOI ); }; #endif diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index ade0a6607a8f..79c344d8fbfb 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -31,8 +31,6 @@ typedef sal_uInt8 U8; typedef sal_uInt16 U16; typedef sal_Int64 S64; -typedef sal_Int32 GlyphWidth; - typedef double RealType; typedef RealType ValType; @@ -273,7 +271,7 @@ public: bool initialCffRead(); void emitAsType1( class Type1Emitter&, const sal_GlyphId* pGlyphIds, const U8* pEncoding, - GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& ); + sal_Int32* pGlyphWidths, int nGlyphCount, FontSubsetInfo& ); private: int convert2Type1Ops( CffLocal*, const U8* pType2Ops, int nType2Len, U8* pType1Ops); @@ -1734,7 +1732,7 @@ void Type1Emitter::emitValVector( const char* pLineHead, const char* pLineTail, void CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, const sal_GlyphId* pReqGlyphIds, const U8* pReqEncoding, - GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& rFSInfo) + sal_Int32* pGlyphWidths, int nGlyphCount, FontSubsetInfo& rFSInfo) { // prepare some fontdirectory details static const int nUniqueIdBase = 4100000; // using private-interchange UniqueIds @@ -1975,7 +1973,7 @@ void CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, ValType aCharWidth = getCharWidth(); if( maFontMatrix.size() >= 4) aCharWidth *= 1000.0F * maFontMatrix[0]; - pGlyphWidths[i] = static_cast<GlyphWidth>(aCharWidth); + pGlyphWidths[i] = static_cast<sal_Int32>(aCharWidth); } } pOut += sprintf( pOut, "end end\nreadonly put\nput\n"); @@ -2029,7 +2027,7 @@ void CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, rFSInfo.m_aPSName = OUString( rEmitter.maSubsetName, strlen(rEmitter.maSubsetName), RTL_TEXTENCODING_UTF8 ); } -bool FontSubsetInfo::CreateFontSubsetFromCff( GlyphWidth* pOutGlyphWidths ) +bool FontSubsetInfo::CreateFontSubsetFromCff( sal_Int32* pOutGlyphWidths ) { CffSubsetterContext aCff( mpInFontBytes, mnInByteLength); bool bRC = aCff.initialCffRead(); diff --git a/writerfilter/source/dmapper/BorderHandler.hxx b/writerfilter/source/dmapper/BorderHandler.hxx index 9d8001d51050..b986b2ed997a 100644 --- a/writerfilter/source/dmapper/BorderHandler.hxx +++ b/writerfilter/source/dmapper/BorderHandler.hxx @@ -19,9 +19,10 @@ #ifndef INCLUDED_WRITERFILTER_SOURCE_DMAPPER_BORDERHANDLER_HXX #define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_BORDERHANDLER_HXX +#include <memory> #include <vector> #include "LoggedResources.hxx" -#include <memory> +#include "PropertyMap.hxx" #include <com/sun/star/table/BorderLine2.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <o3tl/enumarray.hxx> @@ -67,7 +68,7 @@ public: explicit BorderHandler( bool bOOXML ); virtual ~BorderHandler() override; - ::tools::SvRef<PropertyMap> getProperties(); + PropertyMapPtr getProperties(); css::table::BorderLine2 getBorderLine(); sal_Int32 getLineDistance() const { return m_nLineDistance;} bool getShadow() { return m_bShadow;} diff --git a/writerfilter/source/dmapper/CellColorHandler.hxx b/writerfilter/source/dmapper/CellColorHandler.hxx index fb72be4262bb..8e77c1c080be 100644 --- a/writerfilter/source/dmapper/CellColorHandler.hxx +++ b/writerfilter/source/dmapper/CellColorHandler.hxx @@ -20,6 +20,7 @@ #define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_CELLCOLORHANDLER_HXX #include "LoggedResources.hxx" +#include "PropertyMap.hxx" #include <memory> #include <vector> @@ -54,7 +55,7 @@ public: CellColorHandler( ); virtual ~CellColorHandler() override; - ::tools::SvRef<TablePropertyMap> getProperties(); + TablePropertyMapPtr getProperties(); void setOutputFormat( OutputFormat format ) { m_OutputFormat = format; } diff --git a/writerfilter/source/dmapper/DomainMapper.hxx b/writerfilter/source/dmapper/DomainMapper.hxx index e6b082cfcd47..78e4cf535bbd 100644 --- a/writerfilter/source/dmapper/DomainMapper.hxx +++ b/writerfilter/source/dmapper/DomainMapper.hxx @@ -21,6 +21,7 @@ #include <dmapper/DomainMapperFactory.hxx> #include "LoggedResources.hxx" +#include "PropertyMap.hxx" #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/style/TabAlign.hpp> @@ -64,6 +65,8 @@ class StyleSheetTable; class GraphicZOrderHelper; class GraphicNamingHelper; +typedef tools::SvRef<StyleSheetTable> StyleSheetTablePtr; + class DomainMapper : public LoggedProperties, public LoggedTable, public BinaryObj, public LoggedStream { @@ -86,9 +89,9 @@ public: virtual void data(const sal_uInt8* buf, size_t len, writerfilter::Reference<Properties>::Pointer_t ref) override; - void sprmWithProps( Sprm& sprm, const ::tools::SvRef<PropertyMap>& pContext ); + void sprmWithProps( Sprm& sprm, const PropertyMapPtr& pContext ); - void PushStyleSheetProperties( const ::tools::SvRef<PropertyMap>& pStyleProperties, bool bAffectTableMngr = false ); + void PushStyleSheetProperties( const PropertyMapPtr& pStyleProperties, bool bAffectTableMngr = false ); void PopStyleSheetProperties( bool bAffectTableMngr = false ); void PushListProperties( const ::tools::SvRef<PropertyMap>& pListProperties ); @@ -100,7 +103,7 @@ public: css::uno::Reference<css::text::XTextRange> GetCurrentTextRange(); OUString getOrCreateCharStyle( PropertyValueVector_t& rCharProperties, bool bAlwaysCreate ); - tools::SvRef< StyleSheetTable > const & GetStyleSheetTable( ); + StyleSheetTablePtr const & GetStyleSheetTable( ); GraphicZOrderHelper* graphicZOrderHelper(); GraphicNamingHelper& GetGraphicNamingHelper(); diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 20d6fb60b3a9..74ca53ab814f 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -389,7 +389,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) return bRet; } -std::shared_ptr< vector<sal_Int32> > const & DomainMapperTableManager::getCurrentGrid( ) +DomainMapperTableManager::IntVectorPtr const & DomainMapperTableManager::getCurrentGrid( ) { return m_aTableGrid.back( ); } @@ -399,12 +399,12 @@ bool DomainMapperTableManager::hasCurrentSpans() const return !m_aGridSpans.empty(); } -std::shared_ptr< vector< sal_Int32 > > const & DomainMapperTableManager::getCurrentSpans( ) +DomainMapperTableManager::IntVectorPtr const & DomainMapperTableManager::getCurrentSpans( ) { return m_aGridSpans.back( ); } -std::shared_ptr< vector< sal_Int32 > > const & DomainMapperTableManager::getCurrentCellWidths( ) +DomainMapperTableManager::IntVectorPtr const & DomainMapperTableManager::getCurrentCellWidths( ) { return m_aCellWidths.back( ); } diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index 69f5a905cb0c..4d2a9cd2047a 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -114,6 +114,9 @@ public: GrabBagType getGrabBagType() const { return m_GrabBagType; } }; +class PropertyMap; +typedef tools::SvRef< PropertyMap > PropertyMapPtr; + class PropertyMap : public virtual SvRefBase { private: @@ -142,7 +145,7 @@ public: void Erase( PropertyIds eId); // Imports properties from pMap - void InsertProps( const tools::SvRef< PropertyMap >& rMap, const bool bOverwrite = true ); + void InsertProps( const PropertyMapPtr& rMap, const bool bOverwrite = true ); // Returns a copy of the property if it exists, .first is its PropertyIds and .second is its Value (type css::uno::Any) boost::optional< Property > getProperty( PropertyIds eId ) const; @@ -176,8 +179,6 @@ protected: } }; -typedef tools::SvRef< PropertyMap > PropertyMapPtr; - class SectionPropertyMap : public PropertyMap { public: diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index dd89faf46654..9fb4b4360c24 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -2463,7 +2463,7 @@ void XMLTextParagraphExport::exportSoftPageBreak() void XMLTextParagraphExport::exportTextMark( const Reference<XPropertySet> & rPropSet, const OUString& rProperty, - const enum XMLTokenEnum pElements[], + const ::xmloff::token::XMLTokenEnum pElements[], bool bAutoStyles) { // mib said: "Hau wech!" |