[Libreoffice-commits] core.git: Branch 'feature/lok_dialog' - 1283 commits - accessibility/inc accessibility/source android/source animations/source avmedia/inc avmedia/source basctl/inc basctl/source basegfx/source basic/inc basic/qa basic/source binaryurp/qa bin/distro-install-file-lists bin/find-german-comments bin/find-unusedheaders.pl bin/find-unusedheaders.py bin/gbuild-to-ideNS bin/gen-iwyu-dummy-lib bin/lo-all-static-libs bin/update bridges/source canvas/Module_canvas.mk canvas/source chart2/inc chart2/Module_chart2.mk chart2/qa chart2/source cli_ure/source codemaker/Module_codemaker.mk codemaker/source comphelper/Library_comphelper.mk comphelper/source compilerplugins/clang config_host/config_global.h.in config_host/config_vclplug.h.in config_host.mk.in configmgr/qa configmgr/source config.sub configure.ac connectivity/Configuration_tdeab.mk connectivity/Library_postgresql-sdbc-impl.mk connectivity/Library_postgresql-sdbc.mk connectivity/Library_tdeab1.mk connectivity/Library_tdeabdrv1.m k connectivity/Module_connectivity.mk connectivity/registry connectivity/source cppcanvas/source cppuhelper/source cppu/source cpputools/source cui/Library_cui.mk cui/source cui/uiconfig dbaccess/Module_dbaccess.mk dbaccess/qa dbaccess/source desktop/inc desktop/Library_deploymentgui.mk desktop/Library_sofficeapp.mk desktop/Pagein_common.mk desktop/qa desktop/source desktop/unx dictionaries distro-configs/Jenkins download.lst drawinglayer/qa drawinglayer/source dtrans/source editeng/qa editeng/source embeddedobj/source embedserv/source eventattacher/source extensions/Library_abp.mk extensions/Library_dbp.mk extensions/source external/clew external/coinmp external/cppunit external/curl external/expat external/graphite external/harfbuzz external/hunspell external/hyphen external/icu external/jpeg-turbo external/lcms2 external/libabw external/libatomic_ops external/libcdr external/libebook external/libetonyek external/libexttextcat external/libfreehand external/libgltf external/liblang tag external/libmspub external/libmwaw external/libodfgen external/liborcus external/libpagemaker external/librevenge external/libstaroffice external/libvisio external/libwpd external/libwpg external/libwps external/libxml2 external/libxmlsec external/libxslt external/libzmf external/lpsolve external/Module_external.mk external/more_fonts external/msc-externals external/mythes external/nss external/openssl external/pdfium external/poppler external/python3 external/redland extras/Package_palettes.mk extras/source filter/Configuration_filter.mk filter/source forms/source formula/source fpicker/Library_fps.mk fpicker/source framework/inc framework/source .gitignore helpcompiler/source helpcontent2 hwpfilter/source i18nlangtag/qa i18nlangtag/source i18npool/qa i18npool/source i18nutil/source icon-themes/industrial icon-themes/sifr icon-themes/sifr_dark icon-themes/sifr_svg icon-themes/tango idlc/CustomTarget_parser_test.mk idlc/inc idlc/source idl/source include/avmedia include/basegfx include/basic include/canvas include/com include/comphelper include/connectivity include/cppuhelper include/desktop include/drawinglayer include/editeng include/filter include/formula include/framework include/i18nlangtag include/jvmfwk include/LibreOfficeKit include/o3tl include/oox include/osl include/rsc include/rtl include/sal include/salhelper include/sax include/sfx2 include/shell include/sot include/store include/svl include/svtools include/svx include/test include/toolkit include/tools include/ucbhelper include/unotools include/vbahelper include/vcl include/xmloff instsetoo_native/CustomTarget_install.mk ios/experimental ios/Module_ios.mk io/source io/test javaunohelper/com jurt/com jvmfwk/plugins jvmfwk/source l10ntools/inc l10ntools/source libreofficekit/qa libreofficekit/source lingucomponent/source linguistic/source lotuswordpro/source Makefile.fetch Makefile.gbuild Makefile.in mysqlc/source o3tl/CppunitTest_o3tl_tests.mk o3tl/qa odk/CustomTarget_allheaders.mk odk/Custom Target_build-examples.mk odk/CustomTarget_check.mk odk/CustomTarget_doxygen.mk odk/examples odk/Module_odk.mk odk/PackageSet_odk_headers.mk odk/settings offapi/com offapi/UnoApi_offapi.mk officecfg/registry onlineupdate/CustomTarget_generated.mk onlineupdate/qa onlineupdate/README onlineupdate/source oovbaapi/ooo oox/inc oox/qa oox/source opencl/inc opencl/source package/inc package/Library_package2.mk package/Library_xstor.mk package/qa package/source postprocess/CustomTarget_registry.mk postprocess/CustomTarget_signing.mk postprocess/packimages postprocess/Rdb_services.mk pyuno/source qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/runner qadevOOo/tests readlicense_oo/docs readlicense_oo/license registry/CustomTarget_regcompare_test.mk registry/source registry/test registry/tools remotebridges/source reportdesign/inc reportdesign/source RepositoryExternal.mk Repository.mk rsc/inc rsc/source salhelper/source sal/Library_sal.mk sal/Module_sal.mk sal/osl sal/qa sal/rtl sal/textenc sax/inc sax/qa sax/source scaddins/source sc/CppunitTest_sc_cellcursorobj.mk sc/CppunitTest_sc_dataproviders_test.mk sc/CppunitTest_sc_ucalc.mk sc/inc sc/Library_sc.mk sc/Module_sc.mk scp2/AutoInstall.mk scp2/inc scp2/InstallModule_ooo.mk scp2/InstallModule_sdkoo.mk scp2/InstallModule_tde.mk scp2/InstallModule_winexplorerext.mk scp2/InstallScript_setup_osl.mk scp2/Module_scp2.mk scp2/source sc/PythonTest_sc_python.mk sc/qa scripting/source sc/sdi sc/source sc/uiconfig sdext/source sd/inc sd/Library_sd.mk sd/qa sd/source sd/uiconfig sfx2/inc sfx2/qa sfx2/source shell/Library_tdebe.mk shell/Module_shell.mk shell/source slideshow/source slideshow/test smoketest/smoketest.cxx solenv/bin solenv/CompilerTest_compilerplugins_clang.mk solenv/gbuild solenv/inc soltools/mkdepend sot/source starmath/inc starmath/qa starmath/source stoc/source store/source svgio/inc svgio/source svl/source svtools/AllLangResTarget_svt.mk svtools/inc svtools/langsupport svtools/source svx/AllLangResTarget_ofa.m k svx/inc svx/Module_svx.mk svx/qa svx/source swext/mediawiki sw/inc sw/JunitTest_sw_complex.mk sw/Module_sw.mk sw/PythonTest_sw_python.mk sw/qa sw/sdi sw/source sw/uiconfig sysui/CustomTarget_share.mk sysui/desktop test/Library_subsequenttest.mk test/source testtools/CustomTarget_uno_test.mk testtools/source toolkit/Library_tk.mk toolkit/source tools/source translations ucbhelper/source ucb/source udkapi/com uitest/libreoffice uitest/packaging uitest/uitest uitest/writer_tests UnoControls/source unodevtools/source unoidl/CustomTarget_unoidl-write_test.mk unoidl/source unotest/source unotools/source unoxml/qa unoxml/source ure/source uui/AllLangResTarget_uui.mk uui/Library_uui.mk uui/source vbahelper/source vcl/android vcl/commonfuzzer.mk vcl/CustomTarget_nativecalc.mk vcl/CustomTarget_nativecode.mk vcl/CustomTarget_nativecore.mk vcl/CustomTarget_nativedraw.mk vcl/CustomTarget_nativewriter.mk vcl/CustomTarget_tde_moc.mk vcl/Executable_602fuzzer.mk vcl/Executable_bmpfuzzer.mk vcl/Exe cutable_cgmfuzzer.mk vcl/Executable_dxffuzzer.mk vcl/Executable_epsfuzzer.mk vcl/Executable_giffuzzer.mk vcl/Executable_hwpfuzzer.mk vcl/Executable_jpgfuzzer.mk vcl/Executable_lwpfuzzer.mk vcl/Executable_metfuzzer.mk vcl/Executable_olefuzzer.mk vcl/Executable_pcdfuzzer.mk vcl/Executable_pctfuzzer.mk vcl/Executable_pcxfuzzer.mk vcl/Executable_pngfuzzer.mk vcl/Executable_ppmfuzzer.mk vcl/Executable_pptfuzzer.mk vcl/Executable_psdfuzzer.mk vcl/Executable_qpwfuzzer.mk vcl/Executable_rasfuzzer.mk vcl/Executable_rtffuzzer.mk vcl/Executable_svmfuzzer.mk vcl/Executable_tdefilepicker.mk vcl/Executable_tgafuzzer.mk vcl/Executable_tiffuzzer.mk vcl/Executable_wmffuzzer.mk vcl/Executable_ww2fuzzer.mk vcl/Executable_ww6fuzzer.mk vcl/Executable_ww8fuzzer.mk vcl/Executable_xbmfuzzer.mk vcl/Executable_xpmfuzzer.mk vcl/headless vcl/inc vcl/Library_vcl.mk vcl/Library_vclplug_tde.mk vcl/Module_vcl.mk vcl/opengl vcl/osx vcl/qa vcl/quartz vcl/README.vars vcl/source vcl/StaticLibrary_fuzzer_calc.mk vcl/St aticLibrary_fuzzer_core.mk vcl/StaticLibrary_fuzzer_draw.mk vcl/StaticLibrary_fuzzer.mk vcl/StaticLibrary_fuzzerstubs.mk vcl/StaticLibrary_fuzzer_writer.mk vcl/unx vcl/win vcl/workben winaccessibility/inc wizards/AllLangResTarget_eur.mk wizards/AllLangResTarget_imp.mk wizards/AllLangResTarget_tpl.mk wizards/com wizards/CustomTarget_wizards.mk wizards/Module_wizards.mk wizards/Package_wizards.mk wizards/Package_wizards_properties.mk wizards/source writerfilter/inc writerfilter/Library_writerfilter.mk writerfilter/source writerfilter/util writerperfect/qa writerperfect/source xmlhelp/source xmlhelp/util xmloff/inc xmloff/Library_xo.mk xmloff/source xmlscript/source xmlscript/test xmlsecurity/inc xmlsecurity/Library_xmlsecurity.mk xmlsecurity/Library_xsec_gpg.mk xmlsecurity/Library_xsec_xmlsec.mk xmlsecurity/Module_xmlsecurity.mk xmlsecurity/qa xmlsecurity/source xmlsecurity/uiconfig xmlsecurity/util xmlsecurity/workben

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Mon Jun 26 12:33:07 UTC 2017


Rebased ref, commits from common ancestor:
commit b80b29548124feab9604c2877eca809a42d18084
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Thu Jun 22 12:20:01 2017 +0200

    Instantiate spell dialog and paint in a paintDialog call
    
    Change-Id: I7bd7f9cb33cd79d1e55ce51fe39917c5741bdf18

diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index dd6aa018deee..fcc5621354c5 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -164,6 +164,7 @@
 #include <svx/svdview.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/servicehelper.hxx>
+#include <SwSpellDialogChildWindow.hxx>
 #include <memory>
 
 using namespace ::com::sun::star;
@@ -3566,12 +3567,20 @@ vcl::DialogID SwXTextDocument::findDialog()
     return vcl::DialogID(0);
 }
 
-void SwXTextDocument::paintDialog(vcl::DialogID /*rDialogID*/, VirtualDevice& /*rDevice*/, int /*nWidth*/, int /*nHeight*/)
+void SwXTextDocument::paintDialog(vcl::DialogID /*rDialogID*/, VirtualDevice& rDevice, int nWidth, int nHeight)
 {
-    //SwViewShell* pViewShell = pDocShell->GetWrtShell();
+    SfxViewShell* pViewShell = pDocShell->GetView();
+    SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
+    SfxChildWindow* pSfxChildWindow = SwSpellDialogChildWindow::CreateImpl(&pViewFrame->GetWindow(), SwSpellDialogChildWindow::GetChildWindowId(),
+                                                                           &pViewFrame->GetBindings(), nullptr);
 
-    //SwSpellDialogChildWindow::CreateImpl(nullptr, SwSpellDialogChildWindow::GetChildWindowId(),
-    //                                     pViewShell->GetBindings(), );
+    Size aSize(nWidth, nHeight);
+
+    vcl::Window* pWindow = pSfxChildWindow->GetWindow();
+
+    pWindow->SetSizePixel(aSize);
+    pWindow->Show();
+    pWindow->Paint(rDevice, tools::Rectangle(Point(), aSize));
 }
 
 void SwXTextDocument::postDialogMouseEvent(vcl::DialogID /*rDialogID*/, int /*nType*/, int /*nCharCode*/, int /*nKeyCode*/)
commit acc3b9f601a92718f55a51f60e229523421575ae
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Thu Jun 22 12:18:26 2017 +0200

    Test for paintDialog to show if we succeed to paint into a VD
    
    Change-Id: Iccba81ff4326f1fb3d93bdf9393d7d3cc3675f9e

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 0152bfa4aa05..d705e6c8ed97 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -39,6 +39,7 @@
 #include <cairo.h>
 #include <ostream>
 #include <config_features.h>
+#include <png.h>
 
 #include <lib/init.hxx>
 
@@ -114,6 +115,7 @@ public:
     void testCommentsCallbacksWriter();
     void testRunMacro();
     void testExtractParameter();
+    void testDialogsWriter();
 
     CPPUNIT_TEST_SUITE(DesktopLOKTest);
     CPPUNIT_TEST(testGetStyles);
@@ -156,6 +158,7 @@ public:
     CPPUNIT_TEST(testCommentsCallbacksWriter);
     CPPUNIT_TEST(testRunMacro);
     CPPUNIT_TEST(testExtractParameter);
+    CPPUNIT_TEST(testDialogsWriter);
     CPPUNIT_TEST_SUITE_END();
 
     uno::Reference<lang::XComponent> mxComponent;
@@ -177,7 +180,6 @@ public:
     // for testContextMenu{Calc, Writer}
     osl::Condition m_aContextMenuCondition;
     boost::property_tree::ptree m_aContextMenuResult;
