From 191f85df5851473af270be486f95f940e3091fef Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 4 Mar 2019 08:57:28 +0200 Subject: re-land "new loplugin typedefparam"" This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin --- .../inc/extended/textwindowaccessibility.hxx | 4 +- .../source/extended/textwindowaccessibility.cxx | 4 +- canvas/source/opengl/ogl_canvastools.hxx | 4 +- canvas/source/tools/surface.hxx | 2 +- chart2/source/tools/InternalData.cxx | 4 +- compilerplugins/clang/test/typedefparam.cxx | 80 ++++++ compilerplugins/clang/typedefparam.cxx | 291 +++++++++++++++++++++ configmgr/source/readwriteaccess.cxx | 2 +- configmgr/source/rootaccess.cxx | 2 +- configmgr/source/rootaccess.hxx | 2 +- .../source/drivers/mysqlc/mysqlc_connection.hxx | 6 +- .../drivers/mysqlc/mysqlc_prepared_resultset.hxx | 3 +- .../source/drivers/mysqlc/mysqlc_resultset.hxx | 3 +- cppuhelper/source/implementationentry.cxx | 6 +- cui/source/dialogs/hangulhanjadlg.cxx | 2 +- dbaccess/source/filter/hsqldb/hsqlbinarynode.cxx | 2 +- dbaccess/source/filter/hsqldb/hsqlimport.cxx | 21 +- dbaccess/source/filter/hsqldb/parseschema.cxx | 2 +- dbaccess/source/filter/hsqldb/rowinputbinary.cxx | 4 +- dbaccess/source/ui/misc/charsets.cxx | 2 +- .../source/primitive2d/baseprimitive2d.cxx | 2 +- .../source/primitive3d/baseprimitive3d.cxx | 2 +- editeng/source/misc/unolingu.cxx | 24 +- forms/source/solar/inc/navtoolbar.hxx | 4 +- forms/source/xforms/model.cxx | 8 +- forms/source/xforms/model.hxx | 44 ++-- forms/source/xforms/model_ui.cxx | 30 +-- hwpfilter/source/hcode.cxx | 2 +- include/canvas/spriteredrawmanager.hxx | 9 +- include/comphelper/listenernotification.hxx | 6 +- .../drawinglayer/primitive2d/baseprimitive2d.hxx | 2 +- .../drawinglayer/primitive3d/baseprimitive3d.hxx | 2 +- include/oox/ppt/slidepersist.hxx | 2 +- include/sfx2/sfxbasecontroller.hxx | 2 +- include/svtools/brwbox.hxx | 2 +- include/svtools/editbrowsebox.hxx | 2 +- include/svtools/table/tablerenderer.hxx | 13 +- include/svx/charmap.hxx | 2 +- include/svx/galctrl.hxx | 2 +- include/svx/sdrpagewindow.hxx | 3 +- include/svx/svdpagv.hxx | 3 +- include/vcl/cairo.hxx | 5 +- include/vcl/fontcharmap.hxx | 6 +- .../source/hyphenator/hyphen/hyphenimp.cxx | 6 +- .../source/hyphenator/hyphen/hyphenimp.hxx | 6 +- .../source/spellcheck/spell/sspellimp.cxx | 4 +- .../source/spellcheck/spell/sspellimp.hxx | 4 +- .../source/thesaurus/libnth/nthesimp.cxx | 2 +- .../source/thesaurus/libnth/nthesimp.hxx | 2 +- linguistic/source/hyphdsp.cxx | 6 +- linguistic/source/hyphdsp.hxx | 6 +- linguistic/source/spelldsp.cxx | 4 +- linguistic/source/spelldsp.hxx | 4 +- linguistic/source/thesdsp.cxx | 2 +- linguistic/source/thesdsp.hxx | 2 +- oox/source/mathml/import.cxx | 2 +- sal/osl/unx/mutex.cxx | 8 +- sal/textenc/tencinfo.cxx | 8 +- sal/textenc/textcvt.cxx | 4 +- sax/source/tools/fastserializer.cxx | 4 +- sax/source/tools/fastserializer.hxx | 4 +- sc/source/core/data/segmenttree.cxx | 2 +- sc/source/filter/excel/xeescher.cxx | 2 +- sc/source/filter/inc/lotrange.hxx | 6 +- sc/source/filter/inc/workbookhelper.hxx | 2 +- sc/source/filter/inc/worksheethelper.hxx | 2 +- sc/source/filter/inc/xeescher.hxx | 7 +- sc/source/ui/inc/AccessibleCsvControl.hxx | 5 +- sc/source/ui/inc/colrowba.hxx | 2 +- sc/source/ui/inc/condformatuno.hxx | 4 +- sc/source/ui/inc/dbfunc.hxx | 2 +- sc/source/ui/unoobj/condformatuno.cxx | 4 +- sc/source/ui/view/colrowba.cxx | 2 +- scaddins/source/analysis/analysishelper.hxx | 2 +- sd/source/core/sdpage_animations.cxx | 2 +- sd/source/ui/sidebar/MasterPageContainer.cxx | 4 +- sd/source/ui/sidebar/MasterPagesSelector.cxx | 2 +- sd/source/ui/sidebar/MasterPagesSelector.hxx | 2 +- .../ui/slidesorter/shell/SlideSorterService.cxx | 16 +- .../ui/slidesorter/shell/SlideSorterService.hxx | 16 +- .../source/presenter/PresenterBitmapContainer.cxx | 10 +- sfx2/source/appl/appdispatchprovider.cxx | 4 +- sfx2/source/dialog/filedlghelper.cxx | 2 +- sfx2/source/dialog/filedlgimpl.hxx | 2 +- sfx2/source/dialog/templdlg.cxx | 2 +- sfx2/source/inc/macroloader.hxx | 2 +- sfx2/source/inc/templdgi.hxx | 2 +- .../engine/animationnodes/animationaudionode.hxx | 2 +- .../engine/animationnodes/animationbasenode.hxx | 2 +- slideshow/source/engine/shapes/backgroundshape.cxx | 2 +- slideshow/source/engine/shapes/backgroundshape.hxx | 3 +- .../source/engine/shapes/drawshapesubsetting.hxx | 5 +- slideshow/source/engine/shapes/mediashape.hxx | 3 +- slideshow/source/engine/slide/layer.hxx | 11 +- slideshow/source/engine/slide/layermanager.cxx | 2 +- slideshow/source/engine/slide/shapemanagerimpl.hxx | 12 +- slideshow/source/engine/slideview.cxx | 6 +- .../source/engine/transitions/slidechangebase.cxx | 2 +- .../source/engine/transitions/slidechangebase.hxx | 22 +- slideshow/source/inc/animationnode.hxx | 10 +- slideshow/source/inc/basecontainernode.hxx | 8 +- slideshow/source/inc/basenode.hxx | 11 +- slideshow/source/inc/eventmultiplexer.hxx | 8 +- slideshow/source/inc/hslcoloranimation.hxx | 4 +- slideshow/source/inc/numberanimation.hxx | 4 +- slideshow/source/inc/pairanimation.hxx | 4 +- slideshow/source/inc/shape.hxx | 8 +- slideshow/source/inc/shapemanager.hxx | 13 +- slideshow/source/inc/slide.hxx | 2 +- slideshow/source/inc/slideshowcontext.hxx | 3 +- slideshow/source/inc/subsettableshapemanager.hxx | 11 +- slideshow/source/inc/tools.hxx | 61 ++--- slideshow/source/inc/view.hxx | 2 +- slideshow/source/inc/viewlayer.hxx | 14 +- solenv/CompilerTest_compilerplugins_clang.mk | 1 + svl/source/numbers/numfmuno.cxx | 12 +- svl/source/numbers/numfmuno.hxx | 14 +- svtools/inc/table/gridtablerenderer.hxx | 10 +- svtools/source/brwbox/editbrowsebox.cxx | 2 +- svtools/source/table/gridtablerenderer.cxx | 2 +- svtools/source/table/tablecontrol.cxx | 2 +- svtools/source/table/tablecontrol_impl.cxx | 2 +- svx/inc/svdibrow.hxx | 2 +- svx/source/fmcomp/gridcell.cxx | 6 +- svx/source/form/navigatortree.cxx | 2 +- svx/source/svdraw/svdcrtv.cxx | 2 +- svx/source/svdraw/svdibrow.cxx | 2 +- svx/source/tbxctrls/tbcontrl.cxx | 4 +- sw/inc/crsrsh.hxx | 2 +- sw/inc/doc.hxx | 4 +- sw/inc/swatrset.hxx | 6 +- sw/inc/swtypes.hxx | 3 +- sw/source/core/SwNumberTree/SwNumberTree.cxx | 4 +- sw/source/core/doc/docfmt.cxx | 2 +- sw/source/core/inc/frmtool.hxx | 10 +- sw/source/core/inc/paintfrm.hxx | 5 +- sw/source/core/view/viewsh.cxx | 2 +- sw/source/filter/ww8/wrtw8esh.cxx | 2 +- sw/source/filter/ww8/wrtww8.hxx | 3 +- sw/source/filter/ww8/ww8scan.hxx | 16 +- test/source/diff/diff.cxx | 2 +- testtools/source/bridgetest/cppobj.cxx | 28 +- toolkit/source/awt/vclxwindows.cxx | 20 +- toolkit/source/controls/unocontrols.cxx | 24 +- unotools/source/config/bootstrap.cxx | 8 +- vcl/inc/unx/cpdmgr.hxx | 4 +- vcl/inc/unx/gtk/glomenu.h | 2 +- vcl/source/filter/igif/decode.hxx | 2 +- vcl/source/fontsubset/cff.cxx | 10 +- writerfilter/source/dmapper/BorderHandler.hxx | 5 +- writerfilter/source/dmapper/CellColorHandler.hxx | 3 +- writerfilter/source/dmapper/DomainMapper.hxx | 9 +- .../source/dmapper/DomainMapperTableManager.cxx | 6 +- writerfilter/source/dmapper/PropertyMap.hxx | 7 +- .../source/ooxml/OOXMLFastContextHandler.cxx | 8 +- .../source/ooxml/OOXMLFastContextHandler.hxx | 8 +- xmloff/source/text/txtparae.cxx | 2 +- 157 files changed, 859 insertions(+), 455 deletions(-) create mode 100644 compilerplugins/clang/test/typedefparam.cxx create mode 100644 compilerplugins/clang/typedefparam.cxx diff --git a/accessibility/inc/extended/textwindowaccessibility.hxx b/accessibility/inc/extended/textwindowaccessibility.hxx index dd211b0883a9..422b5924c7b1 100644 --- a/accessibility/inc/extended/textwindowaccessibility.hxx +++ b/accessibility/inc/extended/textwindowaccessibility.hxx @@ -211,9 +211,9 @@ private: virtual void SAL_CALL grabFocus() override; - virtual css::util::Color SAL_CALL getForeground() override; + virtual sal_Int32 SAL_CALL getForeground() override; - virtual css::util::Color SAL_CALL getBackground() override; + virtual sal_Int32 SAL_CALL getBackground() override; virtual ::sal_Int32 SAL_CALL getCaretPosition() override; diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 005b597e97ac..b629710691c3 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -275,13 +275,13 @@ void SAL_CALL Paragraph::grabFocus() } // virtual -css::util::Color SAL_CALL Paragraph::getForeground() +sal_Int32 SAL_CALL Paragraph::getForeground() { return 0; // TODO } // virtual -css::util::Color SAL_CALL Paragraph::getBackground() +sal_Int32 SAL_CALL Paragraph::getBackground() { return 0; // TODO } 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& 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 +#include +#include +#include +#include +#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 +{ +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(lhs) || isa(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(lhsType)) + { + if (auto rhsPointer = dyn_cast(rhsType)) + { + auto extractRecordType = [](clang::QualType type) { + auto recordType = dyn_cast(type); + if (recordType) + return recordType; + auto elaboratedType = dyn_cast(type); + if (!elaboratedType) + return static_cast(nullptr); + return dyn_cast(elaboratedType->desugar()); + }; + auto containsTypedefToRecord = [](clang::QualType type, RecordType const* recordType) { + TypedefType const* typedefType = dyn_cast(type); + if (!typedefType) + return false; + auto tmp = typedefType->desugar(); + if (auto elaboratedType = dyn_cast(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(lhsType)) + { + return areTypesEqual(lhsElaborated->getNamedType(), rhs); + } + if (auto rhsElaborated = dyn_cast(rhsType)) + { + return areTypesEqual(lhs, rhsElaborated->getNamedType()); + } + if (auto lhsTemplate = dyn_cast(lhsType)) + { + return areTypesEqual(lhsTemplate->desugar(), rhs); + } + if (auto rhsTemplate = dyn_cast(rhsType)) + { + return areTypesEqual(lhs, rhsTemplate->desugar()); + } + + if (auto lhsLValue = dyn_cast(lhsType)) + { + auto rhsLValue = dyn_cast(rhsType); + if (!rhsLValue) + return false; + return areTypesEqual(lhsLValue->getPointeeType(), rhsLValue->getPointeeType()); + } + if (auto lhsRValue = dyn_cast(lhsType)) + { + auto rhsRValue = dyn_cast(rhsType); + if (!rhsRValue) + return false; + return areTypesEqual(lhsRValue->getPointeeType(), rhsRValue->getPointeeType()); + } + if (auto lhsPointer = dyn_cast(lhsType)) + { + auto rhsPointer = dyn_cast(rhsType); + if (!rhsPointer) + return false; + return areTypesEqual(lhsPointer->getPointeeType(), rhsPointer->getPointeeType()); + } + if (auto lhsTypedef = dyn_cast(lhsType)) + { + auto rhsTypedef = dyn_cast(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(lhsType)) + { + auto rhsTemplate = dyn_cast(rhsType); + if (!rhsTemplate) + return false; + return areTypesEqual(lhsTemplate->desugar(), rhsTemplate->desugar()); + } + if (auto lhsMember = dyn_cast(lhsType)) + { + auto rhsMember = dyn_cast(rhsType); + if (!rhsMember) + return false; + if (lhsMember->getClass() != rhsMember->getClass()) + return true; + return areTypesEqual(lhsMember->getPointeeType(), rhsMember->getPointeeType()); + } + if (auto lhsParen = dyn_cast(lhsType)) + { + auto rhsParen = dyn_cast(rhsType); + if (!rhsParen) + return false; + return areTypesEqual(lhsParen->getInnerType(), rhsParen->getInnerType()); + } + if (dyn_cast(lhsType)) + { + auto rhsFunction = dyn_cast(rhsType); + if (!rhsFunction) + return false; + return true; // TODO + } + if (auto lhsDecayed = dyn_cast(lhsType)) + { + auto rhsDecayed = dyn_cast(rhsType); + if (!rhsDecayed) + return false; + return areTypesEqual(lhsDecayed->getAdjustedType(), rhsDecayed->getAdjustedType()); + } + return lhsType == rhsType; +} + +loplugin::Plugin::Registration X("typedefparam", true); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/configmgr/source/readwriteaccess.cxx b/configmgr/source/readwriteaccess.cxx index 422451c3e319..c7721c16ac57 100644 --- a/configmgr/source/readwriteaccess.cxx +++ b/configmgr/source/readwriteaccess.cxx @@ -88,7 +88,7 @@ private: virtual sal_Bool SAL_CALL hasPendingChanges() override { return getRoot()->hasPendingChanges(); } - virtual css::util::ChangesSet SAL_CALL getPendingChanges() override + virtual css::uno::Sequence< ::css::util::ElementChange > SAL_CALL getPendingChanges() override { return getRoot()->getPendingChanges(); } css::beans::Property SAL_CALL getPropertyByHierarchicalName( diff --git a/configmgr/source/rootaccess.cxx b/configmgr/source/rootaccess.cxx index 8b707bbe87d1..25673975a9e6 100644 --- a/configmgr/source/rootaccess.cxx +++ b/configmgr/source/rootaccess.cxx @@ -180,7 +180,7 @@ sal_Bool RootAccess::hasPendingChanges() { return !changes.empty(); } -css::util::ChangesSet RootAccess::getPendingChanges() +css::uno::Sequence< ::css::util::ElementChange > RootAccess::getPendingChanges() { assert(thisIs(IS_UPDATE)); osl::MutexGuard g(*lock_); diff --git a/configmgr/source/rootaccess.hxx b/configmgr/source/rootaccess.hxx index 9564bbf34a63..389cc9ad62b1 100644 --- a/configmgr/source/rootaccess.hxx +++ b/configmgr/source/rootaccess.hxx @@ -90,7 +90,7 @@ public: virtual sal_Bool SAL_CALL hasPendingChanges() override; - virtual css::util::ChangesSet SAL_CALL getPendingChanges() override; + virtual css::uno::Sequence< ::css::util::ElementChange > SAL_CALL getPendingChanges() override; private: virtual ~RootAccess() override; 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 my_XNameAccessRef; typedef ::cppu::WeakComponentImplHelper3 @@ -161,9 +160,10 @@ public: sal_Int32 SAL_CALL getTransactionIsolation() override; - my_XNameAccessRef SAL_CALL getTypeMap() override; + css::uno::Reference SAL_CALL getTypeMap() override; - void SAL_CALL setTypeMap(const my_XNameAccessRef& typeMap) override; + void SAL_CALL + setTypeMap(const css::uno::Reference& 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 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& typeMap) override; css::uno::Reference SAL_CALL getRef(sal_Int32 column) override; css::uno::Reference 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 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& typeMap) override; css::uno::Reference SAL_CALL getRef(sal_Int32 column) override; css::uno::Reference 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 HsqlBinaryNode::readRow(HsqlRowInputStream& input, - const ColumnTypeVector& aColTypes, + const std::vector& 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; -using RowVector = std::vector; -using IndexVector = std::vector; - -void lcl_setParams(const RowVector& row, Reference const& xParam, - const ColumnTypeVector& rColTypes) +void lcl_setParams(const std::vector& row, Reference const& xParam, + const std::vector& rColTypes) { assert(row.size() == rColTypes.size()); size_t nColIndex = 0; @@ -182,7 +178,8 @@ void lcl_setParams(const RowVector& row, Reference const& xParam, } } -OUString lcl_createInsertStatement(const OUString& sTableName, const ColumnTypeVector& rColTypes) +OUString lcl_createInsertStatement(const OUString& sTableName, + const std::vector& rColTypes) { assert(rColTypes.size() > 0); OUStringBuffer sql("INSERT INTO "); @@ -221,8 +218,8 @@ HsqlImporter::HsqlImporter(Reference& 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& xRows, const OUString& sTableName, + const std::vector& rColTypes) { OUString sStatement = lcl_createInsertStatement(sTableName, rColTypes); Reference 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& 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& rIndexes, const std::vector& 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 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 ColumnTypeVector; - HsqlRowInputStream::HsqlRowInputStream() {} void HsqlRowInputStream::setInputStream(Reference const& rStream) @@ -239,7 +237,7 @@ bool HsqlRowInputStream::checkNull() return nNull == 0; } -std::vector HsqlRowInputStream::readOneRow(const ColumnTypeVector& nColTypes) +std::vector HsqlRowInputStream::readOneRow(const std::vector& nColTypes) { auto nLen = nColTypes.size(); std::vector 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/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx index d9fac66c63dd..9646add14cf6 100644 --- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx @@ -80,7 +80,7 @@ namespace drawinglayer { } - Primitive2DSequence SAL_CALL BasePrimitive2D::getDecomposition( const uno::Sequence< beans::PropertyValue >& rViewParameters ) + css::uno::Sequence< ::css::uno::Reference< ::css::graphic::XPrimitive2D > > SAL_CALL BasePrimitive2D::getDecomposition( const uno::Sequence< beans::PropertyValue >& rViewParameters ) { const geometry::ViewInformation2D aViewInformation(rViewParameters); Primitive2DContainer aContainer; diff --git a/drawinglayer/source/primitive3d/baseprimitive3d.cxx b/drawinglayer/source/primitive3d/baseprimitive3d.cxx index cfac964e1a3a..828e4fdcf14c 100644 --- a/drawinglayer/source/primitive3d/baseprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/baseprimitive3d.cxx @@ -54,7 +54,7 @@ namespace drawinglayer return Primitive3DContainer(); } - Primitive3DSequence SAL_CALL BasePrimitive3D::getDecomposition( const uno::Sequence< beans::PropertyValue >& rViewParameters ) + css::uno::Sequence< ::css::uno::Reference< ::css::graphic::XPrimitive3D > > SAL_CALL BasePrimitive3D::getDecomposition( const uno::Sequence< beans::PropertyValue >& rViewParameters ) { const geometry::ViewInformation3D aViewInformation(rViewParameters); return comphelper::containerToSequence(get3DDecomposition(aViewInformation)); diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx index aae91634d45c..15cd2bdf6eba 100644 --- a/editeng/source/misc/unolingu.cxx +++ b/editeng/source/misc/unolingu.cxx @@ -99,7 +99,7 @@ public: css::uno::Reference< css::linguistic2::XMeaning > > SAL_CALL queryMeanings( const OUString& rTerm, const css::lang::Locale& rLocale, - const css::beans::PropertyValues& rProperties ) override; + const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) override; }; @@ -175,7 +175,7 @@ uno::Sequence< uno::Reference< linguistic2::XMeaning > > SAL_CALL ThesDummy_Impl::queryMeanings( const OUString& rTerm, const lang::Locale& rLocale, - const beans::PropertyValues& rProperties ) + const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) { GetThes_Impl(); uno::Sequence< uno::Reference< linguistic2::XMeaning > > aRes; @@ -207,10 +207,10 @@ public: // XSpellChecker1 (same as XSpellChecker but sal_Int16 for language) virtual sal_Bool SAL_CALL isValid( const OUString& rWord, sal_Int16 nLanguage, - const css::beans::PropertyValues& rProperties ) override; + const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) override; virtual css::uno::Reference< css::linguistic2::XSpellAlternatives > SAL_CALL spell( const OUString& rWord, sal_Int16 nLanguage, - const css::beans::PropertyValues& rProperties ) override; + const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) override; }; @@ -248,7 +248,7 @@ sal_Bool SAL_CALL sal_Bool SAL_CALL SpellDummy_Impl::isValid( const OUString& rWord, sal_Int16 nLanguage, - const beans::PropertyValues& rProperties ) + const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) { GetSpell_Impl(); bool bRes = true; @@ -260,7 +260,7 @@ sal_Bool SAL_CALL uno::Reference< linguistic2::XSpellAlternatives > SAL_CALL SpellDummy_Impl::spell( const OUString& rWord, sal_Int16 nLanguage, - const beans::PropertyValues& rProperties ) + const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) { GetSpell_Impl(); uno::Reference< linguistic2::XSpellAlternatives > xRes; @@ -295,19 +295,19 @@ public: hyphenate( const OUString& rWord, const css::lang::Locale& rLocale, sal_Int16 nMaxLeading, - const css::beans::PropertyValues& rProperties ) override; + const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) override; virtual css::uno::Reference< css::linguistic2::XHyphenatedWord > SAL_CALL queryAlternativeSpelling( const OUString& rWord, const css::lang::Locale& rLocale, sal_Int16 nIndex, - const css::beans::PropertyValues& rProperties ) override; + const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) override; virtual css::uno::Reference< css::linguistic2::XPossibleHyphens > SAL_CALL createPossibleHyphens( const OUString& rWord, const css::lang::Locale& rLocale, - const css::beans::PropertyValues& rProperties ) override; + const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) override; }; @@ -348,7 +348,7 @@ uno::Reference< linguistic2::XHyphenatedWord > SAL_CALL const OUString& rWord, const lang::Locale& rLocale, sal_Int16 nMaxLeading, - const beans::PropertyValues& rProperties ) + const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) { GetHyph_Impl(); uno::Reference< linguistic2::XHyphenatedWord > xRes; @@ -363,7 +363,7 @@ uno::Reference< linguistic2::XHyphenatedWord > SAL_CALL const OUString& rWord, const lang::Locale& rLocale, sal_Int16 nIndex, - const PropertyValues& rProperties ) + const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) { GetHyph_Impl(); uno::Reference< linguistic2::XHyphenatedWord > xRes; @@ -377,7 +377,7 @@ uno::Reference< linguistic2::XPossibleHyphens > SAL_CALL HyphDummy_Impl::createPossibleHyphens( const OUString& rWord, const lang::Locale& rLocale, - const beans::PropertyValues& rProperties ) + const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) { GetHyph_Impl(); uno::Reference< linguistic2::XPossibleHyphens > xRes; diff --git a/forms/source/solar/inc/navtoolbar.hxx b/forms/source/solar/inc/navtoolbar.hxx index 47347b9dc087..e5db22177383 100644 --- a/forms/source/solar/inc/navtoolbar.hxx +++ b/forms/source/solar/inc/navtoolbar.hxx @@ -33,8 +33,8 @@ namespace frm class IFeatureDispatcher; class ICommandImageProvider; class ICommandDescriptionProvider; - class ImplNavToolBar; + typedef std::shared_ptr< const ICommandImageProvider > PCommandImageProvider; class NavigationToolBar final : public vcl::Window { @@ -66,7 +66,7 @@ namespace frm NavigationToolBar( vcl::Window* _pParent, WinBits _nStyle, - const std::shared_ptr< const ICommandImageProvider >& _pImageProvider, + const PCommandImageProvider& _pImageProvider, const OUString & sModuleId ); virtual ~NavigationToolBar( ) override; diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index 4028996e41c3..d881d0ec1d56 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -507,13 +507,13 @@ css::uno::Reference SAL_CALL Model::getDefaultInstance // bindings management -Model::XPropertySet_t SAL_CALL Model::createBinding() +css::uno::Reference SAL_CALL Model::createBinding() { DBG_INVARIANT(); return new Binding(); } -Model::XPropertySet_t Model::cloneBinding( const XPropertySet_t& xBinding ) +css::uno::Reference Model::cloneBinding( const css::uno::Reference& xBinding ) { DBG_INVARIANT(); XPropertySet_t xNewBinding = createBinding(); @@ -521,7 +521,7 @@ Model::XPropertySet_t Model::cloneBinding( const XPropertySet_t& xBinding ) return xNewBinding; } -Model::XPropertySet_t Model::getBinding( const OUString& sId ) +css::uno::Reference Model::getBinding( const OUString& sId ) { DBG_INVARIANT(); return mxBindings->hasItem( sId ) ? mxBindings->getItem( sId ) : nullptr; @@ -543,7 +543,7 @@ css::uno::Reference Model::createSubmission() return new Submission(); } -css::uno::Reference Model::cloneSubmission(const XPropertySet_t& xSubmission) +css::uno::Reference Model::cloneSubmission(const css::uno::Reference& xSubmission) { DBG_INVARIANT(); css::uno::Reference xNewSubmission = createSubmission(); diff --git a/forms/source/xforms/model.hxx b/forms/source/xforms/model.hxx index df08dee8ab48..6d956576778c 100644 --- a/forms/source/xforms/model.hxx +++ b/forms/source/xforms/model.hxx @@ -214,11 +214,11 @@ public: // XModel: binding management - virtual XPropertySet_t SAL_CALL createBinding() override; + virtual css::uno::Reference SAL_CALL createBinding() override; - virtual XPropertySet_t SAL_CALL cloneBinding( const XPropertySet_t& ) override; + virtual css::uno::Reference SAL_CALL cloneBinding( const css::uno::Reference& ) override; - virtual XPropertySet_t SAL_CALL getBinding( const OUString& ) override; + virtual css::uno::Reference SAL_CALL getBinding( const OUString& ) override; virtual css::uno::Reference SAL_CALL getBindings() override; @@ -227,7 +227,7 @@ public: virtual css::uno::Reference SAL_CALL createSubmission() override; - virtual css::uno::Reference SAL_CALL cloneSubmission( const XPropertySet_t& ) override; + virtual css::uno::Reference SAL_CALL cloneSubmission( const css::uno::Reference& ) override; virtual css::uno::Reference SAL_CALL getSubmission( const OUString& ) override; @@ -263,10 +263,10 @@ public: /// determine a reasonable control service for a given node /// (based on data type MIP assigned to the node) - virtual OUString SAL_CALL getDefaultServiceNameForNode( const XNode_t& xNode ) override; + virtual OUString SAL_CALL getDefaultServiceNameForNode( const css::uno::Reference& xNode ) override; /// call getDefaultBindingExpressionForNode with default evaluation context - virtual OUString SAL_CALL getDefaultBindingExpressionForNode( const XNode_t& xNode ) override; + virtual OUString SAL_CALL getDefaultBindingExpressionForNode( const css::uno::Reference& xNode ) override; /// determine a reasonable default binding expression for a given node /// and a given evaluation context @@ -275,20 +275,20 @@ public: const XNode_t&, const EvaluationContext& ); - virtual OUString SAL_CALL getNodeDisplayName( const XNode_t&, + virtual OUString SAL_CALL getNodeDisplayName( const css::uno::Reference&, sal_Bool bDetail ) override; - virtual OUString SAL_CALL getNodeName( const XNode_t& ) override; + virtual OUString SAL_CALL getNodeName( const css::uno::Reference& ) override; - virtual OUString SAL_CALL getBindingName( const XPropertySet_t&, + virtual OUString SAL_CALL getBindingName( const css::uno::Reference< ::css::beans::XPropertySet >&, sal_Bool bDetail ) override; - virtual OUString SAL_CALL getSubmissionName( const XPropertySet_t&, + virtual OUString SAL_CALL getSubmissionName( const css::uno::Reference< ::css::beans::XPropertySet >&, sal_Bool bDetail ) override; - virtual XPropertySet_t SAL_CALL cloneBindingAsGhost( const XPropertySet_t& ) override; + virtual css::uno::Reference< ::css::beans::XPropertySet > SAL_CALL cloneBindingAsGhost( const css::uno::Reference< ::css::beans::XPropertySet >& ) override; - virtual void SAL_CALL removeBindingIfUseless( const XPropertySet_t& ) override; + virtual void SAL_CALL removeBindingIfUseless( const css::uno::Reference< ::css::beans::XPropertySet >& ) override; virtual css::uno::Reference SAL_CALL newInstance( const OUString& sName, const OUString& sURL, @@ -312,22 +312,26 @@ public: const OUString& sName ) override; - virtual XNode_t SAL_CALL createElement( const XNode_t& xParent, + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL createElement( + const css::uno::Reference< ::css::xml::dom::XNode >& xParent, const OUString& sName ) override; - virtual XNode_t SAL_CALL createAttribute( const XNode_t& xParent, + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL createAttribute( + const css::uno::Reference< ::css::xml::dom::XNode >& xParent, const OUString& sName ) override; - virtual XNode_t SAL_CALL renameNode( const XNode_t& xNode, + virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL renameNode( + const css::uno::Reference< ::css::xml::dom::XNode >& xNode, const OUString& sName ) override; - virtual XPropertySet_t SAL_CALL getBindingForNode( const XNode_t&, - sal_Bool bCreate ) override; + virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getBindingForNode( const + css::uno::Reference&, + sal_Bool bCreate ) override; - virtual void SAL_CALL removeBindingForNode( const XNode_t& ) override; + virtual void SAL_CALL removeBindingForNode( const css::uno::Reference< ::css::xml::dom::XNode >& ) override; virtual OUString SAL_CALL getResultForExpression( - const XPropertySet_t& xBinding, + const css::uno::Reference< css::beans::XPropertySet >& xBinding, sal_Bool bIsBindingExpression, const OUString& sExpression ) override; @@ -336,7 +340,7 @@ public: virtual sal_Bool SAL_CALL isValidPrefixName( const OUString& sName ) override; virtual void SAL_CALL setNodeValue( - const XNode_t& xNode, + const css::uno::Reference< ::css::xml::dom::XNode >& xNode, const OUString& sValue ) override; diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx index 93bd72f06951..521f710fbc50 100644 --- a/forms/source/xforms/model_ui.cxx +++ b/forms/source/xforms/model_ui.cxx @@ -67,7 +67,7 @@ using namespace com::sun::star::xml::xpath; // implement XFormsUIHelper1 -OUString Model::getDefaultServiceNameForNode( const XNode_t& xNode ) +OUString Model::getDefaultServiceNameForNode( const css::uno::Reference& xNode ) { // determine service for control. string/text field is default. OUString sService = "com.sun.star.form.component.TextField"; @@ -248,7 +248,7 @@ OUString Model::getDefaultBindingExpressionForNode( } -OUString Model::getDefaultBindingExpressionForNode( const XNode_t& xNode ) +OUString Model::getDefaultBindingExpressionForNode( const css::uno::Reference& xNode ) { return getDefaultBindingExpressionForNode( xNode, getEvaluationContext() ); } @@ -270,7 +270,7 @@ static bool lcl_isWhitespace( const OUString& rString ) return bWhitespace; } -OUString Model::getNodeDisplayName( const XNode_t& xNode, +OUString Model::getNodeDisplayName( const css::uno::Reference& xNode, sal_Bool bDetail ) { OUStringBuffer aBuffer; @@ -312,7 +312,7 @@ OUString Model::getNodeDisplayName( const XNode_t& xNode, return aBuffer.makeStringAndClear(); } -OUString Model::getNodeName( const XNode_t& xNode ) +OUString Model::getNodeName( const css::uno::Reference& xNode ) { OUStringBuffer aBuffer; @@ -334,7 +334,7 @@ OUString Model::getNodeName( const XNode_t& xNode ) return aBuffer.makeStringAndClear(); } -OUString Model::getBindingName( const XPropertySet_t& xBinding, +OUString Model::getBindingName( const css::uno::Reference< ::css::beans::XPropertySet >& xBinding, sal_Bool /*bDetail*/ ) { OUString sID; @@ -353,7 +353,7 @@ OUString Model::getBindingName( const XPropertySet_t& xBinding, return sRet; } -OUString Model::getSubmissionName( const XPropertySet_t& xSubmission, +OUString Model::getSubmissionName( const css::uno::Reference< ::css::beans::XPropertySet >& xSubmission, sal_Bool /*bDetail*/ ) { OUString sID; @@ -361,7 +361,7 @@ OUString Model::getSubmissionName( const XPropertySet_t& xSubmission, return sID; } -Model::XPropertySet_t Model::cloneBindingAsGhost( const XPropertySet_t &xBinding ) +css::uno::Reference< ::css::beans::XPropertySet > Model::cloneBindingAsGhost( const css::uno::Reference< ::css::beans::XPropertySet > &xBinding ) { // Create a new binding instance first... Binding *pBinding = new Binding(); @@ -377,7 +377,7 @@ Model::XPropertySet_t Model::cloneBindingAsGhost( const XPropertySet_t &xBinding return xNewBinding; } -void Model::removeBindingIfUseless( const XPropertySet_t& xBinding ) +void Model::removeBindingIfUseless( const css::uno::Reference< ::css::beans::XPropertySet >& xBinding ) { Binding* pBinding = Binding::getBinding( xBinding ); if( pBinding != nullptr ) @@ -542,7 +542,7 @@ void Model::removeModel( const Reference& xCmp, } } -Model::XNode_t Model::createElement( const XNode_t& xParent, +css::uno::Reference Model::createElement( const css::uno::Reference& xParent, const OUString& sName ) { Reference xNode; @@ -556,7 +556,7 @@ Model::XNode_t Model::createElement( const XNode_t& xParent, return xNode; } -Model::XNode_t Model::createAttribute( const XNode_t& xParent, +css::uno::Reference Model::createAttribute( const css::uno::Reference& xParent, const OUString& sName ) { Reference xNode; @@ -581,7 +581,7 @@ Model::XNode_t Model::createAttribute( const XNode_t& xParent, return xNode; } -Model::XNode_t Model::renameNode( const XNode_t& xNode, +css::uno::Reference Model::renameNode( const css::uno::Reference& xNode, const OUString& sName ) { // early out if we don't have to change the name @@ -664,7 +664,7 @@ Model::XNode_t Model::renameNode( const XNode_t& xNode, return xNew.is() ? xNew : xNode; } -Model::XPropertySet_t Model::getBindingForNode( const XNode_t& xNode, +css::uno::Reference< ::css::beans::XPropertySet > Model::getBindingForNode( const css::uno::Reference& xNode, sal_Bool bCreate ) { OSL_ENSURE( xNode.is(), "no node?" ); @@ -720,7 +720,7 @@ Model::XPropertySet_t Model::getBindingForNode( const XNode_t& xNode, return pBestBinding; } -void Model::removeBindingForNode( const XNode_t& ) +void Model::removeBindingForNode( const css::uno::Reference& ) { // determine whether suitable binding is still used } @@ -857,7 +857,7 @@ static OUString lcl_serializeForDisplay( const Reference& xResult } OUString Model::getResultForExpression( - const XPropertySet_t& xBinding, + const css::uno::Reference< ::css::beans::XPropertySet >& xBinding, sal_Bool bIsBindingExpression, const OUString& sExpression ) { @@ -901,7 +901,7 @@ sal_Bool Model::isValidPrefixName( const OUString& sName ) } void Model::setNodeValue( - const XNode_t& xNode, + const css::uno::Reference< ::css::xml::dom::XNode >& xNode, const OUString& sValue ) { setSimpleContent( xNode, sValue ); 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 #include #include +#include #include #include @@ -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,13 +216,9 @@ 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/drawinglayer/primitive2d/baseprimitive2d.hxx b/include/drawinglayer/primitive2d/baseprimitive2d.hxx index 8e75a0a0fc57..c06065117b75 100644 --- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx @@ -211,7 +211,7 @@ namespace drawinglayer /** The getDecomposition implementation for UNO API will use getDecomposition from this implementation. It will construct a ViewInformation2D from the ViewParameters for that purpose */ - virtual Primitive2DSequence SAL_CALL getDecomposition( const css::uno::Sequence< css::beans::PropertyValue >& rViewParameters ) override; + virtual css::uno::Sequence< ::css::uno::Reference< ::css::graphic::XPrimitive2D > > SAL_CALL getDecomposition( const css::uno::Sequence< css::beans::PropertyValue >& rViewParameters ) override; /** The getRange implementation for UNO API will use getRange from this implementation. It will construct a ViewInformation2D from the ViewParameters for that purpose diff --git a/include/drawinglayer/primitive3d/baseprimitive3d.hxx b/include/drawinglayer/primitive3d/baseprimitive3d.hxx index e447004277a8..dc419df482cb 100644 --- a/include/drawinglayer/primitive3d/baseprimitive3d.hxx +++ b/include/drawinglayer/primitive3d/baseprimitive3d.hxx @@ -133,7 +133,7 @@ namespace drawinglayer /** The getDecomposition implementation for UNO API will use getDecomposition from this implementation. It will get the ViewInformation from the ViewParameters for that purpose */ - virtual Primitive3DSequence SAL_CALL getDecomposition( const css::uno::Sequence< css::beans::PropertyValue >& rViewParameters ) override; + virtual css::uno::Sequence< ::css::uno::Reference< ::css::graphic::XPrimitive3D > > SAL_CALL getDecomposition( const css::uno::Sequence< css::beans::PropertyValue >& rViewParameters ) override; /** the getRange default implementation will use getDecomposition to create the range information from merging getRange results from the single local decomposition primitives. 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 #include #include #include @@ -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 #include #include +#include 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/cairo.hxx b/include/vcl/cairo.hxx index 7ca45efba74f..87d820ab81ff 100644 --- a/include/vcl/cairo.hxx +++ b/include/vcl/cairo.hxx @@ -33,6 +33,8 @@ namespace cairo { typedef std::shared_ptr CairoSurfaceSharedPtr; typedef std::shared_ptr CairoSharedPtr; + struct Surface; + typedef std::shared_ptr SurfaceSharedPtr; /** Cairo surface interface @@ -47,7 +49,7 @@ namespace cairo { // Query methods virtual CairoSharedPtr getCairo() const = 0; virtual CairoSurfaceSharedPtr getCairoSurface() const = 0; - virtual std::shared_ptr getSimilar(int cairo_content_type, int width, int height) const = 0; + virtual SurfaceSharedPtr getSimilar(int cairo_content_type, int width, int height) const = 0; /// factory for VirDev on this surface virtual VclPtr createVirtualDevice() const = 0; @@ -60,7 +62,6 @@ namespace cairo { virtual void flush() const = 0; }; - typedef std::shared_ptr SurfaceSharedPtr; } #endif 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/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx index ebd9f179b90f..92107c94c136 100644 --- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx @@ -265,7 +265,7 @@ bool LoadDictionary(HDInfo& rDict) Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWord, const css::lang::Locale& aLocale, sal_Int16 nMaxLeading, - const css::beans::PropertyValues& aProperties ) + const css::uno::Sequence< css::beans::PropertyValue >& aProperties ) { PropertyHelper_Hyphenation& rHelper = GetPropHelper(); rHelper.SetTmpPropVals(aProperties); @@ -491,7 +491,7 @@ Reference < XHyphenatedWord > SAL_CALL Hyphenator::queryAlternativeSpelling( const OUString& aWord, const css::lang::Locale& aLocale, sal_Int16 nIndex, - const css::beans::PropertyValues& aProperties ) + const css::uno::Sequence< css::beans::PropertyValue >& aProperties ) { // Firstly we allow only one plus character before the hyphen to avoid to miss the right break point: for (int extrachar = 1; extrachar <= 2; extrachar++) @@ -505,7 +505,7 @@ Reference < XHyphenatedWord > SAL_CALL Hyphenator::queryAlternativeSpelling( Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const OUString& aWord, const css::lang::Locale& aLocale, - const css::beans::PropertyValues& aProperties ) + const css::uno::Sequence< css::beans::PropertyValue >& aProperties ) { PropertyHelper_Hyphenation& rHelper = GetPropHelper(); rHelper.SetTmpPropVals(aProperties); diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.hxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.hxx index a5257dd84380..46cf4f4f84c6 100644 --- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.hxx +++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.hxx @@ -90,9 +90,9 @@ public: virtual sal_Bool SAL_CALL hasLocale( const Locale& rLocale ) override; // XHyphenator - virtual css::uno::Reference< css::linguistic2::XHyphenatedWord > SAL_CALL hyphenate( const OUString& aWord, const css::lang::Locale& aLocale, sal_Int16 nMaxLeading, const css::beans::PropertyValues& aProperties ) override; - virtual css::uno::Reference< css::linguistic2::XHyphenatedWord > SAL_CALL queryAlternativeSpelling( const OUString& aWord, const css::lang::Locale& aLocale, sal_Int16 nIndex, const css::beans::PropertyValues& aProperties ) override; - virtual css::uno::Reference< css::linguistic2::XPossibleHyphens > SAL_CALL createPossibleHyphens( const OUString& aWord, const css::lang::Locale& aLocale, const css::beans::PropertyValues& aProperties ) override; + virtual css::uno::Reference< css::linguistic2::XHyphenatedWord > SAL_CALL hyphenate( const OUString& aWord, const css::lang::Locale& aLocale, sal_Int16 nMaxLeading, const css::uno::Sequence< css::beans::PropertyValue >& aProperties ) override; + virtual css::uno::Reference< css::linguistic2::XHyphenatedWord > SAL_CALL queryAlternativeSpelling( const OUString& aWord, const css::lang::Locale& aLocale, sal_Int16 nIndex, const css::uno::Sequence< css::beans::PropertyValue >& aProperties ) override; + virtual css::uno::Reference< css::linguistic2::XPossibleHyphens > SAL_CALL createPossibleHyphens( const OUString& aWord, const css::lang::Locale& aLocale, const css::uno::Sequence< css::beans::PropertyValue >& aProperties ) override; // XLinguServiceEventBroadcaster virtual sal_Bool SAL_CALL addLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) override; diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 1f6c46a27a69..3462899714a2 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -380,7 +380,7 @@ sal_Int16 SpellChecker::GetSpellFailure(const OUString &rWord, const Locale &rLo } sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rLocale, - const PropertyValues& rProperties ) + const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) { MutexGuard aGuard( GetLinguMutex() ); @@ -505,7 +505,7 @@ Reference< XSpellAlternatives > Reference< XSpellAlternatives > SAL_CALL SpellChecker::spell( const OUString& rWord, const Locale& rLocale, - const PropertyValues& rProperties ) + const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) { MutexGuard aGuard( GetLinguMutex() ); diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.hxx b/lingucomponent/source/spellcheck/spell/sspellimp.hxx index 82ddbedf0af3..a500f1527897 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.hxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.hxx @@ -93,8 +93,8 @@ public: virtual sal_Bool SAL_CALL hasLocale( const Locale& rLocale ) override; // XSpellChecker - virtual sal_Bool SAL_CALL isValid( const OUString& rWord, const Locale& rLocale, const PropertyValues& rProperties ) override; - virtual Reference< XSpellAlternatives > SAL_CALL spell( const OUString& rWord, const Locale& rLocale, const PropertyValues& rProperties ) override; + virtual sal_Bool SAL_CALL isValid( const OUString& rWord, const Locale& rLocale, const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) override; + virtual Reference< XSpellAlternatives > SAL_CALL spell( const OUString& rWord, const Locale& rLocale, const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) override; // XLinguServiceEventBroadcaster virtual sal_Bool SAL_CALL addLinguServiceEventListener( const Reference< XLinguServiceEventListener >& rxLstnr ) override; diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index 1fae95a2a4db..88709304521d 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -237,7 +237,7 @@ sal_Bool SAL_CALL Thesaurus::hasLocale(const Locale& rLocale) Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryMeanings( const OUString& qTerm, const Locale& rLocale, - const PropertyValues& rProperties) + const css::uno::Sequence< css::beans::PropertyValue >& rProperties) { MutexGuard aGuard( GetLinguMutex() ); diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx index 34ad5ca092c9..394aefada281 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.hxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.hxx @@ -101,7 +101,7 @@ public: virtual sal_Bool SAL_CALL hasLocale( const Locale& rLocale ) override; // XThesaurus - virtual Sequence< Reference < css::linguistic2::XMeaning > > SAL_CALL queryMeanings( const OUString& rTerm, const Locale& rLocale, const PropertyValues& rProperties ) override; + virtual Sequence< Reference < css::linguistic2::XMeaning > > SAL_CALL queryMeanings( const OUString& rTerm, const Locale& rLocale, const css::uno::Sequence< css::beans::PropertyValue >& rProperties ) override; // XServiceDisplayName virtual OUString SAL_CALL getServiceDisplayName( const Locale& rLocale ) override; diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx index 22643b3b9c04..b15ec9c15807 100644 --- a/linguistic/source/hyphdsp.cxx +++ b/linguistic/source/hyphdsp.cxx @@ -272,7 +272,7 @@ sal_Bool SAL_CALL HyphenatorDispatcher::hasLocale(const Locale& rLocale) Reference< XHyphenatedWord > SAL_CALL HyphenatorDispatcher::hyphenate( const OUString& rWord, const Locale& rLocale, sal_Int16 nMaxLeading, - const PropertyValues& rProperties ) + const css::uno::Sequence< ::css::beans::PropertyValue >& rProperties ) { MutexGuard aGuard( GetLinguMutex() ); @@ -408,7 +408,7 @@ Reference< XHyphenatedWord > SAL_CALL Reference< XHyphenatedWord > SAL_CALL HyphenatorDispatcher::queryAlternativeSpelling( const OUString& rWord, const Locale& rLocale, sal_Int16 nIndex, - const PropertyValues& rProperties ) + const css::uno::Sequence< ::css::beans::PropertyValue >& rProperties ) { MutexGuard aGuard( GetLinguMutex() ); @@ -539,7 +539,7 @@ Reference< XHyphenatedWord > SAL_CALL Reference< XPossibleHyphens > SAL_CALL HyphenatorDispatcher::createPossibleHyphens( const OUString& rWord, const Locale& rLocale, - const PropertyValues& rProperties ) + const css::uno::Sequence< ::css::beans::PropertyValue >& rProperties ) { MutexGuard aGuard( GetLinguMutex() ); diff --git a/linguistic/source/hyphdsp.hxx b/linguistic/source/hyphdsp.hxx index ec8ec580570b..4825f745d8f4 100644 --- a/linguistic/source/hyphdsp.hxx +++ b/linguistic/source/hyphdsp.hxx @@ -91,18 +91,18 @@ public: hyphenate( const OUString& aWord, const css::lang::Locale& aLocale, sal_Int16 nMaxLeading, - const css::beans::PropertyValues& aProperties ) override; + const css::uno::Sequence< ::css::beans::PropertyValue >& aProperties ) override; virtual css::uno::Reference< css::linguistic2::XHyphenatedWord > SAL_CALL queryAlternativeSpelling( const OUString& aWord, const css::lang::Locale& aLocale, sal_Int16 nIndex, - const css::beans::PropertyValues& aProperties ) override; + const css::uno::Sequence< ::css::beans::PropertyValue >& aProperties ) override; virtual css::uno::Reference< css::linguistic2::XPossibleHyphens > SAL_CALL createPossibleHyphens( const OUString& aWord, const css::lang::Locale& aLocale, - const css::beans::PropertyValues& aProperties ) override; + const css::uno::Sequence< ::css::beans::PropertyValue >& aProperties ) override; // LinguDispatcher virtual void diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx index e557207ffdcc..3103d1c7ef1c 100644 --- a/linguistic/source/spelldsp.cxx +++ b/linguistic/source/spelldsp.cxx @@ -212,7 +212,7 @@ sal_Bool SAL_CALL SpellCheckerDispatcher::hasLocale( const Locale& rLocale ) sal_Bool SAL_CALL SpellCheckerDispatcher::isValid( const OUString& rWord, const Locale& rLocale, - const PropertyValues& rProperties ) + const css::uno::Sequence< ::css::beans::PropertyValue >& rProperties ) { MutexGuard aGuard( GetLinguMutex() ); return isValid_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties ); @@ -221,7 +221,7 @@ sal_Bool SAL_CALL Reference< XSpellAlternatives > SAL_CALL SpellCheckerDispatcher::spell( const OUString& rWord, const Locale& rLocale, - const PropertyValues& rProperties ) + const css::uno::Sequence< ::css::beans::PropertyValue >& rProperties ) { MutexGuard aGuard( GetLinguMutex() ); return spell_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties ); diff --git a/linguistic/source/spelldsp.hxx b/linguistic/source/spelldsp.hxx index 8e65841d2d9b..4c4dd7fd9c19 100644 --- a/linguistic/source/spelldsp.hxx +++ b/linguistic/source/spelldsp.hxx @@ -92,8 +92,8 @@ public: virtual sal_Bool SAL_CALL hasLocale( const css::lang::Locale& aLocale ) override; // XSpellChecker - virtual sal_Bool SAL_CALL isValid( const OUString& aWord, const css::lang::Locale& aLocale, const css::beans::PropertyValues& aProperties ) override; - virtual css::uno::Reference< css::linguistic2::XSpellAlternatives > SAL_CALL spell( const OUString& aWord, const css::lang::Locale& aLocale, const css::beans::PropertyValues& aProperties ) override; + virtual sal_Bool SAL_CALL isValid( const OUString& aWord, const css::lang::Locale& aLocale, const css::uno::Sequence< ::css::beans::PropertyValue >& aProperties ) override; + virtual css::uno::Reference< css::linguistic2::XSpellAlternatives > SAL_CALL spell( const OUString& aWord, const css::lang::Locale& aLocale, const css::uno::Sequence< ::css::beans::PropertyValue >& aProperties ) override; // XSupportedLanguages virtual css::uno::Sequence< ::sal_Int16 > SAL_CALL getLanguages( ) override; diff --git a/linguistic/source/thesdsp.cxx b/linguistic/source/thesdsp.cxx index 2ca199e567db..3fdfe5c73da1 100644 --- a/linguistic/source/thesdsp.cxx +++ b/linguistic/source/thesdsp.cxx @@ -106,7 +106,7 @@ sal_Bool SAL_CALL Sequence< Reference< XMeaning > > SAL_CALL ThesaurusDispatcher::queryMeanings( const OUString& rTerm, const Locale& rLocale, - const PropertyValues& rProperties ) + const css::uno::Sequence< ::css::beans::PropertyValue >& rProperties ) { MutexGuard aGuard( GetLinguMutex() ); diff --git a/linguistic/source/thesdsp.hxx b/linguistic/source/thesdsp.hxx index cf00a7897f3f..4481099e3a59 100644 --- a/linguistic/source/thesdsp.hxx +++ b/linguistic/source/thesdsp.hxx @@ -73,7 +73,7 @@ public: virtual css::uno::Sequence< css::uno::Reference< css::linguistic2::XMeaning > > SAL_CALL queryMeanings( const OUString& aTerm, const css::lang::Locale& aLocale, - const css::beans::PropertyValues& aProperties ) override; + const css::uno::Sequence< ::css::beans::PropertyValue >& aProperties ) override; // LinguDispatcher virtual void 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 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 , 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/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx index a4c080663cc8..f6849e8abf5d 100644 --- a/sax/source/tools/fastserializer.cxx +++ b/sax/source/tools/fastserializer.cxx @@ -669,7 +669,7 @@ namespace sax_fastparser { merge( maData, rWhat, false ); } - void FastSaxSerializer::ForMerge::append( const Int8Sequence &rWhat ) + void FastSaxSerializer::ForMerge::append( const css::uno::Sequence &rWhat ) { merge( maData, rWhat, true ); } @@ -722,7 +722,7 @@ namespace sax_fastparser { append( rWhat ); } - void FastSaxSerializer::ForSort::append( const Int8Sequence &rWhat ) + void FastSaxSerializer::ForSort::append( const css::uno::Sequence &rWhat ) { merge( maData[mnCurrentElement], rWhat, true ); } diff --git a/sax/source/tools/fastserializer.hxx b/sax/source/tools/fastserializer.hxx index f450580ff3e5..b00ccf0923df 100644 --- a/sax/source/tools/fastserializer.hxx +++ b/sax/source/tools/fastserializer.hxx @@ -185,7 +185,7 @@ private: #endif virtual void prepend( const Int8Sequence &rWhat ); - virtual void append( const Int8Sequence &rWhat ) override; + virtual void append( const css::uno::Sequence &rWhat ) override; void postpone( const Int8Sequence &rWhat ); protected: @@ -216,7 +216,7 @@ private: #endif virtual void prepend( const Int8Sequence &rWhat ) override; - virtual void append( const Int8Sequence &rWhat ) override; + virtual void append( const css::uno::Sequence &rWhat ) override; private: void sort(); }; 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 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 > 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/condformatuno.hxx b/sc/source/ui/inc/condformatuno.hxx index bf0319b5f530..0c7fc699ab00 100644 --- a/sc/source/ui/inc/condformatuno.hxx +++ b/sc/source/ui/inc/condformatuno.hxx @@ -203,9 +203,9 @@ public: virtual ~ScColorScaleEntryObj() override; - virtual css::util::Color SAL_CALL getColor() override; + virtual sal_Int32 SAL_CALL getColor() override; - virtual void SAL_CALL setColor(css::util::Color aColor) override; + virtual void SAL_CALL setColor(sal_Int32 aColor) override; virtual sal_Int32 SAL_CALL getType() 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/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx index 4685fd0387c4..69dd2b708453 100644 --- a/sc/source/ui/unoobj/condformatuno.cxx +++ b/sc/source/ui/unoobj/condformatuno.cxx @@ -1011,13 +1011,13 @@ ScColorScaleEntry* ScColorScaleEntryObj::getCoreObject() return pFormat->GetEntry(mnPos); } -util::Color ScColorScaleEntryObj::getColor() +sal_Int32 ScColorScaleEntryObj::getColor() { Color aColor = getCoreObject()->GetColor(); return sal_Int32(aColor); } -void ScColorScaleEntryObj::setColor(util::Color aColor) +void ScColorScaleEntryObj::setColor(sal_Int32 aColor) { getCoreObject()->SetColor(Color(aColor)); } 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/MasterPageContainer.cxx b/sd/source/ui/sidebar/MasterPageContainer.cxx index f96cb090ad25..dfc923a01c6b 100644 --- a/sd/source/ui/sidebar/MasterPageContainer.cxx +++ b/sd/source/ui/sidebar/MasterPageContainer.cxx @@ -247,7 +247,7 @@ Size const & MasterPageContainer::GetPreviewSizePixel() const } MasterPageContainer::Token MasterPageContainer::PutMasterPage ( - const SharedMasterPageDescriptor& rDescriptor) + const std::shared_ptr& rDescriptor) { return mpImpl->PutMasterPage(rDescriptor); } @@ -448,7 +448,7 @@ sal_Int32 MasterPageContainer::GetTemplateIndexForToken (Token aToken) return -1; } -SharedMasterPageDescriptor MasterPageContainer::GetDescriptorForToken ( +std::shared_ptr MasterPageContainer::GetDescriptorForToken ( MasterPageContainer::Token aToken) { const ::osl::MutexGuard aGuard (mpImpl->maMutex); diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx index 1bf528861cc8..18c55417fdf7 100644 --- a/sd/source/ui/sidebar/MasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx @@ -392,7 +392,7 @@ void MasterPagesSelector::AssignMasterPageToSelectedSlides ( void MasterPagesSelector::AssignMasterPageToPageList ( SdPage* pMasterPage, - const ::sd::slidesorter::SharedPageSelection& rPageList) + const std::shared_ptr>& rPageList) { DocumentHelper::AssignMasterPageToPageList(mrDocument, pMasterPage, rPageList); } 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>& rPageList); virtual void NotifyContainerChangeEvent (const MasterPageContainerChangeEvent& rEvent); diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx index 6fb776e2e6f3..f9f3b27c9337 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx @@ -299,7 +299,7 @@ void SAL_CALL SlideSorterService::setIsSmoothScrolling (sal_Bool bValue) mpSlideSorter->GetProperties()->SetSmoothSelectionScrolling(bValue); } -util::Color SAL_CALL SlideSorterService::getBackgroundColor() +sal_Int32 SAL_CALL SlideSorterService::getBackgroundColor() { ThrowIfDisposed(); if (mpSlideSorter == nullptr || !mpSlideSorter->IsValid()) @@ -309,14 +309,14 @@ util::Color SAL_CALL SlideSorterService::getBackgroundColor() mpSlideSorter->GetProperties()->GetBackgroundColor()); } -void SAL_CALL SlideSorterService::setBackgroundColor (util::Color aBackgroundColor) +void SAL_CALL SlideSorterService::setBackgroundColor (sal_Int32 aBackgroundColor) { ThrowIfDisposed(); if (mpSlideSorter != nullptr && mpSlideSorter->IsValid()) mpSlideSorter->GetProperties()->SetBackgroundColor(Color(aBackgroundColor)); } -util::Color SAL_CALL SlideSorterService::getTextColor() +sal_Int32 SAL_CALL SlideSorterService::getTextColor() { ThrowIfDisposed(); if (mpSlideSorter == nullptr || !mpSlideSorter->IsValid()) @@ -326,14 +326,14 @@ util::Color SAL_CALL SlideSorterService::getTextColor() mpSlideSorter->GetProperties()->GetTextColor()); } -void SAL_CALL SlideSorterService::setTextColor (util::Color aTextColor) +void SAL_CALL SlideSorterService::setTextColor (sal_Int32 aTextColor) { ThrowIfDisposed(); if (mpSlideSorter != nullptr && mpSlideSorter->IsValid()) mpSlideSorter->GetProperties()->SetTextColor(Color(aTextColor)); } -util::Color SAL_CALL SlideSorterService::getSelectionColor() +sal_Int32 SAL_CALL SlideSorterService::getSelectionColor() { ThrowIfDisposed(); if (mpSlideSorter == nullptr || !mpSlideSorter->IsValid()) @@ -343,14 +343,14 @@ util::Color SAL_CALL SlideSorterService::getSelectionColor() mpSlideSorter->GetProperties()->GetSelectionColor()); } -void SAL_CALL SlideSorterService::setSelectionColor (util::Color aSelectionColor) +void SAL_CALL SlideSorterService::setSelectionColor (sal_Int32 aSelectionColor) { ThrowIfDisposed(); if (mpSlideSorter != nullptr && mpSlideSorter->IsValid()) mpSlideSorter->GetProperties()->SetSelectionColor(Color(aSelectionColor)); } -util::Color SAL_CALL SlideSorterService::getHighlightColor() +sal_Int32 SAL_CALL SlideSorterService::getHighlightColor() { ThrowIfDisposed(); if (mpSlideSorter == nullptr || !mpSlideSorter->IsValid()) @@ -360,7 +360,7 @@ util::Color SAL_CALL SlideSorterService::getHighlightColor() mpSlideSorter->GetProperties()->GetHighlightColor()); } -void SAL_CALL SlideSorterService::setHighlightColor (util::Color aHighlightColor) +void SAL_CALL SlideSorterService::setHighlightColor (sal_Int32 aHighlightColor) { ThrowIfDisposed(); if (mpSlideSorter != nullptr && mpSlideSorter->IsValid()) diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.hxx b/sd/source/ui/slidesorter/shell/SlideSorterService.hxx index f1a21818d3b4..2a39548b05e7 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterService.hxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterService.hxx @@ -114,21 +114,21 @@ public: virtual void SAL_CALL setIsSmoothScrolling (sal_Bool bIsOrientationVertical) override; - virtual css::util::Color SAL_CALL getBackgroundColor() override; + virtual sal_Int32 SAL_CALL getBackgroundColor() override; - virtual void SAL_CALL setBackgroundColor (css::util::Color aBackgroundColor) override; + virtual void SAL_CALL setBackgroundColor (sal_Int32 aBackgroundColor) override; - virtual css::util::Color SAL_CALL getTextColor() override; + virtual sal_Int32 SAL_CALL getTextColor() override; - virtual void SAL_CALL setTextColor (css::util::Color aTextColor) override; + virtual void SAL_CALL setTextColor (sal_Int32 aTextColor) override; - virtual css::util::Color SAL_CALL getSelectionColor() override; + virtual sal_Int32 SAL_CALL getSelectionColor() override; - virtual void SAL_CALL setSelectionColor (css::util::Color aSelectionColor) override; + virtual void SAL_CALL setSelectionColor (sal_Int32 aSelectionColor) override; - virtual css::util::Color SAL_CALL getHighlightColor() override; + virtual sal_Int32 SAL_CALL getHighlightColor() override; - virtual void SAL_CALL setHighlightColor (css::util::Color aHighlightColor) override; + virtual void SAL_CALL setHighlightColor (sal_Int32 aHighlightColor) override; virtual sal_Bool SAL_CALL getIsUIReadOnly() override; diff --git a/sdext/source/presenter/PresenterBitmapContainer.cxx b/sdext/source/presenter/PresenterBitmapContainer.cxx index fcd0613c3f22..148bf24131ea 100644 --- a/sdext/source/presenter/PresenterBitmapContainer.cxx +++ b/sdext/source/presenter/PresenterBitmapContainer.cxx @@ -100,7 +100,7 @@ PresenterBitmapContainer::~PresenterBitmapContainer() maIconContainer.clear(); } -SharedBitmapDescriptor PresenterBitmapContainer::GetBitmap ( +std::shared_ptr PresenterBitmapContainer::GetBitmap ( const OUString& rsName) const { BitmapContainer::const_iterator iSet (maIconContainer.find(rsName)); @@ -140,12 +140,12 @@ void PresenterBitmapContainer::LoadBitmaps ( } } -SharedBitmapDescriptor PresenterBitmapContainer::LoadBitmap ( +std::shared_ptr PresenterBitmapContainer::LoadBitmap ( const css::uno::Reference& rxNode, const OUString& rsPath, const css::uno::Reference& rxPresenterHelper, const css::uno::Reference& rxCanvas, - const SharedBitmapDescriptor& rpDefault) + const std::shared_ptr& rpDefault) { SharedBitmapDescriptor pBitmap; @@ -187,11 +187,11 @@ void PresenterBitmapContainer::ProcessBitmap ( SharedBitmapDescriptor()); } -SharedBitmapDescriptor PresenterBitmapContainer::LoadBitmap ( +std::shared_ptr PresenterBitmapContainer::LoadBitmap ( const Reference& rxProperties, const css::uno::Reference& rxPresenterHelper, const css::uno::Reference& rxCanvas, - const SharedBitmapDescriptor& rpDefault) + const std::shared_ptr& rpDefault) { OSL_ASSERT(rxCanvas.is()); OSL_ASSERT(rxPresenterHelper.is()); diff --git a/sfx2/source/appl/appdispatchprovider.cxx b/sfx2/source/appl/appdispatchprovider.cxx index d13a9009ee0e..edab1b761f32 100644 --- a/sfx2/source/appl/appdispatchprovider.cxx +++ b/sfx2/source/appl/appdispatchprovider.cxx @@ -78,7 +78,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; @@ -121,7 +121,7 @@ css::uno::Sequence< OUString > SAL_CALL SfxAppDispatchProvider::getSupportedServ Reference < XDispatch > SAL_CALL SfxAppDispatchProvider::queryDispatch( const util::URL& aURL, const OUString& /*sTargetFrameName*/, - FrameSearchFlags /*eSearchFlags*/ ) + sal_Int32 /*eSearchFlags*/ ) { SolarMutexGuard guard; 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& 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/animationnodes/animationaudionode.hxx b/slideshow/source/engine/animationnodes/animationaudionode.hxx index 30de41cfb44e..d1c08601cf20 100644 --- a/slideshow/source/engine/animationnodes/animationaudionode.hxx +++ b/slideshow/source/engine/animationnodes/animationaudionode.hxx @@ -38,7 +38,7 @@ class AnimationAudioNode : public BaseNode, public AnimationEventHandler public: AnimationAudioNode( css::uno::Reference const& xNode, - ::std::shared_ptr const& pParent, + BaseContainerNodeSharedPtr const& pParent, NodeContext const& rContext ); protected: diff --git a/slideshow/source/engine/animationnodes/animationbasenode.hxx b/slideshow/source/engine/animationnodes/animationbasenode.hxx index d8bbb09d8527..55ec060ac4ad 100644 --- a/slideshow/source/engine/animationnodes/animationbasenode.hxx +++ b/slideshow/source/engine/animationnodes/animationbasenode.hxx @@ -40,7 +40,7 @@ class AnimationBaseNode : public BaseNode public: AnimationBaseNode( css::uno::Reference const& xNode, - ::std::shared_ptr const& pParent, + BaseContainerNodeSharedPtr const& pParent, NodeContext const& rContext ); #if defined(DBG_UTIL) diff --git a/slideshow/source/engine/shapes/backgroundshape.cxx b/slideshow/source/engine/shapes/backgroundshape.cxx index 12d7f8a61736..11c4ed1c1e0f 100644 --- a/slideshow/source/engine/shapes/backgroundshape.cxx +++ b/slideshow/source/engine/shapes/backgroundshape.cxx @@ -289,7 +289,7 @@ namespace slideshow } - ShapeSharedPtr createBackgroundShape( + ShapeSharedPtr createBackgroundShape( const uno::Reference< drawing::XDrawPage >& xDrawPage, const uno::Reference< drawing::XDrawPage >& xMasterPage, const SlideShowContext& rContext ) diff --git a/slideshow/source/engine/shapes/backgroundshape.hxx b/slideshow/source/engine/shapes/backgroundshape.hxx index cc7fa93477aa..c7ff134e0dc5 100644 --- a/slideshow/source/engine/shapes/backgroundshape.hxx +++ b/slideshow/source/engine/shapes/backgroundshape.hxx @@ -33,6 +33,7 @@ namespace slideshow { class Shape; struct SlideShowContext; + typedef ::std::shared_ptr< Shape > ShapeSharedPtr; /** Representation of a draw document's background shape. @@ -41,7 +42,7 @@ namespace slideshow nor attributable, those more specialized derivations of the Shape interface are not implemented here. */ - std::shared_ptr createBackgroundShape( + ShapeSharedPtr createBackgroundShape( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage, const css::uno::Reference< css::drawing::XDrawPage >& xMasterPage, const SlideShowContext& rContext ); // throw ShapeLoadFailedException; diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.hxx b/slideshow/source/engine/shapes/drawshapesubsetting.hxx index ff32a4a653cf..f9ea3f4d5981 100644 --- a/slideshow/source/engine/shapes/drawshapesubsetting.hxx +++ b/slideshow/source/engine/shapes/drawshapesubsetting.hxx @@ -25,6 +25,7 @@ class GDIMetaFile; +typedef ::std::shared_ptr< GDIMetaFile > GDIMetaFileSharedPtr; namespace slideshow { @@ -58,8 +59,8 @@ namespace slideshow Metafile to retrieve subset info from (must have been generated with verbose text comments switched on). */ - DrawShapeSubsetting( const DocTreeNode& rShapeSubset, - ::std::shared_ptr< GDIMetaFile > rMtf ); + DrawShapeSubsetting( const DocTreeNode& rShapeSubset, + GDIMetaFileSharedPtr rMtf ); /// Forbid copy construction DrawShapeSubsetting(const DrawShapeSubsetting&) = delete; diff --git a/slideshow/source/engine/shapes/mediashape.hxx b/slideshow/source/engine/shapes/mediashape.hxx index ce1ba8bfe3a4..01f7b1ccf607 100644 --- a/slideshow/source/engine/shapes/mediashape.hxx +++ b/slideshow/source/engine/shapes/mediashape.hxx @@ -35,8 +35,9 @@ namespace slideshow { struct SlideShowContext; class Shape; + typedef ::std::shared_ptr< Shape > ShapeSharedPtr; - std::shared_ptr createMediaShape( + ShapeSharedPtr createMediaShape( const css::uno::Reference& xShape, double nPrio, const SlideShowContext& rContext); diff --git a/slideshow/source/engine/slide/layer.hxx b/slideshow/source/engine/slide/layer.hxx index ae2add70a5bf..95a5f7d4402c 100644 --- a/slideshow/source/engine/slide/layer.hxx +++ b/slideshow/source/engine/slide/layer.hxx @@ -35,6 +35,10 @@ namespace slideshow namespace internal { class LayerEndUpdate; + class Layer; + typedef ::std::shared_ptr< Layer > LayerSharedPtr; + typedef ::std::weak_ptr< Layer > LayerWeakPtr; + /* Definition of Layer class */ @@ -71,7 +75,7 @@ namespace slideshow This method will create a layer without a ViewLayer, i.e. one that displays directly on the background. */ - static ::std::shared_ptr< Layer > createBackgroundLayer(); + static LayerSharedPtr createBackgroundLayer(); /** Create non-background layer @@ -79,7 +83,7 @@ namespace slideshow background, to contain shapes that should appear in front of animated objects. */ - static ::std::shared_ptr< Layer > createLayer(); + static LayerSharedPtr createLayer(); /** Predicate, whether this layer is the special @@ -255,9 +259,6 @@ namespace slideshow bool mbClipSet; // true, if beginUpdate set a clip }; - typedef ::std::shared_ptr< Layer > LayerSharedPtr; - typedef ::std::weak_ptr< Layer > LayerWeakPtr; - } } diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx index 84be4b5d6e2c..caca994dabe4 100644 --- a/slideshow/source/engine/slide/layermanager.cxx +++ b/slideshow/source/engine/slide/layermanager.cxx @@ -546,7 +546,7 @@ namespace slideshow { } - virtual bool isOnView(std::shared_ptr const& /*rView*/) const override + virtual bool isOnView(ViewSharedPtr const& /*rView*/) const override { return true; // visible on all views } diff --git a/slideshow/source/engine/slide/shapemanagerimpl.hxx b/slideshow/source/engine/slide/shapemanagerimpl.hxx index 6fb693c75818..e4634064bc0c 100644 --- a/slideshow/source/engine/slide/shapemanagerimpl.hxx +++ b/slideshow/source/engine/slide/shapemanagerimpl.hxx @@ -119,18 +119,18 @@ private: virtual void notifyShapeUpdate( const ShapeSharedPtr& rShape ) override; virtual ShapeSharedPtr lookupShape( css::uno::Reference< css::drawing::XShape > const & xShape ) const override; - virtual void addHyperlinkArea( const std::shared_ptr& rArea ) override; + virtual void addHyperlinkArea( const HyperlinkAreaSharedPtr& rArea ) override; // SubsettableShapeManager interface - virtual std::shared_ptr getSubsetShape( - const std::shared_ptr& rOrigShape, - const DocTreeNode& rTreeNode ) override; + virtual AttributableShapeSharedPtr getSubsetShape( + const AttributableShapeSharedPtr& rOrigShape, + const DocTreeNode& rTreeNode ) override; virtual void revokeSubset( - const std::shared_ptr& rOrigShape, - const std::shared_ptr& rSubsetShape ) override; + const AttributableShapeSharedPtr& rOrigShape, + const AttributableShapeSharedPtr& rSubsetShape ) override; virtual void addIntrinsicAnimationHandler( const IntrinsicAnimationEventHandlerSharedPtr& rHandler ) override; diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx index f81f8bd51482..8fb3549c613a 100644 --- a/slideshow/source/engine/slideview.cxx +++ b/slideshow/source/engine/slideview.cxx @@ -566,7 +566,7 @@ private: basegfx::B2IRange(0,0,rSpriteSize.getX(),rSpriteSize.getY())); } - virtual bool isOnView(std::shared_ptr const& rView) const override + virtual bool isOnView(ViewSharedPtr const& rView) const override { return rView.get() == mpParentView; } @@ -686,7 +686,7 @@ private: virtual void setCursorShape( sal_Int16 nPointerShape ) override; // ViewLayer interface - virtual bool isOnView(std::shared_ptr const& rView) const override; + virtual bool isOnView(ViewSharedPtr const& rView) const override; virtual void clear() const override; virtual void clearAll() const override; virtual cppcanvas::CanvasSharedPtr getCanvas() const override; @@ -906,7 +906,7 @@ void SlideView::setCursorShape( sal_Int16 nPointerShape ) mxView->setMouseCursor( nPointerShape ); } -bool SlideView::isOnView(std::shared_ptr const& rView) const +bool SlideView::isOnView(ViewSharedPtr const& rView) const { return rView.get() == this; } diff --git a/slideshow/source/engine/transitions/slidechangebase.cxx b/slideshow/source/engine/transitions/slidechangebase.cxx index a9a9db55a907..c75382d994ed 100644 --- a/slideshow/source/engine/transitions/slidechangebase.cxx +++ b/slideshow/source/engine/transitions/slidechangebase.cxx @@ -359,7 +359,7 @@ bool SlideChangeBase::operator()( double nValue ) void SlideChangeBase::prepareForRun( const ViewEntry& /* rViewEntry */, - const std::shared_ptr& /* rDestinationCanvas */ ) + const cppcanvas::CanvasSharedPtr& /* rDestinationCanvas */ ) { } diff --git a/slideshow/source/engine/transitions/slidechangebase.hxx b/slideshow/source/engine/transitions/slidechangebase.hxx index 9db000fc1106..a0b8958360d9 100644 --- a/slideshow/source/engine/transitions/slidechangebase.hxx +++ b/slideshow/source/engine/transitions/slidechangebase.hxx @@ -119,8 +119,8 @@ protected: ::basegfx::B2ISize getEnteringSlideSizePixel( const UnoViewSharedPtr& pView ) const; - static void renderBitmap( SlideBitmapSharedPtr const& pSlideBitmap, - std::shared_ptr const& pCanvas ); + static void renderBitmap( SlideBitmapSharedPtr const& pSlideBitmap, + cppcanvas::CanvasSharedPtr const& pCanvas ); /** Called on derived classes to perform actions before first run. @@ -146,10 +146,10 @@ protected: Current parameter value */ virtual void performIn( - const std::shared_ptr& rSprite, - const ViewEntry& rViewEntry, - const std::shared_ptr& rDestinationCanvas, - double t ); + const cppcanvas::CustomSpriteSharedPtr& rSprite, + const ViewEntry& rViewEntry, + const cppcanvas::CanvasSharedPtr& rDestinationCanvas, + double t ); /** Called on derived classes to implement actual slide change. @@ -163,16 +163,16 @@ protected: Current parameter value */ virtual void performOut( - const std::shared_ptr& rSprite, - const ViewEntry& rViewEntry, - const std::shared_ptr& rDestinationCanvas, - double t ); + const cppcanvas::CustomSpriteSharedPtr& rSprite, + const ViewEntry& rViewEntry, + const cppcanvas::CanvasSharedPtr& rDestinationCanvas, + double t ); ScreenUpdater& getScreenUpdater() const { return mrScreenUpdater; } private: - std::shared_ptr createSprite( + cppcanvas::CustomSpriteSharedPtr createSprite( UnoViewSharedPtr const & pView, ::basegfx::B2DSize const & rSpriteSize, double nPrio ) const; diff --git a/slideshow/source/inc/animationnode.hxx b/slideshow/source/inc/animationnode.hxx index f6a02dcf67ab..3eb5a7295668 100644 --- a/slideshow/source/inc/animationnode.hxx +++ b/slideshow/source/inc/animationnode.hxx @@ -24,9 +24,13 @@ #include #include + namespace slideshow { namespace internal { +class AnimationNode; +typedef ::std::shared_ptr< AnimationNode > AnimationNodeSharedPtr; + /** This interface is used to mirror every XAnimateNode object in the presentation core. */ @@ -123,14 +127,14 @@ public: @param rNotifee AnimationNode to notify */ virtual bool registerDeactivatingListener( - const ::std::shared_ptr< AnimationNode >& rNotifee ) = 0; + const AnimationNodeSharedPtr& rNotifee ) = 0; /** Called to notify another AnimationNode's deactivation @param rNotifier The instance who calls this method. */ virtual void notifyDeactivating( - const ::std::shared_ptr< AnimationNode >& rNotifier ) = 0; + const AnimationNodeSharedPtr& rNotifier ) = 0; /** Query node whether it has an animation pending. @@ -141,8 +145,6 @@ public: virtual bool hasPendingAnimation() const = 0; }; -typedef ::std::shared_ptr< AnimationNode > AnimationNodeSharedPtr; - } // namespace internal } // namespace presentation diff --git a/slideshow/source/inc/basecontainernode.hxx b/slideshow/source/inc/basecontainernode.hxx index a86f05f08186..8be89a27f01e 100644 --- a/slideshow/source/inc/basecontainernode.hxx +++ b/slideshow/source/inc/basecontainernode.hxx @@ -24,6 +24,10 @@ namespace slideshow { namespace internal { +class BaseContainerNode; +typedef ::std::shared_ptr< BaseContainerNode > BaseContainerNodeSharedPtr; + + /** This interface extends BaseNode with child handling methods. Used for XAnimationNode objects which have children */ @@ -32,7 +36,7 @@ class BaseContainerNode : public BaseNode public: BaseContainerNode( css::uno::Reference const& xNode, - ::std::shared_ptr const& pParent, + BaseContainerNodeSharedPtr const& pParent, NodeContext const& rContext ); /** Add given child node to this container @@ -90,8 +94,6 @@ private: const bool mbDurationIndefinite; }; -typedef ::std::shared_ptr< BaseContainerNode > BaseContainerNodeSharedPtr; - } // namespace interface } // namespace presentation diff --git a/slideshow/source/inc/basenode.hxx b/slideshow/source/inc/basenode.hxx index ff146a8b5a29..bbfc2f78a03c 100644 --- a/slideshow/source/inc/basenode.hxx +++ b/slideshow/source/inc/basenode.hxx @@ -68,6 +68,11 @@ struct NodeContext }; class BaseContainerNode; +typedef ::std::shared_ptr< BaseContainerNode > BaseContainerNodeSharedPtr; + +class BaseNode; +typedef ::std::shared_ptr< BaseNode > BaseNodeSharedPtr; + /** This interface extends AnimationNode with some file-private accessor methods. @@ -77,7 +82,7 @@ class BaseNode : public AnimationNode, { public: BaseNode( css::uno::Reference const& xNode, - ::std::shared_ptr const& pParent, + BaseContainerNodeSharedPtr const& pParent, NodeContext const& rContext ); BaseNode(const BaseNode&) = delete; BaseNode& operator=(const BaseNode&) = delete; @@ -89,7 +94,7 @@ public: retrieve a shared_ptr to itself internally, have to set that from the outside. */ - void setSelf( const ::std::shared_ptr< BaseNode >& rSelf ); + void setSelf( const BaseNodeSharedPtr& rSelf ); #if defined(DBG_UTIL) @@ -198,8 +203,6 @@ private: const bool mbIsMainSequenceRootNode; }; -typedef ::std::shared_ptr< BaseNode > BaseNodeSharedPtr; - } // namespace internal } // namespace slideshow diff --git a/slideshow/source/inc/eventmultiplexer.hxx b/slideshow/source/inc/eventmultiplexer.hxx index 209184bc274a..ebf3c6703f29 100644 --- a/slideshow/source/inc/eventmultiplexer.hxx +++ b/slideshow/source/inc/eventmultiplexer.hxx @@ -586,7 +586,7 @@ public: anybody. If false is returned, no handler processed this event (and probably, nothing will happen at all) */ - bool notifyAnimationStart( const std::shared_ptr& rNode ); + bool notifyAnimationStart( const AnimationNodeSharedPtr& rNode ); /** Notify that the given node leaves its active duration. @@ -602,7 +602,7 @@ public: anybody. If false is returned, no handler processed this event (and probably, nothing will happen at all) */ - bool notifyAnimationEnd( const std::shared_ptr& rNode ); + bool notifyAnimationEnd( const AnimationNodeSharedPtr& rNode ); /** Notify that the slide animations sequence leaves its active duration. @@ -627,7 +627,7 @@ public: anybody. If false is returned, no handler processed this event (and probably, nothing will happen at all) */ - bool notifyAudioStopped( const std::shared_ptr& rNode ); + bool notifyAudioStopped( const AnimationNodeSharedPtr& rNode ); /** Notify that the show has entered or exited pause mode @@ -648,7 +648,7 @@ public: anybody. If false is returned, no handler processed this event (and probably, nothing will happen at all) */ - bool notifyCommandStopAudio( const std::shared_ptr& rNode ); + bool notifyCommandStopAudio( const AnimationNodeSharedPtr& rNode ); /** Notifies that a hyperlink has been clicked. */ 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/slideshow/source/inc/pairanimation.hxx b/slideshow/source/inc/pairanimation.hxx index ae28f9b44fcc..f8609a1469b3 100644 --- a/slideshow/source/inc/pairanimation.hxx +++ b/slideshow/source/inc/pairanimation.hxx @@ -47,7 +47,7 @@ namespace slideshow @param rValue Current animation value. */ - virtual bool operator()( const ValueType& rValue ) = 0; + virtual bool operator()( const ::basegfx::B2DTuple& rValue ) = 0; /** Request the underlying value for this animation. @@ -59,7 +59,7 @@ namespace slideshow for the underlying value, if the animation has actually been started (via start() call). */ - virtual ValueType getUnderlyingValue() const = 0; + virtual ::basegfx::B2DTuple getUnderlyingValue() const = 0; }; typedef ::std::shared_ptr< PairAnimation > PairAnimationSharedPtr; diff --git a/slideshow/source/inc/shape.hxx b/slideshow/source/inc/shape.hxx index 648b2ef660b8..adb6683bba75 100644 --- a/slideshow/source/inc/shape.hxx +++ b/slideshow/source/inc/shape.hxx @@ -152,7 +152,7 @@ namespace slideshow shape as-is from the document, assuming a rotation angle of 0). */ - virtual ::basegfx::B2DRange getBounds() const = 0; + virtual ::basegfx::B2DRectangle getBounds() const = 0; /** Get the DOM position and size of the shape. @@ -165,7 +165,7 @@ namespace slideshow currently take the shape as-is from the document, assuming a rotation angle of 0). */ - virtual ::basegfx::B2DRange getDomBounds() const = 0; + virtual ::basegfx::B2DRectangle getDomBounds() const = 0; /** Get the current shape update area. @@ -175,7 +175,7 @@ namespace slideshow the (possibly rotated and sheared) area returned by getBounds(). */ - virtual ::basegfx::B2DRange getUpdateArea() const = 0; + virtual ::basegfx::B2DRectangle getUpdateArea() const = 0; /** Query whether the shape is visible at all. @@ -251,8 +251,6 @@ namespace slideshow }; }; - typedef ::std::shared_ptr< Shape > ShapeSharedPtr; - /** A set which contains all shapes in an ordered fashion. */ typedef ::std::set< ShapeSharedPtr, Shape::lessThanShape > ShapeSet; diff --git a/slideshow/source/inc/shapemanager.hxx b/slideshow/source/inc/shapemanager.hxx index c2c72e231f76..fee51cfb6afd 100644 --- a/slideshow/source/inc/shapemanager.hxx +++ b/slideshow/source/inc/shapemanager.hxx @@ -37,6 +37,9 @@ namespace slideshow class HyperlinkArea; class AnimatableShape; class Shape; + typedef ::std::shared_ptr< AnimatableShape > AnimatableShapeSharedPtr; + typedef ::std::shared_ptr< Shape > ShapeSharedPtr; + typedef std::shared_ptr< HyperlinkArea > HyperlinkAreaSharedPtr; /** ShapeManager interface @@ -55,7 +58,7 @@ namespace slideshow after a corresponding number of leaveAnimationMode() calls. */ - virtual void enterAnimationMode( const std::shared_ptr& rShape ) = 0; + virtual void enterAnimationMode( const AnimatableShapeSharedPtr& rShape ) = 0; /** Notify the ShapeManager that the given Shape is no longer animated. @@ -66,7 +69,7 @@ namespace slideshow to call this method more often than enterAnimationMode(). */ - virtual void leaveAnimationMode( const std::shared_ptr& rShape ) = 0; + virtual void leaveAnimationMode( const AnimatableShapeSharedPtr& rShape ) = 0; /** Notify that a shape needs an update @@ -77,7 +80,7 @@ namespace slideshow @param rShape Shape which needs an update */ - virtual void notifyShapeUpdate( const std::shared_ptr& rShape ) = 0; + virtual void notifyShapeUpdate( const ShapeSharedPtr& rShape ) = 0; /** Lookup a Shape from an XShape model object @@ -88,7 +91,7 @@ namespace slideshow The XShape object, for which the representing Shape should be looked up. */ - virtual std::shared_ptr lookupShape( + virtual ShapeSharedPtr lookupShape( css::uno::Reference< css::drawing::XShape > const & xShape ) const = 0; /** Register given shape as a hyperlink target @@ -98,7 +101,7 @@ namespace slideshow hyperlink region lookup. Must be in absolute user space coordinates. */ - virtual void addHyperlinkArea( const std::shared_ptr& rArea ) = 0; + virtual void addHyperlinkArea( const HyperlinkAreaSharedPtr& rArea ) = 0; }; typedef ::std::shared_ptr< ShapeManager > ShapeManagerSharedPtr; diff --git a/slideshow/source/inc/slide.hxx b/slideshow/source/inc/slide.hxx index cce3edbeee4e..0f1e2dc205e9 100644 --- a/slideshow/source/inc/slide.hxx +++ b/slideshow/source/inc/slide.hxx @@ -97,7 +97,7 @@ namespace slideshow This value is retrieved from the XDrawPage properties. */ - virtual basegfx::B2IVector getSlideSize() const = 0; + virtual basegfx::B2ISize getSlideSize() const = 0; /// Gets the underlying API page virtual css::uno::Reference< css::drawing::XDrawPage > getXDrawPage() const = 0; diff --git a/slideshow/source/inc/slideshowcontext.hxx b/slideshow/source/inc/slideshowcontext.hxx index dee43ba0a8b9..904b8965543e 100644 --- a/slideshow/source/inc/slideshowcontext.hxx +++ b/slideshow/source/inc/slideshowcontext.hxx @@ -43,6 +43,7 @@ namespace slideshow class CursorManager; class MediaFileManager; class SubsettableShapeManager; + typedef ::std::shared_ptr< SubsettableShapeManager > SubsettableShapeManagerSharedPtr; /** Common arguments for slideshow objects. @@ -85,7 +86,7 @@ namespace slideshow @param rComponentContext To create UNO services from */ - SlideShowContext( std::shared_ptr& rSubsettableShapeManager, + SlideShowContext( SubsettableShapeManagerSharedPtr& rSubsettableShapeManager, EventQueue& rEventQueue, EventMultiplexer& rEventMultiplexer, ScreenUpdater& rScreenUpdater, diff --git a/slideshow/source/inc/subsettableshapemanager.hxx b/slideshow/source/inc/subsettableshapemanager.hxx index 5f6c5f473cc0..f66639b6a1a6 100644 --- a/slideshow/source/inc/subsettableshapemanager.hxx +++ b/slideshow/source/inc/subsettableshapemanager.hxx @@ -32,6 +32,7 @@ namespace slideshow { class DocTreeNode; class AttributableShape; + typedef ::std::shared_ptr< AttributableShape > AttributableShapeSharedPtr; /** SubsettableShapeManager interface @@ -62,9 +63,9 @@ namespace slideshow @param rSubsetShape The subset to display in the generated shape. */ - virtual std::shared_ptr getSubsetShape( - const std::shared_ptr& rOrigShape, - const DocTreeNode& rTreeNode ) = 0; + virtual AttributableShapeSharedPtr getSubsetShape( + const AttributableShapeSharedPtr& rOrigShape, + const DocTreeNode& rTreeNode ) = 0; /** Revoke a previously queried subset shape. @@ -80,8 +81,8 @@ namespace slideshow The subset created from rOrigShape */ virtual void revokeSubset( - const std::shared_ptr& rOrigShape, - const std::shared_ptr& rSubsetShape ) = 0; + const AttributableShapeSharedPtr& rOrigShape, + const AttributableShapeSharedPtr& rSubsetShape ) = 0; // Evil hackish way of getting intrinsic animation slide-wise diff --git a/slideshow/source/inc/tools.hxx b/slideshow/source/inc/tools.hxx index 0a15008e797e..0392cf476998 100644 --- a/slideshow/source/inc/tools.hxx +++ b/slideshow/source/inc/tools.hxx @@ -52,6 +52,7 @@ namespace basegfx class B2DVector; class B2IVector; class B2DHomMatrix; + typedef B2IVector B2ISize; } namespace cppcanvas{ class Canvas; } @@ -65,8 +66,8 @@ namespace slideshow class UnoView; class Shape; class ShapeAttributeLayer; - - typedef ::std::shared_ptr< GDIMetaFile > GDIMetaFileSharedPtr; + typedef std::shared_ptr< UnoView > UnoViewSharedPtr; + typedef std::shared_ptr< GDIMetaFile > GDIMetaFileSharedPtr; template inline ::std::size_t hash_value( T const * p ) @@ -111,49 +112,49 @@ namespace slideshow /// extract unary double value from Any bool extractValue( double& o_rValue, const css::uno::Any& rSourceAny, - const std::shared_ptr& rShape, + const ShapeSharedPtr& rShape, const basegfx::B2DVector& rSlideBounds ); /// extract int from Any bool extractValue( sal_Int32& o_rValue, const css::uno::Any& rSourceAny, - const std::shared_ptr& rShape, + const ShapeSharedPtr& rShape, const basegfx::B2DVector& rSlideBounds ); /// extract enum/constant group value from Any bool extractValue( sal_Int16& o_rValue, const css::uno::Any& rSourceAny, - const std::shared_ptr& rShape, + const ShapeSharedPtr& rShape, const basegfx::B2DVector& rSlideBounds ); /// extract color value from Any bool extractValue( RGBColor& o_rValue, const css::uno::Any& rSourceAny, - const std::shared_ptr& rShape, + const ShapeSharedPtr& rShape, const basegfx::B2DVector& rSlideBounds ); /// extract color value from Any bool extractValue( HSLColor& o_rValue, const css::uno::Any& rSourceAny, - const std::shared_ptr& rShape, + const ShapeSharedPtr& rShape, const basegfx::B2DVector& rSlideBounds ); /// extract plain string from Any bool extractValue( OUString& o_rValue, const css::uno::Any& rSourceAny, - const std::shared_ptr& rShape, + const ShapeSharedPtr& rShape, const basegfx::B2DVector& rSlideBounds ); /// extract bool value from Any bool extractValue( bool& o_rValue, const css::uno::Any& rSourceAny, - const std::shared_ptr& rShape, + const ShapeSharedPtr& rShape, const basegfx::B2DVector& rSlideBounds ); /// extract double 2-tuple from Any bool extractValue( basegfx::B2DTuple& o_rPair, const css::uno::Any& rSourceAny, - const std::shared_ptr& rShape, + const ShapeSharedPtr& rShape, const basegfx::B2DVector& rSlideBounds ); /** Search a sequence of NamedValues for a given element. @@ -178,8 +179,8 @@ namespace slideshow a simple scale and translate of the unit rect to rBounds). */ basegfx::B2DHomMatrix getShapeTransformation( - const basegfx::B2DRange& rBounds, - const std::shared_ptr& pAttr ); + const basegfx::B2DRectangle& rBounds, + const ShapeAttributeLayerSharedPtr& pAttr ); /** Get a shape's sprite transformation from the attribute set @@ -197,9 +198,9 @@ namespace slideshow @return the transformation to be applied to the sprite. */ basegfx::B2DHomMatrix getSpriteTransformation( - const basegfx::B2DVector& rPixelSize, - const basegfx::B2DVector& rOrigSize, - const std::shared_ptr& pAttr ); + const basegfx::B2DVector& rPixelSize, + const basegfx::B2DVector& rOrigSize, + const ShapeAttributeLayerSharedPtr& pAttr ); /** Calc update area for a shape. @@ -219,10 +220,10 @@ namespace slideshow @param pAttr Current shape attributes */ - basegfx::B2DRange getShapeUpdateArea( - const basegfx::B2DRange& rUnitBounds, - const basegfx::B2DHomMatrix& rShapeTransform, - const std::shared_ptr& pAttr ); + basegfx::B2DRectangle getShapeUpdateArea( + const basegfx::B2DRectangle& rUnitBounds, + const basegfx::B2DHomMatrix& rShapeTransform, + const ShapeAttributeLayerSharedPtr& pAttr ); /** Calc update area for a shape. @@ -253,9 +254,9 @@ namespace slideshow it as if aBounds.getMinimum() is the output position and aBounds.getRange() the scaling of the shape. */ - basegfx::B2DRange getShapePosSize( - const basegfx::B2DRange& rOrigBounds, - const std::shared_ptr& pAttr ); + basegfx::B2DRectangle getShapePosSize( + const basegfx::B2DRectangle& rOrigBounds, + const ShapeAttributeLayerSharedPtr& pAttr ); /** Convert a plain UNO API 32 bit int to RGBColor */ @@ -266,14 +267,14 @@ namespace slideshow /** Fill a plain rectangle on the given canvas with the given color */ - void fillRect( const std::shared_ptr< cppcanvas::Canvas >& rCanvas, - const basegfx::B2DRange& rRect, - cppcanvas::IntSRGBA aFillColor ); + void fillRect( const cppcanvas::CanvasSharedPtr& rCanvas, + const basegfx::B2DRectangle& rRect, + cppcanvas::IntSRGBA aFillColor ); /** Init canvas with default background (white) */ - void initSlideBackground( const std::shared_ptr< cppcanvas::Canvas >& rCanvas, - const basegfx::B2IVector& rSize ); + void initSlideBackground( const cppcanvas::CanvasSharedPtr& rCanvas, + const basegfx::B2ISize& rSize ); /// Gets a random ordinal [0,n) inline ::std::size_t getRandomOrdinal( const ::std::size_t n ) @@ -339,7 +340,7 @@ namespace slideshow } /// Get the content of the BoundRect shape property - basegfx::B2DRange getAPIShapeBounds( const css::uno::Reference< css::drawing::XShape >& xShape ); + basegfx::B2DRectangle getAPIShapeBounds( const css::uno::Reference< css::drawing::XShape >& xShape ); /* TODO(F1): When ZOrder someday becomes usable enable this @@ -348,8 +349,8 @@ namespace slideshow double getAPIShapePrio( const css::uno::Reference< css::drawing::XShape >& xShape ); */ - basegfx::B2IVector getSlideSizePixel( const basegfx::B2DVector& rSize, - const std::shared_ptr& pView ); + basegfx::B2IVector getSlideSizePixel( const basegfx::B2DVector& rSize, + const UnoViewSharedPtr& pView ); } // TODO(Q1): this could possibly be implemented with a somewhat diff --git a/slideshow/source/inc/view.hxx b/slideshow/source/inc/view.hxx index 1eaea033793a..4298fa1b273e 100644 --- a/slideshow/source/inc/view.hxx +++ b/slideshow/source/inc/view.hxx @@ -68,7 +68,7 @@ namespace slideshow underlying view transformation, returned by the getTransformation() method. */ - virtual void setViewSize( const ::basegfx::B2DVector& ) = 0; + virtual void setViewSize( const ::basegfx::B2DSize& ) = 0; /** Change the view's mouse cursor. diff --git a/slideshow/source/inc/viewlayer.hxx b/slideshow/source/inc/viewlayer.hxx index 0b701d472b1e..a3a331a1666e 100644 --- a/slideshow/source/inc/viewlayer.hxx +++ b/slideshow/source/inc/viewlayer.hxx @@ -31,11 +31,14 @@ namespace basegfx class B2DVector; class B2DHomMatrix; class B2DPolyPolygon; + typedef B2DVector B2DSize; } namespace cppcanvas { class Canvas; class CustomSprite; + typedef std::shared_ptr< Canvas > CanvasSharedPtr; + typedef std::shared_ptr< ::cppcanvas::CustomSprite > CustomSpriteSharedPtr; } @@ -46,6 +49,7 @@ namespace slideshow namespace internal { class View; + typedef std::shared_ptr< View > ViewSharedPtr; class ViewLayer { @@ -57,14 +61,14 @@ namespace slideshow @return true, if this layer displays on the given view. */ - virtual bool isOnView(std::shared_ptr const& rView) const = 0; + virtual bool isOnView(ViewSharedPtr const& rView) const = 0; /** Get the associated canvas of this layer. The canvas returned by this method must not change, as long as this object is alive. */ - virtual std::shared_ptr< cppcanvas::Canvas > getCanvas() const = 0; + virtual cppcanvas::CanvasSharedPtr getCanvas() const = 0; /** Clear the clipped view layer area @@ -99,9 +103,9 @@ namespace slideshow @return the sprite, or NULL on failure (or if this canvas does not support sprites). */ - virtual std::shared_ptr< cppcanvas::CustomSprite > - createSprite( const basegfx::B2DVector& rSpriteSizePixel, - double nPriority ) const = 0; + virtual cppcanvas::CustomSpriteSharedPtr + createSprite( const basegfx::B2DSize& rSpriteSizePixel, + double nPriority ) const = 0; /** Set the layer priority range 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/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx index 4fa91ec9a0cd..29024c7cc6f9 100644 --- a/svl/source/numbers/numfmuno.cxx +++ b/svl/source/numbers/numfmuno.cxx @@ -188,9 +188,9 @@ OUString SAL_CALL SvNumberFormatterServiceObj::convertNumberToString( sal_Int32 return aRet; } -util::Color SAL_CALL SvNumberFormatterServiceObj::queryColorForNumber( sal_Int32 nKey, +sal_Int32 SAL_CALL SvNumberFormatterServiceObj::queryColorForNumber( sal_Int32 nKey, double fValue, - util::Color aDefaultColor ) + sal_Int32 aDefaultColor ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -227,9 +227,9 @@ OUString SAL_CALL SvNumberFormatterServiceObj::formatString( sal_Int32 nKey, return aRet; } -util::Color SAL_CALL SvNumberFormatterServiceObj::queryColorForString( sal_Int32 nKey, +sal_Int32 SAL_CALL SvNumberFormatterServiceObj::queryColorForString( sal_Int32 nKey, const OUString& aString, - util::Color aDefaultColor ) + sal_Int32 aDefaultColor ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -295,11 +295,11 @@ OUString SAL_CALL SvNumberFormatterServiceObj::convertNumberToPreviewString( con return aRet; } -util::Color SAL_CALL SvNumberFormatterServiceObj::queryPreviewColorForNumber( const OUString& aFormat, +sal_Int32 SAL_CALL SvNumberFormatterServiceObj::queryPreviewColorForNumber( const OUString& aFormat, double fValue, const lang::Locale& nLocale, sal_Bool bAllowEnglish, - util::Color aDefaultColor ) + sal_Int32 aDefaultColor ) { ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/svl/source/numbers/numfmuno.hxx b/svl/source/numbers/numfmuno.hxx index f68f73459b75..7be9b1aa2493 100644 --- a/svl/source/numbers/numfmuno.hxx +++ b/svl/source/numbers/numfmuno.hxx @@ -57,22 +57,22 @@ public: virtual sal_Int32 SAL_CALL detectNumberFormat( sal_Int32 nKey, const OUString& aString ) override; virtual double SAL_CALL convertStringToNumber( sal_Int32 nKey, const OUString& aString ) override; virtual OUString SAL_CALL convertNumberToString( sal_Int32 nKey, double fValue ) override; - virtual css::util::Color SAL_CALL queryColorForNumber( sal_Int32 nKey, - double fValue, css::util::Color aDefaultColor ) override; + virtual sal_Int32 SAL_CALL queryColorForNumber( sal_Int32 nKey, + double fValue, sal_Int32 aDefaultColor ) override; virtual OUString SAL_CALL formatString( sal_Int32 nKey, const OUString& aString ) override; - virtual css::util::Color SAL_CALL queryColorForString( sal_Int32 nKey, - const OUString& aString, - css::util::Color aDefaultColor ) override; + virtual sal_Int32 SAL_CALL queryColorForString( sal_Int32 nKey, + const OUString& aString, + sal_Int32 aDefaultColor ) override; virtual OUString SAL_CALL getInputString( sal_Int32 nKey, double fValue ) override; // XNumberFormatPreviewer virtual OUString SAL_CALL convertNumberToPreviewString( const OUString& aFormat, double fValue, const css::lang::Locale& nLocale, sal_Bool bAllowEnglish ) override; - virtual css::util::Color SAL_CALL queryPreviewColorForNumber( + virtual sal_Int32 SAL_CALL queryPreviewColorForNumber( const OUString& aFormat, double fValue, const css::lang::Locale& nLocale, sal_Bool bAllowEnglish, - css::util::Color aDefaultColor ) override; + sal_Int32 aDefaultColor ) override; // XServiceInfo virtual OUString SAL_CALL getImplementationName( ) override; 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(m_pBox->GetState()); + return static_cast(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(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 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 const & rPaletteManager weld::Window* pParentWindow, weld::MenuButton* pMenuButton, bool bInterimBuilder, - std::function 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 *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 #include +#include 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 & rVector, +void SwNumberTreeNode::GetNumberVector_(SwNumberTree::tNumberVector & rVector, bool bValidate) const { if (mpParent) @@ -675,7 +675,7 @@ SwNumberTree::tSwNumTreeNumber SwNumberTreeNode::GetNumber(bool bValidate) } -vector SwNumberTreeNode::GetNumberVector() const +SwNumberTree::tNumberVector SwNumberTreeNode::GetNumberVector() const { vector 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 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/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 075849739ef3..c3cb2d50a1e2 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -2948,7 +2948,7 @@ void SwEscherEx::WriteOCXControl( const SwFrameFormat& rFormat, sal_uInt32 nShap } void SwEscherEx::MakeZOrderArrAndFollowIds( - std::vector& rSrcArr, std::vector&rDstArr) + std::vector& rSrcArr, DrawObjPointerVector&rDstArr) { ::lcl_makeZOrderArray(rWrt, rSrcArr, rDstArr); diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 3fdd698a51d6..6918bc0b90d0 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -134,6 +134,7 @@ namespace mark class IFieldmark; } } +typedef std::set< sal_Int32 > SwSoftPageBreakList; #define GRF_MAGIC_1 0x12 // 3 magic bytes for PicLocFc attribute #define GRF_MAGIC_2 0x34 @@ -883,7 +884,7 @@ protected: void BulletDefinitions(); bool NeedSectionBreak( const SwNode& rNd ) const; - bool NeedTextNodeSplit( const SwTextNode& rNd, std::set< sal_Int32 >& pList ) const; + bool NeedTextNodeSplit( const SwTextNode& rNd, SwSoftPageBreakList& pList ) const; std::vector m_vecBulletPic; ///< Vector to record all the graphics of bullets 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/testtools/source/bridgetest/cppobj.cxx b/testtools/source/bridgetest/cppobj.cxx index 8ad2c6ee109d..295e0368acc9 100644 --- a/testtools/source/bridgetest/cppobj.cxx +++ b/testtools/source/bridgetest/cppobj.cxx @@ -178,9 +178,9 @@ public: const css::uno::Reference< css::uno::XInterface >& xTest, const css::uno::Any& rAny, const css::uno::Sequence& rSequence, - const TestData& rStruct ) override; + const ::test::testtools::bridgetest::TestDataElements& rStruct ) override; - virtual TestData SAL_CALL setValues2( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte, + virtual ::test::testtools::bridgetest::TestDataElements SAL_CALL setValues2( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte, sal_Int16& nShort, sal_uInt16& nUShort, sal_Int32& nLong, sal_uInt32& nULong, sal_Int64& nHyper, sal_uInt64& nUHyper, @@ -189,9 +189,9 @@ public: css::uno::Reference< css::uno::XInterface >& xTest, css::uno::Any& rAny, css::uno::Sequence& rSequence, - TestData& rStruct ) override; + ::test::testtools::bridgetest::TestDataElements& rStruct ) override; - virtual TestData SAL_CALL getValues( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte, + virtual ::test::testtools::bridgetest::TestDataElements SAL_CALL getValues( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte, sal_Int16& nShort, sal_uInt16& nUShort, sal_Int32& nLong, sal_uInt32& nULong, sal_Int64& nHyper, sal_uInt64& nUHyper, @@ -200,7 +200,7 @@ public: css::uno::Reference< css::uno::XInterface >& xTest, css::uno::Any& rAny, css::uno::Sequence< TestElement >& rSequence, - TestData& rStruct ) override; + ::test::testtools::bridgetest::TestDataElements& rStruct ) override; virtual SmallStruct SAL_CALL echoSmallStruct(const SmallStruct& rStruct) override { return rStruct; } @@ -254,7 +254,7 @@ public: { return _aData.Any; } virtual css::uno::Sequence< TestElement > SAL_CALL getSequence() override { return _aData.Sequence; } - virtual TestData SAL_CALL getStruct() override + virtual ::test::testtools::bridgetest::TestDataElements SAL_CALL getStruct() override { return _aStructData; } virtual void SAL_CALL setBool( sal_Bool _bool ) override @@ -289,7 +289,7 @@ public: { _aData.Any = _any; } virtual void SAL_CALL setSequence( const css::uno::Sequence& _sequence ) override { _aData.Sequence = _sequence; } - virtual void SAL_CALL setStruct( const TestData& _struct ) override + virtual void SAL_CALL setStruct( const ::test::testtools::bridgetest::TestDataElements& _struct ) override { _aStructData = _struct; } virtual sal_Int32 SAL_CALL getRaiseAttr1() override @@ -359,7 +359,7 @@ public: virtual OUString SAL_CALL testMulti(Reference< XMulti > const & multi) override; public: // XBridgeTest - virtual TestData SAL_CALL raiseException( sal_Int16 nArgumentPos, const OUString & rMsg, const Reference< XInterface > & xCOntext ) override; + virtual ::test::testtools::bridgetest::TestDataElements SAL_CALL raiseException( sal_Int16 nArgumentPos, const OUString & rMsg, const Reference< XInterface > & xCOntext ) override; virtual void SAL_CALL raiseRuntimeExceptionOneway( const OUString& Message, const css::uno::Reference< css::uno::XInterface >& Context ) override; @@ -543,7 +543,7 @@ void Test_Impl::setValues( sal_Bool bBool, sal_Unicode cChar, sal_Int8 nByte, const css::uno::Reference< css::uno::XInterface >& xTest, const css::uno::Any& rAny, const css::uno::Sequence& rSequence, - const TestData& rStruct ) + const ::test::testtools::bridgetest::TestDataElements& rStruct ) { assign( _aData, bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble, @@ -551,7 +551,7 @@ void Test_Impl::setValues( sal_Bool bBool, sal_Unicode cChar, sal_Int8 nByte, _aStructData = rStruct; } -TestData Test_Impl::setValues2( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte, +::test::testtools::bridgetest::TestDataElements Test_Impl::setValues2( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte, sal_Int16& nShort, sal_uInt16& nUShort, sal_Int32& nLong, sal_uInt32& nULong, sal_Int64& nHyper, sal_uInt64& nUHyper, @@ -560,7 +560,7 @@ TestData Test_Impl::setValues2( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& n css::uno::Reference< css::uno::XInterface >& xTest, css::uno::Any& rAny, css::uno::Sequence& rSequence, - TestData& rStruct ) + ::test::testtools::bridgetest::TestDataElements& rStruct ) { assign( _aData, bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble, @@ -574,7 +574,7 @@ TestData Test_Impl::setValues2( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& n return _aStructData; } -TestData Test_Impl::getValues( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte, +::test::testtools::bridgetest::TestDataElements Test_Impl::getValues( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte, sal_Int16& nShort, sal_uInt16& nUShort, sal_Int32& nLong, sal_uInt32& nULong, sal_Int64& nHyper, sal_uInt64& nUHyper, @@ -583,7 +583,7 @@ TestData Test_Impl::getValues( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nB css::uno::Reference< css::uno::XInterface >& xTest, css::uno::Any& rAny, css::uno::Sequence& rSequence, - TestData& rStruct ) + ::test::testtools::bridgetest::TestDataElements& rStruct ) { bBool = _aData.Bool; cChar = _aData.Char; @@ -605,7 +605,7 @@ TestData Test_Impl::getValues( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nB return _aStructData; } -TestData Test_Impl::raiseException( sal_Int16 nArgumentPos, const OUString & rMsg, const Reference< XInterface > & xContext ) +::test::testtools::bridgetest::TestDataElements Test_Impl::raiseException( sal_Int16 nArgumentPos, const OUString & rMsg, const Reference< XInterface > & xContext ) { IllegalArgumentException aExc; aExc.ArgumentPosition = nArgumentPos; 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(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(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(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(aCharWidth); + pGlyphWidths[i] = static_cast(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 #include #include "LoggedResources.hxx" -#include +#include "PropertyMap.hxx" #include #include #include @@ -67,7 +68,7 @@ public: explicit BorderHandler( bool bOOXML ); virtual ~BorderHandler() override; - ::tools::SvRef 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 #include @@ -54,7 +55,7 @@ public: CellColorHandler( ); virtual ~CellColorHandler() override; - ::tools::SvRef 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 #include "LoggedResources.hxx" +#include "PropertyMap.hxx" #include #include @@ -64,6 +65,8 @@ class StyleSheetTable; class GraphicZOrderHelper; class GraphicNamingHelper; +typedef tools::SvRef 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::Pointer_t ref) override; - void sprmWithProps( Sprm& sprm, const ::tools::SvRef& pContext ); + void sprmWithProps( Sprm& sprm, const PropertyMapPtr& pContext ); - void PushStyleSheetProperties( const ::tools::SvRef& pStyleProperties, bool bAffectTableMngr = false ); + void PushStyleSheetProperties( const PropertyMapPtr& pStyleProperties, bool bAffectTableMngr = false ); void PopStyleSheetProperties( bool bAffectTableMngr = false ); void PushListProperties( const ::tools::SvRef& pListProperties ); @@ -100,7 +103,7 @@ public: css::uno::Reference 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 > 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/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index eba8a479e98a..abe565112a6c 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -143,7 +143,7 @@ bool OOXMLFastContextHandler::prepareMceContext(Token_t nElement, const uno::Ref // xml::sax::XFastContextHandler: void SAL_CALL OOXMLFastContextHandler::startFastElement -(Token_t Element, +(sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) { if (oox::getNamespace(Element) == NMSP_mce) @@ -162,7 +162,7 @@ void SAL_CALL OOXMLFastContextHandler::startUnknownElement { } -void SAL_CALL OOXMLFastContextHandler::endFastElement(Token_t Element) +void SAL_CALL OOXMLFastContextHandler::endFastElement(sal_Int32 Element) { if (Element == (NMSP_mce | XML_Choice) || Element == (NMSP_mce | XML_Fallback)) m_bDiscardChildren = false; @@ -202,7 +202,7 @@ void SAL_CALL OOXMLFastContextHandler::endUnknownElement uno::Reference< xml::sax::XFastContextHandler > SAL_CALL OOXMLFastContextHandler::createFastChildContext -(Token_t Element, +(sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) { uno::Reference< xml::sax::XFastContextHandler > xResult; @@ -1249,7 +1249,7 @@ OOXMLFastContextHandlerTable::~OOXMLFastContextHandlerTable() uno::Reference< xml::sax::XFastContextHandler > SAL_CALL OOXMLFastContextHandlerTable::createFastChildContext -(Token_t Element, +(sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) { addCurrentChild(); diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx index 03aab0070209..38653bf29b1b 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx @@ -51,15 +51,15 @@ public: virtual ~OOXMLFastContextHandler() override; // css::xml::sax::XFastContextHandler: - virtual void SAL_CALL startFastElement (Token_t Element, const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs) override; + virtual void SAL_CALL startFastElement (sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs) override; virtual void SAL_CALL startUnknownElement(const OUString & Namespace, const OUString & Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs) override; - virtual void SAL_CALL endFastElement(Token_t Element) override; + virtual void SAL_CALL endFastElement(sal_Int32 Element) override; virtual void SAL_CALL endUnknownElement(const OUString & Namespace, const OUString & Name) override; - virtual css::uno::Reference SAL_CALL createFastChildContext(Token_t Element, + virtual css::uno::Reference SAL_CALL createFastChildContext(sal_Int32 Element, const css::uno::Reference& Attribs) override; virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createUnknownChildContext(const OUString & Namespace, const OUString & Name, @@ -348,7 +348,7 @@ public: explicit OOXMLFastContextHandlerTable(OOXMLFastContextHandler * pContext); virtual ~OOXMLFastContextHandlerTable() override; - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext (Token_t Element, + virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext (sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs) override; private: 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 & rPropSet, const OUString& rProperty, - const enum XMLTokenEnum pElements[], + const ::xmloff::token::XMLTokenEnum pElements[], bool bAutoStyles) { // mib said: "Hau wech!" -- cgit