-
 };
 
 LibLODocument_Impl* DesktopLOKTest::loadDoc(const char* pName, LibreOfficeKitDocumentType eType)
@@ -2151,6 +2153,29 @@ void DesktopLOKTest::testExtractParameter()
     CPPUNIT_ASSERT_EQUAL(OUString("Something1,Something2=blah,Something3"), aOptions);
 }
 
+void DesktopLOKTest::testDialogsWriter()
+{
+    LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
+    int nCanvasWidth = 100;
+    int nCanvasHeight = 300;
+    sal_Int32 nStride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, nCanvasWidth);
+    std::vector<unsigned char> aBuffer(nStride * nCanvasHeight);
+
+    pDocument->pClass->paintDialog(pDocument, aBuffer.data(), nCanvasWidth, nCanvasHeight);
+
+    for (long y = 0; y < nCanvasHeight; ++y)
+    {
+        unsigned char* c = &aBuffer.data()[y * nStride];
+        for (long x = 0; x < nStride; ++x)
+        {
+            printf ("%02x ", c[x]);
+        }
+        printf ("\n");
+    }
+
+    CPPUNIT_ASSERT(false);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
commit 36694a2b6dc46416ec94d1ed469fc535473e1ec3
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Fri May 26 22:55:31 2017 +0200

    Add IDialogRenderable interface for rendering of dialogs
    
    Change-Id: I1d85729a1ac1a99d33ea2bde1b50ccf4c05ca9a9

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 286b93e66e79..99f818688202 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -76,6 +76,7 @@
 #include <vcl/sysdata.hxx>
 #include <vcl/virdev.hxx>
 #include <vcl/ITiledRenderable.hxx>
+#include <vcl/IDialogRenderable.hxx>
 #include <unicode/uchar.h>
 #include <unotools/configmgr.hxx>
 #include <unotools/syslocaleoptions.hxx>
@@ -596,6 +597,8 @@ static unsigned char* doc_renderFont(LibreOfficeKitDocument* pThis,
                           int* pFontHeight);
 static char* doc_getPartHash(LibreOfficeKitDocument* pThis, int nPart);
 
+static void doc_paintDialog(LibreOfficeKitDocument* pThis, unsigned char* pBuffer, int nWidth, int nHeight);
+
 LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XComponent> &xComponent)
     : mxComponent(xComponent)
 {
@@ -642,6 +645,8 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XCompone
         m_pDocumentClass->renderFont = doc_renderFont;
         m_pDocumentClass->getPartHash = doc_getPartHash;
 
+        m_pDocumentClass->paintDialog = doc_paintDialog;
+
         gDocumentClass = m_pDocumentClass;
     }
     pClass = m_pDocumentClass.get();
@@ -1158,6 +1163,12 @@ ITiledRenderable* getTiledRenderable(LibreOfficeKitDocument* pThis)
     return dynamic_cast<ITiledRenderable*>(pDocument->mxComponent.get());
 }
 
+IDialogRenderable* getDialogRenderable(LibreOfficeKitDocument* pThis)
+{
+    LibLODocument_Impl* pDocument = static_cast<LibLODocument_Impl*>(pThis);
+    return dynamic_cast<IDialogRenderable*>(pDocument->mxComponent.get());
+}
+
 } // anonymous namespace
 
 // Wonder global state ...
@@ -2922,6 +2933,22 @@ unsigned char* doc_renderFont(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pTh
     return nullptr;
 }
 
+static void doc_paintDialog(LibreOfficeKitDocument* pThis, unsigned char* pBuffer, int nWidth, int nHeight)
+{
+    SolarMutexGuard aGuard;
+
+    IDialogRenderable* pDialogRenderable = getDialogRenderable(pThis);
+
+    ScopedVclPtrInstance<VirtualDevice> pDevice(nullptr, Size(1, 1), DeviceFormat::DEFAULT);
+    pDevice->SetBackground(Wallpaper(Color(COL_TRANSPARENT)));
+
+    pDevice->SetOutputSizePixelScaleOffsetAndBuffer(Size(nWidth, nHeight), Fraction(1.0), Point(), pBuffer);
+
+    vcl::DialogID aDialogID(pDialogRenderable->findDialog());
+
+    pDialogRenderable->paintDialog(aDialogID, *pDevice.get(), nWidth, nHeight);
+}
+
 static char* lo_getError (LibreOfficeKit *pThis)
 {
     SolarMutexGuard aGuard;
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index a4035c7351f0..717b5b3d348c 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -254,6 +254,9 @@ struct _LibreOfficeKitDocumentClass
                        int* pArray,
                        size_t nSize);
 
+    /// WIP
+    void (*paintDialog) (LibreOfficeKitDocument* pThis, unsigned char* pBuffer, int nWidth, int nHeight);
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --git a/include/vcl/IDialogRenderable.hxx b/include/vcl/IDialogRenderable.hxx
new file mode 100644
index 000000000000..18694092c2fa
--- /dev/null
+++ b/include/vcl/IDialogRenderable.hxx
@@ -0,0 +1,44 @@
+/* -*- 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/.
+ *
+ */
+
+#ifndef INCLUDED_VCL_IDIALOGRENDERABLE_HXX
+#define INCLUDED_VCL_IDIALOGRENDERABLE_HXX
+
+#include <tools/gen.hxx>
+#include <vcl/pointr.hxx>
+#include <vcl/virdev.hxx>
+
+namespace vcl
+{
+
+typedef sal_Int32 DialogID;
+
+class VCL_DLLPUBLIC IDialogRenderable
+{
+public:
+    virtual ~IDialogRenderable();
+
+    virtual DialogID findDialog() = 0;
+
+    virtual void paintDialog(DialogID rDialogID, VirtualDevice &rDevice,
+                             int nOutputWidth, int nOutputHeight) = 0;
+
+    virtual void postDialogMouseEvent(DialogID rDialogID, int nType,
+                                      int nCharCode, int nKeyCode) = 0;
+
+    virtual void postDialogKeyEvent(DialogID rDialogID, int nType, int nX, int nY,
+                                    int nCount, int nButtons, int nModifier) = 0;
+};
+
+} // namespace vcl
+
+#endif // INCLUDED_VCL_IDIALOGRENDERABLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index ccbfb62589cd..f2dc662e299f 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -69,6 +69,7 @@
 #include <cppuhelper/implbase.hxx>
 #include <vcl/event.hxx>
 #include <vcl/ITiledRenderable.hxx>
+#include <vcl/IDialogRenderable.hxx>
 #include <com/sun/star/tiledrendering/XTiledRenderable.hpp>
 
 #include <unobaseclass.hxx>
@@ -130,6 +131,7 @@ class SW_DLLPUBLIC SwXTextDocument : public SwXTextDocumentBaseClass,
     public SvxFmMSFactory,
     public SfxBaseModel,
     public vcl::ITiledRenderable,
+    public vcl::IDialogRenderable,
     public css::tiledrendering::XTiledRenderable
 {
 private:
@@ -423,6 +425,15 @@ public:
     OUString getTrackedChangeAuthors() override;
     /// @see vcl::ITiledRenderable::getPostIts().
     OUString getPostIts() override;
+
+    vcl::DialogID findDialog() override;
+    void paintDialog(vcl::DialogID rDialogID, VirtualDevice &rDevice, int nWidth, int nHeight) override;
+    void postDialogMouseEvent(vcl::DialogID rDialogID, int nType,
+                             int nCharCode, int nKeyCode) override;
+
+    void postDialogKeyEvent(vcl::DialogID rDialogID, int nType, int nX, int nY,
+                            int nCount, int nButtons, int nModifier) override;
+
     // css::tiledrendering::XTiledRenderable
     virtual void SAL_CALL paintTile( const ::css::uno::Any& Parent, ::sal_Int32 nOutputWidth, ::sal_Int32 nOutputHeight, ::sal_Int32 nTilePosX, ::sal_Int32 nTilePosY, ::sal_Int32 nTileWidth, ::sal_Int32 nTileHeight ) override;
 
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 4ba3d0b3784e..dd6aa018deee 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3561,6 +3561,28 @@ void SAL_CALL SwXTextDocument::paintTile( const ::css::uno::Any& Parent, ::sal_I
     #endif
 }
 
+vcl::DialogID SwXTextDocument::findDialog()
+{
+    return vcl::DialogID(0);
+}
+
+void SwXTextDocument::paintDialog(vcl::DialogID /*rDialogID*/, VirtualDevice& /*rDevice*/, int /*nWidth*/, int /*nHeight*/)
+{
+    //SwViewShell* pViewShell = pDocShell->GetWrtShell();
+
+    //SwSpellDialogChildWindow::CreateImpl(nullptr, SwSpellDialogChildWindow::GetChildWindowId(),
+    //                                     pViewShell->GetBindings(), );
+}
+
+void SwXTextDocument::postDialogMouseEvent(vcl::DialogID /*rDialogID*/, int /*nType*/, int /*nCharCode*/, int /*nKeyCode*/)
+{
+}
+
+void SwXTextDocument::postDialogKeyEvent(vcl::DialogID /*rDialogID*/, int /*nType*/, int /*nX*/, int /*nY*/,
+                                         int /*nCount*/, int /*nButtons*/, int /*nModifier*/)
+{
+}
+
 void * SAL_CALL SwXTextDocument::operator new( size_t t) throw()
 {
     return SwXTextDocumentBaseClass::operator new(t);
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index da6bb39b6c50..0c65489420de 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -338,6 +338,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/source/app/IconThemeScanner \
     vcl/source/app/IconThemeSelector \
     vcl/source/app/ITiledRenderable \
+    vcl/source/app/IDialogRenderable \
     vcl/source/app/sound \
     vcl/source/app/stdtext \
     vcl/source/app/svapp \
diff --git a/vcl/source/app/IDialogRenderable.cxx b/vcl/source/app/IDialogRenderable.cxx
new file mode 100644
index 000000000000..58ec05265101
--- /dev/null
+++ b/vcl/source/app/IDialogRenderable.cxx
@@ -0,0 +1,22 @@
+/* -*- 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 <vcl/IDialogRenderable.hxx>
+
+namespace vcl
+{
+
+IDialogRenderable::~IDialogRenderable()
+{
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit e2107221cd06e76528d71778309001c8c6099897
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Fri May 26 22:37:06 2017 +0200

    move ITileRenderable implementation to own file
    
    Change-Id: Ib05ecf5f92e0ae4adf99c4dd10d60e730a95cf45

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index a0113a2e85d4..da6bb39b6c50 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -337,6 +337,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/source/app/IconThemeInfo \
     vcl/source/app/IconThemeScanner \
     vcl/source/app/IconThemeSelector \
+    vcl/source/app/ITiledRenderable \
     vcl/source/app/sound \
     vcl/source/app/stdtext \
     vcl/source/app/svapp \
diff --git a/vcl/source/app/ITiledRenderable.cxx b/vcl/source/app/ITiledRenderable.cxx
new file mode 100644
index 000000000000..3eb5dcd2da6e
--- /dev/null
+++ b/vcl/source/app/ITiledRenderable.cxx
@@ -0,0 +1,22 @@
+/* -*- 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 <vcl/ITiledRenderable.hxx>
+
+namespace vcl
+{
+
+ITiledRenderable::~ITiledRenderable()
+{
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 52bb9f566873..974533d9ea13 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -23,18 +23,8 @@
 #include "outdev.h"
 #include "PhysicalFontCollection.hxx"
 #include "svdata.hxx"
-
 #include <vcl/ITiledRenderable.hxx>
 
-namespace vcl
-{
-
-ITiledRenderable::~ITiledRenderable()
-{
-}
-
-}
-
 using namespace ::com::sun::star::uno;
 
 bool VirtualDevice::AcquireGraphics() const
commit 2fb2d6efdb25f718ddd65709697bc68d81815a59
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Jun 26 11:44:49 2017 +0200

    loplugin:oncevar in scaddins..sot
    
    Change-Id: I657a131374b9f1153135e00ed429889518b91427
    Reviewed-on: https://gerrit.libreoffice.org/39258
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/scaddins/source/analysis/bessel.cxx b/scaddins/source/analysis/bessel.cxx
index 0369785987e3..b7fb5ab419d9 100644
--- a/scaddins/source/analysis/bessel.cxx
+++ b/scaddins/source/analysis/bessel.cxx
@@ -80,7 +80,7 @@ double BesselJ( double x, sal_Int32 N )
             throw NoConvergenceException();
     }
 
-    double epsilon = 1.0e-15; // relative error
+    double const epsilon = 1.0e-15; // relative error
     bool bHasfound = false;
     double k= 0.0;
     // e_{-1} = 0; e_0 = alpha_0 / b_2
diff --git a/scaddins/source/pricing/black_scholes.cxx b/scaddins/source/pricing/black_scholes.cxx
index 8a8cd1eb88da..fe111f03858a 100644
--- a/scaddins/source/pricing/black_scholes.cxx
+++ b/scaddins/source/pricing/black_scholes.cxx
@@ -881,7 +881,7 @@ double barrier(double S, double vol, double rd, double rf,
 // discounting and we get the probability
 double prob_hit(double S, double vol, double mu,
                 double tau, double B1, double B2) {
-    double rd=0.0;
+    double const rd=0.0;
     double rf=-mu;
     return 1.0 - touch(S,vol,rd,rf,tau,B1,B2,types::Domestic,types::KnockOut,
                        types::Continuous, types::Value);
diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx
index a66367c7382f..4fac2f9cbb51 100644
--- a/scripting/source/basprov/basprov.cxx
+++ b/scripting/source/basprov/basprov.cxx
@@ -158,9 +158,8 @@ namespace basprov
                 OSL_VERIFY( aFileItem.getFileStatus( aFileStatus ) == osl::FileBase::E_None );
                 OUString aCanonicalFileURL( aFileStatus.getFileURL() );
 
-                OUString aSearchURL1( "share/basic"  );
-                OUString aSearchURL2( "share/uno_packages"  );
-                if( aCanonicalFileURL.indexOf( aSearchURL1 ) != -1 || aCanonicalFileURL.indexOf( aSearchURL2 ) != -1 )
+                if( aCanonicalFileURL.indexOf( "share/basic" ) != -1
+                    || aCanonicalFileURL.indexOf( "share/uno_packages" ) != -1 )
                     bIsShared = true;
             }
         }
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 883a10d55593..78330cab7785 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -91,13 +91,12 @@ namespace dlgprov
         OUString aDlgName = aInetObj.GetBase();
         aInetObj.removeSegment();
         OUString aDlgLocation = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
-        bool bReadOnly = true;
         css::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
         OUString aComment;
 
         Sequence<Any> aArgs( 6 );
         aArgs[0] <<= aDlgLocation;
-        aArgs[1] <<= bReadOnly;
+        aArgs[1] <<= true; // bReadOnly
         aArgs[2] <<= aLocale;
         aArgs[3] <<= aDlgName;
         aArgs[4] <<= aComment;
@@ -242,9 +241,7 @@ namespace dlgprov
             throw RuntimeException("No information to create dialog" );
         Reference< resource::XStringResourceManager > xStringResourceManager = getStringResourceFromDialogLibrary( m_BasicInfo->mxDlgLib );
 
-        OUString aURL("" );
-        Any aDialogSourceURL;
-        aDialogSourceURL <<= aURL;
+        Any aDialogSourceURL((OUString()));
         Reference< XControlModel > xCtrlModel( createDialogModel( m_BasicInfo->mxInput, xStringResourceManager, aDialogSourceURL ), UNO_QUERY_THROW );
         return xCtrlModel;
     }
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index bf151c477311..41579a1cded1 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -345,8 +345,7 @@ void StringResourceImpl::implSetCurrentLocale( const Locale& locale,
 
 void StringResourceImpl::setCurrentLocale( const Locale& locale, sal_Bool FindClosestMatch )
 {
-    bool bUseDefaultIfNoMatch = false;
-    implSetCurrentLocale( locale, FindClosestMatch, bUseDefaultIfNoMatch );
+    implSetCurrentLocale( locale, FindClosestMatch, false/*bUseDefaultIfNoMatch*/ );
 }
 
 void StringResourceImpl::setDefaultLocale( const Locale& locale )
@@ -528,8 +527,7 @@ void StringResourceImpl::removeLocale( const Locale& locale )
                 }
                 if( m_pCurrentLocaleItem == pRemoveItem )
                 {
-                    bool FindClosestMatch = false;
-                    setCurrentLocale( pFallbackItem->m_locale, FindClosestMatch );
+                    setCurrentLocale( pFallbackItem->m_locale, false/*FindClosestMatch*/ );
                 }
                 if( m_pDefaultLocaleItem == pRemoveItem )
                 {
@@ -632,8 +630,7 @@ LocaleItem* StringResourceImpl::getItemForLocale
 
     if( pRetItem == nullptr && bException )
     {
-        OUString errorMsg("StringResourceImpl: Invalid locale");
-        throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 0 );
+        throw IllegalArgumentException( "StringResourceImpl: Invalid locale", Reference< XInterface >(), 0 );
     }
     return pRetItem;
 }
@@ -777,9 +774,7 @@ void StringResourcePersistenceImpl::implInitializeCommonParameters
 
     implScanLocales();
 
-    bool FindClosestMatch = true;
-    bool bUseDefaultIfNoMatch = true;
-    implSetCurrentLocale( aCurrentLocale, FindClosestMatch, bUseDefaultIfNoMatch );
+    implSetCurrentLocale( aCurrentLocale, true/*FindClosestMatch*/, true/*bUseDefaultIfNoMatch*/ );
 }
 
 
@@ -902,9 +897,7 @@ void StringResourcePersistenceImpl::storeToStorage( const Reference< XStorage >&
 {
     ::osl::MutexGuard aGuard( getMutex() );
 
-    bool bUsedForStore = false;
-    bool bStoreAll = true;
-    implStoreAtStorage( NameBase, Comment, Storage, bUsedForStore, bStoreAll );
+    implStoreAtStorage( NameBase, Comment, Storage, false/*bUsedForStore*/, true/*bStoreAll*/ );
 }
 
 void StringResourcePersistenceImpl::implStoreAtStorage
@@ -954,13 +947,12 @@ void StringResourcePersistenceImpl::implStoreAtStorage
                     Storage->openStreamElement( aStreamName, ElementModes::READWRITE );
 
             OUString aPropName("MediaType");
-            OUString aMime("text/plain");
 
             uno::Reference< beans::XPropertySet > xProps( xElementStream, uno::UNO_QUERY );
             OSL_ENSURE( xProps.is(), "The StorageStream must implement XPropertySet interface!" );
             if ( xProps.is() )
             {
-                xProps->setPropertyValue( aPropName, uno::makeAny( aMime ) );
+                xProps->setPropertyValue( aPropName, uno::makeAny( OUString("text/plain") ) );
 
                 aPropName = "UseCommonStoragePasswordEncryption";
                 xProps->setPropertyValue( aPropName, uno::makeAny( true ) );
@@ -1025,14 +1017,11 @@ void StringResourcePersistenceImpl::storeToURL( const OUString& URL,
 {
     ::osl::MutexGuard aGuard( getMutex() );
 
-    bool bUsedForStore = false;
-    bool bStoreAll = true;
-
     Reference< ucb::XSimpleFileAccess3 > xFileAccess = ucb::SimpleFileAccess::create(m_xContext);
     if( xFileAccess.is() && Handler.is() )
         xFileAccess->setInteractionHandler( Handler );
 
-    implStoreAtLocation( URL, NameBase, Comment, xFileAccess, bUsedForStore, bStoreAll );
+    implStoreAtLocation( URL, NameBase, Comment, xFileAccess, false/*bUsedForStore*/, true/*bStoreAll*/ );
 }
 
 void StringResourcePersistenceImpl::implKillRemovedLocaleFiles
@@ -1310,10 +1299,9 @@ Sequence< sal_Int8 > StringResourcePersistenceImpl::exportBinary(  )
     }
 
     // Write header
-    sal_Int16 nVersion = 0;
     sal_Int16 nLocaleCount16 = (sal_Int16)nLocaleCount;
     sal_Int16 iDefault16 = (sal_Int16)iDefault;
-    aOut.writeInt16( nVersion );
+    aOut.writeInt16( 0 ); // nVersion
     aOut.writeInt16( nLocaleCount16 );
     aOut.writeInt16( iDefault16 );
 
@@ -2323,13 +2311,12 @@ void StringResourceWithStorageImpl::store()
     ::osl::MutexGuard aGuard( getMutex() );
     implCheckReadOnly( "StringResourceWithStorageImpl::store(): Read only" );
 
-    bool bUsedForStore = true;
     bool bStoreAll = m_bStorageChanged;
     m_bStorageChanged = false;
     if( !m_bModified && !bStoreAll )
         return;
 
-    implStoreAtStorage( m_aNameBase, m_aComment, m_xStorage, bUsedForStore, bStoreAll );
+    implStoreAtStorage( m_aNameBase, m_aComment, m_xStorage, true/*bUsedForStore*/, bStoreAll );
     m_bModified = false;
 }
 
@@ -2512,16 +2499,14 @@ void StringResourceWithLocationImpl::initialize( const Sequence< Any >& aArgumen
 
     if( !bOk )
     {
-        OUString errorMsg("XInitialization::initialize: invalid URL");
-        throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 0 );
+        throw IllegalArgumentException( "XInitialization::initialize: invalid URL", Reference< XInterface >(), 0 );
     }
 
 
     bOk = (aArguments[5] >>= m_xInteractionHandler);
     if( !bOk )
     {
-        OUString errorMsg("StringResourceWithStorageImpl::initialize: invalid type");
-        throw IllegalArgumentException( errorMsg, Reference< XInterface >(), 5 );
+        throw IllegalArgumentException( "StringResourceWithStorageImpl::initialize: invalid type", Reference< XInterface >(), 5 );
     }
 
     implInitializeCommonParameters( aArguments );
@@ -2629,7 +2614,6 @@ void StringResourceWithLocationImpl::store()
     ::osl::MutexGuard aGuard( getMutex() );
     implCheckReadOnly( "StringResourceWithLocationImpl::store(): Read only" );
 
-    bool bUsedForStore = true;
     bool bStoreAll = m_bLocationChanged;
     m_bLocationChanged = false;
     if( !m_bModified && !bStoreAll )
@@ -2637,7 +2621,7 @@ void StringResourceWithLocationImpl::store()
 
     Reference< ucb::XSimpleFileAccess3 > xFileAccess = getFileAccess();
     implStoreAtLocation( m_aLocation, m_aNameBase, m_aComment,
-        xFileAccess, bUsedForStore, bStoreAll );
+        xFileAccess, true/*bUsedForStore*/, bStoreAll );
     m_bModified = false;
 }
 
@@ -2694,11 +2678,8 @@ void StringResourceWithLocationImpl::setURL( const OUString& URL )
     implLoadAllLocales();
 
     // Delete files at old location
-    bool bUsedForStore = false;
-    bool bStoreAll = false;
-    bool bKillAll = true;
     implStoreAtLocation( m_aLocation, m_aNameBase, m_aComment,
-        getFileAccess(), bUsedForStore, bStoreAll, bKillAll );
+        getFileAccess(), false/*bUsedForStore*/, false/*bStoreAll*/, true/*bKillAll*/ );
 
     m_aLocation = URL;
     m_bLocationChanged = true;
diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx
index 2206093bc1f7..11e3e8a6d034 100644
--- a/sdext/source/minimizer/configurationaccess.cxx
+++ b/sdext/source/minimizer/configurationaccess.cxx
@@ -113,9 +113,7 @@ void OptimizerSettings::SaveSettingsToConfiguration( const Reference< XNameRepla
 //          Any( maFilterName ),
             Any( mbOpenNewDocument ) };
 
-        sal_Int32 i, nCount = SAL_N_ELEMENTS( pNames );
-
-        for ( i = 0; i < nCount; i++ )
+        for ( int i = 0; i < int(SAL_N_ELEMENTS( pNames )); i++ )
         {
             try
             {
diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx
index 3dd042d6cc79..93392a74c1c1 100644
--- a/sdext/source/presenter/PresenterAccessibility.cxx
+++ b/sdext/source/presenter/PresenterAccessibility.cxx
@@ -1492,8 +1492,7 @@ sal_Int32 SAL_CALL PresenterAccessible::AccessibleParagraph::getIndexAtPoint (
     const css::awt::Point& )
 {
     ThrowIfDisposed();
-    sal_Int32 nIndex (-1);
-    return nIndex;
+    return -1;
 }
 
 OUString SAL_CALL PresenterAccessible::AccessibleParagraph::getSelectedText()
diff --git a/sdext/source/presenter/PresenterWindowManager.cxx b/sdext/source/presenter/PresenterWindowManager.cxx
index f9de66cf2920..70687aac7afb 100644
--- a/sdext/source/presenter/PresenterWindowManager.cxx
+++ b/sdext/source/presenter/PresenterWindowManager.cxx
@@ -330,8 +330,6 @@ void SAL_CALL PresenterWindowManager::disposing (const lang::EventObject& rEvent
 
 bool PresenterWindowManager::PaintChildren (const awt::PaintEvent& rEvent) const
 {
-    bool bChildInvalidated (false);
-
     // Call windowPaint on all children that lie in or touch the
     // update rectangle.
     PresenterPaneContainer::PaneList::const_iterator iPane;
@@ -381,7 +379,7 @@ bool PresenterWindowManager::PaintChildren (const awt::PaintEvent& rEvent) const
         }
     }
 
-    return bChildInvalidated;
+    return false;
 }
 
 void PresenterWindowManager::SetLayoutMode (const LayoutMode eMode)
diff --git a/slideshow/source/engine/opengl/TransitionImpl.cxx b/slideshow/source/engine/opengl/TransitionImpl.cxx
index e28b17f02d89..ad83e50b5dc6 100644
--- a/slideshow/source/engine/opengl/TransitionImpl.cxx
+++ b/slideshow/source/engine/opengl/TransitionImpl.cxx
@@ -73,11 +73,11 @@ OGLTransitionImpl::~OGLTransitionImpl()
 void OGLTransitionImpl::uploadModelViewProjectionMatrices()
 {
     double EyePos(10.0);
-    double RealF(1.0);
-    double RealN(-1.0);
-    double RealL(-1.0);
+    double const RealF(1.0);
+    double const RealN(-1.0);
+    double const RealL(-1.0);
     double RealR(1.0);
-    double RealB(-1.0);
+    double const RealB(-1.0);
     double RealT(1.0);
     double ClipN(EyePos+5.0*RealN);
     double ClipF(EyePos+15.0*RealF);
@@ -1737,11 +1737,11 @@ void VortexTransition::prepareTransition( sal_Int32 glLeavingSlideTex, sal_Int32
     CHECK_GL_ERROR();
 
     double EyePos(10.0);
-    double RealF(1.0);
-    double RealN(-1.0);
-    double RealL(-2.0);
+    double const RealF(1.0);
+    double const RealN(-1.0);
+    double const RealL(-2.0);
     double RealR(2.0);
-    double RealB(-2.0);
+    double const RealB(-2.0);
     double RealT(2.0);
     double ClipN(EyePos+5.0*RealN);
     double ClipF(EyePos+15.0*RealF);
@@ -2135,11 +2135,11 @@ void HoneycombTransition::prepareTransition( sal_Int32 glLeavingSlideTex, sal_In
     CHECK_GL_ERROR();
 
     double EyePos(10.0);
-    double RealF(1.0);
-    double RealN(-1.0);
-    double RealL(-4.0);
+    double const RealF(1.0);
+    double const RealN(-1.0);
+    double const RealL(-4.0);
     double RealR(4.0);
-    double RealB(-4.0);
+    double const RealB(-4.0);
     double RealT(4.0);
     double ClipN(EyePos+5.0*RealN);
     double ClipF(EyePos+15.0*RealF);
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 67c7582a3b05..25f3d60e4150 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -1716,7 +1716,6 @@ void UCBStorage_Impl::ReadContent()
     aProps[1] = "IsFolder";
     aProps[2] = "MediaType";
     aProps[3] = "Size";
-    ::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS;
 
     try
     {
@@ -1724,7 +1723,7 @@ void UCBStorage_Impl::ReadContent()
         if ( !m_pContent )
             return;
 
-        Reference< XResultSet > xResultSet = m_pContent->createCursor( aProps, eInclude );
+        Reference< XResultSet > xResultSet = m_pContent->createCursor( aProps, ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS );
         Reference< XRow > xRow( xResultSet, UNO_QUERY );
         if ( xResultSet.is() )
         {
commit 3b9d2501b390dfaec7d0a189742fb3305f3742d9
Author: Johnny_M <klasse at partyheld.de>
Date:   Sat Jun 24 15:36:32 2017 +0200

    tdf#39674 Translate some German variable names
    
    This translates "Neu..." to "New..." in names of some variables.
    
    No functional change is intended.
    
    Change-Id: I29859ecdd44e15820414746cd2b39f62cdfc0ae3
    Reviewed-on: https://gerrit.libreoffice.org/39213
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx
index 3e434f8e64bd..ec7b4a61e625 100644
--- a/include/svx/svdundo.hxx
+++ b/include/svx/svdundo.hxx
@@ -523,11 +523,11 @@ public:
 
 class SdrUndoMoveLayer : public SdrUndoLayer
 {
-    sal_uInt16                      nNeuPos;
+    sal_uInt16                      nNewPos;
 
 public:
-    SdrUndoMoveLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel, sal_uInt16 nNeuPos1)
-    :   SdrUndoLayer(nLayerNum,rNewLayerAdmin,rNewModel), nNeuPos(nNeuPos1) {}
+    SdrUndoMoveLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel, sal_uInt16 nNewPos1)
+    :   SdrUndoLayer(nLayerNum,rNewLayerAdmin,rNewModel), nNewPos(nNewPos1) {}
 
     virtual void Undo() override;
     virtual void Redo() override;
@@ -761,7 +761,7 @@ public:
     // Layer
     virtual SdrUndoAction* CreateUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel);
     virtual SdrUndoAction* CreateUndoDeleteLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel);
-    virtual SdrUndoAction* CreateUndoMoveLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel, sal_uInt16 nNeuPos1);
+    virtual SdrUndoAction* CreateUndoMoveLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel, sal_uInt16 nNewPos1);
 
     // Page
     virtual SdrUndoAction* CreateUndoDeletePage(SdrPage& rPage);
diff --git a/reportdesign/source/core/inc/ReportUndoFactory.hxx b/reportdesign/source/core/inc/ReportUndoFactory.hxx
index add7c8939429..0f247e4aad36 100644
--- a/reportdesign/source/core/inc/ReportUndoFactory.hxx
+++ b/reportdesign/source/core/inc/ReportUndoFactory.hxx
@@ -56,7 +56,7 @@ namespace rptui
         // layer
         virtual SdrUndoAction* CreateUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel) override;
         virtual SdrUndoAction* CreateUndoDeleteLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel) override;
-        virtual SdrUndoAction* CreateUndoMoveLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel, sal_uInt16 nNeuPos1) override;
+        virtual SdrUndoAction* CreateUndoMoveLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel, sal_uInt16 nNewPos1) override;
 
         // page
         virtual SdrUndoAction* CreateUndoDeletePage(SdrPage& rPage) override;
diff --git a/reportdesign/source/core/sdr/ReportUndoFactory.cxx b/reportdesign/source/core/sdr/ReportUndoFactory.cxx
index d1f2bb548bdf..984da1343982 100644
--- a/reportdesign/source/core/sdr/ReportUndoFactory.cxx
+++ b/reportdesign/source/core/sdr/ReportUndoFactory.cxx
@@ -127,9 +127,9 @@ SdrUndoAction* OReportUndoFactory::CreateUndoDeleteLayer(sal_uInt16 nLayerNum, S
     return m_pUndoFactory->CreateUndoDeleteLayer( nLayerNum, rNewLayerAdmin, rNewModel );
 }
 
-SdrUndoAction* OReportUndoFactory::CreateUndoMoveLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel, sal_uInt16 nNeuPos1)
+SdrUndoAction* OReportUndoFactory::CreateUndoMoveLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel, sal_uInt16 nNewPos1)
 {
-    return m_pUndoFactory->CreateUndoMoveLayer( nLayerNum, rNewLayerAdmin, rNewModel, nNeuPos1 );
+    return m_pUndoFactory->CreateUndoMoveLayer( nLayerNum, rNewLayerAdmin, rNewModel, nNewPos1 );
 }
 
 // page
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index 5f5bbca803d1..846601146e0f 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -265,11 +265,11 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC
                         SdrObject* pObject = pShape ? pShape->GetSdrObject() : nullptr;
                         if ( pObject )
                         {
-                            SdrObject* pNeuObj = pObject->Clone();
+                            SdrObject* pNewObj = pObject->Clone();
 
-                            pNeuObj->SetPage( m_pPage );
-                            pNeuObj->SetModel( m_pModel.get() );
-                            m_pPage->InsertObject(pNeuObj, SAL_MAX_SIZE);
+                            pNewObj->SetPage( m_pPage );
+                            pNewObj->SetModel( m_pModel.get() );
+                            m_pPage->InsertObject(pNewObj, SAL_MAX_SIZE);
 
                             tools::Rectangle aRet(VCLPoint((*pCopiesIter)->getPosition()),VCLSize((*pCopiesIter)->getSize()));
                             aRet.setHeight(aRet.getHeight() + 1);
@@ -277,15 +277,15 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC
                             bool bOverlapping = true;
                             while ( bOverlapping )
                             {
-                                bOverlapping = isOver(aRet,*m_pPage,*m_pView,true,pNeuObj) != nullptr;
+                                bOverlapping = isOver(aRet,*m_pPage,*m_pView,true,pNewObj) != nullptr;
                                 if ( bOverlapping )
                                 {
                                     aRet.Move(0,aRet.getHeight()+1);
-                                    pNeuObj->SetLogicRect(aRet);
+                                    pNewObj->SetLogicRect(aRet);
                                 }
                             }
-                            m_pView->AddUndo( m_pView->GetModel()->GetSdrUndoFactory().CreateUndoNewObject( *pNeuObj ) );
-                            m_pView->MarkObj( pNeuObj, m_pView->GetSdrPageView() );
+                            m_pView->AddUndo( m_pView->GetModel()->GetSdrUndoFactory().CreateUndoNewObject( *pNewObj ) );
+                            m_pView->MarkObj( pNewObj, m_pView->GetSdrPageView() );
                             if ( m_xSection.is() && (static_cast<sal_uInt32>(aRet.getHeight() + aRet.Top()) > m_xSection->getHeight()) )
                                 m_xSection->setHeight(aRet.getHeight() + aRet.Top());
                         }
@@ -358,8 +358,8 @@ void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedOb
         {
             try
             {
-                SdrObject* pNeuObj = pSdrObject->Clone();
-                aCopies.push_back(uno::Reference<report::XReportComponent>(pNeuObj->getUnoShape(),uno::UNO_QUERY));
+                SdrObject* pNewObj = pSdrObject->Clone();
+                aCopies.push_back(uno::Reference<report::XReportComponent>(pNewObj->getUnoShape(),uno::UNO_QUERY));
                 if ( _bEraseAnddNoClone )
                 {
                     m_pView->AddUndo( rUndo.CreateUndoDeleteObject( *pSdrObject ) );
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index 5b2b35d2f043..f7d6c350e164 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -153,25 +153,25 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
                 const SdrMark* pM=aMark.GetMark(nm);
                 const SdrObject* pObj=pM->GetMarkedSdrObj();
 
-                SdrObject* pNeuObj=pObj->Clone();
+                SdrObject* pNewObj=pObj->Clone();
 
-                if (pNeuObj!=nullptr)
+                if (pNewObj!=nullptr)
                 {
-                    pNeuObj->SetModel(pDrawModel);
-                    pNeuObj->SetPage(pDestPage);
+                    pNewObj->SetModel(pDrawModel);
+                    pNewObj->SetPage(pDestPage);
 
                     //  copy graphics within the same model - always needs new name
-                    if ( dynamic_cast<const SdrGrafObj*>( pNeuObj) !=  nullptr && !bPasteIsMove )
-                        pNeuObj->SetName(static_cast<ScDrawLayer*>(pDrawModel)->GetNewGraphicName());
+                    if ( dynamic_cast<const SdrGrafObj*>( pNewObj) !=  nullptr && !bPasteIsMove )
+                        pNewObj->SetName(static_cast<ScDrawLayer*>(pDrawModel)->GetNewGraphicName());
 
                     if (nDiffX!=0 || nDiffY!=0)
-                        pNeuObj->NbcMove(Size(nDiffX,nDiffY));
+                        pNewObj->NbcMove(Size(nDiffX,nDiffY));
                     if (pDestPage)
-                        pDestPage->InsertObject( pNeuObj );
-                    pScDrawView->AddUndo(new SdrUndoInsertObj( *pNeuObj ));
+                        pDestPage->InsertObject( pNewObj );
+                    pScDrawView->AddUndo(new SdrUndoInsertObj( *pNewObj ));
 
-                    if (ScDrawLayer::IsCellAnchored(*pNeuObj))
-                        ScDrawLayer::SetCellAnchoredFromPosition(*pNeuObj, *GetViewData().GetDocument(), nTab);
+                    if (ScDrawLayer::IsCellAnchored(*pNewObj))
+                        ScDrawLayer::SetCellAnchoredFromPosition(*pNewObj, *GetViewData().GetDocument(), nTab);
                 }
             }
 
diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx
index 30396fcd2e5a..12170197a19e 100644
--- a/svx/source/svdraw/svdmark.cxx
+++ b/svx/source/svdraw/svdmark.cxx
@@ -285,9 +285,9 @@ void SdrMarkList::InsertEntry(const SdrMark& rMark, bool bChkSort)
     {
         SdrMark* pLast = GetMark(nCount - 1);
         const SdrObject* pLastObj = pLast->GetMarkedSdrObj();
-        const SdrObject* pNeuObj = rMark.GetMarkedSdrObj();
+        const SdrObject* pNewObj = rMark.GetMarkedSdrObj();
 
-        if(pLastObj == pNeuObj)
+        if(pLastObj == pNewObj)
         {
             // This one already exists.
             // Con1/Con2 Merging
@@ -304,14 +304,14 @@ void SdrMarkList::InsertEntry(const SdrMark& rMark, bool bChkSort)
 
             // now check if the sort is ok
             const SdrObjList* pLastOL = pLastObj!=nullptr ? pLastObj->GetObjList() : nullptr;
-            const SdrObjList* pNeuOL = pNeuObj !=nullptr ? pNeuObj ->GetObjList() : nullptr;
+            const SdrObjList* pNeuOL = pNewObj !=nullptr ? pNewObj ->GetObjList() : nullptr;
 
             if(pLastOL == pNeuOL)
             {
                 const sal_uLong nLastNum(pLastObj!=nullptr ? pLastObj->GetOrdNum() : 0);
-                const sal_uLong nNeuNum(pNeuObj !=nullptr ? pNeuObj ->GetOrdNum() : 0);
+                const sal_uLong nNewNum(pNewObj !=nullptr ? pNewObj ->GetOrdNum() : 0);
 
-                if(nNeuNum < nLastNum)
+                if(nNewNum < nLastNum)
                 {
                     // at some point, we have to sort
                     mbSorted = false;
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 72afa042efae..8981e4c415ff 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -1683,14 +1683,14 @@ void SdrModel::Merge(SdrModel& rSourceModel,
 
                     if (bMergeMasterPages)
                     {
-                        sal_uInt16 nNeuNum(0xFFFF);
+                        sal_uInt16 nNewNum(0xFFFF);
 
                         if(pMasterMap)
                         {
-                            nNeuNum = pMasterMap[nMaPgNum];
+                            nNewNum = pMasterMap[nMaPgNum];
                         }
 
-                        if(nNeuNum != 0xFFFF)
+                        if(nNewNum != 0xFFFF)
                         {
                             // tdf#90357 here pPg and the to-be-set new masterpage are parts of the new model
                             // already, but the currently set masterpage is part of the old model. Remove master
@@ -1705,9 +1705,9 @@ void SdrModel::Merge(SdrModel& rSourceModel,
                                 AddUndo(GetSdrUndoFactory().CreateUndoPageChangeMasterPage(*pPg));
                             }
 
-                            pPg->TRG_SetMasterPage(*GetMasterPage(nNeuNum));
+                            pPg->TRG_SetMasterPage(*GetMasterPage(nNewNum));
                         }
-                        DBG_ASSERT(nNeuNum!=0xFFFF,"SdrModel::Merge(): Something is crooked with the mapping of the MasterPages.");
+                        DBG_ASSERT(nNewNum!=0xFFFF,"SdrModel::Merge(): Something is crooked with the mapping of the MasterPages.");
                     } else {
                         if (nMaPgNum>=nDstMasterPageAnz) {
                             // This is outside of the original area of the MasterPage of the DstModel.
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index 9d259ab4f319..ec0b23ea94ba 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -366,14 +366,14 @@ void SdrPolyEditView::RipUpAtMarkedPoints()
             for(SdrUShortCont::const_reverse_iterator it = rPts.rbegin(); it != rPts.rend(); ++it)
             {
                 sal_uInt32 nNewPt0Idx(0L);
-                SdrObject* pNeuObj = pObj->RipPoint(*it, nNewPt0Idx);
+                SdrObject* pNewObj = pObj->RipPoint(*it, nNewPt0Idx);
 
-                if(pNeuObj)
+                if(pNewObj)
                 {
-                    pM->GetPageView()->GetObjList()->InsertObject(pNeuObj, pObj->GetOrdNum() + 1);
+                    pM->GetPageView()->GetObjList()->InsertObject(pNewObj, pObj->GetOrdNum() + 1);
                     if( bUndo )
-                        AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pNeuObj));
-                    MarkObj(pNeuObj, pM->GetPageView(), false, true);
+                        AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pNewObj));
+                    MarkObj(pNewObj, pM->GetPageView(), false, true);
                 }
 
                 if(nNewPt0Idx)
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 8380f0cf8e40..5eba805c6834 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -1344,7 +1344,7 @@ OUString SdrUndoDelLayer::GetComment() const
 
 void SdrUndoMoveLayer::Undo()
 {
-    SdrLayer* pCmpLayer= pLayerAdmin->RemoveLayer(nNeuPos);
+    SdrLayer* pCmpLayer= pLayerAdmin->RemoveLayer(nNewPos);
     DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoMoveLayer::Undo(): Removed layer is != pLayer.");
     pLayerAdmin->InsertLayer(pLayer,nNum);
 }
@@ -1353,7 +1353,7 @@ void SdrUndoMoveLayer::Redo()
 {
     SdrLayer* pCmpLayer= pLayerAdmin->RemoveLayer(nNum);
     DBG_ASSERT(pCmpLayer==pLayer,"SdrUndoMoveLayer::Redo(): Removed layer is != pLayer.");
-    pLayerAdmin->InsertLayer(pLayer,nNeuPos);
+    pLayerAdmin->InsertLayer(pLayer,nNewPos);
 }
 
 OUString SdrUndoMoveLayer::GetComment() const
@@ -1835,9 +1835,9 @@ SdrUndoAction* SdrUndoFactory::CreateUndoDeleteLayer(sal_uInt16 nLayerNum, SdrLa
     return new SdrUndoDelLayer( nLayerNum, rNewLayerAdmin, rNewModel );
 }
 
-SdrUndoAction* SdrUndoFactory::CreateUndoMoveLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel, sal_uInt16 nNeuPos1)
+SdrUndoAction* SdrUndoFactory::CreateUndoMoveLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel, sal_uInt16 nNewPos1)
 {
-    return new SdrUndoMoveLayer( nLayerNum, rNewLayerAdmin, rNewModel, nNeuPos1 );
+    return new SdrUndoMoveLayer( nLayerNum, rNewLayerAdmin, rNewModel, nNewPos1 );
 }
 
 // page
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 0b0904ac70cb..3a440970b953 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -299,22 +299,22 @@ bool SdrExchangeView::Paste(
         {
             const SdrObject* pSrcOb=pSrcPg->GetObj(nOb);
 
-            SdrObject* pNeuObj = pSrcOb->Clone();
+            SdrObject* pNewObj = pSrcOb->Clone();
 
-            if (pNeuObj!=nullptr)
+            if (pNewObj!=nullptr)
             {
                 if(bResize)
                 {
-                    pNeuObj->GetModel()->SetPasteResize(true);
-                    pNeuObj->NbcResize(aPt0,aXResize,aYResize);
-                    pNeuObj->GetModel()->SetPasteResize(false);
+                    pNewObj->GetModel()->SetPasteResize(true);
+                    pNewObj->NbcResize(aPt0,aXResize,aYResize);
+                    pNewObj->GetModel()->SetPasteResize(false);
                 }
 
                 // #i39861#
-                pNeuObj->SetModel(pDstLst->GetModel());
-                pNeuObj->SetPage(pDstLst->GetPage());
+                pNewObj->SetModel(pDstLst->GetModel());
+                pNewObj->SetPage(pDstLst->GetPage());
 
-                pNeuObj->NbcMove(aSiz);
+                pNewObj->NbcMove(aSiz);
 
                 const SdrPage* pPg = pDstLst->GetPage();
 
@@ -324,7 +324,7 @@ bool SdrExchangeView::Paste(
                     const SdrLayerAdmin& rAd = pPg->GetLayerAdmin();
                     SdrLayerID nLayer(0);
 
-                    if(dynamic_cast<const FmFormObj*>( pNeuObj) !=  nullptr)
+                    if(dynamic_cast<const FmFormObj*>( pNewObj) !=  nullptr)
                     {
                         // for FormControls, force to form layer
                         nLayer = rAd.GetLayerID(rAd.GetControlLayerName());
@@ -339,22 +339,22 @@ bool SdrExchangeView::Paste(
                         nLayer = SdrLayerID(0);
                     }
 
-                    pNeuObj->SetLayer(nLayer);
+                    pNewObj->SetLayer(nLayer);
                 }
 
-                pDstLst->InsertObject(pNeuObj, SAL_MAX_SIZE);
+                pDstLst->InsertObject(pNewObj, SAL_MAX_SIZE);
 
                 if( bUndo )
-                    AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pNeuObj));
+                    AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pNewObj));
 
                 if (bMark) {
                     // Don't already set Markhandles!
                     // That is instead being done by ModelHasChanged in MarkView.
-                    MarkObj(pNeuObj,pMarkPV,false,true);
+                    MarkObj(pNewObj,pMarkPV,false,true);
                 }
 
                 // #i13033#
-                aCloneList.AddPair(pSrcOb, pNeuObj);
+                aCloneList.AddPair(pSrcOb, pNewObj);
             }
             else
             {
@@ -731,27 +731,27 @@ SdrModel* SdrExchangeView::GetMarkedObjModel() const
 
         for(SdrObject* pObj : aSdrObjects)
         {
-            SdrObject*          pNeuObj;
+            SdrObject*          pNewObj;
 
             if( dynamic_cast<const SdrPageObj*>( pObj) !=  nullptr )
             {
                 // convert SdrPageObj's to a graphic representation, because
                 // virtual connection to referenced page gets lost in new model
-                pNeuObj = new SdrGrafObj( GetObjGraphic( mpModel, pObj ), pObj->GetLogicRect() );
-                pNeuObj->SetPage( pNeuPag );
-                pNeuObj->SetModel( pNeuMod );
+                pNewObj = new SdrGrafObj( GetObjGraphic( mpModel, pObj ), pObj->GetLogicRect() );
+                pNewObj->SetPage( pNeuPag );
+                pNewObj->SetModel( pNeuMod );
             }
             else
             {
-                pNeuObj = pObj->Clone();
-                pNeuObj->SetPage( pNeuPag );
-                pNeuObj->SetModel( pNeuMod );
+                pNewObj = pObj->Clone();
+                pNewObj->SetPage( pNeuPag );
+                pNewObj->SetModel( pNeuMod );
             }
 
-            pNeuPag->InsertObject(pNeuObj, SAL_MAX_SIZE);
+            pNeuPag->InsertObject(pNewObj, SAL_MAX_SIZE);
 
             // #i13033#
-            aCloneList.AddPair(pObj, pNeuObj);
+            aCloneList.AddPair(pObj, pNewObj);
         }
 
         // #i13033#
commit 9be706e34a8d62e1c94bd82df44b8602a97d2b2a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jun 26 11:29:39 2017 +0200

    nTransparency of type sal_Int16
    
    regression introduced with ac2d415a52f22caf0012b7d9b17d015aca27db9d
    "loplugin:oncevar in sc"
    
    Change-Id: I521053a59bb16c78d97129e4de5ebbf4820d6640

diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx
index 638c65f981c5..07fa32091e78 100644
--- a/sc/source/filter/excel/xlchart.cxx
+++ b/sc/source/filter/excel/xlchart.cxx
@@ -1003,7 +1003,7 @@ void XclChPropSetHelper::WriteAreaProperties( ScfPropertySet& rPropSet,
     // write the properties
     ScfPropSetHelper& rAreaHlp = GetAreaHelper( ePropMode );
     rAreaHlp.InitializeWrite();
-    rAreaHlp << eFillStyle << aColor << 0/*nTransparency*/;
+    rAreaHlp << eFillStyle << aColor << sal_Int16(0)/*nTransparency*/;
     rAreaHlp.WriteToPropertySet( rPropSet );
 }
 
commit ef151d297c4c490d8694e14f8f556b56cad3325a
Author: Bernhard Widl <bernhard.widl at cib.de>
Date:   Mon Jun 19 19:04:03 2017 +0200

    fdo#43157 convert OSL_ASSERT to assert in sw/source/core
    
    Change-Id: I6ffd9832ff1085c84fde8763045f3d1cb02137e2
    Reviewed-on: https://gerrit.libreoffice.org/38974
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 85add0f5807a..ccda215a50bd 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -1312,7 +1312,7 @@ namespace
                                 double& rVal,
                                 const LocaleDataWrapper* const pLclData )
     {
-        OSL_ASSERT(pLclData);
+        assert(pLclData);
         const sal_Unicode nCurrCmdPos = rCommandPos;
         rtl_math_ConversionStatus eStatus;
         const sal_Unicode* pEnd;
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 0a7bbc55edee..9abc001f9530 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -2334,8 +2334,8 @@ int CommonSubseq::FindLCS( int *pLcs1, int *pLcs2, int nStt1, int nEnd1,
     int nLen1 = nEnd1 ? nEnd1 - nStt1 : rCmp.GetLen1();
     int nLen2 = nEnd2 ? nEnd2 - nStt2 : rCmp.GetLen2();
 
-    OSL_ASSERT( nLen1 >= 0 );
-    OSL_ASSERT( nLen2 >= 0 );
+    assert( nLen1 >= 0 );
+    assert( nLen2 >= 0 );
 
     std::unique_ptr<int*[]> pLcs( new int*[ nLen1 + 1 ] );
     pLcs[ 0 ] = pData.get();
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index c08c8b4f23cd..e4e9bcde3719 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -78,7 +78,7 @@ OUString SwNumRule::GetOutlineRuleName()
 
 const SwNumFormat& SwNumRule::Get( sal_uInt16 i ) const
 {
-    OSL_ASSERT( i < MAXLEVEL && meRuleType < RULE_END );
+    assert( i < MAXLEVEL && meRuleType < RULE_END );
     return maFormats[ i ]
            ? *maFormats[ i ]
            : ( meDefaultNumberFormatPositionAndSpaceMode == SvxNumberFormat::LABEL_WIDTH_AND_POSITION
@@ -90,7 +90,7 @@ const SwNumFormat* SwNumRule::GetNumFormat( sal_uInt16 i ) const
 {
     const SwNumFormat * pResult = nullptr;
 
-    OSL_ASSERT( i < MAXLEVEL && meRuleType < RULE_END );
+    assert( i < MAXLEVEL && meRuleType < RULE_END );
     if ( i < MAXLEVEL && meRuleType < RULE_END)
     {
         pResult = maFormats[ i ];
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index d6ceddd2a889..efed71ca8367 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -2295,7 +2295,7 @@ TableMergeErr SwDoc::MergeTable( SwPaM& rPam )
                 if (pU && pU->GetRedlSaveCount())
                 {
                     SwEditShell *const pEditShell(GetEditShell());
-                    OSL_ASSERT(pEditShell);
+                    assert(pEditShell);
                     ::sw::UndoRedoContext context(*this, *pEditShell);
                     static_cast<SfxUndoAction *>(pU)->UndoWithContext(context);
                 }
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index 70f9541ccb04..ef503f3187f4 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -97,7 +97,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 )
 
 SwPaM& SwPamRanges::SetPam( size_t nArrPos, SwPaM& rPam )
 {
-    OSL_ASSERT( nArrPos < Count() );
+    assert( nArrPos < Count() );
     const SwPamRange& rTmp = maVector[ nArrPos ];
     rPam.GetPoint()->nNode = rTmp.nStart;
     rPam.GetPoint()->nContent.Assign( rPam.GetContentNode(), 0 );
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 4651be86e9ea..f5cc213155a2 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -549,7 +549,7 @@ SwHistoryTextFlyCnt::~SwHistoryTextFlyCnt()
 void SwHistoryTextFlyCnt::SetInDoc( SwDoc* pDoc, bool )
 {
     ::sw::IShellCursorSupplier *const pISCS(pDoc->GetIShellCursorSupplier());
-    OSL_ASSERT(pISCS);
+    assert(pISCS);
     ::sw::UndoRedoContext context(*pDoc, *pISCS);
     m_pUndo->UndoImpl(context);
 }
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index c70a3ccc4d2c..a4e2df354c86 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -2454,7 +2454,7 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext)
                     dynamic_cast<SwUndoDelete*>(pEntry->pUndo.get());
                 SwUndoRedlineDelete *const pUndoRedlineDelete =
                     dynamic_cast<SwUndoRedlineDelete*>(pEntry->pUndo.get());
-                OSL_ASSERT(pUndoDelete || pUndoRedlineDelete);
+                assert(pUndoDelete || pUndoRedlineDelete);
                 if (pUndoRedlineDelete)
                 {
                     // The old content was not empty or he has been merged with the new content
diff --git a/sw/source/core/unocore/XMLRangeHelper.cxx b/sw/source/core/unocore/XMLRangeHelper.cxx
index 3c4b828f58d1..d837d841fbb9 100644
--- a/sw/source/core/unocore/XMLRangeHelper.cxx
+++ b/sw/source/core/unocore/XMLRangeHelper.cxx
@@ -72,7 +72,7 @@ private:
 
 void lcl_getXMLStringForCell( const /*::chart::*/XMLRangeHelper::Cell & rCell, OUStringBuffer * output )
 {
-    OSL_ASSERT(output != nullptr);
+    assert(output != nullptr);
 
     if( rCell.empty())
         return;
diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx
index f55770676715..6574c92ff75c 100644
--- a/sw/source/core/unocore/unobkm.cxx
+++ b/sw/source/core/unocore/unobkm.cxx
@@ -602,7 +602,7 @@ SwXFieldmark::getCheckboxFieldmark()
     {
         // evil #TODO #FIXME casting away the const-ness
         pCheckboxFm = const_cast<sw::mark::ICheckboxFieldmark*>(dynamic_cast< const ::sw::mark::ICheckboxFieldmark* >( GetBookmark()));
-        OSL_ASSERT( GetBookmark() == nullptr || pCheckboxFm != nullptr );
+        assert( GetBookmark() == nullptr || pCheckboxFm != nullptr );
             // unclear to me whether GetBookmark() can be null here
     }
     return  pCheckboxFm;
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 91ee7438b020..0622012c867e 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -293,7 +293,7 @@ GetNestedTextContent(SwTextNode & rTextNode, sal_Int32 const nIndex,
     {
         ::sw::Meta *const pMeta(
             static_cast<SwFormatMeta &>(pTextAttr->GetAttr()).GetMeta());
-        OSL_ASSERT(pMeta);
+        assert(pMeta);
         xRet.set(pMeta->MakeUnoObject(), uno::UNO_QUERY);
     }
     return xRet;
diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx
index d77a8f7b8547..2d615bc0c1be 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -471,7 +471,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaAfter(co
         return xRet;
 
     const uno::Reference<lang::XUnoTunnel> xFPTunnel(xPara, uno::UNO_QUERY);
-    OSL_ASSERT(xFPTunnel.is());
+    SAL_WARN_IF(!xFPTunnel.is(), "sw.core", "invalid argument");
     SwXFlatParagraph* const pFlatParagraph(sw::UnoTunnelGetImplementation<SwXFlatParagraph>(xFPTunnel));
 
     if ( !pFlatParagraph )
@@ -516,7 +516,8 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(c
         return xRet;
 
     const uno::Reference<lang::XUnoTunnel> xFPTunnel(xPara, uno::UNO_QUERY);
-    OSL_ASSERT(xFPTunnel.is());
+
+    SAL_WARN_IF(!xFPTunnel.is(), "sw.core", "invalid argument");
     SwXFlatParagraph* const pFlatParagraph(sw::UnoTunnelGetImplementation<SwXFlatParagraph>(xFPTunnel));
 
     if ( !pFlatParagraph )
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 123f4405fa40..926d114d34c0 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -1972,7 +1972,7 @@ void SwXDocumentIndexMark::Impl::InsertTOXMark(
         std::vector<SwTextAttr *>::const_iterator const iter(
             std::find_if(newMarks.begin(), newMarks.end(),
                 NotContainedIn<SwTextAttr *>(oldMarks)));
-        OSL_ASSERT(newMarks.end() != iter);
+        assert(newMarks.end() != iter);
         if (newMarks.end() != iter)
         {
             pTextAttr = *iter;
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index a9a4df177278..675b98813150 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -254,7 +254,7 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
         std::vector<SwTextAttr *>::const_iterator const iter(
             std::find_if(newMarks.begin(), newMarks.end(),
                 NotContainedIn<SwTextAttr *>(oldMarks)));
-        OSL_ASSERT(newMarks.end() != iter);
+        assert(newMarks.end() != iter);
         if (newMarks.end() != iter)
         {
             pTextAttr = *iter;
@@ -263,7 +263,7 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam,
     else
     {
         SwTextNode *pTextNd = rPam.GetNode().GetTextNode();
-        OSL_ASSERT(pTextNd);
+        assert(pTextNd);
         pTextAttr = pTextNd ? rPam.GetNode().GetTextNode()->GetTextAttrForCharAt(
                 rPam.GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_REFMARK) : nullptr;
     }
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 830575f7d37b..68c319125969 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1664,7 +1664,7 @@ SwXText::convertToTextFrame(
         }
 
         SwTextNode *const pTextNode(aStartPam.GetNode().GetTextNode());
-        OSL_ASSERT(pTextNode);
+        assert(pTextNode);
         if (!pTextNode || !pTextNode->Len()) // don't remove if it contains text!
         {
             {   // has to be in a block to remove the SwIndexes before
commit 7850e70d5e98bbfeb536d9644b618d0782da30a6
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jun 26 11:23:00 2017 +0200

    Write 0 of type 'unsigned char'
    
    regression introduced with ac2d415a52f22caf0012b7d9b17d015aca27db9d
    "loplugin:oncevar in sc"
    
    Change-Id: I1073e7e8b67ddf1dd633f004322c6bc46b9a8052

diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 6f7a57db4967..93c9cf4f11ba 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -1587,7 +1587,7 @@ void XclExpSheetProtectOptions::WriteBody( XclExpStream& rStrm )
     rStrm << nBytes;
 
     for (int i = 0; i < 9; ++i)
-        rStrm << sal_Int32(0);
+        rStrm << static_cast<unsigned char>(0);
 
     nBytes = 0x0200;
     rStrm << nBytes;
commit 213472319d26c5b3edb463837c901b45b1fa8674
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Jun 26 11:13:52 2017 +0200

    Fix int (sal_Int32) ambiguity
    
    Change-Id: I32afd77a851da180d91011fa424a88be5871e8f7

diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index ed8bb5e8cdda..6f7a57db4967 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -1587,7 +1587,7 @@ void XclExpSheetProtectOptions::WriteBody( XclExpStream& rStrm )
     rStrm << nBytes;
 
     for (int i = 0; i < 9; ++i)
-        rStrm << 0;
+        rStrm << sal_Int32(0);
 
     nBytes = 0x0200;
     rStrm << nBytes;
commit b59b4a38b45e1bf158701355c8c70f1c59f3e112
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Sun Jun 25 19:10:54 2017 +0200

    loplugin:oncevar in sd
    
    Change-Id: I56649b4df8c517f152ed4e9132985bbef22f8634
    Reviewed-on: https://gerrit.libreoffice.org/39241
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sd/qa/unit/SVGExportTests.cxx b/sd/qa/unit/SVGExportTests.cxx
index d241822caecc..c976436a6f89 100644
--- a/sd/qa/unit/SVGExportTests.cxx
+++ b/sd/qa/unit/SVGExportTests.cxx
@@ -57,8 +57,7 @@ protected:
     {
         uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
         utl::MediaDescriptor aMediaDescriptor;
-        OUString aFilterName("impress_svg_Export");
-        aMediaDescriptor["FilterName"] <<= aFilterName;
+        aMediaDescriptor["FilterName"] <<= OUString("impress_svg_Export");
         xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
     }
 
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 73e89b3d13ff..6f75439da31e 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -284,7 +284,7 @@ void SdImportTest::testDocumentLayout()
 
     for ( int i = 0; i < static_cast< int >( SAL_N_ELEMENTS( aFilesToCompare ) ); ++i )
     {
-        int nUpdateMe = -1; // index of test we want to update; supposedly only when the test is created
+        int const nUpdateMe = -1; // index of test we want to update; supposedly only when the test is created
 
         sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc( "/sd/qa/unit/data/" ) + OUString::createFromAscii( aFilesToCompare[i].pInput ), aFilesToCompare[i].nFormat );
         if( aFilesToCompare[i].nExportType >= 0 )
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index d4290d037a27..5bc477b0f535 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -539,11 +539,9 @@ void SdDrawDocument::CreateDefaultCellStyles()
 
     // ---- Default -----------------------------------------------
 
-    sal_uInt16 nMask = SFXSTYLEBIT_AUTO;
-
     OUString aDefaultCellStyleName( "default" );
 
-    pSheet = &(pSSPool->Make(aDefaultCellStyleName, SD_STYLE_FAMILY_CELL, nMask));
+    pSheet = &(pSSPool->Make(aDefaultCellStyleName, SD_STYLE_FAMILY_CELL, SFXSTYLEBIT_AUTO));
     pSheet->SetHelpId( aHelpFile, HID_SD_CELL_STYLE_DEFAULT );
     SfxItemSet& rISet = pSheet->GetItemSet();
 
diff --git a/sd/source/core/pglink.cxx b/sd/source/core/pglink.cxx
index 4e4c3739f6d4..5babf1791088 100644
--- a/sd/source/core/pglink.cxx
+++ b/sd/source/core/pglink.cxx
@@ -91,8 +91,6 @@ SdPageLink::~SdPageLink()
             std::vector<OUString> aBookmarkList;
             aBookmarkList.push_back(aBookmarkName);
             sal_uInt16 nInsertPos = pPage->GetPageNum();
-            bool bLink = true;
-            bool bReplace = true;
             bool bNoDialogs = false;
             bool bCopy = false;
 
@@ -103,7 +101,7 @@ SdPageLink::~SdPageLink()
                 bCopy = true;
             }
 
-            pDoc->InsertBookmarkAsPage(aBookmarkList, nullptr, bLink, bReplace,
+            pDoc->InsertBookmarkAsPage(aBookmarkList, nullptr, true/*bLink*/, true/*bReplace*/,
                                        nInsertPos, bNoDialogs, nullptr, bCopy, true, true);
 
             if (!SdDrawDocument::s_pDocLockedInsertingLinks)
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 1af632010fe6..e28162b9e786 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1943,11 +1943,8 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rN
                         /**********************************************************
                         * presentation template: adjust test height
                         **********************************************************/
-                        sal_uInt16 nIndexTitle = 0;
-                        sal_uInt16 nIndexOutline = 0;
-                        sal_uInt16 nIndexNotes = 0;
 
-                        if (pObj == GetPresObj(PRESOBJ_TITLE, nIndexTitle))
+                        if (pObj == GetPresObj(PRESOBJ_TITLE, 0))
                         {
                             SfxStyleSheet* pTitleSheet = GetStyleSheetForPresObj(PRESOBJ_TITLE);
 
@@ -1979,7 +1976,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rN
                                 pTitleSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
                             }
                         }
-                        else if (pObj == GetPresObj(PRESOBJ_OUTLINE, nIndexOutline))
+                        else if (pObj == GetPresObj(PRESOBJ_OUTLINE, 0))
                         {
                             OUString aName(GetLayoutName());
                             aName += " ";
@@ -2040,7 +2037,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rN
                                 }
                             }
                         }
-                        else if (pObj == GetPresObj(PRESOBJ_NOTES, nIndexNotes))
+                        else if (pObj == GetPresObj(PRESOBJ_NOTES, 0))
                         {
                             SfxStyleSheet* pNotesSheet = GetStyleSheetForPresObj(PRESOBJ_NOTES);
 
@@ -2556,8 +2553,7 @@ void SdPage::SetLayoutName(const OUString& aName)
 
     if( mbMaster )
     {
-        OUString aSep(SD_LT_SEPARATOR);
-        sal_Int32 nPos = maLayoutName.indexOf(aSep);
+        sal_Int32 nPos = maLayoutName.indexOf(SD_LT_SEPARATOR);
         if (nPos != -1)
             FmFormPage::SetName(maLayoutName.copy(0, nPos));
     }
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 396f58a9000b..6cbbe54b5d2e 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -796,10 +796,9 @@ void SdStyleSheetPool::CopyLayoutSheets(const OUString& rLayoutName, SdStyleShee
 void SdStyleSheetPool::CreateLayoutSheetNames(const OUString& rLayoutName, std::vector<OUString> &aNameList)
 {
     OUString aPrefix(rLayoutName + SD_LT_SEPARATOR);
-    OUString aName(STR_LAYOUT_OUTLINE);
 
     for (sal_Int32 nLevel = 1; nLevel < 10; nLevel++)
-        aNameList.push_back( aPrefix + aName + " " + OUString::number( nLevel ) );
+        aNameList.push_back( aPrefix + STR_LAYOUT_OUTLINE " " + OUString::number( nLevel ) );
 
     aNameList.push_back(aPrefix + STR_LAYOUT_TITLE);
     aNameList.push_back(aPrefix + STR_LAYOUT_SUBTITLE);
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 0cfc22087dbe..8f7430a8cdd2 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -674,12 +674,11 @@ void SdStyleSheet::throwIfDisposed()
 
 SdStyleSheet* SdStyleSheet::CreateEmptyUserStyle( SfxStyleSheetBasePool& rPool, SfxStyleFamily eFamily )
 {
-    OUString aPrefix( "user" );
     OUString aName;
     sal_Int32 nIndex = 1;
     do
     {
-        aName = aPrefix + OUString::number( nIndex++ );
+        aName = "user" + OUString::number( nIndex++ );
     }
     while( rPool.Find( aName, eFamily ) != nullptr );
 
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 4e13e21646a2..5cb6a87a518f 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -759,8 +759,8 @@ bool PPTWriter::ImplCreateDocument()
             if ( mXPropSet.is() )
             {
                 OUString aCustomShow;
-                sal_uInt32  nPenColor = 0x1000000;
-                sal_Int32   nRestartTime = 0x7fffffff;
+                sal_uInt32 const nPenColor = 0x1000000;
+                sal_Int32 const  nRestartTime = 0x7fffffff;
                 sal_Int16   nStartSlide = 0;
                 sal_Int16   nEndSlide = 0;
                 sal_uInt32  nFlags = 0;             // Bit 0:   Auto advance
@@ -943,7 +943,7 @@ void PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm )
         sal_Int32 nUrlLen = pIter->aURL.getLength();
         const OUString& rUrl = pIter->aURL;
 
-        sal_uInt32 nInfo = 7;
+        sal_uInt32 const nInfo = 7;
 
         rStrm  .WriteUInt32( 3 )    // Type VT_I4
                .WriteUInt32( nInfo );       // Info
@@ -1261,13 +1261,12 @@ void PPTWriter::ImplWriteOLE( )
                         aOleExport.ExportOLEObject( xObj, *xTempStorage );
 
                         //TODO/MBA: testing
-                        OUString aPersistStream( SVEXT_PERSIST_STREAM );
                         SvMemoryStream aStream;
                         tools::SvRef<SotStorage> xCleanStorage( new SotStorage( false, aStream ) );
                         xTempStorage->CopyTo( xCleanStorage.get() );
                         // create a dummy content stream, the dummy content is necessary for ppt, but not for
                         // doc files, so we can't share code.
-                        tools::SvRef<SotStorageStream> xStm = xCleanStorage->OpenSotStream( aPersistStream );
+                        tools::SvRef<SotStorageStream> xStm = xCleanStorage->OpenSotStream( SVEXT_PERSIST_STREAM );
                         xStm->WriteUInt32( 0 )        // no ClipboardId
                                .WriteUInt32( 4 )        // no target device
                                .WriteUInt32( 1 )        // aspect ratio
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index fb33823500dc..d087e82397ae 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -171,8 +171,8 @@ sal_uInt32 PPTWriter::ImplSlideViewInfoContainer( sal_uInt32 nInstance, SvStream
     if ( pStrm )
     {
         sal_uInt8 bShowGuides = 0;
-        sal_uInt8 bSnapToGrid = 1;
-        sal_uInt8 bSnapToShape = 0;
+        sal_uInt8 const bSnapToGrid = 1;
+        sal_uInt8 const bSnapToShape = 0;
 
         sal_Int32 nScaling = 85;
         sal_Int32 nMasterCoordinate = 0xdda;
@@ -477,8 +477,8 @@ bool PPTWriter::ImplCloseDocument()
                 mpStrm->WriteUInt16( nUniCode );
             }
             sal_uInt8   lfCharSet = ANSI_CHARSET;
-            sal_uInt8   lfClipPrecision = 0;
-            sal_uInt8   lfQuality = 6;
+            sal_uInt8 const lfClipPrecision = 0;
+            sal_uInt8 const lfQuality = 6;
             sal_uInt8   lfPitchAndFamily = 0;
 
             if ( pDesc->CharSet == RTL_TEXTENCODING_SYMBOL )
@@ -1382,9 +1382,9 @@ void PPTWriter::ImplWriteClickAction( SvStream& rSt, css::presentation::ClickAct
     sal_uInt32 nSoundRef = 0;   // a reference to a sound in the sound collection, or NULL.
     sal_uInt32 nHyperLinkID = 0;// a persistent unique identifier to an external hyperlink object (only valid when action == HyperlinkAction).
     sal_uInt8   nAction = 0;     // Action See Action Table
-    sal_uInt8   nOleVerb = 0;    // OleVerb Only valid when action == OLEAction. OLE verb to use, 0 = first verb, 1 = second verb, etc.
+    sal_uInt8   const nOleVerb = 0;    // OleVerb Only valid when action == OLEAction. OLE verb to use, 0 = first verb, 1 = second verb, etc.
     sal_uInt8   nJump = 0;       // Jump See Jump Table
-    sal_uInt8   nFlags = 0;      // Bit 1: Animated. If 1, then button is animated
+    sal_uInt8   const nFlags = 0;      // Bit 1: Animated. If 1, then button is animated
                             // Bit 2: Stop sound. If 1, then stop current sound when button is pressed.
                             // Bit 3: CustomShowReturn. If 1, and this is a jump to custom show, then return to this slide after custom show.
     sal_uInt8   nHyperLinkType = 0;// HyperlinkType a value from the LinkTo enum, such as LT_URL (only valid when action == HyperlinkAction).
@@ -1637,12 +1637,12 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
     // #i119551# PPT does not support groups of polygons and text (MS patch KB2289187)
     // sal_uInt32  nGroupLevel = 0;
 
-    sal_uInt32  nInstance, nGroups, nShapes, nShapeCount, nPer, nLastPer, nIndices, nOlePictureId;
+    sal_uInt32  nGroups, nShapes, nShapeCount, nPer, nLastPer, nIndices, nOlePictureId;
     css::awt::Point   aTextRefPoint;
 
     ResetGroupTable( nShapes = mXShapes->getCount() );
 
-    nIndices = nInstance = nLastPer = nShapeCount = 0;
+    nIndices = nLastPer = nShapeCount = 0;
 
     bool bIsTitlePossible = true;           // powerpoint is not able to handle more than one title
 
@@ -2017,7 +2017,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
                 nOlePictureId = mnExEmbed;
 
                 mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
-                sal_uInt32 nSpFlags = SHAPEFLAG_HAVESPT | SHAPEFLAG_HAVEANCHOR | SHAPEFLAG_OLESHAPE;
+                sal_uInt32 const nSpFlags = SHAPEFLAG_HAVESPT | SHAPEFLAG_HAVEANCHOR | SHAPEFLAG_OLESHAPE;
                 ImplCreateShape( ESCHER_ShpInst_HostControl, nSpFlags, aSolverContainer );
                 if ( aPropOpt.CreateGraphicProperties( mXPropSet, "MetaFile", false  ) )
                     aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 );
@@ -3308,7 +3308,7 @@ void TextObjBinary::WriteTextSpecInfo( SvStream* pStrm )
             {
                 const PortionObj& rPortion = *(*it).get();
                 sal_Int32 nPortionSize = rPortion.mnTextSize >= nCharactersLeft ? nCharactersLeft : rPortion.mnTextSize;
-                sal_Int32 nFlags = 7;
+                sal_Int32 const nFlags = 7;
                 nCharactersLeft -= nPortionSize;
                 pStrm ->WriteUInt32( nPortionSize )
                        .WriteInt32( nFlags )
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index 35157a49cedb..09f0c8b6bf33 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -684,11 +684,11 @@ void AnimationExporter::exportNode( SvStream& rStrm, Reference< XAnimationNode >
                         }
                         EscherExContainer aAnimateTargetElement( rStrm, DFF_msofbtAnimateTargetElement );
                         {
-                            sal_uInt32 nRefMode = 3;
-                            sal_uInt32 nRefType = 2;
+                            sal_uInt32 const nRefMode = 3;
+                            sal_uInt32 const nRefType = 2;
                             sal_uInt32 nRefId = mrExSoundCollection.GetId( aURL );
-                            sal_Int32 begin = -1;
-                            sal_Int32 end = -1;
+                            sal_Int32 const begin = -1;
+                            sal_Int32 const end = -1;
 
                             EscherExAtom aAnimReference( rStrm, DFF_msofbtAnimReference );
                             rStrm.WriteUInt32( nRefMode ).WriteUInt32( nRefType ).WriteUInt32( nRefId ).WriteInt32( begin ).WriteInt32( end );
@@ -1183,8 +1183,7 @@ bool AnimationExporter::exportAnimProperty( SvStream& rStrm, const sal_uInt16 nP
 void AnimationExporter::exportAnimPropertyString( SvStream& rStrm, const sal_uInt16 nPropertyId, const OUString& rVal, const TranslateMode eTranslateMode )
 {
     EscherExAtom aExAtom( rStrm, DFF_msofbtAnimAttributeValue, nPropertyId );
-    sal_uInt8 nType = DFF_ANIM_PROP_TYPE_UNISTRING;
-    rStrm.WriteUChar( nType );
+    rStrm.WriteUChar( DFF_ANIM_PROP_TYPE_UNISTRING );
     OUString aStr( rVal );
     if ( eTranslateMode != TRANSLATE_NONE )
         ImplTranslateAttribute( aStr, eTranslateMode );
@@ -1194,25 +1193,22 @@ void AnimationExporter::exportAnimPropertyString( SvStream& rStrm, const sal_uIn
 void AnimationExporter::exportAnimPropertyFloat( SvStream& rStrm, const sal_uInt16 nPropertyId, const double& rVal )
 {
     EscherExAtom aExAtom( rStrm, DFF_msofbtAnimAttributeValue, nPropertyId );
-    sal_uInt8 nType = DFF_ANIM_PROP_TYPE_FLOAT;
     float fFloat = (float)rVal;
-    rStrm.WriteUChar( nType )
+    rStrm.WriteUChar( DFF_ANIM_PROP_TYPE_FLOAT )
          .WriteFloat( fFloat );
 }
 
 void AnimationExporter::exportAnimPropertyuInt32( SvStream& rStrm, const sal_uInt16 nPropertyId, const sal_uInt32 nVal, const TranslateMode )
 {
     EscherExAtom aExAtom( rStrm, DFF_msofbtAnimAttributeValue, nPropertyId );
-    sal_uInt8 nType = DFF_ANIM_PROP_TYPE_INT32 ;
-    rStrm.WriteUChar( nType )
+    rStrm.WriteUChar( DFF_ANIM_PROP_TYPE_INT32 )
          .WriteUInt32( nVal );
 }
 
 void AnimationExporter::exportAnimPropertyByte( SvStream& rStrm, const sal_uInt16 nPropertyId, const sal_uInt8 nVal )
 {
     EscherExAtom aExAtom( rStrm, DFF_msofbtAnimAttributeValue, nPropertyId );
-    sal_uInt8 nType = DFF_ANIM_PROP_TYPE_BYTE;
-    rStrm.WriteUChar( nType )
+    rStrm.WriteUChar( DFF_ANIM_PROP_TYPE_BYTE )
          .WriteUChar( nVal );
 }
 
@@ -1228,11 +1224,11 @@ void AnimationExporter::exportAnimAction( SvStream& rStrm, const Reference< XAni
 {
     EscherExAtom aExAtom( rStrm, DFF_msofbtAnimAction );
 
-    sal_Int32 nConcurrent = 1;
-    sal_Int32 nNextAction = 1;
+    sal_Int32 const nConcurrent = 1;
+    sal_Int32 const nNextAction = 1;
     sal_Int32 nEndSync = 0;
-    sal_Int32 nU4 = 0;
-    sal_Int32 nU5 = 3;
+    sal_Int32 const nU4 = 0;
+    sal_Int32 const nU5 = 3;
 
     sal_Int16 nAnimationEndSync = 0;
     if ( xNode->getEndSync() >>= nAnimationEndSync )
@@ -1526,8 +1522,8 @@ void AnimationExporter::exportAnimateSet( SvStream& rStrm, const Reference< XAni
         EscherExContainer aAnimateSet( rStrm, DFF_msofbtAnimateSet, 0 );
         {
             EscherExAtom aAnimateSetData( rStrm, DFF_msofbtAnimateSetData );
-            sal_uInt32 nId1 = 1;            // ??
-            sal_uInt32 nId2 = 1;            // ??
+            sal_uInt32 const nId1 = 1;            // ??
+            sal_uInt32 const nId2 = 1;            // ??
             rStrm.WriteUInt32( nId1 ).WriteUInt32( nId2 );
         }
         Any aConvertedValue( convertAnimateValue( xSet->getTo(), xSet->getAttributeName() ) );
@@ -1643,7 +1639,7 @@ void AnimationExporter::exportAnimateTarget( SvStream& rStrm, const Reference< X
             sal_uInt32 nBits = 0;
             sal_uInt32 nAdditive = 0;
             sal_uInt32 nAccumulate = 0;
-            sal_uInt32 nTransformType = 0;
+            sal_uInt32 const nTransformType = 0;
             if ( xAnimate.is() )
             {
                 if ( !xAnimate->getAttributeName().isEmpty() )
@@ -1775,7 +1771,7 @@ void AnimationExporter::exportAnimateTargetElement( SvStream& rStrm, const Any&
         {
             EscherExAtom aAnimReference( rStrm, DFF_msofbtAnimReference );
 
-            sal_uInt32 nRefType = 1;    // TODO: nRefType == 2 -> Sound;
+            sal_uInt32 const nRefType = 1;    // TODO: nRefType == 2 -> Sound;
             sal_uInt32 nRefId = mrSolverContainer.GetShapeId( xShape );
 
             rStrm.WriteUInt32( nRefMode )
@@ -1851,7 +1847,7 @@ void AnimationExporter::exportAnimValue( SvStream& rStrm, const Reference< XAnim
     if ( fRepeatCount != 0.0 )
     {
         EscherExAtom aExAtom( rStrm, DFF_msofbtAnimValue );
-        sal_uInt32 nType = 0;
+        sal_uInt32 const nType = 0;
         rStrm.WriteUInt32( nType )
              .WriteFloat( fRepeatCount );
     }
@@ -1860,7 +1856,7 @@ void AnimationExporter::exportAnimValue( SvStream& rStrm, const Reference< XAnim
     if ( bExportAlways || ( fAccelerate != 0.0 ) )
     {
         EscherExAtom aExAtom( rStrm, DFF_msofbtAnimValue );
-        sal_uInt32 nType = 3;
+        sal_uInt32 const nType = 3;
         rStrm.WriteUInt32( nType )
              .WriteFloat( fAccelerate );
     }
@@ -1870,7 +1866,7 @@ void AnimationExporter::exportAnimValue( SvStream& rStrm, const Reference< XAnim
     if ( bExportAlways || ( fDecelerate != 0.0 ) )
     {
         EscherExAtom aExAtom( rStrm, DFF_msofbtAnimValue );
-        sal_uInt32 nType = 4;
+        sal_uInt32 const nType = 4;
         rStrm.WriteUInt32( nType )
              .WriteFloat( fDecelerate );
     }
@@ -1880,7 +1876,7 @@ void AnimationExporter::exportAnimValue( SvStream& rStrm, const Reference< XAnim
     if ( bExportAlways || bAutoReverse )
     {
         EscherExAtom aExAtom( rStrm, DFF_msofbtAnimValue );
-        sal_uInt32 nType = 5;
+        sal_uInt32 const nType = 5;
         sal_uInt32 nVal  = bAutoReverse ? 1 : 0;
         rStrm.WriteUInt32( nType )
              .WriteUInt32( nVal );
@@ -1895,8 +1891,8 @@ void AnimationExporter::exportTransitionFilter( SvStream& rStrm, const Reference
         EscherExContainer aAnimateFilter( rStrm, DFF_msofbtAnimateFilter );
         {
             EscherExAtom aAnimateFilterData( rStrm, DFF_msofbtAnimateFilterData );
-            sal_uInt32 nBits = 3;       // bit 0 -> use AnimAttributeValue
-                                        // bit 1 -> use nTransition
+            sal_uInt32 const nBits = 3;       // bit 0 -> use AnimAttributeValue
+                                              // bit 1 -> use nTransition
 
             sal_uInt32 nTransition = xFilter->getMode() ? 0 : 1;
             rStrm.WriteUInt32( nBits )
@@ -1921,14 +1917,14 @@ void AnimationExporter::exportAnimateMotion( SvStream& rStrm, const Reference< X
         {
             {   //SJ: Ignored from import filter
                 EscherExAtom aAnimateMotionData( rStrm, DFF_msofbtAnimateMotionData );
-                sal_uInt32 nBits = 0x98;
-                sal_uInt32 nOrigin = 0x2;
-                float fByX = 100.0; // nBits&1
-                float fByY = 100.0; // nBits&1
-                float fFromX = 0.0; // nBits&2
-                float fFromY = 0.0; // nBits&2
-                float fToX = 100.0; // nBits&4
-                float fToY = 100.0; // nBits&4
+                sal_uInt32 const nBits = 0x98;
+                sal_uInt32 const nOrigin = 0x2;
+                float const fByX = 100.0; // nBits&1
+                float const fByY = 100.0; // nBits&1
+                float const fFromX = 0.0; // nBits&2
+                float const fFromY = 0.0; // nBits&2
+                float const fToX = 100.0; // nBits&4
+                float const fToY = 100.0; // nBits&4
                 rStrm.WriteUInt32( nBits ).WriteFloat( fByX ).WriteFloat( fByY ).WriteFloat( fFromX ).WriteFloat( fFromY ).WriteFloat( fToX ).WriteFloat( fToY ).WriteUInt32( nOrigin );
             }
 
@@ -1954,7 +1950,7 @@ void AnimationExporter::exportAnimateTransform( SvStream& rStrm, const Reference
             {
                 EscherExAtom aAnimateScaleData( rStrm, DFF_msofbtAnimateScaleData );
                 sal_uInt32 nBits = 0;
-                sal_uInt32 nZoomContents = 1;
+                sal_uInt32 const nZoomContents = 1;
                 float fByX = 100.0;
                 float fByY = 100.0;
                 float fFromX = 0.0;
@@ -2006,7 +2002,7 @@ void AnimationExporter::exportAnimateTransform( SvStream& rStrm, const Reference
             {
                 EscherExAtom aAnimateRotationData( rStrm, DFF_msofbtAnimateRotationData );
                 sal_uInt32 nBits = 0;
-                sal_uInt32 nU1 = 0;
+                sal_uInt32 const nU1 = 0;
                 float fBy = 360.0;
                 float fFrom = 0.0;
                 float fTo = 360.0;
@@ -2118,9 +2114,9 @@ void AnimationExporter::exportIterate( SvStream& rStrm, const Reference< XAnimat
 
         float       fInterval = 10.0;
         sal_Int32   nTextUnitEffect = 0;
-        sal_Int32   nU1 = 1;
-        sal_Int32   nU2 = 1;
-        sal_Int32   nU3 = 0xe;
+        sal_Int32 const nU1 = 1;
+        sal_Int32 const nU2 = 1;
+        sal_Int32 const nU3 = 0xe;
 
         sal_Int16 nIterateType = xIterate->getIterateType();
         switch( nIterateType )
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 227291fb9dcc..e0691464bee1 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -369,10 +369,9 @@ bool PowerPointExport::exportDocument()
 
     mXStatusIndicator.set( getStatusIndicator(), UNO_QUERY );
 
-    OUString sBaseURI( "BaseURI");
     std::vector< PropertyValue > aProperties;
     PropertyValue aProperty;
-    aProperty.Name = sBaseURI;
+    aProperty.Name = "BaseURI";
     aProperty.Value <<= getFileUrl();
     aProperties.push_back( aProperty );
 
@@ -1849,12 +1848,11 @@ void PowerPointExport::WriteShapeTree( const FSHelperPtr& pFS, PageType ePageTyp
     aDML.SetMaster( bMaster );
     aDML.SetPageType( ePageType );
     aDML.SetBackgroundDark(mbIsBackgroundDark);
-    sal_uInt32 nShapes;
 
     pFS->startElementNS( XML_p, XML_spTree, FSEND );
     pFS->write( MAIN_GROUP );
 
-    ResetGroupTable( nShapes = mXShapes->getCount() );
+    ResetGroupTable( mXShapes->getCount() );
 
     while( GetNextGroupEntry() ) {
 
diff --git a/sd/source/filter/eppt/pptx-stylesheet.cxx b/sd/source/filter/eppt/pptx-stylesheet.cxx
index 6a739344dd40..b4be91a71810 100644
--- a/sd/source/filter/eppt/pptx-stylesheet.cxx
+++ b/sd/source/filter/eppt/pptx-stylesheet.cxx
@@ -471,7 +471,7 @@ void PPTExStyleSheet::WriteTxCFStyleAtom( SvStream& rSt )
 {
     const PPTExCharLevel& rCharStyle = mpCharSheet[ EPP_TEXTTYPE_Other ]->maCharLevel[ 0 ];
 
-    sal_uInt16 nFlags = 0x60        // ??
+    sal_uInt16 const nFlags = 0x60        // ??
                       | 0x02        // fontsize;
                       | 0x04;       // fontcolor
 
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index 5b5af603e3a5..e8813362b410 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -257,7 +257,6 @@ bool SdGRFFilter::Export()
                     beans::PropertyValues aArgs;
                     TransformItems( SID_SAVEASDOC, *pSet, aArgs );
 
-                    OUString sInteractionHandler( "InteractionHandler" );
                     OUString sFilterName( "FilterName" );
                     OUString sShortName( rGraphicFilter.GetExportFormatShortName( nFilter ) );
 
@@ -272,7 +271,7 @@ bool SdGRFFilter::Export()
                             aArgs[ i ].Name = sFilterName;
                             aArgs[ i ].Value <<= sShortName;
                         }
-                        else if ( rStr == sInteractionHandler )
+                        else if ( rStr == "InteractionHandler" )
                         {
                             uno::Reference< task::XInteractionHandler > xHdl;
                             if ( aArgs[ i ].Value >>= xHdl )
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 141569cfd487..217c5cd4c2ec 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -1565,8 +1565,7 @@ bool SdPublishingDlg::Save()
     if( !pStream )
         return false;
 
-    sal_uInt16 aCheck = nMagic;
-    pStream->WriteUInt16( aCheck );
+    pStream->WriteUInt16( nMagic );
 
     // Destroys the SdIOCompat before the Stream is being distributed
     {
diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx
index 408fb9a97f3b..ae3fb3dccb33 100644
--- a/sd/source/filter/sdfilter.cxx
+++ b/sd/source/filter/sdfilter.cxx
@@ -55,8 +55,7 @@ SdFilter::~SdFilter()
 
 OUString SdFilter::ImplGetFullLibraryName( const OUString& rLibraryName )
 {
-    OUString aTemp(SVLIBRARY("?"));
-    return aTemp.replaceFirst( "?", rLibraryName );
+    return OUString(SVLIBRARY("?")).replaceFirst( "?", rLibraryName );
 }
 
 #ifndef DISABLE_DYNLOADING
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index 29313c60f32d..01cba586eb44 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -522,7 +522,6 @@ bool SdXMLFilter::Import( ErrCode& nError )
         if(mxStatusIndicator.is())
         {
             sal_Int32 nProgressRange(1000000);
-            sal_Int32 nProgressCurrent(0);
             OUString aMsg(SdResId(STR_LOAD_DOC));
             mxStatusIndicator->start(aMsg, nProgressRange);
 
@@ -533,7 +532,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
 
             // set ProgressCurrent
             uno::Any aProgCurrent;
-            aProgCurrent <<= nProgressCurrent;
+            aProgCurrent <<= sal_Int32(0);
             xInfoSet->setPropertyValue( "ProgressCurrent" , aProgCurrent);
         }
     }
@@ -543,8 +542,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
     tools::SvRef<SotStorageStream> xDocStream;
     uno::Reference < embed::XStorage > xStorage = mrMedium.GetStorage();
 
-    OUString sSourceStorage( "SourceStorage");
-    xInfoSet->setPropertyValue( sSourceStorage, Any( xStorage ) );
+    xInfoSet->setPropertyValue( "SourceStorage", Any( xStorage ) );
 
     if( !xStorage.is() )
         nRet = SD_XML_READERROR;
@@ -827,9 +825,8 @@ bool SdXMLFilter::Export()
         uno::Reference< beans::XPropertySet > xInfoSet( GenericPropertySet_CreateInstance( new PropertySetInfo( aExportInfoMap ) ) );
 
         SvtSaveOptions aSaveOpt;
-        OUString sUsePrettyPrinting("UsePrettyPrinting");
         bool bUsePrettyPrinting( aSaveOpt.IsPrettyPrinting() );
-        xInfoSet->setPropertyValue( sUsePrettyPrinting, makeAny( bUsePrettyPrinting ) );
+        xInfoSet->setPropertyValue( "UsePrettyPrinting", makeAny( bUsePrettyPrinting ) );
 
         const uno::Reference < embed::XStorage >& xStorage = mrMedium.GetOutputStorage();
 
@@ -837,8 +834,7 @@ bool SdXMLFilter::Export()
         OUString sPropName( "BaseURI" );
         xInfoSet->setPropertyValue( sPropName, makeAny( mrMedium.GetBaseURL( true ) ) );
 
-        OUString sTargetStorage( "TargetStorage" );
-        xInfoSet->setPropertyValue( sTargetStorage, Any( xStorage ) );
+        xInfoSet->setPropertyValue( "TargetStorage", Any( xStorage ) );
 
         if( SfxObjectCreateMode::EMBEDDED == mrDocShell.GetCreateMode() )
         {
@@ -883,7 +879,6 @@ bool SdXMLFilter::Export()
             if(mxStatusIndicator.is())
             {
                 sal_Int32 nProgressRange(1000000);
-                sal_Int32 nProgressCurrent(0);
                 OUString aMsg(SdResId(STR_SAVE_DOC));
                 mxStatusIndicator->start(aMsg, nProgressRange);
 
@@ -894,7 +889,7 @@ bool SdXMLFilter::Export()
 
                 // set ProgressCurrent
                 uno::Any aProgCurrent;
-                aProgCurrent <<= nProgressCurrent;
+                aProgCurrent <<= sal_Int32(0);
                 xInfoSet->setPropertyValue( "ProgressCurrent" , aProgCurrent);
             }
 
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index a871239e64a7..90301c946242 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -367,8 +367,6 @@ MotionPathTag::~MotionPathTag()
 
 void MotionPathTag::updatePathAttributes()
 {
-    OUString aEmpty( "?" );
-
     ::basegfx::B2DPolygon aCandidate;
     if( mxPolyPoly.count() )
     {
@@ -383,7 +381,7 @@ void MotionPathTag::updatePathAttributes()
         aEndArrow.append(::basegfx::B2DPoint(0.0, 30.0));
         aEndArrow.append(::basegfx::B2DPoint(20.0, 30.0));
         aEndArrow.setClosed(true);
-        mpPathObj->SetMergedItem(XLineEndItem(aEmpty,::basegfx::B2DPolyPolygon(aEndArrow)));
+        mpPathObj->SetMergedItem(XLineEndItem("?",::basegfx::B2DPolyPolygon(aEndArrow)));
         mpPathObj->SetMergedItem(XLineEndWidthItem(400));
         mpPathObj->SetMergedItem(XLineEndCenterItem(true));
     }
diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx
index 9006600efde4..00fddda8a313 100644
--- a/sd/source/ui/annotations/annotationtag.cxx
+++ b/sd/source/ui/annotations/annotationtag.cxx
@@ -432,14 +432,12 @@ sal_uLong AnnotationTag::GetMarkedPointCount() const
 
 bool AnnotationTag::MarkPoint(SdrHdl& /*rHdl*/, bool /*bUnmark*/ )
 {
-    bool bRet=false;
-    return bRet;
+    return false;
 }
 
 bool AnnotationTag::MarkPoints(const ::tools::Rectangle* /*pRect*/, bool /*bUnmark*/ )
 {
-    bool bChgd=false;
-    return bChgd;
+    return false;
 }
 
 bool AnnotationTag::getContext( SdrViewContext& /*rContext*/ )
diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx
index edc4be63b315..a1481e44a36b 100644
--- a/sd/source/ui/dlg/LayerTabBar.cxx
+++ b/sd/source/ui/dlg/LayerTabBar.cxx
@@ -128,12 +128,11 @@ sal_Int8 LayerTabBar::AcceptDrop( const AcceptDropEvent& rEvt )
 
     if( !pDrViewSh->GetDocSh()->IsReadOnly() )
     {
-        sal_uInt16    nPageId = SDRPAGE_NOTFOUND;
         Point         aPos( PixelToLogic( rEvt.maPosPixel ) );
         SdrLayerID    nLayerId = pDrViewSh->GetView()->GetDoc().GetLayerAdmin().GetLayerID(
             GetPageText( GetPageId( aPos ) ) );
 
-        nRet = pDrViewSh->AcceptDrop( rEvt, *this, nullptr, nPageId, nLayerId );
+        nRet = pDrViewSh->AcceptDrop( rEvt, *this, nullptr, SDRPAGE_NOTFOUND, nLayerId );
 
         SwitchPage( aPos );
     }
@@ -146,10 +145,9 @@ sal_Int8 LayerTabBar::AcceptDrop( const AcceptDropEvent& rEvt )
  */
 sal_Int8 LayerTabBar::ExecuteDrop( const ExecuteDropEvent& rEvt )
 {
-    sal_uInt16      nPageId = SDRPAGE_NOTFOUND;
     SdrLayerID      nLayerId = pDrViewSh->GetView()->GetDoc().GetLayerAdmin().GetLayerID(
         GetPageText( GetPageId( PixelToLogic( rEvt.maPosPixel ) ) ) );
-    sal_Int8        nRet = pDrViewSh->ExecuteDrop( rEvt, *this, nullptr, nPageId, nLayerId );
+    sal_Int8        nRet = pDrViewSh->ExecuteDrop( rEvt, *this, nullptr, SDRPAGE_NOTFOUND, nLayerId );
 
     EndSwitchPage();
 
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 3cb531eed408..9bd976062663 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -644,11 +644,9 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, SelectHdl, ListBox&, void)
         Bitmap aBmp = aGraphic.GetBitmap();
         sal_Int32 nBmpWidth  = aBmp.GetSizePixel().Width();
         sal_Int32 nBmpHeight = aBmp.GetSizePixel().Height();
-        sal_Int32 nPrevWidth = 200;
-        sal_Int32 nPrewHeight = 150;
 
-        double nXRatio = (double) nPrevWidth / nBmpWidth;
-        double nYRatio = (double) nPrewHeight / nBmpHeight;
+        double nXRatio = (double) 200 / nBmpWidth;
+        double nYRatio = (double) 150 / nBmpHeight;
         if ( nXRatio < nYRatio )
             aBmp.Scale( nXRatio, nXRatio );
         else
diff --git a/sd/source/ui/dlg/TemplateScanner.cxx b/sd/source/ui/dlg/TemplateScanner.cxx
index 502cdee563c8..4071cc1a023e 100644
--- a/sd/source/ui/dlg/TemplateScanner.cxx
+++ b/sd/source/ui/dlg/TemplateScanner.cxx
@@ -177,13 +177,11 @@ TemplateScanner::~TemplateScanner()
 
 TemplateScanner::State TemplateScanner::GetTemplateRoot()
 {
-    State eNextState (INITIALIZE_FOLDER_SCANNING);
-
     Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
     Reference<frame::XDocumentTemplates> xTemplates = frame::DocumentTemplates::create(xContext);
     mxTemplateRoot = xTemplates->getContent();
 
-    return eNextState;
+    return INITIALIZE_FOLDER_SCANNING;
 }
 
 TemplateScanner::State TemplateScanner::InitializeEntryScanning()
@@ -202,8 +200,7 @@ TemplateScanner::State TemplateScanner::InitializeEntryScanning()
         aProps[2] = "TypeDescription";
 
         //  Create a cursor to iterate over the templates in this folders.
-        ::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_DOCUMENTS_ONLY;
-        mxEntryResultSet.set( maFolderContent.createCursor(aProps, eInclude));
+        mxEntryResultSet.set( maFolderContent.createCursor(aProps, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY));
     }
     else
         eNextState = ERROR;
@@ -290,8 +287,7 @@ TemplateScanner::State TemplateScanner::InitializeFolderScanning()
         aProps[1] = "TargetDirURL";
 
         //  Create an cursor to iterate over the template folders.
-        ::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_ONLY;
-        mxFolderResultSet.set( aTemplateDir.createCursor(aProps, eInclude));
+        mxFolderResultSet.set( aTemplateDir.createCursor(aProps, ::ucbhelper::INCLUDE_FOLDERS_ONLY));
         if (mxFolderResultSet.is())
             eNextState = GATHER_FOLDER_LIST;
     }

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list